@mumbo-group/ui 0.1.0
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/README.md +41 -0
- package/dist/components/Button/Button.d.ts +3 -0
- package/dist/components/Button/Button.types.d.ts +8 -0
- package/dist/components/Button/index.d.ts +2 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/genmoji.cjs.js +7 -0
- package/dist/genmoji.es.js +298 -0
- package/dist/index.d.ts +1 -0
- package/package.json +53 -0
package/README.md
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
### 🧱 1️⃣ Component-Driven Architecture (CDA)
|
|
2
|
+
|
|
3
|
+
Your structure:
|
|
4
|
+
|
|
5
|
+
button/
|
|
6
|
+
Button.tsx
|
|
7
|
+
Button.module.css
|
|
8
|
+
button.types.ts
|
|
9
|
+
index.ts
|
|
10
|
+
|
|
11
|
+
This is called component-driven architecture because:
|
|
12
|
+
|
|
13
|
+
Each component is self-contained
|
|
14
|
+
|
|
15
|
+
Logic, styles, and types live together
|
|
16
|
+
|
|
17
|
+
No global “styles/”, “types/”, “components/” dumping ground
|
|
18
|
+
|
|
19
|
+
Everything needed for Button is inside /button
|
|
20
|
+
|
|
21
|
+
This is how modern UI libraries are built.
|
|
22
|
+
|
|
23
|
+
Used by:
|
|
24
|
+
|
|
25
|
+
Shopify (Polaris design system)
|
|
26
|
+
|
|
27
|
+
Atlassian (design system)
|
|
28
|
+
|
|
29
|
+
GitHub (Primer)
|
|
30
|
+
|
|
31
|
+
## Usage
|
|
32
|
+
|
|
33
|
+
Import the library JS and the built stylesheet so consumers get the component styles:
|
|
34
|
+
|
|
35
|
+
```js
|
|
36
|
+
import React from "react";
|
|
37
|
+
import { Button } from "@mumbo/ui";
|
|
38
|
+
import "@mumbo/ui/dist/ui.css"; // or rely on bundlers reading the package `style` field
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
If you'd rather bundle the CSS into the JS automatically, configure your consumer build to import the `style` entry or use a plugin that injects CSS into JS.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type ButtonVariant = "primary" | "secondary" | "ghost";
|
|
3
|
+
export type ButtonSize = "sm" | "md" | "lg";
|
|
4
|
+
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
5
|
+
variant?: ButtonVariant;
|
|
6
|
+
size?: ButtonSize;
|
|
7
|
+
}
|
|
8
|
+
export type { ButtonProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Button';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var o=document.createElement("style");o.appendChild(document.createTextNode("._base_cd38l_1{display:inline-flex;align-items:center;justify-content:center;border-radius:8px;font-weight:600;border:none;cursor:pointer;transition:background-color .2s ease,box-shadow .2s ease}._base_cd38l_1:focus-visible{outline:2px solid #000;outline-offset:2px}._primary_cd38l_21{background-color:#194169;color:#fff}._primary_cd38l_21:hover{background-color:#143555}._secondary_cd38l_30{background-color:#f2f2f2;color:#0b1c2d}._secondary_cd38l_30:hover{background-color:#e5e5e5}._ghost_cd38l_39{background-color:transparent;color:#0b1c2d}._ghost_cd38l_39:hover{background-color:#0000000d}._sm_cd38l_50{padding:8px 12px;font-size:14px}._md_cd38l_55{padding:12px 24px;font-size:14px}._lg_cd38l_60{padding:12px 30px;font-size:14px}")),document.head.appendChild(o)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const M=require("react");function ne(t){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const a in t)if(a!=="default"){const n=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(s,a,n.get?n:{enumerable:!0,get:()=>t[a]})}}return s.default=t,Object.freeze(s)}const ae=ne(M);var v={exports:{}},m={};var D;function oe(){if(D)return m;D=1;var t=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function a(n,c,i){var d=null;if(i!==void 0&&(d=""+i),c.key!==void 0&&(d=""+c.key),"key"in c){i={};for(var _ in c)_!=="key"&&(i[_]=c[_])}else i=c;return c=i.ref,{$$typeof:t,type:n,key:d,ref:c!==void 0?c:null,props:i}}return m.Fragment=s,m.jsx=a,m.jsxs=a,m}var b={};var I;function se(){return I||(I=1,process.env.NODE_ENV!=="production"&&(function(){function t(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ee?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case R:return"Fragment";case V:return"Profiler";case J:return"StrictMode";case H:return"Suspense";case Z:return"SuspenseList";case K: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 B:return e.displayName||"Context";case G:return(e._context.displayName||"Context")+".Consumer";case X:var r=e.render;return e=e.displayName,e||(e=r.displayName||r.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Q:return r=e.displayName||null,r!==null?r:t(e.type)||"Memo";case T:r=e._payload,e=e._init;try{return t(e(r))}catch{}}return null}function s(e){return""+e}function a(e){try{s(e);var r=!1}catch{r=!0}if(r){r=console;var o=r.error,l=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return o.call(r,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",l),s(e)}}function n(e){if(e===R)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===T)return"<...>";try{var r=t(e);return r?"<"+r+">":"<...>"}catch{return"<...>"}}function c(){var e=y.A;return e===null?null:e.getOwner()}function i(){return Error("react-stack-top-frame")}function d(e){if(h.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 o(){x||(x=!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))}o.isReactWarning=!0,Object.defineProperty(e,"key",{get:o,configurable:!0})}function q(){var e=t(this.type);return N[e]||(N[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 U(e,r,o,l,p,O){var u=o.ref;return e={$$typeof:w,type:e,key:r,props:o,_owner:l},(u!==void 0?u:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:q}):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:p}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:O}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function A(e,r,o,l,p,O){var u=r.children;if(u!==void 0)if(l)if(re(u)){for(l=0;l<u.length;l++)j(u[l]);Object.freeze&&Object.freeze(u)}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 j(u);if(h.call(r,"key")){u=t(e);var f=Object.keys(r).filter(function(te){return te!=="key"});l=0<f.length?"{key: someKey, "+f.join(": ..., ")+": ...}":"{key: someKey}",$[u+l]||(f=0<f.length?"{"+f.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
3
|
+
let props = %s;
|
|
4
|
+
<%s {...props} />
|
|
5
|
+
React keys must be passed directly to JSX without using spread:
|
|
6
|
+
let props = %s;
|
|
7
|
+
<%s key={someKey} {...props} />`,l,u,f,u),$[u+l]=!0)}if(u=null,o!==void 0&&(a(o),u=""+o),d(r)&&(a(r.key),u=""+r.key),"key"in r){o={};for(var k in r)k!=="key"&&(o[k]=r[k])}else o=r;return u&&_(o,typeof e=="function"?e.displayName||e.name||"Unknown":e),U(e,u,o,c(),p,O)}function j(e){P(e)?e._store&&(e._store.validated=1):typeof e=="object"&&e!==null&&e.$$typeof===T&&(e._payload.status==="fulfilled"?P(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function P(e){return typeof e=="object"&&e!==null&&e.$$typeof===w}var E=M,w=Symbol.for("react.transitional.element"),z=Symbol.for("react.portal"),R=Symbol.for("react.fragment"),J=Symbol.for("react.strict_mode"),V=Symbol.for("react.profiler"),G=Symbol.for("react.consumer"),B=Symbol.for("react.context"),X=Symbol.for("react.forward_ref"),H=Symbol.for("react.suspense"),Z=Symbol.for("react.suspense_list"),Q=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),K=Symbol.for("react.activity"),ee=Symbol.for("react.client.reference"),y=E.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,h=Object.prototype.hasOwnProperty,re=Array.isArray,g=console.createTask?console.createTask:function(){return null};E={react_stack_bottom_frame:function(e){return e()}};var x,N={},C=E.react_stack_bottom_frame.bind(E,i)(),Y=g(n(i)),$={};b.Fragment=R,b.jsx=function(e,r,o){var l=1e4>y.recentlyCreatedOwnerStacks++;return A(e,r,o,!1,l?Error("react-stack-top-frame"):C,l?g(n(e)):Y)},b.jsxs=function(e,r,o){var l=1e4>y.recentlyCreatedOwnerStacks++;return A(e,r,o,!0,l?Error("react-stack-top-frame"):C,l?g(n(e)):Y)}})()),b}var F;function le(){return F||(F=1,process.env.NODE_ENV==="production"?v.exports=oe():v.exports=se()),v.exports}var ue=le();function L(t){var s,a,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var c=t.length;for(s=0;s<c;s++)t[s]&&(a=L(t[s]))&&(n&&(n+=" "),n+=a)}else for(a in t)t[a]&&(n&&(n+=" "),n+=a);return n}function ce(){for(var t,s,a=0,n="",c=arguments.length;a<c;a++)(t=arguments[a])&&(s=L(t))&&(n&&(n+=" "),n+=s);return n}const ie="_base_cd38l_1",fe="_primary_cd38l_21",de="_secondary_cd38l_30",_e="_ghost_cd38l_39",me="_sm_cd38l_50",be="_md_cd38l_55",Ee="_lg_cd38l_60",S={base:ie,primary:fe,secondary:de,ghost:_e,sm:me,md:be,lg:Ee},W=ae.forwardRef(({variant:t="primary",size:s="md",className:a,...n},c)=>ue.jsx("button",{ref:c,className:ce(S.base,S[t],S[s],a),...n}));W.displayName="Button";exports.Button=W;
|
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var o=document.createElement("style");o.appendChild(document.createTextNode("._base_cd38l_1{display:inline-flex;align-items:center;justify-content:center;border-radius:8px;font-weight:600;border:none;cursor:pointer;transition:background-color .2s ease,box-shadow .2s ease}._base_cd38l_1:focus-visible{outline:2px solid #000;outline-offset:2px}._primary_cd38l_21{background-color:#194169;color:#fff}._primary_cd38l_21:hover{background-color:#143555}._secondary_cd38l_30{background-color:#f2f2f2;color:#0b1c2d}._secondary_cd38l_30:hover{background-color:#e5e5e5}._ghost_cd38l_39{background-color:transparent;color:#0b1c2d}._ghost_cd38l_39:hover{background-color:#0000000d}._sm_cd38l_50{padding:8px 12px;font-size:14px}._md_cd38l_55{padding:12px 24px;font-size:14px}._lg_cd38l_60{padding:12px 30px;font-size:14px}")),document.head.appendChild(o)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
|
+
import * as re from "react";
|
|
3
|
+
import te from "react";
|
|
4
|
+
var R = { exports: {} }, d = {};
|
|
5
|
+
var I;
|
|
6
|
+
function ne() {
|
|
7
|
+
if (I) return d;
|
|
8
|
+
I = 1;
|
|
9
|
+
var t = /* @__PURE__ */ Symbol.for("react.transitional.element"), c = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
10
|
+
function l(a, u, i) {
|
|
11
|
+
var _ = null;
|
|
12
|
+
if (i !== void 0 && (_ = "" + i), u.key !== void 0 && (_ = "" + u.key), "key" in u) {
|
|
13
|
+
i = {};
|
|
14
|
+
for (var m in u)
|
|
15
|
+
m !== "key" && (i[m] = u[m]);
|
|
16
|
+
} else i = u;
|
|
17
|
+
return u = i.ref, {
|
|
18
|
+
$$typeof: t,
|
|
19
|
+
type: a,
|
|
20
|
+
key: _,
|
|
21
|
+
ref: u !== void 0 ? u : null,
|
|
22
|
+
props: i
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
return d.Fragment = c, d.jsx = l, d.jsxs = l, d;
|
|
26
|
+
}
|
|
27
|
+
var E = {};
|
|
28
|
+
var F;
|
|
29
|
+
function ae() {
|
|
30
|
+
return F || (F = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
31
|
+
function t(e) {
|
|
32
|
+
if (e == null) return null;
|
|
33
|
+
if (typeof e == "function")
|
|
34
|
+
return e.$$typeof === Q ? null : e.displayName || e.name || null;
|
|
35
|
+
if (typeof e == "string") return e;
|
|
36
|
+
switch (e) {
|
|
37
|
+
case v:
|
|
38
|
+
return "Fragment";
|
|
39
|
+
case J:
|
|
40
|
+
return "Profiler";
|
|
41
|
+
case q:
|
|
42
|
+
return "StrictMode";
|
|
43
|
+
case X:
|
|
44
|
+
return "Suspense";
|
|
45
|
+
case B:
|
|
46
|
+
return "SuspenseList";
|
|
47
|
+
case Z:
|
|
48
|
+
return "Activity";
|
|
49
|
+
}
|
|
50
|
+
if (typeof e == "object")
|
|
51
|
+
switch (typeof e.tag == "number" && console.error(
|
|
52
|
+
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
53
|
+
), e.$$typeof) {
|
|
54
|
+
case U:
|
|
55
|
+
return "Portal";
|
|
56
|
+
case z:
|
|
57
|
+
return e.displayName || "Context";
|
|
58
|
+
case V:
|
|
59
|
+
return (e._context.displayName || "Context") + ".Consumer";
|
|
60
|
+
case G:
|
|
61
|
+
var r = e.render;
|
|
62
|
+
return e = e.displayName, e || (e = r.displayName || r.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
|
|
63
|
+
case H:
|
|
64
|
+
return r = e.displayName || null, r !== null ? r : t(e.type) || "Memo";
|
|
65
|
+
case T:
|
|
66
|
+
r = e._payload, e = e._init;
|
|
67
|
+
try {
|
|
68
|
+
return t(e(r));
|
|
69
|
+
} catch {
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return null;
|
|
73
|
+
}
|
|
74
|
+
function c(e) {
|
|
75
|
+
return "" + e;
|
|
76
|
+
}
|
|
77
|
+
function l(e) {
|
|
78
|
+
try {
|
|
79
|
+
c(e);
|
|
80
|
+
var r = !1;
|
|
81
|
+
} catch {
|
|
82
|
+
r = !0;
|
|
83
|
+
}
|
|
84
|
+
if (r) {
|
|
85
|
+
r = console;
|
|
86
|
+
var n = r.error, o = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
87
|
+
return n.call(
|
|
88
|
+
r,
|
|
89
|
+
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
90
|
+
o
|
|
91
|
+
), c(e);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
function a(e) {
|
|
95
|
+
if (e === v) return "<>";
|
|
96
|
+
if (typeof e == "object" && e !== null && e.$$typeof === T)
|
|
97
|
+
return "<...>";
|
|
98
|
+
try {
|
|
99
|
+
var r = t(e);
|
|
100
|
+
return r ? "<" + r + ">" : "<...>";
|
|
101
|
+
} catch {
|
|
102
|
+
return "<...>";
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
function u() {
|
|
106
|
+
var e = y.A;
|
|
107
|
+
return e === null ? null : e.getOwner();
|
|
108
|
+
}
|
|
109
|
+
function i() {
|
|
110
|
+
return Error("react-stack-top-frame");
|
|
111
|
+
}
|
|
112
|
+
function _(e) {
|
|
113
|
+
if (x.call(e, "key")) {
|
|
114
|
+
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
115
|
+
if (r && r.isReactWarning) return !1;
|
|
116
|
+
}
|
|
117
|
+
return e.key !== void 0;
|
|
118
|
+
}
|
|
119
|
+
function m(e, r) {
|
|
120
|
+
function n() {
|
|
121
|
+
j || (j = !0, console.error(
|
|
122
|
+
"%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)",
|
|
123
|
+
r
|
|
124
|
+
));
|
|
125
|
+
}
|
|
126
|
+
n.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
127
|
+
get: n,
|
|
128
|
+
configurable: !0
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
function M() {
|
|
132
|
+
var e = t(this.type);
|
|
133
|
+
return N[e] || (N[e] = !0, console.error(
|
|
134
|
+
"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."
|
|
135
|
+
)), e = this.props.ref, e !== void 0 ? e : null;
|
|
136
|
+
}
|
|
137
|
+
function W(e, r, n, o, p, g) {
|
|
138
|
+
var s = n.ref;
|
|
139
|
+
return e = {
|
|
140
|
+
$$typeof: w,
|
|
141
|
+
type: e,
|
|
142
|
+
key: r,
|
|
143
|
+
props: n,
|
|
144
|
+
_owner: o
|
|
145
|
+
}, (s !== void 0 ? s : null) !== null ? Object.defineProperty(e, "ref", {
|
|
146
|
+
enumerable: !1,
|
|
147
|
+
get: M
|
|
148
|
+
}) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
|
|
149
|
+
configurable: !1,
|
|
150
|
+
enumerable: !1,
|
|
151
|
+
writable: !0,
|
|
152
|
+
value: 0
|
|
153
|
+
}), Object.defineProperty(e, "_debugInfo", {
|
|
154
|
+
configurable: !1,
|
|
155
|
+
enumerable: !1,
|
|
156
|
+
writable: !0,
|
|
157
|
+
value: null
|
|
158
|
+
}), Object.defineProperty(e, "_debugStack", {
|
|
159
|
+
configurable: !1,
|
|
160
|
+
enumerable: !1,
|
|
161
|
+
writable: !0,
|
|
162
|
+
value: p
|
|
163
|
+
}), Object.defineProperty(e, "_debugTask", {
|
|
164
|
+
configurable: !1,
|
|
165
|
+
enumerable: !1,
|
|
166
|
+
writable: !0,
|
|
167
|
+
value: g
|
|
168
|
+
}), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
|
|
169
|
+
}
|
|
170
|
+
function S(e, r, n, o, p, g) {
|
|
171
|
+
var s = r.children;
|
|
172
|
+
if (s !== void 0)
|
|
173
|
+
if (o)
|
|
174
|
+
if (K(s)) {
|
|
175
|
+
for (o = 0; o < s.length; o++)
|
|
176
|
+
P(s[o]);
|
|
177
|
+
Object.freeze && Object.freeze(s);
|
|
178
|
+
} else
|
|
179
|
+
console.error(
|
|
180
|
+
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
181
|
+
);
|
|
182
|
+
else P(s);
|
|
183
|
+
if (x.call(r, "key")) {
|
|
184
|
+
s = t(e);
|
|
185
|
+
var f = Object.keys(r).filter(function(ee) {
|
|
186
|
+
return ee !== "key";
|
|
187
|
+
});
|
|
188
|
+
o = 0 < f.length ? "{key: someKey, " + f.join(": ..., ") + ": ...}" : "{key: someKey}", $[s + o] || (f = 0 < f.length ? "{" + f.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
189
|
+
`A props object containing a "key" prop is being spread into JSX:
|
|
190
|
+
let props = %s;
|
|
191
|
+
<%s {...props} />
|
|
192
|
+
React keys must be passed directly to JSX without using spread:
|
|
193
|
+
let props = %s;
|
|
194
|
+
<%s key={someKey} {...props} />`,
|
|
195
|
+
o,
|
|
196
|
+
s,
|
|
197
|
+
f,
|
|
198
|
+
s
|
|
199
|
+
), $[s + o] = !0);
|
|
200
|
+
}
|
|
201
|
+
if (s = null, n !== void 0 && (l(n), s = "" + n), _(r) && (l(r.key), s = "" + r.key), "key" in r) {
|
|
202
|
+
n = {};
|
|
203
|
+
for (var A in r)
|
|
204
|
+
A !== "key" && (n[A] = r[A]);
|
|
205
|
+
} else n = r;
|
|
206
|
+
return s && m(
|
|
207
|
+
n,
|
|
208
|
+
typeof e == "function" ? e.displayName || e.name || "Unknown" : e
|
|
209
|
+
), W(
|
|
210
|
+
e,
|
|
211
|
+
s,
|
|
212
|
+
n,
|
|
213
|
+
u(),
|
|
214
|
+
p,
|
|
215
|
+
g
|
|
216
|
+
);
|
|
217
|
+
}
|
|
218
|
+
function P(e) {
|
|
219
|
+
h(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof === T && (e._payload.status === "fulfilled" ? h(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
|
|
220
|
+
}
|
|
221
|
+
function h(e) {
|
|
222
|
+
return typeof e == "object" && e !== null && e.$$typeof === w;
|
|
223
|
+
}
|
|
224
|
+
var b = te, w = /* @__PURE__ */ Symbol.for("react.transitional.element"), U = /* @__PURE__ */ Symbol.for("react.portal"), v = /* @__PURE__ */ Symbol.for("react.fragment"), q = /* @__PURE__ */ Symbol.for("react.strict_mode"), J = /* @__PURE__ */ Symbol.for("react.profiler"), V = /* @__PURE__ */ Symbol.for("react.consumer"), z = /* @__PURE__ */ Symbol.for("react.context"), G = /* @__PURE__ */ Symbol.for("react.forward_ref"), X = /* @__PURE__ */ Symbol.for("react.suspense"), B = /* @__PURE__ */ Symbol.for("react.suspense_list"), H = /* @__PURE__ */ Symbol.for("react.memo"), T = /* @__PURE__ */ Symbol.for("react.lazy"), Z = /* @__PURE__ */ Symbol.for("react.activity"), Q = /* @__PURE__ */ Symbol.for("react.client.reference"), y = b.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, x = Object.prototype.hasOwnProperty, K = Array.isArray, k = console.createTask ? console.createTask : function() {
|
|
225
|
+
return null;
|
|
226
|
+
};
|
|
227
|
+
b = {
|
|
228
|
+
react_stack_bottom_frame: function(e) {
|
|
229
|
+
return e();
|
|
230
|
+
}
|
|
231
|
+
};
|
|
232
|
+
var j, N = {}, C = b.react_stack_bottom_frame.bind(
|
|
233
|
+
b,
|
|
234
|
+
i
|
|
235
|
+
)(), Y = k(a(i)), $ = {};
|
|
236
|
+
E.Fragment = v, E.jsx = function(e, r, n) {
|
|
237
|
+
var o = 1e4 > y.recentlyCreatedOwnerStacks++;
|
|
238
|
+
return S(
|
|
239
|
+
e,
|
|
240
|
+
r,
|
|
241
|
+
n,
|
|
242
|
+
!1,
|
|
243
|
+
o ? Error("react-stack-top-frame") : C,
|
|
244
|
+
o ? k(a(e)) : Y
|
|
245
|
+
);
|
|
246
|
+
}, E.jsxs = function(e, r, n) {
|
|
247
|
+
var o = 1e4 > y.recentlyCreatedOwnerStacks++;
|
|
248
|
+
return S(
|
|
249
|
+
e,
|
|
250
|
+
r,
|
|
251
|
+
n,
|
|
252
|
+
!0,
|
|
253
|
+
o ? Error("react-stack-top-frame") : C,
|
|
254
|
+
o ? k(a(e)) : Y
|
|
255
|
+
);
|
|
256
|
+
};
|
|
257
|
+
})()), E;
|
|
258
|
+
}
|
|
259
|
+
var D;
|
|
260
|
+
function oe() {
|
|
261
|
+
return D || (D = 1, process.env.NODE_ENV === "production" ? R.exports = ne() : R.exports = ae()), R.exports;
|
|
262
|
+
}
|
|
263
|
+
var se = oe();
|
|
264
|
+
function L(t) {
|
|
265
|
+
var c, l, a = "";
|
|
266
|
+
if (typeof t == "string" || typeof t == "number") a += t;
|
|
267
|
+
else if (typeof t == "object") if (Array.isArray(t)) {
|
|
268
|
+
var u = t.length;
|
|
269
|
+
for (c = 0; c < u; c++) t[c] && (l = L(t[c])) && (a && (a += " "), a += l);
|
|
270
|
+
} else for (l in t) t[l] && (a && (a += " "), a += l);
|
|
271
|
+
return a;
|
|
272
|
+
}
|
|
273
|
+
function le() {
|
|
274
|
+
for (var t, c, l = 0, a = "", u = arguments.length; l < u; l++) (t = arguments[l]) && (c = L(t)) && (a && (a += " "), a += c);
|
|
275
|
+
return a;
|
|
276
|
+
}
|
|
277
|
+
const ue = "_base_cd38l_1", ce = "_primary_cd38l_21", ie = "_secondary_cd38l_30", fe = "_ghost_cd38l_39", _e = "_sm_cd38l_50", me = "_md_cd38l_55", de = "_lg_cd38l_60", O = {
|
|
278
|
+
base: ue,
|
|
279
|
+
primary: ce,
|
|
280
|
+
secondary: ie,
|
|
281
|
+
ghost: fe,
|
|
282
|
+
sm: _e,
|
|
283
|
+
md: me,
|
|
284
|
+
lg: de
|
|
285
|
+
}, Ee = re.forwardRef(
|
|
286
|
+
({ variant: t = "primary", size: c = "md", className: l, ...a }, u) => /* @__PURE__ */ se.jsx(
|
|
287
|
+
"button",
|
|
288
|
+
{
|
|
289
|
+
ref: u,
|
|
290
|
+
className: le(O.base, O[t], O[c], l),
|
|
291
|
+
...a
|
|
292
|
+
}
|
|
293
|
+
)
|
|
294
|
+
);
|
|
295
|
+
Ee.displayName = "Button";
|
|
296
|
+
export {
|
|
297
|
+
Ee as Button
|
|
298
|
+
};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components';
|
package/package.json
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@mumbo-group/ui",
|
|
3
|
+
"description": "Mumbo UI - Preset styled React components",
|
|
4
|
+
"version": "0.1.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/genmoji.cjs.js",
|
|
7
|
+
"module": "dist/genmoji.es.js",
|
|
8
|
+
"types": "dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/genmoji.es.js",
|
|
13
|
+
"require": "./dist/genmoji.cjs.js"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"dist"
|
|
18
|
+
],
|
|
19
|
+
"publishConfig": {
|
|
20
|
+
"access": "public"
|
|
21
|
+
},
|
|
22
|
+
"scripts": {
|
|
23
|
+
"dev": "vite",
|
|
24
|
+
"build": "tsc && vite build",
|
|
25
|
+
"lint": "eslint .",
|
|
26
|
+
"test": "vitest",
|
|
27
|
+
"preview": "vite preview"
|
|
28
|
+
},
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"react": "^19.2.0",
|
|
31
|
+
"react-dom": "^19.2.0"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@eslint/js": "^9.39.1",
|
|
35
|
+
"@types/ajv": "^0.0.5",
|
|
36
|
+
"@types/node": "^24.10.1",
|
|
37
|
+
"@types/react": "^19.2.7",
|
|
38
|
+
"@types/react-dom": "^19.2.3",
|
|
39
|
+
"@vitejs/plugin-react": "^5.1.1",
|
|
40
|
+
"ajv": "^8.18.0",
|
|
41
|
+
"clsx": "^2.1.1",
|
|
42
|
+
"eslint": "^9.39.1",
|
|
43
|
+
"eslint-plugin-react-hooks": "^7.0.1",
|
|
44
|
+
"eslint-plugin-react-refresh": "^0.4.24",
|
|
45
|
+
"globals": "^16.5.0",
|
|
46
|
+
"typescript": "~5.9.3",
|
|
47
|
+
"typescript-eslint": "^8.48.0",
|
|
48
|
+
"vite": "^7.3.1",
|
|
49
|
+
"vite-plugin-css-injected-by-js": "^3.5.2",
|
|
50
|
+
"vite-plugin-dts": "^4.5.4",
|
|
51
|
+
"vitest": "^3.2.4"
|
|
52
|
+
}
|
|
53
|
+
}
|