@react-spectrum/provider 3.8.2 → 3.9.0

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/import.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import "./main.css";
2
2
  import {useMatchedBreakpoints as $b6ncI$useMatchedBreakpoints, useStyleProps as $b6ncI$useStyleProps, BreakpointProvider as $b6ncI$BreakpointProvider, useDOMRef as $b6ncI$useDOMRef, shouldKeepSpectrumClassNames as $b6ncI$shouldKeepSpectrumClassNames, useMediaQuery as $b6ncI$useMediaQuery} from "@react-spectrum/utils";
3
3
  import $b6ncI$clsx from "clsx";
4
- import {filterDOMProps as $b6ncI$filterDOMProps} from "@react-aria/utils";
4
+ import {filterDOMProps as $b6ncI$filterDOMProps, RouterProvider as $b6ncI$RouterProvider} from "@react-aria/utils";
5
5
  import {useLocale as $b6ncI$useLocale, I18nProvider as $b6ncI$I18nProvider} from "@react-aria/i18n";
6
6
  import {ModalProvider as $b6ncI$ModalProvider, useModalProvider as $b6ncI$useModalProvider} from "@react-aria/overlays";
7
7
  import $b6ncI$react, {useRef as $b6ncI$useRef, useEffect as $b6ncI$useEffect, useContext as $b6ncI$useContext} from "react";
@@ -56,22 +56,52 @@ $a8430f637b4ccbce$export$841858b892ce1f4c.displayName = "ProviderContext";
56
56
 
57
57
  var $698974e9dd92c2ec$exports = {};
58
58
 
59
+ $parcel$export($698974e9dd92c2ec$exports, "focus-ring", () => $698974e9dd92c2ec$export$f39a09f249340e2a, (v) => $698974e9dd92c2ec$export$f39a09f249340e2a = v);
60
+ $parcel$export($698974e9dd92c2ec$exports, "i18nFontFamily", () => $698974e9dd92c2ec$export$8c4ee2c50c22c514, (v) => $698974e9dd92c2ec$export$8c4ee2c50c22c514 = v);
59
61
  $parcel$export($698974e9dd92c2ec$exports, "spectrum", () => $698974e9dd92c2ec$export$3311ab3a441bc141, (v) => $698974e9dd92c2ec$export$3311ab3a441bc141 = v);
62
+ $parcel$export($698974e9dd92c2ec$exports, "spectrum-FocusRing-ring", () => $698974e9dd92c2ec$export$4109102f950813a6, (v) => $698974e9dd92c2ec$export$4109102f950813a6 = v);
63
+ $parcel$export($698974e9dd92c2ec$exports, "spectrum-FocusRing", () => $698974e9dd92c2ec$export$24c7f46a6e3605dd, (v) => $698974e9dd92c2ec$export$24c7f46a6e3605dd = v);
64
+ $parcel$export($698974e9dd92c2ec$exports, "spectrum-FocusRing--quiet", () => $698974e9dd92c2ec$export$2927016961429360, (v) => $698974e9dd92c2ec$export$2927016961429360 = v);
65
+ var $698974e9dd92c2ec$export$f39a09f249340e2a;
66
+ var $698974e9dd92c2ec$export$8c4ee2c50c22c514;
60
67
  var $698974e9dd92c2ec$export$3311ab3a441bc141;
61
- $698974e9dd92c2ec$export$3311ab3a441bc141 = "spectrum_b37d53";
68
+ var $698974e9dd92c2ec$export$4109102f950813a6;
69
+ var $698974e9dd92c2ec$export$24c7f46a6e3605dd;
70
+ var $698974e9dd92c2ec$export$2927016961429360;
71
+ $698974e9dd92c2ec$export$f39a09f249340e2a = `JuTe6q_focus-ring`;
72
+ $698974e9dd92c2ec$export$8c4ee2c50c22c514 = `JuTe6q_i18nFontFamily`;
73
+ $698974e9dd92c2ec$export$3311ab3a441bc141 = `JuTe6q_spectrum`;
74
+ $698974e9dd92c2ec$export$4109102f950813a6 = `JuTe6q_spectrum-FocusRing-ring`;
75
+ $698974e9dd92c2ec$export$24c7f46a6e3605dd = `JuTe6q_spectrum-FocusRing ${$698974e9dd92c2ec$export$4109102f950813a6}`;
76
+ $698974e9dd92c2ec$export$2927016961429360 = `JuTe6q_spectrum-FocusRing--quiet`;
62
77
 
63
78
 
64
79
  var $5cac98e4c80e6707$exports = {};
65
80
 
81
+ $parcel$export($5cac98e4c80e6707$exports, "focus-ring", () => $5cac98e4c80e6707$export$f39a09f249340e2a, (v) => $5cac98e4c80e6707$export$f39a09f249340e2a = v);
82
+ $parcel$export($5cac98e4c80e6707$exports, "i18nFontFamily", () => $5cac98e4c80e6707$export$8c4ee2c50c22c514, (v) => $5cac98e4c80e6707$export$8c4ee2c50c22c514 = v);
66
83
  $parcel$export($5cac98e4c80e6707$exports, "spectrum", () => $5cac98e4c80e6707$export$3311ab3a441bc141, (v) => $5cac98e4c80e6707$export$3311ab3a441bc141 = v);
67
84
  $parcel$export($5cac98e4c80e6707$exports, "spectrum-Body", () => $5cac98e4c80e6707$export$a30bf7810c8453d1, (v) => $5cac98e4c80e6707$export$a30bf7810c8453d1 = v);
68
85
  $parcel$export($5cac98e4c80e6707$exports, "spectrum-Body--italic", () => $5cac98e4c80e6707$export$7b2dac1166f6ec4c, (v) => $5cac98e4c80e6707$export$7b2dac1166f6ec4c = v);
86
+ $parcel$export($5cac98e4c80e6707$exports, "spectrum-FocusRing-ring", () => $5cac98e4c80e6707$export$4109102f950813a6, (v) => $5cac98e4c80e6707$export$4109102f950813a6 = v);
87
+ $parcel$export($5cac98e4c80e6707$exports, "spectrum-FocusRing", () => $5cac98e4c80e6707$export$24c7f46a6e3605dd, (v) => $5cac98e4c80e6707$export$24c7f46a6e3605dd = v);
88
+ $parcel$export($5cac98e4c80e6707$exports, "spectrum-FocusRing--quiet", () => $5cac98e4c80e6707$export$2927016961429360, (v) => $5cac98e4c80e6707$export$2927016961429360 = v);
89
+ var $5cac98e4c80e6707$export$f39a09f249340e2a;
90
+ var $5cac98e4c80e6707$export$8c4ee2c50c22c514;
69
91
  var $5cac98e4c80e6707$export$3311ab3a441bc141;
70
92
  var $5cac98e4c80e6707$export$a30bf7810c8453d1;
71
93
  var $5cac98e4c80e6707$export$7b2dac1166f6ec4c;
72
- $5cac98e4c80e6707$export$3311ab3a441bc141 = "spectrum_2a241c";
73
- $5cac98e4c80e6707$export$a30bf7810c8453d1 = "spectrum-Body_2a241c";
74
- $5cac98e4c80e6707$export$7b2dac1166f6ec4c = "spectrum-Body--italic_2a241c";
94
+ var $5cac98e4c80e6707$export$4109102f950813a6;
95
+ var $5cac98e4c80e6707$export$24c7f46a6e3605dd;
96
+ var $5cac98e4c80e6707$export$2927016961429360;
97
+ $5cac98e4c80e6707$export$f39a09f249340e2a = `_5QszkG_focus-ring`;
98
+ $5cac98e4c80e6707$export$8c4ee2c50c22c514 = `_5QszkG_i18nFontFamily`;
99
+ $5cac98e4c80e6707$export$3311ab3a441bc141 = `_5QszkG_spectrum ${$5cac98e4c80e6707$export$8c4ee2c50c22c514}`;
100
+ $5cac98e4c80e6707$export$a30bf7810c8453d1 = `_5QszkG_spectrum-Body`;
101
+ $5cac98e4c80e6707$export$7b2dac1166f6ec4c = `_5QszkG_spectrum-Body--italic`;
102
+ $5cac98e4c80e6707$export$4109102f950813a6 = `_5QszkG_spectrum-FocusRing-ring`;
103
+ $5cac98e4c80e6707$export$24c7f46a6e3605dd = `_5QszkG_spectrum-FocusRing ${$5cac98e4c80e6707$export$4109102f950813a6}`;
104
+ $5cac98e4c80e6707$export$2927016961429360 = `_5QszkG_spectrum-FocusRing--quiet`;
75
105
 
76
106
 
77
107
  /*
@@ -106,7 +136,7 @@ function $d8453c5ae7fac713$export$a8d2043b2d807f4d(theme) {
106
136
 
107
137
 
108
138
  var $7b22e09dddddd7da$exports = {};
109
- $7b22e09dddddd7da$exports = JSON.parse('{"name":"@react-spectrum/provider","version":"3.8.1","description":"Spectrum UI components in React","license":"Apache-2.0","main":"dist/main.js","module":"dist/module.js","exports":{"types":"./dist/types.d.ts","import":"./dist/import.mjs","require":"./dist/main.js"},"types":"dist/types.d.ts","source":"src/index.ts","files":["dist","src"],"sideEffects":["*.css"],"targets":{"main":{"includeNodeModules":["@adobe/spectrum-css-temp"]},"module":{"includeNodeModules":["@adobe/spectrum-css-temp"]}},"repository":{"type":"git","url":"https://github.com/adobe/react-spectrum"},"dependencies":{"@react-aria/i18n":"^3.8.1","@react-aria/overlays":"^3.16.0","@react-aria/utils":"^3.19.0","@react-spectrum/utils":"^3.10.1","@react-types/provider":"^3.6.3","@react-types/shared":"^3.19.0","@swc/helpers":"^0.5.0","clsx":"^1.1.1"},"devDependencies":{"@adobe/spectrum-css-temp":"3.0.0-alpha.1"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0-rc.1 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0-rc.1 || ^18.0.0"},"publishConfig":{"access":"public"}}');
139
+ $7b22e09dddddd7da$exports = JSON.parse('{"name":"@react-spectrum/provider","version":"3.8.2","description":"Spectrum UI components in React","license":"Apache-2.0","main":"dist/main.js","module":"dist/module.js","exports":{"types":"./dist/types.d.ts","import":"./dist/import.mjs","require":"./dist/main.js"},"types":"dist/types.d.ts","source":"src/index.ts","files":["dist","src"],"sideEffects":["*.css"],"targets":{"main":{"includeNodeModules":["@adobe/spectrum-css-temp"]},"module":{"includeNodeModules":["@adobe/spectrum-css-temp"]}},"repository":{"type":"git","url":"https://github.com/adobe/react-spectrum"},"dependencies":{"@react-aria/i18n":"^3.8.2","@react-aria/overlays":"^3.17.0","@react-aria/utils":"^3.20.0","@react-spectrum/utils":"^3.10.2","@react-types/provider":"^3.6.4","@react-types/shared":"^3.20.0","@swc/helpers":"^0.5.0","clsx":"^1.1.1"},"devDependencies":{"@adobe/spectrum-css-temp":"3.0.0-alpha.1"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0-rc.1 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0-rc.1 || ^18.0.0"},"publishConfig":{"access":"public"}}');
110
140
 
111
141
 
112
142
  const $7167f8da3cce35e4$var$DEFAULT_BREAKPOINTS = {
@@ -120,16 +150,16 @@ function $7167f8da3cce35e4$var$Provider(props, ref) {
120
150
  let prevContext = $7167f8da3cce35e4$export$693cdb10cec23617();
121
151
  let prevColorScheme = prevContext && prevContext.colorScheme;
122
152
  let prevBreakpoints = prevContext && prevContext.breakpoints;
123
- let { theme: theme = prevContext && prevContext.theme , defaultColorScheme: defaultColorScheme } = props;
153
+ let { theme: theme = prevContext && prevContext.theme, defaultColorScheme: defaultColorScheme } = props;
124
154
  if (!theme) throw new Error("theme not found, the parent provider must have a theme provided");
125
155
  // Hooks must always be called.
126
156
  let autoColorScheme = (0, $d8453c5ae7fac713$export$6343629ee1b29116)(theme, defaultColorScheme);
127
157
  let autoScale = (0, $d8453c5ae7fac713$export$a8d2043b2d807f4d)(theme);
128
- let { locale: prevLocale } = (0, $b6ncI$useLocale)();
158
+ let { locale: prevLocale } = (0, $b6ncI$useLocale)();
129
159
  // if the new theme doesn't support the prevColorScheme, we must resort to the auto
130
160
  let usePrevColorScheme = !!theme[prevColorScheme];
131
161
  // importance of color scheme props > parent > auto:(OS > default > omitted)
132
- let { colorScheme: colorScheme = usePrevColorScheme ? prevColorScheme : autoColorScheme , scale: scale = prevContext ? prevContext.scale : autoScale , locale: locale = prevContext ? prevLocale : null , breakpoints: breakpoints = prevContext ? prevBreakpoints : $7167f8da3cce35e4$var$DEFAULT_BREAKPOINTS , children: children , isQuiet: isQuiet , isEmphasized: isEmphasized , isDisabled: isDisabled , isRequired: isRequired , isReadOnly: isReadOnly , validationState: validationState , ...otherProps } = props;
162
+ let { colorScheme: colorScheme = usePrevColorScheme ? prevColorScheme : autoColorScheme, scale: scale = prevContext ? prevContext.scale : autoScale, locale: locale = prevContext ? prevLocale : null, breakpoints: breakpoints = prevContext ? prevBreakpoints : $7167f8da3cce35e4$var$DEFAULT_BREAKPOINTS, children: children, isQuiet: isQuiet, isEmphasized: isEmphasized, isDisabled: isDisabled, isRequired: isRequired, isReadOnly: isReadOnly, validationState: validationState, router: router, ...otherProps } = props;
133
163
  // select only the props with values so undefined props don't overwrite prevContext values
134
164
  let currentProps = {
135
165
  version: $7b22e09dddddd7da$exports.version,
@@ -152,7 +182,7 @@ function $7167f8da3cce35e4$var$Provider(props, ref) {
152
182
  // Only wrap in a DOM node if the theme, colorScheme, or scale changed
153
183
  let contents = children;
154
184
  let domProps = (0, $b6ncI$filterDOMProps)(otherProps);
155
- let { styleProps: styleProps } = (0, $b6ncI$useStyleProps)(otherProps, undefined, {
185
+ let { styleProps: styleProps } = (0, $b6ncI$useStyleProps)(otherProps, undefined, {
156
186
  matchedBreakpoints: matchedBreakpoints
157
187
  });
158
188
  if (!prevContext || props.locale || theme !== prevContext.theme || colorScheme !== prevContext.colorScheme || scale !== prevContext.scale || Object.keys(domProps).length > 0 || otherProps.UNSAFE_className || Object.keys(styleProps.style).length > 0) contents = /*#__PURE__*/ (0, $b6ncI$react).createElement($7167f8da3cce35e4$var$ProviderWrapper, {
@@ -163,6 +193,7 @@ function $7167f8da3cce35e4$var$Provider(props, ref) {
163
193
  },
164
194
  ref: ref
165
195
  }, contents);
