@procore/core-react 12.17.5 → 12.17.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/babel.config.js +4 -1
- package/dist/AnchorNavigation/AnchorNavigation.js.map +1 -1
- package/dist/AnchorNavigation/AnchorNavigation.styles.js +3 -3
- package/dist/AnchorNavigation/AnchorNavigationProvider.js +5 -5
- package/dist/AnchorNavigation/AnchorNavigationProvider.js.map +1 -1
- package/dist/Avatar/Avatar.js +10 -11
- package/dist/Avatar/Avatar.js.map +1 -1
- package/dist/Avatar/Avatar.styles.js +5 -5
- package/dist/AvatarStack/AvatarStack.js +14 -14
- package/dist/AvatarStack/AvatarStack.js.map +1 -1
- package/dist/AvatarStack/AvatarStack.styles.js +7 -7
- package/dist/Badge/Badge.js +1 -1
- package/dist/Badge/Badge.styles.js +2 -2
- package/dist/Banner/Banner.js +44 -14
- package/dist/Banner/Banner.js.map +1 -1
- package/dist/Banner/Banner.styles.d.ts +1 -1
- package/dist/Banner/Banner.styles.js +15 -15
- package/dist/Banner/Banner.styles.js.map +1 -1
- package/dist/Box/Box.js +3 -3
- package/dist/Box/Box.styles.js +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.js +9 -9
- package/dist/Breadcrumbs/Breadcrumbs.styles.js +4 -4
- package/dist/Button/Button.js +7 -7
- package/dist/Button/Button.js.map +1 -1
- package/dist/Button/Button.styles.d.ts +1 -0
- package/dist/Button/Button.styles.js +7 -7
- package/dist/Button/Button.styles.js.map +1 -1
- package/dist/Button/Button.types.d.ts +4 -0
- package/dist/Button/Button.types.js.map +1 -1
- package/dist/Calendar/Calendar.js +4 -4
- package/dist/Calendar/Calendar.js.map +1 -1
- package/dist/Calendar/Calendar.styles.js +8 -8
- package/dist/Card/Card.js +3 -3
- package/dist/Card/Card.styles.js +1 -1
- package/dist/Checkbox/Checkbox.js +9 -9
- package/dist/Checkbox/Checkbox.styles.js +6 -6
- package/dist/Checkbox/CheckboxTooltip.js +2 -2
- package/dist/CheckboxGroup/CheckboxGroup.js +8 -8
- package/dist/ClickOutside/ClickOutside.js +3 -3
- package/dist/ContactItem/ContactItem.js +3 -3
- package/dist/ContactItem/ContactItem.styles.js +5 -5
- package/dist/Content/Content.styles.js +2 -2
- package/dist/DateInput/DateInput.js +11 -11
- package/dist/DateInput/DateInput.js.map +1 -1
- package/dist/DateInput/DateInput.styles.js +10 -10
- package/dist/DateSelect/DateSelect.js +8 -8
- package/dist/DateSelect/DateSelect.js.map +1 -1
- package/dist/DetailPage/DetailPage.js +3 -3
- package/dist/DetailPage/DetailPage.styles.js +7 -7
- package/dist/DetailPage/examples/TableExample.js +5 -5
- package/dist/DetailPageTemplate/DetailPageTemplate.js +3 -3
- package/dist/Dropdown/Dropdown.js +8 -8
- package/dist/Dropdown/Dropdown.styles.js +3 -3
- package/dist/DropdownFlyout/DropdownFlyout.helpers.js +14 -14
- package/dist/DropdownFlyout/DropdownFlyout.js +8 -8
- package/dist/DropdownFlyout/DropdownFlyout.js.map +1 -1
- package/dist/DropdownFlyout/DropdownFlyout.styles.js +4 -4
- package/dist/Dropzone/Dropzone.hooks.js +17 -18
- package/dist/Dropzone/Dropzone.hooks.js.map +1 -1
- package/dist/Dropzone/Dropzone.js +19 -21
- package/dist/Dropzone/Dropzone.js.map +1 -1
- package/dist/Dropzone/Dropzone.styles.js +9 -9
- package/dist/EmptyState/EmptyState.js +3 -3
- package/dist/EmptyState/EmptyState.styles.js +6 -6
- package/dist/Field/Field.js +3 -3
- package/dist/Field/Field.styles.js +3 -3
- package/dist/FileList/FileList.js +3 -3
- package/dist/FileList/FileList.styles.js +4 -4
- package/dist/FileSelect/FileExplorer/FileExplorer.js +3 -3
- package/dist/FileSelect/FileExplorer/FileExplorer.js.map +1 -1
- package/dist/FileSelect/FileExplorer/FileExplorer.styles.js +9 -9
- package/dist/FileSelect/FileExplorer/FileExplorerModal.js +3 -3
- package/dist/FileSelect/FileExplorer/FileExplorerSidebar.js +5 -5
- package/dist/FileSelect/FileExplorer/FileExplorerSidebar.js.map +1 -1
- package/dist/FileSelect/FileExplorer/FileExplorerSidebar.styles.js +3 -3
- package/dist/FileSelect/FileExplorer/useSidebarNavigation.js +8 -8
- package/dist/FileSelect/FileSelect.js +21 -21
- package/dist/FileSelect/FileSelect.js.map +1 -1
- package/dist/FileSelect/FileSelect.styles.js +2 -2
- package/dist/FileSelect/FileSelectDropzone/FileSelectDropzone.js +5 -5
- package/dist/FileSelect/FileSelectDropzone/FileSelectDropzone.js.map +1 -1
- package/dist/FileSelect/FileSelectDropzone/FileSelectDropzone.styles.js +3 -3
- package/dist/FileSelect/FileTokenList/FileTokenList.js +8 -8
- package/dist/FileSelect/FileTokenList/FileTokenList.js.map +1 -1
- package/dist/FileSelect/FileTokenList/FileTokenList.styles.js +2 -2
- package/dist/FileSelect/GridSource/GridSource.js +20 -20
- package/dist/FileSelect/GridSource/GridSource.js.map +1 -1
- package/dist/FileSelect/GridSource/GridSource.styles.js +6 -6
- package/dist/FileSelect/LocalSource/LocalSource.js +19 -19
- package/dist/FileSelect/LocalSource/LocalSource.js.map +1 -1
- package/dist/FileSelect/LocalSource/LocalSource.styles.js +4 -4
- package/dist/FileSelect/ProgressAnnouncer/ProgressAnnouncer.js +11 -11
- package/dist/FileSelect/SourceItem/SourceItem.js +3 -3
- package/dist/FileSelect/SourceItem/SourceItem.styles.js +3 -3
- package/dist/FileSelect/ThumbnailList/ThumbnailList.js +8 -8
- package/dist/FileSelect/ThumbnailList/ThumbnailList.js.map +1 -1
- package/dist/FileSelect/ThumbnailList/ThumbnailList.styles.js +6 -6
- package/dist/FileSelect/TreeSource/TreeSource.js +21 -21
- package/dist/FileSelect/TreeSource/TreeSource.js.map +1 -1
- package/dist/FileSelect/TreeSource/TreeSource.styles.js +1 -1
- package/dist/FileSelect/storyHelpers.js +4 -4
- package/dist/FileSelect/storyHelpers.js.map +1 -1
- package/dist/FileToken/FileToken.js +8 -8
- package/dist/FileToken/FileToken.styles.js +4 -4
- package/dist/FilterToken/FilterToken.js +25 -35
- package/dist/FilterToken/FilterToken.js.map +1 -1
- package/dist/FilterToken/FilterToken.styles.d.ts +5 -0
- package/dist/FilterToken/FilterToken.styles.js +18 -2
- package/dist/FilterToken/FilterToken.styles.js.map +1 -1
- package/dist/Flex/Flex.js +3 -3
- package/dist/FlexList/FlexList.js +3 -3
- package/dist/FlexList/FlexList.styles.js +1 -1
- package/dist/Form/Form.js +22 -18
- package/dist/Form/Form.js.map +1 -1
- package/dist/Form/Form.styles.js +14 -14
- package/dist/Form/FormFieldTooltip.js +1 -1
- package/dist/Form/StyledFormikForm.styles.js +2 -2
- package/dist/Form/stories/util.js +9 -9
- package/dist/Form/stories/util.js.map +1 -1
- package/dist/GhostPlaceholder/GhostPlaceholder.js +3 -3
- package/dist/GhostPlaceholder/GhostPlaceholder.styles.js +2 -2
- package/dist/Grid/Grid.js +3 -3
- package/dist/Grid/Grid.styles.js +3 -3
- package/dist/Grid/Grid.utils.js +5 -5
- package/dist/GroupSelect/GroupSelect.js +17 -17
- package/dist/GroupSelect/GroupSelect.styles.js +1 -1
- package/dist/Input/Input.js +3 -3
- package/dist/Input/Input.styles.js +1 -1
- package/dist/Link/Link.js +3 -3
- package/dist/Link/Link.styles.js +1 -1
- package/dist/ListPage/ListPage.js +3 -3
- package/dist/ListPage/ListPage.styles.js +8 -8
- package/dist/Loader/Loader.js +3 -3
- package/dist/Loader/Loader.styles.js +2 -2
- package/dist/Menu/Menu.js +15 -15
- package/dist/Menu/Menu.js.map +1 -1
- package/dist/MenuImperative/MenuImperative.js +15 -15
- package/dist/MenuImperative/MenuImperative.js.map +1 -1
- package/dist/MenuImperative/MenuImperative.styles.js +10 -10
- package/dist/MenuImperative/sensors.js +8 -8
- package/dist/MenuImperative/sensors.js.map +1 -1
- package/dist/Modal/ChildRegistry.context.js +11 -11
- package/dist/Modal/Modal.js +8 -8
- package/dist/Modal/Modal.js.map +1 -1
- package/dist/Modal/Modal.styles.js +13 -13
- package/dist/Modal/Modal.types.d.ts +3 -1
- package/dist/Modal/Modal.types.js.map +1 -1
- package/dist/Modal/storyHelpers.js +7 -7
- package/dist/MultiSelect/MultiSelect.js +17 -17
- package/dist/MultiSelect/MultiSelect.js.map +1 -1
- package/dist/MultiSelect/MultiSelect.styles.js +6 -6
- package/dist/NextMenu/NextMenu.js +14 -14
- package/dist/NextMenu/NextMenu.js.map +1 -1
- package/dist/NextMenu/NextMenu.styles.js +3 -3
- package/dist/NextMenu/NextMenuItem.js +3 -3
- package/dist/NextMenu/sampleData.js +7 -6
- package/dist/NextMenu/sampleData.js.map +1 -1
- package/dist/NextTile/NextTile.js +9 -9
- package/dist/Notation/Notation.js +4 -4
- package/dist/NumberInput/NumberInput.hooks.js +5 -5
- package/dist/NumberInput/NumberInput.js +14 -14
- package/dist/NumberInput/NumberInput.js.map +1 -1
- package/dist/NumberInput/NumberInput.styles.js +7 -7
- package/dist/NumberInput/NumberInput.utils.js +11 -11
- package/dist/Overlay/Overlay.js.map +1 -1
- package/dist/Overlay/OverlayArrow.js +4 -4
- package/dist/Overlay/OverlayArrow.styles.js +1 -1
- package/dist/OverlayTrigger/OverlayTrigger.js +15 -15
- package/dist/OverlayTrigger/OverlayTrigger.js.map +1 -1
- package/dist/OverlayTrigger/a11yPresets.js +6 -6
- package/dist/OverlayTrigger/a11yPresets.js.map +1 -1
- package/dist/PageFooterTemplate/PageFooterTemplate.js +3 -3
- package/dist/PageFooterTemplate/PageFooterTemplate.styles.js +1 -1
- package/dist/PageHeaderTemplate/PageHeaderTemplate.js +3 -3
- package/dist/PageHeaderTemplate/PageHeaderTemplate.styles.js +3 -3
- package/dist/PageHeaderTemplate/PageHeaderTemplate.utils.js +5 -5
- package/dist/PageLayout/PageLayout.js +15 -15
- package/dist/PageLayout/PageLayout.js.map +1 -1
- package/dist/PageLayout/PageLayout.styles.js +16 -16
- package/dist/PagePaneTemplate/PagePaneTemplate.styles.js +2 -2
- package/dist/PageTemplate/PageTemplate.js +3 -3
- package/dist/PageTemplate/PageTemplate.styles.js +3 -3
- package/dist/PageTemplate/PageTemplateCard.js +3 -3
- package/dist/Pagination/Pagination.js +3 -3
- package/dist/Pagination/Pagination.js.map +1 -1
- package/dist/Pagination/Pagination.styles.js +5 -5
- package/dist/Pagination/PaginationSelect.js +3 -3
- package/dist/Panel/Panel.js +8 -8
- package/dist/Panel/Panel.js.map +1 -1
- package/dist/Panel/Panel.styles.js +11 -11
- package/dist/Pill/Pill.js +3 -3
- package/dist/Pill/Pill.styles.js +2 -2
- package/dist/PillSelect/PillSelect.js +8 -8
- package/dist/PillSelect/PillSelect.styles.js +4 -4
- package/dist/Popover/Popover.js +9 -9
- package/dist/Popover/Popover.styles.js +2 -2
- package/dist/Portal/Portal.js +3 -3
- package/dist/Portal/Portal.styles.js +1 -1
- package/dist/ProgressBar/ProgressBar.d.ts +2 -0
- package/dist/ProgressBar/ProgressBar.js +10 -8
- package/dist/ProgressBar/ProgressBar.js.map +1 -1
- package/dist/ProgressBar/ProgressBar.styles.js +2 -2
- package/dist/ProgressBar/ProgressBar.types.js.map +1 -1
- package/dist/RadioButton/RadioButton.js +3 -3
- package/dist/RadioButton/RadioButton.styles.js +3 -3
- package/dist/Required/Required.js +3 -3
- package/dist/Required/Required.styles.js +3 -3
- package/dist/Search/Search.hooks.js +5 -5
- package/dist/Search/Search.js +3 -3
- package/dist/Search/Search.js.map +1 -1
- package/dist/Search/Search.styles.js +5 -5
- package/dist/Section/Section.js +15 -16
- package/dist/Section/Section.js.map +1 -1
- package/dist/Section/Section.styles.js +7 -7
- package/dist/Section/Section.styles.js.map +1 -1
- package/dist/SegmentedController/SegmentedController.js +14 -14
- package/dist/SegmentedController/SegmentedController.js.map +1 -1
- package/dist/SegmentedController/SegmentedController.styles.js +4 -4
- package/dist/Select/Select.js +8 -8
- package/dist/Select/Select.js.map +1 -1
- package/dist/Select/Select.styles.js +7 -7
- package/dist/Semantic/Semantic.js +3 -3
- package/dist/Semantic/Semantic.styles.js +9 -9
- package/dist/SettingsPage/SettingsPage.js +3 -3
- package/dist/SettingsPageTemplate/SettingsPageTemplate.js +3 -3
- package/dist/Slider/Slider.js +8 -8
- package/dist/Slider/Slider.js.map +1 -1
- package/dist/Slider/Slider.styles.js +5 -5
- package/dist/Spinner/Spinner.js +3 -3
- package/dist/Spinner/Spinner.styles.js +7 -7
- package/dist/SplitViewCard/SplitViewCard.context.js +5 -5
- package/dist/SplitViewCard/SplitViewCard.context.js.map +1 -1
- package/dist/SplitViewCard/SplitViewCard.js +8 -8
- package/dist/SplitViewCard/SplitViewCard.styles.js +8 -8
- package/dist/SuperSelect/SuperSelect.components.js +8 -8
- package/dist/SuperSelect/SuperSelect.components.js.map +1 -1
- package/dist/SuperSelect/SuperSelect.js +7 -7
- package/dist/SuperSelect/SuperSelect.js.map +1 -1
- package/dist/SuperSelect/SuperSelect.presets.styles.js +1 -1
- package/dist/SuperSelect/SuperSelect.styles.js +37 -37
- package/dist/SuperSelect/SuperSelect.utils.js +15 -16
- package/dist/SuperSelect/SuperSelect.utils.js.map +1 -1
- package/dist/SuperSelect/presets/contactsPreset.js +3 -3
- package/dist/SuperSelect/presets/contactsPreset.js.map +1 -1
- package/dist/SuperSelect/presets/filterPreset.js +1 -1
- package/dist/SuperSelect/presets/filterPreset.js.map +1 -1
- package/dist/SuperSelect/presets/pillPreset.js.map +1 -1
- package/dist/SuperSelect/useSuperSelect.js +14 -14
- package/dist/SuperSelect/useSuperSelect.js.map +1 -1
- package/dist/Switch/Switch.js +3 -3
- package/dist/Switch/Switch.styles.js +4 -4
- package/dist/Table/Table.js +9 -9
- package/dist/Table/Table.js.map +1 -1
- package/dist/Table/Table.styles.js +28 -28
- package/dist/TableShelf/TableShelf.js +3 -3
- package/dist/TableShelf/TableShelf.styles.js +5 -5
- package/dist/Tabs/Tabs.js +17 -17
- package/dist/Tabs/Tabs.js.map +1 -1
- package/dist/Tabs/Tabs.styles.js +15 -15
- package/dist/Tearsheet/Tearsheet.js +11 -11
- package/dist/Tearsheet/Tearsheet.js.map +1 -1
- package/dist/Tearsheet/Tearsheet.styles.js +5 -5
- package/dist/TextArea/TextArea.js +3 -3
- package/dist/TextArea/TextArea.styles.js +1 -1
- package/dist/TextEditor/TextEditor.js +17 -17
- package/dist/TextEditorOutput/TextEditorOutput.js +9 -9
- package/dist/TextEditorOutput/TextEditorOutput.styles.js +1 -1
- package/dist/Thumbnail/Thumbnail.hooks.d.ts +8 -0
- package/dist/Thumbnail/Thumbnail.hooks.js +8 -8
- package/dist/Thumbnail/Thumbnail.js +9 -9
- package/dist/Thumbnail/Thumbnail.js.map +1 -1
- package/dist/Thumbnail/Thumbnail.styles.js +17 -17
- package/dist/Thumbnail/Thumbnail.utils.js +11 -12
- package/dist/Thumbnail/Thumbnail.utils.js.map +1 -1
- package/dist/Thumbnail/ThumbnailCaption.js +3 -3
- package/dist/Thumbnail/ThumbnailDocumentIcon.js +7 -8
- package/dist/Thumbnail/ThumbnailDocumentIcon.js.map +1 -1
- package/dist/Thumbnail/ThumbnailPreview.js +5 -5
- package/dist/ThumbnailGrid/ThumbnailGrid.hooks.js +5 -5
- package/dist/ThumbnailGrid/ThumbnailGrid.js +17 -17
- package/dist/ThumbnailGrid/ThumbnailGrid.js.map +1 -1
- package/dist/ThumbnailGrid/ThumbnailGrid.styles.js +7 -7
- package/dist/TieredDropdown/TieredDropdown.js +14 -14
- package/dist/TieredDropdown/TieredDropdown.js.map +1 -1
- package/dist/TieredDropdown/useSearch.js +5 -5
- package/dist/TieredSelect/LeafSelectionTieredSelect.js +8 -8
- package/dist/TieredSelect/LeafSelectionTieredSelect.js.map +1 -1
- package/dist/TieredSelect/TierSelectionTieredSelect.js +17 -17
- package/dist/TieredSelect/TierSelectionTieredSelect.js.map +1 -1
- package/dist/TieredSelect/TieredSelect.js +8 -8
- package/dist/TieredSelect/TieredSelect.styles.js +9 -9
- package/dist/TieredSelect/TieredSelectMenu.js +17 -17
- package/dist/TieredSelect/TieredSelectMenu.js.map +1 -1
- package/dist/Tile/Tile.js +3 -3
- package/dist/Tile/Tile.js.map +1 -1
- package/dist/Tile/Tile.styles.js +8 -8
- package/dist/Title/Title.js +3 -3
- package/dist/Title/Title.styles.js +7 -7
- package/dist/Toast/Toast.js +4 -4
- package/dist/Toast/Toast.styles.js +3 -3
- package/dist/ToggleButton/ToggleButton.js +3 -3
- package/dist/ToggleButton/ToggleButton.styles.js +1 -1
- package/dist/Token/Token.js +4 -4
- package/dist/Token/Token.styles.js +3 -3
- package/dist/ToolHeader/ActionIcon.js +3 -3
- package/dist/ToolHeader/ActionIcon.types.example.js.map +1 -1
- package/dist/ToolHeader/ToolHeader.js +9 -9
- package/dist/ToolHeader/ToolHeader.styles.js +6 -6
- package/dist/ToolLandingPage/ToolLandingPage.js +3 -3
- package/dist/ToolLandingPage/ToolLandingPage.styles.js +3 -3
- package/dist/ToolLandingPageTemplate/ToolLandingPageTemplate.js +3 -3
- package/dist/Tooltip/Tooltip.js +8 -8
- package/dist/Tooltip/Tooltip.styles.js +2 -2
- package/dist/Tree/Tree.hooks.js +14 -14
- package/dist/Tree/Tree.hooks.js.map +1 -1
- package/dist/Tree/Tree.js +14 -14
- package/dist/Tree/Tree.js.map +1 -1
- package/dist/Tree/Tree.styles.js +9 -9
- package/dist/Tree/Tree.styles.js.map +1 -1
- package/dist/Typeahead/Typeahead.js +9 -9
- package/dist/Typeahead/Typeahead.styles.js +3 -3
- package/dist/Typography/Typography.js +3 -3
- package/dist/Typography/Typography.styles.js +1 -1
- package/dist/Typography/Typography.table.story.js +2 -2
- package/dist/_hooks/Anchor.js +19 -16
- package/dist/_hooks/Anchor.js.map +1 -1
- package/dist/_hooks/Buffer.js +8 -7
- package/dist/_hooks/Buffer.js.map +1 -1
- package/dist/_hooks/ClickOutside.js +2 -1
- package/dist/_hooks/ClickOutside.js.map +1 -1
- package/dist/_hooks/DateTime/DateTime.js +17 -17
- package/dist/_hooks/DelayedCallback.js +1 -1
- package/dist/_hooks/DelayedToggle.js +7 -2
- package/dist/_hooks/DelayedToggle.js.map +1 -1
- package/dist/_hooks/Deprecation.js +1 -0
- package/dist/_hooks/Deprecation.js.map +1 -1
- package/dist/_hooks/EventListener.js +5 -5
- package/dist/_hooks/FocusScopeOverride.js +6 -6
- package/dist/_hooks/FocusScopeOverride.js.map +1 -1
- package/dist/_hooks/Hotkey.js +2 -2
- package/dist/_hooks/Hotkey.js.map +1 -1
- package/dist/_hooks/I18n.js +13 -13
- package/dist/_hooks/InjectedScript.js +8 -7
- package/dist/_hooks/InjectedScript.js.map +1 -1
- package/dist/_hooks/IntersectionObserver/useIntersectionObserver.js +5 -5
- package/dist/_hooks/ListNavigation.js +9 -7
- package/dist/_hooks/ListNavigation.js.map +1 -1
- package/dist/_hooks/OverflowObserver/OverflowObserver.js +6 -6
- package/dist/_hooks/ResizeObserver.js +5 -5
- package/dist/_hooks/TextEntry.js +5 -2
- package/dist/_hooks/TextEntry.js.map +1 -1
- package/dist/_hooks/Timer.js +1 -0
- package/dist/_hooks/Timer.js.map +1 -1
- package/dist/_hooks/Trigger.js +19 -13
- package/dist/_hooks/Trigger.js.map +1 -1
- package/dist/_hooks/Visibility.js +9 -7
- package/dist/_hooks/Visibility.js.map +1 -1
- package/dist/_hooks/ZIndex.js +7 -7
- package/dist/_hooks/getI18nProviderLocale.js +2 -1
- package/dist/_hooks/getI18nProviderLocale.js.map +1 -1
- package/dist/_hooks/useCurrentMedia.js +5 -5
- package/dist/_hooks/useFileUploader.js +15 -15
- package/dist/_hooks/useFileUploader.js.map +1 -1
- package/dist/_hooks/useFocusWithin.js +5 -5
- package/dist/_hooks/useMediaLessThan.js +5 -5
- package/dist/_hooks/useSet.js +5 -5
- package/dist/_styles/colors.js +6 -6
- package/dist/_styles/spacing.d.ts +27 -0
- package/dist/_styles/spacing.js +27 -0
- package/dist/_styles/spacing.js.map +1 -1
- package/dist/_typedoc/Avatar/Avatar.types.json +20 -20
- package/dist/_typedoc/AvatarStack/AvatarStack.types.json +24 -24
- package/dist/_typedoc/Badge/Badge.types.json +6 -6
- package/dist/_typedoc/Banner/Banner.types.json +13 -13
- package/dist/_typedoc/Box/Box.types.json +68 -68
- package/dist/_typedoc/Breadcrumbs/Breadcrumbs.types.json +10 -10
- package/dist/_typedoc/Button/Button.types.json +24 -16
- package/dist/_typedoc/Calendar/Calendar.types.json +80 -80
- package/dist/_typedoc/Card/Card.types.json +6 -6
- package/dist/_typedoc/Checkbox/Checkbox.types.json +9 -9
- package/dist/_typedoc/ContactItem/ContactItem.types.json +9 -9
- package/dist/_typedoc/DateInput/DateInput.types.json +35 -35
- package/dist/_typedoc/DateSelect/DateSelect.types.json +13 -13
- package/dist/_typedoc/DetailPage/DetailPage.types.json +5 -5
- package/dist/_typedoc/Dropdown/Dropdown.types.json +43 -39
- package/dist/_typedoc/DropdownFlyout/DropdownFlyout.types.json +29 -29
- package/dist/_typedoc/Dropzone/Dropzone.types.json +41 -41
- package/dist/_typedoc/EmptyState/EmptyState.types.json +14 -14
- package/dist/_typedoc/FileList/FileList.types.json +9 -9
- package/dist/_typedoc/FileSelect/FileSelect.types.json +26 -26
- package/dist/_typedoc/FileSelect/GridSource/GridSource.types.json +20 -20
- package/dist/_typedoc/FileSelect/LocalSource/LocalSource.types.json +14 -14
- package/dist/_typedoc/FileSelect/TreeSource/TreeSource.types.json +9 -9
- package/dist/_typedoc/Flex/Flex.types.json +27 -27
- package/dist/_typedoc/FlexList/FlexList.types.json +30 -30
- package/dist/_typedoc/Form/Form.types.json +745 -745
- package/dist/_typedoc/GhostPlaceholder/GhostPlaceholder.types.json +12 -12
- package/dist/_typedoc/Grid/Grid.types.json +8 -8
- package/dist/_typedoc/GroupSelect/GroupSelect.types.json +52 -52
- package/dist/_typedoc/Input/Input.types.json +2 -2
- package/dist/_typedoc/Link/Link.types.json +4 -4
- package/dist/_typedoc/ListPage/ListPage.types.json +13 -13
- package/dist/_typedoc/Menu/Menu.types.json +62 -62
- package/dist/_typedoc/MenuImperative/MenuImperative.types.json +74 -74
- package/dist/_typedoc/Modal/Modal.types.json +50 -50
- package/dist/_typedoc/MultiSelect/MultiSelect.types.json +31 -31
- package/dist/_typedoc/Notation/Notation.types.json +4 -4
- package/dist/_typedoc/NumberInput/NumberInput.types.json +37 -37
- package/dist/_typedoc/OverlayTrigger/OverlayTrigger.types.json +31 -31
- package/dist/_typedoc/PageLayout/PageLayout.types.json +29 -29
- package/dist/_typedoc/Pagination/Pagination.types.json +7 -7
- package/dist/_typedoc/Panel/Panel.types.json +34 -30
- package/dist/_typedoc/Pill/Pill.types.json +2 -2
- package/dist/_typedoc/PillSelect/PillSelect.types.json +49 -49
- package/dist/_typedoc/Popover/Popover.types.json +15 -15
- package/dist/_typedoc/ProgressBar/ProgressBar.types.json +6 -6
- package/dist/_typedoc/RadioButton/RadioButton.types.json +6 -6
- package/dist/_typedoc/Required/Required.types.json +5 -5
- package/dist/_typedoc/Search/Search.types.json +19 -19
- package/dist/_typedoc/Section/Section.types.json +15 -15
- package/dist/_typedoc/SegmentedController/SegmentedController.types.json +21 -21
- package/dist/_typedoc/Select/Select.types.json +60 -60
- package/dist/_typedoc/SettingsPage/SettingsPage.types.json +10 -10
- package/dist/_typedoc/Slider/Slider.types.json +6 -6
- package/dist/_typedoc/Spinner/Spinner.types.json +9 -9
- package/dist/_typedoc/SplitViewCard/SplitViewCard.types.json +12 -12
- package/dist/_typedoc/Switch/Switch.types.json +3 -3
- package/dist/_typedoc/Table/Table.types.json +101 -101
- package/dist/_typedoc/Tabs/Tabs.types.json +20 -20
- package/dist/_typedoc/Tearsheet/Tearsheet.types.json +17 -17
- package/dist/_typedoc/TextArea/TextArea.types.json +3 -3
- package/dist/_typedoc/TextEditor/TextEditor.types.json +11 -11
- package/dist/_typedoc/TextEditorOutput/TextEditorOutput.types.json +6 -6
- package/dist/_typedoc/Thumbnail/Thumbnail.types.json +19 -19
- package/dist/_typedoc/TieredDropdown/TieredDropdown.types.json +48 -44
- package/dist/_typedoc/TieredSelect/TieredSelect.types.json +28 -28
- package/dist/_typedoc/Tile/Tile.types.json +30 -30
- package/dist/_typedoc/Title/Title.types.json +1 -1
- package/dist/_typedoc/Toast/Toast.types.json +4 -4
- package/dist/_typedoc/ToggleButton/ToggleButton.types.json +4 -4
- package/dist/_typedoc/Token/Token.types.json +4 -4
- package/dist/_typedoc/ToolHeader/ToolHeader.types.json +10 -10
- package/dist/_typedoc/ToolLandingPage/ToolLandingPage.types.json +7 -7
- package/dist/_typedoc/Tooltip/Tooltip.types.json +13 -13
- package/dist/_typedoc/Tree/Tree.types.json +86 -86
- package/dist/_typedoc/Typeahead/Typeahead.types.json +2 -2
- package/dist/_typedoc/Typography/Typography.types.json +9 -9
- package/dist/_typedoc/_utils/types.json +3 -3
- package/dist/_typedoc/deprecations.json +1 -1
- package/dist/_utils/TinyMCE.js +4 -4
- package/dist/_utils/TinyMCE.js.map +1 -1
- package/dist/_utils/closeWithConfirm.js +5 -5
- package/dist/_utils/closeWithConfirm.js.map +1 -1
- package/dist/_utils/dateTime.js +6 -6
- package/dist/_utils/dateTime.js.map +1 -1
- package/dist/_utils/getAnchorPosition.js +11 -11
- package/dist/_utils/getAnchorPosition.js.map +1 -1
- package/dist/_utils/partition.js +5 -5
- package/dist/_utils/runInQueue.js +4 -4
- package/dist/_utils/runInQueue.js.map +1 -1
- package/dist/_utils/slotify.js +7 -7
- package/dist/_utils/triggerListeners.js +6 -6
- package/package.json +5 -4
- package/tsconfig.prod.json +2 -1
- package/tsconfig.test.json +1 -1
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"description": "",
|
|
11
11
|
"descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>10.19.0</p>\n</dd></dl></div>",
|
|
12
12
|
"sourceFile": "packages/core-react/src/Typeahead/Typeahead.types.ts",
|
|
13
|
-
"sourceUrl": "https://github.com/procore/core/blob/
|
|
13
|
+
"sourceUrl": "https://github.com/procore/core/blob/5402ee2/packages/core-react/src/Typeahead/Typeahead.types.ts#L15"
|
|
14
14
|
},
|
|
15
15
|
{
|
|
16
16
|
"name": "onChange",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"description": "",
|
|
21
21
|
"descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>10.19.0</p>\n</dd></dl></div>",
|
|
22
22
|
"sourceFile": "packages/core-react/src/Typeahead/Typeahead.types.ts",
|
|
23
|
-
"sourceUrl": "https://github.com/procore/core/blob/
|
|
23
|
+
"sourceUrl": "https://github.com/procore/core/blob/5402ee2/packages/core-react/src/Typeahead/Typeahead.types.ts#L19"
|
|
24
24
|
}
|
|
25
25
|
],
|
|
26
26
|
"description": ""
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"description": "Change the HTML tag. This\n[prop is from styled-components](https://styled-components.com/docs/api#as-polymorphic-prop)\n__Warning__: If using TypeScript, it will not switch types and\nsome props may error. You can add `@ts-expect-error`.\nSee [styled-components issue](https://github.com/DefinitelyTyped/DefinitelyTyped/issues/30117)",
|
|
11
11
|
"descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Change the HTML tag. This\n<a href=\"https://styled-components.com/docs/api#as-polymorphic-prop\">prop is from styled-components</a>\n<strong>Warning</strong>: If using TypeScript, it will not switch types and\nsome props may error. You can add <code>@ts-expect-error</code>.\nSee <a href=\"https://github.com/DefinitelyTyped/DefinitelyTyped/issues/30117\">styled-components issue</a></p>\n</div><dl class=\"tsd-comment-tags\"><dt>default</dt><dd><p>'span'</p>\n</dd><dt>since</dt><dd><p>10.19.0</p>\n</dd></dl></div>",
|
|
12
12
|
"sourceFile": "packages/core-react/src/Typography/Typography.types.ts",
|
|
13
|
-
"sourceUrl": "https://github.com/procore/core/blob/
|
|
13
|
+
"sourceUrl": "https://github.com/procore/core/blob/5402ee2/packages/core-react/src/Typography/Typography.types.ts#L26"
|
|
14
14
|
},
|
|
15
15
|
{
|
|
16
16
|
"name": "breakWord",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"description": "Enables word wrapping and breaking within the component",
|
|
21
21
|
"descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Enables word wrapping and breaking within the component</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>12.0.0</p>\n</dd></dl></div>",
|
|
22
22
|
"sourceFile": "packages/core-react/src/Typography/Typography.types.ts",
|
|
23
|
-
"sourceUrl": "https://github.com/procore/core/blob/
|
|
23
|
+
"sourceUrl": "https://github.com/procore/core/blob/5402ee2/packages/core-react/src/Typography/Typography.types.ts#L57"
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
"name": "children",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"description": "When children are a string or multiple elements, they will be wrapped\nby a `span`. When it is a single element, classnames will\nbe added to it instead",
|
|
31
31
|
"descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>When children are a string or multiple elements, they will be wrapped\nby a <code>span</code>. When it is a single element, classnames will\nbe added to it instead</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>10.19.0</p>\n</dd></dl></div>",
|
|
32
32
|
"sourceFile": "packages/core-react/src/Typography/Typography.types.ts",
|
|
33
|
-
"sourceUrl": "https://github.com/procore/core/blob/
|
|
33
|
+
"sourceUrl": "https://github.com/procore/core/blob/5402ee2/packages/core-react/src/Typography/Typography.types.ts#L15"
|
|
34
34
|
},
|
|
35
35
|
{
|
|
36
36
|
"name": "className",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"description": "Additional classNames",
|
|
41
41
|
"descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Additional classNames</p>\n</div></div>",
|
|
42
42
|
"sourceFile": "packages/core-react/src/_utils/types.ts",
|
|
43
|
-
"sourceUrl": "https://github.com/procore/core/blob/
|
|
43
|
+
"sourceUrl": "https://github.com/procore/core/blob/5402ee2/packages/core-react/src/_utils/types.ts#L47"
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
46
|
"name": "color",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"description": "Changes font color, can be any of the `colors` object HSL Palette",
|
|
51
51
|
"descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Changes font color, can be any of the <code>colors</code> object HSL Palette</p>\n</div><dl class=\"tsd-comment-tags\"><dt>default</dt><dd><p>'gray15'</p>\n</dd><dt>since</dt><dd><p>10.19.0</p>\n</dd></dl></div>",
|
|
52
52
|
"sourceFile": "packages/core-react/src/Typography/Typography.types.ts",
|
|
53
|
-
"sourceUrl": "https://github.com/procore/core/blob/
|
|
53
|
+
"sourceUrl": "https://github.com/procore/core/blob/5402ee2/packages/core-react/src/Typography/Typography.types.ts#L33"
|
|
54
54
|
},
|
|
55
55
|
{
|
|
56
56
|
"name": "intent",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"description": "Changes the size of the font",
|
|
61
61
|
"descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Changes the size of the font</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>10.19.0</p>\n</dd></dl></div>",
|
|
62
62
|
"sourceFile": "packages/core-react/src/Typography/Typography.types.ts",
|
|
63
|
-
"sourceUrl": "https://github.com/procore/core/blob/
|
|
63
|
+
"sourceUrl": "https://github.com/procore/core/blob/5402ee2/packages/core-react/src/Typography/Typography.types.ts#L39"
|
|
64
64
|
},
|
|
65
65
|
{
|
|
66
66
|
"name": "italic",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"description": "Applies `font-style: italic` if enabled",
|
|
71
71
|
"descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Applies <code>font-style: italic</code> if enabled</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>10.19.0</p>\n</dd></dl></div>",
|
|
72
72
|
"sourceFile": "packages/core-react/src/Typography/Typography.types.ts",
|
|
73
|
-
"sourceUrl": "https://github.com/procore/core/blob/
|
|
73
|
+
"sourceUrl": "https://github.com/procore/core/blob/5402ee2/packages/core-react/src/Typography/Typography.types.ts#L45"
|
|
74
74
|
},
|
|
75
75
|
{
|
|
76
76
|
"name": "style",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"description": "Additional CSS styles",
|
|
81
81
|
"descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Additional CSS styles</p>\n</div></div>",
|
|
82
82
|
"sourceFile": "packages/core-react/src/_utils/types.ts",
|
|
83
|
-
"sourceUrl": "https://github.com/procore/core/blob/
|
|
83
|
+
"sourceUrl": "https://github.com/procore/core/blob/5402ee2/packages/core-react/src/_utils/types.ts#L52"
|
|
84
84
|
},
|
|
85
85
|
{
|
|
86
86
|
"name": "weight",
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"description": "Changes font weight if it is supported in the design system",
|
|
91
91
|
"descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Changes font weight if it is supported in the design system</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>10.19.0</p>\n</dd></dl></div>",
|
|
92
92
|
"sourceFile": "packages/core-react/src/Typography/Typography.types.ts",
|
|
93
|
-
"sourceUrl": "https://github.com/procore/core/blob/
|
|
93
|
+
"sourceUrl": "https://github.com/procore/core/blob/5402ee2/packages/core-react/src/Typography/Typography.types.ts#L51"
|
|
94
94
|
}
|
|
95
95
|
],
|
|
96
96
|
"description": ""
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"description": "",
|
|
11
11
|
"descriptionHtml": "",
|
|
12
12
|
"sourceFile": "packages/core-react/src/_utils/types.ts",
|
|
13
|
-
"sourceUrl": "https://github.com/procore/core/blob/
|
|
13
|
+
"sourceUrl": "https://github.com/procore/core/blob/5402ee2/packages/core-react/src/_utils/types.ts#L42"
|
|
14
14
|
},
|
|
15
15
|
{
|
|
16
16
|
"name": "className",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"description": "Additional classNames",
|
|
21
21
|
"descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Additional classNames</p>\n</div></div>",
|
|
22
22
|
"sourceFile": "packages/core-react/src/_utils/types.ts",
|
|
23
|
-
"sourceUrl": "https://github.com/procore/core/blob/
|
|
23
|
+
"sourceUrl": "https://github.com/procore/core/blob/5402ee2/packages/core-react/src/_utils/types.ts#L47"
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
"name": "style",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"description": "Additional CSS styles",
|
|
31
31
|
"descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Additional CSS styles</p>\n</div></div>",
|
|
32
32
|
"sourceFile": "packages/core-react/src/_utils/types.ts",
|
|
33
|
-
"sourceUrl": "https://github.com/procore/core/blob/
|
|
33
|
+
"sourceUrl": "https://github.com/procore/core/blob/5402ee2/packages/core-react/src/_utils/types.ts#L52"
|
|
34
34
|
}
|
|
35
35
|
],
|
|
36
36
|
"description": ""
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"interface":"BaseAvatarProps","property":"clickable","deprecatedSince":"TBD","message":"Reviewing for removal from system, prefer accessible `role=\"link\"` or `role=\"button\"` for interactive UI.","deprecationKind":"prop"},{"interface":"BaseAvatarProps","property":"size","deprecatedSince":"10.20.0","message":"\n\nSize \"xl\" and \"sm\" have been deprecated and will be removed in a future version.\nPlease use \"lg\" instead of \"xl\".\n\n**Before**\n\n`<Avatar size=\"xl\" />`\n\n**After**\n\n`<Avatar size=\"lg\" />`\n","deprecationKind":"prop"},{"interface":"AvatarStackProps","property":"size","deprecatedSince":"12.18.0\n","message":"Size \"sm\" has been deprecated and will be removed in a future version.","deprecationKind":"prop"},{"interface":"BreadcrumbCrumbProps","property":"variant","deprecatedSince":"","message":"Handled by parent prop. Use `Breadcrumb variant=\"list\"` with anchors INSIDE `Breadcumb.Crumb`.","deprecationKind":"prop"},{"interface":"Calendar.Container","property":"Calendar.Container","deprecatedSince":"11.6.0","message":"Subcomponents intended for internal library development. Export will be removed in a future release,\nplease use the parent as a self closing tag.\n\nAFTER `<Calendar onSelect />`\n","deprecationKind":"component"},{"interface":"Calendar.Day","property":"Calendar.Day","deprecatedSince":"11.6.0","message":"Subcomponents intended for internal library development. Export will be removed in a future release,\nplease use the parent as a self closing tag.\n\nAFTER `<Calendar onSelect />`\n","deprecationKind":"component"},{"interface":"Calendar.Navigation","property":"Calendar.Navigation","deprecatedSince":"11.6.0","message":"Subcomponents intended for internal library development. Export will be removed in a future release,\nplease use the parent as a self closing tag.\n\nAFTER `<Calendar onSelect />`\n","deprecationKind":"component"},{"interface":"Calendar.Next","property":"Calendar.Next","deprecatedSince":"11.6.0","message":"Subcomponents intended for internal library development. Export will be removed in a future release,\nplease use the parent as a self closing tag.\n\nAFTER `<Calendar onSelect />`\n","deprecationKind":"component"},{"interface":"Calendar.Prev","property":"Calendar.Prev","deprecatedSince":"11.6.0","message":"Subcomponents intended for internal library development. Export will be removed in a future release,\nplease use the parent as a self closing tag.\n\nAFTER `<Calendar onSelect />`\n","deprecationKind":"component"},{"interface":"Calendar.Select","property":"Calendar.Select","deprecatedSince":"11.6.0","message":"Subcomponents intended for internal library development. Export will be removed in a future release,\nplease use the parent as a self closing tag.\n\nAFTER `<Calendar onSelect />`\n","deprecationKind":"component"},{"interface":"Calendar.Week","property":"Calendar.Week","deprecatedSince":"11.6.0","message":"Subcomponents intended for internal library development. Export will be removed in a future release,\nplease use the parent as a self closing tag.\n\nAFTER `<Calendar onSelect />`\n","deprecationKind":"component"},{"interface":"Calendar.Weekdays","property":"Calendar.Weekdays","deprecatedSince":"11.6.0","message":"Subcomponents intended for internal library development. Export will be removed in a future release,\nplease use the parent as a self closing tag.\n\nAFTER `<Calendar onSelect />`\n","deprecationKind":"component"},{"interface":"CalendarProps","property":"children","deprecatedSince":"11.6.0","message":"Subcomponents intended for internal library development. Export will be removed in a future release.\n\nAFTER\n```\n<Calendar onSelect />\n```\n","deprecationKind":"prop"},{"interface":"CardProps","property":"level","deprecatedSince":"10.20.0","message":"\n\nThe `level` prop has been deprecated and will be removed in a future version.\nPlease use the `shadowStrength` prop instead.\n\n**Before**\n\n<Card level={20} />\n\n**After**\n\n<Card shadowStrength={2} />\n","deprecationKind":"prop"},{"interface":"FileSelect","property":"FileSelect","deprecatedSince":"11.23.3\n\n","message":"\nThis component has been removed from the system. The File Select base component is now managed in documents-js-monorepo.","deprecationKind":"component"},{"interface":"GridSourceProps","property":"icon","deprecatedSince":"","message":"String icon variant is deprecated, use the React components\ndirectly from the `@procore/core-icons/dist` package","deprecationKind":"prop"},{"interface":"FileTreeProps","property":"icon","deprecatedSince":"","message":"String icon variant is deprecated, use the React components\ndirectly from the `@procore/core-icons/dist` package","deprecationKind":"prop"},{"interface":"FieldRichTextComponentProps","property":"initialValue","deprecatedSince":"10.20.0","message":"\n`initialValue` has been deprecated and will be removed in a future version.\nPlease use the `value` prop instead\n\nThe first value passed into `value` prop will be the `TextEditor` initial\nvalue. Changing the value will update the text of the `TextEditor`.\nThe editor should be controlled via the combination of `value`\nand `onChange` props.\n\n**Before**\n\n`<TextEditor initialValue=\"Hello World\" />`\n\n**After**\n\n`<TextEditor value=\"Hello World\" />`\n","deprecationKind":"prop"},{"interface":"FieldTextAreaComponentProps","property":"variant","deprecatedSince":"10.20.0","message":"\nThe `variant` prop has been deprecated and will be removed in a future version.\nPlease use the `error` boolean prop instead.\n\n**Before**\n\n`<TextArea variant=\"error\" />`\n\n**After**\n\n`<TextArea error />`\n","deprecationKind":"prop"},{"interface":"FieldTextComponentProps","property":"variant","deprecatedSince":"11","message":"Use the `error` prop instead","deprecationKind":"prop"},{"interface":"FormContextAPI","property":"variant","deprecatedSince":"12.18.0\n","message":"The `traditional` field layout variant is deprecated and `variant` property will be removed\n in a future version. Use the default field layout (`wxp`) instead.\n\n Note that in the default field layout, you need to explicitly specify the `colStart` property:\n\n BEFORE\n\n ```\n <Form.Row>\n <Form.Text />\n <Form.Number />\n </Form.Row>\n ```\n\n AFTER\n\n ```\n <Form.Row>\n <Form.Text colStart={1} />\n <Form.Number colStart={7} />\n </Form.Row>\n ```\n\n We plan to remove this limitation in a future release.\n","deprecationKind":"prop"},{"interface":"FormProps","property":"variant","deprecatedSince":"12.18.0\n","message":"The `traditional` field layout variant is deprecated and `variant` property will be removed\n in a future version. Use the default field layout (`wxp`) instead.","deprecationKind":"prop"},{"interface":"FormRichTextProps","property":"initialValue","deprecatedSince":"10.20.0","message":"\n`initialValue` has been deprecated and will be removed in a future version.\nPlease use the `value` prop instead\n\nThe first value passed into `value` prop will be the `TextEditor` initial\nvalue. Changing the value will update the text of the `TextEditor`.\nThe editor should be controlled via the combination of `value`\nand `onChange` props.\n\n**Before**\n\n`<TextEditor initialValue=\"Hello World\" />`\n\n**After**\n\n`<TextEditor value=\"Hello World\" />`\n","deprecationKind":"prop"},{"interface":"FormTextAreaProps","property":"variant","deprecatedSince":"10.20.0","message":"\nThe `variant` prop has been deprecated and will be removed in a future version.\nPlease use the `error` boolean prop instead.\n\n**Before**\n\n`<TextArea variant=\"error\" />`\n\n**After**\n\n`<TextArea error />`\n","deprecationKind":"prop"},{"interface":"FormTextProps","property":"variant","deprecatedSince":"11","message":"Use the `error` prop instead","deprecationKind":"prop"},{"interface":"InputProps","property":"variant","deprecatedSince":"11","message":"Use the `error` prop instead","deprecationKind":"prop"},{"interface":"LinkProps","property":"variant","deprecatedSince":"12.18.0\n","message":"variant `gray` is deprecated and will be removed","deprecationKind":"prop"},{"interface":"ListPage","property":"ListPage","deprecatedSince":"12.9.0\n","message":"This `ListPage` layout is no longer supported and it is now recommended to use a `ToolLandingPage` layout instead.\n","deprecationKind":"component"},{"interface":"ListPageControlProps","property":"variant","deprecatedSince":"11","message":"please use the equivalent boolean prop instead","deprecationKind":"prop"},{"interface":"MenuProps","property":"UNSAFE_closesOnSelect","deprecatedSince":"9","message":"Never offically documented/supported","deprecationKind":"prop"},{"interface":"MenuProps","property":"isSelectable","deprecatedSince":"10.20.0","message":"\n\nThe `isSelectable` prop has been deprecated and will be removed in a future version.\nMenu item selection is now handled internally and there is no need to configure this\nanymore.\n","deprecationKind":"prop"},{"interface":"MenuProps","property":"usingHook","deprecatedSince":"9","message":"Never offically documented/supported. Please migrate to the other props like `onSelect` and `onSearch` on the `Menu` component. In v11, the **internal only** `useMenu` removed its search state. You should not be using `useMenu` nor this `usingHook` prop.","deprecationKind":"prop"},{"interface":"ConfirmModalProps","property":"compact","deprecatedSince":"","message":"@experimental Changes the UI of modal to work on mobile breakpoints, to be used on Helix Header ONLY","deprecationKind":"prop"},{"interface":"ModalBodyProps","property":"compact","deprecatedSince":"","message":"@experimental Changes the UI of modal to work on mobile breakpoints, to be used on Helix Header ONLY","deprecationKind":"prop"},{"interface":"ModalCloseableHeaderProps","property":"compact","deprecatedSince":"","message":"@experimental Changes the UI of modal to work on mobile breakpoints, to be used on Helix Header ONLY","deprecationKind":"prop"},{"interface":"ModalContainerProps","property":"compact","deprecatedSince":"","message":"@experimental Changes the UI of modal to work on mobile breakpoints, to be used on Helix Header ONLY","deprecationKind":"prop"},{"interface":"ModalProps","property":"compact","deprecatedSince":"","message":"@experimental Changes the UI of modal to work on mobile breakpoints, to be used on Helix Header ONLY","deprecationKind":"prop"},{"interface":"Notation","property":"Notation","deprecatedSince":"11\n","message":"Please use `<Typography italic />` component for plain text\nnotations or the `<Required />` component for required notations. `Notation`\nwill be removed in a future version.","deprecationKind":"component"},{"interface":"Page.Column","property":"Page.Column","deprecatedSince":"12\n","message":"A wrapper around Grid, please use Grid instead. Page already sets\na default gutterX in context for children grid components.\n\nBEFORE `Page.Column` AFTER `Grid.Col`","deprecationKind":"component"},{"interface":"Page.Row","property":"Page.Row","deprecatedSince":"12\n","message":"A wrapper around Grid, please use Grid instead. Page already sets\na default gutterX in context for children grid components.\n\nBEFORE `Page.Row` AFTER `Grid.Row`","deprecationKind":"component"},{"interface":"PopoverContentProps","property":"fluid","deprecatedSince":"12.18.0","message":"Use `block` as a drop-in replacement\n","deprecationKind":"prop"},{"interface":"SearchProps","property":"disabled","deprecatedSince":"12.18.0","message":"\n","deprecationKind":"prop"},{"interface":"SearchProps","property":"error","deprecatedSince":"12.18.0","message":"\n","deprecationKind":"prop"},{"interface":"SearchProps","property":"variant","deprecatedSince":"11","message":"Use the `error` prop instead","deprecationKind":"prop"},{"interface":"SegmentedControllerProps","property":"active","deprecatedSince":"12.18.0\n","message":"The property is not used anywhere","deprecationKind":"prop"},{"interface":"SegmentedControllerProps","property":"variant","deprecatedSince":"11","message":"Please use the `block` prop","deprecationKind":"prop"},{"interface":"SegmentedControllerSegmentProps","property":"active","deprecatedSince":"12.18.0\n","message":"Use `selected` instead","deprecationKind":"prop"},{"interface":"segmentedControllerSegmentVariant","property":"segmentedControllerSegmentVariant","deprecatedSince":"11\n","message":"Please use the `active` and `disabled` props","deprecationKind":"component"},{"interface":"SpinnerProps","property":"color","deprecatedSince":"12.18.0\n","message":"Use `variant` instead","deprecationKind":"prop"},{"interface":"BodyCellProps","property":"variant","deprecatedSince":"11.15.1\n","message":"Please use `sortOrder` prop instead of `esc/desc` variants, and `snugfit` prop instead of `snugfit` variant","deprecationKind":"prop"},{"interface":"CurrencyCellProps","property":"children","deprecatedSince":"11.28.0\n","message":"Please use `value` prop instead","deprecationKind":"prop"},{"interface":"HeaderCellProps","property":"sortable","deprecatedSince":"11.15.1\n","message":"Please use `sortOrder` prop instead","deprecationKind":"prop"},{"interface":"HeaderCellProps","property":"variant","deprecatedSince":"11.15.1\n","message":"Please use `sortOrder` prop instead of `esc/desc` variants, and `snugfit` prop instead of `snugfit` variant","deprecationKind":"prop"},{"interface":"InputCellProps","property":"variant","deprecatedSince":"11","message":"Use the `error` prop instead","deprecationKind":"prop"},{"interface":"BaseTabProps","property":"UNSAFE_helixHeader","deprecatedSince":"","message":"@experimental Alternative style variant. To be used on Helix Header ONLY","deprecationKind":"prop"},{"interface":"BaseTabProps","property":"active","deprecatedSince":"12.18.0\n","message":"Please use `selected` instead","deprecationKind":"prop"},{"interface":"BaseTabProps","property":"dark","deprecatedSince":"12.8.0\n","message":"Custom styles intended for the global navigation header.\nFuture Core-React will look holistically at themes and dark mode support.\n\nAFTER - Regular Tab styles. If needing dark support, please reach out.","deprecationKind":"prop"},{"interface":"BaseTabProps","property":"dropdown","deprecatedSince":"11","message":"This was never intended to be a public facing API and does not\ndo anything. It will be removed in the future.","deprecationKind":"prop"},{"interface":"BaseTabProps","property":"overflowing","deprecatedSince":"11","message":"This was never intended to be a public facing API and does not\ndo anything. It will be removed in the future.","deprecationKind":"prop"},{"interface":"BaseTabProps","property":"variant","deprecatedSince":"11","message":"please use the `selected` props to configure style. The\n`dropdown`, `hover`, and `overflowing` variants were only for internal use\nand should not be used in clients","deprecationKind":"prop"},{"interface":"TabsProps","property":"UNSAFE_helixHeader","deprecatedSince":"","message":"@experimental Alternative style variant. To be used on Helix Header ONLY","deprecationKind":"prop"},{"interface":"TabsProps","property":"dark","deprecatedSince":"12.8.0\n","message":"Custom styles intended for the global navigation header.\nFuture Core-React will look holistically at themes and dark mode support.\n\nAFTER - Regular Tab styles. If needing dark support, please reach out.","deprecationKind":"prop"},{"interface":"TearsheetProps","property":"placement","deprecatedSince":"12.18.0\n","message":"There will be only `right` placement, so the property will be removed","deprecationKind":"prop"},{"interface":"TearsheetProps","property":"stretch","deprecatedSince":"12.18.0\n","message":"Use `block` as a drop-in replacement","deprecationKind":"prop"},{"interface":"TextAreaProps","property":"variant","deprecatedSince":"10.20.0","message":"\nThe `variant` prop has been deprecated and will be removed in a future version.\nPlease use the `error` boolean prop instead.\n\n**Before**\n\n`<TextArea variant=\"error\" />`\n\n**After**\n\n`<TextArea error />`\n","deprecationKind":"prop"},{"interface":"TextEditorProps","property":"initialValue","deprecatedSince":"10.20.0","message":"\n`initialValue` has been deprecated and will be removed in a future version.\nPlease use the `value` prop instead\n\nThe first value passed into `value` prop will be the `TextEditor` initial\nvalue. Changing the value will update the text of the `TextEditor`.\nThe editor should be controlled via the combination of `value`\nand `onChange` props.\n\n**Before**\n\n`<TextEditor initialValue=\"Hello World\" />`\n\n**After**\n\n`<TextEditor value=\"Hello World\" />`\n","deprecationKind":"prop"},{"interface":"TokenProps","property":"variant","deprecatedSince":"10.27.0\n","message":"\n\nAll variants have been deprecated and will be removed in a future version.\nPlease use `Token.Remove` component or `disabled` boolean prop instead.\n\n**Before**\n\n`<Token variant='icon'>\n <Token.Icon icon=\"x\" />\n</Token>`\n\n**After**\n\n`<Token>\n <Token.Remove />\n</Token>`\n","deprecationKind":"prop"},{"interface":"ToolHeader","property":"ToolHeader","deprecatedSince":"12.9.0\n","message":"This `ToolHeader` component is no longer supported and it is now recommended\nto use the layout `ToolLandingPage`, `ToolLandingPage.Title` (for the settings button),\n`ToolLandingPage.Tabs`, or based on content a `DetailPage`.\n","deprecationKind":"component"}]
|
|
1
|
+
[{"interface":"BaseAvatarProps","property":"clickable","deprecatedSince":"TBD","message":"Reviewing for removal from system, prefer accessible `role=\"link\"` or `role=\"button\"` for interactive UI.","deprecationKind":"prop"},{"interface":"BaseAvatarProps","property":"size","deprecatedSince":"10.20.0","message":"\n\nSize \"xl\" and \"sm\" have been deprecated and will be removed in a future version.\nPlease use \"lg\" instead of \"xl\".\n\n**Before**\n\n`<Avatar size=\"xl\" />`\n\n**After**\n\n`<Avatar size=\"lg\" />`\n","deprecationKind":"prop"},{"interface":"AvatarStackProps","property":"size","deprecatedSince":"12.18.0\n","message":"Size \"sm\" has been deprecated and will be removed in a future version.","deprecationKind":"prop"},{"interface":"BreadcrumbCrumbProps","property":"variant","deprecatedSince":"","message":"Handled by parent prop. Use `Breadcrumb variant=\"list\"` with anchors INSIDE `Breadcumb.Crumb`.","deprecationKind":"prop"},{"interface":"ButtonProps","property":"iconRight","deprecatedSince":"12.18.0","message":"iconRight has been deprecated and will be removed in a future version\n","deprecationKind":"prop"},{"interface":"ButtonProps","property":"variant","deprecatedSince":"12.18.0","message":"variant \"tertiaryContrast\" has been deprecated and will be removed in a future version\n","deprecationKind":"prop"},{"interface":"LinkButtonProps","property":"iconRight","deprecatedSince":"12.18.0","message":"iconRight has been deprecated and will be removed in a future version\n","deprecationKind":"prop"},{"interface":"LinkButtonProps","property":"variant","deprecatedSince":"12.18.0","message":"variant \"tertiaryContrast\" has been deprecated and will be removed in a future version\n","deprecationKind":"prop"},{"interface":"Calendar.Container","property":"Calendar.Container","deprecatedSince":"11.6.0","message":"Subcomponents intended for internal library development. Export will be removed in a future release,\nplease use the parent as a self closing tag.\n\nAFTER `<Calendar onSelect />`\n","deprecationKind":"component"},{"interface":"Calendar.Day","property":"Calendar.Day","deprecatedSince":"11.6.0","message":"Subcomponents intended for internal library development. Export will be removed in a future release,\nplease use the parent as a self closing tag.\n\nAFTER `<Calendar onSelect />`\n","deprecationKind":"component"},{"interface":"Calendar.Navigation","property":"Calendar.Navigation","deprecatedSince":"11.6.0","message":"Subcomponents intended for internal library development. Export will be removed in a future release,\nplease use the parent as a self closing tag.\n\nAFTER `<Calendar onSelect />`\n","deprecationKind":"component"},{"interface":"Calendar.Next","property":"Calendar.Next","deprecatedSince":"11.6.0","message":"Subcomponents intended for internal library development. Export will be removed in a future release,\nplease use the parent as a self closing tag.\n\nAFTER `<Calendar onSelect />`\n","deprecationKind":"component"},{"interface":"Calendar.Prev","property":"Calendar.Prev","deprecatedSince":"11.6.0","message":"Subcomponents intended for internal library development. Export will be removed in a future release,\nplease use the parent as a self closing tag.\n\nAFTER `<Calendar onSelect />`\n","deprecationKind":"component"},{"interface":"Calendar.Select","property":"Calendar.Select","deprecatedSince":"11.6.0","message":"Subcomponents intended for internal library development. Export will be removed in a future release,\nplease use the parent as a self closing tag.\n\nAFTER `<Calendar onSelect />`\n","deprecationKind":"component"},{"interface":"Calendar.Week","property":"Calendar.Week","deprecatedSince":"11.6.0","message":"Subcomponents intended for internal library development. Export will be removed in a future release,\nplease use the parent as a self closing tag.\n\nAFTER `<Calendar onSelect />`\n","deprecationKind":"component"},{"interface":"Calendar.Weekdays","property":"Calendar.Weekdays","deprecatedSince":"11.6.0","message":"Subcomponents intended for internal library development. Export will be removed in a future release,\nplease use the parent as a self closing tag.\n\nAFTER `<Calendar onSelect />`\n","deprecationKind":"component"},{"interface":"CalendarProps","property":"children","deprecatedSince":"11.6.0","message":"Subcomponents intended for internal library development. Export will be removed in a future release.\n\nAFTER\n```\n<Calendar onSelect />\n```\n","deprecationKind":"prop"},{"interface":"CardProps","property":"level","deprecatedSince":"10.20.0","message":"\n\nThe `level` prop has been deprecated and will be removed in a future version.\nPlease use the `shadowStrength` prop instead.\n\n**Before**\n\n<Card level={20} />\n\n**After**\n\n<Card shadowStrength={2} />\n","deprecationKind":"prop"},{"interface":"DropdownButtonProps","property":"iconRight","deprecatedSince":"12.18.0","message":"iconRight has been deprecated and will be removed in a future version\n","deprecationKind":"prop"},{"interface":"DropdownButtonProps","property":"variant","deprecatedSince":"12.18.0","message":"variant \"tertiaryContrast\" has been deprecated and will be removed in a future version\n","deprecationKind":"prop"},{"interface":"FileSelect","property":"FileSelect","deprecatedSince":"11.23.3\n\n","message":"\nThis component has been removed from the system. The File Select base component is now managed in documents-js-monorepo.","deprecationKind":"component"},{"interface":"GridSourceProps","property":"icon","deprecatedSince":"","message":"String icon variant is deprecated, use the React components\ndirectly from the `@procore/core-icons/dist` package","deprecationKind":"prop"},{"interface":"FileTreeProps","property":"icon","deprecatedSince":"","message":"String icon variant is deprecated, use the React components\ndirectly from the `@procore/core-icons/dist` package","deprecationKind":"prop"},{"interface":"FieldRichTextComponentProps","property":"initialValue","deprecatedSince":"10.20.0","message":"\n`initialValue` has been deprecated and will be removed in a future version.\nPlease use the `value` prop instead\n\nThe first value passed into `value` prop will be the `TextEditor` initial\nvalue. Changing the value will update the text of the `TextEditor`.\nThe editor should be controlled via the combination of `value`\nand `onChange` props.\n\n**Before**\n\n`<TextEditor initialValue=\"Hello World\" />`\n\n**After**\n\n`<TextEditor value=\"Hello World\" />`\n","deprecationKind":"prop"},{"interface":"FieldTextAreaComponentProps","property":"variant","deprecatedSince":"10.20.0","message":"\nThe `variant` prop has been deprecated and will be removed in a future version.\nPlease use the `error` boolean prop instead.\n\n**Before**\n\n`<TextArea variant=\"error\" />`\n\n**After**\n\n`<TextArea error />`\n","deprecationKind":"prop"},{"interface":"FieldTextComponentProps","property":"variant","deprecatedSince":"11","message":"Use the `error` prop instead","deprecationKind":"prop"},{"interface":"FormContextAPI","property":"variant","deprecatedSince":"12.18.0\n","message":"The `traditional` field layout variant is deprecated and `variant` property will be removed\n in a future version. Use the default field layout (`wxp`) instead.\n\n Note that in the default field layout, you need to explicitly specify the `colStart` property:\n\n BEFORE\n\n ```\n <Form.Row>\n <Form.Text />\n <Form.Number />\n </Form.Row>\n ```\n\n AFTER\n\n ```\n <Form.Row>\n <Form.Text colStart={1} />\n <Form.Number colStart={7} />\n </Form.Row>\n ```\n\n We plan to remove this limitation in a future release.\n","deprecationKind":"prop"},{"interface":"FormProps","property":"variant","deprecatedSince":"12.18.0\n","message":"The `traditional` field layout variant is deprecated and `variant` property will be removed\n in a future version. Use the default field layout (`wxp`) instead.","deprecationKind":"prop"},{"interface":"FormRichTextProps","property":"initialValue","deprecatedSince":"10.20.0","message":"\n`initialValue` has been deprecated and will be removed in a future version.\nPlease use the `value` prop instead\n\nThe first value passed into `value` prop will be the `TextEditor` initial\nvalue. Changing the value will update the text of the `TextEditor`.\nThe editor should be controlled via the combination of `value`\nand `onChange` props.\n\n**Before**\n\n`<TextEditor initialValue=\"Hello World\" />`\n\n**After**\n\n`<TextEditor value=\"Hello World\" />`\n","deprecationKind":"prop"},{"interface":"FormTextAreaProps","property":"variant","deprecatedSince":"10.20.0","message":"\nThe `variant` prop has been deprecated and will be removed in a future version.\nPlease use the `error` boolean prop instead.\n\n**Before**\n\n`<TextArea variant=\"error\" />`\n\n**After**\n\n`<TextArea error />`\n","deprecationKind":"prop"},{"interface":"FormTextProps","property":"variant","deprecatedSince":"11","message":"Use the `error` prop instead","deprecationKind":"prop"},{"interface":"InputProps","property":"variant","deprecatedSince":"11","message":"Use the `error` prop instead","deprecationKind":"prop"},{"interface":"LinkProps","property":"variant","deprecatedSince":"12.18.0\n","message":"variant `gray` is deprecated and will be removed","deprecationKind":"prop"},{"interface":"ListPage","property":"ListPage","deprecatedSince":"12.9.0\n","message":"This `ListPage` layout is no longer supported and it is now recommended to use a `ToolLandingPage` layout instead.\n","deprecationKind":"component"},{"interface":"ListPageControlProps","property":"variant","deprecatedSince":"11","message":"please use the equivalent boolean prop instead","deprecationKind":"prop"},{"interface":"MenuProps","property":"UNSAFE_closesOnSelect","deprecatedSince":"9","message":"Never offically documented/supported","deprecationKind":"prop"},{"interface":"MenuProps","property":"isSelectable","deprecatedSince":"10.20.0","message":"\n\nThe `isSelectable` prop has been deprecated and will be removed in a future version.\nMenu item selection is now handled internally and there is no need to configure this\nanymore.\n","deprecationKind":"prop"},{"interface":"MenuProps","property":"usingHook","deprecatedSince":"9","message":"Never offically documented/supported. Please migrate to the other props like `onSelect` and `onSearch` on the `Menu` component. In v11, the **internal only** `useMenu` removed its search state. You should not be using `useMenu` nor this `usingHook` prop.","deprecationKind":"prop"},{"interface":"ConfirmModalProps","property":"compact","deprecatedSince":"","message":"@experimental Changes the UI of modal to work on mobile breakpoints, to be used on Helix Header ONLY","deprecationKind":"prop"},{"interface":"ModalBodyProps","property":"compact","deprecatedSince":"","message":"@experimental Changes the UI of modal to work on mobile breakpoints, to be used on Helix Header ONLY","deprecationKind":"prop"},{"interface":"ModalCloseableHeaderProps","property":"compact","deprecatedSince":"","message":"@experimental Changes the UI of modal to work on mobile breakpoints, to be used on Helix Header ONLY","deprecationKind":"prop"},{"interface":"ModalContainerProps","property":"compact","deprecatedSince":"","message":"@experimental Changes the UI of modal to work on mobile breakpoints, to be used on Helix Header ONLY","deprecationKind":"prop"},{"interface":"ModalProps","property":"compact","deprecatedSince":"","message":"@experimental Changes the UI of modal to work on mobile breakpoints, to be used on Helix Header ONLY","deprecationKind":"prop"},{"interface":"Notation","property":"Notation","deprecatedSince":"11\n","message":"Please use `<Typography italic />` component for plain text\nnotations or the `<Required />` component for required notations. `Notation`\nwill be removed in a future version.","deprecationKind":"component"},{"interface":"Page.Column","property":"Page.Column","deprecatedSince":"12\n","message":"A wrapper around Grid, please use Grid instead. Page already sets\na default gutterX in context for children grid components.\n\nBEFORE `Page.Column` AFTER `Grid.Col`","deprecationKind":"component"},{"interface":"Page.Row","property":"Page.Row","deprecatedSince":"12\n","message":"A wrapper around Grid, please use Grid instead. Page already sets\na default gutterX in context for children grid components.\n\nBEFORE `Page.Row` AFTER `Grid.Row`","deprecationKind":"component"},{"interface":"PanelHeaderActionProps","property":"iconRight","deprecatedSince":"12.18.0","message":"iconRight has been deprecated and will be removed in a future version\n","deprecationKind":"prop"},{"interface":"PanelHeaderActionProps","property":"variant","deprecatedSince":"12.18.0","message":"variant \"tertiaryContrast\" has been deprecated and will be removed in a future version\n","deprecationKind":"prop"},{"interface":"PopoverContentProps","property":"fluid","deprecatedSince":"12.18.0","message":"Use `block` as a drop-in replacement\n","deprecationKind":"prop"},{"interface":"SearchProps","property":"disabled","deprecatedSince":"12.18.0","message":"\n","deprecationKind":"prop"},{"interface":"SearchProps","property":"error","deprecatedSince":"12.18.0","message":"\n","deprecationKind":"prop"},{"interface":"SearchProps","property":"variant","deprecatedSince":"11","message":"Use the `error` prop instead","deprecationKind":"prop"},{"interface":"SegmentedControllerProps","property":"active","deprecatedSince":"12.18.0\n","message":"The property is not used anywhere","deprecationKind":"prop"},{"interface":"SegmentedControllerProps","property":"variant","deprecatedSince":"11","message":"Please use the `block` prop","deprecationKind":"prop"},{"interface":"SegmentedControllerSegmentProps","property":"active","deprecatedSince":"12.18.0\n","message":"Use `selected` instead","deprecationKind":"prop"},{"interface":"segmentedControllerSegmentVariant","property":"segmentedControllerSegmentVariant","deprecatedSince":"11\n","message":"Please use the `active` and `disabled` props","deprecationKind":"component"},{"interface":"SpinnerProps","property":"color","deprecatedSince":"12.18.0\n","message":"Use `variant` instead","deprecationKind":"prop"},{"interface":"BodyCellProps","property":"variant","deprecatedSince":"11.15.1\n","message":"Please use `sortOrder` prop instead of `esc/desc` variants, and `snugfit` prop instead of `snugfit` variant","deprecationKind":"prop"},{"interface":"CurrencyCellProps","property":"children","deprecatedSince":"11.28.0\n","message":"Please use `value` prop instead","deprecationKind":"prop"},{"interface":"HeaderCellProps","property":"sortable","deprecatedSince":"11.15.1\n","message":"Please use `sortOrder` prop instead","deprecationKind":"prop"},{"interface":"HeaderCellProps","property":"variant","deprecatedSince":"11.15.1\n","message":"Please use `sortOrder` prop instead of `esc/desc` variants, and `snugfit` prop instead of `snugfit` variant","deprecationKind":"prop"},{"interface":"InputCellProps","property":"variant","deprecatedSince":"11","message":"Use the `error` prop instead","deprecationKind":"prop"},{"interface":"BaseTabProps","property":"UNSAFE_helixHeader","deprecatedSince":"","message":"@experimental Alternative style variant. To be used on Helix Header ONLY","deprecationKind":"prop"},{"interface":"BaseTabProps","property":"active","deprecatedSince":"12.18.0\n","message":"Please use `selected` instead","deprecationKind":"prop"},{"interface":"BaseTabProps","property":"dark","deprecatedSince":"12.8.0\n","message":"Custom styles intended for the global navigation header.\nFuture Core-React will look holistically at themes and dark mode support.\n\nAFTER - Regular Tab styles. If needing dark support, please reach out.","deprecationKind":"prop"},{"interface":"BaseTabProps","property":"dropdown","deprecatedSince":"11","message":"This was never intended to be a public facing API and does not\ndo anything. It will be removed in the future.","deprecationKind":"prop"},{"interface":"BaseTabProps","property":"overflowing","deprecatedSince":"11","message":"This was never intended to be a public facing API and does not\ndo anything. It will be removed in the future.","deprecationKind":"prop"},{"interface":"BaseTabProps","property":"variant","deprecatedSince":"11","message":"please use the `selected` props to configure style. The\n`dropdown`, `hover`, and `overflowing` variants were only for internal use\nand should not be used in clients","deprecationKind":"prop"},{"interface":"TabsProps","property":"UNSAFE_helixHeader","deprecatedSince":"","message":"@experimental Alternative style variant. To be used on Helix Header ONLY","deprecationKind":"prop"},{"interface":"TabsProps","property":"dark","deprecatedSince":"12.8.0\n","message":"Custom styles intended for the global navigation header.\nFuture Core-React will look holistically at themes and dark mode support.\n\nAFTER - Regular Tab styles. If needing dark support, please reach out.","deprecationKind":"prop"},{"interface":"TearsheetProps","property":"placement","deprecatedSince":"12.18.0\n","message":"There will be only `right` placement, so the property will be removed","deprecationKind":"prop"},{"interface":"TearsheetProps","property":"stretch","deprecatedSince":"12.18.0\n","message":"Use `block` as a drop-in replacement","deprecationKind":"prop"},{"interface":"TextAreaProps","property":"variant","deprecatedSince":"10.20.0","message":"\nThe `variant` prop has been deprecated and will be removed in a future version.\nPlease use the `error` boolean prop instead.\n\n**Before**\n\n`<TextArea variant=\"error\" />`\n\n**After**\n\n`<TextArea error />`\n","deprecationKind":"prop"},{"interface":"TextEditorProps","property":"initialValue","deprecatedSince":"10.20.0","message":"\n`initialValue` has been deprecated and will be removed in a future version.\nPlease use the `value` prop instead\n\nThe first value passed into `value` prop will be the `TextEditor` initial\nvalue. Changing the value will update the text of the `TextEditor`.\nThe editor should be controlled via the combination of `value`\nand `onChange` props.\n\n**Before**\n\n`<TextEditor initialValue=\"Hello World\" />`\n\n**After**\n\n`<TextEditor value=\"Hello World\" />`\n","deprecationKind":"prop"},{"interface":"InternalTieredDropdownProps","property":"iconRight","deprecatedSince":"12.18.0","message":"iconRight has been deprecated and will be removed in a future version\n","deprecationKind":"prop"},{"interface":"TieredDropdownProps","property":"iconRight","deprecatedSince":"12.18.0","message":"iconRight has been deprecated and will be removed in a future version\n","deprecationKind":"prop"},{"interface":"TokenProps","property":"variant","deprecatedSince":"10.27.0\n","message":"\n\nAll variants have been deprecated and will be removed in a future version.\nPlease use `Token.Remove` component or `disabled` boolean prop instead.\n\n**Before**\n\n`<Token variant='icon'>\n <Token.Icon icon=\"x\" />\n</Token>`\n\n**After**\n\n`<Token>\n <Token.Remove />\n</Token>`\n","deprecationKind":"prop"},{"interface":"ToolHeader","property":"ToolHeader","deprecatedSince":"12.9.0\n","message":"This `ToolHeader` component is no longer supported and it is now recommended\nto use the layout `ToolLandingPage`, `ToolLandingPage.Title` (for the settings button),\n`ToolLandingPage.Tabs`, or based on content a `DetailPage`.\n","deprecationKind":"component"}]
|
package/dist/_utils/TinyMCE.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
function _typeof(
|
|
2
|
-
function _defineProperty(
|
|
3
|
-
function _toPropertyKey(
|
|
4
|
-
function _toPrimitive(
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
3
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
4
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
5
5
|
export var scriptId = 'tiny-mce-core-source';
|
|
6
6
|
export var tinyMCESource = 'https://s3.amazonaws.com/procore-core/tinymce';
|
|
7
7
|
export var tinyMCEVersion = '5.8.1';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TinyMCE.js","names":["scriptId","tinyMCESource","tinyMCEVersion","textEditorLocales","en","es","pseudo","defaultPlugins","plugins","tinyMCETabMarkup","tinyMCEConfig","autoresize_overflow_padding","autoresize_bottom_margin","browser_spellcheck","convert_url","content_css","concat","extended_valid_elements","min_height","invalid_elements","menubar","nonbreaking_force_tab","paste_preprocess","_","args","content","replace","paste_remove_styles_if_webkit","paste_retain_style_properties","paste_word_valid_elements","relative_urls","remove_script_host","statusbar","skin_url","toolbar","toolbar_mode","getValidLookupLocale","locale","usesBuiltInText","generateLanguageUrl","lookupLocale","generatePluginUrl","plugin","generateExternalPlugins","basePlugins","arguments","length","undefined","Array","from","Set","reduce","acc","includes","Object","assign","_defineProperty"],"sources":["../../src/_utils/TinyMCE.ts"],"sourcesContent":["import type { Editor } from '@tinymce/tinymce-react'\nimport type { Locale } from '../_hooks/I18n'\n\nexport const scriptId = 'tiny-mce-core-source'\nexport const tinyMCESource = 'https://s3.amazonaws.com/procore-core/tinymce'\nexport const tinyMCEVersion = '5.8.1'\n\ntype TextEditorLocales = { [key in Locale]: string }\n\n// TinyMCE Supported Languages: https://www.tiny.cloud/docs/configure/localization/#supportedlanguages\nconst textEditorLocales: TextEditorLocales = {\n en: 'en',\n 'en-CA': 'en',\n 'fr-CA': 'fr_FR',\n 'fr-FR': 'fr_FR',\n es: 'es',\n 'es-ES': 'es',\n 'en-AE': 'en',\n 'en-AU': 'en',\n 'en-GB': 'en',\n 'en-SG': 'en',\n 'th-TH': 'th_TH',\n 'ja-JP': 'ja',\n 'pt-BR': 'pt_BR',\n 'is-IS': 'en',\n 'de-DE': 'de',\n 'zh-SG': 'zh_CN',\n pseudo: 'en',\n 'pl-PL': 'pl',\n}\n\nexport const defaultPlugins = [\n 'autolink',\n 'autoresize',\n 'lists',\n 'nonbreaking',\n 'paste',\n 'advlist',\n]\n\nexport const plugins = [\n 'advlist',\n 'anchor',\n 'autolink',\n 'autoresize',\n 'autosave',\n 'bbcode',\n 'charmap',\n 'code',\n 'codesample',\n 'colorpicker',\n 'contextmenu',\n 'directionality',\n 'emoticons',\n 'fullpage',\n 'fullscreen',\n 'help',\n 'hr',\n 'image',\n 'imagetools',\n 'importcss',\n 'insertdatetime',\n 'legacyoutput',\n 'link',\n 'lists',\n 'media',\n 'nonbreaking',\n 'noneditable',\n 'pagebreak',\n 'paste',\n 'preview',\n 'print',\n 'save',\n 'searchreplace',\n 'spellchecker',\n 'tabfocus',\n 'table',\n 'template',\n 'textpattern',\n 'toc',\n 'visualblocks',\n 'visualchars',\n 'wordcount',\n]\n\n/**\n * Historically, `nonbreaking_force_tab` has been set to `true`\n * and this takes the `Tab` keypress as input to add to the content.\n * e.g indent the start of the text block like a paragraph.\n * This is different from the TinyMCE tool and command 'Indent', which\n * indents the entire block. e.g. indent this entire text block and the\n * wrapped lines.\n * This is the HTML it outputs when `nonbreaking_force_tab: true`\n */\nexport const tinyMCETabMarkup = `<span class=\\\"mce-nbsp-wrap\\\" contenteditable=\\\"false\\\"> </span>`\n\nexport const tinyMCEConfig: any & Editor = {\n autoresize_overflow_padding: 12,\n autoresize_bottom_margin: 0,\n browser_spellcheck: true,\n convert_url: false,\n content_css: `${tinyMCESource}/${tinyMCEVersion}/skins/content/default/content.min.css`,\n extended_valid_elements:\n 'table[class=mce-table|border:1px double #000|cellpadding: 3px|style=border-collapse: collapse; border-color: #000]',\n min_height: 96,\n invalid_elements: 'form,script',\n menubar: false,\n nonbreaking_force_tab: true,\n paste_preprocess: (_: any, args: any) => {\n args.content = args.content.replace(/<pre>/gi, '<p>')\n args.content = args.content.replace(/<\\/pre>/gi, '</p>')\n },\n paste_remove_styles_if_webkit: true,\n paste_retain_style_properties: 'font-size,text-decoration',\n paste_word_valid_elements:\n '@[style],pre,-strong/b,-em/i,-span,-p,-ol,-ul,-li,-table,-tr,-td[colspan|rowspan],-th,-thead,-tfoot,-tbody,-a[href|name],sub,sup,strike,br,u',\n relative_urls: false,\n remove_script_host: false,\n statusbar: false,\n skin_url: `${tinyMCESource}/${tinyMCEVersion}/skins/ui/oxide`,\n toolbar:\n 'bold italic underline strikethrough | alignleft aligncenter alignright | bullist numlist | outdent indent | cut paste pastetext | fontsizeselect | forecolor backcolor | link table image | undo redo',\n toolbar_mode: 'floating',\n}\n\nexport function getValidLookupLocale(locale: Locale): string {\n return textEditorLocales[locale] || textEditorLocales.en\n}\n\nfunction usesBuiltInText(locale: string) {\n return locale === textEditorLocales.en\n}\n\nexport function generateLanguageUrl(locale: Locale) {\n const lookupLocale = getValidLookupLocale(locale)\n return usesBuiltInText(lookupLocale)\n ? ''\n : `${tinyMCESource}/${tinyMCEVersion}/langs/${lookupLocale}.js`\n}\n\nfunction generatePluginUrl(plugin: string) {\n return `${tinyMCESource}/${tinyMCEVersion}/plugins/${plugin}/plugin.min.js`\n}\n\nexport function generateExternalPlugins(\n plugins: Array<string>,\n basePlugins = defaultPlugins\n) {\n return Array.from(new Set(plugins.concat(basePlugins))).reduce(\n (acc, plugin) => {\n return plugins.includes(plugin)\n ? Object.assign(acc, { [plugin]: generatePluginUrl(plugin) })\n : acc\n },\n {}\n )\n}\n"],"mappings":";;;;AAGA,OAAO,IAAMA,QAAQ,GAAG,sBAAsB;AAC9C,OAAO,IAAMC,aAAa,GAAG,+CAA+C;AAC5E,OAAO,IAAMC,cAAc,GAAG,OAAO;AAIrC;AACA,IAAMC,iBAAoC,GAAG;EAC3CC,EAAE,EAAE,IAAI;EACR,OAAO,EAAE,IAAI;EACb,OAAO,EAAE,OAAO;EAChB,OAAO,EAAE,OAAO;EAChBC,EAAE,EAAE,IAAI;EACR,OAAO,EAAE,IAAI;EACb,OAAO,EAAE,IAAI;EACb,OAAO,EAAE,IAAI;EACb,OAAO,EAAE,IAAI;EACb,OAAO,EAAE,IAAI;EACb,OAAO,EAAE,OAAO;EAChB,OAAO,EAAE,IAAI;EACb,OAAO,EAAE,OAAO;EAChB,OAAO,EAAE,IAAI;EACb,OAAO,EAAE,IAAI;EACb,OAAO,EAAE,OAAO;EAChBC,MAAM,EAAE,IAAI;EACZ,OAAO,EAAE;AACX,CAAC;AAED,OAAO,IAAMC,cAAc,GAAG,CAC5B,UAAU,EACV,YAAY,EACZ,OAAO,EACP,aAAa,EACb,OAAO,EACP,SAAS,CACV;AAED,OAAO,IAAMC,OAAO,GAAG,CACrB,SAAS,EACT,QAAQ,EACR,UAAU,EACV,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,SAAS,EACT,MAAM,EACN,YAAY,EACZ,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,WAAW,EACX,UAAU,EACV,YAAY,EACZ,MAAM,EACN,IAAI,EACJ,OAAO,EACP,YAAY,EACZ,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,MAAM,EACN,OAAO,EACP,OAAO,EACP,aAAa,EACb,aAAa,EACb,WAAW,EACX,OAAO,EACP,SAAS,EACT,OAAO,EACP,MAAM,EACN,eAAe,EACf,cAAc,EACd,UAAU,EACV,OAAO,EACP,UAAU,EACV,aAAa,EACb,KAAK,EACL,cAAc,EACd,aAAa,EACb,WAAW,CACZ;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,IAAMC,gBAAgB,sFAAsF;AAEnH,OAAO,IAAMC,aAA2B,GAAG;EACzCC,2BAA2B,EAAE,EAAE;EAC/BC,wBAAwB,EAAE,CAAC;EAC3BC,kBAAkB,EAAE,IAAI;EACxBC,WAAW,EAAE,KAAK;EAClBC,WAAW,KAAAC,MAAA,CAAKf,aAAa,OAAAe,MAAA,CAAId,cAAc,2CAAwC;EACvFe,uBAAuB,EACrB,oHAAoH;EACtHC,UAAU,EAAE,EAAE;EACdC,gBAAgB,EAAE,aAAa;EAC/BC,OAAO,EAAE,KAAK;EACdC,qBAAqB,EAAE,IAAI;EAC3BC,gBAAgB,EAAE,
|
|
1
|
+
{"version":3,"file":"TinyMCE.js","names":["scriptId","tinyMCESource","tinyMCEVersion","textEditorLocales","en","es","pseudo","defaultPlugins","plugins","tinyMCETabMarkup","tinyMCEConfig","autoresize_overflow_padding","autoresize_bottom_margin","browser_spellcheck","convert_url","content_css","concat","extended_valid_elements","min_height","invalid_elements","menubar","nonbreaking_force_tab","paste_preprocess","_","args","content","replace","paste_remove_styles_if_webkit","paste_retain_style_properties","paste_word_valid_elements","relative_urls","remove_script_host","statusbar","skin_url","toolbar","toolbar_mode","getValidLookupLocale","locale","usesBuiltInText","generateLanguageUrl","lookupLocale","generatePluginUrl","plugin","generateExternalPlugins","basePlugins","arguments","length","undefined","Array","from","Set","reduce","acc","includes","Object","assign","_defineProperty"],"sources":["../../src/_utils/TinyMCE.ts"],"sourcesContent":["import type { Editor } from '@tinymce/tinymce-react'\nimport type { Locale } from '../_hooks/I18n'\n\nexport const scriptId = 'tiny-mce-core-source'\nexport const tinyMCESource = 'https://s3.amazonaws.com/procore-core/tinymce'\nexport const tinyMCEVersion = '5.8.1'\n\ntype TextEditorLocales = { [key in Locale]: string }\n\n// TinyMCE Supported Languages: https://www.tiny.cloud/docs/configure/localization/#supportedlanguages\nconst textEditorLocales: TextEditorLocales = {\n en: 'en',\n 'en-CA': 'en',\n 'fr-CA': 'fr_FR',\n 'fr-FR': 'fr_FR',\n es: 'es',\n 'es-ES': 'es',\n 'en-AE': 'en',\n 'en-AU': 'en',\n 'en-GB': 'en',\n 'en-SG': 'en',\n 'th-TH': 'th_TH',\n 'ja-JP': 'ja',\n 'pt-BR': 'pt_BR',\n 'is-IS': 'en',\n 'de-DE': 'de',\n 'zh-SG': 'zh_CN',\n pseudo: 'en',\n 'pl-PL': 'pl',\n}\n\nexport const defaultPlugins = [\n 'autolink',\n 'autoresize',\n 'lists',\n 'nonbreaking',\n 'paste',\n 'advlist',\n]\n\nexport const plugins = [\n 'advlist',\n 'anchor',\n 'autolink',\n 'autoresize',\n 'autosave',\n 'bbcode',\n 'charmap',\n 'code',\n 'codesample',\n 'colorpicker',\n 'contextmenu',\n 'directionality',\n 'emoticons',\n 'fullpage',\n 'fullscreen',\n 'help',\n 'hr',\n 'image',\n 'imagetools',\n 'importcss',\n 'insertdatetime',\n 'legacyoutput',\n 'link',\n 'lists',\n 'media',\n 'nonbreaking',\n 'noneditable',\n 'pagebreak',\n 'paste',\n 'preview',\n 'print',\n 'save',\n 'searchreplace',\n 'spellchecker',\n 'tabfocus',\n 'table',\n 'template',\n 'textpattern',\n 'toc',\n 'visualblocks',\n 'visualchars',\n 'wordcount',\n]\n\n/**\n * Historically, `nonbreaking_force_tab` has been set to `true`\n * and this takes the `Tab` keypress as input to add to the content.\n * e.g indent the start of the text block like a paragraph.\n * This is different from the TinyMCE tool and command 'Indent', which\n * indents the entire block. e.g. indent this entire text block and the\n * wrapped lines.\n * This is the HTML it outputs when `nonbreaking_force_tab: true`\n */\nexport const tinyMCETabMarkup = `<span class=\\\"mce-nbsp-wrap\\\" contenteditable=\\\"false\\\"> </span>`\n\nexport const tinyMCEConfig: any & Editor = {\n autoresize_overflow_padding: 12,\n autoresize_bottom_margin: 0,\n browser_spellcheck: true,\n convert_url: false,\n content_css: `${tinyMCESource}/${tinyMCEVersion}/skins/content/default/content.min.css`,\n extended_valid_elements:\n 'table[class=mce-table|border:1px double #000|cellpadding: 3px|style=border-collapse: collapse; border-color: #000]',\n min_height: 96,\n invalid_elements: 'form,script',\n menubar: false,\n nonbreaking_force_tab: true,\n paste_preprocess: (_: any, args: any) => {\n args.content = args.content.replace(/<pre>/gi, '<p>')\n args.content = args.content.replace(/<\\/pre>/gi, '</p>')\n },\n paste_remove_styles_if_webkit: true,\n paste_retain_style_properties: 'font-size,text-decoration',\n paste_word_valid_elements:\n '@[style],pre,-strong/b,-em/i,-span,-p,-ol,-ul,-li,-table,-tr,-td[colspan|rowspan],-th,-thead,-tfoot,-tbody,-a[href|name],sub,sup,strike,br,u',\n relative_urls: false,\n remove_script_host: false,\n statusbar: false,\n skin_url: `${tinyMCESource}/${tinyMCEVersion}/skins/ui/oxide`,\n toolbar:\n 'bold italic underline strikethrough | alignleft aligncenter alignright | bullist numlist | outdent indent | cut paste pastetext | fontsizeselect | forecolor backcolor | link table image | undo redo',\n toolbar_mode: 'floating',\n}\n\nexport function getValidLookupLocale(locale: Locale): string {\n return textEditorLocales[locale] || textEditorLocales.en\n}\n\nfunction usesBuiltInText(locale: string) {\n return locale === textEditorLocales.en\n}\n\nexport function generateLanguageUrl(locale: Locale) {\n const lookupLocale = getValidLookupLocale(locale)\n return usesBuiltInText(lookupLocale)\n ? ''\n : `${tinyMCESource}/${tinyMCEVersion}/langs/${lookupLocale}.js`\n}\n\nfunction generatePluginUrl(plugin: string) {\n return `${tinyMCESource}/${tinyMCEVersion}/plugins/${plugin}/plugin.min.js`\n}\n\nexport function generateExternalPlugins(\n plugins: Array<string>,\n basePlugins = defaultPlugins\n) {\n return Array.from(new Set(plugins.concat(basePlugins))).reduce(\n (acc, plugin) => {\n return plugins.includes(plugin)\n ? Object.assign(acc, { [plugin]: generatePluginUrl(plugin) })\n : acc\n },\n {}\n )\n}\n"],"mappings":";;;;AAGA,OAAO,IAAMA,QAAQ,GAAG,sBAAsB;AAC9C,OAAO,IAAMC,aAAa,GAAG,+CAA+C;AAC5E,OAAO,IAAMC,cAAc,GAAG,OAAO;AAIrC;AACA,IAAMC,iBAAoC,GAAG;EAC3CC,EAAE,EAAE,IAAI;EACR,OAAO,EAAE,IAAI;EACb,OAAO,EAAE,OAAO;EAChB,OAAO,EAAE,OAAO;EAChBC,EAAE,EAAE,IAAI;EACR,OAAO,EAAE,IAAI;EACb,OAAO,EAAE,IAAI;EACb,OAAO,EAAE,IAAI;EACb,OAAO,EAAE,IAAI;EACb,OAAO,EAAE,IAAI;EACb,OAAO,EAAE,OAAO;EAChB,OAAO,EAAE,IAAI;EACb,OAAO,EAAE,OAAO;EAChB,OAAO,EAAE,IAAI;EACb,OAAO,EAAE,IAAI;EACb,OAAO,EAAE,OAAO;EAChBC,MAAM,EAAE,IAAI;EACZ,OAAO,EAAE;AACX,CAAC;AAED,OAAO,IAAMC,cAAc,GAAG,CAC5B,UAAU,EACV,YAAY,EACZ,OAAO,EACP,aAAa,EACb,OAAO,EACP,SAAS,CACV;AAED,OAAO,IAAMC,OAAO,GAAG,CACrB,SAAS,EACT,QAAQ,EACR,UAAU,EACV,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,SAAS,EAC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CAAC,GAC3DU,GAAG;EACT,CAAC,EACD,CAAC,CACH,CAAC;AACH"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
function _slicedToArray(
|
|
1
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
2
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."); }
|
|
3
|
-
function _unsupportedIterableToArray(
|
|
4
|
-
function _arrayLikeToArray(
|
|
5
|
-
function _iterableToArrayLimit(
|
|
6
|
-
function _arrayWithHoles(
|
|
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; } }
|
|
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; }
|
|
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; } }
|
|
6
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import { useI18nContext } from '../_hooks/I18n';
|
|
9
9
|
export var useCloseWithConfirmState = function useCloseWithConfirmState() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"closeWithConfirm.js","names":["React","useI18nContext","useCloseWithConfirmState","I18n","_React$useState","useState","_React$useState2","_slicedToArray","isFormDifferent","setFormIsDifferent","closeWithConfirm","useCallback","onClose","_len","arguments","length","args","Array","_key","window","confirm","t","apply","undefined","CloseWithConfirmContext","createContext","useCloseWithConfirmContext","useContext"],"sources":["../../src/_utils/closeWithConfirm.tsx"],"sourcesContent":["import React from 'react'\nimport { useI18nContext } from '../_hooks/I18n'\n\ntype ConditionalCloseFunction<\n onClose extends undefined | ((...args: any[]) => any)\n> = onClose extends (...args: any[]) => any ? onClose : undefined\n\ninterface UseCloseWithConfirmState {\n closeWithConfirm: <onClose extends undefined | ((...args: any[]) => any)>(\n func: onClose\n ) => ConditionalCloseFunction<onClose>\n setFormIsDifferent: React.Dispatch<React.SetStateAction<boolean>>\n}\n\nexport const useCloseWithConfirmState = (): UseCloseWithConfirmState => {\n const I18n = useI18nContext()\n const [isFormDifferent, setFormIsDifferent] = React.useState(false)\n\n const closeWithConfirm = React.useCallback(\n (onClose: Function | undefined) =>\n onClose\n ? (...args: any[]) => {\n if (isFormDifferent && onClose) {\n if (\n window.confirm(\n I18n.t('core.form.closeWithConfirm.confirmMessage')\n )\n ) {\n return onClose(...args)\n }\n } else {\n return onClose?.(...args)\n }\n }\n : undefined,\n [isFormDifferent]\n ) as unknown as UseCloseWithConfirmState['closeWithConfirm']\n\n return {\n closeWithConfirm,\n setFormIsDifferent,\n }\n}\n\nexport const CloseWithConfirmContext =\n React.createContext<UseCloseWithConfirmState>({\n setFormIsDifferent: () => {},\n // @ts-ignore\n closeWithConfirm: (onClose) => onClose,\n })\n\nexport const useCloseWithConfirmContext = () => {\n return React.useContext(CloseWithConfirmContext)\n}\n"],"mappings":";;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,cAAc,QAAQ,gBAAgB;AAa/C,OAAO,IAAMC,wBAAwB,GAAG,SAA3BA,wBAAwBA,CAAA,EAAmC;EACtE,IAAMC,IAAI,GAAGF,cAAc,CAAC,CAAC;EAC7B,IAAAG,eAAA,GAA8CJ,KAAK,CAACK,QAAQ,CAAC,KAAK,CAAC;IAAAC,gBAAA,GAAAC,cAAA,CAAAH,eAAA;IAA5DI,eAAe,GAAAF,gBAAA;IAAEG,kBAAkB,GAAAH,gBAAA;EAE1C,IAAMI,gBAAgB,GAAGV,KAAK,CAACW,WAAW,CACxC,UAACC,OAA6B;IAAA,OAC5BA,OAAO,GACH,YAAoB;MAAA,SAAAC,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAAhBC,IAAI,OAAAC,KAAA,CAAAJ,IAAA,GAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA;QAAJF,IAAI,CAAAE,IAAA,IAAAJ,SAAA,CAAAI,IAAA;MAAA;MACN,IAAIV,eAAe,IAAII,OAAO,EAAE;QAC9B,IACEO,MAAM,CAACC,OAAO,CACZjB,IAAI,CAACkB,CAAC,CAAC,2CAA2C,CACpD,CAAC,EACD;UACA,OAAOT,OAAO,CAAAU,KAAA,SAAIN,IAAI,CAAC;QACzB;MACF,CAAC,MAAM;QACL,OAAOJ,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAAU,KAAA,SAAMN,IAAI,CAAC;MAC3B;IACF,CAAC,GACDO,SAAS;EAAA,GACf,CAACf,eAAe,CAClB,CAA4D;EAE5D,OAAO;IACLE,gBAAgB,EAAhBA,gBAAgB;IAChBD,kBAAkB,EAAlBA;EACF,CAAC;AACH,CAAC;AAED,OAAO,IAAMe,uBAAuB,gBAClCxB,KAAK,CAACyB,aAAa,CAA2B;EAC5ChB,kBAAkB,EAAE,
|
|
1
|
+
{"version":3,"file":"closeWithConfirm.js","names":["React","useI18nContext","useCloseWithConfirmState","I18n","_React$useState","useState","_React$useState2","_slicedToArray","isFormDifferent","setFormIsDifferent","closeWithConfirm","useCallback","onClose","_len","arguments","length","args","Array","_key","window","confirm","t","apply","undefined","CloseWithConfirmContext","createContext","useCloseWithConfirmContext","useContext"],"sources":["../../src/_utils/closeWithConfirm.tsx"],"sourcesContent":["import React from 'react'\nimport { useI18nContext } from '../_hooks/I18n'\n\ntype ConditionalCloseFunction<\n onClose extends undefined | ((...args: any[]) => any)\n> = onClose extends (...args: any[]) => any ? onClose : undefined\n\ninterface UseCloseWithConfirmState {\n closeWithConfirm: <onClose extends undefined | ((...args: any[]) => any)>(\n func: onClose\n ) => ConditionalCloseFunction<onClose>\n setFormIsDifferent: React.Dispatch<React.SetStateAction<boolean>>\n}\n\nexport const useCloseWithConfirmState = (): UseCloseWithConfirmState => {\n const I18n = useI18nContext()\n const [isFormDifferent, setFormIsDifferent] = React.useState(false)\n\n const closeWithConfirm = React.useCallback(\n (onClose: Function | undefined) =>\n onClose\n ? (...args: any[]) => {\n if (isFormDifferent && onClose) {\n if (\n window.confirm(\n I18n.t('core.form.closeWithConfirm.confirmMessage')\n )\n ) {\n return onClose(...args)\n }\n } else {\n return onClose?.(...args)\n }\n }\n : undefined,\n [isFormDifferent]\n ) as unknown as UseCloseWithConfirmState['closeWithConfirm']\n\n return {\n closeWithConfirm,\n setFormIsDifferent,\n }\n}\n\nexport const CloseWithConfirmContext =\n React.createContext<UseCloseWithConfirmState>({\n setFormIsDifferent: () => {},\n // @ts-ignore\n closeWithConfirm: (onClose) => onClose,\n })\n\nexport const useCloseWithConfirmContext = () => {\n return React.useContext(CloseWithConfirmContext)\n}\n"],"mappings":";;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,cAAc,QAAQ,gBAAgB;AAa/C,OAAO,IAAMC,wBAAwB,GAAG,SAA3BA,wBAAwBA,CAAA,EAAmC;EACtE,IAAMC,IAAI,GAAGF,cAAc,CAAC,CAAC;EAC7B,IAAAG,eAAA,GAA8CJ,KAAK,CAACK,QAAQ,CAAC,KAAK,CAAC;IAAAC,gBAAA,GAAAC,cAAA,CAAAH,eAAA;IAA5DI,e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|
-
function ownKeys(
|
|
3
|
-
function _objectSpread(
|
|
4
|
-
function _defineProperty(
|
|
5
|
-
function _toPropertyKey(
|
|
6
|
-
function _toPrimitive(
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
7
|
import { DateTimeFormatter } from '@procore/globalization-toolkit';
|
|
8
8
|
import * as R from 'ramda';
|
|
9
9
|
import { getFormatterLocale } from './i18n';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dateTime.js","names":["DateTimeFormatter","R","getFormatterLocale","dateTimePresets","time","hour","minute","timeZoneName","weekday","year","month","day","date","none","getPresetDateTimeOptions","type","pseudoDate","replace","pseudoFormatPart","_ref","value","formatterFactory","formatterLocale","options","transformDateOptions","error","console","concat","isDefined","val","undefined","pickBy","_objectSpread","locale","mapFormatToParts","parts","map","intlDateTimeFormat","arguments","length","Error","formatter","format","formatDateTime","formatToParts","formatDateTimeToParts","resolvedOptions","toDate","log","Date","isNaN","parse","warn","formatMachineDate","toLocaleDateString","split","reverse","join"],"sources":["../../src/_utils/dateTime.ts"],"sourcesContent":["import type { DateTimeOptions } from '@procore/globalization-toolkit'\nimport { DateTimeFormatter } from '@procore/globalization-toolkit'\nimport * as R from 'ramda'\nimport { getFormatterLocale } from './i18n'\n\nconst dateTimePresets = {\n time: {\n hour: 'numeric',\n minute: 'numeric',\n timeZoneName: 'short',\n } as Intl.DateTimeFormatOptions,\n 'abbr-weekday-abbr-date': {\n weekday: 'short',\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n } as Intl.DateTimeFormatOptions,\n date: {\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n } as Intl.DateTimeFormatOptions,\n 'weekday-date': {\n weekday: 'long',\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n } as Intl.DateTimeFormatOptions,\n none: {} as Intl.DateTimeFormatOptions,\n 'numeric-date': {\n year: 'numeric',\n month: 'numeric',\n day: 'numeric',\n } as Intl.DateTimeFormatOptions,\n}\n\nexport type IntlDateTimeOptionPresets = keyof typeof dateTimePresets\n\nexport const getPresetDateTimeOptions = (type: IntlDateTimeOptionPresets) => {\n return dateTimePresets[type] || dateTimePresets.none\n}\n\nconst pseudoDate = (date: string) => date.replace(/[\\/\\-\\,\\:]/g, '.')\n\nconst pseudoFormatPart = ({\n type,\n value,\n}: Intl.DateTimeFormatPart): Intl.DateTimeFormatPart =>\n type === 'literal' ? { type, value: '.' } : { type, value }\n\nfunction formatterFactory(\n formatterLocale: string,\n options: Intl.DateTimeFormatOptions\n): DateTimeFormatter {\n try {\n return new DateTimeFormatter(transformDateOptions(formatterLocale, options))\n } catch (error) {\n console.error(\n `@procore/core-react Intl.DateTimeFormat error for locale ${formatterLocale}. Will fall back to en-US`,\n error\n )\n return new DateTimeFormatter(transformDateOptions('en-US', options))\n }\n}\n\nfunction transformDateOptions(\n formatterLocale: string,\n options: Intl.DateTimeFormatOptions\n): DateTimeOptions {\n const isDefined = (val: string | undefined) => val !== undefined\n return R.pickBy(isDefined, { ...{ locale: formatterLocale }, ...options })\n}\n\nconst mapFormatToParts = (\n parts: Intl.DateTimeFormatPart[]\n): Intl.DateTimeFormatPart[] => parts.map(pseudoFormatPart)\n\nexport function intlDateTimeFormat(\n locale: string,\n options: Intl.DateTimeFormatOptions = {}\n) {\n if (!locale) {\n throw new Error('Locale is a required parameter.')\n }\n const formatterLocale = getFormatterLocale(locale)\n const formatter = formatterFactory(formatterLocale, options)\n\n return locale === 'pseudo'\n ? {\n format: (date: Date) => pseudoDate(formatter.formatDateTime(date)),\n formatToParts: (date: Date) =>\n mapFormatToParts(formatter.formatDateTimeToParts(date)),\n resolvedOptions: () => formatter.formatter.resolvedOptions(),\n }\n : {\n format: (date: Date) => formatter.formatDateTime(date),\n formatToParts: (date: Date) => formatter.formatDateTimeToParts(date),\n resolvedOptions: () => formatter.formatter.resolvedOptions(),\n }\n}\n\nexport function toDate(date: string | Date, log?: string) {\n if (date instanceof Date) {\n return date\n }\n if (!isNaN(Date.parse(date))) {\n return new Date(date)\n }\n if (log) {\n console.warn(\n `@procore/core-react: ${log}; toDate invalid date format`,\n date\n )\n }\n return date as any as Date\n}\n\n// Date should already be shifted to the time zone, meaning we already have the date in location and\n// now we need it in a specific style https://developer.mozilla.org/en-US/docs/Web/HTML/Element/time#valid_datetime_values\n// toLocaleDateString uses Intl DateTimeFormat\n// alternative toLocaleDateString('en-GB', { timeZone })\nexport function formatMachineDate(date: Date) {\n return date.toLocaleD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;EAE5D,OAAOU,MAAM,KAAK,QAAQ,GACtB;IACES,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"dateTime.js","names":["DateTimeFormatter","R","getFormatterLocale","dateTimePresets","time","hour","minute","timeZoneName","weekday","year","month","day","date","none","getPresetDateTimeOptions","type","pseudoDate","replace","pseudoFormatPart","_ref","value","formatterFactory","formatterLocale","options","transformDateOptions","error","console","concat","isDefined","val","undefined","pickBy","_objectSpread","locale","mapFormatToParts","parts","map","intlDateTimeFormat","arguments","length","Error","formatter","format","formatDateTime","formatToParts","formatDateTimeToParts","resolvedOptions","toDate","log","Date","isNaN","parse","warn","formatMachineDate","toLocaleDateString","split","reverse","join"],"sources":["../../src/_utils/dateTime.ts"],"sourcesContent":["import type { DateTimeOptions } from '@procore/globalization-toolkit'\nimport { DateTimeFormatter } from '@procore/globalization-toolkit'\nimport * as R from 'ramda'\nimport { getFormatterLocale } from './i18n'\n\nconst dateTimePresets = {\n time: {\n hour: 'numeric',\n minute: 'numeric',\n timeZoneName: 'short',\n } as Intl.DateTimeFormatOptions,\n 'abbr-weekday-abbr-date': {\n weekday: 'short',\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n } as Intl.DateTimeFormatOptions,\n date: {\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n } as Intl.DateTimeFormatOptions,\n 'weekday-date': {\n weekday: 'long',\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n } as Intl.DateTimeFormatOptions,\n none: {} as Intl.DateTimeFormatOptions,\n 'numeric-date': {\n year: 'numeric',\n month: 'numeric',\n day: 'numeric',\n } as Intl.DateTimeFormatOptions,\n}\n\nexport type IntlDateTimeOptionPresets = keyof typeof dateTimePresets\n\nexport const getPresetDateTimeOptions = (type: IntlDateTimeOptionPresets) => {\n return dateTimePresets[type] || dateTimePresets.none\n}\n\nconst pseudoDate = (date: string) => date.replace(/[\\/\\-\\,\\:]/g, '.')\n\nconst pseudoFormatPart = ({\n type,\n value,\n}: Intl.DateTimeFormatPart): Intl.DateTimeFormatPart =>\n type === 'literal' ? { type, value: '.' } : { type, value }\n\nfunction formatterFactory(\n formatterLocale: string,\n options: Intl.DateTimeFormatOptions\n): DateTimeFormatter {\n try {\n return new DateTimeFormatter(transformDateOptions(formatterLocale, options))\n } catch (error) {\n console.error(\n `@procore/core-react Intl.DateTimeFormat error for locale ${formatterLocale}. Will fall back to en-US`,\n error\n )\n return new DateTimeFormatter(transformDateOptions('en-US', options))\n }\n}\n\nfunction transformDateOptions(\n formatterLocale: string,\n options: Intl.DateTimeFormatOptions\n): DateTimeOptions {\n const isDefined = (val: string | undefined) => val !== undefined\n return R.pickBy(isDefined, { ...{ locale: formatterLocale }, ...options })\n}\n\nconst mapFormatToParts = (\n parts: Intl.DateTimeFormatPart[]\n): Intl.DateTimeFormatPart[] => parts.map(pseudoFormatPart)\n\nexport function intlDateTimeFormat(\n locale: string,\n options: Intl.DateTimeFormatOptions = {}\n) {\n if (!locale) {\n throw new Error('Locale is a required parameter.')\n }\n const formatterLocale = getFormatterLocale(locale)\n const formatter = formatterFactory(formatterLocale, options)\n\n return locale === 'pseudo'\n ? {\n format: (date: Date) => pseudoDate(formatter.formatDateTime(date)),\n formatToParts: (date: Date) =>\n mapFormatToParts(formatter.formatDateTimeToParts(date)),\n resolvedOptions: () => formatter.formatter.resolvedOptions(),\n }\n : {\n format: (date: Date) => formatter.formatDateTime(date),\n formatToParts: (date: Date) => formatter.formatDateTimeToParts(date),\n resolvedOptions: () => formatter.formatter.resolvedOptions(),\n }\n}\n\nexport function toDate(date: string | Date, log?: string) {\n if (date instanceof Date) {\n return date\n }\n if (!isNaN(Date.parse(date))) {\n return new Date(date)\n }\n if (log) {\n console.warn(\n `@procore/core-react: ${log}; toDate invalid date format`,\n date\n )\n }\n return date as any as Date\n}\n\n// Date should already be shifted to the time zone, meaning we already have the date in location and\n// now we need it in a specific style https://developer.mozilla.org/en-US/docs/Web/HTML/Element/time#valid_datetime_values\n// toLocaleDateString uses Intl DateTimeFormat\n// alternative toLocaleDateString('en-GB', { timeZone })\nexport function formatMachineDate(date: Date) {\n return date.toLocaleDateString('en-GB').split('/').reverse().join('-')\n}\n"],"mappings":";;;;;;AACA,SAASA,iBAAiB,QAAQ,gCAAgC;AAClE,OAAO,KAAKC,CAAC,MAAM,OAAO;AAC1B,SAASC,kBAAkB,QAAQ,QAAQ;AAE3C,IAAMC,eAAe,GAAG;EACtBC,IAAI,EAAE;IACJC,IAAI,EAAE,SAAS;IACfC,MAAM,EAAE,SAAS;IACjBC,YAAY,EAAE;EAChB,CAA+B;EAC/B,wBAAwB,EAAE;IACxBC,OAAO,EAAE,OAAO;IAChBC,IAAI,EAAE,SAAS;IACfC,KAAK,EAAE,OAAO;IACdC,GAAG,EAAE;EACP,CAA+B;EAC/BC,IAAI,EAAE;IACJH,IAAI,EAAE,SAAS;IACfC,KAAK,EAAE,MAAM;IACbC,GAAG,EAAE;EACP,CAA+B;EAC/B,cAAc,EAAE;IACdH,OAAO,EAAE,MAAM;IACfC,IAAI,EAAE,SAAS;IACfC,KAAK,EAAE,MAAM;IACbC,GAAG,EAAE;EACP,CAA+B;EAC/BE,IAAI,EAAE,CAAC,CAA+B;EACtC,cAAc,EAAE;IACdJ,IAAI,EAAE,SAAS;IACfC,KAAK,EAAE,SAAS;IAChBC,GAAG,EAAE;EACP;AACF,CAAC;AAID,OAAO,IAAMG,wBAAwB,GAAG,SAA3BA,wBAAwBA,CAAIC,IAA+B,EAAK;EAC3E,OAAOZ,eAAe,CAACY,IAAI,CAAC,IAAIZ,eAAe,CAACU,IAAI;AACtD,CAAC;AAED,IAAMG,UAAU,GAAG,SAAbA,UAAUA,CAAIJ,IAAY;EAAA,OAAKA,IAAI,CAACK,OAAO,CAAC,aAAa,EAAE,GAAG,CAAC;AAAA;AAErE,IAAMC,gBAAgB,GAAG,SAAnBA,gBAAgBA,CAAAC,IAAA;EAAA,IACpBJ,IAAI,GAAAI,IAAA,CAAJJ,IAAI;IACJK,KAAK,GAAAD,IAAA,C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,OAAO,SAASyC,iBAAiBA,CAACzC,IAAU,EAAE;EAC5C,OAAOA,IAAI,CAAC0C,kBAAkB,CAAC,OAAO,CAAC,CAACC,KAAK,CAAC,GAAG,CAAC,CAACC,OAAO,CAAC,CAAC,CAACC,IAAI,CAAC,GAAG,CAAC;AACxE"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
function _typeof(
|
|
2
|
-
function ownKeys(
|
|
3
|
-
function _objectSpread(
|
|
4
|
-
function _defineProperty(
|
|
5
|
-
function _toPropertyKey(
|
|
6
|
-
function _toPrimitive(
|
|
7
|
-
function _slicedToArray(
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
8
8
|
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."); }
|
|
9
|
-
function _unsupportedIterableToArray(
|
|
10
|
-
function _arrayLikeToArray(
|
|
11
|
-
function _iterableToArrayLimit(
|
|
12
|
-
function _arrayWithHoles(
|
|
9
|
+
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; } }
|
|
10
|
+
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; }
|
|
11
|
+
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; } }
|
|
12
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
13
13
|
import { defaultRect } from './dom';
|
|
14
14
|
var optionHeight = 36;
|
|
15
15
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getAnchorPosition.js","names":["defaultRect","optionHeight","getComponents","placement","_placement$split","split","_placement$split2","_slicedToArray","primary","secondary","edge","align","fromComponents","_ref","concat","getContainer","top","left","width","window","innerWidth","height","innerHeight","bottom","right","flip","current","opposite","center","getPositionComponent","_ref2","validator","updater","_ref3","container","target","overlay","_ref3$canFlip","canFlip","shouldFlip","_objectSpread","Edge","Alignment","getAlignmentPosition","getEdgePosition","getFlyoutAlignmentPosition","getFlyoutEdgePosition","padding","pad","arguments","length","undefined","shape","getAnchorPosition","isFlyout","components","defaultConfig","isFlyoutDefaultButton","isFlyoutAdjustment","minWidth"],"sources":["../../src/_utils/getAnchorPosition.ts"],"sourcesContent":["import type { Rect } from './dom'\nimport { defaultRect } from './dom'\nimport type { Placement } from './types'\n\ninterface Components {\n align: Placement\n edge: Placement\n}\n\ntype Validator = (container: Rect, target: Rect, overlay: Rect) => boolean\ntype Updater = (target: Rect, overlay: Rect) => object\ntype ValidatorMap = { [s: string]: Validator }\ntype UpdaterMap = { [s: string]: Updater }\ntype PlacementMap = { [s: string]: Placement }\n\ninterface ComponentUpdater {\n validator: ValidatorMap\n updater: UpdaterMap\n}\n\ninterface Config {\n container: Rect\n target: Rect\n overlay: Rect\n canFlip?: boolean\n placement: Placement\n}\n\nconst optionHeight = 36\n\n// UTILS\n\nfunction getComponents(placement: Placement): Components {\n const [primary, secondary] = placement.split('-')\n const edge = primary as Placement\n const align = (secondary as Placement) || 'center'\n return { edge, align }\n}\n\nfunction fromComponents({ align, edge }: Components): Placement {\n return align === 'center' ? edge : (`${edge}-${align}` as Placement)\n}\n\nfunction getContainer(): Rect {\n return {\n top: 0,\n left: 0,\n width: window.innerWidth,\n height: window.innerHeight,\n bottom: window.innerWidth,\n right: window.innerWidth,\n }\n}\n\nfunction flip(current: Placement) {\n const opposite: PlacementMap = {\n top: 'bottom',\n bottom: 'top',\n left: 'right',\n right: 'left',\n center: 'center',\n }\n\n return opposite[current]\n}\n\n// GENERIC POSITION UPDATER (Edge, Align)\n// Flip updater if validator fails and opposite passes\nfunction getPositionComponent({ validator, updater }: ComponentUpdater) {\n return ({\n container,\n target,\n overlay,\n placement: current,\n canFlip = true,\n }: Config) => {\n const opposite = flip(current)\n\n const shouldFlip =\n !validator[current](container, target, overlay) &&\n validator[opposite](container, target, overlay)\n\n const placement = canFlip && shouldFlip ? opposite : current\n\n return {\n placement,\n ...updater[placement](target, overlay),\n }\n }\n}\n\n// PRIMARY\nconst Edge: ComponentUpdater = {\n updater: {\n left: (target, overlay) => ({\n left: target.left - overlay.width,\n }),\n right: (target, overlay) => ({ left: target.right }),\n top: (target, overlay) => ({\n top: target.top - overlay.height,\n }),\n bottom: (target, overlay) => ({\n top: target.bottom,\n }),\n },\n validator: {\n top: (container, target, overlay) =>\n target.top - container.top >= overlay.height,\n left: (container, target, overlay) =>\n target.left - container.left >= overlay.width,\n bottom: (container, target, overlay) =>\n container.height - target.bottom >= overlay.height,\n right: (container, target, overlay) =>\n container.width - target.right >= overlay.width,\n },\n}\n\n// SECONDARY\nexport const Alignment: ComponentUpdater = {\n updater: {\n left: (target, overlay) => ({ left: target.left }),\n right: (target, overlay) => ({ left: target.right - overlay.width }),\n top: (target, overlay) => ({ top: target.top }),\n bottom: (target, overlay) => ({ top: target.bottom - overlay.height }),\n center: (target, overlay) => ({\n left: target.left + (target.width - overlay.width) / 2,\n top: target.top + (target.height - overlay.height) / 2,\n }),\n },\n validator: {\n top: (container, target, overlay) =>\n container.height - target.top >= overlay.height,\n right: (container, target, overlay) =>\n target.right - container.left >= overlay.width,\n left: (container, target, overlay) =>\n container.width - target.left >= overlay.width,\n bottom: (container, target, overlay) =>\n target.bottom - container.top >= overlay.height,\n center: () => true,\n },\n}\n\nexport const getAlignmentPosition = getPositionComponent(Alignment)\nexport const getEdgePosition = getPositionComponent(Edge)\nexport const getFlyoutAlignmentPosition = getPositionComponent({\n updater: {\n ...Alignment.updater,\n left: (target, overlay) => ({ left: target.right }),\n right: (target, overlay) => ({ left: target.left - overlay.width }),\n center: (target, overlay) => ({\n left: target.right,\n top: target.top + (target.height - overlay.height) / 2,\n }),\n },\n validator: Alignment.validator,\n})\n\nexport const getFlyoutEdgePosition = getPositionComponent({\n updater: {\n ...Edge.updater,\n bottom: (target, overlay) => ({ top: target.bottom - optionHeight }), // Aligns to height of menu option\n },\n validator: Edge.validator,\n})\n\nexport const padding = (pad: number = 0, shape: Rect) => ({\n ...shape,\n width: shape.width + pad * 2,\n height: shape.height + pad * 2,\n top: shape.top - pad,\n bottom: shape.bottom + pad,\n left: shape.left - pad,\n right: shape.right + pad,\n})\n\nexport function getAnchorPosition(\n placement: Placement,\n pad: number = 0,\n container: Rect = getContainer(),\n target: Rect,\n overlay: Rect,\n canFlip: boolean = true,\n isFlyout: boolean\n): any {\n if (!target || !overlay) {\n return defaultRect\n }\n\n let components = getComponents(placement)\n const defaultConfig = {\n canFlip,\n container,\n target,\n overlay,\n placement,\n }\n\n const isFlyoutDefaultButton =\n target.width === 24 || target.width === 36 || target.width === 48\n const isFlyoutAdjustment = isFlyout && !isFlyoutDefaultButton\n\n const align = isFlyoutAdjustment\n ? getFlyoutAlignmentPosition({\n ...defaultConfig,\n placement: components.align,\n })\n : getAlignmentPosition({\n ...defaultConfig,\n placement: components.align,\n })\n\n const edge = isFlyoutAdjustment\n ? getFlyoutEdgePosition({\n ...defaultConfig,\n target: padding(pad, target),\n placement: components.edge,\n })\n : getEdgePosition({\n ...defaultConfig,\n target: padding(pad, target),\n placement: components.edge,\n })\n\n return {\n ...align,\n ...edge,\n placement: fromComponents({ align: align.placement, edge: edge.placement }),\n minWidth: target.width,\n }\n}\n"],"mappings":";;;;;;;;;;;;AACA,SAASA,WAAW,QAAQ,OAAO;AA2BnC,IAAMC,YAAY,GAAG,EAAE;;AAEvB;;AAEA,SAASC,aAAaA,CAACC,SAAoB,EAAc;EACvD,IAAAC,gBAAA,GAA6BD,SAAS,CAACE,KAAK,CAAC,GA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AATA;EACF,CAAC;EAED,IAAMsD,qBAAqB,GACzBtB,MAAM,CAACjB,KAAK,KAAK,EAAE,IAAIiB,MAAM,CAACjB,KAAK,KAAK,EAAE,IAAIiB,MAAM,CAACjB,KAAK,KAAK,EAAE;EACnE,IAAMwC,kBAAkB,GAAGJ,QAAQ,IAAI,CAACG,qBAAqB;EAE7D,IAAM9C,KAAK,GAAG+C,kBAAkB,GAC5Bb,0BAA0B,CAAAL,aAAA,CAAAA,aAAA,KACrBgB,aAAa;IAChBrD,SAAS,EAAEoD,UAAU,CAAC5C;EAAK,EAC5B,CAAC,GACFgC,oBAAoB,CAAAH,aAAA,CAAAA,aAAA,KACfgB,aAAa;IAChBrD,SAAS,EAAEoD,UAAU,CAAC5C;EAAK,EAC5B,CAAC;EAEN,IAAMD,IAAI,GAAGgD,kBAAkB,GAC3BZ,qBAAqB,CAAAN,aAAA,CAAAA,aAAA,KAChBgB,aAAa;IAChBrB,MAAM,EAAEY,OAAO,CAACC,GAAG,EAAEb,MAAM,CAAC;IAC5BhC,SAAS,EAAEoD,UAAU,CAAC7C;EAAI,EAC3B,CAAC,GACFkC,eAAe,CAAAJ,aAAA,CAAAA,aAAA,KACVgB,aAAa;IAChBrB,MAAM,EAAEY,OAAO,CAACC,GAAG,EAAEb,MAAM,CAAC;IAC5BhC,SAAS,EAAEoD,UAAU,CAAC7C;EAAI,EAC3B,CAAC;EAEN,OAAA8B,aAAA,CAAAA,aAAA,CAAAA,aAAA,KACK7B,KAAK,GACLD,IAAI;IACPP,SAAS,EAAES,cAAc,CAAC;MAAED,KAAK,EAAEA,KAAK,CAACR,SAAS;MAAEO,IAAI,EAAEA,IAAI,CAACP;IAAU,CAAC,CAAC;IAC3EwD,QAAQ,EAAExB,MAAM,CAACjB;EAAK;AAE1B"}
|
|
1
|
+
{"version":3,"file":"getAnchorPosition.js","names":["defaultRect","optionHeight","getComponents","placement","_placement$split","split","_placement$split2","_slicedToArray","primary","secondary","edge","align","fromComponents","_ref","concat","getContainer","top","left","width","window","innerWidth","height","innerHeight","bottom","right","flip","current","opposite","center","getPositionComponent","_ref2","validator","updater","_ref3","container","target","overlay","_ref3$canFlip","canFlip","shouldFlip","_objectSpread","Edge","Alignment","getAlignmentPosition","getEdgePosition","getFlyoutAlignmentPosition","getFlyoutEdgePosition","padding","pad","arguments","length","undefined","shape","getAnchorPosition","isFlyout","components","defaultConfig","isFlyoutDefaultButton","isFlyoutAdjustment","minWidth"],"sources":["../../src/_utils/getAnchorPosition.ts"],"sourcesContent":["import type { Rect } from './dom'\nimport { defaultRect } from './dom'\nimport type { Placement } from './types'\n\ninterface Components {\n align: Placement\n edge: Placement\n}\n\ntype Validator = (container: Rect, target: Rect, overlay: Rect) => boolean\ntype Updater = (target: Rect, overlay: Rect) => object\ntype ValidatorMap = { [s: string]: Validator }\ntype UpdaterMap = { [s: string]: Updater }\ntype PlacementMap = { [s: string]: Placement }\n\ninterface ComponentUpdater {\n validator: ValidatorMap\n updater: UpdaterMap\n}\n\ninterface Config {\n container: Rect\n target: Rect\n overlay: Rect\n canFlip?: boolean\n placement: Placement\n}\n\nconst optionHeight = 36\n\n// UTILS\n\nfunction getComponents(placement: Placement): Components {\n const [primary, secondary] = placement.split('-')\n const edge = primary as Placement\n const align = (secondary as Placement) || 'center'\n return { edge, align }\n}\n\nfunction fromComponents({ align, edge }: Components): Placement {\n return align === 'center' ? edge : (`${edge}-${align}` as Placement)\n}\n\nfunction getContainer(): Rect {\n return {\n top: 0,\n left: 0,\n width: window.innerWidth,\n height: window.innerHeight,\n bottom: window.innerWidth,\n right: window.innerWidth,\n }\n}\n\nfunction flip(current: Placement) {\n const opposite: PlacementMap = {\n top: 'bottom',\n bottom: 'top',\n left: 'right',\n right: 'left',\n center: 'center',\n }\n\n return opposite[current]\n}\n\n// GENERIC POSITION UPDATER (Edge, Align)\n// Flip updater if validator fails and opposite passes\nfunction getPositionComponent({ validator, updater }: ComponentUpdater) {\n return ({\n container,\n target,\n overlay,\n placement: current,\n canFlip = true,\n }: Config) => {\n const opposite = flip(current)\n\n const shouldFlip =\n !validator[current](container, target, overlay) &&\n validator[opposite](container, target, overlay)\n\n const placement = canFlip && shouldFlip ? opposite : current\n\n return {\n placement,\n ...updater[placement](target, overlay),\n }\n }\n}\n\n// PRIMARY\nconst Edge: ComponentUpdater = {\n updater: {\n left: (target, overlay) => ({\n left: target.left - overlay.width,\n }),\n right: (target, overlay) => ({ left: target.right }),\n top: (target, overlay) => ({\n top: target.top - overlay.height,\n }),\n bottom: (target, overlay) => ({\n top: target.bottom,\n }),\n },\n validator: {\n top: (container, target, overlay) =>\n target.top - container.top >= overlay.height,\n left: (container, target, overlay) =>\n target.left - container.left >= overlay.width,\n bottom: (container, target, overlay) =>\n container.height - target.bottom >= overlay.height,\n right: (container, target, overlay) =>\n container.width - target.right >= overlay.width,\n },\n}\n\n// SECONDARY\nexport const Alignment: ComponentUpdater = {\n updater: {\n left: (target, overlay) => ({ left: target.left }),\n right: (target, overlay) => ({ left: target.right - overlay.width }),\n top: (target, overlay) => ({ top: target.top }),\n bottom: (target, overlay) => ({ top: target.bottom - overlay.height }),\n center: (target, overlay) => ({\n left: target.left + (target.width - overlay.width) / 2,\n top: target.top + (target.height - overlay.height) / 2,\n }),\n },\n validator: {\n top: (container, target, overlay) =>\n container.height - target.top >= overlay.height,\n right: (container, target, overlay) =>\n target.right - container.left >= overlay.width,\n left: (container, target, overlay) =>\n container.width - target.left >= overlay.width,\n bottom: (container, target, overlay) =>\n target.bottom - container.top >= overlay.height,\n center: () => true,\n },\n}\n\nexport const getAlignmentPosition = getPositionComponent(Alignment)\nexport const getEdgePosition = getPositionComponent(Edge)\nexport const getFlyoutAlignmentPosition = getPositionComponent({\n updater: {\n ...Alignment.updater,\n left: (target, overlay) => ({ left: target.right }),\n right: (target, overlay) => ({ left: target.left - overlay.width }),\n center: (target, overlay) => ({\n left: target.right,\n top: target.top + (target.height - overlay.height) / 2,\n }),\n },\n validator: Alignment.validator,\n})\n\nexport const getFlyoutEdgePosition = getPositionComponent({\n updater: {\n ...Edge.updater,\n bottom: (target, overlay) => ({ top: target.bottom - optionHeight }), // Aligns to height of menu option\n },\n validator: Edge.validator,\n})\n\nexport const padding = (pad: number = 0, shape: Rect) => ({\n ...shape,\n width: shape.width + pad * 2,\n height: shape.height + pad * 2,\n top: shape.top - pad,\n bottom: shape.bottom + pad,\n left: shape.left - pad,\n right: shape.right + pad,\n})\n\nexport function getAnchorPosition(\n placement: Placement,\n pad: number = 0,\n container: Rect = getContainer(),\n target: Rect,\n overlay: Rect,\n canFlip: boolean = true,\n isFlyout: boolean\n): any {\n if (!target || !overlay) {\n return defaultRect\n }\n\n let components = getComponents(placement)\n const defaultConfig = {\n canFlip,\n container,\n target,\n overlay,\n placement,\n }\n\n const isFlyoutDefaultButton =\n target.width === 24 || target.width === 36 || target.width === 48\n const isFlyoutAdjustment = isFlyout && !isFlyoutDefaultButton\n\n const align = isFlyoutAdjustment\n ? getFlyoutAlignmentPosition({\n ...defaultConfig,\n placement: components.align,\n })\n : getAlignmentPosition({\n ...defaultConfig,\n placement: components.align,\n })\n\n const edge = isFlyoutAdjustment\n ? getFlyoutEdgePosition({\n ...defaultConfig,\n target: padding(pad, target),\n placement: components.edge,\n })\n : getEdgePosition({\n ...defaultConfig,\n target: padding(pad, target),\n placement: components.edge,\n })\n\n return {\n ...align,\n ...edge,\n placement: fromComponents({ align: align.placement, edge: edge.placement }),\n minWidth: target.width,\n }\n}\n"],"mappings":";;;;;;;;;;;;AACA,SAASA,WAAW,QAAQ,OAAO;AA2BnC,IAAMC,YAAY,GAAG,EAAE;;AAEvB;;AAEA,SAASC,aAAaA,CAACC,SAAoB,EAAc;EACvD,IAAAC,gBAAA,GAA6BD,SAAS,CAACE,KAAK,CAAC,GAAG,CAAC;IAAAC,iBAAA,GAAAC,cAAA,CAAAH,gBAAA;IAA1CI,OAAO,GAAAF,iBAAA;IAAEG,SAAS,GAAAH,iBAAA;EACzB,IAAMI,IAAI,GAAGF,OAAoB;EACj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