@zanichelli/albe-web-components 19.2.3 → 19.2.5

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 (78) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/web-components-library.cjs.js +1 -1
  4. package/dist/cjs/z-app-header_12.cjs.entry.js +27 -9
  5. package/dist/cjs/z-app-header_12.cjs.entry.js.map +1 -1
  6. package/dist/cjs/z-breadcrumb.cjs.entry.js +5 -5
  7. package/dist/cjs/z-breadcrumb.cjs.entry.js.map +1 -1
  8. package/dist/cjs/z-notification.cjs.entry.js +2 -2
  9. package/dist/cjs/z-notification.cjs.entry.js.map +1 -1
  10. package/dist/collection/components/z-breadcrumb/index.js +5 -5
  11. package/dist/collection/components/z-breadcrumb/index.js.map +1 -1
  12. package/dist/collection/components/z-button/index.js +5 -2
  13. package/dist/collection/components/z-button/index.js.map +1 -1
  14. package/dist/collection/components/z-input/index.js +34 -5
  15. package/dist/collection/components/z-input/index.js.map +1 -1
  16. package/dist/collection/components/z-input-message/index.js +44 -2
  17. package/dist/collection/components/z-input-message/index.js.map +1 -1
  18. package/dist/collection/components/z-notification/index.js +3 -2
  19. package/dist/collection/components/z-notification/index.js.map +1 -1
  20. package/dist/collection/components/z-notification/index.stories.js +79 -77
  21. package/dist/collection/components/z-notification/index.stories.js.map +1 -1
  22. package/dist/collection/components/z-notification/styles.css +8 -6
  23. package/dist/components/index12.js +18 -5
  24. package/dist/components/index12.js.map +1 -1
  25. package/dist/components/index13.js +11 -4
  26. package/dist/components/index13.js.map +1 -1
  27. package/dist/components/index5.js +5 -2
  28. package/dist/components/index5.js.map +1 -1
  29. package/dist/components/z-breadcrumb.js +5 -5
  30. package/dist/components/z-breadcrumb.js.map +1 -1
  31. package/dist/components/z-notification.js +2 -2
  32. package/dist/components/z-notification.js.map +1 -1
  33. package/dist/esm/loader.js +1 -1
  34. package/dist/esm/web-components-library.js +1 -1
  35. package/dist/esm/z-app-header_12.entry.js +28 -10
  36. package/dist/esm/z-app-header_12.entry.js.map +1 -1
  37. package/dist/esm/z-breadcrumb.entry.js +5 -5
  38. package/dist/esm/z-breadcrumb.entry.js.map +1 -1
  39. package/dist/esm/z-notification.entry.js +2 -2
  40. package/dist/esm/z-notification.entry.js.map +1 -1
  41. package/dist/types/components/z-input/index.d.ts +3 -0
  42. package/dist/types/components/z-input-message/index.d.ts +4 -0
  43. package/dist/types/components/z-notification/index.d.ts +2 -1
  44. package/dist/types/components/z-notification/index.stories.d.ts +27 -22
  45. package/dist/types/components.d.ts +32 -4
  46. package/dist/web-components-library/p-07cd81f6.entry.js +2 -0
  47. package/dist/web-components-library/p-07cd81f6.entry.js.map +1 -0
  48. package/{www/build/p-9814f864.entry.js → dist/web-components-library/p-0d2a5f65.entry.js} +2 -2
  49. package/dist/web-components-library/p-0d2a5f65.entry.js.map +1 -0
  50. package/dist/web-components-library/p-299f6d64.entry.js +2 -0
  51. package/dist/web-components-library/p-299f6d64.entry.js.map +1 -0
  52. package/dist/web-components-library/web-components-library.css +1 -1
  53. package/dist/web-components-library/web-components-library.esm.js +1 -1
  54. package/dist/web-components-library/web-components-library.esm.js.map +1 -1
  55. package/package.json +1 -1
  56. package/www/build/p-07cd81f6.entry.js +2 -0
  57. package/www/build/p-07cd81f6.entry.js.map +1 -0
  58. package/{dist/web-components-library/p-9814f864.entry.js → www/build/p-0d2a5f65.entry.js} +2 -2
  59. package/www/build/p-0d2a5f65.entry.js.map +1 -0
  60. package/www/build/p-299f6d64.entry.js +2 -0
  61. package/www/build/p-299f6d64.entry.js.map +1 -0
  62. package/www/build/{p-813bd63b.css → p-c60c851a.css} +1 -1
  63. package/www/build/p-d969a9bf.js +2 -0
  64. package/www/build/web-components-library.css +1 -1
  65. package/www/build/web-components-library.esm.js +1 -1
  66. package/www/build/web-components-library.esm.js.map +1 -1
  67. package/www/index.html +1 -1
  68. package/dist/web-components-library/p-463e0ac0.entry.js +0 -2
  69. package/dist/web-components-library/p-463e0ac0.entry.js.map +0 -1
  70. package/dist/web-components-library/p-9814f864.entry.js.map +0 -1
  71. package/dist/web-components-library/p-be1c414e.entry.js +0 -2
  72. package/dist/web-components-library/p-be1c414e.entry.js.map +0 -1
  73. package/www/build/p-463e0ac0.entry.js +0 -2
  74. package/www/build/p-463e0ac0.entry.js.map +0 -1
  75. package/www/build/p-9814f864.entry.js.map +0 -1
  76. package/www/build/p-be1c414e.entry.js +0 -2
  77. package/www/build/p-be1c414e.entry.js.map +0 -1
  78. package/www/build/p-d3d3edf1.js +0 -2
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/z-input/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAC,MAAM,eAAe,CAAC;AACtG,OAAO,EAAC,QAAQ,EAAE,IAAI,EAAU,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAC,WAAW,EAAE,WAAW,EAAE,SAAS,EAAE,aAAa,EAAC,MAAM,aAAa,CAAC;AAC/E,OAAO,EAAC,OAAO,EAAE,QAAQ,EAAC,MAAM,mBAAmB,CAAC;AAQpD,MAAM,OAAO,MAAM;;QAmIT,kBAAa,GAAG,GAAG,CAAC;sBA9HnB,MAAM,QAAQ,EAAE,EAAE;;;;yBAgBf,EAAE;gCAIK,EAAE;;;;;wBAoBA,KAAK;wBAIL,KAAK;wBAIL,KAAK;uBAIN,KAAK;;;;uBAgBI,IAAI;6BAID,aAAa,CAAC,KAAK;;oBAQ5C,EAAE;4BAIgB,IAAI;;;;;;;;oBAgCR,WAAW,CAAC,GAAG;wBAGzB,KAAK;8BAGC,IAAI;;IASrB,kBAAkB,CAAC,CAAc;QAC/B,MAAM,IAAI,GAAG,CAAC,CAAC,MAAM,CAAC;QACtB,QAAQ,IAAI,CAAC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C,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC5C,CAAC;QAED,OAAO,EAAC,IAAI,uDAAE,KAAK,CAAQ,CAAC;IAC9B,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {Component, Element, Event, EventEmitter, Listen, Method, Prop, State, h} from \"@stencil/core\";\nimport {Fragment, Host, JSXBase} from \"@stencil/core/internal\";\nimport {ControlSize, InputStatus, InputType, LabelPosition} from \"../../beans\";\nimport {boolean, randomId} from \"../../utils/utils\";\n\n@Component({\n tag: \"z-input\",\n styleUrl: \"styles.css\",\n shadow: false,\n scoped: true,\n})\nexport class ZInput {\n @Element() hostElement: HTMLZInputElement;\n\n /** the id of the input element */\n @Prop()\n htmlid = `id-${randomId()}`;\n\n /** input types */\n @Prop()\n type: InputType;\n\n /** the input name */\n @Prop()\n name?: string;\n\n /** the input label */\n @Prop()\n label?: string;\n\n /** the input aria-label */\n @Prop()\n ariaLabel = \"\";\n\n /** the input aria-expaded: available for text, password, number, email */\n @Prop()\n htmlAriaExpanded = \"\";\n\n /** the input aria-controls (optional): available for text, password, number, email */\n @Prop()\n htmlAriaControls?: string;\n\n /** the input aria-autocomplete (optional): available for text, password, number, email */\n @Prop()\n htmlAriaAutocomplete?: string;\n\n /** the input aria-activedescendant (optional): available for text, password, number, email */\n @Prop()\n htmlAriaActivedescendant?: string;\n\n /** the input value */\n @Prop({mutable: true})\n value?: string;\n\n /** the input is disabled */\n @Prop({reflect: true})\n disabled?: boolean = false;\n\n /** the input is readonly */\n @Prop()\n readonly?: boolean = false;\n\n /** the input is required (optional): available for text, password, number, email, textarea, checkbox */\n @Prop()\n required?: boolean = false;\n\n /** checked: available for checkbox, radio */\n @Prop({mutable: true})\n checked?: boolean = false;\n\n /** the input placeholder (optional) */\n @Prop()\n placeholder?: string;\n\n /** the input html title (optional) */\n @Prop()\n htmltitle?: string;\n\n /** the input status (optional): available for text, password, number, email, textarea */\n @Prop()\n status?: InputStatus;\n\n /** input helper message (optional): available for text, password, number, email, textarea - if set to `false` message won't be displayed */\n @Prop()\n message?: string | boolean = true;\n\n /** the input label position: available for checkbox, radio */\n @Prop()\n labelPosition?: LabelPosition = LabelPosition.RIGHT;\n\n /** the input has autocomplete option (optional): available for text, password, number, email */\n @Prop()\n autocomplete?: string;\n\n /** the input role */\n @Prop()\n role = \"\";\n\n /** render clear icon when typing (optional): available for text */\n @Prop()\n hasclearicon?: boolean = true;\n\n /** render icon (optional): available for text */\n @Prop()\n icon?: string;\n\n /** min number value (optional): available for number */\n @Prop()\n min?: number;\n\n /** Min length value (optional): available for text */\n @Prop()\n minlength?: number;\n\n /** max number value (optional): available for number */\n @Prop()\n max?: number;\n\n /** Max length value (optional): available for text */\n @Prop()\n maxlength?: number;\n\n /** step number value (optional): available for number */\n @Prop()\n step?: number;\n\n /** pattern value (optional): available for tel, text, search, url, email, password*/\n @Prop()\n pattern?: string;\n\n /** Available sizes: `big`, `small` and `x-small`. Defaults to `big`. */\n @Prop({reflect: true})\n size?: ControlSize = ControlSize.BIG;\n\n @State()\n isTyping = false;\n\n @State()\n passwordHidden = true;\n\n private timer;\n\n private typingtimeout = 300;\n\n private inputRef: HTMLInputElement;\n\n @Listen(\"inputCheck\", {target: \"document\"})\n inputCheckListener(e: CustomEvent): void {\n const data = e.detail;\n switch (this.type) {\n case InputType.RADIO:\n if (data.type === InputType.RADIO && data.name === this.name && data.id !== this.htmlid) {\n this.checked = false;\n }\n break;\n }\n }\n\n /** get checked status */\n @Method()\n async isChecked(): Promise<boolean> {\n switch (this.type) {\n case InputType.CHECKBOX:\n case InputType.RADIO:\n return this.checked;\n default:\n console.warn(\"`isChecked` method is only available for type `checkbox` and `radio`\");\n\n return false;\n }\n }\n\n /** Emitted on input value change, returns value, validity */\n @Event()\n inputChange: EventEmitter;\n\n private emitInputChange(value: string): void {\n if (!this.isTyping) {\n this.emitStartTyping();\n }\n\n let validity: ValidityState;\n if (this.type === InputType.TEXTAREA) {\n validity = this.getValidity(\"textarea\");\n } else {\n validity = this.getValidity(\"input\");\n }\n this.value = value;\n this.inputChange.emit({value, validity});\n\n clearTimeout(this.timer);\n this.timer = setTimeout(() => {\n this.emitStopTyping(this.value, validity);\n }, this.typingtimeout);\n }\n\n /** Emitted when user starts typing */\n @Event()\n startTyping: EventEmitter;\n\n private emitStartTyping(): void {\n this.isTyping = true;\n this.startTyping.emit();\n }\n\n /** Emitted when user stops typing, returns value, validity */\n @Event()\n stopTyping: EventEmitter;\n\n private emitStopTyping(value: string, validity: ValidityState): void {\n this.isTyping = false;\n this.stopTyping.emit({\n value: value,\n validity: validity,\n });\n }\n\n /** Emitted on checkbox check/uncheck, returns id, checked, type, name, value, validity */\n @Event()\n inputCheck: EventEmitter;\n\n private emitInputCheck(checked: boolean): void {\n this.inputCheck.emit({\n id: this.htmlid,\n checked: checked,\n type: this.type,\n name: this.name,\n value: this.value,\n validity: this.getValidity(\"input\"),\n });\n }\n\n /** Emitted on input focus */\n @Event()\n inputFocus: EventEmitter;\n\n private emitInputFocus(): void {\n this.inputFocus.emit({id: this.htmlid});\n }\n\n /** Emitted on input blur */\n @Event()\n inputBlur: EventEmitter;\n\n private emitInputBlur(): void {\n this.inputBlur.emit({id: this.htmlid});\n }\n\n private getValidity(type: string): ValidityState {\n const input = this.hostElement.querySelector(type) as HTMLInputElement;\n\n return input.validity;\n }\n\n /* START text/password/email/number */\n\n private getTextAttributes(): JSXBase.InputHTMLAttributes<HTMLInputElement | HTMLTextAreaElement> {\n return {\n id: this.htmlid,\n name: this.name,\n placeholder: this.placeholder,\n value: this.value,\n disabled: this.disabled,\n readonly: this.readonly,\n required: this.required,\n title: this.htmltitle,\n minlength: this.minlength,\n maxlength: this.maxlength,\n class: {\n [`input-${this.status}`]: !!this.status,\n },\n autocomplete: this.autocomplete,\n onInput: (e: InputEvent) => this.emitInputChange((e.target as HTMLInputElement).value),\n };\n }\n\n private getNumberAttributes(type: InputType): JSXBase.InputHTMLAttributes<HTMLInputElement> {\n if (type != InputType.NUMBER) {\n return;\n }\n\n return {\n min: this.min,\n max: this.max,\n step: this.step,\n };\n }\n\n private getPatternAttribute(type: InputType): JSXBase.InputHTMLAttributes<HTMLInputElement> {\n if (\n type != InputType.PASSWORD &&\n type != InputType.TEXT &&\n type != InputType.TEL &&\n type != InputType.SEARCH &&\n type != InputType.URL &&\n type != InputType.EMAIL\n ) {\n return;\n }\n\n return {\n pattern: this.pattern,\n };\n }\n\n private getRoleAttribute(): JSXBase.InputHTMLAttributes<HTMLInputElement | HTMLTextAreaElement> {\n return this.role ? {role: this.role} : {};\n }\n\n private getAriaAttrubutes(): Record<string, unknown> {\n const expanded = this.htmlAriaExpanded ? {\"aria-expanded\": this.htmlAriaExpanded} : {};\n const controls = this.htmlAriaControls ? {\"aria-controls\": this.htmlAriaControls} : {};\n const autocomplete = this.htmlAriaAutocomplete ? {\"aria-autocomplete\": this.htmlAriaAutocomplete} : {};\n const activedescendant = this.htmlAriaActivedescendant\n ? {\"aria-activedescendant\": this.htmlAriaActivedescendant}\n : {};\n\n return {\n ...expanded,\n ...controls,\n ...autocomplete,\n ...activedescendant,\n };\n }\n\n private getFocusBlurAttributes(): JSXBase.InputHTMLAttributes<HTMLInputElement | HTMLTextAreaElement> {\n return {\n onFocus: () => this.emitInputFocus(),\n onBlur: () => this.emitInputBlur(),\n };\n }\n\n private renderInputText(type: InputType = InputType.TEXT): HTMLDivElement {\n const ariaLabel = this.ariaLabel ? {\"aria-label\": this.ariaLabel} : {};\n const attr = {\n ...this.getTextAttributes(),\n ...this.getNumberAttributes(type),\n ...this.getPatternAttribute(type),\n ...ariaLabel,\n ...this.getRoleAttribute(),\n ...this.getAriaAttrubutes(),\n ...this.getFocusBlurAttributes(),\n };\n if (this.icon || type === InputType.PASSWORD) {\n Object.assign(attr.class, {\"has-icon\": true});\n }\n if (this.hasclearicon && type != InputType.NUMBER) {\n Object.assign(attr.class, {\"has-clear-icon\": true});\n }\n\n return (\n <div class=\"text-wrapper\">\n {this.renderLabel()}\n <div>\n <input\n type={type === InputType.PASSWORD && !this.passwordHidden ? InputType.TEXT : type}\n {...attr}\n ref={(el) => (this.inputRef = el)}\n />\n {this.renderIcons()}\n </div>\n {this.renderMessage()}\n </div>\n );\n }\n\n private renderLabel(): HTMLLabelElement {\n if (!this.label) {\n return;\n }\n\n return (\n <label\n class=\"z-label body-5-sb\"\n id={`${this.htmlid}_label`}\n htmlFor={this.htmlid}\n >\n {this.label}\n </label>\n );\n }\n\n private renderIcons(): HTMLSpanElement {\n return (\n <span class=\"icons-wrapper\">\n {this.renderResetIcon()}\n {this.renderIcon()}\n </span>\n );\n }\n\n private renderIcon(): HTMLButtonElement {\n if (this.type === InputType.PASSWORD) {\n return this.renderShowHidePassword();\n }\n\n if (!this.icon) {\n return;\n }\n\n return (\n <z-icon\n name={this.icon}\n class={{[this.size]: true, \"input-icon\": true}}\n />\n );\n }\n\n private renderResetIcon(): HTMLButtonElement {\n let hidden = false;\n if (!this.hasclearicon || !this.value || this.disabled || this.readonly || this.type == InputType.NUMBER) {\n hidden = true;\n }\n\n return (\n <button\n type=\"button\"\n class={{\"reset-icon\": true, \"input-icon\": true, hidden}}\n aria-label=\"cancella il contenuto dell'input\"\n onClick={() => {\n this.inputRef.value = \"\";\n this.emitInputChange(\"\");\n }}\n >\n <z-icon\n name=\"multiply\"\n class={this.size}\n />\n </button>\n );\n }\n\n private renderShowHidePassword(): HTMLButtonElement {\n return (\n <button\n type=\"button\"\n class=\"input-icon toggle-password-icon\"\n disabled={this.disabled}\n aria-label={this.passwordHidden ? \"mostra password\" : \"nascondi password\"}\n onClick={() => (this.passwordHidden = !this.passwordHidden)}\n >\n <z-icon\n name={this.passwordHidden ? \"view-filled\" : \"view-off-filled\"}\n class={this.size}\n />\n </button>\n );\n }\n\n private renderMessage(): HTMLZInputMessageElement {\n if (boolean(this.message) === false) {\n return;\n }\n\n return (\n <z-input-message\n message={boolean(this.message) === true ? undefined : (this.message as string)}\n status={this.status}\n class={this.size}\n disabled={this.disabled}\n />\n );\n }\n\n /* END text/password/email/number */\n\n /* START textarea */\n\n private renderTextarea(): HTMLDivElement {\n const attributes = this.getTextAttributes();\n\n return (\n <Fragment>\n {this.renderLabel()}\n <div\n class={{\n ...(attributes.class as {[className: string]: boolean}),\n \"textarea-wrapper\": true,\n \"readonly\": !!attributes.readonly,\n }}\n >\n <textarea\n {...attributes}\n class={{\n ...(attributes.class as {[className: string]: boolean}),\n \"z-scrollbar\": true,\n }}\n aria-label={this.ariaLabel || undefined}\n {...this.getRoleAttribute()}\n ></textarea>\n </div>\n {this.renderMessage()}\n </Fragment>\n );\n }\n\n /* END textarea */\n\n private handleCheck(ev: Event): void {\n this.checked = (ev.target as HTMLInputElement).checked;\n this.emitInputCheck(this.checked);\n }\n\n /* START checkbox */\n private renderCheckbox(): HTMLDivElement {\n return (\n <div class=\"checkbox-wrapper\">\n <input\n id={this.htmlid}\n type=\"checkbox\"\n name={this.name}\n checked={this.checked}\n disabled={this.disabled}\n readonly={this.readonly}\n required={this.required}\n onChange={this.handleCheck.bind(this)}\n value={this.value}\n {...this.getRoleAttribute()}\n {...this.getFocusBlurAttributes()}\n />\n\n <label\n htmlFor={this.htmlid}\n class={{\n \"checkbox-label\": true,\n \"after\": this.labelPosition === LabelPosition.RIGHT,\n \"before\": this.labelPosition === LabelPosition.LEFT,\n }}\n >\n <z-icon\n name={this.checked ? \"checkbox-checked\" : \"checkbox\"}\n class={this.size}\n />\n {this.label && <span innerHTML={this.label}></span>}\n </label>\n </div>\n );\n }\n\n /* END checkbox */\n\n /* START radio */\n private renderRadio(): HTMLDivElement {\n return (\n <div class=\"radio-wrapper\">\n <input\n id={this.htmlid}\n type=\"radio\"\n name={this.name}\n checked={this.checked}\n disabled={this.disabled}\n readonly={this.readonly}\n onChange={this.handleCheck.bind(this)}\n value={this.value}\n {...this.getRoleAttribute()}\n {...this.getFocusBlurAttributes()}\n />\n\n <label\n htmlFor={this.htmlid}\n class={{\n \"radio-label\": true,\n \"after\": this.labelPosition === LabelPosition.RIGHT,\n \"before\": this.labelPosition === LabelPosition.LEFT,\n }}\n >\n <z-icon\n name={this.checked ? \"radio-button-checked\" : \"radio-button\"}\n class={this.size}\n />\n {this.label && <span innerHTML={this.label} />}\n </label>\n </div>\n );\n }\n /* END radio */\n\n render(): HTMLInputElement | HTMLDivElement {\n let input;\n switch (this.type) {\n case InputType.TEXTAREA:\n input = this.renderTextarea();\n break;\n case InputType.CHECKBOX:\n input = this.renderCheckbox();\n break;\n case InputType.RADIO:\n input = this.renderRadio();\n break;\n default:\n input = this.renderInputText(this.type);\n }\n\n return <Host>{input}</Host>;\n }\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/z-input/index.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ter, Listen, Method, Prop, State, h} from \"@stencil/core\";\nimport {Fragment, Host, JSXBase} from \"@stencil/core/internal\";\nimport {ControlSize, InputStatus, InputType, LabelPosition} from \"../../beans\";\nimport {boolean, randomId} from \"../../utils/utils\";\n\n@Component({\n tag: \"z-input\",\n styleUrl: \"styles.css\",\n shadow: false,\n scoped: true,\n})\nexport class ZInput {\n @Element() hostElement: HTMLZInputElement;\n\n /** the id of the input element */\n @Prop()\n htmlid = `id-${randomId()}`;\n\n /** input types */\n @Prop()\n type: InputType;\n\n /** the input name */\n @Prop()\n name?: string;\n\n /** the input label */\n @Prop()\n label?: string;\n\n /** the input aria-label */\n @Prop()\n ariaLabel = \"\";\n\n /** the input aria-expaded: available for text, password, number, email */\n @Prop()\n htmlAriaExpanded = \"\";\n\n /** the input aria-controls (optional): available for text, password, number, email */\n @Prop()\n htmlAriaControls?: string;\n\n /** the input aria-autocomplete (optional): available for text, password, number, email */\n @Prop()\n htmlAriaAutocomplete?: string;\n\n /** the input aria-activedescendant (optional): available for text, password, number, email */\n @Prop()\n htmlAriaActivedescendant?: string;\n\n /** the input value */\n @Prop({mutable: true})\n value?: string;\n\n /** the input is disabled */\n @Prop({reflect: true})\n disabled?: boolean = false;\n\n /** the input is readonly */\n @Prop()\n readonly?: boolean = false;\n\n /** the input is required (optional): available for text, password, number, email, textarea, checkbox */\n @Prop()\n required?: boolean = false;\n\n /** checked: available for checkbox, radio */\n @Prop({mutable: true})\n checked?: boolean = false;\n\n /** the input placeholder (optional) */\n @Prop()\n placeholder?: string;\n\n /** the input html title (optional) */\n @Prop()\n htmltitle?: string;\n\n /** the input status (optional): available for text, password, number, email, textarea */\n @Prop()\n status?: InputStatus;\n\n /** input helper message (optional): available for text, password, number, email, textarea - if set to `false` message won't be displayed */\n @Prop()\n message?: string | boolean = true;\n\n /** input helper message id (optional): available for text, password, number, email, textarea - if set, it will be used to populate the aria-describedby attribute, otherwise the attribute (if present) will be populated with an auto-generated value */\n @Prop()\n htmlAriaDescribedBy?: string;\n\n /** the input label position: available for checkbox, radio */\n @Prop()\n labelPosition?: LabelPosition = LabelPosition.RIGHT;\n\n /** the input has autocomplete option (optional): available for text, password, number, email */\n @Prop()\n autocomplete?: string;\n\n /** the input role */\n @Prop()\n role = \"\";\n\n /** render clear icon when typing (optional): available for text */\n @Prop()\n hasclearicon?: boolean = true;\n\n /** render icon (optional): available for text */\n @Prop()\n icon?: string;\n\n /** min number value (optional): available for number */\n @Prop()\n min?: number;\n\n /** Min length value (optional): available for text */\n @Prop()\n minlength?: number;\n\n /** max number value (optional): available for number */\n @Prop()\n max?: number;\n\n /** Max length value (optional): available for text */\n @Prop()\n maxlength?: number;\n\n /** step number value (optional): available for number */\n @Prop()\n step?: number;\n\n /** pattern value (optional): available for tel, text, search, url, email, password*/\n @Prop()\n pattern?: string;\n\n /** Available sizes: `big`, `small` and `x-small`. Defaults to `big`. */\n @Prop({reflect: true})\n size?: ControlSize = ControlSize.BIG;\n\n @State()\n isTyping = false;\n\n @State()\n passwordHidden = true;\n\n private timer;\n\n private typingtimeout = 300;\n\n private inputRef: HTMLInputElement;\n\n @Listen(\"inputCheck\", {target: \"document\"})\n inputCheckListener(e: CustomEvent): void {\n const data = e.detail;\n switch (this.type) {\n case InputType.RADIO:\n if (data.type === InputType.RADIO && data.name === this.name && data.id !== this.htmlid) {\n this.checked = false;\n }\n break;\n }\n }\n\n /** get checked status */\n @Method()\n async isChecked(): Promise<boolean> {\n switch (this.type) {\n case InputType.CHECKBOX:\n case InputType.RADIO:\n return this.checked;\n default:\n console.warn(\"`isChecked` method is only available for type `checkbox` and `radio`\");\n\n return false;\n }\n }\n\n /** Emitted on input value change, returns value, validity */\n @Event()\n inputChange: EventEmitter;\n\n private emitInputChange(value: string): void {\n if (!this.isTyping) {\n this.emitStartTyping();\n }\n\n let validity: ValidityState;\n if (this.type === InputType.TEXTAREA) {\n validity = this.getValidity(\"textarea\");\n } else {\n validity = this.getValidity(\"input\");\n }\n this.value = value;\n this.inputChange.emit({value, validity});\n\n clearTimeout(this.timer);\n this.timer = setTimeout(() => {\n this.emitStopTyping(this.value, validity);\n }, this.typingtimeout);\n }\n\n /** Emitted when user starts typing */\n @Event()\n startTyping: EventEmitter;\n\n private emitStartTyping(): void {\n this.isTyping = true;\n this.startTyping.emit();\n }\n\n /** Emitted when user stops typing, returns value, validity */\n @Event()\n stopTyping: EventEmitter;\n\n private emitStopTyping(value: string, validity: ValidityState): void {\n this.isTyping = false;\n this.stopTyping.emit({\n value: value,\n validity: validity,\n });\n }\n\n /** Emitted on checkbox check/uncheck, returns id, checked, type, name, value, validity */\n @Event()\n inputCheck: EventEmitter;\n\n private emitInputCheck(checked: boolean): void {\n this.inputCheck.emit({\n id: this.htmlid,\n checked: checked,\n type: this.type,\n name: this.name,\n value: this.value,\n validity: this.getValidity(\"input\"),\n });\n }\n\n /** Emitted on input focus */\n @Event()\n inputFocus: EventEmitter;\n\n private emitInputFocus(): void {\n this.inputFocus.emit({id: this.htmlid});\n }\n\n /** Emitted on input blur */\n @Event()\n inputBlur: EventEmitter;\n\n private emitInputBlur(): void {\n this.inputBlur.emit({id: this.htmlid});\n }\n\n private getValidity(type: string): ValidityState {\n const input = this.hostElement.querySelector(type) as HTMLInputElement;\n\n return input.validity;\n }\n\n /* START text/password/email/number */\n\n private getTextAttributes(): JSXBase.InputHTMLAttributes<HTMLInputElement | HTMLTextAreaElement> {\n return {\n id: this.htmlid,\n name: this.name,\n placeholder: this.placeholder,\n value: this.value,\n disabled: this.disabled,\n readonly: this.readonly,\n required: this.required,\n title: this.htmltitle,\n minlength: this.minlength,\n maxlength: this.maxlength,\n class: {\n [`input-${this.status}`]: !!this.status,\n },\n autocomplete: this.autocomplete,\n onInput: (e: InputEvent) => this.emitInputChange((e.target as HTMLInputElement).value),\n };\n }\n\n private getNumberAttributes(type: InputType): JSXBase.InputHTMLAttributes<HTMLInputElement> {\n if (type != InputType.NUMBER) {\n return;\n }\n\n return {\n min: this.min,\n max: this.max,\n step: this.step,\n };\n }\n\n private getPatternAttribute(type: InputType): JSXBase.InputHTMLAttributes<HTMLInputElement> {\n if (\n type != InputType.PASSWORD &&\n type != InputType.TEXT &&\n type != InputType.TEL &&\n type != InputType.SEARCH &&\n type != InputType.URL &&\n type != InputType.EMAIL\n ) {\n return;\n }\n\n return {\n pattern: this.pattern,\n };\n }\n\n private getRoleAttribute(): JSXBase.InputHTMLAttributes<HTMLInputElement | HTMLTextAreaElement> {\n return this.role ? {role: this.role} : {};\n }\n\n private inputHasMessage(): boolean {\n if (boolean(this.message) === false || boolean(this.message) === true) {\n return false;\n }\n\n return true;\n }\n\n private getAriaAttrubutes(): Record<string, unknown> {\n const expanded = this.htmlAriaExpanded ? {\"aria-expanded\": this.htmlAriaExpanded} : {};\n const controls = this.htmlAriaControls ? {\"aria-controls\": this.htmlAriaControls} : {};\n const autocomplete = this.htmlAriaAutocomplete ? {\"aria-autocomplete\": this.htmlAriaAutocomplete} : {};\n const activedescendant = this.htmlAriaActivedescendant\n ? {\"aria-activedescendant\": this.htmlAriaActivedescendant}\n : {};\n const ariaDescribedby =\n this.htmlAriaDescribedBy || this.inputHasMessage()\n ? {\"aria-describedby\": this.htmlAriaDescribedBy || `${this.htmlid}-message`}\n : {};\n\n const ariaInvalid = this.status === InputStatus.ERROR ? {\"aria-invalid\": \"true\"} : {};\n\n return {\n ...expanded,\n ...controls,\n ...autocomplete,\n ...activedescendant,\n ...ariaDescribedby,\n ...ariaInvalid,\n };\n }\n\n private getFocusBlurAttributes(): JSXBase.InputHTMLAttributes<HTMLInputElement | HTMLTextAreaElement> {\n return {\n onFocus: () => this.emitInputFocus(),\n onBlur: () => this.emitInputBlur(),\n };\n }\n\n private renderInputText(type: InputType = InputType.TEXT): HTMLDivElement {\n const ariaLabel = this.ariaLabel ? {\"aria-label\": this.ariaLabel} : {};\n const attr = {\n ...this.getTextAttributes(),\n ...this.getNumberAttributes(type),\n ...this.getPatternAttribute(type),\n ...ariaLabel,\n ...this.getRoleAttribute(),\n ...this.getAriaAttrubutes(),\n ...this.getFocusBlurAttributes(),\n };\n if (this.icon || type === InputType.PASSWORD) {\n Object.assign(attr.class, {\"has-icon\": true});\n }\n if (this.hasclearicon && type != InputType.NUMBER) {\n Object.assign(attr.class, {\"has-clear-icon\": true});\n }\n\n return (\n <div class=\"text-wrapper\">\n {this.renderLabel()}\n <div>\n <input\n type={type === InputType.PASSWORD && !this.passwordHidden ? InputType.TEXT : type}\n {...attr}\n ref={(el) => (this.inputRef = el)}\n />\n {this.renderIcons()}\n </div>\n {this.renderMessage()}\n </div>\n );\n }\n\n private renderLabel(): HTMLLabelElement {\n if (!this.label) {\n return;\n }\n\n return (\n <label\n class=\"z-label body-5-sb\"\n id={`${this.htmlid}_label`}\n htmlFor={this.htmlid}\n >\n {this.label}\n </label>\n );\n }\n\n private renderIcons(): HTMLSpanElement {\n return (\n <span class=\"icons-wrapper\">\n {this.renderResetIcon()}\n {this.renderIcon()}\n </span>\n );\n }\n\n private renderIcon(): HTMLButtonElement {\n if (this.type === InputType.PASSWORD) {\n return this.renderShowHidePassword();\n }\n\n if (!this.icon) {\n return;\n }\n\n return (\n <z-icon\n name={this.icon}\n class={{[this.size]: true, \"input-icon\": true}}\n />\n );\n }\n\n private renderResetIcon(): HTMLButtonElement {\n let hidden = false;\n if (!this.hasclearicon || !this.value || this.disabled || this.readonly || this.type == InputType.NUMBER) {\n hidden = true;\n }\n\n return (\n <button\n type=\"button\"\n class={{\"reset-icon\": true, \"input-icon\": true, hidden}}\n aria-label=\"cancella il contenuto dell'input\"\n onClick={() => {\n this.inputRef.value = \"\";\n this.emitInputChange(\"\");\n }}\n >\n <z-icon\n name=\"multiply\"\n class={this.size}\n />\n </button>\n );\n }\n\n private renderShowHidePassword(): HTMLButtonElement {\n return (\n <button\n type=\"button\"\n class=\"input-icon toggle-password-icon\"\n disabled={this.disabled}\n aria-label={this.passwordHidden ? \"mostra password\" : \"nascondi password\"}\n onClick={() => (this.passwordHidden = !this.passwordHidden)}\n >\n <z-icon\n name={this.passwordHidden ? \"view-filled\" : \"view-off-filled\"}\n class={this.size}\n />\n </button>\n );\n }\n\n private renderMessage(): HTMLZInputMessageElement {\n if (boolean(this.message) === false) {\n return;\n }\n\n return (\n <z-input-message\n html-id={`${this.htmlid}-message`}\n message={boolean(this.message) === true ? undefined : (this.message as string)}\n status={this.status}\n class={this.size}\n disabled={this.disabled}\n />\n );\n }\n\n /* END text/password/email/number */\n\n /* START textarea */\n\n private renderTextarea(): HTMLDivElement {\n const attributes = this.getTextAttributes();\n const ariaAttributes = this.getAriaAttrubutes();\n\n return (\n <Fragment>\n {this.renderLabel()}\n <div\n class={{\n ...(attributes.class as {[className: string]: boolean}),\n \"textarea-wrapper\": true,\n \"readonly\": !!attributes.readonly,\n }}\n >\n <textarea\n {...attributes}\n {...ariaAttributes}\n class={{\n ...(attributes.class as {[className: string]: boolean}),\n \"z-scrollbar\": true,\n }}\n aria-label={this.ariaLabel || undefined}\n {...this.getRoleAttribute()}\n ></textarea>\n </div>\n {this.renderMessage()}\n </Fragment>\n );\n }\n\n /* END textarea */\n\n private handleCheck(ev: Event): void {\n this.checked = (ev.target as HTMLInputElement).checked;\n this.emitInputCheck(this.checked);\n }\n\n /* START checkbox */\n private renderCheckbox(): HTMLDivElement {\n return (\n <div class=\"checkbox-wrapper\">\n <input\n id={this.htmlid}\n type=\"checkbox\"\n name={this.name}\n checked={this.checked}\n disabled={this.disabled}\n readonly={this.readonly}\n required={this.required}\n onChange={this.handleCheck.bind(this)}\n value={this.value}\n {...this.getRoleAttribute()}\n {...this.getFocusBlurAttributes()}\n />\n\n <label\n htmlFor={this.htmlid}\n class={{\n \"checkbox-label\": true,\n \"after\": this.labelPosition === LabelPosition.RIGHT,\n \"before\": this.labelPosition === LabelPosition.LEFT,\n }}\n >\n <z-icon\n name={this.checked ? \"checkbox-checked\" : \"checkbox\"}\n class={this.size}\n />\n {this.label && <span innerHTML={this.label}></span>}\n </label>\n </div>\n );\n }\n\n /* END checkbox */\n\n /* START radio */\n private renderRadio(): HTMLDivElement {\n return (\n <div class=\"radio-wrapper\">\n <input\n id={this.htmlid}\n type=\"radio\"\n name={this.name}\n checked={this.checked}\n disabled={this.disabled}\n readonly={this.readonly}\n onChange={this.handleCheck.bind(this)}\n value={this.value}\n {...this.getRoleAttribute()}\n {...this.getFocusBlurAttributes()}\n />\n\n <label\n htmlFor={this.htmlid}\n class={{\n \"radio-label\": true,\n \"after\": this.labelPosition === LabelPosition.RIGHT,\n \"before\": this.labelPosition === LabelPosition.LEFT,\n }}\n >\n <z-icon\n name={this.checked ? \"radio-button-checked\" : \"radio-button\"}\n class={this.size}\n />\n {this.label && <span innerHTML={this.label} />}\n </label>\n </div>\n );\n }\n /* END radio */\n\n render(): HTMLInputElement | HTMLDivElement {\n let input;\n switch (this.type) {\n case InputType.TEXTAREA:\n input = this.renderTextarea();\n break;\n case InputType.CHECKBOX:\n input = this.renderCheckbox();\n break;\n case InputType.RADIO:\n input = this.renderRadio();\n break;\n default:\n input = this.renderInputText(this.type);\n }\n\n return <Host>{input}</Host>;\n }\n}\n"]}
@@ -1,4 +1,5 @@
1
1
  import { Host, h } from "@stencil/core";
