@react-spectrum/provider 3.0.0-nightly.1394 → 3.0.0-nightly.1409

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.css CHANGED
@@ -1 +1 @@
1
- ._spectrum_b37d53{-webkit-tap-highlight-color:rgba(0,0,0,0);background-color:var(--spectrum-alias-background-color-default,var(--spectrum-global-color-gray-100))}._spectrum_2a241c{font-family:adobe-clean-ux,adobe-clean,Source Sans Pro,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}._spectrum_2a241c:lang(ar){font-family:adobe-arabic,myriad-arabic,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}._spectrum_2a241c:lang(he){font-family:adobe-hebrew,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}._spectrum_2a241c:lang(zh),._spectrum_2a241c:lang(zh-Hans){font-family:adobe-clean-han-simplified-c,SimSun,Heiti SC Light,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}._spectrum_2a241c:lang(ko){font-family:adobe-clean-han-korean,Malgun Gothic,Apple Gothic,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}._spectrum_2a241c:lang(ja){font-family:adobe-clean-han-japanese,Yu Gothic,"\30E1 \30A4 \30EA \30AA","\30D2 \30E9 \30AE \30CE \89D2 \30B4 Pro W3",Hiragino Kaku Gothic Pro W3,Osaka,"\FF2D \FF33 \FF30 \30B4 \30B7 \30C3 \30AF",MS PGothic,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}._spectrum_2a241c{color:var(--spectrum-global-color-gray-800);font-size:var(--spectrum-alias-font-size-default,var(--spectrum-global-dimension-font-size-100))}._spectrum-Body_2a241c,._spectrum_2a241c,._spectrum_2a241c._spectrum-Body_2a241c{font-size:var(--spectrum-body-4-text-size,var(--spectrum-alias-font-size-default));font-style:var(--spectrum-body-4-text-font-style,var(--spectrum-global-font-style-regular));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))}._spectrum-Body--italic_2a241c{font-style:var(--spectrum-body-4-emphasis-text-font-style,var(--spectrum-global-font-style-italic))}
1
+ .spectrum_b37d53{background-color:var(--spectrum-alias-background-color-default,var(--spectrum-global-color-gray-100));-webkit-tap-highlight-color:#0000}.spectrum_2a241c{font-family:adobe-clean-ux,adobe-clean,Source Sans Pro,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}.spectrum_2a241c:lang(ar){font-family:adobe-arabic,myriad-arabic,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}.spectrum_2a241c:lang(he){font-family:adobe-hebrew,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}.spectrum_2a241c:lang(zh-Hans),.spectrum_2a241c:lang(zh){font-family:adobe-clean-han-simplified-c,SimSun,Heiti SC Light,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}.spectrum_2a241c:lang(ko){font-family:adobe-clean-han-korean,Malgun Gothic,Apple Gothic,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}.spectrum_2a241c:lang(ja){font-family:adobe-clean-han-japanese,Yu Gothic,メイリオ,ヒラギノ角ゴ Pro W3,Hiragino Kaku Gothic Pro W3,Osaka,MSPゴシック,MS PGothic,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,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))}
package/dist/main.js CHANGED
@@ -1,10 +1,10 @@
1
1
  require("./main.css");
2
- var $2NmhC$reactspectrumutils = require("@react-spectrum/utils");
3
- var $2NmhC$clsx = require("clsx");
4
- var $2NmhC$reactariautils = require("@react-aria/utils");
5
- var $2NmhC$reactariai18n = require("@react-aria/i18n");
6
- var $2NmhC$reactariaoverlays = require("@react-aria/overlays");
7
- var $2NmhC$react = require("react");
2
+ var $br6yh$reactspectrumutils = require("@react-spectrum/utils");
3
+ var $br6yh$clsx = require("clsx");
4
+ var $br6yh$reactariautils = require("@react-aria/utils");
5
+ var $br6yh$reactariai18n = require("@react-aria/i18n");
6
+ var $br6yh$reactariaoverlays = require("@react-aria/overlays");
7
+ var $br6yh$react = require("react");
8
8
 
9
9
  function $parcel$exportWildcard(dest, source) {
10
10
  Object.keys(source).forEach(function(key) {
@@ -28,41 +28,41 @@ function $parcel$interopDefault(a) {
28
28
  function $parcel$export(e, n, v, s) {
29
29
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
30
30
  }
31
- var $5cde3205b175dbab$exports = {};
31
+ var $12da041f6e43788e$exports = {};
32
32
 
33
- $parcel$export($5cde3205b175dbab$exports, "useProvider", () => $5cde3205b175dbab$export$693cdb10cec23617);
34
- $parcel$export($5cde3205b175dbab$exports, "Provider", () => $5cde3205b175dbab$export$2881499e37b75b9a);
35
- $parcel$export($5cde3205b175dbab$exports, "useProviderProps", () => $5cde3205b175dbab$export$521c373ccc32c300);
33
+ $parcel$export($12da041f6e43788e$exports, "useProvider", () => $12da041f6e43788e$export$693cdb10cec23617);
34
+ $parcel$export($12da041f6e43788e$exports, "Provider", () => $12da041f6e43788e$export$2881499e37b75b9a);
35
+ $parcel$export($12da041f6e43788e$exports, "useProviderProps", () => $12da041f6e43788e$export$521c373ccc32c300);
36
36
 
37
37
 
38
38
 
39
39
 
40
40
 
41
41
 
42
- var $42b2dd52f8612d6f$exports = {};
42
+ var $3d99ec54d13ba0b4$exports = {};
43
43
 
44
- $parcel$export($42b2dd52f8612d6f$exports, "spectrum", () => $42b2dd52f8612d6f$export$3311ab3a441bc141, (v) => $42b2dd52f8612d6f$export$3311ab3a441bc141 = v);
45
- var $42b2dd52f8612d6f$export$3311ab3a441bc141;
46
- $42b2dd52f8612d6f$export$3311ab3a441bc141 = "_spectrum_b37d53";
44
+ $parcel$export($3d99ec54d13ba0b4$exports, "spectrum", () => $3d99ec54d13ba0b4$export$3311ab3a441bc141, (v) => $3d99ec54d13ba0b4$export$3311ab3a441bc141 = v);
45
+ var $3d99ec54d13ba0b4$export$3311ab3a441bc141;
46
+ $3d99ec54d13ba0b4$export$3311ab3a441bc141 = "spectrum_b37d53";
47
47
 
48
48
 
49
- var $97a15cad98500c4c$exports = {};
49
+ var $99f8ec42b38a748b$exports = {};
50
50
 
51
- $parcel$export($97a15cad98500c4c$exports, "spectrum", () => $97a15cad98500c4c$export$3311ab3a441bc141, (v) => $97a15cad98500c4c$export$3311ab3a441bc141 = v);
52
- $parcel$export($97a15cad98500c4c$exports, "spectrum-Body", () => $97a15cad98500c4c$export$a30bf7810c8453d1, (v) => $97a15cad98500c4c$export$a30bf7810c8453d1 = v);
53
- $parcel$export($97a15cad98500c4c$exports, "spectrum-Body--italic", () => $97a15cad98500c4c$export$7b2dac1166f6ec4c, (v) => $97a15cad98500c4c$export$7b2dac1166f6ec4c = v);
54
- var $97a15cad98500c4c$export$3311ab3a441bc141;
55
- var $97a15cad98500c4c$export$a30bf7810c8453d1;
56
- var $97a15cad98500c4c$export$7b2dac1166f6ec4c;
57
- $97a15cad98500c4c$export$3311ab3a441bc141 = "_spectrum_2a241c";
58
- $97a15cad98500c4c$export$a30bf7810c8453d1 = "_spectrum-Body_2a241c";
59
- $97a15cad98500c4c$export$7b2dac1166f6ec4c = "_spectrum-Body--italic_2a241c";
51
+ $parcel$export($99f8ec42b38a748b$exports, "spectrum", () => $99f8ec42b38a748b$export$3311ab3a441bc141, (v) => $99f8ec42b38a748b$export$3311ab3a441bc141 = v);
52
+ $parcel$export($99f8ec42b38a748b$exports, "spectrum-Body", () => $99f8ec42b38a748b$export$a30bf7810c8453d1, (v) => $99f8ec42b38a748b$export$a30bf7810c8453d1 = v);
53
+ $parcel$export($99f8ec42b38a748b$exports, "spectrum-Body--italic", () => $99f8ec42b38a748b$export$7b2dac1166f6ec4c, (v) => $99f8ec42b38a748b$export$7b2dac1166f6ec4c = v);
54
+ var $99f8ec42b38a748b$export$3311ab3a441bc141;
55
+ var $99f8ec42b38a748b$export$a30bf7810c8453d1;
56
+ var $99f8ec42b38a748b$export$7b2dac1166f6ec4c;
57
+ $99f8ec42b38a748b$export$3311ab3a441bc141 = "spectrum_2a241c";
58
+ $99f8ec42b38a748b$export$a30bf7810c8453d1 = "spectrum-Body_2a241c";
59
+ $99f8ec42b38a748b$export$7b2dac1166f6ec4c = "spectrum-Body--italic_2a241c";
60
60
 
61
61
 
62
62
 
63
- function $3966dc1efb3f0caf$export$6343629ee1b29116(theme, defaultColorScheme) {
64
- let matchesDark = $2NmhC$reactspectrumutils.useMediaQuery('(prefers-color-scheme: dark)');
65
- let matchesLight = $2NmhC$reactspectrumutils.useMediaQuery('(prefers-color-scheme: light)');
63
+ function $b7de29dd46c07a43$export$6343629ee1b29116(theme, defaultColorScheme) {
64
+ let matchesDark = $br6yh$reactspectrumutils.useMediaQuery('(prefers-color-scheme: dark)');
65
+ let matchesLight = $br6yh$reactspectrumutils.useMediaQuery('(prefers-color-scheme: light)');
66
66
  // importance OS > default > omitted
67
67
  if (theme.dark && matchesDark) return 'dark';
68
68
  if (theme.light && matchesLight) return 'light';
@@ -72,43 +72,43 @@ function $3966dc1efb3f0caf$export$6343629ee1b29116(theme, defaultColorScheme) {
72
72
  if (!theme.light) return 'dark';
73
73
  return 'light';
74
74
  }
75
- function $3966dc1efb3f0caf$export$a8d2043b2d807f4d(theme) {
76
- let matchesFine = $2NmhC$reactspectrumutils.useMediaQuery('(any-pointer: fine)');
75
+ function $b7de29dd46c07a43$export$a8d2043b2d807f4d(theme) {
76
+ let matchesFine = $br6yh$reactspectrumutils.useMediaQuery('(any-pointer: fine)');
77
77
  if (matchesFine && theme.medium) return 'medium';
78
78
  if (theme.large) return 'large';
79
79
  return 'medium';
80
80
  }
81
81
 
82
82
 
83
- var $8cbe581d15d2be01$exports = {};
84
- $8cbe581d15d2be01$exports = JSON.parse("{\"name\":\"@react-spectrum/provider\",\"version\":\"3.2.2\",\"description\":\"Spectrum UI components in React\",\"license\":\"Apache-2.0\",\"main\":\"dist/main.js\",\"module\":\"dist/module.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\":{\"@babel/runtime\":\"^7.6.2\",\"@react-aria/i18n\":\"^3.3.2\",\"@react-aria/overlays\":\"^3.7.2\",\"@react-aria/utils\":\"^3.8.2\",\"@react-spectrum/utils\":\"^3.6.2\",\"@react-types/provider\":\"^3.3.2\",\"@react-types/shared\":\"^3.8.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\",\"react-dom\":\"^16.8.0 || ^17.0.0-rc.1\"},\"publishConfig\":{\"access\":\"public\"}}");
83
+ var $989921f5057064f5$exports = {};
84
+ $989921f5057064f5$exports = JSON.parse("{\"name\":\"@react-spectrum/provider\",\"version\":\"3.2.2\",\"description\":\"Spectrum UI components in React\",\"license\":\"Apache-2.0\",\"main\":\"dist/main.js\",\"module\":\"dist/module.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\":{\"@babel/runtime\":\"^7.6.2\",\"@react-aria/i18n\":\"^3.3.2\",\"@react-aria/overlays\":\"^3.7.2\",\"@react-aria/utils\":\"^3.8.2\",\"@react-spectrum/utils\":\"^3.6.2\",\"@react-types/provider\":\"^3.3.2\",\"@react-types/shared\":\"^3.8.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\",\"react-dom\":\"^16.8.0 || ^17.0.0-rc.1\"},\"publishConfig\":{\"access\":\"public\"}}");
85
85
 
86
86
 
87
- const $5cde3205b175dbab$var$Context = /*#__PURE__*/ ($parcel$interopDefault($2NmhC$react)).createContext(null);
88
- $5cde3205b175dbab$var$Context.displayName = 'ProviderContext';
89
- const $5cde3205b175dbab$var$DEFAULT_BREAKPOINTS = {
87
+ const $12da041f6e43788e$var$Context = /*#__PURE__*/ ($parcel$interopDefault($br6yh$react)).createContext(null);
88
+ $12da041f6e43788e$var$Context.displayName = 'ProviderContext';
89
+ const $12da041f6e43788e$var$DEFAULT_BREAKPOINTS = {
90
90
  S: 640,
91
91
  M: 768,
92
92
  L: 1024,
93
93
  XL: 1280,
94
94
  XXL: 1536
95
95
  };
96
- function $5cde3205b175dbab$var$Provider(props, ref) {
97
- let prevContext = $5cde3205b175dbab$export$693cdb10cec23617();
96
+ function $12da041f6e43788e$var$Provider(props, ref) {
97
+ let prevContext = $12da041f6e43788e$export$693cdb10cec23617();
98
98
  let prevColorScheme = prevContext && prevContext.colorScheme;
99
99
  let prevBreakpoints = prevContext && prevContext.breakpoints;
100
100
  let { theme: theme = prevContext && prevContext.theme , defaultColorScheme: defaultColorScheme } = props;
101
101
  // Hooks must always be called.
102
- let autoColorScheme = $3966dc1efb3f0caf$export$6343629ee1b29116(theme, defaultColorScheme);
103
- let autoScale = $3966dc1efb3f0caf$export$a8d2043b2d807f4d(theme);
104
- let { locale: prevLocale } = $2NmhC$reactariai18n.useLocale();
102
+ let autoColorScheme = $b7de29dd46c07a43$export$6343629ee1b29116(theme, defaultColorScheme);
103
+ let autoScale = $b7de29dd46c07a43$export$a8d2043b2d807f4d(theme);
104
+ let { locale: prevLocale } = $br6yh$reactariai18n.useLocale();
105
105
  // if the new theme doesn't support the prevColorScheme, we must resort to the auto
106
106
  let usePrevColorScheme = !!theme[prevColorScheme];
107
107
  // importance of color scheme props > parent > auto:(OS > default > omitted)
108
- let { colorScheme: colorScheme = usePrevColorScheme ? prevColorScheme : autoColorScheme , scale: scale = prevContext ? prevContext.scale : autoScale , locale: locale = prevContext ? prevLocale : null , breakpoints: breakpoints = prevContext ? prevBreakpoints : $5cde3205b175dbab$var$DEFAULT_BREAKPOINTS , children: children , isQuiet: isQuiet , isEmphasized: isEmphasized , isDisabled: isDisabled , isRequired: isRequired , isReadOnly: isReadOnly , validationState: validationState , ...otherProps } = props;
108
+ let { colorScheme: colorScheme = usePrevColorScheme ? prevColorScheme : autoColorScheme , scale: scale = prevContext ? prevContext.scale : autoScale , locale: locale = prevContext ? prevLocale : null , breakpoints: breakpoints = prevContext ? prevBreakpoints : $12da041f6e43788e$var$DEFAULT_BREAKPOINTS , children: children , isQuiet: isQuiet , isEmphasized: isEmphasized , isDisabled: isDisabled , isRequired: isRequired , isReadOnly: isReadOnly , validationState: validationState , ...otherProps } = props;
109
109
  // select only the props with values so undefined props don't overwrite prevContext values
110
110
  let currentProps = {
111
- version: $8cbe581d15d2be01$exports.version,
111
+ version: $989921f5057064f5$exports.version,
112
112
  theme: theme,
113
113
  breakpoints: breakpoints,
114
114
  colorScheme: colorScheme,
@@ -120,7 +120,7 @@ function $5cde3205b175dbab$var$Provider(props, ref) {
120
120
  isReadOnly: isReadOnly,
121
121
  validationState: validationState
122
122
  };
123
- let matchedBreakpoints = $2NmhC$reactspectrumutils.useMatchedBreakpoints(breakpoints);
123
+ let matchedBreakpoints = $br6yh$reactspectrumutils.useMatchedBreakpoints(breakpoints);
124
124
  let filteredProps = {
125
125
  };
126
126
  Object.entries(currentProps).forEach(([key, value])=>value !== undefined && (filteredProps[key] = value)
@@ -130,11 +130,11 @@ function $5cde3205b175dbab$var$Provider(props, ref) {
130
130
  }, prevContext, filteredProps);
131
131
  // Only wrap in a DOM node if the theme, colorScheme, or scale changed
132
132
  let contents = children;
133
- let domProps = $2NmhC$reactariautils.filterDOMProps(otherProps);
134
- let { styleProps: styleProps } = $2NmhC$reactspectrumutils.useStyleProps(otherProps, undefined, {
133
+ let domProps = $br6yh$reactariautils.filterDOMProps(otherProps);
134
+ let { styleProps: styleProps } = $br6yh$reactspectrumutils.useStyleProps(otherProps, undefined, {
135
135
  matchedBreakpoints: matchedBreakpoints
136
136
  });
137
- 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__*/ ($parcel$interopDefault($2NmhC$react)).createElement($5cde3205b175dbab$var$ProviderWrapper, {
137
+ 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__*/ ($parcel$interopDefault($br6yh$react)).createElement($12da041f6e43788e$var$ProviderWrapper, {
138
138
  ...props,
139
139
  UNSAFE_style: {
140
140
  isolation: !prevContext ? 'isolate' : undefined,
@@ -142,33 +142,33 @@ function $5cde3205b175dbab$var$Provider(props, ref) {
142
142
  },
143
143
  ref: ref
144
144
  }, contents);
145
- return(/*#__PURE__*/ ($parcel$interopDefault($2NmhC$react)).createElement($5cde3205b175dbab$var$Context.Provider, {
145
+ return(/*#__PURE__*/ ($parcel$interopDefault($br6yh$react)).createElement($12da041f6e43788e$var$Context.Provider, {
146
146
  value: context
147
- }, /*#__PURE__*/ ($parcel$interopDefault($2NmhC$react)).createElement($2NmhC$reactariai18n.I18nProvider, {
147
+ }, /*#__PURE__*/ ($parcel$interopDefault($br6yh$react)).createElement($br6yh$reactariai18n.I18nProvider, {
148
148
  locale: locale
149
- }, /*#__PURE__*/ ($parcel$interopDefault($2NmhC$react)).createElement($2NmhC$reactspectrumutils.BreakpointProvider, {
149
+ }, /*#__PURE__*/ ($parcel$interopDefault($br6yh$react)).createElement($br6yh$reactspectrumutils.BreakpointProvider, {
150
150
  matchedBreakpoints: matchedBreakpoints
151
- }, /*#__PURE__*/ ($parcel$interopDefault($2NmhC$react)).createElement($2NmhC$reactariaoverlays.ModalProvider, null, contents)))));
151
+ }, /*#__PURE__*/ ($parcel$interopDefault($br6yh$react)).createElement($br6yh$reactariaoverlays.ModalProvider, null, contents)))));
152
152
  }
153
153
  /**
154
154
  * Provider is the container for all React Spectrum applications.
155
155
  * It defines the theme, locale, and other application level settings,
156
156
  * and can also be used to provide common properties to a group of components.
157
- */ let $5cde3205b175dbab$export$2881499e37b75b9a = /*#__PURE__*/ ($parcel$interopDefault($2NmhC$react)).forwardRef($5cde3205b175dbab$var$Provider);
158
- const $5cde3205b175dbab$var$ProviderWrapper = /*#__PURE__*/ ($parcel$interopDefault($2NmhC$react)).forwardRef(function ProviderWrapper(props, ref) {
157
+ */ let $12da041f6e43788e$export$2881499e37b75b9a = /*#__PURE__*/ ($parcel$interopDefault($br6yh$react)).forwardRef($12da041f6e43788e$var$Provider);
158
+ const $12da041f6e43788e$var$ProviderWrapper = /*#__PURE__*/ ($parcel$interopDefault($br6yh$react)).forwardRef(function ProviderWrapper(props, ref) {
159
159
  let { children: children , ...otherProps } = props;
160
- let { locale: locale , direction: direction } = $2NmhC$reactariai18n.useLocale();
161
- let { theme: theme , colorScheme: colorScheme , scale: scale } = $5cde3205b175dbab$export$693cdb10cec23617();
162
- let { modalProviderProps: modalProviderProps } = $2NmhC$reactariaoverlays.useModalProvider();
163
- let { styleProps: styleProps } = $2NmhC$reactspectrumutils.useStyleProps(otherProps);
164
- let domRef = $2NmhC$reactspectrumutils.useDOMRef(ref);
160
+ let { locale: locale , direction: direction } = $br6yh$reactariai18n.useLocale();
161
+ let { theme: theme , colorScheme: colorScheme , scale: scale } = $12da041f6e43788e$export$693cdb10cec23617();
162
+ let { modalProviderProps: modalProviderProps } = $br6yh$reactariaoverlays.useModalProvider();
163
+ let { styleProps: styleProps } = $br6yh$reactspectrumutils.useStyleProps(otherProps);
164
+ let domRef = $br6yh$reactspectrumutils.useDOMRef(ref);
165
165
  let themeKey = Object.keys(theme[colorScheme])[0];
166
166
  let scaleKey = Object.keys(theme[scale])[0];
167
- let className = ($parcel$interopDefault($2NmhC$clsx))(styleProps.className, (/*@__PURE__*/$parcel$interopDefault($42b2dd52f8612d6f$exports))['spectrum'], (/*@__PURE__*/$parcel$interopDefault($97a15cad98500c4c$exports))['spectrum'], theme[colorScheme][themeKey], theme[scale][scaleKey], theme.global ? Object.values(theme.global) : null, {
168
- 'react-spectrum-provider': $2NmhC$reactspectrumutils.shouldKeepSpectrumClassNames,
169
- spectrum: $2NmhC$reactspectrumutils.shouldKeepSpectrumClassNames,
170
- [themeKey]: $2NmhC$reactspectrumutils.shouldKeepSpectrumClassNames,
171
- [scaleKey]: $2NmhC$reactspectrumutils.shouldKeepSpectrumClassNames
167
+ let className = ($parcel$interopDefault($br6yh$clsx))(styleProps.className, (/*@__PURE__*/$parcel$interopDefault($3d99ec54d13ba0b4$exports))['spectrum'], (/*@__PURE__*/$parcel$interopDefault($99f8ec42b38a748b$exports))['spectrum'], theme[colorScheme][themeKey], theme[scale][scaleKey], theme.global ? Object.values(theme.global) : null, {
168
+ 'react-spectrum-provider': $br6yh$reactspectrumutils.shouldKeepSpectrumClassNames,
169
+ spectrum: $br6yh$reactspectrumutils.shouldKeepSpectrumClassNames,
170
+ [themeKey]: $br6yh$reactspectrumutils.shouldKeepSpectrumClassNames,
171
+ [scaleKey]: $br6yh$reactspectrumutils.shouldKeepSpectrumClassNames
172
172
  });
173
173
  let style = {
174
174
  ...styleProps.style,
@@ -177,8 +177,8 @@ const $5cde3205b175dbab$var$ProviderWrapper = /*#__PURE__*/ ($parcel$interopDefa
177
177
  colorScheme: (props.colorScheme ?? colorScheme) ?? Object.keys(theme).filter((k)=>k === 'light' || k === 'dark'
178
178
  ).join(' ')
179
179
  };
180
- let hasWarned = $2NmhC$react.useRef(false);
181
- $2NmhC$react.useEffect(()=>{
180
+ let hasWarned = $br6yh$react.useRef(false);
181
+ $br6yh$react.useEffect(()=>{
182
182
  if (direction && domRef.current) {
183
183
  let closestDir = domRef.current.parentElement.closest('[dir]');
184
184
  let dir = closestDir && closestDir.getAttribute('dir');
@@ -192,8 +192,8 @@ const $5cde3205b175dbab$var$ProviderWrapper = /*#__PURE__*/ ($parcel$interopDefa
192
192
  domRef,
193
193
  hasWarned
194
194
  ]);
195
- return(/*#__PURE__*/ ($parcel$interopDefault($2NmhC$react)).createElement("div", {
196
- ...$2NmhC$reactariautils.filterDOMProps(otherProps),
195
+ return(/*#__PURE__*/ ($parcel$interopDefault($br6yh$react)).createElement("div", {
196
+ ...$br6yh$reactariautils.filterDOMProps(otherProps),
197
197
  ...styleProps,
198
198
  ...modalProviderProps,
199
199
  className: className,
@@ -203,11 +203,11 @@ const $5cde3205b175dbab$var$ProviderWrapper = /*#__PURE__*/ ($parcel$interopDefa
203
203
  ref: domRef
204
204
  }, children));
205
205
  });
206
- function $5cde3205b175dbab$export$693cdb10cec23617() {
207
- return $2NmhC$react.useContext($5cde3205b175dbab$var$Context);
206
+ function $12da041f6e43788e$export$693cdb10cec23617() {
207
+ return $br6yh$react.useContext($12da041f6e43788e$var$Context);
208
208
  }
209
- function $5cde3205b175dbab$export$521c373ccc32c300(props) {
210
- let context = $5cde3205b175dbab$export$693cdb10cec23617();
209
+ function $12da041f6e43788e$export$521c373ccc32c300(props) {
210
+ let context = $12da041f6e43788e$export$693cdb10cec23617();
211
211
  if (!context) return props;
212
212
  return Object.assign({
213
213
  }, {
@@ -221,7 +221,7 @@ function $5cde3205b175dbab$export$521c373ccc32c300(props) {
221
221
  }
222
222
 
223
223
 
224
- $parcel$exportWildcard(module.exports, $5cde3205b175dbab$exports);
224
+ $parcel$exportWildcard(module.exports, $12da041f6e43788e$exports);
225
225
 
226
226
 
227
227
  //# sourceMappingURL=main.js.map
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AEAA,GAA0B;AAA1B,yCAA0B,GAAG,CAAkB;;;;;;;;ACA/C,GAA0B;AAC1B,GAA+B;AAC/B,GAAuC;AAFvC,yCAA0B,GAAG,CAAkB;AAC/C,yCAA+B,GAAG,CAAuB;AACzD,yCAAuC,GAAG,CAA+B;;;;SCczD,yCAAc,CAAC,KAAY,EAAE,kBAA+B,EAAe,CAAC;IAC1F,GAAG,CAAC,WAAW,GAAG,uCAAa,CAAC,CAA8B;IAC9D,GAAG,CAAC,YAAY,GAAG,uCAAa,CAAC,CAA+B;IAEhE,EAAoC,AAApC,kCAAoC;IAEpC,EAAE,EAAE,KAAK,CAAC,IAAI,IAAI,WAAW,EAC3B,MAAM,CAAC,CAAM;IAGf,EAAE,EAAE,KAAK,CAAC,KAAK,IAAI,YAAY,EAC7B,MAAM,CAAC,CAAO;IAGhB,EAAE,EAAE,KAAK,CAAC,IAAI,IAAI,kBAAkB,KAAK,CAAM,OAC7C,MAAM,CAAC,CAAM;IAGf,EAAE,EAAE,KAAK,CAAC,KAAK,IAAI,kBAAkB,KAAK,CAAO,QAC/C,MAAM,CAAC,CAAO;IAGhB,EAAE,GAAG,KAAK,CAAC,IAAI,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Provider.tsx","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 * from './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 {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 Context = React.createContext<ProviderContext | null>(null);\nContext.displayName = 'ProviderContext';\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 // 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 theme[colorScheme][themeKey],\n theme[scale][scaleKey],\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\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} from '@react-types/provider';\nimport {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.2.2\",\n \"description\": \"Spectrum UI components in React\",\n \"license\": \"Apache-2.0\",\n \"main\": \"dist/main.js\",\n \"module\": \"dist/module.js\",\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 \"@babel/runtime\": \"^7.6.2\",\n \"@react-aria/i18n\": \"^3.3.2\",\n \"@react-aria/overlays\": \"^3.7.2\",\n \"@react-aria/utils\": \"^3.8.2\",\n \"@react-spectrum/utils\": \"^3.6.2\",\n \"@react-types/provider\": \"^3.3.2\",\n \"@react-types/shared\": \"^3.8.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\",\n \"react-dom\": \"^16.8.0 || ^17.0.0-rc.1\"\n },\n \"publishConfig\": {\n \"access\": \"public\"\n }\n}\n"],"names":[],"version":3,"file":"main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AEAA,GAA0B;AAA1B,yCAA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AAS;QACpB,KAAK,EAAE,KAAK;QACZ,IAAI,EAAE,MAAM;QACZ,GAAG,EAAE,SAAS;QACd,GAAG,EAAE,MAAM;OACV,QAAQ;AAGf,CAAC;SAMe,yCAAW,GAAoB,CAAC;IAC9C,MAAM,CAAC,uBAAU,CAAC,6BAAO;AAC3B,CAAC;SAEe,yCAAgB,CAAI,KAAQ,EAAM,CAAC;IACjD,GAAG,CAAC,OAAO,GAAG,yCAAW;IACzB,EAAE,GAAG,OAAO,EACV,MAAM,CAAC,KAAK;IAEd,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAAA,CAAC,EAAE,CAAC;QACxB,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,YAAY,EAAE,OAAO,CAAC,YAAY;QAClC,UAAU,EAAE,OAAO,CAAC,UAAU;QAC9B,UAAU,EAAE,OAAO,CAAC,UAAU;QAC9B,UAAU,EAAE,OAAO,CAAC,UAAU;QAC9B,eAAe,EAAE,OAAO,CAAC,eAAe;IAC1C,CAAC,EAAE,KAAK;AACV,CAAC","sources":["packages/@react-spectrum/provider/src/index.ts","packages/@react-spectrum/provider/src/Provider.tsx","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 * from './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 {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 Context = React.createContext<ProviderContext | null>(null);\nContext.displayName = 'ProviderContext';\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 // 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 theme[colorScheme][themeKey],\n theme[scale][scaleKey],\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\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} from '@react-types/provider';\nimport {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.2.2\",\n \"description\": \"Spectrum UI components in React\",\n \"license\": \"Apache-2.0\",\n \"main\": \"dist/main.js\",\n \"module\": \"dist/module.js\",\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 \"@babel/runtime\": \"^7.6.2\",\n \"@react-aria/i18n\": \"^3.3.2\",\n \"@react-aria/overlays\": \"^3.7.2\",\n \"@react-aria/utils\": \"^3.8.2\",\n \"@react-spectrum/utils\": \"^3.6.2\",\n \"@react-types/provider\": \"^3.3.2\",\n \"@react-types/shared\": \"^3.8.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\",\n \"react-dom\": \"^16.8.0 || ^17.0.0-rc.1\"\n },\n \"publishConfig\": {\n \"access\": \"public\"\n }\n}\n"],"names":[],"version":3,"file":"main.js.map"}
package/dist/module.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import "./main.css";
2
- import {useMatchedBreakpoints as $4E7NT$useMatchedBreakpoints, useStyleProps as $4E7NT$useStyleProps, BreakpointProvider as $4E7NT$BreakpointProvider, useDOMRef as $4E7NT$useDOMRef, shouldKeepSpectrumClassNames as $4E7NT$shouldKeepSpectrumClassNames, useMediaQuery as $4E7NT$useMediaQuery} from "@react-spectrum/utils";
3
- import $4E7NT$clsx from "clsx";
4
- import {filterDOMProps as $4E7NT$filterDOMProps} from "@react-aria/utils";
5
- import {useLocale as $4E7NT$useLocale, I18nProvider as $4E7NT$I18nProvider} from "@react-aria/i18n";
6
- import {ModalProvider as $4E7NT$ModalProvider, useModalProvider as $4E7NT$useModalProvider} from "@react-aria/overlays";
7
- import $4E7NT$react, {useRef as $4E7NT$useRef, useEffect as $4E7NT$useEffect, useContext as $4E7NT$useContext} from "react";
2
+ import {useMatchedBreakpoints as $ce470$useMatchedBreakpoints, useStyleProps as $ce470$useStyleProps, BreakpointProvider as $ce470$BreakpointProvider, useDOMRef as $ce470$useDOMRef, shouldKeepSpectrumClassNames as $ce470$shouldKeepSpectrumClassNames, useMediaQuery as $ce470$useMediaQuery} from "@react-spectrum/utils";
3
+ import $ce470$clsx from "clsx";
4
+ import {filterDOMProps as $ce470$filterDOMProps} from "@react-aria/utils";
5
+ import {useLocale as $ce470$useLocale, I18nProvider as $ce470$I18nProvider} from "@react-aria/i18n";
6
+ import {ModalProvider as $ce470$ModalProvider, useModalProvider as $ce470$useModalProvider} from "@react-aria/overlays";
7
+ import $ce470$react, {useRef as $ce470$useRef, useEffect as $ce470$useEffect, useContext as $ce470$useContext} from "react";
8
8
 
9
9
  function $parcel$interopDefault(a) {
10
10
  return a && a.__esModule ? a.default : a;
@@ -12,41 +12,41 @@ function $parcel$interopDefault(a) {
12
12
  function $parcel$export(e, n, v, s) {
13
13
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
14
14
  }
15
- var $1aa5b87680ffb7f1$exports = {};
15
+ var $18b706d08f850ef7$exports = {};
16
16
 
17
- $parcel$export($1aa5b87680ffb7f1$exports, "useProvider", () => $1aa5b87680ffb7f1$export$693cdb10cec23617);
18
- $parcel$export($1aa5b87680ffb7f1$exports, "Provider", () => $1aa5b87680ffb7f1$export$2881499e37b75b9a);
19
- $parcel$export($1aa5b87680ffb7f1$exports, "useProviderProps", () => $1aa5b87680ffb7f1$export$521c373ccc32c300);
17
+ $parcel$export($18b706d08f850ef7$exports, "useProvider", () => $18b706d08f850ef7$export$693cdb10cec23617);
18
+ $parcel$export($18b706d08f850ef7$exports, "Provider", () => $18b706d08f850ef7$export$2881499e37b75b9a);
19
+ $parcel$export($18b706d08f850ef7$exports, "useProviderProps", () => $18b706d08f850ef7$export$521c373ccc32c300);
20
20
 
21
21
 
22
22
 
23
23
 
24
24
 
25
25
 
26
- var $b9b9f4cfa9e63391$exports = {};
26
+ var $919c95883b14bb21$exports = {};
27
27
 
28
- $parcel$export($b9b9f4cfa9e63391$exports, "spectrum", () => $b9b9f4cfa9e63391$export$3311ab3a441bc141, (v) => $b9b9f4cfa9e63391$export$3311ab3a441bc141 = v);
29
- var $b9b9f4cfa9e63391$export$3311ab3a441bc141;
30
- $b9b9f4cfa9e63391$export$3311ab3a441bc141 = "_spectrum_b37d53";
28
+ $parcel$export($919c95883b14bb21$exports, "spectrum", () => $919c95883b14bb21$export$3311ab3a441bc141, (v) => $919c95883b14bb21$export$3311ab3a441bc141 = v);
29
+ var $919c95883b14bb21$export$3311ab3a441bc141;
30
+ $919c95883b14bb21$export$3311ab3a441bc141 = "spectrum_b37d53";
31
31
 
32
32
 
33
- var $10cf45aeadd2c3ce$exports = {};
33
+ var $c9a449d4ba7a7ed0$exports = {};
34
34
 
35
- $parcel$export($10cf45aeadd2c3ce$exports, "spectrum", () => $10cf45aeadd2c3ce$export$3311ab3a441bc141, (v) => $10cf45aeadd2c3ce$export$3311ab3a441bc141 = v);
36
- $parcel$export($10cf45aeadd2c3ce$exports, "spectrum-Body", () => $10cf45aeadd2c3ce$export$a30bf7810c8453d1, (v) => $10cf45aeadd2c3ce$export$a30bf7810c8453d1 = v);
37
- $parcel$export($10cf45aeadd2c3ce$exports, "spectrum-Body--italic", () => $10cf45aeadd2c3ce$export$7b2dac1166f6ec4c, (v) => $10cf45aeadd2c3ce$export$7b2dac1166f6ec4c = v);
38
- var $10cf45aeadd2c3ce$export$3311ab3a441bc141;
39
- var $10cf45aeadd2c3ce$export$a30bf7810c8453d1;
40
- var $10cf45aeadd2c3ce$export$7b2dac1166f6ec4c;
41
- $10cf45aeadd2c3ce$export$3311ab3a441bc141 = "_spectrum_2a241c";
42
- $10cf45aeadd2c3ce$export$a30bf7810c8453d1 = "_spectrum-Body_2a241c";
43
- $10cf45aeadd2c3ce$export$7b2dac1166f6ec4c = "_spectrum-Body--italic_2a241c";
35
+ $parcel$export($c9a449d4ba7a7ed0$exports, "spectrum", () => $c9a449d4ba7a7ed0$export$3311ab3a441bc141, (v) => $c9a449d4ba7a7ed0$export$3311ab3a441bc141 = v);
36
+ $parcel$export($c9a449d4ba7a7ed0$exports, "spectrum-Body", () => $c9a449d4ba7a7ed0$export$a30bf7810c8453d1, (v) => $c9a449d4ba7a7ed0$export$a30bf7810c8453d1 = v);
37
+ $parcel$export($c9a449d4ba7a7ed0$exports, "spectrum-Body--italic", () => $c9a449d4ba7a7ed0$export$7b2dac1166f6ec4c, (v) => $c9a449d4ba7a7ed0$export$7b2dac1166f6ec4c = v);
38
+ var $c9a449d4ba7a7ed0$export$3311ab3a441bc141;
39
+ var $c9a449d4ba7a7ed0$export$a30bf7810c8453d1;
40
+ var $c9a449d4ba7a7ed0$export$7b2dac1166f6ec4c;
41
+ $c9a449d4ba7a7ed0$export$3311ab3a441bc141 = "spectrum_2a241c";
42
+ $c9a449d4ba7a7ed0$export$a30bf7810c8453d1 = "spectrum-Body_2a241c";
43
+ $c9a449d4ba7a7ed0$export$7b2dac1166f6ec4c = "spectrum-Body--italic_2a241c";
44
44
 
45
45
 
46
46
 
47
- function $e65f161070fb9aca$export$6343629ee1b29116(theme, defaultColorScheme) {
48
- let matchesDark = $4E7NT$useMediaQuery('(prefers-color-scheme: dark)');
49
- let matchesLight = $4E7NT$useMediaQuery('(prefers-color-scheme: light)');
47
+ function $58b19d6e3dc8f3e7$export$6343629ee1b29116(theme, defaultColorScheme) {
48
+ let matchesDark = $ce470$useMediaQuery('(prefers-color-scheme: dark)');
49
+ let matchesLight = $ce470$useMediaQuery('(prefers-color-scheme: light)');
50
50
  // importance OS > default > omitted
51
51
  if (theme.dark && matchesDark) return 'dark';
52
52
  if (theme.light && matchesLight) return 'light';
@@ -56,43 +56,43 @@ function $e65f161070fb9aca$export$6343629ee1b29116(theme, defaultColorScheme) {
56
56
  if (!theme.light) return 'dark';
57
57
  return 'light';
58
58
  }
59
- function $e65f161070fb9aca$export$a8d2043b2d807f4d(theme) {
60
- let matchesFine = $4E7NT$useMediaQuery('(any-pointer: fine)');
59
+ function $58b19d6e3dc8f3e7$export$a8d2043b2d807f4d(theme) {
60
+ let matchesFine = $ce470$useMediaQuery('(any-pointer: fine)');
61
61
  if (matchesFine && theme.medium) return 'medium';
62
62
  if (theme.large) return 'large';
63
63
  return 'medium';
64
64
  }
65
65
 
66
66
 
67
- var $b2286c78d321caca$exports = {};
68
- $b2286c78d321caca$exports = JSON.parse("{\"name\":\"@react-spectrum/provider\",\"version\":\"3.2.2\",\"description\":\"Spectrum UI components in React\",\"license\":\"Apache-2.0\",\"main\":\"dist/main.js\",\"module\":\"dist/module.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\":{\"@babel/runtime\":\"^7.6.2\",\"@react-aria/i18n\":\"^3.3.2\",\"@react-aria/overlays\":\"^3.7.2\",\"@react-aria/utils\":\"^3.8.2\",\"@react-spectrum/utils\":\"^3.6.2\",\"@react-types/provider\":\"^3.3.2\",\"@react-types/shared\":\"^3.8.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\",\"react-dom\":\"^16.8.0 || ^17.0.0-rc.1\"},\"publishConfig\":{\"access\":\"public\"}}");
67
+ var $2f252f44283c63c7$exports = {};
68
+ $2f252f44283c63c7$exports = JSON.parse("{\"name\":\"@react-spectrum/provider\",\"version\":\"3.2.2\",\"description\":\"Spectrum UI components in React\",\"license\":\"Apache-2.0\",\"main\":\"dist/main.js\",\"module\":\"dist/module.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\":{\"@babel/runtime\":\"^7.6.2\",\"@react-aria/i18n\":\"^3.3.2\",\"@react-aria/overlays\":\"^3.7.2\",\"@react-aria/utils\":\"^3.8.2\",\"@react-spectrum/utils\":\"^3.6.2\",\"@react-types/provider\":\"^3.3.2\",\"@react-types/shared\":\"^3.8.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\",\"react-dom\":\"^16.8.0 || ^17.0.0-rc.1\"},\"publishConfig\":{\"access\":\"public\"}}");
69
69
 
70
70
 
71
- const $1aa5b87680ffb7f1$var$Context = /*#__PURE__*/ $4E7NT$react.createContext(null);
72
- $1aa5b87680ffb7f1$var$Context.displayName = 'ProviderContext';
73
- const $1aa5b87680ffb7f1$var$DEFAULT_BREAKPOINTS = {
71
+ const $18b706d08f850ef7$var$Context = /*#__PURE__*/ $ce470$react.createContext(null);
72
+ $18b706d08f850ef7$var$Context.displayName = 'ProviderContext';
73
+ const $18b706d08f850ef7$var$DEFAULT_BREAKPOINTS = {
74
74
  S: 640,
75
75
  M: 768,
76
76
  L: 1024,
77
77
  XL: 1280,
78
78
  XXL: 1536
79
79
  };
80
- function $1aa5b87680ffb7f1$var$Provider(props, ref) {
81
- let prevContext = $1aa5b87680ffb7f1$export$693cdb10cec23617();
80
+ function $18b706d08f850ef7$var$Provider(props, ref) {
81
+ let prevContext = $18b706d08f850ef7$export$693cdb10cec23617();
82
82
  let prevColorScheme = prevContext && prevContext.colorScheme;
83
83
  let prevBreakpoints = prevContext && prevContext.breakpoints;
84
84
  let { theme: theme = prevContext && prevContext.theme , defaultColorScheme: defaultColorScheme } = props;
85
85
  // Hooks must always be called.
86
- let autoColorScheme = $e65f161070fb9aca$export$6343629ee1b29116(theme, defaultColorScheme);
87
- let autoScale = $e65f161070fb9aca$export$a8d2043b2d807f4d(theme);
88
- let { locale: prevLocale } = $4E7NT$useLocale();
86
+ let autoColorScheme = $58b19d6e3dc8f3e7$export$6343629ee1b29116(theme, defaultColorScheme);
87
+ let autoScale = $58b19d6e3dc8f3e7$export$a8d2043b2d807f4d(theme);
88
+ let { locale: prevLocale } = $ce470$useLocale();
89
89
  // if the new theme doesn't support the prevColorScheme, we must resort to the auto
90
90
  let usePrevColorScheme = !!theme[prevColorScheme];
91
91
  // importance of color scheme props > parent > auto:(OS > default > omitted)
92
- let { colorScheme: colorScheme = usePrevColorScheme ? prevColorScheme : autoColorScheme , scale: scale = prevContext ? prevContext.scale : autoScale , locale: locale = prevContext ? prevLocale : null , breakpoints: breakpoints = prevContext ? prevBreakpoints : $1aa5b87680ffb7f1$var$DEFAULT_BREAKPOINTS , children: children , isQuiet: isQuiet , isEmphasized: isEmphasized , isDisabled: isDisabled , isRequired: isRequired , isReadOnly: isReadOnly , validationState: validationState , ...otherProps } = props;
92
+ let { colorScheme: colorScheme = usePrevColorScheme ? prevColorScheme : autoColorScheme , scale: scale = prevContext ? prevContext.scale : autoScale , locale: locale = prevContext ? prevLocale : null , breakpoints: breakpoints = prevContext ? prevBreakpoints : $18b706d08f850ef7$var$DEFAULT_BREAKPOINTS , children: children , isQuiet: isQuiet , isEmphasized: isEmphasized , isDisabled: isDisabled , isRequired: isRequired , isReadOnly: isReadOnly , validationState: validationState , ...otherProps } = props;
93
93
  // select only the props with values so undefined props don't overwrite prevContext values
94
94
  let currentProps = {
95
- version: $b2286c78d321caca$exports.version,
95
+ version: $2f252f44283c63c7$exports.version,
96
96
  theme: theme,
97
97
  breakpoints: breakpoints,
98
98
  colorScheme: colorScheme,
@@ -104,7 +104,7 @@ function $1aa5b87680ffb7f1$var$Provider(props, ref) {
104
104
  isReadOnly: isReadOnly,
105
105
  validationState: validationState
106
106
  };
107
- let matchedBreakpoints = $4E7NT$useMatchedBreakpoints(breakpoints);
107
+ let matchedBreakpoints = $ce470$useMatchedBreakpoints(breakpoints);
108
108
  let filteredProps = {
109
109
  };
110
110
  Object.entries(currentProps).forEach(([key, value])=>value !== undefined && (filteredProps[key] = value)
@@ -114,11 +114,11 @@ function $1aa5b87680ffb7f1$var$Provider(props, ref) {
114
114
  }, prevContext, filteredProps);
115
115
  // Only wrap in a DOM node if the theme, colorScheme, or scale changed
116
116
  let contents = children;
117
- let domProps = $4E7NT$filterDOMProps(otherProps);
118
- let { styleProps: styleProps } = $4E7NT$useStyleProps(otherProps, undefined, {
117
+ let domProps = $ce470$filterDOMProps(otherProps);
118
+ let { styleProps: styleProps } = $ce470$useStyleProps(otherProps, undefined, {
119
119
  matchedBreakpoints: matchedBreakpoints
120
120
  });
121
- 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__*/ $4E7NT$react.createElement($1aa5b87680ffb7f1$var$ProviderWrapper, {
121
+ 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__*/ $ce470$react.createElement($18b706d08f850ef7$var$ProviderWrapper, {
122
122
  ...props,
123
123
  UNSAFE_style: {
124
124
  isolation: !prevContext ? 'isolate' : undefined,
@@ -126,33 +126,33 @@ function $1aa5b87680ffb7f1$var$Provider(props, ref) {
126
126
  },
127
127
  ref: ref
128
128
  }, contents);
129
- return(/*#__PURE__*/ $4E7NT$react.createElement($1aa5b87680ffb7f1$var$Context.Provider, {
129
+ return(/*#__PURE__*/ $ce470$react.createElement($18b706d08f850ef7$var$Context.Provider, {
130
130
  value: context
131
- }, /*#__PURE__*/ $4E7NT$react.createElement($4E7NT$I18nProvider, {
131
+ }, /*#__PURE__*/ $ce470$react.createElement($ce470$I18nProvider, {
132
132
  locale: locale
133
- }, /*#__PURE__*/ $4E7NT$react.createElement($4E7NT$BreakpointProvider, {
133
+ }, /*#__PURE__*/ $ce470$react.createElement($ce470$BreakpointProvider, {
134
134
  matchedBreakpoints: matchedBreakpoints
135
- }, /*#__PURE__*/ $4E7NT$react.createElement($4E7NT$ModalProvider, null, contents)))));
135
+ }, /*#__PURE__*/ $ce470$react.createElement($ce470$ModalProvider, null, contents)))));
136
136
  }
137
137
  /**
138
138
  * Provider is the container for all React Spectrum applications.
139
139
  * It defines the theme, locale, and other application level settings,
140
140
  * and can also be used to provide common properties to a group of components.
141
- */ let $1aa5b87680ffb7f1$export$2881499e37b75b9a = /*#__PURE__*/ $4E7NT$react.forwardRef($1aa5b87680ffb7f1$var$Provider);
142
- const $1aa5b87680ffb7f1$var$ProviderWrapper = /*#__PURE__*/ $4E7NT$react.forwardRef(function ProviderWrapper(props, ref) {
141
+ */ let $18b706d08f850ef7$export$2881499e37b75b9a = /*#__PURE__*/ $ce470$react.forwardRef($18b706d08f850ef7$var$Provider);
142
+ const $18b706d08f850ef7$var$ProviderWrapper = /*#__PURE__*/ $ce470$react.forwardRef(function ProviderWrapper(props, ref) {
143
143
  let { children: children , ...otherProps } = props;
144
- let { locale: locale , direction: direction } = $4E7NT$useLocale();
145
- let { theme: theme , colorScheme: colorScheme , scale: scale } = $1aa5b87680ffb7f1$export$693cdb10cec23617();
146
- let { modalProviderProps: modalProviderProps } = $4E7NT$useModalProvider();
147
- let { styleProps: styleProps } = $4E7NT$useStyleProps(otherProps);
148
- let domRef = $4E7NT$useDOMRef(ref);
144
+ let { locale: locale , direction: direction } = $ce470$useLocale();
145
+ let { theme: theme , colorScheme: colorScheme , scale: scale } = $18b706d08f850ef7$export$693cdb10cec23617();
146
+ let { modalProviderProps: modalProviderProps } = $ce470$useModalProvider();
147
+ let { styleProps: styleProps } = $ce470$useStyleProps(otherProps);
148
+ let domRef = $ce470$useDOMRef(ref);
149
149
  let themeKey = Object.keys(theme[colorScheme])[0];
150
150
  let scaleKey = Object.keys(theme[scale])[0];
151
- let className = $4E7NT$clsx(styleProps.className, (/*@__PURE__*/$parcel$interopDefault($b9b9f4cfa9e63391$exports))['spectrum'], (/*@__PURE__*/$parcel$interopDefault($10cf45aeadd2c3ce$exports))['spectrum'], theme[colorScheme][themeKey], theme[scale][scaleKey], theme.global ? Object.values(theme.global) : null, {
152
- 'react-spectrum-provider': $4E7NT$shouldKeepSpectrumClassNames,
153
- spectrum: $4E7NT$shouldKeepSpectrumClassNames,
154
- [themeKey]: $4E7NT$shouldKeepSpectrumClassNames,
155
- [scaleKey]: $4E7NT$shouldKeepSpectrumClassNames
151
+ let className = $ce470$clsx(styleProps.className, (/*@__PURE__*/$parcel$interopDefault($919c95883b14bb21$exports))['spectrum'], (/*@__PURE__*/$parcel$interopDefault($c9a449d4ba7a7ed0$exports))['spectrum'], theme[colorScheme][themeKey], theme[scale][scaleKey], theme.global ? Object.values(theme.global) : null, {
152
+ 'react-spectrum-provider': $ce470$shouldKeepSpectrumClassNames,
153
+ spectrum: $ce470$shouldKeepSpectrumClassNames,
154
+ [themeKey]: $ce470$shouldKeepSpectrumClassNames,
155
+ [scaleKey]: $ce470$shouldKeepSpectrumClassNames
156
156
  });
157
157
  let style = {
158
158
  ...styleProps.style,
@@ -161,8 +161,8 @@ const $1aa5b87680ffb7f1$var$ProviderWrapper = /*#__PURE__*/ $4E7NT$react.forward
161
161
  colorScheme: (props.colorScheme ?? colorScheme) ?? Object.keys(theme).filter((k)=>k === 'light' || k === 'dark'
162
162
  ).join(' ')
163
163
  };
164
- let hasWarned = $4E7NT$useRef(false);
165
- $4E7NT$useEffect(()=>{
164
+ let hasWarned = $ce470$useRef(false);
165
+ $ce470$useEffect(()=>{
166
166
  if (direction && domRef.current) {
167
167
  let closestDir = domRef.current.parentElement.closest('[dir]');
168
168
  let dir = closestDir && closestDir.getAttribute('dir');
@@ -176,8 +176,8 @@ const $1aa5b87680ffb7f1$var$ProviderWrapper = /*#__PURE__*/ $4E7NT$react.forward
176
176
  domRef,
177
177
  hasWarned
178
178
  ]);
179
- return(/*#__PURE__*/ $4E7NT$react.createElement("div", {
180
- ...$4E7NT$filterDOMProps(otherProps),
179
+ return(/*#__PURE__*/ $ce470$react.createElement("div", {
180
+ ...$ce470$filterDOMProps(otherProps),
181
181
  ...styleProps,
182
182
  ...modalProviderProps,
183
183
  className: className,
@@ -187,11 +187,11 @@ const $1aa5b87680ffb7f1$var$ProviderWrapper = /*#__PURE__*/ $4E7NT$react.forward
187
187
  ref: domRef
188
188
  }, children));
189
189
  });
190
- function $1aa5b87680ffb7f1$export$693cdb10cec23617() {
191
- return $4E7NT$useContext($1aa5b87680ffb7f1$var$Context);
190
+ function $18b706d08f850ef7$export$693cdb10cec23617() {
191
+ return $ce470$useContext($18b706d08f850ef7$var$Context);
192
192
  }
193
- function $1aa5b87680ffb7f1$export$521c373ccc32c300(props) {
194
- let context = $1aa5b87680ffb7f1$export$693cdb10cec23617();
193
+ function $18b706d08f850ef7$export$521c373ccc32c300(props) {
194
+ let context = $18b706d08f850ef7$export$693cdb10cec23617();
195
195
  if (!context) return props;
196
196
  return Object.assign({
197
197
  }, {
@@ -207,5 +207,5 @@ function $1aa5b87680ffb7f1$export$521c373ccc32c300(props) {
207
207
 
208
208
 
209
209
 
210
- export {$1aa5b87680ffb7f1$export$693cdb10cec23617 as useProvider, $1aa5b87680ffb7f1$export$2881499e37b75b9a as Provider, $1aa5b87680ffb7f1$export$521c373ccc32c300 as useProviderProps};
210
+ export {$18b706d08f850ef7$export$693cdb10cec23617 as useProvider, $18b706d08f850ef7$export$2881499e37b75b9a as Provider, $18b706d08f850ef7$export$521c373ccc32c300 as useProviderProps};
211
211
  //# sourceMappingURL=module.js.map
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AEAA,GAA0B;AAA1B,yC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QACpB,KAAK,EAAE,KAAK;QACZ,IAAI,EAAE,MAAM;QACZ,GAAG,EAAE,SAAS;QACd,GAAG,EAAE,MAAM;OACV,QAAQ;AAGf,CAAC;SAMe,yCAAW,GAAoB,CAAC;IAC9C,MAAM,CAAC,iBAAU,CAAC,6BAAO;AAC3B,CAAC;SAEe,yCAAgB,CAAI,KAAQ,EAAM,CAAC;IACjD,GAAG,CAAC,OAAO,GAAG,yCAAW;IACzB,EAAE,GAAG,OAAO,EACV,MAAM,CAAC,KAAK;IAEd,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAAA,CAAC,EAAE,CAAC;QACxB,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,YAAY,EAAE,OAAO,CAAC,YAAY;QAClC,UAAU,EAAE,OAAO,CAAC,UAAU;QAC9B,UAAU,EAAE,OAAO,CAAC,UAAU;QAC9B,UAAU,EAAE,OAAO,CAAC,UAAU;QAC9B,eAAe,EAAE,OAAO,CAAC,eAAe;IAC1C,CAAC,EAAE,KAAK;AACV,CAAC","sources":["packages/@react-spectrum/provider/src/index.ts","packages/@react-spectrum/provider/src/Provider.tsx","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 * from './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 {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 Context = React.createContext<ProviderContext | null>(null);\nContext.displayName = 'ProviderContext';\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 // 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 theme[colorScheme][themeKey],\n theme[scale][scaleKey],\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\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} from '@react-types/provider';\nimport {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.2.2\",\n \"description\": \"Spectrum UI components in React\",\n \"license\": \"Apache-2.0\",\n \"main\": \"dist/main.js\",\n \"module\": \"dist/module.js\",\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 \"@babel/runtime\": \"^7.6.2\",\n \"@react-aria/i18n\": \"^3.3.2\",\n \"@react-aria/overlays\": \"^3.7.2\",\n \"@react-aria/utils\": \"^3.8.2\",\n \"@react-spectrum/utils\": \"^3.6.2\",\n \"@react-types/provider\": \"^3.3.2\",\n \"@react-types/shared\": \"^3.8.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\",\n \"react-dom\": \"^16.8.0 || ^17.0.0-rc.1\"\n },\n \"publishConfig\": {\n \"access\": \"public\"\n }\n}\n"],"names":[],"version":3,"file":"module.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AEAA,GAA0B;AAA1B,yCAA0B,GAAG,CAAiB;;;;;;;;ACA9C,GAA0B;AAC1B,GAA+B;AAC/B,GAAuC;AAFvC,yCAA0B,GAAG,CAAiB;AAC9C,yCAA+B,GAAG,CAAsB;AACxD,yCAAuC,GAAG,CAA8B;;;;SCcxD,yCAAc,CAAC,KAAY,EAAE,kBAA+B,EAAe,CAAC;IAC1F,GAAG,CAAC,WAAW,GAAG,oBAAa,CAAC,CAA8B;IAC9D,GAAG,CAAC,YAAY,GAAG,oBAAa,CAAC,CAA+B;IAEhE,EAAoC,AAApC,kCAAoC;IAEpC,EAAE,EAAE,KAAK,CAAC,IAAI,IAAI,WAAW,EAC3B,MAAM,CAAC,CAAM;IAGf,EAAE,EAAE,KAAK,CAAC,KAAK,IAAI,YAAY,EAC7B,MAAM,CAAC,CAAO;IAGhB,EAAE,EAAE,KAAK,CAAC,IAAI,IAAI,kBAAkB,KAAK,CA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,EAAE,OAAO,CAAC,UAAU;QAC9B,eAAe,EAAE,OAAO,CAAC,eAAe;IAC1C,CAAC,EAAE,KAAK;AACV,CAAC","sources":["packages/@react-spectrum/provider/src/index.ts","packages/@react-spectrum/provider/src/Provider.tsx","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 * from './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 {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 Context = React.createContext<ProviderContext | null>(null);\nContext.displayName = 'ProviderContext';\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 // 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 theme[colorScheme][themeKey],\n theme[scale][scaleKey],\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\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} from '@react-types/provider';\nimport {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.2.2\",\n \"description\": \"Spectrum UI components in React\",\n \"license\": \"Apache-2.0\",\n \"main\": \"dist/main.js\",\n \"module\": \"dist/module.js\",\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 \"@babel/runtime\": \"^7.6.2\",\n \"@react-aria/i18n\": \"^3.3.2\",\n \"@react-aria/overlays\": \"^3.7.2\",\n \"@react-aria/utils\": \"^3.8.2\",\n \"@react-spectrum/utils\": \"^3.6.2\",\n \"@react-types/provider\": \"^3.3.2\",\n \"@react-types/shared\": \"^3.8.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\",\n \"react-dom\": \"^16.8.0 || ^17.0.0-rc.1\"\n },\n \"publishConfig\": {\n \"access\": \"public\"\n }\n}\n"],"names":[],"version":3,"file":"module.js.map"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-spectrum/provider",
3
- "version": "3.0.0-nightly.1394+dfe72ee07",
3
+ "version": "3.0.0-nightly.1409+da2aa7467",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
@@ -32,16 +32,16 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@babel/runtime": "^7.6.2",
35
- "@react-aria/i18n": "3.0.0-nightly.1394+dfe72ee07",
36
- "@react-aria/overlays": "3.0.0-nightly.1394+dfe72ee07",
37
- "@react-aria/utils": "3.0.0-nightly.1394+dfe72ee07",
38
- "@react-spectrum/utils": "3.0.0-nightly.1394+dfe72ee07",
39
- "@react-types/provider": "3.3.3-nightly.3085+dfe72ee07",
40
- "@react-types/shared": "3.0.0-nightly.1394+dfe72ee07",
35
+ "@react-aria/i18n": "3.0.0-nightly.1409+da2aa7467",
36
+ "@react-aria/overlays": "3.0.0-nightly.1409+da2aa7467",
37
+ "@react-aria/utils": "3.0.0-nightly.1409+da2aa7467",
38
+ "@react-spectrum/utils": "3.0.0-nightly.1409+da2aa7467",
39
+ "@react-types/provider": "3.3.3-nightly.3100+da2aa7467",
40
+ "@react-types/shared": "3.0.0-nightly.1409+da2aa7467",
41
41
  "clsx": "^1.1.1"
42
42
  },
43
43
  "devDependencies": {
44
- "@adobe/spectrum-css-temp": "3.0.0-nightly.1394+dfe72ee07"
44
+ "@adobe/spectrum-css-temp": "3.0.0-nightly.1409+da2aa7467"
45
45
  },
46
46
  "peerDependencies": {
47
47
  "react": "^16.8.0 || ^17.0.0-rc.1",
@@ -50,5 +50,5 @@
50
50
  "publishConfig": {
51
51
  "access": "public"
52
52
  },
53
- "gitHead": "dfe72ee076f7ca27728d0b6b4c1ef86e11191ece"
53
+ "gitHead": "da2aa74670fbd93335ff01401ca53826b3602777"
54
54
  }