react-public-components 1.2.4 → 1.2.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.
Files changed (53) hide show
  1. package/README.md +5 -2
  2. package/dist/AnnouncementBar/index.cjs +3 -2
  3. package/dist/AnnouncementBar/index.css +102 -11
  4. package/dist/AnnouncementBar/index.css.map +1 -1
  5. package/dist/AnnouncementBar/index.d.ts +22 -3
  6. package/dist/AnnouncementBar/index.js +2 -1
  7. package/dist/CeilingBox/index.cjs +9 -0
  8. package/dist/CeilingBox/index.cjs.map +1 -0
  9. package/dist/CeilingBox/index.css +25 -0
  10. package/dist/CeilingBox/index.css.map +1 -0
  11. package/dist/CeilingBox/index.d.ts +28 -0
  12. package/dist/CeilingBox/index.js +3 -0
  13. package/dist/CeilingBox/index.js.map +1 -0
  14. package/dist/LazyLoadBox/index.cjs +18 -0
  15. package/dist/LazyLoadBox/index.cjs.map +1 -0
  16. package/dist/LazyLoadBox/index.css +57 -0
  17. package/dist/LazyLoadBox/index.css.map +1 -0
  18. package/dist/LazyLoadBox/index.d.ts +104 -0
  19. package/dist/LazyLoadBox/index.js +3 -0
  20. package/dist/LazyLoadBox/index.js.map +1 -0
  21. package/dist/PeriodSelect/index.cjs +22 -0
  22. package/dist/PeriodSelect/index.cjs.map +1 -0
  23. package/dist/PeriodSelect/index.css +88 -0
  24. package/dist/PeriodSelect/index.css.map +1 -0
  25. package/dist/PeriodSelect/index.d.ts +36 -0
  26. package/dist/PeriodSelect/index.js +3 -0
  27. package/dist/PeriodSelect/index.js.map +1 -0
  28. package/dist/chunk-5Q7THN6M.js +115 -0
  29. package/dist/chunk-5Q7THN6M.js.map +1 -0
  30. package/dist/chunk-O4EABET3.js +89 -0
  31. package/dist/chunk-O4EABET3.js.map +1 -0
  32. package/dist/chunk-QU33CY3M.cjs +83 -0
  33. package/dist/chunk-QU33CY3M.cjs.map +1 -0
  34. package/dist/chunk-RFTYEXKU.js +79 -0
  35. package/dist/chunk-RFTYEXKU.js.map +1 -0
  36. package/dist/chunk-UIU6VCEQ.cjs +117 -0
  37. package/dist/chunk-UIU6VCEQ.cjs.map +1 -0
  38. package/dist/chunk-V55FEQYU.cjs +196 -0
  39. package/dist/chunk-V55FEQYU.cjs.map +1 -0
  40. package/dist/chunk-VYPIRVL4.js +193 -0
  41. package/dist/chunk-VYPIRVL4.js.map +1 -0
  42. package/dist/chunk-ZXMFWVE4.cjs +91 -0
  43. package/dist/chunk-ZXMFWVE4.cjs.map +1 -0
  44. package/dist/index.cjs +91 -72
  45. package/dist/index.css +272 -11
  46. package/dist/index.css.map +1 -1
  47. package/dist/index.js +18 -15
  48. package/dist/src/index.d.ts +7 -1
  49. package/package.json +1 -1
  50. package/dist/chunk-5YQVSOHK.js +0 -44
  51. package/dist/chunk-5YQVSOHK.js.map +0 -1
  52. package/dist/chunk-B3HZIYQQ.cjs +0 -46
  53. package/dist/chunk-B3HZIYQQ.cjs.map +0 -1
package/README.md CHANGED
@@ -51,12 +51,14 @@ import 'react-public-components/styles.css';
51
51
 
52
52
  ---
53
53
 
54
- ### 2. 布局与导航 Layout & Nav (9 款)
54
+ ### 2. 布局与导航 Layout & Nav (10 款)
55
55
  | 组件名 | 中文名称 | 特性与场景说明 |
56
56
  | :--- | :--- | :--- |
57
+ | **`LazyLoadBox`** | 视口懒加载容器 | 视口距离感知与按需加载容器,彻底拦截非可视模块接口调用,支持预加载距离与防塌陷占位。 |
57
58
  | **`CascadeDrawer`** | 级联下钻抽屉 | 多层级无限下钻抽屉容器,带顶部面包屑返回导航与平滑推拉动效。 |
58
59
  | **`KanbanBoard`** | 任务看板 | 轻量任务看板与泳道管理,基于原生 HTML5 Drag & Drop 跨列平滑拖拽。 |
59
60
  | **`DragSortList`** | 拖拽排序列表 | 纯原生轻量拖拽重排序列表,支持平滑占位与阴影反馈。 |
61
+ | **`CeilingBox`** | 吸顶容器 | 智能吸顶/吸底容器组件,支持自动占位防页面塌陷、毛玻璃滤镜与 Render Props 状态感知。 |
60
62
  | **`Marquee`** | 无缝跑马灯 | 基于硬件加速的无缝平滑滚动 Logo 墙与广播通知条,支持悬停暂停与边缘渐变。 |
61
63
  | **`ScrollTracker`** | 滚动与吸顶 | 阅读进度条(ScrollTracker)与智能吸顶容器(StickyHeader,带毛玻璃与阴影)。 |
62
64
  | **`InfiniteScrollList`** | 无限滚动列表 | 触底自动触发异步加载的无限滚动列表容器,内置加载骨架与到底提示。 |
@@ -66,9 +68,10 @@ import 'react-public-components/styles.css';
66
68
 
67
69
  ---
68
70
 
