@zanichelli/albe-web-components 20.0.0 → 20.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/web-components-library.cjs.js +1 -1
- package/dist/cjs/z-app-header_12.cjs.entry.js +29 -7
- package/dist/cjs/z-app-header_12.cjs.entry.js.map +1 -1
- package/dist/cjs/z-book-card.cjs.entry.js +6 -2
- package/dist/cjs/z-book-card.cjs.entry.js.map +1 -1
- package/dist/cjs/z-combobox.cjs.entry.js +6 -4
- package/dist/cjs/z-combobox.cjs.entry.js.map +1 -1
- package/dist/cjs/z-dragdrop-area_2.cjs.entry.js +2 -2
- package/dist/cjs/z-file.cjs.entry.js +1 -1
- package/dist/cjs/z-table.cjs.entry.js +1 -1
- package/dist/cjs/z-table.cjs.entry.js.map +1 -1
- package/dist/cjs/z-tbody.cjs.entry.js +1 -1
- package/dist/cjs/z-tbody.cjs.entry.js.map +1 -1
- package/dist/cjs/z-td.cjs.entry.js +1 -1
- package/dist/cjs/z-td.cjs.entry.js.map +1 -1
- package/dist/cjs/z-tfoot.cjs.entry.js +1 -1
- package/dist/cjs/z-tfoot.cjs.entry.js.map +1 -1
- package/dist/cjs/z-th.cjs.entry.js +1 -1
- package/dist/cjs/z-th.cjs.entry.js.map +1 -1
- package/dist/cjs/z-thead.cjs.entry.js +1 -1
- package/dist/cjs/z-thead.cjs.entry.js.map +1 -1
- package/dist/cjs/z-tr.cjs.entry.js +1 -1
- package/dist/cjs/z-tr.cjs.entry.js.map +1 -1
- package/dist/cjs/z-tree-list.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +7 -7
- package/dist/collection/components/book-card/z-book-card/index.js +7 -3
- package/dist/collection/components/book-card/z-book-card/index.js.map +1 -1
- package/dist/collection/components/{table → deprecated/table}/cells/z-td/index.js +6 -6
- package/dist/collection/components/deprecated/table/cells/z-td/index.js.map +1 -0
- package/dist/collection/components/{table → deprecated/table}/cells/z-th/index.js +8 -8
- package/dist/collection/components/deprecated/table/cells/z-th/index.js.map +1 -0
- package/dist/collection/components/{table → deprecated/table}/z-table/index.js +3 -3
- package/dist/collection/components/deprecated/table/z-table/index.js.map +1 -0
- package/dist/collection/components/{table → deprecated/table}/z-tbody/index.js +3 -3
- package/dist/collection/components/deprecated/table/z-tbody/index.js.map +1 -0
- package/dist/collection/components/{table → deprecated/table}/z-tfoot/index.js +3 -3
- package/dist/collection/components/deprecated/table/z-tfoot/index.js.map +1 -0
- package/dist/collection/components/{table → deprecated/table}/z-thead/index.js +3 -3
- package/dist/collection/components/deprecated/table/z-thead/index.js.map +1 -0
- package/dist/collection/components/{table → deprecated/table}/z-tr/index.js +4 -4
- package/dist/collection/components/deprecated/table/z-tr/index.js.map +1 -0
- package/dist/collection/components/file-upload/z-dragdrop-area/index.js +2 -2
- package/dist/collection/components/file-upload/z-file/index.js +1 -1
- package/dist/collection/components/list/z-list/index.js +1 -1
- package/dist/collection/components/list/z-list-element/index.js +1 -1
- package/dist/collection/components/list/z-list-group/index.js +2 -2
- package/dist/collection/components/list/z-tree-list/index.js +1 -1
- package/dist/collection/components/z-combobox/index.js +5 -3
- package/dist/collection/components/z-combobox/index.js.map +1 -1
- package/dist/collection/components/z-combobox/styles.css +1 -1
- package/dist/collection/components/z-input/index.js +45 -2
- package/dist/collection/components/z-input/index.js.map +1 -1
- package/dist/collection/components/z-input/styles-checkbox-radio.css +2 -2
- package/dist/components/index.d.ts +7 -7
- package/dist/components/index10.js +1 -1
- package/dist/components/index19.js +1 -1
- package/dist/components/index6.js +1 -1
- package/dist/components/index6.js.map +1 -1
- package/dist/components/index8.js +1 -1
- package/dist/components/index9.js +1 -1
- package/dist/components/z-book-card.js +1 -1
- package/dist/components/z-book-card.js.map +1 -1
- package/dist/components/z-combobox.js +1 -1
- package/dist/components/z-combobox.js.map +1 -1
- package/dist/components/z-file.js +1 -1
- package/dist/components/z-table.js +1 -1
- package/dist/components/z-table.js.map +1 -1
- package/dist/components/z-tbody.js +1 -1
- package/dist/components/z-tbody.js.map +1 -1
- package/dist/components/z-td.js +1 -1
- package/dist/components/z-td.js.map +1 -1
- package/dist/components/z-tfoot.js +1 -1
- package/dist/components/z-tfoot.js.map +1 -1
- package/dist/components/z-th.js +1 -1
- package/dist/components/z-th.js.map +1 -1
- package/dist/components/z-thead.js +1 -1
- package/dist/components/z-thead.js.map +1 -1
- package/dist/components/z-tr.js +1 -1
- package/dist/components/z-tr.js.map +1 -1
- package/dist/components/z-tree-list.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/web-components-library.js +1 -1
- package/dist/esm/z-app-header_12.entry.js +29 -7
- package/dist/esm/z-app-header_12.entry.js.map +1 -1
- package/dist/esm/z-book-card.entry.js +6 -2
- package/dist/esm/z-book-card.entry.js.map +1 -1
- package/dist/esm/z-combobox.entry.js +6 -4
- package/dist/esm/z-combobox.entry.js.map +1 -1
- package/dist/esm/z-dragdrop-area_2.entry.js +2 -2
- package/dist/esm/z-file.entry.js +1 -1
- package/dist/esm/z-table.entry.js +1 -1
- package/dist/esm/z-table.entry.js.map +1 -1
- package/dist/esm/z-tbody.entry.js +1 -1
- package/dist/esm/z-tbody.entry.js.map +1 -1
- package/dist/esm/z-td.entry.js +1 -1
- package/dist/esm/z-td.entry.js.map +1 -1
- package/dist/esm/z-tfoot.entry.js +1 -1
- package/dist/esm/z-tfoot.entry.js.map +1 -1
- package/dist/esm/z-th.entry.js +1 -1
- package/dist/esm/z-th.entry.js.map +1 -1
- package/dist/esm/z-thead.entry.js +1 -1
- package/dist/esm/z-thead.entry.js.map +1 -1
- package/dist/esm/z-tr.entry.js +1 -1
- package/dist/esm/z-tr.entry.js.map +1 -1
- package/dist/esm/z-tree-list.entry.js +1 -1
- package/dist/types/components/book-card/z-book-card/index.d.ts +5 -1
- package/dist/types/components/{table → deprecated/table}/cells/z-td/index.d.ts +2 -2
- package/dist/types/components/{table → deprecated/table}/cells/z-th/index.d.ts +2 -2
- package/dist/types/components/{table → deprecated/table}/z-table/index.d.ts +1 -1
- package/dist/types/components/{table → deprecated/table}/z-tbody/index.d.ts +1 -1
- package/dist/types/components/{table → deprecated/table}/z-tfoot/index.d.ts +1 -1
- package/dist/types/components/{table → deprecated/table}/z-thead/index.d.ts +1 -1
- package/dist/types/components/{table → deprecated/table}/z-tr/index.d.ts +1 -1
- package/dist/types/components/z-input/index.d.ts +4 -0
- package/dist/types/components.d.ts +13 -2
- package/dist/web-components-library/p-1bd296f5.entry.js +2 -0
- package/dist/web-components-library/p-1bd296f5.entry.js.map +1 -0
- package/dist/web-components-library/p-1d050092.entry.js +2 -0
- package/dist/web-components-library/{p-b7620e80.entry.js → p-2cc3ac9f.entry.js} +2 -2
- package/dist/web-components-library/p-2cc3ac9f.entry.js.map +1 -0
- package/dist/web-components-library/{p-8f4fcd01.entry.js → p-2e398b4d.entry.js} +2 -2
- package/dist/web-components-library/p-3f787c19.entry.js +2 -0
- package/dist/web-components-library/p-3f787c19.entry.js.map +1 -0
- package/dist/web-components-library/{p-121f224a.entry.js → p-53943e9a.entry.js} +2 -2
- package/dist/web-components-library/{p-51ebf661.entry.js → p-59651b67.entry.js} +2 -2
- package/dist/web-components-library/p-59651b67.entry.js.map +1 -0
- package/{www/build/p-ccedd440.entry.js → dist/web-components-library/p-65c404bc.entry.js} +2 -2
- package/dist/web-components-library/p-65c404bc.entry.js.map +1 -0
- package/{www/build/p-53c51bf4.entry.js → dist/web-components-library/p-6b816b15.entry.js} +2 -2
- package/{www/build/p-53c51bf4.entry.js.map → dist/web-components-library/p-6b816b15.entry.js.map} +1 -1
- package/dist/web-components-library/{p-1ef66142.entry.js → p-6e49b67e.entry.js} +2 -2
- package/dist/web-components-library/p-6e49b67e.entry.js.map +1 -0
- package/dist/web-components-library/{p-3748979c.entry.js → p-8e1363c6.entry.js} +2 -2
- package/dist/web-components-library/p-8e1363c6.entry.js.map +1 -0
- package/dist/web-components-library/{p-a52b3dd1.entry.js → p-a1eb1dfd.entry.js} +2 -2
- package/dist/web-components-library/p-a1eb1dfd.entry.js.map +1 -0
- package/{www/build/p-904c7fdd.entry.js → dist/web-components-library/p-f841b50f.entry.js} +2 -2
- package/dist/web-components-library/p-f841b50f.entry.js.map +1 -0
- package/dist/web-components-library/web-components-library.esm.js +1 -1
- package/package.json +1 -1
- package/www/build/p-1bd296f5.entry.js +2 -0
- package/www/build/p-1bd296f5.entry.js.map +1 -0
- package/www/build/p-1d050092.entry.js +2 -0
- package/www/build/{p-b7620e80.entry.js → p-2cc3ac9f.entry.js} +2 -2
- package/www/build/p-2cc3ac9f.entry.js.map +1 -0
- package/www/build/{p-8f4fcd01.entry.js → p-2e398b4d.entry.js} +2 -2
- package/www/build/p-3f787c19.entry.js +2 -0
- package/www/build/p-3f787c19.entry.js.map +1 -0
- package/www/build/{p-121f224a.entry.js → p-53943e9a.entry.js} +2 -2
- package/www/build/{p-51ebf661.entry.js → p-59651b67.entry.js} +2 -2
- package/www/build/p-59651b67.entry.js.map +1 -0
- package/{dist/web-components-library/p-ccedd440.entry.js → www/build/p-65c404bc.entry.js} +2 -2
- package/www/build/p-65c404bc.entry.js.map +1 -0
- package/{dist/web-components-library/p-53c51bf4.entry.js → www/build/p-6b816b15.entry.js} +2 -2
- package/{dist/web-components-library/p-53c51bf4.entry.js.map → www/build/p-6b816b15.entry.js.map} +1 -1
- package/www/build/{p-1ef66142.entry.js → p-6e49b67e.entry.js} +2 -2
- package/www/build/p-6e49b67e.entry.js.map +1 -0
- package/www/build/{p-3748979c.entry.js → p-8e1363c6.entry.js} +2 -2
- package/www/build/p-8e1363c6.entry.js.map +1 -0
- package/www/build/p-955f0d65.js +2 -0
- package/www/build/{p-a52b3dd1.entry.js → p-a1eb1dfd.entry.js} +2 -2
- package/www/build/p-a1eb1dfd.entry.js.map +1 -0
- package/{dist/web-components-library/p-904c7fdd.entry.js → www/build/p-f841b50f.entry.js} +2 -2
- package/www/build/p-f841b50f.entry.js.map +1 -0
- package/www/build/web-components-library.esm.js +1 -1
- package/www/index.html +1 -1
- package/dist/collection/components/table/cells/z-td/index.js.map +0 -1
- package/dist/collection/components/table/cells/z-th/index.js.map +0 -1
- package/dist/collection/components/table/z-table/index.js.map +0 -1
- package/dist/collection/components/table/z-tbody/index.js.map +0 -1
- package/dist/collection/components/table/z-tfoot/index.js.map +0 -1
- package/dist/collection/components/table/z-thead/index.js.map +0 -1
- package/dist/collection/components/table/z-tr/index.js.map +0 -1
- package/dist/web-components-library/p-02fb0bf9.entry.js +0 -2
- package/dist/web-components-library/p-1ef66142.entry.js.map +0 -1
- package/dist/web-components-library/p-3748979c.entry.js.map +0 -1
- package/dist/web-components-library/p-51ebf661.entry.js.map +0 -1
- package/dist/web-components-library/p-5a43af47.entry.js +0 -2
- package/dist/web-components-library/p-5a43af47.entry.js.map +0 -1
- package/dist/web-components-library/p-8d2704ee.entry.js +0 -2
- package/dist/web-components-library/p-8d2704ee.entry.js.map +0 -1
- package/dist/web-components-library/p-904c7fdd.entry.js.map +0 -1
- package/dist/web-components-library/p-a52b3dd1.entry.js.map +0 -1
- package/dist/web-components-library/p-b7620e80.entry.js.map +0 -1
- package/dist/web-components-library/p-ccedd440.entry.js.map +0 -1
- package/www/build/p-02fb0bf9.entry.js +0 -2
- package/www/build/p-1ef66142.entry.js.map +0 -1
- package/www/build/p-3748979c.entry.js.map +0 -1
- package/www/build/p-51ebf661.entry.js.map +0 -1
- package/www/build/p-5a1df5b1.js +0 -2
- package/www/build/p-5a43af47.entry.js +0 -2
- package/www/build/p-5a43af47.entry.js.map +0 -1
- package/www/build/p-8d2704ee.entry.js +0 -2
- package/www/build/p-8d2704ee.entry.js.map +0 -1
- package/www/build/p-904c7fdd.entry.js.map +0 -1
- package/www/build/p-a52b3dd1.entry.js.map +0 -1
- package/www/build/p-b7620e80.entry.js.map +0 -1
- package/www/build/p-ccedd440.entry.js.map +0 -1
- /package/dist/collection/components/{table → deprecated/table}/cells/z-table-cells.css +0 -0
- /package/dist/collection/components/{table → deprecated/table}/cells/z-th/styles.css +0 -0
- /package/dist/collection/components/{table → deprecated/table}/z-table/styles.css +0 -0
- /package/dist/collection/components/{table → deprecated/table}/z-tbody/styles.css +0 -0
- /package/dist/collection/components/{table → deprecated/table}/z-tfoot/styles.css +0 -0
- /package/dist/collection/components/{table → deprecated/table}/z-thead/styles.css +0 -0
- /package/dist/collection/components/{table → deprecated/table}/z-tr/styles.css +0 -0
- /package/dist/web-components-library/{p-02fb0bf9.entry.js.map → p-1d050092.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-8f4fcd01.entry.js.map → p-2e398b4d.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-121f224a.entry.js.map → p-53943e9a.entry.js.map} +0 -0
- /package/www/build/{p-02fb0bf9.entry.js.map → p-1d050092.entry.js.map} +0 -0
- /package/www/build/{p-8f4fcd01.entry.js.map → p-2e398b4d.entry.js.map} +0 -0
- /package/www/build/{p-121f224a.entry.js.map → p-53943e9a.entry.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{proxyCustomElement as e,HTMLElement as i,createEvent as t,h as s,Host as o,transformTag as n}from"@stencil/core/internal/client";import{P as
|
|
1
|
+
import{proxyCustomElement as e,HTMLElement as i,createEvent as t,h as s,Host as o,transformTag as n}from"@stencil/core/internal/client";import{P as a,x as c}from"./index2.js";import{B as r}from"./breakpoints.js";import{d as l}from"./index18.js";import{d as f}from"./index3.js";import{d as p}from"./index16.js";const h=()=>`.sc-z-file-h{position:relative;font-family:var(--font-family-sans);font-weight:var(--font-rg)}.sc-z-file-h>z-popover.sc-z-file{z-index:10}.sc-z-file-h>z-popover.sc-z-file>.tooltip-content.sc-z-file{white-space:nowrap}.sc-z-file-h>z-chip.sc-z-file span.sc-z-file{display:block;overflow:hidden;max-width:250px;letter-spacing:0.32px;line-height:1.33;text-overflow:ellipsis;white-space:nowrap}`;const m=e(class e extends i{constructor(e){super();if(e!==false){this.__registerHost()}this.removeFile=t(this,"removeFile",7);this.allowPopover=false;this.popoverVisible=false}removeFileHandler(){this.removeFile.emit({fileName:this.fileName});this.el.remove()}onMouseOver(){this.popoverVisible=true}onMouseLeave(){this.popoverVisible=false}onInteractiveIconClick(){this.removeFileHandler()}componentDidLoad(){var e,i;if(this.elementHasEllipsis()&&window.innerWidth>r.TABLET){this.allowPopover=true}(i=(e=this.icon)===null||e===void 0?void 0:e.focus)===null||i===void 0?void 0:i.call(e)}elementHasEllipsis(){return this.ellipsis.offsetWidth<this.ellipsis.scrollWidth}render(){return s(o,{key:"872ac3402e164915b16c872027f7cec7121bba82"},this.allowPopover&&s("z-popover",{key:"2e8a1c0f1d8a7a3d303a82d56f5164ec6436d714",open:this.popoverVisible,position:a.AUTO,bindTo:this.chip},s("span",{key:"b70f58575ec17124133274bae84af4b41754478a",class:"body-5 tooltip-content"},this.ellipsis.innerText)),s("z-chip",{key:"a183a3b2109d2389681645497b2473b81251aef8",ref:e=>this.chip=e,id:`chip-${this.fileNumber}`,interactiveIcon:"multiply-circled",type:c.DEFAULT},s("span",{key:"293af17d1fd64a80433eea56f576ecbc4a4dc576",ref:e=>this.ellipsis=e,tabIndex:-1},this.fileName)))}get el(){return this}static get style(){return h()}},[2,"z-file",{fileNumber:[2,"file-number"],fileName:[1,"file-name"],allowPopover:[32],popoverVisible:[32]},[[1,"mouseover","onMouseOver"],[1,"mouseleave","onMouseLeave"],[0,"interactiveIconClick","onInteractiveIconClick"]]]);function d(){if(typeof customElements==="undefined"){return}const e=["z-file","z-chip","z-icon","z-popover"];e.forEach((e=>{switch(e){case"z-file":if(!customElements.get(n(e))){customElements.define(n(e),m)}break;case"z-chip":if(!customElements.get(n(e))){l()}break;case"z-icon":if(!customElements.get(n(e))){f()}break;case"z-popover":if(!customElements.get(n(e))){p()}break}}))}const v=m;const u=d;export{v as ZFile,u as defineCustomElement};
|
|
2
2
|
//# sourceMappingURL=z-file.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{proxyCustomElement as t,HTMLElement as e,h as r,Host as
|
|
1
|
+
import{proxyCustomElement as t,HTMLElement as e,h as r,Host as a,transformTag as o}from"@stencil/core/internal/client";import"./index2.js";import"./breakpoints.js";import"./iconset.js";import"./index16.js";const l=()=>`:host{position:relative;display:block;overflow:auto;min-width:max-content;max-width:100%;box-sizing:border-box;padding:var(--space-unit)}:host([expandable]){--z-table--expand-button-size:40px}`;const b=()=>`z-table,table.z-table{background-color:var(--color-surface01);--z-table--cells-padding:calc(var(--space-unit) * 2)}table.z-table{border-collapse:collapse}z-thead,table.z-table thead{background-color:var(--color-background);--z-table--cells-bottom-border-size:var(--border-size-medium)}z-tfoot,table.z-table tfoot{border-top:var(--border-size-medium) solid var(--color-surface03);border-bottom:var(--border-size-medium) solid var(--color-surface03)}z-tfoot z-tr,table.z-table tfoot tr{border-bottom:calc(var(--z-table--cells-bottom-border-size)) solid var(--color-surface03) !important}z-tr,table.z-table tr{border-bottom:var(--z-table--cells-bottom-border-size, var(--border-size-small)) solid var(--color-surface03)}z-td,z-th,table.z-table td,table.z-table th{padding:var(--z-table--cells-padding, calc(var(--space-unit) * 2));text-align:left}z-th:not(:first-child),z-td:not(:first-child),table.z-table th:not(:first-child),table.z-table td:not(:first-child){border-left:var(--z-table--cell-left-border, none)}z-table[bordered],table.z-table.z-table-bordered{--z-table--cell-left-border:1px solid var(--color-surface03)}table.z-table-hover>tbody>tr:hover>td,table.z-table-hover>tfoot>tr:hover>td{position:relative;background-color:var(--color-surface02)}table.z-table-hover>tbody>tr:hover>td::after,table.z-table-hover>tfoot>tr:hover>td::after{position:absolute;z-index:1;top:0;right:0;bottom:0;left:-1px;box-shadow:inset 0 var(--border-size-small) 0 var(--color-surface04), inset 0 calc(var(--border-size-small) * -1) 0 var(--color-surface04);content:""}table.z-table-hover>tbody>tr:hover>td:first-child::after,table.z-table-hover>thead>tr:hover>th:first-child::after,table.z-table-hover>tfoot>tr:hover>td:first-child::after{left:0}`;const s=t(class t extends e{constructor(t){super();if(t!==false){this.__registerHost()}this.__attachShadow();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 r(a,{key:"5db047ba30ea62b9f4c4b1adc1a2f82ab4dac8d0",expandable:this.expandable},r("div",{key:"1094691d5dbc197a353a8f2a0e18505196102587",class:"table",role:"table"},r("slot",{key:"e2bd88f858fba1408d14ff6040a3a961ddb69c28"})))}get host(){return this}static get style(){return l()+b()}},[257,"z-table",{bordered:[516],expandable:[32]}]);function d(){if(typeof customElements==="undefined"){return}const t=["z-table"];t.forEach((t=>{switch(t){case"z-table":if(!customElements.get(o(t))){customElements.define(o(t),s)}break}}))}const i=s;const c=d;export{i as ZTable,c as defineCustomElement};
|
|
2
2
|
//# sourceMappingURL=z-table.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["stylesCss","ZTable","__stencil_proxyCustomElement","HTMLElement","constructor","registerHost","this","bordered","expandable","updateExpandable","host","querySelectorAll","length","componentWillLoad","expandableMutationObserver","MutationObserver","observe","childList","subtree","attributes","attributeFilter","attributeOldValue","disconnectedCallback","_a","disconnect","render","h","Host","key","class","role"],"sources":["src/components/table/z-table/styles.css?tag=z-table&encapsulation=shadow","src/components/css-components/z-table/styles.css?tag=z-table&encapsulation=shadow","src/components/table/z-table/index.tsx"],"sourcesContent":[":host {\n /**\n * @prop --z-table--cells-padding: Padding of the cells.\n */\n\n position: relative;\n display: block;\n overflow: auto;\n min-width: max-content;\n max-width: 100%;\n box-sizing: border-box;\n padding: var(--space-unit);\n}\n\n:host([expandable]) {\n --z-table--expand-button-size: 40px;\n}\n","z-table,\ntable.z-table {\n background-color: var(--color-surface01);\n\n --z-table--cells-padding: calc(var(--space-unit) * 2);\n}\n\ntable.z-table {\n border-collapse: collapse;\n}\n\nz-thead,\ntable.z-table thead {\n background-color: var(--color-background);\n\n --z-table--cells-bottom-border-size: var(--border-size-medium);\n}\n\nz-tfoot,\ntable.z-table tfoot {\n border-top: var(--border-size-medium) solid var(--color-surface03);\n border-bottom: var(--border-size-medium) solid var(--color-surface03);\n}\n\nz-tfoot z-tr,\ntable.z-table tfoot tr {\n border-bottom: calc(var(--z-table--cells-bottom-border-size)) solid var(--color-surface03) !important;\n}\n\nz-tr,\ntable.z-table tr {\n border-bottom: var(--z-table--cells-bottom-border-size, var(--border-size-small)) solid var(--color-surface03);\n}\n\nz-td,\nz-th,\ntable.z-table td,\ntable.z-table th {\n padding: var(--z-table--cells-padding, calc(var(--space-unit) * 2));\n text-align: left;\n}\n\nz-th:not(:first-child),\nz-td:not(:first-child),\ntable.z-table th:not(:first-child),\ntable.z-table td:not(:first-child) {\n border-left: var(--z-table--cell-left-border, none);\n}\n\nz-table[bordered],\ntable.z-table.z-table-bordered {\n --z-table--cell-left-border: 1px solid var(--color-surface03);\n}\n\ntable.z-table-hover > tbody > tr:hover > td,\ntable.z-table-hover > tfoot > tr:hover > td {\n position: relative;\n background-color: var(--color-surface02);\n}\n\ntable.z-table-hover > tbody > tr:hover > td::after,\ntable.z-table-hover > tfoot > tr:hover > td::after {\n position: absolute;\n z-index: 1;\n top: 0;\n right: 0;\n bottom: 0;\n left: -1px;\n box-shadow:\n inset 0 var(--border-size-small) 0 var(--color-surface04),\n inset 0 calc(var(--border-size-small) * -1) 0 var(--color-surface04);\n content: \"\";\n}\n\ntable.z-table-hover > tbody > tr:hover > td:first-child::after,\ntable.z-table-hover > thead > tr:hover > th:first-child::after,\ntable.z-table-hover > tfoot > tr:hover > td:first-child::after {\n left: 0;\n}\n","import {Component, ComponentInterface, Element, Host, Prop, State, h} from \"@stencil/core\";\nimport \"../z-tbody/index\";\nimport \"../z-tfoot/index\";\nimport \"../z-thead/index\";\nimport \"../z-tr/index\";\n\n/**\n * ZTable component.\n * @slot - Table content (`z-thead`, `z-tbody`, `z-tfoot`, `z-tr`).\n */\n@Component({\n tag: \"z-table\",\n styleUrls: [\"styles.css\", \"
|
|
1
|
+
{"version":3,"names":["stylesCss","ZTable","__stencil_proxyCustomElement","HTMLElement","constructor","registerHost","this","bordered","expandable","updateExpandable","host","querySelectorAll","length","componentWillLoad","expandableMutationObserver","MutationObserver","observe","childList","subtree","attributes","attributeFilter","attributeOldValue","disconnectedCallback","_a","disconnect","render","h","Host","key","class","role"],"sources":["src/components/deprecated/table/z-table/styles.css?tag=z-table&encapsulation=shadow","src/components/css-components/z-table/styles.css?tag=z-table&encapsulation=shadow","src/components/deprecated/table/z-table/index.tsx"],"sourcesContent":[":host {\n /**\n * @prop --z-table--cells-padding: Padding of the cells.\n */\n\n position: relative;\n display: block;\n overflow: auto;\n min-width: max-content;\n max-width: 100%;\n box-sizing: border-box;\n padding: var(--space-unit);\n}\n\n:host([expandable]) {\n --z-table--expand-button-size: 40px;\n}\n","z-table,\ntable.z-table {\n background-color: var(--color-surface01);\n\n --z-table--cells-padding: calc(var(--space-unit) * 2);\n}\n\ntable.z-table {\n border-collapse: collapse;\n}\n\nz-thead,\ntable.z-table thead {\n background-color: var(--color-background);\n\n --z-table--cells-bottom-border-size: var(--border-size-medium);\n}\n\nz-tfoot,\ntable.z-table tfoot {\n border-top: var(--border-size-medium) solid var(--color-surface03);\n border-bottom: var(--border-size-medium) solid var(--color-surface03);\n}\n\nz-tfoot z-tr,\ntable.z-table tfoot tr {\n border-bottom: calc(var(--z-table--cells-bottom-border-size)) solid var(--color-surface03) !important;\n}\n\nz-tr,\ntable.z-table tr {\n border-bottom: var(--z-table--cells-bottom-border-size, var(--border-size-small)) solid var(--color-surface03);\n}\n\nz-td,\nz-th,\ntable.z-table td,\ntable.z-table th {\n padding: var(--z-table--cells-padding, calc(var(--space-unit) * 2));\n text-align: left;\n}\n\nz-th:not(:first-child),\nz-td:not(:first-child),\ntable.z-table th:not(:first-child),\ntable.z-table td:not(:first-child) {\n border-left: var(--z-table--cell-left-border, none);\n}\n\nz-table[bordered],\ntable.z-table.z-table-bordered {\n --z-table--cell-left-border: 1px solid var(--color-surface03);\n}\n\ntable.z-table-hover > tbody > tr:hover > td,\ntable.z-table-hover > tfoot > tr:hover > td {\n position: relative;\n background-color: var(--color-surface02);\n}\n\ntable.z-table-hover > tbody > tr:hover > td::after,\ntable.z-table-hover > tfoot > tr:hover > td::after {\n position: absolute;\n z-index: 1;\n top: 0;\n right: 0;\n bottom: 0;\n left: -1px;\n box-shadow:\n inset 0 var(--border-size-small) 0 var(--color-surface04),\n inset 0 calc(var(--border-size-small) * -1) 0 var(--color-surface04);\n content: \"\";\n}\n\ntable.z-table-hover > tbody > tr:hover > td:first-child::after,\ntable.z-table-hover > thead > tr:hover > th:first-child::after,\ntable.z-table-hover > tfoot > tr:hover > td:first-child::after {\n left: 0;\n}\n","import {Component, ComponentInterface, Element, Host, Prop, State, h} from \"@stencil/core\";\nimport \"../z-tbody/index\";\nimport \"../z-tfoot/index\";\nimport \"../z-thead/index\";\nimport \"../z-tr/index\";\n\n/**\n * ZTable component.\n * @slot - Table content (`z-thead`, `z-tbody`, `z-tfoot`, `z-tr`).\n */\n@Component({\n tag: \"z-table\",\n styleUrls: [\"styles.css\", \"../../../css-components/z-table/styles.css\"],\n shadow: true,\n})\nexport class ZTable implements ComponentInterface {\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":"8MAAA,MAAMA,EAAY,IAAM,mMCAxB,MAAMA,EAAY,IAAM,6sD,MCeXC,EAAMC,EAAA,MAAAD,UAAAE,EALnB,WAAAC,CAAAC,G,kEAYEC,KAAAC,SAAW,MAMXD,KAAAE,WAAa,KAwCd,CAtCS,gBAAAC,GACNH,KAAKE,WAAaF,KAAKI,KAAKC,iBAAiB,oBAAoBC,OAAS,C,CAQ5E,iBAAAC,GACEP,KAAKQ,2BAA6B,IAAIC,kBAAiB,KACrDT,KAAKG,kBAAkB,IAEzBH,KAAKQ,2BAA2BE,QAAQV,KAAKI,KAAM,CACjDO,UAAW,KACXC,QAAS,KACTC,WAAY,KACZC,gBAAiB,CAAC,cAClBC,kBAAmB,O,CAIvB,oBAAAC,G,OACEC,EAAAjB,KAAKQ,8BAA0B,MAAAS,SAAA,SAAAA,EAAEC,Y,CAGnC,MAAAC,GACE,OACEC,EAACC,EAAI,CAAAC,IAAA,2CAACpB,WAAYF,KAAKE,YACrBkB,EAAA,OAAAE,IAAA,2CACEC,MAAM,QACNC,KAAK,SAELJ,EAAA,QAAAE,IAAA,8C","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{proxyCustomElement as t,HTMLElement as e,h as r,Host as o,transformTag as l}from"@stencil/core/internal/client";const a=()=>`:host{display:block;box-sizing:border-box}`;const b=()=>`z-table,table.z-table{background-color:var(--color-surface01);--z-table--cells-padding:calc(var(--space-unit) * 2)}table.z-table{border-collapse:collapse}z-thead,table.z-table thead{background-color:var(--color-background);--z-table--cells-bottom-border-size:var(--border-size-medium)}z-tfoot,table.z-table tfoot{border-top:var(--border-size-medium) solid var(--color-surface03);border-bottom:var(--border-size-medium) solid var(--color-surface03)}z-tfoot z-tr,table.z-table tfoot tr{border-bottom:calc(var(--z-table--cells-bottom-border-size)) solid var(--color-surface03) !important}z-tr,table.z-table tr{border-bottom:var(--z-table--cells-bottom-border-size, var(--border-size-small)) solid var(--color-surface03)}z-td,z-th,table.z-table td,table.z-table th{padding:var(--z-table--cells-padding, calc(var(--space-unit) * 2));text-align:left}z-th:not(:first-child),z-td:not(:first-child),table.z-table th:not(:first-child),table.z-table td:not(:first-child){border-left:var(--z-table--cell-left-border, none)}z-table[bordered],table.z-table.z-table-bordered{--z-table--cell-left-border:1px solid var(--color-surface03)}table.z-table-hover>tbody>tr:hover>td,table.z-table-hover>tfoot>tr:hover>td{position:relative;background-color:var(--color-surface02)}table.z-table-hover>tbody>tr:hover>td::after,table.z-table-hover>tfoot>tr:hover>td::after{position:absolute;z-index:1;top:0;right:0;bottom:0;left:-1px;box-shadow:inset 0 var(--border-size-small) 0 var(--color-surface04), inset 0 calc(var(--border-size-small) * -1) 0 var(--color-surface04);content:""}table.z-table-hover>tbody>tr:hover>td:first-child::after,table.z-table-hover>thead>tr:hover>th:first-child::after,table.z-table-hover>tfoot>tr:hover>td:first-child::after{left:0}`;const
|
|
1
|
+
import{proxyCustomElement as t,HTMLElement as e,h as r,Host as o,transformTag as l}from"@stencil/core/internal/client";const a=()=>`:host{display:block;box-sizing:border-box}`;const b=()=>`z-table,table.z-table{background-color:var(--color-surface01);--z-table--cells-padding:calc(var(--space-unit) * 2)}table.z-table{border-collapse:collapse}z-thead,table.z-table thead{background-color:var(--color-background);--z-table--cells-bottom-border-size:var(--border-size-medium)}z-tfoot,table.z-table tfoot{border-top:var(--border-size-medium) solid var(--color-surface03);border-bottom:var(--border-size-medium) solid var(--color-surface03)}z-tfoot z-tr,table.z-table tfoot tr{border-bottom:calc(var(--z-table--cells-bottom-border-size)) solid var(--color-surface03) !important}z-tr,table.z-table tr{border-bottom:var(--z-table--cells-bottom-border-size, var(--border-size-small)) solid var(--color-surface03)}z-td,z-th,table.z-table td,table.z-table th{padding:var(--z-table--cells-padding, calc(var(--space-unit) * 2));text-align:left}z-th:not(:first-child),z-td:not(:first-child),table.z-table th:not(:first-child),table.z-table td:not(:first-child){border-left:var(--z-table--cell-left-border, none)}z-table[bordered],table.z-table.z-table-bordered{--z-table--cell-left-border:1px solid var(--color-surface03)}table.z-table-hover>tbody>tr:hover>td,table.z-table-hover>tfoot>tr:hover>td{position:relative;background-color:var(--color-surface02)}table.z-table-hover>tbody>tr:hover>td::after,table.z-table-hover>tfoot>tr:hover>td::after{position:absolute;z-index:1;top:0;right:0;bottom:0;left:-1px;box-shadow:inset 0 var(--border-size-small) 0 var(--color-surface04), inset 0 calc(var(--border-size-small) * -1) 0 var(--color-surface04);content:""}table.z-table-hover>tbody>tr:hover>td:first-child::after,table.z-table-hover>thead>tr:hover>th:first-child::after,table.z-table-hover>tfoot>tr:hover>td:first-child::after{left:0}`;const c=t(class t extends e{constructor(t){super();if(t!==false){this.__registerHost()}this.__attachShadow()}render(){return r(o,{key:"0799f4ed498e2fc7bff1a0a87e5aeec696bce221",role:"rowgroup"},r("slot",{key:"47b9c73d0dabc8724c213775dc3e1fdbece493f0"}))}static get style(){return a()+b()}},[257,"z-tbody"]);function d(){if(typeof customElements==="undefined"){return}const t=["z-tbody"];t.forEach((t=>{switch(t){case"z-tbody":if(!customElements.get(l(t))){customElements.define(l(t),c)}break}}))}const s=c;const i=d;export{s as ZTbody,i as defineCustomElement};
|
|
2
2
|
//# sourceMappingURL=z-tbody.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["stylesCss","ZTbody","__stencil_proxyCustomElement","HTMLElement","render","h","Host","key","role"],"sources":["src/components/table/z-tbody/styles.css?tag=z-tbody&encapsulation=shadow","src/components/css-components/z-table/styles.css?tag=z-tbody&encapsulation=shadow","src/components/table/z-tbody/index.tsx"],"sourcesContent":[":host {\n display: block;\n box-sizing: border-box;\n}\n","z-table,\ntable.z-table {\n background-color: var(--color-surface01);\n\n --z-table--cells-padding: calc(var(--space-unit) * 2);\n}\n\ntable.z-table {\n border-collapse: collapse;\n}\n\nz-thead,\ntable.z-table thead {\n background-color: var(--color-background);\n\n --z-table--cells-bottom-border-size: var(--border-size-medium);\n}\n\nz-tfoot,\ntable.z-table tfoot {\n border-top: var(--border-size-medium) solid var(--color-surface03);\n border-bottom: var(--border-size-medium) solid var(--color-surface03);\n}\n\nz-tfoot z-tr,\ntable.z-table tfoot tr {\n border-bottom: calc(var(--z-table--cells-bottom-border-size)) solid var(--color-surface03) !important;\n}\n\nz-tr,\ntable.z-table tr {\n border-bottom: var(--z-table--cells-bottom-border-size, var(--border-size-small)) solid var(--color-surface03);\n}\n\nz-td,\nz-th,\ntable.z-table td,\ntable.z-table th {\n padding: var(--z-table--cells-padding, calc(var(--space-unit) * 2));\n text-align: left;\n}\n\nz-th:not(:first-child),\nz-td:not(:first-child),\ntable.z-table th:not(:first-child),\ntable.z-table td:not(:first-child) {\n border-left: var(--z-table--cell-left-border, none);\n}\n\nz-table[bordered],\ntable.z-table.z-table-bordered {\n --z-table--cell-left-border: 1px solid var(--color-surface03);\n}\n\ntable.z-table-hover > tbody > tr:hover > td,\ntable.z-table-hover > tfoot > tr:hover > td {\n position: relative;\n background-color: var(--color-surface02);\n}\n\ntable.z-table-hover > tbody > tr:hover > td::after,\ntable.z-table-hover > tfoot > tr:hover > td::after {\n position: absolute;\n z-index: 1;\n top: 0;\n right: 0;\n bottom: 0;\n left: -1px;\n box-shadow:\n inset 0 var(--border-size-small) 0 var(--color-surface04),\n inset 0 calc(var(--border-size-small) * -1) 0 var(--color-surface04);\n content: \"\";\n}\n\ntable.z-table-hover > tbody > tr:hover > td:first-child::after,\ntable.z-table-hover > thead > tr:hover > th:first-child::after,\ntable.z-table-hover > tfoot > tr:hover > td:first-child::after {\n left: 0;\n}\n","import {Component, ComponentInterface, Host, h} from \"@stencil/core\";\n\n/**\n * ZTbody component.\n * @slot - ZTbody content (`z-tr`).\n */\n@Component({\n tag: \"z-tbody\",\n styleUrls: [\"styles.css\", \"
|
|
1
|
+
{"version":3,"names":["stylesCss","ZTbody","__stencil_proxyCustomElement","HTMLElement","render","h","Host","key","role"],"sources":["src/components/deprecated/table/z-tbody/styles.css?tag=z-tbody&encapsulation=shadow","src/components/css-components/z-table/styles.css?tag=z-tbody&encapsulation=shadow","src/components/deprecated/table/z-tbody/index.tsx"],"sourcesContent":[":host {\n display: block;\n box-sizing: border-box;\n}\n","z-table,\ntable.z-table {\n background-color: var(--color-surface01);\n\n --z-table--cells-padding: calc(var(--space-unit) * 2);\n}\n\ntable.z-table {\n border-collapse: collapse;\n}\n\nz-thead,\ntable.z-table thead {\n background-color: var(--color-background);\n\n --z-table--cells-bottom-border-size: var(--border-size-medium);\n}\n\nz-tfoot,\ntable.z-table tfoot {\n border-top: var(--border-size-medium) solid var(--color-surface03);\n border-bottom: var(--border-size-medium) solid var(--color-surface03);\n}\n\nz-tfoot z-tr,\ntable.z-table tfoot tr {\n border-bottom: calc(var(--z-table--cells-bottom-border-size)) solid var(--color-surface03) !important;\n}\n\nz-tr,\ntable.z-table tr {\n border-bottom: var(--z-table--cells-bottom-border-size, var(--border-size-small)) solid var(--color-surface03);\n}\n\nz-td,\nz-th,\ntable.z-table td,\ntable.z-table th {\n padding: var(--z-table--cells-padding, calc(var(--space-unit) * 2));\n text-align: left;\n}\n\nz-th:not(:first-child),\nz-td:not(:first-child),\ntable.z-table th:not(:first-child),\ntable.z-table td:not(:first-child) {\n border-left: var(--z-table--cell-left-border, none);\n}\n\nz-table[bordered],\ntable.z-table.z-table-bordered {\n --z-table--cell-left-border: 1px solid var(--color-surface03);\n}\n\ntable.z-table-hover > tbody > tr:hover > td,\ntable.z-table-hover > tfoot > tr:hover > td {\n position: relative;\n background-color: var(--color-surface02);\n}\n\ntable.z-table-hover > tbody > tr:hover > td::after,\ntable.z-table-hover > tfoot > tr:hover > td::after {\n position: absolute;\n z-index: 1;\n top: 0;\n right: 0;\n bottom: 0;\n left: -1px;\n box-shadow:\n inset 0 var(--border-size-small) 0 var(--color-surface04),\n inset 0 calc(var(--border-size-small) * -1) 0 var(--color-surface04);\n content: \"\";\n}\n\ntable.z-table-hover > tbody > tr:hover > td:first-child::after,\ntable.z-table-hover > thead > tr:hover > th:first-child::after,\ntable.z-table-hover > tfoot > tr:hover > td:first-child::after {\n left: 0;\n}\n","import {Component, ComponentInterface, Host, h} from \"@stencil/core\";\n\n/**\n * ZTbody component.\n * @slot - ZTbody content (`z-tr`).\n */\n@Component({\n tag: \"z-tbody\",\n styleUrls: [\"styles.css\", \"../../../css-components/z-table/styles.css\"],\n shadow: true,\n})\nexport class ZTbody implements ComponentInterface {\n render(): HTMLZTbodyElement {\n return (\n <Host role=\"rowgroup\">\n <slot></slot>\n </Host>\n );\n }\n}\n"],"mappings":"uHAAA,MAAMA,EAAY,IAAM,6CCAxB,MAAMA,EAAY,IAAM,6sD,MCWXC,EAAMC,EAAA,MAAAD,UAAAE,E,iFACjB,MAAAC,GACE,OACEC,EAACC,EAAI,CAAAC,IAAA,2CAACC,KAAK,YACTH,EAAA,QAAAE,IAAA,6C","ignoreList":[]}
|
package/dist/components/z-td.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{proxyCustomElement as e,HTMLElement as t,createEvent as o,h as a,Host as r,transformTag as l}from"@stencil/core/internal/client";import{P as s,e as n,B as i}from"./index2.js";import{d as c}from"./index4.js";import{d}from"./index3.js";import{d as b}from"./index16.js";const h=()=>`:host{position:relative;display:flex;max-width:100%;align-items:center;background-color:var(--color-surface01);gap:calc(var(--space-unit) * 2) var(--space-unit)}:host,*{box-sizing:border-box}:host([sticky]){position:sticky;z-index:1;top:0;left:0;box-shadow:8px 0 16px -8px var(--shadow-color-base)}:host([menu-open]){z-index:2}.cell--content{display:flex;width:100%;height:100%;align-items:center}:host([show-menu]) .cell--content{column-gap:var(--space-unit)}.cell--menu-container{margin-left:auto}:host(:not([show-menu])) .cell--menu-container{opacity:0;pointer-events:none}:host(:is([show-menu],[menu-open])) .cell--menu-container,:host([show-menu]) .cell--menu-container:focus-within{z-index:1;opacity:1;pointer-events:all}:host .cell-popover{z-index:100}@media (min-width: 768px) and (hover: hover){:host([show-menu="hover"]) .cell--menu-container{opacity:0;pointer-events:none}:host([show-menu="hover"]:hover) .cell--menu-container{z-index:1;opacity:1;pointer-events:all}}`;const f=()=>`z-table,table.z-table{background-color:var(--color-surface01);--z-table--cells-padding:calc(var(--space-unit) * 2)}table.z-table{border-collapse:collapse}z-thead,table.z-table thead{background-color:var(--color-background);--z-table--cells-bottom-border-size:var(--border-size-medium)}z-tfoot,table.z-table tfoot{border-top:var(--border-size-medium) solid var(--color-surface03);border-bottom:var(--border-size-medium) solid var(--color-surface03)}z-tfoot z-tr,table.z-table tfoot tr{border-bottom:calc(var(--z-table--cells-bottom-border-size)) solid var(--color-surface03) !important}z-tr,table.z-table tr{border-bottom:var(--z-table--cells-bottom-border-size, var(--border-size-small)) solid var(--color-surface03)}z-td,z-th,table.z-table td,table.z-table th{padding:var(--z-table--cells-padding, calc(var(--space-unit) * 2));text-align:left}z-th:not(:first-child),z-td:not(:first-child),table.z-table th:not(:first-child),table.z-table td:not(:first-child){border-left:var(--z-table--cell-left-border, none)}z-table[bordered],table.z-table.z-table-bordered{--z-table--cell-left-border:1px solid var(--color-surface03)}table.z-table-hover>tbody>tr:hover>td,table.z-table-hover>tfoot>tr:hover>td{position:relative;background-color:var(--color-surface02)}table.z-table-hover>tbody>tr:hover>td::after,table.z-table-hover>tfoot>tr:hover>td::after{position:absolute;z-index:1;top:0;right:0;bottom:0;left:-1px;box-shadow:inset 0 var(--border-size-small) 0 var(--color-surface04), inset 0 calc(var(--border-size-small) * -1) 0 var(--color-surface04);content:""}table.z-table-hover>tbody>tr:hover>td:first-child::after,table.z-table-hover>thead>tr:hover>th:first-child::after,table.z-table-hover>tfoot>tr:hover>td:first-child::after{left:0}`;const p=e(class e extends t{constructor(e){super();if(e!==false){this.__registerHost()}this.__attachShadow();this.colspanChange=o(this,"colspanChange",6);this.sticky=false;this.showMenu=null;this.popoverPosition=s.AUTO;this.isMenuOpen=false}updateColspan(){if(this.colspan){this.host.style.gridColumn=`span ${this.colspan}`}else{this.host.style.removeProperty("grid-column")}this.colspanChange.emit(this.colspan||1)}onMenuButtonClick(e){e.stopPropagation();this.popoverEl.open=!this.popoverEl.open}componentWillLoad(){this.updateColspan()}render(){return a(r,{key:"
|
|
1
|
+
import{proxyCustomElement as e,HTMLElement as t,createEvent as o,h as a,Host as r,transformTag as l}from"@stencil/core/internal/client";import{P as s,e as n,B as i}from"./index2.js";import{d as c}from"./index4.js";import{d}from"./index3.js";import{d as b}from"./index16.js";const h=()=>`:host{position:relative;display:flex;max-width:100%;align-items:center;background-color:var(--color-surface01);gap:calc(var(--space-unit) * 2) var(--space-unit)}:host,*{box-sizing:border-box}:host([sticky]){position:sticky;z-index:1;top:0;left:0;box-shadow:8px 0 16px -8px var(--shadow-color-base)}:host([menu-open]){z-index:2}.cell--content{display:flex;width:100%;height:100%;align-items:center}:host([show-menu]) .cell--content{column-gap:var(--space-unit)}.cell--menu-container{margin-left:auto}:host(:not([show-menu])) .cell--menu-container{opacity:0;pointer-events:none}:host(:is([show-menu],[menu-open])) .cell--menu-container,:host([show-menu]) .cell--menu-container:focus-within{z-index:1;opacity:1;pointer-events:all}:host .cell-popover{z-index:100}@media (min-width: 768px) and (hover: hover){:host([show-menu="hover"]) .cell--menu-container{opacity:0;pointer-events:none}:host([show-menu="hover"]:hover) .cell--menu-container{z-index:1;opacity:1;pointer-events:all}}`;const f=()=>`z-table,table.z-table{background-color:var(--color-surface01);--z-table--cells-padding:calc(var(--space-unit) * 2)}table.z-table{border-collapse:collapse}z-thead,table.z-table thead{background-color:var(--color-background);--z-table--cells-bottom-border-size:var(--border-size-medium)}z-tfoot,table.z-table tfoot{border-top:var(--border-size-medium) solid var(--color-surface03);border-bottom:var(--border-size-medium) solid var(--color-surface03)}z-tfoot z-tr,table.z-table tfoot tr{border-bottom:calc(var(--z-table--cells-bottom-border-size)) solid var(--color-surface03) !important}z-tr,table.z-table tr{border-bottom:var(--z-table--cells-bottom-border-size, var(--border-size-small)) solid var(--color-surface03)}z-td,z-th,table.z-table td,table.z-table th{padding:var(--z-table--cells-padding, calc(var(--space-unit) * 2));text-align:left}z-th:not(:first-child),z-td:not(:first-child),table.z-table th:not(:first-child),table.z-table td:not(:first-child){border-left:var(--z-table--cell-left-border, none)}z-table[bordered],table.z-table.z-table-bordered{--z-table--cell-left-border:1px solid var(--color-surface03)}table.z-table-hover>tbody>tr:hover>td,table.z-table-hover>tfoot>tr:hover>td{position:relative;background-color:var(--color-surface02)}table.z-table-hover>tbody>tr:hover>td::after,table.z-table-hover>tfoot>tr:hover>td::after{position:absolute;z-index:1;top:0;right:0;bottom:0;left:-1px;box-shadow:inset 0 var(--border-size-small) 0 var(--color-surface04), inset 0 calc(var(--border-size-small) * -1) 0 var(--color-surface04);content:""}table.z-table-hover>tbody>tr:hover>td:first-child::after,table.z-table-hover>thead>tr:hover>th:first-child::after,table.z-table-hover>tfoot>tr:hover>td:first-child::after{left:0}`;const p=e(class e extends t{constructor(e){super();if(e!==false){this.__registerHost()}this.__attachShadow();this.colspanChange=o(this,"colspanChange",6);this.sticky=false;this.showMenu=null;this.popoverPosition=s.AUTO;this.isMenuOpen=false}updateColspan(){if(this.colspan){this.host.style.gridColumn=`span ${this.colspan}`}else{this.host.style.removeProperty("grid-column")}this.colspanChange.emit(this.colspan||1)}onMenuButtonClick(e){e.stopPropagation();this.popoverEl.open=!this.popoverEl.open}componentWillLoad(){this.updateColspan()}render(){return a(r,{key:"b89fd7b33f9d928a6c60b5493ee2732edda4318c",role:"cell","menu-open":this.isMenuOpen},a("div",{key:"ac47204976e01cc5f2371d87faf4e15bbcb9b923",class:"cell--content"},a("slot",{key:"24eddf43aa23971f21dcfcae158111cbab7689e3"}),this.showMenu&&a("div",{key:"8545b4567dcd1a3a3fb8a4e0913753af0cdaaf11",class:"cell--menu-container prevent-expand"},a("z-button",{key:"2b96d9dda4c2794e1f9c7d5dc936ac1701d11ba6",variant:i.TERTIARY,icon:"contextual-menu",size:n.X_SMALL,ref:e=>this.menuTrigger=e,onClick:this.onMenuButtonClick.bind(this)}),a("z-popover",{key:"ebee2d5c76f8573362e9a912b62e238d9eef6d5a",class:"cell-popover",ref:e=>this.popoverEl=e,bindTo:this.menuTrigger,onOpenChange:e=>this.isMenuOpen=e.detail.open,position:this.popoverPosition},a("slot",{key:"b3b6392cf7d0044fc4fc3773817efe7ba46bd598",name:"contextual-menu"})))))}get host(){return this}static get watchers(){return{colspan:[{updateColspan:0}]}}static get style(){return h()+f()}},[257,"z-td",{colspan:[2],sticky:[516],showMenu:[513,"show-menu"],popoverPosition:[1,"popover-position"],isMenuOpen:[32]},undefined,{colspan:[{updateColspan:0}]}]);function u(){if(typeof customElements==="undefined"){return}const e=["z-td","z-button","z-icon","z-popover"];e.forEach((e=>{switch(e){case"z-td":if(!customElements.get(l(e))){customElements.define(l(e),p)}break;case"z-button":if(!customElements.get(l(e))){c()}break;case"z-icon":if(!customElements.get(l(e))){d()}break;case"z-popover":if(!customElements.get(l(e))){b()}break}}))}const m=p;const z=u;export{m as ZTd,z as defineCustomElement};
|
|
2
2
|
//# sourceMappingURL=z-td.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["zTableCellsCss","stylesCss","ZTd","__stencil_proxyCustomElement","HTMLElement","constructor","registerHost","this","sticky","showMenu","popoverPosition","PopoverPosition","AUTO","isMenuOpen","updateColspan","colspan","host","style","gridColumn","removeProperty","colspanChange","emit","onMenuButtonClick","ev","stopPropagation","popoverEl","open","componentWillLoad","render","h","Host","key","role","class","variant","ButtonVariant","TERTIARY","icon","size","ControlSize","X_SMALL","ref","el","menuTrigger","onClick","bind","bindTo","onOpenChange","event","detail","position","name"],"sources":["src/components/table/cells/z-table-cells.css?tag=z-td&encapsulation=shadow","src/components/css-components/z-table/styles.css?tag=z-td&encapsulation=shadow","src/components/table/cells/z-td/index.tsx"],"sourcesContent":[":host {\n position: relative;\n display: flex;\n max-width: 100%;\n align-items: center;\n background-color: var(--color-surface01);\n gap: calc(var(--space-unit) * 2) var(--space-unit);\n}\n\n:host,\n* {\n box-sizing: border-box;\n}\n\n:host([sticky]) {\n position: sticky;\n z-index: 1;\n top: 0;\n left: 0;\n box-shadow: 8px 0 16px -8px var(--shadow-color-base);\n}\n\n:host([menu-open]) {\n z-index: 2;\n}\n\n.cell--content {\n display: flex;\n width: 100%;\n height: 100%;\n align-items: center;\n}\n\n:host([show-menu]) .cell--content {\n column-gap: var(--space-unit);\n}\n\n.cell--menu-container {\n margin-left: auto;\n}\n\n:host(:not([show-menu])) .cell--menu-container {\n opacity: 0;\n pointer-events: none;\n}\n\n:host(:is([show-menu], [menu-open])) .cell--menu-container,\n:host([show-menu]) .cell--menu-container:focus-within {\n z-index: 1;\n opacity: 1;\n pointer-events: all;\n}\n\n:host .cell-popover {\n z-index: 100;\n}\n\n@media (min-width: 768px) and (hover: hover) {\n :host([show-menu=\"hover\"]) .cell--menu-container {\n opacity: 0;\n pointer-events: none;\n }\n\n :host([show-menu=\"hover\"]:hover) .cell--menu-container {\n z-index: 1;\n opacity: 1;\n pointer-events: all;\n }\n}\n","z-table,\ntable.z-table {\n background-color: var(--color-surface01);\n\n --z-table--cells-padding: calc(var(--space-unit) * 2);\n}\n\ntable.z-table {\n border-collapse: collapse;\n}\n\nz-thead,\ntable.z-table thead {\n background-color: var(--color-background);\n\n --z-table--cells-bottom-border-size: var(--border-size-medium);\n}\n\nz-tfoot,\ntable.z-table tfoot {\n border-top: var(--border-size-medium) solid var(--color-surface03);\n border-bottom: var(--border-size-medium) solid var(--color-surface03);\n}\n\nz-tfoot z-tr,\ntable.z-table tfoot tr {\n border-bottom: calc(var(--z-table--cells-bottom-border-size)) solid var(--color-surface03) !important;\n}\n\nz-tr,\ntable.z-table tr {\n border-bottom: var(--z-table--cells-bottom-border-size, var(--border-size-small)) solid var(--color-surface03);\n}\n\nz-td,\nz-th,\ntable.z-table td,\ntable.z-table th {\n padding: var(--z-table--cells-padding, calc(var(--space-unit) * 2));\n text-align: left;\n}\n\nz-th:not(:first-child),\nz-td:not(:first-child),\ntable.z-table th:not(:first-child),\ntable.z-table td:not(:first-child) {\n border-left: var(--z-table--cell-left-border, none);\n}\n\nz-table[bordered],\ntable.z-table.z-table-bordered {\n --z-table--cell-left-border: 1px solid var(--color-surface03);\n}\n\ntable.z-table-hover > tbody > tr:hover > td,\ntable.z-table-hover > tfoot > tr:hover > td {\n position: relative;\n background-color: var(--color-surface02);\n}\n\ntable.z-table-hover > tbody > tr:hover > td::after,\ntable.z-table-hover > tfoot > tr:hover > td::after {\n position: absolute;\n z-index: 1;\n top: 0;\n right: 0;\n bottom: 0;\n left: -1px;\n box-shadow:\n inset 0 var(--border-size-small) 0 var(--color-surface04),\n inset 0 calc(var(--border-size-small) * -1) 0 var(--color-surface04);\n content: \"\";\n}\n\ntable.z-table-hover > tbody > tr:hover > td:first-child::after,\ntable.z-table-hover > thead > tr:hover > th:first-child::after,\ntable.z-table-hover > tfoot > tr:hover > td:first-child::after {\n left: 0;\n}\n","import {Component, ComponentInterface, Element, Event, EventEmitter, Host, Prop, State, Watch, h} from \"@stencil/core\";\nimport {ButtonVariant, ControlSize, PopoverPosition, VisibilityCondition} from \"
|
|
1
|
+
{"version":3,"names":["zTableCellsCss","stylesCss","ZTd","__stencil_proxyCustomElement","HTMLElement","constructor","registerHost","this","sticky","showMenu","popoverPosition","PopoverPosition","AUTO","isMenuOpen","updateColspan","colspan","host","style","gridColumn","removeProperty","colspanChange","emit","onMenuButtonClick","ev","stopPropagation","popoverEl","open","componentWillLoad","render","h","Host","key","role","class","variant","ButtonVariant","TERTIARY","icon","size","ControlSize","X_SMALL","ref","el","menuTrigger","onClick","bind","bindTo","onOpenChange","event","detail","position","name"],"sources":["src/components/deprecated/table/cells/z-table-cells.css?tag=z-td&encapsulation=shadow","src/components/css-components/z-table/styles.css?tag=z-td&encapsulation=shadow","src/components/deprecated/table/cells/z-td/index.tsx"],"sourcesContent":[":host {\n position: relative;\n display: flex;\n max-width: 100%;\n align-items: center;\n background-color: var(--color-surface01);\n gap: calc(var(--space-unit) * 2) var(--space-unit);\n}\n\n:host,\n* {\n box-sizing: border-box;\n}\n\n:host([sticky]) {\n position: sticky;\n z-index: 1;\n top: 0;\n left: 0;\n box-shadow: 8px 0 16px -8px var(--shadow-color-base);\n}\n\n:host([menu-open]) {\n z-index: 2;\n}\n\n.cell--content {\n display: flex;\n width: 100%;\n height: 100%;\n align-items: center;\n}\n\n:host([show-menu]) .cell--content {\n column-gap: var(--space-unit);\n}\n\n.cell--menu-container {\n margin-left: auto;\n}\n\n:host(:not([show-menu])) .cell--menu-container {\n opacity: 0;\n pointer-events: none;\n}\n\n:host(:is([show-menu], [menu-open])) .cell--menu-container,\n:host([show-menu]) .cell--menu-container:focus-within {\n z-index: 1;\n opacity: 1;\n pointer-events: all;\n}\n\n:host .cell-popover {\n z-index: 100;\n}\n\n@media (min-width: 768px) and (hover: hover) {\n :host([show-menu=\"hover\"]) .cell--menu-container {\n opacity: 0;\n pointer-events: none;\n }\n\n :host([show-menu=\"hover\"]:hover) .cell--menu-container {\n z-index: 1;\n opacity: 1;\n pointer-events: all;\n }\n}\n","z-table,\ntable.z-table {\n background-color: var(--color-surface01);\n\n --z-table--cells-padding: calc(var(--space-unit) * 2);\n}\n\ntable.z-table {\n border-collapse: collapse;\n}\n\nz-thead,\ntable.z-table thead {\n background-color: var(--color-background);\n\n --z-table--cells-bottom-border-size: var(--border-size-medium);\n}\n\nz-tfoot,\ntable.z-table tfoot {\n border-top: var(--border-size-medium) solid var(--color-surface03);\n border-bottom: var(--border-size-medium) solid var(--color-surface03);\n}\n\nz-tfoot z-tr,\ntable.z-table tfoot tr {\n border-bottom: calc(var(--z-table--cells-bottom-border-size)) solid var(--color-surface03) !important;\n}\n\nz-tr,\ntable.z-table tr {\n border-bottom: var(--z-table--cells-bottom-border-size, var(--border-size-small)) solid var(--color-surface03);\n}\n\nz-td,\nz-th,\ntable.z-table td,\ntable.z-table th {\n padding: var(--z-table--cells-padding, calc(var(--space-unit) * 2));\n text-align: left;\n}\n\nz-th:not(:first-child),\nz-td:not(:first-child),\ntable.z-table th:not(:first-child),\ntable.z-table td:not(:first-child) {\n border-left: var(--z-table--cell-left-border, none);\n}\n\nz-table[bordered],\ntable.z-table.z-table-bordered {\n --z-table--cell-left-border: 1px solid var(--color-surface03);\n}\n\ntable.z-table-hover > tbody > tr:hover > td,\ntable.z-table-hover > tfoot > tr:hover > td {\n position: relative;\n background-color: var(--color-surface02);\n}\n\ntable.z-table-hover > tbody > tr:hover > td::after,\ntable.z-table-hover > tfoot > tr:hover > td::after {\n position: absolute;\n z-index: 1;\n top: 0;\n right: 0;\n bottom: 0;\n left: -1px;\n box-shadow:\n inset 0 var(--border-size-small) 0 var(--color-surface04),\n inset 0 calc(var(--border-size-small) * -1) 0 var(--color-surface04);\n content: \"\";\n}\n\ntable.z-table-hover > tbody > tr:hover > td:first-child::after,\ntable.z-table-hover > thead > tr:hover > th:first-child::after,\ntable.z-table-hover > tfoot > tr:hover > td:first-child::after {\n left: 0;\n}\n","import {Component, ComponentInterface, Element, Event, EventEmitter, Host, Prop, State, Watch, h} from \"@stencil/core\";\nimport {ButtonVariant, ControlSize, PopoverPosition, VisibilityCondition} from \"../../../../../beans\";\n\n/**\n * ZTd component.\n * @slot - ZTd content.\n */\n@Component({\n tag: \"z-td\",\n styleUrls: [\"../z-table-cells.css\", \"../../../../css-components/z-table/styles.css\"],\n shadow: true,\n})\nexport class ZTd implements ComponentInterface {\n @Element() host: HTMLZTdElement;\n\n /**\n * Number of columns that the cell should span.\n */\n @Prop()\n colspan: number;\n\n /**\n * Whether the cell should stick.\n */\n @Prop({reflect: true})\n sticky = false;\n\n /**\n * Enables the contextual menu.\n * Can be set to \"hover\" or \"always\" to show the button only on cell hover or always.\n * Set a nullish value to hide the menu button.\n */\n @Prop({reflect: true})\n showMenu: VisibilityCondition = null;\n\n /**\n * Set the popover position, the default is \"auto\".\n */\n @Prop()\n popoverPosition?: PopoverPosition = PopoverPosition.AUTO;\n\n /**\n * Store the open state of the menu.\n */\n @State()\n isMenuOpen = false;\n\n private menuTrigger: HTMLZButtonElement;\n\n private popoverEl: HTMLZPopoverElement;\n\n /**\n * Emitted when the value of the `colspan` changes.\n */\n @Event({\n bubbles: true,\n cancelable: false,\n })\n colspanChange: EventEmitter<number>;\n\n @Watch(\"colspan\")\n protected updateColspan(): void {\n if (this.colspan) {\n this.host.style.gridColumn = `span ${this.colspan}`;\n } else {\n this.host.style.removeProperty(\"grid-column\");\n }\n\n this.colspanChange.emit(this.colspan || 1);\n }\n\n private onMenuButtonClick(ev: MouseEvent): void {\n ev.stopPropagation();\n this.popoverEl.open = !this.popoverEl.open;\n }\n\n componentWillLoad(): void {\n this.updateColspan();\n }\n\n render(): HTMLZTdElement {\n return (\n <Host\n role=\"cell\"\n menu-open={this.isMenuOpen}\n >\n <div class=\"cell--content\">\n <slot></slot>\n {this.showMenu && (\n <div class=\"cell--menu-container prevent-expand\">\n <z-button\n variant={ButtonVariant.TERTIARY}\n icon=\"contextual-menu\"\n size={ControlSize.X_SMALL}\n ref={(el) => (this.menuTrigger = el as HTMLZButtonElement)}\n onClick={this.onMenuButtonClick.bind(this)}\n />\n <z-popover\n class=\"cell-popover\"\n ref={(el) => (this.popoverEl = el as HTMLZPopoverElement)}\n bindTo={this.menuTrigger as HTMLElement}\n onOpenChange={(event) => (this.isMenuOpen = event.detail.open)}\n position={this.popoverPosition}\n >\n <slot name=\"contextual-menu\"></slot>\n </z-popover>\n </div>\n )}\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"kRAAA,MAAMA,EAAiB,IAAM,q9BCA7B,MAAMC,EAAY,IAAM,6sD,MCYXC,EAAGC,EAAA,MAAAD,UAAAE,EALhB,WAAAC,CAAAC,G,+GAkBEC,KAAAC,OAAS,MAQTD,KAAAE,SAAgC,KAMhCF,KAAAG,gBAAoCC,EAAgBC,KAMpDL,KAAAM,WAAa,KAmEd,CAnDW,aAAAC,GACR,GAAIP,KAAKQ,QAAS,CAChBR,KAAKS,KAAKC,MAAMC,WAAa,QAAQX,KAAKQ,S,KACrC,CACLR,KAAKS,KAAKC,MAAME,eAAe,c,CAGjCZ,KAAKa,cAAcC,KAAKd,KAAKQ,SAAW,E,CAGlC,iBAAAO,CAAkBC,GACxBA,EAAGC,kBACHjB,KAAKkB,UAAUC,MAAQnB,KAAKkB,UAAUC,I,CAGxC,iBAAAC,GACEpB,KAAKO,e,CAGP,MAAAc,GACE,OACEC,EAACC,EAAI,CAAAC,IAAA,2CACHC,KAAK,OAAM,YACAzB,KAAKM,YAEhBgB,EAAA,OAAAE,IAAA,2CAAKE,MAAM,iBACTJ,EAAA,QAAAE,IAAA,6CACCxB,KAAKE,UACJoB,EAAA,OAAAE,IAAA,2CAAKE,MAAM,uCACTJ,EAAA,YAAAE,IAAA,2CACEG,QAASC,EAAcC,SACvBC,KAAK,kBACLC,KAAMC,EAAYC,QAClBC,IAAMC,GAAQnC,KAAKoC,YAAcD,EACjCE,QAASrC,KAAKe,kBAAkBuB,KAAKtC,QAEvCsB,EAAA,aAAAE,IAAA,2CACEE,MAAM,eACNQ,IAAMC,GAAQnC,KAAKkB,UAAYiB,EAC/BI,OAAQvC,KAAKoC,YACbI,aAAeC,GAAWzC,KAAKM,WAAamC,EAAMC,OAAOvB,KACzDwB,SAAU3C,KAAKG,iBAEfmB,EAAA,QAAAE,IAAA,2CAAMoB,KAAK,uB","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{proxyCustomElement as t,HTMLElement as e,h as o,Host as r,transformTag as a}from"@stencil/core/internal/client";const l=()=>`:host{display:block;box-sizing:border-box;margin-top:-1px}:host([sticky]){position:sticky;z-index:1;bottom:0;background-color:var(--color-surface01)}`;const b=()=>`z-table,table.z-table{background-color:var(--color-surface01);--z-table--cells-padding:calc(var(--space-unit) * 2)}table.z-table{border-collapse:collapse}z-thead,table.z-table thead{background-color:var(--color-background);--z-table--cells-bottom-border-size:var(--border-size-medium)}z-tfoot,table.z-table tfoot{border-top:var(--border-size-medium) solid var(--color-surface03);border-bottom:var(--border-size-medium) solid var(--color-surface03)}z-tfoot z-tr,table.z-table tfoot tr{border-bottom:calc(var(--z-table--cells-bottom-border-size)) solid var(--color-surface03) !important}z-tr,table.z-table tr{border-bottom:var(--z-table--cells-bottom-border-size, var(--border-size-small)) solid var(--color-surface03)}z-td,z-th,table.z-table td,table.z-table th{padding:var(--z-table--cells-padding, calc(var(--space-unit) * 2));text-align:left}z-th:not(:first-child),z-td:not(:first-child),table.z-table th:not(:first-child),table.z-table td:not(:first-child){border-left:var(--z-table--cell-left-border, none)}z-table[bordered],table.z-table.z-table-bordered{--z-table--cell-left-border:1px solid var(--color-surface03)}table.z-table-hover>tbody>tr:hover>td,table.z-table-hover>tfoot>tr:hover>td{position:relative;background-color:var(--color-surface02)}table.z-table-hover>tbody>tr:hover>td::after,table.z-table-hover>tfoot>tr:hover>td::after{position:absolute;z-index:1;top:0;right:0;bottom:0;left:-1px;box-shadow:inset 0 var(--border-size-small) 0 var(--color-surface04), inset 0 calc(var(--border-size-small) * -1) 0 var(--color-surface04);content:""}table.z-table-hover>tbody>tr:hover>td:first-child::after,table.z-table-hover>thead>tr:hover>th:first-child::after,table.z-table-hover>tfoot>tr:hover>td:first-child::after{left:0}`;const c=t(class t extends e{constructor(t){super();if(t!==false){this.__registerHost()}this.__attachShadow();this.sticky=false}render(){return o(r,{key:"
|
|
1
|
+
import{proxyCustomElement as t,HTMLElement as e,h as o,Host as r,transformTag as a}from"@stencil/core/internal/client";const l=()=>`:host{display:block;box-sizing:border-box;margin-top:-1px}:host([sticky]){position:sticky;z-index:1;bottom:0;background-color:var(--color-surface01)}`;const b=()=>`z-table,table.z-table{background-color:var(--color-surface01);--z-table--cells-padding:calc(var(--space-unit) * 2)}table.z-table{border-collapse:collapse}z-thead,table.z-table thead{background-color:var(--color-background);--z-table--cells-bottom-border-size:var(--border-size-medium)}z-tfoot,table.z-table tfoot{border-top:var(--border-size-medium) solid var(--color-surface03);border-bottom:var(--border-size-medium) solid var(--color-surface03)}z-tfoot z-tr,table.z-table tfoot tr{border-bottom:calc(var(--z-table--cells-bottom-border-size)) solid var(--color-surface03) !important}z-tr,table.z-table tr{border-bottom:var(--z-table--cells-bottom-border-size, var(--border-size-small)) solid var(--color-surface03)}z-td,z-th,table.z-table td,table.z-table th{padding:var(--z-table--cells-padding, calc(var(--space-unit) * 2));text-align:left}z-th:not(:first-child),z-td:not(:first-child),table.z-table th:not(:first-child),table.z-table td:not(:first-child){border-left:var(--z-table--cell-left-border, none)}z-table[bordered],table.z-table.z-table-bordered{--z-table--cell-left-border:1px solid var(--color-surface03)}table.z-table-hover>tbody>tr:hover>td,table.z-table-hover>tfoot>tr:hover>td{position:relative;background-color:var(--color-surface02)}table.z-table-hover>tbody>tr:hover>td::after,table.z-table-hover>tfoot>tr:hover>td::after{position:absolute;z-index:1;top:0;right:0;bottom:0;left:-1px;box-shadow:inset 0 var(--border-size-small) 0 var(--color-surface04), inset 0 calc(var(--border-size-small) * -1) 0 var(--color-surface04);content:""}table.z-table-hover>tbody>tr:hover>td:first-child::after,table.z-table-hover>thead>tr:hover>th:first-child::after,table.z-table-hover>tfoot>tr:hover>td:first-child::after{left:0}`;const c=t(class t extends e{constructor(t){super();if(t!==false){this.__registerHost()}this.__attachShadow();this.sticky=false}render(){return o(r,{key:"4e784c5c53424e031a4b6d2e63c86ae428b969eb",role:"rowgroup",tabIndex:-1},o("slot",{key:"62c7437baefd2cb28cc03b41dce61b9d4652691b"}))}static get style(){return l()+b()}},[257,"z-tfoot",{sticky:[516]}]);function s(){if(typeof customElements==="undefined"){return}const t=["z-tfoot"];t.forEach((t=>{switch(t){case"z-tfoot":if(!customElements.get(a(t))){customElements.define(a(t),c)}break}}))}const d=c;const i=s;export{d as ZTfoot,i as defineCustomElement};
|
|
2
2
|
//# sourceMappingURL=z-tfoot.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["stylesCss","ZTfoot","__stencil_proxyCustomElement","HTMLElement","constructor","registerHost","this","sticky","render","h","Host","key","role","tabIndex"],"sources":["src/components/table/z-tfoot/styles.css?tag=z-tfoot&encapsulation=shadow","src/components/css-components/z-table/styles.css?tag=z-tfoot&encapsulation=shadow","src/components/table/z-tfoot/index.tsx"],"sourcesContent":[":host {\n display: block;\n box-sizing: border-box;\n margin-top: -1px;\n}\n\n:host([sticky]) {\n position: sticky;\n z-index: 1;\n bottom: 0;\n background-color: var(--color-surface01);\n}\n","z-table,\ntable.z-table {\n background-color: var(--color-surface01);\n\n --z-table--cells-padding: calc(var(--space-unit) * 2);\n}\n\ntable.z-table {\n border-collapse: collapse;\n}\n\nz-thead,\ntable.z-table thead {\n background-color: var(--color-background);\n\n --z-table--cells-bottom-border-size: var(--border-size-medium);\n}\n\nz-tfoot,\ntable.z-table tfoot {\n border-top: var(--border-size-medium) solid var(--color-surface03);\n border-bottom: var(--border-size-medium) solid var(--color-surface03);\n}\n\nz-tfoot z-tr,\ntable.z-table tfoot tr {\n border-bottom: calc(var(--z-table--cells-bottom-border-size)) solid var(--color-surface03) !important;\n}\n\nz-tr,\ntable.z-table tr {\n border-bottom: var(--z-table--cells-bottom-border-size, var(--border-size-small)) solid var(--color-surface03);\n}\n\nz-td,\nz-th,\ntable.z-table td,\ntable.z-table th {\n padding: var(--z-table--cells-padding, calc(var(--space-unit) * 2));\n text-align: left;\n}\n\nz-th:not(:first-child),\nz-td:not(:first-child),\ntable.z-table th:not(:first-child),\ntable.z-table td:not(:first-child) {\n border-left: var(--z-table--cell-left-border, none);\n}\n\nz-table[bordered],\ntable.z-table.z-table-bordered {\n --z-table--cell-left-border: 1px solid var(--color-surface03);\n}\n\ntable.z-table-hover > tbody > tr:hover > td,\ntable.z-table-hover > tfoot > tr:hover > td {\n position: relative;\n background-color: var(--color-surface02);\n}\n\ntable.z-table-hover > tbody > tr:hover > td::after,\ntable.z-table-hover > tfoot > tr:hover > td::after {\n position: absolute;\n z-index: 1;\n top: 0;\n right: 0;\n bottom: 0;\n left: -1px;\n box-shadow:\n inset 0 var(--border-size-small) 0 var(--color-surface04),\n inset 0 calc(var(--border-size-small) * -1) 0 var(--color-surface04);\n content: \"\";\n}\n\ntable.z-table-hover > tbody > tr:hover > td:first-child::after,\ntable.z-table-hover > thead > tr:hover > th:first-child::after,\ntable.z-table-hover > tfoot > tr:hover > td:first-child::after {\n left: 0;\n}\n","import {Component, ComponentInterface, Host, Prop, h} from \"@stencil/core\";\n\n/**\n * ZTFoot component.\n * @slot - ZTFoot content (`z-tr`).\n */\n@Component({\n tag: \"z-tfoot\",\n styleUrls: [\"styles.css\", \"
|
|
1
|
+
{"version":3,"names":["stylesCss","ZTfoot","__stencil_proxyCustomElement","HTMLElement","constructor","registerHost","this","sticky","render","h","Host","key","role","tabIndex"],"sources":["src/components/deprecated/table/z-tfoot/styles.css?tag=z-tfoot&encapsulation=shadow","src/components/css-components/z-table/styles.css?tag=z-tfoot&encapsulation=shadow","src/components/deprecated/table/z-tfoot/index.tsx"],"sourcesContent":[":host {\n display: block;\n box-sizing: border-box;\n margin-top: -1px;\n}\n\n:host([sticky]) {\n position: sticky;\n z-index: 1;\n bottom: 0;\n background-color: var(--color-surface01);\n}\n","z-table,\ntable.z-table {\n background-color: var(--color-surface01);\n\n --z-table--cells-padding: calc(var(--space-unit) * 2);\n}\n\ntable.z-table {\n border-collapse: collapse;\n}\n\nz-thead,\ntable.z-table thead {\n background-color: var(--color-background);\n\n --z-table--cells-bottom-border-size: var(--border-size-medium);\n}\n\nz-tfoot,\ntable.z-table tfoot {\n border-top: var(--border-size-medium) solid var(--color-surface03);\n border-bottom: var(--border-size-medium) solid var(--color-surface03);\n}\n\nz-tfoot z-tr,\ntable.z-table tfoot tr {\n border-bottom: calc(var(--z-table--cells-bottom-border-size)) solid var(--color-surface03) !important;\n}\n\nz-tr,\ntable.z-table tr {\n border-bottom: var(--z-table--cells-bottom-border-size, var(--border-size-small)) solid var(--color-surface03);\n}\n\nz-td,\nz-th,\ntable.z-table td,\ntable.z-table th {\n padding: var(--z-table--cells-padding, calc(var(--space-unit) * 2));\n text-align: left;\n}\n\nz-th:not(:first-child),\nz-td:not(:first-child),\ntable.z-table th:not(:first-child),\ntable.z-table td:not(:first-child) {\n border-left: var(--z-table--cell-left-border, none);\n}\n\nz-table[bordered],\ntable.z-table.z-table-bordered {\n --z-table--cell-left-border: 1px solid var(--color-surface03);\n}\n\ntable.z-table-hover > tbody > tr:hover > td,\ntable.z-table-hover > tfoot > tr:hover > td {\n position: relative;\n background-color: var(--color-surface02);\n}\n\ntable.z-table-hover > tbody > tr:hover > td::after,\ntable.z-table-hover > tfoot > tr:hover > td::after {\n position: absolute;\n z-index: 1;\n top: 0;\n right: 0;\n bottom: 0;\n left: -1px;\n box-shadow:\n inset 0 var(--border-size-small) 0 var(--color-surface04),\n inset 0 calc(var(--border-size-small) * -1) 0 var(--color-surface04);\n content: \"\";\n}\n\ntable.z-table-hover > tbody > tr:hover > td:first-child::after,\ntable.z-table-hover > thead > tr:hover > th:first-child::after,\ntable.z-table-hover > tfoot > tr:hover > td:first-child::after {\n left: 0;\n}\n","import {Component, ComponentInterface, Host, Prop, h} from \"@stencil/core\";\n\n/**\n * ZTFoot component.\n * @slot - ZTFoot content (`z-tr`).\n */\n@Component({\n tag: \"z-tfoot\",\n styleUrls: [\"styles.css\", \"../../../css-components/z-table/styles.css\"],\n shadow: true,\n})\nexport class ZTfoot implements ComponentInterface {\n /**\n * If true, the footer will be stuck to the bottom of the table.\n */\n @Prop({reflect: true})\n sticky = false;\n\n render(): void {\n return (\n <Host\n role=\"rowgroup\"\n tabIndex={-1}\n >\n <slot></slot>\n </Host>\n );\n }\n}\n"],"mappings":"uHAAA,MAAMA,EAAY,IAAM,wJCAxB,MAAMA,EAAY,IAAM,6sD,MCWXC,EAAMC,EAAA,MAAAD,UAAAE,EALnB,WAAAC,CAAAC,G,kEAUEC,KAAAC,OAAS,KAYV,CAVC,MAAAC,GACE,OACEC,EAACC,EAAI,CAAAC,IAAA,2CACHC,KAAK,WACLC,UAAU,GAEVJ,EAAA,QAAAE,IAAA,6C","ignoreList":[]}
|
package/dist/components/z-th.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{proxyCustomElement as t,HTMLElement as e,createEvent as o,h as r,Host as s,transformTag as
|
|
1
|
+
import{proxyCustomElement as t,HTMLElement as e,createEvent as o,h as r,Host as s,transformTag as a}from"@stencil/core/internal/client";import{P as n,S as i,e as l,B as c}from"./index2.js";import{d as h}from"./index4.js";import{d as b}from"./index3.js";import{d}from"./index16.js";const u=()=>`:host{position:relative;display:flex;max-width:100%;align-items:center;background-color:var(--color-surface01);gap:calc(var(--space-unit) * 2) var(--space-unit)}:host,*{box-sizing:border-box}:host([sticky]){position:sticky;z-index:1;top:0;left:0;box-shadow:8px 0 16px -8px var(--shadow-color-base)}:host([menu-open]){z-index:2}.cell--content{display:flex;width:100%;height:100%;align-items:center}:host([show-menu]) .cell--content{column-gap:var(--space-unit)}.cell--menu-container{margin-left:auto}:host(:not([show-menu])) .cell--menu-container{opacity:0;pointer-events:none}:host(:is([show-menu],[menu-open])) .cell--menu-container,:host([show-menu]) .cell--menu-container:focus-within{z-index:1;opacity:1;pointer-events:all}:host .cell-popover{z-index:100}@media (min-width: 768px) and (hover: hover){:host([show-menu="hover"]) .cell--menu-container{opacity:0;pointer-events:none}:host([show-menu="hover"]:hover) .cell--menu-container{z-index:1;opacity:1;pointer-events:all}}`;const f=()=>`:host{z-index:1;padding:0;background-color:var(--color-background);font-weight:var(--font-sb)}:host([show-sorting]) .cell--content{column-gap:var(--space-unit)}.z-th--sort-button{position:relative;padding:0;border:none;background-color:transparent;cursor:pointer;outline:none}.z-th--sort-button:focus,.z-th--sort-button:focus-visible{box-shadow:var(--shadow-focus-primary);opacity:1;outline:none;pointer-events:all}@media (min-width: 768px) and (hover: hover){:host([show-sorting="hover"]) .z-th--sort-button{opacity:0;pointer-events:none}:host([show-sorting="hover"]:hover) .z-th--sort-button,:host([show-sorting="hover"]) .z-th--sort-button:focus:focus-visible,:host([show-sorting="always"]) .z-th--sort-button,:host([sorted]) .z-th--sort-button{opacity:1;pointer-events:all}}:host([show-sorting="hover"]:hover) .z-th--sort-button::after,:host([show-sorting="hover"]) .z-th--sort-button:focus:focus-visible::after,:host([show-sorting="always"]) .z-th--sort-button::after,:host([sorted]) .z-th--sort-button::after{position:absolute;top:6px;left:6px;width:calc(100% - 12px);height:calc(100% - 10px);background-color:transparent;content:""}`;const p=()=>`z-table,table.z-table{background-color:var(--color-surface01);--z-table--cells-padding:calc(var(--space-unit) * 2)}table.z-table{border-collapse:collapse}z-thead,table.z-table thead{background-color:var(--color-background);--z-table--cells-bottom-border-size:var(--border-size-medium)}z-tfoot,table.z-table tfoot{border-top:var(--border-size-medium) solid var(--color-surface03);border-bottom:var(--border-size-medium) solid var(--color-surface03)}z-tfoot z-tr,table.z-table tfoot tr{border-bottom:calc(var(--z-table--cells-bottom-border-size)) solid var(--color-surface03) !important}z-tr,table.z-table tr{border-bottom:var(--z-table--cells-bottom-border-size, var(--border-size-small)) solid var(--color-surface03)}z-td,z-th,table.z-table td,table.z-table th{padding:var(--z-table--cells-padding, calc(var(--space-unit) * 2));text-align:left}z-th:not(:first-child),z-td:not(:first-child),table.z-table th:not(:first-child),table.z-table td:not(:first-child){border-left:var(--z-table--cell-left-border, none)}z-table[bordered],table.z-table.z-table-bordered{--z-table--cell-left-border:1px solid var(--color-surface03)}table.z-table-hover>tbody>tr:hover>td,table.z-table-hover>tfoot>tr:hover>td{position:relative;background-color:var(--color-surface02)}table.z-table-hover>tbody>tr:hover>td::after,table.z-table-hover>tfoot>tr:hover>td::after{position:absolute;z-index:1;top:0;right:0;bottom:0;left:-1px;box-shadow:inset 0 var(--border-size-small) 0 var(--color-surface04), inset 0 calc(var(--border-size-small) * -1) 0 var(--color-surface04);content:""}table.z-table-hover>tbody>tr:hover>td:first-child::after,table.z-table-hover>thead>tr:hover>th:first-child::after,table.z-table-hover>tfoot>tr:hover>td:first-child::after{left:0}`;const v=t(class t extends e{constructor(t){super();if(t!==false){this.__registerHost()}this.__attachShadow();this.sort=o(this,"sort",7);this.showMenu=null;this.showSorting=null;this.sticky=false;this.sorted=false;this.popoverPosition=n.AUTO;this.isMenuOpen=false}get ariaSortDirection(){if(!this.sortDirection){return null}return this.sortDirection===i.ASC?"ascending":"descending"}handleSort(){if(!this.sortDirection){this.sorted=false;return}this.sortDirection=this.sortDirection===i.ASC?i.DESC:i.ASC;this.sorted=true;this.sort.emit({sortDirection:this.sortDirection})}updateColspan(){if(this.colspan){this.host.style.gridColumn=`span ${this.colspan}`}else{this.host.style.removeProperty("grid-column")}}componentWillLoad(){this.updateColspan()}render(){return r(s,{key:"b3856fa4eddacabb8829a28dc45fd90800eee5aa",role:"columnheader","menu-open":this.isMenuOpen,"aria-sort":this.ariaSortDirection,sortable:this.showSorting},r("div",{key:"03c07d8f856bb0d6a22a744d573ba6c06b30d320",class:"cell--content"},r("slot",{key:"5cbb5be6388a9c50d17f6d088768f057e198b643"}),this.showSorting&&r("button",{key:"3656e15796f432c2d7c98bf71ab3e7b08bbf249b",class:"z-th--sort-button",type:"button",onClick:this.handleSort.bind(this)},r("z-icon",{key:"107e6ada53b0affee7dcfc621cba223ad93de8c5",name:this.sortDirection===i.DESC?"arrow-simple-up":"arrow-simple-down",width:14,height:14})),this.showMenu&&r("div",{key:"ce723a0dcaaf3f6d98bbf72aa6a3ba2368978594",class:"cell--menu-container"},r("z-button",{key:"f2fa8bb2ba2a5a08c967bf383d427fde8ec7e091",variant:c.TERTIARY,icon:"contextual-menu",size:l.X_SMALL,ref:t=>this.menuTrigger=t,onClick:()=>this.popoverEl.open=!this.popoverEl.open}),r("z-popover",{key:"aba8b675b30bdcdabb6dbba68ffe6a908bf7ecce",ref:t=>this.popoverEl=t,bindTo:this.menuTrigger,onOpenChange:t=>this.isMenuOpen=t.detail.open,position:this.popoverPosition},r("slot",{key:"202c0095d1e27af68cbc2e2eab32f921dddb90fe",name:"contextual-menu"})))))}get host(){return this}static get watchers(){return{colspan:[{updateColspan:0}]}}static get style(){return u()+(f()+p())}},[257,"z-th",{colspan:[2],showMenu:[513,"show-menu"],showSorting:[513,"show-sorting"],sticky:[516],sortDirection:[1025,"sort-direction"],sorted:[1540],popoverPosition:[1,"popover-position"],isMenuOpen:[32]},undefined,{colspan:[{updateColspan:0}]}]);function z(){if(typeof customElements==="undefined"){return}const t=["z-th","z-button","z-icon","z-popover"];t.forEach((t=>{switch(t){case"z-th":if(!customElements.get(a(t))){customElements.define(a(t),v)}break;case"z-button":if(!customElements.get(a(t))){h()}break;case"z-icon":if(!customElements.get(a(t))){b()}break;case"z-popover":if(!customElements.get(a(t))){d()}break}}))}const m=v;const g=z;export{m as ZTh,g as defineCustomElement};
|
|
2
2
|
//# sourceMappingURL=z-th.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["zTableCellsCss","stylesCss","ZTh","__stencil_proxyCustomElement","HTMLElement","constructor","registerHost","this","showMenu","showSorting","sticky","sorted","popoverPosition","PopoverPosition","AUTO","isMenuOpen","ariaSortDirection","sortDirection","SortDirection","ASC","handleSort","DESC","sort","emit","updateColspan","colspan","host","style","gridColumn","removeProperty","componentWillLoad","render","h","Host","key","role","sortable","class","type","onClick","bind","name","width","height","variant","ButtonVariant","TERTIARY","icon","size","ControlSize","X_SMALL","ref","el","menuTrigger","popoverEl","open","bindTo","onOpenChange","event","detail","position"],"sources":["src/components/table/cells/z-table-cells.css?tag=z-th&encapsulation=shadow","src/components/table/cells/z-th/styles.css?tag=z-th&encapsulation=shadow","src/components/css-components/z-table/styles.css?tag=z-th&encapsulation=shadow","src/components/table/cells/z-th/index.tsx"],"sourcesContent":[":host {\n position: relative;\n display: flex;\n max-width: 100%;\n align-items: center;\n background-color: var(--color-surface01);\n gap: calc(var(--space-unit) * 2) var(--space-unit);\n}\n\n:host,\n* {\n box-sizing: border-box;\n}\n\n:host([sticky]) {\n position: sticky;\n z-index: 1;\n top: 0;\n left: 0;\n box-shadow: 8px 0 16px -8px var(--shadow-color-base);\n}\n\n:host([menu-open]) {\n z-index: 2;\n}\n\n.cell--content {\n display: flex;\n width: 100%;\n height: 100%;\n align-items: center;\n}\n\n:host([show-menu]) .cell--content {\n column-gap: var(--space-unit);\n}\n\n.cell--menu-container {\n margin-left: auto;\n}\n\n:host(:not([show-menu])) .cell--menu-container {\n opacity: 0;\n pointer-events: none;\n}\n\n:host(:is([show-menu], [menu-open])) .cell--menu-container,\n:host([show-menu]) .cell--menu-container:focus-within {\n z-index: 1;\n opacity: 1;\n pointer-events: all;\n}\n\n:host .cell-popover {\n z-index: 100;\n}\n\n@media (min-width: 768px) and (hover: hover) {\n :host([show-menu=\"hover\"]) .cell--menu-container {\n opacity: 0;\n pointer-events: none;\n }\n\n :host([show-menu=\"hover\"]:hover) .cell--menu-container {\n z-index: 1;\n opacity: 1;\n pointer-events: all;\n }\n}\n",":host {\n z-index: 1;\n padding: 0;\n background-color: var(--color-background);\n font-weight: var(--font-sb);\n}\n\n:host([show-sorting]) .cell--content {\n column-gap: var(--space-unit);\n}\n\n.z-th--sort-button {\n position: relative;\n padding: 0;\n border: none;\n background-color: transparent;\n cursor: pointer;\n outline: none;\n}\n\n.z-th--sort-button:focus,\n.z-th--sort-button:focus-visible {\n box-shadow: var(--shadow-focus-primary);\n opacity: 1;\n outline: none;\n pointer-events: all;\n}\n\n@media (min-width: 768px) and (hover: hover) {\n :host([show-sorting=\"hover\"]) .z-th--sort-button {\n opacity: 0;\n pointer-events: none;\n }\n\n :host([show-sorting=\"hover\"]:hover) .z-th--sort-button,\n :host([show-sorting=\"hover\"]) .z-th--sort-button:focus:focus-visible,\n :host([show-sorting=\"always\"]) .z-th--sort-button,\n :host([sorted]) .z-th--sort-button {\n opacity: 1;\n pointer-events: all;\n }\n}\n\n:host([show-sorting=\"hover\"]:hover) .z-th--sort-button::after,\n:host([show-sorting=\"hover\"]) .z-th--sort-button:focus:focus-visible::after,\n:host([show-sorting=\"always\"]) .z-th--sort-button::after,\n:host([sorted]) .z-th--sort-button::after {\n position: absolute;\n top: 6px;\n left: 6px;\n width: calc(100% - 12px);\n height: calc(100% - 10px);\n background-color: transparent;\n content: \"\";\n}\n","z-table,\ntable.z-table {\n background-color: var(--color-surface01);\n\n --z-table--cells-padding: calc(var(--space-unit) * 2);\n}\n\ntable.z-table {\n border-collapse: collapse;\n}\n\nz-thead,\ntable.z-table thead {\n background-color: var(--color-background);\n\n --z-table--cells-bottom-border-size: var(--border-size-medium);\n}\n\nz-tfoot,\ntable.z-table tfoot {\n border-top: var(--border-size-medium) solid var(--color-surface03);\n border-bottom: var(--border-size-medium) solid var(--color-surface03);\n}\n\nz-tfoot z-tr,\ntable.z-table tfoot tr {\n border-bottom: calc(var(--z-table--cells-bottom-border-size)) solid var(--color-surface03) !important;\n}\n\nz-tr,\ntable.z-table tr {\n border-bottom: var(--z-table--cells-bottom-border-size, var(--border-size-small)) solid var(--color-surface03);\n}\n\nz-td,\nz-th,\ntable.z-table td,\ntable.z-table th {\n padding: var(--z-table--cells-padding, calc(var(--space-unit) * 2));\n text-align: left;\n}\n\nz-th:not(:first-child),\nz-td:not(:first-child),\ntable.z-table th:not(:first-child),\ntable.z-table td:not(:first-child) {\n border-left: var(--z-table--cell-left-border, none);\n}\n\nz-table[bordered],\ntable.z-table.z-table-bordered {\n --z-table--cell-left-border: 1px solid var(--color-surface03);\n}\n\ntable.z-table-hover > tbody > tr:hover > td,\ntable.z-table-hover > tfoot > tr:hover > td {\n position: relative;\n background-color: var(--color-surface02);\n}\n\ntable.z-table-hover > tbody > tr:hover > td::after,\ntable.z-table-hover > tfoot > tr:hover > td::after {\n position: absolute;\n z-index: 1;\n top: 0;\n right: 0;\n bottom: 0;\n left: -1px;\n box-shadow:\n inset 0 var(--border-size-small) 0 var(--color-surface04),\n inset 0 calc(var(--border-size-small) * -1) 0 var(--color-surface04);\n content: \"\";\n}\n\ntable.z-table-hover > tbody > tr:hover > td:first-child::after,\ntable.z-table-hover > thead > tr:hover > th:first-child::after,\ntable.z-table-hover > tfoot > tr:hover > td:first-child::after {\n left: 0;\n}\n","import {Component, ComponentInterface, Element, Event, EventEmitter, Host, Prop, State, Watch, h} from \"@stencil/core\";\nimport {ButtonVariant, ControlSize, PopoverPosition, SortDirection, VisibilityCondition} from \"../../../../beans\";\n\n/**\n * ZTh component.\n * @slot - ZTh content.\n * @slot contextual-menu - Contextual menu content. Only visible when `showMenu` is true.\n */\n@Component({\n tag: \"z-th\",\n styleUrls: [\"../z-table-cells.css\", \"styles.css\", \"../../../css-components/z-table/styles.css\"],\n shadow: true,\n})\nexport class ZTh implements ComponentInterface {\n @Element() host: HTMLZThElement;\n\n /**\n * Number of columns that the cell should span.\n */\n @Prop()\n colspan: number;\n\n /**\n * Enables the contextual menu.\n * Can be set to \"hover\" or \"always\" to show the button only on cell hover or always.\n * Set a nullish value to hide the menu button.\n */\n @Prop({reflect: true})\n showMenu: VisibilityCondition = null;\n\n /**\n * Enables the sorting button.\n * Can be set to \"hover\" or \"always\" to show the button only on cell hover or always.\n * Set a nullish value to hide the sort button.\n */\n @Prop({reflect: true})\n showSorting: VisibilityCondition = null;\n\n /**\n * Whether the cell should stick.\n */\n @Prop({reflect: true})\n sticky = false;\n\n /**\n * Current sorting direction.\n */\n @Prop({mutable: true})\n sortDirection?: SortDirection;\n\n /**\n * Sorted state of the column.\n */\n @Prop({reflect: true, mutable: true})\n sorted: boolean | null = false;\n\n /**\n * Set popover position.\n */\n @Prop()\n popoverPosition = PopoverPosition.AUTO;\n\n /**\n * Store the open state of the menu.\n */\n @State()\n isMenuOpen = false;\n\n /**\n * Sort event fired when the user clicks on the sort button.\n * The sorting logic must be implemented by the app.\n * You can set an `id` on the `z-th` to easly identify the column in the event listener.\n */\n @Event()\n private sort: EventEmitter;\n\n private menuTrigger: HTMLElement;\n\n private popoverEl: HTMLZPopoverElement;\n\n /**\n * Get the value to set to the `aria-sort` attribute based on the current sort direction.\n */\n private get ariaSortDirection(): string {\n if (!this.sortDirection) {\n return null;\n }\n\n return this.sortDirection === SortDirection.ASC ? \"ascending\" : \"descending\";\n }\n\n /**\n * Handle the click on the sort button.\n * @fires sort\n */\n private handleSort(): void {\n if (!this.sortDirection) {\n this.sorted = false;\n\n return;\n }\n\n this.sortDirection = this.sortDirection === SortDirection.ASC ? SortDirection.DESC : SortDirection.ASC;\n this.sorted = true;\n\n this.sort.emit({sortDirection: this.sortDirection});\n }\n\n @Watch(\"colspan\")\n protected updateColspan(): void {\n if (this.colspan) {\n this.host.style.gridColumn = `span ${this.colspan}`;\n } else {\n this.host.style.removeProperty(\"grid-column\");\n }\n }\n\n componentWillLoad(): void {\n this.updateColspan();\n }\n\n render(): HTMLZThElement {\n return (\n <Host\n role=\"columnheader\"\n menu-open={this.isMenuOpen}\n aria-sort={this.ariaSortDirection}\n sortable={this.showSorting}\n >\n <div class=\"cell--content\">\n <slot></slot>\n {this.showSorting && (\n <button\n class=\"z-th--sort-button\"\n type=\"button\"\n onClick={this.handleSort.bind(this)}\n >\n <z-icon\n name={this.sortDirection === SortDirection.DESC ? \"arrow-simple-up\" : \"arrow-simple-down\"}\n width={14}\n height={14}\n />\n </button>\n )}\n {this.showMenu && (\n <div class=\"cell--menu-container\">\n <z-button\n variant={ButtonVariant.TERTIARY}\n icon=\"contextual-menu\"\n size={ControlSize.X_SMALL}\n ref={(el) => (this.menuTrigger = el as HTMLElement)}\n onClick={() => (this.popoverEl.open = !this.popoverEl.open)}\n />\n <z-popover\n ref={(el) => (this.popoverEl = el as HTMLZPopoverElement)}\n bindTo={this.menuTrigger}\n onOpenChange={(event) => (this.isMenuOpen = event.detail.open)}\n position={this.popoverPosition}\n >\n <slot name=\"contextual-menu\"></slot>\n </z-popover>\n </div>\n )}\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"yRAAA,MAAMA,EAAiB,IAAM,q9BCA7B,MAAMC,EAAY,IAAM,snCCAxB,MAAMA,EAAY,IAAM,6sD,MCaXC,EAAGC,EAAA,MAAAD,UAAAE,EALhB,WAAAC,CAAAC,G,6FAoBEC,KAAAC,SAAgC,KAQhCD,KAAAE,YAAmC,KAMnCF,KAAAG,OAAS,MAYTH,KAAAI,OAAyB,MAMzBJ,KAAAK,gBAAkBC,EAAgBC,KAMlCP,KAAAQ,WAAa,KAqGd,CApFC,qBAAYC,GACV,IAAKT,KAAKU,cAAe,CACvB,OAAO,I,CAGT,OAAOV,KAAKU,gBAAkBC,EAAcC,IAAM,YAAc,Y,CAO1D,UAAAC,GACN,IAAKb,KAAKU,cAAe,CACvBV,KAAKI,OAAS,MAEd,M,CAGFJ,KAAKU,cAAgBV,KAAKU,gBAAkBC,EAAcC,IAAMD,EAAcG,KAAOH,EAAcC,IACnGZ,KAAKI,OAAS,KAEdJ,KAAKe,KAAKC,KAAK,CAACN,cAAeV,KAAKU,e,CAI5B,aAAAO,GACR,GAAIjB,KAAKkB,QAAS,CAChBlB,KAAKmB,KAAKC,MAAMC,WAAa,QAAQrB,KAAKkB,S,KACrC,CACLlB,KAAKmB,KAAKC,MAAME,eAAe,c,EAInC,iBAAAC,GACEvB,KAAKiB,e,CAGP,MAAAO,GACE,OACEC,EAACC,EAAI,CAAAC,IAAA,2CACHC,KAAK,eAAc,YACR5B,KAAKQ,WAAU,YACfR,KAAKS,kBAChBoB,SAAU7B,KAAKE,aAEfuB,EAAA,OAAAE,IAAA,2CAAKG,MAAM,iBACTL,EAAA,QAAAE,IAAA,6CACC3B,KAAKE,aACJuB,EAAA,UAAAE,IAAA,2CACEG,MAAM,oBACNC,KAAK,SACLC,QAAShC,KAAKa,WAAWoB,KAAKjC,OAE9ByB,EAAA,UAAAE,IAAA,2CACEO,KAAMlC,KAAKU,gBAAkBC,EAAcG,KAAO,kBAAoB,oBACtEqB,MAAO,GACPC,OAAQ,MAIbpC,KAAKC,UACJwB,EAAA,OAAAE,IAAA,2CAAKG,MAAM,wBACTL,EAAA,YAAAE,IAAA,2CACEU,QAASC,EAAcC,SACvBC,KAAK,kBACLC,KAAMC,EAAYC,QAClBC,IAAMC,GAAQ7C,KAAK8C,YAAcD,EACjCb,QAAS,IAAOhC,KAAK+C,UAAUC,MAAQhD,KAAK+C,UAAUC,OAExDvB,EAAA,aAAAE,IAAA,2CACEiB,IAAMC,GAAQ7C,KAAK+C,UAAYF,EAC/BI,OAAQjD,KAAK8C,YACbI,aAAeC,GAAWnD,KAAKQ,WAAa2C,EAAMC,OAAOJ,KACzDK,SAAUrD,KAAKK,iBAEfoB,EAAA,QAAAE,IAAA,2CAAMO,KAAK,uB","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["zTableCellsCss","stylesCss","ZTh","__stencil_proxyCustomElement","HTMLElement","constructor","registerHost","this","showMenu","showSorting","sticky","sorted","popoverPosition","PopoverPosition","AUTO","isMenuOpen","ariaSortDirection","sortDirection","SortDirection","ASC","handleSort","DESC","sort","emit","updateColspan","colspan","host","style","gridColumn","removeProperty","componentWillLoad","render","h","Host","key","role","sortable","class","type","onClick","bind","name","width","height","variant","ButtonVariant","TERTIARY","icon","size","ControlSize","X_SMALL","ref","el","menuTrigger","popoverEl","open","bindTo","onOpenChange","event","detail","position"],"sources":["src/components/deprecated/table/cells/z-table-cells.css?tag=z-th&encapsulation=shadow","src/components/deprecated/table/cells/z-th/styles.css?tag=z-th&encapsulation=shadow","src/components/css-components/z-table/styles.css?tag=z-th&encapsulation=shadow","src/components/deprecated/table/cells/z-th/index.tsx"],"sourcesContent":[":host {\n position: relative;\n display: flex;\n max-width: 100%;\n align-items: center;\n background-color: var(--color-surface01);\n gap: calc(var(--space-unit) * 2) var(--space-unit);\n}\n\n:host,\n* {\n box-sizing: border-box;\n}\n\n:host([sticky]) {\n position: sticky;\n z-index: 1;\n top: 0;\n left: 0;\n box-shadow: 8px 0 16px -8px var(--shadow-color-base);\n}\n\n:host([menu-open]) {\n z-index: 2;\n}\n\n.cell--content {\n display: flex;\n width: 100%;\n height: 100%;\n align-items: center;\n}\n\n:host([show-menu]) .cell--content {\n column-gap: var(--space-unit);\n}\n\n.cell--menu-container {\n margin-left: auto;\n}\n\n:host(:not([show-menu])) .cell--menu-container {\n opacity: 0;\n pointer-events: none;\n}\n\n:host(:is([show-menu], [menu-open])) .cell--menu-container,\n:host([show-menu]) .cell--menu-container:focus-within {\n z-index: 1;\n opacity: 1;\n pointer-events: all;\n}\n\n:host .cell-popover {\n z-index: 100;\n}\n\n@media (min-width: 768px) and (hover: hover) {\n :host([show-menu=\"hover\"]) .cell--menu-container {\n opacity: 0;\n pointer-events: none;\n }\n\n :host([show-menu=\"hover\"]:hover) .cell--menu-container {\n z-index: 1;\n opacity: 1;\n pointer-events: all;\n }\n}\n",":host {\n z-index: 1;\n padding: 0;\n background-color: var(--color-background);\n font-weight: var(--font-sb);\n}\n\n:host([show-sorting]) .cell--content {\n column-gap: var(--space-unit);\n}\n\n.z-th--sort-button {\n position: relative;\n padding: 0;\n border: none;\n background-color: transparent;\n cursor: pointer;\n outline: none;\n}\n\n.z-th--sort-button:focus,\n.z-th--sort-button:focus-visible {\n box-shadow: var(--shadow-focus-primary);\n opacity: 1;\n outline: none;\n pointer-events: all;\n}\n\n@media (min-width: 768px) and (hover: hover) {\n :host([show-sorting=\"hover\"]) .z-th--sort-button {\n opacity: 0;\n pointer-events: none;\n }\n\n :host([show-sorting=\"hover\"]:hover) .z-th--sort-button,\n :host([show-sorting=\"hover\"]) .z-th--sort-button:focus:focus-visible,\n :host([show-sorting=\"always\"]) .z-th--sort-button,\n :host([sorted]) .z-th--sort-button {\n opacity: 1;\n pointer-events: all;\n }\n}\n\n:host([show-sorting=\"hover\"]:hover) .z-th--sort-button::after,\n:host([show-sorting=\"hover\"]) .z-th--sort-button:focus:focus-visible::after,\n:host([show-sorting=\"always\"]) .z-th--sort-button::after,\n:host([sorted]) .z-th--sort-button::after {\n position: absolute;\n top: 6px;\n left: 6px;\n width: calc(100% - 12px);\n height: calc(100% - 10px);\n background-color: transparent;\n content: \"\";\n}\n","z-table,\ntable.z-table {\n background-color: var(--color-surface01);\n\n --z-table--cells-padding: calc(var(--space-unit) * 2);\n}\n\ntable.z-table {\n border-collapse: collapse;\n}\n\nz-thead,\ntable.z-table thead {\n background-color: var(--color-background);\n\n --z-table--cells-bottom-border-size: var(--border-size-medium);\n}\n\nz-tfoot,\ntable.z-table tfoot {\n border-top: var(--border-size-medium) solid var(--color-surface03);\n border-bottom: var(--border-size-medium) solid var(--color-surface03);\n}\n\nz-tfoot z-tr,\ntable.z-table tfoot tr {\n border-bottom: calc(var(--z-table--cells-bottom-border-size)) solid var(--color-surface03) !important;\n}\n\nz-tr,\ntable.z-table tr {\n border-bottom: var(--z-table--cells-bottom-border-size, var(--border-size-small)) solid var(--color-surface03);\n}\n\nz-td,\nz-th,\ntable.z-table td,\ntable.z-table th {\n padding: var(--z-table--cells-padding, calc(var(--space-unit) * 2));\n text-align: left;\n}\n\nz-th:not(:first-child),\nz-td:not(:first-child),\ntable.z-table th:not(:first-child),\ntable.z-table td:not(:first-child) {\n border-left: var(--z-table--cell-left-border, none);\n}\n\nz-table[bordered],\ntable.z-table.z-table-bordered {\n --z-table--cell-left-border: 1px solid var(--color-surface03);\n}\n\ntable.z-table-hover > tbody > tr:hover > td,\ntable.z-table-hover > tfoot > tr:hover > td {\n position: relative;\n background-color: var(--color-surface02);\n}\n\ntable.z-table-hover > tbody > tr:hover > td::after,\ntable.z-table-hover > tfoot > tr:hover > td::after {\n position: absolute;\n z-index: 1;\n top: 0;\n right: 0;\n bottom: 0;\n left: -1px;\n box-shadow:\n inset 0 var(--border-size-small) 0 var(--color-surface04),\n inset 0 calc(var(--border-size-small) * -1) 0 var(--color-surface04);\n content: \"\";\n}\n\ntable.z-table-hover > tbody > tr:hover > td:first-child::after,\ntable.z-table-hover > thead > tr:hover > th:first-child::after,\ntable.z-table-hover > tfoot > tr:hover > td:first-child::after {\n left: 0;\n}\n","import {Component, ComponentInterface, Element, Event, EventEmitter, Host, Prop, State, Watch, h} from \"@stencil/core\";\nimport {ButtonVariant, ControlSize, PopoverPosition, SortDirection, VisibilityCondition} from \"../../../../../beans\";\n\n/**\n * ZTh component.\n * @slot - ZTh content.\n * @slot contextual-menu - Contextual menu content. Only visible when `showMenu` is true.\n */\n@Component({\n tag: \"z-th\",\n styleUrls: [\"../z-table-cells.css\", \"styles.css\", \"../../../../css-components/z-table/styles.css\"],\n shadow: true,\n})\nexport class ZTh implements ComponentInterface {\n @Element() host: HTMLZThElement;\n\n /**\n * Number of columns that the cell should span.\n */\n @Prop()\n colspan: number;\n\n /**\n * Enables the contextual menu.\n * Can be set to \"hover\" or \"always\" to show the button only on cell hover or always.\n * Set a nullish value to hide the menu button.\n */\n @Prop({reflect: true})\n showMenu: VisibilityCondition = null;\n\n /**\n * Enables the sorting button.\n * Can be set to \"hover\" or \"always\" to show the button only on cell hover or always.\n * Set a nullish value to hide the sort button.\n */\n @Prop({reflect: true})\n showSorting: VisibilityCondition = null;\n\n /**\n * Whether the cell should stick.\n */\n @Prop({reflect: true})\n sticky = false;\n\n /**\n * Current sorting direction.\n */\n @Prop({mutable: true})\n sortDirection?: SortDirection;\n\n /**\n * Sorted state of the column.\n */\n @Prop({reflect: true, mutable: true})\n sorted: boolean | null = false;\n\n /**\n * Set popover position.\n */\n @Prop()\n popoverPosition = PopoverPosition.AUTO;\n\n /**\n * Store the open state of the menu.\n */\n @State()\n isMenuOpen = false;\n\n /**\n * Sort event fired when the user clicks on the sort button.\n * The sorting logic must be implemented by the app.\n * You can set an `id` on the `z-th` to easly identify the column in the event listener.\n */\n @Event()\n private sort: EventEmitter;\n\n private menuTrigger: HTMLElement;\n\n private popoverEl: HTMLZPopoverElement;\n\n /**\n * Get the value to set to the `aria-sort` attribute based on the current sort direction.\n */\n private get ariaSortDirection(): string {\n if (!this.sortDirection) {\n return null;\n }\n\n return this.sortDirection === SortDirection.ASC ? \"ascending\" : \"descending\";\n }\n\n /**\n * Handle the click on the sort button.\n * @fires sort\n */\n private handleSort(): void {\n if (!this.sortDirection) {\n this.sorted = false;\n\n return;\n }\n\n this.sortDirection = this.sortDirection === SortDirection.ASC ? SortDirection.DESC : SortDirection.ASC;\n this.sorted = true;\n\n this.sort.emit({sortDirection: this.sortDirection});\n }\n\n @Watch(\"colspan\")\n protected updateColspan(): void {\n if (this.colspan) {\n this.host.style.gridColumn = `span ${this.colspan}`;\n } else {\n this.host.style.removeProperty(\"grid-column\");\n }\n }\n\n componentWillLoad(): void {\n this.updateColspan();\n }\n\n render(): HTMLZThElement {\n return (\n <Host\n role=\"columnheader\"\n menu-open={this.isMenuOpen}\n aria-sort={this.ariaSortDirection}\n sortable={this.showSorting}\n >\n <div class=\"cell--content\">\n <slot></slot>\n {this.showSorting && (\n <button\n class=\"z-th--sort-button\"\n type=\"button\"\n onClick={this.handleSort.bind(this)}\n >\n <z-icon\n name={this.sortDirection === SortDirection.DESC ? \"arrow-simple-up\" : \"arrow-simple-down\"}\n width={14}\n height={14}\n />\n </button>\n )}\n {this.showMenu && (\n <div class=\"cell--menu-container\">\n <z-button\n variant={ButtonVariant.TERTIARY}\n icon=\"contextual-menu\"\n size={ControlSize.X_SMALL}\n ref={(el) => (this.menuTrigger = el as HTMLElement)}\n onClick={() => (this.popoverEl.open = !this.popoverEl.open)}\n />\n <z-popover\n ref={(el) => (this.popoverEl = el as HTMLZPopoverElement)}\n bindTo={this.menuTrigger}\n onOpenChange={(event) => (this.isMenuOpen = event.detail.open)}\n position={this.popoverPosition}\n >\n <slot name=\"contextual-menu\"></slot>\n </z-popover>\n </div>\n )}\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"yRAAA,MAAMA,EAAiB,IAAM,q9BCA7B,MAAMC,EAAY,IAAM,snCCAxB,MAAMA,EAAY,IAAM,6sD,MCaXC,EAAGC,EAAA,MAAAD,UAAAE,EALhB,WAAAC,CAAAC,G,6FAoBEC,KAAAC,SAAgC,KAQhCD,KAAAE,YAAmC,KAMnCF,KAAAG,OAAS,MAYTH,KAAAI,OAAyB,MAMzBJ,KAAAK,gBAAkBC,EAAgBC,KAMlCP,KAAAQ,WAAa,KAqGd,CApFC,qBAAYC,GACV,IAAKT,KAAKU,cAAe,CACvB,OAAO,I,CAGT,OAAOV,KAAKU,gBAAkBC,EAAcC,IAAM,YAAc,Y,CAO1D,UAAAC,GACN,IAAKb,KAAKU,cAAe,CACvBV,KAAKI,OAAS,MAEd,M,CAGFJ,KAAKU,cAAgBV,KAAKU,gBAAkBC,EAAcC,IAAMD,EAAcG,KAAOH,EAAcC,IACnGZ,KAAKI,OAAS,KAEdJ,KAAKe,KAAKC,KAAK,CAACN,cAAeV,KAAKU,e,CAI5B,aAAAO,GACR,GAAIjB,KAAKkB,QAAS,CAChBlB,KAAKmB,KAAKC,MAAMC,WAAa,QAAQrB,KAAKkB,S,KACrC,CACLlB,KAAKmB,KAAKC,MAAME,eAAe,c,EAInC,iBAAAC,GACEvB,KAAKiB,e,CAGP,MAAAO,GACE,OACEC,EAACC,EAAI,CAAAC,IAAA,2CACHC,KAAK,eAAc,YACR5B,KAAKQ,WAAU,YACfR,KAAKS,kBAChBoB,SAAU7B,KAAKE,aAEfuB,EAAA,OAAAE,IAAA,2CAAKG,MAAM,iBACTL,EAAA,QAAAE,IAAA,6CACC3B,KAAKE,aACJuB,EAAA,UAAAE,IAAA,2CACEG,MAAM,oBACNC,KAAK,SACLC,QAAShC,KAAKa,WAAWoB,KAAKjC,OAE9ByB,EAAA,UAAAE,IAAA,2CACEO,KAAMlC,KAAKU,gBAAkBC,EAAcG,KAAO,kBAAoB,oBACtEqB,MAAO,GACPC,OAAQ,MAIbpC,KAAKC,UACJwB,EAAA,OAAAE,IAAA,2CAAKG,MAAM,wBACTL,EAAA,YAAAE,IAAA,2CACEU,QAASC,EAAcC,SACvBC,KAAK,kBACLC,KAAMC,EAAYC,QAClBC,IAAMC,GAAQ7C,KAAK8C,YAAcD,EACjCb,QAAS,IAAOhC,KAAK+C,UAAUC,MAAQhD,KAAK+C,UAAUC,OAExDvB,EAAA,aAAAE,IAAA,2CACEiB,IAAMC,GAAQ7C,KAAK+C,UAAYF,EAC/BI,OAAQjD,KAAK8C,YACbI,aAAeC,GAAWnD,KAAKQ,WAAa2C,EAAMC,OAAOJ,KACzDK,SAAUrD,KAAKK,iBAEfoB,EAAA,QAAAE,IAAA,2CAAMO,KAAK,uB","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{proxyCustomElement as t,HTMLElement as e,h as o,Host as r,transformTag as a}from"@stencil/core/internal/client";const l=()=>`:host{--z-table--cells-background:var( --color-background );display:block;box-sizing:border-box}:host([sticky]){position:sticky;z-index:2;top:0;box-shadow:0 2px 4px -2px var(--shadow-color-base)}:host(:focus-visible){box-shadow:none;outline:none}`;const
|
|
1
|
+
import{proxyCustomElement as t,HTMLElement as e,h as o,Host as r,transformTag as a}from"@stencil/core/internal/client";const l=()=>`:host{--z-table--cells-background:var( --color-background );display:block;box-sizing:border-box}:host([sticky]){position:sticky;z-index:2;top:0;box-shadow:0 2px 4px -2px var(--shadow-color-base)}:host(:focus-visible){box-shadow:none;outline:none}`;const s=()=>`z-table,table.z-table{background-color:var(--color-surface01);--z-table--cells-padding:calc(var(--space-unit) * 2)}table.z-table{border-collapse:collapse}z-thead,table.z-table thead{background-color:var(--color-background);--z-table--cells-bottom-border-size:var(--border-size-medium)}z-tfoot,table.z-table tfoot{border-top:var(--border-size-medium) solid var(--color-surface03);border-bottom:var(--border-size-medium) solid var(--color-surface03)}z-tfoot z-tr,table.z-table tfoot tr{border-bottom:calc(var(--z-table--cells-bottom-border-size)) solid var(--color-surface03) !important}z-tr,table.z-table tr{border-bottom:var(--z-table--cells-bottom-border-size, var(--border-size-small)) solid var(--color-surface03)}z-td,z-th,table.z-table td,table.z-table th{padding:var(--z-table--cells-padding, calc(var(--space-unit) * 2));text-align:left}z-th:not(:first-child),z-td:not(:first-child),table.z-table th:not(:first-child),table.z-table td:not(:first-child){border-left:var(--z-table--cell-left-border, none)}z-table[bordered],table.z-table.z-table-bordered{--z-table--cell-left-border:1px solid var(--color-surface03)}table.z-table-hover>tbody>tr:hover>td,table.z-table-hover>tfoot>tr:hover>td{position:relative;background-color:var(--color-surface02)}table.z-table-hover>tbody>tr:hover>td::after,table.z-table-hover>tfoot>tr:hover>td::after{position:absolute;z-index:1;top:0;right:0;bottom:0;left:-1px;box-shadow:inset 0 var(--border-size-small) 0 var(--color-surface04), inset 0 calc(var(--border-size-small) * -1) 0 var(--color-surface04);content:""}table.z-table-hover>tbody>tr:hover>td:first-child::after,table.z-table-hover>thead>tr:hover>th:first-child::after,table.z-table-hover>tfoot>tr:hover>td:first-child::after{left:0}`;const b=t(class t extends e{constructor(t){super();if(t!==false){this.__registerHost()}this.__attachShadow();this.sticky=false;this.isFocusable=false}render(){return o(r,{key:"e641c319d493efee56982ea55d6ae60117f9d948",role:"rowgroup",tabIndex:this.isFocusable?0:-1},o("slot",{key:"1415fe921596b94939a2d9328f687b1653339cb2"}))}get host(){return this}static get style(){return l()+s()}},[257,"z-thead",{sticky:[516],isFocusable:[516,"is-focusable"]}]);function c(){if(typeof customElements==="undefined"){return}const t=["z-thead"];t.forEach((t=>{switch(t){case"z-thead":if(!customElements.get(a(t))){customElements.define(a(t),b)}break}}))}const d=b;const i=c;export{d as ZThead,i as defineCustomElement};
|
|
2
2
|
//# sourceMappingURL=z-thead.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["stylesCss","ZThead","__stencil_proxyCustomElement","HTMLElement","constructor","registerHost","this","sticky","isFocusable","render","h","Host","key","role","tabIndex"],"sources":["src/components/table/z-thead/styles.css?tag=z-thead&encapsulation=shadow","src/components/css-components/z-table/styles.css?tag=z-thead&encapsulation=shadow","src/components/table/z-thead/index.tsx"],"sourcesContent":[":host {\n --z-table--cells-background: var(\n --color-background\n ); /* Needed to handle the background-color of the expand button cell */\n\n display: block;\n box-sizing: border-box;\n}\n\n:host([sticky]) {\n position: sticky;\n z-index: 2;\n top: 0;\n box-shadow: 0 2px 4px -2px var(--shadow-color-base);\n}\n\n:host(:focus-visible) {\n box-shadow: none;\n outline: none;\n}\n","z-table,\ntable.z-table {\n background-color: var(--color-surface01);\n\n --z-table--cells-padding: calc(var(--space-unit) * 2);\n}\n\ntable.z-table {\n border-collapse: collapse;\n}\n\nz-thead,\ntable.z-table thead {\n background-color: var(--color-background);\n\n --z-table--cells-bottom-border-size: var(--border-size-medium);\n}\n\nz-tfoot,\ntable.z-table tfoot {\n border-top: var(--border-size-medium) solid var(--color-surface03);\n border-bottom: var(--border-size-medium) solid var(--color-surface03);\n}\n\nz-tfoot z-tr,\ntable.z-table tfoot tr {\n border-bottom: calc(var(--z-table--cells-bottom-border-size)) solid var(--color-surface03) !important;\n}\n\nz-tr,\ntable.z-table tr {\n border-bottom: var(--z-table--cells-bottom-border-size, var(--border-size-small)) solid var(--color-surface03);\n}\n\nz-td,\nz-th,\ntable.z-table td,\ntable.z-table th {\n padding: var(--z-table--cells-padding, calc(var(--space-unit) * 2));\n text-align: left;\n}\n\nz-th:not(:first-child),\nz-td:not(:first-child),\ntable.z-table th:not(:first-child),\ntable.z-table td:not(:first-child) {\n border-left: var(--z-table--cell-left-border, none);\n}\n\nz-table[bordered],\ntable.z-table.z-table-bordered {\n --z-table--cell-left-border: 1px solid var(--color-surface03);\n}\n\ntable.z-table-hover > tbody > tr:hover > td,\ntable.z-table-hover > tfoot > tr:hover > td {\n position: relative;\n background-color: var(--color-surface02);\n}\n\ntable.z-table-hover > tbody > tr:hover > td::after,\ntable.z-table-hover > tfoot > tr:hover > td::after {\n position: absolute;\n z-index: 1;\n top: 0;\n right: 0;\n bottom: 0;\n left: -1px;\n box-shadow:\n inset 0 var(--border-size-small) 0 var(--color-surface04),\n inset 0 calc(var(--border-size-small) * -1) 0 var(--color-surface04);\n content: \"\";\n}\n\ntable.z-table-hover > tbody > tr:hover > td:first-child::after,\ntable.z-table-hover > thead > tr:hover > th:first-child::after,\ntable.z-table-hover > tfoot > tr:hover > td:first-child::after {\n left: 0;\n}\n","import {Component, ComponentInterface, Element, Host, Prop, h} from \"@stencil/core\";\n\n/**\n * ZThead component.\n * @slot - ZThead content (`z-tr`).\n */\n@Component({\n tag: \"z-thead\",\n styleUrls: [\"styles.css\", \"
|
|
1
|
+
{"version":3,"names":["stylesCss","ZThead","__stencil_proxyCustomElement","HTMLElement","constructor","registerHost","this","sticky","isFocusable","render","h","Host","key","role","tabIndex"],"sources":["src/components/deprecated/table/z-thead/styles.css?tag=z-thead&encapsulation=shadow","src/components/css-components/z-table/styles.css?tag=z-thead&encapsulation=shadow","src/components/deprecated/table/z-thead/index.tsx"],"sourcesContent":[":host {\n --z-table--cells-background: var(\n --color-background\n ); /* Needed to handle the background-color of the expand button cell */\n\n display: block;\n box-sizing: border-box;\n}\n\n:host([sticky]) {\n position: sticky;\n z-index: 2;\n top: 0;\n box-shadow: 0 2px 4px -2px var(--shadow-color-base);\n}\n\n:host(:focus-visible) {\n box-shadow: none;\n outline: none;\n}\n","z-table,\ntable.z-table {\n background-color: var(--color-surface01);\n\n --z-table--cells-padding: calc(var(--space-unit) * 2);\n}\n\ntable.z-table {\n border-collapse: collapse;\n}\n\nz-thead,\ntable.z-table thead {\n background-color: var(--color-background);\n\n --z-table--cells-bottom-border-size: var(--border-size-medium);\n}\n\nz-tfoot,\ntable.z-table tfoot {\n border-top: var(--border-size-medium) solid var(--color-surface03);\n border-bottom: var(--border-size-medium) solid var(--color-surface03);\n}\n\nz-tfoot z-tr,\ntable.z-table tfoot tr {\n border-bottom: calc(var(--z-table--cells-bottom-border-size)) solid var(--color-surface03) !important;\n}\n\nz-tr,\ntable.z-table tr {\n border-bottom: var(--z-table--cells-bottom-border-size, var(--border-size-small)) solid var(--color-surface03);\n}\n\nz-td,\nz-th,\ntable.z-table td,\ntable.z-table th {\n padding: var(--z-table--cells-padding, calc(var(--space-unit) * 2));\n text-align: left;\n}\n\nz-th:not(:first-child),\nz-td:not(:first-child),\ntable.z-table th:not(:first-child),\ntable.z-table td:not(:first-child) {\n border-left: var(--z-table--cell-left-border, none);\n}\n\nz-table[bordered],\ntable.z-table.z-table-bordered {\n --z-table--cell-left-border: 1px solid var(--color-surface03);\n}\n\ntable.z-table-hover > tbody > tr:hover > td,\ntable.z-table-hover > tfoot > tr:hover > td {\n position: relative;\n background-color: var(--color-surface02);\n}\n\ntable.z-table-hover > tbody > tr:hover > td::after,\ntable.z-table-hover > tfoot > tr:hover > td::after {\n position: absolute;\n z-index: 1;\n top: 0;\n right: 0;\n bottom: 0;\n left: -1px;\n box-shadow:\n inset 0 var(--border-size-small) 0 var(--color-surface04),\n inset 0 calc(var(--border-size-small) * -1) 0 var(--color-surface04);\n content: \"\";\n}\n\ntable.z-table-hover > tbody > tr:hover > td:first-child::after,\ntable.z-table-hover > thead > tr:hover > th:first-child::after,\ntable.z-table-hover > tfoot > tr:hover > td:first-child::after {\n left: 0;\n}\n","import {Component, ComponentInterface, Element, Host, Prop, h} from \"@stencil/core\";\n\n/**\n * ZThead component.\n * @slot - ZThead content (`z-tr`).\n */\n@Component({\n tag: \"z-thead\",\n styleUrls: [\"styles.css\", \"../../../css-components/z-table/styles.css\"],\n shadow: true,\n})\nexport class ZThead implements ComponentInterface {\n @Element() host: HTMLZTheadElement;\n\n /**\n * If true, the header will be stuck to the top of the table.\n */\n @Prop({reflect: true})\n sticky = false;\n\n /**\n * The element is focusable\n */\n @Prop({reflect: true})\n isFocusable = false;\n\n render(): HTMLZTheadElement {\n return (\n <Host\n role=\"rowgroup\"\n tabIndex={this.isFocusable ? 0 : -1}\n >\n <slot></slot>\n </Host>\n );\n }\n}\n"],"mappings":"uHAAA,MAAMA,EAAY,IAAM,+PCAxB,MAAMA,EAAY,IAAM,6sD,MCWXC,EAAMC,EAAA,MAAAD,UAAAE,EALnB,WAAAC,CAAAC,G,kEAYEC,KAAAC,OAAS,MAMTD,KAAAE,YAAc,KAYf,CAVC,MAAAC,GACE,OACEC,EAACC,EAAI,CAAAC,IAAA,2CACHC,KAAK,WACLC,SAAUR,KAAKE,YAAc,GAAI,GAEjCE,EAAA,QAAAE,IAAA,6C","ignoreList":[]}
|
package/dist/components/z-tr.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{proxyCustomElement as t,HTMLElement as e,createEvent as o,h as r,Host as a,transformTag as s}from"@stencil/core/internal/client";import{r as n}from"./utils.js";import"./index2.js";import{d as l}from"./index3.js";import"./index16.js";const d=()=>`:host{position:relative;display:grid;width:100%;box-sizing:border-box;grid-auto-flow:column;grid-template-columns:var(--z-table--expand-button-size, 0) repeat(var(--columns), minmax(128px, 1fr));--columns:1}*{box-sizing:border-box}:host([expandable]){--show-expandable-button:visible;cursor:pointer}:host([expandable]) ::slotted(*){grid-row:1}:host([expandable]) ::slotted(:nth-last-child(2)){border-right:none}:host([expandable]) ::slotted(*:last-child){border-top:var(--border-size-small) solid var(--color-surface03);border-left:0;grid-column:1 / span calc(var(--columns) + 1);grid-row:2}:host([expandable]:not([expanded])) ::slotted(*:last-child){display:none}:host([expanded]){margin-bottom:4px;box-shadow:0 4px 4px -2px var(--shadow-color-base)}:host([expanded]) .z-tr--expand-button-container,:host([expanded]) ::slotted(*){border-left:0 !important;background-color:var(--color-background)}:host([tabIndex]:hover) ::slotted(z-td),:host([tabIndex]:hover) ::slotted(z-th),:host([tabIndex]:hover) .z-tr--expand-button-container{background-color:var(--color-surface02)}:host([tabIndex]:hover) .z-tr--focus-overlay{border-top:var(--border-size-small) solid var(--color-surface04);border-bottom:var(--border-size-small) solid var(--color-surface04)}:host(:focus){position:relative;z-index:20;border:none !important;box-shadow:var(--shadow-focus-primary);outline:none}.z-tr--expand-button-container{display:flex;align-items:center;justify-content:center;background-color:var(--z-table--cells-background, var(--color-surface01))}.z-tr--expand-button-container button{display:flex;align-items:center;justify-content:center;padding:0;border:none;margin:auto;appearance:none;background:transparent;cursor:pointer;visibility:var(--show-expandable-button, hidden)}.z-tr--expand-button-container button z-icon{--z-icon-width:16px;--z-icon-height:16px}.z-tr--focus-overlay{position:absolute;z-index:30;top:calc(var(--border-size-small) * -1);bottom:0;left:0;width:100%;height:calc(100% + (var(--border-size-small) * 2));box-shadow:none;outline:none;pointer-events:none;transition:box-shadow 0.2s}:host(:focus) .z-tr--focus-overlay{box-shadow:0 0 0 2px var(--shadow-focus-primary), var(--shadow-focus-primary);outline:none}:host(:focus) ::slotted(*){border-bottom:none}:host(:focus) .z-tr--expand-button-container{border-bottom:none}`;const i=()=>`z-table,table.z-table{background-color:var(--color-surface01);--z-table--cells-padding:calc(var(--space-unit) * 2)}table.z-table{border-collapse:collapse}z-thead,table.z-table thead{background-color:var(--color-background);--z-table--cells-bottom-border-size:var(--border-size-medium)}z-tfoot,table.z-table tfoot{border-top:var(--border-size-medium) solid var(--color-surface03);border-bottom:var(--border-size-medium) solid var(--color-surface03)}z-tfoot z-tr,table.z-table tfoot tr{border-bottom:calc(var(--z-table--cells-bottom-border-size)) solid var(--color-surface03) !important}z-tr,table.z-table tr{border-bottom:var(--z-table--cells-bottom-border-size, var(--border-size-small)) solid var(--color-surface03)}z-td,z-th,table.z-table td,table.z-table th{padding:var(--z-table--cells-padding, calc(var(--space-unit) * 2));text-align:left}z-th:not(:first-child),z-td:not(:first-child),table.z-table th:not(:first-child),table.z-table td:not(:first-child){border-left:var(--z-table--cell-left-border, none)}z-table[bordered],table.z-table.z-table-bordered{--z-table--cell-left-border:1px solid var(--color-surface03)}table.z-table-hover>tbody>tr:hover>td,table.z-table-hover>tfoot>tr:hover>td{position:relative;background-color:var(--color-surface02)}table.z-table-hover>tbody>tr:hover>td::after,table.z-table-hover>tfoot>tr:hover>td::after{position:absolute;z-index:1;top:0;right:0;bottom:0;left:-1px;box-shadow:inset 0 var(--border-size-small) 0 var(--color-surface04), inset 0 calc(var(--border-size-small) * -1) 0 var(--color-surface04);content:""}table.z-table-hover>tbody>tr:hover>td:first-child::after,table.z-table-hover>thead>tr:hover>th:first-child::after,table.z-table-hover>tfoot>tr:hover>td:first-child::after{left:0}`;const
|
|
1
|
+
import{proxyCustomElement as t,HTMLElement as e,createEvent as o,h as r,Host as a,transformTag as s}from"@stencil/core/internal/client";import{r as n}from"./utils.js";import"./index2.js";import{d as l}from"./index3.js";import"./index16.js";const d=()=>`:host{position:relative;display:grid;width:100%;box-sizing:border-box;grid-auto-flow:column;grid-template-columns:var(--z-table--expand-button-size, 0) repeat(var(--columns), minmax(128px, 1fr));--columns:1}*{box-sizing:border-box}:host([expandable]){--show-expandable-button:visible;cursor:pointer}:host([expandable]) ::slotted(*){grid-row:1}:host([expandable]) ::slotted(:nth-last-child(2)){border-right:none}:host([expandable]) ::slotted(*:last-child){border-top:var(--border-size-small) solid var(--color-surface03);border-left:0;grid-column:1 / span calc(var(--columns) + 1);grid-row:2}:host([expandable]:not([expanded])) ::slotted(*:last-child){display:none}:host([expanded]){margin-bottom:4px;box-shadow:0 4px 4px -2px var(--shadow-color-base)}:host([expanded]) .z-tr--expand-button-container,:host([expanded]) ::slotted(*){border-left:0 !important;background-color:var(--color-background)}:host([tabIndex]:hover) ::slotted(z-td),:host([tabIndex]:hover) ::slotted(z-th),:host([tabIndex]:hover) .z-tr--expand-button-container{background-color:var(--color-surface02)}:host([tabIndex]:hover) .z-tr--focus-overlay{border-top:var(--border-size-small) solid var(--color-surface04);border-bottom:var(--border-size-small) solid var(--color-surface04)}:host(:focus){position:relative;z-index:20;border:none !important;box-shadow:var(--shadow-focus-primary);outline:none}.z-tr--expand-button-container{display:flex;align-items:center;justify-content:center;background-color:var(--z-table--cells-background, var(--color-surface01))}.z-tr--expand-button-container button{display:flex;align-items:center;justify-content:center;padding:0;border:none;margin:auto;appearance:none;background:transparent;cursor:pointer;visibility:var(--show-expandable-button, hidden)}.z-tr--expand-button-container button z-icon{--z-icon-width:16px;--z-icon-height:16px}.z-tr--focus-overlay{position:absolute;z-index:30;top:calc(var(--border-size-small) * -1);bottom:0;left:0;width:100%;height:calc(100% + (var(--border-size-small) * 2));box-shadow:none;outline:none;pointer-events:none;transition:box-shadow 0.2s}:host(:focus) .z-tr--focus-overlay{box-shadow:0 0 0 2px var(--shadow-focus-primary), var(--shadow-focus-primary);outline:none}:host(:focus) ::slotted(*){border-bottom:none}:host(:focus) .z-tr--expand-button-container{border-bottom:none}`;const i=()=>`z-table,table.z-table{background-color:var(--color-surface01);--z-table--cells-padding:calc(var(--space-unit) * 2)}table.z-table{border-collapse:collapse}z-thead,table.z-table thead{background-color:var(--color-background);--z-table--cells-bottom-border-size:var(--border-size-medium)}z-tfoot,table.z-table tfoot{border-top:var(--border-size-medium) solid var(--color-surface03);border-bottom:var(--border-size-medium) solid var(--color-surface03)}z-tfoot z-tr,table.z-table tfoot tr{border-bottom:calc(var(--z-table--cells-bottom-border-size)) solid var(--color-surface03) !important}z-tr,table.z-table tr{border-bottom:var(--z-table--cells-bottom-border-size, var(--border-size-small)) solid var(--color-surface03)}z-td,z-th,table.z-table td,table.z-table th{padding:var(--z-table--cells-padding, calc(var(--space-unit) * 2));text-align:left}z-th:not(:first-child),z-td:not(:first-child),table.z-table th:not(:first-child),table.z-table td:not(:first-child){border-left:var(--z-table--cell-left-border, none)}z-table[bordered],table.z-table.z-table-bordered{--z-table--cell-left-border:1px solid var(--color-surface03)}table.z-table-hover>tbody>tr:hover>td,table.z-table-hover>tfoot>tr:hover>td{position:relative;background-color:var(--color-surface02)}table.z-table-hover>tbody>tr:hover>td::after,table.z-table-hover>tfoot>tr:hover>td::after{position:absolute;z-index:1;top:0;right:0;bottom:0;left:-1px;box-shadow:inset 0 var(--border-size-small) 0 var(--color-surface04), inset 0 calc(var(--border-size-small) * -1) 0 var(--color-surface04);content:""}table.z-table-hover>tbody>tr:hover>td:first-child::after,table.z-table-hover>thead>tr:hover>th:first-child::after,table.z-table-hover>tfoot>tr:hover>td:first-child::after{left:0}`;const c=t(class t extends e{constructor(t){super();if(t!==false){this.__registerHost()}this.__attachShadow();this.expand=o(this,"expand",7);this.expandable=false;this.expanded=false}updateColumns(){const t=Array.from(this.host.querySelectorAll("z-td, z-th"));if(this.expandable){const e=t.pop();e.id=e.id||`z-tr-expandable-content-${n()}`;this.expandableContentId=e.id}const e=t.map((t=>t.colspan||1)).reduce(((t,e)=>t+e),0);this.host.style.setProperty("--columns",`${e}`)}onRowClick(t){const e=t.target.closest(".prevent-expand");if(!this.expandable||e){return}this.expanded=!this.expanded;this.expand.emit({expanded:this.expanded})}onKeyDown(t){if(!this.expandable){return}const e=document.activeElement;if(e!==this.host){return}if(t.key==="Enter"||t.key===" "){t.preventDefault();this.expanded=!this.expanded;this.expand.emit({expanded:this.expanded})}}componentWillLoad(){this.updateColumns()}render(){return r(a,{key:"282a41d7ccde9ca0123725f53c73ee589d3f5cb3",role:"row",tabIndex:this.expandable?0:undefined,expanded:this.expanded,onClick:this.onRowClick.bind(this),onKeyDown:this.onKeyDown.bind(this)},r("div",{key:"fe77cc4ab95a6e59ca40b4f823d280269eed2378",class:"z-tr--focus-overlay","aria-hidden":"true"}),r("div",{key:"8e5ed96fd1494f5ad21311daaea39d06c63b8cd4",class:"z-tr--expand-button-container"},this.expandable&&r("button",{key:"af714e0babec41238e7cb9460dd44d7ce25d558d",tabIndex:-1,"aria-expanded":this.expanded?"true":"false","aria-label":this.expanded?"Comprimi riga":"Espandi riga","aria-controls":this.expandableContentId,type:"button"},r("z-icon",{key:"9450d0b882295a749132311d631c1b96f3affd34",name:this.expanded?"minus-circled":"plus-circled"}))),r("slot",{key:"7301e9d09a0a29c8725613591a8855097c98221f",onSlotchange:this.updateColumns.bind(this)}))}get host(){return this}static get watchers(){return{expandable:[{updateColumns:0}]}}static get style(){return d()+i()}},[257,"z-tr",{expandable:[516],expanded:[32],expandableContentId:[32]},[[0,"colspanchange","updateColumns"]],{expandable:[{updateColumns:0}]}]);function b(){if(typeof customElements==="undefined"){return}const t=["z-tr","z-icon"];t.forEach((t=>{switch(t){case"z-tr":if(!customElements.get(s(t))){customElements.define(s(t),c)}break;case"z-icon":if(!customElements.get(s(t))){l()}break}}))}const h=c;const u=b;export{h as ZTr,u as defineCustomElement};
|
|
2
2
|
//# sourceMappingURL=z-tr.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["stylesCss","ZTr","__stencil_proxyCustomElement","HTMLElement","constructor","registerHost","this","expandable","expanded","updateColumns","cells","Array","from","host","querySelectorAll","expandableContent","pop","id","randomId","expandableContentId","columns","map","cell","colspan","reduce","a","b","style","setProperty","onRowClick","event","preventExpand","target","closest","expand","emit","onKeyDown","active","document","activeElement","key","preventDefault","componentWillLoad","render","h","Host","role","tabIndex","undefined","onClick","bind","class","type","name","onSlotchange"],"sources":["src/components/table/z-tr/styles.css?tag=z-tr&encapsulation=shadow","src/components/css-components/z-table/styles.css?tag=z-tr&encapsulation=shadow","src/components/table/z-tr/index.tsx"],"sourcesContent":[":host {\n position: relative;\n display: grid;\n width: 100%;\n box-sizing: border-box;\n grid-auto-flow: column;\n grid-template-columns: var(--z-table--expand-button-size, 0) repeat(var(--columns), minmax(128px, 1fr));\n\n --columns: 1;\n}\n\n* {\n box-sizing: border-box;\n}\n\n:host([expandable]) {\n --show-expandable-button: visible;\n\n cursor: pointer;\n}\n\n:host([expandable]) ::slotted(*) {\n grid-row: 1;\n}\n\n:host([expandable]) ::slotted(:nth-last-child(2)) {\n border-right: none;\n}\n\n:host([expandable]) ::slotted(*:last-child) {\n border-top: var(--border-size-small) solid var(--color-surface03);\n border-left: 0;\n grid-column: 1 / span calc(var(--columns) + 1);\n grid-row: 2;\n}\n\n:host([expandable]:not([expanded])) ::slotted(*:last-child) {\n display: none;\n}\n\n:host([expanded]) {\n margin-bottom: 4px; /* prevents shadow to be cut by the next element */\n box-shadow: 0 4px 4px -2px var(--shadow-color-base);\n}\n\n:host([expanded]) .z-tr--expand-button-container,\n:host([expanded]) ::slotted(*) {\n border-left: 0 !important;\n background-color: var(--color-background);\n}\n\n:host([tabIndex]:hover) ::slotted(z-td),\n:host([tabIndex]:hover) ::slotted(z-th),\n:host([tabIndex]:hover) .z-tr--expand-button-container {\n background-color: var(--color-surface02);\n}\n\n:host([tabIndex]:hover) .z-tr--focus-overlay {\n border-top: var(--border-size-small) solid var(--color-surface04);\n border-bottom: var(--border-size-small) solid var(--color-surface04);\n}\n\n:host(:focus) {\n position: relative;\n z-index: 20;\n border: none !important;\n box-shadow: var(--shadow-focus-primary);\n outline: none;\n}\n\n.z-tr--expand-button-container {\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: var(--z-table--cells-background, var(--color-surface01));\n}\n\n.z-tr--expand-button-container button {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n border: none;\n margin: auto;\n appearance: none;\n background: transparent;\n cursor: pointer;\n visibility: var(--show-expandable-button, hidden);\n}\n\n.z-tr--expand-button-container button z-icon {\n --z-icon-width: 16px;\n --z-icon-height: 16px;\n}\n\n.z-tr--focus-overlay {\n position: absolute;\n z-index: 30;\n top: calc(var(--border-size-small) * -1);\n bottom: 0;\n left: 0;\n width: 100%;\n height: calc(100% + (var(--border-size-small) * 2));\n box-shadow: none;\n outline: none;\n pointer-events: none;\n transition: box-shadow 0.2s;\n}\n\n:host(:focus) .z-tr--focus-overlay {\n box-shadow:\n 0 0 0 2px var(--shadow-focus-primary),\n var(--shadow-focus-primary);\n outline: none;\n}\n\n:host(:focus) ::slotted(*) {\n border-bottom: none;\n}\n\n:host(:focus) .z-tr--expand-button-container {\n border-bottom: none;\n}\n","z-table,\ntable.z-table {\n background-color: var(--color-surface01);\n\n --z-table--cells-padding: calc(var(--space-unit) * 2);\n}\n\ntable.z-table {\n border-collapse: collapse;\n}\n\nz-thead,\ntable.z-table thead {\n background-color: var(--color-background);\n\n --z-table--cells-bottom-border-size: var(--border-size-medium);\n}\n\nz-tfoot,\ntable.z-table tfoot {\n border-top: var(--border-size-medium) solid var(--color-surface03);\n border-bottom: var(--border-size-medium) solid var(--color-surface03);\n}\n\nz-tfoot z-tr,\ntable.z-table tfoot tr {\n border-bottom: calc(var(--z-table--cells-bottom-border-size)) solid var(--color-surface03) !important;\n}\n\nz-tr,\ntable.z-table tr {\n border-bottom: var(--z-table--cells-bottom-border-size, var(--border-size-small)) solid var(--color-surface03);\n}\n\nz-td,\nz-th,\ntable.z-table td,\ntable.z-table th {\n padding: var(--z-table--cells-padding, calc(var(--space-unit) * 2));\n text-align: left;\n}\n\nz-th:not(:first-child),\nz-td:not(:first-child),\ntable.z-table th:not(:first-child),\ntable.z-table td:not(:first-child) {\n border-left: var(--z-table--cell-left-border, none);\n}\n\nz-table[bordered],\ntable.z-table.z-table-bordered {\n --z-table--cell-left-border: 1px solid var(--color-surface03);\n}\n\ntable.z-table-hover > tbody > tr:hover > td,\ntable.z-table-hover > tfoot > tr:hover > td {\n position: relative;\n background-color: var(--color-surface02);\n}\n\ntable.z-table-hover > tbody > tr:hover > td::after,\ntable.z-table-hover > tfoot > tr:hover > td::after {\n position: absolute;\n z-index: 1;\n top: 0;\n right: 0;\n bottom: 0;\n left: -1px;\n box-shadow:\n inset 0 var(--border-size-small) 0 var(--color-surface04),\n inset 0 calc(var(--border-size-small) * -1) 0 var(--color-surface04);\n content: \"\";\n}\n\ntable.z-table-hover > tbody > tr:hover > td:first-child::after,\ntable.z-table-hover > thead > tr:hover > th:first-child::after,\ntable.z-table-hover > tfoot > tr:hover > td:first-child::after {\n left: 0;\n}\n","import {\n Component,\n ComponentInterface,\n Element,\n Event,\n EventEmitter,\n Host,\n Listen,\n Prop,\n State,\n Watch,\n h,\n} from \"@stencil/core\";\nimport {randomId} from \"../../../utils/utils\";\nimport \"../cells/z-td/index\";\nimport \"../cells/z-th/index\";\n\n/**\n * ZTr component.\n * When the row is `expandable`, you can set the `prevent-expand` css class on an interactive element inside the row\n * to prevent the row from expanding.\n * @slot - ZTr content (`z-td` or `z-th`).\n */\n@Component({\n tag: \"z-tr\",\n styleUrls: [\"styles.css\", \"../../css-components/z-table/styles.css\"],\n shadow: true,\n})\nexport class ZTr implements ComponentInterface {\n @Element() host: HTMLZTrElement;\n\n /**\n * Whether the row is expandable.\n * Use a `z-td` as the last cell of the row for the additional content.\n * It will show a button to expand/collapse the row.\n * The last cell will be hidden until the button or row is clicked.\n *\n * If some element inside the expandable row contains the `prevent-expand` css class,\n * the row will not expand by clicking that element.\n */\n @Prop({reflect: true})\n expandable = false;\n\n /**\n * Whether the row is currently expanded.\n */\n @State()\n expanded = false;\n\n /**\n * HTML Id of the expandable content.\n * It is used to link the button to the content through the `aria-controls` attribute.\n */\n @State()\n expandableContentId: string;\n\n /** Row has been expanded */\n @Event()\n expand: EventEmitter;\n\n @Watch(\"expandable\")\n @Listen(\"colspanchange\")\n protected updateColumns(): void {\n const cells = Array.from(this.host.querySelectorAll<HTMLZTdElement | HTMLZThElement>(\"z-td, z-th\"));\n\n if (this.expandable) {\n const expandableContent = cells.pop();\n expandableContent.id = expandableContent.id || `z-tr-expandable-content-${randomId()}`;\n this.expandableContentId = expandableContent.id;\n }\n\n const columns = cells.map((cell) => cell.colspan || 1).reduce((a, b) => a + b, 0);\n this.host.style.setProperty(\"--columns\", `${columns}`);\n }\n\n /**\n * Handle click on row.\n * Skip expansion if the click is on a element with `prevent-expand` css class.\n */\n private onRowClick(event: MouseEvent): void {\n const preventExpand = (event.target as HTMLElement).closest(\".prevent-expand\");\n if (!this.expandable || preventExpand) {\n return;\n }\n\n this.expanded = !this.expanded;\n this.expand.emit({expanded: this.expanded});\n }\n\n private onKeyDown(event: KeyboardEvent): void {\n if (!this.expandable) {\n return;\n }\n\n const active = document.activeElement;\n if (active !== this.host) {\n return;\n }\n\n if (event.key === \"Enter\" || event.key === \" \") {\n event.preventDefault();\n this.expanded = !this.expanded;\n this.expand.emit({expanded: this.expanded});\n }\n }\n\n componentWillLoad(): void {\n this.updateColumns();\n }\n\n render(): HTMLZTrElement {\n return (\n <Host\n role=\"row\"\n tabIndex={this.expandable ? 0 : undefined}\n expanded={this.expanded}\n onClick={this.onRowClick.bind(this)}\n onKeyDown={this.onKeyDown.bind(this)}\n >\n <div\n class=\"z-tr--focus-overlay\"\n aria-hidden=\"true\"\n ></div>\n <div class=\"z-tr--expand-button-container\">\n {this.expandable && (\n <button\n tabIndex={-1}\n aria-expanded={this.expanded ? \"true\" : \"false\"}\n aria-label={this.expanded ? \"Comprimi riga\" : \"Espandi riga\"}\n aria-controls={this.expandableContentId}\n type=\"button\"\n >\n <z-icon name={this.expanded ? \"minus-circled\" : \"plus-circled\"}></z-icon>\n </button>\n )}\n </div>\n <slot onSlotchange={this.updateColumns.bind(this)}></slot>\n </Host>\n );\n }\n}\n"],"mappings":"gPAAA,MAAMA,EAAY,IAAM,2xECAxB,MAAMA,EAAY,IAAM,6sD,MC4BXC,EAAGC,EAAA,MAAAD,UAAAE,EALhB,WAAAC,CAAAC,G,iGAkBEC,KAAAC,WAAa,MAMbD,KAAAE,SAAW,KA6FZ,CA9EW,aAAAC,GACR,MAAMC,EAAQC,MAAMC,KAAKN,KAAKO,KAAKC,iBAAkD,eAErF,GAAIR,KAAKC,WAAY,CACnB,MAAMQ,EAAoBL,EAAMM,MAChCD,EAAkBE,GAAKF,EAAkBE,IAAM,2BAA2BC,MAC1EZ,KAAKa,oBAAsBJ,EAAkBE,E,CAG/C,MAAMG,EAAUV,EAAMW,KAAKC,GAASA,EAAKC,SAAW,IAAGC,QAAO,CAACC,EAAGC,IAAMD,EAAIC,GAAG,GAC/EpB,KAAKO,KAAKc,MAAMC,YAAY,YAAa,GAAGR,I,CAOtC,UAAAS,CAAWC,GACjB,MAAMC,EAAiBD,EAAME,OAAuBC,QAAQ,mBAC5D,IAAK3B,KAAKC,YAAcwB,EAAe,CACrC,M,CAGFzB,KAAKE,UAAYF,KAAKE,SACtBF,KAAK4B,OAAOC,KAAK,CAAC3B,SAAUF,KAAKE,U,CAG3B,SAAA4B,CAAUN,GAChB,IAAKxB,KAAKC,WAAY,CACpB,M,CAGF,MAAM8B,EAASC,SAASC,cACxB,GAAIF,IAAW/B,KAAKO,KAAM,CACxB,M,CAGF,GAAIiB,EAAMU,MAAQ,SAAWV,EAAMU,MAAQ,IAAK,CAC9CV,EAAMW,iBACNnC,KAAKE,UAAYF,KAAKE,SACtBF,KAAK4B,OAAOC,KAAK,CAAC3B,SAAUF,KAAKE,U,EAIrC,iBAAAkC,GACEpC,KAAKG,e,CAGP,MAAAkC,GACE,OACEC,EAACC,EAAI,CAAAL,IAAA,2CACHM,KAAK,MACLC,SAAUzC,KAAKC,WAAa,EAAIyC,UAChCxC,SAAUF,KAAKE,SACfyC,QAAS3C,KAAKuB,WAAWqB,KAAK5C,MAC9B8B,UAAW9B,KAAK8B,UAAUc,KAAK5C,OAE/BsC,EAAA,OAAAJ,IAAA,2CACEW,MAAM,sBAAqB,cACf,SAEdP,EAAA,OAAAJ,IAAA,2CAAKW,MAAM,iCACR7C,KAAKC,YACJqC,EAAA,UAAAJ,IAAA,2CACEO,UAAU,EAAE,gBACGzC,KAAKE,SAAW,OAAS,QAAO,aACnCF,KAAKE,SAAW,gBAAkB,eAAc,gBAC7CF,KAAKa,oBACpBiC,KAAK,UAELR,EAAA,UAAAJ,IAAA,2CAAQa,KAAM/C,KAAKE,SAAW,gBAAkB,mBAItDoC,EAAA,QAAAJ,IAAA,2CAAMc,aAAchD,KAAKG,cAAcyC,KAAK5C,Q","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["stylesCss","ZTr","__stencil_proxyCustomElement","HTMLElement","constructor","registerHost","this","expandable","expanded","updateColumns","cells","Array","from","host","querySelectorAll","expandableContent","pop","id","randomId","expandableContentId","columns","map","cell","colspan","reduce","a","b","style","setProperty","onRowClick","event","preventExpand","target","closest","expand","emit","onKeyDown","active","document","activeElement","key","preventDefault","componentWillLoad","render","h","Host","role","tabIndex","undefined","onClick","bind","class","type","name","onSlotchange"],"sources":["src/components/deprecated/table/z-tr/styles.css?tag=z-tr&encapsulation=shadow","src/components/css-components/z-table/styles.css?tag=z-tr&encapsulation=shadow","src/components/deprecated/table/z-tr/index.tsx"],"sourcesContent":[":host {\n position: relative;\n display: grid;\n width: 100%;\n box-sizing: border-box;\n grid-auto-flow: column;\n grid-template-columns: var(--z-table--expand-button-size, 0) repeat(var(--columns), minmax(128px, 1fr));\n\n --columns: 1;\n}\n\n* {\n box-sizing: border-box;\n}\n\n:host([expandable]) {\n --show-expandable-button: visible;\n\n cursor: pointer;\n}\n\n:host([expandable]) ::slotted(*) {\n grid-row: 1;\n}\n\n:host([expandable]) ::slotted(:nth-last-child(2)) {\n border-right: none;\n}\n\n:host([expandable]) ::slotted(*:last-child) {\n border-top: var(--border-size-small) solid var(--color-surface03);\n border-left: 0;\n grid-column: 1 / span calc(var(--columns) + 1);\n grid-row: 2;\n}\n\n:host([expandable]:not([expanded])) ::slotted(*:last-child) {\n display: none;\n}\n\n:host([expanded]) {\n margin-bottom: 4px; /* prevents shadow to be cut by the next element */\n box-shadow: 0 4px 4px -2px var(--shadow-color-base);\n}\n\n:host([expanded]) .z-tr--expand-button-container,\n:host([expanded]) ::slotted(*) {\n border-left: 0 !important;\n background-color: var(--color-background);\n}\n\n:host([tabIndex]:hover) ::slotted(z-td),\n:host([tabIndex]:hover) ::slotted(z-th),\n:host([tabIndex]:hover) .z-tr--expand-button-container {\n background-color: var(--color-surface02);\n}\n\n:host([tabIndex]:hover) .z-tr--focus-overlay {\n border-top: var(--border-size-small) solid var(--color-surface04);\n border-bottom: var(--border-size-small) solid var(--color-surface04);\n}\n\n:host(:focus) {\n position: relative;\n z-index: 20;\n border: none !important;\n box-shadow: var(--shadow-focus-primary);\n outline: none;\n}\n\n.z-tr--expand-button-container {\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: var(--z-table--cells-background, var(--color-surface01));\n}\n\n.z-tr--expand-button-container button {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n border: none;\n margin: auto;\n appearance: none;\n background: transparent;\n cursor: pointer;\n visibility: var(--show-expandable-button, hidden);\n}\n\n.z-tr--expand-button-container button z-icon {\n --z-icon-width: 16px;\n --z-icon-height: 16px;\n}\n\n.z-tr--focus-overlay {\n position: absolute;\n z-index: 30;\n top: calc(var(--border-size-small) * -1);\n bottom: 0;\n left: 0;\n width: 100%;\n height: calc(100% + (var(--border-size-small) * 2));\n box-shadow: none;\n outline: none;\n pointer-events: none;\n transition: box-shadow 0.2s;\n}\n\n:host(:focus) .z-tr--focus-overlay {\n box-shadow:\n 0 0 0 2px var(--shadow-focus-primary),\n var(--shadow-focus-primary);\n outline: none;\n}\n\n:host(:focus) ::slotted(*) {\n border-bottom: none;\n}\n\n:host(:focus) .z-tr--expand-button-container {\n border-bottom: none;\n}\n","z-table,\ntable.z-table {\n background-color: var(--color-surface01);\n\n --z-table--cells-padding: calc(var(--space-unit) * 2);\n}\n\ntable.z-table {\n border-collapse: collapse;\n}\n\nz-thead,\ntable.z-table thead {\n background-color: var(--color-background);\n\n --z-table--cells-bottom-border-size: var(--border-size-medium);\n}\n\nz-tfoot,\ntable.z-table tfoot {\n border-top: var(--border-size-medium) solid var(--color-surface03);\n border-bottom: var(--border-size-medium) solid var(--color-surface03);\n}\n\nz-tfoot z-tr,\ntable.z-table tfoot tr {\n border-bottom: calc(var(--z-table--cells-bottom-border-size)) solid var(--color-surface03) !important;\n}\n\nz-tr,\ntable.z-table tr {\n border-bottom: var(--z-table--cells-bottom-border-size, var(--border-size-small)) solid var(--color-surface03);\n}\n\nz-td,\nz-th,\ntable.z-table td,\ntable.z-table th {\n padding: var(--z-table--cells-padding, calc(var(--space-unit) * 2));\n text-align: left;\n}\n\nz-th:not(:first-child),\nz-td:not(:first-child),\ntable.z-table th:not(:first-child),\ntable.z-table td:not(:first-child) {\n border-left: var(--z-table--cell-left-border, none);\n}\n\nz-table[bordered],\ntable.z-table.z-table-bordered {\n --z-table--cell-left-border: 1px solid var(--color-surface03);\n}\n\ntable.z-table-hover > tbody > tr:hover > td,\ntable.z-table-hover > tfoot > tr:hover > td {\n position: relative;\n background-color: var(--color-surface02);\n}\n\ntable.z-table-hover > tbody > tr:hover > td::after,\ntable.z-table-hover > tfoot > tr:hover > td::after {\n position: absolute;\n z-index: 1;\n top: 0;\n right: 0;\n bottom: 0;\n left: -1px;\n box-shadow:\n inset 0 var(--border-size-small) 0 var(--color-surface04),\n inset 0 calc(var(--border-size-small) * -1) 0 var(--color-surface04);\n content: \"\";\n}\n\ntable.z-table-hover > tbody > tr:hover > td:first-child::after,\ntable.z-table-hover > thead > tr:hover > th:first-child::after,\ntable.z-table-hover > tfoot > tr:hover > td:first-child::after {\n left: 0;\n}\n","import {\n Component,\n ComponentInterface,\n Element,\n Event,\n EventEmitter,\n Host,\n Listen,\n Prop,\n State,\n Watch,\n h,\n} from \"@stencil/core\";\nimport {randomId} from \"../../../../utils/utils\";\nimport \"../cells/z-td/index\";\nimport \"../cells/z-th/index\";\n\n/**\n * ZTr component.\n * When the row is `expandable`, you can set the `prevent-expand` css class on an interactive element inside the row\n * to prevent the row from expanding.\n * @slot - ZTr content (`z-td` or `z-th`).\n */\n@Component({\n tag: \"z-tr\",\n styleUrls: [\"styles.css\", \"../../../css-components/z-table/styles.css\"],\n shadow: true,\n})\nexport class ZTr implements ComponentInterface {\n @Element() host: HTMLZTrElement;\n\n /**\n * Whether the row is expandable.\n * Use a `z-td` as the last cell of the row for the additional content.\n * It will show a button to expand/collapse the row.\n * The last cell will be hidden until the button or row is clicked.\n *\n * If some element inside the expandable row contains the `prevent-expand` css class,\n * the row will not expand by clicking that element.\n */\n @Prop({reflect: true})\n expandable = false;\n\n /**\n * Whether the row is currently expanded.\n */\n @State()\n expanded = false;\n\n /**\n * HTML Id of the expandable content.\n * It is used to link the button to the content through the `aria-controls` attribute.\n */\n @State()\n expandableContentId: string;\n\n /** Row has been expanded */\n @Event()\n expand: EventEmitter;\n\n @Watch(\"expandable\")\n @Listen(\"colspanchange\")\n protected updateColumns(): void {\n const cells = Array.from(this.host.querySelectorAll<HTMLZTdElement | HTMLZThElement>(\"z-td, z-th\"));\n\n if (this.expandable) {\n const expandableContent = cells.pop();\n expandableContent.id = expandableContent.id || `z-tr-expandable-content-${randomId()}`;\n this.expandableContentId = expandableContent.id;\n }\n\n const columns = cells.map((cell) => cell.colspan || 1).reduce((a, b) => a + b, 0);\n this.host.style.setProperty(\"--columns\", `${columns}`);\n }\n\n /**\n * Handle click on row.\n * Skip expansion if the click is on a element with `prevent-expand` css class.\n */\n private onRowClick(event: MouseEvent): void {\n const preventExpand = (event.target as HTMLElement).closest(\".prevent-expand\");\n if (!this.expandable || preventExpand) {\n return;\n }\n\n this.expanded = !this.expanded;\n this.expand.emit({expanded: this.expanded});\n }\n\n private onKeyDown(event: KeyboardEvent): void {\n if (!this.expandable) {\n return;\n }\n\n const active = document.activeElement;\n if (active !== this.host) {\n return;\n }\n\n if (event.key === \"Enter\" || event.key === \" \") {\n event.preventDefault();\n this.expanded = !this.expanded;\n this.expand.emit({expanded: this.expanded});\n }\n }\n\n componentWillLoad(): void {\n this.updateColumns();\n }\n\n render(): HTMLZTrElement {\n return (\n <Host\n role=\"row\"\n tabIndex={this.expandable ? 0 : undefined}\n expanded={this.expanded}\n onClick={this.onRowClick.bind(this)}\n onKeyDown={this.onKeyDown.bind(this)}\n >\n <div\n class=\"z-tr--focus-overlay\"\n aria-hidden=\"true\"\n ></div>\n <div class=\"z-tr--expand-button-container\">\n {this.expandable && (\n <button\n tabIndex={-1}\n aria-expanded={this.expanded ? \"true\" : \"false\"}\n aria-label={this.expanded ? \"Comprimi riga\" : \"Espandi riga\"}\n aria-controls={this.expandableContentId}\n type=\"button\"\n >\n <z-icon name={this.expanded ? \"minus-circled\" : \"plus-circled\"}></z-icon>\n </button>\n )}\n </div>\n <slot onSlotchange={this.updateColumns.bind(this)}></slot>\n </Host>\n );\n }\n}\n"],"mappings":"gPAAA,MAAMA,EAAY,IAAM,2xECAxB,MAAMA,EAAY,IAAM,6sD,MC4BXC,EAAGC,EAAA,MAAAD,UAAAE,EALhB,WAAAC,CAAAC,G,iGAkBEC,KAAAC,WAAa,MAMbD,KAAAE,SAAW,KA6FZ,CA9EW,aAAAC,GACR,MAAMC,EAAQC,MAAMC,KAAKN,KAAKO,KAAKC,iBAAkD,eAErF,GAAIR,KAAKC,WAAY,CACnB,MAAMQ,EAAoBL,EAAMM,MAChCD,EAAkBE,GAAKF,EAAkBE,IAAM,2BAA2BC,MAC1EZ,KAAKa,oBAAsBJ,EAAkBE,E,CAG/C,MAAMG,EAAUV,EAAMW,KAAKC,GAASA,EAAKC,SAAW,IAAGC,QAAO,CAACC,EAAGC,IAAMD,EAAIC,GAAG,GAC/EpB,KAAKO,KAAKc,MAAMC,YAAY,YAAa,GAAGR,I,CAOtC,UAAAS,CAAWC,GACjB,MAAMC,EAAiBD,EAAME,OAAuBC,QAAQ,mBAC5D,IAAK3B,KAAKC,YAAcwB,EAAe,CACrC,M,CAGFzB,KAAKE,UAAYF,KAAKE,SACtBF,KAAK4B,OAAOC,KAAK,CAAC3B,SAAUF,KAAKE,U,CAG3B,SAAA4B,CAAUN,GAChB,IAAKxB,KAAKC,WAAY,CACpB,M,CAGF,MAAM8B,EAASC,SAASC,cACxB,GAAIF,IAAW/B,KAAKO,KAAM,CACxB,M,CAGF,GAAIiB,EAAMU,MAAQ,SAAWV,EAAMU,MAAQ,IAAK,CAC9CV,EAAMW,iBACNnC,KAAKE,UAAYF,KAAKE,SACtBF,KAAK4B,OAAOC,KAAK,CAAC3B,SAAUF,KAAKE,U,EAIrC,iBAAAkC,GACEpC,KAAKG,e,CAGP,MAAAkC,GACE,OACEC,EAACC,EAAI,CAAAL,IAAA,2CACHM,KAAK,MACLC,SAAUzC,KAAKC,WAAa,EAAIyC,UAChCxC,SAAUF,KAAKE,SACfyC,QAAS3C,KAAKuB,WAAWqB,KAAK5C,MAC9B8B,UAAW9B,KAAK8B,UAAUc,KAAK5C,OAE/BsC,EAAA,OAAAJ,IAAA,2CACEW,MAAM,sBAAqB,cACf,SAEdP,EAAA,OAAAJ,IAAA,2CAAKW,MAAM,iCACR7C,KAAKC,YACJqC,EAAA,UAAAJ,IAAA,2CACEO,UAAU,EAAE,gBACGzC,KAAKE,SAAW,OAAS,QAAO,aACnCF,KAAKE,SAAW,gBAAkB,eAAc,gBAC7CF,KAAKa,oBACpBiC,KAAK,UAELR,EAAA,UAAAJ,IAAA,2CAAQa,KAAM/C,KAAKE,SAAW,gBAAkB,mBAItDoC,EAAA,QAAAJ,IAAA,2CAAMc,aAAchD,KAAKG,cAAcyC,KAAK5C,Q","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{proxyCustomElement as e,HTMLElement as t,createEvent as i,h as l,Host as n,transformTag as s}from"@stencil/core/internal/client";import{g as r}from"./index2.js";import{d as o}from"./index5.js";import{d as a}from"./index3.js";import{d}from"./index8.js";import{d as c}from"./index9.js";const m=()=>`:host{font-family:var(--font-family-sans)}z-list-element{position:relative;display:block;padding-top:var(--space-unit)}z-list-element::before,z-list-element::after{position:absolute;z-index:100;top:0.125rem;left:-0.5rem;content:""}z-list z-list-element::before{width:var(--space-unit);height:calc(var(--space-unit) * 2);border-bottom:var(--border-size-small) solid var(--color-disabled01-icon);border-left:var(--border-size-small) solid var(--color-disabled01-icon)}z-list z-list-element::after{width:var(--space-unit);height:100%;border-left:var(--border-size-small) solid var(--color-disabled01-icon)}z-list z-list-element:last-child::after,z-list>z-list-element::before,z-list>z-list-element::after,z-list>z-list-group>z-list-element::before,z-list>z-list-group>z-list-element::after{display:none}z-list>div.children-node{padding-left:calc(var(--space-unit) * 2)}z-list-element>.list-element{z-index:100;display:flex;justify-content:space-between;padding:0;color:var(--color-default-text);font-size:var(--font-size-2);font-style:normal;font-weight:var(--font-rg);text-decoration:none}z-list-element>.list-element.link-clickable{color:var(--color-primary01)}z-list-element>.list-element.link-clickable:hover{text-decoration:underline}z-list-element>.list-element .item.ellipsis{overflow:hidden}z-list-element .list-element::after{position:absolute;top:0;right:-0.0625rem;display:block;width:100%;height:calc(var(--space-unit) * 5);content:"";transform:translateX(-100%)}.item-label{overflow:hidden;flex-grow:1;font-size:var(--font-size-2);font-style:normal;font-weight:var(--font-rg);letter-spacing:0.0032rem;line-height:1.25rem;text-overflow:ellipsis;white-space:nowrap}.item-label.bold-item{font-weight:var(--font-sb)}.item.ellipsis{display:flex;overflow:hidden;max-width:100%;text-overflow:ellipsis;white-space:nowrap}.children-node>z-list-element{padding:0;padding-top:0.125;padding-left:calc(var(--space-unit) * 1.25)}.item-icon{margin-right:var(--space-unit)}.no-icon-label{padding-left:var(--space-unit)}.children-node>z-list-element.no-icon-elm{padding-left:0}z-list-element>.list-element:focus:focus-visible{position:relative;z-index:200;box-shadow:var(--shadow-focus-primary);outline:none}@media (max-width: 767px){z-list-element::before,z-list-element::after{top:0.1875rem}z-list z-list-element::before{height:calc(var(--space-unit) * 2.5)}.children-node>z-list-element{padding-top:var(--space-unit)}}`;const f=e(class e extends t{constructor(e){super();if(e!==false){this.__registerHost()}this.__attachShadow();this.treeItemClicked=i(this,"treeItemClicked",7);this.items=[];this.parsedItems=[]}watchItems(){this.parsedItems=typeof this.items==="string"?JSON.parse(this.items):this.items}componentWillLoad(){this.watchItems()}handleClick(e){this.treeItemClicked.emit({id:e.id,name:e.name,url:e.url})}getFocusableElements(){return Array.from(this.host.shadowRoot.querySelectorAll('a[tabindex="0"]'))}getAncestor(e,t){let i=e;for(let e=0;e<t;e++){i=i===null||i===void 0?void 0:i.parentElement;if(!i){return}}return i}handleArrowNav(e){if(e.code===r.TAB){e.preventDefault();return}const t=this.getFocusableElements();const i=t.indexOf(e.target);if(i===-1){return}if(e.code===r.ARROW_DOWN||e.code===r.ARROW_UP){e.preventDefault();const l=i+(e.code===r.ARROW_DOWN?1:-1);if(l<0||l>=t.length){return}t[l].focus()}if(e.code===r.ARROW_LEFT){e.preventDefault();const l=this.getAncestor(t[i],4);if(!l||!l.children[0]||l.children[0].tagName.toLowerCase()!=="a"&&l.getAttribute("tabindex")===null){return}l.children[0].focus()}if(e.code===r.ARROW_RIGHT){e.preventDefault();const t=e.target.closest("z-list-element");if(!t){return}const i=t.querySelector("z-list");if(!i){return}const l=i.querySelector('a[tabindex="0"]');if(!l){return}l.focus()}}renderTreeList(e,t,i=1){var n,s;this.htmlTag=e.url?"a":"span";const o=l("z-list-element",{id:t,class:!e.icon?"no-icon-elm":"",clickable:Boolean(e.url),hasTreeItems:true,role:"none","aria-hidden":undefined},l(this.htmlTag,{class:{"list-element":true,"z-link":Boolean(e.url),"link-clickable":Boolean(e.url)},tabIndex:e.url?0:-1,onClick:()=>this.handleClick(e),onKeyUp:t=>{if(t.code===r.ENTER||t.code===r.SPACE){this.handleClick(e)}},onKeyDown:e=>this.handleArrowNav(e),role:e.url?"treeitem":undefined,"aria-hidden":e.url?undefined:"true","aria-expanded":((n=e.children)===null||n===void 0?void 0:n.length)>0&&true,"aria-level":i,"aria-label":e.name,href:e.url},l("span",{class:"item ellipsis"},e.icon&&l("z-icon",{width:16,height:16,fill:e.url?"color-primary01":"color-default-icon",class:"item-icon",name:e.icon}),l("span",{class:{"item-label":true,"no-icon-label":!e.icon,"bold-item":e.bold},title:e.name},e.name))),((s=e.children)===null||s===void 0?void 0:s.length)>0&&l("z-list",{role:"group"},l("div",{class:"children-node"},e.children.map(((e,t)=>this.renderTreeList(e,`${t}`,i+1))))));return o}render(){const e=this.parsedItems.some((e=>!!e.url));return l(n,{key:"
|
|
1
|
+
import{proxyCustomElement as e,HTMLElement as t,createEvent as i,h as l,Host as n,transformTag as s}from"@stencil/core/internal/client";import{g as r}from"./index2.js";import{d as o}from"./index5.js";import{d as a}from"./index3.js";import{d}from"./index8.js";import{d as c}from"./index9.js";const m=()=>`:host{font-family:var(--font-family-sans)}z-list-element{position:relative;display:block;padding-top:var(--space-unit)}z-list-element::before,z-list-element::after{position:absolute;z-index:100;top:0.125rem;left:-0.5rem;content:""}z-list z-list-element::before{width:var(--space-unit);height:calc(var(--space-unit) * 2);border-bottom:var(--border-size-small) solid var(--color-disabled01-icon);border-left:var(--border-size-small) solid var(--color-disabled01-icon)}z-list z-list-element::after{width:var(--space-unit);height:100%;border-left:var(--border-size-small) solid var(--color-disabled01-icon)}z-list z-list-element:last-child::after,z-list>z-list-element::before,z-list>z-list-element::after,z-list>z-list-group>z-list-element::before,z-list>z-list-group>z-list-element::after{display:none}z-list>div.children-node{padding-left:calc(var(--space-unit) * 2)}z-list-element>.list-element{z-index:100;display:flex;justify-content:space-between;padding:0;color:var(--color-default-text);font-size:var(--font-size-2);font-style:normal;font-weight:var(--font-rg);text-decoration:none}z-list-element>.list-element.link-clickable{color:var(--color-primary01)}z-list-element>.list-element.link-clickable:hover{text-decoration:underline}z-list-element>.list-element .item.ellipsis{overflow:hidden}z-list-element .list-element::after{position:absolute;top:0;right:-0.0625rem;display:block;width:100%;height:calc(var(--space-unit) * 5);content:"";transform:translateX(-100%)}.item-label{overflow:hidden;flex-grow:1;font-size:var(--font-size-2);font-style:normal;font-weight:var(--font-rg);letter-spacing:0.0032rem;line-height:1.25rem;text-overflow:ellipsis;white-space:nowrap}.item-label.bold-item{font-weight:var(--font-sb)}.item.ellipsis{display:flex;overflow:hidden;max-width:100%;text-overflow:ellipsis;white-space:nowrap}.children-node>z-list-element{padding:0;padding-top:0.125;padding-left:calc(var(--space-unit) * 1.25)}.item-icon{margin-right:var(--space-unit)}.no-icon-label{padding-left:var(--space-unit)}.children-node>z-list-element.no-icon-elm{padding-left:0}z-list-element>.list-element:focus:focus-visible{position:relative;z-index:200;box-shadow:var(--shadow-focus-primary);outline:none}@media (max-width: 767px){z-list-element::before,z-list-element::after{top:0.1875rem}z-list z-list-element::before{height:calc(var(--space-unit) * 2.5)}.children-node>z-list-element{padding-top:var(--space-unit)}}`;const f=e(class e extends t{constructor(e){super();if(e!==false){this.__registerHost()}this.__attachShadow();this.treeItemClicked=i(this,"treeItemClicked",7);this.items=[];this.parsedItems=[]}watchItems(){this.parsedItems=typeof this.items==="string"?JSON.parse(this.items):this.items}componentWillLoad(){this.watchItems()}handleClick(e){this.treeItemClicked.emit({id:e.id,name:e.name,url:e.url})}getFocusableElements(){return Array.from(this.host.shadowRoot.querySelectorAll('a[tabindex="0"]'))}getAncestor(e,t){let i=e;for(let e=0;e<t;e++){i=i===null||i===void 0?void 0:i.parentElement;if(!i){return}}return i}handleArrowNav(e){if(e.code===r.TAB){e.preventDefault();return}const t=this.getFocusableElements();const i=t.indexOf(e.target);if(i===-1){return}if(e.code===r.ARROW_DOWN||e.code===r.ARROW_UP){e.preventDefault();const l=i+(e.code===r.ARROW_DOWN?1:-1);if(l<0||l>=t.length){return}t[l].focus()}if(e.code===r.ARROW_LEFT){e.preventDefault();const l=this.getAncestor(t[i],4);if(!l||!l.children[0]||l.children[0].tagName.toLowerCase()!=="a"&&l.getAttribute("tabindex")===null){return}l.children[0].focus()}if(e.code===r.ARROW_RIGHT){e.preventDefault();const t=e.target.closest("z-list-element");if(!t){return}const i=t.querySelector("z-list");if(!i){return}const l=i.querySelector('a[tabindex="0"]');if(!l){return}l.focus()}}renderTreeList(e,t,i=1){var n,s;this.htmlTag=e.url?"a":"span";const o=l("z-list-element",{id:t,class:!e.icon?"no-icon-elm":"",clickable:Boolean(e.url),hasTreeItems:true,role:"none","aria-hidden":undefined},l(this.htmlTag,{class:{"list-element":true,"z-link":Boolean(e.url),"link-clickable":Boolean(e.url)},tabIndex:e.url?0:-1,onClick:()=>this.handleClick(e),onKeyUp:t=>{if(t.code===r.ENTER||t.code===r.SPACE){this.handleClick(e)}},onKeyDown:e=>this.handleArrowNav(e),role:e.url?"treeitem":undefined,"aria-hidden":e.url?undefined:"true","aria-expanded":((n=e.children)===null||n===void 0?void 0:n.length)>0&&true,"aria-level":i,"aria-label":e.name,href:e.url},l("span",{class:"item ellipsis"},e.icon&&l("z-icon",{width:16,height:16,fill:e.url?"color-primary01":"color-default-icon",class:"item-icon",name:e.icon}),l("span",{class:{"item-label":true,"no-icon-label":!e.icon,"bold-item":e.bold},title:e.name},e.name))),((s=e.children)===null||s===void 0?void 0:s.length)>0&&l("z-list",{role:"group"},l("div",{class:"children-node"},e.children.map(((e,t)=>this.renderTreeList(e,`${t}`,i+1))))));return o}render(){const e=this.parsedItems.some((e=>!!e.url));return l(n,{key:"1fe0cc5351db13f054dc3988ce06dd3698f3fdfc",class:"tree-list",role:e?"navigation":"none","aria-hidden":e?undefined:"true","aria-labelledby":this.htmlAriaLabelledby},l("div",{key:"27675ef82221e001a80b4df1a6b3a7597166164c",tabIndex:-1,role:e?"tree":"none","aria-hidden":e?undefined:"true","aria-label":this.htmlSectionTitle},this.parsedItems.map(((e,t)=>this.renderTreeList(e,`${t}`)))))}get host(){return this}static get watchers(){return{items:[{watchItems:0}]}}static get style(){return m()}},[1,"z-tree-list",{items:[1],htmlAriaLabelledby:[513,"html-aria-labelledby"],htmlSectionTitle:[513,"html-section-title"]},undefined,{items:[{watchItems:0}]}]);function h(){if(typeof customElements==="undefined"){return}const e=["z-tree-list","z-divider","z-icon","z-list","z-list-element"];e.forEach((e=>{switch(e){case"z-tree-list":if(!customElements.get(s(e))){customElements.define(s(e),f)}break;case"z-divider":if(!customElements.get(s(e))){o()}break;case"z-icon":if(!customElements.get(s(e))){a()}break;case"z-list":if(!customElements.get(s(e))){d()}break;case"z-list-element":if(!customElements.get(s(e))){c()}break}}))}const u=f;const p=h;export{u as ZTreeList,p as defineCustomElement};
|
|
2
2
|
//# sourceMappingURL=z-tree-list.js.map
|