@gitlab/ui 123.3.0 → 123.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/dist/components/base/new_dropdowns/disclosure/disclosure_dropdown.js +9 -1
- package/dist/index.css +2 -2
- package/dist/index.css.map +1 -1
- package/dist/tailwind.css +1 -1
- package/dist/tailwind.css.map +1 -1
- package/dist/tokens/docs/tokens-tailwind-docs.dark.json +1339 -1339
- package/dist/tokens/docs/tokens-tailwind-docs.json +1339 -1339
- package/dist/tokens/tailwind/tokens.cjs +40 -40
- package/package.json +4 -4
- package/src/components/base/new_dropdowns/disclosure/disclosure_dropdown.vue +8 -1
- package/src/tokens/build/docs/tokens-tailwind-docs.dark.json +1339 -1339
- package/src/tokens/build/docs/tokens-tailwind-docs.json +1339 -1339
- package/src/tokens/build/tailwind/tokens.cjs +383 -392
|
@@ -324,7 +324,15 @@ var script = {
|
|
|
324
324
|
});
|
|
325
325
|
},
|
|
326
326
|
handleAutoClose(e) {
|
|
327
|
-
|
|
327
|
+
var _this$$refs$baseDropd, _this$$refs$baseDropd2;
|
|
328
|
+
if (this.autoClose && e.target.closest(ITEM_SELECTOR) && // The optional chaining here is to accommodate specs that use shallow mounting.
|
|
329
|
+
// Ideally, those specs would either:
|
|
330
|
+
// - stub out the `BaseDropdown` component to include a stub `containsElement` method, or
|
|
331
|
+
// - use a full mount.
|
|
332
|
+
//
|
|
333
|
+
// Unfortunately, GitLab has many specs which do neither of these. So the simpler thing to do
|
|
334
|
+
// is to optionally chain the method call here.
|
|
335
|
+
(_this$$refs$baseDropd = (_this$$refs$baseDropd2 = this.$refs.baseDropdown).containsElement) !== null && _this$$refs$baseDropd !== void 0 && _this$$refs$baseDropd.call(_this$$refs$baseDropd2, e.target)) {
|
|
328
336
|
this.closeAndFocus();
|
|
329
337
|
}
|
|
330
338
|
},
|