69
- ### 3. 数据录入 Data Entry (15 款)
71
+ ### 3. 数据录入 Data Entry (16 款)
70
72
  | 组件名 | 中文名称 | 特性与场景说明 |
71
73
  | :--- | :--- | :--- |
74
+ | **`PeriodSelect`** | 周期/粒度切换器 | 紧凑型时间周期与维度单选切换器,精准还原高亮竖线分隔与多尺寸支持。 |
72
75
  | **`DualRangeSlider`** | 双滑块区间选择器 | 双向双滑块区间选择器,支持数值/价格跨度筛选与防交叉穿透。 |
73
76
  | **`FilterChips`** | 已选筛选胶囊栏 | 多维已选筛选项胶囊汇总栏,支持单项删除与一键清空全部。 |
74
77
  | **`FileDropZone`** | 拖拽上传容器 | 现代极客拖拽上传虚线容器,支持流光呼吸高亮与剪贴板截图粘贴。 |
@@ -1,9 +1,10 @@
1
1
  'use strict';
2
2
 
3
- var chunkB3HZIYQQ_cjs = require('../chunk-B3HZIYQQ.cjs');
3
+ var chunkZXMFWVE4_cjs = require('../chunk-ZXMFWVE4.cjs');
4
+ require('../chunk-R4V3EJVP.cjs');
4
5
 
5
6
 
6
7
 
7
- module.exports = chunkB3HZIYQQ_cjs.AnnouncementBar_default;
8
+ module.exports = chunkZXMFWVE4_cjs.AnnouncementBar_default;
8
9
  //# sourceMappingURL=index.cjs.map
9
10
  //# sourceMappingURL=index.cjs.map
@@ -1,37 +1,128 @@
1
1
  /* AnnouncementBar/index.less */
