@procore/core-react 12.23.0 → 12.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (246) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/dist/AnchorNavigation/AnchorNavigation.styles.js +3 -3
  3. package/dist/Avatar/Avatar.styles.js +5 -5
  4. package/dist/AvatarStack/AvatarStack.styles.js +7 -7
  5. package/dist/Badge/Badge.styles.js +2 -2
  6. package/dist/BadgePill/BadgePill.styles.js +4 -4
  7. package/dist/Banner/Banner.styles.js +10 -10
  8. package/dist/Box/Box.styles.js +1 -1
  9. package/dist/Breadcrumbs/Breadcrumbs.styles.js +4 -4
  10. package/dist/Button/Button.styles.js +5 -5
  11. package/dist/Calendar/Calendar.styles.js +8 -8
  12. package/dist/Card/Card.styles.js +1 -1
  13. package/dist/Checkbox/Checkbox.styles.js +6 -6
  14. package/dist/Checkbox/CheckboxTooltip.js +1 -1
  15. package/dist/ContactItem/ContactItem.styles.js +5 -5
  16. package/dist/Content/Content.styles.js +2 -2
  17. package/dist/DateInput/DateInput.styles.js +6 -6
  18. package/dist/DetailPage/DetailPage.styles.js +7 -7
  19. package/dist/Dropdown/Dropdown.styles.js +3 -3
  20. package/dist/DropdownFlyout/DropdownFlyout.styles.js +4 -4
  21. package/dist/Dropzone/Dropzone.js +1 -1
  22. package/dist/Dropzone/Dropzone.styles.js +9 -9
  23. package/dist/EmptyState/EmptyState.styles.js +6 -6
  24. package/dist/Field/Field.styles.js +3 -3
  25. package/dist/FileList/FileList.styles.js +4 -4
  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.styles.js +2 -2
  29. package/dist/FileSelect/FileSelectDropzone/FileSelectDropzone.styles.js +3 -3
  30. package/dist/FileSelect/FileTokenList/FileTokenList.styles.js +2 -2
  31. package/dist/FileSelect/GridSource/GridSource.styles.js +6 -6
  32. package/dist/FileSelect/LocalSource/LocalSource.styles.js +4 -4
  33. package/dist/FileSelect/SourceItem/SourceItem.styles.js +3 -3
  34. package/dist/FileSelect/ThumbnailList/ThumbnailList.styles.js +6 -6
  35. package/dist/FileSelect/TreeSource/TreeSource.styles.js +1 -1
  36. package/dist/FileToken/FileToken.styles.js +4 -4
  37. package/dist/FilterToken/FilterToken.styles.js +5 -5
  38. package/dist/FlexList/FlexList.styles.js +1 -1
  39. package/dist/Form/Form.styles.js +14 -14
  40. package/dist/Form/StyledFormikForm.styles.js +2 -2
  41. package/dist/Form/stories/util.js +3 -0
  42. package/dist/Form/stories/util.js.map +1 -1
  43. package/dist/GhostPlaceholder/GhostPlaceholder.styles.js +2 -2
  44. package/dist/Grid/Grid.styles.js +2 -2
  45. package/dist/GroupSelect/GroupSelect.styles.js +1 -1
  46. package/dist/Input/Input.styles.js +1 -1
  47. package/dist/Link/Link.styles.js +1 -1
  48. package/dist/ListPage/ListPage.styles.js +8 -8
  49. package/dist/Loader/Loader.styles.js +2 -2
  50. package/dist/Loader/Loader.types.d.ts +3 -2
  51. package/dist/Loader/Loader.types.js.map +1 -1
  52. package/dist/Menu/Menu.js +2 -0
  53. package/dist/Menu/Menu.js.map +1 -1
  54. package/dist/MenuImperative/MenuImperative.styles.js +10 -10
  55. package/dist/Modal/Modal.js +1 -0
  56. package/dist/Modal/Modal.js.map +1 -1
  57. package/dist/Modal/Modal.styles.js +13 -13
  58. package/dist/Modal/storyHelpers.d.ts +1 -0
  59. package/dist/Modal/storyHelpers.js +160 -85
  60. package/dist/Modal/storyHelpers.js.map +1 -1
  61. package/dist/MultiSelect/MultiSelect.styles.js +6 -6
  62. package/dist/NextMenu/NextMenu.styles.js +3 -3
  63. package/dist/NextTile/NextTile.js +29 -4
  64. package/dist/NextTile/NextTile.js.map +1 -1
  65. package/dist/NextTile/NextTile.types.d.ts +15 -0
  66. package/dist/NextTile/NextTile.types.js.map +1 -1
  67. package/dist/NextTile/index.d.ts +2 -0
  68. package/dist/NextTile/index.js +2 -0
  69. package/dist/NextTile/index.js.map +1 -0
  70. package/dist/Notation/Notation.js +1 -1
  71. package/dist/NumberInput/NumberInput.js +2 -0
  72. package/dist/NumberInput/NumberInput.js.map +1 -1
  73. package/dist/NumberInput/NumberInput.styles.js +7 -7
  74. package/dist/Overlay/OverlayArrow.styles.js +1 -1
  75. package/dist/OverlayTrigger/OverlayTrigger.js +6 -2
  76. package/dist/OverlayTrigger/OverlayTrigger.js.map +1 -1
  77. package/dist/OverlayTrigger/OverlayTrigger.types.d.ts +7 -2
  78. package/dist/OverlayTrigger/OverlayTrigger.types.js.map +1 -1
  79. package/dist/PageLayout/PageLayout.styles.js +16 -16
  80. package/dist/PageTemplate/PageFooterTemplate/PageFooterTemplate.styles.js +1 -1
  81. package/dist/PageTemplate/PageHeaderTemplate/PageHeaderTemplate.styles.js +3 -3
  82. package/dist/PageTemplate/PagePaneTemplate/PagePaneTemplate.styles.js +2 -2
  83. package/dist/PageTemplate/PageTemplate/PageTemplate.styles.js +3 -3
  84. package/dist/Pagination/Pagination.styles.js +5 -5
  85. package/dist/Pagination/PaginationSelect.js +1 -0
  86. package/dist/Pagination/PaginationSelect.js.map +1 -1
  87. package/dist/Panel/Panel.js +6 -4
  88. package/dist/Panel/Panel.js.map +1 -1
  89. package/dist/Panel/Panel.styles.js +11 -11
  90. package/dist/Pill/Pill.styles.js +2 -2
  91. package/dist/PillSelect/PillSelect.styles.js +4 -4
  92. package/dist/Popover/Popover.styles.js +2 -2
  93. package/dist/Portal/Portal.styles.js +1 -1
  94. package/dist/ProgressBar/ProgressBar.styles.js +2 -2
  95. package/dist/ProgressBar/ProgressBar.types.d.ts +1 -1
  96. package/dist/ProgressBar/ProgressBar.types.js.map +1 -1
  97. package/dist/RadioButton/RadioButton.styles.js +3 -3
  98. package/dist/Required/Required.styles.js +3 -3
  99. package/dist/Search/Search.styles.js +5 -5
  100. package/dist/Section/Section.styles.js +7 -7
  101. package/dist/SegmentedController/SegmentedController.d.ts +5 -0
  102. package/dist/SegmentedController/SegmentedController.js +49 -30
  103. package/dist/SegmentedController/SegmentedController.js.map +1 -1
  104. package/dist/SegmentedController/SegmentedController.styles.js +4 -4
  105. package/dist/Select/Select.styles.js +7 -7
  106. package/dist/Semantic/Semantic.styles.js +9 -9
  107. package/dist/Slider/Slider.styles.js +5 -5
  108. package/dist/Spinner/Spinner.js +14 -5
  109. package/dist/Spinner/Spinner.js.map +1 -1
  110. package/dist/Spinner/Spinner.styles.js +7 -7
  111. package/dist/SplitViewCard/SplitViewCard.styles.js +8 -8
  112. package/dist/SuperSelect/SuperSelect.js +1 -1
  113. package/dist/SuperSelect/SuperSelect.js.map +1 -1
  114. package/dist/SuperSelect/SuperSelect.presets.styles.js +1 -1
  115. package/dist/SuperSelect/SuperSelect.styles.js +37 -37
  116. package/dist/Switch/Switch.styles.js +4 -4
  117. package/dist/Table/Table.styles.js +28 -28
  118. package/dist/TableShelf/TableShelf.styles.js +5 -5
  119. package/dist/Tabs/Tabs.styles.js +15 -15
  120. package/dist/Tearsheet/Tearsheet.styles.js +5 -5
  121. package/dist/TextArea/TextArea.styles.js +1 -1
  122. package/dist/TextEditorOutput/TextEditorOutput.styles.js +1 -1
  123. package/dist/Thumbnail/Thumbnail.styles.js +17 -17
  124. package/dist/ThumbnailGrid/ThumbnailGrid.styles.js +7 -7
  125. package/dist/TieredSelect/TieredSelect.styles.js +9 -9
  126. package/dist/Tile/Tile.styles.d.ts +1 -0
  127. package/dist/Tile/Tile.styles.js +19 -12
  128. package/dist/Tile/Tile.styles.js.map +1 -1
  129. package/dist/Tile/index.d.ts +1 -1
  130. package/dist/Tile/index.js.map +1 -1
  131. package/dist/Title/Title.styles.js +7 -7
  132. package/dist/Toast/Toast.styles.js +3 -3
  133. package/dist/ToggleButton/ToggleButton.styles.js +1 -1
  134. package/dist/Token/Token.styles.js +3 -3
  135. package/dist/ToolHeader/ToolHeader.styles.js +6 -6
  136. package/dist/ToolLandingPage/ToolLandingPage.styles.js +3 -3
  137. package/dist/Tooltip/Tooltip.styles.js +2 -2
  138. package/dist/Tree/Tree.styles.js +9 -9
  139. package/dist/Typeahead/Typeahead.styles.js +3 -3
  140. package/dist/Typography/Typography.styles.js +1 -1
  141. package/dist/Typography/Typography.table.story.js +2 -2
  142. package/dist/_hooks/I18n.d.ts +48 -0
  143. package/dist/_locales/de-DE.json +4 -1
  144. package/dist/_locales/en-AU.json +3 -0
  145. package/dist/_locales/en-CA.json +3 -0
  146. package/dist/_locales/en-GB.json +3 -0
  147. package/dist/_locales/en.json +3 -0
  148. package/dist/_locales/es-ES.json +4 -1
  149. package/dist/_locales/es.json +3 -0
  150. package/dist/_locales/fr-CA.json +6 -3
  151. package/dist/_locales/fr-FR.json +4 -1
  152. package/dist/_locales/is-IS.json +3 -0
  153. package/dist/_locales/it-IT.json +3 -0
  154. package/dist/_locales/ja-JP.json +3 -0
  155. package/dist/_locales/pl-PL.json +3 -0
  156. package/dist/_locales/pseudo.json +3 -0
  157. package/dist/_locales/pt-BR.json +3 -0
  158. package/dist/_locales/th-TH.json +3 -0
  159. package/dist/_locales/zh-SG.json +3 -0
  160. package/dist/_locales/zh-TW.json +375 -0
  161. package/dist/_typedoc/AnchorNavigation/AnchorNavigation.types.json +3 -3
  162. package/dist/_typedoc/Avatar/Avatar.types.json +20 -20
  163. package/dist/_typedoc/AvatarStack/AvatarStack.types.json +24 -24
  164. package/dist/_typedoc/Badge/Badge.types.json +6 -6
  165. package/dist/_typedoc/Banner/Banner.types.json +13 -13
  166. package/dist/_typedoc/Box/Box.types.json +68 -68
  167. package/dist/_typedoc/Breadcrumbs/Breadcrumbs.types.json +10 -10
  168. package/dist/_typedoc/Button/Button.types.json +13 -13
  169. package/dist/_typedoc/Calendar/Calendar.types.json +80 -80
  170. package/dist/_typedoc/Card/Card.types.json +6 -6
  171. package/dist/_typedoc/Checkbox/Checkbox.types.json +9 -9
  172. package/dist/_typedoc/ContactItem/ContactItem.types.json +9 -9
  173. package/dist/_typedoc/DateInput/DateInput.types.json +35 -35
  174. package/dist/_typedoc/DateSelect/DateSelect.types.json +13 -13
  175. package/dist/_typedoc/DetailPage/DetailPage.types.json +5 -5
  176. package/dist/_typedoc/Dropdown/Dropdown.types.json +37 -37
  177. package/dist/_typedoc/DropdownFlyout/DropdownFlyout.types.json +30 -30
  178. package/dist/_typedoc/Dropzone/Dropzone.types.json +44 -44
  179. package/dist/_typedoc/EmptyState/EmptyState.types.json +16 -16
  180. package/dist/_typedoc/FileList/FileList.types.json +9 -9
  181. package/dist/_typedoc/FileSelect/FileSelect.types.json +27 -27
  182. package/dist/_typedoc/FileSelect/GridSource/GridSource.types.json +20 -20
  183. package/dist/_typedoc/FileSelect/LocalSource/LocalSource.types.json +14 -14
  184. package/dist/_typedoc/FileSelect/TreeSource/TreeSource.types.json +9 -9
  185. package/dist/_typedoc/Flex/Flex.types.json +27 -27
  186. package/dist/_typedoc/FlexList/FlexList.types.json +30 -30
  187. package/dist/_typedoc/Form/Form.types.json +741 -741
  188. package/dist/_typedoc/GhostPlaceholder/GhostPlaceholder.types.json +12 -12
  189. package/dist/_typedoc/Grid/Grid.types.json +8 -8
  190. package/dist/_typedoc/GroupSelect/GroupSelect.types.json +52 -52
  191. package/dist/_typedoc/Input/Input.types.json +2 -2
  192. package/dist/_typedoc/Link/Link.types.json +4 -4
  193. package/dist/_typedoc/ListPage/ListPage.types.json +13 -13
  194. package/dist/_typedoc/Menu/Menu.types.json +62 -62
  195. package/dist/_typedoc/MenuImperative/MenuImperative.types.json +74 -74
  196. package/dist/_typedoc/Modal/Modal.types.json +46 -46
  197. package/dist/_typedoc/MultiSelect/MultiSelect.types.json +31 -31
  198. package/dist/_typedoc/NextTile/NextTile.types.json +363 -0
  199. package/dist/_typedoc/Notation/Notation.types.json +4 -4
  200. package/dist/_typedoc/NumberInput/NumberInput.types.json +37 -37
  201. package/dist/_typedoc/OverlayTrigger/OverlayTrigger.types.json +41 -31
  202. package/dist/_typedoc/PageLayout/PageLayout.types.json +29 -29
  203. package/dist/_typedoc/Pagination/Pagination.types.json +7 -7
  204. package/dist/_typedoc/Panel/Panel.types.json +28 -28
  205. package/dist/_typedoc/Pill/Pill.types.json +2 -2
  206. package/dist/_typedoc/PillSelect/PillSelect.types.json +49 -49
  207. package/dist/_typedoc/Popover/Popover.types.json +15 -15
  208. package/dist/_typedoc/ProgressBar/ProgressBar.types.json +16 -6
  209. package/dist/_typedoc/RadioButton/RadioButton.types.json +6 -6
  210. package/dist/_typedoc/Required/Required.types.json +5 -5
  211. package/dist/_typedoc/Search/Search.types.json +18 -18
  212. package/dist/_typedoc/Section/Section.types.json +15 -15
  213. package/dist/_typedoc/SegmentedController/SegmentedController.types.json +21 -21
  214. package/dist/_typedoc/Select/Select.types.json +60 -60
  215. package/dist/_typedoc/SettingsPage/SettingsPage.types.json +10 -10
  216. package/dist/_typedoc/Slider/Slider.types.json +6 -6
  217. package/dist/_typedoc/Spinner/Spinner.types.json +9 -9
  218. package/dist/_typedoc/SplitViewCard/SplitViewCard.types.json +12 -12
  219. package/dist/_typedoc/Switch/Switch.types.json +3 -3
  220. package/dist/_typedoc/Table/Table.types.json +101 -101
  221. package/dist/_typedoc/Tabs/Tabs.types.json +20 -20
  222. package/dist/_typedoc/Tearsheet/Tearsheet.types.json +17 -17
  223. package/dist/_typedoc/TextArea/TextArea.types.json +3 -3
  224. package/dist/_typedoc/TextEditor/TextEditor.types.json +9 -9
  225. package/dist/_typedoc/TextEditorOutput/TextEditorOutput.types.json +4 -4
  226. package/dist/_typedoc/Thumbnail/Thumbnail.types.json +19 -19
  227. package/dist/_typedoc/TieredDropdown/TieredDropdown.types.json +42 -42
  228. package/dist/_typedoc/TieredSelect/TieredSelect.types.json +28 -28
  229. package/dist/_typedoc/Tile/Tile.types.json +8 -263
  230. package/dist/_typedoc/Title/Title.types.json +1 -1
  231. package/dist/_typedoc/Toast/Toast.types.json +4 -4
  232. package/dist/_typedoc/ToggleButton/ToggleButton.types.json +4 -4
  233. package/dist/_typedoc/Token/Token.types.json +4 -4
  234. package/dist/_typedoc/ToolHeader/ToolHeader.types.json +10 -10
  235. package/dist/_typedoc/ToolLandingPage/ToolLandingPage.types.json +7 -7
  236. package/dist/_typedoc/Tooltip/Tooltip.types.json +13 -13
  237. package/dist/_typedoc/Tree/Tree.types.json +86 -86
  238. package/dist/_typedoc/Typeahead/Typeahead.types.json +2 -2
  239. package/dist/_typedoc/Typography/Typography.types.json +9 -9
  240. package/dist/_typedoc/_utils/types.json +3 -3
  241. package/dist/_utils/propsTypedoc.d.ts +1 -0
  242. package/dist/_utils/propsTypedoc.js.map +1 -1
  243. package/dist/index.d.ts +1 -0
  244. package/dist/index.js +1 -0
  245. package/dist/index.js.map +1 -1
  246. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"Modal.js","names":["Clear","React","useEffect","Button","useModalDialogLike","Portal","Heading","LevelContext","Section","SectionProvider","useDeprecation","useLayoutEventListener","OverridableFocusScope","useI18nContext","useOverflowObserver","useScrollLock","Visibility","addSubcomponents","CloseWithConfirmContext","useCloseWithConfirmContext","useCloseWithConfirmState","mergeRefs","ChildRegistryProvider","useModalChildRegistryDispatch","fadeInClassName","fadeOutClassName","StyledModal","StyledModalBody","StyledModalButtons","StyledModalCancel","StyledModalContainer","StyledModalContent","StyledModalFooter","StyledModalFooterNotation","StyledModalFooterSummary","StyledModalHeader","StyledModalHeading","StyledModalScrim","StyledModalWarningIcon","useInitializeModalFocus","noop","defaultStartLevel","initialBodyLevel","ModalCloseContext","createContext","howToClose","onClose","undefined","ModalBodyScrollContext","isBodyScrolled","setIsBodyScrolled","ModalClosableHeader","forwardRef","_ref","ref","children","_ref$compact","compact","externalOnClose","qa","props","_objectWithoutProperties","_excluded","_React$useContext","useContext","_React$useContext2","I18n","modalClosableHeaderRef","useRef","_useCloseWithConfirmC","closeWithConfirm","registerChildRef","child","onClickButton","e","includes","createElement","_extends","$compact","$isBodyScrolled","t","closeButton","icon","onClick","size","variant","ModalClosableFooterButtons","_ref2","_excluded2","_React$useContext3","_useCloseWithConfirmC2","modalClosableFooterButtonsRef","ModalContainer","_ref3","_ref3$compact","placement","width","_excluded3","_React$useContext4","modalContainerRef","hasOnClose","shadowStrength","$placement","$width","ModalBody","_ref4","_ref4$compact","_ref4$noSideSpacing","noSideSpacing","_excluded4","_useOverflowObserver","isOverflowingY","overflowRef","scrollRef","modalBodyRef","_React$useContext5","event","handler","currentTarget","scrollTop","scope","Provider","value","$isOverflowingY","$noSideSpacing","tabIndex","ModalFooterSummary","_ref5","_excluded5","ModalFooterNotation","_ref6","_excluded6","intent","color","italic","Modal_","_ref7","ariaDescribedby","ariaDetails","ariaLabelledby","ariaLabel","_ref7$compact","id","_ref7$onClickOverlay","onClickOverlay","_ref7$open","open","_ref7$placement","role","_excluded7","_React$useState","useState","_React$useState2","_slicedToArray","visible","setVisible","_React$useState3","_React$useState4","fadeType","setFadeType","closeWithConfirmState","fadeTimer","setTimeout","clearTimeout","onTransitionEnd","handleKeyDown","key","preventDefault","stopPropagation","_useModalDialogLike","isModal","isOpen","dialogProps_","dialogProps","onClickScrim","autoFocus","contain","restoreFocus","className","onKeyDown","ModalBodyScrollObserver","_ref8","_React$useState5","_React$useState6","ConfirmModal","_ref9","headline","_excluded8","Modal","ModalState","oldThing","displayName","Body","Container","Content","FooterSummary","Footer","FooterButtons","FooterNotation","Header","Overlay","Scrim","State"],"sources":["../../src/Modal/Modal.tsx"],"sourcesContent":["import { Clear } from '@procore/core-icons/dist'\nimport React, { useEffect } from 'react'\nimport { Button } from '../Button'\nimport { useModalDialogLike } from '../OverlayTrigger/a11yPresets'\nimport { Portal } from '../Portal'\nimport {\n Heading,\n LevelContext,\n Section,\n SectionProvider,\n} from '../Section/Section'\nimport type { TypographyProps } from '../Typography'\nimport { useDeprecation } from '../_hooks/Deprecation'\nimport { useLayoutEventListener } from '../_hooks/EventListener'\nimport { OverridableFocusScope } from '../_hooks/FocusScopeOverride'\nimport { useI18nContext } from '../_hooks/I18n'\nimport { useOverflowObserver } from '../_hooks/OverflowObserver'\nimport { useScrollLock } from '../_hooks/ScrollLock'\nimport type { RenderProps } from '../_hooks/Visibility'\nimport { Visibility } from '../_hooks/Visibility'\nimport { addSubcomponents } from '../_utils/addSubcomponents'\nimport {\n CloseWithConfirmContext,\n useCloseWithConfirmContext,\n useCloseWithConfirmState,\n} from '../_utils/closeWithConfirm'\nimport { mergeRefs } from '../_utils/mergeRefs'\nimport type { DivAttributes, SpanAttributes } from '../_utils/types'\nimport {\n ChildRegistryProvider,\n useModalChildRegistryDispatch,\n} from './ChildRegistry.context'\nimport {\n fadeInClassName,\n fadeOutClassName,\n StyledModal,\n StyledModalBody,\n StyledModalButtons,\n StyledModalCancel,\n StyledModalContainer,\n StyledModalContent,\n StyledModalFooter,\n StyledModalFooterNotation,\n StyledModalFooterSummary,\n StyledModalHeader,\n StyledModalHeading,\n StyledModalScrim,\n StyledModalWarningIcon,\n} from './Modal.styles'\nimport type {\n ConfirmModalProps,\n ModalBodyProps,\n ModalCloseableHeaderProps,\n ModalCloseContextApi,\n ModalContainerProps,\n ModalProps,\n} from './Modal.types'\nimport { useInitializeModalFocus } from './useInitializeModalFocus'\n\nfunction noop() {}\nconst defaultStartLevel = 2\nconst initialBodyLevel = 3\n\nconst ModalCloseContext = React.createContext<ModalCloseContextApi>({\n howToClose: [],\n onClose: undefined,\n})\n\ninterface ModalBodyScrollContextApi {\n isBodyScrolled: boolean\n setIsBodyScrolled: React.Dispatch<React.SetStateAction<boolean>>\n}\n\nconst ModalBodyScrollContext = React.createContext<ModalBodyScrollContextApi>({\n isBodyScrolled: false,\n setIsBodyScrolled: noop,\n})\n\nconst ModalClosableHeader = React.forwardRef<\n HTMLDivElement,\n ModalCloseableHeaderProps\n>(\n (\n { children, compact = false, onClose: externalOnClose, qa, ...props },\n ref\n ) => {\n const { isBodyScrolled } = React.useContext(ModalBodyScrollContext)\n const { howToClose, onClose } = React.useContext(ModalCloseContext)\n const I18n = useI18nContext()\n const modalClosableHeaderRef = React.useRef(null)\n\n const { closeWithConfirm } = useCloseWithConfirmContext()\n const registerChildRef = useModalChildRegistryDispatch()\n\n useEffect(() => {\n registerChildRef({ child: 'header', ref: modalClosableHeaderRef })\n }, [])\n\n function onClickButton(e: React.MouseEvent<HTMLButtonElement>) {\n if (onClose && howToClose?.includes('x')) {\n closeWithConfirm(onClose)(e, 'x')\n return\n }\n closeWithConfirm(externalOnClose!)(e)\n }\n\n return (\n <StyledModalHeader\n $compact={compact}\n $isBodyScrolled={isBodyScrolled}\n {...props}\n ref={mergeRefs(ref, modalClosableHeaderRef)}\n >\n <StyledModalHeading $compact={compact}>{children}</StyledModalHeading>\n {(onClose && howToClose?.includes('x')) || externalOnClose ? (\n <StyledModalCancel>\n <Button\n aria-label={I18n.t('core.modal.a11y.close')}\n data-internal=\"close-button\"\n data-qa={qa?.closeButton}\n icon={<Clear />}\n onClick={onClickButton}\n size={compact ? 'sm' : 'md'}\n variant=\"tertiary\"\n />\n </StyledModalCancel>\n ) : null}\n </StyledModalHeader>\n )\n }\n)\n\nconst ModalClosableFooterButtons = React.forwardRef<\n HTMLDivElement,\n ModalCloseableHeaderProps\n>(({ children, ...props }, ref) => {\n const { howToClose, onClose } = React.useContext(ModalCloseContext)\n const I18n = useI18nContext()\n const { closeWithConfirm } = useCloseWithConfirmContext()\n const modalClosableFooterButtonsRef = React.useRef(null)\n\n const registerChildRef = useModalChildRegistryDispatch()\n\n useEffect(() => {\n registerChildRef({\n child: 'closeableButtons',\n ref: modalClosableFooterButtonsRef,\n })\n }, [])\n\n function onClickButton(e: React.MouseEvent<HTMLButtonElement>) {\n closeWithConfirm(onClose!)(e, 'footer-button')\n }\n\n return (\n <StyledModalButtons\n {...props}\n ref={mergeRefs(ref, modalClosableFooterButtonsRef)}\n >\n {howToClose?.includes('footer-button') && (\n <Button onClick={onClickButton} variant=\"tertiary\">\n {I18n.t('core.modal.cancel')}\n </Button>\n )}\n {children}\n </StyledModalButtons>\n )\n})\n\nconst ModalContainer = React.forwardRef<HTMLDivElement, ModalContainerProps>(\n ({ compact = false, placement, width, ...props }, ref) => {\n const { onClose } = React.useContext(ModalCloseContext)\n const modalContainerRef = React.useRef<HTMLDivElement>(null)\n useInitializeModalFocus({ modalContainerRef, hasOnClose: !!onClose })\n\n return (\n <StyledModalContainer\n {...props}\n shadowStrength={4}\n $compact={compact}\n $placement={placement}\n $width={width}\n ref={mergeRefs(ref, modalContainerRef)}\n />\n )\n }\n)\n\nconst ModalBody = React.forwardRef<HTMLDivElement, ModalBodyProps>(\n ({ children, compact = false, noSideSpacing = false, ...props }, ref) => {\n const { isOverflowingY, ref: overflowRef } = useOverflowObserver()\n const scrollRef = React.useRef(null)\n const modalBodyRef = React.useRef(null)\n const { setIsBodyScrolled } = React.useContext(ModalBodyScrollContext)\n const registerChildRef = useModalChildRegistryDispatch()\n\n useEffect(() => {\n registerChildRef({ child: 'body', ref: modalBodyRef })\n }, [])\n\n useLayoutEventListener({\n event: 'scroll',\n handler: (e: React.UIEvent<HTMLElement>) => {\n setIsBodyScrolled(e.currentTarget.scrollTop > 0)\n },\n scope: scrollRef,\n })\n\n return (\n <SectionProvider>\n <LevelContext.Provider value={initialBodyLevel}>\n <StyledModalBody\n {...props}\n $compact={compact}\n $isOverflowingY={isOverflowingY}\n $noSideSpacing={noSideSpacing}\n ref={mergeRefs(overflowRef, scrollRef, ref, modalBodyRef)}\n tabIndex={0}\n >\n {children}\n </StyledModalBody>\n </LevelContext.Provider>\n </SectionProvider>\n )\n }\n)\n\nconst ModalFooterSummary = React.forwardRef<HTMLDivElement, DivAttributes>(\n ({ children, ...props }, ref) => {\n return (\n <StyledModalFooterSummary {...props} ref={ref}>\n {children}\n </StyledModalFooterSummary>\n )\n }\n)\n\nconst ModalFooterNotation = React.forwardRef<\n HTMLSpanElement,\n SpanAttributes & TypographyProps\n>(({ children, ...props }, ref) => (\n <StyledModalFooterNotation\n aria-live=\"polite\"\n intent=\"small\"\n color=\"gray45\"\n italic\n {...props}\n ref={ref}\n >\n {children}\n </StyledModalFooterNotation>\n))\n\nconst Modal_ = React.forwardRef<HTMLDivElement, ModalProps>(\n (\n {\n ['aria-describedby']: ariaDescribedby,\n ['aria-details']: ariaDetails,\n ['aria-labelledby']: ariaLabelledby,\n ['aria-label']: ariaLabel,\n children,\n compact = false,\n howToClose,\n id,\n onClickOverlay = noop,\n onClose,\n open = false,\n placement = 'center',\n role,\n ...props\n },\n ref\n ) => {\n useScrollLock(open)\n const [visible, setVisible] = React.useState<boolean>(open)\n const [fadeType, setFadeType] = React.useState<string>('')\n const closeWithConfirmState = useCloseWithConfirmState()\n const { closeWithConfirm } = closeWithConfirmState\n\n React.useEffect(() => {\n if (open) {\n setVisible(true)\n const fadeTimer = setTimeout(() => {\n setFadeType(fadeInClassName)\n }, 0)\n return () => clearTimeout(fadeTimer)\n } else {\n setFadeType(fadeOutClassName)\n }\n }, [open])\n\n const onTransitionEnd = () => {\n if (fadeType === fadeOutClassName) {\n setVisible(false)\n }\n }\n\n const handleKeyDown = (e: React.KeyboardEvent<HTMLDivElement>) => {\n if (!onClose) return\n if (e.key === 'Escape') {\n e.preventDefault()\n e.stopPropagation()\n closeWithConfirm(onClose)(e, 'x')\n }\n }\n\n const { dialogProps: dialogProps_ } = useModalDialogLike({\n 'aria-describedby': ariaDescribedby,\n 'aria-details': ariaDetails,\n 'aria-labelledby': ariaLabelledby,\n 'aria-label': ariaLabel,\n id,\n isModal: false,\n isOpen: open,\n role,\n })\n\n const dialogProps = onClose && role === 'dialog' ? dialogProps_ : {}\n\n function onClickScrim(e: React.MouseEvent<HTMLDivElement>) {\n onClickOverlay(e)\n if (onClose && howToClose?.includes('scrim')) {\n closeWithConfirm(onClose)(e, 'scrim')\n }\n }\n\n return visible ? (\n <Portal>\n <ModalCloseContext.Provider value={{ onClose, howToClose }}>\n <LevelContext.Provider value={defaultStartLevel}>\n <ChildRegistryProvider>\n <OverridableFocusScope\n // TODO breaking - always\n autoFocus={!!onClose}\n contain={!!onClose}\n restoreFocus={!!onClose}\n >\n <StyledModal\n className={fadeType}\n ref={ref}\n onTransitionEnd={onTransitionEnd}\n onKeyDown={handleKeyDown}\n {...dialogProps}\n >\n <StyledModalScrim\n data-qa=\"core-modal-scrim\"\n onClick={onClickScrim}\n />\n\n <ModalContainer\n {...props}\n compact={compact}\n placement={placement}\n >\n <StyledModalContent $compact={compact}>\n <ModalBodyScrollObserver>\n <CloseWithConfirmContext.Provider\n value={closeWithConfirmState}\n >\n {children}\n </CloseWithConfirmContext.Provider>\n </ModalBodyScrollObserver>\n </StyledModalContent>\n </ModalContainer>\n </StyledModal>\n </OverridableFocusScope>\n </ChildRegistryProvider>\n </LevelContext.Provider>\n </ModalCloseContext.Provider>\n </Portal>\n ) : null\n }\n)\n\nfunction ModalBodyScrollObserver({ children }: { children: React.ReactNode }) {\n const [isBodyScrolled, setIsBodyScrolled] = React.useState<boolean>(false)\n\n return (\n <ModalBodyScrollContext.Provider\n value={{ isBodyScrolled, setIsBodyScrolled }}\n >\n {children}\n </ModalBodyScrollContext.Provider>\n )\n}\n\nexport const ConfirmModal = React.forwardRef<HTMLDivElement, ConfirmModalProps>(\n ({ children, headline, onClose, ...props }, ref) => {\n return (\n <Modal {...props} ref={ref}>\n <ModalClosableHeader onClose={onClose}>\n <StyledModalWarningIcon size=\"lg\" />\n {headline}\n </ModalClosableHeader>\n {children}\n </Modal>\n )\n }\n)\n\nfunction ModalState(props: RenderProps) {\n useDeprecation({ oldThing: 'Modal.State' })\n return <Visibility {...props} />\n}\n\nModal_.displayName = 'Modal'\n\nConfirmModal.displayName = 'ConfirmModal'\n\nModalBody.displayName = 'Modal.Body'\n\nModalFooterNotation.displayName = 'Modal.FooterNotation'\n\nModalFooterSummary.displayName = 'Modal.FooterSummary'\n\nconst Body = ModalBody\nconst Container = ModalContainer\nconst Content = StyledModalContent\nconst FooterSummary = ModalFooterSummary\nconst Footer = StyledModalFooter\nconst FooterButtons = ModalClosableFooterButtons\nconst FooterNotation = ModalFooterNotation\nconst Header = ModalClosableHeader\nconst Overlay = StyledModal\nconst Scrim = StyledModalScrim\nconst State = ModalState\n\n/**\n\n We use modals to present additional actions, information, or forms on pages\n where a user’s experience would benefit from remaining on the same page.\n They can include graphics, inputs, buttons, and other elements as needed to\n produce the workflow or action needed.\n\n Do not include modals on pages with complicated UI layouts.\n\n @since 10.19.0\n\n @see [Storybook](https://stories.core.procore.com/?path=/story/core-react_demos-modal--demo)\n\n @see [Design Guidelines](https://design.procore.com/modal)\n\n */\nexport const Modal = addSubcomponents(\n {\n Body,\n Container,\n Content,\n Footer,\n FooterButtons,\n FooterNotation,\n FooterSummary,\n Header,\n Heading: Heading,\n Overlay,\n Scrim,\n State,\n Section,\n },\n Modal_\n)\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,SAASA,KAAK,QAAQ,0BAA0B;AAChD,OAAOC,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,SAASC,MAAM,QAAQ,WAAW;AAClC,SAASC,kBAAkB,QAAQ,+BAA+B;AAClE,SAASC,MAAM,QAAQ,WAAW;AAClC,SACEC,OAAO,EACPC,YAAY,EACZC,OAAO,EACPC,eAAe,QACV,oBAAoB;AAE3B,SAASC,cAAc,QAAQ,uBAAuB;AACtD,SAASC,sBAAsB,QAAQ,yBAAyB;AAChE,SAASC,qBAAqB,QAAQ,8BAA8B;AACpE,SAASC,cAAc,QAAQ,gBAAgB;AAC/C,SAASC,mBAAmB,QAAQ,4BAA4B;AAChE,SAASC,aAAa,QAAQ,sBAAsB;AAEpD,SAASC,UAAU,QAAQ,sBAAsB;AACjD,SAASC,gBAAgB,QAAQ,4BAA4B;AAC7D,SACEC,uBAAuB,EACvBC,0BAA0B,EAC1BC,wBAAwB,QACnB,4BAA4B;AACnC,SAASC,SAAS,QAAQ,qBAAqB;AAE/C,SACEC,qBAAqB,EACrBC,6BAA6B,QACxB,yBAAyB;AAChC,SACEC,eAAe,EACfC,gBAAgB,EAChBC,WAAW,EACXC,eAAe,EACf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AM;EACNC,aAAa,EAAbA,aAAa;EACbC,cAAc,EAAdA,cAAc;EACdH,aAAa,EAAbA,aAAa;EACbI,MAAM,EAANA,MAAM;EACNjM,OAAO,EAAEA,OAAO;EAChBkM,OAAO,EAAPA,OAAO;EACPC,KAAK,EAALA,KAAK;EACLC,KAAK,EAALA,KAAK;EACLlM,OAAO,EAAPA;AACF,CAAC,EACD+H,MACF,CAAC"}
