@shoper/phoenix_design_system 0.3.3 → 0.3.4
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/build/cjs/packages/phoenix/src/components/modal/modal.js +2 -1
- package/build/cjs/packages/phoenix/src/components/modal/modal.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/modal/modal_backdrop.js +3 -2
- package/build/cjs/packages/phoenix/src/components/modal/modal_backdrop.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/modal/modal_body.js +2 -2
- package/build/cjs/packages/phoenix/src/components/modal/modal_close.js +2 -2
- package/build/cjs/packages/phoenix/src/components/modal/modal_footer.js +2 -2
- package/build/cjs/packages/phoenix/src/components/modal/modal_header.js +2 -2
- package/build/cjs/packages/phoenix/src/components/modal/modal_opener.js +2 -1
- package/build/cjs/packages/phoenix/src/components/modal/modal_opener.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/portal/portal.js +2 -1
- package/build/cjs/packages/phoenix/src/components/portal/portal.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/portal/portal_target.js +2 -1
- package/build/cjs/packages/phoenix/src/components/portal/portal_target.js.map +1 -1
- package/build/cjs/packages/phoenix/src/core/decorators/phoenix_custom_element.js +50 -0
- package/build/cjs/packages/phoenix/src/core/decorators/phoenix_custom_element.js.map +1 -0
- package/build/cjs/packages/phoenix/src/hello_button.js +2 -1
- package/build/cjs/packages/phoenix/src/hello_button.js.map +1 -1
- package/build/cjs/packages/star_core/build/esm/external/tslib/tslib.es6.js +1 -1
- package/build/esm/packages/phoenix/src/components/modal/modal.js +3 -2
- package/build/esm/packages/phoenix/src/components/modal/modal.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/modal/modal_backdrop.js +4 -3
- package/build/esm/packages/phoenix/src/components/modal/modal_backdrop.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/modal/modal_body.js +2 -2
- package/build/esm/packages/phoenix/src/components/modal/modal_close.js +2 -2
- package/build/esm/packages/phoenix/src/components/modal/modal_footer.js +2 -2
- package/build/esm/packages/phoenix/src/components/modal/modal_header.js +2 -2
- package/build/esm/packages/phoenix/src/components/modal/modal_opener.js +3 -2
- package/build/esm/packages/phoenix/src/components/modal/modal_opener.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/portal/portal.js +3 -2
- package/build/esm/packages/phoenix/src/components/portal/portal.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/portal/portal_target.js +3 -2
- package/build/esm/packages/phoenix/src/components/portal/portal_target.js.map +1 -1
- package/build/esm/packages/phoenix/src/core/decorators/phoenix_custom_element.d.ts +21 -0
- package/build/esm/packages/phoenix/src/core/decorators/phoenix_custom_element.js +46 -0
- package/build/esm/packages/phoenix/src/core/decorators/phoenix_custom_element.js.map +1 -0
- package/build/esm/packages/phoenix/src/global_types.d.ts +20 -0
- package/build/esm/packages/phoenix/src/global_types.js +2 -0
- package/build/esm/packages/phoenix/src/global_types.js.map +1 -0
- package/build/esm/packages/phoenix/src/hello_button.js +3 -2
- package/build/esm/packages/phoenix/src/hello_button.js.map +1 -1
- package/build/esm/packages/phoenix/src/index.d.ts +1 -0
- package/build/esm/packages/star_core/build/esm/external/tslib/tslib.es6.js +1 -1
- package/package.json +1 -1
|
@@ -6,6 +6,7 @@ var tslib_es6 = require('../../../../../external/tslib/tslib.es6.js');
|
|
|
6
6
|
var lit = require('lit');
|
|
7
7
|
var decorators = require('lit/decorators');
|
|
8
8
|
var phoenix_light_lit_element = require('../../core/phoenix_light_lit_element.js');
|
|
9
|
+
var phoenix_custom_element = require('../../core/decorators/phoenix_custom_element.js');
|
|
9
10
|
var portal_constants = require('../portal/portal_constants.js');
|
|
10
11
|
var modal_constants = require('./modal_constants.js');
|
|
11
12
|
var ref = require('../../../../../external/lit-html/directives/ref.js');
|
|
@@ -212,7 +213,7 @@ tslib_es6.__decorate([
|
|
|
212
213
|
tslib_es6.__metadata("design:type", Object)
|
|
213
214
|
], exports.HModal.prototype, "_lastFocusableElement", void 0);
|
|
214
215
|
exports.HModal = HModal_1 = tslib_es6.__decorate([
|
|
215
|
-
|
|
216
|
+
phoenix_custom_element.phoenixCustomElement('h-modal'),
|
|
216
217
|
tslib_es6.__metadata("design:paramtypes", [])
|
|
217
218
|
], exports.HModal);
|
|
218
219
|
//# sourceMappingURL=modal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,4CAAgD;AACxE;AACA;AACA;AACA;AACA;AACA,kBAAkB,oDAAwD;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,4CAAgD;AACxE;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,oDAAwD;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -6,6 +6,7 @@ var tslib_es6 = require('../../../../../external/tslib/tslib.es6.js');
|
|
|
6
6
|
var lit = require('lit');
|
|
7
7
|
var decorators = require('lit/decorators');
|
|
8
8
|
var phoenix_light_lit_element = require('../../core/phoenix_light_lit_element.js');
|
|
9
|
+
var phoenix_custom_element = require('../../core/decorators/phoenix_custom_element.js');
|
|
9
10
|
var modal_constants = require('./modal_constants.js');
|
|
10
11
|
var modal = require('./modal.js');
|
|
11
12
|
|
|
@@ -52,7 +53,7 @@ exports.HModalBackdrop = class HModalBackdrop extends phoenix_light_lit_element.
|
|
|
52
53
|
document.body.style.removeProperty('padding-right');
|
|
53
54
|
}
|
|
54
55
|
render() {
|
|
55
|
-
return lit.html
|
|
56
|
+
return lit.html ` <div aria-hidden="true" ?hidden="${!this.visible}" class="modal-backdrop"></div>`;
|
|
56
57
|
}
|
|
57
58
|
};
|
|
58
59
|
tslib_es6.__decorate([
|
|
@@ -60,6 +61,6 @@ tslib_es6.__decorate([
|
|
|
60
61
|
tslib_es6.__metadata("design:type", Object)
|
|
61
62
|
], exports.HModalBackdrop.prototype, "visible", void 0);
|
|
62
63
|
exports.HModalBackdrop = tslib_es6.__decorate([
|
|
63
|
-
|
|
64
|
+
phoenix_custom_element.phoenixCustomElement('h-modal-backdrop')
|
|
64
65
|
], exports.HModalBackdrop);
|
|
65
66
|
//# sourceMappingURL=modal_backdrop.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,4CAAgD;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,4CAAgD;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var tslib_es6 = require('../../../../../external/tslib/tslib.es6.js');
|
|
6
|
-
var decorators = require('lit/decorators');
|
|
7
6
|
var phoenix_light_lit_element = require('../../core/phoenix_light_lit_element.js');
|
|
7
|
+
var phoenix_custom_element = require('../../core/decorators/phoenix_custom_element.js');
|
|
8
8
|
|
|
9
9
|
exports.HModalBody = class HModalBody extends phoenix_light_lit_element.PhoenixLightLitElement {
|
|
10
10
|
constructor() {
|
|
@@ -14,7 +14,7 @@ exports.HModalBody = class HModalBody extends phoenix_light_lit_element.PhoenixL
|
|
|
14
14
|
}
|
|
15
15
|
};
|
|
16
16
|
exports.HModalBody = tslib_es6.__decorate([
|
|
17
|
-
|
|
17
|
+
phoenix_custom_element.phoenixCustomElement('h-modal-body'),
|
|
18
18
|
tslib_es6.__metadata("design:paramtypes", [])
|
|
19
19
|
], exports.HModalBody);
|
|
20
20
|
//# sourceMappingURL=modal_body.js.map
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var tslib_es6 = require('../../../../../external/tslib/tslib.es6.js');
|
|
6
|
-
var decorators = require('lit/decorators');
|
|
7
6
|
var phoenix_light_lit_element = require('../../core/phoenix_light_lit_element.js');
|
|
7
|
+
var phoenix_custom_element = require('../../core/decorators/phoenix_custom_element.js');
|
|
8
8
|
var modal_constants = require('./modal_constants.js');
|
|
9
9
|
|
|
10
10
|
exports.HModalClose = class HModalClose extends phoenix_light_lit_element.PhoenixLightLitElement {
|
|
@@ -35,7 +35,7 @@ exports.HModalClose = class HModalClose extends phoenix_light_lit_element.Phoeni
|
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
37
|
exports.HModalClose = tslib_es6.__decorate([
|
|
38
|
-
|
|
38
|
+
phoenix_custom_element.phoenixCustomElement('h-modal-close'),
|
|
39
39
|
tslib_es6.__metadata("design:paramtypes", [])
|
|
40
40
|
], exports.HModalClose);
|
|
41
41
|
//# sourceMappingURL=modal_close.js.map
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var tslib_es6 = require('../../../../../external/tslib/tslib.es6.js');
|
|
6
|
-
var decorators = require('lit/decorators');
|
|
7
6
|
var phoenix_light_lit_element = require('../../core/phoenix_light_lit_element.js');
|
|
7
|
+
var phoenix_custom_element = require('../../core/decorators/phoenix_custom_element.js');
|
|
8
8
|
|
|
9
9
|
exports.HModalFooter = class HModalFooter extends phoenix_light_lit_element.PhoenixLightLitElement {
|
|
10
10
|
constructor() {
|
|
@@ -14,7 +14,7 @@ exports.HModalFooter = class HModalFooter extends phoenix_light_lit_element.Phoe
|
|
|
14
14
|
}
|
|
15
15
|
};
|
|
16
16
|
exports.HModalFooter = tslib_es6.__decorate([
|
|
17
|
-
|
|
17
|
+
phoenix_custom_element.phoenixCustomElement('h-modal-footer'),
|
|
18
18
|
tslib_es6.__metadata("design:paramtypes", [])
|
|
19
19
|
], exports.HModalFooter);
|
|
20
20
|
//# sourceMappingURL=modal_footer.js.map
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var tslib_es6 = require('../../../../../external/tslib/tslib.es6.js');
|
|
6
|
-
var decorators = require('lit/decorators');
|
|
7
6
|
var phoenix_light_lit_element = require('../../core/phoenix_light_lit_element.js');
|
|
7
|
+
var phoenix_custom_element = require('../../core/decorators/phoenix_custom_element.js');
|
|
8
8
|
|
|
9
9
|
exports.HModalHeader = class HModalHeader extends phoenix_light_lit_element.PhoenixLightLitElement {
|
|
10
10
|
constructor() {
|
|
@@ -14,7 +14,7 @@ exports.HModalHeader = class HModalHeader extends phoenix_light_lit_element.Phoe
|
|
|
14
14
|
}
|
|
15
15
|
};
|
|
16
16
|
exports.HModalHeader = tslib_es6.__decorate([
|
|
17
|
-
|
|
17
|
+
phoenix_custom_element.phoenixCustomElement('h-modal-header'),
|
|
18
18
|
tslib_es6.__metadata("design:paramtypes", [])
|
|
19
19
|
], exports.HModalHeader);
|
|
20
20
|
//# sourceMappingURL=modal_header.js.map
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var tslib_es6 = require('../../../../../external/tslib/tslib.es6.js');
|
|
6
6
|
var decorators = require('lit/decorators');
|
|
7
7
|
var phoenix_light_lit_element = require('../../core/phoenix_light_lit_element.js');
|
|
8
|
+
var phoenix_custom_element = require('../../core/decorators/phoenix_custom_element.js');
|
|
8
9
|
|
|
9
10
|
exports.HModalOpener = class HModalOpener extends phoenix_light_lit_element.PhoenixLightLitElement {
|
|
10
11
|
constructor() {
|
|
@@ -37,7 +38,7 @@ tslib_es6.__decorate([
|
|
|
37
38
|
tslib_es6.__metadata("design:type", Object)
|
|
38
39
|
], exports.HModalOpener.prototype, "name", void 0);
|
|
39
40
|
exports.HModalOpener = tslib_es6.__decorate([
|
|
40
|
-
|
|
41
|
+
phoenix_custom_element.phoenixCustomElement('h-modal-opener'),
|
|
41
42
|
tslib_es6.__metadata("design:paramtypes", [])
|
|
42
43
|
], exports.HModalOpener);
|
|
43
44
|
//# sourceMappingURL=modal_opener.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,4CAAgD;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,4CAAgD;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var tslib_es6 = require('../../../../../external/tslib/tslib.es6.js');
|
|
6
6
|
var decorators = require('lit/decorators');
|
|
7
7
|
var phoenix_light_lit_element = require('../../core/phoenix_light_lit_element.js');
|
|
8
|
+
var phoenix_custom_element = require('../../core/decorators/phoenix_custom_element.js');
|
|
8
9
|
var portal_constants = require('./portal_constants.js');
|
|
9
10
|
var v4 = require('../../../../../external/uuid/dist/esm-browser/v4.js');
|
|
10
11
|
|
|
@@ -79,7 +80,7 @@ tslib_es6.__decorate([
|
|
|
79
80
|
tslib_es6.__metadata("design:type", Object)
|
|
80
81
|
], exports.HPortal.prototype, "disabled", void 0);
|
|
81
82
|
exports.HPortal = tslib_es6.__decorate([
|
|
82
|
-
|
|
83
|
+
phoenix_custom_element.phoenixCustomElement('h-portal'),
|
|
83
84
|
tslib_es6.__metadata("design:paramtypes", [])
|
|
84
85
|
], exports.HPortal);
|
|
85
86
|
//# sourceMappingURL=portal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,4CAAgD;AACxE;AACA;AACA;AACA,iBAAiB,qDAAyD;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,4CAAgD;AACxE;AACA;AACA;AACA;AACA,iBAAiB,qDAAyD;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var tslib_es6 = require('../../../../../external/tslib/tslib.es6.js');
|
|
6
6
|
var decorators = require('lit/decorators');
|
|
7
7
|
var phoenix_light_lit_element = require('../../core/phoenix_light_lit_element.js');
|
|
8
|
+
var phoenix_custom_element = require('../../core/decorators/phoenix_custom_element.js');
|
|
8
9
|
var portal_target_error = require('./portal_target_error.js');
|
|
9
10
|
var portal_constants = require('./portal_constants.js');
|
|
10
11
|
|
|
@@ -71,6 +72,6 @@ tslib_es6.__decorate([
|
|
|
71
72
|
tslib_es6.__metadata("design:type", Object)
|
|
72
73
|
], exports.HPortalTarget.prototype, "_portalElementsMap", void 0);
|
|
73
74
|
exports.HPortalTarget = HPortalTarget_1 = tslib_es6.__decorate([
|
|
74
|
-
|
|
75
|
+
phoenix_custom_element.phoenixCustomElement('h-portal-target')
|
|
75
76
|
], exports.HPortalTarget);
|
|
76
77
|
//# sourceMappingURL=portal_target.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,4CAAgD;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,4CAAgD;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Allow for custom element classes with private constructors
|
|
7
|
+
*/
|
|
8
|
+
const legacyCustomElement = (tagName, clazz) => {
|
|
9
|
+
window.customElements.define(tagName, clazz);
|
|
10
|
+
// Cast as any because TS doesn't recognize the return type as being a
|
|
11
|
+
// subtype of the decorated class when clazz is typed as
|
|
12
|
+
// `Constructor<HTMLElement>` for some reason.
|
|
13
|
+
// `Constructor<HTMLElement>` is helpful to make sure the decorator is
|
|
14
|
+
// applied to elements however.
|
|
15
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
16
|
+
clazz.__componentName__ = tagName;
|
|
17
|
+
return clazz;
|
|
18
|
+
};
|
|
19
|
+
const standardCustomElement = (tagName, descriptor) => {
|
|
20
|
+
const { kind, elements } = descriptor;
|
|
21
|
+
return {
|
|
22
|
+
kind,
|
|
23
|
+
elements,
|
|
24
|
+
// This callback is called once the class is otherwise fully defined
|
|
25
|
+
finisher(clazz) {
|
|
26
|
+
clazz.__componentName__ = tagName;
|
|
27
|
+
window.customElements.define(tagName, clazz);
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Class decorator factory that defines the decorated class as a custom element.
|
|
33
|
+
*
|
|
34
|
+
* ```js
|
|
35
|
+
* @phoenixCustomElement('my-element')
|
|
36
|
+
* class MyElement extends LitElement {
|
|
37
|
+
* render() {
|
|
38
|
+
* return html``;
|
|
39
|
+
* }
|
|
40
|
+
* }
|
|
41
|
+
* ```
|
|
42
|
+
* @category Decorator
|
|
43
|
+
* @param tagName The tag name of the custom element to define.
|
|
44
|
+
*/
|
|
45
|
+
const phoenixCustomElement = (tagName) => (classOrDescriptor) => typeof classOrDescriptor === 'function'
|
|
46
|
+
? legacyCustomElement(tagName, classOrDescriptor)
|
|
47
|
+
: standardCustomElement(tagName, classOrDescriptor);
|
|
48
|
+
|
|
49
|
+
exports.phoenixCustomElement = phoenixCustomElement;
|
|
50
|
+
//# sourceMappingURL=phoenix_custom_element.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var tslib_es6 = require('../../../external/tslib/tslib.es6.js');
|
|
6
6
|
var lit = require('lit');
|
|
7
7
|
var decorators = require('lit/decorators');
|
|
8
|
+
var phoenix_custom_element = require('./core/decorators/phoenix_custom_element.js');
|
|
8
9
|
|
|
9
10
|
exports.HelloButton = class HelloButton extends lit.LitElement {
|
|
10
11
|
constructor() {
|
|
@@ -46,6 +47,6 @@ tslib_es6.__decorate([
|
|
|
46
47
|
tslib_es6.__metadata("design:type", Object)
|
|
47
48
|
], exports.HelloButton.prototype, "planet", void 0);
|
|
48
49
|
exports.HelloButton = tslib_es6.__decorate([
|
|
49
|
-
|
|
50
|
+
phoenix_custom_element.phoenixCustomElement('hello-button')
|
|
50
51
|
], exports.HelloButton);
|
|
51
52
|
//# sourceMappingURL=hello_button.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,sCAA0C;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,sCAA0C;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
/******************************************************************************
|
|
6
6
|
Copyright (c) Microsoft Corporation.
|
|
7
7
|
|
|
8
8
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { __decorate, __metadata } from '../../../../../external/tslib/tslib.es6.js';
|
|
2
2
|
import { html } from 'lit';
|
|
3
|
-
import { property, state
|
|
3
|
+
import { property, state } from 'lit/decorators';
|
|
4
4
|
import { PhoenixLightLitElement } from '../../core/phoenix_light_lit_element.js';
|
|
5
|
+
import { phoenixCustomElement } from '../../core/decorators/phoenix_custom_element.js';
|
|
5
6
|
import { PORTAL_TARGET_NAME_PROP } from '../portal/portal_constants.js';
|
|
6
7
|
import { MODAL_OPENED_PROP, FOCUSABLE_ELEMENTS_WITHIN_MODAL, MODALS_PORTAL_NAME, MODAL_EVENTS } from './modal_constants.js';
|
|
7
8
|
import { createRef as e, ref as n } from '../../../../../external/lit-html/directives/ref.js';
|
|
@@ -208,7 +209,7 @@ __decorate([
|
|
|
208
209
|
__metadata("design:type", Object)
|
|
209
210
|
], HModal.prototype, "_lastFocusableElement", void 0);
|
|
210
211
|
HModal = HModal_1 = __decorate([
|
|
211
|
-
|
|
212
|
+
phoenixCustomElement('h-modal'),
|
|
212
213
|
__metadata("design:paramtypes", [])
|
|
213
214
|
], HModal);
|
|
214
215
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,4CAAgD;AACvF;AACA;AACA;AACA;AACA;AACA,yCAAyC,oDAAwD;AACjG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,4CAAgD;AACvF;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,oDAAwD;AACjG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { __decorate, __metadata } from '../../../../../external/tslib/tslib.es6.js';
|
|
2
2
|
import { html } from 'lit';
|
|
3
|
-
import { property
|
|
3
|
+
import { property } from 'lit/decorators';
|
|
4
4
|
import { PhoenixLightLitElement } from '../../core/phoenix_light_lit_element.js';
|
|
5
|
+
import { phoenixCustomElement } from '../../core/decorators/phoenix_custom_element.js';
|
|
5
6
|
import { MODAL_EVENTS } from './modal_constants.js';
|
|
6
7
|
import { HModal } from './modal.js';
|
|
7
8
|
|
|
@@ -48,7 +49,7 @@ let HModalBackdrop = class HModalBackdrop extends PhoenixLightLitElement {
|
|
|
48
49
|
document.body.style.removeProperty('padding-right');
|
|
49
50
|
}
|
|
50
51
|
render() {
|
|
51
|
-
return html
|
|
52
|
+
return html ` <div aria-hidden="true" ?hidden="${!this.visible}" class="modal-backdrop"></div>`;
|
|
52
53
|
}
|
|
53
54
|
};
|
|
54
55
|
__decorate([
|
|
@@ -56,7 +57,7 @@ __decorate([
|
|
|
56
57
|
__metadata("design:type", Object)
|
|
57
58
|
], HModalBackdrop.prototype, "visible", void 0);
|
|
58
59
|
HModalBackdrop = __decorate([
|
|
59
|
-
|
|
60
|
+
phoenixCustomElement('h-modal-backdrop')
|
|
60
61
|
], HModalBackdrop);
|
|
61
62
|
|
|
62
63
|
export { HModalBackdrop };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,4CAAgD;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,4CAAgD;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __decorate, __metadata } from '../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import { customElement } from 'lit/decorators';
|
|
3
2
|
import { PhoenixLightLitElement } from '../../core/phoenix_light_lit_element.js';
|
|
3
|
+
import { phoenixCustomElement } from '../../core/decorators/phoenix_custom_element.js';
|
|
4
4
|
|
|
5
5
|
let HModalBody = class HModalBody extends PhoenixLightLitElement {
|
|
6
6
|
constructor() {
|
|
@@ -10,7 +10,7 @@ let HModalBody = class HModalBody extends PhoenixLightLitElement {
|
|
|
10
10
|
}
|
|
11
11
|
};
|
|
12
12
|
HModalBody = __decorate([
|
|
13
|
-
|
|
13
|
+
phoenixCustomElement('h-modal-body'),
|
|
14
14
|
__metadata("design:paramtypes", [])
|
|
15
15
|
], HModalBody);
|
|
16
16
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __decorate, __metadata } from '../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import { customElement } from 'lit/decorators';
|
|
3
2
|
import { PhoenixLightLitElement } from '../../core/phoenix_light_lit_element.js';
|
|
3
|
+
import { phoenixCustomElement } from '../../core/decorators/phoenix_custom_element.js';
|
|
4
4
|
import { MODAL_EVENTS } from './modal_constants.js';
|
|
5
5
|
|
|
6
6
|
let HModalClose = class HModalClose extends PhoenixLightLitElement {
|
|
@@ -31,7 +31,7 @@ let HModalClose = class HModalClose extends PhoenixLightLitElement {
|
|
|
31
31
|
}
|
|
32
32
|
};
|
|
33
33
|
HModalClose = __decorate([
|
|
34
|
-
|
|
34
|
+
phoenixCustomElement('h-modal-close'),
|
|
35
35
|
__metadata("design:paramtypes", [])
|
|
36
36
|
], HModalClose);
|
|
37
37
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __decorate, __metadata } from '../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import { customElement } from 'lit/decorators';
|
|
3
2
|
import { PhoenixLightLitElement } from '../../core/phoenix_light_lit_element.js';
|
|
3
|
+
import { phoenixCustomElement } from '../../core/decorators/phoenix_custom_element.js';
|
|
4
4
|
|
|
5
5
|
let HModalFooter = class HModalFooter extends PhoenixLightLitElement {
|
|
6
6
|
constructor() {
|
|
@@ -10,7 +10,7 @@ let HModalFooter = class HModalFooter extends PhoenixLightLitElement {
|
|
|
10
10
|
}
|
|
11
11
|
};
|
|
12
12
|
HModalFooter = __decorate([
|
|
13
|
-
|
|
13
|
+
phoenixCustomElement('h-modal-footer'),
|
|
14
14
|
__metadata("design:paramtypes", [])
|
|
15
15
|
], HModalFooter);
|
|
16
16
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __decorate, __metadata } from '../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import { customElement } from 'lit/decorators';
|
|
3
2
|
import { PhoenixLightLitElement } from '../../core/phoenix_light_lit_element.js';
|
|
3
|
+
import { phoenixCustomElement } from '../../core/decorators/phoenix_custom_element.js';
|
|
4
4
|
|
|
5
5
|
let HModalHeader = class HModalHeader extends PhoenixLightLitElement {
|
|
6
6
|
constructor() {
|
|
@@ -10,7 +10,7 @@ let HModalHeader = class HModalHeader extends PhoenixLightLitElement {
|
|
|
10
10
|
}
|
|
11
11
|
};
|
|
12
12
|
HModalHeader = __decorate([
|
|
13
|
-
|
|
13
|
+
phoenixCustomElement('h-modal-header'),
|
|
14
14
|
__metadata("design:paramtypes", [])
|
|
15
15
|
], HModalHeader);
|
|
16
16
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { __decorate, __metadata } from '../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import { property
|
|
2
|
+
import { property } from 'lit/decorators';
|
|
3
3
|
import { PhoenixLightLitElement } from '../../core/phoenix_light_lit_element.js';
|
|
4
|
+
import { phoenixCustomElement } from '../../core/decorators/phoenix_custom_element.js';
|
|
4
5
|
|
|
5
6
|
let HModalOpener = class HModalOpener extends PhoenixLightLitElement {
|
|
6
7
|
constructor() {
|
|
@@ -33,7 +34,7 @@ __decorate([
|
|
|
33
34
|
__metadata("design:type", Object)
|
|
34
35
|
], HModalOpener.prototype, "name", void 0);
|
|
35
36
|
HModalOpener = __decorate([
|
|
36
|
-
|
|
37
|
+
phoenixCustomElement('h-modal-opener'),
|
|
37
38
|
__metadata("design:paramtypes", [])
|
|
38
39
|
], HModalOpener);
|
|
39
40
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,4CAAgD;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,4CAAgD;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { __decorate, __metadata } from '../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import { state, property
|
|
2
|
+
import { state, property } from 'lit/decorators';
|
|
3
3
|
import { PhoenixLightLitElement } from '../../core/phoenix_light_lit_element.js';
|
|
4
|
+
import { phoenixCustomElement } from '../../core/decorators/phoenix_custom_element.js';
|
|
4
5
|
import { PORTAL_EVENTS } from './portal_constants.js';
|
|
5
6
|
import v4 from '../../../../../external/uuid/dist/esm-browser/v4.js';
|
|
6
7
|
|
|
@@ -75,7 +76,7 @@ __decorate([
|
|
|
75
76
|
__metadata("design:type", Object)
|
|
76
77
|
], HPortal.prototype, "disabled", void 0);
|
|
77
78
|
HPortal = __decorate([
|
|
78
|
-
|
|
79
|
+
phoenixCustomElement('h-portal'),
|
|
79
80
|
__metadata("design:paramtypes", [])
|
|
80
81
|
], HPortal);
|
|
81
82
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,4CAAgD;AACvF;AACA;AACA;AACA,eAAe,qDAAyD;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,4CAAgD;AACvF;AACA;AACA;AACA;AACA,eAAe,qDAAyD;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { __decorate, __metadata } from '../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import { property, state
|
|
2
|
+
import { property, state } from 'lit/decorators';
|
|
3
3
|
import { PhoenixLightLitElement } from '../../core/phoenix_light_lit_element.js';
|
|
4
|
+
import { phoenixCustomElement } from '../../core/decorators/phoenix_custom_element.js';
|
|
4
5
|
import { PortalTargetError } from './portal_target_error.js';
|
|
5
6
|
import { PORTAL_EVENTS, PORTAL_TARGET_NAME_PROP } from './portal_constants.js';
|
|
6
7
|
|
|
@@ -67,7 +68,7 @@ __decorate([
|
|
|
67
68
|
__metadata("design:type", Object)
|
|
68
69
|
], HPortalTarget.prototype, "_portalElementsMap", void 0);
|
|
69
70
|
HPortalTarget = HPortalTarget_1 = __decorate([
|
|
70
|
-
|
|
71
|
+
phoenixCustomElement('h-portal-target')
|
|
71
72
|
], HPortalTarget);
|
|
72
73
|
|
|
73
74
|
export { HPortalTarget };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,4CAAgD;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,4CAAgD;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Allow for custom element classes with private constructors
|
|
3
|
+
*/
|
|
4
|
+
import { ClassDescriptor, IPhoenixComponentClass } from "../../global_types";
|
|
5
|
+
declare type CustomElementClass = Omit<typeof HTMLElement, 'new'> & IPhoenixComponentClass;
|
|
6
|
+
/**
|
|
7
|
+
* Class decorator factory that defines the decorated class as a custom element.
|
|
8
|
+
*
|
|
9
|
+
* ```js
|
|
10
|
+
* @phoenixCustomElement('my-element')
|
|
11
|
+
* class MyElement extends LitElement {
|
|
12
|
+
* render() {
|
|
13
|
+
* return html``;
|
|
14
|
+
* }
|
|
15
|
+
* }
|
|
16
|
+
* ```
|
|
17
|
+
* @category Decorator
|
|
18
|
+
* @param tagName The tag name of the custom element to define.
|
|
19
|
+
*/
|
|
20
|
+
export declare const phoenixCustomElement: (tagName: string) => (classOrDescriptor: CustomElementClass | ClassDescriptor) => any;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Allow for custom element classes with private constructors
|
|
3
|
+
*/
|
|
4
|
+
const legacyCustomElement = (tagName, clazz) => {
|
|
5
|
+
window.customElements.define(tagName, clazz);
|
|
6
|
+
// Cast as any because TS doesn't recognize the return type as being a
|
|
7
|
+
// subtype of the decorated class when clazz is typed as
|
|
8
|
+
// `Constructor<HTMLElement>` for some reason.
|
|
9
|
+
// `Constructor<HTMLElement>` is helpful to make sure the decorator is
|
|
10
|
+
// applied to elements however.
|
|
11
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
12
|
+
clazz.__componentName__ = tagName;
|
|
13
|
+
return clazz;
|
|
14
|
+
};
|
|
15
|
+
const standardCustomElement = (tagName, descriptor) => {
|
|
16
|
+
const { kind, elements } = descriptor;
|
|
17
|
+
return {
|
|
18
|
+
kind,
|
|
19
|
+
elements,
|
|
20
|
+
// This callback is called once the class is otherwise fully defined
|
|
21
|
+
finisher(clazz) {
|
|
22
|
+
clazz.__componentName__ = tagName;
|
|
23
|
+
window.customElements.define(tagName, clazz);
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Class decorator factory that defines the decorated class as a custom element.
|
|
29
|
+
*
|
|
30
|
+
* ```js
|
|
31
|
+
* @phoenixCustomElement('my-element')
|
|
32
|
+
* class MyElement extends LitElement {
|
|
33
|
+
* render() {
|
|
34
|
+
* return html``;
|
|
35
|
+
* }
|
|
36
|
+
* }
|
|
37
|
+
* ```
|
|
38
|
+
* @category Decorator
|
|
39
|
+
* @param tagName The tag name of the custom element to define.
|
|
40
|
+
*/
|
|
41
|
+
const phoenixCustomElement = (tagName) => (classOrDescriptor) => typeof classOrDescriptor === 'function'
|
|
42
|
+
? legacyCustomElement(tagName, classOrDescriptor)
|
|
43
|
+
: standardCustomElement(tagName, classOrDescriptor);
|
|
44
|
+
|
|
45
|
+
export { phoenixCustomElement };
|
|
46
|
+
//# sourceMappingURL=phoenix_custom_element.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare type Constructor<T> = {
|
|
2
|
+
new (...args: any[]): T;
|
|
3
|
+
};
|
|
4
|
+
export interface ClassDescriptor {
|
|
5
|
+
kind: 'class';
|
|
6
|
+
elements: ClassElement[];
|
|
7
|
+
finisher?: <T>(clazz: Constructor<T>) => void | Constructor<T>;
|
|
8
|
+
}
|
|
9
|
+
export interface ClassElement {
|
|
10
|
+
kind: 'field' | 'method';
|
|
11
|
+
key: PropertyKey;
|
|
12
|
+
placement: 'static' | 'prototype' | 'own';
|
|
13
|
+
initializer?: Function;
|
|
14
|
+
extras?: ClassElement[];
|
|
15
|
+
finisher?: <T>(clazz: Constructor<T>) => void | Constructor<T>;
|
|
16
|
+
descriptor?: PropertyDescriptor;
|
|
17
|
+
}
|
|
18
|
+
export interface IPhoenixComponentClass {
|
|
19
|
+
__componentName__?: string;
|
|
20
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"global_types.js","sourceRoot":"","sources":["../../../../../src/global_types.ts"],"names":[],"mappings":""}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { __decorate, __metadata } from '../../../external/tslib/tslib.es6.js';
|
|
2
2
|
import { LitElement, html, css } from 'lit';
|
|
3
|
-
import { state
|
|
3
|
+
import { state } from 'lit/decorators';
|
|
4
|
+
import { phoenixCustomElement } from './core/decorators/phoenix_custom_element.js';
|
|
4
5
|
|
|
5
6
|
let HelloButton = class HelloButton extends LitElement {
|
|
6
7
|
constructor() {
|
|
@@ -42,7 +43,7 @@ __decorate([
|
|
|
42
43
|
__metadata("design:type", Object)
|
|
43
44
|
], HelloButton.prototype, "planet", void 0);
|
|
44
45
|
HelloButton = __decorate([
|
|
45
|
-
|
|
46
|
+
phoenixCustomElement('hello-button')
|
|
46
47
|
], HelloButton);
|
|
47
48
|
|
|
48
49
|
export { HelloButton };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,sCAA0C;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,sCAA0C;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { IPhoenixComponentClass } from "./global_types";
|
|
1
2
|
export { ContextProviderController } from "./core/context/context_provider_controller";
|
|
2
3
|
export { ContextConsumerController } from "./core/context/context_consumer_controller";
|
|
3
4
|
export { PhoenixLightLitElement } from "./core/phoenix_light_lit_element";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/******************************************************************************
|
|
2
2
|
Copyright (c) Microsoft Corporation.
|
|
3
3
|
|
|
4
4
|
Permission to use, copy, modify, and/or distribute this software for any
|