Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@volvo-cars/react-forms

Package Overview
Dependencies
Maintainers
8
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@volvo-cars/react-forms - npm Package Compare versions

Comparing version 0.9.0 to 0.10.0

5

dist/email-input.d.ts

@@ -31,2 +31,7 @@ /// <reference types="react" />

list?: string;
/**
* Inject an element into the input field, displayed at the end of the input.
* Usually used to display a custom `Icon` or `IconButton`.
*/
contentAfter?: React.ReactNode;
}

@@ -33,0 +38,0 @@ type ControlledProps = {

2

dist/esm/index.js
"use client"
import{forwardRef as Y,useState as Z}from"react";import{jsx as Q}from"react/jsx-runtime";function C({children:u,id:e,className:t=""}){return Q("p",{id:e,className:`micro text-feedback-red empty:hidden ${t}`.trim(),role:"alert",children:u})}import{jsx as W}from"react/jsx-runtime";function I({children:u,id:e,className:t=""}){return W("p",{id:e,className:`micro text-secondary ${t}`.trim(),children:u})}import{useId as X}from"react";function b(u){let e=X();return{inputId:u||e+"-input",errorId:e+"-error",hintId:e+"-hint"}}import{jsx as w,jsxs as ee}from"react/jsx-runtime";var j=Y(function({hint:e,id:t,label:o,hidden:P,dir:p,errorMessage:r,lang:g,translate:c,slot:a,value:d,defaultValue:s,isValid:l,className:f,...i},n){let[m,v]=Z(!d&&!s);function T(x){let{validity:k}=x.currentTarget,L=x.currentTarget.required;L||(x.currentTarget.required=!0),v(k.valueMissing&&!k.badInput),L||(x.currentTarget.required=!1)}let{inputId:h,errorId:H,hintId:y}=b(t),E=i["aria-invalid"]||l===!1||!!r;return ee("div",{className:`v-input-floating-label ${f||""}`.trim(),hidden:P,dir:p,lang:g,translate:c,slot:a,children:[w("label",{htmlFor:h,children:o}),w("input",{...i,ref:n,type:"date",id:h,value:d,defaultValue:s,onBlur:x=>{i.onBlur?.(x),T(x)},onChange:x=>{i.onChange?.(x),T(x)},"data-blank":m?"":void 0,"aria-invalid":E?!0:void 0,"aria-errormessage":r?H:void 0,"aria-describedby":e?y:void 0}),w(C,{id:H,className:"mt-4",children:r}),e&&w(I,{id:y,className:"mt-4",children:e})]})});import{forwardRef as te,useState as re}from"react";import{jsx as B,jsxs as z}from"react/jsx-runtime";var oe=te(function({hint:e,id:t,label:o,hidden:P,dir:p,errorMessage:r,lang:g,translate:c,slot:a,defaultPasswordVisible:d=!1,showPasswordLabel:s,hidePasswordLabel:l,isValid:f,className:i,...n},m){let[v,T]=re(d),{inputId:h,errorId:H,hintId:y}=b(t),E=n["aria-invalid"]||!!r;return z("div",{className:`v-input-floating-label ${i||""}`.trim(),hidden:P,dir:p,lang:g,translate:c,slot:a,children:[B("label",{htmlFor:h,children:o}),z("div",{className:"v-input","data-input-delegate":!0,"aria-invalid":E?!0:void 0,children:[B("input",{placeholder:" ",...n,ref:m,id:h,autoCorrect:"off",spellCheck:"false",autoCapitalize:"none",className:"bg-transparent",type:v?"text":"password","aria-invalid":E?!0:void 0,"aria-errormessage":E?H:void 0,"aria-describedby":e?y:void 0}),B("button",{type:"button",className:"v-input__password-visibility-control",...s&&l?{"aria-label":v?l:s,"aria-controls":h}:{"aria-hidden":!0,tabIndex:-1},onClick:()=>T(x=>!x)})]}),B(C,{id:H,className:"mt-4",children:r}),e&&B(I,{id:y,className:"mt-4",children:e})]})});import{forwardRef as le}from"react";import{forwardRef as $}from"react";import{jsx as U,jsxs as ae}from"react/jsx-runtime";var ne=$(function(e,t){return U(M,{...e,type:"text",ref:t})}),M=$(function({hint:e,id:t,label:o,hidden:P,dir:p,errorMessage:r,lang:g,translate:c,slot:a,isValid:d,className:s,...l},f){let{inputId:i,errorId:n,hintId:m}=b(t),v=l["aria-invalid"]||d===!1||!!r;return ae("div",{className:`v-input-floating-label ${s||""}`.trim(),hidden:P,dir:p,lang:g,translate:c,slot:a,children:[U("label",{htmlFor:i,children:o}),U("input",{placeholder:" ",...l,ref:f,id:i,"aria-invalid":v?!0:void 0,"aria-errormessage":r?n:void 0,"aria-describedby":e?m:void 0}),U(C,{id:n,className:"mt-4",children:r}),e&&U(I,{id:m,className:"mt-4",children:e})]})});import{jsx as ie}from"react/jsx-runtime";var se=le(function(e,t){return ie(M,{...e,type:"email",inputMode:"email",ref:t})});import{forwardRef as pe}from"react";import{jsx as ue}from"react/jsx-runtime";var de=pe(function(e,t){return ue(M,{...e,type:"tel",ref:t})});import{forwardRef as me}from"react";import{jsx as fe}from"react/jsx-runtime";var ce=me(function(e,t){return fe(M,{...e,type:"url",inputMode:"url",ref:t})});import{Children as Pe,forwardRef as ge,isValidElement as ve,useState as xe}from"react";import{jsx as N,jsxs as q}from"react/jsx-runtime";var Ie=ge(function({hint:e,id:t,label:o,hidden:P,dir:p,errorMessage:r,lang:g,translate:c,slot:a,value:d,defaultValue:s,children:l,isValid:f,className:i,...n},m){let v=!1;Pe.forEach(l,R=>{ve(R)&&R.type==="option"&&R.props.value===""&&(v=!0)});let[T,h]=xe(!s),H=typeof d=="string",{inputId:y,errorId:E,hintId:x}=b(t),k=n["aria-invalid"]||f===!1||!!r,L=H?!d:T;return q("div",{className:`v-input-floating-label ${i||""}`.trim(),hidden:P,dir:p,lang:g,translate:c,slot:a,children:[N("label",{htmlFor:y,children:o}),q("select",{...n,ref:m,id:y,onChange:H?n.onChange:R=>{n.onChange?.(R),h(!R.target.value)},value:d,defaultValue:s,"data-blank":L?"":void 0,"aria-invalid":k?"true":void 0,"aria-errormessage":r?E:void 0,"aria-describedby":e?x:void 0,children:[!s&&!v&&N("option",{value:"",hidden:!L,disabled:!L,children:o}),l]}),N(C,{id:E,className:"mt-4",children:r}),e&&N(I,{id:x,className:"mt-4",children:e})]})});import{forwardRef as be}from"react";import{jsx as S,jsxs as K}from"react/jsx-runtime";var Ce=be(function({label:e,id:t,hint:o,hidden:P,dir:p,lang:r,translate:g,slot:c,errorMessage:a,isValid:d,className:s,...l},f){let{inputId:i,hintId:n,errorId:m}=b(t),v=l["aria-invalid"]||d===!1||!!a;return K("div",{className:`flex-row ${s||""}`.trim(),hidden:P,dir:p,lang:r,translate:g,slot:c,children:[S("input",{...l,ref:f,type:"checkbox",id:i,"aria-invalid":v?!0:void 0,"aria-errormessage":a?m:void 0,"aria-describedby":o?n:void 0}),K("div",{className:"flex-col stack-4 ml-8",children:[S("label",{htmlFor:i,children:e}),S(C,{id:m,children:a}),o&&S(I,{id:n,children:o})]})]})});import{forwardRef as ye,useContext as Ee}from"react";import{createContext as he}from"react";import{jsx as A,jsxs as O}from"react/jsx-runtime";function Te({legend:u,id:e,hint:t,name:o,children:P,required:p,defaultValue:r,value:g,hidden:c,dir:a,lang:d,translate:s,slot:l,errorMessage:f,onChange:i,form:n,enterKeyHint:m,readOnly:v,isValid:T,...h}){let{inputId:H,hintId:y,errorId:E}=b(e),x=h["aria-invalid"]||T===!1||!!f;return O("fieldset",{...h,hidden:c,dir:a,lang:d,translate:s,slot:l,form:n,id:H,role:"radiogroup","aria-invalid":x?!0:void 0,"aria-errormessage":f?E:void 0,"aria-describedby":t?y:void 0,"aria-required":p?!0:void 0,children:[A("legend",{className:"mb-4",children:u}),t&&A(I,{id:y,className:"mb-16",children:t}),O("div",{className:"stack-8",hidden:c,children:[A(C,{id:E,className:"mb-16",children:f}),A(_,{value:{defaultValue:r,enterKeyHint:m,form:n,name:o,onChange:i,readOnly:v,required:p,value:g},children:P})]})]})}var D=he({}),_=D.Provider;import{jsx as V,jsxs as J}from"react/jsx-runtime";var He=ye(function({label:e,id:t,hint:o,hidden:P,dir:p,lang:r,translate:g,slot:c,value:a,className:d,...s},l){let{inputId:f,hintId:i}=b(t),{value:n,defaultValue:m,...v}=Ee(D),T,h;return typeof n<"u"?T=a===n:typeof m<"u"&&a===m&&(h=!0),J("div",{className:`flex-row ${d||""}`.trim(),hidden:P,dir:p,lang:r,translate:g,slot:c,children:[V("input",{...s,...v,ref:l,checked:T,defaultChecked:h,type:"radio",id:f,value:a}),o?J("div",{className:"flex-col stack-4 ml-8",children:[V("label",{htmlFor:f,children:e}),V(I,{id:i,children:o})]}):V("label",{htmlFor:f,className:"ml-8",children:e})]})});import{forwardRef as Me}from"react";import{jsx as G,jsxs as Re}from"react/jsx-runtime";var Le=Me(function({hint:e,id:t,label:o,hidden:P,dir:p,errorMessage:r,lang:g,translate:c,slot:a,isValid:d,className:s,...l},f){let{inputId:i,errorId:n,hintId:m}=b(t),v=l["aria-invalid"]||d===!1||!!r;return Re("div",{className:`v-input-floating-label ${s||""}`.trim(),hidden:P,dir:p,lang:g,translate:c,slot:a,children:[G("label",{htmlFor:i,children:o}),G("textarea",{placeholder:" ",...l,ref:f,id:i,"aria-invalid":v?!0:void 0,"aria-errormessage":r?n:void 0,"aria-describedby":e?m:void 0}),G(C,{id:n,className:"mb-4",children:r}),e&&G(I,{id:m,className:"mt-4",children:e})]})});import{forwardRef as Be}from"react";import{Fragment as ke,jsx as F,jsxs as we}from"react/jsx-runtime";var Ue=Be(function({color:e,size:t,loading:o,loadingLabel:P,disabled:p,children:r,variant:g="filled",className:c="",...a},d){let s=!p&&o;return F("button",{ref:d,...a,onClick:l=>{p||o?l.preventDefault():a.onClick&&a.onClick(l)},type:"submit",className:`button-${g} ${c}`.trim(),"aria-disabled":p||o||void 0,"data-loading":s||void 0,"aria-live":typeof o=="boolean"?"polite":void 0,"data-color":e==="neutral"?void 0:e,"data-size":t==="small"?"small":void 0,children:s?we(ke,{children:[F("span",{className:"invisible",children:r}),F("progress",{className:"spinner","aria-label":P})]}):r})});export{Ce as Checkbox,j as DateInput,se as EmailInput,C as ErrorMessage,I as Hint,oe as PasswordInput,He as Radio,_ as RadioContextProvider,Te as RadioGroup,Ie as Select,Ue as SubmitButton,de as TelInput,Le as TextArea,ne as TextInput,ce as UrlInput};
import{forwardRef as _,useState as j}from"react";import{IconButton as ee}from"@volvo-cars/react-icons";import{forwardRef as D}from"react";import{jsx as W}from"react/jsx-runtime";function b({children:p,id:e,className:t=""}){return W("p",{id:e,className:`micro text-feedback-red empty:hidden ${t}`.trim(),role:"alert",children:p})}import{jsx as X}from"react/jsx-runtime";function I({children:p,id:e,className:t=""}){return X("p",{id:e,className:`micro text-secondary ${t}`.trim(),children:p})}import{useId as Y}from"react";function g(p){let e=Y(),t=p||e;return{rootId:t,inputId:t+"-input",errorId:t+"-error",hintId:t+"-hint"}}import{jsx as E,jsxs as G}from"react/jsx-runtime";var Z=D(function(e,t){return E(C,{...e,type:"text",ref:t})}),C=D(function({hint:e,id:t,label:n,hidden:u,dir:i,errorMessage:o,lang:m,translate:c,slot:a,isValid:r,className:l,contentAfter:s,...f},x){let{inputId:d,errorId:P,hintId:v}=g(t),T=f["aria-invalid"]||r===!1||!!o,h={placeholder:" ",...f,ref:x,id:d,"aria-invalid":T?!0:void 0,"aria-errormessage":o?P:void 0,"aria-describedby":e?v:void 0};return G("div",{id:t,className:`v-input-floating-label ${l||""}`.trim(),hidden:u,dir:i,lang:m,translate:c,slot:a,children:[E("label",{htmlFor:d,children:n}),s?G("div",{className:"v-input","data-input-delegate":!0,"aria-invalid":T?!0:void 0,children:[E("input",{...h,className:"bg-transparent"}),s]}):E("input",{...h}),E(b,{id:P,className:"mt-4",children:o}),e&&E(I,{id:v,className:"mt-4",children:e})]})});import{jsx as F}from"react/jsx-runtime";var te=_(function({value:e,onChange:t,onBlur:n,defaultValue:u,...i},o){let[m,c]=j(!e&&!u);function a(r){let{validity:l}=r.currentTarget,s=r.currentTarget.required;s||(r.currentTarget.required=!0),c(l.valueMissing&&!l.badInput),s||(r.currentTarget.required=!1)}return F(C,{...i,value:e,defaultValue:u,type:"date",ref:o,onBlur:r=>{n?.(r),a(r)},onChange:r=>{t?.(r),a(r)},"data-blank":m?"":void 0,contentAfter:F(ee,{className:"ml-8 -mr-8",variant:"clear",iconName:"calendar","aria-hidden":!0,tabIndex:-1,"aria-label":"",onClick:r=>{let l=r.currentTarget.parentElement?.querySelector("input[type=date]");if(l)try{if(l.showPicker(),/^((?!chrome|android).)*safari/i.test(navigator.userAgent))throw new Error}catch{l.click(),l.focus()}}})})});import{forwardRef as re,useState as oe}from"react";import{IconButton as ne}from"@volvo-cars/react-icons";import{jsx as z}from"react/jsx-runtime";var ae=re(function({id:e,defaultPasswordVisible:t=!1,showPasswordLabel:n,...u},i){let[o,m]=oe(t),{inputId:c,rootId:a}=g(e);return z(C,{...u,type:o?"text":"password",id:a,ref:i,contentAfter:z(ne,{className:"-mr-8",variant:"clear",iconName:o?"other-eye":"other-eyeslash",...n?{"aria-pressed":o,"aria-label":n,"aria-controls":c}:{"aria-label":"","aria-hidden":!0,tabIndex:-1},onClick:()=>m(r=>!r)})})});import{forwardRef as le}from"react";import{jsx as ie}from"react/jsx-runtime";var se=le(function(e,t){return ie(C,{...e,type:"email",inputMode:"email",ref:t})});import{forwardRef as pe}from"react";import{jsx as ue}from"react/jsx-runtime";var de=pe(function(e,t){return ue(C,{...e,type:"tel",ref:t})});import{forwardRef as ce}from"react";import{jsx as fe}from"react/jsx-runtime";var me=ce(function(e,t){return fe(C,{...e,type:"url",inputMode:"url",ref:t})});import{Children as Pe,forwardRef as ge,isValidElement as xe,useState as ve}from"react";import{jsx as B,jsxs as q}from"react/jsx-runtime";var Ie=ge(function({hint:e,id:t,label:n,hidden:u,dir:i,errorMessage:o,lang:m,translate:c,slot:a,value:r,defaultValue:l,children:s,isValid:f,className:x,...d},P){let v=!1;Pe.forEach(s,y=>{xe(y)&&y.type==="option"&&y.props.value===""&&(v=!0)});let[T,h]=ve(!l),L=typeof r=="string",{inputId:H,errorId:R,hintId:M}=g(t),Q=d["aria-invalid"]||f===!1||!!o,A=L?!r:T;return q("div",{className:`v-input-floating-label ${x||""}`.trim(),hidden:u,dir:i,lang:m,translate:c,slot:a,children:[B("label",{htmlFor:H,children:n}),q("select",{...d,ref:P,id:H,onChange:L?d.onChange:y=>{d.onChange?.(y),h(!y.target.value)},value:r,defaultValue:l,"data-blank":A?"":void 0,"aria-invalid":Q?"true":void 0,"aria-errormessage":o?R:void 0,"aria-describedby":e?M:void 0,children:[!l&&!v&&B("option",{value:"",hidden:!A,disabled:!A,children:n}),s]}),B(b,{id:R,className:"mt-4",children:o}),e&&B(I,{id:M,className:"mt-4",children:e})]})});import{forwardRef as be}from"react";import{jsx as k,jsxs as $}from"react/jsx-runtime";var Ce=be(function({label:e,id:t,hint:n,hidden:u,dir:i,lang:o,translate:m,slot:c,errorMessage:a,isValid:r,className:l,...s},f){let{inputId:x,hintId:d,errorId:P}=g(t),v=s["aria-invalid"]||r===!1||!!a;return $("div",{className:`flex-row ${l||""}`.trim(),hidden:u,dir:i,lang:o,translate:m,slot:c,children:[k("input",{...s,ref:f,type:"checkbox",id:x,"aria-invalid":v?!0:void 0,"aria-errormessage":a?P:void 0,"aria-describedby":n?d:void 0}),$("div",{className:"flex-col stack-4 ml-8",children:[k("label",{htmlFor:x,children:e}),k(b,{id:P,children:a}),n&&k(I,{id:d,children:n})]})]})});import{forwardRef as ye,useContext as Ee}from"react";import{createContext as he}from"react";import{jsx as U,jsxs as K}from"react/jsx-runtime";function Te({legend:p,id:e,hint:t,name:n,children:u,required:i,defaultValue:o,value:m,hidden:c,dir:a,lang:r,translate:l,slot:s,errorMessage:f,onChange:x,form:d,enterKeyHint:P,readOnly:v,isValid:T,...h}){let{inputId:L,hintId:H,errorId:R}=g(e),M=h["aria-invalid"]||T===!1||!!f;return K("fieldset",{...h,hidden:c,dir:a,lang:r,translate:l,slot:s,form:d,id:L,role:"radiogroup","aria-invalid":M?!0:void 0,"aria-errormessage":f?R:void 0,"aria-describedby":t?H:void 0,"aria-required":i?!0:void 0,children:[U("legend",{className:"mb-4",children:p}),t&&U(I,{id:H,className:"mb-16",children:t}),K("div",{className:"stack-8",hidden:c,children:[U(b,{id:R,className:"mb-16",children:f}),U(O,{value:{defaultValue:o,enterKeyHint:P,form:d,name:n,onChange:x,readOnly:v,required:i,value:m},children:u})]})]})}var S=he({}),O=S.Provider;import{jsx as w,jsxs as J}from"react/jsx-runtime";var He=ye(function({label:e,id:t,hint:n,hidden:u,dir:i,lang:o,translate:m,slot:c,value:a,className:r,...l},s){let{inputId:f,hintId:x}=g(t),{value:d,defaultValue:P,...v}=Ee(S),T,h;return typeof d<"u"?T=a===d:typeof P<"u"&&a===P&&(h=!0),J("div",{className:`flex-row ${r||""}`.trim(),hidden:u,dir:i,lang:o,translate:m,slot:c,children:[w("input",{...l,...v,ref:s,checked:T,defaultChecked:h,type:"radio",id:f,value:a}),n?J("div",{className:"flex-col stack-4 ml-8",children:[w("label",{htmlFor:f,children:e}),w(I,{id:x,children:n})]}):w("label",{htmlFor:f,className:"ml-8",children:e})]})});import{forwardRef as Re}from"react";import{jsx as N,jsxs as Me}from"react/jsx-runtime";var Le=Re(function({hint:e,id:t,label:n,hidden:u,dir:i,errorMessage:o,lang:m,translate:c,slot:a,isValid:r,className:l,...s},f){let{inputId:x,errorId:d,hintId:P}=g(t),v=s["aria-invalid"]||r===!1||!!o;return Me("div",{className:`v-input-floating-label ${l||""}`.trim(),hidden:u,dir:i,lang:m,translate:c,slot:a,children:[N("label",{htmlFor:x,children:n}),N("textarea",{placeholder:" ",...s,ref:f,id:x,"aria-invalid":v?!0:void 0,"aria-errormessage":o?d:void 0,"aria-describedby":e?P:void 0}),N(b,{id:d,className:"mb-4",children:o}),e&&N(I,{id:P,className:"mt-4",children:e})]})});import{forwardRef as Be}from"react";import{Fragment as Ue,jsx as V,jsxs as we}from"react/jsx-runtime";var ke=Be(function({color:e,size:t,loading:n,loadingLabel:u,disabled:i,children:o,variant:m="filled",className:c="",...a},r){let l=!i&&n;return V("button",{ref:r,...a,onClick:s=>{i||n?s.preventDefault():a.onClick&&a.onClick(s)},type:"submit",className:`button-${m} ${c}`.trim(),"aria-disabled":i||n||void 0,"data-loading":l||void 0,"aria-live":typeof n=="boolean"?"polite":void 0,"data-color":e==="neutral"?void 0:e,"data-size":t==="small"?"small":void 0,children:l?we(Ue,{children:[V("span",{className:"invisible",children:o}),V("progress",{className:"spinner","aria-label":u})]}):o})});export{Ce as Checkbox,te as DateInput,se as EmailInput,b as ErrorMessage,I as Hint,ae as PasswordInput,He as Radio,O as RadioContextProvider,Te as RadioGroup,Ie as Select,ke as SubmitButton,de as TelInput,Le as TextArea,Z as TextInput,me as UrlInput};
//# sourceMappingURL=index.js.map
"use client"
var K=Object.defineProperty;var Ie=Object.getOwnPropertyDescriptor;var be=Object.getOwnPropertyNames;var Ce=Object.prototype.hasOwnProperty;var he=(r,e)=>{for(var t in e)K(r,t,{get:e[t],enumerable:!0})},Te=(r,e,t,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of be(e))!Ce.call(r,l)&&l!==t&&K(r,l,{get:()=>e[l],enumerable:!(o=Ie(e,l))||o.enumerable});return r};var ye=r=>Te(K({},"__esModule",{value:!0}),r);var Ee={};he(Ee,{Checkbox:()=>ue,DateInput:()=>Y,EmailInput:()=>te,ErrorMessage:()=>b,Hint:()=>g,PasswordInput:()=>Z,Radio:()=>fe,RadioContextProvider:()=>J,RadioGroup:()=>ce,Select:()=>pe,SubmitButton:()=>xe,TelInput:()=>ne,TextArea:()=>ge,TextInput:()=>j,UrlInput:()=>se});module.exports=ye(Ee);var z=require("react");var Q=require("react/jsx-runtime");function b({children:r,id:e,className:t=""}){return(0,Q.jsx)("p",{id:e,className:`micro text-feedback-red empty:hidden ${t}`.trim(),role:"alert",children:r})}var W=require("react/jsx-runtime");function g({children:r,id:e,className:t=""}){return(0,W.jsx)("p",{id:e,className:`micro text-secondary ${t}`.trim(),children:r})}var X=require("react");function C(r){let e=(0,X.useId)();return{inputId:r||e+"-input",errorId:e+"-error",hintId:e+"-hint"}}var S=require("react/jsx-runtime"),Y=(0,z.forwardRef)(function({hint:e,id:t,label:o,hidden:l,dir:u,errorMessage:n,lang:v,translate:f,slot:s,value:m,defaultValue:p,isValid:i,className:P,...d},a){let[c,x]=(0,z.useState)(!m&&!p);function T(I){let{validity:F}=I.currentTarget,G=I.currentTarget.required;G||(I.currentTarget.required=!0),x(F.valueMissing&&!F.badInput),G||(I.currentTarget.required=!1)}let{inputId:h,errorId:H,hintId:y}=C(t),E=d["aria-invalid"]||i===!1||!!n;return(0,S.jsxs)("div",{className:`v-input-floating-label ${P||""}`.trim(),hidden:l,dir:u,lang:v,translate:f,slot:s,children:[(0,S.jsx)("label",{htmlFor:h,children:o}),(0,S.jsx)("input",{...d,ref:a,type:"date",id:h,value:m,defaultValue:p,onBlur:I=>{d.onBlur?.(I),T(I)},onChange:I=>{d.onChange?.(I),T(I)},"data-blank":c?"":void 0,"aria-invalid":E?!0:void 0,"aria-errormessage":n?H:void 0,"aria-describedby":e?y:void 0}),(0,S.jsx)(b,{id:H,className:"mt-4",children:n}),e&&(0,S.jsx)(g,{id:y,className:"mt-4",children:e})]})});var $=require("react");var M=require("react/jsx-runtime"),Z=(0,$.forwardRef)(function({hint:e,id:t,label:o,hidden:l,dir:u,errorMessage:n,lang:v,translate:f,slot:s,defaultPasswordVisible:m=!1,showPasswordLabel:p,hidePasswordLabel:i,isValid:P,className:d,...a},c){let[x,T]=(0,$.useState)(m),{inputId:h,errorId:H,hintId:y}=C(t),E=a["aria-invalid"]||!!n;return(0,M.jsxs)("div",{className:`v-input-floating-label ${d||""}`.trim(),hidden:l,dir:u,lang:v,translate:f,slot:s,children:[(0,M.jsx)("label",{htmlFor:h,children:o}),(0,M.jsxs)("div",{className:"v-input","data-input-delegate":!0,"aria-invalid":E?!0:void 0,children:[(0,M.jsx)("input",{placeholder:" ",...a,ref:c,id:h,autoCorrect:"off",spellCheck:"false",autoCapitalize:"none",className:"bg-transparent",type:x?"text":"password","aria-invalid":E?!0:void 0,"aria-errormessage":E?H:void 0,"aria-describedby":e?y:void 0}),(0,M.jsx)("button",{type:"button",className:"v-input__password-visibility-control",...p&&i?{"aria-label":x?i:p,"aria-controls":h}:{"aria-hidden":!0,tabIndex:-1},onClick:()=>T(I=>!I)})]}),(0,M.jsx)(b,{id:H,className:"mt-4",children:n}),e&&(0,M.jsx)(g,{id:y,className:"mt-4",children:e})]})});var ee=require("react");var O=require("react");var L=require("react/jsx-runtime"),j=(0,O.forwardRef)(function(e,t){return(0,L.jsx)(A,{...e,type:"text",ref:t})}),A=(0,O.forwardRef)(function({hint:e,id:t,label:o,hidden:l,dir:u,errorMessage:n,lang:v,translate:f,slot:s,isValid:m,className:p,...i},P){let{inputId:d,errorId:a,hintId:c}=C(t),x=i["aria-invalid"]||m===!1||!!n;return(0,L.jsxs)("div",{className:`v-input-floating-label ${p||""}`.trim(),hidden:l,dir:u,lang:v,translate:f,slot:s,children:[(0,L.jsx)("label",{htmlFor:d,children:o}),(0,L.jsx)("input",{placeholder:" ",...i,ref:P,id:d,"aria-invalid":x?!0:void 0,"aria-errormessage":n?a:void 0,"aria-describedby":e?c:void 0}),(0,L.jsx)(b,{id:a,className:"mt-4",children:n}),e&&(0,L.jsx)(g,{id:c,className:"mt-4",children:e})]})});var re=require("react/jsx-runtime"),te=(0,ee.forwardRef)(function(e,t){return(0,re.jsx)(A,{...e,type:"email",inputMode:"email",ref:t})});var oe=require("react");var ae=require("react/jsx-runtime"),ne=(0,oe.forwardRef)(function(e,t){return(0,ae.jsx)(A,{...e,type:"tel",ref:t})});var le=require("react");var ie=require("react/jsx-runtime"),se=(0,le.forwardRef)(function(e,t){return(0,ie.jsx)(A,{...e,type:"url",inputMode:"url",ref:t})});var B=require("react");var R=require("react/jsx-runtime"),pe=(0,B.forwardRef)(function({hint:e,id:t,label:o,hidden:l,dir:u,errorMessage:n,lang:v,translate:f,slot:s,value:m,defaultValue:p,children:i,isValid:P,className:d,...a},c){let x=!1;B.Children.forEach(i,D=>{(0,B.isValidElement)(D)&&D.type==="option"&&D.props.value===""&&(x=!0)});let[T,h]=(0,B.useState)(!p),H=typeof m=="string",{inputId:y,errorId:E,hintId:I}=C(t),F=a["aria-invalid"]||P===!1||!!n,G=H?!m:T;return(0,R.jsxs)("div",{className:`v-input-floating-label ${d||""}`.trim(),hidden:l,dir:u,lang:v,translate:f,slot:s,children:[(0,R.jsx)("label",{htmlFor:y,children:o}),(0,R.jsxs)("select",{...a,ref:c,id:y,onChange:H?a.onChange:D=>{a.onChange?.(D),h(!D.target.value)},value:m,defaultValue:p,"data-blank":G?"":void 0,"aria-invalid":F?"true":void 0,"aria-errormessage":n?E:void 0,"aria-describedby":e?I:void 0,children:[!p&&!x&&(0,R.jsx)("option",{value:"",hidden:!G,disabled:!G,children:o}),i]}),(0,R.jsx)(b,{id:E,className:"mt-4",children:n}),e&&(0,R.jsx)(g,{id:I,className:"mt-4",children:e})]})});var de=require("react");var U=require("react/jsx-runtime"),ue=(0,de.forwardRef)(function({label:e,id:t,hint:o,hidden:l,dir:u,lang:n,translate:v,slot:f,errorMessage:s,isValid:m,className:p,...i},P){let{inputId:d,hintId:a,errorId:c}=C(t),x=i["aria-invalid"]||m===!1||!!s;return(0,U.jsxs)("div",{className:`flex-row ${p||""}`.trim(),hidden:l,dir:u,lang:n,translate:v,slot:f,children:[(0,U.jsx)("input",{...i,ref:P,type:"checkbox",id:d,"aria-invalid":x?!0:void 0,"aria-errormessage":s?c:void 0,"aria-describedby":o?a:void 0}),(0,U.jsxs)("div",{className:"flex-col stack-4 ml-8",children:[(0,U.jsx)("label",{htmlFor:d,children:e}),(0,U.jsx)(b,{id:c,children:s}),o&&(0,U.jsx)(g,{id:a,children:o})]})]})});var q=require("react");var me=require("react");var k=require("react/jsx-runtime");function ce({legend:r,id:e,hint:t,name:o,children:l,required:u,defaultValue:n,value:v,hidden:f,dir:s,lang:m,translate:p,slot:i,errorMessage:P,onChange:d,form:a,enterKeyHint:c,readOnly:x,isValid:T,...h}){let{inputId:H,hintId:y,errorId:E}=C(e),I=h["aria-invalid"]||T===!1||!!P;return(0,k.jsxs)("fieldset",{...h,hidden:f,dir:s,lang:m,translate:p,slot:i,form:a,id:H,role:"radiogroup","aria-invalid":I?!0:void 0,"aria-errormessage":P?E:void 0,"aria-describedby":t?y:void 0,"aria-required":u?!0:void 0,children:[(0,k.jsx)("legend",{className:"mb-4",children:r}),t&&(0,k.jsx)(g,{id:y,className:"mb-16",children:t}),(0,k.jsxs)("div",{className:"stack-8",hidden:f,children:[(0,k.jsx)(b,{id:E,className:"mb-16",children:P}),(0,k.jsx)(J,{value:{defaultValue:n,enterKeyHint:c,form:a,name:o,onChange:d,readOnly:x,required:u,value:v},children:l})]})]})}var _=(0,me.createContext)({}),J=_.Provider;var w=require("react/jsx-runtime"),fe=(0,q.forwardRef)(function({label:e,id:t,hint:o,hidden:l,dir:u,lang:n,translate:v,slot:f,value:s,className:m,...p},i){let{inputId:P,hintId:d}=C(t),{value:a,defaultValue:c,...x}=(0,q.useContext)(_),T,h;return typeof a<"u"?T=s===a:typeof c<"u"&&s===c&&(h=!0),(0,w.jsxs)("div",{className:`flex-row ${m||""}`.trim(),hidden:l,dir:u,lang:n,translate:v,slot:f,children:[(0,w.jsx)("input",{...p,...x,ref:i,checked:T,defaultChecked:h,type:"radio",id:P,value:s}),o?(0,w.jsxs)("div",{className:"flex-col stack-4 ml-8",children:[(0,w.jsx)("label",{htmlFor:P,children:e}),(0,w.jsx)(g,{id:d,children:o})]}):(0,w.jsx)("label",{htmlFor:P,className:"ml-8",children:e})]})});var Pe=require("react");var V=require("react/jsx-runtime"),ge=(0,Pe.forwardRef)(function({hint:e,id:t,label:o,hidden:l,dir:u,errorMessage:n,lang:v,translate:f,slot:s,isValid:m,className:p,...i},P){let{inputId:d,errorId:a,hintId:c}=C(t),x=i["aria-invalid"]||m===!1||!!n;return(0,V.jsxs)("div",{className:`v-input-floating-label ${p||""}`.trim(),hidden:l,dir:u,lang:v,translate:f,slot:s,children:[(0,V.jsx)("label",{htmlFor:d,children:o}),(0,V.jsx)("textarea",{placeholder:" ",...i,ref:P,id:d,"aria-invalid":x?!0:void 0,"aria-errormessage":n?a:void 0,"aria-describedby":e?c:void 0}),(0,V.jsx)(b,{id:a,className:"mb-4",children:n}),e&&(0,V.jsx)(g,{id:c,className:"mt-4",children:e})]})});var ve=require("react"),N=require("react/jsx-runtime"),xe=(0,ve.forwardRef)(function({color:e,size:t,loading:o,loadingLabel:l,disabled:u,children:n,variant:v="filled",className:f="",...s},m){let p=!u&&o;return(0,N.jsx)("button",{ref:m,...s,onClick:i=>{u||o?i.preventDefault():s.onClick&&s.onClick(i)},type:"submit",className:`button-${v} ${f}`.trim(),"aria-disabled":u||o||void 0,"data-loading":p||void 0,"aria-live":typeof o=="boolean"?"polite":void 0,"data-color":e==="neutral"?void 0:e,"data-size":t==="small"?"small":void 0,children:p?(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)("span",{className:"invisible",children:n}),(0,N.jsx)("progress",{className:"spinner","aria-label":l})]}):n})});0&&(module.exports={Checkbox,DateInput,EmailInput,ErrorMessage,Hint,PasswordInput,Radio,RadioContextProvider,RadioGroup,Select,SubmitButton,TelInput,TextArea,TextInput,UrlInput});
var z=Object.defineProperty;var Ce=Object.getOwnPropertyDescriptor;var he=Object.getOwnPropertyNames;var Te=Object.prototype.hasOwnProperty;var ye=(n,e)=>{for(var t in e)z(n,t,{get:e[t],enumerable:!0})},Ee=(n,e,t,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of he(e))!Te.call(n,l)&&l!==t&&z(n,l,{get:()=>e[l],enumerable:!(o=Ce(e,l))||o.enumerable});return n};var He=n=>Ee(z({},"__esModule",{value:!0}),n);var Re={};ye(Re,{Checkbox:()=>ce,DateInput:()=>_,EmailInput:()=>re,ErrorMessage:()=>b,Hint:()=>g,PasswordInput:()=>ee,Radio:()=>Pe,RadioContextProvider:()=>J,RadioGroup:()=>fe,Select:()=>de,SubmitButton:()=>Ie,TelInput:()=>ae,TextArea:()=>xe,TextInput:()=>Y,UrlInput:()=>ie});module.exports=He(Re);var V=require("react"),Z=require("@volvo-cars/react-icons");var q=require("react");var Q=require("react/jsx-runtime");function b({children:n,id:e,className:t=""}){return(0,Q.jsx)("p",{id:e,className:`micro text-feedback-red empty:hidden ${t}`.trim(),role:"alert",children:n})}var W=require("react/jsx-runtime");function g({children:n,id:e,className:t=""}){return(0,W.jsx)("p",{id:e,className:`micro text-secondary ${t}`.trim(),children:n})}var X=require("react");function x(n){let e=(0,X.useId)(),t=n||e;return{rootId:t,inputId:t+"-input",errorId:t+"-error",hintId:t+"-hint"}}var T=require("react/jsx-runtime"),Y=(0,q.forwardRef)(function(e,t){return(0,T.jsx)(C,{...e,type:"text",ref:t})}),C=(0,q.forwardRef)(function({hint:e,id:t,label:o,hidden:l,dir:d,errorMessage:a,lang:m,translate:c,slot:s,isValid:r,className:i,contentAfter:p,...f},v){let{inputId:u,errorId:P,hintId:I}=x(t),y=f["aria-invalid"]||r===!1||!!a,h={placeholder:" ",...f,ref:v,id:u,"aria-invalid":y?!0:void 0,"aria-errormessage":a?P:void 0,"aria-describedby":e?I:void 0};return(0,T.jsxs)("div",{id:t,className:`v-input-floating-label ${i||""}`.trim(),hidden:l,dir:d,lang:m,translate:c,slot:s,children:[(0,T.jsx)("label",{htmlFor:u,children:o}),p?(0,T.jsxs)("div",{className:"v-input","data-input-delegate":!0,"aria-invalid":y?!0:void 0,children:[(0,T.jsx)("input",{...h,className:"bg-transparent"}),p]}):(0,T.jsx)("input",{...h}),(0,T.jsx)(b,{id:P,className:"mt-4",children:a}),e&&(0,T.jsx)(g,{id:I,className:"mt-4",children:e})]})});var $=require("react/jsx-runtime"),_=(0,V.forwardRef)(function({value:e,onChange:t,onBlur:o,defaultValue:l,...d},a){let[m,c]=(0,V.useState)(!e&&!l);function s(r){let{validity:i}=r.currentTarget,p=r.currentTarget.required;p||(r.currentTarget.required=!0),c(i.valueMissing&&!i.badInput),p||(r.currentTarget.required=!1)}return(0,$.jsx)(C,{...d,value:e,defaultValue:l,type:"date",ref:a,onBlur:r=>{o?.(r),s(r)},onChange:r=>{t?.(r),s(r)},"data-blank":m?"":void 0,contentAfter:(0,$.jsx)(Z.IconButton,{className:"ml-8 -mr-8",variant:"clear",iconName:"calendar","aria-hidden":!0,tabIndex:-1,"aria-label":"",onClick:r=>{let i=r.currentTarget.parentElement?.querySelector("input[type=date]");if(i)try{if(i.showPicker(),/^((?!chrome|android).)*safari/i.test(navigator.userAgent))throw new Error}catch{i.click(),i.focus()}}})})});var G=require("react"),j=require("@volvo-cars/react-icons");var K=require("react/jsx-runtime"),ee=(0,G.forwardRef)(function({id:e,defaultPasswordVisible:t=!1,showPasswordLabel:o,...l},d){let[a,m]=(0,G.useState)(t),{inputId:c,rootId:s}=x(e);return(0,K.jsx)(C,{...l,type:a?"text":"password",id:s,ref:d,contentAfter:(0,K.jsx)(j.IconButton,{className:"-mr-8",variant:"clear",iconName:a?"other-eye":"other-eyeslash",...o?{"aria-pressed":a,"aria-label":o,"aria-controls":c}:{"aria-label":"","aria-hidden":!0,tabIndex:-1},onClick:()=>m(r=>!r)})})});var te=require("react");var oe=require("react/jsx-runtime"),re=(0,te.forwardRef)(function(e,t){return(0,oe.jsx)(C,{...e,type:"email",inputMode:"email",ref:t})});var ne=require("react");var le=require("react/jsx-runtime"),ae=(0,ne.forwardRef)(function(e,t){return(0,le.jsx)(C,{...e,type:"tel",ref:t})});var se=require("react");var pe=require("react/jsx-runtime"),ie=(0,se.forwardRef)(function(e,t){return(0,pe.jsx)(C,{...e,type:"url",inputMode:"url",ref:t})});var H=require("react");var E=require("react/jsx-runtime"),de=(0,H.forwardRef)(function({hint:e,id:t,label:o,hidden:l,dir:d,errorMessage:a,lang:m,translate:c,slot:s,value:r,defaultValue:i,children:p,isValid:f,className:v,...u},P){let I=!1;H.Children.forEach(p,U=>{(0,H.isValidElement)(U)&&U.type==="option"&&U.props.value===""&&(I=!0)});let[y,h]=(0,H.useState)(!i),A=typeof r=="string",{inputId:w,errorId:N,hintId:S}=x(t),be=u["aria-invalid"]||f===!1||!!a,F=A?!r:y;return(0,E.jsxs)("div",{className:`v-input-floating-label ${v||""}`.trim(),hidden:l,dir:d,lang:m,translate:c,slot:s,children:[(0,E.jsx)("label",{htmlFor:w,children:o}),(0,E.jsxs)("select",{...u,ref:P,id:w,onChange:A?u.onChange:U=>{u.onChange?.(U),h(!U.target.value)},value:r,defaultValue:i,"data-blank":F?"":void 0,"aria-invalid":be?"true":void 0,"aria-errormessage":a?N:void 0,"aria-describedby":e?S:void 0,children:[!i&&!I&&(0,E.jsx)("option",{value:"",hidden:!F,disabled:!F,children:o}),p]}),(0,E.jsx)(b,{id:N,className:"mt-4",children:a}),e&&(0,E.jsx)(g,{id:S,className:"mt-4",children:e})]})});var ue=require("react");var R=require("react/jsx-runtime"),ce=(0,ue.forwardRef)(function({label:e,id:t,hint:o,hidden:l,dir:d,lang:a,translate:m,slot:c,errorMessage:s,isValid:r,className:i,...p},f){let{inputId:v,hintId:u,errorId:P}=x(t),I=p["aria-invalid"]||r===!1||!!s;return(0,R.jsxs)("div",{className:`flex-row ${i||""}`.trim(),hidden:l,dir:d,lang:a,translate:m,slot:c,children:[(0,R.jsx)("input",{...p,ref:f,type:"checkbox",id:v,"aria-invalid":I?!0:void 0,"aria-errormessage":s?P:void 0,"aria-describedby":o?u:void 0}),(0,R.jsxs)("div",{className:"flex-col stack-4 ml-8",children:[(0,R.jsx)("label",{htmlFor:v,children:e}),(0,R.jsx)(b,{id:P,children:s}),o&&(0,R.jsx)(g,{id:u,children:o})]})]})});var D=require("react");var me=require("react");var L=require("react/jsx-runtime");function fe({legend:n,id:e,hint:t,name:o,children:l,required:d,defaultValue:a,value:m,hidden:c,dir:s,lang:r,translate:i,slot:p,errorMessage:f,onChange:v,form:u,enterKeyHint:P,readOnly:I,isValid:y,...h}){let{inputId:A,hintId:w,errorId:N}=x(e),S=h["aria-invalid"]||y===!1||!!f;return(0,L.jsxs)("fieldset",{...h,hidden:c,dir:s,lang:r,translate:i,slot:p,form:u,id:A,role:"radiogroup","aria-invalid":S?!0:void 0,"aria-errormessage":f?N:void 0,"aria-describedby":t?w:void 0,"aria-required":d?!0:void 0,children:[(0,L.jsx)("legend",{className:"mb-4",children:n}),t&&(0,L.jsx)(g,{id:w,className:"mb-16",children:t}),(0,L.jsxs)("div",{className:"stack-8",hidden:c,children:[(0,L.jsx)(b,{id:N,className:"mb-16",children:f}),(0,L.jsx)(J,{value:{defaultValue:a,enterKeyHint:P,form:u,name:o,onChange:v,readOnly:I,required:d,value:m},children:l})]})]})}var O=(0,me.createContext)({}),J=O.Provider;var M=require("react/jsx-runtime"),Pe=(0,D.forwardRef)(function({label:e,id:t,hint:o,hidden:l,dir:d,lang:a,translate:m,slot:c,value:s,className:r,...i},p){let{inputId:f,hintId:v}=x(t),{value:u,defaultValue:P,...I}=(0,D.useContext)(O),y,h;return typeof u<"u"?y=s===u:typeof P<"u"&&s===P&&(h=!0),(0,M.jsxs)("div",{className:`flex-row ${r||""}`.trim(),hidden:l,dir:d,lang:a,translate:m,slot:c,children:[(0,M.jsx)("input",{...i,...I,ref:p,checked:y,defaultChecked:h,type:"radio",id:f,value:s}),o?(0,M.jsxs)("div",{className:"flex-col stack-4 ml-8",children:[(0,M.jsx)("label",{htmlFor:f,children:e}),(0,M.jsx)(g,{id:v,children:o})]}):(0,M.jsx)("label",{htmlFor:f,className:"ml-8",children:e})]})});var ge=require("react");var k=require("react/jsx-runtime"),xe=(0,ge.forwardRef)(function({hint:e,id:t,label:o,hidden:l,dir:d,errorMessage:a,lang:m,translate:c,slot:s,isValid:r,className:i,...p},f){let{inputId:v,errorId:u,hintId:P}=x(t),I=p["aria-invalid"]||r===!1||!!a;return(0,k.jsxs)("div",{className:`v-input-floating-label ${i||""}`.trim(),hidden:l,dir:d,lang:m,translate:c,slot:s,children:[(0,k.jsx)("label",{htmlFor:v,children:o}),(0,k.jsx)("textarea",{placeholder:" ",...p,ref:f,id:v,"aria-invalid":I?!0:void 0,"aria-errormessage":a?u:void 0,"aria-describedby":e?P:void 0}),(0,k.jsx)(b,{id:u,className:"mb-4",children:a}),e&&(0,k.jsx)(g,{id:P,className:"mt-4",children:e})]})});var ve=require("react"),B=require("react/jsx-runtime"),Ie=(0,ve.forwardRef)(function({color:e,size:t,loading:o,loadingLabel:l,disabled:d,children:a,variant:m="filled",className:c="",...s},r){let i=!d&&o;return(0,B.jsx)("button",{ref:r,...s,onClick:p=>{d||o?p.preventDefault():s.onClick&&s.onClick(p)},type:"submit",className:`button-${m} ${c}`.trim(),"aria-disabled":d||o||void 0,"data-loading":i||void 0,"aria-live":typeof o=="boolean"?"polite":void 0,"data-color":e==="neutral"?void 0:e,"data-size":t==="small"?"small":void 0,children:i?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)("span",{className:"invisible",children:a}),(0,B.jsx)("progress",{className:"spinner","aria-label":l})]}):a})});0&&(module.exports={Checkbox,DateInput,EmailInput,ErrorMessage,Hint,PasswordInput,Radio,RadioContextProvider,RadioGroup,Select,SubmitButton,TelInput,TextArea,TextInput,UrlInput});
//# sourceMappingURL=index.js.map

