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