@react-spectrum/card 3.0.0-alpha.12 → 3.0.0-alpha.14

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
+ var $jpY3B$swchelperslib_define_propertyjs = 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;
@@ -834,43 +887,43 @@ class $5ee605f09afaa4de$export$64943d2e59d72a29 extends $jpY3B$reactstatelyvirtu
834
887
  return best || null;
835
888
  }
836
889
  getKeyBelow(key) {
837
- var ref, ref1;
890
+ var _this__findClosest, _closestRow_childNodes_;
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);
842
- let closestRow = this.collection.getItem((ref = this._findClosest(layoutInfo.rect, rect)) === null || ref === void 0 ? void 0 : ref.key);
843
- return (ref1 = closestRow === null || closestRow === void 0 ? void 0 : closestRow.childNodes[0]) === null || ref1 === void 0 ? void 0 : ref1.key;
894
+ let rect = new (0, $jpY3B$reactstatelyvirtualizer.Rect)(layoutInfo.rect.x, layoutInfo.rect.maxY + 1, layoutInfo.rect.width, this.virtualizer.visibleRect.height);
895
+ let closestRow = this.collection.getItem((_this__findClosest = this._findClosest(layoutInfo.rect, rect)) === null || _this__findClosest === void 0 ? void 0 : _this__findClosest.key);
896
+ return (_closestRow_childNodes_ = closestRow === null || closestRow === void 0 ? void 0 : closestRow.childNodes[0]) === null || _closestRow_childNodes_ === void 0 ? void 0 : _closestRow_childNodes_.key;
844
897
  }
