Update Bootstrap to 5.3.0-alpha3

This commit is contained in:
Will Faught
2023-04-23 21:37:59 -07:00
parent 94a73b72ca
commit de7bd8d243
158 changed files with 1154 additions and 1024 deletions

View File

@@ -16,10 +16,9 @@ var unsetSides = {
// Zooming can change the DPR, but it seems to report a value that will
// cleanly divide the values into the appropriate subpixels.
function roundOffsetsByDPR(_ref) {
function roundOffsetsByDPR(_ref, win) {
var x = _ref.x,
y = _ref.y;
var win = window;
var dpr = win.devicePixelRatio || 1;
return {
x: round(x * dpr) / dpr || 0,
@@ -102,7 +101,7 @@ export function mapToStyles(_ref2) {
var _ref4 = roundOffsets === true ? roundOffsetsByDPR({
x: x,
y: y
}) : {
}, getWindow(popper)) : {
x: x,
y: y
};

View File

@@ -46,8 +46,7 @@ const unsetSides = {
// Round the offsets to the nearest suitable subpixel based on the DPR.
// Zooming can change the DPR, but it seems to report a value that will
// cleanly divide the values into the appropriate subpixels.
function roundOffsetsByDPR({ x, y }): Offsets {
const win: Window = window;
function roundOffsetsByDPR({ x, y }, win: Window): Offsets {
const dpr = win.devicePixelRatio || 1;
return {
@@ -150,7 +149,7 @@ export function mapToStyles({
({ x, y } =
roundOffsets === true
? roundOffsetsByDPR({ x, y })
? roundOffsetsByDPR({ x, y }, getWindow(popper))
: { x, y });
if (gpuAcceleration) {

View File

@@ -1,7 +1,7 @@
export default function getUAString() {
var uaData = navigator.userAgentData;
if (uaData != null && uaData.brands) {
if (uaData != null && uaData.brands && Array.isArray(uaData.brands)) {
return uaData.brands.map(function (item) {
return item.brand + "/" + item.version;
}).join(' ');

View File

@@ -10,7 +10,7 @@ interface NavigatorUAData {
export default function getUAString(): string {
const uaData = (navigator: Navigator).userAgentData;
if (uaData?.brands) {
if (uaData?.brands && Array.isArray(uaData.brands)) {
return uaData.brands
.map((item) => `${item.brand}/${item.version}`)
.join(' ');