@usefragments/ui 1.0.2 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -16
- package/dist/assets/fragments-wordmark.cjs +30 -0
- package/dist/assets/fragments-wordmark.d.ts +13 -0
- package/dist/assets/fragments-wordmark.d.ts.map +1 -0
- package/dist/assets/fragments-wordmark.js +30 -0
- package/dist/assets/ui.css +3234 -3116
- package/dist/components/Accordion/Accordion.module.scss.cjs +8 -8
- package/dist/components/Accordion/Accordion.module.scss.js +8 -8
- package/dist/components/Accordion/index.cjs +22 -10
- package/dist/components/Accordion/index.d.ts.map +1 -1
- package/dist/components/Accordion/index.js +22 -10
- package/dist/components/Alert/Alert.module.scss.cjs +13 -13
- package/dist/components/Alert/Alert.module.scss.js +13 -13
- package/dist/components/AppShell/AppShell.module.scss.cjs +22 -10
- package/dist/components/AppShell/AppShell.module.scss.js +22 -10
- package/dist/components/AppShell/index.cjs +1 -1
- package/dist/components/AppShell/index.js +1 -1
- package/dist/components/Avatar/Avatar.module.scss.cjs +13 -13
- package/dist/components/Avatar/Avatar.module.scss.js +13 -13
- package/dist/components/Badge/Badge.module.scss.cjs +16 -16
- package/dist/components/Badge/Badge.module.scss.js +16 -16
- package/dist/components/BentoGrid/BentoGrid.module.scss.cjs +14 -14
- package/dist/components/BentoGrid/BentoGrid.module.scss.js +14 -14
- package/dist/components/Box/Box.module.scss.cjs +152 -152
- package/dist/components/Box/Box.module.scss.js +152 -152
- package/dist/components/Breadcrumbs/Breadcrumbs.module.scss.cjs +8 -8
- package/dist/components/Breadcrumbs/Breadcrumbs.module.scss.js +8 -8
- package/dist/components/Button/Button.module.scss.cjs +13 -13
- package/dist/components/Button/Button.module.scss.js +13 -13
- package/dist/components/Card/Card.module.scss.cjs +17 -17
- package/dist/components/Card/Card.module.scss.js +17 -17
- package/dist/components/Card/index.d.ts +3 -3
- package/dist/components/Card/index.d.ts.map +1 -1
- package/dist/components/Chart/Chart.module.scss.cjs +15 -15
- package/dist/components/Chart/Chart.module.scss.js +15 -15
- package/dist/components/Checkbox/Checkbox.module.scss.cjs +11 -11
- package/dist/components/Checkbox/Checkbox.module.scss.js +11 -11
- package/dist/components/Chip/Chip.module.scss.cjs +15 -15
- package/dist/components/Chip/Chip.module.scss.js +15 -15
- package/dist/components/CodeBlock/CodeBlock.module.scss.cjs +21 -21
- package/dist/components/CodeBlock/CodeBlock.module.scss.js +21 -21
- package/dist/components/Collapsible/Collapsible.module.scss.cjs +10 -10
- package/dist/components/Collapsible/Collapsible.module.scss.js +10 -10
- package/dist/components/ColorPicker/ColorPicker.module.scss.cjs +14 -14
- package/dist/components/ColorPicker/ColorPicker.module.scss.js +14 -14
- package/dist/components/Combobox/Combobox.module.scss.cjs +23 -23
- package/dist/components/Combobox/Combobox.module.scss.js +23 -23
- package/dist/components/Combobox/index.cjs +106 -9
- package/dist/components/Combobox/index.d.ts.map +1 -1
- package/dist/components/Combobox/index.js +106 -9
- package/dist/components/Command/Command.module.scss.cjs +11 -11
- package/dist/components/Command/Command.module.scss.js +11 -11
- package/dist/components/ConversationList/ConversationList.module.scss.cjs +10 -10
- package/dist/components/ConversationList/ConversationList.module.scss.js +10 -10
- package/dist/components/DataTable/DataTable.module.scss.cjs +37 -34
- package/dist/components/DataTable/DataTable.module.scss.js +37 -34
- package/dist/components/DataTable/index.d.ts +3 -1
- package/dist/components/DataTable/index.d.ts.map +1 -1
- package/dist/components/DatePicker/DatePicker.module.scss.cjs +33 -33
- package/dist/components/DatePicker/DatePicker.module.scss.js +33 -33
- package/dist/components/DatePicker/index.d.ts +1 -1
- package/dist/components/DatePicker/index.d.ts.map +1 -1
- package/dist/components/Dialog/Dialog.module.scss.cjs +14 -14
- package/dist/components/Dialog/Dialog.module.scss.js +14 -14
- package/dist/components/Drawer/Drawer.module.scss.cjs +28 -28
- package/dist/components/Drawer/Drawer.module.scss.js +28 -28
- package/dist/components/Drawer/index.cjs +20 -3
- package/dist/components/Drawer/index.d.ts.map +1 -1
- package/dist/components/Drawer/index.js +20 -3
- package/dist/components/Editor/Editor.module.scss.cjs +17 -17
- package/dist/components/Editor/Editor.module.scss.js +17 -17
- package/dist/components/EmptyState/EmptyState.module.scss.cjs +8 -8
- package/dist/components/EmptyState/EmptyState.module.scss.js +8 -8
- package/dist/components/Field/Field.module.scss.cjs +4 -4
- package/dist/components/Field/Field.module.scss.js +4 -4
- package/dist/components/Field/index.cjs +10 -9
- package/dist/components/Field/index.d.ts +7 -7
- package/dist/components/Field/index.d.ts.map +1 -1
- package/dist/components/Field/index.js +10 -9
- package/dist/components/Fieldset/Fieldset.module.scss.cjs +3 -3
- package/dist/components/Fieldset/Fieldset.module.scss.js +3 -3
- package/dist/components/Header/Header.module.scss.cjs +44 -29
- package/dist/components/Header/Header.module.scss.js +44 -29
- package/dist/components/Header/index.cjs +56 -3
- package/dist/components/Header/index.d.ts +25 -3
- package/dist/components/Header/index.d.ts.map +1 -1
- package/dist/components/Header/index.js +56 -3
- package/dist/components/Icon/Icon.module.scss.cjs +8 -8
- package/dist/components/Icon/Icon.module.scss.js +8 -8
- package/dist/components/IconButton/IconButton.module.scss.cjs +8 -8
- package/dist/components/IconButton/IconButton.module.scss.js +8 -8
- package/dist/components/Image/Image.module.scss.cjs +27 -27
- package/dist/components/Image/Image.module.scss.js +27 -27
- package/dist/components/Input/Input.module.scss.cjs +19 -19
- package/dist/components/Input/Input.module.scss.js +19 -19
- package/dist/components/Link/Link.module.scss.cjs +10 -10
- package/dist/components/Link/Link.module.scss.js +10 -10
- package/dist/components/List/List.module.scss.cjs +19 -19
- package/dist/components/List/List.module.scss.js +19 -19
- package/dist/components/Listbox/Listbox.module.scss.cjs +8 -8
- package/dist/components/Listbox/Listbox.module.scss.js +8 -8
- package/dist/components/Loading/Loading.module.scss.cjs +30 -30
- package/dist/components/Loading/Loading.module.scss.js +30 -30
- package/dist/components/Main/Main.module.scss.cjs +26 -0
- package/dist/components/Main/Main.module.scss.js +26 -0
- package/dist/components/Main/index.cjs +128 -0
- package/dist/components/Main/index.d.ts +22 -0
- package/dist/components/Main/index.d.ts.map +1 -0
- package/dist/components/Main/index.js +111 -0
- package/dist/components/Markdown/Markdown.module.scss.cjs +1 -1
- package/dist/components/Markdown/Markdown.module.scss.js +1 -1
- package/dist/components/Menu/Menu.module.scss.cjs +14 -14
- package/dist/components/Menu/Menu.module.scss.js +14 -14
- package/dist/components/Message/Message.module.scss.cjs +18 -18
- package/dist/components/Message/Message.module.scss.js +18 -18
- package/dist/components/NavigationMenu/NavigationMenu.module.scss.cjs +28 -28
- package/dist/components/NavigationMenu/NavigationMenu.module.scss.js +28 -28
- package/dist/components/Pagination/Pagination.module.scss.cjs +7 -7
- package/dist/components/Pagination/Pagination.module.scss.js +7 -7
- package/dist/components/Popover/Popover.module.scss.cjs +10 -10
- package/dist/components/Popover/Popover.module.scss.js +10 -10
- package/dist/components/Popover/index.cjs +27 -2
- package/dist/components/Popover/index.d.ts.map +1 -1
- package/dist/components/Popover/index.js +27 -2
- package/dist/components/Progress/Progress.module.scss.cjs +25 -25
- package/dist/components/Progress/Progress.module.scss.js +25 -25
- package/dist/components/Prompt/Prompt.module.scss.cjs +18 -18
- package/dist/components/Prompt/Prompt.module.scss.js +18 -18
- package/dist/components/RadioGroup/RadioGroup.module.scss.cjs +17 -17
- package/dist/components/RadioGroup/RadioGroup.module.scss.js +17 -17
- package/dist/components/RadioGroup/index.cjs +2 -0
- package/dist/components/RadioGroup/index.d.ts +2 -0
- package/dist/components/RadioGroup/index.d.ts.map +1 -1
- package/dist/components/RadioGroup/index.js +2 -0
- package/dist/components/ScrollArea/ScrollArea.module.scss.cjs +10 -10
- package/dist/components/ScrollArea/ScrollArea.module.scss.js +10 -10
- package/dist/components/Select/Select.module.scss.cjs +17 -17
- package/dist/components/Select/Select.module.scss.js +17 -17
- package/dist/components/Separator/Separator.module.scss.cjs +10 -10
- package/dist/components/Separator/Separator.module.scss.js +10 -10
- package/dist/components/Sidebar/Sidebar.module.scss.cjs +42 -42
- package/dist/components/Sidebar/Sidebar.module.scss.js +42 -42
- package/dist/components/Skeleton/Skeleton.module.scss.cjs +38 -38
- package/dist/components/Skeleton/Skeleton.module.scss.js +38 -38
- package/dist/components/Slider/Slider.module.scss.cjs +12 -12
- package/dist/components/Slider/Slider.module.scss.js +12 -12
- package/dist/components/Table/Table.module.scss.cjs +19 -19
- package/dist/components/Table/Table.module.scss.js +19 -19
- package/dist/components/TableOfContents/TableOfContents.module.scss.cjs +15 -15
- package/dist/components/TableOfContents/TableOfContents.module.scss.js +15 -15
- package/dist/components/TableOfContents/index.cjs +22 -42
- package/dist/components/TableOfContents/index.d.ts +3 -3
- package/dist/components/TableOfContents/index.d.ts.map +1 -1
- package/dist/components/TableOfContents/index.js +22 -42
- package/dist/components/Tabs/Tabs.module.scss.cjs +12 -12
- package/dist/components/Tabs/Tabs.module.scss.js +12 -12
- package/dist/components/Text/Text.module.scss.cjs +51 -51
- package/dist/components/Text/Text.module.scss.js +51 -51
- package/dist/components/Textarea/Textarea.module.scss.cjs +23 -23
- package/dist/components/Textarea/Textarea.module.scss.js +23 -23
- package/dist/components/Theme/ThemeToggle.module.scss.cjs +6 -6
- package/dist/components/Theme/ThemeToggle.module.scss.js +6 -6
- package/dist/components/ThinkingIndicator/ThinkingIndicator.module.scss.cjs +13 -13
- package/dist/components/ThinkingIndicator/ThinkingIndicator.module.scss.js +13 -13
- package/dist/components/Toast/Toast.module.scss.cjs +21 -21
- package/dist/components/Toast/Toast.module.scss.js +21 -21
- package/dist/components/Toggle/Toggle.module.scss.cjs +13 -13
- package/dist/components/Toggle/Toggle.module.scss.js +13 -13
- package/dist/components/ToggleGroup/ToggleGroup.module.scss.cjs +17 -17
- package/dist/components/ToggleGroup/ToggleGroup.module.scss.js +17 -17
- package/dist/components/Tooltip/Tooltip.module.scss.cjs +3 -3
- package/dist/components/Tooltip/Tooltip.module.scss.js +3 -3
- package/dist/data-table.cjs +58 -41
- package/dist/data-table.js +59 -41
- package/dist/datepicker.cjs +32 -72
- package/dist/datepicker.js +32 -72
- package/dist/index.cjs +89 -85
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/fragments.json +1 -1
- package/package.json +9 -8
- package/src/assets/fragments-wordmark.tsx +47 -0
- package/src/components/Accordion/index.tsx +13 -3
- package/src/components/Alert/Alert.module.scss +15 -2
- package/src/components/AppShell/AppShell.module.scss +73 -15
- package/src/components/AppShell/index.tsx +1 -1
- package/src/components/Button/Button.module.scss +19 -20
- package/src/components/Card/Card.module.scss +3 -3
- package/src/components/Card/index.tsx +3 -3
- package/src/components/Checkbox/Checkbox.contract.json +5 -24
- package/src/components/Checkbox/Checkbox.module.scss +4 -2
- package/src/components/Chip/Chip.contract.json +11 -28
- package/src/components/Chip/Chip.module.scss +21 -45
- package/src/components/CodeBlock/CodeBlock.module.scss +2 -7
- package/src/components/Combobox/Combobox.contract.json +6 -24
- package/src/components/Combobox/Combobox.module.scss +3 -2
- package/src/components/Combobox/index.tsx +132 -6
- package/src/components/DataTable/DataTable.contract.json +16 -23
- package/src/components/DataTable/DataTable.module.scss +31 -8
- package/src/components/DataTable/index.tsx +25 -4
- package/src/components/DatePicker/index.tsx +32 -84
- package/src/components/Drawer/index.tsx +38 -12
- package/src/components/Field/index.tsx +35 -35
- package/src/components/Header/Header.contract.json +41 -1
- package/src/components/Header/Header.module.scss +40 -0
- package/src/components/Header/index.tsx +88 -2
- package/src/components/IconButton/IconButton.contract.json +120 -0
- package/src/components/Listbox/Listbox.module.scss +5 -4
- package/src/components/Main/Main.contract.json +79 -0
- package/src/components/Main/Main.module.scss +31 -0
- package/src/components/Main/index.tsx +124 -0
- package/src/components/Menu/Menu.module.scss +8 -10
- package/src/components/Popover/index.tsx +34 -2
- package/src/components/RadioGroup/RadioGroup.contract.json +13 -27
- package/src/components/RadioGroup/index.tsx +4 -0
- package/src/components/Select/Select.module.scss +13 -12
- package/src/components/Table/Table.module.scss +22 -5
- package/src/components/TableOfContents/TableOfContents.contract.json +6 -16
- package/src/components/TableOfContents/TableOfContents.module.scss +20 -14
- package/src/components/TableOfContents/index.tsx +27 -38
- package/src/components/Toast/Toast.module.scss +15 -2
- package/src/components/ToggleGroup/ToggleGroup.module.scss +4 -1
- package/src/index.ts +4 -0
- package/src/styles/globals.scss +13 -10
- package/src/tokens/_component-properties.scss +26 -0
- package/src/tokens/_computed.scss +22 -4
- package/src/tokens/_derive.scss +55 -6
- package/src/tokens/_palettes.scss +24 -0
- package/src/tokens/_seeds.scss +20 -12
- package/src/tokens/_variables.scss +110 -63
- package/dist/components/Cloud/DashboardLayoutPrototypes.shared.d.ts +0 -33
- package/dist/components/Cloud/DashboardLayoutPrototypes.shared.d.ts.map +0 -1
- package/dist/components/Cloud/DashboardLayoutPrototypes.shell.d.ts +0 -11
- package/dist/components/Cloud/DashboardLayoutPrototypes.shell.d.ts.map +0 -1
- package/dist/components/Cloud/PullRequestsPrototypes.content.d.ts +0 -5
- package/dist/components/Cloud/PullRequestsPrototypes.content.d.ts.map +0 -1
- package/dist/components/Cloud/PullRequestsPrototypes.detail-panels.d.ts +0 -4
- package/dist/components/Cloud/PullRequestsPrototypes.detail-panels.d.ts.map +0 -1
- package/dist/components/Cloud/PullRequestsPrototypes.detail.d.ts +0 -3
- package/dist/components/Cloud/PullRequestsPrototypes.detail.d.ts.map +0 -1
- package/dist/components/Cloud/PullRequestsPrototypes.id-data.d.ts +0 -86
- package/dist/components/Cloud/PullRequestsPrototypes.id-data.d.ts.map +0 -1
- package/dist/components/Cloud/PullRequestsPrototypes.id-page.d.ts +0 -2
- package/dist/components/Cloud/PullRequestsPrototypes.id-page.d.ts.map +0 -1
- package/src/components/Accordion/Accordion.stories.tsx +0 -106
- package/src/components/Alert/Alert.stories.tsx +0 -119
- package/src/components/AppShell/AppShell.stories.tsx +0 -156
- package/src/components/Avatar/Avatar.stories.tsx +0 -74
- package/src/components/Badge/Badge.stories.tsx +0 -92
- package/src/components/BentoGrid/BentoGrid.stories.tsx +0 -98
- package/src/components/Box/Box.stories.tsx +0 -150
- package/src/components/Breadcrumbs/Breadcrumbs.stories.tsx +0 -87
- package/src/components/Button/Button.stories.tsx +0 -103
- package/src/components/ButtonGroup/ButtonGroup.stories.tsx +0 -97
- package/src/components/Card/Card.stories.tsx +0 -144
- package/src/components/Chart/Chart.stories.tsx +0 -119
- package/src/components/Checkbox/Checkbox.stories.tsx +0 -68
- package/src/components/Chip/Chip.stories.tsx +0 -70
- package/src/components/Cloud/CloudGovernanceShell.module.scss +0 -88
- package/src/components/Cloud/CloudGovernanceShell.stories.tsx +0 -446
- package/src/components/Cloud/ControlSizing.module.scss +0 -49
- package/src/components/Cloud/ControlSizing.stories.tsx +0 -238
- package/src/components/Cloud/DashboardLayoutPrototypes.module.scss +0 -462
- package/src/components/Cloud/DashboardLayoutPrototypes.shared.tsx +0 -375
- package/src/components/Cloud/DashboardLayoutPrototypes.shell.tsx +0 -147
- package/src/components/Cloud/DashboardLayoutPrototypes.stories.tsx +0 -328
- package/src/components/Cloud/PullRequestsPrototypes.content.tsx +0 -283
- package/src/components/Cloud/PullRequestsPrototypes.detail-panels.tsx +0 -381
- package/src/components/Cloud/PullRequestsPrototypes.detail.tsx +0 -204
- package/src/components/Cloud/PullRequestsPrototypes.id-data.ts +0 -395
- package/src/components/Cloud/PullRequestsPrototypes.id-page.tsx +0 -349
- package/src/components/Cloud/PullRequestsPrototypes.stories.tsx +0 -81
- package/src/components/CodeBlock/CodeBlock.stories.tsx +0 -147
- package/src/components/Collapsible/Collapsible.stories.tsx +0 -94
- package/src/components/ColorPicker/ColorPicker.stories.tsx +0 -74
- package/src/components/Combobox/Combobox.stories.tsx +0 -133
- package/src/components/Command/Command.stories.tsx +0 -102
- package/src/components/ConversationList/ConversationList.stories.tsx +0 -93
- package/src/components/DataTable/DataTable.stories.tsx +0 -129
- package/src/components/DatePicker/DatePicker.stories.tsx +0 -129
- package/src/components/Dialog/Dialog.stories.tsx +0 -154
- package/src/components/Drawer/Drawer.stories.tsx +0 -144
- package/src/components/Editor/Editor.stories.tsx +0 -99
- package/src/components/EmptyState/EmptyState.stories.tsx +0 -97
- package/src/components/Field/Field.stories.tsx +0 -109
- package/src/components/Fieldset/Fieldset.stories.tsx +0 -116
- package/src/components/Form/Form.stories.tsx +0 -142
- package/src/components/Grid/Grid.stories.tsx +0 -125
- package/src/components/Header/Header.stories.tsx +0 -133
- package/src/components/Icon/Icon.stories.tsx +0 -80
- package/src/components/IconButton/IconButton.stories.tsx +0 -78
- package/src/components/Image/Image.stories.tsx +0 -109
- package/src/components/Input/Input.stories.tsx +0 -104
- package/src/components/Link/Link.stories.tsx +0 -67
- package/src/components/List/List.stories.tsx +0 -95
- package/src/components/Listbox/Listbox.stories.tsx +0 -81
- package/src/components/Loading/Loading.stories.tsx +0 -69
- package/src/components/Markdown/Markdown.stories.tsx +0 -75
- package/src/components/Menu/Menu.stories.tsx +0 -113
- package/src/components/Message/Message.stories.tsx +0 -85
- package/src/components/NavigationMenu/NavigationMenu.stories.tsx +0 -161
- package/src/components/Pagination/Pagination.stories.tsx +0 -81
- package/src/components/Popover/Popover.stories.tsx +0 -152
- package/src/components/Progress/Progress.stories.tsx +0 -64
- package/src/components/Prompt/Prompt.stories.tsx +0 -93
- package/src/components/RadioGroup/RadioGroup.stories.tsx +0 -107
- package/src/components/ScrollArea/ScrollArea.stories.tsx +0 -97
- package/src/components/Select/Select.stories.tsx +0 -127
- package/src/components/Separator/Separator.stories.tsx +0 -84
- package/src/components/Sidebar/Sidebar.stories.tsx +0 -122
- package/src/components/Skeleton/Skeleton.stories.tsx +0 -80
- package/src/components/Slider/Slider.stories.tsx +0 -73
- package/src/components/Stack/Stack.stories.tsx +0 -73
- package/src/components/Switch/Switch.stories.tsx +0 -59
- package/src/components/Table/Table.stories.tsx +0 -219
- package/src/components/TableOfContents/TableOfContents.stories.tsx +0 -120
- package/src/components/Tabs/Tabs.stories.tsx +0 -136
- package/src/components/Text/Text.stories.tsx +0 -133
- package/src/components/Textarea/Textarea.stories.tsx +0 -107
- package/src/components/Theme/Theme.stories.tsx +0 -95
- package/src/components/ThinkingIndicator/ThinkingIndicator.stories.tsx +0 -85
- package/src/components/Toast/Toast.stories.tsx +0 -91
- package/src/components/ToggleGroup/ToggleGroup.stories.tsx +0 -114
- package/src/components/Tooltip/Tooltip.stories.tsx +0 -95
- package/src/components/VisuallyHidden/VisuallyHidden.stories.tsx +0 -78
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { Image } from '.';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Image is a responsive image component with aspect-ratio control, loading
|
|
6
|
-
* states, and error fallbacks. The src and alt props are required; alt must
|
|
7
|
-
* describe the image content for accessibility.
|
|
8
|
-
*/
|
|
9
|
-
const SAMPLE_SRC =
|
|
10
|
-
'https://images.unsplash.com/photo-1555066931-4365d14bab8c?w=400&h=300&fit=crop';
|
|
11
|
-
|
|
12
|
-
const meta = {
|
|
13
|
-
title: 'Display/Image',
|
|
14
|
-
component: Image,
|
|
15
|
-
tags: ['autodocs', 'canonical'],
|
|
16
|
-
parameters: {
|
|
17
|
-
docs: {
|
|
18
|
-
description: {
|
|
19
|
-
component:
|
|
20
|
-
'Responsive image with aspect-ratio control, loading states, and error fallbacks.',
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
argTypes: {
|
|
25
|
-
aspectRatio: {
|
|
26
|
-
control: 'select',
|
|
27
|
-
options: ['1:1', '4:3', '16:9', '21:9', 'auto'],
|
|
28
|
-
description: 'Aspect ratio of the image container',
|
|
29
|
-
},
|
|
30
|
-
objectFit: {
|
|
31
|
-
control: 'select',
|
|
32
|
-
options: ['cover', 'contain', 'fill', 'none'],
|
|
33
|
-
description: 'How the image fits within its container',
|
|
34
|
-
},
|
|
35
|
-
rounded: {
|
|
36
|
-
control: 'select',
|
|
37
|
-
options: ['none', 'sm', 'md', 'lg', 'full'],
|
|
38
|
-
description: 'Border radius',
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
args: {
|
|
42
|
-
src: SAMPLE_SRC,
|
|
43
|
-
alt: 'Code on a screen',
|
|
44
|
-
width: 300,
|
|
45
|
-
},
|
|
46
|
-
} satisfies Meta<typeof Image>;
|
|
47
|
-
|
|
48
|
-
export default meta;
|
|
49
|
-
|
|
50
|
-
type Story = StoryObj<typeof meta>;
|
|
51
|
-
|
|
52
|
-
export const Default: Story = {
|
|
53
|
-
args: { src: SAMPLE_SRC, alt: 'Code on a screen', width: 300 },
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
export const Square: Story = {
|
|
57
|
-
args: {
|
|
58
|
-
src: SAMPLE_SRC,
|
|
59
|
-
alt: 'Square crop',
|
|
60
|
-
aspectRatio: '1:1',
|
|
61
|
-
width: 200,
|
|
62
|
-
},
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
export const Widescreen: Story = {
|
|
66
|
-
args: {
|
|
67
|
-
src: SAMPLE_SRC,
|
|
68
|
-
alt: 'Widescreen crop',
|
|
69
|
-
aspectRatio: '16:9',
|
|
70
|
-
width: 320,
|
|
71
|
-
rounded: 'md',
|
|
72
|
-
},
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
export const Rounded: Story = {
|
|
76
|
-
args: {
|
|
77
|
-
src: SAMPLE_SRC,
|
|
78
|
-
alt: 'Rounded image',
|
|
79
|
-
aspectRatio: '1:1',
|
|
80
|
-
rounded: 'full',
|
|
81
|
-
width: 120,
|
|
82
|
-
height: 120,
|
|
83
|
-
},
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
export const WithFallback: Story = {
|
|
87
|
-
args: {
|
|
88
|
-
src: 'https://invalid-url.example/image.jpg',
|
|
89
|
-
alt: 'Image that will fail to load',
|
|
90
|
-
width: 200,
|
|
91
|
-
height: 150,
|
|
92
|
-
rounded: 'md',
|
|
93
|
-
fallback: (
|
|
94
|
-
<div
|
|
95
|
-
style={{
|
|
96
|
-
display: 'flex',
|
|
97
|
-
alignItems: 'center',
|
|
98
|
-
justifyContent: 'center',
|
|
99
|
-
height: '100%',
|
|
100
|
-
background: 'var(--fui-color-surface-secondary, #f4f4f5)',
|
|
101
|
-
}}
|
|
102
|
-
>
|
|
103
|
-
<span style={{ color: 'var(--fui-color-text-tertiary, #71717a)' }}>
|
|
104
|
-
No image
|
|
105
|
-
</span>
|
|
106
|
-
</div>
|
|
107
|
-
),
|
|
108
|
-
},
|
|
109
|
-
};
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
-
import { MagnifyingGlass } from "@phosphor-icons/react";
|
|
3
|
-
import { Input } from ".";
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Single-line text input with built-in label, helper text, and validation states.
|
|
7
|
-
* Supports controlled/uncontrolled values, adornments, and a keyboard shortcut hint.
|
|
8
|
-
*/
|
|
9
|
-
const meta = {
|
|
10
|
-
title: "Forms/Input",
|
|
11
|
-
component: Input,
|
|
12
|
-
tags: ["autodocs", "canonical"],
|
|
13
|
-
parameters: {
|
|
14
|
-
docs: {
|
|
15
|
-
description: {
|
|
16
|
-
component: "Text input field for single-line user data entry.",
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
argTypes: {
|
|
21
|
-
type: {
|
|
22
|
-
control: "select",
|
|
23
|
-
options: ["number", "text", "email", "password", "tel", "url"],
|
|
24
|
-
description: "HTML input type for validation and keyboard",
|
|
25
|
-
},
|
|
26
|
-
size: {
|
|
27
|
-
control: "select",
|
|
28
|
-
options: ["sm", "md", "lg"],
|
|
29
|
-
description: "Size variant",
|
|
30
|
-
},
|
|
31
|
-
shortcutBehavior: {
|
|
32
|
-
control: "select",
|
|
33
|
-
options: ["display-only", "focus-input"],
|
|
34
|
-
description: "Whether the shortcut hint is visual only or registers a hotkey",
|
|
35
|
-
},
|
|
36
|
-
disabled: { control: "boolean" },
|
|
37
|
-
error: { control: "boolean" },
|
|
38
|
-
success: { control: "boolean" },
|
|
39
|
-
required: { control: "boolean" },
|
|
40
|
-
withFieldWrapper: { control: "boolean" },
|
|
41
|
-
},
|
|
42
|
-
args: {
|
|
43
|
-
label: "Name",
|
|
44
|
-
placeholder: "Enter your name",
|
|
45
|
-
type: "text",
|
|
46
|
-
size: "md",
|
|
47
|
-
},
|
|
48
|
-
} satisfies Meta<typeof Input>;
|
|
49
|
-
|
|
50
|
-
export default meta;
|
|
51
|
-
|
|
52
|
-
type Story = StoryObj<typeof meta>;
|
|
53
|
-
|
|
54
|
-
export const Default: Story = {
|
|
55
|
-
args: { label: "Name", placeholder: "Enter your name" },
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
export const Email: Story = {
|
|
59
|
-
args: { label: "Email", type: "email", placeholder: "user@example.com" },
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
export const WithHelper: Story = {
|
|
63
|
-
args: {
|
|
64
|
-
label: "Password",
|
|
65
|
-
type: "password",
|
|
66
|
-
placeholder: "Create a password",
|
|
67
|
-
helperText: "Must be at least 8 characters",
|
|
68
|
-
},
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
export const ErrorState: Story = {
|
|
72
|
-
args: {
|
|
73
|
-
label: "Email",
|
|
74
|
-
type: "email",
|
|
75
|
-
value: "invalid-email",
|
|
76
|
-
error: true,
|
|
77
|
-
helperText: "Please enter a valid email address",
|
|
78
|
-
},
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
export const Disabled: Story = {
|
|
82
|
-
args: { label: "Username", value: "readonly-user", disabled: true },
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
export const Required: Story = {
|
|
86
|
-
args: {
|
|
87
|
-
label: "Email",
|
|
88
|
-
type: "email",
|
|
89
|
-
placeholder: "user@example.com",
|
|
90
|
-
required: true,
|
|
91
|
-
},
|
|
92
|
-
};
|
|
93
|
-
|
|
94
|
-
export const SearchWithShortcut: Story = {
|
|
95
|
-
args: {
|
|
96
|
-
"aria-label": "Search findings",
|
|
97
|
-
placeholder: "Search findings...",
|
|
98
|
-
shortcut: "⌘K",
|
|
99
|
-
shortcutBehavior: "focus-input",
|
|
100
|
-
startAdornment: <MagnifyingGlass aria-hidden="true" />,
|
|
101
|
-
withFieldWrapper: false,
|
|
102
|
-
rootProps: { style: { maxWidth: 420 } },
|
|
103
|
-
},
|
|
104
|
-
};
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { Link } from '.';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Styled anchor element for navigation. Supports internal and external links
|
|
6
|
-
* with consistent visual treatment, variants, and underline behaviors.
|
|
7
|
-
*/
|
|
8
|
-
const meta = {
|
|
9
|
-
title: 'Navigation/Link',
|
|
10
|
-
component: Link,
|
|
11
|
-
tags: ['autodocs', 'canonical'],
|
|
12
|
-
parameters: {
|
|
13
|
-
docs: {
|
|
14
|
-
description: {
|
|
15
|
-
component: 'Styled anchor element for internal and external navigation.',
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
argTypes: {
|
|
20
|
-
variant: {
|
|
21
|
-
control: 'select',
|
|
22
|
-
options: ['default', 'subtle', 'muted'],
|
|
23
|
-
description: 'Visual style variant',
|
|
24
|
-
},
|
|
25
|
-
underline: {
|
|
26
|
-
control: 'select',
|
|
27
|
-
options: ['always', 'hover', 'none'],
|
|
28
|
-
description: 'Underline behavior',
|
|
29
|
-
},
|
|
30
|
-
external: { control: 'boolean' },
|
|
31
|
-
asChild: { control: 'boolean' },
|
|
32
|
-
},
|
|
33
|
-
args: {
|
|
34
|
-
href: '#',
|
|
35
|
-
variant: 'default',
|
|
36
|
-
underline: 'hover',
|
|
37
|
-
children: 'Learn more about our services',
|
|
38
|
-
},
|
|
39
|
-
} satisfies Meta<typeof Link>;
|
|
40
|
-
|
|
41
|
-
export default meta;
|
|
42
|
-
|
|
43
|
-
type Story = StoryObj<typeof meta>;
|
|
44
|
-
|
|
45
|
-
export const Default: Story = {
|
|
46
|
-
args: { href: '#', children: 'Learn more about our services' },
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
export const Subtle: Story = {
|
|
50
|
-
args: { href: '#', variant: 'subtle', children: 'Secondary link' },
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
export const Muted: Story = {
|
|
54
|
-
args: { href: '#', variant: 'muted', children: 'Muted link' },
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
export const AlwaysUnderlined: Story = {
|
|
58
|
-
args: { href: '#', underline: 'always', children: 'Always underlined' },
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
export const External: Story = {
|
|
62
|
-
args: {
|
|
63
|
-
href: 'https://example.com',
|
|
64
|
-
external: true,
|
|
65
|
-
children: 'View documentation',
|
|
66
|
-
},
|
|
67
|
-
};
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { List } from '.';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Compound component for ordered or unordered lists with consistent styling.
|
|
6
|
-
* Compose with `List.Item`. Supports bullet, numbered, icon, and unstyled variants.
|
|
7
|
-
*/
|
|
8
|
-
const meta = {
|
|
9
|
-
title: 'Display/List',
|
|
10
|
-
component: List,
|
|
11
|
-
tags: ['autodocs', 'canonical'],
|
|
12
|
-
parameters: {
|
|
13
|
-
docs: {
|
|
14
|
-
description: {
|
|
15
|
-
component: 'Renders ordered or unordered lists with consistent styling.',
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
argTypes: {
|
|
20
|
-
as: {
|
|
21
|
-
control: 'select',
|
|
22
|
-
options: ['ul', 'ol'],
|
|
23
|
-
description: 'Underlying list element',
|
|
24
|
-
},
|
|
25
|
-
variant: {
|
|
26
|
-
control: 'select',
|
|
27
|
-
options: ['none', 'disc', 'decimal', 'icon'],
|
|
28
|
-
description: 'List style variant',
|
|
29
|
-
},
|
|
30
|
-
gap: {
|
|
31
|
-
control: 'select',
|
|
32
|
-
options: ['none', 'xs', 'sm', 'md', 'lg'],
|
|
33
|
-
description: 'Spacing between items',
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
args: {
|
|
37
|
-
variant: 'disc',
|
|
38
|
-
gap: 'sm',
|
|
39
|
-
children: (
|
|
40
|
-
<>
|
|
41
|
-
<List.Item>First item</List.Item>
|
|
42
|
-
<List.Item>Second item</List.Item>
|
|
43
|
-
<List.Item>Third item</List.Item>
|
|
44
|
-
</>
|
|
45
|
-
),
|
|
46
|
-
},
|
|
47
|
-
} satisfies Meta<typeof List>;
|
|
48
|
-
|
|
49
|
-
export default meta;
|
|
50
|
-
|
|
51
|
-
type Story = StoryObj<typeof meta>;
|
|
52
|
-
|
|
53
|
-
export const Bullet: Story = {
|
|
54
|
-
args: { variant: 'disc' },
|
|
55
|
-
render: (args) => (
|
|
56
|
-
<List {...args}>
|
|
57
|
-
<List.Item>First item</List.Item>
|
|
58
|
-
<List.Item>Second item</List.Item>
|
|
59
|
-
<List.Item>Third item</List.Item>
|
|
60
|
-
</List>
|
|
61
|
-
),
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
export const Numbered: Story = {
|
|
65
|
-
args: { as: 'ol', variant: 'decimal' },
|
|
66
|
-
render: (args) => (
|
|
67
|
-
<List {...args}>
|
|
68
|
-
<List.Item>Create your account</List.Item>
|
|
69
|
-
<List.Item>Configure your settings</List.Item>
|
|
70
|
-
<List.Item>Start building</List.Item>
|
|
71
|
-
</List>
|
|
72
|
-
),
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
export const IconList: Story = {
|
|
76
|
-
args: { variant: 'icon' },
|
|
77
|
-
render: (args) => (
|
|
78
|
-
<List {...args}>
|
|
79
|
-
<List.Item icon={<span aria-hidden>✓</span>}>Unlimited projects</List.Item>
|
|
80
|
-
<List.Item icon={<span aria-hidden>✓</span>}>Priority support</List.Item>
|
|
81
|
-
<List.Item icon={<span aria-hidden>✓</span>}>Advanced analytics</List.Item>
|
|
82
|
-
</List>
|
|
83
|
-
),
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
export const Unstyled: Story = {
|
|
87
|
-
args: { variant: 'none', gap: 'md' },
|
|
88
|
-
render: (args) => (
|
|
89
|
-
<List {...args}>
|
|
90
|
-
<List.Item>Dashboard</List.Item>
|
|
91
|
-
<List.Item>Settings</List.Item>
|
|
92
|
-
<List.Item>Profile</List.Item>
|
|
93
|
-
</List>
|
|
94
|
-
),
|
|
95
|
-
};
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { Listbox } from '.';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Controlled listbox for search results, autocomplete dropdowns, and command menus.
|
|
6
|
-
* Compose with `Listbox.Item`, `Listbox.Group`, and `Listbox.Empty`; provides
|
|
7
|
-
* arrow/home/end keyboard navigation when focused.
|
|
8
|
-
*/
|
|
9
|
-
const meta = {
|
|
10
|
-
title: 'Forms/Listbox',
|
|
11
|
-
component: Listbox,
|
|
12
|
-
tags: ['autodocs'],
|
|
13
|
-
parameters: {
|
|
14
|
-
docs: {
|
|
15
|
-
description: {
|
|
16
|
-
component:
|
|
17
|
-
'Controlled option list for search results, autocomplete, and command menus.',
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
args: {
|
|
22
|
-
'aria-label': 'Options',
|
|
23
|
-
children: (
|
|
24
|
-
<>
|
|
25
|
-
<Listbox.Item selected>First option</Listbox.Item>
|
|
26
|
-
<Listbox.Item>Second option</Listbox.Item>
|
|
27
|
-
<Listbox.Item>Third option</Listbox.Item>
|
|
28
|
-
</>
|
|
29
|
-
),
|
|
30
|
-
},
|
|
31
|
-
} satisfies Meta<typeof Listbox>;
|
|
32
|
-
|
|
33
|
-
export default meta;
|
|
34
|
-
|
|
35
|
-
type Story = StoryObj<typeof meta>;
|
|
36
|
-
|
|
37
|
-
export const Default: Story = {
|
|
38
|
-
render: (args) => (
|
|
39
|
-
<Listbox {...args}>
|
|
40
|
-
<Listbox.Item selected>First option</Listbox.Item>
|
|
41
|
-
<Listbox.Item>Second option</Listbox.Item>
|
|
42
|
-
<Listbox.Item>Third option</Listbox.Item>
|
|
43
|
-
</Listbox>
|
|
44
|
-
),
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
export const WithGroups: Story = {
|
|
48
|
-
args: { 'aria-label': 'Commands' },
|
|
49
|
-
render: (args) => (
|
|
50
|
-
<Listbox {...args}>
|
|
51
|
-
<Listbox.Group label="Recent">
|
|
52
|
-
<Listbox.Item selected>Open file...</Listbox.Item>
|
|
53
|
-
<Listbox.Item>Save as...</Listbox.Item>
|
|
54
|
-
</Listbox.Group>
|
|
55
|
-
<Listbox.Group label="Actions">
|
|
56
|
-
<Listbox.Item>Copy</Listbox.Item>
|
|
57
|
-
<Listbox.Item>Paste</Listbox.Item>
|
|
58
|
-
<Listbox.Item disabled>Cut</Listbox.Item>
|
|
59
|
-
</Listbox.Group>
|
|
60
|
-
</Listbox>
|
|
61
|
-
),
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
export const WithDisabledItems: Story = {
|
|
65
|
-
render: (args) => (
|
|
66
|
-
<Listbox {...args}>
|
|
67
|
-
<Listbox.Item>Available option</Listbox.Item>
|
|
68
|
-
<Listbox.Item disabled>Disabled option</Listbox.Item>
|
|
69
|
-
<Listbox.Item>Another option</Listbox.Item>
|
|
70
|
-
</Listbox>
|
|
71
|
-
),
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
export const EmptyState: Story = {
|
|
75
|
-
args: { 'aria-label': 'Search results' },
|
|
76
|
-
render: (args) => (
|
|
77
|
-
<Listbox {...args}>
|
|
78
|
-
<Listbox.Empty>No results found</Listbox.Empty>
|
|
79
|
-
</Listbox>
|
|
80
|
-
),
|
|
81
|
-
};
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { Loading } from '.';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Loading indicator for showing progress or waiting states. Offers spinner,
|
|
6
|
-
* dots, and pulse variants plus `Loading.Inline` and `Loading.Screen` helpers.
|
|
7
|
-
*/
|
|
8
|
-
const meta = {
|
|
9
|
-
title: 'Feedback/Loading',
|
|
10
|
-
component: Loading,
|
|
11
|
-
tags: ['autodocs'],
|
|
12
|
-
parameters: {
|
|
13
|
-
docs: {
|
|
14
|
-
description: {
|
|
15
|
-
component: 'Versatile loading indicator with spinner, dots, and pulse variants.',
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
argTypes: {
|
|
20
|
-
size: {
|
|
21
|
-
control: 'select',
|
|
22
|
-
options: ['sm', 'md', 'lg', 'xl'],
|
|
23
|
-
description: 'Size of the loading indicator',
|
|
24
|
-
},
|
|
25
|
-
variant: {
|
|
26
|
-
control: 'select',
|
|
27
|
-
options: ['spinner', 'dots', 'pulse'],
|
|
28
|
-
description: 'Visual style of the loading animation',
|
|
29
|
-
},
|
|
30
|
-
color: {
|
|
31
|
-
control: 'select',
|
|
32
|
-
options: ['accent', 'current', 'muted'],
|
|
33
|
-
description: 'Color variant',
|
|
34
|
-
},
|
|
35
|
-
centered: { control: 'boolean' },
|
|
36
|
-
fill: { control: 'boolean' },
|
|
37
|
-
overlay: { control: 'boolean' },
|
|
38
|
-
},
|
|
39
|
-
args: {
|
|
40
|
-
size: 'md',
|
|
41
|
-
variant: 'spinner',
|
|
42
|
-
color: 'accent',
|
|
43
|
-
label: 'Loading...',
|
|
44
|
-
},
|
|
45
|
-
} satisfies Meta<typeof Loading>;
|
|
46
|
-
|
|
47
|
-
export default meta;
|
|
48
|
-
|
|
49
|
-
type Story = StoryObj<typeof meta>;
|
|
50
|
-
|
|
51
|
-
export const Spinner: Story = {
|
|
52
|
-
args: { variant: 'spinner' },
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
export const Dots: Story = {
|
|
56
|
-
args: { variant: 'dots' },
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
export const Pulse: Story = {
|
|
60
|
-
args: { variant: 'pulse' },
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
export const Large: Story = {
|
|
64
|
-
args: { variant: 'spinner', size: 'xl' },
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
export const Muted: Story = {
|
|
68
|
-
args: { variant: 'spinner', color: 'muted' },
|
|
69
|
-
};
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { Markdown } from '.';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Renders markdown strings as styled prose via react-markdown and remark-gfm.
|
|
6
|
-
* Supports headings, lists, tables, code blocks, blockquotes, and task lists.
|
|
7
|
-
*/
|
|
8
|
-
const meta = {
|
|
9
|
-
title: 'Display/Markdown',
|
|
10
|
-
component: Markdown,
|
|
11
|
-
tags: ['autodocs'],
|
|
12
|
-
parameters: {
|
|
13
|
-
docs: {
|
|
14
|
-
description: {
|
|
15
|
-
component: 'Renders a markdown string as styled prose.',
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
args: {
|
|
20
|
-
content: [
|
|
21
|
-
'# Hello World',
|
|
22
|
-
'',
|
|
23
|
-
'This is a paragraph with **bold text** and *italic text*.',
|
|
24
|
-
'',
|
|
25
|
-
'Here is some `inline code` within a sentence.',
|
|
26
|
-
'',
|
|
27
|
-
'- First item',
|
|
28
|
-
'- Second item',
|
|
29
|
-
'- Third item',
|
|
30
|
-
'',
|
|
31
|
-
'> A blockquote for emphasis.',
|
|
32
|
-
].join('\n'),
|
|
33
|
-
},
|
|
34
|
-
} satisfies Meta<typeof Markdown>;
|
|
35
|
-
|
|
36
|
-
export default meta;
|
|
37
|
-
|
|
38
|
-
type Story = StoryObj<typeof meta>;
|
|
39
|
-
|
|
40
|
-
export const Default: Story = {};
|
|
41
|
-
|
|
42
|
-
export const Table: Story = {
|
|
43
|
-
args: {
|
|
44
|
-
content: [
|
|
45
|
-
'## Data Overview',
|
|
46
|
-
'',
|
|
47
|
-
'| Feature | Status | Priority |',
|
|
48
|
-
'|------------|-----------|----------|',
|
|
49
|
-
'| Markdown | Done | High |',
|
|
50
|
-
'| Tables | Done | Medium |',
|
|
51
|
-
'| Task Lists | Planned | Low |',
|
|
52
|
-
'',
|
|
53
|
-
'Notes:',
|
|
54
|
-
'- [x] Support GFM tables',
|
|
55
|
-
'- [x] Support task lists',
|
|
56
|
-
'- [ ] Syntax highlighting',
|
|
57
|
-
].join('\n'),
|
|
58
|
-
},
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
export const CodeBlock: Story = {
|
|
62
|
-
args: {
|
|
63
|
-
content: [
|
|
64
|
-
'## Code Example',
|
|
65
|
-
'',
|
|
66
|
-
'Here is a JavaScript function:',
|
|
67
|
-
'',
|
|
68
|
-
'```js',
|
|
69
|
-
'function greet(name) {',
|
|
70
|
-
' return `Hello, ${name}!`;',
|
|
71
|
-
'}',
|
|
72
|
-
'```',
|
|
73
|
-
].join('\n'),
|
|
74
|
-
},
|
|
75
|
-
};
|