UNPKG

@progress/kendo-themes-html

Version:

A collection of HTML helpers used for developing Kendo UI themes

2 lines (1 loc) 25.1 kB
var St=Object.create;var ae=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)ae(e,o,{get:t[o],enumerable:!0})},$e=(e,t,o,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Tt(t))!_t.call(e,r)&&r!==o&&ae(e,r,{get:()=>t[r],enumerable:!(s=Bt(t,r))||s.enumerable});return e};var Rt=(e,t,o)=>(o=e!=null?St(Ct(e)):{},$e(t||!e||!e.__esModule?ae(o,"default",{value:e,enumerable:!0}):o,e)),Kt=e=>$e(ae({},"__esModule",{value:!0}),e);var _o={};Pt(_o,{FileBoxNoButton:()=>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,s)=>t[s]||t[o]&&o||null).filter(o=>o!==null).join(" "):t).filter(t=>!!t).join(" ");var D=(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:s,hover:r,focus:u,checked:l,active:c,selected:h,disabled:x,indeterminate:d,loading:f,empty:b,readonly:R,highlighted:H,...T}=t;return i({"k-valid":o,"k-invalid":s,"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":H},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(s=>[`k-${s}`,!0]))}var a={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 fe=require("react/jsx-runtime"),ie="k-file-box-wrapper",We={layout:"horizontal"},le=e=>{let{layout:t=We.layout,scrollingPosition:o,...s}=e;return(0,fe.jsx)("ul",{role:"list","aria-label":"Attached files",...s,className:i(e.className,ie,{"k-files-vertical":t==="vertical","k-files-wrap":t==="wrap",[`${ie}-scrollable-start`]:t==="horizontal"&&(o==="start"||o==="both"),[`${ie}-scrollable-end`]:t==="horizontal"&&(o==="end"||o==="both")}),children:t==="horizontal"?(0,fe.jsx)("div",{className:"k-files-scroll",role:"presentation",children:e.children}):e.children})};le.className=ie;le.defaultOptions=We;var te=require("react/jsx-runtime"),be="k-font-icon",zt=[],Ut={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]},Ht={},oe=e=>{let{size:t,themeColor:o,icon:s,rotate:r,flip:u,...l}=e;return s?(0,te.jsx)("span",{...l,className:i(e.className,be,D(be,{size:t}),{[`k-i-${s}`]:s,[`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=be;oe.defaultOptions=Ht;var Xe=oe;var q=require("react/jsx-runtime"),xe="k-svg-icon",Dt=[],Ft={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:[K.outline,K.solid,K.duotone]},Me={viewBox:"0 0 24 24",variant:K.outline},ne=e=>{var f,b;let{size:t,themeColor:o,rotate:s,flip:r,viewBox:u=Me.viewBox,variant:l=Me.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,xe,D("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,xe,D("k-icon",{size:t}),{[`k-svg-i-${x}`]:x,[`k-color-${o}`]:o,[`k-rotate-${s}`]:s,"k-flip-h":r==="h"||r==="both","k-flip-v":r==="v"||r==="both"}),"aria-hidden":"true",children:(0,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=xe;ne.defaultOptions=Me;var he=ne;var Ne=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 F=require("react/jsx-runtime"),ue="k-icon",$t=e=>e.replace(/([-_][a-z0-9])/gi,t=>t.toUpperCase().replace("-","").replace("_","")),Vt=[],Wt={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:[K.outline,K.solid,K.duotone]},me={viewBox:"0 0 24 24",type:"svg",variant:K.outline},M=e=>{let{iconsType:t}=(0,Ye.useContext)(Qe),{size:o,themeColor:s,icon:r,type:u=t||me.type,rotate:l,flip:c,viewBox:h=me.viewBox,variant:x=me.variant,...d}=e;if(!r)return(0,F.jsx)(F.Fragment,{});if((t||u)==="svg"){if(r==="none")return(0,F.jsx)(he,{...d,className:i(e.className,ue),icon:r,size:o,variant:x});let b=Ne[r]?r:$t(`${r}-icon`);return Ne[b]?(0,F.jsx)(he,{...d,className:i(e.className,ue),icon:Ne[b],size:o,themeColor:s,rotate:l,flip:c,viewBox:h,variant:x}):(0,F.jsx)(F.Fragment,{})}return(0,F.jsx)(Xe,{...d,className:i(e.className,ue),icon:r,size:o,themeColor:s,rotate:l,flip:c})};M.states=Vt;M.options=Wt;M.defaultOptions=me;M.className=ue;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 Ie="button",Ze=Ie;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:[a.undefined,a.xsmall,a.small,a.medium,a.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]},ve={showArrow:!1,arrowIconName:"chevron-down"},m=e=>{let{as:t="button",size:o,rounded:s,fillMode:r,themeColor:u,showArrow:l=ve.showArrow,arrowIconName:c=ve.arrowIconName,variant:h,hover:x,focus:d,active:f,selected:b,disabled:R,togglable:H,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),D(re,{size:o,rounded:s,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":H?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=ve;m.moduleName=Ie;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 ce=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,ce.jsx)(je,{...o,icon:"star"});case"icon-and-text":return(0,ce.jsx)(tt,{...o,icon:"star",children:"Button"});default:return(0,ce.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 ke="menu-button",st=ke;var it=require("react/jsx-runtime"),at="k-menu-button",eo=[p.hover,p.focus,p.active,p.selected,p.disabled],to={size:[a.undefined,a.xsmall,a.small,a.medium,a.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]},ge={showArrow:!0,arrowIconName:"chevron-down"},y=e=>{let{size:t,rounded:o,fillMode:s,themeColor:r,hover:u,focus:l,active:c,selected:h,disabled:x,icon:d,text:f,showArrow:b=ge.showArrow,arrowIconName:R=ge.arrowIconName,expanded:H,...T}=e;return(0,it.jsx)(m,{...T,className:i(e.className,at),text:f,size:t,rounded:o,fillMode:s,themeColor:r,hover:u,focus:l,active:c,selected:h,disabled:x,ariaDisabled:x||void 0,icon:d,showArrow:b,arrowIconName:R,"aria-expanded":H?"true":"false",...!f&&d&&!e["aria-label"]&&{"aria-label":"Menu"}})};y.states=eo;y.options=to;y.className=at;y.defaultOptions=ge;y.moduleName=ke;y.folderName=st;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 $=require("react/jsx-runtime"),Ee="k-menu-item",so=[p.hover,p.focus,p.active,p.selected,p.disabled],ao={},lt={iconPosition:"before"},k=e=>{let{hover:t,focus:o,active:s,selected:r,disabled:u,icon:l,text:c,first:h,last:x,showArrow:d,arrowIconName:f,iconPosition:b=lt.iconPosition,dir:R,children:H,expanded:T,...v}=e,w=f;return w||(w=R==="rtl"?"chevron-left":"chevron-right"),(0,$.jsxs)("li",{...v,className:i(e.className,Ee,"k-item",J(Ee,{focus:o,disabled:u,hover:t,active:s,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,$.jsxs)("span",{className:i("k-link k-menu-link"),children:[l&&b==="before"&&(0,$.jsx)(M,{className:"k-menu-link-icon",icon:l}),(0,$.jsx)("span",{className:"k-menu-link-text",children:c}),l&&b==="after"&&(0,$.jsx)(M,{className:"k-menu-link-icon",icon:l}),d&&(0,$.jsx)("span",{className:"k-menu-expand-arrow","aria-hidden":"true",children:(0,$.jsx)(M,{icon:w})})]}),H]})};k.states=so;k.options=ao;k.className=Ee;k.defaultOptions=lt;k.moduleName=S;k.folderName=C;var V=require("react/jsx-runtime"),Le="k-menu-item",io=[p.hover,p.focus,p.active,p.selected,p.disabled],lo={},Ae={dir:"ltr",iconPosition:"before"},g=e=>{let{hover:t,focus:o,active:s,selected:r,disabled:u,icon:l,text:c,first:h,last:x,showArrow:d,arrowIconName:f,iconPosition:b=Ae.iconPosition,dir:R=Ae.dir,children:H,popup:T,expanded:v,...w}=e,X=f;return X||(X=R==="rtl"?"chevron-left":"chevron-right"),(0,V.jsxs)("li",{role:"menuitem",...w,className:i(e.className,Le,"k-item",J(Le,{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,V.jsxs)("span",{className:i("k-link k-menu-link",J("k-menu-link",{hover:t,active:s,selected:r,disabled:u})),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:X})})]}),H,T]})};g.states=io;g.options=lo;g.className=Le;g.defaultOptions=Ae;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:s,...r}=e;return(0,ct.jsx)("div",{...r,className:i(t,ut,{"k-menu-scroll-wrapper-vertical":s==="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"),ye="k-menu",po=[],fo={},de={orientation:"horizontal",header:!0,scrollButtonsPosition:"around"},N=e=>{let{children:t,orientation:o=de.orientation,header:s=de.header,scrollable:r,scrollButtonsPosition:u=de.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",ye,{[`${ye}-${o}`]:o,"k-header":s}),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=ye;N.defaultOptions=de;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"),we="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",we,{[`${we}-${t}`]:t}),role:"separator"})};Z.className=we;Z.defaultOptions=pt;Z.moduleName=S;Z.folderName=C;var ft=require("react/jsx-runtime");var bt=require("react/jsx-runtime"),Oe="k-menu-group",bo=[],xo={size:[a.undefined,a.small,a.medium,a.large]},Mo={},_=e=>{let{children:t,size:o,...s}=e;return(0,bt.jsx)("ul",{role:"menu",...s,className:i(e.className,Oe,D(Oe,{size:o})),children:t})};_.states=bo;_.options=xo;_.className=Oe;_.defaultOptions=Mo;_.moduleName=S;_.folderName=C;var P=require("react/jsx-runtime"),Se=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 Be="popup",xt=Be;var Ce=require("react/jsx-runtime"),Mt="k-animation-container",ho=[],No={},Te={positionMode:"absolute",shown:!0},G=e=>{let{positionMode:t=Te.positionMode,shown:o=Te.shown,animationStyle:s,offset:r,...u}=e;return(0,Ce.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,Ce.jsx)("div",{className:"k-child-animation-container",style:s,children:e.children})})};G.states=ho;G.options=No;G.className=Mt;G.defaultOptions=Te;G.moduleName=Be;G.folderName=xt;var _e="popup",ht=_e;var Pe=require("react/jsx-runtime"),Nt="k-popup",Io=[],vo={},It={positionMode:"absolute"},B=e=>{let{offset:t,positionMode:o=It.positionMode,animationStyle:s,containerClassName:r,containerRole:u,containerAriaLabel:l,...c}=e;return(0,Pe.jsx)(G,{positionMode:o,offset:t,animationStyle:s,className:r,role:u,"aria-label":l,children:(0,Pe.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=_e;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 Re=require("react/jsx-runtime");var Ke=require("react/jsx-runtime");var ze=require("react/jsx-runtime");var Ue=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,...s}={...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)(Se,{...s,...r,orientation:"vertical",style:{width:"200px"}}):(0,z.jsx)(Se,{...s,...r})};j.options=ko;j.states=go;j.variants=Eo;j.defaultOptions=vt;j.modifiers=Lo;j.className=N.className;var He=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,...s}={...kt,...e},r={},u=(0,E.jsx)(B,{className:"k-menu-popup",children:(0,E.jsxs)(_,{size:s.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,{...s,...r,icon:"star"})});break;case"icon-and-text":l=(0,E.jsx)("div",{children:(0,E.jsx)(y,{...s,...r,icon:"star",children:"Dropdown Button"})});break;default:l=(0,E.jsx)("div",{children:(0,E.jsx)(y,{...s,...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 De="file-box",gt=De;var U=require("react/jsx-runtime"),Et="k-file-box",Bo=[p.selected],To={},se={icon:"file-pdf",name:"FileName.pdf",size:"2MB",showButton:"true"},W=e=>{let{icon:t=se.icon,name:o=se.name,size:s=se.size,status:r,deleted:u,removeButton:l,showButton:c=se.showButton,...h}=e,x=[o,s].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}),s&&(0,U.jsx)("span",{className:"k-file-size",children:s}),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"}))]})};W.states=Bo;W.options=To;W.className=Et;W.defaultOptions=se;W.moduleName=De;W.folderName=gt;W.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 Fe=require("react/jsx-runtime"),Co=e=>(0,Fe.jsx)(le,{...e,children:(0,Fe.jsx)(W,{showButton:!1})});