-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(Layout): add v10 layout tokens (#13783)
* fix(Layout): add v10 layout tokens * test(Layout): add tests for spacing tokens * fix(Themes): add layout tokens to theme map * test(snapshot): update snapshots --------- Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
- Loading branch information
1 parent
7ef9cb9
commit 8548b83
Showing
19 changed files
with
251 additions
and
5 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,4 @@ | |
|
||
@forward './generated/fluid-spacing'; | ||
@forward './generated/spacing'; | ||
@forward './generated/layout'; |
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
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
56 changes: 56 additions & 0 deletions
56
packages/styles/scss/__tests__/__snapshots__/spacing-test.js.snap
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,56 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`@carbon/styles/scss/spacing Public API 1`] = ` | ||
Object { | ||
"variables": Object { | ||
"fluid-spacing-01": 0, | ||
"fluid-spacing-02": "2vw", | ||
"fluid-spacing-03": "5vw", | ||
"fluid-spacing-04": "10vw", | ||
"layout": Object { | ||
"layout-01": "1rem", | ||
"layout-02": "1.5rem", | ||
"layout-03": "2rem", | ||
"layout-04": "3rem", | ||
"layout-05": "4rem", | ||
"layout-06": "6rem", | ||
"layout-07": "10rem", | ||
}, | ||
"layout-01": "1rem", | ||
"layout-02": "1.5rem", | ||
"layout-03": "2rem", | ||
"layout-04": "3rem", | ||
"layout-05": "4rem", | ||
"layout-06": "6rem", | ||
"layout-07": "10rem", | ||
"spacing": Object { | ||
"spacing-01": "0.125rem", | ||
"spacing-02": "0.25rem", | ||
"spacing-03": "0.5rem", | ||
"spacing-04": "0.75rem", | ||
"spacing-05": "1rem", | ||
"spacing-06": "1.5rem", | ||
"spacing-07": "2rem", | ||
"spacing-08": "2.5rem", | ||
"spacing-09": "3rem", | ||
"spacing-10": "4rem", | ||
"spacing-11": "5rem", | ||
"spacing-12": "6rem", | ||
"spacing-13": "10rem", | ||
}, | ||
"spacing-01": "0.125rem", | ||
"spacing-02": "0.25rem", | ||
"spacing-03": "0.5rem", | ||
"spacing-04": "0.75rem", | ||
"spacing-05": "1rem", | ||
"spacing-06": "1.5rem", | ||
"spacing-07": "2rem", | ||
"spacing-08": "2.5rem", | ||
"spacing-09": "3rem", | ||
"spacing-10": "4rem", | ||
"spacing-11": "5rem", | ||
"spacing-12": "6rem", | ||
"spacing-13": "10rem", | ||
}, | ||
} | ||
`; |
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,31 @@ | ||
/** | ||
* Copyright IBM Corp. 2018, 2023 | ||
* | ||
* This source code is licensed under the Apache-2.0 license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
* | ||
* @jest-environment node | ||
*/ | ||
|
||
'use strict'; | ||
|
||
const { SassRenderer } = require('@carbon/test-utils/scss'); | ||
|
||
const { render } = SassRenderer.create(__dirname); | ||
|
||
describe('@carbon/styles/scss/spacing', () => { | ||
test('Public API', async () => { | ||
const { get } = await render(` | ||
@use 'sass:meta'; | ||
@use '../spacing'; | ||
$_: get('api', ( | ||
variables: meta.module-variables('spacing'), | ||
)); | ||
`); | ||
|
||
const { value: api } = get('api'); | ||
|
||
expect(api).toMatchSnapshot(); | ||
}); | ||
}); |
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
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
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