@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
|
@@ -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 { createIntersectionObserver } from './createIntersectionObserver';
|
|
9
9
|
export function useIntersectionObserver(callback) {
|
|
@@ -1,12 +1,12 @@
|
|
|
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 */
|
|
@@ -15,10 +15,12 @@ import React from 'react';
|
|
|
15
15
|
* @deprecatedSince 9
|
|
16
16
|
* @deprecated Never officially documented/supported
|
|
17
17
|
*/
|
|
18
|
+
|
|
18
19
|
/**
|
|
19
20
|
* @deprecatedSince 9
|
|
20
21
|
* @deprecated Never officially documented/supported
|
|
21
22
|
*/
|
|
23
|
+
|
|
22
24
|
function clamp(max, n) {
|
|
23
25
|
return Math.min(max - 1, Math.max(0, n));
|
|
24
26
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListNavigation.js","names":["React","clamp","max","n","Math","min","wrap","useListNavigation","_ref","_ref$circular","circular","_ref$initialIndex","initialIndex","_ref$size","size","initialSize","_React$useState","useState","_React$useState2","_slicedToArray","index","setIndex","_React$useState3","_React$useState4","setSize","set","useCallback","i","clear","increment","incrementBy","amount","decrement","decrementBy","reset","ListNavigation","_ref2","children","props","_objectWithoutProperties","_excluded","listNavigation"],"sources":["../../src/_hooks/ListNavigation.tsx"],"sourcesContent":["import React from 'react'\n\n/* TYPES */\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport interface ListNavigationConfig {\n circular?: boolean\n initialIndex?: number\n size?: number\n}\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport interface ListNavigationApi {\n clear: () => void\n decrement: () => void\n decrementBy: (amount: number) => void\n increment: () => void\n incrementBy: (amount: number) => void\n index: number\n reset: () => void\n set: (index: number) => void\n setSize: (index: number) => void\n size: number\n}\n\ninterface Props extends ListNavigationConfig {\n children?: React.ReactNode\n}\n\ninterface RenderProps extends ListNavigationConfig {\n children: (props: ListNavigationApi) => {}\n}\n\nfunction clamp(max: number, n: number) {\n return Math.min(max - 1, Math.max(0, n))\n}\n\nfunction wrap(max: number, n: number) {\n if (max === 0) {\n return n\n }\n\n return n < 0 ? max + n : n % max\n}\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport function useListNavigation({\n circular = false,\n initialIndex = 0,\n size: initialSize = 0,\n}: ListNavigationConfig): ListNavigationApi {\n const [index, setIndex] = React.useState(initialIndex)\n\n const [size, setSize] = React.useState(initialSize)\n\n const set = React.useCallback(\n function (i: number) {\n if (size === 0) {\n setIndex(i)\n } else {\n setIndex(clamp(size, circular ? wrap(size, i) : i))\n }\n },\n [circular, size]\n )\n\n function clear() {\n set(0)\n }\n\n function increment() {\n set(index + 1)\n }\n\n function incrementBy(amount: number) {\n set(index + amount)\n }\n\n function decrement() {\n set(index - 1)\n }\n\n function decrementBy(amount: number) {\n set(index - amount)\n }\n\n function reset() {\n set(initialIndex)\n }\n\n return {\n clear,\n decrement,\n decrementBy,\n increment,\n incrementBy,\n index,\n reset,\n set,\n setSize,\n size,\n }\n}\n\n/* RENDER PROP */\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport function ListNavigation({ children, ...props }: RenderProps) {\n const listNavigation = useListNavigation(props)\n\n return typeof children === 'function' ? children(listNavigation) : children\n}\n"],"mappings":";;;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;;AAEzB;;AAEA;AACA;AACA;AACA
|
|
1
|
+
{"version":3,"file":"ListNavigation.js","names":["React","clamp","max","n","Math","min","wrap","useListNavigation","_ref","_ref$circular","circular","_ref$initialIndex","initialIndex","_ref$size","size","initialSize","_React$useState","useState","_React$useState2","_slicedToArray","index","setIndex","_React$useState3","_React$useState4","setSize","set","useCallback","i","clear","increment","incrementBy","amount","decrement","decrementBy","reset","ListNavigation","_ref2","children","props","_objectWithoutProperties","_excluded","listNavigation"],"sources":["../../src/_hooks/ListNavigation.tsx"],"sourcesContent":["import React from 'react'\n\n/* TYPES */\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport interface ListNavigationConfig {\n circular?: boolean\n initialIndex?: number\n size?: number\n}\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport interface ListNavigationApi {\n clear: () => void\n decrement: () => void\n decrementBy: (amount: number) => void\n increment: () => void\n incrementBy: (amount: number) => void\n index: number\n reset: () => void\n set: (index: number) => void\n setSize: (index: number) => void\n size: number\n}\n\ninterface Props extends ListNavigationConfig {\n children?: React.ReactNode\n}\n\ninterface RenderProps extends ListNavigationConfig {\n children: (props: ListNavigationApi) => {}\n}\n\nfunction clamp(max: number, n: number) {\n return Math.min(max - 1, Math.max(0, n))\n}\n\nfunction wrap(max: number, n: number) {\n if (max === 0) {\n return n\n }\n\n return n < 0 ? max + n : n % max\n}\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport function useListNavigation({\n circular = false,\n initialIndex = 0,\n size: initialSize = 0,\n}: ListNavigationConfig): ListNavigationApi {\n const [index, setIndex] = React.useState(initialIndex)\n\n const [size, setSize] = React.useState(initialSize)\n\n const set = React.useCallback(\n function (i: number) {\n if (size === 0) {\n setIndex(i)\n } else {\n setIndex(clamp(size, circular ? wrap(size, i) : i))\n }\n },\n [circular, size]\n )\n\n function clear() {\n set(0)\n }\n\n function increment() {\n set(index + 1)\n }\n\n function incrementBy(amount: number) {\n set(index + amount)\n }\n\n function decrement() {\n set(index - 1)\n }\n\n function decrementBy(amount: number) {\n set(index - amount)\n }\n\n function reset() {\n set(initialIndex)\n }\n\n return {\n clear,\n decrement,\n decrementBy,\n increment,\n incrementBy,\n index,\n reset,\n set,\n setSize,\n size,\n }\n}\n\n/* RENDER PROP */\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport function ListNavigation({ children, ...props }: RenderProps) {\n const listNavigation = useListNavigation(props)\n\n return typeof children === 'function' ? children(listNavigation) : children\n}\n"],"mappings":";;;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;;AAEzB;;AAEA;AACA;AACA;AACA;;AAOA;AACA;AACA;AACA;;AAsBA,SAASC,KAAKA,CAACC,GAAW,EAAEC,CAAS,EAAE;EACrC,OAAOC,IAAI,CAACC,GAAG,CAACH,GAAG,GAAG,CAAC,EAAEE,IAAI,CAACF,GAAG,CAAC,CAAC,EAAEC,CAAC,CAAC,CAAC;AAC1C;AAEA,SAASG,IAAIA,CAACJ,GAAW,EAAEC,CAAS,EAAE;EACpC,IAAID,GAAG,KAAK,CAAC,EAAE;IACb,OAAOC,CAAC;EACV;EAEA,OAAOA,CAAC,GAAG,CAAC,GAAGD,GAAG,GAAGC,CAAC,GAAGA,CAAC,GAAGD,GAAG;AAClC;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASK,iBAAiBA,CAAAC,IAAA,EAIW;EAAA,IAAAC,aAAA,GAAAD,IAAA,CAH1CE,QAAQ;IAARA,QAAQ,GAAAD,aAAA,cAAG,KAAK,GAAAA,aAAA;IAAAE,iBAAA,GAAAH,IAAA,CAChBI,YAAY;IAAZA,YAAY,GAAAD,iBAAA,cAAG,CAAC,GAAAA,iBAAA;IAAAE,SAAA,GAAAL,IAAA,CAChBM,IAAI;IAAEC,WAAW,GAAAF,SAAA,cAAG,CAAC,GAAAA,SAAA;EAErB,IAAAG,eAAA,GAA0BhB,KAAK,CAACiB,QAAQ,CAACL,YAAY,CAAC;IAAAM,gBAAA,GAAAC,cAAA,CAAAH,eAAA;IAA/CI,KAAK,GAAAF,gBAAA;IAAEG,QAAQ,GAAAH,gBAAA;EAEtB,IAAAI,gBAAA,GAAwBtB,KAAK,CAACiB,QAAQ,CAACF,WAAW,CAAC;IAAAQ,gBAAA,GAAAJ,cAAA,CAAAG,gBAAA;IAA5CR,IAAI,GAAAS,gBAAA;IAAEC,OAAO,GAAAD,gBAAA;EAEpB,IAAME,GAAG,GAAGzB,KAAK,CAAC0B,WAAW,CAC3B,UAAUC,CAAS,EAAE;IACnB,IAAIb,IAAI,KAAK,CAAC,EAAE;MACdO,QAAQ,CAACM,CAAC,CAAC;IACb,CAAC,MAAM;MACLN,QAAQ,CAACpB,KAAK,CAACa,IAAI,EAAEJ,QAAQ,GAAGJ,IAAI,CAACQ,IAAI,EAAEa,CAAC,CAAC,GAAGA,CAAC,CAAC,CAAC;IACrD;EACF,CAAC,EACD,CAACjB,QAAQ,EAAEI,IAAI,CACjB,CAAC;EAED,SAASc,KAAKA,CAAA,EAAG;IACfH,GAAG,CAAC,CAAC,CAAC;EACR;EAEA,SAASI,SAASA,CAAA,EAAG;IACnBJ,GAAG,CAACL,KAAK,GAAG,CAAC,CAAC;EAChB;EAEA,SAASU,WAAWA,CAACC,MAAc,EAAE;IACnCN,GAAG,CAACL,KAAK,GAAGW,MAAM,CAAC;EACrB;EAEA,SAASC,SAASA,CAAA,EAAG;IACnBP,GAAG,CAACL,KAAK,GAAG,CAAC,CAAC;EAChB;EAEA,SAASa,WAAWA,CAACF,MAAc,EAAE;IACnCN,GAAG,CAACL,KAAK,GAAGW,MAAM,CAAC;EACrB;EAEA,SAASG,KAAKA,CAAA,EAAG;IACfT,GAAG,CAACb,YAAY,CAAC;EACnB;EAEA,OAAO;IACLgB,KAAK,EAALA,KAAK;IACLI,SAAS,EAATA,SAAS;IACTC,WAAW,EAAXA,WAAW;IACXJ,SAAS,EAATA,SAAS;IACTC,WAAW,EAAXA,WAAW;IACXV,KAAK,EAALA,KAAK;IACLc,KAAK,EAALA,KAAK;IACLT,GAAG,EAAHA,GAAG;IACHD,OAAO,EAAPA,OAAO;IACPV,IAAI,EAAJA;EACF,CAAC;AACH;;AAEA;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASqB,cAAcA,CAAAC,KAAA,EAAsC;EAAA,IAAnCC,QAAQ,GAAAD,KAAA,CAARC,QAAQ;IAAKC,KAAK,GAAAC,wBAAA,CAAAH,KAAA,EAAAI,SAAA;EACjD,IAAMC,cAAc,GAAGlC,iBAAiB,CAAC+B,KAAK,CAAC;EAE/C,OAAO,OAAOD,QAAQ,KAAK,UAAU,GAAGA,QAAQ,CAACI,cAAc,CAAC,GAAGJ,QAAQ;AAC7E"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
function _typeof(
|
|
2
|
-
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 _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 React from 'react';
|
|
9
9
|
// Browsers occasionally miscalculate scroll and client width/height by one pixel up or down
|
|
10
10
|
// so we're use |x| > 1 instead of x > 0 assertion eliminating the issue at the cost of
|
|
@@ -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
|
export function useResizeObserver(callback) {
|
|
9
9
|
var _React$useState = React.useState(null),
|
package/dist/_hooks/TextEntry.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _excluded = ["children"];
|
|
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 { isEmpty } from 'ramda';
|
|
5
5
|
import { useBuffer } from './Buffer';
|
|
6
6
|
|
|
@@ -10,14 +10,17 @@ import { useBuffer } from './Buffer';
|
|
|
10
10
|
* @deprecatedSince 9
|
|
11
11
|
* @deprecated Never officially documented/supported
|
|
12
12
|
*/
|
|
13
|
+
|
|
13
14
|
/**
|
|
14
15
|
* @deprecatedSince 9
|
|
15
16
|
* @deprecated Never officially documented/supported
|
|
16
17
|
*/
|
|
18
|
+
|
|
17
19
|
/**
|
|
18
20
|
* @deprecatedSince 9
|
|
19
21
|
* @deprecated Never officially documented/supported
|
|
20
22
|
*/
|
|
23
|
+
|
|
21
24
|
/* HOOK */
|
|
22
25
|
/**
|
|
23
26
|
* @deprecatedSince 9.7.0
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextEntry.js","names":["isEmpty","useBuffer","useTextEntry","_ref","_ref$initialValue","initialValue","_ref$onChange","onChange","_useBuffer","value","update","clear","reset","target","empty","event","TextEntry","_ref2","children","props","_objectWithoutProperties","_excluded","textEntry"],"sources":["../../src/_hooks/TextEntry.tsx"],"sourcesContent":["import { isEmpty } from 'ramda'\nimport type React from 'react'\nimport { useBuffer } from './Buffer'\n\n/* TYPES */\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport type ChangeEvent = React.ChangeEvent<HTMLInputElement>\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport interface TextEntryConfig {\n initialValue?: string\n onChange: (event: ChangeEvent) => void\n}\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport interface TextEntryApi {\n clear: () => void\n empty: boolean\n onChange: (event: ChangeEvent) => void\n reset: () => void\n value: string\n}\n\ninterface Props extends TextEntryConfig {\n children?: React.ReactNode\n}\n\ninterface RenderProps extends TextEntryConfig {\n children: (props: TextEntryApi) => {}\n}\n\n/* HOOK */\n/**\n * @deprecatedSince 9.7.0\n * @deprecated A wrapper around useBuffer (deprecated) that would also call onChange. A trivial hook for storing a string. Write your own or use a hook utility lib.\n * \n * **Source:**\n * ```\nexport function useTextEntry({\n initialValue = '',\n onChange = () => {},\n}) {\n const { value, update, clear, reset } = useBuffer({ initialValue })\n\n return {\n clear: () => {\n onChange({ target: { value: '' } })\n clear()\n },\n empty: Ramda.isEmpty(value),\n onChange: (event) => {\n onChange(event)\n update(event.target.value)\n },\n reset: () => {\n onChange({ target: { value } })\n reset()\n },\n value,\n }\n}\n```\n */\nexport function useTextEntry({\n initialValue = '',\n onChange = () => {},\n}: TextEntryConfig) {\n const { value, update, clear, reset } = useBuffer({ initialValue })\n\n return {\n clear: () => {\n onChange({ target: { value: '' } } as ChangeEvent)\n clear()\n },\n empty: isEmpty(value),\n onChange: (event: ChangeEvent) => {\n onChange(event)\n update(event.target.value)\n },\n reset: () => {\n onChange({ target: { value } } as ChangeEvent)\n reset()\n },\n value,\n }\n}\n\n/* RENDER PROP */\n/**\n * @deprecatedSince 9.7.0\n * @deprecated\n */\nexport function TextEntry({ children, ...props }: RenderProps) {\n const textEntry = useTextEntry(props)\n\n return typeof children === 'function' ? children(textEntry) : children\n}\n"],"mappings":";;;AAAA,SAASA,OAAO,QAAQ,OAAO;AAE/B,SAASC,SAAS,QAAQ,UAAU;;AAEpC;;AAEA;AACA;AACA;AACA
|
|
1
|
+
{"version":3,"file":"TextEntry.js","names":["isEmpty","useBuffer","useTextEntry","_ref","_ref$initialValue","initialValue","_ref$onChange","onChange","_useBuffer","value","update","clear","reset","target","empty","event","TextEntry","_ref2","children","props","_objectWithoutProperties","_excluded","textEntry"],"sources":["../../src/_hooks/TextEntry.tsx"],"sourcesContent":["import { isEmpty } from 'ramda'\nimport type React from 'react'\nimport { useBuffer } from './Buffer'\n\n/* TYPES */\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport type ChangeEvent = React.ChangeEvent<HTMLInputElement>\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport interface TextEntryConfig {\n initialValue?: string\n onChange: (event: ChangeEvent) => void\n}\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport interface TextEntryApi {\n clear: () => void\n empty: boolean\n onChange: (event: ChangeEvent) => void\n reset: () => void\n value: string\n}\n\ninterface Props extends TextEntryConfig {\n children?: React.ReactNode\n}\n\ninterface RenderProps extends TextEntryConfig {\n children: (props: TextEntryApi) => {}\n}\n\n/* HOOK */\n/**\n * @deprecatedSince 9.7.0\n * @deprecated A wrapper around useBuffer (deprecated) that would also call onChange. A trivial hook for storing a string. Write your own or use a hook utility lib.\n * \n * **Source:**\n * ```\nexport function useTextEntry({\n initialValue = '',\n onChange = () => {},\n}) {\n const { value, update, clear, reset } = useBuffer({ initialValue })\n\n return {\n clear: () => {\n onChange({ target: { value: '' } })\n clear()\n },\n empty: Ramda.isEmpty(value),\n onChange: (event) => {\n onChange(event)\n update(event.target.value)\n },\n reset: () => {\n onChange({ target: { value } })\n reset()\n },\n value,\n }\n}\n```\n */\nexport function useTextEntry({\n initialValue = '',\n onChange = () => {},\n}: TextEntryConfig) {\n const { value, update, clear, reset } = useBuffer({ initialValue })\n\n return {\n clear: () => {\n onChange({ target: { value: '' } } as ChangeEvent)\n clear()\n },\n empty: isEmpty(value),\n onChange: (event: ChangeEvent) => {\n onChange(event)\n update(event.target.value)\n },\n reset: () => {\n onChange({ target: { value } } as ChangeEvent)\n reset()\n },\n value,\n }\n}\n\n/* RENDER PROP */\n/**\n * @deprecatedSince 9.7.0\n * @deprecated\n */\nexport function TextEntry({ children, ...props }: RenderProps) {\n const textEntry = useTextEntry(props)\n\n return typeof children === 'function' ? children(textEntry) : children\n}\n"],"mappings":";;;AAAA,SAASA,OAAO,QAAQ,OAAO;AAE/B,SAASC,SAAS,QAAQ,UAAU;;AAEpC;;AAEA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;;AAMA;AACA;AACA;AACA;;AAiBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,YAAYA,CAAAC,IAAA,EAGR;EAAA,IAAAC,iBAAA,GAAAD,IAAA,CAFlBE,YAAY;IAAZA,YAAY,GAAAD,iBAAA,cAAG,EAAE,GAAAA,iBAAA;IAAAE,aAAA,GAAAH,IAAA,CACjBI,QAAQ;IAARA,SAAQ,GAAAD,aAAA,cAAG,YAAM,CAAC,CAAC,GAAAA,aAAA;EAEnB,IAAAE,UAAA,GAAwCP,SAAS,CAAC;MAAEI,YAAY,EAAZA;IAAa,CAAC,CAAC;IAA3DI,KAAK,GAAAD,UAAA,CAALC,KAAK;IAAEC,MAAM,GAAAF,UAAA,CAANE,MAAM;IAAEC,MAAK,GAAAH,UAAA,CAALG,KAAK;IAAEC,MAAK,GAAAJ,UAAA,CAALI,KAAK;EAEnC,OAAO;IACLD,KAAK,EAAE,SAAAA,MAAA,EAAM;MACXJ,SAAQ,CAAC;QAAEM,MAAM,EAAE;UAAEJ,KAAK,EAAE;QAAG;MAAE,CAAgB,CAAC;MAClDE,MAAK,CAAC,CAAC;IACT,CAAC;IACDG,KAAK,EAAEd,OAAO,CAACS,KAAK,CAAC;IACrBF,QAAQ,EAAE,SAAAA,SAACQ,KAAkB,EAAK;MAChCR,SAAQ,CAACQ,KAAK,CAAC;MACfL,MAAM,CAACK,KAAK,CAACF,MAAM,CAACJ,KAAK,CAAC;IAC5B,CAAC;IACDG,KAAK,EAAE,SAAAA,MAAA,EAAM;MACXL,SAAQ,CAAC;QAAEM,MAAM,EAAE;UAAEJ,KAAK,EAALA;QAAM;MAAE,CAAgB,CAAC;MAC9CG,MAAK,CAAC,CAAC;IACT,CAAC;IACDH,KAAK,EAALA;EACF,CAAC;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASO,SAASA,CAAAC,KAAA,EAAsC;EAAA,IAAnCC,QAAQ,GAAAD,KAAA,CAARC,QAAQ;IAAKC,KAAK,GAAAC,wBAAA,CAAAH,KAAA,EAAAI,SAAA;EAC5C,IAAMC,SAAS,GAAGpB,YAAY,CAACiB,KAAK,CAAC;EAErC,OAAO,OAAOD,QAAQ,KAAK,UAAU,GAAGA,QAAQ,CAACI,SAAS,CAAC,GAAGJ,QAAQ;AACxE"}
|
package/dist/_hooks/Timer.js
CHANGED
package/dist/_hooks/Timer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Timer.js","names":["React","useTimer","config","timer","useRef","cancel","current","clearTimeout","reset","setTimer","callback","duration","window","setTimeout","timerId","Timer","_ref","children"],"sources":["../../src/_hooks/Timer.tsx"],"sourcesContent":["import React from 'react'\n\n/* TYPES */\n\ninterface TimerConfig {}\n\ninterface Props {\n children: React.ReactNode\n}\n\ntype TimerId = number | null\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport interface TimerApi {\n cancel: () => void\n reset: () => void\n setTimer: (callback: () => void, duration: number) => void\n timerId: TimerId\n}\n\n/* HOOK */\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport function useTimer(config: TimerConfig): TimerApi {\n const timer = React.useRef<TimerId>(null)\n\n return {\n cancel: () => {\n timer.current && clearTimeout(timer.current)\n },\n reset: () => {\n timer.current && clearTimeout(timer.current)\n },\n setTimer: (callback, duration) => {\n timer.current && clearTimeout(timer.current)\n timer.current = window.setTimeout(callback, duration)\n },\n timerId: timer.current,\n }\n}\n\n/* RENDER PROP */\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport function Timer({\n children,\n}: {\n children: (timer: TimerApi) => unknown\n}) {\n const timer = useTimer({})\n\n return typeof children === 'function' ? children(timer) : children\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;;AAEzB;;AAUA;AACA;AACA;AACA;;AAQA
|
|
1
|
+
{"version":3,"file":"Timer.js","names":["React","useTimer","config","timer","useRef","cancel","current","clearTimeout","reset","setTimer","callback","duration","window","setTimeout","timerId","Timer","_ref","children"],"sources":["../../src/_hooks/Timer.tsx"],"sourcesContent":["import React from 'react'\n\n/* TYPES */\n\ninterface TimerConfig {}\n\ninterface Props {\n children: React.ReactNode\n}\n\ntype TimerId = number | null\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport interface TimerApi {\n cancel: () => void\n reset: () => void\n setTimer: (callback: () => void, duration: number) => void\n timerId: TimerId\n}\n\n/* HOOK */\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport function useTimer(config: TimerConfig): TimerApi {\n const timer = React.useRef<TimerId>(null)\n\n return {\n cancel: () => {\n timer.current && clearTimeout(timer.current)\n },\n reset: () => {\n timer.current && clearTimeout(timer.current)\n },\n setTimer: (callback, duration) => {\n timer.current && clearTimeout(timer.current)\n timer.current = window.setTimeout(callback, duration)\n },\n timerId: timer.current,\n }\n}\n\n/* RENDER PROP */\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport function Timer({\n children,\n}: {\n children: (timer: TimerApi) => unknown\n}) {\n const timer = useTimer({})\n\n return typeof children === 'function' ? children(timer) : children\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;;AAEzB;;AAUA;AACA;AACA;AACA;;AAQA;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASC,QAAQA,CAACC,MAAmB,EAAY;EACtD,IAAMC,KAAK,GAAGH,KAAK,CAACI,MAAM,CAAU,IAAI,CAAC;EAEzC,OAAO;IACLC,MAAM,EAAE,SAAAA,OAAA,EAAM;MACZF,KAAK,CAACG,OAAO,IAAIC,YAAY,CAACJ,KAAK,CAACG,OAAO,CAAC;IAC9C,CAAC;IACDE,KAAK,EAAE,SAAAA,MAAA,EAAM;MACXL,KAAK,CAACG,OAAO,IAAIC,YAAY,CAACJ,KAAK,CAACG,OAAO,CAAC;IAC9C,CAAC;IACDG,QAAQ,EAAE,SAAAA,SAACC,QAAQ,EAAEC,QAAQ,EAAK;MAChCR,KAAK,CAACG,OAAO,IAAIC,YAAY,CAACJ,KAAK,CAACG,OAAO,CAAC;MAC5CH,KAAK,CAACG,OAAO,GAAGM,MAAM,CAACC,UAAU,CAACH,QAAQ,EAAEC,QAAQ,CAAC;IACvD,CAAC;IACDG,OAAO,EAAEX,KAAK,CAACG;EACjB,CAAC;AACH;;AAEA;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASS,KAAKA,CAAAC,IAAA,EAIlB;EAAA,IAHDC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;EAIR,IAAMd,KAAK,GAAGF,QAAQ,CAAC,CAAC,CAAC,CAAC;EAE1B,OAAO,OAAOgB,QAAQ,KAAK,UAAU,GAAGA,QAAQ,CAACd,KAAK,CAAC,GAAGc,QAAQ;AACpE"}
|
package/dist/_hooks/Trigger.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
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", "triggerRef"];
|
|
3
|
-
function ownKeys(
|
|
4
|
-
function _objectSpread(
|
|
5
|
-
function _defineProperty(
|
|
6
|
-
function _toPropertyKey(
|
|
7
|
-
function _toPrimitive(
|
|
8
|
-
function _objectWithoutProperties(
|
|
9
|
-
function _objectWithoutPropertiesLoose(
|
|
10
|
-
function _toConsumableArray(
|
|
3
|
+
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; }
|
|
4
|
+
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; }
|
|
5
|
+
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; }
|
|
6
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
7
|
+
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); }
|
|
8
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
9
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
10
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
11
11
|
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."); }
|
|
12
|
-
function _unsupportedIterableToArray(
|
|
13
|
-
function _iterableToArray(
|
|
14
|
-
function _arrayWithoutHoles(
|
|
15
|
-
function _arrayLikeToArray(
|
|
12
|
+
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; } }
|
|
13
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
14
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
15
|
+
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; }
|
|
16
16
|
import React from 'react';
|
|
17
17
|
import { triggerListeners } from '../_utils/triggerListeners';
|
|
18
18
|
import { useHotkey } from './Hotkey';
|
|
@@ -23,23 +23,29 @@ import { useHotkey } from './Hotkey';
|
|
|
23
23
|
* @deprecatedSince 9
|
|
24
24
|
* @deprecated Never officially documented/supported
|
|
25
25
|
*/
|
|
26
|
+
|
|
26
27
|
/**
|
|
27
28
|
* @deprecatedSince 9
|
|
28
29
|
* @deprecated Never officially documented/supported
|
|
29
30
|
*/
|
|
31
|
+
|
|
30
32
|
/**
|
|
31
33
|
* @deprecatedSince 9
|
|
32
34
|
* @deprecated Never officially documented/supported
|
|
33
35
|
*/
|
|
36
|
+
|
|
34
37
|
/**
|
|
35
38
|
* @deprecatedSince 9
|
|
36
39
|
* @deprecated Never officially documented/supported
|
|
37
40
|
*/
|
|
41
|
+
|
|
38
42
|
/**
|
|
39
43
|
* @deprecatedSince 9
|
|
40
44
|
* @deprecated Never officially documented/supported
|
|
41
45
|
*/
|
|
46
|
+
|
|
42
47
|
/* HOOK */
|
|
48
|
+
|
|
43
49
|
/**
|
|
44
50
|
* @deprecatedSince 9
|
|
45
51
|
* @deprecated Never officially documented/supported
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Trigger.js","names":["React","triggerListeners","useHotkey","useTrigger","_ref","disable","_ref$disableKeys","disableKeys","enable","_ref$enableKeys","enableKeys","_ref$isEnabled","isEnabled","_ref$trigger","trigger","triggerRef","off","on","scope","value","key","handler","preventDefault","event","concat","_toConsumableArray","isVisible","toggle","Trigger","_ref2","children","props","_objectWithoutProperties","_excluded","_objectSpread","element","cloneElement","open"],"sources":["../../src/_hooks/Trigger.tsx"],"sourcesContent":["import React from 'react'\nimport { triggerListeners } from '../_utils/triggerListeners'\nimport type { RenderProp } from '../_utils/types'\nimport { useHotkey } from './Hotkey'\n\n/* TYPES */\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport type TriggerVariant =\n | 'click'\n | 'hover'\n | 'none'\n | 'contextmenu'\n | 'focus'\n | 'always'\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport interface TriggerConfig {\n disable: React.EventHandler<any>\n disableKeys?: string[]\n enable: React.EventHandler<any>\n enableKeys?: string[]\n isEnabled?: boolean\n trigger?: TriggerVariant | TriggerVariant[]\n triggerRef: React.RefObject<HTMLElement>\n}\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport interface TriggerProps extends TriggerConfig {\n children: React.ReactNode\n}\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport interface TriggerRenderProps\n extends TriggerConfig,\n RenderProp<TriggerApi> {}\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport interface TriggerApi {\n disable: React.EventHandler<any>\n enable: React.EventHandler<any>\n isVisible: boolean\n toggle: React.EventHandler<any>\n}\n\n/* HOOK */\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport function useTrigger({\n disable,\n disableKeys = [],\n enable,\n enableKeys = [],\n isEnabled = false,\n trigger = 'click',\n triggerRef,\n}: TriggerConfig): TriggerApi {\n triggerListeners({\n off: disable,\n on: enable,\n scope: triggerRef,\n trigger,\n value: isEnabled,\n })\n\n useHotkey({\n key: enableKeys,\n handler: enable,\n preventDefault: true,\n scope: triggerRef,\n })\n\n useHotkey({\n key: disableKeys,\n handler: disable,\n preventDefault: true,\n scope: triggerRef,\n })\n\n // prevent keyup event from firing on FF\n useHotkey({\n event: 'keyup',\n key: [...enableKeys, ...disableKeys],\n handler: () => {},\n preventDefault: true,\n scope: triggerRef,\n })\n\n return {\n disable,\n enable,\n isVisible: isEnabled,\n toggle: isEnabled ? disable : enable,\n }\n}\n\n/* RENDER PROP */\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport function Trigger({\n children,\n triggerRef,\n ...props\n}: TriggerRenderProps) {\n const trigger = useTrigger({ ...props, triggerRef })\n\n const element =\n typeof children === 'function'\n ? (children as (props: TriggerApi) => React.ReactElement)(trigger)\n : (children as React.ReactElement)\n\n return React.cloneElement(element, {\n open: trigger.isVisible,\n })\n}\n"],"mappings":";;;;;;;;;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,gBAAgB,QAAQ,4BAA4B;AAE7D,SAASC,SAAS,QAAQ,UAAU;;AAEpC;;AAEA;AACA;AACA;AACA
|
|
1
|
+
{"version":3,"file":"Trigger.js","names":["React","triggerListeners","useHotkey","useTrigger","_ref","disable","_ref$disableKeys","disableKeys","enable","_ref$enableKeys","enableKeys","_ref$isEnabled","isEnabled","_ref$trigger","trigger","triggerRef","off","on","scope","value","key","handler","preventDefault","event","concat","_toConsumableArray","isVisible","toggle","Trigger","_ref2","children","props","_objectWithoutProperties","_excluded","_objectSpread","element","cloneElement","open"],"sources":["../../src/_hooks/Trigger.tsx"],"sourcesContent":["import React from 'react'\nimport { triggerListeners } from '../_utils/triggerListeners'\nimport type { RenderProp } from '../_utils/types'\nimport { useHotkey } from './Hotkey'\n\n/* TYPES */\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport type TriggerVariant =\n | 'click'\n | 'hover'\n | 'none'\n | 'contextmenu'\n | 'focus'\n | 'always'\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport interface TriggerConfig {\n disable: React.EventHandler<any>\n disableKeys?: string[]\n enable: React.EventHandler<any>\n enableKeys?: string[]\n isEnabled?: boolean\n trigger?: TriggerVariant | TriggerVariant[]\n triggerRef: React.RefObject<HTMLElement>\n}\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport interface TriggerProps extends TriggerConfig {\n children: React.ReactNode\n}\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport interface TriggerRenderProps\n extends TriggerConfig,\n RenderProp<TriggerApi> {}\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport interface TriggerApi {\n disable: React.EventHandler<any>\n enable: React.EventHandler<any>\n isVisible: boolean\n toggle: React.EventHandler<any>\n}\n\n/* HOOK */\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport function useTrigger({\n disable,\n disableKeys = [],\n enable,\n enableKeys = [],\n isEnabled = false,\n trigger = 'click',\n triggerRef,\n}: TriggerConfig): TriggerApi {\n triggerListeners({\n off: disable,\n on: enable,\n scope: triggerRef,\n trigger,\n value: isEnabled,\n })\n\n useHotkey({\n key: enableKeys,\n handler: enable,\n preventDefault: true,\n scope: triggerRef,\n })\n\n useHotkey({\n key: disableKeys,\n handler: disable,\n preventDefault: true,\n scope: triggerRef,\n })\n\n // prevent keyup event from firing on FF\n useHotkey({\n event: 'keyup',\n key: [...enableKeys, ...disableKeys],\n handler: () => {},\n preventDefault: true,\n scope: triggerRef,\n })\n\n return {\n disable,\n enable,\n isVisible: isEnabled,\n toggle: isEnabled ? disable : enable,\n }\n}\n\n/* RENDER PROP */\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport function Trigger({\n children,\n triggerRef,\n ...props\n}: TriggerRenderProps) {\n const trigger = useTrigger({ ...props, triggerRef })\n\n const element =\n typeof children === 'function'\n ? (children as (props: TriggerApi) => React.ReactElement)(trigger)\n : (children as React.ReactElement)\n\n return React.cloneElement(element, {\n open: trigger.isVisible,\n })\n}\n"],"mappings":";;;;;;;;;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,gBAAgB,QAAQ,4BAA4B;AAE7D,SAASC,SAAS,QAAQ,UAAU;;AAEpC;;AAEA;AACA;AACA;AACA;;AASA;AACA;AACA;AACA;;AAWA;AACA;AACA;AACA;;AAKA;AACA;AACA;AACA;;AAKA;AACA;AACA;AACA;;AAQA;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASC,UAAUA,CAAAC,IAAA,EAQI;EAAA,IAP5BC,OAAO,GAAAD,IAAA,CAAPC,OAAO;IAAAC,gBAAA,GAAAF,IAAA,CACPG,WAAW;IAAXA,WAAW,GAAAD,gBAAA,cAAG,EAAE,GAAAA,gBAAA;IAChBE,MAAM,GAAAJ,IAAA,CAANI,MAAM;IAAAC,eAAA,GAAAL,IAAA,CACNM,UAAU;IAAVA,UAAU,GAAAD,eAAA,cAAG,EAAE,GAAAA,eAAA;IAAAE,cAAA,GAAAP,IAAA,CACfQ,SAAS;IAATA,SAAS,GAAAD,cAAA,cAAG,KAAK,GAAAA,cAAA;IAAAE,YAAA,GAAAT,IAAA,CACjBU,OAAO;IAAPA,OAAO,GAAAD,YAAA,cAAG,OAAO,GAAAA,YAAA;IACjBE,UAAU,GAAAX,IAAA,CAAVW,UAAU;EAEVd,gBAAgB,CAAC;IACfe,GAAG,EAAEX,OAAO;IACZY,EAAE,EAAET,MAAM;IACVU,KAAK,EAAEH,UAAU;IACjBD,OAAO,EAAPA,OAAO;IACPK,KAAK,EAAEP;EACT,CAAC,CAAC;EAEFV,SAAS,CAAC;IACRkB,GAAG,EAAEV,UAAU;IACfW,OAAO,EAAEb,MAAM;IACfc,cAAc,EAAE,IAAI;IACpBJ,KAAK,EAAEH;EACT,CAAC,CAAC;EAEFb,SAAS,CAAC;IACRkB,GAAG,EAAEb,WAAW;IAChBc,OAAO,EAAEhB,OAAO;IAChBiB,cAAc,EAAE,IAAI;IACpBJ,KAAK,EAAEH;EACT,CAAC,CAAC;;EAEF;EACAb,SAAS,CAAC;IACRqB,KAAK,EAAE,OAAO;IACdH,GAAG,KAAAI,MAAA,CAAAC,kBAAA,CAAMf,UAAU,GAAAe,kBAAA,CAAKlB,WAAW,EAAC;IACpCc,OAAO,EAAE,SAAAA,QAAA,EAAM,CAAC,CAAC;IACjBC,cAAc,EAAE,IAAI;IACpBJ,KAAK,EAAEH;EACT,CAAC,CAAC;EAEF,OAAO;IACLV,OAAO,EAAPA,OAAO;IACPG,MAAM,EAANA,MAAM;IACNkB,SAAS,EAAEd,SAAS;IACpBe,MAAM,EAAEf,SAAS,GAAGP,OAAO,GAAGG;EAChC,CAAC;AACH;;AAEA;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASoB,OAAOA,CAAAC,KAAA,EAIA;EAAA,IAHrBC,QAAQ,GAAAD,KAAA,CAARC,QAAQ;IACRf,UAAU,GAAAc,KAAA,CAAVd,UAAU;IACPgB,KAAK,GAAAC,wBAAA,CAAAH,KAAA,EAAAI,SAAA;EAER,IAAMnB,OAAO,GAAGX,UAAU,CAAA+B,aAAA,CAAAA,aAAA,KAAMH,KAAK;IAAEhB,UAAU,EAAVA;EAAU,EAAE,CAAC;EAEpD,IAAMoB,OAAO,GACX,OAAOL,QAAQ,KAAK,UAAU,GACzBA,QAAQ,CAA+ChB,OAAO,CAAC,GAC/DgB,QAA+B;EAEtC,oBAAO9B,KAAK,CAACoC,YAAY,CAACD,OAAO,EAAE;IACjCE,IAAI,EAAEvB,OAAO,CAACY;EAChB,CAAC,CAAC;AACJ"}
|
|
@@ -1,12 +1,12 @@
|
|
|
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 */
|
|
@@ -15,10 +15,12 @@ import React from 'react';
|
|
|
15
15
|
* @deprecatedSince 9
|
|
16
16
|
* @deprecated Never officially documented/supported
|
|
17
17
|
*/
|
|
18
|
+
|
|
18
19
|
/**
|
|
19
20
|
* @deprecatedSince 9
|
|
20
21
|
* @deprecated Never officially documented/supported
|
|
21
22
|
*/
|
|
23
|
+
|
|
22
24
|
/* HOOK */
|
|
23
25
|
|
|
24
26
|
function noop() {}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Visibility.js","names":["React","noop","useVisibility","_ref","_ref$afterHide","afterHide","_ref$afterShow","afterShow","_ref$initialIsVisible","initialIsVisible","_React$useState","useState","_React$useState2","_slicedToArray","isVisible","setVisibility","hide","e","show","toggle","Visibility","_ref2","children","props","_objectWithoutProperties","_excluded","visibility"],"sources":["../../src/_hooks/Visibility.tsx"],"sourcesContent":["import React from 'react'\n\n/* TYPES */\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport interface VisibilityConfig {\n afterHide?: (e?: Event) => void\n afterShow?: () => void\n initialIsVisible?: boolean\n}\n\ninterface VisibilityApi {\n hide: (e?: Event) => any\n isVisible: boolean\n show: () => any\n toggle: () => any\n}\n\ninterface Props extends VisibilityConfig {\n children?: React.ReactNode\n}\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport interface RenderProps extends VisibilityConfig {\n children: (props: VisibilityApi) => React.ReactElement<{}>\n}\n\n/* HOOK */\n\nfunction noop() {}\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport function useVisibility({\n afterHide = noop,\n afterShow = noop,\n initialIsVisible = false,\n}: VisibilityConfig): VisibilityApi {\n const [isVisible, setVisibility] = React.useState(initialIsVisible)\n\n const hide = (e?: Event) => {\n setVisibility(false)\n\n if (isVisible) {\n afterHide(e)\n }\n }\n\n const show = () => {\n setVisibility(true)\n\n if (!isVisible) {\n afterShow()\n }\n }\n\n const toggle = isVisible ? hide : show\n\n return {\n hide,\n isVisible,\n show,\n toggle,\n }\n}\n\n/* RENDER PROP */\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport function Visibility({ children, ...props }: RenderProps) {\n const visibility = useVisibility(props)\n\n return typeof children === 'function' ? children(visibility) : children\n}\n"],"mappings":";;;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;;AAEzB;;AAEA;AACA;AACA;AACA
|
|
1
|
+
{"version":3,"file":"Visibility.js","names":["React","noop","useVisibility","_ref","_ref$afterHide","afterHide","_ref$afterShow","afterShow","_ref$initialIsVisible","initialIsVisible","_React$useState","useState","_React$useState2","_slicedToArray","isVisible","setVisibility","hide","e","show","toggle","Visibility","_ref2","children","props","_objectWithoutProperties","_excluded","visibility"],"sources":["../../src/_hooks/Visibility.tsx"],"sourcesContent":["import React from 'react'\n\n/* TYPES */\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport interface VisibilityConfig {\n afterHide?: (e?: Event) => void\n afterShow?: () => void\n initialIsVisible?: boolean\n}\n\ninterface VisibilityApi {\n hide: (e?: Event) => any\n isVisible: boolean\n show: () => any\n toggle: () => any\n}\n\ninterface Props extends VisibilityConfig {\n children?: React.ReactNode\n}\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport interface RenderProps extends VisibilityConfig {\n children: (props: VisibilityApi) => React.ReactElement<{}>\n}\n\n/* HOOK */\n\nfunction noop() {}\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport function useVisibility({\n afterHide = noop,\n afterShow = noop,\n initialIsVisible = false,\n}: VisibilityConfig): VisibilityApi {\n const [isVisible, setVisibility] = React.useState(initialIsVisible)\n\n const hide = (e?: Event) => {\n setVisibility(false)\n\n if (isVisible) {\n afterHide(e)\n }\n }\n\n const show = () => {\n setVisibility(true)\n\n if (!isVisible) {\n afterShow()\n }\n }\n\n const toggle = isVisible ? hide : show\n\n return {\n hide,\n isVisible,\n show,\n toggle,\n }\n}\n\n/* RENDER PROP */\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport function Visibility({ children, ...props }: RenderProps) {\n const visibility = useVisibility(props)\n\n return typeof children === 'function' ? children(visibility) : children\n}\n"],"mappings":";;;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;;AAEzB;;AAEA;AACA;AACA;AACA;;AAkBA;AACA;AACA;AACA;;AAKA;;AAEA,SAASC,IAAIA,CAAA,EAAG,CAAC;;AAEjB;AACA;AACA;AACA;AACA,OAAO,SAASC,aAAaA,CAAAC,IAAA,EAIO;EAAA,IAAAC,cAAA,GAAAD,IAAA,CAHlCE,SAAS;IAATA,SAAS,GAAAD,cAAA,cAAGH,IAAI,GAAAG,cAAA;IAAAE,cAAA,GAAAH,IAAA,CAChBI,SAAS;IAATA,SAAS,GAAAD,cAAA,cAAGL,IAAI,GAAAK,cAAA;IAAAE,qBAAA,GAAAL,IAAA,CAChBM,gBAAgB;IAAhBA,gBAAgB,GAAAD,qBAAA,cAAG,KAAK,GAAAA,qBAAA;EAExB,IAAAE,eAAA,GAAmCV,KAAK,CAACW,QAAQ,CAACF,gBAAgB,CAAC;IAAAG,gBAAA,GAAAC,cAAA,CAAAH,eAAA;IAA5DI,SAAS,GAAAF,gBAAA;IAAEG,aAAa,GAAAH,gBAAA;EAE/B,IAAMI,IAAI,GAAG,SAAPA,IAAIA,CAAIC,CAAS,EAAK;IAC1BF,aAAa,CAAC,KAAK,CAAC;IAEpB,IAAID,SAAS,EAAE;MACbT,SAAS,CAACY,CAAC,CAAC;IACd;EACF,CAAC;EAED,IAAMC,IAAI,GAAG,SAAPA,IAAIA,CAAA,EAAS;IACjBH,aAAa,CAAC,IAAI,CAAC;IAEnB,IAAI,CAACD,SAAS,EAAE;MACdP,SAAS,CAAC,CAAC;IACb;EACF,CAAC;EAED,IAAMY,MAAM,GAAGL,SAAS,GAAGE,IAAI,GAAGE,IAAI;EAEtC,OAAO;IACLF,IAAI,EAAJA,IAAI;IACJF,SAAS,EAATA,SAAS;IACTI,IAAI,EAAJA,IAAI;IACJC,MAAM,EAANA;EACF,CAAC;AACH;;AAEA;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASC,UAAUA,CAAAC,KAAA,EAAsC;EAAA,IAAnCC,QAAQ,GAAAD,KAAA,CAARC,QAAQ;IAAKC,KAAK,GAAAC,wBAAA,CAAAH,KAAA,EAAAI,SAAA;EAC7C,IAAMC,UAAU,GAAGxB,aAAa,CAACqB,KAAK,CAAC;EAEvC,OAAO,OAAOD,QAAQ,KAAK,UAAU,GAAGA,QAAQ,CAACI,UAAU,CAAC,GAAGJ,QAAQ;AACzE"}
|
package/dist/_hooks/ZIndex.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
var _excluded = ["children"],
|
|
2
2
|
_excluded2 = ["children"];
|
|
3
|
-
function _objectWithoutProperties(
|
|
4
|
-
function _objectWithoutPropertiesLoose(
|
|
5
|
-
function _slicedToArray(
|
|
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 _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
6
6
|
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."); }
|
|
7
|
-
function _unsupportedIterableToArray(
|
|
8
|
-
function _arrayLikeToArray(
|
|
9
|
-
function _iterableToArrayLimit(
|
|
10
|
-
function _arrayWithHoles(
|
|
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 _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; }
|
|
9
|
+
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; } }
|
|
10
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
11
11
|
import React from 'react';
|
|
12
12
|
export var defaultZIndex = 9999;
|
|
13
13
|
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* @deprecated you can use TMS_SUPPORTED_LOCALE from [Globalization toolkit](https://github.com/procore/globalization-toolkit)
|
|
4
4
|
* @deprecatedSince 12.10.0
|
|
5
|
-
*/
|
|
5
|
+
*/
|
|
6
|
+
// TODO breaking change requiring a new minimum version of the peerDep, replace with GTK imports
|
|
6
7
|
var SUPPORTED_LOCALES = ['de-DE', 'en-AU', 'en-CA', 'en-GB', 'en', 'es-ES', 'es', 'fr-CA', 'fr-FR', 'is-IS', 'ja-JP', 'pl-PL', 'pseudo', 'pt-BR', 'th-TH', 'zh-SG'];
|
|
7
8
|
/*
|
|
8
9
|
all locales that should directly use a different locale. Any other unsupported locale will fallback to 'en'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getI18nProviderLocale.js","names":["SUPPORTED_LOCALES","OVERWRITE_LOCALE_MAP","getI18nProviderLocale","envLocale","includes"],"sources":["../../src/_hooks/getI18nProviderLocale.ts"],"sourcesContent":["import type { Locale } from './I18n'\n\n// All and only locales that will receive Smartling translations and can be directly fed into <I18nProvider>\n/**\n * @deprecated you can use TMS_SUPPORTED_LOCALE from [Globalization toolkit](https://github.com/procore/globalization-toolkit)\n * @deprecatedSince 12.10.0\n */\n// TODO breaking change requiring a new minimum version of the peerDep, replace with GTK imports\nconst SUPPORTED_LOCALES: Locale[] = [\n 'de-DE',\n 'en-AU',\n 'en-CA',\n 'en-GB',\n 'en',\n 'es-ES',\n 'es',\n 'fr-CA',\n 'fr-FR',\n 'is-IS',\n 'ja-JP',\n 'pl-PL',\n 'pseudo',\n 'pt-BR',\n 'th-TH',\n 'zh-SG',\n]\n/*\n all locales that should directly use a different locale. Any other unsupported locale will fallback to 'en'\n this should match https://github.com/procore/procore/blob/d0515461046b8d018c8fa8ede1ca8b7aa2fcacf8/config/application.rb#L234C1-L240C7\n for any locales that are not listed in SUPPORTED_LOCALES\n*/\n/**\n * @deprecated you can use OVERWRITE_LOCALE_MAP from [Globalization toolkit](https://github.com/procore/globalization-toolkit)\n * @deprecatedSince 12.10.0\n */\nexport const OVERWRITE_LOCALE_MAP: Record<string, Locale> = {\n 'en-AE': 'en-GB',\n 'en-SG': 'en-GB',\n 'es-419': 'es',\n} as const\n\n/**\n * @deprecatedSince 12.10.0\n * @deprecated you can use getOverrideLocale from [Globalization toolkit](https://procore.github.io/globalization-toolkit/#md:getoverridelocale-function)\n * Returns the locale that should be used for the I18nProvider based on the environment locale\n * @param envLocale - the locale from the environment\n * @returns the locale that should be used for the I18nProvider\n */\nexport function getI18nProviderLocale(envLocale: string): Locale {\n if (SUPPORTED_LOCALES.includes(envLocale as Locale)) {\n return envLocale as Locale\n }\n if (OVERWRITE_LOCALE_MAP[envLocale]) {\n return OVERWRITE_LOCALE_MAP[envLocale]\n }\n\n return 'en'\n}\n"],"mappings":"AAEA;AACA;AACA;AACA;AACA
|
|
1
|
+
{"version":3,"file":"getI18nProviderLocale.js","names":["SUPPORTED_LOCALES","OVERWRITE_LOCALE_MAP","getI18nProviderLocale","envLocale","includes"],"sources":["../../src/_hooks/getI18nProviderLocale.ts"],"sourcesContent":["import type { Locale } from './I18n'\n\n// All and only locales that will receive Smartling translations and can be directly fed into <I18nProvider>\n/**\n * @deprecated you can use TMS_SUPPORTED_LOCALE from [Globalization toolkit](https://github.com/procore/globalization-toolkit)\n * @deprecatedSince 12.10.0\n */\n// TODO breaking change requiring a new minimum version of the peerDep, replace with GTK imports\nconst SUPPORTED_LOCALES: Locale[] = [\n 'de-DE',\n 'en-AU',\n 'en-CA',\n 'en-GB',\n 'en',\n 'es-ES',\n 'es',\n 'fr-CA',\n 'fr-FR',\n 'is-IS',\n 'ja-JP',\n 'pl-PL',\n 'pseudo',\n 'pt-BR',\n 'th-TH',\n 'zh-SG',\n]\n/*\n all locales that should directly use a different locale. Any other unsupported locale will fallback to 'en'\n this should match https://github.com/procore/procore/blob/d0515461046b8d018c8fa8ede1ca8b7aa2fcacf8/config/application.rb#L234C1-L240C7\n for any locales that are not listed in SUPPORTED_LOCALES\n*/\n/**\n * @deprecated you can use OVERWRITE_LOCALE_MAP from [Globalization toolkit](https://github.com/procore/globalization-toolkit)\n * @deprecatedSince 12.10.0\n */\nexport const OVERWRITE_LOCALE_MAP: Record<string, Locale> = {\n 'en-AE': 'en-GB',\n 'en-SG': 'en-GB',\n 'es-419': 'es',\n} as const\n\n/**\n * @deprecatedSince 12.10.0\n * @deprecated you can use getOverrideLocale from [Globalization toolkit](https://procore.github.io/globalization-toolkit/#md:getoverridelocale-function)\n * Returns the locale that should be used for the I18nProvider based on the environment locale\n * @param envLocale - the locale from the environment\n * @returns the locale that should be used for the I18nProvider\n */\nexport function getI18nProviderLocale(envLocale: string): Locale {\n if (SUPPORTED_LOCALES.includes(envLocale as Locale)) {\n return envLocale as Locale\n }\n if (OVERWRITE_LOCALE_MAP[envLocale]) {\n return OVERWRITE_LOCALE_MAP[envLocale]\n }\n\n return 'en'\n}\n"],"mappings":"AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAMA,iBAA2B,GAAG,CAClC,OAAO,EACP,OAAO,EACP,OAAO,EACP,OAAO,EACP,IAAI,EACJ,OAAO,EACP,IAAI,EACJ,OAAO,EACP,OAAO,EACP,OAAO,EACP,OAAO,EACP,OAAO,EACP,QAAQ,EACR,OAAO,EACP,OAAO,EACP,OAAO,CACR;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,IAAMC,oBAA4C,GAAG;EAC1D,OAAO,EAAE,OAAO;EAChB,OAAO,EAAE,OAAO;EAChB,QAAQ,EAAE;AACZ,CAAU;;AAEV;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,qBAAqBA,CAACC,SAAiB,EAAU;EAC/D,IAAIH,iBAAiB,CAACI,QAAQ,CAACD,SAAmB,CAAC,EAAE;IACnD,OAAOA,SAAS;EAClB;EACA,IAAIF,oBAAoB,CAACE,SAAS,CAAC,EAAE;IACnC,OAAOF,oBAAoB,CAACE,SAAS,CAAC;EACxC;EAEA,OAAO,IAAI;AACb"}
|
|
@@ -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
|
/* eslint-disable no-magic-numbers */
|
|
8
8
|
import React from 'react';
|
|
9
9
|
/**
|