@zanichelli/albe-web-components 15.0.1-RC → 15.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (160) hide show
  1. package/CHANGELOG.md +3 -1
  2. package/dist/cjs/index-5dc4a8de.js +10 -2
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/{utils-f5f944ed.js → utils-2b313a8e.js} +1 -1
  5. package/dist/cjs/{utils-f5f944ed.js.map → utils-2b313a8e.js.map} +1 -1
  6. package/dist/cjs/web-components-library.cjs.js +1 -1
  7. package/dist/cjs/{z-app-header_15.cjs.entry.js → z-app-header_12.cjs.entry.js} +17 -1236
  8. package/dist/cjs/z-app-header_12.cjs.entry.js.map +1 -0
  9. package/dist/cjs/z-date-picker.cjs.entry.js +1 -1
  10. package/dist/cjs/z-dragdrop-area_2.cjs.entry.js +1033 -0
  11. package/dist/cjs/z-dragdrop-area_2.cjs.entry.js.map +1 -0
  12. package/dist/cjs/z-file-upload.cjs.entry.js +215 -0
  13. package/dist/cjs/z-file-upload.cjs.entry.js.map +1 -0
  14. package/dist/cjs/z-range-picker.cjs.entry.js +1 -1
  15. package/dist/cjs/z-stepper.cjs.entry.js +1 -1
  16. package/dist/cjs/z-stepper.cjs.entry.js.map +1 -1
  17. package/dist/collection/components/z-modal/index.js +13 -4
  18. package/dist/collection/components/z-modal/index.js.map +1 -1
  19. package/dist/collection/components/z-modal/styles.css +12 -19
  20. package/dist/collection/components/z-stepper/index.js +2 -2
  21. package/dist/collection/components/z-stepper/index.js.map +1 -1
  22. package/dist/collection/components/z-stepper/index.stories.js +44 -3
  23. package/dist/collection/components/z-stepper/index.stories.js.map +1 -1
  24. package/dist/collection/components/z-stepper-item/index.stories.js +44 -19
  25. package/dist/collection/components/z-stepper-item/index.stories.js.map +1 -1
  26. package/dist/collection/components/z-tag/index.stories.js +11 -7
  27. package/dist/collection/components/z-tag/index.stories.js.map +1 -1
  28. package/dist/components/index15.js +14 -5
  29. package/dist/components/index15.js.map +1 -1
  30. package/dist/components/z-stepper.js +1 -1
  31. package/dist/components/z-stepper.js.map +1 -1
  32. package/dist/esm/index-ab5f1eaa.js +10 -2
  33. package/dist/esm/loader.js +1 -1
  34. package/dist/esm/{utils-ba4f0770.js → utils-cd008fbc.js} +1 -1
  35. package/dist/esm/{utils-ba4f0770.js.map → utils-cd008fbc.js.map} +1 -1
  36. package/dist/esm/web-components-library.js +1 -1
  37. package/dist/esm/{z-app-header_15.entry.js → z-app-header_12.entry.js} +20 -1236
  38. package/dist/esm/z-app-header_12.entry.js.map +1 -0
  39. package/dist/esm/z-date-picker.entry.js +1 -1
  40. package/dist/esm/z-dragdrop-area_2.entry.js +1028 -0
  41. package/dist/esm/z-dragdrop-area_2.entry.js.map +1 -0
  42. package/dist/esm/z-file-upload.entry.js +211 -0
  43. package/dist/esm/z-file-upload.entry.js.map +1 -0
  44. package/dist/esm/z-range-picker.entry.js +1 -1
  45. package/dist/esm/z-stepper.entry.js +1 -1
  46. package/dist/esm/z-stepper.entry.js.map +1 -1
  47. package/dist/esm-es5/index-ab5f1eaa.js +1 -1
  48. package/dist/esm-es5/index-ab5f1eaa.js.map +1 -1
  49. package/dist/esm-es5/loader.js +1 -1
  50. package/dist/esm-es5/loader.js.map +1 -1
  51. package/dist/esm-es5/{utils-ba4f0770.js → utils-cd008fbc.js} +1 -1
  52. package/dist/esm-es5/web-components-library.js +1 -1
  53. package/dist/esm-es5/web-components-library.js.map +1 -1
  54. package/dist/esm-es5/z-app-header_12.entry.js +2 -0
  55. package/dist/esm-es5/z-app-header_12.entry.js.map +1 -0
  56. package/dist/esm-es5/z-date-picker.entry.js +1 -1
  57. package/dist/esm-es5/z-dragdrop-area_2.entry.js +2 -0
  58. package/dist/esm-es5/z-dragdrop-area_2.entry.js.map +1 -0
  59. package/dist/esm-es5/z-file-upload.entry.js +2 -0
  60. package/dist/esm-es5/z-file-upload.entry.js.map +1 -0
  61. package/dist/esm-es5/z-range-picker.entry.js +1 -1
  62. package/dist/esm-es5/z-stepper.entry.js +1 -1
  63. package/dist/esm-es5/z-stepper.entry.js.map +1 -1
  64. package/dist/types/components/z-modal/index.d.ts +1 -0
  65. package/dist/types/components/z-stepper/index.d.ts +1 -1
  66. package/dist/types/components/z-stepper/index.stories.d.ts +6 -0
  67. package/dist/types/components/z-stepper-item/index.stories.d.ts +22 -9
  68. package/dist/types/components/z-tag/index.stories.d.ts +6 -2
  69. package/dist/web-components-library/p-05827ca5.entry.js +2 -0
  70. package/dist/web-components-library/{p-8f28871c.entry.js.map → p-05827ca5.entry.js.map} +1 -1
  71. package/dist/web-components-library/{p-3b801ea6.entry.js → p-0e342fa3.entry.js} +2 -2
  72. package/dist/web-components-library/{p-fb6c02f1.entry.js → p-114088a1.entry.js} +2 -2
  73. package/dist/web-components-library/p-1c06a6eb.entry.js +2 -0
  74. package/dist/web-components-library/p-1c06a6eb.entry.js.map +1 -0
  75. package/dist/web-components-library/p-2c986164.system.entry.js +2 -0
  76. package/dist/web-components-library/p-2c986164.system.entry.js.map +1 -0
  77. package/{www/build/p-7519c72d.system.entry.js → dist/web-components-library/p-2dd2d037.system.entry.js} +2 -2
  78. package/{www/build/p-662c8342.js → dist/web-components-library/p-49a35cf0.js} +1 -1
  79. package/dist/web-components-library/p-52290ecc.entry.js +2 -0
  80. package/dist/web-components-library/p-52290ecc.entry.js.map +1 -0
  81. package/dist/web-components-library/p-59e53e9f.system.entry.js +2 -0
  82. package/dist/web-components-library/p-59e53e9f.system.entry.js.map +1 -0
  83. package/{www/build/p-461cf578.system.entry.js → dist/web-components-library/p-751c58e2.system.entry.js} +2 -2
  84. package/dist/web-components-library/p-76765071.entry.js +2 -0
  85. package/dist/web-components-library/p-76765071.entry.js.map +1 -0
  86. package/dist/web-components-library/{p-dead4830.system.js → p-7dd29d4d.system.js} +1 -1
  87. package/dist/web-components-library/{p-eea9f7fd.system.entry.js → p-9551ea7a.system.entry.js} +2 -2
  88. package/dist/web-components-library/{p-eea9f7fd.system.entry.js.map → p-9551ea7a.system.entry.js.map} +1 -1
  89. package/dist/web-components-library/p-a72b8ae4.system.entry.js +2 -0
  90. package/dist/web-components-library/p-a72b8ae4.system.entry.js.map +1 -0
  91. package/dist/web-components-library/p-f530271b.system.js +1 -1
  92. package/dist/web-components-library/p-f530271b.system.js.map +1 -1
  93. package/dist/web-components-library/web-components-library.css +4 -3
  94. package/dist/web-components-library/web-components-library.esm.js +1 -1
  95. package/dist/web-components-library/web-components-library.esm.js.map +1 -1
  96. package/package.json +1 -1
  97. package/www/build/p-05827ca5.entry.js +2 -0
  98. package/www/build/{p-8f28871c.entry.js.map → p-05827ca5.entry.js.map} +1 -1
  99. package/www/build/{p-3b801ea6.entry.js → p-0e342fa3.entry.js} +2 -2
  100. package/www/build/p-10319f46.js +2 -0
  101. package/www/build/{p-fb6c02f1.entry.js → p-114088a1.entry.js} +2 -2
  102. package/www/build/p-1c06a6eb.entry.js +2 -0
  103. package/www/build/p-1c06a6eb.entry.js.map +1 -0
  104. package/www/build/p-2c986164.system.entry.js +2 -0
  105. package/www/build/p-2c986164.system.entry.js.map +1 -0
  106. package/{dist/web-components-library/p-7519c72d.system.entry.js → www/build/p-2dd2d037.system.entry.js} +2 -2
  107. package/{dist/web-components-library/p-662c8342.js → www/build/p-49a35cf0.js} +1 -1
  108. package/www/build/p-52290ecc.entry.js +2 -0
  109. package/www/build/p-52290ecc.entry.js.map +1 -0
  110. package/www/build/p-59e53e9f.system.entry.js +2 -0
  111. package/www/build/p-59e53e9f.system.entry.js.map +1 -0
  112. package/{dist/web-components-library/p-461cf578.system.entry.js → www/build/p-751c58e2.system.entry.js} +2 -2
  113. package/www/build/p-76765071.entry.js +2 -0
  114. package/www/build/p-76765071.entry.js.map +1 -0
  115. package/www/build/{p-dead4830.system.js → p-7dd29d4d.system.js} +1 -1
  116. package/www/build/p-8a6eba90.css +4 -0
  117. package/www/build/{p-eea9f7fd.system.entry.js → p-9551ea7a.system.entry.js} +2 -2
  118. package/www/build/{p-eea9f7fd.system.entry.js.map → p-9551ea7a.system.entry.js.map} +1 -1
  119. package/www/build/p-a72b8ae4.system.entry.js +2 -0
  120. package/www/build/p-a72b8ae4.system.entry.js.map +1 -0
  121. package/www/build/p-f530271b.system.js +1 -1
  122. package/www/build/p-f530271b.system.js.map +1 -1
  123. package/www/build/web-components-library.css +4 -3
  124. package/www/build/web-components-library.esm.js +1 -1
  125. package/www/build/web-components-library.esm.js.map +1 -1
  126. package/www/index.html +1 -11
  127. package/dist/cjs/z-app-header_15.cjs.entry.js.map +0 -1
  128. package/dist/esm/z-app-header_15.entry.js.map +0 -1
  129. package/dist/esm-es5/z-app-header_15.entry.js +0 -2
  130. package/dist/esm-es5/z-app-header_15.entry.js.map +0 -1
  131. package/dist/web-components-library/p-3cd2a911.system.entry.js +0 -2
  132. package/dist/web-components-library/p-3cd2a911.system.entry.js.map +0 -1
  133. package/dist/web-components-library/p-8f28871c.entry.js +0 -2
  134. package/dist/web-components-library/p-b6aa9719.entry.js +0 -2
  135. package/dist/web-components-library/p-b6aa9719.entry.js.map +0 -1
  136. package/www/build/p-3cd2a911.system.entry.js +0 -2
  137. package/www/build/p-3cd2a911.system.entry.js.map +0 -1
  138. package/www/build/p-6232f1d4.css +0 -3
  139. package/www/build/p-8f28871c.entry.js +0 -2
  140. package/www/build/p-b6aa9719.entry.js +0 -2
  141. package/www/build/p-b6aa9719.entry.js.map +0 -1
  142. package/www/build/p-c94a3f4f.js +0 -2
  143. /package/dist/esm-es5/{utils-ba4f0770.js.map → utils-cd008fbc.js.map} +0 -0
  144. /package/dist/types/home/{veronica/zanichelli/ds → runner/work/design-system}/design-system/.stencil/.storybook/elements/args-controls.d.ts +0 -0
  145. /package/dist/types/home/{veronica/zanichelli/ds → runner/work/design-system}/design-system/.stencil/.storybook/elements/docs-template.d.ts +0 -0
  146. /package/dist/types/home/{veronica/zanichelli/ds → runner/work/design-system}/design-system/.stencil/docs/grid/index.stories.d.ts +0 -0
  147. /package/dist/types/home/{veronica/zanichelli/ds → runner/work/design-system}/design-system/.stencil/docs/iconset/index.stories.d.ts +0 -0
  148. /package/dist/types/home/{veronica/zanichelli/ds → runner/work/design-system}/design-system/.stencil/docs/themes/index.stories.d.ts +0 -0
  149. /package/dist/web-components-library/{p-3b801ea6.entry.js.map → p-0e342fa3.entry.js.map} +0 -0
  150. /package/dist/web-components-library/{p-fb6c02f1.entry.js.map → p-114088a1.entry.js.map} +0 -0
  151. /package/dist/web-components-library/{p-7519c72d.system.entry.js.map → p-2dd2d037.system.entry.js.map} +0 -0
  152. /package/dist/web-components-library/{p-662c8342.js.map → p-49a35cf0.js.map} +0 -0
  153. /package/dist/web-components-library/{p-461cf578.system.entry.js.map → p-751c58e2.system.entry.js.map} +0 -0
  154. /package/dist/web-components-library/{p-dead4830.system.js.map → p-7dd29d4d.system.js.map} +0 -0
  155. /package/www/build/{p-3b801ea6.entry.js.map → p-0e342fa3.entry.js.map} +0 -0
  156. /package/www/build/{p-fb6c02f1.entry.js.map → p-114088a1.entry.js.map} +0 -0
  157. /package/www/build/{p-7519c72d.system.entry.js.map → p-2dd2d037.system.entry.js.map} +0 -0
  158. /package/www/build/{p-662c8342.js.map → p-49a35cf0.js.map} +0 -0
  159. /package/www/build/{p-461cf578.system.entry.js.map → p-751c58e2.system.entry.js.map} +0 -0
  160. /package/www/build/{p-dead4830.system.js.map → p-7dd29d4d.system.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/z-modal/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,EAAC,MAAM,eAAe,CAAC;AAC/F,OAAO,cAAc,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAC,YAAY,EAAC,MAAM,aAAa,CAAC;AAEzC,MAAM,2BAA2B,GAC/B,oMAAoM,CAAC;AAEvM;;;GAGG;AA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,IAAI,CAAC,IAAI,CAAC;oBACpD;wBACG,IAAI,CAAC,UAAU,IAAI,2DAAI,EAAE,EAAC,aAAa,IAAE,IAAI,CAAC,UAAU,CAAM;wBAC9D,IAAI,CAAC,eAAe,EAAE,CACnB;oBACL,IAAI,CAAC,aAAa,IAAI,CACrB,4DACE,KAAK,EAAC,UAAU,EAChB,EAAE,EAAC,gBAAgB,IAElB,IAAI,CAAC,aAAa,CACf,CACP,CACM;gBAET,4DACE,KAAK,EAAE;wBACL,6BAA6B,EAAE,IAAI,CAAC,YAAY;wBAChD,8BAA8B,EAAE,CAAC,IAAI,CAAC,YAAY;qBACnD,EACD,EAAE,EAAC,eAAe;oBAElB,6DAAM,IAAI,EAAC,cAAc,GAAQ,CAC7B,CACF;YACN,4DACE,KAAK,EAAE;oBACL,kBAAkB,EAAE,IAAI;oBACxB,iCAAiC,EAAE,CAAC,IAAI,CAAC,YAAY;iBACtD,iBACW,iBAAiB,gBACjB,IAAI,CAAC,OAAO,EACxB,OAAO,EAAE,GAAG,EAAE;oBACZ,IAAI,CAAC,mBAAmB,EAAE,CAAC;oBAC3B,IAAI,CAAC,KAAK,EAAE,CAAC;gBACf,CAAC,GACI,CACA,CACV,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {Component, Element, Event, EventEmitter, Listen, Method, Prop, h} from \"@stencil/core\";\nimport dialogPolyfill from \"dialog-polyfill\";\nimport {KeyboardCode} from \"../../beans\";\n\nconst FOCUSABLE_ELEMENTS_SELECTOR =\n ':is(button, input, select, textarea, [contenteditable=\"\"], [contenteditable=\"true\"], a[href], [tabindex], summary):not([disabled], [disabled=\"\"], [tabindex=\"-1\"], [aria-hidden=\"true\"], [hidden])';\n\n/**\n * @slot modalCloseButton - accept custom close button\n * @slot modalContent - set the content of the modal\n */\n@Component({\n tag: \"z-modal\",\n styleUrl: \"styles.css\",\n shadow: true,\n})\nexport class ZModal {\n /** unique id */\n @Prop()\n modalid: string;\n\n /** title text (optional) */\n @Prop()\n modaltitle?: string;\n\n /** subtitle (optional) */\n @Prop()\n modalsubtitle?: string;\n\n /** aria-label for close button (optional) */\n @Prop()\n closeButtonLabel = \"chiudi modale\";\n\n /** add role \"alertdialog\" to dialog (optional, default is false) */\n @Prop()\n alertdialog?: boolean = false;\n\n /** if true, the modal is closable (optional, default is true) */\n @Prop()\n closable?: boolean = true;\n\n /** if true, the modal can scroll inside, if false the viewport can scroll */\n @Prop()\n scrollInside?: boolean = true;\n\n private dialog: HTMLDialogElement;\n\n @Element() host: HTMLZModalElement;\n\n /** emitted on close button click, returns modalid */\n @Event()\n modalClose: EventEmitter;\n\n private emitModalClose(): void {\n if (this.closable) {\n this.modalClose.emit({modalid: this.modalid});\n }\n }\n\n /** emitted on modal header click, returns modalid */\n @Event()\n modalHeaderActive: EventEmitter;\n\n private emitModalHeaderActive(): void {\n this.modalHeaderActive.emit({modalid: this.modalid});\n }\n\n /** emitted on background click, returns modalid */\n @Event()\n modalBackgroundClick: EventEmitter;\n\n private emitBackgroundClick(): void {\n if (this.closable) {\n this.modalBackgroundClick.emit({modalid: this.modalid});\n }\n }\n\n componentDidLoad(): void {\n if (typeof window.HTMLDialogElement !== \"function\") {\n /* workaround to fix `registerDialog` in test environment:\n stencil converts html elements to MockHTMLElement but this element is missing the `localName` property,\n which is used by `registerDialog` to recognize the element as dialog */\n if (!this.dialog.localName) {\n Object.defineProperty(this.dialog, \"localName\", {value: \"dialog\"});\n }\n dialogPolyfill.registerDialog(this.dialog);\n this.dialog.setAttribute(\"open\", \"true\");\n } else {\n this.open();\n }\n }\n\n /** open modal */\n @Method()\n async open(): Promise<void> {\n this.dialog?.showModal();\n }\n\n /** close modal */\n @Method()\n async close(): Promise<void> {\n if (this.closable) {\n this.dialog?.close();\n }\n }\n\n /**\n * Get a list of focusable elements in the dialog.\n * Remove elements with `display: none` from the list, because they're not focusable.\n *\n * N.B. The list is built on the assumption that elements inside shadow root are placed ALL before the `modalContent` slot.\n * Adding focusable elements after the `modalContent` slot would break the order of elements in the list.\n */\n private get focusableElements(): HTMLElement[] {\n return [\n ...Array.from(this.host.shadowRoot.querySelectorAll<HTMLElement>(FOCUSABLE_ELEMENTS_SELECTOR)),\n ...Array.from(this.host.querySelectorAll<HTMLElement>(FOCUSABLE_ELEMENTS_SELECTOR)),\n ].filter((element) => getComputedStyle(element).display !== \"none\");\n }\n\n @Listen(\"keydown\")\n handleKeyDown(e: KeyboardEvent): void {\n if (e.code !== KeyboardCode.TAB) {\n return;\n }\n\n const focusableElements = this.focusableElements;\n const shadowActiveElement = this.host.shadowRoot.activeElement;\n const activeElement = this.host.ownerDocument.activeElement;\n const firstFocusableElement = focusableElements[0];\n const lastFocusableElement = focusableElements[focusableElements.length - 1];\n if (e.shiftKey && (shadowActiveElement == firstFocusableElement || activeElement == firstFocusableElement)) {\n // shift + tab was pressed and current active element is the first focusable element\n e.preventDefault();\n lastFocusableElement.focus();\n } else if (!e.shiftKey && (shadowActiveElement == lastFocusableElement || activeElement == lastFocusableElement)) {\n // shift + tab was pressed and current active element is the first focusable element\n e.preventDefault();\n firstFocusableElement.focus();\n }\n }\n\n private closeButtonSlot(): HTMLElement | void {\n if (this.closable) {\n return (\n <slot name=\"modalCloseButton\">\n <button\n aria-label={this.closeButtonLabel}\n onClick={() => this.close()}\n >\n <z-icon name=\"multiply-circle-filled\"></z-icon>\n </button>\n </slot>\n );\n }\n }\n\n private handleEscape(e: Event): void {\n if (this.closable) {\n return;\n }\n e.preventDefault();\n }\n\n render(): HTMLZModalElement {\n return (\n <dialog\n class={{\n \"modal-dialog\": !this.scrollInside,\n }}\n aria-labelledby=\"modal-title\"\n aria-describedby=\"modal-content\"\n role={this.alertdialog ? \"alertdialog\" : undefined}\n ref={(el) => (this.dialog = el as HTMLDialogElement)}\n onClose={() => this.emitModalClose()}\n onCancel={(e) => this.handleEscape(e)}\n >\n <div\n class={{\n \"modal-container\": true,\n \"modal-container-scroll-inside\": this.scrollInside,\n \"modal-container-scroll-outside\": !this.scrollInside,\n }}\n id={this.modalid}\n >\n <header onClick={this.emitModalHeaderActive.bind(this)}>\n <div>\n {this.modaltitle && <h1 id=\"modal-title\">{this.modaltitle}</h1>}\n {this.closeButtonSlot()}\n </div>\n {this.modalsubtitle && (\n <div\n class=\"subtitle\"\n id=\"modal-subtitle\"\n >\n {this.modalsubtitle}\n </div>\n )}\n </header>\n\n <div\n class={{\n \"modal-content-scroll-inside\": this.scrollInside,\n \"modal-content-scroll-outside\": !this.scrollInside,\n }}\n id=\"modal-content\"\n >\n <slot name=\"modalContent\"></slot>\n </div>\n </div>\n <div\n class={{\n \"modal-background\": true,\n \"modal-background-scroll-outside\": !this.scrollInside,\n }}\n data-action=\"modalBackground\"\n data-modal={this.modalid}\n onClick={() => {\n this.emitBackgroundClick();\n this.close();\n }}\n ></div>\n </dialog>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/z-modal/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,EAAC,MAAM,eAAe,CAAC;AAC/F,OAAO,cAAc,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAC,YAAY,EAAC,MAAM,aAAa,CAAC;AACzC,OAAO,EAAC,gBAAgB,EAAC,MAAM,6BAA6B,CAAC;AAE7D,MAAM,2BAA2B,GAC/B,oMAAoM,CAAC;AAEvM;;;GAGG;AAMH,MAAM,OAAO,MAAM;;;;;gCAeE,eAAe;2BAIV,KAAK;wB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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {Component, Element, Event, EventEmitter, Listen, Method, Prop, h} from \"@stencil/core\";\nimport dialogPolyfill from \"dialog-polyfill\";\nimport {KeyboardCode} from \"../../beans\";\nimport {mobileBreakpoint} from \"../../constants/breakpoints\";\n\nconst FOCUSABLE_ELEMENTS_SELECTOR =\n ':is(button, input, select, textarea, [contenteditable=\"\"], [contenteditable=\"true\"], a[href], [tabindex], summary):not([disabled], [disabled=\"\"], [tabindex=\"-1\"], [aria-hidden=\"true\"], [hidden])';\n\n/**\n * @slot modalCloseButton - accept custom close button\n * @slot modalContent - set the content of the modal\n */\n@Component({\n tag: \"z-modal\",\n styleUrl: \"styles.css\",\n shadow: true,\n})\nexport class ZModal {\n /** unique id */\n @Prop()\n modalid: string;\n\n /** title text (optional) */\n @Prop()\n modaltitle?: string;\n\n /** subtitle (optional) */\n @Prop()\n modalsubtitle?: string;\n\n /** aria-label for close button (optional) */\n @Prop()\n closeButtonLabel = \"chiudi modale\";\n\n /** add role \"alertdialog\" to dialog (optional, default is false) */\n @Prop()\n alertdialog?: boolean = false;\n\n /** if true, the modal is closable (optional, default is true) */\n @Prop()\n closable?: boolean = true;\n\n /** if true, the modal can scroll inside, if false the viewport can scroll */\n @Prop()\n scrollInside?: boolean = true;\n\n private dialog: HTMLDialogElement;\n\n @Element() host: HTMLZModalElement;\n\n /** emitted on close button click, returns modalid */\n @Event()\n modalClose: EventEmitter;\n\n private emitModalClose(): void {\n if (this.closable) {\n this.modalClose.emit({modalid: this.modalid});\n }\n }\n\n /** emitted on modal header click, returns modalid */\n @Event()\n modalHeaderActive: EventEmitter;\n\n private emitModalHeaderActive(): void {\n this.modalHeaderActive.emit({modalid: this.modalid});\n }\n\n /** emitted on background click, returns modalid */\n @Event()\n modalBackgroundClick: EventEmitter;\n\n private emitBackgroundClick(): void {\n if (this.closable) {\n this.modalBackgroundClick.emit({modalid: this.modalid});\n }\n }\n\n private handlePageOverflow(): void {\n const mobileMediaQuery = window.matchMedia(`(max-width: ${mobileBreakpoint}px)`);\n document.body.style[\"overflow-y\"] = mobileMediaQuery.matches ? \"hidden\" : \"\";\n }\n\n componentDidLoad(): void {\n if (typeof window.HTMLDialogElement !== \"function\") {\n /* workaround to fix `registerDialog` in test environment:\n stencil converts html elements to MockHTMLElement but this element is missing the `localName` property,\n which is used by `registerDialog` to recognize the element as dialog */\n if (!this.dialog.localName) {\n Object.defineProperty(this.dialog, \"localName\", {value: \"dialog\"});\n }\n dialogPolyfill.registerDialog(this.dialog);\n this.dialog.setAttribute(\"open\", \"true\");\n } else {\n this.open();\n }\n\n this.handlePageOverflow();\n }\n\n /** open modal */\n @Method()\n async open(): Promise<void> {\n this.dialog?.showModal();\n }\n\n /** close modal */\n @Method()\n async close(): Promise<void> {\n if (this.closable) {\n this.dialog?.close();\n }\n }\n\n /**\n * Get a list of focusable elements in the dialog.\n * Remove elements with `display: none` from the list, because they're not focusable.\n *\n * N.B. The list is built on the assumption that elements inside shadow root are placed ALL before the `modalContent` slot.\n * Adding focusable elements after the `modalContent` slot would break the order of elements in the list.\n */\n private get focusableElements(): HTMLElement[] {\n return [\n ...Array.from(this.host.shadowRoot.querySelectorAll<HTMLElement>(FOCUSABLE_ELEMENTS_SELECTOR)),\n ...Array.from(this.host.querySelectorAll<HTMLElement>(FOCUSABLE_ELEMENTS_SELECTOR)),\n ].filter((element) => getComputedStyle(element).display !== \"none\");\n }\n\n @Listen(\"keydown\")\n handleKeyDown(e: KeyboardEvent): void {\n if (e.code === KeyboardCode.ESC && !this.closable) {\n e.preventDefault();\n }\n\n if (e.code !== KeyboardCode.TAB) {\n return;\n }\n\n const focusableElements = this.focusableElements;\n const shadowActiveElement = this.host.shadowRoot.activeElement;\n const activeElement = this.host.ownerDocument.activeElement;\n const firstFocusableElement = focusableElements[0];\n const lastFocusableElement = focusableElements[focusableElements.length - 1];\n if (e.shiftKey && (shadowActiveElement == firstFocusableElement || activeElement == firstFocusableElement)) {\n // shift + tab was pressed and current active element is the first focusable element\n e.preventDefault();\n lastFocusableElement.focus();\n } else if (!e.shiftKey && (shadowActiveElement == lastFocusableElement || activeElement == lastFocusableElement)) {\n // shift + tab was pressed and current active element is the first focusable element\n e.preventDefault();\n firstFocusableElement.focus();\n }\n }\n\n private closeButtonSlot(): HTMLElement | void {\n if (this.closable) {\n return (\n <slot name=\"modalCloseButton\">\n <button\n aria-label={this.closeButtonLabel}\n onClick={() => this.close()}\n >\n <z-icon name=\"multiply-circle-filled\"></z-icon>\n </button>\n </slot>\n );\n }\n }\n\n private handleEscape(e: Event): void {\n if (this.closable) {\n return;\n }\n e.preventDefault();\n }\n\n render(): HTMLZModalElement {\n return (\n <dialog\n class={{\n \"modal-dialog\": !this.scrollInside,\n }}\n aria-labelledby=\"modal-title\"\n aria-describedby=\"modal-content\"\n role={this.alertdialog ? \"alertdialog\" : undefined}\n ref={(el) => (this.dialog = el as HTMLDialogElement)}\n onClose={() => this.emitModalClose()}\n onCancel={(e) => this.handleEscape(e)}\n >\n <div\n class={{\n \"modal-container\": true,\n \"modal-container-scroll-inside\": this.scrollInside,\n \"modal-container-scroll-outside\": !this.scrollInside,\n }}\n id={this.modalid}\n >\n <header onClick={this.emitModalHeaderActive.bind(this)}>\n <div>\n {this.modaltitle && <h1 id=\"modal-title\">{this.modaltitle}</h1>}\n {this.closeButtonSlot()}\n </div>\n {this.modalsubtitle && (\n <div\n class=\"subtitle\"\n id=\"modal-subtitle\"\n >\n {this.modalsubtitle}\n </div>\n )}\n </header>\n\n <div\n class={{\n \"modal-content-scroll-inside\": this.scrollInside,\n \"modal-content-scroll-outside\": !this.scrollInside,\n }}\n id=\"modal-content\"\n >\n <slot name=\"modalContent\"></slot>\n </div>\n </div>\n <div\n class={{\n \"modal-background\": true,\n \"modal-background-scroll-outside\": !this.scrollInside,\n }}\n data-action=\"modalBackground\"\n data-modal={this.modalid}\n onClick={() => {\n this.emitBackgroundClick();\n this.close();\n }}\n ></div>\n </dialog>\n );\n }\n}\n"]}
