@progress/kendo-themes-html
Version:
A collection of HTML helpers used for developing Kendo UI themes
2 lines (1 loc) • 25.2 kB
JavaScript
var St=Object.create;var ie=Object.defineProperty;var Bt=Object.getOwnPropertyDescriptor;var Tt=Object.getOwnPropertyNames;var Ct=Object.getPrototypeOf,_t=Object.prototype.hasOwnProperty;var Pt=(e,t)=>{for(var o in t)ie(e,o,{get:t[o],enumerable:!0})},$e=(e,t,o,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Tt(t))!_t.call(e,r)&&r!==o&&ie(e,r,{get:()=>t[r],enumerable:!(a=Bt(t,r))||a.enumerable});return e};var Rt=(e,t,o)=>(o=e!=null?St(Ct(e)):{},$e(t||!e||!e.__esModule?ie(o,"default",{value:e,enumerable:!0}):o,e)),Kt=e=>$e(ie({},"__esModule",{value:!0}),e);var _o={};Pt(_o,{FileBoxVertical:()=>Co});module.exports=Kt(_o);var i=(...e)=>e.filter(t=>t!==!0&&!!t).map(t=>Array.isArray(t)?i(...t):typeof t=="object"?Object.keys(t).map((o,a)=>t[a]||t[o]&&o||null).filter(o=>o!==null).join(" "):t).filter(t=>!!t).join(" ");var F=(e,t)=>i({[`${e}-xs`]:t.size==="xsmall",[`${e}-sm`]:t.size==="small",[`${e}-md`]:t.size==="medium",[`${e}-lg`]:t.size==="large",[`${e}-xl`]:t.size==="xlarge",[`${e}-xxl`]:t.size==="xxlarge",[`${e}-xxxl`]:t.size==="xxxlarge"},{[`${e}-${t.fillMode}`]:t.fillMode},{[`${e}-${t.themeColor}`]:t.themeColor},{"k-rounded-sm":t.rounded==="small","k-rounded-md":t.rounded==="medium","k-rounded-lg":t.rounded==="large","k-rounded-full":t.rounded==="full","k-rounded-none":t.rounded==="none"}),J=(e,t)=>{let{valid:o,invalid:a,hover:r,focus:u,checked:l,active:c,selected:h,disabled:x,indeterminate:d,loading:f,empty:b,readonly:R,highlighted:D,...T}=t;return i({"k-valid":o,"k-invalid":a,"k-hover":r,"k-focus":u,"k-checked":l,"k-active":c,"k-selected":h,"k-disabled":x,"k-indeterminate":d&&!l,"k-loading":f,"k-empty":b,"k-readonly":R,"k-highlighted":D},Object.keys(T).reduce((v,w)=>(w.startsWith("k-")?v[w]=T[w]:v[`k-${w}`]=T[w],v),{}))};function Ve(e,t){if(!t)return{};let o=Array.isArray(t)?t:[t];return Object.fromEntries(o.map(a=>[`k-${a}`,!0]))}var s={undefined:void 0,xsmall:"xsmall",small:"small",medium:"medium",large:"large",xlarge:"xlarge",xxlarge:"xxlarge",xxxlarge:"xxxlarge"},L={undefined:void 0,none:"none",small:"small",medium:"medium",large:"large",full:"full"},A={undefined:void 0,solid:"solid",flat:"flat",outline:"outline",clear:"clear",link:"link"},K={undefined:void 0,outline:"outline",solid:"solid",duotone:"duotone"},n={undefined:void 0,inherit:"inherit",base:"base",primary:"primary",secondary:"secondary",tertiary:"tertiary",info:"info",success:"success",warning:"warning",error:"error",inverse:"inverse"},p={open:"open",hover:"hover",focus:"focus",active:"active",selected:"selected",disabled:"disabled",valid:"valid",invalid:"invalid",loading:"loading",required:"required",empty:"empty",indeterminate:"indeterminate",checked:"checked",readonly:"readonly",highlighted:"highlighted",generating:"generating",expanded:"expanded"};var be=require("react/jsx-runtime"),le="k-file-box-wrapper",We={layout:"horizontal"},ue=e=>{let{layout:t=We.layout,scrollingPosition:o,...a}=e;return(0,be.jsx)("ul",{role:"list","aria-label":"Attached files",...a,className:i(e.className,le,{"k-files-vertical":t==="vertical","k-files-wrap":t==="wrap",[`${le}-scrollable-start`]:t==="horizontal"&&(o==="start"||o==="both"),[`${le}-scrollable-end`]:t==="horizontal"&&(o==="end"||o==="both")}),children:t==="horizontal"?(0,be.jsx)("div",{className:"k-files-scroll",role:"presentation",children:e.children}):e.children})};ue.className=le;ue.defaultOptions=We;var te=require("react/jsx-runtime"),xe="k-font-icon",zt=[],Ut={size:[s.undefined,s.xsmall,s.small,s.medium,s.large,s.xlarge,s.xxlarge,s.xxxlarge],themeColor:[n.undefined,n.base,n.primary,n.secondary,n.tertiary,n.success,n.warning,n.error,n.info]},Ht={},oe=e=>{let{size:t,themeColor:o,icon:a,rotate:r,flip:u,...l}=e;return a?(0,te.jsx)("span",{...l,className:i(e.className,xe,F(xe,{size:t}),{[`k-i-${a}`]:a,[`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,te.jsx)(te.Fragment,{})};oe.states=zt;oe.options=Ut;oe.className=xe;oe.defaultOptions=Ht;var Xe=oe;var q=require("react/jsx-runtime"),Me="k-svg-icon",Dt=[],Ft={size:[s.undefined,s.xsmall,s.small,s.medium,s.large,s.xlarge,s.xxlarge,s.xxxlarge],themeColor:[n.undefined,n.base,n.primary,n.secondary,n.tertiary,n.success,n.warning,n.error,n.info],variant:[K.outline,K.solid,K.duotone]},he={viewBox:"0 0 24 24",variant:K.outline},ne=e=>{var f,b;let{size:t,themeColor:o,rotate:a,flip:r,viewBox:u=he.viewBox,variant:l=he.variant,icon:c,...h}=e;if(!c)return(0,q.jsx)(q.Fragment,{});if(c==="none")return(0,q.jsx)("span",{...h,className:i(e.className,Me,F("k-icon",{size:t}),"k-none"),"aria-hidden":"true"});let x=typeof c=="object"&&c.name&&c.name,d=typeof c=="object"?l&&((f=c.variants)==null?void 0:f[l])||((b=c.variants)==null?void 0:b.outline)||c.content:void 0;return(0,q.jsx)("span",{...h,className:i(e.className,Me,F("k-icon",{size:t}),{[`k-svg-i-${x}`]:x,[`k-color-${o}`]:o,[`k-rotate-${a}`]:a,"k-flip-h":r==="h"||r==="both","k-flip-v":r==="v"||r==="both"}),"aria-hidden":"true",children:(0,q.jsx)("svg",{"aria-hidden":!0,focusable:!1,xmlns:"http://www.w3.org/2000/svg",viewBox:typeof c=="object"?c.viewBox:u,dangerouslySetInnerHTML:d!==void 0?{__html:d}:void 0,children:c?void 0:e.children})})};ne.states=Dt;ne.options=Ft;ne.className=Me;ne.defaultOptions=he;var Ne=ne;var Ie=Rt(require("@progress/kendo-svg-icons"));var Ge="icon",Je="icons";var Ye=require("react");var qe=require("react"),Qe=(0,qe.createContext)({iconsType:"svg"});var $=require("react/jsx-runtime"),me="k-icon",$t=e=>e.replace(/([-_][a-z0-9])/gi,t=>t.toUpperCase().replace("-","").replace("_","")),Vt=[],Wt={size:[s.undefined,s.xsmall,s.small,s.medium,s.large,s.xlarge,s.xxlarge,s.xxxlarge],themeColor:[n.undefined,n.base,n.primary,n.secondary,n.tertiary,n.success,n.warning,n.error,n.info],variant:[K.outline,K.solid,K.duotone]},ce={viewBox:"0 0 24 24",type:"svg",variant:K.outline},M=e=>{let{iconsType:t}=(0,Ye.useContext)(Qe),{size:o,themeColor:a,icon:r,type:u=t||ce.type,rotate:l,flip:c,viewBox:h=ce.viewBox,variant:x=ce.variant,...d}=e;if(!r)return(0,$.jsx)($.Fragment,{});if((t||u)==="svg"){if(r==="none")return(0,$.jsx)(Ne,{...d,className:i(e.className,me),icon:r,size:o,variant:x});let b=Ie[r]?r:$t(`${r}-icon`);return Ie[b]?(0,$.jsx)(Ne,{...d,className:i(e.className,me),icon:Ie[b],size:o,themeColor:a,rotate:l,flip:c,viewBox:h,variant:x}):(0,$.jsx)($.Fragment,{})}return(0,$.jsx)(Xe,{...d,className:i(e.className,me),icon:r,size:o,themeColor:a,rotate:l,flip:c})};M.states=Vt;M.options=Wt;M.defaultOptions=ce;M.className=me;M.moduleName=Ge;M.folderName=Je;M.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 ve="button",Ze=ve;var O=require("react/jsx-runtime"),re="k-button",Xt=["icon-button"],Gt=[p.hover,p.focus,p.active,p.selected,p.disabled,p.generating],Jt={size:[s.undefined,s.xsmall,s.small,s.medium,s.large],rounded:[L.undefined,L.none,L.small,L.medium,L.large,L.full],fillMode:[A.undefined,A.solid,A.flat,A.outline,A.clear,A.link],themeColor:[n.undefined,n.base,n.primary,n.secondary,n.tertiary,n.success,n.warning,n.error,n.info,n.inverse]},ke={showArrow:!1,arrowIconName:"chevron-down"},m=e=>{let{as:t="button",size:o,rounded:a,fillMode:r,themeColor:u,showArrow:l=ke.showArrow,arrowIconName:c=ke.arrowIconName,variant:h,hover:x,focus:d,active:f,selected:b,disabled:R,togglable:D,ariaDisabled:T,icon:v,iconSize:w,text:X,iconClassName:Lt,className:At,...yt}=e,wt=v!=null,Ot=e.children!==void 0;return(0,O.jsxs)(t,{className:i(At,re,Ve(re,h),F(re,{size:o,rounded:a,fillMode:r,themeColor:u}),J(re,{hover:x,focus:d,active:f,disabled:R||T,selected:b}),{"k-icon-button":!X&&!Ot&&wt}),"aria-pressed":D?b?"true":"false":void 0,...yt,"aria-disabled":T?"true":void 0,disabled:R||void 0,children:[typeof v=="string"&&v&&(0,O.jsx)(M,{className:i(Lt,"k-button-icon"),icon:v,size:w}),v&&typeof v!="string"&&(0,O.jsx)(O.Fragment,{children:v}),X?(0,O.jsxs)(O.Fragment,{children:[X&&(0,O.jsx)("span",{className:"k-button-text",children:X}),e.children]}):e.children&&(0,O.jsx)("span",{className:"k-button-text",children:e.children}),l&&(0,O.jsx)("span",{className:"k-menu-button-arrow k-button-arrow",children:(0,O.jsx)(M,{icon:c})})]})};m.states=Gt;m.options=Jt;m.variants=Xt;m.className=re;m.defaultOptions=ke;m.moduleName=ve;m.folderName=Ze;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 et=require("react/jsx-runtime"),je=e=>(0,et.jsx)(m,{icon:"folder",...e,"aria-label":e["aria-label"]||"Folder",children:void 0});var ot=require("react/jsx-runtime"),tt=e=>(0,ot.jsx)(m,{icon:"folder",children:"Button",...e});var rt=require("react/jsx-runtime"),nt=e=>(0,rt.jsx)(m,{children:"Button",...e});var pe=require("react/jsx-runtime"),qt=m.options,Qt=m.states,Yt={...m.defaultOptions,variant:"text"},Zt=[{name:"icon-only",title:"Icon Only"},{name:"icon-and-text",title:"Icon & Text"},{name:"text",title:"Text"}],jt=[],Y=e=>{let{variant:t,...o}=e;switch(t){case"icon-only":return(0,pe.jsx)(je,{...o,icon:"star"});case"icon-and-text":return(0,pe.jsx)(tt,{...o,icon:"star",children:"Button"});default:return(0,pe.jsx)(nt,{...o,children:"Button"})}};Y.options=qt;Y.states=Qt;Y.variants=Zt;Y.defaultOptions=Yt;Y.modifiers=jt;Y.className=m.className;var ge="menu-button",at=ge;var it=require("react/jsx-runtime"),st="k-menu-button",eo=[p.hover,p.focus,p.active,p.selected,p.disabled],to={size:[s.undefined,s.xsmall,s.small,s.medium,s.large],rounded:[L.undefined,L.none,L.small,L.medium,L.large,L.full],fillMode:[A.undefined,A.solid,A.flat,A.outline,A.clear,A.link],themeColor:[n.undefined,n.base,n.primary,n.secondary,n.tertiary,n.success,n.warning,n.error,n.info,n.inverse]},Ee={showArrow:!0,arrowIconName:"chevron-down"},y=e=>{let{size:t,rounded:o,fillMode:a,themeColor:r,hover:u,focus:l,active:c,selected:h,disabled:x,icon:d,text:f,showArrow:b=Ee.showArrow,arrowIconName:R=Ee.arrowIconName,expanded:D,...T}=e;return(0,it.jsx)(m,{...T,className:i(e.className,st),text:f,size:t,rounded:o,fillMode:a,themeColor:r,hover:u,focus:l,active:c,selected:h,disabled:x,ariaDisabled:x||void 0,icon:d,showArrow:b,arrowIconName:R,"aria-expanded":D?"true":"false",...!f&&d&&!e["aria-label"]&&{"aria-label":"Menu"}})};y.states=eo;y.options=to;y.className=st;y.defaultOptions=Ee;y.moduleName=ge;y.folderName=at;y.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 oo=require("react/jsx-runtime");var no=require("react/jsx-runtime");var ro=require("react/jsx-runtime");var S="menu",C=S;var V=require("react/jsx-runtime"),Le="k-menu-item",ao=[p.hover,p.focus,p.active,p.selected,p.disabled],so={},lt={iconPosition:"before"},k=e=>{let{hover:t,focus:o,active:a,selected:r,disabled:u,icon:l,text:c,first:h,last:x,showArrow:d,arrowIconName:f,iconPosition:b=lt.iconPosition,dir:R,children:D,expanded:T,...v}=e,w=f;return w||(w=R==="rtl"?"chevron-left":"chevron-right"),(0,V.jsxs)("li",{...v,className:i(e.className,Le,"k-item",J(Le,{focus:o,disabled:u,hover:t,active:a,selected:r}),{"k-first":h,"k-last":x}),role:"menuitem",...d&&{"aria-haspopup":"menu"},...d&&{"aria-expanded":T?"true":"false"},...u&&{"aria-disabled":"true"},...o&&{tabIndex:0},children:[(0,V.jsxs)("span",{className:i("k-link k-menu-link"),children:[l&&b==="before"&&(0,V.jsx)(M,{className:"k-menu-link-icon",icon:l}),(0,V.jsx)("span",{className:"k-menu-link-text",children:c}),l&&b==="after"&&(0,V.jsx)(M,{className:"k-menu-link-icon",icon:l}),d&&(0,V.jsx)("span",{className:"k-menu-expand-arrow","aria-hidden":"true",children:(0,V.jsx)(M,{icon:w})})]}),D]})};k.states=ao;k.options=so;k.className=Le;k.defaultOptions=lt;k.moduleName=S;k.folderName=C;var W=require("react/jsx-runtime"),Ae="k-menu-item",io=[p.hover,p.focus,p.active,p.selected,p.disabled],lo={},ye={dir:"ltr",iconPosition:"before"},g=e=>{let{hover:t,focus:o,active:a,selected:r,disabled:u,icon:l,text:c,first:h,last:x,showArrow:d,arrowIconName:f,iconPosition:b=ye.iconPosition,dir:R=ye.dir,children:D,popup:T,expanded:v,...w}=e,X=f;return X||(X=R==="rtl"?"chevron-left":"chevron-right"),(0,W.jsxs)("li",{role:"menuitem",...w,className:i(e.className,Ae,"k-item",J(Ae,{focus:o,disabled:u}),{"k-first":h,"k-last":x}),...d&&{"aria-haspopup":"menu"},...d&&{"aria-expanded":v?"true":"false"},...u&&{"aria-disabled":"true"},...o&&{tabIndex:0},children:[(0,W.jsxs)("span",{className:i("k-link k-menu-link",J("k-menu-link",{hover:t,active:a,selected:r,disabled:u})),children:[l&&b==="before"&&(0,W.jsx)(M,{className:"k-menu-link-icon",icon:l}),(0,W.jsx)("span",{className:"k-menu-link-text",children:c}),l&&b==="after"&&(0,W.jsx)(M,{className:"k-menu-link-icon",icon:l}),d&&(0,W.jsx)("span",{className:"k-menu-expand-arrow","aria-hidden":"true",children:(0,W.jsx)(M,{icon:X})})]}),D,T]})};g.states=io;g.options=lo;g.className=Ae;g.defaultOptions=ye;g.moduleName=S;g.folderName=C;var ct=require("react/jsx-runtime"),ut="k-menu-scroll-wrapper",uo=[],mo={},co={},Q=e=>{let{className:t,children:o,orientation:a,...r}=e;return(0,ct.jsx)("div",{...r,className:i(t,ut,{"k-menu-scroll-wrapper-vertical":a==="vertical"}),children:o})};Q.states=uo;Q.options=mo;Q.className=ut;Q.defaultOptions=co;Q.moduleName=S;Q.folderName=C;var mt=Q;var I=require("react/jsx-runtime"),we="k-menu",po=[],fo={},fe={orientation:"horizontal",header:!0,scrollButtonsPosition:"around"},N=e=>{let{children:t,orientation:o=fe.orientation,header:a=fe.header,scrollable:r,scrollButtonsPosition:u=fe.scrollButtonsPosition,wrapperStyles:l,dir:c,popup:h,contextMenu:x,...d}=e,f={horizontal:{prev:c!=="rtl"?"left":"right",next:c!=="rtl"?"right":"left"},vertical:{prev:"up",next:"down"}},b=(0,I.jsx)("ul",{dir:c,...d,className:i(e.className,"k-reset",we,{[`${we}-${o}`]:o,"k-header":a}),role:x?"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:[u==="start"&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(m,{fillMode:"flat",icon:`chevron-${f[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-${f[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-${f[o].prev}`,className:"k-menu-scroll-button k-menu-scroll-button-prev",tabIndex:-1,"aria-label":"Scroll previous"}),b,u==="end"&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(m,{fillMode:"flat",icon:`chevron-${f[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-${f[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-${f[o].next}`,className:"k-menu-scroll-button k-menu-scroll-button-next",tabIndex:-1,"aria-label":"Scroll next"})]}):b,h]})};N.states=po;N.options=fo;N.className=we;N.defaultOptions=fe;N.moduleName=S;N.folderName=C;N.ariaSpec={selector:".k-menu",rules:[{selector:".k-menu:not(.k-context-menu)",attribute:"role=menubar",usage:"Announces the Menu menubar role."},{selector:".k-menu.k-menu-vertical",attribute:"aria-orientation=vertical",usage:"Announces the Menu orientation when vertical."},{selector:".k-menu-item",attribute:"role=menuitem",usage:"Announces the Menu item role."},{selector:".k-menu-item",attribute:"aria-haspopup=menu (when present)",usage:"Indicates a popup menu is associated with the item."},{selector:".k-menu-item",attribute:"aria-expanded=true/false (when present)",usage:"Indicates whether the submenu is expanded."},{selector:".k-menu-item.k-disabled",attribute:"aria-disabled=true",usage:"Informs assistive technologies that a Menu item is disabled."},{selector:".k-menu-expand-arrow",attribute:"aria-hidden=true",usage:"Expand arrow elements are hidden from assistive technologies."},{selector:".k-menu-popup .k-menu-group",attribute:"role=menu",usage:"The role of the nested menu displayed in a popup."},{selector:".k-menu-scroll-button",attribute:"tabindex=-1",usage:"Scroll buttons are removed from the tab sequence."},{selector:".k-menu-scroll-button",attribute:"aria-label",usage:"Scroll buttons have an accessible label."},{selector:".k-menu-item.k-focus",attribute:"tabindex=0",usage:"The focused item has tabindex 0."},{selector:".k-menu-item",attribute:"aria-controls=ul.k-menu-group id (when present)",usage:"Points to the ID of the submenu. Only present when the item controls a submenu element."},{selector:".k-menu-popup .k-menu-group",attribute:"id",usage:"Each nested menu has a deterministic id linked to the parent aria-controls."}]};var dt=require("react/jsx-runtime"),Oe="k-separator",pt={orientation:"horizontal"},Z=e=>{let{orientation:t=pt.orientation,...o}=e;return(0,dt.jsx)("li",{...o,className:i(e.className,"k-item",Oe,{[`${Oe}-${t}`]:t}),role:"separator"})};Z.className=Oe;Z.defaultOptions=pt;Z.moduleName=S;Z.folderName=C;var ft=require("react/jsx-runtime");var bt=require("react/jsx-runtime"),Se="k-menu-group",bo=[],xo={size:[s.undefined,s.small,s.medium,s.large]},Mo={},_=e=>{let{children:t,size:o,...a}=e;return(0,bt.jsx)("ul",{role:"menu",...a,className:i(e.className,Se,F(Se,{size:o})),children:t})};_.states=bo;_.options=xo;_.className=Se;_.defaultOptions=Mo;_.moduleName=S;_.folderName=C;var P=require("react/jsx-runtime"),Be=e=>(0,P.jsx)(N,{children:(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(k,{first:!0,text:"Item 1"}),(0,P.jsx)(k,{showArrow:!0,arrowIconName:"chevron-down",text:"Item 2"}),(0,P.jsx)(k,{showArrow:!0,arrowIconName:"chevron-down",text:"Item 3"}),(0,P.jsx)(k,{text:"Item 4"}),(0,P.jsx)(k,{last:!0,text:"Item 5"})]}),...e});var Te="popup",xt=Te;var _e=require("react/jsx-runtime"),Mt="k-animation-container",ho=[],No={},Ce={positionMode:"absolute",shown:!0},G=e=>{let{positionMode:t=Ce.positionMode,shown:o=Ce.shown,animationStyle:a,offset:r,...u}=e;return(0,_e.jsx)("div",{...u,style:{...r,...e.style},className:i(e.className,Mt,{"k-animation-container-shown":o,"k-animation-container-fixed":t==="fixed"}),children:(0,_e.jsx)("div",{className:"k-child-animation-container",style:a,children:e.children})})};G.states=ho;G.options=No;G.className=Mt;G.defaultOptions=Ce;G.moduleName=Te;G.folderName=xt;var Pe="popup",ht=Pe;var Re=require("react/jsx-runtime"),Nt="k-popup",Io=[],vo={},It={positionMode:"absolute"},B=e=>{let{offset:t,positionMode:o=It.positionMode,animationStyle:a,containerClassName:r,containerRole:u,containerAriaLabel:l,...c}=e;return(0,Re.jsx)(G,{positionMode:o,offset:t,animationStyle:a,className:r,role:u,"aria-label":l,children:(0,Re.jsx)("div",{...c,className:i(e.className,Nt),children:e.children})})};B.states=Io;B.options=vo;B.className=Nt;B.defaultOptions=It;B.moduleName=Pe;B.folderName=ht;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.'}]};var Ke=require("react/jsx-runtime");var ze=require("react/jsx-runtime");var Ue=require("react/jsx-runtime");var He=require("react/jsx-runtime");var z=require("react/jsx-runtime"),ko={...N.options,scrollable:{type:"boolean"}},go=N.states,vt={...N.defaultOptions,variant:"horizontal"},Eo=[{name:"horizontal",title:"Horizontal"},{name:"vertical",title:"Vertical"}],Lo=[{name:"opened",title:"Opened"}],j=e=>{let{variant:t,modifiers:o,...a}={...vt,...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)(B,{className:"k-menu-popup",offset:u,children:(0,z.jsxs)(_,{children:[(0,z.jsx)(g,{text:"Item 1"}),(0,z.jsx)(g,{text:"Item 2"}),(0,z.jsx)(Z,{}),(0,z.jsx)(g,{text:"Item 3"})]})}):null)}),t==="vertical"?(0,z.jsx)(Be,{...a,...r,orientation:"vertical",style:{width:"200px"}}):(0,z.jsx)(Be,{...a,...r})};j.options=ko;j.states=go;j.variants=Eo;j.defaultOptions=vt;j.modifiers=Lo;j.className=N.className;var De=require("react/jsx-runtime");var Ao=require("react/jsx-runtime");var E=require("react/jsx-runtime"),yo=m.states,kt={...m.defaultOptions,variant:"text"},wo=m.options,Oo=[{name:"icon-only",title:"Icon Only"},{name:"icon-and-text",title:"Icon & Text"},{name:"text",title:"Text"}],So=[{name:"opened",title:"Opened"}],ee=e=>{let{variant:t,modifiers:o,...a}={...kt,...e},r={},u=(0,E.jsx)(B,{className:"k-menu-popup",children:(0,E.jsxs)(_,{size:a.size,children:[(0,E.jsx)(g,{first:!0,text:"Menu Item"}),(0,E.jsx)(g,{text:"Menu Item"}),(0,E.jsx)(g,{last:!0,text:"Menu Item"})]})}),l;switch(t){case"icon-only":l=(0,E.jsx)("div",{children:(0,E.jsx)(y,{...a,...r,icon:"star"})});break;case"icon-and-text":l=(0,E.jsx)("div",{children:(0,E.jsx)(y,{...a,...r,icon:"star",children:"Dropdown Button"})});break;default:l=(0,E.jsx)("div",{children:(0,E.jsx)(y,{...a,...r,children:"Dropdown Button"})});break}return(0,E.jsxs)(E.Fragment,{children:[l,(o==null?void 0:o.opened)&&u]})};ee.options=wo;ee.states=yo;ee.variants=Oo;ee.defaultOptions=kt;ee.modifiers=So;ee.className=y.className;var Fe="file-box",gt=Fe;var U=require("react/jsx-runtime"),Et="k-file-box",Bo=[p.selected],To={},ae={icon:"file-pdf",name:"FileName.pdf",size:"2MB",showButton:"true"},H=e=>{let{icon:t=ae.icon,name:o=ae.name,size:a=ae.size,status:r,deleted:u,removeButton:l,showButton:c=ae.showButton,...h}=e,x=[o,a].filter(Boolean).join(" ");return(0,U.jsxs)("li",{role:"listitem",tabIndex:0,"aria-label":x||void 0,...h,className:i(Et,e.className,{"k-file-deleted":u}),children:[(0,U.jsx)(M,{icon:t,size:"xlarge","aria-hidden":"true"}),(0,U.jsxs)("div",{className:"k-file-info",children:[o&&(0,U.jsx)("span",{className:"k-file-name",children:o}),a&&(0,U.jsx)("span",{className:"k-file-size",children:a}),r&&(0,U.jsx)("span",{className:"k-file-status",children:r})]}),c&&(l?(0,U.jsx)(m,{as:"span",icon:"x-circle",fillMode:"flat",size:"xsmall","aria-hidden":"true"}):(0,U.jsx)(y,{icon:"more-vertical",fillMode:"flat",size:"xsmall",showArrow:!1,"aria-label":"File actions"}))]})};H.states=Bo;H.options=To;H.className=Et;H.defaultOptions=ae;H.moduleName=Fe;H.folderName=gt;H.ariaSpec={selector:".k-file-box-wrapper",rules:[{selector:".k-file-box-wrapper",attribute:"role=list",usage:"Explicitly sets the UL role to list."},{selector:".k-file-box-wrapper",attribute:"aria-label",usage:'Provides an accessible name for the file list (e.g. "Attached files").'},{selector:".k-file-box-wrapper .k-files-scroll",attribute:"role=presentation",usage:"The scrollable container between the list and its items is presentational, ensuring the list\u2192listitem relationship is preserved in the accessibility tree."},{selector:".k-file-box-wrapper .k-file-box",attribute:"role=listitem",usage:"Explicitly sets the LI role to listitem."},{selector:".k-file-box-wrapper .k-file-box",attribute:"tabindex",usage:"Makes the file box focusable. Uses roving tabindex: 0 for the focused item, -1 for the rest."},{selector:".k-file-box-wrapper .k-file-box",attribute:"aria-label",usage:'Provides an accessible name describing the file. Can include the file name and size (e.g. "FileName.pdf 2MB").'},{selector:".k-file-box-wrapper .k-file-box .k-icon",attribute:"aria-hidden=true",usage:"The file type icon is decorative and hidden from screen readers."},{selector:".k-file-box-wrapper .k-file-box span.k-button",attribute:"aria-hidden=true",usage:"The remove button is rendered as a decorative span and hidden from screen readers. File removal is handled by keyboard interaction on the listitem itself."}]};var se=require("react/jsx-runtime"),Co=e=>(0,se.jsxs)(ue,{layout:"vertical",...e,children:[(0,se.jsx)(H,{tabIndex:0}),(0,se.jsx)(H,{icon:"file-image",name:"Photo.png",size:"5MB",tabIndex:-1})]});