@procore/core-react 11.23.1 → 11.23.3

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 (210) hide show
  1. package/README.md +7 -7
  2. package/dist/Avatar/Avatar.styles.js +5 -5
  3. package/dist/AvatarStack/AvatarStack.styles.js +7 -7
  4. package/dist/Badge/Badge.styles.js +2 -2
  5. package/dist/Banner/Banner.styles.js +10 -10
  6. package/dist/Box/Box.styles.js +1 -1
  7. package/dist/Breadcrumbs/Breadcrumbs.styles.js +4 -4
  8. package/dist/Button/Button.styles.js +5 -5
  9. package/dist/Calendar/Calendar.styles.js +8 -8
  10. package/dist/Card/Card.styles.js +1 -1
  11. package/dist/Checkbox/Checkbox.styles.js +5 -5
  12. package/dist/ContactItem/ContactItem.styles.js +5 -5
  13. package/dist/Content/Content.styles.js +2 -2
  14. package/dist/DateInput/DateInput.styles.js +6 -6
  15. package/dist/DetailPage/DetailPage.styles.js +7 -7
  16. package/dist/Dropdown/Dropdown.styles.js +3 -3
  17. package/dist/DropdownFlyout/DropdownFlyout.js +1 -1
  18. package/dist/DropdownFlyout/DropdownFlyout.js.map +1 -1
  19. package/dist/DropdownFlyout/DropdownFlyout.styles.js +4 -4
  20. package/dist/Dropzone/Dropzone.js +1 -1
  21. package/dist/Dropzone/Dropzone.styles.js +9 -9
  22. package/dist/EmptyState/EmptyState.styles.js +6 -6
  23. package/dist/Field/Field.styles.js +3 -3
  24. package/dist/FileList/FileList.styles.js +4 -4
  25. package/dist/FileSelect/FileExplorer/FileExplorer.js.map +1 -1
  26. package/dist/FileSelect/FileExplorer/FileExplorer.styles.js +9 -9
  27. package/dist/FileSelect/FileExplorer/FileExplorerSidebar.styles.js +3 -3
  28. package/dist/FileSelect/FileSelect.js +1 -1
  29. package/dist/FileSelect/FileSelect.js.map +1 -1
  30. package/dist/FileSelect/FileSelect.styles.js +2 -2
  31. package/dist/FileSelect/FileSelectDropzone/FileSelectDropzone.styles.js +3 -3
  32. package/dist/FileSelect/FileTokenList/FileTokenList.styles.js +2 -2
  33. package/dist/FileSelect/GridSource/GridSource.js +1 -1
  34. package/dist/FileSelect/GridSource/GridSource.js.map +1 -1
  35. package/dist/FileSelect/GridSource/GridSource.styles.js +6 -6
  36. package/dist/FileSelect/LocalSource/LocalSource.js +1 -1
  37. package/dist/FileSelect/LocalSource/LocalSource.js.map +1 -1
  38. package/dist/FileSelect/LocalSource/LocalSource.styles.js +4 -4
  39. package/dist/FileSelect/SourceItem/SourceItem.styles.js +3 -3
  40. package/dist/FileSelect/ThumbnailList/ThumbnailList.styles.js +6 -6
  41. package/dist/FileSelect/TreeSource/TreeSource.js +1 -1
  42. package/dist/FileSelect/TreeSource/TreeSource.js.map +1 -1
  43. package/dist/FileSelect/TreeSource/TreeSource.styles.js +1 -1
  44. package/dist/FileSelect/storyHelpers.js +1 -1
  45. package/dist/FileSelect/storyHelpers.js.map +1 -1
  46. package/dist/FileToken/FileToken.styles.js +4 -4
  47. package/dist/FilterToken/FilterToken.styles.js +2 -2
  48. package/dist/FlexList/FlexList.styles.js +1 -1
  49. package/dist/Form/Form.styles.js +15 -15
  50. package/dist/Grid/Grid.styles.js +2 -2
  51. package/dist/GroupSelect/GroupSelect.styles.js +1 -1
  52. package/dist/Input/Input.styles.js +1 -1
  53. package/dist/Link/Link.styles.js +1 -1
  54. package/dist/ListPage/ListPage.styles.js +8 -8
  55. package/dist/Loader/Loader.styles.js +2 -2
  56. package/dist/Menu/Menu.d.ts +2 -2
  57. package/dist/MenuImperative/MenuImperative.styles.js +10 -10
  58. package/dist/Modal/Modal.styles.js +14 -14
  59. package/dist/Modal/Modal.styles.js.map +1 -1
  60. package/dist/MultiSelect/MultiSelect.styles.js +6 -6
  61. package/dist/NextMenu/NextMenu.styles.js +3 -3
  62. package/dist/Notation/Notation.js +1 -1
  63. package/dist/NumberInput/NumberInput.styles.js +7 -7
  64. package/dist/Overlay/OverlayArrow.styles.js +1 -1
  65. package/dist/Overlay/useOverlay.js +3 -2
  66. package/dist/Overlay/useOverlay.js.map +1 -1
  67. package/dist/OverlayTrigger/OverlayTrigger.js +0 -14
  68. package/dist/OverlayTrigger/OverlayTrigger.js.map +1 -1
  69. package/dist/OverlayTrigger/a11yPresets.d.ts +14 -14
  70. package/dist/PageLayout/PageLayout.js +1 -1
  71. package/dist/PageLayout/PageLayout.js.map +1 -1
  72. package/dist/PageLayout/PageLayout.styles.js +13 -13
  73. package/dist/Pagination/Pagination.styles.js +5 -5
  74. package/dist/Panel/Panel.styles.js +11 -11
  75. package/dist/Pill/Pill.styles.js +3 -3
  76. package/dist/Pill/Pill.styles.js.map +1 -1
  77. package/dist/PillSelect/PillSelect.styles.js +4 -4
  78. package/dist/Popover/Popover.styles.js +2 -2
  79. package/dist/Portal/Portal.styles.js +1 -1
  80. package/dist/ProgressBar/ProgressBar.styles.js +2 -2
  81. package/dist/RadioButton/RadioButton.styles.js +3 -3
  82. package/dist/Required/Required.styles.js +3 -3
  83. package/dist/Search/Search.styles.js +5 -5
  84. package/dist/Section/Section.styles.js +6 -6
  85. package/dist/SegmentedController/SegmentedController.styles.js +4 -4
  86. package/dist/Select/Select.styles.js +7 -7
  87. package/dist/Semantic/Semantic.styles.js +8 -8
  88. package/dist/Sidebar/Sidebar.styles.js +7 -7
  89. package/dist/Slider/Slider.styles.js +5 -5
  90. package/dist/Spinner/Spinner.styles.js +7 -7
  91. package/dist/SuperSelect/SuperSelect.components.js +1 -0
  92. package/dist/SuperSelect/SuperSelect.components.js.map +1 -1
  93. package/dist/SuperSelect/SuperSelect.d.ts +25 -21
  94. package/dist/SuperSelect/SuperSelect.js +8 -6
  95. package/dist/SuperSelect/SuperSelect.js.map +1 -1
  96. package/dist/SuperSelect/SuperSelect.presets.styles.js +1 -1
  97. package/dist/SuperSelect/SuperSelect.styles.js +37 -37
  98. package/dist/SuperSelect/useSuperSelect.d.ts +75 -61
  99. package/dist/Switch/Switch.styles.js +5 -5
  100. package/dist/Switch/Switch.styles.js.map +1 -1
  101. package/dist/Table/Table.styles.js +43 -44
  102. package/dist/Table/Table.styles.js.map +1 -1
  103. package/dist/TableShelf/TableShelf.styles.js +5 -5
  104. package/dist/Tabs/Tabs.styles.js +8 -8
  105. package/dist/Tearsheet/Tearsheet.js +1 -1
  106. package/dist/Tearsheet/Tearsheet.js.map +1 -1
  107. package/dist/Tearsheet/Tearsheet.styles.js +5 -5
  108. package/dist/TextArea/TextArea.styles.js +1 -1
  109. package/dist/TextEditorOutput/TextEditorOutput.styles.js +1 -1
  110. package/dist/Thumbnail/Thumbnail.hooks.d.ts +70 -76
  111. package/dist/Thumbnail/Thumbnail.styles.js +17 -17
  112. package/dist/ThumbnailGrid/ThumbnailGrid.styles.js +7 -7
  113. package/dist/TieredSelect/TieredSelect.styles.js +9 -9
  114. package/dist/Tile/Tile.styles.js +8 -8
  115. package/dist/Title/Title.styles.js +7 -7
  116. package/dist/Toast/Toast.styles.js +3 -3
  117. package/dist/ToggleButton/ToggleButton.styles.js +1 -1
  118. package/dist/Token/Token.styles.js +3 -3
  119. package/dist/ToolHeader/ToolHeader.styles.js +6 -6
  120. package/dist/Tooltip/Tooltip.styles.js +2 -2
  121. package/dist/Tree/Tree.hooks.js +1 -1
  122. package/dist/Tree/Tree.hooks.js.map +1 -1
  123. package/dist/Tree/Tree.styles.js +10 -10
  124. package/dist/Tree/Tree.styles.js.map +1 -1
  125. package/dist/Typeahead/Typeahead.styles.js +3 -3
  126. package/dist/Typography/Typography.styles.js +1 -1
  127. package/dist/Typography/Typography.table.story.js +2 -2
  128. package/dist/_hooks/useFileUploader.js +1 -1
  129. package/dist/_hooks/useFileUploader.js.map +1 -1
  130. package/dist/_typedoc/Avatar/Avatar.types.json +20 -20
  131. package/dist/_typedoc/AvatarStack/AvatarStack.types.json +23 -23
  132. package/dist/_typedoc/Badge/Badge.types.json +6 -6
  133. package/dist/_typedoc/Banner/Banner.types.json +13 -13
  134. package/dist/_typedoc/Box/Box.types.json +68 -68
  135. package/dist/_typedoc/Breadcrumbs/Breadcrumbs.types.json +10 -10
  136. package/dist/_typedoc/Button/Button.types.json +11 -11
  137. package/dist/_typedoc/Calendar/Calendar.types.json +80 -80
  138. package/dist/_typedoc/Card/Card.types.json +6 -6
  139. package/dist/_typedoc/Checkbox/Checkbox.types.json +7 -7
  140. package/dist/_typedoc/ContactItem/ContactItem.types.json +9 -9
  141. package/dist/_typedoc/DateInput/DateInput.types.json +35 -35
  142. package/dist/_typedoc/DateSelect/DateSelect.types.json +13 -13
  143. package/dist/_typedoc/DetailPage/DetailPage.types.json +4 -4
  144. package/dist/_typedoc/Dropdown/Dropdown.types.json +37 -37
  145. package/dist/_typedoc/DropdownFlyout/DropdownFlyout.types.json +29 -29
  146. package/dist/_typedoc/Dropzone/Dropzone.types.json +41 -41
  147. package/dist/_typedoc/EmptyState/EmptyState.types.json +14 -14
  148. package/dist/_typedoc/FileList/FileList.types.json +9 -9
  149. package/dist/_typedoc/FileSelect/FileSelect.types.json +26 -26
  150. package/dist/_typedoc/FileSelect/GridSource/GridSource.types.json +20 -20
  151. package/dist/_typedoc/FileSelect/LocalSource/LocalSource.types.json +14 -14
  152. package/dist/_typedoc/FileSelect/TreeSource/TreeSource.types.json +9 -9
  153. package/dist/_typedoc/Flex/Flex.types.json +27 -27
  154. package/dist/_typedoc/FlexList/FlexList.types.json +30 -30
  155. package/dist/_typedoc/Form/Form.types.json +700 -700
  156. package/dist/_typedoc/Grid/Grid.types.json +8 -8
  157. package/dist/_typedoc/GroupSelect/GroupSelect.types.json +52 -52
  158. package/dist/_typedoc/Input/Input.types.json +2 -2
  159. package/dist/_typedoc/Link/Link.types.json +4 -4
  160. package/dist/_typedoc/ListPage/ListPage.types.json +13 -13
  161. package/dist/_typedoc/Menu/Menu.types.json +62 -62
  162. package/dist/_typedoc/MenuImperative/MenuImperative.types.json +74 -74
  163. package/dist/_typedoc/Modal/Modal.types.json +41 -41
  164. package/dist/_typedoc/MultiSelect/MultiSelect.types.json +31 -31
  165. package/dist/_typedoc/Notation/Notation.types.json +4 -4
  166. package/dist/_typedoc/NumberInput/NumberInput.types.json +38 -38
  167. package/dist/_typedoc/OverlayTrigger/OverlayTrigger.types.json +30 -30
  168. package/dist/_typedoc/PageLayout/PageLayout.types.json +22 -22
  169. package/dist/_typedoc/Pagination/Pagination.types.json +7 -7
  170. package/dist/_typedoc/Panel/Panel.types.json +27 -27
  171. package/dist/_typedoc/Pill/Pill.types.json +2 -2
  172. package/dist/_typedoc/PillSelect/PillSelect.types.json +46 -46
  173. package/dist/_typedoc/Popover/Popover.types.json +14 -14
  174. package/dist/_typedoc/ProgressBar/ProgressBar.types.json +6 -6
  175. package/dist/_typedoc/RadioButton/RadioButton.types.json +6 -6
  176. package/dist/_typedoc/Required/Required.types.json +5 -5
  177. package/dist/_typedoc/Search/Search.types.json +18 -18
  178. package/dist/_typedoc/Section/Section.types.json +14 -14
  179. package/dist/_typedoc/SegmentedController/SegmentedController.types.json +20 -20
  180. package/dist/_typedoc/Select/Select.types.json +55 -55
  181. package/dist/_typedoc/Slider/Slider.types.json +6 -6
  182. package/dist/_typedoc/Spinner/Spinner.types.json +9 -9
  183. package/dist/_typedoc/Switch/Switch.types.json +3 -3
  184. package/dist/_typedoc/Table/Table.types.json +96 -96
  185. package/dist/_typedoc/Tabs/Tabs.types.json +17 -17
  186. package/dist/_typedoc/Tearsheet/Tearsheet.types.json +16 -16
  187. package/dist/_typedoc/TextArea/TextArea.types.json +3 -3
  188. package/dist/_typedoc/TextEditor/TextEditor.types.json +9 -9
  189. package/dist/_typedoc/TextEditorOutput/TextEditorOutput.types.json +4 -4
  190. package/dist/_typedoc/Thumbnail/Thumbnail.types.json +19 -19
  191. package/dist/_typedoc/TieredDropdown/TieredDropdown.types.json +42 -42
  192. package/dist/_typedoc/TieredSelect/TieredSelect.types.json +28 -28
  193. package/dist/_typedoc/Tile/Tile.types.json +30 -30
  194. package/dist/_typedoc/Toast/Toast.types.json +4 -4
  195. package/dist/_typedoc/ToggleButton/ToggleButton.types.json +3 -3
  196. package/dist/_typedoc/Token/Token.types.json +4 -4
  197. package/dist/_typedoc/ToolHeader/ToolHeader.types.json +10 -10
  198. package/dist/_typedoc/Tooltip/Tooltip.types.json +13 -13
  199. package/dist/_typedoc/Tree/Tree.types.json +86 -86
  200. package/dist/_typedoc/Typeahead/Typeahead.types.json +2 -2
  201. package/dist/_typedoc/Typography/Typography.types.json +8 -8
  202. package/dist/_typedoc/_utils/types.json +3 -3
  203. package/dist/_utils/polymorphic.js +0 -3
  204. package/dist/_utils/polymorphic.js.map +1 -1
  205. package/dist/_utils/runInQueue.js +1 -1
  206. package/dist/_utils/runInQueue.js.map +1 -1
  207. package/package.json +34 -37
  208. package/dist/SuperSelect/useVirtuosoResizeErrorFix.d.ts +0 -1
  209. package/dist/SuperSelect/useVirtuosoResizeErrorFix.js +0 -18
  210. package/dist/SuperSelect/useVirtuosoResizeErrorFix.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"DropdownFlyout.js","names":["EllipsisVertical","React","Card","DropdownButton","Portal","useClickOutside","useI18nContext","mergeRefs","defaultOptionRenderer","DropdownFlyoutContext","noop","transformOption","useDropdownFlyout","useDropdownFlyoutContext","StyledDropdownFlyout","StyledDropdownFlyoutItem","rootId","useDropdownFlyoutOverlay","FlyoutCaption","forwardRef","_ref","ref","option","highlighted","optionRenderer","props","_objectWithoutProperties","_excluded","createElement","_extends","displayName","FlyoutItem","_ref2","overlayElRef","useRef","_useDropdownFlyoutCon","isHighlighted","isExpanded","_onClick","onClick","expand","collapse","onMouseEnter","useCallback","onMouseLeave","e","relatedTarget","Node","current","contains","_React$useState","useState","_React$useState2","_slicedToArray","referenceEl","setReferenceEl","Fragment","origin","Array","isArray","children","FlyoutList","options","overlayRef","placement","_ref3","_ref3$offset","offset","_useDropdownFlyoutOve","mainAxis","overlayStyle","referenceRef","useEffect","shadowStrength","style","map","key","id","DefaultButton","_ref4","icon","_excluded2","loading","undefined","arrow","Boolean","Children","count","DropdownFlyout","_ref5","disabled","label","_options","_ref5$onClick","_ref5$optionRenderer","_ref5$placement","_onKeyDown","onKeyDown","onFocus_","onFocus","onBlur_","onBlur","onMouseDown_","onMouseDown","onMouseEnter_","onMouseLeave_","size","_ref5$variant","variant","_excluded3","innerRef","containerRef","targetRef","flyoutOptions","useMemo","_useDropdownFlyout","closeSelectedDropdown","openDropdown","isOpen","setMouseOver","setFocused","onClickOutside","refs","element","I18n","ariaLabel","t","concat","trigger","isValidElement","_containerRef$current","target","dataset","flyout","preventDefault","_targetRef$current","focus","_React$useState3","_React$useState4","cloneElement","_trigger$props$onClic","_trigger$props","call","tabIndex","Provider","value"],"sources":["../../src/DropdownFlyout/DropdownFlyout.tsx"],"sourcesContent":["import { EllipsisVertical } from '@procore/core-icons/dist'\nimport React, { MouseEvent } from 'react'\nimport { ButtonProps } from '../Button/Button.types'\nimport { Card } from '../Card/Card'\nimport { DropdownButton } from '../Dropdown/Dropdown'\nimport { Portal } from '../Portal'\nimport { useClickOutside } from '../_hooks/ClickOutside'\nimport { useI18nContext } from '../_hooks/I18n'\nimport { mergeRefs } from '../_utils/mergeRefs'\nimport { ReactElementWithRef } from '../_utils/types'\nimport {\n defaultOptionRenderer,\n DropdownFlyoutContext,\n noop,\n transformOption,\n useDropdownFlyout,\n useDropdownFlyoutContext,\n} from './DropdownFlyout.helpers'\nimport {\n StyledDropdownFlyout,\n StyledDropdownFlyoutItem,\n} from './DropdownFlyout.styles'\nimport {\n DropdownFlyoutProps,\n FlyoutCaptionProps,\n FlyoutItemProps,\n FlyoutListProps,\n rootId,\n} from './DropdownFlyout.types'\nimport { useDropdownFlyoutOverlay } from './useDropdownFlyoutOverlay'\n\nexport const FlyoutCaption = React.forwardRef<\n HTMLDivElement,\n FlyoutCaptionProps\n>(function FlyoutCaption(\n { option, highlighted, optionRenderer, ...props },\n ref\n) {\n return (\n <StyledDropdownFlyoutItem\n {...props}\n ref={ref}\n data-highlighted={highlighted}\n data-flyout\n >\n {optionRenderer(option)}\n </StyledDropdownFlyoutItem>\n )\n})\n\nFlyoutCaption.displayName = 'FlyoutCaption'\n\nexport function FlyoutItem({ option }: FlyoutItemProps) {\n const overlayElRef = React.useRef<HTMLDivElement>(null)\n const {\n isHighlighted,\n isExpanded,\n onClick: _onClick,\n expand,\n collapse,\n optionRenderer,\n } = useDropdownFlyoutContext()\n\n const onMouseEnter = React.useCallback(() => expand(option), [option, expand])\n const onMouseLeave = React.useCallback(\n (e: React.MouseEvent<HTMLDivElement>) => {\n if (\n e.relatedTarget instanceof Node &&\n overlayElRef.current &&\n !overlayElRef.current.contains(e.relatedTarget as Node)\n ) {\n collapse(option)\n }\n },\n [collapse, option]\n )\n\n const onClick = React.useCallback(() => _onClick(option), [_onClick, option])\n\n const [referenceEl, setReferenceEl] = React.useState<HTMLElement | null>(null)\n\n return (\n <>\n <FlyoutCaption\n ref={setReferenceEl}\n option={option.origin}\n onClick={onClick}\n optionRenderer={optionRenderer}\n highlighted={isHighlighted(option)}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n />\n {Array.isArray(option.children) && isExpanded(option) ? (\n <Portal>\n <FlyoutList\n referenceEl={referenceEl}\n options={option.children}\n overlayRef={overlayElRef}\n placement=\"right-top\"\n />\n </Portal>\n ) : null}\n </>\n )\n}\n\nexport function FlyoutList({\n options,\n placement,\n referenceEl,\n overlayRef: overlayElRef,\n offset = 0,\n}: FlyoutListProps) {\n const { overlayStyle, referenceRef, overlayRef } = useDropdownFlyoutOverlay({\n placement,\n offset: { mainAxis: offset },\n })\n\n React.useEffect(() => {\n referenceRef(referenceEl)\n }, [referenceEl, referenceRef])\n\n return (\n <Card\n ref={mergeRefs(overlayRef, overlayElRef)}\n shadowStrength={2}\n style={overlayStyle}\n >\n <StyledDropdownFlyout>\n {options.map((option) => (\n <FlyoutItem key={option.id} option={option} />\n ))}\n </StyledDropdownFlyout>\n </Card>\n )\n}\n\nconst DefaultButton = React.forwardRef<HTMLButtonElement, ButtonProps>(\n function DefaultButton({ children, icon, ...props }, ref) {\n return (\n <DropdownButton\n {...props}\n icon={\n props.loading ? undefined : !icon && !children ? (\n <EllipsisVertical />\n ) : (\n icon\n )\n }\n arrow={Boolean(React.Children.count(children))}\n ref={ref}\n >\n {children}\n </DropdownButton>\n )\n }\n)\n\n/**\n\n The dropdown flyout allows for additional menu items to be nested within\n parent items, which allows more menu options for users.\n @a11y WARN: DropdownFlyotus hold no value and take an action. Focus is expected\n to be moved from a Dropdown to something else, to continue the user flow.\n If the action is inert and does not move focus, this is left to be added\n by the consumer.\n @since 10.19.0\n\n @see [Storybook](https://procore.github.io/core/core-react/latest/?path=/story/demos-dropdownflyout--demo)\n\n @see [Design Guidelines](https://design.procore.com/dropdown-flyout)\n\n */\nexport const DropdownFlyout = React.forwardRef<\n HTMLDivElement,\n DropdownFlyoutProps\n>(function DropdownFlyout(\n {\n disabled,\n icon,\n label,\n loading,\n options: _options,\n onClick: _onClick = noop,\n optionRenderer = defaultOptionRenderer,\n children,\n placement = 'right-bottom',\n onKeyDown: _onKeyDown,\n onFocus: onFocus_,\n onBlur: onBlur_,\n onMouseDown: onMouseDown_,\n onMouseEnter: onMouseEnter_,\n onMouseLeave: onMouseLeave_,\n size,\n variant = 'secondary',\n ...props\n },\n ref\n) {\n const innerRef = React.useRef<HTMLDivElement>(null)\n const containerRef = (ref as React.RefObject<HTMLInputElement>) || innerRef\n const overlayElRef = React.useRef<HTMLDivElement>(null)\n const targetRef = React.useRef<HTMLElement>(null)\n\n const flyoutOptions = React.useMemo(\n () => transformOption(_options, rootId),\n [_options]\n )\n\n const {\n options,\n collapse,\n expand,\n closeSelectedDropdown,\n openDropdown,\n isOpen,\n onClick,\n onKeyDown,\n setMouseOver,\n setFocused,\n isExpanded,\n isHighlighted,\n } = useDropdownFlyout({\n flyoutOptions,\n onClick: _onClick,\n onKeyDown: _onKeyDown,\n })\n\n useClickOutside({\n onClickOutside: closeSelectedDropdown,\n refs: [containerRef],\n })\n\n const element =\n typeof children === 'function' ? children({ isOpen }) : children\n\n const I18n = useI18nContext()\n\n const ariaLabel =\n props['aria-label'] ||\n label ||\n I18n.t(`core.dropdown.${loading ? 'loading' : 'moreOptions'}`)\n\n const trigger: ReactElementWithRef = React.isValidElement(element) ? (\n element\n ) : (\n <DefaultButton\n aria-label={ariaLabel}\n children={label}\n disabled={disabled}\n loading={loading}\n icon={icon}\n size={size}\n variant={variant}\n />\n )\n\n function onBlur(e: React.FocusEvent<HTMLDivElement>) {\n setFocused(false)\n closeSelectedDropdown(e)\n onBlur_?.(e)\n }\n\n function onFocus(e: React.FocusEvent<HTMLDivElement>) {\n setFocused(true)\n onFocus_?.(e)\n }\n\n function onMouseDown(e: React.MouseEvent<HTMLDivElement>) {\n // Discard firing of blur event\n // when click was inside the dropdown\n if ((e.target as HTMLElement).dataset.flyout) {\n e.preventDefault()\n return\n }\n if (e.target instanceof Node && containerRef.current?.contains(e.target)) {\n e.preventDefault()\n targetRef.current?.focus()\n }\n onMouseDown_?.(e)\n }\n\n function onMouseLeave(e: React.MouseEvent<HTMLDivElement>) {\n setMouseOver(false)\n onMouseLeave_?.(e)\n }\n\n function onMouseEnter(e: React.MouseEvent<HTMLDivElement>) {\n setMouseOver(true)\n onMouseEnter_?.(e)\n }\n\n const [referenceEl, setReferenceEl] = React.useState<HTMLElement | null>(null)\n\n return (\n <div\n {...props}\n aria-label={undefined}\n ref={containerRef}\n onKeyDown={onKeyDown}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n onFocus={onFocus}\n onMouseDown={onMouseDown}\n onBlur={onBlur}\n >\n {React.cloneElement(trigger, {\n ref: trigger.ref\n ? mergeRefs(trigger.ref, targetRef, setReferenceEl)\n : mergeRefs(targetRef, setReferenceEl),\n onClick: (e: MouseEvent<HTMLElement, 'click'>) => {\n trigger.props.onClick?.(e)\n openDropdown()\n },\n tabIndex: 0,\n })}\n <DropdownFlyoutContext.Provider\n value={{\n expand,\n collapse,\n onClick,\n isExpanded,\n isHighlighted,\n optionRenderer,\n }}\n >\n {isOpen && (\n <Portal>\n <FlyoutList\n options={options}\n overlayRef={overlayElRef}\n placement={placement}\n referenceEl={referenceEl}\n offset={4}\n />\n </Portal>\n )}\n </DropdownFlyoutContext.Provider>\n </div>\n )\n})\n"],"mappings":";;;;;;;;;;;;AAAA,SAASA,gBAAgB,QAAQ,0BAA0B;AAC3D,OAAOC,KAAK,MAAsB,OAAO;AAEzC,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,cAAc,QAAQ,sBAAsB;AACrD,SAASC,MAAM,QAAQ,WAAW;AAClC,SAASC,eAAe,QAAQ,wBAAwB;AACxD,SAASC,cAAc,QAAQ,gBAAgB;AAC/C,SAASC,SAAS,QAAQ,qBAAqB;AAE/C,SACEC,qBAAqB,EACrBC,qBAAqB,EACrBC,IAAI,EACJC,eAAe,EACfC,iBAAiB,EACjBC,wBAAwB,QACnB,0BAA0B;AACjC,SACEC,oBAAoB,EACpBC,wBAAwB,QACnB,yBAAyB;AAChC,SAKEC,MAAM,QACD,wBAAwB;AAC/B,SAASC,wBAAwB,QAAQ,4BAA4B;AAErE,OAAO,IAAMC,aAAa,gBAAGjB,KAAK,CAACkB,UAAU,CAG3C,SAASD,aAAaA,CAAAE,IAAA,EAEtBC,GAAG,EACH;EAAA,IAFEC,MAAM,GAAAF,IAAA,CAANE,MAAM;IAAEC,WAAW,GAAAH,IAAA,CAAXG,WAAW;IAAEC,cAAc,GAAAJ,IAAA,CAAdI,cAAc;IAAKC,KAAK,GAAAC,wBAAA,CAAAN,IAAA,EAAAO,SAAA;EAG/C,oBACE1B,KAAA,CAAA2B,aAAA,CAACb,wBAAwB,EAAAc,QAAA,KACnBJ,KAAK;IACTJ,GAAG,EAAEA,GAAI;IACT,oBAAkBE,WAAY;IAC9B;EAAW,IAEVC,cAAc,CAACF,MAAM,CACE,CAAC;AAE/B,CAAC,CAAC;AAEFJ,aAAa,CAACY,WAAW,GAAG,eAAe;AAE3C,OAAO,SAASC,UAAUA,CAAAC,KAAA,EAA8B;E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AAqG,qBAAA,uBAArBA,qBAAA,CAAAE,IAAA,CAAAD,cAAA,EAAwBhG,CAAC,CAAC;MAC1BwE,YAAY,CAAC,CAAC;IAChB,CAAC;IACD0B,QAAQ,EAAE;EACZ,CAAC,CAAC,eACF9I,KAAA,CAAA2B,aAAA,CAACnB,qBAAqB,CAACuI,QAAQ;IAC7BC,KAAK,EAAE;MACLzG,MAAM,EAANA,MAAM;MACNC,QAAQ,EAARA,QAAQ;MACRF,OAAO,EAAPA,OAAO;MACPF,UAAU,EAAVA,UAAU;MACVD,aAAa,EAAbA,aAAa;MACbZ,cAAc,EAAdA;IACF;EAAE,GAED8F,MAAM,iBACLrH,KAAA,CAAA2B,aAAA,CAACxB,MAAM,qBACLH,KAAA,CAAA2B,aAAA,CAACiC,UAAU;IACTC,OAAO,EAAEA,OAAQ;IACjBC,UAAU,EAAE9B,YAAa;IACzB+B,SAAS,EAAEA,SAAU;IACrBV,WAAW,EAAEA,WAAY;IACzBa,MAAM,EAAE;EAAE,CACX,CACK,CAEoB,CAC7B,CAAC;AAEV,CAAC,CAAC"}
