UNPKG

@progress/kendo-themes-html

Version:

A collection of HTML helpers used for developing Kendo UI themes

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