@veltra/styles 1.4.0 → 1.6.0

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/_mixins.scss CHANGED
@@ -178,7 +178,7 @@ $namespace: 'u' !default;
178
178
  }
179
179
 
180
180
  @mixin lg {
181
- @media screen and (min-width: breakpoint( md)) and (max-width: breakpoint(lg)) {
181
+ @media screen and (min-width: breakpoint(md)) and (max-width: breakpoint(lg)) {
182
182
  @content;
183
183
  }
184
184
  }
package/dist/_vars.scss CHANGED
@@ -11,18 +11,11 @@ $sizes: (small, default, large);
11
11
 
12
12
  // 颜色类别
13
13
  $color-types: (
14
- // 品牌色
15
14
  primary,
16
- // 成功色
17
15
  success,
18
- // 警告色
19
16
  warning,
20
- // 危险色
21
17
  danger,
22
- // 信息
23
18
  info,
24
- // 禁用色
25
19
  disabled,
26
- // 默认色
27
- default
20
+ default // 品牌色 // 成功色 // 警告色 // 危险色 // 信息 // 禁用色 // 默认色
28
21
  );
@@ -0,0 +1 @@
1
+ export {}
@@ -0,0 +1 @@
1
+ import "./shine.css";
@@ -0,0 +1,24 @@
1
+ .u-shine {
2
+ background: linear-gradient(100deg, var(--u-text-color-assist) 30%, var(--u-text-color-title) 50%, var(--u-text-color-assist) 70%);
3
+ background-size: 200% 100%;
4
+ background-clip: text;
5
+ -webkit-background-clip: text;
6
+ -webkit-text-fill-color: transparent;
7
+ animation: u-shine var(--u-shine-duration, 2.4s) linear infinite;
8
+ }
9
+ @media (prefers-reduced-motion: reduce) {
10
+ .u-shine {
11
+ animation: none;
12
+ background: none;
13
+ -webkit-text-fill-color: currentColor;
14
+ }
15
+ }
16
+
17
+ @keyframes u-shine {
18
+ from {
19
+ background-position: 200% 0;
20
+ }
21
+ to {
22
+ background-position: -200% 0;
23
+ }
24
+ }
@@ -0,0 +1,31 @@
1
+ // 全局文字扫光效果:背景渐变扫过文字(background-clip: text,纯 CSS + GPU 合成)。
2
+ // 任意元素添加 `u-shine` 类即可使用;通过 `--u-shine-duration` 覆盖动画时长。
3
+ .u-shine {
4
+ background: linear-gradient(
5
+ 100deg,
6
+ var(--u-text-color-assist) 30%,
7
+ var(--u-text-color-title) 50%,
8
+ var(--u-text-color-assist) 70%
9
+ );
10
+ background-size: 200% 100%;
11
+ background-clip: text;
12
+ -webkit-background-clip: text;
13
+ -webkit-text-fill-color: transparent;
14
+ animation: u-shine var(--u-shine-duration, 2.4s) linear infinite;
15
+
16
+ @media (prefers-reduced-motion: reduce) {
17
+ animation: none;
18
+ background: none;
19
+ -webkit-text-fill-color: currentColor;
20
+ }
21
+ }
22
+
23
+ @keyframes u-shine {
24
+ from {
25
+ background-position: 200% 0;
26
+ }
27
+
28
+ to {
29
+ background-position: -200% 0;
30
+ }
31
+ }
@@ -1 +1 @@
1
- export { };
1
+ export {}
@@ -1 +1 @@
1
- export { };
1
+ export {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veltra/styles",
3
- "version": "1.4.0",
3
+ "version": "1.6.0",
4
4
  "files": [
5
5
  "dist",
6
6
  "src"
@@ -9,12 +9,18 @@
9
9
  "sideEffects": [
10
10
  "**/*.css",
11
11
  "**/*.scss",
12
+ "src/animations/index.ts",
13
+ "dist/animations/index.js",
12
14
  "src/normalize/index.ts",
13
15
  "dist/normalize/index.js",
14
16
  "src/transitions/index.ts",
15
17
  "dist/transitions/index.js"
16
18
  ],
17
19
  "exports": {
20
+ "./animations": {
21
+ "import": "./dist/animations/index.js",
22
+ "default": "./dist/animations/index.js"
23
+ },
18
24
  "./transitions": {
19
25
  "import": "./dist/transitions/index.js",
20
26
  "default": "./dist/transitions/index.js"
@@ -36,8 +42,8 @@
36
42
  },
37
43
  "peerDependencies": {
38
44
  "@cat-kit/core": ">=1.1.8",
39
- "@veltra/compositions": "1.4.0",
40
- "@veltra/utils": "1.4.0",
41
- "vue": ">=3.5.40"
45
+ "@veltra/compositions": "^1.6.0",
46
+ "@veltra/utils": "^1.6.0",
47
+ "vue": ">=3.5.41"
42
48
  }
43
49
  }
package/src/_mixins.scss CHANGED
@@ -178,7 +178,7 @@ $namespace: 'u' !default;
178
178
  }
179
179
 
180
180
  @mixin lg {
181
- @media screen and (min-width: breakpoint( md)) and (max-width: breakpoint(lg)) {
181
+ @media screen and (min-width: breakpoint(md)) and (max-width: breakpoint(lg)) {
182
182
  @content;
183
183
  }
184
184
  }
package/src/_vars.scss CHANGED
@@ -11,18 +11,11 @@ $sizes: (small, default, large);
11
11
 
12
12
  // 颜色类别
13
13
  $color-types: (
14
- // 品牌色
15
14
  primary,
16
- // 成功色
17
15
  success,
18
- // 警告色
19
16
  warning,
20
- // 危险色
21
17
  danger,
22
- // 信息
23
18
  info,
24
- // 禁用色
25
19
  disabled,
26
- // 默认色
27
- default
20
+ default // 品牌色 // 成功色 // 警告色 // 危险色 // 信息 // 禁用色 // 默认色
28
21
  );
@@ -0,0 +1 @@
1
+ import './shine.scss'
@@ -0,0 +1,31 @@
1
+ // 全局文字扫光效果:背景渐变扫过文字(background-clip: text,纯 CSS + GPU 合成)。
2
+ // 任意元素添加 `u-shine` 类即可使用;通过 `--u-shine-duration` 覆盖动画时长。
3
+ .u-shine {
4
+ background: linear-gradient(
5
+ 100deg,
6
+ var(--u-text-color-assist) 30%,
7
+ var(--u-text-color-title) 50%,
8
+ var(--u-text-color-assist) 70%
9
+ );
10
+ background-size: 200% 100%;
11
+ background-clip: text;
12
+ -webkit-background-clip: text;
13
+ -webkit-text-fill-color: transparent;
14
+ animation: u-shine var(--u-shine-duration, 2.4s) linear infinite;
15
+
16
+ @media (prefers-reduced-motion: reduce) {
17
+ animation: none;
18
+ background: none;
19
+ -webkit-text-fill-color: currentColor;
20
+ }
21
+ }
22
+
23
+ @keyframes u-shine {
24
+ from {
25
+ background-position: 200% 0;
26
+ }
27
+
28
+ to {
29
+ background-position: -200% 0;
30
+ }
31
+ }