@teamturing/react-kit 2.51.2 → 2.51.4
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/index.js +1342 -37064
- package/esm/_virtual/_commonjsHelpers.js +1 -3
- package/esm/core/ActionList/ActionListItem.js +18 -20
- package/esm/core/ActionList/ActionListSectionDivider.js +2 -2
- package/esm/core/ActionList/ActionListSectionHeader.js +3 -3
- package/esm/core/ActionList/index.js +3 -3
- package/esm/core/AnimatePresence/index.js +2 -5
- package/esm/core/Avatar/index.js +3 -3
- package/esm/core/AvatarGroup/AvatarGroupItem.js +4 -4
- package/esm/core/AvatarGroup/index.js +13 -13
- package/esm/core/BadgeAttacher/index.js +2 -2
- package/esm/core/Breadcrumbs/BreadcrumbsItem.js +4 -4
- package/esm/core/Breadcrumbs/index.js +5 -5
- package/esm/core/Button/index.js +7 -7
- package/esm/core/Card/index.js +1 -1
- package/esm/core/Checkbox/index.js +3 -3
- package/esm/core/Chip/index.js +4 -4
- package/esm/core/ClickArea/index.js +2 -2
- package/esm/core/CounterBadge/index.js +3 -3
- package/esm/core/Datagrid/DatagridBody.js +3 -3
- package/esm/core/Datagrid/DatagridCell.js +2 -2
- package/esm/core/Datagrid/DatagridHeader.js +7 -7
- package/esm/core/Datagrid/DatagridRow.js +3 -3
- package/esm/core/Datagrid/DatagridSubheader.js +3 -3
- package/esm/core/Datagrid/index.js +4 -4
- package/esm/core/DescriptionList/index.js +11 -11
- package/esm/core/Dialog/DialogBody.js +2 -2
- package/esm/core/Dialog/DialogFooter.js +2 -2
- package/esm/core/Dialog/DialogHeader.js +2 -2
- package/esm/core/Dialog/DialogHeaderSubtitle.js +2 -2
- package/esm/core/Dialog/DialogHeaderTitle.js +2 -2
- package/esm/core/Dialog/index.js +8 -8
- package/esm/core/Drawer/DrawerBody.js +2 -2
- package/esm/core/Drawer/DrawerFooter.js +2 -2
- package/esm/core/Drawer/DrawerHeader.js +2 -2
- package/esm/core/Drawer/DrawerHeaderIconButton.js +2 -2
- package/esm/core/Drawer/index.js +12 -13
- package/esm/core/EmptyState/index.js +8 -9
- package/esm/core/Flash/index.js +12 -15
- package/esm/core/FormControl/FormControlCaption.js +2 -2
- package/esm/core/FormControl/FormControlErrorMessage.js +2 -2
- package/esm/core/FormControl/FormControlLabel.js +5 -5
- package/esm/core/FormControl/FormControlSuccessMessage.js +2 -2
- package/esm/core/FormControl/FormControlTooltipIcon.js +5 -6
- package/esm/core/FormControl/index.js +8 -8
- package/esm/core/Grid/index.js +4 -6
- package/esm/core/HorizontalDivider/index.js +2 -2
- package/esm/core/IconButton/index.js +3 -3
- package/esm/core/IconToggleButton/index.js +3 -3
- package/esm/core/ItemList/index.js +2 -2
- package/esm/core/MotionView/index.js +1 -1
- package/esm/core/Overlay/index.js +4 -4
- package/esm/core/OverlayPopper/index.js +4 -6
- package/esm/core/Pagination/index.js +15 -17
- package/esm/core/Pill/index.js +11 -12
- package/esm/core/Radio/index.js +3 -3
- package/esm/core/SearchSelectInput/index.js +22 -28
- package/esm/core/Select/SelectOption.js +3 -3
- package/esm/core/Select/index.js +11 -13
- package/esm/core/Spinner/index.js +2 -3
- package/esm/core/Stack/index.js +4 -4
- package/esm/core/StyledIcon/index.js +3 -3
- package/esm/core/Switch/index.js +3 -3
- package/esm/core/Tab/TabItem.js +5 -5
- package/esm/core/Tab/index.js +18 -19
- package/esm/core/TextInput/TextInputTrailingAction.js +4 -4
- package/esm/core/TextInput/index.js +9 -11
- package/esm/core/Textarea/index.js +6 -8
- package/esm/core/ThemeProvider/index.js +2 -2
- package/esm/core/Toast/index.js +6 -8
- package/esm/core/Tooltip/BaseTooltip.js +8 -8
- package/esm/core/Tooltip/index.js +4 -4
- package/esm/core/Tooltip/useTooltip.js +1 -3
- package/esm/enigma/EnigmaUI/index.js +3 -4
- package/esm/enigma/Layout/SingleColumnLayout/index.js +4 -4
- package/esm/enigma/View/ChipGroupView/index.js +6 -6
- package/esm/enigma/View/GridView/index.js +5 -5
- package/esm/enigma/View/HorizontalDividerView/index.js +2 -2
- package/esm/enigma/View/IconView/index.js +4 -4
- package/esm/enigma/View/ImageView/index.js +2 -2
- package/esm/enigma/View/TextView/index.js +2 -2
- package/esm/hook/useFocusTrap.js +5 -5
- package/esm/hook/useFocusZone.js +2 -2
- package/esm/hook/useResize.js +1 -1
- package/esm/index.js +1 -1
- package/esm/theme/index.js +1 -13
- package/package.json +2 -2
- package/esm/_virtual/index.js +0 -3
- package/esm/_virtual/index2.js +0 -3
- package/esm/_virtual/index3.js +0 -3
- package/esm/_virtual/jsx-runtime.js +0 -3
- package/esm/_virtual/react-dom.development.js +0 -3
- package/esm/_virtual/react-dom.production.min.js +0 -3
- package/esm/_virtual/react-is.development.js +0 -3
- package/esm/_virtual/react-is.production.min.js +0 -3
- package/esm/_virtual/react-jsx-runtime.development.js +0 -3
- package/esm/_virtual/react-jsx-runtime.production.min.js +0 -3
- package/esm/_virtual/scheduler.development.js +0 -3
- package/esm/_virtual/scheduler.production.min.js +0 -3
- package/esm/node_modules/@floating-ui/core/dist/floating-ui.core.js +0 -593
- package/esm/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +0 -731
- package/esm/node_modules/@floating-ui/react/dist/floating-ui.react.js +0 -1621
- package/esm/node_modules/@floating-ui/react/dist/floating-ui.react.utils.js +0 -233
- package/esm/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +0 -321
- package/esm/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +0 -161
- package/esm/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +0 -136
- package/esm/node_modules/@primer/behaviors/dist/esm/focus-trap.js +0 -105
- package/esm/node_modules/@primer/behaviors/dist/esm/focus-zone.js +0 -436
- package/esm/node_modules/@primer/behaviors/dist/esm/polyfills/event-listener-signal.js +0 -38
- package/esm/node_modules/@primer/behaviors/dist/esm/utils/iterate-focusable-elements.js +0 -65
- package/esm/node_modules/@primer/behaviors/dist/esm/utils/unique-id.js +0 -6
- package/esm/node_modules/@primer/behaviors/dist/esm/utils/user-agent.js +0 -9
- package/esm/node_modules/framer-motion/dist/es/animation/animators/instant.js +0 -40
- package/esm/node_modules/framer-motion/dist/es/animation/animators/js/driver-frameloop.js +0 -16
- package/esm/node_modules/framer-motion/dist/es/animation/animators/js/index.js +0 -303
- package/esm/node_modules/framer-motion/dist/es/animation/animators/waapi/create-accelerated-animation.js +0 -199
- package/esm/node_modules/framer-motion/dist/es/animation/animators/waapi/easing.js +0 -31
- package/esm/node_modules/framer-motion/dist/es/animation/animators/waapi/index.js +0 -23
- package/esm/node_modules/framer-motion/dist/es/animation/animators/waapi/utils/get-final-keyframe.js +0 -8
- package/esm/node_modules/framer-motion/dist/es/animation/generators/inertia.js +0 -87
- package/esm/node_modules/framer-motion/dist/es/animation/generators/keyframes.js +0 -51
- package/esm/node_modules/framer-motion/dist/es/animation/generators/spring/find.js +0 -89
- package/esm/node_modules/framer-motion/dist/es/animation/generators/spring/index.js +0 -129
- package/esm/node_modules/framer-motion/dist/es/animation/generators/utils/calc-duration.js +0 -17
- package/esm/node_modules/framer-motion/dist/es/animation/generators/utils/velocity.js +0 -9
- package/esm/node_modules/framer-motion/dist/es/animation/interfaces/motion-value.js +0 -101
- package/esm/node_modules/framer-motion/dist/es/animation/interfaces/single-value.js +0 -11
- package/esm/node_modules/framer-motion/dist/es/animation/interfaces/visual-element-target.js +0 -71
- package/esm/node_modules/framer-motion/dist/es/animation/interfaces/visual-element-variant.js +0 -63
- package/esm/node_modules/framer-motion/dist/es/animation/interfaces/visual-element.js +0 -24
- package/esm/node_modules/framer-motion/dist/es/animation/optimized-appear/data-id.js +0 -6
- package/esm/node_modules/framer-motion/dist/es/animation/utils/default-transitions.js +0 -40
- package/esm/node_modules/framer-motion/dist/es/animation/utils/is-animatable.js +0 -30
- package/esm/node_modules/framer-motion/dist/es/animation/utils/is-animation-controls.js +0 -5
- package/esm/node_modules/framer-motion/dist/es/animation/utils/is-keyframes-target.js +0 -5
- package/esm/node_modules/framer-motion/dist/es/animation/utils/is-none.js +0 -12
- package/esm/node_modules/framer-motion/dist/es/animation/utils/keyframes.js +0 -45
- package/esm/node_modules/framer-motion/dist/es/animation/utils/transitions.js +0 -13
- package/esm/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.js +0 -71
- package/esm/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.js +0 -56
- package/esm/node_modules/framer-motion/dist/es/components/AnimatePresence/index.js +0 -158
- package/esm/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.js +0 -40
- package/esm/node_modules/framer-motion/dist/es/context/LayoutGroupContext.js +0 -5
- package/esm/node_modules/framer-motion/dist/es/context/LazyContext.js +0 -5
- package/esm/node_modules/framer-motion/dist/es/context/MotionConfigContext.js +0 -12
- package/esm/node_modules/framer-motion/dist/es/context/MotionContext/create.js +0 -13
- package/esm/node_modules/framer-motion/dist/es/context/MotionContext/index.js +0 -5
- package/esm/node_modules/framer-motion/dist/es/context/MotionContext/utils.js +0 -17
- package/esm/node_modules/framer-motion/dist/es/context/PresenceContext.js +0 -8
- package/esm/node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.js +0 -8
- package/esm/node_modules/framer-motion/dist/es/debug/record.js +0 -7
- package/esm/node_modules/framer-motion/dist/es/easing/anticipate.js +0 -5
- package/esm/node_modules/framer-motion/dist/es/easing/back.js +0 -9
- package/esm/node_modules/framer-motion/dist/es/easing/circ.js +0 -8
- package/esm/node_modules/framer-motion/dist/es/easing/cubic-bezier.js +0 -51
- package/esm/node_modules/framer-motion/dist/es/easing/ease.js +0 -7
- package/esm/node_modules/framer-motion/dist/es/easing/modifiers/mirror.js +0 -5
- package/esm/node_modules/framer-motion/dist/es/easing/modifiers/reverse.js +0 -5
- package/esm/node_modules/framer-motion/dist/es/easing/utils/is-bezier-definition.js +0 -3
- package/esm/node_modules/framer-motion/dist/es/easing/utils/is-easing-array.js +0 -5
- package/esm/node_modules/framer-motion/dist/es/easing/utils/map.js +0 -37
- package/esm/node_modules/framer-motion/dist/es/events/add-dom-event.js +0 -6
- package/esm/node_modules/framer-motion/dist/es/events/add-pointer-event.js +0 -8
- package/esm/node_modules/framer-motion/dist/es/events/event-info.js +0 -15
- package/esm/node_modules/framer-motion/dist/es/events/utils/is-primary-pointer.js +0 -18
- package/esm/node_modules/framer-motion/dist/es/frameloop/batcher.js +0 -60
- package/esm/node_modules/framer-motion/dist/es/frameloop/frame.js +0 -6
- package/esm/node_modules/framer-motion/dist/es/frameloop/render-step.js +0 -104
- package/esm/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.js +0 -457
- package/esm/node_modules/framer-motion/dist/es/gestures/drag/index.js +0 -27
- package/esm/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.js +0 -125
- package/esm/node_modules/framer-motion/dist/es/gestures/drag/utils/lock.js +0 -53
- package/esm/node_modules/framer-motion/dist/es/gestures/focus.js +0 -41
- package/esm/node_modules/framer-motion/dist/es/gestures/hover.js +0 -32
- package/esm/node_modules/framer-motion/dist/es/gestures/pan/PanSession.js +0 -148
- package/esm/node_modules/framer-motion/dist/es/gestures/pan/index.js +0 -46
- package/esm/node_modules/framer-motion/dist/es/gestures/press.js +0 -120
- package/esm/node_modules/framer-motion/dist/es/gestures/utils/is-node-or-child.js +0 -20
- package/esm/node_modules/framer-motion/dist/es/motion/features/Feature.js +0 -9
- package/esm/node_modules/framer-motion/dist/es/motion/features/animation/exit.js +0 -31
- package/esm/node_modules/framer-motion/dist/es/motion/features/animation/index.js +0 -38
- package/esm/node_modules/framer-motion/dist/es/motion/features/animations.js +0 -13
- package/esm/node_modules/framer-motion/dist/es/motion/features/definitions.js +0 -28
- package/esm/node_modules/framer-motion/dist/es/motion/features/drag.js +0 -17
- package/esm/node_modules/framer-motion/dist/es/motion/features/gestures.js +0 -21
- package/esm/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.js +0 -131
- package/esm/node_modules/framer-motion/dist/es/motion/features/layout.js +0 -11
- package/esm/node_modules/framer-motion/dist/es/motion/features/load-features.js +0 -12
- package/esm/node_modules/framer-motion/dist/es/motion/features/viewport/index.js +0 -72
- package/esm/node_modules/framer-motion/dist/es/motion/features/viewport/observers.js +0 -49
- package/esm/node_modules/framer-motion/dist/es/motion/index.js +0 -79
- package/esm/node_modules/framer-motion/dist/es/motion/utils/is-forced-motion-value.js +0 -11
- package/esm/node_modules/framer-motion/dist/es/motion/utils/symbol.js +0 -3
- package/esm/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.js +0 -33
- package/esm/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.js +0 -75
- package/esm/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.js +0 -81
- package/esm/node_modules/framer-motion/dist/es/motion/utils/valid-prop.js +0 -59
- package/esm/node_modules/framer-motion/dist/es/projection/animation/mix-values.js +0 -93
- package/esm/node_modules/framer-motion/dist/es/projection/geometry/conversion.js +0 -33
- package/esm/node_modules/framer-motion/dist/es/projection/geometry/copy.js +0 -20
- package/esm/node_modules/framer-motion/dist/es/projection/geometry/delta-apply.js +0 -122
- package/esm/node_modules/framer-motion/dist/es/projection/geometry/delta-calc.js +0 -41
- package/esm/node_modules/framer-motion/dist/es/projection/geometry/delta-remove.js +0 -54
- package/esm/node_modules/framer-motion/dist/es/projection/geometry/models.js +0 -17
- package/esm/node_modules/framer-motion/dist/es/projection/geometry/utils.js +0 -25
- package/esm/node_modules/framer-motion/dist/es/projection/node/DocumentProjectionNode.js +0 -13
- package/esm/node_modules/framer-motion/dist/es/projection/node/HTMLProjectionNode.js +0 -27
- package/esm/node_modules/framer-motion/dist/es/projection/node/create-projection-node.js +0 -1494
- package/esm/node_modules/framer-motion/dist/es/projection/node/state.js +0 -19
- package/esm/node_modules/framer-motion/dist/es/projection/shared/stack.js +0 -112
- package/esm/node_modules/framer-motion/dist/es/projection/styles/scale-border-radius.js +0 -41
- package/esm/node_modules/framer-motion/dist/es/projection/styles/scale-box-shadow.js +0 -35
- package/esm/node_modules/framer-motion/dist/es/projection/styles/scale-correction.js +0 -6
- package/esm/node_modules/framer-motion/dist/es/projection/styles/transform.js +0 -42
- package/esm/node_modules/framer-motion/dist/es/projection/utils/each-axis.js +0 -5
- package/esm/node_modules/framer-motion/dist/es/projection/utils/has-transform.js +0 -24
- package/esm/node_modules/framer-motion/dist/es/projection/utils/measure.js +0 -17
- package/esm/node_modules/framer-motion/dist/es/render/VisualElement.js +0 -507
- package/esm/node_modules/framer-motion/dist/es/render/dom/DOMVisualElement.js +0 -48
- package/esm/node_modules/framer-motion/dist/es/render/dom/create-visual-element.js +0 -11
- package/esm/node_modules/framer-motion/dist/es/render/dom/motion-proxy.js +0 -47
- package/esm/node_modules/framer-motion/dist/es/render/dom/motion.js +0 -23
- package/esm/node_modules/framer-motion/dist/es/render/dom/use-render.js +0 -35
- package/esm/node_modules/framer-motion/dist/es/render/dom/utils/camel-to-dash.js +0 -6
- package/esm/node_modules/framer-motion/dist/es/render/dom/utils/create-config.js +0 -19
- package/esm/node_modules/framer-motion/dist/es/render/dom/utils/css-variables-conversion.js +0 -89
- package/esm/node_modules/framer-motion/dist/es/render/dom/utils/filter-props.js +0 -57
- package/esm/node_modules/framer-motion/dist/es/render/dom/utils/is-css-variable.js +0 -6
- package/esm/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.js +0 -30
- package/esm/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-element.js +0 -5
- package/esm/node_modules/framer-motion/dist/es/render/dom/utils/parse-dom-variant.js +0 -15
- package/esm/node_modules/framer-motion/dist/es/render/dom/utils/unit-conversion.js +0 -230
- package/esm/node_modules/framer-motion/dist/es/render/dom/value-types/animatable-none.js +0 -15
- package/esm/node_modules/framer-motion/dist/es/render/dom/value-types/defaults.js +0 -30
- package/esm/node_modules/framer-motion/dist/es/render/dom/value-types/dimensions.js +0 -15
- package/esm/node_modules/framer-motion/dist/es/render/dom/value-types/find.js +0 -15
- package/esm/node_modules/framer-motion/dist/es/render/dom/value-types/get-as-type.js +0 -10
- package/esm/node_modules/framer-motion/dist/es/render/dom/value-types/number.js +0 -72
- package/esm/node_modules/framer-motion/dist/es/render/dom/value-types/test.js +0 -6
- package/esm/node_modules/framer-motion/dist/es/render/dom/value-types/type-auto.js +0 -9
- package/esm/node_modules/framer-motion/dist/es/render/dom/value-types/type-int.js +0 -8
- package/esm/node_modules/framer-motion/dist/es/render/html/HTMLVisualElement.js +0 -55
- package/esm/node_modules/framer-motion/dist/es/render/html/config-motion.js +0 -12
- package/esm/node_modules/framer-motion/dist/es/render/html/use-props.js +0 -57
- package/esm/node_modules/framer-motion/dist/es/render/html/utils/build-styles.js +0 -74
- package/esm/node_modules/framer-motion/dist/es/render/html/utils/build-transform.js +0 -45
- package/esm/node_modules/framer-motion/dist/es/render/html/utils/create-render-state.js +0 -8
- package/esm/node_modules/framer-motion/dist/es/render/html/utils/render.js +0 -9
- package/esm/node_modules/framer-motion/dist/es/render/html/utils/scrape-motion-values.js +0 -17
- package/esm/node_modules/framer-motion/dist/es/render/html/utils/transform.js +0 -28
- package/esm/node_modules/framer-motion/dist/es/render/store.js +0 -3
- package/esm/node_modules/framer-motion/dist/es/render/svg/SVGVisualElement.js +0 -46
- package/esm/node_modules/framer-motion/dist/es/render/svg/config-motion.js +0 -40
- package/esm/node_modules/framer-motion/dist/es/render/svg/lowercase-elements.js +0 -33
- package/esm/node_modules/framer-motion/dist/es/render/svg/use-props.js +0 -24
- package/esm/node_modules/framer-motion/dist/es/render/svg/utils/build-attrs.js +0 -52
- package/esm/node_modules/framer-motion/dist/es/render/svg/utils/camel-case-attrs.js +0 -30
- package/esm/node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.js +0 -8
- package/esm/node_modules/framer-motion/dist/es/render/svg/utils/is-svg-tag.js +0 -3
- package/esm/node_modules/framer-motion/dist/es/render/svg/utils/path.js +0 -32
- package/esm/node_modules/framer-motion/dist/es/render/svg/utils/render.js +0 -12
- package/esm/node_modules/framer-motion/dist/es/render/svg/utils/scrape-motion-values.js +0 -18
- package/esm/node_modules/framer-motion/dist/es/render/svg/utils/transform-origin.js +0 -18
- package/esm/node_modules/framer-motion/dist/es/render/utils/animation-state.js +0 -319
- package/esm/node_modules/framer-motion/dist/es/render/utils/compare-by-depth.js +0 -3
- package/esm/node_modules/framer-motion/dist/es/render/utils/flat-tree.js +0 -24
- package/esm/node_modules/framer-motion/dist/es/render/utils/is-controlling-variants.js +0 -13
- package/esm/node_modules/framer-motion/dist/es/render/utils/is-variant-label.js +0 -8
- package/esm/node_modules/framer-motion/dist/es/render/utils/motion-values.js +0 -63
- package/esm/node_modules/framer-motion/dist/es/render/utils/resolve-dynamic-variants.js +0 -24
- package/esm/node_modules/framer-motion/dist/es/render/utils/resolve-variants.js +0 -26
- package/esm/node_modules/framer-motion/dist/es/render/utils/setters.js +0 -101
- package/esm/node_modules/framer-motion/dist/es/render/utils/variant-props.js +0 -12
- package/esm/node_modules/framer-motion/dist/es/utils/array.js +0 -11
- package/esm/node_modules/framer-motion/dist/es/utils/clamp.js +0 -3
- package/esm/node_modules/framer-motion/dist/es/utils/delay.js +0 -19
- package/esm/node_modules/framer-motion/dist/es/utils/distance.js +0 -9
- package/esm/node_modules/framer-motion/dist/es/utils/errors.js +0 -18
- package/esm/node_modules/framer-motion/dist/es/utils/hsla-to-rgba.js +0 -42
- package/esm/node_modules/framer-motion/dist/es/utils/interpolate.js +0 -92
- package/esm/node_modules/framer-motion/dist/es/utils/is-browser.js +0 -3
- package/esm/node_modules/framer-motion/dist/es/utils/is-numerical-string.js +0 -6
- package/esm/node_modules/framer-motion/dist/es/utils/is-ref-object.js +0 -6
- package/esm/node_modules/framer-motion/dist/es/utils/is-zero-value-string.js +0 -6
- package/esm/node_modules/framer-motion/dist/es/utils/memo.js +0 -10
- package/esm/node_modules/framer-motion/dist/es/utils/mix-color.js +0 -40
- package/esm/node_modules/framer-motion/dist/es/utils/mix-complex.js +0 -64
- package/esm/node_modules/framer-motion/dist/es/utils/mix.js +0 -24
- package/esm/node_modules/framer-motion/dist/es/utils/noop.js +0 -3
- package/esm/node_modules/framer-motion/dist/es/utils/offsets/default.js +0 -9
- package/esm/node_modules/framer-motion/dist/es/utils/offsets/fill.js +0 -12
- package/esm/node_modules/framer-motion/dist/es/utils/offsets/time.js +0 -5
- package/esm/node_modules/framer-motion/dist/es/utils/pipe.js +0 -11
- package/esm/node_modules/framer-motion/dist/es/utils/progress.js +0 -18
- package/esm/node_modules/framer-motion/dist/es/utils/reduced-motion/index.js +0 -19
- package/esm/node_modules/framer-motion/dist/es/utils/reduced-motion/state.js +0 -5
- package/esm/node_modules/framer-motion/dist/es/utils/resolve-value.js +0 -11
- package/esm/node_modules/framer-motion/dist/es/utils/shallow-compare.js +0 -14
- package/esm/node_modules/framer-motion/dist/es/utils/subscription-manager.js +0 -40
- package/esm/node_modules/framer-motion/dist/es/utils/time-conversion.js +0 -10
- package/esm/node_modules/framer-motion/dist/es/utils/use-constant.js +0 -18
- package/esm/node_modules/framer-motion/dist/es/utils/use-force-update.js +0 -19
- package/esm/node_modules/framer-motion/dist/es/utils/use-instant-transition-state.js +0 -5
- package/esm/node_modules/framer-motion/dist/es/utils/use-is-mounted.js +0 -15
- package/esm/node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.js +0 -6
- package/esm/node_modules/framer-motion/dist/es/utils/use-unmount-effect.js +0 -7
- package/esm/node_modules/framer-motion/dist/es/utils/velocity-per-second.js +0 -11
- package/esm/node_modules/framer-motion/dist/es/utils/warn-once.js +0 -11
- package/esm/node_modules/framer-motion/dist/es/value/index.js +0 -331
- package/esm/node_modules/framer-motion/dist/es/value/types/color/hex.js +0 -40
- package/esm/node_modules/framer-motion/dist/es/value/types/color/hsla.js +0 -22
- package/esm/node_modules/framer-motion/dist/es/value/types/color/index.js +0 -28
- package/esm/node_modules/framer-motion/dist/es/value/types/color/rgba.js +0 -25
- package/esm/node_modules/framer-motion/dist/es/value/types/color/utils.js +0 -23
- package/esm/node_modules/framer-motion/dist/es/value/types/complex/filter.js +0 -30
- package/esm/node_modules/framer-motion/dist/es/value/types/complex/index.js +0 -92
- package/esm/node_modules/framer-motion/dist/es/value/types/numbers/index.js +0 -17
- package/esm/node_modules/framer-motion/dist/es/value/types/numbers/units.js +0 -19
- package/esm/node_modules/framer-motion/dist/es/value/types/utils.js +0 -15
- package/esm/node_modules/framer-motion/dist/es/value/use-will-change/is.js +0 -7
- package/esm/node_modules/framer-motion/dist/es/value/utils/is-motion-value.js +0 -3
- package/esm/node_modules/framer-motion/dist/es/value/utils/resolve-motion-value.js +0 -16
- package/esm/node_modules/lodash.debounce/index.js +0 -363
- package/esm/node_modules/lodash.throttle/index.js +0 -424
- package/esm/node_modules/lodash.toarray/index.js +0 -849
- package/esm/node_modules/react/cjs/react-jsx-runtime.development.js +0 -1140
- package/esm/node_modules/react/cjs/react-jsx-runtime.production.min.js +0 -53
- package/esm/node_modules/react/jsx-runtime.js +0 -12
- package/esm/node_modules/react-dom/cjs/react-dom.development.js +0 -4940
- package/esm/node_modules/react-dom/cjs/react-dom.production.min.js +0 -7140
- package/esm/node_modules/react-dom/index.js +0 -39
- package/esm/node_modules/react-is/cjs/react-is.development.js +0 -211
- package/esm/node_modules/react-is/cjs/react-is.production.min.js +0 -123
- package/esm/node_modules/react-is/index.js +0 -12
- package/esm/node_modules/scheduler/cjs/scheduler.development.js +0 -528
- package/esm/node_modules/scheduler/cjs/scheduler.production.min.js +0 -267
- package/esm/node_modules/scheduler/index.js +0 -17
- package/esm/node_modules/tabbable/dist/index.esm.js +0 -560
- package/esm/packages/icons/esm/AHorizontalLine.js +0 -15
- package/esm/packages/icons/esm/AInCircleFilled.js +0 -21
- package/esm/packages/icons/esm/AVertialLine.js +0 -15
- package/esm/packages/icons/esm/Ai.js +0 -23
- package/esm/packages/icons/esm/AiColor.js +0 -23
- package/esm/packages/icons/esm/AiSad.js +0 -24
- package/esm/packages/icons/esm/Alarm.js +0 -17
- package/esm/packages/icons/esm/AppleColor.js +0 -18
- package/esm/packages/icons/esm/ArrowBelow.js +0 -17
- package/esm/packages/icons/esm/ArrowDiagonal.js +0 -15
- package/esm/packages/icons/esm/ArrowDown.js +0 -17
- package/esm/packages/icons/esm/ArrowLeft.js +0 -17
- package/esm/packages/icons/esm/ArrowLeftCircle.js +0 -15
- package/esm/packages/icons/esm/ArrowLeftLimit.js +0 -17
- package/esm/packages/icons/esm/ArrowLeftRight.js +0 -17
- package/esm/packages/icons/esm/ArrowRight.js +0 -17
- package/esm/packages/icons/esm/ArrowRightCircle.js +0 -15
- package/esm/packages/icons/esm/ArrowRightLimit.js +0 -17
- package/esm/packages/icons/esm/ArrowUp.js +0 -17
- package/esm/packages/icons/esm/ArrowUpDown.js +0 -17
- package/esm/packages/icons/esm/ArrowUpLimit.js +0 -17
- package/esm/packages/icons/esm/Barchart.js +0 -15
- package/esm/packages/icons/esm/Book.js +0 -17
- package/esm/packages/icons/esm/BookColor.js +0 -28
- package/esm/packages/icons/esm/Bookmark.js +0 -17
- package/esm/packages/icons/esm/BookmarkAnimation.js +0 -17
- package/esm/packages/icons/esm/Box.js +0 -24
- package/esm/packages/icons/esm/BoxPlus.js +0 -15
- package/esm/packages/icons/esm/BusColor.js +0 -36
- package/esm/packages/icons/esm/Calendar.js +0 -22
- package/esm/packages/icons/esm/CalendarCheck.js +0 -17
- package/esm/packages/icons/esm/CalendarCheckColor.js +0 -20
- package/esm/packages/icons/esm/CalendarColor.js +0 -36
- package/esm/packages/icons/esm/Camera.js +0 -22
- package/esm/packages/icons/esm/CameraColor.js +0 -30
- package/esm/packages/icons/esm/Card.js +0 -17
- package/esm/packages/icons/esm/CardsPercent.js +0 -19
- package/esm/packages/icons/esm/CardsPercentColor.js +0 -23
- package/esm/packages/icons/esm/CaretDown.js +0 -15
- package/esm/packages/icons/esm/CaretLeft.js +0 -15
- package/esm/packages/icons/esm/CaretRight.js +0 -15
- package/esm/packages/icons/esm/CaretUp.js +0 -15
- package/esm/packages/icons/esm/Cart.js +0 -17
- package/esm/packages/icons/esm/ChatBubble.js +0 -17
- package/esm/packages/icons/esm/ChatBubbleBadgeColor.js +0 -32
- package/esm/packages/icons/esm/ChatBubbleCorrect.js +0 -24
- package/esm/packages/icons/esm/ChatBubbleCorrectColor.js +0 -22
- package/esm/packages/icons/esm/ChatBubbleDots.js +0 -17
- package/esm/packages/icons/esm/ChatBubbleQuestion.js +0 -17
- package/esm/packages/icons/esm/ChatBubbleQuestionAnimation.js +0 -16
- package/esm/packages/icons/esm/ChatBubbleQuestionColor.js +0 -20
- package/esm/packages/icons/esm/Check.js +0 -15
- package/esm/packages/icons/esm/CheckInCircle.js +0 -17
- package/esm/packages/icons/esm/CheckInCircleColor.js +0 -20
- package/esm/packages/icons/esm/CheckInCircleLine.js +0 -20
- package/esm/packages/icons/esm/ChevronDown.js +0 -17
- package/esm/packages/icons/esm/ChevronDownTwo.js +0 -23
- package/esm/packages/icons/esm/ChevronLeft.js +0 -17
- package/esm/packages/icons/esm/ChevronRight.js +0 -17
- package/esm/packages/icons/esm/ChevronRightTwo.js +0 -23
- package/esm/packages/icons/esm/ChevronUp.js +0 -17
- package/esm/packages/icons/esm/ChevronUpTwo.js +0 -23
- package/esm/packages/icons/esm/Circles.js +0 -17
- package/esm/packages/icons/esm/Clip.js +0 -15
- package/esm/packages/icons/esm/Close.js +0 -17
- package/esm/packages/icons/esm/CloseInCircle.js +0 -17
- package/esm/packages/icons/esm/Coin.js +0 -17
- package/esm/packages/icons/esm/Contact.js +0 -17
- package/esm/packages/icons/esm/Copy.js +0 -22
- package/esm/packages/icons/esm/Correct.js +0 -16
- package/esm/packages/icons/esm/Coupon.js +0 -17
- package/esm/packages/icons/esm/Crop.js +0 -24
- package/esm/packages/icons/esm/Crown.js +0 -17
- package/esm/packages/icons/esm/Curriculum.js +0 -31
- package/esm/packages/icons/esm/CurriculumColor.js +0 -38
- package/esm/packages/icons/esm/Cursor.js +0 -22
- package/esm/packages/icons/esm/Delete.js +0 -17
- package/esm/packages/icons/esm/Document.js +0 -22
- package/esm/packages/icons/esm/Dots.js +0 -17
- package/esm/packages/icons/esm/Download.js +0 -18
- package/esm/packages/icons/esm/Emoji.js +0 -17
- package/esm/packages/icons/esm/EmojiPlus.js +0 -22
- package/esm/packages/icons/esm/EmojiPlusDash.js +0 -17
- package/esm/packages/icons/esm/Eng.js +0 -20
- package/esm/packages/icons/esm/Enter.js +0 -17
- package/esm/packages/icons/esm/Equal.js +0 -17
- package/esm/packages/icons/esm/Eraser.js +0 -17
- package/esm/packages/icons/esm/ExclamationPointInCircle.js +0 -17
- package/esm/packages/icons/esm/ExternalLink.js +0 -27
- package/esm/packages/icons/esm/EyeOff.js +0 -15
- package/esm/packages/icons/esm/EyeOn.js +0 -22
- package/esm/packages/icons/esm/EyesTwo.js +0 -15
- package/esm/packages/icons/esm/FaceHappy.js +0 -17
- package/esm/packages/icons/esm/FaceSad.js +0 -17
- package/esm/packages/icons/esm/Facebook.js +0 -15
- package/esm/packages/icons/esm/FacebookColor.js +0 -20
- package/esm/packages/icons/esm/Filter.js +0 -17
- package/esm/packages/icons/esm/Find.js +0 -17
- package/esm/packages/icons/esm/Fire.js +0 -15
- package/esm/packages/icons/esm/FireColor.js +0 -27
- package/esm/packages/icons/esm/Flag.js +0 -15
- package/esm/packages/icons/esm/Folder.js +0 -17
- package/esm/packages/icons/esm/Frame.js +0 -17
- package/esm/packages/icons/esm/Glasses.js +0 -17
- package/esm/packages/icons/esm/Global.js +0 -17
- package/esm/packages/icons/esm/GoogleColor.js +0 -35
- package/esm/packages/icons/esm/Graph.js +0 -17
- package/esm/packages/icons/esm/Hair.js +0 -17
- package/esm/packages/icons/esm/Headphone.js +0 -17
- package/esm/packages/icons/esm/Heart.js +0 -17
- package/esm/packages/icons/esm/Home.js +0 -17
- package/esm/packages/icons/esm/Infinite.js +0 -15
- package/esm/packages/icons/esm/InfoInCircle.js +0 -17
- package/esm/packages/icons/esm/Instagram.js +0 -17
- package/esm/packages/icons/esm/KakaoColor.js +0 -20
- package/esm/packages/icons/esm/Kor.js +0 -20
- package/esm/packages/icons/esm/LandscapeArrow.js +0 -20
- package/esm/packages/icons/esm/League.js +0 -17
- package/esm/packages/icons/esm/Letter.js +0 -17
- package/esm/packages/icons/esm/LetterCrownColor.js +0 -26
- package/esm/packages/icons/esm/LetterCrownOpenColor.js +0 -35
- package/esm/packages/icons/esm/LetterHeartColor.js +0 -26
- package/esm/packages/icons/esm/LetterHeartOpenColor.js +0 -35
- package/esm/packages/icons/esm/LineThree.js +0 -17
- package/esm/packages/icons/esm/Link.js +0 -22
- package/esm/packages/icons/esm/Lock.js +0 -17
- package/esm/packages/icons/esm/LogoApple.js +0 -17
- package/esm/packages/icons/esm/LogoColor.js +0 -22
- package/esm/packages/icons/esm/LogoFacebook.js +0 -17
- package/esm/packages/icons/esm/LogoKakao.js +0 -17
- package/esm/packages/icons/esm/LogoNaver.js +0 -15
- package/esm/packages/icons/esm/MagicWand.js +0 -22
- package/esm/packages/icons/esm/Maxsize.js +0 -15
- package/esm/packages/icons/esm/Minsize.js +0 -17
- package/esm/packages/icons/esm/Minus.js +0 -17
- package/esm/packages/icons/esm/MinusInCircle.js +0 -17
- package/esm/packages/icons/esm/Moneybag.js +0 -17
- package/esm/packages/icons/esm/MoneybagColor.js +0 -20
- package/esm/packages/icons/esm/Moon.js +0 -15
- package/esm/packages/icons/esm/More.js +0 -17
- package/esm/packages/icons/esm/MyBubble.js +0 -17
- package/esm/packages/icons/esm/NaverColor.js +0 -18
- package/esm/packages/icons/esm/New.js +0 -22
- package/esm/packages/icons/esm/Note.js +0 -17
- package/esm/packages/icons/esm/NoteColor.js +0 -18
- package/esm/packages/icons/esm/NotePenColor.js +0 -46
- package/esm/packages/icons/esm/NumberFiveFilled.js +0 -17
- package/esm/packages/icons/esm/NumberFiveOutlined.js +0 -20
- package/esm/packages/icons/esm/NumberFourFilled.js +0 -17
- package/esm/packages/icons/esm/NumberFourOutlined.js +0 -20
- package/esm/packages/icons/esm/NumberOneFilled.js +0 -17
- package/esm/packages/icons/esm/NumberOneOutlined.js +0 -20
- package/esm/packages/icons/esm/NumberThreeFilled.js +0 -17
- package/esm/packages/icons/esm/NumberThreeOutlined.js +0 -20
- package/esm/packages/icons/esm/NumberTwoFilled.js +0 -17
- package/esm/packages/icons/esm/NumberTwoOutlined.js +0 -20
- package/esm/packages/icons/esm/Out.js +0 -17
- package/esm/packages/icons/esm/PalmTreeColor.js +0 -41
- package/esm/packages/icons/esm/PaperCheck.js +0 -36
- package/esm/packages/icons/esm/PaperPen.js +0 -31
- package/esm/packages/icons/esm/PaperPenColor.js +0 -20
- package/esm/packages/icons/esm/PaperTwo.js +0 -18
- package/esm/packages/icons/esm/Pause.js +0 -17
- package/esm/packages/icons/esm/Pen.js +0 -17
- package/esm/packages/icons/esm/PercentInCircle.js +0 -22
- package/esm/packages/icons/esm/Picture.js +0 -17
- package/esm/packages/icons/esm/Pill.js +0 -25
- package/esm/packages/icons/esm/PillColor.js +0 -18
- package/esm/packages/icons/esm/Pin.js +0 -17
- package/esm/packages/icons/esm/PinColorRed.js +0 -26
- package/esm/packages/icons/esm/Play.js +0 -15
- package/esm/packages/icons/esm/Plus.js +0 -17
- package/esm/packages/icons/esm/PlusInCircle.js +0 -17
- package/esm/packages/icons/esm/PointInCircle.js +0 -22
- package/esm/packages/icons/esm/PointInCircleColor.js +0 -27
- package/esm/packages/icons/esm/PortraitArrow.js +0 -20
- package/esm/packages/icons/esm/Present.js +0 -21
- package/esm/packages/icons/esm/PresentColor.js +0 -20
- package/esm/packages/icons/esm/Print.js +0 -20
- package/esm/packages/icons/esm/Problem.js +0 -15
- package/esm/packages/icons/esm/Profile.js +0 -17
- package/esm/packages/icons/esm/ProgressGradient.js +0 -41
- package/esm/packages/icons/esm/QuestionMarkInCircle.js +0 -17
- package/esm/packages/icons/esm/QuestionMarkInCircleOutlined.js +0 -20
- package/esm/packages/icons/esm/QuizColor.js +0 -28
- package/esm/packages/icons/esm/RaffleColor.js +0 -113
- package/esm/packages/icons/esm/Receipt.js +0 -17
- package/esm/packages/icons/esm/Refresh.js +0 -17
- package/esm/packages/icons/esm/Repeat.js +0 -15
- package/esm/packages/icons/esm/ReportColor.js +0 -30
- package/esm/packages/icons/esm/School.js +0 -20
- package/esm/packages/icons/esm/SchoolColor.js +0 -27
- package/esm/packages/icons/esm/Scroll.js +0 -22
- package/esm/packages/icons/esm/Search.js +0 -15
- package/esm/packages/icons/esm/Set.js +0 -20
- package/esm/packages/icons/esm/Setting.js +0 -17
- package/esm/packages/icons/esm/Share.js +0 -22
- package/esm/packages/icons/esm/ShieldCheck.js +0 -15
- package/esm/packages/icons/esm/Sidebar.js +0 -17
- package/esm/packages/icons/esm/Siren.js +0 -17
- package/esm/packages/icons/esm/Skipback.js +0 -17
- package/esm/packages/icons/esm/Skipforward.js +0 -17
- package/esm/packages/icons/esm/SoundOff.js +0 -15
- package/esm/packages/icons/esm/SoundOn.js +0 -25
- package/esm/packages/icons/esm/SoundPaper.js +0 -20
- package/esm/packages/icons/esm/Speaker.js +0 -17
- package/esm/packages/icons/esm/Stackup.js +0 -27
- package/esm/packages/icons/esm/Star.js +0 -17
- package/esm/packages/icons/esm/StarColor.js +0 -21
- package/esm/packages/icons/esm/Store.js +0 -15
- package/esm/packages/icons/esm/Sun.js +0 -15
- package/esm/packages/icons/esm/Sync.js +0 -17
- package/esm/packages/icons/esm/TestUploadColor.js +0 -26
- package/esm/packages/icons/esm/Thumbdown.js +0 -17
- package/esm/packages/icons/esm/Thumbup.js +0 -17
- package/esm/packages/icons/esm/Thunder.js +0 -17
- package/esm/packages/icons/esm/Ticket.js +0 -17
- package/esm/packages/icons/esm/TicketColor.js +0 -29
- package/esm/packages/icons/esm/Time.js +0 -17
- package/esm/packages/icons/esm/Timer.js +0 -17
- package/esm/packages/icons/esm/Top.js +0 -17
- package/esm/packages/icons/esm/Touch.js +0 -26
- package/esm/packages/icons/esm/Trash.js +0 -17
- package/esm/packages/icons/esm/Treasurebox.js +0 -22
- package/esm/packages/icons/esm/Trophy.js +0 -17
- package/esm/packages/icons/esm/Twinkle.js +0 -15
- package/esm/packages/icons/esm/TwinkleColor.js +0 -48
- package/esm/packages/icons/esm/Undo.js +0 -17
- package/esm/packages/icons/esm/University.js +0 -26
- package/esm/packages/icons/esm/UserBlocked.js +0 -17
- package/esm/packages/icons/esm/UserCheck.js +0 -17
- package/esm/packages/icons/esm/UserPlus.js +0 -17
- package/esm/packages/icons/esm/UserTwo.js +0 -23
- package/esm/packages/icons/esm/Video.js +0 -17
- package/esm/packages/icons/esm/VideoColor.js +0 -18
- package/esm/packages/icons/esm/VoteColor.js +0 -24
- package/esm/packages/icons/esm/Warning.js +0 -17
- package/esm/packages/icons/esm/Wifi.js +0 -27
- package/esm/packages/icons/esm/Workbook.js +0 -28
- package/esm/packages/icons/esm/WorkbookColor.js +0 -29
- package/esm/packages/icons/esm/Wrong.js +0 -20
- package/esm/packages/icons/esm/Youtube.js +0 -17
- package/esm/packages/icons/esm/_virtual/_rollupPluginBabelHelpers.js +0 -16
- package/esm/packages/icons/esm/index.js +0 -242
- package/esm/packages/token-studio/esm/foundation/breakpoint/device.js +0 -7
- package/esm/packages/token-studio/esm/foundation/gradient/colorStopList/index.js +0 -9
- package/esm/packages/token-studio/esm/foundation/gradient/direction/index.js +0 -9
- package/esm/packages/token-studio/esm/foundation/opacity/index.js +0 -5
- package/esm/packages/token-studio/esm/foundation/palette/index.js +0 -169
- package/esm/packages/token-studio/esm/foundation/rounding/index.js +0 -13
- package/esm/packages/token-studio/esm/foundation/shadow/index.js +0 -5
- package/esm/packages/token-studio/esm/foundation/spacing/index.js +0 -56
- package/esm/packages/token-studio/esm/foundation/typography/fontSize/index.js +0 -18
- package/esm/packages/token-studio/esm/foundation/typography/fontWeight/index.js +0 -13
- package/esm/packages/token-studio/esm/foundation/typography/lineHeight/index.js +0 -6
- package/esm/packages/token-studio/esm/token/breakpoints/index.js +0 -6
- package/esm/packages/token-studio/esm/token/color/gpai/dark.js +0 -223
- package/esm/packages/token-studio/esm/token/color/gpai/light.js +0 -223
- package/esm/packages/token-studio/esm/token/color/index.js +0 -223
- package/esm/packages/token-studio/esm/token/elevation/index.js +0 -7
- package/esm/packages/token-studio/esm/token/gradient/index.js +0 -41
- package/esm/packages/token-studio/esm/token/opacity/index.js +0 -7
- package/esm/packages/token-studio/esm/token/radii/index.js +0 -15
- package/esm/packages/token-studio/esm/token/space/index.js +0 -55
- package/esm/packages/token-studio/esm/token/typography/fontSizes.js +0 -17
- package/esm/packages/token-studio/esm/token/typography/fontWeights.js +0 -9
- package/esm/packages/token-studio/esm/token/typography/index.js +0 -133
- package/esm/packages/token-studio/esm/token/typography/lineHeights.js +0 -8
- package/esm/packages/utils/esm/commaizeNumber.js +0 -10
- package/esm/packages/utils/esm/forcePixelValue.js +0 -8
- package/esm/packages/utils/esm/isArray.js +0 -3
- package/esm/packages/utils/esm/isFunction.js +0 -3
- package/esm/packages/utils/esm/isNullable.js +0 -3
- package/esm/packages/utils/esm/noop.js +0 -6
- package/esm/packages/utils/esm/scrollIntoView.js +0 -46
|
@@ -1,731 +0,0 @@
|
|
|
1
|
-
import { offset as offset$1, shift as shift$1, flip as flip$1, computePosition as computePosition$1, arrow as arrow$1 } from '../../core/dist/floating-ui.core.js';
|
|
2
|
-
import { createCoords, rectToClientRect, round, floor, max, min } from '../../utils/dist/floating-ui.utils.js';
|
|
3
|
-
import { getOverflowAncestors, isElement, getWindow, getFrameElement, getComputedStyle as getComputedStyle$1, getDocumentElement, isHTMLElement, isWebKit, isTopLayer, getNodeName, isOverflowElement, getNodeScroll, getParentNode, isLastTraversableNode, isTableElement, isContainingBlock, getContainingBlock } from '../../utils/dist/floating-ui.utils.dom.js';
|
|
4
|
-
|
|
5
|
-
function getCssDimensions(element) {
|
|
6
|
-
const css = getComputedStyle$1(element);
|
|
7
|
-
// In testing environments, the `width` and `height` properties are empty
|
|
8
|
-
// strings for SVG elements, returning NaN. Fallback to `0` in this case.
|
|
9
|
-
let width = parseFloat(css.width) || 0;
|
|
10
|
-
let height = parseFloat(css.height) || 0;
|
|
11
|
-
const hasOffset = isHTMLElement(element);
|
|
12
|
-
const offsetWidth = hasOffset ? element.offsetWidth : width;
|
|
13
|
-
const offsetHeight = hasOffset ? element.offsetHeight : height;
|
|
14
|
-
const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
|
|
15
|
-
if (shouldFallback) {
|
|
16
|
-
width = offsetWidth;
|
|
17
|
-
height = offsetHeight;
|
|
18
|
-
}
|
|
19
|
-
return {
|
|
20
|
-
width,
|
|
21
|
-
height,
|
|
22
|
-
$: shouldFallback
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
function unwrapElement(element) {
|
|
27
|
-
return !isElement(element) ? element.contextElement : element;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
function getScale(element) {
|
|
31
|
-
const domElement = unwrapElement(element);
|
|
32
|
-
if (!isHTMLElement(domElement)) {
|
|
33
|
-
return createCoords(1);
|
|
34
|
-
}
|
|
35
|
-
const rect = domElement.getBoundingClientRect();
|
|
36
|
-
const {
|
|
37
|
-
width,
|
|
38
|
-
height,
|
|
39
|
-
$
|
|
40
|
-
} = getCssDimensions(domElement);
|
|
41
|
-
let x = ($ ? round(rect.width) : rect.width) / width;
|
|
42
|
-
let y = ($ ? round(rect.height) : rect.height) / height;
|
|
43
|
-
|
|
44
|
-
// 0, NaN, or Infinity should always fallback to 1.
|
|
45
|
-
|
|
46
|
-
if (!x || !Number.isFinite(x)) {
|
|
47
|
-
x = 1;
|
|
48
|
-
}
|
|
49
|
-
if (!y || !Number.isFinite(y)) {
|
|
50
|
-
y = 1;
|
|
51
|
-
}
|
|
52
|
-
return {
|
|
53
|
-
x,
|
|
54
|
-
y
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
const noOffsets = /*#__PURE__*/createCoords(0);
|
|
59
|
-
function getVisualOffsets(element) {
|
|
60
|
-
const win = getWindow(element);
|
|
61
|
-
if (!isWebKit() || !win.visualViewport) {
|
|
62
|
-
return noOffsets;
|
|
63
|
-
}
|
|
64
|
-
return {
|
|
65
|
-
x: win.visualViewport.offsetLeft,
|
|
66
|
-
y: win.visualViewport.offsetTop
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
|
|
70
|
-
if (isFixed === void 0) {
|
|
71
|
-
isFixed = false;
|
|
72
|
-
}
|
|
73
|
-
if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {
|
|
74
|
-
return false;
|
|
75
|
-
}
|
|
76
|
-
return isFixed;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
|
|
80
|
-
if (includeScale === void 0) {
|
|
81
|
-
includeScale = false;
|
|
82
|
-
}
|
|
83
|
-
if (isFixedStrategy === void 0) {
|
|
84
|
-
isFixedStrategy = false;
|
|
85
|
-
}
|
|
86
|
-
const clientRect = element.getBoundingClientRect();
|
|
87
|
-
const domElement = unwrapElement(element);
|
|
88
|
-
let scale = createCoords(1);
|
|
89
|
-
if (includeScale) {
|
|
90
|
-
if (offsetParent) {
|
|
91
|
-
if (isElement(offsetParent)) {
|
|
92
|
-
scale = getScale(offsetParent);
|
|
93
|
-
}
|
|
94
|
-
} else {
|
|
95
|
-
scale = getScale(element);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);
|
|
99
|
-
let x = (clientRect.left + visualOffsets.x) / scale.x;
|
|
100
|
-
let y = (clientRect.top + visualOffsets.y) / scale.y;
|
|
101
|
-
let width = clientRect.width / scale.x;
|
|
102
|
-
let height = clientRect.height / scale.y;
|
|
103
|
-
if (domElement) {
|
|
104
|
-
const win = getWindow(domElement);
|
|
105
|
-
const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
|
|
106
|
-
let currentWin = win;
|
|
107
|
-
let currentIFrame = getFrameElement(currentWin);
|
|
108
|
-
while (currentIFrame && offsetParent && offsetWin !== currentWin) {
|
|
109
|
-
const iframeScale = getScale(currentIFrame);
|
|
110
|
-
const iframeRect = currentIFrame.getBoundingClientRect();
|
|
111
|
-
const css = getComputedStyle$1(currentIFrame);
|
|
112
|
-
const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
|
|
113
|
-
const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
|
|
114
|
-
x *= iframeScale.x;
|
|
115
|
-
y *= iframeScale.y;
|
|
116
|
-
width *= iframeScale.x;
|
|
117
|
-
height *= iframeScale.y;
|
|
118
|
-
x += left;
|
|
119
|
-
y += top;
|
|
120
|
-
currentWin = getWindow(currentIFrame);
|
|
121
|
-
currentIFrame = getFrameElement(currentWin);
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
return rectToClientRect({
|
|
125
|
-
width,
|
|
126
|
-
height,
|
|
127
|
-
x,
|
|
128
|
-
y
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
// If <html> has a CSS width greater than the viewport, then this will be
|
|
133
|
-
// incorrect for RTL.
|
|
134
|
-
function getWindowScrollBarX(element, rect) {
|
|
135
|
-
const leftScroll = getNodeScroll(element).scrollLeft;
|
|
136
|
-
if (!rect) {
|
|
137
|
-
return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;
|
|
138
|
-
}
|
|
139
|
-
return rect.left + leftScroll;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
function getHTMLOffset(documentElement, scroll) {
|
|
143
|
-
const htmlRect = documentElement.getBoundingClientRect();
|
|
144
|
-
const x = htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect);
|
|
145
|
-
const y = htmlRect.top + scroll.scrollTop;
|
|
146
|
-
return {
|
|
147
|
-
x,
|
|
148
|
-
y
|
|
149
|
-
};
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
|
|
153
|
-
let {
|
|
154
|
-
elements,
|
|
155
|
-
rect,
|
|
156
|
-
offsetParent,
|
|
157
|
-
strategy
|
|
158
|
-
} = _ref;
|
|
159
|
-
const isFixed = strategy === 'fixed';
|
|
160
|
-
const documentElement = getDocumentElement(offsetParent);
|
|
161
|
-
const topLayer = elements ? isTopLayer(elements.floating) : false;
|
|
162
|
-
if (offsetParent === documentElement || topLayer && isFixed) {
|
|
163
|
-
return rect;
|
|
164
|
-
}
|
|
165
|
-
let scroll = {
|
|
166
|
-
scrollLeft: 0,
|
|
167
|
-
scrollTop: 0
|
|
168
|
-
};
|
|
169
|
-
let scale = createCoords(1);
|
|
170
|
-
const offsets = createCoords(0);
|
|
171
|
-
const isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
172
|
-
if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
|
|
173
|
-
if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
|
|
174
|
-
scroll = getNodeScroll(offsetParent);
|
|
175
|
-
}
|
|
176
|
-
if (isHTMLElement(offsetParent)) {
|
|
177
|
-
const offsetRect = getBoundingClientRect(offsetParent);
|
|
178
|
-
scale = getScale(offsetParent);
|
|
179
|
-
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
180
|
-
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
|
|
184
|
-
return {
|
|
185
|
-
width: rect.width * scale.x,
|
|
186
|
-
height: rect.height * scale.y,
|
|
187
|
-
x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,
|
|
188
|
-
y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y
|
|
189
|
-
};
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
function getClientRects(element) {
|
|
193
|
-
return Array.from(element.getClientRects());
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
// Gets the entire size of the scrollable document area, even extending outside
|
|
197
|
-
// of the `<html>` and `<body>` rect bounds if horizontally scrollable.
|
|
198
|
-
function getDocumentRect(element) {
|
|
199
|
-
const html = getDocumentElement(element);
|
|
200
|
-
const scroll = getNodeScroll(element);
|
|
201
|
-
const body = element.ownerDocument.body;
|
|
202
|
-
const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
|
|
203
|
-
const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
|
|
204
|
-
let x = -scroll.scrollLeft + getWindowScrollBarX(element);
|
|
205
|
-
const y = -scroll.scrollTop;
|
|
206
|
-
if (getComputedStyle$1(body).direction === 'rtl') {
|
|
207
|
-
x += max(html.clientWidth, body.clientWidth) - width;
|
|
208
|
-
}
|
|
209
|
-
return {
|
|
210
|
-
width,
|
|
211
|
-
height,
|
|
212
|
-
x,
|
|
213
|
-
y
|
|
214
|
-
};
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
// Safety check: ensure the scrollbar space is reasonable in case this
|
|
218
|
-
// calculation is affected by unusual styles.
|
|
219
|
-
// Most scrollbars leave 15-18px of space.
|
|
220
|
-
const SCROLLBAR_MAX = 25;
|
|
221
|
-
function getViewportRect(element, strategy) {
|
|
222
|
-
const win = getWindow(element);
|
|
223
|
-
const html = getDocumentElement(element);
|
|
224
|
-
const visualViewport = win.visualViewport;
|
|
225
|
-
let width = html.clientWidth;
|
|
226
|
-
let height = html.clientHeight;
|
|
227
|
-
let x = 0;
|
|
228
|
-
let y = 0;
|
|
229
|
-
if (visualViewport) {
|
|
230
|
-
width = visualViewport.width;
|
|
231
|
-
height = visualViewport.height;
|
|
232
|
-
const visualViewportBased = isWebKit();
|
|
233
|
-
if (!visualViewportBased || visualViewportBased && strategy === 'fixed') {
|
|
234
|
-
x = visualViewport.offsetLeft;
|
|
235
|
-
y = visualViewport.offsetTop;
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
const windowScrollbarX = getWindowScrollBarX(html);
|
|
239
|
-
// <html> `overflow: hidden` + `scrollbar-gutter: stable` reduces the
|
|
240
|
-
// visual width of the <html> but this is not considered in the size
|
|
241
|
-
// of `html.clientWidth`.
|
|
242
|
-
if (windowScrollbarX <= 0) {
|
|
243
|
-
const doc = html.ownerDocument;
|
|
244
|
-
const body = doc.body;
|
|
245
|
-
const bodyStyles = getComputedStyle(body);
|
|
246
|
-
const bodyMarginInline = doc.compatMode === 'CSS1Compat' ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;
|
|
247
|
-
const clippingStableScrollbarWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);
|
|
248
|
-
if (clippingStableScrollbarWidth <= SCROLLBAR_MAX) {
|
|
249
|
-
width -= clippingStableScrollbarWidth;
|
|
250
|
-
}
|
|
251
|
-
} else if (windowScrollbarX <= SCROLLBAR_MAX) {
|
|
252
|
-
// If the <body> scrollbar is on the left, the width needs to be extended
|
|
253
|
-
// by the scrollbar amount so there isn't extra space on the right.
|
|
254
|
-
width += windowScrollbarX;
|
|
255
|
-
}
|
|
256
|
-
return {
|
|
257
|
-
width,
|
|
258
|
-
height,
|
|
259
|
-
x,
|
|
260
|
-
y
|
|
261
|
-
};
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
const absoluteOrFixed = /*#__PURE__*/new Set(['absolute', 'fixed']);
|
|
265
|
-
// Returns the inner client rect, subtracting scrollbars if present.
|
|
266
|
-
function getInnerBoundingClientRect(element, strategy) {
|
|
267
|
-
const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');
|
|
268
|
-
const top = clientRect.top + element.clientTop;
|
|
269
|
-
const left = clientRect.left + element.clientLeft;
|
|
270
|
-
const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);
|
|
271
|
-
const width = element.clientWidth * scale.x;
|
|
272
|
-
const height = element.clientHeight * scale.y;
|
|
273
|
-
const x = left * scale.x;
|
|
274
|
-
const y = top * scale.y;
|
|
275
|
-
return {
|
|
276
|
-
width,
|
|
277
|
-
height,
|
|
278
|
-
x,
|
|
279
|
-
y
|
|
280
|
-
};
|
|
281
|
-
}
|
|
282
|
-
function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
|
|
283
|
-
let rect;
|
|
284
|
-
if (clippingAncestor === 'viewport') {
|
|
285
|
-
rect = getViewportRect(element, strategy);
|
|
286
|
-
} else if (clippingAncestor === 'document') {
|
|
287
|
-
rect = getDocumentRect(getDocumentElement(element));
|
|
288
|
-
} else if (isElement(clippingAncestor)) {
|
|
289
|
-
rect = getInnerBoundingClientRect(clippingAncestor, strategy);
|
|
290
|
-
} else {
|
|
291
|
-
const visualOffsets = getVisualOffsets(element);
|
|
292
|
-
rect = {
|
|
293
|
-
x: clippingAncestor.x - visualOffsets.x,
|
|
294
|
-
y: clippingAncestor.y - visualOffsets.y,
|
|
295
|
-
width: clippingAncestor.width,
|
|
296
|
-
height: clippingAncestor.height
|
|
297
|
-
};
|
|
298
|
-
}
|
|
299
|
-
return rectToClientRect(rect);
|
|
300
|
-
}
|
|
301
|
-
function hasFixedPositionAncestor(element, stopNode) {
|
|
302
|
-
const parentNode = getParentNode(element);
|
|
303
|
-
if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {
|
|
304
|
-
return false;
|
|
305
|
-
}
|
|
306
|
-
return getComputedStyle$1(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
// A "clipping ancestor" is an `overflow` element with the characteristic of
|
|
310
|
-
// clipping (or hiding) child elements. This returns all clipping ancestors
|
|
311
|
-
// of the given element up the tree.
|
|
312
|
-
function getClippingElementAncestors(element, cache) {
|
|
313
|
-
const cachedResult = cache.get(element);
|
|
314
|
-
if (cachedResult) {
|
|
315
|
-
return cachedResult;
|
|
316
|
-
}
|
|
317
|
-
let result = getOverflowAncestors(element, [], false).filter(el => isElement(el) && getNodeName(el) !== 'body');
|
|
318
|
-
let currentContainingBlockComputedStyle = null;
|
|
319
|
-
const elementIsFixed = getComputedStyle$1(element).position === 'fixed';
|
|
320
|
-
let currentNode = elementIsFixed ? getParentNode(element) : element;
|
|
321
|
-
|
|
322
|
-
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
|
|
323
|
-
while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
324
|
-
const computedStyle = getComputedStyle$1(currentNode);
|
|
325
|
-
const currentNodeIsContaining = isContainingBlock(currentNode);
|
|
326
|
-
if (!currentNodeIsContaining && computedStyle.position === 'fixed') {
|
|
327
|
-
currentContainingBlockComputedStyle = null;
|
|
328
|
-
}
|
|
329
|
-
const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && absoluteOrFixed.has(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
|
|
330
|
-
if (shouldDropCurrentNode) {
|
|
331
|
-
// Drop non-containing blocks.
|
|
332
|
-
result = result.filter(ancestor => ancestor !== currentNode);
|
|
333
|
-
} else {
|
|
334
|
-
// Record last containing block for next iteration.
|
|
335
|
-
currentContainingBlockComputedStyle = computedStyle;
|
|
336
|
-
}
|
|
337
|
-
currentNode = getParentNode(currentNode);
|
|
338
|
-
}
|
|
339
|
-
cache.set(element, result);
|
|
340
|
-
return result;
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
// Gets the maximum area that the element is visible in due to any number of
|
|
344
|
-
// clipping ancestors.
|
|
345
|
-
function getClippingRect(_ref) {
|
|
346
|
-
let {
|
|
347
|
-
element,
|
|
348
|
-
boundary,
|
|
349
|
-
rootBoundary,
|
|
350
|
-
strategy
|
|
351
|
-
} = _ref;
|
|
352
|
-
const elementClippingAncestors = boundary === 'clippingAncestors' ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);
|
|
353
|
-
const clippingAncestors = [...elementClippingAncestors, rootBoundary];
|
|
354
|
-
const firstClippingAncestor = clippingAncestors[0];
|
|
355
|
-
const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {
|
|
356
|
-
const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);
|
|
357
|
-
accRect.top = max(rect.top, accRect.top);
|
|
358
|
-
accRect.right = min(rect.right, accRect.right);
|
|
359
|
-
accRect.bottom = min(rect.bottom, accRect.bottom);
|
|
360
|
-
accRect.left = max(rect.left, accRect.left);
|
|
361
|
-
return accRect;
|
|
362
|
-
}, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));
|
|
363
|
-
return {
|
|
364
|
-
width: clippingRect.right - clippingRect.left,
|
|
365
|
-
height: clippingRect.bottom - clippingRect.top,
|
|
366
|
-
x: clippingRect.left,
|
|
367
|
-
y: clippingRect.top
|
|
368
|
-
};
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
function getDimensions(element) {
|
|
372
|
-
const {
|
|
373
|
-
width,
|
|
374
|
-
height
|
|
375
|
-
} = getCssDimensions(element);
|
|
376
|
-
return {
|
|
377
|
-
width,
|
|
378
|
-
height
|
|
379
|
-
};
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
|
383
|
-
const isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
384
|
-
const documentElement = getDocumentElement(offsetParent);
|
|
385
|
-
const isFixed = strategy === 'fixed';
|
|
386
|
-
const rect = getBoundingClientRect(element, true, isFixed, offsetParent);
|
|
387
|
-
let scroll = {
|
|
388
|
-
scrollLeft: 0,
|
|
389
|
-
scrollTop: 0
|
|
390
|
-
};
|
|
391
|
-
const offsets = createCoords(0);
|
|
392
|
-
|
|
393
|
-
// If the <body> scrollbar appears on the left (e.g. RTL systems). Use
|
|
394
|
-
// Firefox with layout.scrollbar.side = 3 in about:config to test this.
|
|
395
|
-
function setLeftRTLScrollbarOffset() {
|
|
396
|
-
offsets.x = getWindowScrollBarX(documentElement);
|
|
397
|
-
}
|
|
398
|
-
if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
|
|
399
|
-
if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
|
|
400
|
-
scroll = getNodeScroll(offsetParent);
|
|
401
|
-
}
|
|
402
|
-
if (isOffsetParentAnElement) {
|
|
403
|
-
const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);
|
|
404
|
-
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
405
|
-
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
406
|
-
} else if (documentElement) {
|
|
407
|
-
setLeftRTLScrollbarOffset();
|
|
408
|
-
}
|
|
409
|
-
}
|
|
410
|
-
if (isFixed && !isOffsetParentAnElement && documentElement) {
|
|
411
|
-
setLeftRTLScrollbarOffset();
|
|
412
|
-
}
|
|
413
|
-
const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
|
|
414
|
-
const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;
|
|
415
|
-
const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;
|
|
416
|
-
return {
|
|
417
|
-
x,
|
|
418
|
-
y,
|
|
419
|
-
width: rect.width,
|
|
420
|
-
height: rect.height
|
|
421
|
-
};
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
function isStaticPositioned(element) {
|
|
425
|
-
return getComputedStyle$1(element).position === 'static';
|
|
426
|
-
}
|
|
427
|
-
|
|
428
|
-
function getTrueOffsetParent(element, polyfill) {
|
|
429
|
-
if (!isHTMLElement(element) || getComputedStyle$1(element).position === 'fixed') {
|
|
430
|
-
return null;
|
|
431
|
-
}
|
|
432
|
-
if (polyfill) {
|
|
433
|
-
return polyfill(element);
|
|
434
|
-
}
|
|
435
|
-
let rawOffsetParent = element.offsetParent;
|
|
436
|
-
|
|
437
|
-
// Firefox returns the <html> element as the offsetParent if it's non-static,
|
|
438
|
-
// while Chrome and Safari return the <body> element. The <body> element must
|
|
439
|
-
// be used to perform the correct calculations even if the <html> element is
|
|
440
|
-
// non-static.
|
|
441
|
-
if (getDocumentElement(element) === rawOffsetParent) {
|
|
442
|
-
rawOffsetParent = rawOffsetParent.ownerDocument.body;
|
|
443
|
-
}
|
|
444
|
-
return rawOffsetParent;
|
|
445
|
-
}
|
|
446
|
-
|
|
447
|
-
// Gets the closest ancestor positioned element. Handles some edge cases,
|
|
448
|
-
// such as table ancestors and cross browser bugs.
|
|
449
|
-
function getOffsetParent(element, polyfill) {
|
|
450
|
-
const win = getWindow(element);
|
|
451
|
-
if (isTopLayer(element)) {
|
|
452
|
-
return win;
|
|
453
|
-
}
|
|
454
|
-
if (!isHTMLElement(element)) {
|
|
455
|
-
let svgOffsetParent = getParentNode(element);
|
|
456
|
-
while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {
|
|
457
|
-
if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {
|
|
458
|
-
return svgOffsetParent;
|
|
459
|
-
}
|
|
460
|
-
svgOffsetParent = getParentNode(svgOffsetParent);
|
|
461
|
-
}
|
|
462
|
-
return win;
|
|
463
|
-
}
|
|
464
|
-
let offsetParent = getTrueOffsetParent(element, polyfill);
|
|
465
|
-
while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) {
|
|
466
|
-
offsetParent = getTrueOffsetParent(offsetParent, polyfill);
|
|
467
|
-
}
|
|
468
|
-
if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) {
|
|
469
|
-
return win;
|
|
470
|
-
}
|
|
471
|
-
return offsetParent || getContainingBlock(element) || win;
|
|
472
|
-
}
|
|
473
|
-
|
|
474
|
-
const getElementRects = async function (data) {
|
|
475
|
-
const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
|
|
476
|
-
const getDimensionsFn = this.getDimensions;
|
|
477
|
-
const floatingDimensions = await getDimensionsFn(data.floating);
|
|
478
|
-
return {
|
|
479
|
-
reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),
|
|
480
|
-
floating: {
|
|
481
|
-
x: 0,
|
|
482
|
-
y: 0,
|
|
483
|
-
width: floatingDimensions.width,
|
|
484
|
-
height: floatingDimensions.height
|
|
485
|
-
}
|
|
486
|
-
};
|
|
487
|
-
};
|
|
488
|
-
|
|
489
|
-
function isRTL(element) {
|
|
490
|
-
return getComputedStyle$1(element).direction === 'rtl';
|
|
491
|
-
}
|
|
492
|
-
|
|
493
|
-
const platform = {
|
|
494
|
-
convertOffsetParentRelativeRectToViewportRelativeRect,
|
|
495
|
-
getDocumentElement,
|
|
496
|
-
getClippingRect,
|
|
497
|
-
getOffsetParent,
|
|
498
|
-
getElementRects,
|
|
499
|
-
getClientRects,
|
|
500
|
-
getDimensions,
|
|
501
|
-
getScale,
|
|
502
|
-
isElement,
|
|
503
|
-
isRTL
|
|
504
|
-
};
|
|
505
|
-
|
|
506
|
-
function rectsAreEqual(a, b) {
|
|
507
|
-
return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;
|
|
508
|
-
}
|
|
509
|
-
|
|
510
|
-
// https://samthor.au/2021/observing-dom/
|
|
511
|
-
function observeMove(element, onMove) {
|
|
512
|
-
let io = null;
|
|
513
|
-
let timeoutId;
|
|
514
|
-
const root = getDocumentElement(element);
|
|
515
|
-
function cleanup() {
|
|
516
|
-
var _io;
|
|
517
|
-
clearTimeout(timeoutId);
|
|
518
|
-
(_io = io) == null || _io.disconnect();
|
|
519
|
-
io = null;
|
|
520
|
-
}
|
|
521
|
-
function refresh(skip, threshold) {
|
|
522
|
-
if (skip === void 0) {
|
|
523
|
-
skip = false;
|
|
524
|
-
}
|
|
525
|
-
if (threshold === void 0) {
|
|
526
|
-
threshold = 1;
|
|
527
|
-
}
|
|
528
|
-
cleanup();
|
|
529
|
-
const elementRectForRootMargin = element.getBoundingClientRect();
|
|
530
|
-
const {
|
|
531
|
-
left,
|
|
532
|
-
top,
|
|
533
|
-
width,
|
|
534
|
-
height
|
|
535
|
-
} = elementRectForRootMargin;
|
|
536
|
-
if (!skip) {
|
|
537
|
-
onMove();
|
|
538
|
-
}
|
|
539
|
-
if (!width || !height) {
|
|
540
|
-
return;
|
|
541
|
-
}
|
|
542
|
-
const insetTop = floor(top);
|
|
543
|
-
const insetRight = floor(root.clientWidth - (left + width));
|
|
544
|
-
const insetBottom = floor(root.clientHeight - (top + height));
|
|
545
|
-
const insetLeft = floor(left);
|
|
546
|
-
const rootMargin = -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px";
|
|
547
|
-
const options = {
|
|
548
|
-
rootMargin,
|
|
549
|
-
threshold: max(0, min(1, threshold)) || 1
|
|
550
|
-
};
|
|
551
|
-
let isFirstUpdate = true;
|
|
552
|
-
function handleObserve(entries) {
|
|
553
|
-
const ratio = entries[0].intersectionRatio;
|
|
554
|
-
if (ratio !== threshold) {
|
|
555
|
-
if (!isFirstUpdate) {
|
|
556
|
-
return refresh();
|
|
557
|
-
}
|
|
558
|
-
if (!ratio) {
|
|
559
|
-
// If the reference is clipped, the ratio is 0. Throttle the refresh
|
|
560
|
-
// to prevent an infinite loop of updates.
|
|
561
|
-
timeoutId = setTimeout(() => {
|
|
562
|
-
refresh(false, 1e-7);
|
|
563
|
-
}, 1000);
|
|
564
|
-
} else {
|
|
565
|
-
refresh(false, ratio);
|
|
566
|
-
}
|
|
567
|
-
}
|
|
568
|
-
if (ratio === 1 && !rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) {
|
|
569
|
-
// It's possible that even though the ratio is reported as 1, the
|
|
570
|
-
// element is not actually fully within the IntersectionObserver's root
|
|
571
|
-
// area anymore. This can happen under performance constraints. This may
|
|
572
|
-
// be a bug in the browser's IntersectionObserver implementation. To
|
|
573
|
-
// work around this, we compare the element's bounding rect now with
|
|
574
|
-
// what it was at the time we created the IntersectionObserver. If they
|
|
575
|
-
// are not equal then the element moved, so we refresh.
|
|
576
|
-
refresh();
|
|
577
|
-
}
|
|
578
|
-
isFirstUpdate = false;
|
|
579
|
-
}
|
|
580
|
-
|
|
581
|
-
// Older browsers don't support a `document` as the root and will throw an
|
|
582
|
-
// error.
|
|
583
|
-
try {
|
|
584
|
-
io = new IntersectionObserver(handleObserve, {
|
|
585
|
-
...options,
|
|
586
|
-
// Handle <iframe>s
|
|
587
|
-
root: root.ownerDocument
|
|
588
|
-
});
|
|
589
|
-
} catch (_e) {
|
|
590
|
-
io = new IntersectionObserver(handleObserve, options);
|
|
591
|
-
}
|
|
592
|
-
io.observe(element);
|
|
593
|
-
}
|
|
594
|
-
refresh(true);
|
|
595
|
-
return cleanup;
|
|
596
|
-
}
|
|
597
|
-
|
|
598
|
-
/**
|
|
599
|
-
* Automatically updates the position of the floating element when necessary.
|
|
600
|
-
* Should only be called when the floating element is mounted on the DOM or
|
|
601
|
-
* visible on the screen.
|
|
602
|
-
* @returns cleanup function that should be invoked when the floating element is
|
|
603
|
-
* removed from the DOM or hidden from the screen.
|
|
604
|
-
* @see https://floating-ui.com/docs/autoUpdate
|
|
605
|
-
*/
|
|
606
|
-
function autoUpdate(reference, floating, update, options) {
|
|
607
|
-
if (options === void 0) {
|
|
608
|
-
options = {};
|
|
609
|
-
}
|
|
610
|
-
const {
|
|
611
|
-
ancestorScroll = true,
|
|
612
|
-
ancestorResize = true,
|
|
613
|
-
elementResize = typeof ResizeObserver === 'function',
|
|
614
|
-
layoutShift = typeof IntersectionObserver === 'function',
|
|
615
|
-
animationFrame = false
|
|
616
|
-
} = options;
|
|
617
|
-
const referenceEl = unwrapElement(reference);
|
|
618
|
-
const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...getOverflowAncestors(floating)] : [];
|
|
619
|
-
ancestors.forEach(ancestor => {
|
|
620
|
-
ancestorScroll && ancestor.addEventListener('scroll', update, {
|
|
621
|
-
passive: true
|
|
622
|
-
});
|
|
623
|
-
ancestorResize && ancestor.addEventListener('resize', update);
|
|
624
|
-
});
|
|
625
|
-
const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update) : null;
|
|
626
|
-
let reobserveFrame = -1;
|
|
627
|
-
let resizeObserver = null;
|
|
628
|
-
if (elementResize) {
|
|
629
|
-
resizeObserver = new ResizeObserver(_ref => {
|
|
630
|
-
let [firstEntry] = _ref;
|
|
631
|
-
if (firstEntry && firstEntry.target === referenceEl && resizeObserver) {
|
|
632
|
-
// Prevent update loops when using the `size` middleware.
|
|
633
|
-
// https://github.com/floating-ui/floating-ui/issues/1740
|
|
634
|
-
resizeObserver.unobserve(floating);
|
|
635
|
-
cancelAnimationFrame(reobserveFrame);
|
|
636
|
-
reobserveFrame = requestAnimationFrame(() => {
|
|
637
|
-
var _resizeObserver;
|
|
638
|
-
(_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);
|
|
639
|
-
});
|
|
640
|
-
}
|
|
641
|
-
update();
|
|
642
|
-
});
|
|
643
|
-
if (referenceEl && !animationFrame) {
|
|
644
|
-
resizeObserver.observe(referenceEl);
|
|
645
|
-
}
|
|
646
|
-
resizeObserver.observe(floating);
|
|
647
|
-
}
|
|
648
|
-
let frameId;
|
|
649
|
-
let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
|
|
650
|
-
if (animationFrame) {
|
|
651
|
-
frameLoop();
|
|
652
|
-
}
|
|
653
|
-
function frameLoop() {
|
|
654
|
-
const nextRefRect = getBoundingClientRect(reference);
|
|
655
|
-
if (prevRefRect && !rectsAreEqual(prevRefRect, nextRefRect)) {
|
|
656
|
-
update();
|
|
657
|
-
}
|
|
658
|
-
prevRefRect = nextRefRect;
|
|
659
|
-
frameId = requestAnimationFrame(frameLoop);
|
|
660
|
-
}
|
|
661
|
-
update();
|
|
662
|
-
return () => {
|
|
663
|
-
var _resizeObserver2;
|
|
664
|
-
ancestors.forEach(ancestor => {
|
|
665
|
-
ancestorScroll && ancestor.removeEventListener('scroll', update);
|
|
666
|
-
ancestorResize && ancestor.removeEventListener('resize', update);
|
|
667
|
-
});
|
|
668
|
-
cleanupIo == null || cleanupIo();
|
|
669
|
-
(_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();
|
|
670
|
-
resizeObserver = null;
|
|
671
|
-
if (animationFrame) {
|
|
672
|
-
cancelAnimationFrame(frameId);
|
|
673
|
-
}
|
|
674
|
-
};
|
|
675
|
-
}
|
|
676
|
-
|
|
677
|
-
/**
|
|
678
|
-
* Modifies the placement by translating the floating element along the
|
|
679
|
-
* specified axes.
|
|
680
|
-
* A number (shorthand for `mainAxis` or distance), or an axes configuration
|
|
681
|
-
* object may be passed.
|
|
682
|
-
* @see https://floating-ui.com/docs/offset
|
|
683
|
-
*/
|
|
684
|
-
const offset = offset$1;
|
|
685
|
-
|
|
686
|
-
/**
|
|
687
|
-
* Optimizes the visibility of the floating element by shifting it in order to
|
|
688
|
-
* keep it in view when it will overflow the clipping boundary.
|
|
689
|
-
* @see https://floating-ui.com/docs/shift
|
|
690
|
-
*/
|
|
691
|
-
const shift = shift$1;
|
|
692
|
-
|
|
693
|
-
/**
|
|
694
|
-
* Optimizes the visibility of the floating element by flipping the `placement`
|
|
695
|
-
* in order to keep it in view when the preferred placement(s) will overflow the
|
|
696
|
-
* clipping boundary. Alternative to `autoPlacement`.
|
|
697
|
-
* @see https://floating-ui.com/docs/flip
|
|
698
|
-
*/
|
|
699
|
-
const flip = flip$1;
|
|
700
|
-
|
|
701
|
-
/**
|
|
702
|
-
* Provides data to position an inner element of the floating element so that it
|
|
703
|
-
* appears centered to the reference element.
|
|
704
|
-
* @see https://floating-ui.com/docs/arrow
|
|
705
|
-
*/
|
|
706
|
-
const arrow = arrow$1;
|
|
707
|
-
|
|
708
|
-
/**
|
|
709
|
-
* Computes the `x` and `y` coordinates that will place the floating element
|
|
710
|
-
* next to a given reference element.
|
|
711
|
-
*/
|
|
712
|
-
const computePosition = (reference, floating, options) => {
|
|
713
|
-
// This caches the expensive `getClippingElementAncestors` function so that
|
|
714
|
-
// multiple lifecycle resets re-use the same result. It only lives for a
|
|
715
|
-
// single call. If other functions become expensive, we can add them as well.
|
|
716
|
-
const cache = new Map();
|
|
717
|
-
const mergedOptions = {
|
|
718
|
-
platform,
|
|
719
|
-
...options
|
|
720
|
-
};
|
|
721
|
-
const platformWithCache = {
|
|
722
|
-
...mergedOptions.platform,
|
|
723
|
-
_c: cache
|
|
724
|
-
};
|
|
725
|
-
return computePosition$1(reference, floating, {
|
|
726
|
-
...mergedOptions,
|
|
727
|
-
platform: platformWithCache
|
|
728
|
-
});
|
|
729
|
-
};
|
|
730
|
-
|
|
731
|
-
export { arrow, autoUpdate, computePosition, flip, getOverflowAncestors, offset, platform, shift };
|