845
898
  getKeyAbove(key) {
846
- var ref, ref2;
899
+ var _this__findClosest, _closestRow_childNodes_;
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);
851
- 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;
903
+ let rect = new (0, $jpY3B$reactstatelyvirtualizer.Rect)(layoutInfo.rect.x, 0, layoutInfo.rect.width, layoutInfo.rect.y - 1);
904
+ let closestRow = this.collection.getItem((_this__findClosest = this._findClosest(layoutInfo.rect, rect)) === null || _this__findClosest === void 0 ? void 0 : _this__findClosest.key);
905
+ return (_closestRow_childNodes_ = closestRow === null || closestRow === void 0 ? void 0 : closestRow.childNodes[0]) === null || _closestRow_childNodes_ === void 0 ? void 0 : _closestRow_childNodes_.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() {
@@ -888,21 +941,21 @@ class $5ee605f09afaa4de$export$64943d2e59d72a29 extends $jpY3B$reactstatelyvirtu
888
941
  let parentRowKey = this.collection.getItem(key).parentKey;
889
942
  let layoutInfo = this.getLayoutInfo(parentRowKey);
890
943
  if (layoutInfo) {
891
- var ref;
944
+ var _this_collection_getItem;
892
945
  let pageY = Math.max(0, layoutInfo.rect.y + layoutInfo.rect.height - this.virtualizer.visibleRect.height);
893
946
  // If the node is so large that it spans multiple page heights, return the key of the item immediately above
894
947
  // Otherwise keep going up until we exceed a single page height worth of nodes
895
- let keyAbove = (ref = this.collection.getItem(this.getKeyAbove(key))) === null || ref === void 0 ? void 0 : ref.parentKey;
948
+ let keyAbove = (_this_collection_getItem = this.collection.getItem(this.getKeyAbove(key))) === null || _this_collection_getItem === void 0 ? void 0 : _this_collection_getItem.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 _this_collection_getItem1;
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 = (_this_collection_getItem1 = this.collection.getItem(this.getKeyAbove(childKey))) === null || _this_collection_getItem1 === void 0 ? void 0 : _this_collection_getItem1.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();
@@ -914,21 +967,21 @@ class $5ee605f09afaa4de$export$64943d2e59d72a29 extends $jpY3B$reactstatelyvirtu
914
967
  let parentRowKey = this.collection.getItem(key).parentKey;
915
968
  let layoutInfo = this.getLayoutInfo(parentRowKey);
916
969
  if (layoutInfo) {
917
- var ref;
970
+ var _this_collection_getItem;
918
971
  let pageY = Math.min(this.virtualizer.contentSize.height, layoutInfo.rect.y - layoutInfo.rect.height + this.virtualizer.visibleRect.height);
919
972
  // If the node is so large that it spans multiple page heights, return the key of the item immediately below
920
973
  // Otherwise keep going up until we exceed a single page height worth of nodes
921
- let keyBelow = (ref = this.collection.getItem(this.getKeyBelow(key))) === null || ref === void 0 ? void 0 : ref.parentKey;
974
+ let keyBelow = (_this_collection_getItem = this.collection.getItem(this.getKeyBelow(key))) === null || _this_collection_getItem === void 0 ? void 0 : _this_collection_getItem.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 _this_collection_getItem1;
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 = (_this_collection_getItem1 = this.collection.getItem(this.getKeyBelow(childKey))) === null || _this_collection_getItem1 === void 0 ? void 0 : _this_collection_getItem1.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, ($parcel$interopDefault($jpY3B$swchelperslib_define_propertyjs)))(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
@@ -1007,6 +1058,7 @@ class $8019a3d2c7d098ea$export$8e52095834484b61 extends $5ee605f09afaa4de$export
1007
1058
  if (widths[item[0]][1] > this.minItemSize.width) {
1008
1059
  // subtract the delta from the width, if it's still greater than the min width
1009
1060
  // then we have finished, subtract the delta permanently from that width
1061
+ // eslint-disable-next-line max-depth
1010
1062
  if (widths[item[0]][1] - delta > this.minItemSize.width) {
1011
1063
  widths[item[0]][1] -= delta;
1012
1064
  delta = 0;
@@ -1052,8 +1104,7 @@ class $8019a3d2c7d098ea$export$8e52095834484b61 extends $5ee605f09afaa4de$export
1052
1104
  // if the available width can't hold two items, then every item will get its own row
1053
1105
  // this leads to a faster run through linear partition and more dependable output for small row widths
1054
1106
  if (availableWidth <= this.minItemSize.width * 2 + this.itemPadding * 2) rows = this.collection.size;
1055
- let weightedRatios = ratios.map((ratio)=>ratio < this.threshold ? ratio + 0.5 * (1 / ratio) : ratio
1056
- );
1107
+ let weightedRatios = ratios.map((ratio)=>ratio < this.threshold ? ratio + 0.5 * (1 / ratio) : ratio);
1057
1108
  let partition = $8019a3d2c7d098ea$var$linearPartition(weightedRatios, rows);
1058
1109
  let index = 0;
1059
1110
  for (let row of partition){
@@ -1080,13 +1131,13 @@ class $8019a3d2c7d098ea$export$8e52095834484b61 extends $5ee605f09afaa4de$export
1080
1131
  this._distributeWidths(widths);
1081
1132
  // Create items for this row.
1082
1133
  for(let j2 = index; j2 < index + row.length; j2++){
1083
- let node = this.collection.rows[j2];
1084
- let itemWidth = Math.max(widths[j2 - index][1], this.minItemSize.width);
1085
- let rect = new $jpY3B$reactstatelyvirtualizer.Rect(x, y, itemWidth, itemHeight);
1086
- 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);
1087
1138
  layoutInfo.allowOverflow = true;
1088
- this.layoutInfos.set(node.key, layoutInfo);
1089
- x += itemWidth + this.itemSpacing.width;
1139
+ this.layoutInfos.set(node1.key, layoutInfo);
1140
+ x += itemWidth1 + this.itemSpacing.width;
1090
1141
  }
1091
1142
  y += itemHeight + this.itemSpacing.height;
1092
1143
  index += row.length;
@@ -1100,24 +1151,23 @@ class $8019a3d2c7d098ea$export$8e52095834484b61 extends $5ee605f09afaa4de$export
1100
1151
  loaderY = 0;
1101
1152
  loaderHeight = visibleHeight || 60;
1102
1153
  }
1103
- let rect = new $jpY3B$reactstatelyvirtualizer.Rect(0, loaderY, visibleWidth, loaderHeight);
1104
- let loader = new $jpY3B$reactstatelyvirtualizer.LayoutInfo('loader', 'loader', rect);
1105
- 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);
1106
1157
  y = loader.rect.maxY;
1107
1158
  }
1108
1159
  if (this.collection.size === 0 && !this.isLoading) {
1109
- let rect = new $jpY3B$reactstatelyvirtualizer.Rect(0, 0, visibleWidth, visibleHeight);
1110
- let placeholder = new $jpY3B$reactstatelyvirtualizer.LayoutInfo('placeholder', 'placeholder', rect);
1111
- 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);
1112
1163
  y = placeholder.rect.maxY;
1113
1164
  }
1114
1165
  }
