repo stringlengths 7 64 | file_url stringlengths 81 338 | file_path stringlengths 5 257 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:25:31 2026-01-05 01:50:38 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/react-vitest-3/stories/get-button-string.ts | test-storybooks/portable-stories-kitchen-sink/react-vitest-3/stories/get-button-string.ts | export const getButtonString = () => {
return "test";
};
| typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/react-vitest-3/e2e-tests/component-testing.spec.ts | test-storybooks/portable-stories-kitchen-sink/react-vitest-3/e2e-tests/component-testing.spec.ts | import { promises as fs } from "node:fs";
import path from "node:path";
import { expect, test } from "@playwright/test";
import { SbPage } from "../../../../code/e2e-tests/util";
const STORYBOOK_URL = "http://localhost:6006";
const TEST_STORY_PATH = path.resolve(
__dirname,
"..",
"stories",
"AddonTest.storie... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/react-vitest-3/e2e-tests/save-from-controls.spec.ts | test-storybooks/portable-stories-kitchen-sink/react-vitest-3/e2e-tests/save-from-controls.spec.ts | import { expect, test } from "@playwright/test";
import process from "process";
import { SbPage } from "../../../../code/e2e-tests/util";
const STORYBOOK_URL = "http://localhost:6006";
const type = process.env.STORYBOOK_TYPE || "dev";
test.describe("save-from-controls", () => {
test.describe.configure({ mode: "ser... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/react-vitest-3/e2e-tests/composition.spec.ts | test-storybooks/portable-stories-kitchen-sink/react-vitest-3/e2e-tests/composition.spec.ts | import { expect, test } from '@playwright/test';
import { SbPage } from '../../../../code/e2e-tests/util';
const STORYBOOK_URL = 'http://localhost:6006';
test.describe('composition', () => {
// the composed storybook can be slow to load, so we need to increase the timeout
test.describe.configure({ mode: 'serial'... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/svelte/playwright.config.ts | test-storybooks/portable-stories-kitchen-sink/svelte/playwright.config.ts | import { defineConfig, devices } from '@playwright/experimental-ct-svelte';
import ctViteConfig from './vite.config';
/**
* See https://playwright.dev/docs/test-configuration.
*/
export default defineConfig({
testDir: 'stories',
testMatch: '*.playwright.tsx',
/* The base directory, relative to the config file,... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/svelte/cypress.config.ts | test-storybooks/portable-stories-kitchen-sink/svelte/cypress.config.ts | import { defineConfig } from "cypress";
export default defineConfig({
component: {
devServer: {
framework: "svelte",
bundler: "vite",
},
},
});
| typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/svelte/vite.config.ts | test-storybooks/portable-stories-kitchen-sink/svelte/vite.config.ts | import { defineConfig } from 'vitest/config'
import { svelte } from '@sveltejs/vite-plugin-svelte'
import { svelteTesting } from '@testing-library/svelte/vite'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [svelte(), svelteTesting()],
test: {
environment: 'happy-dom'
}
})
| typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/svelte/.storybook/preview.ts | test-storybooks/portable-stories-kitchen-sink/svelte/.storybook/preview.ts | import type { Preview } from '@storybook/svelte';
import GlobalDecorator from './GlobalDecorator.svelte'
console.log('preview file is called!');
const preview: Preview = {
decorators: [
() => (
{
Component: GlobalDecorator,
}
),
],
globalTypes: {
locale: {
description: 'Loc... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/svelte/.storybook/main.ts | test-storybooks/portable-stories-kitchen-sink/svelte/.storybook/main.ts | import type { StorybookConfig } from '@storybook/svelte-vite';
const config: StorybookConfig = {
stories: ["../stories/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
framework: {
name: '@storybook/svelte-vite',
options: {},
},
};
export default config;
| typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/svelte/stories/Button.cy.tsx | test-storybooks/portable-stories-kitchen-sink/svelte/stories/Button.cy.tsx | /// <reference types="cypress"/>
import * as stories from './Button.stories';
import { composeStories, composeStory } from '@storybook/svelte';
// const { CSF3Primary, WithLoader, CSF3InputFieldFilled } = composeStories(stories)
describe('<Button()', () => {
it('renders primary button', async () => {
// TODO fi... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/svelte/stories/Button.stories.ts | test-storybooks/portable-stories-kitchen-sink/svelte/stories/Button.stories.ts | import { expect, fn, userEvent, within } from 'storybook/test';
import type { Meta, StoryFn as CSF2Story, StoryObj } from '../..';
import LoaderStoryComponent from './LoaderStoryComponent.svelte';
import InputFilledStoryComponent from './InputFilledStoryComponent.svelte';
import StoryWithLocaleComponent from './StoryW... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/svelte/stories/Button.stories.playwright.tsx | test-storybooks/portable-stories-kitchen-sink/svelte/stories/Button.stories.playwright.tsx | import { composeStories } from '@storybook/svelte';
import * as stories from './Button.stories';
export default composeStories(stories); | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/svelte/stories/Button.test.ts | test-storybooks/portable-stories-kitchen-sink/svelte/stories/Button.test.ts | /// <reference types="@testing-library/jest-dom" />;
import { it, expect, describe, afterEach } from 'vitest';
import { render, screen, cleanup } from '@testing-library/svelte';
// import '@testing-library/svelte/vitest';
import * as stories from './Button.stories';
// import type Button from './Button.svelte';
import ... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/svelte/stories/Button.playwright.ts | test-storybooks/portable-stories-kitchen-sink/svelte/stories/Button.playwright.ts | import { createTest } from '@storybook/svelte/experimental-playwright';
import { test as base } from '@playwright/experimental-ct-svelte';
import stories from './Button.stories.playwright';
const test = createTest(base);
test.skip('renders primary button', async ({ mount }) => {
// TODO: this is not working, proba... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/svelte/cypress/support/commands.ts | test-storybooks/portable-stories-kitchen-sink/svelte/cypress/support/commands.ts | /// <reference types="cypress" />
// ***********************************************
// This example commands.ts shows you how to
// create various custom commands and overwrite
// existing commands.
//
// For more comprehensive examples of custom
// commands please read more here:
// https://on.cypress.io/custom-comma... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/svelte/cypress/support/component.ts | test-storybooks/portable-stories-kitchen-sink/svelte/cypress/support/component.ts | // ***********************************************************
// This example support/component.ts is processed and
// loaded automatically before your test files.
//
// This is a great place to put global configuration and
// behavior that modifies Cypress.
//
// You can change the location of this file or turn off
/... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/svelte/playwright/index.ts | test-storybooks/portable-stories-kitchen-sink/svelte/playwright/index.ts | import { setProjectAnnotations } from '@storybook/svelte'
import sbAnnotations from '../.storybook/preview'
setProjectAnnotations([
sbAnnotations,
]);
| typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/nextjs/jest.setup.ts | test-storybooks/portable-stories-kitchen-sink/nextjs/jest.setup.ts | import "@testing-library/jest-dom";
import { setProjectAnnotations } from "@storybook/nextjs";
import sbAnnotations from "./.storybook/preview";
setProjectAnnotations([sbAnnotations]);
| typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/nextjs/typings.d.ts | test-storybooks/portable-stories-kitchen-sink/nextjs/typings.d.ts | declare module '*.png'
declare module '*.svg'
declare module '*.avif' | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/nextjs/.storybook/preview.tsx | test-storybooks/portable-stories-kitchen-sink/nextjs/.storybook/preview.tsx | import React from 'react';
import type { Preview } from '@storybook/react';
console.log('preview file is called!');
const preview: Preview = {
decorators: [
(StoryFn) => (
<div data-testid="global-decorator">
Global Decorator
<br />
<StoryFn />
</div>
),
],
globalType... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/nextjs/.storybook/main.ts | test-storybooks/portable-stories-kitchen-sink/nextjs/.storybook/main.ts | import type { StorybookConfig } from "@storybook/nextjs";
const config: StorybookConfig = {
stories: ["../stories/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
framework: {
name: "@storybook/nextjs",
options: {},
},
};
export default config;
| typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/nextjs/stories/ImageLegacy.stories.tsx | test-storybooks/portable-stories-kitchen-sink/nextjs/stories/ImageLegacy.stories.tsx | import Image from 'next/legacy/image';
import Accessibility from './assets/accessibility.svg';
export default {
component: Image,
args: {
src: Accessibility,
alt: 'Accessibility',
},
};
export const Default = {};
export const BlurredPlaceholder = {
args: {
placeholder: 'blur',
},
};
export co... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/nextjs/stories/GetImageProps.stories.tsx | test-storybooks/portable-stories-kitchen-sink/nextjs/stories/GetImageProps.stories.tsx | import { getImageProps } from 'next/image';
import React from 'react';
import Accessibility from './assets/accessibility.svg';
import Testing from './assets/testing.png';
// referenced from https://nextjs.org/docs/pages/api-reference/components/image#theme-detection-picture
const Component: React.FC<any> = (props) =>... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/nextjs/stories/NextHeader.stories.tsx | test-storybooks/portable-stories-kitchen-sink/nextjs/stories/NextHeader.stories.tsx | import type { Meta, StoryObj } from '@storybook/react';
import { expect, userEvent, within } from 'storybook/test';
import { cookies, headers } from '@storybook/nextjs/headers.mock';
import NextHeader from './NextHeader';
export default {
component: NextHeader,
} as Meta<typeof NextHeader>;
type Story = StoryObj<ty... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/nextjs/stories/dynamic-component.tsx | test-storybooks/portable-stories-kitchen-sink/nextjs/stories/dynamic-component.tsx | import React from 'react';
export default function DynamicComponent() {
return <div>I am a dynamically loaded component</div>;
}
| typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/nextjs/stories/Link.stories.tsx | test-storybooks/portable-stories-kitchen-sink/nextjs/stories/Link.stories.tsx | import React from 'react';
import Link from 'next/link';
import type { Meta, StoryObj } from '@storybook/react';
import style from './Link.stories.module.css';
// `onClick`, `href`, and `ref` need to be passed to the DOM element
// for proper handling
const MyButton = React.forwardRef<
HTMLAnchorElement,
React.De... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/nextjs/stories/Font.stories.tsx | test-storybooks/portable-stories-kitchen-sink/nextjs/stories/Font.stories.tsx | import Font from './Font';
export default {
component: Font,
};
export const WithClassName = {
args: {
variant: 'className',
},
};
export const WithStyle = {
args: {
variant: 'style',
},
};
export const WithVariable = {
args: {
variant: 'variable',
},
};
| typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/nextjs/stories/StyledJsx.stories.tsx | test-storybooks/portable-stories-kitchen-sink/nextjs/stories/StyledJsx.stories.tsx | import React from 'react';
const Component = () => (
<div>
<style jsx>{`
.main p {
color: #ff4785;
}
`}</style>
<main className="main">
<p>This is styled using Styled JSX</p>
</main>
</div>
);
export default {
component: Component,
} as Meta<typeof Component>;
export c... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/nextjs/stories/Navigation.stories.tsx | test-storybooks/portable-stories-kitchen-sink/nextjs/stories/Navigation.stories.tsx | import {
useRouter,
usePathname,
useSearchParams,
useParams,
useSelectedLayoutSegment,
useSelectedLayoutSegments,
} from 'next/navigation';
import React from 'react';
import type { Meta, StoryObj } from '@storybook/react';
import { expect, userEvent, within } from 'storybook/test';
import { getRouter } from... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/nextjs/stories/portable-stories.test.tsx | test-storybooks/portable-stories-kitchen-sink/nextjs/stories/portable-stories.test.tsx | import { describe, it, expect } from '@jest/globals';
import { jest } from '@jest/globals';
import { composeStories, setProjectAnnotations } from '@storybook/nextjs';
import * as imageStories from './Image.stories';
import * as navigationStories from './Navigation.stories';
import * as linkStories from './Link.stories... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/nextjs/stories/DynamicImport.stories.tsx | test-storybooks/portable-stories-kitchen-sink/nextjs/stories/DynamicImport.stories.tsx | import dynamic from 'next/dynamic';
import React, { Suspense } from 'react';
const DynamicComponent = dynamic(() => import('./dynamic-component'), {
ssr: false,
});
function Component() {
return (
<Suspense fallback="Loading...">
<DynamicComponent />
</Suspense>
);
}
export default {
component:... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/nextjs/stories/NextHeader.tsx | test-storybooks/portable-stories-kitchen-sink/nextjs/stories/NextHeader.tsx | import React from 'react';
import { cookies, headers } from 'next/headers';
export default function Component() {
function handleClick() {
cookies().set('user-id', 'encrypted-id');
}
return (
<>
<h3>Cookies:</h3>
{cookies()
.getAll()
.map(({ name, value }) => {
retu... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/nextjs/stories/Image.stories.tsx | test-storybooks/portable-stories-kitchen-sink/nextjs/stories/Image.stories.tsx | import React, { useState } from 'react';
import Image from 'next/image';
import Accessibility from './assets/accessibility.svg';
import AvifImage from './assets/avif-test-image.avif';
import { StoryObj } from '@storybook/react';
export default {
component: Image,
args: {
src: Accessibility,
alt: 'Accessib... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/nextjs/stories/Head.stories.tsx | test-storybooks/portable-stories-kitchen-sink/nextjs/stories/Head.stories.tsx | import Head from 'next/head';
import React from 'react';
import { expect, waitFor } from 'storybook/test';
import { StoryObj } from '@storybook/react';
function Component() {
return (
<div>
<Head>
<title>Next.js Head Title</title>
<meta property="og:title" content="My page title" key="title... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/nextjs/stories/Font.tsx | test-storybooks/portable-stories-kitchen-sink/nextjs/stories/Font.tsx | /* eslint-disable react/prop-types */
import { Rubik_Puddles } from 'next/font/google';
import localFont from 'next/font/local';
import React from 'react';
const rubik = Rubik_Puddles({
subsets: ['latin'],
variable: '--font-latin-rubik',
weight: '400',
});
export const localRubikStorm = localFont({
src: '/fo... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/nextjs/stories/Router.stories.tsx | test-storybooks/portable-stories-kitchen-sink/nextjs/stories/Router.stories.tsx | import React from 'react';
import type { Meta, StoryObj } from '@storybook/react';
import { expect, within, userEvent } from 'storybook/test';
import { getRouter } from '@storybook/nextjs/router.mock';
import Router, { useRouter } from 'next/router';
function Component() {
const router = useRouter();
const searchP... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/nextjs/pages/_app.tsx | test-storybooks/portable-stories-kitchen-sink/nextjs/pages/_app.tsx | import "@/styles/globals.css";
import type { AppProps } from "next/app";
export default function App({ Component, pageProps }: AppProps) {
return <Component {...pageProps} />;
}
| typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/nextjs/pages/index.tsx | test-storybooks/portable-stories-kitchen-sink/nextjs/pages/index.tsx | import Head from "next/head";
import Image from "next/image";
import { Inter } from "next/font/google";
import styles from "@/styles/Home.module.css";
const inter = Inter({ subsets: ["latin"] });
export default function Home() {
return (
<>
<Head>
<title>Create Next App</title>
<meta name=... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/nextjs/pages/_document.tsx | test-storybooks/portable-stories-kitchen-sink/nextjs/pages/_document.tsx | import { Html, Head, Main, NextScript } from "next/document";
export default function Document() {
return (
<Html lang="en">
<Head />
<body>
<Main />
<NextScript />
</body>
</Html>
);
}
| typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/nextjs/pages/api/hello.ts | test-storybooks/portable-stories-kitchen-sink/nextjs/pages/api/hello.ts | // Next.js API route support: https://nextjs.org/docs/api-routes/introduction
import type { NextApiRequest, NextApiResponse } from "next";
type Data = {
name: string;
};
export default function handler(
req: NextApiRequest,
res: NextApiResponse<Data>,
) {
res.status(200).json({ name: "John Doe" });
}
| typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/vue3/playwright.config.ts | test-storybooks/portable-stories-kitchen-sink/vue3/playwright.config.ts | import { defineConfig, devices } from '@playwright/experimental-ct-vue';
/**
* See https://playwright.dev/docs/test-configuration.
*/
export default defineConfig({
testDir: 'stories',
testMatch: '*.playwright.tsx',
/* The base directory, relative to the config file, for snapshot files created with toMatchSnaps... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/vue3/cypress.config.ts | test-storybooks/portable-stories-kitchen-sink/vue3/cypress.config.ts | import { defineConfig } from "cypress";
export default defineConfig({
screenshotOnRunFailure: false,
component: {
devServer: {
framework: "vue",
bundler: "vite",
},
},
});
| typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/vue3/vite.config.ts | test-storybooks/portable-stories-kitchen-sink/vue3/vite.config.ts | import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue()],
})
| typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/vue3/.storybook/preview.ts | test-storybooks/portable-stories-kitchen-sink/vue3/.storybook/preview.ts | import type { Preview } from '@storybook/vue3';
console.log('preview file is called!');
const preview: Preview = {
// TODO: figure out decorators
decorators: [
() => ({
template: `
<div data-decorator>
Global Decorator
<br />
<story />
</div>
`
})... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/vue3/.storybook/main.ts | test-storybooks/portable-stories-kitchen-sink/vue3/.storybook/main.ts | import type { StorybookConfig } from "@storybook/vue3-vite";
const config: StorybookConfig = {
stories: ["../stories/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
framework: {
name: "@storybook/vue3-vite",
options: {},
},
};
export default config;
| typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/vue3/stories/Button.cy.tsx | test-storybooks/portable-stories-kitchen-sink/vue3/stories/Button.cy.tsx | /// <reference types="cypress"/>
import * as stories from './Button.stories';
import { composeStories } from '@storybook/vue3';
const { CSF3Primary, WithLoader, CSF3InputFieldFilled } = composeStories(stories)
describe('<Button()', () => {
it('renders primary button', async () => {
cy.mount(CSF3Primary())
c... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/vue3/stories/Button.stories.ts | test-storybooks/portable-stories-kitchen-sink/vue3/stories/Button.stories.ts | import { userEvent, within, expect, fn } from 'storybook/test';
import type { Meta, StoryFn as CSF2Story, StoryObj } from '@storybook/vue3';
import Button from './Button.vue';
const meta = {
title: 'Example/Button',
component: Button,
argTypes: {
size: { control: 'select', options: ['small', 'medium', 'larg... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/vue3/stories/Button.stories.portable.ts | test-storybooks/portable-stories-kitchen-sink/vue3/stories/Button.stories.portable.ts | import { composeStories, composeStory } from '@storybook/vue3';
import * as stories from './Button.stories';
export default composeStories(stories);
export const SingleComposedStory = composeStory(stories.CSF3Primary, stories.default);
export const WithSpanishGlobal = composeStory(stories.CSF2StoryWithLocale, storie... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/vue3/stories/Button.playwright.tsx | test-storybooks/portable-stories-kitchen-sink/vue3/stories/Button.playwright.tsx | import { test as base, expect } from '@playwright/experimental-ct-vue';
import { createTest } from '@storybook/vue3/experimental-playwright';
import stories, { SingleComposedStory, WithSpanishGlobal } from './Button.stories.portable';
const test = createTest(base);
test('renders with composeStories (plural)', async (... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/vue3/cypress/support/commands.ts | test-storybooks/portable-stories-kitchen-sink/vue3/cypress/support/commands.ts | /// <reference types="cypress" />
// ***********************************************
// This example commands.ts shows you how to
// create various custom commands and overwrite
// existing commands.
//
// For more comprehensive examples of custom
// commands please read more here:
// https://on.cypress.io/custom-comma... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/vue3/cypress/support/component.ts | test-storybooks/portable-stories-kitchen-sink/vue3/cypress/support/component.ts | /* eslint-disable @typescript-eslint/no-namespace */
// ***********************************************************
// This example support/component.ts is processed and
// loaded automatically before your test files.
//
// This is a great place to put global configuration and
// behavior that modifies Cypress.
//
// Y... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/vue3/playwright/index.ts | test-storybooks/portable-stories-kitchen-sink/vue3/playwright/index.ts | import { setProjectAnnotations } from '@storybook/vue3'
import sbAnnotations from '../.storybook/preview'
setProjectAnnotations([
sbAnnotations,
]);
| typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/react/jest.setup.ts | test-storybooks/portable-stories-kitchen-sink/react/jest.setup.ts | import '@testing-library/jest-dom';
import { setProjectAnnotations } from '@storybook/react-vite';
import sbAnnotations from './.storybook/preview';
setProjectAnnotations([sbAnnotations]);
| typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/react/cypress.config.ts | test-storybooks/portable-stories-kitchen-sink/react/cypress.config.ts | import { defineConfig } from "cypress";
export default defineConfig({
screenshotOnRunFailure: false,
component: {
devServer: {
framework: "react",
bundler: "vite",
},
},
});
| typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/react/playwright-e2e.config.ts | test-storybooks/portable-stories-kitchen-sink/react/playwright-e2e.config.ts | import { defineConfig, devices } from "@playwright/test";
import path from "node:path";
/**
* See https://playwright.dev/docs/test-configuration.
*/
export default defineConfig({
testDir: "./e2e-tests",
outputDir: "./test-results",
/* Maximum time one test can run for. */
timeout: (process.env.CI ? 60 : 30) ... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/react/playwright-ct.config.ts | test-storybooks/portable-stories-kitchen-sink/react/playwright-ct.config.ts | import { defineConfig, devices } from '@playwright/experimental-ct-react';
/**
* See https://playwright.dev/docs/test-configuration.
*/
export default defineConfig({
testDir: 'stories',
testMatch: '*.playwright.tsx',
/* The base directory, relative to the config file, for snapshot files created with toMatchSna... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/react/globals.setup.ts | test-storybooks/portable-stories-kitchen-sink/react/globals.setup.ts | globalThis.FEATURES = {};
| typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/react/.storybook/aliased.ts | test-storybooks/portable-stories-kitchen-sink/react/.storybook/aliased.ts | // This file is used to test that viteFinal is correctly loaded in Vitest
// main.ts defines this file as a resolve alias, which is used in the ViteFinalTest story
export const aliasedFunction = () => true;
| typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/react/.storybook/preview.tsx | test-storybooks/portable-stories-kitchen-sink/react/.storybook/preview.tsx | import type { Preview } from '@storybook/react-vite';
import { getDecoratorString } from './get-decorator-string';
console.log('preview file is called!');
const preview: Preview = {
decorators: [
(StoryFn) => (
<div data-testid="global-decorator">
<div data-testid="decorator-string">{getDecoratorS... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/react/.storybook/vitest.setup.ts | test-storybooks/portable-stories-kitchen-sink/react/.storybook/vitest.setup.ts | import { setProjectAnnotations } from "@storybook/react-vite";
import * as addonA11yAnnotations from "@storybook/addon-a11y/preview";
import * as projectAnnotations from "./preview";
import { getString } from "./setup-file-dependency";
setProjectAnnotations([addonA11yAnnotations, projectAnnotations]);
console.log(get... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/react/.storybook/setup-file-dependency.ts | test-storybooks/portable-stories-kitchen-sink/react/.storybook/setup-file-dependency.ts | export const getString = () => {
return "initial string";
};
| typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/react/.storybook/main.ts | test-storybooks/portable-stories-kitchen-sink/react/.storybook/main.ts | import { join } from "node:path";
import type { StorybookConfig } from "@storybook/react-vite";
const config: StorybookConfig = {
stories: ["../stories/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
addons: ["@storybook/addon-vitest", "@storybook/addon-a11y"],
framework: {
name: "@storybook/react-vite",
options: ... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/react/.storybook/get-decorator-string.ts | test-storybooks/portable-stories-kitchen-sink/react/.storybook/get-decorator-string.ts | export const getDecoratorString = () => {
return "Global Decorator";
};
| typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/react/stories/Button.cy.tsx | test-storybooks/portable-stories-kitchen-sink/react/stories/Button.cy.tsx | /// <reference types="cypress" />
import * as stories from './Button.stories';
import { composeStories } from '@storybook/react-vite';
const { CSF3Primary, WithLoader } = composeStories(stories);
describe('<Button />', () => {
it('renders with loaders and play function', () => {
cy.then(async () => {
awai... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/react/stories/UnhandledErrors.stories.tsx | test-storybooks/portable-stories-kitchen-sink/react/stories/UnhandledErrors.stories.tsx | import type { Meta, StoryObj } from '@storybook/react-vite';
async function unhandledRejection() {
throwError('I THREW AN UNHANDLED REJECTION!');
}
function unhandledError() {
throwError('I THREW AN UNHANDLED ERROR!');
}
function throwError(message: string) {
throw new Error(message);
}
const meta = {
title:... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/react/stories/MyButton.stories.tsx | test-storybooks/portable-stories-kitchen-sink/react/stories/MyButton.stories.tsx | import type { Meta, StoryObj as CSF3Story } from '@storybook/react-vite';
import type { ButtonProps } from './Button';
import { Button } from './Button';
const meta = {
title: 'Example/MyButton',
component: Button,
tags: ['!test'],
argTypes: {
backgroundColor: { control: 'color' },
},
} satisfies Meta<t... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/react/stories/AddonTest.tsx | test-storybooks/portable-stories-kitchen-sink/react/stories/AddonTest.tsx | import { getButtonString } from './get-button-string';
export const Component = () => {
return <button>{getButtonString()}</button>;
};
| typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/react/stories/AddonTest.stories.tsx | test-storybooks/portable-stories-kitchen-sink/react/stories/AddonTest.stories.tsx | import { expect, within } from 'storybook/test';
import { Meta, type StoryObj } from '@storybook/react-vite';
import { instrument } from 'storybook/internal/instrumenter';
import { Component } from './AddonTest';
declare global {
// eslint-disable-next-line no-var
var __vitest_browser__: boolean;
}
const meta = {... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/react/stories/Button.stories.tsx | test-storybooks/portable-stories-kitchen-sink/react/stories/Button.stories.tsx | import { expect, fn } from 'storybook/test';
import type { Meta, StoryFn as CSF2Story, StoryObj as CSF3Story } from '@storybook/react-vite';
import type { ButtonProps } from './Button';
import { Button } from './Button';
const meta = {
title: 'Example/Button',
component: Button,
argTypes: {
backgroundColor:... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/react/stories/Button.playwright.tsx | test-storybooks/portable-stories-kitchen-sink/react/stories/Button.playwright.tsx |
import { createTest } from '@storybook/react/experimental-playwright';
import { test as base, expect } from '@playwright/experimental-ct-react';
import stories, { SingleComposedStory, WithSpanishGlobal } from './Button.stories.playwright';
const test = createTest(base);
test('renders with composeStories (plural)', ... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/react/stories/Button.tsx | test-storybooks/portable-stories-kitchen-sink/react/stories/Button.tsx | import React from 'react';
import './button.css';
export interface ButtonProps {
/**
* Is this the principal call to action on the page?
*/
primary?: boolean;
/**
* What background color to use
*/
backgroundColor?: string;
/**
* How large should the button be?
*/
size?: 'small' | 'medium'... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/react/stories/OtherComponent.stories.tsx | test-storybooks/portable-stories-kitchen-sink/react/stories/OtherComponent.stories.tsx | import { Meta, type StoryObj } from '@storybook/react-vite';
const Component = () => <button>test</button>
const meta = {
title: 'Addons/Group/Other',
component: Component,
} as Meta<typeof Component>;
export default meta;
type Story = StoryObj<typeof meta>;
export const Passes: Story = {
};
export const Fail... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/react/stories/get-button-string.ts | test-storybooks/portable-stories-kitchen-sink/react/stories/get-button-string.ts | export const getButtonString = () => {
return "test";
};
| typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/react/stories/Button.stories.playwright.ts | test-storybooks/portable-stories-kitchen-sink/react/stories/Button.stories.playwright.ts | import { composeStories, composeStory } from "@storybook/react-vite";
import * as stories from "./Button.stories";
export default composeStories(stories);
export const SingleComposedStory = composeStory(
stories.CSF3Primary,
stories.default
);
export const WithSpanishGlobal = composeStory(
stories.CSF2StoryWit... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/react/stories/Button.test.tsx | test-storybooks/portable-stories-kitchen-sink/react/stories/Button.test.tsx | import { render, screen, cleanup } from '@testing-library/react';
import { addons } from 'storybook/preview-api';
import { setProjectAnnotations, composeStories, composeStory } from '@storybook/react-vite';
import * as stories from './Button.stories';
afterEach(() => {
cleanup();
});
// example with composeStories... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/react/cypress/support/commands.ts | test-storybooks/portable-stories-kitchen-sink/react/cypress/support/commands.ts | /// <reference types="cypress" />
// ***********************************************
// This example commands.ts shows you how to
// create various custom commands and overwrite
// existing commands.
//
// For more comprehensive examples of custom
// commands please read more here:
// https://on.cypress.io/custom-comma... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/react/cypress/support/component.ts | test-storybooks/portable-stories-kitchen-sink/react/cypress/support/component.ts | /* eslint-disable @typescript-eslint/no-namespace */
// ***********************************************************
// This example support/component.ts is processed and
// loaded automatically before your test files.
//
// This is a great place to put global configuration and
// behavior that modifies Cypress.
//
// Y... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/react/playwright/index.ts | test-storybooks/portable-stories-kitchen-sink/react/playwright/index.ts | import { setProjectAnnotations } from "@storybook/react-vite";
import sbAnnotations from "../.storybook/preview";
setProjectAnnotations([sbAnnotations]);
| typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/react/e2e-tests/component-testing.spec.ts | test-storybooks/portable-stories-kitchen-sink/react/e2e-tests/component-testing.spec.ts | import { promises as fs } from "node:fs";
import path from "node:path";
import { expect, test } from "@playwright/test";
import { SbPage } from "../../../../code/e2e-tests/util";
const STORYBOOK_URL = "http://localhost:6006";
const TEST_STORY_PATH = path.resolve(
__dirname,
"..",
"stories",
"AddonTest.storie... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/react/e2e-tests/save-from-controls.spec.ts | test-storybooks/portable-stories-kitchen-sink/react/e2e-tests/save-from-controls.spec.ts | import { expect, test } from "@playwright/test";
import process from "process";
import { SbPage } from "../../../../code/e2e-tests/util";
const STORYBOOK_URL = "http://localhost:6006";
const type = process.env.STORYBOOK_TYPE || "dev";
test.describe("save-from-controls", () => {
test.describe.configure({ mode: "ser... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/portable-stories-kitchen-sink/react/e2e-tests/composition.spec.ts | test-storybooks/portable-stories-kitchen-sink/react/e2e-tests/composition.spec.ts | import { expect, test } from '@playwright/test';
import { SbPage } from '../../../../code/e2e-tests/util';
const STORYBOOK_URL = 'http://localhost:6006';
test.describe('composition', () => {
// the composed storybook can be slow to load, so we need to increase the timeout
test.describe.configure({ mode: 'serial'... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/server-kitchen-sink/.storybook/main.ts | test-storybooks/server-kitchen-sink/.storybook/main.ts | import type { StorybookConfig } from '@storybook/server-webpack5';
const mainConfig: StorybookConfig = {
stories: ['../stories/**/*.stories.@(json|yaml|yml)'],
logLevel: 'debug',
addons: [
'@storybook/addon-docs',
'@storybook/addon-a11y',
'@storybook/addon-links'
],
core: {
disableTelemetry: ... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/external-docs/next-env.d.ts | test-storybooks/external-docs/next-env.d.ts | /// <reference types="next" />
/// <reference types="next/image-types/global" />
// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
| typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/external-docs/components/AccountForm.stories.tsx | test-storybooks/external-docs/components/AccountForm.stories.tsx | /* eslint-disable storybook/use-storybook-testing-library */
// @TODO: use addon-interactions and remove the rule disable above
import type { StoryObj, Meta } from '@storybook/react';
import { screen } from '@testing-library/dom';
import userEvent from '@testing-library/user-event';
import { AccountForm } from './Accou... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/external-docs/components/button.stories.tsx | test-storybooks/external-docs/components/button.stories.tsx | /* eslint-disable storybook/use-storybook-testing-library */
// @TODO: use addon-interactions and remove the rule disable above
import React from 'react';
import type { Meta, ComponentStoryFn } from '@storybook/react';
import { screen } from '@testing-library/dom';
import userEvent from '@testing-library/user-event';
i... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/external-docs/components/button.tsx | test-storybooks/external-docs/components/button.tsx | import React, { ButtonHTMLAttributes } from 'react';
export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
/**
* A label to show on the button
*/
label: string;
}
export const Button = ({ label = 'Hello', ...props }: ButtonProps) => (
<button type="button" {...props}>
{label}
... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/external-docs/components/emoji-button.stories.tsx | test-storybooks/external-docs/components/emoji-button.stories.tsx | import React from 'react';
import { EmojiButton } from './emoji-button';
export default { component: EmojiButton, title: 'Examples / Emoji Button' };
export const WithArgs = (args: any) => <EmojiButton {...args} />;
WithArgs.args = { label: 'With args' };
export const Basic = () => <EmojiButton label="Click me" />;
| typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/external-docs/components/emoji-button.tsx | test-storybooks/external-docs/components/emoji-button.tsx | import React from 'react';
import PropTypes from 'prop-types';
export const EmojiButton = ({ label, ...props }: { label: string }) => (
<button type="button" {...props}>
⚠️ {label}
</button>
);
EmojiButton.propTypes = {
/**
* A label to show on the button
*/
label: PropTypes.string,
};
EmojiButton.... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/external-docs/components/AccountForm.tsx | test-storybooks/external-docs/components/AccountForm.tsx | import { keyframes, styled } from 'storybook/theming';
import {
ErrorMessage,
Field as FormikInput,
Form as FormikForm,
Formik,
FormikProps,
} from 'formik';
import React, { FC, HTMLAttributes, useCallback, useState } from 'react';
import { Icons, WithTooltip } from 'storybook/internal/components';
const err... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/standalone-preview/storybook.ts | test-storybooks/standalone-preview/storybook.ts | import './addPreview';
import { configure } from '@storybook/react';
import * as Comp1 from './stories/Component1.stories';
import * as Comp2 from './stories/Component2.stories';
configure(() => [Comp1, Comp2], module);
| typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/standalone-preview/addPreview.ts | test-storybooks/standalone-preview/addPreview.ts | export {};
global.PREVIEW_URL = process.env.PREVIEW_URL;
| typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/standalone-preview/stories/Component2.stories.tsx | test-storybooks/standalone-preview/stories/Component2.stories.tsx | import * as React from 'react';
export default {
title: 'Component 2',
};
export const Story1 = () => <div>Component 2 - Story 1</div>;
export const Story2 = () => <div>Component 2 - Story 2</div>;
| typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/standalone-preview/stories/Component1.stories.tsx | test-storybooks/standalone-preview/stories/Component1.stories.tsx | import * as React from 'react';
export default {
title: 'Component 1',
};
export const Story1 = () => <div>Component 1 - Story 1</div>;
| typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/yarn-pnp/vitest.shims.d.ts | test-storybooks/yarn-pnp/vitest.shims.d.ts | /// <reference types="@vitest/browser-playwright" />
| typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/yarn-pnp/vite.config.ts | test-storybooks/yarn-pnp/vite.config.ts | /// <reference types="vitest/config" />
import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
// https://vite.dev/config/
import path from "node:path";
import { fileURLToPath } from "node:url";
import { storybookTest } from "@storybook/addon-vitest/vitest-plugin";
import { playwright } from "@vite... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/yarn-pnp/.storybook/preview.ts | test-storybooks/yarn-pnp/.storybook/preview.ts | import type { Preview } from '@storybook/react-vite'
const preview: Preview = {
parameters: {
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i,
},
},
a11y: {
// 'todo' - show a11y violations in the test UI only
// 'error' - fail CI on a11y viola... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/yarn-pnp/.storybook/vitest.setup.ts | test-storybooks/yarn-pnp/.storybook/vitest.setup.ts | import * as a11yAddonAnnotations from "@storybook/addon-a11y/preview";
import { setProjectAnnotations } from "@storybook/vue3-vite";
import * as projectAnnotations from "./preview";
// This is an important step to apply the right configuration when testing your stories.
// More info at: https://storybook.js.org/docs/a... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/yarn-pnp/.storybook/main.ts | test-storybooks/yarn-pnp/.storybook/main.ts | import type { StorybookConfig } from "@storybook/vue3-vite";
const config: StorybookConfig = {
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
addons: [
"@chromatic-com/storybook",
"@storybook/addon-docs",
"@storybook/addon-a11y",
"@storybook/addon-vitest",
],
framewor... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/yarn-pnp/src/main.ts | test-storybooks/yarn-pnp/src/main.ts | import { createApp } from 'vue'
import './style.css'
import App from './App.vue'
createApp(App).mount('#app')
| typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/test-storybooks/yarn-pnp/src/stories/Button.stories.ts | test-storybooks/yarn-pnp/src/stories/Button.stories.ts | import type { Meta, StoryObj } from '@storybook/vue3-vite';
import { fn } from 'storybook/test';
import Button from './Button.vue';
// More on how to set up stories at: https://storybook.js.org/docs/writing-stories
const meta = {
title: 'Example/Button',
component: Button,
// This component will have an automa... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.