@webitel/styleguide 26.8.4 → 26.8.6
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/package.json +1 -1
- package/src/lib/styleguide/token-generation/apps/agent-workspace-app/Dark.tokens.json +11 -0
- package/src/lib/styleguide/token-generation/apps/agent-workspace-app/Light.tokens.json +11 -0
- package/src/lib/styleguide/token-generation/apps/agent-workspace-app/dist/ws/sidebar-menu/colors/dark/index.css +3 -0
- package/src/lib/styleguide/token-generation/apps/agent-workspace-app/dist/ws/sidebar-menu/colors/index.css +2 -0
- package/src/lib/styleguide/token-generation/apps/agent-workspace-app/dist/ws/sidebar-menu/colors/light/index.css +3 -0
- package/src/lib/styleguide/token-generation/script/transform/format-value.ts +8 -1
package/package.json
CHANGED
|
@@ -3482,6 +3482,17 @@
|
|
|
3482
3482
|
},
|
|
3483
3483
|
"Sidebar menu": {
|
|
3484
3484
|
"Colors": {
|
|
3485
|
+
"background": {
|
|
3486
|
+
"$type": "string",
|
|
3487
|
+
"$value": "linear-gradient(45deg,rgba(10, 17, 92, 1) 0%, rgba(111, 27, 126, 1) 100%)",
|
|
3488
|
+
"$extensions": {
|
|
3489
|
+
"com.figma.variableId": "VariableID:9707:23665",
|
|
3490
|
+
"com.figma.scopes": [
|
|
3491
|
+
"ALL_SCOPES"
|
|
3492
|
+
],
|
|
3493
|
+
"com.figma.type": "string"
|
|
3494
|
+
}
|
|
3495
|
+
},
|
|
3485
3496
|
"Button": {
|
|
3486
3497
|
"Filled": {
|
|
3487
3498
|
"background": {
|
|
@@ -3494,6 +3494,17 @@
|
|
|
3494
3494
|
},
|
|
3495
3495
|
"Sidebar menu": {
|
|
3496
3496
|
"Colors": {
|
|
3497
|
+
"background": {
|
|
3498
|
+
"$type": "string",
|
|
3499
|
+
"$value": "linear-gradient(45deg,rgba(20, 34, 184, 1) 0%, rgba(192, 66, 215, 1) 100%)",
|
|
3500
|
+
"$extensions": {
|
|
3501
|
+
"com.figma.variableId": "VariableID:9707:23665",
|
|
3502
|
+
"com.figma.scopes": [
|
|
3503
|
+
"ALL_SCOPES"
|
|
3504
|
+
],
|
|
3505
|
+
"com.figma.type": "string"
|
|
3506
|
+
}
|
|
3507
|
+
},
|
|
3497
3508
|
"Button": {
|
|
3498
3509
|
"Filled": {
|
|
3499
3510
|
"background": {
|
|
@@ -71,6 +71,13 @@ export function resolveValue(
|
|
|
71
71
|
};
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
+
/** Some designers include a trailing ";" directly in a string token's value (e.g. a
|
|
75
|
+
* hand-written "linear-gradient(...);"). Strip it so buildCssFile()'s own ";" doesn't
|
|
76
|
+
* end up doubled in the generated CSS declaration. */
|
|
77
|
+
function stripTrailingSemicolon(value: string): string {
|
|
78
|
+
return value.trim().replace(/;+\s*$/, '');
|
|
79
|
+
}
|
|
80
|
+
|
|
74
81
|
/** Format a resolved value according to its $type. */
|
|
75
82
|
export function formatValue(type: TokenType, value: TokenValue): string {
|
|
76
83
|
switch (type) {
|
|
@@ -79,7 +86,7 @@ export function formatValue(type: TokenType, value: TokenValue): string {
|
|
|
79
86
|
case 'number':
|
|
80
87
|
return toPx(value as number);
|
|
81
88
|
case 'string':
|
|
82
|
-
return String(value);
|
|
89
|
+
return stripTrailingSemicolon(String(value));
|
|
83
90
|
default:
|
|
84
91
|
throw new Error(`Непідтримуваний $type токена: ${type}`);
|
|
85
92
|
}
|