@react-spectrum/picker 3.10.3 → 3.10.4-nightly.3937

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/import.mjs CHANGED
@@ -7,7 +7,7 @@ import {Field as $3toCD$Field} from "@react-spectrum/label";
7
7
  import {FieldButton as $3toCD$FieldButton} from "@react-spectrum/button";
8
8
  import {useSelect as $3toCD$useSelect, HiddenSelect as $3toCD$HiddenSelect} from "@react-aria/select";
9
9
  import {useListBoxLayout as $3toCD$useListBoxLayout, ListBoxBase as $3toCD$ListBoxBase} from "@react-spectrum/listbox";
10
- import {useResizeObserver as $3toCD$useResizeObserver, useLayoutEffect as $3toCD$useLayoutEffect, mergeProps as $3toCD$mergeProps} from "@react-aria/utils";
10
+ import {useId as $3toCD$useId, useResizeObserver as $3toCD$useResizeObserver, useLayoutEffect as $3toCD$useLayoutEffect, mergeProps as $3toCD$mergeProps} from "@react-aria/utils";
11
11
  import {Tray as $3toCD$Tray, Popover as $3toCD$Popover} from "@react-spectrum/overlays";
12
12
  import {useHover as $3toCD$useHover, PressResponder as $3toCD$PressResponder} from "@react-aria/interactions";
13
13
  import {ProgressCircle as $3toCD$ProgressCircle} from "@react-spectrum/progress";
@@ -406,20 +406,22 @@ function $51664a9007a3c6f9$var$Picker(props, ref) {
406
406
  let triggerRef = (0, $3toCD$useRef)();
407
407
  let unwrappedTriggerRef = (0, $3toCD$useUnwrapDOMRef)(triggerRef);
408
408
  let listboxRef = (0, $3toCD$useRef)();
409
+ let isLoadingInitial = props.isLoading && state.collection.size === 0;
410
+ let isLoadingMore = props.isLoading && state.collection.size > 0;
411
+ let progressCircleId = (0, $3toCD$useId)();
409
412
  // We create the listbox layout in Picker and pass it to ListBoxBase below
410
413
  // so that the layout information can be cached even while the listbox is not mounted.
411
414
  // We also use the layout as the keyboard delegate for type to select.
412
415
  let layout = (0, $3toCD$useListBoxLayout)(state);
413
416
  let { labelProps: labelProps , triggerProps: triggerProps , valueProps: valueProps , menuProps: menuProps , descriptionProps: descriptionProps , errorMessageProps: errorMessageProps } = (0, $3toCD$useSelect)({
414
417
  ...props,
418
+ "aria-describedby": isLoadingInitial ? progressCircleId : undefined,
415
419
  keyboardDelegate: layout
416
420
  }, state, unwrappedTriggerRef);
417
421
  let isMobile = (0, $3toCD$useIsMobileDevice)();
418
422
  let { hoverProps: hoverProps , isHovered: isHovered } = (0, $3toCD$useHover)({
419
423
  isDisabled: isDisabled
420
424
  });
421
- let isLoadingInitial = props.isLoading && state.collection.size === 0;
422
- let isLoadingMore = props.isLoading && state.collection.size > 0;
423
425
  // On small screen devices, the listbox is rendered in a tray, otherwise a popover.
424
426
  let listbox = /*#__PURE__*/ (0, $3toCD$react).createElement((0, $3toCD$ListBoxBase), {
425
427
  ...menuProps,
@@ -529,6 +531,7 @@ function $51664a9007a3c6f9$var$Picker(props, ref) {
529
531
  }
530
532
  }
531
533
  }, contents), isLoadingInitial && /*#__PURE__*/ (0, $3toCD$react).createElement((0, $3toCD$ProgressCircle), {
534
+ id: progressCircleId,
532
535
  isIndeterminate: true,
533
536
  size: "S",
534
537
  "aria-label": stringFormatter.format("loading"),
package/dist/main.js CHANGED
@@ -410,20 +410,22 @@ function $902e54cfaa4270a9$var$Picker(props, ref) {
410
410
  let triggerRef = (0, $4FjNO$react.useRef)();
411
411
  let unwrappedTriggerRef = (0, $4FjNO$reactspectrumutils.useUnwrapDOMRef)(triggerRef);
412
412
  let listboxRef = (0, $4FjNO$react.useRef)();
413
+ let isLoadingInitial = props.isLoading && state.collection.size === 0;
414
+ let isLoadingMore = props.isLoading && state.collection.size > 0;
415
+ let progressCircleId = (0, $4FjNO$reactariautils.useId)();
413
416
  // We create the listbox layout in Picker and pass it to ListBoxBase below
414
417
  // so that the layout information can be cached even while the listbox is not mounted.
415
418
  // We also use the layout as the keyboard delegate for type to select.
416
419
  let layout = (0, $4FjNO$reactspectrumlistbox.useListBoxLayout)(state);
417
420
  let { labelProps: labelProps , triggerProps: triggerProps , valueProps: valueProps , menuProps: menuProps , descriptionProps: descriptionProps , errorMessageProps: errorMessageProps } = (0, $4FjNO$reactariaselect.useSelect)({
418
421
  ...props,
422
+ "aria-describedby": isLoadingInitial ? progressCircleId : undefined,
419
423
  keyboardDelegate: layout
420
424
  }, state, unwrappedTriggerRef);
421
425
  let isMobile = (0, $4FjNO$reactspectrumutils.useIsMobileDevice)();
422
426
  let { hoverProps: hoverProps , isHovered: isHovered } = (0, $4FjNO$reactariainteractions.useHover)({
423
427
  isDisabled: isDisabled
424
428
  });
425
- let isLoadingInitial = props.isLoading && state.collection.size === 0;
426
- let isLoadingMore = props.isLoading && state.collection.size > 0;
427
429
  // On small screen devices, the listbox is rendered in a tray, otherwise a popover.
428
430
  let listbox = /*#__PURE__*/ (0, ($parcel$interopDefault($4FjNO$react))).createElement((0, $4FjNO$reactspectrumlistbox.ListBoxBase), {
429
431
  ...menuProps,
@@ -533,6 +535,7 @@ function $902e54cfaa4270a9$var$Picker(props, ref) {
533
535
  }
534
536
  }
535
537
  }, contents), isLoadingInitial && /*#__PURE__*/ (0, ($parcel$interopDefault($4FjNO$react))).createElement((0, $4FjNO$reactspectrumprogress.ProgressCircle), {
538
+ id: progressCircleId,
536
539
  isIndeterminate: true,
537
540
  size: "S",
538
541
  "aria-label": stringFormatter.format("loading"),
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C;ACZ1C;;;;;;;;;;CAUC,GAED;;;;;;;;AEZA,4BAAiB;IAAG,WAAW,CAAC,eAAe,CAAC;IAC9C,eAAe,CAAC,aAAa,CAAC;AAChC;;ADFA;;AEAA,4BAAiB;IAAG,WAAW,CAAC,YAAY,CAAC;IAC3C,eAAe,CAAC,cAAc,CAAC;AACjC;;;;ACFA,4BAAiB;IAAG,WAAW,CAAC,WAAW,CAAC;IAC1C,eAAe,CAAC,0BAA0B,CAAC;AAC7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AC,CAAA,GAAA,2CAAc,AAAD;QACZ,iBAAA,IAAe;QACf,MAAK;QACL,cAAY,gBAAgB,MAAM,CAAC;QACnC,kBAAkB,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,gEAAM,AAAD,GAAG;QAExC,oBAAoB,aAAa,CAAC,oBAAoB,CAAC,4BACtD,0DAAC,CAAA,GAAA,yDAAW,EAAD;QAAE,kBAAkB,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,gEAAM,AAAD,GAAG;sBAEpD,0DAAC,CAAA,GAAA,yDAAiB,QAAD;QAAE,kBAAkB,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,gEAAM,AAAD,GAAG;UAG3D,MAAM,UAAU,CAAC,IAAI,KAAK,IAAI,IAAI,GAAG,OAAO;IAIjD,IAAI,mBAAmB,QAAQ,CAAA,GAAA,oCAAS,EACtC,CAAA,GAAA,yDAAM,OAAD,GACL,kBACA;QACE,yCAAyC;QACzC,gDAAgD,kBAAkB;IACpE,KACE,EAAE;IAEN,qBACE,0DAAC,CAAA,GAAA,+BAAK,AAAD;QACF,GAAG,KAAK;QACT,KAAK;QACL,kBAAkB;QAClB,YAAY;QACZ,kBAAkB;QAClB,mBAAmB;QACnB,eAAe,KAAK;QACpB,8CAAA,IAA4C;QAC5C,aAAY;OACX;AAGP;AAEA;;CAEC,GACD,wFAAwF;AACxF,2GAA2G;AAC3G,MAAM,0DAAU,CAAA,GAAA,sCAAK,AAAD,EAAE,UAAU,CAAC;;AD9OjC","sources":["packages/@react-spectrum/picker/src/index.ts","packages/@react-spectrum/picker/src/Picker.tsx","packages/@react-spectrum/picker/intl/*.js","packages/@react-spectrum/picker/intl/ar-AE.json","packages/@react-spectrum/picker/intl/bg-BG.json","packages/@react-spectrum/picker/intl/cs-CZ.json","packages/@react-spectrum/picker/intl/da-DK.json","packages/@react-spectrum/picker/intl/de-DE.json","packages/@react-spectrum/picker/intl/el-GR.json","packages/@react-spectrum/picker/intl/en-US.json","packages/@react-spectrum/picker/intl/es-ES.json","packages/@react-spectrum/picker/intl/et-EE.json","packages/@react-spectrum/picker/intl/fi-FI.json","packages/@react-spectrum/picker/intl/fr-FR.json","packages/@react-spectrum/picker/intl/he-IL.json","packages/@react-spectrum/picker/intl/hr-HR.json","packages/@react-spectrum/picker/intl/hu-HU.json","packages/@react-spectrum/picker/intl/it-IT.json","packages/@react-spectrum/picker/intl/ja-JP.json","packages/@react-spectrum/picker/intl/ko-KR.json","packages/@react-spectrum/picker/intl/lt-LT.json","packages/@react-spectrum/picker/intl/lv-LV.json","packages/@react-spectrum/picker/intl/nb-NO.json","packages/@react-spectrum/picker/intl/nl-NL.json","packages/@react-spectrum/picker/intl/pl-PL.json","packages/@react-spectrum/picker/intl/pt-BR.json","packages/@react-spectrum/picker/intl/pt-PT.json","packages/@react-spectrum/picker/intl/ro-RO.json","packages/@react-spectrum/picker/intl/ru-RU.json","packages/@react-spectrum/picker/intl/sk-SK.json","packages/@react-spectrum/picker/intl/sl-SI.json","packages/@react-spectrum/picker/intl/sr-SP.json","packages/@react-spectrum/picker/intl/sv-SE.json","packages/@react-spectrum/picker/intl/tr-TR.json","packages/@react-spectrum/picker/intl/uk-UA.json","packages/@react-spectrum/picker/intl/zh-CN.json","packages/@react-spectrum/picker/intl/zh-TW.json","packages/@adobe/spectrum-css-temp/components/dropdown/vars.css"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/// <reference types=\"css-module-types\" />\n\nexport {Picker} from './Picker';\nexport {Item, Section} from '@react-stately/collections';\nexport type {SpectrumPickerProps} from '@react-types/select';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport AlertMedium from '@spectrum-icons/ui/AlertMedium';\nimport ChevronDownMedium from '@spectrum-icons/ui/ChevronDownMedium';\nimport {\n classNames,\n dimensionValue,\n SlotProvider,\n useDOMRef,\n useIsMobileDevice,\n useSlotProps,\n useUnwrapDOMRef\n} from '@react-spectrum/utils';\nimport {DOMRef, DOMRefValue, FocusableRefValue, LabelPosition} from '@react-types/shared';\nimport {Field} from '@react-spectrum/label';\nimport {FieldButton} from '@react-spectrum/button';\nimport {HiddenSelect, useSelect} from '@react-aria/select';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {ListBoxBase, useListBoxLayout} from '@react-spectrum/listbox';\nimport {mergeProps, useLayoutEffect, useResizeObserver} from '@react-aria/utils';\nimport {Popover, Tray} from '@react-spectrum/overlays';\nimport {PressResponder, useHover} from '@react-aria/interactions';\nimport {ProgressCircle} from '@react-spectrum/progress';\nimport React, {ReactElement, useCallback, useRef, useState} from 'react';\nimport {SpectrumPickerProps} from '@react-types/select';\nimport styles from '@adobe/spectrum-css-temp/components/dropdown/vars.css';\nimport {Text} from '@react-spectrum/text';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useProvider, useProviderProps} from '@react-spectrum/provider';\nimport {useSelectState} from '@react-stately/select';\n\nfunction Picker<T extends object>(props: SpectrumPickerProps<T>, ref: DOMRef<HTMLDivElement>) {\n props = useSlotProps(props, 'picker');\n props = useProviderProps(props);\n let stringFormatter = useLocalizedStringFormatter(intlMessages);\n let {\n autoComplete,\n isDisabled,\n direction = 'bottom',\n align = 'start',\n shouldFlip = true,\n placeholder = stringFormatter.format('placeholder'),\n validationState,\n isQuiet,\n label,\n labelPosition = 'top' as LabelPosition,\n menuWidth,\n name,\n autoFocus\n } = props;\n\n let state = useSelectState(props);\n let domRef = useDOMRef(ref);\n\n let popoverRef = useRef<DOMRefValue<HTMLDivElement>>();\n let triggerRef = useRef<FocusableRefValue<HTMLElement>>();\n let unwrappedTriggerRef = useUnwrapDOMRef(triggerRef);\n let listboxRef = useRef();\n\n // We create the listbox layout in Picker and pass it to ListBoxBase below\n // so that the layout information can be cached even while the listbox is not mounted.\n // We also use the layout as the keyboard delegate for type to select.\n let layout = useListBoxLayout(state);\n let {labelProps, triggerProps, valueProps, menuProps, descriptionProps, errorMessageProps} = useSelect({\n ...props,\n keyboardDelegate: layout\n }, state, unwrappedTriggerRef);\n\n let isMobile = useIsMobileDevice();\n let {hoverProps, isHovered} = useHover({isDisabled});\n\n let isLoadingInitial = props.isLoading && state.collection.size === 0;\n let isLoadingMore = props.isLoading && state.collection.size > 0;\n\n // On small screen devices, the listbox is rendered in a tray, otherwise a popover.\n let listbox = (\n <ListBoxBase\n {...menuProps}\n ref={listboxRef}\n disallowEmptySelection\n autoFocus={state.focusStrategy || true}\n shouldSelectOnPressUp\n focusOnPointerEnter\n layout={layout}\n state={state}\n width={isMobile ? '100%' : undefined}\n // Set max height: inherit so Tray scrolling works\n UNSAFE_style={{maxHeight: 'inherit'}}\n isLoading={isLoadingMore}\n onLoadMore={props.onLoadMore} />\n );\n\n // Measure the width of the button to inform the width of the menu (below).\n let [buttonWidth, setButtonWidth] = useState(null);\n let {scale} = useProvider();\n\n let onResize = useCallback(() => {\n if (!isMobile && unwrappedTriggerRef.current) {\n let width = unwrappedTriggerRef.current.offsetWidth;\n setButtonWidth(width);\n }\n }, [unwrappedTriggerRef, setButtonWidth, isMobile]);\n\n useResizeObserver({\n ref: unwrappedTriggerRef,\n onResize: onResize\n });\n\n useLayoutEffect(onResize, [scale, state.selectedKey, onResize]);\n\n let overlay;\n if (isMobile) {\n overlay = (\n <Tray state={state}>\n {listbox}\n </Tray>\n );\n } else {\n // If quiet, use the default width, otherwise match the width of the button. This can be overridden by the menuWidth prop.\n // Always have a minimum width of the button width. When quiet, there is an extra offset to add.\n // Not using style props for this because they don't support `calc`.\n let width = isQuiet ? null : buttonWidth;\n let style = {\n width: menuWidth ? dimensionValue(menuWidth) : width,\n minWidth: isQuiet ? `calc(${buttonWidth}px + calc(2 * var(--spectrum-dropdown-quiet-offset)))` : buttonWidth\n };\n\n overlay = (\n <Popover\n UNSAFE_style={style}\n UNSAFE_className={classNames(styles, 'spectrum-Dropdown-popover', {'spectrum-Dropdown-popover--quiet': isQuiet})}\n ref={popoverRef}\n placement={`${direction} ${align}`}\n shouldFlip={shouldFlip}\n hideArrow\n state={state}\n triggerRef={unwrappedTriggerRef}\n scrollRef={listboxRef}>\n {listbox}\n </Popover>\n );\n }\n\n let contents = state.selectedItem ? state.selectedItem.rendered : placeholder;\n if (typeof contents === 'string') {\n contents = <Text>{contents}</Text>;\n }\n\n let picker = (\n <div\n className={\n classNames(\n styles,\n 'spectrum-Dropdown',\n {\n 'is-invalid': validationState === 'invalid' && !isDisabled,\n 'is-disabled': isDisabled,\n 'spectrum-Dropdown--quiet': isQuiet\n }\n )\n }>\n <HiddenSelect\n autoComplete={autoComplete}\n isDisabled={isDisabled}\n state={state}\n triggerRef={unwrappedTriggerRef}\n label={label}\n name={name} />\n <PressResponder {...mergeProps(hoverProps, triggerProps)}>\n <FieldButton\n ref={triggerRef}\n isActive={state.isOpen}\n isQuiet={isQuiet}\n isDisabled={isDisabled}\n validationState={validationState}\n autoFocus={autoFocus}\n UNSAFE_className={classNames(styles, 'spectrum-Dropdown-trigger', {'is-hovered': isHovered})}>\n <SlotProvider\n slots={{\n icon: {UNSAFE_className: classNames(styles, 'spectrum-Icon'), size: 'S'},\n text: {\n ...valueProps,\n UNSAFE_className: classNames(\n styles,\n 'spectrum-Dropdown-label',\n {'is-placeholder': !state.selectedItem}\n )\n },\n description: {\n isHidden: true\n }\n }}>\n {contents}\n </SlotProvider>\n {isLoadingInitial &&\n <ProgressCircle\n isIndeterminate\n size=\"S\"\n aria-label={stringFormatter.format('loading')}\n UNSAFE_className={classNames(styles, 'spectrum-Dropdown-progressCircle')} />\n }\n {validationState === 'invalid' && !isLoadingInitial && !isDisabled &&\n <AlertMedium UNSAFE_className={classNames(styles, 'spectrum-Dropdown-invalidIcon')} />\n }\n <ChevronDownMedium UNSAFE_className={classNames(styles, 'spectrum-Dropdown-chevron')} />\n </FieldButton>\n </PressResponder>\n {state.collection.size === 0 ? null : overlay}\n </div>\n );\n\n let wrapperClassName = label ? classNames(\n styles,\n 'spectrum-Field',\n {\n 'spectrum-Dropdown-fieldWrapper--quiet': isQuiet,\n 'spectrum-Dropdown-fieldWrapper--positionSide': labelPosition === 'side'\n }\n ) : '';\n\n return (\n <Field\n {...props}\n ref={domRef}\n wrapperClassName={wrapperClassName}\n labelProps={labelProps}\n descriptionProps={descriptionProps}\n errorMessageProps={errorMessageProps}\n showErrorIcon={false}\n includeNecessityIndicatorInAccessibilityName\n elementType=\"span\">\n {picker}\n </Field>\n );\n}\n\n/**\n * Pickers allow users to choose a single option from a collapsible list of options when space is limited.\n */\n// forwardRef doesn't support generic parameters, so cast the result to the correct type\n// https://stackoverflow.com/questions/58469229/react-with-typescript-generics-while-using-react-forwardref\nconst _Picker = React.forwardRef(Picker) as <T>(props: SpectrumPickerProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReactElement;\nexport {_Picker as Picker};\n","const _temp0 = require(\"./ar-AE.json\");\nconst _temp1 = require(\"./bg-BG.json\");\nconst _temp2 = require(\"./cs-CZ.json\");\nconst _temp3 = require(\"./da-DK.json\");\nconst _temp4 = require(\"./de-DE.json\");\nconst _temp5 = require(\"./el-GR.json\");\nconst _temp6 = require(\"./en-US.json\");\nconst _temp7 = require(\"./es-ES.json\");\nconst _temp8 = require(\"./et-EE.json\");\nconst _temp9 = require(\"./fi-FI.json\");\nconst _temp10 = require(\"./fr-FR.json\");\nconst _temp11 = require(\"./he-IL.json\");\nconst _temp12 = require(\"./hr-HR.json\");\nconst _temp13 = require(\"./hu-HU.json\");\nconst _temp14 = require(\"./it-IT.json\");\nconst _temp15 = require(\"./ja-JP.json\");\nconst _temp16 = require(\"./ko-KR.json\");\nconst _temp17 = require(\"./lt-LT.json\");\nconst _temp18 = require(\"./lv-LV.json\");\nconst _temp19 = require(\"./nb-NO.json\");\nconst _temp20 = require(\"./nl-NL.json\");\nconst _temp21 = require(\"./pl-PL.json\");\nconst _temp22 = require(\"./pt-BR.json\");\nconst _temp23 = require(\"./pt-PT.json\");\nconst _temp24 = require(\"./ro-RO.json\");\nconst _temp25 = require(\"./ru-RU.json\");\nconst _temp26 = require(\"./sk-SK.json\");\nconst _temp27 = require(\"./sl-SI.json\");\nconst _temp28 = require(\"./sr-SP.json\");\nconst _temp29 = require(\"./sv-SE.json\");\nconst _temp30 = require(\"./tr-TR.json\");\nconst _temp31 = require(\"./uk-UA.json\");\nconst _temp32 = require(\"./zh-CN.json\");\nconst _temp33 = require(\"./zh-TW.json\");\nmodule.exports = {\n \"ar-AE\": _temp0,\n \"bg-BG\": _temp1,\n \"cs-CZ\": _temp2,\n \"da-DK\": _temp3,\n \"de-DE\": _temp4,\n \"el-GR\": _temp5,\n \"en-US\": _temp6,\n \"es-ES\": _temp7,\n \"et-EE\": _temp8,\n \"fi-FI\": _temp9,\n \"fr-FR\": _temp10,\n \"he-IL\": _temp11,\n \"hr-HR\": _temp12,\n \"hu-HU\": _temp13,\n \"it-IT\": _temp14,\n \"ja-JP\": _temp15,\n \"ko-KR\": _temp16,\n \"lt-LT\": _temp17,\n \"lv-LV\": _temp18,\n \"nb-NO\": _temp19,\n \"nl-NL\": _temp20,\n \"pl-PL\": _temp21,\n \"pt-BR\": _temp22,\n \"pt-PT\": _temp23,\n \"ro-RO\": _temp24,\n \"ru-RU\": _temp25,\n \"sk-SK\": _temp26,\n \"sl-SI\": _temp27,\n \"sr-SP\": _temp28,\n \"sv-SE\": _temp29,\n \"tr-TR\": _temp30,\n \"uk-UA\": _temp31,\n \"zh-CN\": _temp32,\n \"zh-TW\": _temp33\n}","{\n \"loading\": \"جارٍ التحميل...\",\n \"placeholder\": \"حدد خيارًا...\"\n}\n","{\n \"loading\": \"Зареждане...\",\n \"placeholder\": \"Изберете опция\"\n}\n","{\n \"loading\": \"Načítání...\",\n \"placeholder\": \"Vyberte vhodnou možnost...\"\n}\n","{\n \"loading\": \"Indlæser ...\",\n \"placeholder\": \"Vælg en mulighed ...\"\n}\n","{\n \"loading\": \"Laden...\",\n \"placeholder\": \"Option auswählen...\"\n}\n","{\n \"loading\": \"Φόρτωση...\",\n \"placeholder\": \"Επιλέξτε…\"\n}\n","{\n \"placeholder\": \"Select an option…\",\n \"loading\": \"Loading…\"\n}\n","{\n \"loading\": \"Cargando…\",\n \"placeholder\": \"Selecciona una de estas opciones...\"\n}\n","{\n \"loading\": \"Laadimine...\",\n \"placeholder\": \"Valige valikuline...\"\n}\n","{\n \"loading\": \"Ladataan…\",\n \"placeholder\": \"Valitse vaihtoehto...\"\n}\n","{\n \"loading\": \"Chargement...\",\n \"placeholder\": \"Sélectionnez une option...\"\n}\n","{\n \"loading\": \"טוען...\",\n \"placeholder\": \"בחר אפשרות...\"\n}\n","{\n \"loading\": \"Učitavam...\",\n \"placeholder\": \"Odaberite opciju\"\n}\n","{\n \"loading\": \"Betöltés folyamatban…\",\n \"placeholder\": \"Válasszon egy opciót…\"\n}\n","{\n \"loading\": \"Caricamento...\",\n \"placeholder\": \"Seleziona un’opzione...\"\n}\n","{\n \"loading\": \"読み込み中...\",\n \"placeholder\": \"オプションを選択...\"\n}\n","{\n \"loading\": \"로드 중\",\n \"placeholder\": \"선택 사항 선택\"\n}\n","{\n \"loading\": \"Įkeliama...\",\n \"placeholder\": \"Pasirinkite parinktį...\"\n}\n","{\n \"loading\": \"Notiek ielāde...\",\n \"placeholder\": \"Atlasiet opciju...\"\n}\n","{\n \"loading\": \"Laster inn ...\",\n \"placeholder\": \"Velg et alternativ...\"\n}\n","{\n \"loading\": \"Laden...\",\n \"placeholder\": \"Optie selecteren...\"\n}\n","{\n \"loading\": \"Ładowanie...\",\n \"placeholder\": \"Wybierz opcję...\"\n}\n","{\n \"loading\": \"Carregando...\",\n \"placeholder\": \"Selecione uma opção...\"\n}\n","{\n \"loading\": \"A carregar...\",\n \"placeholder\": \"Selecionar uma opção...\"\n}\n","{\n \"loading\": \"Se încarcă...\",\n \"placeholder\": \"Selectați o opțiune\"\n}\n","{\n \"loading\": \"Загрузка...\",\n \"placeholder\": \"Выбрать параметр...\"\n}\n","{\n \"loading\": \"Načítava sa...\",\n \"placeholder\": \"Vyberte možnosť...\"\n}\n","{\n \"loading\": \"Nalaganje...\",\n \"placeholder\": \"Izberite možnost\"\n}\n","{\n \"loading\": \"Učitavam...\",\n \"placeholder\": \"Izaberite opciju\"\n}\n","{\n \"loading\": \"Läser in...\",\n \"placeholder\": \"Välj ett alternativ...\"\n}\n","{\n \"loading\": \"Yükleniyor...\",\n \"placeholder\": \"Bir seçim yapın…\"\n}\n","{\n \"loading\": \"Завантаження…\",\n \"placeholder\": \"Виберіть опцію...\"\n}\n","{\n \"loading\": \"正在加载...\",\n \"placeholder\": \"选择一个选项...\"\n}\n","{\n \"loading\": \"正在載入\",\n \"placeholder\": \"選取一個選項\"\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"main.js.map"}
1
+ {"mappings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e,KAAK;QACpB,8CAAA,IAA4C;QAC5C,aAAY;OACX;AAGP;AAEA;;CAEC,GACD,wFAAwF;AACxF,2GAA2G;AAC3G,MAAM,0DAAU,CAAA,GAAA,sCAAK,AAAD,EAAE,UAAU,CAAC;;ADjPjC","sources":["packages/@react-spectrum/picker/src/index.ts","packages/@react-spectrum/picker/src/Picker.tsx","packages/@react-spectrum/picker/intl/*.js","packages/@react-spectrum/picker/intl/ar-AE.json","packages/@react-spectrum/picker/intl/bg-BG.json","packages/@react-spectrum/picker/intl/cs-CZ.json","packages/@react-spectrum/picker/intl/da-DK.json","packages/@react-spectrum/picker/intl/de-DE.json","packages/@react-spectrum/picker/intl/el-GR.json","packages/@react-spectrum/picker/intl/en-US.json","packages/@react-spectrum/picker/intl/es-ES.json","packages/@react-spectrum/picker/intl/et-EE.json","packages/@react-spectrum/picker/intl/fi-FI.json","packages/@react-spectrum/picker/intl/fr-FR.json","packages/@react-spectrum/picker/intl/he-IL.json","packages/@react-spectrum/picker/intl/hr-HR.json","packages/@react-spectrum/picker/intl/hu-HU.json","packages/@react-spectrum/picker/intl/it-IT.json","packages/@react-spectrum/picker/intl/ja-JP.json","packages/@react-spectrum/picker/intl/ko-KR.json","packages/@react-spectrum/picker/intl/lt-LT.json","packages/@react-spectrum/picker/intl/lv-LV.json","packages/@react-spectrum/picker/intl/nb-NO.json","packages/@react-spectrum/picker/intl/nl-NL.json","packages/@react-spectrum/picker/intl/pl-PL.json","packages/@react-spectrum/picker/intl/pt-BR.json","packages/@react-spectrum/picker/intl/pt-PT.json","packages/@react-spectrum/picker/intl/ro-RO.json","packages/@react-spectrum/picker/intl/ru-RU.json","packages/@react-spectrum/picker/intl/sk-SK.json","packages/@react-spectrum/picker/intl/sl-SI.json","packages/@react-spectrum/picker/intl/sr-SP.json","packages/@react-spectrum/picker/intl/sv-SE.json","packages/@react-spectrum/picker/intl/tr-TR.json","packages/@react-spectrum/picker/intl/uk-UA.json","packages/@react-spectrum/picker/intl/zh-CN.json","packages/@react-spectrum/picker/intl/zh-TW.json","packages/@adobe/spectrum-css-temp/components/dropdown/vars.css"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/// <reference types=\"css-module-types\" />\n\nexport {Picker} from './Picker';\nexport {Item, Section} from '@react-stately/collections';\nexport type {SpectrumPickerProps} from '@react-types/select';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport AlertMedium from '@spectrum-icons/ui/AlertMedium';\nimport ChevronDownMedium from '@spectrum-icons/ui/ChevronDownMedium';\nimport {\n classNames,\n dimensionValue,\n SlotProvider,\n useDOMRef,\n useIsMobileDevice,\n useSlotProps,\n useUnwrapDOMRef\n} from '@react-spectrum/utils';\nimport {DOMRef, DOMRefValue, FocusableRefValue, LabelPosition} from '@react-types/shared';\nimport {Field} from '@react-spectrum/label';\nimport {FieldButton} from '@react-spectrum/button';\nimport {HiddenSelect, useSelect} from '@react-aria/select';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {ListBoxBase, useListBoxLayout} from '@react-spectrum/listbox';\nimport {mergeProps, useId, useLayoutEffect, useResizeObserver} from '@react-aria/utils';\nimport {Popover, Tray} from '@react-spectrum/overlays';\nimport {PressResponder, useHover} from '@react-aria/interactions';\nimport {ProgressCircle} from '@react-spectrum/progress';\nimport React, {ReactElement, useCallback, useRef, useState} from 'react';\nimport {SpectrumPickerProps} from '@react-types/select';\nimport styles from '@adobe/spectrum-css-temp/components/dropdown/vars.css';\nimport {Text} from '@react-spectrum/text';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useProvider, useProviderProps} from '@react-spectrum/provider';\nimport {useSelectState} from '@react-stately/select';\n\nfunction Picker<T extends object>(props: SpectrumPickerProps<T>, ref: DOMRef<HTMLDivElement>) {\n props = useSlotProps(props, 'picker');\n props = useProviderProps(props);\n let stringFormatter = useLocalizedStringFormatter(intlMessages);\n let {\n autoComplete,\n isDisabled,\n direction = 'bottom',\n align = 'start',\n shouldFlip = true,\n placeholder = stringFormatter.format('placeholder'),\n validationState,\n isQuiet,\n label,\n labelPosition = 'top' as LabelPosition,\n menuWidth,\n name,\n autoFocus\n } = props;\n\n let state = useSelectState(props);\n let domRef = useDOMRef(ref);\n\n let popoverRef = useRef<DOMRefValue<HTMLDivElement>>();\n let triggerRef = useRef<FocusableRefValue<HTMLElement>>();\n let unwrappedTriggerRef = useUnwrapDOMRef(triggerRef);\n let listboxRef = useRef();\n\n let isLoadingInitial = props.isLoading && state.collection.size === 0;\n let isLoadingMore = props.isLoading && state.collection.size > 0;\n let progressCircleId = useId();\n\n // We create the listbox layout in Picker and pass it to ListBoxBase below\n // so that the layout information can be cached even while the listbox is not mounted.\n // We also use the layout as the keyboard delegate for type to select.\n let layout = useListBoxLayout(state);\n let {labelProps, triggerProps, valueProps, menuProps, descriptionProps, errorMessageProps} = useSelect({\n ...props,\n 'aria-describedby': (isLoadingInitial ? progressCircleId : undefined),\n keyboardDelegate: layout\n }, state, unwrappedTriggerRef);\n\n let isMobile = useIsMobileDevice();\n let {hoverProps, isHovered} = useHover({isDisabled});\n\n // On small screen devices, the listbox is rendered in a tray, otherwise a popover.\n let listbox = (\n <ListBoxBase\n {...menuProps}\n ref={listboxRef}\n disallowEmptySelection\n autoFocus={state.focusStrategy || true}\n shouldSelectOnPressUp\n focusOnPointerEnter\n layout={layout}\n state={state}\n width={isMobile ? '100%' : undefined}\n // Set max height: inherit so Tray scrolling works\n UNSAFE_style={{maxHeight: 'inherit'}}\n isLoading={isLoadingMore}\n onLoadMore={props.onLoadMore} />\n );\n\n // Measure the width of the button to inform the width of the menu (below).\n let [buttonWidth, setButtonWidth] = useState(null);\n let {scale} = useProvider();\n\n let onResize = useCallback(() => {\n if (!isMobile && unwrappedTriggerRef.current) {\n let width = unwrappedTriggerRef.current.offsetWidth;\n setButtonWidth(width);\n }\n }, [unwrappedTriggerRef, setButtonWidth, isMobile]);\n\n useResizeObserver({\n ref: unwrappedTriggerRef,\n onResize: onResize\n });\n\n useLayoutEffect(onResize, [scale, state.selectedKey, onResize]);\n\n let overlay;\n if (isMobile) {\n overlay = (\n <Tray state={state}>\n {listbox}\n </Tray>\n );\n } else {\n // If quiet, use the default width, otherwise match the width of the button. This can be overridden by the menuWidth prop.\n // Always have a minimum width of the button width. When quiet, there is an extra offset to add.\n // Not using style props for this because they don't support `calc`.\n let width = isQuiet ? null : buttonWidth;\n let style = {\n width: menuWidth ? dimensionValue(menuWidth) : width,\n minWidth: isQuiet ? `calc(${buttonWidth}px + calc(2 * var(--spectrum-dropdown-quiet-offset)))` : buttonWidth\n };\n\n overlay = (\n <Popover\n UNSAFE_style={style}\n UNSAFE_className={classNames(styles, 'spectrum-Dropdown-popover', {'spectrum-Dropdown-popover--quiet': isQuiet})}\n ref={popoverRef}\n placement={`${direction} ${align}`}\n shouldFlip={shouldFlip}\n hideArrow\n state={state}\n triggerRef={unwrappedTriggerRef}\n scrollRef={listboxRef}>\n {listbox}\n </Popover>\n );\n }\n\n let contents = state.selectedItem ? state.selectedItem.rendered : placeholder;\n if (typeof contents === 'string') {\n contents = <Text>{contents}</Text>;\n }\n\n let picker = (\n <div\n className={\n classNames(\n styles,\n 'spectrum-Dropdown',\n {\n 'is-invalid': validationState === 'invalid' && !isDisabled,\n 'is-disabled': isDisabled,\n 'spectrum-Dropdown--quiet': isQuiet\n }\n )\n }>\n <HiddenSelect\n autoComplete={autoComplete}\n isDisabled={isDisabled}\n state={state}\n triggerRef={unwrappedTriggerRef}\n label={label}\n name={name} />\n <PressResponder {...mergeProps(hoverProps, triggerProps)}>\n <FieldButton\n ref={triggerRef}\n isActive={state.isOpen}\n isQuiet={isQuiet}\n isDisabled={isDisabled}\n validationState={validationState}\n autoFocus={autoFocus}\n UNSAFE_className={classNames(styles, 'spectrum-Dropdown-trigger', {'is-hovered': isHovered})}>\n <SlotProvider\n slots={{\n icon: {UNSAFE_className: classNames(styles, 'spectrum-Icon'), size: 'S'},\n text: {\n ...valueProps,\n UNSAFE_className: classNames(\n styles,\n 'spectrum-Dropdown-label',\n {'is-placeholder': !state.selectedItem}\n )\n },\n description: {\n isHidden: true\n }\n }}>\n {contents}\n </SlotProvider>\n {isLoadingInitial &&\n <ProgressCircle\n id={progressCircleId}\n isIndeterminate\n size=\"S\"\n aria-label={stringFormatter.format('loading')}\n UNSAFE_className={classNames(styles, 'spectrum-Dropdown-progressCircle')} />\n }\n {validationState === 'invalid' && !isLoadingInitial && !isDisabled &&\n <AlertMedium UNSAFE_className={classNames(styles, 'spectrum-Dropdown-invalidIcon')} />\n }\n <ChevronDownMedium UNSAFE_className={classNames(styles, 'spectrum-Dropdown-chevron')} />\n </FieldButton>\n </PressResponder>\n {state.collection.size === 0 ? null : overlay}\n </div>\n );\n\n let wrapperClassName = label ? classNames(\n styles,\n 'spectrum-Field',\n {\n 'spectrum-Dropdown-fieldWrapper--quiet': isQuiet,\n 'spectrum-Dropdown-fieldWrapper--positionSide': labelPosition === 'side'\n }\n ) : '';\n\n return (\n <Field\n {...props}\n ref={domRef}\n wrapperClassName={wrapperClassName}\n labelProps={labelProps}\n descriptionProps={descriptionProps}\n errorMessageProps={errorMessageProps}\n showErrorIcon={false}\n includeNecessityIndicatorInAccessibilityName\n elementType=\"span\">\n {picker}\n </Field>\n );\n}\n\n/**\n * Pickers allow users to choose a single option from a collapsible list of options when space is limited.\n */\n// forwardRef doesn't support generic parameters, so cast the result to the correct type\n// https://stackoverflow.com/questions/58469229/react-with-typescript-generics-while-using-react-forwardref\nconst _Picker = React.forwardRef(Picker) as <T>(props: SpectrumPickerProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReactElement;\nexport {_Picker as Picker};\n","const _temp0 = require(\"./ar-AE.json\");\nconst _temp1 = require(\"./bg-BG.json\");\nconst _temp2 = require(\"./cs-CZ.json\");\nconst _temp3 = require(\"./da-DK.json\");\nconst _temp4 = require(\"./de-DE.json\");\nconst _temp5 = require(\"./el-GR.json\");\nconst _temp6 = require(\"./en-US.json\");\nconst _temp7 = require(\"./es-ES.json\");\nconst _temp8 = require(\"./et-EE.json\");\nconst _temp9 = require(\"./fi-FI.json\");\nconst _temp10 = require(\"./fr-FR.json\");\nconst _temp11 = require(\"./he-IL.json\");\nconst _temp12 = require(\"./hr-HR.json\");\nconst _temp13 = require(\"./hu-HU.json\");\nconst _temp14 = require(\"./it-IT.json\");\nconst _temp15 = require(\"./ja-JP.json\");\nconst _temp16 = require(\"./ko-KR.json\");\nconst _temp17 = require(\"./lt-LT.json\");\nconst _temp18 = require(\"./lv-LV.json\");\nconst _temp19 = require(\"./nb-NO.json\");\nconst _temp20 = require(\"./nl-NL.json\");\nconst _temp21 = require(\"./pl-PL.json\");\nconst _temp22 = require(\"./pt-BR.json\");\nconst _temp23 = require(\"./pt-PT.json\");\nconst _temp24 = require(\"./ro-RO.json\");\nconst _temp25 = require(\"./ru-RU.json\");\nconst _temp26 = require(\"./sk-SK.json\");\nconst _temp27 = require(\"./sl-SI.json\");\nconst _temp28 = require(\"./sr-SP.json\");\nconst _temp29 = require(\"./sv-SE.json\");\nconst _temp30 = require(\"./tr-TR.json\");\nconst _temp31 = require(\"./uk-UA.json\");\nconst _temp32 = require(\"./zh-CN.json\");\nconst _temp33 = require(\"./zh-TW.json\");\nmodule.exports = {\n \"ar-AE\": _temp0,\n \"bg-BG\": _temp1,\n \"cs-CZ\": _temp2,\n \"da-DK\": _temp3,\n \"de-DE\": _temp4,\n \"el-GR\": _temp5,\n \"en-US\": _temp6,\n \"es-ES\": _temp7,\n \"et-EE\": _temp8,\n \"fi-FI\": _temp9,\n \"fr-FR\": _temp10,\n \"he-IL\": _temp11,\n \"hr-HR\": _temp12,\n \"hu-HU\": _temp13,\n \"it-IT\": _temp14,\n \"ja-JP\": _temp15,\n \"ko-KR\": _temp16,\n \"lt-LT\": _temp17,\n \"lv-LV\": _temp18,\n \"nb-NO\": _temp19,\n \"nl-NL\": _temp20,\n \"pl-PL\": _temp21,\n \"pt-BR\": _temp22,\n \"pt-PT\": _temp23,\n \"ro-RO\": _temp24,\n \"ru-RU\": _temp25,\n \"sk-SK\": _temp26,\n \"sl-SI\": _temp27,\n \"sr-SP\": _temp28,\n \"sv-SE\": _temp29,\n \"tr-TR\": _temp30,\n \"uk-UA\": _temp31,\n \"zh-CN\": _temp32,\n \"zh-TW\": _temp33\n}","{\n \"loading\": \"جارٍ التحميل...\",\n \"placeholder\": \"حدد خيارًا...\"\n}\n","{\n \"loading\": \"Зареждане...\",\n \"placeholder\": \"Изберете опция\"\n}\n","{\n \"loading\": \"Načítání...\",\n \"placeholder\": \"Vyberte vhodnou možnost...\"\n}\n","{\n \"loading\": \"Indlæser ...\",\n \"placeholder\": \"Vælg en mulighed ...\"\n}\n","{\n \"loading\": \"Laden...\",\n \"placeholder\": \"Option auswählen...\"\n}\n","{\n \"loading\": \"Φόρτωση...\",\n \"placeholder\": \"Επιλέξτε…\"\n}\n","{\n \"placeholder\": \"Select an option…\",\n \"loading\": \"Loading…\"\n}\n","{\n \"loading\": \"Cargando…\",\n \"placeholder\": \"Selecciona una de estas opciones...\"\n}\n","{\n \"loading\": \"Laadimine...\",\n \"placeholder\": \"Valige valikuline...\"\n}\n","{\n \"loading\": \"Ladataan…\",\n \"placeholder\": \"Valitse vaihtoehto...\"\n}\n","{\n \"loading\": \"Chargement...\",\n \"placeholder\": \"Sélectionnez une option...\"\n}\n","{\n \"loading\": \"טוען...\",\n \"placeholder\": \"בחר אפשרות...\"\n}\n","{\n \"loading\": \"Učitavam...\",\n \"placeholder\": \"Odaberite opciju\"\n}\n","{\n \"loading\": \"Betöltés folyamatban…\",\n \"placeholder\": \"Válasszon egy opciót…\"\n}\n","{\n \"loading\": \"Caricamento...\",\n \"placeholder\": \"Seleziona un’opzione...\"\n}\n","{\n \"loading\": \"読み込み中...\",\n \"placeholder\": \"オプションを選択...\"\n}\n","{\n \"loading\": \"로드 중\",\n \"placeholder\": \"선택 사항 선택\"\n}\n","{\n \"loading\": \"Įkeliama...\",\n \"placeholder\": \"Pasirinkite parinktį...\"\n}\n","{\n \"loading\": \"Notiek ielāde...\",\n \"placeholder\": \"Atlasiet opciju...\"\n}\n","{\n \"loading\": \"Laster inn ...\",\n \"placeholder\": \"Velg et alternativ...\"\n}\n","{\n \"loading\": \"Laden...\",\n \"placeholder\": \"Optie selecteren...\"\n}\n","{\n \"loading\": \"Ładowanie...\",\n \"placeholder\": \"Wybierz opcję...\"\n}\n","{\n \"loading\": \"Carregando...\",\n \"placeholder\": \"Selecione uma opção...\"\n}\n","{\n \"loading\": \"A carregar...\",\n \"placeholder\": \"Selecionar uma opção...\"\n}\n","{\n \"loading\": \"Se încarcă...\",\n \"placeholder\": \"Selectați o opțiune\"\n}\n","{\n \"loading\": \"Загрузка...\",\n \"placeholder\": \"Выбрать параметр...\"\n}\n","{\n \"loading\": \"Načítava sa...\",\n \"placeholder\": \"Vyberte možnosť...\"\n}\n","{\n \"loading\": \"Nalaganje...\",\n \"placeholder\": \"Izberite možnost\"\n}\n","{\n \"loading\": \"Učitavam...\",\n \"placeholder\": \"Izaberite opciju\"\n}\n","{\n \"loading\": \"Läser in...\",\n \"placeholder\": \"Välj ett alternativ...\"\n}\n","{\n \"loading\": \"Yükleniyor...\",\n \"placeholder\": \"Bir seçim yapın…\"\n}\n","{\n \"loading\": \"Завантаження…\",\n \"placeholder\": \"Виберіть опцію...\"\n}\n","{\n \"loading\": \"正在加载...\",\n \"placeholder\": \"选择一个选项...\"\n}\n","{\n \"loading\": \"正在載入\",\n \"placeholder\": \"選取一個選項\"\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"main.js.map"}
package/dist/module.js CHANGED
@@ -7,7 +7,7 @@ import {Field as $3toCD$Field} from "@react-spectrum/label";
7
7
  import {FieldButton as $3toCD$FieldButton} from "@react-spectrum/button";
8
8
  import {useSelect as $3toCD$useSelect, HiddenSelect as $3toCD$HiddenSelect} from "@react-aria/select";
9
9
  import {useListBoxLayout as $3toCD$useListBoxLayout, ListBoxBase as $3toCD$ListBoxBase} from "@react-spectrum/listbox";
10
- import {useResizeObserver as $3toCD$useResizeObserver, useLayoutEffect as $3toCD$useLayoutEffect, mergeProps as $3toCD$mergeProps} from "@react-aria/utils";
10
+ import {useId as $3toCD$useId, useResizeObserver as $3toCD$useResizeObserver, useLayoutEffect as $3toCD$useLayoutEffect, mergeProps as $3toCD$mergeProps} from "@react-aria/utils";
11
11
  import {Tray as $3toCD$Tray, Popover as $3toCD$Popover} from "@react-spectrum/overlays";
12
12
  import {useHover as $3toCD$useHover, PressResponder as $3toCD$PressResponder} from "@react-aria/interactions";
13
13
  import {ProgressCircle as $3toCD$ProgressCircle} from "@react-spectrum/progress";
@@ -406,20 +406,22 @@ function $51664a9007a3c6f9$var$Picker(props, ref) {
406
406
  let triggerRef = (0, $3toCD$useRef)();
407
407
  let unwrappedTriggerRef = (0, $3toCD$useUnwrapDOMRef)(triggerRef);
408
408
  let listboxRef = (0, $3toCD$useRef)();
409
+ let isLoadingInitial = props.isLoading && state.collection.size === 0;
410
+ let isLoadingMore = props.isLoading && state.collection.size > 0;
411
+ let progressCircleId = (0, $3toCD$useId)();
409
412
  // We create the listbox layout in Picker and pass it to ListBoxBase below
410
413
  // so that the layout information can be cached even while the listbox is not mounted.
411
414
  // We also use the layout as the keyboard delegate for type to select.
412
415
  let layout = (0, $3toCD$useListBoxLayout)(state);
413
416
  let { labelProps: labelProps , triggerProps: triggerProps , valueProps: valueProps , menuProps: menuProps , descriptionProps: descriptionProps , errorMessageProps: errorMessageProps } = (0, $3toCD$useSelect)({
414
417
  ...props,
418
+ "aria-describedby": isLoadingInitial ? progressCircleId : undefined,
415
419
  keyboardDelegate: layout
416
420
  }, state, unwrappedTriggerRef);
417
421
  let isMobile = (0, $3toCD$useIsMobileDevice)();
418
422
  let { hoverProps: hoverProps , isHovered: isHovered } = (0, $3toCD$useHover)({
419
423
  isDisabled: isDisabled
420
424
  });
421
- let isLoadingInitial = props.isLoading && state.collection.size === 0;
422
- let isLoadingMore = props.isLoading && state.collection.size > 0;
423
425
  // On small screen devices, the listbox is rendered in a tray, otherwise a popover.
424
426
  let listbox = /*#__PURE__*/ (0, $3toCD$react).createElement((0, $3toCD$ListBoxBase), {
425
427
  ...menuProps,
@@ -529,6 +531,7 @@ function $51664a9007a3c6f9$var$Picker(props, ref) {
529
531
  }
530
532
  }
531
533
  }, contents), isLoadingInitial && /*#__PURE__*/ (0, $3toCD$react).createElement((0, $3toCD$ProgressCircle), {
534
+ id: progressCircleId,
532
535
  isIndeterminate: true,
533
536
  size: "S",
534
537
  "aria-label": stringFormatter.format("loading"),
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C;ACZ1C;;;;;;;;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/picker/src/Picker.tsx","packages/@react-spectrum/picker/intl/*.js","packages/@react-spectrum/picker/intl/ar-AE.json","packages/@react-spectrum/picker/intl/bg-BG.json","packages/@react-spectrum/picker/intl/cs-CZ.json","packages/@react-spectrum/picker/intl/da-DK.json","packages/@react-spectrum/picker/intl/de-DE.json","packages/@react-spectrum/picker/intl/el-GR.json","packages/@react-spectrum/picker/intl/en-US.json","packages/@react-spectrum/picker/intl/es-ES.json","packages/@react-spectrum/picker/intl/et-EE.json","packages/@react-spectrum/picker/intl/fi-FI.json","packages/@react-spectrum/picker/intl/fr-FR.json","packages/@react-spectrum/picker/intl/he-IL.json","packages/@react-spectrum/picker/intl/hr-HR.json","packages/@react-spectrum/picker/intl/hu-HU.json","packages/@react-spectrum/picker/intl/it-IT.json","packages/@react-spectrum/picker/intl/ja-JP.json","packages/@react-spectrum/picker/intl/ko-KR.json","packages/@react-spectrum/picker/intl/lt-LT.json","packages/@react-spectrum/picker/intl/lv-LV.json","packages/@react-spectrum/picker/intl/nb-NO.json","packages/@react-spectrum/picker/intl/nl-NL.json","packages/@react-spectrum/picker/intl/pl-PL.json","packages/@react-spectrum/picker/intl/pt-BR.json","packages/@react-spectrum/picker/intl/pt-PT.json","packages/@react-spectrum/picker/intl/ro-RO.json","packages/@react-spectrum/picker/intl/ru-RU.json","packages/@react-spectrum/picker/intl/sk-SK.json","packages/@react-spectrum/picker/intl/sl-SI.json","packages/@react-spectrum/picker/intl/sr-SP.json","packages/@react-spectrum/picker/intl/sv-SE.json","packages/@react-spectrum/picker/intl/tr-TR.json","packages/@react-spectrum/picker/intl/uk-UA.json","packages/@react-spectrum/picker/intl/zh-CN.json","packages/@react-spectrum/picker/intl/zh-TW.json","packages/@adobe/spectrum-css-temp/components/dropdown/vars.css"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/// <reference types=\"css-module-types\" />\n\nexport {Picker} from './Picker';\nexport {Item, Section} from '@react-stately/collections';\nexport type {SpectrumPickerProps} from '@react-types/select';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport AlertMedium from '@spectrum-icons/ui/AlertMedium';\nimport ChevronDownMedium from '@spectrum-icons/ui/ChevronDownMedium';\nimport {\n classNames,\n dimensionValue,\n SlotProvider,\n useDOMRef,\n useIsMobileDevice,\n useSlotProps,\n useUnwrapDOMRef\n} from '@react-spectrum/utils';\nimport {DOMRef, DOMRefValue, FocusableRefValue, LabelPosition} from '@react-types/shared';\nimport {Field} from '@react-spectrum/label';\nimport {FieldButton} from '@react-spectrum/button';\nimport {HiddenSelect, useSelect} from '@react-aria/select';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {ListBoxBase, useListBoxLayout} from '@react-spectrum/listbox';\nimport {mergeProps, useLayoutEffect, useResizeObserver} from '@react-aria/utils';\nimport {Popover, Tray} from '@react-spectrum/overlays';\nimport {PressResponder, useHover} from '@react-aria/interactions';\nimport {ProgressCircle} from '@react-spectrum/progress';\nimport React, {ReactElement, useCallback, useRef, useState} from 'react';\nimport {SpectrumPickerProps} from '@react-types/select';\nimport styles from '@adobe/spectrum-css-temp/components/dropdown/vars.css';\nimport {Text} from '@react-spectrum/text';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useProvider, useProviderProps} from '@react-spectrum/provider';\nimport {useSelectState} from '@react-stately/select';\n\nfunction Picker<T extends object>(props: SpectrumPickerProps<T>, ref: DOMRef<HTMLDivElement>) {\n props = useSlotProps(props, 'picker');\n props = useProviderProps(props);\n let stringFormatter = useLocalizedStringFormatter(intlMessages);\n let {\n autoComplete,\n isDisabled,\n direction = 'bottom',\n align = 'start',\n shouldFlip = true,\n placeholder = stringFormatter.format('placeholder'),\n validationState,\n isQuiet,\n label,\n labelPosition = 'top' as LabelPosition,\n menuWidth,\n name,\n autoFocus\n } = props;\n\n let state = useSelectState(props);\n let domRef = useDOMRef(ref);\n\n let popoverRef = useRef<DOMRefValue<HTMLDivElement>>();\n let triggerRef = useRef<FocusableRefValue<HTMLElement>>();\n let unwrappedTriggerRef = useUnwrapDOMRef(triggerRef);\n let listboxRef = useRef();\n\n // We create the listbox layout in Picker and pass it to ListBoxBase below\n // so that the layout information can be cached even while the listbox is not mounted.\n // We also use the layout as the keyboard delegate for type to select.\n let layout = useListBoxLayout(state);\n let {labelProps, triggerProps, valueProps, menuProps, descriptionProps, errorMessageProps} = useSelect({\n ...props,\n keyboardDelegate: layout\n }, state, unwrappedTriggerRef);\n\n let isMobile = useIsMobileDevice();\n let {hoverProps, isHovered} = useHover({isDisabled});\n\n let isLoadingInitial = props.isLoading && state.collection.size === 0;\n let isLoadingMore = props.isLoading && state.collection.size > 0;\n\n // On small screen devices, the listbox is rendered in a tray, otherwise a popover.\n let listbox = (\n <ListBoxBase\n {...menuProps}\n ref={listboxRef}\n disallowEmptySelection\n autoFocus={state.focusStrategy || true}\n shouldSelectOnPressUp\n focusOnPointerEnter\n layout={layout}\n state={state}\n width={isMobile ? '100%' : undefined}\n // Set max height: inherit so Tray scrolling works\n UNSAFE_style={{maxHeight: 'inherit'}}\n isLoading={isLoadingMore}\n onLoadMore={props.onLoadMore} />\n );\n\n // Measure the width of the button to inform the width of the menu (below).\n let [buttonWidth, setButtonWidth] = useState(null);\n let {scale} = useProvider();\n\n let onResize = useCallback(() => {\n if (!isMobile && unwrappedTriggerRef.current) {\n let width = unwrappedTriggerRef.current.offsetWidth;\n setButtonWidth(width);\n }\n }, [unwrappedTriggerRef, setButtonWidth, isMobile]);\n\n useResizeObserver({\n ref: unwrappedTriggerRef,\n onResize: onResize\n });\n\n useLayoutEffect(onResize, [scale, state.selectedKey, onResize]);\n\n let overlay;\n if (isMobile) {\n overlay = (\n <Tray state={state}>\n {listbox}\n </Tray>\n );\n } else {\n // If quiet, use the default width, otherwise match the width of the button. This can be overridden by the menuWidth prop.\n // Always have a minimum width of the button width. When quiet, there is an extra offset to add.\n // Not using style props for this because they don't support `calc`.\n let width = isQuiet ? null : buttonWidth;\n let style = {\n width: menuWidth ? dimensionValue(menuWidth) : width,\n minWidth: isQuiet ? `calc(${buttonWidth}px + calc(2 * var(--spectrum-dropdown-quiet-offset)))` : buttonWidth\n };\n\n overlay = (\n <Popover\n UNSAFE_style={style}\n UNSAFE_className={classNames(styles, 'spectrum-Dropdown-popover', {'spectrum-Dropdown-popover--quiet': isQuiet})}\n ref={popoverRef}\n placement={`${direction} ${align}`}\n shouldFlip={shouldFlip}\n hideArrow\n state={state}\n triggerRef={unwrappedTriggerRef}\n scrollRef={listboxRef}>\n {listbox}\n </Popover>\n );\n }\n\n let contents = state.selectedItem ? state.selectedItem.rendered : placeholder;\n if (typeof contents === 'string') {\n contents = <Text>{contents}</Text>;\n }\n\n let picker = (\n <div\n className={\n classNames(\n styles,\n 'spectrum-Dropdown',\n {\n 'is-invalid': validationState === 'invalid' && !isDisabled,\n 'is-disabled': isDisabled,\n 'spectrum-Dropdown--quiet': isQuiet\n }\n )\n }>\n <HiddenSelect\n autoComplete={autoComplete}\n isDisabled={isDisabled}\n state={state}\n triggerRef={unwrappedTriggerRef}\n label={label}\n name={name} />\n <PressResponder {...mergeProps(hoverProps, triggerProps)}>\n <FieldButton\n ref={triggerRef}\n isActive={state.isOpen}\n isQuiet={isQuiet}\n isDisabled={isDisabled}\n validationState={validationState}\n autoFocus={autoFocus}\n UNSAFE_className={classNames(styles, 'spectrum-Dropdown-trigger', {'is-hovered': isHovered})}>\n <SlotProvider\n slots={{\n icon: {UNSAFE_className: classNames(styles, 'spectrum-Icon'), size: 'S'},\n text: {\n ...valueProps,\n UNSAFE_className: classNames(\n styles,\n 'spectrum-Dropdown-label',\n {'is-placeholder': !state.selectedItem}\n )\n },\n description: {\n isHidden: true\n }\n }}>\n {contents}\n </SlotProvider>\n {isLoadingInitial &&\n <ProgressCircle\n isIndeterminate\n size=\"S\"\n aria-label={stringFormatter.format('loading')}\n UNSAFE_className={classNames(styles, 'spectrum-Dropdown-progressCircle')} />\n }\n {validationState === 'invalid' && !isLoadingInitial && !isDisabled &&\n <AlertMedium UNSAFE_className={classNames(styles, 'spectrum-Dropdown-invalidIcon')} />\n }\n <ChevronDownMedium UNSAFE_className={classNames(styles, 'spectrum-Dropdown-chevron')} />\n </FieldButton>\n </PressResponder>\n {state.collection.size === 0 ? null : overlay}\n </div>\n );\n\n let wrapperClassName = label ? classNames(\n styles,\n 'spectrum-Field',\n {\n 'spectrum-Dropdown-fieldWrapper--quiet': isQuiet,\n 'spectrum-Dropdown-fieldWrapper--positionSide': labelPosition === 'side'\n }\n ) : '';\n\n return (\n <Field\n {...props}\n ref={domRef}\n wrapperClassName={wrapperClassName}\n labelProps={labelProps}\n descriptionProps={descriptionProps}\n errorMessageProps={errorMessageProps}\n showErrorIcon={false}\n includeNecessityIndicatorInAccessibilityName\n elementType=\"span\">\n {picker}\n </Field>\n );\n}\n\n/**\n * Pickers allow users to choose a single option from a collapsible list of options when space is limited.\n */\n// forwardRef doesn't support generic parameters, so cast the result to the correct type\n// https://stackoverflow.com/questions/58469229/react-with-typescript-generics-while-using-react-forwardref\nconst _Picker = React.forwardRef(Picker) as <T>(props: SpectrumPickerProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReactElement;\nexport {_Picker as Picker};\n","const _temp0 = require(\"./ar-AE.json\");\nconst _temp1 = require(\"./bg-BG.json\");\nconst _temp2 = require(\"./cs-CZ.json\");\nconst _temp3 = require(\"./da-DK.json\");\nconst _temp4 = require(\"./de-DE.json\");\nconst _temp5 = require(\"./el-GR.json\");\nconst _temp6 = require(\"./en-US.json\");\nconst _temp7 = require(\"./es-ES.json\");\nconst _temp8 = require(\"./et-EE.json\");\nconst _temp9 = require(\"./fi-FI.json\");\nconst _temp10 = require(\"./fr-FR.json\");\nconst _temp11 = require(\"./he-IL.json\");\nconst _temp12 = require(\"./hr-HR.json\");\nconst _temp13 = require(\"./hu-HU.json\");\nconst _temp14 = require(\"./it-IT.json\");\nconst _temp15 = require(\"./ja-JP.json\");\nconst _temp16 = require(\"./ko-KR.json\");\nconst _temp17 = require(\"./lt-LT.json\");\nconst _temp18 = require(\"./lv-LV.json\");\nconst _temp19 = require(\"./nb-NO.json\");\nconst _temp20 = require(\"./nl-NL.json\");\nconst _temp21 = require(\"./pl-PL.json\");\nconst _temp22 = require(\"./pt-BR.json\");\nconst _temp23 = require(\"./pt-PT.json\");\nconst _temp24 = require(\"./ro-RO.json\");\nconst _temp25 = require(\"./ru-RU.json\");\nconst _temp26 = require(\"./sk-SK.json\");\nconst _temp27 = require(\"./sl-SI.json\");\nconst _temp28 = require(\"./sr-SP.json\");\nconst _temp29 = require(\"./sv-SE.json\");\nconst _temp30 = require(\"./tr-TR.json\");\nconst _temp31 = require(\"./uk-UA.json\");\nconst _temp32 = require(\"./zh-CN.json\");\nconst _temp33 = require(\"./zh-TW.json\");\nmodule.exports = {\n \"ar-AE\": _temp0,\n \"bg-BG\": _temp1,\n \"cs-CZ\": _temp2,\n \"da-DK\": _temp3,\n \"de-DE\": _temp4,\n \"el-GR\": _temp5,\n \"en-US\": _temp6,\n \"es-ES\": _temp7,\n \"et-EE\": _temp8,\n \"fi-FI\": _temp9,\n \"fr-FR\": _temp10,\n \"he-IL\": _temp11,\n \"hr-HR\": _temp12,\n \"hu-HU\": _temp13,\n \"it-IT\": _temp14,\n \"ja-JP\": _temp15,\n \"ko-KR\": _temp16,\n \"lt-LT\": _temp17,\n \"lv-LV\": _temp18,\n \"nb-NO\": _temp19,\n \"nl-NL\": _temp20,\n \"pl-PL\": _temp21,\n \"pt-BR\": _temp22,\n \"pt-PT\": _temp23,\n \"ro-RO\": _temp24,\n \"ru-RU\": _temp25,\n \"sk-SK\": _temp26,\n \"sl-SI\": _temp27,\n \"sr-SP\": _temp28,\n \"sv-SE\": _temp29,\n \"tr-TR\": _temp30,\n \"uk-UA\": _temp31,\n \"zh-CN\": _temp32,\n \"zh-TW\": _temp33\n}","{\n \"loading\": \"جارٍ التحميل...\",\n \"placeholder\": \"حدد خيارًا...\"\n}\n","{\n \"loading\": \"Зареждане...\",\n \"placeholder\": \"Изберете опция\"\n}\n","{\n \"loading\": \"Načítání...\",\n \"placeholder\": \"Vyberte vhodnou možnost...\"\n}\n","{\n \"loading\": \"Indlæser ...\",\n \"placeholder\": \"Vælg en mulighed ...\"\n}\n","{\n \"loading\": \"Laden...\",\n \"placeholder\": \"Option auswählen...\"\n}\n","{\n \"loading\": \"Φόρτωση...\",\n \"placeholder\": \"Επιλέξτε…\"\n}\n","{\n \"placeholder\": \"Select an option…\",\n \"loading\": \"Loading…\"\n}\n","{\n \"loading\": \"Cargando…\",\n \"placeholder\": \"Selecciona una de estas opciones...\"\n}\n","{\n \"loading\": \"Laadimine...\",\n \"placeholder\": \"Valige valikuline...\"\n}\n","{\n \"loading\": \"Ladataan…\",\n \"placeholder\": \"Valitse vaihtoehto...\"\n}\n","{\n \"loading\": \"Chargement...\",\n \"placeholder\": \"Sélectionnez une option...\"\n}\n","{\n \"loading\": \"טוען...\",\n \"placeholder\": \"בחר אפשרות...\"\n}\n","{\n \"loading\": \"Učitavam...\",\n \"placeholder\": \"Odaberite opciju\"\n}\n","{\n \"loading\": \"Betöltés folyamatban…\",\n \"placeholder\": \"Válasszon egy opciót…\"\n}\n","{\n \"loading\": \"Caricamento...\",\n \"placeholder\": \"Seleziona un’opzione...\"\n}\n","{\n \"loading\": \"読み込み中...\",\n \"placeholder\": \"オプションを選択...\"\n}\n","{\n \"loading\": \"로드 중\",\n \"placeholder\": \"선택 사항 선택\"\n}\n","{\n \"loading\": \"Įkeliama...\",\n \"placeholder\": \"Pasirinkite parinktį...\"\n}\n","{\n \"loading\": \"Notiek ielāde...\",\n \"placeholder\": \"Atlasiet opciju...\"\n}\n","{\n \"loading\": \"Laster inn ...\",\n \"placeholder\": \"Velg et alternativ...\"\n}\n","{\n \"loading\": \"Laden...\",\n \"placeholder\": \"Optie selecteren...\"\n}\n","{\n \"loading\": \"Ładowanie...\",\n \"placeholder\": \"Wybierz opcję...\"\n}\n","{\n \"loading\": \"Carregando...\",\n \"placeholder\": \"Selecione uma opção...\"\n}\n","{\n \"loading\": \"A carregar...\",\n \"placeholder\": \"Selecionar uma opção...\"\n}\n","{\n \"loading\": \"Se încarcă...\",\n \"placeholder\": \"Selectați o opțiune\"\n}\n","{\n \"loading\": \"Загрузка...\",\n \"placeholder\": \"Выбрать параметр...\"\n}\n","{\n \"loading\": \"Načítava sa...\",\n \"placeholder\": \"Vyberte možnosť...\"\n}\n","{\n \"loading\": \"Nalaganje...\",\n \"placeholder\": \"Izberite možnost\"\n}\n","{\n \"loading\": \"Učitavam...\",\n \"placeholder\": \"Izaberite opciju\"\n}\n","{\n \"loading\": \"Läser in...\",\n \"placeholder\": \"Välj ett alternativ...\"\n}\n","{\n \"loading\": \"Yükleniyor...\",\n \"placeholder\": \"Bir seçim yapın…\"\n}\n","{\n \"loading\": \"Завантаження…\",\n \"placeholder\": \"Виберіть опцію...\"\n}\n","{\n \"loading\": \"正在加载...\",\n \"placeholder\": \"选择一个选项...\"\n}\n","{\n \"loading\": \"正在載入\",\n \"placeholder\": \"選取一個選項\"\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"module.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C;ACZ1C;;;;;;;;;;CAUC,GAED;;;;;;;;AEZA,4BAAiB;IAAG,WAAW,CAAC,eAAe,CAAC;IAC9C,eAAe,CAAC,aAAa,CAAC;AAChC;;ADFA;;AEAA,4BAAiB;IAAG,WAAW,CAAC,YAAY,CAAC;IAC3C,eAAe,CAAC,cAAc,CAAC;AACjC;;;;ACFA,4BAAiB;IAAG,WAAW,CAAC,WAAW,CAAC;IAC1C,eAAe,CAAC,0BAA0B,CAAC;AAC7C;;;;ACFA,4BAAiB;IAAG,WAAW,CAAC,YAAY,CAAC;IAC3C,eAAe,CAAC,oBAAoB,CAAC;AACvC;;;;ACFA,4BAAiB;IAAG,WAAW,CAAC,QAAQ,CAAC;IACvC,eAAe,CAAC,mBAAmB,CAAC;AACtC;;;;ACFA,4BAAiB;IAAG,WAAW,CAAC,UAAU,CAAC;IACzC,eAAe,CAAC,SAAS,CAAC;AAC5B;;;;ACFA,4BAAiB;IAAG,eAAe,CAAC,iBAAiB,CAAC;IACpD,WAAW,CAAC,QAAQ,CAAC;AACvB;;;;ACFA,4BAAiB;IAAG,WAAW,CAAC,SAAS,CAAC;IACxC,eAAe,CAAC,mCAAmC,CAAC;AACtD;;;;ACFA,4BAAiB;IAAG,WAAW,CAAC,YAAY,CAAC;IAC3C,eAAe,CAAC,oBAAoB,CAAC;AACvC;;;;ACFA,4BAAiB;IAAG,WAAW,CAAC,SAAS,CAAC;IACxC,eAAe,CAAC,qBAAqB,CAAC;AACxC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tC,CAAA,GAAA,yDAAM,OAAD,GACL,kBACA;QACE,yCAAyC;QACzC,gDAAgD,kBAAkB;IACpE,KACE,EAAE;IAEN,qBACE,gCAAC,CAAA,GAAA,YAAK,AAAD;QACF,GAAG,KAAK;QACT,KAAK;QACL,kBAAkB;QAClB,YAAY;QACZ,kBAAkB;QAClB,mBAAmB;QACnB,eAAe,KAAK;QACpB,8CAAA,IAA4C;QAC5C,aAAY;OACX;AAGP;AAEA;;CAEC,GACD,wFAAwF;AACxF,2GAA2G;AAC3G,MAAM,0DAAU,CAAA,GAAA,YAAK,AAAD,EAAE,UAAU,CAAC;;ADjPjC","sources":["packages/@react-spectrum/picker/src/index.ts","packages/@react-spectrum/picker/src/Picker.tsx","packages/@react-spectrum/picker/intl/*.js","packages/@react-spectrum/picker/intl/ar-AE.json","packages/@react-spectrum/picker/intl/bg-BG.json","packages/@react-spectrum/picker/intl/cs-CZ.json","packages/@react-spectrum/picker/intl/da-DK.json","packages/@react-spectrum/picker/intl/de-DE.json","packages/@react-spectrum/picker/intl/el-GR.json","packages/@react-spectrum/picker/intl/en-US.json","packages/@react-spectrum/picker/intl/es-ES.json","packages/@react-spectrum/picker/intl/et-EE.json","packages/@react-spectrum/picker/intl/fi-FI.json","packages/@react-spectrum/picker/intl/fr-FR.json","packages/@react-spectrum/picker/intl/he-IL.json","packages/@react-spectrum/picker/intl/hr-HR.json","packages/@react-spectrum/picker/intl/hu-HU.json","packages/@react-spectrum/picker/intl/it-IT.json","packages/@react-spectrum/picker/intl/ja-JP.json","packages/@react-spectrum/picker/intl/ko-KR.json","packages/@react-spectrum/picker/intl/lt-LT.json","packages/@react-spectrum/picker/intl/lv-LV.json","packages/@react-spectrum/picker/intl/nb-NO.json","packages/@react-spectrum/picker/intl/nl-NL.json","packages/@react-spectrum/picker/intl/pl-PL.json","packages/@react-spectrum/picker/intl/pt-BR.json","packages/@react-spectrum/picker/intl/pt-PT.json","packages/@react-spectrum/picker/intl/ro-RO.json","packages/@react-spectrum/picker/intl/ru-RU.json","packages/@react-spectrum/picker/intl/sk-SK.json","packages/@react-spectrum/picker/intl/sl-SI.json","packages/@react-spectrum/picker/intl/sr-SP.json","packages/@react-spectrum/picker/intl/sv-SE.json","packages/@react-spectrum/picker/intl/tr-TR.json","packages/@react-spectrum/picker/intl/uk-UA.json","packages/@react-spectrum/picker/intl/zh-CN.json","packages/@react-spectrum/picker/intl/zh-TW.json","packages/@adobe/spectrum-css-temp/components/dropdown/vars.css"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/// <reference types=\"css-module-types\" />\n\nexport {Picker} from './Picker';\nexport {Item, Section} from '@react-stately/collections';\nexport type {SpectrumPickerProps} from '@react-types/select';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport AlertMedium from '@spectrum-icons/ui/AlertMedium';\nimport ChevronDownMedium from '@spectrum-icons/ui/ChevronDownMedium';\nimport {\n classNames,\n dimensionValue,\n SlotProvider,\n useDOMRef,\n useIsMobileDevice,\n useSlotProps,\n useUnwrapDOMRef\n} from '@react-spectrum/utils';\nimport {DOMRef, DOMRefValue, FocusableRefValue, LabelPosition} from '@react-types/shared';\nimport {Field} from '@react-spectrum/label';\nimport {FieldButton} from '@react-spectrum/button';\nimport {HiddenSelect, useSelect} from '@react-aria/select';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {ListBoxBase, useListBoxLayout} from '@react-spectrum/listbox';\nimport {mergeProps, useId, useLayoutEffect, useResizeObserver} from '@react-aria/utils';\nimport {Popover, Tray} from '@react-spectrum/overlays';\nimport {PressResponder, useHover} from '@react-aria/interactions';\nimport {ProgressCircle} from '@react-spectrum/progress';\nimport React, {ReactElement, useCallback, useRef, useState} from 'react';\nimport {SpectrumPickerProps} from '@react-types/select';\nimport styles from '@adobe/spectrum-css-temp/components/dropdown/vars.css';\nimport {Text} from '@react-spectrum/text';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useProvider, useProviderProps} from '@react-spectrum/provider';\nimport {useSelectState} from '@react-stately/select';\n\nfunction Picker<T extends object>(props: SpectrumPickerProps<T>, ref: DOMRef<HTMLDivElement>) {\n props = useSlotProps(props, 'picker');\n props = useProviderProps(props);\n let stringFormatter = useLocalizedStringFormatter(intlMessages);\n let {\n autoComplete,\n isDisabled,\n direction = 'bottom',\n align = 'start',\n shouldFlip = true,\n placeholder = stringFormatter.format('placeholder'),\n validationState,\n isQuiet,\n label,\n labelPosition = 'top' as LabelPosition,\n menuWidth,\n name,\n autoFocus\n } = props;\n\n let state = useSelectState(props);\n let domRef = useDOMRef(ref);\n\n let popoverRef = useRef<DOMRefValue<HTMLDivElement>>();\n let triggerRef = useRef<FocusableRefValue<HTMLElement>>();\n let unwrappedTriggerRef = useUnwrapDOMRef(triggerRef);\n let listboxRef = useRef();\n\n let isLoadingInitial = props.isLoading && state.collection.size === 0;\n let isLoadingMore = props.isLoading && state.collection.size > 0;\n let progressCircleId = useId();\n\n // We create the listbox layout in Picker and pass it to ListBoxBase below\n // so that the layout information can be cached even while the listbox is not mounted.\n // We also use the layout as the keyboard delegate for type to select.\n let layout = useListBoxLayout(state);\n let {labelProps, triggerProps, valueProps, menuProps, descriptionProps, errorMessageProps} = useSelect({\n ...props,\n 'aria-describedby': (isLoadingInitial ? progressCircleId : undefined),\n keyboardDelegate: layout\n }, state, unwrappedTriggerRef);\n\n let isMobile = useIsMobileDevice();\n let {hoverProps, isHovered} = useHover({isDisabled});\n\n // On small screen devices, the listbox is rendered in a tray, otherwise a popover.\n let listbox = (\n <ListBoxBase\n {...menuProps}\n ref={listboxRef}\n disallowEmptySelection\n autoFocus={state.focusStrategy || true}\n shouldSelectOnPressUp\n focusOnPointerEnter\n layout={layout}\n state={state}\n width={isMobile ? '100%' : undefined}\n // Set max height: inherit so Tray scrolling works\n UNSAFE_style={{maxHeight: 'inherit'}}\n isLoading={isLoadingMore}\n onLoadMore={props.onLoadMore} />\n );\n\n // Measure the width of the button to inform the width of the menu (below).\n let [buttonWidth, setButtonWidth] = useState(null);\n let {scale} = useProvider();\n\n let onResize = useCallback(() => {\n if (!isMobile && unwrappedTriggerRef.current) {\n let width = unwrappedTriggerRef.current.offsetWidth;\n setButtonWidth(width);\n }\n }, [unwrappedTriggerRef, setButtonWidth, isMobile]);\n\n useResizeObserver({\n ref: unwrappedTriggerRef,\n onResize: onResize\n });\n\n useLayoutEffect(onResize, [scale, state.selectedKey, onResize]);\n\n let overlay;\n if (isMobile) {\n overlay = (\n <Tray state={state}>\n {listbox}\n </Tray>\n );\n } else {\n // If quiet, use the default width, otherwise match the width of the button. This can be overridden by the menuWidth prop.\n // Always have a minimum width of the button width. When quiet, there is an extra offset to add.\n // Not using style props for this because they don't support `calc`.\n let width = isQuiet ? null : buttonWidth;\n let style = {\n width: menuWidth ? dimensionValue(menuWidth) : width,\n minWidth: isQuiet ? `calc(${buttonWidth}px + calc(2 * var(--spectrum-dropdown-quiet-offset)))` : buttonWidth\n };\n\n overlay = (\n <Popover\n UNSAFE_style={style}\n UNSAFE_className={classNames(styles, 'spectrum-Dropdown-popover', {'spectrum-Dropdown-popover--quiet': isQuiet})}\n ref={popoverRef}\n placement={`${direction} ${align}`}\n shouldFlip={shouldFlip}\n hideArrow\n state={state}\n triggerRef={unwrappedTriggerRef}\n scrollRef={listboxRef}>\n {listbox}\n </Popover>\n );\n }\n\n let contents = state.selectedItem ? state.selectedItem.rendered : placeholder;\n if (typeof contents === 'string') {\n contents = <Text>{contents}</Text>;\n }\n\n let picker = (\n <div\n className={\n classNames(\n styles,\n 'spectrum-Dropdown',\n {\n 'is-invalid': validationState === 'invalid' && !isDisabled,\n 'is-disabled': isDisabled,\n 'spectrum-Dropdown--quiet': isQuiet\n }\n )\n }>\n <HiddenSelect\n autoComplete={autoComplete}\n isDisabled={isDisabled}\n state={state}\n triggerRef={unwrappedTriggerRef}\n label={label}\n name={name} />\n <PressResponder {...mergeProps(hoverProps, triggerProps)}>\n <FieldButton\n ref={triggerRef}\n isActive={state.isOpen}\n isQuiet={isQuiet}\n isDisabled={isDisabled}\n validationState={validationState}\n autoFocus={autoFocus}\n UNSAFE_className={classNames(styles, 'spectrum-Dropdown-trigger', {'is-hovered': isHovered})}>\n <SlotProvider\n slots={{\n icon: {UNSAFE_className: classNames(styles, 'spectrum-Icon'), size: 'S'},\n text: {\n ...valueProps,\n UNSAFE_className: classNames(\n styles,\n 'spectrum-Dropdown-label',\n {'is-placeholder': !state.selectedItem}\n )\n },\n description: {\n isHidden: true\n }\n }}>\n {contents}\n </SlotProvider>\n {isLoadingInitial &&\n <ProgressCircle\n id={progressCircleId}\n isIndeterminate\n size=\"S\"\n aria-label={stringFormatter.format('loading')}\n UNSAFE_className={classNames(styles, 'spectrum-Dropdown-progressCircle')} />\n }\n {validationState === 'invalid' && !isLoadingInitial && !isDisabled &&\n <AlertMedium UNSAFE_className={classNames(styles, 'spectrum-Dropdown-invalidIcon')} />\n }\n <ChevronDownMedium UNSAFE_className={classNames(styles, 'spectrum-Dropdown-chevron')} />\n </FieldButton>\n </PressResponder>\n {state.collection.size === 0 ? null : overlay}\n </div>\n );\n\n let wrapperClassName = label ? classNames(\n styles,\n 'spectrum-Field',\n {\n 'spectrum-Dropdown-fieldWrapper--quiet': isQuiet,\n 'spectrum-Dropdown-fieldWrapper--positionSide': labelPosition === 'side'\n }\n ) : '';\n\n return (\n <Field\n {...props}\n ref={domRef}\n wrapperClassName={wrapperClassName}\n labelProps={labelProps}\n descriptionProps={descriptionProps}\n errorMessageProps={errorMessageProps}\n showErrorIcon={false}\n includeNecessityIndicatorInAccessibilityName\n elementType=\"span\">\n {picker}\n </Field>\n );\n}\n\n/**\n * Pickers allow users to choose a single option from a collapsible list of options when space is limited.\n */\n// forwardRef doesn't support generic parameters, so cast the result to the correct type\n// https://stackoverflow.com/questions/58469229/react-with-typescript-generics-while-using-react-forwardref\nconst _Picker = React.forwardRef(Picker) as <T>(props: SpectrumPickerProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReactElement;\nexport {_Picker as Picker};\n","const _temp0 = require(\"./ar-AE.json\");\nconst _temp1 = require(\"./bg-BG.json\");\nconst _temp2 = require(\"./cs-CZ.json\");\nconst _temp3 = require(\"./da-DK.json\");\nconst _temp4 = require(\"./de-DE.json\");\nconst _temp5 = require(\"./el-GR.json\");\nconst _temp6 = require(\"./en-US.json\");\nconst _temp7 = require(\"./es-ES.json\");\nconst _temp8 = require(\"./et-EE.json\");\nconst _temp9 = require(\"./fi-FI.json\");\nconst _temp10 = require(\"./fr-FR.json\");\nconst _temp11 = require(\"./he-IL.json\");\nconst _temp12 = require(\"./hr-HR.json\");\nconst _temp13 = require(\"./hu-HU.json\");\nconst _temp14 = require(\"./it-IT.json\");\nconst _temp15 = require(\"./ja-JP.json\");\nconst _temp16 = require(\"./ko-KR.json\");\nconst _temp17 = require(\"./lt-LT.json\");\nconst _temp18 = require(\"./lv-LV.json\");\nconst _temp19 = require(\"./nb-NO.json\");\nconst _temp20 = require(\"./nl-NL.json\");\nconst _temp21 = require(\"./pl-PL.json\");\nconst _temp22 = require(\"./pt-BR.json\");\nconst _temp23 = require(\"./pt-PT.json\");\nconst _temp24 = require(\"./ro-RO.json\");\nconst _temp25 = require(\"./ru-RU.json\");\nconst _temp26 = require(\"./sk-SK.json\");\nconst _temp27 = require(\"./sl-SI.json\");\nconst _temp28 = require(\"./sr-SP.json\");\nconst _temp29 = require(\"./sv-SE.json\");\nconst _temp30 = require(\"./tr-TR.json\");\nconst _temp31 = require(\"./uk-UA.json\");\nconst _temp32 = require(\"./zh-CN.json\");\nconst _temp33 = require(\"./zh-TW.json\");\nmodule.exports = {\n \"ar-AE\": _temp0,\n \"bg-BG\": _temp1,\n \"cs-CZ\": _temp2,\n \"da-DK\": _temp3,\n \"de-DE\": _temp4,\n \"el-GR\": _temp5,\n \"en-US\": _temp6,\n \"es-ES\": _temp7,\n \"et-EE\": _temp8,\n \"fi-FI\": _temp9,\n \"fr-FR\": _temp10,\n \"he-IL\": _temp11,\n \"hr-HR\": _temp12,\n \"hu-HU\": _temp13,\n \"it-IT\": _temp14,\n \"ja-JP\": _temp15,\n \"ko-KR\": _temp16,\n \"lt-LT\": _temp17,\n \"lv-LV\": _temp18,\n \"nb-NO\": _temp19,\n \"nl-NL\": _temp20,\n \"pl-PL\": _temp21,\n \"pt-BR\": _temp22,\n \"pt-PT\": _temp23,\n \"ro-RO\": _temp24,\n \"ru-RU\": _temp25,\n \"sk-SK\": _temp26,\n \"sl-SI\": _temp27,\n \"sr-SP\": _temp28,\n \"sv-SE\": _temp29,\n \"tr-TR\": _temp30,\n \"uk-UA\": _temp31,\n \"zh-CN\": _temp32,\n \"zh-TW\": _temp33\n}","{\n \"loading\": \"جارٍ التحميل...\",\n \"placeholder\": \"حدد خيارًا...\"\n}\n","{\n \"loading\": \"Зареждане...\",\n \"placeholder\": \"Изберете опция\"\n}\n","{\n \"loading\": \"Načítání...\",\n \"placeholder\": \"Vyberte vhodnou možnost...\"\n}\n","{\n \"loading\": \"Indlæser ...\",\n \"placeholder\": \"Vælg en mulighed ...\"\n}\n","{\n \"loading\": \"Laden...\",\n \"placeholder\": \"Option auswählen...\"\n}\n","{\n \"loading\": \"Φόρτωση...\",\n \"placeholder\": \"Επιλέξτε…\"\n}\n","{\n \"placeholder\": \"Select an option…\",\n \"loading\": \"Loading…\"\n}\n","{\n \"loading\": \"Cargando…\",\n \"placeholder\": \"Selecciona una de estas opciones...\"\n}\n","{\n \"loading\": \"Laadimine...\",\n \"placeholder\": \"Valige valikuline...\"\n}\n","{\n \"loading\": \"Ladataan…\",\n \"placeholder\": \"Valitse vaihtoehto...\"\n}\n","{\n \"loading\": \"Chargement...\",\n \"placeholder\": \"Sélectionnez une option...\"\n}\n","{\n \"loading\": \"טוען...\",\n \"placeholder\": \"בחר אפשרות...\"\n}\n","{\n \"loading\": \"Učitavam...\",\n \"placeholder\": \"Odaberite opciju\"\n}\n","{\n \"loading\": \"Betöltés folyamatban…\",\n \"placeholder\": \"Válasszon egy opciót…\"\n}\n","{\n \"loading\": \"Caricamento...\",\n \"placeholder\": \"Seleziona un’opzione...\"\n}\n","{\n \"loading\": \"読み込み中...\",\n \"placeholder\": \"オプションを選択...\"\n}\n","{\n \"loading\": \"로드 중\",\n \"placeholder\": \"선택 사항 선택\"\n}\n","{\n \"loading\": \"Įkeliama...\",\n \"placeholder\": \"Pasirinkite parinktį...\"\n}\n","{\n \"loading\": \"Notiek ielāde...\",\n \"placeholder\": \"Atlasiet opciju...\"\n}\n","{\n \"loading\": \"Laster inn ...\",\n \"placeholder\": \"Velg et alternativ...\"\n}\n","{\n \"loading\": \"Laden...\",\n \"placeholder\": \"Optie selecteren...\"\n}\n","{\n \"loading\": \"Ładowanie...\",\n \"placeholder\": \"Wybierz opcję...\"\n}\n","{\n \"loading\": \"Carregando...\",\n \"placeholder\": \"Selecione uma opção...\"\n}\n","{\n \"loading\": \"A carregar...\",\n \"placeholder\": \"Selecionar uma opção...\"\n}\n","{\n \"loading\": \"Se încarcă...\",\n \"placeholder\": \"Selectați o opțiune\"\n}\n","{\n \"loading\": \"Загрузка...\",\n \"placeholder\": \"Выбрать параметр...\"\n}\n","{\n \"loading\": \"Načítava sa...\",\n \"placeholder\": \"Vyberte možnosť...\"\n}\n","{\n \"loading\": \"Nalaganje...\",\n \"placeholder\": \"Izberite možnost\"\n}\n","{\n \"loading\": \"Učitavam...\",\n \"placeholder\": \"Izaberite opciju\"\n}\n","{\n \"loading\": \"Läser in...\",\n \"placeholder\": \"Välj ett alternativ...\"\n}\n","{\n \"loading\": \"Yükleniyor...\",\n \"placeholder\": \"Bir seçim yapın…\"\n}\n","{\n \"loading\": \"Завантаження…\",\n \"placeholder\": \"Виберіть опцію...\"\n}\n","{\n \"loading\": \"正在加载...\",\n \"placeholder\": \"选择一个选项...\"\n}\n","{\n \"loading\": \"正在載入\",\n \"placeholder\": \"選取一個選項\"\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"module.js.map"}
@@ -1 +1 @@
1
- {"mappings":";;;AAuPA;;GAEG;AAGH,OAAA,MAAM;UAAiF,OAAO,cAAc,CAAC;MAAM,YAAY,CAAC;AC7OhI,OAAO,EAAC,IAAI,EAAE,OAAO,EAAC,MAAM,4BAA4B,CAAC;AACzD,YAAY,EAAC,mBAAmB,EAAC,MAAM,qBAAqB,CAAC","sources":["packages/@react-spectrum/picker/src/packages/@react-spectrum/picker/src/Picker.tsx","packages/@react-spectrum/picker/src/packages/@react-spectrum/picker/src/index.ts","packages/@react-spectrum/picker/src/index.ts"],"sourcesContent":[null,null,"/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/// <reference types=\"css-module-types\" />\n\nexport {Picker} from './Picker';\nexport {Item, Section} from '@react-stately/collections';\nexport type {SpectrumPickerProps} from '@react-types/select';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
1
+ {"mappings":";;;AA0PA;;GAEG;AAGH,OAAA,MAAM;UAAiF,OAAO,cAAc,CAAC;MAAM,YAAY,CAAC;AChPhI,OAAO,EAAC,IAAI,EAAE,OAAO,EAAC,MAAM,4BAA4B,CAAC;AACzD,YAAY,EAAC,mBAAmB,EAAC,MAAM,qBAAqB,CAAC","sources":["packages/@react-spectrum/picker/src/packages/@react-spectrum/picker/src/Picker.tsx","packages/@react-spectrum/picker/src/packages/@react-spectrum/picker/src/index.ts","packages/@react-spectrum/picker/src/index.ts"],"sourcesContent":[null,null,"/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/// <reference types=\"css-module-types\" />\n\nexport {Picker} from './Picker';\nexport {Item, Section} from '@react-stately/collections';\nexport type {SpectrumPickerProps} from '@react-types/select';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-spectrum/picker",
3
- "version": "3.10.3",
3
+ "version": "3.10.4-nightly.3937+600bff46f",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
@@ -36,29 +36,29 @@
36
36
  "url": "https://github.com/adobe/react-spectrum"
37
37
  },
38
38
  "dependencies": {
39
- "@react-aria/focus": "^3.12.1",
40
- "@react-aria/i18n": "^3.7.2",
41
- "@react-aria/interactions": "^3.15.1",
42
- "@react-aria/overlays": "^3.14.1",
43
- "@react-aria/select": "^3.10.1",
44
- "@react-aria/utils": "^3.17.0",
45
- "@react-spectrum/button": "^3.12.2",
46
- "@react-spectrum/label": "^3.12.1",
47
- "@react-spectrum/listbox": "^3.10.1",
48
- "@react-spectrum/overlays": "^5.1.1",
49
- "@react-spectrum/progress": "^3.5.1",
50
- "@react-spectrum/text": "^3.4.2",
51
- "@react-spectrum/utils": "^3.9.2",
52
- "@react-stately/collections": "^3.8.0",
53
- "@react-stately/select": "^3.5.1",
54
- "@react-types/overlays": "^3.7.2",
55
- "@react-types/select": "^3.8.1",
56
- "@react-types/shared": "^3.18.1",
57
- "@spectrum-icons/ui": "^3.5.2",
39
+ "@react-aria/focus": "3.0.0-nightly.2235+600bff46f",
40
+ "@react-aria/i18n": "3.0.0-nightly.2235+600bff46f",
41
+ "@react-aria/interactions": "3.0.0-nightly.2235+600bff46f",
42
+ "@react-aria/overlays": "3.0.0-nightly.2235+600bff46f",
43
+ "@react-aria/select": "3.10.2-nightly.3937+600bff46f",
44
+ "@react-aria/utils": "3.0.0-nightly.2235+600bff46f",
45
+ "@react-spectrum/button": "3.0.0-nightly.2235+600bff46f",
46
+ "@react-spectrum/label": "3.12.2-nightly.3937+600bff46f",
47
+ "@react-spectrum/listbox": "3.10.2-nightly.3937+600bff46f",
48
+ "@react-spectrum/overlays": "3.0.0-nightly.2235+600bff46f",
49
+ "@react-spectrum/progress": "3.0.0-nightly.2235+600bff46f",
50
+ "@react-spectrum/text": "3.4.3-nightly.3937+600bff46f",
51
+ "@react-spectrum/utils": "3.0.0-nightly.2235+600bff46f",
52
+ "@react-stately/collections": "3.0.0-nightly.2235+600bff46f",
53
+ "@react-stately/select": "3.5.2-nightly.3937+600bff46f",
54
+ "@react-types/overlays": "3.7.3-nightly.3937+600bff46f",
55
+ "@react-types/select": "3.8.2-nightly.3937+600bff46f",
56
+ "@react-types/shared": "3.0.0-nightly.2235+600bff46f",
57
+ "@spectrum-icons/ui": "3.0.0-nightly.2235+600bff46f",
58
58
  "@swc/helpers": "^0.4.14"
59
59
  },
60
60
  "devDependencies": {
61
- "@adobe/spectrum-css-temp": "3.0.0-alpha.1"
61
+ "@adobe/spectrum-css-temp": "3.0.0-nightly.2235+600bff46f"
62
62
  },
63
63
  "peerDependencies": {
64
64
  "@react-spectrum/provider": "^3.1.4",
@@ -68,5 +68,5 @@
68
68
  "publishConfig": {
69
69
  "access": "public"
70
70
  },
71
- "gitHead": "5911ed21de4b76d66f6254c02302519e02d50e16"
71
+ "gitHead": "600bff46f77558d68aff7ea2c002873653f0330d"
72
72
  }
package/src/Picker.tsx CHANGED
@@ -28,7 +28,7 @@ import {HiddenSelect, useSelect} from '@react-aria/select';
28
28
  // @ts-ignore
29
29
  import intlMessages from '../intl/*.json';
30
30
  import {ListBoxBase, useListBoxLayout} from '@react-spectrum/listbox';
31
- import {mergeProps, useLayoutEffect, useResizeObserver} from '@react-aria/utils';
31
+ import {mergeProps, useId, useLayoutEffect, useResizeObserver} from '@react-aria/utils';
32
32
  import {Popover, Tray} from '@react-spectrum/overlays';
33
33
  import {PressResponder, useHover} from '@react-aria/interactions';
34
34
  import {ProgressCircle} from '@react-spectrum/progress';
@@ -68,21 +68,23 @@ function Picker<T extends object>(props: SpectrumPickerProps<T>, ref: DOMRef<HTM
68
68
  let unwrappedTriggerRef = useUnwrapDOMRef(triggerRef);
69
69
  let listboxRef = useRef();
70
70
 
71
+ let isLoadingInitial = props.isLoading && state.collection.size === 0;
72
+ let isLoadingMore = props.isLoading && state.collection.size > 0;
73
+ let progressCircleId = useId();
74
+
71
75
  // We create the listbox layout in Picker and pass it to ListBoxBase below
72
76
  // so that the layout information can be cached even while the listbox is not mounted.
73
77
  // We also use the layout as the keyboard delegate for type to select.
74
78
  let layout = useListBoxLayout(state);
75
79
  let {labelProps, triggerProps, valueProps, menuProps, descriptionProps, errorMessageProps} = useSelect({
76
80
  ...props,
81
+ 'aria-describedby': (isLoadingInitial ? progressCircleId : undefined),
77
82
  keyboardDelegate: layout
78
83
  }, state, unwrappedTriggerRef);
79
84
 
80
85
  let isMobile = useIsMobileDevice();
81
86
  let {hoverProps, isHovered} = useHover({isDisabled});
82
87
 
83
- let isLoadingInitial = props.isLoading && state.collection.size === 0;
84
- let isLoadingMore = props.isLoading && state.collection.size > 0;
85
-
86
88
  // On small screen devices, the listbox is rendered in a tray, otherwise a popover.
87
89
  let listbox = (
88
90
  <ListBoxBase
@@ -205,6 +207,7 @@ function Picker<T extends object>(props: SpectrumPickerProps<T>, ref: DOMRef<HTM
205
207
  </SlotProvider>
206
208
  {isLoadingInitial &&
207
209
  <ProgressCircle
210
+ id={progressCircleId}
208
211
  isIndeterminate
209
212
  size="S"
210
213
  aria-label={stringFormatter.format('loading')}