@react-spectrum/utils 3.7.4 → 3.8.1

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,436 +150,442 @@ 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
  };
212
+ // eslint-disable-next-line react-hooks/exhaustive-deps
159
213
  }, [
160
214
  supportsMatchMedia
161
215
  ]);
162
216
  // If in SSR, the media query should never match. Once the page hydrates,
163
217
  // this will update and the real value will be returned.
164
- let isSSR = $5lsDl$useIsSSR();
218
+ let isSSR = (0, $5lsDl$useIsSSR)();
165
219
  return isSSR ? [
166
- 'base'
167
- ] : breakpoint1;
220
+ "base"
221
+ ] : breakpoint;
168
222
  }
169
223
  function $1051245f87c5981d$export$199d6754bdf4e1e3() {
170
- return $5lsDl$useContext($1051245f87c5981d$var$Context);
224
+ return (0, $5lsDl$useContext)($1051245f87c5981d$var$Context);
171
225
  }
172
226
 
173
227
 
174
228
 
175
229
  const $380ed8f3903c3931$export$fe9c6e915565b4e8 = {
176
230
  margin: [
177
- 'margin',
231
+ "margin",
178
232
  $380ed8f3903c3931$export$abc24f5b99744ea6
179
233
  ],
180
234
  marginStart: [
181
- $380ed8f3903c3931$var$rtl('marginLeft', 'marginRight'),
235
+ $380ed8f3903c3931$var$rtl("marginLeft", "marginRight"),
182
236
  $380ed8f3903c3931$export$abc24f5b99744ea6
183
237
  ],
184
238
  marginEnd: [
185
- $380ed8f3903c3931$var$rtl('marginRight', 'marginLeft'),
239
+ $380ed8f3903c3931$var$rtl("marginRight", "marginLeft"),
186
240
  $380ed8f3903c3931$export$abc24f5b99744ea6
187
241
  ],
188
242
  // marginLeft: ['marginLeft', dimensionValue],
189
243
  // marginRight: ['marginRight', dimensionValue],
190
244
  marginTop: [
191
- 'marginTop',
245
+ "marginTop",
192
246
  $380ed8f3903c3931$export$abc24f5b99744ea6
193
247
  ],
194
248
  marginBottom: [
195
- 'marginBottom',
249
+ "marginBottom",
196
250
  $380ed8f3903c3931$export$abc24f5b99744ea6
197
251
  ],
198
252
  marginX: [
199
253
  [
200
- 'marginLeft',
201
- 'marginRight'
254
+ "marginLeft",
255
+ "marginRight"
202
256
  ],
203
257
  $380ed8f3903c3931$export$abc24f5b99744ea6
204
258
  ],
205
259
  marginY: [
206
260
  [
207
- 'marginTop',
208
- 'marginBottom'
261
+ "marginTop",
262
+ "marginBottom"
209
263
  ],
210
264
  $380ed8f3903c3931$export$abc24f5b99744ea6
211
265
  ],
212
266
  width: [
213
- 'width',
267
+ "width",
214
268
  $380ed8f3903c3931$export$abc24f5b99744ea6
215
269
  ],
216
270
  height: [
217
- 'height',
271
+ "height",
218
272
  $380ed8f3903c3931$export$abc24f5b99744ea6
219
273
  ],
220
274
  minWidth: [
221
- 'minWidth',
275
+ "minWidth",
222
276
  $380ed8f3903c3931$export$abc24f5b99744ea6
223
277
  ],
224
278
  minHeight: [
225
- 'minHeight',
279
+ "minHeight",
226
280
  $380ed8f3903c3931$export$abc24f5b99744ea6
227
281
  ],
228
282
  maxWidth: [
229
- 'maxWidth',
283
+ "maxWidth",
230
284
  $380ed8f3903c3931$export$abc24f5b99744ea6
231
285
  ],
232
286
  maxHeight: [
233
- 'maxHeight',
287
+ "maxHeight",
234
288
  $380ed8f3903c3931$export$abc24f5b99744ea6
235
289
  ],
236
290
  isHidden: [
237
- 'display',
291
+ "display",
238
292
  $380ed8f3903c3931$var$hiddenValue
239
293
  ],
240
294
  alignSelf: [
241
- 'alignSelf',
295
+ "alignSelf",
242
296
  $380ed8f3903c3931$export$46b6c81d11d2c30a
243
297
  ],
244
298
  justifySelf: [
245
- 'justifySelf',
299
+ "justifySelf",
246
300
  $380ed8f3903c3931$export$46b6c81d11d2c30a
247
301
  ],
248
302
  position: [
249
- 'position',
303
+ "position",
250
304
  $380ed8f3903c3931$var$anyValue
251
305
  ],
252
306
  zIndex: [
253
- 'zIndex',
307
+ "zIndex",
254
308
  $380ed8f3903c3931$var$anyValue
255
309
  ],
256
310
  top: [
257
- 'top',
311
+ "top",
258
312
  $380ed8f3903c3931$export$abc24f5b99744ea6
259
313
  ],
260
314
  bottom: [
261
- 'bottom',
315
+ "bottom",
262
316
  $380ed8f3903c3931$export$abc24f5b99744ea6
263
317
  ],
264
318
  start: [
265
- $380ed8f3903c3931$var$rtl('left', 'right'),
319
+ $380ed8f3903c3931$var$rtl("left", "right"),
266
320
  $380ed8f3903c3931$export$abc24f5b99744ea6
267
321
  ],
268
322
  end: [
269
- $380ed8f3903c3931$var$rtl('right', 'left'),
323
+ $380ed8f3903c3931$var$rtl("right", "left"),
270
324
  $380ed8f3903c3931$export$abc24f5b99744ea6
271
325
  ],
272
326
  left: [
273
- 'left',
327
+ "left",
274
328
  $380ed8f3903c3931$export$abc24f5b99744ea6
275
329
  ],
276
330
  right: [
277
- 'right',
331
+ "right",
278
332
  $380ed8f3903c3931$export$abc24f5b99744ea6
279
333
  ],
280
334
  order: [
281
- 'order',
335
+ "order",
282
336
  $380ed8f3903c3931$var$anyValue
283
337
  ],
284
338
  flex: [
285
- 'flex',
339
+ "flex",
286
340
  $380ed8f3903c3931$var$flexValue
287
341
  ],
288
342
  flexGrow: [
289
- 'flexGrow',
343
+ "flexGrow",
290
344
  $380ed8f3903c3931$export$46b6c81d11d2c30a
291
345
  ],
292
346
  flexShrink: [
293
- 'flexShrink',
347
+ "flexShrink",
294
348
  $380ed8f3903c3931$export$46b6c81d11d2c30a
295
349
  ],
296
350
  flexBasis: [
297
- 'flexBasis',
351
+ "flexBasis",
298
352
  $380ed8f3903c3931$export$46b6c81d11d2c30a
299
353
  ],
300
354
  gridArea: [
301
- 'gridArea',
355
+ "gridArea",
302
356
  $380ed8f3903c3931$export$46b6c81d11d2c30a
303
357
  ],
304
358
  gridColumn: [
305
- 'gridColumn',
359
+ "gridColumn",
306
360
  $380ed8f3903c3931$export$46b6c81d11d2c30a
307
361
  ],
308
362
  gridColumnEnd: [
309
- 'gridColumnEnd',
363
+ "gridColumnEnd",
310
364
  $380ed8f3903c3931$export$46b6c81d11d2c30a
311
365
  ],
312
366
  gridColumnStart: [
313
- 'gridColumnStart',
367
+ "gridColumnStart",
314
368
  $380ed8f3903c3931$export$46b6c81d11d2c30a
315
369
  ],
316
370
  gridRow: [
317
- 'gridRow',
371
+ "gridRow",
318
372
  $380ed8f3903c3931$export$46b6c81d11d2c30a
319
373
  ],
320
374
  gridRowEnd: [
321
- 'gridRowEnd',
375
+ "gridRowEnd",
322
376
  $380ed8f3903c3931$export$46b6c81d11d2c30a
323
377
  ],
324
378
  gridRowStart: [
325
- 'gridRowStart',
379
+ "gridRowStart",
326
380
  $380ed8f3903c3931$export$46b6c81d11d2c30a
327
381
  ]
328
382
  };
