@youversion/design-system-components 0.0.5 → 0.0.6
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/CHANGELOG.md +13 -0
- package/dist/Breadcrumb/Breadcrumb.d.ts +12 -0
- package/dist/Breadcrumb/Breadcrumb.d.ts.map +1 -0
- package/dist/Breadcrumb/Breadcrumbs.d.ts +8 -0
- package/dist/Breadcrumb/Breadcrumbs.d.ts.map +1 -0
- package/dist/Breadcrumb/index.d.ts +3 -0
- package/dist/Breadcrumb/index.d.ts.map +1 -0
- package/dist/FocusTrap/FocusTrap.d.ts +27 -0
- package/dist/FocusTrap/FocusTrap.d.ts.map +1 -0
- package/dist/FocusTrap/index.d.ts +2 -0
- package/dist/FocusTrap/index.d.ts.map +1 -0
- package/dist/List/List.d.ts.map +1 -1
- package/dist/ListItem/ListItem.d.ts +2 -0
- package/dist/ListItem/ListItem.d.ts.map +1 -1
- package/dist/Popover/Popover.d.ts +36 -0
- package/dist/Popover/Popover.d.ts.map +1 -0
- package/dist/Popover/index.d.ts +2 -0
- package/dist/Popover/index.d.ts.map +1 -0
- package/dist/PopoverBody/PopoverBody.d.ts +47 -0
- package/dist/PopoverBody/PopoverBody.d.ts.map +1 -0
- package/dist/PopoverBody/PopoverBody.module.css.d.ts +5 -0
- package/dist/PopoverBody/PopoverBodyContents.d.ts +29 -0
- package/dist/PopoverBody/PopoverBodyContents.d.ts.map +1 -0
- package/dist/PopoverBody/PopoverBodyWrapper.d.ts +30 -0
- package/dist/PopoverBody/PopoverBodyWrapper.d.ts.map +1 -0
- package/dist/PopoverBody/index.d.ts +2 -0
- package/dist/PopoverBody/index.d.ts.map +1 -0
- package/dist/PopoverTrigger/PopoverTrigger.d.ts +9 -0
- package/dist/PopoverTrigger/PopoverTrigger.d.ts.map +1 -0
- package/dist/PopoverTrigger/index.d.ts +2 -0
- package/dist/PopoverTrigger/index.d.ts.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.es.js +842 -623
- package/dist/index.umd.js +10 -10
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(v
|
|
1
|
+
(function(x,v){typeof exports=="object"&&typeof module<"u"?v(exports,require("clsx"),require("react")):typeof define=="function"&&define.amd?define(["exports","clsx","react"],v):(x=typeof globalThis<"u"?globalThis:x||self,v(x["design-system-components"]={},x.clsx,x.React))})(this,function(x,v,g){"use strict";const oe=t=>{if(t){if(typeof t!="string"&&t)return v(t.lightMode,t.darkMode);if(typeof t=="string")return t}},ke=t=>{if(t){if(typeof t!="string"&&t)return v(t.block,t.blockEnd,t.blockStart,t.inline,t.inlineEnd,t.inlineStart);if(typeof t=="string")return t}},gt=({background:t,borderColor:o,borderRadius:i,borderWidth:n,className:l,component:f="div",color:s,elevation:c=0,height:p,margin:E,padding:d,width:k,...O},F)=>{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"},K=oe(s),D=oe(t),j=oe(o),S=ke(d),z=ke(E),$=v(i,n,C[c],z,S,K,D,j,k,p,l);return g.createElement(f,{className:$,...O,ref:F})},ie=g.forwardRef(gt);ie.displayName="Box";var M={},bt={get exports(){return M},set exports(t){M=t}},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
|
|
9
|
+
*/var Ee;function yt(){if(Ee)return Y;Ee=1;var t=g,o=Symbol.for("react.element"),i=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,l=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,f={key:!0,ref:!0,__self:!0,__source:!0};function s(c,p,E){var d,k={},O=null,F=null;E!==void 0&&(O=""+E),p.key!==void 0&&(O=""+p.key),p.ref!==void 0&&(F=p.ref);for(d in p)n.call(p,d)&&!f.hasOwnProperty(d)&&(k[d]=p[d]);if(c&&c.defaultProps)for(d in p=c.defaultProps,p)k[d]===void 0&&(k[d]=p[d]);return{$$typeof:o,type:c,key:O,ref:F,props:k,_owner:l.current}}return Y.Fragment=i,Y.jsx=s,Y.jsxs=s,Y}var U={};/**
|
|
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
|
|
18
|
-
`+
|
|
19
|
-
`),
|
|
20
|
-
`),
|
|
21
|
-
`+
|
|
17
|
+
*/var we;function ht(){return we||(we=1,process.env.NODE_ENV!=="production"&&function(){var t=g,o=Symbol.for("react.element"),i=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),c=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),E=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),k=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),F=Symbol.for("react.offscreen"),C=Symbol.iterator,K="@@iterator";function D(e){if(e===null||typeof e!="object")return null;var r=C&&e[C]||e[K];return typeof r=="function"?r:null}var j=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function S(e){{for(var r=arguments.length,a=new Array(r>1?r-1:0),u=1;u<r;u++)a[u-1]=arguments[u];z("error",e,a)}}function z(e,r,a){{var u=j.ReactDebugCurrentFrame,h=u.getStackAddendum();h!==""&&(r+="%s",a=a.concat([h]));var w=a.map(function(y){return String(y)});w.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,w)}}var $=!1,fe=!1,W=!1,Q=!1,Jt=!1,Ke;Ke=Symbol.for("react.module.reference");function Gt(e){return!!(typeof e=="string"||typeof e=="function"||e===n||e===f||Jt||e===l||e===E||e===d||Q||e===F||$||fe||W||typeof e=="object"&&e!==null&&(e.$$typeof===O||e.$$typeof===k||e.$$typeof===s||e.$$typeof===c||e.$$typeof===p||e.$$typeof===Ke||e.getModuleId!==void 0))}function Ht(e,r,a){var u=e.displayName;if(u)return u;var h=r.displayName||r.name||"";return h!==""?a+"("+h+")":a}function ze(e){return e.displayName||"Context"}function B(e){if(e==null)return null;if(typeof e.tag=="number"&&S("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 n:return"Fragment";case i:return"Portal";case f:return"Profiler";case l:return"StrictMode";case E:return"Suspense";case d:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case c:var r=e;return ze(r)+".Consumer";case s:var a=e;return ze(a._context)+".Provider";case p:return Ht(e,e.render,"ForwardRef");case k:var u=e.displayName||null;return u!==null?u:B(e.type)||"Memo";case O:{var h=e,w=h._payload,y=h._init;try{return B(y(w))}catch{return null}}}return null}var I=Object.assign,J=0,Je,Ge,He,Xe,Ze,Qe,et;function tt(){}tt.__reactDisabledLog=!0;function Xt(){{if(J===0){Je=console.log,Ge=console.info,He=console.warn,Xe=console.error,Ze=console.group,Qe=console.groupCollapsed,et=console.groupEnd;var e={configurable:!0,enumerable:!0,value:tt,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}J++}}function Zt(){{if(J--,J===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:I({},e,{value:Je}),info:I({},e,{value:Ge}),warn:I({},e,{value:He}),error:I({},e,{value:Xe}),group:I({},e,{value:Ze}),groupCollapsed:I({},e,{value:Qe}),groupEnd:I({},e,{value:et})})}J<0&&S("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var pe=j.ReactCurrentDispatcher,me;function ee(e,r,a){{if(me===void 0)try{throw Error()}catch(h){var u=h.stack.trim().match(/\n( *(at )?)/);me=u&&u[1]||""}return`
|
|
18
|
+
`+me+e}}var ve=!1,te;{var Qt=typeof WeakMap=="function"?WeakMap:Map;te=new Qt}function rt(e,r){if(!e||ve)return"";{var a=te.get(e);if(a!==void 0)return a}var u;ve=!0;var h=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var w;w=pe.current,pe.current=null,Xt();try{if(r){var y=function(){throw Error()};if(Object.defineProperty(y.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(y,[])}catch(L){u=L}Reflect.construct(e,[],y)}else{try{y.call()}catch(L){u=L}e.call(y.prototype)}}else{try{throw Error()}catch(L){u=L}e()}}catch(L){if(L&&u&&typeof L.stack=="string"){for(var m=L.stack.split(`
|
|
19
|
+
`),R=u.stack.split(`
|
|
20
|
+
`),_=m.length-1,T=R.length-1;_>=1&&T>=0&&m[_]!==R[T];)T--;for(;_>=1&&T>=0;_--,T--)if(m[_]!==R[T]){if(_!==1||T!==1)do if(_--,T--,T<0||m[_]!==R[T]){var P=`
|
|
21
|
+
`+m[_].replace(" at new "," at ");return e.displayName&&P.includes("<anonymous>")&&(P=P.replace("<anonymous>",e.displayName)),typeof e=="function"&&te.set(e,P),P}while(_>=1&&T>=0);break}}}finally{ve=!1,pe.current=w,Zt(),Error.prepareStackTrace=h}var A=e?e.displayName||e.name:"",vt=A?ee(A):"";return typeof e=="function"&&te.set(e,vt),vt}function er(e,r,a){return rt(e,!1)}function tr(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function re(e,r,a){if(e==null)return"";if(typeof e=="function")return rt(e,tr(e));if(typeof e=="string")return ee(e);switch(e){case E:return ee("Suspense");case d:return ee("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case p:return er(e.render);case k:return re(e.type,r,a);case O:{var u=e,h=u._payload,w=u._init;try{return re(w(h),r,a)}catch{}}}return""}var ne=Object.prototype.hasOwnProperty,nt={},at=j.ReactDebugCurrentFrame;function ae(e){if(e){var r=e._owner,a=re(e.type,e._source,r?r.type:null);at.setExtraStackFrame(a)}else at.setExtraStackFrame(null)}function rr(e,r,a,u,h){{var w=Function.call.bind(ne);for(var y in e)if(w(e,y)){var m=void 0;try{if(typeof e[y]!="function"){var R=Error((u||"React class")+": "+a+" type `"+y+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[y]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw R.name="Invariant Violation",R}m=e[y](r,y,u,a,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(_){m=_}m&&!(m instanceof Error)&&(ae(h),S("%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).",u||"React class",a,y,typeof m),ae(null)),m instanceof Error&&!(m.message in nt)&&(nt[m.message]=!0,ae(h),S("Failed %s type: %s",a,m.message),ae(null))}}}var nr=Array.isArray;function ge(e){return nr(e)}function ar(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,a=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return a}}function or(e){try{return ot(e),!1}catch{return!0}}function ot(e){return""+e}function it(e){if(or(e))return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",ar(e)),ot(e)}var G=j.ReactCurrentOwner,ir={key:!0,ref:!0,__self:!0,__source:!0},lt,st,be;be={};function lr(e){if(ne.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function sr(e){if(ne.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function ur(e,r){if(typeof e.ref=="string"&&G.current&&r&&G.current.stateNode!==r){var a=B(G.current.type);be[a]||(S('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',B(G.current.type),e.ref),be[a]=!0)}}function dr(e,r){{var a=function(){lt||(lt=!0,S("%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)",r))};a.isReactWarning=!0,Object.defineProperty(e,"key",{get:a,configurable:!0})}}function cr(e,r){{var a=function(){st||(st=!0,S("%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)",r))};a.isReactWarning=!0,Object.defineProperty(e,"ref",{get:a,configurable:!0})}}var fr=function(e,r,a,u,h,w,y){var m={$$typeof:o,type:e,key:r,ref:a,props:y,_owner:w};return m._store={},Object.defineProperty(m._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(m,"_self",{configurable:!1,enumerable:!1,writable:!1,value:u}),Object.defineProperty(m,"_source",{configurable:!1,enumerable:!1,writable:!1,value:h}),Object.freeze&&(Object.freeze(m.props),Object.freeze(m)),m};function pr(e,r,a,u,h){{var w,y={},m=null,R=null;a!==void 0&&(it(a),m=""+a),sr(r)&&(it(r.key),m=""+r.key),lr(r)&&(R=r.ref,ur(r,h));for(w in r)ne.call(r,w)&&!ir.hasOwnProperty(w)&&(y[w]=r[w]);if(e&&e.defaultProps){var _=e.defaultProps;for(w in _)y[w]===void 0&&(y[w]=_[w])}if(m||R){var T=typeof e=="function"?e.displayName||e.name||"Unknown":e;m&&dr(y,T),R&&cr(y,T)}return fr(e,m,R,h,u,G.current,y)}}var ye=j.ReactCurrentOwner,ut=j.ReactDebugCurrentFrame;function V(e){if(e){var r=e._owner,a=re(e.type,e._source,r?r.type:null);ut.setExtraStackFrame(a)}else ut.setExtraStackFrame(null)}var he;he=!1;function xe(e){return typeof e=="object"&&e!==null&&e.$$typeof===o}function dt(){{if(ye.current){var e=B(ye.current.type);if(e)return`
|
|
22
22
|
|
|
23
|
-
Check the render method of \``+e+"`."}return""}}function
|
|
23
|
+
Check the render method of \``+e+"`."}return""}}function mr(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\/]/,""),a=e.lineNumber;return`
|
|
24
24
|
|
|
25
|
-
Check your code at `+
|
|
25
|
+
Check your code at `+r+":"+a+"."}return""}}var ct={};function vr(e){{var r=dt();if(!r){var a=typeof e=="string"?e:e.displayName||e.name;a&&(r=`
|
|
26
26
|
|
|
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"})});
|
|
27
|
+
Check the top-level render call using <`+a+">.")}return r}}function ft(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var a=vr(r);if(ct[a])return;ct[a]=!0;var u="";e&&e._owner&&e._owner!==ye.current&&(u=" It was passed a child from "+B(e._owner.type)+"."),V(e),S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',a,u),V(null)}}function pt(e,r){{if(typeof e!="object")return;if(ge(e))for(var a=0;a<e.length;a++){var u=e[a];xe(u)&&ft(u,r)}else if(xe(e))e._store&&(e._store.validated=!0);else if(e){var h=D(e);if(typeof h=="function"&&h!==e.entries)for(var w=h.call(e),y;!(y=w.next()).done;)xe(y.value)&&ft(y.value,r)}}}function gr(e){{var r=e.type;if(r==null||typeof r=="string")return;var a;if(typeof r=="function")a=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===p||r.$$typeof===k))a=r.propTypes;else return;if(a){var u=B(r);rr(a,e.props,"prop",u,e)}else if(r.PropTypes!==void 0&&!he){he=!0;var h=B(r);S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",h||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&S("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function br(e){{for(var r=Object.keys(e.props),a=0;a<r.length;a++){var u=r[a];if(u!=="children"&&u!=="key"){V(e),S("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",u),V(null);break}}e.ref!==null&&(V(e),S("Invalid attribute `ref` supplied to `React.Fragment`."),V(null))}}function mt(e,r,a,u,h,w){{var y=Gt(e);if(!y){var m="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(m+=" 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 R=mr(h);R?m+=R:m+=dt();var _;e===null?_="null":ge(e)?_="array":e!==void 0&&e.$$typeof===o?(_="<"+(B(e.type)||"Unknown")+" />",m=" Did you accidentally export a JSX literal instead of a component?"):_=typeof e,S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",_,m)}var T=pr(e,r,a,h,w);if(T==null)return T;if(y){var P=r.children;if(P!==void 0)if(u)if(ge(P)){for(var A=0;A<P.length;A++)pt(P[A],e);Object.freeze&&Object.freeze(P)}else S("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 pt(P,e)}return e===n?br(T):gr(T),T}}function yr(e,r,a){return mt(e,r,a,!0)}function hr(e,r,a){return mt(e,r,a,!1)}var xr=hr,kr=yr;U.Fragment=n,U.jsx=xr,U.jsxs=kr}()),U}(function(t){process.env.NODE_ENV==="production"?t.exports=yt():t.exports=ht()})(bt);const _e=M.Fragment,b=M.jsx,N=M.jsxs,Se={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"},H={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"},le={...H,base:"font-regular leading-loose",xl:"text-23 md:text-28"},Te={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"},Ce={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"},Oe={base:"font-medium leading-default text-text-muted-light dark:text-text-muted-dark",sm:"text-11",md:"text-13",lg:"text-16"},Pe={base:"font-regular leading-loose",md:"text-16",lg:"text-19"},xt=({size:t,variant:o})=>{switch(o){case"headline":return v(Se.base,Se[t]);case"label":return v(H.base,t?H[t]:H.default);case"paragraph":return v(le.base,t?le[t]:le.default);case"eyebrow":return v(Te.base,Te[t]);case"caption":return v(Ce.base,Ce[t]);case"buttonLabel":return v(Re.base,Re[t]);case"fieldLabel":return v(Oe.base,Oe[t]);case"fieldTextInput":return v(Pe.base,Pe[t]);default:return t}},kt={primary:"font-aktiv-grotesk",secondary:"font-untitled-serif"},Et=({className:t,component:o="p",children:i,font:n="primary",size:l,variant:f,...s},c)=>{const p="text-text-light dark:text-text-dark",E=kt[n],d=xt({size:l,variant:f});return b(ie,{className:v(p,d,E,t),component:o,ref:c,...s,children:i})},se=g.forwardRef(Et);se.displayName="Text";const Ne=({children:t,component:o="a",className:i,active:n,...l})=>b(se,{className:v(["font-bold text-gray-50 leading-default",n?"underline decoration-yv-red decoration-2 underline-offset-8 text-16 leading-loose":"text-13",i]),component:o,...l,children:t});Ne.displayName="Breadcrumb";var wt=Object.defineProperty,_t=Object.defineProperties,St=Object.getOwnPropertyDescriptors,X=Object.getOwnPropertySymbols,je=Object.prototype.hasOwnProperty,Be=Object.prototype.propertyIsEnumerable,Le=(t,o,i)=>o in t?wt(t,o,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[o]=i,Tt=(t,o)=>{for(var i in o||(o={}))je.call(o,i)&&Le(t,i,o[i]);if(X)for(var i of X(o))Be.call(o,i)&&Le(t,i,o[i]);return t},Ct=(t,o)=>_t(t,St(o)),Rt=(t,o)=>{var i={};for(var n in t)je.call(t,n)&&o.indexOf(n)<0&&(i[n]=t[n]);if(t!=null&&X)for(var n of X(t))o.indexOf(n)<0&&Be.call(t,n)&&(i[n]=t[n]);return i},Ot=(t,o)=>{var i=t,{color:n,className:l,title:f,titleId:s}=i,c=Rt(i,["color","className","title","titleId"]);return N("svg",Ct(Tt({width:c.size||"1em",height:c.size||"1em",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:`${n} ${l??""}`,ref:o,"aria-labelledby":s},c),{children:[f?b("title",{id:s,children:f}):null,b("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.293 18.707a1 1 0 0 1 0-1.414l4.94-4.94a.5.5 0 0 0 0-.707l-4.94-4.939a1 1 0 0 1 1.414-1.414l5.647 5.646a1.5 1.5 0 0 1 0 2.122l-5.647 5.646a1 1 0 0 1-1.414 0Z",fill:"currentColor"})]}))},Pt=g.forwardRef(Ot),Nt=Pt;const jt=({children:t,className:o,...i},n)=>{const l=g.Children.toArray(t),f=l.findIndex(s=>{var c;return g.isValidElement(s)?(c=s==null?void 0:s.props)==null?void 0:c.active:!1});return b("div",{className:v(["flex bg-canvas-light dark:bg-canvas-dark py-0.5 flex-row min-h-[48px] rtl:rotate-180",o]),ref:n,...i,children:l.map((s,c)=>N("div",{className:"flex items-center",children:[c?b(Nt,{className:v(["mx-1",c>f&&"text-gray-15",c<=f&&"text-gray-25"]),size:"15"}):null,b("div",{className:v([c<f?"bg-gray-10 dark:bg-gray-40 py-1.5 px-3 rounded-3 cursor-pointer":"px-0.5",c>f&&"[&>*]:text-gray-15 [&>*]:text-16 [&>*]:leading-loose [&>*]:font-medium","rtl:rotate-180"]),children:s})]},`${c}-${s.toString()}`))})},Fe=g.forwardRef(jt);Fe.displayName="Breadcrumbs";const Bt={lg:"lg",md:"md",sm:"sm",xl:"xl",xs:"xs"},ue=t=>{switch(t){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"}}},q={lg:30,md:24,sm:18,xl:36,xs:12},de="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",ce={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"},Ie=({className:t,children:o,disabled:i,icon:n,iconPosition:l,size:f="md",variant:s="primary",...c},p)=>{const E=ue(n!==void 0?l:void 0),d=v(de,ce[s],E[f],t);return N("button",{...c,className:d,disabled:i,ref:p,children:[l==="start"&&n!==void 0?g.createElement(n,{className:"mr-0.5 min-w-min",size:q[f]}):null,b("span",{className:"truncate",children:o}),l==="end"&&n!==void 0?g.createElement(n,{className:"ml-0.5 min-w-min",size:q[f]}):null]})},De=g.forwardRef(Ie);De.displayName="Button";const $e=({children:t,autoFocus:o=!0})=>{const i=g.useRef(null);return g.useEffect(()=>{if(i.current){const n=i.current.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');let l=document.activeElement;const f=n[0],s=n[n.length-1],c=d=>{if(d.key==="Tab"){if(d.shiftKey){if(document.activeElement===f)d.preventDefault(),s.focus(),l=s;else for(let k=0;k<n.length;k++)if(n[k]===document.activeElement){l=n[k-1];break}}else if(!d.shiftKey){if(document.activeElement===s)d.preventDefault(),f.focus(),l=f;else for(let k=0;k<n.length;k++)if(n[k]===document.activeElement){l=n[k+1];break}}}};o&&(()=>{if(i.current){const d=i.current.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');d&&d.focus()}})();const E=d=>{i.current&&!i.current.contains(d.target)&&l.focus()};return document.addEventListener("keydown",c),document.addEventListener("click",E),()=>{document.removeEventListener("keydown",c),document.removeEventListener("click",E)}}},[o]),b("div",{ref:i,children:t})},Lt=({children:t,className:o,disabled:i,...n},l)=>b("button",{className:v(["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",o]),disabled:i,ref:l,...n,children:t}),Z=g.forwardRef(Lt);Z.displayName="IconButton";const Ft=({className:t,children:o,component:i="a",...n},l)=>g.createElement(i,{...n,className:v(["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",t]),ref:l},o),We=g.forwardRef(Ft);We.displayName="IconLinkButton";const It=({innerRef:t,forwardedRef:o})=>(g.useEffect(()=>{[t,o].forEach(i=>{i&&(typeof i=="function"?i(t.current||null):i.current=t.current||null)})},[t,o]),t),Dt=({className:t,disabled:o,endIcon:i,error:n,hint:l,label:f,name:s,onChange:c,placeholder:p,startIcon:E,value:d,...k},O)=>{const F=g.useRef(null),C=It({forwardedRef:O,innerRef:F}),[K,D]=g.useState(Boolean(d)),[j,S]=g.useState(!1);g.useEffect(()=>{var W;D(Boolean((W=C==null?void 0:C.current)==null?void 0:W.value)||Boolean(d||p))},[d,p,C]);const z=W=>{var Q;D(Boolean((Q=C==null?void 0:C.current)==null?void 0:Q.value)||Boolean(d||p)),c&&c(W)},$=()=>{o||!C.current||(C.current.focus(),S(!0))},fe=()=>{S(!1)};return N("div",{className:"flex items-start flex-col gap-0.5",children:[N("div",{className:v(["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",o?"bg-gray-10 dark:bg-gray-40":null,n?"border-alert dark:border-alert-dark":"border-tertiary-light dark:border-tertiary-dark"]),onClick:$,onFocus:$,children:[E?b("div",{className:"text-text-muted-light dark:text-text-muted-dark pis-1.5",children:E}):null,N("span",{className:"relative flex flex-1 overflow-hidden",children:[b("input",{className:v(["self-stretch bg-transparent flex-auto outline-none overflow-hidden pbs-3 pbe-1",E?"pis-1":"pis-2",i?"pie-1":"pie-2",t]),disabled:o,id:s,onBlur:fe,onChange:z,placeholder:p,ref:C,value:d,...k}),b("label",{className:v("items-center text-text-muted-light dark:text-text-muted-dark flex font-regular leading-loose pointer-events-none absolute top-2 select-none",E?"ltr:left-1 rtl:right-1":"ltr:left-2 rtl:right-2",j||K?"text-13 -translate-y-1.5":"text-16"),htmlFor:s,children:f})]}),i?b("div",{className:"text-text-muted-light dark:text-text-muted-dark pie-1.5",children:i}):null]}),n||l?N("div",{className:"flex flex-col",children:[n?b("span",{className:"text-alert dark:text-alert-dark",children:n}):null,l?b("span",{className:"text-text-muted-light dark:text-text-muted-dark text-13 leading-default",children:l}):null]}):null]})},Ve=g.forwardRef(Dt);Ve.displayName="Input";const Ae=({className:t,children:o,component:i="a",icon:n,iconPosition:l,variant:f="primary",size:s="md",...c},p)=>{const E=ue(n!==void 0?l:void 0);return N(({children:k})=>g.createElement(i,{...c,className:v([de,ce[f],E[s],t]),ref:p},k),{children:[l==="start"&&n!==void 0?g.createElement(n,{className:"mr-0.5 min-w-min",size:q[s]}):null,g.createElement("span",{className:"truncate"},o),l==="end"&&n!==void 0?g.createElement(n,{className:"ml-0.5 min-w-min",size:q[s]}):null]})},Me=g.forwardRef(Ae);Me.displayName="LinkButton";const $t=({children:t,className:o,...i},n)=>b("ul",{className:v(["w-fit bg-canvas-light dark:bg-canvas-dark rounded-1 py-0.5",o]),ref:n,...i,children:t}),Ye=g.forwardRef($t);Ye.displayName="List";const Wt=({children:t,className:o,divider:i,endAction:n,endIcon:l,onClick:f,startAction:s,startIcon:c,...p},E)=>{const d=k=>{f&&(k.code==="Enter"||k.key===" ")&&f()};return N("li",{className:v(["flex items-center box-border relative",i?"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,o]),ref:E,...p,children:[s?b("div",{className:"absolute ltr:left-1 rtl:right-1",onClick:s,children:b(Z,{children:c})}):null,N("div",{className:v(["flex flex-1 py-2 gap-x-2",s?"pis-4":"pis-2",n?"pie-4":"pie-2",f?"cursor-pointer hover:bg-gray-10 hover:dark:bg-gray-40":void 0]),onClick:f,onKeyUp:d,onTouchEnd:f,tabIndex:f?0:void 0,children:[c&&!s?b("div",{children:c}):null,b("div",{className:v(["flex-grow",s?"pis-2":null,n?"pie-2":null]),children:t}),l&&!n?b("div",{children:l}):null]}),n?b("div",{className:"absolute ltr:right-1 rtl:left-1",onClick:n,children:b(Z,{children:l})}):null]})},Ue=g.forwardRef(Wt);Ue.displayName="ListItem";const Vt=({children:t,className:o,size:i="sm"})=>b(se,{className:o,size:i,variant:"label",children:t}),At=({children:t,className:o,...i})=>b("div",{className:v(["relative",o]),...i,children:t}),Mt={"no-scrollbar":"_no-scrollbar_1ivfd_1"},Yt=({align:t,children:o,className:i,isDismissible:n,onClose:l,...f})=>{const s=g.useRef(null);g.useEffect(()=>{const p=d=>{switch(d.key){case"Escape":n&&l&&l();break;case" ":l&&l();break;case"Enter":l&&l();break}},E=d=>{typeof l=="function"&&(s.current&&!s.current.contains(d.target)?n&&l():l())};return window.addEventListener("click",E),document.addEventListener("keyup",p),()=>{window.removeEventListener("click",E),document.removeEventListener("keyup",p)}},[s,n,l]);const c=g.useMemo(()=>{const{horizontal:p,vertical:E}=t,d={center:"left-1/2",end:"inline-end-0",start:"inline-start-0"},k={bottom:"",top:"bottom-full"};return`${d[p]} ${k[E]}`},[t]);return b("div",{className:v(["absolute shadow-light-2 dark:shadow-dark-2 rounded-1 bg-canvas-light dark:bg-overlay-body-dark mb-0.5 w-max overflow-y-scroll min-h-[200px] max-h-[400px]",Mt["no-scrollbar"],c,i]),ref:s,...f,children:o})},Ut=({open:t,children:o})=>b(_e,{children:t?o:null}),qt=({align:t={horizontal:"start",vertical:"bottom"},autoFocus:o=!0,children:i,className:n,isDismissible:l,isOpen:f,onClose:s,...c})=>b(Ut,{open:f,children:b($e,{autoFocus:o,children:b(Yt,{align:t,className:n,isDismissible:l,onClose:s,...c,children:i})})}),Kt=({onToggle:t,children:o,disabled:i})=>{const n=f=>{f.stopPropagation(),t()},l=g.cloneElement(o,{disabled:i,onClick:n});return b(_e,{children:l})},qe={tooltipWrapper:"_tooltipWrapper_qu88w_1",tooltipContent:"_tooltipContent_qu88w_18"},zt=({content:t,className:o,...i})=>b("div",{className:v(qe.tooltipWrapper,o),...i,children:b("span",{className:qe.tooltipContent,children:t})});x.Box=ie,x.Breadcrumb=Ne,x.Breadcrumbs=Fe,x.Button=De,x.ButtonComponent=Ie,x.FocusTrap=$e,x.IconButton=Z,x.IconLinkButton=We,x.Input=Ve,x.LinkButton=Me,x.LinkButtonComponent=Ae,x.List=Ye,x.ListItem=Ue,x.ListItemText=Vt,x.Popover=At,x.PopoverBody=qt,x.PopoverTrigger=Kt,x.Tooltip=zt,x.buttonSizeOptions=Bt,x.defaultButtonClasses=de,x.determineSizeClasses=ue,x.iconSizes=q,x.variantClasses=ce,Object.defineProperty(x,Symbol.toStringTag,{value:"Module"})});
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._tooltipWrapper_qu88w_1{background:#fff;border-radius:8px;box-shadow:0 1px 3px #12121226;color:#121212;max-width:460px;padding-block:8px;padding-inline:12px;width:-moz-max-content;width:max-content}html[data-theme=dark] ._tooltipWrapper_qu88w_1{background:#2b3031;box-shadow:0 1px 3px #00000073;color:#fff}._tooltipContent_qu88w_18{font-size:.8125rem;font-style:normal;line-height:1.5}
|
|
1
|
+
._no-scrollbar_1ivfd_1::-webkit-scrollbar{display:none}._no-scrollbar_1ivfd_1{-ms-overflow-style:none;scrollbar-width:none}._tooltipWrapper_qu88w_1{background:#fff;border-radius:8px;box-shadow:0 1px 3px #12121226;color:#121212;max-width:460px;padding-block:8px;padding-inline:12px;width:-moz-max-content;width:max-content}html[data-theme=dark] ._tooltipWrapper_qu88w_1{background:#2b3031;box-shadow:0 1px 3px #00000073;color:#fff}._tooltipContent_qu88w_18{font-size:.8125rem;font-style:normal;line-height:1.5}
|