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