2
+ import { randomId } from "../../utils/utils";
2
3
  export class ZInputMessage {
3
4
  constructor() {
4
5
  this.statusIcons = {
@@ -7,18 +8,20 @@ export class ZInputMessage {
7
8
  warning: "exclamation-circle",
8
9
  };
9
10
  this.message = undefined;
11
+ this.htmlId = `id-${randomId()}`;
12
+ this.htmlRole = "alert";
10
13
  this.status = undefined;
11
14
  this.disabled = undefined;
12
15
  this.statusRole = {};
13
16
  }
14
17
  onMessageChange() {
15
- this.statusRole = this.message && this.status ? { role: "alert" } : {};
18
+ this.statusRole = this.htmlRole && this.message && this.status ? { role: this.htmlRole } : {};
16
19
  }
17
20
  componentWillLoad() {
18
21
  this.onMessageChange();
19
22
  }
20
23
  render() {
21
- return (h(Host, Object.assign({ key: 'd3c9ebc08047c7dda297e667f0923025a123c218' }, this.statusRole), this.statusIcons[this.status] && this.message && h("z-icon", { key: 'fd12602621b437c130e82fe747e422fc98b3a87e', name: this.statusIcons[this.status] }), h("span", { key: 'b3af731acdef8e2c890789f158d9db68e426f798', innerHTML: this.message })));
24
+ return (h(Host, Object.assign({ key: 'a6cb5b864526575f19104d915c2bcc88398c9527' }, this.statusRole), this.statusIcons[this.status] && this.message && h("z-icon", { key: '879a934edeeed730605f3cc5be1ef0f29c1800dc', name: this.statusIcons[this.status] }), h("span", { key: '7eb24ba2327d030e9ed3d562000958857fc5e095', id: this.htmlId, innerHTML: this.message })));
22
25
  }
23
26
  static get is() { return "z-input-message"; }
24
27
  static get encapsulation() { return "shadow"; }
@@ -51,6 +54,42 @@ export class ZInputMessage {
51
54
  "attribute": "message",
52
55
  "reflect": false
53
56
  },
57
+ "htmlId": {
58
+ "type": "string",
59
+ "mutable": false,
60
+ "complexType": {
61
+ "original": "string",
62
+ "resolved": "string",
63
+ "references": {}
64
+ },
65
+ "required": false,
66
+ "optional": true,
67
+ "docs": {
68
+ "tags": [],
69
+ "text": "the id of the message element (optional)"
70
+ },
71
+ "attribute": "html-id",
72
+ "reflect": false,
73
+ "defaultValue": "`id-${randomId()}`"
74
+ },
75
+ "htmlRole": {
76
+ "type": "string",
77
+ "mutable": false,
78
+ "complexType": {
79
+ "original": "null | string",
80
+ "resolved": "string",
81
+ "references": {}
82
+ },
83
+ "required": false,
84
+ "optional": false,
85
+ "docs": {
86
+ "tags": [],
87
+ "text": "the role to set when both the message and the status are populated (optional)"
88
+ },
89
+ "attribute": "html-role",
90
+ "reflect": false,
91
+ "defaultValue": "\"alert\""
92
+ },
54
93
  "status": {
55
94
  "type": "string",
56
95
  "mutable": false,
@@ -105,6 +144,9 @@ export class ZInputMessage {
105
144
  }, {
106
145
  "propName": "status",
107
146
  "methodName": "onMessageChange"
147
+ }, {
148
+ "propName": "htmlRole",
149
+ "methodName": "onMessageChange"
108
150
  }];
109
151
  }
110
152
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/z-input-message/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAC,MAAM,eAAe,CAAC;AACrE,OAAO,EAAC,WAAW,EAAC,MAAM,aAAa,CAAC;AAOxC,MAAM,OAAO,aAAa;;QAahB,gBAAW,GAAG;YACpB,OAAO,EAAE,kBAAkB;YAC3B,KAAK,EAAE,kBAAkB;YACzB,OAAO,EAAE,oBAAoB;SAC9B,CAAC;;;;0BAGW,EAAE;;IAIf,eAAe;QACb,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAC,IAAI,EAAE,OAAO,EAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACvE,CAAC;IAED,iBAAiB;QACf,IAAI,CAAC,eAAe,EAAE,CAAC;IACzB,CAAC;IAED,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qEAAK,IAAI,CAAC,UAAU;YACtB,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,OAAO,IAAI,+DAAQ,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,GAAW;YACxG,6DAAM,SAAS,EAAE,IAAI,CAAC,OAAO,GAAI,CAC5B,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {Component, Host, Prop, State, Watch, h} from \"@stencil/core\";\nimport {InputStatus} from \"../../beans\";\n\n@Component({\n tag: \"z-input-message\",\n styleUrl: \"styles.css\",\n shadow: true,\n})\nexport class ZInputMessage {\n /** input helper message */\n @Prop()\n message: string;\n\n /** input status (optional) */\n @Prop({reflect: true})\n status?: InputStatus;\n\n /** input disabled status (optional) */\n @Prop({reflect: true})\n disabled?: boolean;\n\n private statusIcons = {\n success: \"checkmark-circle\",\n error: \"multiply-circled\",\n warning: \"exclamation-circle\",\n };\n\n @State()\n statusRole = {};\n\n @Watch(\"message\")\n @Watch(\"status\")\n onMessageChange(): void {\n this.statusRole = this.message && this.status ? {role: \"alert\"} : {};\n }\n\n componentWillLoad(): void {\n this.onMessageChange();\n }\n\n render(): HTMLZInputMessageElement {\n return (\n <Host {...this.statusRole}>\n {this.statusIcons[this.status] && this.message && <z-icon name={this.statusIcons[this.status]}></z-icon>}\n <span innerHTML={this.message} />\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/z-input-message/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAC,MAAM,eAAe,CAAC;AACrE,OAAO,EAAC,WAAW,EAAC,MAAM,aAAa,CAAC;AACxC,OAAO,EAAC,QAAQ,EAAC,MAAM,mBAAmB,CAAC;AAO3C,MAAM,OAAO,aAAa;;QAqBhB,gBAAW,GAAG;YACpB,OAAO,EAAE,kBAAkB;YAC3B,KAAK,EAAE,kBAAkB;YACzB,OAAO,EAAE,oBAAoB;SAC9B,CAAC;;sBAlBQ,MAAM,QAAQ,EAAE,EAAE;wBAIF,OAAO;;;0BAiBpB,EAAE;;IAKf,eAAe;QACb,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAC9F,CAAC;IAED,iBAAiB;QACf,IAAI,CAAC,eAAe,EAAE,CAAC;IACzB,CAAC;IAED,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qEAAK,IAAI,CAAC,UAAU;YACtB,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,OAAO,IAAI,+DAAQ,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,GAAW;YACxG,6DACE,EAAE,EAAE,IAAI,CAAC,MAAM,EACf,SAAS,EAAE,IAAI,CAAC,OAAO,GACvB,CACG,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {Component, Host, Prop, State, Watch, h} from \"@stencil/core\";\nimport {InputStatus} from \"../../beans\";\nimport {randomId} from \"../../utils/utils\";\n\n@Component({\n tag: \"z-input-message\",\n styleUrl: \"styles.css\",\n shadow: true,\n})\nexport class ZInputMessage {\n /** input helper message */\n @Prop()\n message: string;\n\n /** the id of the message element (optional)*/\n @Prop()\n htmlId? = `id-${randomId()}`;\n\n /** the role to set when both the message and the status are populated (optional)*/\n @Prop()\n htmlRole: null | string = \"alert\";\n\n /** input status (optional) */\n @Prop({reflect: true})\n status?: InputStatus;\n\n /** input disabled status (optional) */\n @Prop({reflect: true})\n disabled?: boolean;\n\n private statusIcons = {\n success: \"checkmark-circle\",\n error: \"multiply-circled\",\n warning: \"exclamation-circle\",\n };\n\n @State()\n statusRole = {};\n\n @Watch(\"message\")\n @Watch(\"status\")\n @Watch(\"htmlRole\")\n onMessageChange(): void {\n this.statusRole = this.htmlRole && this.message && this.status ? {role: this.htmlRole} : {};\n }\n\n componentWillLoad(): void {\n this.onMessageChange();\n }\n\n render(): HTMLZInputMessageElement {\n return (\n <Host {...this.statusRole}>\n {this.statusIcons[this.status] && this.message && <z-icon name={this.statusIcons[this.status]}></z-icon>}\n <span\n id={this.htmlId}\n innerHTML={this.message}\n />\n </Host>\n );\n }\n}\n"]}
@@ -3,7 +3,8 @@ import { Host, h } from "@stencil/core";
3
3
  * Notification bar component.