@@ -32,3 +32,2 @@ /// <reference types="react" />

showPasswordLabel?: string;
hidePasswordLabel?: string;
}

@@ -35,0 +34,0 @@ type ControlledProps = {

@@ -82,3 +82,3 @@ /// <reference types="react" />

*/
variant?: "filled" | "outlined" | undefined;
variant?: "outlined" | "filled" | undefined;
/**

@@ -85,0 +85,0 @@ * The `accent` color can be used to add extra prominence to the button.

@@ -30,2 +30,7 @@ /// <reference types="react" />

list?: string;
/**
* Inject an element into the input field, displayed at the end of the input.
* Usually used to display a custom `Icon` or `IconButton`.
*/
contentAfter?: React.ReactNode;
}

@@ -32,0 +37,0 @@ type ControlledProps = {

@@ -42,2 +42,7 @@ /// <reference types="react" />

autoComplete?: 'off' | 'on' | 'bday' | 'bday-day' | 'bday-month' | 'bday-year' | 'email tel' | 'name' | 'username' | 'one-time-code' | 'organization-title' | 'organization' | 'street-address' | 'address-line1' | 'address-line2' | 'address-line3' | 'address-level4' | 'address-level3' | 'address-level2' | 'address-level1' | 'country' | 'country-name' | 'postal-code' | 'cc-name' | 'cc-number' | 'cc-exp' | 'cc-exp-month' | 'cc-exp-year' | 'cc-csc' | 'cc-type' | 'transaction-currency' | 'transaction-amount' | 'language' | 'sex';
/**
* Inject an element into the input field, displayed at the end of the input.
* Usually used to display a custom `Icon` or `IconButton`.
*/
contentAfter?: React.ReactNode;
}

