@progress/kendo-themes-html
Version:
A collection of HTML helpers used for developing Kendo UI themes
2 lines (1 loc) • 16.6 kB
JavaScript
var lt=Object.create;var ie=Object.defineProperty;var rt=Object.getOwnPropertyDescriptor;var ct=Object.getOwnPropertyNames;var dt=Object.getPrototypeOf,pt=Object.prototype.hasOwnProperty;var mt=(t,e)=>{for(var o in e)ie(t,o,{get:e[o],enumerable:!0})},we=(t,e,o,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of ct(e))!pt.call(t,a)&&a!==o&&ie(t,a,{get:()=>e[a],enumerable:!(n=rt(e,a))||n.enumerable});return t};var ut=(t,e,o)=>(o=t!=null?lt(dt(t)):{},we(e||!t||!t.__esModule?ie(o,"default",{value:t,enumerable:!0}):o,t)),ft=t=>we(ie({},"__esModule",{value:!0}),t);var xo={};mt(xo,{ACTIONSHEET_CLASSNAME:()=>Ee,ActionSheet:()=>U,default:()=>fo});module.exports=ft(xo);var i=(...t)=>t.filter(e=>e!==!0&&!!e).map(e=>Array.isArray(e)?i(...e):typeof e=="object"?Object.keys(e).map((o,n)=>e[n]||e[o]&&o||null).filter(o=>o!==null).join(" "):e).filter(e=>!!e).join(" ");var h=(t,e)=>i({[`${t}-xs`]:e.size==="xsmall",[`${t}-sm`]:e.size==="small",[`${t}-md`]:e.size==="medium",[`${t}-lg`]:e.size==="large",[`${t}-xl`]:e.size==="xlarge",[`${t}-xxl`]:e.size==="xxlarge",[`${t}-xxxl`]:e.size==="xxxlarge"},{[`${t}-${e.fillMode}`]:e.fillMode},{[`${t}-${e.fillMode}-${e.themeColor}`]:e.fillMode&&e.themeColor},{[`${t}-${e.themeColor}`]:e.themeColor&&e.fillMode===void 0},{"k-rounded-sm":e.rounded==="small","k-rounded-md":e.rounded==="medium","k-rounded-lg":e.rounded==="large","k-rounded-full":e.rounded==="full"}),V=(t,e)=>i({"k-valid":e.valid,"k-invalid":e.invalid,"k-hover":e.hover,"k-focus":e.focus,"k-checked":e.checked,"k-active":e.active,"k-selected":e.selected,"k-disabled":e.disabled,"k-indeterminate":e.indeterminate&&!e.checked,"k-loading":e.loading,"k-empty":e.empty,"k-readonly":e.readonly,"k-highlighted":e.highlighted});var l={xsmall:"xsmall",small:"small",medium:"medium",large:"large",xlarge:"xlarge",xxlarge:"xxlarge",xxxlarge:"xxxlarge"},p={small:"small",medium:"medium",large:"large",full:"full"},m={solid:"solid",flat:"flat",outline:"outline",clear:"clear",link:"link"},r={inherit:"inherit",base:"base",primary:"primary",secondary:"secondary",tertiary:"tertiary",info:"info",success:"success",warning:"warning",error:"error",dark:"dark",light:"light",inverse:"inverse"},s={open:"open",hover:"hover",focus:"focus",active:"active",selected:"selected",disabled:"disabled",valid:"valid",invalid:"invalid",loading:"loading",required:"required",empty:"empty",indeterminate:"indeterminate",checked:"checked",readonly:"readonly",highlighted:"highlighted"};var he=require("react/jsx-runtime"),He="k-animation-container",xt=[],ht={},Re={positionMode:"absolute"},$=t=>{let{positionMode:e=Re.positionMode,animationStyle:o,offset:n,...a}=t;return(0,he.jsx)("div",{...a,style:{...n,...t.style},className:i(t.className,He,"k-animation-container-shown",{"k-animation-container-fixed":e==="fixed"}),children:(0,he.jsx)("div",{className:"k-child-animation-container",style:o,children:t.children})})};$.states=xt;$.options=ht;$.className=He;$.defaultOptions=Re;var Pe=require("react/jsx-runtime"),le="k-actions",vt=[],bt={},ve={alignment:"start",orientation:"horizontal"},F=t=>{let{alignment:e=ve.alignment,orientation:o=ve.orientation,...n}=t;return(0,Pe.jsx)("div",{...n,className:i(le,{[`${le}-${e}`]:e,[`${le}-${o}`]:o},t.className),children:t.children})};F.states=vt;F.options=bt;F.className=le;F.defaultOptions=ve;var Ke=require("react/jsx-runtime"),Nt="k-actionsheet-footer",Be={alignment:"stretched",orientation:"horizontal"},be=t=>{let{alignment:e=Be.alignment,orientation:o=Be.orientation,template:n,as:a=n?"div":F,...c}=t;return(0,Ke.jsx)(a,{...c,...!n&&{alignment:e,orientation:o},className:i(t.className,Nt),children:t.children})};var Ve=require("react/jsx-runtime"),re="k-input",St=[s.hover,s.focus,s.valid,s.invalid,s.required,s.disabled,s.loading,s.readonly],gt={size:[l.small,l.medium,l.large],rounded:[p.small,p.medium,p.large,p.full],fillMode:[m.solid,m.flat,m.outline]},ce={size:l.medium,rounded:l.medium,fillMode:m.solid},S=t=>{let{hover:e,focus:o,disabled:n,invalid:a,valid:c,loading:d,readonly:f,size:u=ce.size,rounded:x=ce.rounded,fillMode:N=ce.fillMode,...y}=t;return(0,Ve.jsx)("span",{...y,className:i(t.className,re,h(re,{size:u,rounded:x,fillMode:N}),V(re,{hover:e,focus:o,disabled:n,invalid:a,valid:c,loading:d,readonly:f}))})};S.states=St;S.options=gt;S.className=re;S.defaultOptions=ce;var $e=require("react/jsx-runtime"),de="k-picker",yt=[s.hover,s.focus,s.valid,s.invalid,s.required,s.disabled,s.loading,s.readonly],It={size:[l.small,l.medium,l.large],rounded:[p.small,p.medium,p.large,p.full],fillMode:[m.solid,m.flat,m.outline]},pe={size:l.medium,rounded:p.medium,fillMode:m.solid},me=t=>{let{hover:e,focus:o,disabled:n,invalid:a,valid:c,loading:d,readonly:f,size:u=pe.size,rounded:x=pe.rounded,fillMode:N=pe.fillMode,...y}=t;return(0,$e.jsx)("span",{...y,className:i(t.className,de,h(de,{size:u,rounded:x,fillMode:N}),V(de,{hover:e,focus:o,disabled:n,invalid:a,valid:c,loading:d,readonly:f})),children:t.children})};me.states=yt;me.options=It;me.className=de;me.defaultOptions=pe;var W=require("react/jsx-runtime"),Ne="k-icon k-font-icon",kt=[],Mt={size:[l.xsmall,l.small,l.medium,l.large,l.xlarge,l.xxlarge,l.xxxlarge],themeColor:[r.base,r.primary,r.secondary,r.tertiary,r.success,r.warning,r.error,r.info,r.light,r.dark]},At={},Q=t=>{let{size:e,themeColor:o,icon:n,rotate:a,flip:c,...d}=t;return n?(0,W.jsx)("span",{...d,className:i(t.className,Ne,h(Ne,{size:e}),{[`k-i-${n}`]:n,[`k-color-${o}`]:o,[`k-rotate-${a}`]:a,"k-flip-h":c==="h"||c==="both","k-flip-v":c==="v"||c==="both"})}):(0,W.jsx)(W.Fragment,{})};Q.states=kt;Q.options=Mt;Q.className=Ne;Q.defaultOptions=At;var Fe=Q;var C=require("react/jsx-runtime"),Se="k-icon k-svg-icon",Tt=[],Ct={size:[l.xsmall,l.small,l.medium,l.large,l.xlarge,l.xxlarge,l.xxxlarge],themeColor:[r.base,r.primary,r.secondary,r.tertiary,r.success,r.warning,r.error,r.info,r.light,r.dark]},_e={viewBox:"0 0 24 24"},Y=t=>{let{size:e,themeColor:o,rotate:n,flip:a,viewBox:c=_e.viewBox,icon:d,...f}=t;if(!d)return(0,C.jsx)(C.Fragment,{});d==="none"&&{...f,className:i(t.className,Se,"k-none")};let u=typeof d=="object"&&d.name&&d.name;return(0,C.jsx)("span",{...f,className:i(t.className,Se,h("k-icon",{size:e}),{[`k-svg-i-${u}`]:u,[`k-color-${o}`]:o,[`k-rotate-${n}`]:n,"k-flip-h":a==="h"||a==="both","k-flip-v":a==="v"||a==="both"}),children:(0,C.jsx)("svg",{"aria-hidden":!0,focusable:!1,xmlns:"http://www.w3.org/2000/svg",viewBox:typeof d=="object"?d.viewBox:c,dangerouslySetInnerHTML:typeof d=="object"?{__html:d.content}:void 0,children:d?void 0:t.children})})};Y.states=Tt;Y.options=Ct;Y.className=Se;Y.defaultOptions=_e;var ge=Y;var Xe=ut(require("@progress/kendo-svg-icons")),k=require("react/jsx-runtime"),Ot=t=>t.replace(/([-_][a-z0-9])/gi,e=>e.toUpperCase().replace("-","").replace("_","")),zt=[],Et={size:[l.xsmall,l.small,l.medium,l.large,l.xlarge,l.xxlarge,l.xxxlarge],themeColor:[r.base,r.primary,r.secondary,r.tertiary,r.success,r.warning,r.error,r.info,r.light,r.dark]},ye={viewBox:"0 0 24 24",type:"svg"},b=t=>{let{size:e,themeColor:o,icon:n,type:a=ye.type,rotate:c,flip:d,viewBox:f=ye.viewBox,...u}=t;if(!n)return(0,k.jsx)(k.Fragment,{});if(a==="svg"){if(n==="none")return(0,k.jsx)(ge,{...u,icon:n,size:e});let x=Ot(`${n}-icon`);return Xe[x]?(0,k.jsx)(ge,{...u,icon:Xe[x],size:e,themeColor:o,rotate:c,flip:d,viewBox:f}):(0,k.jsx)(k.Fragment,{})}return(0,k.jsx)(Fe,{...u,icon:n,size:e,themeColor:o,rotate:c,flip:d})};b.states=zt;b.options=Et;b.defaultOptions=ye;var _=require("react/jsx-runtime"),Je="k-clear-value",Lt=[s.disabled,s.loading,s.readonly],wt={},O=t=>{let{disabled:e,loading:o,readonly:n,value:a}=t;return e||n||o||!a?(0,_.jsx)(_.Fragment,{}):(0,_.jsx)("span",{className:i(t.className,Je),children:(0,_.jsx)(b,{icon:"x"})})};O.states=Lt;O.options=wt;O.className=Je;var qe=require("react/jsx-runtime"),Ie="k-input-inner",Ht=[],Rt={},ue={type:"text",autocomplete:"off",value:"",placeholder:""},z=t=>{let{value:e=ue.value,type:o=ue.type,placeholder:n=ue.placeholder,autocomplete:a=ue.autocomplete,...c}=t;return(0,qe.jsx)("input",{...c,type:o,className:i(t.className,Ie,h(Ie,t)),placeholder:n,autoComplete:a,defaultValue:e})};z.states=Ht;z.options=Rt;z.className=Ie;var Z=require("react/jsx-runtime"),ke="k-input-inner",Pt=[],Bt={},Me=t=>{let{value:e,placeholder:o,showValue:n,valueIcon:a,valueIconName:c,...d}=t;return(0,Z.jsxs)("span",{...d,className:i(t.className,ke,h(ke,t)),children:[a,!a&&c&&(0,Z.jsx)(b,{className:"k-input-value-icon",icon:c}),n&&!e&&o,n&&e&&(0,Z.jsx)("span",{className:"k-input-value-text",children:e})]})};Me.states=Pt;Me.options=Bt;Me.className=ke;var Ge=require("react/jsx-runtime"),Ae="k-input-inner",Kt=[],Vt={},De={value:"",placeholder:""},Te=t=>{let{value:e=De.value,placeholder:o=De.placeholder,rows:n,...a}=t;return(0,Ge.jsx)("textarea",{...a,className:i(t.className,Ae,h(Ae,t)),placeholder:o,rows:n,defaultValue:e})};Te.states=Kt;Te.options=Vt;Te.className=Ae;var j=require("react/jsx-runtime"),Ue="k-input-loading-icon",$t=[s.disabled,s.loading],X=t=>{let{disabled:e,loading:o}=t;return e||!o?(0,j.jsx)(j.Fragment,{}):(0,j.jsx)("span",{className:i(t.className,Ue,"k-icon k-i-loading")})};X.states=$t;X.className=Ue;var ee=require("react/jsx-runtime"),We="k-input-validation-icon",Ft=[s.valid,s.invalid,s.disabled,s.loading],_t={},E=t=>{let{valid:e,invalid:o,disabled:n,loading:a}=t,c=o?"warning-circle":"check-circle";return n||a||!!!(e||o)?(0,ee.jsx)(ee.Fragment,{}):(0,ee.jsx)(b,{className:i(We),icon:c})};E.states=Ft;E.options=_t;E.className=We;var te=require("react/jsx-runtime"),Xt="k-input-prefix",Jt={direction:"horizontal"},Qe=t=>{let{direction:e=Jt.direction,...o}=t;return t.children?(0,te.jsx)("span",{...o,className:i(Xt,t.className,{[`k-input-prefix-${e}`]:e}),children:t.children}):(0,te.jsx)(te.Fragment,{})};var oe=require("react/jsx-runtime"),qt="k-input-suffix",Dt={direction:"horizontal"},Ye=t=>{let{direction:e=Dt.direction,...o}=t;return t.children?(0,oe.jsx)("span",{...o,className:i(qt,t.className,{[`k-input-suffix-${e}`]:e}),children:t.children}):(0,oe.jsx)(oe.Fragment,{})};var Gt=require("react/jsx-runtime");var Ut=require("react/jsx-runtime");var je=require("react/jsx-runtime"),Ze="k-input-separator",Wt={direction:"vertical"},Ce=t=>{let{direction:e=Wt.direction,...o}=t;return(0,je.jsx)("span",{...o,className:i(Ze,t.className,{[`${Ze}-${e}`]:e})})};var A=require("react/jsx-runtime"),et="k-searchbox",Qt=[s.hover,s.focus,s.valid,s.invalid,s.required,s.disabled,s.loading],Yt={size:[l.small,l.medium,l.large],rounded:[p.small,p.medium,p.large,p.full],fillMode:[m.solid,m.flat,m.outline]},Oe={showIcon:!0,icon:"search",size:S.defaultOptions.size,rounded:S.defaultOptions.rounded,fillMode:S.defaultOptions.fillMode},J=t=>{let{value:e,placeholder:o,size:n,rounded:a,fillMode:c,hover:d,focus:f,valid:u,invalid:x,required:N,loading:y,disabled:T,showIcon:M=Oe.showIcon,icon:P=Oe.icon,...B}=t;return(0,A.jsxs)(S,{...B,size:n,rounded:a,fillMode:c,hover:d,focus:f,valid:u,invalid:x,required:N,loading:y,disabled:T,className:i(t.className,et),children:[M&&(0,A.jsx)(b,{className:"k-input-icon",icon:P}),(0,A.jsx)(z,{placeholder:o,value:e}),(0,A.jsx)(X,{...t}),(0,A.jsx)(E,{...t}),(0,A.jsx)(O,{...t})]})};J.states=Qt;J.options=Yt;J.className=et;J.defaultOptions=Oe;var Zt=require("react/jsx-runtime");var v=require("react/jsx-runtime"),tt="k-textbox",jt=[s.hover,s.focus,s.valid,s.invalid,s.required,s.disabled,s.loading,s.readonly],eo={size:[l.small,l.medium,l.large],rounded:[p.small,p.medium,p.large,p.full],fillMode:[m.solid,m.flat,m.outline]},L={showClearButton:!0,showValidationIcon:!0,size:S.defaultOptions.size,rounded:S.defaultOptions.rounded,fillMode:S.defaultOptions.fillMode,separators:!0},q=t=>{let{size:e=L.size,rounded:o=L.rounded,fillMode:n=L.fillMode,separators:a=L.separators,showClearButton:c=L.showClearButton,showValidationIcon:d=L.showValidationIcon,prefix:f,suffix:u,type:x,value:N,placeholder:y,hover:T,focus:M,valid:P,invalid:B,required:xe,loading:K,disabled:se,readonly:Le,...it}=t;return(0,v.jsxs)(S,{...it,size:e,rounded:o,fillMode:n,hover:T,focus:M,valid:P,invalid:B,required:xe,loading:K,disabled:se,readonly:Le,className:i(t.className,tt),children:[f&&(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(Qe,{children:f}),a&&(0,v.jsx)(Ce,{})]}),(0,v.jsx)(z,{placeholder:y,value:N,type:x}),d&&(0,v.jsx)(E,{valid:P,invalid:B,loading:K,disabled:se}),(0,v.jsx)(X,{loading:K,disabled:se}),c&&(0,v.jsx)(O,{loading:K,disabled:se,readonly:Le,value:N}),u&&(0,v.jsxs)(v.Fragment,{children:[a&&(0,v.jsx)(Ce,{}),(0,v.jsx)(Ye,{children:u})]})]})};q.states=jt;q.options=eo;q.className=tt;q.defaultOptions=L;var to=require("react/jsx-runtime");var nt=require("react/jsx-runtime");var I=require("react/jsx-runtime"),fe="k-button",oo=[s.hover,s.focus,s.active,s.selected,s.disabled],no={size:[l.small,l.medium,l.large],rounded:[p.small,p.medium,p.large,p.full],fillMode:[m.solid,m.flat,m.outline,m.clear,m.link],themeColor:[r.base,r.primary,r.secondary,r.tertiary,r.success,r.warning,r.error,r.info,r.light,r.dark,r.inverse]},w={size:l.medium,rounded:p.medium,fillMode:m.solid,themeColor:r.base,showArrow:!1,arrowIconName:"caret-alt-down"},H=t=>{let{size:e=w.size,rounded:o=w.rounded,fillMode:n=w.fillMode,themeColor:a=w.themeColor,showArrow:c=w.showArrow,arrowIconName:d=w.arrowIconName,hover:f,focus:u,active:x,selected:N,disabled:y,icon:T,text:M,iconClassName:P,...B}=t,xe=T!==void 0,K=t.children!==void 0;return(0,I.jsxs)("button",{...B,className:i(t.className,fe,h(fe,{size:e,rounded:o,fillMode:n,themeColor:a}),V(fe,{hover:f,focus:u,active:x,disabled:y,selected:N}),{"k-icon-button":!M&&!K&&xe}),children:[T&&(0,I.jsx)(b,{className:i(P,"k-button-icon"),icon:T}),M?(0,I.jsxs)(I.Fragment,{children:[M&&(0,I.jsx)("span",{className:"k-button-text",children:M}),t.children]}):t.children&&(0,I.jsx)("span",{className:"k-button-text",children:t.children}),c&&(0,I.jsx)("span",{className:"k-menu-button-arrow k-button-arrow",children:(0,I.jsx)(b,{icon:d})})]})};H.states=oo;H.options=no;H.className=fe;H.defaultOptions=w;var ao=require("react/jsx-runtime");var so=require("react/jsx-runtime");var io=require("react/jsx-runtime");var at=require("react/jsx-runtime");var g=require("react/jsx-runtime"),st="k-actionsheet-titlebar",lo={},ne=t=>{let{title:e,subtitle:o,actionsStart:n,actionsEnd:a,filter:c,input:d,inputValue:f,inputPlaceholder:u,adaptive:x,children:N,...y}=t;return(0,g.jsxs)("div",{...y,className:i(t.className,st),children:[(0,g.jsxs)("div",{className:"k-actionsheet-titlebar-group",children:[n&&(0,g.jsx)("div",{className:"k-actionsheet-actions",children:n}),!N&&(0,g.jsxs)("div",{className:"k-actionsheet-title",children:[e&&(0,g.jsx)("div",{className:"k-text-center",children:e}),o&&(0,g.jsx)("div",{className:"k-actionsheet-subtitle k-text-center",children:o})]}),N&&(0,g.jsx)("div",{className:"k-actionsheet-title",children:N}),a&&(0,g.jsx)("div",{className:"k-actionsheet-actions",children:a})]}),(d||c)&&(0,g.jsx)("div",{className:"k-actionsheet-titlebar-group k-actionsheet-filter",children:d?(0,g.jsx)(q,{value:f,placeholder:u,size:x?"large":"medium"}):(0,g.jsx)(J,{placeholder:"Filter",size:x?"large":"medium"})})]})};ne.className=st;ne.defaultOptions=lo;var D=require("react/jsx-runtime"),ze="k-actionsheet-view",ro=[],co={},po={},G=t=>{let{adaptive:e,animated:o,children:n,header:a,footer:c,...d}=t,f=(a==null?void 0:a.type)===ne&&(0,D.jsx)(ne,{adaptive:e,...a==null?void 0:a.props}),u=(c==null?void 0:c.type)===be&&(0,D.jsx)(be,{...c==null?void 0:c.props});return(0,D.jsxs)("div",{...d,className:i(t.className,ze,{[`${ze}-animated`]:o}),children:[f,(0,D.jsx)("div",{className:"k-actionsheet-content",children:n}),u]})};G.states=ro;G.options=co;G.className=ze;G.defaultOptions=po;var R=require("react/jsx-runtime"),Ee="k-actionsheet",mo=[],uo={},ae={side:"bottom",fullscreen:!1,adaptive:!1,overlay:!0},U=t=>{let{side:e=ae.side,fullscreen:o=ae.fullscreen,adaptive:n=ae.adaptive,overlay:a=ae.overlay,template:c,children:d,header:f,footer:u,...x}=t;return(0,R.jsxs)("div",{className:"k-actionsheet-container",children:[a&&(0,R.jsx)("div",{className:"k-overlay"}),(0,R.jsx)($,{animationStyle:{[`${o===!0?"top":e}`]:0,[`${o===!0?"width":null}`]:"100%",[`${o===!0?"height":null}`]:"100%",[`${e==="top"||e==="bottom"?"width":null}`]:"100%",[`${e==="left"||e==="right"?"height":null}`]:"100%"},children:(0,R.jsx)("div",{...x,className:i(t.className,Ee,{[`k-actionsheet-${e}`]:o===!1,"k-actionsheet-fullscreen":o===!0,"k-adaptive-actionsheet":n}),children:c||(0,R.jsx)(G,{header:f,footer:u,adaptive:n,...t,children:d})})})]})};U.states=mo;U.options=uo;U.className=Ee;U.defaultOptions=ae;var fo=U;