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