ehscan-react-components 0.1.1 → 0.1.3
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.
|
@@ -1,6 +1,22 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("react");var j={exports:{}},E={};/**
|
|
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 M;function ee(){if(M)return E;M=1;var f=Symbol.for("react.transitional.element"),d=Symbol.for("react.fragment");function c(i,n,s){var l=null;if(s!==void 0&&(l=""+s),n.key!==void 0&&(l=""+n.key),"key"in n){s={};for(var m in n)m!=="key"&&(s[m]=n[m])}else s=n;return n=s.ref,{$$typeof:f,type:i,key:l,ref:n!==void 0?n:null,props:s}}return E.Fragment=d,E.jsx=c,E.jsxs=c,E}var b={};/**
|
|
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 L;function re(){return L||(L=1,process.env.NODE_ENV!=="production"&&function(){function f(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 O:return"Fragment";case z:return"Profiler";case U:return"StrictMode";case G:return"Suspense";case J: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 q:return e.displayName||"Context";case V:return(e._context.displayName||"Context")+".Consumer";case B:var r=e.render;return e=e.displayName,e||(e=r.displayName||r.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case X:return r=e.displayName||null,r!==null?r:f(e.type)||"Memo";case S:r=e._payload,e=e._init;try{return f(e(r))}catch{}}return null}function d(e){return""+e}function c(e){try{d(e);var r=!1}catch{r=!0}if(r){r=console;var t=r.error,a=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.",a),d(e)}}function i(e){if(e===O)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===S)return"<...>";try{var r=f(e);return r?"<"+r+">":"<...>"}catch{return"<...>"}}function n(){var e=g.A;return e===null?null:e.getOwner()}function s(){return Error("react-stack-top-frame")}function l(e){if(C.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(){$||($=!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 u(){var e=f(this.type);return Y[e]||(Y[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 R(e,r,t,a,h,A){var o=t.ref;return e={$$typeof:N,type:e,key:r,props:t,_owner:a},(o!==void 0?o:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:u}):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:h}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:A}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function v(e,r,t,a,h,A){var o=r.children;if(o!==void 0)if(a)if(Q(o)){for(a=0;a<o.length;a++)p(o[a]);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 p(o);if(C.call(r,"key")){o=f(e);var _=Object.keys(r).filter(function(K){return K!=="key"});a=0<_.length?"{key: someKey, "+_.join(": ..., ")+": ...}":"{key: someKey}",D[o+a]||(_=0<_.length?"{"+_.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
2
18
|
let props = %s;
|
|
3
19
|
<%s {...props} />
|
|
4
20
|
React keys must be passed directly to JSX without using spread:
|
|
5
21
|
let props = %s;
|
|
6
|
-
<%s key={someKey} {...props} />`,a,o,_,o),D[o+a]=!0)}if(o=null,t!==void 0&&(
|
|
22
|
+
<%s key={someKey} {...props} />`,a,o,_,o),D[o+a]=!0)}if(o=null,t!==void 0&&(c(t),o=""+t),l(r)&&(c(r.key),o=""+r.key),"key"in r){t={};for(var P in r)P!=="key"&&(t[P]=r[P])}else t=r;return o&&m(t,typeof e=="function"?e.displayName||e.name||"Unknown":e),R(e,o,t,n(),h,A)}function p(e){w(e)?e._store&&(e._store.validated=1):typeof e=="object"&&e!==null&&e.$$typeof===S&&(e._payload.status==="fulfilled"?w(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function w(e){return typeof e=="object"&&e!==null&&e.$$typeof===N}var T=x,N=Symbol.for("react.transitional.element"),W=Symbol.for("react.portal"),O=Symbol.for("react.fragment"),U=Symbol.for("react.strict_mode"),z=Symbol.for("react.profiler"),V=Symbol.for("react.consumer"),q=Symbol.for("react.context"),B=Symbol.for("react.forward_ref"),G=Symbol.for("react.suspense"),J=Symbol.for("react.suspense_list"),X=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),H=Symbol.for("react.activity"),Z=Symbol.for("react.client.reference"),g=T.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,C=Object.prototype.hasOwnProperty,Q=Array.isArray,k=console.createTask?console.createTask:function(){return null};T={react_stack_bottom_frame:function(e){return e()}};var $,Y={},F=T.react_stack_bottom_frame.bind(T,s)(),I=k(i(s)),D={};b.Fragment=O,b.jsx=function(e,r,t){var a=1e4>g.recentlyCreatedOwnerStacks++;return v(e,r,t,!1,a?Error("react-stack-top-frame"):F,a?k(i(e)):I)},b.jsxs=function(e,r,t){var a=1e4>g.recentlyCreatedOwnerStacks++;return v(e,r,t,!0,a?Error("react-stack-top-frame"):F,a?k(i(e)):I)}}()),b}process.env.NODE_ENV==="production"?j.exports=ee():j.exports=re();var y=j.exports;const te=()=>x.useCallback((d,c)=>{const i=c==null?void 0:c.current;if(!i)return;const n=i.getBoundingClientRect(),s=Math.max(n.width,n.height),l=d.clientX-n.left-s/2,m=d.clientY-n.top-s/2,u=document.createElement("span");u.style.width=u.style.height=`${s}px`,u.style.left=`${l}px`,u.style.top=`${m}px`,u.className="ripple",i.appendChild(u),setTimeout(()=>u.remove(),600)},[]),ne=({index:f,text:d,selected:c,addClass:i,notimeout:n,size:s="md",click:l,children:m})=>{const u=x.useRef(null),R=te(),v=x.useCallback(p=>{if(u!=null&&u.current){if(R(p,u),n){l==null||l(p);return}setTimeout(()=>{l==null||l(p)},200)}},[n,l,R]);return y.jsx(y.Fragment,{children:y.jsxs("button",{type:"button",ref:u,onClick:v,className:`ext-btn ext-btn--primary ext-btn--${s} _ripple ${i??""}`,"aria-pressed":c,children:[m,d&&y.jsx("div",{className:"ext-btn-label",children:d})]},f)})};exports.Ext_Button=ne;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {}
|
|
@@ -1,80 +1,98 @@
|
|
|
1
|
-
import
|
|
2
|
-
var
|
|
1
|
+
import ee, { useCallback as L, useRef as re } from "react";
|
|
2
|
+
var w = { exports: {} }, E = {};
|
|
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
|
+
*/
|
|
3
12
|
var D;
|
|
4
|
-
function
|
|
13
|
+
function te() {
|
|
5
14
|
if (D) return E;
|
|
6
15
|
D = 1;
|
|
7
|
-
var
|
|
8
|
-
function
|
|
9
|
-
var
|
|
10
|
-
if (s !== void 0 && (
|
|
16
|
+
var f = Symbol.for("react.transitional.element"), d = Symbol.for("react.fragment");
|
|
17
|
+
function c(i, n, s) {
|
|
18
|
+
var l = null;
|
|
19
|
+
if (s !== void 0 && (l = "" + s), n.key !== void 0 && (l = "" + n.key), "key" in n) {
|
|
11
20
|
s = {};
|
|
12
21
|
for (var m in n)
|
|
13
22
|
m !== "key" && (s[m] = n[m]);
|
|
14
23
|
} else s = n;
|
|
15
24
|
return n = s.ref, {
|
|
16
|
-
$$typeof:
|
|
17
|
-
type:
|
|
18
|
-
key:
|
|
25
|
+
$$typeof: f,
|
|
26
|
+
type: i,
|
|
27
|
+
key: l,
|
|
19
28
|
ref: n !== void 0 ? n : null,
|
|
20
29
|
props: s
|
|
21
30
|
};
|
|
22
31
|
}
|
|
23
|
-
return E.Fragment =
|
|
32
|
+
return E.Fragment = d, E.jsx = c, E.jsxs = c, E;
|
|
24
33
|
}
|
|
25
|
-
var
|
|
34
|
+
var b = {};
|
|
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
|
+
*/
|
|
26
44
|
var M;
|
|
27
|
-
function
|
|
28
|
-
return M || (M = 1, process.env.NODE_ENV !== "production" &&
|
|
29
|
-
function
|
|
45
|
+
function ne() {
|
|
46
|
+
return M || (M = 1, process.env.NODE_ENV !== "production" && function() {
|
|
47
|
+
function f(e) {
|
|
30
48
|
if (e == null) return null;
|
|
31
49
|
if (typeof e == "function")
|
|
32
|
-
return e.$$typeof ===
|
|
50
|
+
return e.$$typeof === Z ? null : e.displayName || e.name || null;
|
|
33
51
|
if (typeof e == "string") return e;
|
|
34
52
|
switch (e) {
|
|
35
53
|
case y:
|
|
36
54
|
return "Fragment";
|
|
37
55
|
case z:
|
|
38
56
|
return "Profiler";
|
|
39
|
-
case
|
|
57
|
+
case U:
|
|
40
58
|
return "StrictMode";
|
|
41
59
|
case G:
|
|
42
60
|
return "Suspense";
|
|
43
|
-
case
|
|
61
|
+
case J:
|
|
44
62
|
return "SuspenseList";
|
|
45
|
-
case
|
|
63
|
+
case H:
|
|
46
64
|
return "Activity";
|
|
47
65
|
}
|
|
48
66
|
if (typeof e == "object")
|
|
49
67
|
switch (typeof e.tag == "number" && console.error(
|
|
50
68
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
51
69
|
), e.$$typeof) {
|
|
52
|
-
case
|
|
70
|
+
case W:
|
|
53
71
|
return "Portal";
|
|
54
|
-
case
|
|
72
|
+
case q:
|
|
55
73
|
return e.displayName || "Context";
|
|
56
|
-
case
|
|
74
|
+
case V:
|
|
57
75
|
return (e._context.displayName || "Context") + ".Consumer";
|
|
58
76
|
case B:
|
|
59
77
|
var r = e.render;
|
|
60
78
|
return e = e.displayName, e || (e = r.displayName || r.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
|
|
61
|
-
case
|
|
62
|
-
return r = e.displayName || null, r !== null ? r :
|
|
79
|
+
case X:
|
|
80
|
+
return r = e.displayName || null, r !== null ? r : f(e.type) || "Memo";
|
|
63
81
|
case O:
|
|
64
82
|
r = e._payload, e = e._init;
|
|
65
83
|
try {
|
|
66
|
-
return
|
|
84
|
+
return f(e(r));
|
|
67
85
|
} catch {
|
|
68
86
|
}
|
|
69
87
|
}
|
|
70
88
|
return null;
|
|
71
89
|
}
|
|
72
|
-
function
|
|
90
|
+
function d(e) {
|
|
73
91
|
return "" + e;
|
|
74
92
|
}
|
|
75
|
-
function
|
|
93
|
+
function c(e) {
|
|
76
94
|
try {
|
|
77
|
-
|
|
95
|
+
d(e);
|
|
78
96
|
var r = !1;
|
|
79
97
|
} catch {
|
|
80
98
|
r = !0;
|
|
@@ -86,15 +104,15 @@ function ae() {
|
|
|
86
104
|
r,
|
|
87
105
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
88
106
|
a
|
|
89
|
-
),
|
|
107
|
+
), d(e);
|
|
90
108
|
}
|
|
91
109
|
}
|
|
92
|
-
function
|
|
110
|
+
function i(e) {
|
|
93
111
|
if (e === y) return "<>";
|
|
94
112
|
if (typeof e == "object" && e !== null && e.$$typeof === O)
|
|
95
113
|
return "<...>";
|
|
96
114
|
try {
|
|
97
|
-
var r =
|
|
115
|
+
var r = f(e);
|
|
98
116
|
return r ? "<" + r + ">" : "<...>";
|
|
99
117
|
} catch {
|
|
100
118
|
return "<...>";
|
|
@@ -107,7 +125,7 @@ function ae() {
|
|
|
107
125
|
function s() {
|
|
108
126
|
return Error("react-stack-top-frame");
|
|
109
127
|
}
|
|
110
|
-
function
|
|
128
|
+
function l(e) {
|
|
111
129
|
if (N.call(e, "key")) {
|
|
112
130
|
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
113
131
|
if (r && r.isReactWarning) return !1;
|
|
@@ -126,13 +144,13 @@ function ae() {
|
|
|
126
144
|
configurable: !0
|
|
127
145
|
});
|
|
128
146
|
}
|
|
129
|
-
function
|
|
130
|
-
var e =
|
|
147
|
+
function u() {
|
|
148
|
+
var e = f(this.type);
|
|
131
149
|
return $[e] || ($[e] = !0, console.error(
|
|
132
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."
|
|
133
151
|
)), e = this.props.ref, e !== void 0 ? e : null;
|
|
134
152
|
}
|
|
135
|
-
function
|
|
153
|
+
function R(e, r, t, a, h, S) {
|
|
136
154
|
var o = t.ref;
|
|
137
155
|
return e = {
|
|
138
156
|
$$typeof: j,
|
|
@@ -142,7 +160,7 @@ function ae() {
|
|
|
142
160
|
_owner: a
|
|
143
161
|
}, (o !== void 0 ? o : null) !== null ? Object.defineProperty(e, "ref", {
|
|
144
162
|
enumerable: !1,
|
|
145
|
-
get:
|
|
163
|
+
get: u
|
|
146
164
|
}) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
|
|
147
165
|
configurable: !1,
|
|
148
166
|
enumerable: !1,
|
|
@@ -162,14 +180,14 @@ function ae() {
|
|
|
162
180
|
configurable: !1,
|
|
163
181
|
enumerable: !1,
|
|
164
182
|
writable: !0,
|
|
165
|
-
value:
|
|
183
|
+
value: S
|
|
166
184
|
}), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
|
|
167
185
|
}
|
|
168
|
-
function v(e, r, t, a, h,
|
|
186
|
+
function v(e, r, t, a, h, S) {
|
|
169
187
|
var o = r.children;
|
|
170
188
|
if (o !== void 0)
|
|
171
189
|
if (a)
|
|
172
|
-
if (
|
|
190
|
+
if (Q(o)) {
|
|
173
191
|
for (a = 0; a < o.length; a++)
|
|
174
192
|
p(o[a]);
|
|
175
193
|
Object.freeze && Object.freeze(o);
|
|
@@ -179,9 +197,9 @@ function ae() {
|
|
|
179
197
|
);
|
|
180
198
|
else p(o);
|
|
181
199
|
if (N.call(r, "key")) {
|
|
182
|
-
o =
|
|
183
|
-
var _ = Object.keys(r).filter(function(
|
|
184
|
-
return
|
|
200
|
+
o = f(e);
|
|
201
|
+
var _ = Object.keys(r).filter(function(K) {
|
|
202
|
+
return K !== "key";
|
|
185
203
|
});
|
|
186
204
|
a = 0 < _.length ? "{key: someKey, " + _.join(": ..., ") + ": ...}" : "{key: someKey}", I[o + a] || (_ = 0 < _.length ? "{" + _.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
187
205
|
`A props object containing a "key" prop is being spread into JSX:
|
|
@@ -196,21 +214,21 @@ React keys must be passed directly to JSX without using spread:
|
|
|
196
214
|
o
|
|
197
215
|
), I[o + a] = !0);
|
|
198
216
|
}
|
|
199
|
-
if (o = null, t !== void 0 && (
|
|
217
|
+
if (o = null, t !== void 0 && (c(t), o = "" + t), l(r) && (c(r.key), o = "" + r.key), "key" in r) {
|
|
200
218
|
t = {};
|
|
201
|
-
for (var
|
|
202
|
-
|
|
219
|
+
for (var g in r)
|
|
220
|
+
g !== "key" && (t[g] = r[g]);
|
|
203
221
|
} else t = r;
|
|
204
222
|
return o && m(
|
|
205
223
|
t,
|
|
206
224
|
typeof e == "function" ? e.displayName || e.name || "Unknown" : e
|
|
207
|
-
),
|
|
225
|
+
), R(
|
|
208
226
|
e,
|
|
209
227
|
o,
|
|
210
228
|
t,
|
|
211
229
|
n(),
|
|
212
230
|
h,
|
|
213
|
-
|
|
231
|
+
S
|
|
214
232
|
);
|
|
215
233
|
}
|
|
216
234
|
function p(e) {
|
|
@@ -219,7 +237,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
219
237
|
function P(e) {
|
|
220
238
|
return typeof e == "object" && e !== null && e.$$typeof === j;
|
|
221
239
|
}
|
|
222
|
-
var T =
|
|
240
|
+
var T = ee, j = Symbol.for("react.transitional.element"), W = Symbol.for("react.portal"), y = Symbol.for("react.fragment"), U = Symbol.for("react.strict_mode"), z = Symbol.for("react.profiler"), V = Symbol.for("react.consumer"), q = Symbol.for("react.context"), B = Symbol.for("react.forward_ref"), G = Symbol.for("react.suspense"), J = Symbol.for("react.suspense_list"), X = Symbol.for("react.memo"), O = Symbol.for("react.lazy"), H = Symbol.for("react.activity"), Z = Symbol.for("react.client.reference"), A = T.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, N = Object.prototype.hasOwnProperty, Q = Array.isArray, k = console.createTask ? console.createTask : function() {
|
|
223
241
|
return null;
|
|
224
242
|
};
|
|
225
243
|
T = {
|
|
@@ -230,8 +248,8 @@ React keys must be passed directly to JSX without using spread:
|
|
|
230
248
|
var C, $ = {}, Y = T.react_stack_bottom_frame.bind(
|
|
231
249
|
T,
|
|
232
250
|
s
|
|
233
|
-
)(), F =
|
|
234
|
-
|
|
251
|
+
)(), F = k(i(s)), I = {};
|
|
252
|
+
b.Fragment = y, b.jsx = function(e, r, t) {
|
|
235
253
|
var a = 1e4 > A.recentlyCreatedOwnerStacks++;
|
|
236
254
|
return v(
|
|
237
255
|
e,
|
|
@@ -239,9 +257,9 @@ React keys must be passed directly to JSX without using spread:
|
|
|
239
257
|
t,
|
|
240
258
|
!1,
|
|
241
259
|
a ? Error("react-stack-top-frame") : Y,
|
|
242
|
-
a ?
|
|
260
|
+
a ? k(i(e)) : F
|
|
243
261
|
);
|
|
244
|
-
},
|
|
262
|
+
}, b.jsxs = function(e, r, t) {
|
|
245
263
|
var a = 1e4 > A.recentlyCreatedOwnerStacks++;
|
|
246
264
|
return v(
|
|
247
265
|
e,
|
|
@@ -249,55 +267,52 @@ React keys must be passed directly to JSX without using spread:
|
|
|
249
267
|
t,
|
|
250
268
|
!0,
|
|
251
269
|
a ? Error("react-stack-top-frame") : Y,
|
|
252
|
-
a ?
|
|
270
|
+
a ? k(i(e)) : F
|
|
253
271
|
);
|
|
254
272
|
};
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
var L;
|
|
258
|
-
function oe() {
|
|
259
|
-
return L || (L = 1, process.env.NODE_ENV === "production" ? k.exports = ne() : k.exports = ae()), k.exports;
|
|
273
|
+
}()), b;
|
|
260
274
|
}
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
275
|
+
process.env.NODE_ENV === "production" ? w.exports = te() : w.exports = ne();
|
|
276
|
+
var x = w.exports;
|
|
277
|
+
const ae = () => L(
|
|
278
|
+
(d, c) => {
|
|
279
|
+
const i = c == null ? void 0 : c.current;
|
|
280
|
+
if (!i) return;
|
|
281
|
+
const n = i.getBoundingClientRect(), s = Math.max(n.width, n.height), l = d.clientX - n.left - s / 2, m = d.clientY - n.top - s / 2, u = document.createElement("span");
|
|
282
|
+
u.style.width = u.style.height = `${s}px`, u.style.left = `${l}px`, u.style.top = `${m}px`, u.className = "ripple", i.appendChild(u), setTimeout(() => u.remove(), 600);
|
|
268
283
|
},
|
|
269
284
|
[]
|
|
270
|
-
),
|
|
271
|
-
const
|
|
285
|
+
), se = ({ index: f, text: d, selected: c, addClass: i, notimeout: n, size: s = "md", click: l, children: m }) => {
|
|
286
|
+
const u = re(null), R = ae(), v = L(
|
|
272
287
|
(p) => {
|
|
273
|
-
if (
|
|
274
|
-
if (
|
|
275
|
-
|
|
288
|
+
if (u != null && u.current) {
|
|
289
|
+
if (R(p, u), n) {
|
|
290
|
+
l == null || l(p);
|
|
276
291
|
return;
|
|
277
292
|
}
|
|
278
293
|
setTimeout(() => {
|
|
279
|
-
|
|
294
|
+
l == null || l(p);
|
|
280
295
|
}, 200);
|
|
281
296
|
}
|
|
282
297
|
},
|
|
283
|
-
[n,
|
|
298
|
+
[n, l, R]
|
|
284
299
|
);
|
|
285
300
|
return /* @__PURE__ */ x.jsx(x.Fragment, { children: /* @__PURE__ */ x.jsxs(
|
|
286
301
|
"button",
|
|
287
302
|
{
|
|
288
303
|
type: "button",
|
|
289
|
-
ref:
|
|
304
|
+
ref: u,
|
|
290
305
|
onClick: v,
|
|
291
|
-
className: `ext-btn ext-btn--primary ext-btn--${s} _ripple ${
|
|
292
|
-
"aria-pressed":
|
|
306
|
+
className: `ext-btn ext-btn--primary ext-btn--${s} _ripple ${i ?? ""}`,
|
|
307
|
+
"aria-pressed": c,
|
|
293
308
|
children: [
|
|
294
309
|
m,
|
|
295
|
-
|
|
310
|
+
d && /* @__PURE__ */ x.jsx("div", { className: "ext-btn-label", children: d })
|
|
296
311
|
]
|
|
297
312
|
},
|
|
298
|
-
|
|
313
|
+
f
|
|
299
314
|
) });
|
|
300
315
|
};
|
|
301
316
|
export {
|
|
302
|
-
|
|
317
|
+
se as Ext_Button
|
|
303
318
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
button{--btn-bg: #007aff;--btn-color: #fff;--btn-radius: 18px;--btn-padding-y: .5rem;--btn-padding-x: 1rem;--btn-width: fit-content;--btn-height: auto;--btn-font-size: 1rem;--btn-font-weight: 500;--btn-transition: all .2s ease;--btn-line-height: 1.5;--ripple-box-shadow: rgb(100 100 111 / 20%) 0px 7px 29px 0px;--ripple-effect-bck: rgb(0 0 0 / 15%)}.ext-btn{display:inline-flex;align-items:center;justify-content:center;gap:.5rem;font-family:inherit;font-size:var(--btn-font-size);font-weight:var(--btn-font-weight);color:var(--btn-color);background-color:var(--btn-bg);border:none;border-radius:var(--btn-radius);padding:var(--btn-padding-y) var(--btn-padding-x);width:var(--btn-width);height:var(--btn-height);cursor:pointer;transition:var(--btn-transition);text-align:center;text-decoration:none;-webkit-user-select:none;user-select:none}._ripple{line-height:var(--btn-line-height);font-weight:var(--btn-font-weight);box-shadow:var(--ripple-box-shadow);position:relative;overflow:hidden;-webkit-user-select:none;user-select:none;display:flex;align-items:center;justify-content:center}.ext-btn:focus-visible{outline:2px solid #007aff;outline-offset:2px}.ext-btn:disabled,.ext-btn[aria-disabled=true]{opacity:.6;cursor:not-allowed}.ext-btn:hover:not(:disabled):not([aria-disabled=true]){filter:brightness(.9)}.ext-btn:active:not(:disabled):not([aria-disabled=true]){transform:scale(.97)}.ext-btn--sm{--btn-padding-y: .25rem;--btn-padding-x: .75rem;--btn-font-size: .85rem}.ext-btn--md{--btn-padding-y: .5rem;--btn-padding-x: 1rem;--btn-font-size: 1rem}.ext-btn--lg{--btn-padding-y: .75rem;--btn-padding-x: 1.5rem;--btn-font-size: 1.1rem}.ext-btn--primary{--btn-bg: #007aff;--btn-color: #fff}.ext-btn--secondary{--btn-bg: #e5e5ea;--btn-color: #111}.ext-btn--outline,.ext-btn--ghost{--btn-bg: transparent;--btn-color: #007aff}.ext-btn--danger{--btn-bg: #ff3b30;--btn-color: #fff}.ext-btn--loading{pointer-events:none;opacity:.8}.ext-btn-icon{display:flex;align-items:center;justify-content:center;font-size:1.1em}.ext-btn-label{display:inline-block;white-space:nowrap}.ripple{background:var(--ripple-effect-bck);position:absolute;border-radius:50%;transform:scale(0);animation:ripple-animation .6s linear;pointer-events:none;transform-origin:center center;will-change:transform,opacity}@media(hover:hover)and (pointer:fine){._ripple{cursor:pointer}}@keyframes ripple-animation{to{transform:scale(4);opacity:0}}.lds-ripple,.lds-ripple div{box-sizing:border-box}.lds-ripple{--image-sync-wh: 100%;--bw: 5px;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);height:var(--image-sync-wh);width:var(--image-sync-wh);z-index:9999}.lds-ripple div{position:absolute;border:var(--bw) solid white;opacity:1;border-radius:50%;animation:lds-ripple 1s cubic-bezier(0,.4,.8,1) infinite}.lds-ripple div:nth-child(2){animation-delay:-.5s;border:var(--bw) solid whitesmoke}@keyframes lds-ripple{0%{top:50%;left:50%;width:8%;height:8%;opacity:.2;transform:translate(-50%,-50%)}5%{top:50%;left:50%;width:8%;height:8%;opacity:1;transform:translate(-50%,-50%)}to{top:50%;left:50%;width:var(--image-sync-wh);height:var(--image-sync-wh);opacity:.2;transform:translate(-50%,-50%)}}.closeBtn{--btn-width: 35px;--btn-height: 35px;padding:0;--btn-bg: lightgray}.saveBtn{--btn-height: 35px;--btn-padding-x: 30px;--btn-bg: #007aff}.trashBtn{--btn-height: 35px;--btn-padding-x: 10px;--btn-radius: 4px;--btn-bg: lightgray}
|
|
1
|
+
button{--btn-bg: #007aff;--btn-color: #fff;--btn-radius: 18px;--btn-padding-y: .5rem;--btn-padding-x: 1rem;--btn-width: fit-content;--btn-height: auto;--btn-font-size: 1rem;--btn-font-weight: 500;--btn-transition: all .2s ease;--btn-line-height: 1.5;--ripple-box-shadow: rgb(100 100 111 / 20%) 0px 7px 29px 0px;--ripple-effect-bck: rgb(0 0 0 / 15%)}.ext-btn{display:inline-flex;align-items:center;justify-content:center;gap:.5rem;font-family:inherit;font-size:var(--btn-font-size);font-weight:var(--btn-font-weight);color:var(--btn-color);background-color:var(--btn-bg);border:none;border-radius:var(--btn-radius);padding:var(--btn-padding-y) var(--btn-padding-x);width:var(--btn-width);height:var(--btn-height);cursor:pointer;transition:var(--btn-transition);text-align:center;text-decoration:none;-webkit-user-select:none;user-select:none}._ripple{line-height:var(--btn-line-height);font-weight:var(--btn-font-weight);box-shadow:var(--ripple-box-shadow);position:relative;overflow:hidden;-webkit-user-select:none;user-select:none;display:flex;align-items:center;justify-content:center}.ext-btn:focus-visible{outline:2px solid #007aff;outline-offset:2px}.ext-btn:disabled,.ext-btn[aria-disabled=true]{opacity:.6;cursor:not-allowed}.ext-btn:hover:not(:disabled):not([aria-disabled=true]){filter:brightness(.9)}.ext-btn:active:not(:disabled):not([aria-disabled=true]){transform:scale(.97)}.ext-btn--sm{--btn-padding-y: .25rem;--btn-padding-x: .75rem;--btn-font-size: .85rem}.ext-btn--md{--btn-padding-y: .5rem;--btn-padding-x: 1rem;--btn-font-size: 1rem}.ext-btn--lg{--btn-padding-y: .75rem;--btn-padding-x: 1.5rem;--btn-font-size: 1.1rem}.ext-btn--primary{--btn-bg: #007aff;--btn-color: #fff}.ext-btn--secondary{--btn-bg: #e5e5ea;--btn-color: #111}.ext-btn--outline,.ext-btn--ghost{--btn-bg: transparent;--btn-color: #007aff}.ext-btn--danger{--btn-bg: #ff3b30;--btn-color: #fff}.ext-btn--loading{pointer-events:none;opacity:.8}.ext-btn-icon{display:flex;align-items:center;justify-content:center;font-size:1.1em}.ext-btn-label{display:inline-block;white-space:nowrap}.ripple{background:var(--ripple-effect-bck);position:absolute;border-radius:50%;transform:scale(0);animation:ripple-animation .6s linear;pointer-events:none;transform-origin:center center;will-change:transform,opacity}@media (hover: hover) and (pointer: fine){._ripple{cursor:pointer}}@keyframes ripple-animation{to{transform:scale(4);opacity:0}}.lds-ripple,.lds-ripple div{box-sizing:border-box}.lds-ripple{--image-sync-wh: 100%;--bw: 5px;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);height:var(--image-sync-wh);width:var(--image-sync-wh);z-index:9999}.lds-ripple div{position:absolute;border:var(--bw) solid white;opacity:1;border-radius:50%;animation:lds-ripple 1s cubic-bezier(0,.4,.8,1) infinite}.lds-ripple div:nth-child(2){animation-delay:-.5s;border:var(--bw) solid whitesmoke}@keyframes lds-ripple{0%{top:50%;left:50%;width:8%;height:8%;opacity:.2;transform:translate(-50%,-50%)}5%{top:50%;left:50%;width:8%;height:8%;opacity:1;transform:translate(-50%,-50%)}to{top:50%;left:50%;width:var(--image-sync-wh);height:var(--image-sync-wh);opacity:.2;transform:translate(-50%,-50%)}}.closeBtn{--btn-width: 35px;--btn-height: 35px;padding:0;--btn-bg: lightgray}.saveBtn{--btn-height: 35px;--btn-padding-x: 30px;--btn-bg: #007aff}.trashBtn{--btn-height: 35px;--btn-padding-x: 10px;--btn-radius: 4px;--btn-bg: lightgray}
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ehscan-react-components",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"main": "dist/components
|
|
6
|
-
"module": "dist/components
|
|
7
|
-
"types": "dist/components
|
|
5
|
+
"main": "dist/ehscan-react-components.cjs.js",
|
|
6
|
+
"module": "dist/ehscan-react-components.es.js",
|
|
7
|
+
"types": "dist/ehscan-react-components.d.ts",
|
|
8
8
|
"files": [
|
|
9
9
|
"dist"
|
|
10
10
|
],
|
|
@@ -17,22 +17,11 @@
|
|
|
17
17
|
"react-dom": "^18.0.0"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"vite": "^5.0.0",
|
|
21
20
|
"@vitejs/plugin-react": "^4.0.0",
|
|
22
|
-
"typescript": "^5.0.0"
|
|
21
|
+
"typescript": "^5.0.0",
|
|
22
|
+
"vite": "^5.0.0"
|
|
23
23
|
},
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"import": "./dist/components/index.js",
|
|
27
|
-
"require": "./dist/components/index.cjs.js"
|
|
28
|
-
},
|
|
29
|
-
"./Button": {
|
|
30
|
-
"import": "./dist/components/Button/index.js",
|
|
31
|
-
"require": "./dist/components/Button/index.cjs.js"
|
|
32
|
-
},
|
|
33
|
-
"./Window": {
|
|
34
|
-
"import": "./dist/components/Window/index.js",
|
|
35
|
-
"require": "./dist/components/Window/index.cjs.js"
|
|
36
|
-
}
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"vite-plugin-dts": "^4.5.4"
|
|
37
26
|
}
|
|
38
27
|
}
|