1115
- this.contentSize = new $jpY3B$reactstatelyvirtualizer.Size(visibleWidth, y);
1166
+ this.contentSize = new (0, $jpY3B$reactstatelyvirtualizer.Size)(visibleWidth, y);
1116
1167
  }
1117
- constructor(options = {
1118
- }){
1168
+ constructor(options = {}){
1119
1169
  super(options);
1120
- let cardSize = 'L';
1170
+ let cardSize = "L";
1121
1171
  this.idealRowHeight = options.idealRowHeight || $8019a3d2c7d098ea$var$DEFAULT_OPTIONS[cardSize].idealRowHeight;
1122
1172
  this.itemSpacing = options.itemSpacing || $8019a3d2c7d098ea$var$DEFAULT_OPTIONS[cardSize].itemSpacing;
1123
1173
  this.itemPadding = options.itemPadding != null ? options.itemPadding : $8019a3d2c7d098ea$var$DEFAULT_OPTIONS[cardSize].itemPadding[this.scale];
@@ -1132,15 +1182,12 @@ function $8019a3d2c7d098ea$var$linearPartition(seq, k) {
1132
1182
  if (k <= 0) return [];
1133
1183
  if (k >= n) return seq.map((x)=>[
1134
1184
  x
1135
- ]
1136
- );
1185
+ ]);
1137
1186
  if (n === 1) return [
1138
1187
  seq
1139
1188
  ];
1140
- let table = Array(n).fill(0).map(()=>Array(k).fill(0)
1141
- );
1142
- let solution = Array(n - 1).fill(0).map(()=>Array(k - 1).fill(0)
1143
- );
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));
1144
1191
  for(let i = 0; i < n; i++)table[i][0] = seq[i] + (i > 0 ? table[i - 1][0] : 0);
1145
1192
  for(let i1 = 0; i1 < k; i1++)table[0][i1] = seq[0];
1146
1193
  for(let i2 = 1; i2 < n; i2++)for(let j = 1; j < k; j++){
@@ -1164,58 +1211,68 @@ function $8019a3d2c7d098ea$var$linearPartition(seq, k) {
1164
1211
  while(k >= 0){
1165
1212
  if (n >= 1) {
1166
1213
  let row = [];
1167
- 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]);
1168
1215
  result.unshift(row);
1169
1216
  n = solution[n - 1][k];
1170
1217
  }
1171
1218
  k--;
1172
1219
  }
1173
- let row = [];
1174
- for(let i3 = 0; i3 < n + 1; i3++)row.push(seq[i3]);
1175
- result.unshift(row);
1220
+ let row1 = [];
1221
+ for(let i4 = 0; i4 < n + 1; i4++)row1.push(seq[i4]);
1222
+ result.unshift(row1);
1176
1223
  return result;
1177
1224
  }
1178
1225
 
1179
1226
 
1180
-
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
+ */
1181
1238
 
