@adobe/react-spectrum 3.47.3 → 3.47.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/dist/private/provider/Provider.cjs +3 -3
  2. package/dist/private/provider/Provider.cjs.map +1 -1
  3. package/dist/private/provider/Provider.js +3 -3
  4. package/dist/private/provider/Provider.js.map +1 -1
  5. package/dist/private/provider/Provider.mjs +3 -3
  6. package/dist/private/provider/Provider.mjs.map +1 -1
  7. package/dist/types/src/accordion/Accordion.d.ts +4 -4
  8. package/dist/types/src/actionbar/ActionBar.d.ts +3 -3
  9. package/dist/types/src/actiongroup/ActionGroup.d.ts +3 -3
  10. package/dist/types/src/autocomplete/MobileSearchAutocomplete.d.ts +3 -3
  11. package/dist/types/src/autocomplete/SearchAutocomplete.d.ts +3 -3
  12. package/dist/types/src/button/Button.d.ts +4 -4
  13. package/dist/types/src/calendar/Calendar.d.ts +3 -3
  14. package/dist/types/src/calendar/RangeCalendar.d.ts +3 -3
  15. package/dist/types/src/card/Card.d.ts +2 -2
  16. package/dist/types/src/card/CardView.d.ts +3 -3
  17. package/dist/types/src/color/ColorArea.d.ts +3 -3
  18. package/dist/types/src/combobox/ComboBox.d.ts +3 -3
  19. package/dist/types/src/datepicker/DateField.d.ts +3 -3
  20. package/dist/types/src/datepicker/DatePicker.d.ts +3 -3
  21. package/dist/types/src/datepicker/DateRangePicker.d.ts +3 -3
  22. package/dist/types/src/datepicker/TimeField.d.ts +3 -3
  23. package/dist/types/src/dialog/DialogTrigger.d.ts +1 -8
  24. package/dist/types/src/list/ListView.d.ts +2 -2
  25. package/dist/types/src/listbox/ListBox.d.ts +3 -3
  26. package/dist/types/src/listbox/ListBoxBase.d.ts +3 -3
  27. package/dist/types/src/menu/ActionMenu.d.ts +3 -3
  28. package/dist/types/src/menu/ContextualHelpTrigger.d.ts +1 -12
  29. package/dist/types/src/menu/Menu.d.ts +3 -3
  30. package/dist/types/src/menu/SubmenuTrigger.d.ts +1 -8
  31. package/dist/types/src/numberfield/StepButton.d.ts +3 -3
  32. package/dist/types/src/picker/Picker.d.ts +3 -3
  33. package/dist/types/src/provider/version-macro.d.ts +1 -0
  34. package/dist/types/src/searchfield/SearchField.d.ts +3 -3
  35. package/dist/types/src/steplist/StepList.d.ts +3 -3
  36. package/dist/types/src/table/TableView.d.ts +3 -3
  37. package/dist/types/src/table/TableViewBase.d.ts +2 -2
  38. package/dist/types/src/table/TableViewWithoutExpanding.d.ts +3 -3
  39. package/dist/types/src/table/TreeGridTableView.d.ts +3 -3
  40. package/dist/types/src/tabs/Tabs.d.ts +3 -3
  41. package/dist/types/src/tag/TagGroup.d.ts +1 -1
  42. package/dist/types/src/tooltip/TooltipTrigger.d.ts +1 -8
  43. package/dist/types/src/tree/TreeView.d.ts +3 -3
  44. package/dist/types/src/view/View.d.ts +2 -2
  45. package/package.json +9 -8
  46. package/dist/private/package.cjs +0 -4
  47. package/dist/private/package.cjs.map +0 -1
  48. package/dist/private/package.js +0 -6
  49. package/dist/private/package.js.map +0 -1
  50. package/dist/private/package.mjs +0 -6
  51. package/dist/private/package.mjs.map +0 -1
@@ -8,7 +8,6 @@ var $a6bc8488685ed47c$exports = require("../typography_index_css.cjs");
8
8
  var $5d920a4b4d4fa5d5$exports = require("./mediaQueries.cjs");
9
9
  var $65aea7b37663976b$exports = require("../utils/useDOMRef.cjs");
10
10
  var $b8f90d51c4908137$exports = require("../utils/styleProps.cjs");
11
- var $79c7898f5421a755$exports = require("../package.cjs");
12
11
  var $eVc0A$clsx = require("clsx");
13
12
  var $eVc0A$reactariafilterDOMProps = require("react-aria/filterDOMProps");
14
13
  var $eVc0A$reactariaI18nProvider = require("react-aria/I18nProvider");
