@youversion/design-system-components 0.0.2 → 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.
Files changed (71) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/dist/Box/Box.d.ts +44 -0
  3. package/dist/Box/Box.d.ts.map +1 -0
  4. package/dist/Box/index.d.ts +2 -0
  5. package/dist/Box/index.d.ts.map +1 -0
  6. package/dist/Button/Button.d.ts +78 -0
  7. package/dist/Button/Button.d.ts.map +1 -0
  8. package/dist/Button/index.d.ts +2 -0
  9. package/dist/Button/index.d.ts.map +1 -0
  10. package/dist/IconButton/IconButton.d.ts +27 -0
  11. package/dist/IconButton/IconButton.d.ts.map +1 -0
  12. package/dist/IconButton/index.d.ts +2 -0
  13. package/dist/IconButton/index.d.ts.map +1 -0
  14. package/dist/IconLinkButton/IconLinkButton.d.ts +34 -0
  15. package/dist/IconLinkButton/IconLinkButton.d.ts.map +1 -0
  16. package/dist/IconLinkButton/index.d.ts +2 -0
  17. package/dist/IconLinkButton/index.d.ts.map +1 -0
  18. package/dist/Input/Input.d.ts +47 -0
  19. package/dist/Input/Input.d.ts.map +1 -0
  20. package/dist/Input/index.d.ts +2 -0
  21. package/dist/Input/index.d.ts.map +1 -0
  22. package/dist/LinkButton/LinkButton.d.ts +42 -0
  23. package/dist/LinkButton/LinkButton.d.ts.map +1 -0
  24. package/dist/LinkButton/index.d.ts +2 -0
  25. package/dist/LinkButton/index.d.ts.map +1 -0
  26. package/dist/List/List.d.ts +32 -0
  27. package/dist/List/List.d.ts.map +1 -0
  28. package/dist/List/index.d.ts +2 -0
  29. package/dist/List/index.d.ts.map +1 -0
  30. package/dist/ListItem/ListItem.d.ts +58 -0
  31. package/dist/ListItem/ListItem.d.ts.map +1 -0
  32. package/dist/ListItem/index.d.ts +2 -0
  33. package/dist/ListItem/index.d.ts.map +1 -0
  34. package/dist/ListItemText/ListItemText.d.ts +34 -0
  35. package/dist/ListItemText/ListItemText.d.ts.map +1 -0
  36. package/dist/ListItemText/index.d.ts +2 -0
  37. package/dist/ListItemText/index.d.ts.map +1 -0
  38. package/dist/Tooltip/Tooltip.d.ts +34 -0
  39. package/dist/Tooltip/Tooltip.d.ts.map +1 -0
  40. package/dist/Tooltip/Tooltip.module.css.d.ts +6 -0
  41. package/dist/Tooltip/index.d.ts +2 -0
  42. package/dist/Tooltip/index.d.ts.map +1 -0
  43. package/dist/Typography/Heading/Heading.d.ts +30 -0
  44. package/dist/Typography/Heading/Heading.d.ts.map +1 -0
  45. package/dist/Typography/Heading/index.d.ts +2 -0
  46. package/dist/Typography/Heading/index.d.ts.map +1 -0
  47. package/dist/Typography/Text/Text.d.ts +19 -0
  48. package/dist/Typography/Text/Text.d.ts.map +1 -0
  49. package/dist/Typography/Text/index.d.ts +2 -0
  50. package/dist/Typography/Text/index.d.ts.map +1 -0
  51. package/dist/Typography/Typography.d.ts +44 -0
  52. package/dist/Typography/Typography.d.ts.map +1 -0
  53. package/dist/Typography/Variants.d.ts +5 -0
  54. package/dist/Typography/Variants.d.ts.map +1 -0
  55. package/dist/Typography/index.d.ts +3 -0
  56. package/dist/Typography/index.d.ts.map +1 -0
  57. package/dist/hooks/index.d.ts +2 -0
  58. package/dist/hooks/index.d.ts.map +1 -0
  59. package/dist/hooks/useCombinedRefs.d.ts +33 -0
  60. package/dist/hooks/useCombinedRefs.d.ts.map +1 -0
  61. package/dist/index.d.ts +11 -0
  62. package/dist/index.d.ts.map +1 -0
  63. package/dist/index.es.js +596 -478
  64. package/dist/index.umd.js +10 -10
  65. package/dist/utils/get-resolved-dark-mode-value.d.ts +25 -0
  66. package/dist/utils/get-resolved-dark-mode-value.d.ts.map +1 -0
  67. package/dist/utils/get-resolved-logical-property.d.ts +25 -0
  68. package/dist/utils/get-resolved-logical-property.d.ts.map +1 -0
  69. package/dist/utils/tailwind-types.d.ts +29 -0
  70. package/dist/utils/tailwind-types.d.ts.map +1 -0
  71. package/package.json +6 -2