1182
1239
  const $71b727f94b595b1a$var$DEFAULT_OPTIONS = {
1183
1240
  S: {
1184
1241
  itemPadding: 20,
1185
1242
  minItemSize: {
1186
- 'vertical': new $jpY3B$reactstatelyvirtualizer.Size(96, 96)
1243
+ "vertical": new (0, $jpY3B$reactstatelyvirtualizer.Size)(96, 96)
1187
1244
  },
1188
- maxItemSize: new $jpY3B$reactstatelyvirtualizer.Size(Infinity, Infinity),
1245
+ maxItemSize: new (0, $jpY3B$reactstatelyvirtualizer.Size)(Infinity, Infinity),
1189
1246
  margin: 8,
1190
- minSpace: new $jpY3B$reactstatelyvirtualizer.Size(6, 6),
1247
+ minSpace: new (0, $jpY3B$reactstatelyvirtualizer.Size)(6, 6),
1191
1248
  maxColumns: Infinity,
1192
1249
  dropSpacing: 50
1193
1250
  },
1194
1251
  L: {
1195
1252
  itemPadding: {
1196
- 'vertical': {
1197
- 'medium': 78,
1198
- 'large': 98
1253
+ "vertical": {
1254
+ "medium": 78,
1255
+ "large": 98
1199
1256
  },
1200
- 'horizontal': {
1201
- 'medium': 150,
1202
- 'large': 170
1257
+ "horizontal": {
1258
+ "medium": 150,
1259
+ "large": 170
1203
1260
  }
1204
1261
  },
1205
1262
  minItemSize: {
1206
- 'vertical': new $jpY3B$reactstatelyvirtualizer.Size(208, 208),
1207
- '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)
1208
1265
  },
1209
- maxItemSize: new $jpY3B$reactstatelyvirtualizer.Size(Infinity, Infinity),
1266
+ maxItemSize: new (0, $jpY3B$reactstatelyvirtualizer.Size)(Infinity, Infinity),
1210
1267
  margin: 24,
1211
- minSpace: new $jpY3B$reactstatelyvirtualizer.Size(18, 18),
1268
+ minSpace: new (0, $jpY3B$reactstatelyvirtualizer.Size)(18, 18),
1212
1269
  maxColumns: Infinity,
1213
1270
  dropSpacing: 100
1214
1271
  }
1215
1272
  };
1216
- class $71b727f94b595b1a$export$7d2b12578154a735 extends $5ee605f09afaa4de$export$64943d2e59d72a29 {
1273
+ class $71b727f94b595b1a$export$7d2b12578154a735 extends (0, $5ee605f09afaa4de$export$64943d2e59d72a29) {
1217
1274
  get layoutType() {
1218
- return 'grid';
1275
+ return "grid";
1219
1276
  }
1220
1277
  getIndexAtPoint(x, y, allowInsertingAtEnd = false) {
1221
1278
  let itemHeight = this.itemSize.height + this.minSpace.height;
@@ -1237,11 +1294,11 @@ class $71b727f94b595b1a$export$7d2b12578154a735 extends $5ee605f09afaa4de$export
1237
1294
  let lastVisibleItem = this.getIndexAtPoint(rect.maxX, rect.maxY);
1238
1295
  for(let index = firstVisibleItem; index <= lastVisibleItem; index++){
1239
1296
  let keyFromIndex = this.collection.rows[index].key;
1240
- let layoutInfo = this.layoutInfos.get(keyFromIndex);
1241
- 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);
1242
1299
  }
1243
1300
  // Check if loader is in view and add to res if so
1244
- let loader = this.layoutInfos.get('loader');
1301
+ let loader = this.layoutInfos.get("loader");
1245
1302
  if (loader && this.isVisible(loader, rect)) res.push(loader);
1246
1303
  }
1247
1304
  return res;
@@ -1249,8 +1306,8 @@ class $71b727f94b595b1a$export$7d2b12578154a735 extends $5ee605f09afaa4de$export
1249
1306
  buildCollection() {
1250
1307
  let visibleWidth = this.virtualizer.visibleRect.width;
1251
1308
  let visibleHeight = this.virtualizer.visibleRect.height;
1252
- let horizontalItemPadding = this.cardOrientation === 'horizontal' ? this.itemPadding : 0;
1253
- 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;
1254
1311
  let minCardWidth = this.minItemSize.width + horizontalItemPadding;
1255
1312
  // Compute the number of rows and columns needed to display the content
1256
1313
  let availableWidth = visibleWidth - this.margin * 2;
@@ -1266,7 +1323,7 @@ class $71b727f94b595b1a$export$7d2b12578154a735 extends $5ee605f09afaa4de$export
1266
1323
  let t = (itemWidth - minCardWidth) / minCardWidth;
1267
1324
  let itemHeight = Math.floor(this.minItemSize.height + this.minItemSize.height * t);
1268
1325
  itemHeight = Math.max(this.minItemSize.height, Math.min(this.maxItemSize.height, itemHeight)) + verticalItemPadding;
1269
- this.itemSize = new $jpY3B$reactstatelyvirtualizer.Size(itemWidth, itemHeight);
1326
+ this.itemSize = new (0, $jpY3B$reactstatelyvirtualizer.Size)(itemWidth, itemHeight);
1270
1327
  // Compute the horizontal spacing and content height
1271
1328
  this.horizontalSpacing = this.numColumns < 2 ? 0 : Math.floor((availableWidth - this.numColumns * this.itemSize.width) / (this.numColumns - 1));
1272
1329
  let y = this.margin;
@@ -1285,27 +1342,27 @@ class $71b727f94b595b1a$export$7d2b12578154a735 extends $5ee605f09afaa4de$export
1285
1342
  loaderY = 0;
1286
1343
  loaderHeight = visibleHeight || 60;
1287
1344
  }
1288
- let rect = new $jpY3B$reactstatelyvirtualizer.Rect(0, loaderY, visibleWidth, loaderHeight);
1289
- let loader = new $jpY3B$reactstatelyvirtualizer.LayoutInfo('loader', 'loader', rect);
1290
- 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);
1291
1348
  y = loader.rect.maxY;
1292
1349
  }
1293
1350
  if (this.collection.size === 0 && !this.isLoading) {
1294
- let rect = new $jpY3B$reactstatelyvirtualizer.Rect(0, 0, visibleWidth, visibleHeight);
1295
- let placeholder = new $jpY3B$reactstatelyvirtualizer.LayoutInfo('placeholder', 'placeholder', rect);
1296
- 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);
1297
1354
  y = placeholder.rect.maxY;
1298
1355
  }