@@ -52,7 +51,8 @@ $parcel$export(module.exports, "useProviderProps", function () { return $544fc82
52
51
 
53
52
 
54
53
 
55
-
54
+ // A macro ensures that we don't import the entire package.json.
55
+ const $544fc82701fc93e9$var$version = "3.47.4";
56
56
  const $544fc82701fc93e9$var$DEFAULT_BREAKPOINTS = {
57
57
  S: 640,
58
58
  M: 768,
@@ -76,7 +76,7 @@ const $544fc82701fc93e9$export$2881499e37b75b9a = /*#__PURE__*/ (0, ($parcel$int
76
76
  let { colorScheme: colorScheme = usePrevColorScheme ? prevColorScheme : autoColorScheme, scale: scale = prevContext ? prevContext.scale : autoScale, locale: locale = prevContext ? prevLocale : undefined, breakpoints: breakpoints = prevContext ? prevBreakpoints : $544fc82701fc93e9$var$DEFAULT_BREAKPOINTS, children: children, isQuiet: isQuiet, isEmphasized: isEmphasized, isDisabled: isDisabled, isRequired: isRequired, isReadOnly: isReadOnly, validationState: validationState, router: router, ...otherProps } = props;
77
77
  // select only the props with values so undefined props don't overwrite prevContext values
78
78
  let currentProps = {
79
- version: $79c7898f5421a755$exports.version,
79
+ version: $544fc82701fc93e9$var$version,
80
80
  theme: theme,
81
81
  breakpoints: breakpoints,
82
82
  colorScheme: colorScheme,
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;;AAsBD,MAAM,4CAAsB;IAAC,GAAG;IAAK,GAAG;IAAK,GAAG;IAAM,IAAI;IAAM,KAAK;AAAI;AAOlE,MAAM,0DAAW,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC,SAAS,SAChD,KAAoB,EACpB,GAA2B;IAE3B,IAAI,cAAc,CAAA,GAAA,uBAAS,EAAE,CAAA,GAAA,iCAAM;IACnC,IAAI,kBAAkB,eAAe,YAAY,WAAW;IAC5D,IAAI,kBAAkB,eAAe,YAAY,WAAW;IAC5D,IAAI,SAAC,QAAQ,eAAe,YAAY,KAAK,sBAAE,kBAAkB,EAAC,GAAG;IACrE,IAAI,CAAC,OACH,MAAM,IAAI,MAAM;IAElB,+BAA+B;IAC/B,IAAI,kBAAkB,CAAA,GAAA,wCAAa,EAAE,OAAO,sBAAsB;IAClE,IAAI,YAAY,CAAA,GAAA,kCAA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,CAAC,SACH,OAAO;IAET,OAAO,OAAO,MAAM,CAClB,CAAC,GACD;QACE,SAAS,QAAQ,OAAO;QACxB,cAAc,QAAQ,YAAY;QAClC,YAAY,QAAQ,UAAU;QAC9B,YAAY,QAAQ,UAAU;QAC9B,YAAY,QAAQ,UAAU;QAC9B,iBAAiB,QAAQ,eAAe;IAC1C,GACA;AAEJ","sources":["packages/@adobe/react-spectrum/src/provider/Provider.tsx"],"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\nimport {BreakpointProvider, useMatchedBreakpoints} from '../utils/BreakpointProvider';\n\nimport clsx from 'clsx';\nimport {Context} from './context';\nimport {DOMRef} from '@react-types/shared';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {I18nProvider, useLocale} from 'react-aria/I18nProvider';\nimport {ModalProvider, useModalProvider} from 'react-aria/private/overlays/useModal';\nimport {ProviderContext, ProviderProps} from './types';\nimport React, {useContext, useEffect, useRef} from 'react';\nimport {RouterProvider} from 'react-aria/private/utils/openLink';\nimport {shouldKeepSpectrumClassNames} from '../utils/classNames';\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';\nimport {useDOMRef} from '../utils/useDOMRef';\nimport {useStyleProps} from '../utils/styleProps';\n// @ts-ignore\nimport {version} from '../../package.json';\n\nconst DEFAULT_BREAKPOINTS = {S: 640, M: 768, L: 1024, XL: 1280, XXL: 1536};\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 */\nexport const Provider = React.forwardRef(function Provider(\n props: ProviderProps,\n ref: DOMRef<HTMLDivElement>\n) {\n let prevContext = useContext(Context);\n let prevColorScheme = prevContext && prevContext.colorScheme;\n let prevBreakpoints = prevContext && prevContext.breakpoints;\n let {theme = prevContext && prevContext.theme, defaultColorScheme} = props;\n if (!theme) {\n throw new Error('theme not found, the parent provider must have a theme provided');\n }\n // Hooks must always be called.\n let autoColorScheme = useColorScheme(theme, defaultColorScheme || 'light');\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 = prevColorScheme ? !!theme[prevColorScheme] : false;\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 : undefined,\n breakpoints = prevContext ? prevBreakpoints : DEFAULT_BREAKPOINTS,\n children,\n isQuiet,\n isEmphasized,\n isDisabled,\n isRequired,\n isReadOnly,\n validationState,\n router,\n ...otherProps\n } = props;\n\n // select only the props with values so undefined props don't overwrite prevContext values\n let currentProps = {\n version,\n theme,\n breakpoints,\n colorScheme,\n scale,\n isQuiet,\n isEmphasized,\n isDisabled,\n isRequired,\n isReadOnly,\n validationState\n };\n\n let matchedBreakpoints = useMatchedBreakpoints(breakpoints!);\n let filteredProps = {};\n Object.entries(currentProps).forEach(\n ([key, value]) => value !== undefined && (filteredProps[key] = value)\n );\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 (\n !prevContext ||\n props.locale ||\n theme !== prevContext.theme ||\n colorScheme !== prevContext.colorScheme ||\n scale !== prevContext.scale ||\n Object.keys(domProps).length > 0 ||\n otherProps.UNSAFE_className ||\n (styleProps.style && Object.keys(styleProps.style).length > 0)\n ) {\n contents = (\n <ProviderWrapper\n {...props}\n UNSAFE_style={{isolation: !prevContext ? 'isolate' : undefined, ...styleProps.style}}\n ref={ref}>\n {contents}\n </ProviderWrapper>\n );\n }\n\n if (router) {\n contents = <RouterProvider {...router}>{contents}</RouterProvider>;\n }\n\n return (\n <Context.Provider value={context}>\n <I18nProvider locale={locale}>\n <BreakpointProvider matchedBreakpoints={matchedBreakpoints}>\n <ModalProvider>{contents}</ModalProvider>\n </BreakpointProvider>\n </I18nProvider>\n </Context.Provider>\n );\n});\n\nconst ProviderWrapper = React.forwardRef(function ProviderWrapper(\n props: ProviderProps,\n ref: DOMRef<HTMLDivElement>\n) {\n let {children, ...otherProps} = props;\n let {locale, direction} = useLocale();\n let {theme, colorScheme, scale} = useProvider();\n let {modalProviderProps} = useModalProvider();\n let {styleProps} = useStyleProps(otherProps);\n let domRef = useDOMRef(ref);\n\n let themeKey = Object.keys(theme[colorScheme]!)[0];\n let scaleKey = Object.keys(theme[scale]!)[0];\n\n let className = clsx(\n styleProps.className,\n styles['spectrum'],\n typographyStyles['spectrum'],\n Object.values(theme[colorScheme]!),\n Object.values(theme[scale]!),\n theme.global ? Object.values(theme.global) : null,\n {\n 'react-spectrum-provider': shouldKeepSpectrumClassNames,\n spectrum: shouldKeepSpectrumClassNames,\n [themeKey]: shouldKeepSpectrumClassNames,\n [scaleKey]: shouldKeepSpectrumClassNames\n }\n );\n\n let style = {\n ...styleProps.style,\n // This ensures that browser native UI like scrollbars are rendered in the right color scheme.\n // See https://web.dev/color-scheme/.\n colorScheme:\n props.colorScheme ??\n colorScheme ??\n Object.keys(theme)\n .filter(k => k === 'light' || k === 'dark')\n .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 && process.env.NODE_ENV !== 'production') {\n console.warn(`Language directions cannot be nested. ${direction} inside ${dir}.`);\n hasWarned.current = true;\n }\n }\n }, [direction, domRef, hasWarned]);\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. Properties\n * explicitly set by the nearest parent Provider override those provided by preceeding Providers.\n */\nexport function useProvider(): ProviderContext {\n let context = useContext(Context);\n if (!context) {\n throw new Error(\n 'No root provider found, please make sure your app is wrapped within a <Provider>. ' +\n 'Alternatively, this issue may be caused by duplicate packages, see https://github.com/adobe/react-spectrum/wiki/Frequently-Asked-Questions-(FAQs)#why-are-there-errors-after-upgrading-a-react-spectrum-package for more information.'\n );\n }\n return context;\n}\n\nexport function useProviderProps<T>(props: T): T {\n let context = useContext(Context);\n if (!context) {\n return props;\n }\n return Object.assign(\n {},\n {\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 },\n props\n );\n}\n"],"names":[],"version":3,"file":"Provider.cjs.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;AAqBD,gEAAgE;AAChE,MAAM;AAEN,MAAM,4CAAsB;IAAC,GAAG;IAAK,GAAG;IAAK,GAAG;IAAM,IAAI;IAAM,KAAK;AAAI;AAOlE,MAAM,0DAAW,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC,SAAS,SAChD,KAAoB,EACpB,GAA2B;IAE3B,IAAI,cAAc,CAAA,GAAA,uBAAS,EAAE,CAAA,GAAA,iCAAM;IACnC,IAAI,kBAAkB,eAAe,YAAY,WAAW;IAC5D,IAAI,kBAAkB,eAAe,YAAY,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SAAS;IACd,IAAI,UAAU,CAAA,GAAA,uBAAS,EAAE,CAAA,GAAA,iCAAM;IAC/B,IAAI,CAAC,SACH,MAAM,IAAI,MACR;IAIJ,OAAO;AACT;AAEO,SAAS,0CAAoB,KAAQ;IAC1C,IAAI,UAAU,CAAA,GAAA,uBAAS,EAAE,CAAA,GAAA,iCAAM;IAC/B,IAAI,CAAC,SACH,OAAO;IAET,OAAO,OAAO,MAAM,CAClB,CAAC,GACD;QACE,SAAS,QAAQ,OAAO;QACxB,cAAc,QAAQ,YAAY;QAClC,YAAY,QAAQ,UAAU;QAC9B,YAAY,QAAQ,UAAU;QAC9B,YAAY,QAAQ,UAAU;QAC9B,iBAAiB,QAAQ,eAAe;IAC1C,GACA;AAEJ","sources":["packages/@adobe/react-spectrum/src/provider/Provider.tsx"],"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\nimport {BreakpointProvider, useMatchedBreakpoints} from '../utils/BreakpointProvider';\n\nimport clsx from 'clsx';\nimport {Context} from './context';\nimport {DOMRef} from '@react-types/shared';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {getVersion} from './version-macro' with {type: 'macro'};\nimport {I18nProvider, useLocale} from 'react-aria/I18nProvider';\nimport {ModalProvider, useModalProvider} from 'react-aria/private/overlays/useModal';\nimport {ProviderContext, ProviderProps} from './types';\nimport React, {useContext, useEffect, useRef} from 'react';\nimport {RouterProvider} from 'react-aria/private/utils/openLink';\nimport {shouldKeepSpectrumClassNames} from '../utils/classNames';\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';\nimport {useDOMRef} from '../utils/useDOMRef';\nimport {useStyleProps} from '../utils/styleProps';\n\n// A macro ensures that we don't import the entire package.json.\nconst version = getVersion();\n\nconst DEFAULT_BREAKPOINTS = {S: 640, M: 768, L: 1024, XL: 1280, XXL: 1536};\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 */\nexport const Provider = React.forwardRef(function Provider(\n props: ProviderProps,\n ref: DOMRef<HTMLDivElement>\n) {\n let prevContext = useContext(Context);\n let prevColorScheme = prevContext && prevContext.colorScheme;\n let prevBreakpoints = prevContext && prevContext.breakpoints;\n let {theme = prevContext && prevContext.theme, defaultColorScheme} = props;\n if (!theme) {\n throw new Error('theme not found, the parent provider must have a theme provided');\n }\n // Hooks must always be called.\n let autoColorScheme = useColorScheme(theme, defaultColorScheme || 'light');\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 = prevColorScheme ? !!theme[prevColorScheme] : false;\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 : undefined,\n breakpoints = prevContext ? prevBreakpoints : DEFAULT_BREAKPOINTS,\n children,\n isQuiet,\n isEmphasized,\n isDisabled,\n isRequired,\n isReadOnly,\n validationState,\n router,\n ...otherProps\n } = props;\n\n // select only the props with values so undefined props don't overwrite prevContext values\n let currentProps = {\n version,\n theme,\n breakpoints,\n colorScheme,\n scale,\n isQuiet,\n isEmphasized,\n isDisabled,\n isRequired,\n isReadOnly,\n validationState\n };\n\n let matchedBreakpoints = useMatchedBreakpoints(breakpoints!);\n let filteredProps = {};\n Object.entries(currentProps).forEach(\n ([key, value]) => value !== undefined && (filteredProps[key] = value)\n );\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 (\n !prevContext ||\n props.locale ||\n theme !== prevContext.theme ||\n colorScheme !== prevContext.colorScheme ||\n scale !== prevContext.scale ||\n Object.keys(domProps).length > 0 ||\n otherProps.UNSAFE_className ||\n (styleProps.style && Object.keys(styleProps.style).length > 0)\n ) {\n contents = (\n <ProviderWrapper\n {...props}\n UNSAFE_style={{isolation: !prevContext ? 'isolate' : undefined, ...styleProps.style}}\n ref={ref}>\n {contents}\n </ProviderWrapper>\n );\n }\n\n if (router) {\n contents = <RouterProvider {...router}>{contents}</RouterProvider>;\n }\n\n return (\n <Context.Provider value={context}>\n <I18nProvider locale={locale}>\n <BreakpointProvider matchedBreakpoints={matchedBreakpoints}>\n <ModalProvider>{contents}</ModalProvider>\n </BreakpointProvider>\n </I18nProvider>\n </Context.Provider>\n );\n});\n\nconst ProviderWrapper = React.forwardRef(function ProviderWrapper(\n props: ProviderProps,\n ref: DOMRef<HTMLDivElement>\n) {\n let {children, ...otherProps} = props;\n let {locale, direction} = useLocale();\n let {theme, colorScheme, scale} = useProvider();\n let {modalProviderProps} = useModalProvider();\n let {styleProps} = useStyleProps(otherProps);\n let domRef = useDOMRef(ref);\n\n let themeKey = Object.keys(theme[colorScheme]!)[0];\n let scaleKey = Object.keys(theme[scale]!)[0];\n\n let className = clsx(\n styleProps.className,\n styles['spectrum'],\n typographyStyles['spectrum'],\n Object.values(theme[colorScheme]!),\n Object.values(theme[scale]!),\n theme.global ? Object.values(theme.global) : null,\n {\n 'react-spectrum-provider': shouldKeepSpectrumClassNames,\n spectrum: shouldKeepSpectrumClassNames,\n [themeKey]: shouldKeepSpectrumClassNames,\n [scaleKey]: shouldKeepSpectrumClassNames\n }\n );\n\n let style = {\n ...styleProps.style,\n // This ensures that browser native UI like scrollbars are rendered in the right color scheme.\n // See https://web.dev/color-scheme/.\n colorScheme:\n props.colorScheme ??\n colorScheme ??\n Object.keys(theme)\n .filter(k => k === 'light' || k === 'dark')\n .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 && process.env.NODE_ENV !== 'production') {\n console.warn(`Language directions cannot be nested. ${direction} inside ${dir}.`);\n hasWarned.current = true;\n }\n }\n }, [direction, domRef, hasWarned]);\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. Properties\n * explicitly set by the nearest parent Provider override those provided by preceeding Providers.\n */\nexport function useProvider(): ProviderContext {\n let context = useContext(Context);\n if (!context) {\n throw new Error(\n 'No root provider found, please make sure your app is wrapped within a <Provider>. ' +\n 'Alternatively, this issue may be caused by duplicate packages, see https://github.com/adobe/react-spectrum/wiki/Frequently-Asked-Questions-(FAQs)#why-are-there-errors-after-upgrading-a-react-spectrum-package for more information.'\n );\n }\n return context;\n}\n\nexport function useProviderProps<T>(props: T): T {\n let context = useContext(Context);\n if (!context) {\n return props;\n }\n return Object.assign(\n {},\n {\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 },\n props\n );\n}\n"],"names":[],"version":3,"file":"Provider.cjs.map"}
@@ -8,7 +8,6 @@ import $evnYk$typography_index_cssmjs from "../typography_index_css.mjs";
8
8
  import {useColorScheme as $6ef8b835d1e952be$export$6343629ee1b29116, useScale as $6ef8b835d1e952be$export$a8d2043b2d807f4d} from "./mediaQueries.js";
9
9
  import {useDOMRef as $c234463e9ef56637$export$c2c55ef9111cafd8} from "../utils/useDOMRef.js";
10
10
  import {useStyleProps as $120fbea2d95e11ed$export$b8e6fb9d2dff3f41} from "../utils/styleProps.js";
11
- import $evnYk$packagejs from "../package.js";
12
11
  import $evnYk$clsx from "clsx";
13
12
  import {filterDOMProps as $evnYk$filterDOMProps} from "react-aria/filterDOMProps";
14
13
  import {useLocale as $evnYk$useLocale, I18nProvider as $evnYk$I18nProvider} from "react-aria/I18nProvider";
@@ -44,7 +43,8 @@ function $parcel$interopDefault(a) {
44
43
 
45
44
 
46
45
 
47
-
46
+ // A macro ensures that we don't import the entire package.json.
47
+ const $089943c7a219141c$var$version = "3.47.4";
48
48
  const $089943c7a219141c$var$DEFAULT_BREAKPOINTS = {
49
49
  S: 640,
50
50
  M: 768,
@@ -68,7 +68,7 @@ const $089943c7a219141c$export$2881499e37b75b9a = /*#__PURE__*/ (0, $evnYk$react
68
68
  let { colorScheme: colorScheme = usePrevColorScheme ? prevColorScheme : autoColorScheme, scale: scale = prevContext ? prevContext.scale : autoScale, locale: locale = prevContext ? prevLocale : undefined, breakpoints: breakpoints = prevContext ? prevBreakpoints : $089943c7a219141c$var$DEFAULT_BREAKPOINTS, children: children, isQuiet: isQuiet, isEmphasized: isEmphasized, isDisabled: isDisabled, isRequired: isRequired, isReadOnly: isReadOnly, validationState: validationState, router: router, ...otherProps } = props;
69
69
  // select only the props with values so undefined props don't overwrite prevContext values
70
70
  let currentProps = {
71
- version: $evnYk$packagejs.version,
71
+ version: $089943c7a219141c$var$version,
72
72
  theme: theme,
73
73
  breakpoints: breakpoints,
74
74
  colorScheme: colorScheme,
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;;AAsBD,MAAM,4CAAsB;IAAC,GAAG;IAAK,GAAG;IAAK,GAAG;IAAM,IAAI;IAAM,KAAK;AAAI;AAOlE,MAAM,0DAA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AK,cAAc;gBAC3F,QAAQ,IAAI,CAAC,CAAC,sCAAsC,EAAE,UAAU,QAAQ,EAAE,IAAI,CAAC,CAAC;gBAChF,UAAU,OAAO,GAAG;YACtB;QACF;IACF,GAAG;QAAC;QAAW;QAAQ;KAAU;IAEjC,qBACE,gCAAC;QACE,GAAG,CAAA,GAAA,qBAAa,EAAE,WAAW;QAC7B,GAAG,UAAU;QACb,GAAG,kBAAkB;QACtB,WAAW;QACX,OAAO;QACP,MAAM;QACN,KAAK;QACL,KAAK;OACJ;AAGP;AAMO,SAAS;IACd,IAAI,UAAU,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,yCAAM;IAC/B,IAAI,CAAC,SACH,MAAM,IAAI,MACR;IAIJ,OAAO;AACT;AAEO,SAAS,0CAAoB,KAAQ;IAC1C,IAAI,UAAU,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,yCAAM;IAC/B,IAAI,CAAC,SACH,OAAO;IAET,OAAO,OAAO,MAAM,CAClB,CAAC,GACD;QACE,SAAS,QAAQ,OAAO;QACxB,cAAc,QAAQ,YAAY;QAClC,YAAY,QAAQ,UAAU;QAC9B,YAAY,QAAQ,UAAU;QAC9B,YAAY,QAAQ,UAAU;QAC9B,iBAAiB,QAAQ,eAAe;IAC1C,GACA;AAEJ","sources":["packages/@adobe/react-spectrum/src/provider/Provider.tsx"],"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\nimport {BreakpointProvider, useMatchedBreakpoints} from '../utils/BreakpointProvider';\n\nimport clsx from 'clsx';\nimport {Context} from './context';\nimport {DOMRef} from '@react-types/shared';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {I18nProvider, useLocale} from 'react-aria/I18nProvider';\nimport {ModalProvider, useModalProvider} from 'react-aria/private/overlays/useModal';\nimport {ProviderContext, ProviderProps} from './types';\nimport React, {useContext, useEffect, useRef} from 'react';\nimport {RouterProvider} from 'react-aria/private/utils/openLink';\nimport {shouldKeepSpectrumClassNames} from '../utils/classNames';\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';\nimport {useDOMRef} from '../utils/useDOMRef';\nimport {useStyleProps} from '../utils/styleProps';\n// @ts-ignore\nimport {version} from '../../package.json';\n\nconst DEFAULT_BREAKPOINTS = {S: 640, M: 768, L: 1024, XL: 1280, XXL: 1536};\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 */\nexport const Provider = React.forwardRef(function Provider(\n props: ProviderProps,\n ref: DOMRef<HTMLDivElement>\n) {\n let prevContext = useContext(Context);\n let prevColorScheme = prevContext && prevContext.colorScheme;\n let prevBreakpoints = prevContext && prevContext.breakpoints;\n let {theme = prevContext && prevContext.theme, defaultColorScheme} = props;\n if (!theme) {\n throw new Error('theme not found, the parent provider must have a theme provided');\n }\n // Hooks must always be called.\n let autoColorScheme = useColorScheme(theme, defaultColorScheme || 'light');\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 = prevColorScheme ? !!theme[prevColorScheme] : false;\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 : undefined,\n breakpoints = prevContext ? prevBreakpoints : DEFAULT_BREAKPOINTS,\n children,\n isQuiet,\n isEmphasized,\n isDisabled,\n isRequired,\n isReadOnly,\n validationState,\n router,\n ...otherProps\n } = props;\n\n // select only the props with values so undefined props don't overwrite prevContext values\n let currentProps = {\n version,\n theme,\n breakpoints,\n colorScheme,\n scale,\n isQuiet,\n isEmphasized,\n isDisabled,\n isRequired,\n isReadOnly,\n validationState\n };\n\n let matchedBreakpoints = useMatchedBreakpoints(breakpoints!);\n let filteredProps = {};\n Object.entries(currentProps).forEach(\n ([key, value]) => value !== undefined && (filteredProps[key] = value)\n );\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 (\n !prevContext ||\n props.locale ||\n theme !== prevContext.theme ||\n colorScheme !== prevContext.colorScheme ||\n scale !== prevContext.scale ||\n Object.keys(domProps).length > 0 ||\n otherProps.UNSAFE_className ||\n (styleProps.style && Object.keys(styleProps.style).length > 0)\n ) {\n contents = (\n <ProviderWrapper\n {...props}\n UNSAFE_style={{isolation: !prevContext ? 'isolate' : undefined, ...styleProps.style}}\n ref={ref}>\n {contents}\n </ProviderWrapper>\n );\n }\n\n if (router) {\n contents = <RouterProvider {...router}>{contents}</RouterProvider>;\n }\n\n return (\n <Context.Provider value={context}>\n <I18nProvider locale={locale}>\n <BreakpointProvider matchedBreakpoints={matchedBreakpoints}>\n <ModalProvider>{contents}</ModalProvider>\n </BreakpointProvider>\n </I18nProvider>\n </Context.Provider>\n );\n});\n\nconst ProviderWrapper = React.forwardRef(function ProviderWrapper(\n props: ProviderProps,\n ref: DOMRef<HTMLDivElement>\n) {\n let {children, ...otherProps} = props;\n let {locale, direction} = useLocale();\n let {theme, colorScheme, scale} = useProvider();\n let {modalProviderProps} = useModalProvider();\n let {styleProps} = useStyleProps(otherProps);\n let domRef = useDOMRef(ref);\n\n let themeKey = Object.keys(theme[colorScheme]!)[0];\n let scaleKey = Object.keys(theme[scale]!)[0];\n\n let className = clsx(\n styleProps.className,\n styles['spectrum'],\n typographyStyles['spectrum'],\n Object.values(theme[colorScheme]!),\n Object.values(theme[scale]!),\n theme.global ? Object.values(theme.global) : null,\n {\n 'react-spectrum-provider': shouldKeepSpectrumClassNames,\n spectrum: shouldKeepSpectrumClassNames,\n [themeKey]: shouldKeepSpectrumClassNames,\n [scaleKey]: shouldKeepSpectrumClassNames\n }\n );\n\n let style = {\n ...styleProps.style,\n // This ensures that browser native UI like scrollbars are rendered in the right color scheme.\n // See https://web.dev/color-scheme/.\n colorScheme:\n props.colorScheme ??\n colorScheme ??\n Object.keys(theme)\n .filter(k => k === 'light' || k === 'dark')\n .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 && process.env.NODE_ENV !== 'production') {\n console.warn(`Language directions cannot be nested. ${direction} inside ${dir}.`);\n hasWarned.current = true;\n }\n }\n }, [direction, domRef, hasWarned]);\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. Properties\n * explicitly set by the nearest parent Provider override those provided by preceeding Providers.\n */\nexport function useProvider(): ProviderContext {\n let context = useContext(Context);\n if (!context) {\n throw new Error(\n 'No root provider found, please make sure your app is wrapped within a <Provider>. ' +\n 'Alternatively, this issue may be caused by duplicate packages, see https://github.com/adobe/react-spectrum/wiki/Frequently-Asked-Questions-(FAQs)#why-are-there-errors-after-upgrading-a-react-spectrum-package for more information.'\n );\n }\n return context;\n}\n\nexport function useProviderProps<T>(props: T): T {\n let context = useContext(Context);\n if (!context) {\n return props;\n }\n return Object.assign(\n {},\n {\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 },\n props\n );\n}\n"],"names":[],"version":3,"file":"Provider.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;AAqBD,gEAAgE;AAChE,MAAM;AAEN,MAAM,4CAAsB;IAAC,GAAG;IAAK,GAAG;IAAK,GAAG;IAAM,IAAI;IAAM,KAAK;AAAI;AAOlE,MAAM,0DAAW,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC,SAAS,SAChD,KAAoB,EACpB,GAA2B;IAE3B,IAAI,cAAc,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,yCAAM;IACnC,IAAI,kBAAkB,eAAe,YAAY,WAAW;IAC5D,IAAI,kBAAkB,eAAe,YAAY,WAAW;IAC5D,IAAI,SAAC,QAAQ,eAAe,YAAY,KAAK,sBAAE,kBAAkB,EAAC,GAAG;IACrE,IAAI,CAAC,OACH,MAAM,IAAI,MAAM;IAElB,+BAA+B;IAC/B,IAAI,kBAAkB,CAAA,GAAA,yCAAa,EAAE,OAAO,sBAAsB;IAClE,IAAI,YAAY,CAAA,GAAA,yCAAO,EAAE;IACzB,IAAI,EAAC,QAAQ,UAAU,EAAC,GAAG,CAAA,GAAA,gBAAQ;IACnC,mFAAmF;IACnF,IAAI,qBAAqB,kBAAkB,CAAC,CAAC,KAAK,CAAC,gBAAgB,GAAG;IAEtE,4EAA4E;IAC5E,IAAI,eACF,cAAc,qBAAqB,kBAAkB,wBACrD,QAAQ,cAAc,YAAY,KAAK,GAAG,mBAC1C,SAAS,cAAc,aAAa,wBACpC,cAAc,cAAc,kBAAkB,qDAC9C,QAAQ,WACR,OAAO,gBACP,YAAY,cACZ,UAAU,cACV,UAAU,cACV,UAAU,mBACV,eAAe,UACf,MAAM,EACN,GAAG,YACJ,GAAG;IAEJ,0FAA0F;IAC1F,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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 {BreakpointProvider, useMatchedBreakpoints} from '../utils/BreakpointProvider';\n\nimport clsx from 'clsx';\nimport {Context} from './context';\nimport {DOMRef} from '@react-types/shared';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {getVersion} from './version-macro' with {type: 'macro'};\nimport {I18nProvider, useLocale} from 'react-aria/I18nProvider';\nimport {ModalProvider, useModalProvider} from 'react-aria/private/overlays/useModal';\nimport {ProviderContext, ProviderProps} from './types';\nimport React, {useContext, useEffect, useRef} from 'react';\nimport {RouterProvider} from 'react-aria/private/utils/openLink';\nimport {shouldKeepSpectrumClassNames} from '../utils/classNames';\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';\nimport {useDOMRef} from '../utils/useDOMRef';\nimport {useStyleProps} from '../utils/styleProps';\n\n// A macro ensures that we don't import the entire package.json.\nconst version = getVersion();\n\nconst DEFAULT_BREAKPOINTS = {S: 640, M: 768, L: 1024, XL: 1280, XXL: 1536};\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 */\nexport const Provider = React.forwardRef(function Provider(\n props: ProviderProps,\n ref: DOMRef<HTMLDivElement>\n) {\n let prevContext = useContext(Context);\n let prevColorScheme = prevContext && prevContext.colorScheme;\n let prevBreakpoints = prevContext && prevContext.breakpoints;\n let {theme = prevContext && prevContext.theme, defaultColorScheme} = props;\n if (!theme) {\n throw new Error('theme not found, the parent provider must have a theme provided');\n }\n // Hooks must always be called.\n let autoColorScheme = useColorScheme(theme, defaultColorScheme || 'light');\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 = prevColorScheme ? !!theme[prevColorScheme] : false;\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 : undefined,\n breakpoints = prevContext ? prevBreakpoints : DEFAULT_BREAKPOINTS,\n children,\n isQuiet,\n isEmphasized,\n isDisabled,\n isRequired,\n isReadOnly,\n validationState,\n router,\n ...otherProps\n } = props;\n\n // select only the props with values so undefined props don't overwrite prevContext values\n let currentProps = {\n version,\n theme,\n breakpoints,\n colorScheme,\n scale,\n isQuiet,\n isEmphasized,\n isDisabled,\n isRequired,\n isReadOnly,\n validationState\n };\n\n let matchedBreakpoints = useMatchedBreakpoints(breakpoints!);\n let filteredProps = {};\n Object.entries(currentProps).forEach(\n ([key, value]) => value !== undefined && (filteredProps[key] = value)\n );\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 (\n !prevContext ||\n props.locale ||\n theme !== prevContext.theme ||\n colorScheme !== prevContext.colorScheme ||\n scale !== prevContext.scale ||\n Object.keys(domProps).length > 0 ||\n otherProps.UNSAFE_className ||\n (styleProps.style && Object.keys(styleProps.style).length > 0)\n ) {\n contents = (\n <ProviderWrapper\n {...props}\n UNSAFE_style={{isolation: !prevContext ? 'isolate' : undefined, ...styleProps.style}}\n ref={ref}>\n {contents}\n </ProviderWrapper>\n );\n }\n\n if (router) {\n contents = <RouterProvider {...router}>{contents}</RouterProvider>;\n }\n\n return (\n <Context.Provider value={context}>\n <I18nProvider locale={locale}>\n <BreakpointProvider matchedBreakpoints={matchedBreakpoints}>\n <ModalProvider>{contents}</ModalProvider>\n </BreakpointProvider>\n </I18nProvider>\n </Context.Provider>\n );\n});\n\nconst ProviderWrapper = React.forwardRef(function ProviderWrapper(\n props: ProviderProps,\n ref: DOMRef<HTMLDivElement>\n) {\n let {children, ...otherProps} = props;\n let {locale, direction} = useLocale();\n let {theme, colorScheme, scale} = useProvider();\n let {modalProviderProps} = useModalProvider();\n let {styleProps} = useStyleProps(otherProps);\n let domRef = useDOMRef(ref);\n\n let themeKey = Object.keys(theme[colorScheme]!)[0];\n let scaleKey = Object.keys(theme[scale]!)[0];\n\n let className = clsx(\n styleProps.className,\n styles['spectrum'],\n typographyStyles['spectrum'],\n Object.values(theme[colorScheme]!),\n Object.values(theme[scale]!),\n theme.global ? Object.values(theme.global) : null,\n {\n 'react-spectrum-provider': shouldKeepSpectrumClassNames,\n spectrum: shouldKeepSpectrumClassNames,\n [themeKey]: shouldKeepSpectrumClassNames,\n [scaleKey]: shouldKeepSpectrumClassNames\n }\n );\n\n let style = {\n ...styleProps.style,\n // This ensures that browser native UI like scrollbars are rendered in the right color scheme.\n // See https://web.dev/color-scheme/.\n colorScheme:\n props.colorScheme ??\n colorScheme ??\n Object.keys(theme)\n .filter(k => k === 'light' || k === 'dark')\n .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 && process.env.NODE_ENV !== 'production') {\n console.warn(`Language directions cannot be nested. ${direction} inside ${dir}.`);\n hasWarned.current = true;\n }\n }\n }, [direction, domRef, hasWarned]);\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. Properties\n * explicitly set by the nearest parent Provider override those provided by preceeding Providers.\n */\nexport function useProvider(): ProviderContext {\n let context = useContext(Context);\n if (!context) {\n throw new Error(\n 'No root provider found, please make sure your app is wrapped within a <Provider>. ' +\n 'Alternatively, this issue may be caused by duplicate packages, see https://github.com/adobe/react-spectrum/wiki/Frequently-Asked-Questions-(FAQs)#why-are-there-errors-after-upgrading-a-react-spectrum-package for more information.'\n );\n }\n return context;\n}\n\nexport function useProviderProps<T>(props: T): T {\n let context = useContext(Context);\n if (!context) {\n return props;\n }\n return Object.assign(\n {},\n {\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 },\n props\n );\n}\n"],"names":[],"version":3,"file":"Provider.js.map"}
@@ -8,7 +8,6 @@ import $bfea4$typography_index_cssmjs from "../typography_index_css.mjs";
8
8
  import {useColorScheme as $148c2d7e62e3ab23$export$6343629ee1b29116, useScale as $148c2d7e62e3ab23$export$a8d2043b2d807f4d} from "./mediaQueries.mjs";
9
9
  import {useDOMRef as $3c2c983d5210446c$export$c2c55ef9111cafd8} from "../utils/useDOMRef.mjs";
10
10
  import {useStyleProps as $63d03c54ca5e4b88$export$b8e6fb9d2dff3f41} from "../utils/styleProps.mjs";
11
- import $bfea4$packagemjs from "../package.mjs";
12
11
  import $bfea4$clsx from "clsx";
13
12
  import {filterDOMProps as $bfea4$filterDOMProps} from "react-aria/filterDOMProps";
14
13
  import {useLocale as $bfea4$useLocale, I18nProvider as $bfea4$I18nProvider} from "react-aria/I18nProvider";
@@ -44,7 +43,8 @@ function $parcel$interopDefault(a) {
44
43
 
45
44
 
46
45
 
47
-
46
+ // A macro ensures that we don't import the entire package.json.
47
+ const $71dfb0e0358a12de$var$version = "3.47.4";
48
48
  const $71dfb0e0358a12de$var$DEFAULT_BREAKPOINTS = {
49
49
  S: 640,
50
50
  M: 768,
@@ -68,7 +68,7 @@ const $71dfb0e0358a12de$export$2881499e37b75b9a = /*#__PURE__*/ (0, $bfea4$react
68
68
  let { colorScheme: colorScheme = usePrevColorScheme ? prevColorScheme : autoColorScheme, scale: scale = prevContext ? prevContext.scale : autoScale, locale: locale = prevContext ? prevLocale : undefined, breakpoints: breakpoints = prevContext ? prevBreakpoints : $71dfb0e0358a12de$var$DEFAULT_BREAKPOINTS, children: children, isQuiet: isQuiet, isEmphasized: isEmphasized, isDisabled: isDisabled, isRequired: isRequired, isReadOnly: isReadOnly, validationState: validationState, router: router, ...otherProps } = props;
69
69
  // select only the props with values so undefined props don't overwrite prevContext values
70
70
  let currentProps = {
71
- version: $bfea4$packagemjs.version,
71
+ version: $71dfb0e0358a12de$var$version,
72
72
  theme: theme,
73
73
  breakpoints: breakpoints,
74
74
  colorScheme: colorScheme,
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;;AAsBD,MAAM,4CAAsB;IAAC,GAAG;IAAK,GAAG;IAAK,GAAG;IAAM,IAAI;IAAM,KAAK;AAAI;AAOlE,MAAM,0DAAW,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC,SAAS,SAChD,KAAoB,EACpB,GAA2B;IAE3B,IAAI,cAAc,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,yCAAM;IACnC,IAAI,kBAAkB,eAAe,YAAY,WAAW;IAC5D,IAAI,kBAAkB,eAAe,YAAY,WAAW;IAC5D,IAAI,SAAC,QAAQ,eAAe,YAAY,KAAK,sBAAE,kBAAkB,EAAC,GAAG;IACrE,IAAI,CAAC,OACH,MAAM,IAAI,MAAM;IAElB,+BAA+B;IAC/B,IAAI,kBAAkB,CAAA,GAAA,yCAAa,EAAE,OAAO,sBAAsB;IAClE,IAAI,YAAY,CAAA,GAAA,yCAAO,EAAE;IACzB,IAAI,EAAC,QAAQ,UAAU,EAAC,GAAG,CAAA,GAAA,gBAAQ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,OAAO;QACxB,cAAc,QAAQ,YAAY;QAClC,YAAY,QAAQ,UAAU;QAC9B,YAAY,QAAQ,UAAU;QAC9B,YAAY,QAAQ,UAAU;QAC9B,iBAAiB,QAAQ,eAAe;IAC1C,GACA;AAEJ","sources":["packages/@adobe/react-spectrum/src/provider/Provider.tsx"],"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\nimport {BreakpointProvider, useMatchedBreakpoints} from '../utils/BreakpointProvider';\n\nimport clsx from 'clsx';\nimport {Context} from './context';\nimport {DOMRef} from '@react-types/shared';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {I18nProvider, useLocale} from 'react-aria/I18nProvider';\nimport {ModalProvider, useModalProvider} from 'react-aria/private/overlays/useModal';\nimport {ProviderContext, ProviderProps} from './types';\nimport React, {useContext, useEffect, useRef} from 'react';\nimport {RouterProvider} from 'react-aria/private/utils/openLink';\nimport {shouldKeepSpectrumClassNames} from '../utils/classNames';\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';\nimport {useDOMRef} from '../utils/useDOMRef';\nimport {useStyleProps} from '../utils/styleProps';\n// @ts-ignore\nimport {version} from '../../package.json';\n\nconst DEFAULT_BREAKPOINTS = {S: 640, M: 768, L: 1024, XL: 1280, XXL: 1536};\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 */\nexport const Provider = React.forwardRef(function Provider(\n props: ProviderProps,\n ref: DOMRef<HTMLDivElement>\n) {\n let prevContext = useContext(Context);\n let prevColorScheme = prevContext && prevContext.colorScheme;\n let prevBreakpoints = prevContext && prevContext.breakpoints;\n let {theme = prevContext && prevContext.theme, defaultColorScheme} = props;\n if (!theme) {\n throw new Error('theme not found, the parent provider must have a theme provided');\n }\n // Hooks must always be called.\n let autoColorScheme = useColorScheme(theme, defaultColorScheme || 'light');\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 = prevColorScheme ? !!theme[prevColorScheme] : false;\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 : undefined,\n breakpoints = prevContext ? prevBreakpoints : DEFAULT_BREAKPOINTS,\n children,\n isQuiet,\n isEmphasized,\n isDisabled,\n isRequired,\n isReadOnly,\n validationState,\n router,\n ...otherProps\n } = props;\n\n // select only the props with values so undefined props don't overwrite prevContext values\n let currentProps = {\n version,\n theme,\n breakpoints,\n colorScheme,\n scale,\n isQuiet,\n isEmphasized,\n isDisabled,\n isRequired,\n isReadOnly,\n validationState\n };\n\n let matchedBreakpoints = useMatchedBreakpoints(breakpoints!);\n let filteredProps = {};\n Object.entries(currentProps).forEach(\n ([key, value]) => value !== undefined && (filteredProps[key] = value)\n );\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 (\n !prevContext ||\n props.locale ||\n theme !== prevContext.theme ||\n colorScheme !== prevContext.colorScheme ||\n scale !== prevContext.scale ||\n Object.keys(domProps).length > 0 ||\n otherProps.UNSAFE_className ||\n (styleProps.style && Object.keys(styleProps.style).length > 0)\n ) {\n contents = (\n <ProviderWrapper\n {...props}\n UNSAFE_style={{isolation: !prevContext ? 'isolate' : undefined, ...styleProps.style}}\n ref={ref}>\n {contents}\n </ProviderWrapper>\n );\n }\n\n if (router) {\n contents = <RouterProvider {...router}>{contents}</RouterProvider>;\n }\n\n return (\n <Context.Provider value={context}>\n <I18nProvider locale={locale}>\n <BreakpointProvider matchedBreakpoints={matchedBreakpoints}>\n <ModalProvider>{contents}</ModalProvider>\n </BreakpointProvider>\n </I18nProvider>\n </Context.Provider>\n );\n});\n\nconst ProviderWrapper = React.forwardRef(function ProviderWrapper(\n props: ProviderProps,\n ref: DOMRef<HTMLDivElement>\n) {\n let {children, ...otherProps} = props;\n let {locale, direction} = useLocale();\n let {theme, colorScheme, scale} = useProvider();\n let {modalProviderProps} = useModalProvider();\n let {styleProps} = useStyleProps(otherProps);\n let domRef = useDOMRef(ref);\n\n let themeKey = Object.keys(theme[colorScheme]!)[0];\n let scaleKey = Object.keys(theme[scale]!)[0];\n\n let className = clsx(\n styleProps.className,\n styles['spectrum'],\n typographyStyles['spectrum'],\n Object.values(theme[colorScheme]!),\n Object.values(theme[scale]!),\n theme.global ? Object.values(theme.global) : null,\n {\n 'react-spectrum-provider': shouldKeepSpectrumClassNames,\n spectrum: shouldKeepSpectrumClassNames,\n [themeKey]: shouldKeepSpectrumClassNames,\n [scaleKey]: shouldKeepSpectrumClassNames\n }\n );\n\n let style = {\n ...styleProps.style,\n // This ensures that browser native UI like scrollbars are rendered in the right color scheme.\n // See https://web.dev/color-scheme/.\n colorScheme:\n props.colorScheme ??\n colorScheme ??\n Object.keys(theme)\n .filter(k => k === 'light' || k === 'dark')\n .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 && process.env.NODE_ENV !== 'production') {\n console.warn(`Language directions cannot be nested. ${direction} inside ${dir}.`);\n hasWarned.current = true;\n }\n }\n }, [direction, domRef, hasWarned]);\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. Properties\n * explicitly set by the nearest parent Provider override those provided by preceeding Providers.\n */\nexport function useProvider(): ProviderContext {\n let context = useContext(Context);\n if (!context) {\n throw new Error(\n 'No root provider found, please make sure your app is wrapped within a <Provider>. ' +\n 'Alternatively, this issue may be caused by duplicate packages, see https://github.com/adobe/react-spectrum/wiki/Frequently-Asked-Questions-(FAQs)#why-are-there-errors-after-upgrading-a-react-spectrum-package for more information.'\n );\n }\n return context;\n}\n\nexport function useProviderProps<T>(props: T): T {\n let context = useContext(Context);\n if (!context) {\n return props;\n }\n return Object.assign(\n {},\n {\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 },\n props\n );\n}\n"],"names":[],"version":3,"file":"Provider.mjs.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;AAqBD,gEAAgE;AAChE,MAAM;AAEN,MAAM,4CAAsB;IAAC,GAAG;IAAK,GAAG;IAAK,GAAG;IAAM,IAAI;IAAM,KAAK;AAAI;AAOlE,MAAM,0DAAW,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC,SAAS,SAChD,KAAoB,EACpB,GAA2B;IAE3B,IAAI,cAAc,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,yCAAM;IACnC,IAAI,kBAAkB,eAAe,YAAY,WAAW;IAC5D,IAAI,kBAAkB,eAAe,YAAY,WAAW;IAC5D,IAAI,SAAC,QAAQ,eAAe,YAAY,KAAK,sBAAE,kBAAkB,EAAC,GAAG;IACrE,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ACH,MAAM,IAAI,MACR;IAIJ,OAAO;AACT;AAEO,SAAS,0CAAoB,KAAQ;IAC1C,IAAI,UAAU,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,yCAAM;IAC/B,IAAI,CAAC,SACH,OAAO;IAET,OAAO,OAAO,MAAM,CAClB,CAAC,GACD;QACE,SAAS,QAAQ,OAAO;QACxB,cAAc,QAAQ,YAAY;QAClC,YAAY,QAAQ,UAAU;QAC9B,YAAY,QAAQ,UAAU;QAC9B,YAAY,QAAQ,UAAU;QAC9B,iBAAiB,QAAQ,eAAe;IAC1C,GACA;AAEJ","sources":["packages/@adobe/react-spectrum/src/provider/Provider.tsx"],"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\nimport {BreakpointProvider, useMatchedBreakpoints} from '../utils/BreakpointProvider';\n\nimport clsx from 'clsx';\nimport {Context} from './context';\nimport {DOMRef} from '@react-types/shared';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {getVersion} from './version-macro' with {type: 'macro'};\nimport {I18nProvider, useLocale} from 'react-aria/I18nProvider';\nimport {ModalProvider, useModalProvider} from 'react-aria/private/overlays/useModal';\nimport {ProviderContext, ProviderProps} from './types';\nimport React, {useContext, useEffect, useRef} from 'react';\nimport {RouterProvider} from 'react-aria/private/utils/openLink';\nimport {shouldKeepSpectrumClassNames} from '../utils/classNames';\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';\nimport {useDOMRef} from '../utils/useDOMRef';\nimport {useStyleProps} from '../utils/styleProps';\n\n// A macro ensures that we don't import the entire package.json.\nconst version = getVersion();\n\nconst DEFAULT_BREAKPOINTS = {S: 640, M: 768, L: 1024, XL: 1280, XXL: 1536};\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 */\nexport const Provider = React.forwardRef(function Provider(\n props: ProviderProps,\n ref: DOMRef<HTMLDivElement>\n) {\n let prevContext = useContext(Context);\n let prevColorScheme = prevContext && prevContext.colorScheme;\n let prevBreakpoints = prevContext && prevContext.breakpoints;\n let {theme = prevContext && prevContext.theme, defaultColorScheme} = props;\n if (!theme) {\n throw new Error('theme not found, the parent provider must have a theme provided');\n }\n // Hooks must always be called.\n let autoColorScheme = useColorScheme(theme, defaultColorScheme || 'light');\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 = prevColorScheme ? !!theme[prevColorScheme] : false;\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 : undefined,\n breakpoints = prevContext ? prevBreakpoints : DEFAULT_BREAKPOINTS,\n children,\n isQuiet,\n isEmphasized,\n isDisabled,\n isRequired,\n isReadOnly,\n validationState,\n router,\n ...otherProps\n } = props;\n\n // select only the props with values so undefined props don't overwrite prevContext values\n let currentProps = {\n version,\n theme,\n breakpoints,\n colorScheme,\n scale,\n isQuiet,\n isEmphasized,\n isDisabled,\n isRequired,\n isReadOnly,\n validationState\n };\n\n let matchedBreakpoints = useMatchedBreakpoints(breakpoints!);\n let filteredProps = {};\n Object.entries(currentProps).forEach(\n ([key, value]) => value !== undefined && (filteredProps[key] = value)\n );\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 (\n !prevContext ||\n props.locale ||\n theme !== prevContext.theme ||\n colorScheme !== prevContext.colorScheme ||\n scale !== prevContext.scale ||\n Object.keys(domProps).length > 0 ||\n otherProps.UNSAFE_className ||\n (styleProps.style && Object.keys(styleProps.style).length > 0)\n ) {\n contents = (\n <ProviderWrapper\n {...props}\n UNSAFE_style={{isolation: !prevContext ? 'isolate' : undefined, ...styleProps.style}}\n ref={ref}>\n {contents}\n </ProviderWrapper>\n );\n }\n\n if (router) {\n contents = <RouterProvider {...router}>{contents}</RouterProvider>;\n }\n\n return (\n <Context.Provider value={context}>\n <I18nProvider locale={locale}>\n <BreakpointProvider matchedBreakpoints={matchedBreakpoints}>\n <ModalProvider>{contents}</ModalProvider>\n </BreakpointProvider>\n </I18nProvider>\n </Context.Provider>\n );\n});\n\nconst ProviderWrapper = React.forwardRef(function ProviderWrapper(\n props: ProviderProps,\n ref: DOMRef<HTMLDivElement>\n) {\n let {children, ...otherProps} = props;\n let {locale, direction} = useLocale();\n let {theme, colorScheme, scale} = useProvider();\n let {modalProviderProps} = useModalProvider();\n let {styleProps} = useStyleProps(otherProps);\n let domRef = useDOMRef(ref);\n\n let themeKey = Object.keys(theme[colorScheme]!)[0];\n let scaleKey = Object.keys(theme[scale]!)[0];\n\n let className = clsx(\n styleProps.className,\n styles['spectrum'],\n typographyStyles['spectrum'],\n Object.values(theme[colorScheme]!),\n Object.values(theme[scale]!),\n theme.global ? Object.values(theme.global) : null,\n {\n 'react-spectrum-provider': shouldKeepSpectrumClassNames,\n spectrum: shouldKeepSpectrumClassNames,\n [themeKey]: shouldKeepSpectrumClassNames,\n [scaleKey]: shouldKeepSpectrumClassNames\n }\n );\n\n let style = {\n ...styleProps.style,\n // This ensures that browser native UI like scrollbars are rendered in the right color scheme.\n // See https://web.dev/color-scheme/.\n colorScheme:\n props.colorScheme ??\n colorScheme ??\n Object.keys(theme)\n .filter(k => k === 'light' || k === 'dark')\n .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 && process.env.NODE_ENV !== 'production') {\n console.warn(`Language directions cannot be nested. ${direction} inside ${dir}.`);\n hasWarned.current = true;\n }\n }\n }, [direction, domRef, hasWarned]);\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. Properties\n * explicitly set by the nearest parent Provider override those provided by preceeding Providers.\n */\nexport function useProvider(): ProviderContext {\n let context = useContext(Context);\n if (!context) {\n throw new Error(\n 'No root provider found, please make sure your app is wrapped within a <Provider>. ' +\n 'Alternatively, this issue may be caused by duplicate packages, see https://github.com/adobe/react-spectrum/wiki/Frequently-Asked-Questions-(FAQs)#why-are-there-errors-after-upgrading-a-react-spectrum-package for more information.'\n );\n }\n return context;\n}\n\nexport function useProviderProps<T>(props: T): T {\n let context = useContext(Context);\n if (!context) {\n return props;\n }\n return Object.assign(\n {},\n {\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 },\n props\n );\n}\n"],"names":[],"version":3,"file":"Provider.mjs.map"}
@@ -8,7 +8,7 @@ export interface SpectrumAccordionProps extends Omit<DisclosureGroupProps, 'clas
8
8
  children: React.ReactNode;
9
9
  }
10
10
  /** A group of disclosures that can be expanded and collapsed. */
11
- export declare const Accordion: (props: SpectrumAccordionProps & React.RefAttributes<import("@react-types/shared").DOMRefValue<HTMLDivElement>>) => React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | null;
11
+ export declare const Accordion: (props: SpectrumAccordionProps & React.RefAttributes<import("@react-types/shared").DOMRefValue<HTMLDivElement>>) => React.ReactElement | null;
12
12
  export interface SpectrumDisclosureProps extends Omit<DisclosureProps, 'className' | 'style' | 'render' | 'children'>, AriaLabelingProps, StyleProps {
13
13
  /** Whether the Disclosure should be displayed with a quiet style. */
14
14
  isQuiet?: boolean;
@@ -19,13 +19,13 @@ export interface SpectrumDisclosureProps extends Omit<DisclosureProps, 'classNam
19
19
  children: React.ReactNode;
20
20
  }
21
21
  /** A collapsible section of content composed of a heading that expands and collapses a panel. */
22
- export declare const Disclosure: (props: SpectrumDisclosureProps & React.RefAttributes<import("@react-types/shared").DOMRefValue<HTMLDivElement>>) => React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | null;
22
+ export declare const Disclosure: (props: SpectrumDisclosureProps & React.RefAttributes<import("@react-types/shared").DOMRefValue<HTMLDivElement>>) => React.ReactElement | null;
23
23
  export interface SpectrumDisclosurePanelProps extends Omit<DisclosurePanelProps, 'className' | 'style' | 'render' | 'children'>, DOMProps, AriaLabelingProps, StyleProps {
24
24
  /** The contents of the accordion panel. */
25
25
  children: React.ReactNode;
26
26
  }
27
27
  /** The panel that contains the content of the disclosure. */
28
- export declare const DisclosurePanel: (props: SpectrumDisclosurePanelProps & React.RefAttributes<import("@react-types/shared").DOMRefValue<HTMLDivElement>>) => React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | null;
28
+ export declare const DisclosurePanel: (props: SpectrumDisclosurePanelProps & React.RefAttributes<import("@react-types/shared").DOMRefValue<HTMLDivElement>>) => React.ReactElement | null;
29
29
  export interface SpectrumDisclosureTitleProps extends DOMProps, AriaLabelingProps, StyleProps {
30
30
  /**
31
31
  * The heading level of the disclosure header.
@@ -37,4 +37,4 @@ export interface SpectrumDisclosureTitleProps extends DOMProps, AriaLabelingProp
37
37
  children: React.ReactNode;
38
38
  }
39
39
  /** The heading of the disclosure. */
40
- export declare const DisclosureTitle: (props: SpectrumDisclosureTitleProps & React.RefAttributes<import("@react-types/shared").DOMRefValue<HTMLHeadingElement>>) => React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | null;
40
+ export declare const DisclosureTitle: (props: SpectrumDisclosureTitleProps & React.RefAttributes<import("@react-types/shared").DOMRefValue<HTMLHeadingElement>>) => React.ReactElement | null;
@@ -1,5 +1,5 @@
1
1
  import { DOMProps, DOMRef, ItemElement, ItemRenderer, Key, StyleProps } from '@react-types/shared';
2
- import React, { ReactElement } from 'react';
2
+ import { ReactElement } from 'react';
3
3
  interface ActionBarProps<T> {
4
4
  /**
5
5
  * An list of `Item` elements or a function. If the latter, a list of items must be provided using
@@ -38,6 +38,6 @@ export interface SpectrumActionBarProps<T> extends ActionBarProps<T>, DOMProps,
38
38
  * on one or more items at the same time.
39
39
  */
40
40
  export declare const ActionBar: <T>(props: SpectrumActionBarProps<T> & {
41
- ref?: DOMRef<HTMLDivElement> | undefined;
42
- }) => ReactElement<unknown, string | React.JSXElementConstructor<any>>;
41
+ ref?: DOMRef<HTMLDivElement>;
42
+ }) => ReactElement;
43
43
  export {};
@@ -1,6 +1,6 @@
1
1
  import { AriaActionGroupProps } from 'react-aria/private/actiongroup/useActionGroup';
2
2
  import { DOMRef, StyleProps } from '@react-types/shared';
3
- import React, { ReactElement } from 'react';
3
+ import { ReactElement } from 'react';
4
4
  export interface SpectrumActionGroupProps<T> extends AriaActionGroupProps<T>, StyleProps {
5
5
  /**
6
6
  * Whether the ActionButtons should be displayed with a [emphasized
@@ -46,5 +46,5 @@ export interface SpectrumActionGroupProps<T> extends AriaActionGroupProps<T>, St
46
46
  * An ActionGroup is a grouping of ActionButtons that are related to one another.
47
47
  */
48
48
  export declare const ActionGroup: <T>(props: SpectrumActionGroupProps<T> & {
49
- ref?: DOMRef<HTMLDivElement> | undefined;
50
- }) => ReactElement<unknown, string | React.JSXElementConstructor<any>>;
49
+ ref?: DOMRef<HTMLDivElement>;
50
+ }) => ReactElement;
@@ -1,6 +1,6 @@
1
1
  import { FocusableRef } from '@react-types/shared';
2
- import React, { ReactElement } from 'react';
2
+ import { ReactElement } from 'react';
3
3
  import { SpectrumSearchAutocompleteProps } from './SearchAutocomplete';
4
4
  export declare let MobileSearchAutocomplete: <T>(props: SpectrumSearchAutocompleteProps<T> & {
5
- ref?: FocusableRef<HTMLElement> | undefined;
6
- }) => ReactElement<unknown, string | React.JSXElementConstructor<any>>;
5
+ ref?: FocusableRef<HTMLElement>;
6
+ }) => ReactElement;
@@ -1,7 +1,7 @@
1
1
  import { AriaSearchAutocompleteProps } from 'react-aria/private/autocomplete/useSearchAutocomplete';
2
2
  import { AsyncLoadable, DimensionValue, FocusableRef, LoadingState, SpectrumFieldValidation, SpectrumLabelableProps, SpectrumTextInputBase, StyleProps } from '@react-types/shared';
3
3
  import { MenuTriggerAction } from 'react-stately/useComboBoxState';
4
- import React, { ReactElement } from 'react';
4
+ import { ReactElement } from 'react';
5
5
  export interface SpectrumSearchAutocompleteProps<T> extends SpectrumTextInputBase, Omit<AriaSearchAutocompleteProps<T>, 'menuTrigger' | 'isInvalid' | 'validationState' | 'validate'>, SpectrumFieldValidation<string>, SpectrumLabelableProps, StyleProps, Omit<AsyncLoadable, 'isLoading'> {
6
6
  /**
7
7
  * The interaction required to display the SearchAutocomplete menu. Note that this prop has no
@@ -48,6 +48,6 @@ export interface SpectrumSearchAutocompleteProps<T> extends SpectrumTextInputBas
48
48
  * A SearchAutocomplete is a searchfield that supports a dynamic list of suggestions.
49
49
  */
50
50
  declare let ForwardSearchAutocomplete: <T>(props: SpectrumSearchAutocompleteProps<T> & {
51
- ref?: FocusableRef<HTMLElement> | undefined;
52
- }) => ReactElement<unknown, string | React.JSXElementConstructor<any>>;
51
+ ref?: FocusableRef<HTMLElement>;
52
+ }) => ReactElement;
53
53
  export { ForwardSearchAutocomplete as SearchAutocomplete };
@@ -1,6 +1,6 @@
1
1
  import { AriaButtonProps } from 'react-aria/useButton';
2
2
  import { FocusableRef, StyleProps } from '@react-types/shared';
3
- import React, { ElementType, ReactElement } from 'react';
3
+ import { ElementType, ReactElement } from 'react';
4
4
  /** @deprecated */
5
5
  type LegacyButtonVariant = 'cta' | 'overBackground';
6
6
  export interface SpectrumButtonProps<T extends ElementType = 'button'> extends Omit<AriaButtonProps<T>, 'onClick'>, StyleProps {
@@ -26,7 +26,7 @@ export interface SpectrumButtonProps<T extends ElementType = 'button'> extends O
26
26
  * They have multiple styles for various needs, and are ideal for calling attention to
27
27
  * where a user needs to do something in order to move forward in a flow.
28
28
  */
29
- export declare const Button: <T extends ElementType = "button">(props: SpectrumButtonProps<T> & {
30
- ref?: FocusableRef<HTMLElement> | undefined;
31
- }) => ReactElement<unknown, string | React.JSXElementConstructor<any>>;
29
+ export declare const Button: <T extends ElementType = 'button'>(props: SpectrumButtonProps<T> & {
30
+ ref?: FocusableRef<HTMLElement>;
31
+ }) => ReactElement;
32
32
  export {};
@@ -2,7 +2,7 @@ import { AriaCalendarProps } from 'react-aria/useCalendar';
2
2
  import { CalendarIdentifier, Calendar as ICalendar } from '@internationalized/date';
3
3
  import { DateValue } from 'react-stately/useCalendarState';
4
4
  import { FocusableRef, StyleProps } from '@react-types/shared';
5
- import React, { ReactElement } from 'react';
5
+ import { ReactElement } from 'react';
6
6
  export interface SpectrumCalendarProps<T extends DateValue> extends Omit<AriaCalendarProps<T>, 'selectionMode' | 'weeksInMonth'>, StyleProps {
7
7
  /**
8
8
  * The number of months to display at once. Up to 3 months are supported.
@@ -22,5 +22,5 @@ export interface SpectrumCalendarProps<T extends DateValue> extends Omit<AriaCal
22
22
  * Calendars display a grid of days in one or more months and allow users to select a single date.
23
23
  */
24
24
  export declare const Calendar: <T extends DateValue>(props: SpectrumCalendarProps<T> & {
25
- ref?: FocusableRef<HTMLElement> | undefined;
26
- }) => ReactElement<unknown, string | React.JSXElementConstructor<any>>;
25
+ ref?: FocusableRef<HTMLElement>;
26
+ }) => ReactElement;
@@ -2,7 +2,7 @@ import { AriaRangeCalendarProps } from 'react-aria/useRangeCalendar';
2
2
  import { CalendarIdentifier, Calendar as ICalendar } from '@internationalized/date';
3
3
  import { DateValue } from 'react-stately/useCalendarState';
4
4
  import { FocusableRef, StyleProps } from '@react-types/shared';
5
- import React, { ReactElement } from 'react';
5
+ import { ReactElement } from 'react';
6
6
  export interface SpectrumRangeCalendarProps<T extends DateValue> extends Omit<AriaRangeCalendarProps<T>, 'weeksInMonth'>, StyleProps {
7
7
  /**
8
8
  * The number of months to display at once. Up to 3 months are supported.
@@ -23,5 +23,5 @@ export interface SpectrumRangeCalendarProps<T extends DateValue> extends Omit<Ar
23
23
  * contiguous range of dates.
24
24
  */
25
25
  export declare const RangeCalendar: <T extends DateValue>(props: SpectrumRangeCalendarProps<T> & {
26
- ref?: FocusableRef<HTMLElement> | undefined;
27
- }) => ReactElement<unknown, string | React.JSXElementConstructor<any>>;
26
+ ref?: FocusableRef<HTMLElement>;
27
+ }) => ReactElement;
@@ -1,5 +1,5 @@
1
1
  import { DOMRefValue, ItemProps } from '@react-types/shared';
2
- import { ForwardRefExoticComponent, RefAttributes } from 'react';
2
+ import { ForwardRefExoticComponent, PropsWithoutRef, RefAttributes } from 'react';
3
3
  import { SpectrumCardProps } from './types';
4
- declare let _Card: ForwardRefExoticComponent<ItemProps<SpectrumCardProps> & SpectrumCardProps & RefAttributes<DOMRefValue<HTMLDivElement>>>;
4
+ declare let _Card: ForwardRefExoticComponent<ItemProps<SpectrumCardProps> & PropsWithoutRef<SpectrumCardProps> & RefAttributes<DOMRefValue<HTMLDivElement>>>;
5
5
  export { _Card as Card };
@@ -1,9 +1,9 @@
1
1
  import { DOMRef } from '@react-types/shared';
2
- import React, { ReactElement } from 'react';
2
+ import { ReactElement } from 'react';
3
3
  import { SpectrumCardViewProps } from './types';
4
4
  /**
5
5
  * TODO: Add description of component here.
6
6
  */
7
7
  export declare const CardView: <T>(props: SpectrumCardViewProps<T> & {
8
- ref?: DOMRef<HTMLDivElement> | undefined;
9
- }) => ReactElement<unknown, string | React.JSXElementConstructor<any>>;
8
+ ref?: DOMRef<HTMLDivElement>;
9
+ }) => ReactElement;
@@ -1,6 +1,6 @@
1
1
  import { AriaColorAreaProps } from 'react-aria/useColorArea';
2
2
  import { DimensionValue, FocusableRef, StyleProps } from '@react-types/shared';
3
- import React, { ReactElement } from 'react';
3
+ import { ReactElement } from 'react';
4
4
  export interface SpectrumColorAreaProps extends AriaColorAreaProps, Omit<StyleProps, 'width' | 'height'> {
5
5
  /** Size of the Color Area. */
6
6
  size?: DimensionValue;
@@ -10,5 +10,5 @@ export interface SpectrumColorAreaProps extends AriaColorAreaProps, Omit<StylePr
10
10
  * two-dimensional gradient background.
11
11
  */
12
12
  export declare const ColorArea: (props: SpectrumColorAreaProps & {
13
- ref?: FocusableRef<HTMLDivElement> | undefined;
14
- }) => ReactElement<unknown, string | React.JSXElementConstructor<any>>;
13
+ ref?: FocusableRef<HTMLDivElement>;
14
+ }) => ReactElement;
@@ -1,7 +1,7 @@
1
1
  import { AriaComboBoxProps } from 'react-aria/useComboBox';
2
2
  import { AsyncLoadable, DimensionValue, FocusableRef, LoadingState, SingleSelection, SpectrumFieldValidation, SpectrumLabelableProps, SpectrumTextInputBase, StyleProps } from '@react-types/shared';
3
3
  import { ComboBoxValidationValue, MenuTriggerAction } from 'react-stately/useComboBoxState';
4
- import React, { ReactElement } from 'react';
4
+ import { ReactElement } from 'react';
5
5
  export interface SpectrumComboBoxProps<T> extends SpectrumTextInputBase, Omit<AriaComboBoxProps<T>, 'menuTrigger' | 'isInvalid' | 'validationState' | 'selectionMode' | 'selectedKey' | 'defaultSelectedKey' | 'onSelectionChange' | 'value' | 'defaultValue' | 'onChange'>, Omit<SingleSelection, 'disallowEmptySelection'>, SpectrumFieldValidation<ComboBoxValidationValue>, SpectrumLabelableProps, StyleProps, Omit<AsyncLoadable, 'isLoading'> {
6
6
  /**
7
7
  * The interaction required to display the ComboBox menu. Note that this prop has no effect on the
@@ -53,5 +53,5 @@ export interface SpectrumComboBoxProps<T> extends SpectrumTextInputBase, Omit<Ar
53
53
  * the selections matching a query.
54
54
  */
55
55
  export declare const ComboBox: <T>(props: SpectrumComboBoxProps<T> & {
56
- ref?: FocusableRef<HTMLElement> | undefined;
57
- }) => ReactElement<unknown, string | React.JSXElementConstructor<any>>;
56
+ ref?: FocusableRef<HTMLElement>;
57
+ }) => ReactElement;
@@ -1,6 +1,6 @@
1
1
  import { AriaDateFieldProps, DateValue, MappedDateValue } from 'react-aria/useDateField';
2
2
  import { FocusableRef, HelpTextProps, SpectrumFieldValidation, SpectrumLabelableProps, StyleProps } from '@react-types/shared';
3
- import React, { ReactElement } from 'react';
3
+ import { ReactElement } from 'react';
4
4
  export interface SpectrumDateFieldBase<T extends DateValue> extends SpectrumLabelableProps, HelpTextProps, SpectrumFieldValidation<MappedDateValue<T>>, StyleProps {
5
5
  /**
6
6
  * Whether the date picker should be displayed with a quiet style.
@@ -22,5 +22,5 @@ export interface SpectrumDateFieldProps<T extends DateValue> extends Omit<AriaDa
22
22
  * Each part of a date value is displayed in an individually editable segment.
23
23
  */
24
24
  export declare const DateField: <T extends DateValue>(props: SpectrumDateFieldProps<T> & {
25
- ref?: FocusableRef<HTMLElement> | undefined;
26
- }) => ReactElement<unknown, string | React.JSXElementConstructor<any>>;
25
+ ref?: FocusableRef<HTMLElement>;
26
+ }) => ReactElement;
@@ -1,7 +1,7 @@
1
1
  import { AriaDatePickerProps, DateValue } from 'react-aria/useDatePicker';
2
2
  import { CalendarIdentifier, Calendar as ICalendar } from '@internationalized/date';
3
3
  import { FocusableRef, SpectrumLabelableProps, StyleProps } from '@react-types/shared';
4
- import React, { ReactElement } from 'react';
4
+ import { ReactElement } from 'react';
5
5
  import { SpectrumDateFieldBase } from './DateField';
6
6
  import '@adobe/spectrum-css-temp/components/textfield/vars.css';
7
7
  export interface SpectrumDatePickerBase<T extends DateValue> extends SpectrumDateFieldBase<T>, SpectrumLabelableProps, StyleProps {
@@ -33,5 +33,5 @@ export interface SpectrumDatePickerProps<T extends DateValue> extends Omit<AriaD
33
33
  * and time value.
34
34
  */
35
35
  export declare const DatePicker: <T extends DateValue>(props: SpectrumDatePickerProps<T> & {
36
- ref?: FocusableRef<HTMLElement> | undefined;
37
- }) => ReactElement<unknown, string | React.JSXElementConstructor<any>>;
36
+ ref?: FocusableRef<HTMLElement>;
37
+ }) => ReactElement;
@@ -1,6 +1,6 @@
1
1
  import { AriaDateRangePickerProps, DateValue } from 'react-aria/useDateRangePicker';
2
2
  import { FocusableRef } from '@react-types/shared';
3
- import React, { ReactElement } from 'react';
3
+ import { ReactElement } from 'react';
4
4
  import { SpectrumDatePickerBase } from './DatePicker';
5
5
  export interface SpectrumDateRangePickerProps<T extends DateValue> extends Omit<AriaDateRangePickerProps<T>, 'isInvalid' | 'validationState'>, Omit<SpectrumDatePickerBase<T>, 'validate'> {
6
6
  }
@@ -9,5 +9,5 @@ export interface SpectrumDateRangePickerProps<T extends DateValue> extends Omit<
9
9
  * to enter or select a date and time range.
10
10
  */
11
11
  export declare const DateRangePicker: <T extends DateValue>(props: SpectrumDateRangePickerProps<T> & {
12
- ref?: FocusableRef<HTMLElement> | undefined;
13
- }) => ReactElement<unknown, string | React.JSXElementConstructor<any>>;
12
+ ref?: FocusableRef<HTMLElement>;
13
+ }) => ReactElement;
@@ -1,6 +1,6 @@
1
1
  import { AriaTimeFieldProps, MappedTimeValue, TimeValue } from 'react-aria/useTimeField';
2
2
  import { FocusableRef, InputDOMProps, SpectrumFieldValidation, SpectrumLabelableProps, StyleProps } from '@react-types/shared';
3
- import React, { ReactElement } from 'react';
3
+ import { ReactElement } from 'react';
4
4
  export interface SpectrumTimeFieldProps<T extends TimeValue> extends Omit<AriaTimeFieldProps<T>, 'isInvalid' | 'validationState'>, SpectrumFieldValidation<MappedTimeValue<T>>, SpectrumLabelableProps, StyleProps, InputDOMProps {
5
5
  /**
6
6
  * Whether the time field should be displayed with a quiet style.
@@ -14,5 +14,5 @@ export interface SpectrumTimeFieldProps<T extends TimeValue> extends Omit<AriaTi
14
14
  * Each part of the time is displayed in an individually editable segment.
15
15
  */
16
16
  export declare const TimeField: <T extends TimeValue>(props: SpectrumTimeFieldProps<T> & {
17
- ref?: FocusableRef<HTMLElement> | undefined;
18
- }) => ReactElement<unknown, string | React.JSXElementConstructor<any>>;
17
+ ref?: FocusableRef<HTMLElement>;
18
+ }) => ReactElement;
@@ -1,6 +1,6 @@
1
1
  import { OverlayTriggerProps } from 'react-stately/useOverlayTriggerState';
2
2
  import { PositionProps } from 'react-aria/useOverlayPosition';
3
- import React, { JSX, ReactElement, RefObject } from 'react';
3
+ import { JSX, ReactElement, RefObject } from 'react';
4
4
  export type SpectrumDialogClose = (close: () => void) => ReactElement;
5
5
  export interface SpectrumDialogTriggerProps extends OverlayTriggerProps, PositionProps {
6
6
  /**
@@ -34,13 +34,6 @@ export interface SpectrumDialogTriggerProps extends OverlayTriggerProps, Positio
34
34
  /** Whether pressing the escape key to close the dialog should be disabled. */
35
35
  isKeyboardDismissDisabled?: boolean;
36
36
  }
37
- declare function DialogTrigger(props: SpectrumDialogTriggerProps): JSX.Element;
38
- declare namespace DialogTrigger {
39
- var getCollectionNode: (props: SpectrumDialogTriggerProps) => Generator<{
40
- element: string | number | bigint | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | Iterable<React.ReactNode> | ReactElement<unknown, string | React.JSXElementConstructor<any>> | React.ReactPortal | null | undefined> | ReactElement<unknown, string | React.JSXElementConstructor<any>> | React.ReactPortal;
41
- wrapper: (element: any) => JSX.Element;
42
- }, void, unknown>;
43
- }
44
37
  /**
45
38
  * DialogTrigger serves as a wrapper around a Dialog and its associated trigger, linking the
46
39
  * Dialog's open state with the trigger's press state. Additionally, it allows you to customize the
@@ -57,6 +57,6 @@ export declare const ListViewContext: React.Context<ListViewContextValue<unknown
57
57
  * perform an action.
58
58
  */
59
59
  export declare const ListView: <T>(props: SpectrumListViewProps<T> & {
60
- ref?: DOMRef<HTMLDivElement> | undefined;
61
- }) => ReactElement<unknown, string | React.JSXElementConstructor<any>>;
60
+ ref?: DOMRef<HTMLDivElement>;
61
+ }) => ReactElement;
62
62
  export {};
