PageSourceSearch

https://sp-arte.com/build/assets/TextForm-DLsu5CdN.js

js sp-arte.com collected 2026-10-02 03:12:18 UTC 4,902 bytes, 1 lines download raw bytes

1import{r as k,j as t}from"./app-Dfd-ZCC0.js";import{Q as S,R as w}from"./QuillModuleExport-CEzv2zms.js";/* empty css                   */import{a as q,C as E}from"./index.esm-CR-asIOx.js";function Y({initialData:o=null,componentIndex:s=0}){var h,p,u,b,f,g,C,j,n,N,T,v,_,y,$,F;const{register:x,setValue:l,formState:{errors:e},control:i}=q(),[P,B]=k.useState(!1),m="#FFFFFF",d="#000000";k.useEffect(()=>{P||(o!=null?(l(`form.${s}.textColor`,o.textColor),l(`form.${s}.bgColor`,o.bgColor),l(`form.${s}.text_pt`,o.text_pt),l(`form.${s}.text_en`,o.text_en),l(`form.${s}.positionText`,o.positionText)):(l("textColor",d),l("bgColor",m),l("positionText","0")),B(!0))},[o]);const c=S();return t.jsxs("div",{className:"space-y-4",children:[t.jsxs("div",{children:[t.jsx("label",{htmlFor:"textColor",className:"block text-[13px] font-medium text-gray-700 mb-2",children:"Cor do texto:"}),t.jsxs("div",{className:"row inline-flex gap-2 items-center",id:"textColor",children:[t.jsx("input",{type:"radio",id:"textColorBlack",value:d,...x(o!=null?`form.${s}.textColor`:"textColor",{required:"Selecione uma cor para o texto"}),className:`block shadow-sm sm:text-[13px] border ${e.textColor||(p=(h=e==null?void 0:e.form)==null?void 0:h[s])!=null&&p.textColor?"border-red-500":"border-gray-300"} rounded-md `}),t.jsx("span",{className:"text-[13px]",children:"Preto"})]}),t.jsxs("div",{className:"row inline-flex gap-2 ml-4",children:[t.jsx("input",{type:"radio",id:"textColorWhite",value:m,...x(o!=null?`form.${s}.textColor`:"textColor",{required:"Selecione uma cor para o texto"}),className:`block shadow-sm sm:text-[13px] border ${e.textColor||(b=(u=e==null?void 0:e.form)==null?void 0:u[s])!=null&&b.textColor?"border-red-500":"border-gray-300"} rounded-md !accent-black`}),t.jsx("span",{className:"text-[13px]",children:"Branco"})]}),((g=(f=e==null?void 0:e.form)==null?void 0:f[s])==null?void 0:g.textColor)&&t.jsx("p",{className:"text-red-500 text-xs italic",children:e.form[s].textColor.message}),e.textColor&&t.jsx("p",{className:"text-red-500 text-xs italic",children:e.textColor.message})]}),t.jsxs("div",{children:[t.jsx("label",{htmlFor:"bgColor",className:"block text-[13px] font-medium text-gray-700 mb-2",children:"Cor do fundo:"}),t.jsx("input",{type:"color",id:"bgColor",...x(o!=null?`form.${s}.bgColor`:"bgColor"),className:` w-1/4 h-10 block shadow-sm sm:text-[13px] border ${e.bgColor||(j=(C=e==null?void 0:e.form)==null?void 0:C[s])!=null&&j.bgColor?"border-red-500":"border-gray-300"} rounded-md`}),((N=(n=e==null?void 0:e.form)==null?void 0:n[s])==null?void 0:N.bgColor)&&t.jsx("p",{className:"text-red-500 text-xs italic",children:e.form[s].bgColor.message}),e.bgColor&&t.jsx("p",{className:"text-red-500 text-xs italic",children:e.bgColor.message})]}),t.jsxs("div",{children:[t.jsx("label",{htmlFor:"positionText",className:"block text-[13px] font-medium text-gray-700 pt-5 mb-2",children:"Posição:"}),t.jsxs("select",{id:"positionText",...x(o!=null?`form.${s}.positionText`:"positionText"),className:"mt-1 block w-full shadow-sm sm:text-[13px] border-gray-300 rounded-md",children:[t.jsx("option",{value:"",children:"Selecione a posição"}),t.jsx("option",{value:"0",children:"Esquerda"}),t.jsx("option",{value:"1",children:"Centro"}),t.jsx("option",{value:"2",children:"Direita"})]}),((v=(T=e==null?void 0:e.form)==null?void 0:T[s])==null?void 0:v.positionText)&&t.jsx("p",{className:"text-red-500 text-xs italic",children:e.form[s].positionText.message}),e.positionText&&t.jsx("p",{className:"text-red-500 text-xs italic",children:e.positionText.message})]}),t.jsxs("div",{className:"mb-4",children:[t.jsx("label",{htmlFor:"textPt",className:"block text-[13px] font-medium text-gray-700 pt-5 mb-2",children:"Texto PT:"}),t.jsx(E,{control:i,name:o!=null?`form.${s}.text_pt`:"text_pt",rules:{required:"Texto PT é obrigatório"},render:({field:r})=>t.jsx(w,{...r,id:"textPt",onChange:a=>{r.onChange(a)},modules:c,style:{height:"500px",overflowY:"hidden",paddingBottom:"50px"}})}),((y=(_=e==null?void 0:e.form)==null?void 0:_[s])==null?void 0:y.text_pt)&&t.jsx("p",{className:"text-red-500 text-xs italic",children:e.form[s].text_pt.message}),e.text_pt&&t.jsx("p",{className:"text-red-500 text-xs italic",children:e.text_pt.message})]}),t.jsxs("div",{className:"mt-5",children:[t.jsx("label",{htmlFor:"textEn",className:"block text-[13px] font-medium text-gray-700 pt-5 mb-2",children:"Texto EN:"}),t.jsx(E,{control:i,name:o!=null?`form.${s}.text_en`:"text_en",render:({field:r})=>t.jsx(w,{...r,id:"textEn",onChange:a=>{r.onChange(a)},modules:c,style:{height:"500px",overflowY:"hidden",paddingBottom:"50px"}})}),((F=($=e==null?void 0:e.form)==null?void 0:$[s])==null?void 0:F.text_en)&&t.jsx("p",{className:"text-red-500 text-xs italic",children:e.form[s].text_en.message}),e.text_en&&t.jsx("p",{className:"text-red-500 text-xs italic",children:e.text_en.message})]})]})}export{Y as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.