UNPKG

@progress/kendo-themes-html

Version:

A collection of HTML helpers used for developing Kendo UI themes

2 lines (1 loc) 2.18 kB
var r=(...t)=>t.filter(e=>e!==!0&&!!e).map(e=>Array.isArray(e)?r(...e):typeof e=="object"?Object.keys(e).map((o,i)=>e[i]||e[o]&&o||null).filter(o=>o!==null).join(" "):e).filter(e=>!!e).join(" ");var a=(t,e)=>r({[`${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.themeColor}`]:e.themeColor},{"k-rounded-sm":e.rounded==="small","k-rounded-md":e.rounded==="medium","k-rounded-lg":e.rounded==="large","k-rounded-full":e.rounded==="full","k-rounded-none":e.rounded==="none"});var d={undefined:void 0,xsmall:"xsmall",small:"small",medium:"medium",large:"large",xlarge:"xlarge",xxlarge:"xxlarge",xxxlarge:"xxxlarge"};var s="segmented-control",u=s;import{jsx as x,jsxs as f}from"react/jsx-runtime";var l="k-segmented-control",g=[],h={size:[d.undefined,d.small,d.medium,d.large]},n=t=>{let{size:e,stretched:o,children:i,thumbStyles:c,...m}=t;return f("div",{...m,className:r(t.className,l,a(l,{size:e}),{[`${l}-stretched`]:o}),role:"group",children:[x("div",{className:"k-segmented-control-thumb","aria-hidden":"true",style:c}),i]})};n.states=g;n.options=h;n.className=l;n.moduleName=s;n.folderName=u;n.ariaSpec={selector:".k-segmented-control",rules:[{selector:".k-segmented-control",attribute:"role=group",usage:"Sets the proper role for the group of buttons."},{selector:".k-segmented-control-button",attribute:"role=button or nodeName=button",usage:"Each button must have the appropriate button role."},{selector:".k-segmented-control-button.k-selected",attribute:"aria-pressed=true",usage:"Only the selected button within the group will have this attribute set to true."},{selector:".k-segmented-control-button.k-disabled",attribute:"aria-disabled=true",usage:"Indicates that the button is disabled and cannot be interacted with."},{selector:".k-segmented-control-thumb",attribute:"aria-hidden=true",usage:"The thumb is purely decorative and should be hidden from screen readers."}]};var L=n;export{l as SEGMENTED_CONTROL_CLASSNAME,n as SegmentedControl,L as default};