@@ -1,9 +1,9 @@
1
1
  import { DOMRef } from '@react-types/shared';
2
2
  import { SpectrumListBoxProps } from './ListBoxBase';
3
- import React, { ReactElement } from 'react';
3
+ import { ReactElement } from 'react';
4
4
  /**
5
5
  * A list of options that can allow selection of one or more.
6
6
  */
7
7
  export declare const ListBox: <T>(props: SpectrumListBoxProps<T> & {
8
- ref?: DOMRef<HTMLDivElement> | undefined;
9
- }) => ReactElement<unknown, string | React.JSXElementConstructor<any>>;
8
+ ref?: DOMRef<HTMLDivElement>;
9
+ }) => ReactElement;
@@ -2,7 +2,7 @@ import { AriaLabelingProps, AsyncLoadable, DOMProps, FocusStrategy, RefObject, S
2
2
  import { AriaListBoxOptions, AriaListBoxPropsBase } from 'react-aria/useListBox';
3
3
  import { ListBoxLayout } from './ListBoxLayout';
4
4
  import { ListState } from 'react-stately/useListState';
5
- import React, { HTMLAttributes, ReactElement, ReactNode } from 'react';
5
+ import { HTMLAttributes, ReactElement, ReactNode } from 'react';
6
6
  export interface SpectrumListBoxProps<T> extends AriaListBoxPropsBase<T>, AsyncLoadable, StyleProps {
7
7
  }
8
8
  interface ListBoxBaseProps<T> extends AriaListBoxOptions<T>, DOMProps, AriaLabelingProps, StyleProps {
@@ -25,6 +25,6 @@ interface ListBoxBaseProps<T> extends AriaListBoxOptions<T>, DOMProps, AriaLabel
25
25
  export declare function useListBoxLayout<T>(): ListBoxLayout<T>;
26
26
  /** @private */
27
27
  export declare const ListBoxBase: <T>(props: ListBoxBaseProps<T> & {
28
- ref?: RefObject<HTMLDivElement | null> | undefined;
29
- }) => ReactElement<unknown, string | React.JSXElementConstructor<any>>;
28
+ ref?: RefObject<HTMLDivElement | null>;
29
+ }) => ReactElement;
30
30
  export {};
