@dnncommunity/dnn-elements 0.15.1 → 0.15.2
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/cjs/dnn-button_17.cjs.entry.js +3 -3
- package/dist/cjs/dnn-button_17.cjs.entry.js.map +1 -1
- package/dist/cjs/dnn.cjs.js +2 -2
- package/dist/cjs/dnn.cjs.js.map +1 -1
- package/dist/cjs/{index-514ef6dd.js → index-81382452.js} +404 -239
- package/dist/cjs/index-81382452.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/loader.cjs.js.map +1 -1
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/dnn-button/dnn-button.js +195 -192
- package/dist/collection/components/dnn-button/dnn-button.stories.js +1 -1
- package/dist/collection/components/dnn-checkbox/dnn-checkbox.js +85 -99
- package/dist/collection/components/dnn-checkbox/dnn-checkbox.stories.js +1 -1
- package/dist/collection/components/dnn-chevron/dnn-chevron.js +92 -87
- package/dist/collection/components/dnn-chevron/dnn-chevron.stories.js +1 -1
- package/dist/collection/components/dnn-collapsible/dnn-collapsible.js +102 -90
- package/dist/collection/components/dnn-collapsible/dnn-collapsible.stories.js +1 -1
- package/dist/collection/components/dnn-color-picker/dnn-color-picker.js +105 -141
- package/dist/collection/components/dnn-color-picker/dnn-color-picker.stories.js +1 -1
- package/dist/collection/components/dnn-dropzone/dnn-dropzone.js +122 -137
- package/dist/collection/components/dnn-dropzone/dnn-dropzone.stories.js +1 -1
- package/dist/collection/components/dnn-image-cropper/CornerType.js +1 -1
- package/dist/collection/components/dnn-image-cropper/dnn-image-cropper.js +129 -133
- package/dist/collection/components/dnn-image-cropper/dnn-image-cropper.stories.js +1 -1
- package/dist/collection/components/dnn-modal/dnn-modal.css +5 -0
- package/dist/collection/components/dnn-modal/dnn-modal.js +136 -133
- package/dist/collection/components/dnn-modal/dnn-modal.js.map +1 -1
- package/dist/collection/components/dnn-modal/dnn-modal.stories.js +1 -1
- package/dist/collection/components/dnn-permissions-grid/dnn-permissions-grid.js +164 -223
- package/dist/collection/components/dnn-permissions-grid/dnn-permissions-grid.stories.js +1 -1
- package/dist/collection/components/dnn-permissions-grid/localization-interface.js +1 -1
- package/dist/collection/components/dnn-permissions-grid/permissions-interface.js +1 -1
- package/dist/collection/components/dnn-permissions-grid/role-group-interface.js +1 -1
- package/dist/collection/components/dnn-permissions-grid/role-interface.js +1 -1
- package/dist/collection/components/dnn-permissions-grid/searched-user-interface.js +1 -1
- package/dist/collection/components/dnn-searchbox/dnn-searchbox.js +101 -94
- package/dist/collection/components/dnn-searchbox/dnn-searchbox.stories.js +1 -1
- package/dist/collection/components/dnn-sort-icon/dnn-sort-icon.js +55 -54
- package/dist/collection/components/dnn-sort-icon/dnn-sort-icon.stories.js +1 -1
- package/dist/collection/components/dnn-tab/dnn-tab.js +69 -59
- package/dist/collection/components/dnn-tab/dnn-tab.stories.js +1 -1
- package/dist/collection/components/dnn-tabs/dnn-tabs.js +19 -16
- package/dist/collection/components/dnn-tabs/dnn-tabs.stories.js +1 -1
- package/dist/collection/components/dnn-toggle/dnn-toggle.js +83 -75
- package/dist/collection/components/dnn-toggle/dnn-toggle.stories.js +1 -1
- package/dist/collection/components/dnn-toggle/toggle-interface.js +1 -1
- package/dist/collection/components/dnn-treeview-item/dnn-treeview-item.js +79 -77
- package/dist/collection/components/dnn-treeview-item/dnn-treeview-item.stories.js +1 -1
- package/dist/collection/components/dnn-vertical-overflow-menu/dnn-vertical-overflow-menu.js +20 -24
- package/dist/collection/components/dnn-vertical-overflow-menu/dnn-vertical-overflow-menu.stories.js +1 -1
- package/dist/collection/components/dnn-vertical-splitview/dnn-vertical-splitview.js +117 -111
- package/dist/collection/components/dnn-vertical-splitview/dnn-vertical-splitview.stories.js +1 -1
- package/dist/collection/index.js +1 -1
- package/dist/collection/utilities/colorInfo.js +1 -1
- package/dist/collection/utilities/debounce.js +1 -1
- package/dist/collection/utilities/dnnServicesFramework.js +1 -1
- package/dist/collection/utilities/mouseUtilities.js +1 -1
- package/dist/dnn/dnn.esm.js +1 -1
- package/dist/dnn/dnn.esm.js.map +1 -1
- package/dist/dnn/dnn.js +2 -1
- package/dist/dnn/p-21f18e37.system.js +3 -0
- package/dist/dnn/p-21f18e37.system.js.map +1 -0
- package/dist/dnn/p-2a79ad5b.system.entry.js +11 -0
- package/dist/dnn/p-2a79ad5b.system.entry.js.map +1 -0
- package/dist/dnn/{p-5bcf3629.system.js → p-52139080.system.js} +2 -2
- package/dist/dnn/{p-5bcf3629.system.js.map → p-52139080.system.js.map} +1 -1
- package/dist/dnn/{p-909f2db9.entry.js → p-6cc227ab.entry.js} +3 -3
- package/dist/dnn/p-6cc227ab.entry.js.map +1 -0
- package/dist/dnn/p-97d752ed.js +3 -0
- package/dist/dnn/p-97d752ed.js.map +1 -0
- package/dist/esm/dnn-button_17.entry.js +3 -3
- package/dist/esm/dnn-button_17.entry.js.map +1 -1
- package/dist/esm/dnn.js +2 -2
- package/dist/esm/dnn.js.map +1 -1
- package/dist/esm/{index-59e0950f.js → index-e9a3fcad.js} +404 -239
- package/dist/esm/index-e9a3fcad.js.map +1 -0
- package/dist/esm/loader.js +2 -2
- package/dist/esm/loader.js.map +1 -1
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm-es5/dnn-button_17.entry.js +2 -2
- package/dist/esm-es5/dnn-button_17.entry.js.map +1 -1
- package/dist/esm-es5/dnn.js +1 -1
- package/dist/esm-es5/dnn.js.map +1 -1
- package/dist/esm-es5/index-e9a3fcad.js +3 -0
- package/dist/esm-es5/index-e9a3fcad.js.map +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/loader.js.map +1 -1
- package/dist/types/components.d.ts +73 -17
- package/dist/types/stencil-public-runtime.d.ts +15 -4
- package/loader/package.json +1 -0
- package/package.json +14 -14
- package/dist/cjs/index-514ef6dd.js.map +0 -1
- package/dist/dnn/p-3155c8a8.system.entry.js +0 -11
- package/dist/dnn/p-3155c8a8.system.entry.js.map +0 -1
- package/dist/dnn/p-7ffdbed1.js +0 -2
- package/dist/dnn/p-7ffdbed1.js.map +0 -1
- package/dist/dnn/p-909f2db9.entry.js.map +0 -1
- package/dist/dnn/p-b8064287.system.js +0 -2
- package/dist/dnn/p-b8064287.system.js.map +0 -1
- package/dist/esm/index-59e0950f.js.map +0 -1
- package/dist/esm-es5/index-59e0950f.js +0 -2
- package/dist/esm-es5/index-59e0950f.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Host, h } from '@stencil/core';
|
|
2
2
|
import { CornerType } from './CornerType';
|
|
3
3
|
import { getMovementFromEvent } from "../../utilities/mouseUtilities";
|
|
4
4
|
/**
|
|
@@ -380,144 +380,140 @@ export class DnnImageCropper {
|
|
|
380
380
|
return inside;
|
|
381
381
|
}
|
|
382
382
|
render() {
|
|
383
|
-
return (h(Host, { ref: el => this.host = el },
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
h("div", { class: "nw" }),
|
|
391
|
-
h("div", { class: "ne" }),
|
|
392
|
-
h("div", { class: "se" }),
|
|
393
|
-
h("div", { class: "sw" })))),
|
|
394
|
-
h("div", { class: "view", ref: el => this.noPictureView = el },
|
|
395
|
-
h("dnn-dropzone", { allowCameraMode: true, onFilesSelected: e => this.handleNewFile(e.detail[0]), resx: {
|
|
396
|
-
capture: this.resx.capture,
|
|
397
|
-
dragAndDropFile: this.resx.dragAndDropFile,
|
|
398
|
-
or: this.resx.or,
|
|
399
|
-
takePicture: this.resx.takePicture,
|
|
400
|
-
uploadFile: this.resx.uploadFile,
|
|
401
|
-
} })),
|
|
402
|
-
h("dnn-modal", { ref: el => this.imageTooSmallModal = el, "close-text": this.resx.modalCloseText },
|
|
403
|
-
h("p", null, this.resx.imageTooSmall.replace("{width}", this.width.toString()).replace("{height}", this.height.toString())))));
|
|
383
|
+
return (h(Host, { ref: el => this.host = el }, h("canvas", { ref: el => this.canvas = el }), h("div", { class: "view", ref: el => this.hasPictureView = el }, h("div", { class: "cropper" }, h("img", { ref: el => this.image = el }), h("div", { class: "backdrop" }), h("div", { class: "crop", ref: e => this.crop = e, onMouseDown: this.handleCropMouseDown, onTouchStart: this.handleCropMouseDown }, h("div", { class: "nw" }), h("div", { class: "ne" }), h("div", { class: "se" }), h("div", { class: "sw" })))), h("div", { class: "view", ref: el => this.noPictureView = el }, h("dnn-dropzone", { allowCameraMode: true, onFilesSelected: e => this.handleNewFile(e.detail[0]), resx: {
|
|
384
|
+
capture: this.resx.capture,
|
|
385
|
+
dragAndDropFile: this.resx.dragAndDropFile,
|
|
386
|
+
or: this.resx.or,
|
|
387
|
+
takePicture: this.resx.takePicture,
|
|
388
|
+
uploadFile: this.resx.uploadFile,
|
|
389
|
+
} })), h("dnn-modal", { ref: el => this.imageTooSmallModal = el, "close-text": this.resx.modalCloseText }, h("p", null, this.resx.imageTooSmall.replace("{width}", this.width.toString()).replace("{height}", this.height.toString())))));
|
|
404
390
|
}
|
|
405
391
|
static get is() { return "dnn-image-cropper"; }
|
|
406
392
|
static get encapsulation() { return "shadow"; }
|
|
407
|
-
static get originalStyleUrls() {
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
"
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
"original": "number",
|
|
437
|
-
"resolved": "number",
|
|
438
|
-
"references": {}
|
|
439
|
-
},
|
|
440
|
-
"required": false,
|
|
441
|
-
"optional": false,
|
|
442
|
-
"docs": {
|
|
443
|
-
"tags": [],
|
|
444
|
-
"text": "Sets the desired final image height."
|
|
445
|
-
},
|
|
446
|
-
"attribute": "height",
|
|
447
|
-
"reflect": false,
|
|
448
|
-
"defaultValue": "600"
|
|
449
|
-
},
|
|
450
|
-
"resx": {
|
|
451
|
-
"type": "unknown",
|
|
452
|
-
"mutable": false,
|
|
453
|
-
"complexType": {
|
|
454
|
-
"original": "{\n capture: string;\n dragAndDropFile: string;\n or: string;\n takePicture: string;\n uploadFile: string;\n imageTooSmall: string;\n modalCloseText: string;\n }",
|
|
455
|
-
"resolved": "{ capture: string; dragAndDropFile: string; or: string; takePicture: string; uploadFile: string; imageTooSmall: string; modalCloseText: string; }",
|
|
456
|
-
"references": {}
|
|
457
|
-
},
|
|
458
|
-
"required": false,
|
|
459
|
-
"optional": false,
|
|
460
|
-
"docs": {
|
|
461
|
-
"tags": [],
|
|
462
|
-
"text": "Can be used to customize controls text.\nSome values support tokens, see default values for examples."
|
|
463
|
-
},
|
|
464
|
-
"defaultValue": "{\n capture: \"Capture\",\n dragAndDropFile: \"Drag and drop an image\",\n or: \"or\",\n takePicture: \"Take a picture\",\n uploadFile: \"Upload an image\",\n imageTooSmall: \"The image you are attempting to upload does not meet the minimum size requirement of {width} pixels by {height} pixels. Please upload a larger image.\",\n modalCloseText: \"Close\",\n }"
|
|
465
|
-
},
|
|
466
|
-
"quality": {
|
|
467
|
-
"type": "number",
|
|
468
|
-
"mutable": false,
|
|
469
|
-
"complexType": {
|
|
470
|
-
"original": "number",
|
|
471
|
-
"resolved": "number",
|
|
472
|
-
"references": {}
|
|
473
|
-
},
|
|
474
|
-
"required": false,
|
|
475
|
-
"optional": false,
|
|
476
|
-
"docs": {
|
|
477
|
-
"tags": [],
|
|
478
|
-
"text": "Sets the output quality of the corpped image (number between 0 and 1)."
|
|
393
|
+
static get originalStyleUrls() {
|
|
394
|
+
return {
|
|
395
|
+
"$": ["dnn-image-cropper.scss"]
|
|
396
|
+
};
|
|
397
|
+
}
|
|
398
|
+
static get styleUrls() {
|
|
399
|
+
return {
|
|
400
|
+
"$": ["dnn-image-cropper.css"]
|
|
401
|
+
};
|
|
402
|
+
}
|
|
403
|
+
static get properties() {
|
|
404
|
+
return {
|
|
405
|
+
"width": {
|
|
406
|
+
"type": "number",
|
|
407
|
+
"mutable": false,
|
|
408
|
+
"complexType": {
|
|
409
|
+
"original": "number",
|
|
410
|
+
"resolved": "number",
|
|
411
|
+
"references": {}
|
|
412
|
+
},
|
|
413
|
+
"required": false,
|
|
414
|
+
"optional": false,
|
|
415
|
+
"docs": {
|
|
416
|
+
"tags": [],
|
|
417
|
+
"text": "Sets the desired final image width."
|
|
418
|
+
},
|
|
419
|
+
"attribute": "width",
|
|
420
|
+
"reflect": false,
|
|
421
|
+
"defaultValue": "600"
|
|
479
422
|
},
|
|
480
|
-
"
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
"
|
|
489
|
-
"
|
|
490
|
-
"
|
|
423
|
+
"height": {
|
|
424
|
+
"type": "number",
|
|
425
|
+
"mutable": false,
|
|
426
|
+
"complexType": {
|
|
427
|
+
"original": "number",
|
|
428
|
+
"resolved": "number",
|
|
429
|
+
"references": {}
|
|
430
|
+
},
|
|
431
|
+
"required": false,
|
|
432
|
+
"optional": false,
|
|
433
|
+
"docs": {
|
|
434
|
+
"tags": [],
|
|
435
|
+
"text": "Sets the desired final image height."
|
|
436
|
+
},
|
|
437
|
+
"attribute": "height",
|
|
438
|
+
"reflect": false,
|
|
439
|
+
"defaultValue": "600"
|
|
491
440
|
},
|
|
492
|
-
"
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
"
|
|
496
|
-
|
|
441
|
+
"resx": {
|
|
442
|
+
"type": "unknown",
|
|
443
|
+
"mutable": false,
|
|
444
|
+
"complexType": {
|
|
445
|
+
"original": "{\n capture: string;\n dragAndDropFile: string;\n or: string;\n takePicture: string;\n uploadFile: string;\n imageTooSmall: string;\n modalCloseText: string;\n }",
|
|
446
|
+
"resolved": "{ capture: string; dragAndDropFile: string; or: string; takePicture: string; uploadFile: string; imageTooSmall: string; modalCloseText: string; }",
|
|
447
|
+
"references": {}
|
|
448
|
+
},
|
|
449
|
+
"required": false,
|
|
450
|
+
"optional": false,
|
|
451
|
+
"docs": {
|
|
452
|
+
"tags": [],
|
|
453
|
+
"text": "Can be used to customize controls text.\nSome values support tokens, see default values for examples."
|
|
454
|
+
},
|
|
455
|
+
"defaultValue": "{\n capture: \"Capture\",\n dragAndDropFile: \"Drag and drop an image\",\n or: \"or\",\n takePicture: \"Take a picture\",\n uploadFile: \"Upload an image\",\n imageTooSmall: \"The image you are attempting to upload does not meet the minimum size requirement of {width} pixels by {height} pixels. Please upload a larger image.\",\n modalCloseText: \"Close\",\n }"
|
|
497
456
|
},
|
|
498
|
-
"
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
"
|
|
514
|
-
"
|
|
457
|
+
"quality": {
|
|
458
|
+
"type": "number",
|
|
459
|
+
"mutable": false,
|
|
460
|
+
"complexType": {
|
|
461
|
+
"original": "number",
|
|
462
|
+
"resolved": "number",
|
|
463
|
+
"references": {}
|
|
464
|
+
},
|
|
465
|
+
"required": false,
|
|
466
|
+
"optional": false,
|
|
467
|
+
"docs": {
|
|
468
|
+
"tags": [],
|
|
469
|
+
"text": "Sets the output quality of the corpped image (number between 0 and 1)."
|
|
470
|
+
},
|
|
471
|
+
"attribute": "quality",
|
|
472
|
+
"reflect": false,
|
|
473
|
+
"defaultValue": "0.8"
|
|
515
474
|
},
|
|
516
|
-
"
|
|
517
|
-
"
|
|
518
|
-
"
|
|
519
|
-
"
|
|
475
|
+
"preventUndersized": {
|
|
476
|
+
"type": "boolean",
|
|
477
|
+
"mutable": false,
|
|
478
|
+
"complexType": {
|
|
479
|
+
"original": "boolean",
|
|
480
|
+
"resolved": "boolean",
|
|
481
|
+
"references": {}
|
|
482
|
+
},
|
|
483
|
+
"required": false,
|
|
484
|
+
"optional": false,
|
|
485
|
+
"docs": {
|
|
486
|
+
"tags": [],
|
|
487
|
+
"text": "When set to true, prevents cropping an image smaller than the required size, which would blow pixel and make the final picture look blurry."
|
|
488
|
+
},
|
|
489
|
+
"attribute": "prevent-undersized",
|
|
490
|
+
"reflect": false,
|
|
491
|
+
"defaultValue": "false"
|
|
520
492
|
}
|
|
521
|
-
}
|
|
493
|
+
};
|
|
494
|
+
}
|
|
495
|
+
static get states() {
|
|
496
|
+
return {
|
|
497
|
+
"view": {}
|
|
498
|
+
};
|
|
499
|
+
}
|
|
500
|
+
static get events() {
|
|
501
|
+
return [{
|
|
502
|
+
"method": "imageCropChanged",
|
|
503
|
+
"name": "imageCropChanged",
|
|
504
|
+
"bubbles": true,
|
|
505
|
+
"cancelable": true,
|
|
506
|
+
"composed": true,
|
|
507
|
+
"docs": {
|
|
508
|
+
"tags": [],
|
|
509
|
+
"text": "When the image crop changes, emits the dataurl for the new cropped image."
|
|
510
|
+
},
|
|
511
|
+
"complexType": {
|
|
512
|
+
"original": "string",
|
|
513
|
+
"resolved": "string",
|
|
514
|
+
"references": {}
|
|
515
|
+
}
|
|
516
|
+
}];
|
|
517
|
+
}
|
|
522
518
|
}
|
|
523
|
-
//# sourceMappingURL=dnn-image-cropper.js.map
|
|
519
|
+
//# sourceMappingURL=dnn-image-cropper.js.map
|
|
@@ -34,6 +34,11 @@
|
|
|
34
34
|
box-shadow: 10px 10px 20px 0 rgba(0, 0, 0, 0.5);
|
|
35
35
|
display: block;
|
|
36
36
|
}
|
|
37
|
+
:host .overlay .modal .content {
|
|
38
|
+
max-width: 80vw;
|
|
39
|
+
max-height: 80vh;
|
|
40
|
+
overflow: auto;
|
|
41
|
+
}
|
|
37
42
|
:host .overlay .modal .close {
|
|
38
43
|
position: absolute;
|
|
39
44
|
background-color: white;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Host, h } from '@stencil/core';
|
|
2
2
|
export class DnnModal {
|
|
3
3
|
constructor() {
|
|
4
4
|
/**
|
|
@@ -44,148 +44,151 @@ export class DnnModal {
|
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
render() {
|
|
47
|
-
return (h(Host, null,
|
|
48
|
-
h("
|
|
49
|
-
h("div", { class: "modal" },
|
|
50
|
-
this.showCloseButton &&
|
|
51
|
-
h("button", { class: "close", "aria-label": this.closeText, onClick: () => this.handleDismiss() },
|
|
52
|
-
h("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#000000" },
|
|
53
|
-
h("path", { d: "M0 0h24v24H0z", fill: "none" }),
|
|
54
|
-
h("path", { d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z" }))),
|
|
55
|
-
h("slot", null)))));
|
|
47
|
+
return (h(Host, null, h("div", { id: "backdrop", class: this.visible ? 'overlay visible' : 'overlay', onClick: e => this.handleBackdropClick(e) }, h("div", { class: "modal" }, this.showCloseButton &&
|
|
48
|
+
h("button", { class: "close", "aria-label": this.closeText, onClick: () => this.handleDismiss() }, h("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#000000" }, h("path", { d: "M0 0h24v24H0z", fill: "none" }), h("path", { d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z" }))), h("div", { class: "content" }, h("slot", null))))));
|
|
56
49
|
}
|
|
57
50
|
static get is() { return "dnn-modal"; }
|
|
58
51
|
static get encapsulation() { return "shadow"; }
|
|
59
|
-
static get originalStyleUrls() {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
"
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
"original": "string",
|
|
89
|
-
"resolved": "string",
|
|
90
|
-
"references": {}
|
|
91
|
-
},
|
|
92
|
-
"required": false,
|
|
93
|
-
"optional": true,
|
|
94
|
-
"docs": {
|
|
95
|
-
"tags": [],
|
|
96
|
-
"text": "Optionally pass the aria-label text for the close button.\nDefaults to \"Close modal\" if not provided."
|
|
97
|
-
},
|
|
98
|
-
"attribute": "close-text",
|
|
99
|
-
"reflect": false,
|
|
100
|
-
"defaultValue": "\"Close modal\""
|
|
101
|
-
},
|
|
102
|
-
"showCloseButton": {
|
|
103
|
-
"type": "boolean",
|
|
104
|
-
"mutable": false,
|
|
105
|
-
"complexType": {
|
|
106
|
-
"original": "boolean",
|
|
107
|
-
"resolved": "boolean",
|
|
108
|
-
"references": {}
|
|
109
|
-
},
|
|
110
|
-
"required": false,
|
|
111
|
-
"optional": true,
|
|
112
|
-
"docs": {
|
|
113
|
-
"tags": [],
|
|
114
|
-
"text": "Optionally you can pass false to not show the close button.\nIf you decide to do so, you should either not also prevent dismissal by clicking the backdrop\nor provide your own dismissal logic in the modal content."
|
|
115
|
-
},
|
|
116
|
-
"attribute": "show-close-button",
|
|
117
|
-
"reflect": false,
|
|
118
|
-
"defaultValue": "true"
|
|
119
|
-
},
|
|
120
|
-
"visible": {
|
|
121
|
-
"type": "boolean",
|
|
122
|
-
"mutable": true,
|
|
123
|
-
"complexType": {
|
|
124
|
-
"original": "boolean",
|
|
125
|
-
"resolved": "boolean",
|
|
126
|
-
"references": {}
|
|
127
|
-
},
|
|
128
|
-
"required": false,
|
|
129
|
-
"optional": false,
|
|
130
|
-
"docs": {
|
|
131
|
-
"tags": [],
|
|
132
|
-
"text": "Reflects the visible state of the modal."
|
|
52
|
+
static get originalStyleUrls() {
|
|
53
|
+
return {
|
|
54
|
+
"$": ["dnn-modal.scss"]
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
static get styleUrls() {
|
|
58
|
+
return {
|
|
59
|
+
"$": ["dnn-modal.css"]
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
static get properties() {
|
|
63
|
+
return {
|
|
64
|
+
"backdropDismiss": {
|
|
65
|
+
"type": "boolean",
|
|
66
|
+
"mutable": false,
|
|
67
|
+
"complexType": {
|
|
68
|
+
"original": "boolean",
|
|
69
|
+
"resolved": "boolean",
|
|
70
|
+
"references": {}
|
|
71
|
+
},
|
|
72
|
+
"required": false,
|
|
73
|
+
"optional": false,
|
|
74
|
+
"docs": {
|
|
75
|
+
"tags": [],
|
|
76
|
+
"text": "Pass false to remove the backdrop click auto-dismiss feature."
|
|
77
|
+
},
|
|
78
|
+
"attribute": "backdrop-dismiss",
|
|
79
|
+
"reflect": false,
|
|
80
|
+
"defaultValue": "true"
|
|
133
81
|
},
|
|
134
|
-
"
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
82
|
+
"closeText": {
|
|
83
|
+
"type": "string",
|
|
84
|
+
"mutable": false,
|
|
85
|
+
"complexType": {
|
|
86
|
+
"original": "string",
|
|
87
|
+
"resolved": "string",
|
|
88
|
+
"references": {}
|
|
89
|
+
},
|
|
90
|
+
"required": false,
|
|
91
|
+
"optional": true,
|
|
92
|
+
"docs": {
|
|
93
|
+
"tags": [],
|
|
94
|
+
"text": "Optionally pass the aria-label text for the close button.\nDefaults to \"Close modal\" if not provided."
|
|
95
|
+
},
|
|
96
|
+
"attribute": "close-text",
|
|
97
|
+
"reflect": false,
|
|
98
|
+
"defaultValue": "\"Close modal\""
|
|
148
99
|
},
|
|
149
|
-
"
|
|
150
|
-
"
|
|
151
|
-
"
|
|
152
|
-
"
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
"show": {
|
|
157
|
-
"complexType": {
|
|
158
|
-
"signature": "() => Promise<void>",
|
|
159
|
-
"parameters": [],
|
|
160
|
-
"references": {
|
|
161
|
-
"Promise": {
|
|
162
|
-
"location": "global"
|
|
163
|
-
}
|
|
100
|
+
"showCloseButton": {
|
|
101
|
+
"type": "boolean",
|
|
102
|
+
"mutable": false,
|
|
103
|
+
"complexType": {
|
|
104
|
+
"original": "boolean",
|
|
105
|
+
"resolved": "boolean",
|
|
106
|
+
"references": {}
|
|
164
107
|
},
|
|
165
|
-
"
|
|
108
|
+
"required": false,
|
|
109
|
+
"optional": true,
|
|
110
|
+
"docs": {
|
|
111
|
+
"tags": [],
|
|
112
|
+
"text": "Optionally you can pass false to not show the close button.\nIf you decide to do so, you should either not also prevent dismissal by clicking the backdrop\nor provide your own dismissal logic in the modal content."
|
|
113
|
+
},
|
|
114
|
+
"attribute": "show-close-button",
|
|
115
|
+
"reflect": false,
|
|
116
|
+
"defaultValue": "true"
|
|
166
117
|
},
|
|
167
|
-
"
|
|
168
|
-
"
|
|
169
|
-
"
|
|
118
|
+
"visible": {
|
|
119
|
+
"type": "boolean",
|
|
120
|
+
"mutable": true,
|
|
121
|
+
"complexType": {
|
|
122
|
+
"original": "boolean",
|
|
123
|
+
"resolved": "boolean",
|
|
124
|
+
"references": {}
|
|
125
|
+
},
|
|
126
|
+
"required": false,
|
|
127
|
+
"optional": false,
|
|
128
|
+
"docs": {
|
|
129
|
+
"tags": [],
|
|
130
|
+
"text": "Reflects the visible state of the modal."
|
|
131
|
+
},
|
|
132
|
+
"attribute": "visible",
|
|
133
|
+
"reflect": true,
|
|
134
|
+
"defaultValue": "false"
|
|
170
135
|
}
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
"
|
|
176
|
-
"
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
static get events() {
|
|
139
|
+
return [{
|
|
140
|
+
"method": "dismissed",
|
|
141
|
+
"name": "dismissed",
|
|
142
|
+
"bubbles": true,
|
|
143
|
+
"cancelable": true,
|
|
144
|
+
"composed": true,
|
|
145
|
+
"docs": {
|
|
146
|
+
"tags": [],
|
|
147
|
+
"text": "Fires when the modal is dismissed."
|
|
148
|
+
},
|
|
149
|
+
"complexType": {
|
|
150
|
+
"original": "any",
|
|
151
|
+
"resolved": "any",
|
|
152
|
+
"references": {}
|
|
153
|
+
}
|
|
154
|
+
}];
|
|
155
|
+
}
|
|
156
|
+
static get methods() {
|
|
157
|
+
return {
|
|
158
|
+
"show": {
|
|
159
|
+
"complexType": {
|
|
160
|
+
"signature": "() => Promise<void>",
|
|
161
|
+
"parameters": [],
|
|
162
|
+
"references": {
|
|
163
|
+
"Promise": {
|
|
164
|
+
"location": "global"
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
"return": "Promise<void>"
|
|
180
168
|
},
|
|
181
|
-
"
|
|
169
|
+
"docs": {
|
|
170
|
+
"text": "Shows the modal",
|
|
171
|
+
"tags": []
|
|
172
|
+
}
|
|
182
173
|
},
|
|
183
|
-
"
|
|
184
|
-
"
|
|
185
|
-
|
|
174
|
+
"hide": {
|
|
175
|
+
"complexType": {
|
|
176
|
+
"signature": "() => Promise<void>",
|
|
177
|
+
"parameters": [],
|
|
178
|
+
"references": {
|
|
179
|
+
"Promise": {
|
|
180
|
+
"location": "global"
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
"return": "Promise<void>"
|
|
184
|
+
},
|
|
185
|
+
"docs": {
|
|
186
|
+
"text": "Hides the modal",
|
|
187
|
+
"tags": []
|
|
188
|
+
}
|
|
186
189
|
}
|
|
187
|
-
}
|
|
188
|
-
}
|
|
190
|
+
};
|
|
191
|
+
}
|
|
189
192
|
static get elementRef() { return "el"; }
|
|
190
193
|
}
|
|
191
|
-
//# sourceMappingURL=dnn-modal.js.map
|
|
194
|
+
//# sourceMappingURL=dnn-modal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dnn-modal.js","sourceRoot":"","sources":["../../../src/components/dnn-modal/dnn-modal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAgB,MAAM,EAAE,MAAM,eAAe,CAAC;AAO/F,MAAM,OAAO,QAAQ;EALrB;IASE;;OAEG;IACK,oBAAe,GAAY,IAAI,CAAC;IAExC;;;OAGG;IACK,cAAS,GAAY,aAAa,CAAC;IAE3C;;;;OAIG;IACK,oBAAe,GAAa,IAAI,CAAC;IAEzC;;OAEG;IACmC,YAAO,GAAY,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"dnn-modal.js","sourceRoot":"","sources":["../../../src/components/dnn-modal/dnn-modal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAgB,MAAM,EAAE,MAAM,eAAe,CAAC;AAO/F,MAAM,OAAO,QAAQ;EALrB;IASE;;OAEG;IACK,oBAAe,GAAY,IAAI,CAAC;IAExC;;;OAGG;IACK,cAAS,GAAY,aAAa,CAAC;IAE3C;;;;OAIG;IACK,oBAAe,GAAa,IAAI,CAAC;IAEzC;;OAEG;IACmC,YAAO,GAAY,KAAK,CAAC;GA4DhE;EA1DC;;KAEG;EAEH,KAAK,CAAC,IAAI;IACR,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;EACtB,CAAC;EAED;;KAEG;EAEH,KAAK,CAAC,IAAI;IACR,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;EACvB,CAAC;EAOO,aAAa;IACnB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;IACrB,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;EACxB,CAAC;EAEO,mBAAmB,CAAC,CAAa;IACvC,MAAM,OAAO,GAAI,CAAC,CAAC,MAAsB,CAAC;IAC1C,IAAI,OAAO,CAAC,EAAE,KAAK,UAAU,IAAI,IAAI,CAAC,eAAe,EAAC;MACpD,IAAI,CAAC,aAAa,EAAE,CAAC;KACtB;EACH,CAAC;EAED,MAAM;IACJ,OAAO,CACL,EAAC,IAAI;MACH,WAAK,EAAE,EAAC,UAAU,EAChB,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,SAAS,EACnD,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC,CAAC;QAEzC,WAAK,KAAK,EAAC,OAAO;UACf,IAAI,CAAC,eAAe;YACnB,cACE,KAAK,EAAC,OAAO,gBACD,IAAI,CAAC,SAAS,EAC1B,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,aAAa,EAAE;cAEnC,WAAK,KAAK,EAAC,4BAA4B,EAAC,MAAM,EAAC,MAAM,EAAC,OAAO,EAAC,WAAW,EAAC,KAAK,EAAC,MAAM,EAAC,IAAI,EAAC,SAAS;gBAAC,YAAM,CAAC,EAAC,eAAe,EAAC,IAAI,EAAC,MAAM,GAAE;gBAAA,YAAM,CAAC,EAAC,iLAAiL,GAAE,CAAM,CACrU;UAEX,WAAK,KAAK,EAAC,SAAS;YAClB,eAAa,CACT,CACF,CACF,CACD,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Host, h, Prop, Event, EventEmitter, Method } from '@stencil/core';\n\n@Component({\n tag: 'dnn-modal',\n styleUrl: 'dnn-modal.scss',\n shadow: true\n})\nexport class DnnModal {\n \n @Element() el!: HTMLDnnModalElement;\n \n /**\n * Pass false to remove the backdrop click auto-dismiss feature.\n */\n @Prop() backdropDismiss: boolean = true;\n\n /**\n * Optionally pass the aria-label text for the close button.\n * Defaults to \"Close modal\" if not provided.\n */\n @Prop() closeText?: string = \"Close modal\";\n\n /**\n * Optionally you can pass false to not show the close button.\n * If you decide to do so, you should either not also prevent dismissal by clicking the backdrop\n * or provide your own dismissal logic in the modal content.\n */\n @Prop() showCloseButton?: boolean = true;\n\n /**\n * Reflects the visible state of the modal.\n */\n @Prop({mutable: true, reflect: true}) visible: boolean = false;\n\n /**\n * Shows the modal\n */\n @Method()\n async show() {\n this.visible = true;\n }\n\n /**\n * Hides the modal\n */\n @Method()\n async hide() {\n this.visible = false;\n }\n\n /**\n * Fires when the modal is dismissed.\n */\n @Event() dismissed!: EventEmitter;\n\n private handleDismiss(){\n this.visible = false;\n this.dismissed.emit();\n }\n\n private handleBackdropClick(e: MouseEvent): void {\n const element = (e.target as HTMLElement);\n if (element.id === \"backdrop\" && this.backdropDismiss){\n this.handleDismiss();\n }\n }\n\n render() {\n return (\n <Host>\n <div id=\"backdrop\"\n class={this.visible ? 'overlay visible' : 'overlay'}\n onClick={e => this.handleBackdropClick(e)}\n >\n <div class=\"modal\">\n {this.showCloseButton &&\n <button\n class=\"close\"\n aria-label={this.closeText}\n onClick={() => this.handleDismiss()}\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 0 24 24\" width=\"24px\" fill=\"#000000\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z\"/></svg>\n </button>\n }\n <div class=\"content\">\n <slot></slot>\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"]}
|