diff --git a/packages/dripsy/src/core/css/index.tsx b/packages/dripsy/src/core/css/index.tsx index 40a6a31..02675e4 100644 --- a/packages/dripsy/src/core/css/index.tsx +++ b/packages/dripsy/src/core/css/index.tsx @@ -142,7 +142,7 @@ const transforms = [ const filterWebStyleKeys = ( styleProp: Exclude = {} ): Exclude => { - if (Platform.OS == 'web') { + if (Platform.OS === 'web') { return styleProp } @@ -150,6 +150,7 @@ const filterWebStyleKeys = ( const finalStyles = { ...styleProp } const webOnlyKeys = [ // from https://necolas.github.io/react-native-web/docs/styling/#non-standard-properties + // and https://github.com/necolas/react-native-web/blob/HEAD/packages/react-native-web/src/exports/View/types.js#L193 'animationKeyframes', 'animationFillMode', 'transitionProperty', @@ -164,6 +165,9 @@ const filterWebStyleKeys = ( 'animationDirection', 'animationIterationCount', 'outlineColor', + 'outlineOffset', + 'outlineStyle', + 'outlineWidth', ] webOnlyKeys.forEach((key) => { if (finalStyles?.[key as keyof typeof styleProp]) { diff --git a/packages/dripsy/src/core/css/scales.ts b/packages/dripsy/src/core/css/scales.ts index f263cc8..8324741 100644 --- a/packages/dripsy/src/core/css/scales.ts +++ b/packages/dripsy/src/core/css/scales.ts @@ -6,8 +6,10 @@ export const aliases = { pos: 'position', t: 'top', r: 'right', + e: 'end', b: 'bottom', l: 'left', + s: 'start', ov: 'overflow', ox: 'overflowX', @@ -41,15 +43,19 @@ export const aliases = { m: 'margin', mt: 'marginTop', mr: 'marginRight', + me: 'marginEnd', mb: 'marginBottom', ml: 'marginLeft', + ms: 'marginStart', mx: 'marginHorizontal', my: 'marginVertical', p: 'padding', pt: 'paddingTop', pr: 'paddingRight', + pe: 'paddingEnd', pb: 'paddingBottom', pl: 'paddingLeft', + ps: 'paddingStart', px: 'paddingHorizontal', py: 'paddingVertical', @@ -104,6 +110,12 @@ export const scales = { // RN SPECIFIC SCALES FIRST textShadowColor: 'colors', shadowColor: 'colors', + marginEnd: 'space', + marginStart: 'space', + paddingEnd: 'space', + paddingStart: 'space', + end: 'space', + start: 'space', // REST color: 'colors', backgroundColor: 'colors', @@ -210,6 +222,8 @@ export const scales = { borderStartEndRadius: 'radii', borderStartStartRadius: 'radii', outlineColor: 'colors', + outlineWidth: 'borderWidths', + outlineStyle: 'borderStyles', boxShadow: 'shadows', textShadow: 'shadows', zIndex: 'zIndices', diff --git a/packages/dripsy/src/core/types-v2/sx.ts b/packages/dripsy/src/core/types-v2/sx.ts index ee2da13..d20c7a4 100644 --- a/packages/dripsy/src/core/types-v2/sx.ts +++ b/packages/dripsy/src/core/types-v2/sx.ts @@ -373,8 +373,8 @@ export type MaybeVariantsFromThemeKey< // testString('alignItems', false as never) // #endregion -type VariantProp< - ThemeKey extends keyof DripsyFinalTheme | undefined | 'missing' +export type VariantProp< + ThemeKey extends keyof DripsyFinalTheme | undefined | 'missing' = 'missing' > = ThemeKey extends 'missing' | undefined ? Variant : ThemeKey extends keyof DripsyFinalTheme