@livechat/dom-utils
Advanced tools
Comparing version 0.2.1 to 0.2.2
@@ -46,2 +46,17 @@ 'use strict'; | ||
var tabbable = require('tabbable'); | ||
function getNextTabbable(element, container) { | ||
if (container === void 0) { | ||
container = document.body; | ||
} | ||
var tabbables = tabbable(container); | ||
var elementIndex = dataUtils.findIndex(function (el) { | ||
return el === element; | ||
}, tabbables); | ||
var isElementLast = elementIndex === tabbables.length - 1; | ||
return tabbables[isElementLast ? 0 : elementIndex + 1]; | ||
} | ||
function getRoot() { | ||
@@ -62,2 +77,44 @@ return new Promise(function (resolve) { | ||
var cachedRTLOffsetType = null; // https://github.com/bvaughn/react-window/blob/c035eee067ea89029c89ecffd9eade1fc2ecb2dd/src/domHelpers.js#L31-L36 | ||
var getRTLOffsetType = function getRTLOffsetType() { | ||
if (cachedRTLOffsetType) { | ||
return cachedRTLOffsetType; | ||
} | ||
var outerDiv = document.createElement('div'); | ||
var outerStyle = outerDiv.style; | ||
outerStyle.width = '50px'; | ||
outerStyle.height = '50px'; | ||
outerStyle.overflow = 'scroll'; | ||
outerStyle.direction = 'rtl'; | ||
var innerDiv = document.createElement('div'); | ||
var innerStyle = innerDiv.style; | ||
innerStyle.width = '100px'; | ||
innerStyle.height = '50px'; | ||
outerDiv.appendChild(innerDiv); | ||
document.body.appendChild(outerDiv); | ||
if (outerDiv.scrollLeft > 0) { | ||
// Chrome 😩 | ||
// it renders initially with max scrollLeft and to shift it to the left we need to subtract the distance | ||
cachedRTLOffsetType = 'positive-descending'; | ||
} else { | ||
outerDiv.scrollLeft = 1; | ||
if (outerDiv.scrollLeft === 0) { | ||
// spec-compliant | ||
// it renders initially with 0 and to shift it to the left we need to subtract the distance | ||
cachedRTLOffsetType = 'negative'; | ||
} else { | ||
// non-chromium Edge 🤦♂️ | ||
// it renders initially with 0 and to shift it to the left we need to add the distance | ||
cachedRTLOffsetType = 'positive-ascending'; | ||
} | ||
} | ||
document.body.removeChild(outerDiv); | ||
return cachedRTLOffsetType; | ||
}; | ||
function isScrollOnBottom(node, threshold) { | ||
@@ -102,3 +159,5 @@ if (threshold === void 0) { | ||
exports.getComputedStyle = getComputedStyle; | ||
exports.getNextTabbable = getNextTabbable; | ||
exports.getRoot = getRoot; | ||
exports.getRTLOffsetType = getRTLOffsetType; | ||
exports.isScrollOnBottom = isScrollOnBottom; | ||
@@ -105,0 +164,0 @@ exports.isScrollOnTop = isScrollOnTop; |
@@ -1,2 +0,2 @@ | ||
import { forOwn, hasOwn, pick, sum } from '@livechat/data-utils'; | ||
import { forOwn, hasOwn, pick, sum, findIndex } from '@livechat/data-utils'; | ||
@@ -42,2 +42,17 @@ var applyStyle = (function (style, element) { | ||
var tabbable = require('tabbable'); | ||
function getNextTabbable(element, container) { | ||
if (container === void 0) { | ||
container = document.body; | ||
} | ||
var tabbables = tabbable(container); | ||
var elementIndex = findIndex(function (el) { | ||
return el === element; | ||
}, tabbables); | ||
var isElementLast = elementIndex === tabbables.length - 1; | ||
return tabbables[isElementLast ? 0 : elementIndex + 1]; | ||
} | ||
function getRoot() { | ||
@@ -58,2 +73,44 @@ return new Promise(function (resolve) { | ||
var cachedRTLOffsetType = null; // https://github.com/bvaughn/react-window/blob/c035eee067ea89029c89ecffd9eade1fc2ecb2dd/src/domHelpers.js#L31-L36 | ||
var getRTLOffsetType = function getRTLOffsetType() { | ||
if (cachedRTLOffsetType) { | ||
return cachedRTLOffsetType; | ||
} | ||
var outerDiv = document.createElement('div'); | ||
var outerStyle = outerDiv.style; | ||
outerStyle.width = '50px'; | ||
outerStyle.height = '50px'; | ||
outerStyle.overflow = 'scroll'; | ||
outerStyle.direction = 'rtl'; | ||
var innerDiv = document.createElement('div'); | ||
var innerStyle = innerDiv.style; | ||
innerStyle.width = '100px'; | ||
innerStyle.height = '50px'; | ||
outerDiv.appendChild(innerDiv); | ||
document.body.appendChild(outerDiv); | ||
if (outerDiv.scrollLeft > 0) { | ||
// Chrome 😩 | ||
// it renders initially with max scrollLeft and to shift it to the left we need to subtract the distance | ||
cachedRTLOffsetType = 'positive-descending'; | ||
} else { | ||
outerDiv.scrollLeft = 1; | ||
if (outerDiv.scrollLeft === 0) { | ||
// spec-compliant | ||
// it renders initially with 0 and to shift it to the left we need to subtract the distance | ||
cachedRTLOffsetType = 'negative'; | ||
} else { | ||
// non-chromium Edge 🤦♂️ | ||
// it renders initially with 0 and to shift it to the left we need to add the distance | ||
cachedRTLOffsetType = 'positive-ascending'; | ||
} | ||
} | ||
document.body.removeChild(outerDiv); | ||
return cachedRTLOffsetType; | ||
}; | ||
function isScrollOnBottom(node, threshold) { | ||
@@ -95,2 +152,2 @@ if (threshold === void 0) { | ||
export { applyElementSpec, applyStyle, getComputedStyle, getRoot, isScrollOnBottom, isScrollOnTop, prependChild, scrollToBottom, scrollToTop, removeNode }; | ||
export { applyElementSpec, applyStyle, getComputedStyle, getNextTabbable, getRoot, getRTLOffsetType, isScrollOnBottom, isScrollOnTop, prependChild, scrollToBottom, scrollToTop, removeNode }; |
@@ -18,2 +18,12 @@ (function (global, factory) { | ||
function findIndex(predicate, arr) { | ||
for (var index = 0; index < arr.length; index++) { | ||
if (predicate(arr[index])) { | ||
return index; | ||
} | ||
} | ||
return -1; | ||
} | ||
function forOwn(callback, obj) { | ||
@@ -75,2 +85,17 @@ return Object.keys(obj).forEach(function (key) { | ||
var tabbable = require('tabbable'); | ||
function getNextTabbable(element, container) { | ||
if (container === void 0) { | ||
container = document.body; | ||
} | ||
var tabbables = tabbable(container); | ||
var elementIndex = findIndex(function (el) { | ||
return el === element; | ||
}, tabbables); | ||
var isElementLast = elementIndex === tabbables.length - 1; | ||
return tabbables[isElementLast ? 0 : elementIndex + 1]; | ||
} | ||
function getRoot() { | ||
@@ -91,2 +116,44 @@ return new Promise(function (resolve) { | ||
var cachedRTLOffsetType = null; // https://github.com/bvaughn/react-window/blob/c035eee067ea89029c89ecffd9eade1fc2ecb2dd/src/domHelpers.js#L31-L36 | ||
var getRTLOffsetType = function getRTLOffsetType() { | ||
if (cachedRTLOffsetType) { | ||
return cachedRTLOffsetType; | ||
} | ||
var outerDiv = document.createElement('div'); | ||
var outerStyle = outerDiv.style; | ||
outerStyle.width = '50px'; | ||
outerStyle.height = '50px'; | ||
outerStyle.overflow = 'scroll'; | ||
outerStyle.direction = 'rtl'; | ||
var innerDiv = document.createElement('div'); | ||
var innerStyle = innerDiv.style; | ||
innerStyle.width = '100px'; | ||
innerStyle.height = '50px'; | ||
outerDiv.appendChild(innerDiv); | ||
document.body.appendChild(outerDiv); | ||
if (outerDiv.scrollLeft > 0) { | ||
// Chrome 😩 | ||
// it renders initially with max scrollLeft and to shift it to the left we need to subtract the distance | ||
cachedRTLOffsetType = 'positive-descending'; | ||
} else { | ||
outerDiv.scrollLeft = 1; | ||
if (outerDiv.scrollLeft === 0) { | ||
// spec-compliant | ||
// it renders initially with 0 and to shift it to the left we need to subtract the distance | ||
cachedRTLOffsetType = 'negative'; | ||
} else { | ||
// non-chromium Edge 🤦♂️ | ||
// it renders initially with 0 and to shift it to the left we need to add the distance | ||
cachedRTLOffsetType = 'positive-ascending'; | ||
} | ||
} | ||
document.body.removeChild(outerDiv); | ||
return cachedRTLOffsetType; | ||
}; | ||
function isScrollOnBottom(node, threshold) { | ||
@@ -131,3 +198,5 @@ if (threshold === void 0) { | ||
exports.getComputedStyle = getComputedStyle; | ||
exports.getNextTabbable = getNextTabbable; | ||
exports.getRoot = getRoot; | ||
exports.getRTLOffsetType = getRTLOffsetType; | ||
exports.isScrollOnBottom = isScrollOnBottom; | ||
@@ -134,0 +203,0 @@ exports.isScrollOnTop = isScrollOnTop; |
@@ -1,1 +0,1 @@ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.Differ={})}(this,function(t){"use strict";function e(t,e){return t+e}var o={}.hasOwnProperty;function u(t,e){return o.call(e,t)}function n(e,o){return Object.keys(o).forEach(function(t){e(o[t],t)})}function c(t){return t.reduce(e,0)}var i=function(t,o){n(function(t,e){o.style[e]=t},t)},d=!!document.documentElement.currentStyle;t.applyElementSpec=function(t,o){n(function(t,e){"style"!==e?o.setAttribute(e,t):i(t,o)},t)},t.applyStyle=i,t.getComputedStyle=function(t,e){var o,n=window.getComputedStyle(e),i="border-box"===n.boxSizing,r=(o=n,t.reduce(function(t,e){return t[e]=o[e],t},{}));d&&i&&u("width",r)&&null!==r.width&&(r.width=c([r.width,n.paddingLeft,n.paddingRight,n.borderLeftWidth,n.borderRightWidth].map(parseFloat))+"px");d&&i&&u("height",r)&&null!==r.height&&(r.height=c([r.height,n.paddingTop,n.paddingBottom,n.borderTopWidth,n.borderBottomWidth].map(parseFloat))+"px");return r},t.getRoot=function(){return new Promise(function(e){!function t(){document.body?e(document.body):setTimeout(t,100)}()})},t.isScrollOnBottom=function(t,e){return void 0===e&&(e=0),Math.abs(t.scrollTop+t.clientHeight-t.scrollHeight)<=e},t.isScrollOnTop=function(t,e){return void 0===e&&(e=0),t.scrollTop<=e},t.prependChild=function(t,e){t.insertBefore(e,t.children[0])},t.scrollToBottom=function(t){t.scrollTop=t.scrollHeight},t.scrollToTop=function(t){t.scrollTop=0},t.removeNode=function(t){var e=t.parentNode;e&&e.removeChild(t)},Object.defineProperty(t,"__esModule",{value:!0})}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.Differ={})}(this,function(e){"use strict";function t(e,t){return e+t}var n={}.hasOwnProperty;function d(e,t){return n.call(t,e)}function o(t,n){return Object.keys(n).forEach(function(e){t(n[e],e)})}function l(e){return e.reduce(t,0)}var r=function(e,n){o(function(e,t){n.style[t]=e},e)},c=!!document.documentElement.currentStyle,i=require("tabbable");var u=null;e.applyElementSpec=function(e,n){o(function(e,t){"style"!==t?n.setAttribute(t,e):r(e,n)},e)},e.applyStyle=r,e.getComputedStyle=function(e,t){var n,o=window.getComputedStyle(t),r="border-box"===o.boxSizing,i=(n=o,e.reduce(function(e,t){return e[t]=n[t],e},{}));c&&r&&d("width",i)&&null!==i.width&&(i.width=l([i.width,o.paddingLeft,o.paddingRight,o.borderLeftWidth,o.borderRightWidth].map(parseFloat))+"px");c&&r&&d("height",i)&&null!==i.height&&(i.height=l([i.height,o.paddingTop,o.paddingBottom,o.borderTopWidth,o.borderBottomWidth].map(parseFloat))+"px");return i},e.getNextTabbable=function(t,e){void 0===e&&(e=document.body);var n=i(e),o=function(e,t){for(var n=0;n<t.length;n++)if(e(t[n]))return n;return-1}(function(e){return e===t},n);return n[o===n.length-1?0:o+1]},e.getRoot=function(){return new Promise(function(t){!function e(){document.body?t(document.body):setTimeout(e,100)}()})},e.getRTLOffsetType=function(){if(u)return u;var e=document.createElement("div"),t=e.style;t.width="50px",t.height="50px",t.overflow="scroll",t.direction="rtl";var n=document.createElement("div"),o=n.style;return o.width="100px",o.height="50px",e.appendChild(n),document.body.appendChild(e),u=0<e.scrollLeft?"positive-descending":(e.scrollLeft=1,0===e.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(e),u},e.isScrollOnBottom=function(e,t){return void 0===t&&(t=0),Math.abs(e.scrollTop+e.clientHeight-e.scrollHeight)<=t},e.isScrollOnTop=function(e,t){return void 0===t&&(t=0),e.scrollTop<=t},e.prependChild=function(e,t){e.insertBefore(t,e.children[0])},e.scrollToBottom=function(e){e.scrollTop=e.scrollHeight},e.scrollToTop=function(e){e.scrollTop=0},e.removeNode=function(e){var t=e.parentNode;t&&t.removeChild(e)},Object.defineProperty(e,"__esModule",{value:!0})}); |
{ | ||
"name": "@livechat/dom-utils", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"description": "DOM utility functions", | ||
@@ -15,12 +15,8 @@ "contributors": [ | ||
"types": "./types", | ||
"files": [ | ||
"dist", | ||
"types/**/*.d.ts" | ||
], | ||
"keywords": [ | ||
"dom" | ||
], | ||
"files": ["dist", "types/**/*.d.ts"], | ||
"keywords": ["dom"], | ||
"dependencies": { | ||
"@livechat/data-utils": "^0.2.8", | ||
"csstype": "^2.6.5" | ||
"@livechat/data-utils": "^0.2.9", | ||
"csstype": "^2.6.5", | ||
"tabbable": "^4.0.0" | ||
}, | ||
@@ -27,0 +23,0 @@ "devDependencies": { |
@@ -1,3 +0,3 @@ | ||
declare const getComputedStyle: <Prop extends number | "alignContent" | "alignItems" | "alignSelf" | "animationDelay" | "animationDirection" | "animationDuration" | "animationFillMode" | "animationIterationCount" | "animationName" | "animationPlayState" | "animationTimingFunction" | "backfaceVisibility" | "backgroundAttachment" | "backgroundClip" | "backgroundColor" | "backgroundImage" | "backgroundOrigin" | "backgroundPosition" | "backgroundPositionX" | "backgroundPositionY" | "backgroundRepeat" | "backgroundSize" | "borderBottomColor" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStyle" | "borderBottomWidth" | "borderCollapse" | "borderImageOutset" | "borderImageRepeat" | "borderImageSlice" | "borderImageSource" | "borderImageWidth" | "borderLeftColor" | "borderLeftStyle" | "borderLeftWidth" | "borderRightColor" | "borderRightStyle" | "borderRightWidth" | "borderSpacing" | "borderTopColor" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopStyle" | "borderTopWidth" | "bottom" | "boxShadow" | "boxSizing" | "breakAfter" | "breakBefore" | "breakInside" | "captionSide" | "caretColor" | "clear" | "clipPath" | "color" | "columnCount" | "columnFill" | "columnGap" | "columnRuleColor" | "columnRuleStyle" | "columnRuleWidth" | "columnSpan" | "columnWidth" | "content" | "counterIncrement" | "counterReset" | "cursor" | "direction" | "display" | "emptyCells" | "filter" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontFeatureSettings" | "fontKerning" | "fontSize" | "fontSizeAdjust" | "fontStretch" | "fontStyle" | "fontSynthesis" | "fontVariant" | "fontVariantCaps" | "fontVariantEastAsian" | "fontVariantLigatures" | "fontVariantNumeric" | "fontVariantPosition" | "fontWeight" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridColumnEnd" | "gridColumnStart" | "gridRowEnd" | "gridRowStart" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "hyphens" | "imageOrientation" | "imageRendering" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineBreak" | "lineHeight" | "listStyleImage" | "listStylePosition" | "listStyleType" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maskComposite" | "maskImage" | "maskPosition" | "maskRepeat" | "maskSize" | "maskType" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "objectFit" | "objectPosition" | "opacity" | "order" | "orphans" | "outlineColor" | "outlineOffset" | "outlineStyle" | "outlineWidth" | "overflow" | "overflowAnchor" | "overflowWrap" | "overflowX" | "overflowY" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "pageBreakAfter" | "pageBreakBefore" | "pageBreakInside" | "perspective" | "perspectiveOrigin" | "placeContent" | "pointerEvents" | "position" | "quotes" | "resize" | "right" | "rotate" | "rowGap" | "rubyAlign" | "rubyPosition" | "scale" | "scrollBehavior" | "tabSize" | "tableLayout" | "textAlign" | "textAlignLast" | "textCombineUpright" | "textDecorationColor" | "textDecorationLine" | "textDecorationStyle" | "textEmphasisColor" | "textEmphasisPosition" | "textEmphasisStyle" | "textIndent" | "textJustify" | "textOrientation" | "textOverflow" | "textShadow" | "textTransform" | "textUnderlinePosition" | "top" | "touchAction" | "transform" | "transformBox" | "transformOrigin" | "transformStyle" | "transitionDelay" | "transitionDuration" | "transitionProperty" | "transitionTimingFunction" | "translate" | "unicodeBidi" | "userSelect" | "verticalAlign" | "visibility" | "whiteSpace" | "widows" | "width" | "willChange" | "wordBreak" | "wordSpacing" | "wordWrap" | "writingMode" | "zIndex" | "zoom" | "animation" | "background" | "border" | "borderBottom" | "borderColor" | "borderImage" | "borderLeft" | "borderRadius" | "borderRight" | "borderStyle" | "borderTop" | "borderWidth" | "columnRule" | "columns" | "flex" | "flexFlow" | "font" | "gap" | "grid" | "gridArea" | "gridColumn" | "gridRow" | "gridTemplate" | "listStyle" | "margin" | "mask" | "outline" | "padding" | "placeItems" | "placeSelf" | "textDecoration" | "textEmphasis" | "transition" | "msContentZoomChaining" | "msContentZoomLimitMax" | "msContentZoomLimitMin" | "msContentZoomSnapPoints" | "msContentZoomSnapType" | "msContentZooming" | "msFlowFrom" | "msFlowInto" | "msGridColumns" | "msGridRows" | "msHighContrastAdjust" | "msHyphenateLimitChars" | "msHyphenateLimitLines" | "msHyphenateLimitZone" | "msHyphens" | "msImeAlign" | "msOverflowStyle" | "msScrollChaining" | "msScrollLimitXMax" | "msScrollLimitXMin" | "msScrollLimitYMax" | "msScrollLimitYMin" | "msScrollRails" | "msScrollSnapPointsX" | "msScrollSnapPointsY" | "msScrollSnapType" | "msScrollTranslation" | "msTextCombineHorizontal" | "msTextSizeAdjust" | "msTouchAction" | "msTouchSelect" | "msUserSelect" | "msWrapFlow" | "msWrapMargin" | "msWrapThrough" | "msContentZoomLimit" | "msContentZoomSnap" | "msScrollLimit" | "msScrollSnapX" | "msScrollSnapY" | "clip" | "gridColumnGap" | "gridGap" | "gridRowGap" | "imeMode" | "alignmentBaseline" | "baselineShift" | "clipRule" | "dominantBaseline" | "fill" | "fillOpacity" | "fillRule" | "floodColor" | "floodOpacity" | "glyphOrientationVertical" | "lightingColor" | "marker" | "markerEnd" | "markerMid" | "markerStart" | "stopColor" | "stopOpacity" | "stroke" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "textAnchor" | "length" | "colorInterpolationFilters" | "cssFloat" | "cssText" | "enableBackground" | "glyphOrientationHorizontal" | "kerning" | "layoutGrid" | "layoutGridChar" | "layoutGridLine" | "layoutGridMode" | "layoutGridType" | "msFontFeatureSettings" | "msGridColumn" | "msGridColumnAlign" | "msGridColumnSpan" | "msGridRow" | "msGridRowAlign" | "msGridRowSpan" | "parentRule" | "penAction" | "rubyOverhang" | "textKashida" | "textKashidaSpace" | "webkitAlignContent" | "webkitAlignItems" | "webkitAlignSelf" | "webkitAnimation" | "webkitAnimationDelay" | "webkitAnimationDirection" | "webkitAnimationDuration" | "webkitAnimationFillMode" | "webkitAnimationIterationCount" | "webkitAnimationName" | "webkitAnimationPlayState" | "webkitAnimationTimingFunction" | "webkitAppearance" | "webkitBackfaceVisibility" | "webkitBackgroundClip" | "webkitBackgroundOrigin" | "webkitBackgroundSize" | "webkitBorderBottomLeftRadius" | "webkitBorderBottomRightRadius" | "webkitBorderImage" | "webkitBorderRadius" | "webkitBorderTopLeftRadius" | "webkitBorderTopRightRadius" | "webkitBoxAlign" | "webkitBoxDirection" | "webkitBoxFlex" | "webkitBoxOrdinalGroup" | "webkitBoxOrient" | "webkitBoxPack" | "webkitBoxShadow" | "webkitBoxSizing" | "webkitColumnBreakAfter" | "webkitColumnBreakBefore" | "webkitColumnBreakInside" | "webkitColumnCount" | "webkitColumnGap" | "webkitColumnRule" | "webkitColumnRuleColor" | "webkitColumnRuleStyle" | "webkitColumnRuleWidth" | "webkitColumnSpan" | "webkitColumnWidth" | "webkitColumns" | "webkitFilter" | "webkitFlex" | "webkitFlexBasis" | "webkitFlexDirection" | "webkitFlexFlow" | "webkitFlexGrow" | "webkitFlexShrink" | "webkitFlexWrap" | "webkitJustifyContent" | "webkitLineClamp" | "webkitMask" | "webkitMaskBoxImage" | "webkitMaskBoxImageOutset" | "webkitMaskBoxImageRepeat" | "webkitMaskBoxImageSlice" | "webkitMaskBoxImageSource" | "webkitMaskBoxImageWidth" | "webkitMaskClip" | "webkitMaskComposite" | "webkitMaskImage" | "webkitMaskOrigin" | "webkitMaskPosition" | "webkitMaskRepeat" | "webkitMaskSize" | "webkitOrder" | "webkitPerspective" | "webkitPerspectiveOrigin" | "webkitTapHighlightColor" | "webkitTextFillColor" | "webkitTextSizeAdjust" | "webkitTextStroke" | "webkitTextStrokeColor" | "webkitTextStrokeWidth" | "webkitTransform" | "webkitTransformOrigin" | "webkitTransformStyle" | "webkitTransition" | "webkitTransitionDelay" | "webkitTransitionDuration" | "webkitTransitionProperty" | "webkitTransitionTimingFunction" | "webkitUserModify" | "webkitUserSelect" | "webkitWritingMode" | "getPropertyPriority" | "getPropertyValue" | "item" | "removeProperty" | "setProperty">(props: Prop[], element: HTMLElement) => Pick<CSSStyleDeclaration, Prop>; | ||
declare const getComputedStyle: <Prop extends number | "alignContent" | "alignItems" | "alignSelf" | "alignmentBaseline" | "animation" | "animationDelay" | "animationDirection" | "animationDuration" | "animationFillMode" | "animationIterationCount" | "animationName" | "animationPlayState" | "animationTimingFunction" | "backfaceVisibility" | "background" | "backgroundAttachment" | "backgroundClip" | "backgroundColor" | "backgroundImage" | "backgroundOrigin" | "backgroundPosition" | "backgroundPositionX" | "backgroundPositionY" | "backgroundRepeat" | "backgroundSize" | "baselineShift" | "border" | "borderBottom" | "borderBottomColor" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStyle" | "borderBottomWidth" | "borderCollapse" | "borderColor" | "borderImage" | "borderImageOutset" | "borderImageRepeat" | "borderImageSlice" | "borderImageSource" | "borderImageWidth" | "borderLeft" | "borderLeftColor" | "borderLeftStyle" | "borderLeftWidth" | "borderRadius" | "borderRight" | "borderRightColor" | "borderRightStyle" | "borderRightWidth" | "borderSpacing" | "borderStyle" | "borderTop" | "borderTopColor" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopStyle" | "borderTopWidth" | "borderWidth" | "bottom" | "boxShadow" | "boxSizing" | "breakAfter" | "breakBefore" | "breakInside" | "captionSide" | "caretColor" | "clear" | "clip" | "clipPath" | "clipRule" | "color" | "colorInterpolationFilters" | "columnCount" | "columnFill" | "columnGap" | "columnRule" | "columnRuleColor" | "columnRuleStyle" | "columnRuleWidth" | "columnSpan" | "columnWidth" | "columns" | "content" | "counterIncrement" | "counterReset" | "cssFloat" | "cssText" | "cursor" | "direction" | "display" | "dominantBaseline" | "emptyCells" | "enableBackground" | "fill" | "fillOpacity" | "fillRule" | "filter" | "flex" | "flexBasis" | "flexDirection" | "flexFlow" | "flexGrow" | "flexShrink" | "flexWrap" | "floodColor" | "floodOpacity" | "font" | "fontFamily" | "fontFeatureSettings" | "fontKerning" | "fontSize" | "fontSizeAdjust" | "fontStretch" | "fontStyle" | "fontSynthesis" | "fontVariant" | "fontVariantCaps" | "fontVariantEastAsian" | "fontVariantLigatures" | "fontVariantNumeric" | "fontVariantPosition" | "fontWeight" | "gap" | "glyphOrientationHorizontal" | "glyphOrientationVertical" | "grid" | "gridArea" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridColumn" | "gridColumnEnd" | "gridColumnGap" | "gridColumnStart" | "gridGap" | "gridRow" | "gridRowEnd" | "gridRowGap" | "gridRowStart" | "gridTemplate" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "hyphens" | "imageOrientation" | "imageRendering" | "imeMode" | "justifyContent" | "justifyItems" | "justifySelf" | "kerning" | "layoutGrid" | "layoutGridChar" | "layoutGridLine" | "layoutGridMode" | "layoutGridType" | "left" | "length" | "letterSpacing" | "lightingColor" | "lineBreak" | "lineHeight" | "listStyle" | "listStyleImage" | "listStylePosition" | "listStyleType" | "margin" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "marker" | "markerEnd" | "markerMid" | "markerStart" | "mask" | "maskComposite" | "maskImage" | "maskPosition" | "maskRepeat" | "maskSize" | "maskType" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "msContentZoomChaining" | "msContentZoomLimit" | "msContentZoomLimitMax" | "msContentZoomLimitMin" | "msContentZoomSnap" | "msContentZoomSnapPoints" | "msContentZoomSnapType" | "msContentZooming" | "msFlowFrom" | "msFlowInto" | "msFontFeatureSettings" | "msGridColumn" | "msGridColumnAlign" | "msGridColumnSpan" | "msGridColumns" | "msGridRow" | "msGridRowAlign" | "msGridRowSpan" | "msGridRows" | "msHighContrastAdjust" | "msHyphenateLimitChars" | "msHyphenateLimitLines" | "msHyphenateLimitZone" | "msHyphens" | "msImeAlign" | "msOverflowStyle" | "msScrollChaining" | "msScrollLimit" | "msScrollLimitXMax" | "msScrollLimitXMin" | "msScrollLimitYMax" | "msScrollLimitYMin" | "msScrollRails" | "msScrollSnapPointsX" | "msScrollSnapPointsY" | "msScrollSnapType" | "msScrollSnapX" | "msScrollSnapY" | "msScrollTranslation" | "msTextCombineHorizontal" | "msTextSizeAdjust" | "msTouchAction" | "msTouchSelect" | "msUserSelect" | "msWrapFlow" | "msWrapMargin" | "msWrapThrough" | "objectFit" | "objectPosition" | "opacity" | "order" | "orphans" | "outline" | "outlineColor" | "outlineOffset" | "outlineStyle" | "outlineWidth" | "overflow" | "overflowAnchor" | "overflowWrap" | "overflowX" | "overflowY" | "padding" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "pageBreakAfter" | "pageBreakBefore" | "pageBreakInside" | "parentRule" | "penAction" | "perspective" | "perspectiveOrigin" | "placeContent" | "placeItems" | "placeSelf" | "pointerEvents" | "position" | "quotes" | "resize" | "right" | "rotate" | "rowGap" | "rubyAlign" | "rubyOverhang" | "rubyPosition" | "scale" | "scrollBehavior" | "stopColor" | "stopOpacity" | "stroke" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "tabSize" | "tableLayout" | "textAlign" | "textAlignLast" | "textAnchor" | "textCombineUpright" | "textDecoration" | "textDecorationColor" | "textDecorationLine" | "textDecorationStyle" | "textEmphasis" | "textEmphasisColor" | "textEmphasisPosition" | "textEmphasisStyle" | "textIndent" | "textJustify" | "textKashida" | "textKashidaSpace" | "textOrientation" | "textOverflow" | "textShadow" | "textTransform" | "textUnderlinePosition" | "top" | "touchAction" | "transform" | "transformBox" | "transformOrigin" | "transformStyle" | "transition" | "transitionDelay" | "transitionDuration" | "transitionProperty" | "transitionTimingFunction" | "translate" | "unicodeBidi" | "userSelect" | "verticalAlign" | "visibility" | "webkitAlignContent" | "webkitAlignItems" | "webkitAlignSelf" | "webkitAnimation" | "webkitAnimationDelay" | "webkitAnimationDirection" | "webkitAnimationDuration" | "webkitAnimationFillMode" | "webkitAnimationIterationCount" | "webkitAnimationName" | "webkitAnimationPlayState" | "webkitAnimationTimingFunction" | "webkitAppearance" | "webkitBackfaceVisibility" | "webkitBackgroundClip" | "webkitBackgroundOrigin" | "webkitBackgroundSize" | "webkitBorderBottomLeftRadius" | "webkitBorderBottomRightRadius" | "webkitBorderImage" | "webkitBorderRadius" | "webkitBorderTopLeftRadius" | "webkitBorderTopRightRadius" | "webkitBoxAlign" | "webkitBoxDirection" | "webkitBoxFlex" | "webkitBoxOrdinalGroup" | "webkitBoxOrient" | "webkitBoxPack" | "webkitBoxShadow" | "webkitBoxSizing" | "webkitColumnBreakAfter" | "webkitColumnBreakBefore" | "webkitColumnBreakInside" | "webkitColumnCount" | "webkitColumnGap" | "webkitColumnRule" | "webkitColumnRuleColor" | "webkitColumnRuleStyle" | "webkitColumnRuleWidth" | "webkitColumnSpan" | "webkitColumnWidth" | "webkitColumns" | "webkitFilter" | "webkitFlex" | "webkitFlexBasis" | "webkitFlexDirection" | "webkitFlexFlow" | "webkitFlexGrow" | "webkitFlexShrink" | "webkitFlexWrap" | "webkitJustifyContent" | "webkitLineClamp" | "webkitMask" | "webkitMaskBoxImage" | "webkitMaskBoxImageOutset" | "webkitMaskBoxImageRepeat" | "webkitMaskBoxImageSlice" | "webkitMaskBoxImageSource" | "webkitMaskBoxImageWidth" | "webkitMaskClip" | "webkitMaskComposite" | "webkitMaskImage" | "webkitMaskOrigin" | "webkitMaskPosition" | "webkitMaskRepeat" | "webkitMaskSize" | "webkitOrder" | "webkitPerspective" | "webkitPerspectiveOrigin" | "webkitTapHighlightColor" | "webkitTextFillColor" | "webkitTextSizeAdjust" | "webkitTextStroke" | "webkitTextStrokeColor" | "webkitTextStrokeWidth" | "webkitTransform" | "webkitTransformOrigin" | "webkitTransformStyle" | "webkitTransition" | "webkitTransitionDelay" | "webkitTransitionDuration" | "webkitTransitionProperty" | "webkitTransitionTimingFunction" | "webkitUserModify" | "webkitUserSelect" | "webkitWritingMode" | "whiteSpace" | "widows" | "width" | "willChange" | "wordBreak" | "wordSpacing" | "wordWrap" | "writingMode" | "zIndex" | "zoom" | "getPropertyPriority" | "getPropertyValue" | "item" | "removeProperty" | "setProperty">(props: Prop[], element: HTMLElement) => Pick<CSSStyleDeclaration, Prop>; | ||
export default getComputedStyle; | ||
//# sourceMappingURL=getComputedStyle.d.ts.map |
export { default as applyElementSpec } from './applyElementSpec'; | ||
export { default as applyStyle } from './applyStyle'; | ||
export { default as getComputedStyle } from './getComputedStyle'; | ||
export { default as getNextTabbable } from './getNextTabbable'; | ||
export { default as getRoot } from './getRoot'; | ||
export { default as getRTLOffsetType } from './getRTLOffsetType'; | ||
export { default as isScrollOnBottom } from './isScrollOnBottom'; | ||
@@ -6,0 +8,0 @@ export { default as isScrollOnTop } from './isScrollOnTop'; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
29308
18
489
3
3
+ Addedtabbable@^4.0.0
+ Addedtabbable@4.0.0(transitive)
Updated@livechat/data-utils@^0.2.9