@progress/kendo-themes-html
Version:
A collection of HTML helpers used for developing Kendo UI themes
2 lines (1 loc) • 33.3 kB
JavaScript
var n=(...e)=>e.filter(t=>t!==!0&&!!t).map(t=>Array.isArray(t)?n(...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 T=(e,t)=>n({[`${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"}),k=(e,t)=>{let{valid:o,invalid:a,hover:r,focus:i,checked:m,active:c,selected:b,disabled:C,indeterminate:h,loading:L,empty:I,readonly:q,highlighted:le,...w}=t;return n({"k-valid":o,"k-invalid":a,"k-hover":r,"k-focus":i,"k-checked":m,"k-active":c,"k-selected":b,"k-disabled":C,"k-indeterminate":h&&!m,"k-loading":L,"k-empty":I,"k-readonly":q,"k-highlighted":le},Object.keys(w).reduce((A,_)=>(_.startsWith("k-")?A[_]=w[_]:A[`k-${_}`]=w[_],A),{}))};function Mt(e,t){if(!t)return{};let o=Array.isArray(t)?t:[t];return Object.fromEntries(o.map(a=>[`k-${a}`,!0]))}var l={undefined:void 0,xsmall:"xsmall",small:"small",medium:"medium",large:"large",xlarge:"xlarge",xxlarge:"xxlarge",xxxlarge:"xxxlarge"},u={undefined:void 0,none:"none",small:"small",medium:"medium",large:"large",full:"full"},f={undefined:void 0,solid:"solid",flat:"flat",outline:"outline",clear:"clear",link:"link"},R={undefined:void 0,outline:"outline",solid:"solid",duotone:"duotone"},p={undefined:void 0,inherit:"inherit",base:"base",primary:"primary",secondary:"secondary",tertiary:"tertiary",info:"info",success:"success",warning:"warning",error:"error",inverse:"inverse"},s={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"},gt={calloutMap:{top:"n",bottom:"s",left:"w",right:"e"},orientationMap:{vertical:"vstack",horizontal:"hstack"}};var Ge="prompt",At=Ge;import{Fragment as Io,jsx as kt}from"react/jsx-runtime";var St="k-prompt",Eo=[],Oo={},Lo={},E=e=>{let{...t}=e;return kt("div",{...t,className:n(e.className,St),children:kt(Io,{children:e.children})})};E.states=Eo;E.options=Oo;E.className=St;E.defaultOptions=Lo;E.moduleName=Ge;E.folderName=At;E.ariaSpec={selector:".k-prompt",rules:[{selector:".k-input-prefix > .k-button",attribute:"role=button or nodeName=button",usage:"The buttons must have appropriate role."},{selector:".k-input-prefix > .k-button",attribute:"aria-label or title",usage:"The buttons must be properly labelled."},{selector:".k-input-suffix > .k-button",attribute:"role=button or nodeName=button",usage:"The buttons must have appropriate role."},{selector:".k-input-suffix > .k-button",attribute:"aria-label or title",usage:"The buttons must be properly labelled."},{selector:".k-input-suffix > .k-prompt-send.k-disabled",attribute:"disabled",usage:"Announces send action as disabled if necessary."},{selector:".k-prompt-expander .k-button",attribute:"aria-controls (when present)",usage:"Points to the controlled element based on the given id."},{selector:".k-prompt-expander .k-button",attribute:"aria-expanded",usage:"Indicates the expanded state of the prompt expander content."},{selector:".k-prompt-expander .k-suggestion-group",attribute:"role=group",usage:"Indicates that the suggestion container element is a group."},{selector:".k-prompt-expander .k-suggestion",attribute:"role=button",usage:"Indicates that the suggestion element is a button."},{selector:".k-prompt-expander .k-suggestion",attribute:"aria-label or title",usage:"The suggestion elements must be properly labelled."},{selector:".k-prompt-expander .k-suggestion",attribute:"tabindex=0",usage:"The suggestion element should be focusable."}]};import{Fragment as Bo,jsx as yt}from"react/jsx-runtime";var Po="k-prompt-content",Et=e=>{let{...t}=e;return yt("div",{...t,className:n(e.className,Po),children:yt(Bo,{children:e.children})})};import{jsx as Ro}from"react/jsx-runtime";var _o="k-prompt-view",Ot=e=>{let{...t}=e;return Ro("div",{...t,className:n(e.className,_o),children:e.children})};import{Fragment as wo,jsx as Lt}from"react/jsx-runtime";var We="k-font-icon",Ko=[],Ho={size:[l.undefined,l.xsmall,l.small,l.medium,l.large,l.xlarge,l.xxlarge,l.xxxlarge],themeColor:[p.undefined,p.base,p.primary,p.secondary,p.tertiary,p.success,p.warning,p.error,p.info]},Do={},de=e=>{let{size:t,themeColor:o,icon:a,rotate:r,flip:i,...m}=e;return a?Lt("span",{...m,className:n(e.className,We,T(We,{size:t}),{[`k-i-${a}`]:a,[`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"}):Lt(wo,{})};de.states=Ko;de.options=Ho;de.className=We;de.defaultOptions=Do;var It=de;import{Fragment as Fo,jsx as Se}from"react/jsx-runtime";var Xe="k-svg-icon",zo=[],Uo={size:[l.undefined,l.xsmall,l.small,l.medium,l.large,l.xlarge,l.xxlarge,l.xxxlarge],themeColor:[p.undefined,p.base,p.primary,p.secondary,p.tertiary,p.success,p.warning,p.error,p.info],variant:[R.outline,R.solid,R.duotone]},Je={viewBox:"0 0 24 24",variant:R.outline},ce=e=>{let{size:t,themeColor:o,rotate:a,flip:r,viewBox:i=Je.viewBox,variant:m=Je.variant,icon:c,...b}=e;if(!c)return Se(Fo,{});if(c==="none")return Se("span",{...b,className:n(e.className,Xe,T("k-icon",{size:t}),"k-none"),"aria-hidden":"true"});let C=typeof c=="object"&&c.name&&c.name,h=typeof c=="object"?m&&c.variants?.[m]||c.variants?.outline||c.content:void 0;return Se("span",{...b,className:n(e.className,Xe,T("k-icon",{size:t}),{[`k-svg-i-${C}`]:C,[`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:Se("svg",{"aria-hidden":!0,focusable:!1,xmlns:"http://www.w3.org/2000/svg",viewBox:typeof c=="object"?c.viewBox:i,dangerouslySetInnerHTML:h!==void 0?{__html:h}:void 0,children:c?void 0:e.children})})};ce.states=zo;ce.options=Uo;ce.className=Xe;ce.defaultOptions=Je;var Ye=ce;import*as Qe from"@progress/kendo-svg-icons";var Pt="icon",Bt="icons";import{useContext as $o}from"react";import{createContext as Vo}from"react";var _t=Vo({iconsType:"svg"});import{Fragment as Rt,jsx as pe}from"react/jsx-runtime";var ye="k-icon",qo=e=>e.replace(/([-_][a-z0-9])/gi,t=>t.toUpperCase().replace("-","").replace("_","")),Go=[],Wo={size:[l.undefined,l.xsmall,l.small,l.medium,l.large,l.xlarge,l.xxlarge,l.xxxlarge],themeColor:[p.undefined,p.base,p.primary,p.secondary,p.tertiary,p.success,p.warning,p.error,p.info],variant:[R.outline,R.solid,R.duotone]},Ee={viewBox:"0 0 24 24",type:"svg",variant:R.outline},x=e=>{let{iconsType:t}=$o(_t),{size:o,themeColor:a,icon:r,type:i=t||Ee.type,rotate:m,flip:c,viewBox:b=Ee.viewBox,variant:C=Ee.variant,...h}=e;if(!r)return pe(Rt,{});if((t||i)==="svg"){if(r==="none")return pe(Ye,{...h,className:n(e.className,ye),icon:r,size:o,variant:C});let I=Qe[r]?r:qo(`${r}-icon`);return Qe[I]?pe(Ye,{...h,className:n(e.className,ye),icon:Qe[I],size:o,themeColor:a,rotate:m,flip:c,viewBox:b,variant:C}):pe(Rt,{})}return pe(It,{...h,className:n(e.className,ye),icon:r,size:o,themeColor:a,rotate:m,flip:c})};x.states=Go;x.options=Wo;x.defaultOptions=Ee;x.className=ye;x.moduleName=Pt;x.folderName=Bt;x.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 Ze="button",Kt=Ze;import{Fragment as Ht,jsx as W,jsxs as Dt}from"react/jsx-runtime";var me="k-button",Xo=["icon-button"],Jo=[s.hover,s.focus,s.active,s.selected,s.disabled,s.generating],Yo={size:[l.undefined,l.xsmall,l.small,l.medium,l.large],rounded:[u.undefined,u.none,u.small,u.medium,u.large,u.full],fillMode:[f.undefined,f.solid,f.flat,f.outline,f.clear,f.link],themeColor:[p.undefined,p.base,p.primary,p.secondary,p.tertiary,p.success,p.warning,p.error,p.info,p.inverse]},je={showArrow:!1,arrowIconName:"chevron-down"},d=e=>{let{as:t="button",size:o,rounded:a,fillMode:r,themeColor:i,showArrow:m=je.showArrow,arrowIconName:c=je.arrowIconName,variant:b,hover:C,focus:h,active:L,selected:I,disabled:q,togglable:le,ariaDisabled:w,icon:A,iconSize:_,text:G,iconClassName:ke,className:Fe,...Ve}=e,$e=A!=null,qe=e.children!==void 0;return Dt(t,{className:n(Fe,me,Mt(me,b),T(me,{size:o,rounded:a,fillMode:r,themeColor:i}),k(me,{hover:C,focus:h,active:L,disabled:q||w,selected:I}),{"k-icon-button":!G&&!qe&&$e}),"aria-pressed":le?I?"true":"false":void 0,...Ve,"aria-disabled":w?"true":void 0,disabled:q||void 0,children:[typeof A=="string"&&A&&W(x,{className:n(ke,"k-button-icon"),icon:A,size:_}),A&&typeof A!="string"&&W(Ht,{children:A}),G?Dt(Ht,{children:[G&&W("span",{className:"k-button-text",children:G}),e.children]}):e.children&&W("span",{className:"k-button-text",children:e.children}),m&&W("span",{className:"k-menu-button-arrow k-button-arrow",children:W(x,{icon:c})})]})};d.states=Jo;d.options=Yo;d.variants=Xo;d.className=me;d.defaultOptions=je;d.moduleName=Ze;d.folderName=Kt;d.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 Qo}from"react/jsx-runtime";var ue=e=>Qo(d,{icon:"folder",...e,"aria-label":e["aria-label"]||"Folder",children:void 0});import{jsx as Zo}from"react/jsx-runtime";var F=e=>Zo(d,{icon:"folder",children:"Button",...e});import{jsx as jo}from"react/jsx-runtime";var Oe=e=>jo(d,{children:"Button",...e});import{jsx as et}from"react/jsx-runtime";var en=d.options,tn=d.states,on={...d.defaultOptions,variant:"text"},nn=[{name:"icon-only",title:"Icon Only"},{name:"icon-and-text",title:"Icon & Text"},{name:"text",title:"Text"}],an=[],X=e=>{let{variant:t,...o}=e;switch(t){case"icon-only":return et(ue,{...o,icon:"star"});case"icon-and-text":return et(F,{...o,icon:"star",children:"Button"});default:return et(Oe,{...o,children:"Button"})}};X.options=en;X.states=tn;X.variants=nn;X.defaultOptions=on;X.modifiers=an;X.className=d.className;import{jsx as rn}from"react/jsx-runtime";var wt="k-prompt-send",zt={generating:!1},J=e=>{let{generating:t=zt.generating,...o}=e;return rn(d,{...o,className:n(e.className,wt,{"k-generating":t}),icon:t?"stop-sm":"paper-plane",active:t,fillMode:"flat","aria-label":t?"Stop generating":"Send prompt"})};J.states=d.states;J.options=d.options;J.className=wt;J.defaultOptions=zt;var tt="action-buttons",Ut=tt;import{jsx as dn}from"react/jsx-runtime";var Le="k-actions",sn=[],ln={},ot={alignment:"start",orientation:"horizontal"},v=e=>{let{alignment:t=ot.alignment,orientation:o=ot.orientation,...a}=e;return dn("div",{...a,className:n(Le,{[`${Le}-${t}`]:t,[`${Le}-${o}`]:o},e.className),children:e.children})};v.states=sn;v.options=ln;v.className=Le;v.defaultOptions=ot;v.moduleName=tt;v.folderName=Ut;import{jsx as pn}from"react/jsx-runtime";var cn="k-card-callout",Ft=e=>{let{callout:t,...o}=e;return pn("span",{...o,className:n(e.className,cn,{[`k-callout-${gt.calloutMap[t]||t}`]:t})})};var O="card",P=O;import{Fragment as xn,jsx as Vt,jsxs as bn}from"react/jsx-runtime";var nt="k-card",mn=[s.hover,s.focus,s.selected,s.disabled],un={},fn={},N=e=>{let{orientation:t,callout:o,hover:a,focus:r,selected:i,disabled:m,...c}=e;return bn("div",{...c,className:n(e.className,nt,k(nt,{hover:a,focus:r,disabled:m,selected:i}),{[`k-card-${t}`]:t,"k-card-with-callout":o}),children:[o&&o!=="true"&&Vt(Ft,{callout:o}),Vt(xn,{children:e.children})]})};N.states=mn;N.options=un;N.className=nt;N.defaultOptions=fn;N.moduleName=O;N.folderName=P;N.ariaSpec={selector:".k-card",rules:[{selector:".k-card-list .k-card",attribute:"role=listitem",usage:"When the card is located in a list, it should have the listitem role."},{selector:".k-card-list .k-card",attribute:"tabindex=0",usage:"The card component is focusable when navigatable."},{selector:".k-card-list .k-card",attribute:"aria-describedby=.k-card-title id",usage:"Associate the card to the title element."},{selector:".k-card-list .k-card",attribute:"aria-keyshortcuts=Enter",usage:"Announces the bound Enter key that enables navigation inside the card."}]};import{Fragment as Tn,jsx as $t}from"react/jsx-runtime";var at="k-card-list",hn=[],Nn={},Cn={},z=e=>{let{...t}=e;return $t("div",{...t,className:n(e.className,at,k(at,{})),role:"list",children:$t(Tn,{children:e.children})})};z.states=hn;z.options=Nn;z.className=at;z.defaultOptions=Cn;z.moduleName=O;z.folderName=P;z.ariaSpec={selector:".k-card-list",rules:[{selector:".k-card-list",attribute:"role=list",usage:"The card list container announces its list role."},{selector:".k-card-list .k-card",attribute:"role=listitem",usage:"Each card in the list has the listitem role."},{selector:".k-card-list .k-card",attribute:"tabindex=0",usage:"The card is focusable when navigatable."},{selector:".k-card-list .k-card",attribute:"aria-describedby=.k-card-title id",usage:"Associate the card to its title element."},{selector:".k-card-list .k-card",attribute:"aria-keyshortcuts=Enter",usage:"Announces the Enter key for navigation inside the card."}]};import{jsx as An}from"react/jsx-runtime";var qt="k-card-group",vn=[],Mn={},gn={},Y=e=>{let{...t}=e;return An("div",{...t,className:n(e.className,qt),children:e.children})};Y.states=vn;Y.options=Mn;Y.className=qt;Y.defaultOptions=gn;Y.moduleName=O;Y.folderName=P;import{jsx as En}from"react/jsx-runtime";var rt="k-card-wrap",kn=[s.focus,s.selected],Sn={},yn={},Q=e=>{let{focus:t,selected:o,...a}=e;return En("div",{...a,className:n(e.className,rt,k(rt,{focus:t,selected:o})),children:e.children})};Q.states=kn;Q.options=Sn;Q.className=rt;Q.defaultOptions=yn;Q.moduleName=O;Q.folderName=P;import{jsx as Ln}from"react/jsx-runtime";var st="k-card-title",On=[s.hover,s.focus],V=e=>{let{hover:t,focus:o,...a}=e;return Ln("div",{...a,className:n(e.className,st,k(st,{hover:t,focus:o})),children:e.children})};V.states=On;V.className=st;import{jsx as Pn}from"react/jsx-runtime";var In="k-card-subtitle",Ie=e=>{let{...t}=e;return Pn("div",{...t,className:n(e.className,In),children:e.children})};import{Fragment as Wt,jsx as Pe}from"react/jsx-runtime";var Gt="k-card-media",it=e=>{let{src:t,...o}=e;return Pe(Wt,{children:t?Pe("img",{...o,className:n(e.className,Gt),src:t}):Pe("span",{...o,className:n(e.className,Gt),children:Pe(Wt,{children:e.children})})})};import{Fragment as _n,jsx as fe,jsxs as Rn}from"react/jsx-runtime";var Bn="k-card-header",xe=e=>{let{title:t,subtitle:o,details:a,...r}=e;return Rn("div",{...r,className:n(e.className,Bn),children:[t&&fe(V,{children:t}),o&&fe(Ie,{children:o}),fe(_n,{children:e.children}),a&&fe("span",{className:"k-card-header-actions",children:fe(d,{className:"k-card-details",icon:"more-vertical",fillMode:"flat","aria-label":"Card details"})})]})};import{jsx as Hn}from"react/jsx-runtime";var Kn="k-card-footer",lt=e=>{let{...t}=e;return Hn("div",{...t,className:n(e.className,Kn),children:e.children})};import{Fragment as wn,jsx as be,jsxs as zn}from"react/jsx-runtime";var Dn="k-card-body",K=e=>{let{title:t,subtitle:o,details:a,...r}=e;return zn("div",{...r,className:n(e.className,Dn),children:[t&&be(V,{children:t}),o&&be(Ie,{children:o}),be(wn,{children:e.children}),a&&be("span",{className:"k-card-header-actions",children:be(d,{className:"k-card-details",icon:"more-vertical",fillMode:"flat","aria-label":"Card details"})})]})};import{jsx as $n}from"react/jsx-runtime";var Xt="k-card-deck",Un=[],Fn={},Vn={},Z=e=>{let{...t}=e;return $n("div",{...t,className:n(e.className,Xt),children:e.children})};Z.states=Un;Z.options=Fn;Z.className=Xt;Z.defaultOptions=Vn;Z.moduleName=O;Z.folderName=P;import{jsx as Xn}from"react/jsx-runtime";var Jt="k-card-deck-scrollwrap",qn=[],Gn={},Wn={},j=e=>{let{...t}=e;return Xn("div",{...t,className:n(e.className,Jt),children:e.children})};j.states=qn;j.options=Gn;j.className=Jt;j.defaultOptions=Wn;j.moduleName=O;j.folderName=P;import{Fragment as Jn,jsx as ee,jsxs as Yt}from"react/jsx-runtime";var Qt=e=>ee(N,{orientation:"vertical",children:Yt(Jn,{children:[ee(xe,{children:"Card Header"}),ee(K,{children:ee("p",{children:"Some quick example text to build on the card title and make up the bulk of the card's content."})}),Yt(v,{className:"k-card-actions",children:[ee(d,{fillMode:"flat",themeColor:"primary",children:"Action 1"}),ee(d,{fillMode:"flat",themeColor:"primary",children:"Action 2"})]})]}),...e});import{Fragment as Yn,jsx as he,jsxs as Zt}from"react/jsx-runtime";var jt=e=>he(N,{orientation:"horizontal",children:Zt(Yn,{children:[he(K,{title:"Card Title",children:he("p",{children:"Some quick example text to build on the card title and make up the bulk of the card's content."})}),Zt(v,{orientation:"vertical",className:"k-card-actions",children:[he(d,{fillMode:"flat",themeColor:"primary",children:"Action 1"}),he(d,{fillMode:"flat",themeColor:"primary",children:"Action 2"})]})]}),...e});import{jsx as Yi,jsxs as Qi}from"react/jsx-runtime";import{jsx as g,jsxs as Ne}from"react/jsx-runtime";var Qn=N.options,Zn=N.states,eo={...N.defaultOptions,variant:"vertical"},jn=[{name:"vertical",title:"Vertical"},{name:"horizontal",title:"Horizontal"}],ea=[{name:"media",title:"Card with Media"},{name:"header",title:"Card with Header"},{name:"footer",title:"Card with Footer"}],te=e=>{let{variant:t,modifiers:o,...a}={...eo,...e},r=!1,i=!1,m=!1;return Object.keys(o||{}).forEach(c=>{switch(c){case"media":{r=!!o?.[c];break}case"header":{i=!!o?.[c];break}case"footer":{m=!!o?.[c];break}}}),t==="horizontal"?Ne(jt,{style:{maxWidth:"420px"},...a,children:[r&&g(it,{src:"https://demos.telerik.com/kendo-ui/content/web/cards/rome.jpg"}),Ne("div",{children:[i&&g(xe,{title:"Header Title",subtitle:"Header Subtitle"}),g(K,{title:"Title",subtitle:"Subtitle",children:g("p",{children:"Some quick example text to build on the card title and make up the bulk of the card's content."})}),m&&g(lt,{children:"Card Footer"})]}),(i||m)&&g("span",{className:"k-separator k-separator-vertical"}),Ne(v,{orientation:"vertical",alignment:"stretched",className:"k-card-actions",children:[g(d,{fillMode:"flat",themeColor:"primary",children:"Button"}),g(d,{fillMode:"flat",themeColor:"primary",children:"Button"})]})]}):Ne(Qt,{style:{maxHeight:"450px",width:"300px"},...a,children:[i&&g(xe,{title:"Header Title",subtitle:"Header Subtitle"}),r&&g(it,{src:"https://demos.telerik.com/kendo-ui/content/web/cards/rome.jpg"}),g(K,{title:"Title",subtitle:"Subtitle",children:g("p",{children:"Some quick example text to build on the card title and make up the bulk of the card's content."})}),m&&g(lt,{children:"Card Footer"}),Ne(v,{className:"k-card-actions",children:[g(d,{fillMode:"flat",themeColor:"primary",children:"Button"}),g(d,{fillMode:"flat",themeColor:"primary",children:"Button"})]})]})};te.options=Qn;te.states=Zn;te.variants=jn;te.defaultOptions=eo;te.modifiers=ea;te.className=N.className;var dt="speech-to-text-button",to=dt;import{jsx as ta}from"react/jsx-runtime";var oo="k-speech-to-text-button",no={icon:"microphone"},S=e=>{let{listening:t=!1,icon:o=no.icon,...a}=e;return ta(d,{...a,icon:t?"stop":o,className:n(e.className,oo,{"k-listening":t}),"aria-pressed":t?"true":"false","aria-label":t?"Stop listening":"Start listening"})};S.states=d.states;S.options=d.options;S.className=oo;S.defaultOptions=no;S.moduleName=dt;S.folderName=to;S.ariaSpec={selector:".k-speech-to-text-button",rules:[{selector:".k-button.k-speech-to-text-button",attribute:"role=button or nodeName=button",usage:"If the used element is not <button>, explicitly set its role to button."},{selector:".k-button.k-speech-to-text-button",attribute:"aria-pressed",usage:"Announces the toggle behaviour of the button."},{selector:".k-button.k-speech-to-text-button",attribute:"aria-label",usage:"Accessible name for the speech-to-text button."}]};import{jsx as zl}from"react/jsx-runtime";import{jsx as $l}from"react/jsx-runtime";import{jsx as sa}from"react/jsx-runtime";var oa=d.states,ao={...d.defaultOptions,variant:"normal"},na={...d.options,fillMode:d.options.fillMode.filter(e=>e!=="clear"&&e!=="link")},aa=[],ra=[{name:"normal",title:"Normal"},{name:"listening",title:"Listening"}],oe=e=>{let{variant:t,...o}={...ao,...e},a={};return t==="listening"&&(a.listening=!0),sa(S,{...o,...a})};oe.options=na;oe.states=oa;oe.variants=ra;oe.defaultOptions=ao;oe.modifiers=aa;oe.className=S.className;var ct="textarea",ro=ct;var Ce="input",Be=Ce;import{jsx as ca}from"react/jsx-runtime";var _e="k-input",ia=[s.hover,s.focus,s.valid,s.invalid,s.required,s.disabled,s.loading,s.readonly],la={size:[l.undefined,l.small,l.medium,l.large],rounded:[u.undefined,u.none,u.small,u.medium,u.large,u.full],fillMode:[f.undefined,f.solid,f.flat,f.outline]},da={},y=e=>{let{hover:t,focus:o,disabled:a,invalid:r,valid:i,loading:m,readonly:c,size:b,rounded:C,fillMode:h,...L}=e;return ca("span",{...L,className:n(e.className,_e,T(_e,{size:b,rounded:C,fillMode:h}),k(_e,{hover:t,focus:o,disabled:a,invalid:r,valid:i,loading:m,readonly:c}))})};y.states=ia;y.options=la;y.className=_e;y.defaultOptions=da;y.moduleName=Ce;y.folderName=Be;import{jsx as fa}from"react/jsx-runtime";var Re="k-picker",pa=[s.hover,s.focus,s.valid,s.invalid,s.required,s.disabled,s.loading,s.readonly],ma={size:[l.undefined,l.small,l.medium,l.large],rounded:[u.undefined,u.none,u.small,u.medium,u.large,u.full],fillMode:[f.undefined,f.solid,f.flat,f.outline]},ua={},ne=e=>{let{hover:t,focus:o,disabled:a,invalid:r,valid:i,loading:m,readonly:c,size:b,rounded:C,fillMode:h,...L}=e;return fa("span",{...L,className:n(e.className,Re,T(Re,{size:b,rounded:C,fillMode:h}),k(Re,{hover:t,focus:o,disabled:a,invalid:r,valid:i,loading:m,readonly:c})),children:e.children})};ne.states=pa;ne.options=ma;ne.className=Re;ne.defaultOptions=ua;ne.moduleName=Ce;ne.folderName=Be;import{Fragment as ha,jsx as pt}from"react/jsx-runtime";var so="k-clear-value",xa=[s.disabled,s.loading,s.readonly],ba={},Te=e=>{let{disabled:t,loading:o,readonly:a,value:r}=e;return t||a||o||!r?pt(ha,{}):pt("span",{className:n(e.className,so),children:pt(x,{icon:"x"})})};Te.states=xa;Te.options=ba;Te.className=so;import{jsx as Ta}from"react/jsx-runtime";var mt="k-input-inner",Na=[],Ca={},Ke={type:"text",autocomplete:"off",value:"",placeholder:""},ve=e=>{let{value:t=Ke.value,type:o=Ke.type,placeholder:a=Ke.placeholder,autocomplete:r=Ke.autocomplete,disabled:i,readOnly:m,...c}=e;return Ta("input",{...c,type:o,className:n(e.className,mt,T(mt,e)),placeholder:a,autoComplete:r,defaultValue:t,disabled:i||void 0,readOnly:m||void 0})};ve.states=Na;ve.options=Ca;ve.className=mt;import{jsx as io,jsxs as ga}from"react/jsx-runtime";var ut="k-input-inner",va=[],Ma={},ft=e=>{let{value:t,placeholder:o,showValue:a,valueIcon:r,valueIconName:i,...m}=e;return ga("span",{...m,className:n(e.className,ut,T(ut,e)),children:[r,!r&&i&&io(x,{className:"k-input-value-icon",icon:i}),a&&!t&&o,a&&t&&io("span",{className:"k-input-value-text",children:t})]})};ft.states=va;ft.options=Ma;ft.className=ut;import{jsx as Sa}from"react/jsx-runtime";var xt="k-input-inner",Aa=[],ka={},lo={value:"",placeholder:""},Me=e=>{let{value:t=lo.value,placeholder:o=lo.placeholder,rows:a,disabled:r,...i}=e;return Sa("textarea",{...i,className:n(e.className,xt,T(xt,e)),placeholder:o,rows:a,defaultValue:t,disabled:r||void 0})};Me.states=Aa;Me.options=ka;Me.className=xt;import{Fragment as Ea,jsx as co}from"react/jsx-runtime";var po="k-input-loading-icon",ya=[s.disabled,s.loading],He=e=>{let{disabled:t,loading:o}=e;return t||!o?co(Ea,{}):co("span",{className:n(e.className,po,"k-icon k-i-loading")})};He.states=ya;He.className=po;import{Fragment as Ia,jsx as mo}from"react/jsx-runtime";var uo="k-input-validation-icon",Oa=[s.valid,s.invalid,s.disabled,s.loading],La={},ge=e=>{let{valid:t,invalid:o,disabled:a,loading:r}=e,i=o?"warning-circle":"check-circle";return a||r||!!!(t||o)?mo(Ia,{}):mo(x,{className:n(uo),icon:i})};ge.states=Oa;ge.options=La;ge.className=uo;import{Fragment as _a,jsx as fo}from"react/jsx-runtime";var Pa="k-input-prefix",Ba={direction:"horizontal"},De=e=>{let{direction:t=Ba.direction,...o}=e;return e.children?fo("span",{...o,className:n(Pa,e.className,{[`k-input-prefix-${t}`]:t}),children:e.children}):fo(_a,{})};import{Fragment as Ha,jsx as xo}from"react/jsx-runtime";var Ra="k-input-suffix",Ka={direction:"horizontal"},we=e=>{let{direction:t=Ka.direction,...o}=e;return e.children?xo("span",{...o,className:n(Ra,e.className,{[`k-input-suffix-${t}`]:t}),children:e.children}):xo(Ha,{})};import{jsx as Ud}from"react/jsx-runtime";import{jsx as qd}from"react/jsx-runtime";import{jsx as wa}from"react/jsx-runtime";var bo="k-input-separator",Da={direction:"vertical"},ae=e=>{let{direction:t=Da.direction,...o}=e;return wa("span",{...o,className:n(bo,e.className,{[`${bo}-${t}`]:t})})};import{Fragment as ho,jsx as H,jsxs as bt}from"react/jsx-runtime";var za=y.states,Ua=y.defaultOptions,Fa=y.options,Va=[{name:"prefix",title:"Prefix"},{name:"suffix",title:"Suffix"},{name:"clear-button",title:"`Clear` Button"},{name:"validation-icon",title:"Validation Icon"},{name:"separators",title:"Separators"}],$a=[],re=e=>{let{modifiers:t,valid:o,invalid:a,loading:r,disabled:i,readonly:m,...c}=e,b=t?.prefix,C=t?.suffix,h=t?.["clear-button"],L=t?.["validation-icon"],I=t?.separators;return bt(y,{...c,valid:o,invalid:a,loading:r,disabled:i,readonly:m,style:{width:300},children:[b&&bt(ho,{children:[H(De,{children:H(x,{icon:"lock"})}),I&&H(ae,{})]}),H(ve,{placeholder:"Placeholder",value:"Value"}),L&&H(ge,{valid:o,invalid:a,loading:r,disabled:i}),H(He,{loading:r,disabled:i}),h&&H(Te,{loading:r,disabled:i,readonly:m,value:"Value"}),C&&bt(ho,{children:[I&&H(ae,{}),H(we,{children:H(Oe,{size:c.size,fillMode:"clear",children:"Send"})})]})]})};re.options=Fa;re.states=za;re.variants=$a;re.defaultOptions=Ua;re.modifiers=Va;re.className=y.className;import{Fragment as No,jsx as Ae,jsxs as ht}from"react/jsx-runtime";var Co="k-textarea",qa=[s.hover,s.focus,s.valid,s.invalid,s.required,s.disabled],Ga={size:[l.undefined,l.small,l.medium,l.large],rounded:[u.undefined,u.none,u.small,u.medium,u.large,u.full],fillMode:[f.undefined,f.solid,f.flat,f.outline]},se={flow:"vertical",affixesOrientation:"horizontal",resize:"both",prefixSeparator:!0,suffixSeparator:!0},M=e=>{let{size:t,rounded:o,fillMode:a,prefixSeparator:r=se.prefixSeparator,suffixSeparator:i=se.prefixSeparator,affixesOrientation:m=se.affixesOrientation,flow:c=se.flow,resize:b=se.resize,prefix:C,suffix:h,rows:L,value:I,placeholder:q,hover:le,focus:w,valid:A,invalid:_,required:G,disabled:ke,id:Fe,"aria-label":Ve,"aria-describedby":$e,...qe}=e;return ht(y,{...qe,size:t,rounded:o,fillMode:a,hover:le,focus:w,valid:A,invalid:_,required:G,disabled:ke,className:n(e.className,Co,{"!k-flex-col":c==="vertical","!k-flex-row":c==="horizontal"}),children:[C&&ht(No,{children:[Ae(De,{className:n({"!k-align-items-start":c===m}),direction:m,children:C}),r&&Ae(ae,{direction:c==="horizontal"?"vertical":"horizontal"})]}),Ae(Me,{className:n("!k-overflow-auto",{"!k-flex-none":c==="vertical","k-resize-x":b==="x","k-resize-y":b==="y","k-resize":b==="both","k-resize-none":b==="none"}),value:I,placeholder:q,rows:L,disabled:ke,id:Fe,"aria-label":Ve,"aria-describedby":$e,"aria-invalid":_?"true":void 0}),h&&ht(No,{children:[i&&Ae(ae,{direction:c==="horizontal"?"vertical":"horizontal"}),Ae(we,{className:n({"!k-align-items-start":c===m}),direction:m,children:h})]})]})};M.states=qa;M.options=Ga;M.className=Co;M.defaultOptions=se;M.moduleName=ct;M.folderName=ro;M.ariaSpec={selector:".k-textarea",rules:[{selector:".k-textarea > .k-input-inner",attribute:"role=textbox or nodeName=textarea",usage:"Describes the role of the component."},{selector:".k-textarea > .k-input-inner",attribute:"label for or aria-label or aria-labelledby (when has accessible name)",usage:"The textarea requires an accessible name (provided by consuming app)."},{selector:".k-textarea > .k-input-inner",attribute:"aria-multiline=true (when role=textbox)",usage:"Required on role=textbox to indicate multi-line behavior. Implicit on native <textarea>, so not needed there."},{selector:".k-textarea > .k-input-inner",attribute:"aria-invalid=true (when invalid)",usage:"Rendered only when the TextArea is in a form and announces the invalid state."},{selector:".k-textarea > .k-input-inner",attribute:"aria-describedby (when has hint or error)",usage:"Points to the hint or error message for the textarea."},{selector:".k-textarea.k-disabled > .k-input-inner",attribute:"disabled=disabled or aria-disabled=true",usage:"Rendered only when the TextArea is disabled."}]};import{jsx as Pc}from"react/jsx-runtime";import{Fragment as Dc,jsx as Hc}from"react/jsx-runtime";import{Fragment as $c,jsx as Vc}from"react/jsx-runtime";import{jsx as Xc}from"react/jsx-runtime";import{jsx as ze}from"react/jsx-runtime";var Wa=M.options,Xa=M.states,To={...M.defaultOptions,variant:"vertical"},Ja=[{name:"vertical",title:"Flow vertical"},{name:"horizontal",title:"Flow horizontal"}],Ya=[{name:"prefix",title:"Prefix"},{name:"suffix",title:"Suffix"}],ie=e=>{let{variant:t,modifiers:o,...a}={...To,...e},r={resize:"y"};return Object.keys(o||{}).forEach(i=>{switch(i){case"prefix":r.prefix=o?.[i]?ze(x,{icon:"comment"}):void 0;break;case"suffix":r.suffix=o?.[i]?ze(x,{icon:"volume-up"}):void 0;break;default:break}}),t==="horizontal"?ze(M,{flow:"horizontal",placeholder:"Enter text...",style:{width:300},...a,...r}):ze(M,{flow:"vertical",placeholder:"Enter text...",style:{width:300},...a,...r})};ie.options=Wa;ie.states=Xa;ie.variants=Ja;ie.defaultOptions=To;ie.modifiers=Ya;ie.className=M.className;var Ct="popup",vo=Ct;import{jsx as Mo}from"react/jsx-runtime";var go="k-animation-container",Qa=[],Za={},Tt={positionMode:"absolute",shown:!0},U=e=>{let{positionMode:t=Tt.positionMode,shown:o=Tt.shown,animationStyle:a,offset:r,...i}=e;return Mo("div",{...i,style:{...r,...e.style},className:n(e.className,go,{"k-animation-container-shown":o,"k-animation-container-fixed":t==="fixed"}),children:Mo("div",{className:"k-child-animation-container",style:a,children:e.children})})};U.states=Qa;U.options=Za;U.className=go;U.defaultOptions=Tt;U.moduleName=Ct;U.folderName=vo;var vt="popup",Ao=vt;import{jsx as ko}from"react/jsx-runtime";var So="k-popup",ja=[],er={},yo={positionMode:"absolute"},D=e=>{let{offset:t,positionMode:o=yo.positionMode,animationStyle:a,containerClassName:r,containerRole:i,containerAriaLabel:m,...c}=e;return ko(U,{positionMode:o,offset:t,animationStyle:a,className:r,role:i,"aria-label":m,children:ko("div",{...c,className:n(e.className,So),children:e.children})})};D.states=ja;D.options=er;D.className=So;D.defaultOptions=yo;D.moduleName=vt;D.folderName=Ao;D.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 rr,jsx as B,jsxs as Ue}from"react/jsx-runtime";var tr=E.options,or=E.states,nr={...E.defaultOptions},ar=[{name:"commands",title:"Commands Menu",default:!0},{name:"stt",title:"SpeechToText",default:!0},{name:"response",title:"Response Card"},{name:"generating",title:"Generating"}],$=e=>{let{modifiers:t,...o}={...e},a={commands:!0,stt:!0};Object.keys(t||{}).forEach(i=>{switch(i){case"commands":a.commands=t?.[i]?!0:void 0;break;case"stt":a.stt=t?.[i]?!0:void 0;break;case"response":a.response=t?.[i]?!0:void 0;break;case"generating":a.generating=t?.[i]?!0:void 0;break;default:return}});let r=Ue(N,{children:[B(K,{style:{maxHeight:"150px",overflowY:"auto"},children:"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s,"}),Ue(v,{className:"k-card-actions",alignment:"start",children:[B(F,{fillMode:"flat",themeColor:"primary",icon:"copy",children:"Copy"}),B(F,{fillMode:"flat",themeColor:"primary",icon:"insert-bottom",children:"Insert"}),B(F,{fillMode:"flat",themeColor:"primary",icon:"check",children:"Replace"}),B(F,{fillMode:"flat",themeColor:"base",icon:"cancel",children:"Discard"})]})]});return B(D,{className:"k-prompt-popup",children:B(E,{style:{width:"450px",height:"auto"},...o,children:B(Et,{children:Ue(Ot,{children:[a.response?r:null,B(M,{rows:1,placeholder:"Edit, generate or explain ...",resize:"none",flow:"horizontal",prefixSeparator:a.commands&&a.stt,suffixSeparator:!1,prefix:Ue(rr,{children:[a.commands?B(ue,{fillMode:"flat",icon:"menu"}):null,a.stt?B(S,{fillMode:"flat"}):null]}),suffix:B(J,{generating:!!a.generating})})]})})})})};$.options=tr;$.states=or;$.variants=[];$.defaultOptions=nr;$.modifiers=ar;$.className=E.className;var Bp=$;export{$ as InlineAIPromptDemo,Bp as default};