File tree Expand file tree Collapse file tree 6 files changed +62
-56
lines changed
packages/react/src/types/props/selector Expand file tree Collapse file tree 6 files changed +62
-56
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " @devup-ui/wasm " : patch
3+ ---
4+
5+ Add flexGrow to Maintain prop
Original file line number Diff line number Diff line change 1+ ---
2+ " @devup-ui/react " : patch
3+ ---
4+
5+ Fix theme typing issue
Original file line number Diff line number Diff line change @@ -4,12 +4,12 @@ version = "0.1.0"
44edition = " 2021"
55
66[dependencies ]
7- oxc_parser = " 0.48.1 "
8- oxc_syntax = " 0.48.1 "
9- oxc_span = " 0.48.1 "
10- oxc_allocator = " 0.48.1 "
11- oxc_ast = " 0.48.1 "
12- oxc_codegen = " 0.48.1 "
7+ oxc_parser = " 0.48.2 "
8+ oxc_syntax = " 0.48.2 "
9+ oxc_span = " 0.48.2 "
10+ oxc_allocator = " 0.48.2 "
11+ oxc_ast = " 0.48.2 "
12+ oxc_codegen = " 0.48.2 "
1313css = { path = " ../css" }
1414once_cell = " 1.20.2"
1515
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ static MAINTAIN_VALUE_PROPERTIES: Lazy<HashSet<String>> = Lazy::new(|| {
2828 set. insert ( "fontWeight" . to_string ( ) ) ;
2929 set. insert ( "scale" . to_string ( ) ) ;
3030 set. insert ( "aspectRatio" . to_string ( ) ) ;
31+ set. insert ( "flexGrow" . to_string ( ) ) ;
3132 set
3233} ) ;
3334
@@ -98,7 +99,14 @@ impl ExtractStyleProperty for ExtractStaticStyle {
9899 StyleProperty :: ClassName ( sheet_to_classname (
99100 self . property . as_str ( ) ,
100101 self . level ,
101- Some ( convert_value ( self . value . as_str ( ) ) . as_str ( ) ) ,
102+ Some (
103+ if MAINTAIN_VALUE_PROPERTIES . contains ( self . property . as_str ( ) ) {
104+ self . value . to_string ( )
105+ } else {
106+ convert_value ( self . value . as_str ( ) )
107+ }
108+ . as_str ( ) ,
109+ ) ,
102110 s. as_deref ( ) ,
103111 ) )
104112 }
Original file line number Diff line number Diff line change @@ -5,10 +5,12 @@ type toPascalCase<S extends string> = S extends `${infer T}${infer U}`
55 ? `${Uppercase < T > } ${U } `
66 : S
77
8- export type DevupThemeSelectorProps = {
9- [ K in keyof DevupTheme as `_theme${toPascalCase < K > } `] ?: DevupCommonProps &
10- DevupSelectorProps
11- }
8+ export type DevupThemeSelectorProps = keyof DevupTheme extends undefined
9+ ? Record < `_theme${string } `, DevupCommonProps & DevupSelectorProps >
10+ : {
11+ [ K in keyof DevupTheme as `_theme${toPascalCase < K > } `] ?: DevupCommonProps &
12+ DevupSelectorProps
13+ }
1214
1315export interface DevupSelectorProps {
1416 _active ?: DevupCommonProps
You can’t perform that action at this time.
0 commit comments