burnout-components
Version:
A component library for burnout brands that contains common react-components and util functions used throughout it and it's portfolio companies
3 lines (2 loc) • 15.2 kB
JavaScript
import{jsx as e,jsxs as r}from'react/jsx-runtime';import t from'next/link';import n from'react';import{notFound as o}from'next/navigation';function l({children:r,colorSwap:n,href:o,prefetch:l=!0,target:i}){return e(t,n?{target:i,prefetch:l,href:o,className:'bg-burnout-dark-gray hover:bg-burnout-light-gray border-burnout-blue nice-hover-burnout w-full rounded-lg border-2 px-3 py-2 text-center font-bold text-white transition-all duration-200 ease-in-out hover:text-black',children:r}:{target:i,prefetch:l,href:o,className:'bg-burnout-light-gray hover:bg-burnout-dark-gray border-burnout-blue nice-hover-burnout w-full rounded-lg border-2 px-3 py-2 text-center font-bold text-black transition-all duration-200 ease-in-out hover:text-white',children:r})}var i={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},a=n.createContext&&n.createContext(i),c=['attr','size','title'];function d(e,r){if(null==e)return{};var t,n,o=function(e,r){if(null==e)return{};var t={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(r.indexOf(n)>=0)continue;t[n]=e[n]}return t}(e,r);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)t=l[n],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function s(){return s=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},s.apply(this,arguments)}function u(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((r=>Object.getOwnPropertyDescriptor(e,r).enumerable))),t.push.apply(t,n)}return t}function h(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?u(Object(t),!0).forEach((r=>{p(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):u(Object(t)).forEach((r=>{Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function p(e,r,t){var n;return(r='symbol'==typeof(n=((e,r)=>{if('object'!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,r);if('object'!=typeof n)return n;throw new TypeError('@@toPrimitive must return a primitive value.')}return('string'===r?String:Number)(e)})(r,'string'))?n:n+'')in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function f(e){return e&&e.map(((e,r)=>n.createElement(e.tag,h({key:r},e.attr),f(e.child))))}function m(e){return r=>n.createElement(g,s({attr:h({},e.attr)},r),f(e.child))}function g(e){var r=r=>{var t,{attr:o,size:l,title:i}=e,a=d(e,c),u=l||r.size||'1em';return r.className&&(t=r.className),e.className&&(t=(t?t+' ':'')+e.className),n.createElement('svg',s({stroke:'currentColor',fill:'currentColor',strokeWidth:'0'},r.attr,o,a,{className:t,style:h(h({color:e.color||r.color},r.style),e.style),height:u,width:u,xmlns:'http://www.w3.org/2000/svg'}),i&&n.createElement('title',null,i),e.children)};return void 0!==a?n.createElement(a.Consumer,null,(e=>r(e))):r(i)}function b(e){return m({attr:{viewBox:'0 0 320 512'},child:[{tag:'path',attr:{d:'M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z'},child:[]}]})(e)}function v({colorSwap:t,fromLabel:n,href:o,linkLabel:i}){return r('div',{className:'flex w-full items-center gap-3',children:[e('div',{className:'w-fit',children:e(l,{colorSwap:t,href:o,children:i})}),e(b,{className:'h-6 w-6'}),e('p',{className:'font-semibold',children:n})]})}function C({children:t,colorSwap:n,header:o}){return r('div',n?{className:'divide-burnout-red/65 bg-burnout-dark-gray divide-y overflow-hidden rounded-lg text-white shadow-sm',children:[e('div',{className:'px-4 py-5 text-2xl font-bold sm:px-6',children:o}),e('div',{className:'px-4 py-5 sm:p-6',children:t})]}:{className:'divide-burnout-red/65 bg-burnout-light-gray divide-y overflow-hidden rounded-lg text-black shadow-sm',children:[e('div',{className:'px-4 py-5 text-2xl font-bold sm:px-6',children:o}),e('div',{className:'px-4 py-5 sm:p-6',children:t})]})}function w({children:r,href:n,prefetch:o=!0,target:l}){return e(t,{prefetch:o,href:n,className:'text-burnout-red hover:text-burnout-light-red burnout_gradient_underline',target:l,children:r})}function y({children:r,colorSwap:n,href:o,prefetch:l=!0,target:i}){return e(t,n?{target:i,prefetch:l,href:o,className:'bg-monsterPurple/50 hover:bg-monsterPurpleHover/50 border-monsterPurpleHover/50 hover:border-monsterPurple/10 nice-pop nice-hover-no-shadow rounded-lg border px-2 py-3 text-center font-bold backdrop-blur-sm transition-all duration-300 ease-in-out',children:r}:{target:i,prefetch:l,href:o,className:'bg-monsterGreen/50 hover:bg-monsterGreenHover/50 border-monsterGreenHover/50 hover:border-monsterGreen/10 nice-pop nice-hover-no-shadow rounded-lg border px-2 py-3 text-center font-bold backdrop-blur-sm transition-all duration-300 ease-in-out',children:r})}function x({colorSwap:t,fromLabel:n,href:o,linkLabel:l}){return r('div',{className:'flex w-full items-center gap-3',children:[e('div',{className:'w-fit',children:e(y,{colorSwap:t,href:o,children:l})}),e(b,{className:'h-6 w-6'}),e('p',{className:'font-semibold',children:n})]})}function N({children:t,colorSwap:n,header:o}){return r('div',n?{className:'divide-monsterPurple/70 bg-siteBackground/70 nice-pop border-siteBackground/20 divide-y overflow-hidden rounded-lg border text-white shadow-sm backdrop-blur-sm',children:[e('div',{className:'px-4 py-5 text-2xl font-bold sm:px-6',children:o}),e('div',{className:'px-4 py-5 sm:p-6',children:t})]}:{className:'divide-monsterPurple/70 bg-siteBackgroundLighter/70 text-siteBackground border-siteBackgroundLighter/20 nice-pop divide-y overflow-hidden rounded-lg border shadow-sm backdrop-blur-sm',children:[e('div',{className:'px-4 py-5 text-2xl font-bold sm:px-6',children:o}),e('div',{className:'px-4 py-5 sm:p-6',children:t})]})}function k({children:t,label:n}){return r('div',{className:'grid gap-3',children:[e('p',{className:'font-bold',children:n}),t]})}function O({children:r,colorSwap:n,href:o,prefetch:l=!0,target:i}){return e(t,n?{target:i,prefetch:l,href:o,className:'bg-monsterPurple hover:bg-monsterPurpleHover border-siteBackground nice-hover-burnout w-full rounded-lg border-2 px-3 py-2 text-center font-bold text-white transition-all duration-200 ease-in-out',children:r}:{target:i,prefetch:l,href:o,className:'bg-monsterGreen text-siteBackground hover:bg-monsterGreenHover border-siteBackground nice-hover-burnout w-full rounded-lg border-2 px-3 py-2 text-center font-bold transition-all duration-200 ease-in-out',children:r})}function P({colorSwap:t,fromLabel:n,href:o,linkLabel:l}){return r('div',{className:'flex w-full items-center gap-3',children:[e('div',{className:'w-fit',children:e(O,{colorSwap:t,href:o,children:l})}),e(b,{className:'h-6 w-6'}),e('p',{className:'font-semibold',children:n})]})}function S({children:t,colorSwap:n,header:o}){return r('div',n?{className:'divide-monsterPurple/65 bg-siteBackground divide-y overflow-hidden rounded-lg text-white shadow-sm',children:[e('div',{className:'px-4 py-5 text-2xl font-bold sm:px-6',children:o}),e('div',{className:'px-4 py-5 sm:p-6',children:t})]}:{className:'divide-monsterPurple/65 bg-siteBackgroundLighter text-siteBackground divide-y overflow-hidden rounded-lg shadow-sm',children:[e('div',{className:'px-4 py-5 text-2xl font-bold sm:px-6',children:o}),e('div',{className:'px-4 py-5 sm:p-6',children:t})]})}function j({children:r,href:n,prefetch:o=!0,target:l}){return e(t,{prefetch:o,href:n,className:'text-monsterGreen hover:text-monsterPurple gradient_underline',target:l,children:r})}function B({fill:t='blue'}){return'blue'===t?r('div',{role:'status',children:[r('svg',{'aria-hidden':'true',className:'h-8 w-8 animate-spin fill-blue-600 text-gray-200 dark:text-gray-600',viewBox:'0 0 100 101',fill:'none',xmlns:'http://www.w3.org/2000/svg',children:[e('path',{d:'M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z',fill:'currentColor'}),e('path',{d:'M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z',fill:'currentFill'})]}),e('span',{className:'sr-only',children:'Loading...'})]}):'green'===t?r('div',{role:'status',children:[r('svg',{'aria-hidden':'true',className:'h-8 w-8 animate-spin fill-green-600 text-gray-200 dark:text-gray-600',viewBox:'0 0 100 101',fill:'none',xmlns:'http://www.w3.org/2000/svg',children:[e('path',{d:'M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z',fill:'currentColor'}),e('path',{d:'M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z',fill:'currentFill'})]}),e('span',{className:'sr-only',children:'Loading...'})]}):'red'===t?r('div',{role:'status',children:[r('svg',{'aria-hidden':'true',className:'h-8 w-8 animate-spin fill-red-600 text-gray-200 dark:text-gray-600',viewBox:'0 0 100 101',fill:'none',xmlns:'http://www.w3.org/2000/svg',children:[e('path',{d:'M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z',fill:'currentColor'}),e('path',{d:'M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z',fill:'currentFill'})]}),e('span',{className:'sr-only',children:'Loading...'})]}):'yellow'===t?r('div',{role:'status',children:[r('svg',{'aria-hidden':'true',className:'h-8 w-8 animate-spin fill-yellow-600 text-gray-200 dark:text-gray-600',viewBox:'0 0 100 101',fill:'none',xmlns:'http://www.w3.org/2000/svg',children:[e('path',{d:'M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z',fill:'currentColor'}),e('path',{d:'M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z',fill:'currentFill'})]}),e('span',{className:'sr-only',children:'Loading...'})]}):void 0}function L(e,r){if(!e.some((e=>r.includes(e.trim()))))return o()}function E(e){return e?e.split(' ').map((e=>e.charAt(0).toUpperCase()+e.slice(1))).join(' '):''}const M={AUD:'en-AU',BRL:'pt-BR',CAD:'en-CA',CHF:'de-CH',CNY:'zh-CN',EUR:'de-DE',GBP:'en-GB',INR:'en-IN',JPY:'ja-JP',USD:'en-US'};function Z(e,r='USD'){if(null==e||''===e){return(0).toLocaleString(M[r],{style:'currency',currency:r})}const t=Number(e);if(isNaN(t))throw new TypeError('Invalid \'amountInput\': failed to convert to a number.');const n=M[r];try{return t.toLocaleString(n,{style:'currency',currency:r})}catch(e){return console.error(`Error formatting currency ${r} for locale ${n}:`,e),`Error formatting ${r}`}}const D=(e,r,t)=>{const n=new URLSearchParams(t);return n.set(e,r),n.toString()};function G(e){const r=(e=e.toString()).replace(/[^0-9.,]/g,'').replace(/,/g,''),t=parseFloat(r);return isNaN(t)?null:t}function H(e){const r=(''+e).replace(/\D/g,'');let t=r.match(/^(\d{3})(\d{3})(\d{4})$/);return t||11!==r.length||'1'!==r.charAt(0)||(t=r.match(/^1(\d{3})(\d{3})(\d{4})$/)),t?`(${t[1]}) ${t[2]}-${t[3]}`:null}function U(e){const r={};for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];r[t]='string'==typeof n?n.trim():n}return r}function $(e,r){return e.length<=r?e:e.slice(0,r)+'...'}async function z(e){try{return{data:await e,error:null}}catch(e){return{data:null,error:e}}}export{v as BurnoutBreadCrumbNext,l as BurnoutButtonLinkNext,C as BurnoutInfoCard,w as BurnoutStyledLinkNext,x as GlassMonsterBreadCrumbNext,N as GlassMonsterInfoCard,k as Info,P as MonsterBreadCrumbNext,O as MonsterButtonLinkNext,y as MonsterGlassButtonLinkNext,S as MonsterInfoCard,j as MonsterStyledLinkNext,B as TailwindLoadingSpinner,L as allowedWithPermissionsNext,E as capitalizeFirstLetters,Z as createDollarAmount,D as createQueryString,G as extractNumber,H as formatPhone,U as trimStringProperties,$ as truncateText,z as tryCatch};
//# sourceMappingURL=server.mjs.map