UNPKG

@progress/kendo-themes-html

Version:

A collection of HTML helpers used for developing Kendo UI themes

2 lines (1 loc) 24.8 kB
var Rt=Object.create;var be=Object.defineProperty;var Kt=Object.getOwnPropertyDescriptor;var _t=Object.getOwnPropertyNames;var Ht=Object.getPrototypeOf,Vt=Object.prototype.hasOwnProperty;var Ut=(t,e)=>{for(var o in e)be(t,o,{get:e[o],enumerable:!0})},Ze=(t,e,o,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of _t(e))!Vt.call(t,n)&&n!==o&&be(t,n,{get:()=>e[n],enumerable:!(a=Kt(e,n))||a.enumerable});return t};var Ft=(t,e,o)=>(o=t!=null?Rt(Ht(t)):{},Ze(e||!t||!t.__esModule?be(o,"default",{value:t,enumerable:!0}):o,t)),$t=t=>Ze(be({},"__esModule",{value:!0}),t);var dn={};Ut(dn,{OneTimePasswordNoSpace:()=>Ye});module.exports=$t(dn);var d=(...t)=>t.filter(e=>e!==!0&&!!e).map(e=>Array.isArray(e)?d(...e):typeof e=="object"?Object.keys(e).map((o,a)=>e[a]||e[o]&&o||null).filter(o=>o!==null).join(" "):e).filter(e=>!!e).join(" ");var h=(t,e)=>d({[`${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"}),R=(t,e)=>{let{valid:o,invalid:a,hover:n,focus:i,checked:l,active:f,selected:g,disabled:I,indeterminate:b,loading:y,empty:w,readonly:V,highlighted:U,...D}=e;return d({"k-valid":o,"k-invalid":a,"k-hover":n,"k-focus":i,"k-checked":l,"k-active":f,"k-selected":g,"k-disabled":I,"k-indeterminate":b&&!l,"k-loading":y,"k-empty":w,"k-readonly":V,"k-highlighted":U},Object.keys(D).reduce((M,A)=>(A.startsWith("k-")?M[A]=D[A]:M[`k-${A}`]=D[A],M),{}))};function je(t,e){if(!e)return{};let o=Array.isArray(e)?e:[e];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"},c={undefined:void 0,solid:"solid",flat:"flat",outline:"outline",clear:"clear",link:"link"},K={undefined:void 0,outline:"outline",solid:"solid",duotone:"duotone"},p={undefined:void 0,inherit:"inherit",base:"base",primary:"primary",secondary:"secondary",tertiary:"tertiary",info:"info",success:"success",warning:"warning",error:"error",inverse:"inverse"},s={open:"open",hover:"hover",focus:"focus",active:"active",selected:"selected",disabled:"disabled",valid:"valid",invalid:"invalid",loading:"loading",required:"required",empty:"empty",indeterminate:"indeterminate",checked:"checked",readonly:"readonly",highlighted:"highlighted",generating:"generating",expanded:"expanded"};var Te=require("react/jsx-runtime"),he="k-otp",Xt=[s.invalid,s.disabled],Wt={size:[r.undefined,r.small,r.medium,r.large]},Jt={},O=t=>{let{size:e,invalid:o,disabled:a,...n}=t;return(0,Te.jsxs)("div",{...n,role:"group",className:d(t.className,he,h(he,{size:e}),R(he,{invalid:o,disabled:a})),children:[(0,Te.jsx)("input",{type:"hidden","aria-hidden":"true"}),t.children]})};O.states=Xt;O.options=Wt;O.className=he;O.defaultOptions=Jt;O.moduleName="otp";O.folderName="otp";O.ariaSpec={selector:".k-otp",rules:[{selector:".k-otp",attribute:"role=group",usage:"Sets the proper role for the OTP."},{selector:".k-otp > input",attribute:"type=hidden",usage:"The hidden input holding the OTP inputs value."},{selector:".k-otp > input",attribute:"aria-hidden=true",usage:"Hides the hidden input from assistive technologies."},{selector:".k-otp .k-otp-input > .k-input-inner",attribute:"label for or aria-label or aria-labelledby",usage:"The input needs an accessible name to be assigned to it."},{selector:".k-otp .k-otp-input > .k-input-inner",attribute:"autocomplete=off",usage:"Sets the default autocomplete for the input."},{selector:".k-otp .k-otp-input > .k-input-inner",attribute:"aria-describedby (when has hint or error)",usage:"Points to the hint or error message for the OTP inputs."},{selector:".k-otp.k-invalid .k-otp-input > .k-input-inner, .k-otp.ng-invalid .k-otp-input > .k-input-inner",attribute:"aria-invalid=true",usage:"Rendered only when the OTP is in a form and announces the invalid state."},{selector:".k-otp.k-disabled .k-otp-input > .k-input-inner",attribute:"disabled=disabled or aria-disabled=true",usage:"Rendered only when the OTP is disabled."}]};var Be="textbox",et=Be;var ne="input",ge=ne;var tt=require("react/jsx-runtime"),Ie="k-input",Qt=[s.hover,s.focus,s.valid,s.invalid,s.required,s.disabled,s.loading,s.readonly],Yt={size:[r.undefined,r.small,r.medium,r.large],rounded:[u.undefined,u.none,u.small,u.medium,u.large,u.full],fillMode:[c.undefined,c.solid,c.flat,c.outline]},Zt={},k=t=>{let{hover:e,focus:o,disabled:a,invalid:n,valid:i,loading:l,readonly:f,size:g,rounded:I,fillMode:b,...y}=t;return(0,tt.jsx)("span",{...y,className:d(t.className,Ie,h(Ie,{size:g,rounded:I,fillMode:b}),R(Ie,{hover:e,focus:o,disabled:a,invalid:n,valid:i,loading:l,readonly:f}))})};k.states=Qt;k.options=Yt;k.className=Ie;k.defaultOptions=Zt;k.moduleName=ne;k.folderName=ge;var ot=require("react/jsx-runtime"),Oe="k-picker",jt=[s.hover,s.focus,s.valid,s.invalid,s.required,s.disabled,s.loading,s.readonly],eo={size:[r.undefined,r.small,r.medium,r.large],rounded:[u.undefined,u.none,u.small,u.medium,u.large,u.full],fillMode:[c.undefined,c.solid,c.flat,c.outline]},to={},J=t=>{let{hover:e,focus:o,disabled:a,invalid:n,valid:i,loading:l,readonly:f,size:g,rounded:I,fillMode:b,...y}=t;return(0,ot.jsx)("span",{...y,className:d(t.className,Oe,h(Oe,{size:g,rounded:I,fillMode:b}),R(Oe,{hover:e,focus:o,disabled:a,invalid:n,valid:i,loading:l,readonly:f})),children:t.children})};J.states=jt;J.options=eo;J.className=Oe;J.defaultOptions=to;J.moduleName=ne;J.folderName=ge;var ae=require("react/jsx-runtime"),Re="k-font-icon",oo=[],no={size:[r.undefined,r.xsmall,r.small,r.medium,r.large,r.xlarge,r.xxlarge,r.xxxlarge],themeColor:[p.undefined,p.base,p.primary,p.secondary,p.tertiary,p.success,p.warning,p.error,p.info]},ao={},ie=t=>{let{size:e,themeColor:o,icon:a,rotate:n,flip:i,...l}=t;return a?(0,ae.jsx)("span",{...l,className:d(t.className,Re,h(Re,{size:e}),{[`k-i-${a}`]:a,[`k-color-${o}`]:o,[`k-rotate-${n}`]:n,"k-flip-h":i==="h"||i==="both","k-flip-v":i==="v"||i==="both"}),"aria-hidden":"true"}):(0,ae.jsx)(ae.Fragment,{})};ie.states=oo;ie.options=no;ie.className=Re;ie.defaultOptions=ao;var nt=ie;var $=require("react/jsx-runtime"),Ke="k-svg-icon",io=[],so={size:[r.undefined,r.xsmall,r.small,r.medium,r.large,r.xlarge,r.xxlarge,r.xxxlarge],themeColor:[p.undefined,p.base,p.primary,p.secondary,p.tertiary,p.success,p.warning,p.error,p.info],variant:[K.outline,K.solid,K.duotone]},_e={viewBox:"0 0 24 24",variant:K.outline},se=t=>{var y,w;let{size:e,themeColor:o,rotate:a,flip:n,viewBox:i=_e.viewBox,variant:l=_e.variant,icon:f,...g}=t;if(!f)return(0,$.jsx)($.Fragment,{});if(f==="none")return(0,$.jsx)("span",{...g,className:d(t.className,Ke,h("k-icon",{size:e}),"k-none"),"aria-hidden":"true"});let I=typeof f=="object"&&f.name&&f.name,b=typeof f=="object"?l&&((y=f.variants)==null?void 0:y[l])||((w=f.variants)==null?void 0:w.outline)||f.content:void 0;return(0,$.jsx)("span",{...g,className:d(t.className,Ke,h("k-icon",{size:e}),{[`k-svg-i-${I}`]:I,[`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:(0,$.jsx)("svg",{"aria-hidden":!0,focusable:!1,xmlns:"http://www.w3.org/2000/svg",viewBox:typeof f=="object"?f.viewBox:i,dangerouslySetInnerHTML:b!==void 0?{__html:b}:void 0,children:f?void 0:t.children})})};se.states=io;se.options=so;se.className=Ke;se.defaultOptions=_e;var He=se;var Ve=Ft(require("@progress/kendo-svg-icons"));var at="icon",it="icons";var lt=require("react");var st=require("react"),rt=(0,st.createContext)({iconsType:"svg"});var _=require("react/jsx-runtime"),Ne="k-icon",ro=t=>t.replace(/([-_][a-z0-9])/gi,e=>e.toUpperCase().replace("-","").replace("_","")),lo=[],po={size:[r.undefined,r.xsmall,r.small,r.medium,r.large,r.xlarge,r.xxlarge,r.xxxlarge],themeColor:[p.undefined,p.base,p.primary,p.secondary,p.tertiary,p.success,p.warning,p.error,p.info],variant:[K.outline,K.solid,K.duotone]},ve={viewBox:"0 0 24 24",type:"svg",variant:K.outline},T=t=>{let{iconsType:e}=(0,lt.useContext)(rt),{size:o,themeColor:a,icon:n,type:i=e||ve.type,rotate:l,flip:f,viewBox:g=ve.viewBox,variant:I=ve.variant,...b}=t;if(!n)return(0,_.jsx)(_.Fragment,{});if((e||i)==="svg"){if(n==="none")return(0,_.jsx)(He,{...b,className:d(t.className,Ne),icon:n,size:o,variant:I});let w=Ve[n]?n:ro(`${n}-icon`);return Ve[w]?(0,_.jsx)(He,{...b,className:d(t.className,Ne),icon:Ve[w],size:o,themeColor:a,rotate:l,flip:f,viewBox:g,variant:I}):(0,_.jsx)(_.Fragment,{})}return(0,_.jsx)(nt,{...b,className:d(t.className,Ne),icon:n,size:o,themeColor:a,rotate:l,flip:f})};T.states=lo;T.options=po;T.defaultOptions=ve;T.className=Ne;T.moduleName=at;T.folderName=it;T.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 Q=require("react/jsx-runtime"),dt="k-clear-value",uo=[s.disabled,s.loading,s.readonly],co={},G=t=>{let{disabled:e,loading:o,readonly:a,value:n}=t;return e||a||o||!n?(0,Q.jsx)(Q.Fragment,{}):(0,Q.jsx)("span",{className:d(t.className,dt),children:(0,Q.jsx)(T,{icon:"x"})})};G.states=uo;G.options=co;G.className=dt;var pt=require("react/jsx-runtime"),Ue="k-input-inner",mo=[],fo={},ye={type:"text",autocomplete:"off",value:"",placeholder:""},q=t=>{let{value:e=ye.value,type:o=ye.type,placeholder:a=ye.placeholder,autocomplete:n=ye.autocomplete,disabled:i,readOnly:l,...f}=t;return(0,pt.jsx)("input",{...f,type:o,className:d(t.className,Ue,h(Ue,t)),placeholder:a,autoComplete:n,defaultValue:e,disabled:i||void 0,readOnly:l||void 0})};q.states=mo;q.options=fo;q.className=Ue;var re=require("react/jsx-runtime"),Fe="k-input-inner",xo=[],bo={},$e=t=>{let{value:e,placeholder:o,showValue:a,valueIcon:n,valueIconName:i,...l}=t;return(0,re.jsxs)("span",{...l,className:d(t.className,Fe,h(Fe,t)),children:[n,!n&&i&&(0,re.jsx)(T,{className:"k-input-value-icon",icon:i}),a&&!e&&o,a&&e&&(0,re.jsx)("span",{className:"k-input-value-text",children:e})]})};$e.states=xo;$e.options=bo;$e.className=Fe;var ct=require("react/jsx-runtime"),Ge="k-input-inner",ho=[],To={},ut={value:"",placeholder:""},qe=t=>{let{value:e=ut.value,placeholder:o=ut.placeholder,rows:a,disabled:n,...i}=t;return(0,ct.jsx)("textarea",{...i,className:d(t.className,Ge,h(Ge,t)),placeholder:o,rows:a,defaultValue:e,disabled:n||void 0})};qe.states=ho;qe.options=To;qe.className=Ge;var le=require("react/jsx-runtime"),mt="k-input-loading-icon",go=[s.disabled,s.loading],Y=t=>{let{disabled:e,loading:o}=t;return e||!o?(0,le.jsx)(le.Fragment,{}):(0,le.jsx)("span",{className:d(t.className,mt,"k-icon k-i-loading")})};Y.states=go;Y.className=mt;var de=require("react/jsx-runtime"),ft="k-input-validation-icon",Io=[s.valid,s.invalid,s.disabled,s.loading],Oo={},X=t=>{let{valid:e,invalid:o,disabled:a,loading:n}=t,i=o?"warning-circle":"check-circle";return a||n||!!!(e||o)?(0,de.jsx)(de.Fragment,{}):(0,de.jsx)(T,{className:d(ft),icon:i})};X.states=Io;X.options=Oo;X.className=ft;var pe=require("react/jsx-runtime"),No="k-input-prefix",vo={direction:"horizontal"},we=t=>{let{direction:e=vo.direction,...o}=t;return t.children?(0,pe.jsx)("span",{...o,className:d(No,t.className,{[`k-input-prefix-${e}`]:e}),children:t.children}):(0,pe.jsx)(pe.Fragment,{})};var ue=require("react/jsx-runtime"),yo="k-input-suffix",wo={direction:"horizontal"},Se=t=>{let{direction:e=wo.direction,...o}=t;return t.children?(0,ue.jsx)("span",{...o,className:d(yo,t.className,{[`k-input-suffix-${e}`]:e}),children:t.children}):(0,ue.jsx)(ue.Fragment,{})};var So=require("react/jsx-runtime");var Po=require("react/jsx-runtime");var bt=require("react/jsx-runtime"),xt="k-input-separator",Mo={direction:"vertical"},Z=t=>{let{direction:e=Mo.direction,...o}=t;return(0,bt.jsx)("span",{...o,className:d(xt,t.className,{[`${xt}-${e}`]:e})})};var Xe="button",ht=Xe;var C=require("react/jsx-runtime"),ce="k-button",ko=["icon-button"],Co=[s.hover,s.focus,s.active,s.selected,s.disabled,s.generating],Eo={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:[c.undefined,c.solid,c.flat,c.outline,c.clear,c.link],themeColor:[p.undefined,p.base,p.primary,p.secondary,p.tertiary,p.success,p.warning,p.error,p.info,p.inverse]},We={showArrow:!1,arrowIconName:"chevron-down"},N=t=>{let{as:e="button",size:o,rounded:a,fillMode:n,themeColor:i,showArrow:l=We.showArrow,arrowIconName:f=We.arrowIconName,variant:g,hover:I,focus:b,active:y,selected:w,disabled:V,togglable:U,ariaDisabled:D,icon:M,iconSize:A,text:B,iconClassName:xe,className:Le,...Ae}=t,ze=M!=null,De=t.children!==void 0;return(0,C.jsxs)(e,{className:d(Le,ce,je(ce,g),h(ce,{size:o,rounded:a,fillMode:n,themeColor:i}),R(ce,{hover:I,focus:b,active:y,disabled:V||D,selected:w}),{"k-icon-button":!B&&!De&&ze}),"aria-pressed":U?w?"true":"false":void 0,...Ae,"aria-disabled":D?"true":void 0,disabled:V||void 0,children:[typeof M=="string"&&M&&(0,C.jsx)(T,{className:d(xe,"k-button-icon"),icon:M,size:A}),M&&typeof M!="string"&&(0,C.jsx)(C.Fragment,{children:M}),B?(0,C.jsxs)(C.Fragment,{children:[B&&(0,C.jsx)("span",{className:"k-button-text",children:B}),t.children]}):t.children&&(0,C.jsx)("span",{className:"k-button-text",children:t.children}),l&&(0,C.jsx)("span",{className:"k-menu-button-arrow k-button-arrow",children:(0,C.jsx)(T,{icon:f})})]})};N.states=Co;N.options=Eo;N.variants=ko;N.className=ce;N.defaultOptions=We;N.moduleName=Xe;N.folderName=ht;N.ariaSpec={selector:".k-button",rules:[{selector:".k-button",attribute:"role=button or nodeName=button",usage:"The button role is implicit from the native <button> element."},{selector:".k-button",attribute:"aria-label (when icon-only)",usage:"Required for icon-only buttons that have no visible text."},{selector:".k-button",attribute:"aria-pressed (when togglable)",usage:"Indicates the pressed state of a toggle button."},{selector:".k-button",attribute:"disabled (when disabled)",usage:"Rendered when the button is disabled."}]};var Tt=require("react/jsx-runtime"),W=t=>(0,Tt.jsx)(N,{children:"Button",...t});var v=require("react/jsx-runtime"),Lo=k.states,Ao=k.defaultOptions,zo=k.options,Do=[{name:"prefix",title:"Prefix"},{name:"suffix",title:"Suffix"},{name:"clear-button",title:"`Clear` Button"},{name:"validation-icon",title:"Validation Icon"},{name:"separators",title:"Separators"}],Bo=[],j=t=>{let{modifiers:e,valid:o,invalid:a,loading:n,disabled:i,readonly:l,...f}=t,g=e==null?void 0:e.prefix,I=e==null?void 0:e.suffix,b=e==null?void 0:e["clear-button"],y=e==null?void 0:e["validation-icon"],w=e==null?void 0:e.separators;return(0,v.jsxs)(k,{...f,valid:o,invalid:a,loading:n,disabled:i,readonly:l,style:{width:300},children:[g&&(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(we,{children:(0,v.jsx)(T,{icon:"lock"})}),w&&(0,v.jsx)(Z,{})]}),(0,v.jsx)(q,{placeholder:"Placeholder",value:"Value"}),y&&(0,v.jsx)(X,{valid:o,invalid:a,loading:n,disabled:i}),(0,v.jsx)(Y,{loading:n,disabled:i}),b&&(0,v.jsx)(G,{loading:n,disabled:i,readonly:l,value:"Value"}),I&&(0,v.jsxs)(v.Fragment,{children:[w&&(0,v.jsx)(Z,{}),(0,v.jsx)(Se,{children:(0,v.jsx)(W,{size:f.size,fillMode:"clear",children:"Send"})})]})]})};j.options=zo;j.states=Lo;j.variants=Bo;j.defaultOptions=Ao;j.modifiers=Do;j.className=k.className;var S=require("react/jsx-runtime"),gt="k-textbox",Ro=[s.hover,s.focus,s.valid,s.invalid,s.required,s.disabled,s.loading,s.readonly],Ko={size:[r.undefined,r.small,r.medium,r.large],rounded:[u.undefined,u.none,u.small,u.medium,u.large,u.full],fillMode:[c.undefined,c.solid,c.flat,c.outline]},Pe={showClearButton:!0,showValidationIcon:!0,separators:!0},x=t=>{let{size:e,rounded:o,fillMode:a,separators:n=Pe.separators,showClearButton:i=Pe.showClearButton,showValidationIcon:l=Pe.showValidationIcon,prefix:f,suffix:g,type:I,value:b,placeholder:y,hover:w,focus:V,valid:U,invalid:D,required:M,loading:A,disabled:B,readonly:xe,id:Le,"aria-label":Ae,"aria-describedby":ze,...De}=t;return(0,S.jsxs)(k,{...De,size:e,rounded:o,fillMode:a,hover:w,focus:V,valid:U,invalid:D,required:M,loading:A,disabled:B,readonly:xe,className:d(t.className,gt),children:[f&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(we,{children:f}),n&&(0,S.jsx)(Z,{})]}),(0,S.jsx)(q,{id:Le,placeholder:y,value:b,type:I,disabled:B,"aria-label":Ae,"aria-describedby":ze,"aria-invalid":D?"true":void 0}),l&&(0,S.jsx)(X,{valid:U,invalid:D,loading:A,disabled:B}),(0,S.jsx)(Y,{loading:A,disabled:B}),i&&(0,S.jsx)(G,{loading:A,disabled:B,readonly:xe,value:b}),g&&(0,S.jsxs)(S.Fragment,{children:[n&&(0,S.jsx)(Z,{}),(0,S.jsx)(Se,{children:g})]})]})};x.states=Ro;x.options=Ko;x.className=gt;x.defaultOptions=Pe;x.moduleName=Be;x.folderName=et;x.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 me=x;var Ot=require("react/jsx-runtime"),It=t=>(0,Ot.jsx)(me,{...t});var Nt=require("react/jsx-runtime");var yt=require("react/jsx-runtime"),vt=t=>(0,yt.jsx)(N,{icon:"folder",...t,"aria-label":t["aria-label"]||"Folder",children:void 0});var St=require("react/jsx-runtime"),wt=t=>(0,St.jsx)(N,{icon:"folder",children:"Button",...t});var Me=require("react/jsx-runtime"),_o=N.options,Ho=N.states,Vo={...N.defaultOptions,variant:"text"},Uo=[{name:"icon-only",title:"Icon Only"},{name:"icon-and-text",title:"Icon & Text"},{name:"text",title:"Text"}],Fo=[],ee=t=>{let{variant:e,...o}=t;switch(e){case"icon-only":return(0,Me.jsx)(vt,{...o,icon:"star"});case"icon-and-text":return(0,Me.jsx)(wt,{...o,icon:"star",children:"Button"});default:return(0,Me.jsx)(W,{...o,children:"Button"})}};ee.options=_o;ee.states=Ho;ee.variants=Uo;ee.defaultOptions=Vo;ee.modifiers=Fo;ee.className=N.className;var Pt=require("react/jsx-runtime");var $o=require("react/jsx-runtime");var ke=require("react/jsx-runtime"),Go=x.states,qo=x.defaultOptions,Xo=x.options,Wo=[{name:"prefix",title:"Prefix"},{name:"suffix",title:"Suffix"},{name:"clear-button",title:"`Clear` Button"}],Jo=[],te=t=>{let{modifiers:e,...o}=t,a={};return Object.keys(e||{}).forEach(n=>{switch(n){case"prefix":a.prefix=e!=null&&e[n]?(0,ke.jsx)(T,{icon:"lock"}):void 0;break;case"suffix":a.suffix=e!=null&&e[n]?(0,ke.jsx)(W,{size:o.size,fillMode:"clear",children:"Send"}):void 0;break;case"clear-button":a.showClearButton=e==null?void 0:e[n];break;default:break}}),(0,ke.jsx)(It,{value:"Value",style:{width:300},...o,...a})};te.options=Xo;te.states=Go;te.variants=Jo;te.defaultOptions=qo;te.modifiers=Wo;te.className=x.className;var kt=require("react/jsx-runtime"),Mt="k-otp-input",Qo=[s.hover,s.focus,s.valid,s.invalid,s.required,s.disabled,s.readonly],Yo={size:[r.undefined,r.small,r.medium,r.large],rounded:[u.undefined,u.none,u.small,u.medium,u.large,u.full],fillMode:[c.undefined,c.solid,c.flat,c.outline]},Ce={size:x.defaultOptions.size,rounded:x.defaultOptions.rounded,fillMode:x.defaultOptions.fillMode},m=t=>{let{size:e=Ce.size,rounded:o=Ce.rounded,fillMode:a=Ce.fillMode,type:n,value:i,placeholder:l,hover:f,focus:g,valid:I,invalid:b,required:y,disabled:w,readonly:V,...U}=t;return(0,kt.jsx)(x,{...U,size:e,rounded:o,fillMode:a,type:n,value:i,placeholder:l,hover:f,focus:g,valid:I,invalid:b,required:y,disabled:w,readonly:V,showClearButton:!1,showValidationIcon:!1,className:d(t.className,Mt)})};m.states=Qo;m.options=Yo;m.className=Mt;m.defaultOptions=Ce;var Et=require("react/jsx-runtime"),Ct="k-otp-separator",Zo=[],jo={},en={},F=t=>{let{children:e,...o}=t;return(0,Et.jsx)("div",{...o,className:d(t.className,Ct),children:e})};F.states=Zo;F.options=jo;F.className=Ct;F.defaultOptions=en;var z=require("react/jsx-runtime"),Lt=({hover:t,focus:e,invalid:o,fillMode:a,size:n,disabled:i,...l})=>(0,z.jsx)(O,{invalid:o,size:n,"aria-label":"One-time password",children:(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(m,{size:n,fillMode:a,invalid:o,disabled:i,focus:e,hover:t,"aria-label":"Digit 1 of 6",...l}),(0,z.jsx)(m,{size:n,fillMode:a,invalid:o,disabled:i,"aria-label":"Digit 2 of 6",...l}),(0,z.jsx)(m,{size:n,fillMode:a,invalid:o,disabled:i,"aria-label":"Digit 3 of 6",...l}),(0,z.jsx)(m,{size:n,fillMode:a,invalid:o,disabled:i,"aria-label":"Digit 4 of 6",...l}),(0,z.jsx)(m,{size:n,fillMode:a,invalid:o,disabled:i,"aria-label":"Digit 5 of 6",...l}),(0,z.jsx)(m,{size:n,fillMode:a,invalid:o,disabled:i,"aria-label":"Digit 6 of 6",...l})]})});var E=require("react/jsx-runtime"),At=({hover:t,focus:e,invalid:o,fillMode:a,size:n,disabled:i,...l})=>(0,E.jsx)(O,{invalid:o,size:n,"aria-label":"One-time password",children:(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(m,{size:n,fillMode:a,invalid:o,disabled:i,focus:e,hover:t,"aria-label":"Digit 1 of 6",...l}),(0,E.jsx)(m,{size:n,fillMode:a,invalid:o,disabled:i,"aria-label":"Digit 2 of 6",...l}),(0,E.jsx)(m,{size:n,fillMode:a,invalid:o,disabled:i,"aria-label":"Digit 3 of 6",...l}),(0,E.jsx)(F,{children:"-"}),(0,E.jsx)(m,{size:n,fillMode:a,invalid:o,disabled:i,"aria-label":"Digit 4 of 6",...l}),(0,E.jsx)(m,{size:n,fillMode:a,invalid:o,disabled:i,"aria-label":"Digit 5 of 6",...l}),(0,E.jsx)(m,{size:n,fillMode:a,invalid:o,disabled:i,"aria-label":"Digit 6 of 6",...l})]})});var zt=require("react/jsx-runtime"),Ee="k-input-group",tn=[s.disabled],on={fillMode:[c.undefined,c.solid,c.flat,c.outline,c.clear,c.link]},nn={},H=t=>{let{fillMode:e,disabled:o,...a}=t;return(0,zt.jsx)("div",{...a,className:d(t.className,Ee,h(Ee,{fillMode:e}),R(Ee,{disabled:o})),children:t.children})};H.states=tn;H.options=on;H.className=Ee;H.defaultOptions=nn;var P=require("react/jsx-runtime"),Dt=({hover:t,focus:e,invalid:o,fillMode:a,size:n,disabled:i,...l})=>(0,P.jsx)(O,{invalid:o,size:n,"aria-label":"One-time password",children:(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(H,{fillMode:a,children:[(0,P.jsx)(m,{size:n,fillMode:a,invalid:o,disabled:i,focus:e,hover:t,"aria-label":"Digit 1 of 6",...l}),(0,P.jsx)(m,{size:n,fillMode:a,invalid:o,disabled:i,"aria-label":"Digit 2 of 6",...l}),(0,P.jsx)(m,{size:n,fillMode:a,invalid:o,disabled:i,"aria-label":"Digit 3 of 6",...l})]}),(0,P.jsx)(F,{children:"-"}),(0,P.jsxs)(H,{fillMode:a,children:[(0,P.jsx)(m,{size:n,fillMode:a,invalid:o,disabled:i,"aria-label":"Digit 4 of 6",...l}),(0,P.jsx)(m,{size:n,fillMode:a,invalid:o,disabled:i,"aria-label":"Digit 5 of 6",...l}),(0,P.jsx)(m,{size:n,fillMode:a,invalid:o,disabled:i,"aria-label":"Digit 6 of 6",...l})]})]})});var Je=require("react/jsx-runtime");var Qe=require("react/jsx-runtime");var fe=require("react/jsx-runtime"),an=x.options,sn=x.states,Bt={...x.defaultOptions,variant:"normal"},rn=[{name:"normal",title:"Normal"},{name:"grouping",title:"Grouping"}],ln=[{name:"no-space",title:"No Space"}],oe=t=>{let{variant:e,modifiers:o,...a}={...Bt,...t},n=!0;return Object.keys(o||{}).forEach(i=>{if(i==="no-space"){n=!(o!=null&&o[i]);return}}),e==="grouping"?n?(0,fe.jsx)(At,{...a}):(0,fe.jsx)(Dt,{...a}):n?(0,fe.jsx)(Lt,{...a}):(0,fe.jsx)(Ye,{...a})};oe.options=an;oe.states=sn;oe.variants=rn;oe.defaultOptions=Bt;oe.modifiers=ln;oe.className=O.className;var L=require("react/jsx-runtime"),Ye=({hover:t,focus:e,invalid:o,fillMode:a,size:n,disabled:i,...l})=>(0,L.jsx)(O,{invalid:o,size:n,"aria-label":"One-time password",children:(0,L.jsx)(L.Fragment,{children:(0,L.jsxs)(H,{fillMode:a,children:[(0,L.jsx)(m,{size:n,fillMode:a,invalid:o,disabled:i,focus:e,hover:t,"aria-label":"Digit 1 of 6",...l}),(0,L.jsx)(m,{size:n,fillMode:a,invalid:o,disabled:i,"aria-label":"Digit 2 of 6",...l}),(0,L.jsx)(m,{size:n,fillMode:a,invalid:o,disabled:i,"aria-label":"Digit 3 of 6",...l}),(0,L.jsx)(m,{size:n,fillMode:a,invalid:o,disabled:i,"aria-label":"Digit 4 of 6",...l}),(0,L.jsx)(m,{size:n,fillMode:a,invalid:o,disabled:i,"aria-label":"Digit 5 of 6",...l}),(0,L.jsx)(m,{size:n,fillMode:a,invalid:o,disabled:i,"aria-label":"Digit 6 of 6",...l})]})})});