@paperless/core 1.58.1 → 1.59.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,5 +7,11 @@ export declare class CardHeader {
7
7
  * Enable the title arrow
8
8
  */
9
9
  arrow: boolean;
10
+ /**
11
+ * The host element
12
+ */
13
+ private _el;
14
+ private _hasContentSlot;
15
+ componentWillLoad(): void;
10
16
  render(): any;
11
17
  }
package/hydrate/index.js CHANGED
@@ -12039,13 +12039,18 @@ const cardHeaderComponentCss = ".mx-4{margin-left:1rem!important;margin-right:1r
12039
12039
  class CardHeader {
12040
12040
  constructor(hostRef) {
12041
12041
  registerInstance(this, hostRef);
12042
+ this._hasContentSlot = false;
12042
12043
  this.header = undefined;
12043
12044
  this.arrow = false;
12044
12045
  }
12046
+ componentWillLoad() {
12047
+ this._hasContentSlot = !!this._el.querySelector(':scope > [slot="slot"]');
12048
+ }
12045
12049
  render() {
12046
12050
  var _a, _b;
12047
- return (hAsync(Host, { class: 'p-card-header' }, hAsync("slot", { name: 'prefix' }), (((_a = this.header) === null || _a === void 0 ? void 0 : _a.length) || this.arrow) && (hAsync("div", { class: 'title' }, hAsync("span", null, (_b = this.header) !== null && _b !== void 0 ? _b : ''), this.arrow && (hAsync("p-icon", { variant: 'arrow', class: 'group-hover:text-indigo' })))), hAsync("slot", { name: 'suffix' })));
12051
+ return (hAsync(Host, { class: 'p-card-header' }, hAsync("slot", { name: 'prefix' }), (((_a = this.header) === null || _a === void 0 ? void 0 : _a.length) || this.arrow) && (hAsync("div", { class: 'title' }, hAsync("span", null, ((_b = this.header) !== null && _b !== void 0 ? _b : this._hasContentSlot) ? (hAsync("slot", { name: 'content' })) : ('')), this.arrow && (hAsync("p-icon", { variant: 'arrow', class: 'group-hover:text-indigo' })))), hAsync("slot", { name: 'suffix' })));
12048
12052
  }
12053
+ get _el() { return getElement(this); }
12049
12054
  static get style() { return cardHeaderComponentCss; }
12050
12055
  static get cmpMeta() { return {
12051
12056
  "$flags$": 4,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paperless/core",
3
- "version": "1.58.1",
3
+ "version": "1.59.0",
4
4
  "description": "Stencil Component Starter",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -1,2 +0,0 @@
1
- import{r as t,h as r,H as e}from"./p-e4d5e7a7.js";const o=".mx-4{margin-left:1rem!important;margin-right:1rem!important}.ml-2{margin-left:.5rem!important}.flex{display:flex!important}.h-14{height:3.5rem!important}.flex-1{flex:1 1 0%!important}.items-center{align-items:center!important}.gap-3{gap:.75rem!important}.overflow-hidden{overflow:hidden!important}.text-ellipsis{text-overflow:ellipsis!important}.border-b{border-bottom-width:1px!important}.border-b-mystic-medium{--tw-border-opacity:1!important;border-bottom-color:rgb(227 236 243/var(--tw-border-opacity))!important}*{box-sizing:border-box}p-card-header{--tw-text-opacity:1;--tw-border-opacity:1!important;align-items:center;border-bottom-color:rgb(227 236 243/var(--tw-border-opacity))!important;border-bottom-width:1px!important;color:rgb(128 130 158/var(--tw-text-opacity));display:flex;flex-shrink:0;gap:.75rem;height:3.5rem;margin-left:1rem;margin-right:1rem}p-card-header .title{--tw-text-opacity:1;align-items:center;color:rgb(81 83 107/var(--tw-text-opacity));display:flex;flex:1 1 0%;font-weight:600;order:2;overflow:hidden}p-card-header .title>span{flex:1 1 0%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}p-card-header .title>p-icon{--tw-text-opacity:1;color:rgb(218 230 240/var(--tw-text-opacity));margin-left:.5rem}p-card-header [slot=prefix]{order:1}p-card-header [slot=suffix]{order:3}p-card-container.has-hover:hover p-card-header .title>p-icon{--tw-text-opacity:1;color:rgb(82 138 250/var(--tw-text-opacity))}.static{position:static!important}.group:hover .group-hover\\:text-indigo{--tw-text-opacity:1!important;color:rgb(82 138 250/var(--tw-text-opacity))!important}";const i=class{constructor(r){t(this,r);this.header=undefined;this.arrow=false}render(){var t,o;return r(e,{class:"p-card-header"},r("slot",{name:"prefix"}),(((t=this.header)===null||t===void 0?void 0:t.length)||this.arrow)&&r("div",{class:"title"},r("span",null,(o=this.header)!==null&&o!==void 0?o:""),this.arrow&&r("p-icon",{variant:"arrow",class:"group-hover:text-indigo"})),r("slot",{name:"suffix"}))}};i.style=o;export{i as p_card_header};
2
- //# sourceMappingURL=p-f37781ca.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["cardHeaderComponentCss","CardHeader","render","h","Host","class","name","_a","this","header","length","arrow","_b","variant"],"sources":["src/components/atoms/card-header/card-header.component.scss?tag=p-card-header","src/components/atoms/card-header/card-header.component.tsx"],"sourcesContent":["p-card-header {\n\t@apply mx-4 h-14 flex-shrink-0;\n\t@apply flex gap-3 items-center;\n\t@apply text-storm-medium;\n\t@apply border-b border-b-mystic-medium #{!important};\n\n\t.title {\n\t\t@apply order-2;\n\t\t@apply flex-1 overflow-hidden flex items-center text-storm;\n\t\t@apply font-semibold;\n\n\t\t> span {\n\t\t\t@apply flex-1 overflow-hidden text-ellipsis whitespace-nowrap;\n\t\t}\n\n\t\t> p-icon {\n\t\t\t@apply ml-2 text-mystic-dark;\n\t\t}\n\t}\n\n\t[slot='prefix'] {\n\t\t@apply order-1;\n\t}\n\n\t[slot='suffix'] {\n\t\t@apply order-3;\n\t}\n}\n\np-card-container.has-hover:hover {\n\tp-card-header {\n\t\t.title > p-icon {\n\t\t\t@apply text-indigo;\n\t\t}\n\t}\n}\n","import { Component, h, Host, Prop } from '@stencil/core';\n\n@Component({\n\ttag: 'p-card-header',\n\tstyleUrl: 'card-header.component.scss',\n})\nexport class CardHeader {\n\t/**\n\t * Content of the card header\n\t */\n\t@Prop() header: string;\n\n\t/**\n\t * Enable the title arrow\n\t */\n\t@Prop() arrow: boolean = false;\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class='p-card-header'>\n\t\t\t\t<slot name='prefix' />\n\n\t\t\t\t{(this.header?.length || this.arrow) && (\n\t\t\t\t\t<div class='title'>\n\t\t\t\t\t\t<span>{this.header ?? ''}</span>\n\t\t\t\t\t\t{this.arrow && (\n\t\t\t\t\t\t\t<p-icon\n\t\t\t\t\t\t\t\tvariant='arrow'\n\t\t\t\t\t\t\t\tclass='group-hover:text-indigo'\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\n\t\t\t\t<slot name='suffix' />\n\t\t\t</Host>\n\t\t);\n\t}\n}\n"],"mappings":"kDAAA,MAAMA,EAAyB,mkD,MCMlBC,EAAU,M,0DASG,K,CAEzB,MAAAC,G,QACC,OACCC,EAACC,EAAI,CAACC,MAAM,iBACXF,EAAA,QAAMG,KAAK,cAETC,EAAAC,KAAKC,UAAM,MAAAF,SAAA,SAAAA,EAAEG,SAAUF,KAAKG,QAC7BR,EAAA,OAAKE,MAAM,SACVF,EAAA,aAAOS,EAAAJ,KAAKC,UAAM,MAAAG,SAAA,EAAAA,EAAI,IACrBJ,KAAKG,OACLR,EAAA,UACCU,QAAQ,QACRR,MAAM,6BAMVF,EAAA,QAAMG,KAAK,W"}
@@ -1,2 +0,0 @@
1
- import{r as t,h as r,H as e}from"./p-e4d5e7a7.js";const o=".mx-4{margin-left:1rem!important;margin-right:1rem!important}.ml-2{margin-left:.5rem!important}.flex{display:flex!important}.h-14{height:3.5rem!important}.flex-1{flex:1 1 0%!important}.items-center{align-items:center!important}.gap-3{gap:.75rem!important}.overflow-hidden{overflow:hidden!important}.text-ellipsis{text-overflow:ellipsis!important}.border-b{border-bottom-width:1px!important}.border-b-mystic-medium{--tw-border-opacity:1!important;border-bottom-color:rgb(227 236 243/var(--tw-border-opacity))!important}*{box-sizing:border-box}p-card-header{--tw-text-opacity:1;--tw-border-opacity:1!important;align-items:center;border-bottom-color:rgb(227 236 243/var(--tw-border-opacity))!important;border-bottom-width:1px!important;color:rgb(128 130 158/var(--tw-text-opacity));display:flex;flex-shrink:0;gap:.75rem;height:3.5rem;margin-left:1rem;margin-right:1rem}p-card-header .title{--tw-text-opacity:1;align-items:center;color:rgb(81 83 107/var(--tw-text-opacity));display:flex;flex:1 1 0%;font-weight:600;order:2;overflow:hidden}p-card-header .title>span{flex:1 1 0%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}p-card-header .title>p-icon{--tw-text-opacity:1;color:rgb(218 230 240/var(--tw-text-opacity));margin-left:.5rem}p-card-header [slot=prefix]{order:1}p-card-header [slot=suffix]{order:3}p-card-container.has-hover:hover p-card-header .title>p-icon{--tw-text-opacity:1;color:rgb(82 138 250/var(--tw-text-opacity))}.static{position:static!important}.group:hover .group-hover\\:text-indigo{--tw-text-opacity:1!important;color:rgb(82 138 250/var(--tw-text-opacity))!important}";const i=class{constructor(r){t(this,r);this.header=undefined;this.arrow=false}render(){var t,o;return r(e,{class:"p-card-header"},r("slot",{name:"prefix"}),(((t=this.header)===null||t===void 0?void 0:t.length)||this.arrow)&&r("div",{class:"title"},r("span",null,(o=this.header)!==null&&o!==void 0?o:""),this.arrow&&r("p-icon",{variant:"arrow",class:"group-hover:text-indigo"})),r("slot",{name:"suffix"}))}};i.style=o;export{i as p_card_header};
2
- //# sourceMappingURL=p-f37781ca.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["cardHeaderComponentCss","CardHeader","render","h","Host","class","name","_a","this","header","length","arrow","_b","variant"],"sources":["src/components/atoms/card-header/card-header.component.scss?tag=p-card-header","src/components/atoms/card-header/card-header.component.tsx"],"sourcesContent":["p-card-header {\n\t@apply mx-4 h-14 flex-shrink-0;\n\t@apply flex gap-3 items-center;\n\t@apply text-storm-medium;\n\t@apply border-b border-b-mystic-medium #{!important};\n\n\t.title {\n\t\t@apply order-2;\n\t\t@apply flex-1 overflow-hidden flex items-center text-storm;\n\t\t@apply font-semibold;\n\n\t\t> span {\n\t\t\t@apply flex-1 overflow-hidden text-ellipsis whitespace-nowrap;\n\t\t}\n\n\t\t> p-icon {\n\t\t\t@apply ml-2 text-mystic-dark;\n\t\t}\n\t}\n\n\t[slot='prefix'] {\n\t\t@apply order-1;\n\t}\n\n\t[slot='suffix'] {\n\t\t@apply order-3;\n\t}\n}\n\np-card-container.has-hover:hover {\n\tp-card-header {\n\t\t.title > p-icon {\n\t\t\t@apply text-indigo;\n\t\t}\n\t}\n}\n","import { Component, h, Host, Prop } from '@stencil/core';\n\n@Component({\n\ttag: 'p-card-header',\n\tstyleUrl: 'card-header.component.scss',\n})\nexport class CardHeader {\n\t/**\n\t * Content of the card header\n\t */\n\t@Prop() header: string;\n\n\t/**\n\t * Enable the title arrow\n\t */\n\t@Prop() arrow: boolean = false;\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class='p-card-header'>\n\t\t\t\t<slot name='prefix' />\n\n\t\t\t\t{(this.header?.length || this.arrow) && (\n\t\t\t\t\t<div class='title'>\n\t\t\t\t\t\t<span>{this.header ?? ''}</span>\n\t\t\t\t\t\t{this.arrow && (\n\t\t\t\t\t\t\t<p-icon\n\t\t\t\t\t\t\t\tvariant='arrow'\n\t\t\t\t\t\t\t\tclass='group-hover:text-indigo'\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\n\t\t\t\t<slot name='suffix' />\n\t\t\t</Host>\n\t\t);\n\t}\n}\n"],"mappings":"kDAAA,MAAMA,EAAyB,mkD,MCMlBC,EAAU,M,0DASG,K,CAEzB,MAAAC,G,QACC,OACCC,EAACC,EAAI,CAACC,MAAM,iBACXF,EAAA,QAAMG,KAAK,cAETC,EAAAC,KAAKC,UAAM,MAAAF,SAAA,SAAAA,EAAEG,SAAUF,KAAKG,QAC7BR,EAAA,OAAKE,MAAM,SACVF,EAAA,aAAOS,EAAAJ,KAAKC,UAAM,MAAAG,SAAA,EAAAA,EAAI,IACrBJ,KAAKG,OACLR,EAAA,UACCU,QAAQ,QACRR,MAAM,6BAMVF,EAAA,QAAMG,KAAK,W"}