@@ -92,3 +97,3 @@ type ControlledProps = {

*/
export declare const TextLikeInput: import("react").ForwardRefExoticComponent<Omit<TextInputProps, "autoComplete" | "inputMode"> & {
export declare const TextLikeInput: import("react").ForwardRefExoticComponent<Omit<TextInputProps, "inputMode" | "autoComplete"> & {
type: string;

@@ -95,0 +100,0 @@ autoComplete?: string | undefined;

@@ -30,2 +30,7 @@ /// <reference types="react" />

list?: string;
/**
* Inject an element into the input field, displayed at the end of the input.
* Usually used to display a custom `Icon` or `IconButton`.
*/
contentAfter?: React.ReactNode;
}

@@ -32,0 +37,0 @@ type ControlledProps = {

export declare function useIds(passedId: string | undefined): {
rootId: string;
inputId: string;

@@ -3,0 +4,0 @@ errorId: string;

{
"name": "@volvo-cars/react-forms",
"description": "React form components",
"version": "0.9.0",
"version": "0.10.0",
"license": "UNLICENSED",

@@ -36,2 +36,5 @@ "sideEffects": false,

},
"dependencies": {
"@volvo-cars/react-icons": "^0.8.1"
},
"devDependencies": {

@@ -38,0 +41,0 @@ "@types/react": "18.2.22",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc