UNPKG

@progress/kendo-themes-html

Version:

A collection of HTML helpers used for developing Kendo UI themes

2 lines (1 loc) 22.7 kB
var i=(...e)=>e.filter(t=>t!==!0&&!!t).map(t=>Array.isArray(t)?i(...t):typeof t=="object"?Object.keys(t).map((o,a)=>t[a]||t[o]&&o||null).filter(o=>o!==null).join(" "):t).filter(t=>!!t).join(" ");var I=(e,t)=>i({[`${e}-xs`]:t.size==="xsmall",[`${e}-sm`]:t.size==="small",[`${e}-md`]:t.size==="medium",[`${e}-lg`]:t.size==="large",[`${e}-xl`]:t.size==="xlarge",[`${e}-xxl`]:t.size==="xxlarge",[`${e}-xxxl`]:t.size==="xxxlarge"},{[`${e}-${t.fillMode}`]:t.fillMode},{[`${e}-${t.themeColor}`]:t.themeColor},{"k-rounded-sm":t.rounded==="small","k-rounded-md":t.rounded==="medium","k-rounded-lg":t.rounded==="large","k-rounded-full":t.rounded==="full","k-rounded-none":t.rounded==="none"}),$=(e,t)=>{let{valid:o,invalid:a,hover:n,focus:l,checked:p,active:c,selected:x,disabled:m,indeterminate:h,loading:N,empty:g,readonly:R,highlighted:H,...y}=t;return i({"k-valid":o,"k-invalid":a,"k-hover":n,"k-focus":l,"k-checked":p,"k-active":c,"k-selected":x,"k-disabled":m,"k-indeterminate":h&&!p,"k-loading":N,"k-empty":g,"k-readonly":R,"k-highlighted":H},Object.keys(y).reduce((S,M)=>(M.startsWith("k-")?S[M]=y[M]:S[`k-${M}`]=y[M],S),{}))};function et(e,t){if(!t)return{};let o=Array.isArray(t)?t:[t];return Object.fromEntries(o.map(a=>[`k-${a}`,!0]))}var r={undefined:void 0,xsmall:"xsmall",small:"small",medium:"medium",large:"large",xlarge:"xlarge",xxlarge:"xxlarge",xxxlarge:"xxxlarge"},u={undefined:void 0,none:"none",small:"small",medium:"medium",large:"large",full:"full"},f={undefined:void 0,solid:"solid",flat:"flat",outline:"outline",clear:"clear",link:"link"},O={undefined:void 0,outline:"outline",solid:"solid",duotone:"duotone"},d={undefined:void 0,inherit:"inherit",base:"base",primary:"primary",secondary:"secondary",tertiary:"tertiary",info:"info",success:"success",warning:"warning",error:"error",inverse:"inverse"},s={open:"open",hover:"hover",focus:"focus",active:"active",selected:"selected",disabled:"disabled",valid:"valid",invalid:"invalid",loading:"loading",required:"required",empty:"empty",indeterminate:"indeterminate",checked:"checked",readonly:"readonly",highlighted:"highlighted",generating:"generating",expanded:"expanded"};var Ae="popup",tt=Ae;import{jsx as ot}from"react/jsx-runtime";var nt="k-animation-container",zt=[],Dt={},ye={positionMode:"absolute",shown:!0},w=e=>{let{positionMode:t=ye.positionMode,shown:o=ye.shown,animationStyle:a,offset:n,...l}=e;return ot("div",{...l,style:{...n,...e.style},className:i(e.className,nt,{"k-animation-container-shown":o,"k-animation-container-fixed":t==="fixed"}),children:ot("div",{className:"k-child-animation-container",style:a,children:e.children})})};w.states=zt;w.options=Dt;w.className=nt;w.defaultOptions=ye;w.moduleName=Ae;w.folderName=tt;var Me="action-buttons",at=Me;import{jsx as Ut}from"react/jsx-runtime";var le="k-actions",Vt=[],Ft={},Ee={alignment:"start",orientation:"horizontal"},B=e=>{let{alignment:t=Ee.alignment,orientation:o=Ee.orientation,...a}=e;return Ut("div",{...a,className:i(le,{[`${le}-${t}`]:t,[`${le}-${o}`]:o},e.className),children:e.children})};B.states=Vt;B.options=Ft;B.className=le;B.defaultOptions=Ee;B.moduleName=Me;B.folderName=at;import{jsx as Xt}from"react/jsx-runtime";var $t="k-actionsheet-footer",it={alignment:"stretched",orientation:"horizontal"},Oe=e=>{let{alignment:t=it.alignment,orientation:o=it.orientation,template:a,as:n=a?"div":B,...l}=e;return Xt(n,{...l,...!a&&{alignment:t,orientation:o},className:i(e.className,$t),children:e.children})};var Z="input",de=Z;import{jsx as Yt}from"react/jsx-runtime";var ce="k-input",qt=[s.hover,s.focus,s.valid,s.invalid,s.required,s.disabled,s.loading,s.readonly],Jt={size:[r.undefined,r.small,r.medium,r.large],rounded:[u.undefined,u.none,u.small,u.medium,u.large,u.full],fillMode:[f.undefined,f.solid,f.flat,f.outline]},Gt={},T=e=>{let{hover:t,focus:o,disabled:a,invalid:n,valid:l,loading:p,readonly:c,size:x,rounded:m,fillMode:h,...N}=e;return Yt("span",{...N,className:i(e.className,ce,I(ce,{size:x,rounded:m,fillMode:h}),$(ce,{hover:t,focus:o,disabled:a,invalid:n,valid:l,loading:p,readonly:c}))})};T.states=qt;T.options=Jt;T.className=ce;T.defaultOptions=Gt;T.moduleName=Z;T.folderName=de;import{jsx as jt}from"react/jsx-runtime";var pe="k-picker",Wt=[s.hover,s.focus,s.valid,s.invalid,s.required,s.disabled,s.loading,s.readonly],Qt={size:[r.undefined,r.small,r.medium,r.large],rounded:[u.undefined,u.none,u.small,u.medium,u.large,u.full],fillMode:[f.undefined,f.solid,f.flat,f.outline]},Zt={},X=e=>{let{hover:t,focus:o,disabled:a,invalid:n,valid:l,loading:p,readonly:c,size:x,rounded:m,fillMode:h,...N}=e;return jt("span",{...N,className:i(e.className,pe,I(pe,{size:x,rounded:m,fillMode:h}),$(pe,{hover:t,focus:o,disabled:a,invalid:n,valid:l,loading:p,readonly:c})),children:e.children})};X.states=Wt;X.options=Qt;X.className=pe;X.defaultOptions=Zt;X.moduleName=Z;X.folderName=de;import{Fragment as no,jsx as st}from"react/jsx-runtime";var ke="k-font-icon",eo=[],to={size:[r.undefined,r.xsmall,r.small,r.medium,r.large,r.xlarge,r.xxlarge,r.xxxlarge],themeColor:[d.undefined,d.base,d.primary,d.secondary,d.tertiary,d.success,d.warning,d.error,d.info]},oo={},j=e=>{let{size:t,themeColor:o,icon:a,rotate:n,flip:l,...p}=e;return a?st("span",{...p,className:i(e.className,ke,I(ke,{size:t}),{[`k-i-${a}`]:a,[`k-color-${o}`]:o,[`k-rotate-${n}`]:n,"k-flip-h":l==="h"||l==="both","k-flip-v":l==="v"||l==="both"}),"aria-hidden":"true"}):st(no,{})};j.states=eo;j.options=to;j.className=ke;j.defaultOptions=oo;var rt=j;import{Fragment as so,jsx as ue}from"react/jsx-runtime";var Ce="k-svg-icon",ao=[],io={size:[r.undefined,r.xsmall,r.small,r.medium,r.large,r.xlarge,r.xxlarge,r.xxxlarge],themeColor:[d.undefined,d.base,d.primary,d.secondary,d.tertiary,d.success,d.warning,d.error,d.info],variant:[O.outline,O.solid,O.duotone]},Le={viewBox:"0 0 24 24",variant:O.outline},ee=e=>{let{size:t,themeColor:o,rotate:a,flip:n,viewBox:l=Le.viewBox,variant:p=Le.variant,icon:c,...x}=e;if(!c)return ue(so,{});if(c==="none")return ue("span",{...x,className:i(e.className,Ce,I("k-icon",{size:t}),"k-none"),"aria-hidden":"true"});let m=typeof c=="object"&&c.name&&c.name,h=typeof c=="object"?p&&c.variants?.[p]||c.variants?.outline||c.content:void 0;return ue("span",{...x,className:i(e.className,Ce,I("k-icon",{size:t}),{[`k-svg-i-${m}`]:m,[`k-color-${o}`]:o,[`k-rotate-${a}`]:a,"k-flip-h":n==="h"||n==="both","k-flip-v":n==="v"||n==="both"}),"aria-hidden":"true",children:ue("svg",{"aria-hidden":!0,focusable:!1,xmlns:"http://www.w3.org/2000/svg",viewBox:typeof c=="object"?c.viewBox:l,dangerouslySetInnerHTML:h!==void 0?{__html:h}:void 0,children:c?void 0:e.children})})};ee.states=ao;ee.options=io;ee.className=Ce;ee.defaultOptions=Le;var _e=ee;import*as Re from"@progress/kendo-svg-icons";var lt="icon",dt="icons";import{useContext as lo}from"react";import{createContext as ro}from"react";var ct=ro({iconsType:"svg"});import{Fragment as pt,jsx as te}from"react/jsx-runtime";var me="k-icon",co=e=>e.replace(/([-_][a-z0-9])/gi,t=>t.toUpperCase().replace("-","").replace("_","")),po=[],uo={size:[r.undefined,r.xsmall,r.small,r.medium,r.large,r.xlarge,r.xxlarge,r.xxxlarge],themeColor:[d.undefined,d.base,d.primary,d.secondary,d.tertiary,d.success,d.warning,d.error,d.info],variant:[O.outline,O.solid,O.duotone]},fe={viewBox:"0 0 24 24",type:"svg",variant:O.outline},b=e=>{let{iconsType:t}=lo(ct),{size:o,themeColor:a,icon:n,type:l=t||fe.type,rotate:p,flip:c,viewBox:x=fe.viewBox,variant:m=fe.variant,...h}=e;if(!n)return te(pt,{});if((t||l)==="svg"){if(n==="none")return te(_e,{...h,className:i(e.className,me),icon:n,size:o,variant:m});let g=Re[n]?n:co(`${n}-icon`);return Re[g]?te(_e,{...h,className:i(e.className,me),icon:Re[g],size:o,themeColor:a,rotate:p,flip:c,viewBox:x,variant:m}):te(pt,{})}return te(rt,{...h,className:i(e.className,me),icon:n,size:o,themeColor:a,rotate:p,flip:c})};b.states=po;b.options=uo;b.defaultOptions=fe;b.className=me;b.moduleName=lt;b.folderName=dt;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 xo,jsx as He}from"react/jsx-runtime";var ut="k-clear-value",mo=[s.disabled,s.loading,s.readonly],fo={},C=e=>{let{disabled:t,loading:o,readonly:a,value:n}=e;return t||a||o||!n?He(xo,{}):He("span",{className:i(e.className,ut),children:He(b,{icon:"x"})})};C.states=mo;C.options=fo;C.className=ut;import{jsx as No}from"react/jsx-runtime";var we="k-input-inner",ho=[],bo={},xe={type:"text",autocomplete:"off",value:"",placeholder:""},L=e=>{let{value:t=xe.value,type:o=xe.type,placeholder:a=xe.placeholder,autocomplete:n=xe.autocomplete,disabled:l,readOnly:p,...c}=e;return No("input",{...c,type:o,className:i(e.className,we,I(we,e)),placeholder:a,autoComplete:n,defaultValue:t,disabled:l||void 0,readOnly:p||void 0})};L.states=ho;L.options=bo;L.className=we;import{jsx as mt,jsxs as go}from"react/jsx-runtime";var Be="k-input-inner",vo=[],Io={},Pe=e=>{let{value:t,placeholder:o,showValue:a,valueIcon:n,valueIconName:l,...p}=e;return go("span",{...p,className:i(e.className,Be,I(Be,e)),children:[n,!n&&l&&mt(b,{className:"k-input-value-icon",icon:l}),a&&!t&&o,a&&t&&mt("span",{className:"k-input-value-text",children:t})]})};Pe.states=vo;Pe.options=Io;Pe.className=Be;import{jsx as Ao}from"react/jsx-runtime";var Ke="k-input-inner",So=[],To={},ft={value:"",placeholder:""},ze=e=>{let{value:t=ft.value,placeholder:o=ft.placeholder,rows:a,disabled:n,...l}=e;return Ao("textarea",{...l,className:i(e.className,Ke,I(Ke,e)),placeholder:o,rows:a,defaultValue:t,disabled:n||void 0})};ze.states=So;ze.options=To;ze.className=Ke;import{Fragment as Mo,jsx as xt}from"react/jsx-runtime";var ht="k-input-loading-icon",yo=[s.disabled,s.loading],P=e=>{let{disabled:t,loading:o}=e;return t||!o?xt(Mo,{}):xt("span",{className:i(e.className,ht,"k-icon k-i-loading")})};P.states=yo;P.className=ht;import{Fragment as ko,jsx as bt}from"react/jsx-runtime";var Nt="k-input-validation-icon",Eo=[s.valid,s.invalid,s.disabled,s.loading],Oo={},_=e=>{let{valid:t,invalid:o,disabled:a,loading:n}=e,l=o?"warning-circle":"check-circle";return a||n||!!!(t||o)?bt(ko,{}):bt(b,{className:i(Nt),icon:l})};_.states=Eo;_.options=Oo;_.className=Nt;import{Fragment as _o,jsx as vt}from"react/jsx-runtime";var Co="k-input-prefix",Lo={direction:"horizontal"},he=e=>{let{direction:t=Lo.direction,...o}=e;return e.children?vt("span",{...o,className:i(Co,e.className,{[`k-input-prefix-${t}`]:t}),children:e.children}):vt(_o,{})};import{Fragment as wo,jsx as It}from"react/jsx-runtime";var Ro="k-input-suffix",Ho={direction:"horizontal"},be=e=>{let{direction:t=Ho.direction,...o}=e;return e.children?It("span",{...o,className:i(Ro,e.className,{[`k-input-suffix-${t}`]:t}),children:e.children}):It(wo,{})};import{jsx as ni}from"react/jsx-runtime";import{jsx as ri}from"react/jsx-runtime";import{jsx as Po}from"react/jsx-runtime";var gt="k-input-separator",Bo={direction:"vertical"},q=e=>{let{direction:t=Bo.direction,...o}=e;return Po("span",{...o,className:i(gt,e.className,{[`${gt}-${t}`]:t})})};var De="button",St=De;import{Fragment as Tt,jsx as J,jsxs as At}from"react/jsx-runtime";var oe="k-button",Ko=["icon-button"],zo=[s.hover,s.focus,s.active,s.selected,s.disabled,s.generating],Do={size:[r.undefined,r.xsmall,r.small,r.medium,r.large],rounded:[u.undefined,u.none,u.small,u.medium,u.large,u.full],fillMode:[f.undefined,f.solid,f.flat,f.outline,f.clear,f.link],themeColor:[d.undefined,d.base,d.primary,d.secondary,d.tertiary,d.success,d.warning,d.error,d.info,d.inverse]},Ve={showArrow:!1,arrowIconName:"chevron-down"},v=e=>{let{as:t="button",size:o,rounded:a,fillMode:n,themeColor:l,showArrow:p=Ve.showArrow,arrowIconName:c=Ve.arrowIconName,variant:x,hover:m,focus:h,active:N,selected:g,disabled:R,togglable:H,ariaDisabled:y,icon:S,iconSize:M,text:E,iconClassName:re,className:Ie,...ge}=e,Se=S!=null,Te=e.children!==void 0;return At(t,{className:i(Ie,oe,et(oe,x),I(oe,{size:o,rounded:a,fillMode:n,themeColor:l}),$(oe,{hover:m,focus:h,active:N,disabled:R||y,selected:g}),{"k-icon-button":!E&&!Te&&Se}),"aria-pressed":H?g?"true":"false":void 0,...ge,"aria-disabled":y?"true":void 0,disabled:R||void 0,children:[typeof S=="string"&&S&&J(b,{className:i(re,"k-button-icon"),icon:S,size:M}),S&&typeof S!="string"&&J(Tt,{children:S}),E?At(Tt,{children:[E&&J("span",{className:"k-button-text",children:E}),e.children]}):e.children&&J("span",{className:"k-button-text",children:e.children}),p&&J("span",{className:"k-menu-button-arrow k-button-arrow",children:J(b,{icon:c})})]})};v.states=zo;v.options=Do;v.variants=Ko;v.className=oe;v.defaultOptions=Ve;v.moduleName=De;v.folderName=St;v.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 Vo}from"react/jsx-runtime";var U=e=>Vo(v,{children:"Button",...e});import{Fragment as yt,jsx as k,jsxs as Fe}from"react/jsx-runtime";var Fo=T.states,Uo=T.defaultOptions,$o=T.options,Xo=[{name:"prefix",title:"Prefix"},{name:"suffix",title:"Suffix"},{name:"clear-button",title:"`Clear` Button"},{name:"validation-icon",title:"Validation Icon"},{name:"separators",title:"Separators"}],qo=[],G=e=>{let{modifiers:t,valid:o,invalid:a,loading:n,disabled:l,readonly:p,...c}=e,x=t?.prefix,m=t?.suffix,h=t?.["clear-button"],N=t?.["validation-icon"],g=t?.separators;return Fe(T,{...c,valid:o,invalid:a,loading:n,disabled:l,readonly:p,style:{width:300},children:[x&&Fe(yt,{children:[k(he,{children:k(b,{icon:"lock"})}),g&&k(q,{})]}),k(L,{placeholder:"Placeholder",value:"Value"}),N&&k(_,{valid:o,invalid:a,loading:n,disabled:l}),k(P,{loading:n,disabled:l}),h&&k(C,{loading:n,disabled:l,readonly:p,value:"Value"}),m&&Fe(yt,{children:[g&&k(q,{}),k(be,{children:k(U,{size:c.size,fillMode:"clear",children:"Send"})})]})]})};G.options=$o;G.states=Fo;G.variants=qo;G.defaultOptions=Uo;G.modifiers=Xo;G.className=T.className;var Ue="searchbox",Mt=Ue;import{jsx as ne,jsxs as Yo}from"react/jsx-runtime";var Et="k-searchbox",Jo=[s.hover,s.focus,s.valid,s.invalid,s.required,s.disabled,s.loading],Go={size:[r.undefined,r.small,r.medium,r.large],rounded:[u.undefined,u.none,u.small,u.medium,u.large,u.full],fillMode:[f.undefined,f.solid,f.flat,f.outline]},$e={showIcon:!0,icon:"search"},K=e=>{let{value:t,placeholder:o,size:a,rounded:n,fillMode:l,hover:p,focus:c,valid:x,invalid:m,required:h,loading:N,disabled:g,showIcon:R=$e.showIcon,icon:H=$e.icon,"aria-label":y,...S}=e;return Yo(T,{...S,size:a,rounded:n,fillMode:l,hover:p,focus:c,valid:x,invalid:m,required:h,loading:N,disabled:g,className:i(e.className,Et),children:[R&&ne(b,{className:"k-input-icon",icon:H}),ne(L,{placeholder:o,value:t,"aria-label":y}),ne(P,{...e}),ne(_,{...e}),ne(C,{...e})]})};K.states=Jo;K.options=Go;K.className=Et;K.defaultOptions=$e;K.moduleName=Ue;K.folderName=Mt;import{jsx as ss}from"react/jsx-runtime";var Xe="textbox",Ot=Xe;import{Fragment as kt,jsx as z,jsxs as qe}from"react/jsx-runtime";var Ct="k-textbox",Wo=[s.hover,s.focus,s.valid,s.invalid,s.required,s.disabled,s.loading,s.readonly],Qo={size:[r.undefined,r.small,r.medium,r.large],rounded:[u.undefined,u.none,u.small,u.medium,u.large,u.full],fillMode:[f.undefined,f.solid,f.flat,f.outline]},Ne={showClearButton:!0,showValidationIcon:!0,separators:!0},A=e=>{let{size:t,rounded:o,fillMode:a,separators:n=Ne.separators,showClearButton:l=Ne.showClearButton,showValidationIcon:p=Ne.showValidationIcon,prefix:c,suffix:x,type:m,value:h,placeholder:N,hover:g,focus:R,valid:H,invalid:y,required:S,loading:M,disabled:E,readonly:re,id:Ie,"aria-label":ge,"aria-describedby":Se,...Te}=e;return qe(T,{...Te,size:t,rounded:o,fillMode:a,hover:g,focus:R,valid:H,invalid:y,required:S,loading:M,disabled:E,readonly:re,className:i(e.className,Ct),children:[c&&qe(kt,{children:[z(he,{children:c}),n&&z(q,{})]}),z(L,{id:Ie,placeholder:N,value:h,type:m,disabled:E,"aria-label":ge,"aria-describedby":Se,"aria-invalid":y?"true":void 0}),p&&z(_,{valid:H,invalid:y,loading:M,disabled:E}),z(P,{loading:M,disabled:E}),l&&z(C,{loading:M,disabled:E,readonly:re,value:h}),x&&qe(kt,{children:[n&&z(q,{}),z(be,{children:x})]})]})};A.states=Wo;A.options=Qo;A.className=Ct;A.defaultOptions=Ne;A.moduleName=Xe;A.folderName=Ot;A.ariaSpec={selector:".k-textbox",rules:[{selector:".k-textbox > .k-input-inner",attribute:"role=textbox or nodeName=input",usage:"Describes the role of the component."},{selector:".k-textbox > .k-input-inner",attribute:"label for or aria-label or aria-labelledby (when has accessible name)",usage:"The input requires an accessible name (provided by consuming app)."},{selector:".k-textbox > .k-input-inner",attribute:"aria-invalid=true (when invalid)",usage:"Rendered when the TextBox is in an invalid state."},{selector:".k-textbox > .k-input-inner",attribute:"aria-describedby (when has hint or error)",usage:"Points to the hint or error message for the input."},{selector:".k-textbox.k-disabled > .k-input-inner",attribute:"disabled=disabled or aria-disabled=true",usage:"Rendered when the TextBox is disabled."}]};var ae=A;import{jsx as Zo}from"react/jsx-runtime";var Lt=e=>Zo(ae,{...e});import{Fragment as As,jsx as Ts}from"react/jsx-runtime";import{jsx as jo}from"react/jsx-runtime";var _t=e=>jo(v,{icon:"folder",...e,"aria-label":e["aria-label"]||"Folder",children:void 0});import{jsx as en}from"react/jsx-runtime";var Rt=e=>en(v,{icon:"folder",children:"Button",...e});import{jsx as Je}from"react/jsx-runtime";var tn=v.options,on=v.states,nn={...v.defaultOptions,variant:"text"},an=[{name:"icon-only",title:"Icon Only"},{name:"icon-and-text",title:"Icon & Text"},{name:"text",title:"Text"}],sn=[],Y=e=>{let{variant:t,...o}=e;switch(t){case"icon-only":return Je(_t,{...o,icon:"star"});case"icon-and-text":return Je(Rt,{...o,icon:"star",children:"Button"});default:return Je(U,{...o,children:"Button"})}};Y.options=tn;Y.states=on;Y.variants=an;Y.defaultOptions=nn;Y.modifiers=sn;Y.className=v.className;import{Fragment as Ys,jsx as Gs}from"react/jsx-runtime";import{jsx as js}from"react/jsx-runtime";import{jsx as Ge}from"react/jsx-runtime";var rn=A.states,ln=A.defaultOptions,dn=A.options,cn=[{name:"prefix",title:"Prefix"},{name:"suffix",title:"Suffix"},{name:"clear-button",title:"`Clear` Button"}],pn=[],W=e=>{let{modifiers:t,...o}=e,a={};return Object.keys(t||{}).forEach(n=>{switch(n){case"prefix":a.prefix=t?.[n]?Ge(b,{icon:"lock"}):void 0;break;case"suffix":a.suffix=t?.[n]?Ge(U,{size:o.size,fillMode:"clear",children:"Send"}):void 0;break;case"clear-button":a.showClearButton=t?.[n];break;default:break}}),Ge(Lt,{value:"Value",style:{width:300},...o,...a})};W.options=dn;W.states=rn;W.variants=pn;W.defaultOptions=ln;W.modifiers=cn;W.className=A.className;import{jsx as D,jsxs as Ye}from"react/jsx-runtime";var Ht="k-actionsheet-titlebar",un={},ie=e=>{let{title:t,subtitle:o,actionsStart:a,actionsEnd:n,filter:l,input:p,inputValue:c,inputPlaceholder:x,adaptive:m,titleId:h,children:N,...g}=e;return Ye("div",{...g,className:i(e.className,Ht),children:[Ye("div",{className:"k-actionsheet-titlebar-group",children:[a&&D("div",{className:"k-actionsheet-actions",children:a}),!N&&Ye("div",{className:"k-actionsheet-title",id:h,children:[t&&D("div",{className:"k-text-center",children:t}),o&&D("div",{className:"k-actionsheet-subtitle k-text-center",children:o})]}),N&&D("div",{className:"k-actionsheet-title",id:h,children:N}),n&&D("div",{className:"k-actionsheet-actions",children:n})]}),(p||l)&&D("div",{className:"k-actionsheet-titlebar-group k-actionsheet-filter",children:p?D(A,{value:c,placeholder:x,size:m?"large":"medium","aria-label":t||x||"Input"}):D(K,{placeholder:"Filter",size:m?"large":"medium","aria-label":"Filter options"})})]})};ie.className=Ht;ie.defaultOptions=un;import{jsx as We,jsxs as hn}from"react/jsx-runtime";var Qe="k-actionsheet-view",mn=[],fn={},xn={},Q=e=>{let{adaptive:t,animated:o,children:a,header:n,footer:l,titleId:p,...c}=e,x=n?.type===ie&&We(ie,{adaptive:t,titleId:p,...n?.props}),m=l?.type===Oe&&We(Oe,{...l?.props});return hn("div",{...c,className:i(e.className,Qe,{[`${Qe}-animated`]:o}),children:[x,We("div",{className:"k-actionsheet-content",children:a}),m]})};Q.states=mn;Q.options=fn;Q.className=Qe;Q.defaultOptions=xn;var Ze="action-sheet",wt=Ze;var je="overlay",Bt=je;import{jsx as In}from"react/jsx-runtime";var Pt="k-overlay",bn=[],Nn={},vn={},V=e=>{let{...t}=e;return In("div",{...t,className:i(e.className,Pt),children:e.children})};V.states=bn;V.options=Nn;V.className=Pt;V.defaultOptions=vn;V.moduleName=je;V.folderName=Bt;import{jsx as ve,jsxs as Tn}from"react/jsx-runtime";var Kt="k-actionsheet",gn=[],Sn={},se={side:"bottom",fullscreen:!1,adaptive:!1,overlay:!0},F=e=>{let{side:t=se.side,fullscreen:o=se.fullscreen,adaptive:a=se.adaptive,overlay:n=se.overlay,template:l,children:p,header:c,footer:x,id:m,...h}=e,N=m&&!l&&c?`${m}-title`:void 0;return Tn("div",{className:"k-actionsheet-container",children:[n&&ve(V,{}),ve(w,{animationStyle:{[`${o===!0?"top":t}`]:0,[`${o===!0?"width":null}`]:"100%",[`${o===!0?"height":null}`]:"100%",[`${t==="top"||t==="bottom"?"width":null}`]:"100%",[`${t==="left"||t==="right"?"height":null}`]:"100%"},children:ve("div",{...h,id:m,role:"dialog","aria-modal":n?"true":void 0,"aria-labelledby":N,className:i(e.className,Kt,{[`k-actionsheet-${t}`]:o===!1,"k-actionsheet-fullscreen":o===!0,"k-adaptive-actionsheet":a}),children:l||ve(Q,{header:c,footer:x,adaptive:a,titleId:N,...e,children:p})})})]})};F.states=gn;F.options=Sn;F.className=Kt;F.defaultOptions=se;F.moduleName=Ze;F.folderName=wt;F.ariaSpec={selector:".k-actionsheet",rules:[{selector:".k-actionsheet",attribute:"role=dialog",usage:"Announces the dialog role of the component."},{selector:".k-actionsheet",attribute:"aria-labelledby (when has title)",usage:"Associates the title of the action sheet."},{selector:".k-actionsheet",attribute:"aria-hidden=true/false (when hidden)",usage:"Announces the hidden state of the ActionSheet container."},{selector:".k-actionsheet",attribute:"aria-modal=true (when modal)",usage:"Announces that the action sheet is modal."},{selector:".k-actionsheet .k-actionsheet-title",attribute:"id",usage:"Used to associate the title with the action sheet wrapper element."}]};var Kr=F;export{Kt as ACTIONSHEET_CLASSNAME,F as ActionSheet,Kr as default};