Skip to content

Commit

Permalink
AUI: Add a few style properties
Browse files Browse the repository at this point in the history
  • Loading branch information
bheston committed Oct 18, 2024
1 parent bb8d1a2 commit 6c40719
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 1 deletion.
8 changes: 8 additions & 0 deletions packages/adaptive-ui/docs/api-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -625,13 +625,21 @@ export const StyleProperty: {
readonly paddingLeft: "paddingLeft";
readonly gap: "gap";
readonly height: "height";
readonly minHeight: "minHeight";
readonly maxHeight: "maxHeight";
readonly width: "width";
readonly minWidth: "minWidth";
readonly maxWidth: "maxWidth";
readonly layoutInner: "layoutInner";
readonly layoutDirection: "layoutDirection";
readonly layoutMainAxisAlignItems: "layoutMainAxisAlignItems";
readonly layoutCrossAxisAlignItems: "layoutCrossAxisAlignItems";
readonly opacity: "opacity";
readonly cursor: "cursor";
readonly outlineColor: "outlineColor";
readonly outlineOffset: "outlineOffset";
readonly outlineStyle: "outlineStyle";
readonly outlineThickness: "outlineThickness";
readonly outlineWidth: "outlineWidth";
readonly shadow: "shadow";
};
Expand Down
16 changes: 16 additions & 0 deletions packages/adaptive-ui/src/core/modules/css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,24 @@ export const stylePropertyToCssProperty = (usage: StyleProperty): string => {
return "gap";
case StyleProperty.height:
return "height";
case StyleProperty.minHeight:
return "min-height";
case StyleProperty.maxHeight:
return "max-height";
case StyleProperty.width:
return "width";
case StyleProperty.minWidth:
return "min-width";
case StyleProperty.maxWidth:
return "max-width";
case StyleProperty.layoutInner:
return "display";
case StyleProperty.layoutDirection:
return "flex-direction";
case StyleProperty.layoutMainAxisAlignItems:
return "justify-content";
case StyleProperty.layoutCrossAxisAlignItems:
return "align-items";
case StyleProperty.opacity:
return "opacity";
case StyleProperty.cursor:
Expand All @@ -93,6 +107,8 @@ export const stylePropertyToCssProperty = (usage: StyleProperty): string => {
return "outline-offset";
case StyleProperty.outlineStyle:
return "outline-style";
case StyleProperty.outlineThickness:
return "outline-width";
case StyleProperty.outlineWidth:
return "outline-width";
case StyleProperty.shadow:
Expand Down
10 changes: 10 additions & 0 deletions packages/adaptive-ui/src/core/modules/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -336,13 +336,23 @@ export const StyleProperty = {
paddingLeft: "paddingLeft",
gap: "gap",
height: "height",
minHeight: "minHeight",
maxHeight: "maxHeight",
width: "width",
minWidth: "minWidth",
maxWidth: "maxWidth",
// layoutOuter: "layoutOuter", // TODO Add support for inline or block definition
layoutInner: "layoutInner",
layoutDirection: "layoutDirection",
layoutMainAxisAlignItems: "layoutMainAxisAlignItems",
layoutCrossAxisAlignItems: "layoutCrossAxisAlignItems",
opacity: "opacity",
cursor: "cursor",
outlineColor: "outlineColor",
outlineOffset: "outlineOffset",
outlineStyle: "outlineStyle",
outlineThickness: "outlineThickness",
/** @deprecated Use outlineThickness */
outlineWidth: "outlineWidth",
shadow: "shadow",
} as const;
Expand Down
2 changes: 1 addition & 1 deletion packages/adaptive-ui/src/reference/modules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1690,7 +1690,7 @@ export const focusIndicatorStyles: Styles = Styles.fromProperties(
outlineColor: focusStroke,
outlineOffset: "1px",
outlineStyle: "solid",
outlineWidth: focusStrokeThickness,
outlineThickness: focusStrokeThickness,
},
"styles.focus-indicator",
);
Expand Down

0 comments on commit 6c40719

Please sign in to comment.