1299
- this.contentSize = new $jpY3B$reactstatelyvirtualizer.Size(visibleWidth, y);
1356
+ this.contentSize = new (0, $jpY3B$reactstatelyvirtualizer.Size)(visibleWidth, y);
1300
1357
  }
1301
1358
  buildChild(node, y, index) {
1302
1359
  let row = Math.floor(index / this.numColumns);
1303
1360
  let column = index % this.numColumns;
1304
1361
  let x = this.margin + column * (this.itemSize.width + this.horizontalSpacing);
1305
1362
  y = this.margin + row * (this.itemSize.height + this.minSpace.height);
1306
- 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);
1307
1364
  // TODO: Perhaps have it so that the child key for each row is stored with the layoutInfo?
1308
- let layoutInfo = new $jpY3B$reactstatelyvirtualizer.LayoutInfo(node.type, node.key, rect);
1365
+ let layoutInfo = new (0, $jpY3B$reactstatelyvirtualizer.LayoutInfo)(node.type, node.key, rect);
1309
1366
  layoutInfo.allowOverflow = true;
1310
1367
  this.layoutInfos.set(node.key, layoutInfo);
1311
1368
  return layoutInfo;
@@ -1314,32 +1371,29 @@ class $71b727f94b595b1a$export$7d2b12578154a735 extends $5ee605f09afaa4de$export
1314
1371
  // 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
1315
1372
  // collection contents by that number (which will give us the row distribution)
1316
1373
  getKeyBelow(key) {
1317
- var ref;
1374
+ var _this_collection_rows_indexRowBelow;
1318
1375
  // Expected key is the currently focused cell so we need the parent row key
1319
1376
  let parentRowKey = this.collection.getItem(key).parentKey;
1320
1377
  let indexRowBelow;
1321
- let index = this.collection.rows.findIndex((card)=>card.key === parentRowKey
1322
- );
1378
+ let index = this.collection.rows.findIndex((card)=>card.key === parentRowKey);
1323
1379
  if (index !== -1) indexRowBelow = index + this.numColumns;
1324
1380
  else return null;
1325
- return ((ref = this.collection.rows[indexRowBelow]) === null || ref === void 0 ? void 0 : ref.childNodes[0].key) || null;
1381
+ return ((_this_collection_rows_indexRowBelow = this.collection.rows[indexRowBelow]) === null || _this_collection_rows_indexRowBelow === void 0 ? void 0 : _this_collection_rows_indexRowBelow.childNodes[0].key) || null;
1326
1382
  }
1327
1383
  getKeyAbove(key) {
1328
- var ref;
1384
+ var _this_collection_rows_indexRowAbove;
1329
1385
  // Expected key is the currently focused cell so we need the parent row key
1330
1386
  let parentRowKey = this.collection.getItem(key).parentKey;
1331
1387
  let indexRowAbove;
1332
- let index = this.collection.rows.findIndex((card)=>card.key === parentRowKey
1333
- );
1388
+ let index = this.collection.rows.findIndex((card)=>card.key === parentRowKey);
1334
1389
  if (index !== -1) indexRowAbove = index - this.numColumns;
1335
1390
  else return null;
1336
- return ((ref = this.collection.rows[indexRowAbove]) === null || ref === void 0 ? void 0 : ref.childNodes[0].key) || null;
1391
+ return ((_this_collection_rows_indexRowAbove = this.collection.rows[indexRowAbove]) === null || _this_collection_rows_indexRowAbove === void 0 ? void 0 : _this_collection_rows_indexRowAbove.childNodes[0].key) || null;
1337
1392
  }
