UNPKG

@progress/kendo-themes-html

Version:

A collection of HTML helpers used for developing Kendo UI themes

2 lines (1 loc) 3.36 kB
var u=Object.defineProperty;var W=Object.getOwnPropertyDescriptor;var w=Object.getOwnPropertyNames;var E=Object.prototype.hasOwnProperty;var D=(n,e)=>{for(var t in e)u(n,t,{get:e[t],enumerable:!0})},N=(n,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of w(e))!E.call(n,r)&&r!==t&&u(n,r,{get:()=>e[r],enumerable:!(i=W(e,r))||i.enumerable});return n};var _=n=>N(u({},"__esModule",{value:!0}),n);var O={};D(O,{WIZZARD_CLASSNAME:()=>o,Wizard:()=>a,default:()=>L});module.exports=_(O);var l=(...n)=>n.filter(e=>e!==!0&&!!e).map(e=>Array.isArray(e)?l(...e):typeof e=="object"?Object.keys(e).map((t,i)=>e[i]||e[t]&&t||null).filter(t=>t!==null).join(" "):e).filter(e=>!!e).join(" ");var g=(n,e)=>{let{valid:t,invalid:i,hover:r,focus:p,checked:f,active:v,selected:z,disabled:y,indeterminate:A,loading:$,empty:M,readonly:R,highlighted:S,...d}=e;return l({"k-valid":t,"k-invalid":i,"k-hover":r,"k-focus":p,"k-checked":f,"k-active":v,"k-selected":z,"k-disabled":y,"k-indeterminate":A&&!f,"k-loading":$,"k-empty":M,"k-readonly":R,"k-highlighted":S},Object.keys(d).reduce((c,s)=>(s.startsWith("k-")?c[s]=d[s]:c[`k-${s}`]=d[s],c),{}))};var h={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 m="wizard",b=m;var x=require("react/jsx-runtime"),o="k-wizard",I=[h.disabled],K={},k={orientation:"horizontal",contentPosition:"right"},a=n=>{let{disabled:e,orientation:t=k.orientation,contentPosition:i=k.contentPosition,...r}=n;return(0,x.jsx)("div",{...r,className:l(n.className,o,g(o,{disabled:e}),{[`${o}-${t}`]:t,[`${o}-${i}`]:i&&t!=="horizontal"}),children:n.children})};a.states=I;a.options=K;a.className=o;a.defaultOptions=k;a.moduleName=m;a.folderName=b;a.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 L=a;