rharuow-ds 1.0.4 → 1.0.5
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/rharuow-ds.cjs.js +4 -4
- package/dist/rharuow-ds.es.js +76 -78
- package/package.json +1 -1
package/dist/rharuow-ds.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("react");function fe(r){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const a=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(o,t,a.get?a:{enumerable:!0,get:()=>r[t]})}}return o.default=r,Object.freeze(o)}const D=fe(g);var I={exports:{}},A={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var K;function de(){if(K)return A;K=1;var r=Symbol.for("react.transitional.element"),
|
|
9
|
+
*/var K;function de(){if(K)return A;K=1;var r=Symbol.for("react.transitional.element"),o=Symbol.for("react.fragment");function t(a,s,u){var d=null;if(u!==void 0&&(d=""+u),s.key!==void 0&&(d=""+s.key),"key"in s){u={};for(var m in s)m!=="key"&&(u[m]=s[m])}else u=s;return s=u.ref,{$$typeof:r,type:a,key:d,ref:s!==void 0?s:null,props:u}}return A.Fragment=o,A.jsx=t,A.jsxs=t,A}var S={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var ee;function be(){return ee||(ee=1,process.env.NODE_ENV!=="production"&&function(){function r(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===_?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case
|
|
17
|
+
*/var ee;function be(){return ee||(ee=1,process.env.NODE_ENV!=="production"&&function(){function r(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===_?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case O:return"Fragment";case $:return"Profiler";case W:return"StrictMode";case N:return"Suspense";case C:return"SuspenseList";case Y: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 f:return"Portal";case P:return(e.displayName||"Context")+".Provider";case L:return(e._context.displayName||"Context")+".Consumer";case M:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case F:return n=e.displayName||null,n!==null?n:r(e.type)||"Memo";case b:n=e._payload,e=e._init;try{return r(e(n))}catch{}}return null}function o(e){return""+e}function t(e){try{o(e);var n=!1}catch{n=!0}if(n){n=console;var c=n.error,i=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return c.call(n,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",i),o(e)}}function a(e){if(e===O)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===b)return"<...>";try{var n=r(e);return n?"<"+n+">":"<...>"}catch{return"<...>"}}function s(){var e=U.A;return e===null?null:e.getOwner()}function u(){return Error("react-stack-top-frame")}function d(e){if(G.call(e,"key")){var n=Object.getOwnPropertyDescriptor(e,"key").get;if(n&&n.isReactWarning)return!1}return e.key!==void 0}function m(e,n){function c(){B||(B=!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)",n))}c.isReactWarning=!0,Object.defineProperty(e,"key",{get:c,configurable:!0})}function k(){var e=r(this.type);return X[e]||(X[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 j(e,n,c,i,y,v,q,J){return c=v.ref,e={$$typeof:T,type:e,key:n,props:v,_owner:y},(c!==void 0?c:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:k}):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:q}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:J}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function p(e,n,c,i,y,v,q,J){var l=n.children;if(l!==void 0)if(i)if(ie(l)){for(i=0;i<l.length;i++)E(l[i]);Object.freeze&&Object.freeze(l)}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 E(l);if(G.call(n,"key")){l=r(e);var h=Object.keys(n).filter(function(le){return le!=="key"});i=0<h.length?"{key: someKey, "+h.join(": ..., ")+": ...}":"{key: someKey}",Q[l+i]||(h=0<h.length?"{"+h.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
18
18
|
let props = %s;
|
|
19
19
|
<%s {...props} />
|
|
20
20
|
React keys must be passed directly to JSX without using spread:
|
|
21
21
|
let props = %s;
|
|
22
|
-
<%s key={someKey} {...props} />`,l,
|
|
22
|
+
<%s key={someKey} {...props} />`,i,l,h,l),Q[l+i]=!0)}if(l=null,c!==void 0&&(t(c),l=""+c),d(n)&&(t(n.key),l=""+n.key),"key"in n){c={};for(var V in n)V!=="key"&&(c[V]=n[V])}else c=n;return l&&m(c,typeof e=="function"?e.displayName||e.name||"Unknown":e),j(e,l,v,y,s(),c,q,J)}function E(e){typeof e=="object"&&e!==null&&e.$$typeof===T&&e._store&&(e._store.validated=1)}var x=g,T=Symbol.for("react.transitional.element"),f=Symbol.for("react.portal"),O=Symbol.for("react.fragment"),W=Symbol.for("react.strict_mode"),$=Symbol.for("react.profiler"),L=Symbol.for("react.consumer"),P=Symbol.for("react.context"),M=Symbol.for("react.forward_ref"),N=Symbol.for("react.suspense"),C=Symbol.for("react.suspense_list"),F=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),Y=Symbol.for("react.activity"),_=Symbol.for("react.client.reference"),U=x.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,G=Object.prototype.hasOwnProperty,ie=Array.isArray,z=console.createTask?console.createTask:function(){return null};x={"react-stack-bottom-frame":function(e){return e()}};var B,X={},H=x["react-stack-bottom-frame"].bind(x,u)(),Z=z(a(u)),Q={};S.Fragment=O,S.jsx=function(e,n,c,i,y){var v=1e4>U.recentlyCreatedOwnerStacks++;return p(e,n,c,!1,i,y,v?Error("react-stack-top-frame"):H,v?z(a(e)):Z)},S.jsxs=function(e,n,c,i,y){var v=1e4>U.recentlyCreatedOwnerStacks++;return p(e,n,c,!0,i,y,v?Error("react-stack-top-frame"):H,v?z(a(e)):Z)}}()),S}var re;function me(){return re||(re=1,process.env.NODE_ENV==="production"?I.exports=de():I.exports=be()),I.exports}var R=me();function ae(r){var o,t,a="";if(typeof r=="string"||typeof r=="number")a+=r;else if(typeof r=="object")if(Array.isArray(r)){var s=r.length;for(o=0;o<s;o++)r[o]&&(t=ae(r[o]))&&(a&&(a+=" "),a+=t)}else for(t in r)r[t]&&(a&&(a+=" "),a+=t);return a}function ve(){for(var r,o,t=0,a="",s=arguments.length;t<s;t++)(r=arguments[t])&&(o=ae(r))&&(a&&(a+=" "),a+=o);return a}function w(...r){return ve(...r)}const pe=({children:r,variant:o="default",className:t="",...a})=>{const s="px-4 py-2 rounded font-medium transition",u={default:"bg-[var(--primary,#2563eb)] text-[var(--primary-text,#fff)] hover:bg-[var(--primary-hover,#1d4ed8)]",outline:"border border-[var(--primary,#2563eb)] text-[var(--primary,#2563eb)] bg-white hover:bg-[var(--primary-hover,#e0e7ff)]",secondary:"bg-[var(--secondary,#fbbf24)] text-[var(--secondary-text,#222)] hover:bg-[var(--secondary-hover,#f59e42)]"};return R.jsx("button",{className:w(s,u[o],t),...a,children:r})};var Ee=r=>r instanceof Date,oe=r=>r==null;const _e=r=>typeof r=="object";var ye=r=>!oe(r)&&!Array.isArray(r)&&_e(r)&&!Ee(r),Re=r=>/^\w*$/.test(r),te=r=>r===void 0,ge=r=>Array.isArray(r)?r.filter(Boolean):[],xe=r=>ge(r.replace(/["|']|\]/g,"").split(/\.|\[/)),ne=(r,o,t)=>{if(!o||!ye(r))return t;const a=(Re(o)?[o]:xe(o)).reduce((s,u)=>oe(s)?s:s[u],r);return te(a)||a===r?te(r[o])?t:r[o]:a};const se=g.createContext(null);se.displayName="HookFormContext";const ue=()=>g.useContext(se),Te=typeof window<"u"?D.useLayoutEffect:D.useEffect;var Oe=r=>typeof r=="string",he=(r,o,t,a,s)=>Oe(r)?ne(t,r,s):Array.isArray(r)?r.map(u=>ne(t,u)):t;function ke(r){const o=ue(),{control:t=o.control,name:a,defaultValue:s,disabled:u,exact:d}=r||{},m=g.useRef(s),[k,j]=g.useState(t._getWatch(a,m.current));return Te(()=>t._subscribe({name:a,formState:{values:!0},exact:d,callback:p=>!u&&j(he(a,t._names,p.values||t._formValues,!1,m.current))}),[a,t,u,d]),g.useEffect(()=>t._removeUnmounted()),k}const ce=D.forwardRef(({name:r,className:o,type:t="text",label:a,onFocus:s,onBlur:u,Icon:d,iconClassName:m,iconAction:k,containerClassName:j,...p},E)=>{var N,C,F;const[x,T]=D.useState(!1),f=ue(),O=f==null?void 0:f.control,W=f==null?void 0:f.register,$=O&&r?ke({control:O,name:r}):void 0,L=p.value??$??"",P=(F=(C=(N=f==null?void 0:f.formState)==null?void 0:N.errors)==null?void 0:C[r])==null?void 0:F.message,M=x||!!L;return R.jsxs("div",{className:w("relative",j),children:[R.jsx("input",{id:p.id||r,type:t,className:w("peer flex h-12 w-full border border-[var(--primary,#2563eb)] rounded-md bg-[var(--input-bg,#fff)] text-[var(--input-text,#222)] px-3 pt-6 pb-2 text-sm placeholder-transparent transition focus:outline-none focus:border-[var(--primary,#2563eb)] disabled:cursor-not-allowed disabled:opacity-50",o),onFocus:b=>{T(!0),s&&s(b)},...f&&r?(()=>{const b=W(r),Y=b.onBlur;return{...b,ref:_=>{typeof E=="function"?E(_):E&&(E.current=_),b.ref&&b.ref(_)},onBlur:_=>{T(!1),u&&u(_),Y&&Y(_)}}})():{ref:E,onBlur:b=>{T(!1),u&&u(b)}},...p}),a&&R.jsx("label",{htmlFor:p.id||r,className:w("absolute left-3 z-10 origin-[0] cursor-text select-none text-sm text-gray-400 transition-all duration-200",M?"top-0 scale-90 -translate-y-1 text-xs text-blue-400 p-1 rounded-full bg-white":"top-3 scale-100 translate-y-0.5"),children:a}),d&&R.jsx("div",{className:w("absolute top-1/2 right-3 -translate-y-1/2 text-white",m),onClick:k,children:R.jsx(d,{})}),P&&R.jsx("span",{className:"text-red-500 text-xs mt-1 block",children:P})]})});ce.displayName="Input";exports.Button=pe;exports.Input=ce;
|
package/dist/rharuow-ds.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as D from "react";
|
|
2
2
|
import k from "react";
|
|
3
|
-
var
|
|
3
|
+
var I = { exports: {} }, w = {};
|
|
4
4
|
/**
|
|
5
5
|
* @license React
|
|
6
6
|
* react-jsx-runtime.production.js
|
|
@@ -11,26 +11,26 @@ var W = { exports: {} }, w = {};
|
|
|
11
11
|
* LICENSE file in the root directory of this source tree.
|
|
12
12
|
*/
|
|
13
13
|
var K;
|
|
14
|
-
function
|
|
14
|
+
function le() {
|
|
15
15
|
if (K) return w;
|
|
16
16
|
K = 1;
|
|
17
17
|
var r = Symbol.for("react.transitional.element"), s = Symbol.for("react.fragment");
|
|
18
|
-
function
|
|
18
|
+
function a(n, o, u) {
|
|
19
19
|
var d = null;
|
|
20
|
-
if (u !== void 0 && (d = "" + u),
|
|
20
|
+
if (u !== void 0 && (d = "" + u), o.key !== void 0 && (d = "" + o.key), "key" in o) {
|
|
21
21
|
u = {};
|
|
22
|
-
for (var b in
|
|
23
|
-
b !== "key" && (u[b] =
|
|
24
|
-
} else u =
|
|
25
|
-
return
|
|
22
|
+
for (var b in o)
|
|
23
|
+
b !== "key" && (u[b] = o[b]);
|
|
24
|
+
} else u = o;
|
|
25
|
+
return o = u.ref, {
|
|
26
26
|
$$typeof: r,
|
|
27
27
|
type: n,
|
|
28
28
|
key: d,
|
|
29
|
-
ref:
|
|
29
|
+
ref: o !== void 0 ? o : null,
|
|
30
30
|
props: u
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
|
-
return w.Fragment = s, w.jsx =
|
|
33
|
+
return w.Fragment = s, w.jsx = a, w.jsxs = a, w;
|
|
34
34
|
}
|
|
35
35
|
var S = {};
|
|
36
36
|
/**
|
|
@@ -53,15 +53,15 @@ function fe() {
|
|
|
53
53
|
switch (e) {
|
|
54
54
|
case T:
|
|
55
55
|
return "Fragment";
|
|
56
|
-
case P:
|
|
57
|
-
return "Profiler";
|
|
58
56
|
case $:
|
|
57
|
+
return "Profiler";
|
|
58
|
+
case W:
|
|
59
59
|
return "StrictMode";
|
|
60
|
-
case
|
|
60
|
+
case N:
|
|
61
61
|
return "Suspense";
|
|
62
|
-
case
|
|
62
|
+
case C:
|
|
63
63
|
return "SuspenseList";
|
|
64
|
-
case
|
|
64
|
+
case Y:
|
|
65
65
|
return "Activity";
|
|
66
66
|
}
|
|
67
67
|
if (typeof e == "object")
|
|
@@ -70,14 +70,14 @@ function fe() {
|
|
|
70
70
|
), e.$$typeof) {
|
|
71
71
|
case f:
|
|
72
72
|
return "Portal";
|
|
73
|
-
case
|
|
73
|
+
case P:
|
|
74
74
|
return (e.displayName || "Context") + ".Provider";
|
|
75
75
|
case L:
|
|
76
76
|
return (e._context.displayName || "Context") + ".Consumer";
|
|
77
77
|
case U:
|
|
78
78
|
var t = e.render;
|
|
79
79
|
return e = e.displayName, e || (e = t.displayName || t.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
|
|
80
|
-
case
|
|
80
|
+
case F:
|
|
81
81
|
return t = e.displayName || null, t !== null ? t : r(e.type) || "Memo";
|
|
82
82
|
case m:
|
|
83
83
|
t = e._payload, e = e._init;
|
|
@@ -91,7 +91,7 @@ function fe() {
|
|
|
91
91
|
function s(e) {
|
|
92
92
|
return "" + e;
|
|
93
93
|
}
|
|
94
|
-
function
|
|
94
|
+
function a(e) {
|
|
95
95
|
try {
|
|
96
96
|
s(e);
|
|
97
97
|
var t = !1;
|
|
@@ -100,11 +100,11 @@ function fe() {
|
|
|
100
100
|
}
|
|
101
101
|
if (t) {
|
|
102
102
|
t = console;
|
|
103
|
-
var c = t.error,
|
|
103
|
+
var c = t.error, i = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
104
104
|
return c.call(
|
|
105
105
|
t,
|
|
106
106
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
107
|
-
|
|
107
|
+
i
|
|
108
108
|
), s(e);
|
|
109
109
|
}
|
|
110
110
|
}
|
|
@@ -119,7 +119,7 @@ function fe() {
|
|
|
119
119
|
return "<...>";
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
|
-
function
|
|
122
|
+
function o() {
|
|
123
123
|
var e = M.A;
|
|
124
124
|
return e === null ? null : e.getOwner();
|
|
125
125
|
}
|
|
@@ -151,7 +151,7 @@ function fe() {
|
|
|
151
151
|
"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."
|
|
152
152
|
)), e = this.props.ref, e !== void 0 ? e : null;
|
|
153
153
|
}
|
|
154
|
-
function O(e, t, c,
|
|
154
|
+
function O(e, t, c, i, x, v, J, V) {
|
|
155
155
|
return c = v.ref, e = {
|
|
156
156
|
$$typeof: g,
|
|
157
157
|
type: e,
|
|
@@ -183,51 +183,51 @@ function fe() {
|
|
|
183
183
|
value: V
|
|
184
184
|
}), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
|
|
185
185
|
}
|
|
186
|
-
function p(e, t, c,
|
|
187
|
-
var
|
|
188
|
-
if (
|
|
189
|
-
if (
|
|
190
|
-
if (ce(
|
|
191
|
-
for (
|
|
192
|
-
E(i
|
|
193
|
-
Object.freeze && Object.freeze(
|
|
186
|
+
function p(e, t, c, i, x, v, J, V) {
|
|
187
|
+
var l = t.children;
|
|
188
|
+
if (l !== void 0)
|
|
189
|
+
if (i)
|
|
190
|
+
if (ce(l)) {
|
|
191
|
+
for (i = 0; i < l.length; i++)
|
|
192
|
+
E(l[i]);
|
|
193
|
+
Object.freeze && Object.freeze(l);
|
|
194
194
|
} else
|
|
195
195
|
console.error(
|
|
196
196
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
197
197
|
);
|
|
198
|
-
else E(
|
|
198
|
+
else E(l);
|
|
199
199
|
if (G.call(t, "key")) {
|
|
200
|
-
|
|
201
|
-
var h = Object.keys(t).filter(function(
|
|
202
|
-
return
|
|
200
|
+
l = r(e);
|
|
201
|
+
var h = Object.keys(t).filter(function(ie) {
|
|
202
|
+
return ie !== "key";
|
|
203
203
|
});
|
|
204
|
-
|
|
204
|
+
i = 0 < h.length ? "{key: someKey, " + h.join(": ..., ") + ": ...}" : "{key: someKey}", Q[l + i] || (h = 0 < h.length ? "{" + h.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
205
205
|
`A props object containing a "key" prop is being spread into JSX:
|
|
206
206
|
let props = %s;
|
|
207
207
|
<%s {...props} />
|
|
208
208
|
React keys must be passed directly to JSX without using spread:
|
|
209
209
|
let props = %s;
|
|
210
210
|
<%s key={someKey} {...props} />`,
|
|
211
|
-
l,
|
|
212
211
|
i,
|
|
212
|
+
l,
|
|
213
213
|
h,
|
|
214
|
-
|
|
215
|
-
), Q[
|
|
214
|
+
l
|
|
215
|
+
), Q[l + i] = !0);
|
|
216
216
|
}
|
|
217
|
-
if (
|
|
217
|
+
if (l = null, c !== void 0 && (a(c), l = "" + c), d(t) && (a(t.key), l = "" + t.key), "key" in t) {
|
|
218
218
|
c = {};
|
|
219
219
|
for (var q in t)
|
|
220
220
|
q !== "key" && (c[q] = t[q]);
|
|
221
221
|
} else c = t;
|
|
222
|
-
return
|
|
222
|
+
return l && b(
|
|
223
223
|
c,
|
|
224
224
|
typeof e == "function" ? e.displayName || e.name || "Unknown" : e
|
|
225
225
|
), O(
|
|
226
226
|
e,
|
|
227
|
-
|
|
227
|
+
l,
|
|
228
228
|
v,
|
|
229
229
|
x,
|
|
230
|
-
|
|
230
|
+
o(),
|
|
231
231
|
c,
|
|
232
232
|
J,
|
|
233
233
|
V
|
|
@@ -236,7 +236,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
236
236
|
function E(e) {
|
|
237
237
|
typeof e == "object" && e !== null && e.$$typeof === g && e._store && (e._store.validated = 1);
|
|
238
238
|
}
|
|
239
|
-
var y = k, g = Symbol.for("react.transitional.element"), f = Symbol.for("react.portal"), T = Symbol.for("react.fragment"),
|
|
239
|
+
var y = k, g = Symbol.for("react.transitional.element"), f = Symbol.for("react.portal"), T = Symbol.for("react.fragment"), W = Symbol.for("react.strict_mode"), $ = Symbol.for("react.profiler"), L = Symbol.for("react.consumer"), P = Symbol.for("react.context"), U = Symbol.for("react.forward_ref"), N = Symbol.for("react.suspense"), C = Symbol.for("react.suspense_list"), F = Symbol.for("react.memo"), m = Symbol.for("react.lazy"), Y = Symbol.for("react.activity"), _ = Symbol.for("react.client.reference"), M = y.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, G = Object.prototype.hasOwnProperty, ce = Array.isArray, z = console.createTask ? console.createTask : function() {
|
|
240
240
|
return null;
|
|
241
241
|
};
|
|
242
242
|
y = {
|
|
@@ -248,26 +248,26 @@ React keys must be passed directly to JSX without using spread:
|
|
|
248
248
|
y,
|
|
249
249
|
u
|
|
250
250
|
)(), Z = z(n(u)), Q = {};
|
|
251
|
-
S.Fragment = T, S.jsx = function(e, t, c,
|
|
251
|
+
S.Fragment = T, S.jsx = function(e, t, c, i, x) {
|
|
252
252
|
var v = 1e4 > M.recentlyCreatedOwnerStacks++;
|
|
253
253
|
return p(
|
|
254
254
|
e,
|
|
255
255
|
t,
|
|
256
256
|
c,
|
|
257
257
|
!1,
|
|
258
|
-
|
|
258
|
+
i,
|
|
259
259
|
x,
|
|
260
260
|
v ? Error("react-stack-top-frame") : H,
|
|
261
261
|
v ? z(n(e)) : Z
|
|
262
262
|
);
|
|
263
|
-
}, S.jsxs = function(e, t, c,
|
|
263
|
+
}, S.jsxs = function(e, t, c, i, x) {
|
|
264
264
|
var v = 1e4 > M.recentlyCreatedOwnerStacks++;
|
|
265
265
|
return p(
|
|
266
266
|
e,
|
|
267
267
|
t,
|
|
268
268
|
c,
|
|
269
269
|
!0,
|
|
270
|
-
|
|
270
|
+
i,
|
|
271
271
|
x,
|
|
272
272
|
v ? Error("react-stack-top-frame") : H,
|
|
273
273
|
v ? z(n(e)) : Z
|
|
@@ -277,20 +277,20 @@ React keys must be passed directly to JSX without using spread:
|
|
|
277
277
|
}
|
|
278
278
|
var re;
|
|
279
279
|
function de() {
|
|
280
|
-
return re || (re = 1, process.env.NODE_ENV === "production" ?
|
|
280
|
+
return re || (re = 1, process.env.NODE_ENV === "production" ? I.exports = le() : I.exports = fe()), I.exports;
|
|
281
281
|
}
|
|
282
282
|
var R = de();
|
|
283
|
-
function
|
|
284
|
-
var s,
|
|
283
|
+
function ae(r) {
|
|
284
|
+
var s, a, n = "";
|
|
285
285
|
if (typeof r == "string" || typeof r == "number") n += r;
|
|
286
286
|
else if (typeof r == "object") if (Array.isArray(r)) {
|
|
287
|
-
var
|
|
288
|
-
for (s = 0; s <
|
|
289
|
-
} else for (
|
|
287
|
+
var o = r.length;
|
|
288
|
+
for (s = 0; s < o; s++) r[s] && (a = ae(r[s])) && (n && (n += " "), n += a);
|
|
289
|
+
} else for (a in r) r[a] && (n && (n += " "), n += a);
|
|
290
290
|
return n;
|
|
291
291
|
}
|
|
292
292
|
function me() {
|
|
293
|
-
for (var r, s,
|
|
293
|
+
for (var r, s, a = 0, n = "", o = arguments.length; a < o; a++) (r = arguments[a]) && (s = ae(r)) && (n && (n += " "), n += s);
|
|
294
294
|
return n;
|
|
295
295
|
}
|
|
296
296
|
function j(...r) {
|
|
@@ -299,46 +299,46 @@ function j(...r) {
|
|
|
299
299
|
const Ae = ({
|
|
300
300
|
children: r,
|
|
301
301
|
variant: s = "default",
|
|
302
|
-
className:
|
|
302
|
+
className: a = "",
|
|
303
303
|
...n
|
|
304
304
|
}) => {
|
|
305
|
-
const
|
|
305
|
+
const o = "px-4 py-2 rounded font-medium transition", u = {
|
|
306
306
|
default: "bg-[var(--primary,#2563eb)] text-[var(--primary-text,#fff)] hover:bg-[var(--primary-hover,#1d4ed8)]",
|
|
307
307
|
outline: "border border-[var(--primary,#2563eb)] text-[var(--primary,#2563eb)] bg-white hover:bg-[var(--primary-hover,#e0e7ff)]",
|
|
308
308
|
secondary: "bg-[var(--secondary,#fbbf24)] text-[var(--secondary-text,#222)] hover:bg-[var(--secondary-hover,#f59e42)]"
|
|
309
309
|
};
|
|
310
|
-
return /* @__PURE__ */ R.jsx("button", { className: j(
|
|
310
|
+
return /* @__PURE__ */ R.jsx("button", { className: j(o, u[s], a), ...n, children: r });
|
|
311
311
|
};
|
|
312
|
-
var be = (r) => r instanceof Date,
|
|
312
|
+
var be = (r) => r instanceof Date, oe = (r) => r == null;
|
|
313
313
|
const ve = (r) => typeof r == "object";
|
|
314
|
-
var pe = (r) => !
|
|
314
|
+
var pe = (r) => !oe(r) && !Array.isArray(r) && ve(r) && !be(r), Ee = (r) => /^\w*$/.test(r), te = (r) => r === void 0, _e = (r) => Array.isArray(r) ? r.filter(Boolean) : [], xe = (r) => _e(r.replace(/["|']|\]/g, "").split(/\.|\[/)), ne = (r, s, a) => {
|
|
315
315
|
if (!s || !pe(r))
|
|
316
|
-
return
|
|
317
|
-
const n = (Ee(s) ? [s] : xe(s)).reduce((
|
|
318
|
-
return te(n) || n === r ? te(r[s]) ?
|
|
316
|
+
return a;
|
|
317
|
+
const n = (Ee(s) ? [s] : xe(s)).reduce((o, u) => oe(o) ? o : o[u], r);
|
|
318
|
+
return te(n) || n === r ? te(r[s]) ? a : r[s] : n;
|
|
319
319
|
};
|
|
320
320
|
const se = k.createContext(null);
|
|
321
321
|
se.displayName = "HookFormContext";
|
|
322
322
|
const ue = () => k.useContext(se), Re = typeof window < "u" ? D.useLayoutEffect : D.useEffect;
|
|
323
|
-
var ye = (r) => typeof r == "string", ge = (r, s,
|
|
323
|
+
var ye = (r) => typeof r == "string", ge = (r, s, a, n, o) => ye(r) ? ne(a, r, o) : Array.isArray(r) ? r.map((u) => ne(a, u)) : a;
|
|
324
324
|
function Te(r) {
|
|
325
|
-
const s = ue(), { control:
|
|
326
|
-
return Re(() =>
|
|
325
|
+
const s = ue(), { control: a = s.control, name: n, defaultValue: o, disabled: u, exact: d } = r || {}, b = k.useRef(o), [A, O] = k.useState(a._getWatch(n, b.current));
|
|
326
|
+
return Re(() => a._subscribe({
|
|
327
327
|
name: n,
|
|
328
328
|
formState: {
|
|
329
329
|
values: !0
|
|
330
330
|
},
|
|
331
331
|
exact: d,
|
|
332
|
-
callback: (p) => !u && O(ge(n,
|
|
333
|
-
}), [n,
|
|
332
|
+
callback: (p) => !u && O(ge(n, a._names, p.values || a._formValues, !1, b.current))
|
|
333
|
+
}), [n, a, u, d]), k.useEffect(() => a._removeUnmounted()), A;
|
|
334
334
|
}
|
|
335
335
|
const he = D.forwardRef(
|
|
336
336
|
({
|
|
337
337
|
name: r,
|
|
338
338
|
className: s,
|
|
339
|
-
type:
|
|
339
|
+
type: a = "text",
|
|
340
340
|
label: n,
|
|
341
|
-
onFocus:
|
|
341
|
+
onFocus: o,
|
|
342
342
|
onBlur: u,
|
|
343
343
|
Icon: d,
|
|
344
344
|
iconClassName: b,
|
|
@@ -346,32 +346,30 @@ const he = D.forwardRef(
|
|
|
346
346
|
containerClassName: O,
|
|
347
347
|
...p
|
|
348
348
|
}, E) => {
|
|
349
|
-
var C, F
|
|
350
|
-
const [y, g] = D.useState(!1), f = ue(), T = f == null ? void 0 : f.control,
|
|
351
|
-
console.log("form = ", f), console.log("valueWatch = ", P), console.log("name = ", r);
|
|
352
|
-
const N = (Y = (F = (C = f == null ? void 0 : f.formState) == null ? void 0 : C.errors) == null ? void 0 : F[r]) == null ? void 0 : Y.message, U = y || !!L;
|
|
349
|
+
var N, C, F;
|
|
350
|
+
const [y, g] = D.useState(!1), f = ue(), T = f == null ? void 0 : f.control, W = f == null ? void 0 : f.register, $ = T && r ? Te({ control: T, name: r }) : void 0, L = p.value ?? $ ?? "", P = (F = (C = (N = f == null ? void 0 : f.formState) == null ? void 0 : N.errors) == null ? void 0 : C[r]) == null ? void 0 : F.message, U = y || !!L;
|
|
353
351
|
return /* @__PURE__ */ R.jsxs("div", { className: j("relative", O), children: [
|
|
354
352
|
/* @__PURE__ */ R.jsx(
|
|
355
353
|
"input",
|
|
356
354
|
{
|
|
357
355
|
id: p.id || r,
|
|
358
|
-
type:
|
|
356
|
+
type: a,
|
|
359
357
|
className: j(
|
|
360
358
|
"peer flex h-12 w-full border border-[var(--primary,#2563eb)] rounded-md bg-[var(--input-bg,#fff)] text-[var(--input-text,#222)] px-3 pt-6 pb-2 text-sm placeholder-transparent transition focus:outline-none focus:border-[var(--primary,#2563eb)] disabled:cursor-not-allowed disabled:opacity-50",
|
|
361
359
|
s
|
|
362
360
|
),
|
|
363
361
|
onFocus: (m) => {
|
|
364
|
-
g(!0),
|
|
362
|
+
g(!0), o && o(m);
|
|
365
363
|
},
|
|
366
364
|
...f && r ? (() => {
|
|
367
|
-
const m =
|
|
365
|
+
const m = W(r), Y = m.onBlur;
|
|
368
366
|
return {
|
|
369
367
|
...m,
|
|
370
368
|
ref: (_) => {
|
|
371
369
|
typeof E == "function" ? E(_) : E && (E.current = _), m.ref && m.ref(_);
|
|
372
370
|
},
|
|
373
371
|
onBlur: (_) => {
|
|
374
|
-
g(!1), u && u(_),
|
|
372
|
+
g(!1), u && u(_), Y && Y(_);
|
|
375
373
|
}
|
|
376
374
|
};
|
|
377
375
|
})() : {
|
|
@@ -405,7 +403,7 @@ const he = D.forwardRef(
|
|
|
405
403
|
children: /* @__PURE__ */ R.jsx(d, {})
|
|
406
404
|
}
|
|
407
405
|
),
|
|
408
|
-
|
|
406
|
+
P && /* @__PURE__ */ R.jsx("span", { className: "text-red-500 text-xs mt-1 block", children: P })
|
|
409
407
|
] });
|
|
410
408
|
}
|
|
411
409
|
);
|