@baloise/ds-core 17.4.0-snapshot.1609-d2bcc38d3 → 17.4.0
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/components/all.d.ts +0 -2
- package/components/all.js +0 -3
- package/components/bal-app.js +93 -1
- package/components/bal-checkbox2.js +1 -1
- package/components/bal-close2.js +1 -1
- package/components/bal-date-calendar2.js +1 -1
- package/components/bal-modal.js +1 -1
- package/components/bal-radio2.js +1 -1
- package/components/bal-steps.js +1 -1
- package/components/bal-tabs2.js +1 -1
- package/components/bal-time-input.js +1 -1
- package/components/floating-ui.dom.esm.js +77 -205
- package/components/index.js +314 -7
- package/components/tokens.esm.js +1 -1
- package/dist/baloise-design-system/baloise-design-system.esm.js +1 -1
- package/dist/baloise-design-system/baloise-design-system.js +1 -1
- package/dist/baloise-design-system/index.esm.js +1 -1
- package/dist/baloise-design-system/p-00b2c8e27d.entry.js +1 -0
- package/dist/baloise-design-system/{p-9e489928.system.js → p-03470b7c.system.js} +1 -1
- package/dist/baloise-design-system/{p-0b6380a77a.entry.js → p-04e32e17e9.entry.js} +1 -1
- package/dist/baloise-design-system/{p-0a00140ece.system.entry.js → p-0831f02fb0.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-12af198b96.system.entry.js → p-1277f286b7.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-fa246bef.system.js → p-195ee683.system.js} +1 -1
- package/dist/baloise-design-system/{p-4dc30ed346.system.entry.js → p-1cbe7106ba.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-e4ff14c5bf.system.entry.js → p-242ac835e0.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-273fb2c2.system.js +1 -1
- package/dist/baloise-design-system/p-31876153a5.entry.js +1 -0
- package/dist/baloise-design-system/p-348f54acd8.entry.js +1 -0
- package/dist/baloise-design-system/{p-13d7688b.js → p-35baa468.js} +1 -1
- package/dist/baloise-design-system/p-36218e79.js +1 -0
- package/dist/baloise-design-system/{p-4affef9b9b.entry.js → p-396641837c.entry.js} +1 -1
- package/dist/baloise-design-system/p-3bc55789.js +1 -0
- package/dist/baloise-design-system/{p-3d5fac87cb.entry.js → p-3c1ea7b3e0.entry.js} +1 -1
- package/dist/baloise-design-system/p-3e039b9b6b.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-f669df60fb.entry.js → p-464f369ad6.entry.js} +1 -1
- package/dist/baloise-design-system/p-51e22c0c.js +1 -0
- package/dist/baloise-design-system/{p-8f2ebeb2.js → p-5940d4c2.js} +1 -1
- package/dist/baloise-design-system/{p-cf570c9464.entry.js → p-6267186e70.entry.js} +1 -1
- package/dist/baloise-design-system/{p-540bfa19.system.js → p-649e542e.system.js} +1 -1
- package/dist/baloise-design-system/{p-b721864305.entry.js → p-6be974c740.entry.js} +1 -1
- package/dist/baloise-design-system/{p-e0c8d647b3.system.entry.js → p-72a32388f4.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-44539ccf68.entry.js → p-75fedb78c3.entry.js} +1 -1
- package/dist/baloise-design-system/{p-deaa160f21.system.entry.js → p-7615b673a0.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-db9f48c0d5.system.entry.js → p-762c8fa651.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-6b14f26a4d.system.entry.js → p-78dada2c23.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-2d98519440.system.entry.js → p-7dbfc01060.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-7bd7839936.entry.js → p-80bf87ba56.entry.js} +1 -1
- package/dist/baloise-design-system/{p-6e4a8fa7.system.js → p-823eeecd.system.js} +1 -1
- package/dist/baloise-design-system/{p-341c9b6c63.entry.js → p-824353e256.entry.js} +1 -1
- package/dist/baloise-design-system/p-96cdf92a85.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-570a1d673a.entry.js → p-9aa95fbc37.entry.js} +1 -1
- package/dist/baloise-design-system/{p-71162da762.entry.js → p-9b73822c14.entry.js} +1 -1
- package/dist/baloise-design-system/p-9d2037e834.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-8869d8fe38.system.entry.js → p-9eeaac7842.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-c08cbae3ec.system.entry.js → p-a3141b6fbf.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-bb308299af.entry.js → p-a857e31d7e.entry.js} +1 -1
- package/dist/baloise-design-system/{p-4440f31c6b.system.entry.js → p-afa8aa0eec.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-525a4b8a95.entry.js → p-ba68f2ce70.entry.js} +1 -1
- package/dist/baloise-design-system/{p-34a93475db.system.entry.js → p-c2f12a9f5c.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-c6f5e9453a.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-3cb3bf6ca0.system.entry.js → p-c70043bd61.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-94b7fba934.entry.js → p-c8fae04995.entry.js} +1 -1
- package/dist/baloise-design-system/p-c991d944.js +1 -1
- package/dist/baloise-design-system/{p-363254ce.system.js → p-ca5cbdaf.system.js} +1 -1
- package/dist/baloise-design-system/{p-d5cb701b.system.js → p-cbef3146.system.js} +1 -1
- package/dist/baloise-design-system/{p-2697b88cca.entry.js → p-ccb73909c6.entry.js} +1 -1
- package/dist/baloise-design-system/p-d404537f.system.js +1 -0
- package/dist/baloise-design-system/{p-b2e3f97a3f.entry.js → p-d860cbbe40.entry.js} +1 -1
- package/dist/baloise-design-system/{p-070b692d.js → p-da6e6695.js} +1 -1
- package/dist/baloise-design-system/p-e2a70f10.system.js +1 -0
- package/dist/baloise-design-system/{p-be02300bdd.entry.js → p-e6b2f1a846.entry.js} +1 -1
- package/dist/baloise-design-system/{p-e562e98c7e.system.entry.js → p-ec4e5d4ecc.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-73fdcff369.entry.js → p-f5a0884f92.entry.js} +1 -1
- package/dist/baloise-design-system/{p-a8eef09399.system.entry.js → p-f7554b087f.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-f8c7a05b49.entry.js +1 -0
- package/dist/baloise-design-system/{p-5514228033.system.entry.js → p-f908b02917.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-e63b388285.system.entry.js → p-f9950a0b55.system.entry.js} +1 -1
- package/dist/cjs/{global-872cca8d.js → app-globals-fa3c14cc.js} +4 -2
- package/dist/cjs/bal-carousel_2.cjs.entry.js +3 -3
- package/dist/cjs/bal-checkbox_2.cjs.entry.js +1 -1
- package/dist/cjs/bal-close.cjs.entry.js +1 -1
- package/dist/cjs/bal-date-calendar_2.cjs.entry.js +1 -1
- package/dist/cjs/bal-date.cjs.entry.js +1 -1
- package/dist/cjs/bal-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/bal-hint_5.cjs.entry.js +3 -3
- package/dist/cjs/bal-list_8.cjs.entry.js +3 -3
- package/dist/cjs/bal-logo.cjs.entry.js +3 -3
- package/dist/cjs/bal-modal_3.cjs.entry.js +1 -1
- package/dist/cjs/bal-nav_8.cjs.entry.js +3 -3
- package/dist/cjs/bal-navbar_5.cjs.entry.js +3 -3
- package/dist/cjs/bal-pagination.cjs.entry.js +3 -3
- package/dist/cjs/bal-popup.cjs.entry.js +1 -1
- package/dist/cjs/bal-progress-bar.cjs.entry.js +4 -4
- package/dist/cjs/bal-radio_2.cjs.entry.js +1 -1
- package/dist/cjs/bal-segment_2.cjs.entry.js +4 -4
- package/dist/cjs/bal-shape.cjs.entry.js +1 -1
- package/dist/cjs/bal-steps.cjs.entry.js +4 -4
- package/dist/cjs/bal-tab-item_2.cjs.entry.js +4 -4
- package/dist/cjs/bal-time-input.cjs.entry.js +1 -1
- package/dist/cjs/bal-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/baloise-design-system.cjs.js +2 -3
- package/dist/cjs/{breakpoints.decorator-f4800188.js → breakpoints.decorator-a8a8d834.js} +1 -1
- package/dist/cjs/{breakpoints.subject-3244205b.js → breakpoints.subject-6e379a10.js} +1 -1
- package/dist/cjs/{floating-ui-838f057c.js → floating-ui-3147d2ff.js} +1 -1
- package/dist/cjs/{floating-ui.dom.esm-13e3f667.js → floating-ui.dom.esm-2ece9686.js} +77 -205
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/initialize-3059001f.js +1 -1
- package/dist/cjs/loader.cjs.js +2 -3
- package/dist/cjs/{tokens.esm-b1eb9ac4.js → tokens.esm-793904fc.js} +1 -1
- package/dist/cjs/{window-resize.decorator-6133d79a.js → window-resize.decorator-8ca25081.js} +1 -1
- package/dist/collection/collection-manifest.json +1 -2
- package/dist/collection/components/bal-checkbox/radio-checkbox.css +1 -1
- package/dist/collection/components/bal-close/bal-close.css +1 -1
- package/dist/collection/components/bal-date/bal-date-calendar/bal-date-calendar.css +1 -1
- package/dist/collection/components/bal-modal/bal-modal.css +1 -1
- package/dist/collection/components/bal-steps/bal-steps.css +1 -1
- package/dist/collection/components/bal-tabs/bal-tabs.css +1 -1
- package/dist/collection/components/bal-time-input/bal-time-input.css +1 -1
- package/dist/collection/utils/constants/version.constant.js +1 -1
- package/dist/esm/{global-181336dc.js → app-globals-5b18a75c.js} +4 -2
- package/dist/esm/bal-carousel_2.entry.js +3 -3
- package/dist/esm/bal-checkbox_2.entry.js +1 -1
- package/dist/esm/bal-close.entry.js +1 -1
- package/dist/esm/bal-date-calendar_2.entry.js +1 -1
- package/dist/esm/bal-date.entry.js +1 -1
- package/dist/esm/bal-dropdown.entry.js +1 -1
- package/dist/esm/bal-hint_5.entry.js +3 -3
- package/dist/esm/bal-list_8.entry.js +3 -3
- package/dist/esm/bal-logo.entry.js +3 -3
- package/dist/esm/bal-modal_3.entry.js +1 -1
- package/dist/esm/bal-nav_8.entry.js +3 -3
- package/dist/esm/bal-navbar_5.entry.js +3 -3
- package/dist/esm/bal-pagination.entry.js +3 -3
- package/dist/esm/bal-popup.entry.js +1 -1
- package/dist/esm/bal-progress-bar.entry.js +4 -4
- package/dist/esm/bal-radio_2.entry.js +1 -1
- package/dist/esm/bal-segment_2.entry.js +4 -4
- package/dist/esm/bal-shape.entry.js +1 -1
- package/dist/esm/bal-steps.entry.js +4 -4
- package/dist/esm/bal-tab-item_2.entry.js +4 -4
- package/dist/esm/bal-time-input.entry.js +1 -1
- package/dist/esm/bal-tooltip.entry.js +1 -1
- package/dist/esm/baloise-design-system.js +2 -3
- package/dist/esm/{breakpoints.decorator-43a5539d.js → breakpoints.decorator-a6d3eb5c.js} +1 -1
- package/dist/esm/{breakpoints.subject-41117dc4.js → breakpoints.subject-02e0dc05.js} +1 -1
- package/dist/esm/{floating-ui-d05a7ad6.js → floating-ui-90bc6e58.js} +1 -1
- package/dist/esm/{floating-ui.dom.esm-efb93616.js → floating-ui.dom.esm-8dcdb8d6.js} +77 -205
- package/dist/esm/index.js +3 -3
- package/dist/esm/initialize-66a526c0.js +1 -1
- package/dist/esm/loader.js +2 -3
- package/dist/esm/{tokens.esm-376de6fe.js → tokens.esm-2c058527.js} +1 -1
- package/dist/esm/{window-resize.decorator-66d8fd79.js → window-resize.decorator-37add7cf.js} +1 -1
- package/dist/esm-es5/app-globals-5b18a75c.js +1 -0
- package/dist/esm-es5/bal-carousel_2.entry.js +1 -1
- package/dist/esm-es5/bal-checkbox_2.entry.js +1 -1
- package/dist/esm-es5/bal-close.entry.js +1 -1
- package/dist/esm-es5/bal-date-calendar_2.entry.js +1 -1
- package/dist/esm-es5/bal-date.entry.js +1 -1
- package/dist/esm-es5/bal-dropdown.entry.js +1 -1
- package/dist/esm-es5/bal-hint_5.entry.js +1 -1
- package/dist/esm-es5/bal-list_8.entry.js +1 -1
- package/dist/esm-es5/bal-logo.entry.js +1 -1
- package/dist/esm-es5/bal-modal_3.entry.js +1 -1
- package/dist/esm-es5/bal-nav_8.entry.js +1 -1
- package/dist/esm-es5/bal-navbar_5.entry.js +1 -1
- package/dist/esm-es5/bal-pagination.entry.js +1 -1
- package/dist/esm-es5/bal-popup.entry.js +1 -1
- package/dist/esm-es5/bal-progress-bar.entry.js +1 -1
- package/dist/esm-es5/bal-radio_2.entry.js +1 -1
- package/dist/esm-es5/bal-segment_2.entry.js +1 -1
- package/dist/esm-es5/bal-shape.entry.js +1 -1
- package/dist/esm-es5/bal-steps.entry.js +1 -1
- package/dist/esm-es5/bal-tab-item_2.entry.js +1 -1
- package/dist/esm-es5/bal-time-input.entry.js +1 -1
- package/dist/esm-es5/bal-tooltip.entry.js +1 -1
- package/dist/esm-es5/baloise-design-system.js +1 -1
- package/dist/esm-es5/breakpoints.decorator-a6d3eb5c.js +1 -0
- package/dist/esm-es5/{breakpoints.subject-41117dc4.js → breakpoints.subject-02e0dc05.js} +1 -1
- package/dist/esm-es5/{floating-ui-d05a7ad6.js → floating-ui-90bc6e58.js} +1 -1
- package/dist/esm-es5/floating-ui.dom.esm-8dcdb8d6.js +1 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/initialize-66a526c0.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{window-resize.decorator-66d8fd79.js → window-resize.decorator-37add7cf.js} +1 -1
- package/dist/types/components.d.ts +0 -37
- package/package.json +8 -6
- package/components/bal-app2.js +0 -95
- package/components/bal-doc-app.d.ts +0 -11
- package/components/bal-doc-app.js +0 -262
- package/components/initialize.js +0 -312
- package/dist/baloise-design-system/p-07bae1fdcc.system.entry.js +0 -1
- package/dist/baloise-design-system/p-0d5459caac.system.entry.js +0 -1
- package/dist/baloise-design-system/p-10ff0eaf.js +0 -1
- package/dist/baloise-design-system/p-1c8e64e58b.system.entry.js +0 -1
- package/dist/baloise-design-system/p-2724ad9065.entry.js +0 -1
- package/dist/baloise-design-system/p-50f3b012.js +0 -1
- package/dist/baloise-design-system/p-55fc8522eb.system.entry.js +0 -1
- package/dist/baloise-design-system/p-59d9918c.system.js +0 -1
- package/dist/baloise-design-system/p-9fbf3690.system.js +0 -1
- package/dist/baloise-design-system/p-b21f2874.system.js +0 -1
- package/dist/baloise-design-system/p-c017695c41.entry.js +0 -1
- package/dist/baloise-design-system/p-e48a46d6d7.entry.js +0 -1
- package/dist/baloise-design-system/p-e4b50159.js +0 -1
- package/dist/baloise-design-system/p-ec5776f5.js +0 -1
- package/dist/baloise-design-system/p-f1849ab83d.entry.js +0 -1
- package/dist/baloise-design-system/p-f55c127cb5.system.entry.js +0 -1
- package/dist/baloise-design-system/p-ffe0476dde.entry.js +0 -1
- package/dist/cjs/app-globals-44d3a5af.js +0 -7
- package/dist/cjs/bal-doc-app.cjs.entry.js +0 -233
- package/dist/collection/components/docs/bal-doc-app/bal-doc-app.css +0 -1
- package/dist/collection/components/docs/bal-doc-app/bal-doc-app.js +0 -247
- package/dist/esm/app-globals-c5ea8144.js +0 -5
- package/dist/esm/bal-doc-app.entry.js +0 -229
- package/dist/esm-es5/app-globals-c5ea8144.js +0 -1
- package/dist/esm-es5/bal-doc-app.entry.js +0 -1
- package/dist/esm-es5/breakpoints.decorator-43a5539d.js +0 -1
- package/dist/esm-es5/floating-ui.dom.esm-efb93616.js +0 -1
- package/dist/esm-es5/global-181336dc.js +0 -1
- package/dist/types/components/docs/bal-doc-app/bal-doc-app.d.ts +0 -21
- package/dist/types/home/runner/work/design-system/design-system/packages/core/.stencil/packages/icons/src/index.d.ts +0 -82
- /package/dist/baloise-design-system/{p-6e1e6cc5.js → p-25431930.js} +0 -0
- /package/dist/baloise-design-system/{p-b119ef19.system.js → p-80a4075f.system.js} +0 -0
- /package/dist/esm-es5/{tokens.esm-376de6fe.js → tokens.esm-2c058527.js} +0 -0
|
@@ -119,21 +119,12 @@ function getPaddingObject(padding) {
|
|
|
119
119
|
};
|
|
120
120
|
}
|
|
121
121
|
function rectToClientRect(rect) {
|
|
122
|
-
const {
|
|
123
|
-
x,
|
|
124
|
-
y,
|
|
125
|
-
width,
|
|
126
|
-
height
|
|
127
|
-
} = rect;
|
|
128
122
|
return {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
bottom: y + height,
|
|
135
|
-
x,
|
|
136
|
-
y
|
|
123
|
+
...rect,
|
|
124
|
+
top: rect.y,
|
|
125
|
+
left: rect.x,
|
|
126
|
+
right: rect.x + rect.width,
|
|
127
|
+
bottom: rect.y + rect.height
|
|
137
128
|
};
|
|
138
129
|
}
|
|
139
130
|
|
|
@@ -292,7 +283,7 @@ const computePosition$1 = async (reference, floating, config) => {
|
|
|
292
283
|
* - 0 = lies flush with the boundary
|
|
293
284
|
* @see https://floating-ui.com/docs/detectOverflow
|
|
294
285
|
*/
|
|
295
|
-
async function detectOverflow
|
|
286
|
+
async function detectOverflow(state, options) {
|
|
296
287
|
var _await$platform$isEle;
|
|
297
288
|
if (options === void 0) {
|
|
298
289
|
options = {};
|
|
@@ -322,10 +313,9 @@ async function detectOverflow$1(state, options) {
|
|
|
322
313
|
strategy
|
|
323
314
|
}));
|
|
324
315
|
const rect = elementContext === 'floating' ? {
|
|
316
|
+
...rects.floating,
|
|
325
317
|
x,
|
|
326
|
-
y
|
|
327
|
-
width: rects.floating.width,
|
|
328
|
-
height: rects.floating.height
|
|
318
|
+
y
|
|
329
319
|
} : rects.reference;
|
|
330
320
|
const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
|
|
331
321
|
const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {
|
|
@@ -470,7 +460,7 @@ const autoPlacement$1 = function (options) {
|
|
|
470
460
|
...detectOverflowOptions
|
|
471
461
|
} = evaluate(options, state);
|
|
472
462
|
const placements$1 = alignment !== undefined || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;
|
|
473
|
-
const overflow = await detectOverflow
|
|
463
|
+
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
474
464
|
const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;
|
|
475
465
|
const currentPlacement = placements$1[currentIndex];
|
|
476
466
|
if (currentPlacement == null) {
|
|
@@ -575,16 +565,14 @@ const flip$1 = function (options) {
|
|
|
575
565
|
return {};
|
|
576
566
|
}
|
|
577
567
|
const side = getSide(placement);
|
|
578
|
-
const initialSideAxis = getSideAxis(initialPlacement);
|
|
579
568
|
const isBasePlacement = getSide(initialPlacement) === initialPlacement;
|
|
580
569
|
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
|
|
581
570
|
const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
|
|
582
|
-
|
|
583
|
-
if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {
|
|
571
|
+
if (!specifiedFallbackPlacements && fallbackAxisSideDirection !== 'none') {
|
|
584
572
|
fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
|
|
585
573
|
}
|
|
586
574
|
const placements = [initialPlacement, ...fallbackPlacements];
|
|
587
|
-
const overflow = await detectOverflow
|
|
575
|
+
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
588
576
|
const overflows = [];
|
|
589
577
|
let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
|
|
590
578
|
if (checkMainAxis) {
|
|
@@ -626,17 +614,8 @@ const flip$1 = function (options) {
|
|
|
626
614
|
switch (fallbackStrategy) {
|
|
627
615
|
case 'bestFit':
|
|
628
616
|
{
|
|
629
|
-
var _overflowsData$
|
|
630
|
-
const placement = (_overflowsData$
|
|
631
|
-
if (hasFallbackAxisSideDirection) {
|
|
632
|
-
const currentSideAxis = getSideAxis(d.placement);
|
|
633
|
-
return currentSideAxis === initialSideAxis ||
|
|
634
|
-
// Create a bias to the `y` side axis due to horizontal
|
|
635
|
-
// reading directions favoring greater width.
|
|
636
|
-
currentSideAxis === 'y';
|
|
637
|
-
}
|
|
638
|
-
return true;
|
|
639
|
-
}).map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0];
|
|
617
|
+
var _overflowsData$map$so;
|
|
618
|
+
const placement = (_overflowsData$map$so = overflowsData.map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$map$so[0];
|
|
640
619
|
if (placement) {
|
|
641
620
|
resetPlacement = placement;
|
|
642
621
|
}
|
|
@@ -694,7 +673,7 @@ const hide$1 = function (options) {
|
|
|
694
673
|
switch (strategy) {
|
|
695
674
|
case 'referenceHidden':
|
|
696
675
|
{
|
|
697
|
-
const overflow = await detectOverflow
|
|
676
|
+
const overflow = await detectOverflow(state, {
|
|
698
677
|
...detectOverflowOptions,
|
|
699
678
|
elementContext: 'reference'
|
|
700
679
|
});
|
|
@@ -708,7 +687,7 @@ const hide$1 = function (options) {
|
|
|
708
687
|
}
|
|
709
688
|
case 'escaped':
|
|
710
689
|
{
|
|
711
|
-
const overflow = await detectOverflow
|
|
690
|
+
const overflow = await detectOverflow(state, {
|
|
712
691
|
...detectOverflowOptions,
|
|
713
692
|
altBoundary: true
|
|
714
693
|
});
|
|
@@ -876,8 +855,6 @@ async function convertValueToCoords(state, options) {
|
|
|
876
855
|
const mainAxisMulti = ['left', 'top'].includes(side) ? -1 : 1;
|
|
877
856
|
const crossAxisMulti = rtl && isVertical ? -1 : 1;
|
|
878
857
|
const rawValue = evaluate(options, state);
|
|
879
|
-
|
|
880
|
-
// eslint-disable-next-line prefer-const
|
|
881
858
|
let {
|
|
882
859
|
mainAxis,
|
|
883
860
|
crossAxis,
|
|
@@ -887,9 +864,10 @@ async function convertValueToCoords(state, options) {
|
|
|
887
864
|
crossAxis: 0,
|
|
888
865
|
alignmentAxis: null
|
|
889
866
|
} : {
|
|
890
|
-
mainAxis:
|
|
891
|
-
crossAxis:
|
|
892
|
-
alignmentAxis:
|
|
867
|
+
mainAxis: 0,
|
|
868
|
+
crossAxis: 0,
|
|
869
|
+
alignmentAxis: null,
|
|
870
|
+
...rawValue
|
|
893
871
|
};
|
|
894
872
|
if (alignment && typeof alignmentAxis === 'number') {
|
|
895
873
|
crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;
|
|
@@ -910,7 +888,7 @@ async function convertValueToCoords(state, options) {
|
|
|
910
888
|
* object may be passed.
|
|
911
889
|
* @see https://floating-ui.com/docs/offset
|
|
912
890
|
*/
|
|
913
|
-
const offset
|
|
891
|
+
const offset = function (options) {
|
|
914
892
|
if (options === void 0) {
|
|
915
893
|
options = 0;
|
|
916
894
|
}
|
|
@@ -983,7 +961,7 @@ const shift$1 = function (options) {
|
|
|
983
961
|
x,
|
|
984
962
|
y
|
|
985
963
|
};
|
|
986
|
-
const overflow = await detectOverflow
|
|
964
|
+
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
987
965
|
const crossAxis = getSideAxis(getSide(placement));
|
|
988
966
|
const mainAxis = getOppositeAxis(crossAxis);
|
|
989
967
|
let mainAxisCoord = coords[mainAxis];
|
|
@@ -1011,11 +989,7 @@ const shift$1 = function (options) {
|
|
|
1011
989
|
...limitedCoords,
|
|
1012
990
|
data: {
|
|
1013
991
|
x: limitedCoords.x - x,
|
|
1014
|
-
y: limitedCoords.y - y
|
|
1015
|
-
enabled: {
|
|
1016
|
-
[mainAxis]: checkMainAxis,
|
|
1017
|
-
[crossAxis]: checkCrossAxis
|
|
1018
|
-
}
|
|
992
|
+
y: limitedCoords.y - y
|
|
1019
993
|
}
|
|
1020
994
|
};
|
|
1021
995
|
}
|
|
@@ -1104,7 +1078,6 @@ const size$1 = function (options) {
|
|
|
1104
1078
|
name: 'size',
|
|
1105
1079
|
options,
|
|
1106
1080
|
async fn(state) {
|
|
1107
|
-
var _state$middlewareData, _state$middlewareData2;
|
|
1108
1081
|
const {
|
|
1109
1082
|
placement,
|
|
1110
1083
|
rects,
|
|
@@ -1115,7 +1088,7 @@ const size$1 = function (options) {
|
|
|
1115
1088
|
apply = () => {},
|
|
1116
1089
|
...detectOverflowOptions
|
|
1117
1090
|
} = evaluate(options, state);
|
|
1118
|
-
const overflow = await detectOverflow
|
|
1091
|
+
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
1119
1092
|
const side = getSide(placement);
|
|
1120
1093
|
const alignment = getAlignment(placement);
|
|
1121
1094
|
const isYAxis = getSideAxis(placement) === 'y';
|
|
@@ -1132,18 +1105,17 @@ const size$1 = function (options) {
|
|
|
1132
1105
|
widthSide = side;
|
|
1133
1106
|
heightSide = alignment === 'end' ? 'top' : 'bottom';
|
|
1134
1107
|
}
|
|
1135
|
-
const
|
|
1136
|
-
const
|
|
1137
|
-
const overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight);
|
|
1138
|
-
const overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth);
|
|
1108
|
+
const overflowAvailableHeight = height - overflow[heightSide];
|
|
1109
|
+
const overflowAvailableWidth = width - overflow[widthSide];
|
|
1139
1110
|
const noShift = !state.middlewareData.shift;
|
|
1140
1111
|
let availableHeight = overflowAvailableHeight;
|
|
1141
1112
|
let availableWidth = overflowAvailableWidth;
|
|
1142
|
-
if (
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1113
|
+
if (isYAxis) {
|
|
1114
|
+
const maximumClippingWidth = width - overflow.left - overflow.right;
|
|
1115
|
+
availableWidth = alignment || noShift ? min(overflowAvailableWidth, maximumClippingWidth) : maximumClippingWidth;
|
|
1116
|
+
} else {
|
|
1117
|
+
const maximumClippingHeight = height - overflow.top - overflow.bottom;
|
|
1118
|
+
availableHeight = alignment || noShift ? min(overflowAvailableHeight, maximumClippingHeight) : maximumClippingHeight;
|
|
1147
1119
|
}
|
|
1148
1120
|
if (noShift && !alignment) {
|
|
1149
1121
|
const xMin = max(overflow.left, 0);
|
|
@@ -1174,9 +1146,6 @@ const size$1 = function (options) {
|
|
|
1174
1146
|
};
|
|
1175
1147
|
};
|
|
1176
1148
|
|
|
1177
|
-
function hasWindow() {
|
|
1178
|
-
return typeof window !== 'undefined';
|
|
1179
|
-
}
|
|
1180
1149
|
function getNodeName(node) {
|
|
1181
1150
|
if (isNode(node)) {
|
|
1182
1151
|
return (node.nodeName || '').toLowerCase();
|
|
@@ -1195,25 +1164,17 @@ function getDocumentElement(node) {
|
|
|
1195
1164
|
return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
|
|
1196
1165
|
}
|
|
1197
1166
|
function isNode(value) {
|
|
1198
|
-
if (!hasWindow()) {
|
|
1199
|
-
return false;
|
|
1200
|
-
}
|
|
1201
1167
|
return value instanceof Node || value instanceof getWindow(value).Node;
|
|
1202
1168
|
}
|
|
1203
1169
|
function isElement(value) {
|
|
1204
|
-
if (!hasWindow()) {
|
|
1205
|
-
return false;
|
|
1206
|
-
}
|
|
1207
1170
|
return value instanceof Element || value instanceof getWindow(value).Element;
|
|
1208
1171
|
}
|
|
1209
1172
|
function isHTMLElement(value) {
|
|
1210
|
-
if (!hasWindow()) {
|
|
1211
|
-
return false;
|
|
1212
|
-
}
|
|
1213
1173
|
return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
|
|
1214
1174
|
}
|
|
1215
1175
|
function isShadowRoot(value) {
|
|
1216
|
-
|
|
1176
|
+
// Browsers without `ShadowRoot` support.
|
|
1177
|
+
if (typeof ShadowRoot === 'undefined') {
|
|
1217
1178
|
return false;
|
|
1218
1179
|
}
|
|
1219
1180
|
return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
|
|
@@ -1230,32 +1191,21 @@ function isOverflowElement(element) {
|
|
|
1230
1191
|
function isTableElement(element) {
|
|
1231
1192
|
return ['table', 'td', 'th'].includes(getNodeName(element));
|
|
1232
1193
|
}
|
|
1233
|
-
function
|
|
1234
|
-
return [':popover-open', ':modal'].some(selector => {
|
|
1235
|
-
try {
|
|
1236
|
-
return element.matches(selector);
|
|
1237
|
-
} catch (e) {
|
|
1238
|
-
return false;
|
|
1239
|
-
}
|
|
1240
|
-
});
|
|
1241
|
-
}
|
|
1242
|
-
function isContainingBlock(elementOrCss) {
|
|
1194
|
+
function isContainingBlock(element) {
|
|
1243
1195
|
const webkit = isWebKit();
|
|
1244
|
-
const css =
|
|
1196
|
+
const css = getComputedStyle(element);
|
|
1245
1197
|
|
|
1246
1198
|
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
|
|
1247
|
-
|
|
1248
|
-
return ['transform', 'translate', 'scale', 'rotate', 'perspective'].some(value => css[value] ? css[value] !== 'none' : false) || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || ['transform', 'translate', 'scale', 'rotate', 'perspective', 'filter'].some(value => (css.willChange || '').includes(value)) || ['paint', 'layout', 'strict', 'content'].some(value => (css.contain || '').includes(value));
|
|
1199
|
+
return css.transform !== 'none' || css.perspective !== 'none' || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || ['transform', 'perspective', 'filter'].some(value => (css.willChange || '').includes(value)) || ['paint', 'layout', 'strict', 'content'].some(value => (css.contain || '').includes(value));
|
|
1249
1200
|
}
|
|
1250
1201
|
function getContainingBlock(element) {
|
|
1251
1202
|
let currentNode = getParentNode(element);
|
|
1252
1203
|
while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
1253
1204
|
if (isContainingBlock(currentNode)) {
|
|
1254
1205
|
return currentNode;
|
|
1255
|
-
} else
|
|
1256
|
-
|
|
1206
|
+
} else {
|
|
1207
|
+
currentNode = getParentNode(currentNode);
|
|
1257
1208
|
}
|
|
1258
|
-
currentNode = getParentNode(currentNode);
|
|
1259
1209
|
}
|
|
1260
1210
|
return null;
|
|
1261
1211
|
}
|
|
@@ -1277,8 +1227,8 @@ function getNodeScroll(element) {
|
|
|
1277
1227
|
};
|
|
1278
1228
|
}
|
|
1279
1229
|
return {
|
|
1280
|
-
scrollLeft: element.
|
|
1281
|
-
scrollTop: element.
|
|
1230
|
+
scrollLeft: element.pageXOffset,
|
|
1231
|
+
scrollTop: element.pageYOffset
|
|
1282
1232
|
};
|
|
1283
1233
|
}
|
|
1284
1234
|
function getParentNode(node) {
|
|
@@ -1318,14 +1268,10 @@ function getOverflowAncestors(node, list, traverseIframes) {
|
|
|
1318
1268
|
const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
|
|
1319
1269
|
const win = getWindow(scrollableAncestor);
|
|
1320
1270
|
if (isBody) {
|
|
1321
|
-
|
|
1322
|
-
return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
|
|
1271
|
+
return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], win.frameElement && traverseIframes ? getOverflowAncestors(win.frameElement) : []);
|
|
1323
1272
|
}
|
|
1324
1273
|
return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
|
|
1325
1274
|
}
|
|
1326
|
-
function getFrameElement(win) {
|
|
1327
|
-
return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
|
|
1328
|
-
}
|
|
1329
1275
|
|
|
1330
1276
|
function getCssDimensions(element) {
|
|
1331
1277
|
const css = getComputedStyle(element);
|
|
@@ -1429,7 +1375,7 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
|
|
|
1429
1375
|
const win = getWindow(domElement);
|
|
1430
1376
|
const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
|
|
1431
1377
|
let currentWin = win;
|
|
1432
|
-
let currentIFrame =
|
|
1378
|
+
let currentIFrame = currentWin.frameElement;
|
|
1433
1379
|
while (currentIFrame && offsetParent && offsetWin !== currentWin) {
|
|
1434
1380
|
const iframeScale = getScale(currentIFrame);
|
|
1435
1381
|
const iframeRect = currentIFrame.getBoundingClientRect();
|
|
@@ -1443,7 +1389,7 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
|
|
|
1443
1389
|
x += left;
|
|
1444
1390
|
y += top;
|
|
1445
1391
|
currentWin = getWindow(currentIFrame);
|
|
1446
|
-
currentIFrame =
|
|
1392
|
+
currentIFrame = currentWin.frameElement;
|
|
1447
1393
|
}
|
|
1448
1394
|
}
|
|
1449
1395
|
return rectToClientRect({
|
|
@@ -1454,29 +1400,15 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
|
|
|
1454
1400
|
});
|
|
1455
1401
|
}
|
|
1456
1402
|
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
}
|
|
1466
|
-
|
|
1467
|
-
function getHTMLOffset(documentElement, scroll, ignoreScrollbarX) {
|
|
1468
|
-
if (ignoreScrollbarX === void 0) {
|
|
1469
|
-
ignoreScrollbarX = false;
|
|
1470
|
-
}
|
|
1471
|
-
const htmlRect = documentElement.getBoundingClientRect();
|
|
1472
|
-
const x = htmlRect.left + scroll.scrollLeft - (ignoreScrollbarX ? 0 :
|
|
1473
|
-
// RTL <body> scrollbar.
|
|
1474
|
-
getWindowScrollBarX(documentElement, htmlRect));
|
|
1475
|
-
const y = htmlRect.top + scroll.scrollTop;
|
|
1476
|
-
return {
|
|
1477
|
-
x,
|
|
1478
|
-
y
|
|
1479
|
-
};
|
|
1403
|
+
const topLayerSelectors = [':popover-open', ':modal'];
|
|
1404
|
+
function isTopLayer(floating) {
|
|
1405
|
+
return topLayerSelectors.some(selector => {
|
|
1406
|
+
try {
|
|
1407
|
+
return floating.matches(selector);
|
|
1408
|
+
} catch (e) {
|
|
1409
|
+
return false;
|
|
1410
|
+
}
|
|
1411
|
+
});
|
|
1480
1412
|
}
|
|
1481
1413
|
|
|
1482
1414
|
function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
|
|
@@ -1510,12 +1442,11 @@ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
|
|
|
1510
1442
|
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
1511
1443
|
}
|
|
1512
1444
|
}
|
|
1513
|
-
const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll, true) : createCoords(0);
|
|
1514
1445
|
return {
|
|
1515
1446
|
width: rect.width * scale.x,
|
|
1516
1447
|
height: rect.height * scale.y,
|
|
1517
|
-
x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x
|
|
1518
|
-
y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y
|
|
1448
|
+
x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x,
|
|
1449
|
+
y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y
|
|
1519
1450
|
};
|
|
1520
1451
|
}
|
|
1521
1452
|
|
|
@@ -1523,6 +1454,12 @@ function getClientRects(element) {
|
|
|
1523
1454
|
return Array.from(element.getClientRects());
|
|
1524
1455
|
}
|
|
1525
1456
|
|
|
1457
|
+
function getWindowScrollBarX(element) {
|
|
1458
|
+
// If <html> has a CSS width greater than the viewport, then this will be
|
|
1459
|
+
// incorrect for RTL.
|
|
1460
|
+
return getBoundingClientRect(getDocumentElement(element)).left + getNodeScroll(element).scrollLeft;
|
|
1461
|
+
}
|
|
1462
|
+
|
|
1526
1463
|
// Gets the entire size of the scrollable document area, even extending outside
|
|
1527
1464
|
// of the `<html>` and `<body>` rect bounds if horizontally scrollable.
|
|
1528
1465
|
function getDocumentRect(element) {
|
|
@@ -1597,10 +1534,9 @@ function getClientRectFromClippingAncestor(element, clippingAncestor, strategy)
|
|
|
1597
1534
|
} else {
|
|
1598
1535
|
const visualOffsets = getVisualOffsets(element);
|
|
1599
1536
|
rect = {
|
|
1537
|
+
...clippingAncestor,
|
|
1600
1538
|
x: clippingAncestor.x - visualOffsets.x,
|
|
1601
|
-
y: clippingAncestor.y - visualOffsets.y
|
|
1602
|
-
width: clippingAncestor.width,
|
|
1603
|
-
height: clippingAncestor.height
|
|
1539
|
+
y: clippingAncestor.y - visualOffsets.y
|
|
1604
1540
|
};
|
|
1605
1541
|
}
|
|
1606
1542
|
return rectToClientRect(rect);
|
|
@@ -1656,7 +1592,7 @@ function getClippingRect(_ref) {
|
|
|
1656
1592
|
rootBoundary,
|
|
1657
1593
|
strategy
|
|
1658
1594
|
} = _ref;
|
|
1659
|
-
const elementClippingAncestors = boundary === 'clippingAncestors' ?
|
|
1595
|
+
const elementClippingAncestors = boundary === 'clippingAncestors' ? getClippingElementAncestors(element, this._c) : [].concat(boundary);
|
|
1660
1596
|
const clippingAncestors = [...elementClippingAncestors, rootBoundary];
|
|
1661
1597
|
const firstClippingAncestor = clippingAncestors[0];
|
|
1662
1598
|
const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {
|
|
@@ -1705,14 +1641,11 @@ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
|
|
1705
1641
|
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
1706
1642
|
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
1707
1643
|
} else if (documentElement) {
|
|
1708
|
-
// If the <body> scrollbar appears on the left (e.g. RTL systems). Use
|
|
1709
|
-
// Firefox with layout.scrollbar.side = 3 in about:config to test this.
|
|
1710
1644
|
offsets.x = getWindowScrollBarX(documentElement);
|
|
1711
1645
|
}
|
|
1712
1646
|
}
|
|
1713
|
-
const
|
|
1714
|
-
const
|
|
1715
|
-
const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;
|
|
1647
|
+
const x = rect.left + scroll.scrollLeft - offsets.x;
|
|
1648
|
+
const y = rect.top + scroll.scrollTop - offsets.y;
|
|
1716
1649
|
return {
|
|
1717
1650
|
x,
|
|
1718
1651
|
y,
|
|
@@ -1721,10 +1654,6 @@ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
|
|
1721
1654
|
};
|
|
1722
1655
|
}
|
|
1723
1656
|
|
|
1724
|
-
function isStaticPositioned(element) {
|
|
1725
|
-
return getComputedStyle(element).position === 'static';
|
|
1726
|
-
}
|
|
1727
|
-
|
|
1728
1657
|
function getTrueOffsetParent(element, polyfill) {
|
|
1729
1658
|
if (!isHTMLElement(element) || getComputedStyle(element).position === 'fixed') {
|
|
1730
1659
|
return null;
|
|
@@ -1732,56 +1661,35 @@ function getTrueOffsetParent(element, polyfill) {
|
|
|
1732
1661
|
if (polyfill) {
|
|
1733
1662
|
return polyfill(element);
|
|
1734
1663
|
}
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
// Firefox returns the <html> element as the offsetParent if it's non-static,
|
|
1738
|
-
// while Chrome and Safari return the <body> element. The <body> element must
|
|
1739
|
-
// be used to perform the correct calculations even if the <html> element is
|
|
1740
|
-
// non-static.
|
|
1741
|
-
if (getDocumentElement(element) === rawOffsetParent) {
|
|
1742
|
-
rawOffsetParent = rawOffsetParent.ownerDocument.body;
|
|
1743
|
-
}
|
|
1744
|
-
return rawOffsetParent;
|
|
1664
|
+
return element.offsetParent;
|
|
1745
1665
|
}
|
|
1746
1666
|
|
|
1747
1667
|
// Gets the closest ancestor positioned element. Handles some edge cases,
|
|
1748
1668
|
// such as table ancestors and cross browser bugs.
|
|
1749
1669
|
function getOffsetParent(element, polyfill) {
|
|
1750
|
-
const
|
|
1751
|
-
if (isTopLayer(element)) {
|
|
1752
|
-
return
|
|
1753
|
-
}
|
|
1754
|
-
if (!isHTMLElement(element)) {
|
|
1755
|
-
let svgOffsetParent = getParentNode(element);
|
|
1756
|
-
while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {
|
|
1757
|
-
if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {
|
|
1758
|
-
return svgOffsetParent;
|
|
1759
|
-
}
|
|
1760
|
-
svgOffsetParent = getParentNode(svgOffsetParent);
|
|
1761
|
-
}
|
|
1762
|
-
return win;
|
|
1670
|
+
const window = getWindow(element);
|
|
1671
|
+
if (!isHTMLElement(element) || isTopLayer(element)) {
|
|
1672
|
+
return window;
|
|
1763
1673
|
}
|
|
1764
1674
|
let offsetParent = getTrueOffsetParent(element, polyfill);
|
|
1765
|
-
while (offsetParent && isTableElement(offsetParent) &&
|
|
1675
|
+
while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {
|
|
1766
1676
|
offsetParent = getTrueOffsetParent(offsetParent, polyfill);
|
|
1767
1677
|
}
|
|
1768
|
-
if (offsetParent &&
|
|
1769
|
-
return
|
|
1678
|
+
if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static' && !isContainingBlock(offsetParent))) {
|
|
1679
|
+
return window;
|
|
1770
1680
|
}
|
|
1771
|
-
return offsetParent || getContainingBlock(element) ||
|
|
1681
|
+
return offsetParent || getContainingBlock(element) || window;
|
|
1772
1682
|
}
|
|
1773
1683
|
|
|
1774
1684
|
const getElementRects = async function (data) {
|
|
1775
1685
|
const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
|
|
1776
1686
|
const getDimensionsFn = this.getDimensions;
|
|
1777
|
-
const floatingDimensions = await getDimensionsFn(data.floating);
|
|
1778
1687
|
return {
|
|
1779
1688
|
reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),
|
|
1780
1689
|
floating: {
|
|
1781
1690
|
x: 0,
|
|
1782
1691
|
y: 0,
|
|
1783
|
-
|
|
1784
|
-
height: floatingDimensions.height
|
|
1692
|
+
...(await getDimensionsFn(data.floating))
|
|
1785
1693
|
}
|
|
1786
1694
|
};
|
|
1787
1695
|
};
|
|
@@ -1803,10 +1711,6 @@ const platform = {
|
|
|
1803
1711
|
isRTL
|
|
1804
1712
|
};
|
|
1805
1713
|
|
|
1806
|
-
function rectsAreEqual(a, b) {
|
|
1807
|
-
return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;
|
|
1808
|
-
}
|
|
1809
|
-
|
|
1810
1714
|
// https://samthor.au/2021/observing-dom/
|
|
1811
1715
|
function observeMove(element, onMove) {
|
|
1812
1716
|
let io = null;
|
|
@@ -1826,13 +1730,12 @@ function observeMove(element, onMove) {
|
|
|
1826
1730
|
threshold = 1;
|
|
1827
1731
|
}
|
|
1828
1732
|
cleanup();
|
|
1829
|
-
const elementRectForRootMargin = element.getBoundingClientRect();
|
|
1830
1733
|
const {
|
|
1831
1734
|
left,
|
|
1832
1735
|
top,
|
|
1833
1736
|
width,
|
|
1834
1737
|
height
|
|
1835
|
-
} =
|
|
1738
|
+
} = element.getBoundingClientRect();
|
|
1836
1739
|
if (!skip) {
|
|
1837
1740
|
onMove();
|
|
1838
1741
|
}
|
|
@@ -1856,25 +1759,13 @@ function observeMove(element, onMove) {
|
|
|
1856
1759
|
return refresh();
|
|
1857
1760
|
}
|
|
1858
1761
|
if (!ratio) {
|
|
1859
|
-
// If the reference is clipped, the ratio is 0. Throttle the refresh
|
|
1860
|
-
// to prevent an infinite loop of updates.
|
|
1861
1762
|
timeoutId = setTimeout(() => {
|
|
1862
1763
|
refresh(false, 1e-7);
|
|
1863
|
-
},
|
|
1764
|
+
}, 100);
|
|
1864
1765
|
} else {
|
|
1865
1766
|
refresh(false, ratio);
|
|
1866
1767
|
}
|
|
1867
1768
|
}
|
|
1868
|
-
if (ratio === 1 && !rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) {
|
|
1869
|
-
// It's possible that even though the ratio is reported as 1, the
|
|
1870
|
-
// element is not actually fully within the IntersectionObserver's root
|
|
1871
|
-
// area anymore. This can happen under performance constraints. This may
|
|
1872
|
-
// be a bug in the browser's IntersectionObserver implementation. To
|
|
1873
|
-
// work around this, we compare the element's bounding rect now with
|
|
1874
|
-
// what it was at the time we created the IntersectionObserver. If they
|
|
1875
|
-
// are not equal then the element moved, so we refresh.
|
|
1876
|
-
refresh();
|
|
1877
|
-
}
|
|
1878
1769
|
isFirstUpdate = false;
|
|
1879
1770
|
}
|
|
1880
1771
|
|
|
@@ -1952,7 +1843,7 @@ function autoUpdate(reference, floating, update, options) {
|
|
|
1952
1843
|
}
|
|
1953
1844
|
function frameLoop() {
|
|
1954
1845
|
const nextRefRect = getBoundingClientRect(reference);
|
|
1955
|
-
if (prevRefRect &&
|
|
1846
|
+
if (prevRefRect && (nextRefRect.x !== prevRefRect.x || nextRefRect.y !== prevRefRect.y || nextRefRect.width !== prevRefRect.width || nextRefRect.height !== prevRefRect.height)) {
|
|
1956
1847
|
update();
|
|
1957
1848
|
}
|
|
1958
1849
|
prevRefRect = nextRefRect;
|
|
@@ -1974,25 +1865,6 @@ function autoUpdate(reference, floating, update, options) {
|
|
|
1974
1865
|
};
|
|
1975
1866
|
}
|
|
1976
1867
|
|
|
1977
|
-
/**
|
|
1978
|
-
* Resolves with an object of overflow side offsets that determine how much the
|
|
1979
|
-
* element is overflowing a given clipping boundary on each side.
|
|
1980
|
-
* - positive = overflowing the boundary by that number of pixels
|
|
1981
|
-
* - negative = how many pixels left before it will overflow
|
|
1982
|
-
* - 0 = lies flush with the boundary
|
|
1983
|
-
* @see https://floating-ui.com/docs/detectOverflow
|
|
1984
|
-
*/
|
|
1985
|
-
const detectOverflow = detectOverflow$1;
|
|
1986
|
-
|
|
1987
|
-
/**
|
|
1988
|
-
* Modifies the placement by translating the floating element along the
|
|
1989
|
-
* specified axes.
|
|
1990
|
-
* A number (shorthand for `mainAxis` or distance), or an axes configuration
|
|
1991
|
-
* object may be passed.
|
|
1992
|
-
* @see https://floating-ui.com/docs/offset
|
|
1993
|
-
*/
|
|
1994
|
-
const offset = offset$1;
|
|
1995
|
-
|
|
1996
1868
|
/**
|
|
1997
1869
|
* Optimizes the visibility of the floating element by choosing the placement
|
|
1998
1870
|
* that has the most space available automatically, without needing to specify a
|
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -19,13 +19,13 @@ const browser = require('./browser-1d542d0f.js');
|
|
|
19
19
|
const device = require('./device-9f97a845.js');
|
|
20
20
|
const maskUtil = require('./mask-util-19c28b4a.js');
|
|
21
21
|
const overlays = require('./overlays-f6884b7e.js');
|
|
22
|
-
const breakpoints_subject = require('./breakpoints.subject-
|
|
22
|
+
const breakpoints_subject = require('./breakpoints.subject-6e379a10.js');
|
|
23
23
|
const config_utils = require('./config.utils-bccf141d.js');
|
|
24
24
|
const config_default = require('./config.default-48618371.js');
|
|
25
25
|
const listener = require('./listener-52d2e5fd.js');
|
|
26
26
|
const swipe_subject = require('./swipe.subject-65733bae.js');
|
|
27
27
|
require('./index-84f42282.js');
|
|
28
|
-
require('./tokens.esm-
|
|
28
|
+
require('./tokens.esm-793904fc.js');
|
|
29
29
|
require('./log-33398c2a.js');
|
|
30
30
|
|
|
31
31
|
const i18nBalFieldLabel = {
|
|
@@ -294,7 +294,7 @@ class BalSnackbarController extends BalNoticeController {
|
|
|
294
294
|
const balSnackbarController = new BalSnackbarController();
|
|
295
295
|
|
|
296
296
|
// generated by .build/version.js
|
|
297
|
-
const VERSION = '17.4.0
|
|
297
|
+
const VERSION = '17.4.0';
|
|
298
298
|
|
|
299
299
|
const initializeBaloiseDesignSystem = (userConfig = {}, platformConfig = undefined, win = {}) => {
|
|
300
300
|
if (Object.keys(win).length === 0 && browser.balBrowser.hasWindow) {
|