@react-spectrum/card 3.0.0-nightly.3598 → 3.0.0-nightly.3600

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 CHANGED
@@ -13,6 +13,7 @@ var $jpY3B$reactspectrumcheckbox = require("@react-spectrum/checkbox");
13
13
  var $jpY3B$reactariafocus = require("@react-aria/focus");
14
14
  var $jpY3B$reactariainteractions = require("@react-aria/interactions");
15
15
  var $jpY3B$reactstatelyvirtualizer = require("@react-stately/virtualizer");
16
+ require("@swc/helpers/lib/_define_property.js");
16
17
 
17
18
  function $parcel$export(e, n, v, s) {
18
19
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
@@ -26,7 +27,38 @@ $parcel$export(module.exports, "GalleryLayout", () => $8019a3d2c7d098ea$export$8
26
27
  $parcel$export(module.exports, "GridLayout", () => $71b727f94b595b1a$export$7d2b12578154a735);
27
28
  $parcel$export(module.exports, "WaterfallLayout", () => $632abf8fbf0ad57b$export$e9f7cda058ba8df8);
28
29
  $parcel$export(module.exports, "Card", () => $6b630ac4b78ba7f3$export$60332b2344f7fe41);
29
-
30
+ /*
31
+ * Copyright 2021 Adobe. All rights reserved.
32
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
33
+ * you may not use this file except in compliance with the License. You may obtain a copy
34
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
35
+ *
36
+ * Unless required by applicable law or agreed to in writing, software distributed under
37
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
38
+ * OF ANY KIND, either express or implied. See the License for the specific language
39
+ * governing permissions and limitations under the License.
40
+ */ /// <reference types="css-module-types" />
41
+ /*
42
+ * Copyright 2021 Adobe. All rights reserved.
43
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
44
+ * you may not use this file except in compliance with the License. You may obtain a copy
45
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
46
+ *
47
+ * Unless required by applicable law or agreed to in writing, software distributed under
48
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
49
+ * OF ANY KIND, either express or implied. See the License for the specific language
50
+ * governing permissions and limitations under the License.
51
+ */ /*
52
+ * Copyright 2021 Adobe. All rights reserved.
53
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
54
+ * you may not use this file except in compliance with the License. You may obtain a copy
55
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
56
+ *
57
+ * Unless required by applicable law or agreed to in writing, software distributed under
58
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
59
+ * OF ANY KIND, either express or implied. See the License for the specific language
60
+ * governing permissions and limitations under the License.
61
+ */
30
62
 
31
63
 
32
64
 
@@ -117,51 +149,59 @@ $71570f0038472fa2$export$4746ac09daa215ae = "spectrum-CardView-row_6fdf9f";
117
149
  $71570f0038472fa2$export$d8467f38d2d00bd0 = "is-drop-target_6fdf9f";
118
150
 
119
151
 
120
-
121
- const $e57ab98cef2f01a5$export$64992ac69f286e5c = /*#__PURE__*/ ($parcel$interopDefault($jpY3B$react)).createContext(null);
152
+ /*
153
+ * Copyright 2020 Adobe. All rights reserved.
154
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
155
+ * you may not use this file except in compliance with the License. You may obtain a copy
156
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
157
+ *
158
+ * Unless required by applicable law or agreed to in writing, software distributed under
159
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
160
+ * OF ANY KIND, either express or implied. See the License for the specific language
161
+ * governing permissions and limitations under the License.
162
+ */
163
+ const $e57ab98cef2f01a5$export$64992ac69f286e5c = /*#__PURE__*/ (0, ($parcel$interopDefault($jpY3B$react))).createContext(null);
122
164
  function $e57ab98cef2f01a5$export$fea0b38586ec8f13() {
123
- return $jpY3B$react.useContext($e57ab98cef2f01a5$export$64992ac69f286e5c);
165
+ return (0, $jpY3B$react.useContext)($e57ab98cef2f01a5$export$64992ac69f286e5c);
124
166
  }
125
167
 
126
168
 
127
169
 
128
170
 
129
171
  function $7888205ff7de382f$var$CardBase(props, ref) {
130
- props = $jpY3B$reactspectrumprovider.useProviderProps(props);
131
- let context = $e57ab98cef2f01a5$export$fea0b38586ec8f13() || {
132
- }; // we can call again here, won't change from Card.tsx
172
+ props = (0, $jpY3B$reactspectrumprovider.useProviderProps)(props);
173
+ let context = (0, $e57ab98cef2f01a5$export$fea0b38586ec8f13)() || {}; // we can call again here, won't change from Card.tsx
133
174
  let { state: state } = context;
134
175
  let manager = state === null || state === void 0 ? void 0 : state.selectionManager;
135
- let { isQuiet: isQuiet , orientation: orientation = 'vertical' , articleProps: articleProps = {
136
- } , item: item , layout: layout , children: children } = props;
176
+ let { isQuiet: isQuiet , orientation: orientation = "vertical" , articleProps: articleProps = {} , item: item , layout: layout , children: children } = props;
137
177
  let key = item === null || item === void 0 ? void 0 : item.key;
138
178
  let isSelected = manager === null || manager === void 0 ? void 0 : manager.isSelected(key);
139
179
  let isDisabled = state === null || state === void 0 ? void 0 : state.disabledKeys.has(key);
140
180
  let onChange = ()=>{
141
181
  return manager === null || manager === void 0 ? void 0 : manager.select(key);
142
182
  };
143
- let { styleProps: styleProps } = $jpY3B$reactspectrumutils.useStyleProps(props);
183
+ let { styleProps: styleProps } = (0, $jpY3B$reactspectrumutils.useStyleProps)(props);
144
184
  let { cardProps: cardProps , titleProps: titleProps , contentProps: contentProps } = $7888205ff7de382f$var$useCard(props);
145
- let domRef = $jpY3B$reactspectrumutils.useDOMRef(ref);
146
- let gridRef = $jpY3B$react.useRef();
147
- let checkboxRef = $jpY3B$react.useRef(null);
185
+ let domRef = (0, $jpY3B$reactspectrumutils.useDOMRef)(ref);
186
+ let gridRef = (0, $jpY3B$react.useRef)();
187
+ let checkboxRef = (0, $jpY3B$react.useRef)(null);
148
188
  // cards are only interactive if there is a selection manager and it allows selection
149
- let { hoverProps: hoverProps , isHovered: isHovered } = $jpY3B$reactariainteractions.useHover({
150
- isDisabled: manager === undefined || (manager === null || manager === void 0 ? void 0 : manager.selectionMode) === 'none' || isDisabled
189
+ let { hoverProps: hoverProps , isHovered: isHovered } = (0, $jpY3B$reactariainteractions.useHover)({
190
+ isDisabled: manager === undefined || (manager === null || manager === void 0 ? void 0 : manager.selectionMode) === "none" || isDisabled
151
191
  });
152
- let [isFocused, setIsFocused] = $jpY3B$react.useState(false);
153
- let { focusWithinProps: focusWithinProps } = $jpY3B$reactariainteractions.useFocusWithin({
192
+ let [isFocused, setIsFocused] = (0, $jpY3B$react.useState)(false);
193
+ let { focusWithinProps: focusWithinProps } = (0, $jpY3B$reactariainteractions.useFocusWithin)({
154
194
  onFocusWithinChange: setIsFocused,
155
195
  isDisabled: isDisabled
156
196
  });
157
197
  // ToDo: see css for comment about avatar under selector .spectrum-Card--noLayout.spectrum-Card--default
158
- let hasPreviewImage = $jpY3B$reactspectrumutils.useHasChild(`.${(/*@__PURE__*/$parcel$interopDefault($71570f0038472fa2$exports))['spectrum-Card-image']}`, gridRef);
159
- let hasPreviewIllustration = $jpY3B$reactspectrumutils.useHasChild(`.${(/*@__PURE__*/$parcel$interopDefault($71570f0038472fa2$exports))['spectrum-Card-illustration']}`, gridRef);
198
+ let hasPreviewImage = (0, $jpY3B$reactspectrumutils.useHasChild)(`.${(0, (/*@__PURE__*/$parcel$interopDefault($71570f0038472fa2$exports)))["spectrum-Card-image"]}`, gridRef);
199
+ let hasPreviewIllustration = (0, $jpY3B$reactspectrumutils.useHasChild)(`.${(0, (/*@__PURE__*/$parcel$interopDefault($71570f0038472fa2$exports)))["spectrum-Card-illustration"]}`, gridRef);
160
200
  let hasPreview = hasPreviewImage || hasPreviewIllustration;
161
201
  // this is for horizontal cards
162
- let [height, setHeight] = $jpY3B$react.useState(NaN);
163
- let updateHeight = $jpY3B$react.useCallback(()=>{
164
- if (orientation !== 'horizontal') return;
202
+ let [height, setHeight] = (0, $jpY3B$react.useState)(NaN);
203
+ let updateHeight = (0, $jpY3B$react.useCallback)(()=>{
204
+ if (orientation !== "horizontal") return;
165
205
  let cardHeight = gridRef.current.getBoundingClientRect().height;
166
206
  setHeight(cardHeight);
167
207
  }, [
@@ -169,56 +209,55 @@ function $7888205ff7de382f$var$CardBase(props, ref) {
169
209
  gridRef,
170
210
  setHeight
171
211
  ]);
172
- $jpY3B$reactariautils.useResizeObserver({
212
+ (0, $jpY3B$reactariautils.useResizeObserver)({
173
213
  ref: gridRef,
174
214
  onResize: updateHeight
175
215
  });
176
216
  let aspectRatioEnforce = undefined;
177
- if (orientation === 'horizontal' && !isNaN(height)) aspectRatioEnforce = {
217
+ if (orientation === "horizontal" && !isNaN(height)) aspectRatioEnforce = {
178
218
  height: `${height}px`,
179
219
  width: `${height}px`
180
220
  };
181
- let slots = $jpY3B$react.useMemo(()=>({
221
+ let slots = (0, $jpY3B$react.useMemo)(()=>({
182
222
  image: {
183
- UNSAFE_className: $jpY3B$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($71570f0038472fa2$exports)), 'spectrum-Card-image'),
184
- objectFit: orientation === 'horizontal' ? 'cover' : 'contain',
185
- alt: '',
223
+ UNSAFE_className: (0, $jpY3B$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($71570f0038472fa2$exports))), "spectrum-Card-image"),
224
+ objectFit: orientation === "horizontal" ? "cover" : "contain",
225
+ alt: "",
186
226
  ...aspectRatioEnforce
187
227
  },
188
228
  illustration: {
189
- UNSAFE_className: $jpY3B$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($71570f0038472fa2$exports)), 'spectrum-Card-illustration'),
229
+ UNSAFE_className: (0, $jpY3B$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($71570f0038472fa2$exports))), "spectrum-Card-illustration"),
190
230
  ...aspectRatioEnforce
191
231
  },
192
232
  avatar: {
193
- UNSAFE_className: $jpY3B$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($71570f0038472fa2$exports)), 'spectrum-Card-avatar'),
194
- size: 'avatar-size-400'
233
+ UNSAFE_className: (0, $jpY3B$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($71570f0038472fa2$exports))), "spectrum-Card-avatar"),
234
+ size: "avatar-size-400"
195
235
  },
196
236
  heading: {
197
- UNSAFE_className: $jpY3B$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($71570f0038472fa2$exports)), 'spectrum-Card-heading'),
237
+ UNSAFE_className: (0, $jpY3B$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($71570f0038472fa2$exports))), "spectrum-Card-heading"),
198
238
  ...titleProps
199
239
  },
200
240
  content: {
201
- UNSAFE_className: $jpY3B$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($71570f0038472fa2$exports)), 'spectrum-Card-content'),
241
+ UNSAFE_className: (0, $jpY3B$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($71570f0038472fa2$exports))), "spectrum-Card-content"),
202
242
  ...contentProps