1338
- constructor(options = {
1339
- }){
1393
+ constructor(options = {}){
1340
1394
  super(options);
1341
- let cardSize = 'L';
1342
- this.cardOrientation = options.cardOrientation || 'vertical';
1395
+ let cardSize = "L";
1396
+ this.cardOrientation = options.cardOrientation || "vertical";
1343
1397
  this.minItemSize = options.minItemSize || $71b727f94b595b1a$var$DEFAULT_OPTIONS[cardSize].minItemSize[this.cardOrientation];
1344
1398
  this.maxItemSize = options.maxItemSize || $71b727f94b595b1a$var$DEFAULT_OPTIONS[cardSize].maxItemSize;
1345
1399
  this.margin = options.margin != null ? options.margin : $71b727f94b595b1a$var$DEFAULT_OPTIONS[cardSize].margin;
@@ -1354,11 +1408,21 @@ class $71b727f94b595b1a$export$7d2b12578154a735 extends $5ee605f09afaa4de$export
1354
1408
  }
1355
1409
 
1356
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
+ */
1357
1422
 
1358
-
1359
- class $632abf8fbf0ad57b$export$e9f7cda058ba8df8 extends $5ee605f09afaa4de$export$64943d2e59d72a29 {
1423
+ class $632abf8fbf0ad57b$export$e9f7cda058ba8df8 extends (0, $5ee605f09afaa4de$export$64943d2e59d72a29) {
1360
1424
  get layoutType() {
1361
- return 'waterfall';
1425
+ return "waterfall";
1362
1426
  }
1363
1427
  buildCollection(invalidationContext) {
1364
1428
  // Compute the number of columns needed to display the content
@@ -1398,8 +1462,8 @@ class $632abf8fbf0ad57b$export$e9f7cda058ba8df8 extends $5ee605f09afaa4de$export
1398
1462
  let column = this.getNextColumnIndex(columnHeights);
1399
1463
  let x = this.margin + column * (itemWidth + horizontalSpacing);
1400
1464
  let y = columnHeights[column];
1401
- let rect = new $jpY3B$reactstatelyvirtualizer.Rect(x, y, itemWidth, height);
1402
- 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);
1403
1467
  layoutInfo.estimatedSize = estimatedSize;
1404
1468
  layoutInfo.allowOverflow = true;
1405
1469
  this.layoutInfos.set(key, layoutInfo);
@@ -1413,9 +1477,9 @@ class $632abf8fbf0ad57b$export$e9f7cda058ba8df8 extends $5ee605f09afaa4de$export
1413
1477
  // Reset all columns to the maximum for the next section
1414
1478
  let maxHeight = Math.max.apply(Math, columnHeights) - this.minSpace.height + this.margin;
1415
1479
  columnHeights.fill(maxHeight);
1416
- let y = columnHeights[0];
1480
+ let y1 = columnHeights[0];
1417
1481
  if (this.isLoading) {
1418
- let loaderY = y;
1482
+ let loaderY = y1;
1419
1483
  let loaderHeight = 60;
1420
1484
  // If there aren't any items, make loader take all avaliable room and remove margin from y calculation
1421
1485
  // so it doesn't scroll
@@ -1423,18 +1487,18 @@ class $632abf8fbf0ad57b$export$e9f7cda058ba8df8 extends $5ee605f09afaa4de$export
1423
1487
  loaderY = 0;
1424
1488
  loaderHeight = this.virtualizer.visibleRect.height || 60;
1425
1489
  }
1426
- let rect = new $jpY3B$reactstatelyvirtualizer.Rect(0, loaderY, this.virtualizer.visibleRect.width, loaderHeight);
1427
- let loader = new $jpY3B$reactstatelyvirtualizer.LayoutInfo('loader', 'loader', rect);
1428
- this.layoutInfos.set('loader', loader);
1429
- 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;
1430
1494
  }
1431
1495
  if (this.collection.size === 0 && !this.isLoading) {
1432
- let rect = new $jpY3B$reactstatelyvirtualizer.Rect(0, 0, this.virtualizer.visibleRect.width, this.virtualizer.visibleRect.height);
1433
- let placeholder = new $jpY3B$reactstatelyvirtualizer.LayoutInfo('placeholder', 'placeholder', rect);
1434
- this.layoutInfos.set('placeholder', placeholder);
1435
- 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;
1436
1500
  }
1437
- this.contentSize = new $jpY3B$reactstatelyvirtualizer.Size(this.virtualizer.visibleRect.width, y);
1501
+ this.contentSize = new (0, $jpY3B$reactstatelyvirtualizer.Size)(this.virtualizer.visibleRect.width, y1);
1438
1502
  }
1439
1503
  updateItemSize(key, size) {
1440
1504
  let layoutInfo = this.layoutInfos.get(key);
@@ -1456,53 +1520,52 @@ class $632abf8fbf0ad57b$export$e9f7cda058ba8df8 extends $5ee605f09afaa4de$export
1456
1520
  return minIndex;
1457
1521
  }
1458
1522
  getClosestRight(key) {
1459
- var ref, ref1, ref2;
1523
+ var _this__findClosest, _this_collection_getItem_childNodes_, _this_collection_getItem;
1460
1524
  let layoutInfo = this.getLayoutInfo(key);
1461
1525
  // Refactored from v2. Current strategy is to find the closest card in the adjacent column.
1462
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
1463
1527
  // and thus the top corner to top corner distance was massive.
1464
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
1465
- let rect = new $jpY3B$reactstatelyvirtualizer.Rect(layoutInfo.rect.maxX + 1, layoutInfo.rect.y, layoutInfo.rect.width + this.horizontalSpacing, layoutInfo.rect.height);
1466
- key = (ref = this._findClosest(layoutInfo.rect, rect)) === null || ref === void 0 ? void 0 : ref.key;
1529
+ let rect = new (0, $jpY3B$reactstatelyvirtualizer.Rect)(layoutInfo.rect.maxX + 1, layoutInfo.rect.y, layoutInfo.rect.width + this.horizontalSpacing, layoutInfo.rect.height);
1530
+ key = (_this__findClosest = this._findClosest(layoutInfo.rect, rect)) === null || _this__findClosest === void 0 ? void 0 : _this__findClosest.key;
1467
1531
  if (!key) {
1468
- var ref3;
1469
- rect = new $jpY3B$reactstatelyvirtualizer.Rect(layoutInfo.rect.maxX + 1, 0, layoutInfo.rect.width + this.horizontalSpacing, this.virtualizer.contentSize.height);
1470
- key = (ref3 = this._findClosest(layoutInfo.rect, rect)) === null || ref3 === void 0 ? void 0 : ref3.key;
1532
+ var _this__findClosest1;
1533
+ rect = new (0, $jpY3B$reactstatelyvirtualizer.Rect)(layoutInfo.rect.maxX + 1, 0, layoutInfo.rect.width + this.horizontalSpacing, this.virtualizer.contentSize.height);
1534
+ key = (_this__findClosest1 = this._findClosest(layoutInfo.rect, rect)) === null || _this__findClosest1 === void 0 ? void 0 : _this__findClosest1.key;
1471
1535
  }
1472
- return (ref2 = (ref1 = this.collection.getItem(key)) === null || ref1 === void 0 ? void 0 : ref1.childNodes[0]) === null || ref2 === void 0 ? void 0 : ref2.key;
1536
+ return (_this_collection_getItem_childNodes_ = (_this_collection_getItem = this.collection.getItem(key)) === null || _this_collection_getItem === void 0 ? void 0 : _this_collection_getItem.childNodes[0]) === null || _this_collection_getItem_childNodes_ === void 0 ? void 0 : _this_collection_getItem_childNodes_.key;
1473
1537
  }
1474
1538
  getClosestLeft(key) {
1475
- var ref, ref4, ref5;
1539
+ var _this__findClosest, _this_collection_getItem_childNodes_, _this_collection_getItem;
1476
1540
  let layoutInfo = this.getLayoutInfo(key);
1477
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
1478
- 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);
1479
- key = (ref = this._findClosest(layoutInfo.rect, rect)) === null || ref === void 0 ? void 0 : ref.key;
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);
1543
+ key = (_this__findClosest = this._findClosest(layoutInfo.rect, rect)) === null || _this__findClosest === void 0 ? void 0 : _this__findClosest.key;
1480
1544
  if (!key) {
1481
- var ref6;
1482
- rect = new $jpY3B$reactstatelyvirtualizer.Rect(layoutInfo.rect.x - layoutInfo.rect.width - this.horizontalSpacing - 1, 0, layoutInfo.rect.width + this.horizontalSpacing, this.virtualizer.contentSize.height);
1483
- key = (ref6 = this._findClosest(layoutInfo.rect, rect)) === null || ref6 === void 0 ? void 0 : ref6.key;
1545
+ var _this__findClosest1;
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 = (_this__findClosest1 = this._findClosest(layoutInfo.rect, rect)) === null || _this__findClosest1 === void 0 ? void 0 : _this__findClosest1.key;
1484
1548
  }