@@ -49,7 +49,8 @@
49
49
  }
50
50
 
51
51
  .modal-container > header {
52
- padding: calc(var(--space-unit) * 2 - 2px) calc(var(--space-unit) * 2);
52
+ padding: calc(var(--space-unit) * 1.75) calc(var(--space-unit) * 2) calc(var(--space-unit) * 1.75)
53
+ calc(var(--space-unit) * 2);
53
54
  background: var(--color-surface02);
54
55
  }
55
56
 
@@ -63,8 +64,8 @@
63
64
  }
64
65
 
65
66
  .modal-container > header z-icon {
66
- --z-icon-width: calc(var(--space-unit) * 2.5);
67
- --z-icon-height: calc(var(--space-unit) * 2.5);
67
+ --z-icon-width: calc(var(--space-unit) * 2.25);
68
+ --z-icon-height: calc(var(--space-unit) * 2.25);
68
69
 
69
70
  display: flex;
70
71
  fill: var(--color-primary01-icon);
@@ -73,7 +74,7 @@
73
74
  .modal-container > header > div {
74
75
  display: flex;
75
76
  width: 100%;
76
- align-items: center;
77
+ align-items: baseline;
77
78
  margin-right: calc(var(--space-unit) * 2);
78
79
  }
79
80
 
@@ -82,7 +83,7 @@
82
83
  padding: 0;
83
84
  margin: 0;
84
85
  color: var(--color-default-text);
85
- font-weight: var(--font-rg);
86
+ font-weight: var(--font-sb);
86
87
  }