203
243
  },
204
244
  detail: {
205
- UNSAFE_className: $jpY3B$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($71570f0038472fa2$exports)), 'spectrum-Card-detail')
245
+ UNSAFE_className: (0, $jpY3B$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($71570f0038472fa2$exports))), "spectrum-Card-detail")
206
246
  }
207
- })
208
- , [
247
+ }), [
209
248
  titleProps,
210
249
  contentProps,
211
250
  height,
212
251
  isQuiet,
213
252
  orientation
214
253
  ]);
215
- $jpY3B$reactariautils.useLayoutEffect(()=>{
254
+ (0, $jpY3B$reactariautils.useLayoutEffect)(()=>{
216
255
  if (gridRef === null || gridRef === void 0 ? void 0 : gridRef.current) {
217
- let walker = $jpY3B$reactariafocus.getFocusableTreeWalker(gridRef.current);
256
+ let walker = (0, $jpY3B$reactariafocus.getFocusableTreeWalker)(gridRef.current);
218
257
  let nextNode = walker.nextNode();
219
258
  while(nextNode != null){
220
259
  if (checkboxRef.current && !checkboxRef.current.UNSAFE_getDOMNode().contains(nextNode)) {
221
- console.warn('Card does not support focusable elements, please contact the team regarding your use case.');
260
+ console.warn("Card does not support focusable elements, please contact the team regarding your use case.");
222
261
  break;
223
262
  }
224
263
  nextNode = walker.nextNode();
@@ -227,65 +266,63 @@ function $7888205ff7de382f$var$CardBase(props, ref) {
227
266
  }, [
228
267
  children
229
268
  ]);
230
- return(/*#__PURE__*/ ($parcel$interopDefault($jpY3B$react)).createElement($jpY3B$reactariafocus.FocusRing, {
231
- focusRingClass: $jpY3B$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($71570f0038472fa2$exports)), 'focus-ring')
232
- }, /*#__PURE__*/ ($parcel$interopDefault($jpY3B$react)).createElement("article", {
269
+ return /*#__PURE__*/ (0, ($parcel$interopDefault($jpY3B$react))).createElement((0, $jpY3B$reactariafocus.FocusRing), {
270
+ focusRingClass: (0, $jpY3B$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($71570f0038472fa2$exports))), "focus-ring")
271
+ }, /*#__PURE__*/ (0, ($parcel$interopDefault($jpY3B$react))).createElement("article", {
233
272
  ...styleProps,
234
- ...$jpY3B$reactariautils.mergeProps(cardProps, focusWithinProps, hoverProps, $jpY3B$reactariautils.filterDOMProps(props), articleProps),
273
+ ...(0, $jpY3B$reactariautils.mergeProps)(cardProps, focusWithinProps, hoverProps, (0, $jpY3B$reactariautils.filterDOMProps)(props), articleProps),
235
274
  ref: domRef,
236
- className: $jpY3B$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($71570f0038472fa2$exports)), 'spectrum-Card', {
237
- 'spectrum-Card--default': !isQuiet && orientation !== 'horizontal',
238
- 'spectrum-Card--isQuiet': isQuiet && orientation !== 'horizontal',
239
- 'spectrum-Card--horizontal': orientation === 'horizontal',
240
- 'spectrum-Card--noPreview': !hasPreview,
241
- 'is-hovered': isHovered,
242
- 'is-focused': isFocused,
243
- 'is-selected': isSelected,
244
- 'spectrum-Card--waterfall': layout === 'waterfall',
245
- 'spectrum-Card--gallery': layout === 'gallery',
246
- 'spectrum-Card--grid': layout === 'grid',
247
- 'spectrum-Card--noLayout': layout !== 'waterfall' && layout !== 'gallery' && layout !== 'grid'
275
+ className: (0, $jpY3B$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($71570f0038472fa2$exports))), "spectrum-Card", {
276
+ "spectrum-Card--default": !isQuiet && orientation !== "horizontal",
277
+ "spectrum-Card--isQuiet": isQuiet && orientation !== "horizontal",
278
+ "spectrum-Card--horizontal": orientation === "horizontal",
279
+ "spectrum-Card--noPreview": !hasPreview,
280
+ "is-hovered": isHovered,
281
+ "is-focused": isFocused,
282
+ "is-selected": isSelected,
283
+ "spectrum-Card--waterfall": layout === "waterfall",
284
+ "spectrum-Card--gallery": layout === "gallery",
285
+ "spectrum-Card--grid": layout === "grid",
286
+ "spectrum-Card--noLayout": layout !== "waterfall" && layout !== "gallery" && layout !== "grid"
248
287
  }, styleProps.className)
249
- }, /*#__PURE__*/ ($parcel$interopDefault($jpY3B$react)).createElement("div", {
288
+ }, /*#__PURE__*/ (0, ($parcel$interopDefault($jpY3B$react))).createElement("div", {
250
289
  ref: gridRef,
251
- className: $jpY3B$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($71570f0038472fa2$exports)), 'spectrum-Card-grid')
252
- }, manager && manager.selectionMode !== 'none' && /*#__PURE__*/ ($parcel$interopDefault($jpY3B$react)).createElement("div", {
253
- className: $jpY3B$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($71570f0038472fa2$exports)), 'spectrum-Card-checkboxWrapper')
254
- }, /*#__PURE__*/ ($parcel$interopDefault($jpY3B$react)).createElement($jpY3B$reactspectrumcheckbox.Checkbox, {
290
+ className: (0, $jpY3B$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($71570f0038472fa2$exports))), "spectrum-Card-grid")
291
+ }, manager && manager.selectionMode !== "none" && /*#__PURE__*/ (0, ($parcel$interopDefault($jpY3B$react))).createElement("div", {
292
+ className: (0, $jpY3B$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($71570f0038472fa2$exports))), "spectrum-Card-checkboxWrapper")
293
+ }, /*#__PURE__*/ (0, ($parcel$interopDefault($jpY3B$react))).createElement((0, $jpY3B$reactspectrumcheckbox.Checkbox), {
255
294
  ref: checkboxRef,
256
295
  isDisabled: isDisabled,
257
296
  excludeFromTabOrder: true,
258
297
  isSelected: isSelected,
259
298
  onChange: onChange,
260
- UNSAFE_className: $jpY3B$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($71570f0038472fa2$exports)), 'spectrum-Card-checkbox'),
299
+ UNSAFE_className: (0, $jpY3B$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($71570f0038472fa2$exports))), "spectrum-Card-checkbox"),
261
300
  isEmphasized: true,
262
301
  "aria-label": "select"
263
- })), /*#__PURE__*/ ($parcel$interopDefault($jpY3B$react)).createElement($jpY3B$reactspectrumutils.SlotProvider, {
302
+ })), /*#__PURE__*/ (0, ($parcel$interopDefault($jpY3B$react))).createElement((0, $jpY3B$reactspectrumutils.SlotProvider), {
264
303
  slots: slots
265
- }, children), /*#__PURE__*/ ($parcel$interopDefault($jpY3B$react)).createElement("div", {
266
- className: $jpY3B$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($71570f0038472fa2$exports)), 'spectrum-Card-decoration')
267
- })))));
304
+ }, children), /*#__PURE__*/ (0, ($parcel$interopDefault($jpY3B$react))).createElement("div", {
305
+ className: (0, $jpY3B$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($71570f0038472fa2$exports))), "spectrum-Card-decoration")
306
+ }))));
268
307
  }
