@zanichelli/albe-web-components 13.1.3 → 13.2.0-rc1

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 (119) hide show
  1. package/CHANGELOG.md +0 -13
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/web-components-library.cjs.js +1 -1
  4. package/dist/cjs/z-app-header_12.cjs.entry.js +12 -6
  5. package/dist/cjs/z-app-header_12.cjs.entry.js.map +1 -1
  6. package/dist/cjs/z-carousel.cjs.entry.js +2 -3
  7. package/dist/cjs/z-carousel.cjs.entry.js.map +1 -1
  8. package/dist/cjs/z-combobox.cjs.entry.js +145 -38
  9. package/dist/cjs/z-combobox.cjs.entry.js.map +1 -1
  10. package/dist/cjs/z-file-upload.cjs.entry.js +14 -25
  11. package/dist/cjs/z-file-upload.cjs.entry.js.map +1 -1
  12. package/dist/cjs/z-popover.cjs.entry.js +3 -3
  13. package/dist/cjs/z-popover.cjs.entry.js.map +1 -1
  14. package/dist/cjs/z-table.cjs.entry.js +2 -3
  15. package/dist/cjs/z-table.cjs.entry.js.map +1 -1
  16. package/dist/collection/components/file-upload/z-file-upload/index.js +13 -63
  17. package/dist/collection/components/file-upload/z-file-upload/index.js.map +1 -1
  18. package/dist/collection/components/file-upload/z-file-upload/styles.css +0 -12
  19. package/dist/collection/components/inputs/z-combobox/index.js +149 -41
  20. package/dist/collection/components/inputs/z-combobox/index.js.map +1 -1
  21. package/dist/collection/components/inputs/z-combobox/index.spec.js +185 -155
  22. package/dist/collection/components/inputs/z-combobox/index.spec.js.map +1 -1
  23. package/dist/collection/components/inputs/z-combobox/styles.css +10 -10
  24. package/dist/collection/components/inputs/z-input/index.js +41 -5
  25. package/dist/collection/components/inputs/z-input/index.js.map +1 -1
  26. package/dist/collection/components/list/z-list-element/index.js +20 -1
  27. package/dist/collection/components/list/z-list-element/index.js.map +1 -1
  28. package/dist/collection/components/table/z-table/index.js +2 -3
  29. package/dist/collection/components/table/z-table/index.js.map +1 -1
  30. package/dist/collection/components/z-carousel/index.js +1 -3
  31. package/dist/collection/components/z-carousel/index.js.map +1 -1
  32. package/dist/collection/components/z-carousel/styles.css +0 -3
  33. package/dist/collection/components/z-popover/index.js +4 -4
  34. package/dist/collection/components/z-popover/index.js.map +1 -1
  35. package/dist/components/index10.js +11 -5
  36. package/dist/components/index10.js.map +1 -1
  37. package/dist/components/index13.js +3 -1
  38. package/dist/components/index13.js.map +1 -1
  39. package/dist/components/index25.js +3 -3
  40. package/dist/components/index25.js.map +1 -1
  41. package/dist/components/z-carousel.js +2 -3
  42. package/dist/components/z-carousel.js.map +1 -1
  43. package/dist/components/z-combobox.js +163 -49
  44. package/dist/components/z-combobox.js.map +1 -1
  45. package/dist/components/z-file-upload.js +15 -28
  46. package/dist/components/z-file-upload.js.map +1 -1
  47. package/dist/components/z-table.js +2 -3
  48. package/dist/components/z-table.js.map +1 -1
  49. package/dist/esm/loader.js +1 -1
  50. package/dist/esm/web-components-library.js +1 -1
  51. package/dist/esm/z-app-header_12.entry.js +12 -6
  52. package/dist/esm/z-app-header_12.entry.js.map +1 -1
  53. package/dist/esm/z-carousel.entry.js +2 -3
  54. package/dist/esm/z-carousel.entry.js.map +1 -1
  55. package/dist/esm/z-combobox.entry.js +147 -40
  56. package/dist/esm/z-combobox.entry.js.map +1 -1
  57. package/dist/esm/z-file-upload.entry.js +14 -25
  58. package/dist/esm/z-file-upload.entry.js.map +1 -1
  59. package/dist/esm/z-popover.entry.js +3 -3
  60. package/dist/esm/z-popover.entry.js.map +1 -1
  61. package/dist/esm/z-table.entry.js +2 -3
  62. package/dist/esm/z-table.entry.js.map +1 -1
  63. package/dist/types/components/file-upload/z-file-upload/index.d.ts +0 -5
  64. package/dist/types/components/inputs/z-combobox/index.d.ts +14 -1
  65. package/dist/types/components/inputs/z-input/index.d.ts +5 -0
  66. package/dist/types/components/list/z-list-element/index.d.ts +2 -0
  67. package/dist/types/components/z-carousel/index.d.ts +0 -1
  68. package/dist/types/components/z-popover/index.d.ts +0 -1
  69. package/dist/types/components.d.ts +23 -18
  70. package/dist/web-components-library/{p-3796ca7c.entry.js → p-158b6dda.entry.js} +2 -2
  71. package/dist/web-components-library/p-158b6dda.entry.js.map +1 -0
  72. package/dist/web-components-library/{p-f7607ce7.entry.js → p-2637ab23.entry.js} +2 -2
  73. package/dist/web-components-library/p-2637ab23.entry.js.map +1 -0
  74. package/{www/build/p-91a7c5a9.entry.js → dist/web-components-library/p-2b2cb566.entry.js} +2 -2
  75. package/dist/web-components-library/p-2b2cb566.entry.js.map +1 -0
  76. package/dist/web-components-library/p-2df884ef.entry.js +2 -0
  77. package/dist/web-components-library/p-2df884ef.entry.js.map +1 -0
  78. package/dist/web-components-library/p-5023f7d5.entry.js +2 -0
  79. package/dist/web-components-library/p-5023f7d5.entry.js.map +1 -0
  80. package/dist/web-components-library/p-93cb103f.entry.js +2 -0
  81. package/dist/web-components-library/p-93cb103f.entry.js.map +1 -0
  82. package/dist/web-components-library/web-components-library.esm.js +1 -1
  83. package/dist/web-components-library/web-components-library.esm.js.map +1 -1
  84. package/package.json +1 -1
  85. package/www/build/{p-3796ca7c.entry.js → p-158b6dda.entry.js} +2 -2
  86. package/www/build/p-158b6dda.entry.js.map +1 -0
  87. package/www/build/{p-f7607ce7.entry.js → p-2637ab23.entry.js} +2 -2
  88. package/www/build/p-2637ab23.entry.js.map +1 -0
  89. package/{dist/web-components-library/p-91a7c5a9.entry.js → www/build/p-2b2cb566.entry.js} +2 -2
  90. package/www/build/p-2b2cb566.entry.js.map +1 -0
  91. package/www/build/p-2df884ef.entry.js +2 -0
  92. package/www/build/p-2df884ef.entry.js.map +1 -0
  93. package/www/build/p-32cd9d9b.js +2 -0
  94. package/www/build/p-5023f7d5.entry.js +2 -0
  95. package/www/build/p-5023f7d5.entry.js.map +1 -0
  96. package/www/build/p-93cb103f.entry.js +2 -0
  97. package/www/build/p-93cb103f.entry.js.map +1 -0
  98. package/www/build/web-components-library.esm.js +1 -1
  99. package/www/build/web-components-library.esm.js.map +1 -1
  100. package/www/index.html +1 -1
  101. package/dist/web-components-library/p-3796ca7c.entry.js.map +0 -1
  102. package/dist/web-components-library/p-91a7c5a9.entry.js.map +0 -1
  103. package/dist/web-components-library/p-9b52dea5.entry.js +0 -2
  104. package/dist/web-components-library/p-9b52dea5.entry.js.map +0 -1
  105. package/dist/web-components-library/p-ba8e67ee.entry.js +0 -2
  106. package/dist/web-components-library/p-ba8e67ee.entry.js.map +0 -1
  107. package/dist/web-components-library/p-ed1a5ee3.entry.js +0 -2
  108. package/dist/web-components-library/p-ed1a5ee3.entry.js.map +0 -1
  109. package/dist/web-components-library/p-f7607ce7.entry.js.map +0 -1
  110. package/www/build/p-3796ca7c.entry.js.map +0 -1
  111. package/www/build/p-91a7c5a9.entry.js.map +0 -1
  112. package/www/build/p-94cbc0c5.js +0 -2
  113. package/www/build/p-9b52dea5.entry.js +0 -2
  114. package/www/build/p-9b52dea5.entry.js.map +0 -1
  115. package/www/build/p-ba8e67ee.entry.js +0 -2
  116. package/www/build/p-ba8e67ee.entry.js.map +0 -1
  117. package/www/build/p-ed1a5ee3.entry.js +0 -2
  118. package/www/build/p-ed1a5ee3.entry.js.map +0 -1
  119. package/www/build/p-f7607ce7.entry.js.map +0 -1
@@ -402,7 +402,6 @@ export namespace Components {
402
402
  /**
403
403
  * ZCarousel component.
404
404
  * @cssprop --z-carousel-gutter - The gutter between items.
405
- * @cssprop --z-carousel-items-shadow - The shadow around the items.
406
405
  */
407
406
  interface ZCarousel {
408
407
  /**
@@ -628,18 +627,10 @@ export namespace Components {
628
627
  * get array of uploaded files
629
628
  */
630
629
  "getFiles": () => Promise<File[]>;
631
- /**
632
- * uploaded files history rendering
633
- */
634
- "hasFileSection"?: boolean;
635
630
  /**
636
631
  * Title
637
632
  */
638
633
  "mainTitle"?: string;
639
- /**
640
- * remove file from the array
641
- */
642
- "removeFile": (fileName: string) => Promise<void>;
643
634
  /**
644
635
  * Prop indicating the file upload type - can be default or dragdrop
645
636
  */
@@ -746,6 +737,10 @@ export namespace Components {
746
737
  * render icon (optional): available for text
747
738
  */
748
739
  "icon"?: string;
740
+ /**
741
+ * set tabindex to input tag (optional). Defaults to native behaviour.
742
+ */
743
+ "innerTabIndex"?: number;
749
744
  /**
750
745
  * get checked status
751
746
  */
@@ -937,6 +932,10 @@ export namespace Components {
937
932
  * [optional] Sets expandable style to element.
938
933
  */
939
934
  "expandableStyle"?: ExpandableListStyle;
935
+ /**
936
+ * set tabindex to Host tag (optional). Defaults to 0.
937
+ */
938
+ "htmlTabindex"?: number | null;
940
939
  /**
941
940
  * [optional] List element id.
942
941
  */
@@ -1497,7 +1496,7 @@ export namespace Components {
1497
1496
  */
1498
1497
  interface ZPopover {
1499
1498
  /**
1500
- * The selector or the element bound with the popover. If string css selector is provided make sure to use a valid selector.
1499
+ * The selector or the element bound with the popover.
1501
1500
  */
1502
1501
  "bindTo"?: string | HTMLElement;
1503
1502
  /**
@@ -2370,7 +2369,6 @@ declare global {
2370
2369
  /**
2371
2370
  * ZCarousel component.
2372
2371
  * @cssprop --z-carousel-gutter - The gutter between items.
2373
- * @cssprop --z-carousel-items-shadow - The shadow around the items.
2374
2372
  */
2375
2373
  interface HTMLZCarouselElement extends Components.ZCarousel, HTMLStencilElement {
2376
2374
  addEventListener<K extends keyof HTMLZCarouselElementEventMap>(type: K, listener: (this: HTMLZCarouselElement, ev: ZCarouselCustomEvent<HTMLZCarouselElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
@@ -2547,6 +2545,7 @@ declare global {
2547
2545
  "startTyping": any;
2548
2546
  "stopTyping": any;
2549
2547
  "inputCheck": any;
2548
+ "ariaDescendantFocus": string;
2550
2549
  }
2551
2550
  interface HTMLZInputElement extends Components.ZInput, HTMLStencilElement {
2552
2551
  addEventListener<K extends keyof HTMLZInputElementEventMap>(type: K, listener: (this: HTMLZInputElement, ev: ZInputCustomEvent<HTMLZInputElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
@@ -3770,7 +3769,6 @@ declare namespace LocalJSX {
3770
3769
  /**
3771
3770
  * ZCarousel component.
3772
3771
  * @cssprop --z-carousel-gutter - The gutter between items.
3773
- * @cssprop --z-carousel-items-shadow - The shadow around the items.
3774
3772
  */
3775
3773
  interface ZCarousel {
3776
3774
  /**
@@ -4016,10 +4014,6 @@ declare namespace LocalJSX {
4016
4014
  * Max file dimension in Megabyte
4017
4015
  */
4018
4016
  "fileMaxSize"?: number;
4019
- /**
4020
- * uploaded files history rendering
4021
- */
4022
- "hasFileSection"?: boolean;
4023
4017
  /**
4024
4018
  * Title
4025
4019
  */
@@ -4138,6 +4132,10 @@ declare namespace LocalJSX {
4138
4132
  * render icon (optional): available for text
4139
4133
  */
4140
4134
  "icon"?: string;
4135
+ /**
4136
+ * set tabindex to input tag (optional). Defaults to native behaviour.
4137
+ */
4138
+ "innerTabIndex"?: number;
4141
4139
  /**
4142
4140
  * the input label
4143
4141
  */
@@ -4170,6 +4168,10 @@ declare namespace LocalJSX {
4170
4168
  * the input name
4171
4169
  */
4172
4170
  "name"?: string;
4171
+ /**
4172
+ * set parent aria-activedescendant on focus event, returns filterid
4173
+ */
4174
+ "onAriaDescendantFocus"?: (event: ZInputCustomEvent<string>) => void;
4173
4175
  /**
4174
4176
  * Emitted on input value change, returns value, validity
4175
4177
  */
@@ -4345,6 +4347,10 @@ declare namespace LocalJSX {
4345
4347
  * [optional] Sets expandable style to element.
4346
4348
  */
4347
4349
  "expandableStyle"?: ExpandableListStyle;
4350
+ /**
4351
+ * set tabindex to Host tag (optional). Defaults to 0.
4352
+ */
4353
+ "htmlTabindex"?: number | null;
4348
4354
  /**
4349
4355
  * [optional] List element id.
4350
4356
  */
@@ -4985,7 +4991,7 @@ declare namespace LocalJSX {
4985
4991
  */
4986
4992
  interface ZPopover {
4987
4993
  /**
4988
- * The selector or the element bound with the popover. If string css selector is provided make sure to use a valid selector.
4994
+ * The selector or the element bound with the popover.
4989
4995
  */
4990
4996
  "bindTo"?: string | HTMLElement;
4991
4997
  /**
@@ -5715,7 +5721,6 @@ declare module "@stencil/core" {
5715
5721
  /**
5716
5722
  * ZCarousel component.
5717
5723
  * @cssprop --z-carousel-gutter - The gutter between items.
5718
- * @cssprop --z-carousel-items-shadow - The shadow around the items.
5719
5724
  */
5720
5725
  "z-carousel": LocalJSX.ZCarousel & JSXBase.HTMLAttributes<HTMLZCarouselElement>;
5721
5726
  "z-chip": LocalJSX.ZChip & JSXBase.HTMLAttributes<HTMLZChipElement>;
@@ -1,2 +1,2 @@
1
- import{r as t,h as e,a,g as s}from"./p-10bb4f4b.js";import"./p-04fdb6fa.js";import"./p-2aa42d09.js";import"./p-f76d0247.js";import"./p-ac768eff.js";import"./p-955da62e.js";import"./p-025f494e.js";import"./p-2c886e8b.js";import"./p-88cf27cf.js";import"./p-c0bfa87d.js";const o=":host{--z-table--cells-padding:calc(var(--space-unit) * 2);position:relative;display:block;overflow:auto;max-width:100%;box-sizing:border-box;background-color:var(--color-surface01)}:host([expandable]){--z-table--expand-button-size:40px}:host([bordered]){--z-table--cell-left-border:1px solid var(--color-surface03)}.table{min-width:max-content}";const r=o;const i=class{constructor(e){t(this,e);this.bordered=false;this.expandable=false}updateExpandable(){this.expandable=this.host.querySelectorAll("z-tr[expandable]").length>0}componentWillLoad(){this.expandableMutationObserver=new MutationObserver((()=>{this.updateExpandable()}));this.expandableMutationObserver.observe(this.host,{childList:true,subtree:true,attributes:true,attributeFilter:["expandable"],attributeOldValue:false})}disconnectedCallback(){var t;(t=this.expandableMutationObserver)===null||t===void 0?void 0:t.disconnect()}render(){return e(a,{key:"d404e04cce15f5c9c01d1d90477b0b073ce4fb18",expandable:this.expandable},e("div",{key:"093877b6d4f94257a4178c2d0647107a91cd782b",class:"table",role:"table"},e("slot",{key:"19e147c5cb2e20287208e39085e816cfc62f3f5e"})))}get host(){return s(this)}};i.style=r;export{i as z_table};
2
- //# sourceMappingURL=p-3796ca7c.entry.js.map
1
+ import{r as e,h as t,a,g as s}from"./p-10bb4f4b.js";import"./p-04fdb6fa.js";import"./p-2aa42d09.js";import"./p-f76d0247.js";import"./p-ac768eff.js";import"./p-955da62e.js";import"./p-025f494e.js";import"./p-2c886e8b.js";import"./p-88cf27cf.js";import"./p-c0bfa87d.js";const r=":host{--z-table--cells-padding:calc(var(--space-unit) * 2);position:relative;display:block;overflow:auto;max-width:100%;box-sizing:border-box;background-color:var(--color-surface01)}:host([expandable]){--z-table--expand-button-size:40px}:host([bordered]){--z-table--cell-left-border:1px solid var(--color-surface03)}.table{min-width:max-content}";const o=r;const i=class{constructor(t){e(this,t);this.bordered=false;this.expandable=false}updateExpandable(){this.expandable=this.host.querySelectorAll("z-tr[expandable]").length>0}componentWillLoad(){this.expandableMutationObserver=new MutationObserver((()=>{this.updateExpandable()}));this.expandableMutationObserver.observe(this.host,{childList:true,subtree:true,attributes:true,attributeFilter:["expandable"],attributeOldValue:false})}disconnectedCallback(){this.expandableMutationObserver.disconnect()}render(){return t(a,{key:"4c33beca2ea12f899450df4a244ea271ea30c018",expandable:this.expandable},t("div",{key:"e5f6e45535e0251091d58b9784cfbe0b9bfc8f7e",class:"table",role:"table"},t("slot",{key:"d244f077dd25df7f2189f5b5f4b6f89e69db4768"})))}get host(){return s(this)}};i.style=o;export{i as z_table};
2
+ //# sourceMappingURL=p-158b6dda.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["stylesCss","ZTableStyle0","ZTable","updateExpandable","this","expandable","host","querySelectorAll","length","componentWillLoad","expandableMutationObserver","MutationObserver","observe","childList","subtree","attributes","attributeFilter","attributeOldValue","disconnectedCallback","disconnect","render","h","Host","key","class","role"],"sources":["src/components/table/z-table/styles.css?tag=z-table&encapsulation=shadow","src/components/table/z-table/index.tsx"],"sourcesContent":[":host {\n --z-table--cells-padding: calc(var(--space-unit) * 2);\n\n position: relative;\n display: block;\n overflow: auto;\n max-width: 100%;\n box-sizing: border-box;\n background-color: var(--color-surface01);\n}\n\n:host([expandable]) {\n --z-table--expand-button-size: 40px;\n}\n\n:host([bordered]) {\n --z-table--cell-left-border: 1px solid var(--color-surface03);\n}\n\n.table {\n min-width: max-content;\n}\n","import {Component, Element, Host, Prop, State, h} from \"@stencil/core\";\nimport \"../z-thead/index\";\nimport \"../z-tbody/index\";\nimport \"../z-tr/index\";\nimport \"../z-tfoot/index\";\n\n/**\n * ZTable component.\n * @slot - Table content (`z-thead`, `z-tbody`, `z-tfoot`, `z-tr`).\n * @cssprop --z-table--cells-padding - Padding of the cells.\n */\n@Component({\n tag: \"z-table\",\n styleUrl: \"styles.css\",\n shadow: true,\n})\nexport class ZTable {\n @Element() host: HTMLZTableElement;\n\n /**\n * Whether the table cells should show a border between them.\n */\n @Prop({reflect: true})\n bordered = false;\n\n /**\n * Whether the table contains some expandable rows.\n */\n @State()\n expandable = false;\n\n private updateExpandable(): void {\n this.expandable = this.host.querySelectorAll(\"z-tr[expandable]\").length > 0;\n }\n\n private expandableMutationObserver: MutationObserver;\n\n /**\n * Setup the table creating a mutation observer for the expandable attribute.\n */\n componentWillLoad(): void {\n this.expandableMutationObserver = new MutationObserver(() => {\n this.updateExpandable();\n });\n this.expandableMutationObserver.observe(this.host, {\n childList: true,\n subtree: true,\n attributes: true,\n attributeFilter: [\"expandable\"],\n attributeOldValue: false,\n });\n }\n\n disconnectedCallback(): void {\n this.expandableMutationObserver.disconnect();\n }\n\n render(): HTMLZTableElement {\n return (\n <Host expandable={this.expandable}>\n <div\n class=\"table\"\n role=\"table\"\n >\n <slot></slot>\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"4QAAA,MAAMA,EAAY,4VAClB,MAAAC,EAAeD,E,MCeFE,EAAM,M,uCAON,M,gBAME,K,CAEL,gBAAAC,GACNC,KAAKC,WAAaD,KAAKE,KAAKC,iBAAiB,oBAAoBC,OAAS,C,CAQ5E,iBAAAC,GACEL,KAAKM,2BAA6B,IAAIC,kBAAiB,KACrDP,KAAKD,kBAAkB,IAEzBC,KAAKM,2BAA2BE,QAAQR,KAAKE,KAAM,CACjDO,UAAW,KACXC,QAAS,KACTC,WAAY,KACZC,gBAAiB,CAAC,cAClBC,kBAAmB,O,CAIvB,oBAAAC,GACEd,KAAKM,2BAA2BS,Y,CAGlC,MAAAC,GACE,OACEC,EAACC,EAAI,CAAAC,IAAA,2CAAClB,WAAYD,KAAKC,YACrBgB,EAAA,OAAAE,IAAA,2CACEC,MAAM,QACNC,KAAK,SAELJ,EAAA,QAAAE,IAAA,8C"}
@@ -1,2 +1,2 @@
1
- import{r as t,c as o,h as e,g as r}from"./p-10bb4f4b.js";import{P as i,g as s}from"./p-025f494e.js";const n=':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}';const a=n;const c=document.documentElement;function f(t){if(t.parentNode.host){return t.parentNode.host}return t.parentNode}function h(t){let o=f(t);while(o&&o!==c){const{overflow:t,overflowX:e,overflowY:r}=window.getComputedStyle(o);if(t==="hidden"||r==="hidden"||e==="hidden"){return o}if(o.scrollHeight>o.clientHeight&&t!=="visible"&&r!=="visible"||o.scrollWidth>o.clientWidth&&t!=="visible"&&e!=="visible"){return o}o=f(o)}return c}function p(t,o){const e=t.getBoundingClientRect();const r=e.width;const i=e.height;let s=0;let n=0;let a=t;while(a&&a!=o){n+=a.offsetLeft;if(a===document.body){s+=a.getBoundingClientRect().top+window.scrollY}else{s+=a.offsetTop}if(window.DOMMatrix){const t=window.getComputedStyle(a);const o=t.transform||t.webkitTransform;const e=new DOMMatrix(o);if(e){n+=e.m41;if(a!==document.body){s+=e.m42}}}if(!a.offsetParent){break}a=a.offsetParent}let c;let f;if(a===document.body){c=window.innerWidth;f=window.innerHeight}else{c=a.offsetWidth;f=a.offsetHeight}const h=c-n-e.width;const p=f-s-e.height;return{top:s,right:h,bottom:p,left:n,width:r,height:i}}const l=class{constructor(e){t(this,e);this.positionChange=o(this,"positionChange",7);this.openChange=o(this,"openChange",7);this.position=i.AUTO;this.open=false;this.bindTo=undefined;this.showArrow=false;this.center=false;this.closable=true;this.currentPosition=undefined}closePopoverWithKeyboard(t){if(this.closable&&t.key===s.ESC){this.open=false}}handleOutsideClick(t){if(!this.closable||!this.open){return}if(!t.composedPath().includes(this.host)){const o=t.target;const e=this.bindTo instanceof HTMLElement?this.bindTo.contains(o):o.closest(this.bindTo);if(e){t.stopPropagation()}this.open=false;this.positionChange.emit({position:this.currentPosition})}}validatePosition(t){if(t&&!Object.values(i).includes(t)){this.position=i.AUTO}this.currentPosition=this.position;this.positionChange.emit({position:this.currentPosition})}onOpen(){cancelAnimationFrame(this.animationFrameRequestId);if(this.open){const t=()=>{if(this.open){this.setPosition();this.animationFrameRequestId=requestAnimationFrame(t)}};t()}else if(this.host.hasAttribute("current-position")){this.host.removeAttribute("current-position");this.currentPosition=undefined}this.openChange.emit({open:this.open})}disconnectedCallback(){cancelAnimationFrame(this.animationFrameRequestId)}setPosition(){let t;if(typeof this.bindTo==="string"){t=this.host.ownerDocument.querySelector(this.bindTo)}else if(this.bindTo){t=this.bindTo}else{t=this.host.parentElement}if(!t){return}const o=h(t);const e=o.getBoundingClientRect();const r=this.host.offsetParent;const s=r?p(r,o):{top:0,right:0,bottom:0,left:0};const n=p(t,o);const a=n.top-o.scrollTop;const c=e.height-(n.top+n.height)+o.scrollTop;const f=n.left-o.scrollLeft;const l=e.width-(n.left+n.width)+o.scrollLeft;const u=Math.max(0,e.top+e.height-window.innerHeight);const d=Math.max(0,e.left+e.width-window.innerWidth);const b=Math.min(a,a+e.top);const v=Math.min(c,c-u);const w=Math.min(f,f+e.left);const m=Math.min(l,l-d);const g=b+v+n.height;const x=w+m+n.width;let $=this.currentPosition;const y=[];if(this.position===i.AUTO){if(w/x>.6){y.push(i.LEFT)}else if(w/x<.4){y.push(i.RIGHT)}if(b/g>.9){y.unshift(i.TOP)}else if(b/g>.6){y.push(i.TOP)}else if(b/g<.1){y.unshift(i.BOTTOM)}else{y.push(i.BOTTOM)}$=y.join("_")}const z=this.host.style;z.position="absolute";const _=n.top-s.top;const M=n.right-s.right;const k=n.bottom-s.bottom;const O=n.left-s.left;const P=this.center?.5:0;const j=this.center?.5:0;if($===i.TOP||$===i.TOP_RIGHT){z.top="auto";z.right="auto";z.bottom=`${k+n.height}px`;z.left=`${O+n.width*P}px`;z.maxHeight=`${b}px`;if($===i.TOP_RIGHT){z.maxWidth=`${m+n.width*j}px`}}else if($===i.TOP_LEFT){z.top="auto";z.right=`${M+n.width*P}px`;z.bottom=`${k+n.height}px`;z.left="auto";z.maxWidth=`${w}px`;z.maxHeight=`${b}px`}else if($===i.BOTTOM||$===i.BOTTOM_RIGHT){z.top=`${_+n.height}px`;z.right="auto";z.bottom="auto";z.left=`${O+n.width*P}px`;z.maxHeight=`${v}px`;if($===i.BOTTOM_RIGHT){z.maxWidth=`${m+n.width*j}px`}}else if($===i.BOTTOM_LEFT){z.top=`${_+n.height}px`;z.right=`${M+n.width*P}px`;z.bottom="auto";z.left="auto";z.maxWidth=`${w}px`;z.maxHeight=`${v}px`}else if($===i.RIGHT||$===i.RIGHT_BOTTOM){z.top=`${_+n.height*P}px`;z.right="auto";z.bottom="auto";z.left=`${O+n.width}px`;z.maxWidth=`${m}px`;z.maxHeight=`${v+n.height*j}px`}else if($===i.RIGHT_TOP){z.top="auto";z.right="auto";z.bottom=`${k+n.height*P}px`;z.left=`${O+n.width}px`;z.maxWidth=`${m}px`;z.maxHeight=`${b+n.height*j}px`}else if($===i.LEFT||$===i.LEFT_BOTTOM){z.top=`${_+n.height*P}px`;z.right=`${M+n.width}px`;z.bottom="auto";z.left="auto";z.maxWidth=`${w}px`;z.maxHeight=`${v+n.height*j}px`}else if($===i.LEFT_TOP){z.top="auto";z.right=`${M+n.width}px`;z.bottom=`${k+n.height*P}px`;z.left="auto";z.maxWidth=`${w}px`;z.maxHeight=`${b+n.height*j}px`}this.currentPosition=$||this.position;this.host.setAttribute("current-position",this.currentPosition)}componentWillLoad(){this.validatePosition(this.position);this.onOpen()}render(){return e("slot",{key:"dd51a369f1d5c8097418f1e69dd52c155adbe46e"})}get host(){return r(this)}static get watchers(){return{position:["validatePosition"],open:["onOpen"]}}};l.style=a;export{l as z_popover};
2
- //# sourceMappingURL=p-f7607ce7.entry.js.map
1
+ import{r as t,c as o,h as e,g as r}from"./p-10bb4f4b.js";import{P as i,g as s}from"./p-025f494e.js";const n=':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}';const a=n;const c=document.documentElement;function f(t){if(t.parentNode.host){return t.parentNode.host}return t.parentNode}function h(t){let o=f(t);while(o&&o!==c){const{overflow:t,overflowX:e,overflowY:r}=window.getComputedStyle(o);if(t==="hidden"||r==="hidden"||e==="hidden"){return o}if(o.scrollHeight>o.clientHeight&&t!=="visible"&&r!=="visible"||o.scrollWidth>o.clientWidth&&t!=="visible"&&e!=="visible"){return o}o=f(o)}return c}function p(t,o){const e=t.getBoundingClientRect();const r=e.width;const i=e.height;let s=0;let n=0;let a=t;while(a&&a!=o){n+=a.offsetLeft;if(a===document.body){s+=a.getBoundingClientRect().top+window.scrollY}else{s+=a.offsetTop}if(window.DOMMatrix){const t=window.getComputedStyle(a);const o=t.transform||t.webkitTransform;const e=new DOMMatrix(o);if(e){n+=e.m41;if(a!==document.body){s+=e.m42}}}if(!a.offsetParent){break}a=a.offsetParent}let c;let f;if(a===document.body){c=window.innerWidth;f=window.innerHeight}else{c=a.offsetWidth;f=a.offsetHeight}const h=c-n-e.width;const p=f-s-e.height;return{top:s,right:h,bottom:p,left:n,width:r,height:i}}const l=class{constructor(e){t(this,e);this.positionChange=o(this,"positionChange",7);this.openChange=o(this,"openChange",7);this.position=i.AUTO;this.open=false;this.bindTo=undefined;this.showArrow=false;this.center=false;this.closable=true;this.currentPosition=undefined}closePopoverWithKeyboard(t){if(this.closable&&t.key===s.ESC){this.open=false}}handleOutsideClick(t){if(!this.closable||!this.open){return}if(!t.composedPath().includes(this.host)){const o=t.target;const e=this.bindTo instanceof HTMLElement?this.bindTo.contains(o):o.closest(CSS.escape(this.bindTo));if(e){t.stopPropagation()}this.open=false;this.positionChange.emit({position:this.currentPosition})}}validatePosition(t){if(t&&!Object.values(i).includes(t)){this.position=i.AUTO}this.currentPosition=this.position;this.positionChange.emit({position:this.currentPosition})}onOpen(){cancelAnimationFrame(this.animationFrameRequestId);if(this.open){const t=()=>{if(this.open){this.setPosition();this.animationFrameRequestId=requestAnimationFrame(t)}};t()}else if(this.host.hasAttribute("current-position")){this.host.removeAttribute("current-position");this.currentPosition=undefined}this.openChange.emit({open:this.open})}disconnectedCallback(){cancelAnimationFrame(this.animationFrameRequestId)}setPosition(){let t;if(typeof this.bindTo==="string"){t=this.host.ownerDocument.querySelector(CSS.escape(this.bindTo))}else if(this.bindTo){t=this.bindTo}else{t=this.host.parentElement}if(!t){return}const o=h(t);const e=o.getBoundingClientRect();const r=this.host.offsetParent;const s=r?p(r,o):{top:0,right:0,bottom:0,left:0};const n=p(t,o);const a=n.top-o.scrollTop;const c=e.height-(n.top+n.height)+o.scrollTop;const f=n.left-o.scrollLeft;const l=e.width-(n.left+n.width)+o.scrollLeft;const u=Math.max(0,e.top+e.height-window.innerHeight);const d=Math.max(0,e.left+e.width-window.innerWidth);const b=Math.min(a,a+e.top);const v=Math.min(c,c-u);const w=Math.min(f,f+e.left);const m=Math.min(l,l-d);const g=b+v+n.height;const x=w+m+n.width;let $=this.currentPosition;const y=[];if(this.position===i.AUTO){if(w/x>.6){y.push(i.LEFT)}else if(w/x<.4){y.push(i.RIGHT)}if(b/g>.9){y.unshift(i.TOP)}else if(b/g>.6){y.push(i.TOP)}else if(b/g<.1){y.unshift(i.BOTTOM)}else{y.push(i.BOTTOM)}$=y.join("_")}const z=this.host.style;z.position="absolute";const _=n.top-s.top;const M=n.right-s.right;const k=n.bottom-s.bottom;const C=n.left-s.left;const O=this.center?.5:0;const P=this.center?.5:0;if($===i.TOP||$===i.TOP_RIGHT){z.top="auto";z.right="auto";z.bottom=`${k+n.height}px`;z.left=`${C+n.width*O}px`;z.maxHeight=`${b}px`;if($===i.TOP_RIGHT){z.maxWidth=`${m+n.width*P}px`}}else if($===i.TOP_LEFT){z.top="auto";z.right=`${M+n.width*O}px`;z.bottom=`${k+n.height}px`;z.left="auto";z.maxWidth=`${w}px`;z.maxHeight=`${b}px`}else if($===i.BOTTOM||$===i.BOTTOM_RIGHT){z.top=`${_+n.height}px`;z.right="auto";z.bottom="auto";z.left=`${C+n.width*O}px`;z.maxHeight=`${v}px`;if($===i.BOTTOM_RIGHT){z.maxWidth=`${m+n.width*P}px`}}else if($===i.BOTTOM_LEFT){z.top=`${_+n.height}px`;z.right=`${M+n.width*O}px`;z.bottom="auto";z.left="auto";z.maxWidth=`${w}px`;z.maxHeight=`${v}px`}else if($===i.RIGHT||$===i.RIGHT_BOTTOM){z.top=`${_+n.height*O}px`;z.right="auto";z.bottom="auto";z.left=`${C+n.width}px`;z.maxWidth=`${m}px`;z.maxHeight=`${v+n.height*P}px`}else if($===i.RIGHT_TOP){z.top="auto";z.right="auto";z.bottom=`${k+n.height*O}px`;z.left=`${C+n.width}px`;z.maxWidth=`${m}px`;z.maxHeight=`${b+n.height*P}px`}else if($===i.LEFT||$===i.LEFT_BOTTOM){z.top=`${_+n.height*O}px`;z.right=`${M+n.width}px`;z.bottom="auto";z.left="auto";z.maxWidth=`${w}px`;z.maxHeight=`${v+n.height*P}px`}else if($===i.LEFT_TOP){z.top="auto";z.right=`${M+n.width}px`;z.bottom=`${k+n.height*O}px`;z.left="auto";z.maxWidth=`${w}px`;z.maxHeight=`${b+n.height*P}px`}this.currentPosition=$||this.position;this.host.setAttribute("current-position",this.currentPosition)}componentWillLoad(){this.validatePosition(this.position);this.onOpen()}render(){return e("slot",{key:"70c742e7871fbf8a871165a4de625dda200ae024"})}get host(){return r(this)}static get watchers(){return{position:["validatePosition"],open:["onOpen"]}}};l.style=a;export{l as z_popover};
2
+ //# sourceMappingURL=p-2637ab23.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["stylesCss","ZPopoverStyle0","DOCUMENT_ELEMENT","document","documentElement","getParentElement","element","parentNode","host","findScrollableParent","parent","overflow","overflowX","overflowY","window","getComputedStyle","scrollHeight","clientHeight","scrollWidth","clientWidth","computeOffset","targetParentOffset","rect","getBoundingClientRect","width","height","top","left","offsetParent","offsetLeft","body","scrollY","offsetTop","DOMMatrix","style","transform","webkitTransform","domMatrix","m41","m42","parentWidth","parentHeight","innerWidth","innerHeight","offsetWidth","offsetHeight","right","bottom","ZPopover","PopoverPosition","AUTO","closePopoverWithKeyboard","e","this","closable","key","KeyboardCode","ESC","open","handleOutsideClick","composedPath","includes","target","triggerElemClicked","bindTo","HTMLElement","contains","closest","CSS","escape","stopPropagation","positionChange","emit","position","currentPosition","validatePosition","newValue","Object","values","onOpen","cancelAnimationFrame","animationFrameRequestId","setPosition","requestAnimationFrame","hasAttribute","removeAttribute","undefined","openChange","disconnectedCallback","ownerDocument","querySelector","parentElement","scrollContainer","scrollingBoundingRect","offsetContainer","relativeBoundingRect","boundingRect","scrollTop","scrollLeft","overflowBottom","Math","max","overflowRight","availableTop","min","availableBottom","availableLeft","availableRight","availableHeight","availableWidth","positions","push","LEFT","RIGHT","unshift","TOP","BOTTOM","join","offsetRight","offsetBottom","offsetModifier","center","sizeModifier","TOP_RIGHT","maxHeight","maxWidth","TOP_LEFT","BOTTOM_RIGHT","BOTTOM_LEFT","RIGHT_BOTTOM","RIGHT_TOP","LEFT_BOTTOM","LEFT_TOP","setAttribute","componentWillLoad","render","h"],"sources":["src/components/z-popover/styles.css?tag=z-popover&encapsulation=shadow","src/components/z-popover/index.tsx"],"sourcesContent":[":host {\n --z-popover-theme--surface: var(--color-surface01);\n --z-popover-theme--text: var(--color-text01);\n --z-popover-padding: 0;\n --z-popover-shadow-filter: drop-shadow(0 1px 2px var(--shadow-color-base));\n\n position: relative;\n display: none;\n min-width: calc(var(--space-unit) * 8);\n min-height: calc(var(--space-unit) * 4);\n align-items: center;\n justify-content: center;\n padding: var(--z-popover-padding);\n background: var(--z-popover-theme--surface);\n border-radius: var(--border-radius-small);\n color: var(--z-popover-theme--text);\n fill: currentcolor;\n filter: var(--z-popover-shadow-filter);\n font-family: var(--font-family-sans);\n text-align: center;\n}\n\n:host([open][current-position]),\n:host([open=\"true\"][current-position]) {\n display: flex;\n}\n\n:host([center][current-position=\"top\"]),\n:host([center][current-position=\"bottom\"]) {\n transform: translateX(-50%);\n}\n\n:host([center][current-position=\"right\"]),\n:host([center][current-position=\"left\"]) {\n transform: translateY(-50%);\n}\n\n:host([current-position^=\"top\"]) {\n margin: 0 0 var(--space-unit);\n}\n\n:host([current-position^=\"bottom\"]) {\n margin: var(--space-unit) 0 0;\n}\n\n:host([current-position^=\"left\"]) {\n margin: 0 var(--space-unit) 0 0;\n}\n\n:host([current-position^=\"right\"]) {\n margin: 0 0 0 var(--space-unit);\n}\n\n/* Arrow style */\n\n:host([current-position])::before {\n --arrow-size: 6px;\n --arrow-edge-offset: calc(100% - var(--space-unit) - (var(--arrow-size) / 2));\n --arrow-center-x-offset: calc(50% - (var(--arrow-size) / 2));\n --arrow-center-y-offset: calc(100% - (var(--arrow-size) / 2));\n\n position: absolute;\n display: block;\n width: var(--arrow-size);\n height: var(--arrow-size);\n background: var(--z-popover-theme--surface);\n content: \"\";\n transform: rotate(45deg);\n}\n\n:host([show-arrow=\"false\"])::before,\n:host(:not([show-arrow]))::before {\n display: none;\n}\n\n:host([current-position^=\"top\"])::before {\n top: var(--arrow-center-y-offset);\n}\n\n:host([current-position^=\"bottom\"])::before {\n bottom: var(--arrow-center-y-offset);\n}\n\n:host([current-position=\"top\"])::before,\n:host([current-position=\"bottom\"])::before {\n right: var(--arrow-edge-offset);\n}\n\n:host([current-position=\"right\"])::before,\n:host([current-position=\"left\"])::before {\n bottom: var(--arrow-edge-offset);\n}\n\n:host([current-position=\"right\"])::before {\n right: var(--arrow-center-y-offset);\n}\n\n:host([current-position=\"left\"])::before {\n left: var(--arrow-center-y-offset);\n}\n\n:host([current-position=\"top_right\"])::before,\n:host([current-position=\"bottom_right\"])::before {\n right: var(--arrow-edge-offset);\n}\n\n:host([current-position=\"top_left\"])::before,\n:host([current-position=\"bottom_left\"])::before {\n left: var(--arrow-edge-offset);\n}\n\n:host([current-position=\"right_top\"])::before,\n:host([current-position=\"left_top\"])::before {\n top: var(--arrow-edge-offset);\n}\n\n:host([current-position=\"right_top\"])::before,\n:host([current-position=\"right_bottom\"])::before {\n right: var(--arrow-center-y-offset);\n}\n\n:host([current-position=\"left_top\"])::before,\n:host([current-position=\"left_bottom\"])::before {\n left: var(--arrow-center-y-offset);\n}\n\n:host([current-position=\"right_bottom\"])::before,\n:host([current-position=\"left_bottom\"])::before {\n bottom: var(--arrow-edge-offset);\n}\n\n:host([center][current-position=\"top\"])::before,\n:host([center][current-position=\"bottom\"])::before {\n right: auto;\n left: var(--arrow-center-x-offset);\n}\n\n:host([center][current-position=\"right\"])::before,\n:host([center][current-position=\"left\"])::before {\n top: var(--arrow-center-x-offset);\n bottom: auto;\n}\n\n::slotted(*) {\n overflow: auto;\n flex: 1 auto;\n}\n","import {Component, Prop, h, Watch, Listen, Element, State, Event, EventEmitter} from \"@stencil/core\";\nimport {PopoverPosition, KeyboardCode} from \"../../beans\";\n\nconst DOCUMENT_ELEMENT = document.documentElement;\n\nfunction getParentElement(element: Element): ShadowRoot[\"host\"] {\n if ((element.parentNode as ShadowRoot).host) {\n return (element.parentNode as ShadowRoot).host;\n }\n\n return element.parentNode as Element;\n}\n\n/**\n * Find the closest scrollable parent of a node.\n *\n * @param {Element} element The node\n */\nfunction findScrollableParent(element: Element): Element {\n let parent = getParentElement(element);\n\n while (parent && parent !== DOCUMENT_ELEMENT) {\n const {overflow, overflowX, overflowY} = window.getComputedStyle(parent);\n if (overflow === \"hidden\" || overflowY === \"hidden\" || overflowX === \"hidden\") {\n return parent;\n }\n\n if (\n (parent.scrollHeight > parent.clientHeight && overflow !== \"visible\" && overflowY !== \"visible\") ||\n (parent.scrollWidth > parent.clientWidth && overflow !== \"visible\" && overflowX !== \"visible\")\n ) {\n return parent;\n }\n\n parent = getParentElement(parent);\n }\n\n return DOCUMENT_ELEMENT;\n}\n\n/**\n * Calculate computed offset.\n * It includes matrix transformations.\n * @param element The target element.\n * @param targetParentOffset The relative offset parent.\n * @return A client rect object.\n */\nfunction computeOffset(element: HTMLElement, targetParentOffset?: HTMLElement): Record<string, number> {\n const rect = element.getBoundingClientRect();\n const width = rect.width;\n const height = rect.height;\n\n let top = 0;\n let left = 0;\n let offsetParent = element;\n while (offsetParent && offsetParent != targetParentOffset) {\n left += offsetParent.offsetLeft;\n\n // document.body sometimes has offsetTop == 0 but still has an\n // offset because of children margins!\n if (offsetParent === document.body) {\n top += offsetParent.getBoundingClientRect().top + window.scrollY;\n } else {\n top += offsetParent.offsetTop;\n }\n\n if (window.DOMMatrix) {\n const style = window.getComputedStyle(offsetParent);\n const transform = style.transform || style.webkitTransform;\n const domMatrix = new DOMMatrix(transform);\n if (domMatrix) {\n left += domMatrix.m41;\n if (offsetParent !== document.body) {\n top += domMatrix.m42;\n }\n }\n }\n\n if (!offsetParent.offsetParent) {\n break;\n }\n\n offsetParent = offsetParent.offsetParent as HTMLElement;\n }\n\n let parentWidth: number;\n let parentHeight: number;\n if (offsetParent === document.body) {\n parentWidth = window.innerWidth;\n parentHeight = window.innerHeight;\n } else {\n parentWidth = offsetParent.offsetWidth;\n parentHeight = offsetParent.offsetHeight;\n }\n\n const right = parentWidth - left - rect.width;\n const bottom = parentHeight - top - rect.height;\n\n return {top, right, bottom, left, width, height};\n}\n\n/**\n * Popover component.\n *\n * @cssprop --z-popover-theme--surface - background color of the popover.\n * @cssprop --z-popover-theme--text - foreground color of the popover.\n * @cssprop --z-popover-padding - padding of the popover.\n * @cssprop --z-popover-shadow-filter - drop-shadow filter of the popover. Defaults to `drop-shadow(0 1px 2px var(--shadow-color-base))`.\n */\n@Component({\n tag: \"z-popover\",\n styleUrl: \"styles.css\",\n shadow: true,\n})\nexport class ZPopover {\n /** Popover position. */\n @Prop({reflect: true})\n position: PopoverPosition = PopoverPosition.AUTO;\n\n /**\n * The open state of the popover.\n */\n @Prop({reflect: true, mutable: true})\n open = false;\n\n /**\n * The selector or the element bound with the popover.\n */\n @Prop()\n bindTo?: string | HTMLElement;\n\n /**\n * Whether to show popover's arrow.\n */\n @Prop({reflect: true})\n showArrow = false;\n\n /**\n * Whether to center the popup on the main side (according to \"position\").\n */\n @Prop({reflect: true})\n center = false;\n\n /**\n * If true, the popover can be closed by clicking outside of it or pressing the escape key.\n * Otherwise, it will be closed only programmatically (by setting `open` to `false`).\n */\n @Prop()\n closable = true;\n\n /**\n * The current position of the popover.\n */\n @State()\n currentPosition?: PopoverPosition;\n\n /**\n * Position change event.\n */\n @Event()\n positionChange: EventEmitter;\n\n /**\n * Open change event.\n */\n @Event()\n openChange: EventEmitter;\n\n @Element() host: HTMLZPopoverElement;\n\n private animationFrameRequestId?: number;\n\n @Listen(\"keyup\", {target: \"window\"})\n closePopoverWithKeyboard(e: KeyboardEvent): void {\n if (this.closable && e.key === KeyboardCode.ESC) {\n this.open = false;\n }\n }\n\n /**\n * Close the popover when clicking outside of its content.\n * Stop event propagation if the click was fired by popover's trigger element,\n * to prevent close and reopen glitches.\n * @param {MouseEvent} e\n */\n @Listen(\"click\", {target: \"body\", capture: true})\n handleOutsideClick(e: MouseEvent): void {\n if (!this.closable || !this.open) {\n return;\n }\n\n if (!e.composedPath().includes(this.host)) {\n const target = e.target as HTMLElement;\n const triggerElemClicked =\n this.bindTo instanceof HTMLElement ? this.bindTo.contains(target) : target.closest(CSS.escape(this.bindTo));\n if (triggerElemClicked) {\n e.stopPropagation();\n }\n\n this.open = false;\n this.positionChange.emit({position: this.currentPosition});\n }\n }\n\n @Watch(\"position\")\n validatePosition(newValue: PopoverPosition): void {\n if (newValue && !Object.values(PopoverPosition).includes(newValue as PopoverPosition)) {\n this.position = PopoverPosition.AUTO;\n }\n\n this.currentPosition = this.position;\n this.positionChange.emit({position: this.currentPosition});\n }\n\n /**\n * Setup popover behaviors on opening.\n */\n @Watch(\"open\")\n onOpen(): void {\n cancelAnimationFrame(this.animationFrameRequestId);\n if (this.open) {\n const setPosition = (): void => {\n if (this.open) {\n this.setPosition();\n this.animationFrameRequestId = requestAnimationFrame(setPosition);\n }\n };\n\n setPosition();\n } else if (this.host.hasAttribute(\"current-position\")) {\n this.host.removeAttribute(\"current-position\");\n this.currentPosition = undefined;\n }\n\n this.openChange.emit({open: this.open});\n }\n\n disconnectedCallback(): void {\n cancelAnimationFrame(this.animationFrameRequestId);\n }\n\n /**\n * Set the position of the popover.\n */\n private setPosition(): void {\n let element: HTMLElement;\n if (typeof this.bindTo === \"string\") {\n element = this.host.ownerDocument.querySelector(CSS.escape(this.bindTo)) as HTMLElement;\n } else if (this.bindTo) {\n element = this.bindTo;\n } else {\n element = this.host.parentElement as HTMLElement;\n }\n\n if (!element) {\n return;\n }\n\n const scrollContainer = findScrollableParent(element) as HTMLElement;\n const scrollingBoundingRect = scrollContainer.getBoundingClientRect();\n const offsetContainer = this.host.offsetParent as HTMLElement;\n\n const relativeBoundingRect = offsetContainer\n ? computeOffset(offsetContainer, scrollContainer)\n : {top: 0, right: 0, bottom: 0, left: 0};\n const boundingRect = computeOffset(element, scrollContainer);\n\n const top = boundingRect.top - scrollContainer.scrollTop;\n const bottom = scrollingBoundingRect.height - (boundingRect.top + boundingRect.height) + scrollContainer.scrollTop;\n const left = boundingRect.left - scrollContainer.scrollLeft;\n const right = scrollingBoundingRect.width - (boundingRect.left + boundingRect.width) + scrollContainer.scrollLeft;\n\n const overflowBottom = Math.max(0, scrollingBoundingRect.top + scrollingBoundingRect.height - window.innerHeight);\n const overflowRight = Math.max(0, scrollingBoundingRect.left + scrollingBoundingRect.width - window.innerWidth);\n\n const availableTop = Math.min(top, top + scrollingBoundingRect.top);\n const availableBottom = Math.min(bottom, bottom - overflowBottom);\n const availableLeft = Math.min(left, left + scrollingBoundingRect.left);\n const availableRight = Math.min(right, right - overflowRight);\n\n const availableHeight = availableTop + availableBottom + boundingRect.height;\n const availableWidth = availableLeft + availableRight + boundingRect.width;\n\n let position = this.currentPosition;\n const positions: PopoverPosition[] = [];\n if (this.position === PopoverPosition.AUTO) {\n /**\n * The `AUTO` position tries to place the popover in the 'safest' area,\n * where there's more space available.\n */\n if (availableLeft / availableWidth > 0.6) {\n positions.push(PopoverPosition.LEFT);\n } else if (availableLeft / availableWidth < 0.4) {\n positions.push(PopoverPosition.RIGHT);\n }\n\n if (availableTop / availableHeight > 0.9) {\n positions.unshift(PopoverPosition.TOP);\n } else if (availableTop / availableHeight > 0.6) {\n positions.push(PopoverPosition.TOP);\n } else if (availableTop / availableHeight < 0.1) {\n positions.unshift(PopoverPosition.BOTTOM);\n } else {\n positions.push(PopoverPosition.BOTTOM);\n }\n\n position = positions.join(\"_\") as PopoverPosition;\n }\n\n const style = this.host.style;\n style.position = \"absolute\";\n\n const offsetTop = boundingRect.top - relativeBoundingRect.top;\n const offsetRight = boundingRect.right - relativeBoundingRect.right;\n const offsetBottom = boundingRect.bottom - relativeBoundingRect.bottom;\n const offsetLeft = boundingRect.left - relativeBoundingRect.left;\n const offsetModifier = this.center ? 0.5 : 0;\n const sizeModifier = this.center ? 0.5 : 0;\n\n if (position === PopoverPosition.TOP || position === PopoverPosition.TOP_RIGHT) {\n style.top = \"auto\";\n style.right = \"auto\";\n style.bottom = `${offsetBottom + boundingRect.height}px`;\n\n style.left = `${offsetLeft + boundingRect.width * offsetModifier}px`;\n style.maxHeight = `${availableTop}px`;\n if (position === PopoverPosition.TOP_RIGHT) {\n style.maxWidth = `${availableRight + boundingRect.width * sizeModifier}px`;\n }\n } else if (position === PopoverPosition.TOP_LEFT) {\n style.top = \"auto\";\n style.right = `${offsetRight + boundingRect.width * offsetModifier}px`;\n style.bottom = `${offsetBottom + boundingRect.height}px`;\n style.left = \"auto\";\n style.maxWidth = `${availableLeft}px`;\n style.maxHeight = `${availableTop}px`;\n } else if (position === PopoverPosition.BOTTOM || position === PopoverPosition.BOTTOM_RIGHT) {\n style.top = `${offsetTop + boundingRect.height}px`;\n style.right = \"auto\";\n style.bottom = \"auto\";\n style.left = `${offsetLeft + boundingRect.width * offsetModifier}px`;\n style.maxHeight = `${availableBottom}px`;\n if (position === PopoverPosition.BOTTOM_RIGHT) {\n style.maxWidth = `${availableRight + boundingRect.width * sizeModifier}px`;\n }\n } else if (position === PopoverPosition.BOTTOM_LEFT) {\n style.top = `${offsetTop + boundingRect.height}px`;\n style.right = `${offsetRight + boundingRect.width * offsetModifier}px`;\n style.bottom = \"auto\";\n style.left = \"auto\";\n style.maxWidth = `${availableLeft}px`;\n style.maxHeight = `${availableBottom}px`;\n } else if (position === PopoverPosition.RIGHT || position === PopoverPosition.RIGHT_BOTTOM) {\n style.top = `${offsetTop + boundingRect.height * offsetModifier}px`;\n style.right = \"auto\";\n style.bottom = \"auto\";\n style.left = `${offsetLeft + boundingRect.width}px`;\n style.maxWidth = `${availableRight}px`;\n style.maxHeight = `${availableBottom + boundingRect.height * sizeModifier}px`;\n } else if (position === PopoverPosition.RIGHT_TOP) {\n style.top = \"auto\";\n style.right = \"auto\";\n style.bottom = `${offsetBottom + boundingRect.height * offsetModifier}px`;\n style.left = `${offsetLeft + boundingRect.width}px`;\n style.maxWidth = `${availableRight}px`;\n style.maxHeight = `${availableTop + boundingRect.height * sizeModifier}px`;\n } else if (position === PopoverPosition.LEFT || position === PopoverPosition.LEFT_BOTTOM) {\n style.top = `${offsetTop + boundingRect.height * offsetModifier}px`;\n style.right = `${offsetRight + boundingRect.width}px`;\n style.bottom = \"auto\";\n style.left = \"auto\";\n style.maxWidth = `${availableLeft}px`;\n style.maxHeight = `${availableBottom + boundingRect.height * sizeModifier}px`;\n } else if (position === PopoverPosition.LEFT_TOP) {\n style.top = \"auto\";\n style.right = `${offsetRight + boundingRect.width}px`;\n style.bottom = `${offsetBottom + boundingRect.height * offsetModifier}px`;\n style.left = \"auto\";\n style.maxWidth = `${availableLeft}px`;\n style.maxHeight = `${availableTop + boundingRect.height * sizeModifier}px`;\n }\n\n this.currentPosition = position || this.position;\n this.host.setAttribute(\"current-position\", this.currentPosition);\n }\n\n componentWillLoad(): void {\n this.validatePosition(this.position);\n this.onOpen();\n }\n\n render(): HTMLSlotElement {\n return <slot></slot>;\n }\n}\n"],"mappings":"oGAAA,MAAMA,EAAY,itGAClB,MAAAC,EAAeD,ECEf,MAAME,EAAmBC,SAASC,gBAElC,SAASC,EAAiBC,GACxB,GAAKA,EAAQC,WAA0BC,KAAM,CAC3C,OAAQF,EAAQC,WAA0BC,I,CAG5C,OAAOF,EAAQC,UACjB,CAOA,SAASE,EAAqBH,GAC5B,IAAII,EAASL,EAAiBC,GAE9B,MAAOI,GAAUA,IAAWR,EAAkB,CAC5C,MAAMS,SAACA,EAAQC,UAAEA,EAASC,UAAEA,GAAaC,OAAOC,iBAAiBL,GACjE,GAAIC,IAAa,UAAYE,IAAc,UAAYD,IAAc,SAAU,CAC7E,OAAOF,C,CAGT,GACGA,E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