@@ -1,6 +1,6 @@
1
1
  import { AriaLabelingProps, CollectionBase, DOMProps, FocusableRef, Key, StyleProps } from '@react-types/shared';
2
2
  import { SpectrumMenuTriggerProps } from './MenuTrigger';
3
- import React, { ReactElement } from 'react';
3
+ import { ReactElement } from 'react';
4
4
  export interface SpectrumActionMenuProps<T> extends CollectionBase<T>, Omit<SpectrumMenuTriggerProps, 'children'>, StyleProps, DOMProps, AriaLabelingProps {
5
5
  /** Whether the button is disabled. */
6
6
  isDisabled?: boolean;
@@ -18,5 +18,5 @@ export interface SpectrumActionMenuProps<T> extends CollectionBase<T>, Omit<Spec
18
18
  * ActionMenu combines an ActionButton with a Menu for simple "more actions" use cases.
19
19
  */
20
20
  export declare const ActionMenu: <T>(props: SpectrumActionMenuProps<T> & {
21
- ref?: FocusableRef<HTMLButtonElement> | undefined;
22
- }) => ReactElement<unknown, string | React.JSXElementConstructor<any>>;
21
+ ref?: FocusableRef<HTMLButtonElement>;
22
+ }) => ReactElement;
@@ -1,22 +1,11 @@
1
- import { ItemProps, Key } from '@react-types/shared';
2
- import React, { JSX, ReactElement } from 'react';
1
+ import { JSX, ReactElement } from 'react';
3
2
  interface MenuDialogTriggerProps {
4
3
  /** Whether the menu item is currently unavailable. */
5
4
  isUnavailable?: boolean;
6
5
  /** The triggering Item and the Dialog, respectively. */
7
6
  children: [ReactElement, ReactElement];
8
7
  }
