@dariobrozzi/c64-design-system
Version:
A vintage Design System inspired on Commodore interface
23 lines (22 loc) • 7.91 kB
JavaScript
(function(u,b){typeof exports=="object"&&typeof module<"u"?b(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],b):(u=typeof globalThis<"u"?globalThis:u||self,b(u["c64-design-system"]={},u.React))})(this,function(u,b){"use strict";var x={exports:{}},p={};/**
* @license React
* react-jsx-runtime.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var A;function W(){if(A)return p;A=1;var o=Symbol.for("react.transitional.element"),c=Symbol.for("react.fragment");function i(d,s,l){var T=null;if(l!==void 0&&(T=""+l),s.key!==void 0&&(T=""+s.key),"key"in s){l={};for(var _ in s)_!=="key"&&(l[_]=s[_])}else l=s;return s=l.ref,{$$typeof:o,type:d,key:T,ref:s!==void 0?s:null,props:l}}return p.Fragment=c,p.jsx=i,p.jsxs=i,p}var R={};/**
* @license React
* react-jsx-runtime.development.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var P;function U(){return P||(P=1,process.env.NODE_ENV!=="production"&&function(){function o(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ie?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case g:return"Fragment";case K:return"Profiler";case Q:return"StrictMode";case ne:return"Suspense";case ae:return"SuspenseList";case se:return"Activity"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case Z:return"Portal";case re:return(e.displayName||"Context")+".Provider";case ee:return(e._context.displayName||"Context")+".Consumer";case te:var r=e.render;return e=e.displayName,e||(e=r.displayName||r.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case oe:return r=e.displayName||null,r!==null?r:o(e.type)||"Memo";case F:r=e._payload,e=e._init;try{return o(e(r))}catch{}}return null}function c(e){return""+e}function i(e){try{c(e);var r=!1}catch{r=!0}if(r){r=console;var t=r.error,n=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t.call(r,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",n),c(e)}}function d(e){if(e===g)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===F)return"<...>";try{var r=o(e);return r?"<"+r+">":"<...>"}catch{return"<...>"}}function s(){var e=k.A;return e===null?null:e.getOwner()}function l(){return Error("react-stack-top-frame")}function T(e){if($.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function _(e,r){function t(){D||(D=!0,console.error("%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://react.dev/link/special-props)",r))}t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}function H(){var e=o(this.type);return I[e]||(I[e]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),e=this.props.ref,e!==void 0?e:null}function X(e,r,t,n,v,f,j,S){return t=f.ref,e={$$typeof:Y,type:e,key:r,props:f,_owner:v},(t!==void 0?t:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:H}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:j}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:S}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function N(e,r,t,n,v,f,j,S){var a=r.children;if(a!==void 0)if(n)if(ce(a)){for(n=0;n<a.length;n++)C(a[n]);Object.freeze&&Object.freeze(a)}else console.error("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 C(a);if($.call(r,"key")){a=o(e);var E=Object.keys(r).filter(function(ue){return ue!=="key"});n=0<E.length?"{key: someKey, "+E.join(": ..., ")+": ...}":"{key: someKey}",M[a+n]||(E=0<E.length?"{"+E.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
let props = %s;
<%s {...props} />
React keys must be passed directly to JSX without using spread:
let props = %s;
<%s key={someKey} {...props} />`,n,a,E,a),M[a+n]=!0)}if(a=null,t!==void 0&&(i(t),a=""+t),T(r)&&(i(r.key),a=""+r.key),"key"in r){t={};for(var O in r)O!=="key"&&(t[O]=r[O])}else t=r;return a&&_(t,typeof e=="function"?e.displayName||e.name||"Unknown":e),X(e,a,f,v,s(),t,j,S)}function C(e){typeof e=="object"&&e!==null&&e.$$typeof===Y&&e._store&&(e._store.validated=1)}var y=b,Y=Symbol.for("react.transitional.element"),Z=Symbol.for("react.portal"),g=Symbol.for("react.fragment"),Q=Symbol.for("react.strict_mode"),K=Symbol.for("react.profiler"),ee=Symbol.for("react.consumer"),re=Symbol.for("react.context"),te=Symbol.for("react.forward_ref"),ne=Symbol.for("react.suspense"),ae=Symbol.for("react.suspense_list"),oe=Symbol.for("react.memo"),F=Symbol.for("react.lazy"),se=Symbol.for("react.activity"),ie=Symbol.for("react.client.reference"),k=y.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$=Object.prototype.hasOwnProperty,ce=Array.isArray,h=console.createTask?console.createTask:function(){return null};y={"react-stack-bottom-frame":function(e){return e()}};var D,I={},L=y["react-stack-bottom-frame"].bind(y,l)(),z=h(d(l)),M={};R.Fragment=g,R.jsx=function(e,r,t,n,v){var f=1e4>k.recentlyCreatedOwnerStacks++;return N(e,r,t,!1,n,v,f?Error("react-stack-top-frame"):L,f?h(d(e)):z)},R.jsxs=function(e,r,t,n,v){var f=1e4>k.recentlyCreatedOwnerStacks++;return N(e,r,t,!0,n,v,f?Error("react-stack-top-frame"):L,f?h(d(e)):z)}}()),R}var w;function q(){return w||(w=1,process.env.NODE_ENV==="production"?x.exports=W():x.exports=U()),x.exports}var m=q();function J({children:o,size:c="base",level:i=1,c64:d=!0,centered:s=!1}){return m.jsx("div",{role:"heading","aria-level":i,style:{fontFamily:d?"var(--text-font-c64-pro-name)":"var(--text-font-system)",fontSize:`var(--text-size-${c})`,textAlign:s?"center":"start",paddingTop:"var(--spacing-4)",paddingBottom:"var(--spacing-4)"},children:o})}function V({children:o,size:c="medium",...i}){return m.jsx("a",{style:{fontFamily:"var(--text-font-system)",fontSize:`var(--text-size-${c})`,color:"var(--link-primary)",textDecoration:"underline",textDecorationColor:"var(--link-primary)"},...i,children:o})}function G({children:o,as:c="p",size:i="base",c64:d=!1,centered:s=!1}){return m.jsx(c,{style:{fontFamily:d?"var(--text-font-c64-pro-name)":"var(--text-font-system)",fontSize:`var(--text-size-${i})`,textAlign:s?"center":"start",lineHeight:1.5},children:o})}function B({children:o,header:c,footer:i}){return m.jsx("div",{style:{background:"var(--background-secondary)",fontFamily:"var(--text-font-system)",height:"100vh",padding:"var(--spacing-10)"},children:m.jsxs("div",{style:{position:"relative",background:"var(--background-primary)",color:"var(--text-primary)",height:"calc(100vh - var(--spacing-10) * 2)",overflowY:"auto"},children:[c&&m.jsx("header",{children:c}),m.jsx("main",{children:o}),i&&m.jsx("footer",{children:i})]})})}u.BasicLayout=B,u.Heading=J,u.Link=V,u.Text=G,Object.defineProperty(u,Symbol.toStringTag,{value:"Module"})});