196
+ if (router) contents = /*#__PURE__*/ (0, $b6ncI$react).createElement((0, $b6ncI$RouterProvider), router, contents);
166
197
  return /*#__PURE__*/ (0, $b6ncI$react).createElement((0, $a8430f637b4ccbce$export$841858b892ce1f4c).Provider, {
167
198
  value: context
168
199
  }, /*#__PURE__*/ (0, $b6ncI$react).createElement((0, $b6ncI$I18nProvider), {
@@ -177,11 +208,11 @@ function $7167f8da3cce35e4$var$Provider(props, ref) {
177
208
  * and can also be used to provide common properties to a group of components.
178
209
  */ let $7167f8da3cce35e4$export$2881499e37b75b9a = /*#__PURE__*/ (0, $b6ncI$react).forwardRef($7167f8da3cce35e4$var$Provider);
179
210
  const $7167f8da3cce35e4$var$ProviderWrapper = /*#__PURE__*/ (0, $b6ncI$react).forwardRef(function ProviderWrapper(props, ref) {
180
- let { children: children , ...otherProps } = props;
181
- let { locale: locale , direction: direction } = (0, $b6ncI$useLocale)();
182
- let { theme: theme , colorScheme: colorScheme , scale: scale } = $7167f8da3cce35e4$export$693cdb10cec23617();
183
- let { modalProviderProps: modalProviderProps } = (0, $b6ncI$useModalProvider)();
184
- let { styleProps: styleProps } = (0, $b6ncI$useStyleProps)(otherProps);
211
+ let { children: children, ...otherProps } = props;
212
+ let { locale: locale, direction: direction } = (0, $b6ncI$useLocale)();
213
+ let { theme: theme, colorScheme: colorScheme, scale: scale } = $7167f8da3cce35e4$export$693cdb10cec23617();
214
+ let { modalProviderProps: modalProviderProps } = (0, $b6ncI$useModalProvider)();
215
+ let { styleProps: styleProps } = (0, $b6ncI$useStyleProps)(otherProps);
185
216
  let domRef = (0, $b6ncI$useDOMRef)(ref);
186
217
  let themeKey = Object.keys(theme[colorScheme])[0];
187
218
  let scaleKey = Object.keys(theme[scale])[0];
package/dist/main.css CHANGED
@@ -1 +1 @@
1
- :root{font-synthesis:weight}.spectrum_b37d53{background-color:var(--spectrum-alias-background-color-default,var(--spectrum-global-color-gray-100));-webkit-tap-highlight-color:#0000}:root{font-synthesis:weight}.spectrum_2a241c{font-family:adobe-clean,Source Sans Pro,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Ubuntu,Trebuchet MS,Lucida Grande,sans-serif}.spectrum_2a241c:lang(ar){font-family:myriad-arabic,adobe-clean,Source Sans Pro,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Ubuntu,Trebuchet MS,Lucida Grande,sans-serif}.spectrum_2a241c:lang(he){font-family:myriad-hebrew,adobe-clean,Source Sans Pro,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Ubuntu,Trebuchet MS,Lucida Grande,sans-serif}.spectrum_2a241c:lang(zh){font-family:adobe-clean-han-traditional,source-han-traditional,MingLiu,Heiti TC Light,sans-serif}.spectrum_2a241c:lang(zh-Hans){font-family:adobe-clean-han-simplified-c,source-han-simplified-c,SimSun,Heiti SC Light,sans-serif}.spectrum_2a241c:lang(zh-Hant){font-family:adobe-clean-han-traditional,source-han-traditional,MingLiu,Microsoft JhengHei UI,Microsoft JhengHei,Heiti TC Light,sans-serif}.spectrum_2a241c:lang(zh-SG),.spectrum_2a241c:lang(zh-CN){font-family:adobe-clean-han-simplified-c,source-han-simplified-c,SimSun,Heiti SC Light,sans-serif}.spectrum_2a241c:lang(ko){font-family:adobe-clean-han-korean,source-han-korean,Malgun Gothic,Apple Gothic,sans-serif}.spectrum_2a241c:lang(ja){font-family:adobe-clean-han-japanese,Hiragino Kaku Gothic ProN,ヒラギノ角ゴ ProN W3,Osaka,YuGothic,Yu Gothic,メイリオ,Meiryo,MS Pゴシック,MS PGothic,sans-serif}.spectrum_2a241c{font-size:var(--spectrum-alias-font-size-default,var(--spectrum-global-dimension-font-size-100));color:var(--spectrum-global-color-gray-800)}.spectrum_2a241c,.spectrum_2a241c.spectrum-Body_2a241c,.spectrum-Body_2a241c{font-size:var(--spectrum-body-4-text-size,var(--spectrum-alias-font-size-default));font-weight:var(--spectrum-body-4-text-font-weight,var(--spectrum-alias-body-text-font-weight));line-height:var(--spectrum-body-4-text-line-height,var(--spectrum-alias-body-text-line-height));font-style:var(--spectrum-body-4-text-font-style,var(--spectrum-global-font-style-regular))}.spectrum-Body--italic_2a241c{font-style:var(--spectrum-body-4-emphasis-text-font-style,var(--spectrum-global-font-style-italic))}
1
+ .JuTe6q_i18nFontFamily{font-synthesis:weight;font-family:adobe-clean,Source Sans Pro,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Ubuntu,Trebuchet MS,Lucida Grande,sans-serif}.JuTe6q_i18nFontFamily:lang(ar){font-family:myriad-arabic,adobe-clean,Source Sans Pro,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Ubuntu,Trebuchet MS,Lucida Grande,sans-serif}.JuTe6q_i18nFontFamily:lang(he){font-family:myriad-hebrew,adobe-clean,Source Sans Pro,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Ubuntu,Trebuchet MS,Lucida Grande,sans-serif}.JuTe6q_i18nFontFamily:lang(zh){font-family:adobe-clean-han-traditional,source-han-traditional,MingLiu,Heiti TC Light,sans-serif}.JuTe6q_i18nFontFamily:lang(zh-Hans){font-family:adobe-clean-han-simplified-c,source-han-simplified-c,SimSun,Heiti SC Light,sans-serif}.JuTe6q_i18nFontFamily:lang(zh-Hant){font-family:adobe-clean-han-traditional,source-han-traditional,MingLiu,Microsoft JhengHei UI,Microsoft JhengHei,Heiti TC Light,sans-serif}.JuTe6q_i18nFontFamily:lang(zh-SG),.JuTe6q_i18nFontFamily:lang(zh-CN){font-family:adobe-clean-han-simplified-c,source-han-simplified-c,SimSun,Heiti SC Light,sans-serif}.JuTe6q_i18nFontFamily:lang(ko){font-family:adobe-clean-han-korean,source-han-korean,Malgun Gothic,Apple Gothic,sans-serif}.JuTe6q_i18nFontFamily:lang(ja){font-family:adobe-clean-han-japanese,Hiragino Kaku Gothic ProN,ヒラギノ角ゴ ProN W3,Osaka,YuGothic,Yu Gothic,メイリオ,Meiryo,MS Pゴシック,MS PGothic,sans-serif}.JuTe6q_spectrum-FocusRing-ring{--spectrum-focus-ring-border-radius:var(--spectrum-textfield-border-radius,var(--spectrum-alias-border-radius-regular));--spectrum-focus-ring-gap:var(--spectrum-alias-input-focusring-gap);--spectrum-focus-ring-size:var(--spectrum-alias-input-focusring-size);--spectrum-focus-ring-border-size:0px;--spectrum-focus-ring-color:var(--spectrum-high-contrast-focus-ring-color,var(--spectrum-alias-focus-ring-color,var(--spectrum-alias-focus-color)))}.JuTe6q_spectrum-FocusRing-ring:after{border-radius:calc(var(--spectrum-focus-ring-border-radius) + var(--spectrum-focus-ring-gap));content:"";margin:calc(-1*var(--spectrum-focus-ring-border-size));pointer-events:none;transition:box-shadow var(--spectrum-global-animation-duration-100,.13s)ease-out,margin var(--spectrum-global-animation-duration-100,.13s)ease-out;display:block;position:absolute;top:0;bottom:0;left:0;right:0}.JuTe6q_spectrum-FocusRing.JuTe6q_focus-ring:after{margin:calc(var(--spectrum-focus-ring-gap)*-1 - var(--spectrum-focus-ring-border-size));box-shadow:0 0 0 var(--spectrum-focus-ring-size)var(--spectrum-focus-ring-color)}.JuTe6q_spectrum-FocusRing--quiet:after{border-radius:0}.JuTe6q_spectrum-FocusRing--quiet.JuTe6q_focus-ring:after{margin:0 0 calc(var(--spectrum-focus-ring-gap)*-1 - var(--spectrum-focus-ring-border-size))0;box-shadow:0 var(--spectrum-focus-ring-size)0 var(--spectrum-focus-ring-color)}.JuTe6q_spectrum{background-color:var(--spectrum-alias-background-color-default,var(--spectrum-global-color-gray-100));-webkit-tap-highlight-color:#0000}._5QszkG_i18nFontFamily{font-synthesis:weight;font-family:adobe-clean,Source Sans Pro,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Ubuntu,Trebuchet MS,Lucida Grande,sans-serif}._5QszkG_i18nFontFamily:lang(ar){font-family:myriad-arabic,adobe-clean,Source Sans Pro,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Ubuntu,Trebuchet MS,Lucida Grande,sans-serif}._5QszkG_i18nFontFamily:lang(he){font-family:myriad-hebrew,adobe-clean,Source Sans Pro,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Ubuntu,Trebuchet MS,Lucida Grande,sans-serif}._5QszkG_i18nFontFamily:lang(zh){font-family:adobe-clean-han-traditional,source-han-traditional,MingLiu,Heiti TC Light,sans-serif}._5QszkG_i18nFontFamily:lang(zh-Hans){font-family:adobe-clean-han-simplified-c,source-han-simplified-c,SimSun,Heiti SC Light,sans-serif}._5QszkG_i18nFontFamily:lang(zh-Hant){font-family:adobe-clean-han-traditional,source-han-traditional,MingLiu,Microsoft JhengHei UI,Microsoft JhengHei,Heiti TC Light,sans-serif}._5QszkG_i18nFontFamily:lang(zh-SG),._5QszkG_i18nFontFamily:lang(zh-CN){font-family:adobe-clean-han-simplified-c,source-han-simplified-c,SimSun,Heiti SC Light,sans-serif}._5QszkG_i18nFontFamily:lang(ko){font-family:adobe-clean-han-korean,source-han-korean,Malgun Gothic,Apple Gothic,sans-serif}._5QszkG_i18nFontFamily:lang(ja){font-family:adobe-clean-han-japanese,Hiragino Kaku Gothic ProN,ヒラギノ角ゴ ProN W3,Osaka,YuGothic,Yu Gothic,メイリオ,Meiryo,MS Pゴシック,MS PGothic,sans-serif}._5QszkG_spectrum-FocusRing-ring{--spectrum-focus-ring-border-radius:var(--spectrum-textfield-border-radius,var(--spectrum-alias-border-radius-regular));--spectrum-focus-ring-gap:var(--spectrum-alias-input-focusring-gap);--spectrum-focus-ring-size:var(--spectrum-alias-input-focusring-size);--spectrum-focus-ring-border-size:0px;--spectrum-focus-ring-color:var(--spectrum-high-contrast-focus-ring-color,var(--spectrum-alias-focus-ring-color,var(--spectrum-alias-focus-color)))}._5QszkG_spectrum-FocusRing-ring:after{border-radius:calc(var(--spectrum-focus-ring-border-radius) + var(--spectrum-focus-ring-gap));content:"";margin:calc(-1*var(--spectrum-focus-ring-border-size));pointer-events:none;transition:box-shadow var(--spectrum-global-animation-duration-100,.13s)ease-out,margin var(--spectrum-global-animation-duration-100,.13s)ease-out;display:block;position:absolute;top:0;bottom:0;left:0;right:0}._5QszkG_spectrum-FocusRing._5QszkG_focus-ring:after{margin:calc(var(--spectrum-focus-ring-gap)*-1 - var(--spectrum-focus-ring-border-size));box-shadow:0 0 0 var(--spectrum-focus-ring-size)var(--spectrum-focus-ring-color)}._5QszkG_spectrum-FocusRing--quiet:after{border-radius:0}._5QszkG_spectrum-FocusRing--quiet._5QszkG_focus-ring:after{margin:0 0 calc(var(--spectrum-focus-ring-gap)*-1 - var(--spectrum-focus-ring-border-size))0;box-shadow:0 var(--spectrum-focus-ring-size)0 var(--spectrum-focus-ring-color)}._5QszkG_spectrum{font-size:var(--spectrum-alias-font-size-default,var(--spectrum-global-dimension-font-size-100));color:var(--spectrum-body-text-color,var(--spectrum-alias-text-color))}._5QszkG_spectrum,._5QszkG_spectrum-Body,._5QszkG_spectrum,._5QszkG_spectrum-Body{font-size:var(--spectrum-body-4-text-size,var(--spectrum-alias-font-size-default));font-weight:var(--spectrum-body-4-text-font-weight,var(--spectrum-alias-body-text-font-weight));line-height:var(--spectrum-body-4-text-line-height,var(--spectrum-alias-body-text-line-height));font-style:var(--spectrum-body-4-text-font-style,var(--spectrum-global-font-style-regular))}._5QszkG_spectrum-Body--italic{font-style:var(--spectrum-body-4-emphasis-text-font-style,var(--spectrum-global-font-style-italic))}
package/dist/main.js CHANGED
@@ -60,22 +60,52 @@ $a5b4f4e252b5a021$export$841858b892ce1f4c.displayName = "ProviderContext";
60
60
 
61
61
  var $22365f0f5f2dcdd5$exports = {};
62
62
 
63
+ $parcel$export($22365f0f5f2dcdd5$exports, "focus-ring", () => $22365f0f5f2dcdd5$export$f39a09f249340e2a, (v) => $22365f0f5f2dcdd5$export$f39a09f249340e2a = v);
64
+ $parcel$export($22365f0f5f2dcdd5$exports, "i18nFontFamily", () => $22365f0f5f2dcdd5$export$8c4ee2c50c22c514, (v) => $22365f0f5f2dcdd5$export$8c4ee2c50c22c514 = v);
63
65
  $parcel$export($22365f0f5f2dcdd5$exports, "spectrum", () => $22365f0f5f2dcdd5$export$3311ab3a441bc141, (v) => $22365f0f5f2dcdd5$export$3311ab3a441bc141 = v);
66
+ $parcel$export($22365f0f5f2dcdd5$exports, "spectrum-FocusRing-ring", () => $22365f0f5f2dcdd5$export$4109102f950813a6, (v) => $22365f0f5f2dcdd5$export$4109102f950813a6 = v);
67
+ $parcel$export($22365f0f5f2dcdd5$exports, "spectrum-FocusRing", () => $22365f0f5f2dcdd5$export$24c7f46a6e3605dd, (v) => $22365f0f5f2dcdd5$export$24c7f46a6e3605dd = v);
68
+ $parcel$export($22365f0f5f2dcdd5$exports, "spectrum-FocusRing--quiet", () => $22365f0f5f2dcdd5$export$2927016961429360, (v) => $22365f0f5f2dcdd5$export$2927016961429360 = v);
69
+ var $22365f0f5f2dcdd5$export$f39a09f249340e2a;
70
+ var $22365f0f5f2dcdd5$export$8c4ee2c50c22c514;
64
71
  var $22365f0f5f2dcdd5$export$3311ab3a441bc141;
65
- $22365f0f5f2dcdd5$export$3311ab3a441bc141 = "spectrum_b37d53";
72
+ var $22365f0f5f2dcdd5$export$4109102f950813a6;
73
+ var $22365f0f5f2dcdd5$export$24c7f46a6e3605dd;
74
+ var $22365f0f5f2dcdd5$export$2927016961429360;
75
+ $22365f0f5f2dcdd5$export$f39a09f249340e2a = `JuTe6q_focus-ring`;
76
+ $22365f0f5f2dcdd5$export$8c4ee2c50c22c514 = `JuTe6q_i18nFontFamily`;
77
+ $22365f0f5f2dcdd5$export$3311ab3a441bc141 = `JuTe6q_spectrum`;
78
+ $22365f0f5f2dcdd5$export$4109102f950813a6 = `JuTe6q_spectrum-FocusRing-ring`;
79
+ $22365f0f5f2dcdd5$export$24c7f46a6e3605dd = `JuTe6q_spectrum-FocusRing ${$22365f0f5f2dcdd5$export$4109102f950813a6}`;
80
+ $22365f0f5f2dcdd5$export$2927016961429360 = `JuTe6q_spectrum-FocusRing--quiet`;
66
81
 
67
82
 
68
83
  var $19fbfce217006b12$exports = {};
69
84
 
85
+ $parcel$export($19fbfce217006b12$exports, "focus-ring", () => $19fbfce217006b12$export$f39a09f249340e2a, (v) => $19fbfce217006b12$export$f39a09f249340e2a = v);
86
+ $parcel$export($19fbfce217006b12$exports, "i18nFontFamily", () => $19fbfce217006b12$export$8c4ee2c50c22c514, (v) => $19fbfce217006b12$export$8c4ee2c50c22c514 = v);
70
87
  $parcel$export($19fbfce217006b12$exports, "spectrum", () => $19fbfce217006b12$export$3311ab3a441bc141, (v) => $19fbfce217006b12$export$3311ab3a441bc141 = v);
71
88
  $parcel$export($19fbfce217006b12$exports, "spectrum-Body", () => $19fbfce217006b12$export$a30bf7810c8453d1, (v) => $19fbfce217006b12$export$a30bf7810c8453d1 = v);
72
89
  $parcel$export($19fbfce217006b12$exports, "spectrum-Body--italic", () => $19fbfce217006b12$export$7b2dac1166f6ec4c, (v) => $19fbfce217006b12$export$7b2dac1166f6ec4c = v);
90
+ $parcel$export($19fbfce217006b12$exports, "spectrum-FocusRing-ring", () => $19fbfce217006b12$export$4109102f950813a6, (v) => $19fbfce217006b12$export$4109102f950813a6 = v);
91
+ $parcel$export($19fbfce217006b12$exports, "spectrum-FocusRing", () => $19fbfce217006b12$export$24c7f46a6e3605dd, (v) => $19fbfce217006b12$export$24c7f46a6e3605dd = v);
92
+ $parcel$export($19fbfce217006b12$exports, "spectrum-FocusRing--quiet", () => $19fbfce217006b12$export$2927016961429360, (v) => $19fbfce217006b12$export$2927016961429360 = v);
93
+ var $19fbfce217006b12$export$f39a09f249340e2a;
94
+ var $19fbfce217006b12$export$8c4ee2c50c22c514;
73
95
  var $19fbfce217006b12$export$3311ab3a441bc141;
74
96
  var $19fbfce217006b12$export$a30bf7810c8453d1;
75
97
  var $19fbfce217006b12$export$7b2dac1166f6ec4c;
76
- $19fbfce217006b12$export$3311ab3a441bc141 = "spectrum_2a241c";
77
- $19fbfce217006b12$export$a30bf7810c8453d1 = "spectrum-Body_2a241c";
78
- $19fbfce217006b12$export$7b2dac1166f6ec4c = "spectrum-Body--italic_2a241c";
98
+ var $19fbfce217006b12$export$4109102f950813a6;
99
+ var $19fbfce217006b12$export$24c7f46a6e3605dd;
100
+ var $19fbfce217006b12$export$2927016961429360;
101
+ $19fbfce217006b12$export$f39a09f249340e2a = `_5QszkG_focus-ring`;
102
+ $19fbfce217006b12$export$8c4ee2c50c22c514 = `_5QszkG_i18nFontFamily`;
103
+ $19fbfce217006b12$export$3311ab3a441bc141 = `_5QszkG_spectrum ${$19fbfce217006b12$export$8c4ee2c50c22c514}`;
104
+ $19fbfce217006b12$export$a30bf7810c8453d1 = `_5QszkG_spectrum-Body`;
105
+ $19fbfce217006b12$export$7b2dac1166f6ec4c = `_5QszkG_spectrum-Body--italic`;
106
+ $19fbfce217006b12$export$4109102f950813a6 = `_5QszkG_spectrum-FocusRing-ring`;
107
+ $19fbfce217006b12$export$24c7f46a6e3605dd = `_5QszkG_spectrum-FocusRing ${$19fbfce217006b12$export$4109102f950813a6}`;
108
+ $19fbfce217006b12$export$2927016961429360 = `_5QszkG_spectrum-FocusRing--quiet`;
79
109
 
80
110
 
81
111
  /*
@@ -110,7 +140,7 @@ function $a6e2b5f4621e4690$export$a8d2043b2d807f4d(theme) {
110
140
 
111
141
 
112
142
  var $4db360e38265184f$exports = {};
113
- $4db360e38265184f$exports = JSON.parse('{"name":"@react-spectrum/provider","version":"3.8.1","description":"Spectrum UI components in React","license":"Apache-2.0","main":"dist/main.js","module":"dist/module.js","exports":{"types":"./dist/types.d.ts","import":"./dist/import.mjs","require":"./dist/main.js"},"types":"dist/types.d.ts","source":"src/index.ts","files":["dist","src"],"sideEffects":["*.css"],"targets":{"main":{"includeNodeModules":["@adobe/spectrum-css-temp"]},"module":{"includeNodeModules":["@adobe/spectrum-css-temp"]}},"repository":{"type":"git","url":"https://github.com/adobe/react-spectrum"},"dependencies":{"@react-aria/i18n":"^3.8.1","@react-aria/overlays":"^3.16.0","@react-aria/utils":"^3.19.0","@react-spectrum/utils":"^3.10.1","@react-types/provider":"^3.6.3","@react-types/shared":"^3.19.0","@swc/helpers":"^0.5.0","clsx":"^1.1.1"},"devDependencies":{"@adobe/spectrum-css-temp":"3.0.0-alpha.1"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0-rc.1 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0-rc.1 || ^18.0.0"},"publishConfig":{"access":"public"}}');
143
+ $4db360e38265184f$exports = JSON.parse('{"name":"@react-spectrum/provider","version":"3.8.2","description":"Spectrum UI components in React","license":"Apache-2.0","main":"dist/main.js","module":"dist/module.js","exports":{"types":"./dist/types.d.ts","import":"./dist/import.mjs","require":"./dist/main.js"},"types":"dist/types.d.ts","source":"src/index.ts","files":["dist","src"],"sideEffects":["*.css"],"targets":{"main":{"includeNodeModules":["@adobe/spectrum-css-temp"]},"module":{"includeNodeModules":["@adobe/spectrum-css-temp"]}},"repository":{"type":"git","url":"https://github.com/adobe/react-spectrum"},"dependencies":{"@react-aria/i18n":"^3.8.2","@react-aria/overlays":"^3.17.0","@react-aria/utils":"^3.20.0","@react-spectrum/utils":"^3.10.2","@react-types/provider":"^3.6.4","@react-types/shared":"^3.20.0","@swc/helpers":"^0.5.0","clsx":"^1.1.1"},"devDependencies":{"@adobe/spectrum-css-temp":"3.0.0-alpha.1"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0-rc.1 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0-rc.1 || ^18.0.0"},"publishConfig":{"access":"public"}}');
114
144
 
115
145
 
116
146
  const $96cabdf5b0aed55b$var$DEFAULT_BREAKPOINTS = {
@@ -124,16 +154,16 @@ function $96cabdf5b0aed55b$var$Provider(props, ref) {
124
154
  let prevContext = $96cabdf5b0aed55b$export$693cdb10cec23617();
125
155
  let prevColorScheme = prevContext && prevContext.colorScheme;
126
156
  let prevBreakpoints = prevContext && prevContext.breakpoints;
127
- let { theme: theme = prevContext && prevContext.theme , defaultColorScheme: defaultColorScheme } = props;
157
+ let { theme: theme = prevContext && prevContext.theme, defaultColorScheme: defaultColorScheme } = props;
128
158
  if (!theme) throw new Error("theme not found, the parent provider must have a theme provided");
129
159
  // Hooks must always be called.
130
160
  let autoColorScheme = (0, $a6e2b5f4621e4690$export$6343629ee1b29116)(theme, defaultColorScheme);
131
161
  let autoScale = (0, $a6e2b5f4621e4690$export$a8d2043b2d807f4d)(theme);
132
- let { locale: prevLocale } = (0, $kmRpa$reactariai18n.useLocale)();
162
+ let { locale: prevLocale } = (0, $kmRpa$reactariai18n.useLocale)();
133
163
  // if the new theme doesn't support the prevColorScheme, we must resort to the auto
134
164
  let usePrevColorScheme = !!theme[prevColorScheme];
135
165
  // importance of color scheme props > parent > auto:(OS > default > omitted)
136
- let { colorScheme: colorScheme = usePrevColorScheme ? prevColorScheme : autoColorScheme , scale: scale = prevContext ? prevContext.scale : autoScale , locale: locale = prevContext ? prevLocale : null , breakpoints: breakpoints = prevContext ? prevBreakpoints : $96cabdf5b0aed55b$var$DEFAULT_BREAKPOINTS , children: children , isQuiet: isQuiet , isEmphasized: isEmphasized , isDisabled: isDisabled , isRequired: isRequired , isReadOnly: isReadOnly , validationState: validationState , ...otherProps } = props;
166
+ let { colorScheme: colorScheme = usePrevColorScheme ? prevColorScheme : autoColorScheme, scale: scale = prevContext ? prevContext.scale : autoScale, locale: locale = prevContext ? prevLocale : null, breakpoints: breakpoints = prevContext ? prevBreakpoints : $96cabdf5b0aed55b$var$DEFAULT_BREAKPOINTS, children: children, isQuiet: isQuiet, isEmphasized: isEmphasized, isDisabled: isDisabled, isRequired: isRequired, isReadOnly: isReadOnly, validationState: validationState, router: router, ...otherProps } = props;
137
167
  // select only the props with values so undefined props don't overwrite prevContext values
138
168
  let currentProps = {
139
169
  version: $4db360e38265184f$exports.version,
@@ -156,7 +186,7 @@ function $96cabdf5b0aed55b$var$Provider(props, ref) {
156
186
  // Only wrap in a DOM node if the theme, colorScheme, or scale changed
157
187
  let contents = children;
158
188
  let domProps = (0, $kmRpa$reactariautils.filterDOMProps)(otherProps);
159
- let { styleProps: styleProps } = (0, $kmRpa$reactspectrumutils.useStyleProps)(otherProps, undefined, {
189
+ let { styleProps: styleProps } = (0, $kmRpa$reactspectrumutils.useStyleProps)(otherProps, undefined, {
160
190
  matchedBreakpoints: matchedBreakpoints
161
191
  });
162
192
  if (!prevContext || props.locale || theme !== prevContext.theme || colorScheme !== prevContext.colorScheme || scale !== prevContext.scale || Object.keys(domProps).length > 0 || otherProps.UNSAFE_className || Object.keys(styleProps.style).length > 0) contents = /*#__PURE__*/ (0, ($parcel$interopDefault($kmRpa$react))).createElement($96cabdf5b0aed55b$var$ProviderWrapper, {
@@ -167,6 +197,7 @@ function $96cabdf5b0aed55b$var$Provider(props, ref) {
167
197
  },
168
198
  ref: ref
169
199
  }, contents);
200
+ if (router) contents = /*#__PURE__*/ (0, ($parcel$interopDefault($kmRpa$react))).createElement((0, $kmRpa$reactariautils.RouterProvider), router, contents);
170
201
  return /*#__PURE__*/ (0, ($parcel$interopDefault($kmRpa$react))).createElement((0, $a5b4f4e252b5a021$export$841858b892ce1f4c).Provider, {
171
202
  value: context
172
203
  }, /*#__PURE__*/ (0, ($parcel$interopDefault($kmRpa$react))).createElement((0, $kmRpa$reactariai18n.I18nProvider), {
@@ -181,11 +212,11 @@ function $96cabdf5b0aed55b$var$Provider(props, ref) {
181
212
  * and can also be used to provide common properties to a group of components.
182
213
  */ let $96cabdf5b0aed55b$export$2881499e37b75b9a = /*#__PURE__*/ (0, ($parcel$interopDefault($kmRpa$react))).forwardRef($96cabdf5b0aed55b$var$Provider);
183
214
  const $96cabdf5b0aed55b$var$ProviderWrapper = /*#__PURE__*/ (0, ($parcel$interopDefault($kmRpa$react))).forwardRef(function ProviderWrapper(props, ref) {
184
- let { children: children , ...otherProps } = props;
185
- let { locale: locale , direction: direction } = (0, $kmRpa$reactariai18n.useLocale)();
186
- let { theme: theme , colorScheme: colorScheme , scale: scale } = $96cabdf5b0aed55b$export$693cdb10cec23617();
187
- let { modalProviderProps: modalProviderProps } = (0, $kmRpa$reactariaoverlays.useModalProvider)();
188
- let { styleProps: styleProps } = (0, $kmRpa$reactspectrumutils.useStyleProps)(otherProps);
215
+ let { children: children, ...otherProps } = props;
216
+ let { locale: locale, direction: direction } = (0, $kmRpa$reactariai18n.useLocale)();
217
+ let { theme: theme, colorScheme: colorScheme, scale: scale } = $96cabdf5b0aed55b$export$693cdb10cec23617();
218
+ let { modalProviderProps: modalProviderProps } = (0, $kmRpa$reactariaoverlays.useModalProvider)();
219
+ let { styleProps: styleProps } = (0, $kmRpa$reactspectrumutils.useStyleProps)(otherProps);
189
220
  let domRef = (0, $kmRpa$reactspectrumutils.useDOMRef)(ref);
190
221
  let themeKey = Object.keys(theme[colorScheme])[0];
191
222
  let scaleKey = Object.keys(theme[scale])[0];
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C;ACZ1C;;;;;;;;;;CAUC;;ACVD;;;;;;;;;;CAUC;AAOM,MAAM,4CAAU,CAAA,GAAA,sCAAI,EAAE,cAAsC;AACnE,0CAAQ,cAAc;;;;;;;;;;AClBtB,IAAA;AAAA,4CAA6B;;;;;;;;ACA7B,IAAA;AACA,IAAA;AACA,IAAA;AAFA,4CAA6B;AAC7B,4CAAkC;AAClC,4CAA0C;;;ACF1C;;;;;;;;;;CAUC;AAKM,SAAS,0CAAe,KAAY,EAAE,kBAA+B;IAC1E,IAAI,cAAc,CAAA,GAAA,uCAAY,EAAE;IACh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I,aAAa,OAAO,SAAS;YAC/B,IAAI,aAAa,OAAO,QAAQ,cAAc,QAAQ;YACtD,IAAI,MAAM,cAAc,WAAW,aAAa;YAChD,IAAI,OAAO,QAAQ,aAAa,CAAC,UAAU,SAAS;gBAClD,QAAQ,KAAK,CAAC,sCAAsC,EAAE,UAAU,QAAQ,EAAE,IAAI,CAAC,CAAC;gBAChF,UAAU,UAAU;YACtB;QACF;IACF,GAAG;QAAC;QAAW;QAAQ;KAAU;IAGjC,qBACE,0DAAC;QACE,GAAG,CAAA,GAAA,oCAAa,EAAE,WAAW;QAC7B,GAAG,UAAU;QACb,GAAG,kBAAkB;QACtB,WAAW;QACX,OAAO;QACP,MAAM;QACN,KAAK;QACL,KAAK;OACJ;AAGP;AAMO,SAAS;IACd,OAAO,CAAA,GAAA,uBAAS,EAAE,CAAA,GAAA,yCAAM;AAC1B;AAEO,SAAS,0CAAoB,KAAQ;IAC1C,IAAI,UAAU;IACd,IAAI,CAAC,SACH,OAAO;IAET,OAAO,OAAO,OAAO,CAAC,GAAG;QACvB,SAAS,QAAQ;QACjB,cAAc,QAAQ;QACtB,YAAY,QAAQ;QACpB,YAAY,QAAQ;QACpB,YAAY,QAAQ;QACpB,iBAAiB,QAAQ;IAC3B,GAAG;AACL;","sources":["packages/@react-spectrum/provider/src/index.ts","packages/@react-spectrum/provider/src/Provider.tsx","packages/@react-spectrum/provider/src/context.ts","packages/@adobe/spectrum-css-temp/components/page/vars.css","packages/@adobe/spectrum-css-temp/components/typography/index.css","packages/@react-spectrum/provider/src/mediaQueries.ts","packages/@react-spectrum/provider/package.json"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/// <reference types=\"css-module-types\" />\n\nexport {Provider, useProvider, useProviderProps} from './Provider';\nexport type {ProviderContext} from '@react-types/provider';\nexport type {ProviderProps} from '@react-types/provider';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n BreakpointProvider,\n shouldKeepSpectrumClassNames,\n useDOMRef,\n useMatchedBreakpoints,\n useStyleProps\n} from '@react-spectrum/utils';\nimport clsx from 'clsx';\nimport {Context} from './context';\nimport {DOMRef} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {I18nProvider, useLocale} from '@react-aria/i18n';\nimport {ModalProvider, useModalProvider} from '@react-aria/overlays';\nimport {ProviderContext, ProviderProps} from '@react-types/provider';\nimport React, {useContext, useEffect, useRef} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/page/vars.css';\nimport typographyStyles from '@adobe/spectrum-css-temp/components/typography/index.css';\nimport {useColorScheme, useScale} from './mediaQueries';\n// @ts-ignore\nimport {version} from '../package.json';\n\nconst DEFAULT_BREAKPOINTS = {S: 640, M: 768, L: 1024, XL: 1280, XXL: 1536};\n\nfunction Provider(props: ProviderProps, ref: DOMRef<HTMLDivElement>) {\n let prevContext = useProvider();\n let prevColorScheme = prevContext && prevContext.colorScheme;\n let prevBreakpoints = prevContext && prevContext.breakpoints;\n let {\n theme = prevContext && prevContext.theme,\n defaultColorScheme\n } = props;\n if (!theme) {\n throw new Error('theme not found, the parent provider must have a theme provided');\n }\n // Hooks must always be called.\n let autoColorScheme = useColorScheme(theme, defaultColorScheme);\n let autoScale = useScale(theme);\n let {locale: prevLocale} = useLocale();\n // if the new theme doesn't support the prevColorScheme, we must resort to the auto\n let usePrevColorScheme = !!theme[prevColorScheme];\n\n // importance of color scheme props > parent > auto:(OS > default > omitted)\n let {\n colorScheme = usePrevColorScheme ? prevColorScheme : autoColorScheme,\n scale = prevContext ? prevContext.scale : autoScale,\n locale = prevContext ? prevLocale : null,\n breakpoints = prevContext ? prevBreakpoints : DEFAULT_BREAKPOINTS,\n children,\n isQuiet,\n isEmphasized,\n isDisabled,\n isRequired,\n isReadOnly,\n validationState,\n ...otherProps\n } = props;\n\n // select only the props with values so undefined props don't overwrite prevContext values\n let currentProps = {\n version,\n theme,\n breakpoints,\n colorScheme,\n scale,\n isQuiet,\n isEmphasized,\n isDisabled,\n isRequired,\n isReadOnly,\n validationState\n };\n\n let matchedBreakpoints = useMatchedBreakpoints(breakpoints);\n let filteredProps = {};\n Object.entries(currentProps).forEach(([key, value]) => value !== undefined && (filteredProps[key] = value));\n\n // Merge options with parent provider\n let context = Object.assign({}, prevContext, filteredProps);\n\n // Only wrap in a DOM node if the theme, colorScheme, or scale changed\n let contents = children;\n let domProps = filterDOMProps(otherProps);\n let {styleProps} = useStyleProps(otherProps, undefined, {matchedBreakpoints});\n if (!prevContext || props.locale || theme !== prevContext.theme || colorScheme !== prevContext.colorScheme || scale !== prevContext.scale || Object.keys(domProps).length > 0 || otherProps.UNSAFE_className || Object.keys(styleProps.style).length > 0) {\n contents = (\n <ProviderWrapper {...props} UNSAFE_style={{isolation: !prevContext ? 'isolate' : undefined, ...styleProps.style}} ref={ref}>\n {contents}\n </ProviderWrapper>\n );\n }\n\n return (\n <Context.Provider value={context}>\n <I18nProvider locale={locale}>\n <BreakpointProvider matchedBreakpoints={matchedBreakpoints}>\n <ModalProvider>\n {contents}\n </ModalProvider>\n </BreakpointProvider>\n </I18nProvider>\n </Context.Provider>\n );\n}\n\n/**\n * Provider is the container for all React Spectrum applications.\n * It defines the theme, locale, and other application level settings,\n * and can also be used to provide common properties to a group of components.\n */\nlet _Provider = React.forwardRef(Provider);\nexport {_Provider as Provider};\n\nconst ProviderWrapper = React.forwardRef(function ProviderWrapper(props: ProviderProps, ref: DOMRef<HTMLDivElement>) {\n let {\n children,\n ...otherProps\n } = props;\n let {locale, direction} = useLocale();\n let {theme, colorScheme, scale} = useProvider();\n let {modalProviderProps} = useModalProvider();\n let {styleProps} = useStyleProps(otherProps);\n let domRef = useDOMRef(ref);\n\n let themeKey = Object.keys(theme[colorScheme])[0];\n let scaleKey = Object.keys(theme[scale])[0];\n\n let className = clsx(\n styleProps.className,\n styles['spectrum'],\n typographyStyles['spectrum'],\n Object.values(theme[colorScheme]),\n Object.values(theme[scale]),\n theme.global ? Object.values(theme.global) : null,\n {\n 'react-spectrum-provider': shouldKeepSpectrumClassNames,\n spectrum: shouldKeepSpectrumClassNames,\n [themeKey]: shouldKeepSpectrumClassNames,\n [scaleKey]: shouldKeepSpectrumClassNames\n }\n );\n\n let style = {\n ...styleProps.style,\n // This ensures that browser native UI like scrollbars are rendered in the right color scheme.\n // See https://web.dev/color-scheme/.\n colorScheme: props.colorScheme ?? colorScheme ?? Object.keys(theme).filter(k => k === 'light' || k === 'dark').join(' ')\n };\n\n let hasWarned = useRef(false);\n useEffect(() => {\n if (direction && domRef.current) {\n let closestDir = domRef.current.parentElement.closest('[dir]');\n let dir = closestDir && closestDir.getAttribute('dir');\n if (dir && dir !== direction && !hasWarned.current) {\n console.warn(`Language directions cannot be nested. ${direction} inside ${dir}.`);\n hasWarned.current = true;\n }\n }\n }, [direction, domRef, hasWarned]);\n\n\n return (\n <div\n {...filterDOMProps(otherProps)}\n {...styleProps}\n {...modalProviderProps}\n className={className}\n style={style}\n lang={locale}\n dir={direction}\n ref={domRef}>\n {children}\n </div>\n );\n});\n\n/**\n * Returns the various settings and styles applied by the nearest parent Provider.\n * Properties explicitly set by the nearest parent Provider override those provided by preceeding Providers.\n */\nexport function useProvider(): ProviderContext {\n return useContext(Context);\n}\n\nexport function useProviderProps<T>(props: T) : T {\n let context = useProvider();\n if (!context) {\n return props;\n }\n return Object.assign({}, {\n isQuiet: context.isQuiet,\n isEmphasized: context.isEmphasized,\n isDisabled: context.isDisabled,\n isRequired: context.isRequired,\n isReadOnly: context.isReadOnly,\n validationState: context.validationState\n }, props);\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ProviderContext} from '@react-types/provider';\nimport React from 'react';\n\n// Context is placed in a separate file to avoid fast refresh issue where the old provider context values\n// are immediately replaced with the null default. Stopgap solution until we fix this in parcel.\nexport const Context = React.createContext<ProviderContext | null>(null);\nContext.displayName = 'ProviderContext';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n","/*\nCopyright 2019 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\n@import '../commons/index.css';\n@import 'font.css';\n\n/*@mixin typography .spectrum-Body1 {}\n@mixin typography .spectrum-Body2 {}\n@mixin typography .spectrum-Body3 {}\n@mixin typography .spectrum-Body4 {}\n@mixin typography .spectrum-Body5 {}\n@mixin typography .spectrum-Heading1 {}\n@mixin typography .spectrum-Heading2 {}\n@mixin typography .spectrum-Heading3 {}\n@mixin typography .spectrum-Heading4 {}\n@mixin typography .spectrum-Heading5 {}\n@mixin typography .spectrum-Heading6 {}\n@mixin typography .spectrum-Subheading {}\n@mixin typography .spectrum-Detail {}\n@mixin typography .spectrum-Heading1--quiet, heading-quiet-1 {}\n@mixin typography .spectrum-Heading2--quiet, heading-quiet-2 {}\n@mixin typography .spectrum-Heading1--strong, heading-strong-1 {}\n@mixin typography .spectrum-Heading2--strong, heading-strong-2 {}\n@mixin typography .spectrum-Heading1--display, display-1 {}\n@mixin typography .spectrum-Heading2--display, display-2 {}\n@mixin typography .spectrum-Heading1--display.spectrum-Heading1--strong, display-strong-1 {}\n@mixin typography .spectrum-Heading2--display.spectrum-Heading2--strong, display-strong-2 {}\n@mixin typography .spectrum-Heading1--display.spectrum-Heading1--quiet, display-quiet-1 {}\n@mixin typography .spectrum-Heading2--display.spectrum-Heading2--quiet, display-quiet-2 {}\n\n.spectrum-Typography {\n @mixin typographyMargins .spectrum-Body1 {}\n @mixin typographyMargins .spectrum-Body2 {}\n @mixin typographyMargins .spectrum-Body3 {}\n @mixin typographyMargins .spectrum-Body4 {}\n @mixin typographyMargins .spectrum-Body5 {}\n @mixin typographyMargins .spectrum-Heading1 {}\n @mixin typographyMargins .spectrum-Heading2 {}\n @mixin typographyMargins .spectrum-Heading3 {}\n @mixin typographyMargins .spectrum-Heading4 {}\n @mixin typographyMargins .spectrum-Heading5 {}\n @mixin typographyMargins .spectrum-Heading6 {}\n @mixin typographyMargins .spectrum-Subheading {}\n @mixin typographyMargins .spectrum-Detail {}\n @mixin typographyMargins .spectrum-Heading1--quiet, heading-quiet-1 {}\n @mixin typographyMargins .spectrum-Heading2--quiet, heading-quiet-2 {}\n @mixin typographyMargins .spectrum-Heading1--strong, heading-strong-1 {}\n @mixin typographyMargins .spectrum-Heading2--strong, heading-strong-2 {}\n @mixin typographyMargins .spectrum-Heading1--display, display-1 {}\n @mixin typographyMargins .spectrum-Heading2--display, display-2 {}\n @mixin typographyMargins .spectrum-Heading1--display.spectrum-Heading1--strong, display-strong-1 {}\n @mixin typographyMargins .spectrum-Heading2--display.spectrum-Heading2--strong, display-strong-2 {}\n @mixin typographyMargins .spectrum-Heading1--display.spectrum-Heading1--quiet, display-quiet-1 {}\n @mixin typographyMargins .spectrum-Heading2--display.spectrum-Heading2--quiet, display-quiet-2 {}\n}\n\n.spectrum-Article {\n font-family: var(--spectrum-body-article-1-text-font-family);\n @mixin typography .spectrum-Body1, body-article-1 {}\n @mixin typography .spectrum-Body2, body-article-2 {}\n @mixin typography .spectrum-Body3, body-article-3 {}\n @mixin typography .spectrum-Body4, body-article-4 {}\n @mixin typography .spectrum-Body5, body-article-5 {}\n @mixin typography .spectrum-Heading1, heading-article-1 {}\n @mixin typography .spectrum-Heading2, heading-article-2 {}\n @mixin typography .spectrum-Heading3, heading-article-3 {}\n @mixin typography .spectrum-Heading4, heading-article-4 {}\n @mixin typography .spectrum-Heading5, heading-article-5 {}\n @mixin typography .spectrum-Heading6, heading-article-6 {}\n @mixin typography .spectrum-Subheading, subheading-article {}\n @mixin typography .spectrum-Detail, detail-article {}\n @mixin typography .spectrum-Heading1--quiet, heading-quiet-article-1 {}\n @mixin typography .spectrum-Heading2--quiet, heading-quiet-article-2 {}\n @mixin typography .spectrum-Heading1--display, display-article-1 {}\n @mixin typography .spectrum-Heading2--display, display-article-2 {}\n @mixin typography .spectrum-Heading1--display.spectrum-Heading1--quiet, display-quiet-article-1 {}\n @mixin typography .spectrum-Heading2--display.spectrum-Heading2--quiet, display-quiet-article-2 {}\n}\n.spectrum {\n &:lang(ja),\n &:lang(ko),\n &:lang(zh) {\n @mixin typography .spectrum-Body1, body-han-1 {}\n @mixin typography .spectrum-Body2, body-han-2 {}\n @mixin typography .spectrum-Body3, body-han-3 {}\n @mixin typography .spectrum-Body4, body-han-4 {}\n @mixin typography .spectrum-Body5, body-han-5 {}\n @mixin typography .spectrum-Heading1, heading-han-1 {}\n @mixin typography .spectrum-Heading2, heading-han-2 {}\n @mixin typography .spectrum-Heading3, heading-han-3 {}\n @mixin typography .spectrum-Heading4, heading-han-4 {}\n @mixin typography .spectrum-Heading5, heading-han-5 {}\n @mixin typography .spectrum-Heading6, heading-han-6 {}\n @mixin typography .spectrum-Subheading, subheading-han {}\n @mixin typography .spectrum-Detail, detail-han {}\n @mixin typography .spectrum-Heading1--quiet, heading-quiet-han-1 {}\n @mixin typography .spectrum-Heading2--quiet, heading-quiet-han-2 {}\n @mixin typography .spectrum-Heading1--strong, heading-strong-han-1 {}\n @mixin typography .spectrum-Heading2--strong, heading-strong-han-2 {}\n @mixin typography .spectrum-Heading1--display, display-han-1 {}\n @mixin typography .spectrum-Heading2--display, display-han-2 {}\n @mixin typography .spectrum-Heading1--display.spectrum-Heading1--strong, display-strong-han-1 {}\n @mixin typography .spectrum-Heading2--display.spectrum-Heading2--strong, display-strong-han-2 {}\n @mixin typography .spectrum-Heading1--display.spectrum-Heading1--quiet, display-quiet-han-1 {}\n @mixin typography .spectrum-Heading2--display.spectrum-Heading2--quiet, display-quiet-han-2 {}\n }\n}\n@mixin typography .spectrum-Code1, body-code-1, true {\n font-family: var(--spectrum-body-code-1-text-font-family);\n}\n@mixin typography .spectrum-Code2, body-code-2, true {\n font-family: var(--spectrum-body-code-2-text-font-family);\n}\n@mixin typography .spectrum-Code3, body-code-3, true {\n font-family: var(--spectrum-body-code-3-text-font-family);\n}\n@mixin typography .spectrum-Code4, body-code-4, true {\n font-family: var(--spectrum-body-code-4-text-font-family);\n}\n@mixin typography .spectrum-Code5, body-code-5, true {\n font-family: var(--spectrum-body-code-5-text-font-family);\n}*/\n\n/*\n The &.spectrum makes it so users can do <div class=\"spectrum spectrum--large\"> and still get the right font sizes\n Without this, they would have to do <div class=\"spectrum--large\"><div class=\"spectrum\">, which makes no sense\n*/\n&.spectrum,\n&.spectrum-Body,\n.spectrum,\n.spectrum-Body {\n font-size: var(--spectrum-body-4-text-size);\n font-weight: var(--spectrum-body-4-text-font-weight);\n line-height: var(--spectrum-body-4-text-line-height);\n font-style: var(--spectrum-body-4-text-font-style);\n}\n\n.spectrum-Body--italic {\n font-style: var(--spectrum-body-4-emphasis-text-font-style);\n}\n\n/*\n.spectrum-Body--large {\n @extend .spectrum-Body2;\n}\n\n.spectrum-Body--small {\n @extend .spectrum-Body5;\n}\n\n.spectrum-Body--secondary {\n @extend .spectrum-Body4;\n}\n\n.spectrum-Heading--display {\n @extend .spectrum-Heading2--display.spectrum-Heading2--quiet;\n}\n\n.spectrum-Heading--pageTitle {\n @extend .spectrum-Heading2--quiet;\n}\n\n.spectrum-Heading--subtitle1 {\n @extend .spectrum-Heading4;\n}\n\n.spectrum-Heading--subtitle2 {\n @extend .spectrum-Heading6;\n}\n\n.spectrum-Heading--subtitle3 {\n @extend .spectrum-Subheading;\n}*/\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ColorScheme, Scale, Theme} from '@react-types/provider';\nimport {useMediaQuery} from '@react-spectrum/utils';\n\nexport function useColorScheme(theme: Theme, defaultColorScheme: ColorScheme): ColorScheme {\n let matchesDark = useMediaQuery('(prefers-color-scheme: dark)');\n let matchesLight = useMediaQuery('(prefers-color-scheme: light)');\n\n // importance OS > default > omitted\n\n if (theme.dark && matchesDark) {\n return 'dark';\n }\n\n if (theme.light && matchesLight) {\n return 'light';\n }\n\n if (theme.dark && defaultColorScheme === 'dark') {\n return 'dark';\n }\n\n if (theme.light && defaultColorScheme === 'light') {\n return 'light';\n }\n\n if (!theme.dark) {\n return 'light';\n }\n\n if (!theme.light) {\n return 'dark';\n }\n\n return 'light';\n}\n\nexport function useScale(theme: Theme): Scale {\n let matchesFine = useMediaQuery('(any-pointer: fine)');\n if (matchesFine && theme.medium) {\n return 'medium';\n }\n\n if (theme.large) {\n return 'large';\n }\n\n return 'medium';\n}\n","{\n \"name\": \"@react-spectrum/provider\",\n \"version\": \"3.8.1\",\n \"description\": \"Spectrum UI components in React\",\n \"license\": \"Apache-2.0\",\n \"main\": \"dist/main.js\",\n \"module\": \"dist/module.js\",\n \"exports\": {\n \"types\": \"./dist/types.d.ts\",\n \"import\": \"./dist/import.mjs\",\n \"require\": \"./dist/main.js\"\n },\n \"types\": \"dist/types.d.ts\",\n \"source\": \"src/index.ts\",\n \"files\": [\n \"dist\",\n \"src\"\n ],\n \"sideEffects\": [\n \"*.css\"\n ],\n \"targets\": {\n \"main\": {\n \"includeNodeModules\": [\n \"@adobe/spectrum-css-temp\"\n ]\n },\n \"module\": {\n \"includeNodeModules\": [\n \"@adobe/spectrum-css-temp\"\n ]\n }\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/adobe/react-spectrum\"\n },\n \"dependencies\": {\n \"@react-aria/i18n\": \"^3.8.1\",\n \"@react-aria/overlays\": \"^3.16.0\",\n \"@react-aria/utils\": \"^3.19.0\",\n \"@react-spectrum/utils\": \"^3.10.1\",\n \"@react-types/provider\": \"^3.6.3\",\n \"@react-types/shared\": \"^3.19.0\",\n \"@swc/helpers\": \"^0.5.0\",\n \"clsx\": \"^1.1.1\"\n },\n \"devDependencies\": {\n \"@adobe/spectrum-css-temp\": \"3.0.0-alpha.1\"\n },\n \"peerDependencies\": {\n \"react\": \"^16.8.0 || ^17.0.0-rc.1 || ^18.0.0\",\n \"react-dom\": \"^16.8.0 || ^17.0.0-rc.1 || ^18.0.0\"\n },\n \"publishConfig\": {\n \"access\": \"public\"\n }\n}\n"],"names":[],"version":3,"file":"main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C;ACZ1C;;;;;;;;;;CAUC;;ACVD;;;;;;;;;;CAUC;AAOM,MAAM,4CAAU,CAAA,GAAA,sCAAI,EAAE,cAAsC;AACnE,0CAAQ,cAAc;;;;;;;;;;;;;;;AClBtB,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AALA,4CAA+B,CAAC,iBAAiB,CAAC;AAClD,4CAAmC,CAAC,qBAAqB,CAAC;AAC1D,4CAA6B,CAAC,eAAe,CAAC;AAC9C,4CAA4C,CAAC,8BAA8B,CAAC;AAC5E,4CAAuC,CAAC,0BAA0B,EAAE,0CAA0C,CAAC;AAC/G,4CAA8C,CAAC,gCAAgC,CAAC;;;;;;;;;;;;;ACLhF,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AAPA,4CAA+B,CAAC,kBAAkB,CAAC;AACnD,4CAAmC,CAAC,sBAAsB,CAAC;AAC3D,4CAA6B,CAAC,iBAAiB,EAAE,0CAAiC,CAAC;AACnF,4CAAkC,CAAC,qBAAqB,CAAC;AACzD,4CAA0C,CAAC,6BAA6B,CAAC;AACzE,4CAA4C,CAAC,+BAA+B,CAAC;AAC7E,4CAAuC,CAAC,2BAA2B,EAAE,0CAA0C,CAAC;AAChH,4CAA8C,CAAC,iCAAiC,CAAC;;;ACPjF;;;;;;;;;;CAUC;AAKM,SAAS,0CAAe,KAAY,EAAE,kBAA+B;IAC1E,IAAI,cAAc,CAAA,GAAA,uCAAY,EAAE;IAChC,IAAI,eAAe,CAAA,GAAA,uCAAY,EA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B,CAAA,GAAA,sBAAQ,EAAE;QACR,IAAI,aAAa,OAAO,SAAS;YAC/B,IAAI,aAAa,OAAO,QAAQ,cAAc,QAAQ;YACtD,IAAI,MAAM,cAAc,WAAW,aAAa;YAChD,IAAI,OAAO,QAAQ,aAAa,CAAC,UAAU,SAAS;gBAClD,QAAQ,KAAK,CAAC,sCAAsC,EAAE,UAAU,QAAQ,EAAE,IAAI,CAAC,CAAC;gBAChF,UAAU,UAAU;YACtB;QACF;IACF,GAAG;QAAC;QAAW;QAAQ;KAAU;IAGjC,qBACE,0DAAC;QACE,GAAG,CAAA,GAAA,oCAAa,EAAE,WAAW;QAC7B,GAAG,UAAU;QACb,GAAG,kBAAkB;QACtB,WAAW;QACX,OAAO;QACP,MAAM;QACN,KAAK;QACL,KAAK;OACJ;AAGP;AAMO,SAAS;IACd,OAAO,CAAA,GAAA,uBAAS,EAAE,CAAA,GAAA,yCAAM;AAC1B;AAEO,SAAS,0CAAoB,KAAQ;IAC1C,IAAI,UAAU;IACd,IAAI,CAAC,SACH,OAAO;IAET,OAAO,OAAO,OAAO,CAAC,GAAG;QACvB,SAAS,QAAQ;QACjB,cAAc,QAAQ;QACtB,YAAY,QAAQ;QACpB,YAAY,QAAQ;QACpB,YAAY,QAAQ;QACpB,iBAAiB,QAAQ;IAC3B,GAAG;AACL;","sources":["packages/@react-spectrum/provider/src/index.ts","packages/@react-spectrum/provider/src/Provider.tsx","packages/@react-spectrum/provider/src/context.ts","packages/@adobe/spectrum-css-temp/components/page/vars.css","packages/@adobe/spectrum-css-temp/components/typography/index.css","packages/@react-spectrum/provider/src/mediaQueries.ts","packages/@react-spectrum/provider/package.json"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/// <reference types=\"css-module-types\" />\n\nexport {Provider, useProvider, useProviderProps} from './Provider';\nexport type {ProviderContext} from '@react-types/provider';\nexport type {ProviderProps} from '@react-types/provider';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n BreakpointProvider,\n shouldKeepSpectrumClassNames,\n useDOMRef,\n useMatchedBreakpoints,\n useStyleProps\n} from '@react-spectrum/utils';\nimport clsx from 'clsx';\nimport {Context} from './context';\nimport {DOMRef} from '@react-types/shared';\nimport {filterDOMProps, RouterProvider} from '@react-aria/utils';\nimport {I18nProvider, useLocale} from '@react-aria/i18n';\nimport {ModalProvider, useModalProvider} from '@react-aria/overlays';\nimport {ProviderContext, ProviderProps} from '@react-types/provider';\nimport React, {useContext, useEffect, useRef} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/page/vars.css';\nimport typographyStyles from '@adobe/spectrum-css-temp/components/typography/index.css';\nimport {useColorScheme, useScale} from './mediaQueries';\n// @ts-ignore\nimport {version} from '../package.json';\n\nconst DEFAULT_BREAKPOINTS = {S: 640, M: 768, L: 1024, XL: 1280, XXL: 1536};\n\nfunction Provider(props: ProviderProps, ref: DOMRef<HTMLDivElement>) {\n let prevContext = useProvider();\n let prevColorScheme = prevContext && prevContext.colorScheme;\n let prevBreakpoints = prevContext && prevContext.breakpoints;\n let {\n theme = prevContext && prevContext.theme,\n defaultColorScheme\n } = props;\n if (!theme) {\n throw new Error('theme not found, the parent provider must have a theme provided');\n }\n // Hooks must always be called.\n let autoColorScheme = useColorScheme(theme, defaultColorScheme);\n let autoScale = useScale(theme);\n let {locale: prevLocale} = useLocale();\n // if the new theme doesn't support the prevColorScheme, we must resort to the auto\n let usePrevColorScheme = !!theme[prevColorScheme];\n\n // importance of color scheme props > parent > auto:(OS > default > omitted)\n let {\n colorScheme = usePrevColorScheme ? prevColorScheme : autoColorScheme,\n scale = prevContext ? prevContext.scale : autoScale,\n locale = prevContext ? prevLocale : null,\n breakpoints = prevContext ? prevBreakpoints : DEFAULT_BREAKPOINTS,\n children,\n isQuiet,\n isEmphasized,\n isDisabled,\n isRequired,\n isReadOnly,\n validationState,\n router,\n ...otherProps\n } = props;\n\n // select only the props with values so undefined props don't overwrite prevContext values\n let currentProps = {\n version,\n theme,\n breakpoints,\n colorScheme,\n scale,\n isQuiet,\n isEmphasized,\n isDisabled,\n isRequired,\n isReadOnly,\n validationState\n };\n\n let matchedBreakpoints = useMatchedBreakpoints(breakpoints);\n let filteredProps = {};\n Object.entries(currentProps).forEach(([key, value]) => value !== undefined && (filteredProps[key] = value));\n\n // Merge options with parent provider\n let context = Object.assign({}, prevContext, filteredProps);\n\n // Only wrap in a DOM node if the theme, colorScheme, or scale changed\n let contents = children;\n let domProps = filterDOMProps(otherProps);\n let {styleProps} = useStyleProps(otherProps, undefined, {matchedBreakpoints});\n if (!prevContext || props.locale || theme !== prevContext.theme || colorScheme !== prevContext.colorScheme || scale !== prevContext.scale || Object.keys(domProps).length > 0 || otherProps.UNSAFE_className || Object.keys(styleProps.style).length > 0) {\n contents = (\n <ProviderWrapper {...props} UNSAFE_style={{isolation: !prevContext ? 'isolate' : undefined, ...styleProps.style}} ref={ref}>\n {contents}\n </ProviderWrapper>\n );\n }\n\n if (router) {\n contents = <RouterProvider {...router}>{contents}</RouterProvider>;\n }\n\n return (\n <Context.Provider value={context}>\n <I18nProvider locale={locale}>\n <BreakpointProvider matchedBreakpoints={matchedBreakpoints}>\n <ModalProvider>\n {contents}\n </ModalProvider>\n </BreakpointProvider>\n </I18nProvider>\n </Context.Provider>\n );\n}\n\n/**\n * Provider is the container for all React Spectrum applications.\n * It defines the theme, locale, and other application level settings,\n * and can also be used to provide common properties to a group of components.\n */\nlet _Provider = React.forwardRef(Provider);\nexport {_Provider as Provider};\n\nconst ProviderWrapper = React.forwardRef(function ProviderWrapper(props: ProviderProps, ref: DOMRef<HTMLDivElement>) {\n let {\n children,\n ...otherProps\n } = props;\n let {locale, direction} = useLocale();\n let {theme, colorScheme, scale} = useProvider();\n let {modalProviderProps} = useModalProvider();\n let {styleProps} = useStyleProps(otherProps);\n let domRef = useDOMRef(ref);\n\n let themeKey = Object.keys(theme[colorScheme])[0];\n let scaleKey = Object.keys(theme[scale])[0];\n\n let className = clsx(\n styleProps.className,\n styles['spectrum'],\n typographyStyles['spectrum'],\n Object.values(theme[colorScheme]),\n Object.values(theme[scale]),\n theme.global ? Object.values(theme.global) : null,\n {\n 'react-spectrum-provider': shouldKeepSpectrumClassNames,\n spectrum: shouldKeepSpectrumClassNames,\n [themeKey]: shouldKeepSpectrumClassNames,\n [scaleKey]: shouldKeepSpectrumClassNames\n }\n );\n\n let style = {\n ...styleProps.style,\n // This ensures that browser native UI like scrollbars are rendered in the right color scheme.\n // See https://web.dev/color-scheme/.\n colorScheme: props.colorScheme ?? colorScheme ?? Object.keys(theme).filter(k => k === 'light' || k === 'dark').join(' ')\n };\n\n let hasWarned = useRef(false);\n useEffect(() => {\n if (direction && domRef.current) {\n let closestDir = domRef.current.parentElement.closest('[dir]');\n let dir = closestDir && closestDir.getAttribute('dir');\n if (dir && dir !== direction && !hasWarned.current) {\n console.warn(`Language directions cannot be nested. ${direction} inside ${dir}.`);\n hasWarned.current = true;\n }\n }\n }, [direction, domRef, hasWarned]);\n\n\n return (\n <div\n {...filterDOMProps(otherProps)}\n {...styleProps}\n {...modalProviderProps}\n className={className}\n style={style}\n lang={locale}\n dir={direction}\n ref={domRef}>\n {children}\n </div>\n );\n});\n\n/**\n * Returns the various settings and styles applied by the nearest parent Provider.\n * Properties explicitly set by the nearest parent Provider override those provided by preceeding Providers.\n */\nexport function useProvider(): ProviderContext {\n return useContext(Context);\n}\n\nexport function useProviderProps<T>(props: T) : T {\n let context = useProvider();\n if (!context) {\n return props;\n }\n return Object.assign({}, {\n isQuiet: context.isQuiet,\n isEmphasized: context.isEmphasized,\n isDisabled: context.isDisabled,\n isRequired: context.isRequired,\n isReadOnly: context.isReadOnly,\n validationState: context.validationState\n }, props);\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ProviderContext} from '@react-types/provider';\nimport React from 'react';\n\n// Context is placed in a separate file to avoid fast refresh issue where the old provider context values\n// are immediately replaced with the null default. Stopgap solution until we fix this in parcel.\nexport const Context = React.createContext<ProviderContext | null>(null);\nContext.displayName = 'ProviderContext';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n","/*\nCopyright 2019 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\n@import '../commons/index.css';\n@import 'font.css';\n\n/*@mixin typography .spectrum-Body1 {}\n@mixin typography .spectrum-Body2 {}\n@mixin typography .spectrum-Body3 {}\n@mixin typography .spectrum-Body4 {}\n@mixin typography .spectrum-Body5 {}\n@mixin typography .spectrum-Heading1 {}\n@mixin typography .spectrum-Heading2 {}\n@mixin typography .spectrum-Heading3 {}\n@mixin typography .spectrum-Heading4 {}\n@mixin typography .spectrum-Heading5 {}\n@mixin typography .spectrum-Heading6 {}\n@mixin typography .spectrum-Subheading {}\n@mixin typography .spectrum-Detail {}\n@mixin typography .spectrum-Heading1--quiet, heading-quiet-1 {}\n@mixin typography .spectrum-Heading2--quiet, heading-quiet-2 {}\n@mixin typography .spectrum-Heading1--strong, heading-strong-1 {}\n@mixin typography .spectrum-Heading2--strong, heading-strong-2 {}\n@mixin typography .spectrum-Heading1--display, display-1 {}\n@mixin typography .spectrum-Heading2--display, display-2 {}\n@mixin typography .spectrum-Heading1--display.spectrum-Heading1--strong, display-strong-1 {}\n@mixin typography .spectrum-Heading2--display.spectrum-Heading2--strong, display-strong-2 {}\n@mixin typography .spectrum-Heading1--display.spectrum-Heading1--quiet, display-quiet-1 {}\n@mixin typography .spectrum-Heading2--display.spectrum-Heading2--quiet, display-quiet-2 {}\n\n.spectrum-Typography {\n @mixin typographyMargins .spectrum-Body1 {}\n @mixin typographyMargins .spectrum-Body2 {}\n @mixin typographyMargins .spectrum-Body3 {}\n @mixin typographyMargins .spectrum-Body4 {}\n @mixin typographyMargins .spectrum-Body5 {}\n @mixin typographyMargins .spectrum-Heading1 {}\n @mixin typographyMargins .spectrum-Heading2 {}\n @mixin typographyMargins .spectrum-Heading3 {}\n @mixin typographyMargins .spectrum-Heading4 {}\n @mixin typographyMargins .spectrum-Heading5 {}\n @mixin typographyMargins .spectrum-Heading6 {}\n @mixin typographyMargins .spectrum-Subheading {}\n @mixin typographyMargins .spectrum-Detail {}\n @mixin typographyMargins .spectrum-Heading1--quiet, heading-quiet-1 {}\n @mixin typographyMargins .spectrum-Heading2--quiet, heading-quiet-2 {}\n @mixin typographyMargins .spectrum-Heading1--strong, heading-strong-1 {}\n @mixin typographyMargins .spectrum-Heading2--strong, heading-strong-2 {}\n @mixin typographyMargins .spectrum-Heading1--display, display-1 {}\n @mixin typographyMargins .spectrum-Heading2--display, display-2 {}\n @mixin typographyMargins .spectrum-Heading1--display.spectrum-Heading1--strong, display-strong-1 {}\n @mixin typographyMargins .spectrum-Heading2--display.spectrum-Heading2--strong, display-strong-2 {}\n @mixin typographyMargins .spectrum-Heading1--display.spectrum-Heading1--quiet, display-quiet-1 {}\n @mixin typographyMargins .spectrum-Heading2--display.spectrum-Heading2--quiet, display-quiet-2 {}\n}\n\n.spectrum-Article {\n font-family: var(--spectrum-body-article-1-text-font-family);\n @mixin typography .spectrum-Body1, body-article-1 {}\n @mixin typography .spectrum-Body2, body-article-2 {}\n @mixin typography .spectrum-Body3, body-article-3 {}\n @mixin typography .spectrum-Body4, body-article-4 {}\n @mixin typography .spectrum-Body5, body-article-5 {}\n @mixin typography .spectrum-Heading1, heading-article-1 {}\n @mixin typography .spectrum-Heading2, heading-article-2 {}\n @mixin typography .spectrum-Heading3, heading-article-3 {}\n @mixin typography .spectrum-Heading4, heading-article-4 {}\n @mixin typography .spectrum-Heading5, heading-article-5 {}\n @mixin typography .spectrum-Heading6, heading-article-6 {}\n @mixin typography .spectrum-Subheading, subheading-article {}\n @mixin typography .spectrum-Detail, detail-article {}\n @mixin typography .spectrum-Heading1--quiet, heading-quiet-article-1 {}\n @mixin typography .spectrum-Heading2--quiet, heading-quiet-article-2 {}\n @mixin typography .spectrum-Heading1--display, display-article-1 {}\n @mixin typography .spectrum-Heading2--display, display-article-2 {}\n @mixin typography .spectrum-Heading1--display.spectrum-Heading1--quiet, display-quiet-article-1 {}\n @mixin typography .spectrum-Heading2--display.spectrum-Heading2--quiet, display-quiet-article-2 {}\n}\n.spectrum {\n &:lang(ja),\n &:lang(ko),\n &:lang(zh) {\n @mixin typography .spectrum-Body1, body-han-1 {}\n @mixin typography .spectrum-Body2, body-han-2 {}\n @mixin typography .spectrum-Body3, body-han-3 {}\n @mixin typography .spectrum-Body4, body-han-4 {}\n @mixin typography .spectrum-Body5, body-han-5 {}\n @mixin typography .spectrum-Heading1, heading-han-1 {}\n @mixin typography .spectrum-Heading2, heading-han-2 {}\n @mixin typography .spectrum-Heading3, heading-han-3 {}\n @mixin typography .spectrum-Heading4, heading-han-4 {}\n @mixin typography .spectrum-Heading5, heading-han-5 {}\n @mixin typography .spectrum-Heading6, heading-han-6 {}\n @mixin typography .spectrum-Subheading, subheading-han {}\n @mixin typography .spectrum-Detail, detail-han {}\n @mixin typography .spectrum-Heading1--quiet, heading-quiet-han-1 {}\n @mixin typography .spectrum-Heading2--quiet, heading-quiet-han-2 {}\n @mixin typography .spectrum-Heading1--strong, heading-strong-han-1 {}\n @mixin typography .spectrum-Heading2--strong, heading-strong-han-2 {}\n @mixin typography .spectrum-Heading1--display, display-han-1 {}\n @mixin typography .spectrum-Heading2--display, display-han-2 {}\n @mixin typography .spectrum-Heading1--display.spectrum-Heading1--strong, display-strong-han-1 {}\n @mixin typography .spectrum-Heading2--display.spectrum-Heading2--strong, display-strong-han-2 {}\n @mixin typography .spectrum-Heading1--display.spectrum-Heading1--quiet, display-quiet-han-1 {}\n @mixin typography .spectrum-Heading2--display.spectrum-Heading2--quiet, display-quiet-han-2 {}\n }\n}\n@mixin typography .spectrum-Code1, body-code-1, true {\n font-family: var(--spectrum-body-code-1-text-font-family);\n}\n@mixin typography .spectrum-Code2, body-code-2, true {\n font-family: var(--spectrum-body-code-2-text-font-family);\n}\n@mixin typography .spectrum-Code3, body-code-3, true {\n font-family: var(--spectrum-body-code-3-text-font-family);\n}\n@mixin typography .spectrum-Code4, body-code-4, true {\n font-family: var(--spectrum-body-code-4-text-font-family);\n}\n@mixin typography .spectrum-Code5, body-code-5, true {\n font-family: var(--spectrum-body-code-5-text-font-family);\n}*/\n\n/*\n The &.spectrum makes it so users can do <div class=\"spectrum spectrum--large\"> and still get the right font sizes\n Without this, they would have to do <div class=\"spectrum--large\"><div class=\"spectrum\">, which makes no sense\n*/\n.spectrum,\n.spectrum-Body,\n.spectrum,\n.spectrum-Body {\n font-size: var(--spectrum-body-4-text-size);\n font-weight: var(--spectrum-body-4-text-font-weight);\n line-height: var(--spectrum-body-4-text-line-height);\n font-style: var(--spectrum-body-4-text-font-style);\n}\n\n.spectrum-Body--italic {\n font-style: var(--spectrum-body-4-emphasis-text-font-style);\n}\n\n/*\n.spectrum-Body--large {\n @extend .spectrum-Body2;\n}\n\n.spectrum-Body--small {\n @extend .spectrum-Body5;\n}\n\n.spectrum-Body--secondary {\n @extend .spectrum-Body4;\n}\n\n.spectrum-Heading--display {\n @extend .spectrum-Heading2--display.spectrum-Heading2--quiet;\n}\n\n.spectrum-Heading--pageTitle {\n @extend .spectrum-Heading2--quiet;\n}\n\n.spectrum-Heading--subtitle1 {\n @extend .spectrum-Heading4;\n}\n\n.spectrum-Heading--subtitle2 {\n @extend .spectrum-Heading6;\n}\n\n.spectrum-Heading--subtitle3 {\n @extend .spectrum-Subheading;\n}*/\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ColorScheme, Scale, Theme} from '@react-types/provider';\nimport {useMediaQuery} from '@react-spectrum/utils';\n\nexport function useColorScheme(theme: Theme, defaultColorScheme: ColorScheme): ColorScheme {\n let matchesDark = useMediaQuery('(prefers-color-scheme: dark)');\n let matchesLight = useMediaQuery('(prefers-color-scheme: light)');\n\n // importance OS > default > omitted\n\n if (theme.dark && matchesDark) {\n return 'dark';\n }\n\n if (theme.light && matchesLight) {\n return 'light';\n }\n\n if (theme.dark && defaultColorScheme === 'dark') {\n return 'dark';\n }\n\n if (theme.light && defaultColorScheme === 'light') {\n return 'light';\n }\n\n if (!theme.dark) {\n return 'light';\n }\n\n if (!theme.light) {\n return 'dark';\n }\n\n return 'light';\n}\n\nexport function useScale(theme: Theme): Scale {\n let matchesFine = useMediaQuery('(any-pointer: fine)');\n if (matchesFine && theme.medium) {\n return 'medium';\n }\n\n if (theme.large) {\n return 'large';\n }\n\n return 'medium';\n}\n","{\n \"name\": \"@react-spectrum/provider\",\n \"version\": \"3.8.2\",\n \"description\": \"Spectrum UI components in React\",\n \"license\": \"Apache-2.0\",\n \"main\": \"dist/main.js\",\n \"module\": \"dist/module.js\",\n \"exports\": {\n \"types\": \"./dist/types.d.ts\",\n \"import\": \"./dist/import.mjs\",\n \"require\": \"./dist/main.js\"\n },\n \"types\": \"dist/types.d.ts\",\n \"source\": \"src/index.ts\",\n \"files\": [\n \"dist\",\n \"src\"\n ],\n \"sideEffects\": [\n \"*.css\"\n ],\n \"targets\": {\n \"main\": {\n \"includeNodeModules\": [\n \"@adobe/spectrum-css-temp\"\n ]\n },\n \"module\": {\n \"includeNodeModules\": [\n \"@adobe/spectrum-css-temp\"\n ]\n }\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/adobe/react-spectrum\"\n },\n \"dependencies\": {\n \"@react-aria/i18n\": \"^3.8.2\",\n \"@react-aria/overlays\": \"^3.17.0\",\n \"@react-aria/utils\": \"^3.20.0\",\n \"@react-spectrum/utils\": \"^3.10.2\",\n \"@react-types/provider\": \"^3.6.4\",\n \"@react-types/shared\": \"^3.20.0\",\n \"@swc/helpers\": \"^0.5.0\",\n \"clsx\": \"^1.1.1\"\n },\n \"devDependencies\": {\n \"@adobe/spectrum-css-temp\": \"3.0.0-alpha.1\"\n },\n \"peerDependencies\": {\n \"react\": \"^16.8.0 || ^17.0.0-rc.1 || ^18.0.0\",\n \"react-dom\": \"^16.8.0 || ^17.0.0-rc.1 || ^18.0.0\"\n },\n \"publishConfig\": {\n \"access\": \"public\"\n }\n}\n"],"names":[],"version":3,"file":"main.js.map"}
package/dist/module.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import "./main.css";
2
2
  import {useMatchedBreakpoints as $b6ncI$useMatchedBreakpoints, useStyleProps as $b6ncI$useStyleProps, BreakpointProvider as $b6ncI$BreakpointProvider, useDOMRef as $b6ncI$useDOMRef, shouldKeepSpectrumClassNames as $b6ncI$shouldKeepSpectrumClassNames, useMediaQuery as $b6ncI$useMediaQuery} from "@react-spectrum/utils";
3
3
  import $b6ncI$clsx from "clsx";
4
- import {filterDOMProps as $b6ncI$filterDOMProps} from "@react-aria/utils";
4
+ import {filterDOMProps as $b6ncI$filterDOMProps, RouterProvider as $b6ncI$RouterProvider} from "@react-aria/utils";
5
5
  import {useLocale as $b6ncI$useLocale, I18nProvider as $b6ncI$I18nProvider} from "@react-aria/i18n";
6
6
  import {ModalProvider as $b6ncI$ModalProvider, useModalProvider as $b6ncI$useModalProvider} from "@react-aria/overlays";
7
7
  import $b6ncI$react, {useRef as $b6ncI$useRef, useEffect as $b6ncI$useEffect, useContext as $b6ncI$useContext} from "react";
@@ -56,22 +56,52 @@ $a8430f637b4ccbce$export$841858b892ce1f4c.displayName = "ProviderContext";
56
56
 
57
57
  var $698974e9dd92c2ec$exports = {};
58
58
 
59
+ $parcel$export($698974e9dd92c2ec$exports, "focus-ring", () => $698974e9dd92c2ec$export$f39a09f249340e2a, (v) => $698974e9dd92c2ec$export$f39a09f249340e2a = v);
60
+ $parcel$export($698974e9dd92c2ec$exports, "i18nFontFamily", () => $698974e9dd92c2ec$export$8c4ee2c50c22c514, (v) => $698974e9dd92c2ec$export$8c4ee2c50c22c514 = v);
59
61
  $parcel$export($698974e9dd92c2ec$exports, "spectrum", () => $698974e9dd92c2ec$export$3311ab3a441bc141, (v) => $698974e9dd92c2ec$export$3311ab3a441bc141 = v);
62
+ $parcel$export($698974e9dd92c2ec$exports, "spectrum-FocusRing-ring", () => $698974e9dd92c2ec$export$4109102f950813a6, (v) => $698974e9dd92c2ec$export$4109102f950813a6 = v);
63
+ $parcel$export($698974e9dd92c2ec$exports, "spectrum-FocusRing", () => $698974e9dd92c2ec$export$24c7f46a6e3605dd, (v) => $698974e9dd92c2ec$export$24c7f46a6e3605dd = v);
64
+ $parcel$export($698974e9dd92c2ec$exports, "spectrum-FocusRing--quiet", () => $698974e9dd92c2ec$export$2927016961429360, (v) => $698974e9dd92c2ec$export$2927016961429360 = v);
65
+ var $698974e9dd92c2ec$export$f39a09f249340e2a;
66
+ var $698974e9dd92c2ec$export$8c4ee2c50c22c514;
60
67
  var $698974e9dd92c2ec$export$3311ab3a441bc141;
61
- $698974e9dd92c2ec$export$3311ab3a441bc141 = "spectrum_b37d53";
68
+ var $698974e9dd92c2ec$export$4109102f950813a6;
69
+ var $698974e9dd92c2ec$export$24c7f46a6e3605dd;
70
+ var $698974e9dd92c2ec$export$2927016961429360;
71
+ $698974e9dd92c2ec$export$f39a09f249340e2a = `JuTe6q_focus-ring`;
72
+ $698974e9dd92c2ec$export$8c4ee2c50c22c514 = `JuTe6q_i18nFontFamily`;
73
+ $698974e9dd92c2ec$export$3311ab3a441bc141 = `JuTe6q_spectrum`;
74
+ $698974e9dd92c2ec$export$4109102f950813a6 = `JuTe6q_spectrum-FocusRing-ring`;
75
+ $698974e9dd92c2ec$export$24c7f46a6e3605dd = `JuTe6q_spectrum-FocusRing ${$698974e9dd92c2ec$export$4109102f950813a6}`;
76
+ $698974e9dd92c2ec$export$2927016961429360 = `JuTe6q_spectrum-FocusRing--quiet`;
62
77
 
63
78
 
64
79
  var $5cac98e4c80e6707$exports = {};
65
80
 
81
+ $parcel$export($5cac98e4c80e6707$exports, "focus-ring", () => $5cac98e4c80e6707$export$f39a09f249340e2a, (v) => $5cac98e4c80e6707$export$f39a09f249340e2a = v);
82
+ $parcel$export($5cac98e4c80e6707$exports, "i18nFontFamily", () => $5cac98e4c80e6707$export$8c4ee2c50c22c514, (v) => $5cac98e4c80e6707$export$8c4ee2c50c22c514 = v);
66
83
  $parcel$export($5cac98e4c80e6707$exports, "spectrum", () => $5cac98e4c80e6707$export$3311ab3a441bc141, (v) => $5cac98e4c80e6707$export$3311ab3a441bc141 = v);
67
84
  $parcel$export($5cac98e4c80e6707$exports, "spectrum-Body", () => $5cac98e4c80e6707$export$a30bf7810c8453d1, (v) => $5cac98e4c80e6707$export$a30bf7810c8453d1 = v);
68
85
  $parcel$export($5cac98e4c80e6707$exports, "spectrum-Body--italic", () => $5cac98e4c80e6707$export$7b2dac1166f6ec4c, (v) => $5cac98e4c80e6707$export$7b2dac1166f6ec4c = v);
86
+ $parcel$export($5cac98e4c80e6707$exports, "spectrum-FocusRing-ring", () => $5cac98e4c80e6707$export$4109102f950813a6, (v) => $5cac98e4c80e6707$export$4109102f950813a6 = v);
87
+ $parcel$export($5cac98e4c80e6707$exports, "spectrum-FocusRing", () => $5cac98e4c80e6707$export$24c7f46a6e3605dd, (v) => $5cac98e4c80e6707$export$24c7f46a6e3605dd = v);
88
+ $parcel$export($5cac98e4c80e6707$exports, "spectrum-FocusRing--quiet", () => $5cac98e4c80e6707$export$2927016961429360, (v) => $5cac98e4c80e6707$export$2927016961429360 = v);
89
+ var $5cac98e4c80e6707$export$f39a09f249340e2a;
90
+ var $5cac98e4c80e6707$export$8c4ee2c50c22c514;
69
91
  var $5cac98e4c80e6707$export$3311ab3a441bc141;
70
92
  var $5cac98e4c80e6707$export$a30bf7810c8453d1;
71
93
  var $5cac98e4c80e6707$export$7b2dac1166f6ec4c;
72
- $5cac98e4c80e6707$export$3311ab3a441bc141 = "spectrum_2a241c";
73
- $5cac98e4c80e6707$export$a30bf7810c8453d1 = "spectrum-Body_2a241c";
74
- $5cac98e4c80e6707$export$7b2dac1166f6ec4c = "spectrum-Body--italic_2a241c";
94
+ var $5cac98e4c80e6707$export$4109102f950813a6;
95
+ var $5cac98e4c80e6707$export$24c7f46a6e3605dd;
96
+ var $5cac98e4c80e6707$export$2927016961429360;
97
+ $5cac98e4c80e6707$export$f39a09f249340e2a = `_5QszkG_focus-ring`;
98
+ $5cac98e4c80e6707$export$8c4ee2c50c22c514 = `_5QszkG_i18nFontFamily`;
99
+ $5cac98e4c80e6707$export$3311ab3a441bc141 = `_5QszkG_spectrum ${$5cac98e4c80e6707$export$8c4ee2c50c22c514}`;
100
+ $5cac98e4c80e6707$export$a30bf7810c8453d1 = `_5QszkG_spectrum-Body`;
101
+ $5cac98e4c80e6707$export$7b2dac1166f6ec4c = `_5QszkG_spectrum-Body--italic`;
102
+ $5cac98e4c80e6707$export$4109102f950813a6 = `_5QszkG_spectrum-FocusRing-ring`;
103
+ $5cac98e4c80e6707$export$24c7f46a6e3605dd = `_5QszkG_spectrum-FocusRing ${$5cac98e4c80e6707$export$4109102f950813a6}`;
104
+ $5cac98e4c80e6707$export$2927016961429360 = `_5QszkG_spectrum-FocusRing--quiet`;
75
105
 
76
106
 
77
107
  /*
@@ -106,7 +136,7 @@ function $d8453c5ae7fac713$export$a8d2043b2d807f4d(theme) {
106
136
 
107
137
 
108
138
  var $7b22e09dddddd7da$exports = {};
109
- $7b22e09dddddd7da$exports = JSON.parse('{"name":"@react-spectrum/provider","version":"3.8.1","description":"Spectrum UI components in React","license":"Apache-2.0","main":"dist/main.js","module":"dist/module.js","exports":{"types":"./dist/types.d.ts","import":"./dist/import.mjs","require":"./dist/main.js"},"types":"dist/types.d.ts","source":"src/index.ts","files":["dist","src"],"sideEffects":["*.css"],"targets":{"main":{"includeNodeModules":["@adobe/spectrum-css-temp"]},"module":{"includeNodeModules":["@adobe/spectrum-css-temp"]}},"repository":{"type":"git","url":"https://github.com/adobe/react-spectrum"},"dependencies":{"@react-aria/i18n":"^3.8.1","@react-aria/overlays":"^3.16.0","@react-aria/utils":"^3.19.0","@react-spectrum/utils":"^3.10.1","@react-types/provider":"^3.6.3","@react-types/shared":"^3.19.0","@swc/helpers":"^0.5.0","clsx":"^1.1.1"},"devDependencies":{"@adobe/spectrum-css-temp":"3.0.0-alpha.1"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0-rc.1 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0-rc.1 || ^18.0.0"},"publishConfig":{"access":"public"}}');
139
+ $7b22e09dddddd7da$exports = JSON.parse('{"name":"@react-spectrum/provider","version":"3.8.2","description":"Spectrum UI components in React","license":"Apache-2.0","main":"dist/main.js","module":"dist/module.js","exports":{"types":"./dist/types.d.ts","import":"./dist/import.mjs","require":"./dist/main.js"},"types":"dist/types.d.ts","source":"src/index.ts","files":["dist","src"],"sideEffects":["*.css"],"targets":{"main":{"includeNodeModules":["@adobe/spectrum-css-temp"]},"module":{"includeNodeModules":["@adobe/spectrum-css-temp"]}},"repository":{"type":"git","url":"https://github.com/adobe/react-spectrum"},"dependencies":{"@react-aria/i18n":"^3.8.2","@react-aria/overlays":"^3.17.0","@react-aria/utils":"^3.20.0","@react-spectrum/utils":"^3.10.2","@react-types/provider":"^3.6.4","@react-types/shared":"^3.20.0","@swc/helpers":"^0.5.0","clsx":"^1.1.1"},"devDependencies":{"@adobe/spectrum-css-temp":"3.0.0-alpha.1"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0-rc.1 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0-rc.1 || ^18.0.0"},"publishConfig":{"access":"public"}}');
110
140
 
111
141
 
112
142
  const $7167f8da3cce35e4$var$DEFAULT_BREAKPOINTS = {
@@ -120,16 +150,16 @@ function $7167f8da3cce35e4$var$Provider(props, ref) {
120
150
  let prevContext = $7167f8da3cce35e4$export$693cdb10cec23617();
121
151
  let prevColorScheme = prevContext && prevContext.colorScheme;
122
152
  let prevBreakpoints = prevContext && prevContext.breakpoints;
123
- let { theme: theme = prevContext && prevContext.theme , defaultColorScheme: defaultColorScheme } = props;
153
+ let { theme: theme = prevContext && prevContext.theme, defaultColorScheme: defaultColorScheme } = props;
124
154
  if (!theme) throw new Error("theme not found, the parent provider must have a theme provided");
125
155
  // Hooks must always be called.
126
156
  let autoColorScheme = (0, $d8453c5ae7fac713$export$6343629ee1b29116)(theme, defaultColorScheme);
127
157
  let autoScale = (0, $d8453c5ae7fac713$export$a8d2043b2d807f4d)(theme);
128
- let { locale: prevLocale } = (0, $b6ncI$useLocale)();
158
+ let { locale: prevLocale } = (0, $b6ncI$useLocale)();
129
159
  // if the new theme doesn't support the prevColorScheme, we must resort to the auto
130
160
  let usePrevColorScheme = !!theme[prevColorScheme];
131
161
  // importance of color scheme props > parent > auto:(OS > default > omitted)
132
- let { colorScheme: colorScheme = usePrevColorScheme ? prevColorScheme : autoColorScheme , scale: scale = prevContext ? prevContext.scale : autoScale , locale: locale = prevContext ? prevLocale : null , breakpoints: breakpoints = prevContext ? prevBreakpoints : $7167f8da3cce35e4$var$DEFAULT_BREAKPOINTS , children: children , isQuiet: isQuiet , isEmphasized: isEmphasized , isDisabled: isDisabled , isRequired: isRequired , isReadOnly: isReadOnly , validationState: validationState , ...otherProps } = props;
162
+ let { colorScheme: colorScheme = usePrevColorScheme ? prevColorScheme : autoColorScheme, scale: scale = prevContext ? prevContext.scale : autoScale, locale: locale = prevContext ? prevLocale : null, breakpoints: breakpoints = prevContext ? prevBreakpoints : $7167f8da3cce35e4$var$DEFAULT_BREAKPOINTS, children: children, isQuiet: isQuiet, isEmphasized: isEmphasized, isDisabled: isDisabled, isRequired: isRequired, isReadOnly: isReadOnly, validationState: validationState, router: router, ...otherProps } = props;
133
163
  // select only the props with values so undefined props don't overwrite prevContext values
134
164
  let currentProps = {
135
165
  version: $7b22e09dddddd7da$exports.version,
@@ -152,7 +182,7 @@ function $7167f8da3cce35e4$var$Provider(props, ref) {
152
182
  // Only wrap in a DOM node if the theme, colorScheme, or scale changed
153
183
  let contents = children;
154
184
  let domProps = (0, $b6ncI$filterDOMProps)(otherProps);
155
- let { styleProps: styleProps } = (0, $b6ncI$useStyleProps)(otherProps, undefined, {
185
+ let { styleProps: styleProps } = (0, $b6ncI$useStyleProps)(otherProps, undefined, {
156
186
  matchedBreakpoints: matchedBreakpoints
157
187
  });
158
188
  if (!prevContext || props.locale || theme !== prevContext.theme || colorScheme !== prevContext.colorScheme || scale !== prevContext.scale || Object.keys(domProps).length > 0 || otherProps.UNSAFE_className || Object.keys(styleProps.style).length > 0) contents = /*#__PURE__*/ (0, $b6ncI$react).createElement($7167f8da3cce35e4$var$ProviderWrapper, {
@@ -163,6 +193,7 @@ function $7167f8da3cce35e4$var$Provider(props, ref) {
163
193
  },
164
194
  ref: ref
165
195
  }, contents);
196
+ if (router) contents = /*#__PURE__*/ (0, $b6ncI$react).createElement((0, $b6ncI$RouterProvider), router, contents);
166
197
  return /*#__PURE__*/ (0, $b6ncI$react).createElement((0, $a8430f637b4ccbce$export$841858b892ce1f4c).Provider, {
167
198
  value: context
168
199
  }, /*#__PURE__*/ (0, $b6ncI$react).createElement((0, $b6ncI$I18nProvider), {
@@ -177,11 +208,11 @@ function $7167f8da3cce35e4$var$Provider(props, ref) {
177
208
  * and can also be used to provide common properties to a group of components.
178
209
  */ let $7167f8da3cce35e4$export$2881499e37b75b9a = /*#__PURE__*/ (0, $b6ncI$react).forwardRef($7167f8da3cce35e4$var$Provider);
179
210
  const $7167f8da3cce35e4$var$ProviderWrapper = /*#__PURE__*/ (0, $b6ncI$react).forwardRef(function ProviderWrapper(props, ref) {
180
- let { children: children , ...otherProps } = props;
181
- let { locale: locale , direction: direction } = (0, $b6ncI$useLocale)();
182
- let { theme: theme , colorScheme: colorScheme , scale: scale } = $7167f8da3cce35e4$export$693cdb10cec23617();
183
- let { modalProviderProps: modalProviderProps } = (0, $b6ncI$useModalProvider)();
184
- let { styleProps: styleProps } = (0, $b6ncI$useStyleProps)(otherProps);
211
+ let { children: children, ...otherProps } = props;
212
+ let { locale: locale, direction: direction } = (0, $b6ncI$useLocale)();
213
+ let { theme: theme, colorScheme: colorScheme, scale: scale } = $7167f8da3cce35e4$export$693cdb10cec23617();
214
+ let { modalProviderProps: modalProviderProps } = (0, $b6ncI$useModalProvider)();
215
+ let { styleProps: styleProps } = (0, $b6ncI$useStyleProps)(otherProps);
185
216
  let domRef = (0, $b6ncI$useDOMRef)(ref);
186
217
  let themeKey = Object.keys(theme[colorScheme])[0];
187
218
  let scaleKey = Object.keys(theme[scale])[0];
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C;ACZ1C;;;;;;;;;;CAUC;;ACVD;;;;;;;;;;CAUC;AAOM,MAAM,4CAAU,CAAA,GAAA,YAAI,EAAE,cAAsC;AACnE,0CAAQ,cAAc;;;;;;;;;;AClBtB,IAAA;AAAA,4CAA6B;;;;;;;;ACA7B,IAAA;AACA,IAAA;AACA,IAAA;AAFA,4CAA6B;AAC7B,4CAAkC;AAClC,4CAA0C;;;ACF1C;;;;;;;;;;CAUC;AAKM,SAAS,0CAAe,KAAY,EAAE,kBAA+B;IAC1E,IAAI,cAAc,CAAA,GAAA,oBAAY,EAAE;IAChC,IAAI,eAAe,CAAA,GAAA,oBAAY,EAAE;IAEjC,oCAAoC;IAEpC,IAAI,MAAM,QAAQ,aAChB,OAAO;IAGT,IAAI,MAAM,SAAS,cACjB,OAAO;IAGT,IAAI,MAAM,QAAQ,uBAAuB,QACvC,OAAO;IAGT,IAAI,MAAM,SAAS,uBAAuB,SACxC,OAAO;IAGT,IAAI,CAAC,MAAM,MACT,OAAO;IAGT,IAAI,CAAC,MAAM,OACT,OAAO;IAGT,OAAO;AACT;AAEO,SAAS,0CAAS,KAAY;IACnC,IAAI,cAAc,CAAA,GAAA,oBAAY,EAAE;IAChC,IAAI,eAAe,MAAM,QACvB,OAAO;IAGT,IAAI,MAAM,OACR,OAAO;IAGT,OAAO;A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AAGP;AAMO,SAAS;IACd,OAAO,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,yCAAM;AAC1B;AAEO,SAAS,0CAAoB,KAAQ;IAC1C,IAAI,UAAU;IACd,IAAI,CAAC,SACH,OAAO;IAET,OAAO,OAAO,OAAO,CAAC,GAAG;QACvB,SAAS,QAAQ;QACjB,cAAc,QAAQ;QACtB,YAAY,QAAQ;QACpB,YAAY,QAAQ;QACpB,YAAY,QAAQ;QACpB,iBAAiB,QAAQ;IAC3B,GAAG;AACL;","sources":["packages/@react-spectrum/provider/src/index.ts","packages/@react-spectrum/provider/src/Provider.tsx","packages/@react-spectrum/provider/src/context.ts","packages/@adobe/spectrum-css-temp/components/page/vars.css","packages/@adobe/spectrum-css-temp/components/typography/index.css","packages/@react-spectrum/provider/src/mediaQueries.ts","packages/@react-spectrum/provider/package.json"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/// <reference types=\"css-module-types\" />\n\nexport {Provider, useProvider, useProviderProps} from './Provider';\nexport type {ProviderContext} from '@react-types/provider';\nexport type {ProviderProps} from '@react-types/provider';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n BreakpointProvider,\n shouldKeepSpectrumClassNames,\n useDOMRef,\n useMatchedBreakpoints,\n useStyleProps\n} from '@react-spectrum/utils';\nimport clsx from 'clsx';\nimport {Context} from './context';\nimport {DOMRef} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {I18nProvider, useLocale} from '@react-aria/i18n';\nimport {ModalProvider, useModalProvider} from '@react-aria/overlays';\nimport {ProviderContext, ProviderProps} from '@react-types/provider';\nimport React, {useContext, useEffect, useRef} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/page/vars.css';\nimport typographyStyles from '@adobe/spectrum-css-temp/components/typography/index.css';\nimport {useColorScheme, useScale} from './mediaQueries';\n// @ts-ignore\nimport {version} from '../package.json';\n\nconst DEFAULT_BREAKPOINTS = {S: 640, M: 768, L: 1024, XL: 1280, XXL: 1536};\n\nfunction Provider(props: ProviderProps, ref: DOMRef<HTMLDivElement>) {\n let prevContext = useProvider();\n let prevColorScheme = prevContext && prevContext.colorScheme;\n let prevBreakpoints = prevContext && prevContext.breakpoints;\n let {\n theme = prevContext && prevContext.theme,\n defaultColorScheme\n } = props;\n if (!theme) {\n throw new Error('theme not found, the parent provider must have a theme provided');\n }\n // Hooks must always be called.\n let autoColorScheme = useColorScheme(theme, defaultColorScheme);\n let autoScale = useScale(theme);\n let {locale: prevLocale} = useLocale();\n // if the new theme doesn't support the prevColorScheme, we must resort to the auto\n let usePrevColorScheme = !!theme[prevColorScheme];\n\n // importance of color scheme props > parent > auto:(OS > default > omitted)\n let {\n colorScheme = usePrevColorScheme ? prevColorScheme : autoColorScheme,\n scale = prevContext ? prevContext.scale : autoScale,\n locale = prevContext ? prevLocale : null,\n breakpoints = prevContext ? prevBreakpoints : DEFAULT_BREAKPOINTS,\n children,\n isQuiet,\n isEmphasized,\n isDisabled,\n isRequired,\n isReadOnly,\n validationState,\n ...otherProps\n } = props;\n\n // select only the props with values so undefined props don't overwrite prevContext values\n let currentProps = {\n version,\n theme,\n breakpoints,\n colorScheme,\n scale,\n isQuiet,\n isEmphasized,\n isDisabled,\n isRequired,\n isReadOnly,\n validationState\n };\n\n let matchedBreakpoints = useMatchedBreakpoints(breakpoints);\n let filteredProps = {};\n Object.entries(currentProps).forEach(([key, value]) => value !== undefined && (filteredProps[key] = value));\n\n // Merge options with parent provider\n let context = Object.assign({}, prevContext, filteredProps);\n\n // Only wrap in a DOM node if the theme, colorScheme, or scale changed\n let contents = children;\n let domProps = filterDOMProps(otherProps);\n let {styleProps} = useStyleProps(otherProps, undefined, {matchedBreakpoints});\n if (!prevContext || props.locale || theme !== prevContext.theme || colorScheme !== prevContext.colorScheme || scale !== prevContext.scale || Object.keys(domProps).length > 0 || otherProps.UNSAFE_className || Object.keys(styleProps.style).length > 0) {\n contents = (\n <ProviderWrapper {...props} UNSAFE_style={{isolation: !prevContext ? 'isolate' : undefined, ...styleProps.style}} ref={ref}>\n {contents}\n </ProviderWrapper>\n );\n }\n\n return (\n <Context.Provider value={context}>\n <I18nProvider locale={locale}>\n <BreakpointProvider matchedBreakpoints={matchedBreakpoints}>\n <ModalProvider>\n {contents}\n </ModalProvider>\n </BreakpointProvider>\n </I18nProvider>\n </Context.Provider>\n );\n}\n\n/**\n * Provider is the container for all React Spectrum applications.\n * It defines the theme, locale, and other application level settings,\n * and can also be used to provide common properties to a group of components.\n */\nlet _Provider = React.forwardRef(Provider);\nexport {_Provider as Provider};\n\nconst ProviderWrapper = React.forwardRef(function ProviderWrapper(props: ProviderProps, ref: DOMRef<HTMLDivElement>) {\n let {\n children,\n ...otherProps\n } = props;\n let {locale, direction} = useLocale();\n let {theme, colorScheme, scale} = useProvider();\n let {modalProviderProps} = useModalProvider();\n let {styleProps} = useStyleProps(otherProps);\n let domRef = useDOMRef(ref);\n\n let themeKey = Object.keys(theme[colorScheme])[0];\n let scaleKey = Object.keys(theme[scale])[0];\n\n let className = clsx(\n styleProps.className,\n styles['spectrum'],\n typographyStyles['spectrum'],\n Object.values(theme[colorScheme]),\n Object.values(theme[scale]),\n theme.global ? Object.values(theme.global) : null,\n {\n 'react-spectrum-provider': shouldKeepSpectrumClassNames,\n spectrum: shouldKeepSpectrumClassNames,\n [themeKey]: shouldKeepSpectrumClassNames,\n [scaleKey]: shouldKeepSpectrumClassNames\n }\n );\n\n let style = {\n ...styleProps.style,\n // This ensures that browser native UI like scrollbars are rendered in the right color scheme.\n // See https://web.dev/color-scheme/.\n colorScheme: props.colorScheme ?? colorScheme ?? Object.keys(theme).filter(k => k === 'light' || k === 'dark').join(' ')\n };\n\n let hasWarned = useRef(false);\n useEffect(() => {\n if (direction && domRef.current) {\n let closestDir = domRef.current.parentElement.closest('[dir]');\n let dir = closestDir && closestDir.getAttribute('dir');\n if (dir && dir !== direction && !hasWarned.current) {\n console.warn(`Language directions cannot be nested. ${direction} inside ${dir}.`);\n hasWarned.current = true;\n }\n }\n }, [direction, domRef, hasWarned]);\n\n\n return (\n <div\n {...filterDOMProps(otherProps)}\n {...styleProps}\n {...modalProviderProps}\n className={className}\n style={style}\n lang={locale}\n dir={direction}\n ref={domRef}>\n {children}\n </div>\n );\n});\n\n/**\n * Returns the various settings and styles applied by the nearest parent Provider.\n * Properties explicitly set by the nearest parent Provider override those provided by preceeding Providers.\n */\nexport function useProvider(): ProviderContext {\n return useContext(Context);\n}\n\nexport function useProviderProps<T>(props: T) : T {\n let context = useProvider();\n if (!context) {\n return props;\n }\n return Object.assign({}, {\n isQuiet: context.isQuiet,\n isEmphasized: context.isEmphasized,\n isDisabled: context.isDisabled,\n isRequired: context.isRequired,\n isReadOnly: context.isReadOnly,\n validationState: context.validationState\n }, props);\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ProviderContext} from '@react-types/provider';\nimport React from 'react';\n\n// Context is placed in a separate file to avoid fast refresh issue where the old provider context values\n// are immediately replaced with the null default. Stopgap solution until we fix this in parcel.\nexport const Context = React.createContext<ProviderContext | null>(null);\nContext.displayName = 'ProviderContext';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n","/*\nCopyright 2019 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\n@import '../commons/index.css';\n@import 'font.css';\n\n/*@mixin typography .spectrum-Body1 {}\n@mixin typography .spectrum-Body2 {}\n@mixin typography .spectrum-Body3 {}\n@mixin typography .spectrum-Body4 {}\n@mixin typography .spectrum-Body5 {}\n@mixin typography .spectrum-Heading1 {}\n@mixin typography .spectrum-Heading2 {}\n@mixin typography .spectrum-Heading3 {}\n@mixin typography .spectrum-Heading4 {}\n@mixin typography .spectrum-Heading5 {}\n@mixin typography .spectrum-Heading6 {}\n@mixin typography .spectrum-Subheading {}\n@mixin typography .spectrum-Detail {}\n@mixin typography .spectrum-Heading1--quiet, heading-quiet-1 {}\n@mixin typography .spectrum-Heading2--quiet, heading-quiet-2 {}\n@mixin typography .spectrum-Heading1--strong, heading-strong-1 {}\n@mixin typography .spectrum-Heading2--strong, heading-strong-2 {}\n@mixin typography .spectrum-Heading1--display, display-1 {}\n@mixin typography .spectrum-Heading2--display, display-2 {}\n@mixin typography .spectrum-Heading1--display.spectrum-Heading1--strong, display-strong-1 {}\n@mixin typography .spectrum-Heading2--display.spectrum-Heading2--strong, display-strong-2 {}\n@mixin typography .spectrum-Heading1--display.spectrum-Heading1--quiet, display-quiet-1 {}\n@mixin typography .spectrum-Heading2--display.spectrum-Heading2--quiet, display-quiet-2 {}\n\n.spectrum-Typography {\n @mixin typographyMargins .spectrum-Body1 {}\n @mixin typographyMargins .spectrum-Body2 {}\n @mixin typographyMargins .spectrum-Body3 {}\n @mixin typographyMargins .spectrum-Body4 {}\n @mixin typographyMargins .spectrum-Body5 {}\n @mixin typographyMargins .spectrum-Heading1 {}\n @mixin typographyMargins .spectrum-Heading2 {}\n @mixin typographyMargins .spectrum-Heading3 {}\n @mixin typographyMargins .spectrum-Heading4 {}\n @mixin typographyMargins .spectrum-Heading5 {}\n @mixin typographyMargins .spectrum-Heading6 {}\n @mixin typographyMargins .spectrum-Subheading {}\n @mixin typographyMargins .spectrum-Detail {}\n @mixin typographyMargins .spectrum-Heading1--quiet, heading-quiet-1 {}\n @mixin typographyMargins .spectrum-Heading2--quiet, heading-quiet-2 {}\n @mixin typographyMargins .spectrum-Heading1--strong, heading-strong-1 {}\n @mixin typographyMargins .spectrum-Heading2--strong, heading-strong-2 {}\n @mixin typographyMargins .spectrum-Heading1--display, display-1 {}\n @mixin typographyMargins .spectrum-Heading2--display, display-2 {}\n @mixin typographyMargins .spectrum-Heading1--display.spectrum-Heading1--strong, display-strong-1 {}\n @mixin typographyMargins .spectrum-Heading2--display.spectrum-Heading2--strong, display-strong-2 {}\n @mixin typographyMargins .spectrum-Heading1--display.spectrum-Heading1--quiet, display-quiet-1 {}\n @mixin typographyMargins .spectrum-Heading2--display.spectrum-Heading2--quiet, display-quiet-2 {}\n}\n\n.spectrum-Article {\n font-family: var(--spectrum-body-article-1-text-font-family);\n @mixin typography .spectrum-Body1, body-article-1 {}\n @mixin typography .spectrum-Body2, body-article-2 {}\n @mixin typography .spectrum-Body3, body-article-3 {}\n @mixin typography .spectrum-Body4, body-article-4 {}\n @mixin typography .spectrum-Body5, body-article-5 {}\n @mixin typography .spectrum-Heading1, heading-article-1 {}\n @mixin typography .spectrum-Heading2, heading-article-2 {}\n @mixin typography .spectrum-Heading3, heading-article-3 {}\n @mixin typography .spectrum-Heading4, heading-article-4 {}\n @mixin typography .spectrum-Heading5, heading-article-5 {}\n @mixin typography .spectrum-Heading6, heading-article-6 {}\n @mixin typography .spectrum-Subheading, subheading-article {}\n @mixin typography .spectrum-Detail, detail-article {}\n @mixin typography .spectrum-Heading1--quiet, heading-quiet-article-1 {}\n @mixin typography .spectrum-Heading2--quiet, heading-quiet-article-2 {}\n @mixin typography .spectrum-Heading1--display, display-article-1 {}\n @mixin typography .spectrum-Heading2--display, display-article-2 {}\n @mixin typography .spectrum-Heading1--display.spectrum-Heading1--quiet, display-quiet-article-1 {}\n @mixin typography .spectrum-Heading2--display.spectrum-Heading2--quiet, display-quiet-article-2 {}\n}\n.spectrum {\n &:lang(ja),\n &:lang(ko),\n &:lang(zh) {\n @mixin typography .spectrum-Body1, body-han-1 {}\n @mixin typography .spectrum-Body2, body-han-2 {}\n @mixin typography .spectrum-Body3, body-han-3 {}\n @mixin typography .spectrum-Body4, body-han-4 {}\n @mixin typography .spectrum-Body5, body-han-5 {}\n @mixin typography .spectrum-Heading1, heading-han-1 {}\n @mixin typography .spectrum-Heading2, heading-han-2 {}\n @mixin typography .spectrum-Heading3, heading-han-3 {}\n @mixin typography .spectrum-Heading4, heading-han-4 {}\n @mixin typography .spectrum-Heading5, heading-han-5 {}\n @mixin typography .spectrum-Heading6, heading-han-6 {}\n @mixin typography .spectrum-Subheading, subheading-han {}\n @mixin typography .spectrum-Detail, detail-han {}\n @mixin typography .spectrum-Heading1--quiet, heading-quiet-han-1 {}\n @mixin typography .spectrum-Heading2--quiet, heading-quiet-han-2 {}\n @mixin typography .spectrum-Heading1--strong, heading-strong-han-1 {}\n @mixin typography .spectrum-Heading2--strong, heading-strong-han-2 {}\n @mixin typography .spectrum-Heading1--display, display-han-1 {}\n @mixin typography .spectrum-Heading2--display, display-han-2 {}\n @mixin typography .spectrum-Heading1--display.spectrum-Heading1--strong, display-strong-han-1 {}\n @mixin typography .spectrum-Heading2--display.spectrum-Heading2--strong, display-strong-han-2 {}\n @mixin typography .spectrum-Heading1--display.spectrum-Heading1--quiet, display-quiet-han-1 {}\n @mixin typography .spectrum-Heading2--display.spectrum-Heading2--quiet, display-quiet-han-2 {}\n }\n}\n@mixin typography .spectrum-Code1, body-code-1, true {\n font-family: var(--spectrum-body-code-1-text-font-family);\n}\n@mixin typography .spectrum-Code2, body-code-2, true {\n font-family: var(--spectrum-body-code-2-text-font-family);\n}\n@mixin typography .spectrum-Code3, body-code-3, true {\n font-family: var(--spectrum-body-code-3-text-font-family);\n}\n@mixin typography .spectrum-Code4, body-code-4, true {\n font-family: var(--spectrum-body-code-4-text-font-family);\n}\n@mixin typography .spectrum-Code5, body-code-5, true {\n font-family: var(--spectrum-body-code-5-text-font-family);\n}*/\n\n/*\n The &.spectrum makes it so users can do <div class=\"spectrum spectrum--large\"> and still get the right font sizes\n Without this, they would have to do <div class=\"spectrum--large\"><div class=\"spectrum\">, which makes no sense\n*/\n&.spectrum,\n&.spectrum-Body,\n.spectrum,\n.spectrum-Body {\n font-size: var(--spectrum-body-4-text-size);\n font-weight: var(--spectrum-body-4-text-font-weight);\n line-height: var(--spectrum-body-4-text-line-height);\n font-style: var(--spectrum-body-4-text-font-style);\n}\n\n.spectrum-Body--italic {\n font-style: var(--spectrum-body-4-emphasis-text-font-style);\n}\n\n/*\n.spectrum-Body--large {\n @extend .spectrum-Body2;\n}\n\n.spectrum-Body--small {\n @extend .spectrum-Body5;\n}\n\n.spectrum-Body--secondary {\n @extend .spectrum-Body4;\n}\n\n.spectrum-Heading--display {\n @extend .spectrum-Heading2--display.spectrum-Heading2--quiet;\n}\n\n.spectrum-Heading--pageTitle {\n @extend .spectrum-Heading2--quiet;\n}\n\n.spectrum-Heading--subtitle1 {\n @extend .spectrum-Heading4;\n}\n\n.spectrum-Heading--subtitle2 {\n @extend .spectrum-Heading6;\n}\n\n.spectrum-Heading--subtitle3 {\n @extend .spectrum-Subheading;\n}*/\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ColorScheme, Scale, Theme} from '@react-types/provider';\nimport {useMediaQuery} from '@react-spectrum/utils';\n\nexport function useColorScheme(theme: Theme, defaultColorScheme: ColorScheme): ColorScheme {\n let matchesDark = useMediaQuery('(prefers-color-scheme: dark)');\n let matchesLight = useMediaQuery('(prefers-color-scheme: light)');\n\n // importance OS > default > omitted\n\n if (theme.dark && matchesDark) {\n return 'dark';\n }\n\n if (theme.light && matchesLight) {\n return 'light';\n }\n\n if (theme.dark && defaultColorScheme === 'dark') {\n return 'dark';\n }\n\n if (theme.light && defaultColorScheme === 'light') {\n return 'light';\n }\n\n if (!theme.dark) {\n return 'light';\n }\n\n if (!theme.light) {\n return 'dark';\n }\n\n return 'light';\n}\n\nexport function useScale(theme: Theme): Scale {\n let matchesFine = useMediaQuery('(any-pointer: fine)');\n if (matchesFine && theme.medium) {\n return 'medium';\n }\n\n if (theme.large) {\n return 'large';\n }\n\n return 'medium';\n}\n","{\n \"name\": \"@react-spectrum/provider\",\n \"version\": \"3.8.1\",\n \"description\": \"Spectrum UI components in React\",\n \"license\": \"Apache-2.0\",\n \"main\": \"dist/main.js\",\n \"module\": \"dist/module.js\",\n \"exports\": {\n \"types\": \"./dist/types.d.ts\",\n \"import\": \"./dist/import.mjs\",\n \"require\": \"./dist/main.js\"\n },\n \"types\": \"dist/types.d.ts\",\n \"source\": \"src/index.ts\",\n \"files\": [\n \"dist\",\n \"src\"\n ],\n \"sideEffects\": [\n \"*.css\"\n ],\n \"targets\": {\n \"main\": {\n \"includeNodeModules\": [\n \"@adobe/spectrum-css-temp\"\n ]\n },\n \"module\": {\n \"includeNodeModules\": [\n \"@adobe/spectrum-css-temp\"\n ]\n }\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/adobe/react-spectrum\"\n },\n \"dependencies\": {\n \"@react-aria/i18n\": \"^3.8.1\",\n \"@react-aria/overlays\": \"^3.16.0\",\n \"@react-aria/utils\": \"^3.19.0\",\n \"@react-spectrum/utils\": \"^3.10.1\",\n \"@react-types/provider\": \"^3.6.3\",\n \"@react-types/shared\": \"^3.19.0\",\n \"@swc/helpers\": \"^0.5.0\",\n \"clsx\": \"^1.1.1\"\n },\n \"devDependencies\": {\n \"@adobe/spectrum-css-temp\": \"3.0.0-alpha.1\"\n },\n \"peerDependencies\": {\n \"react\": \"^16.8.0 || ^17.0.0-rc.1 || ^18.0.0\",\n \"react-dom\": \"^16.8.0 || ^17.0.0-rc.1 || ^18.0.0\"\n },\n \"publishConfig\": {\n \"access\": \"public\"\n }\n}\n"],"names":[],"version":3,"file":"module.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C;ACZ1C;;;;;;;;;;CAUC;;ACVD;;;;;;;;;;CAUC;AAOM,MAAM,4CAAU,CAAA,GAAA,YAAI,EAAE,cAAsC;AACnE,0CAAQ,cAAc;;;;;;;;;;;;;;;AClBtB,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AALA,4CAA+B,CAAC,iB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ACN,KAAK;QACL,KAAK;OACJ;AAGP;AAMO,SAAS;IACd,OAAO,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,yCAAM;AAC1B;AAEO,SAAS,0CAAoB,KAAQ;IAC1C,IAAI,UAAU;IACd,IAAI,CAAC,SACH,OAAO;IAET,OAAO,OAAO,OAAO,CAAC,GAAG;QACvB,SAAS,QAAQ;QACjB,cAAc,QAAQ;QACtB,YAAY,QAAQ;QACpB,YAAY,QAAQ;QACpB,YAAY,QAAQ;QACpB,iBAAiB,QAAQ;IAC3B,GAAG;AACL;","sources":["packages/@react-spectrum/provider/src/index.ts","packages/@react-spectrum/provider/src/Provider.tsx","packages/@react-spectrum/provider/src/context.ts","packages/@adobe/spectrum-css-temp/components/page/vars.css","packages/@adobe/spectrum-css-temp/components/typography/index.css","packages/@react-spectrum/provider/src/mediaQueries.ts","packages/@react-spectrum/provider/package.json"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/// <reference types=\"css-module-types\" />\n\nexport {Provider, useProvider, useProviderProps} from './Provider';\nexport type {ProviderContext} from '@react-types/provider';\nexport type {ProviderProps} from '@react-types/provider';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n BreakpointProvider,\n shouldKeepSpectrumClassNames,\n useDOMRef,\n useMatchedBreakpoints,\n useStyleProps\n} from '@react-spectrum/utils';\nimport clsx from 'clsx';\nimport {Context} from './context';\nimport {DOMRef} from '@react-types/shared';\nimport {filterDOMProps, RouterProvider} from '@react-aria/utils';\nimport {I18nProvider, useLocale} from '@react-aria/i18n';\nimport {ModalProvider, useModalProvider} from '@react-aria/overlays';\nimport {ProviderContext, ProviderProps} from '@react-types/provider';\nimport React, {useContext, useEffect, useRef} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/page/vars.css';\nimport typographyStyles from '@adobe/spectrum-css-temp/components/typography/index.css';\nimport {useColorScheme, useScale} from './mediaQueries';\n// @ts-ignore\nimport {version} from '../package.json';\n\nconst DEFAULT_BREAKPOINTS = {S: 640, M: 768, L: 1024, XL: 1280, XXL: 1536};\n\nfunction Provider(props: ProviderProps, ref: DOMRef<HTMLDivElement>) {\n let prevContext = useProvider();\n let prevColorScheme = prevContext && prevContext.colorScheme;\n let prevBreakpoints = prevContext && prevContext.breakpoints;\n let {\n theme = prevContext && prevContext.theme,\n defaultColorScheme\n } = props;\n if (!theme) {\n throw new Error('theme not found, the parent provider must have a theme provided');\n }\n // Hooks must always be called.\n let autoColorScheme = useColorScheme(theme, defaultColorScheme);\n let autoScale = useScale(theme);\n let {locale: prevLocale} = useLocale();\n // if the new theme doesn't support the prevColorScheme, we must resort to the auto\n let usePrevColorScheme = !!theme[prevColorScheme];\n\n // importance of color scheme props > parent > auto:(OS > default > omitted)\n let {\n colorScheme = usePrevColorScheme ? prevColorScheme : autoColorScheme,\n scale = prevContext ? prevContext.scale : autoScale,\n locale = prevContext ? prevLocale : null,\n breakpoints = prevContext ? prevBreakpoints : DEFAULT_BREAKPOINTS,\n children,\n isQuiet,\n isEmphasized,\n isDisabled,\n isRequired,\n isReadOnly,\n validationState,\n router,\n ...otherProps\n } = props;\n\n // select only the props with values so undefined props don't overwrite prevContext values\n let currentProps = {\n version,\n theme,\n breakpoints,\n colorScheme,\n scale,\n isQuiet,\n isEmphasized,\n isDisabled,\n isRequired,\n isReadOnly,\n validationState\n };\n\n let matchedBreakpoints = useMatchedBreakpoints(breakpoints);\n let filteredProps = {};\n Object.entries(currentProps).forEach(([key, value]) => value !== undefined && (filteredProps[key] = value));\n\n // Merge options with parent provider\n let context = Object.assign({}, prevContext, filteredProps);\n\n // Only wrap in a DOM node if the theme, colorScheme, or scale changed\n let contents = children;\n let domProps = filterDOMProps(otherProps);\n let {styleProps} = useStyleProps(otherProps, undefined, {matchedBreakpoints});\n if (!prevContext || props.locale || theme !== prevContext.theme || colorScheme !== prevContext.colorScheme || scale !== prevContext.scale || Object.keys(domProps).length > 0 || otherProps.UNSAFE_className || Object.keys(styleProps.style).length > 0) {\n contents = (\n <ProviderWrapper {...props} UNSAFE_style={{isolation: !prevContext ? 'isolate' : undefined, ...styleProps.style}} ref={ref}>\n {contents}\n </ProviderWrapper>\n );\n }\n\n if (router) {\n contents = <RouterProvider {...router}>{contents}</RouterProvider>;\n }\n\n return (\n <Context.Provider value={context}>\n <I18nProvider locale={locale}>\n <BreakpointProvider matchedBreakpoints={matchedBreakpoints}>\n <ModalProvider>\n {contents}\n </ModalProvider>\n </BreakpointProvider>\n </I18nProvider>\n </Context.Provider>\n );\n}\n\n/**\n * Provider is the container for all React Spectrum applications.\n * It defines the theme, locale, and other application level settings,\n * and can also be used to provide common properties to a group of components.\n */\nlet _Provider = React.forwardRef(Provider);\nexport {_Provider as Provider};\n\nconst ProviderWrapper = React.forwardRef(function ProviderWrapper(props: ProviderProps, ref: DOMRef<HTMLDivElement>) {\n let {\n children,\n ...otherProps\n } = props;\n let {locale, direction} = useLocale();\n let {theme, colorScheme, scale} = useProvider();\n let {modalProviderProps} = useModalProvider();\n let {styleProps} = useStyleProps(otherProps);\n let domRef = useDOMRef(ref);\n\n let themeKey = Object.keys(theme[colorScheme])[0];\n let scaleKey = Object.keys(theme[scale])[0];\n\n let className = clsx(\n styleProps.className,\n styles['spectrum'],\n typographyStyles['spectrum'],\n Object.values(theme[colorScheme]),\n Object.values(theme[scale]),\n theme.global ? Object.values(theme.global) : null,\n {\n 'react-spectrum-provider': shouldKeepSpectrumClassNames,\n spectrum: shouldKeepSpectrumClassNames,\n [themeKey]: shouldKeepSpectrumClassNames,\n [scaleKey]: shouldKeepSpectrumClassNames\n }\n );\n\n let style = {\n ...styleProps.style,\n // This ensures that browser native UI like scrollbars are rendered in the right color scheme.\n // See https://web.dev/color-scheme/.\n colorScheme: props.colorScheme ?? colorScheme ?? Object.keys(theme).filter(k => k === 'light' || k === 'dark').join(' ')\n };\n\n let hasWarned = useRef(false);\n useEffect(() => {\n if (direction && domRef.current) {\n let closestDir = domRef.current.parentElement.closest('[dir]');\n let dir = closestDir && closestDir.getAttribute('dir');\n if (dir && dir !== direction && !hasWarned.current) {\n console.warn(`Language directions cannot be nested. ${direction} inside ${dir}.`);\n hasWarned.current = true;\n }\n }\n }, [direction, domRef, hasWarned]);\n\n\n return (\n <div\n {...filterDOMProps(otherProps)}\n {...styleProps}\n {...modalProviderProps}\n className={className}\n style={style}\n lang={locale}\n dir={direction}\n ref={domRef}>\n {children}\n </div>\n );\n});\n\n/**\n * Returns the various settings and styles applied by the nearest parent Provider.\n * Properties explicitly set by the nearest parent Provider override those provided by preceeding Providers.\n */\nexport function useProvider(): ProviderContext {\n return useContext(Context);\n}\n\nexport function useProviderProps<T>(props: T) : T {\n let context = useProvider();\n if (!context) {\n return props;\n }\n return Object.assign({}, {\n isQuiet: context.isQuiet,\n isEmphasized: context.isEmphasized,\n isDisabled: context.isDisabled,\n isRequired: context.isRequired,\n isReadOnly: context.isReadOnly,\n validationState: context.validationState\n }, props);\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ProviderContext} from '@react-types/provider';\nimport React from 'react';\n\n// Context is placed in a separate file to avoid fast refresh issue where the old provider context values\n// are immediately replaced with the null default. Stopgap solution until we fix this in parcel.\nexport const Context = React.createContext<ProviderContext | null>(null);\nContext.displayName = 'ProviderContext';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n","/*\nCopyright 2019 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\n@import '../commons/index.css';\n@import 'font.css';\n\n/*@mixin typography .spectrum-Body1 {}\n@mixin typography .spectrum-Body2 {}\n@mixin typography .spectrum-Body3 {}\n@mixin typography .spectrum-Body4 {}\n@mixin typography .spectrum-Body5 {}\n@mixin typography .spectrum-Heading1 {}\n@mixin typography .spectrum-Heading2 {}\n@mixin typography .spectrum-Heading3 {}\n@mixin typography .spectrum-Heading4 {}\n@mixin typography .spectrum-Heading5 {}\n@mixin typography .spectrum-Heading6 {}\n@mixin typography .spectrum-Subheading {}\n@mixin typography .spectrum-Detail {}\n@mixin typography .spectrum-Heading1--quiet, heading-quiet-1 {}\n@mixin typography .spectrum-Heading2--quiet, heading-quiet-2 {}\n@mixin typography .spectrum-Heading1--strong, heading-strong-1 {}\n@mixin typography .spectrum-Heading2--strong, heading-strong-2 {}\n@mixin typography .spectrum-Heading1--display, display-1 {}\n@mixin typography .spectrum-Heading2--display, display-2 {}\n@mixin typography .spectrum-Heading1--display.spectrum-Heading1--strong, display-strong-1 {}\n@mixin typography .spectrum-Heading2--display.spectrum-Heading2--strong, display-strong-2 {}\n@mixin typography .spectrum-Heading1--display.spectrum-Heading1--quiet, display-quiet-1 {}\n@mixin typography .spectrum-Heading2--display.spectrum-Heading2--quiet, display-quiet-2 {}\n\n.spectrum-Typography {\n @mixin typographyMargins .spectrum-Body1 {}\n @mixin typographyMargins .spectrum-Body2 {}\n @mixin typographyMargins .spectrum-Body3 {}\n @mixin typographyMargins .spectrum-Body4 {}\n @mixin typographyMargins .spectrum-Body5 {}\n @mixin typographyMargins .spectrum-Heading1 {}\n @mixin typographyMargins .spectrum-Heading2 {}\n @mixin typographyMargins .spectrum-Heading3 {}\n @mixin typographyMargins .spectrum-Heading4 {}\n @mixin typographyMargins .spectrum-Heading5 {}\n @mixin typographyMargins .spectrum-Heading6 {}\n @mixin typographyMargins .spectrum-Subheading {}\n @mixin typographyMargins .spectrum-Detail {}\n @mixin typographyMargins .spectrum-Heading1--quiet, heading-quiet-1 {}\n @mixin typographyMargins .spectrum-Heading2--quiet, heading-quiet-2 {}\n @mixin typographyMargins .spectrum-Heading1--strong, heading-strong-1 {}\n @mixin typographyMargins .spectrum-Heading2--strong, heading-strong-2 {}\n @mixin typographyMargins .spectrum-Heading1--display, display-1 {}\n @mixin typographyMargins .spectrum-Heading2--display, display-2 {}\n @mixin typographyMargins .spectrum-Heading1--display.spectrum-Heading1--strong, display-strong-1 {}\n @mixin typographyMargins .spectrum-Heading2--display.spectrum-Heading2--strong, display-strong-2 {}\n @mixin typographyMargins .spectrum-Heading1--display.spectrum-Heading1--quiet, display-quiet-1 {}\n @mixin typographyMargins .spectrum-Heading2--display.spectrum-Heading2--quiet, display-quiet-2 {}\n}\n\n.spectrum-Article {\n font-family: var(--spectrum-body-article-1-text-font-family);\n @mixin typography .spectrum-Body1, body-article-1 {}\n @mixin typography .spectrum-Body2, body-article-2 {}\n @mixin typography .spectrum-Body3, body-article-3 {}\n @mixin typography .spectrum-Body4, body-article-4 {}\n @mixin typography .spectrum-Body5, body-article-5 {}\n @mixin typography .spectrum-Heading1, heading-article-1 {}\n @mixin typography .spectrum-Heading2, heading-article-2 {}\n @mixin typography .spectrum-Heading3, heading-article-3 {}\n @mixin typography .spectrum-Heading4, heading-article-4 {}\n @mixin typography .spectrum-Heading5, heading-article-5 {}\n @mixin typography .spectrum-Heading6, heading-article-6 {}\n @mixin typography .spectrum-Subheading, subheading-article {}\n @mixin typography .spectrum-Detail, detail-article {}\n @mixin typography .spectrum-Heading1--quiet, heading-quiet-article-1 {}\n @mixin typography .spectrum-Heading2--quiet, heading-quiet-article-2 {}\n @mixin typography .spectrum-Heading1--display, display-article-1 {}\n @mixin typography .spectrum-Heading2--display, display-article-2 {}\n @mixin typography .spectrum-Heading1--display.spectrum-Heading1--quiet, display-quiet-article-1 {}\n @mixin typography .spectrum-Heading2--display.spectrum-Heading2--quiet, display-quiet-article-2 {}\n}\n.spectrum {\n &:lang(ja),\n &:lang(ko),\n &:lang(zh) {\n @mixin typography .spectrum-Body1, body-han-1 {}\n @mixin typography .spectrum-Body2, body-han-2 {}\n @mixin typography .spectrum-Body3, body-han-3 {}\n @mixin typography .spectrum-Body4, body-han-4 {}\n @mixin typography .spectrum-Body5, body-han-5 {}\n @mixin typography .spectrum-Heading1, heading-han-1 {}\n @mixin typography .spectrum-Heading2, heading-han-2 {}\n @mixin typography .spectrum-Heading3, heading-han-3 {}\n @mixin typography .spectrum-Heading4, heading-han-4 {}\n @mixin typography .spectrum-Heading5, heading-han-5 {}\n @mixin typography .spectrum-Heading6, heading-han-6 {}\n @mixin typography .spectrum-Subheading, subheading-han {}\n @mixin typography .spectrum-Detail, detail-han {}\n @mixin typography .spectrum-Heading1--quiet, heading-quiet-han-1 {}\n @mixin typography .spectrum-Heading2--quiet, heading-quiet-han-2 {}\n @mixin typography .spectrum-Heading1--strong, heading-strong-han-1 {}\n @mixin typography .spectrum-Heading2--strong, heading-strong-han-2 {}\n @mixin typography .spectrum-Heading1--display, display-han-1 {}\n @mixin typography .spectrum-Heading2--display, display-han-2 {}\n @mixin typography .spectrum-Heading1--display.spectrum-Heading1--strong, display-strong-han-1 {}\n @mixin typography .spectrum-Heading2--display.spectrum-Heading2--strong, display-strong-han-2 {}\n @mixin typography .spectrum-Heading1--display.spectrum-Heading1--quiet, display-quiet-han-1 {}\n @mixin typography .spectrum-Heading2--display.spectrum-Heading2--quiet, display-quiet-han-2 {}\n }\n}\n@mixin typography .spectrum-Code1, body-code-1, true {\n font-family: var(--spectrum-body-code-1-text-font-family);\n}\n@mixin typography .spectrum-Code2, body-code-2, true {\n font-family: var(--spectrum-body-code-2-text-font-family);\n}\n@mixin typography .spectrum-Code3, body-code-3, true {\n font-family: var(--spectrum-body-code-3-text-font-family);\n}\n@mixin typography .spectrum-Code4, body-code-4, true {\n font-family: var(--spectrum-body-code-4-text-font-family);\n}\n@mixin typography .spectrum-Code5, body-code-5, true {\n font-family: var(--spectrum-body-code-5-text-font-family);\n}*/\n\n/*\n The &.spectrum makes it so users can do <div class=\"spectrum spectrum--large\"> and still get the right font sizes\n Without this, they would have to do <div class=\"spectrum--large\"><div class=\"spectrum\">, which makes no sense\n*/\n.spectrum,\n.spectrum-Body,\n.spectrum,\n.spectrum-Body {\n font-size: var(--spectrum-body-4-text-size);\n font-weight: var(--spectrum-body-4-text-font-weight);\n line-height: var(--spectrum-body-4-text-line-height);\n font-style: var(--spectrum-body-4-text-font-style);\n}\n\n.spectrum-Body--italic {\n font-style: var(--spectrum-body-4-emphasis-text-font-style);\n}\n\n/*\n.spectrum-Body--large {\n @extend .spectrum-Body2;\n}\n\n.spectrum-Body--small {\n @extend .spectrum-Body5;\n}\n\n.spectrum-Body--secondary {\n @extend .spectrum-Body4;\n}\n\n.spectrum-Heading--display {\n @extend .spectrum-Heading2--display.spectrum-Heading2--quiet;\n}\n\n.spectrum-Heading--pageTitle {\n @extend .spectrum-Heading2--quiet;\n}\n\n.spectrum-Heading--subtitle1 {\n @extend .spectrum-Heading4;\n}\n\n.spectrum-Heading--subtitle2 {\n @extend .spectrum-Heading6;\n}\n\n.spectrum-Heading--subtitle3 {\n @extend .spectrum-Subheading;\n}*/\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ColorScheme, Scale, Theme} from '@react-types/provider';\nimport {useMediaQuery} from '@react-spectrum/utils';\n\nexport function useColorScheme(theme: Theme, defaultColorScheme: ColorScheme): ColorScheme {\n let matchesDark = useMediaQuery('(prefers-color-scheme: dark)');\n let matchesLight = useMediaQuery('(prefers-color-scheme: light)');\n\n // importance OS > default > omitted\n\n if (theme.dark && matchesDark) {\n return 'dark';\n }\n\n if (theme.light && matchesLight) {\n return 'light';\n }\n\n if (theme.dark && defaultColorScheme === 'dark') {\n return 'dark';\n }\n\n if (theme.light && defaultColorScheme === 'light') {\n return 'light';\n }\n\n if (!theme.dark) {\n return 'light';\n }\n\n if (!theme.light) {\n return 'dark';\n }\n\n return 'light';\n}\n\nexport function useScale(theme: Theme): Scale {\n let matchesFine = useMediaQuery('(any-pointer: fine)');\n if (matchesFine && theme.medium) {\n return 'medium';\n }\n\n if (theme.large) {\n return 'large';\n }\n\n return 'medium';\n}\n","{\n \"name\": \"@react-spectrum/provider\",\n \"version\": \"3.8.2\",\n \"description\": \"Spectrum UI components in React\",\n \"license\": \"Apache-2.0\",\n \"main\": \"dist/main.js\",\n \"module\": \"dist/module.js\",\n \"exports\": {\n \"types\": \"./dist/types.d.ts\",\n \"import\": \"./dist/import.mjs\",\n \"require\": \"./dist/main.js\"\n },\n \"types\": \"dist/types.d.ts\",\n \"source\": \"src/index.ts\",\n \"files\": [\n \"dist\",\n \"src\"\n ],\n \"sideEffects\": [\n \"*.css\"\n ],\n \"targets\": {\n \"main\": {\n \"includeNodeModules\": [\n \"@adobe/spectrum-css-temp\"\n ]\n },\n \"module\": {\n \"includeNodeModules\": [\n \"@adobe/spectrum-css-temp\"\n ]\n }\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/adobe/react-spectrum\"\n },\n \"dependencies\": {\n \"@react-aria/i18n\": \"^3.8.2\",\n \"@react-aria/overlays\": \"^3.17.0\",\n \"@react-aria/utils\": \"^3.20.0\",\n \"@react-spectrum/utils\": \"^3.10.2\",\n \"@react-types/provider\": \"^3.6.4\",\n \"@react-types/shared\": \"^3.20.0\",\n \"@swc/helpers\": \"^0.5.0\",\n \"clsx\": \"^1.1.1\"\n },\n \"devDependencies\": {\n \"@adobe/spectrum-css-temp\": \"3.0.0-alpha.1\"\n },\n \"peerDependencies\": {\n \"react\": \"^16.8.0 || ^17.0.0-rc.1 || ^18.0.0\",\n \"react-dom\": \"^16.8.0 || ^17.0.0-rc.1 || ^18.0.0\"\n },\n \"publishConfig\": {\n \"access\": \"public\"\n }\n}\n"],"names":[],"version":3,"file":"module.js.map"}
@@ -1 +1 @@
1
- {"mappings":";;AEoHA;;;;GAIG;AACH,OAAA,IAAI,yIAAsC,CAAC;AAmE3C;;;GAGG;AACH,+BAA+B,eAAe,CAE7C;AAED,iCAAiC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAI,CAAC,CAahD;AClMD,YAAY,EAAC,eAAe,EAAC,MAAM,uBAAuB,CAAC;AAC3D,YAAY,EAAC,aAAa,EAAC,MAAM,uBAAuB,CAAC","sources":["packages/@react-spectrum/provider/src/packages/@react-spectrum/provider/src/context.ts","packages/@react-spectrum/provider/src/packages/@react-spectrum/provider/src/mediaQueries.ts","packages/@react-spectrum/provider/src/packages/@react-spectrum/provider/src/Provider.tsx","packages/@react-spectrum/provider/src/packages/@react-spectrum/provider/src/index.ts","packages/@react-spectrum/provider/src/index.ts"],"sourcesContent":[null,null,null,null,"/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/// <reference types=\"css-module-types\" />\n\nexport {Provider, useProvider, useProviderProps} from './Provider';\nexport type {ProviderContext} from '@react-types/provider';\nexport type {ProviderProps} from '@react-types/provider';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
1
+ {"mappings":";;AEyHA;;;;GAIG;AACH,OAAA,IAAI,yIAAsC,CAAC;AAmE3C;;;GAGG;AACH,+BAA+B,eAAe,CAE7C;AAED,iCAAiC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAI,CAAC,CAahD;ACvMD,YAAY,EAAC,eAAe,EAAC,MAAM,uBAAuB,CAAC;AAC3D,YAAY,EAAC,aAAa,EAAC,MAAM,uBAAuB,CAAC","sources":["packages/@react-spectrum/provider/src/packages/@react-spectrum/provider/src/context.ts","packages/@react-spectrum/provider/src/packages/@react-spectrum/provider/src/mediaQueries.ts","packages/@react-spectrum/provider/src/packages/@react-spectrum/provider/src/Provider.tsx","packages/@react-spectrum/provider/src/packages/@react-spectrum/provider/src/index.ts","packages/@react-spectrum/provider/src/index.ts"],"sourcesContent":[null,null,null,null,"/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/// <reference types=\"css-module-types\" />\n\nexport {Provider, useProvider, useProviderProps} from './Provider';\nexport type {ProviderContext} from '@react-types/provider';\nexport type {ProviderProps} from '@react-types/provider';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-spectrum/provider",
3
- "version": "3.8.2",
3
+ "version": "3.9.0",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
@@ -36,12 +36,12 @@
36
36
  "url": "https://github.com/adobe/react-spectrum"
37
37
  },
38
38
  "dependencies": {
39
- "@react-aria/i18n": "^3.8.2",
40
- "@react-aria/overlays": "^3.17.0",
41
- "@react-aria/utils": "^3.20.0",
42
- "@react-spectrum/utils": "^3.10.2",
43
- "@react-types/provider": "^3.6.4",
44
- "@react-types/shared": "^3.20.0",
39
+ "@react-aria/i18n": "^3.8.3",
40
+ "@react-aria/overlays": "^3.18.0",
41
+ "@react-aria/utils": "^3.21.0",
42
+ "@react-spectrum/utils": "^3.11.0",
43
+ "@react-types/provider": "^3.7.0",
44
+ "@react-types/shared": "^3.21.0",
45
45
  "@swc/helpers": "^0.5.0",
46
46
  "clsx": "^1.1.1"
47
47
  },
@@ -55,5 +55,5 @@
55
55
  "publishConfig": {
56
56
  "access": "public"
57
57
  },
58
- "gitHead": "54fbaa67cc56867506811819fef765546d403253"
58
+ "gitHead": "4122e44d1991c90507d630d35ed297f89db435d3"
59
59
  }
package/src/Provider.tsx CHANGED
@@ -20,7 +20,7 @@ import {
20
20
  import clsx from 'clsx';
21
21
  import {Context} from './context';
22
22
  import {DOMRef} from '@react-types/shared';
23
- import {filterDOMProps} from '@react-aria/utils';
23
+ import {filterDOMProps, RouterProvider} from '@react-aria/utils';
24
24
  import {I18nProvider, useLocale} from '@react-aria/i18n';
25
25
  import {ModalProvider, useModalProvider} from '@react-aria/overlays';
26
26
  import {ProviderContext, ProviderProps} from '@react-types/provider';
@@ -64,6 +64,7 @@ function Provider(props: ProviderProps, ref: DOMRef<HTMLDivElement>) {
64
64
  isRequired,
65
65
  isReadOnly,
66
66
  validationState,
67
+ router,
67
68
  ...otherProps
68
69
  } = props;
69
70
 
@@ -101,6 +102,10 @@ function Provider(props: ProviderProps, ref: DOMRef<HTMLDivElement>) {
101
102
  );
102
103
  }
103
104
 
105
+ if (router) {
106
+ contents = <RouterProvider {...router}>{contents}</RouterProvider>;
107
+ }
108
+
104
109
  return (
105
110
  <Context.Provider value={context}>
106
111
  <I18nProvider locale={locale}>