Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/long-laws-shout.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@devup-ui/wasm": patch
---

Add flexGrow to Maintain prop
5 changes: 5 additions & 0 deletions .changeset/polite-humans-wash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@devup-ui/react": patch
---

Fix theme typing issue
76 changes: 31 additions & 45 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions libs/extractor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ version = "0.1.0"
edition = "2021"

[dependencies]
oxc_parser = "0.48.1"
oxc_syntax = "0.48.1"
oxc_span = "0.48.1"
oxc_allocator = "0.48.1"
oxc_ast = "0.48.1"
oxc_codegen = "0.48.1"
oxc_parser = "0.48.2"
oxc_syntax = "0.48.2"
oxc_span = "0.48.2"
oxc_allocator = "0.48.2"
oxc_ast = "0.48.2"
oxc_codegen = "0.48.2"
css = { path = "../css" }
once_cell = "1.20.2"

Expand Down
10 changes: 9 additions & 1 deletion libs/extractor/src/extract_style/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ static MAINTAIN_VALUE_PROPERTIES: Lazy<HashSet<String>> = Lazy::new(|| {
set.insert("fontWeight".to_string());
set.insert("scale".to_string());
set.insert("aspectRatio".to_string());
set.insert("flexGrow".to_string());
set
});

Expand Down Expand Up @@ -98,7 +99,14 @@ impl ExtractStyleProperty for ExtractStaticStyle {
StyleProperty::ClassName(sheet_to_classname(
self.property.as_str(),
self.level,
Some(convert_value(self.value.as_str()).as_str()),
Some(
if MAINTAIN_VALUE_PROPERTIES.contains(self.property.as_str()) {
self.value.to_string()
} else {
convert_value(self.value.as_str())
}
.as_str(),
),
s.as_deref(),
))
}
Expand Down
10 changes: 6 additions & 4 deletions packages/react/src/types/props/selector/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ type toPascalCase<S extends string> = S extends `${infer T}${infer U}`
? `${Uppercase<T>}${U}`
: S

export type DevupThemeSelectorProps = {
[K in keyof DevupTheme as `_theme${toPascalCase<K>}`]?: DevupCommonProps &
DevupSelectorProps
}
export type DevupThemeSelectorProps = keyof DevupTheme extends undefined
? Record<`_theme${string}`, DevupCommonProps & DevupSelectorProps>
: {
[K in keyof DevupTheme as `_theme${toPascalCase<K>}`]?: DevupCommonProps &
DevupSelectorProps
}

export interface DevupSelectorProps {
_active?: DevupCommonProps
Expand Down