@zanichelli/albe-web-components 15.1.0 → 15.1.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 (108) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/cjs/z-app-header_12.cjs.entry.js +1 -1
  3. package/dist/cjs/z-app-header_12.cjs.entry.js.map +1 -1
  4. package/dist/cjs/z-card.cjs.entry.js +1 -1
  5. package/dist/cjs/z-card.cjs.entry.js.map +1 -1
  6. package/dist/cjs/z-dragdrop-area_2.cjs.entry.js +2 -2
  7. package/dist/cjs/z-dragdrop-area_2.cjs.entry.js.map +1 -1
  8. package/dist/cjs/z-file-upload.cjs.entry.js +1 -1
  9. package/dist/cjs/z-file-upload.cjs.entry.js.map +1 -1
  10. package/dist/collection/components/css-components/z-fab/index.stories.js +2 -2
  11. package/dist/collection/components/css-components/z-fab/index.stories.js.map +1 -1
  12. package/dist/collection/components/file-upload/z-dragdrop-area/styles.css +5 -0
  13. package/dist/collection/components/file-upload/z-file-upload/styles.css +5 -5
  14. package/dist/collection/components/z-card/styles.css +0 -5
  15. package/dist/collection/components/z-modal/styles.css +6 -6
  16. package/dist/collection/components/z-searchbar/styles.css +0 -5
  17. package/dist/components/index15.js +1 -1
  18. package/dist/components/index15.js.map +1 -1
  19. package/dist/components/index26.js +1 -1
  20. package/dist/components/index26.js.map +1 -1
  21. package/dist/components/index7.js +1 -1
  22. package/dist/components/index7.js.map +1 -1
  23. package/dist/components/z-card.js +1 -1
  24. package/dist/components/z-card.js.map +1 -1
  25. package/dist/components/z-file-upload.js +1 -1
  26. package/dist/components/z-file-upload.js.map +1 -1
  27. package/dist/esm/z-app-header_12.entry.js +1 -1
  28. package/dist/esm/z-app-header_12.entry.js.map +1 -1
  29. package/dist/esm/z-card.entry.js +1 -1
  30. package/dist/esm/z-card.entry.js.map +1 -1
  31. package/dist/esm/z-dragdrop-area_2.entry.js +2 -2
  32. package/dist/esm/z-dragdrop-area_2.entry.js.map +1 -1
  33. package/dist/esm/z-file-upload.entry.js +1 -1
  34. package/dist/esm/z-file-upload.entry.js.map +1 -1
  35. package/dist/esm-es5/z-app-header_12.entry.js +1 -1
  36. package/dist/esm-es5/z-app-header_12.entry.js.map +1 -1
  37. package/dist/esm-es5/z-card.entry.js +1 -1
  38. package/dist/esm-es5/z-card.entry.js.map +1 -1
  39. package/dist/esm-es5/z-dragdrop-area_2.entry.js +1 -1
  40. package/dist/esm-es5/z-dragdrop-area_2.entry.js.map +1 -1
  41. package/dist/esm-es5/z-file-upload.entry.js +1 -1
  42. package/dist/esm-es5/z-file-upload.entry.js.map +1 -1
  43. package/dist/web-components-library/p-01fa435e.system.entry.js +2 -0
  44. package/dist/web-components-library/p-01fa435e.system.entry.js.map +1 -0
  45. package/{www/build/p-4d0200ca.system.entry.js → dist/web-components-library/p-1c765d26.system.entry.js} +2 -2
  46. package/{www/build/p-4d0200ca.system.entry.js.map → dist/web-components-library/p-1c765d26.system.entry.js.map} +1 -1
  47. package/dist/web-components-library/p-3a0a7625.entry.js +2 -0
  48. package/dist/web-components-library/p-3a0a7625.entry.js.map +1 -0
  49. package/dist/web-components-library/p-81bcc748.entry.js +2 -0
  50. package/dist/web-components-library/p-81bcc748.entry.js.map +1 -0
  51. package/dist/web-components-library/p-91da40da.system.entry.js +2 -0
  52. package/dist/web-components-library/p-91da40da.system.entry.js.map +1 -0
  53. package/dist/web-components-library/{p-2df54d7d.entry.js → p-a2873cf1.entry.js} +2 -2
  54. package/dist/web-components-library/{p-2df54d7d.entry.js.map → p-a2873cf1.entry.js.map} +1 -1
  55. package/dist/web-components-library/p-dac6f2cc.entry.js +2 -0
  56. package/dist/web-components-library/p-dac6f2cc.entry.js.map +1 -0
  57. package/dist/web-components-library/p-f530271b.system.js +1 -1
  58. package/dist/web-components-library/p-f61b817e.system.entry.js +2 -0
  59. package/dist/web-components-library/p-f61b817e.system.entry.js.map +1 -0
  60. package/dist/web-components-library/web-components-library.css +15 -0
  61. package/dist/web-components-library/web-components-library.esm.js +1 -1
  62. package/package.json +1 -1
  63. package/www/build/p-01fa435e.system.entry.js +2 -0
  64. package/www/build/p-01fa435e.system.entry.js.map +1 -0
  65. package/{dist/web-components-library/p-4d0200ca.system.entry.js → www/build/p-1c765d26.system.entry.js} +2 -2
  66. package/{dist/web-components-library/p-4d0200ca.system.entry.js.map → www/build/p-1c765d26.system.entry.js.map} +1 -1
  67. package/www/build/{p-21d22d93.js → p-2cf65310.js} +1 -1
  68. package/www/build/p-3a0a7625.entry.js +2 -0
  69. package/www/build/p-3a0a7625.entry.js.map +1 -0
  70. package/www/build/p-81bcc748.entry.js +2 -0
  71. package/www/build/p-81bcc748.entry.js.map +1 -0
  72. package/www/build/p-91da40da.system.entry.js +2 -0
  73. package/www/build/p-91da40da.system.entry.js.map +1 -0
  74. package/www/build/{p-c12a2d47.css → p-9e18903a.css} +15 -0
  75. package/www/build/{p-2df54d7d.entry.js → p-a2873cf1.entry.js} +2 -2
  76. package/www/build/{p-2df54d7d.entry.js.map → p-a2873cf1.entry.js.map} +1 -1
  77. package/www/build/p-dac6f2cc.entry.js +2 -0
  78. package/www/build/p-dac6f2cc.entry.js.map +1 -0
  79. package/www/build/p-f530271b.system.js +1 -1
  80. package/www/build/p-f61b817e.system.entry.js +2 -0
  81. package/www/build/p-f61b817e.system.entry.js.map +1 -0
  82. package/www/build/web-components-library.css +15 -0
  83. package/www/build/web-components-library.esm.js +1 -1
  84. package/www/index.html +1 -1
  85. package/dist/web-components-library/p-0108191f.system.entry.js +0 -2
  86. package/dist/web-components-library/p-0108191f.system.entry.js.map +0 -1
  87. package/dist/web-components-library/p-0bde1f0e.entry.js +0 -2
  88. package/dist/web-components-library/p-0bde1f0e.entry.js.map +0 -1
  89. package/dist/web-components-library/p-12008903.system.entry.js +0 -2
  90. package/dist/web-components-library/p-12008903.system.entry.js.map +0 -1
  91. package/dist/web-components-library/p-21941767.entry.js +0 -2
  92. package/dist/web-components-library/p-21941767.entry.js.map +0 -1
  93. package/dist/web-components-library/p-49256720.system.entry.js +0 -2
  94. package/dist/web-components-library/p-49256720.system.entry.js.map +0 -1
  95. package/dist/web-components-library/p-a5f739b0.entry.js +0 -2
  96. package/dist/web-components-library/p-a5f739b0.entry.js.map +0 -1
  97. package/www/build/p-0108191f.system.entry.js +0 -2
  98. package/www/build/p-0108191f.system.entry.js.map +0 -1
  99. package/www/build/p-0bde1f0e.entry.js +0 -2
  100. package/www/build/p-0bde1f0e.entry.js.map +0 -1
  101. package/www/build/p-12008903.system.entry.js +0 -2
  102. package/www/build/p-12008903.system.entry.js.map +0 -1
  103. package/www/build/p-21941767.entry.js +0 -2
  104. package/www/build/p-21941767.entry.js.map +0 -1
  105. package/www/build/p-49256720.system.entry.js +0 -2
  106. package/www/build/p-49256720.system.entry.js.map +0 -1
  107. package/www/build/p-a5f739b0.entry.js +0 -2
  108. package/www/build/p-a5f739b0.entry.js.map +0 -1
