File "ThemeSettings-1.0.13-5f20f682.js"

Full Path: /home/vantageo/public_html/cache/cache/cache/cache/cache/cache/.wp-cli/wp-content/plugins/wp-data-access/assets/dist/ThemeSettings-1.0.13-5f20f682.js
File size: 10.94 KB
MIME-type: text/plain
Charset: utf-8

import{r as b,j as e,P as $,l,bV as E,bM as f}from"./main-1.0.13.js";import{a as C,i as V,aH as S,B as n,e as B,aI as G,D as W,c as g}from"./main-1.0.13-4cbe632d.js";import{P as I}from"./PremiumFeature-1.0.13-d257b3ff.js";import{i as H}from"./index-1.0.13-81ade722.js";import{F as c,b as p,a as F}from"./TextField-1.0.13-7258d491.js";import{S as v}from"./settings-1.0.13-650559d5.js";import{S as d,F as u}from"./FormControlLabel-1.0.13-143a10df.js";import{a as L}from"./ScopeEnum-1.0.13-d05c4b00.js";import{L as O,A as j}from"./Link-1.0.13-03de5435.js";import{I as q,a1 as K,a2 as Q,a3 as X,a4 as J,X as N,a5 as Y}from"./iconBase-1.0.13-98e06aa9.js";import{R as T}from"./RadioGroup-1.0.13-1d87a31c.js";import{R as m}from"./Radio-1.0.13-befab7cd.js";import{C as A}from"./CssUnitTextField-1.0.13-9657903d.js";import{A as y,a as w}from"./AccordionSummary-1.0.13-0885ed32.js";import"./index.esm-1.0.13-0afa0259.js";import"./AdminTheme-1.0.13-a1e60de2.js";import"./Close-1.0.13-b137ce2f.js";import"./Menu-1.0.13-2a06ef00.js";import"./useScreenSize-1.0.13-fa31f819.js";import"./DialogContent-1.0.13-5873ffb9.js";import"./Tabs-1.0.13-f71c8d5c.js";import"./useSlot-1.0.13-62ad37b6.js";const Z={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",A100:"#ff80ab",A200:"#ff4081",A400:"#f50057",A700:"#c51162"},_=Z,ee={50:"#ede7f6",100:"#d1c4e9",200:"#b39ddb",300:"#9575cd",400:"#7e57c2",500:"#673ab7",600:"#5e35b1",700:"#512da8",800:"#4527a0",900:"#311b92",A100:"#b388ff",A200:"#7c4dff",A400:"#651fff",A700:"#6200ea"},se=ee,te={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",A100:"#8c9eff",A200:"#536dfe",A400:"#3d5afe",A700:"#304ffe"},ne=te,ae={50:"#e0f7fa",100:"#b2ebf2",200:"#80deea",300:"#4dd0e1",400:"#26c6da",500:"#00bcd4",600:"#00acc1",700:"#0097a7",800:"#00838f",900:"#006064",A100:"#84ffff",A200:"#18ffff",A400:"#00e5ff",A700:"#00b8d4"},re=ae,ie={50:"#e0f2f1",100:"#b2dfdb",200:"#80cbc4",300:"#4db6ac",400:"#26a69a",500:"#009688",600:"#00897b",700:"#00796b",800:"#00695c",900:"#004d40",A100:"#a7ffeb",A200:"#64ffda",A400:"#1de9b6",A700:"#00bfa5"},oe=ie,le={50:"#f1f8e9",100:"#dcedc8",200:"#c5e1a5",300:"#aed581",400:"#9ccc65",500:"#8bc34a",600:"#7cb342",700:"#689f38",800:"#558b2f",900:"#33691e",A100:"#ccff90",A200:"#b2ff59",A400:"#76ff03",A700:"#64dd17"},ce=le,de={50:"#f9fbe7",100:"#f0f4c3",200:"#e6ee9c",300:"#dce775",400:"#d4e157",500:"#cddc39",600:"#c0ca33",700:"#afb42b",800:"#9e9d24",900:"#827717",A100:"#f4ff81",A200:"#eeff41",A400:"#c6ff00",A700:"#aeea00"},fe=de,pe={50:"#fffde7",100:"#fff9c4",200:"#fff59d",300:"#fff176",400:"#ffee58",500:"#ffeb3b",600:"#fdd835",700:"#fbc02d",800:"#f9a825",900:"#f57f17",A100:"#ffff8d",A200:"#ffff00",A400:"#ffea00",A700:"#ffd600"},xe=pe,ue={50:"#fff8e1",100:"#ffecb3",200:"#ffe082",300:"#ffd54f",400:"#ffca28",500:"#ffc107",600:"#ffb300",700:"#ffa000",800:"#ff8f00",900:"#ff6f00",A100:"#ffe57f",A200:"#ffd740",A400:"#ffc400",A700:"#ffab00"},me=ue,he={50:"#fbe9e7",100:"#ffccbc",200:"#ffab91",300:"#ff8a65",400:"#ff7043",500:"#ff5722",600:"#f4511e",700:"#e64a19",800:"#d84315",900:"#bf360c",A100:"#ff9e80",A200:"#ff6e40",A400:"#ff3d00",A700:"#dd2c00"},be=he,ge={50:"#efebe9",100:"#d7ccc8",200:"#bcaaa4",300:"#a1887f",400:"#8d6e63",500:"#795548",600:"#6d4c41",700:"#5d4037",800:"#4e342e",900:"#3e2723",A100:"#d7ccc8",A200:"#bcaaa4",A400:"#8d6e63",A700:"#5d4037"},je=ge,Ae=({appId:r,setIsUpdated:x})=>{C();const i=V("(max-width: 600px)"),t=1,s=S(r),[h,Ce]=b.useState(s.shade),z=50,P=o=>{switch(o){case"900":return 0;case"800":return 1;case"700":return 2;case"600":return 3;case"500":return 4;case"400":return 5;case"300":return 6;case"200":return 7;case"100":return 8;case"50":return 9;case"A700":return 10;case"A400":return 11;case"A200":return 12;case"A100":return 13}return 7},[D,Se]=b.useState(s.colorLabel),[k,U]=b.useState(!1),a=(o,M)=>(l.debug(o,M),e.jsx(n,{sx:{bgcolor:s.useCustomColor?"lightgrey":o[s.shade]},children:e.jsx(q,{disabled:!0,sx:{padding:0,margin:0},onClick:R=>{l.debug(R)},children:H(o,s.color)?e.jsx(G,{style:{color:"#fff",fontSize:"50px",padding:"0"}}):e.jsx(n,{sx:{width:z,height:z}})})}));return e.jsxs(n,{style:{display:"flex",flexDirection:"column",gap:"3px",...i&&{scale:"0.9",marginLeft:"-20px"}},children:[e.jsxs(c,{sx:{display:"flex",flexDirection:"row",justifyContent:"flex-start",alignItems:"center",width:"fit-content"},children:[e.jsx(p,{children:"light mode"}),e.jsx(v,{disabled:!0,checked:s.mode===$.DARK,onClick:o=>{l.debug(o)}}),e.jsx(p,{children:"dark mode"})]}),e.jsxs(n,{sx:{marginTop:"20px",display:"flex",flexDirection:"column"},children:[e.jsxs(n,{sx:{display:"inline-grid",gridTemplateColumns:"175px 165px 1fr",alignItems:"center"},children:[e.jsx(n,{sx:{color:"rgba(0, 0, 0, 0.6)"},children:"Default color palette"}),e.jsx(n,{sx:{textAlign:"right",color:s.useCustomColor?"lightgrey":s.color[s.shade]},children:D})]}),e.jsx(n,{sx:{marginTop:"10px",marginBottom:"10px"},children:e.jsxs(d,{direction:"row",gap:t,children:[e.jsxs(d,{alignItems:"center",gap:t,children:[a(E,"grey"),a(ne,"indigo"),a(_,"pink")]}),e.jsxs(d,{alignItems:"center",gap:t,children:[a(je,"brown"),a(oe,"teal"),a(K,"red")]}),e.jsxs(d,{alignItems:"center",gap:t,children:[a(se,"deep purple"),a(Q,"green"),a(be,"deep orange")]}),e.jsxs(d,{alignItems:"center",gap:t,children:[a(X,"purple"),a(ce,"light green"),a(J,"orange")]}),e.jsxs(d,{alignItems:"center",gap:t,children:[a(N,"blue"),a(re,"cyan"),a(me,"amber")]}),e.jsxs(d,{alignItems:"center",gap:t,children:[a(Y,"light blue"),a(fe,"lime"),a(xe,"yellow")]})]})})]}),e.jsxs(n,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:"17px"},children:[e.jsx(n,{sx:{color:"rgba(0, 0, 0, 0.6)"},children:"Shade"}),e.jsx(L,{disabled:!0,value:P(s.shade),min:0,max:13,step:1,marks:!0,sx:{width:"240px"},onChange:o=>{l.debug(o)}}),e.jsx(p,{children:h})]}),e.jsxs(n,{sx:{marginTop:"30px",display:"grid",gap:"10px"},children:[e.jsx(u,{control:e.jsx(v,{checked:s.useCustomColor,disabled:!0,onClick:()=>{}}),label:"Use custom colors",labelPlacement:"end"}),e.jsxs(n,{sx:{marginLeft:"30px",display:"flex",alignItems:"center",gap:"5px","& input::-webkit-color-swatch":{border:"1px solid #efefef",borderRadius:"4px"},"& input::-moz-color-swatch":{border:"1px solid #efefef",borderRadius:"4px"}},children:[e.jsx("input",{type:"color",value:s.customTextColor,disabled:!s.useCustomColor,onChange:o=>{},style:{width:"30px",height:"35px",margin:0,padding:0,border:"none",WebkitAppearance:"none",MozAppearance:"none",appearance:"none",backgroundColor:"transparent",cursor:s.useCustomColor?"pointer":"default"}}),e.jsx(p,{children:"Text color"})]}),e.jsxs(n,{sx:{marginLeft:"30px",display:"flex",alignItems:"center",gap:"5px","& input::-webkit-color-swatch":{border:"1px solid #efefef",borderRadius:"4px"},"& input::-moz-color-swatch":{border:"1px solid #efefef",borderRadius:"4px"}},children:[e.jsx("input",{type:"color",value:s.customContrastColor,disabled:!s.useCustomColor,onChange:o=>{},style:{width:"30px",height:"35px",margin:0,padding:0,border:"none",WebkitAppearance:"none",MozAppearance:"none",appearance:"none",backgroundColor:"transparent",cursor:s.useCustomColor?"pointer":"default"}}),e.jsx(p,{children:"Contrast color"})]})]}),e.jsxs(F,{component:"div",sx:{marginTop:"30px"},children:[e.jsxs(O,{sx:{textDecoration:"none",cursor:"pointer",display:"inline-flex","& svg":{fontSize:"1rem",marginRight:"2px"}},onClick:()=>U(!k),children:[e.jsx(B,{}),"Default versus custom colors."]}),k&&e.jsxs(n,{sx:{marginTop:"20px",display:"grid",gap:"20px"},children:[e.jsxs(n,{children:["The ",e.jsx("strong",{children:"default color palette"})," is very easy to use. All elements are styled uniformly using the selected color. The contrast color is automatically assigned based on the chosen color."]}),e.jsxs(n,{children:["The ",e.jsx("strong",{children:"custom colors"})," section requires a contrast color. This is the text color used on elements where the background color is set to the text color."]})]})]}),e.jsx(I,{})]})},ye=({appId:r,setIsUpdated:x})=>{C();const i=S(r);return e.jsxs(n,{sx:{display:"grid",gap:"30px"},children:[e.jsx(c,{children:e.jsxs(T,{sx:{flexDirection:"column"},children:[e.jsx(u,{control:e.jsx(m,{checked:i.inheritFontFamily,disabled:!0,onChange:t=>{t.stopPropagation()}}),value:"inherit",label:"Inherit font family from page"},"inherit"),e.jsx(u,{control:e.jsx(m,{checked:!i.inheritFontFamily,disabled:!0,onChange:t=>{t.stopPropagation()}}),value:"setsize",label:"Set font family"},"setsize")]})}),!1,e.jsxs(n,{sx:{display:"grid",gap:"10px"},children:[e.jsx(c,{children:e.jsxs(T,{sx:{flexDirection:"column"},children:[e.jsx(u,{control:e.jsx(m,{checked:i.fontSize==null,disabled:!0,onChange:t=>{t.stopPropagation()}}),value:"inherit",label:"Inherit font size from page"},"inherit"),e.jsx(u,{control:e.jsx(m,{checked:i.fontSize!==void 0,disabled:!0,onChange:t=>{t.stopPropagation()}}),value:"setsize",label:"Set font size"},"setsize")]})}),!1]}),e.jsx(c,{sx:{marginLeft:"-15px"},children:e.jsx(F,{children:"By default, the font type and size of the web page are inherited, ensuring a uniform layout across both back-end and front-end pages."})}),e.jsx(I,{single:!1,margin:"0"})]})},we=({appId:r,source:x,setIsUpdated:i})=>{l.debug(r),C();const t=S(r);return e.jsxs(n,{sx:{display:"grid",gap:"30px"},children:[e.jsxs(c,{fullWidth:!0,sx:{display:"grid",width:"360px"},children:[e.jsx(p,{children:"Elevation"}),e.jsx(L,{value:t.elevation,min:0,max:24,step:1,marks:[{value:0,label:0},{value:6,label:6},{value:12,label:12},{value:18,label:18},{value:24,label:24}],valueLabelDisplay:"auto",disabled:!0,onChange:(s,h)=>{l.debug(s,h)},sx:{width:"calc(100% - 40px)",margin:"20px"}}),e.jsx(F,{children:"Adds a shadow to app containers."})]}),x===W.FORM&&e.jsxs(e.Fragment,{children:[e.jsx(c,{fullWidth:!0,children:e.jsx(A,{label:"Font size input fields",textField:{cssValue:t.inputFontSize,cssUnit:t.inputFontSizeUnit},defaultValue:{cssValue:f.inputFontSize,cssUnit:f.inputFontSizeUnit},updateSettings:s=>{l.debug(s)}})}),e.jsx(c,{fullWidth:!0,children:e.jsx(A,{label:"Font size labels",textField:{cssValue:t.labelFontSize,cssUnit:t.labelFontSizeUnit},defaultValue:{cssValue:f.labelFontSize,cssUnit:f.labelFontSizeUnit},updateSettings:s=>{l.debug(s)}})}),e.jsx(c,{fullWidth:!0,children:e.jsx(A,{label:"Font size hints",textField:{cssValue:t.hintFontSize,cssUnit:t.hintFontSizeUnit},defaultValue:{cssValue:f.hintFontSize,cssUnit:f.hintFontSizeUnit},updateSettings:s=>{l.debug(s)}})})]})]})},Qe=({appId:r,source:x,setIsUpdated:i})=>(l.debug(r),e.jsxs(e.Fragment,{children:[e.jsxs(y,{defaultExpanded:!1,disableGutters:!0,children:[e.jsx(w,{expandIcon:e.jsx(g,{}),children:"Font"}),e.jsx(j,{children:e.jsx(ye,{appId:r,setIsUpdated:i})})]}),e.jsxs(y,{defaultExpanded:!1,disableGutters:!0,children:[e.jsx(w,{expandIcon:e.jsx(g,{}),children:"Palette"}),e.jsx(j,{children:e.jsx(Ae,{appId:r,setIsUpdated:i})})]}),e.jsxs(y,{defaultExpanded:!1,disableGutters:!0,children:[e.jsx(w,{expandIcon:e.jsx(g,{}),children:"Layout"}),e.jsx(j,{children:e.jsx(we,{appId:r,source:x,setIsUpdated:i})})]})]}));export{Qe as default};