@channel.io/bezier-react 1.6.0 → 1.6.2
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/cjs/_virtual/_commonjsHelpers.js +3 -0
- package/dist/cjs/_virtual/_commonjsHelpers.js.map +1 -1
- package/dist/cjs/components/AutoFocus/AutoFocus.js +2 -2
- package/dist/cjs/components/AutoFocus/AutoFocus.js.map +1 -1
- package/dist/cjs/components/Avatars/CheckableAvatar/CheckableAvatar.js +2 -2
- package/dist/cjs/components/Avatars/CheckableAvatar/CheckableAvatar.js.map +1 -1
- package/dist/cjs/components/Avatars/CheckableAvatar/CheckableAvatar.styled.js +2 -2
- package/dist/cjs/components/Avatars/CheckableAvatar/CheckableAvatar.styled.js.map +1 -1
- package/dist/cjs/components/Divider/Divider.js +2 -2
- package/dist/cjs/components/Divider/Divider.js.map +1 -1
- package/dist/cjs/components/Forms/Checkbox/Checkbox.js +2 -2
- package/dist/cjs/components/Forms/Checkbox/Checkbox.js.map +1 -1
- package/dist/cjs/components/Forms/Checkbox/Checkbox.styled.js +2 -2
- package/dist/cjs/components/Forms/Checkbox/Checkbox.styled.js.map +1 -1
- package/dist/cjs/components/Forms/RadioGroup/RadioGroup.js +2 -2
- package/dist/cjs/components/Forms/RadioGroup/RadioGroup.js.map +1 -1
- package/dist/cjs/components/Forms/RadioGroup/RadioGroup.styled.js +2 -2
- package/dist/cjs/components/Forms/RadioGroup/RadioGroup.styled.js.map +1 -1
- package/dist/cjs/components/Forms/SegmentedControl/SegmentedControl.js +7 -7
- package/dist/cjs/components/Forms/SegmentedControl/SegmentedControl.js.map +1 -1
- package/dist/cjs/components/Forms/SegmentedControl/SegmentedControlItem.js +3 -3
- package/dist/cjs/components/Forms/SegmentedControl/SegmentedControlItem.js.map +1 -1
- package/dist/cjs/components/Forms/Slider/Slider.js +5 -5
- package/dist/cjs/components/Forms/Slider/Slider.js.map +1 -1
- package/dist/cjs/components/Forms/Switch/Switch.js +3 -3
- package/dist/cjs/components/Forms/Switch/Switch.js.map +1 -1
- package/dist/cjs/components/ListItem/ListItem.styled.js +1 -1
- package/dist/cjs/components/Modals/Modal/Modal.js +2 -2
- package/dist/cjs/components/Modals/Modal/Modal.js.map +1 -1
- package/dist/cjs/components/Modals/Modal/Modal.styled.js +2 -2
- package/dist/cjs/components/Modals/Modal/Modal.styled.js.map +1 -1
- package/dist/cjs/components/Modals/Modal/ModalContent.js +3 -3
- package/dist/cjs/components/Modals/Modal/ModalContent.js.map +1 -1
- package/dist/cjs/components/Modals/Modal/ModalHeader.js +3 -3
- package/dist/cjs/components/Modals/Modal/ModalHeader.js.map +1 -1
- package/dist/cjs/components/Modals/Modal/ModalHelpers.js +3 -3
- package/dist/cjs/components/Modals/Modal/ModalHelpers.js.map +1 -1
- package/dist/cjs/components/Status/Status.styled.js +1 -1
- package/dist/cjs/components/Tabs/TabAction.styled.js +3 -3
- package/dist/cjs/components/Tabs/TabAction.styled.js.map +1 -1
- package/dist/cjs/components/Tabs/TabActions.styled.js +2 -2
- package/dist/cjs/components/Tabs/TabActions.styled.js.map +1 -1
- package/dist/cjs/components/Tabs/TabContent.js +2 -2
- package/dist/cjs/components/Tabs/TabContent.js.map +1 -1
- package/dist/cjs/components/Tabs/TabItem.js +2 -2
- package/dist/cjs/components/Tabs/TabItem.js.map +1 -1
- package/dist/cjs/components/Tabs/TabItems.styled.js +2 -2
- package/dist/cjs/components/Tabs/TabItems.styled.js.map +1 -1
- package/dist/cjs/components/Tabs/Tabs.styled.js +2 -2
- package/dist/cjs/components/Tabs/Tabs.styled.js.map +1 -1
- package/dist/cjs/components/Tooltip/Tooltip.types.js.map +1 -1
- package/dist/cjs/components/VisuallyHidden/VisuallyHidden.js +2 -2
- package/dist/cjs/components/VisuallyHidden/VisuallyHidden.js.map +1 -1
- package/dist/cjs/foundation/FoundationStyledComponent.js +16 -1
- package/dist/cjs/foundation/FoundationStyledComponent.js.map +1 -1
- package/dist/cjs/node_modules/@radix-ui/number/dist/{index.module.js → index.js} +1 -1
- package/dist/cjs/node_modules/@radix-ui/number/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/primitive/dist/{index.module.js → index.js} +1 -1
- package/dist/cjs/node_modules/@radix-ui/primitive/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-checkbox/dist/{index.module.js → index.js} +19 -19
- package/dist/cjs/node_modules/@radix-ui/react-checkbox/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-collection/dist/{index.module.js → index.js} +9 -9
- package/dist/cjs/node_modules/@radix-ui/react-collection/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-compose-refs/dist/{index.module.js → index.js} +1 -1
- package/dist/cjs/node_modules/@radix-ui/react-compose-refs/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-context/dist/{index.module.js → index.js} +1 -1
- package/dist/cjs/node_modules/@radix-ui/react-context/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-dialog/dist/{index.module.js → index.js} +52 -46
- package/dist/cjs/node_modules/@radix-ui/react-dialog/dist/{index.module.js.map → index.js.map} +1 -1
- package/dist/cjs/node_modules/@radix-ui/react-direction/dist/{index.module.js → index.js} +1 -1
- package/dist/cjs/node_modules/@radix-ui/react-direction/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-dismissable-layer/dist/{index.module.js → index.js} +18 -18
- package/dist/cjs/node_modules/@radix-ui/react-dismissable-layer/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-focus-guards/dist/{index.module.js → index.js} +1 -1
- package/dist/cjs/node_modules/@radix-ui/react-focus-guards/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-focus-scope/dist/{index.module.js → index.js} +37 -9
- package/dist/cjs/node_modules/@radix-ui/react-focus-scope/dist/{index.module.js.map → index.js.map} +1 -1
- package/dist/cjs/node_modules/@radix-ui/react-id/dist/{index.module.js → index.js} +3 -3
- package/dist/cjs/node_modules/@radix-ui/react-id/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-portal/dist/{index.module.js → index.js} +3 -3
- package/dist/cjs/node_modules/@radix-ui/react-portal/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-presence/dist/{index.module.js → index.js} +6 -6
- package/dist/cjs/node_modules/@radix-ui/react-presence/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-primitive/dist/{index.module.js → index.js} +3 -3
- package/dist/cjs/node_modules/@radix-ui/react-primitive/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-radio-group/dist/{index.module.js → index.js} +26 -26
- package/dist/cjs/node_modules/@radix-ui/{react-roving-focus/dist/index.module.js.map → react-radio-group/dist/index.js.map} +1 -1
- package/dist/cjs/node_modules/@radix-ui/react-roving-focus/dist/{index.module.js → index.js} +25 -25
- package/dist/cjs/node_modules/@radix-ui/react-roving-focus/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-separator/dist/{index.module.js → index.js} +3 -3
- package/dist/cjs/node_modules/@radix-ui/react-separator/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-slider/dist/{index.module.js → index.js} +36 -35
- package/dist/cjs/node_modules/@radix-ui/react-slider/dist/{index.module.js.map → index.js.map} +1 -1
- package/dist/cjs/node_modules/@radix-ui/react-slot/dist/{index.module.js → index.js} +3 -3
- package/dist/cjs/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-switch/dist/{index.module.js → index.js} +16 -16
- package/dist/cjs/node_modules/@radix-ui/react-switch/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-tabs/dist/{index.module.js → index.js} +24 -24
- package/dist/cjs/node_modules/@radix-ui/react-tabs/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-toggle-group/dist/{index.module.js → index.js} +5 -5
- package/dist/cjs/node_modules/@radix-ui/react-toggle-group/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-toolbar/dist/{index.module.js → index.js} +18 -18
- package/dist/cjs/node_modules/@radix-ui/react-toolbar/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-use-callback-ref/dist/{index.module.js → index.js} +1 -1
- package/dist/cjs/node_modules/@radix-ui/react-use-callback-ref/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-use-controllable-state/dist/{index.module.js → index.js} +4 -4
- package/dist/cjs/node_modules/@radix-ui/react-use-controllable-state/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-use-escape-keydown/dist/{index.module.js → index.js} +3 -3
- package/dist/cjs/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-use-layout-effect/dist/{index.module.js → index.js} +1 -1
- package/dist/cjs/node_modules/@radix-ui/react-use-layout-effect/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-use-previous/dist/{index.module.js → index.js} +1 -1
- package/dist/cjs/node_modules/@radix-ui/react-use-previous/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-use-size/dist/{index.module.js → index.js} +3 -3
- package/dist/cjs/node_modules/@radix-ui/react-use-size/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-visually-hidden/dist/{index.module.js → index.js} +3 -3
- package/dist/cjs/node_modules/@radix-ui/react-visually-hidden/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/lodash/_Symbol.js +12 -0
- package/dist/cjs/node_modules/lodash/_Symbol.js.map +1 -0
- package/dist/cjs/node_modules/lodash/_baseGetTag.js +34 -0
- package/dist/cjs/node_modules/lodash/_baseGetTag.js.map +1 -0
- package/dist/cjs/node_modules/lodash/_baseTrim.js +23 -0
- package/dist/cjs/node_modules/lodash/_baseTrim.js.map +1 -0
- package/dist/cjs/node_modules/lodash/_freeGlobal.js +10 -0
- package/dist/cjs/node_modules/lodash/_freeGlobal.js.map +1 -0
- package/dist/cjs/node_modules/lodash/_getRawTag.js +50 -0
- package/dist/cjs/node_modules/lodash/_getRawTag.js.map +1 -0
- package/dist/cjs/node_modules/lodash/_objectToString.js +26 -0
- package/dist/cjs/node_modules/lodash/_objectToString.js.map +1 -0
- package/dist/cjs/node_modules/lodash/_root.js +15 -0
- package/dist/cjs/node_modules/lodash/_root.js.map +1 -0
- package/dist/cjs/node_modules/lodash/_trimmedEndIndex.js +22 -0
- package/dist/cjs/node_modules/lodash/_trimmedEndIndex.js.map +1 -0
- package/dist/cjs/node_modules/lodash/debounce.js +187 -0
- package/dist/cjs/node_modules/lodash/debounce.js.map +1 -0
- package/dist/cjs/node_modules/lodash/isObject.js +35 -0
- package/dist/cjs/node_modules/lodash/isObject.js.map +1 -0
- package/dist/cjs/node_modules/lodash/isObjectLike.js +33 -0
- package/dist/cjs/node_modules/lodash/isObjectLike.js.map +1 -0
- package/dist/cjs/node_modules/lodash/isSymbol.js +35 -0
- package/dist/cjs/node_modules/lodash/isSymbol.js.map +1 -0
- package/dist/cjs/node_modules/lodash/now.js +29 -0
- package/dist/cjs/node_modules/lodash/now.js.map +1 -0
- package/dist/cjs/node_modules/lodash/throttle.js +79 -0
- package/dist/cjs/node_modules/lodash/throttle.js.map +1 -0
- package/dist/cjs/node_modules/lodash/toNumber.js +70 -0
- package/dist/cjs/node_modules/lodash/toNumber.js.map +1 -0
- package/dist/cjs/node_modules/react-resize-detector/build/index.esm.js +153 -668
- package/dist/cjs/node_modules/react-resize-detector/build/index.esm.js.map +1 -1
- package/dist/cjs/node_modules/ssr-window/ssr-window.esm.js +37 -43
- package/dist/cjs/node_modules/ssr-window/ssr-window.esm.js.map +1 -1
- package/dist/esm/_virtual/_commonjsHelpers.mjs +3 -1
- package/dist/esm/_virtual/_commonjsHelpers.mjs.map +1 -1
- package/dist/esm/components/AutoFocus/AutoFocus.mjs +1 -1
- package/dist/esm/components/Avatars/CheckableAvatar/CheckableAvatar.mjs +1 -1
- package/dist/esm/components/Avatars/CheckableAvatar/CheckableAvatar.styled.mjs +1 -1
- package/dist/esm/components/Divider/Divider.mjs +1 -1
- package/dist/esm/components/Forms/Checkbox/Checkbox.mjs +1 -1
- package/dist/esm/components/Forms/Checkbox/Checkbox.styled.mjs +1 -1
- package/dist/esm/components/Forms/RadioGroup/RadioGroup.mjs +1 -1
- package/dist/esm/components/Forms/RadioGroup/RadioGroup.styled.mjs +1 -1
- package/dist/esm/components/Forms/SegmentedControl/SegmentedControl.mjs +2 -2
- package/dist/esm/components/Forms/SegmentedControl/SegmentedControlItem.mjs +2 -2
- package/dist/esm/components/Forms/Slider/Slider.mjs +1 -1
- package/dist/esm/components/Forms/Switch/Switch.mjs +1 -1
- package/dist/esm/components/ListItem/ListItem.styled.mjs +1 -1
- package/dist/esm/components/Modals/Modal/Modal.mjs +1 -1
- package/dist/esm/components/Modals/Modal/Modal.styled.mjs +1 -1
- package/dist/esm/components/Modals/Modal/ModalContent.mjs +1 -1
- package/dist/esm/components/Modals/Modal/ModalHeader.mjs +1 -1
- package/dist/esm/components/Modals/Modal/ModalHelpers.mjs +1 -1
- package/dist/esm/components/Status/Status.styled.mjs +1 -1
- package/dist/esm/components/Tabs/TabAction.styled.mjs +1 -1
- package/dist/esm/components/Tabs/TabActions.styled.mjs +1 -1
- package/dist/esm/components/Tabs/TabContent.mjs +1 -1
- package/dist/esm/components/Tabs/TabItem.mjs +1 -1
- package/dist/esm/components/Tabs/TabItems.styled.mjs +1 -1
- package/dist/esm/components/Tabs/Tabs.styled.mjs +1 -1
- package/dist/esm/components/Tooltip/Tooltip.types.mjs.map +1 -1
- package/dist/esm/components/VisuallyHidden/VisuallyHidden.mjs +1 -1
- package/dist/esm/foundation/FoundationStyledComponent.mjs +16 -1
- package/dist/esm/foundation/FoundationStyledComponent.mjs.map +1 -1
- package/dist/esm/node_modules/@radix-ui/number/dist/{index.module.mjs → index.mjs} +1 -1
- package/dist/esm/node_modules/@radix-ui/number/dist/index.mjs.map +1 -0
- package/dist/esm/node_modules/@radix-ui/primitive/dist/{index.module.mjs → index.mjs} +1 -1
- package/dist/esm/node_modules/@radix-ui/primitive/dist/index.mjs.map +1 -0
- package/dist/esm/node_modules/@radix-ui/react-checkbox/dist/{index.module.mjs → index.mjs} +9 -9
- package/dist/esm/node_modules/@radix-ui/react-checkbox/dist/index.mjs.map +1 -0
- package/dist/esm/node_modules/@radix-ui/react-collection/dist/{index.module.mjs → index.mjs} +4 -4
- package/dist/esm/node_modules/@radix-ui/react-collection/dist/index.mjs.map +1 -0
- package/dist/esm/node_modules/@radix-ui/react-compose-refs/dist/{index.module.mjs → index.mjs} +1 -1
- package/dist/esm/node_modules/@radix-ui/react-compose-refs/dist/index.mjs.map +1 -0
- package/dist/esm/node_modules/@radix-ui/react-context/dist/{index.module.mjs → index.mjs} +1 -1
- package/dist/esm/node_modules/@radix-ui/react-context/dist/index.mjs.map +1 -0
- package/dist/esm/node_modules/@radix-ui/react-dialog/dist/{index.module.mjs → index.mjs} +24 -18
- package/dist/esm/node_modules/@radix-ui/react-dialog/dist/{index.module.mjs.map → index.mjs.map} +1 -1
- package/dist/esm/node_modules/@radix-ui/react-direction/dist/{index.module.mjs → index.mjs} +1 -1
- package/dist/esm/node_modules/@radix-ui/react-direction/dist/index.mjs.map +1 -0
- package/dist/esm/node_modules/@radix-ui/react-dismissable-layer/dist/{index.module.mjs → index.mjs} +6 -6
- package/dist/esm/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs.map +1 -0
- package/dist/esm/node_modules/@radix-ui/react-focus-guards/dist/{index.module.mjs → index.mjs} +1 -1
- package/dist/esm/node_modules/@radix-ui/react-focus-guards/dist/index.mjs.map +1 -0
- package/dist/esm/node_modules/@radix-ui/react-focus-scope/dist/{index.module.mjs → index.mjs} +33 -5
- package/dist/{cjs/node_modules/@radix-ui/react-radio-group/dist/index.module.js.map → esm/node_modules/@radix-ui/react-focus-scope/dist/index.mjs.map} +1 -1
- package/dist/esm/node_modules/@radix-ui/react-id/dist/{index.module.mjs → index.mjs} +2 -2
- package/dist/esm/node_modules/@radix-ui/react-id/dist/index.mjs.map +1 -0
- package/dist/esm/node_modules/@radix-ui/react-portal/dist/{index.module.mjs → index.mjs} +2 -2
- package/dist/esm/node_modules/@radix-ui/react-portal/dist/index.mjs.map +1 -0
- package/dist/esm/node_modules/@radix-ui/react-presence/dist/{index.module.mjs → index.mjs} +3 -3
- package/dist/esm/node_modules/@radix-ui/react-presence/dist/index.mjs.map +1 -0
- package/dist/esm/node_modules/@radix-ui/react-primitive/dist/{index.module.mjs → index.mjs} +2 -2
- package/dist/esm/node_modules/@radix-ui/react-primitive/dist/index.mjs.map +1 -0
- package/dist/esm/node_modules/@radix-ui/react-radio-group/dist/{index.module.mjs → index.mjs} +10 -10
- package/dist/esm/node_modules/@radix-ui/{react-dismissable-layer/dist/index.module.mjs.map → react-radio-group/dist/index.mjs.map} +1 -1
- package/dist/esm/node_modules/@radix-ui/react-roving-focus/dist/{index.module.mjs → index.mjs} +10 -10
- package/dist/esm/node_modules/@radix-ui/react-roving-focus/dist/index.mjs.map +1 -0
- package/dist/esm/node_modules/@radix-ui/react-separator/dist/{index.module.mjs → index.mjs} +2 -2
- package/dist/esm/node_modules/@radix-ui/react-separator/dist/index.mjs.map +1 -0
- package/dist/esm/node_modules/@radix-ui/react-slider/dist/{index.module.mjs → index.mjs} +13 -12
- package/dist/esm/node_modules/@radix-ui/react-slider/dist/{index.module.mjs.map → index.mjs.map} +1 -1
- package/dist/esm/node_modules/@radix-ui/react-slot/dist/{index.module.mjs → index.mjs} +3 -3
- package/dist/esm/node_modules/@radix-ui/react-slot/dist/index.mjs.map +1 -0
- package/dist/esm/node_modules/@radix-ui/react-switch/dist/{index.module.mjs → index.mjs} +8 -8
- package/dist/esm/node_modules/@radix-ui/react-switch/dist/index.mjs.map +1 -0
- package/dist/esm/node_modules/@radix-ui/react-tabs/dist/{index.module.mjs → index.mjs} +9 -9
- package/dist/esm/node_modules/@radix-ui/react-tabs/dist/index.mjs.map +1 -0
- package/dist/esm/node_modules/@radix-ui/react-toggle-group/dist/{index.module.mjs → index.mjs} +3 -3
- package/dist/esm/node_modules/@radix-ui/react-toggle-group/dist/index.mjs.map +1 -0
- package/dist/esm/node_modules/@radix-ui/react-toolbar/dist/{index.module.mjs → index.mjs} +7 -7
- package/dist/esm/node_modules/@radix-ui/react-toolbar/dist/index.mjs.map +1 -0
- package/dist/esm/node_modules/@radix-ui/react-use-callback-ref/dist/{index.module.mjs → index.mjs} +1 -1
- package/dist/esm/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs.map +1 -0
- package/dist/esm/node_modules/@radix-ui/react-use-controllable-state/dist/{index.module.mjs → index.mjs} +2 -2
- package/dist/esm/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs.map +1 -0
- package/dist/esm/node_modules/@radix-ui/react-use-escape-keydown/dist/{index.module.mjs → index.mjs} +2 -2
- package/dist/esm/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs.map +1 -0
- package/dist/esm/node_modules/@radix-ui/react-use-layout-effect/dist/{index.module.mjs → index.mjs} +1 -1
- package/dist/esm/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs.map +1 -0
- package/dist/esm/node_modules/@radix-ui/react-use-previous/dist/{index.module.mjs → index.mjs} +1 -1
- package/dist/esm/node_modules/@radix-ui/react-use-previous/dist/index.mjs.map +1 -0
- package/dist/esm/node_modules/@radix-ui/react-use-size/dist/{index.module.mjs → index.mjs} +2 -2
- package/dist/esm/node_modules/@radix-ui/react-use-size/dist/index.mjs.map +1 -0
- package/dist/esm/node_modules/@radix-ui/react-visually-hidden/dist/{index.module.mjs → index.mjs} +2 -2
- package/dist/esm/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs.map +1 -0
- package/dist/esm/node_modules/lodash/_Symbol.mjs +10 -0
- package/dist/esm/node_modules/lodash/_Symbol.mjs.map +1 -0
- package/dist/esm/node_modules/lodash/_baseGetTag.mjs +32 -0
- package/dist/esm/node_modules/lodash/_baseGetTag.mjs.map +1 -0
- package/dist/esm/node_modules/lodash/_baseTrim.mjs +21 -0
- package/dist/esm/node_modules/lodash/_baseTrim.mjs.map +1 -0
- package/dist/esm/node_modules/lodash/_freeGlobal.mjs +8 -0
- package/dist/esm/node_modules/lodash/_freeGlobal.mjs.map +1 -0
- package/dist/esm/node_modules/lodash/_getRawTag.mjs +48 -0
- package/dist/esm/node_modules/lodash/_getRawTag.mjs.map +1 -0
- package/dist/esm/node_modules/lodash/_objectToString.mjs +24 -0
- package/dist/esm/node_modules/lodash/_objectToString.mjs.map +1 -0
- package/dist/esm/node_modules/lodash/_root.mjs +13 -0
- package/dist/esm/node_modules/lodash/_root.mjs.map +1 -0
- package/dist/esm/node_modules/lodash/_trimmedEndIndex.mjs +20 -0
- package/dist/esm/node_modules/lodash/_trimmedEndIndex.mjs.map +1 -0
- package/dist/esm/node_modules/lodash/debounce.mjs +182 -0
- package/dist/esm/node_modules/lodash/debounce.mjs.map +1 -0
- package/dist/esm/node_modules/lodash/isObject.mjs +33 -0
- package/dist/esm/node_modules/lodash/isObject.mjs.map +1 -0
- package/dist/esm/node_modules/lodash/isObjectLike.mjs +31 -0
- package/dist/esm/node_modules/lodash/isObjectLike.mjs.map +1 -0
- package/dist/esm/node_modules/lodash/isSymbol.mjs +33 -0
- package/dist/esm/node_modules/lodash/isSymbol.mjs.map +1 -0
- package/dist/esm/node_modules/lodash/now.mjs +27 -0
- package/dist/esm/node_modules/lodash/now.mjs.map +1 -0
- package/dist/esm/node_modules/lodash/throttle.mjs +75 -0
- package/dist/esm/node_modules/lodash/throttle.mjs.map +1 -0
- package/dist/esm/node_modules/lodash/toNumber.mjs +68 -0
- package/dist/esm/node_modules/lodash/toNumber.mjs.map +1 -0
- package/dist/esm/node_modules/react-resize-detector/build/index.esm.mjs +154 -651
- package/dist/esm/node_modules/react-resize-detector/build/index.esm.mjs.map +1 -1
- package/dist/esm/node_modules/ssr-window/ssr-window.esm.mjs +37 -43
- package/dist/esm/node_modules/ssr-window/ssr-window.esm.mjs.map +1 -1
- package/dist/types/components/Banner/Banner.styled.d.ts +1 -1
- package/dist/types/components/Forms/Checkbox/Checkbox.d.ts +2 -2
- package/dist/types/components/Forms/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/types/components/Forms/FormControl/__mocks__/forms.d.ts +4 -4
- package/dist/types/components/Forms/FormControl/__mocks__/forms.d.ts.map +1 -1
- package/dist/types/components/Forms/RadioGroup/Radio.d.ts +2 -2
- package/dist/types/components/Forms/RadioGroup/Radio.d.ts.map +1 -1
- package/dist/types/components/Forms/RadioGroup/RadioGroup.d.ts +2 -2
- package/dist/types/components/Forms/RadioGroup/RadioGroup.d.ts.map +1 -1
- package/dist/types/components/Forms/SegmentedControl/SegmentedControlIndicator.d.ts +2 -2
- package/dist/types/components/Help/Help.d.ts +2 -2
- package/dist/types/components/Help/Help.d.ts.map +1 -1
- package/dist/types/components/KeyValueListItem/common/ItemActions/ItemAction.styled.d.ts +1 -1
- package/dist/types/components/LegacyIcon/LegacyIcon.d.ts +1 -1
- package/dist/types/components/LegacyIcon/LegacyIcon.d.ts.map +1 -1
- package/dist/types/components/ListMenuTitle/ListMenuTitle.d.ts +2 -2
- package/dist/types/components/ListMenuTitle/ListMenuTitle.d.ts.map +1 -1
- package/dist/types/components/Modals/ConfirmModal/ConfirmModal.d.ts +2 -2
- package/dist/types/components/Modals/ConfirmModal/ConfirmModal.d.ts.map +1 -1
- package/dist/types/components/Modals/ConfirmModal/ConfirmModalHelpers.d.ts +3 -3
- package/dist/types/components/Modals/ConfirmModal/ConfirmModalHelpers.d.ts.map +1 -1
- package/dist/types/components/Modals/Modal/Modal.d.ts +2 -2
- package/dist/types/components/Modals/Modal/Modal.d.ts.map +1 -1
- package/dist/types/components/Modals/Modal/ModalHelpers.d.ts +3 -3
- package/dist/types/components/Modals/Modal/ModalHelpers.d.ts.map +1 -1
- package/dist/types/components/Navigator/NavGroup/NavGroup.d.ts +1 -1
- package/dist/types/components/Navigator/NavGroup/NavGroup.d.ts.map +1 -1
- package/dist/types/components/Navigator/NavItem/NavItem.d.ts +1 -1
- package/dist/types/components/Navigator/NavItem/NavItem.d.ts.map +1 -1
- package/dist/types/components/SectionLabel/SectionLabel.d.ts +2 -2
- package/dist/types/components/SectionLabel/SectionLabel.d.ts.map +1 -1
- package/dist/types/components/SectionLabel/SectionLabel.styled.d.ts +1 -1
- package/dist/types/components/SectionLabel/SectionLabel.types.d.ts +1 -1
- package/dist/types/components/SectionLabel/SectionLabel.types.d.ts.map +1 -1
- package/dist/types/components/Spinner/Spinner.d.ts +2 -2
- package/dist/types/components/Spinner/Spinner.d.ts.map +1 -1
- package/dist/types/components/TagBadge/TagBadgeCommon/TagBadgeText/TagBadgeText.d.ts +2 -2
- package/dist/types/components/TagBadge/TagBadgeCommon/TagBadgeText/TagBadgeText.d.ts.map +1 -1
- package/dist/types/components/Toast/ToastContainer.d.ts +1 -1
- package/dist/types/components/Toast/ToastController.d.ts +1 -1
- package/dist/types/components/Toast/ToastController.d.ts.map +1 -1
- package/dist/types/components/Toast/ToastProvider.d.ts +2 -2
- package/dist/types/components/Toast/ToastProvider.d.ts.map +1 -1
- package/dist/types/components/Tooltip/Tooltip.types.d.ts +1 -1
- package/dist/types/components/Tooltip/Tooltip.types.d.ts.map +1 -1
- package/dist/types/components/VisuallyHidden/VisuallyHidden.d.ts +2 -2
- package/dist/types/components/VisuallyHidden/VisuallyHidden.d.ts.map +1 -1
- package/dist/types/features/FeatureProvider.d.ts +1 -1
- package/dist/types/features/FeatureProvider.d.ts.map +1 -1
- package/dist/types/foundation/FoundationStyledComponent.d.ts +1 -1
- package/dist/types/foundation/FoundationStyledComponent.d.ts.map +1 -1
- package/dist/types/providers/BezierProvider.d.ts +1 -1
- package/dist/types/providers/BezierProvider.d.ts.map +1 -1
- package/package.json +38 -37
- package/src/components/SectionLabel/SectionLabel.types.ts +1 -1
- package/src/components/Tooltip/Tooltip.types.ts +1 -1
- package/src/foundation/FoundationStyledComponent.tsx +17 -1
- package/dist/cjs/node_modules/@radix-ui/number/dist/index.module.js.map +0 -1
- package/dist/cjs/node_modules/@radix-ui/primitive/dist/index.module.js.map +0 -1
- package/dist/cjs/node_modules/@radix-ui/react-checkbox/dist/index.module.js.map +0 -1
- package/dist/cjs/node_modules/@radix-ui/react-collection/dist/index.module.js.map +0 -1
- package/dist/cjs/node_modules/@radix-ui/react-compose-refs/dist/index.module.js.map +0 -1
- package/dist/cjs/node_modules/@radix-ui/react-context/dist/index.module.js.map +0 -1
- package/dist/cjs/node_modules/@radix-ui/react-direction/dist/index.module.js.map +0 -1
- package/dist/cjs/node_modules/@radix-ui/react-dismissable-layer/dist/index.module.js.map +0 -1
- package/dist/cjs/node_modules/@radix-ui/react-focus-guards/dist/index.module.js.map +0 -1
- package/dist/cjs/node_modules/@radix-ui/react-id/dist/index.module.js.map +0 -1
- package/dist/cjs/node_modules/@radix-ui/react-portal/dist/index.module.js.map +0 -1
- package/dist/cjs/node_modules/@radix-ui/react-presence/dist/index.module.js.map +0 -1
- package/dist/cjs/node_modules/@radix-ui/react-primitive/dist/index.module.js.map +0 -1
- package/dist/cjs/node_modules/@radix-ui/react-separator/dist/index.module.js.map +0 -1
- package/dist/cjs/node_modules/@radix-ui/react-slot/dist/index.module.js.map +0 -1
- package/dist/cjs/node_modules/@radix-ui/react-switch/dist/index.module.js.map +0 -1
- package/dist/cjs/node_modules/@radix-ui/react-tabs/dist/index.module.js.map +0 -1
- package/dist/cjs/node_modules/@radix-ui/react-toggle-group/dist/index.module.js.map +0 -1
- package/dist/cjs/node_modules/@radix-ui/react-toolbar/dist/index.module.js.map +0 -1
- package/dist/cjs/node_modules/@radix-ui/react-use-callback-ref/dist/index.module.js.map +0 -1
- package/dist/cjs/node_modules/@radix-ui/react-use-controllable-state/dist/index.module.js.map +0 -1
- package/dist/cjs/node_modules/@radix-ui/react-use-escape-keydown/dist/index.module.js.map +0 -1
- package/dist/cjs/node_modules/@radix-ui/react-use-layout-effect/dist/index.module.js.map +0 -1
- package/dist/cjs/node_modules/@radix-ui/react-use-previous/dist/index.module.js.map +0 -1
- package/dist/cjs/node_modules/@radix-ui/react-use-size/dist/index.module.js.map +0 -1
- package/dist/cjs/node_modules/@radix-ui/react-visually-hidden/dist/index.module.js.map +0 -1
- package/dist/esm/node_modules/@radix-ui/number/dist/index.module.mjs.map +0 -1
- package/dist/esm/node_modules/@radix-ui/primitive/dist/index.module.mjs.map +0 -1
- package/dist/esm/node_modules/@radix-ui/react-checkbox/dist/index.module.mjs.map +0 -1
- package/dist/esm/node_modules/@radix-ui/react-collection/dist/index.module.mjs.map +0 -1
- package/dist/esm/node_modules/@radix-ui/react-compose-refs/dist/index.module.mjs.map +0 -1
- package/dist/esm/node_modules/@radix-ui/react-context/dist/index.module.mjs.map +0 -1
- package/dist/esm/node_modules/@radix-ui/react-direction/dist/index.module.mjs.map +0 -1
- package/dist/esm/node_modules/@radix-ui/react-focus-guards/dist/index.module.mjs.map +0 -1
- package/dist/esm/node_modules/@radix-ui/react-focus-scope/dist/index.module.mjs.map +0 -1
- package/dist/esm/node_modules/@radix-ui/react-id/dist/index.module.mjs.map +0 -1
- package/dist/esm/node_modules/@radix-ui/react-portal/dist/index.module.mjs.map +0 -1
- package/dist/esm/node_modules/@radix-ui/react-presence/dist/index.module.mjs.map +0 -1
- package/dist/esm/node_modules/@radix-ui/react-primitive/dist/index.module.mjs.map +0 -1
- package/dist/esm/node_modules/@radix-ui/react-radio-group/dist/index.module.mjs.map +0 -1
- package/dist/esm/node_modules/@radix-ui/react-roving-focus/dist/index.module.mjs.map +0 -1
- package/dist/esm/node_modules/@radix-ui/react-separator/dist/index.module.mjs.map +0 -1
- package/dist/esm/node_modules/@radix-ui/react-slot/dist/index.module.mjs.map +0 -1
- package/dist/esm/node_modules/@radix-ui/react-switch/dist/index.module.mjs.map +0 -1
- package/dist/esm/node_modules/@radix-ui/react-tabs/dist/index.module.mjs.map +0 -1
- package/dist/esm/node_modules/@radix-ui/react-toggle-group/dist/index.module.mjs.map +0 -1
- package/dist/esm/node_modules/@radix-ui/react-toolbar/dist/index.module.mjs.map +0 -1
- package/dist/esm/node_modules/@radix-ui/react-use-callback-ref/dist/index.module.mjs.map +0 -1
- package/dist/esm/node_modules/@radix-ui/react-use-controllable-state/dist/index.module.mjs.map +0 -1
- package/dist/esm/node_modules/@radix-ui/react-use-escape-keydown/dist/index.module.mjs.map +0 -1
- package/dist/esm/node_modules/@radix-ui/react-use-layout-effect/dist/index.module.mjs.map +0 -1
- package/dist/esm/node_modules/@radix-ui/react-use-previous/dist/index.module.mjs.map +0 -1
- package/dist/esm/node_modules/@radix-ui/react-use-size/dist/index.module.mjs.map +0 -1
- package/dist/esm/node_modules/@radix-ui/react-visually-hidden/dist/index.module.mjs.map +0 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { useRef, useState, isValidElement, createRef, cloneElement, PureComponent, useEffect, useLayoutEffect } from 'react';
|
|
1
|
+
import React__default, { cloneElement, useRef, useState, useCallback, useEffect, isValidElement, createRef, PureComponent } from 'react';
|
|
3
2
|
import { findDOMNode } from 'react-dom';
|
|
3
|
+
import debounce from '../../lodash/debounce.mjs';
|
|
4
|
+
import throttle from '../../lodash/throttle.mjs';
|
|
4
5
|
|
|
5
6
|
/* global Reflect, Promise */
|
|
6
7
|
|
|
@@ -10,12 +11,11 @@ var extendStatics = function (d, b) {
|
|
|
10
11
|
} instanceof Array && function (d, b) {
|
|
11
12
|
d.__proto__ = b;
|
|
12
13
|
} || function (d, b) {
|
|
13
|
-
for (var p in b) if (
|
|
14
|
+
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
14
15
|
};
|
|
15
16
|
return extendStatics(d, b);
|
|
16
17
|
};
|
|
17
18
|
function __extends(d, b) {
|
|
18
|
-
if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
19
19
|
extendStatics(d, b);
|
|
20
20
|
function __() {
|
|
21
21
|
this.constructor = d;
|
|
@@ -40,559 +40,12 @@ function __rest(s, e) {
|
|
|
40
40
|
}
|
|
41
41
|
return t;
|
|
42
42
|
}
|
|
43
|
-
var
|
|
44
|
-
* Checks if `value` is the
|
|
45
|
-
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
|
46
|
-
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
|
47
|
-
*
|
|
48
|
-
* @static
|
|
49
|
-
* @memberOf _
|
|
50
|
-
* @since 0.1.0
|
|
51
|
-
* @category Lang
|
|
52
|
-
* @param {*} value The value to check.
|
|
53
|
-
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
|
54
|
-
* @example
|
|
55
|
-
*
|
|
56
|
-
* _.isObject({});
|
|
57
|
-
* // => true
|
|
58
|
-
*
|
|
59
|
-
* _.isObject([1, 2, 3]);
|
|
60
|
-
* // => true
|
|
61
|
-
*
|
|
62
|
-
* _.isObject(_.noop);
|
|
63
|
-
* // => true
|
|
64
|
-
*
|
|
65
|
-
* _.isObject(null);
|
|
66
|
-
* // => false
|
|
67
|
-
*/
|
|
68
|
-
|
|
69
|
-
function isObject$3(value) {
|
|
70
|
-
var type = typeof value;
|
|
71
|
-
return value != null && (type == 'object' || type == 'function');
|
|
72
|
-
}
|
|
73
|
-
var isObject_1 = isObject$3; /** Detect free variable `global` from Node.js. */
|
|
74
|
-
|
|
75
|
-
var freeGlobal$1 = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
|
|
76
|
-
var _freeGlobal = freeGlobal$1;
|
|
77
|
-
var freeGlobal = _freeGlobal;
|
|
78
|
-
|
|
79
|
-
/** Detect free variable `self`. */
|
|
80
|
-
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
|
|
81
|
-
|
|
82
|
-
/** Used as a reference to the global object. */
|
|
83
|
-
var root$2 = freeGlobal || freeSelf || Function('return this')();
|
|
84
|
-
var _root = root$2;
|
|
85
|
-
var root$1 = _root;
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* Gets the timestamp of the number of milliseconds that have elapsed since
|
|
89
|
-
* the Unix epoch (1 January 1970 00:00:00 UTC).
|
|
90
|
-
*
|
|
91
|
-
* @static
|
|
92
|
-
* @memberOf _
|
|
93
|
-
* @since 2.4.0
|
|
94
|
-
* @category Date
|
|
95
|
-
* @returns {number} Returns the timestamp.
|
|
96
|
-
* @example
|
|
97
|
-
*
|
|
98
|
-
* _.defer(function(stamp) {
|
|
99
|
-
* console.log(_.now() - stamp);
|
|
100
|
-
* }, _.now());
|
|
101
|
-
* // => Logs the number of milliseconds it took for the deferred invocation.
|
|
102
|
-
*/
|
|
103
|
-
var now$1 = function () {
|
|
104
|
-
return root$1.Date.now();
|
|
105
|
-
};
|
|
106
|
-
var now_1 = now$1; /** Used to match a single whitespace character. */
|
|
107
|
-
|
|
108
|
-
var reWhitespace = /\s/;
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace
|
|
112
|
-
* character of `string`.
|
|
113
|
-
*
|
|
114
|
-
* @private
|
|
115
|
-
* @param {string} string The string to inspect.
|
|
116
|
-
* @returns {number} Returns the index of the last non-whitespace character.
|
|
117
|
-
*/
|
|
118
|
-
function trimmedEndIndex$1(string) {
|
|
119
|
-
var index = string.length;
|
|
120
|
-
while (index-- && reWhitespace.test(string.charAt(index))) {}
|
|
121
|
-
return index;
|
|
122
|
-
}
|
|
123
|
-
var _trimmedEndIndex = trimmedEndIndex$1;
|
|
124
|
-
var trimmedEndIndex = _trimmedEndIndex;
|
|
125
|
-
|
|
126
|
-
/** Used to match leading whitespace. */
|
|
127
|
-
var reTrimStart = /^\s+/;
|
|
128
|
-
|
|
129
|
-
/**
|
|
130
|
-
* The base implementation of `_.trim`.
|
|
131
|
-
*
|
|
132
|
-
* @private
|
|
133
|
-
* @param {string} string The string to trim.
|
|
134
|
-
* @returns {string} Returns the trimmed string.
|
|
135
|
-
*/
|
|
136
|
-
function baseTrim$1(string) {
|
|
137
|
-
return string ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '') : string;
|
|
138
|
-
}
|
|
139
|
-
var _baseTrim = baseTrim$1;
|
|
140
|
-
var root = _root;
|
|
141
|
-
|
|
142
|
-
/** Built-in value references. */
|
|
143
|
-
var Symbol$2 = root.Symbol;
|
|
144
|
-
var _Symbol = Symbol$2;
|
|
145
|
-
var Symbol$1 = _Symbol;
|
|
146
|
-
|
|
147
|
-
/** Used for built-in method references. */
|
|
148
|
-
var objectProto$1 = Object.prototype;
|
|
149
|
-
|
|
150
|
-
/** Used to check objects for own properties. */
|
|
151
|
-
var hasOwnProperty = objectProto$1.hasOwnProperty;
|
|
152
|
-
|
|
153
|
-
/**
|
|
154
|
-
* Used to resolve the
|
|
155
|
-
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
156
|
-
* of values.
|
|
157
|
-
*/
|
|
158
|
-
var nativeObjectToString$1 = objectProto$1.toString;
|
|
159
|
-
|
|
160
|
-
/** Built-in value references. */
|
|
161
|
-
var symToStringTag$1 = Symbol$1 ? Symbol$1.toStringTag : undefined;
|
|
162
|
-
|
|
163
|
-
/**
|
|
164
|
-
* A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
|
|
165
|
-
*
|
|
166
|
-
* @private
|
|
167
|
-
* @param {*} value The value to query.
|
|
168
|
-
* @returns {string} Returns the raw `toStringTag`.
|
|
169
|
-
*/
|
|
170
|
-
function getRawTag$1(value) {
|
|
171
|
-
var isOwn = hasOwnProperty.call(value, symToStringTag$1),
|
|
172
|
-
tag = value[symToStringTag$1];
|
|
173
|
-
try {
|
|
174
|
-
value[symToStringTag$1] = undefined;
|
|
175
|
-
var unmasked = true;
|
|
176
|
-
} catch (e) {}
|
|
177
|
-
var result = nativeObjectToString$1.call(value);
|
|
178
|
-
if (unmasked) {
|
|
179
|
-
if (isOwn) {
|
|
180
|
-
value[symToStringTag$1] = tag;
|
|
181
|
-
} else {
|
|
182
|
-
delete value[symToStringTag$1];
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
return result;
|
|
186
|
-
}
|
|
187
|
-
var _getRawTag = getRawTag$1; /** Used for built-in method references. */
|
|
188
|
-
|
|
189
|
-
var objectProto = Object.prototype;
|
|
190
|
-
|
|
191
|
-
/**
|
|
192
|
-
* Used to resolve the
|
|
193
|
-
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
194
|
-
* of values.
|
|
195
|
-
*/
|
|
196
|
-
var nativeObjectToString = objectProto.toString;
|
|
197
|
-
|
|
198
|
-
/**
|
|
199
|
-
* Converts `value` to a string using `Object.prototype.toString`.
|
|
200
|
-
*
|
|
201
|
-
* @private
|
|
202
|
-
* @param {*} value The value to convert.
|
|
203
|
-
* @returns {string} Returns the converted string.
|
|
204
|
-
*/
|
|
205
|
-
function objectToString$1(value) {
|
|
206
|
-
return nativeObjectToString.call(value);
|
|
207
|
-
}
|
|
208
|
-
var _objectToString = objectToString$1;
|
|
209
|
-
var Symbol = _Symbol,
|
|
210
|
-
getRawTag = _getRawTag,
|
|
211
|
-
objectToString = _objectToString;
|
|
212
|
-
|
|
213
|
-
/** `Object#toString` result references. */
|
|
214
|
-
var nullTag = '[object Null]',
|
|
215
|
-
undefinedTag = '[object Undefined]';
|
|
216
|
-
|
|
217
|
-
/** Built-in value references. */
|
|
218
|
-
var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
|
|
219
|
-
|
|
220
|
-
/**
|
|
221
|
-
* The base implementation of `getTag` without fallbacks for buggy environments.
|
|
222
|
-
*
|
|
223
|
-
* @private
|
|
224
|
-
* @param {*} value The value to query.
|
|
225
|
-
* @returns {string} Returns the `toStringTag`.
|
|
226
|
-
*/
|
|
227
|
-
function baseGetTag$1(value) {
|
|
228
|
-
if (value == null) {
|
|
229
|
-
return value === undefined ? undefinedTag : nullTag;
|
|
230
|
-
}
|
|
231
|
-
return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
|
|
232
|
-
}
|
|
233
|
-
var _baseGetTag = baseGetTag$1; /**
|
|
234
|
-
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
235
|
-
* and has a `typeof` result of "object".
|
|
236
|
-
*
|
|
237
|
-
* @static
|
|
238
|
-
* @memberOf _
|
|
239
|
-
* @since 4.0.0
|
|
240
|
-
* @category Lang
|
|
241
|
-
* @param {*} value The value to check.
|
|
242
|
-
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
243
|
-
* @example
|
|
244
|
-
*
|
|
245
|
-
* _.isObjectLike({});
|
|
246
|
-
* // => true
|
|
247
|
-
*
|
|
248
|
-
* _.isObjectLike([1, 2, 3]);
|
|
249
|
-
* // => true
|
|
250
|
-
*
|
|
251
|
-
* _.isObjectLike(_.noop);
|
|
252
|
-
* // => false
|
|
253
|
-
*
|
|
254
|
-
* _.isObjectLike(null);
|
|
255
|
-
* // => false
|
|
256
|
-
*/
|
|
257
|
-
|
|
258
|
-
function isObjectLike$1(value) {
|
|
259
|
-
return value != null && typeof value == 'object';
|
|
260
|
-
}
|
|
261
|
-
var isObjectLike_1 = isObjectLike$1;
|
|
262
|
-
var baseGetTag = _baseGetTag,
|
|
263
|
-
isObjectLike = isObjectLike_1;
|
|
264
|
-
|
|
265
|
-
/** `Object#toString` result references. */
|
|
266
|
-
var symbolTag = '[object Symbol]';
|
|
267
|
-
|
|
268
|
-
/**
|
|
269
|
-
* Checks if `value` is classified as a `Symbol` primitive or object.
|
|
270
|
-
*
|
|
271
|
-
* @static
|
|
272
|
-
* @memberOf _
|
|
273
|
-
* @since 4.0.0
|
|
274
|
-
* @category Lang
|
|
275
|
-
* @param {*} value The value to check.
|
|
276
|
-
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
|
|
277
|
-
* @example
|
|
278
|
-
*
|
|
279
|
-
* _.isSymbol(Symbol.iterator);
|
|
280
|
-
* // => true
|
|
281
|
-
*
|
|
282
|
-
* _.isSymbol('abc');
|
|
283
|
-
* // => false
|
|
284
|
-
*/
|
|
285
|
-
function isSymbol$1(value) {
|
|
286
|
-
return typeof value == 'symbol' || isObjectLike(value) && baseGetTag(value) == symbolTag;
|
|
287
|
-
}
|
|
288
|
-
var isSymbol_1 = isSymbol$1;
|
|
289
|
-
var baseTrim = _baseTrim,
|
|
290
|
-
isObject$2 = isObject_1,
|
|
291
|
-
isSymbol = isSymbol_1;
|
|
292
|
-
|
|
293
|
-
/** Used as references for various `Number` constants. */
|
|
294
|
-
var NAN = 0 / 0;
|
|
295
|
-
|
|
296
|
-
/** Used to detect bad signed hexadecimal string values. */
|
|
297
|
-
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
|
|
298
|
-
|
|
299
|
-
/** Used to detect binary string values. */
|
|
300
|
-
var reIsBinary = /^0b[01]+$/i;
|
|
301
|
-
|
|
302
|
-
/** Used to detect octal string values. */
|
|
303
|
-
var reIsOctal = /^0o[0-7]+$/i;
|
|
304
|
-
|
|
305
|
-
/** Built-in method references without a dependency on `root`. */
|
|
306
|
-
var freeParseInt = parseInt;
|
|
307
|
-
|
|
308
|
-
/**
|
|
309
|
-
* Converts `value` to a number.
|
|
310
|
-
*
|
|
311
|
-
* @static
|
|
312
|
-
* @memberOf _
|
|
313
|
-
* @since 4.0.0
|
|
314
|
-
* @category Lang
|
|
315
|
-
* @param {*} value The value to process.
|
|
316
|
-
* @returns {number} Returns the number.
|
|
317
|
-
* @example
|
|
318
|
-
*
|
|
319
|
-
* _.toNumber(3.2);
|
|
320
|
-
* // => 3.2
|
|
321
|
-
*
|
|
322
|
-
* _.toNumber(Number.MIN_VALUE);
|
|
323
|
-
* // => 5e-324
|
|
324
|
-
*
|
|
325
|
-
* _.toNumber(Infinity);
|
|
326
|
-
* // => Infinity
|
|
327
|
-
*
|
|
328
|
-
* _.toNumber('3.2');
|
|
329
|
-
* // => 3.2
|
|
330
|
-
*/
|
|
331
|
-
function toNumber$1(value) {
|
|
332
|
-
if (typeof value == 'number') {
|
|
333
|
-
return value;
|
|
334
|
-
}
|
|
335
|
-
if (isSymbol(value)) {
|
|
336
|
-
return NAN;
|
|
337
|
-
}
|
|
338
|
-
if (isObject$2(value)) {
|
|
339
|
-
var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
|
|
340
|
-
value = isObject$2(other) ? other + '' : other;
|
|
341
|
-
}
|
|
342
|
-
if (typeof value != 'string') {
|
|
343
|
-
return value === 0 ? value : +value;
|
|
344
|
-
}
|
|
345
|
-
value = baseTrim(value);
|
|
346
|
-
var isBinary = reIsBinary.test(value);
|
|
347
|
-
return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
|
|
348
|
-
}
|
|
349
|
-
var toNumber_1 = toNumber$1;
|
|
350
|
-
var isObject$1 = isObject_1,
|
|
351
|
-
now = now_1,
|
|
352
|
-
toNumber = toNumber_1;
|
|
353
|
-
|
|
354
|
-
/** Error message constants. */
|
|
355
|
-
var FUNC_ERROR_TEXT$1 = 'Expected a function';
|
|
356
|
-
|
|
357
|
-
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
358
|
-
var nativeMax = Math.max,
|
|
359
|
-
nativeMin = Math.min;
|
|
360
|
-
|
|
361
|
-
/**
|
|
362
|
-
* Creates a debounced function that delays invoking `func` until after `wait`
|
|
363
|
-
* milliseconds have elapsed since the last time the debounced function was
|
|
364
|
-
* invoked. The debounced function comes with a `cancel` method to cancel
|
|
365
|
-
* delayed `func` invocations and a `flush` method to immediately invoke them.
|
|
366
|
-
* Provide `options` to indicate whether `func` should be invoked on the
|
|
367
|
-
* leading and/or trailing edge of the `wait` timeout. The `func` is invoked
|
|
368
|
-
* with the last arguments provided to the debounced function. Subsequent
|
|
369
|
-
* calls to the debounced function return the result of the last `func`
|
|
370
|
-
* invocation.
|
|
371
|
-
*
|
|
372
|
-
* **Note:** If `leading` and `trailing` options are `true`, `func` is
|
|
373
|
-
* invoked on the trailing edge of the timeout only if the debounced function
|
|
374
|
-
* is invoked more than once during the `wait` timeout.
|
|
375
|
-
*
|
|
376
|
-
* If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
|
|
377
|
-
* until to the next tick, similar to `setTimeout` with a timeout of `0`.
|
|
378
|
-
*
|
|
379
|
-
* See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
|
|
380
|
-
* for details over the differences between `_.debounce` and `_.throttle`.
|
|
381
|
-
*
|
|
382
|
-
* @static
|
|
383
|
-
* @memberOf _
|
|
384
|
-
* @since 0.1.0
|
|
385
|
-
* @category Function
|
|
386
|
-
* @param {Function} func The function to debounce.
|
|
387
|
-
* @param {number} [wait=0] The number of milliseconds to delay.
|
|
388
|
-
* @param {Object} [options={}] The options object.
|
|
389
|
-
* @param {boolean} [options.leading=false]
|
|
390
|
-
* Specify invoking on the leading edge of the timeout.
|
|
391
|
-
* @param {number} [options.maxWait]
|
|
392
|
-
* The maximum time `func` is allowed to be delayed before it's invoked.
|
|
393
|
-
* @param {boolean} [options.trailing=true]
|
|
394
|
-
* Specify invoking on the trailing edge of the timeout.
|
|
395
|
-
* @returns {Function} Returns the new debounced function.
|
|
396
|
-
* @example
|
|
397
|
-
*
|
|
398
|
-
* // Avoid costly calculations while the window size is in flux.
|
|
399
|
-
* jQuery(window).on('resize', _.debounce(calculateLayout, 150));
|
|
400
|
-
*
|
|
401
|
-
* // Invoke `sendMail` when clicked, debouncing subsequent calls.
|
|
402
|
-
* jQuery(element).on('click', _.debounce(sendMail, 300, {
|
|
403
|
-
* 'leading': true,
|
|
404
|
-
* 'trailing': false
|
|
405
|
-
* }));
|
|
406
|
-
*
|
|
407
|
-
* // Ensure `batchLog` is invoked once after 1 second of debounced calls.
|
|
408
|
-
* var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
|
|
409
|
-
* var source = new EventSource('/stream');
|
|
410
|
-
* jQuery(source).on('message', debounced);
|
|
411
|
-
*
|
|
412
|
-
* // Cancel the trailing debounced invocation.
|
|
413
|
-
* jQuery(window).on('popstate', debounced.cancel);
|
|
414
|
-
*/
|
|
415
|
-
function debounce$1(func, wait, options) {
|
|
416
|
-
var lastArgs,
|
|
417
|
-
lastThis,
|
|
418
|
-
maxWait,
|
|
419
|
-
result,
|
|
420
|
-
timerId,
|
|
421
|
-
lastCallTime,
|
|
422
|
-
lastInvokeTime = 0,
|
|
423
|
-
leading = false,
|
|
424
|
-
maxing = false,
|
|
425
|
-
trailing = true;
|
|
426
|
-
if (typeof func != 'function') {
|
|
427
|
-
throw new TypeError(FUNC_ERROR_TEXT$1);
|
|
428
|
-
}
|
|
429
|
-
wait = toNumber(wait) || 0;
|
|
430
|
-
if (isObject$1(options)) {
|
|
431
|
-
leading = !!options.leading;
|
|
432
|
-
maxing = 'maxWait' in options;
|
|
433
|
-
maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
|
|
434
|
-
trailing = 'trailing' in options ? !!options.trailing : trailing;
|
|
435
|
-
}
|
|
436
|
-
function invokeFunc(time) {
|
|
437
|
-
var args = lastArgs,
|
|
438
|
-
thisArg = lastThis;
|
|
439
|
-
lastArgs = lastThis = undefined;
|
|
440
|
-
lastInvokeTime = time;
|
|
441
|
-
result = func.apply(thisArg, args);
|
|
442
|
-
return result;
|
|
443
|
-
}
|
|
444
|
-
function leadingEdge(time) {
|
|
445
|
-
// Reset any `maxWait` timer.
|
|
446
|
-
lastInvokeTime = time;
|
|
447
|
-
// Start the timer for the trailing edge.
|
|
448
|
-
timerId = setTimeout(timerExpired, wait);
|
|
449
|
-
// Invoke the leading edge.
|
|
450
|
-
return leading ? invokeFunc(time) : result;
|
|
451
|
-
}
|
|
452
|
-
function remainingWait(time) {
|
|
453
|
-
var timeSinceLastCall = time - lastCallTime,
|
|
454
|
-
timeSinceLastInvoke = time - lastInvokeTime,
|
|
455
|
-
timeWaiting = wait - timeSinceLastCall;
|
|
456
|
-
return maxing ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting;
|
|
457
|
-
}
|
|
458
|
-
function shouldInvoke(time) {
|
|
459
|
-
var timeSinceLastCall = time - lastCallTime,
|
|
460
|
-
timeSinceLastInvoke = time - lastInvokeTime;
|
|
461
|
-
|
|
462
|
-
// Either this is the first call, activity has stopped and we're at the
|
|
463
|
-
// trailing edge, the system time has gone backwards and we're treating
|
|
464
|
-
// it as the trailing edge, or we've hit the `maxWait` limit.
|
|
465
|
-
return lastCallTime === undefined || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;
|
|
466
|
-
}
|
|
467
|
-
function timerExpired() {
|
|
468
|
-
var time = now();
|
|
469
|
-
if (shouldInvoke(time)) {
|
|
470
|
-
return trailingEdge(time);
|
|
471
|
-
}
|
|
472
|
-
// Restart the timer.
|
|
473
|
-
timerId = setTimeout(timerExpired, remainingWait(time));
|
|
474
|
-
}
|
|
475
|
-
function trailingEdge(time) {
|
|
476
|
-
timerId = undefined;
|
|
477
|
-
|
|
478
|
-
// Only invoke if we have `lastArgs` which means `func` has been
|
|
479
|
-
// debounced at least once.
|
|
480
|
-
if (trailing && lastArgs) {
|
|
481
|
-
return invokeFunc(time);
|
|
482
|
-
}
|
|
483
|
-
lastArgs = lastThis = undefined;
|
|
484
|
-
return result;
|
|
485
|
-
}
|
|
486
|
-
function cancel() {
|
|
487
|
-
if (timerId !== undefined) {
|
|
488
|
-
clearTimeout(timerId);
|
|
489
|
-
}
|
|
490
|
-
lastInvokeTime = 0;
|
|
491
|
-
lastArgs = lastCallTime = lastThis = timerId = undefined;
|
|
492
|
-
}
|
|
493
|
-
function flush() {
|
|
494
|
-
return timerId === undefined ? result : trailingEdge(now());
|
|
495
|
-
}
|
|
496
|
-
function debounced() {
|
|
497
|
-
var time = now(),
|
|
498
|
-
isInvoking = shouldInvoke(time);
|
|
499
|
-
lastArgs = arguments;
|
|
500
|
-
lastThis = this;
|
|
501
|
-
lastCallTime = time;
|
|
502
|
-
if (isInvoking) {
|
|
503
|
-
if (timerId === undefined) {
|
|
504
|
-
return leadingEdge(lastCallTime);
|
|
505
|
-
}
|
|
506
|
-
if (maxing) {
|
|
507
|
-
// Handle invocations in a tight loop.
|
|
508
|
-
clearTimeout(timerId);
|
|
509
|
-
timerId = setTimeout(timerExpired, wait);
|
|
510
|
-
return invokeFunc(lastCallTime);
|
|
511
|
-
}
|
|
512
|
-
}
|
|
513
|
-
if (timerId === undefined) {
|
|
514
|
-
timerId = setTimeout(timerExpired, wait);
|
|
515
|
-
}
|
|
516
|
-
return result;
|
|
517
|
-
}
|
|
518
|
-
debounced.cancel = cancel;
|
|
519
|
-
debounced.flush = flush;
|
|
520
|
-
return debounced;
|
|
521
|
-
}
|
|
522
|
-
var debounce_1 = debounce$1;
|
|
523
|
-
var debounce = debounce_1,
|
|
524
|
-
isObject = isObject_1;
|
|
525
|
-
|
|
526
|
-
/** Error message constants. */
|
|
527
|
-
var FUNC_ERROR_TEXT = 'Expected a function';
|
|
528
|
-
|
|
529
|
-
/**
|
|
530
|
-
* Creates a throttled function that only invokes `func` at most once per
|
|
531
|
-
* every `wait` milliseconds. The throttled function comes with a `cancel`
|
|
532
|
-
* method to cancel delayed `func` invocations and a `flush` method to
|
|
533
|
-
* immediately invoke them. Provide `options` to indicate whether `func`
|
|
534
|
-
* should be invoked on the leading and/or trailing edge of the `wait`
|
|
535
|
-
* timeout. The `func` is invoked with the last arguments provided to the
|
|
536
|
-
* throttled function. Subsequent calls to the throttled function return the
|
|
537
|
-
* result of the last `func` invocation.
|
|
538
|
-
*
|
|
539
|
-
* **Note:** If `leading` and `trailing` options are `true`, `func` is
|
|
540
|
-
* invoked on the trailing edge of the timeout only if the throttled function
|
|
541
|
-
* is invoked more than once during the `wait` timeout.
|
|
542
|
-
*
|
|
543
|
-
* If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
|
|
544
|
-
* until to the next tick, similar to `setTimeout` with a timeout of `0`.
|
|
545
|
-
*
|
|
546
|
-
* See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
|
|
547
|
-
* for details over the differences between `_.throttle` and `_.debounce`.
|
|
548
|
-
*
|
|
549
|
-
* @static
|
|
550
|
-
* @memberOf _
|
|
551
|
-
* @since 0.1.0
|
|
552
|
-
* @category Function
|
|
553
|
-
* @param {Function} func The function to throttle.
|
|
554
|
-
* @param {number} [wait=0] The number of milliseconds to throttle invocations to.
|
|
555
|
-
* @param {Object} [options={}] The options object.
|
|
556
|
-
* @param {boolean} [options.leading=true]
|
|
557
|
-
* Specify invoking on the leading edge of the timeout.
|
|
558
|
-
* @param {boolean} [options.trailing=true]
|
|
559
|
-
* Specify invoking on the trailing edge of the timeout.
|
|
560
|
-
* @returns {Function} Returns the new throttled function.
|
|
561
|
-
* @example
|
|
562
|
-
*
|
|
563
|
-
* // Avoid excessively updating the position while scrolling.
|
|
564
|
-
* jQuery(window).on('scroll', _.throttle(updatePosition, 100));
|
|
565
|
-
*
|
|
566
|
-
* // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
|
|
567
|
-
* var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
|
|
568
|
-
* jQuery(element).on('click', throttled);
|
|
569
|
-
*
|
|
570
|
-
* // Cancel the trailing throttled invocation.
|
|
571
|
-
* jQuery(window).on('popstate', throttled.cancel);
|
|
572
|
-
*/
|
|
573
|
-
function throttle(func, wait, options) {
|
|
574
|
-
var leading = true,
|
|
575
|
-
trailing = true;
|
|
576
|
-
if (typeof func != 'function') {
|
|
577
|
-
throw new TypeError(FUNC_ERROR_TEXT);
|
|
578
|
-
}
|
|
579
|
-
if (isObject(options)) {
|
|
580
|
-
leading = 'leading' in options ? !!options.leading : leading;
|
|
581
|
-
trailing = 'trailing' in options ? !!options.trailing : trailing;
|
|
582
|
-
}
|
|
583
|
-
return debounce(func, wait, {
|
|
584
|
-
'leading': leading,
|
|
585
|
-
'maxWait': wait,
|
|
586
|
-
'trailing': trailing
|
|
587
|
-
});
|
|
588
|
-
}
|
|
589
|
-
var throttle_1 = throttle;
|
|
590
|
-
var patchResizeHandler = function (resizeCallback, refreshMode, refreshRate, refreshOptions) {
|
|
43
|
+
var patchResizeCallback = function (resizeCallback, refreshMode, refreshRate, refreshOptions) {
|
|
591
44
|
switch (refreshMode) {
|
|
592
45
|
case 'debounce':
|
|
593
|
-
return
|
|
46
|
+
return debounce(resizeCallback, refreshRate, refreshOptions);
|
|
594
47
|
case 'throttle':
|
|
595
|
-
return
|
|
48
|
+
return throttle(resizeCallback, refreshRate, refreshOptions);
|
|
596
49
|
default:
|
|
597
50
|
return resizeCallback;
|
|
598
51
|
}
|
|
@@ -606,29 +59,6 @@ var isSSR = function () {
|
|
|
606
59
|
var isDOMElement = function (element) {
|
|
607
60
|
return element instanceof Element || element instanceof HTMLDocument;
|
|
608
61
|
};
|
|
609
|
-
var createNotifier = function (onResize, setSize, handleWidth, handleHeight) {
|
|
610
|
-
return function (_a) {
|
|
611
|
-
var width = _a.width,
|
|
612
|
-
height = _a.height;
|
|
613
|
-
setSize(function (prev) {
|
|
614
|
-
if (prev.width === width && prev.height === height) {
|
|
615
|
-
// skip if dimensions haven't changed
|
|
616
|
-
return prev;
|
|
617
|
-
}
|
|
618
|
-
if (prev.width === width && !handleHeight || prev.height === height && !handleWidth) {
|
|
619
|
-
// process `handleHeight/handleWidth` props
|
|
620
|
-
return prev;
|
|
621
|
-
}
|
|
622
|
-
if (onResize && isFunction(onResize)) {
|
|
623
|
-
onResize(width, height);
|
|
624
|
-
}
|
|
625
|
-
return {
|
|
626
|
-
width: width,
|
|
627
|
-
height: height
|
|
628
|
-
};
|
|
629
|
-
});
|
|
630
|
-
};
|
|
631
|
-
};
|
|
632
62
|
/** @class */(function (_super) {
|
|
633
63
|
__extends(ResizeDetector, _super);
|
|
634
64
|
function ResizeDetector(props) {
|
|
@@ -699,7 +129,23 @@ var createNotifier = function (onResize, setSize, handleWidth, handleHeight) {
|
|
|
699
129
|
handleHeight = _c === void 0 ? true : _c,
|
|
700
130
|
onResize = _a.onResize;
|
|
701
131
|
if (!handleWidth && !handleHeight) return;
|
|
702
|
-
var notifyResize =
|
|
132
|
+
var notifyResize = function (_a) {
|
|
133
|
+
var width = _a.width,
|
|
134
|
+
height = _a.height;
|
|
135
|
+
if (_this.state.width === width && _this.state.height === height) {
|
|
136
|
+
// skip if dimensions haven't changed
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
if (_this.state.width === width && !handleHeight || _this.state.height === height && !handleWidth) {
|
|
140
|
+
// process `handleHeight/handleWidth` props
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
onResize === null || onResize === void 0 ? void 0 : onResize(width, height);
|
|
144
|
+
_this.setState({
|
|
145
|
+
width: width,
|
|
146
|
+
height: height
|
|
147
|
+
});
|
|
148
|
+
};
|
|
703
149
|
entries.forEach(function (entry) {
|
|
704
150
|
var _a = entry && entry.contentRect || {},
|
|
705
151
|
width = _a.width,
|
|
@@ -744,13 +190,16 @@ var createNotifier = function (onResize, setSize, handleWidth, handleHeight) {
|
|
|
744
190
|
width: undefined,
|
|
745
191
|
height: undefined
|
|
746
192
|
};
|
|
193
|
+
_this.sizeRef = {
|
|
194
|
+
current: _this.state
|
|
195
|
+
};
|
|
747
196
|
_this.skipOnMount = skipOnMount;
|
|
748
197
|
_this.targetRef = /*#__PURE__*/createRef();
|
|
749
198
|
_this.observableElement = null;
|
|
750
199
|
if (isSSR()) {
|
|
751
200
|
return _this;
|
|
752
201
|
}
|
|
753
|
-
_this.resizeHandler =
|
|
202
|
+
_this.resizeHandler = patchResizeCallback(_this.createResizeHandler, refreshMode, refreshRate, refreshOptions);
|
|
754
203
|
_this.resizeObserver = new window.ResizeObserver(_this.resizeHandler);
|
|
755
204
|
return _this;
|
|
756
205
|
}
|
|
@@ -759,6 +208,7 @@ var createNotifier = function (onResize, setSize, handleWidth, handleHeight) {
|
|
|
759
208
|
};
|
|
760
209
|
ResizeDetector.prototype.componentDidUpdate = function () {
|
|
761
210
|
this.attachObserver();
|
|
211
|
+
this.sizeRef.current = this.state;
|
|
762
212
|
};
|
|
763
213
|
ResizeDetector.prototype.componentWillUnmount = function () {
|
|
764
214
|
if (isSSR()) {
|
|
@@ -783,100 +233,153 @@ var createNotifier = function (onResize, setSize, handleWidth, handleHeight) {
|
|
|
783
233
|
targetRef: this.targetRef
|
|
784
234
|
};
|
|
785
235
|
var renderType = this.getRenderType();
|
|
786
|
-
var typedChildren;
|
|
787
236
|
switch (renderType) {
|
|
788
237
|
case 'renderProp':
|
|
789
|
-
return render
|
|
238
|
+
return render === null || render === void 0 ? void 0 : render(childProps);
|
|
790
239
|
case 'childFunction':
|
|
791
|
-
|
|
792
|
-
|
|
240
|
+
{
|
|
241
|
+
var childFunction = children;
|
|
242
|
+
return childFunction === null || childFunction === void 0 ? void 0 : childFunction(childProps);
|
|
243
|
+
}
|
|
793
244
|
case 'child':
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
245
|
+
{
|
|
246
|
+
// @TODO bug prone logic
|
|
247
|
+
var child = children;
|
|
248
|
+
if (child.type && typeof child.type === 'string') {
|
|
249
|
+
// child is a native DOM elements such as div, span etc
|
|
250
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
251
|
+
childProps.targetRef;
|
|
252
|
+
var nativeProps = __rest(childProps, ["targetRef"]);
|
|
253
|
+
return /*#__PURE__*/cloneElement(child, nativeProps);
|
|
254
|
+
}
|
|
255
|
+
// class or functional component otherwise
|
|
256
|
+
return /*#__PURE__*/cloneElement(child, childProps);
|
|
801
257
|
}
|
|
802
|
-
// class or functional component otherwise
|
|
803
|
-
return /*#__PURE__*/cloneElement(typedChildren, childProps);
|
|
804
258
|
case 'childArray':
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
return
|
|
808
|
-
|
|
259
|
+
{
|
|
260
|
+
var childArray = children;
|
|
261
|
+
return childArray.map(function (el) {
|
|
262
|
+
return !!el && /*#__PURE__*/cloneElement(el, childProps);
|
|
263
|
+
});
|
|
264
|
+
}
|
|
809
265
|
default:
|
|
810
|
-
return /*#__PURE__*/
|
|
266
|
+
return /*#__PURE__*/React__default.createElement(WrapperTag, null);
|
|
811
267
|
}
|
|
812
268
|
};
|
|
813
269
|
return ResizeDetector;
|
|
814
270
|
})(PureComponent);
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
targetRef = props.targetRef,
|
|
831
|
-
observerOptions = props.observerOptions,
|
|
832
|
-
onResize = props.onResize;
|
|
271
|
+
function useResizeDetector(_a) {
|
|
272
|
+
var _b = _a === void 0 ? {} : _a,
|
|
273
|
+
_c = _b.skipOnMount,
|
|
274
|
+
skipOnMount = _c === void 0 ? false : _c,
|
|
275
|
+
refreshMode = _b.refreshMode,
|
|
276
|
+
_d = _b.refreshRate,
|
|
277
|
+
refreshRate = _d === void 0 ? 1000 : _d,
|
|
278
|
+
refreshOptions = _b.refreshOptions,
|
|
279
|
+
_e = _b.handleWidth,
|
|
280
|
+
handleWidth = _e === void 0 ? true : _e,
|
|
281
|
+
_f = _b.handleHeight,
|
|
282
|
+
handleHeight = _f === void 0 ? true : _f,
|
|
283
|
+
targetRef = _b.targetRef,
|
|
284
|
+
observerOptions = _b.observerOptions,
|
|
285
|
+
onResize = _b.onResize;
|
|
833
286
|
var skipResize = useRef(skipOnMount);
|
|
834
|
-
var
|
|
835
|
-
var ref = targetRef !== null && targetRef !== void 0 ? targetRef : localRef;
|
|
836
|
-
var resizeHandler = useRef();
|
|
837
|
-
var _e = useState({
|
|
287
|
+
var _g = useState({
|
|
838
288
|
width: undefined,
|
|
839
289
|
height: undefined
|
|
840
290
|
}),
|
|
841
|
-
size =
|
|
842
|
-
setSize =
|
|
843
|
-
|
|
844
|
-
|
|
291
|
+
size = _g[0],
|
|
292
|
+
setSize = _g[1];
|
|
293
|
+
// we are going to use this ref to store the last element that was passed to the hook
|
|
294
|
+
var _h = useState((targetRef === null || targetRef === void 0 ? void 0 : targetRef.current) || null),
|
|
295
|
+
refElement = _h[0],
|
|
296
|
+
setRefElement = _h[1];
|
|
297
|
+
// if targetRef is passed, we need to update the refElement
|
|
298
|
+
// we have to use setTimeout because ref get assigned after the hook is called
|
|
299
|
+
// in the future releases we are going to remove targetRef and force users to use ref returned by the hook
|
|
300
|
+
if (targetRef) {
|
|
301
|
+
setTimeout(function () {
|
|
302
|
+
if (targetRef.current !== refElement) {
|
|
303
|
+
setRefElement(targetRef.current);
|
|
304
|
+
}
|
|
305
|
+
}, 0);
|
|
306
|
+
}
|
|
307
|
+
// this is a callback that will be called every time the ref is changed
|
|
308
|
+
// we call setState inside to trigger rerender
|
|
309
|
+
var onRefChange = useCallback(function (node) {
|
|
310
|
+
if (node !== refElement) {
|
|
311
|
+
setRefElement(node);
|
|
312
|
+
}
|
|
313
|
+
}, [refElement]);
|
|
314
|
+
// adding `current` to make it compatible with useRef shape
|
|
315
|
+
onRefChange.current = refElement;
|
|
316
|
+
useEffect(function () {
|
|
317
|
+
return function () {
|
|
318
|
+
// component is unmounted
|
|
319
|
+
// clear ref to avoid memory leaks
|
|
320
|
+
setRefElement(null);
|
|
321
|
+
onRefChange.current = null;
|
|
322
|
+
};
|
|
323
|
+
}, []);
|
|
324
|
+
var shouldSetSize = useCallback(function (prevSize, nextSize) {
|
|
325
|
+
if (prevSize.width === nextSize.width && prevSize.height === nextSize.height) {
|
|
326
|
+
// skip if dimensions haven't changed
|
|
327
|
+
return false;
|
|
328
|
+
}
|
|
329
|
+
if (prevSize.width === nextSize.width && !handleHeight || prevSize.height === nextSize.height && !handleWidth) {
|
|
330
|
+
// process `handleHeight/handleWidth` props
|
|
331
|
+
return false;
|
|
332
|
+
}
|
|
333
|
+
return true;
|
|
334
|
+
}, [handleWidth, handleHeight]);
|
|
335
|
+
var resizeCallback = useCallback(function (entries) {
|
|
336
|
+
if (!handleWidth && !handleHeight) return;
|
|
337
|
+
if (skipResize.current) {
|
|
338
|
+
skipResize.current = false;
|
|
845
339
|
return;
|
|
846
340
|
}
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
}
|
|
861
|
-
skipResize.current = false;
|
|
341
|
+
entries.forEach(function (entry) {
|
|
342
|
+
var _a = (entry === null || entry === void 0 ? void 0 : entry.contentRect) || {},
|
|
343
|
+
width = _a.width,
|
|
344
|
+
height = _a.height;
|
|
345
|
+
setSize(function (prevSize) {
|
|
346
|
+
if (!shouldSetSize(prevSize, {
|
|
347
|
+
width: width,
|
|
348
|
+
height: height
|
|
349
|
+
})) return prevSize;
|
|
350
|
+
return {
|
|
351
|
+
width: width,
|
|
352
|
+
height: height
|
|
353
|
+
};
|
|
862
354
|
});
|
|
863
|
-
};
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
355
|
+
});
|
|
356
|
+
}, [handleWidth, handleHeight, skipResize, shouldSetSize]);
|
|
357
|
+
var resizeHandler = useCallback(patchResizeCallback(resizeCallback, refreshMode, refreshRate, refreshOptions), [resizeCallback, refreshMode, refreshRate, refreshOptions]);
|
|
358
|
+
// on refElement change
|
|
359
|
+
useEffect(function () {
|
|
360
|
+
var resizeObserver;
|
|
361
|
+
if (refElement) {
|
|
362
|
+
resizeObserver = new window.ResizeObserver(resizeHandler);
|
|
363
|
+
resizeObserver.observe(refElement, observerOptions);
|
|
364
|
+
} else {
|
|
365
|
+
if (size.width || size.height) {
|
|
366
|
+
setSize({
|
|
367
|
+
width: undefined,
|
|
368
|
+
height: undefined
|
|
369
|
+
});
|
|
370
|
+
}
|
|
869
371
|
}
|
|
870
372
|
return function () {
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
patchedResizeHandler.cancel();
|
|
875
|
-
}
|
|
373
|
+
var _a, _b, _c;
|
|
374
|
+
(_a = resizeObserver === null || resizeObserver === void 0 ? void 0 : resizeObserver.disconnect) === null || _a === void 0 ? void 0 : _a.call(resizeObserver);
|
|
375
|
+
(_c = (_b = resizeHandler).cancel) === null || _c === void 0 ? void 0 : _c.call(_b);
|
|
876
376
|
};
|
|
877
|
-
}, [
|
|
377
|
+
}, [resizeHandler, refElement]);
|
|
378
|
+
useEffect(function () {
|
|
379
|
+
onResize === null || onResize === void 0 ? void 0 : onResize(size.width, size.height);
|
|
380
|
+
}, [size]);
|
|
878
381
|
return __assign({
|
|
879
|
-
ref:
|
|
382
|
+
ref: onRefChange
|
|
880
383
|
}, size);
|
|
881
384
|
}
|
|
882
385
|
|