@@ -1 +1 @@
1
- {"file":"z-file-upload.entry.cjs.js","mappings":";;;;;;;;;AAAA,MAAM,SAAS,GAAG,y9EAAy9E,CAAC;AAC5+E,0BAAe,SAAS;;MCQX,WAAW;;;;QA+Ed,oBAAe,GAAG;YACxB,IAAI,EAAE,MAAM;YACZ,EAAE,EAAE,WAAW;YACf,QAAQ,EAAE,IAAI;SACf,CAAC;oBAhFsBA,uBAAe,CAAC,OAAO;;;;;;qBAwB/B,EAAE;8BAIQ,QAAQ;gCAIN,+CAA+C;;sCAQzC,QAAQ;6BAIjB,6BAA6B;+BAI3B,uBAAuB;;kCAQpB,sBAAsB;8BAIzB,IAAI;;;;IAwB/B,kBAAkB,CAAC,CAAc;QAC/B,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;KAClC;;IAID,mBAAmB,CAAC,CAAc;QAChC,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC;QAC5B,IAAI,CAAC,gBAAgB,EAAE,CAAC;KACzB;IAED,kBAAkB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AAC,eAAe,EAChC,YAAY,EAAE,OAAO,IAAI,CAAC,YAAY,GAAG,IAAI,GAAG,EAAoB,CAAC,EACrE,sBAAsB,EAAE,OAAO,IAAI,CAAC,YAAY,GAAG,IAAI,GAAG,EAAoB,CAAC,IAE9E,IAAI,CAAC,uBAAuB,EAAE,CACvB,CACX,CACI,EACP;KACH;;;;;;;","names":["ZFileUploadType","getDevice","Device","h","DividerSize","Host"],"sources":["src/components/file-upload/z-file-upload/styles.css?tag=z-file-upload&encapsulation=shadow","src/components/file-upload/z-file-upload/index.tsx"],"sourcesContent":["*:focus {\n box-shadow: var(--shadow-focus-primary);\n outline: none !important;\n}\n\n:host {\n color: var(--color-default-text);\n font-family: var(--font-family-sans);\n font-weight: var(--font-rg);\n}\n\n:host > .container {\n display: flex;\n flex-direction: column;\n}\n\n:host .modal-wrapper {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: calc(var(--space-unit) * 2);\n}\n\n:host .modal-wrapper > .files-wrapper {\n display: flex;\n flex-direction: column;\n margin: calc(var(--space-unit) * 4);\n gap: var(--space-unit);\n}\n\n:host .text-container {\n display: flex;\n flex-direction: column;\n margin: auto;\n}\n\n:host .text-container .body-1 {\n text-align: center;\n}\n\n:host .text-container .upload-link {\n color: var(--color-link-primary);\n cursor: pointer;\n}\n\n:host .text-container .upload-link-text {\n margin-bottom: var(--space-unit);\n}\n\ninput#file-elem {\n display: none;\n}\n\n#title {\n display: inline-block;\n margin: calc(var(--space-unit) * 2.5) 0 calc(var(--space-unit) * 4);\n font-size: calc(var(--space-unit) * 3);\n font-weight: var(--font-sb);\n}\n\n:host > .container > z-button {\n display: inline-block;\n margin-top: calc(var(--space-unit) * 3);\n}\n\n:host > .container > .files-container.hidden {\n display: none;\n}\n\n:host > .container > .files-container > .heading-4-sb {\n display: inline-block;\n margin: calc(var(--space-unit) * 3) 0;\n font-size: calc(var(--space-unit) * 2);\n font-weight: var(--font-sb);\n}\n\n:host([type=\"dragdrop\"]) > .container > .files-container > .heading-4-sb {\n margin-top: 0;\n margin-bottom: calc(var(--space-unit) * 3);\n}\n\n:host > .container > .files-container > .files-wrapper {\n display: flex;\n flex-wrap: wrap;\n column-gap: calc(var(--space-unit) * 2);\n row-gap: calc(var(--space-unit) * 2);\n}\n\n:host > .container > .files-container > z-divider {\n margin-top: calc(var(--space-unit) * 3);\n margin-bottom: 0;\n}\n\n:host([type=\"dragdrop\"]) > .container > .files-container > z-divider {\n margin: calc(var(--space-unit) * 3) 0;\n}\n\n:host .error-message {\n font-size: 14px;\n font-weight: 400;\n letter-spacing: 0.16%;\n line-height: 20px;\n text-align: left;\n}\n\n:host .error-message > .file-name {\n font-weight: 600;\n}\n\n/* Tablet breakpoint */\n@media only screen and (min-width: 768px) {\n :host > .container > z-button {\n align-self: flex-start;\n }\n\n :host .modal-wrapper {\n padding: calc(var(--space-unit) * 3);\n }\n}\n\n@media only screen and (min-width: 1152px) {\n :host .modal-wrapper {\n padding: calc(var(--space-unit) * 4);\n }\n}\n","import {Component, Element, Event, EventEmitter, Host, Listen, Method, Prop, State, h} from \"@stencil/core\";\nimport {ButtonVariant, Device, DividerSize, ZFileUploadType} from \"../../../beans\";\nimport {getDevice} from \"../../../utils/utils\";\n\n@Component({\n tag: \"z-file-upload\",\n styleUrl: \"styles.css\",\n shadow: true,\n})\nexport class ZFileUpload {\n /** Prop indicating the file upload type - can be default or dragdrop */\n @Prop({reflect: true})\n type: ZFileUploadType = ZFileUploadType.DEFAULT;\n\n /** Prop indicating the button variant*/\n @Prop()\n buttonVariant?: ButtonVariant;\n\n /** Prop indicating the accepted file type: ex \".pdf, .doc, .jpg\" */\n @Prop()\n acceptedFormat?: string;\n\n /** Max file dimension in Megabyte */\n @Prop()\n fileMaxSize?: number;\n\n /** Title */\n @Prop()\n mainTitle?: string;\n\n /** Description */\n @Prop()\n description?: string;\n\n /** Files added by the user */\n @State()\n files: File[] = [];\n\n /** upoload button label */\n @Prop()\n uploadBtnLabel?: string = \"allega\";\n\n /** drag & drop button label */\n @Prop()\n dragAndDropLabel?: string = \"Rilascia i file in questa area per allegarli.\";\n\n /** allowed file message */\n @Prop()\n allowedFilesMessage?: string;\n\n /** upload clickable message */\n @Prop()\n uploadClickableMessage?: string = \"Carica\";\n\n /** upload message */\n @Prop()\n uploadMessage?: string = \"o trascina dal tuo computer\";\n\n /** error modal title */\n @Prop()\n errorModalTitle?: string = \"Errore di caricamento\";\n\n /** error modal message */\n @Prop()\n errorModalMessage?: string;\n\n /** loaded files label */\n @Prop()\n uploadedFilesLabel?: string = \"File appena caricati\";\n\n /** uploaded files history rendering */\n @Prop()\n hasFileSection?: boolean = true;\n\n /** List of files not allowed to be uploaded */\n @State()\n invalidFiles: Map<string, string[]>;\n\n @Element() el: HTMLZFileUploadElement;\n\n private input: HTMLInputElement;\n\n private button: HTMLZButtonElement;\n\n private errorModal: HTMLZModalElement;\n\n private uploadLink: HTMLSpanElement;\n\n private inputAttributes = {\n type: \"file\",\n id: \"file-elem\",\n multiple: true,\n };\n\n /** Listen removeFile event sent from z-file component */\n @Listen(\"removeFile\")\n removeFileListener(e: CustomEvent): void {\n this.removeFileHandler(e.detail);\n }\n\n /** Listen fileDropped event sent from z-dragdrop-area component */\n @Listen(\"fileDropped\")\n fileDroppedListener(e: CustomEvent): void {\n this.input.files = e.detail;\n this.fileInputHandler();\n }\n\n componentDidUpdate(): void {\n this.handleAccessibility();\n this.invalidFiles.size && this.errorModal.focus();\n }\n\n componentWillLoad(): void {\n this.invalidFiles = new Map<string, string[]>();\n }\n\n /** Emitted when user select one or more files */\n @Event()\n fileInput: EventEmitter;\n\n private fileInputHandler(): void {\n if (this.input.files.length) {\n this.invalidFiles = this.checkFiles(Array.from(this.input.files));\n }\n }\n\n /** get array of uploaded files */\n @Method()\n async getFiles(): Promise<File[]> {\n return this.files;\n }\n\n /** remove file from the array */\n @Method()\n async removeFile(fileName: string): Promise<void> {\n this.removeFileHandler(fileName);\n }\n\n private removeFileHandler(fileName: string): void {\n const files = this.files;\n const file = files.find((file) => file.name === fileName);\n if (file) {\n const index = files.indexOf(file);\n if (index >= 0) {\n files.splice(index, 1);\n this.files = [...files];\n }\n }\n }\n\n private getType(): ZFileUploadType {\n if (getDevice() !== Device.DESKTOP && getDevice() !== Device.DESKTOP_WIDE) {\n return ZFileUploadType.DEFAULT;\n }\n\n return this.type;\n }\n\n private handleAccessibility(): void {\n const lastFile = this.el.querySelector(\"z-file:last-child z-chip button\");\n if (this.files.length > 0 && lastFile) {\n (lastFile as HTMLElement).focus();\n } else {\n this.getType() === ZFileUploadType.DEFAULT\n ? this.button.querySelector(\"button\").focus()\n : this.uploadLink.focus();\n }\n }\n\n private checkFiles(files: File[]): Map<string, string[]> {\n const errors = new Map<string, string[]>();\n const sizeErrorString = `supera il limite di ${this.fileMaxSize}MB`;\n const formatErrorString = \" ha un formato non supportato\";\n files.forEach((file: File) => {\n const fileSize = file.size / 1024 / 1024;\n const fileFormatOk = this.acceptedFormat\n .split(\",\")\n .some((ext: string) => file.name.toLowerCase().endsWith(ext.trim()));\n const fileSizeOk = fileSize <= this.fileMaxSize;\n if (fileSizeOk && fileFormatOk) {\n if (!this.files.find((f) => f.name === file.name)) {\n this.files.push(file);\n this.fileInput.emit(file);\n this.input.value = \"\";\n }\n\n return;\n }\n errors.set(file.name, []);\n if (!fileSizeOk) {\n errors.get(file.name).push(sizeErrorString);\n }\n if (!fileFormatOk) {\n errors.get(file.name).push(formatErrorString);\n }\n });\n\n return errors;\n }\n\n private renderTitle(): HTMLElement {\n return <span id=\"title\">{this.mainTitle}</span>;\n }\n\n private renderDescription(cssClass): HTMLElement {\n return <span class={cssClass}>{this.description}</span>;\n }\n\n private renderAllowedFileExtensions(): HTMLElement {\n let fileFormatString = \"\";\n let fileWeightString = \"\";\n\n if (this.acceptedFormat) {\n const fileFormat = this.acceptedFormat\n .split(\", \")\n .map((string) => string.substring(1).toUpperCase())\n .join(\", \");\n fileFormatString = ` nei formati ${fileFormat}`;\n }\n\n if (this.fileMaxSize) {\n fileWeightString = ` per un massimo di ${this.fileMaxSize}MB di peso`;\n }\n\n const finalString = `Puoi allegare file${fileFormatString}${fileWeightString}.`;\n\n return (\n <span class=\"body-3\">\n {this.allowedFilesMessage\n ? this.allowedFilesMessage\n : fileFormatString || fileWeightString\n ? finalString\n : null}\n </span>\n );\n }\n\n private renderFileSection(): HTMLElement {\n if (!this.hasFileSection) {\n return;\n }\n\n return (\n <section class={`files-container ${!this.files.length ? \"hidden\" : \"\"}`}>\n <span class=\"heading-4-sb\">{this.uploadedFilesLabel}</span>\n <div class=\"files-wrapper\">\n <slot name=\"files\" />\n </div>\n <z-divider size={DividerSize.MEDIUM} />\n </section>\n );\n }\n\n private renderInput(): HTMLInputElement {\n return (\n <input\n {...this.inputAttributes}\n onChange={() => this.fileInputHandler()}\n accept={this.acceptedFormat}\n ref={(val) => (this.input = val)}\n />\n );\n }\n\n private renderUploadButton(): unknown[] {\n return [\n this.renderInput(),\n <z-button\n onClick={() => this.input.click()}\n onKeyPress={(e) => {\n if (e.code == \"Space\" || e.code == \"Enter\") {\n e.preventDefault();\n this.input.click();\n }\n }}\n id=\"fileSelect\"\n variant={this.buttonVariant}\n icon=\"upload\"\n ref={(val) => (this.button = val)}\n >\n {this.uploadBtnLabel}\n </z-button>,\n ];\n }\n\n private renderUploadLink(): unknown[] {\n return [\n this.renderInput(),\n <span class=\"body-1 upload-link-text\">\n <span\n tabIndex={0}\n class=\"body-1-sb upload-link\"\n onClick={() => this.input.click()}\n onKeyPress={(e) => {\n if (e.code == \"Space\" || e.code == \"Enter\") {\n e.preventDefault();\n this.input.click();\n }\n }}\n ref={(val) => (this.uploadLink = val)}\n >\n {this.uploadClickableMessage}\n </span>{\" \"}\n {this.uploadMessage}\n </span>,\n ];\n }\n\n private renderDefaultMode(): unknown[] {\n return [\n this.renderDescription(\"body-3-sb\"),\n this.renderAllowedFileExtensions(),\n this.renderFileSection(),\n this.renderUploadButton(),\n ];\n }\n\n private renderDragDropMode(): unknown[] {\n return [\n this.renderFileSection(),\n <z-dragdrop-area drag-and-drop-label={this.dragAndDropLabel}>\n <div class=\"text-container\">\n {this.renderDescription(\"body-1\")}\n {this.renderUploadLink()}\n {this.renderAllowedFileExtensions()}\n </div>\n </z-dragdrop-area>,\n ];\n }\n\n private formatErrorString(key, value): string {\n const bothErrors = value[0] && value[1] ? \" e \" : \"\";\n\n return (\n <span class=\"error-message\">\n Il file <span class=\"file-name\">{key}</span> {value[1] ?? \"\"}\n {bothErrors}\n {value[0] ?? \"\"}.\n </span>\n );\n }\n\n private handleErrorModalContent(): HTMLDivElement {\n return (\n <div slot=\"modalContent\">\n <div class=\"modal-wrapper\">\n <div class=\"files\">\n {this.errorModalMessage ? (\n <span class=\"body-3\">{this.errorModalMessage}</span>\n ) : (\n Array.from(this.invalidFiles).map(([key, value]) => {\n return <span class=\"body-3\">{this.formatErrorString(key, value)}</span>;\n })\n )}\n </div>\n </div>\n </div>\n );\n }\n\n render(): HTMLZFileUploadElement {\n return (\n <Host>\n <div class={`container ${this.getType()}`}>\n {this.mainTitle && this.renderTitle()}\n {this.getType() == ZFileUploadType.DEFAULT ? this.renderDefaultMode() : this.renderDragDropMode()}\n </div>\n {!!this.invalidFiles.size && (\n <z-modal\n modalid={`file-upload-${this.type}-error-modal`}\n tabIndex={0}\n ref={(val) => (this.errorModal = val)}\n modaltitle={this.errorModalTitle}\n onModalClose={() => (this.invalidFiles = new Map<string, string[]>())}\n onModalBackgroundClick={() => (this.invalidFiles = new Map<string, string[]>())}\n >\n {this.handleErrorModalContent()}\n </z-modal>\n )}\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"z-file-upload.entry.cjs.js","mappings":";;;;;;;;;AAAA,MAAM,SAAS,GAAG,kgFAAkgF,CAAC;AACrhF,0BAAe,SAAS;;MCQX,WAAW;;;;QA+Ed,oBAAe,GAAG;YACxB,IAAI,EAAE,MAAM;YACZ,EAAE,EAAE,WAAW;YACf,QAAQ,EAAE,IAAI;SACf,CAAC;oBAhFsBA,uBAAe,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AAI,CAAC,SAAS,IAAI,IAAI,CAAC,WAAW,EAAE,EACpC,IAAI,CAAC,OAAO,EAAE,IAAIH,uBAAe,CAAC,OAAO,GAAG,IAAI,CAAC,iBAAiB,EAAE,GAAG,IAAI,CAAC,kBAAkB,EAAE,CAC7F,EACL,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,KACvBG,sEACE,OAAO,EAAE,eAAe,IAAI,CAAC,IAAI,cAAc,EAC/C,QAAQ,EAAE,CAAC,EACX,GAAG,EAAE,CAAC,GAAG,MAAM,IAAI,CAAC,UAAU,GAAG,GAAG,CAAC,EACrC,UAAU,EAAE,IAAI,CAAC,eAAe,EAChC,YAAY,EAAE,OAAO,IAAI,CAAC,YAAY,GAAG,IAAI,GAAG,EAAoB,CAAC,EACrE,sBAAsB,EAAE,OAAO,IAAI,CAAC,YAAY,GAAG,IAAI,GAAG,EAAoB,CAAC,IAE9E,IAAI,CAAC,uBAAuB,EAAE,CACvB,CACX,CACI,EACP;KACH;;;;;;;","names":["ZFileUploadType","getDevice","Device","h","DividerSize","Host"],"sources":["src/components/file-upload/z-file-upload/styles.css?tag=z-file-upload&encapsulation=shadow","src/components/file-upload/z-file-upload/index.tsx"],"sourcesContent":[":host {\n color: var(--color-default-text);\n font-family: var(--font-family-sans);\n font-weight: var(--font-rg);\n}\n\n:host > .container {\n display: flex;\n flex-direction: column;\n}\n\n:host .modal-wrapper {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: calc(var(--space-unit) * 2);\n}\n\n:host .modal-wrapper > .files-wrapper {\n display: flex;\n flex-direction: column;\n margin: calc(var(--space-unit) * 4);\n gap: var(--space-unit);\n}\n\n:host .text-container {\n display: flex;\n flex-direction: column;\n margin: auto;\n}\n\n:host .text-container .body-1 {\n text-align: center;\n}\n\n:host .text-container .upload-link {\n color: var(--color-link-primary);\n cursor: pointer;\n}\n\n:host .text-container .upload-link:focus-visible {\n box-shadow: var(--shadow-focus-primary);\n outline: none !important;\n}\n\n:host .text-container .upload-link-text {\n margin-bottom: var(--space-unit);\n}\n\ninput#file-elem {\n display: none;\n}\n\n#title {\n display: inline-block;\n margin: calc(var(--space-unit) * 2.5) 0 calc(var(--space-unit) * 4);\n font-size: calc(var(--space-unit) * 3);\n font-weight: var(--font-sb);\n}\n\n:host > .container > z-button {\n display: inline-block;\n margin-top: calc(var(--space-unit) * 3);\n}\n\n:host > .container > .files-container.hidden {\n display: none;\n}\n\n:host > .container > .files-container > .heading-4-sb {\n display: inline-block;\n margin: calc(var(--space-unit) * 3) 0;\n font-size: calc(var(--space-unit) * 2);\n font-weight: var(--font-sb);\n}\n\n:host([type=\"dragdrop\"]) > .container > .files-container > .heading-4-sb {\n margin-top: 0;\n margin-bottom: calc(var(--space-unit) * 3);\n}\n\n:host > .container > .files-container > .files-wrapper {\n display: flex;\n flex-wrap: wrap;\n column-gap: calc(var(--space-unit) * 2);\n row-gap: calc(var(--space-unit) * 2);\n}\n\n:host > .container > .files-container > z-divider {\n margin-top: calc(var(--space-unit) * 3);\n margin-bottom: 0;\n}\n\n:host([type=\"dragdrop\"]) > .container > .files-container > z-divider {\n margin: calc(var(--space-unit) * 3) 0;\n}\n\n:host .error-message {\n font-size: 14px;\n font-weight: 400;\n letter-spacing: 0.16%;\n line-height: 20px;\n text-align: left;\n}\n\n:host .error-message > .file-name {\n font-weight: 600;\n}\n\n/* Tablet breakpoint */\n@media only screen and (min-width: 768px) {\n :host > .container > z-button {\n align-self: flex-start;\n }\n\n :host .modal-wrapper {\n padding: calc(var(--space-unit) * 3);\n }\n}\n\n@media only screen and (min-width: 1152px) {\n :host .modal-wrapper {\n padding: calc(var(--space-unit) * 4);\n }\n}\n","import {Component, Element, Event, EventEmitter, Host, Listen, Method, Prop, State, h} from \"@stencil/core\";\nimport {ButtonVariant, Device, DividerSize, ZFileUploadType} from \"../../../beans\";\nimport {getDevice} from \"../../../utils/utils\";\n\n@Component({\n tag: \"z-file-upload\",\n styleUrl: \"styles.css\",\n shadow: true,\n})\nexport class ZFileUpload {\n /** Prop indicating the file upload type - can be default or dragdrop */\n @Prop({reflect: true})\n type: ZFileUploadType = ZFileUploadType.DEFAULT;\n\n /** Prop indicating the button variant*/\n @Prop()\n buttonVariant?: ButtonVariant;\n\n /** Prop indicating the accepted file type: ex \".pdf, .doc, .jpg\" */\n @Prop()\n acceptedFormat?: string;\n\n /** Max file dimension in Megabyte */\n @Prop()\n fileMaxSize?: number;\n\n /** Title */\n @Prop()\n mainTitle?: string;\n\n /** Description */\n @Prop()\n description?: string;\n\n /** Files added by the user */\n @State()\n files: File[] = [];\n\n /** upoload button label */\n @Prop()\n uploadBtnLabel?: string = \"allega\";\n\n /** drag & drop button label */\n @Prop()\n dragAndDropLabel?: string = \"Rilascia i file in questa area per allegarli.\";\n\n /** allowed file message */\n @Prop()\n allowedFilesMessage?: string;\n\n /** upload clickable message */\n @Prop()\n uploadClickableMessage?: string = \"Carica\";\n\n /** upload message */\n @Prop()\n uploadMessage?: string = \"o trascina dal tuo computer\";\n\n /** error modal title */\n @Prop()\n errorModalTitle?: string = \"Errore di caricamento\";\n\n /** error modal message */\n @Prop()\n errorModalMessage?: string;\n\n /** loaded files label */\n @Prop()\n uploadedFilesLabel?: string = \"File appena caricati\";\n\n /** uploaded files history rendering */\n @Prop()\n hasFileSection?: boolean = true;\n\n /** List of files not allowed to be uploaded */\n @State()\n invalidFiles: Map<string, string[]>;\n\n @Element() el: HTMLZFileUploadElement;\n\n private input: HTMLInputElement;\n\n private button: HTMLZButtonElement;\n\n private errorModal: HTMLZModalElement;\n\n private uploadLink: HTMLSpanElement;\n\n private inputAttributes = {\n type: \"file\",\n id: \"file-elem\",\n multiple: true,\n };\n\n /** Listen removeFile event sent from z-file component */\n @Listen(\"removeFile\")\n removeFileListener(e: CustomEvent): void {\n this.removeFileHandler(e.detail);\n }\n\n /** Listen fileDropped event sent from z-dragdrop-area component */\n @Listen(\"fileDropped\")\n fileDroppedListener(e: CustomEvent): void {\n this.input.files = e.detail;\n this.fileInputHandler();\n }\n\n componentDidUpdate(): void {\n this.handleAccessibility();\n this.invalidFiles.size && this.errorModal.focus();\n }\n\n componentWillLoad(): void {\n this.invalidFiles = new Map<string, string[]>();\n }\n\n /** Emitted when user select one or more files */\n @Event()\n fileInput: EventEmitter;\n\n private fileInputHandler(): void {\n if (this.input.files.length) {\n this.invalidFiles = this.checkFiles(Array.from(this.input.files));\n }\n }\n\n /** get array of uploaded files */\n @Method()\n async getFiles(): Promise<File[]> {\n return this.files;\n }\n\n /** remove file from the array */\n @Method()\n async removeFile(fileName: string): Promise<void> {\n this.removeFileHandler(fileName);\n }\n\n private removeFileHandler(fileName: string): void {\n const files = this.files;\n const file = files.find((file) => file.name === fileName);\n if (file) {\n const index = files.indexOf(file);\n if (index >= 0) {\n files.splice(index, 1);\n this.files = [...files];\n }\n }\n }\n\n private getType(): ZFileUploadType {\n if (getDevice() !== Device.DESKTOP && getDevice() !== Device.DESKTOP_WIDE) {\n return ZFileUploadType.DEFAULT;\n }\n\n return this.type;\n }\n\n private handleAccessibility(): void {\n const lastFile = this.el.querySelector(\"z-file:last-child z-chip button\");\n if (this.files.length > 0 && lastFile) {\n (lastFile as HTMLElement).focus();\n } else {\n this.getType() === ZFileUploadType.DEFAULT\n ? this.button.querySelector(\"button\").focus()\n : this.uploadLink.focus();\n }\n }\n\n private checkFiles(files: File[]): Map<string, string[]> {\n const errors = new Map<string, string[]>();\n const sizeErrorString = `supera il limite di ${this.fileMaxSize}MB`;\n const formatErrorString = \" ha un formato non supportato\";\n files.forEach((file: File) => {\n const fileSize = file.size / 1024 / 1024;\n const fileFormatOk = this.acceptedFormat\n .split(\",\")\n .some((ext: string) => file.name.toLowerCase().endsWith(ext.trim()));\n const fileSizeOk = fileSize <= this.fileMaxSize;\n if (fileSizeOk && fileFormatOk) {\n if (!this.files.find((f) => f.name === file.name)) {\n this.files.push(file);\n this.fileInput.emit(file);\n this.input.value = \"\";\n }\n\n return;\n }\n errors.set(file.name, []);\n if (!fileSizeOk) {\n errors.get(file.name).push(sizeErrorString);\n }\n if (!fileFormatOk) {\n errors.get(file.name).push(formatErrorString);\n }\n });\n\n return errors;\n }\n\n private renderTitle(): HTMLElement {\n return <span id=\"title\">{this.mainTitle}</span>;\n }\n\n private renderDescription(cssClass): HTMLElement {\n return <span class={cssClass}>{this.description}</span>;\n }\n\n private renderAllowedFileExtensions(): HTMLElement {\n let fileFormatString = \"\";\n let fileWeightString = \"\";\n\n if (this.acceptedFormat) {\n const fileFormat = this.acceptedFormat\n .split(\", \")\n .map((string) => string.substring(1).toUpperCase())\n .join(\", \");\n fileFormatString = ` nei formati ${fileFormat}`;\n }\n\n if (this.fileMaxSize) {\n fileWeightString = ` per un massimo di ${this.fileMaxSize}MB di peso`;\n }\n\n const finalString = `Puoi allegare file${fileFormatString}${fileWeightString}.`;\n\n return (\n <span class=\"body-3\">\n {this.allowedFilesMessage\n ? this.allowedFilesMessage\n : fileFormatString || fileWeightString\n ? finalString\n : null}\n </span>\n );\n }\n\n private renderFileSection(): HTMLElement {\n if (!this.hasFileSection) {\n return;\n }\n\n return (\n <section class={`files-container ${!this.files.length ? \"hidden\" : \"\"}`}>\n <span class=\"heading-4-sb\">{this.uploadedFilesLabel}</span>\n <div class=\"files-wrapper\">\n <slot name=\"files\" />\n </div>\n <z-divider size={DividerSize.MEDIUM} />\n </section>\n );\n }\n\n private renderInput(): HTMLInputElement {\n return (\n <input\n {...this.inputAttributes}\n onChange={() => this.fileInputHandler()}\n accept={this.acceptedFormat}\n ref={(val) => (this.input = val)}\n />\n );\n }\n\n private renderUploadButton(): unknown[] {\n return [\n this.renderInput(),\n <z-button\n onClick={() => this.input.click()}\n onKeyPress={(e) => {\n if (e.code == \"Space\" || e.code == \"Enter\") {\n e.preventDefault();\n this.input.click();\n }\n }}\n id=\"fileSelect\"\n variant={this.buttonVariant}\n icon=\"upload\"\n ref={(val) => (this.button = val)}\n >\n {this.uploadBtnLabel}\n </z-button>,\n ];\n }\n\n private renderUploadLink(): unknown[] {\n return [\n this.renderInput(),\n <span class=\"body-1 upload-link-text\">\n <span\n tabIndex={0}\n class=\"body-1-sb upload-link\"\n onClick={() => this.input.click()}\n onKeyPress={(e) => {\n if (e.code == \"Space\" || e.code == \"Enter\") {\n e.preventDefault();\n this.input.click();\n }\n }}\n ref={(val) => (this.uploadLink = val)}\n >\n {this.uploadClickableMessage}\n </span>{\" \"}\n {this.uploadMessage}\n </span>,\n ];\n }\n\n private renderDefaultMode(): unknown[] {\n return [\n this.renderDescription(\"body-3-sb\"),\n this.renderAllowedFileExtensions(),\n this.renderFileSection(),\n this.renderUploadButton(),\n ];\n }\n\n private renderDragDropMode(): unknown[] {\n return [\n this.renderFileSection(),\n <z-dragdrop-area drag-and-drop-label={this.dragAndDropLabel}>\n <div class=\"text-container\">\n {this.renderDescription(\"body-1\")}\n {this.renderUploadLink()}\n {this.renderAllowedFileExtensions()}\n </div>\n </z-dragdrop-area>,\n ];\n }\n\n private formatErrorString(key, value): string {\n const bothErrors = value[0] && value[1] ? \" e \" : \"\";\n\n return (\n <span class=\"error-message\">\n Il file <span class=\"file-name\">{key}</span> {value[1] ?? \"\"}\n {bothErrors}\n {value[0] ?? \"\"}.\n </span>\n );\n }\n\n private handleErrorModalContent(): HTMLDivElement {\n return (\n <div slot=\"modalContent\">\n <div class=\"modal-wrapper\">\n <div class=\"files\">\n {this.errorModalMessage ? (\n <span class=\"body-3\">{this.errorModalMessage}</span>\n ) : (\n Array.from(this.invalidFiles).map(([key, value]) => {\n return <span class=\"body-3\">{this.formatErrorString(key, value)}</span>;\n })\n )}\n </div>\n </div>\n </div>\n );\n }\n\n render(): HTMLZFileUploadElement {\n return (\n <Host>\n <div class={`container ${this.getType()}`}>\n {this.mainTitle && this.renderTitle()}\n {this.getType() == ZFileUploadType.DEFAULT ? this.renderDefaultMode() : this.renderDragDropMode()}\n </div>\n {!!this.invalidFiles.size && (\n <z-modal\n modalid={`file-upload-${this.type}-error-modal`}\n tabIndex={0}\n ref={(val) => (this.errorModal = val)}\n modaltitle={this.errorModalTitle}\n onModalClose={() => (this.invalidFiles = new Map<string, string[]>())}\n onModalBackgroundClick={() => (this.invalidFiles = new Map<string, string[]>())}\n >\n {this.handleErrorModalContent()}\n </z-modal>\n )}\n </Host>\n );\n }\n}\n"],"version":3}
@@ -62,8 +62,8 @@ export const Default = {
62
62
  "z-fab-extendable": args["z-fab-extendable"],
63
63
  })}