9
- interface InternalMenuDialogTriggerProps extends MenuDialogTriggerProps {
10
- targetKey: Key;
11
- }
12
8
  export interface SpectrumMenuDialogTriggerProps extends MenuDialogTriggerProps {
13
9
  }
14
- declare function ContextualHelpTrigger(props: InternalMenuDialogTriggerProps): ReactElement;
15
- declare namespace ContextualHelpTrigger {
16
- var getCollectionNode: <T>(props: ItemProps<T>) => Generator<{
17
- element: ReactElement<unknown, string | React.JSXElementConstructor<any>>;
18
- wrapper: (element: any) => JSX.Element;
19
- }, void, unknown>;
20
- }
21
10
  declare let _Item: (props: SpectrumMenuDialogTriggerProps) => JSX.Element;
22
11
  export { _Item as ContextualHelpTrigger };
@@ -1,6 +1,6 @@
1
1
  import { AriaMenuProps } from 'react-aria/useMenu';
2
2
  import { DOMRef, StyleProps } from '@react-types/shared';
3
- import React, { KeyboardEventHandler, ReactElement, ReactNode, RefObject } from 'react';
3
+ import { KeyboardEventHandler, ReactElement, ReactNode, RefObject } from 'react';
4
4
  import { RootMenuTriggerState } from 'react-stately/useMenuTriggerState';
