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