@@ -7,13 +7,26 @@ import type {
77 ResolvedActionState ,
88 ResolvedFormfieldState ,
99 ResolvedThemeView ,
10+ HueStep ,
1011} from "./index"
1112
1213export function createComponentTheme ( current : Accessor < ResolvedThemeView > ) {
1314 const textAction = actions ( ( variant , state ) => current ( ) . text . action [ variant ] [ state ] )
1415 const backgroundAction = actions ( ( variant , state ) => current ( ) . background . action [ variant ] [ state ] )
1516 const textFormfield = formfield ( ( state ) => current ( ) . text . formfield [ state ] )
1617 const backgroundFormfield = formfield ( ( state ) => current ( ) . background . formfield [ state ] )
18+ const hue = {
19+ gray : ( step : HueStep ) => current ( ) . hue . gray [ step ] ,
20+ red : ( step : HueStep ) => current ( ) . hue . red [ step ] ,
21+ orange : ( step : HueStep ) => current ( ) . hue . orange [ step ] ,
22+ yellow : ( step : HueStep ) => current ( ) . hue . yellow [ step ] ,
23+ green : ( step : HueStep ) => current ( ) . hue . green [ step ] ,
24+ cyan : ( step : HueStep ) => current ( ) . hue . cyan [ step ] ,
25+ blue : ( step : HueStep ) => current ( ) . hue . blue [ step ] ,
26+ purple : ( step : HueStep ) => current ( ) . hue . purple [ step ] ,
27+ accent : ( step : HueStep ) => current ( ) . hue . accent [ step ] ,
28+ neutral : ( step : HueStep ) => current ( ) . hue . neutral [ step ] ,
29+ }
1730 const text = Object . assign ( ( ) => current ( ) . text . default , {
1831 subdued : ( ) => current ( ) . text . subdued ,
1932 action : textAction ,
@@ -62,7 +75,7 @@ export function createComponentTheme(current: Accessor<ResolvedThemeView>) {
6275 }
6376
6477 return {
65- hue : ( ) => current ( ) . hue ,
78+ hue,
6679 text,
6780 background,
6881 border : ( ) => current ( ) . border . default ,
0 commit comments