5
5
  import { TreeState } from 'react-stately/useTreeState';
6
6
  export interface SpectrumMenuProps<T> extends AriaMenuProps<T>, StyleProps {
@@ -9,8 +9,8 @@ export interface SpectrumMenuProps<T> extends AriaMenuProps<T>, StyleProps {
9
9
  * Menus display a list of actions or options that a user can choose.
10
10
  */
11
11
  export declare const Menu: <T>(props: SpectrumMenuProps<T> & {
12
- ref?: DOMRef<HTMLDivElement> | undefined;
13
- }) => ReactElement<unknown, string | React.JSXElementConstructor<any>>;
12
+ ref?: DOMRef<HTMLDivElement>;
13
+ }) => ReactElement;
14
14
  export declare function TrayHeaderWrapper(props: {
15
15
  children: ReactNode;
16
16
  isSubmenu?: boolean;
@@ -1,5 +1,5 @@
1
1
  import { Key } from '@react-types/shared';
2
- import React, { type JSX, ReactElement } from 'react';
2
+ import { type JSX, ReactElement } from 'react';
3
3
  interface SubmenuTriggerProps {
4
4
  /**
5
5
  * The contents of the SubmenuTrigger - an Item and a Menu.
@@ -9,12 +9,5 @@ interface SubmenuTriggerProps {
9
9
  }
10
10
  export interface SpectrumSubmenuTriggerProps extends Omit<SubmenuTriggerProps, 'targetKey'> {
11
11
  }
12
- declare function SubmenuTrigger(props: SubmenuTriggerProps): JSX.Element;
13
- declare namespace SubmenuTrigger {
14
- var getCollectionNode: (props: SpectrumSubmenuTriggerProps) => Generator<{
15
- element: ReactElement<unknown, string | React.JSXElementConstructor<any>>;
16
- wrapper: (element: any) => JSX.Element;
17
- }, void, unknown>;
18
- }
19
12
  declare let _SubmenuTrigger: (props: SpectrumSubmenuTriggerProps) => JSX.Element;
20
13
  export { _SubmenuTrigger as SubmenuTrigger };
@@ -1,6 +1,6 @@
1
1
  import { AriaButtonProps } from 'react-aria/useButton';
2
2
  import { FocusableRef } from '@react-types/shared';
3
- import React, { ReactElement } from 'react';
3
+ import { ReactElement } from 'react';
4
4
  interface StepButtonProps extends AriaButtonProps {
5
5
  isQuiet?: boolean;
6
6
  direction: 'up' | 'down';
@@ -9,6 +9,6 @@ interface StepButtonProps extends AriaButtonProps {
9
9
  * Buttons for NumberField.
10
10
  */
11
11
  export declare const StepButton: (props: StepButtonProps & {
12
- ref?: FocusableRef<HTMLDivElement> | undefined;
13
- }) => ReactElement<unknown, string | React.JSXElementConstructor<any>>;
12
+ ref?: FocusableRef<HTMLDivElement>;
13
+ }) => ReactElement;
14
14
  export {};
@@ -1,6 +1,6 @@
1
1
  import { Alignment, AsyncLoadable, DimensionValue, DOMRef, SingleSelection, SpectrumLabelableProps, StyleProps } from '@react-types/shared';
2
2
  import { AriaSelectProps } from 'react-aria/useSelect';
3
- import React, { ReactElement } from 'react';
3
+ import { ReactElement } from 'react';
4
4
  export interface SpectrumPickerProps<T> extends Omit<AriaSelectProps<T>, 'selectionMode' | 'selectedKey' | 'defaultSelectedKey' | 'onSelectionChange' | 'value' | 'defaultValue' | 'onChange' | 'allowsEmptyCollection'>, Omit<SingleSelection, 'disallowEmptySelection'>, AsyncLoadable, SpectrumLabelableProps, StyleProps {
5
5
  /** Whether the textfield should be displayed with a quiet style. */
6
6
  isQuiet?: boolean;
@@ -35,5 +35,5 @@ export interface SpectrumPickerProps<T> extends Omit<AriaSelectProps<T>, 'select
35
35
  * limited.
36
36
  */
37
37
  export declare const Picker: <T>(props: SpectrumPickerProps<T> & {
38
- ref?: DOMRef<HTMLDivElement> | undefined;
39
- }) => ReactElement<unknown, string | React.JSXElementConstructor<any>>;
38
+ ref?: DOMRef<HTMLDivElement>;
39
+ }) => ReactElement;
@@ -0,0 +1 @@
1
+ export declare function getVersion(): string;
@@ -1,5 +1,5 @@
1
1
  import { AriaSearchFieldProps } from 'react-aria/useSearchField';
2
- import React, { ReactElement, Ref } from 'react';
2
+ import { ReactElement, Ref } from 'react';
3
3
  import { SpectrumTextFieldProps, TextFieldRef } from '../textfield/TextField';
4
4
  import { SpectrumTextInputBase } from '@react-types/shared';
5
5
  export interface SpectrumSearchFieldProps extends SpectrumTextInputBase, Omit<AriaSearchFieldProps, 'isInvalid' | 'validationState'>, SpectrumTextFieldProps {
@@ -8,5 +8,5 @@ export interface SpectrumSearchFieldProps extends SpectrumTextInputBase, Omit<Ar
8
8
  * A SearchField is a text field designed for searches.
9
9
  */
10
10
  export declare const SearchField: (props: SpectrumSearchFieldProps & {
11
- ref?: Ref<TextFieldRef<HTMLInputElement>> | undefined;
12
- }) => ReactElement<unknown, string | React.JSXElementConstructor<any>>;
11
+ ref?: Ref<TextFieldRef>;
12
+ }) => ReactElement;
@@ -1,6 +1,6 @@
1
1
  import { AriaStepListProps } from 'react-aria/private/steplist/useStepList';
2
2
  import { DOMRef, Orientation, StyleProps } from '@react-types/shared';
3
- import React, { ReactElement } from 'react';
3
+ import { ReactElement } from 'react';
4
4
  export interface SpectrumStepListProps<T> extends AriaStepListProps<T>, StyleProps {
5
5
  /**
6
6
  * Whether the step list should be displayed with a emphasized style.
@@ -22,5 +22,5 @@ export interface SpectrumStepListProps<T> extends AriaStepListProps<T>, StylePro
22
22
  size?: 'S' | 'M' | 'L' | 'XL';
23
23
  }
24
24
  export declare const StepList: <T>(props: SpectrumStepListProps<T> & {
25
- ref?: DOMRef<HTMLOListElement> | undefined;
26
- }) => ReactElement<unknown, string | React.JSXElementConstructor<any>>;
25
+ ref?: DOMRef<HTMLOListElement>;
26
+ }) => ReactElement;
@@ -1,7 +1,7 @@
1
1
  import type { AriaLabelingProps, DisabledBehavior, DOMProps, DOMRef, Key, SpectrumSelectionProps, StyleProps } from '@react-types/shared';
2
2
  import { Cell, ColumnSize, Row, TableBody, TableHeader, TableProps } from 'react-stately/useTableState';
3
3
  import type { DragAndDropHooks } from '../dnd/useDragAndDrop';
4
- import React, { JSX, ReactElement } from 'react';
4
+ import { JSX, ReactElement } from 'react';
5
5
  import { Section } from 'react-stately/Section';
6
6
  import { SpectrumColumnProps } from './types';
7
7
  export interface SpectrumTableProps<T> extends Omit<TableProps<T>, 'treeColumn' | 'expandedKeys' | 'defaultExpandedKeys' | 'onExpandedChange'>, SpectrumSelectionProps, DOMProps, AriaLabelingProps, StyleProps {
@@ -92,8 +92,8 @@ export interface SpectrumTableProps<T> extends Omit<TableProps<T>, 'treeColumn'
92
92
  * compare, and take action on large amounts of data.
93
93
  */
94
94
  declare const TableView: <T>(props: SpectrumTableProps<T> & {
95
- ref?: DOMRef<HTMLDivElement> | undefined;
96
- }) => ReactElement<unknown, string | React.JSXElementConstructor<any>>;
95
+ ref?: DOMRef<HTMLDivElement>;
96
+ }) => ReactElement;
97
97
  export { TableView };
98
98
  declare const SpectrumColumn: <T>(props: SpectrumColumnProps<T>) => JSX.Element;
99
99
  export { SpectrumColumn as Column };
@@ -48,6 +48,6 @@ interface TableRowContextValue {
48
48
  }
49
49
  export declare function useTableRowContext(): TableRowContextValue;
50
50
  declare const ForwardTableViewBase: <T>(props: TableBaseProps<T> & {
51
- ref?: DOMRef<HTMLDivElement> | undefined;
52
- }) => ReactElement<unknown, string | React.JSXElementConstructor<any>>;
51
+ ref?: DOMRef<HTMLDivElement>;
52
+ }) => ReactElement;
53
53
  export { ForwardTableViewBase as TableViewBase };
@@ -1,9 +1,9 @@
1
1
  import { DOMRef } from '@react-types/shared';
2
- import React, { ReactElement } from 'react';
2
+ import { ReactElement } from 'react';
3
3
  import { SpectrumTableProps } from './TableView';
4
4
  interface TableProps<T> extends Omit<SpectrumTableProps<T>, 'UNSTABLE_allowsExpandableRows'> {
5
5
  }
6
6
  export declare const TableViewWithoutExpanding: <T>(props: TableProps<T> & {
7
- ref?: DOMRef<HTMLDivElement> | undefined;
8
- }) => ReactElement<unknown, string | React.JSXElementConstructor<any>>;
7
+ ref?: DOMRef<HTMLDivElement>;
8
+ }) => ReactElement;
9
9
  export {};
@@ -1,8 +1,8 @@
1
1
  import { DOMRef } from '@react-types/shared';
2
- import React, { ReactElement } from 'react';
2
+ import { ReactElement } from 'react';
3
3
  import { SpectrumTableProps } from './TableView';
4
4
  export interface TreeGridTableProps<T> extends Omit<SpectrumTableProps<T>, 'UNSTABLE_allowsExpandableRows'> {
5
5
  }
6
6
  export declare const TreeGridTableView: <T>(props: TreeGridTableProps<T> & {
7
- ref?: DOMRef<HTMLDivElement> | undefined;
8
- }) => ReactElement<unknown, string | React.JSXElementConstructor<any>>;
7
+ ref?: DOMRef<HTMLDivElement>;
8
+ }) => ReactElement;
@@ -1,5 +1,5 @@
1
1
  import { AriaLabelingProps, CollectionChildren, DOMProps, DOMRef, Key, Orientation, SingleSelection, StyleProps } from '@react-types/shared';