4
4
  * @slot - The text of the notification.
5
5
  * @cssprop --z-notification--top-offset - The top offset of the notification. Use it when `sticky` prop is set to `true` and you need the notification to stay under other sticky elements. Default: 0px.
6
- * @cssprop --z-notification--content-max-width - The max width of the notification content.
6
+ * @cssprop --z-notification--content-max-width - The max width of the notification content. Useful to align the content with other elements on the page, keeping the colored background full width. Default: 100%. Note: the content is automatically centered, so if you want to limit the width only for the slotted content, you can wrap it in a container with the desired width and leave the `z-notification` width to 100%.
7
+ * @cssprop --z-notification--inline-padding - The inline padding of the notification content. It can be useful to align the content when the `--z-notification--content-max-width` is set. Default: calc(var(--space-unit) * 2).
7
8
  */
8
9
  export class ZNotification {
9
10
  handleActionButtonClick(e) {
@@ -27,7 +28,7 @@ export class ZNotification {
27
28
  }
28
29
  render() {
29
30
  var _a;
30
- return (h(Host, { key: '7a717d8687d3e8e6de06c25192f9e2f14b6563c1' }, h("div", { key: 'eee4aa9a69678e7f353ead6ef4e805544e55426e', class: "main-container" }, this.contenticonname && (h("z-icon", { key: '8d582f822e1e4ad440c65002d9a4abb5e0294040', class: "status-icon", name: this.contenticonname, width: 16, height: 16 })), h("div", { key: '2779b5f3d772ee729c67b1616523ccac1b4646f0', class: "content-container" }, h("div", { key: '1e622f63cc7d8523ab52561360a9de5e8829e976', class: "content-text" }, h("slot", { key: 'f0c65317530288e6ddeb9b604d21243858f25220' })), !!((_a = this.actiontext) === null || _a === void 0 ? void 0 : _a.trim()) && (h("button", { key: '2cefcdb30e39df9dd2e80f4ddd41f9c887d3594e', class: "action-button", type: "button", onClick: this.handleActionButtonClick }, this.actiontext))), this.showclose && (h("button", { key: '1a4d7a77ae2b9d6f86cfab0c7b72c77daff9d3da', class: "close-button", type: "button", onClick: this.handleCloseButtonClick }, h("z-icon", { key: '33377e8438a076a2c3eee32ab9f513885e15fbcf', name: "multiply-circle", width: 16, height: 16 }))))));
31
+ return (h(Host, { key: '3704b1815b8b714608787f7d86e8402fe7dc4eff' }, h("div", { key: '79598a77b4cca9ad53babe6be8d8ea103d979f6a', class: "main-container" }, this.contenticonname && (h("z-icon", { key: '2a4de5808da5ec4af5bddf68376cc7510aad9cf8', class: "status-icon", name: this.contenticonname, width: 16, height: 16 })), h("div", { key: 'feb0b073eacb2fdb82501f3b33bdff68fef71769', class: "content-container" }, h("div", { key: '2a81ef0da3a0fba818025651aa64e270e833c9ed', class: "content-text" }, h("slot", { key: '88f8670d0a0433012aa6f6a27a40cef7c84498c5' })), !!((_a = this.actiontext) === null || _a === void 0 ? void 0 : _a.trim()) && (h("button", { key: '6282f5526b57131deb130c57dfe165595612d01e', class: "action-button", type: "button", onClick: this.handleActionButtonClick }, this.actiontext))), this.showclose && (h("button", { key: '514841e3b1a2a816c9283d05ca3d2de953269e8b', class: "close-button", type: "button", onClick: this.handleCloseButtonClick }, h("z-icon", { key: 'a43a9ca62b654719cd4a2bb634152b96c801cdc9', name: "multiply-circle", width: 16, height: 16 }))))));
31
32
  }
32
33
  static get is() { return "z-notification"; }
33
34
  static get encapsulation() { return "shadow"; }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/z-notification/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,KAAK,EAAgB,IAAI,EAAE,IAAI,EAAE,CAAC,EAAC,MAAM,eAAe,CAAC;AAC5E,OAAO,EAAC,gBAAgB,EAAC,MAAM,aAAa,CAAC;AAE7C;;;;;GAKG;AAMH,MAAM,OAAO,aAAa;IAoChB,uBAAuB,CAAC,CAAa;QAC3C,CAAC,CAAC,cAAc,EAAE,CAAC;QACnB,IAAI,CAAC,kBAAkB,CAAC,IAAI,EAAE,CAAC;IACjC,CAAC;IAMO,sBAAsB,CAAC,CAAa;QAC1C,CAAC,CAAC,cAAc,EAAE,CAAC;QACnB,IAAI,CAAC,iBAAiB,CAAC,IAAI,EAAE,CAAC;IAChC,CAAC;IAED;;;;yBAnCsB,KAAK;0BAOJ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event, EventEmitter, Host, Prop, h} from \"@stencil/core\";\nimport {NotificationType} from \"../../beans\";\n\n/**\n * Notification bar component.\n * @slot - The text of the notification.\n * @cssprop --z-notification--top-offset - The top offset of the notification. Use it when `sticky` prop is set to `true` and you need the notification to stay under other sticky elements. Default: 0px.\n * @cssprop --z-notification--content-max-width - The max width of the notification content.\n */\n@Component({\n tag: \"z-notification\",\n styleUrl: \"styles.css\",\n shadow: true,\n})\nexport class ZNotification {\n /** Name of the icon on the left of the content */\n @Prop()\n contenticonname?: string;\n\n /** Action button text */\n @Prop()\n actiontext?: string;\n\n /** Alert variant type */\n @Prop({reflect: true})\n type: NotificationType;\n\n /** Enable close icon */\n @Prop()\n showclose?: boolean = false;\n\n /**\n * Enable shadow.\n * @deprecated shadow is available only for the `sticky` version of the notification.\n */\n @Prop({reflect: true})\n showshadow?: boolean = false;\n\n /** Enable sticky notification bar. */\n @Prop({reflect: true})\n sticky?: boolean = false;\n\n /** Border position */\n @Prop({reflect: true})\n borderposition?: \"top\" | \"bottom\" = \"bottom\";\n\n /** Call to action clicked */\n @Event()\n notificationAction: EventEmitter;\n\n private handleActionButtonClick(e: MouseEvent): void {\n e.preventDefault();\n this.notificationAction.emit();\n }\n\n /** Close button clicked */\n @Event()\n notificationClose: EventEmitter;\n\n private handleCloseButtonClick(e: MouseEvent): void {\n e.preventDefault();\n this.notificationClose.emit();\n }\n\n constructor() {\n this.handleActionButtonClick = this.handleActionButtonClick.bind(this);\n this.handleCloseButtonClick = this.handleCloseButtonClick.bind(this);\n }\n\n render(): HTMLZNotificationElement {\n return (\n <Host>\n <div class=\"main-container\">\n {this.contenticonname && (\n <z-icon\n class=\"status-icon\"\n name={this.contenticonname}\n width={16}\n height={16}\n />\n )}\n <div class=\"content-container\">\n <div class=\"content-text\">\n <slot></slot>\n </div>\n {!!this.actiontext?.trim() && (\n <button\n class=\"action-button\"\n type=\"button\"\n onClick={this.handleActionButtonClick}\n >\n {this.actiontext}\n </button>\n )}\n </div>\n {this.showclose && (\n <button\n class=\"close-button\"\n type=\"button\"\n onClick={this.handleCloseButtonClick}\n >\n <z-icon\n name=\"multiply-circle\"\n width={16}\n height={16}\n />\n </button>\n )}\n </div>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/z-notification/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,KAAK,EAAgB,IAAI,EAAE,IAAI,EAAE,CAAC,EAAC,MAAM,eAAe,CAAC;AAC5E,OAAO,EAAC,gBAAgB,EAAC,MAAM,aAAa,CAAC;AAE7C;;;;;;GAMG;AAMH,MAAM,OAAO,aAAa;IAoChB,uBAAuB,CAAC,CAAa;QAC3C,CAAC,CAAC,cAAc,EAAE,CAAC;QACnB,IAAI,CAAC,kBAAkB,CAAC,IAAI,EAAE,CAAC;IACjC,CAAC;IAMO,sBAAsB,CAAC,CAAa;QAC1C,CAAC,CAAC,cAAc,EAAE,CAAC;QACnB,IAAI,CAAC,iBAAiB,CAAC,IAAI,EAAE,CAAC;IAChC,CAAC;IAED;;;;yBAnCsB,KAAK;0BAOJ,KAAK;sBAIT,KAAK;8BAIY,QAAQ;QAqB1C,IAAI,CAAC,uBAAuB,GAAG,IAAI,CAAC,uBAAuB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACvE,IAAI,CAAC,sBAAsB,GAAG,IAAI,CAAC,sBAAsB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KACtE;IAED,MAAM;;QACJ,OAAO,CACL,EAAC,IAAI;YACH,4DAAK,KAAK,EAAC,gBAAgB;gBACxB,IAAI,CAAC,eAAe,IAAI,CACvB,+DACE,KAAK,EAAC,aAAa,EACnB,IAAI,EAAE,IAAI,CAAC,eAAe,EAC1B,KAAK,EAAE,EAAE,EACT,MAAM,EAAE,EAAE,GACV,CACH;gBACD,4DAAK,KAAK,EAAC,mBAAmB;oBAC5B,4DAAK,KAAK,EAAC,cAAc;wBACvB,8DAAa,CACT;oBACL,CAAC,CAAC,CAAA,MAAA,IAAI,CAAC,UAAU,0CAAE,IAAI,EAAE,CAAA,IAAI,CAC5B,+DACE,KAAK,EAAC,eAAe,EACrB,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,IAAI,CAAC,uBAAuB,IAEpC,IAAI,CAAC,UAAU,CACT,CACV,CACG;gBACL,IAAI,CAAC,SAAS,IAAI,CACjB,+DACE,KAAK,EAAC,cAAc,EACpB,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,IAAI,CAAC,sBAAsB;oBAEpC,+DACE,IAAI,EAAC,iBAAiB,EACtB,KAAK,EAAE,EAAE,EACT,MAAM,EAAE,EAAE,GACV,CACK,CACV,CACG,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {Component, Event, EventEmitter, Host, Prop, h} from \"@stencil/core\";\nimport {NotificationType} from \"../../beans\";\n\n/**\n * Notification bar component.\n * @slot - The text of the notification.\n * @cssprop --z-notification--top-offset - The top offset of the notification. Use it when `sticky` prop is set to `true` and you need the notification to stay under other sticky elements. Default: 0px.\n * @cssprop --z-notification--content-max-width - The max width of the notification content. Useful to align the content with other elements on the page, keeping the colored background full width. Default: 100%. Note: the content is automatically centered, so if you want to limit the width only for the slotted content, you can wrap it in a container with the desired width and leave the `z-notification` width to 100%.\n * @cssprop --z-notification--inline-padding - The inline padding of the notification content. It can be useful to align the content when the `--z-notification--content-max-width` is set. Default: calc(var(--space-unit) * 2).\n */\n@Component({\n tag: \"z-notification\",\n styleUrl: \"styles.css\",\n shadow: true,\n})\nexport class ZNotification {\n /** Name of the icon on the left of the content */\n @Prop()\n contenticonname?: string;\n\n /** Action button text */\n @Prop()\n actiontext?: string;\n\n /** Alert variant type */\n @Prop({reflect: true})\n type: NotificationType;\n\n /** Enable close icon */\n @Prop()\n showclose?: boolean = false;\n\n /**\n * Enable shadow.\n * @deprecated shadow is available only for the `sticky` version of the notification.\n */\n @Prop({reflect: true})\n showshadow?: boolean = false;\n\n /** Enable sticky notification bar. */\n @Prop({reflect: true})\n sticky?: boolean = false;\n\n /** Border position */\n @Prop({reflect: true})\n borderposition?: \"top\" | \"bottom\" = \"bottom\";\n\n /** Call to action clicked */\n @Event()\n notificationAction: EventEmitter;\n\n private handleActionButtonClick(e: MouseEvent): void {\n e.preventDefault();\n this.notificationAction.emit();\n }\n\n /** Close button clicked */\n @Event()\n notificationClose: EventEmitter;\n\n private handleCloseButtonClick(e: MouseEvent): void {\n e.preventDefault();\n this.notificationClose.emit();\n }\n\n constructor() {\n this.handleActionButtonClick = this.handleActionButtonClick.bind(this);\n this.handleCloseButtonClick = this.handleCloseButtonClick.bind(this);\n }\n\n render(): HTMLZNotificationElement {\n return (\n <Host>\n <div class=\"main-container\">\n {this.contenticonname && (\n <z-icon\n class=\"status-icon\"\n name={this.contenticonname}\n width={16}\n height={16}\n />\n )}\n <div class=\"content-container\">\n <div class=\"content-text\">\n <slot></slot>\n </div>\n {!!this.actiontext?.trim() && (\n <button\n class=\"action-button\"\n type=\"button\"\n onClick={this.handleActionButtonClick}\n >\n {this.actiontext}\n </button>\n )}\n </div>\n {this.showclose && (\n <button\n class=\"close-button\"\n type=\"button\"\n onClick={this.handleCloseButtonClick}\n >\n <z-icon\n name=\"multiply-circle\"\n width={16}\n height={16}\n />\n </button>\n )}\n </div>\n </Host>\n );\n }\n}\n"]}
