@paperless/core 1.31.0 → 1.32.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.
@@ -854,7 +854,12 @@ export namespace Components {
854
854
  /**
855
855
  * The size of the profile avatar
856
856
  */
857
- "size": 'small' | 'medium' | 'large';
857
+ "size": | 'xsmall'
858
+ | 'small'
859
+ | 'table'
860
+ | 'medium'
861
+ | 'large'
862
+ | 'xlarge';
858
863
  /**
859
864
  * The variant of the profile
860
865
  */
@@ -2936,7 +2941,12 @@ declare namespace LocalJSX {
2936
2941
  /**
2937
2942
  * The size of the profile avatar
2938
2943
  */
2939
- "size"?: 'small' | 'medium' | 'large';
2944
+ "size"?: | 'xsmall'
2945
+ | 'small'
2946
+ | 'table'
2947
+ | 'medium'
2948
+ | 'large'
2949
+ | 'xlarge';
2940
2950
  /**
2941
2951
  * The variant of the profile
2942
2952
  */
package/hydrate/index.js CHANGED
@@ -20750,7 +20750,7 @@ class PaginationItem {
20750
20750
  }; }
20751
20751
  }
20752
20752
 
20753
- const profileComponentCss = "/*!@.flex*/.flex.sc-p-profile{display:flex!important}/*!@.h-\\[3\\.125rem\\]*/.h-\\[3\\.125rem\\].sc-p-profile{height:3.125rem!important}/*!@.h-\\[4\\.125rem\\]*/.h-\\[4\\.125rem\\].sc-p-profile{height:4.125rem!important}/*!@.flex-col*/.flex-col.sc-p-profile{flex-direction:column!important}/*!@.items-center*/.items-center.sc-p-profile{align-items:center!important}/*!@.justify-center*/.justify-center.sc-p-profile{justify-content:center!important}/*!@.gap-3*/.gap-3.sc-p-profile{gap:.75rem!important}/*!@.overflow-hidden*/.overflow-hidden.sc-p-profile{overflow:hidden!important}/*!@.text-ellipsis*/.text-ellipsis.sc-p-profile{text-overflow:ellipsis!important}/*!@.rounded*/.rounded.sc-p-profile{border-radius:.25rem!important}/*!@.border*/.border.sc-p-profile{border-width:1px!important}/*!@.border-solid*/.border-solid.sc-p-profile{border-style:solid!important}/*!@.border-mystic-dark*/.border-mystic-dark.sc-p-profile{--tw-border-opacity:1!important;border-color:rgb(218 230 240/var(--tw-border-opacity))!important}/*!@.p-2*/.p-2.sc-p-profile{padding:.5rem!important}/*!@.text-sm*/.text-sm.sc-p-profile{font-size:.875rem!important;line-height:1.25rem!important}/*!@**/*.sc-p-profile{box-sizing:border-box}/*!@:host*/.sc-p-profile-h{display:flex}/*!@:host .content*/.sc-p-profile-h .content.sc-p-profile{align-items:center;display:flex;gap:.75rem;width:100%}/*!@:host .content .name*/.sc-p-profile-h .content.sc-p-profile .name.sc-p-profile{display:flex;flex-direction:column;justify-content:center;overflow:hidden}/*!@:host .content .name>:first-child*/.sc-p-profile-h .content.sc-p-profile .name.sc-p-profile>.sc-p-profile:first-child{--tw-text-opacity:1;color:rgb(39 40 56/var(--tw-text-opacity));font-size:.875rem;font-weight:600;line-height:1.25rem}/*!@:host .content .name>:nth-child(2)*/.sc-p-profile-h .content.sc-p-profile .name.sc-p-profile>.sc-p-profile:nth-child(2){--tw-text-opacity:1;color:rgb(152 154 183/var(--tw-text-opacity));font-size:.875rem;line-height:1.25rem}/*!@:host .content .name ::slotted(*)*/.sc-p-profile-h .content .name .sc-p-profile-s>*{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}/*!@:host([size=small])*/[size=small].sc-p-profile-h{height:2rem}/*!@:host([size=medium])*/[size=medium].sc-p-profile-h{height:3.125rem}/*!@:host([size=large])*/[size=large].sc-p-profile-h{height:4rem}/*!@:host(.has-dropdown)*/.has-dropdown.sc-p-profile-h{cursor:pointer}/*!@:host(.has-dropdown) .content*/.has-dropdown.sc-p-profile-h .content.sc-p-profile{--tw-border-opacity:1!important;border-color:rgb(218 230 240/var(--tw-border-opacity))!important;border-radius:.25rem;border-style:solid!important;border-width:1px!important;padding:.5rem}/*!@:host(.has-dropdown[size=small])*/.has-dropdown[size=small].sc-p-profile-h{height:3rem}/*!@:host(.has-dropdown[size=medium])*/.has-dropdown[size=medium].sc-p-profile-h{height:4.125rem}/*!@:host(.has-dropdown[size=large])*/.has-dropdown[size=large].sc-p-profile-h{height:5rem}/*!@:host(.active) .content,:host(.has-dropdown:hover) .content*/.active.sc-p-profile-h .content.sc-p-profile,.has-dropdown.sc-p-profile-h:hover .content.sc-p-profile{--tw-shadow:0px 0.3125rem 1rem rgba(0,24,98,.08),0px 0.0625rem 0.1875rem rgba(0,24,98,.13);--tw-shadow-colored:0px 0.3125rem 1rem var(--tw-shadow-color),0px 0.0625rem 0.1875rem var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}/*!@:host(.active) .content p-icon*/.active.sc-p-profile-h .content.sc-p-profile p-icon.sc-p-profile{--tw-text-opacity:1;color:rgb(82 138 250/var(--tw-text-opacity))}/*!@.static*/.static.sc-p-profile{position:static!important}/*!@.absolute*/.absolute.sc-p-profile{position:absolute!important}/*!@.ml-auto*/.ml-auto.sc-p-profile{margin-left:auto!important}/*!@.w-full*/.w-full.sc-p-profile{width:100%!important}/*!@.min-w-0*/.min-w-0.sc-p-profile{min-width:0!important}";
20753
+ const profileComponentCss = "/*!@.flex*/.flex.sc-p-profile{display:flex!important}/*!@.table*/.table.sc-p-profile{display:table!important}/*!@.h-\\[3\\.125rem\\]*/.h-\\[3\\.125rem\\].sc-p-profile{height:3.125rem!important}/*!@.h-\\[4\\.125rem\\]*/.h-\\[4\\.125rem\\].sc-p-profile{height:4.125rem!important}/*!@.h-\\[6\\.5rem\\]*/.h-\\[6\\.5rem\\].sc-p-profile{height:6.5rem!important}/*!@.flex-col*/.flex-col.sc-p-profile{flex-direction:column!important}/*!@.items-center*/.items-center.sc-p-profile{align-items:center!important}/*!@.justify-center*/.justify-center.sc-p-profile{justify-content:center!important}/*!@.gap-3*/.gap-3.sc-p-profile{gap:.75rem!important}/*!@.overflow-hidden*/.overflow-hidden.sc-p-profile{overflow:hidden!important}/*!@.text-ellipsis*/.text-ellipsis.sc-p-profile{text-overflow:ellipsis!important}/*!@.rounded*/.rounded.sc-p-profile{border-radius:.25rem!important}/*!@.border*/.border.sc-p-profile{border-width:1px!important}/*!@.border-solid*/.border-solid.sc-p-profile{border-style:solid!important}/*!@.border-mystic-dark*/.border-mystic-dark.sc-p-profile{--tw-border-opacity:1!important;border-color:rgb(218 230 240/var(--tw-border-opacity))!important}/*!@.p-2*/.p-2.sc-p-profile{padding:.5rem!important}/*!@.text-sm*/.text-sm.sc-p-profile{font-size:.875rem!important;line-height:1.25rem!important}/*!@**/*.sc-p-profile{box-sizing:border-box}/*!@:host*/.sc-p-profile-h{display:flex}/*!@:host .content*/.sc-p-profile-h .content.sc-p-profile{align-items:center;display:flex;gap:.75rem;width:100%}/*!@:host .content .name*/.sc-p-profile-h .content.sc-p-profile .name.sc-p-profile{display:flex;flex-direction:column;justify-content:center;overflow:hidden}/*!@:host .content .name>:first-child*/.sc-p-profile-h .content.sc-p-profile .name.sc-p-profile>.sc-p-profile:first-child{--tw-text-opacity:1;color:rgb(39 40 56/var(--tw-text-opacity));font-size:.875rem;font-weight:600;line-height:1.25rem}/*!@:host .content .name>:nth-child(2)*/.sc-p-profile-h .content.sc-p-profile .name.sc-p-profile>.sc-p-profile:nth-child(2){--tw-text-opacity:1;color:rgb(152 154 183/var(--tw-text-opacity));font-size:.875rem;line-height:1.25rem}/*!@:host .content .name ::slotted(*)*/.sc-p-profile-h .content .name .sc-p-profile-s>*{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}/*!@:host([size=xsmall])*/[size=xsmall].sc-p-profile-h{height:1.5rem}/*!@:host([size=small])*/[size=small].sc-p-profile-h{height:2rem}/*!@:host([size=table])*/[size=table].sc-p-profile-h{height:2.5rem}/*!@:host([size=medium])*/[size=medium].sc-p-profile-h{height:3.125rem}/*!@:host([size=large])*/[size=large].sc-p-profile-h{height:4rem}/*!@:host([size=xlarge])*/[size=xlarge].sc-p-profile-h{height:6.5rem}/*!@:host(.has-dropdown)*/.has-dropdown.sc-p-profile-h{cursor:pointer}/*!@:host(.has-dropdown) .content*/.has-dropdown.sc-p-profile-h .content.sc-p-profile{--tw-border-opacity:1!important;border-color:rgb(218 230 240/var(--tw-border-opacity))!important;border-radius:.25rem;border-style:solid!important;border-width:1px!important;padding:.5rem}/*!@:host(.has-dropdown[size=small])*/.has-dropdown[size=small].sc-p-profile-h{height:3rem}/*!@:host(.has-dropdown[size=medium])*/.has-dropdown[size=medium].sc-p-profile-h{height:4.125rem}/*!@:host(.has-dropdown[size=large])*/.has-dropdown[size=large].sc-p-profile-h{height:5rem}/*!@:host(.active) .content,:host(.has-dropdown:hover) .content*/.active.sc-p-profile-h .content.sc-p-profile,.has-dropdown.sc-p-profile-h:hover .content.sc-p-profile{--tw-shadow:0px 0.3125rem 1rem rgba(0,24,98,.08),0px 0.0625rem 0.1875rem rgba(0,24,98,.13);--tw-shadow-colored:0px 0.3125rem 1rem var(--tw-shadow-color),0px 0.0625rem 0.1875rem var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}/*!@:host(.active) .content p-icon*/.active.sc-p-profile-h .content.sc-p-profile p-icon.sc-p-profile{--tw-text-opacity:1;color:rgb(82 138 250/var(--tw-text-opacity))}/*!@.static*/.static.sc-p-profile{position:static!important}/*!@.absolute*/.absolute.sc-p-profile{position:absolute!important}/*!@.ml-auto*/.ml-auto.sc-p-profile{margin-left:auto!important}/*!@.w-full*/.w-full.sc-p-profile{width:100%!important}/*!@.min-w-0*/.min-w-0.sc-p-profile{min-width:0!important}";
20754
20754
 