329
383
  const $380ed8f3903c3931$export$e0705d1a55f297c = {
330
384
  ...$380ed8f3903c3931$export$fe9c6e915565b4e8,
331
385
  backgroundColor: [
332
- 'backgroundColor',
386
+ "backgroundColor",
333
387
  $380ed8f3903c3931$var$backgroundColorValue
334
388
  ],
335
389
  borderWidth: [
336
- 'borderWidth',
390
+ "borderWidth",
337
391
  $380ed8f3903c3931$var$borderSizeValue
338
392
  ],
339
393
  borderStartWidth: [
340
- $380ed8f3903c3931$var$rtl('borderLeftWidth', 'borderRightWidth'),
394
+ $380ed8f3903c3931$var$rtl("borderLeftWidth", "borderRightWidth"),
341
395
  $380ed8f3903c3931$var$borderSizeValue
342
396
  ],
343
397
  borderEndWidth: [
344
- $380ed8f3903c3931$var$rtl('borderRightWidth', 'borderLeftWidth'),
398
+ $380ed8f3903c3931$var$rtl("borderRightWidth", "borderLeftWidth"),
345
399
  $380ed8f3903c3931$var$borderSizeValue
346
400
  ],
347
401
  borderLeftWidth: [
348
- 'borderLeftWidth',
402
+ "borderLeftWidth",
349
403
  $380ed8f3903c3931$var$borderSizeValue
350
404
  ],
351
405
  borderRightWidth: [
352
- 'borderRightWidth',
406
+ "borderRightWidth",
353
407
  $380ed8f3903c3931$var$borderSizeValue
354
408
  ],
355
409
  borderTopWidth: [
356
- 'borderTopWidth',
410
+ "borderTopWidth",
357
411
  $380ed8f3903c3931$var$borderSizeValue
358
412
  ],
359
413
  borderBottomWidth: [
360
- 'borderBottomWidth',
414
+ "borderBottomWidth",
361
415
  $380ed8f3903c3931$var$borderSizeValue
362
416
  ],
363
417
  borderXWidth: [
364
418
  [
365
- 'borderLeftWidth',
366
- 'borderRightWidth'
419
+ "borderLeftWidth",
420
+ "borderRightWidth"
367
421
  ],
368
422
  $380ed8f3903c3931$var$borderSizeValue
369
423
  ],
370
424
  borderYWidth: [
371
425
  [
372
- 'borderTopWidth',
373
- 'borderBottomWidth'
426
+ "borderTopWidth",
427
+ "borderBottomWidth"
374
428
  ],
375
429
  $380ed8f3903c3931$var$borderSizeValue
376
430
  ],
377
431
  borderColor: [
378
- 'borderColor',
432
+ "borderColor",
379
433
  $380ed8f3903c3931$var$borderColorValue
380
434
  ],
381
435
  borderStartColor: [
382
- $380ed8f3903c3931$var$rtl('borderLeftColor', 'borderRightColor'),
436
+ $380ed8f3903c3931$var$rtl("borderLeftColor", "borderRightColor"),
383
437
  $380ed8f3903c3931$var$borderColorValue
384
438
  ],
385
439
  borderEndColor: [
386
- $380ed8f3903c3931$var$rtl('borderRightColor', 'borderLeftColor'),
440
+ $380ed8f3903c3931$var$rtl("borderRightColor", "borderLeftColor"),
387
441
  $380ed8f3903c3931$var$borderColorValue
388
442
  ],
389
443
  borderLeftColor: [
390
- 'borderLeftColor',
444
+ "borderLeftColor",
391
445
  $380ed8f3903c3931$var$borderColorValue
392
446
  ],
393
447
  borderRightColor: [
394
- 'borderRightColor',
448
+ "borderRightColor",
395
449
  $380ed8f3903c3931$var$borderColorValue
396
450
  ],
397
451
  borderTopColor: [
398
- 'borderTopColor',
452
+ "borderTopColor",
399
453
  $380ed8f3903c3931$var$borderColorValue
400
454
  ],
401
455
  borderBottomColor: [
402
- 'borderBottomColor',
456
+ "borderBottomColor",
403
457
  $380ed8f3903c3931$var$borderColorValue
404
458
  ],
405
459
  borderXColor: [
406
460
  [
407
- 'borderLeftColor',
408
- 'borderRightColor'
461
+ "borderLeftColor",
462
+ "borderRightColor"
409
463
  ],
410
464
  $380ed8f3903c3931$var$borderColorValue
411
465
  ],
412
466
  borderYColor: [
413
467
  [
414
- 'borderTopColor',
415
- 'borderBottomColor'
468
+ "borderTopColor",
469
+ "borderBottomColor"
416
470
  ],
417
471
  $380ed8f3903c3931$var$borderColorValue
418
472
  ],
419
473
  borderRadius: [
420
- 'borderRadius',
474
+ "borderRadius",
421
475
  $380ed8f3903c3931$var$borderRadiusValue
422
476
  ],
423
477
  borderTopStartRadius: [
424
- $380ed8f3903c3931$var$rtl('borderTopLeftRadius', 'borderTopRightRadius'),
478
+ $380ed8f3903c3931$var$rtl("borderTopLeftRadius", "borderTopRightRadius"),
425
479
  $380ed8f3903c3931$var$borderRadiusValue
426
480
  ],
427
481
  borderTopEndRadius: [
428
- $380ed8f3903c3931$var$rtl('borderTopRightRadius', 'borderTopLeftRadius'),
482
+ $380ed8f3903c3931$var$rtl("borderTopRightRadius", "borderTopLeftRadius"),
429
483
  $380ed8f3903c3931$var$borderRadiusValue
430
484
  ],
431
485
  borderBottomStartRadius: [
432
- $380ed8f3903c3931$var$rtl('borderBottomLeftRadius', 'borderBottomRightRadius'),
486
+ $380ed8f3903c3931$var$rtl("borderBottomLeftRadius", "borderBottomRightRadius"),
433
487
  $380ed8f3903c3931$var$borderRadiusValue
434
488
  ],
435
489
  borderBottomEndRadius: [
436
- $380ed8f3903c3931$var$rtl('borderBottomRightRadius', 'borderBottomLeftRadius'),
490
+ $380ed8f3903c3931$var$rtl("borderBottomRightRadius", "borderBottomLeftRadius"),
437
491
  $380ed8f3903c3931$var$borderRadiusValue
438
492
  ],
439
493
  borderTopLeftRadius: [
440
- 'borderTopLeftRadius',
494
+ "borderTopLeftRadius",
441
495
  $380ed8f3903c3931$var$borderRadiusValue
442
496
  ],
443
497
  borderTopRightRadius: [
444
- 'borderTopRightRadius',
498
+ "borderTopRightRadius",
445
499
  $380ed8f3903c3931$var$borderRadiusValue
446
500
  ],
447
501
  borderBottomLeftRadius: [
448
- 'borderBottomLeftRadius',
502
+ "borderBottomLeftRadius",
449
503
  $380ed8f3903c3931$var$borderRadiusValue
450
504
  ],
451
505
  borderBottomRightRadius: [
452
- 'borderBottomRightRadius',
506
+ "borderBottomRightRadius",
453
507
  $380ed8f3903c3931$var$borderRadiusValue
454
508
  ],
455
509
  padding: [
456
- 'padding',
510
+ "padding",
457
511
  $380ed8f3903c3931$export$abc24f5b99744ea6
458
512
  ],
459
513
  paddingStart: [
460
- $380ed8f3903c3931$var$rtl('paddingLeft', 'paddingRight'),
514
+ $380ed8f3903c3931$var$rtl("paddingLeft", "paddingRight"),
461
515
  $380ed8f3903c3931$export$abc24f5b99744ea6
462
516
  ],
463
517
  paddingEnd: [
464
- $380ed8f3903c3931$var$rtl('paddingRight', 'paddingLeft'),
518
+ $380ed8f3903c3931$var$rtl("paddingRight", "paddingLeft"),
465
519
  $380ed8f3903c3931$export$abc24f5b99744ea6
466
520
  ],
467
521
  paddingLeft: [
468
- 'paddingLeft',
522
+ "paddingLeft",
469
523
  $380ed8f3903c3931$export$abc24f5b99744ea6
470
524
  ],
471
525
  paddingRight: [
472
- 'paddingRight',
526
+ "paddingRight",
473
527
  $380ed8f3903c3931$export$abc24f5b99744ea6
474
528
  ],
475
529
  paddingTop: [
476
- 'paddingTop',
530
+ "paddingTop",
477
531
  $380ed8f3903c3931$export$abc24f5b99744ea6
478
532
  ],
479
533
  paddingBottom: [
480
- 'paddingBottom',
534
+ "paddingBottom",
481
535
  $380ed8f3903c3931$export$abc24f5b99744ea6
482
536
  ],
483
537
  paddingX: [
484
538
  [
485
- 'paddingLeft',
486
- 'paddingRight'
539
+ "paddingLeft",
540
+ "paddingRight"
487
541
  ],
488
542
  $380ed8f3903c3931$export$abc24f5b99744ea6
489
543
  ],
490
544
  paddingY: [
491
545
  [
492
- 'paddingTop',
493
- 'paddingBottom'
546
+ "paddingTop",
547
+ "paddingBottom"
494
548
  ],
495
549
  $380ed8f3903c3931$export$abc24f5b99744ea6
496
550
  ],
497
551
  overflow: [
498
- 'overflow',
552
+ "overflow",
499
553
  $380ed8f3903c3931$export$46b6c81d11d2c30a
500
554
  ]
501
555
  };
502
556
  const $380ed8f3903c3931$var$borderStyleProps = {
503
- borderWidth: 'borderStyle',
504
- borderLeftWidth: 'borderLeftStyle',
505
- borderRightWidth: 'borderRightStyle',
506
- borderTopWidth: 'borderTopStyle',
507
- borderBottomWidth: 'borderBottomStyle'
557
+ borderWidth: "borderStyle",
558
+ borderLeftWidth: "borderLeftStyle",
559
+ borderRightWidth: "borderRightStyle",
560
+ borderTopWidth: "borderTopStyle",
561
+ borderBottomWidth: "borderBottomStyle"
508
562
  };
509
563
  function $380ed8f3903c3931$var$rtl(ltr, rtl) {
510
- return (direction)=>direction === 'rtl' ? rtl : ltr
511
- ;
564
+ return (direction)=>direction === "rtl" ? rtl : ltr;
512
565
  }
513
566
  const $380ed8f3903c3931$var$UNIT_RE = /(%|px|em|rem|vw|vh|auto|cm|mm|in|pt|pc|ex|ch|rem|vmin|vmax|fr)$/;
514
567
  const $380ed8f3903c3931$var$FUNC_RE = /^\s*\w+\(/;
515
568
  const $380ed8f3903c3931$var$SPECTRUM_VARIABLE_RE = /(static-)?size-\d+|single-line-(height|width)/g;
516
569
  function $380ed8f3903c3931$export$abc24f5b99744ea6(value) {
517
- if (typeof value === 'number') return value + 'px';
570
+ if (typeof value === "number") return value + "px";
518
571
  if ($380ed8f3903c3931$var$UNIT_RE.test(value)) return value;
519
- 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-$&))");
520
573
  return `var(--spectrum-global-dimension-${value}, var(--spectrum-alias-${value}))`;
521
574
  }
522
575
  function $380ed8f3903c3931$export$f348bec194f2e6b5(value, matchedBreakpoints) {
523
576
  value = $380ed8f3903c3931$export$52dbfdbe1b2c3541(value, matchedBreakpoints);
524
577
  return $380ed8f3903c3931$export$abc24f5b99744ea6(value);
525
578
  }
526
- function $380ed8f3903c3931$var$colorValue(value, type = 'default') {
527
- return `var(--spectrum-global-color-${value}, var(--spectrum-semantic-${value}-color-${type}))`;
579
+ function $380ed8f3903c3931$var$colorValue(value, type = "default", version = 5) {
580
+ if (version > 5) return `var(--spectrum-${value}, var(--spectrum-semantic-${value}-color-${type}))`;
581
+ return `var(--spectrum-legacy-color-${value}, var(--spectrum-global-color-${value}, var(--spectrum-semantic-${value}-color-${type})))`;
528
582
  }
529
- function $380ed8f3903c3931$var$backgroundColorValue(value) {
530
- return `var(--spectrum-alias-background-color-${value}, ${$380ed8f3903c3931$var$colorValue(value, 'background')})`;
583
+ function $380ed8f3903c3931$var$backgroundColorValue(value, version = 5) {
584
+ return `var(--spectrum-alias-background-color-${value}, ${$380ed8f3903c3931$var$colorValue(value, "background", version)})`;
531
585
  }
532
- function $380ed8f3903c3931$var$borderColorValue(value) {
533
- if (value === 'default') return 'var(--spectrum-alias-border-color)';
534
- return `var(--spectrum-alias-border-color-${value}, ${$380ed8f3903c3931$var$colorValue(value, 'border')})`;
586
+ function $380ed8f3903c3931$var$borderColorValue(value, version = 5) {
587
+ if (value === "default") return "var(--spectrum-alias-border-color)";
588
+ return `var(--spectrum-alias-border-color-${value}, ${$380ed8f3903c3931$var$colorValue(value, "border", version)})`;
535
589
  }
536
590
  function $380ed8f3903c3931$var$borderSizeValue(value) {
537
591
  return `var(--spectrum-alias-border-size-${value})`;
@@ -540,41 +594,39 @@ function $380ed8f3903c3931$var$borderRadiusValue(value) {
540
594
  return `var(--spectrum-alias-border-radius-${value})`;
541
595
  }
542
596
  function $380ed8f3903c3931$var$hiddenValue(value) {
543
- return value ? 'none' : undefined;
597
+ return value ? "none" : undefined;
544
598
  }
545
599
  function $380ed8f3903c3931$var$anyValue(value) {
546
600
  return value;
547
601
  }
548
602
  function $380ed8f3903c3931$var$flexValue(value) {
549
- if (typeof value === 'boolean') return value ? '1' : undefined;
550
- return '' + value;
603
+ if (typeof value === "boolean") return value ? "1" : undefined;
604
+ return "" + value;
551
605
  }
552
606
  function $380ed8f3903c3931$export$f3c39bb9534218d0(props, handlers, direction, matchedBreakpoints) {
553
- let style = {
554
- };
607
+ let style = {};
555
608
  for(let key in props){
556
609
  let styleProp = handlers[key];
557
610
  if (!styleProp || props[key] == null) continue;
558
611
  let [name, convert] = styleProp;
559
- if (typeof name === 'function') name = name(direction);
612
+ if (typeof name === "function") name = name(direction);
560
613
  let prop = $380ed8f3903c3931$export$52dbfdbe1b2c3541(props[key], matchedBreakpoints);
561
- let value = convert(prop);
614
+ let value = convert(prop, props.colorVersion);
562
615
  if (Array.isArray(name)) for (let k of name)style[k] = value;
563
616
  else style[name] = value;
564
617
  }
565
- for(let prop in $380ed8f3903c3931$var$borderStyleProps)if (style[prop]) {
566
- style[$380ed8f3903c3931$var$borderStyleProps[prop]] = 'solid';
567
- 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";
568
621
  }
569
622
  return style;
570
623
  }
571
- function $380ed8f3903c3931$export$b8e6fb9d2dff3f41(props, handlers = $380ed8f3903c3931$export$fe9c6e915565b4e8, options = {
572
- }) {
624
+ function $380ed8f3903c3931$export$b8e6fb9d2dff3f41(props, handlers = $380ed8f3903c3931$export$fe9c6e915565b4e8, options = {}) {
573
625
  let { UNSAFE_className: UNSAFE_className , UNSAFE_style: UNSAFE_style , ...otherProps } = props;
574
- let breakpointProvider = $1051245f87c5981d$export$199d6754bdf4e1e3();
575
- let { direction: direction } = $5lsDl$useLocale();
626
+ let breakpointProvider = (0, $1051245f87c5981d$export$199d6754bdf4e1e3)();
627
+ let { direction: direction } = (0, $5lsDl$useLocale)();
576
628
  let { matchedBreakpoints: matchedBreakpoints = (breakpointProvider === null || breakpointProvider === void 0 ? void 0 : breakpointProvider.matchedBreakpoints) || [
577
- 'base'
629
+ "base"
578
630
  ] } = options;
579
631
  let styles = $380ed8f3903c3931$export$f3c39bb9534218d0(props, handlers, direction, matchedBreakpoints);
580
632
  let style = {
@@ -598,7 +650,7 @@ function $380ed8f3903c3931$export$46b6c81d11d2c30a(value) {
598
650
  return value;
599
651
  }
600
652
  function $380ed8f3903c3931$export$52dbfdbe1b2c3541(prop, matchedBreakpoints) {
601
- if (prop && typeof prop === 'object' && !Array.isArray(prop)) {
653
+ if (prop && typeof prop === "object" && !Array.isArray(prop)) {
602
654
  for(let i = 0; i < matchedBreakpoints.length; i++){
603
655
  let breakpoint = matchedBreakpoints[i];
604
656
  if (prop[breakpoint] != null) return prop[breakpoint];
@@ -609,15 +661,23 @@ function $380ed8f3903c3931$export$52dbfdbe1b2c3541(prop, matchedBreakpoints) {
609
661
  }
610
662
 
611
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
+ */
612
675
 
613
-
614
- let $59d09bcc83651bf9$var$SlotContext = /*#__PURE__*/ $5lsDl$react.createContext(null);
676
+ let $59d09bcc83651bf9$var$SlotContext = /*#__PURE__*/ (0, $5lsDl$react).createContext(null);
615
677
  function $59d09bcc83651bf9$export$1e5c9e6e4e15efe3(props, defaultSlot) {
616
678
  let slot = props.slot || defaultSlot;
617
- let { [slot]: slotProps = {
618
- } } = $5lsDl$useContext($59d09bcc83651bf9$var$SlotContext) || {
619
- };
620
- 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, {
621
681
  id: props.id
622
682
  }));
623
683
  }
@@ -627,49 +687,51 @@ function $59d09bcc83651bf9$export$365cf34cda9978e2(cssModule) {
627
687
  UNSAFE_className: cssModule[slot]
628
688
  };
629
689
  return acc;
630
- }, {
631
- });
690
+ }, {});
632
691
  }
633
692
  function $59d09bcc83651bf9$export$8107b24b91795686(props) {
634
- let parentSlots = $5lsDl$useContext($59d09bcc83651bf9$var$SlotContext) || {
635
- };
636
- let { slots: slots = {
637
- } , children: children } = props;
693
+ // eslint-disable-next-line react-hooks/exhaustive-deps
694
+ let parentSlots = (0, $5lsDl$useContext)($59d09bcc83651bf9$var$SlotContext) || {};
695
+ let { slots: slots = {} , children: children } = props;
638
696
  // Merge props for each slot from parent context and props
639
- 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)=>({
640
698
  ...o,
641
- [p]: $5lsDl$mergeProps(parentSlots[p] || {
642
- }, slots[p] || {
643
- })
644
- })
645
- , {
646
- })
647
- , [
699
+ [p]: (0, $5lsDl$mergeProps)(parentSlots[p] || {}, slots[p] || {})
700
+ }), {}), [
648
701
  parentSlots,
649
702
  slots
650
703
  ]);
651
- return(/*#__PURE__*/ $5lsDl$react.createElement($59d09bcc83651bf9$var$SlotContext.Provider, {
704
+ return /*#__PURE__*/ (0, $5lsDl$react).createElement($59d09bcc83651bf9$var$SlotContext.Provider, {
652
705
  value: value
653
- }, children));
706
+ }, children);
654
707
  }
655
708
  function $59d09bcc83651bf9$export$ceb145244332b7a2(props) {
656
709
  let { children: children , ...otherProps } = props;
657
710
  let content = children;
658
- if ($5lsDl$react.Children.toArray(children).length <= 1) {
659
- 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);
660
713
  }
661
- return(/*#__PURE__*/ $5lsDl$react.createElement($59d09bcc83651bf9$var$SlotContext.Provider, {
662
- value: {
663
- }
664
- }, content));
714
+ return /*#__PURE__*/ (0, $5lsDl$react).createElement($59d09bcc83651bf9$var$SlotContext.Provider, {
715
+ value: {}
716
+ }, content);
665
717
  }
666
718
 
667
719
 
668
-
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
+ */
669
731
 
670
732
  function $54cda195bd4173fb$export$e52e2242b6d0f1d4(query, ref) {
671
- let [hasChild, setHasChild] = $5lsDl$useState(true);
672
- $5lsDl$useLayoutEffect(()=>{
733
+ let [hasChild, setHasChild] = (0, $5lsDl$useState)(true);
734
+ (0, $5lsDl$useLayoutEffect)(()=>{
673
735
  setHasChild(!!(ref.current && ref.current.querySelector(query)));
674
736
  }, [
675
737
  setHasChild,
@@ -680,11 +742,21 @@ function $54cda195bd4173fb$export$e52e2242b6d0f1d4(query, ref) {
680
742
  }
681
743
 
682
744
 
683
-
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
+ */
684
756
  const $fdbe26a36ce1c672$var$MOBILE_SCREEN_WIDTH = 700;
685
757
  function $fdbe26a36ce1c672$export$736bf165441b18c7() {
686
- let isSSR = $5lsDl$useIsSSR();
687
- if (isSSR || typeof window === 'undefined') return false;
758
+ let isSSR = (0, $5lsDl$useIsSSR)();
759
+ if (isSSR || typeof window === "undefined") return false;
688
760
  return window.screen.width <= $fdbe26a36ce1c672$var$MOBILE_SCREEN_WIDTH;
689
761
  }
690
762