diff --git a/package-lock.json b/package-lock.json index 70f9bec..53c54f8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -775,7 +775,8 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -1190,7 +1191,8 @@ "safe-buffer": { "version": "5.1.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -1246,6 +1248,7 @@ "version": "3.0.1", "bundled": true, "dev": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -1289,12 +1292,14 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "yallist": { "version": "3.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true } } }, @@ -2557,11 +2562,6 @@ "webidl-conversions": "^4.0.2" } }, - "wicg-inert": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/wicg-inert/-/wicg-inert-2.2.1.tgz", - "integrity": "sha512-xaI3ig1hhEcec2+5uUs9i2BrVXzJ83dOn2ij3ze2RAKUQ4X03Cm99SLny1Vh1KL4Rc1SPZnQOs0mdtVkQ0Tclw==" - }, "wordwrap": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", diff --git a/package.json b/package.json index 2a3389b..346d55f 100644 --- a/package.json +++ b/package.json @@ -16,9 +16,6 @@ "test": "stencil test --spec --e2e", "test.watch": "stencil test --spec --e2e --watchAll" }, - "dependencies": { - "wicg-inert": "^2.1.2" - }, "devDependencies": { "@stencil/core": "~0.16.2" }, diff --git a/src/assets/inert.min.js b/src/assets/inert.min.js new file mode 100644 index 0000000..9a70caf --- /dev/null +++ b/src/assets/inert.min.js @@ -0,0 +1,2 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t():"function"==typeof define&&define.amd?define("inert",t):t()}(0,function(){"use strict";var e=function(){function i(e,t){for(var n=0;n{option.name} ); })} @@ -126,6 +130,11 @@ export class ComboNoInput { } private onComboBlur() { + if (this.ignoreBlur) { + this.ignoreBlur = false; + return; + } + this.updateMenuState(false, false); } @@ -139,6 +148,10 @@ export class ComboNoInput { this.updateMenuState(false); } + private onOptionMouseDown() { + this.ignoreBlur = true; + } + private selectOption(index: number) { const selected = this.options[index]; this.value = selected.name; diff --git a/src/components/modal/modal.tsx b/src/components/modal/modal.tsx index 77f0f4e..7426fe5 100644 --- a/src/components/modal/modal.tsx +++ b/src/components/modal/modal.tsx @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { Component, Event, EventEmitter, Prop, Watch } from '@stencil/core'; -import 'wicg-inert'; +// import 'wicg-inert'; @Component({ tag: 'sui-modal', diff --git a/src/components/multiselect-inline/multiselect-inline.tsx b/src/components/multiselect-inline/multiselect-inline.tsx index 529a8ef..2b071dc 100644 --- a/src/components/multiselect-inline/multiselect-inline.tsx +++ b/src/components/multiselect-inline/multiselect-inline.tsx @@ -111,7 +111,7 @@ export class MultiselectInline { {selectedOptions.map((option, i) => { return (
  • - diff --git a/src/index.html b/src/index.html index dc446df..4fbe4ed 100644 --- a/src/index.html +++ b/src/index.html @@ -5,6 +5,7 @@ Stencil Component Starter + +
    diff --git a/src/studies/grid/editable.html b/src/studies/grid/editable.html index 1509f28..2d194d6 100644 --- a/src/studies/grid/editable.html +++ b/src/studies/grid/editable.html @@ -6,6 +6,7 @@ Grid Usability Study +
    diff --git a/src/studies/grid/fast-editable.html b/src/studies/grid/fast-editable.html index 9b9cef4..e7a3a0c 100644 --- a/src/studies/grid/fast-editable.html +++ b/src/studies/grid/fast-editable.html @@ -6,6 +6,7 @@ Grid Usability Study +
    diff --git a/src/studies/grid/selection-aria.html b/src/studies/grid/selection-aria.html index d4ecffc..e69e548 100644 --- a/src/studies/grid/selection-aria.html +++ b/src/studies/grid/selection-aria.html @@ -6,6 +6,7 @@ Grid Usability Study +
    diff --git a/src/studies/grid/selection-checks.html b/src/studies/grid/selection-checks.html index 683c8db..98b66e6 100644 --- a/src/studies/grid/selection-checks.html +++ b/src/studies/grid/selection-checks.html @@ -6,6 +6,7 @@ Grid Usability Study +
    diff --git a/src/studies/grid/simple-actions.html b/src/studies/grid/simple-actions.html index 4b36988..c71db85 100644 --- a/src/studies/grid/simple-actions.html +++ b/src/studies/grid/simple-actions.html @@ -6,6 +6,7 @@ Grid Usability Study +
    diff --git a/src/studies/modal/confirm-modal.html b/src/studies/modal/confirm-modal.html index 69cf8eb..35fa21d 100644 --- a/src/studies/modal/confirm-modal.html +++ b/src/studies/modal/confirm-modal.html @@ -6,7 +6,8 @@ Modal Dialog Usability Study - + +
    diff --git a/src/studies/modal/form-modal.html b/src/studies/modal/form-modal.html index f773068..544171c 100644 --- a/src/studies/modal/form-modal.html +++ b/src/studies/modal/form-modal.html @@ -6,7 +6,8 @@ Modal Dialog Usability Study - + +