87
88
 
88
89
  .modal-container > header h1 {
@@ -93,6 +94,7 @@
93
94
 
94
95
  .modal-container > header .subtitle {
95
96
  font-size: var(--font-size-3);
97
+ font-weight: var(--font-rg);
96
98
  letter-spacing: 0;
97
99
  line-height: 1.5;
98
100
  }
@@ -213,34 +215,25 @@
213
215
  .modal-dialog::-webkit-scrollbar {
214
216
  display: none;
215
217
  }
216
-
217
- .modal-container > header z-icon {
218
- --z-icon-width: calc(var(--space-unit) * 3);
219
- --z-icon-height: calc(var(--space-unit) * 3);
220
- }
221
- }
222
-
223
- /* Tablet */
224
- @media only screen and (min-width: 768px) and (max-width: 1151px) {
225
- .modal-container > header {
226
- padding: calc(var(--space-unit) * 3 - 2px) calc(var(--space-unit) * 3);
227
- }
228
218
  }
229
219
 
230
220
  /* Desktop */
231
221
  @media only screen and (min-width: 1152px) {
232
222
  .modal-container > header {
233
- padding: calc(var(--space-unit) * 4 - 4px) calc(var(--space-unit) * 4);
223
+ padding-top: calc(var(--space-unit) * 1.5);
224
+ padding-bottom: calc(var(--space-unit) * 1.5);
234
225
  }
235
226
 
236
227
  .modal-container > header h1 {
237
228
  font-size: var(--font-size-6);
229
+ font-weight: var(--font-sb);
238
230
  letter-spacing: 0;
239
- line-height: 1.33;
231
+ line-height: 1.333;
240
232
  }
241
233
 
242
234
  .modal-container > header .subtitle {
243
235
  font-size: var(--font-size-4);
236
+ font-weight: var(--font-rg);
244
237
  letter-spacing: 0;
245
238
  line-height: 1.5;
246
239
  }
@@ -1,10 +1,10 @@
1
1
  import { Host, h } from "@stencil/core";
2
2
  /**
3
- * @slot - slot for `z-stepper-item`s
3
+ * @slot - slot for `z-stepper-item`
4
4
  */
5
5
  export class ZStepper {
6
6
  render() {
7
- return (h(Host, { key: 'c1069a6d199240aa1e8eb9fe30be9a75b2dabecb', role: "list" }, h("slot", { key: '283f1f42d5f73259b7c04e965bf592e4ba543fc8' })));
7
+ return (h(Host, { key: '80b89caa35e9adb82ad413783b16eae491a26f48', role: "list" }, h("slot", { key: '140e35a55637873b1eee70d5a7a8c2b03af3eed7' })));
8
8
  }
9
9
  static get is() { return "z-stepper"; }
10
10
  static get encapsulation() { return "shadow"; }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/z-stepper/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,IAAI,EAAE,CAAC,EAAC,MAAM,eAAe,CAAC;AAEjD;;GAEG;AAMH,MAAM,OAAO,QAAQ;IACnB,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDAAC,IAAI,EAAC,MAAM;YACf,8DAAQ,CACH,CACR,CAAC;IACJ,CAAC;;;;;;;;;CACF","sourcesContent":["import {Component, Host, h} from \"@stencil/core\";\n\n/**\n * @slot - slot for `z-stepper-item`s\n */\n@Component({\n tag: \"z-stepper\",\n styleUrl: \"styles.css\",\n shadow: true,\n})\nexport class ZStepper {\n render(): HTMLSlotElement {\n return (\n <Host role=\"list\">\n <slot />\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/z-stepper/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,IAAI,EAAE,CAAC,EAAC,MAAM,eAAe,CAAC;AAEjD;;GAEG;AAMH,MAAM,OAAO,QAAQ;IACnB,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDAAC,IAAI,EAAC,MAAM;YACf,8DAAQ,CACH,CACR,CAAC;IACJ,CAAC;;;;;;;;;CACF","sourcesContent":["import {Component, Host, h} from \"@stencil/core\";\n\n/**\n * @slot - slot for `z-stepper-item`\n */\n@Component({\n tag: \"z-stepper\",\n styleUrl: \"styles.css\",\n shadow: true,\n})\nexport class ZStepper {\n render(): HTMLSlotElement {\n return (\n <Host role=\"list\">\n <slot />\n </Host>\n );\n }\n}\n"]}
@@ -13,15 +13,18 @@ export const Default = {
13
13
  <z-stepper-item
14
14
  index="1"
15
15
  pressed
16
- ></z-stepper-item>
16
+ >I tuoi dati</z-stepper-item
17
+ >
17
18
  <z-stepper-item
18
19
  index="2"
19
20
  disabled
20
- ></z-stepper-item>
21
+ >Le tue credenziali</z-stepper-item
22
+ >
21
23
  <z-stepper-item
22
24
  index="3"
23
25
  disabled
24
- ></z-stepper-item>
26
+ >Conferma</z-stepper-item
27
+ >
25
28
  </z-stepper>`,
26
29
  };
27
30
  export const Completed = {
@@ -35,4 +38,42 @@ export const Completed = {
35
38
  >
36
39
  </z-stepper>`,
37
40
  };
41
+ export const CompletedDisabled = {
42
+ render: () => html `<z-stepper>
43
+ <z-stepper-item
44
+ index="1"
45
+ disabled
46
+ >I tuoi dati</z-stepper-item
47
+ >
48
+ <z-stepper-item
49
+ index="2"
50
+ disabled
51
+ >Le tue credenziali</z-stepper-item
52
+ >
53
+ <z-stepper-item
54
+ index="3"
55
+ pressed
56
+ >Conferma</z-stepper-item
57
+ >
58
+ </z-stepper>`,
59
+ };
60
+ export const Checked = {
61
+ render: () => html `<z-stepper>
62
+ <z-stepper-item
63
+ index="1"
64
+ checked
65
+ >I tuoi dati</z-stepper-item
66
+ >
67
+ <z-stepper-item
68
+ index="2"
69
+ checked
70
+ >Le tue credenziali</z-stepper-item
71
+ >
72
+ <z-stepper-item
73
+ index="3"
74
+ checked
75
+ >Conferma</z-stepper-item
76
+ >
77
+ </z-stepper>`,
78
+ };
38
79
  //# sourceMappingURL=index.stories.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.stories.js","sourceRoot":"","sources":["../../../../src/components/z-stepper/index.stories.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,IAAI,EAAC,MAAM,KAAK,CAAC;AAEzB,OAAO,yBAAyB,CAAC;AACjC,OAAO,SAAS,CAAC;AAEjB,eAAe;IACb,KAAK,EAAE,mBAAmB;IAC1B,SAAS,EAAE,WAAW;IACtB,aAAa,EAAE;QACb,YAAY,EAAE,gBAAgB;KAC/B;CACuB,CAAC;AAI3B,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,MAAM,EAAE,GAAG,EAAE,CACX,IAAI,CAAA;;;;;;;;;;;;;iBAaS;CACA,CAAC;AAElB,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,MAAM,EAAE,GAAG,EAAE,CACX,IAAI,CAAA;;;;;;;;iBAQS;CACA,CAAC","sourcesContent":["import {Meta, StoryObj} from \"@storybook/web-components\";\nimport {html} from \"lit\";\nimport {type ZStepper} from \".\";\nimport \"../z-stepper-item/index\";\nimport \"./index\";\n\nexport default {\n title: \"ZStepper/ZStepper\",\n component: \"z-stepper\",\n subcomponents: {\n ZStepperItem: \"z-stepper-item\",\n },\n} satisfies Meta<ZStepper>;\n\ntype Story = StoryObj<ZStepper>;\n\nexport const Default = {\n render: () =>\n html`<z-stepper>\n <z-stepper-item\n index=\"1\"\n pressed\n ></z-stepper-item>\n <z-stepper-item\n index=\"2\"\n disabled\n ></z-stepper-item>\n <z-stepper-item\n index=\"3\"\n disabled\n ></z-stepper-item>\n </z-stepper>`,\n} satisfies Story;\n\nexport const Completed = {\n render: () =>\n html`<z-stepper>\n <z-stepper-item index=\"1\">I tuoi dati</z-stepper-item>\n <z-stepper-item index=\"2\">Le tue credenziali</z-stepper-item>\n <z-stepper-item\n index=\"3\"\n pressed\n >Conferma</z-stepper-item\n >\n </z-stepper>`,\n} satisfies Story;\n"]}
1
+ {"version":3,"file":"index.stories.js","sourceRoot":"","sources":["../../../../src/components/z-stepper/index.stories.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,IAAI,EAAC,MAAM,KAAK,CAAC;AAEzB,OAAO,yBAAyB,CAAC;AACjC,OAAO,SAAS,CAAC;AAEjB,eAAe;IACb,KAAK,EAAE,mBAAmB;IAC1B,SAAS,EAAE,WAAW;IACtB,aAAa,EAAE;QACb,YAAY,EAAE,gBAAgB;KAC/B;CACuB,CAAC;AAI3B,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,MAAM,EAAE,GAAG,EAAE,CACX,IAAI,CAAA;;;;;;;;;;;;;;;;iBAgBS;CACA,CAAC;AAElB,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,MAAM,EAAE,GAAG,EAAE,CACX,IAAI,CAAA;;;;;;;;iBAQS;CACA,CAAC;AAElB,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,MAAM,EAAE,GAAG,EAAE,CACX,IAAI,CAAA;;;;;;;;;;;;;;;;iBAgBS;CACA,CAAC;AAElB,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,MAAM,EAAE,GAAG,EAAE,CACX,IAAI,CAAA;;;;;;;;;;;;;;;;iBAgBS;CACA,CAAC","sourcesContent":["import {Meta, StoryObj} from \"@storybook/web-components\";\nimport {html} from \"lit\";\nimport {type ZStepper} from \".\";\nimport \"../z-stepper-item/index\";\nimport \"./index\";\n\nexport default {\n title: \"ZStepper/ZStepper\",\n component: \"z-stepper\",\n subcomponents: {\n ZStepperItem: \"z-stepper-item\",\n },\n} satisfies Meta<ZStepper>;\n\ntype Story = StoryObj<ZStepper>;\n\nexport const Default = {\n render: () =>\n html`<z-stepper>\n <z-stepper-item\n index=\"1\"\n pressed\n >I tuoi dati</z-stepper-item\n >\n <z-stepper-item\n index=\"2\"\n disabled\n >Le tue credenziali</z-stepper-item\n >\n <z-stepper-item\n index=\"3\"\n disabled\n >Conferma</z-stepper-item\n >\n </z-stepper>`,\n} satisfies Story;\n\nexport const Completed = {\n render: () =>\n html`<z-stepper>\n <z-stepper-item index=\"1\">I tuoi dati</z-stepper-item>\n <z-stepper-item index=\"2\">Le tue credenziali</z-stepper-item>\n <z-stepper-item\n index=\"3\"\n pressed\n >Conferma</z-stepper-item\n >\n </z-stepper>`,\n} satisfies Story;\n\nexport const CompletedDisabled = {\n render: () =>\n html`<z-stepper>\n <z-stepper-item\n index=\"1\"\n disabled\n >I tuoi dati</z-stepper-item\n >\n <z-stepper-item\n index=\"2\"\n disabled\n >Le tue credenziali</z-stepper-item\n >\n <z-stepper-item\n index=\"3\"\n pressed\n >Conferma</z-stepper-item\n >\n </z-stepper>`,\n} satisfies Story;\n\nexport const Checked = {\n render: () =>\n html`<z-stepper>\n <z-stepper-item\n index=\"1\"\n checked\n >I tuoi dati</z-stepper-item\n >\n <z-stepper-item\n index=\"2\"\n checked\n >Le tue credenziali</z-stepper-item\n >\n <z-stepper-item\n index=\"3\"\n checked\n >Conferma</z-stepper-item\n >\n </z-stepper>`,\n} satisfies Story;\n"]}
@@ -3,32 +3,57 @@ import "./index";
3
3
  export default {
4
4
  title: "ZStepper/ZStepperItem",
5
5
  component: "z-stepper-item",
6
+ args: {
7
+ pressed: false,
8
+ disabled: false,
9
+ checked: false,
10
+ index: 1,
11
+ text: "First Item",
12
+ },
6
13
  };
7
- export const WithIndex = {
8
- render: () => html `<z-stepper-item index="1"></z-stepper-item>`,
9
- };
10
- export const WithText = {
11
- render: () => html `<z-stepper-item index="1">First step</z-stepper-item>`,
12
- };
13
- export const Disabled = {
14
- render: () => html `<z-stepper-item
15
- index="1"
16
- disabled
17
- >First step</z-stepper-item
14
+ export const Default = {
15
+ render: (args) => html `<z-stepper-item
16
+ index=${args.index}
17
+ ?pressed=${args.pressed}
18
+ ?disabled=${args.disabled}
19
+ ?checked=${args.checked}
20
+ >${args.text}</z-stepper-item
18
21
  >`,
19
22
  };
20
23
  export const Pressed = {
21
- render: () => html `<z-stepper-item
22
- index="1"
23
- pressed
24
- >First step</z-stepper-item
24
+ args: {
25
+ pressed: true,
26
+ },
27
+ render: (args) => html `<z-stepper-item
28
+ index=${args.index}
29
+ ?pressed=${args.pressed}
30
+ ?disabled=${args.disabled}
31
+ ?checked=${args.checked}
32
+ >${args.text}</z-stepper-item
33
+ >`,
34
+ };
35
+ export const Disabled = {
36
+ args: {
37
+ disabled: true,
38
+ },
39
+ render: (args) => html `<z-stepper-item
40
+ index=${args.index}
41
+ ?pressed=${args.pressed}
42
+ ?disabled=${args.disabled}
43
+ ?checked=${args.checked}
44
+ >${args.text}</z-stepper-item
25
45
  >`,
26
46
  };
27
47
  export const Checked = {
28
- render: () => html `<z-stepper-item
29
- index="1"
30
- checked
31
- >First step</z-stepper-item
48
+ args: {
49
+ checked: true,
50
+ },
51
+ render: (args) => html `<z-stepper-item
52
+ index=${args.index}
53
+ ?pressed=${args.pressed}
54
+ ?disabled=${args.disabled}
55
+ ?checked=${args.checked}
56
+ >${args.text}</z-stepper-item
32
57
  >`,
33
58
  };
34
59
  //# sourceMappingURL=index.stories.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.stories.js","sourceRoot":"","sources":["../../../../src/components/z-stepper-item/index.stories.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,IAAI,EAAC,MAAM,KAAK,CAAC;AAEzB,OAAO,SAAS,CAAC;AAEjB,eAAe;IACb,KAAK,EAAE,uBAAuB;IAC9B,SAAS,EAAE,gBAAgB;CACC,CAAC;AAE/B,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,CAAA,6CAA6C;CAChE,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,CAAA,uDAAuD;CAC1E,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,MAAM,EAAE,GAAG,EAAE,CACX,IAAI,CAAA;;;;MAIF;CACL,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,MAAM,EAAE,GAAG,EAAE,CACX,IAAI,CAAA;;;;MAIF;CACL,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,MAAM,EAAE,GAAG,EAAE,CACX,IAAI,CAAA;;;;MAIF;CACL,CAAC","sourcesContent":["import {Meta} from \"@storybook/web-components\";\nimport {html} from \"lit\";\nimport {type ZStepperItem} from \".\";\nimport \"./index\";\n\nexport default {\n title: \"ZStepper/ZStepperItem\",\n component: \"z-stepper-item\",\n} satisfies Meta<ZStepperItem>;\n\nexport const WithIndex = {\n render: () => html`<z-stepper-item index=\"1\"></z-stepper-item>`,\n};\n\nexport const WithText = {\n render: () => html`<z-stepper-item index=\"1\">First step</z-stepper-item>`,\n};\n\nexport const Disabled = {\n render: () =>\n html`<z-stepper-item\n index=\"1\"\n disabled\n >First step</z-stepper-item\n >`,\n};\n\nexport const Pressed = {\n render: () =>\n html`<z-stepper-item\n index=\"1\"\n pressed\n >First step</z-stepper-item\n >`,\n};\n\nexport const Checked = {\n render: () =>\n html`<z-stepper-item\n index=\"1\"\n checked\n >First step</z-stepper-item\n >`,\n};\n"]}
1
+ {"version":3,"file":"index.stories.js","sourceRoot":"","sources":["../../../../src/components/z-stepper-item/index.stories.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,IAAI,EAAC,MAAM,KAAK,CAAC;AAEzB,OAAO,SAAS,CAAC;AAIjB,eAAe;IACb,KAAK,EAAE,uBAAuB;IAC9B,SAAS,EAAE,gBAAgB;IAC3B,IAAI,EAAE;QACJ,OAAO,EAAE,KAAK;QACd,QAAQ,EAAE,KAAK;QACf,OAAO,EAAE,KAAK;QACd,KAAK,EAAE,CAAC;QACR,IAAI,EAAE,YAAY;KACnB;CACsC,CAAC;AAE1C,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CACf,IAAI,CAAA;cACM,IAAI,CAAC,KAAK;iBACP,IAAI,CAAC,OAAO;kBACX,IAAI,CAAC,QAAQ;iBACd,IAAI,CAAC,OAAO;SACpB,IAAI,CAAC,IAAI;MACZ;CACL,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,IAAI,EAAE;QACJ,OAAO,EAAE,IAAI;KACd;IACD,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CACf,IAAI,CAAA;cACM,IAAI,CAAC,KAAK;iBACP,IAAI,CAAC,OAAO;kBACX,IAAI,CAAC,QAAQ;iBACd,IAAI,CAAC,OAAO;SACpB,IAAI,CAAC,IAAI;MACZ;CACL,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,IAAI,EAAE;QACJ,QAAQ,EAAE,IAAI;KACf;IACD,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CACf,IAAI,CAAA;cACM,IAAI,CAAC,KAAK;iBACP,IAAI,CAAC,OAAO;kBACX,IAAI,CAAC,QAAQ;iBACd,IAAI,CAAC,OAAO;SACpB,IAAI,CAAC,IAAI;MACZ;CACL,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,IAAI,EAAE;QACJ,OAAO,EAAE,IAAI;KACd;IACD,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CACf,IAAI,CAAA;cACM,IAAI,CAAC,KAAK;iBACP,IAAI,CAAC,OAAO;kBACX,IAAI,CAAC,QAAQ;iBACd,IAAI,CAAC,OAAO;SACpB,IAAI,CAAC,IAAI;MACZ;CACL,CAAC","sourcesContent":["import {Meta} from \"@storybook/web-components\";\nimport {html} from \"lit\";\nimport {type ZStepperItem} from \".\";\nimport \"./index\";\n\ntype ZStepperItemStoriesArgs = ZStepperItem & {text: string};\n\nexport default {\n title: \"ZStepper/ZStepperItem\",\n component: \"z-stepper-item\",\n args: {\n pressed: false,\n disabled: false,\n checked: false,\n index: 1,\n text: \"First Item\",\n },\n} satisfies Meta<ZStepperItemStoriesArgs>;\n\nexport const Default = {\n render: (args) =>\n html`<z-stepper-item\n index=${args.index}\n ?pressed=${args.pressed}\n ?disabled=${args.disabled}\n ?checked=${args.checked}\n >${args.text}</z-stepper-item\n >`,\n};\n\nexport const Pressed = {\n args: {\n pressed: true,\n },\n render: (args) =>\n html`<z-stepper-item\n index=${args.index}\n ?pressed=${args.pressed}\n ?disabled=${args.disabled}\n ?checked=${args.checked}\n >${args.text}</z-stepper-item\n >`,\n};\n\nexport const Disabled = {\n args: {\n disabled: true,\n },\n render: (args) =>\n html`<z-stepper-item\n index=${args.index}\n ?pressed=${args.pressed}\n ?disabled=${args.disabled}\n ?checked=${args.checked}\n >${args.text}</z-stepper-item\n >`,\n};\n\nexport const Checked = {\n args: {\n checked: true,\n },\n render: (args) =>\n html`<z-stepper-item\n index=${args.index}\n ?pressed=${args.pressed}\n ?disabled=${args.disabled}\n ?checked=${args.checked}\n >${args.text}</z-stepper-item\n >`,\n};\n"]}
@@ -17,22 +17,24 @@ const StoryMeta = {
17
17
  "--z-tag-bg": getColorTokenArgConfig(),
18
18
  },
19
19
  args: {
20
- "text": "In progress",
21
- "expandable": false,
22
- "icon": "gear",
23
- "--z-tag-text-color": undefined,
24
- "--z-tag-bg": undefined,
20
+ text: "In progress",
21
+ expandable: false,
22
+ icon: "gear",
25
23
  },
26
24
  };
27
25
  export default StoryMeta;
28
26
  export const Default = {
29
27
  render: (args) => html `<z-tag
30
- icon="gear"
28
+ icon=${args.icon}
31
29
  expandable=${args.expandable}
32
30
  >${args.text}
33
31
  </z-tag>`,
34
32
  };
35
33
  export const ColorTokens = {
34
+ args: {
35
+ "--z-tag-text-color": null,
36
+ "--z-tag-bg": null,
37
+ },
36
38
  render: (args) => html `<z-tag
37
39
  style=${styleMap({
38
40
  "--z-tag-text-color": args["--z-tag-text-color"],
@@ -45,7 +47,9 @@ export const ColorTokens = {
45
47
  };
46
48
  export const LongText = {
47
49
  args: {
48
- text: "In progress testo lungo molto lungo lungo lungo lungo lungolungo lungolungo",
50
+ "text": "In progress testo lungo molto lungo lungo lungo lungo lungolungo lungolungo",
51
+ "--z-tag-text-color": null,
52
+ "--z-tag-bg": null,
49
53
  },
50
54
  render: (args) => html `<z-tag
51
55
  style=${styleMap({
@@ -1 +1 @@
1
- {"version":3,"file":"index.stories.js","sourceRoot":"","sources":["../../../../src/components/z-tag/index.stories.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,IAAI,EAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAC,QAAQ,EAAC,MAAM,6BAA6B,CAAC;AAErD,OAAO,EAAC,KAAK,EAAC,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EAAmB,sBAAsB,EAAC,MAAM,6BAA6B,CAAC;AACrF,OAAO,SAAS,CAAC;AAIjB,MAAM,SAAS,GAAG;IAChB,KAAK,EAAE,MAAM;IACb,SAAS,EAAE,OAAO;IAClB,QAAQ,EAAE;QACR,MAAM,EAAE;YACN,OAAO,EAAE;gBACP,IAAI,EAAE,QAAQ;aACf;YACD,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE;SACnC;QACD,oBAAoB,EAAE,sBAAsB,EAAE;QAC9C,YAAY,EAAE,sBAAsB,EAAE;KACvC;IACD,IAAI,EAAE;QACJ,MAAM,EAAE,aAAa;QACrB,YAAY,EAAE,KAAK;QACnB,MAAM,EAAE,MAAM;QACd,oBAAoB,EAAE,SAAS;QAC/B,YAAY,EAAE,SAAS;KACxB;CAC8B,CAAC;AAElC,eAAe,SAAS,CAAC;AAEzB,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CACf,IAAI,CAAA;;mBAEW,IAAI,CAAC,UAAU;SACzB,IAAI,CAAC,IAAI;aACL;CACZ,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CACf,IAAI,CAAA;cACM,QAAQ,CAAC;QACf,oBAAoB,EAAE,IAAI,CAAC,oBAAoB,CAAC;QAChD,YAAY,EAAE,IAAI,CAAC,YAAY,CAAC;KACjC,CAAC;cACM,IAAI,CAAC,IAAI;oBACH,IAAI,CAAC,UAAU;SAC1B,IAAI,CAAC,IAAI;aACL;CACZ,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,IAAI,EAAE;QACJ,IAAI,EAAE,6EAA6E;KACpF;IACD,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CACf,IAAI,CAAA;cACM,QAAQ,CAAC;QACf,oBAAoB,EAAE,IAAI,CAAC,oBAAoB,CAAC;QAChD,YAAY,EAAE,IAAI,CAAC,YAAY,CAAC;KACjC,CAAC;cACM,IAAI,CAAC,IAAI;oBACH,IAAI,CAAC,UAAU;SAC1B,IAAI,CAAC,IAAI;aACL;CACZ,CAAC","sourcesContent":["import {Meta} from \"@storybook/web-components\";\nimport {html} from \"lit\";\nimport {styleMap} from \"lit/directives/style-map.js\";\nimport {type ZTag} from \".\";\nimport {ICONS} from \"../../constants/iconset\";\nimport {CSSVarsArguments, getColorTokenArgConfig} from \"../../utils/storybook-utils\";\nimport \"./index\";\n\ntype ZTagStoriesArgs = ZTag & CSSVarsArguments<\"z-tag-text-color\" | \"z-tag-bg\"> & {text: string};\n\nconst StoryMeta = {\n title: \"ZTag\",\n component: \"z-tag\",\n argTypes: {\n \"icon\": {\n control: {\n type: \"select\",\n },\n options: Object.keys(ICONS).sort(),\n },\n \"--z-tag-text-color\": getColorTokenArgConfig(),\n \"--z-tag-bg\": getColorTokenArgConfig(),\n },\n args: {\n \"text\": \"In progress\",\n \"expandable\": false,\n \"icon\": \"gear\",\n \"--z-tag-text-color\": undefined,\n \"--z-tag-bg\": undefined,\n },\n} satisfies Meta<ZTagStoriesArgs>;\n\nexport default StoryMeta;\n\nexport const Default = {\n render: (args) =>\n html`<z-tag\n icon=\"gear\"\n expandable=${args.expandable}\n >${args.text}\n </z-tag>`,\n};\n\nexport const ColorTokens = {\n render: (args) =>\n html`<z-tag\n style=${styleMap({\n \"--z-tag-text-color\": args[\"--z-tag-text-color\"],\n \"--z-tag-bg\": args[\"--z-tag-bg\"],\n })}\n .icon=${args.icon}\n .expandable=${args.expandable}\n >${args.text}\n </z-tag>`,\n};\n\nexport const LongText = {\n args: {\n text: \"In progress testo lungo molto lungo lungo lungo lungo lungolungo lungolungo\",\n },\n render: (args) =>\n html`<z-tag\n style=${styleMap({\n \"--z-tag-text-color\": args[\"--z-tag-text-color\"],\n \"--z-tag-bg\": args[\"--z-tag-bg\"],\n })}\n .icon=${args.icon}\n .expandable=${args.expandable}\n >${args.text}\n </z-tag>`,\n};\n"]}
1
+ {"version":3,"file":"index.stories.js","sourceRoot":"","sources":["../../../../src/components/z-tag/index.stories.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,IAAI,EAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAC,QAAQ,EAAC,MAAM,6BAA6B,CAAC;AAErD,OAAO,EAAC,KAAK,EAAC,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EAAmB,sBAAsB,EAAC,MAAM,6BAA6B,CAAC;AACrF,OAAO,SAAS,CAAC;AAIjB,MAA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,oBAAoB,CAAC;QAChD,YAAY,EAAE,IAAI,CAAC,YAAY,CAAC;KACjC,CAAC;cACM,IAAI,CAAC,IAAI;oBACH,IAAI,CAAC,UAAU;SAC1B,IAAI,CAAC,IAAI;aACL;CACZ,CAAC","sourcesContent":["import {Meta} from \"@storybook/web-components\";\nimport {html} from \"lit\";\nimport {styleMap} from \"lit/directives/style-map.js\";\nimport {type ZTag} from \".\";\nimport {ICONS} from \"../../constants/iconset\";\nimport {CSSVarsArguments, getColorTokenArgConfig} from \"../../utils/storybook-utils\";\nimport \"./index\";\n\ntype ZTagStoriesArgs = ZTag & CSSVarsArguments<\"z-tag-text-color\" | \"z-tag-bg\"> & {text: string};\n\nconst StoryMeta = {\n title: \"ZTag\",\n component: \"z-tag\",\n argTypes: {\n \"icon\": {\n control: {\n type: \"select\",\n },\n options: Object.keys(ICONS).sort(),\n },\n \"--z-tag-text-color\": getColorTokenArgConfig(),\n \"--z-tag-bg\": getColorTokenArgConfig(),\n },\n args: {\n text: \"In progress\",\n expandable: false,\n icon: \"gear\",\n },\n} satisfies Meta<ZTagStoriesArgs>;\n\nexport default StoryMeta;\n\nexport const Default = {\n render: (args) =>\n html`<z-tag\n icon=${args.icon}\n expandable=${args.expandable}\n >${args.text}\n </z-tag>`,\n};\n\nexport const ColorTokens = {\n args: {\n \"--z-tag-text-color\": null,\n \"--z-tag-bg\": null,\n },\n render: (args) =>\n html`<z-tag\n style=${styleMap({\n \"--z-tag-text-color\": args[\"--z-tag-text-color\"],\n \"--z-tag-bg\": args[\"--z-tag-bg\"],\n })}\n .icon=${args.icon}\n .expandable=${args.expandable}\n >${args.text}\n </z-tag>`,\n};\n\nexport const LongText = {\n args: {\n \"text\": \"In progress testo lungo molto lungo lungo lungo lungo lungolungo lungolungo\",\n \"--z-tag-text-color\": null,\n \"--z-tag-bg\": null,\n },\n render: (args) =>\n html`<z-tag\n style=${styleMap({\n \"--z-tag-text-color\": args[\"--z-tag-text-color\"],\n \"--z-tag-bg\": args[\"--z-tag-bg\"],\n })}\n .icon=${args.icon}\n .expandable=${args.expandable}\n >${args.text}\n </z-tag>`,\n};\n"]}
@@ -1,5 +1,6 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
2
  import { g as KeyboardCode } from './index2.js';
3
+ import { m as mobileBreakpoint } from './breakpoints.js';
3
4
  import { d as defineCustomElement$1 } from './index9.js';
4
5
 
5
6
  // nb. This is for IE10 and lower _only_.
@@ -859,7 +860,7 @@ if (window.HTMLDialogElement === undefined) {
859
860
  HTMLFormElement.prototype.submit = replacementFormSubmit;
860
861
  }
861
862
 
862
- const stylesCss = ":host{font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>dialog{padding:0;border:none;margin:0;background-color:transparent}:host>dialog:modal{width:100%;max-width:100%;max-height:100%}:host>dialog::-webkit-backdrop{display:none}:host>dialog::-ms-backdrop{display:none}:host>dialog::backdrop{display:none}:host>dialog+.backdrop{display:none}:host>dialog:not([open]){display:none}:host>dialog[open]{display:block}.modal-container{z-index:1010;display:-ms-flexbox;display:flex;overflow:-moz-scrollbars-none;width:100%;height:100vh;-ms-flex-direction:column;flex-direction:column}.modal-container>.modal-content-scroll-outside{overflow:auto;background:var(--color-surface01)}.modal-container>header{padding:calc(var(--space-unit) * 2 - 2px) calc(var(--space-unit) * 2);background:var(--color-surface02)}.modal-container>header button{padding:0;border:none;margin:0;margin-left:auto;background:transparent;cursor:pointer}.modal-container>header z-icon{--z-icon-width:calc(var(--space-unit) * 2.5);--z-icon-height:calc(var(--space-unit) * 2.5);display:-ms-flexbox;display:flex;fill:var(--color-primary01-icon)}.modal-container>header>div{display:-ms-flexbox;display:flex;width:100%;-ms-flex-align:center;align-items:center;margin-right:calc(var(--space-unit) * 2)}.modal-container>header h1,.modal-container>header .subtitle{padding:0;margin:0;color:var(--color-default-text);font-weight:var(--font-rg)}.modal-container>header h1{font-size:var(--font-size-5);letter-spacing:0;line-height:1.4}.modal-container>header .subtitle{font-size:var(--font-size-3);letter-spacing:0;line-height:1.5}.modal-container>header>div>h1 *:empty{display:none}.modal-container>header h1+.subtitle{margin-top:calc(var(--space-unit) * 0.5)}.modal-container-scroll-inside>.modal-content-scroll-inside{overflow:hidden auto;-ms-flex:1 auto;flex:1 auto;background:var(--color-surface01)}.modal-container-scroll-inside>.modal-content-scroll-inside::-webkit-scrollbar,.modal-container-scroll-outside>.modal-content-scroll-outside::-webkit-scrollbar{width:10px;background:linear-gradient(to right, transparent 0 3px, var(--gray200) 3px 7px, transparent 7px 10px);border-radius:var(--border-radius)}.modal-container-scroll-inside>.modal-content-scroll-inside::-webkit-scrollbar-thumb,.modal-container-scroll-outside>.modal-content-scroll-outside::-webkit-scrollbar-thumb{width:10px;background-color:var(--color-primary01)}.modal-container-scroll-inside>.modal-content-scroll-inside::-webkit-scrollbar-thumb:hover,.modal-container-scroll-outside>.modal-content-scroll-outside::-webkit-scrollbar-thumb:hover{background-color:var(--color-hover-primary)}.modal-container-scroll-inside .modal-content-scroll-inside,.modal-container-scroll-outside .modal-content-scroll-outside{scrollbar-color:var(--color-primary01) transparent}@media only screen and (min-width: 768px){.modal-background{position:fixed;top:0;left:0;overflow:hidden;width:100vw;height:100vh;background-color:var(--gray900);opacity:0.7}.modal-background.modal-background-scroll-outside{position:-webkit-sticky;position:sticky}.modal-container-scroll-inside{position:fixed;top:calc(var(--space-unit) * 6);left:50%;overflow:hidden;width:auto;min-width:calc(var(--space-unit) * 40);height:auto;min-height:calc(var(--space-unit) * 40);max-height:calc(100vh - calc(var(--space-unit) * 6 * 2));border-radius:var(--border-radius);-webkit-transform:translateX(-50%);transform:translateX(-50%)}.modal-container-scroll-outside{position:absolute;top:calc(var(--space-unit) * 6);left:50%;display:block;overflow:initial;width:auto;min-width:calc(var(--space-unit) * 40);height:auto;min-height:calc(var(--space-unit) * 40);max-height:calc(100vh - calc(var(--space-unit) * 6 * 2));-webkit-transform:translateX(-50%);transform:translateX(-50%)}.modal-container>.modal-content-scroll-outside{overflow:initial}.modal-container-scroll-outside>header,.modal-container-scroll-inside>header{border-top-left-radius:var(--border-radius);border-top-right-radius:var(--border-radius)}.modal-container-scroll-outside::after{display:block;height:calc(var(--space-unit) * 6);content:\" \"}.modal-dialog{position:fixed;top:0;left:0;height:auto;overflow-x:hidden;overflow-y:auto}.modal-content-scroll-outside{border-bottom-left-radius:var(--border-radius);border-bottom-right-radius:var(--border-radius)}.modal-dialog::-webkit-scrollbar{display:none}.modal-container>header z-icon{--z-icon-width:calc(var(--space-unit) * 3);--z-icon-height:calc(var(--space-unit) * 3)}}@media only screen and (min-width: 768px) and (max-width: 1151px){.modal-container>header{padding:calc(var(--space-unit) * 3 - 2px) calc(var(--space-unit) * 3)}}@media only screen and (min-width: 1152px){.modal-container>header{padding:calc(var(--space-unit) * 4 - 4px) calc(var(--space-unit) * 4)}.modal-container>header h1{font-size:var(--font-size-6);letter-spacing:0;line-height:1.33}.modal-container>header .subtitle{font-size:var(--font-size-4);letter-spacing:0;line-height:1.5}.modal-container>header h1+.subtitle{margin-top:0}}";
863
+ const stylesCss = ":host{font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>dialog{padding:0;border:none;margin:0;background-color:transparent}:host>dialog:modal{width:100%;max-width:100%;max-height:100%}:host>dialog::-webkit-backdrop{display:none}:host>dialog::-ms-backdrop{display:none}:host>dialog::backdrop{display:none}:host>dialog+.backdrop{display:none}:host>dialog:not([open]){display:none}:host>dialog[open]{display:block}.modal-container{z-index:1010;display:-ms-flexbox;display:flex;overflow:-moz-scrollbars-none;width:100%;height:100vh;-ms-flex-direction:column;flex-direction:column}.modal-container>.modal-content-scroll-outside{overflow:auto;background:var(--color-surface01)}.modal-container>header{padding:calc(var(--space-unit) * 1.75) calc(var(--space-unit) * 2) calc(var(--space-unit) * 1.75)\n calc(var(--space-unit) * 2);background:var(--color-surface02)}.modal-container>header button{padding:0;border:none;margin:0;margin-left:auto;background:transparent;cursor:pointer}.modal-container>header z-icon{--z-icon-width:calc(var(--space-unit) * 2.25);--z-icon-height:calc(var(--space-unit) * 2.25);display:-ms-flexbox;display:flex;fill:var(--color-primary01-icon)}.modal-container>header>div{display:-ms-flexbox;display:flex;width:100%;-ms-flex-align:baseline;align-items:baseline;margin-right:calc(var(--space-unit) * 2)}.modal-container>header h1,.modal-container>header .subtitle{padding:0;margin:0;color:var(--color-default-text);font-weight:var(--font-sb)}.modal-container>header h1{font-size:var(--font-size-5);letter-spacing:0;line-height:1.4}.modal-container>header .subtitle{font-size:var(--font-size-3);font-weight:var(--font-rg);letter-spacing:0;line-height:1.5}.modal-container>header>div>h1 *:empty{display:none}.modal-container>header h1+.subtitle{margin-top:calc(var(--space-unit) * 0.5)}.modal-container-scroll-inside>.modal-content-scroll-inside{overflow:hidden auto;-ms-flex:1 auto;flex:1 auto;background:var(--color-surface01)}.modal-container-scroll-inside>.modal-content-scroll-inside::-webkit-scrollbar,.modal-container-scroll-outside>.modal-content-scroll-outside::-webkit-scrollbar{width:10px;background:linear-gradient(to right, transparent 0 3px, var(--gray200) 3px 7px, transparent 7px 10px);border-radius:var(--border-radius)}.modal-container-scroll-inside>.modal-content-scroll-inside::-webkit-scrollbar-thumb,.modal-container-scroll-outside>.modal-content-scroll-outside::-webkit-scrollbar-thumb{width:10px;background-color:var(--color-primary01)}.modal-container-scroll-inside>.modal-content-scroll-inside::-webkit-scrollbar-thumb:hover,.modal-container-scroll-outside>.modal-content-scroll-outside::-webkit-scrollbar-thumb:hover{background-color:var(--color-hover-primary)}.modal-container-scroll-inside .modal-content-scroll-inside,.modal-container-scroll-outside .modal-content-scroll-outside{scrollbar-color:var(--color-primary01) transparent}@media only screen and (min-width: 768px){.modal-background{position:fixed;top:0;left:0;overflow:hidden;width:100vw;height:100vh;background-color:var(--gray900);opacity:0.7}.modal-background.modal-background-scroll-outside{position:-webkit-sticky;position:sticky}.modal-container-scroll-inside{position:fixed;top:calc(var(--space-unit) * 6);left:50%;overflow:hidden;width:auto;min-width:calc(var(--space-unit) * 40);height:auto;min-height:calc(var(--space-unit) * 40);max-height:calc(100vh - calc(var(--space-unit) * 6 * 2));border-radius:var(--border-radius);-webkit-transform:translateX(-50%);transform:translateX(-50%)}.modal-container-scroll-outside{position:absolute;top:calc(var(--space-unit) * 6);left:50%;display:block;overflow:initial;width:auto;min-width:calc(var(--space-unit) * 40);height:auto;min-height:calc(var(--space-unit) * 40);max-height:calc(100vh - calc(var(--space-unit) * 6 * 2));-webkit-transform:translateX(-50%);transform:translateX(-50%)}.modal-container>.modal-content-scroll-outside{overflow:initial}.modal-container-scroll-outside>header,.modal-container-scroll-inside>header{border-top-left-radius:var(--border-radius);border-top-right-radius:var(--border-radius)}.modal-container-scroll-outside::after{display:block;height:calc(var(--space-unit) * 6);content:\" \"}.modal-dialog{position:fixed;top:0;left:0;height:auto;overflow-x:hidden;overflow-y:auto}.modal-content-scroll-outside{border-bottom-left-radius:var(--border-radius);border-bottom-right-radius:var(--border-radius)}.modal-dialog::-webkit-scrollbar{display:none}}@media only screen and (min-width: 1152px){.modal-container>header{padding-top:calc(var(--space-unit) * 1.5);padding-bottom:calc(var(--space-unit) * 1.5)}.modal-container>header h1{font-size:var(--font-size-6);font-weight:var(--font-sb);letter-spacing:0;line-height:1.333}.modal-container>header .subtitle{font-size:var(--font-size-4);font-weight:var(--font-rg);letter-spacing:0;line-height:1.5}.modal-container>header h1+.subtitle{margin-top:0}}";
863
864
  const ZModalStyle0 = stylesCss;
864
865
 
865
866
  const FOCUSABLE_ELEMENTS_SELECTOR = ':is(button, input, select, textarea, [contenteditable=""], [contenteditable="true"], a[href], [tabindex], summary):not([disabled], [disabled=""], [tabindex="-1"], [aria-hidden="true"], [hidden])';
@@ -892,6 +893,10 @@ const ZModal = /*@__PURE__*/ proxyCustomElement(class ZModal extends HTMLElement
892
893
  this.modalBackgroundClick.emit({ modalid: this.modalid });
893
894
  }
894
895
  }
896
+ handlePageOverflow() {
897
+ const mobileMediaQuery = window.matchMedia(`(max-width: ${mobileBreakpoint}px)`);
898
+ document.body.style["overflow-y"] = mobileMediaQuery.matches ? "hidden" : "";
899
+ }
895
900
  componentDidLoad() {
896
901
  if (typeof window.HTMLDialogElement !== "function") {
897
902
  /* workaround to fix `registerDialog` in test environment:
@@ -906,6 +911,7 @@ const ZModal = /*@__PURE__*/ proxyCustomElement(class ZModal extends HTMLElement
906
911
  else {
907
912
  this.open();
908
913
  }
914
+ this.handlePageOverflow();
909
915
  }
910
916
  /** open modal */
911
917
  async open() {
@@ -933,6 +939,9 @@ const ZModal = /*@__PURE__*/ proxyCustomElement(class ZModal extends HTMLElement
933
939
  ].filter((element) => getComputedStyle(element).display !== "none");
934
940
  }
935
941
  handleKeyDown(e) {
942
+ if (e.code === KeyboardCode.ESC && !this.closable) {
943
+ e.preventDefault();
944
+ }
936
945
  if (e.code !== KeyboardCode.TAB) {
937
946
  return;
938
947
  }
@@ -964,16 +973,16 @@ const ZModal = /*@__PURE__*/ proxyCustomElement(class ZModal extends HTMLElement
964
973
  e.preventDefault();
965
974
  }
966
975
  render() {
967
- return (h("dialog", { key: '502c0fd42f37a498ef3ec2b2b174ac4950287883', class: {
976
+ return (h("dialog", { key: '50df4e07a74c86679fd2243e6795da0eeaae9c2c', class: {
968
977
  "modal-dialog": !this.scrollInside,
969
- }, "aria-labelledby": "modal-title", "aria-describedby": "modal-content", role: this.alertdialog ? "alertdialog" : undefined, ref: (el) => (this.dialog = el), onClose: () => this.emitModalClose(), onCancel: (e) => this.handleEscape(e) }, h("div", { key: '0dd9496ca11660307bcb8d751e8793659aa30741', class: {
978
+ }, "aria-labelledby": "modal-title", "aria-describedby": "modal-content", role: this.alertdialog ? "alertdialog" : undefined, ref: (el) => (this.dialog = el), onClose: () => this.emitModalClose(), onCancel: (e) => this.handleEscape(e) }, h("div", { key: '035ad0b71a6726e43c1fb52dae69257afd054525', class: {
970
979
  "modal-container": true,
971
980
  "modal-container-scroll-inside": this.scrollInside,
972
981
  "modal-container-scroll-outside": !this.scrollInside,
973
- }, id: this.modalid }, h("header", { key: '6952365a4a1d64e1ce23a9454f11cd4ae76e37ca', onClick: this.emitModalHeaderActive.bind(this) }, h("div", { key: 'fe219a40167ad9984255885bb189d9a9a0509cd5' }, this.modaltitle && h("h1", { key: '2991d4e6c254160dfe33e3558dc5db4d4dbf0abf', id: "modal-title" }, this.modaltitle), this.closeButtonSlot()), this.modalsubtitle && (h("div", { key: '5a612bc3eb027b488a37918794c4f24e1991a38d', class: "subtitle", id: "modal-subtitle" }, this.modalsubtitle))), h("div", { key: '34008ade3d0f05c701b4d94df647086a8de3cd27', class: {
982
+ }, id: this.modalid }, h("header", { key: '8f9e92a6c41e4dbff647c4140a1efc42adf258a9', onClick: this.emitModalHeaderActive.bind(this) }, h("div", { key: '3521275e24a100ba06c2f259ef239a361a6841e5' }, this.modaltitle && h("h1", { key: '3c345754f355fbe4cb7c0515404b01a3ff647b26', id: "modal-title" }, this.modaltitle), this.closeButtonSlot()), this.modalsubtitle && (h("div", { key: '5307334b7aca04ae351a0a69cbdaa6ec0ee32654', class: "subtitle", id: "modal-subtitle" }, this.modalsubtitle))), h("div", { key: 'fe5a158f3a0f0d6a06e83ce4cf32fb50ea5bf79f', class: {
974
983
  "modal-content-scroll-inside": this.scrollInside,
975
984
  "modal-content-scroll-outside": !this.scrollInside,
976
- }, id: "modal-content" }, h("slot", { key: '7ce631a687090f9b69bafa8de5dbe76d21d2c554', name: "modalContent" }))), h("div", { key: '8fc40e271bec8219fbbbf208bbba900a74ebdec8', class: {
985
+ }, id: "modal-content" }, h("slot", { key: 'c2e5855dc48026fda519ad69bf5a7f9c3c1a2773', name: "modalContent" }))), h("div", { key: 'd7f80d8206c262bf5166ee1231d78eb0e55e4bb5', class: {
977
986
  "modal-background": true,
978
987
  "modal-background-scroll-outside": !this.scrollInside,
979
988
  }, "data-action": "modalBackground", "data-modal": this.modalid, onClick: () => {