64
64
  >
65
- <z-icon name=${args.icon}></z-icon>
66
- <span>${args.label}</span>
65
+ ${args.icon ? html `<z-icon name=${args.icon}></z-icon>` : ""}
66
+ ${args.label ? html `<span>${args.label}</span>` : ""}
67
67
  </button>
68
68
  `,
69
69
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.stories.js","sourceRoot":"","sources":["../../../../../src/components/css-components/z-fab/index.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAC,QAAQ,EAAC,MAAM,6BAA6B,CAAC;AACrD,OAAO,EAAC,KAAK,EAAC,MAAM,4BAA4B,CAAC;AACjD,OAAO,oBAAoB,CAAC;AAC5B,OAAO,qBAAqB,CAAC;AAE7B;;;;;;;;;;;;;;GAcG;AACH,eAAe;IACb,KAAK,EAAE,MAAM;IACb,QAAQ,EAAE;QACR,IAAI,EAAE;YACJ,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC;YAC3B,OAAO,EAAE,EAAC,IAAI,EAAE,QAAQ,EAAC;SAC1B;QACD,IAAI,EAAE;YACJ,OAAO,EAAE,CAAC,SAAS,EAAE,aAAa,EAAE,eAAe,CAAC;YACpD,OAAO,EAAE,EAAC,IAAI,EAAE,cAAc,EAAC;SAChC;QACD,YAAY,EAAE;YACZ,OAAO,EAAE,CAAC,SAAS,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,iBAAiB,CAAC;YAChG,OAAO,EAAE,EAAC,IAAI,EAAE,cAAc,EAAC;SAChC;KACF;IACD,IAAI,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AK,iBAAiB;QAC1D,iBAAiB,EAAE,IAAI,CAAC,YAAY,KAAK,iBAAiB;QAC1D,iBAAiB,EAAE,IAAI,CAAC,YAAY,KAAK,iBAAiB;QAC1D,gBAAgB,EAAE,IAAI,CAAC,gBAAgB,CAAC;QACxC,kBAAkB,EAAE,IAAI,CAAC,kBAAkB,CAAC;KAC7C,CAAC;;qBAEa,IAAI,CAAC,IAAI;cAChB,IAAI,CAAC,KAAK;;;cAGV,QAAQ,CAAC;QACf,OAAO,EAAE,IAAI;QACb,MAAM,EAAE,IAAI;QACZ,aAAa,EAAE,IAAI;QACnB,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;GAIL;CACF,CAAC","sourcesContent":["import {html} from \"lit\";\nimport {classMap} from \"lit/directives/class-map.js\";\nimport {ICONS} from \"../../../constants/iconset\";\nimport \"../../z-icon/index\";\nimport \"./index.stories.css\";\n\n/**\n * You can use the `.z-fab` class on a `<button>` or `<a>` with some additional configuration class:\n * - Sizes: `.z-fab-small`, `.z-fab-x-small`. Default with no size classes, is `big`\n * - Color variants: `.z-fab-primary03`, `.z-fab-surface01`, `.z-fab-surface02`, `.z-fab-surface04`. Default with no color classes, is `primary01`\n * - `.z-fab-extended`: show the label (if any) near the icon\n * - `.z-fab-extendable`: label will be shown only on mouse hover and only on desktop viewports (don't add the `.z-fab-extended` class in this case)\n *\n * Some css custom properties are also available to customize the component:\n * - `--z-fab-right-offset`: the right offset of the fab button (Default: `--grid-margin`)\n * - `--z-fab-bottom-offset`: the bottom offset of the fab button (Default: `--grid-margin`)\n * - `--z-fab-icon-size`: the size of the icon (Default: `20px`)\n * - `--z-fab-icon-fill`: the fill color of the icon (Default: `--color-inverse-icon`)\n *\n * > NB: for the `extended` and `extendable` versions, always wrap the text of the label with some element (e.g. a `<span>`).\n */\nexport default {\n title: \"ZFab\",\n argTypes: {\n icon: {\n options: Object.keys(ICONS),\n control: {type: \"select\"},\n },\n size: {\n options: [\"default\", \"z-fab-small\", \"z-fab-x-small\"],\n control: {type: \"inline-radio\"},\n },\n colorVariant: {\n options: [\"default\", \"z-fab-primary03\", \"z-fab-surface01\", \"z-fab-surface02\", \"z-fab-surface04\"],\n control: {type: \"inline-radio\"},\n },\n },\n args: {\n \"colorVariant\": \"default\",\n \"icon\": \"question-mark-circle\",\n \"label\": \"Info\",\n \"size\": \"default\",\n \"z-fab-extendable\": false,\n \"z-fab-extended\": true,\n },\n parameters: {\n layout: \"fullscreen\",\n },\n tags: [\"!autodocs\"],\n};\n\nexport const Default = {\n render: (args) => html`\n <button\n class=${classMap({\n \"z-fab\": true,\n \"z-fab-small\": args.size === \"z-fab-small\",\n \"z-fab-x-small\": args.size === \"z-fab-x-small\",\n \"z-fab-primary03\": args.colorVariant === \"z-fab-primary03\",\n \"z-fab-surface01\": args.colorVariant === \"z-fab-surface01\",\n \"z-fab-surface02\": args.colorVariant === \"z-fab-surface02\",\n \"z-fab-surface04\": args.colorVariant === \"z-fab-surface04\",\n \"z-fab-extended\": args[\"z-fab-extended\"],\n \"z-fab-extendable\": args[\"z-fab-extendable\"],\n })}\n >\n <z-icon name=${args.icon}></z-icon>\n <span>${args.label}</span>\n </button>\n `,\n};\n\n/**\n * Multiple ZFab can be used in the same page (max 3), but only one can be \"default\". The other ones must have a smaller size and can't have the text.\n * You can space them by setting the `--z-fab-bottom-offset` CSS prop.\n */\nexport const Multiple = {\n render: (args) => html`\n <button\n class=${classMap({\n \"z-fab\": true,\n \"z-fab-small\": args.size === \"z-fab-small\",\n \"z-fab-x-small\": args.size === \"z-fab-x-small\",\n \"z-fab-primary03\": args.colorVariant === \"z-fab-primary03\",\n \"z-fab-surface01\": args.colorVariant === \"z-fab-surface01\",\n \"z-fab-surface02\": args.colorVariant === \"z-fab-surface02\",\n \"z-fab-surface04\": args.colorVariant === \"z-fab-surface04\",\n \"z-fab-extended\": args[\"z-fab-extended\"],\n \"z-fab-extendable\": args[\"z-fab-extendable\"],\n })}\n >\n <z-icon name=${args.icon}></z-icon>\n <span>${args.label}</span>\n </button>\n <button\n class=${classMap({\n \"z-fab\": true,\n \"fab2\": true,\n \"z-fab-small\": true,\n \"z-fab-surface01\": true,\n })}\n >\n <z-icon name=\"support\"></z-icon>\n </button>\n `,\n};\n"]}
1
+ {"version":3,"file":"index.stories.js","sourceRoot":"","sources":["../../../../../src/components/css-components/z-fab/index.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAC,QAAQ,EAAC,MAAM,6BAA6B,CAAC;AACrD,OAAO,EAAC,KAAK,EAAC,MAAM,4BAA4B,CAAC;AACjD,OAAO,oBAAoB,CAAC;AAC5B,OAAO,qBAAqB,CAAC;AAE7B;;;;;;;;;;;;;;GAcG;AACH,eAAe;IACb,KAAK,EAAE,MAAM;IACb,QAAQ,EAAE;QACR,IAAI,EAAE;YACJ,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC;YAC3B,OAAO,EAAE,EAAC,IAAI,EAAE,QAAQ,EAAC;SAC1B;QACD,IAAI,EAAE;YACJ,OAAO,EAAE,CAAC,SAAS,EAAE,aAAa,EAAE,eAAe,CAAC;YACpD,OAAO,EAAE,EAAC,IAAI,EAAE,cAAc,EAAC;SAChC;QACD,YAAY,EAAE;YACZ,OAAO,EAAE,CAAC,SAAS,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,iBAAiB,CAAC;YAChG,OAAO,EAAE,EAAC,IAAI,EAAE,cAAc,EAAC;SAChC;KACF;IACD,IAAI,EAAE;QACJ,cAAc,EAAE,SAAS;QACzB,MAAM,EAAE,sBAAsB;QAC9B,OAAO,EAAE,MAAM;QACf,MAAM,EAAE,SAAS;QACjB,kBAAkB,EAAE,KAAK;QACzB,gBAAgB,EAAE,IAAI;KACvB;IACD,UAAU,EAAE;QACV,MAAM,EAAE,YAAY;KACrB;IACD,IAAI,EAAE,CAAC,WAAW,CAAC;CACpB,CAAC;AAEF,MAAM,CAAC,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AY,KAAK,iBAAiB;QAC1D,gBAAgB,EAAE,IAAI,CAAC,gBAAgB,CAAC;QACxC,kBAAkB,EAAE,IAAI,CAAC,kBAAkB,CAAC;KAC7C,CAAC;;qBAEa,IAAI,CAAC,IAAI;cAChB,IAAI,CAAC,KAAK;;;cAGV,QAAQ,CAAC;QACf,OAAO,EAAE,IAAI;QACb,MAAM,EAAE,IAAI;QACZ,aAAa,EAAE,IAAI;QACnB,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;GAIL;CACF,CAAC","sourcesContent":["import {html} from \"lit\";\nimport {classMap} from \"lit/directives/class-map.js\";\nimport {ICONS} from \"../../../constants/iconset\";\nimport \"../../z-icon/index\";\nimport \"./index.stories.css\";\n\n/**\n * You can use the `.z-fab` class on a `<button>` or `<a>` with some additional configuration class:\n * - Sizes: `.z-fab-small`, `.z-fab-x-small`. Default with no size classes, is `big`\n * - Color variants: `.z-fab-primary03`, `.z-fab-surface01`, `.z-fab-surface02`, `.z-fab-surface04`. Default with no color classes, is `primary01`\n * - `.z-fab-extended`: show the label (if any) near the icon\n * - `.z-fab-extendable`: label will be shown only on mouse hover and only on desktop viewports (don't add the `.z-fab-extended` class in this case)\n *\n * Some css custom properties are also available to customize the component:\n * - `--z-fab-right-offset`: the right offset of the fab button (Default: `--grid-margin`)\n * - `--z-fab-bottom-offset`: the bottom offset of the fab button (Default: `--grid-margin`)\n * - `--z-fab-icon-size`: the size of the icon (Default: `20px`)\n * - `--z-fab-icon-fill`: the fill color of the icon (Default: `--color-inverse-icon`)\n *\n * > NB: for the `extended` and `extendable` versions, always wrap the text of the label with some element (e.g. a `<span>`).\n */\nexport default {\n title: \"ZFab\",\n argTypes: {\n icon: {\n options: Object.keys(ICONS),\n control: {type: \"select\"},\n },\n size: {\n options: [\"default\", \"z-fab-small\", \"z-fab-x-small\"],\n control: {type: \"inline-radio\"},\n },\n colorVariant: {\n options: [\"default\", \"z-fab-primary03\", \"z-fab-surface01\", \"z-fab-surface02\", \"z-fab-surface04\"],\n control: {type: \"inline-radio\"},\n },\n },\n args: {\n \"colorVariant\": \"default\",\n \"icon\": \"question-mark-circle\",\n \"label\": \"Info\",\n \"size\": \"default\",\n \"z-fab-extendable\": false,\n \"z-fab-extended\": true,\n },\n parameters: {\n layout: \"fullscreen\",\n },\n tags: [\"!autodocs\"],\n};\n\nexport const Default = {\n render: (args) => html`\n <button\n class=${classMap({\n \"z-fab\": true,\n \"z-fab-small\": args.size === \"z-fab-small\",\n \"z-fab-x-small\": args.size === \"z-fab-x-small\",\n \"z-fab-primary03\": args.colorVariant === \"z-fab-primary03\",\n \"z-fab-surface01\": args.colorVariant === \"z-fab-surface01\",\n \"z-fab-surface02\": args.colorVariant === \"z-fab-surface02\",\n \"z-fab-surface04\": args.colorVariant === \"z-fab-surface04\",\n \"z-fab-extended\": args[\"z-fab-extended\"],\n \"z-fab-extendable\": args[\"z-fab-extendable\"],\n })}\n >\n ${args.icon ? html`<z-icon name=${args.icon}></z-icon>` : \"\"}\n ${args.label ? html`<span>${args.label}</span>` : \"\"}\n </button>\n `,\n};\n\n/**\n * Multiple ZFab can be used in the same page (max 3), but only one can be \"default\". The other ones must have a smaller size and can't have the text.\n * You can space them by setting the `--z-fab-bottom-offset` CSS prop.\n */\nexport const Multiple = {\n render: (args) => html`\n <button\n class=${classMap({\n \"z-fab\": true,\n \"z-fab-small\": args.size === \"z-fab-small\",\n \"z-fab-x-small\": args.size === \"z-fab-x-small\",\n \"z-fab-primary03\": args.colorVariant === \"z-fab-primary03\",\n \"z-fab-surface01\": args.colorVariant === \"z-fab-surface01\",\n \"z-fab-surface02\": args.colorVariant === \"z-fab-surface02\",\n \"z-fab-surface04\": args.colorVariant === \"z-fab-surface04\",\n \"z-fab-extended\": args[\"z-fab-extended\"],\n \"z-fab-extendable\": args[\"z-fab-extendable\"],\n })}\n >\n <z-icon name=${args.icon}></z-icon>\n <span>${args.label}</span>\n </button>\n <button\n class=${classMap({\n \"z-fab\": true,\n \"fab2\": true,\n \"z-fab-small\": true,\n \"z-fab-surface01\": true,\n })}\n >\n <z-icon name=\"support\"></z-icon>\n </button>\n `,\n};\n"]}
@@ -21,6 +21,11 @@
21
21
  color: var(--color-default-text);
22
22
  }
23
23
 
24
+ :host > .dragdrop:focus-visible {
25
+ box-shadow: var(--shadow-focus-primary);
26
+ outline: none !important;
27
+ }
28
+
24
29
  /* https://stackoverflow.com/questions/7110353/html5-dragleave-fired-when-hovering-a-child-element */
25
30
  :host > .dragdrop.dragover * {
26
31
  pointer-events: none;
@@ -1,8 +1,3 @@
1
- *:focus {
2
- box-shadow: var(--shadow-focus-primary);
3
- outline: none !important;
4
- }
5
-
6
1
  :host {
7
2
  color: var(--color-default-text);
8
3
  font-family: var(--font-family-sans);
@@ -43,6 +38,11 @@
43
38
  cursor: pointer;
44
39
  }
45
40
 
41
+ :host .text-container .upload-link:focus-visible {
42
+ box-shadow: var(--shadow-focus-primary);
43
+ outline: none !important;
44
+ }
45
+
46
46
  :host .text-container .upload-link-text {
47
47
  margin-bottom: var(--space-unit);
48
48
  }
@@ -23,11 +23,6 @@ respecting the grid indications of the design. */
23
23
  box-sizing: border-box;
24
24
  }
25
25
 
26
- *:focus {
27
- box-shadow: var(--shadow-focus-primary);
28
- outline: none !important;
29
- }
30
-
31
26
  :host(:not([variant="overlay"])) .cover-container {
32
27
  position: relative;
33
28
  width: 100%;
@@ -1,9 +1,3 @@
1
- *:focus {
2
- border-radius: 50%;
3
- box-shadow: var(--shadow-focus-primary);
4
- outline: none !important;
5
- }
6
-
7
1
  :host {
8
2
  font-family: var(--font-family-sans);
9
3
  font-weight: var(--font-rg);
@@ -69,6 +63,12 @@
69
63
  cursor: pointer;
70
64
  }
71
65
 
66
+ .modal-container > header button:focus-visible {
67
+ border-radius: 50%;
68
+ box-shadow: var(--shadow-focus-primary);
69
+ outline: none !important;
70
+ }
71
+
72
72
  .modal-container > header z-icon {
73
73
  --z-icon-width: calc(var(--space-unit) * 2.25);
74
74
  --z-icon-height: calc(var(--space-unit) * 2.25);
@@ -14,11 +14,6 @@
14
14
  box-sizing: border-box;
15
15
  }
16
16
 
17
- *:focus {
18
- box-shadow: var(--shadow-focus-primary);
19
- outline: none !important;
20
- }
21
-
22
17
  .input-container {
23
18
  position: relative;
24
19
  display: flex;
@@ -860,7 +860,7 @@ if (window.HTMLDialogElement === undefined) {
860
860
  HTMLFormElement.prototype.submit = replacementFormSubmit;
861
861
  }
862
862
 
863
- const stylesCss = "*:focus{border-radius:50%;-webkit-box-shadow:var(--shadow-focus-primary);box-shadow:var(--shadow-focus-primary);outline:none !important}: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
+ 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 button:focus-visible{border-radius:50%;-webkit-box-shadow:var(--shadow-focus-primary);box-shadow:var(--shadow-focus-primary);outline:none !important}.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}}";
864
864
  const ZModalStyle0 = stylesCss;
865
865
 
866
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])';