hans-ui-design-lib 0.0.46 → 0.0.47

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 CHANGED
@@ -172,19 +172,5 @@ npm i -D sass
172
172
 
173
173
  npm i -D react-icons
174
174
 
175
- npm i -D react-to-webcomponent
176
-
177
- npm install -D webpack webpack-cli webpack-merge html-webpack-plugin css-loader style-loader tslib
178
-
179
- npm install -D babel-loader @babel/core @babel/preset-env @babel/preset-react
180
-
181
- npm install -D webpack-dev-server
182
-
183
- npm install -D ts-loader source-map-loader
184
-
185
- npm install -D copy-webpack-plugin
186
-
187
- npm install -D @babel/preset-typescript react@19.2.0 react-dom@19.2.0
188
-
189
- npm install -D mini-css-extract-plugin
175
+ npm i -D react react-dom react-to-webcomponent @ungap/custom-elements
190
176
  ```
package/dist/index.cjs.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const R=require("react");var P={exports:{}},_={};/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react");var v={exports:{}},a={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.js
4
4
  *
@@ -6,17 +6,4 @@
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 F;function oe(){if(F)return _;F=1;var l=Symbol.for("react.transitional.element"),u=Symbol.for("react.fragment");function f(m,a,s){var c=null;if(s!==void 0&&(c=""+s),a.key!==void 0&&(c=""+a.key),"key"in a){s={};for(var i in a)i!=="key"&&(s[i]=a[i])}else s=a;return a=s.ref,{$$typeof:l,type:m,key:c,ref:a!==void 0?a:null,props:s}}return _.Fragment=u,_.jsx=f,_.jsxs=f,_}var p={};/**
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 M;function ae(){return M||(M=1,process.env.NODE_ENV!=="production"&&(function(){function l(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===re?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case k:return"Fragment";case B:return"Profiler";case V:return"StrictMode";case Z:return"Suspense";case Q:return"SuspenseList";case ee: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 J:return"Portal";case X:return e.displayName||"Context";case G:return(e._context.displayName||"Context")+".Consumer";case H:var r=e.render;return e=e.displayName,e||(e=r.displayName||r.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case K:return r=e.displayName||null,r!==null?r:l(e.type)||"Memo";case O:r=e._payload,e=e._init;try{return l(e(r))}catch{}}return null}function u(e){return""+e}function f(e){try{u(e);var r=!1}catch{r=!0}if(r){r=console;var t=r.error,n=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t.call(r,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",n),u(e)}}function m(e){if(e===k)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===O)return"<...>";try{var r=l(e);return r?"<"+r+">":"<...>"}catch{return"<...>"}}function a(){var e=S.A;return e===null?null:e.getOwner()}function s(){return Error("react-stack-top-frame")}function c(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 i(e,r){function t(){I||(I=!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 v(){var e=l(this.type);return $[e]||($[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 d(e,r,t,n,h,j){var o=t.ref;return e={$$typeof:N,type:e,key:r,props:t,_owner:n},(o!==void 0?o:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:v}):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:j}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function E(e,r,t,n,h,j){var o=r.children;if(o!==void 0)if(n)if(te(o)){for(n=0;n<o.length;n++)w(o[n]);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 w(o);if(C.call(r,"key")){o=l(e);var b=Object.keys(r).filter(function(ne){return ne!=="key"});n=0<b.length?"{key: someKey, "+b.join(": ..., ")+": ...}":"{key: someKey}",D[o+n]||(b=0<b.length?"{"+b.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
18
- let props = %s;
19
- <%s {...props} />
20
- React keys must be passed directly to JSX without using spread:
21
- let props = %s;
22
- <%s key={someKey} {...props} />`,n,o,b,o),D[o+n]=!0)}if(o=null,t!==void 0&&(f(t),o=""+t),c(r)&&(f(r.key),o=""+r.key),"key"in r){t={};for(var x in r)x!=="key"&&(t[x]=r[x])}else t=r;return o&&i(t,typeof e=="function"?e.displayName||e.name||"Unknown":e),d(e,o,t,a(),h,j)}function w(e){g(e)?e._store&&(e._store.validated=1):typeof e=="object"&&e!==null&&e.$$typeof===O&&(e._payload.status==="fulfilled"?g(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function g(e){return typeof e=="object"&&e!==null&&e.$$typeof===N}var T=R,N=Symbol.for("react.transitional.element"),J=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),V=Symbol.for("react.strict_mode"),B=Symbol.for("react.profiler"),G=Symbol.for("react.consumer"),X=Symbol.for("react.context"),H=Symbol.for("react.forward_ref"),Z=Symbol.for("react.suspense"),Q=Symbol.for("react.suspense_list"),K=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),ee=Symbol.for("react.activity"),re=Symbol.for("react.client.reference"),S=T.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,C=Object.prototype.hasOwnProperty,te=Array.isArray,A=console.createTask?console.createTask:function(){return null};T={react_stack_bottom_frame:function(e){return e()}};var I,$={},Y=T.react_stack_bottom_frame.bind(T,s)(),q=A(m(s)),D={};p.Fragment=k,p.jsx=function(e,r,t){var n=1e4>S.recentlyCreatedOwnerStacks++;return E(e,r,t,!1,n?Error("react-stack-top-frame"):Y,n?A(m(e)):q)},p.jsxs=function(e,r,t){var n=1e4>S.recentlyCreatedOwnerStacks++;return E(e,r,t,!0,n?Error("react-stack-top-frame"):Y,n?A(m(e)):q)}})()),p}var L;function se(){return L||(L=1,process.env.NODE_ENV==="production"?P.exports=oe():P.exports=ae()),P.exports}var y=se();const U=R.memo(l=>{const{label:u="",size:f="medium",color:m="primary",variant:a="default",buttonType:s="button",customClasses:c="",disabled:i=!1,children:v,...d}=l;return y.jsx("button",{type:s,disabled:i,className:`hans-button hans-button-${f} hans-button-${m} hans-button-${a} ${c}`,...d,children:v??(u&&y.jsx("span",{children:u}))})});U.displayName="Button";const W={Fa:()=>Promise.resolve().then(()=>require("./index-B8vGj59Y.cjs")),Md:()=>Promise.resolve().then(()=>require("./index-BniI3q7_.cjs")),Bi:()=>Promise.resolve().then(()=>require("./index-CzJEuaAC.cjs")),Ai:()=>Promise.resolve().then(()=>require("./index-DpGEmQKf.cjs")),Bs:()=>Promise.resolve().then(()=>require("./index-DOM24eP1.cjs")),Io:()=>Promise.resolve().then(()=>require("./index-DqJAPiPg.cjs")),Ri:()=>Promise.resolve().then(()=>require("./index-Cg9EwHiA.cjs")),Hi:()=>Promise.resolve().then(()=>require("./index-Cd4f2LU9.cjs")),Pi:()=>Promise.resolve().then(()=>require("./index-DgzbVFqs.cjs")),Tb:()=>Promise.resolve().then(()=>require("./index-BMJKTS9q.cjs")),Lu:()=>Promise.resolve().then(()=>require("./index-CsmLabva.cjs"))},z=R.memo(l=>{const{name:u,size:f="medium",customClasses:m="",...a}=l,[s,c]=R.useState(null);return R.useEffect(()=>{let i=!0;if(!u)return;const v=u.slice(0,2),d=W[v];if(d)return(async()=>{try{const E=await d();if(!i)return;c(()=>E[u]||null)}catch(E){console.warn(`[HansUI] Error loading icon ${u}:`,E),i&&c(()=>null)}})(),()=>{i=!1}},[u]),s?y.jsx(s,{className:`hans-icon hans-icon-${f} ${m}`,...a}):y.jsx("span",{className:"hans-icon-loading"})});z.displayName="Icon";exports.Button=U;exports.DynamicIconImports=W;exports.Icon=z;
9
+ */var p;function R(){if(p)return a;p=1;var i=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function o(u,e,r){var n=null;if(r!==void 0&&(n=""+r),e.key!==void 0&&(n=""+e.key),"key"in e){r={};for(var s in e)s!=="key"&&(r[s]=e[s])}else r=e;return e=r.ref,{$$typeof:i,type:u,key:n,ref:e!==void 0?e:null,props:r}}return a.Fragment=t,a.jsx=o,a.jsxs=o,a}var x;function E(){return x||(x=1,v.exports=R()),v.exports}var m=E();const f=c.memo(i=>{const{label:t="",size:o="medium",color:u="primary",variant:e="default",buttonType:r="button",customClasses:n="",disabled:s=!1,children:d,...l}=i;return m.jsx("button",{type:r,disabled:s,className:`hans-button hans-button-${o} hans-button-${u} hans-button-${e} ${n}`,...l,children:d??(t&&m.jsx("span",{children:t}))})});f.displayName="Button";const q={Fa:()=>Promise.resolve().then(()=>require("./index-B8vGj59Y.cjs")),Md:()=>Promise.resolve().then(()=>require("./index-BniI3q7_.cjs")),Bi:()=>Promise.resolve().then(()=>require("./index-CzJEuaAC.cjs")),Ai:()=>Promise.resolve().then(()=>require("./index-DpGEmQKf.cjs")),Bs:()=>Promise.resolve().then(()=>require("./index-DOM24eP1.cjs")),Io:()=>Promise.resolve().then(()=>require("./index-DqJAPiPg.cjs")),Ri:()=>Promise.resolve().then(()=>require("./index-Cg9EwHiA.cjs")),Hi:()=>Promise.resolve().then(()=>require("./index-Cd4f2LU9.cjs")),Pi:()=>Promise.resolve().then(()=>require("./index-DgzbVFqs.cjs")),Tb:()=>Promise.resolve().then(()=>require("./index-BMJKTS9q.cjs")),Lu:()=>Promise.resolve().then(()=>require("./index-CsmLabva.cjs"))},P=c.memo(i=>{const{name:t,size:o="medium",customClasses:u="",...e}=i,[r,n]=c.useState(null);return c.useEffect(()=>{let s=!0;if(!t)return;const d=t.slice(0,2),l=q[d];if(l)return(async()=>{try{const h=await l();if(!s)return;n(()=>h[t]||null)}catch(h){console.warn(`[HansUI] Error loading icon ${t}:`,h),s&&n(()=>null)}})(),()=>{s=!1}},[t]),r?m.jsx(r,{className:`hans-icon hans-icon-${o} ${u}`,...e}):m.jsx("span",{className:"hans-icon-loading"})});P.displayName="Icon";exports.Button=f;exports.DynamicIconImports=q;exports.Icon=P;
package/dist/index.es.js CHANGED
@@ -1,5 +1,5 @@
1
- import v from "react";
2
- var y = { exports: {} }, b = {};
1
+ import m from "react";
2
+ var x = { exports: {} }, u = {};
3
3
  /**
4
4
  * @license React
5
5
  * react-jsx-runtime.production.js
@@ -9,299 +9,58 @@ var y = { exports: {} }, b = {};
9
9
  * This source code is licensed under the MIT license found in the
10
10
  * LICENSE file in the root directory of this source tree.
11
11
  */
