@purpurds/text-field
Advanced tools
Comparing version 5.10.1 to 5.11.0
Name: @purpurds/button | ||
Version: 5.10.0 | ||
Version: 5.10.1 | ||
License: AGPL-3.0-only | ||
@@ -9,3 +9,3 @@ Private: false | ||
Name: @purpurds/field-error-text | ||
Version: 5.10.0 | ||
Version: 5.10.1 | ||
License: AGPL-3.0-only | ||
@@ -17,3 +17,3 @@ Private: false | ||
Name: @purpurds/field-helper-text | ||
Version: 5.10.0 | ||
Version: 5.10.1 | ||
License: AGPL-3.0-only | ||
@@ -25,3 +25,3 @@ Private: false | ||
Name: @purpurds/icon | ||
Version: 5.10.0 | ||
Version: 5.10.1 | ||
License: AGPL-3.0-only | ||
@@ -33,3 +33,3 @@ Private: false | ||
Name: @purpurds/label | ||
Version: 5.10.0 | ||
Version: 5.10.1 | ||
License: AGPL-3.0-only | ||
@@ -41,3 +41,3 @@ Private: false | ||
Name: @purpurds/spinner | ||
Version: 5.10.0 | ||
Version: 5.10.1 | ||
License: AGPL-3.0-only | ||
@@ -44,0 +44,0 @@ Private: false |
@@ -1,38 +0,38 @@ | ||
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),s=require("react");require("react-dom");const B={SM:"sm",MD:"md",LG:"lg"};function dr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var W={exports:{}};/*! | ||
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),s=require("react");require("react-dom");const L={SM:"sm",MD:"md",LG:"lg"};function dr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var K={exports:{}};/*! | ||
Copyright (c) 2018 Jed Watson. | ||
Licensed under the MIT License (MIT), see | ||
http://jedwatson.github.io/classnames | ||
*/(function(e){(function(){var i={}.hasOwnProperty;function n(){for(var r="",t=0;t<arguments.length;t++){var u=arguments[t];u&&(r=l(r,a(u)))}return r}function a(r){if(typeof r=="string"||typeof r=="number")return r;if(typeof r!="object")return"";if(Array.isArray(r))return n.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var t="";for(var u in r)i.call(r,u)&&r[u]&&(t=l(t,u));return t}function l(r,t){return t?r?r+" "+t:r+t:r}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(W);var _r=W.exports;const F=dr(_r),fr="_rotate_1xozj_1",vr="_dash_1xozj_1",j={"purpur-spinner":"_purpur-spinner_1xozj_1",rotate:fr,"purpur-spinner--xxs":"_purpur-spinner--xxs_1xozj_4","purpur-spinner--xs":"_purpur-spinner--xs_1xozj_8","purpur-spinner--sm":"_purpur-spinner--sm_1xozj_12","purpur-spinner--md":"_purpur-spinner--md_1xozj_16","purpur-spinner--lg":"_purpur-spinner--lg_1xozj_20","purpur-spinner__circle":"_purpur-spinner__circle_1xozj_24",dash:vr,"purpur-spinner__circle--disabled":"_purpur-spinner__circle--disabled_1xozj_33","purpur-spinner__circle--negative":"_purpur-spinner__circle--negative_1xozj_36"},$="purpur-spinner",xr={XXS:"xxs",XS:"xs",SM:"sm",MD:"md",LG:"lg"},mr=({["data-testid"]:e,disabled:i=!1,negative:n=!1,size:a=xr.SM,...l})=>o.jsx("div",{className:F([j[$],j[`${$}--${a}`]]),"data-testid":e,...l,children:o.jsx("svg",{viewBox:"0 0 50 50",children:o.jsx("circle",{className:F(j[`${$}__circle`],{[j[`${$}__circle--disabled`]]:i,[j[`${$}__circle--negative`]]:n}),cx:"25",cy:"25",r:"20"})})});function gr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Y={exports:{}};/*! | ||
*/(function(e){(function(){var u={}.hasOwnProperty;function n(){for(var r="",t=0;t<arguments.length;t++){var i=arguments[t];i&&(r=l(r,a(i)))}return r}function a(r){if(typeof r=="string"||typeof r=="number")return r;if(typeof r!="object")return"";if(Array.isArray(r))return n.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var t="";for(var i in r)u.call(r,i)&&r[i]&&(t=l(t,i));return t}function l(r,t){return t?r?r+" "+t:r+t:r}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(K);var _r=K.exports;const V=dr(_r),fr="_rotate_1xozj_1",vr="_dash_1xozj_1",j={"purpur-spinner":"_purpur-spinner_1xozj_1",rotate:fr,"purpur-spinner--xxs":"_purpur-spinner--xxs_1xozj_4","purpur-spinner--xs":"_purpur-spinner--xs_1xozj_8","purpur-spinner--sm":"_purpur-spinner--sm_1xozj_12","purpur-spinner--md":"_purpur-spinner--md_1xozj_16","purpur-spinner--lg":"_purpur-spinner--lg_1xozj_20","purpur-spinner__circle":"_purpur-spinner__circle_1xozj_24",dash:vr,"purpur-spinner__circle--disabled":"_purpur-spinner__circle--disabled_1xozj_33","purpur-spinner__circle--negative":"_purpur-spinner__circle--negative_1xozj_36"},$="purpur-spinner",xr={XXS:"xxs",XS:"xs",SM:"sm",MD:"md",LG:"lg"},mr=({["data-testid"]:e,disabled:u=!1,negative:n=!1,size:a=xr.SM,...l})=>o.jsx("div",{className:V([j[$],j[`${$}--${a}`]]),"data-testid":e,...l,children:o.jsx("svg",{viewBox:"0 0 50 50",children:o.jsx("circle",{className:V(j[`${$}__circle`],{[j[`${$}__circle--disabled`]]:u,[j[`${$}__circle--negative`]]:n}),cx:"25",cy:"25",r:"20"})})});function gr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Y={exports:{}};/*! | ||
Copyright (c) 2018 Jed Watson. | ||
Licensed under the MIT License (MIT), see | ||
http://jedwatson.github.io/classnames | ||
*/(function(e){(function(){var i={}.hasOwnProperty;function n(){for(var r="",t=0;t<arguments.length;t++){var u=arguments[t];u&&(r=l(r,a.call(this,u)))}return r}function a(r){if(typeof r=="string"||typeof r=="number")return this&&this[r]||r;if(typeof r!="object")return"";if(Array.isArray(r))return n.apply(this,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var t="";for(var u in r)i.call(r,u)&&r[u]&&(t=l(t,this&&this[u]||u));return t}function l(r,t){return t?r?r+" "+t:r+t:r}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Y);var yr=Y.exports;const br=gr(yr),hr={"purpur-button":"_purpur-button_u2yv5_1","purpur-button--sm":"_purpur-button--sm_u2yv5_33","purpur-button--icon-only":"_purpur-button--icon-only_u2yv5_36","purpur-button--md":"_purpur-button--md_u2yv5_39","purpur-button--lg":"_purpur-button--lg_u2yv5_45","purpur-button--full-width":"_purpur-button--full-width_u2yv5_51","purpur-button--primary":"_purpur-button--primary_u2yv5_54","purpur-button--disabled":"_purpur-button--disabled_u2yv5_58","purpur-button--primary-negative":"_purpur-button--primary-negative_u2yv5_64","purpur-button--secondary":"_purpur-button--secondary_u2yv5_76","purpur-button--secondary-negative":"_purpur-button--secondary-negative_u2yv5_87","purpur-button--expressive":"_purpur-button--expressive_u2yv5_98","purpur-button--expressive-negative":"_purpur-button--expressive-negative_u2yv5_108","purpur-button--negative":"_purpur-button--negative_u2yv5_120","purpur-button--destructive":"_purpur-button--destructive_u2yv5_127","purpur-button--destructive-negative":"_purpur-button--destructive-negative_u2yv5_137","purpur-button--tertiary-purple":"_purpur-button--tertiary-purple_u2yv5_147","purpur-button--tertiary-purple-negative":"_purpur-button--tertiary-purple-negative_u2yv5_160","purpur-button--text-negative":"_purpur-button--text-negative_u2yv5_175","purpur-button--text":"_purpur-button--text_u2yv5_175"},jr=br.bind(hr),m="purpur-button",$r=({children:e,className:i,["data-testid"]:n,disabled:a=!1,fullWidth:l=!1,iconOnly:r,loading:t=!1,negative:u=!1,onClick:v,size:x=B.MD,variant:y,type:N="button",...p},g)=>{if(r&&y==="destructive")return null;const z=jr([m,`${m}--${u?`${y}-negative`:y}`,`${m}--${x}`],{[`${m}--icon-only`]:r,[`${m}--negative`]:u,[`${m}--full-width`]:l,[`${m}--disabled`]:a||t},i),b=h=>{a||t?h.preventDefault():v&&v(h)},d=!!p["aria-disabled"]||a||t;return o.jsxs("button",{className:z,"data-testid":n,type:N,ref:g,"aria-disabled":d,onClick:b,...p,children:[t&&o.jsx(mr,{size:x===B.LG?"xs":"xxs",negative:u,disabled:d})," ",e]})},J=s.forwardRef($r);J.displayName="Button";function wr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var K={exports:{}};/*! | ||
*/(function(e){(function(){var u={}.hasOwnProperty;function n(){for(var r="",t=0;t<arguments.length;t++){var i=arguments[t];i&&(r=l(r,a.call(this,i)))}return r}function a(r){if(typeof r=="string"||typeof r=="number")return this&&this[r]||r;if(typeof r!="object")return"";if(Array.isArray(r))return n.apply(this,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var t="";for(var i in r)u.call(r,i)&&r[i]&&(t=l(t,this&&this[i]||i));return t}function l(r,t){return t?r?r+" "+t:r+t:r}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Y);var yr=Y.exports;const br=gr(yr),hr={"purpur-button":"_purpur-button_u2yv5_1","purpur-button--sm":"_purpur-button--sm_u2yv5_33","purpur-button--icon-only":"_purpur-button--icon-only_u2yv5_36","purpur-button--md":"_purpur-button--md_u2yv5_39","purpur-button--lg":"_purpur-button--lg_u2yv5_45","purpur-button--full-width":"_purpur-button--full-width_u2yv5_51","purpur-button--primary":"_purpur-button--primary_u2yv5_54","purpur-button--disabled":"_purpur-button--disabled_u2yv5_58","purpur-button--primary-negative":"_purpur-button--primary-negative_u2yv5_64","purpur-button--secondary":"_purpur-button--secondary_u2yv5_76","purpur-button--secondary-negative":"_purpur-button--secondary-negative_u2yv5_87","purpur-button--expressive":"_purpur-button--expressive_u2yv5_98","purpur-button--expressive-negative":"_purpur-button--expressive-negative_u2yv5_108","purpur-button--negative":"_purpur-button--negative_u2yv5_120","purpur-button--destructive":"_purpur-button--destructive_u2yv5_127","purpur-button--destructive-negative":"_purpur-button--destructive-negative_u2yv5_137","purpur-button--tertiary-purple":"_purpur-button--tertiary-purple_u2yv5_147","purpur-button--tertiary-purple-negative":"_purpur-button--tertiary-purple-negative_u2yv5_160","purpur-button--text-negative":"_purpur-button--text-negative_u2yv5_175","purpur-button--text":"_purpur-button--text_u2yv5_175"},jr=br.bind(hr),m="purpur-button",$r=({children:e,className:u,["data-testid"]:n,disabled:a=!1,fullWidth:l=!1,iconOnly:r,loading:t=!1,negative:i=!1,onClick:v,size:x=L.MD,variant:y,type:N="button",...p},g)=>{if(r&&y==="destructive")return null;const z=jr([m,`${m}--${i?`${y}-negative`:y}`,`${m}--${x}`],{[`${m}--icon-only`]:r,[`${m}--negative`]:i,[`${m}--full-width`]:l,[`${m}--disabled`]:a||t},u),b=h=>{a||t?h.preventDefault():v&&v(h)},d=!!p["aria-disabled"]||a||t;return o.jsxs("button",{className:z,"data-testid":n,type:N,ref:g,"aria-disabled":d,onClick:b,...p,children:[t&&o.jsx(mr,{size:x===L.LG?"xs":"xxs",negative:i,disabled:d})," ",e]})},J=s.forwardRef($r);J.displayName="Button";function wr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Q={exports:{}};/*! | ||
Copyright (c) 2018 Jed Watson. | ||
Licensed under the MIT License (MIT), see | ||
http://jedwatson.github.io/classnames | ||
*/(function(e){(function(){var i={}.hasOwnProperty;function n(){for(var r="",t=0;t<arguments.length;t++){var u=arguments[t];u&&(r=l(r,a.call(this,u)))}return r}function a(r){if(typeof r=="string"||typeof r=="number")return this&&this[r]||r;if(typeof r!="object")return"";if(Array.isArray(r))return n.apply(this,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var t="";for(var u in r)i.call(r,u)&&r[u]&&(t=l(t,this&&this[u]||u));return t}function l(r,t){return t?r?r+" "+t:r+t:r}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(K);var Sr=K.exports;const Or=wr(Sr),Nr={"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"},zr={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"},Mr=Or.bind(Nr),L="purpur-icon",Cr="md",Ar=e=>e.filter(i=>Object.keys(i).length>=1).map(i=>`${i.name}="${i.value}"`).join(" "),qr=({content:e="",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 ${Ar(n)}>${a}${e}</svg>`},Er=e=>e.replace(/<(\/?)svg([^>]*)>/g,"").trim(),Rr=({["data-testid"]:e,svg:i,allyTitle:n,className:a="",size:l=Cr,...r})=>{const t=qr({content:Er(i.svg),title:n}),u=Mr(a,L,`${L}--${l}`);return o.jsx("span",{"aria-label":n,className:u,"data-testid":e,dangerouslySetInnerHTML:{__html:t},...r})};function Dr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Q={exports:{}};/*! | ||
*/(function(e){(function(){var u={}.hasOwnProperty;function n(){for(var r="",t=0;t<arguments.length;t++){var i=arguments[t];i&&(r=l(r,a.call(this,i)))}return r}function a(r){if(typeof r=="string"||typeof r=="number")return this&&this[r]||r;if(typeof r!="object")return"";if(Array.isArray(r))return n.apply(this,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var t="";for(var i in r)u.call(r,i)&&r[i]&&(t=l(t,this&&this[i]||i));return t}function l(r,t){return t?r?r+" "+t:r+t:r}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Q);var Sr=Q.exports;const Or=wr(Sr),Nr={"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"},zr={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"},Mr=Or.bind(Nr),k="purpur-icon",Ar="md",Cr=e=>e.filter(u=>Object.keys(u).length>=1).map(u=>`${u.name}="${u.value}"`).join(" "),qr=({content:e="",title:u}={})=>{const n=[{name:"xmlns",value:"http://www.w3.org/2000/svg"},{name:"fill",value:"currentColor"},{name:"viewBox",value:"0 0 24 24"},u?{name:"role",value:"img"}:{name:"aria-hidden",value:"true"}],a=u?`<title>${u}</title>`:"";return`<svg ${Cr(n)}>${a}${e}</svg>`},Er=e=>e.replace(/<(\/?)svg([^>]*)>/g,"").trim(),Fr=({["data-testid"]:e,svg:u,allyTitle:n,className:a="",size:l=Ar,...r})=>{const t=qr({content:Er(u.svg),title:n}),i=Mr(a,k,`${k}--${l}`);return o.jsx("span",{"aria-label":n,className:i,"data-testid":e,dangerouslySetInnerHTML:{__html:t},...r})};function Rr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var U={exports:{}};/*! | ||
Copyright (c) 2018 Jed Watson. | ||
Licensed under the MIT License (MIT), see | ||
http://jedwatson.github.io/classnames | ||
*/(function(e){(function(){var i={}.hasOwnProperty;function n(){for(var r="",t=0;t<arguments.length;t++){var u=arguments[t];u&&(r=l(r,a(u)))}return r}function a(r){if(typeof r=="string"||typeof r=="number")return r;if(typeof r!="object")return"";if(Array.isArray(r))return n.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var t="";for(var u in r)i.call(r,u)&&r[u]&&(t=l(t,u));return t}function l(r,t){return t?r?r+" "+t:r+t:r}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Q);var Ir=Q.exports;const Pr=Dr(Ir),k={"purpur-field-error-text":"_purpur-field-error-text_1u768_1","purpur-field-error-text__icon":"_purpur-field-error-text__icon_1u768_12"},Z="purpur-field-error-text",Vr=({["data-testid"]:e,children:i,className:n,relevant:a="additions text",...l})=>o.jsxs("div",{className:Pr([n,k[Z]]),"data-testid":e,"aria-live":"assertive","aria-relevant":a,...l,children:[o.jsx(Rr,{svg:zr,size:"xs",className:k[`${Z}__icon`]}),i]});function Br(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var U={exports:{}};/*! | ||
*/(function(e){(function(){var u={}.hasOwnProperty;function n(){for(var r="",t=0;t<arguments.length;t++){var i=arguments[t];i&&(r=l(r,a(i)))}return r}function a(r){if(typeof r=="string"||typeof r=="number")return r;if(typeof r!="object")return"";if(Array.isArray(r))return n.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var t="";for(var i in r)u.call(r,i)&&r[i]&&(t=l(t,i));return t}function l(r,t){return t?r?r+" "+t:r+t:r}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(U);var Br=U.exports;const Dr=Rr(Br),T={"purpur-field-error-text":"_purpur-field-error-text_1u768_1","purpur-field-error-text__icon":"_purpur-field-error-text__icon_1u768_12"},Z="purpur-field-error-text",Ir=({["data-testid"]:e,children:u,className:n,relevant:a="additions text",...l})=>o.jsxs("div",{className:Dr([n,T[Z]]),"data-testid":e,"aria-live":"assertive","aria-relevant":a,...l,children:[o.jsx(Fr,{svg:zr,size:"xs",className:T[`${Z}__icon`]}),u]});function Pr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var rr={exports:{}};/*! | ||
Copyright (c) 2018 Jed Watson. | ||
Licensed under the MIT License (MIT), see | ||
http://jedwatson.github.io/classnames | ||
*/(function(e){(function(){var i={}.hasOwnProperty;function n(){for(var r="",t=0;t<arguments.length;t++){var u=arguments[t];u&&(r=l(r,a(u)))}return r}function a(r){if(typeof r=="string"||typeof r=="number")return r;if(typeof r!="object")return"";if(Array.isArray(r))return n.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var t="";for(var u in r)i.call(r,u)&&r[u]&&(t=l(t,u));return t}function l(r,t){return t?r?r+" "+t:r+t:r}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(U);var Fr=U.exports;const Lr=Br(Fr),X={"purpur-field-helper-text":"_purpur-field-helper-text_atw6b_1","purpur-field-helper-text--disabled":"_purpur-field-helper-text--disabled_atw6b_9"},T="purpur-field-helper-text",kr=({["data-testid"]:e,children:i,className:n,disabled:a,id:l,...r})=>{const t=Lr([n,X[T],{[X[`${T}--disabled`]]:a}]);return o.jsx("span",{id:l,className:t,"data-testid":e,...r,children:i})};function Zr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var rr={exports:{}};/*! | ||
*/(function(e){(function(){var u={}.hasOwnProperty;function n(){for(var r="",t=0;t<arguments.length;t++){var i=arguments[t];i&&(r=l(r,a(i)))}return r}function a(r){if(typeof r=="string"||typeof r=="number")return r;if(typeof r!="object")return"";if(Array.isArray(r))return n.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var t="";for(var i in r)u.call(r,i)&&r[i]&&(t=l(t,i));return t}function l(r,t){return t?r?r+" "+t:r+t:r}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(rr);var Lr=rr.exports;const Vr=Pr(Lr),X={"purpur-field-helper-text":"_purpur-field-helper-text_atw6b_1","purpur-field-helper-text--disabled":"_purpur-field-helper-text--disabled_atw6b_9"},G="purpur-field-helper-text",kr=({["data-testid"]:e,children:u,className:n,disabled:a,id:l,...r})=>{const t=Vr([n,X[G],{[X[`${G}--disabled`]]:a}]);return o.jsx("span",{id:l,className:t,"data-testid":e,...r,children:u})};function Tr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var er={exports:{}};/*! | ||
Copyright (c) 2018 Jed Watson. | ||
Licensed under the MIT License (MIT), see | ||
http://jedwatson.github.io/classnames | ||
*/(function(e){(function(){var i={}.hasOwnProperty;function n(){for(var r="",t=0;t<arguments.length;t++){var u=arguments[t];u&&(r=l(r,a.call(this,u)))}return r}function a(r){if(typeof r=="string"||typeof r=="number")return this&&this[r]||r;if(typeof r!="object")return"";if(Array.isArray(r))return n.apply(this,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var t="";for(var u in r)i.call(r,u)&&r[u]&&(t=l(t,this&&this[u]||u));return t}function l(r,t){return t?r?r+" "+t:r+t:r}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(rr);var Xr=rr.exports;const Tr=Zr(Xr),Gr={"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"},Hr={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"},Wr={name:"close",svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M4.864 4.864a.9.9 0 0 1 1.273 0L12 10.727l5.864-5.863a.9.9 0 0 1 1.272 1.272L13.273 12l5.863 5.864a.9.9 0 1 1-1.272 1.272L12 13.273l-5.863 5.863a.9.9 0 0 1-1.273-1.272L10.727 12 4.864 6.136a.9.9 0 0 1 0-1.272Z" clip-rule="evenodd"/></svg>',keywords:["close"],category:"utility"},er=e=>o.jsx(nr,{...e,svg:Hr});er.displayName="IconCheckCircleFilled";const tr=e=>o.jsx(nr,{...e,svg:Wr});tr.displayName="IconClose";const Yr=Tr.bind(Gr),G="purpur-icon",Jr="md",Kr=e=>e.filter(i=>Object.keys(i).length>=1).map(i=>`${i.name}="${i.value}"`).join(" "),Qr=({content:e="",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 ${Kr(n)}>${a}${e}</svg>`},Ur=e=>e.replace(/<(\/?)svg([^>]*)>/g,"").trim(),nr=({["data-testid"]:e,svg:i,allyTitle:n,className:a="",size:l=Jr,...r})=>{const t=Qr({content:Ur(i.svg),title:n}),u=Yr(a,G,`${G}--${l}`);return o.jsx("span",{"aria-label":n,className:u,"data-testid":e,dangerouslySetInnerHTML:{__html:t},...r})};function R(){return R=Object.assign?Object.assign.bind():function(e){for(var i=1;i<arguments.length;i++){var n=arguments[i];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},R.apply(this,arguments)}function O(){return O=Object.assign?Object.assign.bind():function(e){for(var i=1;i<arguments.length;i++){var n=arguments[i];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},O.apply(this,arguments)}function re(e,i){typeof e=="function"?e(i):e!=null&&(e.current=i)}function ee(...e){return i=>e.forEach(n=>re(n,i))}const ur=s.forwardRef((e,i)=>{const{children:n,...a}=e,l=s.Children.toArray(n),r=l.find(ne);if(r){const t=r.props.children,u=l.map(v=>v===r?s.Children.count(t)>1?s.Children.only(null):s.isValidElement(t)?t.props.children:null:v);return s.createElement(D,O({},a,{ref:i}),s.isValidElement(t)?s.cloneElement(t,void 0,u):null)}return s.createElement(D,O({},a,{ref:i}),n)});ur.displayName="Slot";const D=s.forwardRef((e,i)=>{const{children:n,...a}=e;return s.isValidElement(n)?s.cloneElement(n,{...ue(a,n.props),ref:i?ee(i,n.ref):n.ref}):s.Children.count(n)>1?s.Children.only(null):null});D.displayName="SlotClone";const te=({children:e})=>s.createElement(s.Fragment,null,e);function ne(e){return s.isValidElement(e)&&e.type===te}function ue(e,i){const n={...i};for(const a in i){const l=e[a],r=i[a];/^on[A-Z]/.test(a)?l&&r?n[a]=(...t)=>{r(...t),l(...t)}:l&&(n[a]=l):a==="style"?n[a]={...l,...r}:a==="className"&&(n[a]=[l,r].filter(Boolean).join(" "))}return{...e,...n}}const ie=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],ae=ie.reduce((e,i)=>{const n=s.forwardRef((a,l)=>{const{asChild:r,...t}=a,u=r?ur:i;return s.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),s.createElement(u,O({},t,{ref:l}))});return n.displayName=`Primitive.${i}`,{...e,[i]:n}},{}),le=s.forwardRef((e,i)=>s.createElement(ae.label,R({},e,{ref:i,onMouseDown:n=>{var a;(a=e.onMouseDown)===null||a===void 0||a.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault()}}))),oe=le;function se(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ir={exports:{}};/*! | ||
*/(function(e){(function(){var u={}.hasOwnProperty;function n(){for(var r="",t=0;t<arguments.length;t++){var i=arguments[t];i&&(r=l(r,a.call(this,i)))}return r}function a(r){if(typeof r=="string"||typeof r=="number")return this&&this[r]||r;if(typeof r!="object")return"";if(Array.isArray(r))return n.apply(this,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var t="";for(var i in r)u.call(r,i)&&r[i]&&(t=l(t,this&&this[i]||i));return t}function l(r,t){return t?r?r+" "+t:r+t:r}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(er);var Zr=er.exports;const Xr=Tr(Zr),Gr={"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"},Hr={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"},Wr={name:"close",svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M4.864 4.864a.9.9 0 0 1 1.273 0L12 10.727l5.864-5.863a.9.9 0 0 1 1.272 1.272L13.273 12l5.863 5.864a.9.9 0 1 1-1.272 1.272L12 13.273l-5.863 5.863a.9.9 0 0 1-1.273-1.272L10.727 12 4.864 6.136a.9.9 0 0 1 0-1.272Z" clip-rule="evenodd"/></svg>',keywords:["close"],category:"utility"},tr=e=>o.jsx(ir,{...e,svg:Hr});tr.displayName="IconCheckCircleFilled";const nr=e=>o.jsx(ir,{...e,svg:Wr});nr.displayName="IconClose";const Kr=Xr.bind(Gr),H="purpur-icon",Yr="md",Jr=e=>e.filter(u=>Object.keys(u).length>=1).map(u=>`${u.name}="${u.value}"`).join(" "),Qr=({content:e="",title:u}={})=>{const n=[{name:"xmlns",value:"http://www.w3.org/2000/svg"},{name:"fill",value:"currentColor"},{name:"viewBox",value:"0 0 24 24"},u?{name:"role",value:"img"}:{name:"aria-hidden",value:"true"}],a=u?`<title>${u}</title>`:"";return`<svg ${Jr(n)}>${a}${e}</svg>`},Ur=e=>e.replace(/<(\/?)svg([^>]*)>/g,"").trim(),ir=({["data-testid"]:e,svg:u,allyTitle:n,className:a="",size:l=Yr,...r})=>{const t=Qr({content:Ur(u.svg),title:n}),i=Kr(a,H,`${H}--${l}`);return o.jsx("span",{"aria-label":n,className:i,"data-testid":e,dangerouslySetInnerHTML:{__html:t},...r})};function F(){return F=Object.assign?Object.assign.bind():function(e){for(var u=1;u<arguments.length;u++){var n=arguments[u];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},F.apply(this,arguments)}function O(){return O=Object.assign?Object.assign.bind():function(e){for(var u=1;u<arguments.length;u++){var n=arguments[u];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},O.apply(this,arguments)}function re(e,u){typeof e=="function"?e(u):e!=null&&(e.current=u)}function ee(...e){return u=>e.forEach(n=>re(n,u))}const ur=s.forwardRef((e,u)=>{const{children:n,...a}=e,l=s.Children.toArray(n),r=l.find(ne);if(r){const t=r.props.children,i=l.map(v=>v===r?s.Children.count(t)>1?s.Children.only(null):s.isValidElement(t)?t.props.children:null:v);return s.createElement(R,O({},a,{ref:u}),s.isValidElement(t)?s.cloneElement(t,void 0,i):null)}return s.createElement(R,O({},a,{ref:u}),n)});ur.displayName="Slot";const R=s.forwardRef((e,u)=>{const{children:n,...a}=e;return s.isValidElement(n)?s.cloneElement(n,{...ie(a,n.props),ref:u?ee(u,n.ref):n.ref}):s.Children.count(n)>1?s.Children.only(null):null});R.displayName="SlotClone";const te=({children:e})=>s.createElement(s.Fragment,null,e);function ne(e){return s.isValidElement(e)&&e.type===te}function ie(e,u){const n={...u};for(const a in u){const l=e[a],r=u[a];/^on[A-Z]/.test(a)?l&&r?n[a]=(...t)=>{r(...t),l(...t)}:l&&(n[a]=l):a==="style"?n[a]={...l,...r}:a==="className"&&(n[a]=[l,r].filter(Boolean).join(" "))}return{...e,...n}}const ue=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],ae=ue.reduce((e,u)=>{const n=s.forwardRef((a,l)=>{const{asChild:r,...t}=a,i=r?ur:u;return s.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),s.createElement(i,O({},t,{ref:l}))});return n.displayName=`Primitive.${u}`,{...e,[u]:n}},{}),le=s.forwardRef((e,u)=>s.createElement(ae.label,F({},e,{ref:u,onMouseDown:n=>{var a;(a=e.onMouseDown)===null||a===void 0||a.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault()}}))),oe=le;function se(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ar={exports:{}};/*! | ||
Copyright (c) 2018 Jed Watson. | ||
Licensed under the MIT License (MIT), see | ||
http://jedwatson.github.io/classnames | ||
*/(function(e){(function(){var i={}.hasOwnProperty;function n(){for(var r="",t=0;t<arguments.length;t++){var u=arguments[t];u&&(r=l(r,a(u)))}return r}function a(r){if(typeof r=="string"||typeof r=="number")return r;if(typeof r!="object")return"";if(Array.isArray(r))return n.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var t="";for(var u in r)i.call(r,u)&&r[u]&&(t=l(t,u));return t}function l(r,t){return t?r?r+" "+t:r+t:r}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(ir);var pe=ir.exports;const ce=se(pe),q={"purpur-label":"_purpur-label_12cfi_1","purpur-label--negative":"_purpur-label--negative_12cfi_9","purpur-label--disabled":"_purpur-label--disabled_12cfi_12"},E="purpur-label",de=({children:e,className:i,htmlFor:n,"data-testid":a,disabled:l,negative:r=!1,...t})=>{const u=ce([i,q[E],{[q[`${E}--disabled`]]:l,[q[`${E}--negative`]]:r}]);return o.jsx(oe,{className:u,"data-testid":a,htmlFor:n,...t,children:e})};function _e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ar={exports:{}};/*! | ||
*/(function(e){(function(){var u={}.hasOwnProperty;function n(){for(var r="",t=0;t<arguments.length;t++){var i=arguments[t];i&&(r=l(r,a(i)))}return r}function a(r){if(typeof r=="string"||typeof r=="number")return r;if(typeof r!="object")return"";if(Array.isArray(r))return n.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var t="";for(var i in r)u.call(r,i)&&r[i]&&(t=l(t,i));return t}function l(r,t){return t?r?r+" "+t:r+t:r}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(ar);var pe=ar.exports;const ce=se(pe),q={"purpur-label":"_purpur-label_12cfi_1","purpur-label--negative":"_purpur-label--negative_12cfi_9","purpur-label--disabled":"_purpur-label--disabled_12cfi_12"},E="purpur-label",de=({children:e,className:u,htmlFor:n,"data-testid":a,disabled:l,negative:r=!1,...t})=>{const i=ce([u,q[E],{[q[`${E}--disabled`]]:l,[q[`${E}--negative`]]:r}]);return o.jsx(oe,{className:i,"data-testid":a,htmlFor:n,...t,children:e})};function _e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var lr={exports:{}};/*! | ||
Copyright (c) 2018 Jed Watson. | ||
Licensed under the MIT License (MIT), see | ||
http://jedwatson.github.io/classnames | ||
*/(function(e){(function(){var i={}.hasOwnProperty;function n(){for(var r="",t=0;t<arguments.length;t++){var u=arguments[t];u&&(r=l(r,a(u)))}return r}function a(r){if(typeof r=="string"||typeof r=="number")return r;if(typeof r!="object")return"";if(Array.isArray(r))return n.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var t="";for(var u in r)i.call(r,u)&&r[u]&&(t=l(t,u));return t}function l(r,t){return t?r?r+" "+t:r+t:r}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(ar);var fe=ar.exports;const H=_e(fe),ve="_rotate_1xozj_1",xe="_dash_1xozj_1",w={"purpur-spinner":"_purpur-spinner_1xozj_1",rotate:ve,"purpur-spinner--xxs":"_purpur-spinner--xxs_1xozj_4","purpur-spinner--xs":"_purpur-spinner--xs_1xozj_8","purpur-spinner--sm":"_purpur-spinner--sm_1xozj_12","purpur-spinner--md":"_purpur-spinner--md_1xozj_16","purpur-spinner--lg":"_purpur-spinner--lg_1xozj_20","purpur-spinner__circle":"_purpur-spinner__circle_1xozj_24",dash:xe,"purpur-spinner__circle--disabled":"_purpur-spinner__circle--disabled_1xozj_33","purpur-spinner__circle--negative":"_purpur-spinner__circle--negative_1xozj_36"},S="purpur-spinner",me={XXS:"xxs",XS:"xs",SM:"sm",MD:"md",LG:"lg"},ge=({["data-testid"]:e,disabled:i=!1,negative:n=!1,size:a=me.SM,...l})=>o.jsx("div",{className:H([w[S],w[`${S}--${a}`]]),"data-testid":e,...l,children:o.jsx("svg",{viewBox:"0 0 50 50",children:o.jsx("circle",{className:H(w[`${S}__circle`],{[w[`${S}__circle--disabled`]]:i,[w[`${S}__circle--negative`]]:n}),cx:"25",cy:"25",r:"20"})})});function ye(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var lr={exports:{}};/*! | ||
*/(function(e){(function(){var u={}.hasOwnProperty;function n(){for(var r="",t=0;t<arguments.length;t++){var i=arguments[t];i&&(r=l(r,a(i)))}return r}function a(r){if(typeof r=="string"||typeof r=="number")return r;if(typeof r!="object")return"";if(Array.isArray(r))return n.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var t="";for(var i in r)u.call(r,i)&&r[i]&&(t=l(t,i));return t}function l(r,t){return t?r?r+" "+t:r+t:r}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(lr);var fe=lr.exports;const W=_e(fe),ve="_rotate_1xozj_1",xe="_dash_1xozj_1",w={"purpur-spinner":"_purpur-spinner_1xozj_1",rotate:ve,"purpur-spinner--xxs":"_purpur-spinner--xxs_1xozj_4","purpur-spinner--xs":"_purpur-spinner--xs_1xozj_8","purpur-spinner--sm":"_purpur-spinner--sm_1xozj_12","purpur-spinner--md":"_purpur-spinner--md_1xozj_16","purpur-spinner--lg":"_purpur-spinner--lg_1xozj_20","purpur-spinner__circle":"_purpur-spinner__circle_1xozj_24",dash:xe,"purpur-spinner__circle--disabled":"_purpur-spinner__circle--disabled_1xozj_33","purpur-spinner__circle--negative":"_purpur-spinner__circle--negative_1xozj_36"},S="purpur-spinner",me={XXS:"xxs",XS:"xs",SM:"sm",MD:"md",LG:"lg"},ge=({["data-testid"]:e,disabled:u=!1,negative:n=!1,size:a=me.SM,...l})=>o.jsx("div",{className:W([w[S],w[`${S}--${a}`]]),"data-testid":e,...l,children:o.jsx("svg",{viewBox:"0 0 50 50",children:o.jsx("circle",{className:W(w[`${S}__circle`],{[w[`${S}__circle--disabled`]]:u,[w[`${S}__circle--negative`]]:n}),cx:"25",cy:"25",r:"20"})})});function ye(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var or={exports:{}};/*! | ||
Copyright (c) 2018 Jed Watson. | ||
Licensed under the MIT License (MIT), see | ||
http://jedwatson.github.io/classnames | ||
*/(function(e){(function(){var i={}.hasOwnProperty;function n(){for(var r="",t=0;t<arguments.length;t++){var u=arguments[t];u&&(r=l(r,a.call(this,u)))}return r}function a(r){if(typeof r=="string"||typeof r=="number")return this&&this[r]||r;if(typeof r!="object")return"";if(Array.isArray(r))return n.apply(this,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var t="";for(var u in r)i.call(r,u)&&r[u]&&(t=l(t,this&&this[u]||u));return t}function l(r,t){return t?r?r+" "+t:r+t:r}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(lr);var be=lr.exports;const he=ye(be),je={"purpur-text-field":"_purpur-text-field_nj9f4_1","purpur-text-field__label":"_purpur-text-field__label_nj9f4_7","purpur-text-field__label-text":"_purpur-text-field__label-text_nj9f4_13","purpur-text-field__field-row":"_purpur-text-field__field-row_nj9f4_16","purpur-text-field__frame":"_purpur-text-field__frame_nj9f4_20","purpur-text-field__input-container":"_purpur-text-field__input-container_nj9f4_27","purpur-text-field__input-container--disabled":"_purpur-text-field__input-container--disabled_nj9f4_38","purpur-text-field__input-container--readonly":"_purpur-text-field__input-container--readonly_nj9f4_41","purpur-text-field__input-container--has-clear-button":"_purpur-text-field__input-container--has-clear-button_nj9f4_44","purpur-text-field__input-container--end-adornment":"_purpur-text-field__input-container--end-adornment_nj9f4_47","purpur-text-field__input":"_purpur-text-field__input_nj9f4_27","purpur-text-field__input-container--start-adornment":"_purpur-text-field__input-container--start-adornment_nj9f4_53","purpur-text-field__input--valid":"_purpur-text-field__input--valid_nj9f4_94","purpur-text-field__input--error":"_purpur-text-field__input--error_nj9f4_94","purpur-text-field__adornment-container":"_purpur-text-field__adornment-container_nj9f4_106","purpur-text-field__valid-icon":"_purpur-text-field__valid-icon_nj9f4_111"},$e=e=>s.useRef(e),f=he.bind(je),c="purpur-text-field",we=({["data-testid"]:e,className:i,clearButtonAllyLabel:n,afterField:a,endAdornment:l,errorText:r,helperText:t,label:u,loading:v=!1,onClear:x,startAdornment:y,valid:N=!1,...p},g)=>{var V;const z=s.useId(),b=p.id??z,d=_=>e?`${e}-${_}`:void 0,h=N&&!r,M=t?`${b}-helper-text`:void 0,C=[y].filter(_=>!!_),I=(typeof p.value=="number"?p.value!==void 0:(V=p.value)==null?void 0:V.length)&&!p.disabled&&!p.readOnly&&!v&&x&&n,P=$e(null),sr=_=>{P.current=_,typeof g=="function"?g(_):g&&(g.current=_)},pr=()=>{var _;x==null||x(),(_=P.current)==null||_.focus()},A=[v&&o.jsx(ge,{disabled:p.disabled,size:"xs","data-testid":d("spinner")},"spinner"),I&&o.jsx(J,{variant:"tertiary-purple",onClick:pr,iconOnly:!0,"aria-label":n??"","data-testid":d("clear-button"),tabIndex:-1,children:o.jsx(tr,{size:"xs"})},"clear-button"),h&&o.jsx(er,{"data-testid":d("valid-icon"),className:f(`${c}__valid-icon`)},"valid-icon")].filter(_=>!!_),cr=f([`${c}__input-container`,{[`${c}__input-container--start-adornment`]:C.length,[`${c}__input-container--end-adornment`]:A.length||l,[`${c}__input-container--disabled`]:p.disabled,[`${c}__input-container--has-clear-button`]:I,[`${c}__input-container--readonly`]:p.readOnly&&!p.disabled}]);return o.jsxs("div",{className:f(i,c),children:[u&&o.jsx(de,{htmlFor:b,className:f(`${c}__label`),"data-testid":d("label"),disabled:p.disabled,children:`${p.required?"* ":""}${u}`}),o.jsxs("div",{className:f(`${c}__field-row`),children:[o.jsxs("div",{className:cr,children:[!!C.length&&o.jsx("div",{"data-testid":d("start-adornments"),className:f(`${c}__adornment-container`),children:C}),o.jsx("input",{...p,id:b,ref:sr,"data-testid":d("input"),"aria-describedby":p["aria-describedby"]||M,"aria-invalid":p["aria-invalid"]||!!r,className:f([`${c}__input`,{[`${c}__input--valid`]:h,[`${c}__input--error`]:!!r}])}),o.jsx("div",{className:f(`${c}__frame`)}),(!!A.length||l)&&o.jsxs("div",{"data-testid":d("end-adornments"),className:f(`${c}__adornment-container`),children:[A,l]})]}),!!a&&a]}),M&&o.jsx(kr,{"data-testid":d("helper-text"),id:M,children:t}),r&&o.jsx(Vr,{"data-testid":d("error-text"),children:r})]})},or=s.forwardRef(we);or.displayName="TextField";exports.TextField=or; | ||
*/(function(e){(function(){var u={}.hasOwnProperty;function n(){for(var r="",t=0;t<arguments.length;t++){var i=arguments[t];i&&(r=l(r,a.call(this,i)))}return r}function a(r){if(typeof r=="string"||typeof r=="number")return this&&this[r]||r;if(typeof r!="object")return"";if(Array.isArray(r))return n.apply(this,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var t="";for(var i in r)u.call(r,i)&&r[i]&&(t=l(t,this&&this[i]||i));return t}function l(r,t){return t?r?r+" "+t:r+t:r}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(or);var be=or.exports;const he=ye(be),je={"purpur-text-field":"_purpur-text-field_nj9f4_1","purpur-text-field__label":"_purpur-text-field__label_nj9f4_7","purpur-text-field__label-text":"_purpur-text-field__label-text_nj9f4_13","purpur-text-field__field-row":"_purpur-text-field__field-row_nj9f4_16","purpur-text-field__frame":"_purpur-text-field__frame_nj9f4_20","purpur-text-field__input-container":"_purpur-text-field__input-container_nj9f4_27","purpur-text-field__input-container--disabled":"_purpur-text-field__input-container--disabled_nj9f4_38","purpur-text-field__input-container--readonly":"_purpur-text-field__input-container--readonly_nj9f4_41","purpur-text-field__input-container--has-clear-button":"_purpur-text-field__input-container--has-clear-button_nj9f4_44","purpur-text-field__input-container--end-adornment":"_purpur-text-field__input-container--end-adornment_nj9f4_47","purpur-text-field__input":"_purpur-text-field__input_nj9f4_27","purpur-text-field__input-container--start-adornment":"_purpur-text-field__input-container--start-adornment_nj9f4_53","purpur-text-field__input--valid":"_purpur-text-field__input--valid_nj9f4_94","purpur-text-field__input--error":"_purpur-text-field__input--error_nj9f4_94","purpur-text-field__adornment-container":"_purpur-text-field__adornment-container_nj9f4_106","purpur-text-field__valid-icon":"_purpur-text-field__valid-icon_nj9f4_111"},$e=e=>s.useRef(e),f=he.bind(je),c="purpur-text-field",we=({["data-testid"]:e,className:u,clearButtonAllyLabel:n,afterField:a,endAdornment:l,errorText:r,helperText:t,label:i,loading:v=!1,onClear:x,startAdornment:y,valid:N=!1,...p},g)=>{var P;const z=s.useId(),b=p.id??z,d=_=>e?`${e}-${_}`:void 0,h=N&&!r,M=t?`${b}-helper-text`:void 0,A=[y].filter(_=>!!_),D=(typeof p.value=="number"?p.value!==void 0:(P=p.value)==null?void 0:P.length)&&!p.disabled&&!p.readOnly&&!v&&x&&n,I=$e(null),sr=_=>{I.current=_,typeof g=="function"?g(_):g&&(g.current=_)},pr=()=>{var _;x==null||x(),(_=I.current)==null||_.focus()},C=[v&&o.jsx(ge,{disabled:p.disabled,size:"xs","data-testid":d("spinner")},"spinner"),D&&o.jsx(J,{variant:"tertiary-purple",onClick:pr,iconOnly:!0,"aria-label":n??"","data-testid":d("clear-button"),tabIndex:-1,children:o.jsx(nr,{size:"xs"})},"clear-button"),h&&o.jsx(tr,{"data-testid":d("valid-icon"),className:f(`${c}__valid-icon`)},"valid-icon")].filter(_=>!!_),cr=f([`${c}__input-container`,{[`${c}__input-container--start-adornment`]:A.length,[`${c}__input-container--end-adornment`]:C.length||l,[`${c}__input-container--disabled`]:p.disabled,[`${c}__input-container--has-clear-button`]:D,[`${c}__input-container--readonly`]:p.readOnly&&!p.disabled}]);return o.jsxs("div",{className:f(u,c),children:[i&&o.jsx(de,{htmlFor:b,className:f(`${c}__label`),"data-testid":d("label"),disabled:p.disabled,children:`${p.required?"* ":""}${i}`}),o.jsxs("div",{className:f(`${c}__field-row`),children:[o.jsxs("div",{className:cr,children:[!!A.length&&o.jsx("div",{"data-testid":d("start-adornments"),className:f(`${c}__adornment-container`),children:A}),o.jsx("input",{...p,id:b,ref:sr,"data-testid":d("input"),"aria-describedby":p["aria-describedby"]||M,"aria-invalid":p["aria-invalid"]||!!r,className:f([`${c}__input`,{[`${c}__input--valid`]:h,[`${c}__input--error`]:!!r}])}),o.jsx("div",{className:f(`${c}__frame`)}),(!!C.length||l)&&o.jsxs("div",{"data-testid":d("end-adornments"),className:f(`${c}__adornment-container`),children:[C,l]})]}),!!a&&a]}),M&&o.jsx(kr,{"data-testid":d("helper-text"),id:M,children:t}),r&&o.jsx(Ir,{"data-testid":d("error-text"),children:r})]})},B=s.forwardRef(we);B.displayName="TextField";const Se=e=>s.isValidElement(e)&&e.type.displayName===B.displayName;exports.TextField=B;exports.isTextField=Se; | ||
//# sourceMappingURL=text-field.cjs.js.map |
@@ -1,2 +0,2 @@ | ||
import { default as React, ComponentPropsWithoutRef, HTMLInputTypeAttribute, ReactNode } from 'react'; | ||
import { default as React, ComponentPropsWithoutRef, HTMLInputTypeAttribute, ReactElement, ReactNode, ReactPortal } from 'react'; | ||
@@ -71,3 +71,4 @@ type TextFieldBaseProps = { | ||
export declare const TextField: React.ForwardRefExoticComponent<TextFieldProps & React.RefAttributes<HTMLInputElement>>; | ||
export declare const isTextField: (child: ReactElement | Iterable<ReactNode> | ReactPortal | string | number | boolean | null | undefined) => child is React.ReactElement<TextFieldProps, string | React.JSXElementConstructor<any>>; | ||
export {}; | ||
//# sourceMappingURL=text-field.d.ts.map |
import { jsxs as x, jsx as p } from "react/jsx-runtime"; | ||
import { forwardRef as y, Children as N, isValidElement as A, createElement as z, cloneElement as Q, useEffect as mr, Fragment as gr, useRef as xr, useId as yr } from "react"; | ||
import { forwardRef as y, Children as N, isValidElement as z, createElement as M, cloneElement as Q, useEffect as gr, Fragment as xr, useRef as yr, useId as br } from "react"; | ||
import "react-dom"; | ||
const X = { | ||
const G = { | ||
SM: "sm", | ||
@@ -9,3 +9,3 @@ MD: "md", | ||
}; | ||
function br(t) { | ||
function hr(t) { | ||
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t; | ||
@@ -49,6 +49,6 @@ } | ||
})(U); | ||
var hr = U.exports; | ||
const R = /* @__PURE__ */ br(hr), $r = "_rotate_1xozj_1", jr = "_dash_1xozj_1", j = { | ||
var $r = U.exports; | ||
const R = /* @__PURE__ */ hr($r), jr = "_rotate_1xozj_1", wr = "_dash_1xozj_1", j = { | ||
"purpur-spinner": "_purpur-spinner_1xozj_1", | ||
rotate: $r, | ||
rotate: jr, | ||
"purpur-spinner--xxs": "_purpur-spinner--xxs_1xozj_4", | ||
@@ -60,6 +60,6 @@ "purpur-spinner--xs": "_purpur-spinner--xs_1xozj_8", | ||
"purpur-spinner__circle": "_purpur-spinner__circle_1xozj_24", | ||
dash: jr, | ||
dash: wr, | ||
"purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_1xozj_33", | ||
"purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_1xozj_36" | ||
}, w = "purpur-spinner", wr = { | ||
}, w = "purpur-spinner", Sr = { | ||
XXS: "xxs", | ||
@@ -70,7 +70,7 @@ XS: "xs", | ||
LG: "lg" | ||
}, Sr = ({ | ||
}, Or = ({ | ||
["data-testid"]: t, | ||
disabled: i = !1, | ||
negative: n = !1, | ||
size: a = wr.SM, | ||
size: a = Sr.SM, | ||
...o | ||
@@ -97,3 +97,3 @@ }) => /* @__PURE__ */ p( | ||
); | ||
function Or(t) { | ||
function Nr(t) { | ||
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t; | ||
@@ -137,4 +137,4 @@ } | ||
})(rr); | ||
var Nr = rr.exports; | ||
const zr = /* @__PURE__ */ Or(Nr), Mr = { | ||
var zr = rr.exports; | ||
const Mr = /* @__PURE__ */ Nr(zr), Ar = { | ||
"purpur-button": "_purpur-button_u2yv5_1", | ||
@@ -160,3 +160,3 @@ "purpur-button--sm": "_purpur-button--sm_u2yv5_33", | ||
"purpur-button--text": "_purpur-button--text_u2yv5_175" | ||
}, Ar = zr.bind(Mr), m = "purpur-button", Cr = ({ | ||
}, qr = Mr.bind(Ar), m = "purpur-button", Cr = ({ | ||
children: t, | ||
@@ -171,5 +171,5 @@ className: i, | ||
onClick: f, | ||
size: v = X.MD, | ||
size: v = G.MD, | ||
variant: b, | ||
type: C = "button", | ||
type: q = "button", | ||
...l | ||
@@ -179,3 +179,3 @@ }, g) => { | ||
return null; | ||
const q = Ar( | ||
const C = qr( | ||
[ | ||
@@ -199,5 +199,5 @@ m, | ||
{ | ||
className: q, | ||
className: C, | ||
"data-testid": n, | ||
type: C, | ||
type: q, | ||
ref: g, | ||
@@ -208,3 +208,3 @@ "aria-disabled": c, | ||
children: [ | ||
e && /* @__PURE__ */ p(Sr, { size: v === X.LG ? "xs" : "xxs", negative: u, disabled: c }), | ||
e && /* @__PURE__ */ p(Or, { size: v === G.LG ? "xs" : "xxs", negative: u, disabled: c }), | ||
" ", | ||
@@ -217,3 +217,3 @@ t | ||
tr.displayName = "Button"; | ||
function qr(t) { | ||
function Br(t) { | ||
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t; | ||
@@ -258,3 +258,3 @@ } | ||
var Dr = er.exports; | ||
const Ir = /* @__PURE__ */ qr(Dr), Br = { | ||
const Ir = /* @__PURE__ */ Br(Dr), Fr = { | ||
"purpur-icon": "_purpur-icon_8u1lq_1", | ||
@@ -267,3 +267,3 @@ "purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4", | ||
"purpur-icon--xl": "_purpur-icon--xl_8u1lq_24" | ||
}, Er = { | ||
}, Lr = { | ||
name: "error-filled", | ||
@@ -273,3 +273,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" | ||
}, Lr = Ir.bind(Br), G = "purpur-icon", Pr = "md", Fr = (t) => t.filter((i) => Object.keys(i).length >= 1).map((i) => `${i.name}="${i.value}"`).join(" "), kr = ({ content: t = "", title: i } = {}) => { | ||
}, Pr = Ir.bind(Fr), T = "purpur-icon", kr = "md", Er = (t) => t.filter((i) => Object.keys(i).length >= 1).map((i) => `${i.name}="${i.value}"`).join(" "), Zr = ({ content: t = "", title: i } = {}) => { | ||
const n = [ | ||
@@ -281,4 +281,4 @@ { name: "xmlns", value: "http://www.w3.org/2000/svg" }, | ||
], a = i ? `<title>${i}</title>` : ""; | ||
return `<svg ${Fr(n)}>${a}${t}</svg>`; | ||
}, Vr = (t) => t.replace(/<(\/?)svg([^>]*)>/g, "").trim(), Zr = ({ | ||
return `<svg ${Er(n)}>${a}${t}</svg>`; | ||
}, Xr = (t) => t.replace(/<(\/?)svg([^>]*)>/g, "").trim(), Gr = ({ | ||
["data-testid"]: t, | ||
@@ -288,9 +288,9 @@ svg: i, | ||
className: a = "", | ||
size: o = Pr, | ||
size: o = kr, | ||
...r | ||
}) => { | ||
const e = kr({ | ||
content: Vr(i.svg), | ||
const e = Zr({ | ||
content: Xr(i.svg), | ||
title: n | ||
}), u = Lr(a, G, `${G}--${o}`); | ||
}), u = Pr(a, T, `${T}--${o}`); | ||
return /* @__PURE__ */ p( | ||
@@ -307,3 +307,3 @@ "span", | ||
}; | ||
function Xr(t) { | ||
function Rr(t) { | ||
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t; | ||
@@ -347,7 +347,7 @@ } | ||
})(nr); | ||
var Rr = nr.exports; | ||
const Gr = /* @__PURE__ */ Xr(Rr), T = { | ||
var Tr = nr.exports; | ||
const Vr = /* @__PURE__ */ Rr(Tr), V = { | ||
"purpur-field-error-text": "_purpur-field-error-text_1u768_1", | ||
"purpur-field-error-text__icon": "_purpur-field-error-text__icon_1u768_12" | ||
}, H = "purpur-field-error-text", Tr = ({ | ||
}, H = "purpur-field-error-text", Hr = ({ | ||
["data-testid"]: t, | ||
@@ -361,3 +361,3 @@ children: i, | ||
{ | ||
className: Gr([n, T[H]]), | ||
className: Vr([n, V[H]]), | ||
"data-testid": t, | ||
@@ -368,3 +368,3 @@ "aria-live": "assertive", | ||
children: [ | ||
/* @__PURE__ */ p(Zr, { svg: Er, size: "xs", className: T[`${H}__icon`] }), | ||
/* @__PURE__ */ p(Gr, { svg: Lr, size: "xs", className: V[`${H}__icon`] }), | ||
i | ||
@@ -374,3 +374,3 @@ ] | ||
); | ||
function Hr(t) { | ||
function Wr(t) { | ||
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t; | ||
@@ -414,7 +414,7 @@ } | ||
})(ur); | ||
var Wr = ur.exports; | ||
const Yr = /* @__PURE__ */ Hr(Wr), W = { | ||
var Kr = ur.exports; | ||
const Yr = /* @__PURE__ */ Wr(Kr), W = { | ||
"purpur-field-helper-text": "_purpur-field-helper-text_atw6b_1", | ||
"purpur-field-helper-text--disabled": "_purpur-field-helper-text--disabled_atw6b_9" | ||
}, Y = "purpur-field-helper-text", Jr = ({ | ||
}, K = "purpur-field-helper-text", Jr = ({ | ||
["data-testid"]: t, | ||
@@ -429,5 +429,5 @@ children: i, | ||
n, | ||
W[Y], | ||
W[K], | ||
{ | ||
[W[`${Y}--disabled`]]: a | ||
[W[`${K}--disabled`]]: a | ||
} | ||
@@ -437,3 +437,3 @@ ]); | ||
}; | ||
function Kr(t) { | ||
function Qr(t) { | ||
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t; | ||
@@ -477,4 +477,4 @@ } | ||
})(ir); | ||
var Qr = ir.exports; | ||
const Ur = /* @__PURE__ */ Kr(Qr), rt = { | ||
var Ur = ir.exports; | ||
const rt = /* @__PURE__ */ Qr(Ur), tt = { | ||
"purpur-icon": "_purpur-icon_8u1lq_1", | ||
@@ -487,3 +487,3 @@ "purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4", | ||
"purpur-icon--xl": "_purpur-icon--xl_8u1lq_24" | ||
}, tt = { | ||
}, et = { | ||
name: "check-circle-filled", | ||
@@ -493,3 +493,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" | ||
}, et = { | ||
}, nt = { | ||
name: "close", | ||
@@ -503,3 +503,3 @@ svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M4.864 4.864a.9.9 0 0 1 1.273 0L12 10.727l5.864-5.863a.9.9 0 0 1 1.272 1.272L13.273 12l5.863 5.864a.9.9 0 1 1-1.272 1.272L12 13.273l-5.863 5.863a.9.9 0 0 1-1.273-1.272L10.727 12 4.864 6.136a.9.9 0 0 1 0-1.272Z" clip-rule="evenodd"/></svg>', | ||
...t, | ||
svg: tt | ||
svg: et | ||
} | ||
@@ -512,7 +512,7 @@ ); | ||
...t, | ||
svg: et | ||
svg: nt | ||
} | ||
); | ||
or.displayName = "IconClose"; | ||
const nt = Ur.bind(rt), J = "purpur-icon", ut = "md", it = (t) => t.filter((i) => Object.keys(i).length >= 1).map((i) => `${i.name}="${i.value}"`).join(" "), at = ({ content: t = "", title: i } = {}) => { | ||
const ut = rt.bind(tt), Y = "purpur-icon", it = "md", at = (t) => t.filter((i) => Object.keys(i).length >= 1).map((i) => `${i.name}="${i.value}"`).join(" "), ot = ({ content: t = "", title: i } = {}) => { | ||
const n = [ | ||
@@ -524,4 +524,4 @@ { name: "xmlns", value: "http://www.w3.org/2000/svg" }, | ||
], a = i ? `<title>${i}</title>` : ""; | ||
return `<svg ${it(n)}>${a}${t}</svg>`; | ||
}, ot = (t) => t.replace(/<(\/?)svg([^>]*)>/g, "").trim(), pr = ({ | ||
return `<svg ${at(n)}>${a}${t}</svg>`; | ||
}, pt = (t) => t.replace(/<(\/?)svg([^>]*)>/g, "").trim(), pr = ({ | ||
["data-testid"]: t, | ||
@@ -531,9 +531,9 @@ svg: i, | ||
className: a = "", | ||
size: o = ut, | ||
size: o = it, | ||
...r | ||
}) => { | ||
const e = at({ | ||
content: ot(i.svg), | ||
const e = ot({ | ||
content: pt(i.svg), | ||
title: n | ||
}), u = nt(a, J, `${J}--${o}`); | ||
}), u = ut(a, Y, `${Y}--${o}`); | ||
return /* @__PURE__ */ p( | ||
@@ -560,4 +560,4 @@ "span", | ||
} | ||
function M() { | ||
return M = Object.assign ? Object.assign.bind() : function(t) { | ||
function A() { | ||
return A = Object.assign ? Object.assign.bind() : function(t) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
@@ -569,21 +569,21 @@ var n = arguments[i]; | ||
return t; | ||
}, M.apply(this, arguments); | ||
}, A.apply(this, arguments); | ||
} | ||
function pt(t, i) { | ||
function lt(t, i) { | ||
typeof t == "function" ? t(i) : t != null && (t.current = i); | ||
} | ||
function lt(...t) { | ||
function st(...t) { | ||
return (i) => t.forEach( | ||
(n) => pt(n, i) | ||
(n) => lt(n, i) | ||
); | ||
} | ||
const lr = /* @__PURE__ */ y((t, i) => { | ||
const { children: n, ...a } = t, o = N.toArray(n), r = o.find(ct); | ||
const { children: n, ...a } = t, o = N.toArray(n), r = o.find(dt); | ||
if (r) { | ||
const e = r.props.children, u = o.map((f) => f === r ? N.count(e) > 1 ? N.only(null) : /* @__PURE__ */ A(e) ? e.props.children : null : f); | ||
return /* @__PURE__ */ z(F, M({}, a, { | ||
const e = r.props.children, u = o.map((f) => f === r ? N.count(e) > 1 ? N.only(null) : /* @__PURE__ */ z(e) ? e.props.children : null : f); | ||
return /* @__PURE__ */ M(k, A({}, a, { | ||
ref: i | ||
}), /* @__PURE__ */ A(e) ? /* @__PURE__ */ Q(e, void 0, u) : null); | ||
}), /* @__PURE__ */ z(e) ? /* @__PURE__ */ Q(e, void 0, u) : null); | ||
} | ||
return /* @__PURE__ */ z(F, M({}, a, { | ||
return /* @__PURE__ */ M(k, A({}, a, { | ||
ref: i | ||
@@ -593,15 +593,15 @@ }), n); | ||
lr.displayName = "Slot"; | ||
const F = /* @__PURE__ */ y((t, i) => { | ||
const k = /* @__PURE__ */ y((t, i) => { | ||
const { children: n, ...a } = t; | ||
return /* @__PURE__ */ A(n) ? /* @__PURE__ */ Q(n, { | ||
...dt(a, n.props), | ||
ref: i ? lt(i, n.ref) : n.ref | ||
return /* @__PURE__ */ z(n) ? /* @__PURE__ */ Q(n, { | ||
..._t(a, n.props), | ||
ref: i ? st(i, n.ref) : n.ref | ||
}) : N.count(n) > 1 ? N.only(null) : null; | ||
}); | ||
F.displayName = "SlotClone"; | ||
const st = ({ children: t }) => /* @__PURE__ */ z(gr, null, t); | ||
function ct(t) { | ||
return /* @__PURE__ */ A(t) && t.type === st; | ||
k.displayName = "SlotClone"; | ||
const ct = ({ children: t }) => /* @__PURE__ */ M(xr, null, t); | ||
function dt(t) { | ||
return /* @__PURE__ */ z(t) && t.type === ct; | ||
} | ||
function dt(t, i) { | ||
function _t(t, i) { | ||
const n = { | ||
@@ -627,3 +627,3 @@ ...i | ||
} | ||
const _t = [ | ||
const ft = [ | ||
"a", | ||
@@ -645,8 +645,8 @@ "button", | ||
"ul" | ||
], ft = _t.reduce((t, i) => { | ||
], vt = ft.reduce((t, i) => { | ||
const n = /* @__PURE__ */ y((a, o) => { | ||
const { asChild: r, ...e } = a, u = r ? lr : i; | ||
return mr(() => { | ||
return gr(() => { | ||
window[Symbol.for("radix-ui")] = !0; | ||
}, []), /* @__PURE__ */ z(u, M({}, e, { | ||
}, []), /* @__PURE__ */ M(u, A({}, e, { | ||
ref: o | ||
@@ -659,3 +659,3 @@ })); | ||
}; | ||
}, {}), vt = /* @__PURE__ */ y((t, i) => /* @__PURE__ */ z(ft.label, P({}, t, { | ||
}, {}), mt = /* @__PURE__ */ y((t, i) => /* @__PURE__ */ M(vt.label, P({}, t, { | ||
ref: i, | ||
@@ -666,4 +666,4 @@ onMouseDown: (n) => { | ||
} | ||
}))), mt = vt; | ||
function gt(t) { | ||
}))), gt = mt; | ||
function xt(t) { | ||
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t; | ||
@@ -707,8 +707,8 @@ } | ||
})(sr); | ||
var xt = sr.exports; | ||
const yt = /* @__PURE__ */ gt(xt), E = { | ||
var yt = sr.exports; | ||
const bt = /* @__PURE__ */ xt(yt), F = { | ||
"purpur-label": "_purpur-label_12cfi_1", | ||
"purpur-label--negative": "_purpur-label--negative_12cfi_9", | ||
"purpur-label--disabled": "_purpur-label--disabled_12cfi_12" | ||
}, L = "purpur-label", bt = ({ | ||
}, L = "purpur-label", ht = ({ | ||
children: t, | ||
@@ -722,13 +722,13 @@ className: i, | ||
}) => { | ||
const u = yt([ | ||
const u = bt([ | ||
i, | ||
E[L], | ||
F[L], | ||
{ | ||
[E[`${L}--disabled`]]: o, | ||
[E[`${L}--negative`]]: r | ||
[F[`${L}--disabled`]]: o, | ||
[F[`${L}--negative`]]: r | ||
} | ||
]); | ||
return /* @__PURE__ */ p(mt, { className: u, "data-testid": a, htmlFor: n, ...e, children: t }); | ||
return /* @__PURE__ */ p(gt, { className: u, "data-testid": a, htmlFor: n, ...e, children: t }); | ||
}; | ||
function ht(t) { | ||
function $t(t) { | ||
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t; | ||
@@ -772,6 +772,6 @@ } | ||
})(cr); | ||
var $t = cr.exports; | ||
const K = /* @__PURE__ */ ht($t), jt = "_rotate_1xozj_1", wt = "_dash_1xozj_1", S = { | ||
var jt = cr.exports; | ||
const J = /* @__PURE__ */ $t(jt), wt = "_rotate_1xozj_1", St = "_dash_1xozj_1", S = { | ||
"purpur-spinner": "_purpur-spinner_1xozj_1", | ||
rotate: jt, | ||
rotate: wt, | ||
"purpur-spinner--xxs": "_purpur-spinner--xxs_1xozj_4", | ||
@@ -783,6 +783,6 @@ "purpur-spinner--xs": "_purpur-spinner--xs_1xozj_8", | ||
"purpur-spinner__circle": "_purpur-spinner__circle_1xozj_24", | ||
dash: wt, | ||
dash: St, | ||
"purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_1xozj_33", | ||
"purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_1xozj_36" | ||
}, O = "purpur-spinner", St = { | ||
}, O = "purpur-spinner", Ot = { | ||
XXS: "xxs", | ||
@@ -793,7 +793,7 @@ XS: "xs", | ||
LG: "lg" | ||
}, Ot = ({ | ||
}, Nt = ({ | ||
["data-testid"]: t, | ||
disabled: i = !1, | ||
negative: n = !1, | ||
size: a = St.SM, | ||
size: a = Ot.SM, | ||
...o | ||
@@ -803,3 +803,3 @@ }) => /* @__PURE__ */ p( | ||
{ | ||
className: K([S[O], S[`${O}--${a}`]]), | ||
className: J([S[O], S[`${O}--${a}`]]), | ||
"data-testid": t, | ||
@@ -810,3 +810,3 @@ ...o, | ||
{ | ||
className: K(S[`${O}__circle`], { | ||
className: J(S[`${O}__circle`], { | ||
[S[`${O}__circle--disabled`]]: i, | ||
@@ -822,3 +822,3 @@ [S[`${O}__circle--negative`]]: n | ||
); | ||
function Nt(t) { | ||
function zt(t) { | ||
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t; | ||
@@ -862,4 +862,4 @@ } | ||
})(dr); | ||
var zt = dr.exports; | ||
const Mt = /* @__PURE__ */ Nt(zt), At = { | ||
var Mt = dr.exports; | ||
const At = /* @__PURE__ */ zt(Mt), qt = { | ||
"purpur-text-field": "_purpur-text-field_nj9f4_1", | ||
@@ -881,3 +881,3 @@ "purpur-text-field__label": "_purpur-text-field__label_nj9f4_7", | ||
"purpur-text-field__valid-icon": "_purpur-text-field__valid-icon_nj9f4_111" | ||
}, Ct = (t) => xr(t), _ = Mt.bind(At), s = "purpur-text-field", qt = ({ | ||
}, Ct = (t) => yr(t), _ = At.bind(qt), s = "purpur-text-field", Bt = ({ | ||
["data-testid"]: t, | ||
@@ -894,14 +894,14 @@ className: i, | ||
startAdornment: b, | ||
valid: C = !1, | ||
valid: q = !1, | ||
...l | ||
}, g) => { | ||
var Z; | ||
const q = yr(), h = l.id ?? q, c = (d) => t ? `${t}-${d}` : void 0, $ = C && !r, D = e ? `${h}-helper-text` : void 0, I = [b].filter((d) => !!d), k = (typeof l.value == "number" ? l.value !== void 0 : (Z = l.value) == null ? void 0 : Z.length) && !l.disabled && !l.readOnly && !f && v && n, V = Ct(null), _r = (d) => { | ||
V.current = d, typeof g == "function" ? g(d) : g && (g.current = d); | ||
}, fr = () => { | ||
var X; | ||
const C = br(), h = l.id ?? C, c = (d) => t ? `${t}-${d}` : void 0, $ = q && !r, B = e ? `${h}-helper-text` : void 0, D = [b].filter((d) => !!d), E = (typeof l.value == "number" ? l.value !== void 0 : (X = l.value) == null ? void 0 : X.length) && !l.disabled && !l.readOnly && !f && v && n, Z = Ct(null), fr = (d) => { | ||
Z.current = d, typeof g == "function" ? g(d) : g && (g.current = d); | ||
}, vr = () => { | ||
var d; | ||
v == null || v(), (d = V.current) == null || d.focus(); | ||
}, B = [ | ||
v == null || v(), (d = Z.current) == null || d.focus(); | ||
}, I = [ | ||
f && /* @__PURE__ */ p( | ||
Ot, | ||
Nt, | ||
{ | ||
@@ -914,7 +914,7 @@ disabled: l.disabled, | ||
), | ||
k && /* @__PURE__ */ p( | ||
E && /* @__PURE__ */ p( | ||
tr, | ||
{ | ||
variant: "tertiary-purple", | ||
onClick: fr, | ||
onClick: vr, | ||
iconOnly: !0, | ||
@@ -936,9 +936,9 @@ "aria-label": n ?? "", | ||
) | ||
].filter((d) => !!d), vr = _([ | ||
].filter((d) => !!d), mr = _([ | ||
`${s}__input-container`, | ||
{ | ||
[`${s}__input-container--start-adornment`]: I.length, | ||
[`${s}__input-container--end-adornment`]: B.length || o, | ||
[`${s}__input-container--start-adornment`]: D.length, | ||
[`${s}__input-container--end-adornment`]: I.length || o, | ||
[`${s}__input-container--disabled`]: l.disabled, | ||
[`${s}__input-container--has-clear-button`]: k, | ||
[`${s}__input-container--has-clear-button`]: E, | ||
[`${s}__input-container--readonly`]: l.readOnly && !l.disabled | ||
@@ -949,3 +949,3 @@ } | ||
u && /* @__PURE__ */ p( | ||
bt, | ||
ht, | ||
{ | ||
@@ -960,4 +960,4 @@ htmlFor: h, | ||
/* @__PURE__ */ x("div", { className: _(`${s}__field-row`), children: [ | ||
/* @__PURE__ */ x("div", { className: vr, children: [ | ||
!!I.length && /* @__PURE__ */ p( | ||
/* @__PURE__ */ x("div", { className: mr, children: [ | ||
!!D.length && /* @__PURE__ */ p( | ||
"div", | ||
@@ -967,3 +967,3 @@ { | ||
className: _(`${s}__adornment-container`), | ||
children: I | ||
children: D | ||
} | ||
@@ -976,5 +976,5 @@ ), | ||
id: h, | ||
ref: _r, | ||
ref: fr, | ||
"data-testid": c("input"), | ||
"aria-describedby": l["aria-describedby"] || D, | ||
"aria-describedby": l["aria-describedby"] || B, | ||
"aria-invalid": l["aria-invalid"] || !!r, | ||
@@ -991,3 +991,3 @@ className: _([ | ||
/* @__PURE__ */ p("div", { className: _(`${s}__frame`) }), | ||
(!!B.length || o) && /* @__PURE__ */ x( | ||
(!!I.length || o) && /* @__PURE__ */ x( | ||
"div", | ||
@@ -998,3 +998,3 @@ { | ||
children: [ | ||
B, | ||
I, | ||
o | ||
@@ -1007,10 +1007,12 @@ ] | ||
] }), | ||
D && /* @__PURE__ */ p(Jr, { "data-testid": c("helper-text"), id: D, children: e }), | ||
r && /* @__PURE__ */ p(Tr, { "data-testid": c("error-text"), children: r }) | ||
B && /* @__PURE__ */ p(Jr, { "data-testid": c("helper-text"), id: B, children: e }), | ||
r && /* @__PURE__ */ p(Hr, { "data-testid": c("error-text"), children: r }) | ||
] }); | ||
}, Dt = y(qt); | ||
Dt.displayName = "TextField"; | ||
}, _r = y(Bt); | ||
_r.displayName = "TextField"; | ||
const Pt = (t) => z(t) && t.type.displayName === _r.displayName; | ||
export { | ||
Dt as TextField | ||
_r as TextField, | ||
Pt as isTextField | ||
}; | ||
//# sourceMappingURL=text-field.es.js.map |
{ | ||
"name": "@purpurds/text-field", | ||
"version": "5.10.1", | ||
"version": "5.11.0", | ||
"license": "AGPL-3.0-only", | ||
@@ -18,9 +18,9 @@ "main": "./dist/text-field.cjs.js", | ||
"classnames": "~2.5.0", | ||
"@purpurds/field-error-text": "5.10.1", | ||
"@purpurds/button": "5.10.1", | ||
"@purpurds/field-helper-text": "5.10.1", | ||
"@purpurds/icon": "5.10.1", | ||
"@purpurds/label": "5.10.1", | ||
"@purpurds/spinner": "5.10.1", | ||
"@purpurds/tokens": "5.10.1" | ||
"@purpurds/field-error-text": "5.11.0", | ||
"@purpurds/field-helper-text": "5.11.0", | ||
"@purpurds/button": "5.11.0", | ||
"@purpurds/icon": "5.11.0", | ||
"@purpurds/label": "5.11.0", | ||
"@purpurds/spinner": "5.11.0", | ||
"@purpurds/tokens": "5.11.0" | ||
}, | ||
@@ -27,0 +27,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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1065878
1713
+ Added@purpurds/action@5.11.0(transitive)
+ Added@purpurds/button@5.11.0(transitive)
+ Added@purpurds/field-error-text@5.11.0(transitive)
+ Added@purpurds/field-helper-text@5.11.0(transitive)
+ Added@purpurds/icon@5.11.0(transitive)
+ Added@purpurds/label@5.11.0(transitive)
+ Added@purpurds/paragraph@5.11.0(transitive)
+ Added@purpurds/spinner@5.11.0(transitive)
+ Added@purpurds/tokens@5.11.0(transitive)
- Removed@purpurds/action@5.10.1(transitive)
- Removed@purpurds/button@5.10.1(transitive)
- Removed@purpurds/field-error-text@5.10.1(transitive)
- Removed@purpurds/field-helper-text@5.10.1(transitive)
- Removed@purpurds/icon@5.10.1(transitive)
- Removed@purpurds/label@5.10.1(transitive)
- Removed@purpurds/paragraph@5.10.1(transitive)
- Removed@purpurds/spinner@5.10.1(transitive)
- Removed@purpurds/tokens@5.10.1(transitive)
Updated@purpurds/button@5.11.0
Updated@purpurds/icon@5.11.0
Updated@purpurds/label@5.11.0
Updated@purpurds/spinner@5.11.0
Updated@purpurds/tokens@5.11.0