2
- import React, { ReactElement, ReactNode } from 'react';
2
+ import { ReactElement, ReactNode } from 'react';
3
3
  export interface SpectrumTabsProps<T> extends Omit<SingleSelection, 'onSelectionChange' | 'disallowEmptySelection' | 'selectedKey' | 'defaultSelectedKey' | 'onSelectionChange'>, AriaLabelingProps, DOMProps, StyleProps {
4
4
  /** The children of the `<Tabs>` element. Should include `<TabList>` and `<TabPanels>` elements. */
5
5
  children: ReactNode;
@@ -42,8 +42,8 @@ export interface SpectrumTabsProps<T> extends Omit<SingleSelection, 'onSelection
42
42
  * content under the set of tabs should be related and form a coherent unit.
43
43
  */
44
44
  export declare const Tabs: <T>(props: SpectrumTabsProps<T> & {
45
- ref?: DOMRef<HTMLDivElement> | undefined;
46
- }) => ReactElement<unknown, string | React.JSXElementConstructor<any>>;
45
+ ref?: DOMRef<HTMLDivElement>;
46
+ }) => ReactElement;
47
47
  export interface SpectrumTabListProps<T> extends DOMProps, StyleProps {
48
48
  /**
49
49
  * The tab items to display. Item keys should match the key of the corresponding `<Item>` within
@@ -19,5 +19,5 @@ export interface SpectrumTagGroupProps<T> extends Omit<AriaTagGroupProps<T>, 'se
19
19
  * describe an item or a search request.
20
20
  */
21
21
  export declare const TagGroup: <T>(props: SpectrumTagGroupProps<T> & {
22
- ref?: DOMRef<HTMLDivElement> | undefined;
22
+ ref?: DOMRef<HTMLDivElement>;
23
23
  }) => ReactNode;
@@ -1,5 +1,5 @@
1
1
  import { Placement, PositionProps } from 'react-aria/useOverlayPosition';
2
- import React, { JSX, ReactElement } from 'react';
2
+ import { JSX, ReactElement } from 'react';
3
3
  import { TooltipTriggerProps } from 'react-stately/useTooltipTriggerState';
4
4
  export interface SpectrumTooltipTriggerProps extends Omit<TooltipTriggerProps, 'closeDelay'>, PositionProps {
5
5
  children: [ReactElement, ReactElement];
@@ -17,13 +17,6 @@ export interface SpectrumTooltipTriggerProps extends Omit<TooltipTriggerProps, '
17
17
  */
18
18
  placement?: Placement;
19
19
  }
20
- declare function TooltipTrigger(props: SpectrumTooltipTriggerProps): JSX.Element;
21
- declare namespace TooltipTrigger {
22
- var getCollectionNode: (props: SpectrumTooltipTriggerProps) => Generator<{
23
- element: ReactElement<unknown, string | React.JSXElementConstructor<any>>;
24
- wrapper: (element: any) => JSX.Element;
25
- }, void, unknown>;
26
- }
27
20
  /**
28
21
  * TooltipTrigger wraps around a trigger element and a Tooltip. It handles opening and closing
29
22
  * the Tooltip when the user hovers over or focuses the trigger, and positioning the Tooltip
@@ -1,6 +1,6 @@
1
1
  import { AriaTreeProps } from 'react-aria/useTree';
2
2
  import { DOMRef, Expandable, Key, SpectrumSelectionProps, StyleProps } from '@react-types/shared';
3
- import { JSX, JSXElementConstructor, ReactElement, ReactNode } from 'react';
3
+ import { JSX, ReactElement, ReactNode } from 'react';
4
4
  import { TreeItemContentProps, TreeItemProps } from 'react-aria-components/Tree';
5
5
  export interface SpectrumTreeViewProps<T> extends Omit<AriaTreeProps<T>, 'children' | 'render'>, StyleProps, SpectrumSelectionProps, Expandable {
6
6
  /** Provides content to display when there are no items in the tree. */
@@ -23,8 +23,8 @@ export interface SpectrumTreeViewItemProps extends Omit<TreeItemProps, 'classNam
23
23
  * A tree view provides users with a way to navigate nested hierarchical information.
24
24
  */
25
25
  export declare const TreeView: <T>(props: SpectrumTreeViewProps<T> & {
26
- ref?: DOMRef<HTMLDivElement> | undefined;
27
- }) => ReactElement<unknown, string | JSXElementConstructor<any>>;
26
+ ref?: DOMRef<HTMLDivElement>;
27
+ }) => ReactElement;
28
28
  export declare const TreeViewItem: (props: SpectrumTreeViewItemProps) => ReactNode;
29
29
  export interface SpectrumTreeViewItemContentProps extends Omit<TreeItemContentProps, 'children'> {
30
30
  /** Rendered contents of the tree item or child items. */
@@ -16,5 +16,5 @@ export interface ViewProps<C extends ColorVersion> extends ViewStyleProps<C>, DO
16
16
  * components.
17
17
  */
18
18
  export declare const View: <C extends ColorVersion = 5>(props: ViewProps<C> & {
19
- ref?: DOMRef | undefined;
20
- }) => ReactElement<unknown, string | JSXElementConstructor<any>>;
19
+ ref?: DOMRef;
20
+ }) => ReactElement;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/react-spectrum",
3
- "version": "3.47.3",
3
+ "version": "3.47.4",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "./dist/exports/index.cjs",
@@ -26,6 +26,7 @@
26
26
  "./*": {
27
27
  "source": "./exports/*.ts",
28
28
  "types": "./dist/types/exports/*.d.ts",
29
+ "legacy-module": "./dist/exports/*.js",
29
30
  "import": "./dist/exports/*.mjs",
30
31
  "require": "./dist/exports/*.cjs"
31
32
  }
@@ -52,16 +53,16 @@
52
53
  "url": "https://github.com/adobe/react-spectrum"
53
54
  },
54
55
  "dependencies": {
55
- "@internationalized/date": "^3.12.3",
56
+ "@internationalized/date": "^3.12.4",
56
57
  "@react-types/shared": "^3.36.1",
57
- "@spectrum-icons/ui": "^3.7.1",
58
- "@spectrum-icons/workflow": "^4.3.1",
58
+ "@spectrum-icons/ui": "^3.7.2",
59
+ "@spectrum-icons/workflow": "^4.3.2",
59
60
  "@swc/helpers": "^0.5.0",
60
61
  "client-only": "^0.0.1",
61
62
  "clsx": "^2.0.0",
62
- "react-aria": "3.51.0",
63
- "react-aria-components": "1.20.0",
64
- "react-stately": "3.49.0",
63
+ "react-aria": "3.52.0",
64
+ "react-aria-components": "1.21.0",
65
+ "react-stately": "3.50.0",
65
66
  "react-transition-group": "^4.4.5",
66
67
  "use-sync-external-store": "^1.6.0"
67
68
  },
@@ -125,5 +126,5 @@
125
126
  }
126
127
  }
127
128
  },
128
- "gitHead": "5ecb3333001313e83898cd07644227897e3bae1f"
129
+ "gitHead": "0a2a7e68e4d896b3ac46c3647fe48fac9ea3ae2e"
129
130
  }