1
+ {"version":3,"file":"DropdownFlyout.js","names":["EllipsisVertical","React","Card","DropdownButton","Portal","useClickOutside","useI18nContext","mergeRefs","defaultOptionRenderer","DropdownFlyoutContext","noop","transformOption","useDropdownFlyout","useDropdownFlyoutContext","StyledDropdownFlyout","StyledDropdownFlyoutItem","rootId","useDropdownFlyoutOverlay","FlyoutCaption","forwardRef","_ref","ref","option","highlighted","optionRenderer","props","_objectWithoutProperties","_excluded","createElement","_extends","displayName","FlyoutItem","_ref2","overlayElRef","useRef","_useDropdownFlyoutCon","isHighlighted","isExpanded","_onClick","onClick","expand","collapse","onMouseEnter","useCallback","onMouseLeave","e","relatedTarget","Node","current","contains","_React$useState","useState","_React$useState2","_slicedToArray","referenceEl","setReferenceEl","Fragment","origin","Array","isArray","children","FlyoutList","options","overlayRef","placement","_ref3","_ref3$offset","offset","_useDropdownFlyoutOve","mainAxis","overlayStyle","referenceRef","useEffect","shadowStrength","style","map","key","id","DefaultButton","_ref4","icon","_excluded2","loading","undefined","arrow","Boolean","Children","count","DropdownFlyout","_ref5","disabled","label","_options","_ref5$onClick","_ref5$optionRenderer","_ref5$placement","_onKeyDown","onKeyDown","onFocus_","onFocus","onBlur_","onBlur","onMouseDown_","onMouseDown","onMouseEnter_","onMouseLeave_","size","_ref5$variant","variant","_excluded3","innerRef","containerRef","targetRef","flyoutOptions","useMemo","_useDropdownFlyout","closeSelectedDropdown","openDropdown","isOpen","setMouseOver","setFocused","onClickOutside","refs","element","I18n","ariaLabel","t","concat","trigger","isValidElement","_containerRef$current","target","dataset","flyout","preventDefault","_targetRef$current","focus","_React$useState3","_React$useState4","cloneElement","_trigger$props$onClic","_trigger$props","call","tabIndex","Provider","value"],"sources":["../../src/DropdownFlyout/DropdownFlyout.tsx"],"sourcesContent":["import { EllipsisVertical } from '@procore/core-icons/dist'\nimport React, { MouseEvent } from 'react'\nimport { ButtonProps } from '../Button/Button.types'\nimport { Card } from '../Card/Card'\nimport { DropdownButton } from '../Dropdown/Dropdown'\nimport { Portal } from '../Portal'\nimport { useClickOutside } from '../_hooks/ClickOutside'\nimport { useI18nContext } from '../_hooks/I18n'\nimport { mergeRefs } from '../_utils/mergeRefs'\nimport { ReactElementWithRef } from '../_utils/types'\nimport {\n defaultOptionRenderer,\n DropdownFlyoutContext,\n noop,\n transformOption,\n useDropdownFlyout,\n useDropdownFlyoutContext,\n} from './DropdownFlyout.helpers'\nimport {\n StyledDropdownFlyout,\n StyledDropdownFlyoutItem,\n} from './DropdownFlyout.styles'\nimport {\n DropdownFlyoutProps,\n FlyoutCaptionProps,\n FlyoutItemProps,\n FlyoutListProps,\n rootId,\n} from './DropdownFlyout.types'\nimport { useDropdownFlyoutOverlay } from './useDropdownFlyoutOverlay'\n\nexport const FlyoutCaption = React.forwardRef<\n HTMLDivElement,\n FlyoutCaptionProps\n>(function FlyoutCaption(\n { option, highlighted, optionRenderer, ...props },\n ref\n) {\n return (\n <StyledDropdownFlyoutItem\n {...props}\n ref={ref}\n data-highlighted={highlighted}\n data-flyout\n >\n {optionRenderer(option)}\n </StyledDropdownFlyoutItem>\n )\n})\n\nFlyoutCaption.displayName = 'FlyoutCaption'\n\nexport function FlyoutItem({ option }: FlyoutItemProps) {\n const overlayElRef = React.useRef<HTMLDivElement>(null)\n const {\n isHighlighted,\n isExpanded,\n onClick: _onClick,\n expand,\n collapse,\n optionRenderer,\n } = useDropdownFlyoutContext()\n\n const onMouseEnter = React.useCallback(() => expand(option), [option, expand])\n const onMouseLeave = React.useCallback(\n (e: React.MouseEvent<HTMLDivElement>) => {\n if (\n e.relatedTarget instanceof Node &&\n overlayElRef.current &&\n !overlayElRef.current.contains(e.relatedTarget as Node)\n ) {\n collapse(option)\n }\n },\n [collapse, option]\n )\n\n const onClick = React.useCallback(() => _onClick(option), [_onClick, option])\n\n const [referenceEl, setReferenceEl] = React.useState<HTMLElement | null>(null)\n\n return (\n <>\n <FlyoutCaption\n ref={setReferenceEl}\n option={option.origin}\n onClick={onClick}\n optionRenderer={optionRenderer}\n highlighted={isHighlighted(option)}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n />\n {Array.isArray(option.children) && isExpanded(option) ? (\n <Portal>\n <FlyoutList\n referenceEl={referenceEl}\n options={option.children}\n overlayRef={overlayElRef}\n placement=\"right-top\"\n />\n </Portal>\n ) : null}\n </>\n )\n}\n\nexport function FlyoutList({\n options,\n placement,\n referenceEl,\n overlayRef: overlayElRef,\n offset = 0,\n}: FlyoutListProps) {\n const { overlayStyle, referenceRef, overlayRef } = useDropdownFlyoutOverlay({\n placement,\n offset: { mainAxis: offset },\n })\n\n React.useEffect(() => {\n referenceRef(referenceEl)\n }, [referenceEl, referenceRef])\n\n return (\n <Card\n ref={mergeRefs(overlayRef, overlayElRef)}\n shadowStrength={2}\n style={overlayStyle}\n >\n <StyledDropdownFlyout>\n {options.map((option) => (\n <FlyoutItem key={option.id} option={option} />\n ))}\n </StyledDropdownFlyout>\n </Card>\n )\n}\n\nconst DefaultButton = React.forwardRef<HTMLButtonElement, ButtonProps>(\n function DefaultButton({ children, icon, ...props }, ref) {\n return (\n <DropdownButton\n {...props}\n icon={\n props.loading ? undefined : !icon && !children ? (\n <EllipsisVertical />\n ) : (\n icon\n )\n }\n arrow={Boolean(React.Children.count(children))}\n ref={ref}\n >\n {children}\n </DropdownButton>\n )\n }\n)\n\n/**\n\n The dropdown flyout allows for additional menu items to be nested within\n parent items, which allows more menu options for users.\n @a11y WARN: DropdownFlyotus hold no value and take an action. Focus is expected\n to be moved from a Dropdown to something else, to continue the user flow.\n If the action is inert and does not move focus, this is left to be added\n by the consumer.\n @since 10.19.0\n\n @see [Storybook](https://procore.github.io/core/core-react/latest/?path=/story/demos-dropdownflyout--demo)\n\n @see [Design Guidelines](https://design.procore.com/dropdown-flyout)\n\n */\nexport const DropdownFlyout = React.forwardRef<\n HTMLDivElement,\n DropdownFlyoutProps\n>(function DropdownFlyout(\n {\n disabled,\n icon,\n label,\n loading,\n options: _options,\n onClick: _onClick = noop,\n optionRenderer = defaultOptionRenderer,\n children,\n placement = 'right-bottom',\n onKeyDown: _onKeyDown,\n onFocus: onFocus_,\n onBlur: onBlur_,\n onMouseDown: onMouseDown_,\n onMouseEnter: onMouseEnter_,\n onMouseLeave: onMouseLeave_,\n size,\n variant = 'secondary',\n ...props\n },\n ref\n) {\n const innerRef = React.useRef<HTMLDivElement>(null)\n const containerRef = (ref as React.RefObject<HTMLInputElement>) || innerRef\n const overlayElRef = React.useRef<HTMLDivElement>(null)\n const targetRef = React.useRef<HTMLElement>(null)\n\n const flyoutOptions = React.useMemo(\n () => transformOption(_options, rootId),\n [_options]\n )\n\n const {\n options,\n collapse,\n expand,\n closeSelectedDropdown,\n openDropdown,\n isOpen,\n onClick,\n onKeyDown,\n setMouseOver,\n setFocused,\n isExpanded,\n isHighlighted,\n } = useDropdownFlyout({\n flyoutOptions,\n onClick: _onClick,\n onKeyDown: _onKeyDown,\n })\n\n useClickOutside({\n onClickOutside: isOpen ? closeSelectedDropdown : noop,\n refs: [containerRef],\n })\n\n const element =\n typeof children === 'function' ? children({ isOpen }) : children\n\n const I18n = useI18nContext()\n\n const ariaLabel =\n props['aria-label'] ||\n label ||\n I18n.t(`core.dropdown.${loading ? 'loading' : 'moreOptions'}`)\n\n const trigger: ReactElementWithRef = React.isValidElement(element) ? (\n element\n ) : (\n <DefaultButton\n aria-label={ariaLabel}\n children={label}\n disabled={disabled}\n loading={loading}\n icon={icon}\n size={size}\n variant={variant}\n />\n )\n\n function onBlur(e: React.FocusEvent<HTMLDivElement>) {\n setFocused(false)\n closeSelectedDropdown(e)\n onBlur_?.(e)\n }\n\n function onFocus(e: React.FocusEvent<HTMLDivElement>) {\n setFocused(true)\n onFocus_?.(e)\n }\n\n function onMouseDown(e: React.MouseEvent<HTMLDivElement>) {\n // Discard firing of blur event\n // when click was inside the dropdown\n if ((e.target as HTMLElement).dataset.flyout) {\n e.preventDefault()\n return\n }\n if (e.target instanceof Node && containerRef.current?.contains(e.target)) {\n e.preventDefault()\n targetRef.current?.focus()\n }\n onMouseDown_?.(e)\n }\n\n function onMouseLeave(e: React.MouseEvent<HTMLDivElement>) {\n setMouseOver(false)\n onMouseLeave_?.(e)\n }\n\n function onMouseEnter(e: React.MouseEvent<HTMLDivElement>) {\n setMouseOver(true)\n onMouseEnter_?.(e)\n }\n\n const [referenceEl, setReferenceEl] = React.useState<HTMLElement | null>(null)\n\n return (\n <div\n {...props}\n aria-label={undefined}\n ref={containerRef}\n onKeyDown={onKeyDown}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n onFocus={onFocus}\n onMouseDown={onMouseDown}\n onBlur={onBlur}\n >\n {React.cloneElement(trigger, {\n ref: trigger.ref\n ? mergeRefs(trigger.ref, targetRef, setReferenceEl)\n : mergeRefs(targetRef, setReferenceEl),\n onClick: (e: MouseEvent<HTMLElement, 'click'>) => {\n trigger.props.onClick?.(e)\n openDropdown()\n },\n tabIndex: 0,\n })}\n <DropdownFlyoutContext.Provider\n value={{\n expand,\n collapse,\n onClick,\n isExpanded,\n isHighlighted,\n optionRenderer,\n }}\n >\n {isOpen && (\n <Portal>\n <FlyoutList\n options={options}\n overlayRef={overlayElRef}\n placement={placement}\n referenceEl={referenceEl}\n offset={4}\n />\n </Portal>\n )}\n </DropdownFlyoutContext.Provider>\n </div>\n )\n})\n"],"mappings":";;;;;;;;;;;;AAAA,SAASA,gBAAgB,QAAQ,0BAA0B;AAC3D,OAAOC,KAAK,MAAsB,OAAO;AAEzC,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,cAAc,QAAQ,sBAAsB;AACrD,SAASC,MAAM,QAAQ,WAAW;AAClC,SAASC,eAAe,QAAQ,wBAAwB;AACxD,SAASC,cAAc,QAAQ,gBAAgB;AAC/C,SAASC,SAAS,QAAQ,qBAAqB;AAE/C,SACEC,qBAAqB,EACrBC,qBAAqB,EACrBC,IAAI,EACJC,eAAe,EACfC,iBAAiB,EACjBC,wBAAwB,QACnB,0BAA0B;AACjC,SACEC,oBAAoB,EACpBC,wBAAwB,QACnB,yBAAyB;AAChC,SAKEC,MAAM,QACD,wBAAwB;AAC/B,SAASC,wBAAwB,QAAQ,4BAA4B;AAErE,OAAO,IAAMC,aAAa,gBAAGjB,KAAK,CAACkB,UAAU,CAG3C,SAASD,aAAaA,CAAAE,IAAA,EAEtBC,GAAG,EACH;EAAA,IAFEC,MAAM,GAAAF,IAAA,CAANE,MAAM;IAAEC,WAAW,GAAAH,IAAA,CAAXG,WAAW;IAAEC,cAAc,GAAAJ,IAAA,CAAdI,cAAc;IAAKC,KAAK,GAAAC,wBAAA,CAAAN,IAAA,EAAAO,SAAA;EAG/C,oBACE1B,KAAA,CAAA2B,aAAA,CAACb,wBAAwB,EAAAc,QAAA,KACnBJ,KAAK;IACTJ,GAAG,EAAEA,GAAI;IACT,oBAAkBE,WAAY;IAC9B;EAAW,IAEVC,cAAc,CAACF,MAAM,CACE,CAA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,SAAAA,QAACM,CAAmC,EAAK;MAAA,IAAA+F,qBAAA,EAAAC,cAAA;MAChD,CAAAD,qBAAA,IAAAC,cAAA,GAAAb,OAAO,CAACvG,KAAK,EAACc,OAAO,cAAAqG,qBAAA,uBAArBA,qBAAA,CAAAE,IAAA,CAAAD,cAAA,EAAwBhG,CAAC,CAAC;MAC1BwE,YAAY,CAAC,CAAC;IAChB,CAAC;IACD0B,QAAQ,EAAE;EACZ,CAAC,CAAC,eACF9I,KAAA,CAAA2B,aAAA,CAACnB,qBAAqB,CAACuI,QAAQ;IAC7BC,KAAK,EAAE;MACLzG,MAAM,EAANA,MAAM;MACNC,QAAQ,EAARA,QAAQ;MACRF,OAAO,EAAPA,OAAO;MACPF,UAAU,EAAVA,UAAU;MACVD,aAAa,EAAbA,aAAa;MACbZ,cAAc,EAAdA;IACF;EAAE,GAED8F,MAAM,iBACLrH,KAAA,CAAA2B,aAAA,CAACxB,MAAM,qBACLH,KAAA,CAAA2B,aAAA,CAACiC,UAAU;IACTC,OAAO,EAAEA,OAAQ;IACjBC,UAAU,EAAE9B,YAAa;IACzB+B,SAAS,EAAEA,SAAU;IACrBV,WAAW,EAAEA,WAAY;IACzBa,MAAM,EAAE;EAAE,CACX,CACK,CAEoB,CAC7B,CAAC;AAEV,CAAC,CAAC"}
@@ -6,18 +6,18 @@ import { getEllipsis } from '../_styles/mixins';
6
6
  import { spacing } from '../_styles/spacing';
