Socket
Socket
Sign inDemoInstall

@theme-ui/css

Package Overview
Dependencies
Maintainers
3
Versions
427
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@theme-ui/css - npm Package Compare versions

Comparing version 0.4.0-rc.13 to 0.5.0-alpha.0

.rts2_cache_cjs/rpt2_ca74a9b3999b623d5309c263d939528d6e619e99/code/cache_/60b22cec907cd589e7426eca07c68b4584e254a5

2

dist/index.esm.js

@@ -0,1 +1,3 @@

import '@emotion/react';
function _extends() {

@@ -2,0 +4,0 @@ _extends = Object.assign || function (target) {

@@ -0,1 +1,3 @@

require('@emotion/react');
function _extends() {

@@ -2,0 +4,0 @@ _extends = Object.assign || function (target) {

@@ -0,1 +1,3 @@

import '@emotion/react';
function _extends() {

@@ -2,0 +4,0 @@ _extends = Object.assign || function (target) {

4

dist/index.umd.js
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@emotion/react')) :
typeof define === 'function' && define.amd ? define(['exports', '@emotion/react'], factory) :
(global = global || self, factory(global.css = {}));

@@ -5,0 +5,0 @@ }(this, (function (exports) {

import * as CSS from 'csstype';
import '@emotion/react';
declare type StandardCSSProperties = CSS.Properties<number | string>;

@@ -292,14 +293,14 @@ /**

/**
* The **`scrollPaddingX`** is shorthand property for CSS properties **`scroll-padding-left`** and **`scroll-padding-right`**. They set the width of the scroll padding area on the left and right side of an element.
*
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-padding-left
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-padding-right
*/
* The **`scrollPaddingX`** is shorthand property for CSS properties **`scroll-padding-left`** and **`scroll-padding-right`**. They set the width of the scroll padding area on the left and right side of an element.
*
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-padding-left
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-padding-right
*/
scrollPaddingX?: StandardCSSProperties['scrollPaddingLeft'];
/**
* The **`scrollPaddingY`** is shorthand property for CSS properties **`scroll-padding-top`** and **`scroll-padding-bottom`**. They set the width of the scroll padding area on the top and bottom side of an element.
*
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-padding-top
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-padding-bottom
*/
* The **`scrollPaddingY`** is shorthand property for CSS properties **`scroll-padding-top`** and **`scroll-padding-bottom`**. They set the width of the scroll padding area on the top and bottom side of an element.
*
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-padding-top
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-padding-bottom
*/
scrollPaddingY?: StandardCSSProperties['scrollPaddingTop'];

@@ -322,3 +323,3 @@ size?: StandardCSSProperties['width'];

*/
boxShadow?: CSS.BoxShadowProperty | number;
boxShadow?: CSS.Property.BoxShadow | number;
/**

@@ -336,3 +337,3 @@ * The **`font-weight`** CSS property specifies the weight (or boldness) of the font. The font weights available to you will depend on the `font-family` you are using. Some fonts are only

*/
fontWeight?: CSS.FontWeightProperty | string;
fontWeight?: CSS.Property.FontWeight | string;
/**

@@ -349,3 +350,3 @@ * The **`border-top-style`** CSS property sets the line style of an element's top `border`.

*/
borderTopStyle?: CSS.BorderTopStyleProperty | string;
borderTopStyle?: CSS.Property.BorderTopStyle | string;
/**

@@ -362,3 +363,3 @@ * The **`border-top-width`** CSS property sets the width of the top border of an element.

*/
borderTopWidth?: CSS.BorderTopWidthProperty<never> | string;
borderTopWidth?: CSS.Property.BorderTopWidth<never> | string;
/**

@@ -375,3 +376,3 @@ * The **`border-bottom-style`** CSS property sets the line style of an element's bottom `border`.

*/
borderBottomStyle?: CSS.BorderBottomStyleProperty | string;
borderBottomStyle?: CSS.Property.BorderBottomStyle | string;
/**

@@ -388,3 +389,3 @@ * The **`border-right-style`** CSS property sets the line style of an element's right `border`.

*/
borderRightStyle?: CSS.BorderRightStyleProperty | string;
borderRightStyle?: CSS.Property.BorderRightStyle | string;
/**

@@ -401,3 +402,3 @@ * The **`border-left-style`** CSS property sets the line style of an element's left `border`.

*/
borderLeftStyle?: CSS.BorderLeftStyleProperty | string;
borderLeftStyle?: CSS.Property.BorderLeftStyle | string;
/**

@@ -413,3 +414,3 @@ * The **`border-radius`** CSS property rounds the corners of an element's outer border edge. You can set a single radius to make circular corners, or two radii to make elliptical corners.

*/
borderRadius?: CSS.BorderRadiusProperty<string | number>;
borderRadius?: CSS.Property.BorderRadius<string | number>;
/**

@@ -426,3 +427,3 @@ * The **`z-index`** CSS property sets the z-order of a positioned element and its descendants or flex items. Overlapping elements with a larger z-index cover those with a smaller one.

*/
zIndex?: CSS.ZIndexProperty | string;
zIndex?: CSS.Property.ZIndex | string;
}

@@ -497,23 +498,23 @@ /**

*/
background?: CSS.ColorProperty;
background?: CSS.Property.Color;
/**
* Body foreground color
*/
text?: CSS.ColorProperty;
text?: CSS.Property.Color;
/**
* Primary brand color for links, buttons, etc.
*/
primary?: CSS.ColorProperty;
primary?: CSS.Property.Color;
/**
* A secondary brand color for alternative styling
*/
secondary?: CSS.ColorProperty;
secondary?: CSS.Property.Color;
/**
* A contrast color for emphasizing UI
*/
accent?: CSS.ColorProperty;
accent?: CSS.Property.Color;
/**
* A background color for highlighting text
*/
highlight?: CSS.ColorProperty;
highlight?: CSS.Property.Color;
/**

@@ -523,4 +524,4 @@ * A faint color for backgrounds, borders, and accents that do not require

*/
muted?: CSS.ColorProperty;
[k: string]: CSS.ColorProperty | Scale<CSS.ColorProperty> | undefined;
muted?: CSS.Property.Color;
[k: string]: CSS.Property.Color | Scale<CSS.Property.Color> | undefined;
}

@@ -573,19 +574,19 @@ export declare type ColorModesScale = ColorMode & {

};
space?: Scale<CSS.MarginProperty<number | string>>;
fontSizes?: Scale<CSS.FontSizeProperty<number>>;
fonts?: Scale<CSS.FontFamilyProperty>;
fontWeights?: Scale<CSS.FontWeightProperty>;
lineHeights?: Scale<CSS.LineHeightProperty<TLengthStyledSystem>>;
letterSpacings?: Scale<CSS.LetterSpacingProperty<TLengthStyledSystem>>;
sizes?: Scale<CSS.HeightProperty<{}> | CSS.WidthProperty<{}>>;
borders?: Scale<CSS.BorderProperty<{}>>;
borderStyles?: Scale<CSS.BorderProperty<{}>>;
borderWidths?: Scale<CSS.BorderWidthProperty<TLengthStyledSystem>>;
radii?: Scale<CSS.BorderRadiusProperty<TLengthStyledSystem>>;
shadows?: Scale<CSS.BoxShadowProperty>;
zIndices?: Scale<CSS.ZIndexProperty>;
space?: Scale<CSS.Property.Margin<number | string>>;
fontSizes?: Scale<CSS.Property.FontSize<number>>;
fonts?: Scale<CSS.Property.FontFamily>;
fontWeights?: Scale<CSS.Property.FontWeight>;
lineHeights?: Scale<CSS.Property.LineHeight<TLengthStyledSystem>>;
letterSpacings?: Scale<CSS.Property.LetterSpacing<TLengthStyledSystem>>;
sizes?: Scale<CSS.Property.Height<{}> | CSS.Property.Width<{}>>;
borders?: Scale<CSS.Property.Border<{}>>;
borderStyles?: Scale<CSS.Property.Border<{}>>;
borderWidths?: Scale<CSS.Property.BorderWidth<TLengthStyledSystem>>;
radii?: Scale<CSS.Property.BorderRadius<TLengthStyledSystem>>;
shadows?: Scale<CSS.Property.BoxShadow>;
zIndices?: Scale<CSS.Property.ZIndex>;
colorStyles?: Scale<ThemeUICSSProperties>;
textStyles?: Scale<ThemeUICSSProperties>;
opacities?: Scale<CSS.OpacityProperty>;
transitions?: Scale<CSS.TransitionProperty>;
opacities?: Scale<CSS.Property.Opacity>;
transitions?: Scale<CSS.Property.Transition>;
/**

@@ -758,2 +759,8 @@ * Enable/disable custom CSS properties/variables if lower browser

}
interface ThemeUITheme extends Theme {
}
declare module '@emotion/react' {
interface Theme extends ThemeUITheme {
}
}
export {};
{
"name": "@theme-ui/css",
"version": "0.4.0-rc.13",
"version": "0.5.0-alpha.0",
"source": "src/index.ts",

@@ -20,5 +20,6 @@ "main": "dist/index.js",

"dependencies": {
"csstype": "^2.5.7"
"@emotion/react": "^11.1.1",
"csstype": "^3.0.5"
},
"gitHead": "77155d2d7615ea50bec8e206625ad0b33d618de0"
"gitHead": "4a277d27fcae7d070af2b03ea82365eb89ae5bbc"
}
import * as CSS from 'csstype'
import '@emotion/react'

@@ -301,3 +302,3 @@ type StandardCSSProperties = CSS.Properties<number | string>

/**
/**
* The **`scrollPaddingX`** is shorthand property for CSS properties **`scroll-padding-left`** and **`scroll-padding-right`**. They set the width of the scroll padding area on the left and right side of an element.

@@ -310,3 +311,3 @@ *

/**
/**
* The **`scrollPaddingY`** is shorthand property for CSS properties **`scroll-padding-top`** and **`scroll-padding-bottom`**. They set the width of the scroll padding area on the top and bottom side of an element.

@@ -317,3 +318,3 @@ *

*/
scrollPaddingY?: StandardCSSProperties['scrollPaddingTop']
scrollPaddingY?: StandardCSSProperties['scrollPaddingTop']
size?: StandardCSSProperties['width']

@@ -336,3 +337,3 @@ }

*/
boxShadow?: CSS.BoxShadowProperty | number
boxShadow?: CSS.Property.BoxShadow | number
/**

@@ -350,3 +351,3 @@ * The **`font-weight`** CSS property specifies the weight (or boldness) of the font. The font weights available to you will depend on the `font-family` you are using. Some fonts are only

*/
fontWeight?: CSS.FontWeightProperty | string
fontWeight?: CSS.Property.FontWeight | string

@@ -364,3 +365,3 @@ /**

*/
borderTopStyle?: CSS.BorderTopStyleProperty | string
borderTopStyle?: CSS.Property.BorderTopStyle | string
/**

@@ -377,3 +378,3 @@ * The **`border-top-width`** CSS property sets the width of the top border of an element.

*/
borderTopWidth?: CSS.BorderTopWidthProperty<never> | string
borderTopWidth?: CSS.Property.BorderTopWidth<never> | string
/**

@@ -390,3 +391,3 @@ * The **`border-bottom-style`** CSS property sets the line style of an element's bottom `border`.

*/
borderBottomStyle?: CSS.BorderBottomStyleProperty | string
borderBottomStyle?: CSS.Property.BorderBottomStyle | string
/**

@@ -403,3 +404,3 @@ * The **`border-right-style`** CSS property sets the line style of an element's right `border`.

*/
borderRightStyle?: CSS.BorderRightStyleProperty | string
borderRightStyle?: CSS.Property.BorderRightStyle | string
/**

@@ -416,3 +417,3 @@ * The **`border-left-style`** CSS property sets the line style of an element's left `border`.

*/
borderLeftStyle?: CSS.BorderLeftStyleProperty | string
borderLeftStyle?: CSS.Property.BorderLeftStyle | string
/**

@@ -428,3 +429,3 @@ * The **`border-radius`** CSS property rounds the corners of an element's outer border edge. You can set a single radius to make circular corners, or two radii to make elliptical corners.

*/
borderRadius?: CSS.BorderRadiusProperty<string | number>
borderRadius?: CSS.Property.BorderRadius<string | number>

@@ -442,3 +443,3 @@ /**

*/
zIndex?: CSS.ZIndexProperty | string
zIndex?: CSS.Property.ZIndex | string
}

@@ -536,3 +537,3 @@

*/
background?: CSS.ColorProperty
background?: CSS.Property.Color

@@ -542,3 +543,3 @@ /**

*/
text?: CSS.ColorProperty
text?: CSS.Property.Color

@@ -548,3 +549,3 @@ /**

*/
primary?: CSS.ColorProperty
primary?: CSS.Property.Color

@@ -554,3 +555,3 @@ /**

*/
secondary?: CSS.ColorProperty
secondary?: CSS.Property.Color

@@ -560,3 +561,3 @@ /**

*/
accent?: CSS.ColorProperty
accent?: CSS.Property.Color

@@ -566,3 +567,3 @@ /**

*/
highlight?: CSS.ColorProperty
highlight?: CSS.Property.Color

@@ -573,5 +574,5 @@ /**

*/
muted?: CSS.ColorProperty
muted?: CSS.Property.Color
[k: string]: CSS.ColorProperty | Scale<CSS.ColorProperty> | undefined
[k: string]: CSS.Property.Color | Scale<CSS.Property.Color> | undefined
}

@@ -625,19 +626,19 @@

mediaQueries?: { [size: string]: string }
space?: Scale<CSS.MarginProperty<number | string>>
fontSizes?: Scale<CSS.FontSizeProperty<number>>
fonts?: Scale<CSS.FontFamilyProperty>
fontWeights?: Scale<CSS.FontWeightProperty>
lineHeights?: Scale<CSS.LineHeightProperty<TLengthStyledSystem>>
letterSpacings?: Scale<CSS.LetterSpacingProperty<TLengthStyledSystem>>
sizes?: Scale<CSS.HeightProperty<{}> | CSS.WidthProperty<{}>>
borders?: Scale<CSS.BorderProperty<{}>>
borderStyles?: Scale<CSS.BorderProperty<{}>>
borderWidths?: Scale<CSS.BorderWidthProperty<TLengthStyledSystem>>
radii?: Scale<CSS.BorderRadiusProperty<TLengthStyledSystem>>
shadows?: Scale<CSS.BoxShadowProperty>
zIndices?: Scale<CSS.ZIndexProperty>
space?: Scale<CSS.Property.Margin<number | string>>
fontSizes?: Scale<CSS.Property.FontSize<number>>
fonts?: Scale<CSS.Property.FontFamily>
fontWeights?: Scale<CSS.Property.FontWeight>
lineHeights?: Scale<CSS.Property.LineHeight<TLengthStyledSystem>>
letterSpacings?: Scale<CSS.Property.LetterSpacing<TLengthStyledSystem>>
sizes?: Scale<CSS.Property.Height<{}> | CSS.Property.Width<{}>>
borders?: Scale<CSS.Property.Border<{}>>
borderStyles?: Scale<CSS.Property.Border<{}>>
borderWidths?: Scale<CSS.Property.BorderWidth<TLengthStyledSystem>>
radii?: Scale<CSS.Property.BorderRadius<TLengthStyledSystem>>
shadows?: Scale<CSS.Property.BoxShadow>
zIndices?: Scale<CSS.Property.ZIndex>
colorStyles?: Scale<ThemeUICSSProperties>
textStyles?: Scale<ThemeUICSSProperties>
opacities?: Scale<CSS.OpacityProperty>
transitions?: Scale<CSS.TransitionProperty>
opacities?: Scale<CSS.Property.Opacity>
transitions?: Scale<CSS.Property.Transition>

@@ -830,1 +831,7 @@ /**

}
interface ThemeUITheme extends Theme {}
declare module '@emotion/react' {
export interface Theme extends ThemeUITheme {}
}

@@ -1,14 +0,9 @@

import { expecter } from 'ts-snippet'
import { expecter } from '@theme-ui/test-utils'
import { css, get, Theme } from '../src'
const expectSnippet = expecter(
(code) => `
const expectSnippet = expecter(`
import { css } from './packages/css/src'
`)
${code}
`,
{ strict: true, noErrorTruncation: true }
)
describe('Theme', () => {

@@ -28,3 +23,3 @@ test('shows friendly error only on bad property', () => {

`).toFail(
/Error snippet\.ts \(\d+,\d+\): Type '"foo"' is not assignable to type [\s\S]+'./
/Error snippet\.tsx \(\d+,\d+\): Type '"foo"' is not assignable to type [\s\S]+'./
)

@@ -44,3 +39,3 @@ })

new RegExp(
`Error snippet\\.ts \\(\\d+,\\d+\\): Type '{ color: string; widows: "bar"; }'` +
`Error snippet\.tsx \\(\\d+,\\d+\\): Type '{ color: "blue"; widows: "bar"; }'` +
` is not assignable to type '[\\s\\S]+'.\\n\\s+` +

@@ -168,5 +163,5 @@ `Types of property 'widows' are incompatible.\\n\\s+` +

expectedSnippet.toInfer('baseColors', '(string | undefined)[]')
expectedSnippet.toInfer('light', 'string')
expectedSnippet.toInfer('dark', 'string')
expectedSnippet.toInfer('baseColors', '((string & {}) | undefined)[]')
expectedSnippet.toInfer('light', 'Color')
expectedSnippet.toInfer('dark', 'Color')
})

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc