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