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