@douyinfe/semi-foundation 2.33.0 → 2.34.0-alpha.1
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 +2 -0
- package/lib/cjs/navigation/navigation.css +77 -7
- package/lib/cjs/navigation/navigation.scss +119 -7
- package/lib/cjs/navigation/subNavFoundation.d.ts +2 -0
- package/lib/cjs/steps/bacisSteps.scss +287 -238
- package/lib/cjs/steps/fillSteps.scss +153 -142
- package/lib/cjs/steps/navSteps.scss +61 -40
- package/lib/cjs/steps/steps.css +380 -16
- package/lib/cjs/timeline/timeline.css +36 -0
- package/lib/cjs/timeline/timeline.scss +96 -46
- 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 +2 -0
- package/lib/es/navigation/navigation.css +77 -7
- package/lib/es/navigation/navigation.scss +119 -7
- package/lib/es/navigation/subNavFoundation.d.ts +2 -0
- package/lib/es/steps/bacisSteps.scss +287 -238
- package/lib/es/steps/fillSteps.scss +153 -142
- package/lib/es/steps/navSteps.scss +61 -40
- package/lib/es/steps/steps.css +380 -16
- package/lib/es/timeline/timeline.css +36 -0
- package/lib/es/timeline/timeline.scss +96 -46
- package/lib/es/tree/treeUtil.d.ts +1 -1
- package/lib/es/upload/constants.d.ts +1 -1
- package/navigation/itemFoundation.ts +3 -1
- package/navigation/navigation.scss +119 -7
- package/navigation/subNavFoundation.ts +3 -1
- package/package.json +2 -2
- package/steps/bacisSteps.scss +287 -238
- package/steps/fillSteps.scss +153 -142
- package/steps/navSteps.scss +61 -40
- package/timeline/timeline.scss +96 -46
|
@@ -34,6 +34,8 @@ 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;
|
|
37
39
|
}
|
|
38
40
|
export default class ItemFoundation<P = Record<string, any>, S = Record<string, any>> extends BaseFoundation<ItemAdapter<P, S>, P, S> {
|
|
39
41
|
_timer: number;
|
|
@@ -56,7 +56,6 @@
|
|
|
56
56
|
padding: 8px 12px;
|
|
57
57
|
box-sizing: border-box;
|
|
58
58
|
margin-top: 0;
|
|
59
|
-
margin-bottom: 8px;
|
|
60
59
|
font-size: 14px;
|
|
61
60
|
line-height: 20px;
|
|
62
61
|
font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
@@ -241,6 +240,12 @@
|
|
|
241
240
|
text-overflow: ellipsis;
|
|
242
241
|
white-space: nowrap;
|
|
243
242
|
overflow: hidden;
|
|
243
|
+
display: flex;
|
|
244
|
+
flex-direction: column;
|
|
245
|
+
row-gap: 8px;
|
|
246
|
+
}
|
|
247
|
+
.semi-navigation-sub.semi-navigation-sub-open {
|
|
248
|
+
margin-top: 8px;
|
|
244
249
|
}
|
|
245
250
|
.semi-navigation-sub .semi-navigation-item {
|
|
246
251
|
color: var(--semi-color-text-0);
|
|
@@ -249,9 +254,6 @@
|
|
|
249
254
|
font-weight: 400;
|
|
250
255
|
width: 100%;
|
|
251
256
|
}
|
|
252
|
-
.semi-navigation-sub .semi-navigation-item:first-child {
|
|
253
|
-
margin-top: 8px;
|
|
254
|
-
}
|
|
255
257
|
.semi-navigation-sub .semi-navigation-item > .semi-navigation-sub .semi-navigation-item-text:first-child {
|
|
256
258
|
margin-left: 44px;
|
|
257
259
|
}
|
|
@@ -333,6 +335,12 @@
|
|
|
333
335
|
transition: transform 200ms ease-in-out;
|
|
334
336
|
transform: rotate(-180deg);
|
|
335
337
|
}
|
|
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
|
+
}
|
|
336
344
|
|
|
337
345
|
/* Header、Footer-Common */
|
|
338
346
|
.semi-navigation-header {
|
|
@@ -393,6 +401,11 @@
|
|
|
393
401
|
.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 {
|
|
394
402
|
color: var(--semi-color-primary);
|
|
395
403
|
}
|
|
404
|
+
.semi-navigation-vertical .semi-navigation-list {
|
|
405
|
+
display: flex;
|
|
406
|
+
flex-direction: column;
|
|
407
|
+
row-gap: 8px;
|
|
408
|
+
}
|
|
396
409
|
.semi-navigation-vertical .semi-navigation-list > .semi-navigation-sub-wrap > .semi-navigation-sub-title {
|
|
397
410
|
color: var(--semi-color-text-0);
|
|
398
411
|
background-color: transparent;
|
|
@@ -470,9 +483,6 @@
|
|
|
470
483
|
.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 {
|
|
471
484
|
color: var(--semi-color-primary-disabled);
|
|
472
485
|
}
|
|
473
|
-
.semi-navigation-vertical .semi-navigation-item:last-of-type {
|
|
474
|
-
margin-bottom: 0;
|
|
475
|
-
}
|
|
476
486
|
.semi-navigation-vertical .semi-navigation-inner {
|
|
477
487
|
flex-direction: column;
|
|
478
488
|
}
|
|
@@ -671,6 +681,66 @@
|
|
|
671
681
|
padding: 0;
|
|
672
682
|
}
|
|
673
683
|
|
|
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
|
+
|
|
674
744
|
.semi-rtl .semi-navigation,
|
|
675
745
|
.semi-portal-rtl .semi-navigation {
|
|
676
746
|
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
|
-
margin-bottom: $spacing-navigation_item-marginBottom;
|
|
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,6 +257,13 @@ $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: $spacing-navigation_item-marginBottom;
|
|
263
|
+
|
|
264
|
+
&.#{$module}-sub-open {
|
|
265
|
+
margin-top: $spacing-navigation_sub_item_first_child-marginTop;
|
|
266
|
+
}
|
|
260
267
|
|
|
261
268
|
.#{$module}-item {
|
|
262
269
|
color: $color-navigation_itemLn-text-default;
|
|
@@ -268,9 +275,9 @@ $module: #{$prefix}-navigation;
|
|
|
268
275
|
font-weight: $font-navigation_sub_item-fontWeight;
|
|
269
276
|
width: 100%;
|
|
270
277
|
|
|
271
|
-
&:first-child {
|
|
272
|
-
|
|
273
|
-
}
|
|
278
|
+
// &:first-child {
|
|
279
|
+
// margin-top: $spacing-navigation_sub_item_first_child-marginTop;
|
|
280
|
+
// }
|
|
274
281
|
|
|
275
282
|
& > &-text:first-child {
|
|
276
283
|
margin-left: $spacing-base-tight + $width-navigation_icon_left + $width-navigation_icon_text_between;
|
|
@@ -343,6 +350,12 @@ $module: #{$prefix}-navigation;
|
|
|
343
350
|
transform: rotate(-180deg);
|
|
344
351
|
}
|
|
345
352
|
|
|
353
|
+
&-icon-rotate-0-no-transition {
|
|
354
|
+
transform: rotate(0);
|
|
355
|
+
}
|
|
356
|
+
&-icon-rotate-180-no-transition {
|
|
357
|
+
transform: rotate(-180deg);
|
|
358
|
+
}
|
|
346
359
|
}
|
|
347
360
|
|
|
348
361
|
/* Header、Footer-Common */
|
|
@@ -430,6 +443,12 @@ $module: #{$prefix}-navigation;
|
|
|
430
443
|
}
|
|
431
444
|
}
|
|
432
445
|
|
|
446
|
+
&-list {
|
|
447
|
+
display: flex;
|
|
448
|
+
flex-direction: column;
|
|
449
|
+
row-gap: $spacing-navigation_item-marginBottom;
|
|
450
|
+
}
|
|
451
|
+
|
|
433
452
|
&-list > .#{$module}-sub-wrap {
|
|
434
453
|
& > .#{$module}-sub-title {
|
|
435
454
|
color: $color-navigation_itemL1-text-default;
|
|
@@ -483,9 +502,9 @@ $module: #{$prefix}-navigation;
|
|
|
483
502
|
}
|
|
484
503
|
}
|
|
485
504
|
|
|
486
|
-
.#{$module}-item:last-of-type {
|
|
487
|
-
|
|
488
|
-
}
|
|
505
|
+
// .#{$module}-item:last-of-type {
|
|
506
|
+
// margin-bottom: $spacing-navigation_vertical_nav_item_last-marginBottom;
|
|
507
|
+
// }
|
|
489
508
|
|
|
490
509
|
.#{$module}-inner {
|
|
491
510
|
flex-direction: column;
|
|
@@ -714,4 +733,97 @@ $module: #{$prefix}-navigation;
|
|
|
714
733
|
}
|
|
715
734
|
}
|
|
716
735
|
|
|
736
|
+
// The following css is used for the variant generation of NavItem and NavSub in C2D
|
|
737
|
+
.#{$module}-first-layer {
|
|
738
|
+
> .#{$module}-sub-title {
|
|
739
|
+
.#{$module}-item-text {
|
|
740
|
+
font-weight: 600;
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
> .#{$module}-item-text {
|
|
745
|
+
font-weight: 600;
|
|
746
|
+
}
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
.#{$module}-sub-title-selected {
|
|
750
|
+
.#{$module}-item-icon:first-child {
|
|
751
|
+
color: $color-navigation_itemL1_selected_icon-default;
|
|
752
|
+
}
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
.#{$module}-sub-wrap {
|
|
756
|
+
.#{$module}-sub-title {
|
|
757
|
+
margin-bottom: $spacing-navigation_sub_title-marginBottom;
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
.#{$module}-item:last-of-type {
|
|
761
|
+
margin-bottom: $spacing-navigation_vertical_nav_item_last-marginBottom;
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
.#{$module}-sub-title {
|
|
766
|
+
&.#{$module}-sub-title-disabled {
|
|
767
|
+
.semi-navigation-item-text {
|
|
768
|
+
color: $color-navigation_itemL1_disabled-text-default;
|
|
769
|
+
}
|
|
770
|
+
}
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
.#{$module}-item-horizontal {
|
|
774
|
+
// The width of nav NavItem and NavSub in the horizontal direction both need fit-content
|
|
775
|
+
&.#{$module}-item {
|
|
776
|
+
width: fit-content;
|
|
777
|
+
margin-bottom: $spacing-navigation_horizontal_nav_list_item-marginBottom;
|
|
778
|
+
margin-right: $spacing-navigation_horizontal_nav_list_item_not_last-marginRight;
|
|
779
|
+
|
|
780
|
+
&.#{$module}-item-disabled {
|
|
781
|
+
color: $color-navigation_horizontal_itemL1_disabled-text-default;
|
|
782
|
+
}
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
.#{$module}-sub-title {
|
|
786
|
+
.#{$module}-item-icon:first-child,
|
|
787
|
+
.#{$module}-item-text {
|
|
788
|
+
color: var(--semi-color-text-2);
|
|
789
|
+
background-color: transparent;
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
&.#{$module}-sub-title-selected {
|
|
793
|
+
.#{$module}-item-icon:first-child,
|
|
794
|
+
.#{$module}-item-text {
|
|
795
|
+
color: $color-navigation_horizontal_itemL1_selected-text-default;
|
|
796
|
+
}
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
&.#{$module}-sub-title-disabled {
|
|
800
|
+
.#{$module}-item-icon:first-child,
|
|
801
|
+
.#{$module}-item-text {
|
|
802
|
+
color: $color-navigation_horizontal_itemL1_disabled-text-default;
|
|
803
|
+
}
|
|
804
|
+
}
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
&.#{$module}-first-layer {
|
|
808
|
+
color: $color-navigation_horizontal_itemL1-text-default;
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
&.#{$module}-item-selected {
|
|
812
|
+
background-color: $color-navigation_horizontal_itemL1_selected-bg-default;
|
|
813
|
+
|
|
814
|
+
.#{$module}-item-icon:first-child,
|
|
815
|
+
.#{$module}-item-text {
|
|
816
|
+
color: $color-navigation_horizontal_itemL1_selected-text-default;
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
.semi-navigation-item-icon:first-child {
|
|
821
|
+
margin-right: $spacing-navigation_horizontal_icon_last-marginLeft;
|
|
822
|
+
}
|
|
823
|
+
|
|
824
|
+
.semi-navigation-item-icon:last-child {
|
|
825
|
+
margin-left: $spacing-navigation_horizontal_icon_first-marginRight;
|
|
826
|
+
}
|
|
827
|
+
}
|
|
828
|
+
|
|
717
829
|
@import "./rtl.scss";
|
|
@@ -21,6 +21,8 @@ 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;
|
|
24
26
|
}
|
|
25
27
|
export default class SubNavFoundation<P = Record<string, any>, S = Record<string, any>> extends BaseFoundation<SubNavAdapter<P, S>, P, S> {
|
|
26
28
|
constructor(adapter: SubNavAdapter<P, S>);
|