@@ -2,6 +2,7 @@ import { html } from "lit";
2
2
  import { NotificationType } from "../../beans";
3
3
  import "./index";
4
4
  import "./index.stories.css";
5
+ const DEMO_LONG_TEXT = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent rhoncus magna imperdiet malesuada interdum. Curabitur volutpat mi purus, in maximus nisl volutpat quis. Suspendisse sed vestibulum magna. Quisque molestie, justo non pretium egestas, lorem elit malesuada turpis, et malesuada sapien nunc a urna. Curabitur sagittis augue turpis, eu consectetur purus consectetur vitae. Sed bibendum nisl diam, eget egestas enim elementum eget. Donec quis magna lobortis, tristique nunc in, fringilla lacus. Duis ac porta turpis. Aenean aliquam tortor sed felis interdum aliquet dignissim vel ligula. Donec auctor risus vitae nisi finibus, sed suscipit tellus fringilla. Sed malesuada gravida tincidunt. Duis tincidunt orci at magna egestas fermentum. Nulla laoreet ante felis, non molestie mi venenatis sit amet. Nullam sollicitudin tempus lacus ac maximus. Suspendisse erat magna, pellentesque ut lectus sit amet, aliquet scelerisque augue. In at felis facilisis, sodales tortor euismod, tincidunt tellus. Quisque vulputate dolor vitae nibh pharetra, a auctor turpis mattis. Nulla facilisi. Vivamus a facilisis ex. Vestibulum ultricies scelerisque sapien eu pharetra. Etiam ut porttitor lorem, id ullamcorper risus. Donec sed sollicitudin metus. Sed sapien lectus, bibendum quis lorem efficitur, pellentesque maximus lectus. Quisque quis lectus quis dolor ultrices facilisis placerat finibus nulla. Donec laoreet urna id varius facilisis. Nulla facilisi. Pellentesque dignissim aliquam interdum. Fusce ante mauris, blandit nec imperdiet mattis, dictum non sapien. Donec aliquet feugiat quam quis cursus. Curabitur et rutrum nunc. Phasellus ut lorem posuere, eleifend felis sed, lobortis arcu. Nam efficitur purus non dolor tincidunt, nec euismod lectus hendrerit. Sed eget rutrum odio, ac maximus lacus. Etiam rutrum purus diam, eu pellentesque elit vulputate eget. Donec nulla augue, euismod non mollis congue, laoreet vel orci. Cras eget suscipit felis. Phasellus eget erat eu nisl suscipit pulvinar. Nunc ullamcorper orci sit amet dui placerat, at vulputate libero finibus. Quisque dignissim risus dolor, a porta erat cursus vel. Sed cursus pellentesque magna fringilla varius. Proin sit amet posuere massa. Proin nisl massa, hendrerit non congue mattis, tincidunt in turpis. Etiam pharetra posuere est, non mollis sapien malesuada non. Quisque metus lectus, hendrerit vel accumsan et, ornare a eros. Donec tempor, elit ut pulvinar auctor, sapien velit consectetur justo, interdum lobortis risus ligula vitae nunc. Praesent quam felis, posuere et consequat consectetur, tempus non sem. Phasellus in ligula enim. Donec gravida, felis vitae elementum mattis, velit ipsum aliquam ipsum, a cursus nisi nisl nec sapien. Ut et orci nulla. Donec fringilla magna non risus imperdiet euismod. Sed viverra eget turpis et faucibus. Sed ante orci, interdum in ligula in, tincidunt feugiat arcu. In viverra efficitur urna laoreet tristique. Phasellus hendrerit, urna et condimentum aliquet, ex urna condimentum dui, vitae vestibulum mauris risus sit amet nunc. Quisque egestas est vel lorem commodo, eget vestibulum enim cursus. Cras lectus velit, fermentum eget mauris id, interdum cursus massa. Maecenas quis dui vehicula mauris condimentum finibus. Sed et magna velit. Duis eleifend dolor at sagittis ornare. Aenean commodo massa enim, ac varius augue varius quis.";
5
6
  const StoryMeta = {
6
7
  title: "ZNotification",
7
8
  component: "z-notification",
@@ -12,10 +13,17 @@ const StoryMeta = {
12
13
  },
13
14
  options: Object.values(NotificationType),
14
15
  },