12
- var L;
13
- function re() {
14
- if (L) return b;
15
- L = 1;
16
- var u = Symbol.for("react.transitional.element"), l = Symbol.for("react.fragment");
17
- function f(m, a, s) {
18
- var i = null;
19
- if (s !== void 0 && (i = "" + s), a.key !== void 0 && (i = "" + a.key), "key" in a) {
20
- s = {};
21
- for (var c in a)
22
- c !== "key" && (s[c] = a[c]);
23
- } else s = a;
24
- return a = s.ref, {
25
- $$typeof: u,
26
- type: m,
27
- key: i,
28
- ref: a !== void 0 ? a : null,
29
- props: s
12
+ var f;
13
+ function h() {
14
+ if (f) return u;
15
+ f = 1;
16
+ var i = Symbol.for("react.transitional.element"), n = Symbol.for("react.fragment");
17
+ function o(a, t, r) {
18
+ var s = null;
19
+ if (r !== void 0 && (s = "" + r), t.key !== void 0 && (s = "" + t.key), "key" in t) {
20
+ r = {};
21
+ for (var e in t)
22
+ e !== "key" && (r[e] = t[e]);
23
+ } else r = t;
24
+ return t = r.ref, {
25
+ $$typeof: i,
26
+ type: a,
27
+ key: s,
28
+ ref: t !== void 0 ? t : null,
29
+ props: r
30
30
  };
31
31
  }
32
- return b.Fragment = l, b.jsx = f, b.jsxs = f, b;
32
+ return u.Fragment = n, u.jsx = o, u.jsxs = o, u;
33
33
  }
34
- var R = {};
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
- */
44
- var M;
45
- function te() {
46
- return M || (M = 1, process.env.NODE_ENV !== "production" && (function() {
47
- function u(e) {
48
- if (e == null) return null;
49
- if (typeof e == "function")
50
- return e.$$typeof === Q ? null : e.displayName || e.name || null;
51
- if (typeof e == "string") return e;
52
- switch (e) {
53
- case O:
54
- return "Fragment";
55
- case J:
56
- return "Profiler";
57
- case z:
58
- return "StrictMode";
59
- case G:
60
- return "Suspense";
61
- case X:
62
- return "SuspenseList";
63
- case Z:
64
- return "Activity";
65
- }
66
- if (typeof e == "object")
67
- switch (typeof e.tag == "number" && console.error(
68
- "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
69
- ), e.$$typeof) {
70
- case W:
71
- return "Portal";
72
- case q:
73
- return e.displayName || "Context";
74
- case V:
75
- return (e._context.displayName || "Context") + ".Consumer";
76
- case B:
77
- var r = e.render;
78
- return e = e.displayName, e || (e = r.displayName || r.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
79
- case H:
80
- return r = e.displayName || null, r !== null ? r : u(e.type) || "Memo";
81
- case A:
82
- r = e._payload, e = e._init;
83
- try {
84
- return u(e(r));
85
- } catch {
86
- }
87
- }
88
- return null;
89
- }
90
- function l(e) {
91
- return "" + e;
92
- }
93
- function f(e) {
94
- try {
95
- l(e);
96
- var r = !1;
97
- } catch {
98
- r = !0;
99
- }
100
- if (r) {
101
- r = console;
102
- var t = r.error, n = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
103
- return t.call(
104
- r,
105
- "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
106
- n
107
- ), l(e);
108
- }
109
- }
110
- function m(e) {
111
- if (e === O) return "<>";
112
- if (typeof e == "object" && e !== null && e.$$typeof === A)
113
- return "<...>";
114
- try {
115
- var r = u(e);
116
- return r ? "<" + r + ">" : "<...>";
117
- } catch {
118
- return "<...>";
119
- }
120
- }
121
- function a() {
122
- var e = x.A;
123
- return e === null ? null : e.getOwner();
124
- }
125
- function s() {
126
- return Error("react-stack-top-frame");
127
- }
128
- function i(e) {
129
- if (C.call(e, "key")) {
130
- var r = Object.getOwnPropertyDescriptor(e, "key").get;
131
- if (r && r.isReactWarning) return !1;
132
- }
133
- return e.key !== void 0;
134
- }
135
- function c(e, r) {
136
- function t() {
137
- I || (I = !0, console.error(
138
- "%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)",
139
- r
140
- ));
141
- }
142
- t.isReactWarning = !0, Object.defineProperty(e, "key", {
143
- get: t,
144
- configurable: !0
145
- });
146
- }
147
- function _() {
148
- var e = u(this.type);
149
- return $[e] || ($[e] = !0, console.error(
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."
151
- )), e = this.props.ref, e !== void 0 ? e : null;
152
- }
153
- function d(e, r, t, n, k, P) {
154
- var o = t.ref;
155
- return e = {
156
- $$typeof: N,
157
- type: e,
158
- key: r,
159
- props: t,
160
- _owner: n
161
- }, (o !== void 0 ? o : null) !== null ? Object.defineProperty(e, "ref", {
162
- enumerable: !1,
163
- get: _
164
- }) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
165
- configurable: !1,
166
- enumerable: !1,
167
- writable: !0,
168
- value: 0
169
- }), Object.defineProperty(e, "_debugInfo", {
170
- configurable: !1,
171
- enumerable: !1,
172
- writable: !0,
173
- value: null
174
- }), Object.defineProperty(e, "_debugStack", {
175
- configurable: !1,
176
- enumerable: !1,
177
- writable: !0,
178
- value: k
179
- }), Object.defineProperty(e, "_debugTask", {
180
- configurable: !1,
181
- enumerable: !1,
182
- writable: !0,
183
- value: P
184
- }), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
185
- }
186
- function p(e, r, t, n, k, P) {
187
- var o = r.children;
188
- if (o !== void 0)
189
- if (n)
190
- if (K(o)) {
191
- for (n = 0; n < o.length; n++)
192
- w(o[n]);
193
- Object.freeze && Object.freeze(o);
194
- } else
195
- console.error(
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
- );
198
- else w(o);
199
- if (C.call(r, "key")) {
200
- o = u(e);
201
- var E = Object.keys(r).filter(function(ee) {
202
- return ee !== "key";
203
- });
204
- n = 0 < E.length ? "{key: someKey, " + E.join(": ..., ") + ": ...}" : "{key: someKey}", D[o + n] || (E = 0 < E.length ? "{" + E.join(": ..., ") + ": ...}" : "{}", console.error(
205
- `A props object containing a "key" prop is being spread into JSX:
206
- let props = %s;
207
- <%s {...props} />
208
- React keys must be passed directly to JSX without using spread:
209
- let props = %s;
210
- <%s key={someKey} {...props} />`,
211
- n,
212
- o,
213
- E,
214
- o
215
- ), D[o + n] = !0);
216
- }
217
- if (o = null, t !== void 0 && (f(t), o = "" + t), i(r) && (f(r.key), o = "" + r.key), "key" in r) {
218
- t = {};
219
- for (var j in r)
220
- j !== "key" && (t[j] = r[j]);
221
- } else t = r;
222
- return o && c(
223
- t,
224
- typeof e == "function" ? e.displayName || e.name || "Unknown" : e
225
- ), d(
226
- e,
227
- o,
228
- t,
229
- a(),
230
- k,
231
- P
232
- );
233
- }
234
- function w(e) {
235
- g(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof === A && (e._payload.status === "fulfilled" ? g(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
236
- }
237
- function g(e) {
238
- return typeof e == "object" && e !== null && e.$$typeof === N;
239
- }
240
- var T = v, N = Symbol.for("react.transitional.element"), W = Symbol.for("react.portal"), O = Symbol.for("react.fragment"), z = Symbol.for("react.strict_mode"), J = 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"), X = Symbol.for("react.suspense_list"), H = Symbol.for("react.memo"), A = Symbol.for("react.lazy"), Z = Symbol.for("react.activity"), Q = Symbol.for("react.client.reference"), x = T.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, C = Object.prototype.hasOwnProperty, K = Array.isArray, S = console.createTask ? console.createTask : function() {
241
- return null;
242
- };
243
- T = {
244
- react_stack_bottom_frame: function(e) {
245
- return e();
246
- }
247
- };
248
- var I, $ = {}, Y = T.react_stack_bottom_frame.bind(
249
- T,
250
- s
251
- )(), F = S(m(s)), D = {};
252
- R.Fragment = O, R.jsx = function(e, r, t) {
253
- var n = 1e4 > x.recentlyCreatedOwnerStacks++;
254
- return p(
255
- e,
256
- r,
257
- t,
258
- !1,
259
- n ? Error("react-stack-top-frame") : Y,
260
- n ? S(m(e)) : F
261
- );
262
- }, R.jsxs = function(e, r, t) {
263
- var n = 1e4 > x.recentlyCreatedOwnerStacks++;
264
- return p(
265
- e,
266
- r,
267
- t,
268
- !0,
269
- n ? Error("react-stack-top-frame") : Y,
270
- n ? S(m(e)) : F
271
- );
272
- };
273
- })()), R;
274
- }
275
- var U;
276
- function ne() {
277
- return U || (U = 1, process.env.NODE_ENV === "production" ? y.exports = re() : y.exports = te()), y.exports;
34
+ var R;
35
+ function v() {
36
+ return R || (R = 1, x.exports = h()), x.exports;
278
37
  }
279
- var h = ne();
280
- const oe = v.memo((u) => {
38
+ var c = v();
39
+ const E = m.memo((i) => {
281
40
  const {
282
- label: l = "",
283
- size: f = "medium",
284
- color: m = "primary",
285
- variant: a = "default",
286
- buttonType: s = "button",
287
- customClasses: i = "",
288
- disabled: c = !1,
289
- children: _,
290
- ...d
291
- } = u;
292
- return /* @__PURE__ */ h.jsx(
41
+ label: n = "",
42
+ size: o = "medium",
43
+ color: a = "primary",
44
+ variant: t = "default",
45
+ buttonType: r = "button",
46
+ customClasses: s = "",
47
+ disabled: e = !1,
48
+ children: p,
49
+ ...l
50
+ } = i;
51
+ return /* @__PURE__ */ c.jsx(
293
52
  "button",
294
53
  {
295
- type: s,
296
- disabled: c,
297
- className: `hans-button hans-button-${f} hans-button-${m} hans-button-${a} ${i}`,
298
- ...d,
299
- children: _ ?? (l && /* @__PURE__ */ h.jsx("span", { children: l }))
54
+ type: r,
55
+ disabled: e,
56
+ className: `hans-button hans-button-${o} hans-button-${a} hans-button-${t} ${s}`,
57
+ ...l,
58
+ children: p ?? (n && /* @__PURE__ */ c.jsx("span", { children: n }))
300
59
  }
301
60
  );
302
61
  });
303
- oe.displayName = "Button";
304
- const ae = {
62
+ E.displayName = "Button";
63
+ const j = {
305
64
  Fa: () => import("./index-CuLnU-aI.js"),
306
65
  Md: () => import("./index-D5QBazti.js"),
307
66
  Bi: () => import("./index-Cru_aeJC.js"),
@@ -313,35 +72,35 @@ const ae = {
313
72
  Pi: () => import("./index-CraOMhSg.js"),
314
73
  Tb: () => import("./index-C_w14lJB.js"),
315
74
  Lu: () => import("./index-HCQwBvMc.js")
316
- }, se = v.memo((u) => {
317
- const { name: l, size: f = "medium", customClasses: m = "", ...a } = u, [s, i] = v.useState(null);
318
- return v.useEffect(() => {
319
- let c = !0;
320
- if (!l) return;
321
- const _ = l.slice(0, 2), d = ae[_];
322
- if (d)
75
+ }, $ = m.memo((i) => {
76
+ const { name: n, size: o = "medium", customClasses: a = "", ...t } = i, [r, s] = m.useState(null);
77
+ return m.useEffect(() => {
78
+ let e = !0;
79
+ if (!n) return;
80
+ const p = n.slice(0, 2), l = j[p];
81
+ if (l)
323
82
  return (async () => {
324
83
  try {
325
- const p = await d();
326
- if (!c) return;
327
- i(() => p[l] || null);
328
- } catch (p) {
329
- console.warn(`[HansUI] Error loading icon ${l}:`, p), c && i(() => null);
84
+ const d = await l();
85
+ if (!e) return;
86
+ s(() => d[n] || null);
87
+ } catch (d) {
88
+ console.warn(`[HansUI] Error loading icon ${n}:`, d), e && s(() => null);
330
89
  }
331
90
  })(), () => {
332
- c = !1;
91
+ e = !1;
333
92
  };
334
- }, [l]), s ? /* @__PURE__ */ h.jsx(
335
- s,
93
+ }, [n]), r ? /* @__PURE__ */ c.jsx(
94
+ r,
336
95
  {
337
- className: `hans-icon hans-icon-${f} ${m}`,
338
- ...a
96
+ className: `hans-icon hans-icon-${o} ${a}`,
97
+ ...t
339
98
  }
340
- ) : /* @__PURE__ */ h.jsx("span", { className: "hans-icon-loading" });
99
+ ) : /* @__PURE__ */ c.jsx("span", { className: "hans-icon-loading" });
341
100
  });
342
- se.displayName = "Icon";
101
+ $.displayName = "Icon";
343
102
  export {
344
- oe as Button,
345
- ae as DynamicIconImports,
346
- se as Icon
103
+ E as Button,
104
+ j as DynamicIconImports,
105
+ $ as Icon
347
106
  };
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "hans-ui-design-lib",
3
3
  "description": "UI Design System Base Lib",
4
4
  "author": "Victor Hanszman",
5
- "version": "0.0.46",
5
+ "version": "0.0.47",
6
6
  "type": "module",
7
7
  "license": "MIT",
8
8
  "main": "dist/index.cjs.js",
@@ -34,7 +34,7 @@
34
34
  "copy:assets": "cpx \"src/assets/**/*\" dist/assets",
35
35
  "build": "vite build && npm run copy:assets",
36
36
  "build-storybook": "storybook build",
37
- "build-cdn": "",
37
+ "build-cdn": "vite build --mode cdn",
38
38
  "publish:patch": "npm version patch --no-git-tag-version && npm publish",
39
39
  "publish:minor": "npm version minor --no-git-tag-version && npm publish",
40
40
  "publish:major": "npm version major --no-git-tag-version && npm publish",
@@ -71,6 +71,7 @@
71
71
  "@types/testing-library__jest-dom": "^5.14.9",
72
72
  "@typescript-eslint/eslint-plugin": "^8.44.1",
73
73
  "@typescript-eslint/parser": "^8.44.1",
74
+ "@ungap/custom-elements": "^1.3.0",
74
75
  "@vitejs/plugin-react": "^5.0.3",
75
76
  "@vitest/browser": "^3.2.4",
76
77
  "@vitest/coverage-v8": "^3.2.4",