@aifuxi/semi-theme-modern 0.0.0 → 1.2.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/CHANGELOG.md ADDED
@@ -0,0 +1,17 @@
1
+ # Changelog
2
+
3
+ ## 1.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#22](https://github.com/aifuxi/semi-ui-vue/pull/22) [`1eeeafb`](https://github.com/aifuxi/semi-ui-vue/commit/1eeeafb1c2b6e07b9de3a7c72e8d32d429328c3a) Thanks [@aifuxi](https://github.com/aifuxi)! - 新增可选现代主题样式,将默认圆角调整为 4、8、16、24px。
8
+
9
+ ### Patch Changes
10
+
11
+ - [#22](https://github.com/aifuxi/semi-ui-vue/pull/22) [`3ed9983`](https://github.com/aifuxi/semi-ui-vue/commit/3ed9983a823188ee9b30465e4a7c8917b7f33b09) Thanks [@aifuxi](https://github.com/aifuxi)! - 为 borderless Button 的 hover 和 active 背景增加轻微内侧层次。
12
+
13
+ - [#22](https://github.com/aifuxi/semi-ui-vue/pull/22) [`71afeee`](https://github.com/aifuxi/semi-ui-vue/commit/71afeee379144250490d3a6795325352c8351923) Thanks [@aifuxi](https://github.com/aifuxi)! - 为 Dropdown、Popover、Tooltip 和普通 Modal 增加适配明暗模式的轻微内侧层次,保留浮层原有外投影。
14
+
15
+ - [#22](https://github.com/aifuxi/semi-ui-vue/pull/22) [`1d0fb1d`](https://github.com/aifuxi/semi-ui-vue/commit/1d0fb1d96b01050161140dd2d9484879139eb4b3) Thanks [@aifuxi](https://github.com/aifuxi)! - 增强 solid Button 的内侧层次,并让独立 bordered Card 只使用现代主题的边缘阴影。
16
+
17
+ - [#22](https://github.com/aifuxi/semi-ui-vue/pull/22) [`c37e53a`](https://github.com/aifuxi/semi-ui-vue/commit/c37e53a2a99a766076a6015e7cb2675244658b31) Thanks [@aifuxi](https://github.com/aifuxi)! - 为 Button 与 Card 增加适配明暗主题的轻微内侧描边和阴影,并保留现有状态样式。
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 aifuxi
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,33 @@
1
1
  # @aifuxi/semi-theme-modern
2
2
 
3
- 此 `0.0.0` 版本仅用于在 npm 创建包并配置 Trusted Publisher,使用 `bootstrap` 标签发布,不作为正式组件库版本。正式版本从经过验证的 `1.2.0` 原始 tarball 通过 GitHub Actions 发布。
3
+ 本包是 Semi UI Vue 的可选现代主题样式,覆盖默认主题的圆角变量,并为 Button、Card 与浮层容器增加轻微的内侧层次。它不是 Semi Design 官方发布的主题。
4
+
5
+ 圆角比例如下:
6
+
7
+ | Semi token | 值 |
8
+ | ---------------------------------- | -----: |
9
+ | `--semi-border-radius-extra-small` | `4px` |
10
+ | `--semi-border-radius-small` | `8px` |
11
+ | `--semi-border-radius-medium` | `16px` |
12
+ | `--semi-border-radius-large` | `24px` |
13
+
14
+ 圆形和胶囊圆角沿用默认主题的 `50%` 与 `9999px`。
15
+
16
+ Button 的 `solid`、`light` 状态增加内侧高光、细描边和轻微外投影;`solid` 按填充色使用单独且更清晰的层次。`borderless` 静止时保持透明且无阴影,在 hover 和 active 出现背景时使用与 `light` 相同的细边缘层次。`outline`、禁用按钮与 ButtonGroup 保持原有阴影。独立且 `bordered` 的 Card 只使用较淡的边缘效果,包括 `shadows="always"` 与 `shadows="hover"` 的悬浮状态,不再叠加原有的大阴影;无边框卡片与 CardGroup 网格仍沿用组件原有样式。颜色随浅色、深色及局部主题切换,组件尺寸、背景色和焦点轮廓不变。
17
+
18
+ Dropdown、Popover 与复用 Popover 容器的 Popconfirm 和选择面板增加极淡的内侧边缘,保留原有的浮层外投影。Tooltip 按自身明暗背景使用独立边缘效果,不增加外投影。普通 Modal 仅补更弱的内侧高光,保留实体边框与外投影;全屏 Modal 沿用原样。遮罩、箭头与浮层内部控件不增加容器阴影。
19
+
20
+ 先安装可选主题:
21
+
22
+ ```sh
23
+ pnpm add @aifuxi/semi-theme-modern
24
+ ```
25
+
26
+ 然后在应用入口中先导入组件库默认主题,再导入本包:
27
+
28
+ ```ts
29
+ import '@aifuxi/semi-theme-default';
30
+ import '@aifuxi/semi-theme-modern';
31
+ ```
32
+
33
+ 本包覆盖浅色、深色以及 Semi 的 `semi-always-light` / `semi-always-dark` 局部主题变量。若不导入本包,默认主题样式保持不变。
@@ -0,0 +1,53 @@
1
+ {
2
+ "spdxVersion": "SPDX-2.3",
3
+ "dataLicense": "CC0-1.0",
4
+ "SPDXID": "SPDXRef-DOCUMENT",
5
+ "name": "@aifuxi/semi-theme-modern-1.2.0",
6
+ "documentNamespace": "https://github.com/aifuxi/semi-ui-vue/spdx/%40aifuxi%2Fsemi-theme-modern/1.2.0/cdfba6e520fc83ad871b30f51f36d8af3aaa5a21/11824373821d72c8",
7
+ "documentDescribes": [
8
+ "SPDXRef-Package-Workspace"
9
+ ],
10
+ "creationInfo": {
11
+ "created": "2026-09-27T11:19:27.162Z",
12
+ "creators": [
13
+ "Tool: semi-ui-vue-workspace"
14
+ ]
15
+ },
16
+ "packages": [
17
+ {
18
+ "SPDXID": "SPDXRef-Package-Workspace",
19
+ "name": "@aifuxi/semi-theme-modern",
20
+ "versionInfo": "1.2.0",
21
+ "supplier": "Person: aifuxi",
22
+ "downloadLocation": "https://github.com/aifuxi/semi-ui-vue",
23
+ "filesAnalyzed": false,
24
+ "licenseConcluded": "MIT",
25
+ "licenseDeclared": "MIT",
26
+ "primaryPackagePurpose": "LIBRARY"
27
+ },
28
+ {
29
+ "SPDXID": "SPDXRef-Package-Semi-Design",
30
+ "name": "@douyinfe/semi-design",
31
+ "versionInfo": "2.102.0",
32
+ "supplier": "Organization: DouyinFE",
33
+ "downloadLocation": "https://github.com/DouyinFE/semi-design",
34
+ "filesAnalyzed": false,
35
+ "licenseConcluded": "MIT",
36
+ "licenseDeclared": "MIT",
37
+ "externalRefs": [
38
+ {
39
+ "referenceCategory": "PACKAGE-MANAGER",
40
+ "referenceType": "purl",
41
+ "referenceLocator": "pkg:github/DouyinFE/semi-design@cdfba6e520fc83ad871b30f51f36d8af3aaa5a21"
42
+ }
43
+ ]
44
+ }
45
+ ],
46
+ "relationships": [
47
+ {
48
+ "spdxElementId": "SPDXRef-Package-Workspace",
49
+ "relationshipType": "DERIVED_FROM",
50
+ "relatedSpdxElement": "SPDXRef-Package-Semi-Design"
51
+ }
52
+ ]
53
+ }
@@ -0,0 +1,83 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2021 DouyinFE
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
23
+ The code implementation of the external library is referenced by DouyinFe are:
24
+
25
+ - animate.css
26
+
27
+ The MIT License (MIT)
28
+
29
+ Copyright (c) 2020 Daniel Eden
30
+
31
+ Permission is hereby granted, free of charge, to any person obtaining a copy
32
+ of this software and associated documentation files (the "Software"), to deal
33
+ in the Software without restriction, including without limitation the rights
34
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
35
+ copies of the Software, and to permit persons to whom the Software is
36
+ furnished to do so, subject to the following conditions:
37
+
38
+ The above copyright notice and this permission notice shall be included in all
39
+ copies or substantial portions of the Software.
40
+
41
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
42
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
43
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
44
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
45
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
46
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
47
+ SOFTWARE.
48
+
49
+ - Ant Design
50
+ MIT LICENSE
51
+
52
+ Copyright (c) 2015-present Ant UED, https://xtech.antfin.com/
53
+
54
+ Permission is hereby granted, free of charge, to any person obtaining
55
+ a copy of this software and associated documentation files (the
56
+ "Software"), to deal in the Software without restriction, including
57
+ without limitation the rights to use, copy, modify, merge, publish,
58
+ distribute, sublicense, and/or sell copies of the Software, and to
59
+ permit persons to whom the Software is furnished to do so, subject to
60
+ the following conditions:
61
+
62
+ The above copyright notice and this permission notice shall be
63
+ included in all copies or substantial portions of the Software.
64
+
65
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
66
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
67
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
68
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
69
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
70
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
71
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
72
+
73
+ - rc-tree
74
+
75
+ MIT LICENSE
76
+
77
+ Copyright (c) 2015-present Alipay.com, https://www.alipay.com/
78
+
79
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
80
+
81
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
82
+
83
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,11 @@
1
+ # Third-Party Notices
2
+
3
+ This package is part of an independent Vue implementation derived from or interoperating with Semi Design v2.102.0. It is not an official Semi Design Vue package and does not imply authorization, partnership, or endorsement by DouyinFE.
4
+
5
+ - Project: Semi Design
6
+ - Copyright: Copyright (c) 2021 DouyinFE
7
+ - License: MIT, including the upstream third-party notices
8
+ - Source: https://github.com/DouyinFE/semi-design
9
+ - Reference commit: cdfba6e520fc83ad871b30f51f36d8af3aaa5a21
10
+
11
+ The complete upstream license and notices are included at `THIRD_PARTY_LICENSES/Semi-Design.txt`.
package/dist/index.css ADDED
@@ -0,0 +1,88 @@
1
+ /* Semi UI Vue 现代主题:在默认主题之后导入。 */
2
+ body,
3
+ body[theme-mode=dark] .semi-always-light,
4
+ :host,
5
+ :host .semi-always-light {
6
+ --semi-border-radius-extra-small: 4px;
7
+ --semi-border-radius-small: 8px;
8
+ --semi-border-radius-medium: 16px;
9
+ --semi-border-radius-large: 24px;
10
+ --semi-modern-button-surface-shadow:
11
+ inset 0 1px 0 rgba(255, 255, 255, 0.18), inset 0 0 0 1px rgba(0, 0, 0, 0.035),
12
+ 0 1px 2px rgba(0, 0, 0, 0.04);
13
+ --semi-modern-button-solid-shadow:
14
+ inset 0 1px 0 rgba(255, 255, 255, 0.38), inset 0 -1px 0 rgba(0, 0, 0, 0.12),
15
+ inset 0 0 0 1px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.1);
16
+ --semi-modern-card-edge-shadow:
17
+ inset 0 1px 0 rgba(255, 255, 255, 0.5), inset 0 0 0 1px rgba(0, 0, 0, 0.025),
18
+ 0 1px 3px rgba(0, 0, 0, 0.035);
19
+ --semi-modern-overlay-edge-shadow:
20
+ inset 0 1px 0 rgba(255, 255, 255, 0.42), inset 0 0 0 1px rgba(0, 0, 0, 0.025);
21
+ --semi-modern-modal-edge-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.26);
22
+ --semi-modern-tooltip-edge-shadow:
23
+ inset 0 1px 0 rgba(255, 255, 255, 0.12), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
24
+ }
25
+
26
+ body[theme-mode=dark],
27
+ body .semi-always-dark,
28
+ :host([theme-mode=dark]),
29
+ :host .semi-always-dark {
30
+ --semi-border-radius-extra-small: 4px;
31
+ --semi-border-radius-small: 8px;
32
+ --semi-border-radius-medium: 16px;
33
+ --semi-border-radius-large: 24px;
34
+ --semi-modern-button-surface-shadow:
35
+ inset 0 1px 0 rgba(255, 255, 255, 0.1), inset 0 0 0 1px rgba(255, 255, 255, 0.05),
36
+ 0 1px 2px rgba(0, 0, 0, 0.16);
37
+ --semi-modern-button-solid-shadow:
38
+ inset 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 -1px 0 rgba(0, 0, 0, 0.18),
39
+ inset 0 0 0 1px rgba(0, 0, 0, 0.14), 0 2px 4px rgba(0, 0, 0, 0.22);
40
+ --semi-modern-card-edge-shadow:
41
+ inset 0 1px 0 rgba(255, 255, 255, 0.045), inset 0 0 0 1px rgba(255, 255, 255, 0.045),
42
+ 0 1px 3px rgba(0, 0, 0, 0.16);
43
+ /* 深色基线的 elevated 阴影已有内描边,这里只补顶部高光。 */
44
+ --semi-modern-overlay-edge-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.075);
45
+ --semi-modern-modal-edge-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055);
46
+ --semi-modern-tooltip-edge-shadow:
47
+ inset 0 1px 0 rgba(255, 255, 255, 0.28), inset 0 0 0 1px rgba(0, 0, 0, 0.06);
48
+ }
49
+
50
+ /* 填充按钮增加层次,solid 按自身填充色使用更清晰的内侧高光。 */
51
+ .semi-button.semi-button-solid:not(.semi-button-disabled):not(.semi-button-group .semi-button) {
52
+ box-shadow: var(--semi-modern-button-solid-shadow);
53
+ }
54
+
55
+ .semi-button.semi-button-light:not(.semi-button-disabled):not(.semi-button-group .semi-button) {
56
+ box-shadow: var(--semi-modern-button-surface-shadow);
57
+ }
58
+
59
+ /* borderless 仅在交互时出现背景,此时沿用 light 的细边缘层次。 */
60
+ .semi-button.semi-button-borderless:not(.semi-button-disabled):not(.semi-button-group .semi-button):is(:hover, :active) {
61
+ box-shadow: var(--semi-modern-button-surface-shadow);
62
+ }
63
+
64
+ /* 独立卡片只保留细边缘层次,网格卡片仍沿用组件本身的分隔。 */
65
+ .semi-card.semi-card-bordered:not(.semi-card-group-grid > .semi-card) {
66
+ box-shadow: var(--semi-modern-card-edge-shadow);
67
+ }
68
+
69
+ .semi-card.semi-card-bordered.semi-card-shadows-always:not(.semi-card-group-grid > .semi-card),
70
+ .semi-card.semi-card-bordered.semi-card-shadows-hover:not(.semi-card-group-grid > .semi-card):hover {
71
+ box-shadow: var(--semi-modern-card-edge-shadow);
72
+ }
73
+
74
+ /* Popconfirm 与选择面板复用 Popover 表面,只在最外层添加一次边缘效果。 */
75
+ .semi-dropdown-wrapper,
76
+ .semi-popover-wrapper {
77
+ box-shadow: var(--semi-modern-overlay-edge-shadow), var(--semi-shadow-elevated);
78
+ }
79
+
80
+ /* Tooltip 的灰色表面随明暗模式反转,单独配色且不新增外投影。 */
81
+ .semi-tooltip-wrapper {
82
+ box-shadow: var(--semi-modern-tooltip-edge-shadow);
83
+ }
84
+
85
+ /* Modal 已有实体边框;全屏内容不需要额外的内侧高光。 */
86
+ .semi-modal-content:not(.semi-modal-content-fullScreen) {
87
+ box-shadow: var(--semi-modern-modal-edge-shadow), var(--semi-shadow-elevated);
88
+ }
package/package.json CHANGED
@@ -1,16 +1,54 @@
1
1
  {
2
2
  "name": "@aifuxi/semi-theme-modern",
3
- "version": "0.0.0",
4
- "description": "用于启用 npm Trusted Publisher 的首次发布占位版本。",
3
+ "version": "1.2.0",
4
+ "description": "面向 @aifuxi/semi-ui-vue 的可选现代主题圆角覆盖样式。",
5
5
  "license": "MIT",
6
+ "author": "aifuxi",
7
+ "keywords": [
8
+ "semi-design",
9
+ "vue",
10
+ "theme",
11
+ "css",
12
+ "modern"
13
+ ],
6
14
  "repository": {
7
15
  "type": "git",
8
16
  "url": "git+https://github.com/aifuxi/semi-ui-vue.git",
9
17
  "directory": "packages/theme-modern"
10
18
  },
19
+ "homepage": "https://github.com/aifuxi/semi-ui-vue#readme",
20
+ "bugs": {
21
+ "url": "https://github.com/aifuxi/semi-ui-vue/issues"
22
+ },
11
23
  "publishConfig": {
12
24
  "access": "public",
13
25
  "registry": "https://registry.npmjs.org/"
14
26
  },
15
- "files": ["README.md"]
16
- }
27
+ "type": "module",
28
+ "sideEffects": [
29
+ "**/*.css",
30
+ "**/*.scss"
31
+ ],
32
+ "style": "./dist/index.css",
33
+ "files": [
34
+ "LICENSE",
35
+ "README.md",
36
+ "CHANGELOG.md",
37
+ "dist"
38
+ ],
39
+ "exports": {
40
+ ".": {
41
+ "style": "./dist/index.css",
42
+ "default": "./dist/index.css"
43
+ },
44
+ "./index.css": "./dist/index.css",
45
+ "./package.json": "./package.json"
46
+ },
47
+ "devDependencies": {
48
+ "sass": "1.54.9"
49
+ },
50
+ "scripts": {
51
+ "build": "rimraf dist && sass --no-source-map --no-charset src/index.scss dist/index.css && node ../../scripts/write-compliance-artifacts.mjs .",
52
+ "clean": "rimraf dist"
53
+ }
54
+ }