@carbon/themes 10.11.0-rc.1 → 10.11.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/sass.md +0 -53
- package/package.json +7 -7
- package/scss/_mixins.scss +0 -23
package/docs/sass.md
CHANGED
|
@@ -13,7 +13,6 @@
|
|
|
13
13
|
- [❌custom-property [mixin]](#custom-property-mixin)
|
|
14
14
|
- [❌should-emit [function]](#should-emit-function)
|
|
15
15
|
- [✅carbon--theme [mixin]](#carbon--theme-mixin)
|
|
16
|
-
- [❌emit-component-tokens [mixin]](#emit-component-tokens-mixin)
|
|
17
16
|
- [✅carbon--theme--g10 [variable]](#carbon--theme--g10-variable)
|
|
18
17
|
- [✅carbon--theme--g90 [variable]](#carbon--theme--g90-variable)
|
|
19
18
|
- [✅carbon--theme--g100 [variable]](#carbon--theme--g100-variable)
|
|
@@ -165,7 +164,6 @@ $custom-property-prefix: 'cds';
|
|
|
165
164
|
- **Group**: [@carbon/themes](#carbonthemes)
|
|
166
165
|
- **Used by**:
|
|
167
166
|
- [carbon--theme [mixin]](#carbon--theme-mixin)
|
|
168
|
-
- [emit-component-tokens [mixin]](#emit-component-tokens-mixin)
|
|
169
167
|
|
|
170
168
|
### ❌custom-property [mixin]
|
|
171
169
|
|
|
@@ -2124,56 +2122,6 @@ Define theme variables from a map of tokens
|
|
|
2124
2122
|
- [icon-size-02 [variable]](#icon-size-02-variable)
|
|
2125
2123
|
- [custom-property-prefix [variable]](#custom-property-prefix-variable)
|
|
2126
2124
|
|
|
2127
|
-
### ❌emit-component-tokens [mixin]
|
|
2128
|
-
|
|
2129
|
-
<details>
|
|
2130
|
-
<summary>Source code</summary>
|
|
2131
|
-
|
|
2132
|
-
```scss
|
|
2133
|
-
@mixin emit-component-tokens($tokens, $theme) {
|
|
2134
|
-
@if type-of($tokens) == 'map' {
|
|
2135
|
-
@each $key, $options in $tokens {
|
|
2136
|
-
@each $option in $options {
|
|
2137
|
-
$theme: map-get($option, 'theme');
|
|
2138
|
-
|
|
2139
|
-
@if ($theme == $carbon--theme) {
|
|
2140
|
-
$value: map-get($option, 'value');
|
|
2141
|
-
|
|
2142
|
-
--#{$custom-property-prefix}-#{$key}: #{$value};
|
|
2143
|
-
}
|
|
2144
|
-
}
|
|
2145
|
-
}
|
|
2146
|
-
} @else {
|
|
2147
|
-
@error 'Unable to find map';
|
|
2148
|
-
}
|
|
2149
|
-
}
|
|
2150
|
-
```
|
|
2151
|
-
|
|
2152
|
-
</details>
|
|
2153
|
-
|
|
2154
|
-
- **Parameters**:
|
|
2155
|
-
|
|
2156
|
-
| Name | Description | Type | Default value |
|
|
2157
|
-
| --------- | ----------------------- | -------- | ------------- |
|
|
2158
|
-
| `$tokens` | Map of component tokens | `Map` | — |
|
|
2159
|
-
| `$theme` | Theme identifier | `String` | — |
|
|
2160
|
-
|
|
2161
|
-
**Example**:
|
|
2162
|
-
|
|
2163
|
-
<details>
|
|
2164
|
-
<summary>Example code</summary>
|
|
2165
|
-
|
|
2166
|
-
```scss
|
|
2167
|
-
@include emit-component-tokens($component-tokens);
|
|
2168
|
-
```
|
|
2169
|
-
|
|
2170
|
-
</details>
|
|
2171
|
-
|
|
2172
|
-
- **Group**: [@carbon/themes](#carbonthemes)
|
|
2173
|
-
- **Requires**:
|
|
2174
|
-
- [carbon--theme [variable]](#carbon--theme-variable)
|
|
2175
|
-
- [custom-property-prefix [variable]](#custom-property-prefix-variable)
|
|
2176
|
-
|
|
2177
2125
|
### ✅carbon--theme--g10 [variable]
|
|
2178
2126
|
|
|
2179
2127
|
Carbon's g10 color theme
|
|
@@ -2574,7 +2522,6 @@ $carbon--theme: (
|
|
|
2574
2522
|
- **Type**: `Map`
|
|
2575
2523
|
- **Used by**:
|
|
2576
2524
|
- [carbon--theme [mixin]](#carbon--theme-mixin)
|
|
2577
|
-
- [emit-component-tokens [mixin]](#emit-component-tokens-mixin)
|
|
2578
2525
|
|
|
2579
2526
|
### ✅interactive-01 [variable]
|
|
2580
2527
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carbon/themes",
|
|
3
3
|
"description": "Themes for applying color in the Carbon Design System",
|
|
4
|
-
"version": "10.11.
|
|
4
|
+
"version": "10.11.2",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"module": "es/index.js",
|
|
@@ -24,15 +24,15 @@
|
|
|
24
24
|
"build": "yarn clean && bundler bundle src/index.js --name CarbonThemes && node tasks/build.js && bundler check \"scss/*.scss\" && bundler sassdoc \"scss/**/*.scss\""
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@carbon/colors": "^10.9.
|
|
28
|
-
"@carbon/layout": "^10.9.
|
|
29
|
-
"@carbon/type": "^10.10.
|
|
27
|
+
"@carbon/colors": "^10.9.2",
|
|
28
|
+
"@carbon/layout": "^10.9.2",
|
|
29
|
+
"@carbon/type": "^10.10.2",
|
|
30
30
|
"color": "^3.1.2"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@carbon/cli-reporter": "^10.3.0",
|
|
34
|
-
"@carbon/scss-generator": "^10.7.0
|
|
35
|
-
"@carbon/test-utils": "^10.8.
|
|
34
|
+
"@carbon/scss-generator": "^10.7.0",
|
|
35
|
+
"@carbon/test-utils": "^10.8.2",
|
|
36
36
|
"change-case": "^4.1.1",
|
|
37
37
|
"core-js": "^3.0.1",
|
|
38
38
|
"fs-extra": "^8.1.0",
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"node-sass": "^4.13.1",
|
|
41
41
|
"rimraf": "^3.0.0"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "cfd0ba01acd634c767515d9a5198031e83708e99"
|
|
44
44
|
}
|
package/scss/_mixins.scss
CHANGED
|
@@ -34,29 +34,6 @@ $custom-property-prefix: 'cds' !default;
|
|
|
34
34
|
@return map-get($theme-a, $token) != map-get($theme-b, $token);
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
/// @access private
|
|
38
|
-
/// @param {Map} $tokens - Map of component tokens
|
|
39
|
-
/// @param {String} $theme - Theme identifier
|
|
40
|
-
/// @example @include emit-component-tokens($component-tokens);
|
|
41
|
-
/// @group @carbon/themes
|
|
42
|
-
@mixin emit-component-tokens($tokens) {
|
|
43
|
-
@if type-of($tokens) == 'map' {
|
|
44
|
-
@each $key, $options in $tokens {
|
|
45
|
-
@each $option in $options {
|
|
46
|
-
$theme: map-get($option, 'theme');
|
|
47
|
-
|
|
48
|
-
@if ($theme == $carbon--theme) {
|
|
49
|
-
$value: map-get($option, 'value');
|
|
50
|
-
|
|
51
|
-
--#{$custom-property-prefix}-#{$key}: #{$value};
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
} @else {
|
|
56
|
-
@error 'Unable to find map';
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
37
|
// We import mixins last so that these methods are made available to the
|
|
61
38
|
// carbon--theme mixin
|
|
62
39
|
@import './generated/mixins';
|