@progress/kendo-themes-html
Version:
A collection of HTML helpers used for developing Kendo UI themes
2 lines (1 loc) • 25.5 kB
JavaScript
var Rt=Object.create;var he=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)he(t,o,{get:e[o],enumerable:!0})},Ye=(t,e,o,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of _t(e))!Vt.call(t,n)&&n!==o&&he(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)):{},Ye(e||!t||!t.__esModule?he(o,"default",{value:t,enumerable:!0}):o,t)),$t=t=>Ye(he({},"__esModule",{value:!0}),t);var pn={};Ut(pn,{OneTimePasswordDisabled:()=>dn});module.exports=$t(pn);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"}),K=(t,e)=>{let{valid:o,invalid:a,hover:n,focus:i,checked:l,active:f,selected:I,disabled:O,indeterminate:b,loading:y,empty:w,readonly:U,highlighted:F,...B}=e;return d({"k-valid":o,"k-invalid":a,"k-hover":n,"k-focus":i,"k-checked":l,"k-active":f,"k-selected":I,"k-disabled":O,"k-indeterminate":b&&!l,"k-loading":y,"k-empty":w,"k-readonly":U,"k-highlighted":F},Object.keys(B).reduce((M,A)=>(A.startsWith("k-")?M[A]=B[A]:M[`k-${A}`]=B[A],M),{}))};function Ze(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"},c={undefined:void 0,none:"none",small:"small",medium:"medium",large:"large",full:"full"},m={undefined:void 0,solid:"solid",flat:"flat",outline:"outline",clear:"clear",link:"link"},_={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 ge=require("react/jsx-runtime"),Te="k-otp",Xt=[s.invalid,s.disabled],Wt={size:[r.undefined,r.small,r.medium,r.large]},Jt={},g=t=>{let{size:e,invalid:o,disabled:a,...n}=t;return(0,ge.jsxs)("div",{...n,role:"group",className:d(t.className,Te,h(Te,{size:e}),K(Te,{invalid:o,disabled:a})),children:[(0,ge.jsx)("input",{type:"hidden","aria-hidden":"true"}),t.children]})};g.states=Xt;g.options=Wt;g.className=Te;g.defaultOptions=Jt;g.moduleName="otp";g.folderName="otp";g.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 Re="textbox",je=Re;var ae="input",Ie=ae;var et=require("react/jsx-runtime"),Oe="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:[c.undefined,c.none,c.small,c.medium,c.large,c.full],fillMode:[m.undefined,m.solid,m.flat,m.outline]},Zt={},k=t=>{let{hover:e,focus:o,disabled:a,invalid:n,valid:i,loading:l,readonly:f,size:I,rounded:O,fillMode:b,...y}=t;return(0,et.jsx)("span",{...y,className:d(t.className,Oe,h(Oe,{size:I,rounded:O,fillMode:b}),K(Oe,{hover:e,focus:o,disabled:a,invalid:n,valid:i,loading:l,readonly:f}))})};k.states=Qt;k.options=Yt;k.className=Oe;k.defaultOptions=Zt;k.moduleName=ae;k.folderName=Ie;var tt=require("react/jsx-runtime"),Ne="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:[c.undefined,c.none,c.small,c.medium,c.large,c.full],fillMode:[m.undefined,m.solid,m.flat,m.outline]},to={},Q=t=>{let{hover:e,focus:o,disabled:a,invalid:n,valid:i,loading:l,readonly:f,size:I,rounded:O,fillMode:b,...y}=t;return(0,tt.jsx)("span",{...y,className:d(t.className,Ne,h(Ne,{size:I,rounded:O,fillMode:b}),K(Ne,{hover:e,focus:o,disabled:a,invalid:n,valid:i,loading:l,readonly:f})),children:t.children})};Q.states=jt;Q.options=eo;Q.className=Ne;Q.defaultOptions=to;Q.moduleName=ae;Q.folderName=Ie;var ie=require("react/jsx-runtime"),Ke="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={},se=t=>{let{size:e,themeColor:o,icon:a,rotate:n,flip:i,...l}=t;return a?(0,ie.jsx)("span",{...l,className:d(t.className,Ke,h(Ke,{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,ie.jsx)(ie.Fragment,{})};se.states=oo;se.options=no;se.className=Ke;se.defaultOptions=ao;var ot=se;var G=require("react/jsx-runtime"),_e="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:[_.outline,_.solid,_.duotone]},He={viewBox:"0 0 24 24",variant:_.outline},re=t=>{var y,w;let{size:e,themeColor:o,rotate:a,flip:n,viewBox:i=He.viewBox,variant:l=He.variant,icon:f,...I}=t;if(!f)return(0,G.jsx)(G.Fragment,{});if(f==="none")return(0,G.jsx)("span",{...I,className:d(t.className,_e,h("k-icon",{size:e}),"k-none"),"aria-hidden":"true"});let O=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,G.jsx)("span",{...I,className:d(t.className,_e,h("k-icon",{size:e}),{[`k-svg-i-${O}`]:O,[`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,G.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})})};re.states=io;re.options=so;re.className=_e;re.defaultOptions=He;var Ve=re;var Ue=Ft(require("@progress/kendo-svg-icons"));var nt="icon",at="icons";var rt=require("react");var it=require("react"),st=(0,it.createContext)({iconsType:"svg"});var H=require("react/jsx-runtime"),ve="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:[_.outline,_.solid,_.duotone]},ye={viewBox:"0 0 24 24",type:"svg",variant:_.outline},T=t=>{let{iconsType:e}=(0,rt.useContext)(st),{size:o,themeColor:a,icon:n,type:i=e||ye.type,rotate:l,flip:f,viewBox:I=ye.viewBox,variant:O=ye.variant,...b}=t;if(!n)return(0,H.jsx)(H.Fragment,{});if((e||i)==="svg"){if(n==="none")return(0,H.jsx)(Ve,{...b,className:d(t.className,ve),icon:n,size:o,variant:O});let w=Ue[n]?n:ro(`${n}-icon`);return Ue[w]?(0,H.jsx)(Ve,{...b,className:d(t.className,ve),icon:Ue[w],size:o,themeColor:a,rotate:l,flip:f,viewBox:I,variant:O}):(0,H.jsx)(H.Fragment,{})}return(0,H.jsx)(ot,{...b,className:d(t.className,ve),icon:n,size:o,themeColor:a,rotate:l,flip:f})};T.states=lo;T.options=po;T.defaultOptions=ye;T.className=ve;T.moduleName=nt;T.folderName=at;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 Y=require("react/jsx-runtime"),lt="k-clear-value",uo=[s.disabled,s.loading,s.readonly],co={},q=t=>{let{disabled:e,loading:o,readonly:a,value:n}=t;return e||a||o||!n?(0,Y.jsx)(Y.Fragment,{}):(0,Y.jsx)("span",{className:d(t.className,lt),children:(0,Y.jsx)(T,{icon:"x"})})};q.states=uo;q.options=co;q.className=lt;var dt=require("react/jsx-runtime"),Fe="k-input-inner",mo=[],fo={},we={type:"text",autocomplete:"off",value:"",placeholder:""},X=t=>{let{value:e=we.value,type:o=we.type,placeholder:a=we.placeholder,autocomplete:n=we.autocomplete,disabled:i,readOnly:l,...f}=t;return(0,dt.jsx)("input",{...f,type:o,className:d(t.className,Fe,h(Fe,t)),placeholder:a,autoComplete:n,defaultValue:e,disabled:i||void 0,readOnly:l||void 0})};X.states=mo;X.options=fo;X.className=Fe;var le=require("react/jsx-runtime"),$e="k-input-inner",xo=[],bo={},Ge=t=>{let{value:e,placeholder:o,showValue:a,valueIcon:n,valueIconName:i,...l}=t;return(0,le.jsxs)("span",{...l,className:d(t.className,$e,h($e,t)),children:[n,!n&&i&&(0,le.jsx)(T,{className:"k-input-value-icon",icon:i}),a&&!e&&o,a&&e&&(0,le.jsx)("span",{className:"k-input-value-text",children:e})]})};Ge.states=xo;Ge.options=bo;Ge.className=$e;var ut=require("react/jsx-runtime"),qe="k-input-inner",ho=[],To={},pt={value:"",placeholder:""},Xe=t=>{let{value:e=pt.value,placeholder:o=pt.placeholder,rows:a,disabled:n,...i}=t;return(0,ut.jsx)("textarea",{...i,className:d(t.className,qe,h(qe,t)),placeholder:o,rows:a,defaultValue:e,disabled:n||void 0})};Xe.states=ho;Xe.options=To;Xe.className=qe;var de=require("react/jsx-runtime"),ct="k-input-loading-icon",go=[s.disabled,s.loading],Z=t=>{let{disabled:e,loading:o}=t;return e||!o?(0,de.jsx)(de.Fragment,{}):(0,de.jsx)("span",{className:d(t.className,ct,"k-icon k-i-loading")})};Z.states=go;Z.className=ct;var pe=require("react/jsx-runtime"),mt="k-input-validation-icon",Io=[s.valid,s.invalid,s.disabled,s.loading],Oo={},W=t=>{let{valid:e,invalid:o,disabled:a,loading:n}=t,i=o?"warning-circle":"check-circle";return a||n||!!!(e||o)?(0,pe.jsx)(pe.Fragment,{}):(0,pe.jsx)(T,{className:d(mt),icon:i})};W.states=Io;W.options=Oo;W.className=mt;var ue=require("react/jsx-runtime"),No="k-input-prefix",vo={direction:"horizontal"},Se=t=>{let{direction:e=vo.direction,...o}=t;return t.children?(0,ue.jsx)("span",{...o,className:d(No,t.className,{[`k-input-prefix-${e}`]:e}),children:t.children}):(0,ue.jsx)(ue.Fragment,{})};var ce=require("react/jsx-runtime"),yo="k-input-suffix",wo={direction:"horizontal"},Pe=t=>{let{direction:e=wo.direction,...o}=t;return t.children?(0,ce.jsx)("span",{...o,className:d(yo,t.className,{[`k-input-suffix-${e}`]:e}),children:t.children}):(0,ce.jsx)(ce.Fragment,{})};var So=require("react/jsx-runtime");var Po=require("react/jsx-runtime");var xt=require("react/jsx-runtime"),ft="k-input-separator",Mo={direction:"vertical"},j=t=>{let{direction:e=Mo.direction,...o}=t;return(0,xt.jsx)("span",{...o,className:d(ft,t.className,{[`${ft}-${e}`]:e})})};var We="button",bt=We;var C=require("react/jsx-runtime"),me="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:[c.undefined,c.none,c.small,c.medium,c.large,c.full],fillMode:[m.undefined,m.solid,m.flat,m.outline,m.clear,m.link],themeColor:[p.undefined,p.base,p.primary,p.secondary,p.tertiary,p.success,p.warning,p.error,p.info,p.inverse]},Je={showArrow:!1,arrowIconName:"chevron-down"},N=t=>{let{as:e="button",size:o,rounded:a,fillMode:n,themeColor:i,showArrow:l=Je.showArrow,arrowIconName:f=Je.arrowIconName,variant:I,hover:O,focus:b,active:y,selected:w,disabled:U,togglable:F,ariaDisabled:B,icon:M,iconSize:A,text:R,iconClassName:be,className:Ae,...ze}=t,De=M!=null,Be=t.children!==void 0;return(0,C.jsxs)(e,{className:d(Ae,me,Ze(me,I),h(me,{size:o,rounded:a,fillMode:n,themeColor:i}),K(me,{hover:O,focus:b,active:y,disabled:U||B,selected:w}),{"k-icon-button":!R&&!Be&&De}),"aria-pressed":F?w?"true":"false":void 0,...ze,"aria-disabled":B?"true":void 0,disabled:U||void 0,children:[typeof M=="string"&&M&&(0,C.jsx)(T,{className:d(be,"k-button-icon"),icon:M,size:A}),M&&typeof M!="string"&&(0,C.jsx)(C.Fragment,{children:M}),R?(0,C.jsxs)(C.Fragment,{children:[R&&(0,C.jsx)("span",{className:"k-button-text",children:R}),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=me;N.defaultOptions=Je;N.moduleName=We;N.folderName=bt;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 ht=require("react/jsx-runtime"),J=t=>(0,ht.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=[],ee=t=>{let{modifiers:e,valid:o,invalid:a,loading:n,disabled:i,readonly:l,...f}=t,I=e==null?void 0:e.prefix,O=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:[I&&(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(Se,{children:(0,v.jsx)(T,{icon:"lock"})}),w&&(0,v.jsx)(j,{})]}),(0,v.jsx)(X,{placeholder:"Placeholder",value:"Value"}),y&&(0,v.jsx)(W,{valid:o,invalid:a,loading:n,disabled:i}),(0,v.jsx)(Z,{loading:n,disabled:i}),b&&(0,v.jsx)(q,{loading:n,disabled:i,readonly:l,value:"Value"}),O&&(0,v.jsxs)(v.Fragment,{children:[w&&(0,v.jsx)(j,{}),(0,v.jsx)(Pe,{children:(0,v.jsx)(J,{size:f.size,fillMode:"clear",children:"Send"})})]})]})};ee.options=zo;ee.states=Lo;ee.variants=Bo;ee.defaultOptions=Ao;ee.modifiers=Do;ee.className=k.className;var S=require("react/jsx-runtime"),Tt="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:[c.undefined,c.none,c.small,c.medium,c.large,c.full],fillMode:[m.undefined,m.solid,m.flat,m.outline]},Me={showClearButton:!0,showValidationIcon:!0,separators:!0},x=t=>{let{size:e,rounded:o,fillMode:a,separators:n=Me.separators,showClearButton:i=Me.showClearButton,showValidationIcon:l=Me.showValidationIcon,prefix:f,suffix:I,type:O,value:b,placeholder:y,hover:w,focus:U,valid:F,invalid:B,required:M,loading:A,disabled:R,readonly:be,id:Ae,"aria-label":ze,"aria-describedby":De,...Be}=t;return(0,S.jsxs)(k,{...Be,size:e,rounded:o,fillMode:a,hover:w,focus:U,valid:F,invalid:B,required:M,loading:A,disabled:R,readonly:be,className:d(t.className,Tt),children:[f&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(Se,{children:f}),n&&(0,S.jsx)(j,{})]}),(0,S.jsx)(X,{id:Ae,placeholder:y,value:b,type:O,disabled:R,"aria-label":ze,"aria-describedby":De,"aria-invalid":B?"true":void 0}),l&&(0,S.jsx)(W,{valid:F,invalid:B,loading:A,disabled:R}),(0,S.jsx)(Z,{loading:A,disabled:R}),i&&(0,S.jsx)(q,{loading:A,disabled:R,readonly:be,value:b}),I&&(0,S.jsxs)(S.Fragment,{children:[n&&(0,S.jsx)(j,{}),(0,S.jsx)(Pe,{children:I})]})]})};x.states=Ro;x.options=Ko;x.className=Tt;x.defaultOptions=Me;x.moduleName=Re;x.folderName=je;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 fe=x;var It=require("react/jsx-runtime"),gt=t=>(0,It.jsx)(fe,{...t});var Ot=require("react/jsx-runtime");var vt=require("react/jsx-runtime"),Nt=t=>(0,vt.jsx)(N,{icon:"folder",...t,"aria-label":t["aria-label"]||"Folder",children:void 0});var wt=require("react/jsx-runtime"),yt=t=>(0,wt.jsx)(N,{icon:"folder",children:"Button",...t});var ke=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=[],te=t=>{let{variant:e,...o}=t;switch(e){case"icon-only":return(0,ke.jsx)(Nt,{...o,icon:"star"});case"icon-and-text":return(0,ke.jsx)(yt,{...o,icon:"star",children:"Button"});default:return(0,ke.jsx)(J,{...o,children:"Button"})}};te.options=_o;te.states=Ho;te.variants=Uo;te.defaultOptions=Vo;te.modifiers=Fo;te.className=N.className;var St=require("react/jsx-runtime");var $o=require("react/jsx-runtime");var Ce=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=[],oe=t=>{let{modifiers:e,...o}=t,a={};return Object.keys(e||{}).forEach(n=>{switch(n){case"prefix":a.prefix=e!=null&&e[n]?(0,Ce.jsx)(T,{icon:"lock"}):void 0;break;case"suffix":a.suffix=e!=null&&e[n]?(0,Ce.jsx)(J,{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,Ce.jsx)(gt,{value:"Value",style:{width:300},...o,...a})};oe.options=Xo;oe.states=Go;oe.variants=Jo;oe.defaultOptions=qo;oe.modifiers=Wo;oe.className=x.className;var Mt=require("react/jsx-runtime"),Pt="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:[c.undefined,c.none,c.small,c.medium,c.large,c.full],fillMode:[m.undefined,m.solid,m.flat,m.outline]},Ee={size:x.defaultOptions.size,rounded:x.defaultOptions.rounded,fillMode:x.defaultOptions.fillMode},u=t=>{let{size:e=Ee.size,rounded:o=Ee.rounded,fillMode:a=Ee.fillMode,type:n,value:i,placeholder:l,hover:f,focus:I,valid:O,invalid:b,required:y,disabled:w,readonly:U,...F}=t;return(0,Mt.jsx)(x,{...F,size:e,rounded:o,fillMode:a,type:n,value:i,placeholder:l,hover:f,focus:I,valid:O,invalid:b,required:y,disabled:w,readonly:U,showClearButton:!1,showValidationIcon:!1,className:d(t.className,Pt)})};u.states=Qo;u.options=Yo;u.className=Pt;u.defaultOptions=Ee;var Ct=require("react/jsx-runtime"),kt="k-otp-separator",Zo=[],jo={},en={},$=t=>{let{children:e,...o}=t;return(0,Ct.jsx)("div",{...o,className:d(t.className,kt),children:e})};$.states=Zo;$.options=jo;$.className=kt;$.defaultOptions=en;var z=require("react/jsx-runtime"),Et=({hover:t,focus:e,invalid:o,fillMode:a,size:n,disabled:i,...l})=>(0,z.jsx)(g,{invalid:o,size:n,"aria-label":"One-time password",children:(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(u,{size:n,fillMode:a,invalid:o,disabled:i,focus:e,hover:t,"aria-label":"Digit 1 of 6",...l}),(0,z.jsx)(u,{size:n,fillMode:a,invalid:o,disabled:i,"aria-label":"Digit 2 of 6",...l}),(0,z.jsx)(u,{size:n,fillMode:a,invalid:o,disabled:i,"aria-label":"Digit 3 of 6",...l}),(0,z.jsx)(u,{size:n,fillMode:a,invalid:o,disabled:i,"aria-label":"Digit 4 of 6",...l}),(0,z.jsx)(u,{size:n,fillMode:a,invalid:o,disabled:i,"aria-label":"Digit 5 of 6",...l}),(0,z.jsx)(u,{size:n,fillMode:a,invalid:o,disabled:i,"aria-label":"Digit 6 of 6",...l})]})});var Lt=require("react/jsx-runtime"),Le="k-input-group",tn=[s.disabled],on={fillMode:[m.undefined,m.solid,m.flat,m.outline,m.clear,m.link]},nn={},V=t=>{let{fillMode:e,disabled:o,...a}=t;return(0,Lt.jsx)("div",{...a,className:d(t.className,Le,h(Le,{fillMode:e}),K(Le,{disabled:o})),children:t.children})};V.states=tn;V.options=on;V.className=Le;V.defaultOptions=nn;var E=require("react/jsx-runtime"),At=({hover:t,focus:e,invalid:o,fillMode:a,size:n,disabled:i,...l})=>(0,E.jsx)(g,{invalid:o,size:n,"aria-label":"One-time password",children:(0,E.jsx)(E.Fragment,{children:(0,E.jsxs)(V,{fillMode:a,children:[(0,E.jsx)(u,{size:n,fillMode:a,invalid:o,disabled:i,focus:e,hover:t,"aria-label":"Digit 1 of 6",...l}),(0,E.jsx)(u,{size:n,fillMode:a,invalid:o,disabled:i,"aria-label":"Digit 2 of 6",...l}),(0,E.jsx)(u,{size:n,fillMode:a,invalid:o,disabled:i,"aria-label":"Digit 3 of 6",...l}),(0,E.jsx)(u,{size:n,fillMode:a,invalid:o,disabled:i,"aria-label":"Digit 4 of 6",...l}),(0,E.jsx)(u,{size:n,fillMode:a,invalid:o,disabled:i,"aria-label":"Digit 5 of 6",...l}),(0,E.jsx)(u,{size:n,fillMode:a,invalid:o,disabled:i,"aria-label":"Digit 6 of 6",...l})]})})});var L=require("react/jsx-runtime"),zt=({hover:t,focus:e,invalid:o,fillMode:a,size:n,disabled:i,...l})=>(0,L.jsx)(g,{invalid:o,size:n,"aria-label":"One-time password",children:(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(u,{size:n,fillMode:a,invalid:o,disabled:i,focus:e,hover:t,"aria-label":"Digit 1 of 6",...l}),(0,L.jsx)(u,{size:n,fillMode:a,invalid:o,disabled:i,"aria-label":"Digit 2 of 6",...l}),(0,L.jsx)(u,{size:n,fillMode:a,invalid:o,disabled:i,"aria-label":"Digit 3 of 6",...l}),(0,L.jsx)($,{children:"-"}),(0,L.jsx)(u,{size:n,fillMode:a,invalid:o,disabled:i,"aria-label":"Digit 4 of 6",...l}),(0,L.jsx)(u,{size:n,fillMode:a,invalid:o,disabled:i,"aria-label":"Digit 5 of 6",...l}),(0,L.jsx)(u,{size:n,fillMode:a,invalid:o,disabled:i,"aria-label":"Digit 6 of 6",...l})]})});var P=require("react/jsx-runtime"),Dt=({hover:t,focus:e,invalid:o,fillMode:a,size:n,disabled:i,...l})=>(0,P.jsx)(g,{invalid:o,size:n,"aria-label":"One-time password",children:(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(V,{fillMode:a,children:[(0,P.jsx)(u,{size:n,fillMode:a,invalid:o,disabled:i,focus:e,hover:t,"aria-label":"Digit 1 of 6",...l}),(0,P.jsx)(u,{size:n,fillMode:a,invalid:o,disabled:i,"aria-label":"Digit 2 of 6",...l}),(0,P.jsx)(u,{size:n,fillMode:a,invalid:o,disabled:i,"aria-label":"Digit 3 of 6",...l})]}),(0,P.jsx)($,{children:"-"}),(0,P.jsxs)(V,{fillMode:a,children:[(0,P.jsx)(u,{size:n,fillMode:a,invalid:o,disabled:i,"aria-label":"Digit 4 of 6",...l}),(0,P.jsx)(u,{size:n,fillMode:a,invalid:o,disabled:i,"aria-label":"Digit 5 of 6",...l}),(0,P.jsx)(u,{size:n,fillMode:a,invalid:o,disabled:i,"aria-label":"Digit 6 of 6",...l})]})]})});var Qe=require("react/jsx-runtime");var xe=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"}],ne=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,xe.jsx)(zt,{...a}):(0,xe.jsx)(Dt,{...a}):n?(0,xe.jsx)(Et,{...a}):(0,xe.jsx)(At,{...a})};ne.options=an;ne.states=sn;ne.variants=rn;ne.defaultOptions=Bt;ne.modifiers=ln;ne.className=g.className;var D=require("react/jsx-runtime"),dn=({hover:t,focus:e,invalid:o,fillMode:a,size:n,...i})=>(0,D.jsx)(g,{disabled:!0,invalid:o,size:n,"aria-label":"One-time password",children:(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(u,{size:n,fillMode:a,invalid:o,disabled:!0,focus:e,hover:t,"aria-label":"Digit 1 of 6",...i}),(0,D.jsx)(u,{size:n,fillMode:a,invalid:o,disabled:!0,"aria-label":"Digit 2 of 6",...i}),(0,D.jsx)(u,{size:n,fillMode:a,invalid:o,disabled:!0,"aria-label":"Digit 3 of 6",...i}),(0,D.jsx)(u,{size:n,fillMode:a,invalid:o,disabled:!0,"aria-label":"Digit 4 of 6",...i}),(0,D.jsx)(u,{size:n,fillMode:a,invalid:o,disabled:!0,"aria-label":"Digit 5 of 6",...i}),(0,D.jsx)(u,{size:n,fillMode:a,invalid:o,disabled:!0,"aria-label":"Digit 6 of 6",...i})]})});