hans-ui-design-lib 0.0.67 → 0.0.68

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/index.cjs.js CHANGED
@@ -6,4 +6,19 @@
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 v;function b(){if(v)return p;v=1;var o=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function i(u,e,s){var n=null;if(s!==void 0&&(n=""+s),e.key!==void 0&&(n=""+e.key),"key"in e){s={};for(var r in e)r!=="key"&&(s[r]=e[r])}else s=e;return e=s.ref,{$$typeof:o,type:u,key:n,ref:e!==void 0?e:null,props:s}}return p.Fragment=t,p.jsx=i,p.jsxs=i,p}var f;function q(){return f||(f=1,h.exports=b()),h.exports}var a=q();const x=d.memo(o=>{const{label:t="",size:i="medium",color:u="primary",variant:e="default",buttonType:s="button",customClasses:n="",disabled:r=!1,children:c,...l}=o;return a.jsx("button",{type:s,disabled:r,className:`hans-button hans-button-${i} hans-button-${u} hans-button-${e} ${n}`,...l,children:a.jsx("slot",{children:c??(t&&a.jsx("span",{children:t}))})})});x.displayName="HansButton";const P=d.memo(o=>{const{label:t="",placeholder:i="",value:u="",color:e="primary",inputSize:s="medium",inputType:n="text",customClasses:r="",disabled:c=!1,children:l,...m}=o;return a.jsxs(a.Fragment,{children:[l,t,a.jsx("input",{type:n,disabled:c,value:u,placeholder:i,className:`hans-input hans-input-${s} hans-input-${e} ${r}`,...m})]})});P.displayName="HansInput";function y(o){return Object.keys(o)}const R={name:"string",size:{type:"custom",ref:{}},customClasses:"string"},j=y(R),H={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"))},I=d.memo(o=>{const{name:t,size:i="medium",customClasses:u="",...e}=o,[s,n]=d.useState(null);return d.useEffect(()=>{let r=!0;if(!t)return;const c=t.slice(0,2),l=H[c];if(l)return(async()=>{try{const m=await l();if(!r)return;n(()=>m[t]||null)}catch(m){console.warn(`[HansUI] Error loading icon ${t}:`,m),r&&n(()=>null)}})(),()=>{r=!1}},[t]),s?a.jsx(s,{className:`hans-icon hans-icon-${i} ${u}`,...e}):a.jsx("span",{className:"hans-icon-loading"})});I.displayName="HansIcon";const $={label:"string",size:{type:"custom",ref:{}},color:{type:"custom",ref:{}},variant:{type:"custom",ref:{}},buttonType:{type:"custom",ref:{}},customClasses:"string",disabled:"boolean"},E=y($);exports.DynamicIconImports=H;exports.HansButton=x;exports.HansButtonPropsList=E;exports.HansIcon=I;exports.HansIconPropsList=j;exports.HansInput=P;
9
+ */var f;function I(){if(f)return p;f=1;var o=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function i(a,e,t){var r=null;if(t!==void 0&&(r=""+t),e.key!==void 0&&(r=""+e.key),"key"in e){t={};for(var n in e)n!=="key"&&(t[n]=e[n])}else t=e;return e=t.ref,{$$typeof:o,type:a,key:r,ref:e!==void 0?e:null,props:t}}return p.Fragment=s,p.jsx=i,p.jsxs=i,p}var v;function q(){return v||(v=1,h.exports=I()),h.exports}var u=q();const x=d.memo(o=>{const{label:s="",buttonSize:i="medium",buttonColor:a="primary",buttonVariant:e="default",buttonType:t="button",customClasses:r="",disabled:n=!1,children:c,...l}=o;return u.jsx("button",{type:t,disabled:n,className:`
10
+ hans-button
11
+ hans-button-${i}
12
+ hans-button-${a}
13
+ hans-button-${e}
14
+ ${r}
15
+ `,...l,children:u.jsx("slot",{children:c??(s&&u.jsx("span",{children:s}))})})});x.displayName="HansButton";const b=d.memo(o=>{const{label:s="",placeholder:i="",value:a="",inputColor:e="primary",inputSize:t="medium",inputType:r="text",customClasses:n="",disabled:c=!1,children:l,...m}=o;return u.jsxs(u.Fragment,{children:[l,s,u.jsx("input",{type:r,disabled:c,value:a,placeholder:i,className:`
16
+ hans-input
17
+ hans-input-${t}
18
+ hans-input-${e}
19
+ ${n}
20
+ `,...m})]})});b.displayName="HansInput";function P(o){return Object.keys(o)}const R={name:"string",iconSize:{type:"custom",ref:{}},customClasses:"string"},j=P(R),y={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"))},H=d.memo(o=>{const{name:s,iconSize:i="medium",customClasses:a="",...e}=o,[t,r]=d.useState(null);return d.useEffect(()=>{let n=!0;if(!s)return;const c=s.slice(0,2),l=y[c];if(l)return(async()=>{try{const m=await l();if(!n)return;r(()=>m[s]||null)}catch(m){console.warn(`[HansUI] Error loading icon ${s}:`,m),n&&r(()=>null)}})(),()=>{n=!1}},[s]),t?u.jsx(t,{className:`
21
+ hans-icon
22
+ hans-icon-${i}
23
+ ${a}
24
+ `,...e}):u.jsx("span",{className:"hans-icon-loading"})});H.displayName="HansIcon";const C={label:"string",buttonSize:{type:"custom",ref:{}},buttonColor:{type:"custom",ref:{}},buttonVariant:{type:"custom",ref:{}},buttonType:{type:"custom",ref:{}},customClasses:"string",disabled:"boolean"},S=P(C);exports.DynamicIconImports=y;exports.HansButton=x;exports.HansButtonPropsList=S;exports.HansIcon=H;exports.HansIconPropsList=j;exports.HansInput=b;
package/dist/index.d.ts CHANGED
@@ -11,19 +11,19 @@ export declare const HansButton: default_2.MemoExoticComponent<(props: HansButto
11
11
 
12
12
  export declare type HansButtonProps = InferPropsFromSchema<typeof HansButtonSchema> & default_2.ButtonHTMLAttributes<HTMLButtonElement>;
13
13
 
14
- export declare const HansButtonPropsList: ("label" | "size" | "color" | "variant" | "buttonType" | "customClasses" | "disabled")[];
14
+ export declare const HansButtonPropsList: ("label" | "buttonSize" | "buttonColor" | "buttonVariant" | "buttonType" | "customClasses" | "disabled")[];
15
15
 
16
16
  declare const HansButtonSchema: {
17
17
  readonly label: "string";
18
- readonly size: {
18
+ readonly buttonSize: {
19
19
  readonly type: "custom";
20
20
  readonly ref: Size;
21
21
  };
22
- readonly color: {
22
+ readonly buttonColor: {
23
23
  readonly type: "custom";
24
24
  readonly ref: Color;
25
25
  };
26
- readonly variant: {
26
+ readonly buttonVariant: {
27
27
  readonly type: "custom";
28
28
  readonly ref: Variant;
29
29
  };
@@ -39,11 +39,11 @@ export declare const HansIcon: default_2.FC<HansIconProps>;
39
39
 
40
40
  export declare type HansIconProps = InferPropsFromSchema<typeof HansIconSchema>;
41
41
 
42
- export declare const HansIconPropsList: ("size" | "customClasses" | "name")[];
42
+ export declare const HansIconPropsList: ("customClasses" | "name" | "iconSize")[];
43
43
 
44
44
  declare const HansIconSchema: {
45
45
  readonly name: "string";
46
- readonly size: {
46
+ readonly iconSize: {
47
47
  readonly type: "custom";
48
48
  readonly ref: Size;
49
49
  };
@@ -58,7 +58,7 @@ declare const HansInputSchema: {
58
58
  readonly label: "string";
59
59
  readonly placeholder: "string";
60
60
  readonly value: "string";
61
- readonly color: {
61
+ readonly inputColor: {
62
62
  readonly type: "custom";
63
63
  readonly ref: Color;
64
64
  };
package/dist/index.es.js CHANGED
@@ -10,94 +10,105 @@ var x = { exports: {} }, p = {};
10
10
  * LICENSE file in the root directory of this source tree.
11
11
  */
12
12
  var f;
13
- function R() {
13
+ function y() {
14
14
  if (f) return p;
15
15
  f = 1;
16
- var o = Symbol.for("react.transitional.element"), n = Symbol.for("react.fragment");
17
- function a(u, t, s) {
16
+ var o = Symbol.for("react.transitional.element"), s = Symbol.for("react.fragment");
17
+ function i(u, t, n) {
18
18
  var r = null;
19
- if (s !== void 0 && (r = "" + s), t.key !== void 0 && (r = "" + t.key), "key" in t) {
20
- s = {};
19
+ if (n !== void 0 && (r = "" + n), t.key !== void 0 && (r = "" + t.key), "key" in t) {
20
+ n = {};
21
21
  for (var e in t)
22
- e !== "key" && (s[e] = t[e]);
23
- } else s = t;
24
- return t = s.ref, {
22
+ e !== "key" && (n[e] = t[e]);
23
+ } else n = t;
24
+ return t = n.ref, {
25
25
  $$typeof: o,
26
26
  type: u,
27
27
  key: r,
28
28
  ref: t !== void 0 ? t : null,
29
- props: s
29
+ props: n
30
30
  };
31
31
  }
32
- return p.Fragment = n, p.jsx = a, p.jsxs = a, p;
32
+ return p.Fragment = s, p.jsx = i, p.jsxs = i, p;
33
33
  }
34
34
  var h;
35
- function b() {
36
- return h || (h = 1, x.exports = R()), x.exports;
35
+ function R() {
36
+ return h || (h = 1, x.exports = y()), x.exports;
37
37
  }
38
- var i = b();
39
- const v = d.memo((o) => {
38
+ var a = R();
39
+ const j = d.memo((o) => {
40
40
  const {
41
- label: n = "",
42
- size: a = "medium",
43
- color: u = "primary",
44
- variant: t = "default",
45
- buttonType: s = "button",
41
+ label: s = "",
42
+ buttonSize: i = "medium",
43
+ buttonColor: u = "primary",
44
+ buttonVariant: t = "default",
45
+ buttonType: n = "button",
46
46
  customClasses: r = "",
47
47
  disabled: e = !1,
48
48
  children: l,
49
49
  ...c
50
50
  } = o;
51
- return /* @__PURE__ */ i.jsx(
51
+ return /* @__PURE__ */ a.jsx(
52
52
  "button",
53
53
  {
54
- type: s,
54
+ type: n,
55
55
  disabled: e,
56
- className: `hans-button hans-button-${a} hans-button-${u} hans-button-${t} ${r}`,
56
+ className: `
57
+ hans-button
58
+ hans-button-${i}
59
+ hans-button-${u}
60
+ hans-button-${t}
61
+ ${r}
62
+ `,
57
63
  ...c,
58
- children: /* @__PURE__ */ i.jsx("slot", { children: l ?? (n && /* @__PURE__ */ i.jsx("span", { children: n })) })
64
+ children: /* @__PURE__ */ a.jsx("slot", { children: l ?? (s && /* @__PURE__ */ a.jsx("span", { children: s })) })
59
65
  }
60
66
  );
61
67
  });
62
- v.displayName = "HansButton";
63
- const j = d.memo((o) => {
68
+ j.displayName = "HansButton";
69
+ const v = d.memo((o) => {
64
70
  const {
65
- label: n = "",
66
- placeholder: a = "",
71
+ label: s = "",
72
+ placeholder: i = "",
67
73
  value: u = "",
68
- color: t = "primary",
69
- inputSize: s = "medium",
74
+ inputColor: t = "primary",
75
+ inputSize: n = "medium",
70
76
  inputType: r = "text",
71
77
  customClasses: e = "",
72
78
  disabled: l = !1,
73
79
  children: c,
74
80
  ...m
75
81
  } = o;
76
- return /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
82
+ return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
77
83
  c,
78
- n,
79
- /* @__PURE__ */ i.jsx(
84
+ s,
85
+ /* @__PURE__ */ a.jsx(
80
86
  "input",
81
87
  {
82
88
  type: r,
83
89
  disabled: l,
84
90
  value: u,
85
- placeholder: a,
86
- className: `hans-input hans-input-${s} hans-input-${t} ${e}`,
91
+ placeholder: i,
92
+ className: `
93
+ hans-input
94
+ hans-input-${n}
95
+ hans-input-${t}
96
+ ${e}
97
+ `,
87
98
  ...m
88
99
  }
89
100
  )
90
101
  ] });
91
102
  });
92
- j.displayName = "HansInput";
93
- function y(o) {
103
+ v.displayName = "HansInput";
104
+ function b(o) {
94
105
  return Object.keys(o);
95
106
  }
96
- const H = {
107
+ const C = {
97
108
  name: "string",
98
- size: { type: "custom", ref: {} },
109
+ iconSize: { type: "custom", ref: {} },
99
110
  customClasses: "string"
100
- }, C = y(H), I = {
111
+ }, S = b(C), H = {
101
112
  Fa: () => import("./index-CuLnU-aI.js"),
102
113
  Md: () => import("./index-D5QBazti.js"),
103
114
  Bi: () => import("./index-Cru_aeJC.js"),
@@ -109,49 +120,53 @@ const H = {
109
120
  Pi: () => import("./index-CraOMhSg.js"),
110
121
  Tb: () => import("./index-C_w14lJB.js"),
111
122
  Lu: () => import("./index-HCQwBvMc.js")
112
- }, $ = d.memo(
123
+ }, I = d.memo(
113
124
  (o) => {
114
- const { name: n, size: a = "medium", customClasses: u = "", ...t } = o, [s, r] = d.useState(null);
125
+ const { name: s, iconSize: i = "medium", customClasses: u = "", ...t } = o, [n, r] = d.useState(null);
115
126
  return d.useEffect(() => {
116
127
  let e = !0;
117
- if (!n) return;
118
- const l = n.slice(0, 2), c = I[l];
128
+ if (!s) return;
129
+ const l = s.slice(0, 2), c = H[l];
119
130
  if (c)
120
131
  return (async () => {
121
132
  try {
122
133
  const m = await c();
123
134
  if (!e) return;
124
- r(() => m[n] || null);
135
+ r(() => m[s] || null);
125
136
  } catch (m) {
126
- console.warn(`[HansUI] Error loading icon ${n}:`, m), e && r(() => null);
137
+ console.warn(`[HansUI] Error loading icon ${s}:`, m), e && r(() => null);
127
138
  }
128
139
  })(), () => {
129
140
  e = !1;
130
141
  };
131
- }, [n]), s ? /* @__PURE__ */ i.jsx(
132
- s,
142
+ }, [s]), n ? /* @__PURE__ */ a.jsx(
143
+ n,
133
144
  {
134
- className: `hans-icon hans-icon-${a} ${u}`,
145
+ className: `
146
+ hans-icon
147
+ hans-icon-${i}
148
+ ${u}
149
+ `,
135
150
  ...t
136
151
  }
137
- ) : /* @__PURE__ */ i.jsx("span", { className: "hans-icon-loading" });
152
+ ) : /* @__PURE__ */ a.jsx("span", { className: "hans-icon-loading" });
138
153
  }
139
154
  );
140
- $.displayName = "HansIcon";
141
- const E = {
155
+ I.displayName = "HansIcon";
156
+ const $ = {
142
157
  label: "string",
143
- size: { type: "custom", ref: {} },
144
- color: { type: "custom", ref: {} },
145
- variant: { type: "custom", ref: {} },
158
+ buttonSize: { type: "custom", ref: {} },
159
+ buttonColor: { type: "custom", ref: {} },
160
+ buttonVariant: { type: "custom", ref: {} },
146
161
  buttonType: { type: "custom", ref: {} },
147
162
  customClasses: "string",
148
163
  disabled: "boolean"
149
- }, k = y(E);
164
+ }, T = b($);
150
165
  export {
151
- I as DynamicIconImports,
152
- v as HansButton,
153
- k as HansButtonPropsList,
154
- $ as HansIcon,
155
- C as HansIconPropsList,
156
- j as HansInput
166
+ H as DynamicIconImports,
167
+ j as HansButton,
168
+ T as HansButtonPropsList,
169
+ I as HansIcon,
170
+ S as HansIconPropsList,
171
+ v as HansInput
157
172
  };
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.67",
5
+ "version": "0.0.68",
6
6
  "type": "module",
7
7
  "license": "MIT",
8
8
  "main": "dist/index.cjs.js",