@react-spectrum/card 3.0.0-alpha.24 → 3.0.0-alpha.26

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/import.mjs DELETED
@@ -1,1651 +0,0 @@
1
- import "./main.css";
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 {mergeProps as $8EWFi$mergeProps, useResizeObserver as $8EWFi$useResizeObserver, useLayoutEffect as $8EWFi$useLayoutEffect, filterDOMProps as $8EWFi$filterDOMProps, useSlotId as $8EWFi$useSlotId} from "@react-aria/utils";
5
- import {ProgressCircle as $8EWFi$ProgressCircle} from "@react-spectrum/progress";
6
- 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";
7
- import {useCollator as $8EWFi$useCollator, useLocalizedStringFormatter as $8EWFi$useLocalizedStringFormatter, useLocale as $8EWFi$useLocale} from "@react-aria/i18n";
8
- import {useGrid as $8EWFi$useGrid, useGridRow as $8EWFi$useGridRow, useGridCell as $8EWFi$useGridCell} from "@react-aria/grid";
9
- import {useListState as $8EWFi$useListState} from "@react-stately/list";
10
- import {useProvider as $8EWFi$useProvider, useProviderProps as $8EWFi$useProviderProps} from "@react-spectrum/provider";
11
- import {VirtualizerItem as $8EWFi$VirtualizerItem, Virtualizer as $8EWFi$Virtualizer} from "@react-aria/virtualizer";
12
- import {Checkbox as $8EWFi$Checkbox} from "@react-spectrum/checkbox";
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
- import {getFirstItem as $8EWFi$getFirstItem, getChildNodes as $8EWFi$getChildNodes} from "@react-stately/collections";
17
-
18
- function $parcel$interopDefault(a) {
19
- return a && a.__esModule ? a.default : a;
20
- }
21
- function $parcel$export(e, n, v, s) {
22
- Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
23
- }
24
- /*
25
- * Copyright 2021 Adobe. All rights reserved.
26
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
27
- * you may not use this file except in compliance with the License. You may obtain a copy
28
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
29
- *
30
- * Unless required by applicable law or agreed to in writing, software distributed under
31
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
32
- * OF ANY KIND, either express or implied. See the License for the specific language
33
- * governing permissions and limitations under the License.
34
- */ /// <reference types="css-module-types" />
35
- /*
36
- * Copyright 2021 Adobe. All rights reserved.
37
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
38
- * you may not use this file except in compliance with the License. You may obtain a copy
39
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
40
- *
41
- * Unless required by applicable law or agreed to in writing, software distributed under
42
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
43
- * OF ANY KIND, either express or implied. See the License for the specific language
44
- * governing permissions and limitations under the License.
45
- */ /*
46
- * Copyright 2021 Adobe. All rights reserved.
47
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
48
- * you may not use this file except in compliance with the License. You may obtain a copy
49
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
50
- *
51
- * Unless required by applicable law or agreed to in writing, software distributed under
52
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
53
- * OF ANY KIND, either express or implied. See the License for the specific language
54
- * governing permissions and limitations under the License.
55
- */
56
-
57
-
58
-
59
-
60
- var $408a78e5068502c2$exports = {};
61
-
62
- $parcel$export($408a78e5068502c2$exports, "avatar", () => $408a78e5068502c2$export$345c5736c8054f22, (v) => $408a78e5068502c2$export$345c5736c8054f22 = v);
63
- $parcel$export($408a78e5068502c2$exports, "content", () => $408a78e5068502c2$export$a7db06668cad9adb, (v) => $408a78e5068502c2$export$a7db06668cad9adb = v);
64
- $parcel$export($408a78e5068502c2$exports, "detail", () => $408a78e5068502c2$export$13a2d28b88853ef2, (v) => $408a78e5068502c2$export$13a2d28b88853ef2 = v);
65
- $parcel$export($408a78e5068502c2$exports, "focus-ring", () => $408a78e5068502c2$export$f39a09f249340e2a, (v) => $408a78e5068502c2$export$f39a09f249340e2a = v);
66
- $parcel$export($408a78e5068502c2$exports, "i18nFontFamily", () => $408a78e5068502c2$export$8c4ee2c50c22c514, (v) => $408a78e5068502c2$export$8c4ee2c50c22c514 = v);
67
- $parcel$export($408a78e5068502c2$exports, "is-drop-target", () => $408a78e5068502c2$export$d8467f38d2d00bd0, (v) => $408a78e5068502c2$export$d8467f38d2d00bd0 = v);
68
- $parcel$export($408a78e5068502c2$exports, "is-focused", () => $408a78e5068502c2$export$e7dc768d35940237, (v) => $408a78e5068502c2$export$e7dc768d35940237 = v);
69
- $parcel$export($408a78e5068502c2$exports, "is-hovered", () => $408a78e5068502c2$export$b8813cd5d7824ce7, (v) => $408a78e5068502c2$export$b8813cd5d7824ce7 = v);
70
- $parcel$export($408a78e5068502c2$exports, "is-selected", () => $408a78e5068502c2$export$1e0fb04f31d3c22a, (v) => $408a78e5068502c2$export$1e0fb04f31d3c22a = v);
71
- $parcel$export($408a78e5068502c2$exports, "preview", () => $408a78e5068502c2$export$48c2d0f2f545ac27, (v) => $408a78e5068502c2$export$48c2d0f2f545ac27 = v);
72
- $parcel$export($408a78e5068502c2$exports, "spectrum-Card", () => $408a78e5068502c2$export$4e5e9f191b1edb8, (v) => $408a78e5068502c2$export$4e5e9f191b1edb8 = v);
73
- $parcel$export($408a78e5068502c2$exports, "spectrum-Card--default", () => $408a78e5068502c2$export$c7a022df9e10a238, (v) => $408a78e5068502c2$export$c7a022df9e10a238 = v);
74
- $parcel$export($408a78e5068502c2$exports, "spectrum-Card--gallery", () => $408a78e5068502c2$export$ccd8ffc36bd10cc, (v) => $408a78e5068502c2$export$ccd8ffc36bd10cc = v);
75
- $parcel$export($408a78e5068502c2$exports, "spectrum-Card--grid", () => $408a78e5068502c2$export$59739ab951d2dcc7, (v) => $408a78e5068502c2$export$59739ab951d2dcc7 = v);
76
- $parcel$export($408a78e5068502c2$exports, "spectrum-Card--horizontal", () => $408a78e5068502c2$export$1c52334407225704, (v) => $408a78e5068502c2$export$1c52334407225704 = v);
77
- $parcel$export($408a78e5068502c2$exports, "spectrum-Card--isQuiet", () => $408a78e5068502c2$export$92ad04b5ac9296ea, (v) => $408a78e5068502c2$export$92ad04b5ac9296ea = v);
78
- $parcel$export($408a78e5068502c2$exports, "spectrum-Card--noLayout", () => $408a78e5068502c2$export$a03d836e6ef3e749, (v) => $408a78e5068502c2$export$a03d836e6ef3e749 = v);
79
- $parcel$export($408a78e5068502c2$exports, "spectrum-Card--noPreview", () => $408a78e5068502c2$export$b77922bc0320c9e4, (v) => $408a78e5068502c2$export$b77922bc0320c9e4 = v);
80
- $parcel$export($408a78e5068502c2$exports, "spectrum-Card--waterfall", () => $408a78e5068502c2$export$d9c7209e0e4f7e4d, (v) => $408a78e5068502c2$export$d9c7209e0e4f7e4d = v);
81
- $parcel$export($408a78e5068502c2$exports, "spectrum-Card-avatar", () => $408a78e5068502c2$export$159930c59efb6273, (v) => $408a78e5068502c2$export$159930c59efb6273 = v);
82
- $parcel$export($408a78e5068502c2$exports, "spectrum-Card-checkbox", () => $408a78e5068502c2$export$842da5d48b8f6db2, (v) => $408a78e5068502c2$export$842da5d48b8f6db2 = v);
83
- $parcel$export($408a78e5068502c2$exports, "spectrum-Card-checkboxWrapper", () => $408a78e5068502c2$export$33977546b63e0df9, (v) => $408a78e5068502c2$export$33977546b63e0df9 = v);
84
- $parcel$export($408a78e5068502c2$exports, "spectrum-Card-content", () => $408a78e5068502c2$export$d946625b97e8aa17, (v) => $408a78e5068502c2$export$d946625b97e8aa17 = v);
85
- $parcel$export($408a78e5068502c2$exports, "spectrum-Card-decoration", () => $408a78e5068502c2$export$48252dc130b62514, (v) => $408a78e5068502c2$export$48252dc130b62514 = v);
86
- $parcel$export($408a78e5068502c2$exports, "spectrum-Card-detail", () => $408a78e5068502c2$export$16715af38fbd9819, (v) => $408a78e5068502c2$export$16715af38fbd9819 = v);
87
- $parcel$export($408a78e5068502c2$exports, "spectrum-Card-grid", () => $408a78e5068502c2$export$b3dd760d2dfde29e, (v) => $408a78e5068502c2$export$b3dd760d2dfde29e = v);
88
- $parcel$export($408a78e5068502c2$exports, "spectrum-Card-heading", () => $408a78e5068502c2$export$92758a4a0e8d19e4, (v) => $408a78e5068502c2$export$92758a4a0e8d19e4 = v);
89
- $parcel$export($408a78e5068502c2$exports, "spectrum-Card-illustration", () => $408a78e5068502c2$export$13dd3510ae7a8399, (v) => $408a78e5068502c2$export$13dd3510ae7a8399 = v);
90
- $parcel$export($408a78e5068502c2$exports, "spectrum-Card-image", () => $408a78e5068502c2$export$8d5fea71dc66db80, (v) => $408a78e5068502c2$export$8d5fea71dc66db80 = v);
91
- $parcel$export($408a78e5068502c2$exports, "spectrum-CardView", () => $408a78e5068502c2$export$2f34e9e3e0b89d95, (v) => $408a78e5068502c2$export$2f34e9e3e0b89d95 = v);
92
- $parcel$export($408a78e5068502c2$exports, "spectrum-CardView-centeredWrapper", () => $408a78e5068502c2$export$7fc89689fcfab196, (v) => $408a78e5068502c2$export$7fc89689fcfab196 = v);
93
- $parcel$export($408a78e5068502c2$exports, "spectrum-CardView-row", () => $408a78e5068502c2$export$4746ac09daa215ae, (v) => $408a78e5068502c2$export$4746ac09daa215ae = v);
94
- $parcel$export($408a78e5068502c2$exports, "spectrum-FocusRing-ring", () => $408a78e5068502c2$export$4109102f950813a6, (v) => $408a78e5068502c2$export$4109102f950813a6 = v);
95
- $parcel$export($408a78e5068502c2$exports, "spectrum-FocusRing", () => $408a78e5068502c2$export$24c7f46a6e3605dd, (v) => $408a78e5068502c2$export$24c7f46a6e3605dd = v);
96
- $parcel$export($408a78e5068502c2$exports, "spectrum-FocusRing--quiet", () => $408a78e5068502c2$export$2927016961429360, (v) => $408a78e5068502c2$export$2927016961429360 = v);
97
- $parcel$export($408a78e5068502c2$exports, "title", () => $408a78e5068502c2$export$fb184b623420d9be, (v) => $408a78e5068502c2$export$fb184b623420d9be = v);
98
- var $408a78e5068502c2$export$345c5736c8054f22;
99
- var $408a78e5068502c2$export$a7db06668cad9adb;
100
- var $408a78e5068502c2$export$13a2d28b88853ef2;
101
- var $408a78e5068502c2$export$f39a09f249340e2a;
102
- var $408a78e5068502c2$export$8c4ee2c50c22c514;
103
- var $408a78e5068502c2$export$d8467f38d2d00bd0;
104
- var $408a78e5068502c2$export$e7dc768d35940237;
105
- var $408a78e5068502c2$export$b8813cd5d7824ce7;
106
- var $408a78e5068502c2$export$1e0fb04f31d3c22a;
107
- var $408a78e5068502c2$export$48c2d0f2f545ac27;
108
- var $408a78e5068502c2$export$4e5e9f191b1edb8;
109
- var $408a78e5068502c2$export$c7a022df9e10a238;
110
- var $408a78e5068502c2$export$ccd8ffc36bd10cc;
111
- var $408a78e5068502c2$export$59739ab951d2dcc7;
112
- var $408a78e5068502c2$export$1c52334407225704;
113
- var $408a78e5068502c2$export$92ad04b5ac9296ea;
114
- var $408a78e5068502c2$export$a03d836e6ef3e749;
115
- var $408a78e5068502c2$export$b77922bc0320c9e4;
116
- var $408a78e5068502c2$export$d9c7209e0e4f7e4d;
117
- var $408a78e5068502c2$export$159930c59efb6273;
118
- var $408a78e5068502c2$export$842da5d48b8f6db2;
119
- var $408a78e5068502c2$export$33977546b63e0df9;
120
- var $408a78e5068502c2$export$d946625b97e8aa17;
121
- var $408a78e5068502c2$export$48252dc130b62514;
122
- var $408a78e5068502c2$export$16715af38fbd9819;
123
- var $408a78e5068502c2$export$b3dd760d2dfde29e;
124
- var $408a78e5068502c2$export$92758a4a0e8d19e4;
125
- var $408a78e5068502c2$export$13dd3510ae7a8399;
126
- var $408a78e5068502c2$export$8d5fea71dc66db80;
127
- var $408a78e5068502c2$export$2f34e9e3e0b89d95;
128
- var $408a78e5068502c2$export$7fc89689fcfab196;
129
- var $408a78e5068502c2$export$4746ac09daa215ae;
130
- var $408a78e5068502c2$export$4109102f950813a6;
131
- var $408a78e5068502c2$export$24c7f46a6e3605dd;
132
- var $408a78e5068502c2$export$2927016961429360;
133
- var $408a78e5068502c2$export$fb184b623420d9be;
134
- $408a78e5068502c2$export$345c5736c8054f22 = `dqWSla_avatar`;
135
- $408a78e5068502c2$export$a7db06668cad9adb = `dqWSla_content`;
136
- $408a78e5068502c2$export$13a2d28b88853ef2 = `dqWSla_detail`;
137
- $408a78e5068502c2$export$f39a09f249340e2a = `dqWSla_focus-ring`;
138
- $408a78e5068502c2$export$8c4ee2c50c22c514 = `dqWSla_i18nFontFamily`;
139
- $408a78e5068502c2$export$d8467f38d2d00bd0 = `dqWSla_is-drop-target`;
140
- $408a78e5068502c2$export$e7dc768d35940237 = `dqWSla_is-focused`;
141
- $408a78e5068502c2$export$b8813cd5d7824ce7 = `dqWSla_is-hovered`;
142
- $408a78e5068502c2$export$1e0fb04f31d3c22a = `dqWSla_is-selected`;
143
- $408a78e5068502c2$export$48c2d0f2f545ac27 = `dqWSla_preview`;
144
- $408a78e5068502c2$export$4e5e9f191b1edb8 = `dqWSla_spectrum-Card`;
145
- $408a78e5068502c2$export$c7a022df9e10a238 = `dqWSla_spectrum-Card--default`;
146
- $408a78e5068502c2$export$ccd8ffc36bd10cc = `dqWSla_spectrum-Card--gallery`;
147
- $408a78e5068502c2$export$59739ab951d2dcc7 = `dqWSla_spectrum-Card--grid`;
148
- $408a78e5068502c2$export$1c52334407225704 = `dqWSla_spectrum-Card--horizontal`;
149
- $408a78e5068502c2$export$92ad04b5ac9296ea = `dqWSla_spectrum-Card--isQuiet`;
150
- $408a78e5068502c2$export$a03d836e6ef3e749 = `dqWSla_spectrum-Card--noLayout`;
151
- $408a78e5068502c2$export$b77922bc0320c9e4 = `dqWSla_spectrum-Card--noPreview`;
152
- $408a78e5068502c2$export$d9c7209e0e4f7e4d = `dqWSla_spectrum-Card--waterfall`;
153
- $408a78e5068502c2$export$159930c59efb6273 = `dqWSla_spectrum-Card-avatar`;
154
- $408a78e5068502c2$export$842da5d48b8f6db2 = `dqWSla_spectrum-Card-checkbox`;
155
- $408a78e5068502c2$export$33977546b63e0df9 = `dqWSla_spectrum-Card-checkboxWrapper`;
156
- $408a78e5068502c2$export$d946625b97e8aa17 = `dqWSla_spectrum-Card-content`;
157
- $408a78e5068502c2$export$48252dc130b62514 = `dqWSla_spectrum-Card-decoration`;
158
- $408a78e5068502c2$export$16715af38fbd9819 = `dqWSla_spectrum-Card-detail`;
159
- $408a78e5068502c2$export$b3dd760d2dfde29e = `dqWSla_spectrum-Card-grid`;
160
- $408a78e5068502c2$export$92758a4a0e8d19e4 = `dqWSla_spectrum-Card-heading`;
161
- $408a78e5068502c2$export$13dd3510ae7a8399 = `dqWSla_spectrum-Card-illustration`;
162
- $408a78e5068502c2$export$8d5fea71dc66db80 = `dqWSla_spectrum-Card-image`;
163
- $408a78e5068502c2$export$2f34e9e3e0b89d95 = `dqWSla_spectrum-CardView`;
164
- $408a78e5068502c2$export$7fc89689fcfab196 = `dqWSla_spectrum-CardView-centeredWrapper`;
165
- $408a78e5068502c2$export$4746ac09daa215ae = `dqWSla_spectrum-CardView-row`;
166
- $408a78e5068502c2$export$4109102f950813a6 = `dqWSla_spectrum-FocusRing-ring`;
167
- $408a78e5068502c2$export$24c7f46a6e3605dd = `dqWSla_spectrum-FocusRing ${$408a78e5068502c2$export$4109102f950813a6}`;
168
- $408a78e5068502c2$export$2927016961429360 = `dqWSla_spectrum-FocusRing--quiet`;
169
- $408a78e5068502c2$export$fb184b623420d9be = `dqWSla_title`;
170
-
171
-
172
- /*
173
- * Copyright 2020 Adobe. All rights reserved.
174
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
175
- * you may not use this file except in compliance with the License. You may obtain a copy
176
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
177
- *
178
- * Unless required by applicable law or agreed to in writing, software distributed under
179
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
180
- * OF ANY KIND, either express or implied. See the License for the specific language
181
- * governing permissions and limitations under the License.
182
- */
183
- const $8d180a244893de14$export$64992ac69f286e5c = /*#__PURE__*/ (0, $8EWFi$react).createContext(null);
184
- function $8d180a244893de14$export$fea0b38586ec8f13() {
185
- return (0, $8EWFi$useContext)($8d180a244893de14$export$64992ac69f286e5c);
186
- }
187
-
188
-
189
-
190
-
191
- function $643dd8fa80926f94$var$CardBase(props, ref) {
192
- props = (0, $8EWFi$useProviderProps)(props);
193
- let context = (0, $8d180a244893de14$export$fea0b38586ec8f13)() || {}; // we can call again here, won't change from Card.tsx
194
- let { state: state } = context;
195
- let manager = state === null || state === void 0 ? void 0 : state.selectionManager;
196
- let { isQuiet: isQuiet, orientation: orientation = "vertical", articleProps: articleProps = {}, item: item, layout: layout, children: children } = props;
197
- let key = item === null || item === void 0 ? void 0 : item.key;
198
- let isSelected = manager === null || manager === void 0 ? void 0 : manager.isSelected(key);
199
- let isDisabled = state === null || state === void 0 ? void 0 : state.disabledKeys.has(key);
200
- let onChange = ()=>{
201
- return manager === null || manager === void 0 ? void 0 : manager.select(key);
202
- };
203
- let { styleProps: styleProps } = (0, $8EWFi$useStyleProps)(props);
204
- let { cardProps: cardProps, titleProps: titleProps, contentProps: contentProps } = $643dd8fa80926f94$var$useCard(props);
205
- let domRef = (0, $8EWFi$useDOMRef)(ref);
206
- let gridRef = (0, $8EWFi$useRef)();
207
- let checkboxRef = (0, $8EWFi$useRef)(null);
208
- // cards are only interactive if there is a selection manager and it allows selection
209
- let { hoverProps: hoverProps, isHovered: isHovered } = (0, $8EWFi$useHover)({
210
- isDisabled: manager === undefined || (manager === null || manager === void 0 ? void 0 : manager.selectionMode) === "none" || isDisabled
211
- });
212
- let [isFocused, setIsFocused] = (0, $8EWFi$useState)(false);
213
- let { focusWithinProps: focusWithinProps } = (0, $8EWFi$useFocusWithin)({
214
- onFocusWithinChange: setIsFocused,
215
- isDisabled: isDisabled
216
- });
217
- // ToDo: see css for comment about avatar under selector .spectrum-Card--noLayout.spectrum-Card--default
218
- let hasPreviewImage = (0, $8EWFi$useHasChild)(`.${(0, (/*@__PURE__*/$parcel$interopDefault($408a78e5068502c2$exports)))["spectrum-Card-image"]}`, gridRef);
219
- let hasPreviewIllustration = (0, $8EWFi$useHasChild)(`.${(0, (/*@__PURE__*/$parcel$interopDefault($408a78e5068502c2$exports)))["spectrum-Card-illustration"]}`, gridRef);
220
- let hasPreview = hasPreviewImage || hasPreviewIllustration;
221
- // this is for horizontal cards
222
- let [height, setHeight] = (0, $8EWFi$useState)(NaN);
223
- let updateHeight = (0, $8EWFi$useCallback)(()=>{
224
- if (orientation !== "horizontal") return;
225
- let cardHeight = gridRef.current.getBoundingClientRect().height;
226
- setHeight(cardHeight);
227
- }, [
228
- orientation,
229
- gridRef,
230
- setHeight
231
- ]);
232
- (0, $8EWFi$useResizeObserver)({
233
- ref: gridRef,
234
- onResize: updateHeight
235
- });
236
- let aspectRatioEnforce = undefined;
237
- if (orientation === "horizontal" && !isNaN(height)) aspectRatioEnforce = {
238
- height: `${height}px`,
239
- width: `${height}px`
240
- };
241
- let slots = (0, $8EWFi$useMemo)(()=>({
242
- image: {
243
- UNSAFE_className: (0, $8EWFi$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($408a78e5068502c2$exports))), "spectrum-Card-image"),
244
- objectFit: orientation === "horizontal" ? "cover" : "contain",
245
- alt: "",
246
- ...aspectRatioEnforce
247
- },
248
- illustration: {
249
- UNSAFE_className: (0, $8EWFi$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($408a78e5068502c2$exports))), "spectrum-Card-illustration"),
250
- ...aspectRatioEnforce
251
- },
252
- avatar: {
253
- UNSAFE_className: (0, $8EWFi$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($408a78e5068502c2$exports))), "spectrum-Card-avatar"),
254
- size: "avatar-size-400"
255
- },
256
- heading: {
257
- UNSAFE_className: (0, $8EWFi$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($408a78e5068502c2$exports))), "spectrum-Card-heading"),
258
- ...titleProps
259
- },
260
- content: {
261
- UNSAFE_className: (0, $8EWFi$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($408a78e5068502c2$exports))), "spectrum-Card-content"),
262
- ...contentProps
263
- },
264
- detail: {
265
- UNSAFE_className: (0, $8EWFi$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($408a78e5068502c2$exports))), "spectrum-Card-detail")
266
- }
267
- }), [
268
- titleProps,
269
- contentProps,
270
- height,
271
- isQuiet,
272
- orientation
273
- ]);
274
- (0, $8EWFi$useLayoutEffect)(()=>{
275
- if (gridRef === null || gridRef === void 0 ? void 0 : gridRef.current) {
276
- let walker = (0, $8EWFi$getFocusableTreeWalker)(gridRef.current);
277
- let nextNode = walker.nextNode();
278
- while(nextNode != null){
279
- if (checkboxRef.current && !checkboxRef.current.UNSAFE_getDOMNode().contains(nextNode)) {
280
- console.warn("Card does not support focusable elements, please contact the team regarding your use case.");
281
- break;
282
- }
283
- nextNode = walker.nextNode();
284
- }
285
- }
286
- }, [
287
- children
288
- ]);
289
- return /*#__PURE__*/ (0, $8EWFi$react).createElement((0, $8EWFi$FocusRing), {
290
- focusRingClass: (0, $8EWFi$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($408a78e5068502c2$exports))), "focus-ring")
291
- }, /*#__PURE__*/ (0, $8EWFi$react).createElement("article", {
292
- ...styleProps,
293
- ...(0, $8EWFi$mergeProps)(cardProps, focusWithinProps, hoverProps, (0, $8EWFi$filterDOMProps)(props), articleProps),
294
- ref: domRef,
295
- className: (0, $8EWFi$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($408a78e5068502c2$exports))), "spectrum-Card", {
296
- "spectrum-Card--default": !isQuiet && orientation !== "horizontal",
297
- "spectrum-Card--isQuiet": isQuiet && orientation !== "horizontal",
298
- "spectrum-Card--horizontal": orientation === "horizontal",
299
- "spectrum-Card--noPreview": !hasPreview,
300
- "is-hovered": isHovered,
301
- "is-focused": isFocused,
302
- "is-selected": isSelected,
303
- "spectrum-Card--waterfall": layout === "waterfall",
304
- "spectrum-Card--gallery": layout === "gallery",
305
- "spectrum-Card--grid": layout === "grid",
306
- "spectrum-Card--noLayout": layout !== "waterfall" && layout !== "gallery" && layout !== "grid"
307
- }, styleProps.className)
308
- }, /*#__PURE__*/ (0, $8EWFi$react).createElement("div", {
309
- ref: gridRef,
310
- className: (0, $8EWFi$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($408a78e5068502c2$exports))), "spectrum-Card-grid")
311
- }, manager && manager.selectionMode !== "none" && /*#__PURE__*/ (0, $8EWFi$react).createElement("div", {
312
- className: (0, $8EWFi$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($408a78e5068502c2$exports))), "spectrum-Card-checkboxWrapper")
313
- }, /*#__PURE__*/ (0, $8EWFi$react).createElement((0, $8EWFi$Checkbox), {
314
- ref: checkboxRef,
315
- isDisabled: isDisabled,
316
- excludeFromTabOrder: true,
317
- isSelected: isSelected,
318
- onChange: onChange,
319
- UNSAFE_className: (0, $8EWFi$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($408a78e5068502c2$exports))), "spectrum-Card-checkbox"),
320
- isEmphasized: true,
321
- "aria-label": "select"
322
- })), /*#__PURE__*/ (0, $8EWFi$react).createElement((0, $8EWFi$SlotProvider), {
323
- slots: slots
324
- }, children), /*#__PURE__*/ (0, $8EWFi$react).createElement("div", {
325
- className: (0, $8EWFi$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($408a78e5068502c2$exports))), "spectrum-Card-decoration")
326
- }))));
327
- }
328
- function $643dd8fa80926f94$var$useCard(props) {
329
- let titleId = (0, $8EWFi$useSlotId)();
330
- let descriptionId = (0, $8EWFi$useSlotId)();
331
- let titleProps = (0, $8EWFi$useMemo)(()=>({
332
- id: titleId
333
- }), [
334
- titleId
335
- ]);
336
- let contentProps = (0, $8EWFi$useMemo)(()=>({
337
- id: descriptionId
338
- }), [
339
- descriptionId
340
- ]);
341
- return {
342
- cardProps: {
343
- ...(0, $8EWFi$filterDOMProps)(props),
344
- "aria-labelledby": titleId,
345
- "aria-describedby": descriptionId,
346
- tabIndex: 0
347
- },
348
- titleProps: titleProps,
349
- contentProps: contentProps
350
- };
351
- }
352
- /**
353
- * TODO: Add description of component here.
354
- */ const $643dd8fa80926f94$export$7a6ccaf429ad93a8 = /*#__PURE__*/ (0, $8EWFi$react).forwardRef($643dd8fa80926f94$var$CardBase);
355
-
356
-
357
-
358
-
359
-
360
- var $49aba923a95704ba$exports = {};
361
- var $6cb102354c06de53$exports = {};
362
- $6cb102354c06de53$exports = {
363
- "loading": `جارٍ التحميل...`,
364
- "loadingMore": `جارٍ تحميل المزيد...`
365
- };
366
-
367
-
368
- var $17b8c838d83f13fc$exports = {};
369
- $17b8c838d83f13fc$exports = {
370
- "loading": `Зареждане...`,
371
- "loadingMore": `Зареждане на още...`
372
- };
373
-
374
-
375
- var $1ddb4e1a3e8b15a5$exports = {};
376
- $1ddb4e1a3e8b15a5$exports = {
377
- "loading": `Načítání...`,
378
- "loadingMore": `Načítání dalších...`
379
- };
380
-
381
-
382
- var $44b7f17cd1f1db7f$exports = {};
383
- $44b7f17cd1f1db7f$exports = {
384
- "loading": `Indlæser...`,
385
- "loadingMore": `Indlæser flere...`
386
- };
387
-
388
-
389
- var $ffa85bef2c730318$exports = {};
390
- $ffa85bef2c730318$exports = {
391
- "loading": `Wird geladen...`,
392
- "loadingMore": `Noch mehr wird geladen...`
393
- };
394
-
395
-
396
- var $1904be2ca25ad4ef$exports = {};
397
- $1904be2ca25ad4ef$exports = {
398
- "loading": `Φόρτωση...`,
399
- "loadingMore": `Φόρτωση περισσότερων...`
400
- };
401
-
402
-
403
- var $d120e7d3833466fb$exports = {};
404
- $d120e7d3833466fb$exports = {
405
- "loading": `Loading…`,
406
- "loadingMore": `Loading more…`
407
- };
408
-
409
-
410
- var $fe39ef3292597d11$exports = {};
411
- $fe39ef3292597d11$exports = {
412
- "loading": `Cargando…`,
413
- "loadingMore": `Cargando más…`
414
- };
415
-
416
-
417
- var $3204c020860ca192$exports = {};
418
- $3204c020860ca192$exports = {
419
- "loading": `Laadimine...`,
420
- "loadingMore": `Laadi rohkem...`
421
- };
422
-
423
-
424
- var $5ced2ee930f1d61a$exports = {};
425
- $5ced2ee930f1d61a$exports = {
426
- "loading": `Ladataan…`,
427
- "loadingMore": `Ladataan lisää…`
428
- };
429
-
430
-
431
- var $bd751114db2e8872$exports = {};
432
- $bd751114db2e8872$exports = {
433
- "loading": `Chargement en cours…`,
434
- "loadingMore": `Chargement d’autres d’éléments…`
435
- };
436
-
437
-
438
- var $6291b4a5eb5146c5$exports = {};
439
- $6291b4a5eb5146c5$exports = {
440
- "loading": `טוען...`,
441
- "loadingMore": `טוען עוד...`
442
- };
443
-
444
-
445
- var $cdc3f7b2aa8b1879$exports = {};
446
- $cdc3f7b2aa8b1879$exports = {
447
- "loading": `Učitavam...`,
448
- "loadingMore": `Učitavam još...`
449
- };
450
-
451
-
452
- var $1a69968dcbcabdff$exports = {};
453
- $1a69968dcbcabdff$exports = {
454
- "loading": `Betöltés folyamatban…`,
455
- "loadingMore": `Továbbiak betöltése folyamatban…`
456
- };
457
-
458
-
459
- var $fe72420090e5e44f$exports = {};
460
- $fe72420090e5e44f$exports = {
461
- "loading": `Caricamento...`,
462
- "loadingMore": `Caricamento altri...`
463
- };
464
-
465
-
466
- var $8643fac062a08b30$exports = {};
467
- $8643fac062a08b30$exports = {
468
- "loading": `読み込み中...`,
469
- "loadingMore": `さらに読み込み中...`
470
- };
471
-
472
-
473
- var $41f4de1d2f63c8f4$exports = {};
474
- $41f4de1d2f63c8f4$exports = {
475
- "loading": `로드 중…`,
476
- "loadingMore": `추가 로드 중…`
477
- };
478
-
479
-
480
- var $9819c3a9877418b0$exports = {};
481
- $9819c3a9877418b0$exports = {
482
- "loading": `Įkeliama…`,
483
- "loadingMore": `Įkeliama daugiau…`
484
- };
485
-
486
-
487
- var $3e8ad6b78b8cc064$exports = {};
488
- $3e8ad6b78b8cc064$exports = {
489
- "loading": `Notiek ielāde…`,
490
- "loadingMore": `Tiek ielādēts vēl...`
491
- };
492
-
493
-
494
- var $baa4fb210e65a6c5$exports = {};
495
- $baa4fb210e65a6c5$exports = {
496
- "loading": `Laster inn...`,
497
- "loadingMore": `Laster inn flere...`
498
- };
499
-
500
-
501
- var $ee123eda5b089b7d$exports = {};
502
- $ee123eda5b089b7d$exports = {
503
- "loading": `Laden...`,
504
- "loadingMore": `Meer laden...`
505
- };
506
-
507
-
508
- var $36a325cd1c9e414f$exports = {};
509
- $36a325cd1c9e414f$exports = {
510
- "loading": `Wczytywanie...`,
511
- "loadingMore": `Wczytywanie większej liczby...`
512
- };
513
-
514
-
515
- var $52d4fd0f211d7e51$exports = {};
516
- $52d4fd0f211d7e51$exports = {
517
- "loading": `Carregando...`,
518
- "loadingMore": `Carregando mais...`
519
- };
520
-
521
-
522
- var $ad1f55e36e4e9241$exports = {};
523
- $ad1f55e36e4e9241$exports = {
524
- "loading": `A carregar...`,
525
- "loadingMore": `A carregar mais...`
526
- };
527
-
528
-
529
- var $bfc201ee55c5f26f$exports = {};
530
- $bfc201ee55c5f26f$exports = {
531
- "loading": `Se încarcă...`,
532
- "loadingMore": `Se încarcă mai multe...`
533
- };
534
-
535
-
536
- var $5773113377d944b4$exports = {};
537
- $5773113377d944b4$exports = {
538
- "loading": `Загрузка...`,
539
- "loadingMore": `Дополнительная загрузка...`
540
- };
541
-
542
-
543
- var $75167f0b339049be$exports = {};
544
- $75167f0b339049be$exports = {
545
- "loading": `Načítava sa...`,
546
- "loadingMore": `Načítava sa viac...`
547
- };
548
-
549
-
550
- var $83a887ec3d5f2028$exports = {};
551
- $83a887ec3d5f2028$exports = {
552
- "loading": `Nalaganje...`,
553
- "loadingMore": `Nalaganje dodatne vsebine...`
554
- };
555
-
556
-
557
- var $8352707b2eadbfb4$exports = {};
558
- $8352707b2eadbfb4$exports = {
559
- "loading": `Učitavam...`,
560
- "loadingMore": `Učitavam još...`
561
- };
562
-
563
-
564
- var $212352f469058747$exports = {};
565
- $212352f469058747$exports = {
566
- "loading": `Läser in...`,
567
- "loadingMore": `Läser in mer...`
568
- };
569
-
570
-
571
- var $334510787f8a69f9$exports = {};
572
- $334510787f8a69f9$exports = {
573
- "loading": `Yükleniyor...`,
574
- "loadingMore": `Daha fazla yükleniyor...`
575
- };
576
-
577
-
578
- var $1b8fd2890c177825$exports = {};
579
- $1b8fd2890c177825$exports = {
580
- "loading": `Завантаження…`,
581
- "loadingMore": `Завантаження інших об’єктів...`
582
- };
583
-
584
-
585
- var $88c83d794a7a062b$exports = {};
586
- $88c83d794a7a062b$exports = {
587
- "loading": `正在加载...`,
588
- "loadingMore": `正在加载更多...`
589
- };
590
-
591
-
592
- var $b7e2865acb74a940$exports = {};
593
- $b7e2865acb74a940$exports = {
594
- "loading": `正在載入…`,
595
- "loadingMore": `正在載入更多…`
596
- };
597
-
598
-
599
- $49aba923a95704ba$exports = {
600
- "ar-AE": $6cb102354c06de53$exports,
601
- "bg-BG": $17b8c838d83f13fc$exports,
602
- "cs-CZ": $1ddb4e1a3e8b15a5$exports,
603
- "da-DK": $44b7f17cd1f1db7f$exports,
604
- "de-DE": $ffa85bef2c730318$exports,
605
- "el-GR": $1904be2ca25ad4ef$exports,
606
- "en-US": $d120e7d3833466fb$exports,
607
- "es-ES": $fe39ef3292597d11$exports,
608
- "et-EE": $3204c020860ca192$exports,
609
- "fi-FI": $5ced2ee930f1d61a$exports,
610
- "fr-FR": $bd751114db2e8872$exports,
611
- "he-IL": $6291b4a5eb5146c5$exports,
612
- "hr-HR": $cdc3f7b2aa8b1879$exports,
613
- "hu-HU": $1a69968dcbcabdff$exports,
614
- "it-IT": $fe72420090e5e44f$exports,
615
- "ja-JP": $8643fac062a08b30$exports,
616
- "ko-KR": $41f4de1d2f63c8f4$exports,
617
- "lt-LT": $9819c3a9877418b0$exports,
618
- "lv-LV": $3e8ad6b78b8cc064$exports,
619
- "nb-NO": $baa4fb210e65a6c5$exports,
620
- "nl-NL": $ee123eda5b089b7d$exports,
621
- "pl-PL": $36a325cd1c9e414f$exports,
622
- "pt-BR": $52d4fd0f211d7e51$exports,
623
- "pt-PT": $ad1f55e36e4e9241$exports,
624
- "ro-RO": $bfc201ee55c5f26f$exports,
625
- "ru-RU": $5773113377d944b4$exports,
626
- "sk-SK": $75167f0b339049be$exports,
627
- "sl-SI": $83a887ec3d5f2028$exports,
628
- "sr-SP": $8352707b2eadbfb4$exports,
629
- "sv-SE": $212352f469058747$exports,
630
- "tr-TR": $334510787f8a69f9$exports,
631
- "uk-UA": $1b8fd2890c177825$exports,
632
- "zh-CN": $88c83d794a7a062b$exports,
633
- "zh-TW": $b7e2865acb74a940$exports
634
- };
635
-
636
-
637
-
638
-
639
-
640
-
641
-
642
-
643
-
644
-
645
-
646
- function $81a52da995c19652$var$CardView(props, ref) {
647
- let { scale: scale } = (0, $8EWFi$useProvider)();
648
- let { styleProps: styleProps } = (0, $8EWFi$useStyleProps)(props);
649
- let domRef = (0, $8EWFi$useDOMRef)(ref);
650
- let { isQuiet: isQuiet, renderEmptyState: renderEmptyState, layout: layout, loadingState: loadingState, onLoadMore: onLoadMore, cardOrientation: cardOrientation = "vertical" } = props;
651
- let collator = (0, $8EWFi$useCollator)({
652
- usage: "search",
653
- sensitivity: "base"
654
- });
655
- let isLoading = loadingState === "loading" || loadingState === "loadingMore";
656
- let cardViewLayout = (0, $8EWFi$useMemo)(()=>typeof layout === "function" ? new layout({
657
- collator: collator,
658
- cardOrientation: cardOrientation,
659
- scale: scale
660
- }) : layout, [
661
- layout,
662
- collator,
663
- cardOrientation,
664
- scale
665
- ]);
666
- let layoutType = cardViewLayout.layoutType;
667
- let stringFormatter = (0, $8EWFi$useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($49aba923a95704ba$exports))));
668
- let { direction: direction } = (0, $8EWFi$useLocale)();
669
- let { collection: collection } = (0, $8EWFi$useListState)(props);
670
- let gridCollection = (0, $8EWFi$useMemo)(()=>new (0, $8EWFi$GridCollection)({
671
- columnCount: 1,
672
- items: [
673
- ...collection
674
- ].map((item)=>({
675
- // Makes the Grid row use the keys the user provides to the cards so that selection change via interactions returns the card keys
676
- ...item,
677
- hasChildNodes: true,
678
- childNodes: [
679
- {
680
- key: `cell-${item.key}`,
681
- type: "cell",
682
- value: null,
683
- level: 0,
684
- rendered: null,
685
- textValue: item.textValue,
686
- hasChildNodes: false,
687
- childNodes: []
688
- }
689
- ]
690
- }))
691
- }), [
692
- collection
693
- ]);
694
- let state = (0, $8EWFi$useGridState)({
695
- ...props,
696
- selectionMode: cardOrientation === "horizontal" && layoutType === "grid" ? "none" : props.selectionMode,
697
- collection: gridCollection,
698
- focusMode: "cell"
699
- });
700
- cardViewLayout.collection = gridCollection;
701
- cardViewLayout.disabledKeys = state.disabledKeys;
702
- cardViewLayout.isLoading = isLoading;
703
- cardViewLayout.direction = direction;
704
- let { gridProps: gridProps } = (0, $8EWFi$useGrid)({
705
- ...props,
706
- isVirtualized: true,
707
- keyboardDelegate: cardViewLayout
708
- }, state, domRef);
709
- let renderWrapper = (parent, reusableView)=>{
710
- /*#__PURE__*/ return (0, $8EWFi$react).createElement((0, $8EWFi$VirtualizerItem), {
711
- key: reusableView.key,
712
- layoutInfo: reusableView.layoutInfo,
713
- virtualizer: reusableView.virtualizer,
714
- parent: parent === null || parent === void 0 ? void 0 : parent.layoutInfo
715
- }, reusableView.rendered);
716
- };
717
- let focusedKey = state.selectionManager.focusedKey;
718
- let focusedItem = gridCollection.getItem(state.selectionManager.focusedKey);
719
- if ((focusedItem === null || focusedItem === void 0 ? void 0 : focusedItem.parentKey) != null) focusedKey = focusedItem.parentKey;
720
- let margin = cardViewLayout.margin || 0;
721
- let virtualizer = cardViewLayout.virtualizer;
722
- let scrollToItem = (0, $8EWFi$useCallback)((key)=>{
723
- virtualizer && virtualizer.scrollToItem(key, {
724
- duration: 0,
725
- offsetY: margin
726
- });
727
- }, [
728
- margin,
729
- virtualizer
730
- ]);
731
- // TODO: does aria-row count and aria-col count need to be modified? Perhaps aria-col count needs to be omitted
732
- return /*#__PURE__*/ (0, $8EWFi$react).createElement((0, $8d180a244893de14$export$64992ac69f286e5c).Provider, {
733
- value: {
734
- state: state,
735
- isQuiet: isQuiet,
736
- layout: cardViewLayout,
737
- cardOrientation: cardOrientation
738
- }
739
- }, /*#__PURE__*/ (0, $8EWFi$react).createElement((0, $8EWFi$Virtualizer), {
740
- ...gridProps,
741
- ...styleProps,
742
- className: (0, $8EWFi$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($408a78e5068502c2$exports))), "spectrum-CardView"),
743
- ref: domRef,
744
- focusedKey: focusedKey,
745
- scrollDirection: "vertical",
746
- layout: cardViewLayout,
747
- collection: gridCollection,
748
- isLoading: isLoading,
749
- onLoadMore: onLoadMore,
750
- renderWrapper: renderWrapper,
751
- transitionDuration: isLoading ? 160 : 220,
752
- scrollToItem: scrollToItem
753
- }, (type, item)=>{
754
- if (type === "item") return /*#__PURE__*/ (0, $8EWFi$react).createElement($81a52da995c19652$var$InternalCard, {
755
- item: item
756
- });
757
- else if (type === "loader") return /*#__PURE__*/ (0, $8EWFi$react).createElement($81a52da995c19652$var$CenteredWrapper, null, /*#__PURE__*/ (0, $8EWFi$react).createElement((0, $8EWFi$ProgressCircle), {
758
- isIndeterminate: true,
759
- "aria-label": state.collection.size > 0 ? stringFormatter.format("loadingMore") : stringFormatter.format("loading")
760
- }));
761
- else if (type === "placeholder") {
762
- let emptyState = renderEmptyState ? renderEmptyState() : null;
763
- if (emptyState == null) return null;
764
- return /*#__PURE__*/ (0, $8EWFi$react).createElement($81a52da995c19652$var$CenteredWrapper, null, emptyState);
765
- }
766
- }));
767
- }
768
- function $81a52da995c19652$var$CenteredWrapper({ children: children }) {
769
- let { state: state } = (0, $8d180a244893de14$export$fea0b38586ec8f13)();
770
- return /*#__PURE__*/ (0, $8EWFi$react).createElement("div", {
771
- role: "row",
772
- "aria-rowindex": state.collection.size + 1,
773
- className: (0, $8EWFi$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($408a78e5068502c2$exports))), "spectrum-CardView-centeredWrapper")
774
- }, /*#__PURE__*/ (0, $8EWFi$react).createElement("div", {
775
- role: "gridcell"
776
- }, children));
777
- }
778
- function $81a52da995c19652$var$InternalCard(props) {
779
- let { item: item } = props;
780
- let cellNode = [
781
- ...item.childNodes
782
- ][0];
783
- let { state: state, cardOrientation: cardOrientation, isQuiet: isQuiet, layout: layout } = (0, $8d180a244893de14$export$fea0b38586ec8f13)();
784
- let layoutType = layout.layoutType;
785
- let rowRef = (0, $8EWFi$useRef)();
786
- let cellRef = (0, $8EWFi$useRef)();
787
- let unwrappedRef = (0, $8EWFi$useUnwrapDOMRef)(cellRef);
788
- let { rowProps: gridRowProps } = (0, $8EWFi$useGridRow)({
789
- node: item,
790
- isVirtualized: true
791
- }, state, rowRef);
792
- let { gridCellProps: gridCellProps } = (0, $8EWFi$useGridCell)({
793
- node: cellNode,
794
- focusMode: "cell"
795
- }, state, unwrappedRef);
796
- // Prevent space key from scrolling the CardView if triggered on a disabled item or on a Card in a selectionMode="none" CardView.
797
- let allowsInteraction = state.selectionManager.selectionMode !== "none";
798
- let isDisabled = !allowsInteraction || state.disabledKeys.has(item.key);
799
- let onKeyDown = (e)=>{
800
- if (e.key === " " && isDisabled) e.preventDefault();
801
- };
802
- let rowProps = (0, $8EWFi$mergeProps)(gridRowProps, {
803
- onKeyDown: onKeyDown
804
- });
805
- if (layoutType === "grid" || layoutType === "gallery") isQuiet = true;
806
- if (layoutType !== "grid") cardOrientation = "vertical";
807
- // We don't want to focus the checkbox (or any other focusable elements) within the Card
808
- // when pressing the arrow keys so we delete the key down handler here. Arrow key navigation between
809
- // the cards in the CardView is handled by useGrid => useSelectableCollection instead.
810
- delete gridCellProps.onKeyDownCapture;
811
- return /*#__PURE__*/ (0, $8EWFi$react).createElement("div", {
812
- ...rowProps,
813
- ref: rowRef,
814
- className: (0, $8EWFi$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($408a78e5068502c2$exports))), "spectrum-CardView-row")
815
- }, /*#__PURE__*/ (0, $8EWFi$react).createElement((0, $643dd8fa80926f94$export$7a6ccaf429ad93a8), {
816
- ref: cellRef,
817
- articleProps: gridCellProps,
818
- isQuiet: isQuiet,
819
- orientation: cardOrientation,
820
- item: item,
821
- layout: layoutType
822
- }, item.rendered));
823
- }
824
- /**
825
- * TODO: Add description of component here.
826
- */ const $81a52da995c19652$export$7e52c821f7b6f422 = /*#__PURE__*/ (0, $8EWFi$react).forwardRef($81a52da995c19652$var$CardView);
827
-
828
-
829
- /*
830
- * Copyright 2021 Adobe. All rights reserved.
831
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
832
- * you may not use this file except in compliance with the License. You may obtain a copy
833
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
834
- *
835
- * Unless required by applicable law or agreed to in writing, software distributed under
836
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
837
- * OF ANY KIND, either express or implied. See the License for the specific language
838
- * governing permissions and limitations under the License.
839
- */ /*
840
- * Copyright 2021 Adobe. All rights reserved.
841
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
842
- * you may not use this file except in compliance with the License. You may obtain a copy
843
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
844
- *
845
- * Unless required by applicable law or agreed to in writing, software distributed under
846
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
847
- * OF ANY KIND, either express or implied. See the License for the specific language
848
- * governing permissions and limitations under the License.
849
- */
850
-
851
- class $3d424c147206bac9$export$64943d2e59d72a29 extends (0, $8EWFi$Layout) {
852
- validate(invalidationContext) {
853
- this.collection = this.virtualizer.collection;
854
- this.buildCollection(invalidationContext);
855
- // Remove layout info that doesn't exist in new collection
856
- if (this.lastCollection) {
857
- for (let key of this.lastCollection.getKeys())if (!this.collection.getItem(key)) this.layoutInfos.delete(key);
858
- if (!this.isLoading) this.layoutInfos.delete("loader");
859
- if (this.collection.size > 0) this.layoutInfos.delete("placeholder");
860
- }
861
- this.lastCollection = this.collection;
862
- }
863
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
864
- buildCollection(invalidationContext) {}
865
- getContentSize() {
866
- return this.contentSize;
867
- }
868
- getLayoutInfo(key) {
869
- return this.layoutInfos.get(key);
870
- }
871
- getVisibleLayoutInfos(rect) {
872
- let res = [];
873
- for (let layoutInfo of this.layoutInfos.values())if (this.isVisible(layoutInfo, rect)) res.push(layoutInfo);
874
- return res;
875
- }
876
- isVisible(layoutInfo, rect) {
877
- return layoutInfo.rect.intersects(rect);
878
- }
879
- getInitialLayoutInfo(layoutInfo) {
880
- layoutInfo.opacity = 0;
881
- layoutInfo.transform = "scale3d(0.8, 0.8, 0.8)";
882
- return layoutInfo;
883
- }
884
- getFinalLayoutInfo(layoutInfo) {
885
- layoutInfo.opacity = 0;
886
- layoutInfo.transform = "scale3d(0.8, 0.8, 0.8)";
887
- return layoutInfo;
888
- }
889
- _findClosestLayoutInfo(target, rect) {
890
- let layoutInfos = this.getVisibleLayoutInfos(rect);
891
- let best = null;
892
- let bestDistance = Infinity;
893
- // Calculates distance as the distance between the center of 2 rects.
894
- for (let cur of layoutInfos)if (cur.type === "item") {
895
- let curRect = cur.rect;
896
- let targetMidX = (target.x + target.maxX) / 2;
897
- let targetMidY = (target.y + target.maxY) / 2;
898
- let curMidX = (curRect.x + curRect.maxX) / 2;
899
- let curMidY = (curRect.y + curRect.maxY) / 2;
900
- let dist = Math.pow(targetMidX - curMidX, 2) + Math.pow(targetMidY - curMidY, 2);
901
- if (dist < bestDistance) {
902
- best = cur;
903
- bestDistance = dist;
904
- }
905
- }
906
- return best;
907
- }
908
- _findClosest(target, rect) {
909
- let best = this._findClosestLayoutInfo(target, rect);
910
- return best || null;
911
- }
912
- getKeyBelow(key) {
913
- var _this__findClosest, _getFirstItem;
914
- // Expected key is the currently focused cell so we need the parent row key
915
- let parentRowKey = this.collection.getItem(key).parentKey;
916
- let layoutInfo = this.getLayoutInfo(parentRowKey);
917
- let rect = new (0, $8EWFi$Rect)(layoutInfo.rect.x, layoutInfo.rect.maxY + 1, layoutInfo.rect.width, this.virtualizer.visibleRect.height);
918
- let closestRow = this.collection.getItem((_this__findClosest = this._findClosest(layoutInfo.rect, rect)) === null || _this__findClosest === void 0 ? void 0 : _this__findClosest.key);
919
- return (_getFirstItem = (0, $8EWFi$getFirstItem)((0, $8EWFi$getChildNodes)(closestRow, this.collection))) === null || _getFirstItem === void 0 ? void 0 : _getFirstItem.key;
920
- }
921
- getKeyAbove(key) {
922
- var _this__findClosest, _getFirstItem;
923
- // Expected key is the currently focused cell so we need the parent row key
924
- let parentRowKey = this.collection.getItem(key).parentKey;
925
- let layoutInfo = this.getLayoutInfo(parentRowKey);
926
- let rect = new (0, $8EWFi$Rect)(layoutInfo.rect.x, 0, layoutInfo.rect.width, layoutInfo.rect.y - 1);
927
- let closestRow = this.collection.getItem((_this__findClosest = this._findClosest(layoutInfo.rect, rect)) === null || _this__findClosest === void 0 ? void 0 : _this__findClosest.key);
928
- return (_getFirstItem = (0, $8EWFi$getFirstItem)((0, $8EWFi$getChildNodes)(closestRow, this.collection))) === null || _getFirstItem === void 0 ? void 0 : _getFirstItem.key;
929
- }
930
- getKeyRightOf(key) {
931
- // Expected key is the currently focused cell so we need the parent row key
932
- let parentRowKey = this.collection.getItem(key).parentKey;
933
- key = this.direction === "rtl" ? this.collection.getKeyBefore(parentRowKey) : this.collection.getKeyAfter(parentRowKey);
934
- while(key != null){
935
- var _getFirstItem;
936
- let item = this.collection.getItem(key);
937
- // Don't check if item is disabled because we want to be able to focus disabled items in a grid (double check this)
938
- if (item.type === "item") return (_getFirstItem = (0, $8EWFi$getFirstItem)((0, $8EWFi$getChildNodes)(item, this.collection))) === null || _getFirstItem === void 0 ? void 0 : _getFirstItem.key;
939
- key = this.direction === "rtl" ? this.collection.getKeyBefore(key) : this.collection.getKeyAfter(key);
940
- }
941
- }
942
- getKeyLeftOf(key) {
943
- // Expected key is the currently focused cell so we need the parent row key
944
- let parentRowKey = this.collection.getItem(key).parentKey;
945
- key = this.direction === "rtl" ? this.collection.getKeyAfter(parentRowKey) : this.collection.getKeyBefore(parentRowKey);
946
- while(key != null){
947
- var _getFirstItem;
948
- let item = this.collection.getItem(key);
949
- // Don't check if item is disabled because we want to be able to focus disabled items in a grid (double check this)
950
- if (item.type === "item") return (_getFirstItem = (0, $8EWFi$getFirstItem)((0, $8EWFi$getChildNodes)(item, this.collection))) === null || _getFirstItem === void 0 ? void 0 : _getFirstItem.key;
951
- key = this.direction === "rtl" ? this.collection.getKeyAfter(key) : this.collection.getKeyBefore(key);
952
- }
953
- }
954
- getFirstKey() {
955
- var _getFirstItem;
956
- let firstRow = this.collection.getItem(this.collection.getFirstKey());
957
- return (_getFirstItem = (0, $8EWFi$getFirstItem)((0, $8EWFi$getChildNodes)(firstRow, this.collection))) === null || _getFirstItem === void 0 ? void 0 : _getFirstItem.key;
958
- }
959
- getLastKey() {
960
- var _getFirstItem;
961
- let lastRow = this.collection.getItem(this.collection.getLastKey());
962
- return (_getFirstItem = (0, $8EWFi$getFirstItem)((0, $8EWFi$getChildNodes)(lastRow, this.collection))) === null || _getFirstItem === void 0 ? void 0 : _getFirstItem.key;
963
- }
964
- // TODO: pretty unwieldy because it needs to bounce back and forth between the parent key and the child key
965
- // Perhaps have layoutInfo store childKey as well so we don't need to do this? Or maybe make the layoutInfos be the cells instead of the rows?
966
- getKeyPageAbove(key) {
967
- // Expected key is the currently focused cell so we need the parent row key
968
- let parentRowKey = this.collection.getItem(key).parentKey;
969
- let layoutInfo = this.getLayoutInfo(parentRowKey);
970
- if (layoutInfo) {
971
- var _this_collection_getItem;
972
- let pageY = Math.max(0, layoutInfo.rect.y + layoutInfo.rect.height - this.virtualizer.visibleRect.height);
973
- // If the node is so large that it spans multiple page heights, return the key of the item immediately above
974
- // Otherwise keep going up until we exceed a single page height worth of nodes
975
- let keyAbove = (_this_collection_getItem = this.collection.getItem(this.getKeyAbove(key))) === null || _this_collection_getItem === void 0 ? void 0 : _this_collection_getItem.parentKey;
976
- layoutInfo = this.getLayoutInfo(keyAbove);
977
- if (layoutInfo && layoutInfo.rect.y > pageY) while(layoutInfo && layoutInfo.rect.y > pageY){
978
- var _getFirstItem, _this_collection_getItem1;
979
- let childKey = (_getFirstItem = (0, $8EWFi$getFirstItem)((0, $8EWFi$getChildNodes)(this.collection.getItem(layoutInfo.key), this.collection))) === null || _getFirstItem === void 0 ? void 0 : _getFirstItem.key;
980
- let keyAbove = (_this_collection_getItem1 = this.collection.getItem(this.getKeyAbove(childKey))) === null || _this_collection_getItem1 === void 0 ? void 0 : _this_collection_getItem1.parentKey;
981
- layoutInfo = this.getLayoutInfo(keyAbove);
982
- }
983
- if (layoutInfo) {
984
- var _getFirstItem1;
985
- let childKey = (_getFirstItem1 = (0, $8EWFi$getFirstItem)((0, $8EWFi$getChildNodes)(this.collection.getItem(layoutInfo.key), this.collection))) === null || _getFirstItem1 === void 0 ? void 0 : _getFirstItem1.key;
986
- return childKey;
987
- }
988
- }
989
- return this.getFirstKey();
990
- }
991
- // TODO: pretty unwieldy because it needs to bounce back and forth between the parent key and the child key
992
- // Perhaps have layoutInfo store childKey as well so we don't need to do this?
993
- getKeyPageBelow(key) {
994
- // Expected key is the currently focused cell so we need the parent row key
995
- let parentRowKey = this.collection.getItem(key).parentKey;
996
- let layoutInfo = this.getLayoutInfo(parentRowKey);
997
- if (layoutInfo) {
998
- var _this_collection_getItem;
999
- let pageY = Math.min(this.virtualizer.contentSize.height, layoutInfo.rect.y - layoutInfo.rect.height + this.virtualizer.visibleRect.height);
1000
- // If the node is so large that it spans multiple page heights, return the key of the item immediately below
1001
- // Otherwise keep going up until we exceed a single page height worth of nodes
1002
- let keyBelow = (_this_collection_getItem = this.collection.getItem(this.getKeyBelow(key))) === null || _this_collection_getItem === void 0 ? void 0 : _this_collection_getItem.parentKey;
1003
- layoutInfo = this.getLayoutInfo(keyBelow);
1004
- if (layoutInfo && layoutInfo.rect.y < pageY) while(layoutInfo && layoutInfo.rect.y < pageY){
1005
- var _getFirstItem, _this_collection_getItem1;
1006
- let childKey = (_getFirstItem = (0, $8EWFi$getFirstItem)((0, $8EWFi$getChildNodes)(this.collection.getItem(layoutInfo.key), this.collection))) === null || _getFirstItem === void 0 ? void 0 : _getFirstItem.key;
1007
- let keyBelow = (_this_collection_getItem1 = this.collection.getItem(this.getKeyBelow(childKey))) === null || _this_collection_getItem1 === void 0 ? void 0 : _this_collection_getItem1.parentKey;
1008
- layoutInfo = this.getLayoutInfo(keyBelow);
1009
- }
1010
- if (layoutInfo) {
1011
- var _getFirstItem1;
1012
- let childKey = (_getFirstItem1 = (0, $8EWFi$getFirstItem)((0, $8EWFi$getChildNodes)(this.collection.getItem(layoutInfo.key), this.collection))) === null || _getFirstItem1 === void 0 ? void 0 : _getFirstItem1.key;
1013
- return childKey;
1014
- }
1015
- }
1016
- return this.getLastKey();
1017
- }
1018
- getKeyForSearch(search, fromKey) {
1019
- if (!this.collator) return null;
1020
- let collection = this.collection;
1021
- let key = fromKey !== null && fromKey !== void 0 ? fromKey : this.getFirstKey();
1022
- let startItem = collection.getItem(key);
1023
- key = startItem.parentKey;
1024
- while(key != null){
1025
- let item = collection.getItem(key);
1026
- if (item.textValue) {
1027
- var _getFirstItem;
1028
- let substring = item.textValue.slice(0, search.length);
1029
- if (this.collator.compare(substring, search) === 0) return (_getFirstItem = (0, $8EWFi$getFirstItem)((0, $8EWFi$getChildNodes)(item, this.collection))) === null || _getFirstItem === void 0 ? void 0 : _getFirstItem.key;
1030
- }
1031
- key = this.collection.getKeyAfter(key);
1032
- }
1033
- return null;
1034
- }
1035
- constructor(options = {}){
1036
- super();
1037
- this.disabledKeys = new Set();
1038
- this.layoutInfos = new Map();
1039
- this.collator = options.collator;
1040
- this.lastCollection = null;
1041
- this.scale = options.scale || "medium";
1042
- this.margin = options.margin || 24;
1043
- }
1044
- }
1045
-
1046
-
1047
-
1048
- const $c0ba81539c443916$var$DEFAULT_OPTIONS = {
1049
- S: {
1050
- idealRowHeight: 112,
1051
- minItemSize: new (0, $8EWFi$Size)(96, 96),
1052
- itemSpacing: new (0, $8EWFi$Size)(8, 16),
1053
- itemPadding: 24,
1054
- dropSpacing: 50,
1055
- margin: 8
1056
- },
1057
- L: {
1058
- idealRowHeight: 208,
1059
- minItemSize: new (0, $8EWFi$Size)(136, 136),
1060
- itemSpacing: new (0, $8EWFi$Size)(18, 18),
1061
- itemPadding: {
1062
- "medium": 78,
1063
- "large": 99
1064
- },
1065
- dropSpacing: 100,
1066
- margin: 24
1067
- }
1068
- };
1069
- class $c0ba81539c443916$export$8e52095834484b61 extends (0, $3d424c147206bac9$export$64943d2e59d72a29) {
1070
- get layoutType() {
1071
- return "gallery";
1072
- }
1073
- /**
1074
- * Takes a row of widths and if there are any widths smaller than the min-width, leech width starting from
1075
- * the widest in the row until it can't give anymore, then move to the second widest and so forth.
1076
- * Do this until all assets meet the min-width.
1077
- * */ _distributeWidths(widths) {
1078
- // create a copy of the widths array and sort it largest to smallest
1079
- let sortedWidths = widths.concat().sort((a, b)=>a[1] > b[1] ? -1 : 1);
1080
- for (let width of widths)// for each width, if it's smaller than the min width
1081
- if (width[1] < this.minItemSize.width) {
1082
- // then figure out how much smaller
1083
- let delta = this.minItemSize.width - width[1];
1084
- for (let item of sortedWidths)// go from the largest width in the row to the smallest
1085
- // if the width is greater than the min width
1086
- if (widths[item[0]][1] > this.minItemSize.width) {
1087
- // subtract the delta from the width, if it's still greater than the min width
1088
- // then we have finished, subtract the delta permanently from that width
1089
- // eslint-disable-next-line max-depth
1090
- if (widths[item[0]][1] - delta > this.minItemSize.width) {
1091
- widths[item[0]][1] -= delta;
1092
- delta = 0;
1093
- break;
1094
- } else {
1095
- // otherwise, we take as much as we can from the current width and then move on to
1096
- // the next largest and take some width from it
1097
- let maxChange = widths[item[0]][1] - this.minItemSize.width;
1098
- delta -= maxChange;
1099
- widths[item[0]][1] -= maxChange;
1100
- }
1101
- }
1102
- if (delta > 0) return false;
1103
- // force the width to be the min width that we just rebalanced for
1104
- width[1] = this.minItemSize.width;
1105
- }
1106
- return true;
1107
- }
1108
- buildCollection() {
1109
- let visibleWidth = this.virtualizer.visibleRect.width;
1110
- let visibleHeight = this.virtualizer.visibleRect.height;
1111
- let y = this.margin;
1112
- let availableWidth = visibleWidth - this.margin * 2;
1113
- // If avaliable width is not greater than 0, skip node layout calculations
1114
- if (availableWidth > 0) {
1115
- // Compute aspect ratios for all of the items, and the total width if all items were on in a single row.
1116
- let ratios = [];
1117
- let totalWidth = 0;
1118
- let minRatio = this.minItemSize.width / this.minItemSize.height;
1119
- let maxRatio = availableWidth / this.minItemSize.height;
1120
- for (let node of this.collection){
1121
- let ratio = node.props.width / node.props.height;
1122
- if (ratio < minRatio) ratio = minRatio;
1123
- else if (ratio > maxRatio && ratio !== minRatio) ratio = maxRatio;
1124
- let itemWidth = ratio * this.minItemSize.height;
1125
- ratios.push(ratio);
1126
- totalWidth += itemWidth;
1127
- }
1128
- totalWidth += this.itemSpacing.width * (this.collection.size - 1);
1129
- // Determine how many rows we'll need, and partition the items into rows
1130
- // using the aspect ratios as weights.
1131
- let rows = Math.max(1, Math.ceil(totalWidth / availableWidth));
1132
- // if the available width can't hold two items, then every item will get its own row
1133
- // this leads to a faster run through linear partition and more dependable output for small row widths
1134
- if (availableWidth <= this.minItemSize.width * 2 + this.itemPadding * 2) rows = this.collection.size;
1135
- let weightedRatios = ratios.map((ratio)=>ratio < this.threshold ? ratio + 0.5 * (1 / ratio) : ratio);
1136
- let partition = $c0ba81539c443916$var$linearPartition(weightedRatios, rows);
1137
- let index = 0;
1138
- for (let row of partition){
1139
- // Compute the total weight for this row
1140
- let totalWeight = 0;
1141
- for(let j = index; j < index + row.length; j++)totalWeight += ratios[j];
1142
- // Determine the row height based on the total available width and weight of this row.
1143
- let bestRowHeight = (availableWidth - (row.length - 1) * this.itemSpacing.width) / totalWeight;
1144
- // if this is the last row and the row height is >2x the ideal row height, then cap to the ideal height
1145
- // probably doing this because if the last row has one extremely tall image, then the row becomes huge
1146
- // though that can happen anywhere if a row has lots of tall images... so i'm not sure why this one matters
1147
- if (row === partition[partition.length - 1] && bestRowHeight > this.idealRowHeight * 2) bestRowHeight = this.idealRowHeight;
1148
- let itemHeight = Math.round(bestRowHeight) + this.itemPadding;
1149
- let x = this.margin;
1150
- // if any items are going to end up too small, add a bit of width to them and subtract it from wider objects
1151
- let widths = [];
1152
- for(let j = index; j < index + row.length; j++){
1153
- let width = Math.round(bestRowHeight * ratios[j]);
1154
- widths.push([
1155
- j - index,
1156
- width
1157
- ]);
1158
- }
1159
- this._distributeWidths(widths);
1160
- // Create items for this row.
1161
- for(let j = index; j < index + row.length; j++){
1162
- let node = this.collection.rows[j];
1163
- let itemWidth = Math.max(widths[j - index][1], this.minItemSize.width);
1164
- let rect = new (0, $8EWFi$Rect)(x, y, itemWidth, itemHeight);
1165
- let layoutInfo = new (0, $8EWFi$LayoutInfo)(node.type, node.key, rect);
1166
- layoutInfo.allowOverflow = true;
1167
- this.layoutInfos.set(node.key, layoutInfo);
1168
- x += itemWidth + this.itemSpacing.width;
1169
- }
1170
- y += itemHeight + this.itemSpacing.height;
1171
- index += row.length;
1172
- }
1173
- if (this.isLoading) {
1174
- let loaderY = y;
1175
- let loaderHeight = 60;
1176
- // If there aren't any items, make loader take all avaliable room and remove margin from y calculation
1177
- // so it doesn't scroll
1178
- if (this.collection.size === 0) {
1179
- loaderY = 0;
1180
- loaderHeight = visibleHeight || 60;
1181
- }
1182
- let rect = new (0, $8EWFi$Rect)(0, loaderY, visibleWidth, loaderHeight);
1183
- let loader = new (0, $8EWFi$LayoutInfo)("loader", "loader", rect);
1184
- this.layoutInfos.set("loader", loader);
1185
- y = loader.rect.maxY;
1186
- }
1187
- if (this.collection.size === 0 && !this.isLoading) {
1188
- let rect = new (0, $8EWFi$Rect)(0, 0, visibleWidth, visibleHeight);
1189
- let placeholder = new (0, $8EWFi$LayoutInfo)("placeholder", "placeholder", rect);
1190
- this.layoutInfos.set("placeholder", placeholder);
1191
- y = placeholder.rect.maxY;
1192
- }
1193
- }
1194
- this.contentSize = new (0, $8EWFi$Size)(visibleWidth, y);
1195
- }
1196
- constructor(options = {}){
1197
- super(options);
1198
- let cardSize = "L";
1199
- this.idealRowHeight = options.idealRowHeight || $c0ba81539c443916$var$DEFAULT_OPTIONS[cardSize].idealRowHeight;
1200
- this.itemSpacing = options.itemSpacing || $c0ba81539c443916$var$DEFAULT_OPTIONS[cardSize].itemSpacing;
1201
- this.itemPadding = options.itemPadding != null ? options.itemPadding : $c0ba81539c443916$var$DEFAULT_OPTIONS[cardSize].itemPadding[this.scale];
1202
- this.minItemSize = options.minItemSize || $c0ba81539c443916$var$DEFAULT_OPTIONS[cardSize].minItemSize;
1203
- this.threshold = options.threshold || 1;
1204
- this.margin = options.margin != null ? options.margin : $c0ba81539c443916$var$DEFAULT_OPTIONS[cardSize].margin;
1205
- }
1206
- }
1207
- // https://www8.cs.umu.se/kurser/TDBA77/VT06/algorithms/BOOK/BOOK2/NODE45.HTM
1208
- function $c0ba81539c443916$var$linearPartition(seq, k) {
1209
- let n = seq.length;
1210
- if (k <= 0) return [];
1211
- if (k >= n) return seq.map((x)=>[
1212
- x
1213
- ]);
1214
- if (n === 1) return [
1215
- seq
1216
- ];
1217
- let table = Array(n).fill(0).map(()=>Array(k).fill(0));
1218
- let solution = Array(n - 1).fill(0).map(()=>Array(k - 1).fill(0));
1219
- for(let i = 0; i < n; i++)table[i][0] = seq[i] + (i > 0 ? table[i - 1][0] : 0);
1220
- for(let i = 0; i < k; i++)table[0][i] = seq[0];
1221
- for(let i = 1; i < n; i++)for(let j = 1; j < k; j++){
1222
- let currentMin = 0;
1223
- let minX = Infinity;
1224
- for(let x = 0; x < i; x++){
1225
- let c1 = table[x][j - 1];
1226
- let c2 = table[i][0] - table[x][0];
1227
- let cost = Math.max(c1, c2);
1228
- if (!x || cost < currentMin) {
1229
- currentMin = cost;
1230
- minX = x;
1231
- }
1232
- }
1233
- table[i][j] = currentMin;
1234
- solution[i - 1][j - 1] = minX;
1235
- }
1236
- n = n - 1;
1237
- k = k - 2;
1238
- let result = [];
1239
- while(k >= 0){
1240
- if (n >= 1) {
1241
- let row = [];
1242
- for(let i = solution[n - 1][k] + 1; i < n + 1; i++)row.push(seq[i]);
1243
- result.unshift(row);
1244
- n = solution[n - 1][k];
1245
- }
1246
- k--;
1247
- }
1248
- let row = [];
1249
- for(let i = 0; i < n + 1; i++)row.push(seq[i]);
1250
- result.unshift(row);
1251
- return result;
1252
- }
1253
-
1254
-
1255
- /*
1256
- * Copyright 2021 Adobe. All rights reserved.
1257
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
1258
- * you may not use this file except in compliance with the License. You may obtain a copy
1259
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
1260
- *
1261
- * Unless required by applicable law or agreed to in writing, software distributed under
1262
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
1263
- * OF ANY KIND, either express or implied. See the License for the specific language
1264
- * governing permissions and limitations under the License.
1265
- */
1266
-
1267
-
1268
- const $ed42fd44b9b9b664$var$DEFAULT_OPTIONS = {
1269
- S: {
1270
- itemPadding: 20,
1271
- minItemSize: {
1272
- "vertical": new (0, $8EWFi$Size)(96, 96)
1273
- },
1274
- maxItemSize: new (0, $8EWFi$Size)(Infinity, Infinity),
1275
- margin: 8,
1276
- minSpace: new (0, $8EWFi$Size)(6, 6),
1277
- maxColumns: Infinity,
1278
- dropSpacing: 50
1279
- },
1280
- L: {
1281
- itemPadding: {
1282
- "vertical": {
1283
- "medium": 78,
1284
- "large": 98
1285
- },
1286
- "horizontal": {
1287
- "medium": 150,
1288
- "large": 170
1289
- }
1290
- },
1291
- minItemSize: {
1292
- "vertical": new (0, $8EWFi$Size)(208, 208),
1293
- "horizontal": new (0, $8EWFi$Size)(102, 102)
1294
- },
1295
- maxItemSize: new (0, $8EWFi$Size)(Infinity, Infinity),
1296
- margin: 24,
1297
- minSpace: new (0, $8EWFi$Size)(18, 18),
1298
- maxColumns: Infinity,
1299
- dropSpacing: 100
1300
- }
1301
- };
1302
- class $ed42fd44b9b9b664$export$7d2b12578154a735 extends (0, $3d424c147206bac9$export$64943d2e59d72a29) {
1303
- get layoutType() {
1304
- return "grid";
1305
- }
1306
- getIndexAtPoint(x, y, allowInsertingAtEnd = false) {
1307
- let itemHeight = this.itemSize.height + this.minSpace.height;
1308
- let itemWidth = this.itemSize.width + this.horizontalSpacing;
1309
- return Math.max(0, Math.min(this.collection.size - (allowInsertingAtEnd ? 0 : 1), Math.floor(y / itemHeight) * this.numColumns + Math.floor((x - this.horizontalSpacing) / itemWidth)));
1310
- }
1311
- getVisibleLayoutInfos(rect) {
1312
- let res = [];
1313
- let numItems = this.collection.size;
1314
- if (numItems <= 0 || !this.itemSize) // If there aren't any items in the collection, we are in a loader/placeholder state. Return those layoutInfos as
1315
- // the currently visible items
1316
- {
1317
- if (this.layoutInfos.size > 0) {
1318
- for (let layoutInfo of this.layoutInfos.values())if (this.isVisible(layoutInfo, rect)) res.push(layoutInfo);
1319
- }
1320
- } else {
1321
- // The approach from v2 uses indexes where other v3 layouts iterate through every node/root node. This feels more efficient
1322
- let firstVisibleItem = this.getIndexAtPoint(rect.x, rect.y);
1323
- let lastVisibleItem = this.getIndexAtPoint(rect.maxX, rect.maxY);
1324
- for(let index = firstVisibleItem; index <= lastVisibleItem; index++){
1325
- let keyFromIndex = this.collection.rows[index].key;
1326
- let layoutInfo = this.layoutInfos.get(keyFromIndex);
1327
- if (layoutInfo && this.isVisible(layoutInfo, rect)) res.push(layoutInfo);
1328
- }
1329
- // Check if loader is in view and add to res if so
1330
- let loader = this.layoutInfos.get("loader");
1331
- if (loader && this.isVisible(loader, rect)) res.push(loader);
1332
- }
1333
- return res;
1334
- }
1335
- buildCollection() {
1336
- let visibleWidth = this.virtualizer.visibleRect.width;
1337
- let visibleHeight = this.virtualizer.visibleRect.height;
1338
- let horizontalItemPadding = this.cardOrientation === "horizontal" ? this.itemPadding : 0;
1339
- let verticalItemPadding = this.cardOrientation === "vertical" ? this.itemPadding : 0;
1340
- let minCardWidth = this.minItemSize.width + horizontalItemPadding;
1341
- // Compute the number of rows and columns needed to display the content
1342
- let availableWidth = visibleWidth - this.margin * 2;
1343
- let columns = Math.floor((availableWidth + this.minSpace.width) / (minCardWidth + this.minSpace.width));
1344
- this.numColumns = Math.max(1, Math.min(this.maxColumns, columns));
1345
- this.numRows = Math.ceil(this.collection.size / this.numColumns);
1346
- // Compute the available width (minus the space between items)
1347
- let width = availableWidth - this.minSpace.width * Math.max(0, this.numColumns - 1);
1348
- // Compute the item width based on the space available
1349
- let itemWidth = Math.floor(width / this.numColumns);
1350
- itemWidth = Math.max(minCardWidth, Math.min(this.maxItemSize.width, itemWidth));
1351
- // Compute the item height, which is proportional to the item width
1352
- let t = (itemWidth - minCardWidth) / minCardWidth;
1353
- let itemHeight = Math.floor(this.minItemSize.height + this.minItemSize.height * t);
1354
- itemHeight = Math.max(this.minItemSize.height, Math.min(this.maxItemSize.height, itemHeight)) + verticalItemPadding;
1355
- this.itemSize = new (0, $8EWFi$Size)(itemWidth, itemHeight);
1356
- // Compute the horizontal spacing and content height
1357
- this.horizontalSpacing = this.numColumns < 2 ? 0 : Math.floor((availableWidth - this.numColumns * this.itemSize.width) / (this.numColumns - 1));
1358
- let y = this.margin;
1359
- let index = 0;
1360
- for (let node of this.collection){
1361
- let layoutInfo = this.buildChild(node, y, index);
1362
- y = layoutInfo.rect.maxY;
1363
- index++;
1364
- }
1365
- if (this.isLoading) {
1366
- let loaderY = y;
1367
- let loaderHeight = 60;
1368
- // If there aren't any items, make loader take all avaliable room and remove margin from y calculation
1369
- // so it doesn't scroll
1370
- if (this.collection.size === 0) {
1371
- loaderY = 0;
1372
- loaderHeight = visibleHeight || 60;
1373
- }
1374
- let rect = new (0, $8EWFi$Rect)(0, loaderY, visibleWidth, loaderHeight);
1375
- let loader = new (0, $8EWFi$LayoutInfo)("loader", "loader", rect);
1376
- this.layoutInfos.set("loader", loader);
1377
- y = loader.rect.maxY;
1378
- }
1379
- if (this.collection.size === 0 && !this.isLoading) {
1380
- let rect = new (0, $8EWFi$Rect)(0, 0, visibleWidth, visibleHeight);
1381
- let placeholder = new (0, $8EWFi$LayoutInfo)("placeholder", "placeholder", rect);
1382
- this.layoutInfos.set("placeholder", placeholder);
1383
- y = placeholder.rect.maxY;
1384
- }
1385
- this.contentSize = new (0, $8EWFi$Size)(visibleWidth, y);
1386
- }
1387
- buildChild(node, y, index) {
1388
- let row = Math.floor(index / this.numColumns);
1389
- let column = index % this.numColumns;
1390
- let x = this.margin + column * (this.itemSize.width + this.horizontalSpacing);
1391
- y = this.margin + row * (this.itemSize.height + this.minSpace.height);
1392
- let rect = new (0, $8EWFi$Rect)(x, y, this.itemSize.width, this.itemSize.height);
1393
- // TODO: Perhaps have it so that the child key for each row is stored with the layoutInfo?
1394
- let layoutInfo = new (0, $8EWFi$LayoutInfo)(node.type, node.key, rect);
1395
- layoutInfo.allowOverflow = true;
1396
- this.layoutInfos.set(node.key, layoutInfo);
1397
- return layoutInfo;
1398
- }
1399
- // Since the collection doesn't represent the visual layout, need to calculate what row and column the current key is in,
1400
- // then return the key that occupies the row + column below. This can be done by figuring out how many cards exist per column then dividing the
1401
- // collection contents by that number (which will give us the row distribution)
1402
- getKeyBelow(key) {
1403
- var _getFirstItem;
1404
- // Expected key is the currently focused cell so we need the parent row key
1405
- let parentRowKey = this.collection.getItem(key).parentKey;
1406
- let indexRowBelow;
1407
- let index = this.collection.rows.findIndex((card)=>card.key === parentRowKey);
1408
- if (index !== -1) indexRowBelow = index + this.numColumns;
1409
- else return null;
1410
- let row = this.collection.rows[indexRowBelow];
1411
- return (_getFirstItem = (0, $8EWFi$getFirstItem)((0, $8EWFi$getChildNodes)(row, this.collection))) === null || _getFirstItem === void 0 ? void 0 : _getFirstItem.key;
1412
- }
1413
- getKeyAbove(key) {
1414
- var _getFirstItem;
1415
- // Expected key is the currently focused cell so we need the parent row key
1416
- let parentRowKey = this.collection.getItem(key).parentKey;
1417
- let indexRowAbove;
1418
- let index = this.collection.rows.findIndex((card)=>card.key === parentRowKey);
1419
- if (index !== -1) indexRowAbove = index - this.numColumns;
1420
- else return null;
1421
- let row = this.collection.rows[indexRowAbove];
1422
- return (_getFirstItem = (0, $8EWFi$getFirstItem)((0, $8EWFi$getChildNodes)(row, this.collection))) === null || _getFirstItem === void 0 ? void 0 : _getFirstItem.key;
1423
- }
1424
- constructor(options = {}){
1425
- super(options);
1426
- let cardSize = "L";
1427
- this.cardOrientation = options.cardOrientation || "vertical";
1428
- this.minItemSize = options.minItemSize || $ed42fd44b9b9b664$var$DEFAULT_OPTIONS[cardSize].minItemSize[this.cardOrientation];
1429
- this.maxItemSize = options.maxItemSize || $ed42fd44b9b9b664$var$DEFAULT_OPTIONS[cardSize].maxItemSize;
1430
- this.margin = options.margin != null ? options.margin : $ed42fd44b9b9b664$var$DEFAULT_OPTIONS[cardSize].margin;
1431
- this.minSpace = options.minSpace || $ed42fd44b9b9b664$var$DEFAULT_OPTIONS[cardSize].minSpace;
1432
- this.maxColumns = options.maxColumns || $ed42fd44b9b9b664$var$DEFAULT_OPTIONS[cardSize].maxColumns;
1433
- this.itemPadding = options.itemPadding != null ? options.itemPadding : $ed42fd44b9b9b664$var$DEFAULT_OPTIONS[cardSize].itemPadding[this.cardOrientation][this.scale];
1434
- this.itemSize = null;
1435
- this.numColumns = 0;
1436
- this.numRows = 0;
1437
- this.horizontalSpacing = 0;
1438
- }
1439
- }
1440
-
1441
-
1442
- /*
1443
- * Copyright 2021 Adobe. All rights reserved.
1444
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
1445
- * you may not use this file except in compliance with the License. You may obtain a copy
1446
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
1447
- *
1448
- * Unless required by applicable law or agreed to in writing, software distributed under
1449
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
1450
- * OF ANY KIND, either express or implied. See the License for the specific language
1451
- * governing permissions and limitations under the License.
1452
- */
1453
-
1454
-
1455
- class $03278f8d0f6860bb$export$e9f7cda058ba8df8 extends (0, $3d424c147206bac9$export$64943d2e59d72a29) {
1456
- get layoutType() {
1457
- return "waterfall";
1458
- }
1459
- buildCollection(invalidationContext) {
1460
- // Compute the number of columns needed to display the content
1461
- let visibleWidth = this.virtualizer.visibleRect.width;
1462
- let availableWidth = visibleWidth - this.margin * 2;
1463
- let columns = Math.floor((availableWidth + this.minSpace.width) / (this.minItemSize.width + this.minSpace.width));
1464
- this.numColumns = Math.max(1, Math.min(this.maxColumns, columns));
1465
- // Compute the available width (minus the space between items)
1466
- let width = availableWidth - this.minSpace.width * (this.numColumns - 1);
1467
- // Compute the item width based on the space available
1468
- let itemWidth = Math.round(width / this.numColumns);
1469
- itemWidth = Math.max(this.minItemSize.width, Math.min(this.maxItemSize.width, itemWidth));
1470
- this.itemWidth = itemWidth;
1471
- // Compute the horizontal spacing
1472
- // if only one column, we cannot divide by zero, so set it to 1
1473
- let horizontalSpacing = Math.round((availableWidth - this.numColumns * itemWidth) / Math.max(1, this.numColumns - 1));
1474
- this.horizontalSpacing = horizontalSpacing;
1475
- // Setup an array of column heights
1476
- let columnHeights = Array(this.numColumns).fill(this.margin);
1477
- for (let node of this.collection){
1478
- let key = node.key;
1479
- // Compute the height of the item. Use the existing height if available,
1480
- // otherwise call the delegate to estimate the size.
1481
- let oldLayoutInfo = this.layoutInfos.get(key);
1482
- let height;
1483
- let estimatedSize = true;
1484
- if (oldLayoutInfo) {
1485
- height = oldLayoutInfo.rect.height;
1486
- estimatedSize = invalidationContext.sizeChanged || oldLayoutInfo.estimatedSize;
1487
- } else if (node.props.width && node.props.height) {
1488
- let nodeWidth = node.props.width;
1489
- let nodeHeight = node.props.height;
1490
- let scaledHeight = Math.round(nodeHeight * (itemWidth / nodeWidth));
1491
- height = Math.max(this.minItemSize.height, Math.min(this.maxItemSize.height, scaledHeight));
1492
- } else height = itemWidth;
1493
- // Figure out which column to place the item in, and compute its position.
1494
- let column = this.getNextColumnIndex(columnHeights);
1495
- let x = this.margin + column * (itemWidth + horizontalSpacing);
1496
- let y = columnHeights[column];
1497
- let rect = new (0, $8EWFi$Rect)(x, y, itemWidth, height);
1498
- let layoutInfo = new (0, $8EWFi$LayoutInfo)(node.type, key, rect);
1499
- layoutInfo.estimatedSize = estimatedSize;
1500
- layoutInfo.allowOverflow = true;
1501
- this.layoutInfos.set(key, layoutInfo);
1502
- // TODO: From v2 figure out this bit, when does this get called and what to replace this.collectionView._transaction with?
1503
- // Removing it from v2 doesn't seem to do anything?
1504
- // if (layoutInfo.estimatedSize && !invalidationContext.contentChanged && !this.collectionView._transaction) {
1505
- // this.updateItemSize(new IndexPath(section, i));
1506
- // }
1507
- columnHeights[column] += layoutInfo.rect.height + this.minSpace.height;
1508
- }
1509
- // Reset all columns to the maximum for the next section
1510
- let maxHeight = Math.max.apply(Math, columnHeights) - this.minSpace.height + this.margin;
1511
- columnHeights.fill(maxHeight);
1512
- let y = columnHeights[0];
1513
- if (this.isLoading) {
1514
- let loaderY = y;
1515
- let loaderHeight = 60;
1516
- // If there aren't any items, make loader take all avaliable room and remove margin from y calculation
1517
- // so it doesn't scroll
1518
- if (this.collection.size === 0) {
1519
- loaderY = 0;
1520
- loaderHeight = this.virtualizer.visibleRect.height || 60;
1521
- }
1522
- let rect = new (0, $8EWFi$Rect)(0, loaderY, this.virtualizer.visibleRect.width, loaderHeight);
1523
- let loader = new (0, $8EWFi$LayoutInfo)("loader", "loader", rect);
1524
- this.layoutInfos.set("loader", loader);
1525
- y = loader.rect.maxY;
1526
- }
1527
- if (this.collection.size === 0 && !this.isLoading) {
1528
- let rect = new (0, $8EWFi$Rect)(0, 0, this.virtualizer.visibleRect.width, this.virtualizer.visibleRect.height);
1529
- let placeholder = new (0, $8EWFi$LayoutInfo)("placeholder", "placeholder", rect);
1530
- this.layoutInfos.set("placeholder", placeholder);
1531
- y = placeholder.rect.maxY;
1532
- }
1533
- this.contentSize = new (0, $8EWFi$Size)(this.virtualizer.visibleRect.width, y);
1534
- }
1535
- updateItemSize(key, size) {
1536
- let layoutInfo = this.layoutInfos.get(key);
1537
- if (!size || !layoutInfo) return false;
1538
- if (size.height !== layoutInfo.rect.height) {
1539
- // TODO: also not sure about copying layout info vs mutating it. Listlayout does the below
1540
- // but I feel that is because it actually maintained a layoutNode map cache which this doesn't have
1541
- let newLayoutInfo = layoutInfo.copy();
1542
- newLayoutInfo.rect.height = size.height < 600 ? size.height : 600;
1543
- newLayoutInfo.estimatedSize = false;
1544
- this.layoutInfos.set(key, newLayoutInfo);
1545
- return true;
1546
- }
1547
- return false;
1548
- }
1549
- getNextColumnIndex(columnHeights) {
1550
- let minIndex = 0;
1551
- for(let i = 0; i < columnHeights.length; i++)if (columnHeights[i] < columnHeights[minIndex]) minIndex = i;
1552
- return minIndex;
1553
- }
1554
- getClosestRight(key) {
1555
- var _this__findClosest, _getFirstItem;
1556
- let layoutInfo = this.getLayoutInfo(key);
1557
- // Refactored from v2. Current strategy is to find the closest card in the adjacent column.
1558
- // 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
1559
- // and thus the top corner to top corner distance was massive.
1560
- // 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
1561
- let rect = new (0, $8EWFi$Rect)(layoutInfo.rect.maxX + 1, layoutInfo.rect.y, layoutInfo.rect.width + this.horizontalSpacing, layoutInfo.rect.height);
1562
- key = (_this__findClosest = this._findClosest(layoutInfo.rect, rect)) === null || _this__findClosest === void 0 ? void 0 : _this__findClosest.key;
1563
- if (!key) {
1564
- var _this__findClosest1;
1565
- rect = new (0, $8EWFi$Rect)(layoutInfo.rect.maxX + 1, 0, layoutInfo.rect.width + this.horizontalSpacing, this.virtualizer.contentSize.height);
1566
- key = (_this__findClosest1 = this._findClosest(layoutInfo.rect, rect)) === null || _this__findClosest1 === void 0 ? void 0 : _this__findClosest1.key;
1567
- }
1568
- let item = this.collection.getItem(key);
1569
- return (_getFirstItem = (0, $8EWFi$getFirstItem)((0, $8EWFi$getChildNodes)(item, this.collection))) === null || _getFirstItem === void 0 ? void 0 : _getFirstItem.key;
1570
- }
1571
- getClosestLeft(key) {
1572
- var _this__findClosest, _getFirstItem;
1573
- let layoutInfo = this.getLayoutInfo(key);
1574
- // 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
1575
- let rect = new (0, $8EWFi$Rect)(layoutInfo.rect.x - layoutInfo.rect.width - this.horizontalSpacing - 1, layoutInfo.rect.y, layoutInfo.rect.width + this.horizontalSpacing, layoutInfo.rect.height);
1576
- key = (_this__findClosest = this._findClosest(layoutInfo.rect, rect)) === null || _this__findClosest === void 0 ? void 0 : _this__findClosest.key;
1577
- if (!key) {
1578
- var _this__findClosest1;
1579
- rect = new (0, $8EWFi$Rect)(layoutInfo.rect.x - layoutInfo.rect.width - this.horizontalSpacing - 1, 0, layoutInfo.rect.width + this.horizontalSpacing, this.virtualizer.contentSize.height);
1580
- key = (_this__findClosest1 = this._findClosest(layoutInfo.rect, rect)) === null || _this__findClosest1 === void 0 ? void 0 : _this__findClosest1.key;
1581
- }
1582
- let item = this.collection.getItem(key);
1583
- return (_getFirstItem = (0, $8EWFi$getFirstItem)((0, $8EWFi$getChildNodes)(item, this.collection))) === null || _getFirstItem === void 0 ? void 0 : _getFirstItem.key;
1584
- }
1585
- getKeyRightOf(key) {
1586
- // Expected key is the currently focused cell so we need the parent row key
1587
- let parentRowKey = this.collection.getItem(key).parentKey;
1588
- return this.direction === "rtl" ? this.getClosestLeft(parentRowKey) : this.getClosestRight(parentRowKey);
1589
- }
1590
- getKeyLeftOf(key) {
1591
- // Expected key is the currently focused cell so we need the parent row key
1592
- let parentRowKey = this.collection.getItem(key).parentKey;
1593
- return this.direction === "rtl" ? this.getClosestRight(parentRowKey) : this.getClosestLeft(parentRowKey);
1594
- }
1595
- constructor(options = {}){
1596
- // TODO: WaterfallLayout doesn't use card size in v2, but perhaps it should support it? Perhaps it would modify
1597
- // minItemSize defaults or other things
1598
- super(options);
1599
- this.minItemSize = options.minItemSize || new (0, $8EWFi$Size)(240, 136);
1600
- this.maxItemSize = options.maxItemSize || new (0, $8EWFi$Size)(Infinity, Infinity);
1601
- this.margin = options.margin != null ? options.margin : 24;
1602
- this.minSpace = options.minSpace || new (0, $8EWFi$Size)(18, 18);
1603
- this.maxColumns = options.maxColumns || Infinity;
1604
- this.itemWidth = 0;
1605
- this.numColumns = 0;
1606
- this.lastCollection = null;
1607
- this.collator = options.collator;
1608
- }
1609
- }
1610
-
1611
-
1612
- /*
1613
- * Copyright 2021 Adobe. All rights reserved.
1614
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
1615
- * you may not use this file except in compliance with the License. You may obtain a copy
1616
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
1617
- *
1618
- * Unless required by applicable law or agreed to in writing, software distributed under
1619
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
1620
- * OF ANY KIND, either express or implied. See the License for the specific language
1621
- * governing permissions and limitations under the License.
1622
- */
1623
-
1624
-
1625
- let $d2d1c099b89e366a$var$Card = /*#__PURE__*/ (0, $8EWFi$forwardRef)((props, ref)=>{
1626
- let context = (0, $8d180a244893de14$export$fea0b38586ec8f13)();
1627
- if (context !== null) return null;
1628
- else return /*#__PURE__*/ (0, $8EWFi$react).createElement((0, $643dd8fa80926f94$export$7a6ccaf429ad93a8), {
1629
- ...props,
1630
- ref: ref
1631
- });
1632
- });
1633
- // @ts-ignore
1634
- $d2d1c099b89e366a$var$Card.getCollectionNode = function* getCollectionNode(props) {
1635
- let { children: children, textValue: textValue } = props;
1636
- yield {
1637
- type: "item",
1638
- props: props,
1639
- rendered: children,
1640
- "aria-label": props["aria-label"],
1641
- hasChildNodes: false,
1642
- textValue: textValue
1643
- };
1644
- };
1645
- let $d2d1c099b89e366a$export$60332b2344f7fe41 = $d2d1c099b89e366a$var$Card;
1646
-
1647
-
1648
-
1649
-
1650
- 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};
1651
- //# sourceMappingURL=module.js.map