UNPKG

@progress/kendo-themes-html

Version:

A collection of HTML helpers used for developing Kendo UI themes

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