2
2
  .rpc_announcement_bar {
3
3
  width: 100%;
4
+ padding: 9px 40px 9px 16px;
5
+ display: flex;
6
+ align-items: center;
7
+ justify-content: center;
8
+ position: relative;
9
+ font-size: 13.5px;
10
+ font-weight: 500;
11
+ box-sizing: border-box;
12
+ user-select: none;
13
+ overflow: hidden;
14
+ max-height: 80px;
15
+ opacity: 1;
16
+ transition:
17
+ max-height 0.25s cubic-bezier(0.4, 0, 0.2, 1),
18
+ opacity 0.25s ease,
19
+ padding 0.25s ease;
20
+ }
21
+ .rpc_announcement_bar_sticky,
22
+ .rpc_announcement_bar_fixed {
23
+ box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
24
+ }
25
+ .rpc_announcement_bar_closing {
26
+ max-height: 0 !important;
27
+ opacity: 0 !important;
28
+ padding-top: 0 !important;
29
+ padding-bottom: 0 !important;
30
+ }
31
+ .rpc_announcement_bar_primary {
4
32
  background:
5
33
  linear-gradient(
6
34
  90deg,
7
35
  #1677ff 0%,
8
- #722ed1 100%);
36
+ #391085 100%);
37
+ color: #ffffff;
38
+ }
39
+ .rpc_announcement_bar_purple {
40
+ background:
41
+ linear-gradient(
42
+ 90deg,
43
+ #722ed1 0%,
44
+ #eb2f96 100%);
9
45
  color: #ffffff;
10
- padding: 8px 16px;
46
+ }
47
+ .rpc_announcement_bar_warning {
48
+ background:
49
+ linear-gradient(
50
+ 90deg,
51
+ #fa8c16 0%,
52
+ #f5222d 100%);
53
+ color: #ffffff;
54
+ }
55
+ .rpc_announcement_bar_success {
56
+ background:
57
+ linear-gradient(
58
+ 90deg,
59
+ #389e0d 0%,
60
+ #0958d9 100%);
61
+ color: #ffffff;
62
+ }
63
+ .rpc_announcement_bar_danger {
64
+ background:
65
+ linear-gradient(
66
+ 90deg,
67
+ #cf1322 0%,
68
+ #fa541c 100%);
69
+ color: #ffffff;
70
+ }
71
+ .rpc_announcement_bar_body {
11
72
  display: flex;
12
73
  align-items: center;
13
74
  justify-content: center;
14
- position: relative;
15
- font-size: 13px;
16
- font-weight: 500;
17
- box-sizing: border-box;
18
- user-select: none;
75
+ width: 100%;
76
+ overflow: hidden;
19
77
  }
20
78
  .rpc_announcement_bar_content {
21
79
  display: flex;
22
80
  align-items: center;
81
+ justify-content: center;
23
82
  gap: 8px;
83
+ line-height: 1.4;
84
+ text-align: center;
85
+ white-space: nowrap;
86
+ }
87
+ .rpc_announcement_bar_marquee {
88
+ animation: rpcAnnouncementMarquee 15s linear infinite;
89
+ will-change: transform;
90
+ }
91
+ .rpc_announcement_bar_marquee:hover {
92
+ animation-play-state: paused;
24
93
  }
25
94
  .rpc_announcement_bar_close {
26
95
  position: absolute;
27
- right: 16px;
28
- background: none;
96
+ right: 14px;
97
+ top: 50%;
98
+ transform: translateY(-50%);
99
+ display: inline-flex;
100
+ align-items: center;
101
+ justify-content: center;
102
+ width: 24px;
103
+ height: 24px;
104
+ background: transparent;
29
105
  border: none;
30
- color: rgba(255, 255, 255, 0.8);
106
+ border-radius: 4px;
107
+ color: rgba(255, 255, 255, 0.85);
31
108
  cursor: pointer;
32
- font-size: 14px;
109
+ transition: all 0.15s ease;
110
+ padding: 0;
111
+ outline: none;
33
112
  }
34
113
  .rpc_announcement_bar_close:hover {
35
114
  color: #ffffff;
115
+ background: rgba(255, 255, 255, 0.18);
116
+ }
117
+ .rpc_announcement_bar_close:active {
118
+ background: rgba(255, 255, 255, 0.28);
119
+ }
120
+ @keyframes rpcAnnouncementMarquee {
121
+ 0% {
122
+ transform: translateX(100%);
123
+ }
124
+ 100% {
125
+ transform: translateX(-100%);
126
+ }
36
127
  }
37
128
  /*# sourceMappingURL=index.css.map */
@@ -1 +1 @@
1
- {"version":3,"sources":["../../AnnouncementBar/index.less"],"sourcesContent":[".rpc_announcement_bar {\n width: 100%;\n background: linear-gradient(90deg, #1677ff 0%, #722ed1 100%);\n color: #ffffff;\n padding: 8px 16px;\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n font-size: 13px;\n font-weight: 500;\n box-sizing: border-box;\n user-select: none;\n}\n.rpc_announcement_bar_content {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n.rpc_announcement_bar_close {\n position: absolute;\n right: 16px;\n background: none;\n border: none;\n color: rgba(255, 255, 255, 0.8);\n cursor: pointer;\n font-size: 14px;\n}\n.rpc_announcement_bar_close:hover {\n color: #ffffff;\n}\n"],"mappings":";AAAA,CAAC;AACC,SAAO;AACP;AAAA,IAAY;AAAA,MAAgB,KAAhB;AAAA,MAAuB,QAAQ,EAA/B;AAAA,MAAmC,QAAQ;AACvD,SAAO;AACP,WAAS,IAAI;AACb,WAAS;AACT,eAAa;AACb,mBAAiB;AACjB,YAAU;AACV,aAAW;AACX,eAAa;AACb,cAAY;AACZ,eAAa;AACf;AACA,CAAC;AACC,WAAS;AACT,eAAa;AACb,OAAK;AACP;AACA,CAAC;AACC,YAAU;AACV,SAAO;AACP,cAAY;AACZ,UAAQ;AACR,SAAO,KAAK,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE;AAC3B,UAAQ;AACR,aAAW;AACb;AACA,CATC,0BAS0B;AACzB,SAAO;AACT;","names":[]}
1
+ {"version":3,"sources":["../../AnnouncementBar/index.less"],"sourcesContent":[".rpc_announcement_bar {\n width: 100%;\n padding: 9px 40px 9px 16px;\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n font-size: 13.5px;\n font-weight: 500;\n box-sizing: border-box;\n user-select: none;\n overflow: hidden;\n max-height: 80px;\n opacity: 1;\n transition: max-height 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease, padding 0.25s ease;\n}\n.rpc_announcement_bar_sticky,\n.rpc_announcement_bar_fixed {\n box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);\n}\n.rpc_announcement_bar_closing {\n max-height: 0 !important;\n opacity: 0 !important;\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n}\n.rpc_announcement_bar_primary {\n background: linear-gradient(90deg, #1677ff 0%, #391085 100%);\n color: #ffffff;\n}\n.rpc_announcement_bar_purple {\n background: linear-gradient(90deg, #722ed1 0%, #eb2f96 100%);\n color: #ffffff;\n}\n.rpc_announcement_bar_warning {\n background: linear-gradient(90deg, #fa8c16 0%, #f5222d 100%);\n color: #ffffff;\n}\n.rpc_announcement_bar_success {\n background: linear-gradient(90deg, #389e0d 0%, #0958d9 100%);\n color: #ffffff;\n}\n.rpc_announcement_bar_danger {\n background: linear-gradient(90deg, #cf1322 0%, #fa541c 100%);\n color: #ffffff;\n}\n.rpc_announcement_bar_body {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n overflow: hidden;\n}\n.rpc_announcement_bar_content {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n line-height: 1.4;\n text-align: center;\n white-space: nowrap;\n}\n.rpc_announcement_bar_marquee {\n animation: rpcAnnouncementMarquee 15s linear infinite;\n will-change: transform;\n}\n.rpc_announcement_bar_marquee:hover {\n animation-play-state: paused;\n}\n.rpc_announcement_bar_close {\n position: absolute;\n right: 14px;\n top: 50%;\n transform: translateY(-50%);\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 24px;\n height: 24px;\n background: transparent;\n border: none;\n border-radius: 4px;\n color: rgba(255, 255, 255, 0.85);\n cursor: pointer;\n transition: all 0.15s ease;\n padding: 0;\n outline: none;\n}\n.rpc_announcement_bar_close:hover {\n color: #ffffff;\n background: rgba(255, 255, 255, 0.18);\n}\n.rpc_announcement_bar_close:active {\n background: rgba(255, 255, 255, 0.28);\n}\n@keyframes rpcAnnouncementMarquee {\n 0% {\n transform: translateX(100%);\n }\n 100% {\n transform: translateX(-100%);\n }\n}\n"],"mappings":";AAAA,CAAC;AACC,SAAO;AACP,WAAS,IAAI,KAAK,IAAI;AACtB,WAAS;AACT,eAAa;AACb,mBAAiB;AACjB,YAAU;AACV,aAAW;AACX,eAAa;AACb,cAAY;AACZ,eAAa;AACb,YAAU;AACV,cAAY;AACZ,WAAS;AACT;AAAA,IAAY,WAAW,MAAM,aAAa,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,EAAE;AAAA,IAAE,QAAQ,MAAM,IAAI;AAAA,IAAE,QAAQ,MAAM;AAC/F;AACA,CAAC;AACD,CAAC;AACC,cAAY,EAAE,IAAI,KAAK,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE;AACvC;AACA,CAAC;AACC,cAAY;AACZ,WAAS;AACT,eAAa;AACb,kBAAgB;AAClB;AACA,CAAC;AACC;AAAA,IAAY;AAAA,MAAgB,KAAhB;AAAA,MAAuB,QAAQ,EAA/B;AAAA,MAAmC,QAAQ;AACvD,SAAO;AACT;AACA,CAAC;AACC;AAAA,IAAY;AAAA,MAAgB,KAAhB;AAAA,MAAuB,QAAQ,EAA/B;AAAA,MAAmC,QAAQ;AACvD,SAAO;AACT;AACA,CAAC;AACC;AAAA,IAAY;AAAA,MAAgB,KAAhB;AAAA,MAAuB,QAAQ,EAA/B;AAAA,MAAmC,QAAQ;AACvD,SAAO;AACT;AACA,CAAC;AACC;AAAA,IAAY;AAAA,MAAgB,KAAhB;AAAA,MAAuB,QAAQ,EAA/B;AAAA,MAAmC,QAAQ;AACvD,SAAO;AACT;AACA,CAAC;AACC;AAAA,IAAY;AAAA,MAAgB,KAAhB;AAAA,MAAuB,QAAQ,EAA/B;AAAA,MAAmC,QAAQ;AACvD,SAAO;AACT;AACA,CAAC;AACC,WAAS;AACT,eAAa;AACb,mBAAiB;AACjB,SAAO;AACP,YAAU;AACZ;AACA,CAAC;AACC,WAAS;AACT,eAAa;AACb,mBAAiB;AACjB,OAAK;AACL,eAAa;AACb,cAAY;AACZ,eAAa;AACf;AACA,CAAC;AACC,aAAW,uBAAuB,IAAI,OAAO;AAC7C,eAAa;AACf;AACA,CAJC,4BAI4B;AAC3B,wBAAsB;AACxB;AACA,CAAC;AACC,YAAU;AACV,SAAO;AACP,OAAK;AACL,aAAW,WAAW;AACtB,WAAS;AACT,eAAa;AACb,mBAAiB;AACjB,SAAO;AACP,UAAQ;AACR,cAAY;AACZ,UAAQ;AACR,iBAAe;AACf,SAAO,KAAK,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE;AAC3B,UAAQ;AACR,cAAY,IAAI,MAAM;AACtB,WAAS;AACT,WAAS;AACX;AACA,CAnBC,0BAmB0B;AACzB,SAAO;AACP,cAAY,KAAK,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE;AAClC;AACA,CAvBC,0BAuB0B;AACzB,cAAY,KAAK,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE;AAClC;AACA,WAhCa;AAiCX;AACE,eAAW,WAAW;AACxB;AACA;AACE,eAAW,WAAW;AACxB;AACF;","names":[]}
@@ -1,13 +1,32 @@
1
1
  import React, { ReactNode, CSSProperties } from 'react';
2
2
  import './index.less';
3
+ export type AnnouncementType = 'primary' | 'warning' | 'success' | 'danger' | 'purple';
3
4
  export interface AnnouncementBarProps {
4
5
  /** 横幅广播内容 */
5
6
  children: ReactNode;
7
+ /** 预设主题色系:'primary' | 'warning' | 'success' | 'danger' | 'purple' */
8
+ type?: AnnouncementType;
9
+ /** 自定义渐变或背景样式(传值时覆盖 type 预设) */
10
+ background?: string;
11
+ /** 自定义文字颜色 */
12
+ color?: string;
13
+ /** 是否开启智能吸顶 (position: sticky),默认为 false */
14
+ sticky?: boolean;
15
+ /** 是否开启固定吸顶 (position: fixed),默认为 false */
16
+ fixed?: boolean;
17
+ /** 吸顶时距离顶部的距离偏移(像素或 CSS 字符串),默认为 0 */
18
+ top?: number | string;
19
+ /** 图层层级 z-index,默认为 1000 */
20
+ zIndex?: number;
6
21
  /** 是否支持点击关闭,默认为 true */
7
22
  closable?: boolean;
8
- /** 自定义渐变或背景样式 */
9
- background?: string;
10
- /** 关闭回调 */
23
+ /** 自定义关闭图标 */
24
+ closeIcon?: ReactNode;
25
+ /** LocalStorage 记忆 Key(若传入则关闭后自动持久化记忆,不再重复弹出) */
26
+ storageKey?: string;
27
+ /** 内容过长时是否开启跑马灯无缝水平滚动,默认为 false */
28
+ marquee?: boolean;
29
+ /** 关闭时的回调函数 */
11
30
  onClose?: () => void;
12
31
  /** 自定义类名 */
13
32
  className?: string;
@@ -1,3 +1,4 @@
1
- export { AnnouncementBar_default as default } from '../chunk-5YQVSOHK.js';
1
+ export { AnnouncementBar_default as default } from '../chunk-O4EABET3.js';
2
+ import '../chunk-2IDVNTKR.js';
2
3
  //# sourceMappingURL=index.js.map
3
4
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,9 @@
1
+ 'use strict';
2
+
3
+ var chunkUIU6VCEQ_cjs = require('../chunk-UIU6VCEQ.cjs');
4
+
5
+
6
+
7
+ module.exports = chunkUIU6VCEQ_cjs.CeilingBox_default;
8
+ //# sourceMappingURL=index.cjs.map
9
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.cjs"}
@@ -0,0 +1,25 @@
1
+ /* CeilingBox/index.less */
2
+ .rpc_ceiling_box_wrapper {
3
+ position: relative;
4
+ box-sizing: border-box;
5
+ }
6
+ .rpc_ceiling_box {
7
+ box-sizing: border-box;
8
+ transition:
9
+ box-shadow 0.25s ease,
10
+ background 0.25s ease,
11
+ backdrop-filter 0.25s ease;
12
+ }
13
+ .rpc_ceiling_box_affixed {
14
+ transition:
15
+ top 0.15s ease,
16
+ bottom 0.15s ease,
17
+ box-shadow 0.25s ease;
18
+ }
19
+ .rpc_ceiling_box_blur {
20
+ background: rgba(255, 255, 255, 0.85) !important;
21
+ backdrop-filter: blur(12px) saturate(180%);
22
+ -webkit-backdrop-filter: blur(12px) saturate(180%);
23
+ box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.08), 0 2px 6px -1px rgba(0, 0, 0, 0.04);
24
+ }
25
+ /*# sourceMappingURL=index.css.map */
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../CeilingBox/index.less"],"sourcesContent":[".rpc_ceiling_box_wrapper {\n position: relative;\n box-sizing: border-box;\n}\n.rpc_ceiling_box {\n box-sizing: border-box;\n transition: box-shadow 0.25s ease, background 0.25s ease, backdrop-filter 0.25s ease;\n}\n.rpc_ceiling_box_affixed {\n transition: top 0.15s ease, bottom 0.15s ease, box-shadow 0.25s ease;\n}\n.rpc_ceiling_box_blur {\n background: rgba(255, 255, 255, 0.85) !important;\n backdrop-filter: blur(12px) saturate(180%);\n -webkit-backdrop-filter: blur(12px) saturate(180%);\n box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.08), 0 2px 6px -1px rgba(0, 0, 0, 0.04);\n}\n"],"mappings":";AAAA,CAAC;AACC,YAAU;AACV,cAAY;AACd;AACA,CAAC;AACC,cAAY;AACZ;AAAA,IAAY,WAAW,MAAM,IAAI;AAAA,IAAE,WAAW,MAAM,IAAI;AAAA,IAAE,gBAAgB,MAAM;AAClF;AACA,CAAC;AACC;AAAA,IAAY,IAAI,MAAM,IAAI;AAAA,IAAE,OAAO,MAAM,IAAI;AAAA,IAAE,WAAW,MAAM;AAClE;AACA,CAAC;AACC,cAAY,KAAK,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE;AAChC,mBAAiB,KAAK,MAAM,SAAS;AACrC,2BAAyB,KAAK,MAAM,SAAS;AAC7C,cAAY,EAAE,IAAI,KAAK,KAAK,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,IAAI,IAAI,KAAK,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE;AAChF;","names":[]}
@@ -0,0 +1,28 @@
1
+ import React, { ReactNode, CSSProperties } from 'react';
2
+ import './index.less';
3
+ export interface CeilingBoxProps {
4
+ /** 子元素内容,支持普通 ReactNode 或 Render Props 函数接收 isAffixed 状态 */
5
+ children: ReactNode | ((isAffixed: boolean) => ReactNode);
6
+ /** 距离视口/容器顶部的吸顶偏移距离(像素),默认为 0 */
7
+ offsetTop?: number;
8
+ /** 距离视口/容器底部的吸底偏移距离(像素,传值时开启吸底模式) */
9
+ offsetBottom?: number;
10
+ /** 监听滚动的目标 DOM 容器,不传时默认监听 window 全局滚动 */
11
+ target?: () => HTMLElement | Window | null;
12
+ /** 吸顶/吸底状态改变时的回调函数 */
13
+ onChange?: (isAffixed: boolean) => void;
14
+ /** 吸顶时是否自动启用毛玻璃磨砂与精致阴影滤镜,默认为 true */
15
+ blur?: boolean;
16
+ /** 吸顶/吸底状态下的图层层级 z-index,默认为 1000 */
17
+ zIndex?: number;
18
+ /** 自定义类名 */
19
+ className?: string;
20
+ /** 自定义行内样式 */
21
+ style?: CSSProperties;
22
+ /** 吸顶激活状态下追加的自定义类名 */
23
+ affixedClassName?: string;
24
+ /** 吸顶激活状态下追加的自定义行内样式 */
25
+ affixedStyle?: CSSProperties;
26
+ }
27
+ declare const CeilingBox: React.FC<CeilingBoxProps>;
28
+ export default CeilingBox;
@@ -0,0 +1,3 @@
1
+ export { CeilingBox_default as default } from '../chunk-5Q7THN6M.js';
2
+ //# sourceMappingURL=index.js.map
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
@@ -0,0 +1,18 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var chunkV55FEQYU_cjs = require('../chunk-V55FEQYU.cjs');
6
+
7
+
8
+
9
+ Object.defineProperty(exports, "LazyLoadBox", {
10
+ enumerable: true,
11
+ get: function () { return chunkV55FEQYU_cjs.LazyLoadBox; }
12
+ });
13
+ Object.defineProperty(exports, "default", {
14
+ enumerable: true,
15
+ get: function () { return chunkV55FEQYU_cjs.LazyLoadBox_default; }
16
+ });
17
+ //# sourceMappingURL=index.cjs.map
18
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.cjs"}
@@ -0,0 +1,57 @@
1
+ /* LazyLoadBox/index.less */
2
+ .rpc_lazy_load_box {
3
+ position: relative;
4
+ box-sizing: border-box;
5
+ width: 100%;
6
+ }
7
+ .rpc_lazy_load_box_fade_in {
8
+ animation: rpcLazyFadeIn 0.3s cubic-bezier(0.2, 0, 0, 1) forwards;
9
+ }
10
+ .rpc_lazy_load_placeholder {
11
+ position: relative;
12
+ width: 100%;
13
+ display: flex;
14
+ align-items: center;
15
+ justify-content: center;
16
+ border-radius: 6px;
17
+ background: #f5f5f7;
18
+ overflow: hidden;
19
+ box-sizing: border-box;
20
+ }
21
+ .rpc_lazy_load_placeholder_bordered {
22
+ border: 1px dashed #d9d9d9;
23
+ }
24
+ .rpc_lazy_load_skeleton {
25
+ position: absolute;
26
+ top: 0;
27
+ left: 0;
28
+ right: 0;
29
+ bottom: 0;
30
+ background:
31
+ linear-gradient(
32
+ 90deg,
33
+ rgba(255, 255, 255, 0) 0%,
34
+ rgba(255, 255, 255, 0.6) 50%,
35
+ rgba(255, 255, 255, 0) 100%);
36
+ background-size: 200% 100%;
37
+ animation: rpcLazyShimmer 1.6s infinite ease-in-out;
38
+ }
39
+ @keyframes rpcLazyFadeIn {
40
+ from {
41
+ opacity: 0;
42
+ transform: translateY(4px);
43
+ }
44
+ to {
45
+ opacity: 1;
46
+ transform: translateY(0);
47
+ }
48
+ }
49
+ @keyframes rpcLazyShimmer {
50
+ 0% {
51
+ background-position: 200% 0;
52
+ }
53
+ 100% {
54
+ background-position: -200% 0;
55
+ }
56
+ }
57
+ /*# sourceMappingURL=index.css.map */
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../LazyLoadBox/index.less"],"sourcesContent":[".rpc_lazy_load_box {\n position: relative;\n box-sizing: border-box;\n width: 100%;\n}\n.rpc_lazy_load_box_fade_in {\n animation: rpcLazyFadeIn 0.3s cubic-bezier(0.2, 0, 0, 1) forwards;\n}\n.rpc_lazy_load_placeholder {\n position: relative;\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 6px;\n background: #f5f5f7;\n overflow: hidden;\n box-sizing: border-box;\n}\n.rpc_lazy_load_placeholder_bordered {\n border: 1px dashed #d9d9d9;\n}\n.rpc_lazy_load_skeleton {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.6) 50%, rgba(255, 255, 255, 0) 100%);\n background-size: 200% 100%;\n animation: rpcLazyShimmer 1.6s infinite ease-in-out;\n}\n@keyframes rpcLazyFadeIn {\n from {\n opacity: 0;\n transform: translateY(4px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n@keyframes rpcLazyShimmer {\n 0% {\n background-position: 200% 0;\n }\n 100% {\n background-position: -200% 0;\n }\n}\n"],"mappings":";AAAA,CAAC;AACC,YAAU;AACV,cAAY;AACZ,SAAO;AACT;AACA,CAAC;AACC,aAAW,cAAc,KAAK,aAAa,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG;AAC3D;AACA,CAAC;AACC,YAAU;AACV,SAAO;AACP,WAAS;AACT,eAAa;AACb,mBAAiB;AACjB,iBAAe;AACf,cAAY;AACZ,YAAU;AACV,cAAY;AACd;AACA,CAAC;AACC,UAAQ,IAAI,OAAO;AACrB;AACA,CAAC;AACC,YAAU;AACV,OAAK;AACL,QAAM;AACN,SAAO;AACP,UAAQ;AACR;AAAA,IAAY;AAAA,MAAgB,KAAhB;AAAA,MAAuB,KAAK,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAA9C;AAAA,MAAkD,KAAK,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,GAA3E;AAAA,MAAgF,KAAK,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG;AACnH,mBAAiB,KAAK;AACtB,aAAW,eAAe,KAAK,SAAS;AAC1C;AACA,WA1Ba;AA2BX;AACE,aAAS;AACT,eAAW,WAAW;AACxB;AACA;AACE,aAAS;AACT,eAAW,WAAW;AACxB;AACF;AACA,WAZa;AAaX;AACE,yBAAqB,KAAK;AAC5B;AACA;AACE,yBAAqB,MAAM;AAC7B;AACF;","names":[]}
@@ -0,0 +1,104 @@
1
+ import React, { CSSProperties, ReactNode, RefObject } from 'react';
2
+ import './index.less';
3
+ export interface LazyLoadBoxRef {
4
+ /** 立即强制触发加载真实内容 */
5
+ load: () => void;
6
+ /** 重置加载状态(仅在 once=false 或需要重新触发时可用) */
7
+ reset: () => void;
8
+ /** 获取当前元素是否在可视/预加载区域内 */
9
+ getInView: () => boolean;
10
+ /** 获取当前是否已经完成过加载 */
11
+ getHasLoaded: () => boolean;
12
+ /** 获取容器原生 DOM 节点 */
13
+ getDOMNode: () => HTMLDivElement | null;
14
+ }
15
+ export interface LazyRenderProps {
16
+ /** 当前是否在视口范围内 */
17
+ isInView: boolean;
18
+ /** 是否已经触发过加载并完成挂载 */
19
+ hasLoaded: boolean;
20
+ /** 重新触发加载函数 */
21
+ load: () => void;
22
+ }
23
+ export type LazyOffset = number | string | [number | string, number | string] | [number | string, number | string, number | string, number | string];
24
+ export interface LazyLoadBoxProps {
25
+ /**
26
+ * 子组件或 Render Props
27
+ * 当为普通组件时:未进入视口时不渲染,进入视口预加载范围后挂载并触发其内部网络请求与渲染;
28
+ * 当为函数时:接收 ({ isInView, hasLoaded, load }) 回传参数
29
+ */
30
+ children?: ReactNode | ((props: LazyRenderProps) => ReactNode);
31
+ /**
32
+ * 距离视口/滚动条多远时提前触发加载(单位 px,或标准 rootMargin 字符串/数组)
33
+ * 例如:
34
+ * - 纯数字:offset={200} (表示上下预加载 200px)
35
+ * - 字符串:offset="200px 0px"
36
+ * - 数组:offset={[100, 200]} (表示上下预加载距离)
37
+ * 默认:150
38
+ */
39
+ offset?: LazyOffset;
40
+ /**
41
+ * 未加载前的预估高度/最小高度,防止页面未渲染时高度坍塌导致滚动条剧烈跳动(CLS)
42
+ * 默认:180
43
+ */
44
+ height?: number | string;
45
+ /**
46
+ * 预估宽度/最小宽度(可选)
47
+ */
48
+ width?: number | string;
49
+ /**
50
+ * 未加载时显示的占位内容(如骨架屏或加载动画)
51
+ * 默认提供内置的高品质流光呼吸骨架屏
52
+ */
53
+ placeholder?: ReactNode;
54
+ /**
55
+ * 是否显示默认占位骨架屏(当 placeholder 未指定时生效)
56
+ * 默认:true
57
+ */
58
+ skeleton?: boolean;
59
+ /**
60
+ * 骨架屏是否显示微边框
61
+ * 默认:false
62
+ */
63
+ bordered?: boolean;
64
+ /**
65
+ * 是否只加载一次(默认 true:进入视口后保持挂载,移出不会销毁与重复请求)
66
+ * 若设为 false,则移出视口时会自动卸载,再次移入时重新挂载
67
+ */
68
+ once?: boolean;
69
+ /**
70
+ * 强制立即渲染(忽略视口距离,用于一键展开、批量导出、页面打印等场景)
71
+ */
72
+ forceRender?: boolean;
73
+ /**
74
+ * 指定局部滚动容器(支持 DOM 节点、RefObject、选择器字符串或 getter 函数),默认监听 window 视口
75
+ */
76
+ scrollContainer?: HTMLElement | null | string | RefObject<HTMLElement | null> | (() => HTMLElement | null);
77
+ /**
78
+ * 交叉比例阈值(0 ~ 1),默认 0
79
+ */
80
+ threshold?: number | number[];
81
+ /**
82
+ * 是否在加载完成后启用平滑淡入动效
83
+ * 默认:true
84
+ */
85
+ animate?: boolean;
86
+ /**
87
+ * 服务端渲染(SSR)时是否直接渲染内容(默认为 false)
88
+ */
89
+ ssr?: boolean;
90
+ /**
91
+ * 首次进入可视/预加载区域触发加载时的回调
92
+ */
93
+ onVisible?: () => void;
94
+ /**
95
+ * 可见性变化时的实时回调
96
+ */
97
+ onInViewChange?: (inView: boolean) => void;
98
+ /** 自定义类名 */
99
+ className?: string;
100
+ /** 自定义样式 */
101
+ style?: CSSProperties;
102
+ }
103
+ export declare const LazyLoadBox: React.ForwardRefExoticComponent<LazyLoadBoxProps & React.RefAttributes<LazyLoadBoxRef>>;
104
+ export default LazyLoadBox;
@@ -0,0 +1,3 @@
1
+ export { LazyLoadBox, LazyLoadBox_default as default } from '../chunk-VYPIRVL4.js';
2
+ //# sourceMappingURL=index.js.map
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
@@ -0,0 +1,22 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var chunkQU33CY3M_cjs = require('../chunk-QU33CY3M.cjs');
6
+
7
+
8
+
9
+ Object.defineProperty(exports, "DEFAULT_PERIOD_OPTIONS", {
10
+ enumerable: true,
11
+ get: function () { return chunkQU33CY3M_cjs.DEFAULT_PERIOD_OPTIONS; }
12
+ });
13
+ Object.defineProperty(exports, "PeriodSelect", {
14
+ enumerable: true,
15
+ get: function () { return chunkQU33CY3M_cjs.PeriodSelect; }
16
+ });
17
+ Object.defineProperty(exports, "default", {
18
+ enumerable: true,
19
+ get: function () { return chunkQU33CY3M_cjs.PeriodSelect_default; }
20
+ });
21
+ //# sourceMappingURL=index.cjs.map
22
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.cjs"}
@@ -0,0 +1,88 @@
1
+ /* PeriodSelect/index.less */
2
+ .rpc_period_select {
3
+ --rpc-period-active-color: #1677ff;
4
+ display: inline-flex;
5
+ align-items: stretch;
6
+ border: 1px solid #d9d9d9;
7
+ border-radius: 4px;
8
+ background: #ffffff;
9
+ user-select: none;
10
+ box-sizing: border-box;
11
+ overflow: hidden;
12
+ position: relative;
13
+ transition: border-color 0.2s ease, box-shadow 0.2s ease;
14
+ }
15
+ .rpc_period_select_small {
16
+ height: 24px;
17
+ }
18
+ .rpc_period_select_small .rpc_period_select_item {
19
+ padding: 0 10px;
20
+ font-size: 12px;
21
+ }
22
+ .rpc_period_select_middle {
23
+ height: 28px;
24
+ }
25
+ .rpc_period_select_middle .rpc_period_select_item {
26
+ padding: 0 14px;
27
+ font-size: 14px;
28
+ }
29
+ .rpc_period_select_large {
30
+ height: 32px;
31
+ }
32
+ .rpc_period_select_large .rpc_period_select_item {
33
+ padding: 0 18px;
34
+ font-size: 15px;
35
+ }
36
+ .rpc_period_select_block {
37
+ display: flex;
38
+ width: 100%;
39
+ }
40
+ .rpc_period_select_block .rpc_period_select_item {
41
+ flex: 1;
42
+ text-align: center;
43
+ }
44
+ .rpc_period_select_disabled {
45
+ opacity: 0.55;
46
+ cursor: not-allowed;
47
+ background: #f5f5f5;
48
+ border-color: #d9d9d9;
49
+ }
50
+ .rpc_period_select_disabled .rpc_period_select_item {
51
+ cursor: not-allowed;
52
+ pointer-events: none;
53
+ }
54
+ .rpc_period_select_item {
55
+ position: relative;
56
+ display: inline-flex;
57
+ align-items: center;
58
+ justify-content: center;
59
+ color: #333333;
60
+ cursor: pointer;
61
+ line-height: 1;
62
+ transition: color 0.15s ease, background-color 0.15s ease;
63
+ }
64
+ .rpc_period_select_item:hover:not(.rpc_period_select_item_disabled) {
65
+ color: var(--rpc-period-active-color);
66
+ }
67
+ .rpc_period_select_item_active {
68
+ color: var(--rpc-period-active-color);
69
+ font-weight: 500;
70
+ }
71
+ .rpc_period_select_item_disabled {
72
+ color: #bfbfbf;
73
+ cursor: not-allowed;
74
+ }
75
+ .rpc_period_select_text {
76
+ position: relative;
77
+ z-index: 2;
78
+ }
79
+ .rpc_period_select_active_line {
80
+ position: absolute;
81
+ left: 0;
82
+ top: 0;
83
+ bottom: 0;
84
+ width: 1px;
85
+ background-color: var(--rpc-period-active-color);
86
+ z-index: 3;
87
+ }
88
+ /*# sourceMappingURL=index.css.map */
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../PeriodSelect/index.less"],"sourcesContent":[".rpc_period_select {\n --rpc-period-active-color: #1677ff;\n display: inline-flex;\n align-items: stretch;\n border: 1px solid #d9d9d9;\n border-radius: 4px;\n background: #ffffff;\n user-select: none;\n box-sizing: border-box;\n overflow: hidden;\n position: relative;\n transition: border-color 0.2s ease, box-shadow 0.2s ease;\n}\n.rpc_period_select_small {\n height: 24px;\n}\n.rpc_period_select_small .rpc_period_select_item {\n padding: 0 10px;\n font-size: 12px;\n}\n.rpc_period_select_middle {\n height: 28px;\n}\n.rpc_period_select_middle .rpc_period_select_item {\n padding: 0 14px;\n font-size: 14px;\n}\n.rpc_period_select_large {\n height: 32px;\n}\n.rpc_period_select_large .rpc_period_select_item {\n padding: 0 18px;\n font-size: 15px;\n}\n.rpc_period_select_block {\n display: flex;\n width: 100%;\n}\n.rpc_period_select_block .rpc_period_select_item {\n flex: 1;\n text-align: center;\n}\n.rpc_period_select_disabled {\n opacity: 0.55;\n cursor: not-allowed;\n background: #f5f5f5;\n border-color: #d9d9d9;\n}\n.rpc_period_select_disabled .rpc_period_select_item {\n cursor: not-allowed;\n pointer-events: none;\n}\n.rpc_period_select_item {\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n color: #333333;\n cursor: pointer;\n line-height: 1;\n transition: color 0.15s ease, background-color 0.15s ease;\n}\n.rpc_period_select_item:hover:not(.rpc_period_select_item_disabled) {\n color: var(--rpc-period-active-color);\n}\n.rpc_period_select_item_active {\n color: var(--rpc-period-active-color);\n font-weight: 500;\n}\n.rpc_period_select_item_disabled {\n color: #bfbfbf;\n cursor: not-allowed;\n}\n.rpc_period_select_text {\n position: relative;\n z-index: 2;\n}\n.rpc_period_select_active_line {\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n width: 1px;\n background-color: var(--rpc-period-active-color);\n z-index: 3;\n}\n"],"mappings":";AAAA,CAAC;AACC,6BAA2B;AAC3B,WAAS;AACT,eAAa;AACb,UAAQ,IAAI,MAAM;AAClB,iBAAe;AACf,cAAY;AACZ,eAAa;AACb,cAAY;AACZ,YAAU;AACV,YAAU;AACV,cAAY,aAAa,KAAK,IAAI,EAAE,WAAW,KAAK;AACtD;AACA,CAAC;AACC,UAAQ;AACV;AACA,CAHC,wBAGwB,CAAC;AACxB,WAAS,EAAE;AACX,aAAW;AACb;AACA,CAAC;AACC,UAAQ;AACV;AACA,CAHC,yBAGyB,CAPA;AAQxB,WAAS,EAAE;AACX,aAAW;AACb;AACA,CAAC;AACC,UAAQ;AACV;AACA,CAHC,wBAGwB,CAdC;AAexB,WAAS,EAAE;AACX,aAAW;AACb;AACA,CAAC;AACC,WAAS;AACT,SAAO;AACT;AACA,CAJC,wBAIwB,CAtBC;AAuBxB,QAAM;AACN,cAAY;AACd;AACA,CAAC;AACC,WAAS;AACT,UAAQ;AACR,cAAY;AACZ,gBAAc;AAChB;AACA,CANC,2BAM2B,CAhCF;AAiCxB,UAAQ;AACR,kBAAgB;AAClB;AACA,CApC0B;AAqCxB,YAAU;AACV,WAAS;AACT,eAAa;AACb,mBAAiB;AACjB,SAAO;AACP,UAAQ;AACR,eAAa;AACb,cAAY,MAAM,MAAM,IAAI,EAAE,iBAAiB,MAAM;AACvD;AACA,CA9C0B,sBA8CH,MAAM,KAAK,CAAC;AACjC,SAAO,IAAI;AACb;AACA,CAAC;AACC,SAAO,IAAI;AACX,eAAa;AACf;AACA,CAPmC;AAQjC,SAAO;AACP,UAAQ;AACV;AACA,CAAC;AACC,YAAU;AACV,WAAS;AACX;AACA,CAAC;AACC,YAAU;AACV,QAAM;AACN,OAAK;AACL,UAAQ;AACR,SAAO;AACP,oBAAkB,IAAI;AACtB,WAAS;AACX;","names":[]}