forked from facebook/stylex
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: update dependencies and type definitions (facebook#755)
* chore: Update Flow and type defs * chore: update more dependencies * chore: update eslint deps * chore: rollup and types updated * chore: update terser * release: v0.9.0-beta.1 * chore: fix babel rollup bundling
- Loading branch information
Showing
33 changed files
with
4,531 additions
and
3,328 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[version] | ||
0.245.2 | ||
0.249.0 | ||
|
||
[ignore] | ||
.*/build/.* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
{ | ||
"name": "stylex-cli-example", | ||
"version": "0.8.0", | ||
"version": "0.9.0-beta.1", | ||
"private": true, | ||
"scripts": { | ||
"transform": "stylex --config .stylex.json5" | ||
}, | ||
"dependencies": { | ||
"@stylexjs/open-props": "0.8.0", | ||
"@stylexjs/open-props": "0.9.0-beta.1", | ||
"react": "^18", | ||
"react-dom": "^18" | ||
}, | ||
"devDependencies": { | ||
"@babel/preset-react": "^7.24.1", | ||
"@babel/preset-typescript": "^7.24.1", | ||
"@stylexjs/cli": "0.8.0", | ||
"@types/react": "^18", | ||
"@types/react-dom": "^18", | ||
"@babel/preset-react": "^7.25.7", | ||
"@babel/preset-typescript": "^7.25.7", | ||
"@stylexjs/cli": "0.9.0-beta.1", | ||
"@types/react": "^18.3.11", | ||
"@types/react-dom": "^18.3.1", | ||
"typescript": "^5" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
apps/nextjs-example/typetests/theming/ButtonTokenThemes.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/** | ||
* Copyright (c) Meta Platforms, Inc. and affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
* | ||
* | ||
*/ | ||
|
||
import type { Theme } from '@stylexjs/stylex'; | ||
|
||
import { ButtonTokens } from './ButtonTokens.stylex'; | ||
|
||
import * as stylex from '@stylexjs/stylex'; | ||
|
||
/* eslint-disable no-unused-vars */ | ||
|
||
const fdsRed: Theme<typeof ButtonTokens> = stylex.createTheme(ButtonTokens, { | ||
bgColor: 'red', | ||
color: 'white', | ||
height: 'var(--button-height-medium)', | ||
opacity: '1', | ||
}); | ||
|
||
const fdsBlue: Theme<typeof ButtonTokens> = stylex.createTheme(ButtonTokens, { | ||
bgColor: 'blue', | ||
color: 'white', | ||
height: 'var(--button-height-medium)', | ||
opacity: '1', | ||
}); | ||
|
||
const styles = stylex.create({ | ||
test1: { | ||
padding: 4, | ||
color: ButtonTokens.color, | ||
backgroundColor: `color-mix(in oklch, ${ButtonTokens.bgColor}, 'white')`, | ||
}, | ||
}); |
27 changes: 27 additions & 0 deletions
27
apps/nextjs-example/typetests/theming/ButtonTokens.stylex.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/** | ||
* Copyright (c) Meta Platforms, Inc. and affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
* | ||
* | ||
*/ | ||
|
||
import type { VarGroup } from '@stylexjs/stylex'; | ||
import * as stylex from '@stylexjs/stylex'; | ||
|
||
declare const ButtonTokensTag: unique symbol; | ||
export const ButtonTokens: VarGroup< | ||
Readonly<{ | ||
bgColor: string; | ||
color: string; | ||
height: string; | ||
opacity: string; | ||
}>, | ||
typeof ButtonTokensTag | ||
> = stylex.defineVars({ | ||
bgColor: 'var(--secondary-button-background)', | ||
color: 'currentcolor', | ||
height: 'var(--button-height-medium)', | ||
opacity: '1', | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.