@douyinfe/semi-foundation 2.90.13 → 2.91.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/button/button.scss +1 -1
- package/button/variables.scss +32 -32
- package/cascader/variables.scss +13 -13
- package/checkbox/variables.scss +19 -19
- package/datePicker/variables.scss +15 -15
- package/inputNumber/foundation.ts +1 -1
- package/jsonViewer/jsonViewer.scss +3 -0
- package/jsonViewer/variables.scss +3 -0
- package/lib/cjs/button/button.scss +1 -1
- package/lib/cjs/button/variables.scss +32 -32
- package/lib/cjs/cascader/variables.scss +13 -13
- package/lib/cjs/checkbox/variables.scss +19 -19
- package/lib/cjs/datePicker/variables.scss +15 -15
- package/lib/cjs/inputNumber/foundation.js +1 -1
- package/lib/cjs/jsonViewer/jsonViewer.css +4 -0
- package/lib/cjs/jsonViewer/jsonViewer.scss +3 -0
- package/lib/cjs/jsonViewer/variables.scss +3 -0
- package/lib/cjs/navigation/variables.scss +9 -9
- package/lib/cjs/radio/variables.scss +22 -22
- package/lib/cjs/select/variables.scss +27 -28
- package/lib/cjs/sidebar/animation.scss +7 -0
- package/lib/cjs/sidebar/constants.d.ts +37 -0
- package/lib/cjs/sidebar/constants.js +43 -0
- package/lib/cjs/sidebar/containerFoundation.d.ts +42 -0
- package/lib/cjs/sidebar/containerFoundation.js +50 -0
- package/lib/cjs/sidebar/mcpCofContentFoundation.d.ts +52 -0
- package/lib/cjs/sidebar/mcpCofContentFoundation.js +74 -0
- package/lib/cjs/sidebar/sidebar.css +533 -0
- package/lib/cjs/sidebar/sidebar.scss +677 -0
- package/lib/cjs/sidebar/utils.d.ts +3 -0
- package/lib/cjs/sidebar/utils.js +28 -0
- package/lib/cjs/sidebar/variables.scss +138 -0
- package/lib/cjs/switch/variables.scss +30 -30
- package/lib/cjs/table/variables.scss +18 -19
- package/lib/cjs/tabs/variables.scss +5 -5
- package/lib/cjs/upload/variables.scss +10 -10
- package/lib/es/button/button.scss +1 -1
- package/lib/es/button/variables.scss +32 -32
- package/lib/es/cascader/variables.scss +13 -13
- package/lib/es/checkbox/variables.scss +19 -19
- package/lib/es/datePicker/variables.scss +15 -15
- package/lib/es/inputNumber/foundation.js +1 -1
- package/lib/es/jsonViewer/jsonViewer.css +4 -0
- package/lib/es/jsonViewer/jsonViewer.scss +3 -0
- package/lib/es/jsonViewer/variables.scss +3 -0
- package/lib/es/navigation/variables.scss +9 -9
- package/lib/es/radio/variables.scss +22 -22
- package/lib/es/select/variables.scss +27 -28
- package/lib/es/sidebar/animation.scss +7 -0
- package/lib/es/sidebar/constants.d.ts +37 -0
- package/lib/es/sidebar/constants.js +38 -0
- package/lib/es/sidebar/containerFoundation.d.ts +42 -0
- package/lib/es/sidebar/containerFoundation.js +42 -0
- package/lib/es/sidebar/mcpCofContentFoundation.d.ts +52 -0
- package/lib/es/sidebar/mcpCofContentFoundation.js +66 -0
- package/lib/es/sidebar/sidebar.css +533 -0
- package/lib/es/sidebar/sidebar.scss +677 -0
- package/lib/es/sidebar/utils.d.ts +3 -0
- package/lib/es/sidebar/utils.js +21 -0
- package/lib/es/sidebar/variables.scss +138 -0
- package/lib/es/switch/variables.scss +30 -30
- package/lib/es/table/variables.scss +18 -19
- package/lib/es/tabs/variables.scss +5 -5
- package/lib/es/upload/variables.scss +10 -10
- package/navigation/variables.scss +9 -9
- package/package.json +124 -4
- package/radio/variables.scss +22 -22
- package/select/variables.scss +27 -28
- package/sidebar/animation.scss +7 -0
- package/sidebar/constants.ts +41 -0
- package/sidebar/containerFoundation.ts +77 -0
- package/sidebar/mcpCofContentFoundation.ts +106 -0
- package/sidebar/sidebar.scss +677 -0
- package/sidebar/utils.ts +26 -0
- package/sidebar/variables.scss +138 -0
- package/switch/variables.scss +30 -30
- package/table/variables.scss +18 -19
- package/tabs/variables.scss +5 -5
- package/upload/variables.scss +10 -10
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@douyinfe/semi-foundation",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.91.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"clean": "rimraf lib",
|
|
@@ -6483,6 +6483,126 @@
|
|
|
6483
6483
|
"require": "./lib/cjs/sideSheet/variables.scss",
|
|
6484
6484
|
"default": "./lib/es/sideSheet/variables.scss"
|
|
6485
6485
|
},
|
|
6486
|
+
"./lib/es/sidebar/animation.scss": {
|
|
6487
|
+
"import": "./lib/es/sidebar/animation.scss",
|
|
6488
|
+
"require": "./lib/cjs/sidebar/animation.scss",
|
|
6489
|
+
"default": "./lib/es/sidebar/animation.scss"
|
|
6490
|
+
},
|
|
6491
|
+
"./sidebar/animation.scss": {
|
|
6492
|
+
"import": "./lib/es/sidebar/animation.scss",
|
|
6493
|
+
"require": "./lib/cjs/sidebar/animation.scss",
|
|
6494
|
+
"default": "./lib/es/sidebar/animation.scss"
|
|
6495
|
+
},
|
|
6496
|
+
"./lib/es/sidebar/constants.js": {
|
|
6497
|
+
"types": "./lib/es/sidebar/constants.d.ts",
|
|
6498
|
+
"import": "./lib/es/sidebar/constants.js",
|
|
6499
|
+
"require": "./lib/cjs/sidebar/constants.js"
|
|
6500
|
+
},
|
|
6501
|
+
"./lib/es/sidebar/constants": {
|
|
6502
|
+
"types": "./lib/es/sidebar/constants.d.ts",
|
|
6503
|
+
"import": "./lib/es/sidebar/constants.js",
|
|
6504
|
+
"require": "./lib/cjs/sidebar/constants.js"
|
|
6505
|
+
},
|
|
6506
|
+
"./sidebar/constants.js": {
|
|
6507
|
+
"types": "./lib/es/sidebar/constants.d.ts",
|
|
6508
|
+
"import": "./lib/es/sidebar/constants.js",
|
|
6509
|
+
"require": "./lib/cjs/sidebar/constants.js"
|
|
6510
|
+
},
|
|
6511
|
+
"./sidebar/constants": {
|
|
6512
|
+
"types": "./lib/es/sidebar/constants.d.ts",
|
|
6513
|
+
"import": "./lib/es/sidebar/constants.js",
|
|
6514
|
+
"require": "./lib/cjs/sidebar/constants.js"
|
|
6515
|
+
},
|
|
6516
|
+
"./lib/es/sidebar/containerFoundation.js": {
|
|
6517
|
+
"types": "./lib/es/sidebar/containerFoundation.d.ts",
|
|
6518
|
+
"import": "./lib/es/sidebar/containerFoundation.js",
|
|
6519
|
+
"require": "./lib/cjs/sidebar/containerFoundation.js"
|
|
6520
|
+
},
|
|
6521
|
+
"./lib/es/sidebar/containerFoundation": {
|
|
6522
|
+
"types": "./lib/es/sidebar/containerFoundation.d.ts",
|
|
6523
|
+
"import": "./lib/es/sidebar/containerFoundation.js",
|
|
6524
|
+
"require": "./lib/cjs/sidebar/containerFoundation.js"
|
|
6525
|
+
},
|
|
6526
|
+
"./sidebar/containerFoundation.js": {
|
|
6527
|
+
"types": "./lib/es/sidebar/containerFoundation.d.ts",
|
|
6528
|
+
"import": "./lib/es/sidebar/containerFoundation.js",
|
|
6529
|
+
"require": "./lib/cjs/sidebar/containerFoundation.js"
|
|
6530
|
+
},
|
|
6531
|
+
"./sidebar/containerFoundation": {
|
|
6532
|
+
"types": "./lib/es/sidebar/containerFoundation.d.ts",
|
|
6533
|
+
"import": "./lib/es/sidebar/containerFoundation.js",
|
|
6534
|
+
"require": "./lib/cjs/sidebar/containerFoundation.js"
|
|
6535
|
+
},
|
|
6536
|
+
"./lib/es/sidebar/mcpCofContentFoundation.js": {
|
|
6537
|
+
"types": "./lib/es/sidebar/mcpCofContentFoundation.d.ts",
|
|
6538
|
+
"import": "./lib/es/sidebar/mcpCofContentFoundation.js",
|
|
6539
|
+
"require": "./lib/cjs/sidebar/mcpCofContentFoundation.js"
|
|
6540
|
+
},
|
|
6541
|
+
"./lib/es/sidebar/mcpCofContentFoundation": {
|
|
6542
|
+
"types": "./lib/es/sidebar/mcpCofContentFoundation.d.ts",
|
|
6543
|
+
"import": "./lib/es/sidebar/mcpCofContentFoundation.js",
|
|
6544
|
+
"require": "./lib/cjs/sidebar/mcpCofContentFoundation.js"
|
|
6545
|
+
},
|
|
6546
|
+
"./sidebar/mcpCofContentFoundation.js": {
|
|
6547
|
+
"types": "./lib/es/sidebar/mcpCofContentFoundation.d.ts",
|
|
6548
|
+
"import": "./lib/es/sidebar/mcpCofContentFoundation.js",
|
|
6549
|
+
"require": "./lib/cjs/sidebar/mcpCofContentFoundation.js"
|
|
6550
|
+
},
|
|
6551
|
+
"./sidebar/mcpCofContentFoundation": {
|
|
6552
|
+
"types": "./lib/es/sidebar/mcpCofContentFoundation.d.ts",
|
|
6553
|
+
"import": "./lib/es/sidebar/mcpCofContentFoundation.js",
|
|
6554
|
+
"require": "./lib/cjs/sidebar/mcpCofContentFoundation.js"
|
|
6555
|
+
},
|
|
6556
|
+
"./lib/es/sidebar/sidebar.css": {
|
|
6557
|
+
"import": "./lib/es/sidebar/sidebar.css",
|
|
6558
|
+
"require": "./lib/cjs/sidebar/sidebar.css",
|
|
6559
|
+
"default": "./lib/es/sidebar/sidebar.css"
|
|
6560
|
+
},
|
|
6561
|
+
"./sidebar/sidebar.css": {
|
|
6562
|
+
"import": "./lib/es/sidebar/sidebar.css",
|
|
6563
|
+
"require": "./lib/cjs/sidebar/sidebar.css",
|
|
6564
|
+
"default": "./lib/es/sidebar/sidebar.css"
|
|
6565
|
+
},
|
|
6566
|
+
"./lib/es/sidebar/sidebar.scss": {
|
|
6567
|
+
"import": "./lib/es/sidebar/sidebar.scss",
|
|
6568
|
+
"require": "./lib/cjs/sidebar/sidebar.scss",
|
|
6569
|
+
"default": "./lib/es/sidebar/sidebar.scss"
|
|
6570
|
+
},
|
|
6571
|
+
"./sidebar/sidebar.scss": {
|
|
6572
|
+
"import": "./lib/es/sidebar/sidebar.scss",
|
|
6573
|
+
"require": "./lib/cjs/sidebar/sidebar.scss",
|
|
6574
|
+
"default": "./lib/es/sidebar/sidebar.scss"
|
|
6575
|
+
},
|
|
6576
|
+
"./lib/es/sidebar/utils.js": {
|
|
6577
|
+
"types": "./lib/es/sidebar/utils.d.ts",
|
|
6578
|
+
"import": "./lib/es/sidebar/utils.js",
|
|
6579
|
+
"require": "./lib/cjs/sidebar/utils.js"
|
|
6580
|
+
},
|
|
6581
|
+
"./lib/es/sidebar/utils": {
|
|
6582
|
+
"types": "./lib/es/sidebar/utils.d.ts",
|
|
6583
|
+
"import": "./lib/es/sidebar/utils.js",
|
|
6584
|
+
"require": "./lib/cjs/sidebar/utils.js"
|
|
6585
|
+
},
|
|
6586
|
+
"./sidebar/utils.js": {
|
|
6587
|
+
"types": "./lib/es/sidebar/utils.d.ts",
|
|
6588
|
+
"import": "./lib/es/sidebar/utils.js",
|
|
6589
|
+
"require": "./lib/cjs/sidebar/utils.js"
|
|
6590
|
+
},
|
|
6591
|
+
"./sidebar/utils": {
|
|
6592
|
+
"types": "./lib/es/sidebar/utils.d.ts",
|
|
6593
|
+
"import": "./lib/es/sidebar/utils.js",
|
|
6594
|
+
"require": "./lib/cjs/sidebar/utils.js"
|
|
6595
|
+
},
|
|
6596
|
+
"./lib/es/sidebar/variables.scss": {
|
|
6597
|
+
"import": "./lib/es/sidebar/variables.scss",
|
|
6598
|
+
"require": "./lib/cjs/sidebar/variables.scss",
|
|
6599
|
+
"default": "./lib/es/sidebar/variables.scss"
|
|
6600
|
+
},
|
|
6601
|
+
"./sidebar/variables.scss": {
|
|
6602
|
+
"import": "./lib/es/sidebar/variables.scss",
|
|
6603
|
+
"require": "./lib/cjs/sidebar/variables.scss",
|
|
6604
|
+
"default": "./lib/es/sidebar/variables.scss"
|
|
6605
|
+
},
|
|
6486
6606
|
"./lib/es/skeleton/animation.scss": {
|
|
6487
6607
|
"import": "./lib/es/skeleton/animation.scss",
|
|
6488
6608
|
"require": "./lib/cjs/skeleton/animation.scss",
|
|
@@ -9375,8 +9495,8 @@
|
|
|
9375
9495
|
}
|
|
9376
9496
|
},
|
|
9377
9497
|
"dependencies": {
|
|
9378
|
-
"@douyinfe/semi-animation": "2.
|
|
9379
|
-
"@douyinfe/semi-json-viewer-core": "2.
|
|
9498
|
+
"@douyinfe/semi-animation": "2.91.0",
|
|
9499
|
+
"@douyinfe/semi-json-viewer-core": "2.91.0",
|
|
9380
9500
|
"@mdx-js/mdx": "^3.0.1",
|
|
9381
9501
|
"async-validator": "^3.5.0",
|
|
9382
9502
|
"classnames": "^2.2.6",
|
|
@@ -9397,7 +9517,7 @@
|
|
|
9397
9517
|
"*.scss",
|
|
9398
9518
|
"*.css"
|
|
9399
9519
|
],
|
|
9400
|
-
"gitHead": "
|
|
9520
|
+
"gitHead": "ead51562c1d0499a5fcde1d828d57d3fd3d2b314",
|
|
9401
9521
|
"devDependencies": {
|
|
9402
9522
|
"@babel/plugin-transform-runtime": "^7.15.8",
|
|
9403
9523
|
"@babel/preset-env": "^7.15.8",
|
package/radio/variables.scss
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
$color-radio_default-border-default: var(--semi-color-text-3); //
|
|
2
|
-
$color-radio_default-bg-default: transparent; //
|
|
3
|
-
$color-radio_default-bg-hover: var(--semi-color-fill-0); //
|
|
4
|
-
$color-radio_default-bg-active: var(--semi-color-fill-1); //
|
|
5
|
-
$color-radio_default-border-hover: var(--semi-color-focus-border); //
|
|
6
|
-
$color-radio_checked-border-hover: var(--semi-color-primary-hover); //
|
|
7
|
-
$color-radio_checked-border-active: var(--semi-color-primary-active); //
|
|
1
|
+
$color-radio_default-border-default: var(--semi-color-text-3); // 单选圆圈描边颜色 - 默认态
|
|
2
|
+
$color-radio_default-bg-default: transparent; // 单选圆圈背景颜色 - 默认态
|
|
3
|
+
$color-radio_default-bg-hover: var(--semi-color-fill-0); // 单选圆圈背景颜色 - 悬浮态
|
|
4
|
+
$color-radio_default-bg-active: var(--semi-color-fill-1); // 单选圆圈背景颜色 - 按下态
|
|
5
|
+
$color-radio_default-border-hover: var(--semi-color-focus-border); // 单选圆圈描边颜色 - 悬浮态
|
|
6
|
+
$color-radio_checked-border-hover: var(--semi-color-primary-hover); // 选中状态单选圆圈描边颜色 - 悬浮态
|
|
7
|
+
$color-radio_checked-border-active: var(--semi-color-primary-active); // 选中状态单选圆圈描边颜色 - 按下态
|
|
8
8
|
|
|
9
9
|
$color-radio_default-text-default: var(--semi-color-text-0); // 选项文本颜色
|
|
10
10
|
$color-radio_extra-text-default: var(--semi-color-text-2); // 辅助文本颜色
|
|
11
11
|
|
|
12
|
-
$color-radio_primary-bg-hover: var(--semi-color-primary-hover); //
|
|
13
|
-
$color-radio_primary-bg-active: var(--semi-color-primary-active); //
|
|
14
|
-
$color-radio_primary-border-default: var(--semi-color-primary); //
|
|
15
|
-
$color-radio_primary-bg-default: var(--semi-color-primary); //
|
|
16
|
-
$color-radio_primary-text-default: rgba(var(--semi-white), 1); //
|
|
12
|
+
$color-radio_primary-bg-hover: var(--semi-color-primary-hover); // 选中状态单选圆圈背景颜色 - 悬浮态
|
|
13
|
+
$color-radio_primary-bg-active: var(--semi-color-primary-active); // 选中状态单选圆圈背景颜色 - 按下态
|
|
14
|
+
$color-radio_primary-border-default: var(--semi-color-primary); // 选中状态单选圆圈描边颜色 - 默认态
|
|
15
|
+
$color-radio_primary-bg-default: var(--semi-color-primary); // 选中状态单选圆圈背景颜色 - 默认态
|
|
16
|
+
$color-radio_primary-text-default: rgba(var(--semi-white), 1); // 选中状态单选圆圈中心圆点颜色
|
|
17
17
|
|
|
18
|
-
$color-radio_checked-bg-disabled: var(--semi-color-primary-disabled); //
|
|
19
|
-
$color-radio_default-border-disabled: var(--semi-color-border); //
|
|
20
|
-
$color-radio_checked-border-disabled: var(--semi-color-primary-disabled); //
|
|
18
|
+
$color-radio_checked-bg-disabled: var(--semi-color-primary-disabled); // 选中状态单选圆圈背景颜色 - 禁用态
|
|
19
|
+
$color-radio_default-border-disabled: var(--semi-color-border); // 单选圆圈描边颜色 - 禁用态
|
|
20
|
+
$color-radio_checked-border-disabled: var(--semi-color-primary-disabled); // 选中状态单选圆圈描边颜色 - 禁用态
|
|
21
21
|
|
|
22
|
-
$color-radio_disabled-bg-default: var(--semi-color-disabled-fill); //
|
|
22
|
+
$color-radio_disabled-bg-default: var(--semi-color-disabled-fill); // 单选圆圈背景颜色 - 禁用态
|
|
23
23
|
$color-radio_disabled-bg-hover: transparent;
|
|
24
24
|
$color-radio_disabled-text-default: var(--semi-color-disabled-text); // 禁用态文本颜色
|
|
25
|
-
$color-radio_disabled-border-default: var(--semi-color-border); //
|
|
26
|
-
$color-radio_checked-icon-disabled: rgba(var(--semi-white), 1); //
|
|
25
|
+
$color-radio_disabled-border-default: var(--semi-color-border); // 单选圆圈描边颜色 - 禁用态
|
|
26
|
+
$color-radio_checked-icon-disabled: rgba(var(--semi-white), 1); // 选中且禁用状态下中心圆点颜色
|
|
27
27
|
|
|
28
28
|
$color-radio_buttonRadio-text-default: var(--semi-color-text-1); // 按钮样式单选文本颜色
|
|
29
29
|
$color-radio_buttonRadio-bg-default: var(--semi-color-fill-0); // 按钮样式单选背景颜色
|
|
30
|
-
$color-radio_buttonRadio-text-checked-hover: var(--semi-color-primary); // 按钮样式单选选中项文本颜色
|
|
30
|
+
// $color-radio_buttonRadio-text-checked-hover: var(--semi-color-primary); // 按钮样式单选选中项文本颜色
|
|
31
31
|
$color-radio_buttonRadio-text-disabled: var(--semi-color-disabled-text); // 按钮样式单选禁用态文本颜色
|
|
32
32
|
|
|
33
33
|
$color-radio_addon_buttonRadio-bg-hover: var(--semi-color-fill-1); // 按钮样式单选悬浮态背景色
|
|
@@ -48,9 +48,9 @@ $color-radio_cardRadioGroup_addon-text-default: var(--semi-color-text-0); // 卡
|
|
|
48
48
|
$color-radio_cardRadioGroup_extra-text-default: var(--semi-color-text-2); // 卡片样式单选辅助文字颜色
|
|
49
49
|
$color-radio_cardRadioGroup_checked_disabled-border-default: var(--semi-color-primary-disabled); // 卡片样式选中项禁用态描边颜色 - 默认态
|
|
50
50
|
$color-radio_cardRadioGroup_checked_disabled-border-hover: var(--semi-color-primary-disabled); // 卡片样式选中项禁用态描边颜色 - 悬浮态
|
|
51
|
-
$color-radio_card-bg-hover: var(--semi-color-white); //
|
|
52
|
-
$color-radio_card-bg-active: var(--semi-color-white); //
|
|
53
|
-
$color-radio_card-bg-default: var(--semi-color-white); //
|
|
51
|
+
$color-radio_card-bg-hover: var(--semi-color-white); // 卡片模式下单选圆圈背景颜色 - 悬浮态
|
|
52
|
+
$color-radio_card-bg-active: var(--semi-color-white); // 卡片模式下单选圆圈背景颜色 - 按下态
|
|
53
|
+
$color-radio_card-bg-default: var(--semi-color-white); // 卡片模式下单选圆圈背景颜色 - 默认态
|
|
54
54
|
|
|
55
55
|
$color-radio_primary-outline-focus: var(--semi-color-primary-light-active); // 轮廓颜色 - 按键聚焦
|
|
56
56
|
|
package/select/variables.scss
CHANGED
|
@@ -34,29 +34,28 @@ $color-select_main-text-default: var(--semi-color-text-0); // 选择器输入框
|
|
|
34
34
|
$color-select-icon-default: var(--semi-color-text-2); // 选择器输入框图标颜色
|
|
35
35
|
$color-select_clearBtn-text-default: var(--semi-color-text-2); // 选择器输入框清空按钮颜色 - 默认态
|
|
36
36
|
$color-select_clearBtn-text-hover: var(--semi-color-primary); // 选择器输入框清空按钮颜色 - 悬停态
|
|
37
|
-
$color-select_input-bg-default: transparent; // 选择器输入框清空按钮颜色 - 悬停态
|
|
37
|
+
// $color-select_input-bg-default: transparent; // 选择器输入框清空按钮颜色 - 悬停态
|
|
38
38
|
$color-select_input_disabled-bg: var(--semi-color-disabled-fill); // 禁用选择器输入框背景色
|
|
39
39
|
$color-select_input_disabled-border: var(--semi-color-border); // 禁用选择器输入框描边颜色
|
|
40
40
|
$color-select_input_disabled-border-focus: transparent; // 禁用选择器输入框描边颜色 - 聚焦态
|
|
41
41
|
$color-select_input_disabled-text: var(--semi-color-disabled-text); // 禁用选择器输入框回填内容文字颜色
|
|
42
|
-
$color-select_input_disabled-bg-hover: var(--semi-color-disabled-fill); //
|
|
43
|
-
$color-select_input_disabled-bg-focus: var(--semi-color-disabled-fill); //
|
|
42
|
+
$color-select_input_disabled-bg-hover: var(--semi-color-disabled-fill); // 禁用选择器输入框背景色 - 悬停态
|
|
43
|
+
$color-select_input_disabled-bg-focus: var(--semi-color-disabled-fill); // 禁用选择器输入框背景色 - 聚焦态
|
|
44
44
|
|
|
45
45
|
$color-select_input_placeholder-text: var(--semi-color-text-2); // 选择器输入框占位文本文字颜色
|
|
46
46
|
|
|
47
|
-
$color-select_option_main-text: var(--semi-color-text-0); //
|
|
48
|
-
$color-select_option_keyword-text: var(--semi-color-primary); //
|
|
49
|
-
$color-select_option-
|
|
50
|
-
$color-select_option-
|
|
51
|
-
$color-select_option-bg-
|
|
52
|
-
$color-
|
|
53
|
-
$color-select_option_disabled-
|
|
54
|
-
$color-
|
|
55
|
-
$color-select_option-
|
|
56
|
-
$color-
|
|
57
|
-
$color-
|
|
58
|
-
$color-
|
|
59
|
-
$color-select_group-text: var(--semi-color-text-2); // 分组选择器菜单项分组标题文本颜色
|
|
47
|
+
$color-select_option_main-text: var(--semi-color-text-0); // 选择器下拉菜单选项文本颜色
|
|
48
|
+
$color-select_option_keyword-text: var(--semi-color-primary); // 选择器下拉菜单选项匹配搜索结果文本颜色
|
|
49
|
+
$color-select_option-icon-default: transparent; // 选择器下拉菜单选项图标颜色 - 默认态
|
|
50
|
+
$color-select_option-bg-hover: var(--semi-color-fill-0); // 选择器下拉菜单选项背景颜色 - 悬停态
|
|
51
|
+
$color-select_option-bg-active: var(--semi-color-fill-1); // 选择器下拉菜单选项背景颜色 - 按下态
|
|
52
|
+
$color-select_option_disabled-text: var(--semi-color-disabled-text); // 禁用选择器下拉菜单选项文字颜色
|
|
53
|
+
// $color-select_option_disabled-bg: transparent; // 禁用选择器下拉菜单选项背景颜色
|
|
54
|
+
$color-select_option-icon-active: var(--semi-color-text-2); // 选择器下拉菜单选项图标颜色 - 选中态
|
|
55
|
+
$color-select_option-border-default: var(--semi-color-border); // 选择器下拉菜单分组标题分割线颜色
|
|
56
|
+
$color-select-option-bg-selected: transparent; // 选择器下拉菜单选项背景颜色 - 选中态
|
|
57
|
+
$color-select_create_tips-text: var(--semi-color-text-2); // 选择器下拉菜单新建选项提示文本颜色
|
|
58
|
+
$color-select_group-text: var(--semi-color-text-2); // 选择器下拉菜单分组标题文本颜色
|
|
60
59
|
|
|
61
60
|
$color-select_prefix_suffix_text-default: var(--semi-color-text-2); // 选择器输入框前后缀文本颜色
|
|
62
61
|
|
|
@@ -65,12 +64,12 @@ $width-select_icon_right: ($width-icon-medium + $spacing-tight * 2); // 选择
|
|
|
65
64
|
$height-select_large: $height-control-large; // 选择器输入框高度 - 大尺寸
|
|
66
65
|
$height-select_small: $height-control-small; // 选择器输入框高度 - 小尺寸
|
|
67
66
|
$height-select_default: $height-control-default; // 选择器输入框高度 - 默认尺寸
|
|
68
|
-
$width-select_option_tick: $width-icon-small; //
|
|
67
|
+
$width-select_option_tick: $width-icon-small; // 选择器下拉菜单项选中对勾图标大小
|
|
69
68
|
$width-select-border: 1px; // 选择器输入框描边宽度
|
|
70
69
|
$width-select_arrow: 32px; // 选择器输入框下拉箭头宽度
|
|
71
70
|
$width-select_arrow_empty: 12px; // 选择器输入框下拉箭头为空时(有suffix icon)宽度
|
|
72
71
|
$width-select_clear-icon: 32px; // 选择器输入框清空按钮宽度
|
|
73
|
-
$width-select_group_top-border: $border-thickness-control; //
|
|
72
|
+
$width-select_group_top-border: $border-thickness-control; // 选择器下拉菜单分组标题描边宽度
|
|
74
73
|
|
|
75
74
|
$height-select_multiple_input_small: 20px; // 小尺寸多项选择器输入框Input框高度
|
|
76
75
|
$height-select_multiple_input_default: 24px; // 默认多项选择器输入框Input框高度
|
|
@@ -80,27 +79,27 @@ $width-select-border-hover: $width-select-border; // 选择器输入框描边
|
|
|
80
79
|
$width-select-border-focus: $width-select-border-hover; // 选择器输入框描边宽度 - 按下
|
|
81
80
|
$width-select-border-active: $width-select-border-focus; // 选择器输入框描边宽度 - 选中
|
|
82
81
|
// Spacing
|
|
83
|
-
$spacing-select_option_tick-marginRight: $spacing-tight; //
|
|
82
|
+
$spacing-select_option_tick-marginRight: $spacing-tight; // 选择器下拉菜单选中对勾右侧外边距
|
|
84
83
|
$spacing-select_prefix_suffix_text-marginX: $spacing-base-tight; // 选择器输入框前后缀文本水平内边距
|
|
85
84
|
$spacing-select_prefix_suffix_text-marginY: 0px; // 选择器输入框前后缀文本垂直内边距
|
|
86
85
|
$spacing-select_prefix_suffix_icon-marginX: $spacing-tight; // 选择器输入框前后缀图标水平内边距
|
|
87
86
|
$spacing-select_prefix_suffix_icon-marginY: 0px; // 选择器输入框前后缀图标垂直内边距
|
|
88
87
|
$spacing-select_create_tips-marginRight: $spacing-extra-tight; // 创建新选项右侧外边距
|
|
89
|
-
$spacing-select_group-marginTop: $spacing-extra-tight; //
|
|
90
|
-
$spacing-select_group-paddingTop: $spacing-base-tight; //
|
|
91
|
-
$spacing-select_group-paddingBottom: $spacing-extra-tight; //
|
|
92
|
-
$spacing-select_group-paddingLeft: $spacing-base-tight + $width-select_option_tick + $spacing-select_option_tick-marginRight; //
|
|
93
|
-
$spacing-select_group-paddingRight: $spacing-base; //
|
|
88
|
+
$spacing-select_group-marginTop: $spacing-extra-tight; // 选择器下拉菜单分组标题顶部外边距
|
|
89
|
+
$spacing-select_group-paddingTop: $spacing-base-tight; // 选择器下拉菜单分组标题顶部内边距
|
|
90
|
+
$spacing-select_group-paddingBottom: $spacing-extra-tight; // 选择器下拉菜单分组标题底部内边距
|
|
91
|
+
$spacing-select_group-paddingLeft: $spacing-base-tight + $width-select_option_tick + $spacing-select_option_tick-marginRight; // 选择器下拉菜单分组标题左侧内边距
|
|
92
|
+
$spacing-select_group-paddingRight: $spacing-base; // 选择器下拉菜单分组标题右侧内边距
|
|
94
93
|
$spacing-select_loading_wrapper-paddingLeft: $spacing-base; // 选择器加载左侧内边距
|
|
95
94
|
$spacing-select_loading_wrapper-paddingRight: $spacing-base; // 选择器加载右侧内边距
|
|
96
95
|
$spacing-select_loading_wrapper-paddingTop: $spacing-tight; // 选择器加载顶部内边距
|
|
97
96
|
$spacing-select_loading_wrapper-paddingBottom: $spacing-tight; // 选择器加载底部内边距
|
|
98
97
|
$spacing-select_multiple_content_wrapper_empty-marginLeft: $spacing-tight; // 多项选择器空回填内容为空时左侧内边距
|
|
99
98
|
$spacing-select_multiple_selection-marginLeft: $spacing-extra-tight; // 多项选择器回填内容左侧内边距
|
|
100
|
-
$spacing-select_option-paddingLeft: $spacing-base-tight; //
|
|
101
|
-
$spacing-select_option-paddingRight: $spacing-base-tight; //
|
|
102
|
-
$spacing-select_option-paddingTop: $spacing-tight; //
|
|
103
|
-
$spacing-select_option-paddingBottom: $spacing-tight; //
|
|
99
|
+
$spacing-select_option-paddingLeft: $spacing-base-tight; // 选择器下拉菜单项左侧内边距
|
|
100
|
+
$spacing-select_option-paddingRight: $spacing-base-tight; // 选择器下拉菜单项右侧内边距
|
|
101
|
+
$spacing-select_option-paddingTop: $spacing-tight; // 选择器下拉菜单项顶部内边距
|
|
102
|
+
$spacing-select_option-paddingBottom: $spacing-tight; // 选择器下拉菜单项底部内边距
|
|
104
103
|
|
|
105
104
|
|
|
106
105
|
$spacing-select_tag-marginTop: $spacing-super-tight - 1px; // 多项选择器标签顶部外边距
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
$animation_duration_sidebar_inner-show: 180ms; // 侧边栏打开-动画持续时间
|
|
2
|
+
$animation_function_sidebar_inner-show: cubic-bezier(0.25, 0.46, 0.45, 0.94); // 侧边栏打开-过渡曲线
|
|
3
|
+
$animation_delay_sidebar_inner-show: 0ms; // 侧边栏打开-延迟时间
|
|
4
|
+
|
|
5
|
+
$animation_duration_sidebar_inner-hide: 180ms; // 侧边栏关闭-动画持续时间
|
|
6
|
+
$animation_function_sidebar_inner-hide: cubic-bezier(0.25, 0.46, 0.45, 0.94); // 侧边栏关闭-过渡曲线
|
|
7
|
+
$animation_delay_sidebar_inner-hide: 0ms; // 侧边栏关闭-延迟时间
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { BASE_CLASS_PREFIX } from '../base/constants';
|
|
2
|
+
|
|
3
|
+
const cssClasses = {
|
|
4
|
+
SIDEBAR: `${BASE_CLASS_PREFIX}-sidebar`,
|
|
5
|
+
COLLAPSE: `${BASE_CLASS_PREFIX}-sidebar-collapse`,
|
|
6
|
+
SIDEBAR_CONTENT: `${BASE_CLASS_PREFIX}-sidebar-content`,
|
|
7
|
+
MCP_CONFIGURE_CONTENT: `${BASE_CLASS_PREFIX}-sidebar-mcp-configure-content`,
|
|
8
|
+
ANNOTATION_CONTENT: `${BASE_CLASS_PREFIX}-sidebar-annotation_content`,
|
|
9
|
+
ANNOTATION_ITEM: `${BASE_CLASS_PREFIX}-sidebar-annotation-item`,
|
|
10
|
+
ANNOTATION: `${BASE_CLASS_PREFIX}-sidebar-annotation`,
|
|
11
|
+
OPTIONS: `${BASE_CLASS_PREFIX}-sidebar-options`,
|
|
12
|
+
FILE: `${BASE_CLASS_PREFIX}-sidebar-file`,
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
const strings = {
|
|
16
|
+
MODE: {
|
|
17
|
+
MAIN: 'main',
|
|
18
|
+
CODE: 'code',
|
|
19
|
+
FILE: 'file'
|
|
20
|
+
},
|
|
21
|
+
MCP_MODE: {
|
|
22
|
+
INNER: 'inner' as const,
|
|
23
|
+
CUSTOM: 'custom' as const
|
|
24
|
+
},
|
|
25
|
+
DIRECTION: {
|
|
26
|
+
left: true, right: false,
|
|
27
|
+
top: false, bottom: false,
|
|
28
|
+
topLeft: false, topRight: false,
|
|
29
|
+
bottomLeft: false, bottomRight: false,
|
|
30
|
+
},
|
|
31
|
+
JSON_VIEWER_OPTIONS: {
|
|
32
|
+
readOnly: true,
|
|
33
|
+
autoWrap: true,
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export {
|
|
39
|
+
cssClasses,
|
|
40
|
+
strings
|
|
41
|
+
};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import BaseFoundation, { DefaultAdapter } from '../base/foundation';
|
|
2
|
+
import KeyCode from '../utils/keyCode';
|
|
3
|
+
|
|
4
|
+
export interface ContainerProps {
|
|
5
|
+
title?: any;
|
|
6
|
+
resizable?: boolean;
|
|
7
|
+
style?: Record<string, any>;
|
|
8
|
+
className?: string;
|
|
9
|
+
defaultSize?: { width?: number | string; height?: number | string };
|
|
10
|
+
onCancel?: (e: any) => void;
|
|
11
|
+
children?: any;
|
|
12
|
+
visible?: boolean;
|
|
13
|
+
motion?: boolean;
|
|
14
|
+
afterVisibleChange?: (isVisible: boolean) => void;
|
|
15
|
+
minWidth?: string | number;
|
|
16
|
+
maxWidth?: string | number;
|
|
17
|
+
showClose?: boolean
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface ContainerState {
|
|
21
|
+
displayNone: boolean;
|
|
22
|
+
onCancelReturnPromiseStatus?: "pending"|"fulfilled"|"rejected"
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface ContainerAdapter extends DefaultAdapter<ContainerProps, ContainerState> {
|
|
26
|
+
notifyCancel: (e: any) => void;
|
|
27
|
+
notifyVisibleChange: (visible: boolean) => void;
|
|
28
|
+
setOnKeyDownListener: () => void;
|
|
29
|
+
removeKeyDownListener: () => void;
|
|
30
|
+
toggleDisplayNone: (displayNone: boolean) => void
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export default class ContainerFoundation extends BaseFoundation<ContainerAdapter> {
|
|
34
|
+
constructor(adapter: ContainerAdapter) {
|
|
35
|
+
super({ ...ContainerFoundation.defaultAdapter, ...adapter });
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
init = () => {};
|
|
39
|
+
|
|
40
|
+
destroy = () => {
|
|
41
|
+
this.afterHide();
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
handleCancel(e: any) {
|
|
45
|
+
this._adapter.notifyCancel(e);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
beforeShow() {
|
|
49
|
+
this._adapter.setOnKeyDownListener();
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
afterHide() {
|
|
53
|
+
this._adapter.removeKeyDownListener();
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
handleKeyDown(e: any) {
|
|
57
|
+
const { closeOnEsc } = this.getProps();
|
|
58
|
+
if (closeOnEsc && e.keyCode === KeyCode.ESC) {
|
|
59
|
+
e.stopPropagation();
|
|
60
|
+
this.handleCancel(e);
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
onVisibleChange(visible: boolean) {
|
|
66
|
+
this._adapter.notifyVisibleChange(visible);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
toggleDisplayNone = (displayNone: boolean) => {
|
|
70
|
+
this._adapter.toggleDisplayNone(displayNone);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
handleAnimationEnd = () => {
|
|
74
|
+
const { visible } = this.getProps();
|
|
75
|
+
this.toggleDisplayNone(!visible);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { throttle } from 'lodash';
|
|
2
|
+
import BaseFoundation, { DefaultAdapter } from '../base/foundation';
|
|
3
|
+
import { strings } from './constants';
|
|
4
|
+
import { getFilterResult } from './utils';
|
|
5
|
+
|
|
6
|
+
export interface MCPOption {
|
|
7
|
+
icon?: any;
|
|
8
|
+
label?: string;
|
|
9
|
+
value?: string;
|
|
10
|
+
desc?: any;
|
|
11
|
+
active?: boolean;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
configure?: boolean
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface MCPConfigureContentProps {
|
|
17
|
+
className?: string;
|
|
18
|
+
options?: MCPOption[];
|
|
19
|
+
customOptions?: MCPOption[];
|
|
20
|
+
filter?: (inputValue: string, option: MCPOption) => boolean;
|
|
21
|
+
placeholder?: string;
|
|
22
|
+
style?: any;
|
|
23
|
+
onStatusChange?: (options: MCPOption[], custom: boolean) => void;
|
|
24
|
+
onSearch?: (inputValue: string, custom: boolean) => void;
|
|
25
|
+
onAddClick?: (e: any) => void;
|
|
26
|
+
onConfigureClick?: (e: any, option: MCPOption) => void;
|
|
27
|
+
onEditClick?: (e: any, option: MCPOption) => void;
|
|
28
|
+
renderItem?: (props: {
|
|
29
|
+
option: MCPOption;
|
|
30
|
+
custom: boolean
|
|
31
|
+
}) => any
|
|
32
|
+
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export type MCPConfigureMode = 'inner' | 'custom';
|
|
36
|
+
|
|
37
|
+
export interface MCPConfigureContentState {
|
|
38
|
+
mode: MCPConfigureMode;
|
|
39
|
+
inputValue: string;
|
|
40
|
+
showOptions: MCPOption[];
|
|
41
|
+
cachedOptions: MCPOption[];
|
|
42
|
+
cachedCustomOptions: MCPOption[]
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export interface MCPConfigureContentAdapter extends DefaultAdapter<MCPConfigureContentProps, MCPConfigureContentState> {
|
|
46
|
+
notifyConfigureClick: (e: any, option: MCPOption) => void;
|
|
47
|
+
notifyEditClick: (e: any, option: MCPOption) => void;
|
|
48
|
+
notifyStatusChange?: (options: MCPOption[], custom: boolean) => void;
|
|
49
|
+
notifyAddClick?: (e: any) => void
|
|
50
|
+
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export default class MCPConfigureContentFoundation extends BaseFoundation<MCPConfigureContentAdapter> {
|
|
54
|
+
constructor(adapter: MCPConfigureContentAdapter) {
|
|
55
|
+
super({ ...adapter });
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
handleSearch = (value: string) => {
|
|
59
|
+
this.setState({ inputValue: value });
|
|
60
|
+
this.updateShowOptions(value);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
updateShowOptions = throttle((value: string, mode?: MCPConfigureMode) => {
|
|
64
|
+
let realMode = mode ?? this.getState('mode');
|
|
65
|
+
const { options = [], customOptions = [], filter } = this.getProps();
|
|
66
|
+
let showOptions = [];
|
|
67
|
+
if (realMode === strings.MCP_MODE.INNER) {
|
|
68
|
+
showOptions = value ? getFilterResult(value, options, filter) : options;
|
|
69
|
+
} else {
|
|
70
|
+
showOptions = value ? getFilterResult(value, customOptions, filter) : customOptions;
|
|
71
|
+
}
|
|
72
|
+
this.setState({ showOptions });
|
|
73
|
+
}, 300)
|
|
74
|
+
|
|
75
|
+
handleModeChange = (e: any) => {
|
|
76
|
+
const newMode = e.target.value;
|
|
77
|
+
this.setState({ mode: newMode });
|
|
78
|
+
this.updateShowOptions(this.getState('inputValue'), newMode);
|
|
79
|
+
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
onConfigureButtonClick = (e: React.MouseEvent<HTMLButtonElement>, option: MCPOption) => {
|
|
83
|
+
this._adapter.notifyConfigureClick(e, option);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
onEditButtonClick = (e: React.MouseEvent<HTMLButtonElement>, option: MCPOption) => {
|
|
87
|
+
this._adapter.notifyEditClick(e, option);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
handleStatusChange = (item: MCPOption, checked: boolean) => {
|
|
91
|
+
const { options = [], customOptions = [] } = this.getProps();
|
|
92
|
+
let newOptions = [];
|
|
93
|
+
const mode = this.getState('mode');
|
|
94
|
+
if (mode === strings.MCP_MODE.INNER) {
|
|
95
|
+
newOptions = options.map(option => option.value === item.value ? { ...option, active: checked } : option);
|
|
96
|
+
} else {
|
|
97
|
+
newOptions = customOptions.map(option => option.value === item.value ? { ...option, active: checked } : option);
|
|
98
|
+
}
|
|
99
|
+
this._adapter.notifyStatusChange(newOptions, mode === strings.MCP_MODE.CUSTOM);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
handleAddClick = (e: React.MouseEvent<HTMLButtonElement>) => {
|
|
103
|
+
this._adapter.notifyAddClick(e);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
}
|