@progress/kendo-themes-html
Version:
A collection of HTML helpers used for developing Kendo UI themes
2 lines (1 loc) • 20.8 kB
JavaScript
var ft=Object.create;var oe=Object.defineProperty;var xt=Object.getOwnPropertyDescriptor;var Mt=Object.getOwnPropertyNames;var bt=Object.getPrototypeOf,ht=Object.prototype.hasOwnProperty;var Nt=(e,t)=>{for(var o in t)oe(e,o,{get:t[o],enumerable:!0})},Ce=(e,t,o,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Mt(t))!ht.call(e,n)&&n!==o&&oe(e,n,{get:()=>t[n],enumerable:!(a=xt(t,n))||a.enumerable});return e};var It=(e,t,o)=>(o=e!=null?ft(bt(e)):{},Ce(t||!e||!e.__esModule?oe(o,"default",{value:e,enumerable:!0}):o,e)),kt=e=>Ce(oe({},"__esModule",{value:!0}),e);var lo={};Nt(lo,{ContextMenuExpanded:()=>io});module.exports=kt(lo);var i=(...e)=>e.filter(t=>t!==!0&&!!t).map(t=>Array.isArray(t)?i(...t):typeof t=="object"?Object.keys(t).map((o,a)=>t[a]||t[o]&&o||null).filter(o=>o!==null).join(" "):t).filter(t=>!!t).join(" ");var R=(e,t)=>i({[`${e}-xs`]:t.size==="xsmall",[`${e}-sm`]:t.size==="small",[`${e}-md`]:t.size==="medium",[`${e}-lg`]:t.size==="large",[`${e}-xl`]:t.size==="xlarge",[`${e}-xxl`]:t.size==="xxlarge",[`${e}-xxxl`]:t.size==="xxxlarge"},{[`${e}-${t.fillMode}`]:t.fillMode},{[`${e}-${t.themeColor}`]:t.themeColor},{"k-rounded-sm":t.rounded==="small","k-rounded-md":t.rounded==="medium","k-rounded-lg":t.rounded==="large","k-rounded-full":t.rounded==="full","k-rounded-none":t.rounded==="none"}),V=(e,t)=>{let{valid:o,invalid:a,hover:n,focus:l,checked:m,active:u,selected:v,disabled:g,indeterminate:p,loading:x,empty:d,readonly:z,highlighted:F,...w}=t;return i({"k-valid":o,"k-invalid":a,"k-hover":n,"k-focus":l,"k-checked":m,"k-active":u,"k-selected":v,"k-disabled":g,"k-indeterminate":p&&!m,"k-loading":x,"k-empty":d,"k-readonly":z,"k-highlighted":F},Object.keys(w).reduce((I,L)=>(L.startsWith("k-")?I[L]=w[L]:I[`k-${L}`]=w[L],I),{}))};function we(e,t){if(!t)return{};let o=Array.isArray(t)?t:[t];return Object.fromEntries(o.map(a=>[`k-${a}`,!0]))}var s={undefined:void 0,xsmall:"xsmall",small:"small",medium:"medium",large:"large",xlarge:"xlarge",xxlarge:"xxlarge",xxxlarge:"xxxlarge"},X={undefined:void 0,none:"none",small:"small",medium:"medium",large:"large",full:"full"},W={undefined:void 0,solid:"solid",flat:"flat",outline:"outline",clear:"clear",link:"link"},_={undefined:void 0,outline:"outline",solid:"solid",duotone:"duotone"},r={undefined:void 0,inherit:"inherit",base:"base",primary:"primary",secondary:"secondary",tertiary:"tertiary",info:"info",success:"success",warning:"warning",error:"error",inverse:"inverse"},f={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 Z=require("react/jsx-runtime"),ie="k-font-icon",gt=[],vt={size:[s.undefined,s.xsmall,s.small,s.medium,s.large,s.xlarge,s.xxlarge,s.xxxlarge],themeColor:[r.undefined,r.base,r.primary,r.secondary,r.tertiary,r.success,r.warning,r.error,r.info]},Et={},j=e=>{let{size:t,themeColor:o,icon:a,rotate:n,flip:l,...m}=e;return a?(0,Z.jsx)("span",{...m,className:i(e.className,ie,R(ie,{size:t}),{[`k-i-${a}`]:a,[`k-color-${o}`]:o,[`k-rotate-${n}`]:n,"k-flip-h":l==="h"||l==="both","k-flip-v":l==="v"||l==="both"}),"aria-hidden":"true"}):(0,Z.jsx)(Z.Fragment,{})};j.states=gt;j.options=vt;j.className=ie;j.defaultOptions=Et;var _e=j;var G=require("react/jsx-runtime"),le="k-svg-icon",Lt=[],At={size:[s.undefined,s.xsmall,s.small,s.medium,s.large,s.xlarge,s.xxlarge,s.xxxlarge],themeColor:[r.undefined,r.base,r.primary,r.secondary,r.tertiary,r.success,r.warning,r.error,r.info],variant:[_.outline,_.solid,_.duotone]},me={viewBox:"0 0 24 24",variant:_.outline},ee=e=>{var x,d;let{size:t,themeColor:o,rotate:a,flip:n,viewBox:l=me.viewBox,variant:m=me.variant,icon:u,...v}=e;if(!u)return(0,G.jsx)(G.Fragment,{});if(u==="none")return(0,G.jsx)("span",{...v,className:i(e.className,le,R("k-icon",{size:t}),"k-none"),"aria-hidden":"true"});let g=typeof u=="object"&&u.name&&u.name,p=typeof u=="object"?m&&((x=u.variants)==null?void 0:x[m])||((d=u.variants)==null?void 0:d.outline)||u.content:void 0;return(0,G.jsx)("span",{...v,className:i(e.className,le,R("k-icon",{size:t}),{[`k-svg-i-${g}`]:g,[`k-color-${o}`]:o,[`k-rotate-${a}`]:a,"k-flip-h":n==="h"||n==="both","k-flip-v":n==="v"||n==="both"}),"aria-hidden":"true",children:(0,G.jsx)("svg",{"aria-hidden":!0,focusable:!1,xmlns:"http://www.w3.org/2000/svg",viewBox:typeof u=="object"?u.viewBox:l,dangerouslySetInnerHTML:p!==void 0?{__html:p}:void 0,children:u?void 0:e.children})})};ee.states=Lt;ee.options=At;ee.className=le;ee.defaultOptions=me;var ue=ee;var ce=It(require("@progress/kendo-svg-icons"));var Pe="icon",Re="icons";var Ue=require("react");var Ke=require("react"),Be=(0,Ke.createContext)({iconsType:"svg"});var K=require("react/jsx-runtime"),ne="k-icon",yt=e=>e.replace(/([-_][a-z0-9])/gi,t=>t.toUpperCase().replace("-","").replace("_","")),Ot=[],St={size:[s.undefined,s.xsmall,s.small,s.medium,s.large,s.xlarge,s.xxlarge,s.xxxlarge],themeColor:[r.undefined,r.base,r.primary,r.secondary,r.tertiary,r.success,r.warning,r.error,r.info],variant:[_.outline,_.solid,_.duotone]},re={viewBox:"0 0 24 24",type:"svg",variant:_.outline},M=e=>{let{iconsType:t}=(0,Ue.useContext)(Be),{size:o,themeColor:a,icon:n,type:l=t||re.type,rotate:m,flip:u,viewBox:v=re.viewBox,variant:g=re.variant,...p}=e;if(!n)return(0,K.jsx)(K.Fragment,{});if((t||l)==="svg"){if(n==="none")return(0,K.jsx)(ue,{...p,className:i(e.className,ne),icon:n,size:o,variant:g});let d=ce[n]?n:yt(`${n}-icon`);return ce[d]?(0,K.jsx)(ue,{...p,className:i(e.className,ne),icon:ce[d],size:o,themeColor:a,rotate:m,flip:u,viewBox:v,variant:g}):(0,K.jsx)(K.Fragment,{})}return(0,K.jsx)(_e,{...p,className:i(e.className,ne),icon:n,size:o,themeColor:a,rotate:m,flip:u})};M.states=Ot;M.options=St;M.defaultOptions=re;M.className=ne;M.moduleName=Pe;M.folderName=Re;M.ariaSpec={selector:".k-icon, .k-svg-icon",rules:[{selector:".k-icon, .k-svg-icon",attribute:"aria-hidden=true",usage:"Hides the icon element and all its children from assistive technologies."}]};var A="menu",S=A;var B=require("react/jsx-runtime"),pe="k-menu-item",Tt=[f.hover,f.focus,f.active,f.selected,f.disabled],Ct={},He={iconPosition:"before"},k=e=>{let{hover:t,focus:o,active:a,selected:n,disabled:l,icon:m,text:u,first:v,last:g,showArrow:p,arrowIconName:x,iconPosition:d=He.iconPosition,dir:z,children:F,expanded:w,...I}=e,L=x;return L||(L=z==="rtl"?"chevron-left":"chevron-right"),(0,B.jsxs)("li",{...I,className:i(e.className,pe,"k-item",V(pe,{focus:o,disabled:l,hover:t,active:a,selected:n}),{"k-first":v,"k-last":g}),role:"menuitem",...p&&{"aria-haspopup":"menu"},...p&&{"aria-expanded":w?"true":"false"},...l&&{"aria-disabled":"true"},...o&&{tabIndex:0},children:[(0,B.jsxs)("span",{className:i("k-link k-menu-link"),children:[m&&d==="before"&&(0,B.jsx)(M,{className:"k-menu-link-icon",icon:m}),(0,B.jsx)("span",{className:"k-menu-link-text",children:u}),m&&d==="after"&&(0,B.jsx)(M,{className:"k-menu-link-icon",icon:m}),p&&(0,B.jsx)("span",{className:"k-menu-expand-arrow","aria-hidden":"true",children:(0,B.jsx)(M,{icon:L})})]}),F]})};k.states=Tt;k.options=Ct;k.className=pe;k.defaultOptions=He;k.moduleName=A;k.folderName=S;var U=require("react/jsx-runtime"),de="k-menu-item",wt=[f.hover,f.focus,f.active,f.selected,f.disabled],_t={},fe={dir:"ltr",iconPosition:"before"},b=e=>{let{hover:t,focus:o,active:a,selected:n,disabled:l,icon:m,text:u,first:v,last:g,showArrow:p,arrowIconName:x,iconPosition:d=fe.iconPosition,dir:z=fe.dir,children:F,popup:w,expanded:I,...L}=e,D=x;return D||(D=z==="rtl"?"chevron-left":"chevron-right"),(0,U.jsxs)("li",{role:"menuitem",...L,className:i(e.className,de,"k-item",V(de,{focus:o,disabled:l}),{"k-first":v,"k-last":g}),...p&&{"aria-haspopup":"menu"},...p&&{"aria-expanded":I?"true":"false"},...l&&{"aria-disabled":"true"},...o&&{tabIndex:0},children:[(0,U.jsxs)("span",{className:i("k-link k-menu-link",V("k-menu-link",{hover:t,active:a,selected:n,disabled:l})),children:[m&&d==="before"&&(0,U.jsx)(M,{className:"k-menu-link-icon",icon:m}),(0,U.jsx)("span",{className:"k-menu-link-text",children:u}),m&&d==="after"&&(0,U.jsx)(M,{className:"k-menu-link-icon",icon:m}),p&&(0,U.jsx)("span",{className:"k-menu-expand-arrow","aria-hidden":"true",children:(0,U.jsx)(M,{icon:D})})]}),F,w]})};b.states=wt;b.options=_t;b.className=de;b.defaultOptions=fe;b.moduleName=A;b.folderName=S;var xe="button",ze=xe;var y=require("react/jsx-runtime"),te="k-button",Pt=["icon-button"],Rt=[f.hover,f.focus,f.active,f.selected,f.disabled,f.generating],Kt={size:[s.undefined,s.xsmall,s.small,s.medium,s.large],rounded:[X.undefined,X.none,X.small,X.medium,X.large,X.full],fillMode:[W.undefined,W.solid,W.flat,W.outline,W.clear,W.link],themeColor:[r.undefined,r.base,r.primary,r.secondary,r.tertiary,r.success,r.warning,r.error,r.info,r.inverse]},Me={showArrow:!1,arrowIconName:"chevron-down"},c=e=>{let{as:t="button",size:o,rounded:a,fillMode:n,themeColor:l,showArrow:m=Me.showArrow,arrowIconName:u=Me.arrowIconName,variant:v,hover:g,focus:p,active:x,selected:d,disabled:z,togglable:F,ariaDisabled:w,icon:I,iconSize:L,text:D,iconClassName:mt,className:ut,...ct}=e,pt=I!=null,dt=e.children!==void 0;return(0,y.jsxs)(t,{className:i(ut,te,we(te,v),R(te,{size:o,rounded:a,fillMode:n,themeColor:l}),V(te,{hover:g,focus:p,active:x,disabled:z||w,selected:d}),{"k-icon-button":!D&&!dt&&pt}),"aria-pressed":F?d?"true":"false":void 0,...ct,"aria-disabled":w?"true":void 0,disabled:z||void 0,children:[typeof I=="string"&&I&&(0,y.jsx)(M,{className:i(mt,"k-button-icon"),icon:I,size:L}),I&&typeof I!="string"&&(0,y.jsx)(y.Fragment,{children:I}),D?(0,y.jsxs)(y.Fragment,{children:[D&&(0,y.jsx)("span",{className:"k-button-text",children:D}),e.children]}):e.children&&(0,y.jsx)("span",{className:"k-button-text",children:e.children}),m&&(0,y.jsx)("span",{className:"k-menu-button-arrow k-button-arrow",children:(0,y.jsx)(M,{icon:u})})]})};c.states=Rt;c.options=Kt;c.variants=Pt;c.className=te;c.defaultOptions=Me;c.moduleName=xe;c.folderName=ze;c.ariaSpec={selector:".k-button",rules:[{selector:".k-button",attribute:"role=button or nodeName=button",usage:"The button role is implicit from the native <button> element."},{selector:".k-button",attribute:"aria-label (when icon-only)",usage:"Required for icon-only buttons that have no visible text."},{selector:".k-button",attribute:"aria-pressed (when togglable)",usage:"Indicates the pressed state of a toggle button."},{selector:".k-button",attribute:"disabled (when disabled)",usage:"Rendered when the button is disabled."}]};var $e=require("react/jsx-runtime"),De=e=>(0,$e.jsx)(c,{icon:"folder",...e,"aria-label":e["aria-label"]||"Folder",children:void 0});var Ve=require("react/jsx-runtime"),Fe=e=>(0,Ve.jsx)(c,{icon:"folder",children:"Button",...e});var We=require("react/jsx-runtime"),Xe=e=>(0,We.jsx)(c,{children:"Button",...e});var se=require("react/jsx-runtime"),Bt=c.options,Ut=c.states,Ht={...c.defaultOptions,variant:"text"},zt=[{name:"icon-only",title:"Icon Only"},{name:"icon-and-text",title:"Icon & Text"},{name:"text",title:"Text"}],Dt=[],q=e=>{let{variant:t,...o}=e;switch(t){case"icon-only":return(0,se.jsx)(De,{...o,icon:"star"});case"icon-and-text":return(0,se.jsx)(Fe,{...o,icon:"star",children:"Button"});default:return(0,se.jsx)(Xe,{...o,children:"Button"})}};q.options=Bt;q.states=Ut;q.variants=zt;q.defaultOptions=Ht;q.modifiers=Dt;q.className=c.className;var qe=require("react/jsx-runtime"),Ge="k-menu-scroll-wrapper",$t=[],Ft={},Vt={},J=e=>{let{className:t,children:o,orientation:a,...n}=e;return(0,qe.jsx)("div",{...n,className:i(t,Ge,{"k-menu-scroll-wrapper-vertical":a==="vertical"}),children:o})};J.states=$t;J.options=Ft;J.className=Ge;J.defaultOptions=Vt;J.moduleName=A;J.folderName=S;var Je=J;var N=require("react/jsx-runtime"),be="k-menu",Xt=[],Wt={},ae={orientation:"horizontal",header:!0,scrollButtonsPosition:"around"},h=e=>{let{children:t,orientation:o=ae.orientation,header:a=ae.header,scrollable:n,scrollButtonsPosition:l=ae.scrollButtonsPosition,wrapperStyles:m,dir:u,popup:v,contextMenu:g,...p}=e,x={horizontal:{prev:u!=="rtl"?"left":"right",next:u!=="rtl"?"right":"left"},vertical:{prev:"up",next:"down"}},d=(0,N.jsx)("ul",{dir:u,...p,className:i(e.className,"k-reset",be,{[`${be}-${o}`]:o,"k-header":a}),role:g?"menu":"menubar",...o==="vertical"&&{"aria-orientation":"vertical"},children:t});return(0,N.jsxs)(N.Fragment,{children:[n?(0,N.jsxs)(Je,{orientation:o,style:m,dir:e.dir,children:[l==="start"&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(c,{fillMode:"flat",icon:`chevron-${x[o].prev}`,className:"k-menu-scroll-button k-menu-scroll-button-prev",tabIndex:-1,"aria-label":"Scroll previous"}),(0,N.jsx)(c,{fillMode:"flat",icon:`chevron-${x[o].next}`,className:"k-menu-scroll-button k-menu-scroll-button-next",tabIndex:-1,"aria-label":"Scroll next"})]}),l==="around"&&(0,N.jsx)(c,{fillMode:"flat",icon:`chevron-${x[o].prev}`,className:"k-menu-scroll-button k-menu-scroll-button-prev",tabIndex:-1,"aria-label":"Scroll previous"}),d,l==="end"&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(c,{fillMode:"flat",icon:`chevron-${x[o].prev}`,className:"k-menu-scroll-button k-menu-scroll-button-prev",tabIndex:-1,"aria-label":"Scroll previous"}),(0,N.jsx)(c,{fillMode:"flat",icon:`chevron-${x[o].next}`,className:"k-menu-scroll-button k-menu-scroll-button-next",tabIndex:-1,"aria-label":"Scroll next"})]}),l==="around"&&(0,N.jsx)(c,{fillMode:"flat",icon:`chevron-${x[o].next}`,className:"k-menu-scroll-button k-menu-scroll-button-next",tabIndex:-1,"aria-label":"Scroll next"})]}):d,v]})};h.states=Xt;h.options=Wt;h.className=be;h.defaultOptions=ae;h.moduleName=A;h.folderName=S;h.ariaSpec={selector:".k-menu",rules:[{selector:".k-menu:not(.k-context-menu)",attribute:"role=menubar",usage:"Announces the Menu menubar role."},{selector:".k-menu.k-menu-vertical",attribute:"aria-orientation=vertical",usage:"Announces the Menu orientation when vertical."},{selector:".k-menu-item",attribute:"role=menuitem",usage:"Announces the Menu item role."},{selector:".k-menu-item",attribute:"aria-haspopup=menu (when present)",usage:"Indicates a popup menu is associated with the item."},{selector:".k-menu-item",attribute:"aria-expanded=true/false (when present)",usage:"Indicates whether the submenu is expanded."},{selector:".k-menu-item.k-disabled",attribute:"aria-disabled=true",usage:"Informs assistive technologies that a Menu item is disabled."},{selector:".k-menu-expand-arrow",attribute:"aria-hidden=true",usage:"Expand arrow elements are hidden from assistive technologies."},{selector:".k-menu-popup .k-menu-group",attribute:"role=menu",usage:"The role of the nested menu displayed in a popup."},{selector:".k-menu-scroll-button",attribute:"tabindex=-1",usage:"Scroll buttons are removed from the tab sequence."},{selector:".k-menu-scroll-button",attribute:"aria-label",usage:"Scroll buttons have an accessible label."},{selector:".k-menu-item.k-focus",attribute:"tabindex=0",usage:"The focused item has tabindex 0."},{selector:".k-menu-item",attribute:"aria-controls=ul.k-menu-group id (when present)",usage:"Points to the ID of the submenu. Only present when the item controls a submenu element."},{selector:".k-menu-popup .k-menu-group",attribute:"id",usage:"Each nested menu has a deterministic id linked to the parent aria-controls."}]};var Ye=require("react/jsx-runtime"),he="k-separator",Qe={orientation:"horizontal"},Q=e=>{let{orientation:t=Qe.orientation,...o}=e;return(0,Ye.jsx)("li",{...o,className:i(e.className,"k-item",he,{[`${he}-${t}`]:t}),role:"separator"})};Q.className=he;Q.defaultOptions=Qe;Q.moduleName=A;Q.folderName=S;var Ze=require("react/jsx-runtime");var je=require("react/jsx-runtime"),Ne="k-menu-group",Gt=[],Jt={size:[s.undefined,s.small,s.medium,s.large]},qt={},O=e=>{let{children:t,size:o,...a}=e;return(0,je.jsx)("ul",{role:"menu",...a,className:i(e.className,Ne,R(Ne,{size:o})),children:t})};O.states=Gt;O.options=Jt;O.className=Ne;O.defaultOptions=qt;O.moduleName=A;O.folderName=S;var C=require("react/jsx-runtime"),Ie=e=>(0,C.jsx)(h,{children:(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(k,{first:!0,text:"Item 1"}),(0,C.jsx)(k,{showArrow:!0,arrowIconName:"chevron-down",text:"Item 2"}),(0,C.jsx)(k,{showArrow:!0,arrowIconName:"chevron-down",text:"Item 3"}),(0,C.jsx)(k,{text:"Item 4"}),(0,C.jsx)(k,{last:!0,text:"Item 5"})]}),...e});var ke="popup",et=ke;var ve=require("react/jsx-runtime"),tt="k-animation-container",Qt=[],Yt={},ge={positionMode:"absolute",shown:!0},$=e=>{let{positionMode:t=ge.positionMode,shown:o=ge.shown,animationStyle:a,offset:n,...l}=e;return(0,ve.jsx)("div",{...l,style:{...n,...e.style},className:i(e.className,tt,{"k-animation-container-shown":o,"k-animation-container-fixed":t==="fixed"}),children:(0,ve.jsx)("div",{className:"k-child-animation-container",style:a,children:e.children})})};$.states=Qt;$.options=Yt;$.className=tt;$.defaultOptions=ge;$.moduleName=ke;$.folderName=et;var Ee="popup",ot=Ee;var Le=require("react/jsx-runtime"),nt="k-popup",Zt=[],jt={},rt={positionMode:"absolute"},T=e=>{let{offset:t,positionMode:o=rt.positionMode,animationStyle:a,containerClassName:n,containerRole:l,containerAriaLabel:m,...u}=e;return(0,Le.jsx)($,{positionMode:o,offset:t,animationStyle:a,className:n,role:l,"aria-label":m,children:(0,Le.jsx)("div",{...u,className:i(e.className,nt),children:e.children})})};T.states=Zt;T.options=jt;T.className=nt;T.defaultOptions=rt;T.moduleName=Ee;T.folderName=ot;T.ariaSpec={selector:".k-popup",rules:[{selector:".k-animation-container",attribute:"role (when appended to body)",usage:'Container gets role="region" when appended to document body. Popup is a building block \u2014 ARIA semantics come from consuming components.'}]};var Ae=require("react/jsx-runtime");var ye=require("react/jsx-runtime");var Oe=require("react/jsx-runtime");var Se=require("react/jsx-runtime");var P=require("react/jsx-runtime"),eo={...h.options,scrollable:{type:"boolean"}},to=h.states,st={...h.defaultOptions,variant:"horizontal"},oo=[{name:"horizontal",title:"Horizontal"},{name:"vertical",title:"Vertical"}],no=[{name:"opened",title:"Opened"}],Y=e=>{let{variant:t,modifiers:o,...a}={...st,...e},n={},l=t==="vertical"?{left:"200px",top:"30px"}:{left:"90px",top:"auto"};return Object.keys(o||{}).forEach(m=>{m==="opened"&&(n.opened=!!(o!=null&&o[m]),n.popup=o!=null&&o[m]?(0,P.jsx)(T,{className:"k-menu-popup",offset:l,children:(0,P.jsxs)(O,{children:[(0,P.jsx)(b,{text:"Item 1"}),(0,P.jsx)(b,{text:"Item 2"}),(0,P.jsx)(Q,{}),(0,P.jsx)(b,{text:"Item 3"})]})}):null)}),t==="vertical"?(0,P.jsx)(Ie,{...a,...n,orientation:"vertical",style:{width:"200px"}}):(0,P.jsx)(Ie,{...a,...n})};Y.options=eo;Y.states=to;Y.variants=oo;Y.defaultOptions=st;Y.modifiers=no;Y.className=h.className;var Te="context-menu",at=Te;var lt=require("react/jsx-runtime"),it="k-context-menu",ro=[],so={},ao={},H=e=>{let{children:t,...o}=e;return(0,lt.jsx)(O,{...o,className:i(e.className,it),role:"menu",children:t})};H.states=ro;H.options=so;H.className=it;H.defaultOptions=ao;H.moduleName=Te;H.folderName=at;H.ariaSpec={selector:".k-context-menu",rules:[{selector:".k-context-menu",attribute:"role=menu",usage:"The context menu implements the menu role."},{selector:".k-menu-item",attribute:"role=menuitem",usage:"Announces the Menu item role."},{selector:".k-menu-item",attribute:"aria-haspopup=menu (when present)",usage:"Indicates a popup menu is associated with the item."},{selector:".k-menu-item",attribute:"aria-expanded=true/false (when present)",usage:"Indicates whether the submenu is expanded."},{selector:".k-menu-item.k-disabled",attribute:"aria-disabled=true",usage:"Informs assistive technologies that a Menu item is disabled."},{selector:".k-menu-expand-arrow",attribute:"aria-hidden=true",usage:"Expand arrow elements are hidden from assistive technologies."},{selector:".k-menu-item.k-focus",attribute:"tabindex=0",usage:"The focused item has tabindex 0."},{selector:".k-menu-item",attribute:"aria-controls=ul.k-menu-group id (when present)",usage:"Points to the ID of the submenu."},{selector:".k-menu-popup .k-menu-group",attribute:"id",usage:"Each nested menu has an id linked to parent aria-controls."}]};var E=require("react/jsx-runtime"),io=e=>(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(H,{children:[(0,E.jsx)(b,{first:!0,text:"Item 1",focus:!0},"menu-item-1"),(0,E.jsx)(b,{text:"Item 2",showArrow:!0,expanded:!0,"aria-controls":"ctx-submenu-1"},"menu-item-2"),(0,E.jsx)(b,{text:"Item 3",disabled:!0},"menu-item-3"),(0,E.jsx)(b,{last:!0,text:"Item 4"},"menu-item-4")],...e}),(0,E.jsx)(T,{className:"k-menu-popup",offset:{left:"90px",top:"auto"},children:(0,E.jsxs)(O,{id:"ctx-submenu-1",children:[(0,E.jsx)(b,{first:!0,text:"Sub item 1"}),(0,E.jsx)(b,{last:!0,text:"Sub item 2"})]})})]});