@paperless/core 2.0.1-beta.31 → 2.0.1-beta.32
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 +11 -0
- package/dist/build/{p-850c70f0.js → p-a483eadb.js} +1 -1
- package/dist/build/p-e77d5ca1.entry.js +2 -0
- package/dist/build/p-e77d5ca1.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-field_2.cjs.entry.js +49 -10
- package/dist/cjs/p-field_2.cjs.entry.js.map +1 -1
- package/dist/cjs/paperless.cjs.js +1 -1
- package/dist/collection/components/molecules/field/field.component.css +1 -1
- package/dist/collection/components/molecules/field/field.component.js +75 -18
- package/dist/collection/components/molecules/field/field.component.js.map +1 -1
- package/dist/collection/components/molecules/field-container/field-container.component.js +22 -1
- package/dist/collection/components/molecules/field-container/field-container.component.js.map +1 -1
- package/dist/components/field-container.component.js +4 -1
- package/dist/components/field-container.component.js.map +1 -1
- package/dist/components/field.component.js +47 -9
- package/dist/components/field.component.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/p-field_2.entry.js +49 -10
- package/dist/esm/p-field_2.entry.js.map +1 -1
- package/dist/esm/paperless.js +1 -1
- package/dist/index.html +1 -1
- package/dist/paperless/p-e77d5ca1.entry.js +2 -0
- package/dist/paperless/p-e77d5ca1.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/molecules/field/field.component.d.ts +15 -11
- package/dist/types/components/molecules/field-container/field-container.component.d.ts +4 -0
- package/dist/types/components.d.ts +36 -20
- package/hydrate/index.js +51 -10
- package/hydrate/index.mjs +51 -10
- package/package.json +1 -1
- package/dist/build/p-3f0837c4.entry.js +0 -2
- package/dist/build/p-3f0837c4.entry.js.map +0 -1
- package/dist/paperless/p-3f0837c4.entry.js +0 -2
- package/dist/paperless/p-3f0837c4.entry.js.map +0 -1
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as t,c as e,g as r,h as i,H as a,F as o}from"./p-45ded510.js";import{c as s}from"./p-8a5b8196.js";import{f as n,g as l}from"./p-f26a3049.js";import"./p-8a1a6e56.js";const c="*{box-sizing:border-box}.static{position:static!important}.flex{display:flex!important}.h-6{height:1.5rem!important}.h-8{height:2rem!important}.h-full{height:100%!important}.w-inherit{width:inherit!important}.min-w-0{min-width:0!important}.flex-1{flex:1 1 0%!important}.flex-shrink-0{flex-shrink:0!important}.cursor-not-allowed{cursor:not-allowed!important}.items-center{align-items:center!important}.justify-center{justify-content:center!important}.gap-2{gap:.5rem!important}.rounded-lg{border-radius:.5rem!important}.border{border-width:1px!important}.border-solid{border-style:solid!important}.border-none{border-style:none!important}.border-black-teal-100{--tw-border-opacity:1!important;border-color:rgb(205 212 211/var(--tw-border-opacity,1))!important}.border-negative-red{--tw-border-opacity:1!important;border-color:rgb(230 30 30/var(--tw-border-opacity,1))!important}.border-supportive-lilac-800{--tw-border-opacity:1!important;border-color:rgb(189 140 255/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}.px-2{padding-left:.5rem!important;padding-right:.5rem!important}.text-center{text-align:center!important}.text-sm{font-size:.875rem!important;line-height:1.25rem!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-300{--tw-text-opacity:1!important;color:rgb(104 127 124/var(--tw-text-opacity,1))!important}.text-black-teal-500{--tw-text-opacity:1!important;color:rgb(3 42 36/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-800{--tw-text-opacity:1!important;color:rgb(141 16 16/var(--tw-text-opacity,1))!important}.outline-none{outline:2px solid transparent!important;outline-offset:2px!important}.ring{--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(3px + 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}.ring-negative-red-50{--tw-ring-opacity:1!important;--tw-ring-color:rgb(253 237 237/var(--tw-ring-opacity,1))!important}.ring-supportive-lilac-100{--tw-ring-opacity:1!important;--tw-ring-color:rgb(246 239 255/var(--tw-ring-opacity,1))!important}.selection\\:bg-negative-red-50 ::selection{--tw-bg-opacity:1!important;background-color:rgb(253 237 237/var(--tw-bg-opacity,1))!important}.selection\\:bg-supportive-lilac ::selection{--tw-bg-opacity:1!important;background-color:rgb(209 174 255/var(--tw-bg-opacity,1))!important}.selection\\:bg-negative-red-50::selection{--tw-bg-opacity:1!important;background-color:rgb(253 237 237/var(--tw-bg-opacity,1))!important}.selection\\:bg-supportive-lilac::selection{--tw-bg-opacity:1!important;background-color:rgb(209 174 255/var(--tw-bg-opacity,1))!important}.placeholder\\:text-sm::placeholder{font-size:.875rem!important;line-height:1.25rem!important}.placeholder\\:text-black-teal-200::placeholder{--tw-text-opacity:1!important;color:rgb(154 170 167/var(--tw-text-opacity,1))!important}.focus\\:outline-none:focus{outline:2px solid transparent!important;outline-offset:2px!important}";const d=c;const p=s(["flex gap-2","w-inherit px-2","border border-solid rounded-lg"],{variants:{size:{sm:"h-6",base:"h-8"},disabled:{false:"bg-white",true:"bg-white-600 cursor-not-allowed"},focused:{false:null,true:null},error:{false:null,true:null}},compoundVariants:[{focused:false,error:false,class:"border-black-teal-100"},{disabled:false,focused:true,error:false,class:"border-supportive-lilac-800 ring ring-supportive-lilac-100 selection:bg-supportive-lilac"},{disabled:false,error:true,class:"border-negative-red"},{disabled:false,focused:true,error:true,class:"ring ring-negative-red-50 selection:bg-negative-red-50"}]});const h=s("text-sm placeholder:text-sm placeholder:text-black-teal-200 text-black-teal border-none outline-none focus:outline-none bg-transparent flex-1 min-w-0 h-full",{variants:{disabled:{false:null,true:"cursor-not-allowed"}}});const f=s(["flex flex-shrink-0 justify-center items-center text-center"],{variants:{disabled:{false:null,true:"text-black-teal-100"},focused:{false:null,true:null},error:{false:null,true:null}},compoundVariants:[{disabled:false,focused:false,error:false,class:"text-black-teal-300"},{disabled:false,focused:true,error:false,class:"text-black-teal-500"},{disabled:false,focused:false,error:true,class:"text-negative-red"},{disabled:false,focused:true,error:true,class:"text-negative-red-800"}]});const b=class{constructor(r){t(this,r);this.valueChange=e(this,"valueChange",7);this.inputRefChange=e(this,"inputRefChange",7);this.size="base";this.type="text";this.properties={};this.prefix=undefined;this.suffix=undefined;this.icon=undefined;this.iconFlip=undefined;this.iconRotate=undefined;this.iconPosition="start";this.value=undefined;this.label=undefined;this.placeholder=undefined;this.helper=undefined;this.required=true;this.autofocus=false;this.error=undefined;this.errorPlacement=undefined;this.disabled=false;this.focused=false;this.forceShowTooltip=false;this.selectAllOnFocus=true;this.focusMethod="focus";this.optionalTemplate=undefined;this._focused=false}valueChange;inputRefChange;get _el(){return r(this)}_inputRef;componentDidLoad(){this._checkAutoFocus()}render(){const{prefix:t,suffix:e,hasHeaderSlot:r,hasLabelSlot:o,hasHelperSlot:s,hasErrorSlot:n}=this._getSlotInfo();return i(a,{key:"cf990118b7fb2b397a4ed1d00026893fb5d65651",class:"p-field"},i("p-field-container",{key:"8957ddbafafbe9be741359ae9c4265bb5c2ab08d",forceShowTooltip:this.forceShowTooltip||this._focused,label:this.label,helper:this.helper,error:this.error,required:this.required},o&&i("slot",{key:"f60081c6a1485f8066715a2e422ea5903f0963a8",name:"label",slot:"label"}),r&&i("slot",{key:"e4b78626d1a79acb5b95692158b5809a4b24dd63",name:"header",slot:"header"}),s&&i("slot",{key:"4346e4bc124d1de2ceb4ee4005eb9b661bf677dd",name:"helper",slot:"helper"}),n&&i("slot",{key:"6d0408efce0e27da7d14dfb4aa9fffb38d3b927a",name:"error",slot:"error"}),i("div",{key:"cf6aed5c63d0652a7fa0ca66c562a7c79d57dafa",class:p({error:!!this.error?.length,disabled:this.disabled,focused:this.focused||this._focused,size:this.size}),slot:"content"},(t||this.icon&&this.iconPosition==="start")&&i("div",{key:"fb6c0aa6cebc783dc15a44462bc04e89fcd13f13",class:f({error:!!this.error?.length,disabled:this.disabled,focused:this.focused||this._focused}),onClick:()=>this._focusInput()},this.icon&&this.iconPosition==="start"?i("p-icon",{class:"flex",variant:this.icon,rotate:this.iconRotate,flip:this.iconFlip}):t),this._getInput(),(e||this.icon&&this.iconPosition==="end")&&i("div",{key:"2822280cb543d2315d062b00b52729f1603b8c6f",class:f({error:!!this.error?.length,disabled:this.disabled,focused:this.focused||this._focused}),onClick:()=>this._focusInput()},this.icon&&this.iconPosition==="end"?i("p-icon",{class:"flex",variant:this.icon,rotate:this.iconRotate,flip:this.iconFlip}):e))))}handleFocusIn(){if(this.disabled){return}this._focused=true;this._selectAll()}handleFocusOut(){if(this.disabled){return}this._focused=false}_getSlotInfo(){const t=!!this._el.querySelector(':scope > [slot="helper"]');const e=!!this._el.querySelector(':scope > [slot="label"]');const r=!!this._el.querySelector(':scope > [slot="prefix"]');const a=!!this._el.querySelector(':scope > [slot="suffix"]');const o=!!this._el.querySelector(':scope > [slot="header"]');const s=!!this._el.querySelector(':scope > [slot="error"]');const n=r?i("slot",{name:"prefix"}):this.prefix;const l=a?i("slot",{name:"suffix"}):this.suffix;const c=this.error&&typeof this.error==="string"&&this.error!=="true";return{hasHelperSlot:t,hasLabelSlot:e,hasPrefixSlot:r,hasSuffixSlot:a,hasHeaderSlot:o,hasErrorSlot:s,prefix:n,suffix:l,errorAndErrorIsNotBoolean:c}}_getInput(){if(this.type==="slot"){return i("slot",{name:"input"})}const t={class:h({disabled:this.disabled}),value:this.value,placeholder:this.placeholder,disabled:this.disabled,onInput:t=>this._valueChange(t)};let e=this.properties??{};if(typeof e==="string"){e=JSON.parse(this.properties)}if(this.type==="textarea"){i("textarea",{ref:t=>this._setInputRef(t),...t,...e})}return i("input",{type:this.type,ref:t=>this._setInputRef(t),...t,...e})}_setInputRef(t){this._inputRef=t;this.inputRefChange.emit(t)}_focusInput(){if(this._inputRef){this._inputRef.focus();return}const t=this._el.querySelector(':scope > [slot="input"]');t[this.focusMethod]()}_selectAll(){if(!this._inputRef||!this.selectAllOnFocus){return}this._inputRef.select()}_valueChange(t){const e=t.target.value;this.value=e;this.valueChange.emit(e)}_checkAutoFocus(){if(!this.autofocus){return}if(!this._inputRef){setTimeout((()=>this._checkAutoFocus()),100);return}this._focusInput()}};b.style=d;const u="*{box-sizing:border-box}.static{position:static!important}.ml-2{margin-left:.5rem!important}.flex{display:flex!important}.w-full{width:100%!important}.w-inherit{width:inherit!important}.flex-col{flex-direction:column!important}.items-end{align-items:flex-end!important}.items-center{align-items:center!important}.justify-between{justify-content:space-between!important}.gap-1{gap:.25rem!important}.text-xs{font-size:.75rem!important;line-height:1rem!important}.font-medium{font-weight:500!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}";const m=u;const g=class{constructor(r){t(this,r);this.focus=e(this,"focus",7);this.label=undefined;this.helper=undefined;this.required=undefined;this.error=undefined;this.errorPlacement=undefined;this.forceShowTooltip=false;this.optionalTemplate=this._defaultOptionalTemplate;this._locales={}}_defaultOptionalTemplate=()=>n(this._locales.optional);get _el(){return r(this)}focus;componentWillLoad(){this._setLocales()}render(){const{hasHeaderSlot:t,hasErrorSlot:e,helper:r,label:s,errorAndErrorIsNotBoolean:n}=this._getSlotInfo();return i(a,{key:"d281d2a9ff20d8ade9f76ad4eb86085e9924130f",class:"p-field-container"},i("div",{key:"bd089038396275d6055446fdc3c8df5565905633",class:"flex w-inherit flex-col gap-1"},i("div",{key:"dabb2165c9791a856aac3ba207cdc8633174c322",class:"flex items-end justify-between gap-1"},s&&i("div",{key:"955a3a463212f5eebb50c84156b4245cec176e05",class:"text-xs font-medium text-black-teal-300",onClick:()=>this.focus.emit()},s),(!this.required||r||t)&&i("div",{key:"eeb7241af592900b4d7703af00d5ba5083d23836",class:"flex items-center gap-1"},!this.required&&i("span",{key:"e59dca6b1ee35d7a69489c0a38d5fb7b25a9da9d",class:"text-xs font-medium text-black-teal-200"},this.optionalTemplate()),(r||t)&&i(o,{key:"c8b6efc1f2acaff910265a8db68c50626c6c9d37"},t&&i("slot",{key:"511747f7a8fe7cfc33e8e88d6fc156cb0f86ac14",name:"header"}),r&&i("p-helper",{key:"08c8ba308601ba7247cfe6f4272c4b5f3b2d1f32",class:`flex ${t?"ml-2":""}`,placement:"top-end"},r)))),i("p-tooltip",{key:"9b0ddbeae82d7cdaa7db4eb0ca7a3312166983dc",class:"w-full",variant:"error",content:this.error,show:n&&this.forceShowTooltip,enableUserInput:false,placement:this.errorPlacement},e&&i("slot",{key:"653ddb7c4ab6b8d1c14f581a72e663c96cd7c494",name:"error",slot:"content"}),i("slot",{key:"66e58f122515c6e68ca669b6d00d2a23feee31c9",name:"content",slot:"trigger"}))))}async _setLocales(){this._locales=await l(this._el)}_getSlotInfo(){const t=!!this._el.querySelector(':scope > [slot="helper"]');const e=!!this._el.querySelector(':scope > [slot="label"]');const r=!!this._el.querySelector(':scope > [slot="header"]');const a=!!this._el.querySelector(':scope > [slot="error"]');const o=t?i("slot",{name:"helper"}):this.helper;const s=e?i("slot",{name:"label"}):this.label;const n=a||this.error&&typeof this.error==="string"&&this.error!=="true";return{hasHelperSlot:t,hasLabelSlot:e,hasHeaderSlot:r,hasErrorSlot:a,helper:o,label:s,errorAndErrorIsNotBoolean:n}}};g.style=m;export{b as p_field,g as p_field_container};
|
|
2
|
-
//# sourceMappingURL=p-3f0837c4.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["fieldComponentCss","PFieldStyle0","field","cva","variants","size","sm","base","disabled","false","true","focused","error","compoundVariants","class","input","prefixAndSuffix","Field","valueChange","inputRefChange","_inputRef","componentDidLoad","this","_checkAutoFocus","render","prefix","suffix","hasHeaderSlot","hasLabelSlot","hasHelperSlot","hasErrorSlot","_getSlotInfo","h","Host","key","forceShowTooltip","_focused","label","helper","required","name","slot","length","icon","iconPosition","onClick","_focusInput","variant","rotate","iconRotate","flip","iconFlip","_getInput","handleFocusIn","_selectAll","handleFocusOut","_el","querySelector","hasPrefixSlot","hasSuffixSlot","errorAndErrorIsNotBoolean","type","props","value","placeholder","onInput","ev","_valueChange","properties","JSON","parse","ref","_setInputRef","emit","focus","focusMethod","selectAllOnFocus","select","target","autofocus","setTimeout","fieldContainerComponentCss","PFieldContainerStyle0","FieldContainer","_defaultOptionalTemplate","formatTranslation","_locales","optional","componentWillLoad","_setLocales","optionalTemplate","Fragment","placement","content","show","enableUserInput","errorPlacement","getLocaleComponentStrings"],"sources":["src/components/molecules/field/field.component.css?tag=p-field&encapsulation=shadow","src/components/molecules/field/field.component.tsx","src/components/molecules/field-container/field-container.component.css?tag=p-field-container&encapsulation=shadow","src/components/molecules/field-container/field-container.component.tsx"],"sourcesContent":[null,"import { Placement } from '@floating-ui/dom';\nimport {\n\tComponent,\n\tElement,\n\tEvent,\n\tEventEmitter,\n\th,\n\tHost,\n\tListen,\n\tProp,\n\tState,\n} from '@stencil/core';\nimport { cva } from 'class-variance-authority';\nimport { HTMLInputTypeAttribute } from 'react';\nimport { RotateOptions } from '../../../types/tailwind';\nimport { IconFlipOptions, IconVariant } from '../../atoms/icon/icon.component';\nimport { templateFunc } from '../field-container/field-container.component';\n\nconst field = cva(\n\t['flex gap-2', 'w-inherit px-2', 'border border-solid rounded-lg'],\n\t{\n\t\tvariants: {\n\t\t\tsize: {\n\t\t\t\tsm: 'h-6',\n\t\t\t\tbase: 'h-8',\n\t\t\t},\n\t\t\tdisabled: {\n\t\t\t\tfalse: 'bg-white',\n\t\t\t\ttrue: 'bg-white-600 cursor-not-allowed',\n\t\t\t},\n\t\t\tfocused: {\n\t\t\t\tfalse: null,\n\t\t\t\ttrue: null,\n\t\t\t},\n\t\t\terror: {\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\tfocused: false,\n\t\t\t\terror: false,\n\t\t\t\tclass: 'border-black-teal-100',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisabled: false,\n\t\t\t\tfocused: true,\n\t\t\t\terror: false,\n\t\t\t\tclass:\n\t\t\t\t\t'border-supportive-lilac-800 ring ring-supportive-lilac-100 selection:bg-supportive-lilac',\n\t\t\t},\n\n\t\t\t{\n\t\t\t\tdisabled: false,\n\t\t\t\terror: true,\n\t\t\t\tclass: 'border-negative-red',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisabled: false,\n\t\t\t\tfocused: true,\n\t\t\t\terror: true,\n\t\t\t\tclass: 'ring ring-negative-red-50 selection:bg-negative-red-50',\n\t\t\t},\n\t\t],\n\t}\n);\n\nconst input = cva(\n\t'text-sm placeholder:text-sm placeholder:text-black-teal-200 text-black-teal border-none outline-none focus:outline-none bg-transparent flex-1 min-w-0 h-full',\n\t{\n\t\tvariants: {\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}\n);\n\nconst prefixAndSuffix = cva(\n\t['flex flex-shrink-0 justify-center items-center text-center'],\n\t{\n\t\tvariants: {\n\t\t\tdisabled: {\n\t\t\t\tfalse: null,\n\t\t\t\ttrue: 'text-black-teal-100',\n\t\t\t},\n\t\t\tfocused: {\n\t\t\t\tfalse: null,\n\t\t\t\ttrue: null,\n\t\t\t},\n\t\t\terror: {\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\tdisabled: false,\n\t\t\t\tfocused: false,\n\t\t\t\terror: false,\n\t\t\t\tclass: 'text-black-teal-300',\n\t\t\t},\n\n\t\t\t{\n\t\t\t\tdisabled: false,\n\t\t\t\tfocused: true,\n\t\t\t\terror: false,\n\t\t\t\tclass: 'text-black-teal-500',\n\t\t\t},\n\n\t\t\t{\n\t\t\t\tdisabled: false,\n\t\t\t\tfocused: false,\n\t\t\t\terror: true,\n\t\t\t\tclass: 'text-negative-red',\n\t\t\t},\n\n\t\t\t{\n\t\t\t\tdisabled: false,\n\t\t\t\tfocused: true,\n\t\t\t\terror: true,\n\t\t\t\tclass: 'text-negative-red-800',\n\t\t\t},\n\t\t],\n\t}\n);\n\n@Component({\n\ttag: 'p-field',\n\tstyleUrl: './field.component.css',\n\tshadow: true,\n})\nexport class Field {\n\t/**\n\t * The size of the input group\n\t */\n\t@Prop() size: 'sm' | 'base' = 'base';\n\n\t/**\n\t * The type of the input group\n\t */\n\t@Prop() type: HTMLInputTypeAttribute | 'textarea' | 'slot' = 'text';\n\n\t/**\n\t * The size of the input group\n\t */\n\t@Prop() properties: any | string = {};\n\n\t/**\n\t * The prefix of the input group\n\t */\n\t@Prop() prefix: string;\n\n\t/**\n\t * The suffix of the input group\n\t */\n\t@Prop() suffix: string;\n\n\t/**\n\t * Icon of the input group\n\t */\n\t@Prop() icon: IconVariant;\n\n\t/**\n\t * Icon flip */\n\t@Prop() iconFlip: IconFlipOptions;\n\n\t/**\n\t * Icon rotate\n\t */\n\t@Prop() iconRotate: RotateOptions;\n\n\t/**\n\t * Icon position\n\t */\n\t@Prop() iconPosition: 'start' | 'end' = 'start';\n\n\t/**\n\t * The value of the input\n\t */\n\t@Prop() value: string;\n\n\t/**\n\t * The label of the input group\n\t */\n\t@Prop() label: string;\n\n\t/**\n\t * The placeholder of the input\n\t */\n\t@Prop() placeholder: string;\n\n\t/**\n\t * The helper of the input group\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 * Wether to autofocus the field\n\t */\n\t@Prop({ reflect: true }) autofocus: boolean = false;\n\n\t/**\n\t * The error to display\n\t */\n\t@Prop({ reflect: true }) error: string;\n\n\t/**\n\t * The placement of the error popover\n\t */\n\t@Prop() errorPlacement: Placement;\n\n\t/**\n\t * Wether the input group is disabled\n\t */\n\t@Prop({ reflect: true }) disabled: boolean = false;\n\n\t/**\n\t * Wether the input group is focused\n\t */\n\t@Prop({ reflect: true }) focused: boolean = false;\n\n\t/**\n\t * Force show the error tooltip\n\t */\n\t@Prop({ reflect: true }) forceShowTooltip: boolean = false;\n\n\t/**\n\t * Wether to select all text on focus\n\t */\n\t@Prop({ reflect: true }) selectAllOnFocus: boolean = true;\n\n\t/**\n\t * The method to use when focusing the input\n\t */\n\t@Prop() focusMethod: 'focus' | 'click' = 'focus';\n\n\t/**\n\t * The template for the optional text\n\t */\n\t@Prop() optionalTemplate: templateFunc;\n\n\t/**\n\t * Event whenever the value changes\n\t */\n\t@Event() valueChange: EventEmitter<string>;\n\n\t/**\n\t * Event whenever the input ref changes\n\t */\n\t@Event() inputRefChange: EventEmitter<HTMLInputElement | HTMLTextAreaElement>;\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\t@State() private _focused = false;\n\n\tprivate _inputRef: HTMLInputElement | HTMLTextAreaElement;\n\n\tcomponentDidLoad() {\n\t\tthis._checkAutoFocus();\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\tprefix,\n\t\t\tsuffix,\n\t\t\thasHeaderSlot,\n\t\t\thasLabelSlot,\n\t\t\thasHelperSlot,\n\t\t\thasErrorSlot,\n\t\t} = this._getSlotInfo();\n\n\t\treturn (\n\t\t\t<Host class='p-field'>\n\t\t\t\t<p-field-container\n\t\t\t\t\tforceShowTooltip={this.forceShowTooltip || this._focused}\n\t\t\t\t\tlabel={this.label}\n\t\t\t\t\thelper={this.helper}\n\t\t\t\t\terror={this.error}\n\t\t\t\t\trequired={this.required}\n\t\t\t\t>\n\t\t\t\t\t{hasLabelSlot && (\n\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\tname='label'\n\t\t\t\t\t\t\tslot='label'\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\n\t\t\t\t\t{hasHeaderSlot && (\n\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\tname='header'\n\t\t\t\t\t\t\tslot='header'\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\n\t\t\t\t\t{hasHelperSlot && (\n\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\tname='helper'\n\t\t\t\t\t\t\tslot='helper'\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\n\t\t\t\t\t{hasErrorSlot && (\n\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\tname='error'\n\t\t\t\t\t\t\tslot='error'\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\n\t\t\t\t\t<div\n\t\t\t\t\t\tclass={field({\n\t\t\t\t\t\t\terror: !!this.error?.length,\n\t\t\t\t\t\t\tdisabled: this.disabled,\n\t\t\t\t\t\t\tfocused: this.focused || this._focused,\n\t\t\t\t\t\t\tsize: this.size,\n\t\t\t\t\t\t})}\n\t\t\t\t\t\tslot='content'\n\t\t\t\t\t>\n\t\t\t\t\t\t{(prefix || (this.icon && this.iconPosition === 'start')) && (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclass={prefixAndSuffix({\n\t\t\t\t\t\t\t\t\terror: !!this.error?.length,\n\t\t\t\t\t\t\t\t\tdisabled: this.disabled,\n\t\t\t\t\t\t\t\t\tfocused: this.focused || this._focused,\n\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\tonClick={() => this._focusInput()}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{this.icon && this.iconPosition === 'start' ? (\n\t\t\t\t\t\t\t\t\t<p-icon\n\t\t\t\t\t\t\t\t\t\tclass='flex'\n\t\t\t\t\t\t\t\t\t\tvariant={this.icon}\n\t\t\t\t\t\t\t\t\t\trotate={this.iconRotate}\n\t\t\t\t\t\t\t\t\t\tflip={this.iconFlip}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\tprefix\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{this._getInput()}\n\n\t\t\t\t\t\t{(suffix || (this.icon && this.iconPosition === 'end')) && (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclass={prefixAndSuffix({\n\t\t\t\t\t\t\t\t\terror: !!this.error?.length,\n\t\t\t\t\t\t\t\t\tdisabled: this.disabled,\n\t\t\t\t\t\t\t\t\tfocused: this.focused || this._focused,\n\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\tonClick={() => this._focusInput()}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{this.icon && this.iconPosition === 'end' ? (\n\t\t\t\t\t\t\t\t\t<p-icon\n\t\t\t\t\t\t\t\t\t\tclass='flex'\n\t\t\t\t\t\t\t\t\t\tvariant={this.icon}\n\t\t\t\t\t\t\t\t\t\trotate={this.iconRotate}\n\t\t\t\t\t\t\t\t\t\tflip={this.iconFlip}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\tsuffix\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t</p-field-container>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t@Listen('focusin')\n\thandleFocusIn() {\n\t\tif (this.disabled) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._focused = true;\n\t\tthis._selectAll();\n\t}\n\n\t@Listen('focusout')\n\thandleFocusOut() {\n\t\tif (this.disabled) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._focused = false;\n\t}\n\n\tprivate _getSlotInfo() {\n\t\tconst hasHelperSlot = !!this._el.querySelector(':scope > [slot=\"helper\"]');\n\t\tconst hasLabelSlot = !!this._el.querySelector(':scope > [slot=\"label\"]');\n\t\tconst hasPrefixSlot = !!this._el.querySelector(':scope > [slot=\"prefix\"]');\n\t\tconst hasSuffixSlot = !!this._el.querySelector(':scope > [slot=\"suffix\"]');\n\t\tconst hasHeaderSlot = !!this._el.querySelector(':scope > [slot=\"header\"]');\n\t\tconst hasErrorSlot = !!this._el.querySelector(':scope > [slot=\"error\"]');\n\n\t\tconst prefix = hasPrefixSlot ? <slot name='prefix' /> : this.prefix;\n\t\tconst suffix = hasSuffixSlot ? <slot name='suffix' /> : this.suffix;\n\n\t\tconst errorAndErrorIsNotBoolean =\n\t\t\tthis.error && typeof this.error === 'string' && this.error !== 'true';\n\n\t\treturn {\n\t\t\thasHelperSlot,\n\t\t\thasLabelSlot,\n\t\t\thasPrefixSlot,\n\t\t\thasSuffixSlot,\n\t\t\thasHeaderSlot,\n\t\t\thasErrorSlot,\n\t\t\tprefix,\n\t\t\tsuffix,\n\t\t\terrorAndErrorIsNotBoolean,\n\t\t};\n\t}\n\n\tprivate _getInput() {\n\t\tif (this.type === 'slot') {\n\t\t\treturn <slot name='input' />;\n\t\t}\n\n\t\tconst props = {\n\t\t\tclass: input({\n\t\t\t\tdisabled: this.disabled,\n\t\t\t}),\n\t\t\tvalue: this.value,\n\t\t\tplaceholder: this.placeholder,\n\t\t\tdisabled: this.disabled,\n\t\t\tonInput: (ev: Event) => this._valueChange(ev),\n\t\t};\n\n\t\tlet properties = this.properties ?? {};\n\t\tif (typeof properties === 'string') {\n\t\t\tproperties = JSON.parse(this.properties);\n\t\t}\n\n\t\tif (this.type === 'textarea') {\n\t\t\t<textarea\n\t\t\t\tref={ref => this._setInputRef(ref)}\n\t\t\t\t{...props}\n\t\t\t\t{...properties}\n\t\t\t/>;\n\t\t}\n\n\t\treturn (\n\t\t\t<input\n\t\t\t\ttype={this.type}\n\t\t\t\tref={ref => this._setInputRef(ref)}\n\t\t\t\t{...props}\n\t\t\t\t{...properties}\n\t\t\t/>\n\t\t);\n\t}\n\n\tprivate _setInputRef(ref: HTMLInputElement | HTMLTextAreaElement) {\n\t\tthis._inputRef = ref;\n\t\tthis.inputRefChange.emit(ref);\n\t}\n\n\tprivate _focusInput() {\n\t\tif (this._inputRef) {\n\t\t\tthis._inputRef.focus();\n\t\t\treturn;\n\t\t}\n\n\t\tconst input = this._el.querySelector(':scope > [slot=\"input\"]');\n\t\t(input as HTMLElement)[this.focusMethod]();\n\t}\n\n\tprivate _selectAll() {\n\t\tif (!this._inputRef || !this.selectAllOnFocus) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._inputRef.select();\n\t}\n\n\tprivate _valueChange(ev) {\n\t\tconst value = (ev.target as HTMLTextAreaElement | HTMLInputElement).value;\n\t\tthis.value = value;\n\t\tthis.valueChange.emit(value);\n\t}\n\n\tprivate _checkAutoFocus() {\n\t\tif (!this.autofocus) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this._inputRef) {\n\t\t\tsetTimeout(() => this._checkAutoFocus(), 100);\n\t\t\treturn;\n\t\t}\n\n\t\tthis._focusInput();\n\t}\n}\n",null,"import {\n\tComponent,\n\tElement,\n\tEventEmitter,\n\th,\n\tHost,\n\tEvent,\n\tProp,\n\tFragment,\n\tState,\n\tListen,\n} from '@stencil/core';\nimport { formatTranslation, getLocaleComponentStrings } from '../../../utils';\nimport { Placement } from '@floating-ui/dom';\n\nexport type templateFunc = () => string;\n\n@Component({\n\ttag: 'p-field-container',\n\tstyleUrl: 'field-container.component.css',\n\tshadow: true,\n})\nexport class FieldContainer {\n\tprivate _defaultOptionalTemplate: templateFunc = () =>\n\t\tformatTranslation(this._locales.optional);\n\n\t/**\n\t * The label of the input group\n\t */\n\t@Prop() label: string | HTMLSlotElement;\n\n\t/**\n\t * The helper of the input group\n\t */\n\t@Prop() helper: string | HTMLSlotElement;\n\n\t/**\n\t * Wether the field is required\n\t */\n\t@Prop({ reflect: true }) required: boolean;\n\n\t/**\n\t * The helper of the input group\n\t */\n\t@Prop({ reflect: true }) error: string | HTMLSlotElement;\n\n\t/**\n\t * The placement of the error popover\n\t */\n\t@Prop() errorPlacement: Placement;\n\n\t/**\n\t * Force show the error tooltip\n\t */\n\t@Prop({ reflect: true }) forceShowTooltip: boolean = false;\n\n\t/**\n\t * The template for the optional text\n\t */\n\t@Prop() optionalTemplate: templateFunc = this._defaultOptionalTemplate;\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\t@Event() focus: EventEmitter<void>;\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\tconst {\n\t\t\thasHeaderSlot,\n\t\t\thasErrorSlot,\n\t\t\thelper,\n\t\t\tlabel,\n\t\t\terrorAndErrorIsNotBoolean,\n\t\t} = this._getSlotInfo();\n\n\t\treturn (\n\t\t\t<Host class='p-field-container'>\n\t\t\t\t<div class='flex w-inherit flex-col gap-1'>\n\t\t\t\t\t<div class='flex items-end justify-between gap-1'>\n\t\t\t\t\t\t{label && (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclass='text-xs font-medium text-black-teal-300'\n\t\t\t\t\t\t\t\tonClick={() => this.focus.emit()}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{label}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{(!this.required || helper || hasHeaderSlot) && (\n\t\t\t\t\t\t\t<div class='flex items-center gap-1'>\n\t\t\t\t\t\t\t\t{!this.required && (\n\t\t\t\t\t\t\t\t\t<span class='text-xs font-medium text-black-teal-200'>\n\t\t\t\t\t\t\t\t\t\t{this.optionalTemplate()}\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t{(helper || hasHeaderSlot) && (\n\t\t\t\t\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t\t\t\t\t{hasHeaderSlot && <slot name='header' />}\n\t\t\t\t\t\t\t\t\t\t{helper && (\n\t\t\t\t\t\t\t\t\t\t\t<p-helper\n\t\t\t\t\t\t\t\t\t\t\t\tclass={`flex ${hasHeaderSlot ? 'ml-2' : ''}`}\n\t\t\t\t\t\t\t\t\t\t\t\tplacement='top-end'\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t{helper}\n\t\t\t\t\t\t\t\t\t\t\t</p-helper>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t</Fragment>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t\t<p-tooltip\n\t\t\t\t\t\tclass='w-full'\n\t\t\t\t\t\tvariant='error'\n\t\t\t\t\t\tcontent={this.error}\n\t\t\t\t\t\tshow={errorAndErrorIsNotBoolean && this.forceShowTooltip}\n\t\t\t\t\t\tenableUserInput={false}\n\t\t\t\t\t\tplacement={this.errorPlacement}\n\t\t\t\t\t>\n\t\t\t\t\t\t{hasErrorSlot && (\n\t\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\t\tname='error'\n\t\t\t\t\t\t\t\tslot='content'\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\tname='content'\n\t\t\t\t\t\t\tslot='trigger'\n\t\t\t\t\t\t/>\n\t\t\t\t\t</p-tooltip>\n\t\t\t\t</div>\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 _getSlotInfo() {\n\t\tconst hasHelperSlot = !!this._el.querySelector(':scope > [slot=\"helper\"]');\n\t\tconst hasLabelSlot = !!this._el.querySelector(':scope > [slot=\"label\"]');\n\t\tconst hasHeaderSlot = !!this._el.querySelector(':scope > [slot=\"header\"]');\n\t\tconst hasErrorSlot = !!this._el.querySelector(':scope > [slot=\"error\"]');\n\n\t\tconst helper = hasHelperSlot ? <slot name='helper' /> : this.helper;\n\t\tconst label = hasLabelSlot ? <slot name='label' /> : this.label;\n\n\t\tconst errorAndErrorIsNotBoolean =\n\t\t\thasErrorSlot ||\n\t\t\t(this.error && typeof this.error === 'string' && this.error !== 'true');\n\n\t\treturn {\n\t\t\thasHelperSlot,\n\t\t\thasLabelSlot,\n\t\t\thasHeaderSlot,\n\t\t\thasErrorSlot,\n\t\t\thelper,\n\t\t\tlabel,\n\t\t\terrorAndErrorIsNotBoolean,\n\t\t};\n\t}\n}\n"],"mappings":"8KAAA,MAAMA,EAAoB,gjHAC1B,MAAAC,EAAeD,ECiBf,MAAME,EAAQC,EACb,CAAC,aAAc,iBAAkB,kCACjC,CACCC,SAAU,CACTC,KAAM,CACLC,GAAI,MACJC,KAAM,OAEPC,SAAU,CACTC,MAAO,WACPC,KAAM,mCAEPC,QAAS,CACRF,MAAO,KACPC,KAAM,MAEPE,MAAO,CACNH,MAAO,KACPC,KAAM,OAGRG,iBAAkB,CACjB,CACCF,QAAS,MACTC,MAAO,MACPE,MAAO,yBAER,CACCN,SAAU,MACVG,QAAS,KACTC,MAAO,MACPE,MACC,4FAGF,CACCN,SAAU,MACVI,MAAO,KACPE,MAAO,uBAER,CACCN,SAAU,MACVG,QAAS,KACTC,MAAO,KACPE,MAAO,6DAMX,MAAMC,EAAQZ,EACb,+JACA,CACCC,SAAU,CACTI,SAAU,CACTC,MAAO,KACPC,KAAM,y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iBACxC4D,gBAAiB,MACjBH,UAAWtE,KAAK0E,gBAEflE,GACAE,EAAA,QAAAE,IAAA,2CACCM,KAAK,QACLC,KAAK,YAIPT,EAAA,QAAAE,IAAA,2CACCM,KAAK,UACLC,KAAK,c,CASH,iBAAMgD,GACbnE,KAAKgE,eAAiBW,EAA0B3E,KAAKkC,I,CAG9C,YAAAzB,GACP,MAAMF,IAAkBP,KAAKkC,IAAIC,cAAc,4BAC/C,MAAM7B,IAAiBN,KAAKkC,IAAIC,cAAc,2BAC9C,MAAM9B,IAAkBL,KAAKkC,IAAIC,cAAc,4BAC/C,MAAM3B,IAAiBR,KAAKkC,IAAIC,cAAc,2BAE9C,MAAMnB,EAAST,EAAgBG,EAAA,QAAMQ,KAAK,WAAclB,KAAKgB,OAC7D,MAAMD,EAAQT,EAAeI,EAAA,QAAMQ,KAAK,UAAalB,KAAKe,MAE1D,MAAMuB,EACL9B,GACCR,KAAKV,cAAgBU,KAAKV,QAAU,UAAYU,KAAKV,QAAU,OAEjE,MAAO,CACNiB,gBACAD,eACAD,gBACAG,eACAQ,SACAD,QACAuB,4B","ignoreList":[]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as t,c as e,g as r,h as i,H as a,F as o}from"./p-45ded510.js";import{c as s}from"./p-8a5b8196.js";import{f as n,g as l}from"./p-f26a3049.js";import"./p-8a1a6e56.js";const c="*{box-sizing:border-box}.static{position:static!important}.flex{display:flex!important}.h-6{height:1.5rem!important}.h-8{height:2rem!important}.h-full{height:100%!important}.w-inherit{width:inherit!important}.min-w-0{min-width:0!important}.flex-1{flex:1 1 0%!important}.flex-shrink-0{flex-shrink:0!important}.cursor-not-allowed{cursor:not-allowed!important}.items-center{align-items:center!important}.justify-center{justify-content:center!important}.gap-2{gap:.5rem!important}.rounded-lg{border-radius:.5rem!important}.border{border-width:1px!important}.border-solid{border-style:solid!important}.border-none{border-style:none!important}.border-black-teal-100{--tw-border-opacity:1!important;border-color:rgb(205 212 211/var(--tw-border-opacity,1))!important}.border-negative-red{--tw-border-opacity:1!important;border-color:rgb(230 30 30/var(--tw-border-opacity,1))!important}.border-supportive-lilac-800{--tw-border-opacity:1!important;border-color:rgb(189 140 255/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}.px-2{padding-left:.5rem!important;padding-right:.5rem!important}.text-center{text-align:center!important}.text-sm{font-size:.875rem!important;line-height:1.25rem!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-300{--tw-text-opacity:1!important;color:rgb(104 127 124/var(--tw-text-opacity,1))!important}.text-black-teal-500{--tw-text-opacity:1!important;color:rgb(3 42 36/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-800{--tw-text-opacity:1!important;color:rgb(141 16 16/var(--tw-text-opacity,1))!important}.outline-none{outline:2px solid transparent!important;outline-offset:2px!important}.ring{--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(3px + 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}.ring-negative-red-50{--tw-ring-opacity:1!important;--tw-ring-color:rgb(253 237 237/var(--tw-ring-opacity,1))!important}.ring-supportive-lilac-100{--tw-ring-opacity:1!important;--tw-ring-color:rgb(246 239 255/var(--tw-ring-opacity,1))!important}.selection\\:bg-negative-red-50 ::selection{--tw-bg-opacity:1!important;background-color:rgb(253 237 237/var(--tw-bg-opacity,1))!important}.selection\\:bg-supportive-lilac ::selection{--tw-bg-opacity:1!important;background-color:rgb(209 174 255/var(--tw-bg-opacity,1))!important}.selection\\:bg-negative-red-50::selection{--tw-bg-opacity:1!important;background-color:rgb(253 237 237/var(--tw-bg-opacity,1))!important}.selection\\:bg-supportive-lilac::selection{--tw-bg-opacity:1!important;background-color:rgb(209 174 255/var(--tw-bg-opacity,1))!important}.placeholder\\:text-sm::placeholder{font-size:.875rem!important;line-height:1.25rem!important}.placeholder\\:text-black-teal-200::placeholder{--tw-text-opacity:1!important;color:rgb(154 170 167/var(--tw-text-opacity,1))!important}.focus\\:outline-none:focus{outline:2px solid transparent!important;outline-offset:2px!important}";const d=c;const p=s(["flex gap-2","w-inherit px-2","border border-solid rounded-lg"],{variants:{size:{sm:"h-6",base:"h-8"},disabled:{false:"bg-white",true:"bg-white-600 cursor-not-allowed"},focused:{false:null,true:null},error:{false:null,true:null}},compoundVariants:[{focused:false,error:false,class:"border-black-teal-100"},{disabled:false,focused:true,error:false,class:"border-supportive-lilac-800 ring ring-supportive-lilac-100 selection:bg-supportive-lilac"},{disabled:false,error:true,class:"border-negative-red"},{disabled:false,focused:true,error:true,class:"ring ring-negative-red-50 selection:bg-negative-red-50"}]});const h=s("text-sm placeholder:text-sm placeholder:text-black-teal-200 text-black-teal border-none outline-none focus:outline-none bg-transparent flex-1 min-w-0 h-full",{variants:{disabled:{false:null,true:"cursor-not-allowed"}}});const f=s(["flex flex-shrink-0 justify-center items-center text-center"],{variants:{disabled:{false:null,true:"text-black-teal-100"},focused:{false:null,true:null},error:{false:null,true:null}},compoundVariants:[{disabled:false,focused:false,error:false,class:"text-black-teal-300"},{disabled:false,focused:true,error:false,class:"text-black-teal-500"},{disabled:false,focused:false,error:true,class:"text-negative-red"},{disabled:false,focused:true,error:true,class:"text-negative-red-800"}]});const b=class{constructor(r){t(this,r);this.valueChange=e(this,"valueChange",7);this.inputRefChange=e(this,"inputRefChange",7);this.size="base";this.type="text";this.properties={};this.prefix=undefined;this.suffix=undefined;this.icon=undefined;this.iconFlip=undefined;this.iconRotate=undefined;this.iconPosition="start";this.value=undefined;this.label=undefined;this.placeholder=undefined;this.helper=undefined;this.required=true;this.autofocus=false;this.error=undefined;this.errorPlacement=undefined;this.disabled=false;this.focused=false;this.forceShowTooltip=false;this.selectAllOnFocus=true;this.focusMethod="focus";this.optionalTemplate=undefined;this._focused=false}valueChange;inputRefChange;get _el(){return r(this)}_inputRef;componentDidLoad(){this._checkAutoFocus()}render(){const{prefix:t,suffix:e,hasHeaderSlot:r,hasLabelSlot:o,hasHelperSlot:s,hasErrorSlot:n}=this._getSlotInfo();return i(a,{key:"cf990118b7fb2b397a4ed1d00026893fb5d65651",class:"p-field"},i("p-field-container",{key:"8957ddbafafbe9be741359ae9c4265bb5c2ab08d",forceShowTooltip:this.forceShowTooltip||this._focused,label:this.label,helper:this.helper,error:this.error,required:this.required},o&&i("slot",{key:"f60081c6a1485f8066715a2e422ea5903f0963a8",name:"label",slot:"label"}),r&&i("slot",{key:"e4b78626d1a79acb5b95692158b5809a4b24dd63",name:"header",slot:"header"}),s&&i("slot",{key:"4346e4bc124d1de2ceb4ee4005eb9b661bf677dd",name:"helper",slot:"helper"}),n&&i("slot",{key:"6d0408efce0e27da7d14dfb4aa9fffb38d3b927a",name:"error",slot:"error"}),i("div",{key:"cf6aed5c63d0652a7fa0ca66c562a7c79d57dafa",class:p({error:!!this.error?.length,disabled:this.disabled,focused:this.focused||this._focused,size:this.size}),slot:"content"},(t||this.icon&&this.iconPosition==="start")&&i("div",{key:"fb6c0aa6cebc783dc15a44462bc04e89fcd13f13",class:f({error:!!this.error?.length,disabled:this.disabled,focused:this.focused||this._focused}),onClick:()=>this._focusInput()},this.icon&&this.iconPosition==="start"?i("p-icon",{class:"flex",variant:this.icon,rotate:this.iconRotate,flip:this.iconFlip}):t),this._getInput(),(e||this.icon&&this.iconPosition==="end")&&i("div",{key:"2822280cb543d2315d062b00b52729f1603b8c6f",class:f({error:!!this.error?.length,disabled:this.disabled,focused:this.focused||this._focused}),onClick:()=>this._focusInput()},this.icon&&this.iconPosition==="end"?i("p-icon",{class:"flex",variant:this.icon,rotate:this.iconRotate,flip:this.iconFlip}):e))))}handleFocusIn(){if(this.disabled){return}this._focused=true;this._selectAll()}handleFocusOut(){if(this.disabled){return}this._focused=false}_getSlotInfo(){const t=!!this._el.querySelector(':scope > [slot="helper"]');const e=!!this._el.querySelector(':scope > [slot="label"]');const r=!!this._el.querySelector(':scope > [slot="prefix"]');const a=!!this._el.querySelector(':scope > [slot="suffix"]');const o=!!this._el.querySelector(':scope > [slot="header"]');const s=!!this._el.querySelector(':scope > [slot="error"]');const n=r?i("slot",{name:"prefix"}):this.prefix;const l=a?i("slot",{name:"suffix"}):this.suffix;const c=this.error&&typeof this.error==="string"&&this.error!=="true";return{hasHelperSlot:t,hasLabelSlot:e,hasPrefixSlot:r,hasSuffixSlot:a,hasHeaderSlot:o,hasErrorSlot:s,prefix:n,suffix:l,errorAndErrorIsNotBoolean:c}}_getInput(){if(this.type==="slot"){return i("slot",{name:"input"})}const t={class:h({disabled:this.disabled}),value:this.value,placeholder:this.placeholder,disabled:this.disabled,onInput:t=>this._valueChange(t)};let e=this.properties??{};if(typeof e==="string"){e=JSON.parse(this.properties)}if(this.type==="textarea"){i("textarea",{ref:t=>this._setInputRef(t),...t,...e})}return i("input",{type:this.type,ref:t=>this._setInputRef(t),...t,...e})}_setInputRef(t){this._inputRef=t;this.inputRefChange.emit(t)}_focusInput(){if(this._inputRef){this._inputRef.focus();return}const t=this._el.querySelector(':scope > [slot="input"]');t[this.focusMethod]()}_selectAll(){if(!this._inputRef||!this.selectAllOnFocus){return}this._inputRef.select()}_valueChange(t){const e=t.target.value;this.value=e;this.valueChange.emit(e)}_checkAutoFocus(){if(!this.autofocus){return}if(!this._inputRef){setTimeout((()=>this._checkAutoFocus()),100);return}this._focusInput()}};b.style=d;const u="*{box-sizing:border-box}.static{position:static!important}.ml-2{margin-left:.5rem!important}.flex{display:flex!important}.w-full{width:100%!important}.w-inherit{width:inherit!important}.flex-col{flex-direction:column!important}.items-end{align-items:flex-end!important}.items-center{align-items:center!important}.justify-between{justify-content:space-between!important}.gap-1{gap:.25rem!important}.text-xs{font-size:.75rem!important;line-height:1rem!important}.font-medium{font-weight:500!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}";const m=u;const g=class{constructor(r){t(this,r);this.focus=e(this,"focus",7);this.label=undefined;this.helper=undefined;this.required=undefined;this.error=undefined;this.errorPlacement=undefined;this.forceShowTooltip=false;this.optionalTemplate=this._defaultOptionalTemplate;this._locales={}}_defaultOptionalTemplate=()=>n(this._locales.optional);get _el(){return r(this)}focus;componentWillLoad(){this._setLocales()}render(){const{hasHeaderSlot:t,hasErrorSlot:e,helper:r,label:s,errorAndErrorIsNotBoolean:n}=this._getSlotInfo();return i(a,{key:"d281d2a9ff20d8ade9f76ad4eb86085e9924130f",class:"p-field-container"},i("div",{key:"bd089038396275d6055446fdc3c8df5565905633",class:"flex w-inherit flex-col gap-1"},i("div",{key:"dabb2165c9791a856aac3ba207cdc8633174c322",class:"flex items-end justify-between gap-1"},s&&i("div",{key:"955a3a463212f5eebb50c84156b4245cec176e05",class:"text-xs font-medium text-black-teal-300",onClick:()=>this.focus.emit()},s),(!this.required||r||t)&&i("div",{key:"eeb7241af592900b4d7703af00d5ba5083d23836",class:"flex items-center gap-1"},!this.required&&i("span",{key:"e59dca6b1ee35d7a69489c0a38d5fb7b25a9da9d",class:"text-xs font-medium text-black-teal-200"},this.optionalTemplate()),(r||t)&&i(o,{key:"c8b6efc1f2acaff910265a8db68c50626c6c9d37"},t&&i("slot",{key:"511747f7a8fe7cfc33e8e88d6fc156cb0f86ac14",name:"header"}),r&&i("p-helper",{key:"08c8ba308601ba7247cfe6f4272c4b5f3b2d1f32",class:`flex ${t?"ml-2":""}`,placement:"top-end"},r)))),i("p-tooltip",{key:"9b0ddbeae82d7cdaa7db4eb0ca7a3312166983dc",class:"w-full",variant:"error",content:this.error,show:n&&this.forceShowTooltip,enableUserInput:false,placement:this.errorPlacement},e&&i("slot",{key:"653ddb7c4ab6b8d1c14f581a72e663c96cd7c494",name:"error",slot:"content"}),i("slot",{key:"66e58f122515c6e68ca669b6d00d2a23feee31c9",name:"content",slot:"trigger"}))))}async _setLocales(){this._locales=await l(this._el)}_getSlotInfo(){const t=!!this._el.querySelector(':scope > [slot="helper"]');const e=!!this._el.querySelector(':scope > [slot="label"]');const r=!!this._el.querySelector(':scope > [slot="header"]');const a=!!this._el.querySelector(':scope > [slot="error"]');const o=t?i("slot",{name:"helper"}):this.helper;const s=e?i("slot",{name:"label"}):this.label;const n=a||this.error&&typeof this.error==="string"&&this.error!=="true";return{hasHelperSlot:t,hasLabelSlot:e,hasHeaderSlot:r,hasErrorSlot:a,helper:o,label:s,errorAndErrorIsNotBoolean:n}}};g.style=m;export{b as p_field,g as p_field_container};
|
|
2
|
-
//# sourceMappingURL=p-3f0837c4.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["fieldComponentCss","PFieldStyle0","field","cva","variants","size","sm","base","disabled","false","true","focused","error","compoundVariants","class","input","prefixAndSuffix","Field","valueChange","inputRefChange","_inputRef","componentDidLoad","this","_checkAutoFocus","render","prefix","suffix","hasHeaderSlot","hasLabelSlot","hasHelperSlot","hasErrorSlot","_getSlotInfo","h","Host","key","forceShowTooltip","_focused","label","helper","required","name","slot","length","icon","iconPosition","onClick","_focusInput","variant","rotate","iconRotate","flip","iconFlip","_getInput","handleFocusIn","_selectAll","handleFocusOut","_el","querySelector","hasPrefixSlot","hasSuffixSlot","errorAndErrorIsNotBoolean","type","props","value","placeholder","onInput","ev","_valueChange","properties","JSON","parse","ref","_setInputRef","emit","focus","focusMethod","selectAllOnFocus","select","target","autofocus","setTimeout","fieldContainerComponentCss","PFieldContainerStyle0","FieldContainer","_defaultOptionalTemplate","formatTranslation","_locales","optional","componentWillLoad","_setLocales","optionalTemplate","Fragment","placement","content","show","enableUserInput","errorPlacement","getLocaleComponentStrings"],"sources":["src/components/molecules/field/field.component.css?tag=p-field&encapsulation=shadow","src/components/molecules/field/field.component.tsx","src/components/molecules/field-container/field-container.component.css?tag=p-field-container&encapsulation=shadow","src/components/molecules/field-container/field-container.component.tsx"],"sourcesContent":[null,"import { Placement } from '@floating-ui/dom';\nimport {\n\tComponent,\n\tElement,\n\tEvent,\n\tEventEmitter,\n\th,\n\tHost,\n\tListen,\n\tProp,\n\tState,\n} from '@stencil/core';\nimport { cva } from 'class-variance-authority';\nimport { HTMLInputTypeAttribute } from 'react';\nimport { RotateOptions } from '../../../types/tailwind';\nimport { IconFlipOptions, IconVariant } from '../../atoms/icon/icon.component';\nimport { templateFunc } from '../field-container/field-container.component';\n\nconst field = cva(\n\t['flex gap-2', 'w-inherit px-2', 'border border-solid rounded-lg'],\n\t{\n\t\tvariants: {\n\t\t\tsize: {\n\t\t\t\tsm: 'h-6',\n\t\t\t\tbase: 'h-8',\n\t\t\t},\n\t\t\tdisabled: {\n\t\t\t\tfalse: 'bg-white',\n\t\t\t\ttrue: 'bg-white-600 cursor-not-allowed',\n\t\t\t},\n\t\t\tfocused: {\n\t\t\t\tfalse: null,\n\t\t\t\ttrue: null,\n\t\t\t},\n\t\t\terror: {\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\tfocused: false,\n\t\t\t\terror: false,\n\t\t\t\tclass: 'border-black-teal-100',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisabled: false,\n\t\t\t\tfocused: true,\n\t\t\t\terror: false,\n\t\t\t\tclass:\n\t\t\t\t\t'border-supportive-lilac-800 ring ring-supportive-lilac-100 selection:bg-supportive-lilac',\n\t\t\t},\n\n\t\t\t{\n\t\t\t\tdisabled: false,\n\t\t\t\terror: true,\n\t\t\t\tclass: 'border-negative-red',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisabled: false,\n\t\t\t\tfocused: true,\n\t\t\t\terror: true,\n\t\t\t\tclass: 'ring ring-negative-red-50 selection:bg-negative-red-50',\n\t\t\t},\n\t\t],\n\t}\n);\n\nconst input = cva(\n\t'text-sm placeholder:text-sm placeholder:text-black-teal-200 text-black-teal border-none outline-none focus:outline-none bg-transparent flex-1 min-w-0 h-full',\n\t{\n\t\tvariants: {\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}\n);\n\nconst prefixAndSuffix = cva(\n\t['flex flex-shrink-0 justify-center items-center text-center'],\n\t{\n\t\tvariants: {\n\t\t\tdisabled: {\n\t\t\t\tfalse: null,\n\t\t\t\ttrue: 'text-black-teal-100',\n\t\t\t},\n\t\t\tfocused: {\n\t\t\t\tfalse: null,\n\t\t\t\ttrue: null,\n\t\t\t},\n\t\t\terror: {\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\tdisabled: false,\n\t\t\t\tfocused: false,\n\t\t\t\terror: false,\n\t\t\t\tclass: 'text-black-teal-300',\n\t\t\t},\n\n\t\t\t{\n\t\t\t\tdisabled: false,\n\t\t\t\tfocused: true,\n\t\t\t\terror: false,\n\t\t\t\tclass: 'text-black-teal-500',\n\t\t\t},\n\n\t\t\t{\n\t\t\t\tdisabled: false,\n\t\t\t\tfocused: false,\n\t\t\t\terror: true,\n\t\t\t\tclass: 'text-negative-red',\n\t\t\t},\n\n\t\t\t{\n\t\t\t\tdisabled: false,\n\t\t\t\tfocused: true,\n\t\t\t\terror: true,\n\t\t\t\tclass: 'text-negative-red-800',\n\t\t\t},\n\t\t],\n\t}\n);\n\n@Component({\n\ttag: 'p-field',\n\tstyleUrl: './field.component.css',\n\tshadow: true,\n})\nexport class Field {\n\t/**\n\t * The size of the input group\n\t */\n\t@Prop() size: 'sm' | 'base' = 'base';\n\n\t/**\n\t * The type of the input group\n\t */\n\t@Prop() type: HTMLInputTypeAttribute | 'textarea' | 'slot' = 'text';\n\n\t/**\n\t * The size of the input group\n\t */\n\t@Prop() properties: any | string = {};\n\n\t/**\n\t * The prefix of the input group\n\t */\n\t@Prop() prefix: string;\n\n\t/**\n\t * The suffix of the input group\n\t */\n\t@Prop() suffix: string;\n\n\t/**\n\t * Icon of the input group\n\t */\n\t@Prop() icon: IconVariant;\n\n\t/**\n\t * Icon flip */\n\t@Prop() iconFlip: IconFlipOptions;\n\n\t/**\n\t * Icon rotate\n\t */\n\t@Prop() iconRotate: RotateOptions;\n\n\t/**\n\t * Icon position\n\t */\n\t@Prop() iconPosition: 'start' | 'end' = 'start';\n\n\t/**\n\t * The value of the input\n\t */\n\t@Prop() value: string;\n\n\t/**\n\t * The label of the input group\n\t */\n\t@Prop() label: string;\n\n\t/**\n\t * The placeholder of the input\n\t */\n\t@Prop() placeholder: string;\n\n\t/**\n\t * The helper of the input group\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 * Wether to autofocus the field\n\t */\n\t@Prop({ reflect: true }) autofocus: boolean = false;\n\n\t/**\n\t * The error to display\n\t */\n\t@Prop({ reflect: true }) error: string;\n\n\t/**\n\t * The placement of the error popover\n\t */\n\t@Prop() errorPlacement: Placement;\n\n\t/**\n\t * Wether the input group is disabled\n\t */\n\t@Prop({ reflect: true }) disabled: boolean = false;\n\n\t/**\n\t * Wether the input group is focused\n\t */\n\t@Prop({ reflect: true }) focused: boolean = false;\n\n\t/**\n\t * Force show the error tooltip\n\t */\n\t@Prop({ reflect: true }) forceShowTooltip: boolean = false;\n\n\t/**\n\t * Wether to select all text on focus\n\t */\n\t@Prop({ reflect: true }) selectAllOnFocus: boolean = true;\n\n\t/**\n\t * The method to use when focusing the input\n\t */\n\t@Prop() focusMethod: 'focus' | 'click' = 'focus';\n\n\t/**\n\t * The template for the optional text\n\t */\n\t@Prop() optionalTemplate: templateFunc;\n\n\t/**\n\t * Event whenever the value changes\n\t */\n\t@Event() valueChange: EventEmitter<string>;\n\n\t/**\n\t * Event whenever the input ref changes\n\t */\n\t@Event() inputRefChange: EventEmitter<HTMLInputElement | HTMLTextAreaElement>;\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\t@State() private _focused = false;\n\n\tprivate _inputRef: HTMLInputElement | HTMLTextAreaElement;\n\n\tcomponentDidLoad() {\n\t\tthis._checkAutoFocus();\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\tprefix,\n\t\t\tsuffix,\n\t\t\thasHeaderSlot,\n\t\t\thasLabelSlot,\n\t\t\thasHelperSlot,\n\t\t\thasErrorSlot,\n\t\t} = this._getSlotInfo();\n\n\t\treturn (\n\t\t\t<Host class='p-field'>\n\t\t\t\t<p-field-container\n\t\t\t\t\tforceShowTooltip={this.forceShowTooltip || this._focused}\n\t\t\t\t\tlabel={this.label}\n\t\t\t\t\thelper={this.helper}\n\t\t\t\t\terror={this.error}\n\t\t\t\t\trequired={this.required}\n\t\t\t\t>\n\t\t\t\t\t{hasLabelSlot && (\n\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\tname='label'\n\t\t\t\t\t\t\tslot='label'\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\n\t\t\t\t\t{hasHeaderSlot && (\n\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\tname='header'\n\t\t\t\t\t\t\tslot='header'\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\n\t\t\t\t\t{hasHelperSlot && (\n\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\tname='helper'\n\t\t\t\t\t\t\tslot='helper'\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\n\t\t\t\t\t{hasErrorSlot && (\n\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\tname='error'\n\t\t\t\t\t\t\tslot='error'\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\n\t\t\t\t\t<div\n\t\t\t\t\t\tclass={field({\n\t\t\t\t\t\t\terror: !!this.error?.length,\n\t\t\t\t\t\t\tdisabled: this.disabled,\n\t\t\t\t\t\t\tfocused: this.focused || this._focused,\n\t\t\t\t\t\t\tsize: this.size,\n\t\t\t\t\t\t})}\n\t\t\t\t\t\tslot='content'\n\t\t\t\t\t>\n\t\t\t\t\t\t{(prefix || (this.icon && this.iconPosition === 'start')) && (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclass={prefixAndSuffix({\n\t\t\t\t\t\t\t\t\terror: !!this.error?.length,\n\t\t\t\t\t\t\t\t\tdisabled: this.disabled,\n\t\t\t\t\t\t\t\t\tfocused: this.focused || this._focused,\n\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\tonClick={() => this._focusInput()}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{this.icon && this.iconPosition === 'start' ? (\n\t\t\t\t\t\t\t\t\t<p-icon\n\t\t\t\t\t\t\t\t\t\tclass='flex'\n\t\t\t\t\t\t\t\t\t\tvariant={this.icon}\n\t\t\t\t\t\t\t\t\t\trotate={this.iconRotate}\n\t\t\t\t\t\t\t\t\t\tflip={this.iconFlip}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\tprefix\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{this._getInput()}\n\n\t\t\t\t\t\t{(suffix || (this.icon && this.iconPosition === 'end')) && (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclass={prefixAndSuffix({\n\t\t\t\t\t\t\t\t\terror: !!this.error?.length,\n\t\t\t\t\t\t\t\t\tdisabled: this.disabled,\n\t\t\t\t\t\t\t\t\tfocused: this.focused || this._focused,\n\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\tonClick={() => this._focusInput()}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{this.icon && this.iconPosition === 'end' ? (\n\t\t\t\t\t\t\t\t\t<p-icon\n\t\t\t\t\t\t\t\t\t\tclass='flex'\n\t\t\t\t\t\t\t\t\t\tvariant={this.icon}\n\t\t\t\t\t\t\t\t\t\trotate={this.iconRotate}\n\t\t\t\t\t\t\t\t\t\tflip={this.iconFlip}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\tsuffix\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t</p-field-container>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t@Listen('focusin')\n\thandleFocusIn() {\n\t\tif (this.disabled) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._focused = true;\n\t\tthis._selectAll();\n\t}\n\n\t@Listen('focusout')\n\thandleFocusOut() {\n\t\tif (this.disabled) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._focused = false;\n\t}\n\n\tprivate _getSlotInfo() {\n\t\tconst hasHelperSlot = !!this._el.querySelector(':scope > [slot=\"helper\"]');\n\t\tconst hasLabelSlot = !!this._el.querySelector(':scope > [slot=\"label\"]');\n\t\tconst hasPrefixSlot = !!this._el.querySelector(':scope > [slot=\"prefix\"]');\n\t\tconst hasSuffixSlot = !!this._el.querySelector(':scope > [slot=\"suffix\"]');\n\t\tconst hasHeaderSlot = !!this._el.querySelector(':scope > [slot=\"header\"]');\n\t\tconst hasErrorSlot = !!this._el.querySelector(':scope > [slot=\"error\"]');\n\n\t\tconst prefix = hasPrefixSlot ? <slot name='prefix' /> : this.prefix;\n\t\tconst suffix = hasSuffixSlot ? <slot name='suffix' /> : this.suffix;\n\n\t\tconst errorAndErrorIsNotBoolean =\n\t\t\tthis.error && typeof this.error === 'string' && this.error !== 'true';\n\n\t\treturn {\n\t\t\thasHelperSlot,\n\t\t\thasLabelSlot,\n\t\t\thasPrefixSlot,\n\t\t\thasSuffixSlot,\n\t\t\thasHeaderSlot,\n\t\t\thasErrorSlot,\n\t\t\tprefix,\n\t\t\tsuffix,\n\t\t\terrorAndErrorIsNotBoolean,\n\t\t};\n\t}\n\n\tprivate _getInput() {\n\t\tif (this.type === 'slot') {\n\t\t\treturn <slot name='input' />;\n\t\t}\n\n\t\tconst props = {\n\t\t\tclass: input({\n\t\t\t\tdisabled: this.disabled,\n\t\t\t}),\n\t\t\tvalue: this.value,\n\t\t\tplaceholder: this.placeholder,\n\t\t\tdisabled: this.disabled,\n\t\t\tonInput: (ev: Event) => this._valueChange(ev),\n\t\t};\n\n\t\tlet properties = this.properties ?? {};\n\t\tif (typeof properties === 'string') {\n\t\t\tproperties = JSON.parse(this.properties);\n\t\t}\n\n\t\tif (this.type === 'textarea') {\n\t\t\t<textarea\n\t\t\t\tref={ref => this._setInputRef(ref)}\n\t\t\t\t{...props}\n\t\t\t\t{...properties}\n\t\t\t/>;\n\t\t}\n\n\t\treturn (\n\t\t\t<input\n\t\t\t\ttype={this.type}\n\t\t\t\tref={ref => this._setInputRef(ref)}\n\t\t\t\t{...props}\n\t\t\t\t{...properties}\n\t\t\t/>\n\t\t);\n\t}\n\n\tprivate _setInputRef(ref: HTMLInputElement | HTMLTextAreaElement) {\n\t\tthis._inputRef = ref;\n\t\tthis.inputRefChange.emit(ref);\n\t}\n\n\tprivate _focusInput() {\n\t\tif (this._inputRef) {\n\t\t\tthis._inputRef.focus();\n\t\t\treturn;\n\t\t}\n\n\t\tconst input = this._el.querySelector(':scope > [slot=\"input\"]');\n\t\t(input as HTMLElement)[this.focusMethod]();\n\t}\n\n\tprivate _selectAll() {\n\t\tif (!this._inputRef || !this.selectAllOnFocus) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._inputRef.select();\n\t}\n\n\tprivate _valueChange(ev) {\n\t\tconst value = (ev.target as HTMLTextAreaElement | HTMLInputElement).value;\n\t\tthis.value = value;\n\t\tthis.valueChange.emit(value);\n\t}\n\n\tprivate _checkAutoFocus() {\n\t\tif (!this.autofocus) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this._inputRef) {\n\t\t\tsetTimeout(() => this._checkAutoFocus(), 100);\n\t\t\treturn;\n\t\t}\n\n\t\tthis._focusInput();\n\t}\n}\n",null,"import {\n\tComponent,\n\tElement,\n\tEventEmitter,\n\th,\n\tHost,\n\tEvent,\n\tProp,\n\tFragment,\n\tState,\n\tListen,\n} from '@stencil/core';\nimport { formatTranslation, getLocaleComponentStrings } from '../../../utils';\nimport { Placement } from '@floating-ui/dom';\n\nexport type templateFunc = () => string;\n\n@Component({\n\ttag: 'p-field-container',\n\tstyleUrl: 'field-container.component.css',\n\tshadow: true,\n})\nexport class FieldContainer {\n\tprivate _defaultOptionalTemplate: templateFunc = () =>\n\t\tformatTranslation(this._locales.optional);\n\n\t/**\n\t * The label of the input group\n\t */\n\t@Prop() label: string | HTMLSlotElement;\n\n\t/**\n\t * The helper of the input group\n\t */\n\t@Prop() helper: string | HTMLSlotElement;\n\n\t/**\n\t * Wether the field is required\n\t */\n\t@Prop({ reflect: true }) required: boolean;\n\n\t/**\n\t * The helper of the input group\n\t */\n\t@Prop({ reflect: true }) error: string | HTMLSlotElement;\n\n\t/**\n\t * The placement of the error popover\n\t */\n\t@Prop() errorPlacement: Placement;\n\n\t/**\n\t * Force show the error tooltip\n\t */\n\t@Prop({ reflect: true }) forceShowTooltip: boolean = false;\n\n\t/**\n\t * The template for the optional text\n\t */\n\t@Prop() optionalTemplate: templateFunc = this._defaultOptionalTemplate;\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\t@Event() focus: EventEmitter<void>;\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\tconst {\n\t\t\thasHeaderSlot,\n\t\t\thasErrorSlot,\n\t\t\thelper,\n\t\t\tlabel,\n\t\t\terrorAndErrorIsNotBoolean,\n\t\t} = this._getSlotInfo();\n\n\t\treturn (\n\t\t\t<Host class='p-field-container'>\n\t\t\t\t<div class='flex w-inherit flex-col gap-1'>\n\t\t\t\t\t<div class='flex items-end justify-between gap-1'>\n\t\t\t\t\t\t{label && (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclass='text-xs font-medium text-black-teal-300'\n\t\t\t\t\t\t\t\tonClick={() => this.focus.emit()}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{label}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{(!this.required || helper || hasHeaderSlot) && (\n\t\t\t\t\t\t\t<div class='flex items-center gap-1'>\n\t\t\t\t\t\t\t\t{!this.required && (\n\t\t\t\t\t\t\t\t\t<span class='text-xs font-medium text-black-teal-200'>\n\t\t\t\t\t\t\t\t\t\t{this.optionalTemplate()}\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t{(helper || hasHeaderSlot) && (\n\t\t\t\t\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t\t\t\t\t{hasHeaderSlot && <slot name='header' />}\n\t\t\t\t\t\t\t\t\t\t{helper && (\n\t\t\t\t\t\t\t\t\t\t\t<p-helper\n\t\t\t\t\t\t\t\t\t\t\t\tclass={`flex ${hasHeaderSlot ? 'ml-2' : ''}`}\n\t\t\t\t\t\t\t\t\t\t\t\tplacement='top-end'\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t{helper}\n\t\t\t\t\t\t\t\t\t\t\t</p-helper>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t</Fragment>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t\t<p-tooltip\n\t\t\t\t\t\tclass='w-full'\n\t\t\t\t\t\tvariant='error'\n\t\t\t\t\t\tcontent={this.error}\n\t\t\t\t\t\tshow={errorAndErrorIsNotBoolean && this.forceShowTooltip}\n\t\t\t\t\t\tenableUserInput={false}\n\t\t\t\t\t\tplacement={this.errorPlacement}\n\t\t\t\t\t>\n\t\t\t\t\t\t{hasErrorSlot && (\n\t\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\t\tname='error'\n\t\t\t\t\t\t\t\tslot='content'\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\tname='content'\n\t\t\t\t\t\t\tslot='trigger'\n\t\t\t\t\t\t/>\n\t\t\t\t\t</p-tooltip>\n\t\t\t\t</div>\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 _getSlotInfo() {\n\t\tconst hasHelperSlot = !!this._el.querySelector(':scope > [slot=\"helper\"]');\n\t\tconst hasLabelSlot = !!this._el.querySelector(':scope > [slot=\"label\"]');\n\t\tconst hasHeaderSlot = !!this._el.querySelector(':scope > [slot=\"header\"]');\n\t\tconst hasErrorSlot = !!this._el.querySelector(':scope > [slot=\"error\"]');\n\n\t\tconst helper = hasHelperSlot ? <slot name='helper' /> : this.helper;\n\t\tconst label = hasLabelSlot ? <slot name='label' /> : this.label;\n\n\t\tconst errorAndErrorIsNotBoolean =\n\t\t\thasErrorSlot ||\n\t\t\t(this.error && typeof this.error === 'string' && this.error !== 'true');\n\n\t\treturn {\n\t\t\thasHelperSlot,\n\t\t\thasLabelSlot,\n\t\t\thasHeaderSlot,\n\t\t\thasErrorSlot,\n\t\t\thelper,\n\t\t\tlabel,\n\t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