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