@teamturing/react-kit 2.51.3 → 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 -24149
- 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/jsx-runtime.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/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-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/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,436 +0,0 @@
|
|
|
1
|
-
import { polyfill } from './polyfills/event-listener-signal.js';
|
|
2
|
-
import { isMacOS } from './utils/user-agent.js';
|
|
3
|
-
import { iterateFocusableElements } from './utils/iterate-focusable-elements.js';
|
|
4
|
-
import { uniqueId } from './utils/unique-id.js';
|
|
5
|
-
|
|
6
|
-
polyfill();
|
|
7
|
-
var FocusKeys;
|
|
8
|
-
(function (FocusKeys) {
|
|
9
|
-
FocusKeys[FocusKeys["ArrowHorizontal"] = 1] = "ArrowHorizontal";
|
|
10
|
-
FocusKeys[FocusKeys["ArrowVertical"] = 2] = "ArrowVertical";
|
|
11
|
-
FocusKeys[FocusKeys["JK"] = 4] = "JK";
|
|
12
|
-
FocusKeys[FocusKeys["HL"] = 8] = "HL";
|
|
13
|
-
FocusKeys[FocusKeys["HomeAndEnd"] = 16] = "HomeAndEnd";
|
|
14
|
-
FocusKeys[FocusKeys["PageUpDown"] = 256] = "PageUpDown";
|
|
15
|
-
FocusKeys[FocusKeys["WS"] = 32] = "WS";
|
|
16
|
-
FocusKeys[FocusKeys["AD"] = 64] = "AD";
|
|
17
|
-
FocusKeys[FocusKeys["Tab"] = 128] = "Tab";
|
|
18
|
-
FocusKeys[FocusKeys["Backspace"] = 512] = "Backspace";
|
|
19
|
-
FocusKeys[FocusKeys["ArrowAll"] = 3] = "ArrowAll";
|
|
20
|
-
FocusKeys[FocusKeys["HJKL"] = 12] = "HJKL";
|
|
21
|
-
FocusKeys[FocusKeys["WASD"] = 96] = "WASD";
|
|
22
|
-
FocusKeys[FocusKeys["All"] = 511] = "All";
|
|
23
|
-
})(FocusKeys || (FocusKeys = {}));
|
|
24
|
-
const KEY_TO_BIT = {
|
|
25
|
-
ArrowLeft: FocusKeys.ArrowHorizontal,
|
|
26
|
-
ArrowDown: FocusKeys.ArrowVertical,
|
|
27
|
-
ArrowUp: FocusKeys.ArrowVertical,
|
|
28
|
-
ArrowRight: FocusKeys.ArrowHorizontal,
|
|
29
|
-
h: FocusKeys.HL,
|
|
30
|
-
j: FocusKeys.JK,
|
|
31
|
-
k: FocusKeys.JK,
|
|
32
|
-
l: FocusKeys.HL,
|
|
33
|
-
a: FocusKeys.AD,
|
|
34
|
-
s: FocusKeys.WS,
|
|
35
|
-
w: FocusKeys.WS,
|
|
36
|
-
d: FocusKeys.AD,
|
|
37
|
-
Tab: FocusKeys.Tab,
|
|
38
|
-
Home: FocusKeys.HomeAndEnd,
|
|
39
|
-
End: FocusKeys.HomeAndEnd,
|
|
40
|
-
PageUp: FocusKeys.PageUpDown,
|
|
41
|
-
PageDown: FocusKeys.PageUpDown,
|
|
42
|
-
Backspace: FocusKeys.Backspace
|
|
43
|
-
};
|
|
44
|
-
const KEY_TO_DIRECTION = {
|
|
45
|
-
ArrowLeft: 'previous',
|
|
46
|
-
ArrowDown: 'next',
|
|
47
|
-
ArrowUp: 'previous',
|
|
48
|
-
ArrowRight: 'next',
|
|
49
|
-
h: 'previous',
|
|
50
|
-
j: 'next',
|
|
51
|
-
k: 'previous',
|
|
52
|
-
l: 'next',
|
|
53
|
-
a: 'previous',
|
|
54
|
-
s: 'next',
|
|
55
|
-
w: 'previous',
|
|
56
|
-
d: 'next',
|
|
57
|
-
Tab: 'next',
|
|
58
|
-
Home: 'start',
|
|
59
|
-
End: 'end',
|
|
60
|
-
PageUp: 'start',
|
|
61
|
-
PageDown: 'end',
|
|
62
|
-
Backspace: 'previous'
|
|
63
|
-
};
|
|
64
|
-
function getDirection(keyboardEvent) {
|
|
65
|
-
const direction = KEY_TO_DIRECTION[keyboardEvent.key];
|
|
66
|
-
if (keyboardEvent.key === 'Tab' && keyboardEvent.shiftKey) {
|
|
67
|
-
return 'previous';
|
|
68
|
-
}
|
|
69
|
-
const isMac = isMacOS();
|
|
70
|
-
if (isMac && keyboardEvent.metaKey || !isMac && keyboardEvent.ctrlKey) {
|
|
71
|
-
if (keyboardEvent.key === 'ArrowLeft' || keyboardEvent.key === 'ArrowUp') {
|
|
72
|
-
return 'start';
|
|
73
|
-
} else if (keyboardEvent.key === 'ArrowRight' || keyboardEvent.key === 'ArrowDown') {
|
|
74
|
-
return 'end';
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
return direction;
|
|
78
|
-
}
|
|
79
|
-
function shouldIgnoreFocusHandling(keyboardEvent, activeElement) {
|
|
80
|
-
const key = keyboardEvent.key;
|
|
81
|
-
const keyLength = [...key].length;
|
|
82
|
-
const isTextInput = activeElement instanceof HTMLInputElement && activeElement.type === 'text' || activeElement instanceof HTMLTextAreaElement;
|
|
83
|
-
if (isTextInput && (keyLength === 1 || key === 'Home' || key === 'End')) {
|
|
84
|
-
return true;
|
|
85
|
-
}
|
|
86
|
-
if (activeElement instanceof HTMLSelectElement) {
|
|
87
|
-
if (keyLength === 1) {
|
|
88
|
-
return true;
|
|
89
|
-
}
|
|
90
|
-
if (key === 'ArrowDown' && isMacOS() && !keyboardEvent.metaKey) {
|
|
91
|
-
return true;
|
|
92
|
-
}
|
|
93
|
-
if (key === 'ArrowDown' && !isMacOS() && keyboardEvent.altKey) {
|
|
94
|
-
return true;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
if (activeElement instanceof HTMLTextAreaElement && (key === 'PageUp' || key === 'PageDown')) {
|
|
98
|
-
return true;
|
|
99
|
-
}
|
|
100
|
-
if (isTextInput) {
|
|
101
|
-
const textInput = activeElement;
|
|
102
|
-
const cursorAtStart = textInput.selectionStart === 0 && textInput.selectionEnd === 0;
|
|
103
|
-
const cursorAtEnd = textInput.selectionStart === textInput.value.length && textInput.selectionEnd === textInput.value.length;
|
|
104
|
-
if (key === 'ArrowLeft' && !cursorAtStart) {
|
|
105
|
-
return true;
|
|
106
|
-
}
|
|
107
|
-
if (key === 'ArrowRight' && !cursorAtEnd) {
|
|
108
|
-
return true;
|
|
109
|
-
}
|
|
110
|
-
if (textInput instanceof HTMLTextAreaElement) {
|
|
111
|
-
if (key === 'ArrowUp' && !cursorAtStart) {
|
|
112
|
-
return true;
|
|
113
|
-
}
|
|
114
|
-
if (key === 'ArrowDown' && !cursorAtEnd) {
|
|
115
|
-
return true;
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
return false;
|
|
120
|
-
}
|
|
121
|
-
const isActiveDescendantAttribute = 'data-is-active-descendant';
|
|
122
|
-
const activeDescendantActivatedDirectly = 'activated-directly';
|
|
123
|
-
const activeDescendantActivatedIndirectly = 'activated-indirectly';
|
|
124
|
-
const hasActiveDescendantAttribute = 'data-has-active-descendant';
|
|
125
|
-
function focusZone(container, settings) {
|
|
126
|
-
var _a, _b, _c, _d, _e;
|
|
127
|
-
const focusableElements = [];
|
|
128
|
-
const savedTabIndex = new WeakMap();
|
|
129
|
-
const bindKeys = (_a = settings === null || settings === void 0 ? void 0 : settings.bindKeys) !== null && _a !== void 0 ? _a : ((settings === null || settings === void 0 ? void 0 : settings.getNextFocusable) ? FocusKeys.ArrowAll : FocusKeys.ArrowVertical) | FocusKeys.HomeAndEnd;
|
|
130
|
-
const focusOutBehavior = (_b = settings === null || settings === void 0 ? void 0 : settings.focusOutBehavior) !== null && _b !== void 0 ? _b : 'stop';
|
|
131
|
-
const focusInStrategy = (_c = settings === null || settings === void 0 ? void 0 : settings.focusInStrategy) !== null && _c !== void 0 ? _c : 'previous';
|
|
132
|
-
const activeDescendantControl = settings === null || settings === void 0 ? void 0 : settings.activeDescendantControl;
|
|
133
|
-
const activeDescendantCallback = settings === null || settings === void 0 ? void 0 : settings.onActiveDescendantChanged;
|
|
134
|
-
let currentFocusedElement;
|
|
135
|
-
const preventScroll = (_d = settings === null || settings === void 0 ? void 0 : settings.preventScroll) !== null && _d !== void 0 ? _d : false;
|
|
136
|
-
function getFirstFocusableElement() {
|
|
137
|
-
return focusableElements[0];
|
|
138
|
-
}
|
|
139
|
-
function isActiveDescendantInputFocused() {
|
|
140
|
-
return document.activeElement === activeDescendantControl;
|
|
141
|
-
}
|
|
142
|
-
function updateFocusedElement(to, directlyActivated = false) {
|
|
143
|
-
const from = currentFocusedElement;
|
|
144
|
-
currentFocusedElement = to;
|
|
145
|
-
if (activeDescendantControl) {
|
|
146
|
-
if (to && isActiveDescendantInputFocused()) {
|
|
147
|
-
setActiveDescendant(from, to, directlyActivated);
|
|
148
|
-
} else {
|
|
149
|
-
clearActiveDescendant();
|
|
150
|
-
}
|
|
151
|
-
return;
|
|
152
|
-
}
|
|
153
|
-
if (from && from !== to && savedTabIndex.has(from)) {
|
|
154
|
-
from.setAttribute('tabindex', '-1');
|
|
155
|
-
}
|
|
156
|
-
to === null || to === void 0 ? void 0 : to.setAttribute('tabindex', '0');
|
|
157
|
-
}
|
|
158
|
-
function setActiveDescendant(from, to, directlyActivated = false) {
|
|
159
|
-
if (!to.id) {
|
|
160
|
-
to.setAttribute('id', uniqueId());
|
|
161
|
-
}
|
|
162
|
-
if (from && from !== to) {
|
|
163
|
-
from.removeAttribute(isActiveDescendantAttribute);
|
|
164
|
-
}
|
|
165
|
-
if (!activeDescendantControl || !directlyActivated && activeDescendantControl.getAttribute('aria-activedescendant') === to.id) {
|
|
166
|
-
return;
|
|
167
|
-
}
|
|
168
|
-
activeDescendantControl.setAttribute('aria-activedescendant', to.id);
|
|
169
|
-
container.setAttribute(hasActiveDescendantAttribute, to.id);
|
|
170
|
-
to.setAttribute(isActiveDescendantAttribute, directlyActivated ? activeDescendantActivatedDirectly : activeDescendantActivatedIndirectly);
|
|
171
|
-
activeDescendantCallback === null || activeDescendantCallback === void 0 ? void 0 : activeDescendantCallback(to, from, directlyActivated);
|
|
172
|
-
}
|
|
173
|
-
function clearActiveDescendant(previouslyActiveElement = currentFocusedElement) {
|
|
174
|
-
if (focusInStrategy === 'first') {
|
|
175
|
-
currentFocusedElement = undefined;
|
|
176
|
-
}
|
|
177
|
-
activeDescendantControl === null || activeDescendantControl === void 0 ? void 0 : activeDescendantControl.removeAttribute('aria-activedescendant');
|
|
178
|
-
container.removeAttribute(hasActiveDescendantAttribute);
|
|
179
|
-
previouslyActiveElement === null || previouslyActiveElement === void 0 ? void 0 : previouslyActiveElement.removeAttribute(isActiveDescendantAttribute);
|
|
180
|
-
activeDescendantCallback === null || activeDescendantCallback === void 0 ? void 0 : activeDescendantCallback(undefined, previouslyActiveElement, false);
|
|
181
|
-
}
|
|
182
|
-
function beginFocusManagement(...elements) {
|
|
183
|
-
const filteredElements = elements.filter(e => {
|
|
184
|
-
var _a, _b;
|
|
185
|
-
return (_b = (_a = settings === null || settings === void 0 ? void 0 : settings.focusableElementFilter) === null || _a === void 0 ? void 0 : _a.call(settings, e)) !== null && _b !== void 0 ? _b : true;
|
|
186
|
-
});
|
|
187
|
-
if (filteredElements.length === 0) {
|
|
188
|
-
return;
|
|
189
|
-
}
|
|
190
|
-
focusableElements.splice(findInsertionIndex(filteredElements), 0, ...filteredElements);
|
|
191
|
-
for (const element of filteredElements) {
|
|
192
|
-
if (!savedTabIndex.has(element)) {
|
|
193
|
-
savedTabIndex.set(element, element.getAttribute('tabindex'));
|
|
194
|
-
}
|
|
195
|
-
element.setAttribute('tabindex', '-1');
|
|
196
|
-
}
|
|
197
|
-
if (!currentFocusedElement) {
|
|
198
|
-
updateFocusedElement(getFirstFocusableElement());
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
function findInsertionIndex(elementsToInsert) {
|
|
202
|
-
const firstElementToInsert = elementsToInsert[0];
|
|
203
|
-
if (focusableElements.length === 0) return 0;
|
|
204
|
-
let iMin = 0;
|
|
205
|
-
let iMax = focusableElements.length - 1;
|
|
206
|
-
while (iMin <= iMax) {
|
|
207
|
-
const i = Math.floor((iMin + iMax) / 2);
|
|
208
|
-
const element = focusableElements[i];
|
|
209
|
-
if (followsInDocument(firstElementToInsert, element)) {
|
|
210
|
-
iMax = i - 1;
|
|
211
|
-
} else {
|
|
212
|
-
iMin = i + 1;
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
return iMin;
|
|
216
|
-
}
|
|
217
|
-
function followsInDocument(first, second) {
|
|
218
|
-
return (second.compareDocumentPosition(first) & Node.DOCUMENT_POSITION_PRECEDING) > 0;
|
|
219
|
-
}
|
|
220
|
-
function endFocusManagement(...elements) {
|
|
221
|
-
for (const element of elements) {
|
|
222
|
-
const focusableElementIndex = focusableElements.indexOf(element);
|
|
223
|
-
if (focusableElementIndex >= 0) {
|
|
224
|
-
focusableElements.splice(focusableElementIndex, 1);
|
|
225
|
-
}
|
|
226
|
-
const savedIndex = savedTabIndex.get(element);
|
|
227
|
-
if (savedIndex !== undefined) {
|
|
228
|
-
if (savedIndex === null) {
|
|
229
|
-
element.removeAttribute('tabindex');
|
|
230
|
-
} else {
|
|
231
|
-
element.setAttribute('tabindex', savedIndex);
|
|
232
|
-
}
|
|
233
|
-
savedTabIndex.delete(element);
|
|
234
|
-
}
|
|
235
|
-
if (element === currentFocusedElement) {
|
|
236
|
-
const nextElementToFocus = getFirstFocusableElement();
|
|
237
|
-
updateFocusedElement(nextElementToFocus);
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
beginFocusManagement(...iterateFocusableElements(container));
|
|
242
|
-
const initialElement = typeof focusInStrategy === 'function' ? focusInStrategy(document.body) : getFirstFocusableElement();
|
|
243
|
-
updateFocusedElement(initialElement);
|
|
244
|
-
const observer = new MutationObserver(mutations => {
|
|
245
|
-
for (const mutation of mutations) {
|
|
246
|
-
for (const removedNode of mutation.removedNodes) {
|
|
247
|
-
if (removedNode instanceof HTMLElement) {
|
|
248
|
-
endFocusManagement(...iterateFocusableElements(removedNode));
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
for (const mutation of mutations) {
|
|
253
|
-
for (const addedNode of mutation.addedNodes) {
|
|
254
|
-
if (addedNode instanceof HTMLElement) {
|
|
255
|
-
beginFocusManagement(...iterateFocusableElements(addedNode));
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
});
|
|
260
|
-
observer.observe(container, {
|
|
261
|
-
subtree: true,
|
|
262
|
-
childList: true
|
|
263
|
-
});
|
|
264
|
-
const controller = new AbortController();
|
|
265
|
-
const signal = (_e = settings === null || settings === void 0 ? void 0 : settings.abortSignal) !== null && _e !== void 0 ? _e : controller.signal;
|
|
266
|
-
signal.addEventListener('abort', () => {
|
|
267
|
-
endFocusManagement(...focusableElements);
|
|
268
|
-
});
|
|
269
|
-
let elementIndexFocusedByClick = undefined;
|
|
270
|
-
container.addEventListener('mousedown', event => {
|
|
271
|
-
if (event.target instanceof HTMLElement && event.target !== document.activeElement) {
|
|
272
|
-
elementIndexFocusedByClick = focusableElements.indexOf(event.target);
|
|
273
|
-
}
|
|
274
|
-
}, {
|
|
275
|
-
signal
|
|
276
|
-
});
|
|
277
|
-
if (activeDescendantControl) {
|
|
278
|
-
container.addEventListener('focusin', event => {
|
|
279
|
-
if (event.target instanceof HTMLElement && focusableElements.includes(event.target)) {
|
|
280
|
-
activeDescendantControl.focus({
|
|
281
|
-
preventScroll
|
|
282
|
-
});
|
|
283
|
-
updateFocusedElement(event.target);
|
|
284
|
-
}
|
|
285
|
-
});
|
|
286
|
-
container.addEventListener('mousemove', ({
|
|
287
|
-
target
|
|
288
|
-
}) => {
|
|
289
|
-
if (!(target instanceof Node)) {
|
|
290
|
-
return;
|
|
291
|
-
}
|
|
292
|
-
const focusableElement = focusableElements.find(element => element.contains(target));
|
|
293
|
-
if (focusableElement) {
|
|
294
|
-
updateFocusedElement(focusableElement);
|
|
295
|
-
}
|
|
296
|
-
}, {
|
|
297
|
-
signal,
|
|
298
|
-
capture: true
|
|
299
|
-
});
|
|
300
|
-
activeDescendantControl.addEventListener('focusin', () => {
|
|
301
|
-
if (!currentFocusedElement) {
|
|
302
|
-
updateFocusedElement(getFirstFocusableElement());
|
|
303
|
-
} else {
|
|
304
|
-
setActiveDescendant(undefined, currentFocusedElement);
|
|
305
|
-
}
|
|
306
|
-
});
|
|
307
|
-
activeDescendantControl.addEventListener('focusout', () => {
|
|
308
|
-
clearActiveDescendant();
|
|
309
|
-
});
|
|
310
|
-
} else {
|
|
311
|
-
container.addEventListener('focusin', event => {
|
|
312
|
-
if (event.target instanceof HTMLElement) {
|
|
313
|
-
if (elementIndexFocusedByClick !== undefined) {
|
|
314
|
-
if (elementIndexFocusedByClick >= 0) {
|
|
315
|
-
if (focusableElements[elementIndexFocusedByClick] !== currentFocusedElement) {
|
|
316
|
-
updateFocusedElement(focusableElements[elementIndexFocusedByClick]);
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
elementIndexFocusedByClick = undefined;
|
|
320
|
-
} else {
|
|
321
|
-
if (focusInStrategy === 'previous') {
|
|
322
|
-
updateFocusedElement(event.target);
|
|
323
|
-
} else if (focusInStrategy === 'closest' || focusInStrategy === 'first') {
|
|
324
|
-
if (event.relatedTarget instanceof Element && !container.contains(event.relatedTarget)) {
|
|
325
|
-
const targetElementIndex = lastKeyboardFocusDirection === 'previous' ? focusableElements.length - 1 : 0;
|
|
326
|
-
const targetElement = focusableElements[targetElementIndex];
|
|
327
|
-
targetElement === null || targetElement === void 0 ? void 0 : targetElement.focus({
|
|
328
|
-
preventScroll
|
|
329
|
-
});
|
|
330
|
-
return;
|
|
331
|
-
} else {
|
|
332
|
-
updateFocusedElement(event.target);
|
|
333
|
-
}
|
|
334
|
-
} else if (typeof focusInStrategy === 'function') {
|
|
335
|
-
if (event.relatedTarget instanceof Element && !container.contains(event.relatedTarget)) {
|
|
336
|
-
const elementToFocus = focusInStrategy(event.relatedTarget);
|
|
337
|
-
const requestedFocusElementIndex = elementToFocus ? focusableElements.indexOf(elementToFocus) : -1;
|
|
338
|
-
if (requestedFocusElementIndex >= 0 && elementToFocus instanceof HTMLElement) {
|
|
339
|
-
elementToFocus.focus({
|
|
340
|
-
preventScroll
|
|
341
|
-
});
|
|
342
|
-
return;
|
|
343
|
-
} else {
|
|
344
|
-
console.warn('Element requested is not a known focusable element.');
|
|
345
|
-
}
|
|
346
|
-
} else {
|
|
347
|
-
updateFocusedElement(event.target);
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
lastKeyboardFocusDirection = undefined;
|
|
353
|
-
}, {
|
|
354
|
-
signal
|
|
355
|
-
});
|
|
356
|
-
}
|
|
357
|
-
const keyboardEventRecipient = activeDescendantControl !== null && activeDescendantControl !== void 0 ? activeDescendantControl : container;
|
|
358
|
-
let lastKeyboardFocusDirection = undefined;
|
|
359
|
-
if (focusInStrategy === 'closest') {
|
|
360
|
-
document.addEventListener('keydown', event => {
|
|
361
|
-
if (event.key === 'Tab') {
|
|
362
|
-
lastKeyboardFocusDirection = getDirection(event);
|
|
363
|
-
}
|
|
364
|
-
}, {
|
|
365
|
-
signal,
|
|
366
|
-
capture: true
|
|
367
|
-
});
|
|
368
|
-
}
|
|
369
|
-
function getCurrentFocusedIndex() {
|
|
370
|
-
if (!currentFocusedElement) {
|
|
371
|
-
return 0;
|
|
372
|
-
}
|
|
373
|
-
const focusedIndex = focusableElements.indexOf(currentFocusedElement);
|
|
374
|
-
const fallbackIndex = currentFocusedElement === container ? -1 : 0;
|
|
375
|
-
return focusedIndex !== -1 ? focusedIndex : fallbackIndex;
|
|
376
|
-
}
|
|
377
|
-
keyboardEventRecipient.addEventListener('keydown', event => {
|
|
378
|
-
var _a;
|
|
379
|
-
if (event.key in KEY_TO_DIRECTION) {
|
|
380
|
-
const keyBit = KEY_TO_BIT[event.key];
|
|
381
|
-
if (!event.defaultPrevented && (keyBit & bindKeys) > 0 && !shouldIgnoreFocusHandling(event, document.activeElement)) {
|
|
382
|
-
const direction = getDirection(event);
|
|
383
|
-
let nextElementToFocus = undefined;
|
|
384
|
-
if (settings === null || settings === void 0 ? void 0 : settings.getNextFocusable) {
|
|
385
|
-
nextElementToFocus = settings.getNextFocusable(direction, (_a = document.activeElement) !== null && _a !== void 0 ? _a : undefined, event);
|
|
386
|
-
}
|
|
387
|
-
if (!nextElementToFocus) {
|
|
388
|
-
const lastFocusedIndex = getCurrentFocusedIndex();
|
|
389
|
-
let nextFocusedIndex = lastFocusedIndex;
|
|
390
|
-
if (direction === 'previous') {
|
|
391
|
-
nextFocusedIndex -= 1;
|
|
392
|
-
} else if (direction === 'start') {
|
|
393
|
-
nextFocusedIndex = 0;
|
|
394
|
-
} else if (direction === 'next') {
|
|
395
|
-
nextFocusedIndex += 1;
|
|
396
|
-
} else {
|
|
397
|
-
nextFocusedIndex = focusableElements.length - 1;
|
|
398
|
-
}
|
|
399
|
-
if (nextFocusedIndex < 0) {
|
|
400
|
-
if (focusOutBehavior === 'wrap' && event.key !== 'Tab') {
|
|
401
|
-
nextFocusedIndex = focusableElements.length - 1;
|
|
402
|
-
} else {
|
|
403
|
-
nextFocusedIndex = 0;
|
|
404
|
-
}
|
|
405
|
-
}
|
|
406
|
-
if (nextFocusedIndex >= focusableElements.length) {
|
|
407
|
-
if (focusOutBehavior === 'wrap' && event.key !== 'Tab') {
|
|
408
|
-
nextFocusedIndex = 0;
|
|
409
|
-
} else {
|
|
410
|
-
nextFocusedIndex = focusableElements.length - 1;
|
|
411
|
-
}
|
|
412
|
-
}
|
|
413
|
-
if (lastFocusedIndex !== nextFocusedIndex) {
|
|
414
|
-
nextElementToFocus = focusableElements[nextFocusedIndex];
|
|
415
|
-
}
|
|
416
|
-
}
|
|
417
|
-
if (activeDescendantControl) {
|
|
418
|
-
updateFocusedElement(nextElementToFocus || currentFocusedElement, true);
|
|
419
|
-
} else if (nextElementToFocus) {
|
|
420
|
-
lastKeyboardFocusDirection = direction;
|
|
421
|
-
nextElementToFocus.focus({
|
|
422
|
-
preventScroll
|
|
423
|
-
});
|
|
424
|
-
}
|
|
425
|
-
if (event.key !== 'Tab' || nextElementToFocus) {
|
|
426
|
-
event.preventDefault();
|
|
427
|
-
}
|
|
428
|
-
}
|
|
429
|
-
}
|
|
430
|
-
}, {
|
|
431
|
-
signal
|
|
432
|
-
});
|
|
433
|
-
return controller;
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
export { FocusKeys, activeDescendantActivatedDirectly, activeDescendantActivatedIndirectly, focusZone, hasActiveDescendantAttribute, isActiveDescendantAttribute };
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
let signalSupported = false;
|
|
2
|
-
function noop() {}
|
|
3
|
-
try {
|
|
4
|
-
const options = Object.create({}, {
|
|
5
|
-
signal: {
|
|
6
|
-
get() {
|
|
7
|
-
signalSupported = true;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
window.addEventListener('test', noop, options);
|
|
12
|
-
window.removeEventListener('test', noop, options);
|
|
13
|
-
} catch (e) {}
|
|
14
|
-
function featureSupported() {
|
|
15
|
-
return signalSupported;
|
|
16
|
-
}
|
|
17
|
-
function monkeyPatch() {
|
|
18
|
-
if (typeof window === 'undefined') {
|
|
19
|
-
return;
|
|
20
|
-
}
|
|
21
|
-
const originalAddEventListener = EventTarget.prototype.addEventListener;
|
|
22
|
-
EventTarget.prototype.addEventListener = function (name, originalCallback, optionsOrCapture) {
|
|
23
|
-
if (typeof optionsOrCapture === 'object' && 'signal' in optionsOrCapture && optionsOrCapture.signal instanceof AbortSignal) {
|
|
24
|
-
originalAddEventListener.call(optionsOrCapture.signal, 'abort', () => {
|
|
25
|
-
this.removeEventListener(name, originalCallback, optionsOrCapture);
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
return originalAddEventListener.call(this, name, originalCallback, optionsOrCapture);
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
function polyfill() {
|
|
32
|
-
if (!featureSupported()) {
|
|
33
|
-
monkeyPatch();
|
|
34
|
-
signalSupported = true;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export { polyfill };
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
function* iterateFocusableElements(container, options = {}) {
|
|
2
|
-
var _a, _b;
|
|
3
|
-
const strict = (_a = options.strict) !== null && _a !== void 0 ? _a : false;
|
|
4
|
-
const acceptFn = ((_b = options.onlyTabbable) !== null && _b !== void 0 ? _b : false) ? isTabbable : isFocusable;
|
|
5
|
-
const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {
|
|
6
|
-
acceptNode: node => node instanceof HTMLElement && acceptFn(node, strict) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP
|
|
7
|
-
});
|
|
8
|
-
let nextNode = null;
|
|
9
|
-
if (!options.reverse && acceptFn(container, strict)) {
|
|
10
|
-
yield container;
|
|
11
|
-
}
|
|
12
|
-
if (options.reverse) {
|
|
13
|
-
let lastChild = walker.lastChild();
|
|
14
|
-
while (lastChild) {
|
|
15
|
-
nextNode = lastChild;
|
|
16
|
-
lastChild = walker.lastChild();
|
|
17
|
-
}
|
|
18
|
-
} else {
|
|
19
|
-
nextNode = walker.firstChild();
|
|
20
|
-
}
|
|
21
|
-
while (nextNode instanceof HTMLElement) {
|
|
22
|
-
yield nextNode;
|
|
23
|
-
nextNode = options.reverse ? walker.previousNode() : walker.nextNode();
|
|
24
|
-
}
|
|
25
|
-
if (options.reverse && acceptFn(container, strict)) {
|
|
26
|
-
yield container;
|
|
27
|
-
}
|
|
28
|
-
return undefined;
|
|
29
|
-
}
|
|
30
|
-
function getFocusableChild(container, lastChild = false) {
|
|
31
|
-
return iterateFocusableElements(container, {
|
|
32
|
-
reverse: lastChild,
|
|
33
|
-
strict: true,
|
|
34
|
-
onlyTabbable: true
|
|
35
|
-
}).next().value;
|
|
36
|
-
}
|
|
37
|
-
function isFocusable(elem, strict = false) {
|
|
38
|
-
const disabledAttrInert = ['BUTTON', 'INPUT', 'SELECT', 'TEXTAREA', 'OPTGROUP', 'OPTION', 'FIELDSET'].includes(elem.tagName) && elem.disabled;
|
|
39
|
-
const hiddenInert = elem.hidden;
|
|
40
|
-
const hiddenInputInert = elem instanceof HTMLInputElement && elem.type === 'hidden';
|
|
41
|
-
const sentinelInert = elem.classList.contains('sentinel');
|
|
42
|
-
if (disabledAttrInert || hiddenInert || hiddenInputInert || sentinelInert) {
|
|
43
|
-
return false;
|
|
44
|
-
}
|
|
45
|
-
if (strict) {
|
|
46
|
-
const sizeInert = elem.offsetWidth === 0 || elem.offsetHeight === 0;
|
|
47
|
-
const visibilityInert = ['hidden', 'collapse'].includes(getComputedStyle(elem).visibility);
|
|
48
|
-
const clientRectsInert = elem.getClientRects().length === 0;
|
|
49
|
-
if (sizeInert || visibilityInert || clientRectsInert) {
|
|
50
|
-
return false;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
if (elem.getAttribute('tabindex') != null) {
|
|
54
|
-
return true;
|
|
55
|
-
}
|
|
56
|
-
if (elem instanceof HTMLAnchorElement && elem.getAttribute('href') == null) {
|
|
57
|
-
return false;
|
|
58
|
-
}
|
|
59
|
-
return elem.tabIndex !== -1;
|
|
60
|
-
}
|
|
61
|
-
function isTabbable(elem, strict = false) {
|
|
62
|
-
return isFocusable(elem, strict) && elem.getAttribute('tabindex') !== '-1';
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
export { getFocusableChild, isFocusable, isTabbable, iterateFocusableElements };
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { animateValue } from './js/index.js';
|
|
2
|
-
import { noop } from '../../utils/noop.js';
|
|
3
|
-
|
|
4
|
-
function createInstantAnimation({ keyframes, delay, onUpdate, onComplete, }) {
|
|
5
|
-
const setValue = () => {
|
|
6
|
-
onUpdate && onUpdate(keyframes[keyframes.length - 1]);
|
|
7
|
-
onComplete && onComplete();
|
|
8
|
-
/**
|
|
9
|
-
* TODO: As this API grows it could make sense to always return
|
|
10
|
-
* animateValue. This will be a bigger project as animateValue
|
|
11
|
-
* is frame-locked whereas this function resolves instantly.
|
|
12
|
-
* This is a behavioural change and also has ramifications regarding
|
|
13
|
-
* assumptions within tests.
|
|
14
|
-
*/
|
|
15
|
-
return {
|
|
16
|
-
time: 0,
|
|
17
|
-
speed: 1,
|
|
18
|
-
duration: 0,
|
|
19
|
-
play: (noop),
|
|
20
|
-
pause: (noop),
|
|
21
|
-
stop: (noop),
|
|
22
|
-
then: (resolve) => {
|
|
23
|
-
resolve();
|
|
24
|
-
return Promise.resolve();
|
|
25
|
-
},
|
|
26
|
-
cancel: (noop),
|
|
27
|
-
complete: (noop),
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
return delay
|
|
31
|
-
? animateValue({
|
|
32
|
-
keyframes: [0, 1],
|
|
33
|
-
duration: 0,
|
|
34
|
-
delay,
|
|
35
|
-
onComplete: setValue,
|
|
36
|
-
})
|
|
37
|
-
: setValue();
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export { createInstantAnimation };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { frame, cancelFrame, frameData } from '../../../frameloop/frame.js';
|
|
2
|
-
|
|
3
|
-
const frameloopDriver = (update) => {
|
|
4
|
-
const passTimestamp = ({ timestamp }) => update(timestamp);
|
|
5
|
-
return {
|
|
6
|
-
start: () => frame.update(passTimestamp, true),
|
|
7
|
-
stop: () => cancelFrame(passTimestamp),
|
|
8
|
-
/**
|
|
9
|
-
* If we're processing this frame we can use the
|
|
10
|
-
* framelocked timestamp to keep things in sync.
|
|
11
|
-
*/
|
|
12
|
-
now: () => frameData.isProcessing ? frameData.timestamp : performance.now(),
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export { frameloopDriver };
|