@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.
Files changed (102) hide show
  1. package/dist/cjs/dnn-button_17.cjs.entry.js +3 -3
  2. package/dist/cjs/dnn-button_17.cjs.entry.js.map +1 -1
  3. package/dist/cjs/dnn.cjs.js +2 -2
  4. package/dist/cjs/dnn.cjs.js.map +1 -1
  5. package/dist/cjs/{index-514ef6dd.js → index-81382452.js} +404 -239
  6. package/dist/cjs/index-81382452.js.map +1 -0
  7. package/dist/cjs/loader.cjs.js +2 -2
  8. package/dist/cjs/loader.cjs.js.map +1 -1
  9. package/dist/collection/collection-manifest.json +2 -2
  10. package/dist/collection/components/dnn-button/dnn-button.js +195 -192
  11. package/dist/collection/components/dnn-button/dnn-button.stories.js +1 -1
  12. package/dist/collection/components/dnn-checkbox/dnn-checkbox.js +85 -99
  13. package/dist/collection/components/dnn-checkbox/dnn-checkbox.stories.js +1 -1
  14. package/dist/collection/components/dnn-chevron/dnn-chevron.js +92 -87
  15. package/dist/collection/components/dnn-chevron/dnn-chevron.stories.js +1 -1
  16. package/dist/collection/components/dnn-collapsible/dnn-collapsible.js +102 -90
  17. package/dist/collection/components/dnn-collapsible/dnn-collapsible.stories.js +1 -1
  18. package/dist/collection/components/dnn-color-picker/dnn-color-picker.js +105 -141
  19. package/dist/collection/components/dnn-color-picker/dnn-color-picker.stories.js +1 -1
  20. package/dist/collection/components/dnn-dropzone/dnn-dropzone.js +122 -137
  21. package/dist/collection/components/dnn-dropzone/dnn-dropzone.stories.js +1 -1
  22. package/dist/collection/components/dnn-image-cropper/CornerType.js +1 -1
  23. package/dist/collection/components/dnn-image-cropper/dnn-image-cropper.js +129 -133
  24. package/dist/collection/components/dnn-image-cropper/dnn-image-cropper.stories.js +1 -1
  25. package/dist/collection/components/dnn-modal/dnn-modal.css +5 -0
  26. package/dist/collection/components/dnn-modal/dnn-modal.js +136 -133
  27. package/dist/collection/components/dnn-modal/dnn-modal.js.map +1 -1
  28. package/dist/collection/components/dnn-modal/dnn-modal.stories.js +1 -1
  29. package/dist/collection/components/dnn-permissions-grid/dnn-permissions-grid.js +164 -223
  30. package/dist/collection/components/dnn-permissions-grid/dnn-permissions-grid.stories.js +1 -1
  31. package/dist/collection/components/dnn-permissions-grid/localization-interface.js +1 -1
  32. package/dist/collection/components/dnn-permissions-grid/permissions-interface.js +1 -1
  33. package/dist/collection/components/dnn-permissions-grid/role-group-interface.js +1 -1
  34. package/dist/collection/components/dnn-permissions-grid/role-interface.js +1 -1
  35. package/dist/collection/components/dnn-permissions-grid/searched-user-interface.js +1 -1
  36. package/dist/collection/components/dnn-searchbox/dnn-searchbox.js +101 -94
  37. package/dist/collection/components/dnn-searchbox/dnn-searchbox.stories.js +1 -1
  38. package/dist/collection/components/dnn-sort-icon/dnn-sort-icon.js +55 -54
  39. package/dist/collection/components/dnn-sort-icon/dnn-sort-icon.stories.js +1 -1
  40. package/dist/collection/components/dnn-tab/dnn-tab.js +69 -59
  41. package/dist/collection/components/dnn-tab/dnn-tab.stories.js +1 -1
  42. package/dist/collection/components/dnn-tabs/dnn-tabs.js +19 -16
  43. package/dist/collection/components/dnn-tabs/dnn-tabs.stories.js +1 -1
  44. package/dist/collection/components/dnn-toggle/dnn-toggle.js +83 -75
  45. package/dist/collection/components/dnn-toggle/dnn-toggle.stories.js +1 -1
  46. package/dist/collection/components/dnn-toggle/toggle-interface.js +1 -1
  47. package/dist/collection/components/dnn-treeview-item/dnn-treeview-item.js +79 -77
  48. package/dist/collection/components/dnn-treeview-item/dnn-treeview-item.stories.js +1 -1
  49. package/dist/collection/components/dnn-vertical-overflow-menu/dnn-vertical-overflow-menu.js +20 -24
  50. package/dist/collection/components/dnn-vertical-overflow-menu/dnn-vertical-overflow-menu.stories.js +1 -1
  51. package/dist/collection/components/dnn-vertical-splitview/dnn-vertical-splitview.js +117 -111
  52. package/dist/collection/components/dnn-vertical-splitview/dnn-vertical-splitview.stories.js +1 -1
  53. package/dist/collection/index.js +1 -1
  54. package/dist/collection/utilities/colorInfo.js +1 -1
  55. package/dist/collection/utilities/debounce.js +1 -1
  56. package/dist/collection/utilities/dnnServicesFramework.js +1 -1
  57. package/dist/collection/utilities/mouseUtilities.js +1 -1
  58. package/dist/dnn/dnn.esm.js +1 -1
  59. package/dist/dnn/dnn.esm.js.map +1 -1
  60. package/dist/dnn/dnn.js +2 -1
  61. package/dist/dnn/p-21f18e37.system.js +3 -0
  62. package/dist/dnn/p-21f18e37.system.js.map +1 -0
  63. package/dist/dnn/p-2a79ad5b.system.entry.js +11 -0
  64. package/dist/dnn/p-2a79ad5b.system.entry.js.map +1 -0
  65. package/dist/dnn/{p-5bcf3629.system.js → p-52139080.system.js} +2 -2
  66. package/dist/dnn/{p-5bcf3629.system.js.map → p-52139080.system.js.map} +1 -1
  67. package/dist/dnn/{p-909f2db9.entry.js → p-6cc227ab.entry.js} +3 -3
  68. package/dist/dnn/p-6cc227ab.entry.js.map +1 -0
  69. package/dist/dnn/p-97d752ed.js +3 -0
  70. package/dist/dnn/p-97d752ed.js.map +1 -0
  71. package/dist/esm/dnn-button_17.entry.js +3 -3
  72. package/dist/esm/dnn-button_17.entry.js.map +1 -1
  73. package/dist/esm/dnn.js +2 -2
  74. package/dist/esm/dnn.js.map +1 -1
  75. package/dist/esm/{index-59e0950f.js → index-e9a3fcad.js} +404 -239
  76. package/dist/esm/index-e9a3fcad.js.map +1 -0
  77. package/dist/esm/loader.js +2 -2
  78. package/dist/esm/loader.js.map +1 -1
  79. package/dist/esm/polyfills/css-shim.js +1 -1
  80. package/dist/esm-es5/dnn-button_17.entry.js +2 -2
  81. package/dist/esm-es5/dnn-button_17.entry.js.map +1 -1
  82. package/dist/esm-es5/dnn.js +1 -1
  83. package/dist/esm-es5/dnn.js.map +1 -1
  84. package/dist/esm-es5/index-e9a3fcad.js +3 -0
  85. package/dist/esm-es5/index-e9a3fcad.js.map +1 -0
  86. package/dist/esm-es5/loader.js +1 -1
  87. package/dist/esm-es5/loader.js.map +1 -1
  88. package/dist/types/components.d.ts +73 -17
  89. package/dist/types/stencil-public-runtime.d.ts +15 -4
  90. package/loader/package.json +1 -0
  91. package/package.json +14 -14
  92. package/dist/cjs/index-514ef6dd.js.map +0 -1
  93. package/dist/dnn/p-3155c8a8.system.entry.js +0 -11
  94. package/dist/dnn/p-3155c8a8.system.entry.js.map +0 -1
  95. package/dist/dnn/p-7ffdbed1.js +0 -2
  96. package/dist/dnn/p-7ffdbed1.js.map +0 -1
  97. package/dist/dnn/p-909f2db9.entry.js.map +0 -1
  98. package/dist/dnn/p-b8064287.system.js +0 -2
  99. package/dist/dnn/p-b8064287.system.js.map +0 -1
  100. package/dist/esm/index-59e0950f.js.map +0 -1
  101. package/dist/esm-es5/index-59e0950f.js +0 -2
  102. package/dist/esm-es5/index-59e0950f.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import { Component, Host, h, State, Prop, Event } from '@stencil/core';
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
- h("canvas", { ref: el => this.canvas = el }),
385
- h("div", { class: "view", ref: el => this.hasPictureView = el },
386
- h("div", { class: "cropper" },
387
- h("img", { ref: el => this.image = el }),
388
- h("div", { class: "backdrop" }),
389
- h("div", { class: "crop", ref: e => this.crop = e, onMouseDown: this.handleCropMouseDown, onTouchStart: this.handleCropMouseDown },
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() { return {
408
- "$": ["dnn-image-cropper.scss"]
409
- }; }
410
- static get styleUrls() { return {
411
- "$": ["dnn-image-cropper.css"]
412
- }; }
413
- static get properties() { return {
414
- "width": {
415
- "type": "number",
416
- "mutable": false,
417
- "complexType": {
418
- "original": "number",
419
- "resolved": "number",
420
- "references": {}
421
- },
422
- "required": false,
423
- "optional": false,
424
- "docs": {
425
- "tags": [],
426
- "text": "Sets the desired final image width."
427
- },
428
- "attribute": "width",
429
- "reflect": false,
430
- "defaultValue": "600"
431
- },
432
- "height": {
433
- "type": "number",
434
- "mutable": false,
435
- "complexType": {
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
- "attribute": "quality",
481
- "reflect": false,
482
- "defaultValue": "0.8"
483
- },
484
- "preventUndersized": {
485
- "type": "boolean",
486
- "mutable": false,
487
- "complexType": {
488
- "original": "boolean",
489
- "resolved": "boolean",
490
- "references": {}
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
- "required": false,
493
- "optional": false,
494
- "docs": {
495
- "tags": [],
496
- "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."
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
- "attribute": "prevent-undersized",
499
- "reflect": false,
500
- "defaultValue": "false"
501
- }
502
- }; }
503
- static get states() { return {
504
- "view": {}
505
- }; }
506
- static get events() { return [{
507
- "method": "imageCropChanged",
508
- "name": "imageCropChanged",
509
- "bubbles": true,
510
- "cancelable": true,
511
- "composed": true,
512
- "docs": {
513
- "tags": [],
514
- "text": "When the image crop changes, emits the dataurl for the new cropped image."
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
- "complexType": {
517
- "original": "string",
518
- "resolved": "string",
519
- "references": {}
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
@@ -57,4 +57,4 @@ ImageCropper.args = {
57
57
  preventUndersized: false,
58
58
  resx,
59
59
  };
60
- //# sourceMappingURL=dnn-image-cropper.stories.js.map
60
+ //# sourceMappingURL=dnn-image-cropper.stories.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 { Component, Element, Host, h, Prop, Event, Method } from '@stencil/core';
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("div", { id: "backdrop", class: this.visible ? 'overlay visible' : 'overlay', onClick: e => this.handleBackdropClick(e) },
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() { return {
60
- "$": ["dnn-modal.scss"]
61
- }; }
62
- static get styleUrls() { return {
63
- "$": ["dnn-modal.css"]
64
- }; }
65
- static get properties() { return {
66
- "backdropDismiss": {
67
- "type": "boolean",
68
- "mutable": false,
69
- "complexType": {
70
- "original": "boolean",
71
- "resolved": "boolean",
72
- "references": {}
73
- },
74
- "required": false,
75
- "optional": false,
76
- "docs": {
77
- "tags": [],
78
- "text": "Pass false to remove the backdrop click auto-dismiss feature."
79
- },
80
- "attribute": "backdrop-dismiss",
81
- "reflect": false,
82
- "defaultValue": "true"
83
- },
84
- "closeText": {
85
- "type": "string",
86
- "mutable": false,
87
- "complexType": {
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
- "attribute": "visible",
135
- "reflect": true,
136
- "defaultValue": "false"
137
- }
138
- }; }
139
- static get events() { 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."
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
- "complexType": {
150
- "original": "any",
151
- "resolved": "any",
152
- "references": {}
153
- }
154
- }]; }
155
- static get methods() { return {
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
- "return": "Promise<void>"
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
- "docs": {
168
- "text": "Shows the modal",
169
- "tags": []
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
- "hide": {
173
- "complexType": {
174
- "signature": "() => Promise<void>",
175
- "parameters": [],
176
- "references": {
177
- "Promise": {
178
- "location": "global"
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
- "return": "Promise<void>"
169
+ "docs": {
170
+ "text": "Shows the modal",
171
+ "tags": []
172
+ }
182
173
  },
183
- "docs": {
184
- "text": "Hides the modal",
185
- "tags": []
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;GA0DhE;EAxDC;;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,eAAa,CACT,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 <slot></slot>\n </div>\n </div>\n </Host>\n );\n }\n}\n"]}
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"]}
@@ -44,4 +44,4 @@ Modal.args = {
44
44
  slot: `<h1>Welcome to the DNN Modal</h1>
45
45
  <p>This is a modal component that can be used to display content to the user.</p>`
46
46
  };
47
- //# sourceMappingURL=dnn-modal.stories.js.map
47
+ //# sourceMappingURL=dnn-modal.stories.js.map