pure-react-ui 1.3.0 → 1.4.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.
@@ -0,0 +1,286 @@
1
+ import ee from "react";
2
+ var p = { exports: {} }, _ = {};
3
+ var I;
4
+ function re() {
5
+ if (I) return _;
6
+ I = 1;
7
+ var l = /* @__PURE__ */ Symbol.for("react.transitional.element"), d = /* @__PURE__ */ Symbol.for("react.fragment");
8
+ function u(c, o, s) {
9
+ var i = null;
10
+ if (s !== void 0 && (i = "" + s), o.key !== void 0 && (i = "" + o.key), "key" in o) {
11
+ s = {};
12
+ for (var f in o)
13
+ f !== "key" && (s[f] = o[f]);
14
+ } else s = o;
15
+ return o = s.ref, {
16
+ $$typeof: l,
17
+ type: c,
18
+ key: i,
19
+ ref: o !== void 0 ? o : null,
20
+ props: s
21
+ };
22
+ }
23
+ return _.Fragment = d, _.jsx = u, _.jsxs = u, _;
24
+ }
25
+ var E = {};
26
+ var F;
27
+ function te() {
28
+ return F || (F = 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 T:
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 k:
64
+ r = e._payload, e = e._init;
65
+ try {
66
+ return l(e(r));
67
+ } catch {
68
+ }
69
+ }
70
+ return null;
71
+ }
72
+ function d(e) {
73
+ return "" + e;
74
+ }
75
+ function u(e) {
76
+ try {
77
+ d(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
+ ), d(e);
90
+ }
91
+ }
92
+ function c(e) {
93
+ if (e === T) return "<>";
94
+ if (typeof e == "object" && e !== null && e.$$typeof === k)
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 = O.A;
105
+ return e === null ? null : e.getOwner();
106
+ }
107
+ function s() {
108
+ return Error("react-stack-top-frame");
109
+ }
110
+ function i(e) {
111
+ if (h.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 f(e, r) {
118
+ function t() {
119
+ N || (N = !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 g[e] || (g[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, R, A) {
136
+ var a = t.ref;
137
+ return e = {
138
+ $$typeof: y,
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: R
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, R, 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
+ j(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 j(a);
181
+ if (h.call(r, "key")) {
182
+ a = l(e);
183
+ var m = Object.keys(r).filter(function(K) {
184
+ return K !== "key";
185
+ });
186
+ n = 0 < m.length ? "{key: someKey, " + m.join(": ..., ") + ": ...}" : "{key: someKey}", $[a + n] || (m = 0 < m.length ? "{" + m.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
+ m,
196
+ a
197
+ ), $[a + n] = !0);
198
+ }
199
+ if (a = null, t !== void 0 && (u(t), a = "" + t), i(r) && (u(r.key), a = "" + r.key), "key" in r) {
200
+ t = {};
201
+ for (var P in r)
202
+ P !== "key" && (t[P] = r[P]);
203
+ } else t = r;
204
+ return a && f(
205
+ t,
206
+ typeof e == "function" ? e.displayName || e.name || "Unknown" : e
207
+ ), M(
208
+ e,
209
+ a,
210
+ t,
211
+ o(),
212
+ R,
213
+ A
214
+ );
215
+ }
216
+ function j(e) {
217
+ w(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof === k && (e._payload.status === "fulfilled" ? w(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
218
+ }
219
+ function w(e) {
220
+ return typeof e == "object" && e !== null && e.$$typeof === y;
221
+ }
222
+ var b = ee, y = /* @__PURE__ */ Symbol.for("react.transitional.element"), W = /* @__PURE__ */ Symbol.for("react.portal"), T = /* @__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"), k = /* @__PURE__ */ Symbol.for("react.lazy"), H = /* @__PURE__ */ Symbol.for("react.activity"), Z = /* @__PURE__ */ Symbol.for("react.client.reference"), O = b.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, h = Object.prototype.hasOwnProperty, Q = Array.isArray, x = console.createTask ? console.createTask : function() {
223
+ return null;
224
+ };
225
+ b = {
226
+ react_stack_bottom_frame: function(e) {
227
+ return e();
228
+ }
229
+ };
230
+ var N, g = {}, C = b.react_stack_bottom_frame.bind(
231
+ b,
232
+ s
233
+ )(), Y = x(c(s)), $ = {};
234
+ E.Fragment = T, E.jsx = function(e, r, t) {
235
+ var n = 1e4 > O.recentlyCreatedOwnerStacks++;
236
+ return S(
237
+ e,
238
+ r,
239
+ t,
240
+ !1,
241
+ n ? Error("react-stack-top-frame") : C,
242
+ n ? x(c(e)) : Y
243
+ );
244
+ }, E.jsxs = function(e, r, t) {
245
+ var n = 1e4 > O.recentlyCreatedOwnerStacks++;
246
+ return S(
247
+ e,
248
+ r,
249
+ t,
250
+ !0,
251
+ n ? Error("react-stack-top-frame") : C,
252
+ n ? x(c(e)) : Y
253
+ );
254
+ };
255
+ })()), E;
256
+ }
257
+ var D;
258
+ function ne() {
259
+ return D || (D = 1, process.env.NODE_ENV === "production" ? p.exports = re() : p.exports = te()), p.exports;
260
+ }
261
+ var v = ne();
262
+ const oe = ({
263
+ variant: l = "solid",
264
+ size: d = "md",
265
+ loading: u = !1,
266
+ icon: c,
267
+ children: o,
268
+ className: s = "",
269
+ disabled: i,
270
+ ...f
271
+ }) => /* @__PURE__ */ v.jsxs(
272
+ "button",
273
+ {
274
+ className: `pure-btn ${l}-btn ${d}-btn ${s}`,
275
+ disabled: i || u,
276
+ ...f,
277
+ children: [
278
+ u && /* @__PURE__ */ v.jsx("span", { className: "loader" }),
279
+ c && /* @__PURE__ */ v.jsx("span", { className: "btn-icon", children: c }),
280
+ /* @__PURE__ */ v.jsx("span", { className: c || u ? "btn-text" : "", children: o })
281
+ ]
282
+ }
283
+ );
284
+ export {
285
+ oe as PureButton
286
+ };
@@ -0,0 +1 @@
1
+ .custom-btn{font-size:18px;cursor:pointer;position:relative;overflow:hidden;transition:all .3s ease;display:inline-flex;align-items:center;justify-content:center;gap:8px}.sm-btn{padding:10px 20px;font-size:14px}.md-btn{padding:15px 30px;font-size:18px}.lg-btn{padding:20px 40px;font-size:22px}.loader{width:20px;height:20px;border:3px solid #fff;border-top:3px solid transparent;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.solid-btn{background:#007bff;color:#fff;border:none;border-radius:8px}.solid-btn:hover{background:#0056b3}.gradient-btn{background:linear-gradient(135deg,#6e8efb,#a777e3);color:#fff;border:none;border-radius:8px}.gradient-btn:hover{transform:scale(1.05);box-shadow:0 10px 20px #6e8efb66}.neumorphic-btn{background:#e0e0e0;color:#666;border:none;border-radius:12px;box-shadow:8px 8px 16px #bebebe,-8px -8px 16px #fff}.neumorphic-btn:hover{box-shadow:inset 5px 5px 10px #bebebe,inset -5px -5px 10px #fff}.glow-border-btn{background:#222;color:#fff;border:2px solid transparent;border-radius:8px}.glow-border-btn:before{content:"";position:absolute;inset:-2px;background:conic-gradient(red,orange,#ff0,green,#00f,indigo,violet);border-radius:10px;z-index:-1;opacity:0;transition:opacity .5s}.glow-border-btn:hover:before{opacity:1;animation:rotate 4s linear infinite}@keyframes rotate{to{transform:rotate(360deg)}}.fill-left-btn{background:transparent;border:2px solid #007bff;color:#007bff;border-radius:8px}.fill-left-btn:before{content:"";position:absolute;top:0;left:-100%;width:100%;height:100%;background:#007bff;transition:left .4s;z-index:-1}.fill-left-btn:hover:before{left:0}.fill-left-btn:hover{color:#fff}.flip-3d-btn{background:#ff6b6b;color:#fff;border:none;border-radius:8px;transform-style:preserve-3d;transition:transform .6s}.flip-3d-btn:hover{transform:rotateY(180deg)}.flip-3d-btn:after{content:"Hovered!";position:absolute;inset:0;background:#4ecdc4;border-radius:8px;display:flex;align-items:center;justify-content:center;transform:rotateY(180deg)}.glass-btn{background:#ffffff1a;border:1px solid rgba(255,255,255,.2);border-radius:12px;color:#fff;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.glass-btn:hover{background:#ffffff4d}.pulse-btn{background:#28a745;color:#fff;border:none;border-radius:50px;box-shadow:0 0 10px #28a745;animation:pulse 2s infinite}@keyframes pulse{0%{box-shadow:0 0 #28a745b3}70%{box-shadow:0 0 0 15px #28a74500}to{box-shadow:0 0 #28a74500}}.icon-reveal-btn{background:#ffc107;color:#333;border:none;border-radius:8px}.outline-btn{background:transparent;border:2px solid #007bff;color:#007bff;border-radius:8px}.outline-btn:hover{background:#007bff;color:#fff}
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 CHANGED
@@ -1,38 +1,35 @@
1
1
  {
2
2
  "name": "pure-react-ui",
3
- "version": "1.3.0",
4
- "description": "Pure React UI components with zero external dependencies – only React and plain CSS",
5
- "main": "dist/index.js",
6
- "module": "dist/index.esm.js",
3
+ "version": "1.4.0",
4
+ "type": "module",
5
+ "main": "dist/index.cjs.js",
6
+ "module": "dist/index.es.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "files": [
9
9
  "dist"
10
10
  ],
11
11
  "scripts": {
12
- "build": "parcel build index.ts --no-cache",
13
- "prepublishOnly": "npm run build"
12
+ "dev": "vite",
13
+ "build": "tsc -b && vite build",
14
+ "lint": "eslint .",
15
+ "preview": "vite preview"
16
+ },
17
+ "dependencies": {
18
+ "react": "^19.2.0",
19
+ "react-dom": "^19.2.0"
14
20
  },
15
- "keywords": [
16
- "react",
17
- "ui",
18
- "components",
19
- "pure",
20
- "vanilla",
21
- "lightweight",
22
- "no-deps"
23
- ],
24
- "author": "Your Name <your.email@example.com>",
25
- "license": "MIT",
26
21
  "devDependencies": {
27
- "@parcel/packager-ts": "^2.16.3",
28
- "@parcel/transformer-typescript-types": "^2.16.3",
29
- "@types/react": "^19.2.7",
22
+ "@eslint/js": "^9.39.1",
23
+ "@types/node": "^24.10.1",
24
+ "@types/react": "^19.2.5",
30
25
  "@types/react-dom": "^19.2.3",
31
- "parcel": "^2.16.3",
32
- "typescript": "^5.9.3"
33
- },
34
- "dependencies": {
35
- "react": "^19.2.3",
36
- "react-dom": "^19.2.3"
26
+ "@vitejs/plugin-react": "^5.1.1",
27
+ "eslint": "^9.39.1",
28
+ "eslint-plugin-react-hooks": "^7.0.1",
29
+ "eslint-plugin-react-refresh": "^0.4.24",
30
+ "globals": "^16.5.0",
31
+ "typescript": "~5.9.3",
32
+ "typescript-eslint": "^8.46.4",
33
+ "vite": "^7.2.4"
37
34
  }
38
- }
35
+ }