@progress/kendo-themes-html
Version:
A collection of HTML helpers used for developing Kendo UI themes
2 lines (1 loc) • 2.37 kB
JavaScript
var d=(...l)=>l.filter(e=>e!==!0&&!!e).map(e=>Array.isArray(e)?d(...e):typeof e=="object"?Object.keys(e).map((t,u)=>e[u]||e[t]&&t||null).filter(t=>t!==null).join(" "):e).filter(e=>!!e).join(" ");var m=(l,e)=>d({[`${l}-xs`]:e.size==="xsmall",[`${l}-sm`]:e.size==="small",[`${l}-md`]:e.size==="medium",[`${l}-lg`]:e.size==="large",[`${l}-xl`]:e.size==="xlarge",[`${l}-xxl`]:e.size==="xxlarge",[`${l}-xxxl`]:e.size==="xxxlarge"},{[`${l}-${e.fillMode}`]:e.fillMode},{[`${l}-${e.fillMode}-${e.themeColor}`]:e.fillMode&&e.themeColor},{[`${l}-${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"}),f=(l,e)=>d({"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 n={xsmall:"xsmall",small:"small",medium:"medium",large:"large",xlarge:"xlarge",xxlarge:"xxlarge",xxxlarge:"xxxlarge"},a={small:"small",medium:"medium",large:"large",full:"full"},o={solid:"solid",flat:"flat",outline:"outline",clear:"clear",link:"link"};var i={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"};import{jsx as S}from"react/jsx-runtime";var s="k-picker",z=[i.hover,i.focus,i.valid,i.invalid,i.required,i.disabled,i.loading,i.readonly],$={size:[n.small,n.medium,n.large],rounded:[a.small,a.medium,a.large,a.full],fillMode:[o.solid,o.flat,o.outline]},c={size:n.medium,rounded:a.medium,fillMode:o.solid},r=l=>{let{hover:e,focus:t,disabled:u,invalid:x,valid:k,loading:h,readonly:g,size:y=c.size,rounded:v=c.rounded,fillMode:M=c.fillMode,...b}=l;return S("span",{...b,className:d(l.className,s,m(s,{size:y,rounded:v,fillMode:M}),f(s,{hover:e,focus:t,disabled:u,invalid:x,valid:k,loading:h,readonly:g})),children:l.children})};r.states=z;r.options=$;r.className=s;r.defaultOptions=c;var E=r;export{s as PICKER_CLASSNAME,r as Picker,E as default,$ as pickerOptions,z as pickerStates};