UNPKG

@progress/kendo-themes-html

Version:

A collection of HTML helpers used for developing Kendo UI themes

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