diff --git a/src/shared/ui/CheckboxFilter/CheckboxFilter.stories.svelte b/src/shared/ui/CheckboxFilter/CheckboxFilter.stories.svelte index 35a8850..2d0df2f 100644 --- a/src/shared/ui/CheckboxFilter/CheckboxFilter.stories.svelte +++ b/src/shared/ui/CheckboxFilter/CheckboxFilter.stories.svelte @@ -8,14 +8,28 @@ const { Story } = defineMeta({ tags: ['autodocs'], parameters: { docs: { + description: { + component: + 'A collapsible property filter with checkboxes. Displays selected count as a badge and supports reduced motion for accessibility. Open by default for immediate visibility and interaction.', + }, story: { inline: false }, // Render stories in iframe for state isolation }, }, + argTypes: { + displayedLabel: { + control: 'text', + description: 'Label for this filter group (e.g., "Properties", "Tags")', + }, + filter: { + control: 'object', + description: 'Filter entity managing properties and selection state', + }, + }, }); - + + + + + diff --git a/src/shared/ui/ComboControl/ComboControl.stories.svelte b/src/shared/ui/ComboControl/ComboControl.stories.svelte index fb0d6c7..c697da4 100644 --- a/src/shared/ui/ComboControl/ComboControl.stories.svelte +++ b/src/shared/ui/ComboControl/ComboControl.stories.svelte @@ -5,12 +5,35 @@ import ComboControl from './ComboControl.svelte'; const { Story } = defineMeta({ title: 'Shared/ComboControl', + component: ComboControl, tags: ['autodocs'], parameters: { docs: { + description: { + component: + 'Provides multiple ways to change a numeric value via decrease/increase buttons, slider, and direct input. All three methods are synchronized, giving users flexibility based on precision needs.', + }, story: { inline: false }, // Render stories in iframe for state isolation }, }, + argTypes: { + control: { + control: 'object', + description: 'TypographyControl instance managing the value and bounds', + }, + decreaseLabel: { + control: 'text', + description: 'Accessibility label for the decrease button', + }, + increaseLabel: { + control: 'text', + description: 'Accessibility label for the increase button', + }, + controlLabel: { + control: 'text', + description: 'Accessibility label for the control button (opens popover)', + }, + }, }); @@ -19,20 +42,58 @@ const defaultControl = createTypographyControl({ value: 77, min: 0, max: 100, st const atMinimumControl = createTypographyControl({ value: 0, min: 0, max: 100, step: 1 }); const atMaximumControl = createTypographyControl({ value: 100, min: 0, max: 100, step: 1 }); const withFloatControl = createTypographyControl({ value: 77.5, min: 0, max: 100, step: 0.1 }); +const customLabelsControl = createTypographyControl({ value: 50, min: 0, max: 100, step: 1 }); - + - + - + - + + + + + diff --git a/src/shared/ui/ContentEditable/ContentEditable.stories.svelte b/src/shared/ui/ContentEditable/ContentEditable.stories.svelte index 6438345..c839f86 100644 --- a/src/shared/ui/ContentEditable/ContentEditable.stories.svelte +++ b/src/shared/ui/ContentEditable/ContentEditable.stories.svelte @@ -4,19 +4,104 @@ import ContentEditable from './ContentEditable.svelte'; const { Story } = defineMeta({ title: 'Shared/ContentEditable', + component: ContentEditable, tags: ['autodocs'], parameters: { docs: { + description: { + component: + 'A contenteditable div with custom font and text properties. Allows inline text editing with support for font size, line height, and letter spacing. The text is two-way bindable for form use cases.', + }, story: { inline: false }, // Render stories in iframe for state isolation }, }, + argTypes: { + text: { + control: 'text', + description: 'Visible text content (two-way bindable)', + }, + fontSize: { + control: { type: 'number', min: 8, max: 200 }, + description: 'Font size in pixels', + }, + lineHeight: { + control: { type: 'number', min: 0.8, max: 3, step: 0.1 }, + description: 'Line height multiplier', + }, + letterSpacing: { + control: { type: 'number', min: -0.5, max: 1, step: 0.05 }, + description: 'Letter spacing in em units', + }, + }, }); - + + + + + + + + + + + + + + + + + diff --git a/src/shared/ui/SearchBar/SearchBar.stories.svelte b/src/shared/ui/SearchBar/SearchBar.stories.svelte index 8b47710..f86dad9 100644 --- a/src/shared/ui/SearchBar/SearchBar.stories.svelte +++ b/src/shared/ui/SearchBar/SearchBar.stories.svelte @@ -4,23 +4,79 @@ import SearchBar from './SearchBar.svelte'; const { Story } = defineMeta({ title: 'Shared/SearchBar', + component: SearchBar, tags: ['autodocs'], parameters: { docs: { + description: { + component: + 'Search input with popover dropdown for results/suggestions. Features keyboard navigation (ArrowDown/Up/Enter) and auto-focus prevention on popover open. The input field serves as the popover trigger.', + }, story: { inline: false }, // Render stories in iframe for state isolation }, }, + argTypes: { + value: { + control: 'text', + description: 'Current search value (two-way bindable)', + }, + placeholder: { + control: 'text', + description: 'Placeholder text for the input', + }, + label: { + control: 'text', + description: 'Optional label displayed above the input', + }, + }, }); - - + + Here will be the search result
Popover closes only when the user clicks outside the search bar or presses the Escape key.
+ + + +
+

No results found

+
+
+
+ + + +
+ Start typing to see results +
+
+
diff --git a/src/shared/ui/VirtualList/VirtualList.stories.svelte b/src/shared/ui/VirtualList/VirtualList.stories.svelte index eb9c710..1e3064e 100644 --- a/src/shared/ui/VirtualList/VirtualList.stories.svelte +++ b/src/shared/ui/VirtualList/VirtualList.stories.svelte @@ -7,18 +7,62 @@ const { Story } = defineMeta({ tags: ['autodocs'], parameters: { docs: { + description: { + component: + 'High-performance virtualized list for large datasets. Only renders visible items plus an overscan buffer for optimal performance. Supports keyboard navigation (ArrowUp/Down, Home, End) and fixed or dynamic item heights.', + }, story: { inline: false }, // Render stories in iframe for state isolation }, }, + argTypes: { + items: { + description: 'Array of items to render', + }, + itemHeight: { + control: 'number', + description: 'Height of each item in pixels', + }, + overscan: { + control: 'number', + description: 'Number of extra items to render above and below the visible area', + }, + class: { + description: 'CSS class to apply to the root element', + }, + onVisibleItemsChange: { + description: 'Callback invoked when the visible items change', + }, + }, }); - - + + + {#snippet children({ item })} +
{item}
+ {/snippet} +
+
+ + + + {#snippet children({ item })} +
{item}
+ {/snippet} +
+
+ + + {#snippet children({ item })}
{item}
{/snippet}