@usernamedev/ui 0.0.1
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/dist/index.cjs +6 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +268 -0
- package/dist/ui.css +1 -0
- package/package.json +22 -0
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ee=require("react");var v={exports:{}},_={};var $;function re(){if($)return _;$=1;var l=Symbol.for("react.transitional.element"),u=Symbol.for("react.fragment");function i(f,o,s){var d=null;if(s!==void 0&&(d=""+s),o.key!==void 0&&(d=""+o.key),"key"in o){s={};for(var m in o)m!=="key"&&(s[m]=o[m])}else s=o;return o=s.ref,{$$typeof:l,type:f,key:d,ref:o!==void 0?o:null,props:s}}return _.Fragment=u,_.jsx=i,_.jsxs=i,_}var E={};var I;function te(){return I||(I=1,process.env.NODE_ENV!=="production"&&(function(){function l(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Z?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case T:return"Fragment";case q:return"Profiler";case U:return"StrictMode";case G:return"Suspense";case X:return"SuspenseList";case H: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 W:return"Portal";case V:return e.displayName||"Context";case J:return(e._context.displayName||"Context")+".Consumer";case z:var r=e.render;return e=e.displayName,e||(e=r.displayName||r.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case B:return r=e.displayName||null,r!==null?r:l(e.type)||"Memo";case p:r=e._payload,e=e._init;try{return l(e(r))}catch{}}return null}function u(e){return""+e}function i(e){try{u(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),u(e)}}function f(e){if(e===T)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===p)return"<...>";try{var r=l(e);return r?"<"+r+">":"<...>"}catch{return"<...>"}}function o(){var e=k.A;return e===null?null:e.getOwner()}function s(){return Error("react-stack-top-frame")}function d(e){if(w.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function m(e,r){function t(){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))}t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}function M(){var e=l(this.type);return h[e]||(h[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 L(e,r,t,n,R,O){var a=t.ref;return e={$$typeof:j,type:e,key:r,props:t,_owner:n},(a!==void 0?a:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:M}):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:R}),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,t,n,R,O){var a=r.children;if(a!==void 0)if(n)if(Q(a)){for(n=0;n<a.length;n++)P(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 P(a);if(w.call(r,"key")){a=l(e);var c=Object.keys(r).filter(function(K){return K!=="key"});n=0<c.length?"{key: someKey, "+c.join(": ..., ")+": ...}":"{key: someKey}",Y[a+n]||(c=0<c.length?"{"+c.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
2
|
+
let props = %s;
|
|
3
|
+
<%s {...props} />
|
|
4
|
+
React keys must be passed directly to JSX without using spread:
|
|
5
|
+
let props = %s;
|
|
6
|
+
<%s key={someKey} {...props} />`,n,a,c,a),Y[a+n]=!0)}if(a=null,t!==void 0&&(i(t),a=""+t),d(r)&&(i(r.key),a=""+r.key),"key"in r){t={};for(var S in r)S!=="key"&&(t[S]=r[S])}else t=r;return a&&m(t,typeof e=="function"?e.displayName||e.name||"Unknown":e),L(e,a,t,o(),R,O)}function P(e){y(e)?e._store&&(e._store.validated=1):typeof e=="object"&&e!==null&&e.$$typeof===p&&(e._payload.status==="fulfilled"?y(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function y(e){return typeof e=="object"&&e!==null&&e.$$typeof===j}var b=ee,j=Symbol.for("react.transitional.element"),W=Symbol.for("react.portal"),T=Symbol.for("react.fragment"),U=Symbol.for("react.strict_mode"),q=Symbol.for("react.profiler"),J=Symbol.for("react.consumer"),V=Symbol.for("react.context"),z=Symbol.for("react.forward_ref"),G=Symbol.for("react.suspense"),X=Symbol.for("react.suspense_list"),B=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),H=Symbol.for("react.activity"),Z=Symbol.for("react.client.reference"),k=b.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,w=Object.prototype.hasOwnProperty,Q=Array.isArray,g=console.createTask?console.createTask:function(){return null};b={react_stack_bottom_frame:function(e){return e()}};var x,h={},N=b.react_stack_bottom_frame.bind(b,s)(),C=g(f(s)),Y={};E.Fragment=T,E.jsx=function(e,r,t){var n=1e4>k.recentlyCreatedOwnerStacks++;return A(e,r,t,!1,n?Error("react-stack-top-frame"):N,n?g(f(e)):C)},E.jsxs=function(e,r,t){var n=1e4>k.recentlyCreatedOwnerStacks++;return A(e,r,t,!0,n?Error("react-stack-top-frame"):N,n?g(f(e)):C)}})()),E}var F;function ne(){return F||(F=1,process.env.NODE_ENV==="production"?v.exports=re():v.exports=te()),v.exports}var D=ne();const ae=({onClick:l,icon:u})=>D.jsx("button",{onClick:l,className:"toggle-button",children:D.jsx("span",{className:"toggle-button__icon",children:u})});exports.ToggleButton=ae;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
import ee from "react";
|
|
2
|
+
var v = { exports: {} }, _ = {};
|
|
3
|
+
var $;
|
|
4
|
+
function re() {
|
|
5
|
+
if ($) return _;
|
|
6
|
+
$ = 1;
|
|
7
|
+
var l = /* @__PURE__ */ Symbol.for("react.transitional.element"), u = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
8
|
+
function i(f, o, s) {
|
|
9
|
+
var d = null;
|
|
10
|
+
if (s !== void 0 && (d = "" + s), o.key !== void 0 && (d = "" + o.key), "key" in o) {
|
|
11
|
+
s = {};
|
|
12
|
+
for (var m in o)
|
|
13
|
+
m !== "key" && (s[m] = o[m]);
|
|
14
|
+
} else s = o;
|
|
15
|
+
return o = s.ref, {
|
|
16
|
+
$$typeof: l,
|
|
17
|
+
type: f,
|
|
18
|
+
key: d,
|
|
19
|
+
ref: o !== void 0 ? o : null,
|
|
20
|
+
props: s
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
return _.Fragment = u, _.jsx = i, _.jsxs = i, _;
|
|
24
|
+
}
|
|
25
|
+
var E = {};
|
|
26
|
+
var I;
|
|
27
|
+
function te() {
|
|
28
|
+
return I || (I = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
29
|
+
function l(e) {
|
|
30
|
+
if (e == null) return null;
|
|
31
|
+
if (typeof e == "function")
|
|
32
|
+
return e.$$typeof === Z ? null : e.displayName || e.name || null;
|
|
33
|
+
if (typeof e == "string") return e;
|
|
34
|
+
switch (e) {
|
|
35
|
+
case p:
|
|
36
|
+
return "Fragment";
|
|
37
|
+
case q:
|
|
38
|
+
return "Profiler";
|
|
39
|
+
case U:
|
|
40
|
+
return "StrictMode";
|
|
41
|
+
case G:
|
|
42
|
+
return "Suspense";
|
|
43
|
+
case X:
|
|
44
|
+
return "SuspenseList";
|
|
45
|
+
case H:
|
|
46
|
+
return "Activity";
|
|
47
|
+
}
|
|
48
|
+
if (typeof e == "object")
|
|
49
|
+
switch (typeof e.tag == "number" && console.error(
|
|
50
|
+
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
51
|
+
), e.$$typeof) {
|
|
52
|
+
case W:
|
|
53
|
+
return "Portal";
|
|
54
|
+
case V:
|
|
55
|
+
return e.displayName || "Context";
|
|
56
|
+
case J:
|
|
57
|
+
return (e._context.displayName || "Context") + ".Consumer";
|
|
58
|
+
case z:
|
|
59
|
+
var r = e.render;
|
|
60
|
+
return e = e.displayName, e || (e = r.displayName || r.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
|
|
61
|
+
case B:
|
|
62
|
+
return r = e.displayName || null, r !== null ? r : l(e.type) || "Memo";
|
|
63
|
+
case T:
|
|
64
|
+
r = e._payload, e = e._init;
|
|
65
|
+
try {
|
|
66
|
+
return l(e(r));
|
|
67
|
+
} catch {
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
return null;
|
|
71
|
+
}
|
|
72
|
+
function u(e) {
|
|
73
|
+
return "" + e;
|
|
74
|
+
}
|
|
75
|
+
function i(e) {
|
|
76
|
+
try {
|
|
77
|
+
u(e);
|
|
78
|
+
var r = !1;
|
|
79
|
+
} catch {
|
|
80
|
+
r = !0;
|
|
81
|
+
}
|
|
82
|
+
if (r) {
|
|
83
|
+
r = console;
|
|
84
|
+
var t = r.error, n = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
85
|
+
return t.call(
|
|
86
|
+
r,
|
|
87
|
+
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
88
|
+
n
|
|
89
|
+
), u(e);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
function f(e) {
|
|
93
|
+
if (e === p) return "<>";
|
|
94
|
+
if (typeof e == "object" && e !== null && e.$$typeof === T)
|
|
95
|
+
return "<...>";
|
|
96
|
+
try {
|
|
97
|
+
var r = l(e);
|
|
98
|
+
return r ? "<" + r + ">" : "<...>";
|
|
99
|
+
} catch {
|
|
100
|
+
return "<...>";
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
function o() {
|
|
104
|
+
var e = k.A;
|
|
105
|
+
return e === null ? null : e.getOwner();
|
|
106
|
+
}
|
|
107
|
+
function s() {
|
|
108
|
+
return Error("react-stack-top-frame");
|
|
109
|
+
}
|
|
110
|
+
function d(e) {
|
|
111
|
+
if (w.call(e, "key")) {
|
|
112
|
+
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
113
|
+
if (r && r.isReactWarning) return !1;
|
|
114
|
+
}
|
|
115
|
+
return e.key !== void 0;
|
|
116
|
+
}
|
|
117
|
+
function m(e, r) {
|
|
118
|
+
function t() {
|
|
119
|
+
y || (y = !0, console.error(
|
|
120
|
+
"%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)",
|
|
121
|
+
r
|
|
122
|
+
));
|
|
123
|
+
}
|
|
124
|
+
t.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
125
|
+
get: t,
|
|
126
|
+
configurable: !0
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
function L() {
|
|
130
|
+
var e = l(this.type);
|
|
131
|
+
return h[e] || (h[e] = !0, console.error(
|
|
132
|
+
"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."
|
|
133
|
+
)), e = this.props.ref, e !== void 0 ? e : null;
|
|
134
|
+
}
|
|
135
|
+
function M(e, r, t, n, b, A) {
|
|
136
|
+
var a = t.ref;
|
|
137
|
+
return e = {
|
|
138
|
+
$$typeof: j,
|
|
139
|
+
type: e,
|
|
140
|
+
key: r,
|
|
141
|
+
props: t,
|
|
142
|
+
_owner: n
|
|
143
|
+
}, (a !== void 0 ? a : null) !== null ? Object.defineProperty(e, "ref", {
|
|
144
|
+
enumerable: !1,
|
|
145
|
+
get: L
|
|
146
|
+
}) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
|
|
147
|
+
configurable: !1,
|
|
148
|
+
enumerable: !1,
|
|
149
|
+
writable: !0,
|
|
150
|
+
value: 0
|
|
151
|
+
}), Object.defineProperty(e, "_debugInfo", {
|
|
152
|
+
configurable: !1,
|
|
153
|
+
enumerable: !1,
|
|
154
|
+
writable: !0,
|
|
155
|
+
value: null
|
|
156
|
+
}), Object.defineProperty(e, "_debugStack", {
|
|
157
|
+
configurable: !1,
|
|
158
|
+
enumerable: !1,
|
|
159
|
+
writable: !0,
|
|
160
|
+
value: b
|
|
161
|
+
}), Object.defineProperty(e, "_debugTask", {
|
|
162
|
+
configurable: !1,
|
|
163
|
+
enumerable: !1,
|
|
164
|
+
writable: !0,
|
|
165
|
+
value: A
|
|
166
|
+
}), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
|
|
167
|
+
}
|
|
168
|
+
function S(e, r, t, n, b, A) {
|
|
169
|
+
var a = r.children;
|
|
170
|
+
if (a !== void 0)
|
|
171
|
+
if (n)
|
|
172
|
+
if (Q(a)) {
|
|
173
|
+
for (n = 0; n < a.length; n++)
|
|
174
|
+
P(a[n]);
|
|
175
|
+
Object.freeze && Object.freeze(a);
|
|
176
|
+
} else
|
|
177
|
+
console.error(
|
|
178
|
+
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
179
|
+
);
|
|
180
|
+
else P(a);
|
|
181
|
+
if (w.call(r, "key")) {
|
|
182
|
+
a = l(e);
|
|
183
|
+
var c = Object.keys(r).filter(function(K) {
|
|
184
|
+
return K !== "key";
|
|
185
|
+
});
|
|
186
|
+
n = 0 < c.length ? "{key: someKey, " + c.join(": ..., ") + ": ...}" : "{key: someKey}", Y[a + n] || (c = 0 < c.length ? "{" + c.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
187
|
+
`A props object containing a "key" prop is being spread into JSX:
|
|
188
|
+
let props = %s;
|
|
189
|
+
<%s {...props} />
|
|
190
|
+
React keys must be passed directly to JSX without using spread:
|
|
191
|
+
let props = %s;
|
|
192
|
+
<%s key={someKey} {...props} />`,
|
|
193
|
+
n,
|
|
194
|
+
a,
|
|
195
|
+
c,
|
|
196
|
+
a
|
|
197
|
+
), Y[a + n] = !0);
|
|
198
|
+
}
|
|
199
|
+
if (a = null, t !== void 0 && (i(t), a = "" + t), d(r) && (i(r.key), a = "" + r.key), "key" in r) {
|
|
200
|
+
t = {};
|
|
201
|
+
for (var g in r)
|
|
202
|
+
g !== "key" && (t[g] = r[g]);
|
|
203
|
+
} else t = r;
|
|
204
|
+
return a && m(
|
|
205
|
+
t,
|
|
206
|
+
typeof e == "function" ? e.displayName || e.name || "Unknown" : e
|
|
207
|
+
), M(
|
|
208
|
+
e,
|
|
209
|
+
a,
|
|
210
|
+
t,
|
|
211
|
+
o(),
|
|
212
|
+
b,
|
|
213
|
+
A
|
|
214
|
+
);
|
|
215
|
+
}
|
|
216
|
+
function P(e) {
|
|
217
|
+
x(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof === T && (e._payload.status === "fulfilled" ? x(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
|
|
218
|
+
}
|
|
219
|
+
function x(e) {
|
|
220
|
+
return typeof e == "object" && e !== null && e.$$typeof === j;
|
|
221
|
+
}
|
|
222
|
+
var R = ee, j = /* @__PURE__ */ Symbol.for("react.transitional.element"), W = /* @__PURE__ */ Symbol.for("react.portal"), p = /* @__PURE__ */ Symbol.for("react.fragment"), U = /* @__PURE__ */ Symbol.for("react.strict_mode"), q = /* @__PURE__ */ Symbol.for("react.profiler"), J = /* @__PURE__ */ Symbol.for("react.consumer"), V = /* @__PURE__ */ Symbol.for("react.context"), z = /* @__PURE__ */ Symbol.for("react.forward_ref"), G = /* @__PURE__ */ Symbol.for("react.suspense"), X = /* @__PURE__ */ Symbol.for("react.suspense_list"), B = /* @__PURE__ */ Symbol.for("react.memo"), T = /* @__PURE__ */ Symbol.for("react.lazy"), H = /* @__PURE__ */ Symbol.for("react.activity"), Z = /* @__PURE__ */ Symbol.for("react.client.reference"), k = R.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, w = Object.prototype.hasOwnProperty, Q = Array.isArray, O = console.createTask ? console.createTask : function() {
|
|
223
|
+
return null;
|
|
224
|
+
};
|
|
225
|
+
R = {
|
|
226
|
+
react_stack_bottom_frame: function(e) {
|
|
227
|
+
return e();
|
|
228
|
+
}
|
|
229
|
+
};
|
|
230
|
+
var y, h = {}, N = R.react_stack_bottom_frame.bind(
|
|
231
|
+
R,
|
|
232
|
+
s
|
|
233
|
+
)(), C = O(f(s)), Y = {};
|
|
234
|
+
E.Fragment = p, E.jsx = function(e, r, t) {
|
|
235
|
+
var n = 1e4 > k.recentlyCreatedOwnerStacks++;
|
|
236
|
+
return S(
|
|
237
|
+
e,
|
|
238
|
+
r,
|
|
239
|
+
t,
|
|
240
|
+
!1,
|
|
241
|
+
n ? Error("react-stack-top-frame") : N,
|
|
242
|
+
n ? O(f(e)) : C
|
|
243
|
+
);
|
|
244
|
+
}, E.jsxs = function(e, r, t) {
|
|
245
|
+
var n = 1e4 > k.recentlyCreatedOwnerStacks++;
|
|
246
|
+
return S(
|
|
247
|
+
e,
|
|
248
|
+
r,
|
|
249
|
+
t,
|
|
250
|
+
!0,
|
|
251
|
+
n ? Error("react-stack-top-frame") : N,
|
|
252
|
+
n ? O(f(e)) : C
|
|
253
|
+
);
|
|
254
|
+
};
|
|
255
|
+
})()), E;
|
|
256
|
+
}
|
|
257
|
+
var F;
|
|
258
|
+
function ne() {
|
|
259
|
+
return F || (F = 1, process.env.NODE_ENV === "production" ? v.exports = re() : v.exports = te()), v.exports;
|
|
260
|
+
}
|
|
261
|
+
var D = ne();
|
|
262
|
+
const oe = ({
|
|
263
|
+
onClick: l,
|
|
264
|
+
icon: u
|
|
265
|
+
}) => /* @__PURE__ */ D.jsx("button", { onClick: l, className: "toggle-button", children: /* @__PURE__ */ D.jsx("span", { className: "toggle-button__icon", children: u }) });
|
|
266
|
+
export {
|
|
267
|
+
oe as ToggleButton
|
|
268
|
+
};
|
package/dist/ui.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.toggle-button{background:none;border:none;padding:0;margin:0;cursor:pointer;outline:none;width:38px;height:38px;display:flex;align-items:center;justify-content:center}.toggle-button__icon{width:38px;height:38px;color:var(--text-main)}
|
package/package.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@usernamedev/ui",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"private": false,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.cjs",
|
|
7
|
+
"module": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"files": [
|
|
10
|
+
"dist"
|
|
11
|
+
],
|
|
12
|
+
"sideEffects": [
|
|
13
|
+
"**/*.css"
|
|
14
|
+
],
|
|
15
|
+
"peerDependencies": {
|
|
16
|
+
"react": ">=18",
|
|
17
|
+
"react-dom": ">=18"
|
|
18
|
+
},
|
|
19
|
+
"scripts": {
|
|
20
|
+
"build": "vite build"
|
|
21
|
+
}
|
|
22
|
+
}
|