@haiilo/catalyst 1.2.0 → 1.2.1
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/catalyst/catalyst.esm.js +1 -1
- package/dist/catalyst/catalyst.esm.js.map +1 -1
- package/dist/catalyst/p-e428a411.entry.js +10 -0
- package/dist/catalyst/p-e428a411.entry.js.map +1 -0
- package/dist/cjs/cat-alert_23.cjs.entry.js +10 -4
- package/dist/cjs/cat-alert_23.cjs.entry.js.map +1 -1
- package/dist/cjs/catalyst.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/cat-menu/cat-menu.css +6 -3
- package/dist/collection/components/cat-menu/cat-menu.js +28 -4
- package/dist/collection/components/cat-menu/cat-menu.js.map +1 -1
- package/dist/components/cat-menu.js +12 -5
- package/dist/components/cat-menu.js.map +1 -1
- package/dist/esm/cat-alert_23.entry.js +10 -4
- package/dist/esm/cat-alert_23.entry.js.map +1 -1
- package/dist/esm/catalyst.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/cat-menu/cat-menu.d.ts +4 -0
- package/dist/types/components.d.ts +4 -0
- package/package.json +2 -2
- package/dist/catalyst/p-9044f4d7.entry.js +0 -10
- package/dist/catalyst/p-9044f4d7.entry.js.map +0 -1
|
@@ -3053,7 +3053,7 @@ const firstTabbable = (container) => {
|
|
|
3053
3053
|
return (container ? tabbable(container, { includeContainer: true, getShadowRoot: true }) : []).shift();
|
|
3054
3054
|
};
|
|
3055
3055
|
|
|
3056
|
-
const catMenuCss = ":host{display:contents}:host([hidden]){display:none}
|
|
3056
|
+
const catMenuCss = ":host{display:contents}:host([hidden]){display:none}::slotted(nav){padding-top:0.5rem;padding-bottom:0.5rem;min-width:8rem;max-width:16rem}.content{position:absolute;background:white;display:none;overflow:auto;-webkit-overflow-scrolling:touch;min-height:2rem;max-height:calc(100vh - 48px);box-shadow:0 1px 4px 0 rgba(16, 29, 48, 0.2);border-radius:0.25rem;z-index:100}";
|
|
3057
3057
|
|
|
3058
3058
|
let nextUniqueId$6 = 0;
|
|
3059
3059
|
const CatMenu = class {
|
|
@@ -3068,13 +3068,19 @@ const CatMenu = class {
|
|
|
3068
3068
|
this.placement = 'bottom-start';
|
|
3069
3069
|
}
|
|
3070
3070
|
clickHandler(event) {
|
|
3071
|
-
var _a;
|
|
3072
3071
|
// hide menu on button click
|
|
3073
3072
|
if (this.content && event.composedPath().includes(this.content)) {
|
|
3074
|
-
|
|
3075
|
-
this.hide();
|
|
3073
|
+
this.close();
|
|
3076
3074
|
}
|
|
3077
3075
|
}
|
|
3076
|
+
/**
|
|
3077
|
+
* Closes the menu.
|
|
3078
|
+
*/
|
|
3079
|
+
async close() {
|
|
3080
|
+
var _a;
|
|
3081
|
+
(_a = this.trap) === null || _a === void 0 ? void 0 : _a.deactivate();
|
|
3082
|
+
this.hide();
|
|
3083
|
+
}
|
|
3078
3084
|
componentDidLoad() {
|
|
3079
3085
|
var _a, _b, _c, _d, _e;
|
|
3080
3086
|
this.trigger = firstTabbable(this.triggerSlot);
|