From 0358ef20d753f3de60a1bb5fdd72ab5600fa09b8 Mon Sep 17 00:00:00 2001 From: Michael Shilman Date: Thu, 20 Nov 2025 18:21:35 +0800 Subject: [PATCH 1/2] Update reshaped flight booking eval --- .../components.json | 3549 +---------------- .../stories/FlightBooking.stories.tsx | 281 +- .../110-flight-booking-reshaped/prompt.md | 18 +- 3 files changed, 250 insertions(+), 3598 deletions(-) diff --git a/eval/evals/110-flight-booking-reshaped/components.json b/eval/evals/110-flight-booking-reshaped/components.json index c3b408c5..85e34449 100644 --- a/eval/evals/110-flight-booking-reshaped/components.json +++ b/eval/evals/110-flight-booking-reshaped/components.json @@ -1,3548 +1 @@ -{ - "v": 0, - "components": { - "components-actionbar": { - "id": "components-actionbar", - "name": "ActionBar", - "path": "./src/components/ActionBar/tests/ActionBar.stories.tsx", - "stories": [ - { - "name": "positionRelative", - "snippet": "const positionRelative = () => (\n \n \n \n \n \n \n\n \n \n \n \n \n \n);" - }, - { - "name": "positionAbsolute", - "snippet": "const positionAbsolute = () => (\n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n);" - }, - { - "name": "positionFixed", - "snippet": "const positionFixed = () => (\n <>\n \n \n \n\n \n \n \n\n \n \n \n\n \n \n \n\n \n \n \n\n \n \n \n\n
\n \n);" - }, - { - "name": "elevated", - "snippet": "const elevated = () => (\n \n \n \n \n \n \n\n \n \n \n \n \n\n \n \n \n \n \n \n \n \n);" - }, - { - "name": "offset", - "snippet": "const offset = () => (\n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n);" - }, - { - "name": "active", - "snippet": "const active = () => {\n const barToggle = useToggle();\n\n return (\n <>\n \n \n \n \n \n );\n};" - }, - { - "name": "padding", - "snippet": "const padding = () => (\n \n \n \n \n \n \n\n \n \n \n \n \n\n \n \n \n \n \n \n);" - }, - { - "name": "className", - "snippet": "const className = () => (\n
\n \n \n \n
\n);" - } - ], - "import": "import ActionBar from \"components/ActionBar\";\nimport Button from \"components/Button\";\nimport { Example, Placeholder } from \"utilities/storybook\";\nimport View from \"components/View\";", - "jsDocTags": {}, - "reactDocgen": { - "description": "", - "methods": [], - "displayName": "ActionBar", - "definedInFile": "/Users/jeppe/dev/temp/reshaped/src/components/ActionBar/ActionBar.tsx", - "actualName": "ActionBar", - "exportName": "default" - } - }, - "components-alert": { - "id": "components-alert", - "name": "Alert", - "path": "./src/components/Alert/tests/Alert.stories.tsx", - "stories": [ - { - "name": "color", - "snippet": "const color = () => (\n \n {([\"neutral\", \"primary\", \"critical\", \"positive\", \"warning\"] as const).map((color) => (\n \n \n {}}\n >\n View now\n \n {}}\n >\n Dismiss\n \n \n }\n >\n Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum\n has been the industry's standard\n \n \n ))}\n \n);" - }, - { - "name": "inline", - "snippet": "const inline = () => (\n \n \n \n {}}>\n View now\n \n {}}>\n Dismiss\n \n \n }\n >\n Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has\n been the industry's standard\n \n \n \n);" - }, - { - "name": "bleed", - "snippet": "const bleed = () => (\n \n \n \n Content\n \n \n \n \n Content\n \n \n \n);" - }, - { - "name": "className", - "snippet": "const className = () => (\n
\n \n \n \n
\n);" - } - ], - "import": "import Alert from \"components/Alert\";\nimport { Example, Placeholder } from \"utilities/storybook\";\nimport Link from \"components/Link\";", - "jsDocTags": {}, - "reactDocgen": { - "description": "", - "methods": [], - "displayName": "Alert", - "definedInFile": "/Users/jeppe/dev/temp/reshaped/src/components/Alert/Alert.tsx", - "actualName": "Alert", - "exportName": "default" - } - }, - "components-autocomplete": { - "id": "components-autocomplete", - "name": "Autocomplete", - "path": "./src/components/Autocomplete/tests/Autocomplete.stories.tsx", - "stories": [ - { - "name": "active", - "snippet": "const active = (args) => {\n const toggle = useToggle(true);\n\n return (\n \n \n \n Label\n {\n args.handleOpen();\n toggle.activate();\n }}\n onClose={() => {\n args.handleClose();\n toggle.deactivate();\n }}\n onChange={(args) => console.log(args)}\n >\n {[\"Pizza\", \"Pie\", \"Ice-cream\"].map((v, i) => {\n return (\n \n {v}\n \n );\n })}\n \n \n \n \n );\n};" - }, - { - "name": "base", - "snippet": "const base = () => {\n const [value, setValue] = React.useState(\"\");\n\n return (\n \n \n \n Food\n setValue(args.value)}\n onBackspace={fn()}\n onItemSelect={fn()}>\n {[\"Pizza\", \"Pie\", \"Ice-cream\"].map((v, i) => {\n return (\n \n {v}\n \n );\n })}\n \n \n \n \n );\n};" - }, - { - "name": "itemData", - "snippet": "const itemData = () => {\n return (\n \n \n \n Label\n \n {[\"Pizza\", \"Pie\", \"Ice-cream\"].map((v, i) => {\n return (\n \n {v}\n \n );\n })}\n \n \n \n \n );\n};" - }, - { - "name": "itemDisabled", - "snippet": "const itemDisabled = () => {\n return (\n \n \n \n Label\n \n {[\"Pizza\", \"Pie\", \"Ice-cream\"].map((v, i) => {\n return (\n \n {v}\n \n );\n })}\n \n \n \n \n );\n};" - }, - { - "name": "multiselect", - "snippet": "const multiselect = () => {\n const options = [\n \"Pizza\",\n \"Pie\",\n \"Ice-cream\",\n \"Fries\",\n \"Salad\",\n \"Option 4\",\n \"Option 5\",\n \"Option 6\",\n ];\n\n const inputRef = React.useRef(null);\n const [values, setValues] = React.useState([\n \"Option 4\",\n \"Option 5\",\n \"Option 6\",\n \"Pizza\",\n \"Ice-cream\",\n ]);\n const [query, setQuery] = React.useState(\"\");\n\n const handleDismiss = (dismissedValue: string) => {\n const nextValues = values.filter((value) => value !== dismissedValue);\n setValues(nextValues);\n inputRef.current?.focus();\n };\n\n const valuesNode = values.map((value) => (\n handleDismiss(value)} key={value}>\n {value}\n \n ));\n\n return (\n \n Food\n setQuery(args.value)}\n onBackspace={() => {\n if (query.length === 0) {\n setValues((prev) => prev.slice(0, -1));\n }\n }}\n onItemSelect={(args) => {\n setQuery(\"\");\n setValues((prev) => [...prev, args.value]);\n }}\n >\n {options.map((v) => {\n if (!v.toLowerCase().includes(query.toLowerCase())) return;\n if (values.includes(v)) return;\n\n return (\n \n {v}\n \n );\n })}\n \n \n );\n};" - } - ], - "import": "import Autocomplete from \"components/Autocomplete\";\nimport Badge from \"components/Badge\";\nimport { Example } from \"utilities/storybook\";\nimport FormControl from \"components/FormControl\";", - "jsDocTags": {}, - "reactDocgen": { - "description": "", - "methods": [], - "displayName": "Autocomplete", - "definedInFile": "/Users/jeppe/dev/temp/reshaped/src/components/Autocomplete/Autocomplete.tsx", - "actualName": "Autocomplete", - "exportName": "default" - } - }, - "components-avatar": { - "id": "components-avatar", - "name": "Avatar", - "path": "./src/components/Avatar/tests/Avatar.stories.tsx", - "stories": [ - { - "name": "src", - "snippet": "const src = () => (\n \n \n \n \n\n \n \n \n \n);" - }, - { - "name": "initials", - "snippet": "const initials = () => (\n \n \n \n \n\n \n \n \n \n);" - }, - { - "name": "size", - "snippet": "const size = () => (\n \n \n \n \n \n \n \n\n \n \n \n \n \n \n\n \n \n \n \n \n \n\n \n \n \n \n \n \n \n);" - }, - { - "name": "squared", - "snippet": "const squared = () => (\n \n \n \n \n \n \n \n \n \n \n \n);" - }, - { - "name": "colors", - "snippet": "const colors = () => (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n);" - }, - { - "name": "fallback", - "snippet": "const fallback = (args) => {\n const [error, setError] = useState(false);\n\n return (\n {\n setError(true);\n args.handleError();\n },\n }}\n />\n );\n};" - }, - { - "name": "renderImage", - "snippet": "const renderImage = () => (\n \n \n }\n />\n \n \n);" - }, - { - "name": "className", - "snippet": "const className = () => (\n
\n \n
\n);" - } - ], - "import": "import Avatar from \"components/Avatar\";\nimport { Example } from \"utilities/storybook\";\nimport View from \"components/View\";", - "jsDocTags": {}, - "reactDocgen": { - "description": "", - "methods": [], - "displayName": "Avatar", - "definedInFile": "/Users/jeppe/dev/temp/reshaped/src/components/Avatar/Avatar.tsx", - "actualName": "Avatar", - "exportName": "default" - } - }, - "components-badge": { - "id": "components-badge", - "name": "Badge", - "path": "./src/components/Badge/tests/Badge.stories.tsx", - "stories": [ - { - "name": "variant", - "snippet": "const variant = () => (\n \n \n Badge\n \n \n Badge\n \n \n Badge\n \n \n);" - }, - { - "name": "color", - "snippet": "const color = () => (\n \n \n \n Badge\n \n Badge\n \n \n Badge\n \n \n \n\n \n \n Badge\n \n Badge\n \n \n Badge\n \n \n \n\n \n \n Badge\n \n Badge\n \n \n Badge\n \n \n \n\n \n \n Badge\n \n Badge\n \n \n Badge\n \n \n \n \n);" - }, - { - "name": "size", - "snippet": "const size = () => (\n \n \n \n Badge\n \n Badge\n \n \n \n \n \n Badge\n Badge\n \n \n \n \n Badge\n \n Badge\n \n \n \n \n);" - }, - { - "name": "icon", - "snippet": "const icon = () => (\n \n \n \n \n Badge\n \n \n \n \n \n \n \n Badge\n \n \n \n \n \n \n \n Badge\n \n\n \n \n \n \n);" - }, - { - "name": "onDismiss", - "snippet": "const onDismiss = () => \n \n Badge\n \n \n;" - }, - { - "name": "rounded", - "snippet": "const rounded = () => (\n \n \n \n Badge\n \n Badge\n \n \n Badge\n \n \n \n \n \n \n 2\n \n \n 2\n \n \n 2\n \n \n \n \n);" - }, - { - "name": "empty", - "snippet": "const empty = () => (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n);" - }, - { - "name": "highlighted", - "snippet": "const highlighted = () => (\n \n \n \n Badge\n \n \n \n);" - }, - { - "name": "container", - "snippet": "const container = () => {\n const [hidden, setHidden] = React.useState(false);\n\n return (\n setHidden(!hidden)}>Toggle badges}>\n \n \n \n \n \n \n\n \n \n \n \n \n \n\n \n \n \n \n \n \n\n \n \n \n \n\n \n \n \n \n \n \n\n \n \n \n \n \n \n\n \n \n \n \n \n );\n};" - }, - { - "name": "href", - "snippet": "const href = () => (\n \n Badge\n \n);" - }, - { - "name": "onClick", - "snippet": "const onClick = () => Badge;" - }, - { - "name": "className", - "snippet": "const className = () => (\n
\n \n
\n);" - } - ], - "import": "import Avatar from \"components/Avatar\";\nimport Badge from \"components/Badge\";\nimport Button from \"components/Button\";\nimport { Example } from \"utilities/storybook\";\nimport Icon from \"components/Icon\";\nimport View from \"components/View\";", - "jsDocTags": {}, - "reactDocgen": { - "description": "", - "methods": [], - "displayName": "Badge", - "definedInFile": "/Users/jeppe/dev/temp/reshaped/src/components/Badge/Badge.tsx", - "actualName": "Badge", - "exportName": "default" - } - }, - "components-breadcrumbs": { - "id": "components-breadcrumbs", - "name": "Breadcrumbs", - "path": "./src/components/Breadcrumbs/tests/Breadcrumbs.stories.tsx", - "stories": [ - { - "name": "color", - "snippet": "const color = () => (\n \n \n \n {}}>Item 1\n {}}>Item 2\n Item 3\n \n \n\n \n \n {}}>Item 1\n {}}>Item 2\n Item 3\n \n \n \n);" - }, - { - "name": "item", - "snippet": "const item = () => (\n \n \n \n {}}>Item 1\n {}} disabled>\n Disabled item 2\n \n Item 3\n \n \n \n);" - }, - { - "name": "icon", - "snippet": "const icon = () => (\n \n \n \n {}}>\n Item 1\n \n {}}>Item 2\n Item 3\n \n \n \n);" - }, - { - "name": "slots", - "snippet": "const slots = () => (\n \n \n \n {}}>Item 1\n {}}>Item 2\n Item 3\n \n \n\n \n \n {}}>\n Item 1\n \n {}}>\n Item 2\n \n Item 3\n \n \n \n);" - }, - { - "name": "collapsed", - "snippet": "const collapsed = () => (\n \n \n \n {}}>Item 1\n {}}>Item 2\n {}}>Item 3\n {}}>Item 4\n Item 5\n \n \n\n \n \n {}}>Item 1\n {}}>Item 2\n {}}>Item 3\n {}}>Item 4\n Item 5\n \n \n\n \n \n {}}>Item 1\n {}}>Item 2\n {}}>Item 3\n {}}>Item 4\n Item 5\n \n \n \n);" - }, - { - "name": "multiline", - "snippet": "const multiline = () => (\n \n \n \n {[1, 2, 3, 4, 5, 6, 7, 8, 9, 10].map((i) => (\n {}} key={i}>\n Item {i}\n \n ))}\n \n \n \n);" - }, - { - "name": "onClick", - "snippet": "const onClick = () => \n Trigger\n Trigger\n \n;" - }, - { - "name": "href", - "snippet": "const href = () => (\n \n Trigger\n \n);" - }, - { - "name": "className", - "snippet": "const className = () => (\n
\n \n Trigger\n \n
\n);" - } - ], - "import": "import Badge from \"components/Badge\";\nimport Breadcrumbs from \"components/Breadcrumbs\";\nimport { Example } from \"utilities/storybook\";", - "jsDocTags": {}, - "reactDocgen": { - "description": "", - "methods": [], - "displayName": "Breadcrumbs", - "definedInFile": "/Users/jeppe/dev/temp/reshaped/src/components/Breadcrumbs/Breadcrumbs.tsx", - "actualName": "Breadcrumbs", - "exportName": "default" - } - }, - "components-button": { - "id": "components-button", - "name": "Button", - "path": "./src/components/Button/tests/Button.stories.tsx", - "stories": [ - { - "name": "variantAndColor", - "snippet": "const variantAndColor = () => (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n);" - }, - { - "name": "icon", - "snippet": "const icon = () => (\n \n \n \n \n\n \n \n \n\n \n \n \n\n \n \n \n \n \n \n\n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n\n \n \n \n \n);" - }, - { - "name": "elevated", - "snippet": "const elevated = () => (\n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n);" - }, - { - "name": "rounded", - "snippet": "const rounded = () => (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n);" - }, - { - "name": "loading", - "snippet": "const loading = () => (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n\n
\n \n \n \n \n
\n
\n
\n\n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n);" - }, - { - "name": "disabled", - "snippet": "const disabled = () => (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n\n
\n \n \n \n \n
\n
\n
\n
\n);" - }, - { - "name": "aligner", - "snippet": "const aligner = () => (\n \n \n \n Content\n \n \n \n \n);" - }, - { - "name": "href", - "snippet": "const href = () => ;" - }, - { - "name": "onClick", - "snippet": "const onClick = () => ;" - }, - { - "name": "hrefOnClick", - "snippet": "const hrefOnClick = (args) => (\n {\n e.preventDefault();\n args.handleClick(e);\n }}\n href=\"https://reshaped.so\"\n >\n Trigger\n \n);" - }, - { - "name": "as", - "snippet": "const as = () => (\n \n \n \n \n \n {}}\n render={(props) =>
}\n attributes={{ \"data-testid\": \"render-el\" }}\n >\n Trigger\n \n \n \n);" - }, - { - "name": "className", - "snippet": "const className = () => (\n
\n \n
\n);" - }, - { - "name": "group", - "snippet": "const group = () => (\n \n \n \n \n \n \n \n \n ))}\n \n \n \n \n {([\"neutral\", \"primary\", \"critical\", \"positive\"] as const).map((color) => (\n \n \n \n \n \n ))}\n \n \n \n \n {([\"neutral\", \"primary\", \"critical\", \"positive\", \"media\"] as const).map((color) => (\n \n \n \n \n \n ))}\n \n \n\n \n \n {([\"neutral\", \"primary\", \"critical\", \"positive\"] as const).map((color) => (\n \n \n \n \n \n ))}\n \n \n \n);" - }, - { - "name": "groupClassName", - "snippet": "const groupClassName = () => (\n
\n \n \n \n
\n);" - } - ], - "import": "import Avatar from \"components/Avatar\";\nimport Button from \"components/Button\";\nimport { Example, Placeholder } from \"utilities/storybook\";\nimport Hotkey from \"components/Hotkey\";\nimport Image from \"components/Image\";\nimport View from \"components/View\";", - "jsDocTags": {}, - "reactDocgen": { - "description": "", - "methods": [], - "displayName": "Button", - "definedInFile": "/Users/jeppe/dev/temp/reshaped/src/components/Button/Button.tsx", - "actualName": "Button", - "exportName": "default" - } - }, - "components-calendar": { - "id": "components-calendar", - "name": "Calendar", - "path": "./src/components/Calendar/tests/Calendar.stories.tsx", - "stories": [ - { - "name": "defaultMonth", - "snippet": "const defaultMonth = () => (\n \n \n \n \n \n);" - }, - { - "name": "uncontrolled", - "snippet": "const uncontrolled = () => \n \n \n \n \n \n \n;" - }, - { - "name": "controlled", - "snippet": "const controlled = () => \n \n \n \n \n \n \n;" - }, - { - "name": "selectedDates", - "snippet": "const selectedDates = () => (\n \n \n \n \n \n);" - }, - { - "name": "minMax", - "snippet": "const minMax = () => (\n \n \n \n \n \n);" - }, - { - "name": "firstWeekDay", - "snippet": "const firstWeekDay = () => (\n \n \n \n \n \n);" - }, - { - "name": "translation", - "snippet": "const translation = () => (\n \n \n date.toLocaleDateString(\"nl\", { month: \"short\" })}\n renderSelectedMonthLabel={({ date }) =>\n date.toLocaleDateString(\"nl\", { month: \"long\", year: \"numeric\" })\n }\n renderWeekDay={({ date }) => date.toLocaleDateString(\"nl\", { weekday: \"short\" })}\n />\n \n \n);" - }, - { - "name": "ariaLabels", - "snippet": "const ariaLabels = () => (\n \n \n \"Test date\"}\n renderMonthAriaLabel={() => \"Test month\"}\n previousYearAriaLabel=\"Test previous year\"\n previousMonthAriaLabel=\"Test previous month\"\n monthSelectionAriaLabel=\"Test month selection\"\n />\n \n \n);" - }, - { - "name": "monthSelection", - "snippet": "const monthSelection = () => (\n \n \n \n \n \n);" - }, - { - "name": "keyboardNavigation", - "snippet": "const keyboardNavigation = () => (\n \n \n \n \n \n);" - } - ], - "import": "import Calendar from \"components/Calendar\";\nimport { Example } from \"utilities/storybook\";", - "jsDocTags": {}, - "reactDocgen": { - "description": "", - "methods": [], - "displayName": "Calendar", - "definedInFile": "/Users/jeppe/dev/temp/reshaped/src/components/Calendar/Calendar.tsx", - "actualName": "Calendar", - "exportName": "default" - } - }, - "components-card": { - "id": "components-card", - "name": "Card", - "path": "./src/components/Card/tests/Card.stories.tsx", - "stories": [ - { - "name": "padding", - "snippet": "const padding = () => (\n \n \n \n \n \n \n\n \n \n \n \n \n\n \n \n \n \n \n\n \n \n \n \n \n \n);" - }, - { - "name": "selected", - "snippet": "const selected = () => (\n \n \n \n \n \n \n \n);" - }, - { - "name": "elevated", - "snippet": "const elevated = () => (\n \n \n \n \n \n \n \n);" - }, - { - "name": "bleed", - "snippet": "const bleed = () => (\n \n \n \n \n \n \n \n \n \n \n \n \n);" - }, - { - "name": "height", - "snippet": "const height = () => (\n \n \n \n \n \n);" - }, - { - "name": "onClick", - "snippet": "const onClick = () => Trigger;" - }, - { - "name": "href", - "snippet": "const href = () => Trigger;" - }, - { - "name": "as", - "snippet": "const as = () => ;" - }, - { - "name": "className", - "snippet": "const className = () => (\n
\n \n
\n);" - } - ], - "import": "import Card from \"components/Card\";\nimport { Example, Placeholder } from \"utilities/storybook\";", - "jsDocTags": {}, - "reactDocgen": { - "description": "", - "methods": [], - "displayName": "Card", - "definedInFile": "/Users/jeppe/dev/temp/reshaped/src/components/Card/Card.tsx", - "actualName": "Card", - "exportName": "default" - } - }, - "components-carousel": { - "id": "components-carousel", - "name": "Carousel", - "path": "./src/components/Carousel/tests/Carousel.stories.tsx", - "stories": [ - { - "name": "base", - "snippet": "const base = () => (\n \n Content\n Content\n Content\n Content\n Content\n Content\n \n);" - }, - { - "name": "visibleItems", - "snippet": "const visibleItems = () => (\n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n);" - }, - { - "name": "gap", - "snippet": "const gap = () => (\n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n);" - }, - { - "name": "bleed", - "snippet": "const bleed = () => (\n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n);" - }, - { - "name": "navigationDisplay", - "snippet": "const navigationDisplay = () => (\n \n \n \n \n \n \n \n \n \n \n \n \n);" - }, - { - "name": "instanceRef", - "snippet": "const instanceRef = (args) => {\n const carouselRef = React.useRef(null);\n const [index, setIndex] = React.useState(0);\n\n return (\n \n \n \n \n \n \n \n Index: {index}\n \n {\n args.handleChange(changeArgs);\n setIndex(changeArgs.index);\n }}\n >\n Item 0\n Item 1\n Item 2\n Item 3\n Item 4\n Item 5\n \n \n \n \n );\n};" - }, - { - "name": "className", - "snippet": "const className = () => (\n
\n \n Item 0\n Item 1\n Item 2\n Item 3\n Item 4\n Item 5\n \n
\n);" - } - ], - "import": "import Button from \"components/Button\";\nimport Carousel from \"components/Carousel\";\nimport { Example, Placeholder } from \"utilities/storybook\";\nimport View from \"components/View\";", - "jsDocTags": {}, - "reactDocgen": { - "description": "", - "methods": [ - { - "name": "navigateTo", - "docblock": null, - "modifiers": [], - "params": [ - { - "name": "index", - "optional": false, - "type": { "name": "number" } - } - ], - "returns": null - } - ], - "displayName": "Carousel", - "definedInFile": "/Users/jeppe/dev/temp/reshaped/src/components/Carousel/Carousel.tsx", - "actualName": "Carousel", - "exportName": "default" - } - }, - "components-checkbox": { - "id": "components-checkbox", - "name": "Checkbox", - "path": "./src/components/Checkbox/tests/Checkbox.stories.tsx", - "stories": [ - { - "name": "render", - "snippet": "const render = () => (\n \n Content\n \n);" - }, - { - "name": "size", - "snippet": "const size = () => (\n \n \n \n \n Checkbox\n \n \n Checkbox\n \n \n \n \n \n \n Checkbox\n \n \n Checkbox\n \n \n \n \n \n \n Checkbox\n \n \n Checkbox\n \n \n \n \n \n \n Checkbox\n \n \n \n \n);" - }, - { - "name": "error", - "snippet": "const error = () => (\n \n \n \n Checkbox\n \n \n \n);" - }, - { - "name": "disabled", - "snippet": "const disabled = () => (\n \n \n \n Checkbox\n \n \n \n \n Checkbox\n \n \n \n \n Checkbox\n \n \n \n);" - }, - { - "name": "checked", - "snippet": "const checked = () => Content\n ;" - }, - { - "name": "defaultChecked", - "snippet": "const defaultChecked = () => Content\n ;" - }, - { - "name": "indeterminate", - "snippet": "const indeterminate = () => (\n \n Content\n \n);" - }, - { - "name": "className", - "snippet": "const className = () => (\n
\n \n Content\n \n
\n);" - } - ], - "import": "import Checkbox from \"components/Checkbox\";\nimport { Example } from \"utilities/storybook\";\nimport View from \"components/View\";", - "jsDocTags": {}, - "reactDocgen": { - "description": "", - "methods": [], - "displayName": "Checkbox", - "definedInFile": "/Users/jeppe/dev/temp/reshaped/src/components/Checkbox/Checkbox.tsx", - "actualName": "Checkbox", - "exportName": "default" - } - }, - "components-checkboxgroup": { - "id": "components-checkboxgroup", - "name": "CheckboxGroup", - "path": "./src/components/CheckboxGroup/tests/CheckboxGroup.stories.tsx", - "stories": [ - { - "name": "value", - "snippet": "const value = () => \n \n {/* checked should be ignored */}\n Content\n \n Content 2\n \n;" - }, - { - "name": "defaultValue", - "snippet": "const defaultValue = () => \n \n {/* checked should be ignored */}\n Content\n \n Content 2\n \n;" - }, - { - "name": "disabled", - "snippet": "const disabled = () => (\n \n Item 1\n Item 2\n \n);" - } - ], - "import": "import Checkbox from \"components/Checkbox\";\nimport CheckboxGroup from \"components/CheckboxGroup\";\nimport View from \"components/View\";", - "jsDocTags": {}, - "reactDocgen": { - "description": "", - "methods": [], - "displayName": "CheckboxGroup", - "definedInFile": "/Users/jeppe/dev/temp/reshaped/src/components/CheckboxGroup/CheckboxGroup.tsx", - "actualName": "CheckboxGroup", - "exportName": "default" - } - }, - "components-contextmenu": { - "id": "components-contextmenu", - "name": "ContextMenu", - "path": "./src/components/ContextMenu/tests/ContextMenu.stories.tsx", - "stories": [ - { - "name": "base", - "snippet": "const base = () => (\n \n \n
\n \n \n\n \n Item 1\n Item 2\n \n \n
\n
\n
\n);" - }, - { - "name": "handlers", - "snippet": "const handlers = () =>
\n \n \n \n Item\n \n \n
;" - } - ], - "import": "import ContextMenu from \"components/ContextMenu\";\nimport { Example } from \"utilities/storybook\";\nimport View from \"components/View\";", - "jsDocTags": {}, - "reactDocgen": { - "description": "", - "methods": [], - "displayName": "ContextMenu", - "definedInFile": "/Users/jeppe/dev/temp/reshaped/src/components/ContextMenu/ContextMenu.tsx", - "actualName": "ContextMenu", - "exportName": "default" - } - }, - "components-divider": { - "id": "components-divider", - "name": "Divider", - "path": "./src/components/Divider/tests/Divider.stories.tsx", - "stories": [ - { - "name": "rendering", - "snippet": "const rendering = () => (\n \n \n \n \n\n \n \n \n \n \n);" - }, - { - "name": "vertical", - "snippet": "const vertical = () => (\n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n);" - }, - { - "name": "label", - "snippet": "const label = () => {\n return (\n \n \n \n Centered label\n Start label\n End label\n \n \n\n \n \n \n \n or pick second option\n \n \n \n \n \n );\n};" - }, - { - "name": "className", - "snippet": "const className = () => (\n
\n \n
\n);" - } - ], - "import": "import Divider from \"components/Divider\";\nimport { Example, Placeholder } from \"utilities/storybook\";\nimport View from \"components/View\";", - "jsDocTags": {}, - "reactDocgen": { - "description": "", - "methods": [], - "displayName": "Divider", - "definedInFile": "/Users/jeppe/dev/temp/reshaped/src/components/Divider/Divider.tsx", - "actualName": "Divider", - "exportName": "default" - } - }, - "components-dropdownmenu": { - "id": "components-dropdownmenu", - "name": "DropdownMenu", - "path": "./src/components/DropdownMenu/tests/DropdownMenu.stories.tsx", - "stories": [ - { - "name": "position", - "snippet": "const position = () => (\n \n \n \n \n {(attributes) => }\n \n \n Item 1\n Item 2\n \n \n \n\n \n \n \n {(attributes) => }\n \n \n Item 1\n Item 2\n \n \n \n\n \n \n \n {(attributes) => }\n \n \n Item 1\n Item 2\n \n \n \n
\n \n);" - }, - { - "name": "sections", - "snippet": "const sections = () => (\n \n \n \n \n {(attributes) => }\n \n \n \n Item 1\n Item 2\n \n\n \n Item 3\n Item 4\n \n \n \n \n \n);" - }, - { - "name": "submenu", - "snippet": "const submenu = () => (\n \n \n \n \n {(attributes) => }\n \n \n {}}>Item 1\n \n Item 2\n \n {}}>SubItem 1\n {}}>SubItem 2\n \n \n \n Item 3\n \n {}}>SubItem 2-1\n {}}>SubItem 2-2\n \n \n\n \n Item 4, disabled\n \n {}}>SubItem 3-1\n {}}>SubItem 3-2\n \n \n \n \n \n \n);" - }, - { - "name": "defaultActive", - "snippet": "const defaultActive = () => \n \n {(attributes) => }\n \n \n Item\n \n;" - }, - { - "name": "active", - "snippet": "const active = () => \n \n {(attributes) => }\n \n \n Item\n \n;" - }, - { - "name": "activeFalse", - "snippet": "const activeFalse = () => \n \n {(attributes) => }\n \n \n Item\n \n;" - }, - { - "name": "className", - "snippet": "const className = () => (\n
\n \n \n {(attributes) => }\n \n \n Item\n \n \n
\n);" - }, - { - "name": "testScroll", - "snippet": "const testScroll = () => (\n \n \n
\n \n \n {(attributes) => }\n \n \n Item 1\n Item 2\n \n \n \n \n);" - }, - { - "name": "testTheme", - "snippet": "const testTheme = () => (\n \n \n \n \n \n \n \n \n);" - } - ], - "import": "import Button from \"components/Button\";\nimport DropdownMenu from \"components/DropdownMenu\";\nimport { Example } from \"utilities/storybook\";\nimport Theme from \"components/Theme\";\nimport View from \"components/View\";", - "jsDocTags": {}, - "reactDocgen": { - "description": "", - "methods": [], - "displayName": "DropdownMenu", - "definedInFile": "/Users/jeppe/dev/temp/reshaped/src/components/DropdownMenu/DropdownMenu.tsx", - "actualName": "DropdownMenu", - "exportName": "default" - } - }, - "components-fileupload": { - "id": "components-fileupload", - "name": "FileUpload", - "path": "./src/components/FileUpload/tests/FileUpload.stories.tsx", - "stories": [ - { - "name": "base", - "snippet": "const base = () => (\n \n \n \n \n \n \n
\n Drop files to attach, or{\" \"}\n \n browse\n \n
\n
\n
\n
\n);" - }, - { - "name": "inline", - "snippet": "const inline = () => {\n return (\n \n \n \n \n Upload\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {(props) => }\n \n \n \n );\n};" - }, - { - "name": "height", - "snippet": "const height = () => (\n \n \n \n \n \n Drop files to attach\n \n \n \n \n);" - }, - { - "name": "onChange", - "snippet": "const onChange = () =>
\n Content\n \n
;" - }, - { - "name": "className", - "snippet": "const className = () => (\n
\n \n Content\n \n
\n);" - } - ], - "import": "import Button from \"components/Button\";\nimport { Example } from \"utilities/storybook\";\nimport FileUpload from \"components/FileUpload\";\nimport Icon from \"components/Icon\";\nimport Image from \"components/Image\";\nimport Link from \"components/Link\";\nimport View from \"components/View\";", - "jsDocTags": {}, - "reactDocgen": { - "description": "", - "methods": [], - "displayName": "FileUpload", - "definedInFile": "/Users/jeppe/dev/temp/reshaped/src/components/FileUpload/FileUpload.tsx", - "actualName": "FileUpload", - "exportName": "default" - } - }, - "components-hotkey": { - "id": "components-hotkey", - "name": "Hotkey", - "path": "./src/components/Hotkey/tests/Hotkey.stories.tsx", - "stories": [ - { - "name": "base", - "snippet": "const base = () => (\n\t\n\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t⌘K\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t}\n\t\t\t\t\tinputAttributes={{ \"aria-label\": \"hotkey test\" }}\n\t\t\t\t/>\n\t\t\t\n\t\t\n\t\n);" - }, - { - "name": "className", - "snippet": "const className = () => (\n
\n \n ⌘K\n \n
\n);" - } - ], - "import": "import { Example } from \"utilities/storybook\";\nimport { Hotkey } from \"reshaped\";\nimport TextField from \"components/TextField\";\nimport View from \"components/View\";", - "jsDocTags": {}, - "reactDocgen": { - "description": "", - "methods": [], - "displayName": "Hotkey", - "definedInFile": "/Users/jeppe/dev/temp/reshaped/src/components/Hotkey/Hotkey.tsx", - "actualName": "Hotkey", - "exportName": "default" - } - }, - "components-link": { - "id": "components-link", - "name": "Link", - "path": "./src/components/Link/tests/Link.stories.tsx", - "stories": [ - { - "name": "variant", - "snippet": "const variant = () => (\n \n \n \n Reshaped\n \n \n \n {}} variant=\"plain\">\n Link\n \n \n \n);" - }, - { - "name": "color", - "snippet": "const color = () => (\n \n \n Link\n \n \n Link\n \n \n Link\n \n \n Link\n \n \n Link\n \n \n);" - }, - { - "name": "icon", - "snippet": "const icon = () => (\n \n \n Link\n \n \n \n Link\n \n \n \n \n \n Instant delivery\n \n \n \n \n);" - }, - { - "name": "href", - "snippet": "const href = () => Trigger;" - }, - { - "name": "onClick", - "snippet": "const onClick = () => Trigger;" - }, - { - "name": "hrefOnClick", - "snippet": "const hrefOnClick = (args) => (\n {\n e.preventDefault();\n args.handleClick(e);\n }}\n href=\"https://reshaped.so\"\n >\n Trigger\n \n);" - }, - { - "name": "disabled", - "snippet": "const disabled = () => (\n {}}>\n Trigger\n \n);" - }, - { - "name": "render", - "snippet": "const render = () =>
}>Trigger;" - }, - { - "name": "className", - "snippet": "const className = () => (\n
\n \n Trigger\n \n
\n);" - }, - { - "name": "testMultilineInText", - "snippet": "const testMultilineInText = () => (\n \n \n
\n Someone asked me to write this text that is boring to ready for everyone and to add \n this very very long link to it.\n
\n
\n
\n);" - } - ], - "import": "import { Example } from \"utilities/storybook\";\nimport Link from \"components/Link\";\nimport Text from \"components/Text\";", - "jsDocTags": {}, - "reactDocgen": { - "description": "", - "methods": [], - "displayName": "Link", - "definedInFile": "/Users/jeppe/dev/temp/reshaped/src/components/Link/Link.tsx", - "actualName": "Link", - "exportName": "default" - } - }, - "components-loader": { - "id": "components-loader", - "name": "Loader", - "path": "./src/components/Loader/tests/Loader.stories.tsx", - "stories": [ - { - "name": "size", - "snippet": "const size = () => {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n};" - }, - { - "name": "color", - "snippet": "const color = () => (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n);" - }, - { - "name": "ariaLabel", - "snippet": "const ariaLabel = () => ;" - }, - { - "name": "className", - "snippet": "const className = () => (\n
\n \n
\n);" - } - ], - "import": "import { Example } from \"utilities/storybook\";\nimport Loader from \"components/Loader\";", - "jsDocTags": {}, - "reactDocgen": { - "description": "", - "methods": [], - "displayName": "Loader", - "definedInFile": "/Users/jeppe/dev/temp/reshaped/src/components/Loader/Loader.tsx", - "actualName": "Loader", - "exportName": "default" - } - }, - "components-menuitem": { - "id": "components-menuitem", - "name": "MenuItem", - "path": "./src/components/MenuItem/tests/MenuItem.stories.tsx", - "stories": [ - { - "name": "size", - "snippet": "const size = () => (\n \n \n {}} endSlot={⌘K}>\n Menu item\n \n \n \n {}}>\n Menu item\n \n \n \n {}}>\n Menu item\n \n \n \n {}}>\n Menu item\n \n \n \n);" - }, - { - "name": "color", - "snippet": "const color = () => (\n \n \n \n Menu item\n \n \n \n \n Menu item\n \n \n \n \n Menu item\n \n \n \n);" - }, - { - "name": "selected", - "snippet": "const selected = () => (\n \n \n \n Menu item\n \n \n \n \n Menu item\n \n \n \n \n Menu item\n \n \n \n);" - }, - { - "name": "roundedCorners", - "snippet": "const roundedCorners = () => (\n \n \n \n Menu item\n \n \n\n \n \n Menu item\n \n \n \n);" - }, - { - "name": "slots", - "snippet": "const slots = () => (\n \n \n } endSlot={} selected>\n Menu item\n \n \n \n);" - }, - { - "name": "aligner", - "snippet": "const aligner = () => (\n \n \n \n Heading\n \n {}}>\n Menu item\n \n \n \n \n\n \n \n Heading\n \n Menu item\n \n \n \n\n \n \n Heading\n \n \n Menu item\n \n \n \n \n \n);" - }, - { - "name": "href", - "snippet": "const href = () => Trigger;" - }, - { - "name": "onClick", - "snippet": "const onClick = () => Trigger;" - }, - { - "name": "hrefOnClick", - "snippet": "const hrefOnClick = (args) => (\n {\n e.preventDefault();\n args.handleClick(e);\n }}\n href=\"https://reshaped.so\"\n >\n Trigger\n \n);" - }, - { - "name": "disabled", - "snippet": "const disabled = () => (\n {}}>\n Trigger\n \n);" - }, - { - "name": "as", - "snippet": "const as = () => (\n \n \n {}}\n render={(props) =>
}\n attributes={{ \"data-testid\": \"render-el\" }}\n >\n Trigger\n \n \n \n);" - }, - { - "name": "className", - "snippet": "const className = () => (\n
\n \n Trigger\n \n
\n);" - }, - { - "name": "alignerClassName", - "snippet": "const alignerClassName = () => (\n
\n \n Trigger\n \n
\n);" - } - ], - "import": "import { Example, Placeholder } from \"utilities/storybook\";\nimport Hotkey from \"components/Hotkey\";\nimport MenuItem from \"components/MenuItem\";\nimport Text from \"components/Text\";\nimport View from \"components/View\";", - "jsDocTags": {}, - "reactDocgen": { - "description": "", - "methods": [], - "displayName": "MenuItem", - "definedInFile": "/Users/jeppe/dev/temp/reshaped/src/components/MenuItem/MenuItem.tsx", - "actualName": "MenuItem", - "exportName": "default" - } - }, - "components-modal": { - "id": "components-modal", - "name": "Modal", - "path": "./src/components/Modal/tests/Modal.stories.tsx", - "stories": [ - { - "name": "position", - "snippet": "const position = () => (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n);" - }, - { - "name": "size", - "snippet": "const size = () => {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n};" - }, - { - "name": "padding", - "snippet": "const padding = () => (\n \n \n \n \n \n \n \n \n \n \n \n);" - }, - { - "name": "overflow", - "snippet": "const overflow = () => (\n \n \n \n \n \n \n\n \n \n \n \n \n \n);" - }, - { - "name": "composition", - "snippet": "const composition = () => (\n \n \n \n \n \n);" - }, - { - "name": "overlay", - "snippet": "const overlay = () => (\n \n \n \n \n \n \n \n \n \n);" - }, - { - "name": "flags", - "snippet": "const flags = () => {\n return (\n \n \n \n \n \n );\n};" - }, - { - "name": "containerRef", - "snippet": "const containerRef = () => {\n const containerRef = React.useRef(null);\n const containerRef2 = React.useRef(null);\n const toggle = useToggle();\n const toggle2 = useToggle();\n\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n};" - }, - { - "name": "renderProps", - "snippet": "const renderProps = () => (\n \n Title\n Content\n \n);" - }, - { - "name": "handlers", - "snippet": "const handlers = () => {\n const overlayToggle = useToggle();\n\n return (\n <>\n \n {\n overlayToggle.deactivate();\n args.handleClose(closeArgs);\n }}\n onOpen={fn()}\n onAfterOpen={fn()}\n onAfterClose={fn()}>\n TitleContent\n \n \n );\n};" - }, - { - "name": "className", - "snippet": "const className = () => (\n \n Title\n Content\n \n);" - }, - { - "name": "edgeCases", - "snippet": "const edgeCases = () => {\n const menuModalToggle = useToggle();\n const menuModalToggleInner = useToggle();\n const scrollModalToggle = useToggle();\n const inputRef = React.useRef(null);\n\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {\n inputRef.current?.focus();\n }}\n >\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Content\n \n \n \n \n \n \n \n {(attributes) => }\n \n \n Open dialog\n Item 2\n \n \n \n \n \n \n {(attributes) => }\n \n \n Item 1\n Item 2\n \n \n \n \n \n \n \n \n \n \n\n \n \n \n\n \n \n \n \n \n );\n};" - }, - { - "name": "trapFocusEdgeCases", - "snippet": "const trapFocusEdgeCases = () => {\n const toggle = useToggle();\n\n return (\n \n \n \n \n \n \n \n Option 1\n \n \n Option 2\n \n \n \n \n \n \n );\n};" - } - ], - "import": "import Button from \"components/Button\";\nimport Dismissible from \"components/Dismissible\";\nimport DropdownMenu from \"components/DropdownMenu\";\nimport { Example, Placeholder } from \"utilities/storybook\";\nimport Modal from \"components/Modal\";\nimport Radio from \"components/Radio\";\nimport Switch from \"components/Switch\";\nimport TextField from \"components/TextField\";\nimport View from \"components/View\";", - "jsDocTags": {}, - "reactDocgen": { - "description": "", - "methods": [], - "displayName": "Modal", - "definedInFile": "/Users/jeppe/dev/temp/reshaped/src/components/Modal/Modal.tsx", - "actualName": "Modal", - "exportName": "default" - } - }, - "components-numberfield": { - "id": "components-numberfield", - "name": "NumberField", - "path": "./src/components/NumberField/tests/NumberField.stories.tsx", - "stories": [ - { - "name": "variant", - "snippet": "const variant = () => {\n return (\n \n \n \n \n \n \n \n \n \n \n \n );\n};" - }, - { - "name": "size", - "snippet": "const size = () => {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n};" - }, - { - "name": "disabled", - "snippet": "const disabled = () => ;" - }, - { - "name": "defaultValue", - "snippet": "const defaultValue = () => ;" - }, - { - "name": "value", - "snippet": "const value = () => ;" - }, - { - "name": "minMax", - "snippet": "const minMax = () => (\n \n);" - }, - { - "name": "step", - "snippet": "const step = () => (\n \n);" - }, - { - "name": "className", - "snippet": "const className = () => (\n
\n \n
\n);" - }, - { - "name": "formControl", - "snippet": "const formControl = () => (\n \n \n \n Label\n \n Helper\n \n \n\n \n \n Label\n \n Helper\n \n \n\n \n \n Label\n \n Error\n \n \n \n);" - }, - { - "name": "valueChanges", - "snippet": "const valueChanges = () => (\n \n \n \n \n \n);" - } - ], - "import": "import { Example } from \"utilities/storybook\";\nimport FormControl from \"components/FormControl\";\nimport NumberField from \"components/NumberField\";", - "jsDocTags": {}, - "reactDocgen": { - "description": "", - "methods": [], - "displayName": "NumberField", - "definedInFile": "/Users/jeppe/dev/temp/reshaped/src/components/NumberField/NumberField.tsx", - "actualName": "NumberField", - "exportName": "default" - } - }, - "components-pagination": { - "id": "components-pagination", - "name": "Pagination", - "path": "./src/components/Pagination/tests/Pagination.stories.tsx", - "stories": [ - { - "name": "truncate", - "snippet": "const truncate = () => {\n return (\n \n \n `Page ${args.page}`}\n />\n \n \n `Page ${args.page}`}\n />\n \n \n `Page ${args.page}`}\n />\n \n \n `Page ${args.page}`}\n />\n \n \n );\n};" - }, - { - "name": "render", - "snippet": "const render = () => (\n
\n `Page ${args.page}`}\n />\n
\n);" - }, - { - "name": "defaultPage", - "snippet": "const defaultPage = () =>
\n \n
;" - }, - { - "name": "page", - "snippet": "const page = () =>
\n \n
;" - }, - { - "name": "className", - "snippet": "const className = () => (\n
\n \n
\n);" - } - ], - "import": "import { Example } from \"utilities/storybook\";\nimport Pagination from \"components/Pagination\";", - "jsDocTags": {}, - "reactDocgen": { - "description": "", - "methods": [], - "displayName": "Pagination", - "definedInFile": "/Users/jeppe/dev/temp/reshaped/src/components/Pagination/Pagination.tsx", - "actualName": "Pagination", - "exportName": "default" - } - }, - "components-pinfield": { - "id": "components-pinfield", - "name": "PinField", - "path": "./src/components/PinField/tests/PinField.stories.tsx", - "stories": [ - { - "name": "base", - "snippet": "const base = () => ;" - }, - { - "name": "variant", - "snippet": "const variant = () => (\n \n \n \n \n \n);" - }, - { - "name": "size", - "snippet": "const size = () => (\n \n \n \n \n\n \n \n \n\n \n \n \n\n \n \n \n\n \n \n \n \n);" - }, - { - "name": "valueLength", - "snippet": "const valueLength = () => (\n \n);" - }, - { - "name": "defaultValue", - "snippet": "const defaultValue = () => ;" - }, - { - "name": "value", - "snippet": "const value = () => ;" - }, - { - "name": "pattern", - "snippet": "const pattern = () => ;" - }, - { - "name": "className", - "snippet": "const className = () => (\n
\n \n
\n);" - }, - { - "name": "formControl", - "snippet": "const formControl = () => (\n \n Label\n \n \n);" - }, - { - "name": "keyboard", - "snippet": "const keyboard = () => ;" - } - ], - "import": "import { Example } from \"utilities/storybook\";\nimport FormControl from \"components/FormControl\";\nimport PinField from \"components/PinField\";", - "jsDocTags": {}, - "reactDocgen": { - "description": "", - "methods": [], - "displayName": "PinField", - "definedInFile": "/Users/jeppe/dev/temp/reshaped/src/components/PinField/PinField.tsx", - "actualName": "PinField", - "exportName": "default" - } - }, - "components-popover": { - "id": "components-popover", - "name": "Popover", - "path": "./src/components/Popover/tests/Popover.stories.tsx", - "stories": [ - { - "name": "position", - "snippet": "const position = () => (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n);" - }, - { - "name": "widthNumber", - "snippet": "const widthNumber = () => ;" - }, - { - "name": "widthFull", - "snippet": "const widthFull = () => ;" - }, - { - "name": "padding", - "snippet": "const padding = () => (\n \n \n \n \n \n \n \n \n);" - }, - { - "name": "elevation", - "snippet": "const elevation = () => (\n \n \n \n \n \n);" - }, - { - "name": "defaultActive", - "snippet": "const defaultActive = () => \n \n {(attributes) => }\n \n Content\n;" - }, - { - "name": "active", - "snippet": "const active = () => \n \n {(attributes) => }\n \n Content\n;" - }, - { - "name": "activeFalse", - "snippet": "const activeFalse = () => \n \n {(attributes) => }\n \n Content\n;" - }, - { - "name": "dismissible", - "snippet": "const dismissible = () => \n \n {(attributes) => }\n \n \n Content\n \n \n;" - }, - { - "name": "autoFocus", - "snippet": "const autoFocus = () => (\n \n \n \n \n \n);" - }, - { - "name": "className", - "snippet": "const className = () => (\n
\n \n \n {(attributes) => }\n \n \n Content\n \n \n
\n);" - }, - { - "name": "testNested", - "snippet": "const testNested = () => (\n \n \n {(attributes) => }\n \n \n \n Popover content\n \n \n {(attributes) => }\n \n Hello\n \n \n \n \n);" - }, - { - "name": "testWithTooltip", - "snippet": "const testWithTooltip = () => (\n \n \n {(tooltipAttributes) => (\n \n \n {(attributes) => (\n \n Open\n \n )}\n \n \n \n Popover content\n \n \n \n \n )}\n \n \n);" - }, - { - "name": "testContentEditable", - "snippet": "const testContentEditable = () => {\n const [active, setActive] = useState(false);\n\n return (\n \n \n {(attributes) => }\n \n \n \n \n \n \n\n \n {\n setActive(e.currentTarget.innerText.startsWith(\"@\"));\n }}\n onKeyDown={(e) => {\n console.log(e.key);\n if (e.key === \"Enter\" && active) {\n e.preventDefault();\n e.currentTarget.innerText = \"@hello\";\n setActive(false);\n }\n }}\n />\n \n\n setActive(false)}\n originCoordinates={{ x: 300, y: 300 }}\n trapFocusMode=\"selection-menu\"\n >\n \n \n {}}>Action\n {}}>Close\n \n \n \n \n \n \n );\n};" - }, - { - "name": "variant", - "snippet": "const variant = () => (\n \n \n \n \n {(attributes) => }\n \n \n \n \n \n \n \n);" - } - ], - "import": "import Button from \"components/Button\";\nimport { Example } from \"utilities/storybook\";\nimport MenuItem from \"components/MenuItem\";\nimport Popover from \"components/Popover\";\nimport ScrollArea from \"components/ScrollArea\";\nimport Tooltip from \"components/Tooltip\";\nimport View from \"components/View\";", - "jsDocTags": {}, - "reactDocgen": { - "description": "", - "methods": [], - "displayName": "Popover", - "definedInFile": "/Users/jeppe/dev/temp/reshaped/src/components/Popover/Popover.tsx", - "actualName": "Popover", - "exportName": "default" - } - }, - "components-progress": { - "id": "components-progress", - "name": "Progress", - "path": "./src/components/Progress/tests/Progress.stories.tsx", - "stories": [ - { - "name": "value", - "snippet": "const value = () => (\n \n \n \n \n \n \n \n \n \n \n \n);" - }, - { - "name": "size", - "snippet": "const size = () => (\n \n \n \n \n \n \n \n \n);" - }, - { - "name": "color", - "snippet": "const color = () => (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n);" - }, - { - "name": "duration", - "snippet": "const duration = () => {\n const [active, setActive] = React.useState(false);\n\n const handleChange = () => {\n setActive((state) => !state);\n };\n\n return (\n \n \n \n \n \n \n\n \n \n \n \n );\n};" - }, - { - "name": "render", - "snippet": "const render = () => ;" - }, - { - "name": "className", - "snippet": "const className = () => (\n
\n \n
\n);" - } - ], - "import": "import Button from \"components/Button\";\nimport { Example } from \"utilities/storybook\";\nimport Progress from \"components/Progress\";\nimport View from \"components/View\";", - "jsDocTags": {}, - "reactDocgen": { - "description": "", - "methods": [], - "displayName": "Progress", - "definedInFile": "/Users/jeppe/dev/temp/reshaped/src/components/Progress/Progress.tsx", - "actualName": "Progress", - "exportName": "default" - } - }, - "components-progressindicator": { - "id": "components-progressindicator", - "name": "ProgressIndicator", - "path": "./src/components/ProgressIndicator/tests/ProgressIndicator.stories.tsx", - "stories": [ - { - "name": "base", - "snippet": "const base = () => {\n const [activeIndex, setActiveIndex] = React.useState(0);\n const total = 10;\n\n return (\n \n \n \n \n {\n setActiveIndex((prev) => Math.max(0, prev - 1));\n }}\n >\n Previous\n \n {\n setActiveIndex((prev) => Math.min(total - 1, prev + 1));\n }}\n >\n Next\n \n Index: {activeIndex}\n \n\n \n }\n >\n \n \n \n \n \n \n \n \n );\n};" - }, - { - "name": "color", - "snippet": "const color = () => {\n return (\n \n \n \n \n \n \n }\n >\n \n \n \n \n \n \n \n );\n};" - }, - { - "name": "ariaLabel", - "snippet": "const ariaLabel = () => ;" - }, - { - "name": "className", - "snippet": "const className = () => (\n
\n \n
\n);" - } - ], - "import": "import Button from \"components/Button\";\nimport { Example } from \"utilities/storybook\";\nimport ProgressIndicator from \"components/ProgressIndicator\";\nimport Scrim from \"components/Scrim\";\nimport Text from \"components/Text\";\nimport View from \"components/View\";", - "jsDocTags": {}, - "reactDocgen": { - "description": "", - "methods": [], - "displayName": "ProgressIndicator", - "definedInFile": "/Users/jeppe/dev/temp/reshaped/src/components/ProgressIndicator/ProgressIndicator.tsx", - "actualName": "ProgressIndicator", - "exportName": "default" - } - }, - "components-radio": { - "id": "components-radio", - "name": "Radio", - "path": "./src/components/Radio/tests/Radio.stories.tsx", - "stories": [ - { - "name": "size", - "snippet": "const size = () => (\n \n \n \n \n Radio\n \n \n \n \n \n \n Radio\n \n \n \n \n \n \n Radio\n \n \n \n \n \n \n Radio\n \n \n \n \n);" - }, - { - "name": "error", - "snippet": "const error = () => (\n \n \n \n Radio\n \n \n \n);" - }, - { - "name": "render", - "snippet": "const render = () => (\n \n Content\n \n);" - }, - { - "name": "checked", - "snippet": "const checked = () => Content\n ;" - }, - { - "name": "checkedFalse", - "snippet": "const checkedFalse = () => Content\n ;" - }, - { - "name": "defaultChecked", - "snippet": "const defaultChecked = () => Content\n ;" - }, - { - "name": "defaultCheckedFalse", - "snippet": "const defaultCheckedFalse = () => Content\n ;" - }, - { - "name": "disabled", - "snippet": "const disabled = () => (\n \n Content\n \n);" - }, - { - "name": "className", - "snippet": "const className = () => (\n
\n \n Content\n \n
\n);" - } - ], - "import": "import { Example } from \"utilities/storybook\";\nimport Radio from \"components/Radio\";\nimport View from \"components/View\";", - "jsDocTags": {}, - "reactDocgen": { - "description": "", - "methods": [], - "displayName": "Radio", - "definedInFile": "/Users/jeppe/dev/temp/reshaped/src/components/Radio/Radio.tsx", - "actualName": "Radio", - "exportName": "default" - } - }, - "components-radiogroup": { - "id": "components-radiogroup", - "name": "RadioGroup", - "path": "./src/components/RadioGroup/tests/RadioGroup.stories.tsx", - "stories": [ - { - "name": "value", - "snippet": "const value = () => \n {/* checked should be ignored */}\n Content\n \n Content 2\n;" - }, - { - "name": "defaultValue", - "snippet": "const defaultValue = () => \n {/* checked should be ignored */}\n Content\n \n Content 2\n;" - }, - { - "name": "disabled", - "snippet": "const disabled = () => (\n \n Content\n \n);" - } - ], - "import": "import Radio from \"components/Radio\";\nimport RadioGroup from \"components/RadioGroup\";", - "jsDocTags": {}, - "reactDocgen": { - "description": "", - "methods": [], - "displayName": "RadioGroup", - "definedInFile": "/Users/jeppe/dev/temp/reshaped/src/components/RadioGroup/RadioGroup.tsx", - "actualName": "RadioGroup", - "exportName": "default" - } - }, - "components-resizable": { - "id": "components-resizable", - "name": "Resizable", - "path": "./src/components/Resizable/tests/Resizable.stories.tsx", - "stories": [ - { - "name": "direction", - "snippet": "const direction = () => {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n {/* Test that page doesn't scroll on dragging */}\n
\n \n );\n};" - }, - { - "name": "children", - "snippet": "const children = () => {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n};" - }, - { - "name": "variant", - "snippet": "const variant = () => (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n);" - }, - { - "name": "size", - "snippet": "const size = () => (\n \n \n \n \n \n \n \n \n \n);" - }, - { - "name": "layout", - "snippet": "const layout = () => (\n \n \n \n \n \n \n \n \n \n);" - }, - { - "name": "className", - "snippet": "const className = () => (\n
\n \n \n \n \n \n \n \n \n \n
\n);" - } - ], - "import": "import Button from \"components/Button\";\nimport { Example } from \"utilities/storybook\";\nimport Resizable from \"components/Resizable\";\nimport View from \"components/View\";", - "jsDocTags": {}, - "reactDocgen": { - "description": "", - "methods": [], - "displayName": "Resizable", - "definedInFile": "/Users/jeppe/dev/temp/reshaped/src/components/Resizable/Resizable.tsx", - "actualName": "Resizable", - "exportName": "default" - } - }, - "components-scrim": { - "id": "components-scrim", - "name": "Scrim", - "path": "./src/components/Scrim/tests/Scrim.stories.tsx", - "stories": [ - { - "name": "position", - "snippet": "const position = () => (\n \n \n }>Scrim\n \n\n \n }>\n Scrim\n \n \n\n \n }>\n Scrim\n \n \n\n \n }>\n Scrim\n \n \n\n \n }>\n Scrim\n \n \n \n);" - }, - { - "name": "className", - "snippet": "const className = () => (\n
\n \n Content\n \n
\n);" - }, - { - "name": "composition", - "snippet": "const composition = () => (\n \n \n
\n Text\n
\n
\n
\n);" - } - ], - "import": "import { Example, Placeholder } from \"utilities/storybook\";\nimport Scrim from \"components/Scrim\";", - "jsDocTags": {}, - "reactDocgen": { - "description": "", - "methods": [], - "displayName": "Scrim", - "definedInFile": "/Users/jeppe/dev/temp/reshaped/src/components/Scrim/Scrim.tsx", - "actualName": "Scrim", - "exportName": "default" - } - }, - "components-select": { - "id": "components-select", - "name": "Select", - "path": "./src/components/Select/tests/Select.stories.tsx", - "stories": [ - { - "name": "nativeRender", - "snippet": "const nativeRender = () => (\n \n \n \n \n \n \n \n \n \n \n \n);" - }, - { - "name": "customRender", - "snippet": "const customRender = () => (\n \n \n \n Dog\n Turtle\n \n \n \n \n \n Pigeon\n Parrot\n \n \n Whale\n Dolphin\n \n \n \n \n);" - }, - { - "name": "nativeHandlers", - "snippet": "const nativeHandlers = () => \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n;" - }, - { - "name": "customHandlers", - "snippet": "const customHandlers = () => \n \n \n Dog\n Turtle\n \n \n \n \n Dog\n Turtle\n \n \n \n \n Dog\n Turtle\n \n \n;" - }, - { - "name": "triggerOnly", - "snippet": "const triggerOnly = (args) => {\n const toggle = useToggle();\n const [value, setValue] = React.useState(\"Dog\");\n\n const handleClick: SelectProps[\"onClick\"] = (e) => {\n args.handleClick(e);\n toggle.toggle();\n };\n\n return (\n \n \n \n {value}\n \n \n
\n {\n setValue(\"Dog\");\n toggle.deactivate();\n }}\n attributes={{\n role: \"option\",\n }}\n >\n Dog\n \n {\n setValue(\"Turtle\");\n toggle.deactivate();\n }}\n >\n Turtle\n \n
\n \n
\n
\n );\n};" - }, - { - "name": "multiple", - "snippet": "const multiple = () => \n \n \n Dog\n Turtle\n \n \n;" - }, - { - "name": "variant", - "snippet": "const variant = () => (\n \n \n \n \n \n \n \n\n \n \n Dog\n Turtle\n \n \n\n \n \n \n \n \n \n\n \n \n Dog\n Turtle\n \n \n \n);" - }, - { - "name": "size", - "snippet": "const size = () => (\n \n \n \n Dog\n Turtle\n \n \n \n \n Dog\n Turtle\n \n \n \n \n Dog\n Turtle\n \n \n \n \n Dog\n Turtle\n \n \n \n);" - }, - { - "name": "startSlot", - "snippet": "const startSlot = () => (\n \n \n \n Dog\n Turtle\n \n \n\n \n }\n >\n Dog\n Turtle\n \n \n \n);" - }, - { - "name": "renderValue", - "snippet": "const renderValue = () => {\n const options = [\n {\n value: \"1\",\n label: \"Title 1\",\n subtitle: \"Subtitle 1\",\n },\n {\n value: \"2\",\n label: \"Title 2\",\n subtitle: \"Subtitle 2\",\n },\n ];\n\n return (\n \n \n \n {options.map((option) => (\n \n {option.label}\n \n {option.subtitle}\n \n \n ))}\n \n \n\n \n \n {options.map((option) => (\n \n {option.label}\n \n {option.subtitle}\n \n \n ))}\n \n \n\n \n Title {args.value}}\n >\n {options.map((option) => (\n \n {option.label}\n \n {option.subtitle}\n \n \n ))}\n \n \n\n \n Titles {args.value.join(\", \")}}\n >\n {options.map((option) => (\n \n {option.label}\n \n {option.subtitle}\n \n \n ))}\n \n \n \n );\n};" - }, - { - "name": "error", - "snippet": "const error = () => (\n \n \n \n Dog\n Turtle\n \n \n \n);" - }, - { - "name": "disabled", - "snippet": "const disabled = () => (\n \n \n \n \n \n \n \n \n \n Dog\n Turtle\n \n \n \n);" - }, - { - "name": "className", - "snippet": "const className = () => (\n \n \n \n \n \n \n \n \n \n Dog\n Turtle\n \n \n \n);" - }, - { - "name": "fallback", - "snippet": "const fallback = () => (\n \n \n \n {[...Array(100)].map((_, index) => (\n \n Item {index + 1}\n \n ))}\n \n
\n \n {[...Array(100)].map((_, index) => (\n \n Item {index + 1}\n \n ))}\n \n
\n
\n);" - }, - { - "name": "formControl", - "snippet": "const formControl = () => (\n \n \n \n Animal\n \n Dog\n Turtle\n \n This field is required\n \n \n \n);" - }, - { - "name": "testComposition", - "snippet": "const testComposition = () => (\n \n \n \n \n Dog\n Turtle\n \n Hello\n \n \n \n);" - } - ], - "import": "import Badge from \"components/Badge\";\nimport { Example, Placeholder } from \"utilities/storybook\";\nimport FormControl from \"components/FormControl\";\nimport MenuItem from \"components/MenuItem\";\nimport Modal from \"components/Modal\";\nimport Select from \"components/Select\";\nimport Text from \"components/Text\";", - "jsDocTags": {}, - "reactDocgen": { - "description": "", - "methods": [], - "displayName": "Select", - "definedInFile": "/Users/jeppe/dev/temp/reshaped/src/components/Select/Select.tsx", - "actualName": "Select", - "exportName": "default" - } - }, - "components-skeleton": { - "id": "components-skeleton", - "name": "Skeleton", - "path": "./src/components/Skeleton/tests/Skeleton.stories.tsx", - "stories": [ - { - "name": "variant", - "snippet": "const variant = () => (\n \n \n \n \n\n \n \n \n\n \n \n \n\n \n \n \n \n);" - }, - { - "name": "radius", - "snippet": "const radius = () => (\n \n \n \n \n\n \n \n \n\n \n \n \n\n \n \n \n \n);" - }, - { - "name": "className", - "snippet": "const className = () => (\n
\n \n
\n);" - } - ], - "import": "import { Example } from \"utilities/storybook\";\nimport Skeleton from \"components/Skeleton\";", - "jsDocTags": {}, - "reactDocgen": { - "description": "", - "methods": [], - "displayName": "Skeleton", - "definedInFile": "/Users/jeppe/dev/temp/reshaped/src/components/Skeleton/Skeleton.tsx", - "actualName": "Skeleton", - "exportName": "default" - } - }, - "components-slider": { - "id": "components-slider", - "name": "Slider", - "path": "./src/components/Slider/tests/Slider.stories.tsx", - "stories": [ - { - "name": "base", - "snippet": "const base = () => (\n \n \n \n \n \n \n \n \n \n \n
\n \n);" - }, - { - "name": "orientation", - "snippet": "const orientation = () => (\n \n \n \n \n \n \n \n \n);" - }, - { - "name": "minMax", - "snippet": "const minMax = () => (\n \n \n \n \n \n \n \n max\">\n \n \n \n);" - }, - { - "name": "step", - "snippet": "const step = () => (\n \n \n \n \n\n \n \n \n\n \n \n \n \n);" - }, - { - "name": "disabled", - "snippet": "const disabled = () => (\n \n \n \n \n\n \n \n \n \n);" - }, - { - "name": "renderValue", - "snippet": "const renderValue = () => (\n \n \n `$${args.value}`} />\n \n \n \n \n \n);" - }, - { - "name": "defaultValue", - "snippet": "const defaultValue = () => \n \n;" - }, - { - "name": "value", - "snippet": "const value = () => \n \n;" - }, - { - "name": "rangeDefaultValue", - "snippet": "const rangeDefaultValue = () => \n \n;" - }, - { - "name": "rangeValue", - "snippet": "const rangeValue = () => \n \n;" - }, - { - "name": "className", - "snippet": "const className = () => (\n
\n \n
\n);" - }, - { - "name": "testForm", - "snippet": "const testForm = (args) => {\n const formRef = React.useRef(null);\n const [data, setData] = React.useState<[string, FormDataEntryValue][]>([]);\n\n const handleChange = (e: React.FormEvent) => {\n const formData = new FormData(e.currentTarget);\n const nextState = [...formData.entries()];\n\n args.handleFormChange({ formData: nextState });\n setData(nextState);\n };\n\n return (\n \n
\n \n \n\n {data.map((v) => v.join(\": \")).join(\", \")}\n
\n );\n};" - }, - { - "name": "testSwipe", - "snippet": "const testSwipe = () => {\n const toggle = useToggle(true);\n\n return (\n \n \n Modal\n \n \n \n );\n};" - } - ], - "import": "import { Example } from \"utilities/storybook\";\nimport Modal from \"components/Modal\";\nimport Slider from \"components/Slider\";\nimport View from \"components/View\";", - "jsDocTags": {}, - "reactDocgen": { - "description": "", - "methods": [], - "displayName": "Slider", - "definedInFile": "/Users/jeppe/dev/temp/reshaped/src/components/Slider/Slider.tsx", - "actualName": "Slider", - "exportName": "default" - } - }, - "components-stepper": { - "id": "components-stepper", - "name": "Stepper", - "path": "./src/components/Stepper/tests/Stepper.stories.tsx", - "stories": [ - { - "name": "direction", - "snippet": "const direction = () => (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n);" - }, - { - "name": "labelDisplay", - "snippet": "const labelDisplay = () => (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n);" - }, - { - "name": "gap", - "snippet": "const gap = () => (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n);" - }, - { - "name": "className", - "snippet": "const className = () => (\n
\n \n \n \n
\n);" - }, - { - "name": "edgeCases", - "snippet": "const edgeCases = () => (\n \n \n \n \n \n);" - } - ], - "import": "import Button from \"components/Button\";\nimport { Example, Placeholder } from \"utilities/storybook\";\nimport Stepper from \"components/Stepper\";\nimport View from \"components/View\";", - "jsDocTags": {}, - "reactDocgen": { - "description": "", - "methods": [], - "displayName": "Stepper", - "definedInFile": "/Users/jeppe/dev/temp/reshaped/src/components/Stepper/Stepper.tsx", - "actualName": "Stepper", - "exportName": "default" - } - }, - "components-switch": { - "id": "components-switch", - "name": "Switch", - "path": "./src/components/Switch/tests/Switch.stories.tsx", - "stories": [ - { - "name": "size", - "snippet": "const size = () => (\n\t\n\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\n\t\n);" - }, - { - "name": "label", - "snippet": "const label = () => (\n\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\tWi-fi\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\tWi-fi\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\tWi-fi\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\tWi-fi\n\t\t\t\t\n\t\t\t\n\t\t\n\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\tWi-fi\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\tWi-fi\n\t\t\t\t\n\t\t\t\n\t\t\n\t\n);" - }, - { - "name": "defaultChecked", - "snippet": "const defaultChecked = () => Label\n ;" - }, - { - "name": "checked", - "snippet": "const checked = () => Label\n ;" - }, - { - "name": "disabled", - "snippet": "const disabled = () => (\n \n \n \n \n \n \n \n \n \n Switch\n \n \n \n);" - }, - { - "name": "className", - "snippet": "const className = () => (\n
\n \n Label\n \n
\n);" - } - ], - "import": "import { Example } from \"utilities/storybook\";\nimport Switch from \"components/Switch\";\nimport View from \"components/View\";", - "jsDocTags": {}, - "reactDocgen": { - "description": "", - "methods": [], - "displayName": "Switch", - "definedInFile": "/Users/jeppe/dev/temp/reshaped/src/components/Switch/Switch.tsx", - "actualName": "Switch", - "exportName": "default" - } - }, - "components-table": { - "id": "components-table", - "name": "Table", - "path": "./src/components/Table/tests/Table.stories.tsx", - "stories": [ - { - "name": "layout", - "snippet": "const layout = () => (\n \n \n \n \n \n Column 1\n Column 2\n \n \n \n \n Cell 1\n Cell 2\n \n \n
\n
\n \n \n \n Column 1\n Column 2\n \n \n Cell 1\n Cell 2\n Cell 3\n \n \n Cell 1\n Cell 2\n \n
\n
\n \n \n \n Column 1\n Column 2\n \n \n Cell 1\n Cell 2\n \n
\n
\n \n \n \n Column 1\n Column 2\n Column 2\n \n \n \n \n \n Cell 2\n Cell 3\n \n
\n
\n \n \n \n \n Column 1\n \n Column 2\n \n \n Cell 1\n Cell 2\n \n
\n
\n
\n);" - }, - { - "name": "border", - "snippet": "const border = () => (\n \n \n \n \n Column 1\n Column 2\n \n \n Cell 1\n Cell 2\n \n
\n
\n \n \n \n Column 1\n Column 2\n \n \n Cell 1\n Cell 2\n \n
\n
\n \n \n \n Column 1\n Column 2\n \n \n Cell 1\n Cell 2\n \n
\n
\n
\n);" - }, - { - "name": "rows", - "snippet": "const rows = () => (\n \n \n \n \n Column 1\n Column 2\n \n \n Cell 1\n Cell 2\n \n
\n
\n \n \n \n Column 1\n Column 2\n \n {}}>\n Cell 1\n Cell 2\n \n
\n
\n
\n);" - }, - { - "name": "render", - "snippet": "const render = () => (\n \n \n \n Heading\n Heading\n \n \n \n \n Content\n Content\n \n \n
\n);" - }, - { - "name": "tbody", - "snippet": "const tbody = () => (\n \n \n Heading\n Heading\n \n
\n);" - }, - { - "name": "tabIndex", - "snippet": "const tabIndex = () => (\n \n \n \n \n {}}>\n \n \n {} }}>\n \n \n
\n);" - }, - { - "name": "className", - "snippet": "const className = () => (\n
\n \n \n \n \n
\n
\n);" - }, - { - "name": "edgeCases", - "snippet": "const edgeCases = () => (\n \n \n \n \n Column 1\n Column 2\n \n \n Cell 1\n Cell 2\n \n
\n
\n \n \n \n \n \n Column 1\n \n \n Column 2\n \n \n \n Cell 1\n Cell 2\n Cell 3\n \n \n Cell 1\n Cell 2\n Cell 3\n \n
\n
\n
\n \n \n \n Column 1\n Column 2\n Column 3\n Long heading title\n \n \n Cell 1\n Cell 2\n Cell 3\n Cell 4\n \n
\n
\n
\n);" - }, - { - "name": "examples", - "snippet": "const examples = () => (\n \n \n \n \n \n);" - } - ], - "import": "import Card from \"components/Card\";\nimport Checkbox from \"components/Checkbox\";\nimport { Example } from \"utilities/storybook\";\nimport Table from \"components/Table\";\nimport View from \"components/View\";", - "jsDocTags": {}, - "reactDocgen": { - "description": "", - "methods": [], - "displayName": "Table", - "definedInFile": "/Users/jeppe/dev/temp/reshaped/src/components/Table/Table.tsx", - "actualName": "Table", - "exportName": "default" - } - }, - "components-tabs": { - "id": "components-tabs", - "name": "Tabs", - "path": "./src/components/Tabs/tests/Tabs.stories.tsx", - "stories": [ - { - "name": "base", - "snippet": "const base = () => (\n \n \n Item 1\n Item 2\n \n\n \n Content 1\n \n \n Content 2\n \n \n);" - }, - { - "name": "variant", - "snippet": "const variant = () => (\n \n \n \n \n Long item 2\n Item 1\n Very long item 3\n \n \n \n\n \n \n \n Item 1\n Long item 2\n Very long item 3\n \n \n \n\n \n \n \n Item 1\n Long item 2\n Very long item 3\n \n \n \n\n \n \n \n Item 1\n Long item 2\n Very long item 3\n \n \n \n \n);" - }, - { - "name": "size", - "snippet": "const size = () => (\n \n \n \n \n Item 1\n Long item 2\n Very long item 3\n \n \n \n\n \n \n \n Item 1\n Long item 2\n Very long item 3\n \n \n \n\n \n \n \n Item 1\n Long item 2\n Very long item 3\n \n \n \n\n \n \n \n Item 1\n Long item 2\n Very long item 3\n \n \n \n \n);" - }, - { - "name": "direction", - "snippet": "const direction = () => (\n \n \n \n \n Item 1\n Long item 2\n Very long item 3\n \n \n \n \n \n \n Item 1\n Long item 2\n Very long item 3\n \n \n \n \n \n \n Item 1\n Long item 2\n Very long item 3\n \n \n \n \n \n \n Item 1\n Long item 2\n Very long item 3\n \n \n \n \n);" - }, - { - "name": "icon", - "snippet": "const icon = () => (\n \n \n \n \n \n Item 1\n \n \n Long item 2\n \n \n \n \n \n \n \n \n \n \n \n \n \n);" - }, - { - "name": "equalWidth", - "snippet": "const equalWidth = () => (\n \n \n \n \n \n Item 1\n \n \n Long item 2\n \n \n Very long item 3\n \n \n \n \n \n);" - }, - { - "name": "href", - "snippet": "const href = () => (\n \n \n \n \n \n Item 1\n \n \n Long item 2\n \n \n Very long item 3\n \n \n \n \n \n);" - }, - { - "name": "disabled", - "snippet": "const disabled = () => {\n return (\n \n \n \n \n Item 1\n \n Item 2\n \n Item 3\n \n\n \n Content 1\n \n \n Content 2\n \n \n Content 3\n \n \n \n\n \n \n \n \n Item 1\n \n \n Item 2\n \n \n Item 3\n \n \n\n \n Content 1\n \n \n Content 2\n \n \n Content 3\n \n \n \n \n );\n};" - }, - { - "name": "defaultValue", - "snippet": "const defaultValue = () => \n \n Item 1\n Item 2\n \n Content 1\n Content 2\n;" - }, - { - "name": "value", - "snippet": "const value = () => \n \n Item 1\n Item 2\n \n Content 1\n Content 2\n;" - }, - { - "name": "className", - "snippet": "const className = () => (\n
\n \n \n \n Item\n \n \n\n \n \n
\n);" - }, - { - "name": "testFocusableContent", - "snippet": "const testFocusableContent = () => (\n \n \n \n \n \n Item 1\n Long item 2\n Very long item 3\n \n\n Tab 1\n Tab 2\n Tab 3\n \n \n \n\n \n \n \n \n Item 1\n Long item 2\n Very long item 3\n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n);" - }, - { - "name": "testComposition", - "snippet": "const testComposition = () => (\n \n \n \n \n {[...Array(8)].map((_, i) => (\n \n Very long item {i}\n \n ))}\n \n\n {[...Array(8)].map((_, i) => (\n \n Tab {i}\n \n ))}\n \n \n \n \n \n Item 1\n Long item 2\n \n \n Item 3\n \n \n \n \n \n \n \n \n Item 1\n \n Long item 2\n Very long item 3\n \n \n \n \n);" - }, - { - "name": "testEdgeCaseDom", - "snippet": "const testEdgeCaseDom = () => {\n const [activeItem, setActiveItem] = React.useState(\"1\");\n const sectionsRef = React.useRef(null);\n\n return (\n \n \n \n \n setActiveItem(args.value)}>\n \n Item 1\n Item 2\n Item 3\n Item 4\n \n \n\n {\n setActiveItem(Math.min(4, Math.floor(args.y * 10) + 1).toString());\n }}\n >\n \n \n Section 1\n\n \n {[...Array(4)].map((_, i) => (\n \n ))}\n \n \n\n \n Section 2\n\n \n {[...Array(4)].map((_, i) => (\n \n ))}\n \n \n\n \n Section 3\n\n \n {[...Array(4)].map((_, i) => (\n \n ))}\n \n \n\n \n Section 4\n\n \n {[...Array(4)].map((_, i) => (\n \n ))}\n \n \n \n \n \n \n \n \n );\n};" - } - ], - "import": "import Button from \"components/Button\";\nimport { Example } from \"utilities/storybook\";\nimport ScrollArea from \"components/ScrollArea\";\nimport Tabs from \"components/Tabs\";\nimport Text from \"components/Text\";\nimport View from \"components/View\";", - "jsDocTags": {}, - "reactDocgen": { - "description": "", - "methods": [], - "displayName": "Tabs", - "definedInFile": "/Users/jeppe/dev/temp/reshaped/src/components/Tabs/Tabs.tsx", - "actualName": "Tabs", - "exportName": "default" - } - }, - "components-textarea": { - "id": "components-textarea", - "name": "TextArea", - "path": "./src/components/TextArea/tests/TextArea.stories.tsx", - "stories": [ - { - "name": "variants", - "snippet": "const variants = () => (\n \n \n