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/code/addons/docs/src/blocks/components/DocsPage.tsx
code/addons/docs/src/blocks/components/DocsPage.tsx
import type { FC } from 'react'; import React from 'react'; import { withReset } from 'storybook/internal/components'; import { transparentize } from 'polished'; import type { CSSObject } from 'storybook/theming'; import { styled } from 'storybook/theming'; /** * This selector styles all raw elements inside the Doc...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/components/Preview.tsx
code/addons/docs/src/blocks/components/Preview.tsx
import type { ClipboardEvent, FC, PropsWithChildren, ReactElement, ReactNode } from 'react'; import React, { Children, useCallback, useContext, useState } from 'react'; import { ActionBar, Zoom } from 'storybook/internal/components'; import type { ActionItem } from 'storybook/internal/components'; import { darken } f...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/components/Preview.stories.tsx
code/addons/docs/src/blocks/components/Preview.stories.tsx
import type { ComponentProps } from 'react'; import React from 'react'; import { Button, Spaced } from 'storybook/internal/components'; import type { DocsContextProps, ModuleExport } from 'storybook/internal/types'; import { styled } from 'storybook/theming'; import * as ButtonStories from '../examples/Button.storie...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/components/Title.stories.ts
code/addons/docs/src/blocks/components/Title.stories.ts
import { Title } from './Title'; export default { component: Title }; export const Basic = { args: { children: 'Basic title', }, };
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/components/Source.stories.tsx
code/addons/docs/src/blocks/components/Source.stories.tsx
import type { Meta, StoryObj } from '@storybook/react-vite'; import { Source, SourceError } from './Source'; const meta: Meta<typeof Source> = { component: Source, }; export default meta; type Story = StoryObj<typeof meta>; export const Loading: Story = { args: { isLoading: true }, }; export const JSX: Story ...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/components/Source.tsx
code/addons/docs/src/blocks/components/Source.tsx
import type { ComponentProps, FunctionComponent } from 'react'; import React from 'react'; import type { SupportedLanguage, SyntaxHighlighterProps } from 'storybook/internal/components'; import { SyntaxHighlighter } from 'storybook/internal/components'; import { ThemeProvider, convert, ignoreSsrWarning, style...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/components/Title.tsx
code/addons/docs/src/blocks/components/Title.tsx
import { withReset } from 'storybook/internal/components'; import { styled } from 'storybook/theming'; const breakpoint = 600; export const Title = styled.h1(withReset, ({ theme }) => ({ color: theme.color.defaultText, fontSize: theme.typography.size.m3, fontWeight: theme.typography.weight.bold, lineHeight: ...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/components/Toolbar.tsx
code/addons/docs/src/blocks/components/Toolbar.tsx
import type { FC, SyntheticEvent } from 'react'; import React from 'react'; import { Button, Toolbar as SharedToolbar, getStoryHref } from 'storybook/internal/components'; import { ShareAltIcon, ZoomIcon, ZoomOutIcon, ZoomResetIcon } from '@storybook/icons'; import { styled } from 'storybook/theming'; interface Zoo...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/components/ColorPalette.stories.tsx
code/addons/docs/src/blocks/components/ColorPalette.stories.tsx
import React from 'react'; import { ColorItem, ColorPalette } from './ColorPalette'; export default { component: ColorPalette, }; export const DefaultStyle = () => ( <ColorPalette> <ColorItem title="theme.color.greyscale" subtitle="Some of the greys" colors={['#FFFFFF', '#F8F8F8', '#F3F3F3'...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/components/TableOfContents.tsx
code/addons/docs/src/blocks/components/TableOfContents.tsx
import React, { useEffect } from 'react'; import type { FC, ReactElement } from 'react'; import type { Channel } from 'storybook/internal/channels'; import { NAVIGATE_URL } from 'storybook/internal/core-events'; import { styled } from 'storybook/theming'; import tocbot from 'tocbot'; // Define our own interface base...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/components/DocsPage.stories.tsx
code/addons/docs/src/blocks/components/DocsPage.stories.tsx
/* eslint-disable jsx-a11y/anchor-is-valid */ import React from 'react'; import { Global, css } from 'storybook/theming'; import { ArgsTable, Source } from '.'; import { Markdown as MarkdownComponent } from '../blocks/Markdown'; import * as markdown from '../blocks/Markdown.stories'; import { Unstyled } from '../bloc...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/components/Typeset.tsx
code/addons/docs/src/blocks/components/Typeset.tsx
import type { FC } from 'react'; import React from 'react'; import { withReset } from 'storybook/internal/components'; import { transparentize } from 'polished'; import { styled } from 'storybook/theming'; import { getBlockBackgroundStyle } from './BlockBackgroundStyles'; const Label = styled.div(({ theme }) => ({ ...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/components/BlockBackgroundStyles.tsx
code/addons/docs/src/blocks/components/BlockBackgroundStyles.tsx
import type { Theme } from 'storybook/theming'; export const getBlockBackgroundStyle: (theme: Theme) => object = (theme: Theme) => ({ borderRadius: theme.appBorderRadius, background: theme.background.content, boxShadow: theme.base === 'light' ? 'rgba(0, 0, 0, 0.10) 0 1px 3px 0' : 'rgba(0, 0, 0, 0.20) 0 2px 5...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/components/TableOfContents.stories.tsx
code/addons/docs/src/blocks/components/TableOfContents.stories.tsx
import React from 'react'; import type { Meta, StoryObj } from '@storybook/react-vite'; import { expect, within } from 'storybook/test'; import { styled } from 'storybook/theming'; import { Heading } from '../blocks/Heading'; import { TableOfContents } from './TableOfContents'; const MockPage = styled.div` displa...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/components/index.ts
code/addons/docs/src/blocks/components/index.ts
export * from './Source'; export * from './EmptyBlock'; export * from './DocsPage'; export * from './Preview'; export * from './ArgsTable'; export * from './Story'; export * from './IFrame'; export * from './Typeset'; export * from './ColorPalette'; export * from './IconGallery'; export * from './TableOfContents';
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/components/Typeset.stories.tsx
code/addons/docs/src/blocks/components/Typeset.stories.tsx
import React from 'react'; import { Typeset } from './Typeset'; export default { component: Typeset, }; const fontSizes = ['12px', '14px', '16px', '20px', '24px', '32px', '40px', '48px']; const fontWeight = 700; const fontFamily = 'monospace'; export const WithFontSizes = () => <Typeset fontSizes={fontSizes} />; ...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/components/Story.tsx
code/addons/docs/src/blocks/components/Story.tsx
/* eslint-disable react/destructuring-assignment */ import type { FunctionComponent } from 'react'; import React, { useEffect, useRef, useState } from 'react'; import { ErrorFormatter, Loader, getStoryHref } from 'storybook/internal/components'; import type { DocsContextProps, PreparedStory } from 'storybook/internal/...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/components/Story.stories.tsx
code/addons/docs/src/blocks/components/Story.stories.tsx
import React from 'react'; import type { Channel } from 'storybook/internal/channels'; import { RESET_STORY_ARGS, STORY_ARGS_UPDATED, UPDATE_STORY_ARGS, } from 'storybook/internal/core-events'; import type { PlayFunctionContext } from 'storybook/internal/csf'; import type { ModuleExport, WebRenderer } from 'stor...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/components/IconGallery.stories.tsx
code/addons/docs/src/blocks/components/IconGallery.stories.tsx
import React from 'react'; import { AddIcon, AlertIcon, BellIcon, FaceHappyIcon, HomeIcon, SubtractIcon, } from '@storybook/icons'; import { IconGallery, IconItem } from './IconGallery'; export default { component: IconGallery, }; export const DefaultStyle = () => ( <IconGallery> <IconItem name=...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/components/ColorPalette.tsx
code/addons/docs/src/blocks/components/ColorPalette.tsx
import type { FunctionComponent } from 'react'; import React from 'react'; import { ResetWrapper } from 'storybook/internal/components'; import { transparentize } from 'polished'; import { styled } from 'storybook/theming'; import { getBlockBackgroundStyle } from './BlockBackgroundStyles'; const ItemTitle = styled....
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/components/EmptyBlock.tsx
code/addons/docs/src/blocks/components/EmptyBlock.tsx
import type { FC } from 'react'; import React from 'react'; import { withReset } from 'storybook/internal/components'; import { transparentize } from 'polished'; import { styled } from 'storybook/theming'; const Wrapper = styled.div(withReset, ({ theme }) => ({ backgroundColor: theme.base === 'light' ? 'rgba(0,0,0...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/components/IconGallery.tsx
code/addons/docs/src/blocks/components/IconGallery.tsx
import type { FunctionComponent } from 'react'; import React from 'react'; import { ResetWrapper } from 'storybook/internal/components'; import { styled } from 'storybook/theming'; import { getBlockBackgroundStyle } from './BlockBackgroundStyles'; const ItemLabel = styled.div(({ theme }) => ({ fontFamily: theme.t...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/components/IFrame.tsx
code/addons/docs/src/blocks/components/IFrame.tsx
import React, { Component } from 'react'; const { window: globalWindow } = globalThis; interface IFrameProps { id: string; key?: string; title: string; src: string; allowFullScreen: boolean; scale: number; style?: any; } interface BodyStyle { width: string; height: string; transform: string; tr...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/components/EmptyBlock.stories.tsx
code/addons/docs/src/blocks/components/EmptyBlock.stories.tsx
import React from 'react'; import { EmptyBlock } from './EmptyBlock'; export default { component: EmptyBlock, }; export const Error = () => <EmptyBlock>Generic error message</EmptyBlock>;
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/components/ArgsTable/ArgControl.tsx
code/addons/docs/src/blocks/components/ArgsTable/ArgControl.tsx
import type { FC } from 'react'; import React, { useCallback, useEffect, useState } from 'react'; import { Link } from 'storybook/internal/components'; import { BooleanControl, ColorControl, DateControl, FilesControl, NumberControl, ObjectControl, OptionsControl, RangeControl, TextControl, } from '....
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/components/ArgsTable/TabbedArgsTable.tsx
code/addons/docs/src/blocks/components/ArgsTable/TabbedArgsTable.tsx
import type { FC } from 'react'; import React from 'react'; import { TabsView } from 'storybook/internal/components'; import { styled } from 'storybook/theming'; import type { ArgsTableProps } from './ArgsTable'; import { ArgsTable } from './ArgsTable'; type DistributiveOmit<T, K extends PropertyKey> = T extends an...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/components/ArgsTable/SectionRow.stories.tsx
code/addons/docs/src/blocks/components/ArgsTable/SectionRow.stories.tsx
import type { ComponentProps } from 'react'; import React from 'react'; import { ResetWrapper } from 'storybook/internal/components'; import { TableWrapper } from './ArgsTable'; import { SectionRow } from './SectionRow'; export default { component: SectionRow, decorators: [ (getStory: any) => ( <ResetW...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/components/ArgsTable/SectionRow.tsx
code/addons/docs/src/blocks/components/ArgsTable/SectionRow.tsx
import type { FC } from 'react'; import React, { useState } from 'react'; import { ChevronDownIcon, ChevronRightIcon } from '@storybook/icons'; import { lighten, transparentize } from 'polished'; import { styled } from 'storybook/theming'; type Level = 'section' | 'subsection'; export interface SectionRowProps { ...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/components/ArgsTable/ArgJsDoc.tsx
code/addons/docs/src/blocks/components/ArgsTable/ArgJsDoc.tsx
import type { FC } from 'react'; import React from 'react'; import { codeCommon } from 'storybook/internal/components'; import type { CSSObject } from 'storybook/theming'; import { styled } from 'storybook/theming'; import type { JsDocTags } from './types'; interface ArgJsDocArgs { tags: JsDocTags; } export cons...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/components/ArgsTable/ArgsTable.tsx
code/addons/docs/src/blocks/components/ArgsTable/ArgsTable.tsx
import type { FC } from 'react'; import React from 'react'; import { once } from 'storybook/internal/client-logger'; import { Button, Link, ResetWrapper } from 'storybook/internal/components'; import { includeConditionalArg } from 'storybook/internal/csf'; import { DocumentIcon, UndoIcon } from '@storybook/icons'; i...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/components/ArgsTable/ArgValue.tsx
code/addons/docs/src/blocks/components/ArgsTable/ArgValue.tsx
import type { FC } from 'react'; import React, { useState } from 'react'; import { PopoverProvider, SyntaxHighlighter, codeCommon } from 'storybook/internal/components'; import { ChevronSmallDownIcon, ChevronSmallUpIcon } from '@storybook/icons'; import { uniq } from 'es-toolkit/array'; import { styled } from 'story...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/components/ArgsTable/ArgsTable.stories.tsx
code/addons/docs/src/blocks/components/ArgsTable/ArgsTable.stories.tsx
import React from 'react'; import type { Meta, StoryObj } from '@storybook/react-vite'; import { action } from 'storybook/actions'; import { styled } from 'storybook/theming'; import * as ArgRow from './ArgRow.stories'; import { ArgsTable, ArgsTableError } from './ArgsTable'; const meta = { component: ArgsTable, ...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/components/ArgsTable/Skeleton.tsx
code/addons/docs/src/blocks/components/ArgsTable/Skeleton.tsx
import type { FC } from 'react'; import React from 'react'; import { styled } from 'storybook/theming'; const TableWrapper = styled.div(({ theme }) => ({ width: '100%', borderSpacing: 0, color: theme.color.defaultText, })); const Row = styled.div(({ theme }) => ({ display: 'flex', borderBottom: `1px solid ...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/components/ArgsTable/TabbedArgsTable.stories.tsx
code/addons/docs/src/blocks/components/ArgsTable/TabbedArgsTable.stories.tsx
import { TabsView } from 'storybook/internal/components'; import type { Meta, StoryObj } from '@storybook/react-vite'; import { ArgsTable } from './ArgsTable'; import { Compact, Normal, Sections } from './ArgsTable.stories'; import { TabbedArgsTable } from './TabbedArgsTable'; const meta = { component: TabbedArgsT...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/components/ArgsTable/Empty.tsx
code/addons/docs/src/blocks/components/ArgsTable/Empty.tsx
import type { FC } from 'react'; import React, { useEffect, useState } from 'react'; import { EmptyTabContent, Link } from 'storybook/internal/components'; import { DocumentIcon } from '@storybook/icons'; import { styled } from 'storybook/theming'; interface EmptyProps { inAddonPanel?: boolean; } const Wrapper =...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/components/ArgsTable/ArgRow.stories.tsx
code/addons/docs/src/blocks/components/ArgsTable/ArgRow.stories.tsx
import React from 'react'; import { ResetWrapper } from 'storybook/internal/components'; import type { Meta, StoryObj } from '@storybook/react-vite'; import { expect, screen } from 'storybook/test'; import { ArgRow } from './ArgRow'; import { TableWrapper } from './ArgsTable'; export default { component: ArgRow,...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/components/ArgsTable/types.ts
code/addons/docs/src/blocks/components/ArgsTable/types.ts
import type { Conditional } from 'storybook/internal/types'; // TODO ? export interface JsDocParam { name: string; description?: string; } export interface JsDocParamDeprecated { deprecated?: string; } export interface JsDocReturns { description?: string; } export interface JsDocTags { params?: JsDocParam...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/components/ArgsTable/ArgRow.tsx
code/addons/docs/src/blocks/components/ArgsTable/ArgRow.tsx
import type { FC } from 'react'; import React, { useState } from 'react'; import { codeCommon } from 'storybook/internal/components'; import Markdown from 'markdown-to-jsx'; import { transparentize } from 'polished'; import type { CSSObject } from 'storybook/theming'; import { styled } from 'storybook/theming'; impo...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/components/ArgsTable/index.ts
code/addons/docs/src/blocks/components/ArgsTable/index.ts
export * from './types'; export * from './ArgsTable'; export * from './TabbedArgsTable';
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/examples/ButtonWithMetaDescriptionAsComment.stories.tsx
code/addons/docs/src/blocks/examples/ButtonWithMetaDescriptionAsComment.stories.tsx
import type { Meta, StoryObj } from '@storybook/react-vite'; import { Button } from './Button'; /** * These are the stories for the Button component * * _this description was written as a comment above the default export_ */ const meta = { title: 'Examples/Button with Meta Description as Comment', component: ...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/examples/ButtonWithMetaSubtitleAsDocsSubtitle.stories.tsx
code/addons/docs/src/blocks/examples/ButtonWithMetaSubtitleAsDocsSubtitle.stories.tsx
import type { Meta, StoryObj } from '@storybook/react-vite'; import { Button } from './Button'; const meta = { title: 'examples/Button with Meta Subtitle in docs.subtitle', component: Button, argTypes: { backgroundColor: { control: 'color' }, }, globals: { sb_theme: 'light' }, parameters: { docs: ...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/examples/ArgTypesWithSubcomponentsParameters.stories.tsx
code/addons/docs/src/blocks/examples/ArgTypesWithSubcomponentsParameters.stories.tsx
import type { Meta, StoryObj } from '@storybook/react-vite'; import { ArgTypesParameters, SubcomponentA, SubcomponentB } from './ArgTypesParameters'; /** Reference stories to be used by the ArgTypes stories */ const meta = { title: 'examples/Stories for the ArgTypes Block with Subcomponents', component: ArgTypesP...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/examples/DocsPageParameters.stories.tsx
code/addons/docs/src/blocks/examples/DocsPageParameters.stories.tsx
import type { Meta, StoryObj } from '@storybook/react-vite'; import { EmptyExample } from './EmptyExample'; /** This is the description for the component */ const meta = { title: 'examples/Stories for the DocsPage', component: EmptyExample, } satisfies Meta<typeof EmptyExample>; export default meta; type Story =...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/examples/SourceParameters.stories.tsx
code/addons/docs/src/blocks/examples/SourceParameters.stories.tsx
import { SourceType } from 'storybook/internal/docs-tools'; import type { StoryContext } from 'storybook/internal/types'; import type { Meta, StoryObj } from '@storybook/react-vite'; import { dedent } from 'ts-dedent'; import { EmptyExample } from './EmptyExample'; const code = `query HeroNameAndFriends($episode: E...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/examples/ButtonWithMetaSubtitleAsBoth.stories.tsx
code/addons/docs/src/blocks/examples/ButtonWithMetaSubtitleAsBoth.stories.tsx
import type { Meta, StoryObj } from '@storybook/react-vite'; import { Button } from './Button'; const meta = { title: 'examples/Button with Meta Subtitle in Both', component: Button, argTypes: { backgroundColor: { control: 'color' }, }, globals: { sb_theme: 'light' }, parameters: { // this is to t...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/examples/ControlsParameters.stories.tsx
code/addons/docs/src/blocks/examples/ControlsParameters.stories.tsx
import type { Meta, StoryObj } from '@storybook/react-vite'; import { ControlsParameters } from './ControlsParameters'; /** Reference stories to be used by the Controls stories */ const meta = { title: 'examples/Stories for the Controls Block', component: ControlsParameters, args: { b: 'b' }, argTypes: { ...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/examples/ButtonReadonly.stories.tsx
code/addons/docs/src/blocks/examples/ButtonReadonly.stories.tsx
import type { Meta, StoryObj } from '@storybook/react-vite'; import { Button } from './Button'; const meta = { title: 'examples/Button Readonly', component: Button, tags: ['autodocs'], argTypes: { backgroundColor: { control: 'color', table: { readonly: true }, }, primary: { table...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/examples/ButtonWithMetaDescriptionAsParameter.stories.tsx
code/addons/docs/src/blocks/examples/ButtonWithMetaDescriptionAsParameter.stories.tsx
import type { Meta, StoryObj } from '@storybook/react-vite'; import { Button } from './Button'; const meta = { title: 'examples/Button with Meta Description as Parameter', component: Button, argTypes: { backgroundColor: { control: 'color' }, }, globals: { sb_theme: 'light' }, parameters: { docs: {...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/examples/ControlsParameters.tsx
code/addons/docs/src/blocks/examples/ControlsParameters.tsx
import React from 'react'; type PropTypes = { a?: string; b: string }; export const ControlsParameters = ({ a = 'a', b }: PropTypes) => <div>Example story</div>; type SubcomponentAPropTypes = { e: boolean; c: boolean; d?: boolean }; export const SubcomponentA = ({ d = false }: SubcomponentAPropTypes) => ( <div>Ex...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/examples/ArgTypesParameters.tsx
code/addons/docs/src/blocks/examples/ArgTypesParameters.tsx
import React from 'react'; type PropTypes = { a?: string; b: string }; export const ArgTypesParameters = ({ a = 'a', b }: PropTypes) => <div>Example story</div>; type SubcomponentAPropTypes = { e: boolean; c: boolean; d?: boolean }; export const SubcomponentA = ({ d = false }: SubcomponentAPropTypes) => ( <div>Ex...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/examples/Button.stories.tsx
code/addons/docs/src/blocks/examples/Button.stories.tsx
/* eslint-disable local-rules/no-uncategorized-errors */ import React from 'react'; import type { Meta, StoryObj } from '@storybook/react-vite'; import { expect, fireEvent, within } from 'storybook/test'; import { Button } from './Button'; const meta = { title: 'examples/Button', component: Button, tags: ['au...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/examples/ButtonSomeAutodocs.stories.tsx
code/addons/docs/src/blocks/examples/ButtonSomeAutodocs.stories.tsx
import type { Meta, StoryObj } from '@storybook/react-vite'; import { Button } from './Button'; const meta = { title: 'examples/ButtonSomeAutodocs', component: Button, argTypes: { backgroundColor: { control: 'color' }, }, parameters: { chromatic: { disableSnapshot: true }, }, } satisfies Meta<type...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/examples/ControlsWithSubcomponentsParameters.stories.tsx
code/addons/docs/src/blocks/examples/ControlsWithSubcomponentsParameters.stories.tsx
import type { Meta, StoryObj } from '@storybook/react-vite'; import { ControlsParameters, SubcomponentA, SubcomponentB } from './ControlsParameters'; /** Reference stories to be used by the Controls stories */ const meta = { title: 'examples/Stories for the Controls Block with Subcomponents', component: ControlsP...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/examples/ButtonNoAutodocs.stories.tsx
code/addons/docs/src/blocks/examples/ButtonNoAutodocs.stories.tsx
import type { Meta, StoryObj } from '@storybook/react-vite'; import { Button } from './Button'; const meta = { title: 'examples/ButtonNoAutodocs', component: Button, argTypes: { backgroundColor: { control: 'color' }, }, parameters: { chromatic: { disableSnapshot: true }, }, } satisfies Meta<typeof...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/examples/Button.tsx
code/addons/docs/src/blocks/examples/Button.tsx
import React from 'react'; import { styled } from 'storybook/theming'; 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' | 'large...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/examples/EmptyArgTypes.stories.tsx
code/addons/docs/src/blocks/examples/EmptyArgTypes.stories.tsx
import React from 'react'; import type { Meta, StoryObj } from '@storybook/react-vite'; import type { ControlsParameters } from './ControlsParameters'; const meta = { title: 'examples/Empty ArgTypes for Control blocks', // note that component is not specified, so no argtypes can be generated render: () => <div...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/examples/ButtonWithMetaDescriptionAsBoth.stories.tsx
code/addons/docs/src/blocks/examples/ButtonWithMetaDescriptionAsBoth.stories.tsx
import type { Meta, StoryObj } from '@storybook/react-vite'; import { Button } from './Button'; /** * These are the stories for the Button component * * _this description was written as a comment above the default export_ _this should never be shown * in Storybook, as it should be overridden by `parameters.docs.d...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/examples/CanvasParameters.stories.tsx
code/addons/docs/src/blocks/examples/CanvasParameters.stories.tsx
import type { Meta, StoryObj } from '@storybook/react-vite'; import { EmptyExample } from './EmptyExample'; const meta = { title: 'examples/Stories for the Canvas Block', component: EmptyExample, } satisfies Meta<typeof EmptyExample>; export default meta; type Story = StoryObj<typeof meta>; export const WithToo...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/examples/SimpleSizeTest.tsx
code/addons/docs/src/blocks/examples/SimpleSizeTest.tsx
import React from 'react'; export const SimpleSizeTest = () => { return ( <div style={{ background: '#fd5c9355', padding: '3rem', height: '500px', width: '800px', // a global decorator is applying a default padding that we want to negate here margin: '-4rem -...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/examples/EmptyExample.tsx
code/addons/docs/src/blocks/examples/EmptyExample.tsx
import React from 'react'; export const EmptyExample = ({}) => ( <div> This component is not intended to render anything, it simply serves as something to hang parameters off </div> );
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/examples/ButtonWithMetaSubtitleAsComponentSubtitle.stories.tsx
code/addons/docs/src/blocks/examples/ButtonWithMetaSubtitleAsComponentSubtitle.stories.tsx
import type { Meta, StoryObj } from '@storybook/react-vite'; import { Button } from './Button'; const meta = { title: 'examples/Button with Meta Subtitle in componentSubtitle', component: Button, argTypes: { backgroundColor: { control: 'color' }, }, globals: { sb_theme: 'light' }, parameters: { //...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/examples/ArgTypesParameters.stories.tsx
code/addons/docs/src/blocks/examples/ArgTypesParameters.stories.tsx
import type { Meta, StoryObj } from '@storybook/react-vite'; import { ArgTypesParameters } from './ArgTypesParameters'; /** Reference stories to be used by the ArgTypes stories */ const meta = { title: 'examples/Stories for the ArgTypes Block', component: ArgTypesParameters, args: { b: 'b' }, argTypes: { ...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/examples/StoriesParameters.stories.tsx
code/addons/docs/src/blocks/examples/StoriesParameters.stories.tsx
import type { Meta, StoryObj } from '@storybook/react-vite'; import { EmptyExample } from './EmptyExample'; const meta = { title: 'examples/Stories for the Stories and Primary Block', component: EmptyExample, tags: ['autodocs'], } satisfies Meta<typeof EmptyExample>; export default meta; type Story = StoryObj<...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/examples/StoryParameters.stories.tsx
code/addons/docs/src/blocks/examples/StoryParameters.stories.tsx
import type { Meta, StoryObj } from '@storybook/react-vite'; import { SimpleSizeTest } from './SimpleSizeTest'; const meta = { title: 'examples/Stories for the Story Block', component: SimpleSizeTest, globals: { sb_theme: 'light' }, } satisfies Meta<typeof SimpleSizeTest>; export default meta; type Story = Sto...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/controls/Boolean.tsx
code/addons/docs/src/blocks/controls/Boolean.tsx
import type { FC } from 'react'; import React, { useCallback } from 'react'; import { Button } from 'storybook/internal/components'; import { opacify, transparentize } from 'polished'; import { styled } from 'storybook/theming'; import { getControlId, getControlSetterButtonId } from './helpers'; import type { Boolea...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/controls/Number.tsx
code/addons/docs/src/blocks/controls/Number.tsx
import type { ChangeEvent, FC } from 'react'; import React, { useCallback, useEffect, useRef, useState } from 'react'; import { Button, Form } from 'storybook/internal/components'; import { styled } from 'storybook/theming'; import { getControlId, getControlSetterButtonId } from './helpers'; import type { ControlPro...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/controls/Color.stories.tsx
code/addons/docs/src/blocks/controls/Color.stories.tsx
import type { Meta, StoryObj } from '@storybook/react-vite'; import { fn } from 'storybook/test'; import { ColorControl } from './Color'; const meta = { component: ColorControl, parameters: { withRawArg: 'value', controls: { include: ['value', 'startOpen'] } }, tags: ['autodocs'], argTypes: { value: { ...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/controls/Boolean.stories.tsx
code/addons/docs/src/blocks/controls/Boolean.stories.tsx
import { RESET_STORY_ARGS, STORY_ARGS_UPDATED } from 'storybook/internal/core-events'; import type { Meta, StoryObj } from '@storybook/react-vite'; import { addons } from 'storybook/preview-api'; import { expect, fireEvent, fn, waitFor, within } from 'storybook/test'; import { BooleanControl } from './Boolean'; con...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/controls/index.tsx
code/addons/docs/src/blocks/controls/index.tsx
import type { ComponentProps } from 'react'; import React, { Suspense, lazy } from 'react'; import type { ColorControlProps } from './Color'; export * from './types'; export * from './Boolean'; export type ColorProps = ColorControlProps; const LazyColorControl = lazy(() => import('./Color')); export const ColorCo...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/controls/Object.stories.tsx
code/addons/docs/src/blocks/controls/Object.stories.tsx
import type { Meta, StoryObj } from '@storybook/react-vite'; import { fn } from 'storybook/test'; import { ObjectControl } from './Object'; const meta = { component: ObjectControl, tags: ['autodocs'], parameters: { withRawArg: 'value', controls: { include: ['value'] } }, args: { name: 'object', onCha...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/controls/Range.tsx
code/addons/docs/src/blocks/controls/Range.tsx
import type { ChangeEvent, FC } from 'react'; import React, { useMemo } from 'react'; import { darken, lighten, rgba } from 'polished'; import { styled } from 'storybook/theming'; import { parse } from './Number'; import { getControlId } from './helpers'; import type { ControlProps, NumberValue, RangeConfig } from '....
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/controls/Files.stories.tsx
code/addons/docs/src/blocks/controls/Files.stories.tsx
import type { Meta, StoryObj } from '@storybook/react-vite'; import { fn } from 'storybook/test'; import { FilesControl } from './Files'; const meta = { component: FilesControl, tags: ['autodocs'], parameters: { withRawArg: 'value', controls: { include: ['value', 'accept'] } }, argTypes: { value: { ...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/controls/Object.tsx
code/addons/docs/src/blocks/controls/Object.tsx
import type { ComponentProps, FC, FocusEvent, SyntheticEvent } from 'react'; import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'; import { Button, Form, ToggleButton } from 'storybook/internal/components'; import { AddIcon, SubtractIcon } from '@storybook/icons'; import { cloneDeep } fro...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/controls/Date.tsx
code/addons/docs/src/blocks/controls/Date.tsx
import type { ChangeEvent, FC, RefObject } from 'react'; import React, { useEffect, useRef, useState } from 'react'; import { Form } from 'storybook/internal/components'; import { styled } from 'storybook/theming'; import { getControlId } from './helpers'; import type { ControlProps, DateConfig, DateValue } from './...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/controls/Date.test.ts
code/addons/docs/src/blocks/controls/Date.test.ts
// @vitest-environment happy-dom import { describe, expect, it } from 'vitest'; import { formatDate, formatTime, parseDate, parseTime } from './Date'; describe('Date control', () => { it.each([ // name, input, expected ['same date', '2022-01-01', '2022-01-01'], ['month and day not padded with zeros', '2...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/controls/Text.stories.tsx
code/addons/docs/src/blocks/controls/Text.stories.tsx
import type { Meta, StoryObj } from '@storybook/react-vite'; import { fn } from 'storybook/test'; import { TextControl } from './Text'; const meta = { component: TextControl, tags: ['autodocs'], parameters: { withRawArg: 'value', controls: { include: ['value', 'maxLength'] } }, args: { name: 'text', ...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/controls/helpers.ts
code/addons/docs/src/blocks/controls/helpers.ts
/** * Adds `control` prefix to make ID attribute more specific. Removes spaces because spaces are not * allowed in ID attributes * * @example * * ```ts * getControlId('my prop name') -> 'control-my-prop-name' * ``` * * @link http://xahlee.info/js/html_allowed_chars_in_attribute.html */ export const getContro...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/controls/Date.stories.tsx
code/addons/docs/src/blocks/controls/Date.stories.tsx
import type { Meta, StoryObj } from '@storybook/react-vite'; import { fn } from 'storybook/test'; import { DateControl } from './Date'; const meta = { component: DateControl, tags: ['autodocs'], parameters: { withRawArg: 'value', controls: { include: ['value'] } }, argTypes: { value: { description:...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/controls/Range.stories.tsx
code/addons/docs/src/blocks/controls/Range.stories.tsx
import type { Meta, StoryObj } from '@storybook/react-vite'; import { fn } from 'storybook/test'; import { RangeControl } from './Range'; const meta = { component: RangeControl, tags: ['autodocs'], parameters: { withRawArg: 'value', controls: { include: ['value', 'min', 'max', 'step'] } }, args: { name: ...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/controls/Text.tsx
code/addons/docs/src/blocks/controls/Text.tsx
import type { ChangeEvent, FC } from 'react'; import React, { useCallback, useState } from 'react'; import { Button, Form } from 'storybook/internal/components'; import { styled } from 'storybook/theming'; import { getControlId, getControlSetterButtonId } from './helpers'; import type { ControlProps, TextConfig, Tex...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/controls/types.ts
code/addons/docs/src/blocks/controls/types.ts
import type { ArgType } from '../components/ArgsTable/types'; export interface ControlProps<T> { name: string; value?: T; defaultValue?: T; argType?: ArgType; onChange: (value?: T) => T | void; onFocus?: (evt: any) => void; onBlur?: (evt: any) => void; } export type BooleanValue = boolean; export interf...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/controls/Color.tsx
code/addons/docs/src/blocks/controls/Color.tsx
import type { ChangeEvent, FC, FocusEvent } from 'react'; import React, { useCallback, useEffect, useMemo, useState } from 'react'; import { Button, Form, PopoverProvider } from 'storybook/internal/components'; import { MarkupIcon } from '@storybook/icons'; import convert from 'color-convert'; import { debounce } fr...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/controls/Files.tsx
code/addons/docs/src/blocks/controls/Files.tsx
import React, { useEffect, useRef } from 'react'; import type { ChangeEvent, FC } from 'react'; import { Form } from 'storybook/internal/components'; import { styled } from 'storybook/theming'; import { getControlId } from './helpers'; import type { ControlProps } from './types'; export interface FilesControlProps ...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/controls/helpers.test.ts
code/addons/docs/src/blocks/controls/helpers.test.ts
import { describe, expect, it } from 'vitest'; import { getControlId, getControlSetterButtonId } from './helpers'; describe('getControlId', () => { it.each([ // caseName, input, expected ['lower case', 'some-id', 'control-some-id'], ['upper case', 'SOME-ID', 'control-SOME-ID'], ['all valid character...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/controls/Number.stories.tsx
code/addons/docs/src/blocks/controls/Number.stories.tsx
import type { Meta, StoryObj } from '@storybook/react-vite'; import { fn } from 'storybook/test'; import { NumberControl } from './Number'; const meta = { component: NumberControl, tags: ['autodocs'], parameters: { withRawArg: 'value', controls: { include: ['value', 'min', 'max', 'step'] } }, args: { nam...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/controls/react-editable-json-tree/JsonNodes.tsx
code/addons/docs/src/blocks/controls/react-editable-json-tree/JsonNodes.tsx
/* eslint-disable react/no-direct-mutation-state */ import type { ReactElement } from 'react'; import React, { Component, cloneElement } from 'react'; import { JsonNodeAccordion } from './JsonNodeAccordion'; import * as dataTypes from './types/dataTypes'; import * as deltaTypes from './types/deltaTypes'; import * as i...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
true
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/controls/react-editable-json-tree/JsonNodes.stories.tsx
code/addons/docs/src/blocks/controls/react-editable-json-tree/JsonNodes.stories.tsx
import React from 'react'; const meta = { title: 'Controls/JsonNodes', tags: ['autodocs'], argTypes: { value: { control: { type: 'object' } }, function: { control: { type: 'object' } }, }, args: { value: { any: 'value' }, function: { value: () => {} }, }, parameters: { // This story e...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/controls/react-editable-json-tree/index.tsx
code/addons/docs/src/blocks/controls/react-editable-json-tree/index.tsx
import type { ReactElement } from 'react'; import React, { Component } from 'react'; import { JsonNode } from './JsonNodes'; import * as DATA_TYPES from './types/dataTypes'; import { ADD_DELTA_TYPE, REMOVE_DELTA_TYPE, UPDATE_DELTA_TYPE } from './types/deltaTypes'; import * as INPUT_USAGE_TYPES from './types/inputUsage...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/controls/react-editable-json-tree/JsonNodeAccordion.tsx
code/addons/docs/src/blocks/controls/react-editable-json-tree/JsonNodeAccordion.tsx
import type { ComponentPropsWithoutRef } from 'react'; import React from 'react'; import { styled } from 'storybook/theming'; const Container = styled.div(({ theme }) => ({ position: 'relative', ':hover': { '& > .rejt-accordion-button::after': { background: theme.color.secondary, }, '& > .rejt-a...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/controls/react-editable-json-tree/utils/parse.ts
code/addons/docs/src/blocks/controls/react-editable-json-tree/utils/parse.ts
/** * Parse. * * @param string {String} string to parse * @returns {any} */ export function parse(string: string) { let result = string; // Check if string contains 'function' and start with it to eval it if (result.indexOf('function') === 0) { return (0, eval)(`(${result})`); } try { result = ...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/controls/react-editable-json-tree/utils/objectTypes.ts
code/addons/docs/src/blocks/controls/react-editable-json-tree/utils/objectTypes.ts
/* eslint-disable @typescript-eslint/no-unnecessary-type-constraint */ /** * Get Object type. * * @param obj {*} object to get type * @returns {any} */ export function getObjectType(obj: any) { if ( obj !== null && typeof obj === 'object' && !Array.isArray(obj) && typeof obj[Symbol.iterator] === ...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/controls/react-editable-json-tree/utils/styles.ts
code/addons/docs/src/blocks/controls/react-editable-json-tree/utils/styles.ts
export const object = { minus: { color: 'red', }, plus: { color: 'green', }, collapsed: { color: 'grey', }, delimiter: {}, ul: { padding: '0px', margin: '0 0 0 25px', listStyle: 'none', }, name: { color: '#2287CD', }, addForm: {}, }; export const array = { minus: {...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/controls/react-editable-json-tree/types/deltaTypes.ts
code/addons/docs/src/blocks/controls/react-editable-json-tree/types/deltaTypes.ts
const ADD_DELTA_TYPE = 'ADD_DELTA_TYPE'; const REMOVE_DELTA_TYPE = 'REMOVE_DELTA_TYPE'; const UPDATE_DELTA_TYPE = 'UPDATE_DELTA_TYPE'; export { ADD_DELTA_TYPE, REMOVE_DELTA_TYPE, UPDATE_DELTA_TYPE };
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/controls/react-editable-json-tree/types/inputUsageTypes.ts
code/addons/docs/src/blocks/controls/react-editable-json-tree/types/inputUsageTypes.ts
const VALUE = 'value'; const KEY = 'key'; export { KEY, VALUE };
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/controls/react-editable-json-tree/types/dataTypes.ts
code/addons/docs/src/blocks/controls/react-editable-json-tree/types/dataTypes.ts
const ERROR = 'Error'; const OBJECT = 'Object'; const ARRAY = 'Array'; const STRING = 'String'; const NUMBER = 'Number'; const BOOLEAN = 'Boolean'; const DATE = 'Date'; const NULL = 'Null'; const UNDEFINED = 'Undefined'; const FUNCTION = 'Function'; const SYMBOL = 'Symbol'; export { ERROR, OBJECT, ARRAY, STRING, NUMBE...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/controls/options/Select.tsx
code/addons/docs/src/blocks/controls/options/Select.tsx
import type { ChangeEvent, FC } from 'react'; import React from 'react'; import { logger } from 'storybook/internal/client-logger'; import { ChevronSmallDownIcon } from '@storybook/icons'; import { styled } from 'storybook/theming'; import type { CSSObject } from 'storybook/theming'; import { getControlId } from '....
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/controls/options/RadioOptions.stories.tsx
code/addons/docs/src/blocks/controls/options/RadioOptions.stories.tsx
import type { Meta, StoryObj } from '@storybook/react-vite'; import { fn } from 'storybook/test'; import { OptionsControl } from './Options'; const arrayOptions = ['Bat', 'Cat', 'Rat']; const labels = { Bat: 'Batwoman', Cat: 'Catwoman', Rat: 'Ratwoman', }; const objectOptions = { A: { id: 'Aardvark' }, B: ...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/controls/options/CheckOptions.stories.tsx
code/addons/docs/src/blocks/controls/options/CheckOptions.stories.tsx
import type { Meta, StoryObj } from '@storybook/react-vite'; import { fn } from 'storybook/test'; import { OptionsControl } from './Options'; const arrayOptions = ['Bat', 'Cat', 'Rat']; const labels = { Bat: 'Batwoman', Cat: 'Catwoman', Rat: 'Ratwoman', }; const objectOptions = { A: { id: 'Aardvark' }, B: ...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/controls/options/Checkbox.tsx
code/addons/docs/src/blocks/controls/options/Checkbox.tsx
import type { ChangeEvent, FC } from 'react'; import React, { useEffect, useState } from 'react'; import { logger } from 'storybook/internal/client-logger'; import { styled } from 'storybook/theming'; import { getControlId } from '../helpers'; import type { ControlProps, NormalizedOptionsConfig, OptionsMultiSelectio...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/addons/docs/src/blocks/controls/options/SelectOptions.stories.tsx
code/addons/docs/src/blocks/controls/options/SelectOptions.stories.tsx
import type { Meta, StoryObj } from '@storybook/react-vite'; import { expect, fn, userEvent } from 'storybook/test'; import { OptionsControl } from './Options'; const arrayOptions = ['Bat', 'Cat', 'Rat']; const objectOptions = { A: { id: 'Aardvark' }, B: { id: 'Bat' }, C: { id: 'Cat' }, }; const labels = { B...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false