@react-spectrum/utils 3.8.0 → 3.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/module.js CHANGED
@@ -4,7 +4,29 @@ import $5lsDl$react, {useState as $5lsDl$useState, useEffect as $5lsDl$useEffect
4
4
  import {useIsSSR as $5lsDl$useIsSSR} from "@react-aria/ssr";
5
5
  import {useLocale as $5lsDl$useLocale} from "@react-aria/i18n";
6
6
 
7
-
7
+ /*
8
+ * Copyright 2020 Adobe. All rights reserved.
9
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
10
+ * you may not use this file except in compliance with the License. You may obtain a copy
11
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software distributed under
14
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
15
+ * OF ANY KIND, either express or implied. See the License for the specific language
16
+ * governing permissions and limitations under the License.
17
+ */ /// <reference types="css-module-types" />
18
+ /// <reference path="./ResizeObserver.d.ts" />
19
+ /*
20
+ * Copyright 2020 Adobe. All rights reserved.
21
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
22
+ * you may not use this file except in compliance with the License. You may obtain a copy
23
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
24
+ *
25
+ * Unless required by applicable law or agreed to in writing, software distributed under
26
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
27
+ * OF ANY KIND, either express or implied. See the License for the specific language
28
+ * governing permissions and limitations under the License.
29
+ */
8
30
  let $fd933927dbac1f15$export$46d604dce8bf8724 = false;
9
31
  function $fd933927dbac1f15$export$f9d3bfd10703eb31() {
10
32
  $fd933927dbac1f15$export$46d604dce8bf8724 = true;
@@ -13,39 +35,57 @@ function $fd933927dbac1f15$export$f9d3bfd10703eb31() {
13
35
  function $fd933927dbac1f15$export$ce4ab0c55987d1ff(cssModule, ...values) {
14
36
  let classes = [];
15
37
  for (let value of values){
16
- if (typeof value === 'object' && value) {
17
- let mapped = {
18
- };
38
+ if (typeof value === "object" && value) {
39
+ let mapped = {};
19
40
  for(let key in value){
20
41
  if (cssModule[key]) mapped[cssModule[key]] = value[key];
21
42
  if ($fd933927dbac1f15$export$46d604dce8bf8724 || !cssModule[key]) mapped[key] = value[key];
22
43
  }
23
44
  classes.push(mapped);
24
- } else if (typeof value === 'string') {
45
+ } else if (typeof value === "string") {
25
46
  if (cssModule[value]) classes.push(cssModule[value]);
26
47
  if ($fd933927dbac1f15$export$46d604dce8bf8724 || !cssModule[value]) classes.push(value);
27
48
  } else classes.push(value);
28
49
  }
29
- return $5lsDl$clsx(...classes);
50
+ return (0, $5lsDl$clsx)(...classes);
30
51
  }
31
52
 
32
53
 
33
-
54
+ /*
55
+ * Copyright 2020 Adobe. All rights reserved.
56
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
57
+ * you may not use this file except in compliance with the License. You may obtain a copy
58
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
59
+ *
60
+ * Unless required by applicable law or agreed to in writing, software distributed under
61
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
62
+ * OF ANY KIND, either express or implied. See the License for the specific language
63
+ * governing permissions and limitations under the License.
64
+ */
34
65
  function $bde65b0159e7c06e$export$a5f5a6912b18861c(children) {
35
66
  let element;
36
- if (typeof children === 'string') element = /*#__PURE__*/ $5lsDl$react.createElement("span", null, children);
37
- else element = $5lsDl$react.Children.only(children);
67
+ if (typeof children === "string") element = /*#__PURE__*/ (0, $5lsDl$react).createElement("span", null, children);
68
+ else element = (0, $5lsDl$react).Children.only(children);
38
69
  return element;
39
70
  }
40
71
 
41
72
 
42
-
73
+ /*
74
+ * Copyright 2020 Adobe. All rights reserved.
75
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
76
+ * you may not use this file except in compliance with the License. You may obtain a copy
77
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
78
+ *
79
+ * Unless required by applicable law or agreed to in writing, software distributed under
80
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
81
+ * OF ANY KIND, either express or implied. See the License for the specific language
82
+ * governing permissions and limitations under the License.
83
+ */
43
84
 
44
85
  function $3df547e395c4522f$export$32d5543ab307c01(query) {
45
- let supportsMatchMedia = typeof window !== 'undefined' && typeof window.matchMedia === 'function';
46
- let [matches, setMatches] = $5lsDl$useState(()=>supportsMatchMedia ? window.matchMedia(query).matches : false
47
- );
48
- $5lsDl$useEffect(()=>{
86
+ let supportsMatchMedia = typeof window !== "undefined" && typeof window.matchMedia === "function";
87
+ let [matches, setMatches] = (0, $5lsDl$useState)(()=>supportsMatchMedia ? window.matchMedia(query).matches : false);
88
+ (0, $5lsDl$useEffect)(()=>{
49
89
  if (!supportsMatchMedia) return;
50
90
  let mq = window.matchMedia(query);
51
91
  let onChange = (evt)=>{
@@ -61,12 +101,22 @@ function $3df547e395c4522f$export$32d5543ab307c01(query) {
61
101
  ]);
62
102
  // If in SSR, the media query should never match. Once the page hydrates,
63
103
  // this will update and the real value will be returned.
64
- let isSSR = $5lsDl$useIsSSR();
104
+ let isSSR = (0, $5lsDl$useIsSSR)();
65
105
  return isSSR ? false : matches;
66
106
  }
67
107
 
68
108
 
69
-
109
+ /*
110
+ * Copyright 2020 Adobe. All rights reserved.
111
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
112
+ * you may not use this file except in compliance with the License. You may obtain a copy
113
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
114
+ *
115
+ * Unless required by applicable law or agreed to in writing, software distributed under
116
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
117
+ * OF ANY KIND, either express or implied. See the License for the specific language
118
+ * governing permissions and limitations under the License.
119
+ */
70
120
  function $98e5a8ae0e6415af$export$a5795cc979dfae80(ref) {
71
121
  return {
72
122
  UNSAFE_getDOMNode () {
@@ -83,15 +133,13 @@ function $98e5a8ae0e6415af$export$79d69eee6ae4b329(domRef, focusableRef = domRef
83
133
  };
84
134
  }
85
135
  function $98e5a8ae0e6415af$export$c2c55ef9111cafd8(ref) {
86
- let domRef = $5lsDl$useRef(null);
87
- $5lsDl$useImperativeHandle(ref, ()=>$98e5a8ae0e6415af$export$a5795cc979dfae80(domRef)
88
- );
136
+ let domRef = (0, $5lsDl$useRef)(null);
137
+ (0, $5lsDl$useImperativeHandle)(ref, ()=>$98e5a8ae0e6415af$export$a5795cc979dfae80(domRef));
89
138
  return domRef;
90
139
  }
91
140
  function $98e5a8ae0e6415af$export$96a734597687c040(ref, focusableRef) {
92
- let domRef = $5lsDl$useRef(null);
93
- $5lsDl$useImperativeHandle(ref, ()=>$98e5a8ae0e6415af$export$79d69eee6ae4b329(domRef, focusableRef)
94
- );
141
+ let domRef = (0, $5lsDl$useRef)(null);
142
+ (0, $5lsDl$useImperativeHandle)(ref, ()=>$98e5a8ae0e6415af$export$79d69eee6ae4b329(domRef, focusableRef));
95
143
  return domRef;
96
144
  }
97
145
  function $98e5a8ae0e6415af$export$c7e28c72a4823176(ref) {
@@ -102,59 +150,64 @@ function $98e5a8ae0e6415af$export$c7e28c72a4823176(ref) {
102
150
  };
103
151
  }
104
152
  function $98e5a8ae0e6415af$export$1d5cc31d9d8df817(ref) {
105
- return $5lsDl$useMemo(()=>$98e5a8ae0e6415af$export$c7e28c72a4823176(ref)
106
- , [
153
+ return (0, $5lsDl$useMemo)(()=>$98e5a8ae0e6415af$export$c7e28c72a4823176(ref), [
107
154
  ref
108
155
  ]);
109
156
  }
110
157
 
111
158
 
159
+ /*
160
+ * Copyright 2020 Adobe. All rights reserved.
161
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
162
+ * you may not use this file except in compliance with the License. You may obtain a copy
163
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
164
+ *
165
+ * Unless required by applicable law or agreed to in writing, software distributed under
166
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
167
+ * OF ANY KIND, either express or implied. See the License for the specific language
168
+ * governing permissions and limitations under the License.
169
+ */
112
170
 
113
-
114
- const $1051245f87c5981d$var$Context = /*#__PURE__*/ $5lsDl$react.createContext(null);
115
- $1051245f87c5981d$var$Context.displayName = 'BreakpointContext';
171
+ const $1051245f87c5981d$var$Context = /*#__PURE__*/ (0, $5lsDl$react).createContext(null);
172
+ $1051245f87c5981d$var$Context.displayName = "BreakpointContext";
116
173
  function $1051245f87c5981d$export$8214320346cf5104(props) {
117
174
  let { children: children , matchedBreakpoints: matchedBreakpoints } = props;
118
- return(/*#__PURE__*/ $5lsDl$react.createElement($1051245f87c5981d$var$Context.Provider, {
175
+ return /*#__PURE__*/ (0, $5lsDl$react).createElement($1051245f87c5981d$var$Context.Provider, {
119
176
  value: {
120
177
  matchedBreakpoints: matchedBreakpoints
121
178
  }
122
- }, children));
179
+ }, children);
123
180
  }
124
181
  function $1051245f87c5981d$export$140ae7baa51cca23(breakpoints) {
125
- let entries = Object.entries(breakpoints).sort(([, valueA], [, valueB])=>valueB - valueA
126
- );
127
- let breakpointQueries = entries.map(([, value])=>`(min-width: ${value}px)`
128
- );
129
- let supportsMatchMedia = typeof window !== 'undefined' && typeof window.matchMedia === 'function';
182
+ let entries = Object.entries(breakpoints).sort(([, valueA], [, valueB])=>valueB - valueA);
183
+ let breakpointQueries = entries.map(([, value])=>`(min-width: ${value}px)`);
184
+ let supportsMatchMedia = typeof window !== "undefined" && typeof window.matchMedia === "function";
130
185
  let getBreakpointHandler = ()=>{
131
186
  let matched = [];
132
187
  for(let i in breakpointQueries){
133
188
  let query = breakpointQueries[i];
134
189
  if (window.matchMedia(query).matches) matched.push(entries[i][0]);
135
190
  }
136
- matched.push('base');
191
+ matched.push("base");
137
192
  return matched;
138
193
  };
139
- let [breakpoint1, setBreakpoint] = $5lsDl$useState(()=>supportsMatchMedia ? getBreakpointHandler() : [
140
- 'base'
141
- ]
142
- );
143
- $5lsDl$useEffect(()=>{
194
+ let [breakpoint, setBreakpoint] = (0, $5lsDl$useState)(()=>supportsMatchMedia ? getBreakpointHandler() : [
195
+ "base"
196
+ ]);
197
+ (0, $5lsDl$useEffect)(()=>{
144
198
  if (!supportsMatchMedia) return;
145
199
  let onResize = ()=>{
146
200
  const breakpointHandler = getBreakpointHandler();
147
201
  setBreakpoint((previousBreakpointHandler)=>{
148
- if (previousBreakpointHandler.length !== breakpointHandler.length || previousBreakpointHandler.some((breakpoint, idx)=>breakpoint !== breakpointHandler[idx]
149
- )) return [
202
+ if (previousBreakpointHandler.length !== breakpointHandler.length || previousBreakpointHandler.some((breakpoint, idx)=>breakpoint !== breakpointHandler[idx])) return [
150
203
  ...breakpointHandler
151
204
  ]; // Return a new array to force state change
152
205
  return previousBreakpointHandler;
153
206
  });
154
207
  };
155
- window.addEventListener('resize', onResize);
208
+ window.addEventListener("resize", onResize);
156
209
  return ()=>{
157
- window.removeEventListener('resize', onResize);
210
+ window.removeEventListener("resize", onResize);
158
211
  };
159
212
  // eslint-disable-next-line react-hooks/exhaustive-deps
160
213
  }, [
@@ -162,378 +215,377 @@ function $1051245f87c5981d$export$140ae7baa51cca23(breakpoints) {
162
215
  ]);
163
216
  // If in SSR, the media query should never match. Once the page hydrates,
164
217
  // this will update and the real value will be returned.
165
- let isSSR = $5lsDl$useIsSSR();
218
+ let isSSR = (0, $5lsDl$useIsSSR)();
166
219
  return isSSR ? [
167
- 'base'
168
- ] : breakpoint1;
220
+ "base"
221
+ ] : breakpoint;
169
222
  }
170
223
  function $1051245f87c5981d$export$199d6754bdf4e1e3() {
171
- return $5lsDl$useContext($1051245f87c5981d$var$Context);
224
+ return (0, $5lsDl$useContext)($1051245f87c5981d$var$Context);
172
225
  }
173
226
 
174
227
 
175
228
 
176
229
  const $380ed8f3903c3931$export$fe9c6e915565b4e8 = {
177
230
  margin: [
178
- 'margin',
231
+ "margin",
179
232
  $380ed8f3903c3931$export$abc24f5b99744ea6
180
233
  ],
181
234
  marginStart: [
182
- $380ed8f3903c3931$var$rtl('marginLeft', 'marginRight'),
235
+ $380ed8f3903c3931$var$rtl("marginLeft", "marginRight"),
183
236
  $380ed8f3903c3931$export$abc24f5b99744ea6
184
237
  ],
185
238
  marginEnd: [
186
- $380ed8f3903c3931$var$rtl('marginRight', 'marginLeft'),
239
+ $380ed8f3903c3931$var$rtl("marginRight", "marginLeft"),
187
240
  $380ed8f3903c3931$export$abc24f5b99744ea6
188
241
  ],
189
242
  // marginLeft: ['marginLeft', dimensionValue],
190
243
  // marginRight: ['marginRight', dimensionValue],
191
244
  marginTop: [
192
- 'marginTop',
245
+ "marginTop",
193
246
  $380ed8f3903c3931$export$abc24f5b99744ea6
194
247
  ],
195
248
  marginBottom: [
196
- 'marginBottom',
249
+ "marginBottom",
197
250
  $380ed8f3903c3931$export$abc24f5b99744ea6
198
251
  ],
199
252
  marginX: [
200
253
  [
201
- 'marginLeft',
202
- 'marginRight'
254
+ "marginLeft",
255
+ "marginRight"
203
256
  ],
204
257
  $380ed8f3903c3931$export$abc24f5b99744ea6
205
258
  ],
206
259
  marginY: [
207
260
  [
208
- 'marginTop',
209
- 'marginBottom'
261
+ "marginTop",
262
+ "marginBottom"
210
263
  ],
211
264
  $380ed8f3903c3931$export$abc24f5b99744ea6
212
265
  ],
213
266
  width: [
214
- 'width',
267
+ "width",
215
268
  $380ed8f3903c3931$export$abc24f5b99744ea6
216
269
  ],
217
270
  height: [
218
- 'height',
271
+ "height",
219
272
  $380ed8f3903c3931$export$abc24f5b99744ea6
220
273
  ],
221
274
  minWidth: [
222
- 'minWidth',
275
+ "minWidth",
223
276
  $380ed8f3903c3931$export$abc24f5b99744ea6
224
277
  ],
225
278
  minHeight: [
226
- 'minHeight',
279
+ "minHeight",
227
280
  $380ed8f3903c3931$export$abc24f5b99744ea6
228
281
  ],
229
282
  maxWidth: [
230
- 'maxWidth',
283
+ "maxWidth",
231
284
  $380ed8f3903c3931$export$abc24f5b99744ea6
232
285
  ],
233
286
  maxHeight: [
234
- 'maxHeight',
287
+ "maxHeight",
235
288
  $380ed8f3903c3931$export$abc24f5b99744ea6
236
289
  ],
237
290
  isHidden: [
238
- 'display',
291
+ "display",
239
292
  $380ed8f3903c3931$var$hiddenValue
240
293
  ],
241
294
  alignSelf: [
242
- 'alignSelf',
295
+ "alignSelf",
243
296
  $380ed8f3903c3931$export$46b6c81d11d2c30a
244
297
  ],
245
298
  justifySelf: [
246
- 'justifySelf',
299
+ "justifySelf",
247
300
  $380ed8f3903c3931$export$46b6c81d11d2c30a
248
301
  ],
249
302
  position: [
250
- 'position',
303
+ "position",
251
304
  $380ed8f3903c3931$var$anyValue
252
305
  ],
253
306
  zIndex: [
254
- 'zIndex',
307
+ "zIndex",
255
308
  $380ed8f3903c3931$var$anyValue
256
309
  ],
257
310
  top: [
258
- 'top',
311
+ "top",
259
312
  $380ed8f3903c3931$export$abc24f5b99744ea6
260
313
  ],
261
314
  bottom: [
262
- 'bottom',
315
+ "bottom",
263
316
  $380ed8f3903c3931$export$abc24f5b99744ea6
264
317
  ],
265
318
  start: [
266
- $380ed8f3903c3931$var$rtl('left', 'right'),
319
+ $380ed8f3903c3931$var$rtl("left", "right"),
267
320
  $380ed8f3903c3931$export$abc24f5b99744ea6
268
321
  ],
269
322
  end: [
270
- $380ed8f3903c3931$var$rtl('right', 'left'),
323
+ $380ed8f3903c3931$var$rtl("right", "left"),
271
324
  $380ed8f3903c3931$export$abc24f5b99744ea6
272
325
  ],
273
326
  left: [
274
- 'left',
327
+ "left",
275
328
  $380ed8f3903c3931$export$abc24f5b99744ea6
276
329
  ],
277
330
  right: [
278
- 'right',
331
+ "right",
279
332
  $380ed8f3903c3931$export$abc24f5b99744ea6
280
333
  ],
281
334
  order: [
282
- 'order',
335
+ "order",
283
336
  $380ed8f3903c3931$var$anyValue
284
337
  ],
285
338
  flex: [
286
- 'flex',
339
+ "flex",
287
340
  $380ed8f3903c3931$var$flexValue
288
341
  ],
289
342
  flexGrow: [
290
- 'flexGrow',
343
+ "flexGrow",
291
344
  $380ed8f3903c3931$export$46b6c81d11d2c30a
292
345
  ],
293
346
  flexShrink: [
294
- 'flexShrink',
347
+ "flexShrink",
295
348
  $380ed8f3903c3931$export$46b6c81d11d2c30a
296
349
  ],
297
350
  flexBasis: [
298
- 'flexBasis',
351
+ "flexBasis",
299
352
  $380ed8f3903c3931$export$46b6c81d11d2c30a
300
353
  ],
301
354
  gridArea: [
302
- 'gridArea',
355
+ "gridArea",
303
356
  $380ed8f3903c3931$export$46b6c81d11d2c30a
304
357
  ],
305
358
  gridColumn: [
306
- 'gridColumn',
359
+ "gridColumn",
307
360
  $380ed8f3903c3931$export$46b6c81d11d2c30a
308
361
  ],
309
362
  gridColumnEnd: [
310
- 'gridColumnEnd',
363
+ "gridColumnEnd",
311
364
  $380ed8f3903c3931$export$46b6c81d11d2c30a
312
365
  ],
313
366
  gridColumnStart: [
314
- 'gridColumnStart',
367
+ "gridColumnStart",
315
368
  $380ed8f3903c3931$export$46b6c81d11d2c30a
316
369
  ],
317
370
  gridRow: [
318
- 'gridRow',
371
+ "gridRow",
319
372
  $380ed8f3903c3931$export$46b6c81d11d2c30a
320
373
  ],
321
374
  gridRowEnd: [
322
- 'gridRowEnd',
375
+ "gridRowEnd",
323
376
  $380ed8f3903c3931$export$46b6c81d11d2c30a
324
377
  ],
325
378
  gridRowStart: [
326
- 'gridRowStart',
379
+ "gridRowStart",
327
380
  $380ed8f3903c3931$export$46b6c81d11d2c30a
328
381
  ]
329
382
  };
330
383
  const $380ed8f3903c3931$export$e0705d1a55f297c = {
331
384
  ...$380ed8f3903c3931$export$fe9c6e915565b4e8,
332
385
  backgroundColor: [
333
- 'backgroundColor',
386
+ "backgroundColor",
334
387
  $380ed8f3903c3931$var$backgroundColorValue
335
388
  ],
336
389
  borderWidth: [
337
- 'borderWidth',
390
+ "borderWidth",
338
391
  $380ed8f3903c3931$var$borderSizeValue
339
392
  ],
340
393
  borderStartWidth: [
341
- $380ed8f3903c3931$var$rtl('borderLeftWidth', 'borderRightWidth'),
394
+ $380ed8f3903c3931$var$rtl("borderLeftWidth", "borderRightWidth"),
342
395
  $380ed8f3903c3931$var$borderSizeValue
343
396
  ],
344
397
  borderEndWidth: [
345
- $380ed8f3903c3931$var$rtl('borderRightWidth', 'borderLeftWidth'),
398
+ $380ed8f3903c3931$var$rtl("borderRightWidth", "borderLeftWidth"),
346
399
  $380ed8f3903c3931$var$borderSizeValue
347
400
  ],
348
401
  borderLeftWidth: [
349
- 'borderLeftWidth',
402
+ "borderLeftWidth",
350
403
  $380ed8f3903c3931$var$borderSizeValue
351
404
  ],
352
405
  borderRightWidth: [
353
- 'borderRightWidth',
406
+ "borderRightWidth",
354
407
  $380ed8f3903c3931$var$borderSizeValue
355
408
  ],
356
409
  borderTopWidth: [
357
- 'borderTopWidth',
410
+ "borderTopWidth",
358
411
  $380ed8f3903c3931$var$borderSizeValue
359
412
  ],
360
413
  borderBottomWidth: [
361
- 'borderBottomWidth',
414
+ "borderBottomWidth",
362
415
  $380ed8f3903c3931$var$borderSizeValue
363
416
  ],
364
417
  borderXWidth: [
365
418
  [
366
- 'borderLeftWidth',
367
- 'borderRightWidth'
419
+ "borderLeftWidth",
420
+ "borderRightWidth"
368
421
  ],
369
422
  $380ed8f3903c3931$var$borderSizeValue
370
423
  ],
371
424
  borderYWidth: [
372
425
  [
373
- 'borderTopWidth',
374
- 'borderBottomWidth'
426
+ "borderTopWidth",
427
+ "borderBottomWidth"
375
428
  ],
376
429
  $380ed8f3903c3931$var$borderSizeValue
377
430
  ],
378
431
  borderColor: [
379
- 'borderColor',
432
+ "borderColor",
380
433
  $380ed8f3903c3931$var$borderColorValue
381
434
  ],
382
435
  borderStartColor: [
383
- $380ed8f3903c3931$var$rtl('borderLeftColor', 'borderRightColor'),
436
+ $380ed8f3903c3931$var$rtl("borderLeftColor", "borderRightColor"),
384
437
  $380ed8f3903c3931$var$borderColorValue
385
438
  ],
386
439
  borderEndColor: [
387
- $380ed8f3903c3931$var$rtl('borderRightColor', 'borderLeftColor'),
440
+ $380ed8f3903c3931$var$rtl("borderRightColor", "borderLeftColor"),
388
441
  $380ed8f3903c3931$var$borderColorValue
389
442
  ],
390
443
  borderLeftColor: [
391
- 'borderLeftColor',
444
+ "borderLeftColor",
392
445
  $380ed8f3903c3931$var$borderColorValue
393
446
  ],
394
447
  borderRightColor: [
395
- 'borderRightColor',
448
+ "borderRightColor",
396
449
  $380ed8f3903c3931$var$borderColorValue
397
450
  ],
398
451
  borderTopColor: [
399
- 'borderTopColor',
452
+ "borderTopColor",
400
453
  $380ed8f3903c3931$var$borderColorValue
401
454
  ],
402
455
  borderBottomColor: [
403
- 'borderBottomColor',
456
+ "borderBottomColor",
404
457
  $380ed8f3903c3931$var$borderColorValue
405
458
  ],
406
459
  borderXColor: [
407
460
  [
408
- 'borderLeftColor',
409
- 'borderRightColor'
461
+ "borderLeftColor",
462
+ "borderRightColor"
410
463
  ],
411
464
  $380ed8f3903c3931$var$borderColorValue
412
465
  ],
413
466
  borderYColor: [
414
467
  [
415
- 'borderTopColor',
416
- 'borderBottomColor'
468
+ "borderTopColor",
469
+ "borderBottomColor"
417
470
  ],
418
471
  $380ed8f3903c3931$var$borderColorValue
419
472
  ],
420
473
  borderRadius: [
421
- 'borderRadius',
474
+ "borderRadius",
422
475
  $380ed8f3903c3931$var$borderRadiusValue
423
476
  ],
424
477
  borderTopStartRadius: [
425
- $380ed8f3903c3931$var$rtl('borderTopLeftRadius', 'borderTopRightRadius'),
478
+ $380ed8f3903c3931$var$rtl("borderTopLeftRadius", "borderTopRightRadius"),
426
479
  $380ed8f3903c3931$var$borderRadiusValue
427
480
  ],
428
481
  borderTopEndRadius: [
429
- $380ed8f3903c3931$var$rtl('borderTopRightRadius', 'borderTopLeftRadius'),
482
+ $380ed8f3903c3931$var$rtl("borderTopRightRadius", "borderTopLeftRadius"),
430
483
  $380ed8f3903c3931$var$borderRadiusValue
431
484
  ],
432
485
  borderBottomStartRadius: [
433
- $380ed8f3903c3931$var$rtl('borderBottomLeftRadius', 'borderBottomRightRadius'),
486
+ $380ed8f3903c3931$var$rtl("borderBottomLeftRadius", "borderBottomRightRadius"),
434
487
  $380ed8f3903c3931$var$borderRadiusValue
435
488
  ],
436
489
  borderBottomEndRadius: [
437
- $380ed8f3903c3931$var$rtl('borderBottomRightRadius', 'borderBottomLeftRadius'),
490
+ $380ed8f3903c3931$var$rtl("borderBottomRightRadius", "borderBottomLeftRadius"),
438
491
  $380ed8f3903c3931$var$borderRadiusValue
439
492
  ],
440
493
  borderTopLeftRadius: [
441
- 'borderTopLeftRadius',
494
+ "borderTopLeftRadius",
442
495
  $380ed8f3903c3931$var$borderRadiusValue
443
496
  ],
444
497
  borderTopRightRadius: [
445
- 'borderTopRightRadius',
498
+ "borderTopRightRadius",
446
499
  $380ed8f3903c3931$var$borderRadiusValue
447
500
  ],
448
501
  borderBottomLeftRadius: [
449
- 'borderBottomLeftRadius',
502
+ "borderBottomLeftRadius",
450
503
  $380ed8f3903c3931$var$borderRadiusValue
451
504
  ],
452
505
  borderBottomRightRadius: [
453
- 'borderBottomRightRadius',
506
+ "borderBottomRightRadius",
454
507
  $380ed8f3903c3931$var$borderRadiusValue
455
508
  ],
456
509
  padding: [
457
- 'padding',
510
+ "padding",
458
511
  $380ed8f3903c3931$export$abc24f5b99744ea6
459
512
  ],
460
513
  paddingStart: [
461
- $380ed8f3903c3931$var$rtl('paddingLeft', 'paddingRight'),
514
+ $380ed8f3903c3931$var$rtl("paddingLeft", "paddingRight"),
462
515
  $380ed8f3903c3931$export$abc24f5b99744ea6
463
516
  ],
464
517
  paddingEnd: [
465
- $380ed8f3903c3931$var$rtl('paddingRight', 'paddingLeft'),
518
+ $380ed8f3903c3931$var$rtl("paddingRight", "paddingLeft"),
466
519
  $380ed8f3903c3931$export$abc24f5b99744ea6
467
520
  ],
468
521
  paddingLeft: [
469
- 'paddingLeft',
522
+ "paddingLeft",
470
523
  $380ed8f3903c3931$export$abc24f5b99744ea6
471
524
  ],
472
525
  paddingRight: [
473
- 'paddingRight',
526
+ "paddingRight",
474
527
  $380ed8f3903c3931$export$abc24f5b99744ea6
475
528
  ],
476
529
  paddingTop: [
477
- 'paddingTop',
530
+ "paddingTop",
478
531
  $380ed8f3903c3931$export$abc24f5b99744ea6
479
532
  ],
480
533
  paddingBottom: [
481
- 'paddingBottom',
534
+ "paddingBottom",
482
535
  $380ed8f3903c3931$export$abc24f5b99744ea6
483
536
  ],
484
537
  paddingX: [
485
538
  [
486
- 'paddingLeft',
487
- 'paddingRight'
539
+ "paddingLeft",
540
+ "paddingRight"
488
541
  ],
489
542
  $380ed8f3903c3931$export$abc24f5b99744ea6
490
543
  ],
491
544
  paddingY: [
492
545
  [
493
- 'paddingTop',
494
- 'paddingBottom'
546
+ "paddingTop",
547
+ "paddingBottom"
495
548
  ],
496
549
  $380ed8f3903c3931$export$abc24f5b99744ea6
497
550
  ],
498
551
  overflow: [
499
- 'overflow',
552
+ "overflow",
500
553
  $380ed8f3903c3931$export$46b6c81d11d2c30a
501
554
  ]
502
555
  };
503
556
  const $380ed8f3903c3931$var$borderStyleProps = {
504
- borderWidth: 'borderStyle',
505
- borderLeftWidth: 'borderLeftStyle',
506
- borderRightWidth: 'borderRightStyle',
507
- borderTopWidth: 'borderTopStyle',
508
- borderBottomWidth: 'borderBottomStyle'
557
+ borderWidth: "borderStyle",
558
+ borderLeftWidth: "borderLeftStyle",
559
+ borderRightWidth: "borderRightStyle",
560
+ borderTopWidth: "borderTopStyle",
561
+ borderBottomWidth: "borderBottomStyle"
509
562
  };
510
563
  function $380ed8f3903c3931$var$rtl(ltr, rtl) {
511
- return (direction)=>direction === 'rtl' ? rtl : ltr
512
- ;
564
+ return (direction)=>direction === "rtl" ? rtl : ltr;
513
565
  }
514
566
  const $380ed8f3903c3931$var$UNIT_RE = /(%|px|em|rem|vw|vh|auto|cm|mm|in|pt|pc|ex|ch|rem|vmin|vmax|fr)$/;
515
567
  const $380ed8f3903c3931$var$FUNC_RE = /^\s*\w+\(/;
516
568
  const $380ed8f3903c3931$var$SPECTRUM_VARIABLE_RE = /(static-)?size-\d+|single-line-(height|width)/g;
517
569
  function $380ed8f3903c3931$export$abc24f5b99744ea6(value) {
518
- if (typeof value === 'number') return value + 'px';
570
+ if (typeof value === "number") return value + "px";
519
571
  if ($380ed8f3903c3931$var$UNIT_RE.test(value)) return value;
520
- if ($380ed8f3903c3931$var$FUNC_RE.test(value)) return value.replace($380ed8f3903c3931$var$SPECTRUM_VARIABLE_RE, 'var(--spectrum-global-dimension-$&, var(--spectrum-alias-$&))');
572
+ if ($380ed8f3903c3931$var$FUNC_RE.test(value)) return value.replace($380ed8f3903c3931$var$SPECTRUM_VARIABLE_RE, "var(--spectrum-global-dimension-$&, var(--spectrum-alias-$&))");
521
573
  return `var(--spectrum-global-dimension-${value}, var(--spectrum-alias-${value}))`;
522
574
  }
523
575
  function $380ed8f3903c3931$export$f348bec194f2e6b5(value, matchedBreakpoints) {
524
576
  value = $380ed8f3903c3931$export$52dbfdbe1b2c3541(value, matchedBreakpoints);
525
577
  return $380ed8f3903c3931$export$abc24f5b99744ea6(value);
526
578
  }
527
- function $380ed8f3903c3931$var$colorValue(value, type = 'default', version = 5) {
579
+ function $380ed8f3903c3931$var$colorValue(value, type = "default", version = 5) {
528
580
  if (version > 5) return `var(--spectrum-${value}, var(--spectrum-semantic-${value}-color-${type}))`;
529
581
  return `var(--spectrum-legacy-color-${value}, var(--spectrum-global-color-${value}, var(--spectrum-semantic-${value}-color-${type})))`;
530
582
  }
531
583
  function $380ed8f3903c3931$var$backgroundColorValue(value, version = 5) {
532
- return `var(--spectrum-alias-background-color-${value}, ${$380ed8f3903c3931$var$colorValue(value, 'background', version)})`;
584
+ return `var(--spectrum-alias-background-color-${value}, ${$380ed8f3903c3931$var$colorValue(value, "background", version)})`;
533
585
  }
534
586
  function $380ed8f3903c3931$var$borderColorValue(value, version = 5) {
535
- if (value === 'default') return 'var(--spectrum-alias-border-color)';
536
- return `var(--spectrum-alias-border-color-${value}, ${$380ed8f3903c3931$var$colorValue(value, 'border', version)})`;
587
+ if (value === "default") return "var(--spectrum-alias-border-color)";
588
+ return `var(--spectrum-alias-border-color-${value}, ${$380ed8f3903c3931$var$colorValue(value, "border", version)})`;
537
589
  }
538
590
  function $380ed8f3903c3931$var$borderSizeValue(value) {
539
591
  return `var(--spectrum-alias-border-size-${value})`;
@@ -542,41 +594,39 @@ function $380ed8f3903c3931$var$borderRadiusValue(value) {
542
594
  return `var(--spectrum-alias-border-radius-${value})`;
543
595
  }
544
596
  function $380ed8f3903c3931$var$hiddenValue(value) {
545
- return value ? 'none' : undefined;
597
+ return value ? "none" : undefined;
546
598
  }
547
599
  function $380ed8f3903c3931$var$anyValue(value) {
548
600
  return value;
549
601
  }
550
602
  function $380ed8f3903c3931$var$flexValue(value) {
551
- if (typeof value === 'boolean') return value ? '1' : undefined;
552
- return '' + value;
603
+ if (typeof value === "boolean") return value ? "1" : undefined;
604
+ return "" + value;
553
605
  }
554
606
  function $380ed8f3903c3931$export$f3c39bb9534218d0(props, handlers, direction, matchedBreakpoints) {
555
- let style = {
556
- };
607
+ let style = {};
557
608
  for(let key in props){
558
609
  let styleProp = handlers[key];
559
610
  if (!styleProp || props[key] == null) continue;
560
611
  let [name, convert] = styleProp;
561
- if (typeof name === 'function') name = name(direction);
612
+ if (typeof name === "function") name = name(direction);
562
613
  let prop = $380ed8f3903c3931$export$52dbfdbe1b2c3541(props[key], matchedBreakpoints);
563
614
  let value = convert(prop, props.colorVersion);
564
615
  if (Array.isArray(name)) for (let k of name)style[k] = value;
565
616
  else style[name] = value;
566
617
  }
567
- for(let prop in $380ed8f3903c3931$var$borderStyleProps)if (style[prop]) {
568
- style[$380ed8f3903c3931$var$borderStyleProps[prop]] = 'solid';
569
- style.boxSizing = 'border-box';
618
+ for(let prop1 in $380ed8f3903c3931$var$borderStyleProps)if (style[prop1]) {
619
+ style[$380ed8f3903c3931$var$borderStyleProps[prop1]] = "solid";
620
+ style.boxSizing = "border-box";
570
621
  }
571
622
  return style;
572
623
  }
573
- function $380ed8f3903c3931$export$b8e6fb9d2dff3f41(props, handlers = $380ed8f3903c3931$export$fe9c6e915565b4e8, options = {
574
- }) {
624
+ function $380ed8f3903c3931$export$b8e6fb9d2dff3f41(props, handlers = $380ed8f3903c3931$export$fe9c6e915565b4e8, options = {}) {
575
625
  let { UNSAFE_className: UNSAFE_className , UNSAFE_style: UNSAFE_style , ...otherProps } = props;
576
- let breakpointProvider = $1051245f87c5981d$export$199d6754bdf4e1e3();
577
- let { direction: direction } = $5lsDl$useLocale();
626
+ let breakpointProvider = (0, $1051245f87c5981d$export$199d6754bdf4e1e3)();
627
+ let { direction: direction } = (0, $5lsDl$useLocale)();
578
628
  let { matchedBreakpoints: matchedBreakpoints = (breakpointProvider === null || breakpointProvider === void 0 ? void 0 : breakpointProvider.matchedBreakpoints) || [
579
- 'base'
629
+ "base"
580
630
  ] } = options;
581
631
  let styles = $380ed8f3903c3931$export$f3c39bb9534218d0(props, handlers, direction, matchedBreakpoints);
582
632
  let style = {
@@ -600,7 +650,7 @@ function $380ed8f3903c3931$export$46b6c81d11d2c30a(value) {
600
650
  return value;
601
651
  }
602
652
  function $380ed8f3903c3931$export$52dbfdbe1b2c3541(prop, matchedBreakpoints) {
603
- if (prop && typeof prop === 'object' && !Array.isArray(prop)) {
653
+ if (prop && typeof prop === "object" && !Array.isArray(prop)) {
604
654
  for(let i = 0; i < matchedBreakpoints.length; i++){
605
655
  let breakpoint = matchedBreakpoints[i];
606
656
  if (prop[breakpoint] != null) return prop[breakpoint];
@@ -611,15 +661,23 @@ function $380ed8f3903c3931$export$52dbfdbe1b2c3541(prop, matchedBreakpoints) {
611
661
  }
612
662
 
613
663
 
664
+ /*
665
+ * Copyright 2020 Adobe. All rights reserved.
666
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
667
+ * you may not use this file except in compliance with the License. You may obtain a copy
668
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
669
+ *
670
+ * Unless required by applicable law or agreed to in writing, software distributed under
671
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
672
+ * OF ANY KIND, either express or implied. See the License for the specific language
673
+ * governing permissions and limitations under the License.
674
+ */
614
675
 
615
-
616
- let $59d09bcc83651bf9$var$SlotContext = /*#__PURE__*/ $5lsDl$react.createContext(null);
676
+ let $59d09bcc83651bf9$var$SlotContext = /*#__PURE__*/ (0, $5lsDl$react).createContext(null);
617
677
  function $59d09bcc83651bf9$export$1e5c9e6e4e15efe3(props, defaultSlot) {
618
678
  let slot = props.slot || defaultSlot;
619
- let { [slot]: slotProps = {
620
- } } = $5lsDl$useContext($59d09bcc83651bf9$var$SlotContext) || {
621
- };
622
- return $5lsDl$mergeProps(props, $5lsDl$mergeProps(slotProps, {
679
+ let { [slot]: slotProps = {} } = (0, $5lsDl$useContext)($59d09bcc83651bf9$var$SlotContext) || {};
680
+ return (0, $5lsDl$mergeProps)(props, (0, $5lsDl$mergeProps)(slotProps, {
623
681
  id: props.id
624
682
  }));
625
683
  }
@@ -629,50 +687,51 @@ function $59d09bcc83651bf9$export$365cf34cda9978e2(cssModule) {
629
687
  UNSAFE_className: cssModule[slot]
630
688
  };
631
689
  return acc;
632
- }, {
633
- });
690
+ }, {});
634
691
  }
635
692
  function $59d09bcc83651bf9$export$8107b24b91795686(props) {
636
693
  // eslint-disable-next-line react-hooks/exhaustive-deps
637
- let parentSlots = $5lsDl$useContext($59d09bcc83651bf9$var$SlotContext) || {
638
- };
639
- let { slots: slots = {
640
- } , children: children } = props;
694
+ let parentSlots = (0, $5lsDl$useContext)($59d09bcc83651bf9$var$SlotContext) || {};
695
+ let { slots: slots = {} , children: children } = props;
641
696
  // Merge props for each slot from parent context and props
642
- let value = $5lsDl$useMemo(()=>Object.keys(parentSlots).concat(Object.keys(slots)).reduce((o, p)=>({
697
+ let value = (0, $5lsDl$useMemo)(()=>Object.keys(parentSlots).concat(Object.keys(slots)).reduce((o, p)=>({
643
698
  ...o,
644
- [p]: $5lsDl$mergeProps(parentSlots[p] || {
645
- }, slots[p] || {
646
- })
647
- })
648
- , {
649
- })
650
- , [
699
+ [p]: (0, $5lsDl$mergeProps)(parentSlots[p] || {}, slots[p] || {})
700
+ }), {}), [
651
701
  parentSlots,
652
702
  slots
653
703
  ]);
654
- return(/*#__PURE__*/ $5lsDl$react.createElement($59d09bcc83651bf9$var$SlotContext.Provider, {
704
+ return /*#__PURE__*/ (0, $5lsDl$react).createElement($59d09bcc83651bf9$var$SlotContext.Provider, {
655
705
  value: value
656
- }, children));
706
+ }, children);
657
707
  }
658
708
  function $59d09bcc83651bf9$export$ceb145244332b7a2(props) {
659
709
  let { children: children , ...otherProps } = props;
660
710
  let content = children;
661
- if ($5lsDl$react.Children.toArray(children).length <= 1) {
662
- if (typeof children === 'function') content = /*#__PURE__*/ $5lsDl$react.cloneElement($5lsDl$react.Children.only(children), otherProps);
711
+ if ((0, $5lsDl$react).Children.toArray(children).length <= 1) {
712
+ if (typeof children === "function") content = /*#__PURE__*/ (0, $5lsDl$react).cloneElement((0, $5lsDl$react).Children.only(children), otherProps);
663
713
  }
664
- return(/*#__PURE__*/ $5lsDl$react.createElement($59d09bcc83651bf9$var$SlotContext.Provider, {
665
- value: {
666
- }
667
- }, content));
714
+ return /*#__PURE__*/ (0, $5lsDl$react).createElement($59d09bcc83651bf9$var$SlotContext.Provider, {
715
+ value: {}
716
+ }, content);
668
717
  }
669
718
 
670
719
 
671
-
720
+ /*
721
+ * Copyright 2020 Adobe. All rights reserved.
722
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
723
+ * you may not use this file except in compliance with the License. You may obtain a copy
724
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
725
+ *
726
+ * Unless required by applicable law or agreed to in writing, software distributed under
727
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
728
+ * OF ANY KIND, either express or implied. See the License for the specific language
729
+ * governing permissions and limitations under the License.
730
+ */
672
731
 
673
732
  function $54cda195bd4173fb$export$e52e2242b6d0f1d4(query, ref) {
674
- let [hasChild, setHasChild] = $5lsDl$useState(true);
675
- $5lsDl$useLayoutEffect(()=>{
733
+ let [hasChild, setHasChild] = (0, $5lsDl$useState)(true);
734
+ (0, $5lsDl$useLayoutEffect)(()=>{
676
735
  setHasChild(!!(ref.current && ref.current.querySelector(query)));
677
736
  }, [
678
737
  setHasChild,
@@ -683,11 +742,21 @@ function $54cda195bd4173fb$export$e52e2242b6d0f1d4(query, ref) {
683
742
  }
684
743
 
685
744
 
686
-
745
+ /*
746
+ * Copyright 2020 Adobe. All rights reserved.
747
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
748
+ * you may not use this file except in compliance with the License. You may obtain a copy
749
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
750
+ *
751
+ * Unless required by applicable law or agreed to in writing, software distributed under
752
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
753
+ * OF ANY KIND, either express or implied. See the License for the specific language
754
+ * governing permissions and limitations under the License.
755
+ */
687
756
  const $fdbe26a36ce1c672$var$MOBILE_SCREEN_WIDTH = 700;
688
757
  function $fdbe26a36ce1c672$export$736bf165441b18c7() {
689
- let isSSR = $5lsDl$useIsSSR();
690
- if (isSSR || typeof window === 'undefined') return false;
758
+ let isSSR = (0, $5lsDl$useIsSSR)();
759
+ if (isSSR || typeof window === "undefined") return false;
691
760
  return window.screen.width <= $fdbe26a36ce1c672$var$MOBILE_SCREEN_WIDTH;
692
761
  }
693
762