@procore/core-react 12.17.4 → 12.17.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AnchorNavigation/AnchorNavigation.styles.js +3 -3
- package/dist/AnchorNavigation/AnchorNavigationProvider.js +5 -5
- package/dist/Avatar/Avatar.js +9 -9
- package/dist/Avatar/Avatar.styles.js +5 -5
- package/dist/AvatarStack/AvatarStack.js +14 -14
- 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 +8 -8
- package/dist/Banner/Banner.styles.js +10 -10
- 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.styles.js +5 -5
- package/dist/Calendar/Calendar.js +4 -4
- 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.styles.js +10 -10
- package/dist/DateSelect/DateSelect.js +8 -8
- 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 +9 -9
- package/dist/Dropdown/Dropdown.js.map +1 -1
- 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.styles.js +4 -4
- package/dist/Dropzone/Dropzone.hooks.js +16 -16
- package/dist/Dropzone/Dropzone.js +13 -13
- 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.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.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.styles.js +3 -3
- package/dist/FileSelect/FileTokenList/FileTokenList.js +8 -8
- 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.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 +9 -9
- package/dist/FilterToken/FilterToken.styles.js +2 -2
- 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.d.ts +1 -0
- package/dist/Form/Form.js +24 -18
- package/dist/Form/Form.js.map +1 -1
- package/dist/Form/Form.styles.d.ts +2 -0
- package/dist/Form/Form.styles.js +15 -14
- package/dist/Form/Form.styles.js.map +1 -1
- package/dist/Form/Form.types.d.ts +30 -1
- package/dist/Form/Form.types.js.map +1 -1
- package/dist/Form/FormFieldTooltip.js +1 -1
- package/dist/Form/StyledFormikForm.styles.d.ts +1 -0
- package/dist/Form/StyledFormikForm.styles.js +4 -2
- package/dist/Form/StyledFormikForm.styles.js.map +1 -1
- package/dist/Form/stories/util.js +9 -9
- 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/MenuImperative/MenuImperative.js +15 -15
- 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.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.styles.js +6 -6
- package/dist/NextMenu/NextMenu.js +14 -14
- 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.styles.js +7 -7
- package/dist/NumberInput/NumberInput.utils.js +11 -11
- 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/a11yPresets.js +6 -6
- 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.styles.js +5 -5
- package/dist/Pagination/PaginationSelect.js +3 -3
- package/dist/Panel/Panel.js +8 -8
- 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.js +8 -8
- package/dist/ProgressBar/ProgressBar.styles.js +2 -2
- 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.styles.js +5 -5
- package/dist/Section/Section.js +14 -14
- package/dist/Section/Section.styles.js +7 -7
- package/dist/SegmentedController/SegmentedController.js +19 -18
- package/dist/SegmentedController/SegmentedController.js.map +1 -1
- package/dist/SegmentedController/SegmentedController.styles.d.ts +1 -1
- package/dist/SegmentedController/SegmentedController.styles.js +8 -8
- package/dist/SegmentedController/SegmentedController.styles.js.map +1 -1
- package/dist/SegmentedController/SegmentedController.types.d.ts +10 -1
- package/dist/SegmentedController/SegmentedController.types.js.map +1 -1
- package/dist/Select/Select.js +8 -8
- 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.styles.js +5 -5
- package/dist/Spinner/Spinner.d.ts +2 -2
- package/dist/Spinner/Spinner.js +7 -5
- package/dist/Spinner/Spinner.js.map +1 -1
- package/dist/Spinner/Spinner.styles.d.ts +1 -1
- package/dist/Spinner/Spinner.styles.js +17 -11
- package/dist/Spinner/Spinner.styles.js.map +1 -1
- package/dist/Spinner/Spinner.types.d.ts +6 -5
- package/dist/Spinner/Spinner.types.js.map +1 -1
- package/dist/SplitViewCard/SplitViewCard.context.js +5 -5
- 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.js +7 -7
- package/dist/SuperSelect/SuperSelect.presets.styles.js +1 -1
- package/dist/SuperSelect/SuperSelect.styles.js +37 -37
- package/dist/SuperSelect/SuperSelect.utils.js +14 -14
- package/dist/SuperSelect/presets/contactsPreset.js +3 -3
- package/dist/SuperSelect/presets/filterPreset.js +1 -1
- package/dist/SuperSelect/useSuperSelect.js +14 -14
- 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.styles.js +28 -28
- package/dist/TableShelf/TableShelf.js +3 -3
- package/dist/TableShelf/TableShelf.styles.js +5 -5
- package/dist/Tabs/Tabs.d.ts +1 -1
- package/dist/Tabs/Tabs.js +31 -29
- package/dist/Tabs/Tabs.js.map +1 -1
- package/dist/Tabs/Tabs.styles.d.ts +2 -2
- package/dist/Tabs/Tabs.styles.js +28 -28
- package/dist/Tabs/Tabs.styles.js.map +1 -1
- package/dist/Tabs/Tabs.types.d.ts +8 -1
- package/dist/Tabs/Tabs.types.js.map +1 -1
- 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.styles.js +17 -17
- package/dist/Thumbnail/Thumbnail.utils.js +9 -9
- package/dist/Thumbnail/ThumbnailCaption.js +3 -3
- package/dist/Thumbnail/ThumbnailDocumentIcon.js +5 -5
- 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.styles.js +7 -7
- package/dist/TieredDropdown/TieredDropdown.js +14 -14
- package/dist/TieredDropdown/useSearch.js +5 -5
- package/dist/TieredSelect/LeafSelectionTieredSelect.js +8 -8
- package/dist/TieredSelect/TierSelectionTieredSelect.js +49 -24
- 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/Tile/Tile.js +3 -3
- 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/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.styles.js +9 -9
- 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/Hotkey.js +2 -2
- 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 +12 -12
- 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 +37 -37
- 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 +753 -748
- 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 +28 -28
- 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 +37 -23
- 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 +16 -16
- 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 +34 -22
- 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 +42 -42
- 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/closeWithConfirm.js +5 -5
- package/dist/_utils/dateTime.js +6 -6
- package/dist/_utils/getAnchorPosition.js +11 -11
- 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 +4 -4
package/dist/_hooks/Anchor.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
function _typeof(
|
|
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
2
|
var _excluded = ["children", "overlayRef", "targetRef"];
|
|
3
|
-
function _objectWithoutProperties(
|
|
4
|
-
function _objectWithoutPropertiesLoose(
|
|
5
|
-
function _toConsumableArray(
|
|
3
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
4
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
5
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
6
6
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
7
|
-
function _iterableToArray(
|
|
8
|
-
function _arrayWithoutHoles(
|
|
9
|
-
function ownKeys(
|
|
10
|
-
function _objectSpread(
|
|
11
|
-
function _defineProperty(
|
|
12
|
-
function _toPropertyKey(
|
|
13
|
-
function _toPrimitive(
|
|
14
|
-
function _slicedToArray(
|
|
7
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
8
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
9
|
+
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; }
|
|
10
|
+
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; }
|
|
11
|
+
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; }
|
|
12
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
13
|
+
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); }
|
|
14
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
15
15
|
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."); }
|
|
16
|
-
function _unsupportedIterableToArray(
|
|
17
|
-
function _arrayLikeToArray(
|
|
18
|
-
function _iterableToArrayLimit(
|
|
19
|
-
function _arrayWithHoles(
|
|
16
|
+
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; } }
|
|
17
|
+
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; }
|
|
18
|
+
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; } }
|
|
19
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
20
20
|
import React from 'react';
|
|
21
21
|
import { getBoundingRect } from '../_utils/dom';
|
|
22
22
|
import { getAnchorPosition } from '../_utils/getAnchorPosition';
|
|
@@ -28,14 +28,17 @@ import { useLayoutEventListener } from './EventListener';
|
|
|
28
28
|
* @deprecatedSince 9
|
|
29
29
|
* @deprecated Never officially documented/supported
|
|
30
30
|
*/
|
|
31
|
+
|
|
31
32
|
/**
|
|
32
33
|
* @deprecatedSince 9
|
|
33
34
|
* @deprecated Never officially documented/supported
|
|
34
35
|
*/
|
|
36
|
+
|
|
35
37
|
/**
|
|
36
38
|
* @deprecatedSince 9
|
|
37
39
|
* @deprecated Never officially documented/supported
|
|
38
40
|
*/
|
|
41
|
+
|
|
39
42
|
/**
|
|
40
43
|
* @deprecatedSince 9
|
|
41
44
|
* @deprecated Never officially documented/supported
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Anchor.js","names":["React","getBoundingRect","getAnchorPosition","useLayoutEventListener","initAnchor","left","minWidth","placement","top","useAnchor","_ref","_ref$canFlip","canFlip","_ref$dependencies","dependencies","_ref$onLayout","onLayout","_ref$padding","padding","_ref$placement","overlayRef","targetRef","_ref$shrinkOverlay","shrinkOverlay","_ref$isFlyout","isFlyout","_React$useState","useState","_objectSpread","_React$useState2","_slicedToArray","anchor","setAnchor","viewChangeHandler","current","target","style","concat","width","newAnchor","undefined","event","handler","options","capture","useLayoutEffect","_toConsumableArray","Anchor","_ref2","children","props","_objectWithoutProperties","_excluded","content","cloneElement","ref"],"sources":["../../src/_hooks/Anchor.tsx"],"sourcesContent":["import type { PropsWithChildren } from 'react'\nimport React from 'react'\nimport { getBoundingRect } from '../_utils/dom'\nimport { getAnchorPosition } from '../_utils/getAnchorPosition'\nimport type { Placement } from '../_utils/types'\nimport { useLayoutEventListener } from './EventListener'\n\n/* TYPES */\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport interface AnchorConfig {\n canFlip?: boolean\n dependencies?: Array<any>\n onLayout?: (anchor: AnchorApi) => any\n overlayRef: React.RefObject<HTMLElement>\n padding?: number\n placement?: Placement\n targetRef: React.RefObject<HTMLElement>\n shrinkOverlay?: boolean\n isFlyout?: boolean\n}\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport interface AnchorProps extends PropsWithChildren<AnchorConfig> {}\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport interface AnchorApi {\n left: number\n /**\n * @deprecated\n *\n * use `shrinkOverlay` boolean property to set `minWidth`\n *\n * @deprecatedSince 10.20.0\n */\n minWidth: number\n placement: Placement\n top: number\n}\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport const initAnchor: AnchorApi = {\n left: 0,\n minWidth: 0,\n placement: 'bottom-left',\n top: 0,\n}\n\n/* HOOK */\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport function useAnchor({\n canFlip = true,\n dependencies = [],\n onLayout = () => {},\n padding = 0,\n placement = 'bottom-left',\n overlayRef,\n targetRef,\n shrinkOverlay = false,\n isFlyout = false,\n}: AnchorConfig): AnchorApi {\n const [anchor, setAnchor] = React.useState<AnchorApi>({\n ...initAnchor,\n placement,\n })\n\n const viewChangeHandler = () => {\n if (overlayRef.current && targetRef.current) {\n const target = getBoundingRect(targetRef.current)\n\n if (!shrinkOverlay) {\n // we should set minWidth before calculation\n overlayRef.current.style.minWidth = `${target.width}px`\n }\n\n const newAnchor = getAnchorPosition(\n placement,\n padding,\n undefined,\n target,\n getBoundingRect(overlayRef.current),\n canFlip,\n isFlyout\n )\n if (newAnchor.placement !== anchor.placement) {\n setAnchor(newAnchor)\n }\n onLayout(newAnchor)\n }\n }\n\n useLayoutEventListener({\n event: 'scroll',\n handler: viewChangeHandler,\n options: {\n capture: true,\n },\n })\n\n useLayoutEventListener({\n event: 'resize',\n handler: viewChangeHandler,\n })\n\n useLayoutEventListener({\n event: 'load',\n handler: viewChangeHandler,\n })\n\n React.useLayoutEffect(() => {\n viewChangeHandler()\n }, [overlayRef, ...dependencies])\n\n return anchor\n}\n\n/* RENDER PROP */\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport function Anchor({\n children,\n overlayRef,\n targetRef,\n ...props\n}: AnchorProps) {\n const anchor = useAnchor({\n ...props,\n overlayRef,\n targetRef,\n })\n\n const content =\n typeof children === 'function'\n ? (children as (props: AnchorApi) => React.ReactElement)(anchor)\n : (children as React.ReactElement)\n\n return (\n content &&\n React.cloneElement(content, {\n ...content.props,\n placement: anchor.placement,\n ref: overlayRef,\n })\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AACA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,eAAe,QAAQ,eAAe;AAC/C,SAASC,iBAAiB,QAAQ,6BAA6B;AAE/D,SAASC,sBAAsB,QAAQ,iBAAiB;;AAExD;;AAEA;AACA;AACA;AACA
|
|
1
|
+
{"version":3,"file":"Anchor.js","names":["React","getBoundingRect","getAnchorPosition","useLayoutEventListener","initAnchor","left","minWidth","placement","top","useAnchor","_ref","_ref$canFlip","canFlip","_ref$dependencies","dependencies","_ref$onLayout","onLayout","_ref$padding","padding","_ref$placement","overlayRef","targetRef","_ref$shrinkOverlay","shrinkOverlay","_ref$isFlyout","isFlyout","_React$useState","useState","_objectSpread","_React$useState2","_slicedToArray","anchor","setAnchor","viewChangeHandler","current","target","style","concat","width","newAnchor","undefined","event","handler","options","capture","useLayoutEffect","_toConsumableArray","Anchor","_ref2","children","props","_objectWithoutProperties","_excluded","content","cloneElement","ref"],"sources":["../../src/_hooks/Anchor.tsx"],"sourcesContent":["import type { PropsWithChildren } from 'react'\nimport React from 'react'\nimport { getBoundingRect } from '../_utils/dom'\nimport { getAnchorPosition } from '../_utils/getAnchorPosition'\nimport type { Placement } from '../_utils/types'\nimport { useLayoutEventListener } from './EventListener'\n\n/* TYPES */\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport interface AnchorConfig {\n canFlip?: boolean\n dependencies?: Array<any>\n onLayout?: (anchor: AnchorApi) => any\n overlayRef: React.RefObject<HTMLElement>\n padding?: number\n placement?: Placement\n targetRef: React.RefObject<HTMLElement>\n shrinkOverlay?: boolean\n isFlyout?: boolean\n}\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport interface AnchorProps extends PropsWithChildren<AnchorConfig> {}\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport interface AnchorApi {\n left: number\n /**\n * @deprecated\n *\n * use `shrinkOverlay` boolean property to set `minWidth`\n *\n * @deprecatedSince 10.20.0\n */\n minWidth: number\n placement: Placement\n top: number\n}\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport const initAnchor: AnchorApi = {\n left: 0,\n minWidth: 0,\n placement: 'bottom-left',\n top: 0,\n}\n\n/* HOOK */\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport function useAnchor({\n canFlip = true,\n dependencies = [],\n onLayout = () => {},\n padding = 0,\n placement = 'bottom-left',\n overlayRef,\n targetRef,\n shrinkOverlay = false,\n isFlyout = false,\n}: AnchorConfig): AnchorApi {\n const [anchor, setAnchor] = React.useState<AnchorApi>({\n ...initAnchor,\n placement,\n })\n\n const viewChangeHandler = () => {\n if (overlayRef.current && targetRef.current) {\n const target = getBoundingRect(targetRef.current)\n\n if (!shrinkOverlay) {\n // we should set minWidth before calculation\n overlayRef.current.style.minWidth = `${target.width}px`\n }\n\n const newAnchor = getAnchorPosition(\n placement,\n padding,\n undefined,\n target,\n getBoundingRect(overlayRef.current),\n canFlip,\n isFlyout\n )\n if (newAnchor.placement !== anchor.placement) {\n setAnchor(newAnchor)\n }\n onLayout(newAnchor)\n }\n }\n\n useLayoutEventListener({\n event: 'scroll',\n handler: viewChangeHandler,\n options: {\n capture: true,\n },\n })\n\n useLayoutEventListener({\n event: 'resize',\n handler: viewChangeHandler,\n })\n\n useLayoutEventListener({\n event: 'load',\n handler: viewChangeHandler,\n })\n\n React.useLayoutEffect(() => {\n viewChangeHandler()\n }, [overlayRef, ...dependencies])\n\n return anchor\n}\n\n/* RENDER PROP */\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport function Anchor({\n children,\n overlayRef,\n targetRef,\n ...props\n}: AnchorProps) {\n const anchor = useAnchor({\n ...props,\n overlayRef,\n targetRef,\n })\n\n const content =\n typeof children === 'function'\n ? (children as (props: AnchorApi) => React.ReactElement)(anchor)\n : (children as React.ReactElement)\n\n return (\n content &&\n React.cloneElement(content, {\n ...content.props,\n placement: anchor.placement,\n ref: overlayRef,\n })\n )\n}\n"],"mappings":"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"}
|
package/dist/_hooks/Buffer.js
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
var _excluded = ["children"];
|
|
2
|
-
function _objectWithoutProperties(
|
|
3
|
-
function _objectWithoutPropertiesLoose(
|
|
4
|
-
function _slicedToArray(
|
|
2
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
3
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
4
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
5
5
|
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."); }
|
|
6
|
-
function _unsupportedIterableToArray(
|
|
7
|
-
function _arrayLikeToArray(
|
|
8
|
-
function _iterableToArrayLimit(
|
|
9
|
-
function _arrayWithHoles(
|
|
6
|
+
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; } }
|
|
7
|
+
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; }
|
|
8
|
+
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; } }
|
|
9
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
10
10
|
import React from 'react';
|
|
11
11
|
|
|
12
12
|
/* TYPES */
|
|
13
13
|
|
|
14
14
|
/* HOOK */
|
|
15
|
+
|
|
15
16
|
/**
|
|
16
17
|
* @deprecatedSince 9.7.0
|
|
17
18
|
* @deprecated A trivial hook for storing a string. Write your own or use a hook utility lib.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Buffer.js","names":["React","useBuffer","_ref","_ref$initialValue","initialValue","_React$useState","useState","_React$useState2","_slicedToArray","value","setValue","clear","reset","update","Buffer","_ref2","children","props","_objectWithoutProperties","_excluded","buffer"],"sources":["../../src/_hooks/Buffer.tsx"],"sourcesContent":["import React from 'react'\n\n/* TYPES */\n\ninterface BufferConfig {\n initialValue: string\n}\n\ninterface BufferApi {\n clear: () => void\n reset: () => void\n update: (value: string) => void\n value: string\n}\n\ninterface Props extends BufferConfig {\n children?: React.ReactNode\n}\n\ninterface RenderProps extends BufferConfig {\n children: (props: BufferApi) => {}\n}\n\n/* HOOK */\n\n/**\n * @deprecatedSince 9.7.0\n * @deprecated A trivial hook for storing a string. Write your own or use a hook utility lib.\n * \n * **Source:**\n * ```\n export function useBuffer({ initialValue = '' }) {\n const [value, setValue] = React.useState(initialValue)\n\n const clear = () => setValue('')\n\n const reset = () => setValue(initialValue)\n\n const update = (value: string) => setValue(value)\n\n return {\n clear,\n reset,\n update,\n value,\n }\n}\n```\n */\nexport function useBuffer({ initialValue = '' }: BufferConfig): BufferApi {\n const [value, setValue] = React.useState(initialValue)\n\n const clear = () => setValue('')\n const reset = () => setValue(initialValue)\n const update = (value: string) => setValue(value)\n\n return {\n clear,\n reset,\n update,\n value,\n }\n}\n\n/* RENDER PROP */\n\n/**\n * @deprecatedSince 9.7.0\n * @deprecated\n */\nexport function Buffer({ children, ...props }: RenderProps) {\n const buffer = useBuffer(props)\n\n return typeof children === 'function' ? children(buffer) : children\n}\n"],"mappings":";;;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;;AAEzB;;AAqBA
|
|
1
|
+
{"version":3,"file":"Buffer.js","names":["React","useBuffer","_ref","_ref$initialValue","initialValue","_React$useState","useState","_React$useState2","_slicedToArray","value","setValue","clear","reset","update","Buffer","_ref2","children","props","_objectWithoutProperties","_excluded","buffer"],"sources":["../../src/_hooks/Buffer.tsx"],"sourcesContent":["import React from 'react'\n\n/* TYPES */\n\ninterface BufferConfig {\n initialValue: string\n}\n\ninterface BufferApi {\n clear: () => void\n reset: () => void\n update: (value: string) => void\n value: string\n}\n\ninterface Props extends BufferConfig {\n children?: React.ReactNode\n}\n\ninterface RenderProps extends BufferConfig {\n children: (props: BufferApi) => {}\n}\n\n/* HOOK */\n\n/**\n * @deprecatedSince 9.7.0\n * @deprecated A trivial hook for storing a string. Write your own or use a hook utility lib.\n * \n * **Source:**\n * ```\n export function useBuffer({ initialValue = '' }) {\n const [value, setValue] = React.useState(initialValue)\n\n const clear = () => setValue('')\n\n const reset = () => setValue(initialValue)\n\n const update = (value: string) => setValue(value)\n\n return {\n clear,\n reset,\n update,\n value,\n }\n}\n```\n */\nexport function useBuffer({ initialValue = '' }: BufferConfig): BufferApi {\n const [value, setValue] = React.useState(initialValue)\n\n const clear = () => setValue('')\n const reset = () => setValue(initialValue)\n const update = (value: string) => setValue(value)\n\n return {\n clear,\n reset,\n update,\n value,\n }\n}\n\n/* RENDER PROP */\n\n/**\n * @deprecatedSince 9.7.0\n * @deprecated\n */\nexport function Buffer({ children, ...props }: RenderProps) {\n const buffer = useBuffer(props)\n\n return typeof children === 'function' ? children(buffer) : children\n}\n"],"mappings":";;;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;;AAEzB;;AAqBA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,SAASA,CAAAC,IAAA,EAAiD;EAAA,IAAAC,iBAAA,GAAAD,IAAA,CAA9CE,YAAY;IAAZA,YAAY,GAAAD,iBAAA,cAAG,EAAE,GAAAA,iBAAA;EAC3C,IAAAE,eAAA,GAA0BL,KAAK,CAACM,QAAQ,CAACF,YAAY,CAAC;IAAAG,gBAAA,GAAAC,cAAA,CAAAH,eAAA;IAA/CI,KAAK,GAAAF,gBAAA;IAAEG,QAAQ,GAAAH,gBAAA;EAEtB,IAAMI,KAAK,GAAG,SAARA,KAAKA,CAAA;IAAA,OAASD,QAAQ,CAAC,EAAE,CAAC;EAAA;EAChC,IAAME,KAAK,GAAG,SAARA,KAAKA,CAAA;IAAA,OAASF,QAAQ,CAACN,YAAY,CAAC;EAAA;EAC1C,IAAMS,MAAM,GAAG,SAATA,MAAMA,CAAIJ,KAAa;IAAA,OAAKC,QAAQ,CAACD,KAAK,CAAC;EAAA;EAEjD,OAAO;IACLE,KAAK,EAALA,KAAK;IACLC,KAAK,EAALA,KAAK;IACLC,MAAM,EAANA,MAAM;IACNJ,KAAK,EAALA;EACF,CAAC;AACH;;AAEA;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASK,MAAMA,CAAAC,KAAA,EAAsC;EAAA,IAAnCC,QAAQ,GAAAD,KAAA,CAARC,QAAQ;IAAKC,KAAK,GAAAC,wBAAA,CAAAH,KAAA,EAAAI,SAAA;EACzC,IAAMC,MAAM,GAAGnB,SAAS,CAACgB,KAAK,CAAC;EAE/B,OAAO,OAAOD,QAAQ,KAAK,UAAU,GAAGA,QAAQ,CAACI,MAAM,CAAC,GAAGJ,QAAQ;AACrE"}
|
|
@@ -2,7 +2,8 @@ import { useEventListener } from './EventListener';
|
|
|
2
2
|
/**
|
|
3
3
|
* @deprecatedSince 9
|
|
4
4
|
* @deprecated Never officially documented/supported
|
|
5
|
-
*/
|
|
5
|
+
*/
|
|
6
|
+
// To support MenuRef had to change to any. Could manually do <HTMLElement & MenuRef> but seems brittle
|
|
6
7
|
export function isEventSource(ref, event) {
|
|
7
8
|
if (ref !== null && ref !== void 0 && ref.current && event && (event.target instanceof HTMLElement || event.target instanceof SVGElement)) {
|
|
8
9
|
return ref.current.contains(event.target);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClickOutside.js","names":["useEventListener","isEventSource","ref","event","current","target","HTMLElement","SVGElement","contains","useClickOutside","_ref","_ref$refs","refs","onClickOutside","container","handler","find","options","capture","containerDocument","ownerDocument","scope","defaultView","undefined"],"sources":["../../src/_hooks/ClickOutside.ts"],"sourcesContent":["import type React from 'react'\nimport type { PortalProps } from '../Portal/Portal.types'\nimport { useEventListener } from './EventListener'\n\nexport interface ClickOutsideConfig extends Pick<PortalProps, 'container'> {\n /**\n * @since 10.19.0\n */\n onClickOutside: (event: MouseEvent) => void\n /**\n * @since 10.19.0\n */\n refs: Array<React.RefObject<HTMLElement>>\n}\n\nexport interface ClickOutsideProps extends ClickOutsideConfig {\n /**\n * @since 10.19.0\n */\n children: React.ReactElement\n}\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\n// To support MenuRef had to change to any. Could manually do <HTMLElement & MenuRef> but seems brittle\nexport function isEventSource(ref: React.RefObject<any>, event: Event) {\n if (\n ref?.current &&\n event &&\n (event.target instanceof HTMLElement || event.target instanceof SVGElement)\n ) {\n return ref.current.contains(event.target)\n } else {\n return false\n }\n}\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport function useClickOutside({\n refs = [],\n onClickOutside,\n container,\n}: ClickOutsideConfig) {\n const handler = (event: MouseEvent) => {\n if (onClickOutside && !refs.find((ref) => isEventSource(ref, event))) {\n onClickOutside(event)\n }\n }\n\n const options = { capture: true }\n\n const containerDocument = container?.ownerDocument\n const scope = containerDocument?.defaultView || undefined\n\n useEventListener({ event: 'click', handler, options, scope: scope })\n\n useEventListener({ event: 'touchend', handler, options, scope: scope })\n}\n"],"mappings":"AAEA,SAASA,gBAAgB,QAAQ,iBAAiB;AAoBlD;AACA;AACA;AACA
|
|
1
|
+
{"version":3,"file":"ClickOutside.js","names":["useEventListener","isEventSource","ref","event","current","target","HTMLElement","SVGElement","contains","useClickOutside","_ref","_ref$refs","refs","onClickOutside","container","handler","find","options","capture","containerDocument","ownerDocument","scope","defaultView","undefined"],"sources":["../../src/_hooks/ClickOutside.ts"],"sourcesContent":["import type React from 'react'\nimport type { PortalProps } from '../Portal/Portal.types'\nimport { useEventListener } from './EventListener'\n\nexport interface ClickOutsideConfig extends Pick<PortalProps, 'container'> {\n /**\n * @since 10.19.0\n */\n onClickOutside: (event: MouseEvent) => void\n /**\n * @since 10.19.0\n */\n refs: Array<React.RefObject<HTMLElement>>\n}\n\nexport interface ClickOutsideProps extends ClickOutsideConfig {\n /**\n * @since 10.19.0\n */\n children: React.ReactElement\n}\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\n// To support MenuRef had to change to any. Could manually do <HTMLElement & MenuRef> but seems brittle\nexport function isEventSource(ref: React.RefObject<any>, event: Event) {\n if (\n ref?.current &&\n event &&\n (event.target instanceof HTMLElement || event.target instanceof SVGElement)\n ) {\n return ref.current.contains(event.target)\n } else {\n return false\n }\n}\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport function useClickOutside({\n refs = [],\n onClickOutside,\n container,\n}: ClickOutsideConfig) {\n const handler = (event: MouseEvent) => {\n if (onClickOutside && !refs.find((ref) => isEventSource(ref, event))) {\n onClickOutside(event)\n }\n }\n\n const options = { capture: true }\n\n const containerDocument = container?.ownerDocument\n const scope = containerDocument?.defaultView || undefined\n\n useEventListener({ event: 'click', handler, options, scope: scope })\n\n useEventListener({ event: 'touchend', handler, options, scope: scope })\n}\n"],"mappings":"AAEA,SAASA,gBAAgB,QAAQ,iBAAiB;AAoBlD;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,aAAaA,CAACC,GAAyB,EAAEC,KAAY,EAAE;EACrE,IACED,GAAG,aAAHA,GAAG,eAAHA,GAAG,CAAEE,OAAO,IACZD,KAAK,KACJA,KAAK,CAACE,MAAM,YAAYC,WAAW,IAAIH,KAAK,CAACE,MAAM,YAAYE,UAAU,CAAC,EAC3E;IACA,OAAOL,GAAG,CAACE,OAAO,CAACI,QAAQ,CAACL,KAAK,CAACE,MAAM,CAAC;EAC3C,CAAC,MAAM;IACL,OAAO,KAAK;EACd;AACF;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASI,eAAeA,CAAAC,IAAA,EAIR;EAAA,IAAAC,SAAA,GAAAD,IAAA,CAHrBE,IAAI;IAAJA,IAAI,GAAAD,SAAA,cAAG,EAAE,GAAAA,SAAA;IACTE,cAAc,GAAAH,IAAA,CAAdG,cAAc;IACdC,SAAS,GAAAJ,IAAA,CAATI,SAAS;EAET,IAAMC,OAAO,GAAG,SAAVA,OAAOA,CAAIZ,KAAiB,EAAK;IACrC,IAAIU,cAAc,IAAI,CAACD,IAAI,CAACI,IAAI,CAAC,UAACd,GAAG;MAAA,OAAKD,aAAa,CAACC,GAAG,EAAEC,KAAK,CAAC;IAAA,EAAC,EAAE;MACpEU,cAAc,CAACV,KAAK,CAAC;IACvB;EACF,CAAC;EAED,IAAMc,OAAO,GAAG;IAAEC,OAAO,EAAE;EAAK,CAAC;EAEjC,IAAMC,iBAAiB,GAAGL,SAAS,aAATA,SAAS,uBAATA,SAAS,CAAEM,aAAa;EAClD,IAAMC,KAAK,GAAG,CAAAF,iBAAiB,aAAjBA,iBAAiB,uBAAjBA,iBAAiB,CAAEG,WAAW,KAAIC,SAAS;EAEzDvB,gBAAgB,CAAC;IAAEG,KAAK,EAAE,OAAO;IAAEY,OAAO,EAAPA,OAAO;IAAEE,OAAO,EAAPA,OAAO;IAAEI,KAAK,EAAEA;EAAM,CAAC,CAAC;EAEpErB,gBAAgB,CAAC;IAAEG,KAAK,EAAE,UAAU;IAAEY,OAAO,EAAPA,OAAO;IAAEE,OAAO,EAAPA,OAAO;IAAEI,KAAK,EAAEA;EAAM,CAAC,CAAC;AACzE"}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
function _typeof(
|
|
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
2
|
var _process$env$TZ_LOG;
|
|
3
|
-
function _construct(
|
|
4
|
-
function
|
|
5
|
-
function
|
|
6
|
-
function _toConsumableArray(
|
|
3
|
+
function _construct(t, e, r) { if (_isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments); var o = [null]; o.push.apply(o, e); var p = new (t.bind.apply(t, o))(); return r && _setPrototypeOf(p, r.prototype), p; }
|
|
4
|
+
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
5
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
6
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
7
7
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
8
|
-
function _iterableToArray(
|
|
9
|
-
function _arrayWithoutHoles(
|
|
10
|
-
function ownKeys(
|
|
11
|
-
function _objectSpread(
|
|
12
|
-
function _defineProperty(
|
|
13
|
-
function _toPropertyKey(
|
|
14
|
-
function _toPrimitive(
|
|
15
|
-
function _slicedToArray(
|
|
8
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
9
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
10
|
+
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; }
|
|
11
|
+
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; }
|
|
12
|
+
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; }
|
|
13
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
14
|
+
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); }
|
|
15
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
16
16
|
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."); }
|
|
17
|
-
function _unsupportedIterableToArray(
|
|
18
|
-
function _arrayLikeToArray(
|
|
19
|
-
function _iterableToArrayLimit(
|
|
20
|
-
function _arrayWithHoles(
|
|
17
|
+
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; } }
|
|
18
|
+
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; }
|
|
19
|
+
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; } }
|
|
20
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
21
21
|
import { utcToZonedTime, zonedTimeToUtc } from 'date-fns-tz';
|
|
22
22
|
import * as React from 'react';
|
|
23
23
|
import { getPresetDateTimeOptions, intlDateTimeFormat } from '../../_utils/dateTime';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function _typeof(
|
|
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
2
|
import React from 'react';
|
|
3
3
|
import { useTimer } from './Timer';
|
|
4
4
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var _excluded = ["children"],
|
|
2
2
|
_excluded2 = ["children"];
|
|
3
|
-
function _objectWithoutProperties(
|
|
4
|
-
function _objectWithoutPropertiesLoose(
|
|
3
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
4
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { useDelayedCallback } from './DelayedCallback';
|
|
7
7
|
import { useTimer } from './Timer';
|
|
@@ -12,19 +12,24 @@ import { useTimer } from './Timer';
|
|
|
12
12
|
* @deprecatedSince 9
|
|
13
13
|
* @deprecated Never officially documented/supported
|
|
14
14
|
*/
|
|
15
|
+
|
|
15
16
|
/**
|
|
16
17
|
* @deprecatedSince 9
|
|
17
18
|
* @deprecated Never officially documented/supported
|
|
18
19
|
*/
|
|
20
|
+
|
|
19
21
|
/**
|
|
20
22
|
* @deprecatedSince 9
|
|
21
23
|
* @deprecated Never officially documented/supported
|
|
22
24
|
*/
|
|
25
|
+
|
|
23
26
|
/**
|
|
24
27
|
* @deprecatedSince 9
|
|
25
28
|
* @deprecated Never officially documented/supported
|
|
26
29
|
*/
|
|
30
|
+
|
|
27
31
|
/* HOOK */
|
|
32
|
+
|
|
28
33
|
/**
|
|
29
34
|
* @deprecatedSince 9
|
|
30
35
|
* @deprecated Never officially documented/supported
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DelayedToggle.js","names":["React","useDelayedCallback","useTimer","useDelayedToggle","_ref","_ref$beforeDisable","beforeDisable","_ref$beforeEnable","beforeEnable","_ref$disableDelay","disableDelay","_ref$enableDelay","enableDelay","_ref$isEnabled","isEnabled","onDisable","onEnable","_ref$timer","timer","handleEnable","useCallback","reset","handleCancel","cancel","enable","after","before","delay","disable","toggle","DelayedToggle","forwardRef","props","ref","children","config","_objectWithoutProperties","_excluded","element","cloneElement","noop","method","console","warn","concat","initDelayedToggle","DelayedToggleContext","createContext","DelayedToggleProvider","_ref2","_excluded2","createElement","Provider","value","useDelayedToggleContext","useContext"],"sources":["../../src/_hooks/DelayedToggle.tsx"],"sourcesContent":["import React from 'react'\nimport type { BeforeCallback } from './DelayedCallback'\nimport { useDelayedCallback } from './DelayedCallback'\nimport type { TimerApi } from './Timer'\nimport { useTimer } from './Timer'\n\n/* TYPES */\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport type Callback = () => void\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport interface DelayedToggleConfig {\n /**\n * @since 10.19.0\n */\n beforeDisable?: BeforeCallback\n /**\n * @since 10.19.0\n */\n beforeEnable?: BeforeCallback\n /**\n * @since 10.19.0\n */\n disableDelay?: number\n /**\n * @since 10.19.0\n */\n enableDelay?: number\n /**\n * @since 10.19.0\n */\n isEnabled?: boolean\n /**\n * @since 10.19.0\n */\n onDisable: Callback\n /**\n * @since 10.19.0\n */\n onEnable: Callback\n /**\n * @since 10.19.0\n */\n timer?: TimerApi\n}\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport interface DelayedToggleProps extends DelayedToggleConfig {\n /**\n * @since 10.19.0\n */\n children: React.ReactNode\n}\n\ninterface DelayedToggleRenderProps extends DelayedToggleConfig {\n /**\n * @since 10.19.0\n */\n children: React.ReactElement | ((props: Api) => React.ReactElement)\n}\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport interface Api {\n /**\n * @since 10.19.0\n */\n disable: (event: any) => any\n /**\n * @since 10.19.0\n */\n enable: (event: any) => any\n /**\n * @since 10.19.0\n */\n toggle: (event: any) => any\n}\n\n/* HOOK */\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport function useDelayedToggle({\n beforeDisable = () => true,\n beforeEnable = () => true,\n disableDelay = 0,\n enableDelay = 0,\n isEnabled = false,\n onDisable,\n onEnable,\n // eslint-disable-next-line react-hooks/rules-of-hooks\n timer = useTimer({}),\n}: DelayedToggleConfig): Api {\n const handleEnable = React.useCallback(() => {\n timer.reset()\n return true\n }, [timer])\n\n const handleCancel = React.useCallback(() => {\n timer.cancel()\n return false\n }, [timer])\n\n const enable = useDelayedCallback({\n after: onEnable,\n before: isEnabled ? handleEnable : beforeEnable,\n delay: enableDelay,\n timer,\n })\n\n const disable = useDelayedCallback({\n after: onDisable,\n before: isEnabled ? beforeDisable : handleCancel,\n delay: disableDelay,\n timer,\n })\n\n return {\n disable,\n enable,\n toggle: isEnabled ? disable : enable,\n }\n}\n\n/* RENDER PROP */\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport const DelayedToggle = React.forwardRef<\n HTMLElement,\n DelayedToggleRenderProps\n>(function DelayedToggle(props, ref) {\n const { children, ...config } = props\n\n const toggle = useDelayedToggle(config)\n\n const element =\n typeof children === 'function'\n ? (children as (props: Api) => React.ReactElement)(toggle)\n : (children as React.ReactElement)\n\n return element && React.cloneElement(element, { ref })\n})\n\n/* CONTEXT */\n\nconst noop: (method: string) => (event?: any) => any = (method) => () =>\n console.warn(\n `Could not call \\`${method}\\`, please wrap your component in an \\`<DelayedToggleProvider>\\``\n )\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport const initDelayedToggle: Api = {\n disable: noop('disable'),\n enable: noop('enable'),\n toggle: noop('toggle'),\n}\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport const DelayedToggleContext = React.createContext<Api>(initDelayedToggle)\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport function DelayedToggleProvider({\n children,\n ...props\n}: DelayedToggleProps) {\n return (\n <DelayedToggleContext.Provider value={useDelayedToggle(props)}>\n {children}\n </DelayedToggleContext.Provider>\n )\n}\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport function useDelayedToggleContext() {\n return React.useContext(DelayedToggleContext)\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,kBAAkB,QAAQ,mBAAmB;AAEtD,SAASC,QAAQ,QAAQ,SAAS;;AAElC;;AAEA;AACA;AACA;AACA
|
|
1
|
+
{"version":3,"file":"DelayedToggle.js","names":["React","useDelayedCallback","useTimer","useDelayedToggle","_ref","_ref$beforeDisable","beforeDisable","_ref$beforeEnable","beforeEnable","_ref$disableDelay","disableDelay","_ref$enableDelay","enableDelay","_ref$isEnabled","isEnabled","onDisable","onEnable","_ref$timer","timer","handleEnable","useCallback","reset","handleCancel","cancel","enable","after","before","delay","disable","toggle","DelayedToggle","forwardRef","props","ref","children","config","_objectWithoutProperties","_excluded","element","cloneElement","noop","method","console","warn","concat","initDelayedToggle","DelayedToggleContext","createContext","DelayedToggleProvider","_ref2","_excluded2","createElement","Provider","value","useDelayedToggleContext","useContext"],"sources":["../../src/_hooks/DelayedToggle.tsx"],"sourcesContent":["import React from 'react'\nimport type { BeforeCallback } from './DelayedCallback'\nimport { useDelayedCallback } from './DelayedCallback'\nimport type { TimerApi } from './Timer'\nimport { useTimer } from './Timer'\n\n/* TYPES */\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport type Callback = () => void\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport interface DelayedToggleConfig {\n /**\n * @since 10.19.0\n */\n beforeDisable?: BeforeCallback\n /**\n * @since 10.19.0\n */\n beforeEnable?: BeforeCallback\n /**\n * @since 10.19.0\n */\n disableDelay?: number\n /**\n * @since 10.19.0\n */\n enableDelay?: number\n /**\n * @since 10.19.0\n */\n isEnabled?: boolean\n /**\n * @since 10.19.0\n */\n onDisable: Callback\n /**\n * @since 10.19.0\n */\n onEnable: Callback\n /**\n * @since 10.19.0\n */\n timer?: TimerApi\n}\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport interface DelayedToggleProps extends DelayedToggleConfig {\n /**\n * @since 10.19.0\n */\n children: React.ReactNode\n}\n\ninterface DelayedToggleRenderProps extends DelayedToggleConfig {\n /**\n * @since 10.19.0\n */\n children: React.ReactElement | ((props: Api) => React.ReactElement)\n}\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport interface Api {\n /**\n * @since 10.19.0\n */\n disable: (event: any) => any\n /**\n * @since 10.19.0\n */\n enable: (event: any) => any\n /**\n * @since 10.19.0\n */\n toggle: (event: any) => any\n}\n\n/* HOOK */\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport function useDelayedToggle({\n beforeDisable = () => true,\n beforeEnable = () => true,\n disableDelay = 0,\n enableDelay = 0,\n isEnabled = false,\n onDisable,\n onEnable,\n // eslint-disable-next-line react-hooks/rules-of-hooks\n timer = useTimer({}),\n}: DelayedToggleConfig): Api {\n const handleEnable = React.useCallback(() => {\n timer.reset()\n return true\n }, [timer])\n\n const handleCancel = React.useCallback(() => {\n timer.cancel()\n return false\n }, [timer])\n\n const enable = useDelayedCallback({\n after: onEnable,\n before: isEnabled ? handleEnable : beforeEnable,\n delay: enableDelay,\n timer,\n })\n\n const disable = useDelayedCallback({\n after: onDisable,\n before: isEnabled ? beforeDisable : handleCancel,\n delay: disableDelay,\n timer,\n })\n\n return {\n disable,\n enable,\n toggle: isEnabled ? disable : enable,\n }\n}\n\n/* RENDER PROP */\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport const DelayedToggle = React.forwardRef<\n HTMLElement,\n DelayedToggleRenderProps\n>(function DelayedToggle(props, ref) {\n const { children, ...config } = props\n\n const toggle = useDelayedToggle(config)\n\n const element =\n typeof children === 'function'\n ? (children as (props: Api) => React.ReactElement)(toggle)\n : (children as React.ReactElement)\n\n return element && React.cloneElement(element, { ref })\n})\n\n/* CONTEXT */\n\nconst noop: (method: string) => (event?: any) => any = (method) => () =>\n console.warn(\n `Could not call \\`${method}\\`, please wrap your component in an \\`<DelayedToggleProvider>\\``\n )\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport const initDelayedToggle: Api = {\n disable: noop('disable'),\n enable: noop('enable'),\n toggle: noop('toggle'),\n}\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport const DelayedToggleContext = React.createContext<Api>(initDelayedToggle)\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport function DelayedToggleProvider({\n children,\n ...props\n}: DelayedToggleProps) {\n return (\n <DelayedToggleContext.Provider value={useDelayedToggle(props)}>\n {children}\n </DelayedToggleContext.Provider>\n )\n}\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport function useDelayedToggleContext() {\n return React.useContext(DelayedToggleContext)\n}\n"],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Deprecation.js","names":["React","useDeprecation","config","oldThing","newThing","link","when","useLayoutEffect","indexOf","process","env","NODE_ENV","notice","concat","recommendation","console","warn"],"sources":["../../src/_hooks/Deprecation.tsx"],"sourcesContent":["import React from 'react'\n\ninterface Config {\n /**\n * @since 10.19.0\n */\n when?: any\n /**\n * @since 10.19.0\n */\n oldThing: string\n /**\n * @since 10.19.0\n */\n newThing?: string\n /**\n * @since 10.19.0\n */\n link?: string\n}\n\n/* HOOK */\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport function useDeprecation(config: Config) {\n const { oldThing, newThing, link } = config\n let when = 'when' in config ? typeof config.when !== 'undefined' : true\n\n React.useLayoutEffect(() => {\n if (\n when &&\n ['test', 'development'].indexOf(process.env.NODE_ENV || '') >= 0\n ) {\n const notice = `${oldThing} is deprecated`\n const recommendation = newThing ? `, please use ${newThing}` : ''\n\n console.warn(`${notice}${recommendation}`, link ?? '')\n }\n }, [when, newThing, oldThing, link])\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAqBzB
|
|
1
|
+
{"version":3,"file":"Deprecation.js","names":["React","useDeprecation","config","oldThing","newThing","link","when","useLayoutEffect","indexOf","process","env","NODE_ENV","notice","concat","recommendation","console","warn"],"sources":["../../src/_hooks/Deprecation.tsx"],"sourcesContent":["import React from 'react'\n\ninterface Config {\n /**\n * @since 10.19.0\n */\n when?: any\n /**\n * @since 10.19.0\n */\n oldThing: string\n /**\n * @since 10.19.0\n */\n newThing?: string\n /**\n * @since 10.19.0\n */\n link?: string\n}\n\n/* HOOK */\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport function useDeprecation(config: Config) {\n const { oldThing, newThing, link } = config\n let when = 'when' in config ? typeof config.when !== 'undefined' : true\n\n React.useLayoutEffect(() => {\n if (\n when &&\n ['test', 'development'].indexOf(process.env.NODE_ENV || '') >= 0\n ) {\n const notice = `${oldThing} is deprecated`\n const recommendation = newThing ? `, please use ${newThing}` : ''\n\n console.warn(`${notice}${recommendation}`, link ?? '')\n }\n }, [when, newThing, oldThing, link])\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAqBzB;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASC,cAAcA,CAACC,MAAc,EAAE;EAC7C,IAAQC,QAAQ,GAAqBD,MAAM,CAAnCC,QAAQ;IAAEC,QAAQ,GAAWF,MAAM,CAAzBE,QAAQ;IAAEC,IAAI,GAAKH,MAAM,CAAfG,IAAI;EAChC,IAAIC,IAAI,GAAG,MAAM,IAAIJ,MAAM,GAAG,OAAOA,MAAM,CAACI,IAAI,KAAK,WAAW,GAAG,IAAI;EAEvEN,KAAK,CAACO,eAAe,CAAC,YAAM;IAC1B,IACED,IAAI,IACJ,CAAC,MAAM,EAAE,aAAa,CAAC,CAACE,OAAO,CAACC,OAAO,CAACC,GAAG,CAACC,QAAQ,IAAI,EAAE,CAAC,IAAI,CAAC,EAChE;MACA,IAAMC,MAAM,MAAAC,MAAA,CAAMV,QAAQ,mBAAgB;MAC1C,IAAMW,cAAc,GAAGV,QAAQ,mBAAAS,MAAA,CAAmBT,QAAQ,IAAK,EAAE;MAEjEW,OAAO,CAACC,IAAI,IAAAH,MAAA,CAAID,MAAM,EAAAC,MAAA,CAAGC,cAAc,GAAIT,IAAI,aAAJA,IAAI,cAAJA,IAAI,GAAI,EAAE,CAAC;IACxD;EACF,CAAC,EAAE,CAACC,IAAI,EAAEF,QAAQ,EAAED,QAAQ,EAAEE,IAAI,CAAC,CAAC;AACtC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
function _toConsumableArray(
|
|
1
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
2
2
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
-
function _unsupportedIterableToArray(
|
|
4
|
-
function _iterableToArray(
|
|
5
|
-
function _arrayWithoutHoles(
|
|
6
|
-
function _arrayLikeToArray(
|
|
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 _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
5
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
6
|
+
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; }
|
|
7
7
|
import React from 'react';
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
2
|
-
function _slicedToArray(
|
|
1
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
2
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
3
3
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
|
-
function _unsupportedIterableToArray(
|
|
5
|
-
function _arrayLikeToArray(
|
|
6
|
-
function _iterableToArrayLimit(
|
|
7
|
-
function _arrayWithHoles(
|
|
4
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
5
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
6
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
7
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
8
8
|
import { FocusScope } from '@react-aria/focus';
|
|
9
9
|
import React, { useMemo } from 'react';
|
|
10
10
|
|
package/dist/_hooks/Hotkey.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _excluded = ["scope"];
|
|
2
|
-
function _objectWithoutProperties(
|
|
3
|
-
function _objectWithoutPropertiesLoose(
|
|
2
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
3
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
4
4
|
import { useEventListener } from './EventListener';
|
|
5
5
|
function bindHotkeys(_ref) {
|
|
6
6
|
var _ref$dependencies = _ref.dependencies,
|
package/dist/_hooks/I18n.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
var _excluded = ["children"];
|
|
2
|
-
function _typeof(
|
|
3
|
-
function _objectWithoutProperties(
|
|
4
|
-
function _objectWithoutPropertiesLoose(
|
|
5
|
-
function _toConsumableArray(
|
|
2
|
+
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); }
|
|
3
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
4
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
5
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
6
6
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
7
|
-
function _unsupportedIterableToArray(
|
|
8
|
-
function _iterableToArray(
|
|
9
|
-
function _arrayWithoutHoles(
|
|
10
|
-
function _arrayLikeToArray(
|
|
11
|
-
function ownKeys(
|
|
12
|
-
function _objectSpread(
|
|
13
|
-
function _defineProperty(
|
|
14
|
-
function _toPropertyKey(
|
|
15
|
-
function _toPrimitive(
|
|
7
|
+
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; } }
|
|
8
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
9
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
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 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; }
|
|
12
|
+
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; }
|
|
13
|
+
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; }
|
|
14
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
15
|
+
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); }
|
|
16
16
|
import { createI18njs } from '@procore/core-i18n-js';
|
|
17
17
|
import * as R from 'ramda';
|
|
18
18
|
import React from 'react';
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
var _excluded = ["children"];
|
|
2
|
-
function _objectWithoutProperties(
|
|
3
|
-
function _objectWithoutPropertiesLoose(
|
|
4
|
-
function _slicedToArray(
|
|
2
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
3
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
4
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
5
5
|
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."); }
|
|
6
|
-
function _unsupportedIterableToArray(
|
|
7
|
-
function _arrayLikeToArray(
|
|
8
|
-
function _iterableToArrayLimit(
|
|
9
|
-
function _arrayWithHoles(
|
|
6
|
+
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; } }
|
|
7
|
+
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; }
|
|
8
|
+
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; } }
|
|
9
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
10
10
|
import React from 'react';
|
|
11
11
|
|
|
12
12
|
/* TYPES */
|
|
13
13
|
|
|
14
14
|
/* HOOK */
|
|
15
|
+
|
|
15
16
|
/**
|
|
16
17
|
* @deprecatedSince 11
|
|
17
18
|
* @deprecated Not a concern of the Design System. See source to duplicate https://github.com/procore/core/blob/%40procore/core-react%4010.30.0/packages/core-react/src/state/InjectedScript.tsx#L25
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InjectedScript.js","names":["React","useInjectedScript","_ref","id","src","_React$useState","useState","_React$useState2","_slicedToArray","isLoaded","setLoaded","useEffect","existingScript","document","getElementById","script","createElement","type","async","onload","head","appendChild","InjectedScript","_ref2","_ref2$children","children","props","_objectWithoutProperties","_excluded","injectedScript"],"sources":["../../src/_hooks/InjectedScript.tsx"],"sourcesContent":["import React from 'react'\n\n/* TYPES */\n\ninterface InjectedScriptConfig {\n id: string\n src: string\n}\n\ninterface InjectedScriptApi {\n isLoaded: boolean\n setLoaded: (isLoaded: boolean) => void\n}\n\ninterface Props extends InjectedScriptConfig {\n children?: React.ReactNode\n}\n\ninterface RenderProps extends InjectedScriptConfig {\n children?: ((props: InjectedScriptApi) => React.ReactNode) | null\n}\n\n/* HOOK */\n\n/**\n * @deprecatedSince 11\n * @deprecated Not a concern of the Design System. See source to duplicate https://github.com/procore/core/blob/%40procore/core-react%4010.30.0/packages/core-react/src/state/InjectedScript.tsx#L25\n */\nexport function useInjectedScript({ id, src }: InjectedScriptConfig) {\n const [isLoaded, setLoaded] = React.useState(false)\n\n React.useEffect(() => {\n const existingScript = document.getElementById(id)\n\n if (existingScript) {\n setLoaded(true)\n } else {\n const script = document.createElement('script')\n script.type = 'text/javascript'\n script.async = true\n script.id = id\n script.onload = () => {\n setLoaded(true)\n }\n script.src = src\n\n document.head && document.head.appendChild(script)\n }\n }, [id, src])\n\n return { isLoaded, setLoaded }\n}\n\n/* RENDER PROP */\n/**\n * @deprecatedSince 11\n * @deprecated Not a concern of the Design System. See source to duplicate https://github.com/procore/core/blob/%40procore/core-react%4010.30.0/packages/core-react/src/state/InjectedScript.tsx#L25\n */\nexport function InjectedScript({ children = null, ...props }: RenderProps) {\n const injectedScript = useInjectedScript(props)\n\n return typeof children === 'function' ? children(injectedScript) : children\n}\n"],"mappings":";;;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;;AAEzB;;AAoBA
|
|
1
|
+
{"version":3,"file":"InjectedScript.js","names":["React","useInjectedScript","_ref","id","src","_React$useState","useState","_React$useState2","_slicedToArray","isLoaded","setLoaded","useEffect","existingScript","document","getElementById","script","createElement","type","async","onload","head","appendChild","InjectedScript","_ref2","_ref2$children","children","props","_objectWithoutProperties","_excluded","injectedScript"],"sources":["../../src/_hooks/InjectedScript.tsx"],"sourcesContent":["import React from 'react'\n\n/* TYPES */\n\ninterface InjectedScriptConfig {\n id: string\n src: string\n}\n\ninterface InjectedScriptApi {\n isLoaded: boolean\n setLoaded: (isLoaded: boolean) => void\n}\n\ninterface Props extends InjectedScriptConfig {\n children?: React.ReactNode\n}\n\ninterface RenderProps extends InjectedScriptConfig {\n children?: ((props: InjectedScriptApi) => React.ReactNode) | null\n}\n\n/* HOOK */\n\n/**\n * @deprecatedSince 11\n * @deprecated Not a concern of the Design System. See source to duplicate https://github.com/procore/core/blob/%40procore/core-react%4010.30.0/packages/core-react/src/state/InjectedScript.tsx#L25\n */\nexport function useInjectedScript({ id, src }: InjectedScriptConfig) {\n const [isLoaded, setLoaded] = React.useState(false)\n\n React.useEffect(() => {\n const existingScript = document.getElementById(id)\n\n if (existingScript) {\n setLoaded(true)\n } else {\n const script = document.createElement('script')\n script.type = 'text/javascript'\n script.async = true\n script.id = id\n script.onload = () => {\n setLoaded(true)\n }\n script.src = src\n\n document.head && document.head.appendChild(script)\n }\n }, [id, src])\n\n return { isLoaded, setLoaded }\n}\n\n/* RENDER PROP */\n/**\n * @deprecatedSince 11\n * @deprecated Not a concern of the Design System. See source to duplicate https://github.com/procore/core/blob/%40procore/core-react%4010.30.0/packages/core-react/src/state/InjectedScript.tsx#L25\n */\nexport function InjectedScript({ children = null, ...props }: RenderProps) {\n const injectedScript = useInjectedScript(props)\n\n return typeof children === 'function' ? children(injectedScript) : children\n}\n"],"mappings":";;;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;;AAEzB;;AAoBA;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASC,iBAAiBA,CAAAC,IAAA,EAAoC;EAAA,IAAjCC,EAAE,GAAAD,IAAA,CAAFC,EAAE;IAAEC,GAAG,GAAAF,IAAA,CAAHE,GAAG;EACzC,IAAAC,eAAA,GAA8BL,KAAK,CAACM,QAAQ,CAAC,KAAK,CAAC;IAAAC,gBAAA,GAAAC,cAAA,CAAAH,eAAA;IAA5CI,QAAQ,GAAAF,gBAAA;IAAEG,SAAS,GAAAH,gBAAA;EAE1BP,KAAK,CAACW,SAAS,CAAC,YAAM;IACpB,IAAMC,cAAc,GAAGC,QAAQ,CAACC,cAAc,CAACX,EAAE,CAAC;IAElD,IAAIS,cAAc,EAAE;MAClBF,SAAS,CAAC,IAAI,CAAC;IACjB,CAAC,MAAM;MACL,IAAMK,MAAM,GAAGF,QAAQ,CAACG,aAAa,CAAC,QAAQ,CAAC;MAC/CD,MAAM,CAACE,IAAI,GAAG,iBAAiB;MAC/BF,MAAM,CAACG,KAAK,GAAG,IAAI;MACnBH,MAAM,CAACZ,EAAE,GAAGA,EAAE;MACdY,MAAM,CAACI,MAAM,GAAG,YAAM;QACpBT,SAAS,CAAC,IAAI,CAAC;MACjB,CAAC;MACDK,MAAM,CAACX,GAAG,GAAGA,GAAG;MAEhBS,QAAQ,CAACO,IAAI,IAAIP,QAAQ,CAACO,IAAI,CAACC,WAAW,CAACN,MAAM,CAAC;IACpD;EACF,CAAC,EAAE,CAACZ,EAAE,EAAEC,GAAG,CAAC,CAAC;EAEb,OAAO;IAAEK,QAAQ,EAARA,QAAQ;IAAEC,SAAS,EAATA;EAAU,CAAC;AAChC;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASY,cAAcA,CAAAC,KAAA,EAA6C;EAAA,IAAAC,cAAA,GAAAD,KAAA,CAA1CE,QAAQ;IAARA,QAAQ,GAAAD,cAAA,cAAG,IAAI,GAAAA,cAAA;IAAKE,KAAK,GAAAC,wBAAA,CAAAJ,KAAA,EAAAK,SAAA;EACxD,IAAMC,cAAc,GAAG5B,iBAAiB,CAACyB,KAAK,CAAC;EAE/C,OAAO,OAAOD,QAAQ,KAAK,UAAU,GAAGA,QAAQ,CAACI,cAAc,CAAC,GAAGJ,QAAQ;AAC7E"}
|