@24city/web-console 0.3.5 → 0.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.6
4
+
5
+ - 内容广场的排序条在手机(≤576px)上分两行:左侧(排序、胶囊、下拉)占满第一行,右侧(收藏、视图切换)另起一行靠右。
6
+ 原来两侧挤在一行,右侧不收缩、左侧可以压到几乎没有宽度:排序项缩到右侧控件底下,既看不到也点不到,这一行也滑不动
7
+ (AdFlow 走查:抖音素材只露出“推荐”,小红书的“发布时间”被“卡片”盖住、排序挤出屏幕)。
8
+ - 第一行里每一项按自身宽度排,不再被压缩;放不下时这一行横向滑动,右边缘渐隐提示后面还有内容,滑到头渐隐消失
9
+ (滚动时间线,不支持的浏览器没有渐隐,照常可以滑动)。页面没给右侧内容时不占第二行。桌面宽度不变。
10
+
3
11
  ## 0.3.5
4
12
 
5
13
  **新增:重点功能的一套视觉**(来自 AdFlow 的一键跟创弹框,`@24city/web-console/page`)
package/GUIDELINES.md CHANGED
@@ -133,7 +133,8 @@
133
133
  | `min-width: 1440px` | 大屏:顶栏接产品名 |
134
134
 
135
135
  - 每个页面在 1440px 和 390px 两个宽度下都要能用,390px 不出现横向滚动条。
136
- - 手机上单列优先;并排的操作可以纵向堆叠;筛选行不折行、横向滑动(FilterPanel、ChoiceCards、SortBar 已经这样做)。
136
+ - 手机上单列优先;并排的操作可以纵向堆叠;筛选行不折行、横向滑动(FilterPanel、ChoiceCards、SortBar 已经这样做;
137
+ 内容广场的排序条分两行,左侧一行横向滑动、右边缘渐隐提示,右侧另起一行)。
137
138
  - 列多的表格用 `TableScroll` 给最小宽度、左右滑动;手机上是主要入口的列表改成逐项卡片。
138
139
  - 可悬停才出现的操作,在触屏上要常驻(`@media (hover: none)`)。
139
140
 
@@ -33,7 +33,7 @@ const le = "_group_1f0zj_3", re = "_loading_1f0zj_4", ne = "_skeleton_1f0zj_11",
33
33
  ] }) }, r.value || "all");
34
34
  })
35
35
  }