7
7
  export var StyledDropdownFlyout = /*#__PURE__*/styled.div.withConfig({
8
8
  displayName: "StyledDropdownFlyout",
9
- componentId: "core-11_23_1__sc-1i79jsg-0"
9
+ componentId: "core-11_23_3__sc-1i79jsg-0"
10
10
  })(["display:flex;flex-wrap:wrap;flex-direction:column;width:100%;max-height:855px;padding:", "px 0;"], spacing.sm);
11
11
  export var StyledDropdownFlyoutItem = /*#__PURE__*/styled.div.withConfig({
12
12
  displayName: "StyledDropdownFlyoutItem",
13
- componentId: "core-11_23_1__sc-1i79jsg-1"
13
+ componentId: "core-11_23_3__sc-1i79jsg-1"
14
14
  })(["display:flex;justify-content:space-between;cursor:pointer;width:100%;padding:", "px ", "px;color:", ";", " &[data-highlighted='true'],&:hover{background-color:", ";}"], spacing.xs, spacing.lg, colors.gray20, getTypographyIntent('body'), colors.gray96);
15
15
  export var StyledDropdownFlyoutLabel = /*#__PURE__*/styled.span.withConfig({
16
16
  displayName: "StyledDropdownFlyoutLabel",
17
- componentId: "core-11_23_1__sc-1i79jsg-2"
17
+ componentId: "core-11_23_3__sc-1i79jsg-2"
18
18
  })(["", ""], getEllipsis());
