diff --git a/src/shared/ui/ComboControl/ComboControl.stories.svelte b/src/shared/ui/ComboControl/ComboControl.stories.svelte index 8adc9e2..776669f 100644 --- a/src/shared/ui/ComboControl/ComboControl.stories.svelte +++ b/src/shared/ui/ComboControl/ComboControl.stories.svelte @@ -11,100 +11,36 @@ const { Story } = defineMeta({ 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.', + 'ComboControl with input field and slider. Simplified version without increase/decrease buttons.', }, story: { inline: false }, // Render stories in iframe for state isolation }, }, argTypes: { + label: { + control: 'text', + description: 'Label for the ComboControl', + }, 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)', - }, }, }); {#snippet template(args)} - - {/snippet} - - - - {#snippet template(args)} - - {/snippet} - - - - {#snippet template(args)} - - {/snippet} - - - - {#snippet template(args)} - - {/snippet} - - - - {#snippet template(args)} - + {/snippet} diff --git a/src/shared/ui/ComboControl/ComboControl.svelte b/src/shared/ui/ComboControl/ComboControl.svelte index 080380c..62c6f1b 100644 --- a/src/shared/ui/ComboControl/ComboControl.svelte +++ b/src/shared/ui/ComboControl/ComboControl.svelte @@ -1,156 +1,163 @@ - - - - {#if !reduced} - - {#snippet icon({ className })} - - {/snippet} - - {/if} - + +{#if reduced} +
+ + + {formattedValue()} + +
+ + +{:else} +
+ + + + +
+ {#snippet child({ props })} - + + {#if displayLabel} + + {displayLabel} + + {/if} + + + + {formattedValue()} + + {/snippet} - -
- - -
+ + + +
+
- {#if !reduced} - - {#snippet icon({ className })} - - {/snippet} - - {/if} - - - {#if controlLabel} - - {controlLabel} - - {/if} - + + +
+{/if} diff --git a/src/shared/ui/ComboControlV2/ComboControlV2.stories.svelte b/src/shared/ui/ComboControlV2/ComboControlV2.stories.svelte deleted file mode 100644 index 0c04937..0000000 --- a/src/shared/ui/ComboControlV2/ComboControlV2.stories.svelte +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - {#snippet template(args)} - - {/snippet} - - - - {#snippet template(args)} - - {/snippet} - - - - {#snippet template(args)} - - {/snippet} - - - - {#snippet template(args)} - - {/snippet} - - - - {#snippet template(args)} - - {/snippet} - - - - {#snippet template(args)} - - {/snippet} - diff --git a/src/shared/ui/ComboControlV2/ComboControlV2.svelte b/src/shared/ui/ComboControlV2/ComboControlV2.svelte deleted file mode 100644 index efbbbc9..0000000 --- a/src/shared/ui/ComboControlV2/ComboControlV2.svelte +++ /dev/null @@ -1,231 +0,0 @@ - - - -{#snippet ComboControl()} -
-
- {#if showScale} -
- {#each Array(5) as _, i} -
- - {calculateScale(i)} - -
-
-
- {/each} -
- {/if} - - -
- - {#if !reduced} - - {/if} -
-{/snippet} - -{#if reduced} - {@render ComboControl()} -{:else} - - - - - {#snippet icon({ className })} - - {/snippet} - - - - {#snippet child({ props })} - - {/snippet} - - - {@render ComboControl()} - - - - - {#snippet icon({ className })} - - {/snippet} - - - - {#if controlLabel} - - {controlLabel} - - {/if} - -{/if}