reusify-ui 1.0.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 ADDED
@@ -0,0 +1,12 @@
1
+ # React + Vite
2
+
3
+ This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
4
+
5
+ Currently, two official plugins are available:
6
+
7
+ - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) for Fast Refresh
8
+ - [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
9
+
10
+ ## Expanding the ESLint configuration
11
+
12
+ If you are developing a production application, we recommend using TypeScript with type-aware lint rules enabled. Check out the [TS template](https://github.com/vitejs/vite/tree/main/packages/create-vite/template-react-ts) for information on how to integrate TypeScript and [`typescript-eslint`](https://typescript-eslint.io) in your project.
@@ -0,0 +1,291 @@
1
+ import ee from "react";
2
+ var T = { exports: {} }, R = {};
3
+ /**
4
+ * @license React
5
+ * react-jsx-runtime.production.js
6
+ *
7
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
8
+ *
9
+ * This source code is licensed under the MIT license found in the
10
+ * LICENSE file in the root directory of this source tree.
11
+ */
12
+ var I;
13
+ function re() {
14
+ if (I) return R;
15
+ I = 1;
16
+ var c = Symbol.for("react.transitional.element"), m = Symbol.for("react.fragment");
17
+ function i(f, a, s) {
18
+ var E = null;
19
+ if (s !== void 0 && (E = "" + s), a.key !== void 0 && (E = "" + a.key), "key" in a) {
20
+ s = {};
21
+ for (var b in a)
22
+ b !== "key" && (s[b] = a[b]);
23
+ } else s = a;
24
+ return a = s.ref, {
25
+ $$typeof: c,
26
+ type: f,
27
+ key: E,
28
+ ref: a !== void 0 ? a : null,
29
+ props: s
30
+ };
31
+ }
32
+ return R.Fragment = m, R.jsx = i, R.jsxs = i, R;
33
+ }
34
+ var v = {};
35
+ /**
36
+ * @license React
37
+ * react-jsx-runtime.development.js
38
+ *
39
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
40
+ *
41
+ * This source code is licensed under the MIT license found in the
42
+ * LICENSE file in the root directory of this source tree.
43
+ */
44
+ var F;
45
+ function te() {
46
+ return F || (F = 1, process.env.NODE_ENV !== "production" && function() {
47
+ function c(e) {
48
+ if (e == null) return null;
49
+ if (typeof e == "function")
50
+ return e.$$typeof === Z ? null : e.displayName || e.name || null;
51
+ if (typeof e == "string") return e;
52
+ switch (e) {
53
+ case p:
54
+ return "Fragment";
55
+ case q:
56
+ return "Profiler";
57
+ case U:
58
+ return "StrictMode";
59
+ case G:
60
+ return "Suspense";
61
+ case X:
62
+ return "SuspenseList";
63
+ case H:
64
+ return "Activity";
65
+ }
66
+ if (typeof e == "object")
67
+ switch (typeof e.tag == "number" && console.error(
68
+ "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
69
+ ), e.$$typeof) {
70
+ case W:
71
+ return "Portal";
72
+ case z:
73
+ return (e.displayName || "Context") + ".Provider";
74
+ case J:
75
+ return (e._context.displayName || "Context") + ".Consumer";
76
+ case V:
77
+ var r = e.render;
78
+ return e = e.displayName, e || (e = r.displayName || r.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
79
+ case B:
80
+ return r = e.displayName || null, r !== null ? r : c(e.type) || "Memo";
81
+ case y:
82
+ r = e._payload, e = e._init;
83
+ try {
84
+ return c(e(r));
85
+ } catch {
86
+ }
87
+ }
88
+ return null;
89
+ }
90
+ function m(e) {
91
+ return "" + e;
92
+ }
93
+ function i(e) {
94
+ try {
95
+ m(e);
96
+ var r = !1;
97
+ } catch {
98
+ r = !0;
99
+ }
100
+ if (r) {
101
+ r = console;
102
+ var t = r.error, n = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
103
+ return t.call(
104
+ r,
105
+ "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
106
+ n
107
+ ), m(e);
108
+ }
109
+ }
110
+ function f(e) {
111
+ if (e === p) return "<>";
112
+ if (typeof e == "object" && e !== null && e.$$typeof === y)
113
+ return "<...>";
114
+ try {
115
+ var r = c(e);
116
+ return r ? "<" + r + ">" : "<...>";
117
+ } catch {
118
+ return "<...>";
119
+ }
120
+ }
121
+ function a() {
122
+ var e = k.A;
123
+ return e === null ? null : e.getOwner();
124
+ }
125
+ function s() {
126
+ return Error("react-stack-top-frame");
127
+ }
128
+ function E(e) {
129
+ if (j.call(e, "key")) {
130
+ var r = Object.getOwnPropertyDescriptor(e, "key").get;
131
+ if (r && r.isReactWarning) return !1;
132
+ }
133
+ return e.key !== void 0;
134
+ }
135
+ function b(e, r) {
136
+ function t() {
137
+ h || (h = !0, console.error(
138
+ "%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)",
139
+ r
140
+ ));
141
+ }
142
+ t.isReactWarning = !0, Object.defineProperty(e, "key", {
143
+ get: t,
144
+ configurable: !0
145
+ });
146
+ }
147
+ function L() {
148
+ var e = c(this.type);
149
+ return N[e] || (N[e] = !0, console.error(
150
+ "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."
151
+ )), e = this.props.ref, e !== void 0 ? e : null;
152
+ }
153
+ function M(e, r, t, n, l, u, g, A) {
154
+ return t = u.ref, e = {
155
+ $$typeof: w,
156
+ type: e,
157
+ key: r,
158
+ props: u,
159
+ _owner: l
160
+ }, (t !== void 0 ? t : null) !== null ? Object.defineProperty(e, "ref", {
161
+ enumerable: !1,
162
+ get: L
163
+ }) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
164
+ configurable: !1,
165
+ enumerable: !1,
166
+ writable: !0,
167
+ value: 0
168
+ }), Object.defineProperty(e, "_debugInfo", {
169
+ configurable: !1,
170
+ enumerable: !1,
171
+ writable: !0,
172
+ value: null
173
+ }), Object.defineProperty(e, "_debugStack", {
174
+ configurable: !1,
175
+ enumerable: !1,
176
+ writable: !0,
177
+ value: g
178
+ }), Object.defineProperty(e, "_debugTask", {
179
+ configurable: !1,
180
+ enumerable: !1,
181
+ writable: !0,
182
+ value: A
183
+ }), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
184
+ }
185
+ function S(e, r, t, n, l, u, g, A) {
186
+ var o = r.children;
187
+ if (o !== void 0)
188
+ if (n)
189
+ if (Q(o)) {
190
+ for (n = 0; n < o.length; n++)
191
+ P(o[n]);
192
+ Object.freeze && Object.freeze(o);
193
+ } else
194
+ console.error(
195
+ "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
196
+ );
197
+ else P(o);
198
+ if (j.call(r, "key")) {
199
+ o = c(e);
200
+ var d = Object.keys(r).filter(function(K) {
201
+ return K !== "key";
202
+ });
203
+ n = 0 < d.length ? "{key: someKey, " + d.join(": ..., ") + ": ...}" : "{key: someKey}", $[o + n] || (d = 0 < d.length ? "{" + d.join(": ..., ") + ": ...}" : "{}", console.error(
204
+ `A props object containing a "key" prop is being spread into JSX:
205
+ let props = %s;
206
+ <%s {...props} />
207
+ React keys must be passed directly to JSX without using spread:
208
+ let props = %s;
209
+ <%s key={someKey} {...props} />`,
210
+ n,
211
+ o,
212
+ d,
213
+ o
214
+ ), $[o + n] = !0);
215
+ }
216
+ if (o = null, t !== void 0 && (i(t), o = "" + t), E(r) && (i(r.key), o = "" + r.key), "key" in r) {
217
+ t = {};
218
+ for (var x in r)
219
+ x !== "key" && (t[x] = r[x]);
220
+ } else t = r;
221
+ return o && b(
222
+ t,
223
+ typeof e == "function" ? e.displayName || e.name || "Unknown" : e
224
+ ), M(
225
+ e,
226
+ o,
227
+ u,
228
+ l,
229
+ a(),
230
+ t,
231
+ g,
232
+ A
233
+ );
234
+ }
235
+ function P(e) {
236
+ typeof e == "object" && e !== null && e.$$typeof === w && e._store && (e._store.validated = 1);
237
+ }
238
+ var _ = ee, w = Symbol.for("react.transitional.element"), W = Symbol.for("react.portal"), p = Symbol.for("react.fragment"), U = Symbol.for("react.strict_mode"), q = Symbol.for("react.profiler"), J = Symbol.for("react.consumer"), z = Symbol.for("react.context"), V = Symbol.for("react.forward_ref"), G = Symbol.for("react.suspense"), X = Symbol.for("react.suspense_list"), B = Symbol.for("react.memo"), y = Symbol.for("react.lazy"), H = Symbol.for("react.activity"), Z = Symbol.for("react.client.reference"), k = _.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, j = Object.prototype.hasOwnProperty, Q = Array.isArray, O = console.createTask ? console.createTask : function() {
239
+ return null;
240
+ };
241
+ _ = {
242
+ "react-stack-bottom-frame": function(e) {
243
+ return e();
244
+ }
245
+ };
246
+ var h, N = {}, C = _["react-stack-bottom-frame"].bind(
247
+ _,
248
+ s
249
+ )(), Y = O(f(s)), $ = {};
250
+ v.Fragment = p, v.jsx = function(e, r, t, n, l) {
251
+ var u = 1e4 > k.recentlyCreatedOwnerStacks++;
252
+ return S(
253
+ e,
254
+ r,
255
+ t,
256
+ !1,
257
+ n,
258
+ l,
259
+ u ? Error("react-stack-top-frame") : C,
260
+ u ? O(f(e)) : Y
261
+ );
262
+ }, v.jsxs = function(e, r, t, n, l) {
263
+ var u = 1e4 > k.recentlyCreatedOwnerStacks++;
264
+ return S(
265
+ e,
266
+ r,
267
+ t,
268
+ !0,
269
+ n,
270
+ l,
271
+ u ? Error("react-stack-top-frame") : C,
272
+ u ? O(f(e)) : Y
273
+ );
274
+ };
275
+ }()), v;
276
+ }
277
+ var D;
278
+ function ne() {
279
+ return D || (D = 1, process.env.NODE_ENV === "production" ? T.exports = re() : T.exports = te()), T.exports;
280
+ }
281
+ var oe = ne();
282
+ const se = ({ children: c, variant: m = "primary", onClick: i }) => {
283
+ const f = "px-4 py-2 rounded font-medium transition-colors", a = {
284
+ primary: "bg-blue-600 text-white hover:bg-blue-700",
285
+ secondary: "bg-gray-300 text-gray-800 hover:bg-gray-400"
286
+ };
287
+ return /* @__PURE__ */ oe.jsx("button", { className: `${f} ${a[m]}`, onClick: i, children: c });
288
+ };
289
+ export {
290
+ se as Button
291
+ };
@@ -0,0 +1,22 @@
1
+ (function(l,E){typeof exports=="object"&&typeof module<"u"?E(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],E):(l=typeof globalThis<"u"?globalThis:l||self,E(l.ReusifyUI={},l.React))})(this,function(l,E){"use strict";var T={exports:{}},R={};/**
2
+ * @license React
3
+ * react-jsx-runtime.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var P;function U(){if(P)return R;P=1;var c=Symbol.for("react.transitional.element"),m=Symbol.for("react.fragment");function f(d,a,s){var p=null;if(s!==void 0&&(p=""+s),a.key!==void 0&&(p=""+a.key),"key"in a){s={};for(var _ in a)_!=="key"&&(s[_]=a[_])}else s=a;return a=s.ref,{$$typeof:c,type:d,key:p,ref:a!==void 0?a:null,props:s}}return R.Fragment=m,R.jsx=f,R.jsxs=f,R}var v={};/**
10
+ * @license React
11
+ * react-jsx-runtime.development.js
12
+ *
13
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var h;function W(){return h||(h=1,process.env.NODE_ENV!=="production"&&function(){function c(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===oe?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case O:return"Fragment";case H:return"Profiler";case B:return"StrictMode";case ee:return"Suspense";case re:return"SuspenseList";case ne: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 X:return"Portal";case Q:return(e.displayName||"Context")+".Provider";case Z:return(e._context.displayName||"Context")+".Consumer";case K:var r=e.render;return e=e.displayName,e||(e=r.displayName||r.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case te:return r=e.displayName||null,r!==null?r:c(e.type)||"Memo";case Y:r=e._payload,e=e._init;try{return c(e(r))}catch{}}return null}function m(e){return""+e}function f(e){try{m(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),m(e)}}function d(e){if(e===O)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===Y)return"<...>";try{var r=c(e);return r?"<"+r+">":"<...>"}catch{return"<...>"}}function a(){var e=y.A;return e===null?null:e.getOwner()}function s(){return Error("react-stack-top-frame")}function p(e){if(I.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(){$||($=!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 V(){var e=c(this.type);return F[e]||(F[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 G(e,r,t,n,i,u,S,x){return t=u.ref,e={$$typeof:C,type:e,key:r,props:u,_owner:i},(t!==void 0?t:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:V}):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:S}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:x}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function w(e,r,t,n,i,u,S,x){var o=r.children;if(o!==void 0)if(n)if(ae(o)){for(n=0;n<o.length;n++)N(o[n]);Object.freeze&&Object.freeze(o)}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 N(o);if(I.call(r,"key")){o=c(e);var b=Object.keys(r).filter(function(se){return se!=="key"});n=0<b.length?"{key: someKey, "+b.join(": ..., ")+": ...}":"{key: someKey}",L[o+n]||(b=0<b.length?"{"+b.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
18
+ let props = %s;
19
+ <%s {...props} />
20
+ React keys must be passed directly to JSX without using spread:
21
+ let props = %s;
22
+ <%s key={someKey} {...props} />`,n,o,b,o),L[o+n]=!0)}if(o=null,t!==void 0&&(f(t),o=""+t),p(r)&&(f(r.key),o=""+r.key),"key"in r){t={};for(var A in r)A!=="key"&&(t[A]=r[A])}else t=r;return o&&_(t,typeof e=="function"?e.displayName||e.name||"Unknown":e),G(e,o,u,i,a(),t,S,x)}function N(e){typeof e=="object"&&e!==null&&e.$$typeof===C&&e._store&&(e._store.validated=1)}var k=E,C=Symbol.for("react.transitional.element"),X=Symbol.for("react.portal"),O=Symbol.for("react.fragment"),B=Symbol.for("react.strict_mode"),H=Symbol.for("react.profiler"),Z=Symbol.for("react.consumer"),Q=Symbol.for("react.context"),K=Symbol.for("react.forward_ref"),ee=Symbol.for("react.suspense"),re=Symbol.for("react.suspense_list"),te=Symbol.for("react.memo"),Y=Symbol.for("react.lazy"),ne=Symbol.for("react.activity"),oe=Symbol.for("react.client.reference"),y=k.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=Object.prototype.hasOwnProperty,ae=Array.isArray,g=console.createTask?console.createTask:function(){return null};k={"react-stack-bottom-frame":function(e){return e()}};var $,F={},D=k["react-stack-bottom-frame"].bind(k,s)(),M=g(d(s)),L={};v.Fragment=O,v.jsx=function(e,r,t,n,i){var u=1e4>y.recentlyCreatedOwnerStacks++;return w(e,r,t,!1,n,i,u?Error("react-stack-top-frame"):D,u?g(d(e)):M)},v.jsxs=function(e,r,t,n,i){var u=1e4>y.recentlyCreatedOwnerStacks++;return w(e,r,t,!0,n,i,u?Error("react-stack-top-frame"):D,u?g(d(e)):M)}}()),v}var j;function q(){return j||(j=1,process.env.NODE_ENV==="production"?T.exports=U():T.exports=W()),T.exports}var J=q();const z=({children:c,variant:m="primary",onClick:f})=>{const d="px-4 py-2 rounded font-medium transition-colors",a={primary:"bg-blue-600 text-white hover:bg-blue-700",secondary:"bg-gray-300 text-gray-800 hover:bg-gray-400"};return J.jsx("button",{className:`${d} ${a[m]}`,onClick:f,children:c})};l.Button=z,Object.defineProperty(l,Symbol.toStringTag,{value:"Module"})});
package/dist/vite.svg ADDED
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
package/package.json ADDED
@@ -0,0 +1,34 @@
1
+ {
2
+ "name": "reusify-ui",
3
+ "private": false,
4
+ "version": "1.0.0",
5
+ "description": "A reusable React UI component library with Tailwind CSS.",
6
+ "main": "dist/reusify-ui.umd.js",
7
+ "module": "dist/reusify-ui.es.js",
8
+ "files": [
9
+ "dist"
10
+ ],
11
+ "peerDependencies": {
12
+ "react": "^18.0.0 || ^19.0.0",
13
+ "react-dom": "^18.0.0 || ^19.0.0"
14
+ },
15
+ "type": "module",
16
+ "scripts": {
17
+ "dev": "vite",
18
+ "build": "vite build",
19
+ "lint": "eslint .",
20
+ "preview": "vite preview"
21
+ },
22
+ "devDependencies": {
23
+ "@eslint/js": "^9.25.0",
24
+ "@types/react": "^19.1.2",
25
+ "@types/react-dom": "^19.1.2",
26
+ "@vitejs/plugin-react": "^4.4.1",
27
+ "eslint": "^9.25.0",
28
+ "eslint-plugin-react-hooks": "^5.2.0",
29
+ "eslint-plugin-react-refresh": "^0.4.19",
30
+ "globals": "^16.0.0",
31
+ "tailwindcss": "^4.1.7",
32
+ "vite": "^6.3.5"
33
+ }
34
+ }