@react-spectrum/utils 3.6.3 → 3.6.6

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