36
- ) }), ja = ({ count: e, columns: t = 4 }) => /* @__PURE__ */ a("div", { className: C.loading, style: H(t), "aria-busy": "true", children: Array.from({ length: e }, (s, n) => /* @__PURE__ */ a(z, { loading: !0, active: !0, className: C.skeleton, placeholder: /* @__PURE__ */ a(z.Paragraph, { rows: 2 }) }, n)) }), _e = "_square_no027_7", ue = "_heroTitle_no027_18", me = "_heroAccent_no027_30", he = "_searchBar_no027_35", pe = "_searchBox_no027_49", ge = "_searchInput_no027_55", fe = "_searchPrefix_no027_91", ve = "_searchButton_no027_100", be = "_guide_no027_108", Ne = "_guideLabel_no027_116", ye = "_guideTag_no027_122", we = "_guideClear_no027_142", xe = "_categories_no027_147", Ce = "_panel_no027_152", Te = "_filters_no027_157", ke = "_toolbarStart_no027_172", Le = "_filtersGroup_no027_179", Be = "_results_no027_187", Se = "_footer_no027_196", p = {
36
+ ) }), ja = ({ count: e, columns: t = 4 }) => /* @__PURE__ */ a("div", { className: C.loading, style: H(t), "aria-busy": "true", children: Array.from({ length: e }, (s, n) => /* @__PURE__ */ a(z, { loading: !0, active: !0, className: C.skeleton, placeholder: /* @__PURE__ */ a(z.Paragraph, { rows: 2 }) }, n)) }), _e = "_square_13gth_7", ue = "_heroTitle_13gth_18", me = "_heroAccent_13gth_30", he = "_searchBar_13gth_35", pe = "_searchBox_13gth_49", ge = "_searchInput_13gth_55", fe = "_searchPrefix_13gth_91", ve = "_searchButton_13gth_100", be = "_guide_13gth_108", Ne = "_guideLabel_13gth_116", ye = "_guideTag_13gth_122", we = "_guideClear_13gth_142", xe = "_categories_13gth_147", Ce = "_panel_13gth_152", Te = "_filters_13gth_157", ke = "_toolbarStart_13gth_172", Le = "_filtersGroup_13gth_179", Be = "_results_13gth_187", Se = "_footer_13gth_196", p = {
37
37
  square: _e,
38
38
  heroTitle: ue,
39
39
  heroAccent: me,
package/dist/index.js CHANGED
@@ -7,7 +7,7 @@ import { S as Ja } from "./chunks/status-text-CKFIzlND.js";
7
7
  import { F as ae, a as ee, b as se, c as oe, d as re } from "./chunks/form-layout-BDOTSKaB.js";
8
8
  import { ConsoleSemiProvider as ne, MODAL_BUTTON_PROPS as ie, modalButtonProps as ue } from "./semi.js";
9
9
  import { B as ce, C as pe, f as Se, a as de, i as me } from "./chunks/console-layout-Os4sQzMP.js";
10
- import { C as fe, a as Pe, b as ge, F as Ae, c as Le, d as Fe, e as Ee, f as Te, g as Re, h as he, i as xe, j as Be, k as be, L as ye, M as Ne, S as Oe, l as Me, m as _e, n as Ie, o as ke, T as Ue, W as De, p as ve, w as we } from "./chunks/waterfall-Cmz0ZULQ.js";
10
+ import { C as fe, a as Pe, b as ge, F as Ae, c as Le, d as Fe, e as Ee, f as Te, g as Re, h as he, i as xe, j as Be, k as be, L as ye, M as Ne, S as Oe, l as Me, m as _e, n as Ie, o as ke, T as Ue, W as De, p as ve, w as we } from "./chunks/waterfall-ZMzEjGwK.js";
11
11
  import { C as We } from "./chunks/color-mode-switch-BinpVuZ0.js";
12
12
  import { E as Qe, R as Ge, U as He } from "./chunks/unsupported-browser-Dwq1mNRy.js";
13
13
  import { F as Ve, a as Ye, b as je, N as Xe, S as Ze, c as Je, T as $e, f as as } from "./chunks/text-link-Bb5f1eLW.js";
@@ -26,7 +26,10 @@ interface ContentSquareProps {
26
26
  categories?: ReactNode;
27
27
  /** 平铺的筛选面板(FilterPanel),在分类卡片下方,随页面滚走;没有页内条件时不传。 */
28
28
  filters?: ReactNode;
29
- /** 吸顶排序条:左侧文字排序,右侧收藏、最近查看、看法切换等。 */
29
+ /**
30
+ * 吸顶排序条:左侧文字排序,右侧收藏、最近查看、看法切换等。手机上分两行:左侧占满第一行,
31
+ * 放不下时这一行横向滑动(右边缘渐隐提示);右侧另起一行靠右。
32
+ */
30
33
  toolbarLeft: ReactNode;
31
34
  toolbarRight: ReactNode;
32
35
  /** 查询条件的标识:变化时若结果区已滚过排序条,滚回结果顶部(紧贴吸顶排序条)。 */
@@ -1,4 +1,4 @@
1
- import { C as s, a as t, b as r, F as l, c as o, d as i, e as n, f as F, g as S, h as c, i as u, j as C, k as T, L as d, M as p, S as L, l as b, m as f, n as g, o as h, T as q, W as w, p as A, w as m } from "../chunks/waterfall-Cmz0ZULQ.js";
1
+ import { C as s, a as t, b as r, F as l, c as o, d as i, e as n, f as F, g as S, h as c, i as u, j as C, k as T, L as d, M as p, S as L, l as b, m as f, n as g, o as h, T as q, W as w, p as A, w as m } from "../chunks/waterfall-ZMzEjGwK.js";
2
2
  export {
3
3
  s as ChoiceCards,
4
4
  t as ChoiceCardsSkeleton,
package/dist/styles.css CHANGED
@@ -3551,7 +3551,7 @@
3551
3551
  * --hero-progress(0 → 1)由组件脚本按滚动位置写入。颜色只引用 Semi 设计变量。
3552
3552
  */
3553
3553
 
3554
- ._square_no027_7 {
3554
+ ._square_13gth_7 {
3555
3555
  --hero-progress: 0;
3556
3556
  --square-search-height: 60px;
3557
3557
  --square-search-padding: 20px;
@@ -3562,7 +3562,7 @@
3562
3562
  flex-direction: column;
3563
3563
  }
3564
3564
 
3565
- ._heroTitle_no027_18.semi-typography {
3565
+ ._heroTitle_13gth_18.semi-typography {
3566
3566
  margin: 56px 0 4px;
3567
3567
  color: var(--semi-color-text-0);
3568
3568
  font-size: var(--app-font-size-h1);
@@ -3574,12 +3574,12 @@
3574
3574
  transform-origin: center bottom;
3575
3575
  }
3576
3576
 
3577
- ._heroAccent_no027_30 {
3577
+ ._heroAccent_13gth_30 {
3578
3578
  color: rgb(var(--app-brand-6));
3579
3579
  }
3580
3580
 
3581
3581
  /* 搜索条吸在顶栏下方,自带页面底色,遮住滚上来的内容。 */
3582
- ._searchBar_no027_35 {
3582
+ ._searchBar_13gth_35 {
3583
3583
  position: sticky;
3584
3584
  z-index: var(--app-z-sticky);
3585
3585
  top: var(--app-header-height);
@@ -3589,17 +3589,17 @@
3589
3589
  }
3590
3590
 
3591
3591
  /* 没有分类卡片时,搜索条与筛选条之间不必留出分类的位置。 */
3592
- ._square_no027_7[data-categories='false'] ._searchBar_no027_35 {
3592
+ ._square_13gth_7[data-categories='false'] ._searchBar_13gth_35 {
3593
3593
  margin-bottom: 4px;
3594
3594
  }
3595
3595
 
3596
- ._searchBox_no027_49 {
3596
+ ._searchBox_13gth_49 {
3597
3597
  width: calc(800px + (100% - 800px) * var(--hero-progress));
3598
3598
  max-width: 100%;
3599
3599
  margin: 0 auto;
3600
3600
  }
3601
3601
 
3602
- ._searchInput_no027_55.semi-input-wrapper {
3602
+ ._searchInput_13gth_55.semi-input-wrapper {
3603
3603
  height: var(--square-search-height);
3604
3604
  padding: 0 14px 0 16px;
3605
3605
  border: 1px solid transparent;
@@ -3608,34 +3608,34 @@
3608
3608
  box-shadow: var(--app-shadow-card);
3609
3609
  }
3610
3610
 
3611
- ._searchInput_no027_55.semi-input-wrapper:hover {
3611
+ ._searchInput_13gth_55.semi-input-wrapper:hover {
3612
3612
  border-color: transparent;
3613
3613
  background-color: var(--semi-color-bg-1);
3614
3614
  }
3615
3615
 
3616
- ._searchInput_no027_55.semi-input-wrapper.semi-input-wrapper-focus {
3616
+ ._searchInput_13gth_55.semi-input-wrapper.semi-input-wrapper-focus {
3617
3617
  border-color: rgb(var(--app-brand-6));
3618
3618
  box-shadow: var(--app-shadow-card), 0 0 0 3px var(--semi-color-primary-light-default);
3619
3619
  }
3620
3620
 
3621
- ._searchInput_no027_55 .semi-input {
3621
+ ._searchInput_13gth_55 .semi-input {
3622
3622
  font-size: var(--app-font-size-h6);
3623
3623
  }
3624
3624
 
3625
- ._searchInput_no027_55 .semi-input::placeholder {
3625
+ ._searchInput_13gth_55 .semi-input::placeholder {
3626
3626
  color: var(--semi-color-text-2);
3627
3627
  }
3628
3628
 
3629
- ._searchInput_no027_55 .semi-input-suffix {
3629
+ ._searchInput_13gth_55 .semi-input-suffix {
3630
3630
  gap: 8px;
3631
3631
  }
3632
3632
 
3633
3633
  /* 框内最左侧的匹配方式:文字触发器,右侧一条竖线隔开输入区。 */
3634
- ._searchInput_no027_55 .semi-input-prefix {
3634
+ ._searchInput_13gth_55 .semi-input-prefix {
3635
3635
  padding-right: 0;
3636
3636
  }
3637
3637
 
3638
- ._searchPrefix_no027_91 {
3638
+ ._searchPrefix_13gth_91 {
3639
3639
  display: inline-flex;
3640
3640
  align-items: center;
3641
3641
  margin-left: -8px;
@@ -3644,7 +3644,7 @@
3644
3644
  border-right: 1px solid var(--app-border-2);
3645
3645
  }
3646
3646
 
3647
- ._searchButton_no027_100.semi-button {
3647
+ ._searchButton_13gth_100.semi-button {
3648
3648
  width: 32px;
3649
3649
  height: 32px;
3650
3650
  border-radius: var(--app-radius-chip);
@@ -3652,7 +3652,7 @@
3652
3652
  }
3653
3653
 
3654
3654
  /* 快捷词:灰底胶囊,空输入时排在检索按钮前。 */
3655
- ._guide_no027_108 {
3655
+ ._guide_13gth_108 {
3656
3656
  display: inline-flex;
3657
3657
  overflow: hidden;
3658
3658
  max-width: 420px;
@@ -3660,13 +3660,13 @@
3660
3660
  gap: 8px;
3661
3661
  }
3662
3662
 
3663
- ._guideLabel_no027_116.semi-typography {
3663
+ ._guideLabel_13gth_116.semi-typography {
3664
3664
  flex-shrink: 0;
3665
3665
  color: var(--semi-color-text-2);
3666
3666
  font-size: var(--app-font-size-compact);
3667
3667
  }
3668
3668
 
3669
- ._guideTag_no027_122.semi-button {
3669
+ ._guideTag_13gth_122.semi-button {
3670
3670
  overflow: hidden;
3671
3671
  max-width: 96px;
3672
3672
  height: 24px;
@@ -3681,27 +3681,27 @@
3681
3681
  text-overflow: ellipsis;
3682
3682
  }
3683
3683
 
3684
- ._guideTag_no027_122.semi-button:hover {
3684
+ ._guideTag_13gth_122.semi-button:hover {
3685
3685
  background-color: var(--semi-color-fill-2);
3686
3686
  color: var(--semi-color-text-0);
3687
3687
  }
3688
3688
 
3689
- ._guideClear_no027_142.semi-button {
3689
+ ._guideClear_13gth_142.semi-button {
3690
3690
  flex-shrink: 0;
3691
3691
  color: var(--semi-color-text-2);
3692
3692
  }
3693
3693
 
3694
- ._categories_no027_147 {
3694
+ ._categories_13gth_147 {
3695
3695
  margin-bottom: 0;
3696
3696
  }
3697
3697
 
3698
3698
  /* 平铺筛选面板:分类卡片下方,随页面滚走。 */
3699
- ._panel_no027_152 {
3699
+ ._panel_13gth_152 {
3700
3700
  margin-top: 16px;
3701
3701
  }
3702
3702
 
3703
3703
  /* 排序条紧贴吸顶搜索条下沿,同样带页面底色。 */
3704
- ._filters_no027_157 {
3704
+ ._filters_13gth_157 {
3705
3705
  position: sticky;
3706
3706
  z-index: calc(var(--app-z-sticky) - 1);
3707
3707
  top: calc(var(--app-header-height) + var(--square-search-height) + var(--square-search-padding) * 2);
@@ -3716,14 +3716,14 @@
3716
3716
  background: var(--app-page-gradient) fixed;
3717
3717
  }
3718
3718
 
3719
- ._toolbarStart_no027_172 {
3719
+ ._toolbarStart_13gth_172 {
3720
3720
  display: flex;
3721
3721
  min-width: 0;
3722
3722
  flex: 1 1 auto;
3723
3723
  align-items: center;
3724
3724
  }
3725
3725
 
3726
- ._filtersGroup_no027_179 {
3726
+ ._filtersGroup_13gth_179 {
3727
3727
  display: flex;
3728
3728
  min-width: 0;
3729
3729
  flex-shrink: 0;
@@ -3731,7 +3731,7 @@
3731
3731
  gap: 4px;
3732
3732
  }
3733
3733
 
3734
- ._results_no027_187 {
3734
+ ._results_13gth_187 {
3735
3735
  position: relative;
3736
3736
  z-index: 0;
3737
3737
  display: flex;
@@ -3740,7 +3740,7 @@
3740
3740
  gap: 12px;
3741
3741
  }
3742
3742
 
3743
- ._footer_no027_196 {
3743
+ ._footer_13gth_196 {
3744
3744
  display: flex;
3745
3745
  min-height: 32px;
3746
3746
  align-items: center;
@@ -3749,44 +3749,108 @@
3749
3749
  padding: 12px 0 8px;
3750
3750
  }
3751
3751
 
3752
- /* 手机:标题缩小,搜索条与筛选条压低高度;筛选条横向滑动,快捷词收起。 */
3752
+ /*
3753
+ * 排序条左侧在手机上横向滑动时,右边缘渐隐提示后面还有内容;滑到头渐隐消失。进度来自这一行自己的横向滚动(滚动时间线),
3754
+ * 内容放得下时时间线不生效,不渐隐。不支持滚动时间线的浏览器没有渐隐,照常可以滑动。
3755
+ */
3756
+ @property --square-toolbar-fade {
3757
+ syntax: '<length>';
3758
+ inherits: false;
3759
+ initial-value: 0px;
3760
+ }
3761
+
3762
+ @keyframes _square-toolbar-fade_13gth_1 {
3763
+ 0%,
3764
+ 90% {
3765
+ --square-toolbar-fade: 32px;
3766
+ }
3767
+
3768
+ 100% {
3769
+ --square-toolbar-fade: 0px;
3770
+ }
3771
+ }
3772
+
3773
+ /* 手机:标题缩小,搜索条压低高度,快捷词收起;排序条分两行,左侧一行横向滑动。 */
3753
3774
  @media (max-width: 576px) {
3754
- ._square_no027_7 {
3775
+ ._square_13gth_7 {
3755
3776
  --square-search-height: 48px;
3756
3777
  --square-search-padding: 12px;
3757
3778
  --square-filters-height: 44px;
3758
3779
  }
3759
3780
 
3760
- ._heroTitle_no027_18.semi-typography {
3781
+ ._heroTitle_13gth_18.semi-typography {
3761
3782
  margin: 12px 0 0;
3762
3783
  font-size: var(--app-font-size-h3);
3763
3784
  line-height: 32px;
3764
3785
  }
3765
3786
 
3766
- ._searchBar_no027_35 {
3787
+ ._searchBar_13gth_35 {
3767
3788
  margin-bottom: 4px;
3768
3789
  }
3769
3790
 
3770
- ._searchInput_no027_55.semi-input-wrapper {
3791
+ ._searchInput_13gth_55.semi-input-wrapper {
3771
3792
  padding: 0 8px 0 12px;
3772
3793
  }
3773
3794
 
3774
- ._searchInput_no027_55 .semi-input {
3795
+ ._searchInput_13gth_55 .semi-input {
3775
3796
  font-size: var(--app-font-size-lead);
3776
3797
  }
3777
3798
 
3778
- ._guide_no027_108 {
3799
+ ._guide_13gth_108 {
3779
3800
  display: none;
3780
3801
  }
3781
3802
 
3782
- ._panel_no027_152 {
3803
+ ._panel_13gth_152 {
3783
3804
  margin-top: 12px;
3784
3805
  }
3785
3806
 
3786
- ._filters_no027_157 {
3787
- padding: 0 4px;
3807
+ /*
3808
+ * 排序条分两行:左侧(排序、胶囊、下拉)占满第一行,右侧(收藏、视图切换)另起一行靠右。
3809
+ * 两侧挤在一行时左侧会被压到几乎没有宽度,排序项缩到右侧控件底下,既看不到也点不到。
3810
+ */
3811
+ ._filters_13gth_157 {
3812
+ height: auto;
3813
+ min-height: var(--square-filters-height);
3814
+ flex-wrap: wrap;
3815
+ gap: 4px 12px;
3816
+ padding: 4px;
3817
+ }
3818
+
3819
+ /* 左侧每一项按自身宽度排(网格列宽取内容宽,不受各项 min-width: 0 影响),放不下时这一行横向滑动。 */
3820
+ ._toolbarStart_13gth_172 {
3821
+ display: grid;
3822
+ flex: 1 0 100%;
3823
+ grid-auto-columns: max-content;
3824
+ grid-auto-flow: column;
3788
3825
  overflow-x: auto;
3789
3826
  scrollbar-width: none;
3827
+ -webkit-mask-image: linear-gradient(to left, transparent, black var(--square-toolbar-fade));
3828
+ mask-image: linear-gradient(to left, transparent, black var(--square-toolbar-fade));
3829
+ }
3830
+
3831
+ ._toolbarStart_13gth_172::-webkit-scrollbar {
3832
+ display: none;
3833
+ }
3834
+
3835
+ @supports (animation-timeline: scroll()) {
3836
+ ._toolbarStart_13gth_172 {
3837
+ animation: _square-toolbar-fade_13gth_1 linear both;
3838
+ animation-timeline: scroll(self inline);
3839
+ }
3840
+ }
3841
+
3842
+ /* 右侧放不下一行时在组内换行,仍靠右;页面没给右侧内容时不占第二行。 */
3843
+ ._filtersGroup_13gth_179 {
3844
+ max-width: 100%;
3845
+ flex: 0 1 auto;
3846
+ flex-wrap: wrap;
3847
+ justify-content: flex-end;
3848
+ margin-left: auto;
3849
+ row-gap: 4px;
3850
+ }
3851
+
3852
+ ._filtersGroup_13gth_179:empty {
3853
+ display: none;
3790
3854
  }
3791
3855
  }
3792
3856
  /* 筛选条触发器:32px 高的文字按钮,灰字 + 16px 箭头;悬停与展开时浅灰底。颜色只引用 Semi 设计变量。 */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@24city/web-console",
3
- "version": "0.3.5",
3
+ "version": "0.3.6",
4
4
  "description": "24.city 产品用户端的界面底座:Semi Design 主题与设计变量、控制台外壳、账号与会员界面、列表与数据组件、界面规范与守卫",
5
5
  "license": "MIT",
6
6
  "type": "module",