@vanilla-extract/sprinkles
Advanced tools
Comparing version 0.3.1 to 0.3.2
# @vanilla-extract/sprinkles | ||
## 0.3.2 | ||
### Patch Changes | ||
- [#150](https://github.com/seek-oss/vanilla-extract/pull/150) [`e59002a`](https://github.com/seek-oss/vanilla-extract/commit/e59002ae75faeaeaa585b71eafca8ee1ebf85849) Thanks [@markdalgleish](https://github.com/markdalgleish)! - Refactor responsive array type to use Tuple generic | ||
## 0.3.1 | ||
@@ -4,0 +10,0 @@ |
@@ -1,37 +0,16 @@ | ||
export declare type RA1<Value> = readonly [Value]; | ||
export declare type RA2<Value> = readonly [Value, Value]; | ||
export declare type RA3<Value> = readonly [Value, Value, Value]; | ||
export declare type RA4<Value> = readonly [Value, Value, Value, Value]; | ||
export declare type RA5<Value> = readonly [Value, Value, Value, Value, Value]; | ||
export declare type RA6<Value> = readonly [Value, Value, Value, Value, Value, Value]; | ||
export declare type RA7<Value> = readonly [ | ||
Value, | ||
Value, | ||
Value, | ||
Value, | ||
Value, | ||
Value, | ||
Value | ||
]; | ||
export declare type RA8<Value> = readonly [ | ||
Value, | ||
Value, | ||
Value, | ||
Value, | ||
Value, | ||
Value, | ||
Value, | ||
Value | ||
]; | ||
export declare type ResponsiveArrayConfig<Value> = RA2<Value> | RA3<Value> | RA4<Value> | RA5<Value> | RA6<Value> | RA7<Value> | RA8<Value>; | ||
interface Tuple<Length extends number, Value> extends ReadonlyArray<Value> { | ||
0: Value; | ||
length: Length; | ||
} | ||
export declare type ResponsiveArrayConfig<Value> = Tuple<2 | 3 | 5 | 6 | 7 | 8, Value>; | ||
export declare type ResponsiveArray<Count extends number, Value> = [ | ||
never, | ||
RA1<Value>, | ||
RA1<Value> | RA2<Value>, | ||
RA1<Value> | RA2<Value> | RA3<Value>, | ||
RA1<Value> | RA2<Value> | RA3<Value> | RA4<Value>, | ||
RA1<Value> | RA2<Value> | RA3<Value> | RA4<Value> | RA5<Value>, | ||
RA1<Value> | RA2<Value> | RA3<Value> | RA4<Value> | RA5<Value> | RA6<Value>, | ||
(RA1<Value> | RA2<Value> | RA3<Value> | RA4<Value> | RA5<Value> | RA6<Value> | RA7<Value>), | ||
(RA1<Value> | RA2<Value> | RA3<Value> | RA4<Value> | RA5<Value> | RA6<Value> | RA7<Value> | RA8<Value>) | ||
Tuple<1, Value>, | ||
Tuple<1 | 2, Value>, | ||
Tuple<1 | 2 | 3, Value>, | ||
Tuple<1 | 2 | 3 | 4, Value>, | ||
Tuple<1 | 2 | 3 | 4 | 5, Value>, | ||
Tuple<1 | 2 | 3 | 4 | 5 | 6, Value>, | ||
Tuple<1 | 2 | 3 | 4 | 5 | 6 | 7, Value>, | ||
Tuple<1 | 2 | 3 | 4 | 5 | 6 | 7 | 8, Value> | ||
][Count]; | ||
@@ -70,1 +49,2 @@ export declare type ConditionalPropertyValue = { | ||
}; | ||
export {}; |
{ | ||
"name": "@vanilla-extract/sprinkles", | ||
"version": "0.3.1", | ||
"version": "0.3.2", | ||
"description": "Zero-runtime atomic CSS framework for vanilla-extract", | ||
@@ -5,0 +5,0 @@ "sideEffects": false, |
@@ -35,3 +35,3 @@ # π¨ Sprinkles | ||
import { atoms } from './atoms.css.ts'; | ||
import { atoms } from './sprinkles.css.ts'; | ||
@@ -71,3 +71,3 @@ const flexDirection = Math.random() > 0.5 ? 'column' : 'row'; | ||
π₯ [Try it out for yourself in CodeSandbox.](https://codesandbox.io/s/github/seek-oss/vanilla-extract/tree/master/examples/webpack-react?file=/src/atoms.css.ts) | ||
π₯ [Try it out for yourself in CodeSandbox.](https://codesandbox.io/s/github/seek-oss/vanilla-extract/tree/master/examples/webpack-react?file=/src/sprinkles.css.ts) | ||
@@ -86,3 +86,3 @@ --- | ||
Create an `atoms.css.ts` file, then configure and export your `atoms` function. | ||
Create a `sprinkles.css.ts` file, then configure and export your `atoms` function. | ||
@@ -92,3 +92,3 @@ > π‘ This is just an example! Feel free to customise properties, values and conditions to match your requirements. | ||
```ts | ||
// atoms.css.ts | ||
// sprinkles.css.ts | ||
import { createAtomicStyles, createAtomsFn } from '@vanilla-extract/sprinkles'; | ||
@@ -164,3 +164,3 @@ | ||
// styles.css.ts | ||
import { atoms } from './atoms.css.ts'; | ||
import { atoms } from './sprinkles.css.ts'; | ||
@@ -188,3 +188,3 @@ export const container = atoms({ | ||
import { style, composeStyles } from '@vanilla-extract/css'; | ||
import { atoms } from './atoms.css.ts'; | ||
import { atoms } from './sprinkles.css.ts'; | ||
@@ -208,3 +208,3 @@ export const container = composeStyles( | ||
// app.ts | ||
import { atoms } from './atoms.css.ts'; | ||
import { atoms } from './sprinkles.css.ts'; | ||
@@ -510,3 +510,3 @@ const flexDirection = Math.random() > 0.5 ? 'column' : 'row'; | ||
This function should be created and exported from your `atoms.css.ts` file using the conditions from your atomic styles. | ||
This function should be created and exported from your `sprinkles.css.ts` file using the conditions from your atomic styles. | ||
@@ -531,3 +531,3 @@ You can name the generated function whatever you like, typically based on the name of your conditions. | ||
```ts | ||
import { mapResponsiveValue } from './atoms.css.ts'; | ||
import { mapResponsiveValue } from './sprinkles.css.ts'; | ||
@@ -564,3 +564,3 @@ const alignToFlexAlign = { | ||
This function should be created and exported from your `atoms.css.ts` file using the conditions from your atomic styles. | ||
This function should be created and exported from your `sprinkles.css.ts` file using the conditions from your atomic styles. | ||
@@ -585,3 +585,3 @@ > π‘ You can name the generated function whatever you like, typically based on the name of your conditions. | ||
```ts | ||
import { normalizeResponsiveValue } from './atoms.css.ts'; | ||
import { normalizeResponsiveValue } from './sprinkles.css.ts'; | ||
@@ -606,3 +606,3 @@ normalizeResponsiveValue('block'); | ||
This type should be created and exported from your `atoms.css.ts` file using the conditions from your atomic styles. | ||
This type should be created and exported from your `sprinkles.css.ts` file using the conditions from your atomic styles. | ||
@@ -622,3 +622,3 @@ You can name the generated type whatever you like, typically based on the name of your conditions. | ||
```ts | ||
import { ResponsiveValue } from './atoms.css.ts'; | ||
import { ResponsiveValue } from './sprinkles.css.ts'; | ||
@@ -625,0 +625,0 @@ type ResponsiveAlign = ResponsiveValue<'left' | 'center' | 'right'>; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
67113
1079