vane-waterfall 1.0.4 → 2.0.0
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/README.md +174 -365
- package/dist/chunks/WaterfallCore-BSXw7bl_.js +581 -0
- package/dist/chunks/doc-3Fpag2G8.js +84 -0
- package/dist/chunks/doc-78xF08vt.js +82 -0
- package/dist/chunks/doc-B-7dugGv.js +79 -0
- package/dist/chunks/doc-B6kLfMPv.js +121 -0
- package/dist/chunks/doc-BCGQ8Cp5.js +114 -0
- package/dist/chunks/doc-BIzjYAZW.js +50 -0
- package/dist/chunks/doc-BP0DmB7-.js +91 -0
- package/dist/chunks/doc-BXElhF2h.js +138 -0
- package/dist/chunks/doc-BXSy2aPP.js +59 -0
- package/dist/chunks/doc-BfWnfTst.js +83 -0
- package/dist/chunks/doc-BtzhgTYj.js +85 -0
- package/dist/chunks/doc-C5xrHNoC.js +70 -0
- package/dist/chunks/doc-CBHjiDG7.js +88 -0
- package/dist/chunks/doc-CTUoMe7o.js +79 -0
- package/dist/chunks/doc-CcPFavOs.js +56 -0
- package/dist/chunks/doc-CraXjOaA.js +68 -0
- package/dist/chunks/doc-DElLNjIc.js +61 -0
- package/dist/chunks/doc-DJjxOYzW.js +111 -0
- package/dist/chunks/doc-DukOmDCo.js +95 -0
- package/dist/chunks/doc-DzvTrZ13.js +60 -0
- package/dist/chunks/doc-NhL4Ux8q.js +125 -0
- package/dist/chunks/doc-bTHwfIVb.js +78 -0
- package/dist/chunks/doc-f4Uijujv.js +102 -0
- package/dist/chunks/doc-gTAsLjVx.js +55 -0
- package/dist/chunks/doc-j4W9SUrY.js +76 -0
- package/dist/chunks/doc-kTbJE7rY.js +92 -0
- package/dist/chunks/index-BAWlVYr3.js +5 -0
- package/dist/chunks/index-COaun3nf.js +15 -0
- package/dist/chunks/index-DXAtA2f6.js +11 -0
- package/dist/chunks/index-DsRLmBW-.js +13 -0
- package/dist/chunks/index-gjoCq0yC.js +21 -0
- package/dist/chunks/index-wLI6UXkY.js +5 -0
- package/dist/chunks/withPlugins-DLoKg4AP.js +559 -0
- package/dist/components/WaterfallPlugin/WaterfallCore.d.ts +124 -0
- package/dist/components/WaterfallPlugin/WaterfallCore.d.ts.map +1 -0
- package/dist/components/WaterfallPlugin/index.d.ts +9 -10
- package/dist/components/WaterfallPlugin/index.d.ts.map +1 -0
- package/dist/components/WaterfallPlugin/layout.d.ts +41 -0
- package/dist/components/WaterfallPlugin/layout.d.ts.map +1 -0
- package/dist/components/WaterfallPlugin/plugins/types.d.ts +76 -380
- package/dist/components/WaterfallPlugin/plugins/types.d.ts.map +1 -0
- package/dist/components/WaterfallPlugin/virtualize.d.ts +62 -0
- package/dist/components/WaterfallPlugin/virtualize.d.ts.map +1 -0
- package/dist/components/WaterfallPlugin/{plugins/withPlugins.d.ts → withPlugins.d.ts} +4 -2
- package/dist/components/WaterfallPlugin/withPlugins.d.ts.map +1 -0
- package/dist/custom-plugins/A11yPlugin/create.d.ts +23 -0
- package/dist/custom-plugins/A11yPlugin/create.d.ts.map +1 -0
- package/dist/custom-plugins/A11yPlugin/doc.json.d.ts +52 -0
- package/dist/custom-plugins/A11yPlugin/index.d.ts +11 -0
- package/dist/custom-plugins/A11yPlugin/index.d.ts.map +1 -0
- package/dist/custom-plugins/A11yPlugin/index.js +5 -0
- package/dist/{components/WaterfallPlugin/custom-plugins/Alignment/index.d.ts → custom-plugins/AlignmentPlugin/create.d.ts} +3 -3
- package/dist/custom-plugins/AlignmentPlugin/create.d.ts.map +1 -0
- package/dist/custom-plugins/AlignmentPlugin/doc.json.d.ts +34 -0
- package/dist/custom-plugins/AlignmentPlugin/index.d.ts +11 -0
- package/dist/custom-plugins/AlignmentPlugin/index.d.ts.map +1 -0
- package/dist/custom-plugins/AlignmentPlugin/index.js +5 -0
- package/dist/custom-plugins/AutoColumnPlugin/create.d.ts +18 -0
- package/dist/custom-plugins/AutoColumnPlugin/create.d.ts.map +1 -0
- package/dist/custom-plugins/AutoColumnPlugin/doc.json.d.ts +50 -0
- package/dist/custom-plugins/AutoColumnPlugin/index.d.ts +11 -0
- package/dist/custom-plugins/AutoColumnPlugin/index.d.ts.map +1 -0
- package/dist/custom-plugins/AutoColumnPlugin/index.js +5 -0
- package/dist/{components/WaterfallPlugin/custom-plugins/Bookmark/index.d.ts → custom-plugins/BookmarkPlugin/create.d.ts} +3 -3
- package/dist/custom-plugins/BookmarkPlugin/create.d.ts.map +1 -0
- package/dist/custom-plugins/BookmarkPlugin/doc.json.d.ts +41 -0
- package/dist/custom-plugins/BookmarkPlugin/index.d.ts +11 -0
- package/dist/custom-plugins/BookmarkPlugin/index.d.ts.map +1 -0
- package/dist/custom-plugins/BookmarkPlugin/index.js +5 -0
- package/dist/custom-plugins/ClickAnalyticsPlugin/create.d.ts +25 -0
- package/dist/custom-plugins/ClickAnalyticsPlugin/create.d.ts.map +1 -0
- package/dist/custom-plugins/ClickAnalyticsPlugin/doc.json.d.ts +41 -0
- package/dist/custom-plugins/ClickAnalyticsPlugin/index.d.ts +11 -0
- package/dist/custom-plugins/ClickAnalyticsPlugin/index.d.ts.map +1 -0
- package/dist/custom-plugins/ClickAnalyticsPlugin/index.js +5 -0
- package/dist/{components/WaterfallPlugin/custom-plugins/DebounceLayout/index.d.ts → custom-plugins/DebounceLayoutPlugin/create.d.ts} +3 -3
- package/dist/custom-plugins/DebounceLayoutPlugin/create.d.ts.map +1 -0
- package/dist/custom-plugins/DebounceLayoutPlugin/doc.json.d.ts +34 -0
- package/dist/custom-plugins/DebounceLayoutPlugin/index.d.ts +11 -0
- package/dist/custom-plugins/DebounceLayoutPlugin/index.d.ts.map +1 -0
- package/dist/custom-plugins/DebounceLayoutPlugin/index.js +5 -0
- package/dist/custom-plugins/DragReorderPlugin/create.d.ts +33 -0
- package/dist/custom-plugins/DragReorderPlugin/create.d.ts.map +1 -0
- package/dist/custom-plugins/DragReorderPlugin/doc.json.d.ts +53 -0
- package/dist/custom-plugins/DragReorderPlugin/index.d.ts +11 -0
- package/dist/custom-plugins/DragReorderPlugin/index.d.ts.map +1 -0
- package/dist/custom-plugins/DragReorderPlugin/index.js +5 -0
- package/dist/{components/WaterfallPlugin/custom-plugins/Filter/index.d.ts → custom-plugins/FilterPlugin/create.d.ts} +3 -3
- package/dist/custom-plugins/FilterPlugin/create.d.ts.map +1 -0
- package/dist/custom-plugins/FilterPlugin/doc.json.d.ts +47 -0
- package/dist/custom-plugins/FilterPlugin/index.d.ts +11 -0
- package/dist/custom-plugins/FilterPlugin/index.d.ts.map +1 -0
- package/dist/custom-plugins/FilterPlugin/index.js +5 -0
- package/dist/{components/WaterfallPlugin/custom-plugins/FixedHeight/index.d.ts → custom-plugins/FixedHeightPlugin/create.d.ts} +3 -3
- package/dist/custom-plugins/FixedHeightPlugin/create.d.ts.map +1 -0
- package/dist/custom-plugins/FixedHeightPlugin/doc.json.d.ts +34 -0
- package/dist/custom-plugins/FixedHeightPlugin/index.d.ts +11 -0
- package/dist/custom-plugins/FixedHeightPlugin/index.d.ts.map +1 -0
- package/dist/custom-plugins/FixedHeightPlugin/index.js +5 -0
- package/dist/{components/WaterfallPlugin/custom-plugins/Gap/index.d.ts → custom-plugins/GapPlugin/create.d.ts} +3 -3
- package/dist/custom-plugins/GapPlugin/create.d.ts.map +1 -0
- package/dist/custom-plugins/GapPlugin/doc.json.d.ts +47 -0
- package/dist/custom-plugins/GapPlugin/index.d.ts +11 -0
- package/dist/custom-plugins/GapPlugin/index.d.ts.map +1 -0
- package/dist/custom-plugins/GapPlugin/index.js +5 -0
- package/dist/custom-plugins/GroupingPlugin/create.d.ts +16 -0
- package/dist/custom-plugins/GroupingPlugin/create.d.ts.map +1 -0
- package/dist/custom-plugins/GroupingPlugin/doc.json.d.ts +40 -0
- package/dist/custom-plugins/GroupingPlugin/index.d.ts +11 -0
- package/dist/custom-plugins/GroupingPlugin/index.d.ts.map +1 -0
- package/dist/custom-plugins/GroupingPlugin/index.js +5 -0
- package/dist/custom-plugins/HeatmapAnalyticsPlugin/create.d.ts +31 -0
- package/dist/custom-plugins/HeatmapAnalyticsPlugin/create.d.ts.map +1 -0
- package/dist/custom-plugins/HeatmapAnalyticsPlugin/doc.json.d.ts +43 -0
- package/dist/custom-plugins/HeatmapAnalyticsPlugin/index.d.ts +11 -0
- package/dist/custom-plugins/HeatmapAnalyticsPlugin/index.d.ts.map +1 -0
- package/dist/custom-plugins/HeatmapAnalyticsPlugin/index.js +5 -0
- package/dist/custom-plugins/InfiniteScrollPlugin/create.d.ts +17 -0
- package/dist/custom-plugins/InfiniteScrollPlugin/create.d.ts.map +1 -0
- package/dist/custom-plugins/InfiniteScrollPlugin/doc.json.d.ts +44 -0
- package/dist/custom-plugins/InfiniteScrollPlugin/index.d.ts +11 -0
- package/dist/custom-plugins/InfiniteScrollPlugin/index.d.ts.map +1 -0
- package/dist/custom-plugins/InfiniteScrollPlugin/index.js +5 -0
- package/dist/{components/WaterfallPlugin/custom-plugins/Pagination/index.d.ts → custom-plugins/PaginationPlugin/create.d.ts} +3 -3
- package/dist/custom-plugins/PaginationPlugin/create.d.ts.map +1 -0
- package/dist/custom-plugins/PaginationPlugin/doc.json.d.ts +50 -0
- package/dist/custom-plugins/PaginationPlugin/index.d.ts +11 -0
- package/dist/custom-plugins/PaginationPlugin/index.d.ts.map +1 -0
- package/dist/custom-plugins/PaginationPlugin/index.js +5 -0
- package/dist/custom-plugins/PinItemPlugin/create.d.ts +23 -0
- package/dist/custom-plugins/PinItemPlugin/create.d.ts.map +1 -0
- package/dist/custom-plugins/PinItemPlugin/doc.json.d.ts +43 -0
- package/dist/custom-plugins/PinItemPlugin/index.d.ts +11 -0
- package/dist/custom-plugins/PinItemPlugin/index.d.ts.map +1 -0
- package/dist/custom-plugins/PinItemPlugin/index.js +5 -0
- package/dist/{components/WaterfallPlugin/custom-plugins/Recycle/index.d.ts → custom-plugins/RecyclePlugin/create.d.ts} +3 -3
- package/dist/custom-plugins/RecyclePlugin/create.d.ts.map +1 -0
- package/dist/custom-plugins/RecyclePlugin/doc.json.d.ts +35 -0
- package/dist/custom-plugins/RecyclePlugin/index.d.ts +11 -0
- package/dist/custom-plugins/RecyclePlugin/index.d.ts.map +1 -0
- package/dist/custom-plugins/RecyclePlugin/index.js +5 -0
- package/dist/custom-plugins/ReducedMotionPlugin/create.d.ts +25 -0
- package/dist/custom-plugins/ReducedMotionPlugin/create.d.ts.map +1 -0
- package/dist/custom-plugins/ReducedMotionPlugin/doc.json.d.ts +42 -0
- package/dist/custom-plugins/ReducedMotionPlugin/index.d.ts +11 -0
- package/dist/custom-plugins/ReducedMotionPlugin/index.d.ts.map +1 -0
- package/dist/custom-plugins/ReducedMotionPlugin/index.js +5 -0
- package/dist/custom-plugins/ResponsiveColumnsPlugin/create.d.ts +22 -0
- package/dist/custom-plugins/ResponsiveColumnsPlugin/create.d.ts.map +1 -0
- package/dist/custom-plugins/ResponsiveColumnsPlugin/doc.json.d.ts +37 -0
- package/dist/custom-plugins/ResponsiveColumnsPlugin/index.d.ts +10 -0
- package/dist/custom-plugins/ResponsiveColumnsPlugin/index.d.ts.map +1 -0
- package/dist/custom-plugins/ResponsiveColumnsPlugin/index.js +5 -0
- package/dist/{components/WaterfallPlugin/custom-plugins/ScrollAnchor/index.d.ts → custom-plugins/ScrollAnchorPlugin/create.d.ts} +3 -3
- package/dist/custom-plugins/ScrollAnchorPlugin/create.d.ts.map +1 -0
- package/dist/custom-plugins/ScrollAnchorPlugin/doc.json.d.ts +34 -0
- package/dist/custom-plugins/ScrollAnchorPlugin/index.d.ts +11 -0
- package/dist/custom-plugins/ScrollAnchorPlugin/index.d.ts.map +1 -0
- package/dist/custom-plugins/ScrollAnchorPlugin/index.js +5 -0
- package/dist/{components/WaterfallPlugin/custom-plugins/Search/index.d.ts → custom-plugins/SearchPlugin/create.d.ts} +3 -3
- package/dist/custom-plugins/SearchPlugin/create.d.ts.map +1 -0
- package/dist/custom-plugins/SearchPlugin/doc.json.d.ts +47 -0
- package/dist/custom-plugins/SearchPlugin/index.d.ts +11 -0
- package/dist/custom-plugins/SearchPlugin/index.d.ts.map +1 -0
- package/dist/custom-plugins/SearchPlugin/index.js +5 -0
- package/dist/{components/WaterfallPlugin/custom-plugins/Sort/index.d.ts → custom-plugins/SortPlugin/create.d.ts} +3 -3
- package/dist/custom-plugins/SortPlugin/create.d.ts.map +1 -0
- package/dist/custom-plugins/SortPlugin/doc.json.d.ts +46 -0
- package/dist/custom-plugins/SortPlugin/index.d.ts +11 -0
- package/dist/custom-plugins/SortPlugin/index.d.ts.map +1 -0
- package/dist/custom-plugins/SortPlugin/index.js +5 -0
- package/dist/{components/WaterfallPlugin/custom-plugins/StatePersistence/index.d.ts → custom-plugins/StatePersistencePlugin/create.d.ts} +3 -3
- package/dist/custom-plugins/StatePersistencePlugin/create.d.ts.map +1 -0
- package/dist/custom-plugins/StatePersistencePlugin/doc.json.d.ts +47 -0
- package/dist/custom-plugins/StatePersistencePlugin/index.d.ts +11 -0
- package/dist/custom-plugins/StatePersistencePlugin/index.d.ts.map +1 -0
- package/dist/custom-plugins/StatePersistencePlugin/index.js +5 -0
- package/dist/custom-plugins/StickyHeaderPlugin/create.d.ts +13 -0
- package/dist/custom-plugins/StickyHeaderPlugin/create.d.ts.map +1 -0
- package/dist/custom-plugins/StickyHeaderPlugin/doc.json.d.ts +40 -0
- package/dist/custom-plugins/StickyHeaderPlugin/index.d.ts +11 -0
- package/dist/custom-plugins/StickyHeaderPlugin/index.d.ts.map +1 -0
- package/dist/custom-plugins/StickyHeaderPlugin/index.js +5 -0
- package/dist/{components/WaterfallPlugin/custom-plugins/Throttle/index.d.ts → custom-plugins/ThrottlePlugin/create.d.ts} +3 -3
- package/dist/custom-plugins/ThrottlePlugin/create.d.ts.map +1 -0
- package/dist/custom-plugins/ThrottlePlugin/doc.json.d.ts +40 -0
- package/dist/custom-plugins/ThrottlePlugin/index.d.ts +11 -0
- package/dist/custom-plugins/ThrottlePlugin/index.d.ts.map +1 -0
- package/dist/custom-plugins/ThrottlePlugin/index.js +5 -0
- package/dist/{components/WaterfallPlugin/custom-plugins/Transition/index.d.ts → custom-plugins/TransitionPlugin/create.d.ts} +3 -3
- package/dist/custom-plugins/TransitionPlugin/create.d.ts.map +1 -0
- package/dist/custom-plugins/TransitionPlugin/doc.json.d.ts +43 -0
- package/dist/custom-plugins/TransitionPlugin/index.d.ts +11 -0
- package/dist/custom-plugins/TransitionPlugin/index.d.ts.map +1 -0
- package/dist/custom-plugins/TransitionPlugin/index.js +5 -0
- package/dist/{components/WaterfallPlugin/custom-plugins/URLSync/index.d.ts → custom-plugins/URLSyncPlugin/create.d.ts} +3 -3
- package/dist/custom-plugins/URLSyncPlugin/create.d.ts.map +1 -0
- package/dist/custom-plugins/URLSyncPlugin/doc.json.d.ts +41 -0
- package/dist/custom-plugins/URLSyncPlugin/index.d.ts +11 -0
- package/dist/custom-plugins/URLSyncPlugin/index.d.ts.map +1 -0
- package/dist/custom-plugins/URLSyncPlugin/index.js +5 -0
- package/dist/custom-plugins/index.d.ts +61 -0
- package/dist/custom-plugins/index.d.ts.map +1 -0
- package/dist/custom-plugins/index.js +34 -0
- package/dist/entries/core.d.ts +8 -0
- package/dist/entries/core.d.ts.map +1 -0
- package/dist/entries/core.js +7 -0
- package/dist/entries/plugins.d.ts +7 -0
- package/dist/entries/plugins.d.ts.map +1 -0
- package/dist/entries/plugins.js +36 -0
- package/dist/index.d.ts +14 -9
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -0
- package/dist/presets/dashboard/index.d.ts +13 -0
- package/dist/presets/dashboard/index.d.ts.map +1 -0
- package/dist/presets/dashboard/index.js +21 -0
- package/dist/presets/photo-feed/index.d.ts +13 -0
- package/dist/presets/photo-feed/index.d.ts.map +1 -0
- package/dist/presets/photo-feed/index.js +17 -0
- package/dist/presets/product-feed/index.d.ts +9 -0
- package/dist/presets/product-feed/index.d.ts.map +1 -0
- package/dist/presets/product-feed/index.js +23 -0
- package/package.json +222 -82
- package/dist/404.jpg +0 -0
- package/dist/components/WaterfallPlugin/core/WaterfallCore.d.ts +0 -174
- package/dist/components/WaterfallPlugin/custom-plugins/A11y/index.d.ts +0 -16
- package/dist/components/WaterfallPlugin/custom-plugins/AutoColumn/index.d.ts +0 -17
- package/dist/components/WaterfallPlugin/custom-plugins/ClickAnalytics/index.d.ts +0 -12
- package/dist/components/WaterfallPlugin/custom-plugins/DragReorder/index.d.ts +0 -13
- package/dist/components/WaterfallPlugin/custom-plugins/Grouping/index.d.ts +0 -12
- package/dist/components/WaterfallPlugin/custom-plugins/HeatmapAnalytics/index.d.ts +0 -14
- package/dist/components/WaterfallPlugin/custom-plugins/InfiniteScroll/index.d.ts +0 -13
- package/dist/components/WaterfallPlugin/custom-plugins/PinItem/index.d.ts +0 -13
- package/dist/components/WaterfallPlugin/custom-plugins/ReducedMotion/index.d.ts +0 -13
- package/dist/components/WaterfallPlugin/custom-plugins/ResponsiveColumns/index.d.ts +0 -10
- package/dist/components/WaterfallPlugin/custom-plugins/StickyHeader/index.d.ts +0 -11
- package/dist/components/WaterfallPlugin/custom-plugins/VirtualWaterfall/index.d.ts +0 -12
- package/dist/components/WaterfallPlugin/custom-plugins/index.d.ts +0 -30
- package/dist/components/WaterfallPlugin/plugins/PluginBus.d.ts +0 -2
- package/dist/components/WaterfallPlugin/plugins/PluginManager.d.ts +0 -2
- package/dist/components/WaterfallPlugin/plugins/index.d.ts +0 -8
- package/dist/index.es.js +0 -2382
- package/dist/index.umd.js +0 -30
- package/dist/vite.svg +0 -1
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
function r(o) {
|
|
2
|
+
const e = typeof window < "u" ? window.innerWidth : 1024, n = o.responsive || {};
|
|
3
|
+
return e >= 1200 && n.xl ? n.xl : e >= 992 && n.lg ? n.lg : e >= 768 && n.md ? n.md : e < 768 && n.sm ? n.sm : {};
|
|
4
|
+
}
|
|
5
|
+
function w(o) {
|
|
6
|
+
return {
|
|
7
|
+
name: "GapPlugin",
|
|
8
|
+
priority: 50,
|
|
9
|
+
enabled: !0,
|
|
10
|
+
hooks: {
|
|
11
|
+
transformProps: (e) => {
|
|
12
|
+
const n = { columnGap: o.columnGap, rowGap: o.rowGap }, t = r(o), s = {
|
|
13
|
+
columnGap: t.columnGap ?? n.columnGap ?? e.columnGap,
|
|
14
|
+
rowGap: t.rowGap ?? n.rowGap ?? e.rowGap
|
|
15
|
+
};
|
|
16
|
+
return { ...e, ...s };
|
|
17
|
+
},
|
|
18
|
+
onResize: (e) => {
|
|
19
|
+
e.relayout?.();
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
const a = "GapPlugin", p = "把 rowGap / columnGap 收敛到一处配置,并支持按窗口宽度切换间距(窄屏 8px、宽屏 16px 这类)。", i = "2.0.0", c = [
|
|
25
|
+
"layout",
|
|
26
|
+
"间距"
|
|
27
|
+
], l = [
|
|
28
|
+
{
|
|
29
|
+
name: "columnGap",
|
|
30
|
+
type: "number",
|
|
31
|
+
default: "props.columnGap",
|
|
32
|
+
description: "列间距 px"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
name: "rowGap",
|
|
36
|
+
type: "number",
|
|
37
|
+
default: "props.rowGap",
|
|
38
|
+
description: "行间距 px"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
name: "responsive",
|
|
42
|
+
type: "{ sm?, md?, lg?, xl? }",
|
|
43
|
+
default: "—",
|
|
44
|
+
description: "断点覆盖(按 window 宽度)"
|
|
45
|
+
}
|
|
46
|
+
], u = `// 统一控制行/列间距,支持按断点给不同间距。
|
|
47
|
+
const Waterfall = withPlugins(WaterfallCore, [
|
|
48
|
+
createGapPlugin(),
|
|
49
|
+
]);
|
|
50
|
+
|
|
51
|
+
<Waterfall items={items} renderItem={(item) => <Card data={item} />} />;`, m = [
|
|
52
|
+
"行列间距一处配置",
|
|
53
|
+
"断点覆盖(sm/md/lg/xl)",
|
|
54
|
+
"不填则回退到 props"
|
|
55
|
+
], d = [
|
|
56
|
+
"设计规范里间距随断点变化",
|
|
57
|
+
"同一组件在不同页面用不同密度"
|
|
58
|
+
], G = [
|
|
59
|
+
"断点判断用的是 window.innerWidth(间距通常跟视口走,与列数按容器算不一样)。",
|
|
60
|
+
"断点是「命中即覆盖」:桌面窗口 ≥1200 又配了 responsive.lg,那就一直是 lg 的值,config.columnGap/rowGap 在这档不起作用;想让手写值生效就别给该档位配 responsive。",
|
|
61
|
+
"sm 只在小屏(<768)生效,不会被当成兜底档套到桌面端。"
|
|
62
|
+
], f = {
|
|
63
|
+
name: a,
|
|
64
|
+
description: p,
|
|
65
|
+
since: i,
|
|
66
|
+
tags: c,
|
|
67
|
+
config: l,
|
|
68
|
+
example: u,
|
|
69
|
+
features: m,
|
|
70
|
+
useCases: d,
|
|
71
|
+
notes: G
|
|
72
|
+
};
|
|
73
|
+
export {
|
|
74
|
+
w as c,
|
|
75
|
+
f as d
|
|
76
|
+
};
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
2
|
+
function R(n = {}) {
|
|
3
|
+
const i = n.containerRole ?? "list", s = n.itemRole ?? "listitem", o = n.enableTabIndex ?? !0, r = n.containerLabel ?? "Waterfall list", a = (e) => {
|
|
4
|
+
const t = e.containerRef.current;
|
|
5
|
+
t && (t.setAttribute("role", i), t.setAttribute("aria-label", r), t.setAttribute("aria-busy", e.isLayouting ? "true" : "false"));
|
|
6
|
+
};
|
|
7
|
+
return {
|
|
8
|
+
name: "A11yPlugin",
|
|
9
|
+
enabled: !0,
|
|
10
|
+
hooks: {
|
|
11
|
+
onMount: (e) => {
|
|
12
|
+
a(e);
|
|
13
|
+
},
|
|
14
|
+
onLayoutComplete: (e) => {
|
|
15
|
+
a(e);
|
|
16
|
+
},
|
|
17
|
+
renderItemWrapper: (e, t, l) => /* @__PURE__ */ c(
|
|
18
|
+
"div",
|
|
19
|
+
{
|
|
20
|
+
role: s,
|
|
21
|
+
"aria-posinset": l + 1,
|
|
22
|
+
"aria-setsize": e.itemCount,
|
|
23
|
+
tabIndex: o ? 0 : void 0,
|
|
24
|
+
style: { outline: "none" },
|
|
25
|
+
children: t
|
|
26
|
+
}
|
|
27
|
+
)
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
const u = "A11yPlugin", d = "把瀑布流补成读屏可理解的列表:容器 `role=list` + `aria-label`,每项 `role=listitem` + `aria-posinset` / `aria-setsize`,并可选加 `tabIndex` 让键盘能逐项聚焦。", b = "2.0.0", m = [
|
|
32
|
+
"ui",
|
|
33
|
+
"a11y"
|
|
34
|
+
], p = [
|
|
35
|
+
{
|
|
36
|
+
name: "containerRole",
|
|
37
|
+
type: "string",
|
|
38
|
+
default: '"list"',
|
|
39
|
+
description: "容器 role"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
name: "itemRole",
|
|
43
|
+
type: "string",
|
|
44
|
+
default: '"listitem"',
|
|
45
|
+
description: "项 role"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: "enableTabIndex",
|
|
49
|
+
type: "boolean",
|
|
50
|
+
default: "true",
|
|
51
|
+
description: "项是否可 Tab 聚焦"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
name: "containerLabel",
|
|
55
|
+
type: "string",
|
|
56
|
+
default: '"Waterfall list"',
|
|
57
|
+
description: "容器 aria-label"
|
|
58
|
+
}
|
|
59
|
+
], f = `// 给容器与项补 ARIA role / label / posinset,支持键盘 Tab 遍历。
|
|
60
|
+
const Waterfall = withPlugins(WaterfallCore, [
|
|
61
|
+
createA11yPlugin({
|
|
62
|
+
containerRole: "list",
|
|
63
|
+
itemRole: "listitem",
|
|
64
|
+
enableTabIndex: true,
|
|
65
|
+
}),
|
|
66
|
+
]);
|
|
67
|
+
|
|
68
|
+
<Waterfall items={items} renderItem={(item) => <Card data={item} />} />;`, y = [
|
|
69
|
+
"容器 / 项 role 成对补齐",
|
|
70
|
+
"aria-posinset + aria-setsize 正确标注序号",
|
|
71
|
+
"键盘可逐项聚焦"
|
|
72
|
+
], g = [
|
|
73
|
+
"政务 / 金融等合规站点",
|
|
74
|
+
"读屏用户可用的信息流",
|
|
75
|
+
"键盘操作优先的桌面端"
|
|
76
|
+
], x = [
|
|
77
|
+
"项数很多时 `tabIndex=0` 会让 Tab 变长,建议配合「跳转主内容」链接使用。"
|
|
78
|
+
], A = {
|
|
79
|
+
name: u,
|
|
80
|
+
description: d,
|
|
81
|
+
since: b,
|
|
82
|
+
tags: m,
|
|
83
|
+
config: p,
|
|
84
|
+
example: f,
|
|
85
|
+
features: y,
|
|
86
|
+
useCases: g,
|
|
87
|
+
notes: x
|
|
88
|
+
};
|
|
89
|
+
export {
|
|
90
|
+
R as c,
|
|
91
|
+
A as d
|
|
92
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { c as a, d as e } from "./doc-DElLNjIc.js";
|
|
2
|
+
import { c as t, d as s } from "./doc-CcPFavOs.js";
|
|
3
|
+
import { c, d as i } from "./doc-3Fpag2G8.js";
|
|
4
|
+
import { c as n, d as o } from "./doc-BfWnfTst.js";
|
|
5
|
+
import { c as r, d as g } from "./doc-B-7dugGv.js";
|
|
6
|
+
import { c as l, d as m } from "./doc-f4Uijujv.js";
|
|
7
|
+
const f = Object.assign(a, { meta: e }), j = Object.assign(t, { meta: s }), O = Object.assign(c, { meta: i }), C = Object.assign(n, { meta: o }), F = Object.assign(r, { meta: g }), x = Object.assign(l, { meta: m });
|
|
8
|
+
export {
|
|
9
|
+
O as a,
|
|
10
|
+
j as b,
|
|
11
|
+
x as c,
|
|
12
|
+
F as d,
|
|
13
|
+
f as e,
|
|
14
|
+
C as f
|
|
15
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { c as a, d as e } from "./doc-CTUoMe7o.js";
|
|
2
|
+
import { c as t, d as c } from "./doc-j4W9SUrY.js";
|
|
3
|
+
import { c as o, d as n } from "./doc-DukOmDCo.js";
|
|
4
|
+
import { c as s, d as i } from "./doc-78xF08vt.js";
|
|
5
|
+
const d = Object.assign(a, { meta: e }), g = Object.assign(t, { meta: c }), P = Object.assign(o, { meta: n }), p = Object.assign(s, { meta: i });
|
|
6
|
+
export {
|
|
7
|
+
g as a,
|
|
8
|
+
p as b,
|
|
9
|
+
d as c,
|
|
10
|
+
P as d
|
|
11
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { c as e, d as t } from "./doc-DzvTrZ13.js";
|
|
2
|
+
import { c as a, d as c } from "./doc-BIzjYAZW.js";
|
|
3
|
+
import { c as s, d as o } from "./doc-CraXjOaA.js";
|
|
4
|
+
import { c as r, d as n } from "./doc-BP0DmB7-.js";
|
|
5
|
+
import { c as i, d as m } from "./doc-NhL4Ux8q.js";
|
|
6
|
+
const $ = Object.assign(e, { meta: t }), b = Object.assign(a, { meta: c }), p = Object.assign(s, { meta: o }), f = Object.assign(r, { meta: n }), j = Object.assign(i, { meta: m });
|
|
7
|
+
export {
|
|
8
|
+
b as a,
|
|
9
|
+
p as b,
|
|
10
|
+
f as c,
|
|
11
|
+
j as d,
|
|
12
|
+
$ as e
|
|
13
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { c as a, d as e } from "./doc-gTAsLjVx.js";
|
|
2
|
+
import { c, d as t } from "./doc-bTHwfIVb.js";
|
|
3
|
+
import { c as s, d as r } from "./doc-CBHjiDG7.js";
|
|
4
|
+
import { c as n, d as i } from "./doc-B6kLfMPv.js";
|
|
5
|
+
import { c as o, d as g } from "./doc-BXElhF2h.js";
|
|
6
|
+
import { c as m, d as l } from "./doc-BXSy2aPP.js";
|
|
7
|
+
import { c as d, d as u } from "./doc-BCGQ8Cp5.js";
|
|
8
|
+
import { c as P, d as $ } from "./doc-BtzhgTYj.js";
|
|
9
|
+
import { c as p, d as b } from "./doc-DJjxOYzW.js";
|
|
10
|
+
const k = Object.assign(a, { meta: e }), D = Object.assign(c, { meta: t }), G = Object.assign(s, { meta: r }), I = Object.assign(n, { meta: i }), L = Object.assign(o, { meta: g }), U = Object.assign(m, { meta: l }), x = Object.assign(d, { meta: u }), q = Object.assign(P, { meta: $ }), v = Object.assign(p, { meta: b });
|
|
11
|
+
export {
|
|
12
|
+
L as a,
|
|
13
|
+
x as b,
|
|
14
|
+
k as c,
|
|
15
|
+
I as d,
|
|
16
|
+
D as e,
|
|
17
|
+
U as f,
|
|
18
|
+
G as g,
|
|
19
|
+
q as h,
|
|
20
|
+
v as i
|
|
21
|
+
};
|