package/dist/index.umd.js CHANGED
@@ -1,4 +1,4 @@
1
- (function(E,c){typeof exports=="object"&&typeof module<"u"?c(exports,require("clsx"),require("react")):typeof define=="function"&&define.amd?define(["exports","clsx","react"],c):(E=typeof globalThis<"u"?globalThis:E||self,c(E["design-system-components"]={},E.clsx,E.React))})(this,function(E,c,y){"use strict";const re=n=>{if(n){if(typeof n!="string"&&n)return c(n.lightMode,n.darkMode);if(typeof n=="string")return n}},pe=n=>{if(n){if(typeof n!="string"&&n)return c(n.block,n.blockEnd,n.blockStart,n.inline,n.inlineEnd,n.inlineStart);if(typeof n=="string")return n}},et=({background:n,borderColor:l,borderRadius:u,borderWidth:d,className:b,component:C="div",color:T,elevation:x=0,height:v,margin:_,padding:p,width:S,...P},I)=>{const k={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(T),L=re(n),j=re(l),g=pe(p),q=pe(_),A=c(u,d,k[x],q,g,U,L,j,S,v,b);return y.createElement(C,{className:A,...P,ref:I})},ne=y.forwardRef(et);ne.displayName="Box";var H={},tt={get exports(){return H},set exports(n){H=n}},$={};/**
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 me;function rt(){if(me)return $;me=1;var n=y,l=Symbol.for("react.element"),u=Symbol.for("react.fragment"),d=Object.prototype.hasOwnProperty,b=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,C={key:!0,ref:!0,__self:!0,__source:!0};function T(x,v,_){var p,S={},P=null,I=null;_!==void 0&&(P=""+_),v.key!==void 0&&(P=""+v.key),v.ref!==void 0&&(I=v.ref);for(p in v)d.call(v,p)&&!C.hasOwnProperty(p)&&(S[p]=v[p]);if(x&&x.defaultProps)for(p in v=x.defaultProps,v)S[p]===void 0&&(S[p]=v[p]);return{$$typeof:l,type:x,key:P,ref:I,props:S,_owner:b.current}}return $.Fragment=u,$.jsx=T,$.jsxs=T,$}var Y={};/**
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 ge;function nt(){return ge||(ge=1,process.env.NODE_ENV!=="production"&&function(){var n=y,l=Symbol.for("react.element"),u=Symbol.for("react.portal"),d=Symbol.for("react.fragment"),b=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),T=Symbol.for("react.provider"),x=Symbol.for("react.context"),v=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"),k=Symbol.iterator,U="@@iterator";function L(e){if(e===null||typeof e!="object")return null;var t=k&&e[k]||e[U];return typeof t=="function"?t:null}var j=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function g(e){{for(var t=arguments.length,r=new Array(t>1?t-1:0),a=1;a<t;a++)r[a-1]=arguments[a];q("error",e,r)}}function q(e,t,r){{var a=j.ReactDebugCurrentFrame,s=a.getStackAddendum();s!==""&&(t+="%s",r=r.concat([s]));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,B=!1,X=!1,mt=!1,Pe;Pe=Symbol.for("react.module.reference");function gt(e){return!!(typeof e=="string"||typeof e=="function"||e===d||e===C||mt||e===b||e===_||e===p||X||e===I||A||oe||B||typeof e=="object"&&e!==null&&(e.$$typeof===P||e.$$typeof===S||e.$$typeof===T||e.$$typeof===x||e.$$typeof===v||e.$$typeof===Pe||e.getModuleId!==void 0))}function ht(e,t,r){var a=e.displayName;if(a)return a;var s=t.displayName||t.name||"";return s!==""?r+"("+s+")":r}function je(e){return e.displayName||"Context"}function N(e){if(e==null)return null;if(typeof e.tag=="number"&&g("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 C:return"Profiler";case b:return"StrictMode";case _:return"Suspense";case p:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case x:var t=e;return je(t)+".Consumer";case T:var r=e;return je(r._context)+".Provider";case v:return ht(e,e.render,"ForwardRef");case S:var a=e.displayName||null;return a!==null?a:N(e.type)||"Memo";case P:{var s=e,f=s._payload,i=s._init;try{return N(i(f))}catch{return null}}}return null}var D=Object.assign,J=0,Ne,Fe,Ie,De,Le,Ae,Be;function Ve(){}Ve.__reactDisabledLog=!0;function bt(){{if(J===0){Ne=console.log,Fe=console.info,Ie=console.warn,De=console.error,Le=console.group,Ae=console.groupCollapsed,Be=console.groupEnd;var e={configurable:!0,enumerable:!0,value:Ve,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}J++}}function yt(){{if(J--,J===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:D({},e,{value:Ne}),info:D({},e,{value:Fe}),warn:D({},e,{value:Ie}),error:D({},e,{value:De}),group:D({},e,{value:Le}),groupCollapsed:D({},e,{value:Ae}),groupEnd:D({},e,{value:Be})})}J<0&&g("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(s){var a=s.stack.trim().match(/\n( *(at )?)/);se=a&&a[1]||""}return`
18
- `+se+e}}var le=!1,Q;{var xt=typeof WeakMap=="function"?WeakMap:Map;Q=new xt}function We(e,t){if(!e||le)return"";{var r=Q.get(e);if(r!==void 0)return r}var a;le=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var f;f=ie.current,ie.current=null,bt();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){a=F}Reflect.construct(e,[],i)}else{try{i.call()}catch(F){a=F}e.call(i.prototype)}}else{try{throw Error()}catch(F){a=F}e()}}catch(F){if(F&&a&&typeof F.stack=="string"){for(var o=F.stack.split(`
19
- `),w=a.stack.split(`
20
- `),m=o.length-1,h=w.length-1;m>=1&&h>=0&&o[m]!==w[h];)h--;for(;m>=1&&h>=0;m--,h--)if(o[m]!==w[h]){if(m!==1||h!==1)do if(m--,h--,h<0||o[m]!==w[h]){var O=`
21
- `+o[m].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(m>=1&&h>=0);break}}}finally{le=!1,ie.current=f,yt(),Error.prepareStackTrace=s}var W=e?e.displayName||e.name:"",ze=W?Z(W):"";return typeof e=="function"&&Q.set(e,ze),ze}function Et(e,t,r){return We(e,!1)}function _t(e){var t=e.prototype;return!!(t&&t.isReactComponent)}function z(e,t,r){if(e==null)return"";if(typeof e=="function")return We(e,_t(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 v:return Et(e.render);case S:return z(e.type,t,r);case P:{var a=e,s=a._payload,f=a._init;try{return z(f(s),t,r)}catch{}}}return""}var ee=Object.prototype.hasOwnProperty,$e={},Ye=j.ReactDebugCurrentFrame;function te(e){if(e){var t=e._owner,r=z(e.type,e._source,t?t.type:null);Ye.setExtraStackFrame(r)}else Ye.setExtraStackFrame(null)}function kt(e,t,r,a,s){{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 w=Error((a||"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 w.name="Invariant Violation",w}o=e[i](t,i,a,r,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(m){o=m}o&&!(o instanceof Error)&&(te(s),g("%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).",a||"React class",r,i,typeof o),te(null)),o instanceof Error&&!(o.message in $e)&&($e[o.message]=!0,te(s),g("Failed %s type: %s",r,o.message),te(null))}}}var wt=Array.isArray;function ue(e){return wt(e)}function Rt(e){{var t=typeof Symbol=="function"&&Symbol.toStringTag,r=t&&e[Symbol.toStringTag]||e.constructor.name||"Object";return r}}function Tt(e){try{return Me(e),!1}catch{return!0}}function Me(e){return""+e}function Ue(e){if(Tt(e))return g("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Rt(e)),Me(e)}var G=j.ReactCurrentOwner,Ct={key:!0,ref:!0,__self:!0,__source:!0},qe,Je,fe;fe={};function St(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 Ot(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 Pt(e,t){if(typeof e.ref=="string"&&G.current&&t&&G.current.stateNode!==t){var r=N(G.current.type);fe[r]||(g('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),fe[r]=!0)}}function jt(e,t){{var r=function(){qe||(qe=!0,g("%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 Nt(e,t){{var r=function(){Je||(Je=!0,g("%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 Ft=function(e,t,r,a,s,f,i){var o={$$typeof:l,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:a}),Object.defineProperty(o,"_source",{configurable:!1,enumerable:!1,writable:!1,value:s}),Object.freeze&&(Object.freeze(o.props),Object.freeze(o)),o};function It(e,t,r,a,s){{var f,i={},o=null,w=null;r!==void 0&&(Ue(r),o=""+r),Ot(t)&&(Ue(t.key),o=""+t.key),St(t)&&(w=t.ref,Pt(t,s));for(f in t)ee.call(t,f)&&!Ct.hasOwnProperty(f)&&(i[f]=t[f]);if(e&&e.defaultProps){var m=e.defaultProps;for(f in m)i[f]===void 0&&(i[f]=m[f])}if(o||w){var h=typeof e=="function"?e.displayName||e.name||"Unknown":e;o&&jt(i,h),w&&Nt(i,h)}return Ft(e,o,w,s,a,G.current,i)}}var ce=j.ReactCurrentOwner,Ge=j.ReactDebugCurrentFrame;function V(e){if(e){var t=e._owner,r=z(e.type,e._source,t?t.type:null);Ge.setExtraStackFrame(r)}else Ge.setExtraStackFrame(null)}var de;de=!1;function ve(e){return typeof e=="object"&&e!==null&&e.$$typeof===l}function He(){{if(ce.current){var e=N(ce.current.type);if(e)return`
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
+ `),T=n.stack.split(`
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 Dt(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 Ke={};function Lt(e){{var t=He();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 Xe(e,t){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var r=Lt(t);if(Ke[r])return;Ke[r]=!0;var a="";e&&e._owner&&e._owner!==ce.current&&(a=" It was passed a child from "+N(e._owner.type)+"."),V(e),g('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',r,a),V(null)}}function Ze(e,t){{if(typeof e!="object")return;if(ue(e))for(var r=0;r<e.length;r++){var a=e[r];ve(a)&&Xe(a,t)}else if(ve(e))e._store&&(e._store.validated=!0);else if(e){var s=L(e);if(typeof s=="function"&&s!==e.entries)for(var f=s.call(e),i;!(i=f.next()).done;)ve(i.value)&&Xe(i.value,t)}}}function At(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===v||t.$$typeof===S))r=t.propTypes;else return;if(r){var a=N(t);kt(r,e.props,"prop",a,e)}else if(t.PropTypes!==void 0&&!de){de=!0;var s=N(t);g("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",s||"Unknown")}typeof t.getDefaultProps=="function"&&!t.getDefaultProps.isReactClassApproved&&g("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Bt(e){{for(var t=Object.keys(e.props),r=0;r<t.length;r++){var a=t[r];if(a!=="children"&&a!=="key"){V(e),g("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",a),V(null);break}}e.ref!==null&&(V(e),g("Invalid attribute `ref` supplied to `React.Fragment`."),V(null))}}function Qe(e,t,r,a,s,f){{var i=gt(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 w=Dt(s);w?o+=w:o+=He();var m;e===null?m="null":ue(e)?m="array":e!==void 0&&e.$$typeof===l?(m="<"+(N(e.type)||"Unknown")+" />",o=" Did you accidentally export a JSX literal instead of a component?"):m=typeof e,g("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",m,o)}var h=It(e,t,r,s,f);if(h==null)return h;if(i){var O=t.children;if(O!==void 0)if(a)if(ue(O)){for(var W=0;W<O.length;W++)Ze(O[W],e);Object.freeze&&Object.freeze(O)}else g("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 Ze(O,e)}return e===d?Bt(h):At(h),h}}function Vt(e,t,r){return Qe(e,t,r,!0)}function Wt(e,t,r){return Qe(e,t,r,!1)}var $t=Wt,Yt=Vt;Y.Fragment=d,Y.jsx=$t,Y.jsxs=Yt}()),Y}(function(n){process.env.NODE_ENV==="production"?n.exports=rt():n.exports=nt()})(tt);const R=H.jsx,M=H.jsxs,at=({children:n,className:l,disabled:u,...d},b)=>R("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",l]),disabled:u,ref:b,...d,children:n}),he=y.forwardRef(at);he.displayName="IconButton";const ot=({className:n,children:l,component:u="a",...d},b)=>y.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",n]),ref:b},l),be=y.forwardRef(ot);be.displayName="IconLinkButton";const it=({innerRef:n,forwardedRef:l})=>(y.useEffect(()=>{[n,l].forEach(u=>{u&&(typeof u=="function"?u(n.current||null):u.current=n.current||null)})},[n,l]),n),st=({className:n,disabled:l,endIcon:u,error:d,hint:b,label:C,name:T,onChange:x,placeholder:v,startIcon:_,value:p,...S},P)=>{const I=y.useRef(null),k=it({forwardedRef:P,innerRef:I}),[U,L]=y.useState(Boolean(p)),[j,g]=y.useState(!1);y.useEffect(()=>{var B;L(Boolean((B=k==null?void 0:k.current)==null?void 0:B.value)||Boolean(p||v))},[p,v,k]);const q=B=>{var X;L(Boolean((X=k==null?void 0:k.current)==null?void 0:X.value)||Boolean(p||v)),x&&x(B)},A=()=>{l||!k.current||(k.current.focus(),g(!0))},oe=()=>{g(!1)};return M("div",{className:"flex items-start flex-col gap-0.5",children:[M("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",l?"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:[_?R("div",{className:"text-text-muted-light dark:text-text-muted-dark pis-1.5",children:_}):null,M("span",{className:"relative flex flex-1 overflow-hidden",children:[R("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",n]),disabled:l,id:T,onBlur:oe,onChange:q,placeholder:v,ref:k,value:p,...S}),R("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:T,children:C})]}),u?R("div",{className:"text-text-muted-light dark:text-text-muted-dark pie-1.5",children:u}):null]}),d||b?M("div",{className:"flex flex-col",children:[d?R("span",{className:"text-alert dark:text-alert-dark",children:d}):null,b?R("span",{className:"text-text-muted-light dark:text-text-muted-dark text-13 leading-default",children:b}):null]}):null]})},ye=y.forwardRef(st);ye.displayName="Input";const lt=({children:n,className:l,...u},d)=>R("ul",{className:c(["w-fit bg-canvas-light dark:bg-canvas-dark shadow-light-8 dark:shadow-dark-8 rounded-1 py-0.5",l]),ref:d,...u,children:n}),xe=y.forwardRef(lt);xe.displayName="List";const ut=({children:n,className:l,divider:u,endIcon:d,onClick:b,startIcon:C,...T},x)=>M("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,b?"cursor-pointer hover:bg-gray-10 hover:dark:bg-gray-40":null,l]),onClick:b,ref:x,...T,children:[C?R("div",{children:C}):null,n,d?R("div",{children:d}):null]}),Ee=y.forwardRef(ut);Ee.displayName="ListItem";const _e={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"},ae={...K,base:"font-regular leading-loose",xl:"text-23 md:text-28"},ke={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"},we={base:"font-regular leading-default text-text-muted-light dark:text-text-muted-dark",sm:"text-11",md:"text-13",lg:"text-16"},Re={base:"font-bold leading-default",xs:"text-11",sm:"text-13",md:"text-16",lg:"text-19"},Te={base:"font-medium leading-default text-text-muted-light dark:text-text-muted-dark",sm:"text-11",md:"text-13",lg:"text-16"},Ce={base:"font-regular leading-loose",md:"text-16",lg:"text-19"},ft=({size:n,variant:l})=>{switch(l){case"headline":return c(_e.base,_e[n]);case"label":return c(K.base,n?K[n]:K.default);case"paragraph":return c(ae.base,n?ae[n]:ae.default);case"eyebrow":return c(ke.base,ke[n]);case"caption":return c(we.base,we[n]);case"buttonLabel":return c(Re.base,Re[n]);case"fieldLabel":return c(Te.base,Te[n]);case"fieldTextInput":return c(Ce.base,Ce[n]);default:return n}},ct={primary:"font-aktiv-grotesk",secondary:"font-untitled-serif"},dt=({className:n,component:l="p",children:u,font:d="primary",size:b,variant:C,...T},x)=>{const v="text-text-light dark:text-text-dark",_=ct[d],p=ft({size:b,variant:C});return R(ne,{className:c(v,p,_,n),component:l,ref:x,...T,children:u})},Se=y.forwardRef(dt);Se.displayName="Text";const vt=({children:n,className:l,size:u="sm"})=>R(Se,{className:c(["flex-grow",l]),size:u,variant:"label",children:n}),Oe={tooltipWrapper:"_tooltipWrapper_qu88w_1",tooltipContent:"_tooltipContent_qu88w_18"},pt=({content:n,className:l,...u})=>R("div",{className:c(Oe.tooltipWrapper,l),...u,children:R("span",{className:Oe.tooltipContent,children:n})});E.Box=ne,E.IconButton=he,E.IconLinkButton=be,E.Input=ye,E.List=xe,E.ListItem=Ee,E.ListItemText=vt,E.Tooltip=pt,Object.defineProperty(E,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"})});
@@ -0,0 +1,25 @@
1
+ import { BgDarkModeProperties, BorderDarkModeProperties, TextDarkModeProperties } from './tailwind-types';
2
+ type DarkModeProperties = TextDarkModeProperties | BgDarkModeProperties | BorderDarkModeProperties;
3
+ /**
4
+ * A utililty function that handles returning the correct light & dark mode tailwind classes.
5
+ *
6
+ * @param value - Either a `string` or an object with the type of {@link DarkMode}.
7
+ * @returns - Returns a `string` of either the `value` prop or a combination of the light and dark mode values.
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * import { getResolvedDarkModeValue } from '@utils/get-resolved-dark-mode-value';
12
+ *
13
+ * const color = {
14
+ * lightMode: 'text-gray-50',
15
+ * darkMode: 'dark:text-gray-10'
16
+ * }
17
+ *
18
+ * const resolvedColor = getResolvedDarkModeValue(color);
19
+ * @returns 'text-gray-50 dark:text-gray-10'
20
+ *
21
+ * ```
22
+ */
23
+ export declare const getResolvedDarkModeValue: <T extends string | DarkModeProperties>(value?: T | undefined) => string | undefined;
24
+ export {};
25
+ //# sourceMappingURL=get-resolved-dark-mode-value.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-resolved-dark-mode-value.d.ts","sourceRoot":"","sources":["../../../src/utils/get-resolved-dark-mode-value.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAE1G,KAAK,kBAAkB,GAAG,sBAAsB,GAAG,oBAAoB,GAAG,wBAAwB,CAAC;AAEnG;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,wBAAwB,oEAAuD,MAAM,GAAG,SAUpG,CAAC"}
@@ -0,0 +1,25 @@
1
+ import { MarginLogicalProperties, PaddingLogicalProperties } from './tailwind-types';
2
+ type FlowRelativeProperties = MarginLogicalProperties | PaddingLogicalProperties;
3
+ /**
4
+ * A utililty function that handles returning the correct logical tailwind classes.
5
+ *
6
+ * @param value - Either a `string` or an object with the type of {@link FlowRelativeProperties}.
7
+ * @returns - Returns a `string` of either the `value` prop or a combination of the logical property values.
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * import { getResolvedLogicalProperty } from '@utils/get-resolved-logical-property';
12
+ *
13
+ * const padding = {
14
+ * inline: 'pli-1',
15
+ * block: 'plb-1',
16
+ * }
17
+ *
18
+ * const resolvedPadding = getResolvedLogicalProperty(padding);
19
+ * @returns 'pli-1 plb-1'
20
+ *
21
+ * ```
22
+ */
23
+ export declare const getResolvedLogicalProperty: <T extends string | FlowRelativeProperties>(value?: T | undefined) => string | undefined;
24
+ export {};
25
+ //# sourceMappingURL=get-resolved-logical-property.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-resolved-logical-property.d.ts","sourceRoot":"","sources":["../../../src/utils/get-resolved-logical-property.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAErF,KAAK,sBAAsB,GAAG,uBAAuB,GAAG,wBAAwB,CAAC;AAEjF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,0BAA0B,wEAEpC,MAAM,GAAG,SAUX,CAAC"}
@@ -0,0 +1,29 @@
1
+ import { BorderRadius, BorderWidth, Colors, Spacing } from '@youversion/design-system-tokens';
2
+ export type TWClasses = string | object;
3
+ export type DarkModeProperties<Prefix extends Lowercase<string>> = {
4
+ darkMode?: `dark:${Prefix}-${Colors}`;
5
+ lightMode?: `${Prefix}-${Colors}`;
6
+ };
7
+ export type TextDarkModeProperties = DarkModeProperties<'text'>;
8
+ export type BgDarkModeProperties = DarkModeProperties<'bg'>;
9
+ export type BorderDarkModeProperties = DarkModeProperties<'border'>;
10
+ export type ColorOptions = `text-${Colors}` | TextDarkModeProperties;
11
+ export type BGColorOptions = `bg-${Colors}` | BgDarkModeProperties;
12
+ export type WidthOptions = `w-${Spacing}`;
13
+ export type HeightOptions = `h-${Spacing}`;
14
+ export type BorderRadiusOptions = `rounded-${BorderRadius}`;
15
+ export type BorderWidthOptions = `border-${BorderWidth}`;
16
+ export type BorderColorOptions = `border-${Colors}` | BorderDarkModeProperties;
17
+ export type LogicalProperties<Prefix extends Lowercase<string>> = {
18
+ block?: `${Prefix}lb-${Spacing}` | `${Prefix}y-${Spacing}`;
19
+ blockEnd?: `${Prefix}be-${Spacing}` | `${Prefix}b-${Spacing}`;
20
+ blockStart?: `${Prefix}bs-${Spacing}` | `${Prefix}t-${Spacing}`;
21
+ inline?: `${Prefix}li-${Spacing}` | `${Prefix}x-${Spacing}`;
22
+ inlineEnd?: `${Prefix}ie-${Spacing}` | `${Prefix}r-${Spacing}`;
23
+ inlineStart?: `${Prefix}is-${Spacing}` | `${Prefix}l-${Spacing}`;
24
+ };
25
+ export type MarginLogicalProperties = LogicalProperties<'m'>;
26
+ export type PaddingLogicalProperties = LogicalProperties<'p'>;
27
+ export type PaddingOptions = `p-${Spacing}` | PaddingLogicalProperties;
28
+ export type MarginOptions = `m-${Spacing}` | MarginLogicalProperties;
29
+ //# sourceMappingURL=tailwind-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tailwind-types.d.ts","sourceRoot":"","sources":["../../../src/utils/tailwind-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAE9F,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,MAAM,CAAC;AAExC,MAAM,MAAM,kBAAkB,CAAC,MAAM,SAAS,SAAS,CAAC,MAAM,CAAC,IAAI;IACjE,QAAQ,CAAC,EAAE,QAAQ,MAAM,IAAI,MAAM,EAAE,CAAC;IACtC,SAAS,CAAC,EAAE,GAAG,MAAM,IAAI,MAAM,EAAE,CAAC;CACnC,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,kBAAkB,CAAC,MAAM,CAAC,CAAC;AAChE,MAAM,MAAM,oBAAoB,GAAG,kBAAkB,CAAC,IAAI,CAAC,CAAC;AAC5D,MAAM,MAAM,wBAAwB,GAAG,kBAAkB,CAAC,QAAQ,CAAC,CAAC;AAEpE,MAAM,MAAM,YAAY,GAAG,QAAQ,MAAM,EAAE,GAAG,sBAAsB,CAAC;AACrE,MAAM,MAAM,cAAc,GAAG,MAAM,MAAM,EAAE,GAAG,oBAAoB,CAAC;AACnE,MAAM,MAAM,YAAY,GAAG,KAAK,OAAO,EAAE,CAAC;AAC1C,MAAM,MAAM,aAAa,GAAG,KAAK,OAAO,EAAE,CAAC;AAC3C,MAAM,MAAM,mBAAmB,GAAG,WAAW,YAAY,EAAE,CAAC;AAC5D,MAAM,MAAM,kBAAkB,GAAG,UAAU,WAAW,EAAE,CAAC;AACzD,MAAM,MAAM,kBAAkB,GAAG,UAAU,MAAM,EAAE,GAAG,wBAAwB,CAAC;AAE/E,MAAM,MAAM,iBAAiB,CAAC,MAAM,SAAS,SAAS,CAAC,MAAM,CAAC,IAAI;IAChE,KAAK,CAAC,EAAE,GAAG,MAAM,MAAM,OAAO,EAAE,GAAG,GAAG,MAAM,KAAK,OAAO,EAAE,CAAC;IAC3D,QAAQ,CAAC,EAAE,GAAG,MAAM,MAAM,OAAO,EAAE,GAAG,GAAG,MAAM,KAAK,OAAO,EAAE,CAAC;IAC9D,UAAU,CAAC,EAAE,GAAG,MAAM,MAAM,OAAO,EAAE,GAAG,GAAG,MAAM,KAAK,OAAO,EAAE,CAAC;IAChE,MAAM,CAAC,EAAE,GAAG,MAAM,MAAM,OAAO,EAAE,GAAG,GAAG,MAAM,KAAK,OAAO,EAAE,CAAC;IAC5D,SAAS,CAAC,EAAE,GAAG,MAAM,MAAM,OAAO,EAAE,GAAG,GAAG,MAAM,KAAK,OAAO,EAAE,CAAC;IAC/D,WAAW,CAAC,EAAE,GAAG,MAAM,MAAM,OAAO,EAAE,GAAG,GAAG,MAAM,KAAK,OAAO,EAAE,CAAC;CAClE,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,iBAAiB,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,MAAM,wBAAwB,GAAG,iBAAiB,CAAC,GAAG,CAAC,CAAC;AAE9D,MAAM,MAAM,cAAc,GAAG,KAAK,OAAO,EAAE,GAAG,wBAAwB,CAAC;AACvE,MAAM,MAAM,aAAa,GAAG,KAAK,OAAO,EAAE,GAAG,uBAAuB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@youversion/design-system-components",
3
- "version": "0.0.2",
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",
@@ -52,7 +53,8 @@
52
53
  "ts-node": "10.9.1",
53
54
  "typed-css-modules": "0.7.2",
54
55
  "typescript": "4.9.3",
55
- "vite": "4.1.4"
56
+ "vite": "4.1.4",
57
+ "vite-plugin-dts": "2.1.0"
56
58
  },
57
59
  "exports": {
58
60
  ".": {
@@ -60,6 +62,8 @@
60
62
  "require": "./dist/index.umd.js"
61
63
  },
62
64
  "./postcss-config": "./postcss.config.cjs",
65
+ "./global.css": "./dist/styles/global.css",
66
+ "./reset.css": "./dist/styles/global.css",
63
67
  "./styles": "./src/styles/index.css",
64
68
  "./dist/style.css": "./dist/style.css"
65
69
  }