@douyinfe/semi-foundation 2.27.1-alpha.3 → 2.27.2
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/lib/cjs/navigation/itemFoundation.d.ts +0 -2
- package/lib/cjs/navigation/navigation.css +4 -74
- package/lib/cjs/navigation/navigation.scss +4 -112
- package/lib/cjs/navigation/subNavFoundation.d.ts +0 -2
- package/lib/cjs/tree/treeUtil.d.ts +1 -1
- package/lib/cjs/upload/constants.d.ts +1 -1
- package/lib/es/navigation/itemFoundation.d.ts +0 -2
- package/lib/es/navigation/navigation.css +4 -74
- package/lib/es/navigation/navigation.scss +4 -112
- package/lib/es/navigation/subNavFoundation.d.ts +0 -2
- package/lib/es/tree/treeUtil.d.ts +1 -1
- package/lib/es/upload/constants.d.ts +1 -1
- package/navigation/itemFoundation.ts +1 -3
- package/navigation/navigation.scss +4 -112
- package/navigation/subNavFoundation.ts +1 -3
- package/package.json +2 -2
|
@@ -34,8 +34,6 @@ export interface ItemAdapter<P = Record<string, any>, S = Record<string, any>> e
|
|
|
34
34
|
getIsCollapsed(): boolean;
|
|
35
35
|
getSelected(): boolean;
|
|
36
36
|
getIsOpen(): boolean;
|
|
37
|
-
getIsInSubNav(): boolean;
|
|
38
|
-
getMode(): string;
|
|
39
37
|
}
|
|
40
38
|
export default class ItemFoundation<P = Record<string, any>, S = Record<string, any>> extends BaseFoundation<ItemAdapter<P, S>, P, S> {
|
|
41
39
|
_timer: number;
|
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
padding: 8px 12px;
|
|
57
57
|
box-sizing: border-box;
|
|
58
58
|
margin-top: 0;
|
|
59
|
+
margin-bottom: 8px;
|
|
59
60
|
font-size: 14px;
|
|
60
61
|
line-height: 20px;
|
|
61
62
|
font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
@@ -240,9 +241,6 @@
|
|
|
240
241
|
text-overflow: ellipsis;
|
|
241
242
|
white-space: nowrap;
|
|
242
243
|
overflow: hidden;
|
|
243
|
-
display: flex;
|
|
244
|
-
flex-direction: column;
|
|
245
|
-
row-gap: 8px;
|
|
246
244
|
}
|
|
247
245
|
.semi-navigation-sub .semi-navigation-item {
|
|
248
246
|
color: var(--semi-color-text-0);
|
|
@@ -335,12 +333,6 @@
|
|
|
335
333
|
transition: transform 200ms ease-in-out;
|
|
336
334
|
transform: rotate(-180deg);
|
|
337
335
|
}
|
|
338
|
-
.semi-navigation-icon-rotate-0-no-transition {
|
|
339
|
-
transform: rotate(0);
|
|
340
|
-
}
|
|
341
|
-
.semi-navigation-icon-rotate-180-no-transition {
|
|
342
|
-
transform: rotate(-180deg);
|
|
343
|
-
}
|
|
344
336
|
|
|
345
337
|
/* Header、Footer-Common */
|
|
346
338
|
.semi-navigation-header {
|
|
@@ -401,11 +393,6 @@
|
|
|
401
393
|
.semi-navigation-vertical .semi-navigation-list > .semi-navigation-item-selected:not(.semi-navigation-item-disabled).semi-navigation-item-normal:hover .semi-navigation-item-icon:first-child {
|
|
402
394
|
color: var(--semi-color-primary);
|
|
403
395
|
}
|
|
404
|
-
.semi-navigation-vertical .semi-navigation-list {
|
|
405
|
-
display: flex;
|
|
406
|
-
flex-direction: column;
|
|
407
|
-
row-gap: 8px;
|
|
408
|
-
}
|
|
409
396
|
.semi-navigation-vertical .semi-navigation-list > .semi-navigation-sub-wrap > .semi-navigation-sub-title {
|
|
410
397
|
color: var(--semi-color-text-0);
|
|
411
398
|
background-color: transparent;
|
|
@@ -483,6 +470,9 @@
|
|
|
483
470
|
.semi-navigation-vertical .semi-navigation-list > .semi-navigation-sub-wrap > .semi-navigation-sub-title:hover.semi-navigation-sub-title-disabled.semi-navigation-sub-title-selected .semi-navigation-item-icon:first-child, .semi-navigation-vertical .semi-navigation-list > .semi-navigation-sub-wrap > .semi-navigation-sub-title:active.semi-navigation-sub-title-disabled.semi-navigation-sub-title-selected .semi-navigation-item-icon:first-child {
|
|
484
471
|
color: var(--semi-color-primary-disabled);
|
|
485
472
|
}
|
|
473
|
+
.semi-navigation-vertical .semi-navigation-item:last-of-type {
|
|
474
|
+
margin-bottom: 0;
|
|
475
|
+
}
|
|
486
476
|
.semi-navigation-vertical .semi-navigation-inner {
|
|
487
477
|
flex-direction: column;
|
|
488
478
|
}
|
|
@@ -681,66 +671,6 @@
|
|
|
681
671
|
padding: 0;
|
|
682
672
|
}
|
|
683
673
|
|
|
684
|
-
.semi-navigation-first-layer > .semi-navigation-sub-title .semi-navigation-item-text {
|
|
685
|
-
font-weight: 600;
|
|
686
|
-
}
|
|
687
|
-
.semi-navigation-first-layer > .semi-navigation-item-text {
|
|
688
|
-
font-weight: 600;
|
|
689
|
-
}
|
|
690
|
-
|
|
691
|
-
.semi-navigation-sub-title-selected .semi-navigation-item-icon:first-child {
|
|
692
|
-
color: var(--semi-color-primary);
|
|
693
|
-
}
|
|
694
|
-
|
|
695
|
-
.semi-navigation-sub-wrap .semi-navigation-sub-title {
|
|
696
|
-
margin-bottom: 0;
|
|
697
|
-
}
|
|
698
|
-
.semi-navigation-sub-wrap .semi-navigation-item:last-of-type {
|
|
699
|
-
margin-bottom: 0;
|
|
700
|
-
}
|
|
701
|
-
|
|
702
|
-
.semi-navigation-sub-title.semi-navigation-sub-title-disabled .semi-navigation-item-text {
|
|
703
|
-
color: var(--semi-color-disabled-text);
|
|
704
|
-
}
|
|
705
|
-
|
|
706
|
-
.semi-navigation-item-horizontal.semi-navigation-item {
|
|
707
|
-
width: fit-content;
|
|
708
|
-
margin-bottom: 0;
|
|
709
|
-
margin-right: 8px;
|
|
710
|
-
}
|
|
711
|
-
.semi-navigation-item-horizontal.semi-navigation-item.semi-navigation-item-disabled {
|
|
712
|
-
color: var(--semi-color-disabled-text);
|
|
713
|
-
}
|
|
714
|
-
.semi-navigation-item-horizontal .semi-navigation-sub-title .semi-navigation-item-icon:first-child,
|
|
715
|
-
.semi-navigation-item-horizontal .semi-navigation-sub-title .semi-navigation-item-text {
|
|
716
|
-
color: var(--semi-color-text-2);
|
|
717
|
-
background-color: transparent;
|
|
718
|
-
}
|
|
719
|
-
.semi-navigation-item-horizontal .semi-navigation-sub-title.semi-navigation-sub-title-selected .semi-navigation-item-icon:first-child,
|
|
720
|
-
.semi-navigation-item-horizontal .semi-navigation-sub-title.semi-navigation-sub-title-selected .semi-navigation-item-text {
|
|
721
|
-
color: var(--semi-color-text-0);
|
|
722
|
-
}
|
|
723
|
-
.semi-navigation-item-horizontal .semi-navigation-sub-title.semi-navigation-sub-title-disabled .semi-navigation-item-icon:first-child,
|
|
724
|
-
.semi-navigation-item-horizontal .semi-navigation-sub-title.semi-navigation-sub-title-disabled .semi-navigation-item-text {
|
|
725
|
-
color: var(--semi-color-disabled-text);
|
|
726
|
-
}
|
|
727
|
-
.semi-navigation-item-horizontal.semi-navigation-first-layer {
|
|
728
|
-
color: var(--semi-color-text-2);
|
|
729
|
-
}
|
|
730
|
-
.semi-navigation-item-horizontal.semi-navigation-item-selected {
|
|
731
|
-
background-color: transparent;
|
|
732
|
-
}
|
|
733
|
-
.semi-navigation-item-horizontal.semi-navigation-item-selected .semi-navigation-item-icon:first-child,
|
|
734
|
-
.semi-navigation-item-horizontal.semi-navigation-item-selected .semi-navigation-item-text {
|
|
735
|
-
color: var(--semi-color-text-0);
|
|
736
|
-
}
|
|
737
|
-
.semi-navigation-item-horizontal .semi-navigation-item-icon:first-child {
|
|
738
|
-
margin-right: 8px;
|
|
739
|
-
}
|
|
740
|
-
.semi-navigation-item-horizontal .semi-navigation-item-icon:last-child {
|
|
741
|
-
margin-left: 8px;
|
|
742
|
-
}
|
|
743
|
-
|
|
744
674
|
.semi-rtl .semi-navigation,
|
|
745
675
|
.semi-portal-rtl .semi-navigation {
|
|
746
676
|
direction: rtl;
|
|
@@ -76,7 +76,7 @@ $module: #{$prefix}-navigation;
|
|
|
76
76
|
padding: $spacing-navigation_item-paddingY $spacing-navigation_item-paddingX;
|
|
77
77
|
box-sizing: border-box;
|
|
78
78
|
margin-top: 0;
|
|
79
|
-
|
|
79
|
+
margin-bottom: $spacing-navigation_item-marginBottom;
|
|
80
80
|
|
|
81
81
|
@include font-size-regular;
|
|
82
82
|
font-weight: $font-navigation_item_normal-fontWeight;
|
|
@@ -257,9 +257,6 @@ $module: #{$prefix}-navigation;
|
|
|
257
257
|
text-overflow: ellipsis;
|
|
258
258
|
white-space: nowrap;
|
|
259
259
|
overflow: hidden;
|
|
260
|
-
display: flex;
|
|
261
|
-
flex-direction: column;
|
|
262
|
-
row-gap: 8px;
|
|
263
260
|
|
|
264
261
|
.#{$module}-item {
|
|
265
262
|
color: $color-navigation_itemLn-text-default;
|
|
@@ -346,12 +343,6 @@ $module: #{$prefix}-navigation;
|
|
|
346
343
|
transform: rotate(-180deg);
|
|
347
344
|
}
|
|
348
345
|
|
|
349
|
-
&-icon-rotate-0-no-transition {
|
|
350
|
-
transform: rotate(0);
|
|
351
|
-
}
|
|
352
|
-
&-icon-rotate-180-no-transition {
|
|
353
|
-
transform: rotate(-180deg);
|
|
354
|
-
}
|
|
355
346
|
}
|
|
356
347
|
|
|
357
348
|
/* Header、Footer-Common */
|
|
@@ -439,12 +430,6 @@ $module: #{$prefix}-navigation;
|
|
|
439
430
|
}
|
|
440
431
|
}
|
|
441
432
|
|
|
442
|
-
&-list {
|
|
443
|
-
display: flex;
|
|
444
|
-
flex-direction: column;
|
|
445
|
-
row-gap: 8px;
|
|
446
|
-
}
|
|
447
|
-
|
|
448
433
|
&-list > .#{$module}-sub-wrap {
|
|
449
434
|
& > .#{$module}-sub-title {
|
|
450
435
|
color: $color-navigation_itemL1-text-default;
|
|
@@ -498,9 +483,9 @@ $module: #{$prefix}-navigation;
|
|
|
498
483
|
}
|
|
499
484
|
}
|
|
500
485
|
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
486
|
+
.#{$module}-item:last-of-type {
|
|
487
|
+
margin-bottom: $spacing-navigation_vertical_nav_item_last-marginBottom;
|
|
488
|
+
}
|
|
504
489
|
|
|
505
490
|
.#{$module}-inner {
|
|
506
491
|
flex-direction: column;
|
|
@@ -729,97 +714,4 @@ $module: #{$prefix}-navigation;
|
|
|
729
714
|
}
|
|
730
715
|
}
|
|
731
716
|
|
|
732
|
-
// The following css is used for the variant generation of NavItem and NavSub in C2D
|
|
733
|
-
.#{$module}-first-layer {
|
|
734
|
-
> .#{$module}-sub-title {
|
|
735
|
-
.#{$module}-item-text {
|
|
736
|
-
font-weight: 600;
|
|
737
|
-
}
|
|
738
|
-
}
|
|
739
|
-
|
|
740
|
-
> .#{$module}-item-text {
|
|
741
|
-
font-weight: 600;
|
|
742
|
-
}
|
|
743
|
-
}
|
|
744
|
-
|
|
745
|
-
.#{$module}-sub-title-selected {
|
|
746
|
-
.#{$module}-item-icon:first-child {
|
|
747
|
-
color: $color-navigation_itemL1_selected_icon-default;
|
|
748
|
-
}
|
|
749
|
-
}
|
|
750
|
-
|
|
751
|
-
.#{$module}-sub-wrap {
|
|
752
|
-
.#{$module}-sub-title {
|
|
753
|
-
margin-bottom: $spacing-navigation_sub_title-marginBottom;
|
|
754
|
-
}
|
|
755
|
-
|
|
756
|
-
.#{$module}-item:last-of-type {
|
|
757
|
-
margin-bottom: $spacing-navigation_vertical_nav_item_last-marginBottom;
|
|
758
|
-
}
|
|
759
|
-
}
|
|
760
|
-
|
|
761
|
-
.#{$module}-sub-title {
|
|
762
|
-
&.#{$module}-sub-title-disabled {
|
|
763
|
-
.semi-navigation-item-text {
|
|
764
|
-
color: $color-navigation_itemL1_disabled-text-default;
|
|
765
|
-
}
|
|
766
|
-
}
|
|
767
|
-
}
|
|
768
|
-
|
|
769
|
-
.#{$module}-item-horizontal {
|
|
770
|
-
// The width of nav NavItem and NavSub in the horizontal direction both need fit-content
|
|
771
|
-
&.#{$module}-item {
|
|
772
|
-
width: fit-content;
|
|
773
|
-
margin-bottom: $spacing-navigation_horizontal_nav_list_item-marginBottom;
|
|
774
|
-
margin-right: $spacing-navigation_horizontal_nav_list_item_not_last-marginRight;
|
|
775
|
-
|
|
776
|
-
&.#{$module}-item-disabled {
|
|
777
|
-
color: $color-navigation_horizontal_itemL1_disabled-text-default;
|
|
778
|
-
}
|
|
779
|
-
}
|
|
780
|
-
|
|
781
|
-
.#{$module}-sub-title {
|
|
782
|
-
.#{$module}-item-icon:first-child,
|
|
783
|
-
.#{$module}-item-text {
|
|
784
|
-
color: var(--semi-color-text-2);
|
|
785
|
-
background-color: transparent;
|
|
786
|
-
}
|
|
787
|
-
|
|
788
|
-
&.#{$module}-sub-title-selected {
|
|
789
|
-
.#{$module}-item-icon:first-child,
|
|
790
|
-
.#{$module}-item-text {
|
|
791
|
-
color: $color-navigation_horizontal_itemL1_selected-text-default;
|
|
792
|
-
}
|
|
793
|
-
}
|
|
794
|
-
|
|
795
|
-
&.#{$module}-sub-title-disabled {
|
|
796
|
-
.#{$module}-item-icon:first-child,
|
|
797
|
-
.#{$module}-item-text {
|
|
798
|
-
color: $color-navigation_horizontal_itemL1_disabled-text-default;
|
|
799
|
-
}
|
|
800
|
-
}
|
|
801
|
-
}
|
|
802
|
-
|
|
803
|
-
&.#{$module}-first-layer {
|
|
804
|
-
color: $color-navigation_horizontal_itemL1-text-default;
|
|
805
|
-
}
|
|
806
|
-
|
|
807
|
-
&.#{$module}-item-selected {
|
|
808
|
-
background-color: $color-navigation_horizontal_itemL1_selected-bg-default;
|
|
809
|
-
|
|
810
|
-
.#{$module}-item-icon:first-child,
|
|
811
|
-
.#{$module}-item-text {
|
|
812
|
-
color: $color-navigation_horizontal_itemL1_selected-text-default;
|
|
813
|
-
}
|
|
814
|
-
}
|
|
815
|
-
|
|
816
|
-
.semi-navigation-item-icon:first-child {
|
|
817
|
-
margin-right: 8px;
|
|
818
|
-
}
|
|
819
|
-
|
|
820
|
-
.semi-navigation-item-icon:last-child {
|
|
821
|
-
margin-left: 8px;
|
|
822
|
-
}
|
|
823
|
-
}
|
|
824
|
-
|
|
825
717
|
@import "./rtl.scss";
|
|
@@ -21,8 +21,6 @@ export interface SubNavAdapter<P = Record<string, any>, S = Record<string, any>>
|
|
|
21
21
|
notifyGlobalOnClick(data: OnClickData): void;
|
|
22
22
|
getIsSelected(itemKey: string | number): boolean;
|
|
23
23
|
getIsOpen(): boolean;
|
|
24
|
-
getIsCollapsed(): boolean;
|
|
25
|
-
getMode(): string;
|
|
26
24
|
}
|
|
27
25
|
export default class SubNavFoundation<P = Record<string, any>, S = Record<string, any>> extends BaseFoundation<SubNavAdapter<P, S>, P, S> {
|
|
28
26
|
constructor(adapter: SubNavAdapter<P, S>);
|
|
@@ -74,6 +74,6 @@ export declare function getValueOrKey(data: any): any;
|
|
|
74
74
|
export declare function normalizeValue(value: any, withObject: boolean): any;
|
|
75
75
|
export declare function updateKeys(keySet: Set<string> | string[], keyEntities: KeyEntities): string[];
|
|
76
76
|
export declare function calcDisabledKeys(keyEntities: KeyEntities): Set<string>;
|
|
77
|
-
export declare function calcDropRelativePosition(event: any, treeNode: any):
|
|
77
|
+
export declare function calcDropRelativePosition(event: any, treeNode: any): 1 | -1 | 0;
|
|
78
78
|
export declare function getDragNodesKeys(key: string, keyEntities: KeyEntities): string[];
|
|
79
79
|
export declare function calcDropActualPosition(pos: string, relativeDropPos: any): any;
|
|
@@ -18,7 +18,7 @@ declare const strings: {
|
|
|
18
18
|
DRAG_AREA_ILLEGAL: string;
|
|
19
19
|
TRIGGER_AUTO: "auto";
|
|
20
20
|
TRIGGER_CUSTOM: "custom";
|
|
21
|
-
UPLOAD_TRIGGER: ("
|
|
21
|
+
UPLOAD_TRIGGER: ("auto" | "custom")[];
|
|
22
22
|
VALIDATE_STATUS: readonly ["default", "error", "warning", "success"];
|
|
23
23
|
PROMPT_POSITION: readonly ["left", "right", "bottom"];
|
|
24
24
|
};
|
|
@@ -34,8 +34,6 @@ export interface ItemAdapter<P = Record<string, any>, S = Record<string, any>> e
|
|
|
34
34
|
getIsCollapsed(): boolean;
|
|
35
35
|
getSelected(): boolean;
|
|
36
36
|
getIsOpen(): boolean;
|
|
37
|
-
getIsInSubNav(): boolean;
|
|
38
|
-
getMode(): string;
|
|
39
37
|
}
|
|
40
38
|
export default class ItemFoundation<P = Record<string, any>, S = Record<string, any>> extends BaseFoundation<ItemAdapter<P, S>, P, S> {
|
|
41
39
|
_timer: number;
|
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
padding: 8px 12px;
|
|
57
57
|
box-sizing: border-box;
|
|
58
58
|
margin-top: 0;
|
|
59
|
+
margin-bottom: 8px;
|
|
59
60
|
font-size: 14px;
|
|
60
61
|
line-height: 20px;
|
|
61
62
|
font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
@@ -240,9 +241,6 @@
|
|
|
240
241
|
text-overflow: ellipsis;
|
|
241
242
|
white-space: nowrap;
|
|
242
243
|
overflow: hidden;
|
|
243
|
-
display: flex;
|
|
244
|
-
flex-direction: column;
|
|
245
|
-
row-gap: 8px;
|
|
246
244
|
}
|
|
247
245
|
.semi-navigation-sub .semi-navigation-item {
|
|
248
246
|
color: var(--semi-color-text-0);
|
|
@@ -335,12 +333,6 @@
|
|
|
335
333
|
transition: transform 200ms ease-in-out;
|
|
336
334
|
transform: rotate(-180deg);
|
|
337
335
|
}
|
|
338
|
-
.semi-navigation-icon-rotate-0-no-transition {
|
|
339
|
-
transform: rotate(0);
|
|
340
|
-
}
|
|
341
|
-
.semi-navigation-icon-rotate-180-no-transition {
|
|
342
|
-
transform: rotate(-180deg);
|
|
343
|
-
}
|
|
344
336
|
|
|
345
337
|
/* Header、Footer-Common */
|
|
346
338
|
.semi-navigation-header {
|
|
@@ -401,11 +393,6 @@
|
|
|
401
393
|
.semi-navigation-vertical .semi-navigation-list > .semi-navigation-item-selected:not(.semi-navigation-item-disabled).semi-navigation-item-normal:hover .semi-navigation-item-icon:first-child {
|
|
402
394
|
color: var(--semi-color-primary);
|
|
403
395
|
}
|
|
404
|
-
.semi-navigation-vertical .semi-navigation-list {
|
|
405
|
-
display: flex;
|
|
406
|
-
flex-direction: column;
|
|
407
|
-
row-gap: 8px;
|
|
408
|
-
}
|
|
409
396
|
.semi-navigation-vertical .semi-navigation-list > .semi-navigation-sub-wrap > .semi-navigation-sub-title {
|
|
410
397
|
color: var(--semi-color-text-0);
|
|
411
398
|
background-color: transparent;
|
|
@@ -483,6 +470,9 @@
|
|
|
483
470
|
.semi-navigation-vertical .semi-navigation-list > .semi-navigation-sub-wrap > .semi-navigation-sub-title:hover.semi-navigation-sub-title-disabled.semi-navigation-sub-title-selected .semi-navigation-item-icon:first-child, .semi-navigation-vertical .semi-navigation-list > .semi-navigation-sub-wrap > .semi-navigation-sub-title:active.semi-navigation-sub-title-disabled.semi-navigation-sub-title-selected .semi-navigation-item-icon:first-child {
|
|
484
471
|
color: var(--semi-color-primary-disabled);
|
|
485
472
|
}
|
|
473
|
+
.semi-navigation-vertical .semi-navigation-item:last-of-type {
|
|
474
|
+
margin-bottom: 0;
|
|
475
|
+
}
|
|
486
476
|
.semi-navigation-vertical .semi-navigation-inner {
|
|
487
477
|
flex-direction: column;
|
|
488
478
|
}
|
|
@@ -681,66 +671,6 @@
|
|
|
681
671
|
padding: 0;
|
|
682
672
|
}
|
|
683
673
|
|
|
684
|
-
.semi-navigation-first-layer > .semi-navigation-sub-title .semi-navigation-item-text {
|
|
685
|
-
font-weight: 600;
|
|
686
|
-
}
|
|
687
|
-
.semi-navigation-first-layer > .semi-navigation-item-text {
|
|
688
|
-
font-weight: 600;
|
|
689
|
-
}
|
|
690
|
-
|
|
691
|
-
.semi-navigation-sub-title-selected .semi-navigation-item-icon:first-child {
|
|
692
|
-
color: var(--semi-color-primary);
|
|
693
|
-
}
|
|
694
|
-
|
|
695
|
-
.semi-navigation-sub-wrap .semi-navigation-sub-title {
|
|
696
|
-
margin-bottom: 0;
|
|
697
|
-
}
|
|
698
|
-
.semi-navigation-sub-wrap .semi-navigation-item:last-of-type {
|
|
699
|
-
margin-bottom: 0;
|
|
700
|
-
}
|
|
701
|
-
|
|
702
|
-
.semi-navigation-sub-title.semi-navigation-sub-title-disabled .semi-navigation-item-text {
|
|
703
|
-
color: var(--semi-color-disabled-text);
|
|
704
|
-
}
|
|
705
|
-
|
|
706
|
-
.semi-navigation-item-horizontal.semi-navigation-item {
|
|
707
|
-
width: fit-content;
|
|
708
|
-
margin-bottom: 0;
|
|
709
|
-
margin-right: 8px;
|
|
710
|
-
}
|
|
711
|
-
.semi-navigation-item-horizontal.semi-navigation-item.semi-navigation-item-disabled {
|
|
712
|
-
color: var(--semi-color-disabled-text);
|
|
713
|
-
}
|
|
714
|
-
.semi-navigation-item-horizontal .semi-navigation-sub-title .semi-navigation-item-icon:first-child,
|
|
715
|
-
.semi-navigation-item-horizontal .semi-navigation-sub-title .semi-navigation-item-text {
|
|
716
|
-
color: var(--semi-color-text-2);
|
|
717
|
-
background-color: transparent;
|
|
718
|
-
}
|
|
719
|
-
.semi-navigation-item-horizontal .semi-navigation-sub-title.semi-navigation-sub-title-selected .semi-navigation-item-icon:first-child,
|
|
720
|
-
.semi-navigation-item-horizontal .semi-navigation-sub-title.semi-navigation-sub-title-selected .semi-navigation-item-text {
|
|
721
|
-
color: var(--semi-color-text-0);
|
|
722
|
-
}
|
|
723
|
-
.semi-navigation-item-horizontal .semi-navigation-sub-title.semi-navigation-sub-title-disabled .semi-navigation-item-icon:first-child,
|
|
724
|
-
.semi-navigation-item-horizontal .semi-navigation-sub-title.semi-navigation-sub-title-disabled .semi-navigation-item-text {
|
|
725
|
-
color: var(--semi-color-disabled-text);
|
|
726
|
-
}
|
|
727
|
-
.semi-navigation-item-horizontal.semi-navigation-first-layer {
|
|
728
|
-
color: var(--semi-color-text-2);
|
|
729
|
-
}
|
|
730
|
-
.semi-navigation-item-horizontal.semi-navigation-item-selected {
|
|
731
|
-
background-color: transparent;
|
|
732
|
-
}
|
|
733
|
-
.semi-navigation-item-horizontal.semi-navigation-item-selected .semi-navigation-item-icon:first-child,
|
|
734
|
-
.semi-navigation-item-horizontal.semi-navigation-item-selected .semi-navigation-item-text {
|
|
735
|
-
color: var(--semi-color-text-0);
|
|
736
|
-
}
|
|
737
|
-
.semi-navigation-item-horizontal .semi-navigation-item-icon:first-child {
|
|
738
|
-
margin-right: 8px;
|
|
739
|
-
}
|
|
740
|
-
.semi-navigation-item-horizontal .semi-navigation-item-icon:last-child {
|
|
741
|
-
margin-left: 8px;
|
|
742
|
-
}
|
|
743
|
-
|
|
744
674
|
.semi-rtl .semi-navigation,
|
|
745
675
|
.semi-portal-rtl .semi-navigation {
|
|
746
676
|
direction: rtl;
|
|
@@ -76,7 +76,7 @@ $module: #{$prefix}-navigation;
|
|
|
76
76
|
padding: $spacing-navigation_item-paddingY $spacing-navigation_item-paddingX;
|
|
77
77
|
box-sizing: border-box;
|
|
78
78
|
margin-top: 0;
|
|
79
|
-
|
|
79
|
+
margin-bottom: $spacing-navigation_item-marginBottom;
|
|
80
80
|
|
|
81
81
|
@include font-size-regular;
|
|
82
82
|
font-weight: $font-navigation_item_normal-fontWeight;
|
|
@@ -257,9 +257,6 @@ $module: #{$prefix}-navigation;
|
|
|
257
257
|
text-overflow: ellipsis;
|
|
258
258
|
white-space: nowrap;
|
|
259
259
|
overflow: hidden;
|
|
260
|
-
display: flex;
|
|
261
|
-
flex-direction: column;
|
|
262
|
-
row-gap: 8px;
|
|
263
260
|
|
|
264
261
|
.#{$module}-item {
|
|
265
262
|
color: $color-navigation_itemLn-text-default;
|
|
@@ -346,12 +343,6 @@ $module: #{$prefix}-navigation;
|
|
|
346
343
|
transform: rotate(-180deg);
|
|
347
344
|
}
|
|
348
345
|
|
|
349
|
-
&-icon-rotate-0-no-transition {
|
|
350
|
-
transform: rotate(0);
|
|
351
|
-
}
|
|
352
|
-
&-icon-rotate-180-no-transition {
|
|
353
|
-
transform: rotate(-180deg);
|
|
354
|
-
}
|
|
355
346
|
}
|
|
356
347
|
|
|
357
348
|
/* Header、Footer-Common */
|
|
@@ -439,12 +430,6 @@ $module: #{$prefix}-navigation;
|
|
|
439
430
|
}
|
|
440
431
|
}
|
|
441
432
|
|
|
442
|
-
&-list {
|
|
443
|
-
display: flex;
|
|
444
|
-
flex-direction: column;
|
|
445
|
-
row-gap: 8px;
|
|
446
|
-
}
|
|
447
|
-
|
|
448
433
|
&-list > .#{$module}-sub-wrap {
|
|
449
434
|
& > .#{$module}-sub-title {
|
|
450
435
|
color: $color-navigation_itemL1-text-default;
|
|
@@ -498,9 +483,9 @@ $module: #{$prefix}-navigation;
|
|
|
498
483
|
}
|
|
499
484
|
}
|
|
500
485
|
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
486
|
+
.#{$module}-item:last-of-type {
|
|
487
|
+
margin-bottom: $spacing-navigation_vertical_nav_item_last-marginBottom;
|
|
488
|
+
}
|
|
504
489
|
|
|
505
490
|
.#{$module}-inner {
|
|
506
491
|
flex-direction: column;
|
|
@@ -729,97 +714,4 @@ $module: #{$prefix}-navigation;
|
|
|
729
714
|
}
|
|
730
715
|
}
|
|
731
716
|
|
|
732
|
-
// The following css is used for the variant generation of NavItem and NavSub in C2D
|
|
733
|
-
.#{$module}-first-layer {
|
|
734
|
-
> .#{$module}-sub-title {
|
|
735
|
-
.#{$module}-item-text {
|
|
736
|
-
font-weight: 600;
|
|
737
|
-
}
|
|
738
|
-
}
|
|
739
|
-
|
|
740
|
-
> .#{$module}-item-text {
|
|
741
|
-
font-weight: 600;
|
|
742
|
-
}
|
|
743
|
-
}
|
|
744
|
-
|
|
745
|
-
.#{$module}-sub-title-selected {
|
|
746
|
-
.#{$module}-item-icon:first-child {
|
|
747
|
-
color: $color-navigation_itemL1_selected_icon-default;
|
|
748
|
-
}
|
|
749
|
-
}
|
|
750
|
-
|
|
751
|
-
.#{$module}-sub-wrap {
|
|
752
|
-
.#{$module}-sub-title {
|
|
753
|
-
margin-bottom: $spacing-navigation_sub_title-marginBottom;
|
|
754
|
-
}
|
|
755
|
-
|
|
756
|
-
.#{$module}-item:last-of-type {
|
|
757
|
-
margin-bottom: $spacing-navigation_vertical_nav_item_last-marginBottom;
|
|
758
|
-
}
|
|
759
|
-
}
|
|
760
|
-
|
|
761
|
-
.#{$module}-sub-title {
|
|
762
|
-
&.#{$module}-sub-title-disabled {
|
|
763
|
-
.semi-navigation-item-text {
|
|
764
|
-
color: $color-navigation_itemL1_disabled-text-default;
|
|
765
|
-
}
|
|
766
|
-
}
|
|
767
|
-
}
|
|
768
|
-
|
|
769
|
-
.#{$module}-item-horizontal {
|
|
770
|
-
// The width of nav NavItem and NavSub in the horizontal direction both need fit-content
|
|
771
|
-
&.#{$module}-item {
|
|
772
|
-
width: fit-content;
|
|
773
|
-
margin-bottom: $spacing-navigation_horizontal_nav_list_item-marginBottom;
|
|
774
|
-
margin-right: $spacing-navigation_horizontal_nav_list_item_not_last-marginRight;
|
|
775
|
-
|
|
776
|
-
&.#{$module}-item-disabled {
|
|
777
|
-
color: $color-navigation_horizontal_itemL1_disabled-text-default;
|
|
778
|
-
}
|
|
779
|
-
}
|
|
780
|
-
|
|
781
|
-
.#{$module}-sub-title {
|
|
782
|
-
.#{$module}-item-icon:first-child,
|
|
783
|
-
.#{$module}-item-text {
|
|
784
|
-
color: var(--semi-color-text-2);
|
|
785
|
-
background-color: transparent;
|
|
786
|
-
}
|
|
787
|
-
|
|
788
|
-
&.#{$module}-sub-title-selected {
|
|
789
|
-
.#{$module}-item-icon:first-child,
|
|
790
|
-
.#{$module}-item-text {
|
|
791
|
-
color: $color-navigation_horizontal_itemL1_selected-text-default;
|
|
792
|
-
}
|
|
793
|
-
}
|
|
794
|
-
|
|
795
|
-
&.#{$module}-sub-title-disabled {
|
|
796
|
-
.#{$module}-item-icon:first-child,
|
|
797
|
-
.#{$module}-item-text {
|
|
798
|
-
color: $color-navigation_horizontal_itemL1_disabled-text-default;
|
|
799
|
-
}
|
|
800
|
-
}
|
|
801
|
-
}
|
|
802
|
-
|
|
803
|
-
&.#{$module}-first-layer {
|
|
804
|
-
color: $color-navigation_horizontal_itemL1-text-default;
|
|
805
|
-
}
|
|
806
|
-
|
|
807
|
-
&.#{$module}-item-selected {
|
|
808
|
-
background-color: $color-navigation_horizontal_itemL1_selected-bg-default;
|
|
809
|
-
|
|
810
|
-
.#{$module}-item-icon:first-child,
|
|
811
|
-
.#{$module}-item-text {
|
|
812
|
-
color: $color-navigation_horizontal_itemL1_selected-text-default;
|
|
813
|
-
}
|
|
814
|
-
}
|
|
815
|
-
|
|
816
|
-
.semi-navigation-item-icon:first-child {
|
|
817
|
-
margin-right: 8px;
|
|
818
|
-
}
|
|
819
|
-
|
|
820
|
-
.semi-navigation-item-icon:last-child {
|
|
821
|
-
margin-left: 8px;
|
|
822
|
-
}
|
|
823
|
-
}
|
|
824
|
-
|
|
825
717
|
@import "./rtl.scss";
|
|
@@ -21,8 +21,6 @@ export interface SubNavAdapter<P = Record<string, any>, S = Record<string, any>>
|
|
|
21
21
|
notifyGlobalOnClick(data: OnClickData): void;
|
|
22
22
|
getIsSelected(itemKey: string | number): boolean;
|
|
23
23
|
getIsOpen(): boolean;
|
|
24
|
-
getIsCollapsed(): boolean;
|
|
25
|
-
getMode(): string;
|
|
26
24
|
}
|
|
27
25
|
export default class SubNavFoundation<P = Record<string, any>, S = Record<string, any>> extends BaseFoundation<SubNavAdapter<P, S>, P, S> {
|
|
28
26
|
constructor(adapter: SubNavAdapter<P, S>);
|
|
@@ -74,6 +74,6 @@ export declare function getValueOrKey(data: any): any;
|
|
|
74
74
|
export declare function normalizeValue(value: any, withObject: boolean): any;
|
|
75
75
|
export declare function updateKeys(keySet: Set<string> | string[], keyEntities: KeyEntities): string[];
|
|
76
76
|
export declare function calcDisabledKeys(keyEntities: KeyEntities): Set<string>;
|
|
77
|
-
export declare function calcDropRelativePosition(event: any, treeNode: any):
|
|
77
|
+
export declare function calcDropRelativePosition(event: any, treeNode: any): 1 | -1 | 0;
|
|
78
78
|
export declare function getDragNodesKeys(key: string, keyEntities: KeyEntities): string[];
|
|
79
79
|
export declare function calcDropActualPosition(pos: string, relativeDropPos: any): any;
|
|
@@ -18,7 +18,7 @@ declare const strings: {
|
|
|
18
18
|
DRAG_AREA_ILLEGAL: string;
|
|
19
19
|
TRIGGER_AUTO: "auto";
|
|
20
20
|
TRIGGER_CUSTOM: "custom";
|
|
21
|
-
UPLOAD_TRIGGER: ("
|
|
21
|
+
UPLOAD_TRIGGER: ("auto" | "custom")[];
|
|
22
22
|
VALIDATE_STATUS: readonly ["default", "error", "warning", "success"];
|
|
23
23
|
PROMPT_POSITION: readonly ["left", "right", "bottom"];
|
|
24
24
|
};
|
|
@@ -39,9 +39,7 @@ export interface ItemAdapter<P = Record<string, any>, S = Record<string, any>> e
|
|
|
39
39
|
notifyMouseLeave(e: any): void;
|
|
40
40
|
getIsCollapsed(): boolean;
|
|
41
41
|
getSelected(): boolean;
|
|
42
|
-
getIsOpen(): boolean
|
|
43
|
-
getIsInSubNav(): boolean;
|
|
44
|
-
getMode(): string
|
|
42
|
+
getIsOpen(): boolean
|
|
45
43
|
}
|
|
46
44
|
|
|
47
45
|
export default class ItemFoundation<P = Record<string, any>, S = Record<string, any>> extends BaseFoundation<ItemAdapter<P, S>, P, S> {
|
|
@@ -76,7 +76,7 @@ $module: #{$prefix}-navigation;
|
|
|
76
76
|
padding: $spacing-navigation_item-paddingY $spacing-navigation_item-paddingX;
|
|
77
77
|
box-sizing: border-box;
|
|
78
78
|
margin-top: 0;
|
|
79
|
-
|
|
79
|
+
margin-bottom: $spacing-navigation_item-marginBottom;
|
|
80
80
|
|
|
81
81
|
@include font-size-regular;
|
|
82
82
|
font-weight: $font-navigation_item_normal-fontWeight;
|
|
@@ -257,9 +257,6 @@ $module: #{$prefix}-navigation;
|
|
|
257
257
|
text-overflow: ellipsis;
|
|
258
258
|
white-space: nowrap;
|
|
259
259
|
overflow: hidden;
|
|
260
|
-
display: flex;
|
|
261
|
-
flex-direction: column;
|
|
262
|
-
row-gap: 8px;
|
|
263
260
|
|
|
264
261
|
.#{$module}-item {
|
|
265
262
|
color: $color-navigation_itemLn-text-default;
|
|
@@ -346,12 +343,6 @@ $module: #{$prefix}-navigation;
|
|
|
346
343
|
transform: rotate(-180deg);
|
|
347
344
|
}
|
|
348
345
|
|
|
349
|
-
&-icon-rotate-0-no-transition {
|
|
350
|
-
transform: rotate(0);
|
|
351
|
-
}
|
|
352
|
-
&-icon-rotate-180-no-transition {
|
|
353
|
-
transform: rotate(-180deg);
|
|
354
|
-
}
|
|
355
346
|
}
|
|
356
347
|
|
|
357
348
|
/* Header、Footer-Common */
|
|
@@ -439,12 +430,6 @@ $module: #{$prefix}-navigation;
|
|
|
439
430
|
}
|
|
440
431
|
}
|
|
441
432
|
|
|
442
|
-
&-list {
|
|
443
|
-
display: flex;
|
|
444
|
-
flex-direction: column;
|
|
445
|
-
row-gap: 8px;
|
|
446
|
-
}
|
|
447
|
-
|
|
448
433
|
&-list > .#{$module}-sub-wrap {
|
|
449
434
|
& > .#{$module}-sub-title {
|
|
450
435
|
color: $color-navigation_itemL1-text-default;
|
|
@@ -498,9 +483,9 @@ $module: #{$prefix}-navigation;
|
|
|
498
483
|
}
|
|
499
484
|
}
|
|
500
485
|
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
486
|
+
.#{$module}-item:last-of-type {
|
|
487
|
+
margin-bottom: $spacing-navigation_vertical_nav_item_last-marginBottom;
|
|
488
|
+
}
|
|
504
489
|
|
|
505
490
|
.#{$module}-inner {
|
|
506
491
|
flex-direction: column;
|
|
@@ -729,97 +714,4 @@ $module: #{$prefix}-navigation;
|
|
|
729
714
|
}
|
|
730
715
|
}
|
|
731
716
|
|
|
732
|
-
// The following css is used for the variant generation of NavItem and NavSub in C2D
|
|
733
|
-
.#{$module}-first-layer {
|
|
734
|
-
> .#{$module}-sub-title {
|
|
735
|
-
.#{$module}-item-text {
|
|
736
|
-
font-weight: 600;
|
|
737
|
-
}
|
|
738
|
-
}
|
|
739
|
-
|
|
740
|
-
> .#{$module}-item-text {
|
|
741
|
-
font-weight: 600;
|
|
742
|
-
}
|
|
743
|
-
}
|
|
744
|
-
|
|
745
|
-
.#{$module}-sub-title-selected {
|
|
746
|
-
.#{$module}-item-icon:first-child {
|
|
747
|
-
color: $color-navigation_itemL1_selected_icon-default;
|
|
748
|
-
}
|
|
749
|
-
}
|
|
750
|
-
|
|
751
|
-
.#{$module}-sub-wrap {
|
|
752
|
-
.#{$module}-sub-title {
|
|
753
|
-
margin-bottom: $spacing-navigation_sub_title-marginBottom;
|
|
754
|
-
}
|
|
755
|
-
|
|
756
|
-
.#{$module}-item:last-of-type {
|
|
757
|
-
margin-bottom: $spacing-navigation_vertical_nav_item_last-marginBottom;
|
|
758
|
-
}
|
|
759
|
-
}
|
|
760
|
-
|
|
761
|
-
.#{$module}-sub-title {
|
|
762
|
-
&.#{$module}-sub-title-disabled {
|
|
763
|
-
.semi-navigation-item-text {
|
|
764
|
-
color: $color-navigation_itemL1_disabled-text-default;
|
|
765
|
-
}
|
|
766
|
-
}
|
|
767
|
-
}
|
|
768
|
-
|
|
769
|
-
.#{$module}-item-horizontal {
|
|
770
|
-
// The width of nav NavItem and NavSub in the horizontal direction both need fit-content
|
|
771
|
-
&.#{$module}-item {
|
|
772
|
-
width: fit-content;
|
|
773
|
-
margin-bottom: $spacing-navigation_horizontal_nav_list_item-marginBottom;
|
|
774
|
-
margin-right: $spacing-navigation_horizontal_nav_list_item_not_last-marginRight;
|
|
775
|
-
|
|
776
|
-
&.#{$module}-item-disabled {
|
|
777
|
-
color: $color-navigation_horizontal_itemL1_disabled-text-default;
|
|
778
|
-
}
|
|
779
|
-
}
|
|
780
|
-
|
|
781
|
-
.#{$module}-sub-title {
|
|
782
|
-
.#{$module}-item-icon:first-child,
|
|
783
|
-
.#{$module}-item-text {
|
|
784
|
-
color: var(--semi-color-text-2);
|
|
785
|
-
background-color: transparent;
|
|
786
|
-
}
|
|
787
|
-
|
|
788
|
-
&.#{$module}-sub-title-selected {
|
|
789
|
-
.#{$module}-item-icon:first-child,
|
|
790
|
-
.#{$module}-item-text {
|
|
791
|
-
color: $color-navigation_horizontal_itemL1_selected-text-default;
|
|
792
|
-
}
|
|
793
|
-
}
|
|
794
|
-
|
|
795
|
-
&.#{$module}-sub-title-disabled {
|
|
796
|
-
.#{$module}-item-icon:first-child,
|
|
797
|
-
.#{$module}-item-text {
|
|
798
|
-
color: $color-navigation_horizontal_itemL1_disabled-text-default;
|
|
799
|
-
}
|
|
800
|
-
}
|
|
801
|
-
}
|
|
802
|
-
|
|
803
|
-
&.#{$module}-first-layer {
|
|
804
|
-
color: $color-navigation_horizontal_itemL1-text-default;
|
|
805
|
-
}
|
|
806
|
-
|
|
807
|
-
&.#{$module}-item-selected {
|
|
808
|
-
background-color: $color-navigation_horizontal_itemL1_selected-bg-default;
|
|
809
|
-
|
|
810
|
-
.#{$module}-item-icon:first-child,
|
|
811
|
-
.#{$module}-item-text {
|
|
812
|
-
color: $color-navigation_horizontal_itemL1_selected-text-default;
|
|
813
|
-
}
|
|
814
|
-
}
|
|
815
|
-
|
|
816
|
-
.semi-navigation-item-icon:first-child {
|
|
817
|
-
margin-right: 8px;
|
|
818
|
-
}
|
|
819
|
-
|
|
820
|
-
.semi-navigation-item-icon:last-child {
|
|
821
|
-
margin-left: 8px;
|
|
822
|
-
}
|
|
823
|
-
}
|
|
824
|
-
|
|
825
717
|
@import "./rtl.scss";
|
|
@@ -37,9 +37,7 @@ export interface SubNavAdapter<P = Record<string, any>, S = Record<string, any>>
|
|
|
37
37
|
notifyGlobalOnSelect(data: OnSelectData): void;
|
|
38
38
|
notifyGlobalOnClick(data: OnClickData): void;
|
|
39
39
|
getIsSelected(itemKey: string | number): boolean;
|
|
40
|
-
getIsOpen(): boolean
|
|
41
|
-
getIsCollapsed(): boolean;
|
|
42
|
-
getMode(): string
|
|
40
|
+
getIsOpen(): boolean
|
|
43
41
|
}
|
|
44
42
|
|
|
45
43
|
export default class SubNavFoundation<P = Record<string, any>, S = Record<string, any>> extends BaseFoundation<SubNavAdapter<P, S>, P, S> {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@douyinfe/semi-foundation",
|
|
3
|
-
"version": "2.27.
|
|
3
|
+
"version": "2.27.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build:lib": "node ./scripts/compileLib.js",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"*.scss",
|
|
24
24
|
"*.css"
|
|
25
25
|
],
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "6efa0e3f18bac28642eadca29f6d3fa27e5d6ba4",
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@babel/plugin-transform-runtime": "^7.15.8",
|
|
29
29
|
"@babel/preset-env": "^7.15.8",
|