1
+ {"version":3,"file":"Modal.js","names":["Clear","React","useEffect","Button","useModalDialogLike","Portal","Heading","LevelContext","Section","SectionProvider","useDeprecation","useLayoutEventListener","OverridableFocusScope","useI18nContext","useOverflowObserver","useScrollLock","Visibility","addSubcomponents","CloseWithConfirmContext","useCloseWithConfirmContext","useCloseWithConfirmState","mergeRefs","ChildRegistryProvider","useModalChildRegistryDispatch","fadeInClassName","fadeOutClassName","StyledModal","StyledModalBody","StyledModalButtons","StyledModalCancel","StyledModalContainer","StyledModalContent","StyledModalFooter","StyledModalFooterNotation","StyledModalFooterSummary","StyledModalHeader","StyledModalHeading","StyledModalScrim","StyledModalWarningIcon","useInitializeModalFocus","noop","defaultStartLevel","initialBodyLevel","ModalCloseContext","createContext","howToClose","onClose","undefined","ModalBodyScrollContext","isBodyScrolled","setIsBodyScrolled","ModalClosableHeader","forwardRef","_ref","ref","children","_ref$compact","compact","externalOnClose","qa","props","_objectWithoutProperties","_excluded","_React$useContext","useContext","_React$useContext2","I18n","modalClosableHeaderRef","useRef","_useCloseWithConfirmC","closeWithConfirm","registerChildRef","child","onClickButton","e","includes","createElement","_extends","$compact","$isBodyScrolled","t","closeButton","icon","onClick","size","variant","ModalClosableFooterButtons","_ref2","_excluded2","_React$useContext3","_useCloseWithConfirmC2","modalClosableFooterButtonsRef","ModalContainer","_ref3","_ref3$compact","placement","width","_excluded3","_React$useContext4","modalContainerRef","hasOnClose","shadowStrength","$placement","$width","ModalBody","_ref4","_ref4$compact","_ref4$noSideSpacing","noSideSpacing","_excluded4","_useOverflowObserver","isOverflowingY","overflowRef","scrollRef","modalBodyRef","_React$useContext5","event","handler","currentTarget","scrollTop","scope","Provider","value","$isOverflowingY","$noSideSpacing","tabIndex","ModalFooterSummary","_ref5","_excluded5","ModalFooterNotation","_ref6","_excluded6","intent","color","italic","Modal_","_ref7","ariaDescribedby","ariaDetails","ariaLabelledby","ariaLabel","_ref7$compact","id","_ref7$onClickOverlay","onClickOverlay","_ref7$open","open","_ref7$placement","role","_excluded7","_React$useState","useState","_React$useState2","_slicedToArray","visible","setVisible","_React$useState3","_React$useState4","fadeType","setFadeType","closeWithConfirmState","fadeTimer","setTimeout","clearTimeout","onTransitionEnd","handleKeyDown","key","preventDefault","stopPropagation","_useModalDialogLike","isModal","isOpen","dialogProps_","dialogProps","onClickScrim","autoFocus","contain","restoreFocus","className","onKeyDown","ModalBodyScrollObserver","_ref8","_React$useState5","_React$useState6","ConfirmModal","_ref9","headline","_excluded8","Modal","ModalState","oldThing","displayName","Body","Container","Content","FooterSummary","Footer","FooterButtons","FooterNotation","Header","Overlay","Scrim","State"],"sources":["../../src/Modal/Modal.tsx"],"sourcesContent":["import { Clear } from '@procore/core-icons/dist'\nimport React, { useEffect } from 'react'\nimport { Button } from '../Button'\nimport { useModalDialogLike } from '../OverlayTrigger/a11yPresets'\nimport { Portal } from '../Portal'\nimport {\n Heading,\n LevelContext,\n Section,\n SectionProvider,\n} from '../Section/Section'\nimport type { TypographyProps } from '../Typography'\nimport { useDeprecation } from '../_hooks/Deprecation'\nimport { useLayoutEventListener } from '../_hooks/EventListener'\nimport { OverridableFocusScope } from '../_hooks/FocusScopeOverride'\nimport { useI18nContext } from '../_hooks/I18n'\nimport { useOverflowObserver } from '../_hooks/OverflowObserver'\nimport { useScrollLock } from '../_hooks/ScrollLock'\nimport type { RenderProps } from '../_hooks/Visibility'\nimport { Visibility } from '../_hooks/Visibility'\nimport { addSubcomponents } from '../_utils/addSubcomponents'\nimport {\n CloseWithConfirmContext,\n useCloseWithConfirmContext,\n useCloseWithConfirmState,\n} from '../_utils/closeWithConfirm'\nimport { mergeRefs } from '../_utils/mergeRefs'\nimport type { DivAttributes, SpanAttributes } from '../_utils/types'\nimport {\n ChildRegistryProvider,\n useModalChildRegistryDispatch,\n} from './ChildRegistry.context'\nimport {\n fadeInClassName,\n fadeOutClassName,\n StyledModal,\n StyledModalBody,\n StyledModalButtons,\n StyledModalCancel,\n StyledModalContainer,\n StyledModalContent,\n StyledModalFooter,\n StyledModalFooterNotation,\n StyledModalFooterSummary,\n StyledModalHeader,\n StyledModalHeading,\n StyledModalScrim,\n StyledModalWarningIcon,\n} from './Modal.styles'\nimport type {\n ConfirmModalProps,\n ModalBodyProps,\n ModalCloseableHeaderProps,\n ModalCloseContextApi,\n ModalContainerProps,\n ModalProps,\n} from './Modal.types'\nimport { useInitializeModalFocus } from './useInitializeModalFocus'\n\nfunction noop() {}\nconst defaultStartLevel = 2\nconst initialBodyLevel = 3\n\nconst ModalCloseContext = React.createContext<ModalCloseContextApi>({\n howToClose: [],\n onClose: undefined,\n})\n\ninterface ModalBodyScrollContextApi {\n isBodyScrolled: boolean\n setIsBodyScrolled: React.Dispatch<React.SetStateAction<boolean>>\n}\n\nconst ModalBodyScrollContext = React.createContext<ModalBodyScrollContextApi>({\n isBodyScrolled: false,\n setIsBodyScrolled: noop,\n})\n\nconst ModalClosableHeader = React.forwardRef<\n HTMLDivElement,\n ModalCloseableHeaderProps\n>(\n (\n { children, compact = false, onClose: externalOnClose, qa, ...props },\n ref\n ) => {\n const { isBodyScrolled } = React.useContext(ModalBodyScrollContext)\n const { howToClose, onClose } = React.useContext(ModalCloseContext)\n const I18n = useI18nContext()\n const modalClosableHeaderRef = React.useRef(null)\n\n const { closeWithConfirm } = useCloseWithConfirmContext()\n const registerChildRef = useModalChildRegistryDispatch()\n\n useEffect(() => {\n registerChildRef({ child: 'header', ref: modalClosableHeaderRef })\n }, [])\n\n function onClickButton(e: React.MouseEvent<HTMLButtonElement>) {\n if (onClose && howToClose?.includes('x')) {\n closeWithConfirm(onClose)(e, 'x')\n return\n }\n closeWithConfirm(externalOnClose!)(e)\n }\n\n return (\n <StyledModalHeader\n $compact={compact}\n $isBodyScrolled={isBodyScrolled}\n {...props}\n ref={mergeRefs(ref, modalClosableHeaderRef)}\n >\n <StyledModalHeading $compact={compact}>{children}</StyledModalHeading>\n {(onClose && howToClose?.includes('x')) || externalOnClose ? (\n <StyledModalCancel>\n <Button\n aria-label={I18n.t('core.modal.a11y.close')}\n data-internal=\"close-button\"\n data-qa={qa?.closeButton}\n icon={<Clear />}\n onClick={onClickButton}\n size={compact ? 'sm' : 'md'}\n variant=\"tertiary\"\n />\n </StyledModalCancel>\n ) : null}\n </StyledModalHeader>\n )\n }\n)\n\nconst ModalClosableFooterButtons = React.forwardRef<\n HTMLDivElement,\n ModalCloseableHeaderProps\n>(({ children, ...props }, ref) => {\n const { howToClose, onClose } = React.useContext(ModalCloseContext)\n const I18n = useI18nContext()\n const { closeWithConfirm } = useCloseWithConfirmContext()\n const modalClosableFooterButtonsRef = React.useRef(null)\n\n const registerChildRef = useModalChildRegistryDispatch()\n\n useEffect(() => {\n registerChildRef({\n child: 'closeableButtons',\n ref: modalClosableFooterButtonsRef,\n })\n }, [])\n\n function onClickButton(e: React.MouseEvent<HTMLButtonElement>) {\n closeWithConfirm(onClose!)(e, 'footer-button')\n }\n\n return (\n <StyledModalButtons\n {...props}\n ref={mergeRefs(ref, modalClosableFooterButtonsRef)}\n >\n {howToClose?.includes('footer-button') && (\n <Button onClick={onClickButton} variant=\"tertiary\">\n {I18n.t('core.modal.cancel')}\n </Button>\n )}\n {children}\n </StyledModalButtons>\n )\n})\n\nconst ModalContainer = React.forwardRef<HTMLDivElement, ModalContainerProps>(\n ({ compact = false, placement, width, ...props }, ref) => {\n const { onClose } = React.useContext(ModalCloseContext)\n const modalContainerRef = React.useRef<HTMLDivElement>(null)\n useInitializeModalFocus({ modalContainerRef, hasOnClose: !!onClose })\n\n return (\n <StyledModalContainer\n {...props}\n shadowStrength={4}\n $compact={compact}\n $placement={placement}\n $width={width}\n ref={mergeRefs(ref, modalContainerRef)}\n />\n )\n }\n)\n\nconst ModalBody = React.forwardRef<HTMLDivElement, ModalBodyProps>(\n ({ children, compact = false, noSideSpacing = false, ...props }, ref) => {\n const { isOverflowingY, ref: overflowRef } = useOverflowObserver()\n const scrollRef = React.useRef(null)\n const modalBodyRef = React.useRef(null)\n const { setIsBodyScrolled } = React.useContext(ModalBodyScrollContext)\n const registerChildRef = useModalChildRegistryDispatch()\n\n useEffect(() => {\n registerChildRef({ child: 'body', ref: modalBodyRef })\n }, [])\n\n useLayoutEventListener({\n event: 'scroll',\n handler: (e: React.UIEvent<HTMLElement>) => {\n setIsBodyScrolled(e.currentTarget.scrollTop > 0)\n },\n scope: scrollRef,\n })\n\n return (\n <SectionProvider>\n <LevelContext.Provider value={initialBodyLevel}>\n <StyledModalBody\n {...props}\n $compact={compact}\n $isOverflowingY={isOverflowingY}\n $noSideSpacing={noSideSpacing}\n ref={mergeRefs(overflowRef, scrollRef, ref, modalBodyRef)}\n tabIndex={0}\n >\n {children}\n </StyledModalBody>\n </LevelContext.Provider>\n </SectionProvider>\n )\n }\n)\n\nconst ModalFooterSummary = React.forwardRef<HTMLDivElement, DivAttributes>(\n ({ children, ...props }, ref) => {\n return (\n <StyledModalFooterSummary {...props} ref={ref}>\n {children}\n </StyledModalFooterSummary>\n )\n }\n)\n\nconst ModalFooterNotation = React.forwardRef<\n HTMLSpanElement,\n SpanAttributes & TypographyProps\n>(({ children, ...props }, ref) => (\n <StyledModalFooterNotation\n aria-live=\"polite\"\n intent=\"small\"\n color=\"gray45\"\n italic\n {...props}\n ref={ref}\n >\n {children}\n </StyledModalFooterNotation>\n))\n\nconst Modal_ = React.forwardRef<HTMLDivElement, ModalProps>(\n (\n {\n ['aria-describedby']: ariaDescribedby,\n ['aria-details']: ariaDetails,\n ['aria-labelledby']: ariaLabelledby,\n ['aria-label']: ariaLabel,\n children,\n compact = false,\n howToClose,\n id,\n onClickOverlay = noop,\n onClose,\n open = false,\n placement = 'center',\n role,\n ...props\n },\n ref\n ) => {\n useScrollLock(open)\n const [visible, setVisible] = React.useState<boolean>(open)\n const [fadeType, setFadeType] = React.useState<string>('')\n const closeWithConfirmState = useCloseWithConfirmState()\n const { closeWithConfirm } = closeWithConfirmState\n\n React.useEffect(() => {\n if (open) {\n setVisible(true)\n const fadeTimer = setTimeout(() => {\n setFadeType(fadeInClassName)\n }, 0)\n return () => clearTimeout(fadeTimer)\n } else {\n setFadeType(fadeOutClassName)\n }\n }, [open])\n\n const onTransitionEnd = () => {\n if (fadeType === fadeOutClassName) {\n setVisible(false)\n }\n }\n\n const handleKeyDown = (e: React.KeyboardEvent<HTMLDivElement>) => {\n if (!onClose) return\n if (e.key === 'Escape') {\n e.preventDefault()\n e.stopPropagation()\n closeWithConfirm(onClose)(e, 'x')\n }\n }\n\n const { dialogProps: dialogProps_ } = useModalDialogLike({\n 'aria-describedby': ariaDescribedby,\n 'aria-details': ariaDetails,\n 'aria-labelledby': ariaLabelledby,\n 'aria-label': ariaLabel,\n id,\n isModal: false,\n isOpen: open,\n role,\n })\n\n const dialogProps = onClose && role === 'dialog' ? dialogProps_ : {}\n\n function onClickScrim(e: React.MouseEvent<HTMLDivElement>) {\n onClickOverlay(e)\n if (onClose && howToClose?.includes('scrim')) {\n closeWithConfirm(onClose)(e, 'scrim')\n }\n }\n\n return visible ? (\n <Portal>\n <ModalCloseContext.Provider value={{ onClose, howToClose }}>\n <LevelContext.Provider value={defaultStartLevel}>\n <ChildRegistryProvider>\n <OverridableFocusScope\n // TODO breaking - always\n autoFocus={!!onClose}\n contain={!!onClose}\n restoreFocus={!!onClose}\n >\n <StyledModal\n className={fadeType}\n ref={ref}\n onTransitionEnd={onTransitionEnd}\n onKeyDown={handleKeyDown}\n {...dialogProps}\n >\n <StyledModalScrim\n data-qa=\"core-modal-scrim\"\n onClick={onClickScrim}\n />\n\n <ModalContainer\n {...props}\n compact={compact}\n placement={placement}\n >\n <StyledModalContent $compact={compact}>\n <ModalBodyScrollObserver>\n <CloseWithConfirmContext.Provider\n value={closeWithConfirmState}\n >\n {children}\n </CloseWithConfirmContext.Provider>\n </ModalBodyScrollObserver>\n </StyledModalContent>\n </ModalContainer>\n </StyledModal>\n </OverridableFocusScope>\n </ChildRegistryProvider>\n </LevelContext.Provider>\n </ModalCloseContext.Provider>\n </Portal>\n ) : null\n }\n)\n\nfunction ModalBodyScrollObserver({ children }: { children: React.ReactNode }) {\n const [isBodyScrolled, setIsBodyScrolled] = React.useState<boolean>(false)\n\n return (\n <ModalBodyScrollContext.Provider\n value={{ isBodyScrolled, setIsBodyScrolled }}\n >\n {children}\n </ModalBodyScrollContext.Provider>\n )\n}\n\nexport const ConfirmModal = React.forwardRef<HTMLDivElement, ConfirmModalProps>(\n ({ children, headline, onClose, ...props }, ref) => {\n return (\n <Modal {...props} ref={ref}>\n <ModalClosableHeader onClose={onClose}>\n <StyledModalWarningIcon size=\"lg\" />\n {headline}\n </ModalClosableHeader>\n {children}\n </Modal>\n )\n }\n)\n\nfunction ModalState(props: RenderProps) {\n useDeprecation({ oldThing: 'Modal.State' })\n return <Visibility {...props} />\n}\n\nModal_.displayName = 'Modal'\n\nConfirmModal.displayName = 'ConfirmModal'\n\nModalBody.displayName = 'Modal.Body'\n\nModalFooterNotation.displayName = 'Modal.FooterNotation'\n\nModalFooterSummary.displayName = 'Modal.FooterSummary'\n\nconst Body = ModalBody\nconst Container = ModalContainer\nconst Content = StyledModalContent\nconst FooterSummary = ModalFooterSummary\nconst Footer = StyledModalFooter\nconst FooterButtons = ModalClosableFooterButtons\nconst FooterNotation = ModalFooterNotation\nconst Header = ModalClosableHeader\nconst Overlay = StyledModal\nconst Scrim = StyledModalScrim\nconst State = ModalState\n\n/**\n\n We use modals to present additional actions, information, or forms on pages\n where a user’s experience would benefit from remaining on the same page.\n They can include graphics, inputs, buttons, and other elements as needed to\n produce the workflow or action needed.\n\n Do not include modals on pages with complicated UI layouts.\n\n @since 10.19.0\n\n @see [Storybook](https://stories.core.procore.com/?path=/story/core-react_demos-modal--demo)\n\n @see [Design Guidelines](https://design.procore.com/modal)\n\n */\nexport const Modal = addSubcomponents(\n {\n Body,\n Container,\n Content,\n Footer,\n FooterButtons,\n FooterNotation,\n FooterSummary,\n Header,\n Heading: Heading, // Could make this tabIndex -1, and focus it on open\n Overlay,\n Scrim,\n State,\n Section,\n },\n Modal_\n)\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,SAASA,KAAK,QAAQ,0BAA0B;AAChD,OAAOC,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,SAASC,MAAM,QAAQ,WAAW;AAClC,SAASC,kBAAkB,QAAQ,+BAA+B;AAClE,SAASC,MAAM,QAAQ,WAAW;AAClC,SACEC,OAAO,EACPC,YAAY,EACZC,OAAO,EACPC,eAAe,QACV,oBAAoB;AAE3B,SAASC,cAAc,QAAQ,uBAAuB;AACtD,SAASC,sBAAsB,QAAQ,yBAAyB;AAChE,SAASC,qBAAqB,QAAQ,8BAA8B;AACpE,SAASC,cAAc,QAAQ,gBAAgB;AAC/C,SAASC,mBAAmB,QAAQ,4BAA4B;AAChE,SAASC,aAAa,QAAQ,sBAAsB;AAEpD,SAASC,UAAU,QAAQ,sBAAsB;AACjD,SAASC,gBAAgB,QAAQ,4BAA4B;AAC7D,SACEC,uBAAuB,EACvBC,0BAA0B,EAC1BC,wBAAwB,QACnB,4BAA4B;AACnC,SAASC,SAAS,QAAQ,qBAAqB;AAE/C,SACEC,qBAAqB,EACrBC,6BAA6B,QACxB,yBAAyB;AAChC,SACEC,eAAe,EACfC,gBAAgB,EAChBC,WAAW,EACXC,eAAe,EACfC,kBAAkB,EAClBC,iBAAiB,EACjBC,oBAAoB,EACpBC,kBAAkB,EAClBC,iBAAiB,EACjBC,yBAAyB,EACzBC,wBAAwB,EACxBC,iBAAiB,EACjBC,kBAAkB,EAClBC,gBAAgB,EAChBC,sBAAsB,QACjB,gBAAgB;AASvB,SAASC,uBAAuB,QAAQ,2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;EACLlM,OAAO,EAAPA;AACF,CAAC,EACD+H,MACF,CAAC"}
@@ -31,15 +31,15 @@ var screenWidthPixelBreakpoints = {
31
31
  };
32
32
  export var StyledModal = /*#__PURE__*/styled.div.withConfig({
33
33
  displayName: "StyledModal",
34
- componentId: "core-12_23_0__sc-1ijdug2-0"
34
+ componentId: "core-12_25_0__sc-1ijdug2-0"
35
35
  })(["display:flex;height:100vh;position:absolute;opacity:0;transition:0.3s opacity ease;width:100vw;z-index:0;pointer-events:none;&.", "{opacity:1;pointer-events:auto;}&.", "{opacity:0;pointer-events:none;}"], fadeInClassName, fadeOutClassName);
36
36
  export var StyledModalButtons = /*#__PURE__*/styled.div.withConfig({
37
37
  displayName: "StyledModalButtons",
38
- componentId: "core-12_23_0__sc-1ijdug2-1"
38
+ componentId: "core-12_25_0__sc-1ijdug2-1"
39
39
  })(["display:flex;flex:0 0 auto;margin-left:", "px;> * + *{margin-left:", "px;}"], spacing.lg, spacing.sm);
40
40
  export var StyledModalContainer = /*#__PURE__*/styled(Card).withConfig({
41
41
  displayName: "StyledModalContainer",
42
- componentId: "core-12_23_0__sc-1ijdug2-2"
42
+ componentId: "core-12_25_0__sc-1ijdug2-2"
43
43
  })(["display:flex;flex-direction:row;position:absolute;z-index:2;", " ", " ", ""], function (_ref) {
44
44
  var $compact = _ref.$compact;
45
45
  if (!$compact) {
@@ -63,11 +63,11 @@ export var StyledModalContainer = /*#__PURE__*/styled(Card).withConfig({
63
63
  });
64
64
  export var StyledModalFooter = /*#__PURE__*/styled.div.withConfig({
65
65
  displayName: "StyledModalFooter",
66
- componentId: "core-12_23_0__sc-1ijdug2-3"
66
+ componentId: "core-12_25_0__sc-1ijdug2-3"
67
67
  })(["align-items:center;display:flex;flex:0 0 auto;flex-wrap:wrap;justify-content:flex-end;padding:", "px ", "px ", "px;"], spacing.xl, spacing.xxl, spacing.xxl);
68
68
  export var StyledModalBody = /*#__PURE__*/styled.div.withConfig({
69
69
  displayName: "StyledModalBody",
70
- componentId: "core-12_23_0__sc-1ijdug2-4"
70
+ componentId: "core-12_25_0__sc-1ijdug2-4"
71
71
  })(["", " box-sizing:border-box;color:", ";display:flex;flex-direction:column;overflow:auto;", " ", " > ", "{padding-left:0;padding-right:0;&:first-child > ", "{padding-top:0;}}", ""], getTypographyIntent('body'), colors.gray15, function (_ref4) {
72
72
  var $noSideSpacing = _ref4.$noSideSpacing;
73
73
  return css(["padding:", "px ", "px;"], spacing.xl, $noSideSpacing ? 0 : spacing.xxl);
@@ -84,7 +84,7 @@ export var StyledModalBody = /*#__PURE__*/styled.div.withConfig({
84
84
  });
85
85
  export var StyledModalContent = /*#__PURE__*/styled.div.withConfig({
86
86
  displayName: "StyledModalContent",
87
- componentId: "core-12_23_0__sc-1ijdug2-5"
87
+ componentId: "core-12_25_0__sc-1ijdug2-5"
88
88
  })(["display:flex;flex-direction:column;max-height:90vh;overflow:hidden;width:100%;", ""], function (_ref7) {
89
89
  var _ref7$$compact = _ref7.$compact,
90
90
  $compact = _ref7$$compact === void 0 ? false : _ref7$$compact;
@@ -95,11 +95,11 @@ export var StyledModalContent = /*#__PURE__*/styled.div.withConfig({
95
95
  });
96
96
  export var StyledModalFooterNotation = /*#__PURE__*/styled(Typography).withConfig({
97
97
  displayName: "StyledModalFooterNotation",
98
- componentId: "core-12_23_0__sc-1ijdug2-6"
98
+ componentId: "core-12_25_0__sc-1ijdug2-6"
99
99
  })(["flex-grow:1;"]);
100
100
  export var StyledModalHeader = /*#__PURE__*/styled.div.withConfig({
101
101
  displayName: "StyledModalHeader",
102
- componentId: "core-12_23_0__sc-1ijdug2-7"
102
+ componentId: "core-12_25_0__sc-1ijdug2-7"
103
103
  })(["align-items:flex-start;color:", ";display:flex;flex:0 0 auto;position:relative;", " ", ""], colors.gray10, function (_ref8) {
104
104
  var $compact = _ref8.$compact,
105
105
  $isBodyScrolled = _ref8.$isBodyScrolled;
@@ -117,7 +117,7 @@ export var StyledModalHeader = /*#__PURE__*/styled.div.withConfig({
117
117
  });
118
118
  export var StyledModalHeading = /*#__PURE__*/styled.div.withConfig({
119
119
  displayName: "StyledModalHeading",
120
- componentId: "core-12_23_0__sc-1ijdug2-8"
120
+ componentId: "core-12_25_0__sc-1ijdug2-8"
121
121
  })(["", " align-items:center;display:flex;flex:1 1 auto;min-height:36px;padding-right:", "px;", ""], function (_ref0) {
122
122
  var $compact = _ref0.$compact;
123
123
  return getTypographyIntent($compact ? 'h3' : 'h2');
@@ -133,18 +133,18 @@ export var StyledModalHeading = /*#__PURE__*/styled.div.withConfig({
133
133
  });
134
134
  export var StyledModalCancel = /*#__PURE__*/styled.div.withConfig({
135
135
  displayName: "StyledModalCancel",
136
- componentId: "core-12_23_0__sc-1ijdug2-9"
136
+ componentId: "core-12_25_0__sc-1ijdug2-9"
137
137
  })(["flex:0 0 auto;"]);
138
138
  export var StyledModalScrim = /*#__PURE__*/styled.div.withConfig({
139
139
  displayName: "StyledModalScrim",
140
- componentId: "core-12_23_0__sc-1ijdug2-10"
140
+ componentId: "core-12_25_0__sc-1ijdug2-10"
141
141
  })(["background:hsla(200,8%,10%,0.6);height:100vh;left:0;position:absolute;top:0;width:100vw;z-index:1;"]);
142
142
  export var StyledModalWarningIcon = /*#__PURE__*/styled(Warning).withConfig({
143
143
  displayName: "StyledModalWarningIcon",
144
- componentId: "core-12_23_0__sc-1ijdug2-11"
144
+ componentId: "core-12_25_0__sc-1ijdug2-11"
145
145
  })(["color:", ";margin-right:", "px;"], colors.yellow40, spacing.sm);
146
146
  export var StyledModalFooterSummary = /*#__PURE__*/styled.div.withConfig({
147
147
  displayName: "StyledModalFooterSummary",
148
- componentId: "core-12_23_0__sc-1ijdug2-12"
148
+ componentId: "core-12_25_0__sc-1ijdug2-12"
149
149
  })(["", " border-top:1px solid ", ";border-bottom:1px solid ", ";padding:", "px ", "px;color:", ";font-style:italic;background-color:", ";margin:-", "px -", "px ", "px -", "px;flex:1 1 100%;"], getTypographyIntent('small'), colors.gray85, colors.gray85, spacing.md, spacing.xxl, colors.gray15, colors.gray98, spacing.xl, spacing.xxl, spacing.xl, spacing.xxl);
150
150
  //# sourceMappingURL=Modal.styles.js.map
@@ -1,2 +1,3 @@
1
1
  import React from 'react';
2
2
  export declare function EscapefulFieldSet(): React.JSX.Element;
3
+ export declare function UserInteractionSet(): React.JSX.Element;
@@ -1,29 +1,31 @@
1
- var _excluded = ["label", "children"];
2
1
  function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
3
2
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
4
3
  function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
5
4
  function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
6
5
  function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
7
6
  function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
8
- function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
9
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
10
7
  import React from 'react';
11
8
  import { Box } from '../Box/Box';
12
9
  import { Dropdown } from '../Dropdown/Dropdown';
13
10
  import { DropdownFlyout } from '../DropdownFlyout/DropdownFlyout';
14
11
  import { MultiSelect } from '../MultiSelect/MultiSelect';
15
12
  import { PillSelect } from '../PillSelect/PillSelect';
13
+ import { useId } from '@react-aria/utils';
14
+ import { Button } from '../Button';
15
+ import { Content } from '../Content';
16
+ import { Actions } from '../Content/Content';
17
+ import { Field } from '../Field';
18
+ import { Flex } from '../Flex';
19
+ import { Form } from '../Form';
20
+ import { Link } from '../Link';
21
+ import { Popover } from '../Popover';
16
22
  import { Search } from '../Search/Search';
17
23
  import { Select } from '../Select/Select';
24
+ import { H3, Label } from '../Semantic';
18
25
  import { SuperSelect } from '../SuperSelect/SuperSelect';
19
26
  import { TieredSelect } from '../TieredSelect/TieredSelect';
27
+ import { Tooltip } from '../Tooltip';
20
28
  import { Typeahead } from '../Typeahead';
21
- function Field(_ref) {
22
- var label = _ref.label,
23
- children = _ref.children,
24
- props = _objectWithoutProperties(_ref, _excluded);
25
- return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("b", null, /*#__PURE__*/React.createElement("label", null, label))), children);
26
- }
27
29
  var idLabelOptions = [{
28
30
  id: 1,
29
31
  label: 'One'
@@ -39,105 +41,114 @@ export function EscapefulFieldSet() {
39
41
  _React$useState2 = _slicedToArray(_React$useState, 2),
40
42
  typeaheadV = _React$useState2[0],
41
43
  setTyeahead = _React$useState2[1];
42
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("b", null, "Things with Esc key:"), /*#__PURE__*/React.createElement(Field, {
43
- label: "Search"
44
- }, /*#__PURE__*/React.createElement(Search, null)), /*#__PURE__*/React.createElement(Field, {
45
- label: "Typeahead"
46
- }, /*#__PURE__*/React.createElement(Typeahead, {
44
+ var baseId = useId();
45
+ return /*#__PURE__*/React.createElement(Content, null, /*#__PURE__*/React.createElement(H3, null, "Things with Esc key:"), /*#__PURE__*/React.createElement(Field, null, /*#__PURE__*/React.createElement(Label, {
46
+ id: "".concat(baseId, "-search")
47
+ }, "Search"), /*#__PURE__*/React.createElement(Search, {
48
+ "aria-labelledby": "".concat(baseId, "-search")
49
+ })), /*#__PURE__*/React.createElement(Field, null, /*#__PURE__*/React.createElement(Label, {
50
+ id: "".concat(baseId, "-typeahead")
51
+ }, "Typeahead"), /*#__PURE__*/React.createElement(Typeahead, {
47
52
  value: typeaheadV,
48
- onChange: setTyeahead
49
- })), /*#__PURE__*/React.createElement(Field, {
50
- label: "Select"
53
+ onChange: setTyeahead,
54
+ "aria-labelledby": "".concat(baseId, "-typeahead")
55
+ })), /*#__PURE__*/React.createElement(Field, null, /*#__PURE__*/React.createElement(Label, {
56
+ id: "".concat(baseId, "-select")
57
+ }, "Select"), /*#__PURE__*/React.createElement(Flex, {
58
+ gap: "sm"
51
59
  }, /*#__PURE__*/React.createElement(Box, {
52
- margin: "none xs none none",
53
- display: "inline-block"
54
- }, "Default"), /*#__PURE__*/React.createElement(Select, null, idLabelOptions.map(function (_ref2) {
55
- var id = _ref2.id,
56
- label = _ref2.label;
60
+ id: "s-default"
61
+ }, "Default"), /*#__PURE__*/React.createElement(Select, {
62
+ "aria-labelledby": "".concat(baseId, "-select s-default")
63
+ }, idLabelOptions.map(function (_ref) {
64
+ var id = _ref.id,
65
+ label = _ref.label;
57
66
  return /*#__PURE__*/React.createElement(Select.Option, {
67
+ key: id,
58
68
  value: id
59
69
  }, label);
60
70
  })), /*#__PURE__*/React.createElement(Box, {
61
- margin: "none xs none md",
62
- display: "inline-block"
71
+ id: "s-search"
63
72
  }, "Search"), /*#__PURE__*/React.createElement(Select, {
64
- onSearch: console.log
65
- }, idLabelOptions.map(function (_ref3) {
66
- var id = _ref3.id,
67
- label = _ref3.label;
73
+ onSearch: console.log,
74
+ "aria-labelledby": "".concat(baseId, "-select s-search")
75
+ }, idLabelOptions.map(function (_ref2) {
76
+ var id = _ref2.id,
77
+ label = _ref2.label;
68
78
  return /*#__PURE__*/React.createElement(Select.Option, {
79
+ key: id,
69
80
  value: id
70
81
  }, label);
71
- }), ' ')), /*#__PURE__*/React.createElement(Field, {
72
- label: "PillSelect"
82
+ }), ' '))), /*#__PURE__*/React.createElement(Field, null, /*#__PURE__*/React.createElement(Label, {
83
+ id: "".concat(baseId, "-pillselect")
84
+ }, "PillSelect"), /*#__PURE__*/React.createElement(Flex, {
85
+ gap: "sm"
73
86
  }, /*#__PURE__*/React.createElement(Box, {
74
- margin: "none xs none none",
75
- display: "inline-block"
87
+ id: "p-default"
76
88
  }, "Default"), /*#__PURE__*/React.createElement(PillSelect, {
77
89
  options: idLabelOptions,
78
90
  onChange: console.log,
79
- value: null
91
+ value: null,
92
+ "aria-labelledby": "".concat(baseId, "-pillselect p-default")
80
93
  }), /*#__PURE__*/React.createElement(Box, {
81
- margin: "none xs none md",
82
- display: "inline-block"
94
+ id: "p-search"
83
95
  }, "Search"), /*#__PURE__*/React.createElement(PillSelect, {
84
96
  options: idLabelOptions,
85
97
  onChange: console.log,
86
98
  onSearch: console.log,
87
- value: null
88
- })), /*#__PURE__*/React.createElement(Field, {
89
- label: "MultiSelect"
90
- }, /*#__PURE__*/React.createElement(MultiSelect, {
91
- options: idLabelOptions
92
- })), /*#__PURE__*/React.createElement(Field, {
93
- label: "Dropdown"
94
- }, /*#__PURE__*/React.createElement(Box, {
95
- margin: "none xs none none",
96
- display: "inline-block"
97
- }, "Default"), /*#__PURE__*/React.createElement(Dropdown, null, idLabelOptions.map(function (_ref4) {
99
+ value: null,
100
+ "aria-labelledby": "".concat(baseId, "-pillselect p-search")
101
+ }))), /*#__PURE__*/React.createElement(Field, null, /*#__PURE__*/React.createElement(Label, {
102
+ id: "".concat(baseId, "-multiselect")
103
+ }, "MultiSelect"), /*#__PURE__*/React.createElement(MultiSelect, {
104
+ options: idLabelOptions,
105
+ "aria-labelledby": "".concat(baseId, "-multiselect")
106
+ })), /*#__PURE__*/React.createElement(Field, null, /*#__PURE__*/React.createElement(Label, {
107
+ id: "".concat(baseId, "-dropdown")
108
+ }, "Dropdown"), /*#__PURE__*/React.createElement(Flex, {
109
+ gap: "sm",
110
+ wrap: "wrap"
111
+ }, /*#__PURE__*/React.createElement(Box, null, "Default"), /*#__PURE__*/React.createElement(Dropdown, {
112
+ "aria-labelledby": "".concat(baseId, "-dropdown")
113
+ }, idLabelOptions.map(function (_ref3) {
114
+ var id = _ref3.id,
115
+ label = _ref3.label;
116
+ return /*#__PURE__*/React.createElement(Dropdown.Item, {
117
+ key: id,
118
+ item: id
119
+ }, label);
120
+ })), /*#__PURE__*/React.createElement(Box, null, "Search"), /*#__PURE__*/React.createElement(Dropdown, {
121
+ onSearch: console.log,
122
+ "aria-labelledby": "".concat(baseId, "-dropdown")
123
+ }, idLabelOptions.map(function (_ref4) {
98
124
  var id = _ref4.id,
99
125
  label = _ref4.label;
100
126
  return /*#__PURE__*/React.createElement(Dropdown.Item, {
127
+ key: id,
101
128
  item: id
102
129
  }, label);
103
- })), /*#__PURE__*/React.createElement(Box, {
104
- margin: "none xs none md",
105
- display: "inline-block"
106
- }, "Search"), /*#__PURE__*/React.createElement(Dropdown, {
107
- onSearch: console.log
130
+ })), /*#__PURE__*/React.createElement(Box, null, "Restore"), /*#__PURE__*/React.createElement(Dropdown, {
131
+ restoreFocusOnHide: true,
132
+ "aria-labelledby": "".concat(baseId, "-dropdown")
108
133
  }, idLabelOptions.map(function (_ref5) {
109
134
  var id = _ref5.id,
110
135
  label = _ref5.label;
111
136
  return /*#__PURE__*/React.createElement(Dropdown.Item, {
137
+ key: id,
112
138
  item: id
113
139
  }, label);
114
- })), /*#__PURE__*/React.createElement(Box, {
115
- margin: "none xs none md",
116
- display: "inline-block"
117
- }, "Restore"), /*#__PURE__*/React.createElement(Dropdown, {
118
- restoreFocusOnHide: true
140
+ })), /*#__PURE__*/React.createElement(Box, null, "Restore w/ search"), /*#__PURE__*/React.createElement(Dropdown, {
141
+ onSearch: console.log,
142
+ restoreFocusOnHide: true,
143
+ "aria-labelledby": "".concat(baseId, "-dropdown")
119
144
  }, idLabelOptions.map(function (_ref6) {
120
145
  var id = _ref6.id,
121
146
  label = _ref6.label;
122
147
  return /*#__PURE__*/React.createElement(Dropdown.Item, {
148
+ key: id,
123
149
  item: id
124
150
  }, label);
125
- })), /*#__PURE__*/React.createElement(Box, {
126
- margin: "none xs none md",
127
- display: "inline-block"
128
- }, "Restore w/ search"), /*#__PURE__*/React.createElement(Dropdown, {
129
- onSearch: console.log,
130
- restoreFocusOnHide: true
131
- }, idLabelOptions.map(function (_ref7) {
132
- var id = _ref7.id,
133
- label = _ref7.label;
134
- return /*#__PURE__*/React.createElement(Dropdown.Item, {
135
- item: id
136
- }, label);
137
- })), /*#__PURE__*/React.createElement(Box, {
138
- margin: "none xs none md",
139
- display: "inline-block"
140
- }, "DropdownFlyout"), /*#__PURE__*/React.createElement(DropdownFlyout, {
151
+ })), /*#__PURE__*/React.createElement(Box, null, "DropdownFlyout"), /*#__PURE__*/React.createElement(DropdownFlyout, {
141
152
  style: {
142
153
  display: 'inline-block'
143
154
  },
@@ -174,10 +185,11 @@ export function EscapefulFieldSet() {
174
185
  label: 'Parrots'
175
186
  }]
176
187
  }]
177
- }]
178
- })), /*#__PURE__*/React.createElement(Field, {
179
- label: "Tiered"
180
- }, /*#__PURE__*/React.createElement(TieredSelect, {
188
+ }],
189
+ "aria-labelledby": "".concat(baseId, "-dropdown")
190
+ }))), /*#__PURE__*/React.createElement(Field, null, /*#__PURE__*/React.createElement(Label, {
191
+ id: "".concat(baseId, "-tiered")
192
+ }, "Tiered"), /*#__PURE__*/React.createElement(TieredSelect, {
181
193
  options: [{
182
194
  id: 1,
183
195
  groupId: null,
@@ -194,10 +206,11 @@ export function EscapefulFieldSet() {
194
206
  groupId: null,
195
207
  nextGroupId: 20,
196
208
  label: "Tim's Trees"
197
- }]
198
- })), /*#__PURE__*/React.createElement(Field, {
199
- label: "Tiered leaf only"
200
- }, /*#__PURE__*/React.createElement(TieredSelect, {
209
+ }],
210
+ "aria-labelledby": "".concat(baseId, "-tiered")
211
+ })), /*#__PURE__*/React.createElement(Field, null, /*#__PURE__*/React.createElement(Label, {
212
+ id: "".concat(baseId, "-tiered-leaf")
213
+ }, "Tiered leaf only"), /*#__PURE__*/React.createElement(TieredSelect, {
201
214
  selectableTiers: false,
202
215
  options: [{
203
216
  id: 1,
@@ -215,10 +228,11 @@ export function EscapefulFieldSet() {
215
228
  groupId: null,
216
229
  nextGroupId: 20,
217
230
  label: "Tim's Trees"
218
- }]
219
- })), /*#__PURE__*/React.createElement(Field, {
220
- label: "SuperSelect"
221
- }, /*#__PURE__*/React.createElement(SuperSelect, {
231
+ }],
232
+ "aria-labelledby": "".concat(baseId, "-tiered-leaf")
233
+ })), /*#__PURE__*/React.createElement(Field, null, /*#__PURE__*/React.createElement(Label, {
234
+ id: "".concat(baseId, "-superselect")
235
+ }, "SuperSelect"), /*#__PURE__*/React.createElement(SuperSelect, {
222
236
  onChange: console.log,
223
237
  options: [{
224
238
  value: '1',
@@ -230,7 +244,68 @@ export function EscapefulFieldSet() {
230
244
  value: '3',
231
245
  label: 'three three three'
232
246
  }],
233
- emptyMessage: "E m p t y"
247
+ emptyMessage: "E m p t y",
248
+ "aria-labelledby": "".concat(baseId, "-superselect")
234
249
  })));
235
250
  }
251
+ function PopupSet(_ref7) {
252
+ var _ref7$alignLeft = _ref7.alignLeft,
253
+ alignLeft = _ref7$alignLeft === void 0 ? true : _ref7$alignLeft;
254
+ var baseId = useId();
255
+ var id = {
256
+ pop1: baseId + 'pop1',
257
+ pop2: baseId + 'pop2'
258
+ };
259
+ return /*#__PURE__*/React.createElement(Actions, {
260
+ style: {
261
+ // TODO new prop. sometimes left actions could make sense
262
+ justifyContent: alignLeft ? 'flex-start' : undefined,
263
+ // why not, different sizes (Switch) just align them
264
+ alignItems: 'center'
265
+ }
266
+ }, /*#__PURE__*/React.createElement(Tooltip, {
267
+ overlay: "Tooltip popup here, checks out.",
268
+ role: "tooltip",
269
+ trigger: ['focus', 'hover']
270
+ }, /*#__PURE__*/React.createElement(Button, {
271
+ variant: "secondary",
272
+ onClick: alert.bind(null, 'CORE')
273
+ }, "Tooltip!")), /*#__PURE__*/React.createElement(Tooltip, {
274
+ overlay: "Long name never gonna give you up.mp4",
275
+ role: "tooltip",
276
+ trigger: ['focus', 'hover']
277
+ }, /*#__PURE__*/React.createElement(Link, {
278
+ href: "#"
279
+ }, "Long name....up.mp4")), /*#__PURE__*/React.createElement(Popover, {
280
+ "aria-labelledby": id.pop1,
281
+ restoreFocusOnHide: true,
282
+ role: "dialog",
283
+ overlay: /*#__PURE__*/React.createElement(Popover.Content, null, /*#__PURE__*/React.createElement(Box, {
284
+ padding: "sm"
285
+ }, "Popover popup here, check out this", ' ', /*#__PURE__*/React.createElement(Link, {
286
+ href: "https://app.procore.com"
287
+ }, "app link"), " and", ' ', /*#__PURE__*/React.createElement(Link, {
288
+ href: "https://login.procore.com"
289
+ }, "login link"), ".")),
290
+ trigger: ['click']
291
+ }, /*#__PURE__*/React.createElement(Button, {
292
+ "aria-haspopup": "dialog",
293
+ id: id.pop1,
294
+ variant: "secondary"
295
+ }, "Click to Popup!")));
296
+ }
297
+ export function UserInteractionSet() {
298
+ return /*#__PURE__*/React.createElement(Content, null, /*#__PURE__*/React.createElement(PopupSet, null), /*#__PURE__*/React.createElement(Form, {
299
+ enableConfirmNavigation: true,
300
+ initialValues: {
301
+ rtf: '<b>Clicking the TinyMCE option to add a link should open a modal, and that modal should be able to receive focus.</b>'
302
+ }
303
+ }, /*#__PURE__*/React.createElement(Form.Row, null, /*#__PURE__*/React.createElement(Form.DateSelect, {
304
+ colWidth: 12,
305
+ description: "Form Field with misc interactions",
306
+ label: "Form Component Field",
307
+ name: "f_1",
308
+ tooltip: "Tooltip popup here, checks out."
309
+ }))), /*#__PURE__*/React.createElement(EscapefulFieldSet, null));
310
+ }
236
311
  //# sourceMappingURL=storyHelpers.js.map