Skip to content

Commit

Permalink
Version Packages (#1476)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
vanilla-extract-ci and github-actions[bot] authored Oct 1, 2024
1 parent 7a18842 commit 284098c
Show file tree
Hide file tree
Showing 24 changed files with 212 additions and 110 deletions.
5 changes: 0 additions & 5 deletions .changeset/cold-eyes-rescue.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/good-wombats-doubt.md

This file was deleted.

20 changes: 0 additions & 20 deletions .changeset/purple-cheetahs-hear.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/twelve-pans-dress.md

This file was deleted.

6 changes: 6 additions & 0 deletions packages/babel-plugin-debug-ids/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @vanilla-extract/babel-plugin-debug-ids

## 1.1.0

### Minor Changes

- [#1450](https://github.com/vanilla-extract-css/vanilla-extract/pull/1450) [`7b256d2`](https://github.com/vanilla-extract-css/vanilla-extract/commit/7b256d2a8ee815911ee96199abe78d6b7246c415) Thanks [@wuz](https://github.com/wuz)! - Add support for the new `createViewTransition` API

## 1.0.6

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-plugin-debug-ids/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vanilla-extract/babel-plugin-debug-ids",
"version": "1.0.6",
"version": "1.1.0",
"description": "Zero-runtime Stylesheets-in-TypeScript",
"main": "dist/vanilla-extract-babel-plugin-debug-ids.cjs.js",
"module": "dist/vanilla-extract-babel-plugin-debug-ids.esm.js",
Expand Down
119 changes: 79 additions & 40 deletions packages/css/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
# @vanilla-extract/css

## 1.16.0

### Minor Changes

- [#1475](https://github.com/vanilla-extract-css/vanilla-extract/pull/1475) [`cd9d8b2`](https://github.com/vanilla-extract-css/vanilla-extract/commit/cd9d8b231bbd7a7ac6674d2b28f77cff93e5be9e) Thanks [@corradopetrelli](https://github.com/corradopetrelli)! - Add `::-webkit-calendar-picker-indicator` as a valid pseudo-element

- [#1450](https://github.com/vanilla-extract-css/vanilla-extract/pull/1450) [`7b256d2`](https://github.com/vanilla-extract-css/vanilla-extract/commit/7b256d2a8ee815911ee96199abe78d6b7246c415) Thanks [@wuz](https://github.com/wuz)! - Add `createViewTransition` API

`createViewTransition` creates a single scoped view transition name for use with CSS View Transitions. This avoids potential naming collisions with other view transitions.

```ts
import {
style,
createViewTransition
} from '@vanilla-extract/css';

export const titleViewTransition = createViewTransition();

export const pageTitle = style({
viewTransitionName: titleViewTransition
});
```

## 1.15.5

### Patch Changes
Expand Down Expand Up @@ -54,12 +77,12 @@
globalFontFace(gentium, [
{
src: 'local("Gentium")',
fontWeight: 'normal',
fontWeight: 'normal'
},
{
src: 'local("Gentium Bold")',
fontWeight: 'bold',
},
fontWeight: 'bold'
}
]);
```

Expand Down Expand Up @@ -110,16 +133,16 @@
const gentium = fontFace([
{
src: 'local("Gentium")',
fontWeight: 'normal',
fontWeight: 'normal'
},
{
src: 'local("Gentium Bold")',
fontWeight: 'bold',
},
fontWeight: 'bold'
}
]);
export const font = style({
fontFamily: gentium,
fontFamily: gentium
});
```

Expand Down Expand Up @@ -152,9 +175,9 @@
export const standard = style({
'@layer': {
[typography]: {
fontSize: '1rem',
},
},
fontSize: '1rem'
}
}
});
```

Expand Down Expand Up @@ -225,7 +248,7 @@
const identifier = generateIdentifier({
debugId,
debugFileName: false,
debugFileName: false
});
```

Expand All @@ -244,20 +267,23 @@
`createContainer` creates a single scoped container name for use with CSS Container Queries. This avoids potential naming collisions with other containers.

```ts
import { style, createContainer } from '@vanilla-extract/css';
import {
style,
createContainer
} from '@vanilla-extract/css';
export const sidebarContainer = createContainer();
export const sidebar = style({
containerName: sidebarContainer,
containerName: sidebarContainer
});
export const navigation = style({
'@container': {
[`${sidebarContainer} (min-width: 400px)`]: {
display: 'flex',
},
},
display: 'flex'
}
}
});
```

Expand All @@ -269,9 +295,9 @@
export const myStyle = style({
'@container': {
'(min-width: 400px)': {
display: 'flex',
},
},
display: 'flex'
}
}
});
```

Expand Down Expand Up @@ -409,9 +435,15 @@
const base = style({ padding: 12 });
export const primary = style([base, { background: 'blue' }]);
export const primary = style([
base,
{ background: 'blue' }
]);
export const secondary = style([base, { background: 'aqua' }]);
export const secondary = style([
base,
{ background: 'aqua' }
]);
```

