@zjpcy/simple-design 1.5.3 → 1.5.5

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.
@@ -304,7 +304,7 @@
304
304
  -moz-user-select: none;
305
305
  user-select: none;
306
306
  border: none;
307
- border-radius: var(--zjpcy-border-radius-lg);
307
+ border-radius: 4px;
308
308
  transition: all var(--zjpcy-transition-duration) var(--zjpcy-transition-timing-function);
309
309
  outline: none;
310
310
  position: relative;
@@ -343,18 +343,18 @@
343
343
  Primary 主题 - 主色调
344
344
  ============================================ */
345
345
  .zjpcy-btn--primary {
346
- background: linear-gradient(135deg, var(--zjpcy-button-primary-bg) 0%, var(--zjpcy-primary-hover-color) 100%);
346
+ background: var(--zjpcy-button-primary-bg);
347
347
  color: var(--zjpcy-button-text-white);
348
348
  box-shadow: var(--zjpcy-shadow-sm);
349
349
  }
350
350
 
351
351
  .zjpcy-btn--primary:hover:not(.zjpcy-btn--disabled) {
352
- background: linear-gradient(135deg, var(--zjpcy-primary-hover-color) 0%, #69c0ff 100%);
352
+ background: var(--zjpcy-primary-hover-color);
353
353
  box-shadow: var(--zjpcy-shadow-md);
354
354
  }
355
355
 
356
356
  .zjpcy-btn--primary:active:not(.zjpcy-btn--disabled) {
357
- background: linear-gradient(135deg, #096dd9 0%, var(--zjpcy-button-primary-bg) 100%);
357
+ background: #096dd9;
358
358
  box-shadow: var(--zjpcy-shadow-extra-light);
359
359
  transform: translateY(0);
360
360
  }
@@ -864,8 +864,8 @@
864
864
  text-align: center;
865
865
  background: rgba(0, 0, 0, 0.55);
866
866
  border-radius: var(--zjpcy-border-radius-lg);
867
- backdrop-filter: blur(8px);
868
- -webkit-backdrop-filter: blur(8px);
867
+ backdrop-filter: blur(2px);
868
+ -webkit-backdrop-filter: blur(2px);
869
869
  }
870
870
 
871
871
  .zjpcy-carousel__title {
@@ -1118,8 +1118,8 @@
1118
1118
  display: flex;
1119
1119
  align-items: center;
1120
1120
  gap: 4px;
1121
- backdrop-filter: blur(4px);
1122
- -webkit-backdrop-filter: blur(4px);
1121
+ backdrop-filter: blur(2px);
1122
+ -webkit-backdrop-filter: blur(2px);
1123
1123
  border: 1px solid rgba(255, 255, 255, 0.1);
1124
1124
  box-shadow: var(--zjpcy-shadow-sm);
1125
1125
  letter-spacing: 0.5px;
@@ -3392,8 +3392,8 @@
3392
3392
  opacity: 0;
3393
3393
  transition: all var(--zjpcy-transition-duration) var(--zjpcy-transition-timing-function);
3394
3394
  pointer-events: auto;
3395
- backdrop-filter: blur(8px);
3396
- -webkit-backdrop-filter: blur(8px);
3395
+ backdrop-filter: blur(2px);
3396
+ -webkit-backdrop-filter: blur(2px);
3397
3397
  }
3398
3398
 
3399
3399
  /* 显示状态 */
@@ -3552,7 +3552,7 @@
3552
3552
  justify-content: center;
3553
3553
  z-index: var(--zjpcy-z-index-modal);
3554
3554
  pointer-events: none;
3555
- transition: background-color 0.3s ease;
3555
+ transition: background-color 0.25s ease-out;
3556
3556
  }
3557
3557
 
