@progress/kendo-themes-html 14.0.0-dev.5 → 14.0.0-dev.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/chat/chat-message.js +1 -1
- package/dist/cjs/chat/chat.spec.js +1 -1
- package/dist/cjs/chat/demos/chat.js +1 -1
- package/dist/cjs/chat/templates/chat-empty.js +1 -1
- package/dist/cjs/chat/templates/chat-expandable.js +1 -1
- package/dist/cjs/chat/templates/chat-failed.js +1 -1
- package/dist/cjs/chat/templates/chat-message-skeleton.js +1 -1
- package/dist/cjs/chat/templates/chat-message-toolbar.js +1 -1
- package/dist/cjs/chat/templates/chat-normal.js +1 -1
- package/dist/cjs/chat/templates/chat-pinned.js +1 -1
- package/dist/cjs/chat/templates/chat-stop-response.js +1 -1
- package/dist/cjs/chat/templates/chat-textarea-file.js +1 -1
- package/dist/cjs/chat/templates/chat-typing.js +1 -1
- package/dist/cjs/chat/templates/chat-upload.js +1 -1
- package/dist/cjs/editor/demos/editor.js +1 -1
- package/dist/cjs/editor/templates/editor-normal.js +1 -1
- package/dist/cjs/editor/templates/editor-resizable.js +1 -1
- package/dist/cjs/editor/templates/editor-responsive-toolbar.js +1 -1
- package/dist/cjs/imageeditor/templates/imageeditor-crop.js +1 -1
- package/dist/cjs/imageeditor/templates/imageeditor-resize.js +1 -1
- package/dist/cjs/index.js +8 -8
- package/dist/cjs/prompt/demos/prompt.js +1 -1
- package/dist/cjs/prompt/templates/prompt-inline-input-only.js +1 -1
- package/dist/cjs/prompt/templates/prompt-inline.js +1 -1
- package/dist/cjs/prompt/templates/prompt-more-actions.js +1 -1
- package/dist/cjs/prompt/templates/prompt-normal.js +1 -1
- package/dist/cjs/prompt/templates/prompt-output.js +1 -1
- package/dist/cjs/prompt/templates/prompt-popup.js +1 -1
- package/dist/cjs/prompt/templates/prompt-settings.js +1 -1
- package/dist/cjs/prompt/templates/prompt-suggestions.js +1 -1
- package/dist/cjs/prompt-box/prompt-box.spec.js +1 -1
- package/dist/cjs/prompt-box/templates/prompt-box-auto-expanded.js +1 -1
- package/dist/cjs/prompt-box/templates/prompt-box-auto.js +1 -1
- package/dist/cjs/prompt-box/templates/prompt-box-multi.js +1 -1
- package/dist/cjs/prompt-box/templates/prompt-box-single.js +1 -1
- package/dist/cjs/prompt-box/templates/prompt-box-stop-response.js +1 -1
- package/dist/cjs/rating/demos/rating.js +1 -1
- package/dist/cjs/rating/rating-item.js +1 -1
- package/dist/cjs/rating/rating.spec.js +1 -1
- package/dist/cjs/rating/templates/rating-disabled.js +1 -1
- package/dist/cjs/rating/templates/rating-normal.js +1 -1
- package/dist/cjs/rating/templates/rating-readonly.js +1 -1
- package/dist/cjs/rating/templates/rating-with-label.js +1 -1
- package/dist/cjs/smart-box/smart-box-send-button.js +1 -1
- package/dist/cjs/smart-box/templates/smart-box-disabled-send.js +1 -1
- package/dist/cjs/smart-box/templates/smart-box-normal.js +1 -1
- package/dist/cjs/smart-box/templates/smart-box-opened-focused.js +1 -1
- package/dist/cjs/smart-box/templates/smart-box-processing.js +1 -1
- package/dist/cjs/speech-to-text-button/demos/speech-to-text-button.js +1 -1
- package/dist/cjs/speech-to-text-button/speech-to-text-button.spec.js +1 -1
- package/dist/cjs/speech-to-text-button/templates/speech-to-text-button-listening.js +1 -1
- package/dist/cjs/speech-to-text-button/templates/speech-to-text-button-normal.js +1 -1
- package/dist/cjs/spreadsheet/demos/spreadsheet.js +1 -1
- package/dist/cjs/spreadsheet/spreadsheet-header.js +1 -1
- package/dist/cjs/spreadsheet/spreadsheet-view.js +1 -1
- package/dist/cjs/spreadsheet/templates/spreadsheet-formula-open.js +1 -1
- package/dist/cjs/spreadsheet/templates/spreadsheet-normal.js +1 -1
- package/dist/esm/chat/chat-message.mjs +1 -1
- package/dist/esm/chat/chat.spec.mjs +1 -1
- package/dist/esm/chat/demos/chat.mjs +1 -1
- package/dist/esm/chat/templates/chat-empty.mjs +1 -1
- package/dist/esm/chat/templates/chat-expandable.mjs +1 -1
- package/dist/esm/chat/templates/chat-failed.mjs +1 -1
- package/dist/esm/chat/templates/chat-message-skeleton.mjs +1 -1
- package/dist/esm/chat/templates/chat-message-toolbar.mjs +1 -1
- package/dist/esm/chat/templates/chat-normal.mjs +1 -1
- package/dist/esm/chat/templates/chat-pinned.mjs +1 -1
- package/dist/esm/chat/templates/chat-stop-response.mjs +1 -1
- package/dist/esm/chat/templates/chat-textarea-file.mjs +1 -1
- package/dist/esm/chat/templates/chat-typing.mjs +1 -1
- package/dist/esm/chat/templates/chat-upload.mjs +1 -1
- package/dist/esm/editor/demos/editor.mjs +1 -1
- package/dist/esm/editor/templates/editor-normal.mjs +1 -1
- package/dist/esm/editor/templates/editor-resizable.mjs +1 -1
- package/dist/esm/editor/templates/editor-responsive-toolbar.mjs +1 -1
- package/dist/esm/imageeditor/templates/imageeditor-crop.mjs +1 -1
- package/dist/esm/imageeditor/templates/imageeditor-resize.mjs +1 -1
- package/dist/esm/index.mjs +8 -8
- package/dist/esm/prompt/demos/prompt.mjs +1 -1
- package/dist/esm/prompt/templates/prompt-inline-input-only.mjs +1 -1
- package/dist/esm/prompt/templates/prompt-inline.mjs +1 -1
- package/dist/esm/prompt/templates/prompt-more-actions.mjs +1 -1
- package/dist/esm/prompt/templates/prompt-normal.mjs +1 -1
- package/dist/esm/prompt/templates/prompt-output.mjs +1 -1
- package/dist/esm/prompt/templates/prompt-popup.mjs +1 -1
- package/dist/esm/prompt/templates/prompt-settings.mjs +1 -1
- package/dist/esm/prompt/templates/prompt-suggestions.mjs +1 -1
- package/dist/esm/prompt-box/prompt-box.spec.mjs +1 -1
- package/dist/esm/prompt-box/templates/prompt-box-auto-expanded.mjs +1 -1
- package/dist/esm/prompt-box/templates/prompt-box-auto.mjs +1 -1
- package/dist/esm/prompt-box/templates/prompt-box-multi.mjs +1 -1
- package/dist/esm/prompt-box/templates/prompt-box-single.mjs +1 -1
- package/dist/esm/prompt-box/templates/prompt-box-stop-response.mjs +1 -1
- package/dist/esm/rating/demos/rating.mjs +1 -1
- package/dist/esm/rating/rating-item.mjs +1 -1
- package/dist/esm/rating/rating.spec.mjs +1 -1
- package/dist/esm/rating/templates/rating-disabled.mjs +1 -1
- package/dist/esm/rating/templates/rating-normal.mjs +1 -1
- package/dist/esm/rating/templates/rating-readonly.mjs +1 -1
- package/dist/esm/rating/templates/rating-with-label.mjs +1 -1
- package/dist/esm/smart-box/smart-box-send-button.mjs +1 -1
- package/dist/esm/smart-box/templates/smart-box-disabled-send.mjs +1 -1
- package/dist/esm/smart-box/templates/smart-box-normal.mjs +1 -1
- package/dist/esm/smart-box/templates/smart-box-opened-focused.mjs +1 -1
- package/dist/esm/smart-box/templates/smart-box-processing.mjs +1 -1
- package/dist/esm/speech-to-text-button/demos/speech-to-text-button.mjs +1 -1
- package/dist/esm/speech-to-text-button/speech-to-text-button.spec.mjs +1 -1
- package/dist/esm/speech-to-text-button/templates/speech-to-text-button-listening.mjs +1 -1
- package/dist/esm/speech-to-text-button/templates/speech-to-text-button-normal.mjs +1 -1
- package/dist/esm/spreadsheet/demos/spreadsheet.mjs +1 -1
- package/dist/esm/spreadsheet/spreadsheet-header.mjs +1 -1
- package/dist/esm/spreadsheet/spreadsheet-view.mjs +1 -1
- package/dist/esm/spreadsheet/templates/spreadsheet-formula-open.mjs +1 -1
- package/dist/esm/spreadsheet/templates/spreadsheet-normal.mjs +1 -1
- package/package.json +3 -3
- package/src/_preview/tests/preview-components.tsx +2 -2
- package/src/chat/chat-message.tsx +3 -3
- package/src/chat/chat.spec.tsx +2 -2
- package/src/chat/tests/chat-files-layout.tsx +8 -8
- package/src/chat/tests/chat-files-pin.tsx +2 -2
- package/src/chat/tests/chat-files.tsx +6 -6
- package/src/chat/tests/chat-message-toolbar.tsx +2 -2
- package/src/drawer/tests/drawer-item-states.tsx +3 -3
- package/src/editor/demos/editor.tsx +1 -1
- package/src/editor/templates/editor-normal.tsx +1 -1
- package/src/editor/templates/editor-resizable.tsx +1 -1
- package/src/editor/templates/editor-responsive-toolbar.tsx +1 -1
- package/src/editor/tests/editor-table-wizard.tsx +1 -1
- package/src/editor/tests/editor.tsx +2 -2
- package/src/grid/tests/grid-assistant-window.tsx +4 -4
- package/src/grid/tests/grid-row-pinning-adaptive.tsx +1 -1
- package/src/grid/tests/grid-semantic-search-popup.tsx +10 -10
- package/src/grid/tests/grid-toolbar.tsx +2 -2
- package/src/imageeditor/templates/imageeditor-crop.tsx +1 -1
- package/src/imageeditor/templates/imageeditor-resize.tsx +1 -1
- package/src/prompt/demos/prompt.tsx +4 -4
- package/src/prompt/templates/prompt-inline.tsx +1 -1
- package/src/prompt/templates/prompt-output.tsx +4 -4
- package/src/prompt/tests/prompt-inline-response-generation.tsx +2 -2
- package/src/prompt-box/prompt-box.spec.tsx +1 -1
- package/src/prompt-box/tests/prompt-box-affixes.tsx +8 -8
- package/src/prompt-box/tests/prompt-box-files.tsx +2 -2
- package/src/rating/rating-item.tsx +20 -5
- package/src/smart-box/smart-box-send-button.tsx +1 -1
- package/src/smart-box/templates/smart-box-disabled-send.tsx +1 -1
- package/src/smart-box/templates/smart-box-normal.tsx +1 -1
- package/src/smart-box/templates/smart-box-opened-focused.tsx +1 -1
- package/src/smart-box/templates/smart-box-processing.tsx +1 -1
- package/src/speech-to-text-button/speech-to-text-button.spec.tsx +2 -2
- package/src/spreadsheet/spreadsheet-header.tsx +1 -1
- package/src/spreadsheet/tests/spreadsheet-tools.tsx +1 -1
- package/src/toolbar/tests/toolbar-fill-modes.tsx +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
var p=(...t)=>t.filter(e=>e!==!0&&!!e).map(e=>Array.isArray(e)?p(...e):typeof e=="object"?Object.keys(e).map((n,r)=>e[r]||e[n]&&n||null).filter(n=>n!==null).join(" "):e).filter(e=>!!e).join(" ");var b=(t,e)=>p({[`${t}-xs`]:e.size==="xsmall",[`${t}-sm`]:e.size==="small",[`${t}-md`]:e.size==="medium",[`${t}-lg`]:e.size==="large",[`${t}-xl`]:e.size==="xlarge",[`${t}-xxl`]:e.size==="xxlarge",[`${t}-xxxl`]:e.size==="xxxlarge"},{[`${t}-${e.fillMode}`]:e.fillMode},{[`${t}-${e.themeColor}`]:e.themeColor},{"k-rounded-sm":e.rounded==="small","k-rounded-md":e.rounded==="medium","k-rounded-lg":e.rounded==="large","k-rounded-full":e.rounded==="full","k-rounded-none":e.rounded==="none"}),ae=(t,e)=>{let{valid:n,invalid:r,hover:i,focus:u,checked:l,active:d,selected:g,disabled:x,indeterminate:O,loading:m,empty:M,readonly:E,highlighted:A,...y}=e;return p({"k-valid":n,"k-invalid":r,"k-hover":i,"k-focus":u,"k-checked":l,"k-active":d,"k-selected":g,"k-disabled":x,"k-indeterminate":O&&!l,"k-loading":m,"k-empty":M,"k-readonly":E,"k-highlighted":A},Object.keys(y).reduce((k,T)=>(T.startsWith("k-")?k[T]=y[T]:k[`k-${T}`]=y[T],k),{}))};function re(t,e){if(!e)return{};let n=Array.isArray(e)?e:[e];return Object.fromEntries(n.map(r=>[`k-${r}`,!0]))}var a={undefined:void 0,xsmall:"xsmall",small:"small",medium:"medium",large:"large",xlarge:"xlarge",xxlarge:"xxlarge",xxxlarge:"xxxlarge"},S={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"},o={undefined:void 0,inherit:"inherit",base:"base",primary:"primary",secondary:"secondary",tertiary:"tertiary",info:"info",success:"success",warning:"warning",error:"error",inverse:"inverse"},h={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"};import{jsx as Ie}from"react/jsx-runtime";var X="k-input-inner",Ee=[],Ce={},$={type:"text",autocomplete:"off",value:"",placeholder:""},P=t=>{let{value:e=$.value,type:n=$.type,placeholder:r=$.placeholder,autocomplete:i=$.autocomplete,disabled:u,readOnly:l,...d}=t;return Ie("input",{...d,type:n,className:p(t.className,X,b(X,t)),placeholder:r,autoComplete:i,defaultValue:e,disabled:u||void 0,readOnly:l||void 0})};P.states=Ee;P.options=Ce;P.className=X;import{jsx as Pe}from"react/jsx-runtime";var V="k-input-inner",_e=[],Ae={},se={value:"",placeholder:""},L=t=>{let{value:e=se.value,placeholder:n=se.placeholder,rows:r,disabled:i,...u}=t;return Pe("textarea",{...u,className:p(t.className,V,b(V,t)),placeholder:n,rows:r,defaultValue:e,disabled:i||void 0})};L.states=_e;L.options=Ae;L.className=V;var G="prompt-box",ie=G;import{Fragment as Re,jsx as le}from"react/jsx-runtime";var J="k-font-icon",Le=[],we={size:[a.undefined,a.xsmall,a.small,a.medium,a.large,a.xlarge,a.xxlarge,a.xxxlarge],themeColor:[o.undefined,o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info]},Ke={},w=t=>{let{size:e,themeColor:n,icon:r,rotate:i,flip:u,...l}=t;return r?le("span",{...l,className:p(t.className,J,b(J,{size:e}),{[`k-i-${r}`]:r,[`k-color-${n}`]:n,[`k-rotate-${i}`]:i,"k-flip-h":u==="h"||u==="both","k-flip-v":u==="v"||u==="both"}),"aria-hidden":"true"}):le(Re,{})};w.states=Le;w.options=we;w.className=J;w.defaultOptions=Ke;var pe=w;import{Fragment as $e,jsx as D}from"react/jsx-runtime";var q="k-svg-icon",ze=[],He={size:[a.undefined,a.xsmall,a.small,a.medium,a.large,a.xlarge,a.xxlarge,a.xxxlarge],themeColor:[o.undefined,o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info]},ue={viewBox:"0 0 24 24"},K=t=>{let{size:e,themeColor:n,rotate:r,flip:i,viewBox:u=ue.viewBox,icon:l,...d}=t;if(!l)return D($e,{});if(l==="none")return D("span",{...d,className:p(t.className,q,b("k-icon",{size:e}),"k-none"),"aria-hidden":"true"});let g=typeof l=="object"&&l.name&&l.name;return D("span",{...d,className:p(t.className,q,b("k-icon",{size:e}),{[`k-svg-i-${g}`]:g,[`k-color-${n}`]:n,[`k-rotate-${r}`]:r,"k-flip-h":i==="h"||i==="both","k-flip-v":i==="v"||i==="both"}),"aria-hidden":"true",children:D("svg",{"aria-hidden":!0,focusable:!1,xmlns:"http://www.w3.org/2000/svg",viewBox:typeof l=="object"?l.viewBox:u,dangerouslySetInnerHTML:typeof l=="object"?{__html:l.content}:void 0,children:l?void 0:t.children})})};K.states=ze;K.options=He;K.className=q;K.defaultOptions=ue;var W=K;import*as Q from"@progress/kendo-svg-icons";var ce="icon",de="icons";import{useContext as Ue}from"react";import{createContext as De}from"react";var me=De({iconsType:"svg"});import{Fragment as fe,jsx as R}from"react/jsx-runtime";var U="k-icon",Fe=t=>t.replace(/([-_][a-z0-9])/gi,e=>e.toUpperCase().replace("-","").replace("_","")),Xe=[],Ve={size:[a.undefined,a.xsmall,a.small,a.medium,a.large,a.xlarge,a.xxlarge,a.xxxlarge],themeColor:[o.undefined,o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info]},Y={viewBox:"0 0 24 24",type:"svg"},N=t=>{let{iconsType:e}=Ue(me),{size:n,themeColor:r,icon:i,type:u=e||Y.type,rotate:l,flip:d,viewBox:g=Y.viewBox,...x}=t;if(!i)return R(fe,{});if((e||u)==="svg"){if(i==="none")return R(W,{...x,className:p(t.className,U),icon:i,size:n});let m=Q[i]?i:Fe(`${i}-icon`);return Q[m]?R(W,{...x,className:p(t.className,U),icon:Q[m],size:n,themeColor:r,rotate:l,flip:d,viewBox:g}):R(fe,{})}return R(pe,{...x,className:p(t.className,U),icon:i,size:n,themeColor:r,rotate:l,flip:d})};N.states=Xe;N.options=Ve;N.defaultOptions=Y;N.className=U;N.moduleName=ce;N.folderName=de;N.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 Z="button",xe=Z;import{Fragment as We,jsx as z,jsxs as be}from"react/jsx-runtime";var H="k-button",Ge=["icon-button"],Je=[h.hover,h.focus,h.active,h.selected,h.disabled,h.generating],qe={size:[a.undefined,a.xsmall,a.small,a.medium,a.large],rounded:[S.undefined,S.none,S.small,S.medium,S.large,S.full],fillMode:[f.undefined,f.solid,f.flat,f.outline,f.clear,f.link],themeColor:[o.undefined,o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info,o.inverse]},j={showArrow:!1,arrowIconName:"chevron-down"},s=t=>{let{as:e="button",size:n,rounded:r,fillMode:i,themeColor:u,showArrow:l=j.showArrow,arrowIconName:d=j.arrowIconName,variant:g,hover:x,focus:O,active:m,selected:M,disabled:E,togglable:A,ariaDisabled:y,icon:k,text:T,iconClassName:ye,className:Be,...Oe}=t,Se=k!==void 0,Me=t.children!==void 0;return be(e,{className:p(Be,H,re(H,g),b(H,{size:n,rounded:r,fillMode:i,themeColor:u}),ae(H,{hover:x,focus:O,active:m,disabled:E||y,selected:M}),{"k-icon-button":!T&&!Me&&Se}),...Oe,"aria-pressed":A?M?"true":"false":void 0,"aria-disabled":y?"true":void 0,disabled:E||void 0,children:[k&&z(N,{className:p(ye,"k-button-icon"),icon:k}),T?be(We,{children:[T&&z("span",{className:"k-button-text",children:T}),t.children]}):t.children&&z("span",{className:"k-button-text",children:t.children}),l&&z("span",{className:"k-menu-button-arrow k-button-arrow",children:z(N,{icon:d})})]})};s.states=Je;s.options=qe;s.variants=Ge;s.className=H;s.defaultOptions=j;s.moduleName=Z;s.folderName=xe;s.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 Qe}from"react/jsx-runtime";var F=t=>Qe(s,{icon:"folder",...t,"aria-label":t["aria-label"]||"Folder",children:void 0});import{jsx as Ye}from"react/jsx-runtime";var he=t=>Ye(s,{icon:"folder",children:"Button",...t});import{jsx as Ze}from"react/jsx-runtime";var ge=t=>Ze(s,{children:"Button",...t});import{jsx as ee}from"react/jsx-runtime";var je=s.options,et=s.states,tt={...s.defaultOptions,variant:"text"},ot=[{name:"icon-only",title:"Icon Only"},{name:"icon-and-text",title:"Icon & Text"},{name:"text",title:"Text"}],nt=[],C=t=>{let{variant:e,...n}=t;switch(e){case"icon-only":return ee(F,{...n,icon:"star"});case"icon-and-text":return ee(he,{...n,icon:"star",children:"Button"});default:return ee(ge,{...n,children:"Button"})}};C.options=je;C.states=et;C.variants=ot;C.defaultOptions=tt;C.modifiers=nt;C.className=s.className;var te="speech-to-text-button",Te=te;import{jsx as at}from"react/jsx-runtime";var Ne="k-speech-to-text-button",ve={icon:"microphone-outline"},c=t=>{let{listening:e=!1,icon:n=ve.icon,...r}=t;return at(s,{...r,icon:e?"stop-sm":n,className:p(t.className,Ne,{"k-listening":e}),"aria-pressed":e?"true":"false","aria-label":e?"Stop listening":"Start listening"})};c.states=s.states;c.options=s.options;c.className=Ne;c.defaultOptions=ve;c.moduleName=te;c.folderName=Te;c.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 Ko}from"react/jsx-runtime";import{jsx as $o}from"react/jsx-runtime";import{jsx as pt}from"react/jsx-runtime";var rt=s.states,ke={...s.defaultOptions,variant:"normal"},st={...s.options,fillMode:s.options.fillMode.filter(t=>t!=="clear"&&t!=="link")},it=[],lt=[{name:"normal",title:"Normal"},{name:"listening",title:"Listening"}],I=t=>{let{variant:e,...n}={...ke,...t},r={};return e==="listening"&&(r.listening=!0),pt(c,{...n,...r})};I.options=st;I.states=rt;I.variants=lt;I.defaultOptions=ke;I.modifiers=it;I.className=c.className;import{jsx as _,jsxs as oe}from"react/jsx-runtime";var v="k-prompt-box",ut=[h.hover,h.focus,h.disabled],ct={fillMode:[f.undefined,f.solid,f.flat,f.outline]},ne={lineMode:"auto",isExpanded:!1},B=t=>{let{fillMode:e,lineMode:n=ne.lineMode,startAffix:r,endAffix:i,header:u,isExpanded:l=ne.isExpanded,className:d,children:g,value:x,placeholder:O,generating:m,hover:M,focus:E,disabled:A,...y}=t,k=n==="multi"||n==="auto"&&l;return oe("div",{...y,className:p(d,"k-input",v,{[`${v}-singleline`]:n==="single",[`${v}-multiline`]:k,[`k-input-${e}`]:e,"k-hover":M,"k-focus":E,"k-disabled":A}),children:[u&&_("div",{className:`${v}-header`,children:u}),oe("div",{className:`${v}-content`,children:[r&&_("div",{className:`${v}-affix`,children:r}),n==="single"?_(P,{value:x,placeholder:O,className:`${v}-input`,type:"text","aria-label":"Prompt input"}):_(L,{value:x,placeholder:O,className:`${v}-textarea`,rows:n==="multi"||l?3:1,"aria-label":"Prompt input","aria-multiline":"true"}),oe("div",{className:`${v}-affix`,children:[i,_(c,{size:"small",fillMode:"flat",rounded:"full"}),_(F,{icon:m?"stop-sm":"arrow-up-outline",size:"small",rounded:"full",active:m,disabled:!x&&!m,className:p({"k-generating":m}),"aria-label":m?"Stop generating":"Send prompt","aria-live":"polite"})]})]}),g]})};B.states=ut;B.options=ct;B.className=v;B.defaultOptions=ne;B.moduleName=G;B.folderName=ie;B.ariaSpec={selector:".k-prompt-box",rules:[{selector:".k-prompt-box-singleline .k-prompt-box-input",attribute:"nodeName=input",usage:"Ensures the input field has the proper textbox role."},{selector:".k-prompt-box-singleline .k-prompt-box-input",attribute:"aria-label",usage:"Provides an accessible label for the single-line input."},{selector:".k-prompt-box-multiline .k-prompt-box-textarea",attribute:"nodeName=textarea",usage:"Ensures the textarea has the proper textbox role."},{selector:".k-prompt-box-multiline .k-prompt-box-textarea",attribute:"aria-label",usage:"Provides an accessible label for the textarea."},{selector:".k-prompt-box-multiline .k-prompt-box-textarea",attribute:"aria-multiline=true",usage:"Indicates the textarea supports multiple lines of text."},{selector:".k-prompt-box:not(.k-prompt-box-singleline):not(.k-prompt-box-multiline) .k-prompt-box-textarea",attribute:"nodeName=textarea",usage:"Ensures the auto-mode textarea has the proper textbox role."},{selector:".k-prompt-box:not(.k-prompt-box-singleline):not(.k-prompt-box-multiline) .k-prompt-box-textarea",attribute:"aria-label",usage:"Provides an accessible label for the auto-mode textarea."},{selector:".k-prompt-box:not(.k-prompt-box-singleline):not(.k-prompt-box-multiline) .k-prompt-box-textarea",attribute:"aria-multiline=true",usage:"Indicates the auto-mode textarea supports multiple lines of text."},{selector:".k-prompt-box-affix .k-button:not(.k-speech-to-text-button)",attribute:"aria-label",usage:"The send/stop button is labelled to indicate its current action."},{selector:".k-prompt-box-affix .k-button:not(.k-speech-to-text-button)",attribute:"aria-live=polite",usage:"Announces the change in status of the send/stop button."}]};var an=B;export{v as PROMPT_BOX_CLASSNAME,B as PromptBox,an as default};
|
|
1
|
+
var p=(...t)=>t.filter(e=>e!==!0&&!!e).map(e=>Array.isArray(e)?p(...e):typeof e=="object"?Object.keys(e).map((n,r)=>e[r]||e[n]&&n||null).filter(n=>n!==null).join(" "):e).filter(e=>!!e).join(" ");var b=(t,e)=>p({[`${t}-xs`]:e.size==="xsmall",[`${t}-sm`]:e.size==="small",[`${t}-md`]:e.size==="medium",[`${t}-lg`]:e.size==="large",[`${t}-xl`]:e.size==="xlarge",[`${t}-xxl`]:e.size==="xxlarge",[`${t}-xxxl`]:e.size==="xxxlarge"},{[`${t}-${e.fillMode}`]:e.fillMode},{[`${t}-${e.themeColor}`]:e.themeColor},{"k-rounded-sm":e.rounded==="small","k-rounded-md":e.rounded==="medium","k-rounded-lg":e.rounded==="large","k-rounded-full":e.rounded==="full","k-rounded-none":e.rounded==="none"}),ae=(t,e)=>{let{valid:n,invalid:r,hover:i,focus:u,checked:l,active:d,selected:g,disabled:x,indeterminate:O,loading:m,empty:M,readonly:E,highlighted:A,...y}=e;return p({"k-valid":n,"k-invalid":r,"k-hover":i,"k-focus":u,"k-checked":l,"k-active":d,"k-selected":g,"k-disabled":x,"k-indeterminate":O&&!l,"k-loading":m,"k-empty":M,"k-readonly":E,"k-highlighted":A},Object.keys(y).reduce((k,T)=>(T.startsWith("k-")?k[T]=y[T]:k[`k-${T}`]=y[T],k),{}))};function re(t,e){if(!e)return{};let n=Array.isArray(e)?e:[e];return Object.fromEntries(n.map(r=>[`k-${r}`,!0]))}var a={undefined:void 0,xsmall:"xsmall",small:"small",medium:"medium",large:"large",xlarge:"xlarge",xxlarge:"xxlarge",xxxlarge:"xxxlarge"},S={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"},o={undefined:void 0,inherit:"inherit",base:"base",primary:"primary",secondary:"secondary",tertiary:"tertiary",info:"info",success:"success",warning:"warning",error:"error",inverse:"inverse"},h={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"};import{jsx as Ie}from"react/jsx-runtime";var X="k-input-inner",Ee=[],Ce={},$={type:"text",autocomplete:"off",value:"",placeholder:""},P=t=>{let{value:e=$.value,type:n=$.type,placeholder:r=$.placeholder,autocomplete:i=$.autocomplete,disabled:u,readOnly:l,...d}=t;return Ie("input",{...d,type:n,className:p(t.className,X,b(X,t)),placeholder:r,autoComplete:i,defaultValue:e,disabled:u||void 0,readOnly:l||void 0})};P.states=Ee;P.options=Ce;P.className=X;import{jsx as Pe}from"react/jsx-runtime";var V="k-input-inner",_e=[],Ae={},se={value:"",placeholder:""},L=t=>{let{value:e=se.value,placeholder:n=se.placeholder,rows:r,disabled:i,...u}=t;return Pe("textarea",{...u,className:p(t.className,V,b(V,t)),placeholder:n,rows:r,defaultValue:e,disabled:i||void 0})};L.states=_e;L.options=Ae;L.className=V;var G="prompt-box",ie=G;import{Fragment as Re,jsx as le}from"react/jsx-runtime";var J="k-font-icon",Le=[],we={size:[a.undefined,a.xsmall,a.small,a.medium,a.large,a.xlarge,a.xxlarge,a.xxxlarge],themeColor:[o.undefined,o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info]},Ke={},w=t=>{let{size:e,themeColor:n,icon:r,rotate:i,flip:u,...l}=t;return r?le("span",{...l,className:p(t.className,J,b(J,{size:e}),{[`k-i-${r}`]:r,[`k-color-${n}`]:n,[`k-rotate-${i}`]:i,"k-flip-h":u==="h"||u==="both","k-flip-v":u==="v"||u==="both"}),"aria-hidden":"true"}):le(Re,{})};w.states=Le;w.options=we;w.className=J;w.defaultOptions=Ke;var pe=w;import{Fragment as $e,jsx as D}from"react/jsx-runtime";var q="k-svg-icon",ze=[],He={size:[a.undefined,a.xsmall,a.small,a.medium,a.large,a.xlarge,a.xxlarge,a.xxxlarge],themeColor:[o.undefined,o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info]},ue={viewBox:"0 0 24 24"},K=t=>{let{size:e,themeColor:n,rotate:r,flip:i,viewBox:u=ue.viewBox,icon:l,...d}=t;if(!l)return D($e,{});if(l==="none")return D("span",{...d,className:p(t.className,q,b("k-icon",{size:e}),"k-none"),"aria-hidden":"true"});let g=typeof l=="object"&&l.name&&l.name;return D("span",{...d,className:p(t.className,q,b("k-icon",{size:e}),{[`k-svg-i-${g}`]:g,[`k-color-${n}`]:n,[`k-rotate-${r}`]:r,"k-flip-h":i==="h"||i==="both","k-flip-v":i==="v"||i==="both"}),"aria-hidden":"true",children:D("svg",{"aria-hidden":!0,focusable:!1,xmlns:"http://www.w3.org/2000/svg",viewBox:typeof l=="object"?l.viewBox:u,dangerouslySetInnerHTML:typeof l=="object"?{__html:l.content}:void 0,children:l?void 0:t.children})})};K.states=ze;K.options=He;K.className=q;K.defaultOptions=ue;var W=K;import*as Q from"@progress/kendo-svg-icons";var ce="icon",de="icons";import{useContext as Ue}from"react";import{createContext as De}from"react";var me=De({iconsType:"svg"});import{Fragment as fe,jsx as R}from"react/jsx-runtime";var U="k-icon",Fe=t=>t.replace(/([-_][a-z0-9])/gi,e=>e.toUpperCase().replace("-","").replace("_","")),Xe=[],Ve={size:[a.undefined,a.xsmall,a.small,a.medium,a.large,a.xlarge,a.xxlarge,a.xxxlarge],themeColor:[o.undefined,o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info]},Y={viewBox:"0 0 24 24",type:"svg"},N=t=>{let{iconsType:e}=Ue(me),{size:n,themeColor:r,icon:i,type:u=e||Y.type,rotate:l,flip:d,viewBox:g=Y.viewBox,...x}=t;if(!i)return R(fe,{});if((e||u)==="svg"){if(i==="none")return R(W,{...x,className:p(t.className,U),icon:i,size:n});let m=Q[i]?i:Fe(`${i}-icon`);return Q[m]?R(W,{...x,className:p(t.className,U),icon:Q[m],size:n,themeColor:r,rotate:l,flip:d,viewBox:g}):R(fe,{})}return R(pe,{...x,className:p(t.className,U),icon:i,size:n,themeColor:r,rotate:l,flip:d})};N.states=Xe;N.options=Ve;N.defaultOptions=Y;N.className=U;N.moduleName=ce;N.folderName=de;N.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 Z="button",xe=Z;import{Fragment as We,jsx as z,jsxs as be}from"react/jsx-runtime";var H="k-button",Ge=["icon-button"],Je=[h.hover,h.focus,h.active,h.selected,h.disabled,h.generating],qe={size:[a.undefined,a.xsmall,a.small,a.medium,a.large],rounded:[S.undefined,S.none,S.small,S.medium,S.large,S.full],fillMode:[f.undefined,f.solid,f.flat,f.outline,f.clear,f.link],themeColor:[o.undefined,o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info,o.inverse]},j={showArrow:!1,arrowIconName:"chevron-down"},s=t=>{let{as:e="button",size:n,rounded:r,fillMode:i,themeColor:u,showArrow:l=j.showArrow,arrowIconName:d=j.arrowIconName,variant:g,hover:x,focus:O,active:m,selected:M,disabled:E,togglable:A,ariaDisabled:y,icon:k,text:T,iconClassName:ye,className:Be,...Oe}=t,Se=k!==void 0,Me=t.children!==void 0;return be(e,{className:p(Be,H,re(H,g),b(H,{size:n,rounded:r,fillMode:i,themeColor:u}),ae(H,{hover:x,focus:O,active:m,disabled:E||y,selected:M}),{"k-icon-button":!T&&!Me&&Se}),...Oe,"aria-pressed":A?M?"true":"false":void 0,"aria-disabled":y?"true":void 0,disabled:E||void 0,children:[k&&z(N,{className:p(ye,"k-button-icon"),icon:k}),T?be(We,{children:[T&&z("span",{className:"k-button-text",children:T}),t.children]}):t.children&&z("span",{className:"k-button-text",children:t.children}),l&&z("span",{className:"k-menu-button-arrow k-button-arrow",children:z(N,{icon:d})})]})};s.states=Je;s.options=qe;s.variants=Ge;s.className=H;s.defaultOptions=j;s.moduleName=Z;s.folderName=xe;s.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 Qe}from"react/jsx-runtime";var F=t=>Qe(s,{icon:"folder",...t,"aria-label":t["aria-label"]||"Folder",children:void 0});import{jsx as Ye}from"react/jsx-runtime";var he=t=>Ye(s,{icon:"folder",children:"Button",...t});import{jsx as Ze}from"react/jsx-runtime";var ge=t=>Ze(s,{children:"Button",...t});import{jsx as ee}from"react/jsx-runtime";var je=s.options,et=s.states,tt={...s.defaultOptions,variant:"text"},ot=[{name:"icon-only",title:"Icon Only"},{name:"icon-and-text",title:"Icon & Text"},{name:"text",title:"Text"}],nt=[],C=t=>{let{variant:e,...n}=t;switch(e){case"icon-only":return ee(F,{...n,icon:"star"});case"icon-and-text":return ee(he,{...n,icon:"star",children:"Button"});default:return ee(ge,{...n,children:"Button"})}};C.options=je;C.states=et;C.variants=ot;C.defaultOptions=tt;C.modifiers=nt;C.className=s.className;var te="speech-to-text-button",Te=te;import{jsx as at}from"react/jsx-runtime";var Ne="k-speech-to-text-button",ve={icon:"microphone"},c=t=>{let{listening:e=!1,icon:n=ve.icon,...r}=t;return at(s,{...r,icon:e?"stop":n,className:p(t.className,Ne,{"k-listening":e}),"aria-pressed":e?"true":"false","aria-label":e?"Stop listening":"Start listening"})};c.states=s.states;c.options=s.options;c.className=Ne;c.defaultOptions=ve;c.moduleName=te;c.folderName=Te;c.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 Ko}from"react/jsx-runtime";import{jsx as $o}from"react/jsx-runtime";import{jsx as pt}from"react/jsx-runtime";var rt=s.states,ke={...s.defaultOptions,variant:"normal"},st={...s.options,fillMode:s.options.fillMode.filter(t=>t!=="clear"&&t!=="link")},it=[],lt=[{name:"normal",title:"Normal"},{name:"listening",title:"Listening"}],I=t=>{let{variant:e,...n}={...ke,...t},r={};return e==="listening"&&(r.listening=!0),pt(c,{...n,...r})};I.options=st;I.states=rt;I.variants=lt;I.defaultOptions=ke;I.modifiers=it;I.className=c.className;import{jsx as _,jsxs as oe}from"react/jsx-runtime";var v="k-prompt-box",ut=[h.hover,h.focus,h.disabled],ct={fillMode:[f.undefined,f.solid,f.flat,f.outline]},ne={lineMode:"auto",isExpanded:!1},B=t=>{let{fillMode:e,lineMode:n=ne.lineMode,startAffix:r,endAffix:i,header:u,isExpanded:l=ne.isExpanded,className:d,children:g,value:x,placeholder:O,generating:m,hover:M,focus:E,disabled:A,...y}=t,k=n==="multi"||n==="auto"&&l;return oe("div",{...y,className:p(d,"k-input",v,{[`${v}-singleline`]:n==="single",[`${v}-multiline`]:k,[`k-input-${e}`]:e,"k-hover":M,"k-focus":E,"k-disabled":A}),children:[u&&_("div",{className:`${v}-header`,children:u}),oe("div",{className:`${v}-content`,children:[r&&_("div",{className:`${v}-affix`,children:r}),n==="single"?_(P,{value:x,placeholder:O,className:`${v}-input`,type:"text","aria-label":"Prompt input"}):_(L,{value:x,placeholder:O,className:`${v}-textarea`,rows:n==="multi"||l?3:1,"aria-label":"Prompt input","aria-multiline":"true"}),oe("div",{className:`${v}-affix`,children:[i,_(c,{size:"small",fillMode:"flat",rounded:"full"}),_(F,{icon:m?"stop":"arrow-up",size:"small",rounded:"full",active:m,disabled:!x&&!m,className:p({"k-generating":m}),"aria-label":m?"Stop generating":"Send prompt","aria-live":"polite"})]})]}),g]})};B.states=ut;B.options=ct;B.className=v;B.defaultOptions=ne;B.moduleName=G;B.folderName=ie;B.ariaSpec={selector:".k-prompt-box",rules:[{selector:".k-prompt-box-singleline .k-prompt-box-input",attribute:"nodeName=input",usage:"Ensures the input field has the proper textbox role."},{selector:".k-prompt-box-singleline .k-prompt-box-input",attribute:"aria-label",usage:"Provides an accessible label for the single-line input."},{selector:".k-prompt-box-multiline .k-prompt-box-textarea",attribute:"nodeName=textarea",usage:"Ensures the textarea has the proper textbox role."},{selector:".k-prompt-box-multiline .k-prompt-box-textarea",attribute:"aria-label",usage:"Provides an accessible label for the textarea."},{selector:".k-prompt-box-multiline .k-prompt-box-textarea",attribute:"aria-multiline=true",usage:"Indicates the textarea supports multiple lines of text."},{selector:".k-prompt-box:not(.k-prompt-box-singleline):not(.k-prompt-box-multiline) .k-prompt-box-textarea",attribute:"nodeName=textarea",usage:"Ensures the auto-mode textarea has the proper textbox role."},{selector:".k-prompt-box:not(.k-prompt-box-singleline):not(.k-prompt-box-multiline) .k-prompt-box-textarea",attribute:"aria-label",usage:"Provides an accessible label for the auto-mode textarea."},{selector:".k-prompt-box:not(.k-prompt-box-singleline):not(.k-prompt-box-multiline) .k-prompt-box-textarea",attribute:"aria-multiline=true",usage:"Indicates the auto-mode textarea supports multiple lines of text."},{selector:".k-prompt-box-affix .k-button:not(.k-speech-to-text-button)",attribute:"aria-label",usage:"The send/stop button is labelled to indicate its current action."},{selector:".k-prompt-box-affix .k-button:not(.k-speech-to-text-button)",attribute:"aria-live=polite",usage:"Announces the change in status of the send/stop button."}]};var an=B;export{v as PROMPT_BOX_CLASSNAME,B as PromptBox,an as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var p=(...t)=>t.filter(e=>e!==!0&&!!e).map(e=>Array.isArray(e)?p(...e):typeof e=="object"?Object.keys(e).map((n,a)=>e[a]||e[n]&&n||null).filter(n=>n!==null).join(" "):e).filter(e=>!!e).join(" ");var b=(t,e)=>p({[`${t}-xs`]:e.size==="xsmall",[`${t}-sm`]:e.size==="small",[`${t}-md`]:e.size==="medium",[`${t}-lg`]:e.size==="large",[`${t}-xl`]:e.size==="xlarge",[`${t}-xxl`]:e.size==="xxlarge",[`${t}-xxxl`]:e.size==="xxxlarge"},{[`${t}-${e.fillMode}`]:e.fillMode},{[`${t}-${e.themeColor}`]:e.themeColor},{"k-rounded-sm":e.rounded==="small","k-rounded-md":e.rounded==="medium","k-rounded-lg":e.rounded==="large","k-rounded-full":e.rounded==="full","k-rounded-none":e.rounded==="none"}),re=(t,e)=>{let{valid:n,invalid:a,hover:i,focus:u,checked:l,active:c,selected:g,disabled:x,indeterminate:O,loading:m,empty:S,readonly:E,highlighted:A,...y}=e;return p({"k-valid":n,"k-invalid":a,"k-hover":i,"k-focus":u,"k-checked":l,"k-active":c,"k-selected":g,"k-disabled":x,"k-indeterminate":O&&!l,"k-loading":m,"k-empty":S,"k-readonly":E,"k-highlighted":A},Object.keys(y).reduce((k,T)=>(T.startsWith("k-")?k[T]=y[T]:k[`k-${T}`]=y[T],k),{}))};function ae(t,e){if(!e)return{};let n=Array.isArray(e)?e:[e];return Object.fromEntries(n.map(a=>[`k-${a}`,!0]))}var r={undefined:void 0,xsmall:"xsmall",small:"small",medium:"medium",large:"large",xlarge:"xlarge",xxlarge:"xxlarge",xxxlarge:"xxxlarge"},M={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"},o={undefined:void 0,inherit:"inherit",base:"base",primary:"primary",secondary:"secondary",tertiary:"tertiary",info:"info",success:"success",warning:"warning",error:"error",inverse:"inverse"},h={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"};import{jsx as _e}from"react/jsx-runtime";var X="k-input-inner",Ce=[],Ie={},$={type:"text",autocomplete:"off",value:"",placeholder:""},P=t=>{let{value:e=$.value,type:n=$.type,placeholder:a=$.placeholder,autocomplete:i=$.autocomplete,disabled:u,readOnly:l,...c}=t;return _e("input",{...c,type:n,className:p(t.className,X,b(X,t)),placeholder:a,autoComplete:i,defaultValue:e,disabled:u||void 0,readOnly:l||void 0})};P.states=Ce;P.options=Ie;P.className=X;import{jsx as Le}from"react/jsx-runtime";var V="k-input-inner",Ae=[],Pe={},se={value:"",placeholder:""},L=t=>{let{value:e=se.value,placeholder:n=se.placeholder,rows:a,disabled:i,...u}=t;return Le("textarea",{...u,className:p(t.className,V,b(V,t)),placeholder:n,rows:a,defaultValue:e,disabled:i||void 0})};L.states=Ae;L.options=Pe;L.className=V;var G="prompt-box",ie=G;import{Fragment as ze,jsx as le}from"react/jsx-runtime";var J="k-font-icon",we=[],Ke={size:[r.undefined,r.xsmall,r.small,r.medium,r.large,r.xlarge,r.xxlarge,r.xxxlarge],themeColor:[o.undefined,o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info]},Re={},w=t=>{let{size:e,themeColor:n,icon:a,rotate:i,flip:u,...l}=t;return a?le("span",{...l,className:p(t.className,J,b(J,{size:e}),{[`k-i-${a}`]:a,[`k-color-${n}`]:n,[`k-rotate-${i}`]:i,"k-flip-h":u==="h"||u==="both","k-flip-v":u==="v"||u==="both"}),"aria-hidden":"true"}):le(ze,{})};w.states=we;w.options=Ke;w.className=J;w.defaultOptions=Re;var pe=w;import{Fragment as De,jsx as D}from"react/jsx-runtime";var q="k-svg-icon",He=[],$e={size:[r.undefined,r.xsmall,r.small,r.medium,r.large,r.xlarge,r.xxlarge,r.xxxlarge],themeColor:[o.undefined,o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info]},ue={viewBox:"0 0 24 24"},K=t=>{let{size:e,themeColor:n,rotate:a,flip:i,viewBox:u=ue.viewBox,icon:l,...c}=t;if(!l)return D(De,{});if(l==="none")return D("span",{...c,className:p(t.className,q,b("k-icon",{size:e}),"k-none"),"aria-hidden":"true"});let g=typeof l=="object"&&l.name&&l.name;return D("span",{...c,className:p(t.className,q,b("k-icon",{size:e}),{[`k-svg-i-${g}`]:g,[`k-color-${n}`]:n,[`k-rotate-${a}`]:a,"k-flip-h":i==="h"||i==="both","k-flip-v":i==="v"||i==="both"}),"aria-hidden":"true",children:D("svg",{"aria-hidden":!0,focusable:!1,xmlns:"http://www.w3.org/2000/svg",viewBox:typeof l=="object"?l.viewBox:u,dangerouslySetInnerHTML:typeof l=="object"?{__html:l.content}:void 0,children:l?void 0:t.children})})};K.states=He;K.options=$e;K.className=q;K.defaultOptions=ue;var W=K;import*as Q from"@progress/kendo-svg-icons";var de="icon",ce="icons";import{useContext as Fe}from"react";import{createContext as Ue}from"react";var me=Ue({iconsType:"svg"});import{Fragment as fe,jsx as R}from"react/jsx-runtime";var U="k-icon",Xe=t=>t.replace(/([-_][a-z0-9])/gi,e=>e.toUpperCase().replace("-","").replace("_","")),Ve=[],Ge={size:[r.undefined,r.xsmall,r.small,r.medium,r.large,r.xlarge,r.xxlarge,r.xxxlarge],themeColor:[o.undefined,o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info]},Y={viewBox:"0 0 24 24",type:"svg"},N=t=>{let{iconsType:e}=Fe(me),{size:n,themeColor:a,icon:i,type:u=e||Y.type,rotate:l,flip:c,viewBox:g=Y.viewBox,...x}=t;if(!i)return R(fe,{});if((e||u)==="svg"){if(i==="none")return R(W,{...x,className:p(t.className,U),icon:i,size:n});let m=Q[i]?i:Xe(`${i}-icon`);return Q[m]?R(W,{...x,className:p(t.className,U),icon:Q[m],size:n,themeColor:a,rotate:l,flip:c,viewBox:g}):R(fe,{})}return R(pe,{...x,className:p(t.className,U),icon:i,size:n,themeColor:a,rotate:l,flip:c})};N.states=Ve;N.options=Ge;N.defaultOptions=Y;N.className=U;N.moduleName=de;N.folderName=ce;N.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 Z="button",xe=Z;import{Fragment as Qe,jsx as z,jsxs as be}from"react/jsx-runtime";var H="k-button",Je=["icon-button"],qe=[h.hover,h.focus,h.active,h.selected,h.disabled,h.generating],We={size:[r.undefined,r.xsmall,r.small,r.medium,r.large],rounded:[M.undefined,M.none,M.small,M.medium,M.large,M.full],fillMode:[f.undefined,f.solid,f.flat,f.outline,f.clear,f.link],themeColor:[o.undefined,o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info,o.inverse]},j={showArrow:!1,arrowIconName:"chevron-down"},s=t=>{let{as:e="button",size:n,rounded:a,fillMode:i,themeColor:u,showArrow:l=j.showArrow,arrowIconName:c=j.arrowIconName,variant:g,hover:x,focus:O,active:m,selected:S,disabled:E,togglable:A,ariaDisabled:y,icon:k,text:T,iconClassName:Be,className:Oe,...Me}=t,Se=k!==void 0,Ee=t.children!==void 0;return be(e,{className:p(Oe,H,ae(H,g),b(H,{size:n,rounded:a,fillMode:i,themeColor:u}),re(H,{hover:x,focus:O,active:m,disabled:E||y,selected:S}),{"k-icon-button":!T&&!Ee&&Se}),...Me,"aria-pressed":A?S?"true":"false":void 0,"aria-disabled":y?"true":void 0,disabled:E||void 0,children:[k&&z(N,{className:p(Be,"k-button-icon"),icon:k}),T?be(Qe,{children:[T&&z("span",{className:"k-button-text",children:T}),t.children]}):t.children&&z("span",{className:"k-button-text",children:t.children}),l&&z("span",{className:"k-menu-button-arrow k-button-arrow",children:z(N,{icon:c})})]})};s.states=qe;s.options=We;s.variants=Je;s.className=H;s.defaultOptions=j;s.moduleName=Z;s.folderName=xe;s.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 Ye}from"react/jsx-runtime";var F=t=>Ye(s,{icon:"folder",...t,"aria-label":t["aria-label"]||"Folder",children:void 0});import{jsx as Ze}from"react/jsx-runtime";var he=t=>Ze(s,{icon:"folder",children:"Button",...t});import{jsx as je}from"react/jsx-runtime";var ge=t=>je(s,{children:"Button",...t});import{jsx as ee}from"react/jsx-runtime";var et=s.options,tt=s.states,ot={...s.defaultOptions,variant:"text"},nt=[{name:"icon-only",title:"Icon Only"},{name:"icon-and-text",title:"Icon & Text"},{name:"text",title:"Text"}],rt=[],C=t=>{let{variant:e,...n}=t;switch(e){case"icon-only":return ee(F,{...n,icon:"star"});case"icon-and-text":return ee(he,{...n,icon:"star",children:"Button"});default:return ee(ge,{...n,children:"Button"})}};C.options=et;C.states=tt;C.variants=nt;C.defaultOptions=ot;C.modifiers=rt;C.className=s.className;var te="speech-to-text-button",Te=te;import{jsx as at}from"react/jsx-runtime";var Ne="k-speech-to-text-button",ve={icon:"microphone-outline"},d=t=>{let{listening:e=!1,icon:n=ve.icon,...a}=t;return at(s,{...a,icon:e?"stop-sm":n,className:p(t.className,Ne,{"k-listening":e}),"aria-pressed":e?"true":"false","aria-label":e?"Stop listening":"Start listening"})};d.states=s.states;d.options=s.options;d.className=Ne;d.defaultOptions=ve;d.moduleName=te;d.folderName=Te;d.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 zo}from"react/jsx-runtime";import{jsx as Uo}from"react/jsx-runtime";import{jsx as ut}from"react/jsx-runtime";var st=s.states,ke={...s.defaultOptions,variant:"normal"},it={...s.options,fillMode:s.options.fillMode.filter(t=>t!=="clear"&&t!=="link")},lt=[],pt=[{name:"normal",title:"Normal"},{name:"listening",title:"Listening"}],I=t=>{let{variant:e,...n}={...ke,...t},a={};return e==="listening"&&(a.listening=!0),ut(d,{...n,...a})};I.options=it;I.states=st;I.variants=pt;I.defaultOptions=ke;I.modifiers=lt;I.className=d.className;import{jsx as _,jsxs as oe}from"react/jsx-runtime";var v="k-prompt-box",dt=[h.hover,h.focus,h.disabled],ct={fillMode:[f.undefined,f.solid,f.flat,f.outline]},ne={lineMode:"auto",isExpanded:!1},B=t=>{let{fillMode:e,lineMode:n=ne.lineMode,startAffix:a,endAffix:i,header:u,isExpanded:l=ne.isExpanded,className:c,children:g,value:x,placeholder:O,generating:m,hover:S,focus:E,disabled:A,...y}=t,k=n==="multi"||n==="auto"&&l;return oe("div",{...y,className:p(c,"k-input",v,{[`${v}-singleline`]:n==="single",[`${v}-multiline`]:k,[`k-input-${e}`]:e,"k-hover":S,"k-focus":E,"k-disabled":A}),children:[u&&_("div",{className:`${v}-header`,children:u}),oe("div",{className:`${v}-content`,children:[a&&_("div",{className:`${v}-affix`,children:a}),n==="single"?_(P,{value:x,placeholder:O,className:`${v}-input`,type:"text","aria-label":"Prompt input"}):_(L,{value:x,placeholder:O,className:`${v}-textarea`,rows:n==="multi"||l?3:1,"aria-label":"Prompt input","aria-multiline":"true"}),oe("div",{className:`${v}-affix`,children:[i,_(d,{size:"small",fillMode:"flat",rounded:"full"}),_(F,{icon:m?"stop-sm":"arrow-up-outline",size:"small",rounded:"full",active:m,disabled:!x&&!m,className:p({"k-generating":m}),"aria-label":m?"Stop generating":"Send prompt","aria-live":"polite"})]})]}),g]})};B.states=dt;B.options=ct;B.className=v;B.defaultOptions=ne;B.moduleName=G;B.folderName=ie;B.ariaSpec={selector:".k-prompt-box",rules:[{selector:".k-prompt-box-singleline .k-prompt-box-input",attribute:"nodeName=input",usage:"Ensures the input field has the proper textbox role."},{selector:".k-prompt-box-singleline .k-prompt-box-input",attribute:"aria-label",usage:"Provides an accessible label for the single-line input."},{selector:".k-prompt-box-multiline .k-prompt-box-textarea",attribute:"nodeName=textarea",usage:"Ensures the textarea has the proper textbox role."},{selector:".k-prompt-box-multiline .k-prompt-box-textarea",attribute:"aria-label",usage:"Provides an accessible label for the textarea."},{selector:".k-prompt-box-multiline .k-prompt-box-textarea",attribute:"aria-multiline=true",usage:"Indicates the textarea supports multiple lines of text."},{selector:".k-prompt-box:not(.k-prompt-box-singleline):not(.k-prompt-box-multiline) .k-prompt-box-textarea",attribute:"nodeName=textarea",usage:"Ensures the auto-mode textarea has the proper textbox role."},{selector:".k-prompt-box:not(.k-prompt-box-singleline):not(.k-prompt-box-multiline) .k-prompt-box-textarea",attribute:"aria-label",usage:"Provides an accessible label for the auto-mode textarea."},{selector:".k-prompt-box:not(.k-prompt-box-singleline):not(.k-prompt-box-multiline) .k-prompt-box-textarea",attribute:"aria-multiline=true",usage:"Indicates the auto-mode textarea supports multiple lines of text."},{selector:".k-prompt-box-affix .k-button:not(.k-speech-to-text-button)",attribute:"aria-label",usage:"The send/stop button is labelled to indicate its current action."},{selector:".k-prompt-box-affix .k-button:not(.k-speech-to-text-button)",attribute:"aria-live=polite",usage:"Announces the change in status of the send/stop button."}]};var ye=B;import{jsx as mt}from"react/jsx-runtime";var un=t=>mt(ye,{...t,lineMode:"auto",isExpanded:!0});export{un as PromptBoxLineModeAutoExpanded};
|
|
1
|
+
var p=(...t)=>t.filter(e=>e!==!0&&!!e).map(e=>Array.isArray(e)?p(...e):typeof e=="object"?Object.keys(e).map((n,a)=>e[a]||e[n]&&n||null).filter(n=>n!==null).join(" "):e).filter(e=>!!e).join(" ");var b=(t,e)=>p({[`${t}-xs`]:e.size==="xsmall",[`${t}-sm`]:e.size==="small",[`${t}-md`]:e.size==="medium",[`${t}-lg`]:e.size==="large",[`${t}-xl`]:e.size==="xlarge",[`${t}-xxl`]:e.size==="xxlarge",[`${t}-xxxl`]:e.size==="xxxlarge"},{[`${t}-${e.fillMode}`]:e.fillMode},{[`${t}-${e.themeColor}`]:e.themeColor},{"k-rounded-sm":e.rounded==="small","k-rounded-md":e.rounded==="medium","k-rounded-lg":e.rounded==="large","k-rounded-full":e.rounded==="full","k-rounded-none":e.rounded==="none"}),re=(t,e)=>{let{valid:n,invalid:a,hover:i,focus:u,checked:l,active:c,selected:g,disabled:x,indeterminate:O,loading:m,empty:S,readonly:E,highlighted:A,...y}=e;return p({"k-valid":n,"k-invalid":a,"k-hover":i,"k-focus":u,"k-checked":l,"k-active":c,"k-selected":g,"k-disabled":x,"k-indeterminate":O&&!l,"k-loading":m,"k-empty":S,"k-readonly":E,"k-highlighted":A},Object.keys(y).reduce((k,T)=>(T.startsWith("k-")?k[T]=y[T]:k[`k-${T}`]=y[T],k),{}))};function ae(t,e){if(!e)return{};let n=Array.isArray(e)?e:[e];return Object.fromEntries(n.map(a=>[`k-${a}`,!0]))}var r={undefined:void 0,xsmall:"xsmall",small:"small",medium:"medium",large:"large",xlarge:"xlarge",xxlarge:"xxlarge",xxxlarge:"xxxlarge"},M={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"},o={undefined:void 0,inherit:"inherit",base:"base",primary:"primary",secondary:"secondary",tertiary:"tertiary",info:"info",success:"success",warning:"warning",error:"error",inverse:"inverse"},h={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"};import{jsx as _e}from"react/jsx-runtime";var X="k-input-inner",Ce=[],Ie={},$={type:"text",autocomplete:"off",value:"",placeholder:""},P=t=>{let{value:e=$.value,type:n=$.type,placeholder:a=$.placeholder,autocomplete:i=$.autocomplete,disabled:u,readOnly:l,...c}=t;return _e("input",{...c,type:n,className:p(t.className,X,b(X,t)),placeholder:a,autoComplete:i,defaultValue:e,disabled:u||void 0,readOnly:l||void 0})};P.states=Ce;P.options=Ie;P.className=X;import{jsx as Le}from"react/jsx-runtime";var V="k-input-inner",Ae=[],Pe={},se={value:"",placeholder:""},L=t=>{let{value:e=se.value,placeholder:n=se.placeholder,rows:a,disabled:i,...u}=t;return Le("textarea",{...u,className:p(t.className,V,b(V,t)),placeholder:n,rows:a,defaultValue:e,disabled:i||void 0})};L.states=Ae;L.options=Pe;L.className=V;var G="prompt-box",ie=G;import{Fragment as ze,jsx as le}from"react/jsx-runtime";var J="k-font-icon",we=[],Ke={size:[r.undefined,r.xsmall,r.small,r.medium,r.large,r.xlarge,r.xxlarge,r.xxxlarge],themeColor:[o.undefined,o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info]},Re={},w=t=>{let{size:e,themeColor:n,icon:a,rotate:i,flip:u,...l}=t;return a?le("span",{...l,className:p(t.className,J,b(J,{size:e}),{[`k-i-${a}`]:a,[`k-color-${n}`]:n,[`k-rotate-${i}`]:i,"k-flip-h":u==="h"||u==="both","k-flip-v":u==="v"||u==="both"}),"aria-hidden":"true"}):le(ze,{})};w.states=we;w.options=Ke;w.className=J;w.defaultOptions=Re;var pe=w;import{Fragment as De,jsx as D}from"react/jsx-runtime";var q="k-svg-icon",He=[],$e={size:[r.undefined,r.xsmall,r.small,r.medium,r.large,r.xlarge,r.xxlarge,r.xxxlarge],themeColor:[o.undefined,o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info]},ue={viewBox:"0 0 24 24"},K=t=>{let{size:e,themeColor:n,rotate:a,flip:i,viewBox:u=ue.viewBox,icon:l,...c}=t;if(!l)return D(De,{});if(l==="none")return D("span",{...c,className:p(t.className,q,b("k-icon",{size:e}),"k-none"),"aria-hidden":"true"});let g=typeof l=="object"&&l.name&&l.name;return D("span",{...c,className:p(t.className,q,b("k-icon",{size:e}),{[`k-svg-i-${g}`]:g,[`k-color-${n}`]:n,[`k-rotate-${a}`]:a,"k-flip-h":i==="h"||i==="both","k-flip-v":i==="v"||i==="both"}),"aria-hidden":"true",children:D("svg",{"aria-hidden":!0,focusable:!1,xmlns:"http://www.w3.org/2000/svg",viewBox:typeof l=="object"?l.viewBox:u,dangerouslySetInnerHTML:typeof l=="object"?{__html:l.content}:void 0,children:l?void 0:t.children})})};K.states=He;K.options=$e;K.className=q;K.defaultOptions=ue;var W=K;import*as Q from"@progress/kendo-svg-icons";var de="icon",ce="icons";import{useContext as Fe}from"react";import{createContext as Ue}from"react";var me=Ue({iconsType:"svg"});import{Fragment as fe,jsx as R}from"react/jsx-runtime";var U="k-icon",Xe=t=>t.replace(/([-_][a-z0-9])/gi,e=>e.toUpperCase().replace("-","").replace("_","")),Ve=[],Ge={size:[r.undefined,r.xsmall,r.small,r.medium,r.large,r.xlarge,r.xxlarge,r.xxxlarge],themeColor:[o.undefined,o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info]},Y={viewBox:"0 0 24 24",type:"svg"},N=t=>{let{iconsType:e}=Fe(me),{size:n,themeColor:a,icon:i,type:u=e||Y.type,rotate:l,flip:c,viewBox:g=Y.viewBox,...x}=t;if(!i)return R(fe,{});if((e||u)==="svg"){if(i==="none")return R(W,{...x,className:p(t.className,U),icon:i,size:n});let m=Q[i]?i:Xe(`${i}-icon`);return Q[m]?R(W,{...x,className:p(t.className,U),icon:Q[m],size:n,themeColor:a,rotate:l,flip:c,viewBox:g}):R(fe,{})}return R(pe,{...x,className:p(t.className,U),icon:i,size:n,themeColor:a,rotate:l,flip:c})};N.states=Ve;N.options=Ge;N.defaultOptions=Y;N.className=U;N.moduleName=de;N.folderName=ce;N.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 Z="button",xe=Z;import{Fragment as Qe,jsx as z,jsxs as be}from"react/jsx-runtime";var H="k-button",Je=["icon-button"],qe=[h.hover,h.focus,h.active,h.selected,h.disabled,h.generating],We={size:[r.undefined,r.xsmall,r.small,r.medium,r.large],rounded:[M.undefined,M.none,M.small,M.medium,M.large,M.full],fillMode:[f.undefined,f.solid,f.flat,f.outline,f.clear,f.link],themeColor:[o.undefined,o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info,o.inverse]},j={showArrow:!1,arrowIconName:"chevron-down"},s=t=>{let{as:e="button",size:n,rounded:a,fillMode:i,themeColor:u,showArrow:l=j.showArrow,arrowIconName:c=j.arrowIconName,variant:g,hover:x,focus:O,active:m,selected:S,disabled:E,togglable:A,ariaDisabled:y,icon:k,text:T,iconClassName:Be,className:Oe,...Me}=t,Se=k!==void 0,Ee=t.children!==void 0;return be(e,{className:p(Oe,H,ae(H,g),b(H,{size:n,rounded:a,fillMode:i,themeColor:u}),re(H,{hover:x,focus:O,active:m,disabled:E||y,selected:S}),{"k-icon-button":!T&&!Ee&&Se}),...Me,"aria-pressed":A?S?"true":"false":void 0,"aria-disabled":y?"true":void 0,disabled:E||void 0,children:[k&&z(N,{className:p(Be,"k-button-icon"),icon:k}),T?be(Qe,{children:[T&&z("span",{className:"k-button-text",children:T}),t.children]}):t.children&&z("span",{className:"k-button-text",children:t.children}),l&&z("span",{className:"k-menu-button-arrow k-button-arrow",children:z(N,{icon:c})})]})};s.states=qe;s.options=We;s.variants=Je;s.className=H;s.defaultOptions=j;s.moduleName=Z;s.folderName=xe;s.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 Ye}from"react/jsx-runtime";var F=t=>Ye(s,{icon:"folder",...t,"aria-label":t["aria-label"]||"Folder",children:void 0});import{jsx as Ze}from"react/jsx-runtime";var he=t=>Ze(s,{icon:"folder",children:"Button",...t});import{jsx as je}from"react/jsx-runtime";var ge=t=>je(s,{children:"Button",...t});import{jsx as ee}from"react/jsx-runtime";var et=s.options,tt=s.states,ot={...s.defaultOptions,variant:"text"},nt=[{name:"icon-only",title:"Icon Only"},{name:"icon-and-text",title:"Icon & Text"},{name:"text",title:"Text"}],rt=[],C=t=>{let{variant:e,...n}=t;switch(e){case"icon-only":return ee(F,{...n,icon:"star"});case"icon-and-text":return ee(he,{...n,icon:"star",children:"Button"});default:return ee(ge,{...n,children:"Button"})}};C.options=et;C.states=tt;C.variants=nt;C.defaultOptions=ot;C.modifiers=rt;C.className=s.className;var te="speech-to-text-button",Te=te;import{jsx as at}from"react/jsx-runtime";var Ne="k-speech-to-text-button",ve={icon:"microphone"},d=t=>{let{listening:e=!1,icon:n=ve.icon,...a}=t;return at(s,{...a,icon:e?"stop":n,className:p(t.className,Ne,{"k-listening":e}),"aria-pressed":e?"true":"false","aria-label":e?"Stop listening":"Start listening"})};d.states=s.states;d.options=s.options;d.className=Ne;d.defaultOptions=ve;d.moduleName=te;d.folderName=Te;d.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 zo}from"react/jsx-runtime";import{jsx as Uo}from"react/jsx-runtime";import{jsx as ut}from"react/jsx-runtime";var st=s.states,ke={...s.defaultOptions,variant:"normal"},it={...s.options,fillMode:s.options.fillMode.filter(t=>t!=="clear"&&t!=="link")},lt=[],pt=[{name:"normal",title:"Normal"},{name:"listening",title:"Listening"}],I=t=>{let{variant:e,...n}={...ke,...t},a={};return e==="listening"&&(a.listening=!0),ut(d,{...n,...a})};I.options=it;I.states=st;I.variants=pt;I.defaultOptions=ke;I.modifiers=lt;I.className=d.className;import{jsx as _,jsxs as oe}from"react/jsx-runtime";var v="k-prompt-box",dt=[h.hover,h.focus,h.disabled],ct={fillMode:[f.undefined,f.solid,f.flat,f.outline]},ne={lineMode:"auto",isExpanded:!1},B=t=>{let{fillMode:e,lineMode:n=ne.lineMode,startAffix:a,endAffix:i,header:u,isExpanded:l=ne.isExpanded,className:c,children:g,value:x,placeholder:O,generating:m,hover:S,focus:E,disabled:A,...y}=t,k=n==="multi"||n==="auto"&&l;return oe("div",{...y,className:p(c,"k-input",v,{[`${v}-singleline`]:n==="single",[`${v}-multiline`]:k,[`k-input-${e}`]:e,"k-hover":S,"k-focus":E,"k-disabled":A}),children:[u&&_("div",{className:`${v}-header`,children:u}),oe("div",{className:`${v}-content`,children:[a&&_("div",{className:`${v}-affix`,children:a}),n==="single"?_(P,{value:x,placeholder:O,className:`${v}-input`,type:"text","aria-label":"Prompt input"}):_(L,{value:x,placeholder:O,className:`${v}-textarea`,rows:n==="multi"||l?3:1,"aria-label":"Prompt input","aria-multiline":"true"}),oe("div",{className:`${v}-affix`,children:[i,_(d,{size:"small",fillMode:"flat",rounded:"full"}),_(F,{icon:m?"stop":"arrow-up",size:"small",rounded:"full",active:m,disabled:!x&&!m,className:p({"k-generating":m}),"aria-label":m?"Stop generating":"Send prompt","aria-live":"polite"})]})]}),g]})};B.states=dt;B.options=ct;B.className=v;B.defaultOptions=ne;B.moduleName=G;B.folderName=ie;B.ariaSpec={selector:".k-prompt-box",rules:[{selector:".k-prompt-box-singleline .k-prompt-box-input",attribute:"nodeName=input",usage:"Ensures the input field has the proper textbox role."},{selector:".k-prompt-box-singleline .k-prompt-box-input",attribute:"aria-label",usage:"Provides an accessible label for the single-line input."},{selector:".k-prompt-box-multiline .k-prompt-box-textarea",attribute:"nodeName=textarea",usage:"Ensures the textarea has the proper textbox role."},{selector:".k-prompt-box-multiline .k-prompt-box-textarea",attribute:"aria-label",usage:"Provides an accessible label for the textarea."},{selector:".k-prompt-box-multiline .k-prompt-box-textarea",attribute:"aria-multiline=true",usage:"Indicates the textarea supports multiple lines of text."},{selector:".k-prompt-box:not(.k-prompt-box-singleline):not(.k-prompt-box-multiline) .k-prompt-box-textarea",attribute:"nodeName=textarea",usage:"Ensures the auto-mode textarea has the proper textbox role."},{selector:".k-prompt-box:not(.k-prompt-box-singleline):not(.k-prompt-box-multiline) .k-prompt-box-textarea",attribute:"aria-label",usage:"Provides an accessible label for the auto-mode textarea."},{selector:".k-prompt-box:not(.k-prompt-box-singleline):not(.k-prompt-box-multiline) .k-prompt-box-textarea",attribute:"aria-multiline=true",usage:"Indicates the auto-mode textarea supports multiple lines of text."},{selector:".k-prompt-box-affix .k-button:not(.k-speech-to-text-button)",attribute:"aria-label",usage:"The send/stop button is labelled to indicate its current action."},{selector:".k-prompt-box-affix .k-button:not(.k-speech-to-text-button)",attribute:"aria-live=polite",usage:"Announces the change in status of the send/stop button."}]};var ye=B;import{jsx as mt}from"react/jsx-runtime";var un=t=>mt(ye,{...t,lineMode:"auto",isExpanded:!0});export{un as PromptBoxLineModeAutoExpanded};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var p=(...t)=>t.filter(e=>e!==!0&&!!e).map(e=>Array.isArray(e)?p(...e):typeof e=="object"?Object.keys(e).map((n,a)=>e[a]||e[n]&&n||null).filter(n=>n!==null).join(" "):e).filter(e=>!!e).join(" ");var b=(t,e)=>p({[`${t}-xs`]:e.size==="xsmall",[`${t}-sm`]:e.size==="small",[`${t}-md`]:e.size==="medium",[`${t}-lg`]:e.size==="large",[`${t}-xl`]:e.size==="xlarge",[`${t}-xxl`]:e.size==="xxlarge",[`${t}-xxxl`]:e.size==="xxxlarge"},{[`${t}-${e.fillMode}`]:e.fillMode},{[`${t}-${e.themeColor}`]:e.themeColor},{"k-rounded-sm":e.rounded==="small","k-rounded-md":e.rounded==="medium","k-rounded-lg":e.rounded==="large","k-rounded-full":e.rounded==="full","k-rounded-none":e.rounded==="none"}),re=(t,e)=>{let{valid:n,invalid:a,hover:i,focus:u,checked:l,active:d,selected:g,disabled:x,indeterminate:O,loading:m,empty:S,readonly:E,highlighted:A,...y}=e;return p({"k-valid":n,"k-invalid":a,"k-hover":i,"k-focus":u,"k-checked":l,"k-active":d,"k-selected":g,"k-disabled":x,"k-indeterminate":O&&!l,"k-loading":m,"k-empty":S,"k-readonly":E,"k-highlighted":A},Object.keys(y).reduce((k,T)=>(T.startsWith("k-")?k[T]=y[T]:k[`k-${T}`]=y[T],k),{}))};function ae(t,e){if(!e)return{};let n=Array.isArray(e)?e:[e];return Object.fromEntries(n.map(a=>[`k-${a}`,!0]))}var r={undefined:void 0,xsmall:"xsmall",small:"small",medium:"medium",large:"large",xlarge:"xlarge",xxlarge:"xxlarge",xxxlarge:"xxxlarge"},M={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"},o={undefined:void 0,inherit:"inherit",base:"base",primary:"primary",secondary:"secondary",tertiary:"tertiary",info:"info",success:"success",warning:"warning",error:"error",inverse:"inverse"},h={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"};import{jsx as _e}from"react/jsx-runtime";var X="k-input-inner",Ce=[],Ie={},$={type:"text",autocomplete:"off",value:"",placeholder:""},P=t=>{let{value:e=$.value,type:n=$.type,placeholder:a=$.placeholder,autocomplete:i=$.autocomplete,disabled:u,readOnly:l,...d}=t;return _e("input",{...d,type:n,className:p(t.className,X,b(X,t)),placeholder:a,autoComplete:i,defaultValue:e,disabled:u||void 0,readOnly:l||void 0})};P.states=Ce;P.options=Ie;P.className=X;import{jsx as Le}from"react/jsx-runtime";var V="k-input-inner",Ae=[],Pe={},se={value:"",placeholder:""},L=t=>{let{value:e=se.value,placeholder:n=se.placeholder,rows:a,disabled:i,...u}=t;return Le("textarea",{...u,className:p(t.className,V,b(V,t)),placeholder:n,rows:a,defaultValue:e,disabled:i||void 0})};L.states=Ae;L.options=Pe;L.className=V;var G="prompt-box",ie=G;import{Fragment as ze,jsx as le}from"react/jsx-runtime";var J="k-font-icon",we=[],Ke={size:[r.undefined,r.xsmall,r.small,r.medium,r.large,r.xlarge,r.xxlarge,r.xxxlarge],themeColor:[o.undefined,o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info]},Re={},w=t=>{let{size:e,themeColor:n,icon:a,rotate:i,flip:u,...l}=t;return a?le("span",{...l,className:p(t.className,J,b(J,{size:e}),{[`k-i-${a}`]:a,[`k-color-${n}`]:n,[`k-rotate-${i}`]:i,"k-flip-h":u==="h"||u==="both","k-flip-v":u==="v"||u==="both"}),"aria-hidden":"true"}):le(ze,{})};w.states=we;w.options=Ke;w.className=J;w.defaultOptions=Re;var pe=w;import{Fragment as De,jsx as D}from"react/jsx-runtime";var q="k-svg-icon",He=[],$e={size:[r.undefined,r.xsmall,r.small,r.medium,r.large,r.xlarge,r.xxlarge,r.xxxlarge],themeColor:[o.undefined,o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info]},ue={viewBox:"0 0 24 24"},K=t=>{let{size:e,themeColor:n,rotate:a,flip:i,viewBox:u=ue.viewBox,icon:l,...d}=t;if(!l)return D(De,{});if(l==="none")return D("span",{...d,className:p(t.className,q,b("k-icon",{size:e}),"k-none"),"aria-hidden":"true"});let g=typeof l=="object"&&l.name&&l.name;return D("span",{...d,className:p(t.className,q,b("k-icon",{size:e}),{[`k-svg-i-${g}`]:g,[`k-color-${n}`]:n,[`k-rotate-${a}`]:a,"k-flip-h":i==="h"||i==="both","k-flip-v":i==="v"||i==="both"}),"aria-hidden":"true",children:D("svg",{"aria-hidden":!0,focusable:!1,xmlns:"http://www.w3.org/2000/svg",viewBox:typeof l=="object"?l.viewBox:u,dangerouslySetInnerHTML:typeof l=="object"?{__html:l.content}:void 0,children:l?void 0:t.children})})};K.states=He;K.options=$e;K.className=q;K.defaultOptions=ue;var W=K;import*as Q from"@progress/kendo-svg-icons";var ce="icon",de="icons";import{useContext as Fe}from"react";import{createContext as Ue}from"react";var me=Ue({iconsType:"svg"});import{Fragment as fe,jsx as R}from"react/jsx-runtime";var U="k-icon",Xe=t=>t.replace(/([-_][a-z0-9])/gi,e=>e.toUpperCase().replace("-","").replace("_","")),Ve=[],Ge={size:[r.undefined,r.xsmall,r.small,r.medium,r.large,r.xlarge,r.xxlarge,r.xxxlarge],themeColor:[o.undefined,o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info]},Y={viewBox:"0 0 24 24",type:"svg"},N=t=>{let{iconsType:e}=Fe(me),{size:n,themeColor:a,icon:i,type:u=e||Y.type,rotate:l,flip:d,viewBox:g=Y.viewBox,...x}=t;if(!i)return R(fe,{});if((e||u)==="svg"){if(i==="none")return R(W,{...x,className:p(t.className,U),icon:i,size:n});let m=Q[i]?i:Xe(`${i}-icon`);return Q[m]?R(W,{...x,className:p(t.className,U),icon:Q[m],size:n,themeColor:a,rotate:l,flip:d,viewBox:g}):R(fe,{})}return R(pe,{...x,className:p(t.className,U),icon:i,size:n,themeColor:a,rotate:l,flip:d})};N.states=Ve;N.options=Ge;N.defaultOptions=Y;N.className=U;N.moduleName=ce;N.folderName=de;N.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 Z="button",xe=Z;import{Fragment as Qe,jsx as z,jsxs as be}from"react/jsx-runtime";var H="k-button",Je=["icon-button"],qe=[h.hover,h.focus,h.active,h.selected,h.disabled,h.generating],We={size:[r.undefined,r.xsmall,r.small,r.medium,r.large],rounded:[M.undefined,M.none,M.small,M.medium,M.large,M.full],fillMode:[f.undefined,f.solid,f.flat,f.outline,f.clear,f.link],themeColor:[o.undefined,o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info,o.inverse]},j={showArrow:!1,arrowIconName:"chevron-down"},s=t=>{let{as:e="button",size:n,rounded:a,fillMode:i,themeColor:u,showArrow:l=j.showArrow,arrowIconName:d=j.arrowIconName,variant:g,hover:x,focus:O,active:m,selected:S,disabled:E,togglable:A,ariaDisabled:y,icon:k,text:T,iconClassName:Be,className:Oe,...Me}=t,Se=k!==void 0,Ee=t.children!==void 0;return be(e,{className:p(Oe,H,ae(H,g),b(H,{size:n,rounded:a,fillMode:i,themeColor:u}),re(H,{hover:x,focus:O,active:m,disabled:E||y,selected:S}),{"k-icon-button":!T&&!Ee&&Se}),...Me,"aria-pressed":A?S?"true":"false":void 0,"aria-disabled":y?"true":void 0,disabled:E||void 0,children:[k&&z(N,{className:p(Be,"k-button-icon"),icon:k}),T?be(Qe,{children:[T&&z("span",{className:"k-button-text",children:T}),t.children]}):t.children&&z("span",{className:"k-button-text",children:t.children}),l&&z("span",{className:"k-menu-button-arrow k-button-arrow",children:z(N,{icon:d})})]})};s.states=qe;s.options=We;s.variants=Je;s.className=H;s.defaultOptions=j;s.moduleName=Z;s.folderName=xe;s.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 Ye}from"react/jsx-runtime";var F=t=>Ye(s,{icon:"folder",...t,"aria-label":t["aria-label"]||"Folder",children:void 0});import{jsx as Ze}from"react/jsx-runtime";var he=t=>Ze(s,{icon:"folder",children:"Button",...t});import{jsx as je}from"react/jsx-runtime";var ge=t=>je(s,{children:"Button",...t});import{jsx as ee}from"react/jsx-runtime";var et=s.options,tt=s.states,ot={...s.defaultOptions,variant:"text"},nt=[{name:"icon-only",title:"Icon Only"},{name:"icon-and-text",title:"Icon & Text"},{name:"text",title:"Text"}],rt=[],C=t=>{let{variant:e,...n}=t;switch(e){case"icon-only":return ee(F,{...n,icon:"star"});case"icon-and-text":return ee(he,{...n,icon:"star",children:"Button"});default:return ee(ge,{...n,children:"Button"})}};C.options=et;C.states=tt;C.variants=nt;C.defaultOptions=ot;C.modifiers=rt;C.className=s.className;var te="speech-to-text-button",Te=te;import{jsx as at}from"react/jsx-runtime";var Ne="k-speech-to-text-button",ve={icon:"microphone-outline"},c=t=>{let{listening:e=!1,icon:n=ve.icon,...a}=t;return at(s,{...a,icon:e?"stop-sm":n,className:p(t.className,Ne,{"k-listening":e}),"aria-pressed":e?"true":"false","aria-label":e?"Stop listening":"Start listening"})};c.states=s.states;c.options=s.options;c.className=Ne;c.defaultOptions=ve;c.moduleName=te;c.folderName=Te;c.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 zo}from"react/jsx-runtime";import{jsx as Uo}from"react/jsx-runtime";import{jsx as ut}from"react/jsx-runtime";var st=s.states,ke={...s.defaultOptions,variant:"normal"},it={...s.options,fillMode:s.options.fillMode.filter(t=>t!=="clear"&&t!=="link")},lt=[],pt=[{name:"normal",title:"Normal"},{name:"listening",title:"Listening"}],I=t=>{let{variant:e,...n}={...ke,...t},a={};return e==="listening"&&(a.listening=!0),ut(c,{...n,...a})};I.options=it;I.states=st;I.variants=pt;I.defaultOptions=ke;I.modifiers=lt;I.className=c.className;import{jsx as _,jsxs as oe}from"react/jsx-runtime";var v="k-prompt-box",ct=[h.hover,h.focus,h.disabled],dt={fillMode:[f.undefined,f.solid,f.flat,f.outline]},ne={lineMode:"auto",isExpanded:!1},B=t=>{let{fillMode:e,lineMode:n=ne.lineMode,startAffix:a,endAffix:i,header:u,isExpanded:l=ne.isExpanded,className:d,children:g,value:x,placeholder:O,generating:m,hover:S,focus:E,disabled:A,...y}=t,k=n==="multi"||n==="auto"&&l;return oe("div",{...y,className:p(d,"k-input",v,{[`${v}-singleline`]:n==="single",[`${v}-multiline`]:k,[`k-input-${e}`]:e,"k-hover":S,"k-focus":E,"k-disabled":A}),children:[u&&_("div",{className:`${v}-header`,children:u}),oe("div",{className:`${v}-content`,children:[a&&_("div",{className:`${v}-affix`,children:a}),n==="single"?_(P,{value:x,placeholder:O,className:`${v}-input`,type:"text","aria-label":"Prompt input"}):_(L,{value:x,placeholder:O,className:`${v}-textarea`,rows:n==="multi"||l?3:1,"aria-label":"Prompt input","aria-multiline":"true"}),oe("div",{className:`${v}-affix`,children:[i,_(c,{size:"small",fillMode:"flat",rounded:"full"}),_(F,{icon:m?"stop-sm":"arrow-up-outline",size:"small",rounded:"full",active:m,disabled:!x&&!m,className:p({"k-generating":m}),"aria-label":m?"Stop generating":"Send prompt","aria-live":"polite"})]})]}),g]})};B.states=ct;B.options=dt;B.className=v;B.defaultOptions=ne;B.moduleName=G;B.folderName=ie;B.ariaSpec={selector:".k-prompt-box",rules:[{selector:".k-prompt-box-singleline .k-prompt-box-input",attribute:"nodeName=input",usage:"Ensures the input field has the proper textbox role."},{selector:".k-prompt-box-singleline .k-prompt-box-input",attribute:"aria-label",usage:"Provides an accessible label for the single-line input."},{selector:".k-prompt-box-multiline .k-prompt-box-textarea",attribute:"nodeName=textarea",usage:"Ensures the textarea has the proper textbox role."},{selector:".k-prompt-box-multiline .k-prompt-box-textarea",attribute:"aria-label",usage:"Provides an accessible label for the textarea."},{selector:".k-prompt-box-multiline .k-prompt-box-textarea",attribute:"aria-multiline=true",usage:"Indicates the textarea supports multiple lines of text."},{selector:".k-prompt-box:not(.k-prompt-box-singleline):not(.k-prompt-box-multiline) .k-prompt-box-textarea",attribute:"nodeName=textarea",usage:"Ensures the auto-mode textarea has the proper textbox role."},{selector:".k-prompt-box:not(.k-prompt-box-singleline):not(.k-prompt-box-multiline) .k-prompt-box-textarea",attribute:"aria-label",usage:"Provides an accessible label for the auto-mode textarea."},{selector:".k-prompt-box:not(.k-prompt-box-singleline):not(.k-prompt-box-multiline) .k-prompt-box-textarea",attribute:"aria-multiline=true",usage:"Indicates the auto-mode textarea supports multiple lines of text."},{selector:".k-prompt-box-affix .k-button:not(.k-speech-to-text-button)",attribute:"aria-label",usage:"The send/stop button is labelled to indicate its current action."},{selector:".k-prompt-box-affix .k-button:not(.k-speech-to-text-button)",attribute:"aria-live=polite",usage:"Announces the change in status of the send/stop button."}]};var ye=B;import{jsx as mt}from"react/jsx-runtime";var un=t=>mt(ye,{...t,lineMode:"auto"});export{un as PromptBoxLineModeAuto};
|
|
1
|
+
var p=(...t)=>t.filter(e=>e!==!0&&!!e).map(e=>Array.isArray(e)?p(...e):typeof e=="object"?Object.keys(e).map((n,a)=>e[a]||e[n]&&n||null).filter(n=>n!==null).join(" "):e).filter(e=>!!e).join(" ");var b=(t,e)=>p({[`${t}-xs`]:e.size==="xsmall",[`${t}-sm`]:e.size==="small",[`${t}-md`]:e.size==="medium",[`${t}-lg`]:e.size==="large",[`${t}-xl`]:e.size==="xlarge",[`${t}-xxl`]:e.size==="xxlarge",[`${t}-xxxl`]:e.size==="xxxlarge"},{[`${t}-${e.fillMode}`]:e.fillMode},{[`${t}-${e.themeColor}`]:e.themeColor},{"k-rounded-sm":e.rounded==="small","k-rounded-md":e.rounded==="medium","k-rounded-lg":e.rounded==="large","k-rounded-full":e.rounded==="full","k-rounded-none":e.rounded==="none"}),re=(t,e)=>{let{valid:n,invalid:a,hover:i,focus:u,checked:l,active:d,selected:g,disabled:x,indeterminate:O,loading:m,empty:S,readonly:E,highlighted:A,...y}=e;return p({"k-valid":n,"k-invalid":a,"k-hover":i,"k-focus":u,"k-checked":l,"k-active":d,"k-selected":g,"k-disabled":x,"k-indeterminate":O&&!l,"k-loading":m,"k-empty":S,"k-readonly":E,"k-highlighted":A},Object.keys(y).reduce((k,T)=>(T.startsWith("k-")?k[T]=y[T]:k[`k-${T}`]=y[T],k),{}))};function ae(t,e){if(!e)return{};let n=Array.isArray(e)?e:[e];return Object.fromEntries(n.map(a=>[`k-${a}`,!0]))}var r={undefined:void 0,xsmall:"xsmall",small:"small",medium:"medium",large:"large",xlarge:"xlarge",xxlarge:"xxlarge",xxxlarge:"xxxlarge"},M={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"},o={undefined:void 0,inherit:"inherit",base:"base",primary:"primary",secondary:"secondary",tertiary:"tertiary",info:"info",success:"success",warning:"warning",error:"error",inverse:"inverse"},h={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"};import{jsx as _e}from"react/jsx-runtime";var X="k-input-inner",Ce=[],Ie={},$={type:"text",autocomplete:"off",value:"",placeholder:""},P=t=>{let{value:e=$.value,type:n=$.type,placeholder:a=$.placeholder,autocomplete:i=$.autocomplete,disabled:u,readOnly:l,...d}=t;return _e("input",{...d,type:n,className:p(t.className,X,b(X,t)),placeholder:a,autoComplete:i,defaultValue:e,disabled:u||void 0,readOnly:l||void 0})};P.states=Ce;P.options=Ie;P.className=X;import{jsx as Le}from"react/jsx-runtime";var V="k-input-inner",Ae=[],Pe={},se={value:"",placeholder:""},L=t=>{let{value:e=se.value,placeholder:n=se.placeholder,rows:a,disabled:i,...u}=t;return Le("textarea",{...u,className:p(t.className,V,b(V,t)),placeholder:n,rows:a,defaultValue:e,disabled:i||void 0})};L.states=Ae;L.options=Pe;L.className=V;var G="prompt-box",ie=G;import{Fragment as ze,jsx as le}from"react/jsx-runtime";var J="k-font-icon",we=[],Ke={size:[r.undefined,r.xsmall,r.small,r.medium,r.large,r.xlarge,r.xxlarge,r.xxxlarge],themeColor:[o.undefined,o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info]},Re={},w=t=>{let{size:e,themeColor:n,icon:a,rotate:i,flip:u,...l}=t;return a?le("span",{...l,className:p(t.className,J,b(J,{size:e}),{[`k-i-${a}`]:a,[`k-color-${n}`]:n,[`k-rotate-${i}`]:i,"k-flip-h":u==="h"||u==="both","k-flip-v":u==="v"||u==="both"}),"aria-hidden":"true"}):le(ze,{})};w.states=we;w.options=Ke;w.className=J;w.defaultOptions=Re;var pe=w;import{Fragment as De,jsx as D}from"react/jsx-runtime";var q="k-svg-icon",He=[],$e={size:[r.undefined,r.xsmall,r.small,r.medium,r.large,r.xlarge,r.xxlarge,r.xxxlarge],themeColor:[o.undefined,o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info]},ue={viewBox:"0 0 24 24"},K=t=>{let{size:e,themeColor:n,rotate:a,flip:i,viewBox:u=ue.viewBox,icon:l,...d}=t;if(!l)return D(De,{});if(l==="none")return D("span",{...d,className:p(t.className,q,b("k-icon",{size:e}),"k-none"),"aria-hidden":"true"});let g=typeof l=="object"&&l.name&&l.name;return D("span",{...d,className:p(t.className,q,b("k-icon",{size:e}),{[`k-svg-i-${g}`]:g,[`k-color-${n}`]:n,[`k-rotate-${a}`]:a,"k-flip-h":i==="h"||i==="both","k-flip-v":i==="v"||i==="both"}),"aria-hidden":"true",children:D("svg",{"aria-hidden":!0,focusable:!1,xmlns:"http://www.w3.org/2000/svg",viewBox:typeof l=="object"?l.viewBox:u,dangerouslySetInnerHTML:typeof l=="object"?{__html:l.content}:void 0,children:l?void 0:t.children})})};K.states=He;K.options=$e;K.className=q;K.defaultOptions=ue;var W=K;import*as Q from"@progress/kendo-svg-icons";var ce="icon",de="icons";import{useContext as Fe}from"react";import{createContext as Ue}from"react";var me=Ue({iconsType:"svg"});import{Fragment as fe,jsx as R}from"react/jsx-runtime";var U="k-icon",Xe=t=>t.replace(/([-_][a-z0-9])/gi,e=>e.toUpperCase().replace("-","").replace("_","")),Ve=[],Ge={size:[r.undefined,r.xsmall,r.small,r.medium,r.large,r.xlarge,r.xxlarge,r.xxxlarge],themeColor:[o.undefined,o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info]},Y={viewBox:"0 0 24 24",type:"svg"},N=t=>{let{iconsType:e}=Fe(me),{size:n,themeColor:a,icon:i,type:u=e||Y.type,rotate:l,flip:d,viewBox:g=Y.viewBox,...x}=t;if(!i)return R(fe,{});if((e||u)==="svg"){if(i==="none")return R(W,{...x,className:p(t.className,U),icon:i,size:n});let m=Q[i]?i:Xe(`${i}-icon`);return Q[m]?R(W,{...x,className:p(t.className,U),icon:Q[m],size:n,themeColor:a,rotate:l,flip:d,viewBox:g}):R(fe,{})}return R(pe,{...x,className:p(t.className,U),icon:i,size:n,themeColor:a,rotate:l,flip:d})};N.states=Ve;N.options=Ge;N.defaultOptions=Y;N.className=U;N.moduleName=ce;N.folderName=de;N.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 Z="button",xe=Z;import{Fragment as Qe,jsx as z,jsxs as be}from"react/jsx-runtime";var H="k-button",Je=["icon-button"],qe=[h.hover,h.focus,h.active,h.selected,h.disabled,h.generating],We={size:[r.undefined,r.xsmall,r.small,r.medium,r.large],rounded:[M.undefined,M.none,M.small,M.medium,M.large,M.full],fillMode:[f.undefined,f.solid,f.flat,f.outline,f.clear,f.link],themeColor:[o.undefined,o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info,o.inverse]},j={showArrow:!1,arrowIconName:"chevron-down"},s=t=>{let{as:e="button",size:n,rounded:a,fillMode:i,themeColor:u,showArrow:l=j.showArrow,arrowIconName:d=j.arrowIconName,variant:g,hover:x,focus:O,active:m,selected:S,disabled:E,togglable:A,ariaDisabled:y,icon:k,text:T,iconClassName:Be,className:Oe,...Me}=t,Se=k!==void 0,Ee=t.children!==void 0;return be(e,{className:p(Oe,H,ae(H,g),b(H,{size:n,rounded:a,fillMode:i,themeColor:u}),re(H,{hover:x,focus:O,active:m,disabled:E||y,selected:S}),{"k-icon-button":!T&&!Ee&&Se}),...Me,"aria-pressed":A?S?"true":"false":void 0,"aria-disabled":y?"true":void 0,disabled:E||void 0,children:[k&&z(N,{className:p(Be,"k-button-icon"),icon:k}),T?be(Qe,{children:[T&&z("span",{className:"k-button-text",children:T}),t.children]}):t.children&&z("span",{className:"k-button-text",children:t.children}),l&&z("span",{className:"k-menu-button-arrow k-button-arrow",children:z(N,{icon:d})})]})};s.states=qe;s.options=We;s.variants=Je;s.className=H;s.defaultOptions=j;s.moduleName=Z;s.folderName=xe;s.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 Ye}from"react/jsx-runtime";var F=t=>Ye(s,{icon:"folder",...t,"aria-label":t["aria-label"]||"Folder",children:void 0});import{jsx as Ze}from"react/jsx-runtime";var he=t=>Ze(s,{icon:"folder",children:"Button",...t});import{jsx as je}from"react/jsx-runtime";var ge=t=>je(s,{children:"Button",...t});import{jsx as ee}from"react/jsx-runtime";var et=s.options,tt=s.states,ot={...s.defaultOptions,variant:"text"},nt=[{name:"icon-only",title:"Icon Only"},{name:"icon-and-text",title:"Icon & Text"},{name:"text",title:"Text"}],rt=[],C=t=>{let{variant:e,...n}=t;switch(e){case"icon-only":return ee(F,{...n,icon:"star"});case"icon-and-text":return ee(he,{...n,icon:"star",children:"Button"});default:return ee(ge,{...n,children:"Button"})}};C.options=et;C.states=tt;C.variants=nt;C.defaultOptions=ot;C.modifiers=rt;C.className=s.className;var te="speech-to-text-button",Te=te;import{jsx as at}from"react/jsx-runtime";var Ne="k-speech-to-text-button",ve={icon:"microphone"},c=t=>{let{listening:e=!1,icon:n=ve.icon,...a}=t;return at(s,{...a,icon:e?"stop":n,className:p(t.className,Ne,{"k-listening":e}),"aria-pressed":e?"true":"false","aria-label":e?"Stop listening":"Start listening"})};c.states=s.states;c.options=s.options;c.className=Ne;c.defaultOptions=ve;c.moduleName=te;c.folderName=Te;c.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 zo}from"react/jsx-runtime";import{jsx as Uo}from"react/jsx-runtime";import{jsx as ut}from"react/jsx-runtime";var st=s.states,ke={...s.defaultOptions,variant:"normal"},it={...s.options,fillMode:s.options.fillMode.filter(t=>t!=="clear"&&t!=="link")},lt=[],pt=[{name:"normal",title:"Normal"},{name:"listening",title:"Listening"}],I=t=>{let{variant:e,...n}={...ke,...t},a={};return e==="listening"&&(a.listening=!0),ut(c,{...n,...a})};I.options=it;I.states=st;I.variants=pt;I.defaultOptions=ke;I.modifiers=lt;I.className=c.className;import{jsx as _,jsxs as oe}from"react/jsx-runtime";var v="k-prompt-box",ct=[h.hover,h.focus,h.disabled],dt={fillMode:[f.undefined,f.solid,f.flat,f.outline]},ne={lineMode:"auto",isExpanded:!1},B=t=>{let{fillMode:e,lineMode:n=ne.lineMode,startAffix:a,endAffix:i,header:u,isExpanded:l=ne.isExpanded,className:d,children:g,value:x,placeholder:O,generating:m,hover:S,focus:E,disabled:A,...y}=t,k=n==="multi"||n==="auto"&&l;return oe("div",{...y,className:p(d,"k-input",v,{[`${v}-singleline`]:n==="single",[`${v}-multiline`]:k,[`k-input-${e}`]:e,"k-hover":S,"k-focus":E,"k-disabled":A}),children:[u&&_("div",{className:`${v}-header`,children:u}),oe("div",{className:`${v}-content`,children:[a&&_("div",{className:`${v}-affix`,children:a}),n==="single"?_(P,{value:x,placeholder:O,className:`${v}-input`,type:"text","aria-label":"Prompt input"}):_(L,{value:x,placeholder:O,className:`${v}-textarea`,rows:n==="multi"||l?3:1,"aria-label":"Prompt input","aria-multiline":"true"}),oe("div",{className:`${v}-affix`,children:[i,_(c,{size:"small",fillMode:"flat",rounded:"full"}),_(F,{icon:m?"stop":"arrow-up",size:"small",rounded:"full",active:m,disabled:!x&&!m,className:p({"k-generating":m}),"aria-label":m?"Stop generating":"Send prompt","aria-live":"polite"})]})]}),g]})};B.states=ct;B.options=dt;B.className=v;B.defaultOptions=ne;B.moduleName=G;B.folderName=ie;B.ariaSpec={selector:".k-prompt-box",rules:[{selector:".k-prompt-box-singleline .k-prompt-box-input",attribute:"nodeName=input",usage:"Ensures the input field has the proper textbox role."},{selector:".k-prompt-box-singleline .k-prompt-box-input",attribute:"aria-label",usage:"Provides an accessible label for the single-line input."},{selector:".k-prompt-box-multiline .k-prompt-box-textarea",attribute:"nodeName=textarea",usage:"Ensures the textarea has the proper textbox role."},{selector:".k-prompt-box-multiline .k-prompt-box-textarea",attribute:"aria-label",usage:"Provides an accessible label for the textarea."},{selector:".k-prompt-box-multiline .k-prompt-box-textarea",attribute:"aria-multiline=true",usage:"Indicates the textarea supports multiple lines of text."},{selector:".k-prompt-box:not(.k-prompt-box-singleline):not(.k-prompt-box-multiline) .k-prompt-box-textarea",attribute:"nodeName=textarea",usage:"Ensures the auto-mode textarea has the proper textbox role."},{selector:".k-prompt-box:not(.k-prompt-box-singleline):not(.k-prompt-box-multiline) .k-prompt-box-textarea",attribute:"aria-label",usage:"Provides an accessible label for the auto-mode textarea."},{selector:".k-prompt-box:not(.k-prompt-box-singleline):not(.k-prompt-box-multiline) .k-prompt-box-textarea",attribute:"aria-multiline=true",usage:"Indicates the auto-mode textarea supports multiple lines of text."},{selector:".k-prompt-box-affix .k-button:not(.k-speech-to-text-button)",attribute:"aria-label",usage:"The send/stop button is labelled to indicate its current action."},{selector:".k-prompt-box-affix .k-button:not(.k-speech-to-text-button)",attribute:"aria-live=polite",usage:"Announces the change in status of the send/stop button."}]};var ye=B;import{jsx as mt}from"react/jsx-runtime";var un=t=>mt(ye,{...t,lineMode:"auto"});export{un as PromptBoxLineModeAuto};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var p=(...t)=>t.filter(e=>e!==!0&&!!e).map(e=>Array.isArray(e)?p(...e):typeof e=="object"?Object.keys(e).map((n,a)=>e[a]||e[n]&&n||null).filter(n=>n!==null).join(" "):e).filter(e=>!!e).join(" ");var b=(t,e)=>p({[`${t}-xs`]:e.size==="xsmall",[`${t}-sm`]:e.size==="small",[`${t}-md`]:e.size==="medium",[`${t}-lg`]:e.size==="large",[`${t}-xl`]:e.size==="xlarge",[`${t}-xxl`]:e.size==="xxlarge",[`${t}-xxxl`]:e.size==="xxxlarge"},{[`${t}-${e.fillMode}`]:e.fillMode},{[`${t}-${e.themeColor}`]:e.themeColor},{"k-rounded-sm":e.rounded==="small","k-rounded-md":e.rounded==="medium","k-rounded-lg":e.rounded==="large","k-rounded-full":e.rounded==="full","k-rounded-none":e.rounded==="none"}),re=(t,e)=>{let{valid:n,invalid:a,hover:i,focus:u,checked:l,active:d,selected:g,disabled:x,indeterminate:O,loading:m,empty:S,readonly:E,highlighted:A,...y}=e;return p({"k-valid":n,"k-invalid":a,"k-hover":i,"k-focus":u,"k-checked":l,"k-active":d,"k-selected":g,"k-disabled":x,"k-indeterminate":O&&!l,"k-loading":m,"k-empty":S,"k-readonly":E,"k-highlighted":A},Object.keys(y).reduce((k,T)=>(T.startsWith("k-")?k[T]=y[T]:k[`k-${T}`]=y[T],k),{}))};function ae(t,e){if(!e)return{};let n=Array.isArray(e)?e:[e];return Object.fromEntries(n.map(a=>[`k-${a}`,!0]))}var r={undefined:void 0,xsmall:"xsmall",small:"small",medium:"medium",large:"large",xlarge:"xlarge",xxlarge:"xxlarge",xxxlarge:"xxxlarge"},M={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"},o={undefined:void 0,inherit:"inherit",base:"base",primary:"primary",secondary:"secondary",tertiary:"tertiary",info:"info",success:"success",warning:"warning",error:"error",inverse:"inverse"},h={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"};import{jsx as _e}from"react/jsx-runtime";var X="k-input-inner",Ce=[],Ie={},$={type:"text",autocomplete:"off",value:"",placeholder:""},P=t=>{let{value:e=$.value,type:n=$.type,placeholder:a=$.placeholder,autocomplete:i=$.autocomplete,disabled:u,readOnly:l,...d}=t;return _e("input",{...d,type:n,className:p(t.className,X,b(X,t)),placeholder:a,autoComplete:i,defaultValue:e,disabled:u||void 0,readOnly:l||void 0})};P.states=Ce;P.options=Ie;P.className=X;import{jsx as Le}from"react/jsx-runtime";var V="k-input-inner",Ae=[],Pe={},se={value:"",placeholder:""},L=t=>{let{value:e=se.value,placeholder:n=se.placeholder,rows:a,disabled:i,...u}=t;return Le("textarea",{...u,className:p(t.className,V,b(V,t)),placeholder:n,rows:a,defaultValue:e,disabled:i||void 0})};L.states=Ae;L.options=Pe;L.className=V;var G="prompt-box",ie=G;import{Fragment as ze,jsx as le}from"react/jsx-runtime";var J="k-font-icon",we=[],Ke={size:[r.undefined,r.xsmall,r.small,r.medium,r.large,r.xlarge,r.xxlarge,r.xxxlarge],themeColor:[o.undefined,o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info]},Re={},w=t=>{let{size:e,themeColor:n,icon:a,rotate:i,flip:u,...l}=t;return a?le("span",{...l,className:p(t.className,J,b(J,{size:e}),{[`k-i-${a}`]:a,[`k-color-${n}`]:n,[`k-rotate-${i}`]:i,"k-flip-h":u==="h"||u==="both","k-flip-v":u==="v"||u==="both"}),"aria-hidden":"true"}):le(ze,{})};w.states=we;w.options=Ke;w.className=J;w.defaultOptions=Re;var pe=w;import{Fragment as De,jsx as D}from"react/jsx-runtime";var q="k-svg-icon",He=[],$e={size:[r.undefined,r.xsmall,r.small,r.medium,r.large,r.xlarge,r.xxlarge,r.xxxlarge],themeColor:[o.undefined,o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info]},ue={viewBox:"0 0 24 24"},K=t=>{let{size:e,themeColor:n,rotate:a,flip:i,viewBox:u=ue.viewBox,icon:l,...d}=t;if(!l)return D(De,{});if(l==="none")return D("span",{...d,className:p(t.className,q,b("k-icon",{size:e}),"k-none"),"aria-hidden":"true"});let g=typeof l=="object"&&l.name&&l.name;return D("span",{...d,className:p(t.className,q,b("k-icon",{size:e}),{[`k-svg-i-${g}`]:g,[`k-color-${n}`]:n,[`k-rotate-${a}`]:a,"k-flip-h":i==="h"||i==="both","k-flip-v":i==="v"||i==="both"}),"aria-hidden":"true",children:D("svg",{"aria-hidden":!0,focusable:!1,xmlns:"http://www.w3.org/2000/svg",viewBox:typeof l=="object"?l.viewBox:u,dangerouslySetInnerHTML:typeof l=="object"?{__html:l.content}:void 0,children:l?void 0:t.children})})};K.states=He;K.options=$e;K.className=q;K.defaultOptions=ue;var W=K;import*as Q from"@progress/kendo-svg-icons";var ce="icon",de="icons";import{useContext as Fe}from"react";import{createContext as Ue}from"react";var me=Ue({iconsType:"svg"});import{Fragment as fe,jsx as R}from"react/jsx-runtime";var U="k-icon",Xe=t=>t.replace(/([-_][a-z0-9])/gi,e=>e.toUpperCase().replace("-","").replace("_","")),Ve=[],Ge={size:[r.undefined,r.xsmall,r.small,r.medium,r.large,r.xlarge,r.xxlarge,r.xxxlarge],themeColor:[o.undefined,o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info]},Y={viewBox:"0 0 24 24",type:"svg"},N=t=>{let{iconsType:e}=Fe(me),{size:n,themeColor:a,icon:i,type:u=e||Y.type,rotate:l,flip:d,viewBox:g=Y.viewBox,...x}=t;if(!i)return R(fe,{});if((e||u)==="svg"){if(i==="none")return R(W,{...x,className:p(t.className,U),icon:i,size:n});let m=Q[i]?i:Xe(`${i}-icon`);return Q[m]?R(W,{...x,className:p(t.className,U),icon:Q[m],size:n,themeColor:a,rotate:l,flip:d,viewBox:g}):R(fe,{})}return R(pe,{...x,className:p(t.className,U),icon:i,size:n,themeColor:a,rotate:l,flip:d})};N.states=Ve;N.options=Ge;N.defaultOptions=Y;N.className=U;N.moduleName=ce;N.folderName=de;N.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 Z="button",xe=Z;import{Fragment as Qe,jsx as z,jsxs as be}from"react/jsx-runtime";var H="k-button",Je=["icon-button"],qe=[h.hover,h.focus,h.active,h.selected,h.disabled,h.generating],We={size:[r.undefined,r.xsmall,r.small,r.medium,r.large],rounded:[M.undefined,M.none,M.small,M.medium,M.large,M.full],fillMode:[f.undefined,f.solid,f.flat,f.outline,f.clear,f.link],themeColor:[o.undefined,o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info,o.inverse]},j={showArrow:!1,arrowIconName:"chevron-down"},s=t=>{let{as:e="button",size:n,rounded:a,fillMode:i,themeColor:u,showArrow:l=j.showArrow,arrowIconName:d=j.arrowIconName,variant:g,hover:x,focus:O,active:m,selected:S,disabled:E,togglable:A,ariaDisabled:y,icon:k,text:T,iconClassName:Be,className:Oe,...Me}=t,Se=k!==void 0,Ee=t.children!==void 0;return be(e,{className:p(Oe,H,ae(H,g),b(H,{size:n,rounded:a,fillMode:i,themeColor:u}),re(H,{hover:x,focus:O,active:m,disabled:E||y,selected:S}),{"k-icon-button":!T&&!Ee&&Se}),...Me,"aria-pressed":A?S?"true":"false":void 0,"aria-disabled":y?"true":void 0,disabled:E||void 0,children:[k&&z(N,{className:p(Be,"k-button-icon"),icon:k}),T?be(Qe,{children:[T&&z("span",{className:"k-button-text",children:T}),t.children]}):t.children&&z("span",{className:"k-button-text",children:t.children}),l&&z("span",{className:"k-menu-button-arrow k-button-arrow",children:z(N,{icon:d})})]})};s.states=qe;s.options=We;s.variants=Je;s.className=H;s.defaultOptions=j;s.moduleName=Z;s.folderName=xe;s.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 Ye}from"react/jsx-runtime";var F=t=>Ye(s,{icon:"folder",...t,"aria-label":t["aria-label"]||"Folder",children:void 0});import{jsx as Ze}from"react/jsx-runtime";var he=t=>Ze(s,{icon:"folder",children:"Button",...t});import{jsx as je}from"react/jsx-runtime";var ge=t=>je(s,{children:"Button",...t});import{jsx as ee}from"react/jsx-runtime";var et=s.options,tt=s.states,ot={...s.defaultOptions,variant:"text"},nt=[{name:"icon-only",title:"Icon Only"},{name:"icon-and-text",title:"Icon & Text"},{name:"text",title:"Text"}],rt=[],C=t=>{let{variant:e,...n}=t;switch(e){case"icon-only":return ee(F,{...n,icon:"star"});case"icon-and-text":return ee(he,{...n,icon:"star",children:"Button"});default:return ee(ge,{...n,children:"Button"})}};C.options=et;C.states=tt;C.variants=nt;C.defaultOptions=ot;C.modifiers=rt;C.className=s.className;var te="speech-to-text-button",Te=te;import{jsx as at}from"react/jsx-runtime";var Ne="k-speech-to-text-button",ve={icon:"microphone-outline"},c=t=>{let{listening:e=!1,icon:n=ve.icon,...a}=t;return at(s,{...a,icon:e?"stop-sm":n,className:p(t.className,Ne,{"k-listening":e}),"aria-pressed":e?"true":"false","aria-label":e?"Stop listening":"Start listening"})};c.states=s.states;c.options=s.options;c.className=Ne;c.defaultOptions=ve;c.moduleName=te;c.folderName=Te;c.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 zo}from"react/jsx-runtime";import{jsx as Uo}from"react/jsx-runtime";import{jsx as ut}from"react/jsx-runtime";var st=s.states,ke={...s.defaultOptions,variant:"normal"},it={...s.options,fillMode:s.options.fillMode.filter(t=>t!=="clear"&&t!=="link")},lt=[],pt=[{name:"normal",title:"Normal"},{name:"listening",title:"Listening"}],I=t=>{let{variant:e,...n}={...ke,...t},a={};return e==="listening"&&(a.listening=!0),ut(c,{...n,...a})};I.options=it;I.states=st;I.variants=pt;I.defaultOptions=ke;I.modifiers=lt;I.className=c.className;import{jsx as _,jsxs as oe}from"react/jsx-runtime";var v="k-prompt-box",ct=[h.hover,h.focus,h.disabled],dt={fillMode:[f.undefined,f.solid,f.flat,f.outline]},ne={lineMode:"auto",isExpanded:!1},B=t=>{let{fillMode:e,lineMode:n=ne.lineMode,startAffix:a,endAffix:i,header:u,isExpanded:l=ne.isExpanded,className:d,children:g,value:x,placeholder:O,generating:m,hover:S,focus:E,disabled:A,...y}=t,k=n==="multi"||n==="auto"&&l;return oe("div",{...y,className:p(d,"k-input",v,{[`${v}-singleline`]:n==="single",[`${v}-multiline`]:k,[`k-input-${e}`]:e,"k-hover":S,"k-focus":E,"k-disabled":A}),children:[u&&_("div",{className:`${v}-header`,children:u}),oe("div",{className:`${v}-content`,children:[a&&_("div",{className:`${v}-affix`,children:a}),n==="single"?_(P,{value:x,placeholder:O,className:`${v}-input`,type:"text","aria-label":"Prompt input"}):_(L,{value:x,placeholder:O,className:`${v}-textarea`,rows:n==="multi"||l?3:1,"aria-label":"Prompt input","aria-multiline":"true"}),oe("div",{className:`${v}-affix`,children:[i,_(c,{size:"small",fillMode:"flat",rounded:"full"}),_(F,{icon:m?"stop-sm":"arrow-up-outline",size:"small",rounded:"full",active:m,disabled:!x&&!m,className:p({"k-generating":m}),"aria-label":m?"Stop generating":"Send prompt","aria-live":"polite"})]})]}),g]})};B.states=ct;B.options=dt;B.className=v;B.defaultOptions=ne;B.moduleName=G;B.folderName=ie;B.ariaSpec={selector:".k-prompt-box",rules:[{selector:".k-prompt-box-singleline .k-prompt-box-input",attribute:"nodeName=input",usage:"Ensures the input field has the proper textbox role."},{selector:".k-prompt-box-singleline .k-prompt-box-input",attribute:"aria-label",usage:"Provides an accessible label for the single-line input."},{selector:".k-prompt-box-multiline .k-prompt-box-textarea",attribute:"nodeName=textarea",usage:"Ensures the textarea has the proper textbox role."},{selector:".k-prompt-box-multiline .k-prompt-box-textarea",attribute:"aria-label",usage:"Provides an accessible label for the textarea."},{selector:".k-prompt-box-multiline .k-prompt-box-textarea",attribute:"aria-multiline=true",usage:"Indicates the textarea supports multiple lines of text."},{selector:".k-prompt-box:not(.k-prompt-box-singleline):not(.k-prompt-box-multiline) .k-prompt-box-textarea",attribute:"nodeName=textarea",usage:"Ensures the auto-mode textarea has the proper textbox role."},{selector:".k-prompt-box:not(.k-prompt-box-singleline):not(.k-prompt-box-multiline) .k-prompt-box-textarea",attribute:"aria-label",usage:"Provides an accessible label for the auto-mode textarea."},{selector:".k-prompt-box:not(.k-prompt-box-singleline):not(.k-prompt-box-multiline) .k-prompt-box-textarea",attribute:"aria-multiline=true",usage:"Indicates the auto-mode textarea supports multiple lines of text."},{selector:".k-prompt-box-affix .k-button:not(.k-speech-to-text-button)",attribute:"aria-label",usage:"The send/stop button is labelled to indicate its current action."},{selector:".k-prompt-box-affix .k-button:not(.k-speech-to-text-button)",attribute:"aria-live=polite",usage:"Announces the change in status of the send/stop button."}]};var ye=B;import{jsx as mt}from"react/jsx-runtime";var un=t=>mt(ye,{...t,lineMode:"multi"});export{un as PromptBoxLineModeMulti};
|
|
1
|
+
var p=(...t)=>t.filter(e=>e!==!0&&!!e).map(e=>Array.isArray(e)?p(...e):typeof e=="object"?Object.keys(e).map((n,a)=>e[a]||e[n]&&n||null).filter(n=>n!==null).join(" "):e).filter(e=>!!e).join(" ");var b=(t,e)=>p({[`${t}-xs`]:e.size==="xsmall",[`${t}-sm`]:e.size==="small",[`${t}-md`]:e.size==="medium",[`${t}-lg`]:e.size==="large",[`${t}-xl`]:e.size==="xlarge",[`${t}-xxl`]:e.size==="xxlarge",[`${t}-xxxl`]:e.size==="xxxlarge"},{[`${t}-${e.fillMode}`]:e.fillMode},{[`${t}-${e.themeColor}`]:e.themeColor},{"k-rounded-sm":e.rounded==="small","k-rounded-md":e.rounded==="medium","k-rounded-lg":e.rounded==="large","k-rounded-full":e.rounded==="full","k-rounded-none":e.rounded==="none"}),re=(t,e)=>{let{valid:n,invalid:a,hover:i,focus:u,checked:l,active:d,selected:g,disabled:x,indeterminate:O,loading:m,empty:S,readonly:E,highlighted:A,...y}=e;return p({"k-valid":n,"k-invalid":a,"k-hover":i,"k-focus":u,"k-checked":l,"k-active":d,"k-selected":g,"k-disabled":x,"k-indeterminate":O&&!l,"k-loading":m,"k-empty":S,"k-readonly":E,"k-highlighted":A},Object.keys(y).reduce((k,T)=>(T.startsWith("k-")?k[T]=y[T]:k[`k-${T}`]=y[T],k),{}))};function ae(t,e){if(!e)return{};let n=Array.isArray(e)?e:[e];return Object.fromEntries(n.map(a=>[`k-${a}`,!0]))}var r={undefined:void 0,xsmall:"xsmall",small:"small",medium:"medium",large:"large",xlarge:"xlarge",xxlarge:"xxlarge",xxxlarge:"xxxlarge"},M={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"},o={undefined:void 0,inherit:"inherit",base:"base",primary:"primary",secondary:"secondary",tertiary:"tertiary",info:"info",success:"success",warning:"warning",error:"error",inverse:"inverse"},h={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"};import{jsx as _e}from"react/jsx-runtime";var X="k-input-inner",Ce=[],Ie={},$={type:"text",autocomplete:"off",value:"",placeholder:""},P=t=>{let{value:e=$.value,type:n=$.type,placeholder:a=$.placeholder,autocomplete:i=$.autocomplete,disabled:u,readOnly:l,...d}=t;return _e("input",{...d,type:n,className:p(t.className,X,b(X,t)),placeholder:a,autoComplete:i,defaultValue:e,disabled:u||void 0,readOnly:l||void 0})};P.states=Ce;P.options=Ie;P.className=X;import{jsx as Le}from"react/jsx-runtime";var V="k-input-inner",Ae=[],Pe={},se={value:"",placeholder:""},L=t=>{let{value:e=se.value,placeholder:n=se.placeholder,rows:a,disabled:i,...u}=t;return Le("textarea",{...u,className:p(t.className,V,b(V,t)),placeholder:n,rows:a,defaultValue:e,disabled:i||void 0})};L.states=Ae;L.options=Pe;L.className=V;var G="prompt-box",ie=G;import{Fragment as ze,jsx as le}from"react/jsx-runtime";var J="k-font-icon",we=[],Ke={size:[r.undefined,r.xsmall,r.small,r.medium,r.large,r.xlarge,r.xxlarge,r.xxxlarge],themeColor:[o.undefined,o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info]},Re={},w=t=>{let{size:e,themeColor:n,icon:a,rotate:i,flip:u,...l}=t;return a?le("span",{...l,className:p(t.className,J,b(J,{size:e}),{[`k-i-${a}`]:a,[`k-color-${n}`]:n,[`k-rotate-${i}`]:i,"k-flip-h":u==="h"||u==="both","k-flip-v":u==="v"||u==="both"}),"aria-hidden":"true"}):le(ze,{})};w.states=we;w.options=Ke;w.className=J;w.defaultOptions=Re;var pe=w;import{Fragment as De,jsx as D}from"react/jsx-runtime";var q="k-svg-icon",He=[],$e={size:[r.undefined,r.xsmall,r.small,r.medium,r.large,r.xlarge,r.xxlarge,r.xxxlarge],themeColor:[o.undefined,o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info]},ue={viewBox:"0 0 24 24"},K=t=>{let{size:e,themeColor:n,rotate:a,flip:i,viewBox:u=ue.viewBox,icon:l,...d}=t;if(!l)return D(De,{});if(l==="none")return D("span",{...d,className:p(t.className,q,b("k-icon",{size:e}),"k-none"),"aria-hidden":"true"});let g=typeof l=="object"&&l.name&&l.name;return D("span",{...d,className:p(t.className,q,b("k-icon",{size:e}),{[`k-svg-i-${g}`]:g,[`k-color-${n}`]:n,[`k-rotate-${a}`]:a,"k-flip-h":i==="h"||i==="both","k-flip-v":i==="v"||i==="both"}),"aria-hidden":"true",children:D("svg",{"aria-hidden":!0,focusable:!1,xmlns:"http://www.w3.org/2000/svg",viewBox:typeof l=="object"?l.viewBox:u,dangerouslySetInnerHTML:typeof l=="object"?{__html:l.content}:void 0,children:l?void 0:t.children})})};K.states=He;K.options=$e;K.className=q;K.defaultOptions=ue;var W=K;import*as Q from"@progress/kendo-svg-icons";var ce="icon",de="icons";import{useContext as Fe}from"react";import{createContext as Ue}from"react";var me=Ue({iconsType:"svg"});import{Fragment as fe,jsx as R}from"react/jsx-runtime";var U="k-icon",Xe=t=>t.replace(/([-_][a-z0-9])/gi,e=>e.toUpperCase().replace("-","").replace("_","")),Ve=[],Ge={size:[r.undefined,r.xsmall,r.small,r.medium,r.large,r.xlarge,r.xxlarge,r.xxxlarge],themeColor:[o.undefined,o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info]},Y={viewBox:"0 0 24 24",type:"svg"},N=t=>{let{iconsType:e}=Fe(me),{size:n,themeColor:a,icon:i,type:u=e||Y.type,rotate:l,flip:d,viewBox:g=Y.viewBox,...x}=t;if(!i)return R(fe,{});if((e||u)==="svg"){if(i==="none")return R(W,{...x,className:p(t.className,U),icon:i,size:n});let m=Q[i]?i:Xe(`${i}-icon`);return Q[m]?R(W,{...x,className:p(t.className,U),icon:Q[m],size:n,themeColor:a,rotate:l,flip:d,viewBox:g}):R(fe,{})}return R(pe,{...x,className:p(t.className,U),icon:i,size:n,themeColor:a,rotate:l,flip:d})};N.states=Ve;N.options=Ge;N.defaultOptions=Y;N.className=U;N.moduleName=ce;N.folderName=de;N.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 Z="button",xe=Z;import{Fragment as Qe,jsx as z,jsxs as be}from"react/jsx-runtime";var H="k-button",Je=["icon-button"],qe=[h.hover,h.focus,h.active,h.selected,h.disabled,h.generating],We={size:[r.undefined,r.xsmall,r.small,r.medium,r.large],rounded:[M.undefined,M.none,M.small,M.medium,M.large,M.full],fillMode:[f.undefined,f.solid,f.flat,f.outline,f.clear,f.link],themeColor:[o.undefined,o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info,o.inverse]},j={showArrow:!1,arrowIconName:"chevron-down"},s=t=>{let{as:e="button",size:n,rounded:a,fillMode:i,themeColor:u,showArrow:l=j.showArrow,arrowIconName:d=j.arrowIconName,variant:g,hover:x,focus:O,active:m,selected:S,disabled:E,togglable:A,ariaDisabled:y,icon:k,text:T,iconClassName:Be,className:Oe,...Me}=t,Se=k!==void 0,Ee=t.children!==void 0;return be(e,{className:p(Oe,H,ae(H,g),b(H,{size:n,rounded:a,fillMode:i,themeColor:u}),re(H,{hover:x,focus:O,active:m,disabled:E||y,selected:S}),{"k-icon-button":!T&&!Ee&&Se}),...Me,"aria-pressed":A?S?"true":"false":void 0,"aria-disabled":y?"true":void 0,disabled:E||void 0,children:[k&&z(N,{className:p(Be,"k-button-icon"),icon:k}),T?be(Qe,{children:[T&&z("span",{className:"k-button-text",children:T}),t.children]}):t.children&&z("span",{className:"k-button-text",children:t.children}),l&&z("span",{className:"k-menu-button-arrow k-button-arrow",children:z(N,{icon:d})})]})};s.states=qe;s.options=We;s.variants=Je;s.className=H;s.defaultOptions=j;s.moduleName=Z;s.folderName=xe;s.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 Ye}from"react/jsx-runtime";var F=t=>Ye(s,{icon:"folder",...t,"aria-label":t["aria-label"]||"Folder",children:void 0});import{jsx as Ze}from"react/jsx-runtime";var he=t=>Ze(s,{icon:"folder",children:"Button",...t});import{jsx as je}from"react/jsx-runtime";var ge=t=>je(s,{children:"Button",...t});import{jsx as ee}from"react/jsx-runtime";var et=s.options,tt=s.states,ot={...s.defaultOptions,variant:"text"},nt=[{name:"icon-only",title:"Icon Only"},{name:"icon-and-text",title:"Icon & Text"},{name:"text",title:"Text"}],rt=[],C=t=>{let{variant:e,...n}=t;switch(e){case"icon-only":return ee(F,{...n,icon:"star"});case"icon-and-text":return ee(he,{...n,icon:"star",children:"Button"});default:return ee(ge,{...n,children:"Button"})}};C.options=et;C.states=tt;C.variants=nt;C.defaultOptions=ot;C.modifiers=rt;C.className=s.className;var te="speech-to-text-button",Te=te;import{jsx as at}from"react/jsx-runtime";var Ne="k-speech-to-text-button",ve={icon:"microphone"},c=t=>{let{listening:e=!1,icon:n=ve.icon,...a}=t;return at(s,{...a,icon:e?"stop":n,className:p(t.className,Ne,{"k-listening":e}),"aria-pressed":e?"true":"false","aria-label":e?"Stop listening":"Start listening"})};c.states=s.states;c.options=s.options;c.className=Ne;c.defaultOptions=ve;c.moduleName=te;c.folderName=Te;c.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 zo}from"react/jsx-runtime";import{jsx as Uo}from"react/jsx-runtime";import{jsx as ut}from"react/jsx-runtime";var st=s.states,ke={...s.defaultOptions,variant:"normal"},it={...s.options,fillMode:s.options.fillMode.filter(t=>t!=="clear"&&t!=="link")},lt=[],pt=[{name:"normal",title:"Normal"},{name:"listening",title:"Listening"}],I=t=>{let{variant:e,...n}={...ke,...t},a={};return e==="listening"&&(a.listening=!0),ut(c,{...n,...a})};I.options=it;I.states=st;I.variants=pt;I.defaultOptions=ke;I.modifiers=lt;I.className=c.className;import{jsx as _,jsxs as oe}from"react/jsx-runtime";var v="k-prompt-box",ct=[h.hover,h.focus,h.disabled],dt={fillMode:[f.undefined,f.solid,f.flat,f.outline]},ne={lineMode:"auto",isExpanded:!1},B=t=>{let{fillMode:e,lineMode:n=ne.lineMode,startAffix:a,endAffix:i,header:u,isExpanded:l=ne.isExpanded,className:d,children:g,value:x,placeholder:O,generating:m,hover:S,focus:E,disabled:A,...y}=t,k=n==="multi"||n==="auto"&&l;return oe("div",{...y,className:p(d,"k-input",v,{[`${v}-singleline`]:n==="single",[`${v}-multiline`]:k,[`k-input-${e}`]:e,"k-hover":S,"k-focus":E,"k-disabled":A}),children:[u&&_("div",{className:`${v}-header`,children:u}),oe("div",{className:`${v}-content`,children:[a&&_("div",{className:`${v}-affix`,children:a}),n==="single"?_(P,{value:x,placeholder:O,className:`${v}-input`,type:"text","aria-label":"Prompt input"}):_(L,{value:x,placeholder:O,className:`${v}-textarea`,rows:n==="multi"||l?3:1,"aria-label":"Prompt input","aria-multiline":"true"}),oe("div",{className:`${v}-affix`,children:[i,_(c,{size:"small",fillMode:"flat",rounded:"full"}),_(F,{icon:m?"stop":"arrow-up",size:"small",rounded:"full",active:m,disabled:!x&&!m,className:p({"k-generating":m}),"aria-label":m?"Stop generating":"Send prompt","aria-live":"polite"})]})]}),g]})};B.states=ct;B.options=dt;B.className=v;B.defaultOptions=ne;B.moduleName=G;B.folderName=ie;B.ariaSpec={selector:".k-prompt-box",rules:[{selector:".k-prompt-box-singleline .k-prompt-box-input",attribute:"nodeName=input",usage:"Ensures the input field has the proper textbox role."},{selector:".k-prompt-box-singleline .k-prompt-box-input",attribute:"aria-label",usage:"Provides an accessible label for the single-line input."},{selector:".k-prompt-box-multiline .k-prompt-box-textarea",attribute:"nodeName=textarea",usage:"Ensures the textarea has the proper textbox role."},{selector:".k-prompt-box-multiline .k-prompt-box-textarea",attribute:"aria-label",usage:"Provides an accessible label for the textarea."},{selector:".k-prompt-box-multiline .k-prompt-box-textarea",attribute:"aria-multiline=true",usage:"Indicates the textarea supports multiple lines of text."},{selector:".k-prompt-box:not(.k-prompt-box-singleline):not(.k-prompt-box-multiline) .k-prompt-box-textarea",attribute:"nodeName=textarea",usage:"Ensures the auto-mode textarea has the proper textbox role."},{selector:".k-prompt-box:not(.k-prompt-box-singleline):not(.k-prompt-box-multiline) .k-prompt-box-textarea",attribute:"aria-label",usage:"Provides an accessible label for the auto-mode textarea."},{selector:".k-prompt-box:not(.k-prompt-box-singleline):not(.k-prompt-box-multiline) .k-prompt-box-textarea",attribute:"aria-multiline=true",usage:"Indicates the auto-mode textarea supports multiple lines of text."},{selector:".k-prompt-box-affix .k-button:not(.k-speech-to-text-button)",attribute:"aria-label",usage:"The send/stop button is labelled to indicate its current action."},{selector:".k-prompt-box-affix .k-button:not(.k-speech-to-text-button)",attribute:"aria-live=polite",usage:"Announces the change in status of the send/stop button."}]};var ye=B;import{jsx as mt}from"react/jsx-runtime";var un=t=>mt(ye,{...t,lineMode:"multi"});export{un as PromptBoxLineModeMulti};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var p=(...t)=>t.filter(e=>e!==!0&&!!e).map(e=>Array.isArray(e)?p(...e):typeof e=="object"?Object.keys(e).map((n,a)=>e[a]||e[n]&&n||null).filter(n=>n!==null).join(" "):e).filter(e=>!!e).join(" ");var b=(t,e)=>p({[`${t}-xs`]:e.size==="xsmall",[`${t}-sm`]:e.size==="small",[`${t}-md`]:e.size==="medium",[`${t}-lg`]:e.size==="large",[`${t}-xl`]:e.size==="xlarge",[`${t}-xxl`]:e.size==="xxlarge",[`${t}-xxxl`]:e.size==="xxxlarge"},{[`${t}-${e.fillMode}`]:e.fillMode},{[`${t}-${e.themeColor}`]:e.themeColor},{"k-rounded-sm":e.rounded==="small","k-rounded-md":e.rounded==="medium","k-rounded-lg":e.rounded==="large","k-rounded-full":e.rounded==="full","k-rounded-none":e.rounded==="none"}),re=(t,e)=>{let{valid:n,invalid:a,hover:i,focus:u,checked:l,active:d,selected:g,disabled:x,indeterminate:O,loading:m,empty:S,readonly:E,highlighted:A,...y}=e;return p({"k-valid":n,"k-invalid":a,"k-hover":i,"k-focus":u,"k-checked":l,"k-active":d,"k-selected":g,"k-disabled":x,"k-indeterminate":O&&!l,"k-loading":m,"k-empty":S,"k-readonly":E,"k-highlighted":A},Object.keys(y).reduce((k,T)=>(T.startsWith("k-")?k[T]=y[T]:k[`k-${T}`]=y[T],k),{}))};function ae(t,e){if(!e)return{};let n=Array.isArray(e)?e:[e];return Object.fromEntries(n.map(a=>[`k-${a}`,!0]))}var r={undefined:void 0,xsmall:"xsmall",small:"small",medium:"medium",large:"large",xlarge:"xlarge",xxlarge:"xxlarge",xxxlarge:"xxxlarge"},M={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"},o={undefined:void 0,inherit:"inherit",base:"base",primary:"primary",secondary:"secondary",tertiary:"tertiary",info:"info",success:"success",warning:"warning",error:"error",inverse:"inverse"},h={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"};import{jsx as _e}from"react/jsx-runtime";var X="k-input-inner",Ce=[],Ie={},$={type:"text",autocomplete:"off",value:"",placeholder:""},P=t=>{let{value:e=$.value,type:n=$.type,placeholder:a=$.placeholder,autocomplete:i=$.autocomplete,disabled:u,readOnly:l,...d}=t;return _e("input",{...d,type:n,className:p(t.className,X,b(X,t)),placeholder:a,autoComplete:i,defaultValue:e,disabled:u||void 0,readOnly:l||void 0})};P.states=Ce;P.options=Ie;P.className=X;import{jsx as Le}from"react/jsx-runtime";var V="k-input-inner",Ae=[],Pe={},se={value:"",placeholder:""},L=t=>{let{value:e=se.value,placeholder:n=se.placeholder,rows:a,disabled:i,...u}=t;return Le("textarea",{...u,className:p(t.className,V,b(V,t)),placeholder:n,rows:a,defaultValue:e,disabled:i||void 0})};L.states=Ae;L.options=Pe;L.className=V;var G="prompt-box",ie=G;import{Fragment as ze,jsx as le}from"react/jsx-runtime";var J="k-font-icon",we=[],Ke={size:[r.undefined,r.xsmall,r.small,r.medium,r.large,r.xlarge,r.xxlarge,r.xxxlarge],themeColor:[o.undefined,o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info]},Re={},w=t=>{let{size:e,themeColor:n,icon:a,rotate:i,flip:u,...l}=t;return a?le("span",{...l,className:p(t.className,J,b(J,{size:e}),{[`k-i-${a}`]:a,[`k-color-${n}`]:n,[`k-rotate-${i}`]:i,"k-flip-h":u==="h"||u==="both","k-flip-v":u==="v"||u==="both"}),"aria-hidden":"true"}):le(ze,{})};w.states=we;w.options=Ke;w.className=J;w.defaultOptions=Re;var pe=w;import{Fragment as De,jsx as D}from"react/jsx-runtime";var q="k-svg-icon",He=[],$e={size:[r.undefined,r.xsmall,r.small,r.medium,r.large,r.xlarge,r.xxlarge,r.xxxlarge],themeColor:[o.undefined,o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info]},ue={viewBox:"0 0 24 24"},K=t=>{let{size:e,themeColor:n,rotate:a,flip:i,viewBox:u=ue.viewBox,icon:l,...d}=t;if(!l)return D(De,{});if(l==="none")return D("span",{...d,className:p(t.className,q,b("k-icon",{size:e}),"k-none"),"aria-hidden":"true"});let g=typeof l=="object"&&l.name&&l.name;return D("span",{...d,className:p(t.className,q,b("k-icon",{size:e}),{[`k-svg-i-${g}`]:g,[`k-color-${n}`]:n,[`k-rotate-${a}`]:a,"k-flip-h":i==="h"||i==="both","k-flip-v":i==="v"||i==="both"}),"aria-hidden":"true",children:D("svg",{"aria-hidden":!0,focusable:!1,xmlns:"http://www.w3.org/2000/svg",viewBox:typeof l=="object"?l.viewBox:u,dangerouslySetInnerHTML:typeof l=="object"?{__html:l.content}:void 0,children:l?void 0:t.children})})};K.states=He;K.options=$e;K.className=q;K.defaultOptions=ue;var W=K;import*as Q from"@progress/kendo-svg-icons";var ce="icon",de="icons";import{useContext as Fe}from"react";import{createContext as Ue}from"react";var me=Ue({iconsType:"svg"});import{Fragment as fe,jsx as R}from"react/jsx-runtime";var U="k-icon",Xe=t=>t.replace(/([-_][a-z0-9])/gi,e=>e.toUpperCase().replace("-","").replace("_","")),Ve=[],Ge={size:[r.undefined,r.xsmall,r.small,r.medium,r.large,r.xlarge,r.xxlarge,r.xxxlarge],themeColor:[o.undefined,o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info]},Y={viewBox:"0 0 24 24",type:"svg"},N=t=>{let{iconsType:e}=Fe(me),{size:n,themeColor:a,icon:i,type:u=e||Y.type,rotate:l,flip:d,viewBox:g=Y.viewBox,...x}=t;if(!i)return R(fe,{});if((e||u)==="svg"){if(i==="none")return R(W,{...x,className:p(t.className,U),icon:i,size:n});let m=Q[i]?i:Xe(`${i}-icon`);return Q[m]?R(W,{...x,className:p(t.className,U),icon:Q[m],size:n,themeColor:a,rotate:l,flip:d,viewBox:g}):R(fe,{})}return R(pe,{...x,className:p(t.className,U),icon:i,size:n,themeColor:a,rotate:l,flip:d})};N.states=Ve;N.options=Ge;N.defaultOptions=Y;N.className=U;N.moduleName=ce;N.folderName=de;N.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 Z="button",xe=Z;import{Fragment as Qe,jsx as z,jsxs as be}from"react/jsx-runtime";var H="k-button",Je=["icon-button"],qe=[h.hover,h.focus,h.active,h.selected,h.disabled,h.generating],We={size:[r.undefined,r.xsmall,r.small,r.medium,r.large],rounded:[M.undefined,M.none,M.small,M.medium,M.large,M.full],fillMode:[f.undefined,f.solid,f.flat,f.outline,f.clear,f.link],themeColor:[o.undefined,o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info,o.inverse]},j={showArrow:!1,arrowIconName:"chevron-down"},s=t=>{let{as:e="button",size:n,rounded:a,fillMode:i,themeColor:u,showArrow:l=j.showArrow,arrowIconName:d=j.arrowIconName,variant:g,hover:x,focus:O,active:m,selected:S,disabled:E,togglable:A,ariaDisabled:y,icon:k,text:T,iconClassName:Be,className:Oe,...Me}=t,Se=k!==void 0,Ee=t.children!==void 0;return be(e,{className:p(Oe,H,ae(H,g),b(H,{size:n,rounded:a,fillMode:i,themeColor:u}),re(H,{hover:x,focus:O,active:m,disabled:E||y,selected:S}),{"k-icon-button":!T&&!Ee&&Se}),...Me,"aria-pressed":A?S?"true":"false":void 0,"aria-disabled":y?"true":void 0,disabled:E||void 0,children:[k&&z(N,{className:p(Be,"k-button-icon"),icon:k}),T?be(Qe,{children:[T&&z("span",{className:"k-button-text",children:T}),t.children]}):t.children&&z("span",{className:"k-button-text",children:t.children}),l&&z("span",{className:"k-menu-button-arrow k-button-arrow",children:z(N,{icon:d})})]})};s.states=qe;s.options=We;s.variants=Je;s.className=H;s.defaultOptions=j;s.moduleName=Z;s.folderName=xe;s.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 Ye}from"react/jsx-runtime";var F=t=>Ye(s,{icon:"folder",...t,"aria-label":t["aria-label"]||"Folder",children:void 0});import{jsx as Ze}from"react/jsx-runtime";var he=t=>Ze(s,{icon:"folder",children:"Button",...t});import{jsx as je}from"react/jsx-runtime";var ge=t=>je(s,{children:"Button",...t});import{jsx as ee}from"react/jsx-runtime";var et=s.options,tt=s.states,ot={...s.defaultOptions,variant:"text"},nt=[{name:"icon-only",title:"Icon Only"},{name:"icon-and-text",title:"Icon & Text"},{name:"text",title:"Text"}],rt=[],C=t=>{let{variant:e,...n}=t;switch(e){case"icon-only":return ee(F,{...n,icon:"star"});case"icon-and-text":return ee(he,{...n,icon:"star",children:"Button"});default:return ee(ge,{...n,children:"Button"})}};C.options=et;C.states=tt;C.variants=nt;C.defaultOptions=ot;C.modifiers=rt;C.className=s.className;var te="speech-to-text-button",Te=te;import{jsx as at}from"react/jsx-runtime";var Ne="k-speech-to-text-button",ve={icon:"microphone-outline"},c=t=>{let{listening:e=!1,icon:n=ve.icon,...a}=t;return at(s,{...a,icon:e?"stop-sm":n,className:p(t.className,Ne,{"k-listening":e}),"aria-pressed":e?"true":"false","aria-label":e?"Stop listening":"Start listening"})};c.states=s.states;c.options=s.options;c.className=Ne;c.defaultOptions=ve;c.moduleName=te;c.folderName=Te;c.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 zo}from"react/jsx-runtime";import{jsx as Uo}from"react/jsx-runtime";import{jsx as ut}from"react/jsx-runtime";var st=s.states,ke={...s.defaultOptions,variant:"normal"},it={...s.options,fillMode:s.options.fillMode.filter(t=>t!=="clear"&&t!=="link")},lt=[],pt=[{name:"normal",title:"Normal"},{name:"listening",title:"Listening"}],I=t=>{let{variant:e,...n}={...ke,...t},a={};return e==="listening"&&(a.listening=!0),ut(c,{...n,...a})};I.options=it;I.states=st;I.variants=pt;I.defaultOptions=ke;I.modifiers=lt;I.className=c.className;import{jsx as _,jsxs as oe}from"react/jsx-runtime";var v="k-prompt-box",ct=[h.hover,h.focus,h.disabled],dt={fillMode:[f.undefined,f.solid,f.flat,f.outline]},ne={lineMode:"auto",isExpanded:!1},B=t=>{let{fillMode:e,lineMode:n=ne.lineMode,startAffix:a,endAffix:i,header:u,isExpanded:l=ne.isExpanded,className:d,children:g,value:x,placeholder:O,generating:m,hover:S,focus:E,disabled:A,...y}=t,k=n==="multi"||n==="auto"&&l;return oe("div",{...y,className:p(d,"k-input",v,{[`${v}-singleline`]:n==="single",[`${v}-multiline`]:k,[`k-input-${e}`]:e,"k-hover":S,"k-focus":E,"k-disabled":A}),children:[u&&_("div",{className:`${v}-header`,children:u}),oe("div",{className:`${v}-content`,children:[a&&_("div",{className:`${v}-affix`,children:a}),n==="single"?_(P,{value:x,placeholder:O,className:`${v}-input`,type:"text","aria-label":"Prompt input"}):_(L,{value:x,placeholder:O,className:`${v}-textarea`,rows:n==="multi"||l?3:1,"aria-label":"Prompt input","aria-multiline":"true"}),oe("div",{className:`${v}-affix`,children:[i,_(c,{size:"small",fillMode:"flat",rounded:"full"}),_(F,{icon:m?"stop-sm":"arrow-up-outline",size:"small",rounded:"full",active:m,disabled:!x&&!m,className:p({"k-generating":m}),"aria-label":m?"Stop generating":"Send prompt","aria-live":"polite"})]})]}),g]})};B.states=ct;B.options=dt;B.className=v;B.defaultOptions=ne;B.moduleName=G;B.folderName=ie;B.ariaSpec={selector:".k-prompt-box",rules:[{selector:".k-prompt-box-singleline .k-prompt-box-input",attribute:"nodeName=input",usage:"Ensures the input field has the proper textbox role."},{selector:".k-prompt-box-singleline .k-prompt-box-input",attribute:"aria-label",usage:"Provides an accessible label for the single-line input."},{selector:".k-prompt-box-multiline .k-prompt-box-textarea",attribute:"nodeName=textarea",usage:"Ensures the textarea has the proper textbox role."},{selector:".k-prompt-box-multiline .k-prompt-box-textarea",attribute:"aria-label",usage:"Provides an accessible label for the textarea."},{selector:".k-prompt-box-multiline .k-prompt-box-textarea",attribute:"aria-multiline=true",usage:"Indicates the textarea supports multiple lines of text."},{selector:".k-prompt-box:not(.k-prompt-box-singleline):not(.k-prompt-box-multiline) .k-prompt-box-textarea",attribute:"nodeName=textarea",usage:"Ensures the auto-mode textarea has the proper textbox role."},{selector:".k-prompt-box:not(.k-prompt-box-singleline):not(.k-prompt-box-multiline) .k-prompt-box-textarea",attribute:"aria-label",usage:"Provides an accessible label for the auto-mode textarea."},{selector:".k-prompt-box:not(.k-prompt-box-singleline):not(.k-prompt-box-multiline) .k-prompt-box-textarea",attribute:"aria-multiline=true",usage:"Indicates the auto-mode textarea supports multiple lines of text."},{selector:".k-prompt-box-affix .k-button:not(.k-speech-to-text-button)",attribute:"aria-label",usage:"The send/stop button is labelled to indicate its current action."},{selector:".k-prompt-box-affix .k-button:not(.k-speech-to-text-button)",attribute:"aria-live=polite",usage:"Announces the change in status of the send/stop button."}]};var ye=B;import{jsx as mt}from"react/jsx-runtime";var un=t=>mt(ye,{...t,lineMode:"single"});export{un as PromptBoxLineModeSingle};
|
|
1
|
+
var p=(...t)=>t.filter(e=>e!==!0&&!!e).map(e=>Array.isArray(e)?p(...e):typeof e=="object"?Object.keys(e).map((n,a)=>e[a]||e[n]&&n||null).filter(n=>n!==null).join(" "):e).filter(e=>!!e).join(" ");var b=(t,e)=>p({[`${t}-xs`]:e.size==="xsmall",[`${t}-sm`]:e.size==="small",[`${t}-md`]:e.size==="medium",[`${t}-lg`]:e.size==="large",[`${t}-xl`]:e.size==="xlarge",[`${t}-xxl`]:e.size==="xxlarge",[`${t}-xxxl`]:e.size==="xxxlarge"},{[`${t}-${e.fillMode}`]:e.fillMode},{[`${t}-${e.themeColor}`]:e.themeColor},{"k-rounded-sm":e.rounded==="small","k-rounded-md":e.rounded==="medium","k-rounded-lg":e.rounded==="large","k-rounded-full":e.rounded==="full","k-rounded-none":e.rounded==="none"}),re=(t,e)=>{let{valid:n,invalid:a,hover:i,focus:u,checked:l,active:d,selected:g,disabled:x,indeterminate:O,loading:m,empty:S,readonly:E,highlighted:A,...y}=e;return p({"k-valid":n,"k-invalid":a,"k-hover":i,"k-focus":u,"k-checked":l,"k-active":d,"k-selected":g,"k-disabled":x,"k-indeterminate":O&&!l,"k-loading":m,"k-empty":S,"k-readonly":E,"k-highlighted":A},Object.keys(y).reduce((k,T)=>(T.startsWith("k-")?k[T]=y[T]:k[`k-${T}`]=y[T],k),{}))};function ae(t,e){if(!e)return{};let n=Array.isArray(e)?e:[e];return Object.fromEntries(n.map(a=>[`k-${a}`,!0]))}var r={undefined:void 0,xsmall:"xsmall",small:"small",medium:"medium",large:"large",xlarge:"xlarge",xxlarge:"xxlarge",xxxlarge:"xxxlarge"},M={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"},o={undefined:void 0,inherit:"inherit",base:"base",primary:"primary",secondary:"secondary",tertiary:"tertiary",info:"info",success:"success",warning:"warning",error:"error",inverse:"inverse"},h={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"};import{jsx as _e}from"react/jsx-runtime";var X="k-input-inner",Ce=[],Ie={},$={type:"text",autocomplete:"off",value:"",placeholder:""},P=t=>{let{value:e=$.value,type:n=$.type,placeholder:a=$.placeholder,autocomplete:i=$.autocomplete,disabled:u,readOnly:l,...d}=t;return _e("input",{...d,type:n,className:p(t.className,X,b(X,t)),placeholder:a,autoComplete:i,defaultValue:e,disabled:u||void 0,readOnly:l||void 0})};P.states=Ce;P.options=Ie;P.className=X;import{jsx as Le}from"react/jsx-runtime";var V="k-input-inner",Ae=[],Pe={},se={value:"",placeholder:""},L=t=>{let{value:e=se.value,placeholder:n=se.placeholder,rows:a,disabled:i,...u}=t;return Le("textarea",{...u,className:p(t.className,V,b(V,t)),placeholder:n,rows:a,defaultValue:e,disabled:i||void 0})};L.states=Ae;L.options=Pe;L.className=V;var G="prompt-box",ie=G;import{Fragment as ze,jsx as le}from"react/jsx-runtime";var J="k-font-icon",we=[],Ke={size:[r.undefined,r.xsmall,r.small,r.medium,r.large,r.xlarge,r.xxlarge,r.xxxlarge],themeColor:[o.undefined,o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info]},Re={},w=t=>{let{size:e,themeColor:n,icon:a,rotate:i,flip:u,...l}=t;return a?le("span",{...l,className:p(t.className,J,b(J,{size:e}),{[`k-i-${a}`]:a,[`k-color-${n}`]:n,[`k-rotate-${i}`]:i,"k-flip-h":u==="h"||u==="both","k-flip-v":u==="v"||u==="both"}),"aria-hidden":"true"}):le(ze,{})};w.states=we;w.options=Ke;w.className=J;w.defaultOptions=Re;var pe=w;import{Fragment as De,jsx as D}from"react/jsx-runtime";var q="k-svg-icon",He=[],$e={size:[r.undefined,r.xsmall,r.small,r.medium,r.large,r.xlarge,r.xxlarge,r.xxxlarge],themeColor:[o.undefined,o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info]},ue={viewBox:"0 0 24 24"},K=t=>{let{size:e,themeColor:n,rotate:a,flip:i,viewBox:u=ue.viewBox,icon:l,...d}=t;if(!l)return D(De,{});if(l==="none")return D("span",{...d,className:p(t.className,q,b("k-icon",{size:e}),"k-none"),"aria-hidden":"true"});let g=typeof l=="object"&&l.name&&l.name;return D("span",{...d,className:p(t.className,q,b("k-icon",{size:e}),{[`k-svg-i-${g}`]:g,[`k-color-${n}`]:n,[`k-rotate-${a}`]:a,"k-flip-h":i==="h"||i==="both","k-flip-v":i==="v"||i==="both"}),"aria-hidden":"true",children:D("svg",{"aria-hidden":!0,focusable:!1,xmlns:"http://www.w3.org/2000/svg",viewBox:typeof l=="object"?l.viewBox:u,dangerouslySetInnerHTML:typeof l=="object"?{__html:l.content}:void 0,children:l?void 0:t.children})})};K.states=He;K.options=$e;K.className=q;K.defaultOptions=ue;var W=K;import*as Q from"@progress/kendo-svg-icons";var ce="icon",de="icons";import{useContext as Fe}from"react";import{createContext as Ue}from"react";var me=Ue({iconsType:"svg"});import{Fragment as fe,jsx as R}from"react/jsx-runtime";var U="k-icon",Xe=t=>t.replace(/([-_][a-z0-9])/gi,e=>e.toUpperCase().replace("-","").replace("_","")),Ve=[],Ge={size:[r.undefined,r.xsmall,r.small,r.medium,r.large,r.xlarge,r.xxlarge,r.xxxlarge],themeColor:[o.undefined,o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info]},Y={viewBox:"0 0 24 24",type:"svg"},N=t=>{let{iconsType:e}=Fe(me),{size:n,themeColor:a,icon:i,type:u=e||Y.type,rotate:l,flip:d,viewBox:g=Y.viewBox,...x}=t;if(!i)return R(fe,{});if((e||u)==="svg"){if(i==="none")return R(W,{...x,className:p(t.className,U),icon:i,size:n});let m=Q[i]?i:Xe(`${i}-icon`);return Q[m]?R(W,{...x,className:p(t.className,U),icon:Q[m],size:n,themeColor:a,rotate:l,flip:d,viewBox:g}):R(fe,{})}return R(pe,{...x,className:p(t.className,U),icon:i,size:n,themeColor:a,rotate:l,flip:d})};N.states=Ve;N.options=Ge;N.defaultOptions=Y;N.className=U;N.moduleName=ce;N.folderName=de;N.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 Z="button",xe=Z;import{Fragment as Qe,jsx as z,jsxs as be}from"react/jsx-runtime";var H="k-button",Je=["icon-button"],qe=[h.hover,h.focus,h.active,h.selected,h.disabled,h.generating],We={size:[r.undefined,r.xsmall,r.small,r.medium,r.large],rounded:[M.undefined,M.none,M.small,M.medium,M.large,M.full],fillMode:[f.undefined,f.solid,f.flat,f.outline,f.clear,f.link],themeColor:[o.undefined,o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info,o.inverse]},j={showArrow:!1,arrowIconName:"chevron-down"},s=t=>{let{as:e="button",size:n,rounded:a,fillMode:i,themeColor:u,showArrow:l=j.showArrow,arrowIconName:d=j.arrowIconName,variant:g,hover:x,focus:O,active:m,selected:S,disabled:E,togglable:A,ariaDisabled:y,icon:k,text:T,iconClassName:Be,className:Oe,...Me}=t,Se=k!==void 0,Ee=t.children!==void 0;return be(e,{className:p(Oe,H,ae(H,g),b(H,{size:n,rounded:a,fillMode:i,themeColor:u}),re(H,{hover:x,focus:O,active:m,disabled:E||y,selected:S}),{"k-icon-button":!T&&!Ee&&Se}),...Me,"aria-pressed":A?S?"true":"false":void 0,"aria-disabled":y?"true":void 0,disabled:E||void 0,children:[k&&z(N,{className:p(Be,"k-button-icon"),icon:k}),T?be(Qe,{children:[T&&z("span",{className:"k-button-text",children:T}),t.children]}):t.children&&z("span",{className:"k-button-text",children:t.children}),l&&z("span",{className:"k-menu-button-arrow k-button-arrow",children:z(N,{icon:d})})]})};s.states=qe;s.options=We;s.variants=Je;s.className=H;s.defaultOptions=j;s.moduleName=Z;s.folderName=xe;s.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 Ye}from"react/jsx-runtime";var F=t=>Ye(s,{icon:"folder",...t,"aria-label":t["aria-label"]||"Folder",children:void 0});import{jsx as Ze}from"react/jsx-runtime";var he=t=>Ze(s,{icon:"folder",children:"Button",...t});import{jsx as je}from"react/jsx-runtime";var ge=t=>je(s,{children:"Button",...t});import{jsx as ee}from"react/jsx-runtime";var et=s.options,tt=s.states,ot={...s.defaultOptions,variant:"text"},nt=[{name:"icon-only",title:"Icon Only"},{name:"icon-and-text",title:"Icon & Text"},{name:"text",title:"Text"}],rt=[],C=t=>{let{variant:e,...n}=t;switch(e){case"icon-only":return ee(F,{...n,icon:"star"});case"icon-and-text":return ee(he,{...n,icon:"star",children:"Button"});default:return ee(ge,{...n,children:"Button"})}};C.options=et;C.states=tt;C.variants=nt;C.defaultOptions=ot;C.modifiers=rt;C.className=s.className;var te="speech-to-text-button",Te=te;import{jsx as at}from"react/jsx-runtime";var Ne="k-speech-to-text-button",ve={icon:"microphone"},c=t=>{let{listening:e=!1,icon:n=ve.icon,...a}=t;return at(s,{...a,icon:e?"stop":n,className:p(t.className,Ne,{"k-listening":e}),"aria-pressed":e?"true":"false","aria-label":e?"Stop listening":"Start listening"})};c.states=s.states;c.options=s.options;c.className=Ne;c.defaultOptions=ve;c.moduleName=te;c.folderName=Te;c.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 zo}from"react/jsx-runtime";import{jsx as Uo}from"react/jsx-runtime";import{jsx as ut}from"react/jsx-runtime";var st=s.states,ke={...s.defaultOptions,variant:"normal"},it={...s.options,fillMode:s.options.fillMode.filter(t=>t!=="clear"&&t!=="link")},lt=[],pt=[{name:"normal",title:"Normal"},{name:"listening",title:"Listening"}],I=t=>{let{variant:e,...n}={...ke,...t},a={};return e==="listening"&&(a.listening=!0),ut(c,{...n,...a})};I.options=it;I.states=st;I.variants=pt;I.defaultOptions=ke;I.modifiers=lt;I.className=c.className;import{jsx as _,jsxs as oe}from"react/jsx-runtime";var v="k-prompt-box",ct=[h.hover,h.focus,h.disabled],dt={fillMode:[f.undefined,f.solid,f.flat,f.outline]},ne={lineMode:"auto",isExpanded:!1},B=t=>{let{fillMode:e,lineMode:n=ne.lineMode,startAffix:a,endAffix:i,header:u,isExpanded:l=ne.isExpanded,className:d,children:g,value:x,placeholder:O,generating:m,hover:S,focus:E,disabled:A,...y}=t,k=n==="multi"||n==="auto"&&l;return oe("div",{...y,className:p(d,"k-input",v,{[`${v}-singleline`]:n==="single",[`${v}-multiline`]:k,[`k-input-${e}`]:e,"k-hover":S,"k-focus":E,"k-disabled":A}),children:[u&&_("div",{className:`${v}-header`,children:u}),oe("div",{className:`${v}-content`,children:[a&&_("div",{className:`${v}-affix`,children:a}),n==="single"?_(P,{value:x,placeholder:O,className:`${v}-input`,type:"text","aria-label":"Prompt input"}):_(L,{value:x,placeholder:O,className:`${v}-textarea`,rows:n==="multi"||l?3:1,"aria-label":"Prompt input","aria-multiline":"true"}),oe("div",{className:`${v}-affix`,children:[i,_(c,{size:"small",fillMode:"flat",rounded:"full"}),_(F,{icon:m?"stop":"arrow-up",size:"small",rounded:"full",active:m,disabled:!x&&!m,className:p({"k-generating":m}),"aria-label":m?"Stop generating":"Send prompt","aria-live":"polite"})]})]}),g]})};B.states=ct;B.options=dt;B.className=v;B.defaultOptions=ne;B.moduleName=G;B.folderName=ie;B.ariaSpec={selector:".k-prompt-box",rules:[{selector:".k-prompt-box-singleline .k-prompt-box-input",attribute:"nodeName=input",usage:"Ensures the input field has the proper textbox role."},{selector:".k-prompt-box-singleline .k-prompt-box-input",attribute:"aria-label",usage:"Provides an accessible label for the single-line input."},{selector:".k-prompt-box-multiline .k-prompt-box-textarea",attribute:"nodeName=textarea",usage:"Ensures the textarea has the proper textbox role."},{selector:".k-prompt-box-multiline .k-prompt-box-textarea",attribute:"aria-label",usage:"Provides an accessible label for the textarea."},{selector:".k-prompt-box-multiline .k-prompt-box-textarea",attribute:"aria-multiline=true",usage:"Indicates the textarea supports multiple lines of text."},{selector:".k-prompt-box:not(.k-prompt-box-singleline):not(.k-prompt-box-multiline) .k-prompt-box-textarea",attribute:"nodeName=textarea",usage:"Ensures the auto-mode textarea has the proper textbox role."},{selector:".k-prompt-box:not(.k-prompt-box-singleline):not(.k-prompt-box-multiline) .k-prompt-box-textarea",attribute:"aria-label",usage:"Provides an accessible label for the auto-mode textarea."},{selector:".k-prompt-box:not(.k-prompt-box-singleline):not(.k-prompt-box-multiline) .k-prompt-box-textarea",attribute:"aria-multiline=true",usage:"Indicates the auto-mode textarea supports multiple lines of text."},{selector:".k-prompt-box-affix .k-button:not(.k-speech-to-text-button)",attribute:"aria-label",usage:"The send/stop button is labelled to indicate its current action."},{selector:".k-prompt-box-affix .k-button:not(.k-speech-to-text-button)",attribute:"aria-live=polite",usage:"Announces the change in status of the send/stop button."}]};var ye=B;import{jsx as mt}from"react/jsx-runtime";var un=t=>mt(ye,{...t,lineMode:"single"});export{un as PromptBoxLineModeSingle};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var p=(...t)=>t.filter(e=>e!==!0&&!!e).map(e=>Array.isArray(e)?p(...e):typeof e=="object"?Object.keys(e).map((n,a)=>e[a]||e[n]&&n||null).filter(n=>n!==null).join(" "):e).filter(e=>!!e).join(" ");var b=(t,e)=>p({[`${t}-xs`]:e.size==="xsmall",[`${t}-sm`]:e.size==="small",[`${t}-md`]:e.size==="medium",[`${t}-lg`]:e.size==="large",[`${t}-xl`]:e.size==="xlarge",[`${t}-xxl`]:e.size==="xxlarge",[`${t}-xxxl`]:e.size==="xxxlarge"},{[`${t}-${e.fillMode}`]:e.fillMode},{[`${t}-${e.themeColor}`]:e.themeColor},{"k-rounded-sm":e.rounded==="small","k-rounded-md":e.rounded==="medium","k-rounded-lg":e.rounded==="large","k-rounded-full":e.rounded==="full","k-rounded-none":e.rounded==="none"}),re=(t,e)=>{let{valid:n,invalid:a,hover:i,focus:u,checked:l,active:d,selected:g,disabled:x,indeterminate:O,loading:m,empty:M,readonly:E,highlighted:A,...y}=e;return p({"k-valid":n,"k-invalid":a,"k-hover":i,"k-focus":u,"k-checked":l,"k-active":d,"k-selected":g,"k-disabled":x,"k-indeterminate":O&&!l,"k-loading":m,"k-empty":M,"k-readonly":E,"k-highlighted":A},Object.keys(y).reduce((k,T)=>(T.startsWith("k-")?k[T]=y[T]:k[`k-${T}`]=y[T],k),{}))};function ae(t,e){if(!e)return{};let n=Array.isArray(e)?e:[e];return Object.fromEntries(n.map(a=>[`k-${a}`,!0]))}var r={undefined:void 0,xsmall:"xsmall",small:"small",medium:"medium",large:"large",xlarge:"xlarge",xxlarge:"xxlarge",xxxlarge:"xxxlarge"},S={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"},o={undefined:void 0,inherit:"inherit",base:"base",primary:"primary",secondary:"secondary",tertiary:"tertiary",info:"info",success:"success",warning:"warning",error:"error",inverse:"inverse"},h={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"};import{jsx as _e}from"react/jsx-runtime";var X="k-input-inner",Ce=[],Ie={},$={type:"text",autocomplete:"off",value:"",placeholder:""},P=t=>{let{value:e=$.value,type:n=$.type,placeholder:a=$.placeholder,autocomplete:i=$.autocomplete,disabled:u,readOnly:l,...d}=t;return _e("input",{...d,type:n,className:p(t.className,X,b(X,t)),placeholder:a,autoComplete:i,defaultValue:e,disabled:u||void 0,readOnly:l||void 0})};P.states=Ce;P.options=Ie;P.className=X;import{jsx as Le}from"react/jsx-runtime";var V="k-input-inner",Ae=[],Pe={},se={value:"",placeholder:""},L=t=>{let{value:e=se.value,placeholder:n=se.placeholder,rows:a,disabled:i,...u}=t;return Le("textarea",{...u,className:p(t.className,V,b(V,t)),placeholder:n,rows:a,defaultValue:e,disabled:i||void 0})};L.states=Ae;L.options=Pe;L.className=V;var G="prompt-box",ie=G;import{Fragment as ze,jsx as le}from"react/jsx-runtime";var J="k-font-icon",we=[],Ke={size:[r.undefined,r.xsmall,r.small,r.medium,r.large,r.xlarge,r.xxlarge,r.xxxlarge],themeColor:[o.undefined,o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info]},Re={},w=t=>{let{size:e,themeColor:n,icon:a,rotate:i,flip:u,...l}=t;return a?le("span",{...l,className:p(t.className,J,b(J,{size:e}),{[`k-i-${a}`]:a,[`k-color-${n}`]:n,[`k-rotate-${i}`]:i,"k-flip-h":u==="h"||u==="both","k-flip-v":u==="v"||u==="both"}),"aria-hidden":"true"}):le(ze,{})};w.states=we;w.options=Ke;w.className=J;w.defaultOptions=Re;var pe=w;import{Fragment as De,jsx as D}from"react/jsx-runtime";var q="k-svg-icon",He=[],$e={size:[r.undefined,r.xsmall,r.small,r.medium,r.large,r.xlarge,r.xxlarge,r.xxxlarge],themeColor:[o.undefined,o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info]},ue={viewBox:"0 0 24 24"},K=t=>{let{size:e,themeColor:n,rotate:a,flip:i,viewBox:u=ue.viewBox,icon:l,...d}=t;if(!l)return D(De,{});if(l==="none")return D("span",{...d,className:p(t.className,q,b("k-icon",{size:e}),"k-none"),"aria-hidden":"true"});let g=typeof l=="object"&&l.name&&l.name;return D("span",{...d,className:p(t.className,q,b("k-icon",{size:e}),{[`k-svg-i-${g}`]:g,[`k-color-${n}`]:n,[`k-rotate-${a}`]:a,"k-flip-h":i==="h"||i==="both","k-flip-v":i==="v"||i==="both"}),"aria-hidden":"true",children:D("svg",{"aria-hidden":!0,focusable:!1,xmlns:"http://www.w3.org/2000/svg",viewBox:typeof l=="object"?l.viewBox:u,dangerouslySetInnerHTML:typeof l=="object"?{__html:l.content}:void 0,children:l?void 0:t.children})})};K.states=He;K.options=$e;K.className=q;K.defaultOptions=ue;var W=K;import*as Q from"@progress/kendo-svg-icons";var ce="icon",de="icons";import{useContext as Fe}from"react";import{createContext as Ue}from"react";var me=Ue({iconsType:"svg"});import{Fragment as fe,jsx as R}from"react/jsx-runtime";var U="k-icon",Xe=t=>t.replace(/([-_][a-z0-9])/gi,e=>e.toUpperCase().replace("-","").replace("_","")),Ve=[],Ge={size:[r.undefined,r.xsmall,r.small,r.medium,r.large,r.xlarge,r.xxlarge,r.xxxlarge],themeColor:[o.undefined,o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info]},Y={viewBox:"0 0 24 24",type:"svg"},N=t=>{let{iconsType:e}=Fe(me),{size:n,themeColor:a,icon:i,type:u=e||Y.type,rotate:l,flip:d,viewBox:g=Y.viewBox,...x}=t;if(!i)return R(fe,{});if((e||u)==="svg"){if(i==="none")return R(W,{...x,className:p(t.className,U),icon:i,size:n});let m=Q[i]?i:Xe(`${i}-icon`);return Q[m]?R(W,{...x,className:p(t.className,U),icon:Q[m],size:n,themeColor:a,rotate:l,flip:d,viewBox:g}):R(fe,{})}return R(pe,{...x,className:p(t.className,U),icon:i,size:n,themeColor:a,rotate:l,flip:d})};N.states=Ve;N.options=Ge;N.defaultOptions=Y;N.className=U;N.moduleName=ce;N.folderName=de;N.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 Z="button",xe=Z;import{Fragment as Qe,jsx as z,jsxs as be}from"react/jsx-runtime";var H="k-button",Je=["icon-button"],qe=[h.hover,h.focus,h.active,h.selected,h.disabled,h.generating],We={size:[r.undefined,r.xsmall,r.small,r.medium,r.large],rounded:[S.undefined,S.none,S.small,S.medium,S.large,S.full],fillMode:[f.undefined,f.solid,f.flat,f.outline,f.clear,f.link],themeColor:[o.undefined,o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info,o.inverse]},j={showArrow:!1,arrowIconName:"chevron-down"},s=t=>{let{as:e="button",size:n,rounded:a,fillMode:i,themeColor:u,showArrow:l=j.showArrow,arrowIconName:d=j.arrowIconName,variant:g,hover:x,focus:O,active:m,selected:M,disabled:E,togglable:A,ariaDisabled:y,icon:k,text:T,iconClassName:Be,className:Oe,...Se}=t,Me=k!==void 0,Ee=t.children!==void 0;return be(e,{className:p(Oe,H,ae(H,g),b(H,{size:n,rounded:a,fillMode:i,themeColor:u}),re(H,{hover:x,focus:O,active:m,disabled:E||y,selected:M}),{"k-icon-button":!T&&!Ee&&Me}),...Se,"aria-pressed":A?M?"true":"false":void 0,"aria-disabled":y?"true":void 0,disabled:E||void 0,children:[k&&z(N,{className:p(Be,"k-button-icon"),icon:k}),T?be(Qe,{children:[T&&z("span",{className:"k-button-text",children:T}),t.children]}):t.children&&z("span",{className:"k-button-text",children:t.children}),l&&z("span",{className:"k-menu-button-arrow k-button-arrow",children:z(N,{icon:d})})]})};s.states=qe;s.options=We;s.variants=Je;s.className=H;s.defaultOptions=j;s.moduleName=Z;s.folderName=xe;s.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 Ye}from"react/jsx-runtime";var F=t=>Ye(s,{icon:"folder",...t,"aria-label":t["aria-label"]||"Folder",children:void 0});import{jsx as Ze}from"react/jsx-runtime";var he=t=>Ze(s,{icon:"folder",children:"Button",...t});import{jsx as je}from"react/jsx-runtime";var ge=t=>je(s,{children:"Button",...t});import{jsx as ee}from"react/jsx-runtime";var et=s.options,tt=s.states,ot={...s.defaultOptions,variant:"text"},nt=[{name:"icon-only",title:"Icon Only"},{name:"icon-and-text",title:"Icon & Text"},{name:"text",title:"Text"}],rt=[],C=t=>{let{variant:e,...n}=t;switch(e){case"icon-only":return ee(F,{...n,icon:"star"});case"icon-and-text":return ee(he,{...n,icon:"star",children:"Button"});default:return ee(ge,{...n,children:"Button"})}};C.options=et;C.states=tt;C.variants=nt;C.defaultOptions=ot;C.modifiers=rt;C.className=s.className;var te="speech-to-text-button",Te=te;import{jsx as at}from"react/jsx-runtime";var Ne="k-speech-to-text-button",ve={icon:"microphone-outline"},c=t=>{let{listening:e=!1,icon:n=ve.icon,...a}=t;return at(s,{...a,icon:e?"stop-sm":n,className:p(t.className,Ne,{"k-listening":e}),"aria-pressed":e?"true":"false","aria-label":e?"Stop listening":"Start listening"})};c.states=s.states;c.options=s.options;c.className=Ne;c.defaultOptions=ve;c.moduleName=te;c.folderName=Te;c.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 zo}from"react/jsx-runtime";import{jsx as Uo}from"react/jsx-runtime";import{jsx as ut}from"react/jsx-runtime";var st=s.states,ke={...s.defaultOptions,variant:"normal"},it={...s.options,fillMode:s.options.fillMode.filter(t=>t!=="clear"&&t!=="link")},lt=[],pt=[{name:"normal",title:"Normal"},{name:"listening",title:"Listening"}],I=t=>{let{variant:e,...n}={...ke,...t},a={};return e==="listening"&&(a.listening=!0),ut(c,{...n,...a})};I.options=it;I.states=st;I.variants=pt;I.defaultOptions=ke;I.modifiers=lt;I.className=c.className;import{jsx as _,jsxs as oe}from"react/jsx-runtime";var v="k-prompt-box",ct=[h.hover,h.focus,h.disabled],dt={fillMode:[f.undefined,f.solid,f.flat,f.outline]},ne={lineMode:"auto",isExpanded:!1},B=t=>{let{fillMode:e,lineMode:n=ne.lineMode,startAffix:a,endAffix:i,header:u,isExpanded:l=ne.isExpanded,className:d,children:g,value:x,placeholder:O,generating:m,hover:M,focus:E,disabled:A,...y}=t,k=n==="multi"||n==="auto"&&l;return oe("div",{...y,className:p(d,"k-input",v,{[`${v}-singleline`]:n==="single",[`${v}-multiline`]:k,[`k-input-${e}`]:e,"k-hover":M,"k-focus":E,"k-disabled":A}),children:[u&&_("div",{className:`${v}-header`,children:u}),oe("div",{className:`${v}-content`,children:[a&&_("div",{className:`${v}-affix`,children:a}),n==="single"?_(P,{value:x,placeholder:O,className:`${v}-input`,type:"text","aria-label":"Prompt input"}):_(L,{value:x,placeholder:O,className:`${v}-textarea`,rows:n==="multi"||l?3:1,"aria-label":"Prompt input","aria-multiline":"true"}),oe("div",{className:`${v}-affix`,children:[i,_(c,{size:"small",fillMode:"flat",rounded:"full"}),_(F,{icon:m?"stop-sm":"arrow-up-outline",size:"small",rounded:"full",active:m,disabled:!x&&!m,className:p({"k-generating":m}),"aria-label":m?"Stop generating":"Send prompt","aria-live":"polite"})]})]}),g]})};B.states=ct;B.options=dt;B.className=v;B.defaultOptions=ne;B.moduleName=G;B.folderName=ie;B.ariaSpec={selector:".k-prompt-box",rules:[{selector:".k-prompt-box-singleline .k-prompt-box-input",attribute:"nodeName=input",usage:"Ensures the input field has the proper textbox role."},{selector:".k-prompt-box-singleline .k-prompt-box-input",attribute:"aria-label",usage:"Provides an accessible label for the single-line input."},{selector:".k-prompt-box-multiline .k-prompt-box-textarea",attribute:"nodeName=textarea",usage:"Ensures the textarea has the proper textbox role."},{selector:".k-prompt-box-multiline .k-prompt-box-textarea",attribute:"aria-label",usage:"Provides an accessible label for the textarea."},{selector:".k-prompt-box-multiline .k-prompt-box-textarea",attribute:"aria-multiline=true",usage:"Indicates the textarea supports multiple lines of text."},{selector:".k-prompt-box:not(.k-prompt-box-singleline):not(.k-prompt-box-multiline) .k-prompt-box-textarea",attribute:"nodeName=textarea",usage:"Ensures the auto-mode textarea has the proper textbox role."},{selector:".k-prompt-box:not(.k-prompt-box-singleline):not(.k-prompt-box-multiline) .k-prompt-box-textarea",attribute:"aria-label",usage:"Provides an accessible label for the auto-mode textarea."},{selector:".k-prompt-box:not(.k-prompt-box-singleline):not(.k-prompt-box-multiline) .k-prompt-box-textarea",attribute:"aria-multiline=true",usage:"Indicates the auto-mode textarea supports multiple lines of text."},{selector:".k-prompt-box-affix .k-button:not(.k-speech-to-text-button)",attribute:"aria-label",usage:"The send/stop button is labelled to indicate its current action."},{selector:".k-prompt-box-affix .k-button:not(.k-speech-to-text-button)",attribute:"aria-live=polite",usage:"Announces the change in status of the send/stop button."}]};var ye=B;import{jsx as mt}from"react/jsx-runtime";var un=t=>mt(ye,{generating:!0,...t,lineMode:"single"});export{un as PromptBoxStopResponse};
|
|
1
|
+
var p=(...t)=>t.filter(e=>e!==!0&&!!e).map(e=>Array.isArray(e)?p(...e):typeof e=="object"?Object.keys(e).map((n,a)=>e[a]||e[n]&&n||null).filter(n=>n!==null).join(" "):e).filter(e=>!!e).join(" ");var b=(t,e)=>p({[`${t}-xs`]:e.size==="xsmall",[`${t}-sm`]:e.size==="small",[`${t}-md`]:e.size==="medium",[`${t}-lg`]:e.size==="large",[`${t}-xl`]:e.size==="xlarge",[`${t}-xxl`]:e.size==="xxlarge",[`${t}-xxxl`]:e.size==="xxxlarge"},{[`${t}-${e.fillMode}`]:e.fillMode},{[`${t}-${e.themeColor}`]:e.themeColor},{"k-rounded-sm":e.rounded==="small","k-rounded-md":e.rounded==="medium","k-rounded-lg":e.rounded==="large","k-rounded-full":e.rounded==="full","k-rounded-none":e.rounded==="none"}),re=(t,e)=>{let{valid:n,invalid:a,hover:i,focus:u,checked:l,active:d,selected:g,disabled:x,indeterminate:O,loading:m,empty:M,readonly:E,highlighted:A,...y}=e;return p({"k-valid":n,"k-invalid":a,"k-hover":i,"k-focus":u,"k-checked":l,"k-active":d,"k-selected":g,"k-disabled":x,"k-indeterminate":O&&!l,"k-loading":m,"k-empty":M,"k-readonly":E,"k-highlighted":A},Object.keys(y).reduce((k,T)=>(T.startsWith("k-")?k[T]=y[T]:k[`k-${T}`]=y[T],k),{}))};function ae(t,e){if(!e)return{};let n=Array.isArray(e)?e:[e];return Object.fromEntries(n.map(a=>[`k-${a}`,!0]))}var r={undefined:void 0,xsmall:"xsmall",small:"small",medium:"medium",large:"large",xlarge:"xlarge",xxlarge:"xxlarge",xxxlarge:"xxxlarge"},S={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"},o={undefined:void 0,inherit:"inherit",base:"base",primary:"primary",secondary:"secondary",tertiary:"tertiary",info:"info",success:"success",warning:"warning",error:"error",inverse:"inverse"},h={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"};import{jsx as _e}from"react/jsx-runtime";var X="k-input-inner",Ce=[],Ie={},$={type:"text",autocomplete:"off",value:"",placeholder:""},P=t=>{let{value:e=$.value,type:n=$.type,placeholder:a=$.placeholder,autocomplete:i=$.autocomplete,disabled:u,readOnly:l,...d}=t;return _e("input",{...d,type:n,className:p(t.className,X,b(X,t)),placeholder:a,autoComplete:i,defaultValue:e,disabled:u||void 0,readOnly:l||void 0})};P.states=Ce;P.options=Ie;P.className=X;import{jsx as Le}from"react/jsx-runtime";var V="k-input-inner",Ae=[],Pe={},se={value:"",placeholder:""},L=t=>{let{value:e=se.value,placeholder:n=se.placeholder,rows:a,disabled:i,...u}=t;return Le("textarea",{...u,className:p(t.className,V,b(V,t)),placeholder:n,rows:a,defaultValue:e,disabled:i||void 0})};L.states=Ae;L.options=Pe;L.className=V;var G="prompt-box",ie=G;import{Fragment as ze,jsx as le}from"react/jsx-runtime";var J="k-font-icon",we=[],Ke={size:[r.undefined,r.xsmall,r.small,r.medium,r.large,r.xlarge,r.xxlarge,r.xxxlarge],themeColor:[o.undefined,o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info]},Re={},w=t=>{let{size:e,themeColor:n,icon:a,rotate:i,flip:u,...l}=t;return a?le("span",{...l,className:p(t.className,J,b(J,{size:e}),{[`k-i-${a}`]:a,[`k-color-${n}`]:n,[`k-rotate-${i}`]:i,"k-flip-h":u==="h"||u==="both","k-flip-v":u==="v"||u==="both"}),"aria-hidden":"true"}):le(ze,{})};w.states=we;w.options=Ke;w.className=J;w.defaultOptions=Re;var pe=w;import{Fragment as De,jsx as D}from"react/jsx-runtime";var q="k-svg-icon",He=[],$e={size:[r.undefined,r.xsmall,r.small,r.medium,r.large,r.xlarge,r.xxlarge,r.xxxlarge],themeColor:[o.undefined,o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info]},ue={viewBox:"0 0 24 24"},K=t=>{let{size:e,themeColor:n,rotate:a,flip:i,viewBox:u=ue.viewBox,icon:l,...d}=t;if(!l)return D(De,{});if(l==="none")return D("span",{...d,className:p(t.className,q,b("k-icon",{size:e}),"k-none"),"aria-hidden":"true"});let g=typeof l=="object"&&l.name&&l.name;return D("span",{...d,className:p(t.className,q,b("k-icon",{size:e}),{[`k-svg-i-${g}`]:g,[`k-color-${n}`]:n,[`k-rotate-${a}`]:a,"k-flip-h":i==="h"||i==="both","k-flip-v":i==="v"||i==="both"}),"aria-hidden":"true",children:D("svg",{"aria-hidden":!0,focusable:!1,xmlns:"http://www.w3.org/2000/svg",viewBox:typeof l=="object"?l.viewBox:u,dangerouslySetInnerHTML:typeof l=="object"?{__html:l.content}:void 0,children:l?void 0:t.children})})};K.states=He;K.options=$e;K.className=q;K.defaultOptions=ue;var W=K;import*as Q from"@progress/kendo-svg-icons";var ce="icon",de="icons";import{useContext as Fe}from"react";import{createContext as Ue}from"react";var me=Ue({iconsType:"svg"});import{Fragment as fe,jsx as R}from"react/jsx-runtime";var U="k-icon",Xe=t=>t.replace(/([-_][a-z0-9])/gi,e=>e.toUpperCase().replace("-","").replace("_","")),Ve=[],Ge={size:[r.undefined,r.xsmall,r.small,r.medium,r.large,r.xlarge,r.xxlarge,r.xxxlarge],themeColor:[o.undefined,o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info]},Y={viewBox:"0 0 24 24",type:"svg"},N=t=>{let{iconsType:e}=Fe(me),{size:n,themeColor:a,icon:i,type:u=e||Y.type,rotate:l,flip:d,viewBox:g=Y.viewBox,...x}=t;if(!i)return R(fe,{});if((e||u)==="svg"){if(i==="none")return R(W,{...x,className:p(t.className,U),icon:i,size:n});let m=Q[i]?i:Xe(`${i}-icon`);return Q[m]?R(W,{...x,className:p(t.className,U),icon:Q[m],size:n,themeColor:a,rotate:l,flip:d,viewBox:g}):R(fe,{})}return R(pe,{...x,className:p(t.className,U),icon:i,size:n,themeColor:a,rotate:l,flip:d})};N.states=Ve;N.options=Ge;N.defaultOptions=Y;N.className=U;N.moduleName=ce;N.folderName=de;N.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 Z="button",xe=Z;import{Fragment as Qe,jsx as z,jsxs as be}from"react/jsx-runtime";var H="k-button",Je=["icon-button"],qe=[h.hover,h.focus,h.active,h.selected,h.disabled,h.generating],We={size:[r.undefined,r.xsmall,r.small,r.medium,r.large],rounded:[S.undefined,S.none,S.small,S.medium,S.large,S.full],fillMode:[f.undefined,f.solid,f.flat,f.outline,f.clear,f.link],themeColor:[o.undefined,o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info,o.inverse]},j={showArrow:!1,arrowIconName:"chevron-down"},s=t=>{let{as:e="button",size:n,rounded:a,fillMode:i,themeColor:u,showArrow:l=j.showArrow,arrowIconName:d=j.arrowIconName,variant:g,hover:x,focus:O,active:m,selected:M,disabled:E,togglable:A,ariaDisabled:y,icon:k,text:T,iconClassName:Be,className:Oe,...Se}=t,Me=k!==void 0,Ee=t.children!==void 0;return be(e,{className:p(Oe,H,ae(H,g),b(H,{size:n,rounded:a,fillMode:i,themeColor:u}),re(H,{hover:x,focus:O,active:m,disabled:E||y,selected:M}),{"k-icon-button":!T&&!Ee&&Me}),...Se,"aria-pressed":A?M?"true":"false":void 0,"aria-disabled":y?"true":void 0,disabled:E||void 0,children:[k&&z(N,{className:p(Be,"k-button-icon"),icon:k}),T?be(Qe,{children:[T&&z("span",{className:"k-button-text",children:T}),t.children]}):t.children&&z("span",{className:"k-button-text",children:t.children}),l&&z("span",{className:"k-menu-button-arrow k-button-arrow",children:z(N,{icon:d})})]})};s.states=qe;s.options=We;s.variants=Je;s.className=H;s.defaultOptions=j;s.moduleName=Z;s.folderName=xe;s.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 Ye}from"react/jsx-runtime";var F=t=>Ye(s,{icon:"folder",...t,"aria-label":t["aria-label"]||"Folder",children:void 0});import{jsx as Ze}from"react/jsx-runtime";var he=t=>Ze(s,{icon:"folder",children:"Button",...t});import{jsx as je}from"react/jsx-runtime";var ge=t=>je(s,{children:"Button",...t});import{jsx as ee}from"react/jsx-runtime";var et=s.options,tt=s.states,ot={...s.defaultOptions,variant:"text"},nt=[{name:"icon-only",title:"Icon Only"},{name:"icon-and-text",title:"Icon & Text"},{name:"text",title:"Text"}],rt=[],C=t=>{let{variant:e,...n}=t;switch(e){case"icon-only":return ee(F,{...n,icon:"star"});case"icon-and-text":return ee(he,{...n,icon:"star",children:"Button"});default:return ee(ge,{...n,children:"Button"})}};C.options=et;C.states=tt;C.variants=nt;C.defaultOptions=ot;C.modifiers=rt;C.className=s.className;var te="speech-to-text-button",Te=te;import{jsx as at}from"react/jsx-runtime";var Ne="k-speech-to-text-button",ve={icon:"microphone"},c=t=>{let{listening:e=!1,icon:n=ve.icon,...a}=t;return at(s,{...a,icon:e?"stop":n,className:p(t.className,Ne,{"k-listening":e}),"aria-pressed":e?"true":"false","aria-label":e?"Stop listening":"Start listening"})};c.states=s.states;c.options=s.options;c.className=Ne;c.defaultOptions=ve;c.moduleName=te;c.folderName=Te;c.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 zo}from"react/jsx-runtime";import{jsx as Uo}from"react/jsx-runtime";import{jsx as ut}from"react/jsx-runtime";var st=s.states,ke={...s.defaultOptions,variant:"normal"},it={...s.options,fillMode:s.options.fillMode.filter(t=>t!=="clear"&&t!=="link")},lt=[],pt=[{name:"normal",title:"Normal"},{name:"listening",title:"Listening"}],I=t=>{let{variant:e,...n}={...ke,...t},a={};return e==="listening"&&(a.listening=!0),ut(c,{...n,...a})};I.options=it;I.states=st;I.variants=pt;I.defaultOptions=ke;I.modifiers=lt;I.className=c.className;import{jsx as _,jsxs as oe}from"react/jsx-runtime";var v="k-prompt-box",ct=[h.hover,h.focus,h.disabled],dt={fillMode:[f.undefined,f.solid,f.flat,f.outline]},ne={lineMode:"auto",isExpanded:!1},B=t=>{let{fillMode:e,lineMode:n=ne.lineMode,startAffix:a,endAffix:i,header:u,isExpanded:l=ne.isExpanded,className:d,children:g,value:x,placeholder:O,generating:m,hover:M,focus:E,disabled:A,...y}=t,k=n==="multi"||n==="auto"&&l;return oe("div",{...y,className:p(d,"k-input",v,{[`${v}-singleline`]:n==="single",[`${v}-multiline`]:k,[`k-input-${e}`]:e,"k-hover":M,"k-focus":E,"k-disabled":A}),children:[u&&_("div",{className:`${v}-header`,children:u}),oe("div",{className:`${v}-content`,children:[a&&_("div",{className:`${v}-affix`,children:a}),n==="single"?_(P,{value:x,placeholder:O,className:`${v}-input`,type:"text","aria-label":"Prompt input"}):_(L,{value:x,placeholder:O,className:`${v}-textarea`,rows:n==="multi"||l?3:1,"aria-label":"Prompt input","aria-multiline":"true"}),oe("div",{className:`${v}-affix`,children:[i,_(c,{size:"small",fillMode:"flat",rounded:"full"}),_(F,{icon:m?"stop":"arrow-up",size:"small",rounded:"full",active:m,disabled:!x&&!m,className:p({"k-generating":m}),"aria-label":m?"Stop generating":"Send prompt","aria-live":"polite"})]})]}),g]})};B.states=ct;B.options=dt;B.className=v;B.defaultOptions=ne;B.moduleName=G;B.folderName=ie;B.ariaSpec={selector:".k-prompt-box",rules:[{selector:".k-prompt-box-singleline .k-prompt-box-input",attribute:"nodeName=input",usage:"Ensures the input field has the proper textbox role."},{selector:".k-prompt-box-singleline .k-prompt-box-input",attribute:"aria-label",usage:"Provides an accessible label for the single-line input."},{selector:".k-prompt-box-multiline .k-prompt-box-textarea",attribute:"nodeName=textarea",usage:"Ensures the textarea has the proper textbox role."},{selector:".k-prompt-box-multiline .k-prompt-box-textarea",attribute:"aria-label",usage:"Provides an accessible label for the textarea."},{selector:".k-prompt-box-multiline .k-prompt-box-textarea",attribute:"aria-multiline=true",usage:"Indicates the textarea supports multiple lines of text."},{selector:".k-prompt-box:not(.k-prompt-box-singleline):not(.k-prompt-box-multiline) .k-prompt-box-textarea",attribute:"nodeName=textarea",usage:"Ensures the auto-mode textarea has the proper textbox role."},{selector:".k-prompt-box:not(.k-prompt-box-singleline):not(.k-prompt-box-multiline) .k-prompt-box-textarea",attribute:"aria-label",usage:"Provides an accessible label for the auto-mode textarea."},{selector:".k-prompt-box:not(.k-prompt-box-singleline):not(.k-prompt-box-multiline) .k-prompt-box-textarea",attribute:"aria-multiline=true",usage:"Indicates the auto-mode textarea supports multiple lines of text."},{selector:".k-prompt-box-affix .k-button:not(.k-speech-to-text-button)",attribute:"aria-label",usage:"The send/stop button is labelled to indicate its current action."},{selector:".k-prompt-box-affix .k-button:not(.k-speech-to-text-button)",attribute:"aria-live=polite",usage:"Announces the change in status of the send/stop button."}]};var ye=B;import{jsx as mt}from"react/jsx-runtime";var un=t=>mt(ye,{generating:!0,...t,lineMode:"single"});export{un as PromptBoxStopResponse};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var c=(...t)=>t.filter(e=>e!==!0&&!!e).map(e=>Array.isArray(e)?c(...e):typeof e=="object"?Object.keys(e).map((n,l)=>e[l]||e[n]&&n||null).filter(n=>n!==null).join(" "):e).filter(e=>!!e).join(" ");var
|
|
1
|
+
var c=(...t)=>t.filter(e=>e!==!0&&!!e).map(e=>Array.isArray(e)?c(...e):typeof e=="object"?Object.keys(e).map((n,l)=>e[l]||e[n]&&n||null).filter(n=>n!==null).join(" "):e).filter(e=>!!e).join(" ");var R=(t,e)=>c({[`${t}-xs`]:e.size==="xsmall",[`${t}-sm`]:e.size==="small",[`${t}-md`]:e.size==="medium",[`${t}-lg`]:e.size==="large",[`${t}-xl`]:e.size==="xlarge",[`${t}-xxl`]:e.size==="xxlarge",[`${t}-xxxl`]:e.size==="xxxlarge"},{[`${t}-${e.fillMode}`]:e.fillMode},{[`${t}-${e.themeColor}`]:e.themeColor},{"k-rounded-sm":e.rounded==="small","k-rounded-md":e.rounded==="medium","k-rounded-lg":e.rounded==="large","k-rounded-full":e.rounded==="full","k-rounded-none":e.rounded==="none"}),M=(t,e)=>{let{valid:n,invalid:l,hover:r,focus:d,checked:i,active:m,selected:p,disabled:u,indeterminate:T,loading:v,empty:L,readonly:h,highlighted:ae,...w}=e;return c({"k-valid":n,"k-invalid":l,"k-hover":r,"k-focus":d,"k-checked":i,"k-active":m,"k-selected":p,"k-disabled":u,"k-indeterminate":T&&!i,"k-loading":v,"k-empty":L,"k-readonly":h,"k-highlighted":ae},Object.keys(w).reduce((E,N)=>(N.startsWith("k-")?E[N]=w[N]:E[`k-${N}`]=w[N],E),{}))};var a={undefined:void 0,xsmall:"xsmall",small:"small",medium:"medium",large:"large",xlarge:"xlarge",xxlarge:"xxlarge",xxxlarge:"xxxlarge"};var o={undefined:void 0,inherit:"inherit",base:"base",primary:"primary",secondary:"secondary",tertiary:"tertiary",info:"info",success:"success",warning:"warning",error:"error",inverse:"inverse"},g={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"};import{Fragment as le,jsx as V}from"react/jsx-runtime";var _="k-font-icon",ie=[],re={size:[a.undefined,a.xsmall,a.small,a.medium,a.large,a.xlarge,a.xxlarge,a.xxxlarge],themeColor:[o.undefined,o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info]},se={},S=t=>{let{size:e,themeColor:n,icon:l,rotate:r,flip:d,...i}=t;return l?V("span",{...i,className:c(t.className,_,R(_,{size:e}),{[`k-i-${l}`]:l,[`k-color-${n}`]:n,[`k-rotate-${r}`]:r,"k-flip-h":d==="h"||d==="both","k-flip-v":d==="v"||d==="both"}),"aria-hidden":"true"}):V(le,{})};S.states=ie;S.options=re;S.className=_;S.defaultOptions=se;var U=S;import{Fragment as me,jsx as O}from"react/jsx-runtime";var $="k-svg-icon",ce=[],de={size:[a.undefined,a.xsmall,a.small,a.medium,a.large,a.xlarge,a.xxlarge,a.xxxlarge],themeColor:[o.undefined,o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info]},W={viewBox:"0 0 24 24"},f=t=>{let{size:e,themeColor:n,rotate:l,flip:r,viewBox:d=W.viewBox,icon:i,...m}=t;if(!i)return O(me,{});if(i==="none")return O("span",{...m,className:c(t.className,$,R("k-icon",{size:e}),"k-none"),"aria-hidden":"true"});let p=typeof i=="object"&&i.name&&i.name;return O("span",{...m,className:c(t.className,$,R("k-icon",{size:e}),{[`k-svg-i-${p}`]:p,[`k-color-${n}`]:n,[`k-rotate-${l}`]:l,"k-flip-h":r==="h"||r==="both","k-flip-v":r==="v"||r==="both"}),"aria-hidden":"true",children:O("svg",{"aria-hidden":!0,focusable:!1,xmlns:"http://www.w3.org/2000/svg",viewBox:typeof i=="object"?i.viewBox:d,dangerouslySetInnerHTML:typeof i=="object"?{__html:i.content}:void 0,children:i?void 0:t.children})})};f.states=ce;f.options=de;f.className=$;f.defaultOptions=W;var B=f;import*as H from"@progress/kendo-svg-icons";var q="icon",J="icons";import{useContext as ue}from"react";import{createContext as pe}from"react";var X=pe({iconsType:"svg"});import{Fragment as Q,jsx as C}from"react/jsx-runtime";var A="k-icon",fe=t=>t.replace(/([-_][a-z0-9])/gi,e=>e.toUpperCase().replace("-","").replace("_","")),ge=[],xe={size:[a.undefined,a.xsmall,a.small,a.medium,a.large,a.xlarge,a.xxlarge,a.xxxlarge],themeColor:[o.undefined,o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info]},P={viewBox:"0 0 24 24",type:"svg"},b=t=>{let{iconsType:e}=ue(X),{size:n,themeColor:l,icon:r,type:d=e||P.type,rotate:i,flip:m,viewBox:p=P.viewBox,...u}=t;if(!r)return C(Q,{});if((e||d)==="svg"){if(r==="none")return C(B,{...u,className:c(t.className,A),icon:r,size:n});let v=H[r]?r:fe(`${r}-icon`);return H[v]?C(B,{...u,className:c(t.className,A),icon:H[v],size:n,themeColor:l,rotate:i,flip:m,viewBox:p}):C(Q,{})}return C(U,{...u,className:c(t.className,A),icon:r,size:n,themeColor:l,rotate:i,flip:m})};b.states=ge;b.options=xe;b.defaultOptions=P;b.className=A;b.moduleName=q;b.folderName=J;b.ariaSpec={selector:".k-icon, .k-svg-icon",rules:[{selector:".k-icon, .k-svg-icon",attribute:"aria-hidden=true",usage:"Hides the icon element and all its children from assistive technologies."}]};import{Fragment as ye,jsx as x,jsxs as ve}from"react/jsx-runtime";var D="k-rating-item",he=[g.hover,g.focus,g.selected,g.disabled],be={},j={iconType:"solid"},Y={name:"star",content:'<path d="M256 391.5 117.2 480 154 314.1 32 202.4 192.9 188 256 32l63.1 156L480 202.4 358 314.1 394.8 480z"></path>',viewBox:"0 0 512 512"},Z={name:"star-outline",content:'<path d="M480 202.4 319.1 188 256 32l-63.1 156L32 202.4l122 111.7L117.2 480 256 391.5 394.8 480 358 314.1zM256 353.6l-90.8 57.9 24-108.5-82.1-75.2 108.1-9.7L256 117.3l40.8 100.8 108.1 9.7-82.1 75.2 24.1 108.5z"></path>',viewBox:"0 0 512 512"},I=t=>{let{iconType:e=j.iconType,hover:n,focus:l,selected:r,disabled:d,dir:i,...m}=t,p;switch(e){case"split":p=ve(ye,{children:[x("span",{className:"k-rating-precision-complement",children:x(f,{className:"k-icon",icon:Z,size:"xlarge"})}),x("span",{className:"k-rating-precision-part",style:{clipPath:`inset(${i==="rtl"?"0px 0px 0px 50%":"0px 50% 0px 0px"})`},children:x(f,{className:"k-icon",icon:Y,size:"xlarge"})}),x("span",{style:{width:"24px",height:"24px",display:"block"}})]});break;case"outline":p=x(f,{className:"k-icon",icon:Z,size:"xlarge"});break;case"solid":p=x(f,{className:"k-icon",icon:Y,size:"xlarge"});break;default:return}return x("span",{...m,className:c(D,M(D,{hover:n,focus:l,selected:r,disabled:d})),dir:i,children:p})};I.states=he;I.options=be;I.className=D;I.defaultOptions=j;var z=I;var F="rating",ee=F;import{jsx as k,jsxs as Re}from"react/jsx-runtime";var G="k-rating",ke=[g.disabled,g.readonly],Ne={},K={max:5,min:0},s=t=>{let{value:e,max:n=K.max,min:l=K.min,disabled:r,readonly:d,label:i,dir:m,...p}=t,u=[],T=Math.floor(e),v=e%1===.5,L=n-Math.ceil(e);for(let h=0;h<T;h++)u.push(k(z,{dir:m,iconType:"solid",selected:!0}));v&&u.push(k(z,{dir:m,iconType:"split",selected:!0}));for(let h=0;h<L;h++)u.push(k(z,{dir:m,iconType:"outline"}));return Re("span",{...p,className:c(t.className,G,M(G,{disabled:r,readonly:d})),dir:m,role:"slider",tabIndex:r?void 0:0,"aria-valuenow":e,"aria-valuemin":l,"aria-valuemax":n,"aria-disabled":r?"true":void 0,"aria-readonly":d?"true":void 0,children:[k("span",{className:"k-rating-container",children:u}),i&&k("span",{className:"k-rating-label",children:k("span",{children:i})})]})};s.states=ke;s.options=Ne;s.className=G;s.defaultOptions=K;s.moduleName=F;s.folderName=ee;s.ariaSpec={selector:".k-rating",rules:[{selector:".k-rating",attribute:"role=slider",usage:"Announces the slider role of the Rating element."},{selector:".k-rating",attribute:"aria-label or aria-labelledby or title",usage:"The Rating needs an accessible name to be assigned to it."},{selector:".k-rating",attribute:"aria-valuenow",usage:"Specifies the currently selected value in the Rating."},{selector:".k-rating",attribute:"aria-valuemin",usage:"Specifies the minimum available value in the Rating."},{selector:".k-rating",attribute:"aria-valuemax",usage:"Specifies the maximum available value in the Rating."},{selector:".k-rating:not(.k-disabled)",attribute:"tabindex=0",usage:"The element must be focusable. Disabled ratings are removed from tab order."},{selector:".k-rating.k-disabled",attribute:"aria-disabled=true",usage:"Rendered only when the Rating is disabled."},{selector:".k-rating.k-readonly",attribute:"aria-readonly=true (when readonly)",usage:"Rendered only when the Rating is readonly. Readonly ratings remain focusable but their value cannot be changed."}]};import{jsx as Se}from"react/jsx-runtime";var te=({value:t=2.5,max:e=5,...n})=>Se(s,{label:`${t} / ${e}`,value:t,max:e,...n,"aria-label":n["aria-label"]||"Rating"});import{jsx as Rt}from"react/jsx-runtime";import{jsx as Tt}from"react/jsx-runtime";import{jsx as Ce}from"react/jsx-runtime";var oe=({value:t=2.5,...e})=>Ce(s,{value:t,...e,"aria-label":e["aria-label"]||"Rating"});import{jsx as ne}from"react/jsx-runtime";var Ie=s.options,Te=s.states,Me={...s.defaultOptions,variant:"normal"},Oe=[{name:"normal",title:"Normal"},{name:"label",title:"With label"}],Ae=[],y=t=>{let{variant:e,...n}=t;return e==="label"?ne(te,{...n}):ne(oe,{...n})};y.options=Ie;y.states=Te;y.variants=Oe;y.defaultOptions=Me;y.modifiers=Ae;y.className=s.className;var Vt=y;export{y as RatingDemo,Vt as default};
|