@@ -1,4 +0,0 @@
1
- module.exports = JSON.parse("{\"name\":\"@adobe/react-spectrum\",\"version\":\"3.47.3\",\"description\":\"Spectrum UI components in React\",\"license\":\"Apache-2.0\",\"main\":\"./dist/exports/index.cjs\",\"module\":\"./dist/exports/index.js\",\"exports\":{\".\":{\"source\":\"./exports/index.ts\",\"types\":\"./dist/types/exports/index.d.ts\",\"import\":\"./dist/exports/index.mjs\",\"require\":\"./dist/exports/index.cjs\"},\"./i18n\":{\"types\":\"./i18n/index.d.ts\",\"import\":\"./i18n/index.mjs\",\"require\":\"./i18n/index.js\"},\"./i18n/*\":{\"types\":\"./i18n/lang.d.ts\",\"import\":\"./i18n/*.mjs\",\"require\":\"./i18n/*.js\"},\"./package.json\":\"./package.json\",\"./*\":{\"source\":\"./exports/*.ts\",\"types\":\"./dist/types/exports/*.d.ts\",\"import\":\"./dist/exports/*.mjs\",\"require\":\"./dist/exports/*.cjs\"}},\"types\":\"./dist/types/exports/index.d.ts\",\"source\":\"exports/index.ts\",\"files\":[\"*\",\"!chromatic/**\",\"!chromatic-fc/**\",\"!docs/**\",\"!exports/**\",\"!intl/**\",\"!scripts/**\",\"!src/**\",\"!stories/**\",\"!test/**\"],\"sideEffects\":[\"*.css\"],\"repository\":{\"type\":\"git\",\"url\":\"https://github.com/adobe/react-spectrum\"},\"dependencies\":{\"@internationalized/date\":\"^3.12.3\",\"@react-types/shared\":\"^3.36.1\",\"@spectrum-icons/ui\":\"^3.7.1\",\"@spectrum-icons/workflow\":\"^4.3.1\",\"@swc/helpers\":\"^0.5.0\",\"client-only\":\"^0.0.1\",\"clsx\":\"^2.0.0\",\"react-aria\":\"3.51.0\",\"react-aria-components\":\"1.20.0\",\"react-stately\":\"3.49.0\",\"react-transition-group\":\"^4.4.5\",\"use-sync-external-store\":\"^1.6.0\"},\"publishConfig\":{\"access\":\"public\"},\"peerDependencies\":{\"react\":\"^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1\",\"react-dom\":\"^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1\"},\"devDependencies\":{\"@adobe/spectrum-css-temp\":\"3.0.0-alpha.1\",\"@babel/cli\":\"^7.12.10\",\"@babel/core\":\"^7.24.3\",\"@react-spectrum/style-macro-s1\":\"3.0.0-alpha.6\",\"react\":\"^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1\",\"react-dom\":\"^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1\"},\"targets\":{\"main\":false,\"module\":false,\"types\":false,\"exports-module\":{\"source\":[\"exports/**/*.ts\"],\"distDir\":\"dist\",\"isLibrary\":true,\"outputFormat\":\"esmodule\",\"includeNodeModules\":[\"@adobe/spectrum-css-temp\"]},\"exports-main\":{\"source\":[\"exports/**/*.ts\"],\"distDir\":\"dist\",\"isLibrary\":true,\"outputFormat\":\"commonjs\",\"includeNodeModules\":[\"@adobe/spectrum-css-temp\"]},\"legacy-module\":{\"source\":[\"exports/**/*.ts\"],\"distDir\":\"dist\",\"isLibrary\":true,\"outputFormat\":\"esmodule\",\"includeNodeModules\":[\"@adobe/spectrum-css-temp\"],\"engines\":{\"browsers\":[\"chrome >= 79\",\"firefox >= 85\",\"safari >= 13\"]}}}}");
2
-
3
-
4
- //# sourceMappingURL=package.cjs.map
@@ -1 +0,0 @@
1
- {"mappings":"AAAA,iBAAiB,KAAK,KAAK,CAAC","sources":["packages/@adobe/react-spectrum/package.json"],"sourcesContent":["{\n \"name\": \"@adobe/react-spectrum\",\n \"version\": \"3.47.3\",\n \"description\": \"Spectrum UI components in React\",\n \"license\": \"Apache-2.0\",\n \"main\": \"./dist/exports/index.cjs\",\n \"module\": \"./dist/exports/index.js\",\n \"exports\": {\n \".\": {\n \"source\": \"./exports/index.ts\",\n \"types\": \"./dist/types/exports/index.d.ts\",\n \"import\": \"./dist/exports/index.mjs\",\n \"require\": \"./dist/exports/index.cjs\"\n },\n \"./i18n\": {\n \"types\": \"./i18n/index.d.ts\",\n \"import\": \"./i18n/index.mjs\",\n \"require\": \"./i18n/index.js\"\n },\n \"./i18n/*\": {\n \"types\": \"./i18n/lang.d.ts\",\n \"import\": \"./i18n/*.mjs\",\n \"require\": \"./i18n/*.js\"\n },\n \"./package.json\": \"./package.json\",\n \"./*\": {\n \"source\": \"./exports/*.ts\",\n \"types\": \"./dist/types/exports/*.d.ts\",\n \"import\": \"./dist/exports/*.mjs\",\n \"require\": \"./dist/exports/*.cjs\"\n }\n },\n \"types\": \"./dist/types/exports/index.d.ts\",\n \"source\": \"exports/index.ts\",\n \"files\": [\n \"*\",\n \"!chromatic/**\",\n \"!chromatic-fc/**\",\n \"!docs/**\",\n \"!exports/**\",\n \"!intl/**\",\n \"!scripts/**\",\n \"!src/**\",\n \"!stories/**\",\n \"!test/**\"\n ],\n \"sideEffects\": [\n \"*.css\"\n ],\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/adobe/react-spectrum\"\n },\n \"dependencies\": {\n \"@internationalized/date\": \"^3.12.3\",\n \"@react-types/shared\": \"^3.36.1\",\n \"@spectrum-icons/ui\": \"^3.7.1\",\n \"@spectrum-icons/workflow\": \"^4.3.1\",\n \"@swc/helpers\": \"^0.5.0\",\n \"client-only\": \"^0.0.1\",\n \"clsx\": \"^2.0.0\",\n \"react-aria\": \"3.51.0\",\n \"react-aria-components\": \"1.20.0\",\n \"react-stately\": \"3.49.0\",\n \"react-transition-group\": \"^4.4.5\",\n \"use-sync-external-store\": \"^1.6.0\"\n },\n \"publishConfig\": {\n \"access\": \"public\"\n },\n \"peerDependencies\": {\n \"react\": \"^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1\",\n \"react-dom\": \"^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1\"\n },\n \"devDependencies\": {\n \"@adobe/spectrum-css-temp\": \"3.0.0-alpha.1\",\n \"@babel/cli\": \"^7.12.10\",\n \"@babel/core\": \"^7.24.3\",\n \"@react-spectrum/style-macro-s1\": \"3.0.0-alpha.6\",\n \"react\": \"^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1\",\n \"react-dom\": \"^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1\"\n },\n \"targets\": {\n \"main\": false,\n \"module\": false,\n \"types\": false,\n \"exports-module\": {\n \"source\": [\n \"exports/**/*.ts\"\n ],\n \"distDir\": \"dist\",\n \"isLibrary\": true,\n \"outputFormat\": \"esmodule\",\n \"includeNodeModules\": [\n \"@adobe/spectrum-css-temp\"\n ]\n },\n \"exports-main\": {\n \"source\": [\n \"exports/**/*.ts\"\n ],\n \"distDir\": \"dist\",\n \"isLibrary\": true,\n \"outputFormat\": \"commonjs\",\n \"includeNodeModules\": [\n \"@adobe/spectrum-css-temp\"\n ]\n },\n \"legacy-module\": {\n \"source\": [\n \"exports/**/*.ts\"\n ],\n \"distDir\": \"dist\",\n \"isLibrary\": true,\n \"outputFormat\": \"esmodule\",\n \"includeNodeModules\": [\n \"@adobe/spectrum-css-temp\"\n ],\n \"engines\": {\n \"browsers\": [\n \"chrome >= 79\",\n \"firefox >= 85\",\n \"safari >= 13\"\n ]\n }\n }\n }\n}\n"],"names":[],"version":3,"file":"package.cjs.map"}
@@ -1,6 +0,0 @@
1
- var $89b86e88ddc6b597$exports = {};
2
- $89b86e88ddc6b597$exports = JSON.parse("{\"name\":\"@adobe/react-spectrum\",\"version\":\"3.47.3\",\"description\":\"Spectrum UI components in React\",\"license\":\"Apache-2.0\",\"main\":\"./dist/exports/index.cjs\",\"module\":\"./dist/exports/index.js\",\"exports\":{\".\":{\"source\":\"./exports/index.ts\",\"types\":\"./dist/types/exports/index.d.ts\",\"import\":\"./dist/exports/index.mjs\",\"require\":\"./dist/exports/index.cjs\"},\"./i18n\":{\"types\":\"./i18n/index.d.ts\",\"import\":\"./i18n/index.mjs\",\"require\":\"./i18n/index.js\"},\"./i18n/*\":{\"types\":\"./i18n/lang.d.ts\",\"import\":\"./i18n/*.mjs\",\"require\":\"./i18n/*.js\"},\"./package.json\":\"./package.json\",\"./*\":{\"source\":\"./exports/*.ts\",\"types\":\"./dist/types/exports/*.d.ts\",\"import\":\"./dist/exports/*.mjs\",\"require\":\"./dist/exports/*.cjs\"}},\"types\":\"./dist/types/exports/index.d.ts\",\"source\":\"exports/index.ts\",\"files\":[\"*\",\"!chromatic/**\",\"!chromatic-fc/**\",\"!docs/**\",\"!exports/**\",\"!intl/**\",\"!scripts/**\",\"!src/**\",\"!stories/**\",\"!test/**\"],\"sideEffects\":[\"*.css\"],\"repository\":{\"type\":\"git\",\"url\":\"https://github.com/adobe/react-spectrum\"},\"dependencies\":{\"@internationalized/date\":\"^3.12.3\",\"@react-types/shared\":\"^3.36.1\",\"@spectrum-icons/ui\":\"^3.7.1\",\"@spectrum-icons/workflow\":\"^4.3.1\",\"@swc/helpers\":\"^0.5.0\",\"client-only\":\"^0.0.1\",\"clsx\":\"^2.0.0\",\"react-aria\":\"3.51.0\",\"react-aria-components\":\"1.20.0\",\"react-stately\":\"3.49.0\",\"react-transition-group\":\"^4.4.5\",\"use-sync-external-store\":\"^1.6.0\"},\"publishConfig\":{\"access\":\"public\"},\"peerDependencies\":{\"react\":\"^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1\",\"react-dom\":\"^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1\"},\"devDependencies\":{\"@adobe/spectrum-css-temp\":\"3.0.0-alpha.1\",\"@babel/cli\":\"^7.12.10\",\"@babel/core\":\"^7.24.3\",\"@react-spectrum/style-macro-s1\":\"3.0.0-alpha.6\",\"react\":\"^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1\",\"react-dom\":\"^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1\"},\"targets\":{\"main\":false,\"module\":false,\"types\":false,\"exports-module\":{\"source\":[\"exports/**/*.ts\"],\"distDir\":\"dist\",\"isLibrary\":true,\"outputFormat\":\"esmodule\",\"includeNodeModules\":[\"@adobe/spectrum-css-temp\"]},\"exports-main\":{\"source\":[\"exports/**/*.ts\"],\"distDir\":\"dist\",\"isLibrary\":true,\"outputFormat\":\"commonjs\",\"includeNodeModules\":[\"@adobe/spectrum-css-temp\"]},\"legacy-module\":{\"source\":[\"exports/**/*.ts\"],\"distDir\":\"dist\",\"isLibrary\":true,\"outputFormat\":\"esmodule\",\"includeNodeModules\":[\"@adobe/spectrum-css-temp\"],\"engines\":{\"browsers\":[\"chrome >= 79\",\"firefox >= 85\",\"safari >= 13\"]}}}}");
3
-
4
-
5
- export {$89b86e88ddc6b597$exports as default};
6
- //# sourceMappingURL=package.js.map
@@ -1 +0,0 @@
1
- {"mappings":";AAAA,4BAAiB,KAAK,KAAK,CAAC","sources":["packages/@adobe/react-spectrum/package.json"],"sourcesContent":["{\n \"name\": \"@adobe/react-spectrum\",\n \"version\": \"3.47.3\",\n \"description\": \"Spectrum UI components in React\",\n \"license\": \"Apache-2.0\",\n \"main\": \"./dist/exports/index.cjs\",\n \"module\": \"./dist/exports/index.js\",\n \"exports\": {\n \".\": {\n \"source\": \"./exports/index.ts\",\n \"types\": \"./dist/types/exports/index.d.ts\",\n \"import\": \"./dist/exports/index.mjs\",\n \"require\": \"./dist/exports/index.cjs\"\n },\n \"./i18n\": {\n \"types\": \"./i18n/index.d.ts\",\n \"import\": \"./i18n/index.mjs\",\n \"require\": \"./i18n/index.js\"\n },\n \"./i18n/*\": {\n \"types\": \"./i18n/lang.d.ts\",\n \"import\": \"./i18n/*.mjs\",\n \"require\": \"./i18n/*.js\"\n },\n \"./package.json\": \"./package.json\",\n \"./*\": {\n \"source\": \"./exports/*.ts\",\n \"types\": \"./dist/types/exports/*.d.ts\",\n \"import\": \"./dist/exports/*.mjs\",\n \"require\": \"./dist/exports/*.cjs\"\n }\n },\n \"types\": \"./dist/types/exports/index.d.ts\",\n \"source\": \"exports/index.ts\",\n \"files\": [\n \"*\",\n \"!chromatic/**\",\n \"!chromatic-fc/**\",\n \"!docs/**\",\n \"!exports/**\",\n \"!intl/**\",\n \"!scripts/**\",\n \"!src/**\",\n \"!stories/**\",\n \"!test/**\"\n ],\n \"sideEffects\": [\n \"*.css\"\n ],\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/adobe/react-spectrum\"\n },\n \"dependencies\": {\n \"@internationalized/date\": \"^3.12.3\",\n \"@react-types/shared\": \"^3.36.1\",\n \"@spectrum-icons/ui\": \"^3.7.1\",\n \"@spectrum-icons/workflow\": \"^4.3.1\",\n \"@swc/helpers\": \"^0.5.0\",\n \"client-only\": \"^0.0.1\",\n \"clsx\": \"^2.0.0\",\n \"react-aria\": \"3.51.0\",\n \"react-aria-components\": \"1.20.0\",\n \"react-stately\": \"3.49.0\",\n \"react-transition-group\": \"^4.4.5\",\n \"use-sync-external-store\": \"^1.6.0\"\n },\n \"publishConfig\": {\n \"access\": \"public\"\n },\n \"peerDependencies\": {\n \"react\": \"^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1\",\n \"react-dom\": \"^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1\"\n },\n \"devDependencies\": {\n \"@adobe/spectrum-css-temp\": \"3.0.0-alpha.1\",\n \"@babel/cli\": \"^7.12.10\",\n \"@babel/core\": \"^7.24.3\",\n \"@react-spectrum/style-macro-s1\": \"3.0.0-alpha.6\",\n \"react\": \"^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1\",\n \"react-dom\": \"^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1\"\n },\n \"targets\": {\n \"main\": false,\n \"module\": false,\n \"types\": false,\n \"exports-module\": {\n \"source\": [\n \"exports/**/*.ts\"\n ],\n \"distDir\": \"dist\",\n \"isLibrary\": true,\n \"outputFormat\": \"esmodule\",\n \"includeNodeModules\": [\n \"@adobe/spectrum-css-temp\"\n ]\n },\n \"exports-main\": {\n \"source\": [\n \"exports/**/*.ts\"\n ],\n \"distDir\": \"dist\",\n \"isLibrary\": true,\n \"outputFormat\": \"commonjs\",\n \"includeNodeModules\": [\n \"@adobe/spectrum-css-temp\"\n ]\n },\n \"legacy-module\": {\n \"source\": [\n \"exports/**/*.ts\"\n ],\n \"distDir\": \"dist\",\n \"isLibrary\": true,\n \"outputFormat\": \"esmodule\",\n \"includeNodeModules\": [\n \"@adobe/spectrum-css-temp\"\n ],\n \"engines\": {\n \"browsers\": [\n \"chrome >= 79\",\n \"firefox >= 85\",\n \"safari >= 13\"\n ]\n }\n }\n }\n}\n"],"names":[],"version":3,"file":"package.js.map"}
@@ -1,6 +0,0 @@
1
- var $227a2d5562a2a453$exports = {};
2
- $227a2d5562a2a453$exports = JSON.parse("{\"name\":\"@adobe/react-spectrum\",\"version\":\"3.47.3\",\"description\":\"Spectrum UI components in React\",\"license\":\"Apache-2.0\",\"main\":\"./dist/exports/index.cjs\",\"module\":\"./dist/exports/index.js\",\"exports\":{\".\":{\"source\":\"./exports/index.ts\",\"types\":\"./dist/types/exports/index.d.ts\",\"import\":\"./dist/exports/index.mjs\",\"require\":\"./dist/exports/index.cjs\"},\"./i18n\":{\"types\":\"./i18n/index.d.ts\",\"import\":\"./i18n/index.mjs\",\"require\":\"./i18n/index.js\"},\"./i18n/*\":{\"types\":\"./i18n/lang.d.ts\",\"import\":\"./i18n/*.mjs\",\"require\":\"./i18n/*.js\"},\"./package.json\":\"./package.json\",\"./*\":{\"source\":\"./exports/*.ts\",\"types\":\"./dist/types/exports/*.d.ts\",\"import\":\"./dist/exports/*.mjs\",\"require\":\"./dist/exports/*.cjs\"}},\"types\":\"./dist/types/exports/index.d.ts\",\"source\":\"exports/index.ts\",\"files\":[\"*\",\"!chromatic/**\",\"!chromatic-fc/**\",\"!docs/**\",\"!exports/**\",\"!intl/**\",\"!scripts/**\",\"!src/**\",\"!stories/**\",\"!test/**\"],\"sideEffects\":[\"*.css\"],\"repository\":{\"type\":\"git\",\"url\":\"https://github.com/adobe/react-spectrum\"},\"dependencies\":{\"@internationalized/date\":\"^3.12.3\",\"@react-types/shared\":\"^3.36.1\",\"@spectrum-icons/ui\":\"^3.7.1\",\"@spectrum-icons/workflow\":\"^4.3.1\",\"@swc/helpers\":\"^0.5.0\",\"client-only\":\"^0.0.1\",\"clsx\":\"^2.0.0\",\"react-aria\":\"3.51.0\",\"react-aria-components\":\"1.20.0\",\"react-stately\":\"3.49.0\",\"react-transition-group\":\"^4.4.5\",\"use-sync-external-store\":\"^1.6.0\"},\"publishConfig\":{\"access\":\"public\"},\"peerDependencies\":{\"react\":\"^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1\",\"react-dom\":\"^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1\"},\"devDependencies\":{\"@adobe/spectrum-css-temp\":\"3.0.0-alpha.1\",\"@babel/cli\":\"^7.12.10\",\"@babel/core\":\"^7.24.3\",\"@react-spectrum/style-macro-s1\":\"3.0.0-alpha.6\",\"react\":\"^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1\",\"react-dom\":\"^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1\"},\"targets\":{\"main\":false,\"module\":false,\"types\":false,\"exports-module\":{\"source\":[\"exports/**/*.ts\"],\"distDir\":\"dist\",\"isLibrary\":true,\"outputFormat\":\"esmodule\",\"includeNodeModules\":[\"@adobe/spectrum-css-temp\"]},\"exports-main\":{\"source\":[\"exports/**/*.ts\"],\"distDir\":\"dist\",\"isLibrary\":true,\"outputFormat\":\"commonjs\",\"includeNodeModules\":[\"@adobe/spectrum-css-temp\"]},\"legacy-module\":{\"source\":[\"exports/**/*.ts\"],\"distDir\":\"dist\",\"isLibrary\":true,\"outputFormat\":\"esmodule\",\"includeNodeModules\":[\"@adobe/spectrum-css-temp\"],\"engines\":{\"browsers\":[\"chrome >= 79\",\"firefox >= 85\",\"safari >= 13\"]}}}}");
3
-
4
-
5
- export {$227a2d5562a2a453$exports as default};
6
- //# sourceMappingURL=package.mjs.map
@@ -1 +0,0 @@
1
- {"mappings":";AAAA,4BAAiB,KAAK,KAAK,CAAC","sources":["packages/@adobe/react-spectrum/package.json"],"sourcesContent":["{\n \"name\": \"@adobe/react-spectrum\",\n \"version\": \"3.47.3\",\n \"description\": \"Spectrum UI components in React\",\n \"license\": \"Apache-2.0\",\n \"main\": \"./dist/exports/index.cjs\",\n \"module\": \"./dist/exports/index.js\",\n \"exports\": {\n \".\": {\n \"source\": \"./exports/index.ts\",\n \"types\": \"./dist/types/exports/index.d.ts\",\n \"import\": \"./dist/exports/index.mjs\",\n \"require\": \"./dist/exports/index.cjs\"\n },\n \"./i18n\": {\n \"types\": \"./i18n/index.d.ts\",\n \"import\": \"./i18n/index.mjs\",\n \"require\": \"./i18n/index.js\"\n },\n \"./i18n/*\": {\n \"types\": \"./i18n/lang.d.ts\",\n \"import\": \"./i18n/*.mjs\",\n \"require\": \"./i18n/*.js\"\n },\n \"./package.json\": \"./package.json\",\n \"./*\": {\n \"source\": \"./exports/*.ts\",\n \"types\": \"./dist/types/exports/*.d.ts\",\n \"import\": \"./dist/exports/*.mjs\",\n \"require\": \"./dist/exports/*.cjs\"\n }\n },\n \"types\": \"./dist/types/exports/index.d.ts\",\n \"source\": \"exports/index.ts\",\n \"files\": [\n \"*\",\n \"!chromatic/**\",\n \"!chromatic-fc/**\",\n \"!docs/**\",\n \"!exports/**\",\n \"!intl/**\",\n \"!scripts/**\",\n \"!src/**\",\n \"!stories/**\",\n \"!test/**\"\n ],\n \"sideEffects\": [\n \"*.css\"\n ],\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/adobe/react-spectrum\"\n },\n \"dependencies\": {\n \"@internationalized/date\": \"^3.12.3\",\n \"@react-types/shared\": \"^3.36.1\",\n \"@spectrum-icons/ui\": \"^3.7.1\",\n \"@spectrum-icons/workflow\": \"^4.3.1\",\n \"@swc/helpers\": \"^0.5.0\",\n \"client-only\": \"^0.0.1\",\n \"clsx\": \"^2.0.0\",\n \"react-aria\": \"3.51.0\",\n \"react-aria-components\": \"1.20.0\",\n \"react-stately\": \"3.49.0\",\n \"react-transition-group\": \"^4.4.5\",\n \"use-sync-external-store\": \"^1.6.0\"\n },\n \"publishConfig\": {\n \"access\": \"public\"\n },\n \"peerDependencies\": {\n \"react\": \"^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1\",\n \"react-dom\": \"^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1\"\n },\n \"devDependencies\": {\n \"@adobe/spectrum-css-temp\": \"3.0.0-alpha.1\",\n \"@babel/cli\": \"^7.12.10\",\n \"@babel/core\": \"^7.24.3\",\n \"@react-spectrum/style-macro-s1\": \"3.0.0-alpha.6\",\n \"react\": \"^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1\",\n \"react-dom\": \"^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1\"\n },\n \"targets\": {\n \"main\": false,\n \"module\": false,\n \"types\": false,\n \"exports-module\": {\n \"source\": [\n \"exports/**/*.ts\"\n ],\n \"distDir\": \"dist\",\n \"isLibrary\": true,\n \"outputFormat\": \"esmodule\",\n \"includeNodeModules\": [\n \"@adobe/spectrum-css-temp\"\n ]\n },\n \"exports-main\": {\n \"source\": [\n \"exports/**/*.ts\"\n ],\n \"distDir\": \"dist\",\n \"isLibrary\": true,\n \"outputFormat\": \"commonjs\",\n \"includeNodeModules\": [\n \"@adobe/spectrum-css-temp\"\n ]\n },\n \"legacy-module\": {\n \"source\": [\n \"exports/**/*.ts\"\n ],\n \"distDir\": \"dist\",\n \"isLibrary\": true,\n \"outputFormat\": \"esmodule\",\n \"includeNodeModules\": [\n \"@adobe/spectrum-css-temp\"\n ],\n \"engines\": {\n \"browsers\": [\n \"chrome >= 79\",\n \"firefox >= 85\",\n \"safari >= 13\"\n ]\n }\n }\n }\n}\n"],"names":[],"version":3,"file":"package.mjs.map"}