When composed styles are used in selectors, they are assigned an additional class if required so they can be uniquely identified. When selectors are processed internally, the composed classes are removed, only leaving behind the unique identifier classes. This allows you to treat them as if they were a single class within vanilla-extract selectors.
Expand All @@ -425,7 +457,7 @@
export const container = style([background, padding]);

globalStyle(`${container} *`, {
boxSizing: 'border-box',
boxSizing: 'border-box'
});
```
Expand All @@ -450,25 +482,25 @@
// themes.css.ts
import {
createGlobalThemeContract,
createGlobalTheme,
createGlobalTheme
} from '@vanilla-extract/css';

export const vars = createGlobalThemeContract({
color: {
brand: 'color-brand',
brand: 'color-brand'
},
font: {
body: 'font-body',
},
body: 'font-body'
}
});

createGlobalTheme(':root', vars, {
color: {
brand: 'blue',
brand: 'blue'
},
font: {
body: 'arial',
},
body: 'arial'
}
});
```
Expand All @@ -483,13 +515,13 @@
export const vars = createGlobalThemeContract(
{
color: {
brand: 'color-brand',
brand: 'color-brand'
},
font: {
body: 'font-body',
},
body: 'font-body'
}
},
(value) => `prefix-${value}`,
(value) => `prefix-${value}`
);
```
Expand All @@ -502,13 +534,13 @@
export const vars = createGlobalThemeContract(
{
color: {
brand: null,
brand: null
},
font: {
body: null,
},
body: null
}
},
(_value, path) => `prefix-${path.join('-')}`,
(_value, path) => `prefix-${path.join('-')}`
);
```
Expand Down Expand Up @@ -541,15 +573,22 @@
When style compositions are used in selectors, they are now assigned an additional class so they can be uniquely identified. When selectors are processed internally, the composed classes are removed, only leaving behind the unique identifier classes. This allows you to treat them as if they were a single class within vanilla-extract selectors.
```ts
import { style, globalStyle, composeStyles } from '@vanilla-extract/css';
import {
style,
globalStyle,
composeStyles
} from '@vanilla-extract/css';

const background = style({ background: 'mintcream' });
const padding = style({ padding: 12 });

export const container = composeStyles(background, padding);
export const container = composeStyles(
background,
padding
);

globalStyle(`${container} *`, {
boxSizing: 'border-box',
boxSizing: 'border-box'
});
```
Expand Down
2 changes: 1 addition & 1 deletion packages/css/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vanilla-extract/css",
"version": "1.15.5",
"version": "1.16.0",
"description": "Zero-runtime Stylesheets-in-TypeScript",
"sideEffects": true,
"main": "dist/vanilla-extract-css.cjs.js",
Expand Down
Loading

0 comments on commit 284098c

Please sign in to comment.