@progress/kendo-themes-html
Version:
A collection of HTML helpers used for developing Kendo UI themes
2 lines (1 loc) • 2.92 kB
JavaScript
var o=(...i)=>i.filter(e=>e!==!0&&!!e).map(e=>Array.isArray(e)?o(...e):typeof e=="object"?Object.keys(e).map((t,r)=>e[r]||e[t]&&t||null).filter(t=>t!==null).join(" "):e).filter(e=>!!e).join(" ");var f=(i,e)=>{let{valid:t,invalid:r,hover:l,focus:b,checked:k,active:x,selected:p,disabled:v,indeterminate:z,loading:y,empty:A,readonly:$,highlighted:M,...d}=e;return o({"k-valid":t,"k-invalid":r,"k-hover":l,"k-focus":b,"k-checked":k,"k-active":x,"k-selected":p,"k-disabled":v,"k-indeterminate":z&&!k,"k-loading":y,"k-empty":A,"k-readonly":$,"k-highlighted":M},Object.keys(d).reduce((c,a)=>(a.startsWith("k-")?c[a]=d[a]:c[`k-${a}`]=d[a],c),{}))};var g={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",generating:"generating",expanded:"expanded"};var u="wizard",h=u;import{jsx as W}from"react/jsx-runtime";var s="k-wizard",R=[g.disabled],S={},m={orientation:"horizontal",contentPosition:"right"},n=i=>{let{disabled:e,orientation:t=m.orientation,contentPosition:r=m.contentPosition,...l}=i;return W("div",{...l,className:o(i.className,s,f(s,{disabled:e}),{[`${s}-${t}`]:t,[`${s}-${r}`]:r&&t!=="horizontal"}),children:i.children})};n.states=R;n.options=S;n.className=s;n.defaultOptions=m;n.moduleName=u;n.folderName=h;n.ariaSpec={selector:".k-wizard",rules:[{selector:".k-step-list",attribute:"role=tablist",usage:"Indicates the role of the tablist container element."},{selector:".k-step",attribute:"role=none",usage:"The implicit semantics of the li element must be removed."},{selector:".k-step-link",attribute:"role=tab",usage:"Specifies the role for the step links."},{selector:".k-step-link",attribute:"aria-controls=.k-wizard-step id (when present)",usage:"Refers to the tabpanel element associated with the tab."},{selector:".k-step.k-disabled>.k-step-link",attribute:"aria-disabled=true",usage:"A disabled (inactive) tab."},{selector:".k-step-current .k-step-link",attribute:"aria-selected=true",usage:"Indicates the tab control is activated."},{selector:".k-step-current .k-step-link",attribute:"aria-current=true",usage:"Indicates the current active step."},{selector:".k-step-current .k-step-link",attribute:"tabindex=0",usage:"Current step is in the page tab sequence."},{selector:".k-step:not(.k-step-current) .k-step-link",attribute:"tabindex=-1",usage:"Non-current steps are removed from tab sequence."},{selector:".k-wizard-step",attribute:"role=tabpanel",usage:"Specifies the role of the element."},{selector:".k-wizard-step",attribute:"aria-label",usage:'Specifies a label for the panel (e.g., "Step 2 of 4").'},{selector:".k-wizard-step",attribute:"tabindex=0",usage:"Keeps the tabpanel in the page tab sequence."}]};var q=n;export{s as WIZZARD_CLASSNAME,n as Wizard,q as default};