1485
- 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 (_this_collection_getItem_childNodes_ = (_this_collection_getItem = this.collection.getItem(key)) === null || _this_collection_getItem === void 0 ? void 0 : _this_collection_getItem.childNodes[0]) === null || _this_collection_getItem_childNodes_ === void 0 ? void 0 : _this_collection_getItem_childNodes_.key;
1486
1550
  }
1487
1551
  getKeyRightOf(key) {
1488
1552
  // Expected key is the currently focused cell so we need the parent row key
1489
1553
  let parentRowKey = this.collection.getItem(key).parentKey;
1490
- return this.direction === 'rtl' ? this.getClosestLeft(parentRowKey) : this.getClosestRight(parentRowKey);
1554
+ return this.direction === "rtl" ? this.getClosestLeft(parentRowKey) : this.getClosestRight(parentRowKey);
1491
1555
  }
1492
1556
  getKeyLeftOf(key) {
1493
1557
  // Expected key is the currently focused cell so we need the parent row key
1494
1558
  let parentRowKey = this.collection.getItem(key).parentKey;
1495
- return this.direction === 'rtl' ? this.getClosestRight(parentRowKey) : this.getClosestLeft(parentRowKey);
1559
+ return this.direction === "rtl" ? this.getClosestRight(parentRowKey) : this.getClosestLeft(parentRowKey);
1496
1560
  }
