@zanichelli/albe-web-components 6.1.0 → 6.2.0

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 (131) hide show
  1. package/dist/cjs/index-e3299e0a.js +34 -10
  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-anchor-navigation.cjs.entry.js +53 -0
  5. package/dist/cjs/z-app-header_2.cjs.entry.js +153 -0
  6. package/dist/cjs/z-app-switcher.cjs.entry.js +29 -0
  7. package/dist/cjs/z-app-topbar.cjs.entry.js +41 -0
  8. package/dist/cjs/z-divider.cjs.entry.js +26 -0
  9. package/dist/cjs/z-input-label_2.cjs.entry.js +19 -3
  10. package/dist/cjs/z-input_2.cjs.entry.js +253 -0
  11. package/dist/cjs/z-link.cjs.entry.js +74 -0
  12. package/dist/cjs/{z-list_2.cjs.entry.js → z-list_3.cjs.entry.js} +51 -4
  13. package/dist/cjs/z-logo.cjs.entry.js +26 -0
  14. package/dist/cjs/{z-app-switcher_9.cjs.entry.js → z-range-picker.cjs.entry.js} +11 -439
  15. package/dist/collection/collection-manifest.json +1 -0
  16. package/dist/collection/components/inputs/z-select/index.js +35 -2
  17. package/dist/collection/components/inputs/z-select/styles.css +4 -0
  18. package/dist/collection/components/z-anchor-navigation/index.js +95 -0
  19. package/dist/collection/components/z-anchor-navigation/styles.css +118 -0
  20. package/dist/esm/index-a2ca4b97.js +34 -10
  21. package/dist/esm/index.js +1 -1
  22. package/dist/esm/loader.js +1 -1
  23. package/dist/esm/{utils-39ca028c.js → utils-9e81727a.js} +1 -1
  24. package/dist/esm/web-components-library.js +1 -1
  25. package/dist/esm/z-anchor-navigation.entry.js +49 -0
  26. package/dist/esm/z-app-header_2.entry.js +148 -0
  27. package/dist/esm/z-app-switcher.entry.js +25 -0
  28. package/dist/esm/z-app-topbar.entry.js +37 -0
  29. package/dist/esm/z-chip.entry.js +1 -1
  30. package/dist/esm/z-combobox.entry.js +1 -1
  31. package/dist/esm/z-divider.entry.js +22 -0
  32. package/dist/esm/z-file-upload.entry.js +1 -1
  33. package/dist/esm/z-input-deprecated.entry.js +1 -1
  34. package/dist/esm/z-input-label_2.entry.js +20 -4
  35. package/dist/esm/z-input_2.entry.js +248 -0
  36. package/dist/esm/z-link.entry.js +70 -0
  37. package/dist/esm/{z-list_2.entry.js → z-list_3.entry.js} +51 -5
  38. package/dist/esm/z-logo.entry.js +22 -0
  39. package/dist/esm/z-menu-dropdown_2.entry.js +1 -1
  40. package/dist/esm/z-myz-card-info.entry.js +1 -1
  41. package/dist/esm/z-myz-list-item.entry.js +1 -1
  42. package/dist/esm/z-pagination-bar.entry.js +1 -1
  43. package/dist/esm/z-pocket_3.entry.js +1 -1
  44. package/dist/esm/z-popover-deprecated.entry.js +1 -1
  45. package/dist/esm/z-popover.entry.js +1 -1
  46. package/dist/esm/{z-app-switcher_9.entry.js → z-range-picker.entry.js} +3 -423
  47. package/dist/esm/z-skip-to-content.entry.js +1 -1
  48. package/dist/esm/z-slideshow.entry.js +1 -1
  49. package/dist/esm/z-table-header.entry.js +1 -1
  50. package/dist/esm/z-toggle-switch.entry.js +1 -1
  51. package/dist/types/beans/index.d.ts +1 -0
  52. package/dist/types/components/inputs/z-select/index.d.ts +3 -0
  53. package/dist/types/components/z-anchor-navigation/index.d.ts +39 -0
  54. package/dist/types/components.d.ts +23 -0
  55. package/dist/web-components-library/index.esm.js +1 -1
  56. package/dist/web-components-library/{p-87fdd14f.js → p-16da5460.js} +1 -1
  57. package/dist/web-components-library/p-1cb23bbb.entry.js +1 -0
  58. package/dist/web-components-library/p-2774ab29.entry.js +1 -0
  59. package/dist/web-components-library/{p-23781e2b.entry.js → p-3ba1b96e.entry.js} +1 -1
  60. package/{www/build/p-ff18690f.entry.js → dist/web-components-library/p-40e0d384.entry.js} +1 -1
  61. package/dist/web-components-library/{p-5d4a6659.entry.js → p-41e2bb0f.entry.js} +1 -1
  62. package/dist/web-components-library/{p-ccf67abf.entry.js → p-4d93268a.entry.js} +1 -1
  63. package/dist/web-components-library/{p-35ceae27.entry.js → p-5c02e500.entry.js} +1 -1
  64. package/dist/web-components-library/{p-a6d6178a.entry.js → p-6b11cc16.entry.js} +1 -1
  65. package/dist/web-components-library/{p-1bd6592f.entry.js → p-7dd5431f.entry.js} +1 -1
  66. package/dist/web-components-library/{p-10b46635.entry.js → p-7ebdeefa.entry.js} +1 -1
  67. package/dist/web-components-library/p-9434d80c.entry.js +1 -0
  68. package/dist/web-components-library/{p-982254e5.entry.js → p-a17b363e.entry.js} +1 -1
  69. package/dist/web-components-library/p-a329f5ff.entry.js +1 -0
  70. package/dist/web-components-library/p-ae79573a.entry.js +1 -0
  71. package/dist/web-components-library/{p-3913bff2.entry.js → p-c3f29701.entry.js} +1 -1
  72. package/dist/web-components-library/{p-79b8d87e.entry.js → p-c75e80fb.entry.js} +1 -1
  73. package/dist/web-components-library/p-cea1f402.entry.js +1 -0
  74. package/dist/web-components-library/p-d572a365.entry.js +1 -0
  75. package/dist/web-components-library/{p-5c9556e3.entry.js → p-d5f6bf94.entry.js} +1 -1
  76. package/dist/web-components-library/{p-a79cc147.entry.js → p-db5a98d1.entry.js} +1 -1
  77. package/dist/web-components-library/{p-3a431f04.entry.js → p-dc2ca41d.entry.js} +1 -1
  78. package/{www/build/p-d3733579.entry.js → dist/web-components-library/p-e731914a.entry.js} +1 -1
  79. package/dist/web-components-library/p-e8fbb103.entry.js +1 -0
  80. package/dist/web-components-library/p-f0653e72.entry.js +1 -0
  81. package/dist/web-components-library/{p-4e733fbd.entry.js → p-f260c62b.entry.js} +1 -1
  82. package/dist/web-components-library/p-f8ef69c4.entry.js +1 -0
  83. package/dist/web-components-library/web-components-library.esm.js +1 -1
  84. package/package.json +1 -1
  85. package/react/components.d.ts +1 -0
  86. package/react/components.js +4 -3
  87. package/react/components.js.map +1 -1
  88. package/www/build/index.esm.js +1 -1
  89. package/www/build/{p-87fdd14f.js → p-16da5460.js} +1 -1
  90. package/www/build/p-1cb23bbb.entry.js +1 -0
  91. package/www/build/p-2774ab29.entry.js +1 -0
  92. package/www/build/{p-23781e2b.entry.js → p-3ba1b96e.entry.js} +1 -1
  93. package/{dist/web-components-library/p-ff18690f.entry.js → www/build/p-40e0d384.entry.js} +1 -1
  94. package/www/build/{p-5d4a6659.entry.js → p-41e2bb0f.entry.js} +1 -1
  95. package/www/build/{p-ccf67abf.entry.js → p-4d93268a.entry.js} +1 -1
  96. package/www/build/p-4d9ae314.js +1 -0
  97. package/www/build/{p-35ceae27.entry.js → p-5c02e500.entry.js} +1 -1
  98. package/www/build/{p-a6d6178a.entry.js → p-6b11cc16.entry.js} +1 -1
  99. package/www/build/{p-1bd6592f.entry.js → p-7dd5431f.entry.js} +1 -1
  100. package/www/build/{p-10b46635.entry.js → p-7ebdeefa.entry.js} +1 -1
  101. package/www/build/p-9434d80c.entry.js +1 -0
  102. package/www/build/{p-982254e5.entry.js → p-a17b363e.entry.js} +1 -1
  103. package/www/build/p-a329f5ff.entry.js +1 -0
  104. package/www/build/p-ae79573a.entry.js +1 -0
  105. package/www/build/{p-3913bff2.entry.js → p-c3f29701.entry.js} +1 -1
  106. package/www/build/{p-79b8d87e.entry.js → p-c75e80fb.entry.js} +1 -1
  107. package/www/build/p-cea1f402.entry.js +1 -0
  108. package/www/build/p-d572a365.entry.js +1 -0
  109. package/www/build/{p-5c9556e3.entry.js → p-d5f6bf94.entry.js} +1 -1
  110. package/www/build/{p-a79cc147.entry.js → p-db5a98d1.entry.js} +1 -1
  111. package/www/build/{p-3a431f04.entry.js → p-dc2ca41d.entry.js} +1 -1
  112. package/{dist/web-components-library/p-d3733579.entry.js → www/build/p-e731914a.entry.js} +1 -1
  113. package/www/build/p-e8fbb103.entry.js +1 -0
  114. package/www/build/p-f0653e72.entry.js +1 -0
  115. package/www/build/{p-4e733fbd.entry.js → p-f260c62b.entry.js} +1 -1
  116. package/www/build/p-f8ef69c4.entry.js +1 -0
  117. package/www/build/web-components-library.esm.js +1 -1
  118. package/www/index.html +1 -24
  119. package/dist/cjs/z-app-header.cjs.entry.js +0 -133
  120. package/dist/cjs/z-list-group.cjs.entry.js +0 -54
  121. package/dist/esm/z-app-header.entry.js +0 -129
  122. package/dist/esm/z-list-group.entry.js +0 -50
  123. package/dist/web-components-library/p-5f3baf14.entry.js +0 -1
  124. package/dist/web-components-library/p-bb95b82f.entry.js +0 -1
  125. package/dist/web-components-library/p-cbb3ea13.entry.js +0 -1
  126. package/dist/web-components-library/p-edf0195b.entry.js +0 -1
  127. package/www/build/p-36654297.js +0 -1
  128. package/www/build/p-5f3baf14.entry.js +0 -1
  129. package/www/build/p-bb95b82f.entry.js +0 -1
  130. package/www/build/p-cbb3ea13.entry.js +0 -1
  131. package/www/build/p-edf0195b.entry.js +0 -1
@@ -16,6 +16,12 @@ export namespace Components {
16
16
  */
17
17
  "type": AlertType;
18
18
  }
19
+ interface ZAnchorNavigation {
20
+ /**
21
+ * If enabled, the text of each anchor will be hidden unless for the current one or the one the user is hovering.
22
+ */
23
+ "hideUnselected": boolean;
24
+ }
19
25
  interface ZAppHeader {
20
26
  /**
21
27
  * The opening state of the drawer.
@@ -1711,6 +1717,7 @@ export namespace Components {
1711
1717
  * get the input value
1712
1718
  */
1713
1719
  "getValue": () => Promise<string>;
1720
+ "hasGroupItems"?: boolean;
1714
1721
  /**
1715
1722
  * the id of the input element
1716
1723
  */
@@ -2313,6 +2320,12 @@ declare global {
2313
2320
  prototype: HTMLZAlertElement;
2314
2321
  new (): HTMLZAlertElement;
2315
2322
  };
2323
+ interface HTMLZAnchorNavigationElement extends Components.ZAnchorNavigation, HTMLStencilElement {
2324
+ }
2325
+ var HTMLZAnchorNavigationElement: {
2326
+ prototype: HTMLZAnchorNavigationElement;
2327
+ new (): HTMLZAnchorNavigationElement;
2328
+ };
2316
2329
  interface HTMLZAppHeaderElement extends Components.ZAppHeader, HTMLStencilElement {
2317
2330
  }
2318
2331
  var HTMLZAppHeaderElement: {
@@ -2963,6 +2976,7 @@ declare global {
2963
2976
  };
2964
2977
  interface HTMLElementTagNameMap {
2965
2978
  "z-alert": HTMLZAlertElement;
2979
+ "z-anchor-navigation": HTMLZAnchorNavigationElement;
2966
2980
  "z-app-header": HTMLZAppHeaderElement;
2967
2981
  "z-app-switcher": HTMLZAppSwitcherElement;
2968
2982
  "z-app-topbar": HTMLZAppTopbarElement;
@@ -3080,6 +3094,12 @@ declare namespace LocalJSX {
3080
3094
  */
3081
3095
  "type"?: AlertType;
3082
3096
  }
3097
+ interface ZAnchorNavigation {
3098
+ /**
3099
+ * If enabled, the text of each anchor will be hidden unless for the current one or the one the user is hovering.
3100
+ */
3101
+ "hideUnselected"?: boolean;
3102
+ }
3083
3103
  interface ZAppHeader {
3084
3104
  /**
3085
3105
  * The opening state of the drawer.
@@ -4987,6 +5007,7 @@ declare namespace LocalJSX {
4987
5007
  * the input is disabled
4988
5008
  */
4989
5009
  "disabled"?: boolean;
5010
+ "hasGroupItems"?: boolean;
4990
5011
  /**
4991
5012
  * the id of the input element
4992
5013
  */
@@ -5427,6 +5448,7 @@ declare namespace LocalJSX {
5427
5448
  }
5428
5449
  interface IntrinsicElements {
5429
5450
  "z-alert": ZAlert;
5451
+ "z-anchor-navigation": ZAnchorNavigation;
5430
5452
  "z-app-header": ZAppHeader;
5431
5453
  "z-app-switcher": ZAppSwitcher;
5432
5454
  "z-app-topbar": ZAppTopbar;
@@ -5542,6 +5564,7 @@ declare module "@stencil/core" {
5542
5564
  export namespace JSX {
5543
5565
  interface IntrinsicElements {
5544
5566
  "z-alert": LocalJSX.ZAlert & JSXBase.HTMLAttributes<HTMLZAlertElement>;
5567
+ "z-anchor-navigation": LocalJSX.ZAnchorNavigation & JSXBase.HTMLAttributes<HTMLZAnchorNavigationElement>;
5545
5568
  "z-app-header": LocalJSX.ZAppHeader & JSXBase.HTMLAttributes<HTMLZAppHeaderElement>;
5546
5569
  "z-app-switcher": LocalJSX.ZAppSwitcher & JSXBase.HTMLAttributes<HTMLZAppSwitcherElement>;
5547
5570
  "z-app-topbar": LocalJSX.ZAppTopbar & JSXBase.HTMLAttributes<HTMLZAppTopbarElement>;
@@ -1 +1 @@
1
- import{c as X}from"./p-87fdd14f.js";export{p as AlertType,A as AvatarSize,c as ButtonSize,b as ButtonType,B as ButtonVariant,C as CardVariant,V as CarouselArrowsPosition,W as CarouselProgressMode,U as CoverHeroContentPosition,R as CoverHeroVariant,q as Device,i as DividerOrientation,D as DividerSize,l as ExpandableListButtonAlign,E as ExpandableListStyle,Q as InfoRevealPosition,d as InputStatus,I as InputType,h as KeyboardCode,K as KeyboardKeyCode,m as LabelPosition,L as LicenseType,n as ListDividerType,j as ListSize,N as NavigationTabsOrientation,a as NavigationTabsSize,o as NotificationType,O as OffCanvasVariant,r as PocketStatus,f as PopoverBorderRadius,e as PopoverPosition,P as PopoverPositions,g as PopoverShadow,k as Size,S as SortDirection,M as StatusTagStatus,T as ThemeVariant,s as ToastNotification,u as ToastNotificationPosition,t as ToastNotificationTransition,w as TransitionDirection,v as ZAriaAlertMode,y as ZChipType,F as ZDatePickerMode,G as ZDatePickerModeValue,H as ZDatePickerPosition,x as ZFileUploadType,J as ZRangePickerMode,z as ZSectionTitleDividerPosition,Z as ZTableRowExpandedType}from"./p-9f80c0b8.js";import"./p-d69e14fb.js";const Y={colorFromId:X};export{Y as Utils}
1
+ import{c as X}from"./p-16da5460.js";export{p as AlertType,A as AvatarSize,c as ButtonSize,b as ButtonType,B as ButtonVariant,C as CardVariant,V as CarouselArrowsPosition,W as CarouselProgressMode,U as CoverHeroContentPosition,R as CoverHeroVariant,q as Device,i as DividerOrientation,D as DividerSize,l as ExpandableListButtonAlign,E as ExpandableListStyle,Q as InfoRevealPosition,d as InputStatus,I as InputType,h as KeyboardCode,K as KeyboardKeyCode,m as LabelPosition,L as LicenseType,n as ListDividerType,j as ListSize,N as NavigationTabsOrientation,a as NavigationTabsSize,o as NotificationType,O as OffCanvasVariant,r as PocketStatus,f as PopoverBorderRadius,e as PopoverPosition,P as PopoverPositions,g as PopoverShadow,k as Size,S as SortDirection,M as StatusTagStatus,T as ThemeVariant,s as ToastNotification,u as ToastNotificationPosition,t as ToastNotificationTransition,w as TransitionDirection,v as ZAriaAlertMode,y as ZChipType,F as ZDatePickerMode,G as ZDatePickerModeValue,H as ZDatePickerPosition,x as ZFileUploadType,J as ZRangePickerMode,z as ZSectionTitleDividerPosition,Z as ZTableRowExpandedType}from"./p-9f80c0b8.js";import"./p-d69e14fb.js";const Y={colorFromId:X};export{Y as Utils}
@@ -1 +1 @@
1
- import{h as a,q as t}from"./p-9f80c0b8.js";import{t as e,m as n}from"./p-d69e14fb.js";function r(a){switch(a){case!0:case"true":case 1:case"1":case"on":case"yes":return!0;case!1:case"false":case 0:case"0":case"off":case"no":return!1;default:return a}}function s(){return Math.random().toString(36).replace("0.","")}function c(t,e,...n){t.code!==a.ENTER&&t.code!==a.SPACE||(t.preventDefault(),e(...n))}function u(a=null){return a||(a=document.activeElement),a&&a.shadowRoot&&a.shadowRoot.activeElement?u(a=a.shadowRoot.activeElement):a}function o(a,t=[]){return t.push(a),a.parentElement?o(a=a.parentElement,t):a.parentNode&&a.parentNode.host?o(a=a.parentNode.host,t):t}function f(){switch(!0){case window.innerWidth<=n:return t.MOBILE;case window.innerWidth<=e:return t.TABLET;default:return t.DESKTOP}}function i(a){try{return JSON.parse(a)}catch(a){return!1}}function h(a){const t=Math.ceil(2**31-1)*parseFloat(`0.${a}`);let e=Math.ceil(t%1*19);return 0===e&&(e=1),`avatar-C${e.toString().padStart(2,"0")}`}export{o as a,r as b,h as c,i as d,u as e,f as g,c as h,s as r}
1
+ import{h as a,q as t}from"./p-9f80c0b8.js";import{t as e,m as n}from"./p-d69e14fb.js";function r(a){switch(a){case!0:case"true":case 1:case"1":case"on":case"yes":return!0;case!1:case"false":case 0:case"0":case"off":case"no":return!1;default:return a}}function s(){return Math.random().toString(36).replace("0.","")}function c(t,e,...n){t.code!==a.ENTER&&t.code!==a.SPACE||(t.preventDefault(),e(...n))}function u(a=null){return a||(a=document.activeElement),a&&a.shadowRoot&&a.shadowRoot.activeElement?u(a=a.shadowRoot.activeElement):a}function o(a,t=[]){return t.push(a),a.parentElement?o(a=a.parentElement,t):a.parentNode&&a.parentNode.host?o(a=a.parentNode.host,t):t}function f(){switch(!0){case window.innerWidth<=n:return t.MOBILE;case window.innerWidth<=e:return t.TABLET;default:return t.DESKTOP}}function i(a){try{return JSON.parse(a)}catch(a){return!1}}function h(a){const t=Math.ceil(2**31-1)*parseFloat(`0.${a}`);let e=Math.ceil(t%1*19);return 0===e&&(e=1),`avatar-C${e.toString().padStart(2,"0")}`}export{o as a,i as b,h as c,r as d,u as e,f as g,c as h,s as r}
@@ -0,0 +1 @@
1
+ import{r as e,c as t,h as a,H as r,g as i}from"./p-d17ebc2f.js";import{I as n}from"./p-b2d16b41.js";const o="undefined"!=typeof IntersectionObserver,s=class{constructor(a){e(this,a),this.sticking=t(this,"sticking",7),this.stuck=!1,this.overlay=!1,this.flow="auto",this.drawerOpen=!1,this.stucked=!1,this.observer=o&&new IntersectionObserver((([e])=>{this.stucked=!e.isIntersecting}),{threshold:.5}),this.openDrawer=this.openDrawer.bind(this),this.closeDrawer=this.closeDrawer.bind(this),this.collectMenuElements.bind(this)}emitStickingEvent(){this.sticking.emit(this.stucked)}componentDidLoad(){this.collectMenuElements(),this.onStuckMode()}get title(){const e=this.hostElement.querySelector('[slot="title"]');return null===e?"":e.textContent.trim()}get scrollParent(){const e=this.hostElement.offsetParent;return e===document.body||e===document.documentElement?window:e}collectMenuElements(){const e=this.menuElements=this.hostElement.querySelectorAll('[slot="menu"]');this.menuLength=e.length,this.setMenuFloatingMode()}onStuckMode(){this.stuck?this.enableStuckObserver():this.disableStuckMode()}enableStuckObserver(){this.observer&&this.observer.observe(this.container)}disableStuckMode(){this.stucked=!1,this.observer&&this.observer.unobserve(this.container)}onStucked(){this.scrollParent&&this.emitStickingEvent()}setMenuFloatingMode(){if(0===this.menuElements.length)return;const e=this.menuElements;for(let t=0,a=e.length;t<a;t++)e[t].open=!1,e[t].floating=!this.drawerOpen}render(){return a(r,{"menu-length":this.menuLength},a("div",{class:"heading-panel",ref:e=>this.container=e},a("div",{class:"hero-container"},a("slot",{name:"hero"},this.hero&&a("img",{alt:"",src:this.hero}))),a("div",{class:"heading-container"},a("div",{class:"heading-title"},this.menuLength>0&&a("button",{class:"drawer-trigger","aria-label":"Apri menu",onClick:this.openDrawer},a("z-icon",{name:"burger-menu"})),a("slot",{name:"title"})),a("div",{class:"heading-subtitle"},a("slot",{name:"subtitle"}))),a("div",{class:"menu-container"},!this.drawerOpen&&"offcanvas"!==this.flow&&a("slot",{name:"menu",onSlotchange:()=>this.collectMenuElements()}))),a("div",{class:"drawer-container"},a("div",{class:"drawer-overlay",onClick:this.closeDrawer}),a("div",{class:"drawer-panel"},a("button",{class:"drawer-close","aria-label":"Chiudi menu",onClick:this.closeDrawer},a("z-icon",{name:"close"})),a("div",{class:"drawer-content"},this.drawerOpen&&a("slot",{name:"menu",onSlotchange:()=>this.collectMenuElements()})))),this.stucked&&a("div",{class:"heading-stucked"},this.menuLength>0&&a("button",{class:"drawer-trigger","aria-label":"Apri menu",onClick:this.openDrawer},a("z-icon",{name:"burger-menu"})),a("div",{class:"heading-title"},a("slot",{name:"stucked-title"},this.title))))}openDrawer(){this.drawerOpen=!0}closeDrawer(){this.drawerOpen=!1}get hostElement(){return i(this)}static get watchers(){return{stuck:["onStuckMode"],stucked:["onStucked"],drawerOpen:["setMenuFloatingMode"]}}};s.style=':host{--app-header-height:auto;--app-header-typography-1-size:24px;--app-header-typography-2-size:28px;--app-header-typography-3-size:32px;--app-header-typography-4-size:36px;--app-header-typography-5-size:42px;--app-header-typography-6-size:48px;--app-header-typography-7-size:54px;--app-header-typography-8-size:60px;--app-header-typography-9-size:68px;--app-header-typography-10-size:76px;--app-header-typography-11-size:84px;--app-header-typography-12-size:92px;--app-header-typography-1-lineheight:1.33;--app-header-typography-2-lineheight:1.29;--app-header-typography-3-lineheight:1.25;--app-header-typography-4-lineheight:1.24;--app-header-typography-5-lineheight:1.24;--app-header-typography-6-lineheight:1.25;--app-header-typography-7-lineheight:1.2;--app-header-typography-8-lineheight:1.26;--app-header-typography-9-lineheight:1.24;--app-header-typography-10-lineheight:1.26;--app-header-typography-11-lineheight:1.2;--app-header-typography-12-lineheight:1.2;--app-header-typography-1-tracking:calc(-0.2 / 1em);--app-header-typography-2-tracking:calc(-0.4 / 1em);--app-header-typography-3-tracking:calc(-0.6 / 1em);--app-header-typography-4-tracking:calc(-0.8 / 1em);--app-header-typography-5-tracking:calc(-1 / 1em);--app-header-typography-6-tracking:calc(-1.2 / 1em);--app-header-typography-7-tracking:calc(-1.4 / 1em);--app-header-typography-8-tracking:calc(-1.6 / 1em);--app-header-typography-9-tracking:calc(-1.8 / 1em);--app-header-typography-10-tracking:calc(-2 / 1em);--app-header-typography-11-tracking:calc(-2.2 / 1em);--app-header-typography-12-tracking:calc(-2.4 / 1em);--app-header-top-offset:48px;--app-header-drawer-trigger-size:calc(var(--space-unit) * 4);--app-header-bg:var(--color-white);--app-header-stucked-bg:var(--color-white);--app-header-text-color:var(--gray800);--app-header-stucked-text-color:var(--gray800);display:block;color:var(--app-header-text-color)}:host,*{box-sizing:border-box}.heading-panel{position:relative;display:flex;width:100%;height:var(--app-header-height);flex-direction:column;flex-grow:0;flex-shrink:0;align-items:baseline;justify-content:flex-start;padding:calc(var(--space-unit) * 2) var(--grid-mobile-margin);background:var(--app-header-bg)}:host(:empty) .heading-panel{padding:0}.heading-title{display:flex;max-width:100%;flex-direction:row;align-items:center}:host(:not([menu-length="0"])) .heading-subtitle{padding-left:calc(var(--app-header-drawer-trigger-size) + (var(--space-unit) * 1.5))}.heading-stucked{position:fixed;z-index:20;top:var(--app-header-top-offset);left:0;display:flex;width:100%;max-width:100%;flex-direction:row;padding:var(--space-unit) var(--grid-mobile-margin);animation:slide-stucked-heading-in 250ms ease-out;background:var(--app-header-stucked-bg);box-shadow:var(--shadow-2);color:var(--app-header-stucked-text-color)}.heading-stucked .heading-title,.heading-stucked .heading-title>*,.heading-stucked .heading-title ::slotted([slot="stucked-title"]){display:block;overflow:hidden;line-height:1.2;text-overflow:ellipsis;white-space:nowrap}.heading-stucked .heading-title>*,::slotted([slot="title"]),::slotted([slot="stucked-title"]){margin:0;font-family:"IBM Plex Serif", serif;font-size:var(--app-header-typography-3-size);font-weight:700;letter-spacing:var(--app-header-typography-3-tracking)}::slotted([slot="title"]){line-height:1}::slotted([slot="subtitle"]){margin:var(--space-unit) 0 0;font-family:var(--font-family-sans);font-size:20px;font-style:italic;font-weight:500;line-height:1.2}.heading-container{position:relative;z-index:1;display:flex;max-width:100%;flex-direction:column;align-items:flex-start;justify-content:flex-start;margin-right:auto}.menu-container{display:none;flex-flow:row wrap;align-items:baseline}.menu-container ::slotted([open]){position:relative;z-index:3}.menu-container ::slotted(*:not(:last-of-type)){margin-right:calc(var(--space-unit) * 4.5)}.drawer-trigger{padding:0;border:0;margin:0 calc(var(--space-unit) * 1.5) 0 0;appearance:none;background:none;border-radius:0;color:inherit;cursor:pointer}.drawer-trigger z-icon{--z-icon-width:var(--app-header-drawer-trigger-size);--z-icon-height:var(--app-header-drawer-trigger-size);fill:currentcolor}.drawer-container{position:fixed;z-index:100;top:var(--app-header-top-offset);left:0;width:100%;height:100%;pointer-events:none}.drawer-container .drawer-overlay{position:absolute;z-index:1;top:0;left:0;display:block;width:100%;height:100%;background:var(--gray900);opacity:0;pointer-events:none;transition:opacity 400ms ease-out}.drawer-panel{position:absolute;z-index:2;top:0;left:0;display:flex;width:375px;max-width:100%;height:100%;flex-direction:column;align-items:flex-start;padding:calc(var(--space-unit) * 2) var(--space-unit);background:var(--color-white);color:var(--gray800);pointer-events:none;transform:translate3d(-100%, 0, 0);transition:transform 400ms ease-out}.drawer-content{display:flex;overflow:auto;width:100%;flex:1 auto;flex-direction:column;padding:calc(var(--space-unit) * 0.5) var(--space-unit)}.drawer-content::-webkit-scrollbar{width:10px;background:linear-gradient(to right, transparent 0 3px, var(--gray200) 3px 7px, transparent 7px 10px);border-radius:var(--border-radius)}.drawer-content::-webkit-scrollbar-track{background-color:transparent}.drawer-content::-webkit-scrollbar-thumb{width:10px;background-color:var(--color-primary01);border-radius:var(--border-radius)}.drawer-content::-webkit-scrollbar-thumb:hover{background-color:var(--color-hover-primary)}.drawer-content ::slotted(z-menu){width:100%}.drawer-content ::slotted(z-menu:not(:last-of-type)){margin-bottom:calc(var(--space-unit) * 2.5)}.drawer-close{--z-icon-width:var(--app-header-drawer-trigger-size);--z-icon-height:var(--app-header-drawer-trigger-size);padding:0;border:0;margin:0 0 calc(var(--space-unit) * 2.5) var(--space-unit);appearance:none;background:transparent;border-radius:0;color:inherit;cursor:pointer;fill:currentcolor;font-size:inherit;outline:none}.drawer-close:focus-visible{box-shadow:var(--shadow-focus-primary)}:host([drawer-open]) .drawer-container .drawer-overlay{opacity:0.7;pointer-events:all}:host([drawer-open]) .drawer-container .drawer-panel{pointer-events:all;transform:none}.hero-container{position:absolute;z-index:0;top:0;left:0;width:100%;height:100%}:host([overlay]) .heading-panel .drawer-trigger z-icon,:host([overlay]) .heading-panel .heading-container,:host([overlay]) .heading-panel .menu-container{color:var(--color-white);fill:var(--color-white)}:host([overlay]) .heading-panel .menu-container ::slotted(z-menu:not([open])){--color-surface05:var(--color-white)}:host([overlay]) .hero-container::after{position:absolute;z-index:0;top:0;left:0;width:100%;height:100%;background:var(--color-black);content:"";opacity:0.5}.hero-container img,.hero-container ::slotted(*){position:absolute;top:0;left:0;width:100%;height:100%;object-fit:cover;object-position:top center;-webkit-user-drag:none}@media only screen and (min-width: 768px){.heading-panel{padding:calc(var(--space-unit) * 3) var(--grid-tablet-margin)}.heading-stucked{padding-right:var(--grid-tablet-margin);padding-left:var(--grid-tablet-margin)}:host(:not([flow="offcanvas"])) .heading-subtitle{padding-left:0}:host(:not([flow="offcanvas"])) .menu-container{display:flex}:host(:not([flow="offcanvas"])) .heading-container .drawer-trigger{display:none}:host(:not([flow="offcanvas"],[menu-length="0"])) .heading-container:not(:last-child){margin-bottom:calc(var(--space-unit) * 3)}::slotted([slot="title"]){font-size:var(--app-header-typography-6-size);letter-spacing:var(--app-header-typography-6-tracking)}::slotted([slot="subtitle"]){margin-top:calc(var(--space-unit) * 1.5)}}@media only screen and (min-width: 1152px){.heading-panel,.heading-stucked{padding-right:var(--grid-desktop-margin);padding-left:var(--grid-desktop-margin)}:host(:not([flow="stack"])) .heading-panel{flex-flow:row wrap}::slotted([slot="title"]){margin-right:var(--grid-desktop-gutter);font-size:var(--app-header-typography-7-size);letter-spacing:var(--app-header-typography-7-tracking)}:host(:not([flow="offcanvas"],[menu-length="0"])) .heading-container:not(:last-child){margin-bottom:calc(var(--space-unit) * 2)}.menu-container{margin-top:var(--space-unit)}}@media only screen and (min-width: 1366px){.heading-panel,.heading-stucked{padding-right:var(--grid-wide-margin);padding-left:var(--grid-wide-margin)}::slotted([slot="title"]){margin-right:var(--grid-wide-gutter);font-size:var(--app-header-typography-9-size);letter-spacing:var(--app-header-typography-9-tracking)}:host(:not([flow="offcanvas"],[menu-length="0"])) .heading-container:not(:last-child){margin-bottom:0}}@keyframes slide-stucked-heading-in{0%{transform:translate3d(0, -100%, 0)}100%{transform:none}}';const h=class{constructor(t){e(this,t)}selectPathOrPolygon(e){return(null==e?void 0:e.startsWith("M"))?a("path",{d:n[this.name]}):a("polygon",{points:n[this.name]})}render(){return a("svg",{viewBox:"0 0 1000 1000",width:this.width,height:this.height,id:this.iconid,fill:this.fill?`var(--${this.fill})`:""},this.selectPathOrPolygon(n[this.name]))}};h.style=":host{margin-right:var(--z-icon-right-margin, 0);margin-left:var(--z-icon-left-margin, 0);line-height:0;vertical-align:middle}:host svg:not([width]){width:var(--z-icon-width, 18px)}:host svg:not([height]){height:var(--z-icon-height, 18px)}";export{s as z_app_header,h as z_icon}
@@ -0,0 +1 @@
1
+ import{r as t,c as o,h as i}from"./p-d17ebc2f.js";import{T as r}from"./p-9f80c0b8.js";const n=class{constructor(i){t(this,i),this.appButtonClick=o(this,"appButtonClick",7),this.theme=r.DARK,this.isopen=!1,this.emitAppButtonClick=this.emitAppButtonClick.bind(this)}emitAppButtonClick(){this.isopen=!this.isopen,this.appButtonClick.emit({isopen:this.isopen})}render(){return i("button",{title:"app-switcher",onClick:()=>this.emitAppButtonClick()},i("z-icon",{name:"app-switcher",class:this.theme}))}};n.style=":host{font-family:var(--dashboard-font);font-weight:var(--font-rg)}button{display:flex;align-content:center;justify-content:center;padding:0;border:none;background-color:transparent}button>z-icon{color:var(--bg-white);fill:currentcolor}button>z-icon.light{color:var(--bg-grey-900);fill:currentcolor}";export{n as z_app_switcher}
@@ -1 +1 @@
1
- import{r as t,c as i,h as s}from"./p-d17ebc2f.js";import{h}from"./p-e43e61ac.js";import{h as e}from"./p-87fdd14f.js";import"./p-112455b1.js";import"./p-9f80c0b8.js";import"./p-d69e14fb.js";const a=class{constructor(s){t(this,s),this.goToPage=i(this,"goToPage",7),this.changeStartPage=i(this,"changeStartPage",7),this.addPageToHistory=i(this,"addPageToHistory",7),this.currentpage=1,this.startpage=1,this.listhistoryrow=[],this.currentPages=[],this.velocityConstantMultiplier=2,this.navigateRight=this.navigateRight.bind(this),this.navigateLeft=this.navigateLeft.bind(this),this.emitGoToPage=this.emitGoToPage.bind(this)}componentDidLoad(){this.scrollPage=this.scrollPage.bind(this);const t=new h(this.bar);t.on("swiperight",this.scrollPage),t.on("swipeleft",this.scrollPage)}componentWillRender(){this.initPagination()}componentWillUpdate(){this.initPagination()}initPagination(){this.loadPages(),this.historyraw&&this.parsehistoryraw(this.historyraw)}parsehistoryraw(t){this.listhistoryrow=[...JSON.parse(t)]}scrollPage(t){const i=Math.round(Math.abs(t.velocity))*this.velocityConstantMultiplier,s=Math.max(1,i);switch(t.type){case"swiperight":this.canNavigateLeft()&&this.emitChangeStartPage(Math.max(1,this.startpage-s));break;case"swipeleft":this.canNavigateRight()&&this.emitChangeStartPage(Math.min(this.startpage+s,this.pages-this.visiblepages+1))}}emitGoToPage(t){this.currentpage=t,this.goToPage.emit({page:t}),this.addPageToHistory.emit({page:t})}emitChangeStartPage(t){this.startpage=t,this.changeStartPage.emit({startpage:t})}loadPages(){this.currentPages.splice(0);const t=this.pageWindow();let i;for(i=0;i<t;i++)this.currentPages.push(i+this.startpage)}pageWindow(){return Math.min(this.pages,this.visiblepages)}canNavigateLeft(){return this.startpage>1}canNavigateRight(){return this.startpage+this.visiblepages-1<this.pages}navigateLeft(){this.canNavigateLeft()&&(this.startpage--,this.emitChangeStartPage(this.startpage),this.loadPages())}navigateRight(){this.canNavigateRight()&&(this.startpage++,this.emitChangeStartPage(this.startpage),this.loadPages())}render(){return s("div",{ref:t=>this.bar=t},s("z-icon",{name:"chevron-left",class:!this.canNavigateLeft()&&"disabled",onClick:()=>this.navigateLeft(),onKeyPress:t=>e(t,this.navigateLeft),tabindex:this.canNavigateLeft()?0:-1}),this.currentPages.map((t=>s("z-pagination-page",{value:t,isselected:t===this.currentpage,onClick:()=>this.emitGoToPage(t),onKeyDown:i=>e(i,this.emitGoToPage,t),isvisited:this.listhistoryrow.includes(t)}))),s("z-icon",{name:"chevron-right",class:!this.canNavigateRight()&&"disabled",onClick:()=>this.navigateRight(),onKeyPress:t=>e(t,this.navigateRight),tabindex:this.canNavigateRight()?0:-1}))}};a.style=":host>div{display:flex;height:48px;flex-flow:row nowrap;align-content:center;align-items:center;justify-content:space-around}:host>div>z-icon{margin:calc(var(--space-unit) * 2) 0;color:var(--color-primary01);cursor:pointer;fill:var(--color-primary01)}:host>div>z-icon.disabled{color:var(--color-disabled01);cursor:default;fill:var(--color-disabled01);pointer-events:none}";export{a as z_pagination_bar}
1
+ import{r as t,c as i,h as s}from"./p-d17ebc2f.js";import{h}from"./p-e43e61ac.js";import{h as e}from"./p-16da5460.js";import"./p-112455b1.js";import"./p-9f80c0b8.js";import"./p-d69e14fb.js";const a=class{constructor(s){t(this,s),this.goToPage=i(this,"goToPage",7),this.changeStartPage=i(this,"changeStartPage",7),this.addPageToHistory=i(this,"addPageToHistory",7),this.currentpage=1,this.startpage=1,this.listhistoryrow=[],this.currentPages=[],this.velocityConstantMultiplier=2,this.navigateRight=this.navigateRight.bind(this),this.navigateLeft=this.navigateLeft.bind(this),this.emitGoToPage=this.emitGoToPage.bind(this)}componentDidLoad(){this.scrollPage=this.scrollPage.bind(this);const t=new h(this.bar);t.on("swiperight",this.scrollPage),t.on("swipeleft",this.scrollPage)}componentWillRender(){this.initPagination()}componentWillUpdate(){this.initPagination()}initPagination(){this.loadPages(),this.historyraw&&this.parsehistoryraw(this.historyraw)}parsehistoryraw(t){this.listhistoryrow=[...JSON.parse(t)]}scrollPage(t){const i=Math.round(Math.abs(t.velocity))*this.velocityConstantMultiplier,s=Math.max(1,i);switch(t.type){case"swiperight":this.canNavigateLeft()&&this.emitChangeStartPage(Math.max(1,this.startpage-s));break;case"swipeleft":this.canNavigateRight()&&this.emitChangeStartPage(Math.min(this.startpage+s,this.pages-this.visiblepages+1))}}emitGoToPage(t){this.currentpage=t,this.goToPage.emit({page:t}),this.addPageToHistory.emit({page:t})}emitChangeStartPage(t){this.startpage=t,this.changeStartPage.emit({startpage:t})}loadPages(){this.currentPages.splice(0);const t=this.pageWindow();let i;for(i=0;i<t;i++)this.currentPages.push(i+this.startpage)}pageWindow(){return Math.min(this.pages,this.visiblepages)}canNavigateLeft(){return this.startpage>1}canNavigateRight(){return this.startpage+this.visiblepages-1<this.pages}navigateLeft(){this.canNavigateLeft()&&(this.startpage--,this.emitChangeStartPage(this.startpage),this.loadPages())}navigateRight(){this.canNavigateRight()&&(this.startpage++,this.emitChangeStartPage(this.startpage),this.loadPages())}render(){return s("div",{ref:t=>this.bar=t},s("z-icon",{name:"chevron-left",class:!this.canNavigateLeft()&&"disabled",onClick:()=>this.navigateLeft(),onKeyPress:t=>e(t,this.navigateLeft),tabindex:this.canNavigateLeft()?0:-1}),this.currentPages.map((t=>s("z-pagination-page",{value:t,isselected:t===this.currentpage,onClick:()=>this.emitGoToPage(t),onKeyDown:i=>e(i,this.emitGoToPage,t),isvisited:this.listhistoryrow.includes(t)}))),s("z-icon",{name:"chevron-right",class:!this.canNavigateRight()&&"disabled",onClick:()=>this.navigateRight(),onKeyPress:t=>e(t,this.navigateRight),tabindex:this.canNavigateRight()?0:-1}))}};a.style=":host>div{display:flex;height:48px;flex-flow:row nowrap;align-content:center;align-items:center;justify-content:space-around}:host>div>z-icon{margin:calc(var(--space-unit) * 2) 0;color:var(--color-primary01);cursor:pointer;fill:var(--color-primary01)}:host>div>z-icon.disabled{color:var(--color-disabled01);cursor:default;fill:var(--color-disabled01);pointer-events:none}";export{a as z_pagination_bar}
@@ -1 +1 @@
1
- import{r as t,c as i,h as e,H as n,g as s}from"./p-d17ebc2f.js";import{x as r,q as a,D as l}from"./p-9f80c0b8.js";import{g as o}from"./p-87fdd14f.js";import"./p-d69e14fb.js";const c=class{constructor(e){t(this,e),this.fileInput=i(this,"fileInput",7),this.type=r.DEFAULT,this.files=[],this.inputAttributes={type:"file",id:"file-elem",multiple:!0}}removeFileListener(t){const i=this.files,e=i.find((i=>i.name===t.detail.fileName));if(e){const t=i.indexOf(e);t>=0&&(i.splice(t,1),this.files=[...i])}}fileDroppedListener(t){this.input.files=t.detail,this.fileInputHandler()}componentDidUpdate(){this.handleAccessibility(),this.invalidFiles.size&&this.errorModal.focus()}componentWillLoad(){this.invalidFiles=new Map}fileInputHandler(){this.input.files.length&&(this.invalidFiles=this.checkFiles(Array.from(this.input.files)))}async getFiles(){return this.files}getType(){return o()!==a.DESKTOP?r.DEFAULT:this.type}handleAccessibility(){const t=this.el.querySelector("z-file:last-child z-chip button");this.files.length>0&&t?t.focus():this.getType()===r.DEFAULT?this.button.querySelector("button").focus():this.uploadLink.focus()}checkFiles(t){const i=new Map,e=`supera i ${this.fileMaxSize}MB`;return t.forEach((t=>{const n=t.size/1024/1024,s=this.acceptedFormat.split(",").some((i=>t.name.toLowerCase().endsWith(i.trim()))),r=n<=this.fileMaxSize;r&&s?this.files.find((i=>i.name===t.name))||(this.files.push(t),this.fileInput.emit(t),this.input.value=""):(i.set(t.name,[]),r||i.get(t.name).push(e),s||i.get(t.name).push(" ha un'estensione non prevista"))})),i}renderTitle(){return e("z-heading",{id:"title",variant:"semibold",level:2},this.mainTitle)}renderDescription(t,i){return e("z-body",{variant:t,level:i},this.description)}renderAllowedFileExtensions(){let t="",i="";return this.acceptedFormat&&(t=` nei formati ${this.acceptedFormat.split(", ").map((t=>t.substring(1).toUpperCase())).join(", ")}`),this.fileMaxSize&&(i=` per un massimo di ${this.fileMaxSize}MB di peso`),e("z-body",{level:3},t||i?`Puoi allegare file${t}${i}.`:null)}renderFileSection(){return e("section",{class:"files-container "+(this.files.length?"":"hidden")},e("z-heading",{variant:"semibold",level:4},"File appena caricati"),e("div",{class:"files-wrapper"},e("slot",{name:"files"})),e("z-divider",{size:l.MEDIUM}))}renderInput(){return e("input",Object.assign({},this.inputAttributes,{onChange:()=>this.fileInputHandler(),accept:this.acceptedFormat,ref:t=>this.input=t}))}renderUploadButton(){return[this.renderInput(),e("z-button",{onClick:()=>this.input.click(),onKeyPress:t=>{"Space"!=t.code&&"Enter"!=t.code||(t.preventDefault(),this.input.click())},id:"fileSelect",variant:this.buttonVariant,icon:"upload",ref:t=>this.button=t},"Allega")]}renderUploadLink(){return[this.renderInput(),e("z-body",{class:"upload-link-text",variant:"regular",level:1},"Trascinalo qui o"," ",e("z-body",{tabIndex:0,class:"upload-link",onClick:()=>this.input.click(),onKeyPress:t=>{"Space"!=t.code&&"Enter"!=t.code||(t.preventDefault(),this.input.click())},variant:"semibold",level:1,ref:t=>this.uploadLink=t},"caricalo")," ","dal tuo computer")]}renderDefaultMode(){return[this.renderDescription("semibold",3),this.renderAllowedFileExtensions(),this.renderFileSection(),this.renderUploadButton()]}renderDragDropMode(){return[this.renderFileSection(),e("z-dragdrop-area",null,e("div",{class:"text-container"},this.renderDescription("regular",1),this.renderUploadLink(),this.renderAllowedFileExtensions()))]}formatErrorString(t,i){var e,n;return`Il file ${t} ${null!==(e=i[0])&&void 0!==e?e:""}${i[0]&&i[1]?", ":""} ${null!==(n=i[1])&&void 0!==n?n:""} e non può quindi essere caricato.`}handleErrorModalContent(){return e("div",{slot:"modalContent"},e("div",{class:"modal-wrapper"},e("div",{class:"files"},Array.from(this.invalidFiles).map((([t,i])=>e("z-body",{variant:"regular",level:3},this.formatErrorString(t,i)))))))}render(){return e(n,null,e("div",{tabIndex:0,class:`container ${this.getType()}`},this.renderTitle(),this.getType()==r.DEFAULT?this.renderDefaultMode():this.renderDragDropMode()),!!this.invalidFiles.size&&e("z-modal",{tabIndex:0,ref:t=>this.errorModal=t,modaltitle:"Attenzione",onModalClose:()=>this.invalidFiles=new Map,onModalBackgroundClick:()=>this.invalidFiles=new Map},this.handleErrorModalContent()))}get el(){return s(this)}};c.style=":host{color:var(--color-text01);font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>.container{display:flex;flex-direction:column}:host .modal-wrapper{display:flex;align-items:center;justify-content:center}:host .modal-wrapper>.files-wrapper{display:flex;flex-direction:column;margin:calc(var(--space-unit) * 4);gap:var(--space-unit)}:host .text-container{display:flex;flex-direction:column;margin:auto}:host .text-container z-body{text-align:center}:host .text-container .upload-link{color:var(--color-link-primary);cursor:pointer}:host .text-container .upload-link-text{margin-bottom:var(--space-unit)}input#file-elem{display:none}#title{display:inline-block;margin-bottom:var(--space-unit)}:host>.container>z-button{display:inline-block;margin-top:calc(var(--space-unit) * 3)}:host>.container>.files-container.hidden{display:none}:host>.container>.files-container>z-heading{display:inline-block;margin:calc(var(--space-unit) * 3) 0}:host>.container>.files-container>.files-wrapper{display:flex;flex-wrap:wrap;column-gap:calc(var(--space-unit) * 2);row-gap:calc(var(--space-unit) * 2)}:host>.container>.files-container>z-divider{margin-top:calc(var(--space-unit) * 3);margin-bottom:0}@media only screen and (min-width: 768px){:host>.container>z-button{align-self:flex-start}}";export{c as z_file_upload}
1
+ import{r as t,c as i,h as e,H as n,g as s}from"./p-d17ebc2f.js";import{x as r,q as a,D as l}from"./p-9f80c0b8.js";import{g as o}from"./p-16da5460.js";import"./p-d69e14fb.js";const c=class{constructor(e){t(this,e),this.fileInput=i(this,"fileInput",7),this.type=r.DEFAULT,this.files=[],this.inputAttributes={type:"file",id:"file-elem",multiple:!0}}removeFileListener(t){const i=this.files,e=i.find((i=>i.name===t.detail.fileName));if(e){const t=i.indexOf(e);t>=0&&(i.splice(t,1),this.files=[...i])}}fileDroppedListener(t){this.input.files=t.detail,this.fileInputHandler()}componentDidUpdate(){this.handleAccessibility(),this.invalidFiles.size&&this.errorModal.focus()}componentWillLoad(){this.invalidFiles=new Map}fileInputHandler(){this.input.files.length&&(this.invalidFiles=this.checkFiles(Array.from(this.input.files)))}async getFiles(){return this.files}getType(){return o()!==a.DESKTOP?r.DEFAULT:this.type}handleAccessibility(){const t=this.el.querySelector("z-file:last-child z-chip button");this.files.length>0&&t?t.focus():this.getType()===r.DEFAULT?this.button.querySelector("button").focus():this.uploadLink.focus()}checkFiles(t){const i=new Map,e=`supera i ${this.fileMaxSize}MB`;return t.forEach((t=>{const n=t.size/1024/1024,s=this.acceptedFormat.split(",").some((i=>t.name.toLowerCase().endsWith(i.trim()))),r=n<=this.fileMaxSize;r&&s?this.files.find((i=>i.name===t.name))||(this.files.push(t),this.fileInput.emit(t),this.input.value=""):(i.set(t.name,[]),r||i.get(t.name).push(e),s||i.get(t.name).push(" ha un'estensione non prevista"))})),i}renderTitle(){return e("z-heading",{id:"title",variant:"semibold",level:2},this.mainTitle)}renderDescription(t,i){return e("z-body",{variant:t,level:i},this.description)}renderAllowedFileExtensions(){let t="",i="";return this.acceptedFormat&&(t=` nei formati ${this.acceptedFormat.split(", ").map((t=>t.substring(1).toUpperCase())).join(", ")}`),this.fileMaxSize&&(i=` per un massimo di ${this.fileMaxSize}MB di peso`),e("z-body",{level:3},t||i?`Puoi allegare file${t}${i}.`:null)}renderFileSection(){return e("section",{class:"files-container "+(this.files.length?"":"hidden")},e("z-heading",{variant:"semibold",level:4},"File appena caricati"),e("div",{class:"files-wrapper"},e("slot",{name:"files"})),e("z-divider",{size:l.MEDIUM}))}renderInput(){return e("input",Object.assign({},this.inputAttributes,{onChange:()=>this.fileInputHandler(),accept:this.acceptedFormat,ref:t=>this.input=t}))}renderUploadButton(){return[this.renderInput(),e("z-button",{onClick:()=>this.input.click(),onKeyPress:t=>{"Space"!=t.code&&"Enter"!=t.code||(t.preventDefault(),this.input.click())},id:"fileSelect",variant:this.buttonVariant,icon:"upload",ref:t=>this.button=t},"Allega")]}renderUploadLink(){return[this.renderInput(),e("z-body",{class:"upload-link-text",variant:"regular",level:1},"Trascinalo qui o"," ",e("z-body",{tabIndex:0,class:"upload-link",onClick:()=>this.input.click(),onKeyPress:t=>{"Space"!=t.code&&"Enter"!=t.code||(t.preventDefault(),this.input.click())},variant:"semibold",level:1,ref:t=>this.uploadLink=t},"caricalo")," ","dal tuo computer")]}renderDefaultMode(){return[this.renderDescription("semibold",3),this.renderAllowedFileExtensions(),this.renderFileSection(),this.renderUploadButton()]}renderDragDropMode(){return[this.renderFileSection(),e("z-dragdrop-area",null,e("div",{class:"text-container"},this.renderDescription("regular",1),this.renderUploadLink(),this.renderAllowedFileExtensions()))]}formatErrorString(t,i){var e,n;return`Il file ${t} ${null!==(e=i[0])&&void 0!==e?e:""}${i[0]&&i[1]?", ":""} ${null!==(n=i[1])&&void 0!==n?n:""} e non può quindi essere caricato.`}handleErrorModalContent(){return e("div",{slot:"modalContent"},e("div",{class:"modal-wrapper"},e("div",{class:"files"},Array.from(this.invalidFiles).map((([t,i])=>e("z-body",{variant:"regular",level:3},this.formatErrorString(t,i)))))))}render(){return e(n,null,e("div",{tabIndex:0,class:`container ${this.getType()}`},this.renderTitle(),this.getType()==r.DEFAULT?this.renderDefaultMode():this.renderDragDropMode()),!!this.invalidFiles.size&&e("z-modal",{tabIndex:0,ref:t=>this.errorModal=t,modaltitle:"Attenzione",onModalClose:()=>this.invalidFiles=new Map,onModalBackgroundClick:()=>this.invalidFiles=new Map},this.handleErrorModalContent()))}get el(){return s(this)}};c.style=":host{color:var(--color-text01);font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>.container{display:flex;flex-direction:column}:host .modal-wrapper{display:flex;align-items:center;justify-content:center}:host .modal-wrapper>.files-wrapper{display:flex;flex-direction:column;margin:calc(var(--space-unit) * 4);gap:var(--space-unit)}:host .text-container{display:flex;flex-direction:column;margin:auto}:host .text-container z-body{text-align:center}:host .text-container .upload-link{color:var(--color-link-primary);cursor:pointer}:host .text-container .upload-link-text{margin-bottom:var(--space-unit)}input#file-elem{display:none}#title{display:inline-block;margin-bottom:var(--space-unit)}:host>.container>z-button{display:inline-block;margin-top:calc(var(--space-unit) * 3)}:host>.container>.files-container.hidden{display:none}:host>.container>.files-container>z-heading{display:inline-block;margin:calc(var(--space-unit) * 3) 0}:host>.container>.files-container>.files-wrapper{display:flex;flex-wrap:wrap;column-gap:calc(var(--space-unit) * 2);row-gap:calc(var(--space-unit) * 2)}:host>.container>.files-container>z-divider{margin-top:calc(var(--space-unit) * 3);margin-bottom:0}@media only screen and (min-width: 768px){:host>.container>z-button{align-self:flex-start}}";export{c as z_file_upload}
@@ -1 +1 @@
1
- import{r as e,h as t}from"./p-d17ebc2f.js";import{K as i}from"./p-9f80c0b8.js";import{a,h as n,e as r}from"./p-87fdd14f.js";import"./p-d69e14fb.js";const s=class{constructor(t){e(this,t),this.ismenuopen=!1,this.handleToggle=this.handleToggle.bind(this),this.handleFocus=this.handleFocus.bind(this)}componentWillRender(){this.linkarray="string"==typeof this.menucontent?JSON.parse(this.menucontent):this.menucontent}renderMenuOpen(){if(this.ismenuopen)return t("ul",null,this.linkarray.map((e=>t("li",null,t("z-link",{htmlid:e.id,href:e.link,icon:e.icon},e.label)))))}renderButtonMenu(){return t("span",{class:"arrow"},t("z-icon",{name:"caret-down",width:14,height:14}))}retriveMenuClass(){if(this.ismenuopen)return"menu-opened"}handleToggle(){this.ismenuopen=!this.ismenuopen}handleFocus(e){e instanceof KeyboardEvent&&e.keyCode!==i.TAB||a(r()).find((e=>"z-menu-dropdown"===e.nodeName.toLowerCase()))||(document.removeEventListener("click",this.handleFocus),document.removeEventListener("keyup",this.handleFocus),this.ismenuopen=!1)}render(){return t("a",{class:this.retriveMenuClass(),role:"button",tabindex:"0",onFocus:()=>{document.addEventListener("click",this.handleFocus),document.addEventListener("keyup",this.handleFocus)},onKeyUp:e=>n(e,this.handleToggle)},t("div",{class:"container",onClick:()=>this.handleToggle()},t("span",{class:"user-wrapper"},t("z-icon",{name:"user-avatar",width:14,height:14}),t("span",{class:"user"},this.nomeutente)),this.renderButtonMenu()),this.renderMenuOpen())}};s.style=":host{width:inherit;height:32px;font-family:var(--dashboard-font);font-size:12px;font-weight:var(--font-sb);letter-spacing:0.17px}a,a:visited,a:active{color:inherit;text-decoration:none}:host>a{display:block;border:var(--border-size-small) solid transparent;background:var(--bg-grey-050);border-radius:var(--border-radius);color:var(--text-grey-800);outline:none}:host>a::-moz-focus-inner{border:0}:host>a:hover,:host>a.menu-opened:hover{color:var(--myz-blue-dark);fill:var(--myz-blue-dark)}:host>a:focus{border:var(--border-size-small) solid var(--myz-blue);box-shadow:0 0 2px 2px var(--myz-blue-light);color:var(--myz-blue);fill:var(--myz-blue)}:host>a:active{border:var(--border-size-small) solid var(--myz-blue-light);box-shadow:0 2px 4px 0 rgb(0 0 0 / 40%);color:var(--myz-blue-light);fill:var(--myz-blue-light)}div.container{position:relative;display:flex;height:32px;align-items:center;justify-content:space-between;padding:0 var(--basex1)}div.container>span.user-wrapper{display:flex}div.container>span.user-wrapper>span.user{overflow:hidden;width:30px;padding:0 var(--basex1);cursor:pointer;text-overflow:ellipsis;white-space:nowrap}div.container>span.arrow{display:flex;align-items:center;justify-content:center}div.container>span.arrow>z-icon{transform:rotate(360deg);transition:all 200ms linear}ul{padding:0 calc(var(--space-unit) * 2);margin:0;list-style:none}li{display:flex;width:max-content;height:var(--basex3);align-items:center;padding:calc(var(--space-unit) / 4) 0}.menu-opened{position:inherit;width:auto !important;min-width:147px;padding-bottom:calc(var(--space-unit) * 2)}.menu-opened a,.menu-opened a:active,.menu-opened a:visited{color:var(--myz-blue);fill:var(--myz-blue)}.menu-opened a:hover{color:var(--myz-blue-dark);fill:var(--myz-blue-dark)}.menu-opened>div.container{margin-bottom:var(--basex1)}.menu-opened>div.container>span.user-wrapper>span.user{width:auto}.menu-opened>div.container>span.arrow>z-icon{transform:rotate(180deg);transition:all 200ms linear}@media only screen and (min-width: 1152px){:host>a{width:147px;padding:0 calc(var(--space-unit) / 4)}:host>a.menu-opened{width:147px;padding-bottom:calc(var(--space-unit) * 2)}div.container>span.user-wrapper>span.user{width:80px}}";const o=class{constructor(t){e(this,t)}componentWillLoad(){this.inputrawdata&&this.parseinputrawdata(this.inputrawdata)}parseinputrawdata(e){this.list=[...JSON.parse(e)]}oninputrawdataChange(e){this.parseinputrawdata(e)}render(){const e=this.list?this.list.length-1:-1;return t("ul",null,this.list&&this.list.map(((i,a)=>t("z-myz-list-item",{listitemid:i.listitemid,text:i.text,link:i.link,linktarget:i.linktarget,icon:i.icon,underlined:e!=a}))))}static get watchers(){return{inputrawdata:["oninputrawdataChange"]}}};o.style="ul{padding:0;margin:0}";export{s as z_menu_dropdown,o as z_myz_list}
1
+ import{r as e,h as t}from"./p-d17ebc2f.js";import{K as i}from"./p-9f80c0b8.js";import{a,h as n,e as r}from"./p-16da5460.js";import"./p-d69e14fb.js";const s=class{constructor(t){e(this,t),this.ismenuopen=!1,this.handleToggle=this.handleToggle.bind(this),this.handleFocus=this.handleFocus.bind(this)}componentWillRender(){this.linkarray="string"==typeof this.menucontent?JSON.parse(this.menucontent):this.menucontent}renderMenuOpen(){if(this.ismenuopen)return t("ul",null,this.linkarray.map((e=>t("li",null,t("z-link",{htmlid:e.id,href:e.link,icon:e.icon},e.label)))))}renderButtonMenu(){return t("span",{class:"arrow"},t("z-icon",{name:"caret-down",width:14,height:14}))}retriveMenuClass(){if(this.ismenuopen)return"menu-opened"}handleToggle(){this.ismenuopen=!this.ismenuopen}handleFocus(e){e instanceof KeyboardEvent&&e.keyCode!==i.TAB||a(r()).find((e=>"z-menu-dropdown"===e.nodeName.toLowerCase()))||(document.removeEventListener("click",this.handleFocus),document.removeEventListener("keyup",this.handleFocus),this.ismenuopen=!1)}render(){return t("a",{class:this.retriveMenuClass(),role:"button",tabindex:"0",onFocus:()=>{document.addEventListener("click",this.handleFocus),document.addEventListener("keyup",this.handleFocus)},onKeyUp:e=>n(e,this.handleToggle)},t("div",{class:"container",onClick:()=>this.handleToggle()},t("span",{class:"user-wrapper"},t("z-icon",{name:"user-avatar",width:14,height:14}),t("span",{class:"user"},this.nomeutente)),this.renderButtonMenu()),this.renderMenuOpen())}};s.style=":host{width:inherit;height:32px;font-family:var(--dashboard-font);font-size:12px;font-weight:var(--font-sb);letter-spacing:0.17px}a,a:visited,a:active{color:inherit;text-decoration:none}:host>a{display:block;border:var(--border-size-small) solid transparent;background:var(--bg-grey-050);border-radius:var(--border-radius);color:var(--text-grey-800);outline:none}:host>a::-moz-focus-inner{border:0}:host>a:hover,:host>a.menu-opened:hover{color:var(--myz-blue-dark);fill:var(--myz-blue-dark)}:host>a:focus{border:var(--border-size-small) solid var(--myz-blue);box-shadow:0 0 2px 2px var(--myz-blue-light);color:var(--myz-blue);fill:var(--myz-blue)}:host>a:active{border:var(--border-size-small) solid var(--myz-blue-light);box-shadow:0 2px 4px 0 rgb(0 0 0 / 40%);color:var(--myz-blue-light);fill:var(--myz-blue-light)}div.container{position:relative;display:flex;height:32px;align-items:center;justify-content:space-between;padding:0 var(--basex1)}div.container>span.user-wrapper{display:flex}div.container>span.user-wrapper>span.user{overflow:hidden;width:30px;padding:0 var(--basex1);cursor:pointer;text-overflow:ellipsis;white-space:nowrap}div.container>span.arrow{display:flex;align-items:center;justify-content:center}div.container>span.arrow>z-icon{transform:rotate(360deg);transition:all 200ms linear}ul{padding:0 calc(var(--space-unit) * 2);margin:0;list-style:none}li{display:flex;width:max-content;height:var(--basex3);align-items:center;padding:calc(var(--space-unit) / 4) 0}.menu-opened{position:inherit;width:auto !important;min-width:147px;padding-bottom:calc(var(--space-unit) * 2)}.menu-opened a,.menu-opened a:active,.menu-opened a:visited{color:var(--myz-blue);fill:var(--myz-blue)}.menu-opened a:hover{color:var(--myz-blue-dark);fill:var(--myz-blue-dark)}.menu-opened>div.container{margin-bottom:var(--basex1)}.menu-opened>div.container>span.user-wrapper>span.user{width:auto}.menu-opened>div.container>span.arrow>z-icon{transform:rotate(180deg);transition:all 200ms linear}@media only screen and (min-width: 1152px){:host>a{width:147px;padding:0 calc(var(--space-unit) / 4)}:host>a.menu-opened{width:147px;padding-bottom:calc(var(--space-unit) * 2)}div.container>span.user-wrapper>span.user{width:80px}}";const o=class{constructor(t){e(this,t)}componentWillLoad(){this.inputrawdata&&this.parseinputrawdata(this.inputrawdata)}parseinputrawdata(e){this.list=[...JSON.parse(e)]}oninputrawdataChange(e){this.parseinputrawdata(e)}render(){const e=this.list?this.list.length-1:-1;return t("ul",null,this.list&&this.list.map(((i,a)=>t("z-myz-list-item",{listitemid:i.listitemid,text:i.text,link:i.link,linktarget:i.linktarget,icon:i.icon,underlined:e!=a}))))}static get watchers(){return{inputrawdata:["oninputrawdataChange"]}}};o.style="ul{padding:0;margin:0}";export{s as z_menu_dropdown,o as z_myz_list}
@@ -1 +1 @@
1
- import{r as s,c as t,h as i,H as c}from"./p-d17ebc2f.js";import{r as e}from"./p-87fdd14f.js";import{m as l}from"./p-9f80c0b8.js";import"./p-d69e14fb.js";const o=class{constructor(i){s(this,i),this.toggleClick=t(this,"toggleClick",7),this.disabled=!1,this.labelPosition=l.LEFT,this.checked=!1,this.htmlid=`toggle-switch-id-${e()}`}emitToggleClick(){this.toggleClick.emit({id:this.htmlid,checked:this.checked})}handleClick(s){this.disabled||(this.checked=s.target.checked,this.emitToggleClick())}render(){return i(c,null,i("input",{id:this.htmlid,type:"checkbox",checked:this.checked,disabled:this.disabled,onChange:this.handleClick.bind(this)}),i("label",{htmlFor:this.htmlid,class:{[this.labelPosition]:!0,disabled:this.disabled}},i("span",null,i("slot",null)),i("span",{class:{container:!0,disabled:this.disabled,checked:this.checked}},i("span",{class:"circle"},this.checked&&i("z-icon",{width:12,height:12,name:"checkmark"})))))}};o.style='.sc-z-toggle-switch-h{position:relative;display:inline-flex;font-family:var(--font-family-sans);font-weight:var(--font-rg)}label.sc-z-toggle-switch{display:flex;flex-direction:row;align-items:center;cursor:pointer}label.disabled.sc-z-toggle-switch{cursor:default}label.right.sc-z-toggle-switch{flex-direction:row-reverse}label.sc-z-toggle-switch>span.sc-z-toggle-switch:first-child{color:var(--color-text01);letter-spacing:0}label.left.sc-z-toggle-switch>span.sc-z-toggle-switch:first-child{margin-right:var(--space-unit)}label.right.sc-z-toggle-switch>span.sc-z-toggle-switch:first-child{margin-left:var(--space-unit)}label.sc-z-toggle-switch>span.container.sc-z-toggle-switch{position:relative;top:1px;left:1px;display:flex;width:calc(var(--space-unit) * 4);height:18px;align-items:center;background-color:var(--gray500);border-radius:var(--space-unit);color:var(--gray500);cursor:pointer}label.sc-z-toggle-switch>span.container.disabled.sc-z-toggle-switch,label.sc-z-toggle-switch>span.container.checked.disabled.sc-z-toggle-switch{background-color:var(--color-disabled01);cursor:default}label.sc-z-toggle-switch>span.container.checked.disabled.sc-z-toggle-switch>span.circle.sc-z-toggle-switch>z-icon.sc-z-toggle-switch{fill:var(--color-disabled01)}label.sc-z-toggle-switch>span.container.checked.sc-z-toggle-switch{background-color:var(--color-primary01);fill:var(--color-primary01)}input.sc-z-toggle-switch:focus:focus-visible+label.sc-z-toggle-switch>span.container.sc-z-toggle-switch:not(.disabled){box-shadow:var(--shadow-focus-primary);outline:none}input.sc-z-toggle-switch:focus:focus-visible+label.sc-z-toggle-switch>span.container.disabled.sc-z-toggle-switch{outline:none}label.sc-z-toggle-switch>span.container.sc-z-toggle-switch:not(.disabled):hover{background-color:var(--color-hover-primary);fill:var(--color-hover-primary)}label.sc-z-toggle-switch>span.container.sc-z-toggle-switch>span.circle.sc-z-toggle-switch{position:absolute;top:1px;left:1px;display:flex;width:calc(var(--space-unit) * 2);height:calc(var(--space-unit) * 2);align-items:center;justify-content:center;margin:0;background-color:var(--color-white);border-radius:7px;box-shadow:var(--shadow-1);transition:transform 0.3s ease}label.sc-z-toggle-switch>span.container.checked.sc-z-toggle-switch>span.circle.sc-z-toggle-switch{transform:translateX(calc(100% - 2px))}input[type="checkbox"].sc-z-toggle-switch{position:absolute;z-index:-1;opacity:0;pointer-events:none}';export{o as z_toggle_switch}
1
+ import{r as s,c as t,h as i,H as c}from"./p-d17ebc2f.js";import{r as e}from"./p-16da5460.js";import{m as l}from"./p-9f80c0b8.js";import"./p-d69e14fb.js";const o=class{constructor(i){s(this,i),this.toggleClick=t(this,"toggleClick",7),this.disabled=!1,this.labelPosition=l.LEFT,this.checked=!1,this.htmlid=`toggle-switch-id-${e()}`}emitToggleClick(){this.toggleClick.emit({id:this.htmlid,checked:this.checked})}handleClick(s){this.disabled||(this.checked=s.target.checked,this.emitToggleClick())}render(){return i(c,null,i("input",{id:this.htmlid,type:"checkbox",checked:this.checked,disabled:this.disabled,onChange:this.handleClick.bind(this)}),i("label",{htmlFor:this.htmlid,class:{[this.labelPosition]:!0,disabled:this.disabled}},i("span",null,i("slot",null)),i("span",{class:{container:!0,disabled:this.disabled,checked:this.checked}},i("span",{class:"circle"},this.checked&&i("z-icon",{width:12,height:12,name:"checkmark"})))))}};o.style='.sc-z-toggle-switch-h{position:relative;display:inline-flex;font-family:var(--font-family-sans);font-weight:var(--font-rg)}label.sc-z-toggle-switch{display:flex;flex-direction:row;align-items:center;cursor:pointer}label.disabled.sc-z-toggle-switch{cursor:default}label.right.sc-z-toggle-switch{flex-direction:row-reverse}label.sc-z-toggle-switch>span.sc-z-toggle-switch:first-child{color:var(--color-text01);letter-spacing:0}label.left.sc-z-toggle-switch>span.sc-z-toggle-switch:first-child{margin-right:var(--space-unit)}label.right.sc-z-toggle-switch>span.sc-z-toggle-switch:first-child{margin-left:var(--space-unit)}label.sc-z-toggle-switch>span.container.sc-z-toggle-switch{position:relative;top:1px;left:1px;display:flex;width:calc(var(--space-unit) * 4);height:18px;align-items:center;background-color:var(--gray500);border-radius:var(--space-unit);color:var(--gray500);cursor:pointer}label.sc-z-toggle-switch>span.container.disabled.sc-z-toggle-switch,label.sc-z-toggle-switch>span.container.checked.disabled.sc-z-toggle-switch{background-color:var(--color-disabled01);cursor:default}label.sc-z-toggle-switch>span.container.checked.disabled.sc-z-toggle-switch>span.circle.sc-z-toggle-switch>z-icon.sc-z-toggle-switch{fill:var(--color-disabled01)}label.sc-z-toggle-switch>span.container.checked.sc-z-toggle-switch{background-color:var(--color-primary01);fill:var(--color-primary01)}input.sc-z-toggle-switch:focus:focus-visible+label.sc-z-toggle-switch>span.container.sc-z-toggle-switch:not(.disabled){box-shadow:var(--shadow-focus-primary);outline:none}input.sc-z-toggle-switch:focus:focus-visible+label.sc-z-toggle-switch>span.container.disabled.sc-z-toggle-switch{outline:none}label.sc-z-toggle-switch>span.container.sc-z-toggle-switch:not(.disabled):hover{background-color:var(--color-hover-primary);fill:var(--color-hover-primary)}label.sc-z-toggle-switch>span.container.sc-z-toggle-switch>span.circle.sc-z-toggle-switch{position:absolute;top:1px;left:1px;display:flex;width:calc(var(--space-unit) * 2);height:calc(var(--space-unit) * 2);align-items:center;justify-content:center;margin:0;background-color:var(--color-white);border-radius:7px;box-shadow:var(--shadow-1);transition:transform 0.3s ease}label.sc-z-toggle-switch>span.container.checked.sc-z-toggle-switch>span.circle.sc-z-toggle-switch{transform:translateX(calc(100% - 2px))}input[type="checkbox"].sc-z-toggle-switch{position:absolute;z-index:-1;opacity:0;pointer-events:none}';export{o as z_toggle_switch}
@@ -1 +1 @@
1
- import{r as t,c as i,h as s,g as e}from"./p-d17ebc2f.js";import{r as o}from"./p-9f80c0b8.js";import{h as a}from"./p-87fdd14f.js";import{h as r}from"./p-e43e61ac.js";import"./p-d69e14fb.js";import"./p-112455b1.js";const n=class{constructor(s){t(this,s),this.pocketToggle=i(this,"pocketToggle",7),this.status=o.PREVIEW}async open(){this.status=o.OPEN}async close(){this.status=o.CLOSED}emitPocketToggle(t,i){this.pocketToggle.emit({id:t,status:i})}handlePocketHeaderClick(t){if(t.detail.id&&t.detail.id===this.pocketid)switch(this.status){case o.PREVIEW:case o.CLOSED:this.status=o.OPEN;break;case o.OPEN:this.status=o.CLOSED}}handlePocketHeaderPan(t){t.detail.id&&t.detail.id===this.pocketid&&("up"===t.detail.direction?this.status=o.OPEN:"down"===t.detail.direction&&(this.status=o.CLOSED))}watchStatusHandler(t){this.emitPocketToggle(this.pocketid,t)}componentWillLoad(){this.emitPocketToggle(this.pocketid,this.status)}handleBackgroundClick(t){"pocketBackground"==t.target.dataset.action&&this.close()}render(){return s("div",null,s("div",{"data-action":"pocketBackground","data-pocket":this.pocketid,class:`background ${this.status}`,onClick:t=>this.handleBackgroundClick(t)}),s("div",{id:this.pocketid,class:"content-wrapper"},s("div",null,s("slot",null))))}get hostElement(){return e(this)}static get watchers(){return{status:["watchStatusHandler"]}}};n.style=":host{width:inherit;height:100%;margin:inherit;font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>div{width:inherit;height:100%;margin:inherit}:host>div>div.background{position:fixed;z-index:998;top:0;right:0;bottom:0;left:0;width:0;height:0}:host>div>div.background.open{width:100%;height:100%}:host>div>div.content-wrapper{position:fixed;z-index:999;bottom:0;left:0;width:inherit;margin:inherit}:host>div>div.content-wrapper>div{margin:calc(var(--space-unit) * 0.5) calc(var(--space-unit) * 0.5) 0 calc(var(--space-unit) * 0.5);border-radius:var(--space-unit) var(--space-unit) 0 0;box-shadow:0 -2px calc(var(--space-unit) * 0.5) 0 rgb(66 69 72 / 40%)}";const h=class{constructor(i){t(this,i),this.status=o.PREVIEW}handlePocketToggle(t){t.detail.id&&t.detail.id===this.pocketid&&(this.status=t.detail.status)}render(){return s("main",{class:this.status},s("slot",null))}};h.style=":host{display:block;width:100%;box-sizing:border-box;font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>main{overflow:auto;border-right:var(--border-size-small) solid var(--color-surface03);border-left:var(--border-size-small) solid var(--color-surface03);background:var(--color-surface01);scrollbar-width:none}:host>main.preview{max-height:225px;transition:all 200ms ease-in-out, top 200ms ease-in-out}:host>main.open{max-height:calc(100vh - 48px);transition:all 200ms ease-in-out, top 200ms ease-in-out}:host>main.closed{height:0;transition:all 200ms ease-in-out, top 200ms ease-in-out}:host ::-webkit-scrollbar{width:0}@media only screen and (min-width: 768px){:host>main.preview{max-height:157px}}";const c=class{constructor(s){t(this,s),this.pocketHeaderClick=i(this,"pocketHeaderClick",7),this.pocketHeaderPan=i(this,"pocketHeaderPan",7),this.emitPocketHeaderClick=this.emitPocketHeaderClick.bind(this)}emitPocketHeaderClick(){this.pocketHeaderClick.emit({id:this.pocketid})}emitPocketHeaderPan(t){this.pocketHeaderPan.emit({id:this.pocketid,direction:t})}componentDidLoad(){const t=new r(this.swipeWrap);t.get("pan").set({direction:r.DIRECTION_VERTICAL}),t.on("panup",(()=>this.emitPocketHeaderPan("up"))),t.on("pandown",(()=>this.emitPocketHeaderPan("down")))}render(){return s("header",{role:"button",tabindex:0,onClick:()=>this.emitPocketHeaderClick(),onKeyPress:t=>a(t,this.emitPocketHeaderClick),ref:t=>this.swipeWrap=t},s("slot",null))}};c.style=":host{display:block;width:100%;box-sizing:border-box;font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>header{display:flex;height:36px;flex-flow:row nowrap;align-items:center;justify-content:center;border:var(--border-size-small) solid var(--color-surface03);background:var(--color-surface01);border-radius:var(--space-unit) var(--space-unit) 0 0;cursor:pointer}:host>header:focus{outline:none}:host>header::-moz-focus-inner{border:0}";export{n as z_pocket,h as z_pocket_body,c as z_pocket_header}
1
+ import{r as t,c as i,h as s,g as e}from"./p-d17ebc2f.js";import{r as o}from"./p-9f80c0b8.js";import{h as a}from"./p-16da5460.js";import{h as r}from"./p-e43e61ac.js";import"./p-d69e14fb.js";import"./p-112455b1.js";const n=class{constructor(s){t(this,s),this.pocketToggle=i(this,"pocketToggle",7),this.status=o.PREVIEW}async open(){this.status=o.OPEN}async close(){this.status=o.CLOSED}emitPocketToggle(t,i){this.pocketToggle.emit({id:t,status:i})}handlePocketHeaderClick(t){if(t.detail.id&&t.detail.id===this.pocketid)switch(this.status){case o.PREVIEW:case o.CLOSED:this.status=o.OPEN;break;case o.OPEN:this.status=o.CLOSED}}handlePocketHeaderPan(t){t.detail.id&&t.detail.id===this.pocketid&&("up"===t.detail.direction?this.status=o.OPEN:"down"===t.detail.direction&&(this.status=o.CLOSED))}watchStatusHandler(t){this.emitPocketToggle(this.pocketid,t)}componentWillLoad(){this.emitPocketToggle(this.pocketid,this.status)}handleBackgroundClick(t){"pocketBackground"==t.target.dataset.action&&this.close()}render(){return s("div",null,s("div",{"data-action":"pocketBackground","data-pocket":this.pocketid,class:`background ${this.status}`,onClick:t=>this.handleBackgroundClick(t)}),s("div",{id:this.pocketid,class:"content-wrapper"},s("div",null,s("slot",null))))}get hostElement(){return e(this)}static get watchers(){return{status:["watchStatusHandler"]}}};n.style=":host{width:inherit;height:100%;margin:inherit;font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>div{width:inherit;height:100%;margin:inherit}:host>div>div.background{position:fixed;z-index:998;top:0;right:0;bottom:0;left:0;width:0;height:0}:host>div>div.background.open{width:100%;height:100%}:host>div>div.content-wrapper{position:fixed;z-index:999;bottom:0;left:0;width:inherit;margin:inherit}:host>div>div.content-wrapper>div{margin:calc(var(--space-unit) * 0.5) calc(var(--space-unit) * 0.5) 0 calc(var(--space-unit) * 0.5);border-radius:var(--space-unit) var(--space-unit) 0 0;box-shadow:0 -2px calc(var(--space-unit) * 0.5) 0 rgb(66 69 72 / 40%)}";const h=class{constructor(i){t(this,i),this.status=o.PREVIEW}handlePocketToggle(t){t.detail.id&&t.detail.id===this.pocketid&&(this.status=t.detail.status)}render(){return s("main",{class:this.status},s("slot",null))}};h.style=":host{display:block;width:100%;box-sizing:border-box;font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>main{overflow:auto;border-right:var(--border-size-small) solid var(--color-surface03);border-left:var(--border-size-small) solid var(--color-surface03);background:var(--color-surface01);scrollbar-width:none}:host>main.preview{max-height:225px;transition:all 200ms ease-in-out, top 200ms ease-in-out}:host>main.open{max-height:calc(100vh - 48px);transition:all 200ms ease-in-out, top 200ms ease-in-out}:host>main.closed{height:0;transition:all 200ms ease-in-out, top 200ms ease-in-out}:host ::-webkit-scrollbar{width:0}@media only screen and (min-width: 768px){:host>main.preview{max-height:157px}}";const c=class{constructor(s){t(this,s),this.pocketHeaderClick=i(this,"pocketHeaderClick",7),this.pocketHeaderPan=i(this,"pocketHeaderPan",7),this.emitPocketHeaderClick=this.emitPocketHeaderClick.bind(this)}emitPocketHeaderClick(){this.pocketHeaderClick.emit({id:this.pocketid})}emitPocketHeaderPan(t){this.pocketHeaderPan.emit({id:this.pocketid,direction:t})}componentDidLoad(){const t=new r(this.swipeWrap);t.get("pan").set({direction:r.DIRECTION_VERTICAL}),t.on("panup",(()=>this.emitPocketHeaderPan("up"))),t.on("pandown",(()=>this.emitPocketHeaderPan("down")))}render(){return s("header",{role:"button",tabindex:0,onClick:()=>this.emitPocketHeaderClick(),onKeyPress:t=>a(t,this.emitPocketHeaderClick),ref:t=>this.swipeWrap=t},s("slot",null))}};c.style=":host{display:block;width:100%;box-sizing:border-box;font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>header{display:flex;height:36px;flex-flow:row nowrap;align-items:center;justify-content:center;border:var(--border-size-small) solid var(--color-surface03);background:var(--color-surface01);border-radius:var(--space-unit) var(--space-unit) 0 0;cursor:pointer}:host>header:focus{outline:none}:host>header::-moz-focus-inner{border:0}";export{n as z_pocket,h as z_pocket_body,c as z_pocket_header}
@@ -1 +1 @@
1
- import{r as t,h as e,g as i}from"./p-d17ebc2f.js";import{q as r}from"./p-9f80c0b8.js";import{d as s,g as o,h as n}from"./p-87fdd14f.js";import"./p-d69e14fb.js";const a=class{constructor(e){t(this,e),this.currentSlide=0}watchData(){this.parseLinks()}componentWillLoad(){this.parseLinks(),this.setDevice(),window.addEventListener("resize",this.handleResize.bind(this))}componentDidRender(){this.setStyle()}handleResize(){this.setDevice(),this.setStyle()}parseLinks(){var t,e;switch(typeof this.data){case"string":{const i=null!==(t=s(this.data))&&void 0!==t?t:[];if(e=i,!Array.isArray(e)||!e.every((t=>"string"==typeof t)))throw new Error("Passed data is invalid");this.links=i;break}default:this.links=this.data}}setStyle(){const t=this.el.shadowRoot.querySelector("#slides");if(!t)return;const e=this.el.shadowRoot.querySelectorAll(".slide"),i=this.el.offsetWidth;t.style.width=i*this.links.length+"px",t.style.transform=`translate(-${i*this.currentSlide}px)`,e.forEach((t=>{t.querySelector("img").style.width=`${i}px`}))}setDevice(){this.device=o()}setCurrentSlide(t){this.currentSlide=t}getBulletDimension(){switch(this.device){case r.MOBILE:return 24;case r.TABLET:return 32;default:return 40}}renderSlides(t){return e("div",{id:"slides"},t.map(((t,i)=>e("div",{id:"slide"+i,class:`slide ${this.currentSlide!==i&&"hide"}`},e("img",{src:t})))))}renderScroll(t){let i=!1,r=this.currentSlide;return"left"===t?(i=0===this.currentSlide,r--):"right"===t&&(i=this.currentSlide===this.links.length-1,r++),e("z-icon",{class:`scroll ${t} ${i&&"disabled"}`,width:this.getBulletDimension(),height:this.getBulletDimension(),name:`chevron-${t}-circle`,onClick:()=>{!i&&this.setCurrentSlide(r)},onKeyUp:t=>!i&&n(t,(()=>{this.setCurrentSlide(r)})),tabindex:0,role:"button"})}renderSlideshowMain(){return e("main",null,this.renderScroll("left"),this.renderSlides(this.links),this.renderScroll("right"))}renderBullet(t){return e("a",{class:`bullet ${this.currentSlide===t&&"selected"}`,onClick:()=>this.setCurrentSlide(t),onKeyUp:e=>n(e,(()=>this.setCurrentSlide(t))),tabindex:0,role:"button"})}renderSlideshowFooter(){return e("footer",null,e("div",{class:"footer-left"},e("slot",{name:"footer-left"})),e("div",{class:"footer-center"},e("div",{class:"bullet-container"},Object.keys(this.links).map((t=>this.renderBullet(parseInt(t)))))),e("div",{class:"footer-right"},e("slot",{name:"footer-right"})))}render(){return this.links&&this.links.length?e("div",{id:this.slideshowid},this.renderSlideshowMain(),this.renderSlideshowFooter()):e("div",null)}get el(){return i(this)}static get watchers(){return{data:["watchData"]}}};a.style=':host{display:block;width:inherit;font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>div{display:flex;width:inherit;flex-direction:column}main{position:relative;overflow:hidden;width:100%}main z-icon.scroll{position:absolute;z-index:10;top:50%;width:auto;margin:0 var(--space-unit);cursor:pointer;fill:var(--color-primary01);transition:0.6s ease}main .scroll.disabled{opacity:0.5;pointer-events:none}main .scroll.right{right:0}#slides{display:flex;flex-wrap:wrap;line-height:0px;overflow-y:hidden;transition:all 300ms}footer{display:grid;width:100%;height:56px;align-items:center;border-top:var(--border-base) solid var(--color-surface02);grid-template:2 / 2;grid-template-areas:"center center" "left right"}footer>div{width:100%;align-items:center}footer .footer-center{grid-area:center}footer .footer-left{grid-area:left}footer .footer-right{grid-area:right}footer .bullet-container{display:flex;min-height:60px;align-items:center;justify-content:center;margin:0 auto}footer .bullet-container .bullet{width:8px;height:8px;margin:var(--space-unit) 2px;background-color:var(--bg-neutral-150);border-radius:50%;pointer-events:none}footer .bullet-container .bullet.selected{background-color:var(--bg-neutral-400)}@media only screen and (min-width: 768px){footer{height:76px;border-top:var(--border-base) solid var(--color-surface02);grid-template:1 / 1fr 2fr 1fr;grid-template-areas:"left center right"}footer .bullet-container .bullet{width:10px;height:10px;margin:var(--space-unit) 3px}}@media only screen and (min-width: 1025px){main z-icon.scroll{margin:0 10px}footer .bullet-container .bullet{width:16px;height:16px;margin:var(--space-unit) calc(var(--space-unit) * 0.5);cursor:pointer;pointer-events:auto}}';export{a as z_slideshow}
1
+ import{r as t,h as e,g as i}from"./p-d17ebc2f.js";import{q as r}from"./p-9f80c0b8.js";import{b as s,g as o,h as n}from"./p-16da5460.js";import"./p-d69e14fb.js";const a=class{constructor(e){t(this,e),this.currentSlide=0}watchData(){this.parseLinks()}componentWillLoad(){this.parseLinks(),this.setDevice(),window.addEventListener("resize",this.handleResize.bind(this))}componentDidRender(){this.setStyle()}handleResize(){this.setDevice(),this.setStyle()}parseLinks(){var t,e;switch(typeof this.data){case"string":{const i=null!==(t=s(this.data))&&void 0!==t?t:[];if(e=i,!Array.isArray(e)||!e.every((t=>"string"==typeof t)))throw new Error("Passed data is invalid");this.links=i;break}default:this.links=this.data}}setStyle(){const t=this.el.shadowRoot.querySelector("#slides");if(!t)return;const e=this.el.shadowRoot.querySelectorAll(".slide"),i=this.el.offsetWidth;t.style.width=i*this.links.length+"px",t.style.transform=`translate(-${i*this.currentSlide}px)`,e.forEach((t=>{t.querySelector("img").style.width=`${i}px`}))}setDevice(){this.device=o()}setCurrentSlide(t){this.currentSlide=t}getBulletDimension(){switch(this.device){case r.MOBILE:return 24;case r.TABLET:return 32;default:return 40}}renderSlides(t){return e("div",{id:"slides"},t.map(((t,i)=>e("div",{id:"slide"+i,class:`slide ${this.currentSlide!==i&&"hide"}`},e("img",{src:t})))))}renderScroll(t){let i=!1,r=this.currentSlide;return"left"===t?(i=0===this.currentSlide,r--):"right"===t&&(i=this.currentSlide===this.links.length-1,r++),e("z-icon",{class:`scroll ${t} ${i&&"disabled"}`,width:this.getBulletDimension(),height:this.getBulletDimension(),name:`chevron-${t}-circle`,onClick:()=>{!i&&this.setCurrentSlide(r)},onKeyUp:t=>!i&&n(t,(()=>{this.setCurrentSlide(r)})),tabindex:0,role:"button"})}renderSlideshowMain(){return e("main",null,this.renderScroll("left"),this.renderSlides(this.links),this.renderScroll("right"))}renderBullet(t){return e("a",{class:`bullet ${this.currentSlide===t&&"selected"}`,onClick:()=>this.setCurrentSlide(t),onKeyUp:e=>n(e,(()=>this.setCurrentSlide(t))),tabindex:0,role:"button"})}renderSlideshowFooter(){return e("footer",null,e("div",{class:"footer-left"},e("slot",{name:"footer-left"})),e("div",{class:"footer-center"},e("div",{class:"bullet-container"},Object.keys(this.links).map((t=>this.renderBullet(parseInt(t)))))),e("div",{class:"footer-right"},e("slot",{name:"footer-right"})))}render(){return this.links&&this.links.length?e("div",{id:this.slideshowid},this.renderSlideshowMain(),this.renderSlideshowFooter()):e("div",null)}get el(){return i(this)}static get watchers(){return{data:["watchData"]}}};a.style=':host{display:block;width:inherit;font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>div{display:flex;width:inherit;flex-direction:column}main{position:relative;overflow:hidden;width:100%}main z-icon.scroll{position:absolute;z-index:10;top:50%;width:auto;margin:0 var(--space-unit);cursor:pointer;fill:var(--color-primary01);transition:0.6s ease}main .scroll.disabled{opacity:0.5;pointer-events:none}main .scroll.right{right:0}#slides{display:flex;flex-wrap:wrap;line-height:0px;overflow-y:hidden;transition:all 300ms}footer{display:grid;width:100%;height:56px;align-items:center;border-top:var(--border-base) solid var(--color-surface02);grid-template:2 / 2;grid-template-areas:"center center" "left right"}footer>div{width:100%;align-items:center}footer .footer-center{grid-area:center}footer .footer-left{grid-area:left}footer .footer-right{grid-area:right}footer .bullet-container{display:flex;min-height:60px;align-items:center;justify-content:center;margin:0 auto}footer .bullet-container .bullet{width:8px;height:8px;margin:var(--space-unit) 2px;background-color:var(--bg-neutral-150);border-radius:50%;pointer-events:none}footer .bullet-container .bullet.selected{background-color:var(--bg-neutral-400)}@media only screen and (min-width: 768px){footer{height:76px;border-top:var(--border-base) solid var(--color-surface02);grid-template:1 / 1fr 2fr 1fr;grid-template-areas:"left center right"}footer .bullet-container .bullet{width:10px;height:10px;margin:var(--space-unit) 3px}}@media only screen and (min-width: 1025px){main z-icon.scroll{margin:0 10px}footer .bullet-container .bullet{width:16px;height:16px;margin:var(--space-unit) calc(var(--space-unit) * 0.5);cursor:pointer;pointer-events:auto}}';export{a as z_slideshow}
@@ -1 +1 @@
1
- import{r as o,c as e,h as r,H as t}from"./p-d17ebc2f.js";import{e as p,f as a,g as c,h as n}from"./p-9f80c0b8.js";import{a as s}from"./p-87fdd14f.js";import"./p-d69e14fb.js";const d=class{constructor(r){o(this,r),this.triggerClick=e(this,"triggerClick",7),this.position=p.AFTER_UP,this.backgroundColor="color-white",this.borderRadius=a.SMALL,this.boxShadow=c.SHADOW_1,this.showArrow=!1,this.padding="8px",this.isVisible=!1,this.popoverPosition=this.position,this.handleKeyDown=this.handleKeyDown.bind(this)}emitTriggerClick(){this.triggerClick.emit({isVisible:this.isVisible})}openPopover(){const o=document.body.clientWidth,e=window.innerHeight,r=this.popoverElem.getBoundingClientRect(),t=r.left,a=r.right,c=r.top,n=r.bottom;let s=this.position.split("-")[0],d=this.position.split("-")[1];c<0&&(this.position.startsWith("above")?s="below":d="down"),n>e&&(this.position.startsWith("below")?s="above":d="up"),a>o&&(this.position.startsWith("above")||this.position.startsWith("below")?d="left":s="before"),t<0&&(this.position.startsWith("above")||this.position.startsWith("below")?d="right":s="after"),this.popoverPosition=p[`${s}-${d}`],this.isVisible=!0}closePopover(){this.popoverPosition=this.position,this.isVisible=!1}closePopoverWithKeyboard(o){o.key===n.ESC&&this.closePopover()}handleClick(o){this.isVisible?this.closePopover():this.openPopover(),this.emitTriggerClick(),o.stopPropagation()}handleKeyDown(o){o.code===n.ENTER&&(this.isVisible?this.closePopover():this.openPopover())}handleOutsideClick(o){s(o.target).find((o=>"z-popover-deprecated"===o.nodeName.toLowerCase()))||this.closePopover()}render(){return r(t,{onKeyDown:this.handleKeyDown},r("div",{tabindex:"0",onClick:o=>this.handleClick(o),onKeyDown:o=>{o.key===n.ENTER&&this.handleClick(o)}},r("slot",{name:"trigger"})),r("div",{ref:o=>this.popoverElem=o,class:{"popover-content-container":!0,[this.popoverPosition]:!0,[`border-radius-${this.borderRadius}`]:!0,[this.boxShadow]:!0,"show-arrow":this.showArrow,visible:this.isVisible},style:{backgroundColor:`var(--${this.backgroundColor})`,padding:this.padding}},r("slot",{name:"popover"})))}};d.style='.sc-z-popover-deprecated-h{position:relative;display:inline-block;font-family:var(--dashboard-font);font-weight:var(--font-rg);--shadow-arrow-color:rgb(66 69 72 / 20%);--shadow-arrow-below-color:rgb(66 69 72 / 10%)}.popover-content-container.sc-z-popover-deprecated{position:absolute;z-index:999;min-width:64px;min-height:32px;box-sizing:border-box;visibility:hidden}.popover-content-container.visible.sc-z-popover-deprecated{visibility:visible}.popover-content-container.border-radius-none.sc-z-popover-deprecated{border-radius:0}.popover-content-container.border-radius-small.sc-z-popover-deprecated{border-radius:var(--border-radius-small)}.popover-content-container.border-radius-medium.sc-z-popover-deprecated{border-radius:var(--border-radius)}.popover-content-container.shadow-1.sc-z-popover-deprecated{box-shadow:var(--shadow-1)}.popover-content-container.shadow-2.sc-z-popover-deprecated{box-shadow:var(--shadow-2)}.popover-content-container.shadow-3.sc-z-popover-deprecated{box-shadow:var(--shadow-3)}.popover-content-container.shadow-4.sc-z-popover-deprecated{box-shadow:var(--shadow-4)}.popover-content-container.shadow-6.sc-z-popover-deprecated{box-shadow:var(--shadow-6)}.popover-content-container.shadow-8.sc-z-popover-deprecated{box-shadow:var(--shadow-8)}.popover-content-container.shadow-12.sc-z-popover-deprecated{box-shadow:var(--shadow-12)}.popover-content-container.shadow-16.sc-z-popover-deprecated{box-shadow:var(--shadow-16)}.popover-content-container.shadow-24.sc-z-popover-deprecated{box-shadow:var(--shadow-24)}.popover-content-container.after-down.sc-z-popover-deprecated{top:0;left:calc(100% + var(--space-unit))}.popover-content-container.after-center.sc-z-popover-deprecated{top:50%;left:calc(100% + var(--space-unit));transform:translateY(-50%)}.popover-content-container.after-up.sc-z-popover-deprecated{bottom:0;left:calc(100% + var(--space-unit))}.popover-content-container.below-right.sc-z-popover-deprecated{top:calc(100% + var(--space-unit));left:0}.popover-content-container.below-center.sc-z-popover-deprecated{top:calc(100% + var(--space-unit));left:50%;transform:translateX(-50%)}.popover-content-container.below-left.sc-z-popover-deprecated{top:calc(100% + var(--space-unit));right:0}.popover-content-container.before-down.sc-z-popover-deprecated{top:0;right:calc(100% + var(--space-unit))}.popover-content-container.before-center.sc-z-popover-deprecated{top:50%;right:calc(100% + var(--space-unit));transform:translateY(-50%)}.popover-content-container.before-up.sc-z-popover-deprecated{right:calc(100% + var(--space-unit));bottom:0}.popover-content-container.above-right.sc-z-popover-deprecated{bottom:calc(100% + var(--space-unit));left:0}.popover-content-container.above-center.sc-z-popover-deprecated{bottom:calc(100% + var(--space-unit));left:50%;transform:translateX(-50%)}.popover-content-container.above-left.sc-z-popover-deprecated{right:0;bottom:calc(100% + var(--space-unit))}.popover-content-container.sc-z-popover-deprecated::before{position:absolute;z-index:-1;display:none;width:8px;height:8px;background-color:inherit;content:"";transform:rotate(45deg)}.popover-content-container.after-down.sc-z-popover-deprecated::before{top:12px;left:-4px;box-shadow:-1px 1px 1.5px var(--shadow-arrow-color)}.popover-content-container.after-center.sc-z-popover-deprecated::before{top:calc(50% - 4px);left:-4px;box-shadow:-1px 1px 1.5px var(--shadow-arrow-color)}.popover-content-container.after-up.sc-z-popover-deprecated::before{bottom:12px;left:-4px;box-shadow:-1px 1px 1.5px var(--shadow-arrow-color)}.popover-content-container.below-right.sc-z-popover-deprecated::before{top:-4px;left:12px;box-shadow:-1px -1px 2px var(--shadow-arrow-below-color)}.popover-content-container.below-center.sc-z-popover-deprecated::before{top:-4px;left:calc(50% - 4px);box-shadow:-1px -1px 2px var(--shadow-arrow-below-color)}.popover-content-container.below-left.sc-z-popover-deprecated::before{top:-4px;right:12px;box-shadow:-1px -1px 2px var(--shadow-arrow-below-color)}.popover-content-container.before-down.sc-z-popover-deprecated::before{top:12px;right:-4px;box-shadow:1px -1px 1.5px var(--shadow-arrow-color)}.popover-content-container.before-center.sc-z-popover-deprecated::before{top:calc(50% - 4px);right:-4px;box-shadow:1px -1px 1.5px var(--shadow-arrow-color)}.popover-content-container.before-up.sc-z-popover-deprecated::before{right:-4px;bottom:12px;box-shadow:1px -1px 1.5px var(--shadow-arrow-color)}.popover-content-container.above-right.sc-z-popover-deprecated::before{bottom:-4px;left:12px;box-shadow:1px 1px 1.5px var(--shadow-arrow-color)}.popover-content-container.above-center.sc-z-popover-deprecated::before{bottom:-4px;left:calc(50% - 4px);box-shadow:1px 1px 1.5px var(--shadow-arrow-color)}.popover-content-container.above-left.sc-z-popover-deprecated::before{right:12px;bottom:-4px;box-shadow:1px 1px 1.5px var(--shadow-arrow-color)}.popover-content-container.show-arrow.sc-z-popover-deprecated::before{display:block}';export{d as z_popover_deprecated}
1
+ import{r as o,c as e,h as r,H as t}from"./p-d17ebc2f.js";import{e as p,f as a,g as c,h as n}from"./p-9f80c0b8.js";import{a as s}from"./p-16da5460.js";import"./p-d69e14fb.js";const d=class{constructor(r){o(this,r),this.triggerClick=e(this,"triggerClick",7),this.position=p.AFTER_UP,this.backgroundColor="color-white",this.borderRadius=a.SMALL,this.boxShadow=c.SHADOW_1,this.showArrow=!1,this.padding="8px",this.isVisible=!1,this.popoverPosition=this.position,this.handleKeyDown=this.handleKeyDown.bind(this)}emitTriggerClick(){this.triggerClick.emit({isVisible:this.isVisible})}openPopover(){const o=document.body.clientWidth,e=window.innerHeight,r=this.popoverElem.getBoundingClientRect(),t=r.left,a=r.right,c=r.top,n=r.bottom;let s=this.position.split("-")[0],d=this.position.split("-")[1];c<0&&(this.position.startsWith("above")?s="below":d="down"),n>e&&(this.position.startsWith("below")?s="above":d="up"),a>o&&(this.position.startsWith("above")||this.position.startsWith("below")?d="left":s="before"),t<0&&(this.position.startsWith("above")||this.position.startsWith("below")?d="right":s="after"),this.popoverPosition=p[`${s}-${d}`],this.isVisible=!0}closePopover(){this.popoverPosition=this.position,this.isVisible=!1}closePopoverWithKeyboard(o){o.key===n.ESC&&this.closePopover()}handleClick(o){this.isVisible?this.closePopover():this.openPopover(),this.emitTriggerClick(),o.stopPropagation()}handleKeyDown(o){o.code===n.ENTER&&(this.isVisible?this.closePopover():this.openPopover())}handleOutsideClick(o){s(o.target).find((o=>"z-popover-deprecated"===o.nodeName.toLowerCase()))||this.closePopover()}render(){return r(t,{onKeyDown:this.handleKeyDown},r("div",{tabindex:"0",onClick:o=>this.handleClick(o),onKeyDown:o=>{o.key===n.ENTER&&this.handleClick(o)}},r("slot",{name:"trigger"})),r("div",{ref:o=>this.popoverElem=o,class:{"popover-content-container":!0,[this.popoverPosition]:!0,[`border-radius-${this.borderRadius}`]:!0,[this.boxShadow]:!0,"show-arrow":this.showArrow,visible:this.isVisible},style:{backgroundColor:`var(--${this.backgroundColor})`,padding:this.padding}},r("slot",{name:"popover"})))}};d.style='.sc-z-popover-deprecated-h{position:relative;display:inline-block;font-family:var(--dashboard-font);font-weight:var(--font-rg);--shadow-arrow-color:rgb(66 69 72 / 20%);--shadow-arrow-below-color:rgb(66 69 72 / 10%)}.popover-content-container.sc-z-popover-deprecated{position:absolute;z-index:999;min-width:64px;min-height:32px;box-sizing:border-box;visibility:hidden}.popover-content-container.visible.sc-z-popover-deprecated{visibility:visible}.popover-content-container.border-radius-none.sc-z-popover-deprecated{border-radius:0}.popover-content-container.border-radius-small.sc-z-popover-deprecated{border-radius:var(--border-radius-small)}.popover-content-container.border-radius-medium.sc-z-popover-deprecated{border-radius:var(--border-radius)}.popover-content-container.shadow-1.sc-z-popover-deprecated{box-shadow:var(--shadow-1)}.popover-content-container.shadow-2.sc-z-popover-deprecated{box-shadow:var(--shadow-2)}.popover-content-container.shadow-3.sc-z-popover-deprecated{box-shadow:var(--shadow-3)}.popover-content-container.shadow-4.sc-z-popover-deprecated{box-shadow:var(--shadow-4)}.popover-content-container.shadow-6.sc-z-popover-deprecated{box-shadow:var(--shadow-6)}.popover-content-container.shadow-8.sc-z-popover-deprecated{box-shadow:var(--shadow-8)}.popover-content-container.shadow-12.sc-z-popover-deprecated{box-shadow:var(--shadow-12)}.popover-content-container.shadow-16.sc-z-popover-deprecated{box-shadow:var(--shadow-16)}.popover-content-container.shadow-24.sc-z-popover-deprecated{box-shadow:var(--shadow-24)}.popover-content-container.after-down.sc-z-popover-deprecated{top:0;left:calc(100% + var(--space-unit))}.popover-content-container.after-center.sc-z-popover-deprecated{top:50%;left:calc(100% + var(--space-unit));transform:translateY(-50%)}.popover-content-container.after-up.sc-z-popover-deprecated{bottom:0;left:calc(100% + var(--space-unit))}.popover-content-container.below-right.sc-z-popover-deprecated{top:calc(100% + var(--space-unit));left:0}.popover-content-container.below-center.sc-z-popover-deprecated{top:calc(100% + var(--space-unit));left:50%;transform:translateX(-50%)}.popover-content-container.below-left.sc-z-popover-deprecated{top:calc(100% + var(--space-unit));right:0}.popover-content-container.before-down.sc-z-popover-deprecated{top:0;right:calc(100% + var(--space-unit))}.popover-content-container.before-center.sc-z-popover-deprecated{top:50%;right:calc(100% + var(--space-unit));transform:translateY(-50%)}.popover-content-container.before-up.sc-z-popover-deprecated{right:calc(100% + var(--space-unit));bottom:0}.popover-content-container.above-right.sc-z-popover-deprecated{bottom:calc(100% + var(--space-unit));left:0}.popover-content-container.above-center.sc-z-popover-deprecated{bottom:calc(100% + var(--space-unit));left:50%;transform:translateX(-50%)}.popover-content-container.above-left.sc-z-popover-deprecated{right:0;bottom:calc(100% + var(--space-unit))}.popover-content-container.sc-z-popover-deprecated::before{position:absolute;z-index:-1;display:none;width:8px;height:8px;background-color:inherit;content:"";transform:rotate(45deg)}.popover-content-container.after-down.sc-z-popover-deprecated::before{top:12px;left:-4px;box-shadow:-1px 1px 1.5px var(--shadow-arrow-color)}.popover-content-container.after-center.sc-z-popover-deprecated::before{top:calc(50% - 4px);left:-4px;box-shadow:-1px 1px 1.5px var(--shadow-arrow-color)}.popover-content-container.after-up.sc-z-popover-deprecated::before{bottom:12px;left:-4px;box-shadow:-1px 1px 1.5px var(--shadow-arrow-color)}.popover-content-container.below-right.sc-z-popover-deprecated::before{top:-4px;left:12px;box-shadow:-1px -1px 2px var(--shadow-arrow-below-color)}.popover-content-container.below-center.sc-z-popover-deprecated::before{top:-4px;left:calc(50% - 4px);box-shadow:-1px -1px 2px var(--shadow-arrow-below-color)}.popover-content-container.below-left.sc-z-popover-deprecated::before{top:-4px;right:12px;box-shadow:-1px -1px 2px var(--shadow-arrow-below-color)}.popover-content-container.before-down.sc-z-popover-deprecated::before{top:12px;right:-4px;box-shadow:1px -1px 1.5px var(--shadow-arrow-color)}.popover-content-container.before-center.sc-z-popover-deprecated::before{top:calc(50% - 4px);right:-4px;box-shadow:1px -1px 1.5px var(--shadow-arrow-color)}.popover-content-container.before-up.sc-z-popover-deprecated::before{right:-4px;bottom:12px;box-shadow:1px -1px 1.5px var(--shadow-arrow-color)}.popover-content-container.above-right.sc-z-popover-deprecated::before{bottom:-4px;left:12px;box-shadow:1px 1px 1.5px var(--shadow-arrow-color)}.popover-content-container.above-center.sc-z-popover-deprecated::before{bottom:-4px;left:calc(50% - 4px);box-shadow:1px 1px 1.5px var(--shadow-arrow-color)}.popover-content-container.above-left.sc-z-popover-deprecated::before{right:12px;bottom:-4px;box-shadow:1px 1px 1.5px var(--shadow-arrow-color)}.popover-content-container.show-arrow.sc-z-popover-deprecated::before{display:block}';export{d as z_popover_deprecated}
@@ -1 +1 @@
1
- import{r as e,h as t,H as n,g as i,c as o}from"./p-d17ebc2f.js";import{j as a,l as s,n as c,D as l,E as r,h}from"./p-9f80c0b8.js";const u=class{constructor(t){e(this,t),this.size=a.MEDIUM}setChildrenSizeType(){const e=this.host.children;for(let t=0;t<e.length-1;t++)e[t].setAttribute("size",this.size)}componentDidLoad(){this.setChildrenSizeType()}render(){return t(n,{role:"list"},t("slot",null))}get host(){return i(this)}};u.style=":host{display:flex;flex-direction:column;font-family:var(--font-family-sans);font-weight:var(--font-rg)}";const d=class{constructor(t){e(this,t),this.accessibleFocus=o(this,"accessibleFocus",7),this.clickItem=o(this,"clickItem",7),this.alignButton=s.LEFT,this.clickable=!1,this.dividerColor="color-surface03",this.dividerType=c.NONE,this.dividerSize=l.SMALL,this.expandable=!1,this.expandableStyle=r.ACCORDION,this.size=a.MEDIUM,this.color="none",this.disabled=!1,this.isContextualMenu=!1,this.showInnerContent=!1,this.openElementConfig={accordion:{open:"minus-circled",close:"plus-circled"},menu:{open:"chevron-up",close:"chevron-down"}},this.handleClick=this.handleClick.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this)}accessibleFocusHandler(e){this.listElementId===e.detail&&this.host.shadowRoot.getElementById(`z-list-element-id-${e.detail}`).focus()}handleClick(){this.clickItem.emit(this.listElementId),this.expandable&&(this.showInnerContent=!this.showInnerContent)}calculateClass(){return this.isContextualMenu?"container-contextual-menu":"container"}handleKeyDown(e){const t=e.code===h.ENTER;switch(e.code){case h.ARROW_DOWN:e.preventDefault(),this.accessibleFocus.emit(this.listElementId+1);break;case h.ARROW_UP:e.preventDefault(),this.accessibleFocus.emit(this.listElementId-1);break;case h.ENTER:e.preventDefault(),this.clickItem.emit(this.listElementId)}this.expandable&&t&&(this.showInnerContent=!this.showInnerContent)}renderExpandableButton(){return this.expandable?t("z-icon",{name:this.showInnerContent?this.openElementConfig[this.expandableStyle].open:this.openElementConfig[this.expandableStyle].close}):null}renderExpandedContent(){return this.expandable?t("div",{class:{"z-list-element-inner-container":!0,expanded:this.showInnerContent}},t("slot",{name:"inner-content"})):null}render(){return t(n,{role:"listitem","aria-expanded":this.expandable?this.showInnerContent:null,onClick:this.handleClick,onKeyDown:this.handleKeyDown,clickable:this.clickable&&!this.disabled,tabIndex:this.isContextualMenu?null:"0"},t("div",{class:`${this.calculateClass()}`,style:{color:`var(--${this.color})`},tabindex:this.isContextualMenu?"0":"-1",id:`z-list-element-id-${this.listElementId}`},t("div",{class:"z-list-element-container"},this.renderExpandableButton(),t("slot",null)),this.renderExpandedContent()),this.dividerType===c.ELEMENT&&t("z-divider",{color:this.dividerColor,size:this.dividerSize}))}get host(){return i(this)}};d.style=':host{outline:none}:host>.container,:host>.container-contextual-menu{--background-color-list-element:var(--bg-white);--background-hover-color-list-element:var(--color-surface02);--background-active-color-list-element:var(--color-surface02);display:flex;box-sizing:border-box;flex-direction:column;justify-content:center;font-family:var(--font-family-sans);font-weight:var(--font-rg);outline:none}:host([size="small"])>.container{min-height:calc(var(--space-unit) * 4);padding:calc(var(--space-unit) / 2) 0}:host([size="medium"])>.container{min-height:calc(var(--space-unit) * 5);padding:var(--space-unit) 0}:host([size="large"])>.container{min-height:calc(var(--space-unit) * 7);padding:calc(var(--space-unit) * 2) 0}:host([size="x-large"])>.container{min-height:calc(var(--space-unit) * 9);padding:calc(var(--space-unit) * 3) 0}:host([expandable])>.container,:host([expandable])>.container-contextual-menu,:host([clickable])>.container,:host([clickable])>.container-contextual-menu{cursor:pointer}:host([expandable]:hover)>.container,:host([expandable]:hover)>.container-contextual-menu,:host([clickable]:hover)>.container,:host([clickable]:hover)>.container-contextual-menu{background-color:var(--background-hover-color-list-element)}:host([expandable]:focus:focus-visible)>.container,:host([expandable]:focus:focus-visible)>.container-contextual-menu,:host([clickable]:focus:focus-visible)>.container,:host([clickable]:focus:focus-visible)>.container-contextual-menu{box-shadow:var(--shadow-focus-primary)}:host([expandable]:active)>.container,:host([expandable]:active)>.container-contextual-menu,:host([clickable]:active)>.container,:host([clickable]:active)>.container-contextual-menu{background-color:var(--background-active-color-list-element)}:host([align-button="left"][expandable])>.container>.z-list-element-container,:host([align-button="left"][expandable])>.container-contextual-menu>.z-list-element-container{display:flex}:host([align-button="right"][expandable])>.container>.z-list-element-container,:host([align-button="right"][expandable])>.container-contextual-menu>.z-list-element-container{display:flex;flex-direction:row-reverse;justify-content:space-between}:host([align-button="left"][expandable])>.container>.z-list-element-container>z-icon,:host([align-button="left"][expandable])>.container-contextual-menu>.z-list-element-container>z-icon{margin-right:var(--space-unit)}:host([align-button="right"][expandable])>.container>.z-list-element-container>z-icon,:host([align-button="right"][expandable])>.container-contextual-menu>.z-list-element-container>z-icon{margin-left:var(--space-unit)}:host>.container>.z-list-element-inner-container,:host>.container-contextual-menu>.z-list-element-inner-container{display:none}:host>.container>.z-list-element-inner-container.expanded,:host>.container-contextual-menu>.z-list-element-inner-container.expanded{display:block}:host([clickable]:hover)>.container-contextual-menu{background-color:var(--color-surface03)}.container-contextual-menu:focus-visible{box-shadow:var(--shadow-focus-primary);outline:none}';export{u as z_list,d as z_list_element}
1
+ import{r as t,h as e,H as n,g as i,c as o}from"./p-d17ebc2f.js";import{j as s,l as a,n as r,D as c,E as l,h}from"./p-9f80c0b8.js";const u=class{constructor(e){t(this,e),this.size=s.MEDIUM}setChildrenSizeType(){const t=this.host.children;for(let e=0;e<t.length-1;e++)t[e].setAttribute("size",this.size)}componentDidLoad(){this.setChildrenSizeType()}render(){return e(n,{role:"list"},e("slot",null))}get host(){return i(this)}};u.style=":host{display:flex;flex-direction:column;font-family:var(--font-family-sans);font-weight:var(--font-rg)}";const d=class{constructor(e){t(this,e),this.accessibleFocus=o(this,"accessibleFocus",7),this.clickItem=o(this,"clickItem",7),this.alignButton=a.LEFT,this.clickable=!1,this.dividerColor="color-surface03",this.dividerType=r.NONE,this.dividerSize=c.SMALL,this.expandable=!1,this.expandableStyle=l.ACCORDION,this.size=s.MEDIUM,this.color="none",this.disabled=!1,this.isContextualMenu=!1,this.showInnerContent=!1,this.openElementConfig={accordion:{open:"minus-circled",close:"plus-circled"},menu:{open:"chevron-up",close:"chevron-down"}},this.handleClick=this.handleClick.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this)}accessibleFocusHandler(t){this.listElementId===t.detail&&this.host.shadowRoot.getElementById(`z-list-element-id-${t.detail}`).focus()}handleClick(){this.clickItem.emit(this.listElementId),this.expandable&&(this.showInnerContent=!this.showInnerContent)}calculateClass(){return this.isContextualMenu?"container-contextual-menu":"container"}handleKeyDown(t){const e=t.code===h.ENTER;switch(t.code){case h.ARROW_DOWN:t.preventDefault(),this.accessibleFocus.emit(this.listElementId+1);break;case h.ARROW_UP:t.preventDefault(),this.accessibleFocus.emit(this.listElementId-1);break;case h.ENTER:t.preventDefault(),this.clickItem.emit(this.listElementId)}this.expandable&&e&&(this.showInnerContent=!this.showInnerContent)}renderExpandableButton(){return this.expandable?e("z-icon",{name:this.showInnerContent?this.openElementConfig[this.expandableStyle].open:this.openElementConfig[this.expandableStyle].close}):null}renderExpandedContent(){return this.expandable?e("div",{class:{"z-list-element-inner-container":!0,expanded:this.showInnerContent}},e("slot",{name:"inner-content"})):null}render(){return e(n,{role:"listitem","aria-expanded":this.expandable?this.showInnerContent:null,onClick:this.handleClick,onKeyDown:this.handleKeyDown,clickable:this.clickable&&!this.disabled,tabIndex:this.isContextualMenu?null:"0"},e("div",{class:`${this.calculateClass()}`,style:{color:`var(--${this.color})`},tabindex:this.isContextualMenu?"0":"-1",id:`z-list-element-id-${this.listElementId}`},e("div",{class:"z-list-element-container"},this.renderExpandableButton(),e("slot",null)),this.renderExpandedContent()),this.dividerType===r.ELEMENT&&e("z-divider",{color:this.dividerColor,size:this.dividerSize}))}get host(){return i(this)}};d.style=':host{outline:none}:host>.container,:host>.container-contextual-menu{--background-color-list-element:var(--bg-white);--background-hover-color-list-element:var(--color-surface02);--background-active-color-list-element:var(--color-surface02);display:flex;box-sizing:border-box;flex-direction:column;justify-content:center;font-family:var(--font-family-sans);font-weight:var(--font-rg);outline:none}:host([size="small"])>.container{min-height:calc(var(--space-unit) * 4);padding:calc(var(--space-unit) / 2) 0}:host([size="medium"])>.container{min-height:calc(var(--space-unit) * 5);padding:var(--space-unit) 0}:host([size="large"])>.container{min-height:calc(var(--space-unit) * 7);padding:calc(var(--space-unit) * 2) 0}:host([size="x-large"])>.container{min-height:calc(var(--space-unit) * 9);padding:calc(var(--space-unit) * 3) 0}:host([expandable])>.container,:host([expandable])>.container-contextual-menu,:host([clickable])>.container,:host([clickable])>.container-contextual-menu{cursor:pointer}:host([expandable]:hover)>.container,:host([expandable]:hover)>.container-contextual-menu,:host([clickable]:hover)>.container,:host([clickable]:hover)>.container-contextual-menu{background-color:var(--background-hover-color-list-element)}:host([expandable]:focus:focus-visible)>.container,:host([expandable]:focus:focus-visible)>.container-contextual-menu,:host([clickable]:focus:focus-visible)>.container,:host([clickable]:focus:focus-visible)>.container-contextual-menu{box-shadow:var(--shadow-focus-primary)}:host([expandable]:active)>.container,:host([expandable]:active)>.container-contextual-menu,:host([clickable]:active)>.container,:host([clickable]:active)>.container-contextual-menu{background-color:var(--background-active-color-list-element)}:host([align-button="left"][expandable])>.container>.z-list-element-container,:host([align-button="left"][expandable])>.container-contextual-menu>.z-list-element-container{display:flex}:host([align-button="right"][expandable])>.container>.z-list-element-container,:host([align-button="right"][expandable])>.container-contextual-menu>.z-list-element-container{display:flex;flex-direction:row-reverse;justify-content:space-between}:host([align-button="left"][expandable])>.container>.z-list-element-container>z-icon,:host([align-button="left"][expandable])>.container-contextual-menu>.z-list-element-container>z-icon{margin-right:var(--space-unit)}:host([align-button="right"][expandable])>.container>.z-list-element-container>z-icon,:host([align-button="right"][expandable])>.container-contextual-menu>.z-list-element-container>z-icon{margin-left:var(--space-unit)}:host>.container>.z-list-element-inner-container,:host>.container-contextual-menu>.z-list-element-inner-container{display:none}:host>.container>.z-list-element-inner-container.expanded,:host>.container-contextual-menu>.z-list-element-inner-container.expanded{display:block}:host([clickable]:hover)>.container-contextual-menu{background-color:var(--color-surface03)}.container-contextual-menu:focus-visible{box-shadow:var(--shadow-focus-primary);outline:none}';const m=class{constructor(e){t(this,e),this.size=s.MEDIUM,this.dividerType=r.NONE,this.dividerSize=c.SMALL,this.dividerColor="gray200"}componentDidLoad(){const t=this.host.children;for(let e=0;e<t.length;e++)t.length-1>e&&(t[e].setAttribute("divider-type",this.dividerType),t[e].setAttribute("divider-size",this.dividerSize),t[e].setAttribute("divider-color",this.dividerColor)),t[e].setAttribute("size",this.size)}componentWillLoad(){this.hasHeader=!!this.host.querySelector('[slot="header-title"]')}render(){return e(n,{role:"group"},e("div",{class:{"z-list-group-header-container":!0,"has-header":this.hasHeader}},e("slot",{name:"header-title"}),this.dividerType===r.HEADER&&e("z-divider",{color:this.dividerColor,size:this.dividerSize})),e("slot",null))}get host(){return i(this)}};m.style=":host{font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>.z-list-group-header-container{color:var(--gray700);font-size:var(--font-size-2);font-weight:var(--font-sb) !important;letter-spacing:0.16px;line-height:1.4}:host>.z-list-group-header-container.has-header{padding-top:var(--space-unit);padding-bottom:var(--space-unit)}:host>.z-list-group-header-container.has-header>z-divider{margin-top:var(--space-unit)}";export{u as z_list,d as z_list_element,m as z_list_group}
@@ -0,0 +1 @@
1
+ import{r as t,c as i,h as r,g as e,H as s}from"./p-d17ebc2f.js";import{m as n,I as a}from"./p-9f80c0b8.js";import{r as c,d as o}from"./p-16da5460.js";import"./p-d69e14fb.js";const p=class{constructor(r){t(this,r),this.inputChange=i(this,"inputChange",7),this.startTyping=i(this,"startTyping",7),this.stopTyping=i(this,"stopTyping",7),this.inputCheck=i(this,"inputCheck",7),this.htmlid=`id-${c()}`,this.ariaLabel="",this.disabled=!1,this.readonly=!1,this.required=!1,this.checked=!1,this.message=!0,this.labelPosition=n.RIGHT,this.hasclearicon=!0,this.isTyping=!1,this.passwordHidden=!0,this.typingtimeout=300}inputCheckListener(t){const i=t.detail;switch(this.type){case a.RADIO:i.type===a.RADIO&&i.name===this.name&&i.id!==this.htmlid&&(this.checked=!1)}}async isChecked(){switch(this.type){case a.CHECKBOX:case a.RADIO:return this.checked;default:return console.warn("`isChecked` method is only available for type `checkbox` and `radio`"),!1}}emitInputChange(t){let i;this.isTyping||this.emitStartTyping(),i=this.getValidity(this.type===a.TEXTAREA?"textarea":"input"),this.value=t,this.inputChange.emit({value:t,validity:i}),clearTimeout(this.timer),this.timer=setTimeout((()=>{this.emitStopTyping(this.value,i)}),this.typingtimeout)}emitStartTyping(){this.isTyping=!0,this.startTyping.emit()}emitStopTyping(t,i){this.isTyping=!1,this.stopTyping.emit({value:t,validity:i})}emitInputCheck(t){this.inputCheck.emit({id:this.htmlid,checked:t,type:this.type,name:this.name,value:this.value,validity:this.getValidity("input")})}getValidity(t){return this.hostElement.querySelector(t).validity}getTextAttributes(){return{id:this.htmlid,name:this.name,placeholder:this.placeholder,value:this.value,disabled:this.disabled,readonly:this.readonly,required:this.required,title:this.htmltitle,class:{[`input-${this.status}`]:!!this.status,filled:!!this.value},autocomplete:this.autocomplete,onInput:t=>this.emitInputChange(t.target.value)}}getNumberAttributes(t){if(t==a.NUMBER)return{min:this.min,max:this.max,step:this.step}}getPatternAttribute(t){if(t==a.PASSWORD||t==a.TEXT||t==a.TEL||t==a.SEARCH||t==a.URL||t==a.EMAIL)return{pattern:this.pattern}}renderInputText(t=a.TEXT){const i=Object.assign(Object.assign(Object.assign({},this.getTextAttributes()),this.getNumberAttributes(t)),this.getPatternAttribute(t));return(this.icon||t===a.PASSWORD)&&Object.assign(i.class,{"has-icon":!0}),this.hasclearicon&&t!=a.NUMBER&&Object.assign(i.class,{"has-clear-icon":!0}),r("div",{class:"text-wrapper"},this.renderLabel(),r("div",null,r("input",Object.assign({type:t!==a.PASSWORD||this.passwordHidden?t:a.TEXT},i,{"aria-label":this.ariaLabel||this.label})),this.renderIcons()),this.renderMessage())}renderLabel(){if(this.label)return r("label",{class:"input-label body-5-sb",id:`${this.htmlid}_label`,htmlFor:this.htmlid,"aria-label":this.label},this.label)}renderIcons(){return r("span",{class:"icons-wrapper"},this.renderResetIcon(),this.renderIcon())}renderIcon(){return this.type===a.PASSWORD?this.renderShowHidePassword():this.icon?r("button",{type:"button",class:"icon-button input-icon",tabIndex:-1},r("z-icon",{name:this.icon})):void 0}renderResetIcon(){if(this.hasclearicon&&this.value&&!this.disabled&&!this.readonly&&this.type!=a.NUMBER)return r("button",{type:"button",class:"icon-button reset-icon","aria-label":"cancella il contenuto dell'input",onClick:()=>this.emitInputChange("")},r("z-icon",{name:"multiply"}))}renderShowHidePassword(){return r("button",{type:"button",class:"icon-button toggle-password-icon",disabled:this.disabled,"aria-label":this.passwordHidden?"mostra password":"nascondi password",onClick:()=>this.passwordHidden=!this.passwordHidden},r("z-icon",{name:this.passwordHidden?"view-filled":"view-off-filled"}))}renderMessage(){if(!1!==o(this.message))return r("z-input-message",{message:!0===o(this.message)?void 0:this.message,status:this.status})}renderTextarea(){const t=this.getTextAttributes();return r("div",{class:"text-wrapper"},this.renderLabel(),r("div",{class:Object.assign(Object.assign({},t.class),{"textarea-wrapper":!0,readonly:t.readonly})},r("textarea",Object.assign({},t,{"aria-label":this.ariaLabel||this.label}))),this.renderMessage())}handleCheck(t){this.checked=t.target.checked,this.emitInputCheck(this.checked)}renderCheckbox(){return r("div",{class:"checkbox-wrapper"},r("input",{id:this.htmlid,type:"checkbox",name:this.name,checked:this.checked,disabled:this.disabled,readonly:this.readonly,required:this.required,onChange:this.handleCheck.bind(this),value:this.value}),r("label",{htmlFor:this.htmlid,class:{"checkbox-label":!0,after:this.labelPosition===n.RIGHT,before:this.labelPosition===n.LEFT}},r("z-icon",{name:this.checked?"checkbox-checked":"checkbox","aria-hidden":"true"}),this.label&&r("span",{innerHTML:this.label})))}renderRadio(){return r("div",{class:"radio-wrapper"},r("input",{id:this.htmlid,type:"radio",name:this.name,checked:this.checked,disabled:this.disabled,readonly:this.readonly,onChange:this.handleCheck.bind(this),value:this.value}),r("label",{htmlFor:this.htmlid,class:{"radio-label":!0,after:this.labelPosition===n.RIGHT,before:this.labelPosition===n.LEFT}},r("z-icon",{name:this.checked?"radio-button-checked":"radio-button","aria-hidden":"true"}),this.label&&r("span",{innerHTML:this.label})))}render(){switch(this.type){case a.TEXTAREA:return this.renderTextarea();case a.CHECKBOX:return this.renderCheckbox();case a.RADIO:return this.renderRadio();default:return this.renderInputText(this.type)}}get hostElement(){return e(this)}};p.style='.sc-z-input-h{display:inline-block;width:inherit}input.sc-z-input::-ms-clear,input.sc-z-input::-ms-reveal{display:none}.sc-z-input-h input.sc-z-input::-ms-clear,.sc-z-input-h input.sc-z-input::-ms-reveal{display:none}input.sc-z-input,textarea.sc-z-input,.textarea-wrapper.sc-z-input{box-sizing:border-box;border:var(--border-size-small) solid var(--color-surface04);background:var(--color-input-field01);border-radius:var(--border-radius-small);color:var(--color-text02);fill:var(--color-icon02);font-family:var(--font-family-sans);font-size:var(--font-size-3);font-weight:var(--font-rg);outline:none}input.sc-z-input:focus:focus-visible,.textarea-wrapper.sc-z-input:focus-within{box-shadow:var(--shadow-focus-primary)}input.sc-z-input:focus:focus-visible,textarea.sc-z-input:focus:focus-visible{color:var(--color-primary01)}.filled.sc-z-input{border-color:var(--color-surface05)}.input-success.sc-z-input{border-color:var(--color-success01);background:var(--color-success-inverse);fill:var(--color-success01)}.input-error.sc-z-input{border-color:var(--color-error01);background:var(--color-error-inverse);fill:var(--color-error01)}.input-warning.sc-z-input{border-color:var(--color-warning01);background:var(--color-warning-inverse);fill:var(--color-warning01)}input.sc-z-input:hover,.textarea-wrapper.sc-z-input:hover{outline:var(--border-size-medium) solid var(--color-surface04);outline-offset:-2px}input[readonly].sc-z-input,.readonly.sc-z-input{border-color:var(--color-disabled01);fill:var(--color-disabled01);pointer-events:none}[disabled].sc-z-input-h:not([disabled="false"]) input.sc-z-input,[disabled].sc-z-input-h:not([disabled="false"]) .textarea-wrapper.sc-z-input,[disabled].sc-z-input-h:not([disabled="false"]) z-icon.sc-z-input{border-color:var(--color-disabled01);box-shadow:none;color:var(--color-disabled02);fill:var(--color-disabled01);pointer-events:none}[disabled].sc-z-input-h:not([disabled="false"]) input.sc-z-input:hover{border-width:var(--border-size-small)}input.sc-z-input::placeholder,textarea.sc-z-input::placeholder{color:var(--color-text05)}.sc-z-input::-webkit-textarea-placeholder{color:var(--color-text05)}.sc-z-input:-ms-textarea-placeholder{color:var(--color-text05)}.sc-z-input::placeholder{color:var(--color-text05)}.sc-z-input:placeholder{color:var(--color-text05)}label.input-label.sc-z-input{display:block;padding-bottom:var(--space-unit);color:var(--color-text02);font-family:var(--font-family-sans);font-size:var(--font-size-1);font-weight:var(--font-sb);text-align:left;text-transform:uppercase}[disabled].sc-z-input-h:not([disabled="false"]) label.input-label.sc-z-input{color:var(--color-disabled02)}.text-wrapper.sc-z-input>div.sc-z-input{position:relative;z-index:1;fill:var(--color-icon02)}.text-wrapper.sc-z-input>div.sc-z-input>input.sc-z-input{width:100%;height:calc(var(--space-unit) * 5.5);box-sizing:border-box;padding:0 calc(var(--space-unit) * 1.5);margin:0}.text-wrapper.sc-z-input>div.sc-z-input>input.has-icon.sc-z-input,.text-wrapper.sc-z-input>div.sc-z-input>input.has-clear-icon.sc-z-input{padding-right:calc(var(--space-unit) * 5.25)}.text-wrapper.sc-z-input>div.sc-z-input>input.has-icon.has-clear-icon.sc-z-input{padding-right:calc(var(--space-unit) * 8)}.text-wrapper.sc-z-input .icons-wrapper.sc-z-input{position:absolute;z-index:2;top:50%;right:calc(var(--space-unit) * 1.5);display:flex;pointer-events:none;transform:translateY(-50%)}.text-wrapper.sc-z-input .icons-wrapper.sc-z-input>button.icon-button.sc-z-input{padding:0;border:0;background:none;color:inherit;font:inherit;pointer-events:initial}.text-wrapper.sc-z-input .icons-wrapper.sc-z-input>button.icon-button.sc-z-input+button.icon-button.sc-z-input{margin-left:calc(var(--space-unit) * 0.5)}.text-wrapper.sc-z-input .icons-wrapper.sc-z-input>button.icon-button.reset-icon.sc-z-input,.text-wrapper.sc-z-input .icons-wrapper.sc-z-input>button.icon-button.toggle-password-icon.sc-z-input{cursor:pointer}.text-wrapper.sc-z-input .icons-wrapper.sc-z-input>button.icon-button.sc-z-input>z-icon.sc-z-input{--z-icon-width:18px;--z-icon-height:18px;display:block}.text-wrapper.sc-z-input>div.sc-z-input>input.sc-z-input:-webkit-autofill,.text-wrapper.sc-z-input>div.sc-z-input>input.sc-z-input:-webkit-autofill:hover,.text-wrapper.sc-z-input>div.sc-z-input>input.sc-z-input:-webkit-autofill:focus,.text-wrapper.sc-z-input>div.sc-z-input>input.sc-z-input:-webkit-autofill:active{background-clip:text !important}.textarea-wrapper.sc-z-input{padding:calc(var(--space-unit) * 1.5);scrollbar-color:var(--color-primary01) transparent}textarea.sc-z-input::-webkit-scrollbar{width:10px;background:linear-gradient(to right, transparent 0 3px, var(--gray200) 3px 7px, transparent 7px 10px);border-radius:var(--border-radius)}textarea.sc-z-input::-webkit-scrollbar-track{background-color:transparent}textarea.sc-z-input::-webkit-scrollbar-thumb{width:10px;background-color:var(--color-primary01);border-radius:var(--border-radius)}textarea.sc-z-input::-webkit-scrollbar-thumb:hover{background-color:var(--color-hover-primary)}textarea.sc-z-input{width:100%;min-height:132px;padding:0;border:none;margin:0;resize:none}.radio-wrapper.sc-z-input,.checkbox-wrapper.sc-z-input{position:relative;display:inline-flex;flex-direction:row;align-items:center;color:var(--color-text01);fill:var(--color-primary01);font-family:var(--font-family-sans)}.radio-wrapper.sc-z-input:hover,.checkbox-wrapper.sc-z-input:hover{color:var(--color-hover-primary);fill:currentcolor}.radio-wrapper.sc-z-input>input.sc-z-input,.checkbox-wrapper.sc-z-input>input.sc-z-input{position:absolute;z-index:-1;opacity:0;pointer-events:none}.radio-wrapper.sc-z-input .radio-label.sc-z-input,.checkbox-wrapper.sc-z-input .checkbox-label.sc-z-input{display:inline-flex;align-items:center;margin:0;color:inherit;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:1;text-transform:inherit}.radio-wrapper.sc-z-input input.sc-z-input:not(:disabled)+.radio-label.sc-z-input,.checkbox-wrapper.sc-z-input input.sc-z-input:not(:disabled)+.checkbox-label.sc-z-input{cursor:pointer}.radio-wrapper.sc-z-input .radio-label.sc-z-input z-icon.sc-z-input,.checkbox-wrapper.sc-z-input .checkbox-label.sc-z-input z-icon.sc-z-input{cursor:pointer;fill:inherit}.radio-wrapper.sc-z-input .radio-label.after.sc-z-input,.checkbox-wrapper.sc-z-input .checkbox-label.after.sc-z-input{flex-direction:row}.radio-wrapper.sc-z-input .radio-label.before.sc-z-input,.checkbox-wrapper.sc-z-input .checkbox-label.before.sc-z-input{flex-direction:row-reverse}.radio-wrapper.sc-z-input .radio-label.after.sc-z-input>span.sc-z-input,.checkbox-wrapper.sc-z-input .checkbox-label.after.sc-z-input>span.sc-z-input{margin-left:var(--space-unit)}.radio-wrapper.sc-z-input .radio-label.before.sc-z-input>span.sc-z-input,.checkbox-wrapper.sc-z-input .checkbox-label.before.sc-z-input>span.sc-z-input{margin-right:var(--space-unit)}.radio-wrapper.sc-z-input>input.sc-z-input:focus:focus-visible+.radio-label.sc-z-input>z-icon.sc-z-input,.checkbox-wrapper.sc-z-input>input.sc-z-input:focus:focus-visible+.checkbox-label.sc-z-input>z-icon.sc-z-input{border-radius:var(--border-radius-small);box-shadow:var(--shadow-focus-primary)}.radio-wrapper.sc-z-input>input.sc-z-input:disabled+.radio-label.sc-z-input,.checkbox-wrapper.sc-z-input>input.sc-z-input:disabled+.checkbox-label.sc-z-input{color:var(--color-disabled02)}.radio-wrapper.sc-z-input>input.sc-z-input:disabled+.radio-label.sc-z-input>z-icon.sc-z-input,.checkbox-wrapper.sc-z-input>input.sc-z-input:disabled+.checkbox-label.sc-z-input>z-icon.sc-z-input{cursor:default;fill:var(--color-disabled01)}';const l=class{constructor(i){t(this,i),this.statusIcons={success:"checkmark-circle",error:"multiply-circled",warning:"exclamation-circle"}}render(){return r(s,{role:"alert","aria-label":this.message,tabindex:this.message?0:-1},this.statusIcons[this.status]&&this.message&&r("z-icon",{name:this.statusIcons[this.status]}),r("span",{innerHTML:this.message}))}};l.style=':host{display:flex;min-height:calc(var(--space-unit) * 2.5);align-items:start;margin-top:var(--space-unit);color:var(--color-text05);fill:currentcolor;font-family:var(--font-family-sans);font-size:var(--font-size-2);letter-spacing:0.16px}:host([status="success"]){color:var(--color-text-success)}:host([status="error"]){color:var(--color-text-error)}:host([status="warning"]){color:var(--color-warning02)}:host(:focus){outline:none}:host>z-icon{--z-icon-width:calc(var(--space-unit) * 2);--z-icon-height:calc(var(--space-unit) * 2);--z-icon-right-margin:var(--space-unit)}';export{p as z_input,l as z_input_message}
@@ -1 +1 @@
1
- import{r as i,c as t,h as n}from"./p-d17ebc2f.js";import{P as e}from"./p-9f80c0b8.js";import{h as s}from"./p-87fdd14f.js";import"./p-d69e14fb.js";const o=class{constructor(n){i(this,n),this.flipCard=t(this,"flipCard",7),this.htmltabindex=0,this.hiddenContent=!1,this.tooltip=!1,this.emitFlipCard=this.emitFlipCard.bind(this)}emitFlipCard(i=!1){this.flipCard.emit(i)}componentWillLoad(){this.setStringOrArray()}componentWillUpdate(){this.setStringOrArray()}componentDidRender(){this.handleContentHeight()}handleContentHeight(){if(this.contentWrapper||this.infoWrapper){if(this.contentWrapper.scrollHeight>this.contentWrapper.offsetHeight||this.infoWrapper.scrollHeight>this.infoWrapper.offsetHeight)return this.infoWrapper.style.height=this.contentWrapper.offsetHeight-this.onlineLicenseWrapper.offsetHeight-this.offlineLicenseWrapper.offsetHeight+"px",void(this.hiddenContent=!0);this.hiddenContent=!1}else this.hiddenContent=!1}setStringOrArray(){this.cardData="string"==typeof this.data?JSON.parse(this.data):this.data}renderCloseIcon(){return n("z-icon",{name:"multiply-circled-filled",height:18,width:18,onClick:()=>this.emitFlipCard(!1),tabindex:this.htmltabindex,onKeyUp:i=>{s(i,this.emitFlipCard,!1)}})}renderGeneralSection(){var i,t;const e=null===(i=null==this?void 0:this.cardData)||void 0===i?void 0:i.title,s=null===(t=null==this?void 0:this.cardData)||void 0===t?void 0:t.description;return n("section",{class:"info-wrapper "+(this.hiddenContent?"hidden":""),onClick:()=>{this.hiddenContent&&(this.tooltip=!this.tooltip)},ref:i=>this.infoWrapper=i},this.renderAuthor(),this.renderYear(),e,n("br",null),s)}renderAuthor(){var i;const t=null===(i=null==this?void 0:this.cardData)||void 0===i?void 0:i.author;return t?n("span",null,"Autore: ",n("b",null,t),n("br",null)):null}renderYear(){var i;const t=null===(i=null==this?void 0:this.cardData)||void 0===i?void 0:i.year;return t?n("span",null,"Anno: ",n("b",null,t),n("br",null)):null}renderTooltip(){if(!this.tooltip)return;if(!this.cardData)return;const{title:i,year:t,author:s,description:o}=this.cardData;return n("z-popover",{position:e.RIGHT,onClick:()=>this.tooltip=!1},`${i} ${t} ${s} ${o}`)}setExpirationLicenseMessage(i){return"online"===i&&this.cardData.onlineLicense.expired||"offline"===i&&this.cardData.offlineLicense.expired?n("span",{class:"expired"},"SCADUTA"):"online"===i&&this.cardData.onlineLicense.expiring||"offline"===i&&this.cardData.offlineLicense.expiring?n("span",{class:"expiring"},"IN SCADENZA"):void 0}renderOnlineLicenseSection(){var i;if(null===(i=null==this?void 0:this.cardData)||void 0===i?void 0:i.onlineLicense)return n("section",{ref:i=>this.onlineLicenseWrapper=i},n("span",{class:"license-heading"},n("span",null,"Licenza online"),this.setExpirationLicenseMessage("online")),"Scadenza il ",n("b",null,this.cardData.onlineLicense.expiration),n("br",null))}renderOfflineLicenseSection(){var i;if(null===(i=null==this?void 0:this.cardData)||void 0===i?void 0:i.offlineLicense)return n("section",{ref:i=>this.offlineLicenseWrapper=i},n("span",{class:"license-heading"},n("span",null,"Licenza offline"),this.setExpirationLicenseMessage("offline")),"Scadenza il ",n("b",null,this.cardData.offlineLicense.expiration),n("br",null),"Installazioni disponibili: ",n("b",null,this.cardData.offlineLicense.installations))}render(){return n("div",null,this.renderCloseIcon(),n("div",{class:"content-wrapper",ref:i=>this.contentWrapper=i},this.renderGeneralSection(),this.renderTooltip(),this.renderOnlineLicenseSection(),this.renderOfflineLicenseSection()),n("div",{class:"cta-wrapper"},n("slot",null)))}};o.style=':host{width:100%;font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>div{position:relative;display:grid;width:calc(100% + calc(var(--space-unit) * 2));height:402px;box-sizing:border-box;padding:calc(var(--space-unit) * 2) calc(var(--space-unit) * 3);border:var(--border-size-small) solid var(--color-primary01);margin-left:calc(-1 * var(--space-unit));background:var(--color-surface01);border-radius:0;box-shadow:0 2px 4px 0 rgb(66 69 72 / 35%)}:host>div>z-icon{position:absolute;top:var(--space-unit);right:var(--space-unit);cursor:pointer;fill:var(--color-primary01)}:host>div>div.cta-wrapper{display:flex;flex-flow:column nowrap;align-self:end;justify-content:space-between}:host>div>div.content-wrapper{position:relative;overflow:hidden;align-self:stretch}:host>div>div.content-wrapper>section{box-sizing:border-box;padding:var(--space-unit) 0;border-bottom:var(--border-size-small) solid var(--color-surface04);color:var(--color-surface05);font-size:14px;line-height:20px}:host>div>div.content-wrapper>section:last-child{border-bottom:none}:host>div>div.content-wrapper>section.info-wrapper{position:relative;overflow:hidden;box-sizing:border-box}:host>div>div.content-wrapper>section.info-wrapper.hidden::after{position:absolute;top:0;right:0;bottom:0;left:0;background:linear-gradient(180deg, rgb(255 0 0 / 0%), rgb(255 0 0 / 0%) 60%, white);content:"";pointer-events:none}:host>div>div.content-wrapper>section>span.license-heading{display:flex;justify-content:space-between}:host>div>div.content-wrapper>section>span.license-heading>span.expired{color:var(--color-secondary02);font-size:12px;font-weight:600}:host>div>div.content-wrapper>section>span.license-heading>span.expiring{color:var(--color-warning01);font-size:12px;font-weight:600}:host>div>div.content-wrapper>z-popover{position:absolute;top:0;left:calc(var(--space-unit) * 4)}';export{o as z_myz_card_info}
1
+ import{r as i,c as t,h as n}from"./p-d17ebc2f.js";import{P as e}from"./p-9f80c0b8.js";import{h as s}from"./p-16da5460.js";import"./p-d69e14fb.js";const o=class{constructor(n){i(this,n),this.flipCard=t(this,"flipCard",7),this.htmltabindex=0,this.hiddenContent=!1,this.tooltip=!1,this.emitFlipCard=this.emitFlipCard.bind(this)}emitFlipCard(i=!1){this.flipCard.emit(i)}componentWillLoad(){this.setStringOrArray()}componentWillUpdate(){this.setStringOrArray()}componentDidRender(){this.handleContentHeight()}handleContentHeight(){if(this.contentWrapper||this.infoWrapper){if(this.contentWrapper.scrollHeight>this.contentWrapper.offsetHeight||this.infoWrapper.scrollHeight>this.infoWrapper.offsetHeight)return this.infoWrapper.style.height=this.contentWrapper.offsetHeight-this.onlineLicenseWrapper.offsetHeight-this.offlineLicenseWrapper.offsetHeight+"px",void(this.hiddenContent=!0);this.hiddenContent=!1}else this.hiddenContent=!1}setStringOrArray(){this.cardData="string"==typeof this.data?JSON.parse(this.data):this.data}renderCloseIcon(){return n("z-icon",{name:"multiply-circled-filled",height:18,width:18,onClick:()=>this.emitFlipCard(!1),tabindex:this.htmltabindex,onKeyUp:i=>{s(i,this.emitFlipCard,!1)}})}renderGeneralSection(){var i,t;const e=null===(i=null==this?void 0:this.cardData)||void 0===i?void 0:i.title,s=null===(t=null==this?void 0:this.cardData)||void 0===t?void 0:t.description;return n("section",{class:"info-wrapper "+(this.hiddenContent?"hidden":""),onClick:()=>{this.hiddenContent&&(this.tooltip=!this.tooltip)},ref:i=>this.infoWrapper=i},this.renderAuthor(),this.renderYear(),e,n("br",null),s)}renderAuthor(){var i;const t=null===(i=null==this?void 0:this.cardData)||void 0===i?void 0:i.author;return t?n("span",null,"Autore: ",n("b",null,t),n("br",null)):null}renderYear(){var i;const t=null===(i=null==this?void 0:this.cardData)||void 0===i?void 0:i.year;return t?n("span",null,"Anno: ",n("b",null,t),n("br",null)):null}renderTooltip(){if(!this.tooltip)return;if(!this.cardData)return;const{title:i,year:t,author:s,description:o}=this.cardData;return n("z-popover",{position:e.RIGHT,onClick:()=>this.tooltip=!1},`${i} ${t} ${s} ${o}`)}setExpirationLicenseMessage(i){return"online"===i&&this.cardData.onlineLicense.expired||"offline"===i&&this.cardData.offlineLicense.expired?n("span",{class:"expired"},"SCADUTA"):"online"===i&&this.cardData.onlineLicense.expiring||"offline"===i&&this.cardData.offlineLicense.expiring?n("span",{class:"expiring"},"IN SCADENZA"):void 0}renderOnlineLicenseSection(){var i;if(null===(i=null==this?void 0:this.cardData)||void 0===i?void 0:i.onlineLicense)return n("section",{ref:i=>this.onlineLicenseWrapper=i},n("span",{class:"license-heading"},n("span",null,"Licenza online"),this.setExpirationLicenseMessage("online")),"Scadenza il ",n("b",null,this.cardData.onlineLicense.expiration),n("br",null))}renderOfflineLicenseSection(){var i;if(null===(i=null==this?void 0:this.cardData)||void 0===i?void 0:i.offlineLicense)return n("section",{ref:i=>this.offlineLicenseWrapper=i},n("span",{class:"license-heading"},n("span",null,"Licenza offline"),this.setExpirationLicenseMessage("offline")),"Scadenza il ",n("b",null,this.cardData.offlineLicense.expiration),n("br",null),"Installazioni disponibili: ",n("b",null,this.cardData.offlineLicense.installations))}render(){return n("div",null,this.renderCloseIcon(),n("div",{class:"content-wrapper",ref:i=>this.contentWrapper=i},this.renderGeneralSection(),this.renderTooltip(),this.renderOnlineLicenseSection(),this.renderOfflineLicenseSection()),n("div",{class:"cta-wrapper"},n("slot",null)))}};o.style=':host{width:100%;font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>div{position:relative;display:grid;width:calc(100% + calc(var(--space-unit) * 2));height:402px;box-sizing:border-box;padding:calc(var(--space-unit) * 2) calc(var(--space-unit) * 3);border:var(--border-size-small) solid var(--color-primary01);margin-left:calc(-1 * var(--space-unit));background:var(--color-surface01);border-radius:0;box-shadow:0 2px 4px 0 rgb(66 69 72 / 35%)}:host>div>z-icon{position:absolute;top:var(--space-unit);right:var(--space-unit);cursor:pointer;fill:var(--color-primary01)}:host>div>div.cta-wrapper{display:flex;flex-flow:column nowrap;align-self:end;justify-content:space-between}:host>div>div.content-wrapper{position:relative;overflow:hidden;align-self:stretch}:host>div>div.content-wrapper>section{box-sizing:border-box;padding:var(--space-unit) 0;border-bottom:var(--border-size-small) solid var(--color-surface04);color:var(--color-surface05);font-size:14px;line-height:20px}:host>div>div.content-wrapper>section:last-child{border-bottom:none}:host>div>div.content-wrapper>section.info-wrapper{position:relative;overflow:hidden;box-sizing:border-box}:host>div>div.content-wrapper>section.info-wrapper.hidden::after{position:absolute;top:0;right:0;bottom:0;left:0;background:linear-gradient(180deg, rgb(255 0 0 / 0%), rgb(255 0 0 / 0%) 60%, white);content:"";pointer-events:none}:host>div>div.content-wrapper>section>span.license-heading{display:flex;justify-content:space-between}:host>div>div.content-wrapper>section>span.license-heading>span.expired{color:var(--color-secondary02);font-size:12px;font-weight:600}:host>div>div.content-wrapper>section>span.license-heading>span.expiring{color:var(--color-warning01);font-size:12px;font-weight:600}:host>div>div.content-wrapper>z-popover{position:absolute;top:0;left:calc(var(--space-unit) * 4)}';export{o as z_myz_card_info}
@@ -0,0 +1 @@
1
+ import{r as t,h as e,c as s,g as i}from"./p-d17ebc2f.js";import{h as l,n as r}from"./p-9f80c0b8.js";import{r as c,d as a,a as o,h as n,e as h}from"./p-16da5460.js";import"./p-d69e14fb.js";const p=class{constructor(e){t(this,e),this.disabled=!1}render(){return e("label",{htmlFor:this.htmlfor,class:{disabled:this.disabled}},this.value)}};p.style="label{display:block;margin:var(--space-unit) 0;color:var(--color-text02);font-family:var(--font-family-sans);font-size:var(--font-size-1);font-weight:var(--font-sb);letter-spacing:0.32px;line-height:1.33;text-align:left;text-transform:uppercase}label.disabled{color:var(--color-disabled02)}";const d=class{constructor(e){t(this,e),this.optionSelect=s(this,"optionSelect",7),this.htmlid=`id-${c()}`,this.ariaLabel="",this.disabled=!1,this.readonly=!1,this.message=!0,this.autocomplete=!1,this.noresultslabel="Nessun risultato",this.isOpen=!1,this.selectedItem=null,this.itemsList=[],this.toggleSelectUl=this.toggleSelectUl.bind(this),this.selectItem=this.selectItem.bind(this),this.handleSelectFocus=this.handleSelectFocus.bind(this)}watchItems(){this.itemsList=this.getInitialItemsArray(),this.selectedItem=this.itemsList.find((t=>t.selected))}async getSelectedItem(){return this.selectedItem}async getValue(){return this.getSelectedValue()}async setValue(t){let e=[];"string"==typeof t?e.push(t):e=t,this.selectedItem=this.itemsList.find((t=>e.includes(t.id)))}emitOptionSelect(){this.optionSelect.emit({id:this.htmlid,selected:this.getSelectedValue()})}componentWillLoad(){this.watchItems()}componentWillRender(){this.filterItems(this.searchString)}getInitialItemsArray(){return"string"==typeof this.items?JSON.parse(this.items):this.items}mapSelectedItemToItemsArray(){return this.getInitialItemsArray().map((t=>{var e;return t.selected=t.id===(null===(e=this.selectedItem)||void 0===e?void 0:e.id),t}))}getSelectedValue(){var t;return null===(t=this.selectedItem)||void 0===t?void 0:t.id}filterItems(t){const e=this.mapSelectedItemToItemsArray();this.itemsList=(null==t?void 0:t.length)?e.filter((e=>e.name.toUpperCase().includes(t.toUpperCase()))).map((e=>{const s=e.name.toUpperCase().indexOf(t.toUpperCase()),i=s+t.length,l=e.name.substring(0,s)+`<strong>${e.name.substring(s,i)}</strong>`+e.name.substring(i,e.name.length);return e.name=l,e})):e}hasAutocomplete(){return!0===a(this.autocomplete)}handleInputChange(t){this.searchString=t.detail.value,this.isOpen||this.toggleSelectUl()}selectItem(t,e){t&&t.disabled||(this.itemsList=this.mapSelectedItemToItemsArray(),this.itemsList=this.itemsList.map((s=>(s.selected=!1,s.id===(null==t?void 0:t.id)&&(s.selected=e),s))),this.selectedItem=this.itemsList.find((t=>t.selected)),this.emitOptionSelect(),this.searchString&&(this.searchString=null))}arrowsSelectNav(t,e){if(![l.ARROW_DOWN,l.ARROW_UP].includes(t.key))return;let s;t.preventDefault(),t.stopPropagation(),this.isOpen||this.toggleSelectUl(),t.key===l.ARROW_DOWN?s=e+1===this.itemsList.length?0:e+1:t.key===l.ARROW_UP&&(s=e<=0?this.itemsList.length-1:e-1),this.focusSelectItem(s)}focusSelectItem(t){const e=this.element.querySelector(`#${this.htmlid}_${t}`);e&&e.focus()}toggleSelectUl(t=!1){this.disabled||this.readonly||(this.isOpen?(document.removeEventListener("click",this.handleSelectFocus),document.removeEventListener("keyup",this.handleSelectFocus),t&&this.element.querySelector(`#${this.htmlid}_input`).focus()):(document.addEventListener("click",this.handleSelectFocus),document.addEventListener("keyup",this.handleSelectFocus)),this.isOpen=!this.isOpen)}handleInputClick(t){t.composedPath().find((t=>t.classList&&t.classList.contains("reset-icon")))?t.stopPropagation():this.toggleSelectUl()}handleSelectFocus(t){if(t instanceof KeyboardEvent&&t.key===l.ESC)return t.stopPropagation(),this.toggleSelectUl(!0);t instanceof KeyboardEvent&&t.key!==l.TAB&&t.key!==l.ENTER||o(h()).find((t=>"z-input"===t.nodeName.toLowerCase()&&t.id===`${this.htmlid}_input`))||this.toggleSelectUl(t instanceof MouseEvent)}scrollToLetter(t){const e=this.itemsList.find((e=>e.name.charAt(0)===t));e&&this.focusSelectItem(this.itemsList.indexOf(e))}renderInput(){return e("z-input",{id:`${this.htmlid}_input`,htmlid:`${this.htmlid}_input`,placeholder:this.placeholder,value:!this.isOpen&&this.selectedItem?this.selectedItem.name.replace(/<[^>]+>/g,""):null,label:this.label,"aria-label":this.ariaLabel,icon:this.isOpen?"caret-up":"caret-down",hasclearicon:this.hasAutocomplete(),message:!1,disabled:this.disabled,readonly:this.readonly||!this.hasAutocomplete()&&this.isOpen,status:this.isOpen?void 0:this.status,autocomplete:"off",onClick:t=>{this.handleInputClick(t)},onKeyUp:t=>{13!==t.keyCode&&t.preventDefault(),n(t,this.toggleSelectUl)},onKeyDown:t=>this.arrowsSelectNav(t,this.selectedItem?this.itemsList.indexOf(this.selectedItem):-1),onInputChange:t=>{this.handleInputChange(t)},onKeyPress:t=>{this.hasAutocomplete()||(t.preventDefault(),this.scrollToLetter(String.fromCharCode(t.keyCode)))}})}renderSelectUl(){var t;return e("div",{class:this.isOpen?"open":"closed",tabindex:"-1"},e("div",{class:"ul-scroll-wrapper",tabindex:"-1"},e("z-list",{role:"listbox",tabindex:this.disabled||this.readonly||!this.isOpen?-1:0,id:this.htmlid,"aria-activedescendant":null===(t=this.selectedItem)||void 0===t?void 0:t.id,"aria-multiselectable":!1,class:{disabled:this.disabled,readonly:this.readonly,filled:!!this.selectedItem,[`input-${this.status}`]:!this.isOpen&&!!this.status}},this.hasGroupItems?this.renderSelectGroupItems():this.renderSelectUlItems())))}renderSelectUlItems(){return this.itemsList.length?this.itemsList.map(((t,s)=>e("z-list-element",{clickable:!t.disabled,disabled:t.disabled,dividerType:r.ELEMENT,role:"option",tabindex:t.disabled||!this.isOpen?-1:0,"aria-selected":!!t.selected,id:`${this.htmlid}_${s}`,onClickItem:()=>this.selectItem(t,!0),onKeyDown:t=>this.arrowsSelectNav(t,s)},e("span",{class:{selected:!!t.selected},innerHTML:t.name})))):this.renderNoSearchResults()}renderSelectGroupItems(){if(!this.itemsList.length)return this.renderNoSearchResults();const t=this.itemsList.reduce(((t,s,i)=>{var l;const{category:c}=s,a=e("z-list-element",{clickable:!s.disabled,disabled:s.disabled,dividerType:r.HEADER,role:"option",tabindex:s.disabled||!this.isOpen?-1:0,"aria-selected":!!s.selected,id:`${this.htmlid}_${i}`,onClickItem:()=>this.selectItem(s,!0),onKeyDown:t=>this.arrowsSelectNav(t,i)},e("span",{class:{selected:!!s.selected},innerHTML:s.name}));return t[c]=null!==(l=t[c])&&void 0!==l?l:[],t[c].push(a),t}),{});return Object.entries(t).map((([t,s])=>e("z-list-group",{"divider-type":r.ELEMENT},e("z-body",{class:"z-list-group-title",level:3,slot:"header-title",variant:"semibold"},t),s.map((t=>t)))))}renderNoSearchResults(){return e("z-list-element",{color:"blue500",class:"no-results"},e("z-icon",{name:"multiply-circle",fill:"blue500"}),this.noresultslabel)}renderMessage(){if(!1!==a(this.message))return e("z-input-message",{message:!0===a(this.message)?void 0:this.message,status:this.status})}render(){return e("div",{class:"select-wrapper"},this.renderInput(),this.renderSelectUl(),this.renderMessage())}get element(){return i(this)}static get watchers(){return{items:["watchItems"]}}};d.style=".sc-z-select-h{display:inline-block;width:inherit;color:var(--color-text02);font-family:var(--font-family-sans);font-size:var(--font-size-3);font-weight:var(--font-rg)}.select-wrapper.sc-z-select>z-input.sc-z-select{width:100%}.select-wrapper.sc-z-select>div.sc-z-select{position:relative}.select-wrapper.sc-z-select>div.closed.sc-z-select{overflow:hidden;height:0}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select{position:absolute;width:100%;box-sizing:border-box;padding:calc(var(--space-unit) * 0.5) var(--space-unit);border:var(--border-size-small) solid var(--gray200);border-top:none;background:var(--color-surface01);outline:none}.select-wrapper.sc-z-select .closed.sc-z-select .ul-scroll-wrapper.sc-z-select{z-index:10}.select-wrapper.sc-z-select .open.sc-z-select .ul-scroll-wrapper.sc-z-select{z-index:20}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select>z-list.sc-z-select{position:relative;overflow:auto;max-height:240px;padding:calc(var(--space-unit) * 0.5);outline:none;scrollbar-color:var(--color-primary01) transparent}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select>z-list.sc-z-select::-webkit-scrollbar{width:10px;background:linear-gradient(to right, transparent 0 3px, var(--gray200) 3px 7px, transparent 7px 10px);border-radius:var(--border-radius)}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select>z-list.sc-z-select::-webkit-scrollbar-track{background-color:transparent}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select>z-list.sc-z-select::-webkit-scrollbar-thumb{width:10px;background-color:var(--color-primary01);border-radius:var(--border-radius)}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select>z-list.sc-z-select::-webkit-scrollbar-thumb:hover{background-color:var(--color-hover-primary)}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select z-list.sc-z-select z-list-element.sc-z-select span.sc-z-select{display:block;padding:0 calc(var(--space-unit) * 1.5)}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select z-list.sc-z-select z-list-element.sc-z-select span.selected.sc-z-select{font-weight:bold}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select .no-results.sc-z-select z-icon.sc-z-select{margin-right:var(--space-unit)}.z-list-group-title.sc-z-select{color:var(--gray800)}";export{p as z_input_label,d as z_select}
@@ -0,0 +1 @@
1
+ import{r as L,h as i,H as t}from"./p-d17ebc2f.js";const o=class{constructor(i){L(this,i)}render(){const L={};return this.width&&(L.width=L["max-width"]=`${this.width}px`),this.height&&(L.height=L["max-height"]=`${this.height}px`),i(t,{style:L,class:{mobile:!!this.mobileLogo}},this.link?i("a",{href:this.link,target:this.targetBlank?"_blank":"_self"},i("img",{alt:this.imageAlt})):i("img",{alt:this.imageAlt}))}};o.style=":host{display:inline-block;width:255px;height:64px;vertical-align:top}img{display:block;width:100%;height:100%;margin:auto;content:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='255px' height='64px' viewBox='0 0 255 64'%3E%3Cg id='Logo/Zanichelli/Centered-(reworked)' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E%3Cg id='Group'%3E%3Cpolygon id='Background' fill='%23E2001A' points='1.70530257e-13 64 254.39 64 254.39 0 1.70530257e-13 0'%3E%3C/polygon%3E%3Cpath d='M233.36,51.3553859 L242.390252,51.3553859 L242.390252,12.6427292 L233.36,12.6427292 L233.36,51.3553859 Z M211.120346,51.3553859 L230.477617,51.3553859 L230.477617,44.5040053 L220.685891,44.5040053 L220.685891,12.6427292 L211.120346,12.6427292 L211.120346,51.3553859 Z M188.880124,51.3553859 L208.23551,51.3553859 L208.23551,44.5040053 L198.445669,44.5040053 L198.445669,12.6427292 L188.880124,12.6427292 L188.880124,51.3553859 Z M165.354444,12.6427292 L165.354444,51.3553859 L185.999058,51.3553859 L185.999058,44.5021204 L175.027425,44.5021204 L175.027425,35.1778343 L185.377062,35.1778343 L185.377062,28.2699086 L175.027425,28.2699086 L175.027425,19.4978796 L185.999058,19.4978796 L185.999058,12.6427292 L165.354444,12.6427292 Z M136.666196,51.3553859 L146.239281,51.3553859 L146.239281,35.1778343 L152.902178,35.1778343 L152.902178,51.3553859 L162.473377,51.3553859 L162.473377,12.6427292 L152.902178,12.6427292 L152.902178,28.2717934 L146.239281,28.2717934 L146.239281,12.6427292 L136.666196,12.6427292 L136.666196,51.3553859 Z M96.064744,51.3553859 L105.098765,51.3553859 L105.098765,12.6427292 L96.064744,12.6427292 L96.064744,51.3553859 Z M53.2364527,36.5160682 L50.6824993,19.7429083 L48.0757704,36.5160682 L53.2364527,36.5160682 Z M65.4935444,51.3553859 L56.2710395,51.3553859 L54.9441146,42.5286966 L47.7101121,42.5286966 L46.3304118,51.3553859 L37.1060221,51.3553859 L45.0053718,12.6427292 L57.5960795,12.6427292 L65.4935444,51.3553859 Z M85.0468382,37.7581755 L76.7969089,12.6427292 L67.3764961,12.6427292 L67.3764961,51.3553859 L75.4040147,51.3553859 L75.4040147,26.132504 L83.5955141,51.3553859 L93.1855622,51.3553859 L93.1855622,12.6427292 L85.0468382,12.6427292 L85.0468382,37.7581755 Z M107.977948,32 C107.977948,34.5200264 107.977948,36.7893695 108.187165,39.1246819 C108.396382,41.4713034 108.818585,43.6878711 109.678071,45.6009801 C111.423429,49.487513 114.932995,52 121.708982,52 C129.508435,52 133.787014,48.4753558 133.787014,38.0220526 L133.787014,37.5640373 L124.937707,37.5640373 L124.922628,38.0050891 C124.894356,38.7571388 124.884931,39.6185091 124.826501,40.4855339 C124.769956,41.3431345 124.66629,42.1875412 124.460843,42.9301668 C124.048064,44.3965696 123.279051,45.3559514 121.708982,45.3559514 C117.743286,45.3559514 117.057205,42.0574875 117.057205,32 C117.057205,21.9425125 117.743286,18.6440486 121.708982,18.6440486 C123.605127,18.6440486 124.547546,20.0030157 124.547546,25.1806616 L124.547546,25.6424465 L133.344077,25.6424465 L133.361041,25.1995099 C133.689003,16.7855998 130.235982,12 121.708982,12 C114.934879,12 111.427199,14.4823297 109.678071,18.3594383 C108.818585,20.265008 108.396382,22.4778061 108.187165,24.830082 C107.977948,27.1710489 107.977948,29.4554707 107.977948,32 L107.977948,32 Z M34.9007634,12.6446141 L34.9007634,20.3196683 L21.6051268,44.5040053 L35.2268401,44.5040053 L35.2268401,51.3553859 L12,51.3553859 L12,43.7915371 L25.2975214,19.4997644 L13.683159,19.4997644 L13.683159,12.6446141 L34.9007634,12.6446141 Z' id='Logotipo-(reworked)' fill='%23FFFFFF'%3E%3C/path%3E%3C/g%3E%3C/g%3E%3C/svg%3E\")}a{display:block;width:100%;height:100%}:host(.mobile){width:31px;height:40px}:host(.mobile) img{content:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='31px' height='40px' viewBox='0 0 31 40'%3E%3Cg id='Symbols' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E%3Cg id='Topbar/Mobile/Logged' transform='translate(-16.000000, -4.000000)'%3E%3Cg id='Group' transform='translate(16.000000, 4.000000)'%3E%3Cpolygon id='Fill-1' fill='%23E2001A' points='0 40 30.625 40 30.625 0 0 0'%3E%3C/polygon%3E%3Cpolygon id='Fill-2' fill='%23FEFEFE' points='8.17111587 6.20689655 23.4311708 6.20689655 23.4311708 11.671267 13.8691261 28.9163861 23.6647727 28.9163861 23.6647727 33.7931034 6.96022727 33.7931034 6.96022727 28.408218 16.522272 11.0831673 8.17111587 11.0831673'%3E%3C/polygon%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E\")}";export{o as z_logo}
@@ -1 +1 @@
1
- import{r as t,c as i,h as e}from"./p-d17ebc2f.js";import{I as s,K as r}from"./p-9f80c0b8.js";import{h as o}from"./p-87fdd14f.js";import"./p-d69e14fb.js";const a=class{constructor(e){t(this,e),this.comboboxChange=i(this,"comboboxChange",7),this.hassearch=!1,this.noresultslabel="Nessun risultato",this.isopen=!1,this.isfixed=!1,this.closesearchtext="Chiudi",this.hascheckall=!1,this.checkalltext="Seleziona tutti",this.uncheckalltext="Deseleziona tutti",this.maxcheckableitems=0,this.renderItemsList=[],this.itemsList=[],this.inputType=s.TEXT,this.toggleComboBox=this.toggleComboBox.bind(this),this.closeFilterItems=this.closeFilterItems.bind(this)}watchItems(){this.itemsList="string"==typeof this.items?JSON.parse(this.items):this.items,this.selectedCounter=this.itemsList.filter((t=>t.checked)).length,this.searchValue?this.filterItems(this.searchValue):this.resetRenderItemsList()}inputCheckListener(t){const i=t.detail.id.replace(`combo-checkbox-${this.inputid}-`,"");if("check-all"===i&&(!this.maxcheckableitems||this.maxcheckableitems>=this.itemsList.length))return this.checkAll(t.detail.checked);this.itemsList=this.itemsList.map((e=>(e.id===i&&(e.checked=t.detail.checked),e))),this.resetRenderItemsList(),this.emitComboboxChange()}emitComboboxChange(){this.comboboxChange.emit({id:this.inputid,items:this.itemsList})}componentWillLoad(){this.watchItems()}componentWillRender(){this.selectedCounter=this.itemsList.filter((t=>t.checked)).length,this.searchValue&&this.filterItems(this.searchValue)}resetRenderItemsList(){const t=[];this.itemsList.forEach((i=>{t.push(Object.assign({},i))})),this.renderItemsList=t}filterItems(t){if(!t)return this.closeFilterItems();this.searchValue=t,this.resetRenderItemsList(),this.renderItemsList=this.renderItemsList.filter((i=>{const e=i.name.toUpperCase().indexOf(t.toUpperCase()),s=e+t.length,r=i.name.substring(0,e)+i.name.substring(e,s).bold()+i.name.substring(s,i.name.length);return i.name=r,e>=0}))}checkAll(t=!0){this.itemsList=this.itemsList.map((i=>Object.assign(Object.assign({},i),{checked:t}))),this.resetRenderItemsList(),this.emitComboboxChange()}closeFilterItems(){this.searchValue="",this.resetRenderItemsList()}toggleComboBox(){this.isopen=!this.isopen}renderHeader(){return e("div",{class:"header",onClick:()=>this.toggleComboBox(),onKeyDown:t=>{t.keyCode===r.SPACE&&t.preventDefault()},onKeyUp:t=>o(t,this.toggleComboBox),role:"button",tabindex:0},e("z-body",{level:3,component:"p"},this.label,e("span",null,this.selectedCounter>0&&` (${this.selectedCounter})`)),e("z-icon",{name:"caret-down",width:18,height:18}))}renderContent(){if(this.isopen)return e("div",{class:"open-combo-data"},this.hassearch&&this.renderSearchInput(),this.hascheckall&&this.renderCheckAll(),this.renderItems())}renderItems(){if(this.isopen)return e("div",{class:this.searchValue&&"search",tabindex:-1},this.renderList(this.renderItemsList),this.searchValue&&this.renderCloseButton())}renderList(t){if(t)return!t.length&&this.searchValue?this.renderNoSearchResults():e("ul",null,t.map(((i,r)=>e("z-myz-list-item",{id:i.id,listitemid:i.id,action:`combo-li-${this.inputid}`,underlined:r!==t.length-1},e("z-input",{type:s.CHECKBOX,checked:i.checked,htmlid:`combo-checkbox-${this.inputid}-${i.id}`,label:i.name,disabled:!i.checked&&this.maxcheckableitems&&this.maxcheckableitems===this.selectedCounter})))))}renderNoSearchResults(){return e("ul",null,e("z-myz-list-item",{id:"no-results",text:this.noresultslabel,listitemid:"no-results",icon:"multiply-circle"}))}renderCloseButton(){return e("div",null,e("a",{onClick:()=>this.closeFilterItems(),onKeyUp:t=>o(t,this.closeFilterItems),role:"button",tabindex:0},this.closesearchtext))}renderSearchInput(){if(this.isopen)return e("z-input",{htmlid:`${this.inputid}_search`,label:this.searchlabel,placeholder:this.searchplaceholder,htmltitle:this.searchtitle,type:this.inputType,value:this.searchValue,message:!1,onInputChange:t=>{if(27===t.detail.keycode)return this.closeFilterItems();this.filterItems(t.detail.value)}})}renderCheckAll(){if(this.searchValue)return;const t=this.selectedCounter===this.itemsList.length;return e("div",{class:"check-all-wrapper"},e("z-input",{type:s.CHECKBOX,checked:t,htmlid:`combo-checkbox-${this.inputid}-check-all`,label:t?this.uncheckalltext:this.checkalltext,disabled:this.maxcheckableitems&&this.maxcheckableitems<this.itemsList.length}))}render(){return e("div",{"data-action":`combo-${this.inputid}`,class:{open:this.isopen,fixed:this.isfixed},id:this.inputid},this.renderHeader(),this.renderContent())}static get watchers(){return{items:["watchItems"]}}};a.style=":host{display:block}:host>div.fixed{position:relative}:host>div>.header{position:relative;z-index:10;display:flex;min-height:42px;align-items:center;justify-content:space-between;padding:0 calc(var(--space-unit) * 2);border:var(--border-size-small) solid var(--bg-grey-700);margin:0;background-color:var(--bg-white);border-radius:var(--border-radius-small);cursor:pointer}:host>div>.header:focus:focus-visible{border:var(--border-size-small) solid var(--blue500);box-shadow:var(--shadow-focus-primary);outline:none}:host>div>.header>z-body{padding:var(--space-unit) 0;margin:0;color:var(--text-grey-800)}:host>div>.header>z-body>span{font-weight:var(--font-sb)}:host>div>.header>z-icon{fill:var(--text-grey-800);transform:rotate(360deg);transition:all 200ms linear}:host>div.open>.header{border:var(--border-size-small) solid var(--blue500);border-radius:var(border-radius-small) var(border-radius-small) 0 0}:host>div.open>.header>z-icon{fill:var(--text-grey-800);transform:rotate(180deg);transition:all 200ms linear}:host>div.open>div.open-combo-data{position:relative;z-index:12;padding:var(--space-unit) calc(var(--space-unit) * 2);border:var(--border-size-small) solid var(--gray200);border-top:0;background-color:var(--bg-white);border-radius:0}:host>div.open>div.open-combo-data>div{overflow:auto;max-height:235px;padding:0;scrollbar-color:var(--myz-blue) var(--gray200);scrollbar-width:thin}:host>div.open>div.open-combo-data>z-input{width:100%;margin-bottom:calc(var(--space-unit) * 2)}:host>div.open>div.open-combo-data>div>ul{max-height:235px;padding:0 3px;margin:0}::-webkit-scrollbar{width:10px;background:linear-gradient(90deg, var(--bg-white) 2px, var(--bg-grey-200) 4px, var(--bg-white) 8px);border-radius:var(--border-radius)}::-webkit-scrollbar-thumb{width:10px;background-color:var(--myz-blue);border-radius:var(--border-radius)}:host>div.open>z-input{position:relative;z-index:1;width:238px;margin:0 calc(var(--space-unit) * 2);color:var(--myz-blue)}:host>div.open>div.open-combo-data>div.search{overflow:hidden;max-height:auto;margin-top:0;box-shadow:1px 1px 4px 2px rgb(217 222 227 / 50%)}:host>div.open>div.open-combo-data>div.search>ul{overflow:auto;max-height:180px;padding:var(--space-unit) calc(var(--space-unit) * 2);scrollbar-color:var(--myz-blue) var(--bg-grey-200);scrollbar-width:thin}:host>div.open>div.open-combo-data>div.search>div{display:flex;justify-content:center}:host>div.open>div.open-combo-data>div.search>div>a{display:inline-block;height:44px;color:var(--myz-blue);cursor:pointer;font-family:var(--dashboard-font);font-size:14px;font-weight:var(--font-sb);line-height:44px;text-align:center;text-transform:uppercase}:host>div.open>div.open-combo-data>div.check-all-wrapper{padding:calc(var(--space-unit) * 2) calc(var(--space-unit) * 0.5);text-align:left}";export{a as z_combobox}
1
+ import{r as t,c as i,h as e}from"./p-d17ebc2f.js";import{I as s,K as r}from"./p-9f80c0b8.js";import{h as o}from"./p-16da5460.js";import"./p-d69e14fb.js";const a=class{constructor(e){t(this,e),this.comboboxChange=i(this,"comboboxChange",7),this.hassearch=!1,this.noresultslabel="Nessun risultato",this.isopen=!1,this.isfixed=!1,this.closesearchtext="Chiudi",this.hascheckall=!1,this.checkalltext="Seleziona tutti",this.uncheckalltext="Deseleziona tutti",this.maxcheckableitems=0,this.renderItemsList=[],this.itemsList=[],this.inputType=s.TEXT,this.toggleComboBox=this.toggleComboBox.bind(this),this.closeFilterItems=this.closeFilterItems.bind(this)}watchItems(){this.itemsList="string"==typeof this.items?JSON.parse(this.items):this.items,this.selectedCounter=this.itemsList.filter((t=>t.checked)).length,this.searchValue?this.filterItems(this.searchValue):this.resetRenderItemsList()}inputCheckListener(t){const i=t.detail.id.replace(`combo-checkbox-${this.inputid}-`,"");if("check-all"===i&&(!this.maxcheckableitems||this.maxcheckableitems>=this.itemsList.length))return this.checkAll(t.detail.checked);this.itemsList=this.itemsList.map((e=>(e.id===i&&(e.checked=t.detail.checked),e))),this.resetRenderItemsList(),this.emitComboboxChange()}emitComboboxChange(){this.comboboxChange.emit({id:this.inputid,items:this.itemsList})}componentWillLoad(){this.watchItems()}componentWillRender(){this.selectedCounter=this.itemsList.filter((t=>t.checked)).length,this.searchValue&&this.filterItems(this.searchValue)}resetRenderItemsList(){const t=[];this.itemsList.forEach((i=>{t.push(Object.assign({},i))})),this.renderItemsList=t}filterItems(t){if(!t)return this.closeFilterItems();this.searchValue=t,this.resetRenderItemsList(),this.renderItemsList=this.renderItemsList.filter((i=>{const e=i.name.toUpperCase().indexOf(t.toUpperCase()),s=e+t.length,r=i.name.substring(0,e)+i.name.substring(e,s).bold()+i.name.substring(s,i.name.length);return i.name=r,e>=0}))}checkAll(t=!0){this.itemsList=this.itemsList.map((i=>Object.assign(Object.assign({},i),{checked:t}))),this.resetRenderItemsList(),this.emitComboboxChange()}closeFilterItems(){this.searchValue="",this.resetRenderItemsList()}toggleComboBox(){this.isopen=!this.isopen}renderHeader(){return e("div",{class:"header",onClick:()=>this.toggleComboBox(),onKeyDown:t=>{t.keyCode===r.SPACE&&t.preventDefault()},onKeyUp:t=>o(t,this.toggleComboBox),role:"button",tabindex:0},e("z-body",{level:3,component:"p"},this.label,e("span",null,this.selectedCounter>0&&` (${this.selectedCounter})`)),e("z-icon",{name:"caret-down",width:18,height:18}))}renderContent(){if(this.isopen)return e("div",{class:"open-combo-data"},this.hassearch&&this.renderSearchInput(),this.hascheckall&&this.renderCheckAll(),this.renderItems())}renderItems(){if(this.isopen)return e("div",{class:this.searchValue&&"search",tabindex:-1},this.renderList(this.renderItemsList),this.searchValue&&this.renderCloseButton())}renderList(t){if(t)return!t.length&&this.searchValue?this.renderNoSearchResults():e("ul",null,t.map(((i,r)=>e("z-myz-list-item",{id:i.id,listitemid:i.id,action:`combo-li-${this.inputid}`,underlined:r!==t.length-1},e("z-input",{type:s.CHECKBOX,checked:i.checked,htmlid:`combo-checkbox-${this.inputid}-${i.id}`,label:i.name,disabled:!i.checked&&this.maxcheckableitems&&this.maxcheckableitems===this.selectedCounter})))))}renderNoSearchResults(){return e("ul",null,e("z-myz-list-item",{id:"no-results",text:this.noresultslabel,listitemid:"no-results",icon:"multiply-circle"}))}renderCloseButton(){return e("div",null,e("a",{onClick:()=>this.closeFilterItems(),onKeyUp:t=>o(t,this.closeFilterItems),role:"button",tabindex:0},this.closesearchtext))}renderSearchInput(){if(this.isopen)return e("z-input",{htmlid:`${this.inputid}_search`,label:this.searchlabel,placeholder:this.searchplaceholder,htmltitle:this.searchtitle,type:this.inputType,value:this.searchValue,message:!1,onInputChange:t=>{if(27===t.detail.keycode)return this.closeFilterItems();this.filterItems(t.detail.value)}})}renderCheckAll(){if(this.searchValue)return;const t=this.selectedCounter===this.itemsList.length;return e("div",{class:"check-all-wrapper"},e("z-input",{type:s.CHECKBOX,checked:t,htmlid:`combo-checkbox-${this.inputid}-check-all`,label:t?this.uncheckalltext:this.checkalltext,disabled:this.maxcheckableitems&&this.maxcheckableitems<this.itemsList.length}))}render(){return e("div",{"data-action":`combo-${this.inputid}`,class:{open:this.isopen,fixed:this.isfixed},id:this.inputid},this.renderHeader(),this.renderContent())}static get watchers(){return{items:["watchItems"]}}};a.style=":host{display:block}:host>div.fixed{position:relative}:host>div>.header{position:relative;z-index:10;display:flex;min-height:42px;align-items:center;justify-content:space-between;padding:0 calc(var(--space-unit) * 2);border:var(--border-size-small) solid var(--bg-grey-700);margin:0;background-color:var(--bg-white);border-radius:var(--border-radius-small);cursor:pointer}:host>div>.header:focus:focus-visible{border:var(--border-size-small) solid var(--blue500);box-shadow:var(--shadow-focus-primary);outline:none}:host>div>.header>z-body{padding:var(--space-unit) 0;margin:0;color:var(--text-grey-800)}:host>div>.header>z-body>span{font-weight:var(--font-sb)}:host>div>.header>z-icon{fill:var(--text-grey-800);transform:rotate(360deg);transition:all 200ms linear}:host>div.open>.header{border:var(--border-size-small) solid var(--blue500);border-radius:var(border-radius-small) var(border-radius-small) 0 0}:host>div.open>.header>z-icon{fill:var(--text-grey-800);transform:rotate(180deg);transition:all 200ms linear}:host>div.open>div.open-combo-data{position:relative;z-index:12;padding:var(--space-unit) calc(var(--space-unit) * 2);border:var(--border-size-small) solid var(--gray200);border-top:0;background-color:var(--bg-white);border-radius:0}:host>div.open>div.open-combo-data>div{overflow:auto;max-height:235px;padding:0;scrollbar-color:var(--myz-blue) var(--gray200);scrollbar-width:thin}:host>div.open>div.open-combo-data>z-input{width:100%;margin-bottom:calc(var(--space-unit) * 2)}:host>div.open>div.open-combo-data>div>ul{max-height:235px;padding:0 3px;margin:0}::-webkit-scrollbar{width:10px;background:linear-gradient(90deg, var(--bg-white) 2px, var(--bg-grey-200) 4px, var(--bg-white) 8px);border-radius:var(--border-radius)}::-webkit-scrollbar-thumb{width:10px;background-color:var(--myz-blue);border-radius:var(--border-radius)}:host>div.open>z-input{position:relative;z-index:1;width:238px;margin:0 calc(var(--space-unit) * 2);color:var(--myz-blue)}:host>div.open>div.open-combo-data>div.search{overflow:hidden;max-height:auto;margin-top:0;box-shadow:1px 1px 4px 2px rgb(217 222 227 / 50%)}:host>div.open>div.open-combo-data>div.search>ul{overflow:auto;max-height:180px;padding:var(--space-unit) calc(var(--space-unit) * 2);scrollbar-color:var(--myz-blue) var(--bg-grey-200);scrollbar-width:thin}:host>div.open>div.open-combo-data>div.search>div{display:flex;justify-content:center}:host>div.open>div.open-combo-data>div.search>div>a{display:inline-block;height:44px;color:var(--myz-blue);cursor:pointer;font-family:var(--dashboard-font);font-size:14px;font-weight:var(--font-sb);line-height:44px;text-align:center;text-transform:uppercase}:host>div.open>div.open-combo-data>div.check-all-wrapper{padding:calc(var(--space-unit) * 2) calc(var(--space-unit) * 0.5);text-align:left}";export{a as z_combobox}
@@ -1 +1 @@
1
- import{r as t,c as o,h as r,g as e}from"./p-d17ebc2f.js";import{P as i,h as s}from"./p-9f80c0b8.js";import{a as n}from"./p-87fdd14f.js";import"./p-d69e14fb.js";const a=document.documentElement;function p(t){return t.parentNode.host?t.parentNode.host:t.parentNode}function h(t,o){const r=t.getBoundingClientRect(),e=r.width,i=r.height;let s,n,a=0,p=0,h=t;for(;h&&h!=o;){if(p+=h.offsetLeft,h===document.body?a+=h.getBoundingClientRect().top+window.scrollY:a+=h.offsetTop,window.DOMMatrix){const t=window.getComputedStyle(h),o=new DOMMatrix(t.transform||t.webkitTransform);o&&(p+=o.m41,h!==document.body&&(a+=o.m42))}if(!h.offsetParent)break;h=h.offsetParent}return h===document.body?(s=window.innerWidth,n=window.innerHeight):(s=h.offsetWidth,n=h.offsetHeight),{top:a,right:s-p-r.width,bottom:n-a-r.height,left:p,width:e,height:i}}const c=class{constructor(r){t(this,r),this.positionChange=o(this,"positionChange",7),this.openChange=o(this,"openChange",7),this.position=i.AUTO,this.open=!1,this.showArrow=!1,this.center=!1,this.closable=!0}closePopoverWithKeyboard(t){this.closable&&t.key===s.ESC&&(this.open=!1)}handleOutsideClick(t){this.closable&&(n(t.target).find((t=>"z-popover"===t.nodeName.toLowerCase()))||(this.open=!1,this.positionChange.emit({position:this.currentPosition})))}validatePosition(t){t&&!Object.values(i).includes(t)&&(this.position=i.AUTO),this.currentPosition=this.position,this.positionChange.emit({position:this.currentPosition})}onOpen(){if(cancelAnimationFrame(this.animationFrameRequestId),this.open){const t=()=>{this.open&&(this.setPosition(),this.animationFrameRequestId=requestAnimationFrame(t))};t()}else this.host.hasAttribute("current-position")&&(this.host.removeAttribute("current-position"),this.currentPosition=void 0);this.openChange.emit({open:this.open})}disconnectedCallback(){cancelAnimationFrame(this.animationFrameRequestId)}setPosition(){let t;if(t="string"==typeof this.bindTo?this.host.ownerDocument.querySelector(this.bindTo):this.bindTo?this.bindTo:this.host.parentElement,!t)return;const o=function(t){let o=p(t);for(;o&&o!==a;){const{overflow:t,overflowX:r,overflowY:e}=window.getComputedStyle(o);if("hidden"===t||"hidden"===e||"hidden"===r)return o;if(o.scrollHeight>o.clientHeight&&"visible"!==t&&"visible"!==e||o.scrollWidth>o.clientWidth&&"visible"!==t&&"visible"!==r)return o;o=p(o)}return a}(t),r=o.getBoundingClientRect(),e=this.host.offsetParent,s=e?h(e,o):{top:0,right:0,bottom:0,left:0},n=h(t,o),c=n.top-o.scrollTop,f=r.height-(n.top+n.height)+o.scrollTop,u=n.left-o.scrollLeft,l=r.width-(n.left+n.width)+o.scrollLeft,d=Math.max(0,r.top+r.height-window.innerHeight),b=Math.max(0,r.left+r.width-window.innerWidth),v=Math.min(c,c+r.top),w=Math.min(f,f-d),m=Math.min(u,u+r.left),g=Math.min(l,l-b),x=v+w+n.height,$=m+g+n.width;let z=this.currentPosition;const y=[];this.position===i.AUTO&&(m/$>.6?y.push(i.LEFT):m/$<.4&&y.push(i.RIGHT),v/x>.9?y.unshift(i.TOP):v/x>.6?y.push(i.TOP):v/x<.1?y.unshift(i.BOTTOM):y.push(i.BOTTOM),z=y.join("_"));const _=this.host.style;_.position="absolute";const M=n.top-s.top,j=n.right-s.right,k=n.bottom-s.bottom,O=n.left-s.left,P=this.center?.5:0,C=this.center?.5:0;z===i.TOP||z===i.TOP_RIGHT?(_.top="auto",_.right="auto",_.bottom=`${k+n.height}px`,_.left=`${O+n.width*P}px`,_.maxHeight=`${v}px`,z===i.TOP_RIGHT&&(_.maxWidth=`${g+n.width*C}px`)):z===i.TOP_LEFT?(_.top="auto",_.right=`${j+n.width*P}px`,_.bottom=`${k+n.height}px`,_.left="auto",_.maxWidth=`${m}px`,_.maxHeight=`${v}px`):z===i.BOTTOM||z===i.BOTTOM_RIGHT?(_.top=`${M+n.height}px`,_.right="auto",_.bottom="auto",_.left=`${O+n.width*P}px`,_.maxHeight=`${w}px`,z===i.BOTTOM_RIGHT&&(_.maxWidth=`${g+n.width*C}px`)):z===i.BOTTOM_LEFT?(_.top=`${M+n.height}px`,_.right=`${j+n.width*P}px`,_.bottom="auto",_.left="auto",_.maxWidth=`${m}px`,_.maxHeight=`${w}px`):z===i.RIGHT||z===i.RIGHT_BOTTOM?(_.top=`${M+n.height*P}px`,_.right="auto",_.bottom="auto",_.left=`${O+n.width}px`,_.maxWidth=`${g}px`,_.maxHeight=`${w+n.height*C}px`):z===i.RIGHT_TOP?(_.top="auto",_.right="auto",_.bottom=`${k+n.height*P}px`,_.left=`${O+n.width}px`,_.maxWidth=`${g}px`,_.maxHeight=`${v+n.height*C}px`):z===i.LEFT||z===i.LEFT_BOTTOM?(_.top=`${M+n.height*P}px`,_.right=`${j+n.width}px`,_.bottom="auto",_.left="auto",_.maxWidth=`${m}px`,_.maxHeight=`${w+n.height*C}px`):z===i.LEFT_TOP&&(_.top="auto",_.right=`${j+n.width}px`,_.bottom=`${k+n.height*P}px`,_.left="auto",_.maxWidth=`${m}px`,_.maxHeight=`${v+n.height*C}px`),this.currentPosition=z||this.position,this.host.setAttribute("current-position",this.currentPosition)}componentWillLoad(){this.validatePosition(this.position),this.onOpen()}render(){return r("slot",null)}get host(){return e(this)}static get watchers(){return{position:["validatePosition"],open:["onOpen"]}}};c.style=':host{--z-popover-theme--surface:var(--color-surface01);--z-popover-theme--text:var(--color-text01);--z-popover-padding:0;--z-popover-shadow-filter:drop-shadow(0 1px 2px var(--shadow-color-base));position:relative;display:none;min-width:calc(var(--space-unit) * 8);min-height:calc(var(--space-unit) * 4);align-items:center;justify-content:center;padding:var(--z-popover-padding);background:var(--z-popover-theme--surface);border-radius:var(--border-radius-small);color:var(--z-popover-theme--text);fill:currentcolor;filter:var(--z-popover-shadow-filter);font-family:var(--font-family-sans);text-align:center}:host([open][current-position]),:host([open="true"][current-position]){display:flex}:host([center][current-position="top"]),:host([center][current-position="bottom"]){transform:translateX(-50%)}:host([center][current-position="right"]),:host([center][current-position="left"]){transform:translateY(-50%)}:host([current-position^="top"]){margin:0 0 var(--space-unit)}:host([current-position^="bottom"]){margin:var(--space-unit) 0 0}:host([current-position^="left"]){margin:0 var(--space-unit) 0 0}:host([current-position^="right"]){margin:0 0 0 var(--space-unit)}:host([current-position])::before{--arrow-size:6px;--arrow-edge-offset:calc(100% - var(--space-unit) - (var(--arrow-size) / 2));--arrow-center-x-offset:calc(50% - (var(--arrow-size) / 2));--arrow-center-y-offset:calc(100% - (var(--arrow-size) / 2));position:absolute;display:block;width:var(--arrow-size);height:var(--arrow-size);background:var(--z-popover-theme--surface);content:"";transform:rotate(45deg)}:host([show-arrow="false"])::before,:host(:not([show-arrow]))::before{display:none}:host([current-position^="top"])::before{top:var(--arrow-center-y-offset)}:host([current-position^="bottom"])::before{bottom:var(--arrow-center-y-offset)}:host([current-position="top"])::before,:host([current-position="bottom"])::before{right:var(--arrow-edge-offset)}:host([current-position="right"])::before,:host([current-position="left"])::before{bottom:var(--arrow-edge-offset)}:host([current-position="right"])::before{right:var(--arrow-center-y-offset)}:host([current-position="left"])::before{left:var(--arrow-center-y-offset)}:host([current-position="top_right"])::before,:host([current-position="bottom_right"])::before{right:var(--arrow-edge-offset)}:host([current-position="top_left"])::before,:host([current-position="bottom_left"])::before{left:var(--arrow-edge-offset)}:host([current-position="right_top"])::before,:host([current-position="left_top"])::before{top:var(--arrow-edge-offset)}:host([current-position="right_top"])::before,:host([current-position="right_bottom"])::before{right:var(--arrow-center-y-offset)}:host([current-position="left_top"])::before,:host([current-position="left_bottom"])::before{left:var(--arrow-center-y-offset)}:host([current-position="right_bottom"])::before,:host([current-position="left_bottom"])::before{bottom:var(--arrow-edge-offset)}:host([center][current-position="top"])::before,:host([center][current-position="bottom"])::before{right:auto;left:var(--arrow-center-x-offset)}:host([center][current-position="right"])::before,:host([center][current-position="left"])::before{top:var(--arrow-center-x-offset);bottom:auto}::slotted(*){overflow:auto;flex:1 auto}';export{c as z_popover}
1
+ import{r as t,c as o,h as r,g as e}from"./p-d17ebc2f.js";import{P as i,h as s}from"./p-9f80c0b8.js";import{a as n}from"./p-16da5460.js";import"./p-d69e14fb.js";const a=document.documentElement;function p(t){return t.parentNode.host?t.parentNode.host:t.parentNode}function h(t,o){const r=t.getBoundingClientRect(),e=r.width,i=r.height;let s,n,a=0,p=0,h=t;for(;h&&h!=o;){if(p+=h.offsetLeft,h===document.body?a+=h.getBoundingClientRect().top+window.scrollY:a+=h.offsetTop,window.DOMMatrix){const t=window.getComputedStyle(h),o=new DOMMatrix(t.transform||t.webkitTransform);o&&(p+=o.m41,h!==document.body&&(a+=o.m42))}if(!h.offsetParent)break;h=h.offsetParent}return h===document.body?(s=window.innerWidth,n=window.innerHeight):(s=h.offsetWidth,n=h.offsetHeight),{top:a,right:s-p-r.width,bottom:n-a-r.height,left:p,width:e,height:i}}const c=class{constructor(r){t(this,r),this.positionChange=o(this,"positionChange",7),this.openChange=o(this,"openChange",7),this.position=i.AUTO,this.open=!1,this.showArrow=!1,this.center=!1,this.closable=!0}closePopoverWithKeyboard(t){this.closable&&t.key===s.ESC&&(this.open=!1)}handleOutsideClick(t){this.closable&&(n(t.target).find((t=>"z-popover"===t.nodeName.toLowerCase()))||(this.open=!1,this.positionChange.emit({position:this.currentPosition})))}validatePosition(t){t&&!Object.values(i).includes(t)&&(this.position=i.AUTO),this.currentPosition=this.position,this.positionChange.emit({position:this.currentPosition})}onOpen(){if(cancelAnimationFrame(this.animationFrameRequestId),this.open){const t=()=>{this.open&&(this.setPosition(),this.animationFrameRequestId=requestAnimationFrame(t))};t()}else this.host.hasAttribute("current-position")&&(this.host.removeAttribute("current-position"),this.currentPosition=void 0);this.openChange.emit({open:this.open})}disconnectedCallback(){cancelAnimationFrame(this.animationFrameRequestId)}setPosition(){let t;if(t="string"==typeof this.bindTo?this.host.ownerDocument.querySelector(this.bindTo):this.bindTo?this.bindTo:this.host.parentElement,!t)return;const o=function(t){let o=p(t);for(;o&&o!==a;){const{overflow:t,overflowX:r,overflowY:e}=window.getComputedStyle(o);if("hidden"===t||"hidden"===e||"hidden"===r)return o;if(o.scrollHeight>o.clientHeight&&"visible"!==t&&"visible"!==e||o.scrollWidth>o.clientWidth&&"visible"!==t&&"visible"!==r)return o;o=p(o)}return a}(t),r=o.getBoundingClientRect(),e=this.host.offsetParent,s=e?h(e,o):{top:0,right:0,bottom:0,left:0},n=h(t,o),c=n.top-o.scrollTop,f=r.height-(n.top+n.height)+o.scrollTop,u=n.left-o.scrollLeft,l=r.width-(n.left+n.width)+o.scrollLeft,d=Math.max(0,r.top+r.height-window.innerHeight),b=Math.max(0,r.left+r.width-window.innerWidth),v=Math.min(c,c+r.top),w=Math.min(f,f-d),m=Math.min(u,u+r.left),g=Math.min(l,l-b),x=v+w+n.height,$=m+g+n.width;let z=this.currentPosition;const y=[];this.position===i.AUTO&&(m/$>.6?y.push(i.LEFT):m/$<.4&&y.push(i.RIGHT),v/x>.9?y.unshift(i.TOP):v/x>.6?y.push(i.TOP):v/x<.1?y.unshift(i.BOTTOM):y.push(i.BOTTOM),z=y.join("_"));const _=this.host.style;_.position="absolute";const M=n.top-s.top,j=n.right-s.right,k=n.bottom-s.bottom,O=n.left-s.left,P=this.center?.5:0,C=this.center?.5:0;z===i.TOP||z===i.TOP_RIGHT?(_.top="auto",_.right="auto",_.bottom=`${k+n.height}px`,_.left=`${O+n.width*P}px`,_.maxHeight=`${v}px`,z===i.TOP_RIGHT&&(_.maxWidth=`${g+n.width*C}px`)):z===i.TOP_LEFT?(_.top="auto",_.right=`${j+n.width*P}px`,_.bottom=`${k+n.height}px`,_.left="auto",_.maxWidth=`${m}px`,_.maxHeight=`${v}px`):z===i.BOTTOM||z===i.BOTTOM_RIGHT?(_.top=`${M+n.height}px`,_.right="auto",_.bottom="auto",_.left=`${O+n.width*P}px`,_.maxHeight=`${w}px`,z===i.BOTTOM_RIGHT&&(_.maxWidth=`${g+n.width*C}px`)):z===i.BOTTOM_LEFT?(_.top=`${M+n.height}px`,_.right=`${j+n.width*P}px`,_.bottom="auto",_.left="auto",_.maxWidth=`${m}px`,_.maxHeight=`${w}px`):z===i.RIGHT||z===i.RIGHT_BOTTOM?(_.top=`${M+n.height*P}px`,_.right="auto",_.bottom="auto",_.left=`${O+n.width}px`,_.maxWidth=`${g}px`,_.maxHeight=`${w+n.height*C}px`):z===i.RIGHT_TOP?(_.top="auto",_.right="auto",_.bottom=`${k+n.height*P}px`,_.left=`${O+n.width}px`,_.maxWidth=`${g}px`,_.maxHeight=`${v+n.height*C}px`):z===i.LEFT||z===i.LEFT_BOTTOM?(_.top=`${M+n.height*P}px`,_.right=`${j+n.width}px`,_.bottom="auto",_.left="auto",_.maxWidth=`${m}px`,_.maxHeight=`${w+n.height*C}px`):z===i.LEFT_TOP&&(_.top="auto",_.right=`${j+n.width}px`,_.bottom=`${k+n.height*P}px`,_.left="auto",_.maxWidth=`${m}px`,_.maxHeight=`${v+n.height*C}px`),this.currentPosition=z||this.position,this.host.setAttribute("current-position",this.currentPosition)}componentWillLoad(){this.validatePosition(this.position),this.onOpen()}render(){return r("slot",null)}get host(){return e(this)}static get watchers(){return{position:["validatePosition"],open:["onOpen"]}}};c.style=':host{--z-popover-theme--surface:var(--color-surface01);--z-popover-theme--text:var(--color-text01);--z-popover-padding:0;--z-popover-shadow-filter:drop-shadow(0 1px 2px var(--shadow-color-base));position:relative;display:none;min-width:calc(var(--space-unit) * 8);min-height:calc(var(--space-unit) * 4);align-items:center;justify-content:center;padding:var(--z-popover-padding);background:var(--z-popover-theme--surface);border-radius:var(--border-radius-small);color:var(--z-popover-theme--text);fill:currentcolor;filter:var(--z-popover-shadow-filter);font-family:var(--font-family-sans);text-align:center}:host([open][current-position]),:host([open="true"][current-position]){display:flex}:host([center][current-position="top"]),:host([center][current-position="bottom"]){transform:translateX(-50%)}:host([center][current-position="right"]),:host([center][current-position="left"]){transform:translateY(-50%)}:host([current-position^="top"]){margin:0 0 var(--space-unit)}:host([current-position^="bottom"]){margin:var(--space-unit) 0 0}:host([current-position^="left"]){margin:0 var(--space-unit) 0 0}:host([current-position^="right"]){margin:0 0 0 var(--space-unit)}:host([current-position])::before{--arrow-size:6px;--arrow-edge-offset:calc(100% - var(--space-unit) - (var(--arrow-size) / 2));--arrow-center-x-offset:calc(50% - (var(--arrow-size) / 2));--arrow-center-y-offset:calc(100% - (var(--arrow-size) / 2));position:absolute;display:block;width:var(--arrow-size);height:var(--arrow-size);background:var(--z-popover-theme--surface);content:"";transform:rotate(45deg)}:host([show-arrow="false"])::before,:host(:not([show-arrow]))::before{display:none}:host([current-position^="top"])::before{top:var(--arrow-center-y-offset)}:host([current-position^="bottom"])::before{bottom:var(--arrow-center-y-offset)}:host([current-position="top"])::before,:host([current-position="bottom"])::before{right:var(--arrow-edge-offset)}:host([current-position="right"])::before,:host([current-position="left"])::before{bottom:var(--arrow-edge-offset)}:host([current-position="right"])::before{right:var(--arrow-center-y-offset)}:host([current-position="left"])::before{left:var(--arrow-center-y-offset)}:host([current-position="top_right"])::before,:host([current-position="bottom_right"])::before{right:var(--arrow-edge-offset)}:host([current-position="top_left"])::before,:host([current-position="bottom_left"])::before{left:var(--arrow-edge-offset)}:host([current-position="right_top"])::before,:host([current-position="left_top"])::before{top:var(--arrow-edge-offset)}:host([current-position="right_top"])::before,:host([current-position="right_bottom"])::before{right:var(--arrow-center-y-offset)}:host([current-position="left_top"])::before,:host([current-position="left_bottom"])::before{left:var(--arrow-center-y-offset)}:host([current-position="right_bottom"])::before,:host([current-position="left_bottom"])::before{bottom:var(--arrow-edge-offset)}:host([center][current-position="top"])::before,:host([center][current-position="bottom"])::before{right:auto;left:var(--arrow-center-x-offset)}:host([center][current-position="right"])::before,:host([center][current-position="left"])::before{top:var(--arrow-center-x-offset);bottom:auto}::slotted(*){overflow:auto;flex:1 auto}';export{c as z_popover}
@@ -0,0 +1 @@
1
+ import{r as i,h as r,H as d}from"./p-d17ebc2f.js";import{D as e,i as s}from"./p-9f80c0b8.js";const v=class{constructor(r){i(this,r),this.size=e.SMALL,this.color="gray200",this.orientation=s.HORIZONTAL}render(){return r(d,{class:`divider-${this.size} divider-${this.orientation}`,style:{backgroundColor:`var(--${this.color})`}})}};v.style=".sc-z-divider-h{display:block;padding:0;margin:0}.divider-horizontal.sc-z-divider-h{width:100%}.divider-vertical.sc-z-divider-h{height:100%}.divider-small.divider-horizontal.sc-z-divider-h{height:var(--border-size-small)}.divider-medium.divider-horizontal.sc-z-divider-h{height:var(--border-size-medium)}.divider-large.divider-horizontal.sc-z-divider-h{height:var(--border-size-large)}.divider-small.divider-vertical.sc-z-divider-h{width:var(--border-size-small)}.divider-medium.divider-vertical.sc-z-divider-h{width:var(--border-size-medium)}.divider-large.divider-vertical.sc-z-divider-h{width:var(--border-size-large)}";export{v as z_divider}
@@ -0,0 +1 @@
1
+ import{r as i,h as t,H as n}from"./p-d17ebc2f.js";import{T as e,i as a}from"./p-9f80c0b8.js";import{m as s}from"./p-d69e14fb.js";const o=class{constructor(t){i(this,t),this.theme=e.DARK,this.topbarLinks=[]}handleResize(){this.isMobile=window.innerWidth<=s}componentWillLoad(){this.isMobile=window.screen.width<=s||window.innerWidth<=s}componentWillRender(){this.topbarContent&&(this.topbarLinks="string"==typeof this.topbarContent?JSON.parse(this.topbarContent):this.topbarContent)}renderTopbarLinks(){return this.topbarLinks.map((i=>t("z-link",{htmlid:i.id,textcolor:this.theme===e.LIGHT?"black":"white",href:i.link,target:i.target,icon:this.isMobile?i.icon:void 0},!this.isMobile&&i.label)))}render(){return t(n,{class:{[this.theme]:!0,"limited-width":!!this.contentMaxWidth}},t("div",{id:"content-container",style:this.contentMaxWidth?{"--mw":`${this.contentMaxWidth}px`}:{}},t("div",{id:"left-panel",class:"content-panel"},t("z-logo",{mobileLogo:this.isMobile,width:this.isMobile?32:128,height:this.isMobile?40:32,imageAlt:"zanichelli-logo",link:this.logoLink,targetBlank:!0}),this.isMobile&&this.renderTopbarLinks()),t("div",{id:"right-panel",class:"content-panel"},!this.isMobile&&this.renderTopbarLinks(),this.showAppSwitcher&&t("z-app-switcher",{theme:this.theme}),t("div",{id:"divider-container"},t("z-divider",{orientation:a.VERTICAL,color:this.theme===e.LIGHT?"gray800":"color-white"})),t("slot",{name:"login"}))))}};o.style=":host{position:sticky;z-index:99;top:0;display:block;height:calc(var(--space-unit) * 6);box-sizing:border-box;padding:calc(var(--space-unit) / 2) calc(var(--space-unit) * 2);background-color:var(--gray900);border-radius:var(--border-no-radius)}:host(.light){background-color:var(--color-white)}:host>div{display:flex;align-items:center;justify-content:space-between}:host(.limited-width) #content-container{--mw:none;max-width:var(--mw);margin:auto}.content-panel{display:flex;align-items:center}.content-panel>:not(:last-child){margin-right:calc(var(--space-unit) * 2)}#divider-container{display:none}z-link{font-family:var(--font-family-sans);font-size:14px;font-weight:var(--font-sb);letter-spacing:0.3px;line-height:20px}@media only screen and (min-width: 768px){:host{padding:var(--space-unit) calc(var(--space-unit) * 2) var(--space-unit) var(--space-unit)}:host(.limited-width){padding:var(--space-unit)}#divider-container{display:block;height:calc(var(--space-unit) * 3)}}";export{o as z_app_topbar}
@@ -1 +1 @@
1
- import{r as t,c as i,h as s}from"./p-d17ebc2f.js";import{h as e}from"./p-87fdd14f.js";import"./p-9f80c0b8.js";import"./p-d69e14fb.js";const a=class{constructor(s){t(this,s),this.zListItemLinkClick=i(this,"zListItemLinkClick",7),this.zListItemClick=i(this,"zListItemClick",7),this.linktarget="_self",this.underlined=!0,this.emitZListItemLinkClick=this.emitZListItemLinkClick.bind(this),this.emitZListItemClick=this.emitZListItemClick.bind(this)}emitZListItemLinkClick(t,i){this.zListItemLinkClick.emit({e:t,linkId:i})}emitZListItemClick(t,i){this.zListItemClick.emit({e:t,listitemid:i})}render(){const t=this.listitemid?`link_${this.listitemid}`:"";return s("li",{role:"button",id:this.listitemid,"data-action":this.action,onClick:t=>this.emitZListItemClick(t,this.listitemid),onKeyPress:t=>e(t,this.emitZListItemClick,this.listitemid)},s("span",{class:this.underlined&&"border"},this.icon&&s("z-icon",{name:this.icon}),this.link?s("a",{href:this.link?this.link:null,target:this.linktarget,id:t,onClick:i=>this.emitZListItemLinkClick(i,t),onKeyPress:i=>e(i,this.emitZListItemLinkClick,t),role:this.link?"link":"button",tabindex:"0"},this.text):s("span",{innerHTML:this.text}),s("slot",null)))}};a.style=":host li{all:unset;all:reset;width:100%;line-height:14px;list-style-type:none}:host li>span{display:flex;padding:calc(var(--space-unit) * 2) 0;color:var(--text-grey-800);fill:var(--text-grey-800);font-family:var(--dashboard-font);font-size:16px;font-weight:var(--font-rg);letter-spacing:0.23px;line-height:14px}:host li>span.border{border-bottom:2px solid var(--bg-grey-200)}:host li span:hover,a:hover{color:var(--myz-blue);fill:var(--myz-blue)}a,a:visited,a:active{color:inherit;fill:inherit;text-decoration:none}:host li span z-icon{width:calc(var(--space-unit) * 2);height:calc(var(--space-unit) * 2);padding:0 calc(var(--space-unit) * 1.5) 0 0;background-repeat:no-repeat;background-size:contain;color:var(--myz-blue);fill:var(--myz-blue)}";export{a as z_myz_list_item}
1
+ import{r as t,c as i,h as s}from"./p-d17ebc2f.js";import{h as e}from"./p-16da5460.js";import"./p-9f80c0b8.js";import"./p-d69e14fb.js";const a=class{constructor(s){t(this,s),this.zListItemLinkClick=i(this,"zListItemLinkClick",7),this.zListItemClick=i(this,"zListItemClick",7),this.linktarget="_self",this.underlined=!0,this.emitZListItemLinkClick=this.emitZListItemLinkClick.bind(this),this.emitZListItemClick=this.emitZListItemClick.bind(this)}emitZListItemLinkClick(t,i){this.zListItemLinkClick.emit({e:t,linkId:i})}emitZListItemClick(t,i){this.zListItemClick.emit({e:t,listitemid:i})}render(){const t=this.listitemid?`link_${this.listitemid}`:"";return s("li",{role:"button",id:this.listitemid,"data-action":this.action,onClick:t=>this.emitZListItemClick(t,this.listitemid),onKeyPress:t=>e(t,this.emitZListItemClick,this.listitemid)},s("span",{class:this.underlined&&"border"},this.icon&&s("z-icon",{name:this.icon}),this.link?s("a",{href:this.link?this.link:null,target:this.linktarget,id:t,onClick:i=>this.emitZListItemLinkClick(i,t),onKeyPress:i=>e(i,this.emitZListItemLinkClick,t),role:this.link?"link":"button",tabindex:"0"},this.text):s("span",{innerHTML:this.text}),s("slot",null)))}};a.style=":host li{all:unset;all:reset;width:100%;line-height:14px;list-style-type:none}:host li>span{display:flex;padding:calc(var(--space-unit) * 2) 0;color:var(--text-grey-800);fill:var(--text-grey-800);font-family:var(--dashboard-font);font-size:16px;font-weight:var(--font-rg);letter-spacing:0.23px;line-height:14px}:host li>span.border{border-bottom:2px solid var(--bg-grey-200)}:host li span:hover,a:hover{color:var(--myz-blue);fill:var(--myz-blue)}a,a:visited,a:active{color:inherit;fill:inherit;text-decoration:none}:host li span z-icon{width:calc(var(--space-unit) * 2);height:calc(var(--space-unit) * 2);padding:0 calc(var(--space-unit) * 1.5) 0 0;background-repeat:no-repeat;background-size:contain;color:var(--myz-blue);fill:var(--myz-blue)}";export{a as z_myz_list_item}