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

@purpurds/text-field

Package Overview
Dependencies
Maintainers
2
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@purpurds/text-field - npm Package Compare versions

Comparing version 4.0.1 to 4.0.2

10

dist/LICENSE.txt
Name: @purpurds/field-error-text
Version: 4.0.0
Version: 4.0.1
License: AGPL-3.0-only

@@ -9,3 +9,3 @@ Private: false

Name: @purpurds/field-helper-text
Version: 4.0.0
Version: 4.0.1
License: AGPL-3.0-only

@@ -17,3 +17,3 @@ Private: false

Name: @purpurds/icon
Version: 4.0.0
Version: 4.0.1
License: AGPL-3.0-only

@@ -25,3 +25,3 @@ Private: false

Name: @purpurds/label
Version: 4.0.0
Version: 4.0.1
License: AGPL-3.0-only

@@ -33,3 +33,3 @@ Private: false

Name: @purpurds/spinner
Version: 4.0.0
Version: 4.0.1
License: AGPL-3.0-only

@@ -36,0 +36,0 @@ Private: false

@@ -1,30 +0,30 @@

"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),s=require("react");require("react-dom");function Y(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var D={exports:{}};/*!
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),s=require("react");require("react-dom");function J(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var R={exports:{}};/*!
Copyright (c) 2018 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/(function(r){(function(){var i={}.hasOwnProperty;function n(){for(var e="",t=0;t<arguments.length;t++){var u=arguments[t];u&&(e=l(e,a.call(this,u)))}return e}function a(e){if(typeof e=="string"||typeof e=="number")return this&&this[e]||e;if(typeof e!="object")return"";if(Array.isArray(e))return n.apply(this,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var u in e)i.call(e,u)&&e[u]&&(t=l(t,this&&this[u]||u));return t}function l(e,t){return t?e?e+" "+t:e+t:e}r.exports?(n.default=n,r.exports=n):window.classNames=n})()})(D);var J=D.exports;const K=Y(J),Q={"purpur-icon":"_purpur-icon_8u1lq_1","purpur-icon--xxs":"_purpur-icon--xxs_8u1lq_4","purpur-icon--xs":"_purpur-icon--xs_8u1lq_8","purpur-icon--sm":"_purpur-icon--sm_8u1lq_12","purpur-icon--md":"_purpur-icon--md_8u1lq_16","purpur-icon--lg":"_purpur-icon--lg_8u1lq_20","purpur-icon--xl":"_purpur-icon--xl_8u1lq_24"},U={name:"error-filled",svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 24" fill="currentColor"><path fill-rule="evenodd" d="M14.268 3.5c-.77-1.333-2.694-1.333-3.464 0l-8.66 15c-.77 1.333.192 3 1.732 3h17.32c1.54 0 2.502-1.667 1.733-3l-8.66-15Zm-.694 5.067-.247 6.876h-1.566l-.247-6.876a1.03 1.03 0 1 1 2.06 0Zm.212 8.917c0 .649-.585 1.234-1.25 1.234-.648 0-1.25-.585-1.25-1.234 0-.633.602-1.234 1.25-1.234.665 0 1.25.601 1.25 1.234Z" clip-rule="evenodd"/></svg>',keywords:["error-filled"],category:"status"},W=K.bind(Q),N="purpur-icon",ee="md",re=r=>r.filter(i=>Object.keys(i).length>=1).map(i=>`${i.name}="${i.value}"`).join(" "),te=({content:r="",title:i}={})=>{const n=[{name:"xmlns",value:"http://www.w3.org/2000/svg"},{name:"fill",value:"currentColor"},{name:"viewBox",value:"0 0 24 24"},i?{name:"role",value:"img"}:{name:"aria-hidden",value:"true"}],a=i?`<title>${i}</title>`:"";return`<svg ${re(n)}>${a}${r}</svg>`},ne=r=>r.replace(/<(\/?)svg([^>]*)>/g,"").trim(),ie=({["data-testid"]:r,svg:i,allyTitle:n,className:a="",size:l=ee,...e})=>{const t=te({content:ne(i.svg),title:n}),u=W(a,N,`${N}--${l}`);return o.jsx("span",{"aria-label":n,className:u,"data-testid":r,dangerouslySetInnerHTML:{__html:t},...e})};function ae(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var F={exports:{}};/*!
*/(function(r){(function(){var i={}.hasOwnProperty;function n(){for(var e="",t=0;t<arguments.length;t++){var u=arguments[t];u&&(e=l(e,a.call(this,u)))}return e}function a(e){if(typeof e=="string"||typeof e=="number")return this&&this[e]||e;if(typeof e!="object")return"";if(Array.isArray(e))return n.apply(this,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var u in e)i.call(e,u)&&e[u]&&(t=l(t,this&&this[u]||u));return t}function l(e,t){return t?e?e+" "+t:e+t:e}r.exports?(n.default=n,r.exports=n):window.classNames=n})()})(R);var K=R.exports;const Q=J(K),U={"purpur-icon":"_purpur-icon_8u1lq_1","purpur-icon--xxs":"_purpur-icon--xxs_8u1lq_4","purpur-icon--xs":"_purpur-icon--xs_8u1lq_8","purpur-icon--sm":"_purpur-icon--sm_8u1lq_12","purpur-icon--md":"_purpur-icon--md_8u1lq_16","purpur-icon--lg":"_purpur-icon--lg_8u1lq_20","purpur-icon--xl":"_purpur-icon--xl_8u1lq_24"},W={name:"error-filled",svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 24" fill="currentColor"><path fill-rule="evenodd" d="M14.268 3.5c-.77-1.333-2.694-1.333-3.464 0l-8.66 15c-.77 1.333.192 3 1.732 3h17.32c1.54 0 2.502-1.667 1.733-3l-8.66-15Zm-.694 5.067-.247 6.876h-1.566l-.247-6.876a1.03 1.03 0 1 1 2.06 0Zm.212 8.917c0 .649-.585 1.234-1.25 1.234-.648 0-1.25-.585-1.25-1.234 0-.633.602-1.234 1.25-1.234.665 0 1.25.601 1.25 1.234Z" clip-rule="evenodd"/></svg>',keywords:["error-filled"],category:"status"},ee=Q.bind(U),N="purpur-icon",re="md",te=r=>r.filter(i=>Object.keys(i).length>=1).map(i=>`${i.name}="${i.value}"`).join(" "),ne=({content:r="",title:i}={})=>{const n=[{name:"xmlns",value:"http://www.w3.org/2000/svg"},{name:"fill",value:"currentColor"},{name:"viewBox",value:"0 0 24 24"},i?{name:"role",value:"img"}:{name:"aria-hidden",value:"true"}],a=i?`<title>${i}</title>`:"";return`<svg ${te(n)}>${a}${r}</svg>`},ie=r=>r.replace(/<(\/?)svg([^>]*)>/g,"").trim(),ae=({["data-testid"]:r,svg:i,allyTitle:n,className:a="",size:l=re,...e})=>{const t=ne({content:ie(i.svg),title:n}),u=ee(a,N,`${N}--${l}`);return o.jsx("span",{"aria-label":n,className:u,"data-testid":r,dangerouslySetInnerHTML:{__html:t},...e})};function ue(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var F={exports:{}};/*!
Copyright (c) 2018 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/(function(r){(function(){var i={}.hasOwnProperty;function n(){for(var e="",t=0;t<arguments.length;t++){var u=arguments[t];u&&(e=l(e,a(u)))}return e}function a(e){if(typeof e=="string"||typeof e=="number")return e;if(typeof e!="object")return"";if(Array.isArray(e))return n.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var u in e)i.call(e,u)&&e[u]&&(t=l(t,u));return t}function l(e,t){return t?e?e+" "+t:e+t:e}r.exports?(n.default=n,r.exports=n):window.classNames=n})()})(F);var ue=F.exports;const le=ae(ue),A={"purpur-field-error-text":"_purpur-field-error-text_1h4gy_1","purpur-field-error-text__icon":"_purpur-field-error-text__icon_1h4gy_12"},E="purpur-field-error-text",se=({["data-testid"]:r,children:i,className:n,relevant:a="additions text",...l})=>o.jsxs("div",{className:le([n,A[E]]),"data-testid":r,"aria-live":"assertive","aria-relevant":a,...l,children:[o.jsx(ie,{svg:U,size:"xs",className:A[`${E}__icon`]}),i]});function oe(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var V={exports:{}};/*!
*/(function(r){(function(){var i={}.hasOwnProperty;function n(){for(var e="",t=0;t<arguments.length;t++){var u=arguments[t];u&&(e=l(e,a(u)))}return e}function a(e){if(typeof e=="string"||typeof e=="number")return e;if(typeof e!="object")return"";if(Array.isArray(e))return n.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var u in e)i.call(e,u)&&e[u]&&(t=l(t,u));return t}function l(e,t){return t?e?e+" "+t:e+t:e}r.exports?(n.default=n,r.exports=n):window.classNames=n})()})(F);var le=F.exports;const se=ue(le),A={"purpur-field-error-text":"_purpur-field-error-text_1h4gy_1","purpur-field-error-text__icon":"_purpur-field-error-text__icon_1h4gy_12"},E="purpur-field-error-text",oe=({["data-testid"]:r,children:i,className:n,relevant:a="additions text",...l})=>o.jsxs("div",{className:se([n,A[E]]),"data-testid":r,"aria-live":"assertive","aria-relevant":a,...l,children:[o.jsx(ae,{svg:W,size:"xs",className:A[`${E}__icon`]}),i]});function pe(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var V={exports:{}};/*!
Copyright (c) 2018 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/(function(r){(function(){var i={}.hasOwnProperty;function n(){for(var e="",t=0;t<arguments.length;t++){var u=arguments[t];u&&(e=l(e,a(u)))}return e}function a(e){if(typeof e=="string"||typeof e=="number")return e;if(typeof e!="object")return"";if(Array.isArray(e))return n.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var u in e)i.call(e,u)&&e[u]&&(t=l(t,u));return t}function l(e,t){return t?e?e+" "+t:e+t:e}r.exports?(n.default=n,r.exports=n):window.classNames=n})()})(V);var pe=V.exports;const de=oe(pe),M={"purpur-field-helper-text":"_purpur-field-helper-text_139ly_1","purpur-field-helper-text--disabled":"_purpur-field-helper-text--disabled_139ly_9"},q="purpur-field-helper-text",ce=({["data-testid"]:r,children:i,className:n,disabled:a,id:l,...e})=>{const t=de([n,M[q],{[M[`${q}--disabled`]]:a}]);return o.jsx("span",{id:l,className:t,"data-testid":r,...e,children:i})};function _e(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var B={exports:{}};/*!
*/(function(r){(function(){var i={}.hasOwnProperty;function n(){for(var e="",t=0;t<arguments.length;t++){var u=arguments[t];u&&(e=l(e,a(u)))}return e}function a(e){if(typeof e=="string"||typeof e=="number")return e;if(typeof e!="object")return"";if(Array.isArray(e))return n.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var u in e)i.call(e,u)&&e[u]&&(t=l(t,u));return t}function l(e,t){return t?e?e+" "+t:e+t:e}r.exports?(n.default=n,r.exports=n):window.classNames=n})()})(V);var de=V.exports;const ce=pe(de),M={"purpur-field-helper-text":"_purpur-field-helper-text_139ly_1","purpur-field-helper-text--disabled":"_purpur-field-helper-text--disabled_139ly_9"},q="purpur-field-helper-text",_e=({["data-testid"]:r,children:i,className:n,disabled:a,id:l,...e})=>{const t=ce([n,M[q],{[M[`${q}--disabled`]]:a}]);return o.jsx("span",{id:l,className:t,"data-testid":r,...e,children:i})};function fe(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var B={exports:{}};/*!
Copyright (c) 2018 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/(function(r){(function(){var i={}.hasOwnProperty;function n(){for(var e="",t=0;t<arguments.length;t++){var u=arguments[t];u&&(e=l(e,a.call(this,u)))}return e}function a(e){if(typeof e=="string"||typeof e=="number")return this&&this[e]||e;if(typeof e!="object")return"";if(Array.isArray(e))return n.apply(this,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var u in e)i.call(e,u)&&e[u]&&(t=l(t,this&&this[u]||u));return t}function l(e,t){return t?e?e+" "+t:e+t:e}r.exports?(n.default=n,r.exports=n):window.classNames=n})()})(B);var fe=B.exports;const me=_e(fe),ve={"purpur-icon":"_purpur-icon_8u1lq_1","purpur-icon--xxs":"_purpur-icon--xxs_8u1lq_4","purpur-icon--xs":"_purpur-icon--xs_8u1lq_8","purpur-icon--sm":"_purpur-icon--sm_8u1lq_12","purpur-icon--md":"_purpur-icon--md_8u1lq_16","purpur-icon--lg":"_purpur-icon--lg_8u1lq_20","purpur-icon--xl":"_purpur-icon--xl_8u1lq_24"},ge={name:"check-circle-filled",svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Zm4.712-12.491a.875.875 0 1 0-1.424-1.018l-4.4 6.16-2.27-2.27a.875.875 0 0 0-1.237 1.238l3 3a.875.875 0 0 0 1.331-.11l5-7Z" clip-rule="evenodd"/></svg>',keywords:["check-circle-filled"],category:"status"},xe=me.bind(ve),C="purpur-icon",ye="md",he=r=>r.filter(i=>Object.keys(i).length>=1).map(i=>`${i.name}="${i.value}"`).join(" "),be=({content:r="",title:i}={})=>{const n=[{name:"xmlns",value:"http://www.w3.org/2000/svg"},{name:"fill",value:"currentColor"},{name:"viewBox",value:"0 0 24 24"},i?{name:"role",value:"img"}:{name:"aria-hidden",value:"true"}],a=i?`<title>${i}</title>`:"";return`<svg ${he(n)}>${a}${r}</svg>`},$e=r=>r.replace(/<(\/?)svg([^>]*)>/g,"").trim(),we=({["data-testid"]:r,svg:i,allyTitle:n,className:a="",size:l=ye,...e})=>{const t=be({content:$e(i.svg),title:n}),u=xe(a,C,`${C}--${l}`);return o.jsx("span",{"aria-label":n,className:u,"data-testid":r,dangerouslySetInnerHTML:{__html:t},...e})};function w(){return w=Object.assign?Object.assign.bind():function(r){for(var i=1;i<arguments.length;i++){var n=arguments[i];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(r[a]=n[a])}return r},w.apply(this,arguments)}function m(){return m=Object.assign?Object.assign.bind():function(r){for(var i=1;i<arguments.length;i++){var n=arguments[i];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(r[a]=n[a])}return r},m.apply(this,arguments)}function je(r,i){typeof r=="function"?r(i):r!=null&&(r.current=i)}function Se(...r){return i=>r.forEach(n=>je(n,i))}const T=s.forwardRef((r,i)=>{const{children:n,...a}=r,l=s.Children.toArray(n),e=l.find(Ne);if(e){const t=e.props.children,u=l.map(v=>v===e?s.Children.count(t)>1?s.Children.only(null):s.isValidElement(t)?t.props.children:null:v);return s.createElement(j,m({},a,{ref:i}),s.isValidElement(t)?s.cloneElement(t,void 0,u):null)}return s.createElement(j,m({},a,{ref:i}),n)});T.displayName="Slot";const j=s.forwardRef((r,i)=>{const{children:n,...a}=r;return s.isValidElement(n)?s.cloneElement(n,{...Ae(a,n.props),ref:i?Se(i,n.ref):n.ref}):s.Children.count(n)>1?s.Children.only(null):null});j.displayName="SlotClone";const Oe=({children:r})=>s.createElement(s.Fragment,null,r);function Ne(r){return s.isValidElement(r)&&r.type===Oe}function Ae(r,i){const n={...i};for(const a in i){const l=r[a],e=i[a];/^on[A-Z]/.test(a)?l&&e?n[a]=(...t)=>{e(...t),l(...t)}:l&&(n[a]=l):a==="style"?n[a]={...l,...e}:a==="className"&&(n[a]=[l,e].filter(Boolean).join(" "))}return{...r,...n}}const Ee=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Me=Ee.reduce((r,i)=>{const n=s.forwardRef((a,l)=>{const{asChild:e,...t}=a,u=e?T:i;return s.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),s.createElement(u,m({},t,{ref:l}))});return n.displayName=`Primitive.${i}`,{...r,[i]:n}},{}),qe=s.forwardRef((r,i)=>s.createElement(Me.label,w({},r,{ref:i,onMouseDown:n=>{var a;(a=r.onMouseDown)===null||a===void 0||a.call(r,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault()}}))),Ce=qe;function Pe(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Z={exports:{}};/*!
*/(function(r){(function(){var i={}.hasOwnProperty;function n(){for(var e="",t=0;t<arguments.length;t++){var u=arguments[t];u&&(e=l(e,a.call(this,u)))}return e}function a(e){if(typeof e=="string"||typeof e=="number")return this&&this[e]||e;if(typeof e!="object")return"";if(Array.isArray(e))return n.apply(this,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var u in e)i.call(e,u)&&e[u]&&(t=l(t,this&&this[u]||u));return t}function l(e,t){return t?e?e+" "+t:e+t:e}r.exports?(n.default=n,r.exports=n):window.classNames=n})()})(B);var ve=B.exports;const me=fe(ve),ge={"purpur-icon":"_purpur-icon_8u1lq_1","purpur-icon--xxs":"_purpur-icon--xxs_8u1lq_4","purpur-icon--xs":"_purpur-icon--xs_8u1lq_8","purpur-icon--sm":"_purpur-icon--sm_8u1lq_12","purpur-icon--md":"_purpur-icon--md_8u1lq_16","purpur-icon--lg":"_purpur-icon--lg_8u1lq_20","purpur-icon--xl":"_purpur-icon--xl_8u1lq_24"},xe={name:"check-circle-filled",svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Zm4.712-12.491a.875.875 0 1 0-1.424-1.018l-4.4 6.16-2.27-2.27a.875.875 0 0 0-1.237 1.238l3 3a.875.875 0 0 0 1.331-.11l5-7Z" clip-rule="evenodd"/></svg>',keywords:["check-circle-filled"],category:"status"},ye=me.bind(ge),C="purpur-icon",he="md",be=r=>r.filter(i=>Object.keys(i).length>=1).map(i=>`${i.name}="${i.value}"`).join(" "),$e=({content:r="",title:i}={})=>{const n=[{name:"xmlns",value:"http://www.w3.org/2000/svg"},{name:"fill",value:"currentColor"},{name:"viewBox",value:"0 0 24 24"},i?{name:"role",value:"img"}:{name:"aria-hidden",value:"true"}],a=i?`<title>${i}</title>`:"";return`<svg ${be(n)}>${a}${r}</svg>`},we=r=>r.replace(/<(\/?)svg([^>]*)>/g,"").trim(),je=({["data-testid"]:r,svg:i,allyTitle:n,className:a="",size:l=he,...e})=>{const t=$e({content:we(i.svg),title:n}),u=ye(a,C,`${C}--${l}`);return o.jsx("span",{"aria-label":n,className:u,"data-testid":r,dangerouslySetInnerHTML:{__html:t},...e})};function j(){return j=Object.assign?Object.assign.bind():function(r){for(var i=1;i<arguments.length;i++){var n=arguments[i];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(r[a]=n[a])}return r},j.apply(this,arguments)}function v(){return v=Object.assign?Object.assign.bind():function(r){for(var i=1;i<arguments.length;i++){var n=arguments[i];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(r[a]=n[a])}return r},v.apply(this,arguments)}function Se(r,i){typeof r=="function"?r(i):r!=null&&(r.current=i)}function Oe(...r){return i=>r.forEach(n=>Se(n,i))}const T=s.forwardRef((r,i)=>{const{children:n,...a}=r,l=s.Children.toArray(n),e=l.find(Ae);if(e){const t=e.props.children,u=l.map(m=>m===e?s.Children.count(t)>1?s.Children.only(null):s.isValidElement(t)?t.props.children:null:m);return s.createElement(S,v({},a,{ref:i}),s.isValidElement(t)?s.cloneElement(t,void 0,u):null)}return s.createElement(S,v({},a,{ref:i}),n)});T.displayName="Slot";const S=s.forwardRef((r,i)=>{const{children:n,...a}=r;return s.isValidElement(n)?s.cloneElement(n,{...Ee(a,n.props),ref:i?Oe(i,n.ref):n.ref}):s.Children.count(n)>1?s.Children.only(null):null});S.displayName="SlotClone";const Ne=({children:r})=>s.createElement(s.Fragment,null,r);function Ae(r){return s.isValidElement(r)&&r.type===Ne}function Ee(r,i){const n={...i};for(const a in i){const l=r[a],e=i[a];/^on[A-Z]/.test(a)?l&&e?n[a]=(...t)=>{e(...t),l(...t)}:l&&(n[a]=l):a==="style"?n[a]={...l,...e}:a==="className"&&(n[a]=[l,e].filter(Boolean).join(" "))}return{...r,...n}}const Me=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],qe=Me.reduce((r,i)=>{const n=s.forwardRef((a,l)=>{const{asChild:e,...t}=a,u=e?T:i;return s.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),s.createElement(u,v({},t,{ref:l}))});return n.displayName=`Primitive.${i}`,{...r,[i]:n}},{}),Ce=s.forwardRef((r,i)=>s.createElement(qe.label,j({},r,{ref:i,onMouseDown:n=>{var a;(a=r.onMouseDown)===null||a===void 0||a.call(r,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault()}}))),Pe=Ce;function Ie(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Z={exports:{}};/*!
Copyright (c) 2018 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/(function(r){(function(){var i={}.hasOwnProperty;function n(){for(var e="",t=0;t<arguments.length;t++){var u=arguments[t];u&&(e=l(e,a(u)))}return e}function a(e){if(typeof e=="string"||typeof e=="number")return e;if(typeof e!="object")return"";if(Array.isArray(e))return n.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var u in e)i.call(e,u)&&e[u]&&(t=l(t,u));return t}function l(e,t){return t?e?e+" "+t:e+t:e}r.exports?(n.default=n,r.exports=n):window.classNames=n})()})(Z);var Ie=Z.exports;const Re=Pe(Ie),P={"purpur-label":"_purpur-label_1jub8_1","purpur-label--disabled":"_purpur-label--disabled_1jub8_9"},I="purpur-label",De=({children:r,className:i,htmlFor:n,"data-testid":a,disabled:l,...e})=>{const t=Re([i,P[I],{[P[`${I}--disabled`]]:l}]);return o.jsx(Ce,{className:t,"data-testid":a,htmlFor:n,...e,children:r})};function Fe(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var z={exports:{}};/*!
*/(function(r){(function(){var i={}.hasOwnProperty;function n(){for(var e="",t=0;t<arguments.length;t++){var u=arguments[t];u&&(e=l(e,a(u)))}return e}function a(e){if(typeof e=="string"||typeof e=="number")return e;if(typeof e!="object")return"";if(Array.isArray(e))return n.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var u in e)i.call(e,u)&&e[u]&&(t=l(t,u));return t}function l(e,t){return t?e?e+" "+t:e+t:e}r.exports?(n.default=n,r.exports=n):window.classNames=n})()})(Z);var De=Z.exports;const Re=Ie(De),P={"purpur-label":"_purpur-label_1jub8_1","purpur-label--disabled":"_purpur-label--disabled_1jub8_9"},I="purpur-label",Fe=({children:r,className:i,htmlFor:n,"data-testid":a,disabled:l,...e})=>{const t=Re([i,P[I],{[P[`${I}--disabled`]]:l}]);return o.jsx(Pe,{className:t,"data-testid":a,htmlFor:n,...e,children:r})};function Ve(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var z={exports:{}};/*!
Copyright (c) 2018 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/(function(r){(function(){var i={}.hasOwnProperty;function n(){for(var e="",t=0;t<arguments.length;t++){var u=arguments[t];u&&(e=l(e,a(u)))}return e}function a(e){if(typeof e=="string"||typeof e=="number")return e;if(typeof e!="object")return"";if(Array.isArray(e))return n.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var u in e)i.call(e,u)&&e[u]&&(t=l(t,u));return t}function l(e,t){return t?e?e+" "+t:e+t:e}r.exports?(n.default=n,r.exports=n):window.classNames=n})()})(z);var Ve=z.exports;const R=Fe(Ve),Be="_rotate_7s2g1_1",Te="_dash_7s2g1_1",g={"purpur-spinner":"_purpur-spinner_7s2g1_1",rotate:Be,"purpur-spinner--xxs":"_purpur-spinner--xxs_7s2g1_4","purpur-spinner--xs":"_purpur-spinner--xs_7s2g1_8","purpur-spinner--sm":"_purpur-spinner--sm_7s2g1_12","purpur-spinner--md":"_purpur-spinner--md_7s2g1_16","purpur-spinner--lg":"_purpur-spinner--lg_7s2g1_20","purpur-spinner__circle":"_purpur-spinner__circle_7s2g1_24",dash:Te,"purpur-spinner__circle--disabled":"_purpur-spinner__circle--disabled_7s2g1_33","purpur-spinner__circle--negative":"_purpur-spinner__circle--negative_7s2g1_36","purpur-spinner__circle--negative-disabled":"_purpur-spinner__circle--negative-disabled_7s2g1_39"},x="purpur-spinner",Ze={PRIMARY:"primary",DISABLED:"disabled",NEGATIVE:"negative",NEGATIVE_DISABLED:"negative-disabled"},ze={XXS:"xxs",XS:"xs",SM:"sm",MD:"md",LG:"lg"},Le=({["data-testid"]:r,size:i=ze.SM,variant:n=Ze.PRIMARY,...a})=>o.jsx("div",{className:R([g[x],g[`${x}--${i}`]]),"data-testid":r,...a,children:o.jsx("svg",{viewBox:"0 0 50 50",children:o.jsx("circle",{className:R(g[`${x}__circle`],g[`${x}__circle--${n}`]),cx:"25",cy:"25",r:"20"})})});function ke(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var L={exports:{}};/*!
*/(function(r){(function(){var i={}.hasOwnProperty;function n(){for(var e="",t=0;t<arguments.length;t++){var u=arguments[t];u&&(e=l(e,a(u)))}return e}function a(e){if(typeof e=="string"||typeof e=="number")return e;if(typeof e!="object")return"";if(Array.isArray(e))return n.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var u in e)i.call(e,u)&&e[u]&&(t=l(t,u));return t}function l(e,t){return t?e?e+" "+t:e+t:e}r.exports?(n.default=n,r.exports=n):window.classNames=n})()})(z);var Be=z.exports;const D=Ve(Be),Te="_rotate_7s2g1_1",Ze="_dash_7s2g1_1",g={"purpur-spinner":"_purpur-spinner_7s2g1_1",rotate:Te,"purpur-spinner--xxs":"_purpur-spinner--xxs_7s2g1_4","purpur-spinner--xs":"_purpur-spinner--xs_7s2g1_8","purpur-spinner--sm":"_purpur-spinner--sm_7s2g1_12","purpur-spinner--md":"_purpur-spinner--md_7s2g1_16","purpur-spinner--lg":"_purpur-spinner--lg_7s2g1_20","purpur-spinner__circle":"_purpur-spinner__circle_7s2g1_24",dash:Ze,"purpur-spinner__circle--disabled":"_purpur-spinner__circle--disabled_7s2g1_33","purpur-spinner__circle--negative":"_purpur-spinner__circle--negative_7s2g1_36","purpur-spinner__circle--negative-disabled":"_purpur-spinner__circle--negative-disabled_7s2g1_39"},x="purpur-spinner",ze={PRIMARY:"primary",DISABLED:"disabled",NEGATIVE:"negative",NEGATIVE_DISABLED:"negative-disabled"},Le={XXS:"xxs",XS:"xs",SM:"sm",MD:"md",LG:"lg"},ke=({["data-testid"]:r,size:i=Le.SM,variant:n=ze.PRIMARY,...a})=>o.jsx("div",{className:D([g[x],g[`${x}--${i}`]]),"data-testid":r,...a,children:o.jsx("svg",{viewBox:"0 0 50 50",children:o.jsx("circle",{className:D(g[`${x}__circle`],g[`${x}__circle--${n}`]),cx:"25",cy:"25",r:"20"})})});function Ge(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var L={exports:{}};/*!
Copyright (c) 2018 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/(function(r){(function(){var i={}.hasOwnProperty;function n(){for(var e="",t=0;t<arguments.length;t++){var u=arguments[t];u&&(e=l(e,a(u)))}return e}function a(e){if(typeof e=="string"||typeof e=="number")return e;if(typeof e!="object")return"";if(Array.isArray(e))return n.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var u in e)i.call(e,u)&&e[u]&&(t=l(t,u));return t}function l(e,t){return t?e?e+" "+t:e+t:e}r.exports?(n.default=n,r.exports=n):window.classNames=n})()})(L);var Ge=L.exports;const $=ke(Ge),p={"purpur-text-field":"_purpur-text-field_182p7_1","purpur-text-field__label":"_purpur-text-field__label_182p7_7","purpur-text-field__label-text":"_purpur-text-field__label-text_182p7_13","purpur-text-field__field-row":"_purpur-text-field__field-row_182p7_16","purpur-text-field__frame":"_purpur-text-field__frame_182p7_20","purpur-text-field__input-container":"_purpur-text-field__input-container_182p7_27","purpur-text-field__input-container--disabled":"_purpur-text-field__input-container--disabled_182p7_35","purpur-text-field__input-container--readonly":"_purpur-text-field__input-container--readonly_182p7_38","purpur-text-field__input-container--end-adornment":"_purpur-text-field__input-container--end-adornment_182p7_41","purpur-text-field__input":"_purpur-text-field__input_182p7_27","purpur-text-field__input-container--start-adornment":"_purpur-text-field__input-container--start-adornment_182p7_47","purpur-text-field__input--valid":"_purpur-text-field__input--valid_182p7_88","purpur-text-field__input--error":"_purpur-text-field__input--error_182p7_88","purpur-text-field__adornment-container":"_purpur-text-field__adornment-container_182p7_97","purpur-text-field__valid-icon":"_purpur-text-field__valid-icon_182p7_102"};function He(r){return typeof r>"u"?Math.random().toString(36).substring(2,10):r}const d="purpur-text-field",Xe=({["data-testid"]:r,className:i,afterField:n,endAdornment:a,errorText:l,helperText:e,label:t,loading:u=!1,startAdornment:v,valid:G=!1,...c},H)=>{const S=He(c.id),_=f=>r?`${r}-${f}`:void 0,O=G&&!l,y=e?`${S}-helper-text`:void 0,h=[v].filter(f=>!!f),b=[u&&o.jsx(Le,{variant:c.disabled?"disabled":"primary",size:"xs","data-testid":_("spinner")}),O&&o.jsx(we,{"data-testid":_("valid-icon"),className:p[`${d}__valid-icon`],svg:ge,size:"md"}),a].filter(f=>!!f),X=$([p[`${d}__input-container`],{[p[`${d}__input-container--start-adornment`]]:h.length,[p[`${d}__input-container--end-adornment`]]:b.length,[p[`${d}__input-container--disabled`]]:c.disabled,[p[`${d}__input-container--readonly`]]:c.readOnly&&!c.disabled}]);return o.jsxs("div",{className:$(i,p[d]),children:[t&&o.jsx(De,{htmlFor:S,className:p[`${d}__label`],"data-testid":_("label"),disabled:c.disabled,children:`${c.required?"* ":""}${t}`}),o.jsxs("div",{className:p[`${d}__field-row`],children:[o.jsxs("div",{className:X,children:[!!h.length&&o.jsx("div",{"data-testid":_("start-adornments"),className:p[`${d}__adornment-container`],children:h}),o.jsx("input",{...c,ref:H,"data-testid":_("input"),"aria-describedby":c["aria-describedby"]||y,"aria-invalid":c["aria-invalid"]||!!l,className:$([p[`${d}__input`],{[p[`${d}__input--valid`]]:O,[p[`${d}__input--error`]]:!!l}])}),o.jsx("div",{className:p[`${d}__frame`]}),!!b.length&&o.jsx("div",{"data-testid":_("end-adornments"),className:p[`${d}__adornment-container`],children:b})]}),!!n&&n]}),y&&o.jsx(ce,{"data-testid":_("helper-text"),id:y,children:e}),l&&o.jsx(se,{"data-testid":_("error-text"),children:l})]})},k=s.forwardRef(Xe);k.displayName="TextField";exports.TextField=k;
*/(function(r){(function(){var i={}.hasOwnProperty;function n(){for(var e="",t=0;t<arguments.length;t++){var u=arguments[t];u&&(e=l(e,a(u)))}return e}function a(e){if(typeof e=="string"||typeof e=="number")return e;if(typeof e!="object")return"";if(Array.isArray(e))return n.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var u in e)i.call(e,u)&&e[u]&&(t=l(t,u));return t}function l(e,t){return t?e?e+" "+t:e+t:e}r.exports?(n.default=n,r.exports=n):window.classNames=n})()})(L);var He=L.exports;const w=Ge(He),p={"purpur-text-field":"_purpur-text-field_p7p5v_1","purpur-text-field__label":"_purpur-text-field__label_p7p5v_7","purpur-text-field__label-text":"_purpur-text-field__label-text_p7p5v_13","purpur-text-field__field-row":"_purpur-text-field__field-row_p7p5v_16","purpur-text-field__frame":"_purpur-text-field__frame_p7p5v_20","purpur-text-field__input-container":"_purpur-text-field__input-container_p7p5v_27","purpur-text-field__input-container--disabled":"_purpur-text-field__input-container--disabled_p7p5v_38","purpur-text-field__input-container--readonly":"_purpur-text-field__input-container--readonly_p7p5v_41","purpur-text-field__input-container--end-adornment":"_purpur-text-field__input-container--end-adornment_p7p5v_44","purpur-text-field__input":"_purpur-text-field__input_p7p5v_27","purpur-text-field__input-container--start-adornment":"_purpur-text-field__input-container--start-adornment_p7p5v_50","purpur-text-field__input--valid":"_purpur-text-field__input--valid_p7p5v_91","purpur-text-field__input--error":"_purpur-text-field__input--error_p7p5v_91","purpur-text-field__adornment-container":"_purpur-text-field__adornment-container_p7p5v_103","purpur-text-field__valid-icon":"_purpur-text-field__valid-icon_p7p5v_108"},d="purpur-text-field",Xe=({["data-testid"]:r,className:i,afterField:n,endAdornment:a,errorText:l,helperText:e,label:t,loading:u=!1,startAdornment:m,valid:G=!1,...c},H)=>{const X=s.useId(),y=c.id??X,_=f=>r?`${r}-${f}`:void 0,O=G&&!l,h=e?`${y}-helper-text`:void 0,b=[m].filter(f=>!!f),$=[u&&o.jsx(ke,{variant:c.disabled?"disabled":"primary",size:"xs","data-testid":_("spinner")},"spinner"),O&&o.jsx(je,{"data-testid":_("valid-icon"),className:p[`${d}__valid-icon`],svg:xe,size:"md"},"valid-icon"),a].filter(f=>!!f),Y=w([p[`${d}__input-container`],{[p[`${d}__input-container--start-adornment`]]:b.length,[p[`${d}__input-container--end-adornment`]]:$.length,[p[`${d}__input-container--disabled`]]:c.disabled,[p[`${d}__input-container--readonly`]]:c.readOnly&&!c.disabled}]);return o.jsxs("div",{className:w(i,p[d]),children:[t&&o.jsx(Fe,{htmlFor:y,className:p[`${d}__label`],"data-testid":_("label"),disabled:c.disabled,children:`${c.required?"* ":""}${t}`}),o.jsxs("div",{className:p[`${d}__field-row`],children:[o.jsxs("div",{className:Y,children:[!!b.length&&o.jsx("div",{"data-testid":_("start-adornments"),className:p[`${d}__adornment-container`],children:b}),o.jsx("input",{...c,id:y,ref:H,"data-testid":_("input"),"aria-describedby":c["aria-describedby"]||h,"aria-invalid":c["aria-invalid"]||!!l,className:w([p[`${d}__input`],{[p[`${d}__input--valid`]]:O,[p[`${d}__input--error`]]:!!l}])}),o.jsx("div",{className:p[`${d}__frame`]}),!!$.length&&o.jsx("div",{"data-testid":_("end-adornments"),className:p[`${d}__adornment-container`],children:$})]}),!!n&&n]}),h&&o.jsx(_e,{"data-testid":_("helper-text"),id:h,children:e}),l&&o.jsx(oe,{"data-testid":_("error-text"),children:l})]})},k=s.forwardRef(Xe);k.displayName="TextField";exports.TextField=k;
//# sourceMappingURL=text-field.cjs.js.map

@@ -1,8 +0,8 @@

import { jsxs as b, jsx as o } from "react/jsx-runtime";
import { forwardRef as g, Children as f, isValidElement as $, createElement as m, cloneElement as Z, useEffect as U, Fragment as W } from "react";
import { jsxs as b, jsx as p } from "react/jsx-runtime";
import { forwardRef as g, Children as f, isValidElement as $, createElement as v, cloneElement as z, useEffect as W, Fragment as rr, useId as er } from "react";
import "react-dom";
function rr(e) {
function tr(e) {
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
}
var z = { exports: {} };
var R = { exports: {} };
/*!

@@ -42,5 +42,5 @@ Copyright (c) 2018 Jed Watson.

})();
})(z);
var er = z.exports;
const tr = /* @__PURE__ */ rr(er), nr = {
})(R);
var nr = R.exports;
const ir = /* @__PURE__ */ tr(nr), ur = {
"purpur-icon": "_purpur-icon_8u1lq_1",

@@ -53,3 +53,3 @@ "purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",

"purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
}, ir = {
}, ar = {
name: "error-filled",

@@ -59,3 +59,3 @@ svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 24" fill="currentColor"><path fill-rule="evenodd" d="M14.268 3.5c-.77-1.333-2.694-1.333-3.464 0l-8.66 15c-.77 1.333.192 3 1.732 3h17.32c1.54 0 2.502-1.667 1.733-3l-8.66-15Zm-.694 5.067-.247 6.876h-1.566l-.247-6.876a1.03 1.03 0 1 1 2.06 0Zm.212 8.917c0 .649-.585 1.234-1.25 1.234-.648 0-1.25-.585-1.25-1.234 0-.633.602-1.234 1.25-1.234.665 0 1.25.601 1.25 1.234Z" clip-rule="evenodd"/></svg>',

category: "status"
}, ur = tr.bind(nr), E = "purpur-icon", ar = "md", lr = (e) => e.filter((i) => Object.keys(i).length >= 1).map((i) => `${i.name}="${i.value}"`).join(" "), or = ({ content: e = "", title: i } = {}) => {
}, lr = ir.bind(ur), E = "purpur-icon", pr = "md", or = (e) => e.filter((i) => Object.keys(i).length >= 1).map((i) => `${i.name}="${i.value}"`).join(" "), sr = ({ content: e = "", title: i } = {}) => {
const n = [

@@ -67,4 +67,4 @@ { name: "xmlns", value: "http://www.w3.org/2000/svg" },

], u = i ? `<title>${i}</title>` : "";
return `<svg ${lr(n)}>${u}${e}</svg>`;
}, sr = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), pr = ({
return `<svg ${or(n)}>${u}${e}</svg>`;
}, dr = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), cr = ({
["data-testid"]: e,

@@ -74,10 +74,10 @@ svg: i,

className: u = "",
size: l = ar,
size: l = pr,
...r
}) => {
const t = or({
content: sr(i.svg),
const t = sr({
content: dr(i.svg),
title: n
}), a = ur(u, E, `${E}--${l}`);
return /* @__PURE__ */ o(
}), a = lr(u, E, `${E}--${l}`);
return /* @__PURE__ */ p(
"span",

@@ -93,3 +93,3 @@ {

};
function dr(e) {
function _r(e) {
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;

@@ -133,7 +133,7 @@ }

})(L);
var cr = L.exports;
const _r = /* @__PURE__ */ dr(cr), P = {
var fr = L.exports;
const vr = /* @__PURE__ */ _r(fr), P = {
"purpur-field-error-text": "_purpur-field-error-text_1h4gy_1",
"purpur-field-error-text__icon": "_purpur-field-error-text__icon_1h4gy_12"
}, I = "purpur-field-error-text", fr = ({
}, C = "purpur-field-error-text", mr = ({
["data-testid"]: e,

@@ -147,3 +147,3 @@ children: i,

{
className: _r([n, P[I]]),
className: vr([n, P[C]]),
"data-testid": e,

@@ -154,3 +154,3 @@ "aria-live": "assertive",

children: [
/* @__PURE__ */ o(pr, { svg: ir, size: "xs", className: P[`${I}__icon`] }),
/* @__PURE__ */ p(cr, { svg: ar, size: "xs", className: P[`${C}__icon`] }),
i

@@ -160,3 +160,3 @@ ]

);
function mr(e) {
function gr(e) {
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;

@@ -200,7 +200,7 @@ }

})(T);
var vr = T.exports;
const gr = /* @__PURE__ */ mr(vr), C = {
var xr = T.exports;
const yr = /* @__PURE__ */ gr(xr), I = {
"purpur-field-helper-text": "_purpur-field-helper-text_139ly_1",
"purpur-field-helper-text--disabled": "_purpur-field-helper-text--disabled_139ly_9"
}, D = "purpur-field-helper-text", xr = ({
}, D = "purpur-field-helper-text", hr = ({
["data-testid"]: e,

@@ -213,12 +213,12 @@ children: i,

}) => {
const t = gr([
const t = yr([
n,
C[D],
I[D],
{
[C[`${D}--disabled`]]: u
[I[`${D}--disabled`]]: u
}
]);
return /* @__PURE__ */ o("span", { id: l, className: t, "data-testid": e, ...r, children: i });
return /* @__PURE__ */ p("span", { id: l, className: t, "data-testid": e, ...r, children: i });
};
function yr(e) {
function br(e) {
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;

@@ -262,4 +262,4 @@ }

})(k);
var hr = k.exports;
const br = /* @__PURE__ */ yr(hr), $r = {
var $r = k.exports;
const wr = /* @__PURE__ */ br($r), Sr = {
"purpur-icon": "_purpur-icon_8u1lq_1",

@@ -272,3 +272,3 @@ "purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",

"purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
}, wr = {
}, Or = {
name: "check-circle-filled",

@@ -278,3 +278,3 @@ svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Zm4.712-12.491a.875.875 0 1 0-1.424-1.018l-4.4 6.16-2.27-2.27a.875.875 0 0 0-1.237 1.238l3 3a.875.875 0 0 0 1.331-.11l5-7Z" clip-rule="evenodd"/></svg>',

category: "status"
}, Sr = br.bind($r), F = "purpur-icon", Or = "md", Nr = (e) => e.filter((i) => Object.keys(i).length >= 1).map((i) => `${i.name}="${i.value}"`).join(" "), jr = ({ content: e = "", title: i } = {}) => {
}, Nr = wr.bind(Sr), F = "purpur-icon", jr = "md", Ar = (e) => e.filter((i) => Object.keys(i).length >= 1).map((i) => `${i.name}="${i.value}"`).join(" "), Mr = ({ content: e = "", title: i } = {}) => {
const n = [

@@ -286,4 +286,4 @@ { name: "xmlns", value: "http://www.w3.org/2000/svg" },

], u = i ? `<title>${i}</title>` : "";
return `<svg ${Nr(n)}>${u}${e}</svg>`;
}, Ar = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), Mr = ({
return `<svg ${Ar(n)}>${u}${e}</svg>`;
}, qr = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), Er = ({
["data-testid"]: e,

@@ -293,10 +293,10 @@ svg: i,

className: u = "",
size: l = Or,
size: l = jr,
...r
}) => {
const t = jr({
content: Ar(i.svg),
const t = Mr({
content: qr(i.svg),
title: n
}), a = Sr(u, F, `${F}--${l}`);
return /* @__PURE__ */ o(
}), a = Nr(u, F, `${F}--${l}`);
return /* @__PURE__ */ p(
"span",

@@ -312,4 +312,4 @@ {

};
function j() {
return j = Object.assign ? Object.assign.bind() : function(e) {
function A() {
return A = Object.assign ? Object.assign.bind() : function(e) {
for (var i = 1; i < arguments.length; i++) {

@@ -321,6 +321,6 @@ var n = arguments[i];

return e;
}, j.apply(this, arguments);
}, A.apply(this, arguments);
}
function v() {
return v = Object.assign ? Object.assign.bind() : function(e) {
function m() {
return m = Object.assign ? Object.assign.bind() : function(e) {
for (var i = 1; i < arguments.length; i++) {

@@ -332,21 +332,21 @@ var n = arguments[i];

return e;
}, v.apply(this, arguments);
}, m.apply(this, arguments);
}
function qr(e, i) {
function Pr(e, i) {
typeof e == "function" ? e(i) : e != null && (e.current = i);
}
function Er(...e) {
function Cr(...e) {
return (i) => e.forEach(
(n) => qr(n, i)
(n) => Pr(n, i)
);
}
const G = /* @__PURE__ */ g((e, i) => {
const { children: n, ...u } = e, l = f.toArray(n), r = l.find(Ir);
const { children: n, ...u } = e, l = f.toArray(n), r = l.find(Dr);
if (r) {
const t = r.props.children, a = l.map((x) => x === r ? f.count(t) > 1 ? f.only(null) : /* @__PURE__ */ $(t) ? t.props.children : null : x);
return /* @__PURE__ */ m(A, v({}, u, {
return /* @__PURE__ */ v(M, m({}, u, {
ref: i
}), /* @__PURE__ */ $(t) ? /* @__PURE__ */ Z(t, void 0, a) : null);
}), /* @__PURE__ */ $(t) ? /* @__PURE__ */ z(t, void 0, a) : null);
}
return /* @__PURE__ */ m(A, v({}, u, {
return /* @__PURE__ */ v(M, m({}, u, {
ref: i

@@ -356,15 +356,15 @@ }), n);

G.displayName = "Slot";
const A = /* @__PURE__ */ g((e, i) => {
const M = /* @__PURE__ */ g((e, i) => {
const { children: n, ...u } = e;
return /* @__PURE__ */ $(n) ? /* @__PURE__ */ Z(n, {
...Cr(u, n.props),
ref: i ? Er(i, n.ref) : n.ref
return /* @__PURE__ */ $(n) ? /* @__PURE__ */ z(n, {
...Fr(u, n.props),
ref: i ? Cr(i, n.ref) : n.ref
}) : f.count(n) > 1 ? f.only(null) : null;
});
A.displayName = "SlotClone";
const Pr = ({ children: e }) => /* @__PURE__ */ m(W, null, e);
function Ir(e) {
return /* @__PURE__ */ $(e) && e.type === Pr;
M.displayName = "SlotClone";
const Ir = ({ children: e }) => /* @__PURE__ */ v(rr, null, e);
function Dr(e) {
return /* @__PURE__ */ $(e) && e.type === Ir;
}
function Cr(e, i) {
function Fr(e, i) {
const n = {

@@ -390,3 +390,3 @@ ...i

}
const Dr = [
const Br = [
"a",

@@ -408,8 +408,8 @@ "button",

"ul"
], Fr = Dr.reduce((e, i) => {
], Vr = Br.reduce((e, i) => {
const n = /* @__PURE__ */ g((u, l) => {
const { asChild: r, ...t } = u, a = r ? G : i;
return U(() => {
return W(() => {
window[Symbol.for("radix-ui")] = !0;
}, []), /* @__PURE__ */ m(a, v({}, t, {
}, []), /* @__PURE__ */ v(a, m({}, t, {
ref: l

@@ -422,3 +422,3 @@ }));

};
}, {}), Br = /* @__PURE__ */ g((e, i) => /* @__PURE__ */ m(Fr.label, j({}, e, {
}, {}), Zr = /* @__PURE__ */ g((e, i) => /* @__PURE__ */ v(Vr.label, A({}, e, {
ref: i,

@@ -429,4 +429,4 @@ onMouseDown: (n) => {

}
}))), Rr = Br;
function Vr(e) {
}))), zr = Zr;
function Rr(e) {
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;

@@ -470,7 +470,7 @@ }

})(H);
var Zr = H.exports;
const zr = /* @__PURE__ */ Vr(Zr), B = {
var Lr = H.exports;
const Tr = /* @__PURE__ */ Rr(Lr), B = {
"purpur-label": "_purpur-label_1jub8_1",
"purpur-label--disabled": "_purpur-label--disabled_1jub8_9"
}, R = "purpur-label", Lr = ({
}, V = "purpur-label", kr = ({
children: e,

@@ -483,10 +483,10 @@ className: i,

}) => {
const t = zr([
const t = Tr([
i,
B[R],
{ [B[`${R}--disabled`]]: l }
B[V],
{ [B[`${V}--disabled`]]: l }
]);
return /* @__PURE__ */ o(Rr, { className: t, "data-testid": u, htmlFor: n, ...r, children: e });
return /* @__PURE__ */ p(zr, { className: t, "data-testid": u, htmlFor: n, ...r, children: e });
};
function Tr(e) {
function Gr(e) {
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;

@@ -530,6 +530,6 @@ }

})(X);
var kr = X.exports;
const V = /* @__PURE__ */ Tr(kr), Gr = "_rotate_7s2g1_1", Hr = "_dash_7s2g1_1", y = {
var Hr = X.exports;
const Z = /* @__PURE__ */ Gr(Hr), Xr = "_rotate_7s2g1_1", Yr = "_dash_7s2g1_1", y = {
"purpur-spinner": "_purpur-spinner_7s2g1_1",
rotate: Gr,
rotate: Xr,
"purpur-spinner--xxs": "_purpur-spinner--xxs_7s2g1_4",

@@ -541,7 +541,7 @@ "purpur-spinner--xs": "_purpur-spinner--xs_7s2g1_8",

"purpur-spinner__circle": "_purpur-spinner__circle_7s2g1_24",
dash: Hr,
dash: Yr,
"purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_7s2g1_33",
"purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_7s2g1_36",
"purpur-spinner__circle--negative-disabled": "_purpur-spinner__circle--negative-disabled_7s2g1_39"
}, h = "purpur-spinner", Xr = {
}, h = "purpur-spinner", Jr = {
PRIMARY: "primary",

@@ -551,3 +551,3 @@ DISABLED: "disabled",

NEGATIVE_DISABLED: "negative-disabled"
}, Yr = {
}, Kr = {
XXS: "xxs",

@@ -558,17 +558,17 @@ XS: "xs",

LG: "lg"
}, Jr = ({
}, Qr = ({
["data-testid"]: e,
size: i = Yr.SM,
variant: n = Xr.PRIMARY,
size: i = Kr.SM,
variant: n = Jr.PRIMARY,
...u
}) => /* @__PURE__ */ o(
}) => /* @__PURE__ */ p(
"div",
{
className: V([y[h], y[`${h}--${i}`]]),
className: Z([y[h], y[`${h}--${i}`]]),
"data-testid": e,
...u,
children: /* @__PURE__ */ o("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ o(
children: /* @__PURE__ */ p("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ p(
"circle",
{
className: V(
className: Z(
y[`${h}__circle`],

@@ -584,3 +584,3 @@ y[`${h}__circle--${n}`]

);
function Kr(e) {
function Ur(e) {
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;

@@ -624,24 +624,20 @@ }

})(Y);
var Qr = Y.exports;
const N = /* @__PURE__ */ Kr(Qr), s = {
"purpur-text-field": "_purpur-text-field_182p7_1",
"purpur-text-field__label": "_purpur-text-field__label_182p7_7",
"purpur-text-field__label-text": "_purpur-text-field__label-text_182p7_13",
"purpur-text-field__field-row": "_purpur-text-field__field-row_182p7_16",
"purpur-text-field__frame": "_purpur-text-field__frame_182p7_20",
"purpur-text-field__input-container": "_purpur-text-field__input-container_182p7_27",
"purpur-text-field__input-container--disabled": "_purpur-text-field__input-container--disabled_182p7_35",
"purpur-text-field__input-container--readonly": "_purpur-text-field__input-container--readonly_182p7_38",
"purpur-text-field__input-container--end-adornment": "_purpur-text-field__input-container--end-adornment_182p7_41",
"purpur-text-field__input": "_purpur-text-field__input_182p7_27",
"purpur-text-field__input-container--start-adornment": "_purpur-text-field__input-container--start-adornment_182p7_47",
"purpur-text-field__input--valid": "_purpur-text-field__input--valid_182p7_88",
"purpur-text-field__input--error": "_purpur-text-field__input--error_182p7_88",
"purpur-text-field__adornment-container": "_purpur-text-field__adornment-container_182p7_97",
"purpur-text-field__valid-icon": "_purpur-text-field__valid-icon_182p7_102"
};
function Ur(e) {
return typeof e > "u" ? Math.random().toString(36).substring(2, 10) : e;
}
const p = "purpur-text-field", Wr = ({
var Wr = Y.exports;
const j = /* @__PURE__ */ Ur(Wr), o = {
"purpur-text-field": "_purpur-text-field_p7p5v_1",
"purpur-text-field__label": "_purpur-text-field__label_p7p5v_7",
"purpur-text-field__label-text": "_purpur-text-field__label-text_p7p5v_13",
"purpur-text-field__field-row": "_purpur-text-field__field-row_p7p5v_16",
"purpur-text-field__frame": "_purpur-text-field__frame_p7p5v_20",
"purpur-text-field__input-container": "_purpur-text-field__input-container_p7p5v_27",
"purpur-text-field__input-container--disabled": "_purpur-text-field__input-container--disabled_p7p5v_38",
"purpur-text-field__input-container--readonly": "_purpur-text-field__input-container--readonly_p7p5v_41",
"purpur-text-field__input-container--end-adornment": "_purpur-text-field__input-container--end-adornment_p7p5v_44",
"purpur-text-field__input": "_purpur-text-field__input_p7p5v_27",
"purpur-text-field__input-container--start-adornment": "_purpur-text-field__input-container--start-adornment_p7p5v_50",
"purpur-text-field__input--valid": "_purpur-text-field__input--valid_p7p5v_91",
"purpur-text-field__input--error": "_purpur-text-field__input--error_p7p5v_91",
"purpur-text-field__adornment-container": "_purpur-text-field__adornment-container_p7p5v_103",
"purpur-text-field__valid-icon": "_purpur-text-field__valid-icon_p7p5v_108"
}, s = "purpur-text-field", re = ({
["data-testid"]: e,

@@ -659,5 +655,5 @@ className: i,

}, K) => {
const M = Ur(d.id), c = (_) => e ? `${e}-${_}` : void 0, q = J && !l, w = r ? `${M}-helper-text` : void 0, S = [x].filter((_) => !!_), O = [
a && /* @__PURE__ */ o(
Jr,
const Q = er(), w = d.id ?? Q, c = (_) => e ? `${e}-${_}` : void 0, q = J && !l, S = r ? `${w}-helper-text` : void 0, O = [x].filter((_) => !!_), N = [
a && /* @__PURE__ */ p(
Qr,
{

@@ -667,29 +663,31 @@ variant: d.disabled ? "disabled" : "primary",

"data-testid": c("spinner")
}
},
"spinner"
),
q && /* @__PURE__ */ o(
Mr,
q && /* @__PURE__ */ p(
Er,
{
"data-testid": c("valid-icon"),
className: s[`${p}__valid-icon`],
svg: wr,
className: o[`${s}__valid-icon`],
svg: Or,
size: "md"
}
},
"valid-icon"
),
u
].filter((_) => !!_), Q = N([
s[`${p}__input-container`],
].filter((_) => !!_), U = j([
o[`${s}__input-container`],
{
[s[`${p}__input-container--start-adornment`]]: S.length,
[s[`${p}__input-container--end-adornment`]]: O.length,
[s[`${p}__input-container--disabled`]]: d.disabled,
[s[`${p}__input-container--readonly`]]: d.readOnly && !d.disabled
[o[`${s}__input-container--start-adornment`]]: O.length,
[o[`${s}__input-container--end-adornment`]]: N.length,
[o[`${s}__input-container--disabled`]]: d.disabled,
[o[`${s}__input-container--readonly`]]: d.readOnly && !d.disabled
}
]);
return /* @__PURE__ */ b("div", { className: N(i, s[p]), children: [
t && /* @__PURE__ */ o(
Lr,
return /* @__PURE__ */ b("div", { className: j(i, o[s]), children: [
t && /* @__PURE__ */ p(
kr,
{
htmlFor: M,
className: s[`${p}__label`],
htmlFor: w,
className: o[`${s}__label`],
"data-testid": c("label"),

@@ -700,25 +698,26 @@ disabled: d.disabled,

),
/* @__PURE__ */ b("div", { className: s[`${p}__field-row`], children: [
/* @__PURE__ */ b("div", { className: Q, children: [
!!S.length && /* @__PURE__ */ o(
/* @__PURE__ */ b("div", { className: o[`${s}__field-row`], children: [
/* @__PURE__ */ b("div", { className: U, children: [
!!O.length && /* @__PURE__ */ p(
"div",
{
"data-testid": c("start-adornments"),
className: s[`${p}__adornment-container`],
children: S
className: o[`${s}__adornment-container`],
children: O
}
),
/* @__PURE__ */ o(
/* @__PURE__ */ p(
"input",
{
...d,
id: w,
ref: K,
"data-testid": c("input"),
"aria-describedby": d["aria-describedby"] || w,
"aria-describedby": d["aria-describedby"] || S,
"aria-invalid": d["aria-invalid"] || !!l,
className: N([
s[`${p}__input`],
className: j([
o[`${s}__input`],
{
[s[`${p}__input--valid`]]: q,
[s[`${p}__input--error`]]: !!l
[o[`${s}__input--valid`]]: q,
[o[`${s}__input--error`]]: !!l
}

@@ -728,9 +727,9 @@ ])

),
/* @__PURE__ */ o("div", { className: s[`${p}__frame`] }),
!!O.length && /* @__PURE__ */ o(
/* @__PURE__ */ p("div", { className: o[`${s}__frame`] }),
!!N.length && /* @__PURE__ */ p(
"div",
{
"data-testid": c("end-adornments"),
className: s[`${p}__adornment-container`],
children: O
className: o[`${s}__adornment-container`],
children: N
}

@@ -741,10 +740,10 @@ )

] }),
w && /* @__PURE__ */ o(xr, { "data-testid": c("helper-text"), id: w, children: r }),
l && /* @__PURE__ */ o(fr, { "data-testid": c("error-text"), children: l })
S && /* @__PURE__ */ p(hr, { "data-testid": c("helper-text"), id: S, children: r }),
l && /* @__PURE__ */ p(mr, { "data-testid": c("error-text"), children: l })
] });
}, re = g(Wr);
re.displayName = "TextField";
}, ee = g(re);
ee.displayName = "TextField";
export {
re as TextField
ee as TextField
};
//# sourceMappingURL=text-field.es.js.map
{
"name": "@purpurds/text-field",
"version": "4.0.1",
"version": "4.0.2",
"license": "AGPL-3.0-only",

@@ -18,8 +18,8 @@ "main": "./dist/text-field.cjs.js",

"classnames": "~2.5.0",
"@purpurds/field-error-text": "4.0.1",
"@purpurds/icon": "4.0.1",
"@purpurds/label": "4.0.1",
"@purpurds/spinner": "4.0.1",
"@purpurds/tokens": "4.0.1",
"@purpurds/field-helper-text": "4.0.1"
"@purpurds/field-error-text": "4.0.2",
"@purpurds/field-helper-text": "4.0.2",
"@purpurds/icon": "4.0.2",
"@purpurds/spinner": "4.0.2",
"@purpurds/label": "4.0.2",
"@purpurds/tokens": "4.0.2"
},

@@ -26,0 +26,0 @@ "devDependencies": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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