19
19
  export var StyledDropdownFlyoutExpandIcon = /*#__PURE__*/styled.span.withConfig({
20
20
  displayName: "StyledDropdownFlyoutExpandIcon",
21
- componentId: "core-11_23_1__sc-1i79jsg-3"
21
+ componentId: "core-11_23_3__sc-1i79jsg-3"
22
22
  })(["position:relative;display:inline-flex;align-self:center;flex-shrink:0;margin-left:", "px;white-space:nowrap;", ""], spacing.lg, arrowRight(4, 'black'));
23
23
  //# sourceMappingURL=DropdownFlyout.styles.js.map
@@ -94,7 +94,7 @@ export function MultipleErrors(props) {
94
94
  // make error banner accessible as a styled-components selector
95
95
  export var DropzoneErrorBanner = /*#__PURE__*/styled(DropzoneErrorBannerBase).withConfig({
96
96
  displayName: "DropzoneErrorBanner",
97
- componentId: "core-11_23_1__sc-l4fojb-0"
97
+ componentId: "core-11_23_3__sc-l4fojb-0"
98
98
  })([""]);
99
99
  function DropzoneContainer(_ref3) {
100
100
  var active = _ref3.active,
@@ -9,15 +9,15 @@ import { colors } from '../_styles/colors';
9
9
  import { spacing } from '../_styles/spacing';
10
10
  export var StyledErrorBanner = /*#__PURE__*/styled(ErrorBannerBase).withConfig({
11
11
  displayName: "StyledErrorBanner",
12
- componentId: "core-11_23_1__sc-by95hy-0"
12
+ componentId: "core-11_23_3__sc-by95hy-0"
13
13
  })(["margin-top:", "px;flex-shrink:0;"], spacing.lg);
14
14
  export var StyledErrorBannerDetails = /*#__PURE__*/styled.ul.withConfig({
15
15
  displayName: "StyledErrorBannerDetails",
16
- componentId: "core-11_23_1__sc-by95hy-1"
16
+ componentId: "core-11_23_3__sc-by95hy-1"
17
17
  })(["margin:", "px;padding:0;list-style-position:inside;list-style-type:disc;"], spacing.xs);
18
18
  export var StyledDropzoneIcon = /*#__PURE__*/styled.div.withConfig({
19
19
  displayName: "StyledDropzoneIcon",
20
- componentId: "core-11_23_1__sc-by95hy-2"
20
+ componentId: "core-11_23_3__sc-by95hy-2"
21
21
  })(["display:flex;justify-content:center;align-items:center;height:64px;color:", ";margin-bottom:", "px;transition:all 250ms ease-out;", " svg{width:auto;height:100%;}"], colors.gray45, spacing.lg, function (_ref) {
22
22
  var disabled = _ref.disabled;
23
23
  return disabled && css(["height:72px;margin-bottom:", "px;"], spacing.sm);
@@ -26,7 +26,7 @@ var activeDropzone = /*#__PURE__*/css(["outline:none;border:2px dashed ", ";back
26
26
  var disabledDropzone = /*#__PURE__*/css(["color:", ";border:2px dashed ", ";background-color:", ";cursor:not-allowed;& ", "{color:", ";transform:none;}"], colors.gray70, colors.gray85, colors.gray98, StyledDropzoneIcon, colors.gray85);
27
27
  export var StyledDropzoneContainer = /*#__PURE__*/styled.div.withConfig({
28
28
  displayName: "StyledDropzoneContainer",
29
- componentId: "core-11_23_1__sc-by95hy-3"
29
+ componentId: "core-11_23_3__sc-by95hy-3"
30
30
  })(["", " display:inline-flex;justify-content:center;align-items:center;box-sizing:border-box;width:100%;height:100%;min-height:92px;padding:", "px;color:", ";border:2px dashed ", ";background-color:", ";border-radius:", "px;text-align:center;letter-spacing:0.25px;transition:all 250ms ease-out;cursor:grab;", " ", " ", " ", ""], getTypographyIntent('body'), spacing.lg, colors.gray40, colors.gray70, colors.gray96, borderRadius.md, function (_ref2) {
31
31
  var disabled = _ref2.disabled;
32
32
  return !disabled && css(["&:hover{", "}"], activeDropzone);
@@ -43,25 +43,25 @@ export var StyledDropzoneContainer = /*#__PURE__*/styled.div.withConfig({
43
43
  });
44
44
  export var StyledDropzoneMessage = /*#__PURE__*/styled.div.withConfig({
45
45
  displayName: "StyledDropzoneMessage",
46
- componentId: "core-11_23_1__sc-by95hy-4"
46
+ componentId: "core-11_23_3__sc-by95hy-4"
47
47
  })(["user-select:none;"]);
48
48
  export var StyledUploadButton = /*#__PURE__*/styled(Button).withConfig({
49
49
  displayName: "StyledUploadButton",
50
- componentId: "core-11_23_1__sc-by95hy-5"
50
+ componentId: "core-11_23_3__sc-by95hy-5"
51
51
  })(["display:block;margin-left:auto;margin-right:auto;margin-bottom:", "px;"], spacing.sm);
52
52
  export var StyledDropzoneCaption = /*#__PURE__*/styled.span.withConfig({
53
53
  displayName: "StyledDropzoneCaption",
54
- componentId: "core-11_23_1__sc-by95hy-6"
54
+ componentId: "core-11_23_3__sc-by95hy-6"
55
55
  })(["color:", ";"], function (_ref6) {
56
56
  var error = _ref6.error;
57
57
  return error && colors.gray15;
58
58
  });
59
59
  export var StyledDropzoneWrapper = /*#__PURE__*/styled(Flex).withConfig({
60
60
  displayName: "StyledDropzoneWrapper",
61
- componentId: "core-11_23_1__sc-by95hy-7"
61
+ componentId: "core-11_23_3__sc-by95hy-7"
62
62
  })(["height:100%;"]);
63
63
  export var StyledDropzoneFocusDetector = /*#__PURE__*/styled(Box).withConfig({
64
64
  displayName: "StyledDropzoneFocusDetector",
65
- componentId: "core-11_23_1__sc-by95hy-8"
65
+ componentId: "core-11_23_3__sc-by95hy-8"
66
66
  })(["height:100%;"]);
67
67
  //# sourceMappingURL=Dropzone.styles.js.map
@@ -6,27 +6,27 @@ var emptyStateWidth = 440;
6
6
  var emptyStateWidthCompact = 352;
7
7
  export var StyledSvg = /*#__PURE__*/styled.svg.withConfig({
8
8
  displayName: "StyledSvg",
9
- componentId: "core-11_23_1__sc-1xaoo8n-0"
9
+ componentId: "core-11_23_3__sc-1xaoo8n-0"
10
10
  })(["width:200px;height:200px;"]);
11
11
  export var StyledImage = /*#__PURE__*/styled.div.withConfig({
12
12
  displayName: "StyledImage",
13
- componentId: "core-11_23_1__sc-1xaoo8n-1"
13
+ componentId: "core-11_23_3__sc-1xaoo8n-1"
14
14
  })([""]);
15
15
  export var StyledTitle = /*#__PURE__*/styled.div.withConfig({
16
16
  displayName: "StyledTitle",
17
- componentId: "core-11_23_1__sc-1xaoo8n-2"
17
+ componentId: "core-11_23_3__sc-1xaoo8n-2"
18
18
  })(["margin-top:", "px;text-align:center;color:", ";width:", "px;", ""], spacing.xl, colors.gray15, emptyStateWidth, getTypographyIntent('h2'));
19
19
  export var StyledDescription = /*#__PURE__*/styled.div.withConfig({
20
20
  displayName: "StyledDescription",
21
- componentId: "core-11_23_1__sc-1xaoo8n-3"
21
+ componentId: "core-11_23_3__sc-1xaoo8n-3"
22
22
  })(["margin-top:", "px;text-align:center;color:", ";width:", "px;", ""], spacing.lg, colors.gray45, emptyStateWidth, getTypographyIntent('h3'));
23
23
  export var StyledActions = /*#__PURE__*/styled.div.withConfig({
24
24
  displayName: "StyledActions",
25
- componentId: "core-11_23_1__sc-1xaoo8n-4"
25
+ componentId: "core-11_23_3__sc-1xaoo8n-4"
26
26
  })(["margin-top:", "px;"], spacing.xl);
27
27
  export var StyledEmptyState = /*#__PURE__*/styled.div.withConfig({
28
28
  displayName: "StyledEmptyState",
29
- componentId: "core-11_23_1__sc-1xaoo8n-5"
29
+ componentId: "core-11_23_3__sc-1xaoo8n-5"
30
30
  })(["display:flex;justify-content:center;align-items:center;flex-direction:column;margin-top:", "px;margin-bottom:", "px;", "{> img{max-width:200px;}}", "}"], function (_ref) {
31
31
  var compact = _ref.compact;
32
32
  return compact ? 0 : 96;
@@ -2,14 +2,14 @@ import styled from 'styled-components';
2
2
  import { getSmallIconBodyTextRules, StyledP } from '../Semantic/Semantic.styles';
3
3
  export var StyledField = /*#__PURE__*/styled.div.withConfig({
4
4
  displayName: "StyledField",
5
- componentId: "core-11_23_1__sc-1q3pe6s-0"
5
+ componentId: "core-11_23_3__sc-1q3pe6s-0"
6
6
  })(["> ", "{", "}"], StyledP, getSmallIconBodyTextRules);
7
7
  export var StyledFieldHeader = /*#__PURE__*/styled.div.withConfig({
8
8
  displayName: "StyledFieldHeader",
9
- componentId: "core-11_23_1__sc-1q3pe6s-1"
9
+ componentId: "core-11_23_3__sc-1q3pe6s-1"
10
10
  })(["", " > ", "{", "}"], getSmallIconBodyTextRules, StyledP, getSmallIconBodyTextRules);
11
11
  export var StyledFieldFooter = /*#__PURE__*/styled.div.withConfig({
12
12
  displayName: "StyledFieldFooter",
13
- componentId: "core-11_23_1__sc-1q3pe6s-2"
13
+ componentId: "core-11_23_3__sc-1q3pe6s-2"
14
14
  })(["> ", "{", "}"], StyledP, getSmallIconBodyTextRules);
15
15
  //# sourceMappingURL=Field.styles.js.map
@@ -3,18 +3,18 @@ import { LinkButton } from '../Button/Button';
3
3
  import { spacing } from '../_styles/spacing';
4
4
  export var StyledFileListDownloadAll = /*#__PURE__*/styled(LinkButton).withConfig({
5
5
  displayName: "StyledFileListDownloadAll",
6
- componentId: "core-11_23_1__sc-7gltjc-0"
6
+ componentId: "core-11_23_3__sc-7gltjc-0"
7
7
  })(["margin-bottom:", "px;"], spacing.xs);
8
8
  export var StyledFileListItem = /*#__PURE__*/styled.li.withConfig({
9
9
  displayName: "StyledFileListItem",
10
- componentId: "core-11_23_1__sc-7gltjc-1"
10
+ componentId: "core-11_23_3__sc-7gltjc-1"
11
11
  })(["display:flex;align-items:center;margin-bottom:", "px;word-break:break-word;&:last-child{margin-bottom:0;}"], spacing.xs);
12
12
  export var StyledFileListItemTextInactive = /*#__PURE__*/styled.span.withConfig({
13
13
  displayName: "StyledFileListItemTextInactive",
14
- componentId: "core-11_23_1__sc-7gltjc-2"
14
+ componentId: "core-11_23_3__sc-7gltjc-2"
15
15
  })(["cursor:pointer;"]);
16
16
  export var StyledFileListItemDownloadIcon = /*#__PURE__*/styled(LinkButton).withConfig({
17
17
  displayName: "StyledFileListItemDownloadIcon",
18
- componentId: "core-11_23_1__sc-7gltjc-3"
18
+ componentId: "core-11_23_3__sc-7gltjc-3"
19
19
  })(["margin-left:", "px;align-self:flex-start;"], spacing.sm);
20
20
  //# sourceMappingURL=FileList.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FileExplorer.js","names":["React","Button","Modal","Tooltip","Typography","useI18nContext","FileExplorerSidebar","StyledAttachButton","StyledModalBody","StyledModalContent","StyledModalHeader","StyledModalInnerBody","StyledSource","FileExplorerModal","FileExplorer","forwardRef","_ref","ref","_ref$maxFileNumber","maxFileNumber","Infinity","children","onSubmit","sources","isOpen","currentSource","onCurrentSourceChange","onCancel","unsubmittedValueCount","qa","props","_objectWithoutProperties","_excluded","I18n","hasPendingUploadSources","some","_ref2","isUploading","isAttachButtonDisabled","createElement","_extends","open","onKeyDown","e","key","onClose","t","value","onChange","tabIndex","Footer","FooterNotation","color","italic","count","FooterButtons","cancelButton","variant","onClick","showKeys","trigger","overlay","attachButton","disabled"],"sources":["../../../src/FileSelect/FileExplorer/FileExplorer.tsx"],"sourcesContent":["import React from 'react'\nimport { Button } from '../../Button/Button'\nimport { Modal } from '../../Modal/Modal'\nimport { PortalProps } from '../../Portal/Portal.types'\nimport { Tooltip } from '../../Tooltip/Tooltip'\nimport { Typography } from '../../Typography/Typography'\nimport { useI18nContext } from '../../_hooks/I18n'\nimport { FileExplorerSidebar } from '../FileExplorer/FileExplorerSidebar'\nimport {\n StyledAttachButton,\n StyledModalBody,\n StyledModalContent,\n StyledModalHeader,\n StyledModalInnerBody,\n StyledSource,\n} from './FileExplorer.styles'\nimport { FileExplorerProps } from './FileExplorer.types'\nimport { FileExplorerModal } from './FileExplorerModal'\n\nexport const FileExplorer = React.forwardRef<HTMLDivElement, FileExplorerProps & PortalProps>(\n function FileExplorer(\n {\n maxFileNumber = Infinity,\n children,\n onSubmit,\n sources,\n isOpen,\n currentSource,\n onCurrentSourceChange,\n onCancel,\n unsubmittedValueCount,\n qa,\n ...props\n },\n ref\n ) {\n const I18n = useI18nContext()\n const hasPendingUploadSources = sources.some(\n ({ isUploading }) => isUploading\n )\n\n const isAttachButtonDisabled =\n hasPendingUploadSources || unsubmittedValueCount === 0\n\n return (\n <FileExplorerModal\n {...props}\n ref={ref}\n open={isOpen}\n onKeyDown={(e) => {\n if (e.key === 'Esc' || e.key === 'Escape') {\n onCancel()\n }\n }}\n >\n <StyledModalHeader\n onClose={() => {\n onCancel()\n }}\n >\n {I18n.t('core.fileExplorer.modalTitle')}\n </StyledModalHeader>\n <StyledModalBody>\n <StyledModalInnerBody>\n <FileExplorerSidebar\n value={currentSource}\n onChange={onCurrentSourceChange}\n sources={sources}\n isOpen={isOpen}\n />\n {/* prevent <div /> from being focused in FF: https://bugzilla.mozilla.org/show_bug.cgi?id=616594 */}\n <StyledModalContent tabIndex={-1}>\n <StyledSource>{children}</StyledSource>\n </StyledModalContent>\n </StyledModalInnerBody>\n </StyledModalBody>\n <Modal.Footer>\n <Modal.FooterNotation>\n <Typography color=\"gray45\" italic>\n {maxFileNumber === Infinity\n ? I18n.t('core.fileExplorer.filesSelected', {\n count: unsubmittedValueCount,\n })\n : I18n.t('core.fileExplorer.filesSelectedWithLimit', {\n count: unsubmittedValueCount,\n maxFileNumber: maxFileNumber,\n })}\n </Typography>\n </Modal.FooterNotation>\n <Modal.FooterButtons>\n <Button\n data-qa={qa?.cancelButton}\n variant=\"tertiary\"\n onClick={() => {\n onCancel()\n }}\n >\n {I18n.t('core.fileExplorer.cancelAction')}\n </Button>\n <Tooltip\n showKeys={[]}\n trigger={isAttachButtonDisabled ? 'hover' : 'none'}\n overlay={\n hasPendingUploadSources\n ? I18n.t('core.fileExplorer.filesPendingUpload')\n : I18n.t('core.fileExplorer.noSelectedItems')\n }\n >\n {/* this wrapper is required for the tooltip to work with disabled button */}\n <StyledAttachButton>\n <Button\n data-qa={qa?.attachButton}\n variant=\"primary\"\n disabled={isAttachButtonDisabled}\n onClick={() => {\n onSubmit?.()\n }}\n >\n {I18n.t('core.fileExplorer.attachAction')}\n </Button>\n </StyledAttachButton>\n </Tooltip>\n </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ltip","Typography","useI18nContext","FileExplorerSidebar","StyledAttachButton","StyledModalBody","StyledModalContent","StyledModalHeader","StyledModalInnerBody","StyledSource","FileExplorerModal","FileExplorer","forwardRef","_ref","ref","_ref$maxFileNumber","maxFileNumber","Infinity","children","onSubmit","sources","isOpen","currentSource","onCurrentSourceChange","onCancel","unsubmittedValueCount","qa","props","_objectWithoutProperties","_excluded","I18n","hasPendingUploadSources","some","_ref2","isUploading","isAttachButtonDisabled","createElement","_extends","open","onKeyDown","e","key","onClose","t","value","onChange","tabIndex","Footer","FooterNotation","color","italic","count","FooterButtons","cancelButton","variant","onClick","showKeys","trigger","overlay","attachButton","disabled"],"sources":["../../../src/FileSelect/FileExplorer/FileExplorer.tsx"],"sourcesContent":["import React from 'react'\nimport { Button } from '../../Button/Button'\nimport { Modal } from '../../Modal/Modal'\nimport { PortalProps } from '../../Portal/Portal.types'\nimport { Tooltip } from '../../Tooltip/Tooltip'\nimport { Typography } from '../../Typography/Typography'\nimport { useI18nContext } from '../../_hooks/I18n'\nimport { FileExplorerSidebar } from '../FileExplorer/FileExplorerSidebar'\nimport {\n StyledAttachButton,\n StyledModalBody,\n StyledModalContent,\n StyledModalHeader,\n StyledModalInnerBody,\n StyledSource,\n} from './FileExplorer.styles'\nimport { FileExplorerProps } from './FileExplorer.types'\nimport { FileExplorerModal } from './FileExplorerModal'\n\nexport const FileExplorer = React.forwardRef<\n HTMLDivElement,\n FileExplorerProps & PortalProps\n>(function FileExplorer(\n {\n maxFileNumber = Infinity,\n children,\n onSubmit,\n sources,\n isOpen,\n currentSource,\n onCurrentSourceChange,\n onCancel,\n unsubmittedValueCount,\n qa,\n ...props\n },\n ref\n) {\n const I18n = useI18nContext()\n const hasPendingUploadSources = sources.some(({ isUploading }) => isUploading)\n\n const isAttachButtonDisabled =\n hasPendingUploadSources || unsubmittedValueCount === 0\n\n return (\n <FileExplorerModal\n {...props}\n ref={ref}\n open={isOpen}\n onKeyDown={(e) => {\n if (e.key === 'Esc' || e.key === 'Escape') {\n onCancel()\n }\n }}\n >\n <StyledModalHeader\n onClose={() => {\n onCancel()\n }}\n >\n {I18n.t('core.fileExplorer.modalTitle')}\n </StyledModalHeader>\n <StyledModalBody>\n <StyledModalInnerBody>\n <FileExplorerSidebar\n value={currentSource}\n onChange={onCurrentSourceChange}\n sources={sources}\n isOpen={isOpen}\n />\n {/* prevent <div /> from being focused in FF: https://bugzilla.mozilla.org/show_bug.cgi?id=616594 */}\n <StyledModalContent tabIndex={-1}>\n <StyledSource>{children}</StyledSource>\n </StyledModalContent>\n </StyledModalInnerBody>\n </StyledModalBody>\n <Modal.Footer>\n <Modal.FooterNotation>\n <Typography color=\"gray45\" italic>\n {maxFileNumber === Infinity\n ? I18n.t('core.fileExplorer.filesSelected', {\n count: unsubmittedValueCount,\n })\n : I18n.t('core.fileExplorer.filesSelectedWithLimit', {\n count: unsubmittedValueCount,\n maxFileNumber: maxFileNumber,\n })}\n </Typography>\n </Modal.FooterNotation>\n <Modal.FooterButtons>\n <Button\n data-qa={qa?.cancelButton}\n variant=\"tertiary\"\n onClick={() => {\n onCancel()\n }}\n >\n {I18n.t('core.fileExplorer.cancelAction')}\n </Button>\n <Tooltip\n showKeys={[]}\n trigger={isAttachButtonDisabled ? 'hover' : 'none'}\n overlay={\n hasPendingUploadSources\n ? I18n.t('core.fileExplorer.filesPendingUpload')\n : I18n.t('core.fileExplorer.noSelectedItems')\n }\n >\n {/* this wrapper is required for the tooltip to work with disabled button */}\n <StyledAttachButton>\n <Button\n data-qa={qa?.attachButton}\n variant=\"primary\"\n disabled={isAttachButtonDisabled}\n onClick={() => {\n onSubmit?.()\n }}\n >\n {I18n.t('core.fileExplorer.attachAction')}\n </Button>\n </StyledAttachButton>\n </Tooltip>\n </Modal.FooterButtons>\n </Modal.Footer>\n </FileExplorerModal>\n )\n})\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,MAAM,QAAQ,qBAAqB;AAC5C,SAASC,KAAK,QAAQ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AAqB;IAC5BT,aAAa,EAAEA;EACjB,CAAC,CACK,CACQ,CAAC,eACvBnB,KAAA,CAAAuC,aAAA,CAACrC,KAAK,CAACqD,aAAa,qBAClBvD,KAAA,CAAAuC,aAAA,CAACtC,MAAM;IACL,WAAS4B,EAAE,aAAFA,EAAE,uBAAFA,EAAE,CAAE2B,YAAa;IAC1BC,OAAO,EAAC,UAAU;IAClBC,OAAO,EAAE,SAAAA,QAAA,EAAM;MACb/B,QAAQ,CAAC,CAAC;IACZ;EAAE,GAEDM,IAAI,CAACa,CAAC,CAAC,gCAAgC,CAClC,CAAC,eACT9C,KAAA,CAAAuC,aAAA,CAACpC,OAAO;IACNwD,QAAQ,EAAE,EAAG;IACbC,OAAO,EAAEtB,sBAAsB,GAAG,OAAO,GAAG,MAAO;IACnDuB,OAAO,EACL3B,uBAAuB,GACnBD,IAAI,CAACa,CAAC,CAAC,sCAAsC,CAAC,GAC9Cb,IAAI,CAACa,CAAC,CAAC,mCAAmC;EAC/C,gBAGD9C,KAAA,CAAAuC,aAAA,CAAChC,kBAAkB,qBACjBP,KAAA,CAAAuC,aAAA,CAACtC,MAAM;IACL,WAAS4B,EAAE,aAAFA,EAAE,uBAAFA,EAAE,CAAEiC,YAAa;IAC1BL,OAAO,EAAC,SAAS;IACjBM,QAAQ,EAAEzB,sBAAuB;IACjCoB,OAAO,EAAE,SAAAA,QAAA,EAAM;MACbpC,QAAQ,aAARA,QAAQ,uBAARA,QAAQ,CAAG,CAAC;IACd;EAAE,GAEDW,IAAI,CAACa,CAAC,CAAC,gCAAgC,CAClC,CACU,CACb,CACU,CACT,CACG,CAAC;AAExB,CAAC,CAAC"}
@@ -12,40 +12,40 @@ var modalContainerMaxHeight = 996;
12
12
  var modalContainerMargin = 80;
13
13
  export var StyledModalOverlay = /*#__PURE__*/styled(Modal.Overlay).withConfig({
14
14
  displayName: "StyledModalOverlay",
15
- componentId: "core-11_23_1__sc-343gts-0"
15
+ componentId: "core-11_23_3__sc-343gts-0"
16
16
  })(["opacity:0;pointer-events:none;transition:opacity 0.3s linear;visibility:hidden;", ""], function (props) {
17
17
  return props.$open && "\n opacity: 1;\n pointer-events: all;\n visibility: visible;\n ";
18
18
  });
19
19
  export var StyledModalContainer = /*#__PURE__*/styled(Modal.Container).withConfig({
20
20
  displayName: "StyledModalContainer",
21
- componentId: "core-11_23_1__sc-343gts-1"
21
+ componentId: "core-11_23_3__sc-343gts-1"
22
22
  })(["width:calc(100% - ", "px);height:calc(100% - ", "px);top:calc(50vh - ", "px);left:calc(50vw - ", "px);margin:", "px;min-width:", "px;min-height:", "px;max-width:", "px;max-height:", "px;"], modalContainerMargin * 2, modalContainerMargin * 2, modalContainerMargin, modalContainerMargin, modalContainerMargin, modalContainerMinWidth, modalContainerMinHeight, modalContainerMaxWidth, modalContainerMaxHeight);
23
23
  export var StyledModalBody = /*#__PURE__*/styled(Modal.Body).withConfig({
24
24
  displayName: "StyledModalBody",
25
- componentId: "core-11_23_1__sc-343gts-2"
25
+ componentId: "core-11_23_3__sc-343gts-2"
26
26
  })(["min-height:", "px;height:100%;margin:0;max-width:none;padding:0;border-bottom:1px solid ", ";"], modalBodyMinHeight, colors.gray85);
27
27
  export var StyledModalInnerBody = /*#__PURE__*/styled.div.withConfig({
28
28
  displayName: "StyledModalInnerBody",
29
- componentId: "core-11_23_1__sc-343gts-3"
29
+ componentId: "core-11_23_3__sc-343gts-3"
30
30
  })(["display:flex;flex-direction:row;height:100%;overflow:hidden;"]);
31
31
  export var StyledModalHeader = /*#__PURE__*/styled(Modal.Header).withConfig({
32
32
  displayName: "StyledModalHeader",
33
- componentId: "core-11_23_1__sc-343gts-4"
33
+ componentId: "core-11_23_3__sc-343gts-4"
34
34
  })(["border-bottom:1px solid ", ";"], colors.gray85);
35
35
  export var StyledModalContent = /*#__PURE__*/styled.div.withConfig({
36
36
  displayName: "StyledModalContent",
37
- componentId: "core-11_23_1__sc-343gts-5"
37
+ componentId: "core-11_23_3__sc-343gts-5"
38
38
  })(["display:flex;width:100%;height:100%;overflow-y:auto;outline:none;"]);
39
39
  export var StyledSource = /*#__PURE__*/styled.div.withConfig({
40
40
  displayName: "StyledSource",
41
- componentId: "core-11_23_1__sc-343gts-6"
41
+ componentId: "core-11_23_3__sc-343gts-6"
42
42
  })(["width:100%;height:100%;"]);
43
43
  export var StyledAttachButton = /*#__PURE__*/styled.div.withConfig({
44
44
  displayName: "StyledAttachButton",
45
- componentId: "core-11_23_1__sc-343gts-7"
45
+ componentId: "core-11_23_3__sc-343gts-7"
46
46
  })(["margin-left:", "px;"], spacing.md);
47
47
  export var StyledFileTreeSpinner = /*#__PURE__*/styled.div.withConfig({
48
48
  displayName: "StyledFileTreeSpinner",
49
- componentId: "core-11_23_1__sc-343gts-8"
49
+ componentId: "core-11_23_3__sc-343gts-8"
50
50
  })(["display:flex;align-items:center;justify-content:center;height:100%;"]);
51
51
  //# sourceMappingURL=FileExplorer.styles.js.map
@@ -3,14 +3,14 @@ import { colors } from '../../_styles/colors';
3
3
  import { SourceItem } from '../SourceItem/SourceItem';
4
4
  export var StyledSidebar = /*#__PURE__*/styled.div.withConfig({
5
5
  displayName: "StyledSidebar",
6
- componentId: "core-11_23_1__sc-s03uiv-0"
6
+ componentId: "core-11_23_3__sc-s03uiv-0"
7
7
  })(["display:flex;flex-shrink:0;width:300px;border-right:1px solid ", ";"], colors.gray85);
8
8
  export var StyledNavigation = /*#__PURE__*/styled.div.withConfig({
9
9
  displayName: "StyledNavigation",
10
- componentId: "core-11_23_1__sc-s03uiv-1"
10
+ componentId: "core-11_23_3__sc-s03uiv-1"
11
11
  })(["display:flex;flex-direction:column;width:100%;&:focus{outline:none;}"]);
12
12
  export var StyledSourceItem = /*#__PURE__*/styled(SourceItem).withConfig({
13
13
  displayName: "StyledSourceItem",
14
- componentId: "core-11_23_1__sc-s03uiv-2"
14
+ componentId: "core-11_23_3__sc-s03uiv-2"
15
15
  })(["width:100%;padding-left:10px;&:focus{padding-left:9px;}"]);
16
16
  //# sourceMappingURL=FileExplorerSidebar.styles.js.map
@@ -1,7 +1,7 @@
1
1
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
2
  var _excluded = ["onAdd", "beforeLocalFileUpload", "onRemove", "onProgress", "onUploadStateChange", "onError", "onFileTokenClick", "afterHide", "dropzoneContentRenderer", "hideDropzone", "getTokenLabel", "hideLocalSource", "localSourceDropzoneContentRenderer", "maxFileNumber", "maxFileSize", "minFileSize", "accept", "getEndpoint", "getMethod", "getPayloadKey", "getPayload", "getHeaders", "uploadFile", "children", "qa"];
3
3
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
- function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
4
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return { value: void 0, done: !0 }; } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable || "" === iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } throw new TypeError(_typeof(iterable) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
5
5
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
6
6
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
7
7
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }