11import React from 'react' ;
2- import { Collapse , Select , Text } from '@tiny-design/react' ;
2+ import { Collapse , Flex , Select , Text } from '@tiny-design/react' ;
33import { FONT_OPTIONS , MONO_OPTIONS , SEED_COLOR_GROUPS } from './editor-config' ;
44import { ColorField , ShadowField , SliderField , TextField } from './editor-fields' ;
5- import type {
6- FieldKey ,
7- ThemeEditorDraft ,
8- ThemeEditorSection ,
9- ThemeEditorSeedGroup ,
10- } from './types' ;
5+ import type { FieldKey , ThemeEditorDraft , ThemeEditorSection , ThemeEditorSeedGroup } from './types' ;
116
127const CONTROL_SHADOW_FALLBACK = {
138 color : 'oklch(0 0 0)' ,
@@ -43,11 +38,11 @@ function renderColorGroups(
4338) : React . ReactElement [ ] {
4439 return groups . map ( ( group ) => (
4540 < div key = { group . title } className = "theme-studio__group-card" >
46- < div className = "theme-studio__group-header" >
41+ < Flex vertical gap = { 2 } className = "theme-studio__group-header theme-studio__copy-stack " >
4742 < Text strong > { group . title } </ Text >
4843 { group . description ? < Text type = "secondary" > { group . description } </ Text > : null }
49- </ div >
50- < div className = "theme-studio__group-fields" >
44+ </ Flex >
45+ < Flex vertical gap = { 8 } className = "theme-studio__group-fields" >
5146 { group . fields . map ( ( field ) => (
5247 < ColorField
5348 key = { field . key }
@@ -56,7 +51,7 @@ function renderColorGroups(
5651 onChange = { ( next ) => updateField ( field . key , next ) }
5752 />
5853 ) ) }
59- </ div >
54+ </ Flex >
6055 </ div >
6156 ) ) ;
6257}
@@ -75,17 +70,17 @@ export function ThemeStudioSidebarContent({
7570
7671 if ( section === 'colors' ) {
7772 return (
78- < div className = "theme-studio__panel-stack" >
73+ < Flex vertical gap = { 8 } className = "theme-studio__panel-stack" >
7974 < div className = "theme-studio__group-card theme-studio__group-card_toolbar" >
80- < div className = "theme-studio__group-toolbar theme-studio__group-toolbar_start" >
81- < div >
75+ < Flex className = "theme-studio__group-toolbar theme-studio__group-toolbar_start" >
76+ < Flex vertical gap = { 2 } className = "theme-studio__copy-stack" >
8277 < Text strong > Primitive Color Seeds</ Text >
8378 < Text type = "secondary" >
84- Edit the brand seed layer directly. These values compile into semantic and
85- component color tokens.
79+ Edit the brand seed layer directly. These values compile into semantic and component
80+ color tokens.
8681 </ Text >
87- </ div >
88- </ div >
82+ </ Flex >
83+ </ Flex >
8984 < div className = "theme-studio__summary-grid theme-studio__summary-grid_compact" >
9085 < div className = "theme-studio__summary-card" >
9186 < span > Layer 1</ span >
@@ -101,17 +96,17 @@ export function ThemeStudioSidebarContent({
10196 </ div >
10297 </ div >
10398 </ div >
104- < div className = "theme-studio__group-section" >
105- < div className = "theme-studio__section-header" >
99+ < Flex vertical gap = { 8 } className = "theme-studio__group-section" >
100+ < Flex vertical gap = { 2 } className = "theme-studio__section-header" >
106101 < Text strong > Core Seed Groups</ Text >
107102 < Text type = "secondary" >
108103 Start with brand, surfaces, feedback, and interaction primitives.
109104 </ Text >
110- </ div >
105+ </ Flex >
111106 { renderColorGroups ( coreColorGroups , draft , updateField ) }
112- </ div >
107+ </ Flex >
113108 { advancedColorGroups . length > 0 ? (
114- < div className = "theme-studio__group-section" >
109+ < Flex vertical gap = { 8 } className = "theme-studio__group-section" >
115110 < Collapse
116111 bordered = { false }
117112 className = "theme-studio__advanced-collapse"
@@ -120,33 +115,33 @@ export function ThemeStudioSidebarContent({
120115 {
121116 key : 'advanced-colors' ,
122117 label : (
123- < div className = "theme-studio__section-header theme-studio__section-header_inline " >
118+ < Flex vertical gap = { 2 } className = "theme-studio__section-header" >
124119 < Text strong > Advanced Seed Groups</ Text >
125120 < Text type = "secondary" > Shell, charts, and specialized palettes.</ Text >
126- </ div >
121+ </ Flex >
127122 ) ,
128123 children : renderColorGroups ( advancedColorGroups , draft , updateField ) ,
129124 } ,
130125 ] }
131126 />
132- </ div >
127+ </ Flex >
133128 ) : null }
134- </ div >
129+ </ Flex >
135130 ) ;
136131 }
137132
138133 if ( section === 'typography' ) {
139134 return (
140- < div className = "theme-studio__panel-stack" >
135+ < Flex vertical gap = { 8 } className = "theme-studio__panel-stack" >
141136 < div className = "theme-studio__group-card theme-studio__group-card_toolbar" >
142- < div className = "theme-studio__group-toolbar theme-studio__group-toolbar_start" >
143- < div >
137+ < Flex className = "theme-studio__group-toolbar theme-studio__group-toolbar_start" >
138+ < Flex vertical gap = { 2 } className = "theme-studio__copy-stack" >
144139 < Text strong > Primitive Type Seeds</ Text >
145140 < Text type = "secondary" >
146141 Font families, scale, and rhythm compile into semantic typography tokens.
147142 </ Text >
148- </ div >
149- </ div >
143+ </ Flex >
144+ </ Flex >
150145 < div className = "theme-studio__summary-grid theme-studio__summary-grid_compact" >
151146 < div className = "theme-studio__summary-card" >
152147 < span > Sans</ span >
@@ -259,22 +254,22 @@ export function ThemeStudioSidebarContent({
259254 </ span >
260255 </ div >
261256 </ div >
262- </ div >
257+ </ Flex >
263258 ) ;
264259 }
265260
266261 if ( section === 'other' ) {
267262 return (
268- < div className = "theme-studio__panel-stack" >
263+ < Flex vertical gap = { 8 } className = "theme-studio__panel-stack" >
269264 < div className = "theme-studio__group-card theme-studio__group-card_toolbar" >
270- < div className = "theme-studio__group-toolbar theme-studio__group-toolbar_start" >
271- < div >
265+ < Flex className = "theme-studio__group-toolbar theme-studio__group-toolbar_start" >
266+ < Flex vertical gap = { 2 } className = "theme-studio__copy-stack" >
272267 < Text strong > Primitive Scale & Effect Seeds </ Text >
273268 < Text type = "secondary" >
274269 Shape, density, and elevation seeds compile into control and component tokens.
275270 </ Text >
276- </ div >
277- </ div >
271+ </ Flex >
272+ </ Flex >
278273 < div className = "theme-studio__summary-grid theme-studio__summary-grid_compact" >
279274 < div className = "theme-studio__summary-card" >
280275 < span > Radius</ span >
@@ -324,11 +319,11 @@ export function ThemeStudioSidebarContent({
324319 </ div >
325320
326321 < div className = "theme-studio__group-card" >
327- < div className = "theme-studio__section-header" >
322+ < Flex vertical gap = { 2 } className = "theme-studio__section-header" >
328323 < Text strong > Density</ Text >
329324 < Text type = "secondary" > Tune spacing and heights for fields, buttons, and cards.</ Text >
330- </ div >
331- < div className = "theme-studio__group-fields" >
325+ </ Flex >
326+ < Flex vertical gap = { 8 } className = "theme-studio__group-fields" >
332327 < Text className = "theme-studio__subgroup-title" > Fields</ Text >
333328 < SliderField
334329 label = "Field Height / Medium"
@@ -350,10 +345,10 @@ export function ThemeStudioSidebarContent({
350345 {
351346 key : 'field-density-advanced' ,
352347 label : (
353- < div className = "theme-studio__section-header theme-studio__section-header_inline " >
348+ < Flex vertical gap = { 2 } className = "theme-studio__section-header" >
354349 < Text strong > Advanced Sizes</ Text >
355350 < Text type = "secondary" > Small and large field density.</ Text >
356- </ div >
351+ </ Flex >
357352 ) ,
358353 children : (
359354 < >
@@ -386,9 +381,9 @@ export function ThemeStudioSidebarContent({
386381 } ,
387382 ] }
388383 />
389- </ div >
384+ </ Flex >
390385
391- < div className = "theme-studio__group-fields" >
386+ < Flex vertical gap = { 8 } className = "theme-studio__group-fields" >
392387 < Text className = "theme-studio__subgroup-title" > Buttons</ Text >
393388 < SliderField
394389 label = "Button Height / Medium"
@@ -410,10 +405,10 @@ export function ThemeStudioSidebarContent({
410405 {
411406 key : 'button-density-advanced' ,
412407 label : (
413- < div className = "theme-studio__section-header theme-studio__section-header_inline " >
408+ < Flex vertical gap = { 2 } className = "theme-studio__section-header" >
414409 < Text strong > Advanced Sizes</ Text >
415410 < Text type = "secondary" > Small and large button density.</ Text >
416- </ div >
411+ </ Flex >
417412 ) ,
418413 children : (
419414 < >
@@ -446,17 +441,17 @@ export function ThemeStudioSidebarContent({
446441 } ,
447442 ] }
448443 />
449- </ div >
444+ </ Flex >
450445
451- < div className = "theme-studio__group-fields" >
446+ < Flex vertical gap = { 8 } className = "theme-studio__group-fields" >
452447 < Text className = "theme-studio__subgroup-title" > Cards</ Text >
453448 < SliderField
454449 label = "Card Padding"
455450 value = { draft . fields . cardPadding }
456451 onChange = { ( next ) => updateField ( 'cardPadding' , next ) }
457452 config = { { min : 12 , max : 40 , step : 1 , unit : 'px' } }
458453 />
459- </ div >
454+ </ Flex >
460455 </ div >
461456
462457 < div className = "theme-studio__group-card" >
@@ -485,7 +480,7 @@ export function ThemeStudioSidebarContent({
485480 onChange = { ( next ) => updateField ( 'shadowFocus' , next ) }
486481 />
487482 </ div >
488- </ div >
483+ </ Flex >
489484 ) ;
490485 }
491486
0 commit comments