20755
20755
  class Profile {
20756
20756
  constructor(hostRef) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paperless/core",
3
- "version": "1.31.0",
3
+ "version": "1.32.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 o,H as e,g as r}from"./p-e4d5e7a7.js";const i=".flex{display:flex!important}.h-\\[3\\.125rem\\]{height:3.125rem!important}.h-\\[4\\.125rem\\]{height:4.125rem!important}.flex-col{flex-direction:column!important}.items-center{align-items:center!important}.justify-center{justify-content:center!important}.gap-3{gap:.75rem!important}.overflow-hidden{overflow:hidden!important}.text-ellipsis{text-overflow:ellipsis!important}.rounded{border-radius:.25rem!important}.border{border-width:1px!important}.border-solid{border-style:solid!important}.border-mystic-dark{--tw-border-opacity:1!important;border-color:rgb(218 230 240/var(--tw-border-opacity))!important}.p-2{padding:.5rem!important}.text-sm{font-size:.875rem!important;line-height:1.25rem!important}*{box-sizing:border-box}:host{display:flex}:host .content{align-items:center;display:flex;gap:.75rem;width:100%}:host .content .name{display:flex;flex-direction:column;justify-content:center;overflow:hidden}:host .content .name>:first-child{--tw-text-opacity:1;color:rgb(39 40 56/var(--tw-text-opacity));font-size:.875rem;font-weight:600;line-height:1.25rem}:host .content .name>:nth-child(2){--tw-text-opacity:1;color:rgb(152 154 183/var(--tw-text-opacity));font-size:.875rem;line-height:1.25rem}:host .content .name ::slotted(*){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host([size=small]){height:2rem}:host([size=medium]){height:3.125rem}:host([size=large]){height:4rem}:host(.has-dropdown){cursor:pointer}:host(.has-dropdown) .content{--tw-border-opacity:1!important;border-color:rgb(218 230 240/var(--tw-border-opacity))!important;border-radius:.25rem;border-style:solid!important;border-width:1px!important;padding:.5rem}:host(.has-dropdown[size=small]){height:3rem}:host(.has-dropdown[size=medium]){height:4.125rem}:host(.has-dropdown[size=large]){height:5rem}:host(.active) .content,:host(.has-dropdown:hover) .content{--tw-shadow:0px 0.3125rem 1rem rgba(0,24,98,.08),0px 0.0625rem 0.1875rem rgba(0,24,98,.13);--tw-shadow-colored:0px 0.3125rem 1rem var(--tw-shadow-color),0px 0.0625rem 0.1875rem var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}:host(.active) .content p-icon{--tw-text-opacity:1;color:rgb(82 138 250/var(--tw-text-opacity))}.static{position:static!important}.absolute{position:absolute!important}.ml-auto{margin-left:auto!important}.w-full{width:100%!important}.min-w-0{min-width:0!important}";const a=class{constructor(o){t(this,o);this.variant="user";this.size="small";this._dropdownOpen=false}componentWillRender(){this._updateAvatar()}render(){const t=!!this._el.querySelector(':scope > [slot="dropdown"]');const r=this._getContent(t);return o(e,{class:`p-profile ${t&&"has-dropdown"} ${this._dropdownOpen&&"active"}`},t?o("p-dropdown",{class:"w-full min-w-0",strategy:"absolute",placement:this.variant==="user"?"top-end":"bottom-end",applyFullWidth:true,applyMaxWidth:false,onIsOpen:t=>this._dropdownOpen=t.detail},r,o("div",{slot:"items"},o("slot",{name:"dropdown"}))):r)}_getContent(t){return o("div",{class:"content",slot:"trigger"},o("slot",{name:"avatar"}),o("div",{class:"name"},o("slot",{name:"title"}),o("slot",{name:"subtitle"})),t&&this._getIcon())}_updateAvatar(){var t,o;const e=this._el.querySelector('p-avatar[slot="avatar"]');if(!e){return}e.variant=(t=this.variant)!==null&&t!==void 0?t:e.variant;e.size=(o=this.size)!==null&&o!==void 0?o:e===null||e===void 0?void 0:e.size}_getIcon(){return o("p-icon",{class:"ml-auto",variant:this.variant==="company"?"chevron":"more"})}get _el(){return r(this)}};a.style=i;export{a as p_profile};
2
- //# sourceMappingURL=p-93052b42.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["profileComponentCss","Profile","componentWillRender","this","_updateAvatar","render","hasDropdownSlot","_el","querySelector","content","_getContent","h","Host","class","_dropdownOpen","strategy","placement","variant","applyFullWidth","applyMaxWidth","onIsOpen","ev","detail","slot","name","_getIcon","avatar","_a","size","_b"],"sources":["src/components/molecules/profile/profile.component.scss?tag=p-profile&encapsulation=shadow","src/components/molecules/profile/profile.component.tsx"],"sourcesContent":[":host {\n\t@apply flex;\n\n\t.content {\n\t\t@apply flex gap-3 items-center w-full;\n\n\t\t.name {\n\t\t\t@apply flex flex-col justify-center overflow-hidden;\n\n\t\t\t> *:nth-child(1) {\n\t\t\t\t@apply text-sm text-storm-dark;\n\t\t\t\t@apply font-semibold;\n\t\t\t}\n\n\t\t\t> *:nth-child(2) {\n\t\t\t\t@apply text-sm text-storm-vague;\n\t\t\t}\n\n\t\t\t::slotted(*) {\n\t\t\t\t@apply text-ellipsis overflow-hidden whitespace-nowrap;\n\t\t\t}\n\t\t}\n\t}\n}\n\n:host([size='small']) {\n\t@apply h-8;\n}\n\n:host([size='medium']) {\n\t@apply h-[3.125rem];\n}\n\n:host([size='large']) {\n\t@apply h-16;\n}\n\n:host(.has-dropdown) {\n\t@apply cursor-pointer;\n\n\t.content {\n\t\t@apply p-2 rounded;\n\t\t@apply border border-solid border-mystic-dark #{!important};\n\t}\n}\n\n:host(.has-dropdown[size='small']) {\n\t@apply h-12;\n}\n\n:host(.has-dropdown[size='medium']) {\n\t@apply h-[4.125rem];\n}\n\n:host(.has-dropdown[size='large']) {\n\t@apply h-20;\n}\n\n:host(.has-dropdown:hover),\n:host(.active) {\n\t.content {\n\t\t@apply shadow-4;\n\t}\n}\n\n:host(.active) {\n\t.content {\n\t\tp-icon {\n\t\t\t@apply text-indigo;\n\t\t}\n\t}\n}\n","import { Component, Element, h, Host, Prop, State } from '@stencil/core';\n\n@Component({\n\ttag: 'p-profile',\n\tstyleUrl: 'profile.component.scss',\n\tshadow: true,\n})\nexport class Profile {\n\t/**\n\t * The variant of the profile\n\t */\n\t@Prop() variant: 'company' | 'user' = 'user';\n\n\t/**\n\t * The size of the profile avatar\n\t */\n\t@Prop({ reflect: true }) size: 'small' | 'medium' | 'large' = 'small';\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\t@State() private _dropdownOpen = false;\n\n\tcomponentWillRender() {\n\t\tthis._updateAvatar();\n\t}\n\n\trender() {\n\t\tconst hasDropdownSlot = !!this._el.querySelector(\n\t\t\t':scope > [slot=\"dropdown\"]'\n\t\t);\n\t\tconst content = this._getContent(hasDropdownSlot);\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={`p-profile ${hasDropdownSlot && 'has-dropdown'} ${\n\t\t\t\t\tthis._dropdownOpen && 'active'\n\t\t\t\t}`}\n\t\t\t>\n\t\t\t\t{hasDropdownSlot ? (\n\t\t\t\t\t<p-dropdown\n\t\t\t\t\t\tclass=\"w-full min-w-0\"\n\t\t\t\t\t\tstrategy=\"absolute\"\n\t\t\t\t\t\tplacement={\n\t\t\t\t\t\t\tthis.variant === 'user' ? 'top-end' : 'bottom-end'\n\t\t\t\t\t\t}\n\t\t\t\t\t\tapplyFullWidth={true}\n\t\t\t\t\t\tapplyMaxWidth={false}\n\t\t\t\t\t\tonIsOpen={(ev) => (this._dropdownOpen = ev.detail)}\n\t\t\t\t\t>\n\t\t\t\t\t\t{content}\n\t\t\t\t\t\t<div slot=\"items\">\n\t\t\t\t\t\t\t<slot name=\"dropdown\" />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</p-dropdown>\n\t\t\t\t) : (\n\t\t\t\t\tcontent\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t);\n\t}\n\n\tprivate _getContent(hasDropdownSlot) {\n\t\treturn (\n\t\t\t<div class=\"content\" slot=\"trigger\">\n\t\t\t\t<slot name=\"avatar\" />\n\t\t\t\t<div class=\"name\">\n\t\t\t\t\t<slot name=\"title\" />\n\t\t\t\t\t<slot name=\"subtitle\" />\n\t\t\t\t</div>\n\n\t\t\t\t{hasDropdownSlot && this._getIcon()}\n\t\t\t</div>\n\t\t);\n\t}\n\n\tprivate _updateAvatar() {\n\t\tconst avatar = this._el.querySelector(\n\t\t\t'p-avatar[slot=\"avatar\"]'\n\t\t) as HTMLPAvatarElement;\n\n\t\tif (!avatar) {\n\t\t\treturn;\n\t\t}\n\n\t\tavatar.variant = this.variant ?? avatar.variant;\n\t\tavatar.size = this.size ?? avatar?.size;\n\t}\n\n\tprivate _getIcon() {\n\t\treturn (\n\t\t\t<p-icon\n\t\t\t\tclass=\"ml-auto\"\n\t\t\t\tvariant={this.variant === 'company' ? 'chevron' : 'more'}\n\t\t\t/>\n\t\t);\n\t}\n}\n"],"mappings":"yDAAA,MAAMA,EAAsB,+2E,MCOfC,EAAO,M,sCAImB,O,UAKwB,Q,mBAO7B,K,CAEjC,mBAAAC,GACCC,KAAKC,e,CAGN,MAAAC,GACC,MAAMC,IAAoBH,KAAKI,IAAIC,cAClC,8BAED,MAAMC,EAAUN,KAAKO,YAAYJ,GACjC,OACCK,EAACC,EAAI,CACJC,MAAO,aAAaP,GAAmB,kBACtCH,KAAKW,eAAiB,YAGtBR,EACAK,EAAA,cACCE,MAAM,iBACNE,SAAS,WACTC,UACCb,KAAKc,UAAY,OAAS,UAAY,aAEvCC,eAAgB,KAChBC,cAAe,MACfC,SAAWC,GAAQlB,KAAKW,cAAgBO,EAAGC,QAE1Cb,EACDE,EAAA,OAAKY,KAAK,SACTZ,EAAA,QAAMa,KAAK,eAEA,E,CAQT,WAAAd,CAAYJ,GACnB,OACCK,EAAA,OAAKE,MAAM,UAAUU,KAAK,WACzBZ,EAAA,QAAMa,KAAK,WACXb,EAAA,OAAKE,MAAM,QACVF,EAAA,QAAMa,KAAK,UACXb,EAAA,QAAMa,KAAK,cAGXlB,GAAmBH,KAAKsB,W,CAKpB,aAAArB,G,QACP,MAAMsB,EAASvB,KAAKI,IAAIC,cACvB,2BAGD,IAAKkB,EAAQ,CACZ,M,CAGDA,EAAOT,SAAUU,EAAAxB,KAAKc,WAAO,MAAAU,SAAA,EAAAA,EAAID,EAAOT,QACxCS,EAAOE,MAAOC,EAAA1B,KAAKyB,QAAI,MAAAC,SAAA,EAAAA,EAAIH,IAAM,MAANA,SAAM,SAANA,EAAQE,I,CAG5B,QAAAH,GACP,OACCd,EAAA,UACCE,MAAM,UACNI,QAASd,KAAKc,UAAY,UAAY,UAAY,Q"}
@@ -1,2 +0,0 @@
1
- import{r as t,h as o,H as e,g as r}from"./p-e4d5e7a7.js";const i=".flex{display:flex!important}.h-\\[3\\.125rem\\]{height:3.125rem!important}.h-\\[4\\.125rem\\]{height:4.125rem!important}.flex-col{flex-direction:column!important}.items-center{align-items:center!important}.justify-center{justify-content:center!important}.gap-3{gap:.75rem!important}.overflow-hidden{overflow:hidden!important}.text-ellipsis{text-overflow:ellipsis!important}.rounded{border-radius:.25rem!important}.border{border-width:1px!important}.border-solid{border-style:solid!important}.border-mystic-dark{--tw-border-opacity:1!important;border-color:rgb(218 230 240/var(--tw-border-opacity))!important}.p-2{padding:.5rem!important}.text-sm{font-size:.875rem!important;line-height:1.25rem!important}*{box-sizing:border-box}:host{display:flex}:host .content{align-items:center;display:flex;gap:.75rem;width:100%}:host .content .name{display:flex;flex-direction:column;justify-content:center;overflow:hidden}:host .content .name>:first-child{--tw-text-opacity:1;color:rgb(39 40 56/var(--tw-text-opacity));font-size:.875rem;font-weight:600;line-height:1.25rem}:host .content .name>:nth-child(2){--tw-text-opacity:1;color:rgb(152 154 183/var(--tw-text-opacity));font-size:.875rem;line-height:1.25rem}:host .content .name ::slotted(*){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host([size=small]){height:2rem}:host([size=medium]){height:3.125rem}:host([size=large]){height:4rem}:host(.has-dropdown){cursor:pointer}:host(.has-dropdown) .content{--tw-border-opacity:1!important;border-color:rgb(218 230 240/var(--tw-border-opacity))!important;border-radius:.25rem;border-style:solid!important;border-width:1px!important;padding:.5rem}:host(.has-dropdown[size=small]){height:3rem}:host(.has-dropdown[size=medium]){height:4.125rem}:host(.has-dropdown[size=large]){height:5rem}:host(.active) .content,:host(.has-dropdown:hover) .content{--tw-shadow:0px 0.3125rem 1rem rgba(0,24,98,.08),0px 0.0625rem 0.1875rem rgba(0,24,98,.13);--tw-shadow-colored:0px 0.3125rem 1rem var(--tw-shadow-color),0px 0.0625rem 0.1875rem var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}:host(.active) .content p-icon{--tw-text-opacity:1;color:rgb(82 138 250/var(--tw-text-opacity))}.static{position:static!important}.absolute{position:absolute!important}.ml-auto{margin-left:auto!important}.w-full{width:100%!important}.min-w-0{min-width:0!important}";const a=class{constructor(o){t(this,o);this.variant="user";this.size="small";this._dropdownOpen=false}componentWillRender(){this._updateAvatar()}render(){const t=!!this._el.querySelector(':scope > [slot="dropdown"]');const r=this._getContent(t);return o(e,{class:`p-profile ${t&&"has-dropdown"} ${this._dropdownOpen&&"active"}`},t?o("p-dropdown",{class:"w-full min-w-0",strategy:"absolute",placement:this.variant==="user"?"top-end":"bottom-end",applyFullWidth:true,applyMaxWidth:false,onIsOpen:t=>this._dropdownOpen=t.detail},r,o("div",{slot:"items"},o("slot",{name:"dropdown"}))):r)}_getContent(t){return o("div",{class:"content",slot:"trigger"},o("slot",{name:"avatar"}),o("div",{class:"name"},o("slot",{name:"title"}),o("slot",{name:"subtitle"})),t&&this._getIcon())}_updateAvatar(){var t,o;const e=this._el.querySelector('p-avatar[slot="avatar"]');if(!e){return}e.variant=(t=this.variant)!==null&&t!==void 0?t:e.variant;e.size=(o=this.size)!==null&&o!==void 0?o:e===null||e===void 0?void 0:e.size}_getIcon(){return o("p-icon",{class:"ml-auto",variant:this.variant==="company"?"chevron":"more"})}get _el(){return r(this)}};a.style=i;export{a as p_profile};
2
- //# sourceMappingURL=p-93052b42.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["profileComponentCss","Profile","componentWillRender","this","_updateAvatar","render","hasDropdownSlot","_el","querySelector","content","_getContent","h","Host","class","_dropdownOpen","strategy","placement","variant","applyFullWidth","applyMaxWidth","onIsOpen","ev","detail","slot","name","_getIcon","avatar","_a","size","_b"],"sources":["src/components/molecules/profile/profile.component.scss?tag=p-profile&encapsulation=shadow","src/components/molecules/profile/profile.component.tsx"],"sourcesContent":[":host {\n\t@apply flex;\n\n\t.content {\n\t\t@apply flex gap-3 items-center w-full;\n\n\t\t.name {\n\t\t\t@apply flex flex-col justify-center overflow-hidden;\n\n\t\t\t> *:nth-child(1) {\n\t\t\t\t@apply text-sm text-storm-dark;\n\t\t\t\t@apply font-semibold;\n\t\t\t}\n\n\t\t\t> *:nth-child(2) {\n\t\t\t\t@apply text-sm text-storm-vague;\n\t\t\t}\n\n\t\t\t::slotted(*) {\n\t\t\t\t@apply text-ellipsis overflow-hidden whitespace-nowrap;\n\t\t\t}\n\t\t}\n\t}\n}\n\n:host([size='small']) {\n\t@apply h-8;\n}\n\n:host([size='medium']) {\n\t@apply h-[3.125rem];\n}\n\n:host([size='large']) {\n\t@apply h-16;\n}\n\n:host(.has-dropdown) {\n\t@apply cursor-pointer;\n\n\t.content {\n\t\t@apply p-2 rounded;\n\t\t@apply border border-solid border-mystic-dark #{!important};\n\t}\n}\n\n:host(.has-dropdown[size='small']) {\n\t@apply h-12;\n}\n\n:host(.has-dropdown[size='medium']) {\n\t@apply h-[4.125rem];\n}\n\n:host(.has-dropdown[size='large']) {\n\t@apply h-20;\n}\n\n:host(.has-dropdown:hover),\n:host(.active) {\n\t.content {\n\t\t@apply shadow-4;\n\t}\n}\n\n:host(.active) {\n\t.content {\n\t\tp-icon {\n\t\t\t@apply text-indigo;\n\t\t}\n\t}\n}\n","import { Component, Element, h, Host, Prop, State } from '@stencil/core';\n\n@Component({\n\ttag: 'p-profile',\n\tstyleUrl: 'profile.component.scss',\n\tshadow: true,\n})\nexport class Profile {\n\t/**\n\t * The variant of the profile\n\t */\n\t@Prop() variant: 'company' | 'user' = 'user';\n\n\t/**\n\t * The size of the profile avatar\n\t */\n\t@Prop({ reflect: true }) size: 'small' | 'medium' | 'large' = 'small';\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\t@State() private _dropdownOpen = false;\n\n\tcomponentWillRender() {\n\t\tthis._updateAvatar();\n\t}\n\n\trender() {\n\t\tconst hasDropdownSlot = !!this._el.querySelector(\n\t\t\t':scope > [slot=\"dropdown\"]'\n\t\t);\n\t\tconst content = this._getContent(hasDropdownSlot);\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={`p-profile ${hasDropdownSlot && 'has-dropdown'} ${\n\t\t\t\t\tthis._dropdownOpen && 'active'\n\t\t\t\t}`}\n\t\t\t>\n\t\t\t\t{hasDropdownSlot ? (\n\t\t\t\t\t<p-dropdown\n\t\t\t\t\t\tclass=\"w-full min-w-0\"\n\t\t\t\t\t\tstrategy=\"absolute\"\n\t\t\t\t\t\tplacement={\n\t\t\t\t\t\t\tthis.variant === 'user' ? 'top-end' : 'bottom-end'\n\t\t\t\t\t\t}\n\t\t\t\t\t\tapplyFullWidth={true}\n\t\t\t\t\t\tapplyMaxWidth={false}\n\t\t\t\t\t\tonIsOpen={(ev) => (this._dropdownOpen = ev.detail)}\n\t\t\t\t\t>\n\t\t\t\t\t\t{content}\n\t\t\t\t\t\t<div slot=\"items\">\n\t\t\t\t\t\t\t<slot name=\"dropdown\" />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</p-dropdown>\n\t\t\t\t) : (\n\t\t\t\t\tcontent\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t);\n\t}\n\n\tprivate _getContent(hasDropdownSlot) {\n\t\treturn (\n\t\t\t<div class=\"content\" slot=\"trigger\">\n\t\t\t\t<slot name=\"avatar\" />\n\t\t\t\t<div class=\"name\">\n\t\t\t\t\t<slot name=\"title\" />\n\t\t\t\t\t<slot name=\"subtitle\" />\n\t\t\t\t</div>\n\n\t\t\t\t{hasDropdownSlot && this._getIcon()}\n\t\t\t</div>\n\t\t);\n\t}\n\n\tprivate _updateAvatar() {\n\t\tconst avatar = this._el.querySelector(\n\t\t\t'p-avatar[slot=\"avatar\"]'\n\t\t) as HTMLPAvatarElement;\n\n\t\tif (!avatar) {\n\t\t\treturn;\n\t\t}\n\n\t\tavatar.variant = this.variant ?? avatar.variant;\n\t\tavatar.size = this.size ?? avatar?.size;\n\t}\n\n\tprivate _getIcon() {\n\t\treturn (\n\t\t\t<p-icon\n\t\t\t\tclass=\"ml-auto\"\n\t\t\t\tvariant={this.variant === 'company' ? 'chevron' : 'more'}\n\t\t\t/>\n\t\t);\n\t}\n}\n"],"mappings":"yDAAA,MAAMA,EAAsB,+2E,MCOfC,EAAO,M,sCAImB,O,UAKwB,Q,mBAO7B,K,CAEjC,mBAAAC,GACCC,KAAKC,e,CAGN,MAAAC,GACC,MAAMC,IAAoBH,KAAKI,IAAIC,cAClC,8BAED,MAAMC,EAAUN,KAAKO,YAAYJ,GACjC,OACCK,EAACC,EAAI,CACJC,MAAO,aAAaP,GAAmB,kBACtCH,KAAKW,eAAiB,YAGtBR,EACAK,EAAA,cACCE,MAAM,iBACNE,SAAS,WACTC,UACCb,KAAKc,UAAY,OAAS,UAAY,aAEvCC,eAAgB,KAChBC,cAAe,MACfC,SAAWC,GAAQlB,KAAKW,cAAgBO,EAAGC,QAE1Cb,EACDE,EAAA,OAAKY,KAAK,SACTZ,EAAA,QAAMa,KAAK,eAEA,E,CAQT,WAAAd,CAAYJ,GACnB,OACCK,EAAA,OAAKE,MAAM,UAAUU,KAAK,WACzBZ,EAAA,QAAMa,KAAK,WACXb,EAAA,OAAKE,MAAM,QACVF,EAAA,QAAMa,KAAK,UACXb,EAAA,QAAMa,KAAK,cAGXlB,GAAmBH,KAAKsB,W,CAKpB,aAAArB,G,QACP,MAAMsB,EAASvB,KAAKI,IAAIC,cACvB,2BAGD,IAAKkB,EAAQ,CACZ,M,CAGDA,EAAOT,SAAUU,EAAAxB,KAAKc,WAAO,MAAAU,SAAA,EAAAA,EAAID,EAAOT,QACxCS,EAAOE,MAAOC,EAAA1B,KAAKyB,QAAI,MAAAC,SAAA,EAAAA,EAAIH,IAAM,MAANA,SAAM,SAANA,EAAQE,I,CAG5B,QAAAH,GACP,OACCd,EAAA,UACCE,MAAM,UACNI,QAASd,KAAKc,UAAY,UAAY,UAAY,Q"}