@react-spectrum/card 3.0.0-alpha.3 → 3.0.0-alpha.4
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/dist/main.js +377 -377
- package/dist/module.js +373 -373
- package/package.json +3 -3
package/dist/module.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import "./main.css";
|
|
2
|
-
import {useStyleProps as $
|
|
3
|
-
import {GridCollection as $
|
|
4
|
-
import {ProgressCircle as $
|
|
5
|
-
import $
|
|
6
|
-
import {useCollator as $
|
|
7
|
-
import {useGrid as $
|
|
8
|
-
import {useListState as $
|
|
9
|
-
import {useProvider as $
|
|
10
|
-
import {VirtualizerItem as $
|
|
11
|
-
import {Checkbox as $
|
|
12
|
-
import {useResizeObserver as $
|
|
13
|
-
import {getFocusableTreeWalker as $
|
|
14
|
-
import {useHover as $
|
|
15
|
-
import {Size as $
|
|
2
|
+
import {useStyleProps as $8EWFi$useStyleProps, useDOMRef as $8EWFi$useDOMRef, classNames as $8EWFi$classNames, useUnwrapDOMRef as $8EWFi$useUnwrapDOMRef, useHasChild as $8EWFi$useHasChild, SlotProvider as $8EWFi$SlotProvider} from "@react-spectrum/utils";
|
|
3
|
+
import {GridCollection as $8EWFi$GridCollection, useGridState as $8EWFi$useGridState} from "@react-stately/grid";
|
|
4
|
+
import {ProgressCircle as $8EWFi$ProgressCircle} from "@react-spectrum/progress";
|
|
5
|
+
import $8EWFi$react, {useMemo as $8EWFi$useMemo, useCallback as $8EWFi$useCallback, useRef as $8EWFi$useRef, useState as $8EWFi$useState, useContext as $8EWFi$useContext, forwardRef as $8EWFi$forwardRef} from "react";
|
|
6
|
+
import {useCollator as $8EWFi$useCollator, useMessageFormatter as $8EWFi$useMessageFormatter, useLocale as $8EWFi$useLocale} from "@react-aria/i18n";
|
|
7
|
+
import {useGrid as $8EWFi$useGrid, useGridRow as $8EWFi$useGridRow, useGridCell as $8EWFi$useGridCell} from "@react-aria/grid";
|
|
8
|
+
import {useListState as $8EWFi$useListState} from "@react-stately/list";
|
|
9
|
+
import {useProvider as $8EWFi$useProvider, useProviderProps as $8EWFi$useProviderProps} from "@react-spectrum/provider";
|
|
10
|
+
import {VirtualizerItem as $8EWFi$VirtualizerItem, Virtualizer as $8EWFi$Virtualizer} from "@react-aria/virtualizer";
|
|
11
|
+
import {Checkbox as $8EWFi$Checkbox} from "@react-spectrum/checkbox";
|
|
12
|
+
import {useResizeObserver as $8EWFi$useResizeObserver, useLayoutEffect as $8EWFi$useLayoutEffect, mergeProps as $8EWFi$mergeProps, filterDOMProps as $8EWFi$filterDOMProps, useSlotId as $8EWFi$useSlotId} from "@react-aria/utils";
|
|
13
|
+
import {getFocusableTreeWalker as $8EWFi$getFocusableTreeWalker, FocusRing as $8EWFi$FocusRing} from "@react-aria/focus";
|
|
14
|
+
import {useHover as $8EWFi$useHover, useFocusWithin as $8EWFi$useFocusWithin} from "@react-aria/interactions";
|
|
15
|
+
import {Size as $8EWFi$Size, Rect as $8EWFi$Rect, LayoutInfo as $8EWFi$LayoutInfo, Layout as $8EWFi$Layout} from "@react-stately/virtualizer";
|
|
16
16
|
|
|
17
17
|
function $parcel$interopDefault(a) {
|
|
18
18
|
return a && a.__esModule ? a.default : a;
|
|
@@ -20,112 +20,112 @@ function $parcel$interopDefault(a) {
|
|
|
20
20
|
function $parcel$export(e, n, v, s) {
|
|
21
21
|
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
22
22
|
}
|
|
23
|
-
var $
|
|
24
|
-
|
|
25
|
-
$parcel$export($
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
var $
|
|
33
|
-
|
|
34
|
-
$parcel$export($
|
|
35
|
-
$parcel$export($
|
|
36
|
-
$parcel$export($
|
|
37
|
-
$parcel$export($
|
|
38
|
-
$parcel$export($
|
|
39
|
-
$parcel$export($
|
|
40
|
-
$parcel$export($
|
|
41
|
-
$parcel$export($
|
|
42
|
-
$parcel$export($
|
|
43
|
-
$parcel$export($
|
|
44
|
-
$parcel$export($
|
|
45
|
-
$parcel$export($
|
|
46
|
-
$parcel$export($
|
|
47
|
-
$parcel$export($
|
|
48
|
-
$parcel$export($
|
|
49
|
-
$parcel$export($
|
|
50
|
-
$parcel$export($
|
|
51
|
-
$parcel$export($
|
|
52
|
-
$parcel$export($
|
|
53
|
-
$parcel$export($
|
|
54
|
-
$parcel$export($
|
|
55
|
-
$parcel$export($
|
|
56
|
-
$parcel$export($
|
|
57
|
-
$parcel$export($
|
|
58
|
-
$parcel$export($
|
|
59
|
-
$parcel$export($
|
|
60
|
-
$parcel$export($
|
|
61
|
-
var $
|
|
62
|
-
var $
|
|
63
|
-
var $
|
|
64
|
-
var $
|
|
65
|
-
var $
|
|
66
|
-
var $
|
|
67
|
-
var $
|
|
68
|
-
var $
|
|
69
|
-
var $
|
|
70
|
-
var $
|
|
71
|
-
var $
|
|
72
|
-
var $
|
|
73
|
-
var $
|
|
74
|
-
var $
|
|
75
|
-
var $
|
|
76
|
-
var $
|
|
77
|
-
var $
|
|
78
|
-
var $
|
|
79
|
-
var $
|
|
80
|
-
var $
|
|
81
|
-
var $
|
|
82
|
-
var $
|
|
83
|
-
var $
|
|
84
|
-
var $
|
|
85
|
-
var $
|
|
86
|
-
var $
|
|
87
|
-
var $
|
|
88
|
-
$
|
|
89
|
-
$
|
|
90
|
-
$
|
|
91
|
-
$
|
|
92
|
-
$
|
|
93
|
-
$
|
|
94
|
-
$
|
|
95
|
-
$
|
|
96
|
-
$
|
|
97
|
-
$
|
|
98
|
-
$
|
|
99
|
-
$
|
|
100
|
-
$
|
|
101
|
-
$
|
|
102
|
-
$
|
|
103
|
-
$
|
|
104
|
-
$
|
|
105
|
-
$
|
|
106
|
-
$
|
|
107
|
-
$
|
|
108
|
-
$
|
|
109
|
-
$
|
|
110
|
-
$
|
|
111
|
-
$
|
|
112
|
-
$
|
|
113
|
-
$
|
|
114
|
-
$
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
const $
|
|
119
|
-
function $
|
|
120
|
-
return $
|
|
23
|
+
var $81a52da995c19652$exports = {};
|
|
24
|
+
|
|
25
|
+
$parcel$export($81a52da995c19652$exports, "CardView", () => $81a52da995c19652$export$7e52c821f7b6f422);
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
var $408a78e5068502c2$exports = {};
|
|
33
|
+
|
|
34
|
+
$parcel$export($408a78e5068502c2$exports, "spectrum-Card", () => $408a78e5068502c2$export$4e5e9f191b1edb8, (v) => $408a78e5068502c2$export$4e5e9f191b1edb8 = v);
|
|
35
|
+
$parcel$export($408a78e5068502c2$exports, "spectrum-Card-heading", () => $408a78e5068502c2$export$92758a4a0e8d19e4, (v) => $408a78e5068502c2$export$92758a4a0e8d19e4 = v);
|
|
36
|
+
$parcel$export($408a78e5068502c2$exports, "spectrum-Card-checkboxWrapper", () => $408a78e5068502c2$export$33977546b63e0df9, (v) => $408a78e5068502c2$export$33977546b63e0df9 = v);
|
|
37
|
+
$parcel$export($408a78e5068502c2$exports, "spectrum-Card-checkbox", () => $408a78e5068502c2$export$842da5d48b8f6db2, (v) => $408a78e5068502c2$export$842da5d48b8f6db2 = v);
|
|
38
|
+
$parcel$export($408a78e5068502c2$exports, "is-selected", () => $408a78e5068502c2$export$1e0fb04f31d3c22a, (v) => $408a78e5068502c2$export$1e0fb04f31d3c22a = v);
|
|
39
|
+
$parcel$export($408a78e5068502c2$exports, "focus-ring", () => $408a78e5068502c2$export$f39a09f249340e2a, (v) => $408a78e5068502c2$export$f39a09f249340e2a = v);
|
|
40
|
+
$parcel$export($408a78e5068502c2$exports, "is-hovered", () => $408a78e5068502c2$export$b8813cd5d7824ce7, (v) => $408a78e5068502c2$export$b8813cd5d7824ce7 = v);
|
|
41
|
+
$parcel$export($408a78e5068502c2$exports, "spectrum-Card-grid", () => $408a78e5068502c2$export$b3dd760d2dfde29e, (v) => $408a78e5068502c2$export$b3dd760d2dfde29e = v);
|
|
42
|
+
$parcel$export($408a78e5068502c2$exports, "spectrum-Card-decoration", () => $408a78e5068502c2$export$48252dc130b62514, (v) => $408a78e5068502c2$export$48252dc130b62514 = v);
|
|
43
|
+
$parcel$export($408a78e5068502c2$exports, "spectrum-Card-image", () => $408a78e5068502c2$export$8d5fea71dc66db80, (v) => $408a78e5068502c2$export$8d5fea71dc66db80 = v);
|
|
44
|
+
$parcel$export($408a78e5068502c2$exports, "spectrum-Card-illustration", () => $408a78e5068502c2$export$13dd3510ae7a8399, (v) => $408a78e5068502c2$export$13dd3510ae7a8399 = v);
|
|
45
|
+
$parcel$export($408a78e5068502c2$exports, "spectrum-Card-avatar", () => $408a78e5068502c2$export$159930c59efb6273, (v) => $408a78e5068502c2$export$159930c59efb6273 = v);
|
|
46
|
+
$parcel$export($408a78e5068502c2$exports, "spectrum-Card-detail", () => $408a78e5068502c2$export$16715af38fbd9819, (v) => $408a78e5068502c2$export$16715af38fbd9819 = v);
|
|
47
|
+
$parcel$export($408a78e5068502c2$exports, "spectrum-Card-content", () => $408a78e5068502c2$export$d946625b97e8aa17, (v) => $408a78e5068502c2$export$d946625b97e8aa17 = v);
|
|
48
|
+
$parcel$export($408a78e5068502c2$exports, "spectrum-Card--waterfall", () => $408a78e5068502c2$export$d9c7209e0e4f7e4d, (v) => $408a78e5068502c2$export$d9c7209e0e4f7e4d = v);
|
|
49
|
+
$parcel$export($408a78e5068502c2$exports, "spectrum-Card--default", () => $408a78e5068502c2$export$c7a022df9e10a238, (v) => $408a78e5068502c2$export$c7a022df9e10a238 = v);
|
|
50
|
+
$parcel$export($408a78e5068502c2$exports, "spectrum-Card--noPreview", () => $408a78e5068502c2$export$b77922bc0320c9e4, (v) => $408a78e5068502c2$export$b77922bc0320c9e4 = v);
|
|
51
|
+
$parcel$export($408a78e5068502c2$exports, "spectrum-Card--grid", () => $408a78e5068502c2$export$59739ab951d2dcc7, (v) => $408a78e5068502c2$export$59739ab951d2dcc7 = v);
|
|
52
|
+
$parcel$export($408a78e5068502c2$exports, "spectrum-Card--noLayout", () => $408a78e5068502c2$export$a03d836e6ef3e749, (v) => $408a78e5068502c2$export$a03d836e6ef3e749 = v);
|
|
53
|
+
$parcel$export($408a78e5068502c2$exports, "spectrum-Card--isQuiet", () => $408a78e5068502c2$export$92ad04b5ac9296ea, (v) => $408a78e5068502c2$export$92ad04b5ac9296ea = v);
|
|
54
|
+
$parcel$export($408a78e5068502c2$exports, "spectrum-Card--gallery", () => $408a78e5068502c2$export$ccd8ffc36bd10cc, (v) => $408a78e5068502c2$export$ccd8ffc36bd10cc = v);
|
|
55
|
+
$parcel$export($408a78e5068502c2$exports, "spectrum-Card--horizontal", () => $408a78e5068502c2$export$1c52334407225704, (v) => $408a78e5068502c2$export$1c52334407225704 = v);
|
|
56
|
+
$parcel$export($408a78e5068502c2$exports, "is-focused", () => $408a78e5068502c2$export$e7dc768d35940237, (v) => $408a78e5068502c2$export$e7dc768d35940237 = v);
|
|
57
|
+
$parcel$export($408a78e5068502c2$exports, "spectrum-CardView", () => $408a78e5068502c2$export$2f34e9e3e0b89d95, (v) => $408a78e5068502c2$export$2f34e9e3e0b89d95 = v);
|
|
58
|
+
$parcel$export($408a78e5068502c2$exports, "spectrum-CardView-centeredWrapper", () => $408a78e5068502c2$export$7fc89689fcfab196, (v) => $408a78e5068502c2$export$7fc89689fcfab196 = v);
|
|
59
|
+
$parcel$export($408a78e5068502c2$exports, "spectrum-CardView-row", () => $408a78e5068502c2$export$4746ac09daa215ae, (v) => $408a78e5068502c2$export$4746ac09daa215ae = v);
|
|
60
|
+
$parcel$export($408a78e5068502c2$exports, "is-drop-target", () => $408a78e5068502c2$export$d8467f38d2d00bd0, (v) => $408a78e5068502c2$export$d8467f38d2d00bd0 = v);
|
|
61
|
+
var $408a78e5068502c2$export$4e5e9f191b1edb8;
|
|
62
|
+
var $408a78e5068502c2$export$92758a4a0e8d19e4;
|
|
63
|
+
var $408a78e5068502c2$export$33977546b63e0df9;
|
|
64
|
+
var $408a78e5068502c2$export$842da5d48b8f6db2;
|
|
65
|
+
var $408a78e5068502c2$export$1e0fb04f31d3c22a;
|
|
66
|
+
var $408a78e5068502c2$export$f39a09f249340e2a;
|
|
67
|
+
var $408a78e5068502c2$export$b8813cd5d7824ce7;
|
|
68
|
+
var $408a78e5068502c2$export$b3dd760d2dfde29e;
|
|
69
|
+
var $408a78e5068502c2$export$48252dc130b62514;
|
|
70
|
+
var $408a78e5068502c2$export$8d5fea71dc66db80;
|
|
71
|
+
var $408a78e5068502c2$export$13dd3510ae7a8399;
|
|
72
|
+
var $408a78e5068502c2$export$159930c59efb6273;
|
|
73
|
+
var $408a78e5068502c2$export$16715af38fbd9819;
|
|
74
|
+
var $408a78e5068502c2$export$d946625b97e8aa17;
|
|
75
|
+
var $408a78e5068502c2$export$d9c7209e0e4f7e4d;
|
|
76
|
+
var $408a78e5068502c2$export$c7a022df9e10a238;
|
|
77
|
+
var $408a78e5068502c2$export$b77922bc0320c9e4;
|
|
78
|
+
var $408a78e5068502c2$export$59739ab951d2dcc7;
|
|
79
|
+
var $408a78e5068502c2$export$a03d836e6ef3e749;
|
|
80
|
+
var $408a78e5068502c2$export$92ad04b5ac9296ea;
|
|
81
|
+
var $408a78e5068502c2$export$ccd8ffc36bd10cc;
|
|
82
|
+
var $408a78e5068502c2$export$1c52334407225704;
|
|
83
|
+
var $408a78e5068502c2$export$e7dc768d35940237;
|
|
84
|
+
var $408a78e5068502c2$export$2f34e9e3e0b89d95;
|
|
85
|
+
var $408a78e5068502c2$export$7fc89689fcfab196;
|
|
86
|
+
var $408a78e5068502c2$export$4746ac09daa215ae;
|
|
87
|
+
var $408a78e5068502c2$export$d8467f38d2d00bd0;
|
|
88
|
+
$408a78e5068502c2$export$4e5e9f191b1edb8 = "spectrum-Card_6fdf9f";
|
|
89
|
+
$408a78e5068502c2$export$92758a4a0e8d19e4 = "spectrum-Card-heading_6fdf9f";
|
|
90
|
+
$408a78e5068502c2$export$33977546b63e0df9 = "spectrum-Card-checkboxWrapper_6fdf9f";
|
|
91
|
+
$408a78e5068502c2$export$842da5d48b8f6db2 = "spectrum-Card-checkbox_6fdf9f";
|
|
92
|
+
$408a78e5068502c2$export$1e0fb04f31d3c22a = "is-selected_6fdf9f";
|
|
93
|
+
$408a78e5068502c2$export$f39a09f249340e2a = "focus-ring_6fdf9f";
|
|
94
|
+
$408a78e5068502c2$export$b8813cd5d7824ce7 = "is-hovered_6fdf9f";
|
|
95
|
+
$408a78e5068502c2$export$b3dd760d2dfde29e = "spectrum-Card-grid_6fdf9f";
|
|
96
|
+
$408a78e5068502c2$export$48252dc130b62514 = "spectrum-Card-decoration_6fdf9f";
|
|
97
|
+
$408a78e5068502c2$export$8d5fea71dc66db80 = "spectrum-Card-image_6fdf9f";
|
|
98
|
+
$408a78e5068502c2$export$13dd3510ae7a8399 = "spectrum-Card-illustration_6fdf9f";
|
|
99
|
+
$408a78e5068502c2$export$159930c59efb6273 = "spectrum-Card-avatar_6fdf9f";
|
|
100
|
+
$408a78e5068502c2$export$16715af38fbd9819 = "spectrum-Card-detail_6fdf9f";
|
|
101
|
+
$408a78e5068502c2$export$d946625b97e8aa17 = "spectrum-Card-content_6fdf9f";
|
|
102
|
+
$408a78e5068502c2$export$d9c7209e0e4f7e4d = "spectrum-Card--waterfall_6fdf9f";
|
|
103
|
+
$408a78e5068502c2$export$c7a022df9e10a238 = "spectrum-Card--default_6fdf9f";
|
|
104
|
+
$408a78e5068502c2$export$b77922bc0320c9e4 = "spectrum-Card--noPreview_6fdf9f";
|
|
105
|
+
$408a78e5068502c2$export$59739ab951d2dcc7 = "spectrum-Card--grid_6fdf9f";
|
|
106
|
+
$408a78e5068502c2$export$a03d836e6ef3e749 = "spectrum-Card--noLayout_6fdf9f";
|
|
107
|
+
$408a78e5068502c2$export$92ad04b5ac9296ea = "spectrum-Card--isQuiet_6fdf9f";
|
|
108
|
+
$408a78e5068502c2$export$ccd8ffc36bd10cc = "spectrum-Card--gallery_6fdf9f";
|
|
109
|
+
$408a78e5068502c2$export$1c52334407225704 = "spectrum-Card--horizontal_6fdf9f";
|
|
110
|
+
$408a78e5068502c2$export$e7dc768d35940237 = "is-focused_6fdf9f";
|
|
111
|
+
$408a78e5068502c2$export$2f34e9e3e0b89d95 = "spectrum-CardView_6fdf9f";
|
|
112
|
+
$408a78e5068502c2$export$7fc89689fcfab196 = "spectrum-CardView-centeredWrapper_6fdf9f";
|
|
113
|
+
$408a78e5068502c2$export$4746ac09daa215ae = "spectrum-CardView-row_6fdf9f";
|
|
114
|
+
$408a78e5068502c2$export$d8467f38d2d00bd0 = "is-drop-target_6fdf9f";
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
const $8d180a244893de14$export$64992ac69f286e5c = /*#__PURE__*/ $8EWFi$react.createContext(null);
|
|
119
|
+
function $8d180a244893de14$export$fea0b38586ec8f13() {
|
|
120
|
+
return $8EWFi$useContext($8d180a244893de14$export$64992ac69f286e5c);
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
|
|
124
124
|
|
|
125
125
|
|
|
126
|
-
function $
|
|
127
|
-
props = $
|
|
128
|
-
let context = $
|
|
126
|
+
function $643dd8fa80926f94$var$CardBase(props, ref) {
|
|
127
|
+
props = $8EWFi$useProviderProps(props);
|
|
128
|
+
let context = $8d180a244893de14$export$fea0b38586ec8f13() || {
|
|
129
129
|
}; // we can call again here, won't change from Card.tsx
|
|
130
130
|
let { state: state } = context;
|
|
131
131
|
let manager = state === null || state === void 0 ? void 0 : state.selectionManager;
|
|
@@ -137,27 +137,27 @@ function $2f067b98508c243e$var$CardBase(props, ref) {
|
|
|
137
137
|
let onChange = ()=>{
|
|
138
138
|
return manager === null || manager === void 0 ? void 0 : manager.select(key);
|
|
139
139
|
};
|
|
140
|
-
let { styleProps: styleProps } = $
|
|
141
|
-
let { cardProps: cardProps , titleProps: titleProps , contentProps: contentProps } = $
|
|
142
|
-
let domRef = $
|
|
143
|
-
let gridRef = $
|
|
144
|
-
let checkboxRef = $
|
|
140
|
+
let { styleProps: styleProps } = $8EWFi$useStyleProps(props);
|
|
141
|
+
let { cardProps: cardProps , titleProps: titleProps , contentProps: contentProps } = $643dd8fa80926f94$var$useCard(props);
|
|
142
|
+
let domRef = $8EWFi$useDOMRef(ref);
|
|
143
|
+
let gridRef = $8EWFi$useRef();
|
|
144
|
+
let checkboxRef = $8EWFi$useRef(null);
|
|
145
145
|
// cards are only interactive if there is a selection manager and it allows selection
|
|
146
|
-
let { hoverProps: hoverProps , isHovered: isHovered } = $
|
|
146
|
+
let { hoverProps: hoverProps , isHovered: isHovered } = $8EWFi$useHover({
|
|
147
147
|
isDisabled: manager === undefined || (manager === null || manager === void 0 ? void 0 : manager.selectionMode) === 'none' || isDisabled
|
|
148
148
|
});
|
|
149
|
-
let [isFocused, setIsFocused] = $
|
|
150
|
-
let { focusWithinProps: focusWithinProps } = $
|
|
149
|
+
let [isFocused, setIsFocused] = $8EWFi$useState(false);
|
|
150
|
+
let { focusWithinProps: focusWithinProps } = $8EWFi$useFocusWithin({
|
|
151
151
|
onFocusWithinChange: setIsFocused,
|
|
152
152
|
isDisabled: isDisabled
|
|
153
153
|
});
|
|
154
154
|
// ToDo: see css for comment about avatar under selector .spectrum-Card--noLayout.spectrum-Card--default
|
|
155
|
-
let hasPreviewImage = $
|
|
156
|
-
let hasPreviewIllustration = $
|
|
155
|
+
let hasPreviewImage = $8EWFi$useHasChild(`.${(/*@__PURE__*/$parcel$interopDefault($408a78e5068502c2$exports))['spectrum-Card-image']}`, gridRef);
|
|
156
|
+
let hasPreviewIllustration = $8EWFi$useHasChild(`.${(/*@__PURE__*/$parcel$interopDefault($408a78e5068502c2$exports))['spectrum-Card-illustration']}`, gridRef);
|
|
157
157
|
let hasPreview = hasPreviewImage || hasPreviewIllustration;
|
|
158
158
|
// this is for horizontal cards
|
|
159
|
-
let [height, setHeight] = $
|
|
160
|
-
let updateHeight = $
|
|
159
|
+
let [height, setHeight] = $8EWFi$useState(NaN);
|
|
160
|
+
let updateHeight = $8EWFi$useCallback(()=>{
|
|
161
161
|
if (orientation !== 'horizontal') return;
|
|
162
162
|
let cardHeight = gridRef.current.getBoundingClientRect().height;
|
|
163
163
|
setHeight(cardHeight);
|
|
@@ -166,7 +166,7 @@ function $2f067b98508c243e$var$CardBase(props, ref) {
|
|
|
166
166
|
gridRef,
|
|
167
167
|
setHeight
|
|
168
168
|
]);
|
|
169
|
-
$
|
|
169
|
+
$8EWFi$useResizeObserver({
|
|
170
170
|
ref: gridRef,
|
|
171
171
|
onResize: updateHeight
|
|
172
172
|
});
|
|
@@ -175,31 +175,31 @@ function $2f067b98508c243e$var$CardBase(props, ref) {
|
|
|
175
175
|
height: `${height}px`,
|
|
176
176
|
width: `${height}px`
|
|
177
177
|
};
|
|
178
|
-
let slots = $
|
|
178
|
+
let slots = $8EWFi$useMemo(()=>({
|
|
179
179
|
image: {
|
|
180
|
-
UNSAFE_className: $
|
|
180
|
+
UNSAFE_className: $8EWFi$classNames((/*@__PURE__*/$parcel$interopDefault($408a78e5068502c2$exports)), 'spectrum-Card-image'),
|
|
181
181
|
objectFit: orientation === 'horizontal' ? 'cover' : 'contain',
|
|
182
182
|
alt: '',
|
|
183
183
|
...aspectRatioEnforce
|
|
184
184
|
},
|
|
185
185
|
illustration: {
|
|
186
|
-
UNSAFE_className: $
|
|
186
|
+
UNSAFE_className: $8EWFi$classNames((/*@__PURE__*/$parcel$interopDefault($408a78e5068502c2$exports)), 'spectrum-Card-illustration'),
|
|
187
187
|
...aspectRatioEnforce
|
|
188
188
|
},
|
|
189
189
|
avatar: {
|
|
190
|
-
UNSAFE_className: $
|
|
190
|
+
UNSAFE_className: $8EWFi$classNames((/*@__PURE__*/$parcel$interopDefault($408a78e5068502c2$exports)), 'spectrum-Card-avatar'),
|
|
191
191
|
size: 'avatar-size-400'
|
|
192
192
|
},
|
|
193
193
|
heading: {
|
|
194
|
-
UNSAFE_className: $
|
|
194
|
+
UNSAFE_className: $8EWFi$classNames((/*@__PURE__*/$parcel$interopDefault($408a78e5068502c2$exports)), 'spectrum-Card-heading'),
|
|
195
195
|
...titleProps
|
|
196
196
|
},
|
|
197
197
|
content: {
|
|
198
|
-
UNSAFE_className: $
|
|
198
|
+
UNSAFE_className: $8EWFi$classNames((/*@__PURE__*/$parcel$interopDefault($408a78e5068502c2$exports)), 'spectrum-Card-content'),
|
|
199
199
|
...contentProps
|
|
200
200
|
},
|
|
201
201
|
detail: {
|
|
202
|
-
UNSAFE_className: $
|
|
202
|
+
UNSAFE_className: $8EWFi$classNames((/*@__PURE__*/$parcel$interopDefault($408a78e5068502c2$exports)), 'spectrum-Card-detail')
|
|
203
203
|
}
|
|
204
204
|
})
|
|
205
205
|
, [
|
|
@@ -209,9 +209,9 @@ function $2f067b98508c243e$var$CardBase(props, ref) {
|
|
|
209
209
|
isQuiet,
|
|
210
210
|
orientation
|
|
211
211
|
]);
|
|
212
|
-
$
|
|
212
|
+
$8EWFi$useLayoutEffect(()=>{
|
|
213
213
|
if (gridRef === null || gridRef === void 0 ? void 0 : gridRef.current) {
|
|
214
|
-
let walker = $
|
|
214
|
+
let walker = $8EWFi$getFocusableTreeWalker(gridRef.current);
|
|
215
215
|
let nextNode = walker.nextNode();
|
|
216
216
|
while(nextNode != null){
|
|
217
217
|
if (checkboxRef.current && !checkboxRef.current.UNSAFE_getDOMNode().contains(nextNode)) {
|
|
@@ -224,13 +224,13 @@ function $2f067b98508c243e$var$CardBase(props, ref) {
|
|
|
224
224
|
}, [
|
|
225
225
|
children
|
|
226
226
|
]);
|
|
227
|
-
return(/*#__PURE__*/ $
|
|
228
|
-
focusRingClass: $
|
|
229
|
-
}, /*#__PURE__*/ $
|
|
227
|
+
return(/*#__PURE__*/ $8EWFi$react.createElement($8EWFi$FocusRing, {
|
|
228
|
+
focusRingClass: $8EWFi$classNames((/*@__PURE__*/$parcel$interopDefault($408a78e5068502c2$exports)), 'focus-ring')
|
|
229
|
+
}, /*#__PURE__*/ $8EWFi$react.createElement("article", {
|
|
230
230
|
...styleProps,
|
|
231
|
-
...$
|
|
231
|
+
...$8EWFi$mergeProps(cardProps, focusWithinProps, hoverProps, $8EWFi$filterDOMProps(props), articleProps),
|
|
232
232
|
ref: domRef,
|
|
233
|
-
className: $
|
|
233
|
+
className: $8EWFi$classNames((/*@__PURE__*/$parcel$interopDefault($408a78e5068502c2$exports)), 'spectrum-Card', {
|
|
234
234
|
'spectrum-Card--default': !isQuiet && orientation !== 'horizontal',
|
|
235
235
|
'spectrum-Card--isQuiet': isQuiet && orientation !== 'horizontal',
|
|
236
236
|
'spectrum-Card--horizontal': orientation === 'horizontal',
|
|
@@ -243,36 +243,36 @@ function $2f067b98508c243e$var$CardBase(props, ref) {
|
|
|
243
243
|
'spectrum-Card--grid': layout === 'grid',
|
|
244
244
|
'spectrum-Card--noLayout': layout !== 'waterfall' && layout !== 'gallery' && layout !== 'grid'
|
|
245
245
|
}, styleProps.className)
|
|
246
|
-
}, /*#__PURE__*/ $
|
|
246
|
+
}, /*#__PURE__*/ $8EWFi$react.createElement("div", {
|
|
247
247
|
ref: gridRef,
|
|
248
|
-
className: $
|
|
249
|
-
}, manager && manager.selectionMode !== 'none' && /*#__PURE__*/ $
|
|
250
|
-
className: $
|
|
251
|
-
}, /*#__PURE__*/ $
|
|
248
|
+
className: $8EWFi$classNames((/*@__PURE__*/$parcel$interopDefault($408a78e5068502c2$exports)), 'spectrum-Card-grid')
|
|
249
|
+
}, manager && manager.selectionMode !== 'none' && /*#__PURE__*/ $8EWFi$react.createElement("div", {
|
|
250
|
+
className: $8EWFi$classNames((/*@__PURE__*/$parcel$interopDefault($408a78e5068502c2$exports)), 'spectrum-Card-checkboxWrapper')
|
|
251
|
+
}, /*#__PURE__*/ $8EWFi$react.createElement($8EWFi$Checkbox, {
|
|
252
252
|
ref: checkboxRef,
|
|
253
253
|
isDisabled: isDisabled,
|
|
254
254
|
excludeFromTabOrder: true,
|
|
255
255
|
isSelected: isSelected,
|
|
256
256
|
onChange: onChange,
|
|
257
|
-
UNSAFE_className: $
|
|
257
|
+
UNSAFE_className: $8EWFi$classNames((/*@__PURE__*/$parcel$interopDefault($408a78e5068502c2$exports)), 'spectrum-Card-checkbox'),
|
|
258
258
|
isEmphasized: true,
|
|
259
259
|
"aria-label": "select"
|
|
260
|
-
})), /*#__PURE__*/ $
|
|
260
|
+
})), /*#__PURE__*/ $8EWFi$react.createElement($8EWFi$SlotProvider, {
|
|
261
261
|
slots: slots
|
|
262
|
-
}, children), /*#__PURE__*/ $
|
|
263
|
-
className: $
|
|
262
|
+
}, children), /*#__PURE__*/ $8EWFi$react.createElement("div", {
|
|
263
|
+
className: $8EWFi$classNames((/*@__PURE__*/$parcel$interopDefault($408a78e5068502c2$exports)), 'spectrum-Card-decoration')
|
|
264
264
|
})))));
|
|
265
265
|
}
|
|
266
|
-
function $
|
|
267
|
-
let titleId = $
|
|
268
|
-
let descriptionId = $
|
|
269
|
-
let titleProps = $
|
|
266
|
+
function $643dd8fa80926f94$var$useCard(props) {
|
|
267
|
+
let titleId = $8EWFi$useSlotId();
|
|
268
|
+
let descriptionId = $8EWFi$useSlotId();
|
|
269
|
+
let titleProps = $8EWFi$useMemo(()=>({
|
|
270
270
|
id: titleId
|
|
271
271
|
})
|
|
272
272
|
, [
|
|
273
273
|
titleId
|
|
274
274
|
]);
|
|
275
|
-
let contentProps = $
|
|
275
|
+
let contentProps = $8EWFi$useMemo(()=>({
|
|
276
276
|
id: descriptionId
|
|
277
277
|
})
|
|
278
278
|
, [
|
|
@@ -280,7 +280,7 @@ function $2f067b98508c243e$var$useCard(props) {
|
|
|
280
280
|
]);
|
|
281
281
|
return {
|
|
282
282
|
cardProps: {
|
|
283
|
-
...$
|
|
283
|
+
...$8EWFi$filterDOMProps(props),
|
|
284
284
|
'aria-labelledby': titleId,
|
|
285
285
|
'aria-describedby': descriptionId,
|
|
286
286
|
tabIndex: 0
|
|
@@ -291,184 +291,184 @@ function $2f067b98508c243e$var$useCard(props) {
|
|
|
291
291
|
}
|
|
292
292
|
/**
|
|
293
293
|
* TODO: Add description of component here.
|
|
294
|
-
*/ const $
|
|
294
|
+
*/ const $643dd8fa80926f94$export$7a6ccaf429ad93a8 = /*#__PURE__*/ $8EWFi$react.forwardRef($643dd8fa80926f94$var$CardBase);
|
|
295
295
|
|
|
296
296
|
|
|
297
297
|
|
|
298
298
|
|
|
299
299
|
|
|
300
|
-
var $
|
|
301
|
-
var $
|
|
302
|
-
$
|
|
300
|
+
var $e24fb79fb8b63230$exports = {};
|
|
301
|
+
var $6cb102354c06de53$exports = {};
|
|
302
|
+
$6cb102354c06de53$exports = JSON.parse("{\"loading\":\"جارٍ التحميل...\",\"loadingMore\":\"جارٍ تحميل المزيد...\"}");
|
|
303
303
|
|
|
304
304
|
|
|
305
|
-
var $
|
|
306
|
-
$
|
|
305
|
+
var $17b8c838d83f13fc$exports = {};
|
|
306
|
+
$17b8c838d83f13fc$exports = JSON.parse("{\"loading\":\"Зареждане...\",\"loadingMore\":\"Зареждане на още...\"}");
|
|
307
307
|
|
|
308
308
|
|
|
309
|
-
var $
|
|
310
|
-
$
|
|
309
|
+
var $1ddb4e1a3e8b15a5$exports = {};
|
|
310
|
+
$1ddb4e1a3e8b15a5$exports = JSON.parse("{\"loading\":\"Načítání...\",\"loadingMore\":\"Načítání dalších...\"}");
|
|
311
311
|
|
|
312
312
|
|
|
313
|
-
var $
|
|
314
|
-
$
|
|
313
|
+
var $44b7f17cd1f1db7f$exports = {};
|
|
314
|
+
$44b7f17cd1f1db7f$exports = JSON.parse("{\"loading\":\"Indlæser ...\",\"loadingMore\":\"Indlæser flere ...\"}");
|
|
315
315
|
|
|
316
316
|
|
|
317
|
-
var $
|
|
318
|
-
$
|
|
317
|
+
var $ffa85bef2c730318$exports = {};
|
|
318
|
+
$ffa85bef2c730318$exports = JSON.parse("{\"loading\":\"Laden...\",\"loadingMore\":\"Mehr laden ...\"}");
|
|
319
319
|
|
|
320
320
|
|
|
321
|
-
var $
|
|
322
|
-
$
|
|
321
|
+
var $1904be2ca25ad4ef$exports = {};
|
|
322
|
+
$1904be2ca25ad4ef$exports = JSON.parse("{\"loading\":\"Φόρτωση...\",\"loadingMore\":\"Φόρτωση περισσότερων...\"}");
|
|
323
323
|
|
|
324
324
|
|
|
325
|
-
var $
|
|
326
|
-
$
|
|
325
|
+
var $d120e7d3833466fb$exports = {};
|
|
326
|
+
$d120e7d3833466fb$exports = JSON.parse("{\"loading\":\"Loading…\",\"loadingMore\":\"Loading more…\"}");
|
|
327
327
|
|
|
328
328
|
|
|
329
|
-
var $
|
|
330
|
-
$
|
|
329
|
+
var $fe39ef3292597d11$exports = {};
|
|
330
|
+
$fe39ef3292597d11$exports = JSON.parse("{\"loading\":\"Cargando…\",\"loadingMore\":\"Cargando más…\"}");
|
|
331
331
|
|
|
332
332
|
|
|
333
|
-
var $
|
|
334
|
-
$
|
|
333
|
+
var $3204c020860ca192$exports = {};
|
|
334
|
+
$3204c020860ca192$exports = JSON.parse("{\"loading\":\"Laadimine...\",\"loadingMore\":\"Laadi rohkem...\"}");
|
|
335
335
|
|
|
336
336
|
|
|
337
|
-
var $
|
|
338
|
-
$
|
|
337
|
+
var $5ced2ee930f1d61a$exports = {};
|
|
338
|
+
$5ced2ee930f1d61a$exports = JSON.parse("{\"loading\":\"Ladataan…\",\"loadingMore\":\"Ladataan lisää…\"}");
|
|
339
339
|
|
|
340
340
|
|
|
341
|
-
var $
|
|
342
|
-
$
|
|
341
|
+
var $bd751114db2e8872$exports = {};
|
|
342
|
+
$bd751114db2e8872$exports = JSON.parse("{\"loading\":\"Chargement...\",\"loadingMore\":\"Chargement supplémentaire...\"}");
|
|
343
343
|
|
|
344
344
|
|
|
345
|
-
var $
|
|
346
|
-
$
|
|
345
|
+
var $6291b4a5eb5146c5$exports = {};
|
|
346
|
+
$6291b4a5eb5146c5$exports = JSON.parse("{\"loading\":\"טוען...\",\"loadingMore\":\"טוען עוד...\"}");
|
|
347
347
|
|
|
348
348
|
|
|
349
|
-
var $
|
|
350
|
-
$
|
|
349
|
+
var $cdc3f7b2aa8b1879$exports = {};
|
|
350
|
+
$cdc3f7b2aa8b1879$exports = JSON.parse("{\"loading\":\"Učitavam...\",\"loadingMore\":\"Učitavam još...\"}");
|
|
351
351
|
|
|
352
352
|
|
|
353
|
-
var $
|
|
354
|
-
$
|
|
353
|
+
var $1a69968dcbcabdff$exports = {};
|
|
354
|
+
$1a69968dcbcabdff$exports = JSON.parse("{\"loading\":\"Betöltés folyamatban…\",\"loadingMore\":\"Továbbiak betöltése folyamatban…\"}");
|
|
355
355
|
|
|
356
356
|
|
|
357
|
-
var $
|
|
358
|
-
$
|
|
357
|
+
var $fe72420090e5e44f$exports = {};
|
|
358
|
+
$fe72420090e5e44f$exports = JSON.parse("{\"loading\":\"Caricamento...\",\"loadingMore\":\"Caricamento altri...\"}");
|
|
359
359
|
|
|
360
360
|
|
|
361
|
-
var $
|
|
362
|
-
$
|
|
361
|
+
var $8643fac062a08b30$exports = {};
|
|
362
|
+
$8643fac062a08b30$exports = JSON.parse("{\"loading\":\"読み込み中...\",\"loadingMore\":\"さらに読み込み中...\"}");
|
|
363
363
|
|
|
364
364
|
|
|
365
|
-
var $
|
|
366
|
-
$
|
|
365
|
+
var $41f4de1d2f63c8f4$exports = {};
|
|
366
|
+
$41f4de1d2f63c8f4$exports = JSON.parse("{\"loading\":\"로드 중\",\"loadingMore\":\"추가 로드 중\"}");
|
|
367
367
|
|
|
368
368
|
|
|
369
|
-
var $
|
|
370
|
-
$
|
|
369
|
+
var $9819c3a9877418b0$exports = {};
|
|
370
|
+
$9819c3a9877418b0$exports = JSON.parse("{\"loading\":\"Įkeliama...\",\"loadingMore\":\"Įkeliama daugiau...\"}");
|
|
371
371
|
|
|
372
372
|
|
|
373
|
-
var $
|
|
374
|
-
$
|
|
373
|
+
var $3e8ad6b78b8cc064$exports = {};
|
|
374
|
+
$3e8ad6b78b8cc064$exports = JSON.parse("{\"loading\":\"Notiek ielāde...\",\"loadingMore\":\"Tiek ielādēts vēl...\"}");
|
|
375
375
|
|
|
376
376
|
|
|
377
|
-
var $
|
|
378
|
-
$
|
|
377
|
+
var $baa4fb210e65a6c5$exports = {};
|
|
378
|
+
$baa4fb210e65a6c5$exports = JSON.parse("{\"loading\":\"Laster inn ...\",\"loadingMore\":\"Laster inn flere ...\"}");
|
|
379
379
|
|
|
380
380
|
|
|
381
|
-
var $
|
|
382
|
-
$
|
|
381
|
+
var $ee123eda5b089b7d$exports = {};
|
|
382
|
+
$ee123eda5b089b7d$exports = JSON.parse("{\"loading\":\"Laden...\",\"loadingMore\":\"Meer laden...\"}");
|
|
383
383
|
|
|
384
384
|
|
|
385
|
-
var $
|
|
386
|
-
$
|
|
385
|
+
var $36a325cd1c9e414f$exports = {};
|
|
386
|
+
$36a325cd1c9e414f$exports = JSON.parse("{\"loading\":\"Ładowanie...\",\"loadingMore\":\"Wczytywanie większej liczby...\"}");
|
|
387
387
|
|
|
388
388
|
|
|
389
|
-
var $
|
|
390
|
-
$
|
|
389
|
+
var $52d4fd0f211d7e51$exports = {};
|
|
390
|
+
$52d4fd0f211d7e51$exports = JSON.parse("{\"loading\":\"Carregando...\",\"loadingMore\":\"Carregando mais...\"}");
|
|
391
391
|
|
|
392
392
|
|
|
393
|
-
var $
|
|
394
|
-
$
|
|
393
|
+
var $ad1f55e36e4e9241$exports = {};
|
|
394
|
+
$ad1f55e36e4e9241$exports = JSON.parse("{\"loading\":\"A carregar...\",\"loadingMore\":\"A carregar mais...\"}");
|
|
395
395
|
|
|
396
396
|
|
|
397
|
-
var $
|
|
398
|
-
$
|
|
397
|
+
var $bfc201ee55c5f26f$exports = {};
|
|
398
|
+
$bfc201ee55c5f26f$exports = JSON.parse("{\"loading\":\"Se încarcă...\",\"loadingMore\":\"Se încarcă mai multe...\"}");
|
|
399
399
|
|
|
400
400
|
|
|
401
|
-
var $
|
|
402
|
-
$
|
|
401
|
+
var $5773113377d944b4$exports = {};
|
|
402
|
+
$5773113377d944b4$exports = JSON.parse("{\"loading\":\"Загрузка...\",\"loadingMore\":\"Дополнительная загрузка...\"}");
|
|
403
403
|
|
|
404
404
|
|
|
405
|
-
var $
|
|
406
|
-
$
|
|
405
|
+
var $75167f0b339049be$exports = {};
|
|
406
|
+
$75167f0b339049be$exports = JSON.parse("{\"loading\":\"Načítava sa...\",\"loadingMore\":\"Načítava sa viac...\"}");
|
|
407
407
|
|
|
408
408
|
|
|
409
|
-
var $
|
|
410
|
-
$
|
|
409
|
+
var $83a887ec3d5f2028$exports = {};
|
|
410
|
+
$83a887ec3d5f2028$exports = JSON.parse("{\"loading\":\"Nalaganje...\",\"loadingMore\":\"Nalaganje več vsebine...\"}");
|
|
411
411
|
|
|
412
412
|
|
|
413
|
-
var $
|
|
414
|
-
$
|
|
413
|
+
var $8352707b2eadbfb4$exports = {};
|
|
414
|
+
$8352707b2eadbfb4$exports = JSON.parse("{\"loading\":\"Učitavam...\",\"loadingMore\":\"Učitavam još...\"}");
|
|
415
415
|
|
|
416
416
|
|
|
417
|
-
var $
|
|
418
|
-
$
|
|
417
|
+
var $212352f469058747$exports = {};
|
|
418
|
+
$212352f469058747$exports = JSON.parse("{\"loading\":\"Läser in...\",\"loadingMore\":\"Läser in mer...\"}");
|
|
419
419
|
|
|
420
420
|
|
|
421
|
-
var $
|
|
422
|
-
$
|
|
421
|
+
var $334510787f8a69f9$exports = {};
|
|
422
|
+
$334510787f8a69f9$exports = JSON.parse("{\"loading\":\"Yükleniyor...\",\"loadingMore\":\"Daha fazla yükleniyor...\"}");
|
|
423
423
|
|
|
424
424
|
|
|
425
|
-
var $
|
|
426
|
-
$
|
|
425
|
+
var $1b8fd2890c177825$exports = {};
|
|
426
|
+
$1b8fd2890c177825$exports = JSON.parse("{\"loading\":\"Завантаження…\",\"loadingMore\":\"Завантаження інших об’єктів...\"}");
|
|
427
427
|
|
|
428
428
|
|
|
429
|
-
var $
|
|
430
|
-
$
|
|
429
|
+
var $88c83d794a7a062b$exports = {};
|
|
430
|
+
$88c83d794a7a062b$exports = JSON.parse("{\"loading\":\"正在加载...\",\"loadingMore\":\"正在加载更多...\"}");
|
|
431
431
|
|
|
432
432
|
|
|
433
|
-
var $
|
|
434
|
-
$
|
|
433
|
+
var $b7e2865acb74a940$exports = {};
|
|
434
|
+
$b7e2865acb74a940$exports = JSON.parse("{\"loading\":\"正在載入\",\"loadingMore\":\"正在載入更多…\"}");
|
|
435
435
|
|
|
436
436
|
|
|
437
|
-
$
|
|
438
|
-
"ar-AE": $
|
|
439
|
-
"bg-BG": $
|
|
440
|
-
"cs-CZ": $
|
|
441
|
-
"da-DK": $
|
|
442
|
-
"de-DE": $
|
|
443
|
-
"el-GR": $
|
|
444
|
-
"en-US": $
|
|
445
|
-
"es-ES": $
|
|
446
|
-
"et-EE": $
|
|
447
|
-
"fi-FI": $
|
|
448
|
-
"fr-FR": $
|
|
449
|
-
"he-IL": $
|
|
450
|
-
"hr-HR": $
|
|
451
|
-
"hu-HU": $
|
|
452
|
-
"it-IT": $
|
|
453
|
-
"ja-JP": $
|
|
454
|
-
"ko-KR": $
|
|
455
|
-
"lt-LT": $
|
|
456
|
-
"lv-LV": $
|
|
457
|
-
"nb-NO": $
|
|
458
|
-
"nl-NL": $
|
|
459
|
-
"pl-PL": $
|
|
460
|
-
"pt-BR": $
|
|
461
|
-
"pt-PT": $
|
|
462
|
-
"ro-RO": $
|
|
463
|
-
"ru-RU": $
|
|
464
|
-
"sk-SK": $
|
|
465
|
-
"sl-SI": $
|
|
466
|
-
"sr-SP": $
|
|
467
|
-
"sv-SE": $
|
|
468
|
-
"tr-TR": $
|
|
469
|
-
"uk-UA": $
|
|
470
|
-
"zh-CN": $
|
|
471
|
-
"zh-TW": $
|
|
437
|
+
$e24fb79fb8b63230$exports = {
|
|
438
|
+
"ar-AE": $6cb102354c06de53$exports,
|
|
439
|
+
"bg-BG": $17b8c838d83f13fc$exports,
|
|
440
|
+
"cs-CZ": $1ddb4e1a3e8b15a5$exports,
|
|
441
|
+
"da-DK": $44b7f17cd1f1db7f$exports,
|
|
442
|
+
"de-DE": $ffa85bef2c730318$exports,
|
|
443
|
+
"el-GR": $1904be2ca25ad4ef$exports,
|
|
444
|
+
"en-US": $d120e7d3833466fb$exports,
|
|
445
|
+
"es-ES": $fe39ef3292597d11$exports,
|
|
446
|
+
"et-EE": $3204c020860ca192$exports,
|
|
447
|
+
"fi-FI": $5ced2ee930f1d61a$exports,
|
|
448
|
+
"fr-FR": $bd751114db2e8872$exports,
|
|
449
|
+
"he-IL": $6291b4a5eb5146c5$exports,
|
|
450
|
+
"hr-HR": $cdc3f7b2aa8b1879$exports,
|
|
451
|
+
"hu-HU": $1a69968dcbcabdff$exports,
|
|
452
|
+
"it-IT": $fe72420090e5e44f$exports,
|
|
453
|
+
"ja-JP": $8643fac062a08b30$exports,
|
|
454
|
+
"ko-KR": $41f4de1d2f63c8f4$exports,
|
|
455
|
+
"lt-LT": $9819c3a9877418b0$exports,
|
|
456
|
+
"lv-LV": $3e8ad6b78b8cc064$exports,
|
|
457
|
+
"nb-NO": $baa4fb210e65a6c5$exports,
|
|
458
|
+
"nl-NL": $ee123eda5b089b7d$exports,
|
|
459
|
+
"pl-PL": $36a325cd1c9e414f$exports,
|
|
460
|
+
"pt-BR": $52d4fd0f211d7e51$exports,
|
|
461
|
+
"pt-PT": $ad1f55e36e4e9241$exports,
|
|
462
|
+
"ro-RO": $bfc201ee55c5f26f$exports,
|
|
463
|
+
"ru-RU": $5773113377d944b4$exports,
|
|
464
|
+
"sk-SK": $75167f0b339049be$exports,
|
|
465
|
+
"sl-SI": $83a887ec3d5f2028$exports,
|
|
466
|
+
"sr-SP": $8352707b2eadbfb4$exports,
|
|
467
|
+
"sv-SE": $212352f469058747$exports,
|
|
468
|
+
"tr-TR": $334510787f8a69f9$exports,
|
|
469
|
+
"uk-UA": $1b8fd2890c177825$exports,
|
|
470
|
+
"zh-CN": $88c83d794a7a062b$exports,
|
|
471
|
+
"zh-TW": $b7e2865acb74a940$exports
|
|
472
472
|
};
|
|
473
473
|
|
|
474
474
|
|
|
@@ -480,17 +480,17 @@ $236ecb032f346896$exports = {
|
|
|
480
480
|
|
|
481
481
|
|
|
482
482
|
|
|
483
|
-
function $
|
|
484
|
-
let { scale: scale } = $
|
|
485
|
-
let { styleProps: styleProps } = $
|
|
486
|
-
let domRef = $
|
|
483
|
+
function $81a52da995c19652$var$CardView(props, ref) {
|
|
484
|
+
let { scale: scale } = $8EWFi$useProvider();
|
|
485
|
+
let { styleProps: styleProps } = $8EWFi$useStyleProps(props);
|
|
486
|
+
let domRef = $8EWFi$useDOMRef(ref);
|
|
487
487
|
let { isQuiet: isQuiet , renderEmptyState: renderEmptyState , layout: layout , loadingState: loadingState , onLoadMore: onLoadMore , cardOrientation: cardOrientation = 'vertical' } = props;
|
|
488
|
-
let collator = $
|
|
488
|
+
let collator = $8EWFi$useCollator({
|
|
489
489
|
usage: 'search',
|
|
490
490
|
sensitivity: 'base'
|
|
491
491
|
});
|
|
492
492
|
let isLoading = loadingState === 'loading' || loadingState === 'loadingMore';
|
|
493
|
-
let cardViewLayout = $
|
|
493
|
+
let cardViewLayout = $8EWFi$useMemo(()=>typeof layout === 'function' ? new layout({
|
|
494
494
|
collator: collator,
|
|
495
495
|
cardOrientation: cardOrientation,
|
|
496
496
|
scale: scale
|
|
@@ -502,10 +502,10 @@ function $388bc726678ad587$var$CardView(props, ref) {
|
|
|
502
502
|
scale
|
|
503
503
|
]);
|
|
504
504
|
let layoutType = cardViewLayout.layoutType;
|
|
505
|
-
let formatMessage = $
|
|
506
|
-
let { direction: direction } = $
|
|
507
|
-
let { collection: collection } = $
|
|
508
|
-
let gridCollection = $
|
|
505
|
+
let formatMessage = $8EWFi$useMessageFormatter((/*@__PURE__*/$parcel$interopDefault($e24fb79fb8b63230$exports)));
|
|
506
|
+
let { direction: direction } = $8EWFi$useLocale();
|
|
507
|
+
let { collection: collection } = $8EWFi$useListState(props);
|
|
508
|
+
let gridCollection = $8EWFi$useMemo(()=>new $8EWFi$GridCollection({
|
|
509
509
|
columnCount: 1,
|
|
510
510
|
items: [
|
|
511
511
|
...collection
|
|
@@ -531,7 +531,7 @@ function $388bc726678ad587$var$CardView(props, ref) {
|
|
|
531
531
|
, [
|
|
532
532
|
collection
|
|
533
533
|
]);
|
|
534
|
-
let state = $
|
|
534
|
+
let state = $8EWFi$useGridState({
|
|
535
535
|
...props,
|
|
536
536
|
selectionMode: cardOrientation === 'horizontal' && layoutType === 'grid' ? 'none' : props.selectionMode,
|
|
537
537
|
collection: gridCollection,
|
|
@@ -541,12 +541,12 @@ function $388bc726678ad587$var$CardView(props, ref) {
|
|
|
541
541
|
cardViewLayout.disabledKeys = state.disabledKeys;
|
|
542
542
|
cardViewLayout.isLoading = isLoading;
|
|
543
543
|
cardViewLayout.direction = direction;
|
|
544
|
-
let { gridProps: gridProps } = $
|
|
544
|
+
let { gridProps: gridProps } = $8EWFi$useGrid({
|
|
545
545
|
...props,
|
|
546
546
|
isVirtualized: true,
|
|
547
547
|
keyboardDelegate: cardViewLayout
|
|
548
548
|
}, state, domRef);
|
|
549
|
-
let renderWrapper = (parent, reusableView)=>/*#__PURE__*/ $
|
|
549
|
+
let renderWrapper = (parent, reusableView)=>/*#__PURE__*/ $8EWFi$react.createElement($8EWFi$VirtualizerItem, {
|
|
550
550
|
key: reusableView.key,
|
|
551
551
|
reusableView: reusableView,
|
|
552
552
|
parent: parent
|
|
@@ -557,7 +557,7 @@ function $388bc726678ad587$var$CardView(props, ref) {
|
|
|
557
557
|
if ((focusedItem === null || focusedItem === void 0 ? void 0 : focusedItem.parentKey) != null) focusedKey = focusedItem.parentKey;
|
|
558
558
|
let margin = cardViewLayout.margin || 0;
|
|
559
559
|
let virtualizer = cardViewLayout.virtualizer;
|
|
560
|
-
let scrollToItem = $
|
|
560
|
+
let scrollToItem = $8EWFi$useCallback((key)=>{
|
|
561
561
|
virtualizer && virtualizer.scrollToItem(key, {
|
|
562
562
|
duration: 0,
|
|
563
563
|
offsetY: margin
|
|
@@ -567,17 +567,17 @@ function $388bc726678ad587$var$CardView(props, ref) {
|
|
|
567
567
|
virtualizer
|
|
568
568
|
]);
|
|
569
569
|
// TODO: does aria-row count and aria-col count need to be modified? Perhaps aria-col count needs to be omitted
|
|
570
|
-
return(/*#__PURE__*/ $
|
|
570
|
+
return(/*#__PURE__*/ $8EWFi$react.createElement($8d180a244893de14$export$64992ac69f286e5c.Provider, {
|
|
571
571
|
value: {
|
|
572
572
|
state: state,
|
|
573
573
|
isQuiet: isQuiet,
|
|
574
574
|
layout: cardViewLayout,
|
|
575
575
|
cardOrientation: cardOrientation
|
|
576
576
|
}
|
|
577
|
-
}, /*#__PURE__*/ $
|
|
577
|
+
}, /*#__PURE__*/ $8EWFi$react.createElement($8EWFi$Virtualizer, {
|
|
578
578
|
...gridProps,
|
|
579
579
|
...styleProps,
|
|
580
|
-
className: $
|
|
580
|
+
className: $8EWFi$classNames((/*@__PURE__*/$parcel$interopDefault($408a78e5068502c2$exports)), 'spectrum-CardView'),
|
|
581
581
|
ref: domRef,
|
|
582
582
|
focusedKey: focusedKey,
|
|
583
583
|
scrollDirection: "vertical",
|
|
@@ -589,45 +589,45 @@ function $388bc726678ad587$var$CardView(props, ref) {
|
|
|
589
589
|
transitionDuration: isLoading ? 160 : 220,
|
|
590
590
|
scrollToItem: scrollToItem
|
|
591
591
|
}, (type, item)=>{
|
|
592
|
-
if (type === 'item') return(/*#__PURE__*/ $
|
|
592
|
+
if (type === 'item') return(/*#__PURE__*/ $8EWFi$react.createElement($81a52da995c19652$var$InternalCard, {
|
|
593
593
|
item: item
|
|
594
594
|
}));
|
|
595
|
-
else if (type === 'loader') return(/*#__PURE__*/ $
|
|
595
|
+
else if (type === 'loader') return(/*#__PURE__*/ $8EWFi$react.createElement($81a52da995c19652$var$CenteredWrapper, null, /*#__PURE__*/ $8EWFi$react.createElement($8EWFi$ProgressCircle, {
|
|
596
596
|
isIndeterminate: true,
|
|
597
597
|
"aria-label": state.collection.size > 0 ? formatMessage('loadingMore') : formatMessage('loading')
|
|
598
598
|
})));
|
|
599
599
|
else if (type === 'placeholder') {
|
|
600
600
|
let emptyState = renderEmptyState ? renderEmptyState() : null;
|
|
601
601
|
if (emptyState == null) return null;
|
|
602
|
-
return(/*#__PURE__*/ $
|
|
602
|
+
return(/*#__PURE__*/ $8EWFi$react.createElement($81a52da995c19652$var$CenteredWrapper, null, emptyState));
|
|
603
603
|
}
|
|
604
604
|
})));
|
|
605
605
|
}
|
|
606
|
-
function $
|
|
607
|
-
let { state: state } = $
|
|
608
|
-
return(/*#__PURE__*/ $
|
|
606
|
+
function $81a52da995c19652$var$CenteredWrapper({ children: children }) {
|
|
607
|
+
let { state: state } = $8d180a244893de14$export$fea0b38586ec8f13();
|
|
608
|
+
return(/*#__PURE__*/ $8EWFi$react.createElement("div", {
|
|
609
609
|
role: "row",
|
|
610
610
|
"aria-rowindex": state.collection.size + 1,
|
|
611
|
-
className: $
|
|
612
|
-
}, /*#__PURE__*/ $
|
|
611
|
+
className: $8EWFi$classNames((/*@__PURE__*/$parcel$interopDefault($408a78e5068502c2$exports)), 'spectrum-CardView-centeredWrapper')
|
|
612
|
+
}, /*#__PURE__*/ $8EWFi$react.createElement("div", {
|
|
613
613
|
role: "gridcell"
|
|
614
614
|
}, children)));
|
|
615
615
|
}
|
|
616
|
-
function $
|
|
616
|
+
function $81a52da995c19652$var$InternalCard(props) {
|
|
617
617
|
let { item: item } = props;
|
|
618
618
|
let cellNode = [
|
|
619
619
|
...item.childNodes
|
|
620
620
|
][0];
|
|
621
|
-
let { state: state , cardOrientation: cardOrientation , isQuiet: isQuiet , layout: layout } = $
|
|
621
|
+
let { state: state , cardOrientation: cardOrientation , isQuiet: isQuiet , layout: layout } = $8d180a244893de14$export$fea0b38586ec8f13();
|
|
622
622
|
let layoutType = layout.layoutType;
|
|
623
|
-
let rowRef = $
|
|
624
|
-
let cellRef = $
|
|
625
|
-
let unwrappedRef = $
|
|
626
|
-
let { rowProps: rowProps } = $
|
|
623
|
+
let rowRef = $8EWFi$useRef();
|
|
624
|
+
let cellRef = $8EWFi$useRef();
|
|
625
|
+
let unwrappedRef = $8EWFi$useUnwrapDOMRef(cellRef);
|
|
626
|
+
let { rowProps: rowProps } = $8EWFi$useGridRow({
|
|
627
627
|
node: item,
|
|
628
628
|
isVirtualized: true
|
|
629
629
|
}, state, rowRef);
|
|
630
|
-
let { gridCellProps: gridCellProps } = $
|
|
630
|
+
let { gridCellProps: gridCellProps } = $8EWFi$useGridCell({
|
|
631
631
|
node: cellNode,
|
|
632
632
|
focusMode: 'cell'
|
|
633
633
|
}, state, unwrappedRef);
|
|
@@ -637,11 +637,11 @@ function $388bc726678ad587$var$InternalCard(props) {
|
|
|
637
637
|
// when pressing the arrow keys so we delete the key down handler here. Arrow key navigation between
|
|
638
638
|
// the cards in the CardView is handled by useGrid => useSelectableCollection instead.
|
|
639
639
|
delete gridCellProps.onKeyDownCapture;
|
|
640
|
-
return(/*#__PURE__*/ $
|
|
640
|
+
return(/*#__PURE__*/ $8EWFi$react.createElement("div", {
|
|
641
641
|
...rowProps,
|
|
642
642
|
ref: rowRef,
|
|
643
|
-
className: $
|
|
644
|
-
}, /*#__PURE__*/ $
|
|
643
|
+
className: $8EWFi$classNames((/*@__PURE__*/$parcel$interopDefault($408a78e5068502c2$exports)), 'spectrum-CardView-row')
|
|
644
|
+
}, /*#__PURE__*/ $8EWFi$react.createElement($643dd8fa80926f94$export$7a6ccaf429ad93a8, {
|
|
645
645
|
ref: cellRef,
|
|
646
646
|
articleProps: gridCellProps,
|
|
647
647
|
isQuiet: isQuiet,
|
|
@@ -652,14 +652,14 @@ function $388bc726678ad587$var$InternalCard(props) {
|
|
|
652
652
|
}
|
|
653
653
|
/**
|
|
654
654
|
* TODO: Add description of component here.
|
|
655
|
-
*/ const $
|
|
655
|
+
*/ const $81a52da995c19652$export$7e52c821f7b6f422 = /*#__PURE__*/ $8EWFi$react.forwardRef($81a52da995c19652$var$CardView);
|
|
656
656
|
|
|
657
657
|
|
|
658
|
-
var $
|
|
658
|
+
var $c0ba81539c443916$exports = {};
|
|
659
659
|
|
|
660
|
-
$parcel$export($
|
|
660
|
+
$parcel$export($c0ba81539c443916$exports, "GalleryLayout", () => $c0ba81539c443916$export$8e52095834484b61);
|
|
661
661
|
|
|
662
|
-
class $
|
|
662
|
+
class $3d424c147206bac9$export$64943d2e59d72a29 extends $8EWFi$Layout {
|
|
663
663
|
validate(invalidationContext) {
|
|
664
664
|
this.collection = this.virtualizer.collection;
|
|
665
665
|
this.buildCollection(invalidationContext);
|
|
@@ -726,7 +726,7 @@ class $ca0f261acdd7bcf1$export$64943d2e59d72a29 extends $jxYob$Layout {
|
|
|
726
726
|
// Expected key is the currently focused cell so we need the parent row key
|
|
727
727
|
let parentRowKey = this.collection.getItem(key).parentKey;
|
|
728
728
|
let layoutInfo = this.getLayoutInfo(parentRowKey);
|
|
729
|
-
let rect = new $
|
|
729
|
+
let rect = new $8EWFi$Rect(layoutInfo.rect.x, layoutInfo.rect.maxY + 1, layoutInfo.rect.width, this.virtualizer.visibleRect.height);
|
|
730
730
|
let closestRow = this.collection.getItem((ref = this._findClosest(layoutInfo.rect, rect)) === null || ref === void 0 ? void 0 : ref.key);
|
|
731
731
|
return (ref1 = closestRow === null || closestRow === void 0 ? void 0 : closestRow.childNodes[0]) === null || ref1 === void 0 ? void 0 : ref1.key;
|
|
732
732
|
}
|
|
@@ -735,7 +735,7 @@ class $ca0f261acdd7bcf1$export$64943d2e59d72a29 extends $jxYob$Layout {
|
|
|
735
735
|
// Expected key is the currently focused cell so we need the parent row key
|
|
736
736
|
let parentRowKey = this.collection.getItem(key).parentKey;
|
|
737
737
|
let layoutInfo = this.getLayoutInfo(parentRowKey);
|
|
738
|
-
let rect = new $
|
|
738
|
+
let rect = new $8EWFi$Rect(layoutInfo.rect.x, 0, layoutInfo.rect.width, layoutInfo.rect.y - 1);
|
|
739
739
|
let closestRow = this.collection.getItem((ref = this._findClosest(layoutInfo.rect, rect)) === null || ref === void 0 ? void 0 : ref.key);
|
|
740
740
|
return (ref2 = closestRow === null || closestRow === void 0 ? void 0 : closestRow.childNodes[0]) === null || ref2 === void 0 ? void 0 : ref2.key;
|
|
741
741
|
}
|
|
@@ -853,19 +853,19 @@ class $ca0f261acdd7bcf1$export$64943d2e59d72a29 extends $jxYob$Layout {
|
|
|
853
853
|
|
|
854
854
|
|
|
855
855
|
|
|
856
|
-
const $
|
|
856
|
+
const $c0ba81539c443916$var$DEFAULT_OPTIONS = {
|
|
857
857
|
S: {
|
|
858
858
|
idealRowHeight: 112,
|
|
859
|
-
minItemSize: new $
|
|
860
|
-
itemSpacing: new $
|
|
859
|
+
minItemSize: new $8EWFi$Size(96, 96),
|
|
860
|
+
itemSpacing: new $8EWFi$Size(8, 16),
|
|
861
861
|
itemPadding: 24,
|
|
862
862
|
dropSpacing: 50,
|
|
863
863
|
margin: 8
|
|
864
864
|
},
|
|
865
865
|
L: {
|
|
866
866
|
idealRowHeight: 208,
|
|
867
|
-
minItemSize: new $
|
|
868
|
-
itemSpacing: new $
|
|
867
|
+
minItemSize: new $8EWFi$Size(136, 136),
|
|
868
|
+
itemSpacing: new $8EWFi$Size(18, 18),
|
|
869
869
|
itemPadding: {
|
|
870
870
|
'medium': 78,
|
|
871
871
|
'large': 99
|
|
@@ -874,7 +874,7 @@ const $3e8c06a2bf701494$var$DEFAULT_OPTIONS = {
|
|
|
874
874
|
margin: 24
|
|
875
875
|
}
|
|
876
876
|
};
|
|
877
|
-
class $
|
|
877
|
+
class $c0ba81539c443916$export$8e52095834484b61 extends $3d424c147206bac9$export$64943d2e59d72a29 {
|
|
878
878
|
get layoutType() {
|
|
879
879
|
return 'gallery';
|
|
880
880
|
}
|
|
@@ -942,7 +942,7 @@ class $3e8c06a2bf701494$export$8e52095834484b61 extends $ca0f261acdd7bcf1$export
|
|
|
942
942
|
if (availableWidth <= this.minItemSize.width * 2 + this.itemPadding * 2) rows = this.collection.size;
|
|
943
943
|
let weightedRatios = ratios.map((ratio)=>ratio < this.threshold ? ratio + 0.5 * (1 / ratio) : ratio
|
|
944
944
|
);
|
|
945
|
-
let partition = $
|
|
945
|
+
let partition = $c0ba81539c443916$var$linearPartition(weightedRatios, rows);
|
|
946
946
|
let index = 0;
|
|
947
947
|
for (let row of partition){
|
|
948
948
|
// Compute the total weight for this row
|
|
@@ -970,8 +970,8 @@ class $3e8c06a2bf701494$export$8e52095834484b61 extends $ca0f261acdd7bcf1$export
|
|
|
970
970
|
for(let j2 = index; j2 < index + row.length; j2++){
|
|
971
971
|
let node = this.collection.rows[j2];
|
|
972
972
|
let itemWidth = Math.max(widths[j2 - index][1], this.minItemSize.width);
|
|
973
|
-
let rect = new $
|
|
974
|
-
let layoutInfo = new $
|
|
973
|
+
let rect = new $8EWFi$Rect(x, y, itemWidth, itemHeight);
|
|
974
|
+
let layoutInfo = new $8EWFi$LayoutInfo(node.type, node.key, rect);
|
|
975
975
|
layoutInfo.allowOverflow = true;
|
|
976
976
|
this.layoutInfos.set(node.key, layoutInfo);
|
|
977
977
|
x += itemWidth + this.itemSpacing.width;
|
|
@@ -988,34 +988,34 @@ class $3e8c06a2bf701494$export$8e52095834484b61 extends $ca0f261acdd7bcf1$export
|
|
|
988
988
|
loaderY = 0;
|
|
989
989
|
loaderHeight = visibleHeight || 60;
|
|
990
990
|
}
|
|
991
|
-
let rect = new $
|
|
992
|
-
let loader = new $
|
|
991
|
+
let rect = new $8EWFi$Rect(0, loaderY, visibleWidth, loaderHeight);
|
|
992
|
+
let loader = new $8EWFi$LayoutInfo('loader', 'loader', rect);
|
|
993
993
|
this.layoutInfos.set('loader', loader);
|
|
994
994
|
y = loader.rect.maxY;
|
|
995
995
|
}
|
|
996
996
|
if (this.collection.size === 0 && !this.isLoading) {
|
|
997
|
-
let rect = new $
|
|
998
|
-
let placeholder = new $
|
|
997
|
+
let rect = new $8EWFi$Rect(0, 0, visibleWidth, visibleHeight);
|
|
998
|
+
let placeholder = new $8EWFi$LayoutInfo('placeholder', 'placeholder', rect);
|
|
999
999
|
this.layoutInfos.set('placeholder', placeholder);
|
|
1000
1000
|
y = placeholder.rect.maxY;
|
|
1001
1001
|
}
|
|
1002
1002
|
}
|
|
1003
|
-
this.contentSize = new $
|
|
1003
|
+
this.contentSize = new $8EWFi$Size(visibleWidth, y);
|
|
1004
1004
|
}
|
|
1005
1005
|
constructor(options = {
|
|
1006
1006
|
}){
|
|
1007
1007
|
super(options);
|
|
1008
1008
|
let cardSize = 'L';
|
|
1009
|
-
this.idealRowHeight = options.idealRowHeight || $
|
|
1010
|
-
this.itemSpacing = options.itemSpacing || $
|
|
1011
|
-
this.itemPadding = options.itemPadding != null ? options.itemPadding : $
|
|
1012
|
-
this.minItemSize = options.minItemSize || $
|
|
1009
|
+
this.idealRowHeight = options.idealRowHeight || $c0ba81539c443916$var$DEFAULT_OPTIONS[cardSize].idealRowHeight;
|
|
1010
|
+
this.itemSpacing = options.itemSpacing || $c0ba81539c443916$var$DEFAULT_OPTIONS[cardSize].itemSpacing;
|
|
1011
|
+
this.itemPadding = options.itemPadding != null ? options.itemPadding : $c0ba81539c443916$var$DEFAULT_OPTIONS[cardSize].itemPadding[this.scale];
|
|
1012
|
+
this.minItemSize = options.minItemSize || $c0ba81539c443916$var$DEFAULT_OPTIONS[cardSize].minItemSize;
|
|
1013
1013
|
this.threshold = options.threshold || 1;
|
|
1014
|
-
this.margin = options.margin != null ? options.margin : $
|
|
1014
|
+
this.margin = options.margin != null ? options.margin : $c0ba81539c443916$var$DEFAULT_OPTIONS[cardSize].margin;
|
|
1015
1015
|
}
|
|
1016
1016
|
}
|
|
1017
1017
|
// https://www8.cs.umu.se/kurser/TDBA77/VT06/algorithms/BOOK/BOOK2/NODE45.HTM
|
|
1018
|
-
function $
|
|
1018
|
+
function $c0ba81539c443916$var$linearPartition(seq, k) {
|
|
1019
1019
|
let n = seq.length;
|
|
1020
1020
|
if (k <= 0) return [];
|
|
1021
1021
|
if (k >= n) return seq.map((x)=>[
|
|
@@ -1065,20 +1065,20 @@ function $3e8c06a2bf701494$var$linearPartition(seq, k) {
|
|
|
1065
1065
|
}
|
|
1066
1066
|
|
|
1067
1067
|
|
|
1068
|
-
var $
|
|
1068
|
+
var $ed42fd44b9b9b664$exports = {};
|
|
1069
1069
|
|
|
1070
|
-
$parcel$export($
|
|
1070
|
+
$parcel$export($ed42fd44b9b9b664$exports, "GridLayout", () => $ed42fd44b9b9b664$export$7d2b12578154a735);
|
|
1071
1071
|
|
|
1072
1072
|
|
|
1073
|
-
const $
|
|
1073
|
+
const $ed42fd44b9b9b664$var$DEFAULT_OPTIONS = {
|
|
1074
1074
|
S: {
|
|
1075
1075
|
itemPadding: 20,
|
|
1076
1076
|
minItemSize: {
|
|
1077
|
-
'vertical': new $
|
|
1077
|
+
'vertical': new $8EWFi$Size(96, 96)
|
|
1078
1078
|
},
|
|
1079
|
-
maxItemSize: new $
|
|
1079
|
+
maxItemSize: new $8EWFi$Size(Infinity, Infinity),
|
|
1080
1080
|
margin: 8,
|
|
1081
|
-
minSpace: new $
|
|
1081
|
+
minSpace: new $8EWFi$Size(6, 6),
|
|
1082
1082
|
maxColumns: Infinity,
|
|
1083
1083
|
dropSpacing: 50
|
|
1084
1084
|
},
|
|
@@ -1094,17 +1094,17 @@ const $bf549ee623ef44de$var$DEFAULT_OPTIONS = {
|
|
|
1094
1094
|
}
|
|
1095
1095
|
},
|
|
1096
1096
|
minItemSize: {
|
|
1097
|
-
'vertical': new $
|
|
1098
|
-
'horizontal': new $
|
|
1097
|
+
'vertical': new $8EWFi$Size(208, 208),
|
|
1098
|
+
'horizontal': new $8EWFi$Size(102, 102)
|
|
1099
1099
|
},
|
|
1100
|
-
maxItemSize: new $
|
|
1100
|
+
maxItemSize: new $8EWFi$Size(Infinity, Infinity),
|
|
1101
1101
|
margin: 24,
|
|
1102
|
-
minSpace: new $
|
|
1102
|
+
minSpace: new $8EWFi$Size(18, 18),
|
|
1103
1103
|
maxColumns: Infinity,
|
|
1104
1104
|
dropSpacing: 100
|
|
1105
1105
|
}
|
|
1106
1106
|
};
|
|
1107
|
-
class $
|
|
1107
|
+
class $ed42fd44b9b9b664$export$7d2b12578154a735 extends $3d424c147206bac9$export$64943d2e59d72a29 {
|
|
1108
1108
|
get layoutType() {
|
|
1109
1109
|
return 'grid';
|
|
1110
1110
|
}
|
|
@@ -1157,7 +1157,7 @@ class $bf549ee623ef44de$export$7d2b12578154a735 extends $ca0f261acdd7bcf1$export
|
|
|
1157
1157
|
let t = (itemWidth - minCardWidth) / minCardWidth;
|
|
1158
1158
|
let itemHeight = Math.floor(this.minItemSize.height + this.minItemSize.height * t);
|
|
1159
1159
|
itemHeight = Math.max(this.minItemSize.height, Math.min(this.maxItemSize.height, itemHeight)) + verticalItemPadding;
|
|
1160
|
-
this.itemSize = new $
|
|
1160
|
+
this.itemSize = new $8EWFi$Size(itemWidth, itemHeight);
|
|
1161
1161
|
// Compute the horizontal spacing and content height
|
|
1162
1162
|
this.horizontalSpacing = this.numColumns < 2 ? 0 : Math.floor((availableWidth - this.numColumns * this.itemSize.width) / (this.numColumns - 1));
|
|
1163
1163
|
let y = this.margin;
|
|
@@ -1176,27 +1176,27 @@ class $bf549ee623ef44de$export$7d2b12578154a735 extends $ca0f261acdd7bcf1$export
|
|
|
1176
1176
|
loaderY = 0;
|
|
1177
1177
|
loaderHeight = visibleHeight || 60;
|
|
1178
1178
|
}
|
|
1179
|
-
let rect = new $
|
|
1180
|
-
let loader = new $
|
|
1179
|
+
let rect = new $8EWFi$Rect(0, loaderY, visibleWidth, loaderHeight);
|
|
1180
|
+
let loader = new $8EWFi$LayoutInfo('loader', 'loader', rect);
|
|
1181
1181
|
this.layoutInfos.set('loader', loader);
|
|
1182
1182
|
y = loader.rect.maxY;
|
|
1183
1183
|
}
|
|
1184
1184
|
if (this.collection.size === 0 && !this.isLoading) {
|
|
1185
|
-
let rect = new $
|
|
1186
|
-
let placeholder = new $
|
|
1185
|
+
let rect = new $8EWFi$Rect(0, 0, visibleWidth, visibleHeight);
|
|
1186
|
+
let placeholder = new $8EWFi$LayoutInfo('placeholder', 'placeholder', rect);
|
|
1187
1187
|
this.layoutInfos.set('placeholder', placeholder);
|
|
1188
1188
|
y = placeholder.rect.maxY;
|
|
1189
1189
|
}
|
|
1190
|
-
this.contentSize = new $
|
|
1190
|
+
this.contentSize = new $8EWFi$Size(visibleWidth, y);
|
|
1191
1191
|
}
|
|
1192
1192
|
buildChild(node, y, index) {
|
|
1193
1193
|
let row = Math.floor(index / this.numColumns);
|
|
1194
1194
|
let column = index % this.numColumns;
|
|
1195
1195
|
let x = this.margin + column * (this.itemSize.width + this.horizontalSpacing);
|
|
1196
1196
|
y = this.margin + row * (this.itemSize.height + this.minSpace.height);
|
|
1197
|
-
let rect = new $
|
|
1197
|
+
let rect = new $8EWFi$Rect(x, y, this.itemSize.width, this.itemSize.height);
|
|
1198
1198
|
// TODO: Perhaps have it so that the child key for each row is stored with the layoutInfo?
|
|
1199
|
-
let layoutInfo = new $
|
|
1199
|
+
let layoutInfo = new $8EWFi$LayoutInfo(node.type, node.key, rect);
|
|
1200
1200
|
layoutInfo.allowOverflow = true;
|
|
1201
1201
|
this.layoutInfos.set(node.key, layoutInfo);
|
|
1202
1202
|
return layoutInfo;
|
|
@@ -1231,12 +1231,12 @@ class $bf549ee623ef44de$export$7d2b12578154a735 extends $ca0f261acdd7bcf1$export
|
|
|
1231
1231
|
super(options);
|
|
1232
1232
|
let cardSize = 'L';
|
|
1233
1233
|
this.cardOrientation = options.cardOrientation || 'vertical';
|
|
1234
|
-
this.minItemSize = options.minItemSize || $
|
|
1235
|
-
this.maxItemSize = options.maxItemSize || $
|
|
1236
|
-
this.margin = options.margin != null ? options.margin : $
|
|
1237
|
-
this.minSpace = options.minSpace || $
|
|
1238
|
-
this.maxColumns = options.maxColumns || $
|
|
1239
|
-
this.itemPadding = options.itemPadding != null ? options.itemPadding : $
|
|
1234
|
+
this.minItemSize = options.minItemSize || $ed42fd44b9b9b664$var$DEFAULT_OPTIONS[cardSize].minItemSize[this.cardOrientation];
|
|
1235
|
+
this.maxItemSize = options.maxItemSize || $ed42fd44b9b9b664$var$DEFAULT_OPTIONS[cardSize].maxItemSize;
|
|
1236
|
+
this.margin = options.margin != null ? options.margin : $ed42fd44b9b9b664$var$DEFAULT_OPTIONS[cardSize].margin;
|
|
1237
|
+
this.minSpace = options.minSpace || $ed42fd44b9b9b664$var$DEFAULT_OPTIONS[cardSize].minSpace;
|
|
1238
|
+
this.maxColumns = options.maxColumns || $ed42fd44b9b9b664$var$DEFAULT_OPTIONS[cardSize].maxColumns;
|
|
1239
|
+
this.itemPadding = options.itemPadding != null ? options.itemPadding : $ed42fd44b9b9b664$var$DEFAULT_OPTIONS[cardSize].itemPadding[this.cardOrientation][this.scale];
|
|
1240
1240
|
this.itemSize = null;
|
|
1241
1241
|
this.numColumns = 0;
|
|
1242
1242
|
this.numRows = 0;
|
|
@@ -1245,12 +1245,12 @@ class $bf549ee623ef44de$export$7d2b12578154a735 extends $ca0f261acdd7bcf1$export
|
|
|
1245
1245
|
}
|
|
1246
1246
|
|
|
1247
1247
|
|
|
1248
|
-
var $
|
|
1248
|
+
var $03278f8d0f6860bb$exports = {};
|
|
1249
1249
|
|
|
1250
|
-
$parcel$export($
|
|
1250
|
+
$parcel$export($03278f8d0f6860bb$exports, "WaterfallLayout", () => $03278f8d0f6860bb$export$e9f7cda058ba8df8);
|
|
1251
1251
|
|
|
1252
1252
|
|
|
1253
|
-
class $
|
|
1253
|
+
class $03278f8d0f6860bb$export$e9f7cda058ba8df8 extends $3d424c147206bac9$export$64943d2e59d72a29 {
|
|
1254
1254
|
get layoutType() {
|
|
1255
1255
|
return 'waterfall';
|
|
1256
1256
|
}
|
|
@@ -1292,8 +1292,8 @@ class $e85179af2192bb94$export$e9f7cda058ba8df8 extends $ca0f261acdd7bcf1$export
|
|
|
1292
1292
|
let column = this.getNextColumnIndex(columnHeights);
|
|
1293
1293
|
let x = this.margin + column * (itemWidth + horizontalSpacing);
|
|
1294
1294
|
let y = columnHeights[column];
|
|
1295
|
-
let rect = new $
|
|
1296
|
-
let layoutInfo = new $
|
|
1295
|
+
let rect = new $8EWFi$Rect(x, y, itemWidth, height);
|
|
1296
|
+
let layoutInfo = new $8EWFi$LayoutInfo(node.type, key, rect);
|
|
1297
1297
|
layoutInfo.estimatedSize = estimatedSize;
|
|
1298
1298
|
layoutInfo.allowOverflow = true;
|
|
1299
1299
|
this.layoutInfos.set(key, layoutInfo);
|
|
@@ -1317,18 +1317,18 @@ class $e85179af2192bb94$export$e9f7cda058ba8df8 extends $ca0f261acdd7bcf1$export
|
|
|
1317
1317
|
loaderY = 0;
|
|
1318
1318
|
loaderHeight = this.virtualizer.visibleRect.height || 60;
|
|
1319
1319
|
}
|
|
1320
|
-
let rect = new $
|
|
1321
|
-
let loader = new $
|
|
1320
|
+
let rect = new $8EWFi$Rect(0, loaderY, this.virtualizer.visibleRect.width, loaderHeight);
|
|
1321
|
+
let loader = new $8EWFi$LayoutInfo('loader', 'loader', rect);
|
|
1322
1322
|
this.layoutInfos.set('loader', loader);
|
|
1323
1323
|
y = loader.rect.maxY;
|
|
1324
1324
|
}
|
|
1325
1325
|
if (this.collection.size === 0 && !this.isLoading) {
|
|
1326
|
-
let rect = new $
|
|
1327
|
-
let placeholder = new $
|
|
1326
|
+
let rect = new $8EWFi$Rect(0, 0, this.virtualizer.visibleRect.width, this.virtualizer.visibleRect.height);
|
|
1327
|
+
let placeholder = new $8EWFi$LayoutInfo('placeholder', 'placeholder', rect);
|
|
1328
1328
|
this.layoutInfos.set('placeholder', placeholder);
|
|
1329
1329
|
y = placeholder.rect.maxY;
|
|
1330
1330
|
}
|
|
1331
|
-
this.contentSize = new $
|
|
1331
|
+
this.contentSize = new $8EWFi$Size(this.virtualizer.visibleRect.width, y);
|
|
1332
1332
|
}
|
|
1333
1333
|
updateItemSize(key, size) {
|
|
1334
1334
|
let layoutInfo = this.layoutInfos.get(key);
|
|
@@ -1356,11 +1356,11 @@ class $e85179af2192bb94$export$e9f7cda058ba8df8 extends $ca0f261acdd7bcf1$export
|
|
|
1356
1356
|
// This prevent the issue where it was possible that the closest layoutInfo would be two columns over due to the middle card being exceptionally tall
|
|
1357
1357
|
// and thus the top corner to top corner distance was massive.
|
|
1358
1358
|
// First look for a card to the immediate right of the current card. If we can't find any, look for the nearest card in the entire column to the right of the card
|
|
1359
|
-
let rect = new $
|
|
1359
|
+
let rect = new $8EWFi$Rect(layoutInfo.rect.maxX + 1, layoutInfo.rect.y, layoutInfo.rect.width + this.horizontalSpacing, layoutInfo.rect.height);
|
|
1360
1360
|
key = (ref = this._findClosest(layoutInfo.rect, rect)) === null || ref === void 0 ? void 0 : ref.key;
|
|
1361
1361
|
if (!key) {
|
|
1362
1362
|
var ref3;
|
|
1363
|
-
rect = new $
|
|
1363
|
+
rect = new $8EWFi$Rect(layoutInfo.rect.maxX + 1, 0, layoutInfo.rect.width + this.horizontalSpacing, this.virtualizer.contentSize.height);
|
|
1364
1364
|
key = (ref3 = this._findClosest(layoutInfo.rect, rect)) === null || ref3 === void 0 ? void 0 : ref3.key;
|
|
1365
1365
|
}
|
|
1366
1366
|
return (ref2 = (ref1 = this.collection.getItem(key)) === null || ref1 === void 0 ? void 0 : ref1.childNodes[0]) === null || ref2 === void 0 ? void 0 : ref2.key;
|
|
@@ -1369,11 +1369,11 @@ class $e85179af2192bb94$export$e9f7cda058ba8df8 extends $ca0f261acdd7bcf1$export
|
|
|
1369
1369
|
var ref, ref4, ref5;
|
|
1370
1370
|
let layoutInfo = this.getLayoutInfo(key);
|
|
1371
1371
|
// First look for a card to the immediate left of the current card. If we can't find any, look for the nearest card in the entire column to the left of the card
|
|
1372
|
-
let rect = new $
|
|
1372
|
+
let rect = new $8EWFi$Rect(layoutInfo.rect.x - layoutInfo.rect.width - this.horizontalSpacing - 1, layoutInfo.rect.y, layoutInfo.rect.width + this.horizontalSpacing, layoutInfo.rect.height);
|
|
1373
1373
|
key = (ref = this._findClosest(layoutInfo.rect, rect)) === null || ref === void 0 ? void 0 : ref.key;
|
|
1374
1374
|
if (!key) {
|
|
1375
1375
|
var ref6;
|
|
1376
|
-
rect = new $
|
|
1376
|
+
rect = new $8EWFi$Rect(layoutInfo.rect.x - layoutInfo.rect.width - this.horizontalSpacing - 1, 0, layoutInfo.rect.width + this.horizontalSpacing, this.virtualizer.contentSize.height);
|
|
1377
1377
|
key = (ref6 = this._findClosest(layoutInfo.rect, rect)) === null || ref6 === void 0 ? void 0 : ref6.key;
|
|
1378
1378
|
}
|
|
1379
1379
|
return (ref5 = (ref4 = this.collection.getItem(key)) === null || ref4 === void 0 ? void 0 : ref4.childNodes[0]) === null || ref5 === void 0 ? void 0 : ref5.key;
|
|
@@ -1393,10 +1393,10 @@ class $e85179af2192bb94$export$e9f7cda058ba8df8 extends $ca0f261acdd7bcf1$export
|
|
|
1393
1393
|
// TODO: WaterfallLayout doesn't use card size in v2, but perhaps it should support it? Perhaps it would modify
|
|
1394
1394
|
// minItemSize defaults or other things
|
|
1395
1395
|
super(options);
|
|
1396
|
-
this.minItemSize = options.minItemSize || new $
|
|
1397
|
-
this.maxItemSize = options.maxItemSize || new $
|
|
1396
|
+
this.minItemSize = options.minItemSize || new $8EWFi$Size(240, 136);
|
|
1397
|
+
this.maxItemSize = options.maxItemSize || new $8EWFi$Size(Infinity, Infinity);
|
|
1398
1398
|
this.margin = options.margin != null ? options.margin : 24;
|
|
1399
|
-
this.minSpace = options.minSpace || new $
|
|
1399
|
+
this.minSpace = options.minSpace || new $8EWFi$Size(18, 18);
|
|
1400
1400
|
this.maxColumns = options.maxColumns || Infinity;
|
|
1401
1401
|
this.itemWidth = 0;
|
|
1402
1402
|
this.numColumns = 0;
|
|
@@ -1406,22 +1406,22 @@ class $e85179af2192bb94$export$e9f7cda058ba8df8 extends $ca0f261acdd7bcf1$export
|
|
|
1406
1406
|
}
|
|
1407
1407
|
|
|
1408
1408
|
|
|
1409
|
-
var $
|
|
1409
|
+
var $d2d1c099b89e366a$exports = {};
|
|
1410
1410
|
|
|
1411
|
-
$parcel$export($
|
|
1411
|
+
$parcel$export($d2d1c099b89e366a$exports, "Card", () => $d2d1c099b89e366a$export$60332b2344f7fe41);
|
|
1412
1412
|
|
|
1413
1413
|
|
|
1414
1414
|
|
|
1415
|
-
let $
|
|
1416
|
-
let context = $
|
|
1415
|
+
let $d2d1c099b89e366a$var$Card = /*#__PURE__*/ $8EWFi$forwardRef((props, ref)=>{
|
|
1416
|
+
let context = $8d180a244893de14$export$fea0b38586ec8f13();
|
|
1417
1417
|
if (context !== null) return null;
|
|
1418
|
-
else return(/*#__PURE__*/ $
|
|
1418
|
+
else return(/*#__PURE__*/ $8EWFi$react.createElement($643dd8fa80926f94$export$7a6ccaf429ad93a8, {
|
|
1419
1419
|
...props,
|
|
1420
1420
|
ref: ref
|
|
1421
1421
|
}));
|
|
1422
1422
|
});
|
|
1423
1423
|
// @ts-ignore
|
|
1424
|
-
$
|
|
1424
|
+
$d2d1c099b89e366a$var$Card.getCollectionNode = function* getCollectionNode(props) {
|
|
1425
1425
|
let { children: children , textValue: textValue } = props;
|
|
1426
1426
|
yield {
|
|
1427
1427
|
type: 'item',
|
|
@@ -1432,10 +1432,10 @@ $58b03ffaa8d0f32f$var$Card.getCollectionNode = function* getCollectionNode(props
|
|
|
1432
1432
|
textValue: textValue
|
|
1433
1433
|
};
|
|
1434
1434
|
};
|
|
1435
|
-
let $
|
|
1435
|
+
let $d2d1c099b89e366a$export$60332b2344f7fe41 = $d2d1c099b89e366a$var$Card;
|
|
1436
1436
|
|
|
1437
1437
|
|
|
1438
1438
|
|
|
1439
1439
|
|
|
1440
|
-
export {$
|
|
1440
|
+
export {$81a52da995c19652$export$7e52c821f7b6f422 as CardView, $c0ba81539c443916$export$8e52095834484b61 as GalleryLayout, $ed42fd44b9b9b664$export$7d2b12578154a735 as GridLayout, $03278f8d0f6860bb$export$e9f7cda058ba8df8 as WaterfallLayout, $d2d1c099b89e366a$export$60332b2344f7fe41 as Card};
|
|
1441
1441
|
//# sourceMappingURL=module.js.map
|