pure-react-ui 1.2.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.
- package/README.md +73 -0
- package/dist/index.cjs.js +6 -0
- package/dist/index.es.js +286 -0
- package/dist/pure-react-ui.css +1 -0
- package/dist/vite.svg +1 -0
- package/package.json +24 -27
- package/dist/index.css +0 -454
- package/dist/index.css.map +0 -1
- package/dist/index.d.ts +0 -16
- package/dist/index.d.ts.map +0 -1
- package/dist/index.esm.css +0 -454
- package/dist/index.esm.css.map +0 -1
- package/dist/index.esm.js +0 -98
- package/dist/index.esm.js.map +0 -1
- package/dist/index.js +0 -102
- package/dist/index.js.map +0 -1
package/README.md
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# React + TypeScript + 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/) (or [oxc](https://oxc.rs) when used in [rolldown-vite](https://vite.dev/guide/rolldown)) 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
|
+
## React Compiler
|
|
11
|
+
|
|
12
|
+
The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see [this documentation](https://react.dev/learn/react-compiler/installation).
|
|
13
|
+
|
|
14
|
+
## Expanding the ESLint configuration
|
|
15
|
+
|
|
16
|
+
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
|
|
17
|
+
|
|
18
|
+
```js
|
|
19
|
+
export default defineConfig([
|
|
20
|
+
globalIgnores(['dist']),
|
|
21
|
+
{
|
|
22
|
+
files: ['**/*.{ts,tsx}'],
|
|
23
|
+
extends: [
|
|
24
|
+
// Other configs...
|
|
25
|
+
|
|
26
|
+
// Remove tseslint.configs.recommended and replace with this
|
|
27
|
+
tseslint.configs.recommendedTypeChecked,
|
|
28
|
+
// Alternatively, use this for stricter rules
|
|
29
|
+
tseslint.configs.strictTypeChecked,
|
|
30
|
+
// Optionally, add this for stylistic rules
|
|
31
|
+
tseslint.configs.stylisticTypeChecked,
|
|
32
|
+
|
|
33
|
+
// Other configs...
|
|
34
|
+
],
|
|
35
|
+
languageOptions: {
|
|
36
|
+
parserOptions: {
|
|
37
|
+
project: ['./tsconfig.node.json', './tsconfig.app.json'],
|
|
38
|
+
tsconfigRootDir: import.meta.dirname,
|
|
39
|
+
},
|
|
40
|
+
// other options...
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
])
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:
|
|
47
|
+
|
|
48
|
+
```js
|
|
49
|
+
// eslint.config.js
|
|
50
|
+
import reactX from 'eslint-plugin-react-x'
|
|
51
|
+
import reactDom from 'eslint-plugin-react-dom'
|
|
52
|
+
|
|
53
|
+
export default defineConfig([
|
|
54
|
+
globalIgnores(['dist']),
|
|
55
|
+
{
|
|
56
|
+
files: ['**/*.{ts,tsx}'],
|
|
57
|
+
extends: [
|
|
58
|
+
// Other configs...
|
|
59
|
+
// Enable lint rules for React
|
|
60
|
+
reactX.configs['recommended-typescript'],
|
|
61
|
+
// Enable lint rules for React DOM
|
|
62
|
+
reactDom.configs.recommended,
|
|
63
|
+
],
|
|
64
|
+
languageOptions: {
|
|
65
|
+
parserOptions: {
|
|
66
|
+
project: ['./tsconfig.node.json', './tsconfig.app.json'],
|
|
67
|
+
tsconfigRootDir: import.meta.dirname,
|
|
68
|
+
},
|
|
69
|
+
// other options...
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
])
|
|
73
|
+
```
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ee=require("react");var v={exports:{}},_={};var I;function re(){if(I)return _;I=1;var u=Symbol.for("react.transitional.element"),d=Symbol.for("react.fragment");function l(c,o,s){var i=null;if(s!==void 0&&(i=""+s),o.key!==void 0&&(i=""+o.key),"key"in o){s={};for(var f in o)f!=="key"&&(s[f]=o[f])}else s=o;return o=s.ref,{$$typeof:u,type:c,key:i,ref:o!==void 0?o:null,props:s}}return _.Fragment=d,_.jsx=l,_.jsxs=l,_}var E={};var F;function te(){return F||(F=1,process.env.NODE_ENV!=="production"&&(function(){function u(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:u(e.type)||"Memo";case k:r=e._payload,e=e._init;try{return u(e(r))}catch{}}return null}function d(e){return""+e}function l(e){try{d(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),d(e)}}function c(e){if(e===T)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===k)return"<...>";try{var r=u(e);return r?"<"+r+">":"<...>"}catch{return"<...>"}}function o(){var e=O.A;return e===null?null:e.getOwner()}function s(){return Error("react-stack-top-frame")}function i(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 f(e,r){function t(){g||(g=!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=u(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 L(e,r,t,n,R,S){var a=t.ref;return e={$$typeof:w,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:S}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function j(e,r,t,n,R,S){var a=r.children;if(a!==void 0)if(n)if(Q(a)){for(n=0;n<a.length;n++)x(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 x(a);if(h.call(r,"key")){a=u(e);var m=Object.keys(r).filter(function(K){return K!=="key"});n=0<m.length?"{key: someKey, "+m.join(": ..., ")+": ...}":"{key: someKey}",$[a+n]||(m=0<m.length?"{"+m.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,m,a),$[a+n]=!0)}if(a=null,t!==void 0&&(l(t),a=""+t),i(r)&&(l(r.key),a=""+r.key),"key"in r){t={};for(var A in r)A!=="key"&&(t[A]=r[A])}else t=r;return a&&f(t,typeof e=="function"?e.displayName||e.name||"Unknown":e),L(e,a,t,o(),R,S)}function x(e){y(e)?e._store&&(e._store.validated=1):typeof e=="object"&&e!==null&&e.$$typeof===k&&(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===w}var b=ee,w=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"),k=Symbol.for("react.lazy"),H=Symbol.for("react.activity"),Z=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,P=console.createTask?console.createTask:function(){return null};b={react_stack_bottom_frame:function(e){return e()}};var g,N={},C=b.react_stack_bottom_frame.bind(b,s)(),Y=P(c(s)),$={};E.Fragment=T,E.jsx=function(e,r,t){var n=1e4>O.recentlyCreatedOwnerStacks++;return j(e,r,t,!1,n?Error("react-stack-top-frame"):C,n?P(c(e)):Y)},E.jsxs=function(e,r,t){var n=1e4>O.recentlyCreatedOwnerStacks++;return j(e,r,t,!0,n?Error("react-stack-top-frame"):C,n?P(c(e)):Y)}})()),E}var D;function ne(){return D||(D=1,process.env.NODE_ENV==="production"?v.exports=re():v.exports=te()),v.exports}var p=ne();const ae=({variant:u="solid",size:d="md",loading:l=!1,icon:c,children:o,className:s="",disabled:i,...f})=>p.jsxs("button",{className:`pure-btn ${u}-btn ${d}-btn ${s}`,disabled:i||l,...f,children:[l&&p.jsx("span",{className:"loader"}),c&&p.jsx("span",{className:"btn-icon",children:c}),p.jsx("span",{className:c||l?"btn-text":"",children:o})]});exports.PureButton=ae;
|
package/dist/index.es.js
ADDED
|
@@ -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.
|
|
4
|
-
"
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"module": "dist/index.
|
|
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
|
-
"
|
|
13
|
-
"
|
|
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
|
-
"@
|
|
28
|
-
"@
|
|
29
|
-
"@types/react": "^19.2.
|
|
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
|
-
"
|
|
32
|
-
"
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
"
|
|
36
|
-
"
|
|
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
|
+
}
|