3558
3558
  .zjpcy-modal-overlay--visible {
@@ -3626,17 +3626,17 @@
3626
3626
 
3627
3627
  /* 中心动画 */
3628
3628
  .zjpcy-modal-container--center {
3629
- animation: centerAnimateIn 0.5s cubic-bezier(0.23, 1, 0.32, 1) forwards;
3629
+ animation: centerAnimateIn 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
3630
3630
  }
3631
3631
 
3632
- /* 中心动画(设置了top - 从指定top位置的垂直中心开始 */
3633
- .zjpcy-modal-container--center-top {
3634
- animation: centerTopAnimateIn 0.5s cubic-bezier(0.23, 1, 0.32, 1) forwards;
3632
+ /* 从浏览器顶部滑入到指定 top 位置的动画 */
3633
+ .zjpcy-modal-container--from-top {
3634
+ animation: fromTopAnimateIn 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
3635
3635
  }
3636
3636
 
3637
3637
  @keyframes centerAnimateIn {
3638
3638
  from {
3639
- transform: scale(0.95);
3639
+ transform: scale(0.85);
3640
3640
  opacity: 0;
3641
3641
  }
3642
3642
  to {
@@ -3645,25 +3645,25 @@
3645
3645
  }
3646
3646
  }
3647
3647
 
3648
- @keyframes centerTopAnimateIn {
3648
+ @keyframes fromTopAnimateIn {
3649
3649
  from {
3650
- transform: translate(var(--zjpcy-modal-origin-x, 0), var(--zjpcy-modal-origin-y, 0)) scale(0.95);
3650
+ transform: translateY(-100vh) scale(0.7);
3651
3651
  opacity: 0;
3652
3652
  }
3653
3653
  to {
3654
- transform: translate(0, 0) scale(1);
3654
+ transform: translateY(0) scale(1);
3655
3655
  opacity: 1;
3656
3656
  }
3657
3657
  }
3658
3658
 
3659
- /* 正常动画(从点击位置缓慢过渡) */
3659
+ /* 正常动画(从触发器位置缓慢过渡到中心) */
3660
3660
  .zjpcy-modal-container--normal {
3661
- animation: normalAnimateIn 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards;
3661
+ animation: normalAnimateIn 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
3662
3662
  }
3663
3663
 
3664
3664
  @keyframes normalAnimateIn {
3665
3665
  from {
3666
- transform: translate(var(--zjpcy-modal-origin-x, 0), var(--zjpcy-modal-origin-y, 0)) scale(0.9);
3666
+ transform: translate(var(--zjpcy-modal-origin-x, 0), var(--zjpcy-modal-origin-y, 0)) scale(0.5);
3667
3667
  opacity: 0;
3668
3668
  }
3669
3669
  to {
@@ -3672,14 +3672,14 @@
3672
3672
  }
3673
3673
  }
3674
3674
 
3675
- /* 右上角动画 */
3675
+ /* 右上角动画 - 从浏览器右上角滑入 */
3676
3676
  .zjpcy-modal-container--top-right {
3677
- animation: topRightAnimateIn 0.5s cubic-bezier(0.23, 1, 0.32, 1) forwards;
3677
+ animation: topRightAnimateIn 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
3678
3678
  }
3679
3679
 
3680
3680
  @keyframes topRightAnimateIn {
3681
3681
  from {
3682
- transform: translate(calc(50vw + 50%), calc(-50vh - 50%)) scale(0.5);
3682
+ transform: translate(var(--zjpcy-modal-offset-x, 50vw), var(--zjpcy-modal-offset-y, -50vh)) scale(0.5);
3683
3683
  opacity: 0;
3684
3684
  }
3685
3685
  to {
@@ -3688,14 +3688,14 @@
3688
3688
  }
3689
3689
  }
3690
3690
 
3691
- /* 右下角动画 */
3691
+ /* 右下角动画 - 从浏览器右下角滑入 */
3692
3692
  .zjpcy-modal-container--bottom-right {
3693
- animation: bottomRightAnimateIn 0.5s cubic-bezier(0.23, 1, 0.32, 1) forwards;
3693
+ animation: bottomRightAnimateIn 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
3694
3694
  }
3695
3695
 
3696
3696
  @keyframes bottomRightAnimateIn {
3697
3697
  from {
3698
- transform: translate(calc(50vw + 50%), calc(50vh + 50%)) scale(0.5);
3698
+ transform: translate(var(--zjpcy-modal-offset-x, 50vw), var(--zjpcy-modal-offset-y, 50vh)) scale(0.5);
3699
3699
  opacity: 0;
3700
3700
  }
3701
3701
  to {
@@ -3704,14 +3704,14 @@
3704
3704
  }
3705
3705
  }
3706
3706
 
3707
- /* 左下角动画 */
3707
+ /* 左下角动画 - 从浏览器左下角滑入 */
3708
3708
  .zjpcy-modal-container--bottom-left {
3709
- animation: bottomLeftAnimateIn 0.5s cubic-bezier(0.23, 1, 0.32, 1) forwards;
3709
+ animation: bottomLeftAnimateIn 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
3710
3710
  }
3711
3711
 
3712
3712
  @keyframes bottomLeftAnimateIn {
3713
3713
  from {
3714
- transform: translate(calc(-50vw - 50%), calc(50vh + 50%)) scale(0.5);
3714
+ transform: translate(var(--zjpcy-modal-offset-x, -50vw), var(--zjpcy-modal-offset-y, 50vh)) scale(0.5);
3715
3715
  opacity: 0;
3716
3716
  }
3717
3717
  to {
@@ -3726,12 +3726,12 @@
3726
3726
 
3727
3727
  /* 中心消失 */
3728
3728
  .zjpcy-modal-container--closing-center {
3729
- animation: centerAnimateOut 0.4s cubic-bezier(0.23, 1, 0.32, 1) forwards;
3729
+ animation: centerAnimateOut 0.3s cubic-bezier(0.55, 0.085, 0.68, 0.53) forwards;
3730
3730
  }
3731
3731
 
3732
- /* 中心消失(设置了top */
3733
- .zjpcy-modal-container--closing-center-top {
3734
- animation: centerTopAnimateOut 0.4s cubic-bezier(0.23, 1, 0.32, 1) forwards;
3732
+ /* top 位置回到浏览器顶部的消失动画 */
3733
+ .zjpcy-modal-container--closing-from-top {
3734
+ animation: fromTopAnimateOut 0.3s cubic-bezier(0.55, 0.085, 0.68, 0.53) forwards;
3735
3735
  }
3736
3736
 
3737
3737
  @keyframes centerAnimateOut {
@@ -3740,25 +3740,25 @@
3740
3740
  opacity: 1;
3741
3741
  }
3742
3742
  to {
3743
- transform: scale(0.9);
3743
+ transform: scale(0.85);
3744
3744
  opacity: 0;
3745
3745
  }
3746
3746
  }
3747
3747
 
3748
- @keyframes centerTopAnimateOut {
3748
+ @keyframes fromTopAnimateOut {
3749
3749
  from {
3750
- transform: translate(0, 0) scale(1);
3750
+ transform: translateY(0) scale(1);
3751
3751
  opacity: 1;
3752
3752
  }
3753
3753
  to {
3754
- transform: translate(var(--zjpcy-modal-origin-x, 0), var(--zjpcy-modal-origin-y, 0)) scale(0.85);
3754
+ transform: translateY(-100vh) scale(0.7);
3755
3755
  opacity: 0;
3756
3756
  }
3757
3757
  }
3758
3758
 
3759
- /* 正常消失(回到点击位置缓慢消失) */
3759
+ /* 正常消失(回到触发器位置缓慢消失) */
3760
3760
  .zjpcy-modal-container--closing-normal {
3761
- animation: normalAnimateOut 0.5s cubic-bezier(0.23, 1, 0.32, 1) forwards;
3761
+ animation: normalAnimateOut 0.3s cubic-bezier(0.55, 0.085, 0.68, 0.53) forwards;
3762
3762
  }
3763
3763
 
3764
3764
  @keyframes normalAnimateOut {
@@ -3767,67 +3767,55 @@
3767
3767
  opacity: 1;
3768
3768
  }
3769
3769
  to {
3770
- transform: translate(var(--zjpcy-modal-origin-x, 0), var(--zjpcy-modal-origin-y, 0)) scale(0.9);
3770
+ transform: translate(var(--zjpcy-modal-origin-x, 0), var(--zjpcy-modal-origin-y, 0)) scale(0.5);
3771
3771
  opacity: 0;
3772
3772
  }
3773
3773
  }
3774
3774
 
3775
- /* 右上角消失 */
3775
+ /* 右上角消失 - 回到浏览器右上角 */
3776
3776
  .zjpcy-modal-container--closing-top-right {
3777
- animation: topRightAnimateOut 0.4s cubic-bezier(0.23, 1, 0.32, 1) forwards;
3777
+ animation: topRightAnimateOut 0.3s cubic-bezier(0.55, 0.085, 0.68, 0.53) forwards;
3778
3778
  }
3779
3779
 
3780
3780
  @keyframes topRightAnimateOut {
3781
- 0% {
3781
+ from {
3782
3782
  transform: translate(0, 0) scale(1);
3783
3783
  opacity: 1;
3784
3784
  }
3785
- 50% {
3786
- transform: translate(25vw, -25vh) scale(0.85);
3787
- opacity: 0.6;
3788
- }
3789
- 100% {
3790
- transform: translate(calc(50vw + 50%), calc(-50vh - 50%)) scale(0.5);
3785
+ to {
3786
+ transform: translate(var(--zjpcy-modal-offset-x, 50vw), var(--zjpcy-modal-offset-y, -50vh)) scale(0.5);
3791
3787
  opacity: 0;
3792
3788
  }
3793
3789
  }
3794
3790
 
3795
- /* 右下角消失 */
3791
+ /* 右下角消失 - 回到浏览器右下角 */
3796
3792
  .zjpcy-modal-container--closing-bottom-right {
3797
- animation: bottomRightAnimateOut 0.4s cubic-bezier(0.23, 1, 0.32, 1) forwards;
3793
+ animation: bottomRightAnimateOut 0.3s cubic-bezier(0.55, 0.085, 0.68, 0.53) forwards;
3798
3794
  }
3799
3795
 
3800
3796
  @keyframes bottomRightAnimateOut {
3801
- 0% {
3797
+ from {
3802
3798
  transform: translate(0, 0) scale(1);
3803
3799
  opacity: 1;
3804
3800
  }
3805
- 50% {
3806
- transform: translate(25vw, 25vh) scale(0.85);
3807
- opacity: 0.6;
3808
- }
3809
- 100% {
3810
- transform: translate(calc(50vw + 50%), calc(50vh + 50%)) scale(0.5);
3801
+ to {
3802
+ transform: translate(var(--zjpcy-modal-offset-x, 50vw), var(--zjpcy-modal-offset-y, 50vh)) scale(0.5);
3811
3803
  opacity: 0;
3812
3804
  }
3813
3805
  }
3814
3806
 
3815
- /* 左下角消失 */
3807
+ /* 左下角消失 - 回到浏览器左下角 */
3816
3808
  .zjpcy-modal-container--closing-bottom-left {
3817
- animation: bottomLeftAnimateOut 0.4s cubic-bezier(0.23, 1, 0.32, 1) forwards;
3809
+ animation: bottomLeftAnimateOut 0.3s cubic-bezier(0.55, 0.085, 0.68, 0.53) forwards;
3818
3810
  }
3819
3811
 
3820
3812
  @keyframes bottomLeftAnimateOut {
3821
- 0% {
3813
+ from {
3822
3814
  transform: translate(0, 0) scale(1);
3823
3815
  opacity: 1;
3824
3816
  }
3825
- 50% {
3826
- transform: translate(-25vw, 25vh) scale(0.85);
3827
- opacity: 0.6;
3828
- }
3829
- 100% {
3830
- transform: translate(calc(-50vw - 50%), calc(50vh + 50%)) scale(0.5);
3817
+ to {
3818
+ transform: translate(var(--zjpcy-modal-offset-x, -50vw), var(--zjpcy-modal-offset-y, 50vh)) scale(0.5);
3831
3819
  opacity: 0;
3832
3820
  }
3833
3821
  }
@@ -9812,6 +9800,43 @@ html {
9812
9800
  IDP Layout Component - Modern Design System
9813
9801
  ============================================ */
9814
9802
 
9803
+ /* ============================================
9804
+ ANTI-FOUC: 防止 SSR 闪烁的关键样式
9805
+ 这些样式在 CSS 文件最前面,确保最先加载
9806
+ ============================================ */
9807
+
9808
+ /**
9809
+ * FOUC 问题背景:
9810
+ * 在 Next.js SSR 环境下,styled-components 的样式在客户端水合后才注入,
9811
+ * 导致组件在 SSR 期间显示浏览器默认样式或黑色背景。
9812
+ *
9813
+ * 解决方案:
9814
+ * 使用 CSS 变量作为默认值,styled-components 可以通过内联样式覆盖
9815
+ */
9816
+
9817
+ /* 核心防护:确保所有 Layout 元素默认使用亮色背景 */
9818
+ /* 注意:不使用 !important,以便 styled-components 可以覆盖 */
9819
+ .layout-wrapper,
9820
+ .layout-header,
9821
+ .layout-sider,
9822
+ .layout-content,
9823
+ .layout-footer {
9824
+ /* 默认亮色背景,防止黑色闪烁 */
9825
+ background-color: var(--layout-default-bg, #ffffff);
9826
+ color: var(--layout-default-color, rgba(0, 0, 0, 0.85));
9827
+ }
9828
+
9829
+ /* SSR 安全:确保 HTML 和 body 有默认亮色背景 */
9830
+ html, body {
9831
+ background-color: #ffffff;
9832
+ margin: 0;
9833
+ padding: 0;
9834
+ }
9835
+
9836
+ /* ============================================
9837
+ CSS 变量定义
9838
+ ============================================ */
9839
+
9815
9840
  :root {
9816
9841
  /* ============================================
9817
9842
  Layout 基础配置
@@ -10281,8 +10306,8 @@ body {
10281
10306
  align-items: center;
10282
10307
  justify-content: center;
10283
10308
  z-index: 10;
10284
- backdrop-filter: blur(4px);
10285
- -webkit-backdrop-filter: blur(4px);
10309
+ backdrop-filter: blur(2px);
10310
+ -webkit-backdrop-filter: blur(2px);
10286
10311
  }
10287
10312
 
10288
10313
  .zjpcy-drawer-loading-content {
@@ -14636,7 +14661,7 @@ body {
14636
14661
  right: 0;
14637
14662
  bottom: 0;
14638
14663
  background-color: rgba(0, 0, 0, 0.45);
14639
- backdrop-filter: blur(4px);
14664
+ backdrop-filter: blur(2px);
14640
14665
  display: flex;
14641
14666
  align-items: center;
14642
14667
  justify-content: center;