1497
- constructor(options = {
1498
- }){
1561
+ constructor(options = {}){
1499
1562
  // TODO: WaterfallLayout doesn't use card size in v2, but perhaps it should support it? Perhaps it would modify
1500
1563
  // minItemSize defaults or other things
1501
1564
  super(options);
1502
- this.minItemSize = options.minItemSize || new $jpY3B$reactstatelyvirtualizer.Size(240, 136);
1503
- 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);
1504
1567
  this.margin = options.margin != null ? options.margin : 24;
1505
- this.minSpace = options.minSpace || new $jpY3B$reactstatelyvirtualizer.Size(18, 18);
1568
+ this.minSpace = options.minSpace || new (0, $jpY3B$reactstatelyvirtualizer.Size)(18, 18);
1506
1569
  this.maxColumns = options.maxColumns || Infinity;
1507
1570
  this.itemWidth = 0;
1508
1571
  this.numColumns = 0;
@@ -1512,25 +1575,35 @@ class $632abf8fbf0ad57b$export$e9f7cda058ba8df8 extends $5ee605f09afaa4de$export
1512
1575
  }
1513
1576
 
1514
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
+ */
1515
1589
 
1516
1590
 
1517
-
1518
- let $6b630ac4b78ba7f3$var$Card = /*#__PURE__*/ $jpY3B$react.forwardRef((props, ref)=>{
1519
- let context = $e57ab98cef2f01a5$export$fea0b38586ec8f13();
1591
+ let $6b630ac4b78ba7f3$var$Card = /*#__PURE__*/ (0, $jpY3B$react.forwardRef)((props, ref)=>{
1592
+ let context = (0, $e57ab98cef2f01a5$export$fea0b38586ec8f13)();
1520
1593
  if (context !== null) return null;
1521
- 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), {
1522
1595
  ...props,
1523
1596
  ref: ref
1524
- }));
1597
+ });
1525
1598
  });
1526
1599
  // @ts-ignore
1527
1600
  $6b630ac4b78ba7f3$var$Card.getCollectionNode = function* getCollectionNode(props) {
1528
1601
  let { children: children , textValue: textValue } = props;
1529
1602
  yield {
1530
- type: 'item',
1603
+ type: "item",
1531
1604
  props: props,
1532
1605
  rendered: children,
1533
- 'aria-label': props['aria-label'],
1606
+ "aria-label": props["aria-label"],
1534
1607
  hasChildNodes: false,
1535
1608
  textValue: textValue
1536
1609
  };