269
308
  function $7888205ff7de382f$var$useCard(props) {
270
- let titleId = $jpY3B$reactariautils.useSlotId();
271
- let descriptionId = $jpY3B$reactariautils.useSlotId();
272
- let titleProps = $jpY3B$react.useMemo(()=>({
309
+ let titleId = (0, $jpY3B$reactariautils.useSlotId)();
310
+ let descriptionId = (0, $jpY3B$reactariautils.useSlotId)();
311
+ let titleProps = (0, $jpY3B$react.useMemo)(()=>({
273
312
  id: titleId
274
- })
275
- , [
313
+ }), [
276
314
  titleId
277
315
  ]);
278
- let contentProps = $jpY3B$react.useMemo(()=>({
316
+ let contentProps = (0, $jpY3B$react.useMemo)(()=>({
279
317
  id: descriptionId
280
- })
281
- , [
318
+ }), [
282
319
  descriptionId
283
320
  ]);
284
321
  return {
285
322
  cardProps: {
286
- ...$jpY3B$reactariautils.filterDOMProps(props),
287
- 'aria-labelledby': titleId,
288
- 'aria-describedby': descriptionId,
323
+ ...(0, $jpY3B$reactariautils.filterDOMProps)(props),
324
+ "aria-labelledby": titleId,
325
+ "aria-describedby": descriptionId,
289
326
  tabIndex: 0
290
327
  },
291
328
  titleProps: titleProps,
@@ -294,7 +331,7 @@ function $7888205ff7de382f$var$useCard(props) {
294
331
  }
295
332
  /**
296
333
  * TODO: Add description of component here.
297
- */ const $7888205ff7de382f$export$7a6ccaf429ad93a8 = /*#__PURE__*/ ($parcel$interopDefault($jpY3B$react)).forwardRef($7888205ff7de382f$var$CardBase);
334
+ */ const $7888205ff7de382f$export$7a6ccaf429ad93a8 = /*#__PURE__*/ (0, ($parcel$interopDefault($jpY3B$react))).forwardRef($7888205ff7de382f$var$CardBase);
298
335
 
299
336
 
300
337
 
@@ -587,31 +624,30 @@ $dc38f0b958ac5018$exports = {
587
624
 
588
625
 
589
626
  function $514a55f6d91f25ef$var$CardView(props, ref) {
590
- let { scale: scale } = $jpY3B$reactspectrumprovider.useProvider();
591
- let { styleProps: styleProps } = $jpY3B$reactspectrumutils.useStyleProps(props);
592
- let domRef = $jpY3B$reactspectrumutils.useDOMRef(ref);
593
- let { isQuiet: isQuiet , renderEmptyState: renderEmptyState , layout: layout , loadingState: loadingState , onLoadMore: onLoadMore , cardOrientation: cardOrientation = 'vertical' } = props;
594
- let collator = $jpY3B$reactariai18n.useCollator({
595
- usage: 'search',
596
- sensitivity: 'base'
627
+ let { scale: scale } = (0, $jpY3B$reactspectrumprovider.useProvider)();
628
+ let { styleProps: styleProps } = (0, $jpY3B$reactspectrumutils.useStyleProps)(props);
629
+ let domRef = (0, $jpY3B$reactspectrumutils.useDOMRef)(ref);
630
+ let { isQuiet: isQuiet , renderEmptyState: renderEmptyState , layout: layout , loadingState: loadingState , onLoadMore: onLoadMore , cardOrientation: cardOrientation = "vertical" } = props;
631
+ let collator = (0, $jpY3B$reactariai18n.useCollator)({
632
+ usage: "search",
633
+ sensitivity: "base"
597
634
  });
598
- let isLoading = loadingState === 'loading' || loadingState === 'loadingMore';
599
- let cardViewLayout = $jpY3B$react.useMemo(()=>typeof layout === 'function' ? new layout({
635
+ let isLoading = loadingState === "loading" || loadingState === "loadingMore";
636
+ let cardViewLayout = (0, $jpY3B$react.useMemo)(()=>typeof layout === "function" ? new layout({
600
637
  collator: collator,
601
638
  cardOrientation: cardOrientation,
602
639
  scale: scale
603
- }) : layout
604
- , [
640
+ }) : layout, [
605
641
  layout,
606
642
  collator,
607
643
  cardOrientation,
608
644
  scale
609
645
  ]);
610
646
  let layoutType = cardViewLayout.layoutType;
611
- let stringFormatter = $jpY3B$reactariai18n.useLocalizedStringFormatter((/*@__PURE__*/$parcel$interopDefault($dc38f0b958ac5018$exports)));
612
- let { direction: direction } = $jpY3B$reactariai18n.useLocale();
613
- let { collection: collection } = $jpY3B$reactstatelylist.useListState(props);
614
- let gridCollection = $jpY3B$react.useMemo(()=>new $jpY3B$reactstatelygrid.GridCollection({
647
+ let stringFormatter = (0, $jpY3B$reactariai18n.useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($dc38f0b958ac5018$exports))));
648
+ let { direction: direction } = (0, $jpY3B$reactariai18n.useLocale)();
649
+ let { collection: collection } = (0, $jpY3B$reactstatelylist.useListState)(props);
650
+ let gridCollection = (0, $jpY3B$react.useMemo)(()=>new (0, $jpY3B$reactstatelygrid.GridCollection)({
615
651
  columnCount: 1,
616
652
  items: [
617
653
  ...collection
@@ -622,7 +658,7 @@ function $514a55f6d91f25ef$var$CardView(props, ref) {
622
658
  childNodes: [
623
659
  {
624
660
  key: `cell-${item.key}`,
625
- type: 'cell',
661
+ type: "cell",
626
662
  value: null,
627
663
  level: 0,
628
664
  rendered: null,
@@ -631,39 +667,36 @@ function $514a55f6d91f25ef$var$CardView(props, ref) {
631
667
  childNodes: []
632
668
  }
633
669
  ]
634
- })
635
- )
636
- })
637
- , [
670
+ }))
671
+ }), [
638
672
  collection
639
673
  ]);
640
- let state = $jpY3B$reactstatelygrid.useGridState({
674
+ let state = (0, $jpY3B$reactstatelygrid.useGridState)({
641
675
  ...props,
642
- selectionMode: cardOrientation === 'horizontal' && layoutType === 'grid' ? 'none' : props.selectionMode,
676
+ selectionMode: cardOrientation === "horizontal" && layoutType === "grid" ? "none" : props.selectionMode,
643
677
  collection: gridCollection,
644
- focusMode: 'cell'
678
+ focusMode: "cell"
645
679
  });
646
680
  cardViewLayout.collection = gridCollection;
647
681
  cardViewLayout.disabledKeys = state.disabledKeys;
648
682
  cardViewLayout.isLoading = isLoading;
649
683
  cardViewLayout.direction = direction;
650
- let { gridProps: gridProps } = $jpY3B$reactariagrid.useGrid({
684
+ let { gridProps: gridProps } = (0, $jpY3B$reactariagrid.useGrid)({
651
685
  ...props,
652
686
  isVirtualized: true,
653
687
  keyboardDelegate: cardViewLayout
654
688
  }, state, domRef);
655
- let renderWrapper = (parent, reusableView)=>/*#__PURE__*/ ($parcel$interopDefault($jpY3B$react)).createElement($jpY3B$reactariavirtualizer.VirtualizerItem, {
689
+ let renderWrapper = (parent, reusableView)=>/*#__PURE__*/ (0, ($parcel$interopDefault($jpY3B$react))).createElement((0, $jpY3B$reactariavirtualizer.VirtualizerItem), {
656
690
  key: reusableView.key,
657
691
  reusableView: reusableView,
658
692
  parent: parent
659
- })
660
- ;
693
+ });
661
694
  let focusedKey = state.selectionManager.focusedKey;
662
695
  let focusedItem = gridCollection.getItem(state.selectionManager.focusedKey);
663
696
  if ((focusedItem === null || focusedItem === void 0 ? void 0 : focusedItem.parentKey) != null) focusedKey = focusedItem.parentKey;
664
697
  let margin = cardViewLayout.margin || 0;
665
698
  let virtualizer = cardViewLayout.virtualizer;
666
- let scrollToItem = $jpY3B$react.useCallback((key)=>{
699
+ let scrollToItem = (0, $jpY3B$react.useCallback)((key)=>{
667
700
  virtualizer && virtualizer.scrollToItem(key, {
668
701
  duration: 0,
669
702
  offsetY: margin
@@ -673,17 +706,17 @@ function $514a55f6d91f25ef$var$CardView(props, ref) {
673
706
  virtualizer
674
707
  ]);
675
708
  // TODO: does aria-row count and aria-col count need to be modified? Perhaps aria-col count needs to be omitted
676
- return(/*#__PURE__*/ ($parcel$interopDefault($jpY3B$react)).createElement($e57ab98cef2f01a5$export$64992ac69f286e5c.Provider, {
709
+ return /*#__PURE__*/ (0, ($parcel$interopDefault($jpY3B$react))).createElement((0, $e57ab98cef2f01a5$export$64992ac69f286e5c).Provider, {
677
710
  value: {
678
711
  state: state,
679
712
  isQuiet: isQuiet,
680
713
  layout: cardViewLayout,
681
714
  cardOrientation: cardOrientation
682
715
  }
683
- }, /*#__PURE__*/ ($parcel$interopDefault($jpY3B$react)).createElement($jpY3B$reactariavirtualizer.Virtualizer, {
716
+ }, /*#__PURE__*/ (0, ($parcel$interopDefault($jpY3B$react))).createElement((0, $jpY3B$reactariavirtualizer.Virtualizer), {
684
717
  ...gridProps,
685
718
  ...styleProps,
686
- className: $jpY3B$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($71570f0038472fa2$exports)), 'spectrum-CardView'),
719
+ className: (0, $jpY3B$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($71570f0038472fa2$exports))), "spectrum-CardView"),
687
720
  ref: domRef,
688
721
  focusedKey: focusedKey,
689
722
  scrollDirection: "vertical",
@@ -695,97 +728,117 @@ function $514a55f6d91f25ef$var$CardView(props, ref) {
695
728
  transitionDuration: isLoading ? 160 : 220,
696
729
  scrollToItem: scrollToItem
697
730
  }, (type, item)=>{
698
- if (type === 'item') return(/*#__PURE__*/ ($parcel$interopDefault($jpY3B$react)).createElement($514a55f6d91f25ef$var$InternalCard, {
731
+ if (type === "item") return /*#__PURE__*/ (0, ($parcel$interopDefault($jpY3B$react))).createElement($514a55f6d91f25ef$var$InternalCard, {
699
732
  item: item
700
- }));
701
- else if (type === 'loader') return(/*#__PURE__*/ ($parcel$interopDefault($jpY3B$react)).createElement($514a55f6d91f25ef$var$CenteredWrapper, null, /*#__PURE__*/ ($parcel$interopDefault($jpY3B$react)).createElement($jpY3B$reactspectrumprogress.ProgressCircle, {
733
+ });
734
+ else if (type === "loader") return /*#__PURE__*/ (0, ($parcel$interopDefault($jpY3B$react))).createElement($514a55f6d91f25ef$var$CenteredWrapper, null, /*#__PURE__*/ (0, ($parcel$interopDefault($jpY3B$react))).createElement((0, $jpY3B$reactspectrumprogress.ProgressCircle), {
702
735
  isIndeterminate: true,
703
- "aria-label": state.collection.size > 0 ? stringFormatter.format('loadingMore') : stringFormatter.format('loading')
704
- })));
705
- else if (type === 'placeholder') {
736
+ "aria-label": state.collection.size > 0 ? stringFormatter.format("loadingMore") : stringFormatter.format("loading")
737
+ }));
738
+ else if (type === "placeholder") {
706
739
  let emptyState = renderEmptyState ? renderEmptyState() : null;
707
740
  if (emptyState == null) return null;
708
- return(/*#__PURE__*/ ($parcel$interopDefault($jpY3B$react)).createElement($514a55f6d91f25ef$var$CenteredWrapper, null, emptyState));
741
+ return /*#__PURE__*/ (0, ($parcel$interopDefault($jpY3B$react))).createElement($514a55f6d91f25ef$var$CenteredWrapper, null, emptyState);
709
742
  }
710
- })));
743
+ }));
711
744
  }
712
745
  function $514a55f6d91f25ef$var$CenteredWrapper({ children: children }) {
713
- let { state: state } = $e57ab98cef2f01a5$export$fea0b38586ec8f13();
714
- return(/*#__PURE__*/ ($parcel$interopDefault($jpY3B$react)).createElement("div", {
746
+ let { state: state } = (0, $e57ab98cef2f01a5$export$fea0b38586ec8f13)();
747
+ return /*#__PURE__*/ (0, ($parcel$interopDefault($jpY3B$react))).createElement("div", {
715
748
  role: "row",
716
749
  "aria-rowindex": state.collection.size + 1,
717
- className: $jpY3B$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($71570f0038472fa2$exports)), 'spectrum-CardView-centeredWrapper')
718
- }, /*#__PURE__*/ ($parcel$interopDefault($jpY3B$react)).createElement("div", {
750
+ className: (0, $jpY3B$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($71570f0038472fa2$exports))), "spectrum-CardView-centeredWrapper")
751
+ }, /*#__PURE__*/ (0, ($parcel$interopDefault($jpY3B$react))).createElement("div", {
719
752
  role: "gridcell"
720
- }, children)));
753
+ }, children));
721
754
  }
722
755
  function $514a55f6d91f25ef$var$InternalCard(props) {
723
756
  let { item: item } = props;
724
757
  let cellNode = [
725
758
  ...item.childNodes
726
759
  ][0];
727
- let { state: state , cardOrientation: cardOrientation , isQuiet: isQuiet , layout: layout } = $e57ab98cef2f01a5$export$fea0b38586ec8f13();
760
+ let { state: state , cardOrientation: cardOrientation , isQuiet: isQuiet , layout: layout } = (0, $e57ab98cef2f01a5$export$fea0b38586ec8f13)();
728
761
  let layoutType = layout.layoutType;
729
- let rowRef = $jpY3B$react.useRef();
730
- let cellRef = $jpY3B$react.useRef();
731
- let unwrappedRef = $jpY3B$reactspectrumutils.useUnwrapDOMRef(cellRef);
732
- let { rowProps: gridRowProps } = $jpY3B$reactariagrid.useGridRow({
762
+ let rowRef = (0, $jpY3B$react.useRef)();
763
+ let cellRef = (0, $jpY3B$react.useRef)();
764
+ let unwrappedRef = (0, $jpY3B$reactspectrumutils.useUnwrapDOMRef)(cellRef);
765
+ let { rowProps: gridRowProps } = (0, $jpY3B$reactariagrid.useGridRow)({
733
766
  node: item,
734
767
  isVirtualized: true
735
768
  }, state, rowRef);
736
- let { gridCellProps: gridCellProps } = $jpY3B$reactariagrid.useGridCell({
769
+ let { gridCellProps: gridCellProps } = (0, $jpY3B$reactariagrid.useGridCell)({
737
770
  node: cellNode,
738
- focusMode: 'cell'
771
+ focusMode: "cell"
739
772
  }, state, unwrappedRef);
740
773
  // Prevent space key from scrolling the CardView if triggered on a disabled item or on a Card in a selectionMode="none" CardView.
741
- let allowsInteraction = state.selectionManager.selectionMode !== 'none';
774
+ let allowsInteraction = state.selectionManager.selectionMode !== "none";
742
775
  let isDisabled = !allowsInteraction || state.disabledKeys.has(item.key);
743
776
  let onKeyDown = (e)=>{
744
- if (e.key === ' ' && isDisabled) e.preventDefault();
777
+ if (e.key === " " && isDisabled) e.preventDefault();
745
778
  };
746
- let rowProps = $jpY3B$reactariautils.mergeProps(gridRowProps, {
779
+ let rowProps = (0, $jpY3B$reactariautils.mergeProps)(gridRowProps, {
747
780
  onKeyDown: onKeyDown
748
781
  });
749
- if (layoutType === 'grid' || layoutType === 'gallery') isQuiet = true;
750
- if (layoutType !== 'grid') cardOrientation = 'vertical';
782
+ if (layoutType === "grid" || layoutType === "gallery") isQuiet = true;
783
+ if (layoutType !== "grid") cardOrientation = "vertical";
751
784
  // We don't want to focus the checkbox (or any other focusable elements) within the Card
752
785
  // when pressing the arrow keys so we delete the key down handler here. Arrow key navigation between
753
786
  // the cards in the CardView is handled by useGrid => useSelectableCollection instead.
754
787
  delete gridCellProps.onKeyDownCapture;
755
- return(/*#__PURE__*/ ($parcel$interopDefault($jpY3B$react)).createElement("div", {
788
+ return /*#__PURE__*/ (0, ($parcel$interopDefault($jpY3B$react))).createElement("div", {
756
789
  ...rowProps,
757
790
  ref: rowRef,
758
- className: $jpY3B$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($71570f0038472fa2$exports)), 'spectrum-CardView-row')
759
- }, /*#__PURE__*/ ($parcel$interopDefault($jpY3B$react)).createElement($7888205ff7de382f$export$7a6ccaf429ad93a8, {
791
+ className: (0, $jpY3B$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($71570f0038472fa2$exports))), "spectrum-CardView-row")
792
+ }, /*#__PURE__*/ (0, ($parcel$interopDefault($jpY3B$react))).createElement((0, $7888205ff7de382f$export$7a6ccaf429ad93a8), {
760
793
  ref: cellRef,
761
794
  articleProps: gridCellProps,
762
795
  isQuiet: isQuiet,
763
796
  orientation: cardOrientation,
764
797
  item: item,
765
798
  layout: layoutType
766
- }, item.rendered)));
799
+ }, item.rendered));
767
800
  }
768
801
  /**
769
802
  * TODO: Add description of component here.
770
- */ const $514a55f6d91f25ef$export$7e52c821f7b6f422 = /*#__PURE__*/ ($parcel$interopDefault($jpY3B$react)).forwardRef($514a55f6d91f25ef$var$CardView);
771
-
772
-
773
-
774
- class $5ee605f09afaa4de$export$64943d2e59d72a29 extends $jpY3B$reactstatelyvirtualizer.Layout {
803
+ */ const $514a55f6d91f25ef$export$7e52c821f7b6f422 = /*#__PURE__*/ (0, ($parcel$interopDefault($jpY3B$react))).forwardRef($514a55f6d91f25ef$var$CardView);
804
+
805
+
806
+ /*
807
+ * Copyright 2021 Adobe. All rights reserved.
808
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
809
+ * you may not use this file except in compliance with the License. You may obtain a copy
810
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
811
+ *
812
+ * Unless required by applicable law or agreed to in writing, software distributed under
813
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
814
+ * OF ANY KIND, either express or implied. See the License for the specific language
815
+ * governing permissions and limitations under the License.
816
+ */ /*
817
+ * Copyright 2021 Adobe. All rights reserved.
818
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
819
+ * you may not use this file except in compliance with the License. You may obtain a copy
820
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
821
+ *
822
+ * Unless required by applicable law or agreed to in writing, software distributed under
823
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
824
+ * OF ANY KIND, either express or implied. See the License for the specific language
825
+ * governing permissions and limitations under the License.
826
+ */
827
+
828
+ class $5ee605f09afaa4de$export$64943d2e59d72a29 extends (0, $jpY3B$reactstatelyvirtualizer.Layout) {
775
829
  validate(invalidationContext) {
776
830
  this.collection = this.virtualizer.collection;
777
831
  this.buildCollection(invalidationContext);
778
832
  // Remove layout info that doesn't exist in new collection
779
833
  if (this.lastCollection) {
780
834
  for (let key of this.lastCollection.getKeys())if (!this.collection.getItem(key)) this.layoutInfos.delete(key);
781
- if (!this.isLoading) this.layoutInfos.delete('loader');
782
- if (this.collection.size > 0) this.layoutInfos.delete('placeholder');
835
+ if (!this.isLoading) this.layoutInfos.delete("loader");
836
+ if (this.collection.size > 0) this.layoutInfos.delete("placeholder");
783
837
  }
784
838
  this.lastCollection = this.collection;
785
839
  }
786
840
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
787
- buildCollection(invalidationContext) {
788
- }
841
+ buildCollection(invalidationContext) {}
789
842
  getContentSize() {
790
843
  return this.contentSize;
791
844
  }
@@ -802,12 +855,12 @@ class $5ee605f09afaa4de$export$64943d2e59d72a29 extends $jpY3B$reactstatelyvirtu
802
855
  }
803
856
  getInitialLayoutInfo(layoutInfo) {
804
857
  layoutInfo.opacity = 0;
805
- layoutInfo.transform = 'scale3d(0.8, 0.8, 0.8)';
858
+ layoutInfo.transform = "scale3d(0.8, 0.8, 0.8)";
806
859
  return layoutInfo;
807
860
  }
808
861
  getFinalLayoutInfo(layoutInfo) {
809
862
  layoutInfo.opacity = 0;
810
- layoutInfo.transform = 'scale3d(0.8, 0.8, 0.8)';
863
+ layoutInfo.transform = "scale3d(0.8, 0.8, 0.8)";
811
864
  return layoutInfo;
812
865
  }
813
866
  _findClosestLayoutInfo(target, rect) {
@@ -815,7 +868,7 @@ class $5ee605f09afaa4de$export$64943d2e59d72a29 extends $jpY3B$reactstatelyvirtu
815
868
  let best = null;
816
869
  let bestDistance = Infinity;
817
870
  // Calculates distance as the distance between the center of 2 rects.
818
- for (let cur of layoutInfos)if (cur.type === 'item') {
871
+ for (let cur of layoutInfos)if (cur.type === "item") {
819
872
  let curRect = cur.rect;
820
873
  let targetMidX = (target.x + target.maxX) / 2;
821
874
  let targetMidY = (target.y + target.maxY) / 2;
@@ -838,39 +891,39 @@ class $5ee605f09afaa4de$export$64943d2e59d72a29 extends $jpY3B$reactstatelyvirtu
838
891
  // Expected key is the currently focused cell so we need the parent row key
839
892
  let parentRowKey = this.collection.getItem(key).parentKey;
840
893
  let layoutInfo = this.getLayoutInfo(parentRowKey);
841
- let rect = new $jpY3B$reactstatelyvirtualizer.Rect(layoutInfo.rect.x, layoutInfo.rect.maxY + 1, layoutInfo.rect.width, this.virtualizer.visibleRect.height);
894
+ let rect = new (0, $jpY3B$reactstatelyvirtualizer.Rect)(layoutInfo.rect.x, layoutInfo.rect.maxY + 1, layoutInfo.rect.width, this.virtualizer.visibleRect.height);
842
895
  let closestRow = this.collection.getItem((ref = this._findClosest(layoutInfo.rect, rect)) === null || ref === void 0 ? void 0 : ref.key);
843
896
  return (ref1 = closestRow === null || closestRow === void 0 ? void 0 : closestRow.childNodes[0]) === null || ref1 === void 0 ? void 0 : ref1.key;
844
897
  }
845
898
  getKeyAbove(key) {
846
- var ref, ref2;
899
+ var ref, ref1;
847
900
  // Expected key is the currently focused cell so we need the parent row key
848
901
  let parentRowKey = this.collection.getItem(key).parentKey;
849
902
  let layoutInfo = this.getLayoutInfo(parentRowKey);
850
- let rect = new $jpY3B$reactstatelyvirtualizer.Rect(layoutInfo.rect.x, 0, layoutInfo.rect.width, layoutInfo.rect.y - 1);
903
+ let rect = new (0, $jpY3B$reactstatelyvirtualizer.Rect)(layoutInfo.rect.x, 0, layoutInfo.rect.width, layoutInfo.rect.y - 1);
851
904
  let closestRow = this.collection.getItem((ref = this._findClosest(layoutInfo.rect, rect)) === null || ref === void 0 ? void 0 : ref.key);
852
- return (ref2 = closestRow === null || closestRow === void 0 ? void 0 : closestRow.childNodes[0]) === null || ref2 === void 0 ? void 0 : ref2.key;
905
+ return (ref1 = closestRow === null || closestRow === void 0 ? void 0 : closestRow.childNodes[0]) === null || ref1 === void 0 ? void 0 : ref1.key;
853
906
  }
854
907
  getKeyRightOf(key) {
855
908
  // Expected key is the currently focused cell so we need the parent row key
856
909
  let parentRowKey = this.collection.getItem(key).parentKey;
857
- key = this.direction === 'rtl' ? this.collection.getKeyBefore(parentRowKey) : this.collection.getKeyAfter(parentRowKey);
910
+ key = this.direction === "rtl" ? this.collection.getKeyBefore(parentRowKey) : this.collection.getKeyAfter(parentRowKey);
858
911
  while(key != null){
859
912
  let item = this.collection.getItem(key);
860
913
  // Don't check if item is disabled because we want to be able to focus disabled items in a grid (double check this)
861
- if (item.type === 'item') return item.childNodes[0].key;
862
- key = this.direction === 'rtl' ? this.collection.getKeyBefore(key) : this.collection.getKeyAfter(key);
914
+ if (item.type === "item") return item.childNodes[0].key;
915
+ key = this.direction === "rtl" ? this.collection.getKeyBefore(key) : this.collection.getKeyAfter(key);
863
916
  }
864
917
  }
865
918
  getKeyLeftOf(key) {
866
919
  // Expected key is the currently focused cell so we need the parent row key
867
920
  let parentRowKey = this.collection.getItem(key).parentKey;
868
- key = this.direction === 'rtl' ? this.collection.getKeyAfter(parentRowKey) : this.collection.getKeyBefore(parentRowKey);
921
+ key = this.direction === "rtl" ? this.collection.getKeyAfter(parentRowKey) : this.collection.getKeyBefore(parentRowKey);
869
922
  while(key != null){
870
923
  let item = this.collection.getItem(key);
871
924
  // Don't check if item is disabled because we want to be able to focus disabled items in a grid (double check this)
872
- if (item.type === 'item') return item.childNodes[0].key;
873
- key = this.direction === 'rtl' ? this.collection.getKeyAfter(key) : this.collection.getKeyBefore(key);
925
+ if (item.type === "item") return item.childNodes[0].key;
926
+ key = this.direction === "rtl" ? this.collection.getKeyAfter(key) : this.collection.getKeyBefore(key);
874
927
  }
875
928
  }
876
929
  getFirstKey() {
@@ -895,14 +948,14 @@ class $5ee605f09afaa4de$export$64943d2e59d72a29 extends $jpY3B$reactstatelyvirtu
895
948
  let keyAbove = (ref = this.collection.getItem(this.getKeyAbove(key))) === null || ref === void 0 ? void 0 : ref.parentKey;
896
949
  layoutInfo = this.getLayoutInfo(keyAbove);
897
950
  if (layoutInfo && layoutInfo.rect.y > pageY) while(layoutInfo && layoutInfo.rect.y > pageY){
898
- var ref3;
951
+ var ref1;
899
952
  let childKey = this.collection.getItem(layoutInfo.key).childNodes[0].key;
900
- let keyAbove = (ref3 = this.collection.getItem(this.getKeyAbove(childKey))) === null || ref3 === void 0 ? void 0 : ref3.parentKey;
901
- layoutInfo = this.getLayoutInfo(keyAbove);
953
+ let keyAbove1 = (ref1 = this.collection.getItem(this.getKeyAbove(childKey))) === null || ref1 === void 0 ? void 0 : ref1.parentKey;
954
+ layoutInfo = this.getLayoutInfo(keyAbove1);
902
955
  }
903
956
  if (layoutInfo) {
904
- let childKey = this.collection.getItem(layoutInfo.key).childNodes[0].key;
905
- return childKey;
957
+ let childKey1 = this.collection.getItem(layoutInfo.key).childNodes[0].key;
958
+ return childKey1;
906
959
  }
907
960
  }
908
961
  return this.getFirstKey();
@@ -921,14 +974,14 @@ class $5ee605f09afaa4de$export$64943d2e59d72a29 extends $jpY3B$reactstatelyvirtu
921
974
  let keyBelow = (ref = this.collection.getItem(this.getKeyBelow(key))) === null || ref === void 0 ? void 0 : ref.parentKey;
922
975
  layoutInfo = this.getLayoutInfo(keyBelow);
923
976
  if (layoutInfo && layoutInfo.rect.y < pageY) while(layoutInfo && layoutInfo.rect.y < pageY){
924
- var ref4;
977
+ var ref1;
925
978
  let childKey = this.collection.getItem(layoutInfo.key).childNodes[0].key;
926
- let keyBelow = (ref4 = this.collection.getItem(this.getKeyBelow(childKey))) === null || ref4 === void 0 ? void 0 : ref4.parentKey;
927
- layoutInfo = this.getLayoutInfo(keyBelow);
979
+ let keyBelow1 = (ref1 = this.collection.getItem(this.getKeyBelow(childKey))) === null || ref1 === void 0 ? void 0 : ref1.parentKey;
980
+ layoutInfo = this.getLayoutInfo(keyBelow1);
928
981
  }
929
982
  if (layoutInfo) {
930
- let childKey = this.collection.getItem(layoutInfo.key).childNodes[0].key;
931
- return childKey;
983
+ let childKey1 = this.collection.getItem(layoutInfo.key).childNodes[0].key;
984
+ return childKey1;
932
985
  }
933
986
  }
934
987
  return this.getLastKey();
@@ -951,14 +1004,13 @@ class $5ee605f09afaa4de$export$64943d2e59d72a29 extends $jpY3B$reactstatelyvirtu
951
1004
  }
952
1005
  return null;
953
1006
  }
954
- constructor(options = {
955
- }){
1007
+ constructor(options = {}){
956
1008
  super();
957
- this.disabledKeys = new Set();
1009
+ (0, $5ee605f09afaa4de$import$d76420afe0f7f8c4$2e2bcd8739ae039)(this, "disabledKeys", new Set());
958
1010
  this.layoutInfos = new Map();
959
1011
  this.collator = options.collator;
960
1012
  this.lastCollection = null;
961
- this.scale = options.scale || 'medium';
1013
+ this.scale = options.scale || "medium";
962
1014
  this.margin = options.margin || 24;
963
1015
  }
964
1016
  }
@@ -968,27 +1020,27 @@ class $5ee605f09afaa4de$export$64943d2e59d72a29 extends $jpY3B$reactstatelyvirtu
968
1020
  const $8019a3d2c7d098ea$var$DEFAULT_OPTIONS = {
969
1021
  S: {
970
1022
  idealRowHeight: 112,
971
- minItemSize: new $jpY3B$reactstatelyvirtualizer.Size(96, 96),
972
- itemSpacing: new $jpY3B$reactstatelyvirtualizer.Size(8, 16),
1023
+ minItemSize: new (0, $jpY3B$reactstatelyvirtualizer.Size)(96, 96),
1024
+ itemSpacing: new (0, $jpY3B$reactstatelyvirtualizer.Size)(8, 16),
973
1025
  itemPadding: 24,
974
1026
  dropSpacing: 50,
975
1027
  margin: 8
976
1028
  },
977
1029
  L: {
978
1030
  idealRowHeight: 208,
979
- minItemSize: new $jpY3B$reactstatelyvirtualizer.Size(136, 136),
980
- itemSpacing: new $jpY3B$reactstatelyvirtualizer.Size(18, 18),
1031
+ minItemSize: new (0, $jpY3B$reactstatelyvirtualizer.Size)(136, 136),
1032
+ itemSpacing: new (0, $jpY3B$reactstatelyvirtualizer.Size)(18, 18),
981
1033
  itemPadding: {
982
- 'medium': 78,
983
- 'large': 99
1034
+ "medium": 78,
1035
+ "large": 99
984
1036
  },
985
1037
  dropSpacing: 100,
986
1038
  margin: 24
987
1039
  }
988
1040
  };
989
- class $8019a3d2c7d098ea$export$8e52095834484b61 extends $5ee605f09afaa4de$export$64943d2e59d72a29 {
1041
+ class $8019a3d2c7d098ea$export$8e52095834484b61 extends (0, $5ee605f09afaa4de$export$64943d2e59d72a29) {
990
1042
  get layoutType() {
991
- return 'gallery';
1043
+ return "gallery";
992
1044
  }
993
1045
  /**
994
1046
  * Takes a row of widths and if there are any widths smaller than the min-width, leech width starting from
@@ -996,8 +1048,7 @@ class $8019a3d2c7d098ea$export$8e52095834484b61 extends $5ee605f09afaa4de$export
996
1048
  * Do this until all assets meet the min-width.
997
1049
  * */ _distributeWidths(widths) {
998
1050
  // create a copy of the widths array and sort it largest to smallest
999
- let sortedWidths = widths.concat().sort((a, b)=>a[1] > b[1] ? -1 : 1
1000
- );
1051
+ let sortedWidths = widths.concat().sort((a, b)=>a[1] > b[1] ? -1 : 1);
1001
1052
  for (let width of widths)// for each width, if it's smaller than the min width
1002
1053
  if (width[1] < this.minItemSize.width) {
1003
1054
  // then figure out how much smaller
@@ -1053,8 +1104,7 @@ class $8019a3d2c7d098ea$export$8e52095834484b61 extends $5ee605f09afaa4de$export
1053
1104
  // if the available width can't hold two items, then every item will get its own row
1054
1105
  // this leads to a faster run through linear partition and more dependable output for small row widths
1055
1106
  if (availableWidth <= this.minItemSize.width * 2 + this.itemPadding * 2) rows = this.collection.size;
1056
- let weightedRatios = ratios.map((ratio)=>ratio < this.threshold ? ratio + 0.5 * (1 / ratio) : ratio
1057
- );
1107
+ let weightedRatios = ratios.map((ratio)=>ratio < this.threshold ? ratio + 0.5 * (1 / ratio) : ratio);
1058
1108
  let partition = $8019a3d2c7d098ea$var$linearPartition(weightedRatios, rows);
1059
1109
  let index = 0;
1060
1110
  for (let row of partition){
@@ -1081,13 +1131,13 @@ class $8019a3d2c7d098ea$export$8e52095834484b61 extends $5ee605f09afaa4de$export
1081
1131
  this._distributeWidths(widths);
1082
1132
  // Create items for this row.
1083
1133
  for(let j2 = index; j2 < index + row.length; j2++){
1084
- let node = this.collection.rows[j2];
1085
- let itemWidth = Math.max(widths[j2 - index][1], this.minItemSize.width);
1086
- let rect = new $jpY3B$reactstatelyvirtualizer.Rect(x, y, itemWidth, itemHeight);
1087
- let layoutInfo = new $jpY3B$reactstatelyvirtualizer.LayoutInfo(node.type, node.key, rect);
1134
+ let node1 = this.collection.rows[j2];
1135
+ let itemWidth1 = Math.max(widths[j2 - index][1], this.minItemSize.width);
1136
+ let rect = new (0, $jpY3B$reactstatelyvirtualizer.Rect)(x, y, itemWidth1, itemHeight);
1137
+ let layoutInfo = new (0, $jpY3B$reactstatelyvirtualizer.LayoutInfo)(node1.type, node1.key, rect);
1088
1138
  layoutInfo.allowOverflow = true;
1089
- this.layoutInfos.set(node.key, layoutInfo);
1090
- x += itemWidth + this.itemSpacing.width;
1139
+ this.layoutInfos.set(node1.key, layoutInfo);
1140
+ x += itemWidth1 + this.itemSpacing.width;
1091
1141
  }
1092
1142
  y += itemHeight + this.itemSpacing.height;
1093
1143
  index += row.length;
@@ -1101,24 +1151,23 @@ class $8019a3d2c7d098ea$export$8e52095834484b61 extends $5ee605f09afaa4de$export
1101
1151
  loaderY = 0;
1102
1152
  loaderHeight = visibleHeight || 60;
1103
1153
  }
1104
- let rect = new $jpY3B$reactstatelyvirtualizer.Rect(0, loaderY, visibleWidth, loaderHeight);
1105
- let loader = new $jpY3B$reactstatelyvirtualizer.LayoutInfo('loader', 'loader', rect);
1106
- this.layoutInfos.set('loader', loader);
1154
+ let rect1 = new (0, $jpY3B$reactstatelyvirtualizer.Rect)(0, loaderY, visibleWidth, loaderHeight);
1155
+ let loader = new (0, $jpY3B$reactstatelyvirtualizer.LayoutInfo)("loader", "loader", rect1);
1156
+ this.layoutInfos.set("loader", loader);
1107
1157
  y = loader.rect.maxY;
1108
1158
  }
1109
1159
  if (this.collection.size === 0 && !this.isLoading) {
1110
- let rect = new $jpY3B$reactstatelyvirtualizer.Rect(0, 0, visibleWidth, visibleHeight);
1111
- let placeholder = new $jpY3B$reactstatelyvirtualizer.LayoutInfo('placeholder', 'placeholder', rect);
1112
- this.layoutInfos.set('placeholder', placeholder);
1160
+ let rect2 = new (0, $jpY3B$reactstatelyvirtualizer.Rect)(0, 0, visibleWidth, visibleHeight);
1161
+ let placeholder = new (0, $jpY3B$reactstatelyvirtualizer.LayoutInfo)("placeholder", "placeholder", rect2);
1162
+ this.layoutInfos.set("placeholder", placeholder);
1113
1163
  y = placeholder.rect.maxY;
1114
1164
  }
1115
1165
  }
1116
- this.contentSize = new $jpY3B$reactstatelyvirtualizer.Size(visibleWidth, y);
1166
+ this.contentSize = new (0, $jpY3B$reactstatelyvirtualizer.Size)(visibleWidth, y);
1117
1167
  }
1118
- constructor(options = {
1119
- }){
1168
+ constructor(options = {}){
1120
1169
  super(options);
1121
- let cardSize = 'L';
1170
+ let cardSize = "L";
1122
1171
  this.idealRowHeight = options.idealRowHeight || $8019a3d2c7d098ea$var$DEFAULT_OPTIONS[cardSize].idealRowHeight;
1123
1172
  this.itemSpacing = options.itemSpacing || $8019a3d2c7d098ea$var$DEFAULT_OPTIONS[cardSize].itemSpacing;
1124
1173
  this.itemPadding = options.itemPadding != null ? options.itemPadding : $8019a3d2c7d098ea$var$DEFAULT_OPTIONS[cardSize].itemPadding[this.scale];
@@ -1133,15 +1182,12 @@ function $8019a3d2c7d098ea$var$linearPartition(seq, k) {
1133
1182
  if (k <= 0) return [];
1134
1183
  if (k >= n) return seq.map((x)=>[
1135
1184
  x
1136
- ]
1137
- );
1185
+ ]);
1138
1186
  if (n === 1) return [
1139
1187
  seq
1140
1188
  ];
1141
- let table = Array(n).fill(0).map(()=>Array(k).fill(0)
1142
- );
1143
- let solution = Array(n - 1).fill(0).map(()=>Array(k - 1).fill(0)
1144
- );
1189
+ let table = Array(n).fill(0).map(()=>Array(k).fill(0));
1190
+ let solution = Array(n - 1).fill(0).map(()=>Array(k - 1).fill(0));
1145
1191
  for(let i = 0; i < n; i++)table[i][0] = seq[i] + (i > 0 ? table[i - 1][0] : 0);
1146
1192
  for(let i1 = 0; i1 < k; i1++)table[0][i1] = seq[0];
1147
1193
  for(let i2 = 1; i2 < n; i2++)for(let j = 1; j < k; j++){
@@ -1165,58 +1211,68 @@ function $8019a3d2c7d098ea$var$linearPartition(seq, k) {
1165
1211
  while(k >= 0){
1166
1212
  if (n >= 1) {
1167
1213
  let row = [];
1168
- for(let i = solution[n - 1][k] + 1; i < n + 1; i++)row.push(seq[i]);
1214
+ for(let i3 = solution[n - 1][k] + 1; i3 < n + 1; i3++)row.push(seq[i3]);
1169
1215
  result.unshift(row);
1170
1216
  n = solution[n - 1][k];
1171
1217
  }
1172
1218
  k--;
1173
1219
  }
1174
- let row = [];
1175
- for(let i3 = 0; i3 < n + 1; i3++)row.push(seq[i3]);
1176
- result.unshift(row);
1220
+ let row1 = [];
1221
+ for(let i4 = 0; i4 < n + 1; i4++)row1.push(seq[i4]);
1222
+ result.unshift(row1);
1177
1223
  return result;
1178
1224
  }
1179
1225
 
1180
1226
 
1181
-
1227
+ /*
1228
+ * Copyright 2021 Adobe. All rights reserved.
1229
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
1230
+ * you may not use this file except in compliance with the License. You may obtain a copy
1231
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
1232
+ *
1233
+ * Unless required by applicable law or agreed to in writing, software distributed under
1234
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
1235
+ * OF ANY KIND, either express or implied. See the License for the specific language
1236
+ * governing permissions and limitations under the License.
1237
+ */
1182
1238
 
1183
1239
  const $71b727f94b595b1a$var$DEFAULT_OPTIONS = {
1184
1240
  S: {
1185
1241
  itemPadding: 20,
1186
1242
  minItemSize: {
1187
- 'vertical': new $jpY3B$reactstatelyvirtualizer.Size(96, 96)
1243
+ "vertical": new (0, $jpY3B$reactstatelyvirtualizer.Size)(96, 96)
1188
1244
  },
1189
- maxItemSize: new $jpY3B$reactstatelyvirtualizer.Size(Infinity, Infinity),
1245
+ maxItemSize: new (0, $jpY3B$reactstatelyvirtualizer.Size)(Infinity, Infinity),
1190
1246
  margin: 8,
1191
- minSpace: new $jpY3B$reactstatelyvirtualizer.Size(6, 6),
1247
+ minSpace: new (0, $jpY3B$reactstatelyvirtualizer.Size)(6, 6),
1192
1248
  maxColumns: Infinity,
1193
1249
  dropSpacing: 50
1194
1250
  },
1195
1251
  L: {
1196
1252
  itemPadding: {
1197
- 'vertical': {
1198
- 'medium': 78,
1199
- 'large': 98
1253
+ "vertical": {
1254
+ "medium": 78,
1255
+ "large": 98
1200
1256
  },
1201
- 'horizontal': {
1202
- 'medium': 150,
1203
- 'large': 170
1257
+ "horizontal": {
1258
+ "medium": 150,
1259
+ "large": 170
1204
1260
  }
1205
1261
  },
1206
1262
  minItemSize: {
1207
- 'vertical': new $jpY3B$reactstatelyvirtualizer.Size(208, 208),
1208
- 'horizontal': new $jpY3B$reactstatelyvirtualizer.Size(102, 102)
1263
+ "vertical": new (0, $jpY3B$reactstatelyvirtualizer.Size)(208, 208),
1264
+ "horizontal": new (0, $jpY3B$reactstatelyvirtualizer.Size)(102, 102)
1209
1265
  },
1210
- maxItemSize: new $jpY3B$reactstatelyvirtualizer.Size(Infinity, Infinity),
1266
+ maxItemSize: new (0, $jpY3B$reactstatelyvirtualizer.Size)(Infinity, Infinity),
1211
1267
  margin: 24,
1212
- minSpace: new $jpY3B$reactstatelyvirtualizer.Size(18, 18),
1268
+ minSpace: new (0, $jpY3B$reactstatelyvirtualizer.Size)(18, 18),
1213
1269
  maxColumns: Infinity,
1214
1270
  dropSpacing: 100
1215
1271
  }
1216
1272
  };
1217
- class $71b727f94b595b1a$export$7d2b12578154a735 extends $5ee605f09afaa4de$export$64943d2e59d72a29 {
1273
+ class $71b727f94b595b1a$export$7d2b12578154a735 extends (0, $5ee605f09afaa4de$export$64943d2e59d72a29) {
1218
1274
  get layoutType() {
1219
- return 'grid';
1275
+ return "grid";
1220
1276
  }
1221
1277
  getIndexAtPoint(x, y, allowInsertingAtEnd = false) {
1222
1278
  let itemHeight = this.itemSize.height + this.minSpace.height;
@@ -1238,11 +1294,11 @@ class $71b727f94b595b1a$export$7d2b12578154a735 extends $5ee605f09afaa4de$export
1238
1294
  let lastVisibleItem = this.getIndexAtPoint(rect.maxX, rect.maxY);
1239
1295
  for(let index = firstVisibleItem; index <= lastVisibleItem; index++){
1240
1296
  let keyFromIndex = this.collection.rows[index].key;
1241
- let layoutInfo = this.layoutInfos.get(keyFromIndex);
1242
- if (layoutInfo && this.isVisible(layoutInfo, rect)) res.push(layoutInfo);
1297
+ let layoutInfo1 = this.layoutInfos.get(keyFromIndex);
1298
+ if (layoutInfo1 && this.isVisible(layoutInfo1, rect)) res.push(layoutInfo1);
1243
1299
  }
1244
1300
  // Check if loader is in view and add to res if so
1245
- let loader = this.layoutInfos.get('loader');
1301
+ let loader = this.layoutInfos.get("loader");
1246
1302
  if (loader && this.isVisible(loader, rect)) res.push(loader);
1247
1303
  }
1248
1304
  return res;
@@ -1250,8 +1306,8 @@ class $71b727f94b595b1a$export$7d2b12578154a735 extends $5ee605f09afaa4de$export
1250
1306
  buildCollection() {
1251
1307
  let visibleWidth = this.virtualizer.visibleRect.width;
1252
1308
  let visibleHeight = this.virtualizer.visibleRect.height;
1253
- let horizontalItemPadding = this.cardOrientation === 'horizontal' ? this.itemPadding : 0;
1254
- let verticalItemPadding = this.cardOrientation === 'vertical' ? this.itemPadding : 0;
1309
+ let horizontalItemPadding = this.cardOrientation === "horizontal" ? this.itemPadding : 0;
1310
+ let verticalItemPadding = this.cardOrientation === "vertical" ? this.itemPadding : 0;
1255
1311
  let minCardWidth = this.minItemSize.width + horizontalItemPadding;
1256
1312
  // Compute the number of rows and columns needed to display the content
1257
1313
  let availableWidth = visibleWidth - this.margin * 2;
@@ -1267,7 +1323,7 @@ class $71b727f94b595b1a$export$7d2b12578154a735 extends $5ee605f09afaa4de$export
1267
1323
  let t = (itemWidth - minCardWidth) / minCardWidth;
1268
1324
  let itemHeight = Math.floor(this.minItemSize.height + this.minItemSize.height * t);
1269
1325
  itemHeight = Math.max(this.minItemSize.height, Math.min(this.maxItemSize.height, itemHeight)) + verticalItemPadding;
1270
- this.itemSize = new $jpY3B$reactstatelyvirtualizer.Size(itemWidth, itemHeight);
1326
+ this.itemSize = new (0, $jpY3B$reactstatelyvirtualizer.Size)(itemWidth, itemHeight);
1271
1327
  // Compute the horizontal spacing and content height
1272
1328
  this.horizontalSpacing = this.numColumns < 2 ? 0 : Math.floor((availableWidth - this.numColumns * this.itemSize.width) / (this.numColumns - 1));
1273
1329
  let y = this.margin;
@@ -1286,27 +1342,27 @@ class $71b727f94b595b1a$export$7d2b12578154a735 extends $5ee605f09afaa4de$export
1286
1342
  loaderY = 0;
1287
1343
  loaderHeight = visibleHeight || 60;
1288
1344
  }
1289
- let rect = new $jpY3B$reactstatelyvirtualizer.Rect(0, loaderY, visibleWidth, loaderHeight);
1290
- let loader = new $jpY3B$reactstatelyvirtualizer.LayoutInfo('loader', 'loader', rect);
1291
- this.layoutInfos.set('loader', loader);
1345
+ let rect = new (0, $jpY3B$reactstatelyvirtualizer.Rect)(0, loaderY, visibleWidth, loaderHeight);
1346
+ let loader = new (0, $jpY3B$reactstatelyvirtualizer.LayoutInfo)("loader", "loader", rect);
1347
+ this.layoutInfos.set("loader", loader);
1292
1348
  y = loader.rect.maxY;
1293
1349
  }
1294
1350
  if (this.collection.size === 0 && !this.isLoading) {
1295
- let rect = new $jpY3B$reactstatelyvirtualizer.Rect(0, 0, visibleWidth, visibleHeight);
1296
- let placeholder = new $jpY3B$reactstatelyvirtualizer.LayoutInfo('placeholder', 'placeholder', rect);
1297
- this.layoutInfos.set('placeholder', placeholder);
1351
+ let rect1 = new (0, $jpY3B$reactstatelyvirtualizer.Rect)(0, 0, visibleWidth, visibleHeight);
1352
+ let placeholder = new (0, $jpY3B$reactstatelyvirtualizer.LayoutInfo)("placeholder", "placeholder", rect1);
1353
+ this.layoutInfos.set("placeholder", placeholder);
1298
1354
  y = placeholder.rect.maxY;
1299
1355
  }
1300
- this.contentSize = new $jpY3B$reactstatelyvirtualizer.Size(visibleWidth, y);
1356
+ this.contentSize = new (0, $jpY3B$reactstatelyvirtualizer.Size)(visibleWidth, y);
1301
1357
  }
1302
1358
  buildChild(node, y, index) {
1303
1359
  let row = Math.floor(index / this.numColumns);
1304
1360
  let column = index % this.numColumns;
1305
1361
  let x = this.margin + column * (this.itemSize.width + this.horizontalSpacing);
1306
1362
  y = this.margin + row * (this.itemSize.height + this.minSpace.height);
1307
- let rect = new $jpY3B$reactstatelyvirtualizer.Rect(x, y, this.itemSize.width, this.itemSize.height);
1363
+ let rect = new (0, $jpY3B$reactstatelyvirtualizer.Rect)(x, y, this.itemSize.width, this.itemSize.height);
1308
1364
  // TODO: Perhaps have it so that the child key for each row is stored with the layoutInfo?
1309
- let layoutInfo = new $jpY3B$reactstatelyvirtualizer.LayoutInfo(node.type, node.key, rect);
1365
+ let layoutInfo = new (0, $jpY3B$reactstatelyvirtualizer.LayoutInfo)(node.type, node.key, rect);
1310
1366
  layoutInfo.allowOverflow = true;
1311
1367
  this.layoutInfos.set(node.key, layoutInfo);
1312
1368
  return layoutInfo;
@@ -1319,8 +1375,7 @@ class $71b727f94b595b1a$export$7d2b12578154a735 extends $5ee605f09afaa4de$export
1319
1375
  // Expected key is the currently focused cell so we need the parent row key
1320
1376
  let parentRowKey = this.collection.getItem(key).parentKey;
1321
1377
  let indexRowBelow;
1322
- let index = this.collection.rows.findIndex((card)=>card.key === parentRowKey
1323
- );
1378
+ let index = this.collection.rows.findIndex((card)=>card.key === parentRowKey);
1324
1379
  if (index !== -1) indexRowBelow = index + this.numColumns;
1325
1380
  else return null;
1326
1381
  return ((ref = this.collection.rows[indexRowBelow]) === null || ref === void 0 ? void 0 : ref.childNodes[0].key) || null;
@@ -1330,17 +1385,15 @@ class $71b727f94b595b1a$export$7d2b12578154a735 extends $5ee605f09afaa4de$export
1330
1385
  // Expected key is the currently focused cell so we need the parent row key
1331
1386
  let parentRowKey = this.collection.getItem(key).parentKey;
1332
1387
  let indexRowAbove;
1333
- let index = this.collection.rows.findIndex((card)=>card.key === parentRowKey
1334
- );
1388
+ let index = this.collection.rows.findIndex((card)=>card.key === parentRowKey);
1335
1389
  if (index !== -1) indexRowAbove = index - this.numColumns;
1336
1390
  else return null;
1337
1391
  return ((ref = this.collection.rows[indexRowAbove]) === null || ref === void 0 ? void 0 : ref.childNodes[0].key) || null;
1338
1392
  }
1339
- constructor(options = {
1340
- }){
1393
+ constructor(options = {}){
1341
1394
  super(options);
1342
- let cardSize = 'L';
1343
- this.cardOrientation = options.cardOrientation || 'vertical';
1395
+ let cardSize = "L";
1396
+ this.cardOrientation = options.cardOrientation || "vertical";
1344
1397
  this.minItemSize = options.minItemSize || $71b727f94b595b1a$var$DEFAULT_OPTIONS[cardSize].minItemSize[this.cardOrientation];
1345
1398
  this.maxItemSize = options.maxItemSize || $71b727f94b595b1a$var$DEFAULT_OPTIONS[cardSize].maxItemSize;
1346
1399
  this.margin = options.margin != null ? options.margin : $71b727f94b595b1a$var$DEFAULT_OPTIONS[cardSize].margin;
@@ -1355,11 +1408,21 @@ class $71b727f94b595b1a$export$7d2b12578154a735 extends $5ee605f09afaa4de$export
1355
1408
  }
1356
1409
 
1357
1410
 
1411
+ /*
1412
+ * Copyright 2021 Adobe. All rights reserved.
1413
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
1414
+ * you may not use this file except in compliance with the License. You may obtain a copy
1415
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
1416
+ *
1417
+ * Unless required by applicable law or agreed to in writing, software distributed under
1418
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
1419
+ * OF ANY KIND, either express or implied. See the License for the specific language
1420
+ * governing permissions and limitations under the License.
1421
+ */
1358
1422
 
1359
-
1360
- class $632abf8fbf0ad57b$export$e9f7cda058ba8df8 extends $5ee605f09afaa4de$export$64943d2e59d72a29 {
1423
+ class $632abf8fbf0ad57b$export$e9f7cda058ba8df8 extends (0, $5ee605f09afaa4de$export$64943d2e59d72a29) {
1361
1424
  get layoutType() {
1362
- return 'waterfall';
1425
+ return "waterfall";
1363
1426
  }
1364
1427
  buildCollection(invalidationContext) {
1365
1428
  // Compute the number of columns needed to display the content
@@ -1399,8 +1462,8 @@ class $632abf8fbf0ad57b$export$e9f7cda058ba8df8 extends $5ee605f09afaa4de$export
1399
1462
  let column = this.getNextColumnIndex(columnHeights);
1400
1463
  let x = this.margin + column * (itemWidth + horizontalSpacing);
1401
1464
  let y = columnHeights[column];
1402
- let rect = new $jpY3B$reactstatelyvirtualizer.Rect(x, y, itemWidth, height);
1403
- let layoutInfo = new $jpY3B$reactstatelyvirtualizer.LayoutInfo(node.type, key, rect);
1465
+ let rect = new (0, $jpY3B$reactstatelyvirtualizer.Rect)(x, y, itemWidth, height);
1466
+ let layoutInfo = new (0, $jpY3B$reactstatelyvirtualizer.LayoutInfo)(node.type, key, rect);
1404
1467
  layoutInfo.estimatedSize = estimatedSize;
1405
1468
  layoutInfo.allowOverflow = true;
1406
1469
  this.layoutInfos.set(key, layoutInfo);
@@ -1414,9 +1477,9 @@ class $632abf8fbf0ad57b$export$e9f7cda058ba8df8 extends $5ee605f09afaa4de$export
1414
1477
  // Reset all columns to the maximum for the next section
1415
1478
  let maxHeight = Math.max.apply(Math, columnHeights) - this.minSpace.height + this.margin;
1416
1479
  columnHeights.fill(maxHeight);
1417
- let y = columnHeights[0];
1480
+ let y1 = columnHeights[0];
1418
1481
  if (this.isLoading) {
1419
- let loaderY = y;
1482
+ let loaderY = y1;
1420
1483
  let loaderHeight = 60;
1421
1484
  // If there aren't any items, make loader take all avaliable room and remove margin from y calculation
1422
1485
  // so it doesn't scroll
@@ -1424,18 +1487,18 @@ class $632abf8fbf0ad57b$export$e9f7cda058ba8df8 extends $5ee605f09afaa4de$export
1424
1487
  loaderY = 0;
1425
1488
  loaderHeight = this.virtualizer.visibleRect.height || 60;
1426
1489
  }
1427
- let rect = new $jpY3B$reactstatelyvirtualizer.Rect(0, loaderY, this.virtualizer.visibleRect.width, loaderHeight);
1428
- let loader = new $jpY3B$reactstatelyvirtualizer.LayoutInfo('loader', 'loader', rect);
1429
- this.layoutInfos.set('loader', loader);
1430
- y = loader.rect.maxY;
1490
+ let rect1 = new (0, $jpY3B$reactstatelyvirtualizer.Rect)(0, loaderY, this.virtualizer.visibleRect.width, loaderHeight);
1491
+ let loader = new (0, $jpY3B$reactstatelyvirtualizer.LayoutInfo)("loader", "loader", rect1);
1492
+ this.layoutInfos.set("loader", loader);
1493
+ y1 = loader.rect.maxY;
1431
1494
  }
1432
1495
  if (this.collection.size === 0 && !this.isLoading) {
1433
- let rect = new $jpY3B$reactstatelyvirtualizer.Rect(0, 0, this.virtualizer.visibleRect.width, this.virtualizer.visibleRect.height);
1434
- let placeholder = new $jpY3B$reactstatelyvirtualizer.LayoutInfo('placeholder', 'placeholder', rect);
1435
- this.layoutInfos.set('placeholder', placeholder);
1436
- y = placeholder.rect.maxY;
1496
+ let rect2 = new (0, $jpY3B$reactstatelyvirtualizer.Rect)(0, 0, this.virtualizer.visibleRect.width, this.virtualizer.visibleRect.height);
1497
+ let placeholder = new (0, $jpY3B$reactstatelyvirtualizer.LayoutInfo)("placeholder", "placeholder", rect2);
1498
+ this.layoutInfos.set("placeholder", placeholder);
1499
+ y1 = placeholder.rect.maxY;
1437
1500
  }
1438
- this.contentSize = new $jpY3B$reactstatelyvirtualizer.Size(this.virtualizer.visibleRect.width, y);
1501
+ this.contentSize = new (0, $jpY3B$reactstatelyvirtualizer.Size)(this.virtualizer.visibleRect.width, y1);
1439
1502
  }
1440
1503
  updateItemSize(key, size) {
1441
1504
  let layoutInfo = this.layoutInfos.get(key);
@@ -1463,47 +1526,46 @@ class $632abf8fbf0ad57b$export$e9f7cda058ba8df8 extends $5ee605f09afaa4de$export
1463
1526
  // 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
1464
1527
  // and thus the top corner to top corner distance was massive.
1465
1528
  // 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
1466
- let rect = new $jpY3B$reactstatelyvirtualizer.Rect(layoutInfo.rect.maxX + 1, layoutInfo.rect.y, layoutInfo.rect.width + this.horizontalSpacing, layoutInfo.rect.height);
1529
+ let rect = new (0, $jpY3B$reactstatelyvirtualizer.Rect)(layoutInfo.rect.maxX + 1, layoutInfo.rect.y, layoutInfo.rect.width + this.horizontalSpacing, layoutInfo.rect.height);
1467
1530
  key = (ref = this._findClosest(layoutInfo.rect, rect)) === null || ref === void 0 ? void 0 : ref.key;
1468
1531
  if (!key) {
1469
1532
  var ref3;
1470
- rect = new $jpY3B$reactstatelyvirtualizer.Rect(layoutInfo.rect.maxX + 1, 0, layoutInfo.rect.width + this.horizontalSpacing, this.virtualizer.contentSize.height);
1533
+ rect = new (0, $jpY3B$reactstatelyvirtualizer.Rect)(layoutInfo.rect.maxX + 1, 0, layoutInfo.rect.width + this.horizontalSpacing, this.virtualizer.contentSize.height);
1471
1534
  key = (ref3 = this._findClosest(layoutInfo.rect, rect)) === null || ref3 === void 0 ? void 0 : ref3.key;
1472
1535
  }
1473
1536
  return (ref2 = (ref1 = this.collection.getItem(key)) === null || ref1 === void 0 ? void 0 : ref1.childNodes[0]) === null || ref2 === void 0 ? void 0 : ref2.key;
1474
1537
  }
1475
1538
  getClosestLeft(key) {
1476
- var ref, ref4, ref5;
1539
+ var ref, ref1, ref2;
1477
1540
  let layoutInfo = this.getLayoutInfo(key);
1478
1541
  // 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
1479
- let rect = new $jpY3B$reactstatelyvirtualizer.Rect(layoutInfo.rect.x - layoutInfo.rect.width - this.horizontalSpacing - 1, layoutInfo.rect.y, layoutInfo.rect.width + this.horizontalSpacing, layoutInfo.rect.height);
1542
+ let rect = new (0, $jpY3B$reactstatelyvirtualizer.Rect)(layoutInfo.rect.x - layoutInfo.rect.width - this.horizontalSpacing - 1, layoutInfo.rect.y, layoutInfo.rect.width + this.horizontalSpacing, layoutInfo.rect.height);
1480
1543
  key = (ref = this._findClosest(layoutInfo.rect, rect)) === null || ref === void 0 ? void 0 : ref.key;
1481
1544
  if (!key) {
1482
- var ref6;
1483
- rect = new $jpY3B$reactstatelyvirtualizer.Rect(layoutInfo.rect.x - layoutInfo.rect.width - this.horizontalSpacing - 1, 0, layoutInfo.rect.width + this.horizontalSpacing, this.virtualizer.contentSize.height);
1484
- key = (ref6 = this._findClosest(layoutInfo.rect, rect)) === null || ref6 === void 0 ? void 0 : ref6.key;
1545
+ var ref3;
1546
+ rect = new (0, $jpY3B$reactstatelyvirtualizer.Rect)(layoutInfo.rect.x - layoutInfo.rect.width - this.horizontalSpacing - 1, 0, layoutInfo.rect.width + this.horizontalSpacing, this.virtualizer.contentSize.height);
1547
+ key = (ref3 = this._findClosest(layoutInfo.rect, rect)) === null || ref3 === void 0 ? void 0 : ref3.key;
1485
1548
  }
1486
- return (ref5 = (ref4 = this.collection.getItem(key)) === null || ref4 === void 0 ? void 0 : ref4.childNodes[0]) === null || ref5 === void 0 ? void 0 : ref5.key;
1549
+ return (ref2 = (ref1 = this.collection.getItem(key)) === null || ref1 === void 0 ? void 0 : ref1.childNodes[0]) === null || ref2 === void 0 ? void 0 : ref2.key;
1487
1550
  }
1488
1551
  getKeyRightOf(key) {
1489
1552
  // Expected key is the currently focused cell so we need the parent row key
1490
1553
  let parentRowKey = this.collection.getItem(key).parentKey;
1491
- return this.direction === 'rtl' ? this.getClosestLeft(parentRowKey) : this.getClosestRight(parentRowKey);
1554
+ return this.direction === "rtl" ? this.getClosestLeft(parentRowKey) : this.getClosestRight(parentRowKey);
1492
1555
  }
1493
1556
  getKeyLeftOf(key) {
1494
1557
  // Expected key is the currently focused cell so we need the parent row key
1495
1558
  let parentRowKey = this.collection.getItem(key).parentKey;
1496
- return this.direction === 'rtl' ? this.getClosestRight(parentRowKey) : this.getClosestLeft(parentRowKey);
1559
+ return this.direction === "rtl" ? this.getClosestRight(parentRowKey) : this.getClosestLeft(parentRowKey);
1497
1560
  }
1498
- constructor(options = {
1499
- }){
1561
+ constructor(options = {}){
1500
1562
  // TODO: WaterfallLayout doesn't use card size in v2, but perhaps it should support it? Perhaps it would modify
1501
1563
  // minItemSize defaults or other things
1502
1564
  super(options);
1503
- this.minItemSize = options.minItemSize || new $jpY3B$reactstatelyvirtualizer.Size(240, 136);
1504
- this.maxItemSize = options.maxItemSize || new $jpY3B$reactstatelyvirtualizer.Size(Infinity, Infinity);
1565
+ this.minItemSize = options.minItemSize || new (0, $jpY3B$reactstatelyvirtualizer.Size)(240, 136);
1566
+ this.maxItemSize = options.maxItemSize || new (0, $jpY3B$reactstatelyvirtualizer.Size)(Infinity, Infinity);
1505
1567
  this.margin = options.margin != null ? options.margin : 24;
1506
- this.minSpace = options.minSpace || new $jpY3B$reactstatelyvirtualizer.Size(18, 18);
1568
+ this.minSpace = options.minSpace || new (0, $jpY3B$reactstatelyvirtualizer.Size)(18, 18);
1507
1569
  this.maxColumns = options.maxColumns || Infinity;
1508
1570
  this.itemWidth = 0;
1509
1571
  this.numColumns = 0;
@@ -1513,25 +1575,35 @@ class $632abf8fbf0ad57b$export$e9f7cda058ba8df8 extends $5ee605f09afaa4de$export
1513
1575
  }
1514
1576
 
1515
1577
 
1578
+ /*
1579
+ * Copyright 2021 Adobe. All rights reserved.
1580
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
1581
+ * you may not use this file except in compliance with the License. You may obtain a copy
1582
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
1583
+ *
1584
+ * Unless required by applicable law or agreed to in writing, software distributed under
1585
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
1586
+ * OF ANY KIND, either express or implied. See the License for the specific language
1587
+ * governing permissions and limitations under the License.
1588
+ */
1516
1589
 
1517
1590
 
1518
-
1519
- let $6b630ac4b78ba7f3$var$Card = /*#__PURE__*/ $jpY3B$react.forwardRef((props, ref)=>{
1520
- let context = $e57ab98cef2f01a5$export$fea0b38586ec8f13();
1591
+ let $6b630ac4b78ba7f3$var$Card = /*#__PURE__*/ (0, $jpY3B$react.forwardRef)((props, ref)=>{
1592
+ let context = (0, $e57ab98cef2f01a5$export$fea0b38586ec8f13)();
1521
1593
  if (context !== null) return null;
1522
- else return(/*#__PURE__*/ ($parcel$interopDefault($jpY3B$react)).createElement($7888205ff7de382f$export$7a6ccaf429ad93a8, {
1594
+ else return /*#__PURE__*/ (0, ($parcel$interopDefault($jpY3B$react))).createElement((0, $7888205ff7de382f$export$7a6ccaf429ad93a8), {
1523
1595
  ...props,
1524
1596
  ref: ref
1525
- }));
1597
+ });
1526
1598
  });
1527
1599
  // @ts-ignore
1528
1600
  $6b630ac4b78ba7f3$var$Card.getCollectionNode = function* getCollectionNode(props) {
1529
1601
  let { children: children , textValue: textValue } = props;
1530
1602
  yield {
1531
- type: 'item',
1603
+ type: "item",
1532
1604
  props: props,
1533
1605
  rendered: children,
1534
- 'aria-label': props['aria-label'],
1606
+ "aria-label": props["aria-label"],
1535
1607
  hasChildNodes: false,
1536
1608
  textValue: textValue
1537
1609
  };