@schukai/monster 4.148.8 → 4.149.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/package.json +1 -1
- package/source/components/accessibility/stylesheet/locale-picker.mjs +61 -1
- package/source/components/content/image-editor.mjs +79 -11
- package/source/components/content/style/copy.pcss +1 -1
- package/source/components/content/stylesheet/camera-capture.mjs +1 -1
- package/source/components/content/stylesheet/copy.mjs +1 -1
- package/source/components/content/stylesheet/fetch-box.mjs +1 -1
- package/source/components/content/stylesheet/viewer.mjs +61 -1
- package/source/components/data/kpi-tile.mjs +5 -3
- package/source/components/data/metric-graph.mjs +22 -20
- package/source/components/data/metric.mjs +20 -18
- package/source/components/data/style/kpi-tile.pcss +65 -43
- package/source/components/data/style/metric-graph.pcss +35 -18
- package/source/components/data/style/metric.pcss +35 -28
- package/source/components/data/stylesheet/kpi-tile.mjs +61 -1
- package/source/components/data/stylesheet/metric-graph.mjs +61 -1
- package/source/components/data/stylesheet/metric.mjs +61 -1
- package/source/components/datatable/columnbar.mjs +4 -2
- package/source/components/datatable/datatable.mjs +73 -15
- package/source/components/datatable/filter/date-range.mjs +61 -61
- package/source/components/datatable/filter/date-time.mjs +5 -1
- package/source/components/datatable/filter/range.mjs +3 -3
- package/source/components/datatable/filter/select-operator.mjs +7 -1
- package/source/components/datatable/filter/text-operator.mjs +11 -3
- package/source/components/datatable/filter.mjs +16 -0
- package/source/components/datatable/pagination.mjs +2 -2
- package/source/components/datatable/style/column-bar.pcss +115 -23
- package/source/components/datatable/style/datatable.pcss +257 -29
- package/source/components/datatable/style/embedded-pagination.pcss +63 -34
- package/source/components/datatable/style/filter-button.pcss +1 -1
- package/source/components/datatable/style/filter-controls-defaults.pcss +49 -3
- package/source/components/datatable/style/filter-select.pcss +4 -1
- package/source/components/datatable/style/filter.pcss +18 -1
- package/source/components/datatable/stylesheet/change-button.mjs +61 -1
- package/source/components/datatable/stylesheet/column-bar.mjs +69 -1
- package/source/components/datatable/stylesheet/dataset.mjs +61 -1
- package/source/components/datatable/stylesheet/datatable.mjs +71 -1
- package/source/components/datatable/stylesheet/embedded-pagination.mjs +1 -1
- package/source/components/datatable/stylesheet/filter-button.mjs +1 -1
- package/source/components/datatable/stylesheet/filter-controls-defaults.mjs +1 -1
- package/source/components/datatable/stylesheet/filter-select.mjs +61 -1
- package/source/components/datatable/stylesheet/filter.mjs +61 -1
- package/source/components/datatable/stylesheet/pagination.mjs +67 -1
- package/source/components/datatable/stylesheet/save-button.mjs +61 -1
- package/source/components/datatable/stylesheet/status.mjs +61 -1
- package/source/components/form/action-button.mjs +2 -1
- package/source/components/form/button-bar.mjs +7 -2
- package/source/components/form/context-error.mjs +4 -3
- package/source/components/form/context-help.mjs +10 -4
- package/source/components/form/context-hint.mjs +1 -1
- package/source/components/form/context-info.mjs +1 -1
- package/source/components/form/context-note.mjs +1 -1
- package/source/components/form/context-success.mjs +1 -1
- package/source/components/form/context-warning.mjs +1 -1
- package/source/components/form/control-bar.mjs +300 -14
- package/source/components/form/credential-button.mjs +4 -2
- package/source/components/form/digits.mjs +28 -1
- package/source/components/form/field-set.mjs +30 -0
- package/source/components/form/login.mjs +13 -10
- package/source/components/form/password.mjs +6 -0
- package/source/components/form/popper-button.mjs +1 -1
- package/source/components/form/quantity.mjs +14 -6
- package/source/components/form/register-wizard.mjs +46 -26
- package/source/components/form/select.mjs +17 -10
- package/source/components/form/sheet.mjs +13 -2
- package/source/components/form/style/action-button.pcss +131 -5
- package/source/components/form/style/button-bar.pcss +204 -3
- package/source/components/form/style/control-bar.pcss +254 -26
- package/source/components/form/style/digits.pcss +7 -6
- package/source/components/form/style/input-group.pcss +65 -1
- package/source/components/form/style/login.pcss +1 -1
- package/source/components/form/style/mixin/field-set-layout.pcss +8 -0
- package/source/components/form/style/password.pcss +25 -1
- package/source/components/form/style/popper-button.pcss +1 -0
- package/source/components/form/style/quantity.pcss +11 -20
- package/source/components/form/style/select.pcss +52 -7
- package/source/components/form/style/sheet.pcss +70 -1
- package/source/components/form/style/state-button.pcss +5 -2
- package/source/components/form/style/toggle-switch.pcss +7 -4
- package/source/components/form/stylesheet/action-button.mjs +63 -1
- package/source/components/form/stylesheet/button-bar.mjs +153 -1
- package/source/components/form/stylesheet/button.mjs +61 -1
- package/source/components/form/stylesheet/control-bar.mjs +163 -1
- package/source/components/form/stylesheet/digits.mjs +1 -1
- package/source/components/form/stylesheet/field-layout.mjs +1 -1
- package/source/components/form/stylesheet/field-set.mjs +1 -1
- package/source/components/form/stylesheet/form.mjs +1 -1
- package/source/components/form/stylesheet/input-group.mjs +15 -1
- package/source/components/form/stylesheet/login.mjs +1 -1
- package/source/components/form/stylesheet/password.mjs +7 -1
- package/source/components/form/stylesheet/popper-button.mjs +61 -1
- package/source/components/form/stylesheet/quantity.mjs +1 -1
- package/source/components/form/stylesheet/register-wizard.mjs +1 -1
- package/source/components/form/stylesheet/select.mjs +3 -1
- package/source/components/form/stylesheet/sheet.mjs +1 -1
- package/source/components/form/stylesheet/state-button.mjs +3 -1
- package/source/components/form/stylesheet/toggle-switch.mjs +1 -1
- package/source/components/form/stylesheet/wizard.mjs +1 -1
- package/source/components/form/util/floating-ui.mjs +35 -7
- package/source/components/host/call-button.mjs +3 -1
- package/source/components/host/stylesheet/call-button.mjs +61 -1
- package/source/components/host/stylesheet/host.mjs +1 -1
- package/source/components/host/stylesheet/toggle-button.mjs +61 -1
- package/source/components/layout/full-screen.mjs +31 -23
- package/source/components/layout/iframe.mjs +5 -1
- package/source/components/layout/popper.mjs +34 -4
- package/source/components/layout/style/full-screen.pcss +94 -23
- package/source/components/layout/style/split-panel.pcss +57 -5
- package/source/components/layout/style/tabs.pcss +277 -47
- package/source/components/layout/style/vertical-tabs.pcss +147 -0
- package/source/components/layout/stylesheet/collapse.mjs +61 -1
- package/source/components/layout/stylesheet/details.mjs +61 -1
- package/source/components/layout/stylesheet/full-screen.mjs +23 -1
- package/source/components/layout/stylesheet/overlay.mjs +1 -1
- package/source/components/layout/stylesheet/panel.mjs +1 -1
- package/source/components/layout/stylesheet/slider.mjs +1 -1
- package/source/components/layout/stylesheet/split-panel.mjs +17 -1
- package/source/components/layout/stylesheet/tabs.mjs +97 -1
- package/source/components/layout/stylesheet/vertical-tabs.mjs +33 -95
- package/source/components/layout/tabs.mjs +63 -0
- package/source/components/layout/vertical-tabs.mjs +63 -0
- package/source/components/navigation/stylesheet/site-navigation.mjs +1 -1
- package/source/components/navigation/stylesheet/table-of-content.mjs +1 -1
- package/source/components/navigation/stylesheet/wizard-navigation.mjs +1 -1
- package/source/components/navigation/table-of-content.mjs +13 -0
- package/source/components/notify/style/notify.pcss +1 -2
- package/source/components/notify/stylesheet/message.mjs +1 -1
- package/source/components/notify/stylesheet/notify.mjs +1 -1
- package/source/components/state/style/log.pcss +1 -0
- package/source/components/state/style/state.pcss +5 -1
- package/source/components/state/stylesheet/log.mjs +1 -1
- package/source/components/state/stylesheet/state.mjs +7 -1
- package/source/components/style/button.css +61 -205
- package/source/components/style/button.pcss +78 -34
- package/source/components/style/common.css +1 -170
- package/source/components/style/common.pcss +5 -9
- package/source/components/style/form.css +1 -49
- package/source/components/style/form.pcss +24 -6
- package/source/components/style/link.css +1 -39
- package/source/components/style/link.pcss +8 -16
- package/source/components/style/mixin/button.pcss +19 -10
- package/source/components/style/mixin/property.pcss +8 -0
- package/source/components/style/mixin/skeleton.pcss +11 -5
- package/source/components/style/normalize.css +1 -144
- package/source/components/style/normalize.pcss +5 -5
- package/source/components/style/property.css +1 -387
- package/source/components/style/skeleton.css +1 -198
- package/source/components/style/skeleton.pcss +8 -2
- package/source/components/style/theme-modern.css +74 -0
- package/source/components/style/theme-modern.pcss +498 -0
- package/source/components/stylesheet/button.mjs +61 -1
- package/source/components/stylesheet/common.mjs +1 -1
- package/source/components/stylesheet/form.mjs +1 -1
- package/source/components/stylesheet/link.mjs +1 -1
- package/source/components/stylesheet/normalize.mjs +1 -1
- package/source/components/stylesheet/property.mjs +1 -1
- package/source/components/stylesheet/skeleton.mjs +1 -1
- package/source/components/stylesheet/theme-modern.mjs +110 -0
- package/source/components/time/stylesheet/day.mjs +61 -1
- package/source/components/time/stylesheet/month-calendar.mjs +61 -1
- package/source/components/time/timeline/stylesheet/appointment.mjs +61 -1
- package/source/components/time/timeline/stylesheet/segment.mjs +61 -1
- package/source/components/tree-menu/style/tree-menu.pcss +26 -37
- package/source/components/tree-menu/stylesheet/tree-menu.mjs +1 -1
- package/source/dom/customelement.mjs +105 -40
- package/source/dom/updater.mjs +381 -119
- package/test/cases/components/content/image-editor.mjs +19 -0
- package/test/cases/components/datatable/accessibility-defaults.mjs +112 -0
- package/test/cases/components/datatable/filter-availability.mjs +37 -0
- package/test/cases/components/datatable/filter-date-range-layout.mjs +40 -0
- package/test/cases/components/datatable/filter-select-operator.mjs +118 -0
- package/test/cases/components/datatable/mobile-layout.mjs +203 -0
- package/test/cases/components/datatable/responsive-breakpoint.mjs +41 -0
- package/test/cases/components/datatable/selection.mjs +149 -0
- package/test/cases/components/form/action-button-style.mjs +85 -0
- package/test/cases/components/form/button-bar.mjs +222 -3
- package/test/cases/components/form/context-theme-colors.mjs +59 -0
- package/test/cases/components/form/control-bar.mjs +228 -3
- package/test/cases/components/form/control-heights.mjs +103 -0
- package/test/cases/components/form/digits-accessibility.mjs +65 -0
- package/test/cases/components/form/field-set.mjs +54 -0
- package/test/cases/components/form/floating-ui.mjs +74 -0
- package/test/cases/components/form/input-group.mjs +61 -28
- package/test/cases/components/form/login.mjs +47 -0
- package/test/cases/components/form/password.mjs +63 -0
- package/test/cases/components/form/popper-button.mjs +30 -15
- package/test/cases/components/form/quantity-accessibility.mjs +46 -0
- package/test/cases/components/form/register-wizard.mjs +79 -0
- package/test/cases/components/form/select.mjs +94 -2
- package/test/cases/components/form/sheet.mjs +56 -2
- package/test/cases/components/host/toggle-button.mjs +50 -0
- package/test/cases/components/layout/full-screen.mjs +60 -0
- package/test/cases/components/layout/iframe-accessibility.mjs +44 -0
- package/test/cases/components/layout/popper.mjs +128 -0
- package/test/cases/components/layout/slit-panel.mjs +30 -1
- package/test/cases/components/layout/tabs.mjs +93 -0
- package/test/cases/components/navigation/table-of-content.mjs +18 -0
- package/test/cases/components/state/state-style.mjs +31 -0
- package/test/cases/components/style/action-menu.mjs +74 -0
- package/test/cases/components/style/form-controls.mjs +37 -0
- package/test/cases/components/style/kpi-tile.mjs +60 -0
- package/test/cases/components/style/legacy-theme-compatibility.mjs +137 -0
- package/test/cases/components/style/metric-layout.mjs +94 -0
- package/test/cases/components/style/skeleton.mjs +69 -0
- package/test/cases/components/style/theme-component-catalog.mjs +853 -0
- package/test/cases/components/style/theme-modern.mjs +439 -0
- package/test/cases/components/style/theme-review-regressions.mjs +41 -0
- package/test/cases/dom/customelement.mjs +136 -1
- package/test/cases/dom/updater.mjs +174 -0
|
@@ -85,6 +85,22 @@ describe("ControlBar", function () {
|
|
|
85
85
|
expect(bar).to.be.instanceof(ControlBar);
|
|
86
86
|
});
|
|
87
87
|
|
|
88
|
+
it("should forward the configurable overflow label to its native switch", async function () {
|
|
89
|
+
const bar = document.getElementById("bar");
|
|
90
|
+
await waitForLayout(0);
|
|
91
|
+
const switchButton = bar.shadowRoot.querySelector(
|
|
92
|
+
'[data-monster-role="switch"]',
|
|
93
|
+
);
|
|
94
|
+
|
|
95
|
+
expect(switchButton.getAttribute("aria-label")).to.equal("More actions");
|
|
96
|
+
bar.setAttribute(
|
|
97
|
+
"data-monster-option-labels-more-actions",
|
|
98
|
+
"More controls",
|
|
99
|
+
);
|
|
100
|
+
await waitForLayout(0);
|
|
101
|
+
expect(switchButton.getAttribute("aria-label")).to.equal("More controls");
|
|
102
|
+
});
|
|
103
|
+
|
|
88
104
|
it("should keep the popper switch hidden when no controls are slotted", function (done) {
|
|
89
105
|
const bar = document.getElementById("bar-right");
|
|
90
106
|
|
|
@@ -383,7 +399,11 @@ describe("ControlBar", function () {
|
|
|
383
399
|
expect(cssText).to.contain("align-items: stretch");
|
|
384
400
|
expect(cssText).to.contain("[data-monster-layout-alignment=center]");
|
|
385
401
|
expect(cssText).to.contain("justify-content: center");
|
|
386
|
-
expect(cssText).to.contain("::slotted(*)
|
|
402
|
+
expect(cssText).to.contain("::slotted(*)");
|
|
403
|
+
expect(cssText).to.contain("display: flex");
|
|
404
|
+
expect(cssText).to.contain(
|
|
405
|
+
"--monster-control-min-block-size: var(--monster-control-bar-height)",
|
|
406
|
+
);
|
|
387
407
|
expect(cssText).to.contain("::slotted(form)");
|
|
388
408
|
expect(cssText).to.contain("height: var(--monster-control-bar-height)");
|
|
389
409
|
expect(cssText).to.contain(
|
|
@@ -391,11 +411,15 @@ describe("ControlBar", function () {
|
|
|
391
411
|
);
|
|
392
412
|
expect(cssText).to.contain("appearance: none");
|
|
393
413
|
expect(cssText).to.contain("--monster-select-container-overflow: hidden");
|
|
414
|
+
expect(cssText).to.contain(
|
|
415
|
+
"--monster-select-control-min-block-size: var(--monster-control-bar-height)",
|
|
416
|
+
);
|
|
394
417
|
expect(cssText).to.contain("::slotted(monster-button)");
|
|
395
418
|
expect(cssText).to.contain("::slotted(monster-popper-button)");
|
|
396
|
-
expect(cssText).to.contain("--monster-
|
|
419
|
+
expect(cssText).to.contain("--monster-control-bar-item-flex");
|
|
420
|
+
expect(cssText).to.contain("--monster-control-bar-slot-flex");
|
|
397
421
|
expect(cssText).to.contain(
|
|
398
|
-
"--monster-
|
|
422
|
+
"--monster-control-bar-button-inline-size",
|
|
399
423
|
);
|
|
400
424
|
expect(cssText).to.contain("::slotted(monster-input-group)");
|
|
401
425
|
expect(cssText).to.contain("::slotted(monster-control-bar-spacer)");
|
|
@@ -405,6 +429,26 @@ describe("ControlBar", function () {
|
|
|
405
429
|
expect(cssText).to.contain(
|
|
406
430
|
"--monster-control-bar-spacer-line-inline-size: calc(100% - 1rem)",
|
|
407
431
|
);
|
|
432
|
+
expect(cssText).to.contain("--monster-action-menu-padding");
|
|
433
|
+
expect(cssText).to.contain("--monster-action-menu-min-inline-size");
|
|
434
|
+
expect(cssText).to.contain("--monster-action-menu-item-min-block-size");
|
|
435
|
+
expect(cssText).to.contain(
|
|
436
|
+
"--monster-button-border-width: var(--monster-action-menu-item-border-width",
|
|
437
|
+
);
|
|
438
|
+
expect(cssText).to.contain(
|
|
439
|
+
"--monster-button-border-radius: var(--monster-action-menu-item-border-radius",
|
|
440
|
+
);
|
|
441
|
+
expect(cssText).to.contain(
|
|
442
|
+
"--monster-button-justify-content: var(--monster-action-menu-item-justify-content",
|
|
443
|
+
);
|
|
444
|
+
expect(cssText).to.contain(
|
|
445
|
+
"--monster-button-background-color: var(--monster-action-menu-item-background-color",
|
|
446
|
+
);
|
|
447
|
+
expect(cssText).to.contain(
|
|
448
|
+
"--monster-action-menu-item-hover-background-color",
|
|
449
|
+
);
|
|
450
|
+
expect(cssText).to.contain("--monster-action-menu-item-focus-outline-offset");
|
|
451
|
+
expect(cssText).to.contain("height: auto !important");
|
|
408
452
|
});
|
|
409
453
|
|
|
410
454
|
it("should join adjacent borders using the smaller computed border width", async function () {
|
|
@@ -652,6 +696,7 @@ describe("ControlBar", function () {
|
|
|
652
696
|
const innerButton = control.shadowRoot?.querySelector("button");
|
|
653
697
|
innerButton.style.borderLeftWidth = "3px";
|
|
654
698
|
innerButton.style.borderRightWidth = "3px";
|
|
699
|
+
innerButton.style.borderRadius = "8px";
|
|
655
700
|
}
|
|
656
701
|
|
|
657
702
|
await flushFrames();
|
|
@@ -660,6 +705,24 @@ describe("ControlBar", function () {
|
|
|
660
705
|
|
|
661
706
|
expect(controls[1].style.marginLeft).to.equal("-3px");
|
|
662
707
|
expect(controls[2].style.marginLeft).to.equal("-3px");
|
|
708
|
+
|
|
709
|
+
const innerButtons = controls.map((control) =>
|
|
710
|
+
control.shadowRoot?.querySelector("button"),
|
|
711
|
+
);
|
|
712
|
+
expect(innerButtons[0].style.borderRadius).to.equal("8px");
|
|
713
|
+
expect(innerButtons[0].style.borderTopLeftRadius).to.equal("");
|
|
714
|
+
expect(innerButtons[0].style.borderTopRightRadius).to.equal("0px");
|
|
715
|
+
expect(innerButtons[0].style.borderBottomRightRadius).to.equal("0px");
|
|
716
|
+
expect(innerButtons[0].style.borderBottomLeftRadius).to.equal("");
|
|
717
|
+
expect(innerButtons[1].style.borderTopLeftRadius).to.equal("0px");
|
|
718
|
+
expect(innerButtons[1].style.borderTopRightRadius).to.equal("0px");
|
|
719
|
+
expect(innerButtons[1].style.borderBottomRightRadius).to.equal("0px");
|
|
720
|
+
expect(innerButtons[1].style.borderBottomLeftRadius).to.equal("0px");
|
|
721
|
+
expect(innerButtons[2].style.borderTopLeftRadius).to.equal("0px");
|
|
722
|
+
expect(innerButtons[2].style.borderRadius).to.equal("8px");
|
|
723
|
+
expect(innerButtons[2].style.borderTopRightRadius).to.equal("");
|
|
724
|
+
expect(innerButtons[2].style.borderBottomRightRadius).to.equal("");
|
|
725
|
+
expect(innerButtons[2].style.borderBottomLeftRadius).to.equal("0px");
|
|
663
726
|
} finally {
|
|
664
727
|
window.requestAnimationFrame = originalRequestAnimationFrame;
|
|
665
728
|
globalThis.requestAnimationFrame = originalGlobalRequestAnimationFrame;
|
|
@@ -1114,6 +1177,8 @@ describe("ControlBar", function () {
|
|
|
1114
1177
|
});
|
|
1115
1178
|
|
|
1116
1179
|
for (const control of controls) {
|
|
1180
|
+
control.style.border = "1px solid";
|
|
1181
|
+
control.style.borderRadius = "8px";
|
|
1117
1182
|
Object.defineProperty(control, "offsetWidth", {
|
|
1118
1183
|
configurable: true,
|
|
1119
1184
|
value: 50,
|
|
@@ -1142,6 +1207,7 @@ describe("ControlBar", function () {
|
|
|
1142
1207
|
configurable: true,
|
|
1143
1208
|
value: 20,
|
|
1144
1209
|
});
|
|
1210
|
+
switchButton.style.borderLeftWidth = "1px";
|
|
1145
1211
|
const controlBar = bar.shadowRoot.querySelector(
|
|
1146
1212
|
'[data-monster-role="control-bar"]',
|
|
1147
1213
|
);
|
|
@@ -1163,6 +1229,12 @@ describe("ControlBar", function () {
|
|
|
1163
1229
|
.equal("popper");
|
|
1164
1230
|
expect(document.getElementById("overflow-button").getAttribute("slot")).to
|
|
1165
1231
|
.equal("popper");
|
|
1232
|
+
expect(controls[1].style.borderRadius).to.equal("8px");
|
|
1233
|
+
expect(controls[1].style.borderTopLeftRadius).to.equal("");
|
|
1234
|
+
expect(controls[1].style.borderTopRightRadius).to.equal("");
|
|
1235
|
+
expect(controls[2].style.borderRadius).to.equal("8px");
|
|
1236
|
+
expect(controls[2].style.borderTopLeftRadius).to.equal("");
|
|
1237
|
+
expect(controls[2].style.borderTopRightRadius).to.equal("");
|
|
1166
1238
|
} finally {
|
|
1167
1239
|
window.ResizeObserver = OriginalResizeObserver;
|
|
1168
1240
|
globalThis.ResizeObserver = originalGlobalResizeObserver;
|
|
@@ -2120,6 +2192,159 @@ describe("ControlBar", function () {
|
|
|
2120
2192
|
}
|
|
2121
2193
|
});
|
|
2122
2194
|
|
|
2195
|
+
it("should keep an open overflow menu through inherited hidden positioning", async function () {
|
|
2196
|
+
const OriginalResizeObserver = window.ResizeObserver;
|
|
2197
|
+
const originalGlobalResizeObserver = globalThis.ResizeObserver;
|
|
2198
|
+
const originalRequestAnimationFrame = window.requestAnimationFrame;
|
|
2199
|
+
const originalGlobalRequestAnimationFrame = globalThis.requestAnimationFrame;
|
|
2200
|
+
const originalGetComputedStyle = window.getComputedStyle;
|
|
2201
|
+
const originalGlobalGetComputedStyle = globalThis.getComputedStyle;
|
|
2202
|
+
|
|
2203
|
+
class TrackingResizeObserver extends ResizeObserverMock {
|
|
2204
|
+
static instances = [];
|
|
2205
|
+
|
|
2206
|
+
constructor(callback) {
|
|
2207
|
+
super(callback);
|
|
2208
|
+
TrackingResizeObserver.instances.push(this);
|
|
2209
|
+
}
|
|
2210
|
+
}
|
|
2211
|
+
|
|
2212
|
+
const scheduledCallbacks = [];
|
|
2213
|
+
const flushFrames = async () => {
|
|
2214
|
+
while (scheduledCallbacks.length > 0) {
|
|
2215
|
+
scheduledCallbacks.shift()();
|
|
2216
|
+
await new Promise((resolve) => setTimeout(resolve, 0));
|
|
2217
|
+
}
|
|
2218
|
+
};
|
|
2219
|
+
|
|
2220
|
+
try {
|
|
2221
|
+
window.ResizeObserver = TrackingResizeObserver;
|
|
2222
|
+
globalThis.ResizeObserver = TrackingResizeObserver;
|
|
2223
|
+
window.requestAnimationFrame = (callback) => {
|
|
2224
|
+
scheduledCallbacks.push(callback);
|
|
2225
|
+
return scheduledCallbacks.length;
|
|
2226
|
+
};
|
|
2227
|
+
globalThis.requestAnimationFrame = window.requestAnimationFrame;
|
|
2228
|
+
|
|
2229
|
+
const mocks = document.getElementById("mocks");
|
|
2230
|
+
mocks.innerHTML = `
|
|
2231
|
+
<div id="positioning-overflow-wrapper">
|
|
2232
|
+
<monster-control-bar id="positioning-overflow-bar">
|
|
2233
|
+
<button id="positioning-overflow-one">One</button>
|
|
2234
|
+
<button id="positioning-overflow-two">Two</button>
|
|
2235
|
+
</monster-control-bar>
|
|
2236
|
+
</div>
|
|
2237
|
+
`;
|
|
2238
|
+
|
|
2239
|
+
const wrapper = document.getElementById(
|
|
2240
|
+
"positioning-overflow-wrapper",
|
|
2241
|
+
);
|
|
2242
|
+
const bar = document.getElementById("positioning-overflow-bar");
|
|
2243
|
+
const controls = [
|
|
2244
|
+
document.getElementById("positioning-overflow-one"),
|
|
2245
|
+
document.getElementById("positioning-overflow-two"),
|
|
2246
|
+
];
|
|
2247
|
+
let wrapperWidth = 1;
|
|
2248
|
+
|
|
2249
|
+
wrapper.style.boxSizing = "border-box";
|
|
2250
|
+
Object.defineProperty(wrapper, "clientWidth", {
|
|
2251
|
+
configurable: true,
|
|
2252
|
+
get: () => wrapperWidth,
|
|
2253
|
+
});
|
|
2254
|
+
|
|
2255
|
+
for (const control of controls) {
|
|
2256
|
+
Object.defineProperty(control, "offsetWidth", {
|
|
2257
|
+
configurable: true,
|
|
2258
|
+
value: 50,
|
|
2259
|
+
});
|
|
2260
|
+
Object.defineProperty(control, "offsetHeight", {
|
|
2261
|
+
configurable: true,
|
|
2262
|
+
value: 30,
|
|
2263
|
+
});
|
|
2264
|
+
control.getBoundingClientRect = () => ({
|
|
2265
|
+
width: 50,
|
|
2266
|
+
height: 30,
|
|
2267
|
+
top: 0,
|
|
2268
|
+
right: 50,
|
|
2269
|
+
bottom: 30,
|
|
2270
|
+
left: 0,
|
|
2271
|
+
x: 0,
|
|
2272
|
+
y: 0,
|
|
2273
|
+
toJSON: () => {},
|
|
2274
|
+
});
|
|
2275
|
+
}
|
|
2276
|
+
|
|
2277
|
+
const switchButton = bar.shadowRoot.querySelector(
|
|
2278
|
+
'[data-monster-role="switch"]',
|
|
2279
|
+
);
|
|
2280
|
+
const popper = bar.shadowRoot.querySelector(
|
|
2281
|
+
'[data-monster-role="popper"]',
|
|
2282
|
+
);
|
|
2283
|
+
Object.defineProperty(switchButton, "offsetWidth", {
|
|
2284
|
+
configurable: true,
|
|
2285
|
+
value: 20,
|
|
2286
|
+
});
|
|
2287
|
+
|
|
2288
|
+
await flushFrames();
|
|
2289
|
+
expect(controls.every((control) => control.slot === "popper")).to.be.true;
|
|
2290
|
+
|
|
2291
|
+
bar.showDialog();
|
|
2292
|
+
expect(popper.style.display).to.equal("block");
|
|
2293
|
+
expect(popper.style.visibility).to.equal("hidden");
|
|
2294
|
+
|
|
2295
|
+
const inheritedHiddenStyle = (element) => {
|
|
2296
|
+
const style = originalGetComputedStyle.call(window, element);
|
|
2297
|
+
if (
|
|
2298
|
+
controls.includes(element) &&
|
|
2299
|
+
element.slot === "popper" &&
|
|
2300
|
+
popper.style.visibility === "hidden"
|
|
2301
|
+
) {
|
|
2302
|
+
return new Proxy(style, {
|
|
2303
|
+
get(target, property) {
|
|
2304
|
+
if (property === "visibility") {
|
|
2305
|
+
return "hidden";
|
|
2306
|
+
}
|
|
2307
|
+
const value = Reflect.get(target, property);
|
|
2308
|
+
return value instanceof Function ? value.bind(target) : value;
|
|
2309
|
+
},
|
|
2310
|
+
});
|
|
2311
|
+
}
|
|
2312
|
+
return style;
|
|
2313
|
+
};
|
|
2314
|
+
window.getComputedStyle = inheritedHiddenStyle;
|
|
2315
|
+
globalThis.getComputedStyle = inheritedHiddenStyle;
|
|
2316
|
+
|
|
2317
|
+
const resizeObserver = TrackingResizeObserver.instances.find((observer) =>
|
|
2318
|
+
observer.elements.includes(wrapper),
|
|
2319
|
+
);
|
|
2320
|
+
expect(resizeObserver).to.exist;
|
|
2321
|
+
|
|
2322
|
+
resizeObserver.triggerResize([{ target: wrapper }]);
|
|
2323
|
+
await flushFrames();
|
|
2324
|
+
|
|
2325
|
+
expect(controls.every((control) => control.slot === "popper")).to.be.true;
|
|
2326
|
+
expect(popper.style.display).to.equal("block");
|
|
2327
|
+
expect(switchButton.getAttribute("aria-expanded")).to.equal("true");
|
|
2328
|
+
|
|
2329
|
+
window.getComputedStyle = originalGetComputedStyle;
|
|
2330
|
+
globalThis.getComputedStyle = originalGlobalGetComputedStyle;
|
|
2331
|
+
wrapperWidth = 200;
|
|
2332
|
+
resizeObserver.triggerResize([{ target: wrapper }]);
|
|
2333
|
+
await flushFrames();
|
|
2334
|
+
|
|
2335
|
+
expect(controls.every((control) => control.slot === "")).to.be.true;
|
|
2336
|
+
expect(popper.style.display).to.equal("none");
|
|
2337
|
+
expect(switchButton.getAttribute("aria-expanded")).to.equal("false");
|
|
2338
|
+
} finally {
|
|
2339
|
+
window.ResizeObserver = OriginalResizeObserver;
|
|
2340
|
+
globalThis.ResizeObserver = originalGlobalResizeObserver;
|
|
2341
|
+
window.requestAnimationFrame = originalRequestAnimationFrame;
|
|
2342
|
+
globalThis.requestAnimationFrame = originalGlobalRequestAnimationFrame;
|
|
2343
|
+
window.getComputedStyle = originalGetComputedStyle;
|
|
2344
|
+
globalThis.getComputedStyle = originalGlobalGetComputedStyle;
|
|
2345
|
+
}
|
|
2346
|
+
});
|
|
2347
|
+
|
|
2123
2348
|
it("should match the stacked breakpoint when the content-box container width is a css string", async function () {
|
|
2124
2349
|
const originalRequestAnimationFrame = window.requestAnimationFrame;
|
|
2125
2350
|
const originalGlobalRequestAnimationFrame = globalThis.requestAnimationFrame;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
2
|
+
import { expect } from "chai";
|
|
3
|
+
|
|
4
|
+
const quantitySource = readFileSync(
|
|
5
|
+
new URL(
|
|
6
|
+
"../../../../source/components/form/style/quantity.pcss",
|
|
7
|
+
import.meta.url,
|
|
8
|
+
),
|
|
9
|
+
"utf8",
|
|
10
|
+
);
|
|
11
|
+
const digitsSource = readFileSync(
|
|
12
|
+
new URL(
|
|
13
|
+
"../../../../source/components/form/style/digits.pcss",
|
|
14
|
+
import.meta.url,
|
|
15
|
+
),
|
|
16
|
+
"utf8",
|
|
17
|
+
);
|
|
18
|
+
const quantityStyleSheet = readFileSync(
|
|
19
|
+
new URL(
|
|
20
|
+
"../../../../source/components/form/stylesheet/quantity.mjs",
|
|
21
|
+
import.meta.url,
|
|
22
|
+
),
|
|
23
|
+
"utf8",
|
|
24
|
+
);
|
|
25
|
+
const digitsStyleSheet = readFileSync(
|
|
26
|
+
new URL(
|
|
27
|
+
"../../../../source/components/form/stylesheet/digits.mjs",
|
|
28
|
+
import.meta.url,
|
|
29
|
+
),
|
|
30
|
+
"utf8",
|
|
31
|
+
);
|
|
32
|
+
const filterSelectOperatorSource = readFileSync(
|
|
33
|
+
new URL(
|
|
34
|
+
"../../../../source/components/datatable/filter/select-operator.mjs",
|
|
35
|
+
import.meta.url,
|
|
36
|
+
),
|
|
37
|
+
"utf8",
|
|
38
|
+
);
|
|
39
|
+
const quantityComponentSource = readFileSync(
|
|
40
|
+
new URL("../../../../source/components/form/quantity.mjs", import.meta.url),
|
|
41
|
+
"utf8",
|
|
42
|
+
);
|
|
43
|
+
|
|
44
|
+
describe("Form control heights", () => {
|
|
45
|
+
it("uses the shared control height for quantity controls", () => {
|
|
46
|
+
const token = "--qty-height: var(--monster-control-min-block-size, 40px)";
|
|
47
|
+
|
|
48
|
+
expect(quantitySource).to.include(token);
|
|
49
|
+
expect(quantityStyleSheet).to.include(
|
|
50
|
+
"--qty-height:var(--monster-control-min-block-size,40px)",
|
|
51
|
+
);
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
it("centers quantity icons inside equal square button targets", () => {
|
|
55
|
+
for (const source of [quantitySource, quantityStyleSheet]) {
|
|
56
|
+
expect(source).to.include("--qty-button-size");
|
|
57
|
+
expect(source).to.not.include("translateX");
|
|
58
|
+
}
|
|
59
|
+
expect(quantitySource).to.include("padding: 0");
|
|
60
|
+
expect(quantityStyleSheet).to.include("padding:0");
|
|
61
|
+
expect(quantityComponentSource).to.include('<path d="M2 7h12v2H2z"/>');
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
it("keeps verification-code inputs square without consuming their content area", () => {
|
|
65
|
+
const size = "var(--monster-control-min-block-size, 2.5rem)";
|
|
66
|
+
|
|
67
|
+
for (const property of [
|
|
68
|
+
"flex: 0 0",
|
|
69
|
+
"inline-size:",
|
|
70
|
+
"min-inline-size:",
|
|
71
|
+
"block-size:",
|
|
72
|
+
"min-block-size:",
|
|
73
|
+
]) {
|
|
74
|
+
expect(digitsSource).to.include(`${property} ${size}`);
|
|
75
|
+
}
|
|
76
|
+
expect(digitsSource).to.include("padding: 0");
|
|
77
|
+
expect(digitsSource).to.not.include("width: 2rem");
|
|
78
|
+
|
|
79
|
+
for (const declaration of [
|
|
80
|
+
"flex:0 0 var(--monster-control-min-block-size,2.5rem)",
|
|
81
|
+
"inline-size:var(--monster-control-min-block-size,2.5rem)",
|
|
82
|
+
"min-inline-size:var(--monster-control-min-block-size,2.5rem)",
|
|
83
|
+
"block-size:var(--monster-control-min-block-size,2.5rem)",
|
|
84
|
+
"min-block-size:var(--monster-control-min-block-size,2.5rem)",
|
|
85
|
+
"padding:0",
|
|
86
|
+
]) {
|
|
87
|
+
expect(digitsStyleSheet).to.include(declaration);
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
it("keeps the combined filter select within the shared outer height", () => {
|
|
92
|
+
expect(filterSelectOperatorSource).to.include(
|
|
93
|
+
"height: var(--monster-control-min-block-size, 2.5rem)",
|
|
94
|
+
);
|
|
95
|
+
expect(filterSelectOperatorSource).to.include(
|
|
96
|
+
"--monster-select-control-min-block-size: 0",
|
|
97
|
+
);
|
|
98
|
+
expect(filterSelectOperatorSource).to.include("min-block-size: 0");
|
|
99
|
+
expect(filterSelectOperatorSource).to.include(
|
|
100
|
+
'data-monster-selected-template="summary"',
|
|
101
|
+
);
|
|
102
|
+
});
|
|
103
|
+
});
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import * as chai from "chai";
|
|
2
|
+
import { initJSDOM } from "../../../util/jsdom.mjs";
|
|
3
|
+
|
|
4
|
+
const { expect } = chai;
|
|
5
|
+
|
|
6
|
+
const nextTask = () => new Promise((resolve) => setTimeout(resolve, 0));
|
|
7
|
+
|
|
8
|
+
describe("Digits accessibility", function () {
|
|
9
|
+
before(async () => {
|
|
10
|
+
await initJSDOM();
|
|
11
|
+
await import("element-internals-polyfill");
|
|
12
|
+
await import("../../../../source/components/form/digits.mjs");
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
afterEach(() => {
|
|
16
|
+
document.getElementById("mocks").replaceChildren();
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
it("should expose a group name and a position-aware name per digit", async function () {
|
|
20
|
+
const digits = document.createElement("monster-digits");
|
|
21
|
+
digits.setOptions({
|
|
22
|
+
digits: 4,
|
|
23
|
+
labels: {
|
|
24
|
+
group: "Verification code",
|
|
25
|
+
digit: "Character {index} of {count}",
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
document.getElementById("mocks").append(digits);
|
|
29
|
+
await nextTask();
|
|
30
|
+
|
|
31
|
+
const group = digits.shadowRoot.querySelector(
|
|
32
|
+
'[data-monster-role="digits"]',
|
|
33
|
+
);
|
|
34
|
+
const inputs = [...group.querySelectorAll("input")];
|
|
35
|
+
expect(group.getAttribute("role")).to.equal("group");
|
|
36
|
+
expect(group.getAttribute("aria-label")).to.equal("Verification code");
|
|
37
|
+
expect(
|
|
38
|
+
inputs.map((input) => input.getAttribute("aria-label")),
|
|
39
|
+
).to.deep.equal([
|
|
40
|
+
"Character 1 of 4",
|
|
41
|
+
"Character 2 of 4",
|
|
42
|
+
"Character 3 of 4",
|
|
43
|
+
"Character 4 of 4",
|
|
44
|
+
]);
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
it("should refresh digit names when count and labels change", async function () {
|
|
48
|
+
const digits = document.createElement("monster-digits");
|
|
49
|
+
document.getElementById("mocks").append(digits);
|
|
50
|
+
await nextTask();
|
|
51
|
+
|
|
52
|
+
digits.setOption("labels.digit", "Position {index}/{count}");
|
|
53
|
+
digits.setOption("digits", 2);
|
|
54
|
+
await nextTask();
|
|
55
|
+
|
|
56
|
+
const inputs = [
|
|
57
|
+
...digits.shadowRoot.querySelectorAll(
|
|
58
|
+
'[data-monster-role="digits"] input',
|
|
59
|
+
),
|
|
60
|
+
];
|
|
61
|
+
expect(
|
|
62
|
+
inputs.map((input) => input.getAttribute("aria-label")),
|
|
63
|
+
).to.deep.equal(["Position 1/2", "Position 2/2"]);
|
|
64
|
+
});
|
|
65
|
+
});
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import * as chai from "chai";
|
|
2
|
+
import { chaiDom } from "../../../util/chai-dom.mjs";
|
|
3
|
+
import { initJSDOM } from "../../../util/jsdom.mjs";
|
|
4
|
+
|
|
5
|
+
const { expect } = chai;
|
|
6
|
+
chai.use(chaiDom);
|
|
7
|
+
|
|
8
|
+
let FieldSet;
|
|
9
|
+
|
|
10
|
+
describe("FieldSet", function () {
|
|
11
|
+
before(async function () {
|
|
12
|
+
await initJSDOM();
|
|
13
|
+
await import("element-internals-polyfill");
|
|
14
|
+
FieldSet = (
|
|
15
|
+
await import("../../../../source/components/form/field-set.mjs")
|
|
16
|
+
).FieldSet;
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
afterEach(function () {
|
|
20
|
+
document.getElementById("mocks").innerHTML = "";
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
it("should create a field-set element", function () {
|
|
24
|
+
const fieldSet = document.createElement("monster-field-set");
|
|
25
|
+
|
|
26
|
+
expect(fieldSet).to.be.instanceof(FieldSet);
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
it("should mark checkbox labels as one readable control", async function () {
|
|
30
|
+
const fieldSet = document.createElement("monster-field-set");
|
|
31
|
+
const label = document.createElement("label");
|
|
32
|
+
label.innerHTML = '<input type="checkbox"> Include Shadow DOM';
|
|
33
|
+
fieldSet.append(label);
|
|
34
|
+
document.getElementById("mocks").append(fieldSet);
|
|
35
|
+
await new Promise((resolve) => setTimeout(resolve, 0));
|
|
36
|
+
|
|
37
|
+
expect(label).to.have.attribute(
|
|
38
|
+
"data-monster-field-set-choice-label",
|
|
39
|
+
"",
|
|
40
|
+
);
|
|
41
|
+
|
|
42
|
+
const cssText = FieldSet.getCSSStyleSheet()
|
|
43
|
+
.flatMap((styleSheet) => Array.from(styleSheet.cssRules))
|
|
44
|
+
.map((rule) => rule.cssText)
|
|
45
|
+
.join("\n");
|
|
46
|
+
|
|
47
|
+
expect(cssText).to.contain(
|
|
48
|
+
"::slotted([data-monster-field-set-choice-label])",
|
|
49
|
+
);
|
|
50
|
+
expect(cssText).to.contain("align-items: center");
|
|
51
|
+
expect(cssText).to.contain("justify-content: flex-start");
|
|
52
|
+
expect(cssText).to.contain("--monster-control-min-block-size");
|
|
53
|
+
});
|
|
54
|
+
});
|
|
@@ -8,6 +8,8 @@ let applyAdaptiveFloatingElementSize;
|
|
|
8
8
|
let applyFloatingReferenceVisibility;
|
|
9
9
|
let createVisibilityRecoveryConfig;
|
|
10
10
|
let getFloatingVisibleRatio;
|
|
11
|
+
let resolveFloatingArrowStaticOffset;
|
|
12
|
+
let resetAdaptiveFloatingElementSize;
|
|
11
13
|
|
|
12
14
|
describe("form floating-ui boundary resolution", function () {
|
|
13
15
|
before(function (done) {
|
|
@@ -23,6 +25,9 @@ describe("form floating-ui boundary resolution", function () {
|
|
|
23
25
|
applyFloatingReferenceVisibility = m.applyFloatingReferenceVisibility;
|
|
24
26
|
createVisibilityRecoveryConfig = m.createVisibilityRecoveryConfig;
|
|
25
27
|
getFloatingVisibleRatio = m.getFloatingVisibleRatio;
|
|
28
|
+
resolveFloatingArrowStaticOffset =
|
|
29
|
+
m.resolveFloatingArrowStaticOffset;
|
|
30
|
+
resetAdaptiveFloatingElementSize = m.resetAdaptiveFloatingElementSize;
|
|
26
31
|
done();
|
|
27
32
|
})
|
|
28
33
|
.catch((e) => done(e));
|
|
@@ -33,6 +38,11 @@ describe("form floating-ui boundary resolution", function () {
|
|
|
33
38
|
mocks.innerHTML = "";
|
|
34
39
|
});
|
|
35
40
|
|
|
41
|
+
it("should overlap the popper edge by half of the rendered arrow size", function () {
|
|
42
|
+
expect(resolveFloatingArrowStaticOffset(8)).to.equal(-4);
|
|
43
|
+
expect(resolveFloatingArrowStaticOffset(0)).to.equal(0);
|
|
44
|
+
});
|
|
45
|
+
|
|
36
46
|
it("should ignore parent popper content wrappers as clipping boundaries for nested controls", function () {
|
|
37
47
|
const mocks = document.getElementById("mocks");
|
|
38
48
|
const wrapper = document.createElement("div");
|
|
@@ -142,6 +152,27 @@ describe("form floating-ui boundary resolution", function () {
|
|
|
142
152
|
expect(content.style.maxHeight).to.equal("100px");
|
|
143
153
|
});
|
|
144
154
|
|
|
155
|
+
it("should clear a stale adaptive max width before the next layout pass", function () {
|
|
156
|
+
const popper = document.createElement("div");
|
|
157
|
+
popper.style.maxWidth = "11px";
|
|
158
|
+
popper.style.maxHeight = "80px";
|
|
159
|
+
|
|
160
|
+
resetAdaptiveFloatingElementSize(popper);
|
|
161
|
+
|
|
162
|
+
expect(popper.style.maxWidth).to.equal("");
|
|
163
|
+
expect(popper.style.maxHeight).to.equal("");
|
|
164
|
+
});
|
|
165
|
+
|
|
166
|
+
it("should restore a component preferred max width before relayout", function () {
|
|
167
|
+
const popper = document.createElement("div");
|
|
168
|
+
popper.dataset.monsterPreferredMaxWidth = "320";
|
|
169
|
+
popper.style.maxWidth = "80px";
|
|
170
|
+
|
|
171
|
+
resetAdaptiveFloatingElementSize(popper);
|
|
172
|
+
|
|
173
|
+
expect(popper.style.maxWidth).to.equal("320px");
|
|
174
|
+
});
|
|
175
|
+
|
|
145
176
|
it("should not clamp the floating element height when content overflow is visible", function () {
|
|
146
177
|
const mocks = document.getElementById("mocks");
|
|
147
178
|
const popper = document.createElement("div");
|
|
@@ -501,6 +532,49 @@ describe("form floating-ui boundary resolution", function () {
|
|
|
501
532
|
expect(popper.dataset.monsterReferenceHidden).to.equal("true");
|
|
502
533
|
});
|
|
503
534
|
|
|
535
|
+
it("should use the viewport instead of the scrolled document root as a clipping boundary", function () {
|
|
536
|
+
const mocks = document.getElementById("mocks");
|
|
537
|
+
const reference = document.createElement("div");
|
|
538
|
+
const popper = document.createElement("div");
|
|
539
|
+
const root = document.documentElement;
|
|
540
|
+
const originalOverflow = root.style.overflow;
|
|
541
|
+
const originalRootRect = root.getBoundingClientRect;
|
|
542
|
+
|
|
543
|
+
root.style.overflow = "auto";
|
|
544
|
+
root.getBoundingClientRect = () => ({
|
|
545
|
+
top: -1200,
|
|
546
|
+
left: 0,
|
|
547
|
+
right: 1024,
|
|
548
|
+
bottom: -432,
|
|
549
|
+
width: 1024,
|
|
550
|
+
height: 768,
|
|
551
|
+
x: 0,
|
|
552
|
+
y: -1200,
|
|
553
|
+
});
|
|
554
|
+
reference.getBoundingClientRect = () => ({
|
|
555
|
+
top: 100,
|
|
556
|
+
left: 100,
|
|
557
|
+
right: 300,
|
|
558
|
+
bottom: 144,
|
|
559
|
+
width: 200,
|
|
560
|
+
height: 44,
|
|
561
|
+
x: 100,
|
|
562
|
+
y: 100,
|
|
563
|
+
});
|
|
564
|
+
mocks.appendChild(reference);
|
|
565
|
+
|
|
566
|
+
try {
|
|
567
|
+
expect(resolveClippingBoundaryElement(reference, popper)).to.equal(null);
|
|
568
|
+
expect(applyFloatingReferenceVisibility(reference, popper)).to.equal(
|
|
569
|
+
true,
|
|
570
|
+
);
|
|
571
|
+
expect(popper.style.visibility).to.equal("");
|
|
572
|
+
} finally {
|
|
573
|
+
root.style.overflow = originalOverflow;
|
|
574
|
+
root.getBoundingClientRect = originalRootRect;
|
|
575
|
+
}
|
|
576
|
+
});
|
|
577
|
+
|
|
504
578
|
it("should restore a floating element when its reference is visible again", function () {
|
|
505
579
|
const reference = document.createElement("div");
|
|
506
580
|
const popper = document.createElement("div");
|