@gct-paas/scss 0.1.6-dev.27 → 0.1.6-dev.28
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/dist/index.esm.min.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! @gct-paas/scss v0.1.6-dev.
|
|
1
|
+
/*! @gct-paas/scss v0.1.6-dev.28 */
|
|
2
2
|
function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(e,r,n){return(r=function(e){var r=function(e){if("object"!=t(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=t(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==t(r)?r:r+""}(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function r(t,e,r,n,o){let s=`${t}-${e}`;return r&&(s+=`-${r}`),n&&(s+=`__${n}`),o&&(s+=`--${o}`),s}var n=class{constructor(t,r){e(this,"block",void 0),e(this,"namespace",void 0),this.block=t,this.namespace=r||"gct"}b(t=""){return r(this.namespace,this.block,t,"","")}e(t){return t?r(this.namespace,this.block,"",t,""):""}m(t){return t?r(this.namespace,this.block,"","",t):""}be(t,e){return t&&e?r(this.namespace,this.block,t,e,""):""}em(t,e){return t&&e?r(this.namespace,this.block,"",t,e):""}bm(t,e){return t&&e?r(this.namespace,this.block,t,"",e):""}bem(t,e,n){return t&&e&&n?r(this.namespace,this.block,t,e,n):""}is(t,e){return t&&e?`is-${t}`:""}cssVar(t){const e={};for(const r in t)t[r]&&(e[this.cssVarName(r)]=t[r]);return e}cssVarBlock(t){const e={};for(const r in t)t[r]&&(e[this.cssVarBlockName(r)]=t[r]);return e}cssVarName(t){return`--${this.namespace}-${t}`}cssVarBlockName(t){return`--${this.namespace}-${this.block}-${t}`}};function o(t){return new n(t)}export{n as Namespace,o as useNamespace};
|
package/docs/theme-tokens.md
CHANGED
|
@@ -24,6 +24,36 @@ This document outlines all design tokens available in the light theme.
|
|
|
24
24
|
| `--gct--blue-11` | RGB(1, 60, 114) |
|
|
25
25
|
| `--gct--blue-12` | RGB(1, 48, 90) |
|
|
26
26
|
|
|
27
|
+
#### Runtime Theme Color (Light)
|
|
28
|
+
|
|
29
|
+
Light theme supports two pre-defined primary palettes, switched via CSS class on `html`:
|
|
30
|
+
|
|
31
|
+
| `themeSetting.themeColor` | Class on `html` | Blue-8 (Primary) |
|
|
32
|
+
|---------------------------|-----------------|------------------|
|
|
33
|
+
| `#026AC8` (default) | _(none)_ | RGB(2, 106, 200) |
|
|
34
|
+
| `#0DAA9C` | `theme-color-teal` | RGB(13, 170, 156) |
|
|
35
|
+
|
|
36
|
+
When `theme-color-teal` is present on `.light` / `.light-theme`, only `--gct-blue-1` through `--gct-blue-12` are overridden. Semantic tokens (`--gct-color-primary`, info, link, border hover/active) cascade automatically.
|
|
37
|
+
|
|
38
|
+
**Teal palette** (`theme-color-teal`):
|
|
39
|
+
|
|
40
|
+
| Token | Value |
|
|
41
|
+
|-------|-------|
|
|
42
|
+
| `--gct--blue-1` | RGB(248, 252, 252) |
|
|
43
|
+
| `--gct--blue-2` | RGB(233, 247, 246) |
|
|
44
|
+
| `--gct--blue-3` | RGB(211, 240, 237) |
|
|
45
|
+
| `--gct--blue-4` | RGB(207, 238, 235) |
|
|
46
|
+
| `--gct--blue-5` | RGB(170, 225, 220) |
|
|
47
|
+
| `--gct--blue-6` | RGB(134, 213, 206) |
|
|
48
|
+
| `--gct--blue-7` | RGB(66, 189, 178) |
|
|
49
|
+
| `--gct--blue-8` | RGB(13, 170, 156) |
|
|
50
|
+
| `--gct--blue-9` | RGB(12, 156, 144) |
|
|
51
|
+
| `--gct--blue-10` | RGB(11, 139, 128) |
|
|
52
|
+
| `--gct--blue-11` | RGB(9, 122, 112) |
|
|
53
|
+
| `--gct--blue-12` | RGB(8, 109, 100) |
|
|
54
|
+
|
|
55
|
+
Switching is handled by `useThemeSetting` in `@gct-paas/core` — set `themeSetting.themeColor` to one of `THEME_COLORS` (`#026AC8` | `#0DAA9C`).
|
|
56
|
+
|
|
27
57
|
### Red (Danger)
|
|
28
58
|
| Token | Value |
|
|
29
59
|
|-------|-------|
|
package/package.json
CHANGED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
@use '../../global.scss' as *;
|
|
2
|
+
|
|
3
|
+
// 默认主色 #026AC8
|
|
4
|
+
@mixin blue-palette-blue {
|
|
5
|
+
#{getCssVarName(blue, 1)}: 246, 250, 253;
|
|
6
|
+
#{getCssVarName(blue, 2)}: 226, 238, 249;
|
|
7
|
+
#{getCssVarName(blue, 3)}: 200, 223, 243;
|
|
8
|
+
#{getCssVarName(blue, 4)}: 191, 216, 242;
|
|
9
|
+
#{getCssVarName(blue, 5)}: 144, 187, 233;
|
|
10
|
+
#{getCssVarName(blue, 6)}: 91, 156, 225;
|
|
11
|
+
#{getCssVarName(blue, 7)}: 48, 126, 210;
|
|
12
|
+
#{getCssVarName(blue, 8)}: 2, 106, 200;
|
|
13
|
+
#{getCssVarName(blue, 9)}: 2, 90, 170;
|
|
14
|
+
#{getCssVarName(blue, 10)}: 1, 75, 142;
|
|
15
|
+
#{getCssVarName(blue, 11)}: 1, 60, 114;
|
|
16
|
+
#{getCssVarName(blue, 12)}: 1, 48, 90;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// 青绿主色 #0DAA9C
|
|
20
|
+
@mixin blue-palette-teal {
|
|
21
|
+
#{getCssVarName(blue, 1)}: 248, 252, 252;
|
|
22
|
+
#{getCssVarName(blue, 2)}: 233, 247, 246;
|
|
23
|
+
#{getCssVarName(blue, 3)}: 211, 240, 237;
|
|
24
|
+
#{getCssVarName(blue, 4)}: 207, 238, 235;
|
|
25
|
+
#{getCssVarName(blue, 5)}: 170, 225, 220;
|
|
26
|
+
#{getCssVarName(blue, 6)}: 134, 213, 206;
|
|
27
|
+
#{getCssVarName(blue, 7)}: 66, 189, 178;
|
|
28
|
+
#{getCssVarName(blue, 8)}: 13, 170, 156;
|
|
29
|
+
#{getCssVarName(blue, 9)}: 12, 156, 144;
|
|
30
|
+
#{getCssVarName(blue, 10)}: 11, 139, 128;
|
|
31
|
+
#{getCssVarName(blue, 11)}: 9, 122, 112;
|
|
32
|
+
#{getCssVarName(blue, 12)}: 8, 109, 100;
|
|
33
|
+
}
|
|
@@ -1,22 +1,11 @@
|
|
|
1
1
|
@use '../../global.scss' as *;
|
|
2
|
+
@use './blue-palettes' as *;
|
|
2
3
|
|
|
3
4
|
.light, .light-theme {
|
|
4
5
|
#{getCssVarName(color, white)}: white;
|
|
5
6
|
#{getCssVarName(color, black)}: black;
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
#{getCssVarName(blue, 1)}: 246, 250, 253;
|
|
9
|
-
#{getCssVarName(blue, 2)}: 226, 238, 249;
|
|
10
|
-
#{getCssVarName(blue, 3)}: 200, 223, 243;
|
|
11
|
-
#{getCssVarName(blue, 4)}: 191, 216, 242;
|
|
12
|
-
#{getCssVarName(blue, 5)}: 144, 187, 233;
|
|
13
|
-
#{getCssVarName(blue, 6)}: 91, 156, 225;
|
|
14
|
-
#{getCssVarName(blue, 7)}: 48, 126, 210;
|
|
15
|
-
#{getCssVarName(blue, 8)}: 2, 106, 200;
|
|
16
|
-
#{getCssVarName(blue, 9)}: 2, 90, 170;
|
|
17
|
-
#{getCssVarName(blue, 10)}: 1, 75, 142;
|
|
18
|
-
#{getCssVarName(blue, 11)}: 1, 60, 114;
|
|
19
|
-
#{getCssVarName(blue, 12)}: 1, 48, 90;
|
|
8
|
+
@include blue-palette-blue;
|
|
20
9
|
|
|
21
10
|
// 危险色
|
|
22
11
|
#{getCssVarName(red, 1)}: 254, 236, 221;
|
|
@@ -280,3 +269,8 @@
|
|
|
280
269
|
#{getCssVarName(z-index, l)}: 2000;
|
|
281
270
|
#{getCssVarName(z-index, xl)}: 9999;
|
|
282
271
|
}
|
|
272
|
+
|
|
273
|
+
.light.theme-color-teal,
|
|
274
|
+
.light-theme.theme-color-teal {
|
|
275
|
+
@include blue-palette-teal;
|
|
276
|
+
}
|