letalkui 0.0.32 → 0.0.33
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/dist/chunk-X25G3LWC.mjs +1 -0
- package/dist/chunk-X25G3LWC.mjs.map +1 -0
- package/dist/components/index.d.mts +15 -3
- package/dist/components/index.d.ts +15 -3
- package/dist/components/index.js +1 -1
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +1 -1
- package/dist/components/index.mjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-F7LWUCTF.mjs +0 -1
- package/dist/chunk-F7LWUCTF.mjs.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function r(r,e,t){if(e in r){Object.defineProperty(r,e,{value:t,enumerable:true,configurable:true,writable:true})}else{r[e]=t}return r}function e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};var o=Object.keys(n);if(typeof Object.getOwnPropertySymbols==="function"){o=o.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))}o.forEach(function(t){r(e,t,n[t])})}return e}function t(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);if(e){n=n.filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})}t.push.apply(t,n)}return t}function n(r,e){e=e!=null?e:{};if(Object.getOwnPropertyDescriptors){Object.defineProperties(r,Object.getOwnPropertyDescriptors(e))}else{t(Object(e)).forEach(function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(e,t))})}return r}function o(r,e){if(r==null)return{};var t=i(r,e);var n,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(r);for(o=0;o<a.length;o++){n=a[o];if(e.indexOf(n)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(r,n))continue;t[n]=r[n]}}return t}function i(r,e){if(r==null)return{};var t={};var n=Object.keys(r);var o,i;for(i=0;i<n.length;i++){o=n[i];if(e.indexOf(o)>=0)continue;t[o]=r[o]}return t}import{b as a}from"./chunk-BAWN5SAB.mjs";import{b as l,d as s,e as c,f as u,g as d,i as p,j as m,k as b}from"./chunk-BPQFVMOU.mjs";import{a as f,b as g}from"./chunk-2BRJQ4L5.mjs";import{a as h}from"./chunk-XGNCZ3TH.mjs";import{jsxs as x}from"react/jsx-runtime";var v=function(r){var e=r.value.length,t=e>r.maxLength;return x(a.Body,{type:"small2",color:t?g.getTextErrorColor():g.getDisabledColor(),children:[e," / ",r.maxLength]})};import{jsx as y}from"react/jsx-runtime";var j=function(r){var e=r.errorText;return e?y(p,{container:!0,children:y(a.Body,{type:"small2",color:g.getTextErrorColor(),children:e})}):null};var O=h(function(){return{chip:{backgroundColor:g.colors.info[100],borderRadius:"0.5rem",width:"4.5rem",height:"1.5rem"}}}),C=O;import{jsx as w,jsxs as P}from"react/jsx-runtime";var k=function(r){var e=r.label,t=r.subLabel,n=r.isOptional;var o=C();return e?P(p,{container:!0,spacing:.5,children:[w(p,{size:12,children:P(p,{container:!0,alignItems:"center",spacing:1,children:[w(p,{children:w(a.Body,{type:"small1",fontWeight:"bold",color:g.getTextColor(),children:e})}),n&&w(p,{children:w(s,{label:w(a.Body,{type:"smaller2",fontWeight:"regular",color:g.getTextColor(),children:"Opcional"}),sx:o.chip})})]})}),t&&w(p,{size:12,children:w(a.Body,{type:"small2",fontWeight:"regular",color:g.colors.system.gray[400],children:t})})]}):null};import T from"react";import{jsx as I}from"react/jsx-runtime";var L=T.forwardRef(function(r,t){var i=r.InputProps,a=r.inputProps,l=r.showInputUnderline,s=o(r,["InputProps","inputProps","showInputUnderline"]);return I(m,e(n(e({},s),{inputRef:t,inputProps:a,disableUnderline:!l}),i))});L.displayName="PrimitiveInput";var E=h(function(){return{input:{display:"flex",alignItems:"center",padding:"0 0.75rem",color:g.getTextColor(),border:"1px solid ".concat(g.colors.system.gray[200]),borderRadius:"0.25rem",gap:"0.5rem",width:"100%",minHeight:"3.25rem","&:hover":{borderColor:g.colors.system.gray[500]},"&.Mui-disabled":{color:g.colors.system.gray[200],backgroundColor:g.colors.system.gray[100],border:"none"},"&.Mui-focused":{borderColor:g.getPrimaryColor(),backgroundColor:g.colors.bot.activeCampaign[100]},fontSize:f.size.small2,fontWeight:f.fontWeight.medium},inputError:{border:"1px solid ".concat(g.getTextErrorColor()),borderRadius:"0.25rem",gap:"0.5rem",padding:"1rem"},chip:{backgroundColor:g.colors.info[100],borderRadius:"0.5rem",width:"4.5rem",height:"1.375rem"}}}),B=E;import{jsx as A,jsxs as S}from"react/jsx-runtime";var z=function(r){var t=r.errorText,i=r.multiline,a=r.characterCount,l=r.endAdornment,s=r.sx,c=o(r,["errorText","multiline","characterCount","endAdornment","sx"]);var d=B(),p=!!t,m=!!a;var b;return S(u,{position:"relative",width:"100%",children:[A(L,n(e({},c),{multiline:i,endAdornment:l,sx:e({},d.input,p?d.inputError:{},i&&{alignItems:"flex-start",paddingTop:"0.75rem",paddingBottom:"0.75rem"},m&&{paddingBottom:"2rem"},s)})),m&&A(u,{position:"absolute",bottom:10,right:12,sx:{pointerEvents:"none"},children:A(v,{value:(b=c.value)!==null&&b!==void 0?b:"",maxLength:a.maxLength})})]})};var W={CharacterCount:v,ErrorText:j,Label:k,Field:z};import{jsx as F,jsxs as R}from"react/jsx-runtime";var D=function(r){var t=r.label,i=r.subLabel,a=r.errorText,l=r.isOptional,s=r.id,c=r.characterCount,u=o(r,["label","subLabel","errorText","isOptional","id","characterCount"]);return R(p,{container:!0,direction:"column",spacing:2,width:"100%",children:[F(W.Label,{label:t,subLabel:i,isOptional:l}),R(p,{container:!0,direction:"column",spacing:1,width:"100%",children:[F(W.Field,n(e({},u),{showInputUnderline:!1,errorText:a,characterCount:c})),F(W.ErrorText,{errorText:a})]})]},s)};import{jsx as M}from"react/jsx-runtime";var U=function(r){var t=r.children,i=o(r,["children"]);return M(d,n(e({},i),{children:t}))};var H=h(function(){return{card:{flex:1,position:"relative",background:g.colors.base.white,borderRadius:"0.5rem",transition:"all 225ms cubic-bezier(0.4, 0.6, 1)"},scrollBar:{"&::-webkit-scrollbar":{width:"0.375rem !important"},"&::-webkit-scrollbar-thumb":{backgroundColor:g.colors.system.gray[200]},"&::-webkit-scrollbar-track":{background:g.colors.system.gray[900]}}}}),V=H;import{jsx as q}from"react/jsx-runtime";var N=function(r){var t=r.children,i=r.sx,a=o(r,["children","sx"]);var l=V();return q(U,n(e({},a),{sx:e({},l.card,i),children:t}))};import{Fragment as Q,jsx as G}from"react/jsx-runtime";var J=function(r){var e=r.isLoading,t=r.skeleton,n=r.children;return e?G(Q,{children:t}):G(Q,{children:n})};import{Fragment as X,jsx as Z}from"react/jsx-runtime";var K=function(r){var e=r.isLoading,t=r.children;return e?Z(p,{container:!0,justifyContent:"center",alignItems:"center",sx:{height:"100%"},children:Z(l,{color:"secondary"})}):Z(X,{children:t})};var Y={FallbackProvidedSkeleton:J,FallbackSpinner:K};import{jsx as $}from"react/jsx-runtime";function _(r){var t=r.options,n=r.value,i=r.onChange,a=r.disabled,l=a===void 0?!1:a,s=r.fullWidth,u=s===void 0?!1:s,d=r.renderInput,p=r.renderOption,m=r.sx,b=r.size,f=r.multiple,g=r.getOptionLabel,h=r.isOptionEqualToValue,x=r.loadingText,v=o(r,["options","value","onChange","disabled","fullWidth","renderInput","renderOption","sx","size","multiple","getOptionLabel","isOptionEqualToValue","loadingText"]);return $(c,e({options:t,value:n,onChange:i,disabled:l,fullWidth:u,renderInput:d,renderOption:p,sx:m,size:b,multiple:f,getOptionLabel:g!==null&&g!==void 0?g:function(r){var e;return r?(e=r===null||r===void 0?void 0:r.label)!==null&&e!==void 0?e:"":""},isOptionEqualToValue:h!==null&&h!==void 0?h:function(r,e){var t=r,n=e;return(t===null||t===void 0?void 0:t.label)===(n===null||n===void 0?void 0:n.label)},loadingText:x},v))}var rr=h(function(){return{selectInternIcons:{"& .MuiAutocomplete-endAdornment":{right:16},"& .MuiAutocomplete-popupIndicator":{color:g.colors.system.gray[800]}},selectLoading:{display:"flex",justifyContent:"center",alignItems:"center",padding:2}}}),re=rr;import{Fragment as rt,jsx as rn}from"react/jsx-runtime";var ro=function(r){var t=r.label,i=r.subLabel,a=r.isOptional,s=r.placeholder,c=r.startAdornment,d=r.isLoading,p=o(r,["label","subLabel","isOptional","placeholder","startAdornment","isLoading"]);var m=re(),f=function(){return rn(u,{sx:m.selectLoading,children:rn(l,{size:24})})};return rn(_,n(e({},p),{sx:m.selectInternIcons,loading:d,renderInput:function(r){return rn(D,n(e({},r),{label:t,isOptional:a,subLabel:i,type:"text",placeholder:s,InputProps:n(e({},r.InputProps),{startAdornment:rn(rt,{children:rn(b,{position:"start",children:c})})})}))},loadingText:f()}))};export{W as a,D as b,N as c,Y as d,ro as e};//# sourceMappingURL=chunk-X25G3LWC.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/letalk-ui/letalk-ui/dist/chunk-X25G3LWC.mjs","../src/components/Input/CharacterCount/index.tsx","../src/components/Input/ErrorText/index.tsx","../src/components/Input/Label/styles.tsx","../src/components/Input/Label/index.tsx","../src/primitives/PrimitiveInput/index.tsx","../src/components/Input/Field/styles.tsx","../src/components/Input/Field/index.tsx","../src/components/Input/index.tsx","../src/components/TextField/index.tsx","../src/primitives/PrimitiveCard/index.tsx","../src/components/Portlet/styles.tsx","../src/components/Portlet/index.tsx","../src/components/Loading/FallbackProvidedSkeleton/index.tsx","../src/components/Loading/FallbackSpinner/index.tsx","../src/components/Loading/index.ts","../src/primitives/PrimitiveSelect/index.tsx","../src/components/SelectField/styles.tsx","../src/components/SelectField/index.tsx"],"names":["b","m","h","d","k","e","v","f","g","R","i","j","L","A","a","C","jsxs","CharacterCount","props","currentLength","value","length","isOverLimit","maxLength","Text","Body","type","color","themeColors","getTextErrorColor","getDisabledColor","children","jsx","ErrorText","errorText","Grid2_default","container","useStyles","makeStyles","chip","backgroundColor","colors","info","borderRadius","width","height","styles_default","Label","label","subLabel","isOptional","classes","spacing","size","alignItems","fontWeight","getTextColor","Chip_default","sx","system","gray","React","PrimitiveInput","forwardRef","ref","InputProps","inputProps","showInputUnderline","rest","Input_default","inputRef","disableUnderline","displayName","input","display","padding","border","gap","minHeight","borderColor","getPrimaryColor","bot","activeCampaign","fontSize","FONT","small2","medium","inputError","Field","multiline","characterCount","endAdornment","showError","showCounter","Box_default","position","paddingTop","paddingBottom","bottom","right","pointerEvents","Input","TextField","id","direction","PrimitiveCard","Card_default","card","flex","background","base","white","transition","scrollBar","Portlet","Fragment","FallbackProvidedSkeleton","isLoading","skeleton","FallbackSpinner","justifyContent","CircularProgress_default","Loading","PrimitiveSelect","options","onChange","disabled","fullWidth","renderInput","renderOption","multiple","getOptionLabel","isOptionEqualToValue","loadingText","Autocomplete_default","option","defaultOption","defaultValue","selectInternIcons","selectLoading","SelectField","placeholder","startAdornment","customLoading","loading","params","InputAdornment_default","y","H","be","c","ke","He"],"mappings":"s0CAAA,OAAOA,KAAKC,CAAC,KAAK,sBAAuB,QAAOD,KAAKE,CAAC,CAACC,KAAKC,CAAC,CAACC,KAAKC,CAAC,CAACC,KAAKC,CAAC,CAACA,KAAKC,CAAC,CAACC,KAAAA,CAAC,CAACC,KAAKC,CAAC,CAACR,KAAKS,CAAC,KAAK,sBAAuB,QAAOC,KAAKC,CAAC,CAACf,KAAKK,CAAC,KAAK,sBAAuB,QAAOS,KAAAA,CAAC,KAAK,sBCYzL,QAAAE,QAAAA,CAAAA,KAAA,mBALK,CAAA,IAAMC,EAAkBC,SAAAA,GAC9B,IAAMC,EAAgBD,EAAME,KAAA,CAAMC,MAAA,CAC5BC,EAAcH,EAAgBD,EAAMK,SAAA,CAE1C,OACCP,EAACQ,EAAKC,IAAA,CAAL,CACAC,KAAK,SACLC,MACCL,EACGM,EAAYC,iBAAA,GACZD,EAAYE,gBAAA,GAGfC,S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A,UACbjH,GAACsE,EAAA,OACI2C,IACJjG,MAAOA,EACPE,WAAYA,EACZD,SAAUA,EACVvB,KAAK,OACLmH,YAAaA,EACb5E,WAAY,OACRgF,EAAOhF,UAAA,GACV6E,eACC9G,GAAAmF,GAAA,CACCpF,SAAAC,GAACkH,EAAA,CAAenD,SAAS,QACvBhE,SAAA+G,CAAAA,EACF,SAMLT,YAAaU,MAEf,SAAAI,KAAArI,CAAA,CAAAsI,KAAApJ,CAAA,CAAAqJ,KAAAC,CAAA,CAAAC,KAAApJ,CAAA,CAAAqJ,MAAAnJ,CAAA","sourcesContent":["import{b as m}from\"./chunk-BAWN5SAB.mjs\";import{b as h,d as k,e as v,f as g,g as R,i,j as L,k as A}from\"./chunk-BPQFVMOU.mjs\";import{a as C,b as e}from\"./chunk-2BRJQ4L5.mjs\";import{a}from\"./chunk-XGNCZ3TH.mjs\";import{jsxs as eo}from\"react/jsx-runtime\";var P=o=>{let r=o.value.length,t=r>o.maxLength;return eo(m.Body,{type:\"small2\",color:t?e.getTextErrorColor():e.getDisabledColor(),children:[r,\" / \",o.maxLength]})};import{jsx as B}from\"react/jsx-runtime\";var w=({errorText:o})=>o?B(i,{container:!0,children:B(m.Body,{type:\"small2\",color:e.getTextErrorColor(),children:o})}):null;var ro=a(()=>({chip:{backgroundColor:e.colors.info[100],borderRadius:\"0.5rem\",width:\"4.5rem\",height:\"1.5rem\"}})),E=ro;import{jsx as d,jsxs as M}from\"react/jsx-runtime\";var O=({label:o,subLabel:r,isOptional:t})=>{let l=E();return o?M(i,{container:!0,spacing:.5,children:[d(i,{size:12,children:M(i,{container:!0,alignItems:\"center\",spacing:1,children:[d(i,{children:d(m.Body,{type:\"small1\",fontWeight:\"bold\",color:e.getTextColor(),children:o})}),t&&d(i,{children:d(k,{label:d(m.Body,{type:\"smaller2\",fontWeight:\"regular\",color:e.getTextColor(),children:\"Opcional\"}),sx:l.chip})})]})}),r&&d(i,{size:12,children:d(m.Body,{type:\"small2\",fontWeight:\"regular\",color:e.colors.system.gray[400],children:r})})]}):null};import to from\"react\";import{jsx as io}from\"react/jsx-runtime\";var T=to.forwardRef(({InputProps:o,inputProps:r,showInputUnderline:t,...l},n)=>io(L,{...l,inputRef:n,inputProps:r,disableUnderline:!t,...o}));T.displayName=\"PrimitiveInput\";var lo=a(()=>({input:{display:\"flex\",alignItems:\"center\",padding:\"0 0.75rem\",color:e.getTextColor(),border:`1px solid ${e.colors.system.gray[200]}`,borderRadius:\"0.25rem\",gap:\"0.5rem\",width:\"100%\",minHeight:\"3.25rem\",\"&:hover\":{borderColor:e.colors.system.gray[500]},\"&.Mui-disabled\":{color:e.colors.system.gray[200],backgroundColor:e.colors.system.gray[100],border:\"none\"},\"&.Mui-focused\":{borderColor:e.getPrimaryColor(),backgroundColor:e.colors.bot.activeCampaign[100]},fontSize:C.size.small2,fontWeight:C.fontWeight.medium},inputError:{border:`1px solid ${e.getTextErrorColor()}`,borderRadius:\"0.25rem\",gap:\"0.5rem\",padding:\"1rem\"},chip:{backgroundColor:e.colors.info[100],borderRadius:\"0.5rem\",width:\"4.5rem\",height:\"1.375rem\"}})),G=lo;import{jsx as I,jsxs as no}from\"react/jsx-runtime\";var W=({errorText:o,multiline:r,characterCount:t,endAdornment:l,sx:n,...p})=>{let s=G(),c=!!o,u=!!t;return no(g,{position:\"relative\",width:\"100%\",children:[I(T,{...p,multiline:r,endAdornment:l,sx:{...s.input,...c?s.inputError:{},...r&&{alignItems:\"flex-start\",paddingTop:\"0.75rem\",paddingBottom:\"0.75rem\"},...u&&{paddingBottom:\"2rem\"},...n}}),u&&I(g,{position:\"absolute\",bottom:10,right:12,sx:{pointerEvents:\"none\"},children:I(P,{value:p.value??\"\",maxLength:t.maxLength})})]})};var y={CharacterCount:P,ErrorText:w,Label:O,Field:W};import{jsx as S,jsxs as z}from\"react/jsx-runtime\";var H=({label:o,subLabel:r,errorText:t,isOptional:l,id:n,characterCount:p,...s})=>z(i,{container:!0,direction:\"column\",spacing:2,width:\"100%\",children:[S(y.Label,{label:o,subLabel:r,isOptional:l}),z(i,{container:!0,direction:\"column\",spacing:1,width:\"100%\",children:[S(y.Field,{...s,showInputUnderline:!1,errorText:t,characterCount:p}),S(y.ErrorText,{errorText:t})]})]},n);import{jsx as po}from\"react/jsx-runtime\";var N=({children:o,...r})=>po(R,{...r,children:o});var so=a(()=>({card:{flex:1,position:\"relative\",background:e.colors.base.white,borderRadius:\"0.5rem\",transition:\"all 225ms cubic-bezier(0.4, 0.6, 1)\"},scrollBar:{\"&::-webkit-scrollbar\":{width:\"0.375rem !important\"},\"&::-webkit-scrollbar-thumb\":{backgroundColor:e.colors.system.gray[200]},\"&::-webkit-scrollbar-track\":{background:e.colors.system.gray[900]}}})),V=so;import{jsx as ao}from\"react/jsx-runtime\";var be=({children:o,sx:r,...t})=>{let l=V();return ao(N,{...t,sx:{...l.card,...r},children:o})};import{Fragment as D,jsx as q}from\"react/jsx-runtime\";var U=({isLoading:o,skeleton:r,children:t})=>o?q(D,{children:r}):q(D,{children:t});import{Fragment as mo,jsx as F}from\"react/jsx-runtime\";var $=({isLoading:o,children:r})=>o?F(i,{container:!0,justifyContent:\"center\",alignItems:\"center\",sx:{height:\"100%\"},children:F(h,{color:\"secondary\"})}):F(mo,{children:r});var ke={FallbackProvidedSkeleton:U,FallbackSpinner:$};import{jsx as co}from\"react/jsx-runtime\";function J({options:o,value:r,onChange:t,disabled:l=!1,fullWidth:n=!1,renderInput:p,renderOption:s,sx:c,size:u,multiple:b,getOptionLabel:Q,isOptionEqualToValue:X,loadingText:Y,...Z}){return co(v,{options:o,value:r,onChange:t,disabled:l,fullWidth:n,renderInput:p,renderOption:s,sx:c,size:u,multiple:b,getOptionLabel:Q??(x=>x?x?.label??\"\":\"\"),isOptionEqualToValue:X??((x,_)=>{let j=x,oo=_;return j?.label===oo?.label}),loadingText:Y,...Z})}var uo=a(()=>({selectInternIcons:{\"& .MuiAutocomplete-endAdornment\":{right:16},\"& .MuiAutocomplete-popupIndicator\":{color:e.colors.system.gray[800]}},selectLoading:{display:\"flex\",justifyContent:\"center\",alignItems:\"center\",padding:2}})),K=uo;import{Fragment as fo,jsx as f}from\"react/jsx-runtime\";var He=({label:o,subLabel:r,isOptional:t,placeholder:l,startAdornment:n,isLoading:p,...s})=>{let c=K(),u=()=>f(g,{sx:c.selectLoading,children:f(h,{size:24})});return f(J,{...s,sx:c.selectInternIcons,loading:p,renderInput:b=>f(H,{...b,label:o,isOptional:t,subLabel:r,type:\"text\",placeholder:l,InputProps:{...b.InputProps,startAdornment:f(fo,{children:f(A,{position:\"start\",children:n})})}}),loadingText:u()})};export{y as a,H as b,be as c,ke as d,He as e};\n","import React from \"react\"\nimport { Text } from \"@/components/Text\"\n\nimport { themeColors } from \"@/styles\"\n\nimport { InputCharacterCountProps } from \"@/components/Input/protocols\"\n\nexport const CharacterCount = (props: InputCharacterCountProps) => {\n\tconst currentLength = props.value.length\n\tconst isOverLimit = currentLength > props.maxLength\n\n\treturn (\n\t\t<Text.Body\n\t\t\ttype=\"small2\"\n\t\t\tcolor={\n\t\t\t\tisOverLimit\n\t\t\t\t\t? themeColors.getTextErrorColor()\n\t\t\t\t\t: themeColors.getDisabledColor()\n\t\t\t}\n\t\t>\n\t\t\t{currentLength} / {props.maxLength}\n\t\t</Text.Body>\n\t)\n}\n","import React from \"react\"\nimport { Grid2 } from \"@mui/material\"\nimport { Text } from \"@/components/Text\"\n\nimport { themeColors } from \"@/styles\"\n\nimport { InputErrorTextProps } from \"@/components/Input/protocols\"\n\nexport const ErrorText = ({\n\terrorText\n}: InputErrorTextProps) => {\n\tif (!errorText) {\n\t\treturn null\n\t}\n\n\treturn (\n\t\t<Grid2 container>\n\t\t\t<Text.Body type=\"small2\" color={themeColors.getTextErrorColor()}>\n\t\t\t\t{errorText}\n\t\t\t</Text.Body>\n\t\t</Grid2>\n\t)\n}\n","import { themeColors } from \"@/styles\"\nimport { makeStyles } from \"@/utils/makeStyles\"\n\nconst useStyles = makeStyles(() => ({\n\tchip: {\n\t\tbackgroundColor: themeColors.colors.info[100],\n\t\tborderRadius: \"0.5rem\",\n\t\twidth: \"4.5rem\",\n\t\theight: \"1.5rem\"\n\t}\n}))\n\nexport default useStyles","import React from \"react\"\nimport { Chip, Grid2 } from \"@mui/material\"\n\nimport { Text } from \"@/components/Text\"\nimport { InputLabelProps } from \"@/components/Input/protocols\"\n\nimport useStyles from \"@/components/Input/Label/styles\"\nimport { themeColors } from \"@/styles\"\n\nexport const Label = ({\n\tlabel,\n\tsubLabel,\n\tisOptional\n}: InputLabelProps) => {\n\tconst classes = useStyles()\n\n\tif (!label) {\n\t\treturn null\n\t}\n\n\treturn (\n\t\t<Grid2 container spacing={0.5}>\n\t\t\t<Grid2 size={12}>\n\t\t\t\t<Grid2 container alignItems=\"center\" spacing={1}>\n\t\t\t\t\t<Grid2>\n\t\t\t\t\t\t<Text.Body\n\t\t\t\t\t\t\ttype=\"small1\"\n\t\t\t\t\t\t\tfontWeight=\"bold\"\n\t\t\t\t\t\t\tcolor={themeColors.getTextColor()}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{label}\n\t\t\t\t\t\t</Text.Body>\n\t\t\t\t\t</Grid2>\n\t\t\t\t\t{isOptional && (\n\t\t\t\t\t\t<Grid2>\n\t\t\t\t\t\t\t<Chip\n\t\t\t\t\t\t\t\tlabel={(\n\t\t\t\t\t\t\t\t\t<Text.Body\n\t\t\t\t\t\t\t\t\t\ttype=\"smaller2\"\n\t\t\t\t\t\t\t\t\t\tfontWeight=\"regular\"\n\t\t\t\t\t\t\t\t\t\tcolor={themeColors.getTextColor()}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\tOpcional\n\t\t\t\t\t\t\t\t\t</Text.Body>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\tsx={classes.chip}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</Grid2>\n\t\t\t\t\t)}\n\t\t\t\t</Grid2>\n\t\t\t</Grid2>\n\t\t\t{subLabel && (\n\t\t\t\t<Grid2 size={12}>\n\t\t\t\t\t<Text.Body\n\t\t\t\t\t\ttype=\"small2\"\n\t\t\t\t\t\tfontWeight=\"regular\"\n\t\t\t\t\t\tcolor={themeColors.colors.system.gray[400]}\n\t\t\t\t\t>\n\t\t\t\t\t\t{subLabel}\n\t\t\t\t\t</Text.Body>\n\t\t\t\t</Grid2>\n\t\t\t)}\n\t\t</Grid2>\n\t)\n}","import React, { ReactNode } from \"react\"\nimport { Input, InputProps as MuiInputProps } from \"@mui/material\"\nimport { StyleProperties } from \"@/utils\"\n\nexport type PrimitiveInputProps = {\n\tplaceholder?: string\n\tdisabled?: boolean\n\tfullWidth?: boolean\n\tname?: string\n\tonChange?: (props: React.ChangeEvent<HTMLTextAreaElement | HTMLInputElement>) => Promise<void> | void\n\ttype: \"text\" | \"button\" | \"password\" | \"radio\" | \"number\" | \"file\" | \"checkbox\" | \"email\"\n\tvalue?: string\n\treadonly?: boolean\n\tsx?: StyleProperties\n\tshowInputUnderline?: boolean\n\tstartAdornment?: ReactNode\n\tendAdornment?: ReactNode\n\tclassName?: string\n\tinputProps?: React.InputHTMLAttributes<HTMLInputElement>\n\tInputProps?: Partial<Omit<MuiInputProps, \"type\"> & {\n\t\tinputProps?: React.InputHTMLAttributes<HTMLInputElement>\n\t}>\n\tid?: string\n\tsize?: \"small\"\n\tminRows?: number\n\tmultiline?: boolean\n}\n\nexport const PrimitiveInput = React.forwardRef<HTMLInputElement, PrimitiveInputProps>(\n\t({ InputProps, inputProps, showInputUnderline, ...rest }, ref) => {\n\t\treturn (\n\t\t\t<Input\n\t\t\t\t{...rest}\n\t\t\t\tinputRef={ref}\n\t\t\t\tinputProps={inputProps}\n\t\t\t\tdisableUnderline={!showInputUnderline}\n\t\t\t\t{...InputProps}\n\t\t\t/>\n\t\t)\n\t}\n)\n\nPrimitiveInput.displayName = \"PrimitiveInput\"","import { themeColors } from \"@/styles\"\nimport { FONT } from \"@/styles/fonts\"\nimport { makeStyles } from \"@/utils\"\n\nconst useStyles = makeStyles(() => ({\n\tinput: {\n\t\tdisplay: \"flex\",\n\t\talignItems: \"center\",\n\t\tpadding: \"0 0.75rem\",\n\t\tcolor: themeColors.getTextColor(),\n\t\tborder: `1px solid ${themeColors.colors.system.gray[200]}`,\n\t\tborderRadius: \"0.25rem\",\n\t\tgap: \"0.5rem\",\n\t\twidth: \"100%\",\n\t\tminHeight: \"3.25rem\",\n\t\t\"&:hover\": {\n\t\t\tborderColor: themeColors.colors.system.gray[500]\n\t\t},\n\t\t\"&.Mui-disabled\": {\n\t\t\tcolor: themeColors.colors.system.gray[200],\n\t\t\tbackgroundColor: themeColors.colors.system.gray[100],\n\t\t\tborder: \"none\"\n\t\t},\n\t\t\"&.Mui-focused\": {\n\t\t\tborderColor: themeColors.getPrimaryColor(),\n\t\t\tbackgroundColor: themeColors.colors.bot.activeCampaign[100]\n\t\t},\n\t\tfontSize: FONT.size.small2,\n\t\tfontWeight: FONT.fontWeight.medium\n\t},\n\tinputError: {\n\t\tborder: `1px solid ${themeColors.getTextErrorColor()}`,\n\t\tborderRadius: \"0.25rem\",\n\t\tgap: \"0.5rem\",\n\t\tpadding: \"1rem\"\n\t},\n\tchip: {\n\t\tbackgroundColor: themeColors.colors.info[100],\n\t\tborderRadius: \"0.5rem\",\n\t\twidth: \"4.5rem\",\n\t\theight: \"1.375rem\"\n\t}\n}))\n\nexport default useStyles\n","import React from \"react\"\nimport { Box } from \"@mui/material\"\n\nimport { PrimitiveInput } from \"@/primitives/PrimitiveInput\"\nimport { CharacterCount } from \"@/components/Input/CharacterCount\"\nimport { InputFieldProps } from \"@/components/Input/protocols\"\n\nimport useStyles from \"@/components/Input/Field/styles\"\n\nexport const Field = ({\n\terrorText,\n\tmultiline,\n\tcharacterCount,\n\tendAdornment,\n\tsx,\n\t...props\n}: InputFieldProps) => {\n\tconst classes = useStyles()\n\n\tconst showError = Boolean(errorText)\n\tconst showCounter = Boolean(characterCount)\n\n\treturn (\n\t\t<Box position=\"relative\" width=\"100%\">\n\t\t\t<PrimitiveInput\n\t\t\t\t{...props}\n\t\t\t\tmultiline={multiline}\n\t\t\t\tendAdornment={endAdornment}\n\t\t\t\tsx={{\n\t\t\t\t\t...classes.input,\n\t\t\t\t\t...(showError ? classes.inputError : {}),\n\t\t\t\t\t...(multiline && {\n\t\t\t\t\t\talignItems: \"flex-start\",\n\t\t\t\t\t\tpaddingTop: \"0.75rem\",\n\t\t\t\t\t\tpaddingBottom: \"0.75rem\"\n\t\t\t\t\t}),\n\t\t\t\t\t...(showCounter && {\n\t\t\t\t\t\tpaddingBottom: \"2rem\"\n\t\t\t\t\t}),\n\t\t\t\t\t...sx\n\t\t\t\t}}\n\t\t\t/>\n\t\t\t{showCounter && (\n\t\t\t\t<Box\n\t\t\t\t\tposition=\"absolute\"\n\t\t\t\t\tbottom={10}\n\t\t\t\t\tright={12}\n\t\t\t\t\tsx={{ pointerEvents: \"none\" }}\n\t\t\t\t>\n\t\t\t\t\t<CharacterCount value={props.value ?? \"\"} maxLength={characterCount!.maxLength} />\n\t\t\t\t</Box>\n\t\t\t)}\n\t\t</Box>\n\t)\n}\n","import { CharacterCount } from \"@/components/Input/CharacterCount\"\nimport { ErrorText } from \"@/components/Input/ErrorText\"\nimport { Label } from \"@/components/Input/Label\"\nimport { Field } from \"@/components/Input/Field\"\n\nexport const Input = {\n\tCharacterCount,\n\tErrorText,\n\tLabel,\n\tField\n}","import React from \"react\"\nimport { Grid2 } from \"@mui/material\"\n\nimport { TextFieldProps } from \"@/components/TextField/protocols\"\nimport { Input } from \"@/components/Input\"\n\nexport const TextField = ({\n\tlabel,\n\tsubLabel,\n\terrorText,\n\tisOptional,\n\tid,\n\tcharacterCount,\n\t...props\n}: TextFieldProps) => {\n\treturn (\n\t\t<Grid2 container direction=\"column\" key={id} spacing={2} width=\"100%\">\n\t\t\t<Input.Label\n\t\t\t\tlabel={label}\n\t\t\t\tsubLabel={subLabel}\n\t\t\t\tisOptional={isOptional}\n\t\t\t/>\n\t\t\t<Grid2 container direction=\"column\" spacing={1} width=\"100%\">\n\t\t\t\t<Input.Field\n\t\t\t\t\t{...props}\n\t\t\t\t\tshowInputUnderline={false}\n\t\t\t\t\terrorText={errorText}\n\t\t\t\t\tcharacterCount={characterCount}\n\t\t\t\t/>\n\t\t\t\t<Input.ErrorText errorText={errorText} />\n\t\t\t</Grid2>\n\t\t</Grid2>\n\t)\n}\n","import React, { PropsWithChildren } from \"react\"\nimport { Card, SxProps, Theme } from \"@mui/material\"\n\nexport type PrimiveCardProps = PropsWithChildren<{\n\televation?: number\n\tsx?: SxProps<Theme>\n}>\n\nexport const PrimitiveCard = ({\n\tchildren,\n\t...props\n}: PrimiveCardProps) => {\n\treturn (\n\t\t<Card\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t</Card>\n\t)\n}","import { themeColors } from \"@/styles\"\nimport { makeStyles } from \"@/utils/makeStyles\"\n\nconst useStyles = makeStyles(() => ({\n\tcard: {\n\t\tflex: 1,\n\t\tposition: \"relative\",\n\t\tbackground: themeColors.colors.base.white,\n\t\tborderRadius: \"0.5rem\",\n\t\ttransition: \"all 225ms cubic-bezier(0.4, 0.6, 1)\"\n\t},\n\tscrollBar: {\n\t\t\"&::-webkit-scrollbar\": {\n\t\t\twidth: \"0.375rem !important\"\n\t\t},\n\t\t\"&::-webkit-scrollbar-thumb\": {\n\t\t\tbackgroundColor: themeColors.colors.system.gray[200]\n\t\t},\n\t\t\"&::-webkit-scrollbar-track\": {\n\t\t\tbackground: themeColors.colors.system.gray[900]\n\t\t}\n\t}\n}))\n\nexport default useStyles","import React from \"react\"\n\nimport { PrimitiveCard } from \"@/primitives/PrimitiveCard\"\n\nimport { PortletProps } from \"@/components/Portlet/protocols\"\n\nimport useStyles from \"@/components/Portlet/styles\"\n\nexport const Portlet = ({\n\tchildren,\n\tsx,\n\t...props\n}: PortletProps) => {\n\tconst classes = useStyles()\n\n\treturn (\n\t\t<PrimitiveCard\n\t\t\t{...props}\n\t\t\tsx={{\n\t\t\t\t...classes.card,\n\t\t\t\t...sx\n\t\t\t}}\n\t\t>\n\t\t\t{children}\n\t\t</PrimitiveCard>\n\t)\n}","import React, { PropsWithChildren } from \"react\"\n\ntype FallbackProvidedSkeletonProps = PropsWithChildren<{\n\tisLoading: boolean\n\tskeleton: React.ReactNode\n}>\n\nexport const FallbackProvidedSkeleton: React.FC<FallbackProvidedSkeletonProps> = ({ isLoading, skeleton, children }) => {\n\tif (isLoading) {\n\t\treturn <>{skeleton}</>\n\t}\n\n\treturn <>{children}</>\n}\n","import React, { PropsWithChildren } from \"react\"\nimport {\n\tGrid2,\n\tCircularProgress\n} from \"@mui/material\"\n\ntype FallbackSpinnerProps = PropsWithChildren<{\n\tisLoading: boolean\n}>\n\nexport const FallbackSpinner: React.FC<FallbackSpinnerProps> = ({ isLoading, children }) => {\n\tif (isLoading) {\n\t\treturn (\n\t\t\t<Grid2\n\t\t\t\tcontainer\n\t\t\t\tjustifyContent=\"center\"\n\t\t\t\talignItems=\"center\"\n\t\t\t\tsx={{\n\t\t\t\t\theight: \"100%\"\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t<CircularProgress color=\"secondary\" />\n\t\t\t</Grid2>\n\t\t)\n\t}\n\n\treturn <>{children}</>\n}\n","import { FallbackProvidedSkeleton } from \"@/components/Loading/FallbackProvidedSkeleton\"\nimport { FallbackSpinner } from \"@/components/Loading/FallbackSpinner\"\n\nexport const Loading = {\n\tFallbackProvidedSkeleton,\n\tFallbackSpinner\n}","import React from \"react\"\nimport { Autocomplete, AutocompleteFreeSoloValueMapping } from \"@mui/material\"\nimport { AutocompleteFlag, BaseAutocompleteOption, PrimitiveSelectProps } from \"@/primitives/PrimitiveSelect/protocols\"\n\nexport function PrimitiveSelect<T, Multiple extends AutocompleteFlag = false, DisableClearable extends AutocompleteFlag = false, FreeSolo extends AutocompleteFlag = false>({\n\toptions,\n\tvalue,\n\tonChange,\n\tdisabled = false,\n\tfullWidth = false,\n\trenderInput,\n\trenderOption,\n\tsx,\n\tsize,\n\tmultiple,\n\tgetOptionLabel,\n\tisOptionEqualToValue,\n\tloadingText,\n\t...props\n}: PrimitiveSelectProps<T, Multiple, DisableClearable, FreeSolo>) {\n\tconst defaultGetOptionLabel = (\n\t\toption: T | AutocompleteFreeSoloValueMapping<FreeSolo>\n\t) => {\n\t\tif (!option) {\n\t\t\treturn \"\"\n\t\t}\n\n\t\treturn ((option as unknown) as BaseAutocompleteOption)?.label ?? \"\"\n\t}\n\n\tconst defaultIsOptionEqualToValue = (option: T, value: T) => {\n\t\tconst defaultOption = (option as unknown) as BaseAutocompleteOption\n\t\tconst defaultValue = (value as unknown) as BaseAutocompleteOption\n\t\treturn defaultOption?.label === defaultValue?.label\n\t}\n\n\treturn (\n\t\t<Autocomplete\n\t\t\toptions={options}\n\t\t\tvalue={value}\n\t\t\tonChange={onChange}\n\t\t\tdisabled={disabled}\n\t\t\tfullWidth={fullWidth}\n\t\t\trenderInput={renderInput}\n\t\t\trenderOption={renderOption}\n\t\t\tsx={sx}\n\t\t\tsize={size}\n\t\t\tmultiple={multiple}\n\t\t\tgetOptionLabel={getOptionLabel ?? defaultGetOptionLabel}\n\t\t\tisOptionEqualToValue={isOptionEqualToValue ?? defaultIsOptionEqualToValue}\n\t\t\tloadingText={loadingText}\n\t\t\t{...props}\n\t\t/>\n\t)\n}","import { themeColors } from \"@/styles\"\n\nimport { makeStyles } from \"@/utils/makeStyles\"\n\nconst useStyles = makeStyles(() => ({\n\tselectInternIcons: {\n\t\t\"& .MuiAutocomplete-endAdornment\": {\n\t\t\tright: 16\n\t\t},\n\t\t\"& .MuiAutocomplete-popupIndicator\": {\n\t\t\tcolor: themeColors.colors.system.gray[800]\n\t\t}\n\t},\n\tselectLoading: {\n\t\tdisplay: \"flex\",\n\t\tjustifyContent: \"center\",\n\t\talignItems: \"center\",\n\t\tpadding: 2\n\t}\n}))\n\nexport default useStyles","import React from \"react\"\n\nimport { Box, CircularProgress, InputAdornment } from \"@mui/material\"\n\nimport { PrimitiveSelect } from \"@/primitives/PrimitiveSelect\"\nimport { TextField } from \"@/components/TextField\"\n\nimport { SelectFieldProps } from \"@/components/SelectField/protocols\"\n\nimport useStyles from \"@/components/SelectField/styles\"\nimport { AutocompleteFlag } from \"@/primitives/PrimitiveSelect/protocols\"\n\n/**\n * The comma in <T,> avoids ambiguity with JSX parsing in .tsx files by making it\n * clear that this is a generic type declaration rather than a JSX tag.\n */\nexport const SelectField =\n\t<T, Multiple extends AutocompleteFlag = false, DisableClearable extends AutocompleteFlag = false, FreeSolo extends AutocompleteFlag = false>({\n\t\tlabel,\n\t\tsubLabel,\n\t\tisOptional,\n\t\tplaceholder,\n\t\tstartAdornment,\n\t\tisLoading,\n\t\t...props\n\t}: SelectFieldProps<T, Multiple, DisableClearable, FreeSolo>) => {\n\t\tconst classes = useStyles()\n\n\t\tconst customLoading = () => {\n\t\t\treturn (\n\t\t\t\t<Box sx={classes.selectLoading}>\n\t\t\t\t\t<CircularProgress size={24} />\n\t\t\t\t</Box>\n\t\t\t)\n\t\t}\n\t\treturn <PrimitiveSelect\n\t\t\t{...props}\n\t\t\tsx={classes.selectInternIcons}\n\t\t\tloading={isLoading}\n\t\t\trenderInput={(params) => (\n\t\t\t\t<TextField\n\t\t\t\t\t{...params}\n\t\t\t\t\tlabel={label}\n\t\t\t\t\tisOptional={isOptional}\n\t\t\t\t\tsubLabel={subLabel}\n\t\t\t\t\ttype=\"text\"\n\t\t\t\t\tplaceholder={placeholder}\n\t\t\t\t\tInputProps={{\n\t\t\t\t\t\t...params.InputProps,\n\t\t\t\t\t\tstartAdornment: (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<InputAdornment position=\"start\">\n\t\t\t\t\t\t\t\t\t{startAdornment}\n\t\t\t\t\t\t\t\t</InputAdornment>\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t)\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t)}\n\t\t\tloadingText={customLoading()}\n\t\t/>\n\t}"]}
|
|
@@ -88,6 +88,10 @@ type PrimitiveInputProps = {
|
|
|
88
88
|
type InputErrorTextProps = {
|
|
89
89
|
errorText?: string;
|
|
90
90
|
};
|
|
91
|
+
type InputCharacterCountProps = {
|
|
92
|
+
value: string;
|
|
93
|
+
maxLength: number;
|
|
94
|
+
};
|
|
91
95
|
type InputLabelProps = {
|
|
92
96
|
label?: string;
|
|
93
97
|
subLabel?: string;
|
|
@@ -99,11 +103,18 @@ type InputFieldProps = PrimitiveInputProps & {
|
|
|
99
103
|
errorText?: string;
|
|
100
104
|
isOptional?: boolean;
|
|
101
105
|
id?: string;
|
|
106
|
+
characterCount?: {
|
|
107
|
+
maxLength: number;
|
|
108
|
+
};
|
|
102
109
|
};
|
|
103
110
|
|
|
104
|
-
type TextFieldProps = InputFieldProps
|
|
111
|
+
type TextFieldProps = InputFieldProps & {
|
|
112
|
+
characterCount?: {
|
|
113
|
+
maxLength: number;
|
|
114
|
+
};
|
|
115
|
+
};
|
|
105
116
|
|
|
106
|
-
declare const TextField: ({ label, subLabel, errorText, isOptional, id, ...props }: TextFieldProps) => react_jsx_runtime.JSX.Element;
|
|
117
|
+
declare const TextField: ({ label, subLabel, errorText, isOptional, id, characterCount, ...props }: TextFieldProps) => react_jsx_runtime.JSX.Element;
|
|
107
118
|
|
|
108
119
|
type PrimiveCardProps = PropsWithChildren<{
|
|
109
120
|
elevation?: number;
|
|
@@ -168,9 +179,10 @@ type SelectFieldProps<T, Multiple extends AutocompleteFlag = false, DisableClear
|
|
|
168
179
|
declare const SelectField: <T, Multiple extends AutocompleteFlag = false, DisableClearable extends AutocompleteFlag = false, FreeSolo extends AutocompleteFlag = false>({ label, subLabel, isOptional, placeholder, startAdornment, isLoading, ...props }: SelectFieldProps<T, Multiple, DisableClearable, FreeSolo>) => react_jsx_runtime.JSX.Element;
|
|
169
180
|
|
|
170
181
|
declare const Input: {
|
|
182
|
+
CharacterCount: (props: InputCharacterCountProps) => react_jsx_runtime.JSX.Element;
|
|
171
183
|
ErrorText: ({ errorText }: InputErrorTextProps) => react_jsx_runtime.JSX.Element | null;
|
|
172
184
|
Label: ({ label, subLabel, isOptional }: InputLabelProps) => react_jsx_runtime.JSX.Element | null;
|
|
173
|
-
Field: ({ errorText, sx, ...props }: InputFieldProps) => react_jsx_runtime.JSX.Element;
|
|
185
|
+
Field: ({ errorText, multiline, characterCount, endAdornment, sx, ...props }: InputFieldProps) => react_jsx_runtime.JSX.Element;
|
|
174
186
|
};
|
|
175
187
|
|
|
176
188
|
export { Button, Dialog, Input, Loading, Portlet, SelectField, Text, TextField };
|
|
@@ -88,6 +88,10 @@ type PrimitiveInputProps = {
|
|
|
88
88
|
type InputErrorTextProps = {
|
|
89
89
|
errorText?: string;
|
|
90
90
|
};
|
|
91
|
+
type InputCharacterCountProps = {
|
|
92
|
+
value: string;
|
|
93
|
+
maxLength: number;
|
|
94
|
+
};
|
|
91
95
|
type InputLabelProps = {
|
|
92
96
|
label?: string;
|
|
93
97
|
subLabel?: string;
|
|
@@ -99,11 +103,18 @@ type InputFieldProps = PrimitiveInputProps & {
|
|
|
99
103
|
errorText?: string;
|
|
100
104
|
isOptional?: boolean;
|
|
101
105
|
id?: string;
|
|
106
|
+
characterCount?: {
|
|
107
|
+
maxLength: number;
|
|
108
|
+
};
|
|
102
109
|
};
|
|
103
110
|
|
|
104
|
-
type TextFieldProps = InputFieldProps
|
|
111
|
+
type TextFieldProps = InputFieldProps & {
|
|
112
|
+
characterCount?: {
|
|
113
|
+
maxLength: number;
|
|
114
|
+
};
|
|
115
|
+
};
|
|
105
116
|
|
|
106
|
-
declare const TextField: ({ label, subLabel, errorText, isOptional, id, ...props }: TextFieldProps) => react_jsx_runtime.JSX.Element;
|
|
117
|
+
declare const TextField: ({ label, subLabel, errorText, isOptional, id, characterCount, ...props }: TextFieldProps) => react_jsx_runtime.JSX.Element;
|
|
107
118
|
|
|
108
119
|
type PrimiveCardProps = PropsWithChildren<{
|
|
109
120
|
elevation?: number;
|
|
@@ -168,9 +179,10 @@ type SelectFieldProps<T, Multiple extends AutocompleteFlag = false, DisableClear
|
|
|
168
179
|
declare const SelectField: <T, Multiple extends AutocompleteFlag = false, DisableClearable extends AutocompleteFlag = false, FreeSolo extends AutocompleteFlag = false>({ label, subLabel, isOptional, placeholder, startAdornment, isLoading, ...props }: SelectFieldProps<T, Multiple, DisableClearable, FreeSolo>) => react_jsx_runtime.JSX.Element;
|
|
169
180
|
|
|
170
181
|
declare const Input: {
|
|
182
|
+
CharacterCount: (props: InputCharacterCountProps) => react_jsx_runtime.JSX.Element;
|
|
171
183
|
ErrorText: ({ errorText }: InputErrorTextProps) => react_jsx_runtime.JSX.Element | null;
|
|
172
184
|
Label: ({ label, subLabel, isOptional }: InputLabelProps) => react_jsx_runtime.JSX.Element | null;
|
|
173
|
-
Field: ({ errorText, sx, ...props }: InputFieldProps) => react_jsx_runtime.JSX.Element;
|
|
185
|
+
Field: ({ errorText, multiline, characterCount, endAdornment, sx, ...props }: InputFieldProps) => react_jsx_runtime.JSX.Element;
|
|
174
186
|
};
|
|
175
187
|
|
|
176
188
|
export { Button, Dialog, Input, Loading, Portlet, SelectField, Text, TextField };
|