UNPKG

@progress/kendo-themes-html

Version:

A collection of HTML helpers used for developing Kendo UI themes

2 lines (1 loc) 28.2 kB
var r=(...e)=>e.filter(t=>t!==!0&&!!t).map(t=>Array.isArray(t)?r(...t):typeof t=="object"?Object.keys(t).map((o,n)=>t[n]||t[o]&&o||null).filter(o=>o!==null).join(" "):t).filter(t=>!!t).join(" ");var T=(e,t)=>r({[`${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"}),U=(e,t)=>{let{valid:o,invalid:n,hover:l,focus:m,checked:s,active:c,selected:f,disabled:b,indeterminate:p,loading:M,empty:x,readonly:v,highlighted:L,...w}=t;return r({"k-valid":o,"k-invalid":n,"k-hover":l,"k-focus":m,"k-checked":s,"k-active":c,"k-selected":f,"k-disabled":b,"k-indeterminate":p&&!s,"k-loading":M,"k-empty":x,"k-readonly":v,"k-highlighted":L},Object.keys(w).reduce((S,O)=>(O.startsWith("k-")?S[O]=w[O]:S[`k-${O}`]=w[O],S),{}))};function Fe(e,t){if(!t)return{};let o=Array.isArray(t)?t:[t];return Object.fromEntries(o.map(n=>[`k-${n}`,!0]))}var i={undefined:void 0,xsmall:"xsmall",small:"small",medium:"medium",large:"large",xlarge:"xlarge",xxlarge:"xxlarge",xxxlarge:"xxxlarge"},y={undefined:void 0,none:"none",small:"small",medium:"medium",large:"large",full:"full"},I={undefined:void 0,solid:"solid",flat:"flat",outline:"outline",clear:"clear",link:"link"},z={undefined:void 0,outline:"outline",solid:"solid",duotone:"duotone"},a={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 Me={};function xe(e){return Me[e]=(Me[e]||0)+1,`k-${e}-${Me[e]}`}import{Fragment as Ht,jsx as Ve}from"react/jsx-runtime";var Ne="k-font-icon",Rt=[],Kt={size:[i.undefined,i.xsmall,i.small,i.medium,i.large,i.xlarge,i.xxlarge,i.xxxlarge],themeColor:[a.undefined,a.base,a.primary,a.secondary,a.tertiary,a.success,a.warning,a.error,a.info]},zt={},ee=e=>{let{size:t,themeColor:o,icon:n,rotate:l,flip:m,...s}=e;return n?Ve("span",{...s,className:r(e.className,Ne,T(Ne,{size:t}),{[`k-i-${n}`]:n,[`k-color-${o}`]:o,[`k-rotate-${l}`]:l,"k-flip-h":m==="h"||m==="both","k-flip-v":m==="v"||m==="both"}),"aria-hidden":"true"}):Ve(Ht,{})};ee.states=Rt;ee.options=Kt;ee.className=Ne;ee.defaultOptions=zt;var We=ee;import{Fragment as $t,jsx as me}from"react/jsx-runtime";var Ie="k-svg-icon",Ut=[],Dt={size:[i.undefined,i.xsmall,i.small,i.medium,i.large,i.xlarge,i.xxlarge,i.xxxlarge],themeColor:[a.undefined,a.base,a.primary,a.secondary,a.tertiary,a.success,a.warning,a.error,a.info],variant:[z.outline,z.solid,z.duotone]},ve={viewBox:"0 0 24 24",variant:z.outline},te=e=>{let{size:t,themeColor:o,rotate:n,flip:l,viewBox:m=ve.viewBox,variant:s=ve.variant,icon:c,...f}=e;if(!c)return me($t,{});if(c==="none")return me("span",{...f,className:r(e.className,Ie,T("k-icon",{size:t}),"k-none"),"aria-hidden":"true"});let b=typeof c=="object"&&c.name&&c.name,p=typeof c=="object"?s&&c.variants?.[s]||c.variants?.outline||c.content:void 0;return me("span",{...f,className:r(e.className,Ie,T("k-icon",{size:t}),{[`k-svg-i-${b}`]:b,[`k-color-${o}`]:o,[`k-rotate-${n}`]:n,"k-flip-h":l==="h"||l==="both","k-flip-v":l==="v"||l==="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:m,dangerouslySetInnerHTML:p!==void 0?{__html:p}:void 0,children:c?void 0:e.children})})};te.states=Ut;te.options=Dt;te.className=Ie;te.defaultOptions=ve;var ke=te;import*as Se from"@progress/kendo-svg-icons";var Je="icon",Xe="icons";import{useContext as Vt}from"react";import{createContext as Ft}from"react";var Ge=Ft({iconsType:"svg"});import{Fragment as qe,jsx as oe}from"react/jsx-runtime";var ue="k-icon",Wt=e=>e.replace(/([-_][a-z0-9])/gi,t=>t.toUpperCase().replace("-","").replace("_","")),Jt=[],Xt={size:[i.undefined,i.xsmall,i.small,i.medium,i.large,i.xlarge,i.xxlarge,i.xxxlarge],themeColor:[a.undefined,a.base,a.primary,a.secondary,a.tertiary,a.success,a.warning,a.error,a.info],variant:[z.outline,z.solid,z.duotone]},ce={viewBox:"0 0 24 24",type:"svg",variant:z.outline},h=e=>{let{iconsType:t}=Vt(Ge),{size:o,themeColor:n,icon:l,type:m=t||ce.type,rotate:s,flip:c,viewBox:f=ce.viewBox,variant:b=ce.variant,...p}=e;if(!l)return oe(qe,{});if((t||m)==="svg"){if(l==="none")return oe(ke,{...p,className:r(e.className,ue),icon:l,size:o,variant:b});let x=Se[l]?l:Wt(`${l}-icon`);return Se[x]?oe(ke,{...p,className:r(e.className,ue),icon:Se[x],size:o,themeColor:n,rotate:s,flip:c,viewBox:f,variant:b}):oe(qe,{})}return oe(We,{...p,className:r(e.className,ue),icon:l,size:o,themeColor:n,rotate:s,flip:c})};h.states=Jt;h.options=Xt;h.defaultOptions=ce;h.className=ue;h.moduleName=Je;h.folderName=Xe;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 ge="button",Qe=ge;import{Fragment as Ye,jsx as G,jsxs as Ze}from"react/jsx-runtime";var ne="k-button",Gt=["icon-button"],qt=[d.hover,d.focus,d.active,d.selected,d.disabled,d.generating],Qt={size:[i.undefined,i.xsmall,i.small,i.medium,i.large],rounded:[y.undefined,y.none,y.small,y.medium,y.large,y.full],fillMode:[I.undefined,I.solid,I.flat,I.outline,I.clear,I.link],themeColor:[a.undefined,a.base,a.primary,a.secondary,a.tertiary,a.success,a.warning,a.error,a.info,a.inverse]},Ae={showArrow:!1,arrowIconName:"chevron-down"},u=e=>{let{as:t="button",size:o,rounded:n,fillMode:l,themeColor:m,showArrow:s=Ae.showArrow,arrowIconName:c=Ae.arrowIconName,variant:f,hover:b,focus:p,active:M,selected:x,disabled:v,togglable:L,ariaDisabled:w,icon:S,iconSize:O,text:$,iconClassName:Ot,className:Ct,...Bt}=e,Pt=S!=null,_t=e.children!==void 0;return Ze(t,{className:r(Ct,ne,Fe(ne,f),T(ne,{size:o,rounded:n,fillMode:l,themeColor:m}),U(ne,{hover:b,focus:p,active:M,disabled:v||w,selected:x}),{"k-icon-button":!$&&!_t&&Pt}),"aria-pressed":L?x?"true":"false":void 0,...Bt,"aria-disabled":w?"true":void 0,disabled:v||void 0,children:[typeof S=="string"&&S&&G(h,{className:r(Ot,"k-button-icon"),icon:S,size:O}),S&&typeof S!="string"&&G(Ye,{children:S}),$?Ze(Ye,{children:[$&&G("span",{className:"k-button-text",children:$}),e.children]}):e.children&&G("span",{className:"k-button-text",children:e.children}),s&&G("span",{className:"k-menu-button-arrow k-button-arrow",children:G(h,{icon:c})})]})};u.states=qt;u.options=Qt;u.variants=Gt;u.className=ne;u.defaultOptions=Ae;u.moduleName=ge;u.folderName=Qe;u.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 Yt}from"react/jsx-runtime";var je=e=>Yt(u,{icon:"folder",...e,"aria-label":e["aria-label"]||"Folder",children:void 0});import{jsx as Zt}from"react/jsx-runtime";var et=e=>Zt(u,{icon:"folder",children:"Button",...e});import{jsx as jt}from"react/jsx-runtime";var tt=e=>jt(u,{children:"Button",...e});import{jsx as Te}from"react/jsx-runtime";var eo=u.options,to=u.states,oo={...u.defaultOptions,variant:"text"},no=[{name:"icon-only",title:"Icon Only"},{name:"icon-and-text",title:"Icon & Text"},{name:"text",title:"Text"}],ro=[],q=e=>{let{variant:t,...o}=e;switch(t){case"icon-only":return Te(je,{...o,icon:"star"});case"icon-and-text":return Te(et,{...o,icon:"star",children:"Button"});default:return Te(tt,{...o,children:"Button"})}};q.options=eo;q.states=to;q.variants=no;q.defaultOptions=oo;q.modifiers=ro;q.className=u.className;var Ee="menu-button",ot=Ee;import{jsx as io}from"react/jsx-runtime";var nt="k-menu-button",ao=[d.hover,d.focus,d.active,d.selected,d.disabled],so={size:[i.undefined,i.xsmall,i.small,i.medium,i.large],rounded:[y.undefined,y.none,y.small,y.medium,y.large,y.full],fillMode:[I.undefined,I.solid,I.flat,I.outline,I.clear,I.link],themeColor:[a.undefined,a.base,a.primary,a.secondary,a.tertiary,a.success,a.warning,a.error,a.info,a.inverse]},Le={showArrow:!0,arrowIconName:"chevron-down"},N=e=>{let{size:t,rounded:o,fillMode:n,themeColor:l,hover:m,focus:s,active:c,selected:f,disabled:b,icon:p,text:M,showArrow:x=Le.showArrow,arrowIconName:v=Le.arrowIconName,expanded:L,...w}=e;return io(u,{...w,className:r(e.className,nt),text:M,size:t,rounded:o,fillMode:n,themeColor:l,hover:m,focus:s,active:c,selected:f,disabled:b,ariaDisabled:b||void 0,icon:p,showArrow:x,arrowIconName:v,"aria-expanded":L?"true":"false",...!M&&p&&!e["aria-label"]&&{"aria-label":"Menu"}})};N.states=ao;N.options=so;N.className=nt;N.defaultOptions=Le;N.moduleName=Ee;N.folderName=ot;N.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 br}from"react/jsx-runtime";import{jsx as Nr}from"react/jsx-runtime";import{jsx as Sr}from"react/jsx-runtime";var C="menu",P=C;import{jsx as re,jsxs as rt}from"react/jsx-runtime";var we="k-menu-item",lo=[d.hover,d.focus,d.active,d.selected,d.disabled],mo={},at={iconPosition:"before"},g=e=>{let{hover:t,focus:o,active:n,selected:l,disabled:m,icon:s,text:c,first:f,last:b,showArrow:p,arrowIconName:M,iconPosition:x=at.iconPosition,dir:v,children:L,expanded:w,...S}=e,O=M;return O||(O=v==="rtl"?"chevron-left":"chevron-right"),rt("li",{...S,className:r(e.className,we,"k-item",U(we,{focus:o,disabled:m,hover:t,active:n,selected:l}),{"k-first":f,"k-last":b}),role:"menuitem",...p&&{"aria-haspopup":"menu"},...p&&{"aria-expanded":w?"true":"false"},...m&&{"aria-disabled":"true"},...o&&{tabIndex:0},children:[rt("span",{className:r("k-link k-menu-link"),children:[s&&x==="before"&&re(h,{className:"k-menu-link-icon",icon:s}),re("span",{className:"k-menu-link-text",children:c}),s&&x==="after"&&re(h,{className:"k-menu-link-icon",icon:s}),p&&re("span",{className:"k-menu-expand-arrow","aria-hidden":"true",children:re(h,{icon:O})})]}),L]})};g.states=lo;g.options=mo;g.className=we;g.defaultOptions=at;g.moduleName=C;g.folderName=P;import{jsx as ae,jsxs as st}from"react/jsx-runtime";var ye="k-menu-item",uo=[d.hover,d.focus,d.active,d.selected,d.disabled],co={},Oe={dir:"ltr",iconPosition:"before"},A=e=>{let{hover:t,focus:o,active:n,selected:l,disabled:m,icon:s,text:c,first:f,last:b,showArrow:p,arrowIconName:M,iconPosition:x=Oe.iconPosition,dir:v=Oe.dir,children:L,popup:w,expanded:S,...O}=e,$=M;return $||($=v==="rtl"?"chevron-left":"chevron-right"),st("li",{role:"menuitem",...O,className:r(e.className,ye,"k-item",U(ye,{focus:o,disabled:m}),{"k-first":f,"k-last":b}),...p&&{"aria-haspopup":"menu"},...p&&{"aria-expanded":S?"true":"false"},...m&&{"aria-disabled":"true"},...o&&{tabIndex:0},children:[st("span",{className:r("k-link k-menu-link",U("k-menu-link",{hover:t,active:n,selected:l,disabled:m})),children:[s&&x==="before"&&ae(h,{className:"k-menu-link-icon",icon:s}),ae("span",{className:"k-menu-link-text",children:c}),s&&x==="after"&&ae(h,{className:"k-menu-link-icon",icon:s}),p&&ae("span",{className:"k-menu-expand-arrow","aria-hidden":"true",children:ae(h,{icon:$})})]}),L,w]})};A.states=uo;A.options=co;A.className=ye;A.defaultOptions=Oe;A.moduleName=C;A.folderName=P;import{jsx as ho}from"react/jsx-runtime";var it="k-menu-scroll-wrapper",po=[],fo={},bo={},W=e=>{let{className:t,children:o,orientation:n,...l}=e;return ho("div",{...l,className:r(t,it,{"k-menu-scroll-wrapper-vertical":n==="vertical"}),children:o})};W.states=po;W.options=fo;W.className=it;W.defaultOptions=bo;W.moduleName=C;W.folderName=P;var lt=W;import{Fragment as Ce,jsx as J,jsxs as de}from"react/jsx-runtime";var Be="k-menu",Mo=[],xo={},fe={orientation:"horizontal",header:!0,scrollButtonsPosition:"around"},k=e=>{let{children:t,orientation:o=fe.orientation,header:n=fe.header,scrollable:l,scrollButtonsPosition:m=fe.scrollButtonsPosition,wrapperStyles:s,dir:c,popup:f,contextMenu:b,...p}=e,M={horizontal:{prev:c!=="rtl"?"left":"right",next:c!=="rtl"?"right":"left"},vertical:{prev:"up",next:"down"}},x=J("ul",{dir:c,...p,className:r(e.className,"k-reset",Be,{[`${Be}-${o}`]:o,"k-header":n}),role:b?"menu":"menubar",...o==="vertical"&&{"aria-orientation":"vertical"},children:t});return de(Ce,{children:[l?de(lt,{orientation:o,style:s,dir:e.dir,children:[m==="start"&&de(Ce,{children:[J(u,{fillMode:"flat",icon:`chevron-${M[o].prev}`,className:"k-menu-scroll-button k-menu-scroll-button-prev",tabIndex:-1,"aria-label":"Scroll previous"}),J(u,{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"&&J(u,{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"&&de(Ce,{children:[J(u,{fillMode:"flat",icon:`chevron-${M[o].prev}`,className:"k-menu-scroll-button k-menu-scroll-button-prev",tabIndex:-1,"aria-label":"Scroll previous"}),J(u,{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"&&J(u,{fillMode:"flat",icon:`chevron-${M[o].next}`,className:"k-menu-scroll-button k-menu-scroll-button-next",tabIndex:-1,"aria-label":"Scroll next"})]}):x,f]})};k.states=Mo;k.options=xo;k.className=Be;k.defaultOptions=fe;k.moduleName=C;k.folderName=P;k.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 No}from"react/jsx-runtime";var Pe="k-separator",mt={orientation:"horizontal"},Q=e=>{let{orientation:t=mt.orientation,...o}=e;return No("li",{...o,className:r(e.className,"k-item",Pe,{[`${Pe}-${t}`]:t}),role:"separator"})};Q.className=Pe;Q.defaultOptions=mt;Q.moduleName=C;Q.folderName=P;import{Fragment as Zr,jsx as jr}from"react/jsx-runtime";import{jsx as So}from"react/jsx-runtime";var _e="k-menu-group",Io=[],vo={size:[i.undefined,i.small,i.medium,i.large]},ko={},_=e=>{let{children:t,size:o,...n}=e;return So("ul",{role:"menu",...n,className:r(e.className,_e,T(_e,{size:o})),children:t})};_.states=Io;_.options=vo;_.className=_e;_.defaultOptions=ko;_.moduleName=C;_.folderName=P;import{Fragment as go,jsx as Y,jsxs as Ao}from"react/jsx-runtime";var Re=e=>Y(k,{children:Ao(go,{children:[Y(g,{first:!0,text:"Item 1"}),Y(g,{showArrow:!0,arrowIconName:"chevron-down",text:"Item 2"}),Y(g,{showArrow:!0,arrowIconName:"chevron-down",text:"Item 3"}),Y(g,{text:"Item 4"}),Y(g,{last:!0,text:"Item 5"})]}),...e});var Ke="popup",ut=Ke;import{jsx as ct}from"react/jsx-runtime";var pt="k-animation-container",To=[],Eo={},ze={positionMode:"absolute",shown:!0},F=e=>{let{positionMode:t=ze.positionMode,shown:o=ze.shown,animationStyle:n,offset:l,...m}=e;return ct("div",{...m,style:{...l,...e.style},className:r(e.className,pt,{"k-animation-container-shown":o,"k-animation-container-fixed":t==="fixed"}),children:ct("div",{className:"k-child-animation-container",style:n,children:e.children})})};F.states=To;F.options=Eo;F.className=pt;F.defaultOptions=ze;F.moduleName=Ke;F.folderName=ut;var He="popup",dt=He;import{jsx as ft}from"react/jsx-runtime";var bt="k-popup",Lo=[],wo={},ht={positionMode:"absolute"},B=e=>{let{offset:t,positionMode:o=ht.positionMode,animationStyle:n,containerClassName:l,containerRole:m,containerAriaLabel:s,...c}=e;return ft(F,{positionMode:o,offset:t,animationStyle:n,className:l,role:m,"aria-label":s,children:ft("div",{...c,className:r(e.className,bt),children:e.children})})};B.states=Lo;B.options=wo;B.className=bt;B.defaultOptions=ht;B.moduleName=He;B.folderName=dt;B.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 La,jsx as Ta,jsxs as Ea}from"react/jsx-runtime";import{Fragment as Ba,jsx as Ca,jsxs as Pa}from"react/jsx-runtime";import{Fragment as Ha,jsx as za,jsxs as Ua}from"react/jsx-runtime";import{Fragment as Wa,jsx as Va,jsxs as Ja}from"react/jsx-runtime";import{jsx as X,jsxs as Po}from"react/jsx-runtime";var yo={...k.options,scrollable:{type:"boolean"}},Oo=k.states,Mt={...k.defaultOptions,variant:"horizontal"},Co=[{name:"horizontal",title:"Horizontal"},{name:"vertical",title:"Vertical"}],Bo=[{name:"opened",title:"Opened"}],Z=e=>{let{variant:t,modifiers:o,...n}={...Mt,...e},l={},m=t==="vertical"?{left:"200px",top:"30px"}:{left:"90px",top:"auto"};return Object.keys(o||{}).forEach(s=>{s==="opened"&&(l.opened=!!o?.[s],l.popup=o?.[s]?X(B,{className:"k-menu-popup",offset:m,children:Po(_,{children:[X(A,{text:"Item 1"}),X(A,{text:"Item 2"}),X(Q,{}),X(A,{text:"Item 3"})]})}):null)}),t==="vertical"?X(Re,{...n,...l,orientation:"vertical",style:{width:"200px"}}):X(Re,{...n,...l})};Z.options=yo;Z.states=Oo;Z.variants=Co;Z.defaultOptions=Mt;Z.modifiers=Bo;Z.className=k.className;import{Fragment as gs,jsx as ks,jsxs as Ss}from"react/jsx-runtime";import{jsx as Ls}from"react/jsx-runtime";import{Fragment as Ho,jsx as H,jsxs as xt}from"react/jsx-runtime";var _o=u.states,Nt={...u.defaultOptions,variant:"text"},Ro=u.options,Ko=[{name:"icon-only",title:"Icon Only"},{name:"icon-and-text",title:"Icon & Text"},{name:"text",title:"Text"}],zo=[{name:"opened",title:"Opened"}],j=e=>{let{variant:t,modifiers:o,...n}={...Nt,...e},l={},m=H(B,{className:"k-menu-popup",children:xt(_,{size:n.size,children:[H(A,{first:!0,text:"Menu Item"}),H(A,{text:"Menu Item"}),H(A,{last:!0,text:"Menu Item"})]})}),s;switch(t){case"icon-only":s=H("div",{children:H(N,{...n,...l,icon:"star"})});break;case"icon-and-text":s=H("div",{children:H(N,{...n,...l,icon:"star",children:"Dropdown Button"})});break;default:s=H("div",{children:H(N,{...n,...l,children:"Dropdown Button"})});break}return xt(Ho,{children:[s,o?.opened&&m]})};j.options=Ro;j.states=_o;j.variants=Ko;j.defaultOptions=Nt;j.modifiers=zo;j.className=N.className;import{jsx as Fo}from"react/jsx-runtime";var It="k-tabstrip-items",Uo=[],Do={},$o={tabAlignment:"start"},se=e=>{let{children:t,tabAlignment:o,orientation:n,...l}=e;return Fo("ul",{...l,className:r(e.className,It,"k-reset",`k-tabstrip-items-${o}`),role:"tablist",...n==="vertical"&&{"aria-orientation":"vertical"},children:t})};se.states=Uo;se.options=Do;se.className=It;se.defaultOptions=$o;var vt=se;import{jsx as Jo}from"react/jsx-runtime";var kt="k-tabstrip-items-wrapper",Vo=[],Wo={},St={orientation:"horizontal"},ie=e=>{let{children:t,orientation:o=St.orientation,...n}=e;return Jo("div",{...n,className:r(e.className,kt,{"k-hstack":o==="horizontal","k-vstack":o==="vertical"}),children:t})};ie.states=Vo;ie.options=Wo;ie.className=kt;ie.defaultOptions=St;var gt=ie;var Ue="tabstrip",At=Ue;import{jsx as R,jsxs as Tt}from"react/jsx-runtime";var V="k-tabstrip",Xo=[],Go={size:[i.undefined,i.small,i.medium,i.large]},be={position:"top",tabAlignment:"start",scrollButtons:"around"},D=e=>{let{size:t,scrollable:o,children:n,tabStripItems:l,tabStripItemsId:m,position:s=be.position,tabAlignment:c=be.tabAlignment,scrollButtons:f=be.scrollButtons,dir:b,scrollingPosition:p,overflow:M,...x}=e,v={top:{prev:b!=="rtl"?"left":"right",next:b!=="rtl"?"right":"left"},bottom:{prev:b!=="rtl"?"left":"right",next:b!=="rtl"?"right":"left"},right:{prev:"up",next:"down"},left:{prev:"up",next:"down"}},L={top:"horizontal",bottom:"horizontal",left:"vertical",right:"vertical"},w={start:"start",center:"center",end:"end",justify:"justify",stretched:"stretched"};return Tt("div",{dir:b,...x,className:r(V,e.className,{[`${V}-${s}`]:s,[`${V}-scrollable`]:o,[`${V}-scrollable-overlay`]:o&&(f==="hidden"||!f),[`${V}-scrollable-${p}`]:p&&p!=="both",[`${V}-overflow`]:M},T(V,{size:t})),children:[s==="bottom"&&n,Tt(gt,{orientation:L[s],children:[o&&(f==="around"||f==="start")&&R("span",{className:r("k-tabstrip-prev","k-button",T("k-button",{size:t,fillMode:I.flat}),"k-icon-button"),"aria-hidden":"true",children:R(h,{className:"k-button-icon",icon:`chevron-${v[s].prev}`})}),o&&f==="start"&&R("span",{className:r("k-tabstrip-next","k-button",T("k-button",{size:t,fillMode:I.flat}),"k-icon-button"),"aria-hidden":"true",children:R(h,{className:"k-button-icon",icon:`chevron-${v[s].next}`})}),R(vt,{className:r({"k-tabstrip-items-scroll":o&&f==="hidden"}),tabAlignment:w[c],orientation:L[s],...m&&{id:m},children:l}),o&&f==="end"&&R("span",{className:r("k-tabstrip-prev","k-button",T("k-button",{size:t,fillMode:I.flat}),"k-icon-button"),"aria-hidden":"true",children:R(h,{className:"k-button-icon",icon:`chevron-${v[s].prev}`})}),o&&(f==="around"||f==="end")&&R("span",{className:r("k-tabstrip-next","k-button",T("k-button",{size:t,fillMode:I.flat}),"k-icon-button"),"aria-hidden":"true",children:R(h,{className:"k-button-icon",icon:`chevron-${v[s].next}`})}),M&&R("div",{className:"k-tabstrip-actions k-hstack",children:R(N,{className:"k-tabstrip-overflow-button",icon:"more-vertical",fillMode:"flat",size:t,showArrow:!1})})]}),s!=="bottom"&&n]})};D.states=Xo;D.options=Go;D.className=V;D.defaultOptions=be;D.moduleName=Ue;D.folderName=At;D.ariaSpec={selector:".k-tabstrip",rules:[{selector:".k-tabstrip-items",attribute:"role=tablist",usage:"Indicates the tablist role for the ul element."},{selector:".k-tabstrip.k-tabstrip-left .k-tabstrip-items,.k-tabstrip.k-tabstrip-right .k-tabstrip-items",attribute:"aria-orientation=vertical",usage:"Indicates the orientation when vertical."},{selector:".k-tabstrip-item",attribute:"role=tab",usage:"The tab li element."},{selector:".k-tabstrip .k-tabstrip-item.k-active",attribute:"aria-selected=true",usage:"Announces the selected state of the tab."},{selector:".k-tabstrip-content",attribute:"role=tabpanel",usage:"The content div of the tab."},{selector:".k-tabstrip .k-tabstrip-item.k-active",attribute:"aria-controls (when present)",usage:"Announces the relation between the panel and active tab. Only present when tab controls a specific panel."},{selector:".k-tabstrip-content",attribute:"aria-hidden=true (when not active)",usage:"Only if the component implements a feature to control whether the content should be persisted."},{selector:".k-tabstrip-content",attribute:"aria-labelledby (when present)",usage:"Refers to the tab element that controls the panel. Only present when panel has an associated tab."},{selector:".k-tabstrip-scrollable .k-button",attribute:"aria-hidden=true",usage:"Scroll buttons are hidden from assistive technologies."}]};import{jsx as he,jsxs as De}from"react/jsx-runtime";var $e="k-tabstrip-item",qo=[d.active,d.hover,d.disabled,d.focus],Qo={},Et={iconPosition:"before"},K=e=>{let{dragging:t,active:o,hover:n,focus:l,disabled:m,children:s,first:c,last:f,closable:b,icon:p,iconPosition:M=Et.iconPosition,value:x,actions:v,...L}=e;return De("li",{...L,className:r(e.className,$e,U($e,{hover:n,active:o,disabled:m,focus:l}),{"k-tabstrip-dragging":t,"k-first":c,"k-last":f}),role:"tab",...o&&{"aria-selected":"true"},...m&&{"aria-disabled":"true"},children:[De("span",{className:"k-link",children:[p&&M==="before"&&he(h,{icon:p}),x&&he("span",{className:"k-link-text",children:x}),p&&M==="after"&&he(h,{icon:p})]}),(v||b)&&De("span",{className:"k-item-actions",children:[v,b&&he(u,{as:"span",className:"k-remove-tab",icon:"x",fillMode:"flat",size:"xsmall",title:"Close","aria-hidden":"true"})]}),s]})};K.states=qo;K.options=Qo;K.className=$e;K.item=Et;import{Fragment as en,jsx as E,jsxs as yt}from"react/jsx-runtime";var Lt="k-spreadsheet-sheets-bar",Yo=[],Zo={},jo=yt(en,{children:[E(K,{first:!0,active:!0,value:"Sheet 1",actions:E(N,{showArrow:!1,size:"small",icon:"chevron-down",fillMode:"flat","aria-label":"Sheet options"})},"sheet1"),E(K,{value:"Sheet 2",actions:E(N,{showArrow:!1,size:"small",icon:"chevron-down",fillMode:"flat","aria-label":"Sheet options"})},"sheet2"),E(K,{value:"Sheet 3",actions:E(N,{showArrow:!1,size:"small",icon:"chevron-down",fillMode:"flat","aria-label":"Sheet options"})},"sheet3"),E(K,{value:"Sheet 4",actions:E(N,{showArrow:!1,size:"small",icon:"chevron-down",fillMode:"flat","aria-label":"Sheet options"})},"sheet4"),E(K,{value:"Sheet 5",actions:E(N,{showArrow:!1,size:"small",icon:"chevron-down",fillMode:"flat","aria-label":"Sheet options"})},"sheet5"),E(K,{last:!0,value:"Sheet 6",actions:E(N,{showArrow:!1,size:"small",icon:"chevron-down",fillMode:"flat","aria-label":"Sheet options"})},"sheet6")]}),wt={tabStripItems:jo},le=e=>{let{tabStripItems:t=wt.tabStripItems,...o}=e,n=xe("spreadsheet-sheets");return yt("div",{...o,className:r(Lt,e.className),children:[E(u,{className:"k-spreadsheet-sheet-add",fillMode:"flat",size:"small",icon:"plus","aria-label":"Add new sheet","aria-controls":n}),E(u,{className:"k-spreadsheet-sheets-menu",fillMode:"flat",size:"small",icon:"menu","aria-label":"Sheets menu","aria-controls":n}),E(D,{className:"k-spreadsheet-sheets",tabStripItems:t,tabStripItemsId:n,position:"bottom",scrollable:!0,scrollButtons:"end"})]})};le.states=Yo;le.options=Zo;le.className=Lt;le.defaultOptions=wt;var Mi=le;export{Lt as SPREADSHEETSHEETSBAR_CLASSNAME,le as SpreadsheetSheetsBar,Mi as default};