@paperless/core 2.0.1-beta.35 → 2.0.1-beta.37
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 +143 -0
- package/dist/build/p-43992afc.js +2 -0
- package/dist/build/p-60f4b734.entry.js +2 -0
- package/dist/build/p-60f4b734.entry.js.map +1 -0
- package/dist/build/p-6db4ca89.entry.js +2 -0
- package/dist/build/p-6db4ca89.entry.js.map +1 -0
- package/dist/build/p-a9a85ce4.entry.js +2 -0
- package/dist/build/p-a9a85ce4.entry.js.map +1 -0
- package/dist/build/p-b3b50ed2.entry.js +2 -0
- package/dist/build/p-b3b50ed2.entry.js.map +1 -0
- package/dist/build/p-dc8258c0.entry.js +2 -0
- package/dist/build/p-dc8258c0.entry.js.map +1 -0
- package/dist/build/p-ff6356cb.entry.js +2 -0
- package/dist/build/p-ff6356cb.entry.js.map +1 -0
- package/dist/build/paperless.esm.js +1 -1
- package/dist/build/paperless.esm.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/p-checkbox_2.cjs.entry.js +16 -11
- package/dist/cjs/p-checkbox_2.cjs.entry.js.map +1 -1
- package/dist/cjs/p-dropdown-menu-item_4.cjs.entry.js +1 -1
- package/dist/cjs/p-dropdown-menu-item_4.cjs.entry.js.map +1 -1
- package/dist/cjs/p-radio.cjs.entry.js +6 -15
- package/dist/cjs/p-radio.cjs.entry.js.map +1 -1
- package/dist/cjs/p-select.cjs.entry.js +35 -26
- package/dist/cjs/p-select.cjs.entry.js.map +1 -1
- package/dist/cjs/p-stepper.cjs.entry.js +1 -1
- package/dist/cjs/p-stepper.cjs.entry.js.map +1 -1
- package/dist/cjs/p-toggle.cjs.entry.js +8 -43
- package/dist/cjs/p-toggle.cjs.entry.js.map +1 -1
- package/dist/cjs/paperless.cjs.js +1 -1
- package/dist/collection/components/atoms/checkbox/checkbox.component.css +1 -1
- package/dist/collection/components/atoms/checkbox/checkbox.component.js +15 -30
- package/dist/collection/components/atoms/checkbox/checkbox.component.js.map +1 -1
- package/dist/collection/components/atoms/dropdown-menu-item/dropdown-menu-item.component.js +1 -1
- package/dist/collection/components/atoms/dropdown-menu-item/dropdown-menu-item.component.js.map +1 -1
- package/dist/collection/components/atoms/radio/radio.component.css +1 -1
- package/dist/collection/components/atoms/radio/radio.component.js +5 -34
- package/dist/collection/components/atoms/radio/radio.component.js.map +1 -1
- package/dist/collection/components/atoms/toggle/toggle.component.css +1 -1
- package/dist/collection/components/atoms/toggle/toggle.component.js +7 -62
- package/dist/collection/components/atoms/toggle/toggle.component.js.map +1 -1
- package/dist/collection/components/molecules/select/select.component.css +1 -1
- package/dist/collection/components/molecules/select/select.component.js +80 -25
- package/dist/collection/components/molecules/select/select.component.js.map +1 -1
- package/dist/collection/components/molecules/stepper/stepper.component.css +1 -1
- package/dist/components/checkbox.component.js +16 -12
- package/dist/components/checkbox.component.js.map +1 -1
- package/dist/components/dropdown-menu-item.component.js +1 -1
- package/dist/components/dropdown-menu-item.component.js.map +1 -1
- package/dist/components/p-radio.js +6 -16
- package/dist/components/p-radio.js.map +1 -1
- package/dist/components/p-select.js +37 -26
- package/dist/components/p-select.js.map +1 -1
- package/dist/components/p-stepper.js +1 -1
- package/dist/components/p-stepper.js.map +1 -1
- package/dist/components/p-toggle.js +8 -44
- package/dist/components/p-toggle.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/p-checkbox_2.entry.js +16 -11
- package/dist/esm/p-checkbox_2.entry.js.map +1 -1
- package/dist/esm/p-dropdown-menu-item_4.entry.js +1 -1
- package/dist/esm/p-dropdown-menu-item_4.entry.js.map +1 -1
- package/dist/esm/p-radio.entry.js +6 -15
- package/dist/esm/p-radio.entry.js.map +1 -1
- package/dist/esm/p-select.entry.js +35 -26
- package/dist/esm/p-select.entry.js.map +1 -1
- package/dist/esm/p-stepper.entry.js +1 -1
- package/dist/esm/p-stepper.entry.js.map +1 -1
- package/dist/esm/p-toggle.entry.js +8 -43
- package/dist/esm/p-toggle.entry.js.map +1 -1
- package/dist/esm/paperless.js +1 -1
- package/dist/index.html +1 -1
- package/dist/paperless/p-60f4b734.entry.js +2 -0
- package/dist/paperless/p-60f4b734.entry.js.map +1 -0
- package/dist/paperless/p-6db4ca89.entry.js +2 -0
- package/dist/paperless/p-6db4ca89.entry.js.map +1 -0
- package/dist/paperless/p-a9a85ce4.entry.js +2 -0
- package/dist/paperless/p-a9a85ce4.entry.js.map +1 -0
- package/dist/paperless/p-b3b50ed2.entry.js +2 -0
- package/dist/paperless/p-b3b50ed2.entry.js.map +1 -0
- package/dist/paperless/p-dc8258c0.entry.js +2 -0
- package/dist/paperless/p-dc8258c0.entry.js.map +1 -0
- package/dist/paperless/p-ff6356cb.entry.js +2 -0
- package/dist/paperless/p-ff6356cb.entry.js.map +1 -0
- package/dist/paperless/paperless.esm.js +1 -1
- package/dist/paperless/paperless.esm.js.map +1 -1
- package/dist/sw.js +1 -1
- package/dist/sw.js.map +1 -1
- package/dist/types/components/atoms/checkbox/checkbox.component.d.ts +0 -4
- package/dist/types/components/atoms/radio/radio.component.d.ts +0 -4
- package/dist/types/components/atoms/toggle/toggle.component.d.ts +0 -4
- package/dist/types/components/molecules/select/select.component.d.ts +10 -0
- package/dist/types/components.d.ts +16 -24
- package/hydrate/index.js +69 -100
- package/hydrate/index.mjs +69 -100
- package/package.json +1 -1
- package/dist/build/p-2d43b7ce.entry.js +0 -2
- package/dist/build/p-2d43b7ce.entry.js.map +0 -1
- package/dist/build/p-489013c7.entry.js +0 -2
- package/dist/build/p-489013c7.entry.js.map +0 -1
- package/dist/build/p-8857d619.entry.js +0 -2
- package/dist/build/p-8857d619.entry.js.map +0 -1
- package/dist/build/p-99352ae4.entry.js +0 -2
- package/dist/build/p-99352ae4.entry.js.map +0 -1
- package/dist/build/p-cf0cc50e.js +0 -2
- package/dist/build/p-d2ddf504.entry.js +0 -2
- package/dist/build/p-d2ddf504.entry.js.map +0 -1
- package/dist/build/p-da44c5f3.entry.js +0 -2
- package/dist/build/p-da44c5f3.entry.js.map +0 -1
- package/dist/paperless/p-2d43b7ce.entry.js +0 -2
- package/dist/paperless/p-2d43b7ce.entry.js.map +0 -1
- package/dist/paperless/p-489013c7.entry.js +0 -2
- package/dist/paperless/p-489013c7.entry.js.map +0 -1
- package/dist/paperless/p-8857d619.entry.js +0 -2
- package/dist/paperless/p-8857d619.entry.js.map +0 -1
- package/dist/paperless/p-99352ae4.entry.js +0 -2
- package/dist/paperless/p-99352ae4.entry.js.map +0 -1
- package/dist/paperless/p-d2ddf504.entry.js +0 -2
- package/dist/paperless/p-d2ddf504.entry.js.map +0 -1
- package/dist/paperless/p-da44c5f3.entry.js +0 -2
- package/dist/paperless/p-da44c5f3.entry.js.map +0 -1
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as t,h as e,H as a,c as i,g as r}from"./p-45ded510.js";import{c as o}from"./p-8a5b8196.js";import{f as n,g as s}from"./p-f26a3049.js";import{d as l,a as p}from"./p-83946184.js";import"./p-8a1a6e56.js";const c="*{box-sizing:border-box}.static{position:static!important}.block{display:block!important}.flex{display:flex!important}.h-8{height:2rem!important}.w-full{width:100%!important}.max-w-full{max-width:100%!important}.cursor-not-allowed{cursor:not-allowed!important}.cursor-pointer{cursor:pointer!important}.items-center{align-items:center!important}.gap-2{gap:.5rem!important}.overflow-hidden{overflow:hidden!important}.text-ellipsis{text-overflow:ellipsis!important}.whitespace-nowrap{white-space:nowrap!important}.rounded-lg{border-radius:.5rem!important}.bg-dark-teal-400{--tw-bg-opacity:1!important;background-color:rgb(51 116 109/var(--tw-bg-opacity,1))!important}.bg-negative-red-100{--tw-bg-opacity:1!important;background-color:rgb(255 221 221/var(--tw-bg-opacity,1))!important}.bg-negative-red-50{--tw-bg-opacity:1!important;background-color:rgb(253 237 237/var(--tw-bg-opacity,1))!important}.bg-supportive-lilac-100{--tw-bg-opacity:1!important;background-color:rgb(246 239 255/var(--tw-bg-opacity,1))!important}.px-2{padding-left:.5rem!important;padding-right:.5rem!important}.py-1{padding-bottom:.25rem!important;padding-top:.25rem!important}.text-start{text-align:start!important}.text-base{font-size:1rem!important;line-height:1.5rem!important}.text-sm{font-size:.875rem!important;line-height:1.25rem!important}.font-medium{font-weight:500!important}.text-black-teal{--tw-text-opacity:1!important;color:rgb(3 42 36/var(--tw-text-opacity,1))!important}.text-black-teal-100{--tw-text-opacity:1!important;color:rgb(205 212 211/var(--tw-text-opacity,1))!important}.text-black-teal-200{--tw-text-opacity:1!important;color:rgb(154 170 167/var(--tw-text-opacity,1))!important}.text-black-teal-300{--tw-text-opacity:1!important;color:rgb(104 127 124/var(--tw-text-opacity,1))!important}.text-dark-teal-100{--tw-text-opacity:1!important;color:rgb(204 220 218/var(--tw-text-opacity,1))!important}.text-negative-red{--tw-text-opacity:1!important;color:rgb(230 30 30/var(--tw-text-opacity,1))!important}.text-negative-red-100{--tw-text-opacity:1!important;color:rgb(255 221 221/var(--tw-text-opacity,1))!important}.text-negative-red-800{--tw-text-opacity:1!important;color:rgb(141 16 16/var(--tw-text-opacity,1))!important}.text-white{--tw-text-opacity:1!important;color:rgb(255 255 255/var(--tw-text-opacity,1))!important}.opacity-40{opacity:.4!important}.hover\\:bg-dark-teal-400:hover{--tw-bg-opacity:1!important;background-color:rgb(51 116 109/var(--tw-bg-opacity,1))!important}.hover\\:bg-negative-red-50:hover{--tw-bg-opacity:1!important;background-color:rgb(253 237 237/var(--tw-bg-opacity,1))!important}.hover\\:bg-supportive-lilac-50:hover{--tw-bg-opacity:1!important;background-color:rgb(250 247 255/var(--tw-bg-opacity,1))!important}.group:hover .group-hover\\:text-black-teal{--tw-text-opacity:1!important;color:rgb(3 42 36/var(--tw-text-opacity,1))!important}.group:hover .group-hover\\:text-negative-red-800{--tw-text-opacity:1!important;color:rgb(141 16 16/var(--tw-text-opacity,1))!important}.group:hover .group-hover\\:text-white{--tw-text-opacity:1!important;color:rgb(255 255 255/var(--tw-text-opacity,1))!important}";const d=c;const g=o(["p-dropdown-menu-item flex px-2 py-1 gap-2 text-sm font-medium group rounded-lg items-center h-8 max-w-full"],{variants:{variant:{default:null,"dark-teal":null,negative:null},active:{false:null,true:null},disabled:{false:"cursor-pointer",true:"cursor-not-allowed"},enableHover:{false:null,true:null}},compoundVariants:[{variant:"default",active:false,enableHover:true,disabled:false,class:"text-black-teal hover:bg-supportive-lilac-50"},{variant:"default",active:true,disabled:false,class:"bg-supportive-lilac-100"},{variant:"default",disabled:true,class:"text-black-teal-200"},{variant:"default",disabled:true,active:true,class:"bg-supportive-lilac-100"},{variant:"dark-teal",active:false,enableHover:true,class:"text-white"},{variant:"dark-teal",active:false,enableHover:true,disabled:false,class:"hover:bg-dark-teal-400"},{variant:"dark-teal",active:true,class:"text-white bg-dark-teal-400"},{variant:"dark-teal",disabled:true,class:"opacity-40"},{variant:"negative",active:false,enableHover:true,disabled:false,class:"text-negative-red hover:bg-negative-red-50"},{variant:"negative",active:true,disabled:false,class:"bg-negative-red-100 text-negative-red"},{variant:"negative",disabled:true,class:"text-negative-red-100"},{variant:"negative",disabled:true,active:true,class:"bg-negative-red-50"},{enableHover:true,disabled:false,class:"cursor-pointer"}]});const h=o(["text-base"],{variants:{variant:{default:null,"dark-teal":null,negative:null},active:{false:null,true:null},disabled:{false:null,true:"text-black-teal-100"}},compoundVariants:[{variant:"default",active:false,disabled:false,class:"text-black-teal-300 group-hover:text-black-teal"},{variant:"dark-teal",active:false,disabled:false,class:"text-dark-teal-100 group-hover:text-white"},{variant:"negative",active:false,disabled:false,class:"text-negative-red group-hover:text-negative-red-800"},{variant:"negative",active:true,disabled:false,class:"text-negative-red-800"}]});const m=class{constructor(e){t(this,e);this.active=false;this.checkbox=false;this.variant="default";this.enableHover=true;this.disabled=false;this.icon=undefined;this.useContainer=true}render(){return e(a,{key:"32964bd59857a3a902c7e27641dfe04040e71cf8",class:g({variant:this.variant,active:this.active,enableHover:this.enableHover,disabled:this.disabled})},this.icon&&e("p-icon",{key:"2dcd2db6b8bced38d21fe16cecc8d76b9298dec0",class:h({variant:this.variant,active:this.active,disabled:this.disabled}),variant:this.icon}),this.checkbox&&e("p-checkbox",{key:"084c1a2b222ab215cffe1272de6e24d691252aee",size:"sm",checked:this.active,disabled:this.disabled}),this.useContainer?e("div",{class:"block w-full overflow-hidden text-ellipsis whitespace-nowrap text-start"},e("slot",null)):e("slot",null))}};m.style=d;const b="*{box-sizing:border-box}.static{position:static!important}.flex{display:flex!important}.hidden{display:none!important}.items-center{align-items:center!important}.gap-2{gap:.5rem!important}";const u=b;const f=o(["p-pagination","flex gap-2 items-center"],{variants:{hidden:{false:"flex",true:"hidden"}}});const v=class{constructor(e){t(this,e);this.pageChange=i(this,"pageChange",3);this.pagesChange=i(this,"pagesChange",7);this.page=1;this.pageSize=12;this.hideOnSinglePage=false;this.total=undefined}pageChange;pagesChange;_pages=[];_set=[];componentWillRender(){this._generate()}render(){return e(a,{key:"e0690bf05d27e87d7e85b24cd2944ed338296dbf",class:f({hidden:this.hideOnSinglePage&&this._set?.length===3})},this._set?.map((t=>{if(t.type==="previous"||t.type==="next"){return e("p-pagination-pages-item",{variant:"carousel",disabled:this._carouselDisabled(t.type),onClick:()=>t.type==="previous"?this._previousClick():this._nextClick()},t.value)}if(t.type==="ellipsis"){return e("p-pagination-pages-item",{hover:false},"...")}return e("p-pagination-pages-item",{active:t.value===this.page,onClick:()=>this._pageClick(t.value)},t.value)})))}pageChangeHandler(){this._generate()}_generate(){this._pages=this._generatePages();this._set=this._generateSet();if(this.page>this._pages?.length){this._changePage(this._pages.length)}}_changePage(t){if(!t){return}this.page=t;this.pageChange.emit(this.page)}_previousClick(){if(this._carouselDisabled("previous")){return}this._changePage(this.page-1)}_nextClick=()=>{if(this._carouselDisabled("next")){return}this._changePage(this.page+1)};_carouselDisabled=t=>{if(t==="next"){const t=this.page+1;if(t>this._pages[this._pages.length-1]){return true}}if(t==="previous"){const t=this.page-1;if(t<this._pages[0]){return true}}return false};_pageClick=t=>this._changePage(t);_generatePages(){if(!this.total||!this.pageSize){return[]}const t=Math.ceil(this.total/this.pageSize);this.pagesChange.emit(t);return new Array(t).fill(undefined).map(((t,e)=>e+1))}_generateSet=(t=1,a=true)=>{const i=this._pages.length;if(!i){return[]}let r=this.page-t;let o=this.page+t;if(o>i){o=i;r=i-t*2;r=r<1?1:r}if(r<=1){r=1;o=Math.min(t*2+1,i)}const n=[];const s={type:"previous",value:e("p-icon",{variant:"caret",size:"sm",rotate:90})};const l={type:"next",value:e("p-icon",{variant:"caret",size:"sm",rotate:-90})};if(t===null){const t=this._pages.map((t=>({type:"page",value:t})));return a?[s,...t,l]:t}if(a){n.push(s)}if(r<=3){for(let t=1;t<r;t++){n.push({type:"page",value:this._pages[t-1]})}}else{n.push({type:"page",value:1});n.push({type:"ellipsis",value:"ellipsis"})}for(let t=r;t<=o;t++){n.push({type:"page",value:this._pages[t-1]})}if(o>=i-2){for(let t=o+1;t<=i;t++){n.push({type:"page",value:this._pages[t-1]})}}else{n.push({type:"ellipsis"});n.push({type:"page",value:this._pages[this._pages.length-1]})}if(a){n.push(l)}return n};static get watchers(){return{page:["pageChangeHandler"],pageSize:["pageChangeHandler"],total:["pageChangeHandler"]}}};v.style=u;const x="*{box-sizing:border-box}.static{position:static!important}.flex{display:flex!important}.h-6{height:1.5rem!important}.w-6{width:1.5rem!important}.cursor-not-allowed{cursor:not-allowed!important}.cursor-pointer{cursor:pointer!important}.items-center{align-items:center!important}.justify-center{justify-content:center!important}.rounded{border-radius:.25rem!important}.rounded-full{border-radius:9999px!important}.bg-dark-teal-600{--tw-bg-opacity:1!important;background-color:rgb(0 72 64/var(--tw-bg-opacity,1))!important}.bg-off-white-300{--tw-bg-opacity:1!important;background-color:rgb(248 247 244/var(--tw-bg-opacity,1))!important}.bg-off-white-700{--tw-bg-opacity:1!important;background-color:rgb(222 219 213/var(--tw-bg-opacity,1))!important}.text-center{text-align:center!important}.text-sm{font-size:.875rem!important;line-height:1.25rem!important}.font-semibold{font-weight:600!important}.text-black-teal-500{--tw-text-opacity:1!important;color:rgb(3 42 36/var(--tw-text-opacity,1))!important}.text-white{--tw-text-opacity:1!important;color:rgb(255 255 255/var(--tw-text-opacity,1))!important}.opacity-20{opacity:.2!important}.hover\\:bg-dark-teal-700:hover{--tw-bg-opacity:1!important;background-color:rgb(0 56 50/var(--tw-bg-opacity,1))!important}.hover\\:bg-off-white-500:hover{--tw-bg-opacity:1!important;background-color:rgb(243 241 237/var(--tw-bg-opacity,1))!important}.focus\\:bg-dark-teal-800:focus{--tw-bg-opacity:1!important;background-color:rgb(1 37 33/var(--tw-bg-opacity,1))!important}";const w=x;const y=o(["p-pagination-item","text-sm ","h-6 w-6","flex items-center justify-center text-center"],{variants:{variant:{default:"rounded text-black-teal-500",carousel:"rounded-full text-white"},active:{false:null,true:null},hover:{false:null,true:null},disabled:{false:null,true:"cursor-not-allowed"}},compoundVariants:[{variant:"default",active:false,class:"bg-off-white-300"},{variant:"default",active:false,hover:true,class:"hover:bg-off-white-500 cursor-pointer"},{variant:"default",active:true,class:"bg-off-white-700 font-semibold"},{variant:"carousel",disabled:false,class:"bg-dark-teal-600"},{variant:"carousel",disabled:false,hover:true,class:"hover:bg-dark-teal-700 focus:bg-dark-teal-800 cursor-pointer"},{variant:"carousel",disabled:true,class:"bg-dark-teal-600 opacity-20"}]});const k=class{constructor(e){t(this,e);this.variant="default";this.active=false;this.hover=true;this.disabled=false}render(){return e(a,{key:"f3420e85e92135dff1fc18e3cdf3b394de06bcf4",class:y({variant:this.variant,active:this.active,hover:this.hover,disabled:this.disabled})},e("slot",{key:"154f74a83839bd6ffadd22e8df43a635bffe1f14"}))}};k.style=w;const _="*{box-sizing:border-box}.static{position:static!important}.flex{display:flex!important}.hidden{display:none!important}.h-6{height:1.5rem!important}.min-w-0{min-width:0!important}.flex-1{flex:1 1 0%!important}.flex-shrink-0{flex-shrink:0!important}.cursor-pointer{cursor:pointer!important}.items-center{align-items:center!important}.gap-2{gap:.5rem!important}.overflow-hidden{overflow:hidden!important}.text-ellipsis{text-overflow:ellipsis!important}.text-nowrap{text-wrap:nowrap!important}.rounded-full{border-radius:9999px!important}.bg-dark-teal-600{--tw-bg-opacity:1!important;background-color:rgb(0 72 64/var(--tw-bg-opacity,1))!important}.bg-dark-teal-800{--tw-bg-opacity:1!important;background-color:rgb(1 37 33/var(--tw-bg-opacity,1))!important}.px-2{padding-left:.5rem!important;padding-right:.5rem!important}.text-sm{font-size:.875rem!important;line-height:1.25rem!important}.font-medium{font-weight:500!important}.text-white{--tw-text-opacity:1!important;color:rgb(255 255 255/var(--tw-text-opacity,1))!important}.hover\\:bg-dark-teal-700:hover{--tw-bg-opacity:1!important;background-color:rgb(0 56 50/var(--tw-bg-opacity,1))!important}";const z=_;const C=o("p-pagination-size",{variants:{hidden:{false:null,true:"hidden"}}});const H=o(["flex items-center gap-2","px-2 h-6","text-sm text-white font-medium ","cursor-pointer rounded-full"],{variants:{active:{false:"bg-dark-teal-600 hover:bg-dark-teal-700",true:"bg-dark-teal-800"}}});const j=class{constructor(e){t(this,e);this.sizeChange=i(this,"sizeChange",3);this.size=l;this.sizeOptions=p;this.itemTemplate=this._defaultItemTemplate;this.hidden=false;this.dropdownIsOpen=false;this._locales={}}_defaultItemTemplate=t=>n(this._locales.item,{size:t});sizeChange;get _el(){return r(this)}componentWillLoad(){this._setLocales()}render(){return e(a,{key:"c6a8bdc78842d4eea1a88621dfea502146de809e",class:C({hidden:this.hidden})},e("p-dropdown",{key:"426f6a7215cf96574d6b541582730f486d99f603",variant:"dark-teal",placement:"top-start",chevronDirection:"down",calculateWidth:true,onIsOpen:({detail:t})=>this.dropdownIsOpen=t},e("div",{key:"1d0e91bbda0055e463d5240b58ddb5a1fa4f4ff5",class:H({active:this.dropdownIsOpen}),slot:"trigger"},e("p",{key:"22fd50f9438b897fd2e44ae1c7b36f2964c6b415",class:"min-w-0 flex-1 overflow-hidden text-ellipsis text-nowrap"},this.itemTemplate?this.itemTemplate(this.size):this._defaultItemTemplate(this.size)),e("p-icon",{key:"0d1b2ef85f9a19593e454923adc3c969c8c4351d",class:"flex-shrink-0",variant:"double-caret",size:"sm"})),e("slot",{key:"95bb00e64170b9df61ba489343e58fdf647051b3",slot:"items"},this.sizeOptions.map((t=>e("p-dropdown-menu-item",{active:t===this.size,onClick:()=>this._changeSize(t)},this.itemTemplate?this.itemTemplate(t):this._defaultItemTemplate(t)))))))}async _setLocales(){this._locales=await s(this._el)}_changeSize(t){if(!t){return}this.size=t;this.sizeChange.emit(this.size)}};j.style=z;export{m as p_dropdown_menu_item,v as p_pagination_pages,k as p_pagination_pages_item,j as p_pagination_size};
|
|
2
|
-
//# sourceMappingURL=p-99352ae4.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["dropdownMenuItemComponentCss","PDropdownMenuItemStyle0","dropdownMenuItem","cva","variants","variant","default","negative","active","false","true","disabled","enableHover","compoundVariants","class","dropdownMenuItemIcon","DropdownMenuItem","render","h","Host","key","this","icon","checkbox","size","checked","useContainer","paginationPagesComponentCss","PPaginationPagesStyle0","pagination","hidden","PaginationPages","pageChange","pagesChange","_pages","_set","componentWillRender","_generate","hideOnSinglePage","length","map","p","type","_carouselDisabled","onClick","_previousClick","_nextClick","value","hover","page","_pageClick","pageChangeHandler","_generatePages","_generateSet","_changePage","emit","nextPage","previousPage","total","pageSize","pages","Math","ceil","Array","fill","undefined","_","i","range","enableBoundaries","totalPages","start","end","min","set","previous","rotate","next","push","paginationPagesItemComponentCss","PPaginationPagesItemStyle0","item","carousel","PaginationPagesItem","paginationSizeComponentCss","PPaginationSizeStyle0","paginationSize","trigger","PaginationSize","defaultSize","defaultSizeOptions","_defaultItemTemplate","formatTranslation","_locales","sizeChange","componentWillLoad","_setLocales","placement","chevronDirection","calculateWidth","onIsOpen","detail","dropdownIsOpen","slot","itemTemplate","sizeOptions","option","_changeSize","getLocaleComponentStrings","_el","s"],"sources":["src/components/atoms/dropdown-menu-item/dropdown-menu-item.component.css?tag=p-dropdown-menu-item","src/components/atoms/dropdown-menu-item/dropdown-menu-item.component.tsx","src/components/molecules/pagination-pages/pagination-pages.component.css?tag=p-pagination-pages","src/components/molecules/pagination-pages/pagination-pages.component.tsx","src/components/atoms/pagination-pages-item/pagination-pages-item.component.css?tag=p-pagination-pages-item","src/components/atoms/pagination-pages-item/pagination-pages-item.component.tsx","src/components/molecules/pagination-size/pagination-size.component.css?tag=p-pagination-size&encapsulation=shadow","src/components/molecules/pagination-size/pagination-size.component.tsx"],"sourcesContent":[null,"import { Component, Host, Prop, h } from '@stencil/core';\nimport { IconVariant } from '../icon/icon.component';\nimport { cva } from 'class-variance-authority';\n\nconst dropdownMenuItem = cva(\n\t[\n\t\t'p-dropdown-menu-item flex px-2 py-1 gap-2 text-sm font-medium group rounded-lg items-center h-8 max-w-full',\n\t],\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\tdefault: null,\n\t\t\t\t'dark-teal': null,\n\t\t\t\tnegative: null,\n\t\t\t},\n\t\t\tactive: {\n\t\t\t\tfalse: null,\n\t\t\t\ttrue: null,\n\t\t\t},\n\t\t\tdisabled: {\n\t\t\t\tfalse: 'cursor-pointer',\n\t\t\t\ttrue: 'cursor-not-allowed',\n\t\t\t},\n\t\t\tenableHover: {\n\t\t\t\tfalse: null,\n\t\t\t\ttrue: null,\n\t\t\t},\n\t\t},\n\t\tcompoundVariants: [\n\t\t\t{\n\t\t\t\tvariant: 'default',\n\t\t\t\tactive: false,\n\t\t\t\tenableHover: true,\n\t\t\t\tdisabled: false,\n\t\t\t\tclass: 'text-black-teal hover:bg-supportive-lilac-50',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: 'default',\n\t\t\t\tactive: true,\n\t\t\t\tdisabled: false,\n\t\t\t\tclass: 'bg-supportive-lilac-100',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: 'default',\n\t\t\t\tdisabled: true,\n\t\t\t\tclass: 'text-black-teal-200',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: 'default',\n\t\t\t\tdisabled: true,\n\t\t\t\tactive: true,\n\t\t\t\tclass: 'bg-supportive-lilac-100',\n\t\t\t},\n\n\t\t\t{\n\t\t\t\tvariant: 'dark-teal',\n\t\t\t\tactive: false,\n\t\t\t\tenableHover: true,\n\t\t\t\tclass: 'text-white',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: 'dark-teal',\n\t\t\t\tactive: false,\n\t\t\t\tenableHover: true,\n\t\t\t\tdisabled: false,\n\t\t\t\tclass: 'hover:bg-dark-teal-400',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: 'dark-teal',\n\t\t\t\tactive: true,\n\t\t\t\tclass: 'text-white bg-dark-teal-400',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: 'dark-teal',\n\t\t\t\tdisabled: true,\n\t\t\t\tclass: 'opacity-40',\n\t\t\t},\n\n\t\t\t{\n\t\t\t\tvariant: 'negative',\n\t\t\t\tactive: false,\n\t\t\t\tenableHover: true,\n\t\t\t\tdisabled: false,\n\t\t\t\tclass: 'text-negative-red hover:bg-negative-red-50',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: 'negative',\n\t\t\t\tactive: true,\n\t\t\t\tdisabled: false,\n\t\t\t\tclass: 'bg-negative-red-100 text-negative-red',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: 'negative',\n\t\t\t\tdisabled: true,\n\t\t\t\tclass: 'text-negative-red-100',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: 'negative',\n\t\t\t\tdisabled: true,\n\t\t\t\tactive: true,\n\t\t\t\tclass: 'bg-negative-red-50',\n\t\t\t},\n\n\t\t\t{\n\t\t\t\tenableHover: true,\n\t\t\t\tdisabled: false,\n\t\t\t\tclass: 'cursor-pointer',\n\t\t\t},\n\t\t],\n\t}\n);\n\nconst dropdownMenuItemIcon = cva(['text-base'], {\n\tvariants: {\n\t\tvariant: {\n\t\t\tdefault: null,\n\t\t\t'dark-teal': null,\n\t\t\tnegative: null,\n\t\t},\n\t\tactive: {\n\t\t\tfalse: null,\n\t\t\ttrue: null,\n\t\t},\n\t\tdisabled: {\n\t\t\tfalse: null,\n\t\t\ttrue: 'text-black-teal-100',\n\t\t},\n\t},\n\tcompoundVariants: [\n\t\t{\n\t\t\tvariant: 'default',\n\t\t\tactive: false,\n\t\t\tdisabled: false,\n\t\t\tclass: 'text-black-teal-300 group-hover:text-black-teal',\n\t\t},\n\n\t\t{\n\t\t\tvariant: 'dark-teal',\n\t\t\tactive: false,\n\t\t\tdisabled: false,\n\t\t\tclass: 'text-dark-teal-100 group-hover:text-white',\n\t\t},\n\n\t\t{\n\t\t\tvariant: 'negative',\n\t\t\tactive: false,\n\t\t\tdisabled: false,\n\t\t\tclass: 'text-negative-red group-hover:text-negative-red-800',\n\t\t},\n\t\t{\n\t\t\tvariant: 'negative',\n\t\t\tactive: true,\n\t\t\tdisabled: false,\n\t\t\tclass: 'text-negative-red-800',\n\t\t},\n\t],\n});\n\n@Component({\n\ttag: 'p-dropdown-menu-item',\n\tstyleUrl: 'dropdown-menu-item.component.css',\n})\nexport class DropdownMenuItem {\n\t/**\n\t * Wether the dropdown menu item is active\n\t */\n\t@Prop() active: boolean = false;\n\n\t/**\n\t * Wether the dropdown menu item has a checkbox\n\t */\n\t@Prop() checkbox: boolean = false;\n\n\t/**\n\t * The variant of the item\n\t */\n\t@Prop() variant: 'default' | 'dark-teal' | 'negative' = 'default';\n\n\t/**\n\t * Wether to enable the hover state\n\t */\n\t@Prop() enableHover: boolean = true;\n\n\t/**\n\t * Wether the item is disabled\n\t */\n\t@Prop() disabled: boolean = false;\n\n\t/**\n\t * Icon of the navigation item\n\t */\n\t@Prop() icon: IconVariant;\n\n\t/**\n\t * wether to use the container for text\n\t */\n\t@Prop() useContainer = true;\n\n\trender() {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={dropdownMenuItem({\n\t\t\t\t\tvariant: this.variant,\n\t\t\t\t\tactive: this.active,\n\t\t\t\t\tenableHover: this.enableHover,\n\t\t\t\t\tdisabled: this.disabled,\n\t\t\t\t})}\n\t\t\t>\n\t\t\t\t{/* class={`p-dropdown-menu-item ${this.active && 'active'} ${ */}\n\t\t\t\t{/* \tthis.enableHover && 'hover' */}\n\t\t\t\t{/* }`} */}\n\t\t\t\t{this.icon && (\n\t\t\t\t\t<p-icon\n\t\t\t\t\t\tclass={dropdownMenuItemIcon({\n\t\t\t\t\t\t\tvariant: this.variant,\n\t\t\t\t\t\t\tactive: this.active,\n\t\t\t\t\t\t\tdisabled: this.disabled,\n\t\t\t\t\t\t})}\n\t\t\t\t\t\tvariant={this.icon}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\n\t\t\t\t{this.checkbox && (\n\t\t\t\t\t<p-checkbox\n\t\t\t\t\t\tsize='sm'\n\t\t\t\t\t\tchecked={this.active}\n\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\n\t\t\t\t{this.useContainer ? (\n\t\t\t\t\t<div class='block w-full overflow-hidden text-ellipsis whitespace-nowrap text-start'>\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t</div>\n\t\t\t\t) : (\n\t\t\t\t\t<slot />\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t);\n\t}\n}\n",null,"import {\n\tComponent,\n\tEvent,\n\tEventEmitter,\n\th,\n\tHost,\n\tProp,\n\tWatch,\n} from '@stencil/core';\nimport { cva } from 'class-variance-authority';\n\ntype PaginationSetItem = {\n\ttype: string;\n\tvalue?: number | Element | JSX.Element | string;\n};\n\nconst pagination = cva(['p-pagination', 'flex gap-2 items-center'], {\n\tvariants: {\n\t\thidden: {\n\t\t\tfalse: 'flex',\n\t\t\ttrue: 'hidden',\n\t\t},\n\t},\n});\n\n@Component({\n\ttag: 'p-pagination-pages',\n\tstyleUrl: 'pagination-pages.component.css',\n})\nexport class PaginationPages {\n\t/**\n\t * The current page\n\t */\n\t@Prop({ mutable: true, reflect: true }) page: number = 1;\n\n\t/**\n\t * Event whenever the page changes\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tpageChange: EventEmitter<number>;\n\n\t/**\n\t * The amount of items per page\n\t */\n\t@Prop() pageSize: number = 12;\n\n\t/**\n\t * Wether to hide when there is only 1 page available\n\t */\n\t@Prop() hideOnSinglePage: boolean = false;\n\n\t/**\n\t * The total amount of items\n\t */\n\t@Prop() total!: number;\n\n\t/**\n\t * The pages that were generated\n\t */\n\t@Event() pagesChange: EventEmitter<number>;\n\n\tprivate _pages: number[] = [];\n\tprivate _set: PaginationSetItem[] = [];\n\n\tcomponentWillRender() {\n\t\tthis._generate();\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={pagination({\n\t\t\t\t\thidden: this.hideOnSinglePage && this._set?.length === 3,\n\t\t\t\t})}\n\t\t\t>\n\t\t\t\t{this._set?.map(p => {\n\t\t\t\t\tif (p.type === 'previous' || p.type === 'next') {\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<p-pagination-pages-item\n\t\t\t\t\t\t\t\tvariant='carousel'\n\t\t\t\t\t\t\t\tdisabled={this._carouselDisabled(p.type)}\n\t\t\t\t\t\t\t\tonClick={() =>\n\t\t\t\t\t\t\t\t\tp.type === 'previous'\n\t\t\t\t\t\t\t\t\t\t? this._previousClick()\n\t\t\t\t\t\t\t\t\t\t: this._nextClick()\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{p.value}\n\t\t\t\t\t\t\t</p-pagination-pages-item>\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (p.type === 'ellipsis') {\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<p-pagination-pages-item hover={false}>\n\t\t\t\t\t\t\t\t...\n\t\t\t\t\t\t\t</p-pagination-pages-item>\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<p-pagination-pages-item\n\t\t\t\t\t\t\tactive={p.value === this.page}\n\t\t\t\t\t\t\tonClick={() => this._pageClick(p.value as number)}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{p.value}\n\t\t\t\t\t\t</p-pagination-pages-item>\n\t\t\t\t\t);\n\t\t\t\t})}\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t@Watch('page')\n\t@Watch('pageSize')\n\t@Watch('total')\n\tprotected pageChangeHandler() {\n\t\tthis._generate();\n\t}\n\n\tprivate _generate() {\n\t\tthis._pages = this._generatePages();\n\t\tthis._set = this._generateSet();\n\n\t\tif (this.page > this._pages?.length) {\n\t\t\tthis._changePage(this._pages.length);\n\t\t}\n\t}\n\n\tprivate _changePage(p?: number) {\n\t\tif (!p) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.page = p;\n\t\tthis.pageChange.emit(this.page);\n\t}\n\n\tprivate _previousClick() {\n\t\tif (this._carouselDisabled('previous')) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._changePage(this.page - 1);\n\t}\n\n\tprivate _nextClick = () => {\n\t\tif (this._carouselDisabled('next')) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._changePage(this.page + 1);\n\t};\n\n\tprivate _carouselDisabled = (type: 'previous' | 'next') => {\n\t\tif (type === 'next') {\n\t\t\tconst nextPage = this.page + 1;\n\t\t\tif (nextPage > this._pages[this._pages.length - 1]) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\tif (type === 'previous') {\n\t\t\tconst previousPage = this.page - 1;\n\t\t\tif (previousPage < this._pages[0]) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t};\n\n\tprivate _pageClick = (p?: number) => this._changePage(p);\n\n\tprivate _generatePages() {\n\t\tif (!this.total || !this.pageSize) {\n\t\t\treturn [];\n\t\t}\n\n\t\tconst pages = Math.ceil(this.total / this.pageSize);\n\t\tthis.pagesChange.emit(pages);\n\t\treturn new Array(pages).fill(undefined).map((_, i) => i + 1);\n\t}\n\n\tprivate _generateSet = (\n\t\trange: number = 1,\n\t\tenableBoundaries: boolean = true\n\t): PaginationSetItem[] => {\n\t\tconst totalPages = this._pages.length;\n\n\t\tif (!totalPages) {\n\t\t\treturn [];\n\t\t}\n\n\t\tlet start = this.page - range;\n\t\tlet end = this.page + range;\n\n\t\tif (end > totalPages) {\n\t\t\tend = totalPages;\n\t\t\tstart = totalPages - range * 2;\n\t\t\tstart = start < 1 ? 1 : start;\n\t\t}\n\n\t\tif (start <= 1) {\n\t\t\tstart = 1;\n\t\t\tend = Math.min(range * 2 + 1, totalPages);\n\t\t}\n\n\t\tconst set = [];\n\n\t\tconst previous = {\n\t\t\ttype: 'previous',\n\t\t\tvalue: (\n\t\t\t\t<p-icon\n\t\t\t\t\tvariant='caret'\n\t\t\t\t\tsize='sm'\n\t\t\t\t\trotate={90}\n\t\t\t\t/>\n\t\t\t),\n\t\t};\n\n\t\tconst next = {\n\t\t\ttype: 'next',\n\t\t\tvalue: (\n\t\t\t\t<p-icon\n\t\t\t\t\tvariant='caret'\n\t\t\t\t\tsize='sm'\n\t\t\t\t\trotate={-90}\n\t\t\t\t/>\n\t\t\t),\n\t\t};\n\n\t\t// Disable page range, display all the pages\n\t\tif (range === null) {\n\t\t\tconst p = this._pages.map(p => ({\n\t\t\t\ttype: 'page',\n\t\t\t\tvalue: p,\n\t\t\t}));\n\n\t\t\treturn enableBoundaries ? [previous, ...p, next] : p;\n\t\t}\n\n\t\tif (enableBoundaries) {\n\t\t\tset.push(previous);\n\t\t}\n\n\t\tif (start <= 3) {\n\t\t\tfor (let i = 1; i < start; i++) {\n\t\t\t\tset.push({\n\t\t\t\t\ttype: 'page',\n\t\t\t\t\tvalue: this._pages[i - 1],\n\t\t\t\t});\n\t\t\t}\n\t\t} else {\n\t\t\tset.push({\n\t\t\t\ttype: 'page',\n\t\t\t\tvalue: 1,\n\t\t\t});\n\n\t\t\tset.push({\n\t\t\t\ttype: 'ellipsis',\n\t\t\t\tvalue: 'ellipsis',\n\t\t\t});\n\t\t}\n\n\t\tfor (let i = start; i <= end; i++) {\n\t\t\tset.push({\n\t\t\t\ttype: 'page',\n\t\t\t\tvalue: this._pages[i - 1],\n\t\t\t});\n\t\t}\n\n\t\tif (end >= totalPages - 2) {\n\t\t\tfor (let i = end + 1; i <= totalPages; i++) {\n\t\t\t\tset.push({\n\t\t\t\t\ttype: 'page',\n\t\t\t\t\tvalue: this._pages[i - 1],\n\t\t\t\t});\n\t\t\t}\n\t\t} else {\n\t\t\tset.push({\n\t\t\t\ttype: 'ellipsis',\n\t\t\t});\n\n\t\t\tset.push({\n\t\t\t\ttype: 'page',\n\t\t\t\tvalue: this._pages[this._pages.length - 1],\n\t\t\t});\n\t\t}\n\n\t\tif (enableBoundaries) {\n\t\t\tset.push(next);\n\t\t}\n\n\t\treturn set;\n\t};\n}\n",null,"import { Component, h, Host, Prop } from '@stencil/core';\nimport { cva } from 'class-variance-authority';\n\nconst item = cva(\n\t[\n\t\t'p-pagination-item',\n\t\t'text-sm ',\n\t\t'h-6 w-6',\n\t\t'flex items-center justify-center text-center',\n\t],\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\tdefault: 'rounded text-black-teal-500',\n\t\t\t\tcarousel: 'rounded-full text-white',\n\t\t\t},\n\t\t\tactive: {\n\t\t\t\tfalse: null,\n\t\t\t\ttrue: null,\n\t\t\t},\n\t\t\thover: {\n\t\t\t\tfalse: null,\n\t\t\t\ttrue: null,\n\t\t\t},\n\t\t\tdisabled: {\n\t\t\t\tfalse: null,\n\t\t\t\ttrue: 'cursor-not-allowed',\n\t\t\t},\n\t\t},\n\t\tcompoundVariants: [\n\t\t\t{\n\t\t\t\tvariant: 'default',\n\t\t\t\tactive: false,\n\t\t\t\tclass: 'bg-off-white-300',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: 'default',\n\t\t\t\tactive: false,\n\t\t\t\thover: true,\n\t\t\t\tclass: 'hover:bg-off-white-500 cursor-pointer',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: 'default',\n\t\t\t\tactive: true,\n\t\t\t\tclass: 'bg-off-white-700 font-semibold',\n\t\t\t},\n\n\t\t\t{\n\t\t\t\tvariant: 'carousel',\n\t\t\t\tdisabled: false,\n\t\t\t\tclass: 'bg-dark-teal-600',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: 'carousel',\n\t\t\t\tdisabled: false,\n\t\t\t\thover: true,\n\t\t\t\tclass: 'hover:bg-dark-teal-700 focus:bg-dark-teal-800 cursor-pointer',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: 'carousel',\n\t\t\t\tdisabled: true,\n\t\t\t\tclass: 'bg-dark-teal-600 opacity-20',\n\t\t\t},\n\t\t],\n\t}\n);\n\n@Component({\n\ttag: 'p-pagination-pages-item',\n\tstyleUrl: 'pagination-pages-item.component.css',\n})\nexport class PaginationPagesItem {\n\t/**\n\t * The variant of the item\n\t */\n\t@Prop() variant: 'default' | 'carousel' = 'default';\n\n\t/**\n\t * Wether the pagination item is active\n\t */\n\t@Prop() active: boolean = false;\n\n\t/**\n\t * Wether the pagination item has hover\n\t */\n\t@Prop() hover: boolean = true;\n\n\t/**\n\t * Wether the pagination item is disabled\n\t */\n\t@Prop() disabled: boolean = false;\n\n\trender() {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={item({\n\t\t\t\t\tvariant: this.variant,\n\t\t\t\t\tactive: this.active,\n\t\t\t\t\thover: this.hover,\n\t\t\t\t\tdisabled: this.disabled,\n\t\t\t\t})}\n\t\t\t>\n\t\t\t\t<slot />\n\t\t\t</Host>\n\t\t);\n\t}\n}\n",null,"import {\n\tComponent,\n\tElement,\n\tEvent,\n\tEventEmitter,\n\th,\n\tHost,\n\tListen,\n\tProp,\n\tState,\n} from '@stencil/core';\nimport {\n\tformatTranslation,\n\tgetLocaleComponentStrings,\n} from '../../../utils/localization';\nimport { defaultSize, defaultSizeOptions } from './constants';\nimport { cva } from 'class-variance-authority';\n\nexport type templateFunc = (value: number) => string;\n\nconst paginationSize = cva('p-pagination-size', {\n\tvariants: {\n\t\thidden: {\n\t\t\tfalse: null,\n\t\t\ttrue: 'hidden',\n\t\t},\n\t},\n});\n\nconst trigger = cva(\n\t[\n\t\t'flex items-center gap-2',\n\t\t'px-2 h-6',\n\t\t'text-sm text-white font-medium ',\n\t\t'cursor-pointer rounded-full',\n\t],\n\t{\n\t\tvariants: {\n\t\t\tactive: {\n\t\t\t\tfalse: 'bg-dark-teal-600 hover:bg-dark-teal-700',\n\t\t\t\ttrue: 'bg-dark-teal-800',\n\t\t\t},\n\t\t},\n\t}\n);\n\n@Component({\n\ttag: 'p-pagination-size',\n\tstyleUrl: 'pagination-size.component.css',\n\tshadow: true,\n})\nexport class PaginationSize {\n\tprivate _defaultItemTemplate: templateFunc = size =>\n\t\tformatTranslation(this._locales.item, { size });\n\t/**\n\t * The current page\n\t */\n\t@Prop({ mutable: true, reflect: true }) size: number = defaultSize;\n\n\t/**\n\t * The available sizes\n\t */\n\t@Prop() sizeOptions: number[] = defaultSizeOptions;\n\n\t/**\n\t * Event whenever the size changes\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tsizeChange: EventEmitter<number>;\n\n\t/**\n\t * The template for the data view\n\t */\n\t@Prop() itemTemplate: templateFunc = this._defaultItemTemplate;\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\t/**\n\t * Wether to hide when there is only 1 page available\n\t */\n\t@Prop() hidden: boolean = false;\n\n\t/**\n\t * Wether the dropdown is open\n\t */\n\t@State() dropdownIsOpen = false;\n\n\t/**\n\t * Locales used for this component\n\t */\n\t@State() private _locales: any = {};\n\n\tcomponentWillLoad() {\n\t\tthis._setLocales();\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={paginationSize({ hidden: this.hidden })}>\n\t\t\t\t<p-dropdown\n\t\t\t\t\tvariant='dark-teal'\n\t\t\t\t\tplacement='top-start'\n\t\t\t\t\tchevronDirection='down'\n\t\t\t\t\tcalculateWidth={true}\n\t\t\t\t\tonIsOpen={({ detail }) => (this.dropdownIsOpen = detail)}\n\t\t\t\t>\n\t\t\t\t\t<div\n\t\t\t\t\t\tclass={trigger({\n\t\t\t\t\t\t\tactive: this.dropdownIsOpen,\n\t\t\t\t\t\t})}\n\t\t\t\t\t\tslot='trigger'\n\t\t\t\t\t>\n\t\t\t\t\t\t<p class='min-w-0 flex-1 overflow-hidden text-ellipsis text-nowrap'>\n\t\t\t\t\t\t\t{this.itemTemplate\n\t\t\t\t\t\t\t\t? this.itemTemplate(this.size)\n\t\t\t\t\t\t\t\t: this._defaultItemTemplate(this.size)}\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<p-icon\n\t\t\t\t\t\t\tclass='flex-shrink-0'\n\t\t\t\t\t\t\tvariant='double-caret'\n\t\t\t\t\t\t\tsize='sm'\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t\t<slot slot='items'>\n\t\t\t\t\t\t{this.sizeOptions.map(option => (\n\t\t\t\t\t\t\t<p-dropdown-menu-item\n\t\t\t\t\t\t\t\tactive={option === this.size}\n\t\t\t\t\t\t\t\tonClick={() => this._changeSize(option)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{this.itemTemplate\n\t\t\t\t\t\t\t\t\t? this.itemTemplate(option)\n\t\t\t\t\t\t\t\t\t: this._defaultItemTemplate(option)}\n\t\t\t\t\t\t\t</p-dropdown-menu-item>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</slot>\n\t\t\t\t</p-dropdown>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t@Listen('localeChanged', { target: 'body' })\n\tprivate async _setLocales(): Promise<void> {\n\t\tthis._locales = await getLocaleComponentStrings(this._el);\n\t}\n\n\tprivate _changeSize(s?: number) {\n\t\tif (!s) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.size = s;\n\t\tthis.sizeChange.emit(this.size);\n\t}\n}\n"],"mappings":"kNAAA,MAAMA,EAA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AAKsE,qBAAqBe,Q,CAU5B,iBAAMV,GACb3E,KAAKwE,eAAiBe,EAA0BvF,KAAKwF,I,CAG9C,WAAAF,CAAYG,GACnB,IAAKA,EAAG,CACP,M,CAGDzF,KAAKG,KAAOsF,EACZzF,KAAKyE,WAAWvC,KAAKlC,KAAKG,K","ignoreList":[]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as t,c as r,h as e,H as a}from"./p-45ded510.js";import{c as o}from"./p-8a5b8196.js";import{n as i}from"./p-c605a1c1.js";import"./p-8a1a6e56.js";const n="*{box-sizing:border-box}.pointer-events-none{pointer-events:none!important}.static{position:static!important}.absolute{position:absolute!important}.relative{position:relative!important}.left-1\\/2{left:50%!important}.top-1\\/2{top:50%!important}.m-0{margin:0!important}.block{display:block!important}.flex{display:flex!important}.h-2{height:.5rem!important}.h-3{height:.75rem!important}.h-4{height:1rem!important}.h-6{height:1.5rem!important}.w-2{width:.5rem!important}.w-3{width:.75rem!important}.w-4{width:1rem!important}.w-6{width:1.5rem!important}.flex-shrink-0{flex-shrink:0!important}.-translate-x-1\\/2{--tw-translate-x:-50%!important}.-translate-x-1\\/2,.-translate-y-1\\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.-translate-y-1\\/2{--tw-translate-y:-50%!important}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.cursor-not-allowed{cursor:not-allowed!important}.cursor-pointer{cursor:pointer!important}.appearance-none{appearance:none!important}.items-center{align-items:center!important}.justify-start{justify-content:flex-start!important}.gap-2{gap:.5rem!important}.rounded-full{border-radius:9999px!important}.border{border-width:1px!important}.border-solid{border-style:solid!important}.border-black-teal-100{--tw-border-opacity:1!important;border-color:rgb(205 212 211/var(--tw-border-opacity,1))!important}.border-black-teal-50{--tw-border-opacity:1!important;border-color:rgb(230 234 233/var(--tw-border-opacity,1))!important}.bg-transparent{background-color:transparent!important}.bg-white{background-color:rgb(255 255 255/var(--tw-bg-opacity,1))!important}.bg-white,.bg-white-600{--tw-bg-opacity:1!important}.bg-white-600{background-color:rgb(250 250 250/var(--tw-bg-opacity,1))!important}.text-black-teal{--tw-text-opacity:1!important;color:rgb(3 42 36/var(--tw-text-opacity,1))!important}.shadow-1{--tw-shadow:0 1px 1px rgba(0,2,2,.08)!important;--tw-shadow-colored:0 1px 1px var(--tw-shadow-color)!important;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}.outline-none{outline:2px solid transparent!important;outline-offset:2px!important}.checked\\:cursor-auto:checked{cursor:auto!important}.checked\\:border-black-teal\\/20:checked{border-color:rgba(3,42,36,.2)!important}.checked\\:bg-supportive-lilac:checked{--tw-bg-opacity:1!important;background-color:rgb(209 174 255/var(--tw-bg-opacity,1))!important}.checked\\:ring-2:checked{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)!important;--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)!important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)!important}.checked\\:ring-supportive-lilac-100:checked{--tw-ring-opacity:1!important;--tw-ring-color:rgb(246 239 255/var(--tw-ring-opacity,1))!important}.hover\\:border-black-teal-100:hover{--tw-border-opacity:1!important;border-color:rgb(205 212 211/var(--tw-border-opacity,1))!important}.hover\\:bg-supportive-lilac-100:hover{--tw-bg-opacity:1!important;background-color:rgb(246 239 255/var(--tw-bg-opacity,1))!important}.checked\\:hover\\:border-black-teal\\/20:hover:checked{border-color:rgba(3,42,36,.2)!important}.checked\\:hover\\:bg-supportive-lilac:hover:checked{--tw-bg-opacity:1!important;background-color:rgb(209 174 255/var(--tw-bg-opacity,1))!important}.peer:checked~.peer-checked\\:bg-black-teal-200{--tw-bg-opacity:1!important;background-color:rgb(154 170 167/var(--tw-bg-opacity,1))!important}.peer:checked~.peer-checked\\:bg-white{--tw-bg-opacity:1!important;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))!important}.peer:checked~.peer-checked\\:ring-1{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)!important;--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)!important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)!important}.peer:checked~.peer-checked\\:ring-black-teal\\/10{--tw-ring-color:rgba(3,42,36,.1)!important}";const c=n;const s=o(["peer appearance-none m-0 outline-none flex-shrink-0","rounded-full border border-inset border-solid "],{variants:{size:{sm:"w-4 h-4",base:"w-6 h-6"},disabled:{false:["cursor-pointer shadow-1","bg-white border-black-teal-100","hover:bg-supportivce-lilac-100 hover:border-black-teal-100","checked:cursor-auto","checked:bg-supportive-lilac checked:border-black-teal/20","checked:ring-2 checked:ring-supportive-lilac-100","checked:hover:bg-supportive-lilac checked:hover:border-black-teal/20"],true:"bg-white-600 border-black-teal-50 cursor-not-allowed "}},compoundVariants:[{disabled:false,class:["cursor-pointer shadow-1","bg-white border-black-teal-100","hover:bg-supportive-lilac-100 hover:border-black-teal-100"]}]});const p=o(["block","rounded-full bg-transparent","absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 pointer-events-none"],{variants:{size:{sm:"w-2 h-2",base:"w-3 h-3"},disabled:{false:"peer-checked:bg-white peer-checked:ring-1 peer-checked:ring-black-teal/10",true:"peer-checked:bg-black-teal-200"}}});const l=class{constructor(e){t(this,e);this.checkedChange=r(this,"checkedChange",7);this.value=undefined;this.size="base";this.disabled=false;this.required=true;this.id=undefined;this.name=undefined;this.checked=false;this._nonce=i(5)}checkedChange;render(){return e(a,{key:"b2ec6cf9d5661f57b7e28120148fcf9007069395",class:"p-radio"},e("label",{key:"782f32d703c4f897b287e7dfb80fd3b06f5e0abe",htmlFor:this.id??this._nonce,class:"flex items-center justify-start gap-2 text-black-teal"},e("div",{key:"45580ebf3a62a9f9a1e746c15b7d15139a38a47c",class:"relative flex flex-shrink-0 items-center"},e("input",{key:"2262b932817e69fea5c5dd5c5046d9050d1b52a1",class:s({size:this.size,disabled:this.disabled}),type:"radio",id:this.id??this._nonce,name:this.name,required:this.required,value:this.value,checked:this.checked,disabled:this.disabled,onChange:t=>this._onChange(t)}),e("div",{key:"18275011c0989071809d90c21e477e70099a1f4e",class:p({size:this.size,disabled:this.disabled})})),e("slot",{key:"02d03f675466bef15f63ab49240a53e1607c3ff2"})))}_onChange(t){if(this.disabled){t.preventDefault();return}const r=t.target.checked;this.checked=r;this.checkedChange.emit(r)}};l.style=c;export{l as p_radio};
|
|
2
|
-
//# sourceMappingURL=p-d2ddf504.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["radioComponentCss","PRadioStyle0","radio","cva","variants","size","sm","base","disabled","false","true","compoundVariants","class","circle","Radio","nonce","checkedChange","render","h","Host","key","htmlFor","this","id","_nonce","type","name","required","value","checked","onChange","ev","_onChange","preventDefault","target","emit"],"sources":["src/components/atoms/radio/radio.component.css?tag=p-radio","src/components/atoms/radio/radio.component.tsx"],"sourcesContent":[null,"import {\n\tComponent,\n\tEvent,\n\tEventEmitter,\n\tHost,\n\tProp,\n\tState,\n\th,\n} from '@stencil/core';\nimport { cva } from 'class-variance-authority';\nimport { nonce } from '../../../utils/nonce';\n\nconst radio = cva(\n\t[\n\t\t'peer appearance-none m-0 outline-none flex-shrink-0',\n\t\t'rounded-full border border-inset border-solid ',\n\t],\n\t{\n\t\tvariants: {\n\t\t\tsize: {\n\t\t\t\tsm: 'w-4 h-4',\n\t\t\t\tbase: 'w-6 h-6',\n\t\t\t},\n\t\t\tdisabled: {\n\t\t\t\tfalse: [\n\t\t\t\t\t'cursor-pointer shadow-1',\n\t\t\t\t\t'bg-white border-black-teal-100',\n\t\t\t\t\t'hover:bg-supportivce-lilac-100 hover:border-black-teal-100',\n\t\t\t\t\t'checked:cursor-auto',\n\t\t\t\t\t'checked:bg-supportive-lilac checked:border-black-teal/20',\n\t\t\t\t\t'checked:ring-2 checked:ring-supportive-lilac-100',\n\t\t\t\t\t'checked:hover:bg-supportive-lilac checked:hover:border-black-teal/20',\n\t\t\t\t],\n\t\t\t\ttrue: 'bg-white-600 border-black-teal-50 cursor-not-allowed ',\n\t\t\t},\n\t\t},\n\t\tcompoundVariants: [\n\t\t\t{\n\t\t\t\tdisabled: false,\n\t\t\t\tclass: [\n\t\t\t\t\t'cursor-pointer shadow-1',\n\t\t\t\t\t'bg-white border-black-teal-100',\n\t\t\t\t\t'hover:bg-supportive-lilac-100 hover:border-black-teal-100',\n\t\t\t\t],\n\t\t\t},\n\t\t],\n\t}\n);\n\nconst circle = cva(\n\t[\n\t\t'block',\n\t\t'rounded-full bg-transparent',\n\t\t'absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 pointer-events-none',\n\t],\n\t{\n\t\tvariants: {\n\t\t\tsize: {\n\t\t\t\tsm: 'w-2 h-2',\n\t\t\t\tbase: 'w-3 h-3',\n\t\t\t},\n\t\t\tdisabled: {\n\t\t\t\tfalse:\n\t\t\t\t\t'peer-checked:bg-white peer-checked:ring-1 peer-checked:ring-black-teal/10',\n\t\t\t\ttrue: 'peer-checked:bg-black-teal-200',\n\t\t\t},\n\t\t},\n\t}\n);\n\n@Component({\n\ttag: 'p-radio',\n\tstyleUrl: 'radio.component.css',\n})\nexport class Radio {\n\t/**\n\t * The value of the radio button\n\t */\n\t@Prop() value: string;\n\n\t/**\n\t * The size of the radio\n\t */\n\t@Prop() size: 'sm' | 'base' = 'base';\n\n\t/**\n\t * Wether the radio is disabled\n\t */\n\t@Prop({ reflect: true }) disabled: boolean = false;\n\n\t/**\n\t * Wether the radio is required\n\t */\n\t@Prop({ reflect: true }) required: boolean = true;\n\n\t/**\n\t * The id of the radio button\n\t */\n\t@Prop({ reflect: true }) id: string;\n\n\t/**\n\t * The name of the radio button\n\t */\n\t@Prop({ reflect: true }) name: string;\n\n\t/**\n\t * Wether the radio is checked\n\t */\n\t@Prop({ reflect: true }) checked: boolean = false;\n\n\t/**\n\t * Event whenever the checked changes\n\t */\n\t@Event() checkedChange: EventEmitter<boolean>;\n\n\t@State() private _nonce = nonce(5);\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class='p-radio'>\n\t\t\t\t<label\n\t\t\t\t\thtmlFor={this.id ?? this._nonce}\n\t\t\t\t\tclass='flex items-center justify-start gap-2 text-black-teal'\n\t\t\t\t>\n\t\t\t\t\t<div class='relative flex flex-shrink-0 items-center'>\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\tclass={radio({\n\t\t\t\t\t\t\t\tsize: this.size,\n\t\t\t\t\t\t\t\tdisabled: this.disabled,\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\ttype='radio'\n\t\t\t\t\t\t\tid={this.id ?? this._nonce}\n\t\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\t\tvalue={this.value}\n\t\t\t\t\t\t\tchecked={this.checked}\n\t\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\t\tonChange={ev => this._onChange(ev)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclass={circle({\n\t\t\t\t\t\t\t\tsize: this.size,\n\t\t\t\t\t\t\t\tdisabled: this.disabled,\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\t<slot></slot>\n\t\t\t\t</label>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\tprivate _onChange(ev: Event) {\n\t\tif (this.disabled) {\n\t\t\tev.preventDefault();\n\t\t\treturn;\n\t\t}\n\n\t\tconst checked = (ev.target as HTMLInputElement).checked;\n\t\tthis.checked = checked;\n\t\tthis.checkedChange.emit(checked);\n\t}\n}\n"],"mappings":"yJAAA,MAAMA,EAAoB,s3IAC1B,MAAAC,EAAeD,ECWf,MAAME,EAAQC,EACb,CACC,sDACA,kDAED,CACCC,SAAU,CACTC,KAAM,CACLC,GAAI,UACJC,KAAM,WAEPC,SAAU,CACTC,MAAO,CACN,0BACA,iCACA,6DACA,sBACA,2DACA,mDACA,wEAEDC,KAAM,0DAGRC,iBAAkB,CACjB,CACCH,SAAU,MACVI,MAAO,CACN,0BACA,iCACA,iEAOL,MAAMC,EAASV,EACd,CACC,QACA,8BACA,6FAED,CACCC,SAAU,CACTC,KAAM,CACLC,GAAI,UACJC,KAAM,WAEPC,SAAU,CACTC,MACC,4EACDC,KAAM,qC,MAUGI,EAAK,M,qGASa,O,cAKe,M,cAKA,K,mDAeD,M,YAOlBC,EAAM,E,CAFvBC,cAIT,MAAAC,GACC,OACCC,EAACC,EAAI,CAAAC,IAAA,2CAACR,MAAM,WACXM,EAAA,SAAAE,IAAA,2CACCC,QAASC,KAAKC,IAAMD,KAAKE,OACzBZ,MAAM,yDAENM,EAAA,OAAAE,IAAA,2CAAKR,MAAM,4CACVM,EAAA,SAAAE,IAAA,2CACCR,MAAOV,EAAM,CACZG,KAAMiB,KAAKjB,KACXG,SAAUc,KAAKd,WAEhBiB,KAAK,QACLF,GAAID,KAAKC,IAAMD,KAAKE,OACpBE,KAAMJ,KAAKI,KACXC,SAAUL,KAAKK,SACfC,MAAON,KAAKM,MACZC,QAASP,KAAKO,QACdrB,SAAUc,KAAKd,SACfsB,SAAUC,GAAMT,KAAKU,UAAUD,KAEhCb,EAAA,OAAAE,IAAA,2CACCR,MAAOC,EAAO,CACbR,KAAMiB,KAAKjB,KACXG,SAAUc,KAAKd,cAIlBU,EAAA,QAAAE,IAAA,8C,CAMI,SAAAY,CAAUD,GACjB,GAAIT,KAAKd,SAAU,CAClBuB,EAAGE,iBACH,M,CAGD,MAAMJ,EAAWE,EAAGG,OAA4BL,QAChDP,KAAKO,QAAUA,EACfP,KAAKN,cAAcmB,KAAKN,E","ignoreList":[]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as t,c as i,g as e,h as s,H as r}from"./p-45ded510.js";import{c as n}from"./p-3b8209bc.js";import{c as h}from"./p-8a5b8196.js";import"./p-8a1a6e56.js";const a="*{box-sizing:border-box}.pointer-events-none{pointer-events:none!important}.pointer-events-auto{pointer-events:auto!important}.static{position:static!important}.relative{position:relative!important}.sticky{position:sticky!important}.top-0{top:0!important}.mb-3{margin-bottom:.75rem!important}.block{display:block!important}.flex{display:flex!important}.hidden{display:none!important}.h-6{height:1.5rem!important}.h-8{height:2rem!important}.h-\\[1\\.625rem\\]{height:1.625rem!important}.h-full{height:100%!important}.w-6{width:1.5rem!important}.w-full{width:100%!important}.min-w-0{min-width:0!important}.flex-1{flex:1 1 0%!important}.cursor-pointer{cursor:pointer!important}.items-center{align-items:center!important}.justify-center{justify-content:center!important}.gap-1{gap:.25rem!important}.gap-2{gap:.5rem!important}.overflow-hidden{overflow:hidden!important}.text-ellipsis{text-overflow:ellipsis!important}.whitespace-nowrap{white-space:nowrap!important}.rounded{border-radius:.25rem!important}.rounded-lg{border-radius:.5rem!important}.bg-supportive-lilac-100{--tw-bg-opacity:1!important;background-color:rgb(246 239 255/var(--tw-bg-opacity,1))!important}.p-2{padding:.5rem!important}.px-2{padding-left:.5rem!important;padding-right:.5rem!important}.text-center{text-align:center!important}.text-start{text-align:start!important}.text-lg{font-size:1.125rem!important;line-height:1.75rem!important}.text-sm{font-size:.875rem!important;line-height:1.25rem!important}.text-xs{font-size:.75rem!important;line-height:1rem!important}.font-semibold{font-weight:600!important}.text-black-teal-100{--tw-text-opacity:1!important;color:rgb(205 212 211/var(--tw-text-opacity,1))!important}.text-black-teal-400{--tw-text-opacity:1!important;color:rgb(53 85 80/var(--tw-text-opacity,1))!important}.text-supportive-lilac{--tw-text-opacity:1!important;color:rgb(209 174 255/var(--tw-text-opacity,1))!important}.text-teal-800{--tw-text-opacity:1!important;color:rgb(2 102 92/var(--tw-text-opacity,1))!important}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}.group\\/item:hover .group-hover\\/item\\:text-supportive-lilac-800{--tw-text-opacity:1!important;color:rgb(189 140 255/var(--tw-text-opacity,1))!important}";const o=a;const l=h(["flex items-center gap-2","flex-1 min-w-0 h-full","pointer-events-none overflow-hidden"]);const p=h(["item group/item","pointer-events-auto cursor-pointer","flex h-[1.625rem] items-center gap-2","h-[1.625rem] px-2","text-sm font-semibold whitespace-nowrap","rounded-lg","bg-supportive-lilac-100"]);const c=h("block w-full overflow-hidden text-ellipsis whitespace-nowrap text-start",{variants:{variant:{placeholder:"text-black-teal-400",default:null}}});const d=class{constructor(e){t(this,e);this.queryChange=i(this,"queryChange",3);this.valueChange=i(this,"valueChange",3);this.selectAllChange=i(this,"selectAllChange",3);this.dropdownShown=i(this,"dropdownShown",3);this.add=i(this,"add",3);this.items=undefined;this.multi=undefined;this.icon=undefined;this.query=undefined;this.placeholder=undefined;this.autocompletePlaceholder="Search...";this.value=undefined;this.displayKey="text";this.dropdownDisplayKey=undefined;this.selectionDisplayKey=undefined;this.valueKey=undefined;this.avatarKey=undefined;this.iconKey=undefined;this.showIconInSelectedItem=undefined;this.classKey="class";this.applyClassOnSelectedItem=undefined;this.avatarLettersKey=undefined;this.identifierKey=undefined;this.queryKey=undefined;this.autoSelectFirst=true;this.showChevron=true;this.maxDisplayedItems=10;this.enableAutocomplete=true;this.asyncFilter=false;this.loading=false;this.enableSelectAll=false;this.selectAllText="Select all";this.selectAllIcon=undefined;this.size="base";this.prefix=undefined;this.label=undefined;this.helper=undefined;this.required=true;this.error=undefined;this.disabled=false;this.showAddItem=false;this.addItemText="Add item";this.emptyStateText="No items available";this._showDropdown=false;this._selectedItem=null;this._allSelected=false;this._amountHidden=0}queryChange;valueChange;selectAllChange;dropdownShown;add;get _el(){return e(this)}_inputRef;autocompleteInputRef;_multiContainerRef;_resizeObserver;_resizeDebounceTimer;_checkSelectedItemsTimeout;get _items(){if(!this.items||this.loading){return[]}let t=typeof this.items==="string"?JSON.parse(this.items):this.items;if(typeof t?.[0]==="string"){this.displayKey="text";this.valueKey="value";t=t.map((t=>({value:t,text:t})))}if(this.query?.length&&!this.asyncFilter){t=t.filter((t=>{if(this.queryKey){return this._checkvalue(this.queryKey,t)}return this._checkvalue(this._identifierKey,t)||this._checkvalue(this.displayKey,t)}))}return t?.slice(0,this.maxDisplayedItems)}get _displayValue(){const t=s("div",{class:c({variant:"placeholder"})},this.placeholder);if(!this._selectedItem){return t}if(this.multi){if(this._selectedItem?.length===0){return t}return s("div",{class:l(),ref:t=>this._multiContainerRef=t},this._selectedItem.map((t=>s("div",{class:p(),onClick:()=>this._selectValue(t)},t[this.selectionDisplayKey??this.displayKey],s("p-icon",{class:"text-xs text-supportive-lilac group-hover/item:text-supportive-lilac-800",variant:"negative"})))),s("div",{class:"extra pointer-events-none hidden text-sm text-black-teal-100"},"+",this._amountHidden))}return this._getDisplay(this._selectedItem,true)}get _identifierKey(){return this.identifierKey??this.valueKey??"value"}componentDidLoad(){if(!this.valueKey&&!this.identifierKey){throw new Error("You must provide a valueKey or identifierKey")}if(this.multi){this._setMultiContainerMaxWidth();this._resizeObserver=new ResizeObserver((()=>{if(this._resizeDebounceTimer){clearTimeout(this._resizeDebounceTimer);this._resizeDebounceTimer=null}this._resizeDebounceTimer=setTimeout((()=>{this._setMultiContainerMaxWidth();this._setCheckSelectedItemsTimeout()}),200)}));this._resizeObserver.observe(this._el)}if(this.value){this._valueChange();return}this.itemChanges()}componentDidRender(){if(this.multi){this._setMultiContainerMaxWidth()}}disconnectedCallback(){if(this.multi){this._resizeObserver.disconnect()}}render(){return s(r,{key:"0535ba59ab5b32d65e1f2672a49b404f015bc7ea",class:"p-select"},s("p-dropdown",{key:"84b70085736f0943eddc1a0bae65460b78f13aad",disableTriggerClick:true,calculateWidth:true,insideClick:true,scrollable:this.enableAutocomplete?"large":true,show:this._showDropdown,onIsOpen:t=>this._onDropdownOpen(t)},s("p-field-container",{key:"daa079d94004685de5816f0d06fa8f07539900eb",slot:"trigger",prefix:this.prefix,label:this.label,helper:this.helper,required:this.required,error:this.error,errorPlacement:"top-start",forceShowTooltip:this.error?.length&&this._showDropdown},s("p-button",{key:"c0f4640c1cd9047fae73594bef62a7b28f84a9f8",class:"w-full",slot:"content",variant:"secondary",size:this.size,chevron:this.showChevron,disabled:this.disabled,active:this._showDropdown,icon:this.icon,onClick:t=>this._onClick(t)},s("div",{key:"2479f6d8ff8dea97e8592ba6059371a3967f852a",class:"relative flex-1",ref:t=>this._inputRef=t},this._displayValue))),this.loading?this._getLoadingItems():this._getItems(),this.showAddItem&&this._getAddItem()))}documentClickHandler({target:t}){if(!this._showDropdown||n(t,this._el)){return}this._showDropdown=false}_valueChange(){setTimeout((()=>{this._preselectItem();this._setCheckSelectedItemsTimeout()}))}itemChanges(){setTimeout((()=>this._preselectItem()))}_showDropdownChanges(){this.dropdownShown.emit({value:this._showDropdown,query:this.query})}multiChanges(){if(this._selectedItem&&!Array.isArray(this._selectedItem)){this._selectedItem=[]}}_preselectItem(){let t=typeof this.value==="string"&&this.multi?JSON.parse(this.value):this.value;if(this.multi){if(!Array.isArray(t)){this.value=[];this.valueChange.emit(this.value);return}this.value=t;if(!t.length){this._selectedItem=[];return}this._selectedItem=!!this.valueKey&&this.valueKey!=="false"?this._items.filter((i=>t.includes(i?.[this.valueKey]))):[...t];return}if(!this._selectedItem&&!t&&this.autoSelectFirst){t=this._items[0]}const i=typeof t==="object"&&t!==null?t[this._identifierKey]:t;const e=typeof i==="string"||typeof i==="number"?i:JSON.stringify(i);const s=this._selectedItem?this._selectedItem?.[this._identifierKey]:null;const r=typeof s==="string"||typeof s==="number"?s:JSON.stringify(s);if(this._selectedItem&&r===e){return}if(!this._items?.length&&t){this._selectValue(t,false);return}const n=this._items.find((t=>{const i=t?.[this._identifierKey];const s=typeof i==="string"||typeof i==="number"?i:JSON.stringify(i);return s===e}));this._selectValue(!!n?n:t,false)}_selectValue(t,i=true){let e=!!this.valueKey&&this.valueKey!=="false"&&t!==null?t?.[this.valueKey]:t;if(this.multi){if(!this._selectedItem||!Array.isArray(this._selectedItem)){this._selectedItem=[]}if(!this.value||!Array.isArray(this.value)){this.value=[]}const i=[...this._selectedItem];const s=[...this.value];const r=i.findIndex((i=>i[this._identifierKey]===t[this._identifierKey]));if(r===-1){i.push(t);s.push(e)}else{i.splice(r,1);s.splice(r,1)}this._selectedItem=i;this.value=s;this.valueChange.emit(s);return}this._selectedItem=t;this.value=e;this.valueChange.emit(e);this._onBlur(i)}_findOnClickTarget(t){if(t.nodeName.toLowerCase()==="p-button"){return true}if(t.classList.contains("item")){return false}return this._findOnClickTarget(t.parentElement)}_onClick(t){if(!this._findOnClickTarget(t.target)){return}this._showDropdown=!this._showDropdown}_onBlur(t=false){if(this.enableAutocomplete&&!t){return}this._showDropdown=false}_onAutoComplete(t){if(!this.enableAutocomplete){return}this._showDropdown=true;this.query=t.detail;this.queryChange.emit(t.detail)}_checkvalue(t,i){return i?.[t]?.toString()?.toLowerCase().indexOf(this.query?.toLowerCase())>=0}_getItems(){let t=this._items.map((t=>s("p-dropdown-menu-item",{useContainer:false,onClick:()=>this._selectValue(t),active:this.multi&&!!this._selectedItem&&Array.isArray(this._selectedItem)?this._selectedItem.findIndex((i=>i[this._identifierKey]===t[this._identifierKey]))>=0:t[this._identifierKey]===this._selectedItem?.[this._identifierKey],checkbox:this.multi?true:false,slot:"items"},this._getDisplay(t))));if(!this._items.length){t=[s("p",{class:"w-full p-2 text-center text-sm text-black-teal-400",slot:"items"},this.emptyStateText)]}if(this.enableSelectAll&&this._items.length){t.unshift(s("p-dropdown-menu-item",{slot:"items",useContainer:false,checkbox:true,onClick:()=>this._selectAllChange(),active:this._allSelected},this.selectAllIcon?.length?s("span",{class:"flex items-center gap-2"},s("div",{class:"flex w-6 justify-center text-lg"},s("p-icon",{variant:this.selectAllIcon}))," ",this.selectAllText):this.selectAllText))}if(this.enableAutocomplete){t.unshift(this._getAutoCompleteItem())}return t}_getAddItem(){return s("p-dropdown-menu-item",{onClick:()=>this.add.emit(),useContainer:false,slot:"items"},s("span",{class:"flex items-center gap-1 font-semibold text-teal-800"},this.addItemText,s("p-icon",{variant:"plus"})))}_getLoadingItems(){const t=[0,0,0].map((()=>s("p-dropdown-menu-item",{enableHover:false,slot:"items"},s("p-loader",{variant:"ghost",class:"h-6 w-full rounded"}))));if(this.enableAutocomplete){t.unshift(this._getAutoCompleteItem())}return t}_getAutoCompleteItem(){return s("div",{class:"sticky top-0 mb-3 h-8",slot:"items"},s("p-field",{class:"block",placeholder:this.autocompletePlaceholder,onValueChange:t=>this._onAutoComplete(t),onInputRefChange:t=>this.autocompleteInputRef=t.detail,value:this.query}))}_setMultiContainerMaxWidth(){if(!this._inputRef||!this._multiContainerRef){return}this._multiContainerRef.style.maxWidth=`${this._inputRef.clientWidth-16}px`}_setCheckSelectedItemsTimeout(){if(this._checkSelectedItemsTimeout){clearTimeout(this._checkSelectedItemsTimeout)}this._checkSelectedItemsTimeout=setTimeout((()=>this._checkSelectedItems()),50)}_checkSelectedItems(){if(!this._multiContainerRef){return}const t=this._multiContainerRef.getBoundingClientRect();const i=this._multiContainerRef.querySelectorAll(".item");let e=0;for(const s of i){s.classList.remove("hidden");s.classList.add("flex");const i=s.getBoundingClientRect();if(i.right>t.right){s.classList.remove("flex");s.classList.add("hidden");e++;continue}}this._amountHidden=e;const s=this._multiContainerRef.querySelector(".extra");if(!s){return}if(!s.classList.contains("hidden")){s.classList.add("hidden")}if(e>0){s.classList.remove("hidden")}}_onDropdownOpen(t){if(!t.detail||!this.autocompleteInputRef){return}this.autocompleteInputRef.focus()}_selectAllChange(){this._allSelected=!this._allSelected;this.selectAllChange.emit(this._allSelected)}_getDisplay(t,i=false){let e=s("div",{class:c({variant:"default"})},t[i?this.selectionDisplayKey??this.displayKey:this.displayKey]);if(this.avatarKey){e=s("span",{class:"flex items-center gap-2"},s("p-avatar",{size:"sm",src:t[this.avatarKey],letters:t[this.avatarLettersKey]}),s("div",{class:c({variant:"default"})},t[this.dropdownDisplayKey??this.displayKey]))}if(this.iconKey&&(!i||this.showIconInSelectedItem)){e=s("span",{class:"flex items-center gap-2"},s("p-icon",{variant:t[this.iconKey]}),s("div",{class:c({variant:"default"})},t[this.dropdownDisplayKey??this.displayKey]))}if((!i||this.applyClassOnSelectedItem)&&!!t?.class?.length){return s("div",{class:t.class},e)}return e}static get watchers(){return{value:["_valueChange"],items:["itemChanges"],_showDropdown:["_showDropdownChanges"],multi:["multiChanges"]}}};d.style=o;export{d as p_select};
|
|
2
|
-
//# sourceMappingURL=p-da44c5f3.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["selectComponentCss","PSelectStyle0","multiContainer","cva","multiItem","textContainer","variants","variant","placeholder","default","Select","queryChange","valueChange","selectAllChange","dropdownShown","add","_inputRef","autocompleteInputRef","_multiContainerRef","_resizeObserver","_resizeDebounceTimer","_checkSelectedItemsTimeout","_items","this","items","loading","JSON","parse","displayKey","valueKey","map","str","value","text","query","length","asyncFilter","filter","item","queryKey","_checkvalue","_identifierKey","slice","maxDisplayedItems","_displayValue","h","class","_selectedItem","multi","ref","onClick","_selectValue","selectionDisplayKey","_amountHidden","_getDisplay","identifierKey","componentDidLoad","Error","_setMultiContainerMaxWidth","ResizeObserver","clearTimeout","setTimeout","_setCheckSelectedItemsTimeout","observe","_el","_valueChange","itemChanges","componentDidRender","disconnectedCallback","disconnect","render","Host","key","disableTriggerClick","calculateWidth","insideClick","scrollable","enableAutocomplete","show","_showDropdown","onIsOpen","ev","_onDropdownOpen","slot","prefix","label","helper","required","error","errorPlacement","forceShowTooltip","size","chevron","showChevron","disabled","active","icon","_onClick","_getLoadingItems","_getItems","showAddItem","_getAddItem","documentClickHandler","target","childOf","_preselectItem","_showDropdownChanges","emit","multiChanges","Array","isArray","i","includes","autoSelectFirst","identifier","parsedValue","stringify","currentValue","currentParsedValue","find","itemIdentifier","parsedItemIdentifier","forceBlur","selectedItem","valueArray","includesIndex","findIndex","push","splice","_onBlur","_findOnClickTarget","nodeName","toLowerCase","classList","contains","parentElement","force","_onAutoComplete","detail","toString","indexOf","useContainer","checkbox","emptyStateText","enableSelectAll","unshift","_selectAllChange","_allSelected","selectAllIcon","selectAllText","_getAutoCompleteItem","addItemText","enableHover","autocompletePlaceholder","onValueChange","onInputRefChange","style","maxWidth","clientWidth","_checkSelectedItems","containerRect","getBoundingClientRect","querySelectorAll","amountHidden","child","remove","childRect","right","extra","querySelector","focus","isSelection","content","avatarKey","src","letters","avatarLettersKey","dropdownDisplayKey","iconKey","showIconInSelectedItem","applyClassOnSelectedItem"],"sources":["src/components/molecules/select/select.component.css?tag=p-select","src/components/molecules/select/select.component.tsx"],"sourcesContent":[null,"import {\n\tComponent,\n\tElement,\n\tEvent,\n\tEventEmitter,\n\th,\n\tHost,\n\tListen,\n\tProp,\n\tState,\n\tWatch,\n} from '@stencil/core';\nimport { childOf } from '../../../utils';\nimport { IconVariant } from '../../atoms/icon/icon.component';\nimport { cva } from 'class-variance-authority';\n\nconst multiContainer = cva([\n\t'flex items-center gap-2',\n\t'flex-1 min-w-0 h-full',\n\t'pointer-events-none overflow-hidden',\n]);\n\nconst multiItem = cva([\n\t'item group/item',\n\t'pointer-events-auto cursor-pointer',\n\t'flex h-[1.625rem] items-center gap-2',\n\t'h-[1.625rem] px-2',\n\t'text-sm font-semibold whitespace-nowrap',\n\t'rounded-lg',\n\t'bg-supportive-lilac-100',\n]);\n\nconst textContainer = cva(\n\t'block w-full overflow-hidden text-ellipsis whitespace-nowrap text-start',\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\tplaceholder: 'text-black-teal-400',\n\t\t\t\tdefault: null,\n\t\t\t},\n\t\t},\n\t}\n);\n\n@Component({\n\ttag: 'p-select',\n\tstyleUrl: 'select.component.css',\n})\nexport class Select {\n\t/**\n\t * The items to show in the dropdown\n\t */\n\t@Prop() items: string | any[];\n\n\t/**\n\t * Wether to enable multi select\n\t */\n\t@Prop({ reflect: true }) multi: boolean;\n\n\t/**\n\t * Icon of the select box\n\t */\n\t@Prop() icon: IconVariant;\n\n\t/**\n\t * The current query\n\t */\n\t@Prop() query: string;\n\n\t/**\n\t * The placeholder of the input\n\t */\n\t@Prop() placeholder: string;\n\n\t/**\n\t * The placeholder of the input used for auto complete\n\t */\n\t@Prop() autocompletePlaceholder: string = 'Search...';\n\n\t/**\n\t * The current value\n\t */\n\t@Prop() value: any;\n\n\t/**\n\t * The key of the object to display\n\t */\n\t@Prop() displayKey: string = 'text';\n\n\t/**\n\t * The key of the object to display in the dropdown (overwrites displayKey)\n\t */\n\t@Prop() dropdownDisplayKey: string | undefined;\n\n\t/**\n\t * The key of the object to display in the input (overwrites displayKey)\n\t */\n\t@Prop() selectionDisplayKey: string | undefined;\n\n\t/**\n\t * The key of the object to return\n\t */\n\t@Prop() valueKey: string;\n\n\t/**\n\t * The key of avatar within an item to show\n\t */\n\t@Prop() avatarKey: string;\n\n\t/**\n\t * The key of icon variant within an item to show\n\t */\n\t@Prop() iconKey: string;\n\n\t/**\n\t * Wether to show the icon also on the selected Item\n\t */\n\t@Prop() showIconInSelectedItem: string;\n\n\t/**\n\t * The key of a class in an item to apply\n\t */\n\t@Prop() classKey: string = 'class';\n\n\t/**\n\t * Wether to apply the item's class also on the selected item\n\t */\n\t@Prop() applyClassOnSelectedItem: string;\n\n\t/**\n\t * The key of avatar letters within an item to show when the avatar url doesn't work\n\t */\n\t@Prop() avatarLettersKey: string;\n\n\t/**\n\t * The key to identify an object\n\t */\n\t@Prop() identifierKey: string;\n\n\t/**\n\t * The key of the object to display\n\t */\n\t@Prop() queryKey?: string;\n\n\t/**\n\t * Wether to automatically select the first item\n\t */\n\t@Prop() autoSelectFirst: boolean = true;\n\n\t/**\n\t * Wether to show the chevron or not\n\t */\n\t@Prop() showChevron: boolean = true;\n\n\t/**\n\t * The maximum amount of items to display\n\t */\n\t@Prop() maxDisplayedItems: number = 10;\n\n\t/**\n\t * Wether to enable autocomplete\n\t */\n\t@Prop() enableAutocomplete: boolean = true;\n\n\t/**\n\t * Wether the input uses async filtering\n\t */\n\t@Prop() asyncFilter: boolean = false;\n\n\t/**\n\t * Wether to show loading items\n\t */\n\t@Prop() loading: boolean = false;\n\n\t/**\n\t * Wether to show the select all item with multi select\n\t */\n\t@Prop() enableSelectAll: boolean = false;\n\n\t/**\n\t * The text of the select all item\n\t */\n\t@Prop() selectAllText: string = 'Select all';\n\n\t/**\n\t * The icon to prefix for select all\n\t */\n\t@Prop() selectAllIcon: IconVariant | undefined;\n\n\t/**\n\t * Event when the query of the autocomplete changes\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tqueryChange: EventEmitter<string>;\n\n\t/**\n\t * Event when the value changes\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tvalueChange: EventEmitter<any>;\n\n\t/**\n\t * Event when the select all item has been selected or not\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tselectAllChange: EventEmitter<any>;\n\n\t/**\n\t * Event when the dropdown shows\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tdropdownShown: EventEmitter<any>;\n\n\t/**\n\t * The size of the input group used by the select\n\t */\n\t@Prop() size: 'sm' | 'base' = 'base';\n\n\t/**\n\t * The prefix of the input group used by the select\n\t */\n\t@Prop() prefix: string;\n\n\t/**\n\t * The label of the input group used by the select\n\t */\n\t@Prop() label: string;\n\n\t/**\n\t * The helper of the input group used by the select\n\t */\n\t@Prop() helper: string;\n\n\t/**\n\t * Wether the field is required\n\t */\n\t@Prop({ reflect: true }) required: boolean = true;\n\n\t/**\n\t * The helper of the input group used by the select\n\t */\n\t@Prop({ reflect: true }) error: string;\n\n\t/**\n\t * Wether the input group is disabled used by the select\n\t */\n\t@Prop({ reflect: true }) disabled: boolean = false;\n\n\t/**\n\t * Wether to show a \"add\" item\n\t */\n\t@Prop() showAddItem: boolean = false;\n\n\t/**\n\t * The text to show when add item is being shown\n\t */\n\t@Prop() addItemText: string = 'Add item';\n\n\t/**\n\t * Event when the add item is clicked\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tadd: EventEmitter;\n\n\t/**\n\t * The text to show when items is empty\n\t */\n\t@Prop() emptyStateText: string = 'No items available';\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\t@State() private _showDropdown: any = false;\n\t@State() private _selectedItem: any = null;\n\n\t@State() private _allSelected: boolean = false;\n\n\t@State() private _amountHidden = 0;\n\n\tprivate _inputRef: HTMLDivElement;\n\tprivate autocompleteInputRef: HTMLInputElement | HTMLTextAreaElement;\n\tprivate _multiContainerRef: HTMLElement;\n\n\tprivate _resizeObserver: ResizeObserver;\n\tprivate _resizeDebounceTimer: NodeJS.Timeout | undefined;\n\tprivate _checkSelectedItemsTimeout: NodeJS.Timeout | undefined;\n\n\tget _items() {\n\t\tif (!this.items || this.loading) {\n\t\t\treturn [];\n\t\t}\n\n\t\tlet items =\n\t\t\ttypeof this.items === 'string' ? JSON.parse(this.items) : this.items;\n\n\t\tif (typeof items?.[0] === 'string') {\n\t\t\tthis.displayKey = 'text';\n\t\t\tthis.valueKey = 'value';\n\n\t\t\titems = items.map(str => ({\n\t\t\t\tvalue: str,\n\t\t\t\ttext: str,\n\t\t\t}));\n\t\t}\n\n\t\tif (this.query?.length && !this.asyncFilter) {\n\t\t\titems = items.filter(item => {\n\t\t\t\tif (this.queryKey) {\n\t\t\t\t\treturn this._checkvalue(this.queryKey, item);\n\t\t\t\t}\n\n\t\t\t\treturn (\n\t\t\t\t\tthis._checkvalue(this._identifierKey, item) ||\n\t\t\t\t\tthis._checkvalue(this.displayKey, item)\n\t\t\t\t);\n\t\t\t});\n\t\t}\n\n\t\treturn items?.slice(0, this.maxDisplayedItems);\n\t}\n\n\tget _displayValue() {\n\t\tconst placeholder = (\n\t\t\t<div class={textContainer({ variant: 'placeholder' })}>\n\t\t\t\t{this.placeholder}\n\t\t\t</div>\n\t\t);\n\n\t\tif (!this._selectedItem) {\n\t\t\treturn placeholder;\n\t\t}\n\n\t\tif (this.multi) {\n\t\t\tif (this._selectedItem?.length === 0) {\n\t\t\t\treturn placeholder;\n\t\t\t}\n\n\t\t\treturn (\n\t\t\t\t<div\n\t\t\t\t\tclass={multiContainer()}\n\t\t\t\t\tref={ref => (this._multiContainerRef = ref)}\n\t\t\t\t>\n\t\t\t\t\t{this._selectedItem.map(item => (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclass={multiItem()}\n\t\t\t\t\t\t\tonClick={() => this._selectValue(item)}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{item[this.selectionDisplayKey ?? this.displayKey]}\n\t\t\t\t\t\t\t<p-icon\n\t\t\t\t\t\t\t\tclass='text-xs text-supportive-lilac group-hover/item:text-supportive-lilac-800'\n\t\t\t\t\t\t\t\tvariant='negative'\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t))}\n\n\t\t\t\t\t<div class='extra pointer-events-none hidden text-sm text-black-teal-100'>\n\t\t\t\t\t\t+{this._amountHidden}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t);\n\t\t}\n\n\t\treturn this._getDisplay(this._selectedItem, true);\n\t}\n\n\tget _identifierKey() {\n\t\treturn this.identifierKey ?? this.valueKey ?? 'value';\n\t}\n\n\tcomponentDidLoad() {\n\t\tif (!this.valueKey && !this.identifierKey) {\n\t\t\tthrow new Error('You must provide a valueKey or identifierKey');\n\t\t}\n\n\t\tif (this.multi) {\n\t\t\tthis._setMultiContainerMaxWidth();\n\n\t\t\tthis._resizeObserver = new ResizeObserver(() => {\n\t\t\t\tif (this._resizeDebounceTimer) {\n\t\t\t\t\tclearTimeout(this._resizeDebounceTimer);\n\t\t\t\t\tthis._resizeDebounceTimer = null;\n\t\t\t\t}\n\n\t\t\t\tthis._resizeDebounceTimer = setTimeout(() => {\n\t\t\t\t\tthis._setMultiContainerMaxWidth();\n\t\t\t\t\tthis._setCheckSelectedItemsTimeout();\n\t\t\t\t}, 200);\n\t\t\t});\n\t\t\tthis._resizeObserver.observe(this._el);\n\t\t}\n\n\t\tif (this.value) {\n\t\t\tthis._valueChange();\n\t\t\treturn;\n\t\t}\n\n\t\tthis.itemChanges();\n\t}\n\n\tcomponentDidRender() {\n\t\tif (this.multi) {\n\t\t\tthis._setMultiContainerMaxWidth();\n\t\t}\n\t}\n\n\tdisconnectedCallback() {\n\t\tif (this.multi) {\n\t\t\tthis._resizeObserver.disconnect();\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class='p-select'>\n\t\t\t\t<p-dropdown\n\t\t\t\t\tdisableTriggerClick={true}\n\t\t\t\t\tcalculateWidth={true}\n\t\t\t\t\tinsideClick={true}\n\t\t\t\t\tscrollable={this.enableAutocomplete ? 'large' : true}\n\t\t\t\t\tshow={this._showDropdown}\n\t\t\t\t\tonIsOpen={ev => this._onDropdownOpen(ev)}\n\t\t\t\t>\n\t\t\t\t\t<p-field-container\n\t\t\t\t\t\tslot='trigger'\n\t\t\t\t\t\tprefix={this.prefix}\n\t\t\t\t\t\tlabel={this.label}\n\t\t\t\t\t\thelper={this.helper}\n\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\terror={this.error}\n\t\t\t\t\t\terrorPlacement='top-start'\n\t\t\t\t\t\tforceShowTooltip={this.error?.length && this._showDropdown}\n\t\t\t\t\t>\n\t\t\t\t\t\t<p-button\n\t\t\t\t\t\t\tclass='w-full'\n\t\t\t\t\t\t\tslot='content'\n\t\t\t\t\t\t\tvariant='secondary'\n\t\t\t\t\t\t\tsize={this.size}\n\t\t\t\t\t\t\tchevron={this.showChevron}\n\t\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\t\tactive={this._showDropdown}\n\t\t\t\t\t\t\ticon={this.icon}\n\t\t\t\t\t\t\tonClick={ev => this._onClick(ev)}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclass='relative flex-1'\n\t\t\t\t\t\t\t\tref={ref => (this._inputRef = ref)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{this._displayValue}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</p-button>\n\t\t\t\t\t</p-field-container>\n\t\t\t\t\t{this.loading ? this._getLoadingItems() : this._getItems()}\n\t\t\t\t\t{this.showAddItem && this._getAddItem()}\n\t\t\t\t</p-dropdown>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t@Listen('click', { target: 'document', capture: true })\n\tprotected documentClickHandler({ target }) {\n\t\tif (!this._showDropdown || childOf(target, this._el)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._showDropdown = false;\n\t}\n\n\t@Watch('value')\n\tprivate _valueChange() {\n\t\tsetTimeout(() => {\n\t\t\tthis._preselectItem();\n\t\t\tthis._setCheckSelectedItemsTimeout();\n\t\t});\n\t}\n\n\t@Watch('items')\n\tpublic itemChanges() {\n\t\tsetTimeout(() => this._preselectItem());\n\t}\n\n\t@Watch('_showDropdown')\n\tpublic _showDropdownChanges() {\n\t\tthis.dropdownShown.emit({\n\t\t\tvalue: this._showDropdown,\n\t\t\tquery: this.query,\n\t\t});\n\t}\n\n\t@Watch('multi')\n\tpublic multiChanges() {\n\t\tif (this._selectedItem && !Array.isArray(this._selectedItem)) {\n\t\t\tthis._selectedItem = [];\n\t\t}\n\t}\n\n\tprivate _preselectItem() {\n\t\tlet value =\n\t\t\ttypeof this.value === 'string' && this.multi\n\t\t\t\t? JSON.parse(this.value)\n\t\t\t\t: this.value;\n\n\t\tif (this.multi) {\n\t\t\tif (!Array.isArray(value)) {\n\t\t\t\tthis.value = [];\n\t\t\t\tthis.valueChange.emit(this.value);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.value = value;\n\t\t\tif (!value.length) {\n\t\t\t\tthis._selectedItem = [];\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis._selectedItem =\n\t\t\t\t!!this.valueKey && this.valueKey !== 'false'\n\t\t\t\t\t? this._items.filter(i => value.includes(i?.[this.valueKey]))\n\t\t\t\t\t: [...value];\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this._selectedItem && !value && this.autoSelectFirst) {\n\t\t\tvalue = this._items[0];\n\t\t}\n\n\t\tconst identifier =\n\t\t\ttypeof value === 'object' && value !== null\n\t\t\t\t? value[this._identifierKey]\n\t\t\t\t: value;\n\t\tconst parsedValue =\n\t\t\ttypeof identifier === 'string' || typeof identifier === 'number'\n\t\t\t\t? identifier\n\t\t\t\t: JSON.stringify(identifier);\n\n\t\tconst currentValue = this._selectedItem\n\t\t\t? this._selectedItem?.[this._identifierKey]\n\t\t\t: null;\n\t\tconst currentParsedValue =\n\t\t\ttypeof currentValue === 'string' || typeof currentValue === 'number'\n\t\t\t\t? currentValue\n\t\t\t\t: JSON.stringify(currentValue);\n\n\t\tif (this._selectedItem && currentParsedValue === parsedValue) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this._items?.length && value) {\n\t\t\tthis._selectValue(value, false);\n\t\t\treturn;\n\t\t}\n\n\t\tconst item = this._items.find(i => {\n\t\t\tconst itemIdentifier = i?.[this._identifierKey];\n\t\t\tconst parsedItemIdentifier =\n\t\t\t\ttypeof itemIdentifier === 'string' || typeof itemIdentifier === 'number'\n\t\t\t\t\t? itemIdentifier\n\t\t\t\t\t: JSON.stringify(itemIdentifier);\n\n\t\t\treturn parsedItemIdentifier === parsedValue;\n\t\t});\n\n\t\tthis._selectValue(!!item ? item : value, false);\n\t}\n\n\tprivate _selectValue(item, forceBlur = true) {\n\t\tlet value =\n\t\t\t!!this.valueKey && this.valueKey !== 'false' && item !== null\n\t\t\t\t? item?.[this.valueKey]\n\t\t\t\t: item;\n\n\t\tif (this.multi) {\n\t\t\tif (!this._selectedItem || !Array.isArray(this._selectedItem)) {\n\t\t\t\tthis._selectedItem = [];\n\t\t\t}\n\n\t\t\tif (!this.value || !Array.isArray(this.value)) {\n\t\t\t\tthis.value = [];\n\t\t\t}\n\n\t\t\tconst selectedItem = [...this._selectedItem];\n\t\t\tconst valueArray = [...this.value];\n\n\t\t\tconst includesIndex = selectedItem.findIndex(\n\t\t\t\ti => i[this._identifierKey] === item[this._identifierKey]\n\t\t\t);\n\t\t\tif (includesIndex === -1) {\n\t\t\t\tselectedItem.push(item);\n\t\t\t\tvalueArray.push(value);\n\t\t\t} else {\n\t\t\t\tselectedItem.splice(includesIndex, 1);\n\t\t\t\tvalueArray.splice(includesIndex, 1);\n\t\t\t}\n\n\t\t\tthis._selectedItem = selectedItem;\n\t\t\tthis.value = valueArray;\n\t\t\tthis.valueChange.emit(valueArray);\n\t\t\treturn;\n\t\t}\n\n\t\tthis._selectedItem = item;\n\t\tthis.value = value;\n\t\tthis.valueChange.emit(value);\n\n\t\tthis._onBlur(forceBlur);\n\t}\n\n\tprivate _findOnClickTarget(target: HTMLElement) {\n\t\tif (target.nodeName.toLowerCase() === 'p-button') {\n\t\t\treturn true;\n\t\t}\n\n\t\tif (target.classList.contains('item')) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn this._findOnClickTarget(target.parentElement);\n\t}\n\n\tprivate _onClick(ev) {\n\t\tif (!this._findOnClickTarget(ev.target as HTMLElement)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._showDropdown = !this._showDropdown;\n\t}\n\n\tprivate _onBlur(force = false) {\n\t\tif (this.enableAutocomplete && !force) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._showDropdown = false;\n\t}\n\n\tprivate _onAutoComplete(ev) {\n\t\tif (!this.enableAutocomplete) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._showDropdown = true;\n\n\t\tthis.query = ev.detail;\n\t\tthis.queryChange.emit(ev.detail);\n\t}\n\n\tprivate _checkvalue(key, item) {\n\t\treturn (\n\t\t\titem?.[key]\n\t\t\t\t?.toString()\n\t\t\t\t?.toLowerCase()\n\t\t\t\t.indexOf(this.query?.toLowerCase()) >= 0\n\t\t);\n\t}\n\n\tprivate _getItems() {\n\t\tlet items = this._items.map(item => (\n\t\t\t<p-dropdown-menu-item\n\t\t\t\tuseContainer={false}\n\t\t\t\tonClick={() => this._selectValue(item)}\n\t\t\t\tactive={\n\t\t\t\t\tthis.multi &&\n\t\t\t\t\t!!this._selectedItem &&\n\t\t\t\t\tArray.isArray(this._selectedItem)\n\t\t\t\t\t\t? this._selectedItem.findIndex(\n\t\t\t\t\t\t\t\ti => i[this._identifierKey] === item[this._identifierKey]\n\t\t\t\t\t\t ) >= 0\n\t\t\t\t\t\t: item[this._identifierKey] ===\n\t\t\t\t\t\t this._selectedItem?.[this._identifierKey]\n\t\t\t\t}\n\t\t\t\tcheckbox={this.multi ? true : false}\n\t\t\t\tslot='items'\n\t\t\t>\n\t\t\t\t{this._getDisplay(item)}\n\t\t\t</p-dropdown-menu-item>\n\t\t));\n\n\t\tif (!this._items.length) {\n\t\t\titems = [\n\t\t\t\t<p\n\t\t\t\t\tclass='w-full p-2 text-center text-sm text-black-teal-400'\n\t\t\t\t\tslot='items'\n\t\t\t\t>\n\t\t\t\t\t{this.emptyStateText}\n\t\t\t\t</p>,\n\t\t\t];\n\t\t}\n\n\t\tif (this.enableSelectAll && this._items.length) {\n\t\t\titems.unshift(\n\t\t\t\t<p-dropdown-menu-item\n\t\t\t\t\tslot='items'\n\t\t\t\t\tuseContainer={false}\n\t\t\t\t\tcheckbox\n\t\t\t\t\tonClick={() => this._selectAllChange()}\n\t\t\t\t\tactive={this._allSelected}\n\t\t\t\t>\n\t\t\t\t\t{this.selectAllIcon?.length ? (\n\t\t\t\t\t\t<span class='flex items-center gap-2'>\n\t\t\t\t\t\t\t<div class='flex w-6 justify-center text-lg'>\n\t\t\t\t\t\t\t\t<p-icon variant={this.selectAllIcon} />\n\t\t\t\t\t\t\t</div>{' '}\n\t\t\t\t\t\t\t{this.selectAllText}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t) : (\n\t\t\t\t\t\tthis.selectAllText\n\t\t\t\t\t)}\n\t\t\t\t</p-dropdown-menu-item>\n\t\t\t);\n\t\t}\n\n\t\tif (this.enableAutocomplete) {\n\t\t\titems.unshift(this._getAutoCompleteItem());\n\t\t}\n\n\t\treturn items;\n\t}\n\n\tprivate _getAddItem() {\n\t\treturn (\n\t\t\t<p-dropdown-menu-item\n\t\t\t\tonClick={() => this.add.emit()}\n\t\t\t\tuseContainer={false}\n\t\t\t\tslot='items'\n\t\t\t>\n\t\t\t\t<span class='flex items-center gap-1 font-semibold text-teal-800'>\n\t\t\t\t\t{this.addItemText}\n\t\t\t\t\t<p-icon variant='plus' />\n\t\t\t\t</span>\n\t\t\t</p-dropdown-menu-item>\n\t\t);\n\t}\n\n\tprivate _getLoadingItems() {\n\t\tconst items = [0, 0, 0].map(() => (\n\t\t\t<p-dropdown-menu-item\n\t\t\t\tenableHover={false}\n\t\t\t\tslot='items'\n\t\t\t>\n\t\t\t\t<p-loader\n\t\t\t\t\tvariant='ghost'\n\t\t\t\t\tclass='h-6 w-full rounded'\n\t\t\t\t/>\n\t\t\t</p-dropdown-menu-item>\n\t\t));\n\n\t\tif (this.enableAutocomplete) {\n\t\t\titems.unshift(this._getAutoCompleteItem());\n\t\t}\n\n\t\treturn items;\n\t}\n\n\tprivate _getAutoCompleteItem() {\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclass='sticky top-0 mb-3 h-8'\n\t\t\t\tslot='items'\n\t\t\t>\n\t\t\t\t<p-field\n\t\t\t\t\tclass='block'\n\t\t\t\t\tplaceholder={this.autocompletePlaceholder}\n\t\t\t\t\tonValueChange={ev => this._onAutoComplete(ev)}\n\t\t\t\t\tonInputRefChange={ev => (this.autocompleteInputRef = ev.detail)}\n\t\t\t\t\tvalue={this.query}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t);\n\t}\n\n\tprivate _setMultiContainerMaxWidth() {\n\t\tif (!this._inputRef || !this._multiContainerRef) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._multiContainerRef.style.maxWidth = `${\n\t\t\tthis._inputRef.clientWidth - 16\n\t\t}px`;\n\t}\n\n\tprivate _setCheckSelectedItemsTimeout() {\n\t\tif (this._checkSelectedItemsTimeout) {\n\t\t\tclearTimeout(this._checkSelectedItemsTimeout);\n\t\t}\n\n\t\tthis._checkSelectedItemsTimeout = setTimeout(\n\t\t\t() => this._checkSelectedItems(),\n\t\t\t50\n\t\t);\n\t}\n\n\tprivate _checkSelectedItems() {\n\t\tif (!this._multiContainerRef) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst containerRect = this._multiContainerRef.getBoundingClientRect();\n\t\tconst items = this._multiContainerRef.querySelectorAll('.item');\n\n\t\tlet amountHidden = 0;\n\n\t\tfor (const child of items) {\n\t\t\tchild.classList.remove('hidden');\n\t\t\tchild.classList.add('flex');\n\n\t\t\tconst childRect = child.getBoundingClientRect();\n\t\t\tif (childRect.right > containerRect.right) {\n\t\t\t\tchild.classList.remove('flex');\n\t\t\t\tchild.classList.add('hidden');\n\t\t\t\tamountHidden++;\n\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\tthis._amountHidden = amountHidden;\n\t\tconst extra = this._multiContainerRef.querySelector('.extra');\n\t\tif (!extra) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!extra.classList.contains('hidden')) {\n\t\t\textra.classList.add('hidden');\n\t\t}\n\n\t\tif (amountHidden > 0) {\n\t\t\textra.classList.remove('hidden');\n\t\t}\n\t}\n\n\tprivate _onDropdownOpen(ev) {\n\t\tif (!ev.detail || !this.autocompleteInputRef) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.autocompleteInputRef.focus();\n\t}\n\n\tprivate _selectAllChange() {\n\t\tthis._allSelected = !this._allSelected;\n\t\tthis.selectAllChange.emit(this._allSelected);\n\t}\n\n\tprivate _getDisplay(item, isSelection = false) {\n\t\tlet content = (\n\t\t\t<div class={textContainer({ variant: 'default' })}>\n\t\t\t\t{\n\t\t\t\t\titem[\n\t\t\t\t\t\tisSelection\n\t\t\t\t\t\t\t? this.selectionDisplayKey ?? this.displayKey\n\t\t\t\t\t\t\t: this.displayKey\n\t\t\t\t\t]\n\t\t\t\t}\n\t\t\t</div>\n\t\t);\n\n\t\tif (this.avatarKey) {\n\t\t\tcontent = (\n\t\t\t\t<span class='flex items-center gap-2'>\n\t\t\t\t\t<p-avatar\n\t\t\t\t\t\tsize='sm'\n\t\t\t\t\t\tsrc={item[this.avatarKey]}\n\t\t\t\t\t\tletters={item[this.avatarLettersKey]}\n\t\t\t\t\t></p-avatar>\n\t\t\t\t\t<div class={textContainer({ variant: 'default' })}>\n\t\t\t\t\t\t{item[this.dropdownDisplayKey ?? this.displayKey]}\n\t\t\t\t\t</div>\n\t\t\t\t</span>\n\t\t\t);\n\t\t}\n\n\t\tif (this.iconKey && (!isSelection || this.showIconInSelectedItem)) {\n\t\t\tcontent = (\n\t\t\t\t<span class='flex items-center gap-2'>\n\t\t\t\t\t<p-icon variant={item[this.iconKey] as IconVariant} />\n\t\t\t\t\t<div class={textContainer({ variant: 'default' })}>\n\t\t\t\t\t\t{item[this.dropdownDisplayKey ?? this.displayKey]}\n\t\t\t\t\t</div>\n\t\t\t\t</span>\n\t\t\t);\n\t\t}\n\n\t\tif (\n\t\t\t(!isSelection || this.applyClassOnSelectedItem) &&\n\t\t\t!!item?.class?.length\n\t\t) {\n\t\t\treturn <div class={item.class}>{content}</div>;\n\t\t}\n\n\t\treturn content;\n\t}\n}\n"],"mappings":"gKAAA,MAAMA,EAAqB,mzEAC3B,MAAAC,EAAeD,ECef,MAAME,EAAiBC,EAAI,CAC1B,0BACA,wBACA,wCAGD,MAAMC,EAAY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