16
+ borderposition: {
17
+ control: {
18
+ type: "inline-radio",
19
+ },
20
+ options: ["top", "bottom"],
21
+ },
15
22
  },
16
23
  args: {
17
24
  "--z-notification--content-max-width": "100%",
18
25
  "contenticonname": "checkmark-circle-filled",
26
+ "borderposition": "bottom",
19
27
  "actiontext": "Annulla",
20
28
  "showclose": false,
21
29
  "sticky": false,
@@ -37,27 +45,6 @@ export const Default = {
37
45
  </z-notification>
38
46
  `,
39
47
  };
40
- /**
41
- * To use the border top variant set the `borderposition` property to `top`.
42
- */
43
- export const BorderTop = {
44
- args: {
45
- borderposition: "top",
46
- },
47
- render: (args) => html `
48
- <z-notification
49
- .contenticonname=${args.contenticonname}
50
- .actiontext=${args.actiontext}
51
- .type=${args.type}
52
- .showclose=${args.showclose}
53
- .sticky=${args.sticky}
54
- .borderposition=${args.borderposition}
55
- style="--z-notification--content-max-width: ${args["--z-notification--content-max-width"]}"
56
- >
57
- <div class="notification-container"><strong>NOVITÀ</strong>: Testo che descrive le novità.</div>
58
- </z-notification>
59
- `,
60
- };
61
48
  export const LongText = {
62
49
  render: (args) => html `
63
50
  <z-notification
@@ -68,19 +55,18 @@ export const LongText = {
68
55
  .sticky=${args.sticky}
69
56
  style="--z-notification--content-max-width: ${args["--z-notification--content-max-width"]}"
70
57
  >
71
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent rhoncus magna imperdiet malesuada interdum.
72
- Curabitur volutpat mi purus, in maximus nisl volutpat quis. Suspendisse sed vestibulum magna. Quisque molestie,
73
- justo non pretium egestas, lorem elit malesuada turpis, et malesuada sapien nunc a urna. Curabitur sagittis augue
74
- turpis, eu consectetur purus consectetur vitae.
58
+ <div>
59
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent rhoncus magna imperdiet malesuada interdum.
60
+ Curabitur volutpat mi purus, in maximus nisl volutpat quis. Suspendisse sed vestibulum magna. Quisque molestie,
61
+ justo non pretium egestas, lorem elit malesuada turpis, et malesuada sapien nunc a urna. Curabitur sagittis
62
+ augue turpis, eu consectetur purus consectetur vitae.
63
+ </div>
75
64
  </z-notification>
76
65
  `,
77
66
  };
78
- /**
79
- * To use the banner variant set the `sticky` property to `true`.
80
- */
81
- export const BannerVariant = {
67
+ export const StickyBanner = {
82
68
  args: {
83
- notificationText: "Questo è il testo della notifica",
69
+ "--z-notification--top-offset": "0",
84
70
  },
85
71
  parameters: {
86
72
  controls: {
@@ -94,55 +80,48 @@ export const BannerVariant = {
94
80
  .actiontext=${args.actiontext}
95
81
  .type=${args.type}
96
82
  .showclose=${args.showclose}
97
- sticky="true"
98
- style="--z-notification--content-max-width: ${args["--z-notification--content-max-width"]}"
83
+ .sticky="true"
84
+ style="--z-notification--top-offset: ${args["--z-notification--top-offset"]}; --z-notification--content-max-width: ${args["--z-notification--content-max-width"]}"
99
85
  >
100
- ${args.notificationText}
86
+ Questo è il testo della notifica
101
87
  </z-notification>
102
- <h2 class="heading-1-sb">Titolo della pagina</h2>
103
- <div class="body-1">
88
+ <div class="heading-1-sb">Titolo della pagina</div>
89
+ <div class="body-1">${DEMO_LONG_TEXT}</div>
90
+ </div>
91
+ `,
92
+ };
93
+ export const CenteredContent = {
94
+ args: {
95
+ "--z-notification--content-max-width": "768px",
96
+ },
97
+ render: (args) => html `
98
+ <z-notification
99
+ .contenticonname=${args.contenticonname}
100
+ .actiontext=${args.actiontext}
101
+ .type=${args.type}
102
+ .showclose=${args.showclose}
103
+ .sticky=${args.sticky}
104
+ .borderposition=${args.borderposition}
105
+ style="--z-notification--content-max-width: ${args["--z-notification--content-max-width"]}"
106
+ >
107
+ <div>
104
108
  Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent rhoncus magna imperdiet malesuada interdum.
105
- Curabitur volutpat mi purus, in maximus nisl volutpat quis. Suspendisse sed vestibulum magna. Quisque molestie,
106
- justo non pretium egestas, lorem elit malesuada turpis, et malesuada sapien nunc a urna. Curabitur sagittis
107
- augue turpis, eu consectetur purus consectetur vitae. Sed bibendum nisl diam, eget egestas enim elementum eget.
108
- Donec quis magna lobortis, tristique nunc in, fringilla lacus. Duis ac porta turpis. Aenean aliquam tortor sed
109
- felis interdum aliquet dignissim vel ligula. Donec auctor risus vitae nisi finibus, sed suscipit tellus
110
- fringilla. Sed malesuada gravida tincidunt. Duis tincidunt orci at magna egestas fermentum. Nulla laoreet ante
111
- felis, non molestie mi venenatis sit amet. Nullam sollicitudin tempus lacus ac maximus. Suspendisse erat magna,
112
- pellentesque ut lectus sit amet, aliquet scelerisque augue. In at felis facilisis, sodales tortor euismod,
113
- tincidunt tellus. Quisque vulputate dolor vitae nibh pharetra, a auctor turpis mattis. Nulla facilisi. Vivamus a
114
- facilisis ex. Vestibulum ultricies scelerisque sapien eu pharetra. Etiam ut porttitor lorem, id ullamcorper
115
- risus. Donec sed sollicitudin metus. Sed sapien lectus, bibendum quis lorem efficitur, pellentesque maximus
116
- lectus. Quisque quis lectus quis dolor ultrices facilisis placerat finibus nulla. Donec laoreet urna id varius
117
- facilisis. Nulla facilisi. Pellentesque dignissim aliquam interdum. Fusce ante mauris, blandit nec imperdiet
118
- mattis, dictum non sapien. Donec aliquet feugiat quam quis cursus. Curabitur et rutrum nunc. Phasellus ut lorem
119
- posuere, eleifend felis sed, lobortis arcu. Nam efficitur purus non dolor tincidunt, nec euismod lectus
120
- hendrerit. Sed eget rutrum odio, ac maximus lacus. Etiam rutrum purus diam, eu pellentesque elit vulputate eget.
121
- Donec nulla augue, euismod non mollis congue, laoreet vel orci. Cras eget suscipit felis. Phasellus eget erat eu
122
- nisl suscipit pulvinar. Nunc ullamcorper orci sit amet dui placerat, at vulputate libero finibus. Quisque
123
- dignissim risus dolor, a porta erat cursus vel. Sed cursus pellentesque magna fringilla varius. Proin sit amet
124
- posuere massa. Proin nisl massa, hendrerit non congue mattis, tincidunt in turpis. Etiam pharetra posuere est,
125
- non mollis sapien malesuada non. Quisque metus lectus, hendrerit vel accumsan et, ornare a eros. Donec tempor,
126
- elit ut pulvinar auctor, sapien velit consectetur justo, interdum lobortis risus ligula vitae nunc. Praesent
127
- quam felis, posuere et consequat consectetur, tempus non sem. Phasellus in ligula enim. Donec gravida, felis
128
- vitae elementum mattis, velit ipsum aliquam ipsum, a cursus nisi nisl nec sapien. Ut et orci nulla. Donec
129
- fringilla magna non risus imperdiet euismod. Sed viverra eget turpis et faucibus. Sed ante orci, interdum in
130
- ligula in, tincidunt feugiat arcu. In viverra efficitur urna laoreet tristique. Phasellus hendrerit, urna et
131
- condimentum aliquet, ex urna condimentum dui, vitae vestibulum mauris risus sit amet nunc. Quisque egestas est
132
- vel lorem commodo, eget vestibulum enim cursus. Cras lectus velit, fermentum eget mauris id, interdum cursus
133
- massa. Maecenas quis dui vehicula mauris condimentum finibus. Sed et magna velit. Duis eleifend dolor at
134
- sagittis ornare. Aenean commodo massa enim, ac varius augue varius quis.
109
+ Curabitur volutpat mi purus, in maximus nisl volutpat quis.
135
110
  </div>
111
+ </z-notification>
112
+ <div
113
+ class="z-notification-demo-page"
114
+ style="max-width: ${args["--z-notification--content-max-width"]}"
115
+ >
116
+ <div class="heading-1">Titolo della pagina</div>
117
+ <div class="body-1">${DEMO_LONG_TEXT}</div>
136
118
  </div>
137
119
  `,
138
120
  };
139
121
  /**
140
- * To use the inline variant set the `sticky` property to `false`.
122
+ * To have an inline notification keep the `sticky` property set to `false`.
141
123
  */
142
- export const InlineVariant = {
143
- args: {
144
- notificationText: "Questo è il testo della notifica",
145
- },
124
+ export const Inline = {
146
125
  parameters: {
147
126
  controls: {
148
127
  exclude: ["sticky"],
@@ -151,17 +130,17 @@ export const InlineVariant = {
151
130
  render: (args) => html `
152
131
  <div class="inline-notification-demo">
153
132
  <z-notification
154
- contenticonname=${args.contenticonname}
155
- actiontext=${args.actiontext}
156
- type=${args.type}
157
- showclose=${args.showclose}
158
- sticky="false"
133
+ .contenticonname=${args.contenticonname}
134
+ .actiontext=${args.actiontext}
135
+ .type=${args.type}
136
+ .showclose=${args.showclose}
137
+ .sticky="false"
159
138
  style="--z-notification--content-max-width: ${args["--z-notification--content-max-width"]}"
160
139
  >
161
- ${args.notificationText}
140
+ Questo è il testo della notifica
162
141
  </z-notification>
163
142
  <div class="content">
164
- <h2 class="heading-1">Titolo della scheda</h2>
143
+ <div class="heading-1">Titolo della scheda</div>
165
144
  <div class="body-1">
166
145
  Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent rhoncus magna imperdiet malesuada interdum.
167
146
  Curabitur volutpat mi purus, in maximus nisl volutpat quis. Suspendisse sed vestibulum magna.
@@ -170,4 +149,27 @@ export const InlineVariant = {
170
149
  </div>
171
150
  `,
172
151
  };
152
+ /**
153
+ * The position of the border can be changed to correctly display the notification when put on the bottom of the screen.
154
+ */
155
+ export const BorderPosition = {
156
+ args: {
157
+ borderposition: "top",
158
+ },
159
+ render: (args) => html `
160
+ <div class="z-notification-border-position-demo">
161
+ <z-notification
162
+ .contenticonname=${args.contenticonname}
163
+ .actiontext=${args.actiontext}
164
+ .type=${args.type}
165
+ .showclose=${args.showclose}
166
+ .sticky=${args.sticky}
167
+ .borderposition=${args.borderposition}
168
+ style="--z-notification--content-max-width: ${args["--z-notification--content-max-width"]}"
169
+ >
170
+ <div class="notification-container"><strong>NOVITÀ</strong>: Testo che descrive le novità.</div>
171
+ </z-notification>
172
+ </div>
173
+ `,
174
+ };
173
175
  //# sourceMappingURL=index.stories.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.stories.js","sourceRoot":"","sources":["../../../../src/components/z-notification/index.stories.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,IAAI,EAAC,MAAM,KAAK,CAAC;AAEzB,OAAO,EAAC,gBAAgB,EAAC,MAAM,aAAa,CAAC;AAE7C,OAAO,SAAS,CAAC;AACjB,OAAO,qBAAqB,CAAC;AAM7B,MAAM,SAAS,GAAG;IAChB,KAAK,EAAE,eAAe;IACtB,SAAS,EAAE,gBAAgB;IAC3B,QAAQ,EAAE;QACR,IAAI,EAAE;YACJ,OAAO,EAAE;gBACP,IAAI,EAAE,cAAc;aACrB;YACD,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,gBAAgB,CAAC;SACzC;KACF;IACD,IAAI,EAAE;QACJ,qCAAqC,EAAE,MAAM;QAC7C,iBAAiB,EAAE,yBAAyB;QAC5C,YAAY,EAAE,SAAS;QACvB,WAAW,EAAE,KAAK;QAClB,QAAQ,EAAE,KAAK;QACf,MAAM,EAAE,gBAAgB,CAAC,OAAO;KACjC;CACuC,CAAC;AAE3C,eAAe,SAAS,CAAC;AAIzB,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAA;;yBAEC,IAAI,CAAC,eAAe;oBACzB,IAAI,CAAC,UAAU;cACrB,IAAI,CAAC,IAAI;mBACJ,IAAI,CAAC,SAAS;gBACjB,IAAI,CAAC,MAAM;oDACyB,IAAI,CAAC,qCAAqC,CAAC;;;;GAI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;IACD,UAAU,EAAE;QACV,QAAQ,EAAE;YACR,OAAO,EAAE,CAAC,QAAQ,CAAC;SACpB;KACF;IACD,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAA;;;0BAGE,IAAI,CAAC,eAAe;qBACzB,IAAI,CAAC,UAAU;eACrB,IAAI,CAAC,IAAI;oBACJ,IAAI,CAAC,SAAS;;sDAEoB,IAAI,CAAC,qCAAqC,CAAC;;UAEvF,IAAI,CAAC,gBAAgB;;;;;;;;;;GAU5B;CACc,CAAC","sourcesContent":["import {Meta, StoryObj} from \"@storybook/web-components\";\nimport {html} from \"lit\";\nimport {type ZNotification} from \".\";\nimport {NotificationType} from \"../../beans\";\nimport {CSSVarsArguments} from \"../../utils/storybook-utils\";\nimport \"./index\";\nimport \"./index.stories.css\";\n\ntype ZNotificationStoriesArgs = ZNotification & {\n notificationText: string;\n} & CSSVarsArguments<\"--z-notification--content-max-width\">;\n\nconst StoryMeta = {\n title: \"ZNotification\",\n component: \"z-notification\",\n argTypes: {\n type: {\n control: {\n type: \"inline-radio\",\n },\n options: Object.values(NotificationType),\n },\n },\n args: {\n \"--z-notification--content-max-width\": \"100%\",\n \"contenticonname\": \"checkmark-circle-filled\",\n \"actiontext\": \"Annulla\",\n \"showclose\": false,\n \"sticky\": false,\n \"type\": NotificationType.SUCCESS,\n },\n} satisfies Meta<ZNotificationStoriesArgs>;\n\nexport default StoryMeta;\n\ntype Story = StoryObj<ZNotificationStoriesArgs>;\n\nexport const Default = {\n render: (args) => html`\n <z-notification\n .contenticonname=${args.contenticonname}\n .actiontext=${args.actiontext}\n .type=${args.type}\n .showclose=${args.showclose}\n .sticky=${args.sticky}\n style=\"--z-notification--content-max-width: ${args[\"--z-notification--content-max-width\"]}\"\n >\n <div class=\"notification-container\"><strong>NOVITÀ</strong>: Testo che descrive le novità.</div>\n </z-notification>\n `,\n} satisfies Story;\n\n/**\n * To use the border top variant set the `borderposition` property to `top`.\n */\nexport const BorderTop = {\n args: {\n borderposition: \"top\",\n },\n render: (args) => html`\n <z-notification\n .contenticonname=${args.contenticonname}\n .actiontext=${args.actiontext}\n .type=${args.type}\n .showclose=${args.showclose}\n .sticky=${args.sticky}\n .borderposition=${args.borderposition}\n style=\"--z-notification--content-max-width: ${args[\"--z-notification--content-max-width\"]}\"\n >\n <div class=\"notification-container\"><strong>NOVITÀ</strong>: Testo che descrive le novità.</div>\n </z-notification>\n `,\n} satisfies Story;\n\nexport const LongText = {\n render: (args) => html`\n <z-notification\n .contenticonname=${args.contenticonname}\n .actiontext=${args.actiontext}\n .type=${args.type}\n .showclose=${args.showclose}\n .sticky=${args.sticky}\n style=\"--z-notification--content-max-width: ${args[\"--z-notification--content-max-width\"]}\"\n >\n Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent rhoncus magna imperdiet malesuada interdum.\n Curabitur volutpat mi purus, in maximus nisl volutpat quis. Suspendisse sed vestibulum magna. Quisque molestie,\n justo non pretium egestas, lorem elit malesuada turpis, et malesuada sapien nunc a urna. Curabitur sagittis augue\n turpis, eu consectetur purus consectetur vitae.\n </z-notification>\n `,\n} satisfies Story;\n\n/**\n * To use the banner variant set the `sticky` property to `true`.\n */\nexport const BannerVariant = {\n args: {\n notificationText: \"Questo è il testo della notifica\",\n },\n parameters: {\n controls: {\n exclude: [\"sticky\"],\n },\n },\n render: (args) => html`\n <div class=\"banner-notification-demo\">\n <z-notification\n .contenticonname=${args.contenticonname}\n .actiontext=${args.actiontext}\n .type=${args.type}\n .showclose=${args.showclose}\n sticky=\"true\"\n style=\"--z-notification--content-max-width: ${args[\"--z-notification--content-max-width\"]}\"\n >\n ${args.notificationText}\n </z-notification>\n <h2 class=\"heading-1-sb\">Titolo della pagina</h2>\n <div class=\"body-1\">\n Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent rhoncus magna imperdiet malesuada interdum.\n Curabitur volutpat mi purus, in maximus nisl volutpat quis. Suspendisse sed vestibulum magna. Quisque molestie,\n justo non pretium egestas, lorem elit malesuada turpis, et malesuada sapien nunc a urna. Curabitur sagittis\n augue turpis, eu consectetur purus consectetur vitae. Sed bibendum nisl diam, eget egestas enim elementum eget.\n Donec quis magna lobortis, tristique nunc in, fringilla lacus. Duis ac porta turpis. Aenean aliquam tortor sed\n felis interdum aliquet dignissim vel ligula. Donec auctor risus vitae nisi finibus, sed suscipit tellus\n fringilla. Sed malesuada gravida tincidunt. Duis tincidunt orci at magna egestas fermentum. Nulla laoreet ante\n felis, non molestie mi venenatis sit amet. Nullam sollicitudin tempus lacus ac maximus. Suspendisse erat magna,\n pellentesque ut lectus sit amet, aliquet scelerisque augue. In at felis facilisis, sodales tortor euismod,\n tincidunt tellus. Quisque vulputate dolor vitae nibh pharetra, a auctor turpis mattis. Nulla facilisi. Vivamus a\n facilisis ex. Vestibulum ultricies scelerisque sapien eu pharetra. Etiam ut porttitor lorem, id ullamcorper\n risus. Donec sed sollicitudin metus. Sed sapien lectus, bibendum quis lorem efficitur, pellentesque maximus\n lectus. Quisque quis lectus quis dolor ultrices facilisis placerat finibus nulla. Donec laoreet urna id varius\n facilisis. Nulla facilisi. Pellentesque dignissim aliquam interdum. Fusce ante mauris, blandit nec imperdiet\n mattis, dictum non sapien. Donec aliquet feugiat quam quis cursus. Curabitur et rutrum nunc. Phasellus ut lorem\n posuere, eleifend felis sed, lobortis arcu. Nam efficitur purus non dolor tincidunt, nec euismod lectus\n hendrerit. Sed eget rutrum odio, ac maximus lacus. Etiam rutrum purus diam, eu pellentesque elit vulputate eget.\n Donec nulla augue, euismod non mollis congue, laoreet vel orci. Cras eget suscipit felis. Phasellus eget erat eu\n nisl suscipit pulvinar. Nunc ullamcorper orci sit amet dui placerat, at vulputate libero finibus. Quisque\n dignissim risus dolor, a porta erat cursus vel. Sed cursus pellentesque magna fringilla varius. Proin sit amet\n posuere massa. Proin nisl massa, hendrerit non congue mattis, tincidunt in turpis. Etiam pharetra posuere est,\n non mollis sapien malesuada non. Quisque metus lectus, hendrerit vel accumsan et, ornare a eros. Donec tempor,\n elit ut pulvinar auctor, sapien velit consectetur justo, interdum lobortis risus ligula vitae nunc. Praesent\n quam felis, posuere et consequat consectetur, tempus non sem. Phasellus in ligula enim. Donec gravida, felis\n vitae elementum mattis, velit ipsum aliquam ipsum, a cursus nisi nisl nec sapien. Ut et orci nulla. Donec\n fringilla magna non risus imperdiet euismod. Sed viverra eget turpis et faucibus. Sed ante orci, interdum in\n ligula in, tincidunt feugiat arcu. In viverra efficitur urna laoreet tristique. Phasellus hendrerit, urna et\n condimentum aliquet, ex urna condimentum dui, vitae vestibulum mauris risus sit amet nunc. Quisque egestas est\n vel lorem commodo, eget vestibulum enim cursus. Cras lectus velit, fermentum eget mauris id, interdum cursus\n massa. Maecenas quis dui vehicula mauris condimentum finibus. Sed et magna velit. Duis eleifend dolor at\n sagittis ornare. Aenean commodo massa enim, ac varius augue varius quis.\n </div>\n </div>\n `,\n} satisfies Story;\n\n/**\n * To use the inline variant set the `sticky` property to `false`.\n */\nexport const InlineVariant = {\n args: {\n notificationText: \"Questo è il testo della notifica\",\n },\n parameters: {\n controls: {\n exclude: [\"sticky\"],\n },\n },\n render: (args) => html`\n <div class=\"inline-notification-demo\">\n <z-notification\n contenticonname=${args.contenticonname}\n actiontext=${args.actiontext}\n type=${args.type}\n showclose=${args.showclose}\n sticky=\"false\"\n style=\"--z-notification--content-max-width: ${args[\"--z-notification--content-max-width\"]}\"\n >\n ${args.notificationText}\n </z-notification>\n <div class=\"content\">\n <h2 class=\"heading-1\">Titolo della scheda</h2>\n <div class=\"body-1\">\n Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent rhoncus magna imperdiet malesuada interdum.\n Curabitur volutpat mi purus, in maximus nisl volutpat quis. Suspendisse sed vestibulum magna.\n </div>\n </div>\n </div>\n `,\n} satisfies Story;\n"]}
1
+ {"version":3,"file":"index.stories.js","sourceRoot":"","sources":["../../../../src/components/z-notification/index.stories.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,IAAI,EAAC,MAA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AAC,SAAS;;sDAEmB,IAAI,CAAC,qCAAqC,CAAC;;;;;;;;;;;;GAY9F;CACc,CAAC;AAElB;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,IAAI,EAAE;QACJ,cAAc,EAAE,KAAK;KACtB;IACD,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAA;;;2BAGG,IAAI,CAAC,eAAe;sBACzB,IAAI,CAAC,UAAU;gBACrB,IAAI,CAAC,IAAI;qBACJ,IAAI,CAAC,SAAS;kBACjB,IAAI,CAAC,MAAM;0BACH,IAAI,CAAC,cAAc;sDACS,IAAI,CAAC,qCAAqC,CAAC;;;;;GAK9F;CACc,CAAC","sourcesContent":["import {Meta, StoryObj} from \"@storybook/web-components\";\nimport {html} from \"lit\";\nimport {type ZNotification} from \".\";\nimport {NotificationType} from \"../../beans\";\nimport {CSSVarsArguments} from \"../../utils/storybook-utils\";\nimport \"./index\";\nimport \"./index.stories.css\";\n\nconst DEMO_LONG_TEXT =\n \"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent rhoncus magna imperdiet malesuada interdum. Curabitur volutpat mi purus, in maximus nisl volutpat quis. Suspendisse sed vestibulum magna. Quisque molestie, justo non pretium egestas, lorem elit malesuada turpis, et malesuada sapien nunc a urna. Curabitur sagittis augue turpis, eu consectetur purus consectetur vitae. Sed bibendum nisl diam, eget egestas enim elementum eget. Donec quis magna lobortis, tristique nunc in, fringilla lacus. Duis ac porta turpis. Aenean aliquam tortor sed felis interdum aliquet dignissim vel ligula. Donec auctor risus vitae nisi finibus, sed suscipit tellus fringilla. Sed malesuada gravida tincidunt. Duis tincidunt orci at magna egestas fermentum. Nulla laoreet ante felis, non molestie mi venenatis sit amet. Nullam sollicitudin tempus lacus ac maximus. Suspendisse erat magna, pellentesque ut lectus sit amet, aliquet scelerisque augue. In at felis facilisis, sodales tortor euismod, tincidunt tellus. Quisque vulputate dolor vitae nibh pharetra, a auctor turpis mattis. Nulla facilisi. Vivamus a facilisis ex. Vestibulum ultricies scelerisque sapien eu pharetra. Etiam ut porttitor lorem, id ullamcorper risus. Donec sed sollicitudin metus. Sed sapien lectus, bibendum quis lorem efficitur, pellentesque maximus lectus. Quisque quis lectus quis dolor ultrices facilisis placerat finibus nulla. Donec laoreet urna id varius facilisis. Nulla facilisi. Pellentesque dignissim aliquam interdum. Fusce ante mauris, blandit nec imperdiet mattis, dictum non sapien. Donec aliquet feugiat quam quis cursus. Curabitur et rutrum nunc. Phasellus ut lorem posuere, eleifend felis sed, lobortis arcu. Nam efficitur purus non dolor tincidunt, nec euismod lectus hendrerit. Sed eget rutrum odio, ac maximus lacus. Etiam rutrum purus diam, eu pellentesque elit vulputate eget. Donec nulla augue, euismod non mollis congue, laoreet vel orci. Cras eget suscipit felis. Phasellus eget erat eu nisl suscipit pulvinar. Nunc ullamcorper orci sit amet dui placerat, at vulputate libero finibus. Quisque dignissim risus dolor, a porta erat cursus vel. Sed cursus pellentesque magna fringilla varius. Proin sit amet posuere massa. Proin nisl massa, hendrerit non congue mattis, tincidunt in turpis. Etiam pharetra posuere est, non mollis sapien malesuada non. Quisque metus lectus, hendrerit vel accumsan et, ornare a eros. Donec tempor, elit ut pulvinar auctor, sapien velit consectetur justo, interdum lobortis risus ligula vitae nunc. Praesent quam felis, posuere et consequat consectetur, tempus non sem. Phasellus in ligula enim. Donec gravida, felis vitae elementum mattis, velit ipsum aliquam ipsum, a cursus nisi nisl nec sapien. Ut et orci nulla. Donec fringilla magna non risus imperdiet euismod. Sed viverra eget turpis et faucibus. Sed ante orci, interdum in ligula in, tincidunt feugiat arcu. In viverra efficitur urna laoreet tristique. Phasellus hendrerit, urna et condimentum aliquet, ex urna condimentum dui, vitae vestibulum mauris risus sit amet nunc. Quisque egestas est vel lorem commodo, eget vestibulum enim cursus. Cras lectus velit, fermentum eget mauris id, interdum cursus massa. Maecenas quis dui vehicula mauris condimentum finibus. Sed et magna velit. Duis eleifend dolor at sagittis ornare. Aenean commodo massa enim, ac varius augue varius quis.\";\n\ntype ZNotificationStoriesArgs = ZNotification &\n CSSVarsArguments<\"--z-notification--top-offset\" | \"--z-notification--content-max-width\">;\n\nconst StoryMeta = {\n title: \"ZNotification\",\n component: \"z-notification\",\n argTypes: {\n type: {\n control: {\n type: \"inline-radio\",\n },\n options: Object.values(NotificationType),\n },\n borderposition: {\n control: {\n type: \"inline-radio\",\n },\n options: [\"top\", \"bottom\"],\n },\n },\n args: {\n \"--z-notification--content-max-width\": \"100%\",\n \"contenticonname\": \"checkmark-circle-filled\",\n \"borderposition\": \"bottom\",\n \"actiontext\": \"Annulla\",\n \"showclose\": false,\n \"sticky\": false,\n \"type\": NotificationType.SUCCESS,\n },\n} satisfies Meta<ZNotificationStoriesArgs>;\n\nexport default StoryMeta;\n\ntype Story = StoryObj<ZNotificationStoriesArgs>;\n\nexport const Default = {\n render: (args) => html`\n <z-notification\n .contenticonname=${args.contenticonname}\n .actiontext=${args.actiontext}\n .type=${args.type}\n .showclose=${args.showclose}\n .sticky=${args.sticky}\n style=\"--z-notification--content-max-width: ${args[\"--z-notification--content-max-width\"]}\"\n >\n <div class=\"notification-container\"><strong>NOVITÀ</strong>: Testo che descrive le novità.</div>\n </z-notification>\n `,\n} satisfies Story;\n\nexport const LongText = {\n render: (args) => html`\n <z-notification\n .contenticonname=${args.contenticonname}\n .actiontext=${args.actiontext}\n .type=${args.type}\n .showclose=${args.showclose}\n .sticky=${args.sticky}\n style=\"--z-notification--content-max-width: ${args[\"--z-notification--content-max-width\"]}\"\n >\n <div>\n Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent rhoncus magna imperdiet malesuada interdum.\n Curabitur volutpat mi purus, in maximus nisl volutpat quis. Suspendisse sed vestibulum magna. Quisque molestie,\n justo non pretium egestas, lorem elit malesuada turpis, et malesuada sapien nunc a urna. Curabitur sagittis\n augue turpis, eu consectetur purus consectetur vitae.\n </div>\n </z-notification>\n `,\n} satisfies Story;\n\nexport const StickyBanner = {\n args: {\n \"--z-notification--top-offset\": \"0\",\n },\n parameters: {\n controls: {\n exclude: [\"sticky\"],\n },\n },\n render: (args) => html`\n <div class=\"banner-notification-demo\">\n <z-notification\n .contenticonname=${args.contenticonname}\n .actiontext=${args.actiontext}\n .type=${args.type}\n .showclose=${args.showclose}\n .sticky=\"true\"\n style=\"--z-notification--top-offset: ${args[\n \"--z-notification--top-offset\"\n ]}; --z-notification--content-max-width: ${args[\"--z-notification--content-max-width\"]}\"\n >\n Questo è il testo della notifica\n </z-notification>\n <div class=\"heading-1-sb\">Titolo della pagina</div>\n <div class=\"body-1\">${DEMO_LONG_TEXT}</div>\n </div>\n `,\n} satisfies Story;\n\nexport const CenteredContent = {\n args: {\n \"--z-notification--content-max-width\": \"768px\",\n },\n render: (args) => html`\n <z-notification\n .contenticonname=${args.contenticonname}\n .actiontext=${args.actiontext}\n .type=${args.type}\n .showclose=${args.showclose}\n .sticky=${args.sticky}\n .borderposition=${args.borderposition}\n style=\"--z-notification--content-max-width: ${args[\"--z-notification--content-max-width\"]}\"\n >\n <div>\n Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent rhoncus magna imperdiet malesuada interdum.\n Curabitur volutpat mi purus, in maximus nisl volutpat quis.\n </div>\n </z-notification>\n <div\n class=\"z-notification-demo-page\"\n style=\"max-width: ${args[\"--z-notification--content-max-width\"]}\"\n >\n <div class=\"heading-1\">Titolo della pagina</div>\n <div class=\"body-1\">${DEMO_LONG_TEXT}</div>\n </div>\n `,\n};\n\n/**\n * To have an inline notification keep the `sticky` property set to `false`.\n */\nexport const Inline = {\n parameters: {\n controls: {\n exclude: [\"sticky\"],\n },\n },\n render: (args) => html`\n <div class=\"inline-notification-demo\">\n <z-notification\n .contenticonname=${args.contenticonname}\n .actiontext=${args.actiontext}\n .type=${args.type}\n .showclose=${args.showclose}\n .sticky=\"false\"\n style=\"--z-notification--content-max-width: ${args[\"--z-notification--content-max-width\"]}\"\n >\n Questo è il testo della notifica\n </z-notification>\n <div class=\"content\">\n <div class=\"heading-1\">Titolo della scheda</div>\n <div class=\"body-1\">\n Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent rhoncus magna imperdiet malesuada interdum.\n Curabitur volutpat mi purus, in maximus nisl volutpat quis. Suspendisse sed vestibulum magna.\n </div>\n </div>\n </div>\n `,\n} satisfies Story;\n\n/**\n * The position of the border can be changed to correctly display the notification when put on the bottom of the screen.\n */\nexport const BorderPosition = {\n args: {\n borderposition: \"top\",\n },\n render: (args) => html`\n <div class=\"z-notification-border-position-demo\">\n <z-notification\n .contenticonname=${args.contenticonname}\n .actiontext=${args.actiontext}\n .type=${args.type}\n .showclose=${args.showclose}\n .sticky=${args.sticky}\n .borderposition=${args.borderposition}\n style=\"--z-notification--content-max-width: ${args[\"--z-notification--content-max-width\"]}\"\n >\n <div class=\"notification-container\"><strong>NOVITÀ</strong>: Testo che descrive le novità.</div>\n </z-notification>\n </div>\n `,\n} satisfies Story;\n"]}