@youversion/design-system-components 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -1,4 +1,4 @@
1
- (function(y,c){typeof exports=="object"&&typeof module<"u"?c(exports,require("clsx"),require("react")):typeof define=="function"&&define.amd?define(["exports","clsx","react"],c):(y=typeof globalThis<"u"?globalThis:y||self,c(y["design-system-components"]={},y.clsx,y.React))})(this,function(y,c,x){"use strict";const re=a=>{if(a){if(typeof a!="string"&&a)return c(a.lightMode,a.darkMode);if(typeof a=="string")return a}},pe=a=>{if(a){if(typeof a!="string"&&a)return c(a.block,a.blockEnd,a.blockStart,a.inline,a.inlineEnd,a.inlineStart);if(typeof a=="string")return a}},ot=({background:a,borderColor:s,borderRadius:u,borderWidth:d,className:v,component:w="div",color:R,elevation:k=0,height:g,margin:_,padding:p,width:S,...P},I)=>{const C={0:"",1:"shadow-light-1 dark:shadow-dark-1",2:"shadow-light-2 dark:shadow-dark-2",4:"shadow-light-4 dark:shadow-dark-4",8:"shadow-light-8 dark:shadow-dark-8",12:"shadow-light-12 dark:shadow-dark-12"},U=re(R),B=re(a),j=re(s),m=pe(p),q=pe(_),A=c(u,d,C[k],q,m,U,B,j,S,g,v);return x.createElement(w,{className:A,...P,ref:I})},ae=x.forwardRef(ot);ae.displayName="Box";var H={},it={get exports(){return H},set exports(a){H=a}},Y={};/**
1
+ (function(v,c){typeof exports=="object"&&typeof module<"u"?c(exports,require("clsx"),require("react")):typeof define=="function"&&define.amd?define(["exports","clsx","react"],c):(v=typeof globalThis<"u"?globalThis:v||self,c(v["design-system-components"]={},v.clsx,v.React))})(this,function(v,c,b){"use strict";const ne=a=>{if(a){if(typeof a!="string"&&a)return c(a.lightMode,a.darkMode);if(typeof a=="string")return a}},he=a=>{if(a){if(typeof a!="string"&&a)return c(a.block,a.blockEnd,a.blockStart,a.inline,a.inlineEnd,a.inlineStart);if(typeof a=="string")return a}},lt=({background:a,borderColor:s,borderRadius:u,borderWidth:i,className:p,component:C="div",color:y,elevation:h=0,height:f,margin:x,padding:m,width:R,...P},F)=>{const S={0:"",1:"shadow-light-1 dark:shadow-dark-1",2:"shadow-light-2 dark:shadow-dark-2",4:"shadow-light-4 dark:shadow-dark-4",8:"shadow-light-8 dark:shadow-dark-8",12:"shadow-light-12 dark:shadow-dark-12"},q=ne(y),D=ne(a),j=ne(s),E=he(m),J=he(x),W=c(u,i,S[h],J,E,q,D,j,R,f,p);return b.createElement(C,{className:W,...P,ref:F})},ie=b.forwardRef(lt);ie.displayName="Box";var K={},ut={get exports(){return K},set exports(a){K=a}},Y={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.min.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var ve;function st(){if(ve)return Y;ve=1;var a=x,s=Symbol.for("react.element"),u=Symbol.for("react.fragment"),d=Object.prototype.hasOwnProperty,v=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,w={key:!0,ref:!0,__self:!0,__source:!0};function R(k,g,_){var p,S={},P=null,I=null;_!==void 0&&(P=""+_),g.key!==void 0&&(P=""+g.key),g.ref!==void 0&&(I=g.ref);for(p in g)d.call(g,p)&&!w.hasOwnProperty(p)&&(S[p]=g[p]);if(k&&k.defaultProps)for(p in g=k.defaultProps,g)S[p]===void 0&&(S[p]=g[p]);return{$$typeof:s,type:k,key:P,ref:I,props:S,_owner:v.current}}return Y.Fragment=u,Y.jsx=R,Y.jsxs=R,Y}var M={};/**
9
+ */var xe;function dt(){if(xe)return Y;xe=1;var a=b,s=Symbol.for("react.element"),u=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,p=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,C={key:!0,ref:!0,__self:!0,__source:!0};function y(h,f,x){var m,R={},P=null,F=null;x!==void 0&&(P=""+x),f.key!==void 0&&(P=""+f.key),f.ref!==void 0&&(F=f.ref);for(m in f)i.call(f,m)&&!C.hasOwnProperty(m)&&(R[m]=f[m]);if(h&&h.defaultProps)for(m in f=h.defaultProps,f)R[m]===void 0&&(R[m]=f[m]);return{$$typeof:s,type:h,key:P,ref:F,props:R,_owner:p.current}}return Y.Fragment=u,Y.jsx=y,Y.jsxs=y,Y}var M={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,14 +14,14 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var be;function lt(){return be||(be=1,process.env.NODE_ENV!=="production"&&function(){var a=x,s=Symbol.for("react.element"),u=Symbol.for("react.portal"),d=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),R=Symbol.for("react.provider"),k=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),_=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),S=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),I=Symbol.for("react.offscreen"),C=Symbol.iterator,U="@@iterator";function B(e){if(e===null||typeof e!="object")return null;var t=C&&e[C]||e[U];return typeof t=="function"?t:null}var j=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function m(e){{for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];q("error",e,r)}}function q(e,t,r){{var n=j.ReactDebugCurrentFrame,l=n.getStackAddendum();l!==""&&(t+="%s",r=r.concat([l]));var f=r.map(function(i){return String(i)});f.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,f)}}var A=!1,oe=!1,V=!1,X=!1,xt=!1,De;De=Symbol.for("react.module.reference");function kt(e){return!!(typeof e=="string"||typeof e=="function"||e===d||e===w||xt||e===v||e===_||e===p||X||e===I||A||oe||V||typeof e=="object"&&e!==null&&(e.$$typeof===P||e.$$typeof===S||e.$$typeof===R||e.$$typeof===k||e.$$typeof===g||e.$$typeof===De||e.getModuleId!==void 0))}function Et(e,t,r){var n=e.displayName;if(n)return n;var l=t.displayName||t.name||"";return l!==""?r+"("+l+")":r}function Le(e){return e.displayName||"Context"}function N(e){if(e==null)return null;if(typeof e.tag=="number"&&m("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case d:return"Fragment";case u:return"Portal";case w:return"Profiler";case v:return"StrictMode";case _:return"Suspense";case p:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case k:var t=e;return Le(t)+".Consumer";case R:var r=e;return Le(r._context)+".Provider";case g:return Et(e,e.render,"ForwardRef");case S:var n=e.displayName||null;return n!==null?n:N(e.type)||"Memo";case P:{var l=e,f=l._payload,i=l._init;try{return N(i(f))}catch{return null}}}return null}var D=Object.assign,J=0,Be,Ae,Ve,We,$e,Ye,Me;function Ue(){}Ue.__reactDisabledLog=!0;function wt(){{if(J===0){Be=console.log,Ae=console.info,Ve=console.warn,We=console.error,$e=console.group,Ye=console.groupCollapsed,Me=console.groupEnd;var e={configurable:!0,enumerable:!0,value:Ue,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}J++}}function _t(){{if(J--,J===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:D({},e,{value:Be}),info:D({},e,{value:Ae}),warn:D({},e,{value:Ve}),error:D({},e,{value:We}),group:D({},e,{value:$e}),groupCollapsed:D({},e,{value:Ye}),groupEnd:D({},e,{value:Me})})}J<0&&m("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ie=j.ReactCurrentDispatcher,se;function Z(e,t,r){{if(se===void 0)try{throw Error()}catch(l){var n=l.stack.trim().match(/\n( *(at )?)/);se=n&&n[1]||""}return`
18
- `+se+e}}var le=!1,Q;{var Rt=typeof WeakMap=="function"?WeakMap:Map;Q=new Rt}function qe(e,t){if(!e||le)return"";{var r=Q.get(e);if(r!==void 0)return r}var n;le=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var f;f=ie.current,ie.current=null,wt();try{if(t){var i=function(){throw Error()};if(Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(i,[])}catch(F){n=F}Reflect.construct(e,[],i)}else{try{i.call()}catch(F){n=F}e.call(i.prototype)}}else{try{throw Error()}catch(F){n=F}e()}}catch(F){if(F&&n&&typeof F.stack=="string"){for(var o=F.stack.split(`
17
+ */var ke;function ft(){return ke||(ke=1,process.env.NODE_ENV!=="production"&&function(){var a=b,s=Symbol.for("react.element"),u=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),p=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),y=Symbol.for("react.provider"),h=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),m=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),F=Symbol.for("react.offscreen"),S=Symbol.iterator,q="@@iterator";function D(e){if(e===null||typeof e!="object")return null;var t=S&&e[S]||e[q];return typeof t=="function"?t:null}var j=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function E(e){{for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];J("error",e,r)}}function J(e,t,r){{var n=j.ReactDebugCurrentFrame,d=n.getStackAddendum();d!==""&&(t+="%s",r=r.concat([d]));var g=r.map(function(l){return String(l)});g.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,g)}}var W=!1,de=!1,V=!1,Z=!1,_t=!1,We;We=Symbol.for("react.module.reference");function Ct(e){return!!(typeof e=="string"||typeof e=="function"||e===i||e===C||_t||e===p||e===x||e===m||Z||e===F||W||de||V||typeof e=="object"&&e!==null&&(e.$$typeof===P||e.$$typeof===R||e.$$typeof===y||e.$$typeof===h||e.$$typeof===f||e.$$typeof===We||e.getModuleId!==void 0))}function Rt(e,t,r){var n=e.displayName;if(n)return n;var d=t.displayName||t.name||"";return d!==""?r+"("+d+")":r}function Ve(e){return e.displayName||"Context"}function N(e){if(e==null)return null;if(typeof e.tag=="number"&&E("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case i:return"Fragment";case u:return"Portal";case C:return"Profiler";case p:return"StrictMode";case x:return"Suspense";case m:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case h:var t=e;return Ve(t)+".Consumer";case y:var r=e;return Ve(r._context)+".Provider";case f:return Rt(e,e.render,"ForwardRef");case R:var n=e.displayName||null;return n!==null?n:N(e.type)||"Memo";case P:{var d=e,g=d._payload,l=d._init;try{return N(l(g))}catch{return null}}}return null}var I=Object.assign,G=0,Ae,$e,Ye,Me,Ue,qe,Je;function Ge(){}Ge.__reactDisabledLog=!0;function St(){{if(G===0){Ae=console.log,$e=console.info,Ye=console.warn,Me=console.error,Ue=console.group,qe=console.groupCollapsed,Je=console.groupEnd;var e={configurable:!0,enumerable:!0,value:Ge,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}G++}}function Tt(){{if(G--,G===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:I({},e,{value:Ae}),info:I({},e,{value:$e}),warn:I({},e,{value:Ye}),error:I({},e,{value:Me}),group:I({},e,{value:Ue}),groupCollapsed:I({},e,{value:qe}),groupEnd:I({},e,{value:Je})})}G<0&&E("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var fe=j.ReactCurrentDispatcher,ce;function Q(e,t,r){{if(ce===void 0)try{throw Error()}catch(d){var n=d.stack.trim().match(/\n( *(at )?)/);ce=n&&n[1]||""}return`
18
+ `+ce+e}}var pe=!1,ee;{var Ot=typeof WeakMap=="function"?WeakMap:Map;ee=new Ot}function He(e,t){if(!e||pe)return"";{var r=ee.get(e);if(r!==void 0)return r}var n;pe=!0;var d=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var g;g=fe.current,fe.current=null,St();try{if(t){var l=function(){throw Error()};if(Object.defineProperty(l.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(l,[])}catch(B){n=B}Reflect.construct(e,[],l)}else{try{l.call()}catch(B){n=B}e.call(l.prototype)}}else{try{throw Error()}catch(B){n=B}e()}}catch(B){if(B&&n&&typeof B.stack=="string"){for(var o=B.stack.split(`
19
19
  `),T=n.stack.split(`
20
- `),b=o.length-1,h=T.length-1;b>=1&&h>=0&&o[b]!==T[h];)h--;for(;b>=1&&h>=0;b--,h--)if(o[b]!==T[h]){if(b!==1||h!==1)do if(b--,h--,h<0||o[b]!==T[h]){var O=`
21
- `+o[b].replace(" at new "," at ");return e.displayName&&O.includes("<anonymous>")&&(O=O.replace("<anonymous>",e.displayName)),typeof e=="function"&&Q.set(e,O),O}while(b>=1&&h>=0);break}}}finally{le=!1,ie.current=f,_t(),Error.prepareStackTrace=l}var $=e?e.displayName||e.name:"",nt=$?Z($):"";return typeof e=="function"&&Q.set(e,nt),nt}function Ct(e,t,r){return qe(e,!1)}function Tt(e){var t=e.prototype;return!!(t&&t.isReactComponent)}function z(e,t,r){if(e==null)return"";if(typeof e=="function")return qe(e,Tt(e));if(typeof e=="string")return Z(e);switch(e){case _:return Z("Suspense");case p:return Z("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case g:return Ct(e.render);case S:return z(e.type,t,r);case P:{var n=e,l=n._payload,f=n._init;try{return z(f(l),t,r)}catch{}}}return""}var ee=Object.prototype.hasOwnProperty,Je={},Ge=j.ReactDebugCurrentFrame;function te(e){if(e){var t=e._owner,r=z(e.type,e._source,t?t.type:null);Ge.setExtraStackFrame(r)}else Ge.setExtraStackFrame(null)}function St(e,t,r,n,l){{var f=Function.call.bind(ee);for(var i in e)if(f(e,i)){var o=void 0;try{if(typeof e[i]!="function"){var T=Error((n||"React class")+": "+r+" type `"+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[i]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw T.name="Invariant Violation",T}o=e[i](t,i,n,r,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(b){o=b}o&&!(o instanceof Error)&&(te(l),m("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",n||"React class",r,i,typeof o),te(null)),o instanceof Error&&!(o.message in Je)&&(Je[o.message]=!0,te(l),m("Failed %s type: %s",r,o.message),te(null))}}}var Ot=Array.isArray;function ue(e){return Ot(e)}function Pt(e){{var t=typeof Symbol=="function"&&Symbol.toStringTag,r=t&&e[Symbol.toStringTag]||e.constructor.name||"Object";return r}}function jt(e){try{return He(e),!1}catch{return!0}}function He(e){return""+e}function Ke(e){if(jt(e))return m("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Pt(e)),He(e)}var G=j.ReactCurrentOwner,Nt={key:!0,ref:!0,__self:!0,__source:!0},Xe,Ze,de;de={};function Ft(e){if(ee.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return e.ref!==void 0}function It(e){if(ee.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return e.key!==void 0}function Dt(e,t){if(typeof e.ref=="string"&&G.current&&t&&G.current.stateNode!==t){var r=N(G.current.type);de[r]||(m('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',N(G.current.type),e.ref),de[r]=!0)}}function Lt(e,t){{var r=function(){Xe||(Xe=!0,m("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};r.isReactWarning=!0,Object.defineProperty(e,"key",{get:r,configurable:!0})}}function Bt(e,t){{var r=function(){Ze||(Ze=!0,m("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};r.isReactWarning=!0,Object.defineProperty(e,"ref",{get:r,configurable:!0})}}var At=function(e,t,r,n,l,f,i){var o={$$typeof:s,type:e,key:t,ref:r,props:i,_owner:f};return o._store={},Object.defineProperty(o._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(o,"_self",{configurable:!1,enumerable:!1,writable:!1,value:n}),Object.defineProperty(o,"_source",{configurable:!1,enumerable:!1,writable:!1,value:l}),Object.freeze&&(Object.freeze(o.props),Object.freeze(o)),o};function Vt(e,t,r,n,l){{var f,i={},o=null,T=null;r!==void 0&&(Ke(r),o=""+r),It(t)&&(Ke(t.key),o=""+t.key),Ft(t)&&(T=t.ref,Dt(t,l));for(f in t)ee.call(t,f)&&!Nt.hasOwnProperty(f)&&(i[f]=t[f]);if(e&&e.defaultProps){var b=e.defaultProps;for(f in b)i[f]===void 0&&(i[f]=b[f])}if(o||T){var h=typeof e=="function"?e.displayName||e.name||"Unknown":e;o&&Lt(i,h),T&&Bt(i,h)}return At(e,o,T,l,n,G.current,i)}}var fe=j.ReactCurrentOwner,Qe=j.ReactDebugCurrentFrame;function W(e){if(e){var t=e._owner,r=z(e.type,e._source,t?t.type:null);Qe.setExtraStackFrame(r)}else Qe.setExtraStackFrame(null)}var ce;ce=!1;function ge(e){return typeof e=="object"&&e!==null&&e.$$typeof===s}function ze(){{if(fe.current){var e=N(fe.current.type);if(e)return`
20
+ `),k=o.length-1,_=T.length-1;k>=1&&_>=0&&o[k]!==T[_];)_--;for(;k>=1&&_>=0;k--,_--)if(o[k]!==T[_]){if(k!==1||_!==1)do if(k--,_--,_<0||o[k]!==T[_]){var O=`
21
+ `+o[k].replace(" at new "," at ");return e.displayName&&O.includes("<anonymous>")&&(O=O.replace("<anonymous>",e.displayName)),typeof e=="function"&&ee.set(e,O),O}while(k>=1&&_>=0);break}}}finally{pe=!1,fe.current=g,Tt(),Error.prepareStackTrace=d}var $=e?e.displayName||e.name:"",st=$?Q($):"";return typeof e=="function"&&ee.set(e,st),st}function Pt(e,t,r){return He(e,!1)}function jt(e){var t=e.prototype;return!!(t&&t.isReactComponent)}function te(e,t,r){if(e==null)return"";if(typeof e=="function")return He(e,jt(e));if(typeof e=="string")return Q(e);switch(e){case x:return Q("Suspense");case m:return Q("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case f:return Pt(e.render);case R:return te(e.type,t,r);case P:{var n=e,d=n._payload,g=n._init;try{return te(g(d),t,r)}catch{}}}return""}var re=Object.prototype.hasOwnProperty,Ke={},ze=j.ReactDebugCurrentFrame;function ae(e){if(e){var t=e._owner,r=te(e.type,e._source,t?t.type:null);ze.setExtraStackFrame(r)}else ze.setExtraStackFrame(null)}function Nt(e,t,r,n,d){{var g=Function.call.bind(re);for(var l in e)if(g(e,l)){var o=void 0;try{if(typeof e[l]!="function"){var T=Error((n||"React class")+": "+r+" type `"+l+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[l]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw T.name="Invariant Violation",T}o=e[l](t,l,n,r,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(k){o=k}o&&!(o instanceof Error)&&(ae(d),E("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",n||"React class",r,l,typeof o),ae(null)),o instanceof Error&&!(o.message in Ke)&&(Ke[o.message]=!0,ae(d),E("Failed %s type: %s",r,o.message),ae(null))}}}var Bt=Array.isArray;function ge(e){return Bt(e)}function Lt(e){{var t=typeof Symbol=="function"&&Symbol.toStringTag,r=t&&e[Symbol.toStringTag]||e.constructor.name||"Object";return r}}function Ft(e){try{return Xe(e),!1}catch{return!0}}function Xe(e){return""+e}function Ze(e){if(Ft(e))return E("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Lt(e)),Xe(e)}var H=j.ReactCurrentOwner,It={key:!0,ref:!0,__self:!0,__source:!0},Qe,et,me;me={};function Dt(e){if(re.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return e.ref!==void 0}function Wt(e){if(re.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return e.key!==void 0}function Vt(e,t){if(typeof e.ref=="string"&&H.current&&t&&H.current.stateNode!==t){var r=N(H.current.type);me[r]||(E('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',N(H.current.type),e.ref),me[r]=!0)}}function At(e,t){{var r=function(){Qe||(Qe=!0,E("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};r.isReactWarning=!0,Object.defineProperty(e,"key",{get:r,configurable:!0})}}function $t(e,t){{var r=function(){et||(et=!0,E("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};r.isReactWarning=!0,Object.defineProperty(e,"ref",{get:r,configurable:!0})}}var Yt=function(e,t,r,n,d,g,l){var o={$$typeof:s,type:e,key:t,ref:r,props:l,_owner:g};return o._store={},Object.defineProperty(o._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(o,"_self",{configurable:!1,enumerable:!1,writable:!1,value:n}),Object.defineProperty(o,"_source",{configurable:!1,enumerable:!1,writable:!1,value:d}),Object.freeze&&(Object.freeze(o.props),Object.freeze(o)),o};function Mt(e,t,r,n,d){{var g,l={},o=null,T=null;r!==void 0&&(Ze(r),o=""+r),Wt(t)&&(Ze(t.key),o=""+t.key),Dt(t)&&(T=t.ref,Vt(t,d));for(g in t)re.call(t,g)&&!It.hasOwnProperty(g)&&(l[g]=t[g]);if(e&&e.defaultProps){var k=e.defaultProps;for(g in k)l[g]===void 0&&(l[g]=k[g])}if(o||T){var _=typeof e=="function"?e.displayName||e.name||"Unknown":e;o&&At(l,_),T&&$t(l,_)}return Yt(e,o,T,d,n,H.current,l)}}var ve=j.ReactCurrentOwner,tt=j.ReactDebugCurrentFrame;function A(e){if(e){var t=e._owner,r=te(e.type,e._source,t?t.type:null);tt.setExtraStackFrame(r)}else tt.setExtraStackFrame(null)}var be;be=!1;function ye(e){return typeof e=="object"&&e!==null&&e.$$typeof===s}function rt(){{if(ve.current){var e=N(ve.current.type);if(e)return`
22
22
 
23
- Check the render method of \``+e+"`."}return""}}function Wt(e){{if(e!==void 0){var t=e.fileName.replace(/^.*[\\\/]/,""),r=e.lineNumber;return`
23
+ Check the render method of \``+e+"`."}return""}}function Ut(e){{if(e!==void 0){var t=e.fileName.replace(/^.*[\\\/]/,""),r=e.lineNumber;return`
24
24
 
25
- Check your code at `+t+":"+r+"."}return""}}var et={};function $t(e){{var t=ze();if(!t){var r=typeof e=="string"?e:e.displayName||e.name;r&&(t=`
25
+ Check your code at `+t+":"+r+"."}return""}}var at={};function qt(e){{var t=rt();if(!t){var r=typeof e=="string"?e:e.displayName||e.name;r&&(t=`
26
26
 
27
- Check the top-level render call using <`+r+">.")}return t}}function tt(e,t){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var r=$t(t);if(et[r])return;et[r]=!0;var n="";e&&e._owner&&e._owner!==fe.current&&(n=" It was passed a child from "+N(e._owner.type)+"."),W(e),m('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',r,n),W(null)}}function rt(e,t){{if(typeof e!="object")return;if(ue(e))for(var r=0;r<e.length;r++){var n=e[r];ge(n)&&tt(n,t)}else if(ge(e))e._store&&(e._store.validated=!0);else if(e){var l=B(e);if(typeof l=="function"&&l!==e.entries)for(var f=l.call(e),i;!(i=f.next()).done;)ge(i.value)&&tt(i.value,t)}}}function Yt(e){{var t=e.type;if(t==null||typeof t=="string")return;var r;if(typeof t=="function")r=t.propTypes;else if(typeof t=="object"&&(t.$$typeof===g||t.$$typeof===S))r=t.propTypes;else return;if(r){var n=N(t);St(r,e.props,"prop",n,e)}else if(t.PropTypes!==void 0&&!ce){ce=!0;var l=N(t);m("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",l||"Unknown")}typeof t.getDefaultProps=="function"&&!t.getDefaultProps.isReactClassApproved&&m("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Mt(e){{for(var t=Object.keys(e.props),r=0;r<t.length;r++){var n=t[r];if(n!=="children"&&n!=="key"){W(e),m("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),W(null);break}}e.ref!==null&&(W(e),m("Invalid attribute `ref` supplied to `React.Fragment`."),W(null))}}function at(e,t,r,n,l,f){{var i=kt(e);if(!i){var o="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(o+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var T=Wt(l);T?o+=T:o+=ze();var b;e===null?b="null":ue(e)?b="array":e!==void 0&&e.$$typeof===s?(b="<"+(N(e.type)||"Unknown")+" />",o=" Did you accidentally export a JSX literal instead of a component?"):b=typeof e,m("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",b,o)}var h=Vt(e,t,r,l,f);if(h==null)return h;if(i){var O=t.children;if(O!==void 0)if(n)if(ue(O)){for(var $=0;$<O.length;$++)rt(O[$],e);Object.freeze&&Object.freeze(O)}else m("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else rt(O,e)}return e===d?Mt(h):Yt(h),h}}function Ut(e,t,r){return at(e,t,r,!0)}function qt(e,t,r){return at(e,t,r,!1)}var Jt=qt,Gt=Ut;M.Fragment=d,M.jsx=Jt,M.jsxs=Gt}()),M}(function(a){process.env.NODE_ENV==="production"?a.exports=st():a.exports=lt()})(it);const E=H.jsx,L=H.jsxs,me={lg:"rounded-4 text-19 px-4 py-2",md:"rounded-3 text-xs px-3 py-1.5",sm:"rounded-3 text-13 px-3 py-1.5",xl:"rounded-4 text-23 px-4 py-2",xs:"rounded-3 text-11 px-2 py-1"},he={lg:30,md:24,sm:18,xl:36,xs:12},ye={all_caps:"bg-transparent text-gray-50 dark:text-white hover:text-info-light dark:hover:text-info-dark active:text-blue-40 dark:active:text-blue-20 disabled:opacity-50 disabled:text-gray-50 dark:disabled:text-white uppercase",borderless:"bg-transparent text-gray-50 dark:text-white hover:bg-gray-10 dark:hover:bg-gray-40 disabled:opacity-50 dark:disabled:bg-transparent",brand:"bg-yv-red dark:bg-yv-red-dark text-white disabled:opacity-50 disabled:bg-gray-10 dark:disabled:bg-gray-40 disabled:text-gray-50 dark:disabled:text-white",primary:"bg-gray-50 dark:bg-gray-10 text-white dark:text-gray-50 hover:bg-gray-40 active:bg-gray-50 disabled:opacity-50 disabled:bg-gray-10 dark:disabled:bg-gray-40 disabled:text-gray-50 dark:disabled:text-white",risk:"bg-orange-30 dark:bg-alert-dark text-white disabled:opacity-50 disabled:bg-gray-10 dark:disabled:bg-gray-40 disabled:text-gray-50 dark:disabled:text-white",secondary:"bg-gray-10 dark:bg-gray-40 text-gray-50 dark:text-white hover:bg-gray-40 dark:hover:bg-gray-10 hover:text-white dark:hover:text-gray-50 active:bg-gray-50 disabled:opacity-50 disabled:bg-gray-10 disabled:text-gray-50",stroked:"bg-transparent outline outline-2 outline-gray-50 dark:outline-white text-gray-50 dark:text-white hover:bg-gray-40 dark:hover:bg-gray-10 hover:text-white dark:hover:text-gray-50 active:bg-gray-50 disabled:opacity-50 disabled:bg-transparent dark:disabled:bg-transparent disabled:text-gray-50 dark:disabled:text-white"},xe=({className:a,children:s,disabled:u,icon:d,iconPosition:v,variant:w="md",theme:R="primary",...k},g)=>{const _=c("items-center leading-default font-bold ease-in-out duration-100 focus:outline-2 focus:outline-info-light dark:focus:outline-info-dark flex w-full max-w-fit",me[w],ye[R],a);return L("button",{...k,className:_,disabled:u,ref:g,children:[E("span",{children:v==="start"&&d!==void 0&&x.createElement(d,{className:"mr-0.5",size:he[w]})}),E("span",{className:"truncate",children:s}),E("span",{children:v==="end"&&d!==void 0&&x.createElement(d,{className:"ml-0.5",size:he[w]})})]})},ke=x.forwardRef(xe);ke.displayName="Button";const ut=({children:a,className:s,disabled:u,...d},v)=>E("button",{className:c(["rounded-full hover:bg-gray-10 dark:hover:bg-gray-40 text-text-light dark:text-white inline-flex justify-center items-center p-1 focus-visible:outline-2 focus-visible:outline focus-visible:outline-info dark:focus-visible:outline-info-dark outline-offset-0 disabled:text-text-muted-light dark:disabled:text-text-muted-dark",s]),disabled:u,ref:v,...d,children:a}),Ee=x.forwardRef(ut);Ee.displayName="IconButton";const dt=({className:a,children:s,component:u="a",...d},v)=>x.createElement(u,{...d,className:c(["rounded-full hover:bg-gray-10 dark:hover:bg-gray-40 text-text-light dark:text-white inline-flex justify-center items-center p-1 focus-visible:outline-2 focus-visible:outline focus-visible:outline-info dark:focus-visible:outline-info-dark outline-offset-0",a]),ref:v},s),we=x.forwardRef(dt);we.displayName="IconLinkButton";const ft=({innerRef:a,forwardedRef:s})=>(x.useEffect(()=>{[a,s].forEach(u=>{u&&(typeof u=="function"?u(a.current||null):u.current=a.current||null)})},[a,s]),a),ct=({className:a,disabled:s,endIcon:u,error:d,hint:v,label:w,name:R,onChange:k,placeholder:g,startIcon:_,value:p,...S},P)=>{const I=x.useRef(null),C=ft({forwardedRef:P,innerRef:I}),[U,B]=x.useState(Boolean(p)),[j,m]=x.useState(!1);x.useEffect(()=>{var V;B(Boolean((V=C==null?void 0:C.current)==null?void 0:V.value)||Boolean(p||g))},[p,g,C]);const q=V=>{var X;B(Boolean((X=C==null?void 0:C.current)==null?void 0:X.value)||Boolean(p||g)),k&&k(V)},A=()=>{s||!C.current||(C.current.focus(),m(!0))},oe=()=>{m(!1)};return L("div",{className:"flex items-start flex-col gap-0.5",children:[L("div",{className:c(["items-center self-stretch rounded-1 border-small border-solid cursor-text flex flex-row relative focus-within:border-transparent focus-within:outline-2 focus-within:outline-info focus-within:outline focus-within:dark:border-transparent focus-within:dark:outline-info-dark",s?"bg-gray-10 dark:bg-gray-40":null,d?"border-alert dark:border-alert-dark":"border-tertiary-light dark:border-tertiary-dark"]),onClick:A,onFocus:A,children:[_?E("div",{className:"text-text-muted-light dark:text-text-muted-dark pis-1.5",children:_}):null,L("span",{className:"relative flex flex-1 overflow-hidden",children:[E("input",{className:c(["self-stretch bg-transparent flex-auto outline-none overflow-hidden pbs-3 pbe-1",_?"pis-1":"pis-2",u?"pie-1":"pie-2",a]),disabled:s,id:R,onBlur:oe,onChange:q,placeholder:g,ref:C,value:p,...S}),E("label",{className:c("items-center text-text-muted-light dark:text-text-muted-dark flex font-regular leading-loose pointer-events-none absolute top-2 select-none",_?"left-1 rtl:right-1":"left-2 rtl:right-2",j||U?"text-13 -translate-y-1.5":"text-16"),htmlFor:R,children:w})]}),u?E("div",{className:"text-text-muted-light dark:text-text-muted-dark pie-1.5",children:u}):null]}),d||v?L("div",{className:"flex flex-col",children:[d?E("span",{className:"text-alert dark:text-alert-dark",children:d}):null,v?E("span",{className:"text-text-muted-light dark:text-text-muted-dark text-13 leading-default",children:v}):null]}):null]})},_e=x.forwardRef(ct);_e.displayName="Input";const gt=({children:a,className:s,...u},d)=>E("ul",{className:c(["w-fit bg-canvas-light dark:bg-canvas-dark shadow-light-8 dark:shadow-dark-8 rounded-1 py-0.5",s]),ref:d,...u,children:a}),Re=x.forwardRef(gt);Re.displayName="List";const pt=({children:a,className:s,divider:u,endIcon:d,onClick:v,startIcon:w,...R},k)=>L("li",{className:c(["flex items-center gap-x-2 px-2 py-2 box-border relative",u?"after:last:content-none after:absolute after:inset-x-0 after:bottom-0 after:mx-2 after:bg-gray-10 after:dark:bg-gray-40 after:h-px":null,v?"cursor-pointer hover:bg-gray-10 hover:dark:bg-gray-40":null,s]),onClick:v,ref:k,...R,children:[w?E("div",{children:w}):null,a,d?E("div",{children:d}):null]}),Ce=x.forwardRef(pt);Ce.displayName="ListItem";const Te={base:"font-bold",xs:"text-16 md:text-19 leading-default",sm:"text-19 md:text-23 leading-default md:leading-comfy",md:"text-23 md:text-28 leading-comfy",lg:"text-28 md:text-33 leading-comfy",xl:"text-33 md:text-40 leading-comfy",xxl:"text-33 md:text-57 leading-comfy"},K={base:"font-medium leading-default",default:"text-16 md:text-19",xs:"text-11",sm:"text-13",md:"text-16",lg:"text-19",xl:"text-23 md:text-28 tracking-tight"},ne={...K,base:"font-regular leading-loose",xl:"text-23 md:text-28"},Se={base:"font-medium leading-default tracking-wider uppercase text-text-muted-light dark:text-text-muted-dark",xs:"text-11",sm:"text-13",md:"text-16",lg:"text-19",xl:"text-23"},Oe={base:"font-regular leading-default text-text-muted-light dark:text-text-muted-dark",sm:"text-11",md:"text-13",lg:"text-16"},Pe={base:"font-bold leading-default",xs:"text-11",sm:"text-13",md:"text-16",lg:"text-19"},je={base:"font-medium leading-default text-text-muted-light dark:text-text-muted-dark",sm:"text-11",md:"text-13",lg:"text-16"},Ne={base:"font-regular leading-loose",md:"text-16",lg:"text-19"},vt=({size:a,variant:s})=>{switch(s){case"headline":return c(Te.base,Te[a]);case"label":return c(K.base,a?K[a]:K.default);case"paragraph":return c(ne.base,a?ne[a]:ne.default);case"eyebrow":return c(Se.base,Se[a]);case"caption":return c(Oe.base,Oe[a]);case"buttonLabel":return c(Pe.base,Pe[a]);case"fieldLabel":return c(je.base,je[a]);case"fieldTextInput":return c(Ne.base,Ne[a]);default:return a}},bt={primary:"font-aktiv-grotesk",secondary:"font-untitled-serif"},mt=({className:a,component:s="p",children:u,font:d="primary",size:v,variant:w,...R},k)=>{const g="text-text-light dark:text-text-dark",_=bt[d],p=vt({size:v,variant:w});return E(ae,{className:c(g,p,_,a),component:s,ref:k,...R,children:u})},Fe=x.forwardRef(mt);Fe.displayName="Text";const ht=({children:a,className:s,size:u="sm"})=>E(Fe,{className:c(["flex-grow",s]),size:u,variant:"label",children:a}),Ie={tooltipWrapper:"_tooltipWrapper_qu88w_1",tooltipContent:"_tooltipContent_qu88w_18"},yt=({content:a,className:s,...u})=>E("div",{className:c(Ie.tooltipWrapper,s),...u,children:E("span",{className:Ie.tooltipContent,children:a})});y.Box=ae,y.Button=ke,y.ButtonComponent=xe,y.IconButton=Ee,y.IconLinkButton=we,y.Input=_e,y.List=Re,y.ListItem=Ce,y.ListItemText=ht,y.Tooltip=yt,y.themeClasses=ye,y.variantClasses=me,Object.defineProperty(y,Symbol.toStringTag,{value:"Module"})});
27
+ Check the top-level render call using <`+r+">.")}return t}}function nt(e,t){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var r=qt(t);if(at[r])return;at[r]=!0;var n="";e&&e._owner&&e._owner!==ve.current&&(n=" It was passed a child from "+N(e._owner.type)+"."),A(e),E('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',r,n),A(null)}}function it(e,t){{if(typeof e!="object")return;if(ge(e))for(var r=0;r<e.length;r++){var n=e[r];ye(n)&&nt(n,t)}else if(ye(e))e._store&&(e._store.validated=!0);else if(e){var d=D(e);if(typeof d=="function"&&d!==e.entries)for(var g=d.call(e),l;!(l=g.next()).done;)ye(l.value)&&nt(l.value,t)}}}function Jt(e){{var t=e.type;if(t==null||typeof t=="string")return;var r;if(typeof t=="function")r=t.propTypes;else if(typeof t=="object"&&(t.$$typeof===f||t.$$typeof===R))r=t.propTypes;else return;if(r){var n=N(t);Nt(r,e.props,"prop",n,e)}else if(t.PropTypes!==void 0&&!be){be=!0;var d=N(t);E("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",d||"Unknown")}typeof t.getDefaultProps=="function"&&!t.getDefaultProps.isReactClassApproved&&E("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Gt(e){{for(var t=Object.keys(e.props),r=0;r<t.length;r++){var n=t[r];if(n!=="children"&&n!=="key"){A(e),E("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),A(null);break}}e.ref!==null&&(A(e),E("Invalid attribute `ref` supplied to `React.Fragment`."),A(null))}}function ot(e,t,r,n,d,g){{var l=Ct(e);if(!l){var o="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(o+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var T=Ut(d);T?o+=T:o+=rt();var k;e===null?k="null":ge(e)?k="array":e!==void 0&&e.$$typeof===s?(k="<"+(N(e.type)||"Unknown")+" />",o=" Did you accidentally export a JSX literal instead of a component?"):k=typeof e,E("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",k,o)}var _=Mt(e,t,r,d,g);if(_==null)return _;if(l){var O=t.children;if(O!==void 0)if(n)if(ge(O)){for(var $=0;$<O.length;$++)it(O[$],e);Object.freeze&&Object.freeze(O)}else E("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else it(O,e)}return e===i?Gt(_):Jt(_),_}}function Ht(e,t,r){return ot(e,t,r,!0)}function Kt(e,t,r){return ot(e,t,r,!1)}var zt=Kt,Xt=Ht;M.Fragment=i,M.jsx=zt,M.jsxs=Xt}()),M}(function(a){process.env.NODE_ENV==="production"?a.exports=dt():a.exports=ft()})(ut);const w=K.jsx,L=K.jsxs,ct={lg:"lg",md:"md",sm:"sm",xl:"xl",xs:"xs"},oe=a=>{switch(a){case"start":return{lg:"rounded-4 text-19 pis-[20px] pie-4 py-2",md:"rounded-3 text-xs pis-2 pie-3 py-1.5",sm:"rounded-3 text-13 pis-1.5 pie-3 py-1.5",xl:"rounded-4 text-23 pis-3 pie-4 py-2",xs:"rounded-3 text-11 pis-1 pie-2 py-1"};case"end":return{lg:"rounded-4 text-19 pie-[20px] pis-4 py-2",md:"rounded-3 text-xs pie-2 pis-3 py-1.5",sm:"rounded-3 text-13 pie-1.5 pis-3 py-1.5",xl:"rounded-4 text-23 pie-3 pis-4 py-2",xs:"rounded-3 text-11 pie-1 pis-2 py-1"};default:return{lg:"rounded-4 text-19 px-4 py-2",md:"rounded-3 text-xs px-3 py-1.5",sm:"rounded-3 text-13 px-3 py-1.5",xl:"rounded-4 text-23 px-4 py-2",xs:"rounded-3 text-11 px-2 py-1"}}},U={lg:30,md:24,sm:18,xl:36,xs:12},se="items-center leading-default font-bold ease-in-out duration-100 focus:outline-2 focus:outline-info-light dark:focus:outline-info-dark flex w-full max-w-fit",le={all_caps:"bg-transparent text-gray-50 dark:text-white hover:text-info-light dark:hover:text-info-dark active:text-blue-40 dark:active:text-blue-20 disabled:opacity-50 disabled:text-gray-50 dark:disabled:text-white uppercase",borderless:"bg-transparent text-gray-50 dark:text-white hover:bg-gray-10 dark:hover:bg-gray-40 disabled:opacity-50 dark:disabled:bg-transparent",brand:"bg-yv-red dark:bg-yv-red-dark text-white disabled:opacity-50 disabled:bg-gray-10 dark:disabled:bg-gray-40 disabled:text-gray-50 dark:disabled:text-white",primary:"bg-gray-50 dark:bg-gray-10 text-white dark:text-gray-50 hover:bg-gray-40 active:bg-gray-50 disabled:opacity-50 disabled:bg-gray-10 dark:disabled:bg-gray-40 disabled:text-gray-50 dark:disabled:text-white",risk:"bg-orange-30 dark:bg-alert-dark text-white disabled:opacity-50 disabled:bg-gray-10 dark:disabled:bg-gray-40 disabled:text-gray-50 dark:disabled:text-white",secondary:"bg-gray-10 dark:bg-gray-40 text-gray-50 dark:text-white hover:bg-gray-40 dark:hover:bg-gray-10 hover:text-white dark:hover:text-gray-50 active:bg-gray-50 disabled:opacity-50 disabled:bg-gray-10 disabled:text-gray-50",stroked:"bg-transparent outline outline-2 outline-gray-50 dark:outline-white text-gray-50 dark:text-white hover:bg-gray-40 dark:hover:bg-gray-10 hover:text-white dark:hover:text-gray-50 active:bg-gray-50 disabled:opacity-50 disabled:bg-transparent dark:disabled:bg-transparent disabled:text-gray-50 dark:disabled:text-white"},we=({className:a,children:s,disabled:u,icon:i,iconPosition:p,size:C="md",variant:y="primary",...h},f)=>{const x=oe(i!==void 0?p:void 0),m=c(se,le[y],x[C],a);return L("button",{...h,className:m,disabled:u,ref:f,children:[p==="start"&&i!==void 0?b.createElement(i,{className:"mr-0.5 min-w-min",size:U[C]}):null,w("span",{className:"truncate",children:s}),p==="end"&&i!==void 0?b.createElement(i,{className:"ml-0.5 min-w-min",size:U[C]}):null]})},Ee=b.forwardRef(we);Ee.displayName="Button";const pt=({children:a,className:s,disabled:u,...i},p)=>w("button",{className:c(["rounded-full hover:bg-gray-10 dark:hover:bg-gray-40 text-text-light dark:text-white inline-flex justify-center items-center p-1 focus-visible:outline-2 focus-visible:outline focus-visible:outline-info dark:focus-visible:outline-info-dark outline-offset-0 disabled:text-text-muted-light dark:disabled:text-text-muted-dark",s]),disabled:u,ref:p,...i,children:a}),z=b.forwardRef(pt);z.displayName="IconButton";const gt=({className:a,children:s,component:u="a",...i},p)=>b.createElement(u,{...i,className:c(["rounded-full hover:bg-gray-10 dark:hover:bg-gray-40 text-text-light dark:text-white inline-flex justify-center items-center p-1 focus-visible:outline-2 focus-visible:outline focus-visible:outline-info dark:focus-visible:outline-info-dark outline-offset-0",a]),ref:p},s),_e=b.forwardRef(gt);_e.displayName="IconLinkButton";const mt=({innerRef:a,forwardedRef:s})=>(b.useEffect(()=>{[a,s].forEach(u=>{u&&(typeof u=="function"?u(a.current||null):u.current=a.current||null)})},[a,s]),a),vt=({className:a,disabled:s,endIcon:u,error:i,hint:p,label:C,name:y,onChange:h,placeholder:f,startIcon:x,value:m,...R},P)=>{const F=b.useRef(null),S=mt({forwardedRef:P,innerRef:F}),[q,D]=b.useState(Boolean(m)),[j,E]=b.useState(!1);b.useEffect(()=>{var V;D(Boolean((V=S==null?void 0:S.current)==null?void 0:V.value)||Boolean(m||f))},[m,f,S]);const J=V=>{var Z;D(Boolean((Z=S==null?void 0:S.current)==null?void 0:Z.value)||Boolean(m||f)),h&&h(V)},W=()=>{s||!S.current||(S.current.focus(),E(!0))},de=()=>{E(!1)};return L("div",{className:"flex items-start flex-col gap-0.5",children:[L("div",{className:c(["items-center self-stretch rounded-1 border-small border-solid cursor-text flex flex-row relative focus-within:border-transparent focus-within:outline-2 focus-within:outline-info focus-within:outline focus-within:dark:border-transparent focus-within:dark:outline-info-dark",s?"bg-gray-10 dark:bg-gray-40":null,i?"border-alert dark:border-alert-dark":"border-tertiary-light dark:border-tertiary-dark"]),onClick:W,onFocus:W,children:[x?w("div",{className:"text-text-muted-light dark:text-text-muted-dark pis-1.5",children:x}):null,L("span",{className:"relative flex flex-1 overflow-hidden",children:[w("input",{className:c(["self-stretch bg-transparent flex-auto outline-none overflow-hidden pbs-3 pbe-1",x?"pis-1":"pis-2",u?"pie-1":"pie-2",a]),disabled:s,id:y,onBlur:de,onChange:J,placeholder:f,ref:S,value:m,...R}),w("label",{className:c("items-center text-text-muted-light dark:text-text-muted-dark flex font-regular leading-loose pointer-events-none absolute top-2 select-none",x?"ltr:left-1 rtl:right-1":"ltr:left-2 rtl:right-2",j||q?"text-13 -translate-y-1.5":"text-16"),htmlFor:y,children:C})]}),u?w("div",{className:"text-text-muted-light dark:text-text-muted-dark pie-1.5",children:u}):null]}),i||p?L("div",{className:"flex flex-col",children:[i?w("span",{className:"text-alert dark:text-alert-dark",children:i}):null,p?w("span",{className:"text-text-muted-light dark:text-text-muted-dark text-13 leading-default",children:p}):null]}):null]})},Ce=b.forwardRef(vt);Ce.displayName="Input";const Re=({className:a,children:s,component:u="a",icon:i,iconPosition:p,variant:C="primary",size:y="md",...h},f)=>{const x=oe(i!==void 0?p:void 0);return L(({children:R})=>b.createElement(u,{...h,className:c([se,le[C],x[y],a]),ref:f},R),{children:[p==="start"&&i!==void 0?b.createElement(i,{className:"mr-0.5 min-w-min",size:U[y]}):null,b.createElement("span",{className:"truncate"},s),p==="end"&&i!==void 0?b.createElement(i,{className:"ml-0.5 min-w-min",size:U[y]}):null]})},Se=b.forwardRef(Re);Se.displayName="LinkButton";const bt=({children:a,className:s,...u},i)=>w("ul",{className:c(["w-fit bg-canvas-light dark:bg-canvas-dark shadow-light-8 dark:shadow-dark-8 rounded-1 py-0.5",s]),ref:i,...u,children:a}),Te=b.forwardRef(bt);Te.displayName="List";const yt=({children:a,className:s,divider:u,endAction:i,endIcon:p,onClick:C,startAction:y,startIcon:h,...f},x)=>L("li",{className:c(["flex items-center box-border relative",u?"after:last:content-none after:absolute after:inset-x-0 after:bottom-0 after:mx-2 after:bg-gray-10 after:dark:bg-gray-40 after:h-px":null,s]),ref:x,...f,children:[y?w("div",{className:"absolute ltr:left-1 rtl:right-1",onClick:y,children:w(z,{children:h})}):null,L("div",{className:c(["flex flex-1 py-2 gap-x-2",y?"pis-4":"pis-2",i?"pie-4":"pie-2",C?"cursor-pointer hover:bg-gray-10 hover:dark:bg-gray-40":void 0]),onClick:C,children:[h&&!y?w("div",{children:h}):null,w("div",{className:c(["flex-grow",y?"pis-2":null,i?"pie-2":null]),children:a}),p&&!i?w("div",{children:p}):null]}),i?w("div",{className:"absolute ltr:right-1 rtl:left-1",onClick:i,children:w(z,{children:p})}):null]}),Oe=b.forwardRef(yt);Oe.displayName="ListItem";const Pe={base:"font-bold",xs:"text-16 md:text-19 leading-default",sm:"text-19 md:text-23 leading-default md:leading-comfy",md:"text-23 md:text-28 leading-comfy",lg:"text-28 md:text-33 leading-comfy",xl:"text-33 md:text-40 leading-comfy",xxl:"text-33 md:text-57 leading-comfy"},X={base:"font-medium leading-default",default:"text-16 md:text-19",xs:"text-11",sm:"text-13",md:"text-16",lg:"text-19",xl:"text-23 md:text-28 tracking-tight"},ue={...X,base:"font-regular leading-loose",xl:"text-23 md:text-28"},je={base:"font-medium leading-default tracking-wider uppercase text-text-muted-light dark:text-text-muted-dark",xs:"text-11",sm:"text-13",md:"text-16",lg:"text-19",xl:"text-23"},Ne={base:"font-regular leading-default text-text-muted-light dark:text-text-muted-dark",sm:"text-11",md:"text-13",lg:"text-16"},Be={base:"font-bold leading-default",xs:"text-11",sm:"text-13",md:"text-16",lg:"text-19"},Le={base:"font-medium leading-default text-text-muted-light dark:text-text-muted-dark",sm:"text-11",md:"text-13",lg:"text-16"},Fe={base:"font-regular leading-loose",md:"text-16",lg:"text-19"},ht=({size:a,variant:s})=>{switch(s){case"headline":return c(Pe.base,Pe[a]);case"label":return c(X.base,a?X[a]:X.default);case"paragraph":return c(ue.base,a?ue[a]:ue.default);case"eyebrow":return c(je.base,je[a]);case"caption":return c(Ne.base,Ne[a]);case"buttonLabel":return c(Be.base,Be[a]);case"fieldLabel":return c(Le.base,Le[a]);case"fieldTextInput":return c(Fe.base,Fe[a]);default:return a}},xt={primary:"font-aktiv-grotesk",secondary:"font-untitled-serif"},kt=({className:a,component:s="p",children:u,font:i="primary",size:p,variant:C,...y},h)=>{const f="text-text-light dark:text-text-dark",x=xt[i],m=ht({size:p,variant:C});return w(ie,{className:c(f,m,x,a),component:s,ref:h,...y,children:u})},Ie=b.forwardRef(kt);Ie.displayName="Text";const wt=({children:a,className:s,size:u="sm"})=>w(Ie,{className:s,size:u,variant:"label",children:a}),De={tooltipWrapper:"_tooltipWrapper_qu88w_1",tooltipContent:"_tooltipContent_qu88w_18"},Et=({content:a,className:s,...u})=>w("div",{className:c(De.tooltipWrapper,s),...u,children:w("span",{className:De.tooltipContent,children:a})});v.Box=ie,v.Button=Ee,v.ButtonComponent=we,v.IconButton=z,v.IconLinkButton=_e,v.Input=Ce,v.LinkButton=Se,v.LinkButtonComponent=Re,v.List=Te,v.ListItem=Oe,v.ListItemText=wt,v.Tooltip=Et,v.buttonSizeOptions=ct,v.defaultButtonClasses=se,v.determineSizeClasses=oe,v.iconSizes=U,v.variantClasses=le,Object.defineProperty(v,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@youversion/design-system-components",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "main": "./dist/index.umd.js",
5
5
  "module": "./dist/index.es.js",
6
6
  "types": "./dist/index.d.ts",
@@ -29,6 +29,7 @@
29
29
  },
30
30
  "devDependencies": {
31
31
  "@mdx-js/react": "1.6.22",
32
+ "@pxblue/storybook-rtl-addon": "1.1.0",
32
33
  "@storybook/react": "6.5.16",
33
34
  "@testing-library/dom": "9.0.0",
34
35
  "@testing-library/jest-dom": "5.16.5",