UNPKG

@postnord/web-components

Version:

PostNord Web Components

34 lines (28 loc) 4.94 kB
/*! * Built with Stencil * By PostNord. */ 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); const index = require('./index-ec4ed1cc.js'); const pnTableCss = "pn-table{display:block;margin-bottom:1em}pn-table .pn-table-container table{width:100%}pn-table .pn-table-container table .column-wrapper{display:flex;gap:0.5em;width:100%;align-items:center}pn-table .pn-table-container table,pn-table .pn-table-container table th,pn-table .pn-table-container table td{padding:0;margin:0;border:0;outline:0;border-collapse:collapse;max-width:100%}pn-table .pn-table-container table th,pn-table .pn-table-container table td{text-align:left;line-height:2;vertical-align:middle;padding:1em 1.15em}pn-table .pn-table-container table th:first-child,pn-table .pn-table-container table td:first-child{border-radius:0.5em 0 0 0.5em}pn-table .pn-table-container table th:last-child,pn-table .pn-table-container table td:last-child{border-radius:0 0.5em 0.5em 0}pn-table .pn-table-container table th pn-icon,pn-table .pn-table-container table td pn-icon{vertical-align:middle}pn-table .pn-table-container table thead tr th,pn-table .pn-table-container table thead tr td{color:#005d92;font-weight:500}pn-table .pn-table-container table tbody tr th,pn-table .pn-table-container table tbody tr td{color:#2d2013;font-weight:400}pn-table.bordered .pn-table-container table{border-collapse:separate;border-spacing:0}pn-table.bordered .pn-table-container table thead tr:last-child th,pn-table.bordered .pn-table-container table thead tr:last-child td{border-bottom-width:0.0625em}pn-table.bordered .pn-table-container table thead tr:first-child th,pn-table.bordered .pn-table-container table thead tr:first-child td{border-top:0.0625em solid #005d92}pn-table.bordered .pn-table-container table thead tr th,pn-table.bordered .pn-table-container table thead tr td{border-bottom:0.0625em solid #005d92}pn-table.bordered .pn-table-container table thead tr th:first-child,pn-table.bordered .pn-table-container table thead tr td:first-child{border-left:0.0625em solid #005d92;border-radius:0.5em 0 0}pn-table.bordered .pn-table-container table thead tr th:last-child,pn-table.bordered .pn-table-container table thead tr td:last-child{border-radius:0 0.5em 0 0;border-right:0.0625em solid #005d92}pn-table.bordered .pn-table-container table tbody tr th,pn-table.bordered .pn-table-container table tbody tr td{border-bottom:0.0625em solid #d3cecb}pn-table.bordered .pn-table-container table tbody tr th:first-child,pn-table.bordered .pn-table-container table tbody tr td:first-child{border-left:0.0625em solid #005d92;border-radius:0}pn-table.bordered .pn-table-container table tbody tr th:last-child,pn-table.bordered .pn-table-container table tbody tr td:last-child{border-right:0.0625em solid #005d92;border-radius:0}pn-table.bordered .pn-table-container table tbody tr:last-of-type th,pn-table.bordered .pn-table-container table tbody tr:last-of-type td{border-bottom:0.0625em solid #005d92}pn-table.bordered .pn-table-container table tbody tr:last-of-type th:last-child,pn-table.bordered .pn-table-container table tbody tr:last-of-type td:last-child{border-radius:0 0 0.5em 0}pn-table.bordered .pn-table-container table tbody tr:last-of-type th:first-child,pn-table.bordered .pn-table-container table tbody tr:last-of-type td:first-child{border-radius:0 0 0 0.5em}pn-table.bordered.striped .pn-table-container table tbody tr th,pn-table.bordered.striped .pn-table-container table tbody tr td{border-bottom-width:0}pn-table.bordered.striped .pn-table-container table tbody tr:last-child th,pn-table.bordered.striped .pn-table-container table tbody tr:last-child td{border-bottom-width:0.0625em}pn-table.striped .pn-table-container table tbody tr:nth-child(odd) th,pn-table.striped .pn-table-container table tbody tr:nth-child(odd) td{background-color:#effbff}pn-table.color-gray .pn-table-container table tbody tr:nth-child(odd) th,pn-table.color-gray .pn-table-container table tbody tr:nth-child(odd) td{background-color:#f9f8f8}"; const PnTableStyle0 = pnTableCss; const PnTable = class { constructor(hostRef) { index.registerInstance(this, hostRef); this.gray = false; this.bordered = false; this.striped = false; } get hostElement() { return index.getElement(this); } getClassNames() { const classes = [this.striped && 'striped', this.bordered && 'bordered', this.gray ? 'color-gray' : 'color-blue']; return classes.filter(Boolean).join(' '); } render() { return (index.h(index.Host, { key: 'b9867d61ccf136800c5763fb75844738b20a3b48', class: this.getClassNames() }, index.h("div", { key: '59158aac1ab43cb38384b54240820e7b8323ca17', class: "pn-table-container" }, index.h("slot", { key: 'de9a611b8f096f96fd2c1827400692e407b16b3c' })))); } }; PnTable.style = PnTableStyle0; exports.pn_table = PnTable; //# sourceMappingURL=pn-table.cjs.entry.js.map