@cobe84/design-system 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ export {}
@@ -0,0 +1,22 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const V=require("react");var A={exports:{}},R={};/**
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 q;function re(){if(q)return R;q=1;var l=Symbol.for("react.transitional.element"),u=Symbol.for("react.fragment");function d(c,s,i){var f=null;if(i!==void 0&&(f=""+i),s.key!==void 0&&(f=""+s.key),"key"in s){i={};for(var _ in s)_!=="key"&&(i[_]=s[_])}else i=s;return s=i.ref,{$$typeof:l,type:c,key:f,ref:s!==void 0?s:null,props:i}}return R.Fragment=u,R.jsx=d,R.jsxs=d,R}var T={};/**
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 U;function te(){return U||(U=1,process.env.NODE_ENV!=="production"&&(function(){function l(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Q?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case h:return"Fragment";case w:return"Profiler";case S:return"StrictMode";case Z:return"Suspense";case G: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 k:return"Portal";case g:return e.displayName||"Context";case N:return(e._context.displayName||"Context")+".Consumer";case z:var r=e.render;return e=e.displayName,e||(e=r.displayName||r.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case X:return r=e.displayName||null,r!==null?r:l(e.type)||"Memo";case P:r=e._payload,e=e._init;try{return l(e(r))}catch{}}return null}function u(e){return""+e}function d(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 c(e){if(e===h)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===P)return"<...>";try{var r=l(e);return r?"<"+r+">":"<...>"}catch{return"<...>"}}function s(){var e=C.A;return e===null?null:e.getOwner()}function i(){return Error("react-stack-top-frame")}function f(e){if(F.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function _(e,r){function t(){D||(D=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",r))}t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}function m(){var e=l(this.type);return M[e]||(M[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 O(e,r,t,n,y,Y){var a=t.ref;return e={$$typeof:p,type:e,key:r,props:t,_owner:n},(a!==void 0?a:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:m}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:y}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:Y}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function E(e,r,t,n,y,Y){var a=r.children;if(a!==void 0)if(n)if(K(a)){for(n=0;n<a.length;n++)x(a[n]);Object.freeze&&Object.freeze(a)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else x(a);if(F.call(r,"key")){a=l(e);var v=Object.keys(r).filter(function(ee){return ee!=="key"});n=0<v.length?"{key: someKey, "+v.join(": ..., ")+": ...}":"{key: someKey}",W[a+n]||(v=0<v.length?"{"+v.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,a,v,a),W[a+n]=!0)}if(a=null,t!==void 0&&(d(t),a=""+t),f(r)&&(d(r.key),a=""+r.key),"key"in r){t={};for(var I in r)I!=="key"&&(t[I]=r[I])}else t=r;return a&&_(t,typeof e=="function"?e.displayName||e.name||"Unknown":e),O(e,a,t,s(),y,Y)}function x(e){j(e)?e._store&&(e._store.validated=1):typeof e=="object"&&e!==null&&e.$$typeof===P&&(e._payload.status==="fulfilled"?j(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function j(e){return typeof e=="object"&&e!==null&&e.$$typeof===p}var b=V,p=Symbol.for("react.transitional.element"),k=Symbol.for("react.portal"),h=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),N=Symbol.for("react.consumer"),g=Symbol.for("react.context"),z=Symbol.for("react.forward_ref"),Z=Symbol.for("react.suspense"),G=Symbol.for("react.suspense_list"),X=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),H=Symbol.for("react.activity"),Q=Symbol.for("react.client.reference"),C=b.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=Object.prototype.hasOwnProperty,K=Array.isArray,$=console.createTask?console.createTask:function(){return null};b={react_stack_bottom_frame:function(e){return e()}};var D,M={},B=b.react_stack_bottom_frame.bind(b,i)(),L=$(c(i)),W={};T.Fragment=h,T.jsx=function(e,r,t){var n=1e4>C.recentlyCreatedOwnerStacks++;return E(e,r,t,!1,n?Error("react-stack-top-frame"):B,n?$(c(e)):L)},T.jsxs=function(e,r,t){var n=1e4>C.recentlyCreatedOwnerStacks++;return E(e,r,t,!0,n?Error("react-stack-top-frame"):B,n?$(c(e)):L)}})()),T}var J;function ne(){return J||(J=1,process.env.NODE_ENV==="production"?A.exports=re():A.exports=te()),A.exports}var o=ne();function ae({label:l,variant:u="primary",size:d="m",disabled:c=!1,onClick:s,iconLeft:i,iconRight:f,ariaLabel:_}){const m=["button",`button--${u}`,`button--${d}`,c?"button--disabled":""].filter(Boolean).join(" ");return o.jsxs("button",{className:m,disabled:c,onClick:s,"aria-label":_??l,type:"button",children:[i?o.jsx("span",{className:"button__icon",children:i}):null,o.jsx("span",{className:"button__label",children:l}),f?o.jsx("span",{className:"button__icon",children:f}):null]})}function oe(l){return l||`tf_${Math.random().toString(16).slice(2)}`}const le=o.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24","aria-hidden":"true",children:o.jsx("path",{d:"M12 2a10 10 0 1 0 .001 20.001A10 10 0 0 0 12 2Zm0 6.2a1 1 0 1 1 0 2 1 1 0 0 1 0-2Zm-1 4.2h2v7h-2v-7Z",fill:"currentColor"})}),se=o.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24","aria-hidden":"true",children:o.jsx("path",{d:"M12 2a10 10 0 1 0 .001 20.001A10 10 0 0 0 12 2Zm4.2 11.2H12v-2h4.2l-1.6-1.6 1.4-1.4 4 4-4 4-1.4-1.4 1.6-1.6Z",fill:"currentColor"})});function ie({id:l,label:u,required:d=!1,helpAriaLabel:c="Ayuda",onHelpClick:s,helpIcon:i,placeholder:f,value:_,disabled:m=!1,size:O="m",state:E="default",helperText:x,leftIcon:j,rightIcon:b,onChange:p}){const k=V.useMemo(()=>oe(l),[l]),h=["textfield",m?"textfield--disabled":""].filter(Boolean).join(" "),S=["textfield__control",`textfield__control--${O}`,E==="error"?"textfield__control--error":""].filter(Boolean).join(" "),w=["textfield__helper",E==="error"?"textfield__helper--error":""].filter(Boolean).join(" "),N=!!s;return o.jsxs("div",{className:h,children:[(u||N)&&o.jsxs("div",{className:"textfield__labelRow",children:[u&&o.jsxs("label",{className:"textfield__label",htmlFor:k,children:[u,d&&o.jsx("span",{className:"textfield__required",children:"*"})]}),N&&o.jsx("button",{type:"button",className:"textfield__help","aria-label":c,onClick:s,disabled:m,children:i??o.jsx("span",{className:"textfield__helpDefaultIcon",children:"i"})})]}),o.jsxs("div",{className:S,"aria-disabled":m?"true":"false",children:[o.jsx("span",{className:"textfield__icon textfield__icon--left","aria-hidden":"true",children:j??le}),o.jsx("input",{id:k,className:"textfield__input",type:"text",placeholder:f,value:_??"",disabled:m,onChange:g=>p==null?void 0:p(g.target.value)}),o.jsx("span",{className:"textfield__icon textfield__icon--right","aria-hidden":"true",children:b??se})]}),x&&o.jsx("div",{className:w,children:x})]})}exports.Button=ae;exports.TextField=ie;
@@ -0,0 +1,396 @@
1
+ import V from "react";
2
+ var O = { exports: {} }, R = {};
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
+ */
12
+ var U;
13
+ function re() {
14
+ if (U) return R;
15
+ U = 1;
16
+ var l = Symbol.for("react.transitional.element"), c = Symbol.for("react.fragment");
17
+ function d(u, s, i) {
18
+ var f = null;
19
+ if (i !== void 0 && (f = "" + i), s.key !== void 0 && (f = "" + s.key), "key" in s) {
20
+ i = {};
21
+ for (var _ in s)
22
+ _ !== "key" && (i[_] = s[_]);
23
+ } else i = s;
24
+ return s = i.ref, {
25
+ $$typeof: l,
26
+ type: u,
27
+ key: f,
28
+ ref: s !== void 0 ? s : null,
29
+ props: i
30
+ };
31
+ }
32
+ return R.Fragment = c, R.jsx = d, R.jsxs = d, R;
33
+ }
34
+ var T = {};
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 q;
45
+ function te() {
46
+ return q || (q = 1, process.env.NODE_ENV !== "production" && (function() {
47
+ function l(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 h:
54
+ return "Fragment";
55
+ case S:
56
+ return "Profiler";
57
+ case y:
58
+ return "StrictMode";
59
+ case Z:
60
+ return "Suspense";
61
+ case G:
62
+ return "SuspenseList";
63
+ case H:
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 k:
71
+ return "Portal";
72
+ case g:
73
+ return e.displayName || "Context";
74
+ case N:
75
+ return (e._context.displayName || "Context") + ".Consumer";
76
+ case z:
77
+ var r = e.render;
78
+ return e = e.displayName, e || (e = r.displayName || r.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
79
+ case X:
80
+ return r = e.displayName || null, r !== null ? r : l(e.type) || "Memo";
81
+ case P:
82
+ r = e._payload, e = e._init;
83
+ try {
84
+ return l(e(r));
85
+ } catch {
86
+ }
87
+ }
88
+ return null;
89
+ }
90
+ function c(e) {
91
+ return "" + e;
92
+ }
93
+ function d(e) {
94
+ try {
95
+ c(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
+ ), c(e);
108
+ }
109
+ }
110
+ function u(e) {
111
+ if (e === h) return "<>";
112
+ if (typeof e == "object" && e !== null && e.$$typeof === P)
113
+ return "<...>";
114
+ try {
115
+ var r = l(e);
116
+ return r ? "<" + r + ">" : "<...>";
117
+ } catch {
118
+ return "<...>";
119
+ }
120
+ }
121
+ function s() {
122
+ var e = C.A;
123
+ return e === null ? null : e.getOwner();
124
+ }
125
+ function i() {
126
+ return Error("react-stack-top-frame");
127
+ }
128
+ function f(e) {
129
+ if (D.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 _(e, r) {
136
+ function t() {
137
+ F || (F = !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 m() {
148
+ var e = l(this.type);
149
+ return M[e] || (M[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 w(e, r, t, n, A, Y) {
154
+ var a = t.ref;
155
+ return e = {
156
+ $$typeof: b,
157
+ type: e,
158
+ key: r,
159
+ props: t,
160
+ _owner: n
161
+ }, (a !== void 0 ? a : null) !== null ? Object.defineProperty(e, "ref", {
162
+ enumerable: !1,
163
+ get: m
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: A
179
+ }), Object.defineProperty(e, "_debugTask", {
180
+ configurable: !1,
181
+ enumerable: !1,
182
+ writable: !0,
183
+ value: Y
184
+ }), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
185
+ }
186
+ function E(e, r, t, n, A, Y) {
187
+ var a = r.children;
188
+ if (a !== void 0)
189
+ if (n)
190
+ if (K(a)) {
191
+ for (n = 0; n < a.length; n++)
192
+ x(a[n]);
193
+ Object.freeze && Object.freeze(a);
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 x(a);
199
+ if (D.call(r, "key")) {
200
+ a = l(e);
201
+ var v = Object.keys(r).filter(function(ee) {
202
+ return ee !== "key";
203
+ });
204
+ n = 0 < v.length ? "{key: someKey, " + v.join(": ..., ") + ": ...}" : "{key: someKey}", B[a + n] || (v = 0 < v.length ? "{" + v.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
+ a,
213
+ v,
214
+ a
215
+ ), B[a + n] = !0);
216
+ }
217
+ if (a = null, t !== void 0 && (d(t), a = "" + t), f(r) && (d(r.key), a = "" + r.key), "key" in r) {
218
+ t = {};
219
+ for (var I in r)
220
+ I !== "key" && (t[I] = r[I]);
221
+ } else t = r;
222
+ return a && _(
223
+ t,
224
+ typeof e == "function" ? e.displayName || e.name || "Unknown" : e
225
+ ), w(
226
+ e,
227
+ a,
228
+ t,
229
+ s(),
230
+ A,
231
+ Y
232
+ );
233
+ }
234
+ function x(e) {
235
+ j(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof === P && (e._payload.status === "fulfilled" ? j(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
236
+ }
237
+ function j(e) {
238
+ return typeof e == "object" && e !== null && e.$$typeof === b;
239
+ }
240
+ var p = V, b = Symbol.for("react.transitional.element"), k = Symbol.for("react.portal"), h = Symbol.for("react.fragment"), y = Symbol.for("react.strict_mode"), S = Symbol.for("react.profiler"), N = Symbol.for("react.consumer"), g = Symbol.for("react.context"), z = Symbol.for("react.forward_ref"), Z = Symbol.for("react.suspense"), G = Symbol.for("react.suspense_list"), X = Symbol.for("react.memo"), P = Symbol.for("react.lazy"), H = Symbol.for("react.activity"), Q = Symbol.for("react.client.reference"), C = p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, D = Object.prototype.hasOwnProperty, K = Array.isArray, $ = console.createTask ? console.createTask : function() {
241
+ return null;
242
+ };
243
+ p = {
244
+ react_stack_bottom_frame: function(e) {
245
+ return e();
246
+ }
247
+ };
248
+ var F, M = {}, L = p.react_stack_bottom_frame.bind(
249
+ p,
250
+ i
251
+ )(), W = $(u(i)), B = {};
252
+ T.Fragment = h, T.jsx = function(e, r, t) {
253
+ var n = 1e4 > C.recentlyCreatedOwnerStacks++;
254
+ return E(
255
+ e,
256
+ r,
257
+ t,
258
+ !1,
259
+ n ? Error("react-stack-top-frame") : L,
260
+ n ? $(u(e)) : W
261
+ );
262
+ }, T.jsxs = function(e, r, t) {
263
+ var n = 1e4 > C.recentlyCreatedOwnerStacks++;
264
+ return E(
265
+ e,
266
+ r,
267
+ t,
268
+ !0,
269
+ n ? Error("react-stack-top-frame") : L,
270
+ n ? $(u(e)) : W
271
+ );
272
+ };
273
+ })()), T;
274
+ }
275
+ var J;
276
+ function ne() {
277
+ return J || (J = 1, process.env.NODE_ENV === "production" ? O.exports = re() : O.exports = te()), O.exports;
278
+ }
279
+ var o = ne();
280
+ function ie({
281
+ label: l,
282
+ variant: c = "primary",
283
+ size: d = "m",
284
+ disabled: u = !1,
285
+ onClick: s,
286
+ iconLeft: i,
287
+ iconRight: f,
288
+ ariaLabel: _
289
+ }) {
290
+ const m = [
291
+ "button",
292
+ `button--${c}`,
293
+ `button--${d}`,
294
+ u ? "button--disabled" : ""
295
+ ].filter(Boolean).join(" ");
296
+ return /* @__PURE__ */ o.jsxs(
297
+ "button",
298
+ {
299
+ className: m,
300
+ disabled: u,
301
+ onClick: s,
302
+ "aria-label": _ ?? l,
303
+ type: "button",
304
+ children: [
305
+ i ? /* @__PURE__ */ o.jsx("span", { className: "button__icon", children: i }) : null,
306
+ /* @__PURE__ */ o.jsx("span", { className: "button__label", children: l }),
307
+ f ? /* @__PURE__ */ o.jsx("span", { className: "button__icon", children: f }) : null
308
+ ]
309
+ }
310
+ );
311
+ }
312
+ function ae(l) {
313
+ return l || `tf_${Math.random().toString(16).slice(2)}`;
314
+ }
315
+ const oe = /* @__PURE__ */ o.jsx("svg", { width: "20", height: "20", viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ o.jsx(
316
+ "path",
317
+ {
318
+ d: "M12 2a10 10 0 1 0 .001 20.001A10 10 0 0 0 12 2Zm0 6.2a1 1 0 1 1 0 2 1 1 0 0 1 0-2Zm-1 4.2h2v7h-2v-7Z",
319
+ fill: "currentColor"
320
+ }
321
+ ) }), le = /* @__PURE__ */ o.jsx("svg", { width: "20", height: "20", viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ o.jsx(
322
+ "path",
323
+ {
324
+ d: "M12 2a10 10 0 1 0 .001 20.001A10 10 0 0 0 12 2Zm4.2 11.2H12v-2h4.2l-1.6-1.6 1.4-1.4 4 4-4 4-1.4-1.4 1.6-1.6Z",
325
+ fill: "currentColor"
326
+ }
327
+ ) });
328
+ function ce({
329
+ id: l,
330
+ label: c,
331
+ required: d = !1,
332
+ helpAriaLabel: u = "Ayuda",
333
+ onHelpClick: s,
334
+ helpIcon: i,
335
+ placeholder: f,
336
+ value: _,
337
+ disabled: m = !1,
338
+ size: w = "m",
339
+ state: E = "default",
340
+ helperText: x,
341
+ leftIcon: j,
342
+ rightIcon: p,
343
+ onChange: b
344
+ }) {
345
+ const k = V.useMemo(() => ae(l), [l]), h = [
346
+ "textfield",
347
+ m ? "textfield--disabled" : ""
348
+ ].filter(Boolean).join(" "), y = [
349
+ "textfield__control",
350
+ `textfield__control--${w}`,
351
+ E === "error" ? "textfield__control--error" : ""
352
+ ].filter(Boolean).join(" "), S = [
353
+ "textfield__helper",
354
+ E === "error" ? "textfield__helper--error" : ""
355
+ ].filter(Boolean).join(" "), N = !!s;
356
+ return /* @__PURE__ */ o.jsxs("div", { className: h, children: [
357
+ (c || N) && /* @__PURE__ */ o.jsxs("div", { className: "textfield__labelRow", children: [
358
+ c && /* @__PURE__ */ o.jsxs("label", { className: "textfield__label", htmlFor: k, children: [
359
+ c,
360
+ d && /* @__PURE__ */ o.jsx("span", { className: "textfield__required", children: "*" })
361
+ ] }),
362
+ N && /* @__PURE__ */ o.jsx(
363
+ "button",
364
+ {
365
+ type: "button",
366
+ className: "textfield__help",
367
+ "aria-label": u,
368
+ onClick: s,
369
+ disabled: m,
370
+ children: i ?? /* @__PURE__ */ o.jsx("span", { className: "textfield__helpDefaultIcon", children: "i" })
371
+ }
372
+ )
373
+ ] }),
374
+ /* @__PURE__ */ o.jsxs("div", { className: y, "aria-disabled": m ? "true" : "false", children: [
375
+ /* @__PURE__ */ o.jsx("span", { className: "textfield__icon textfield__icon--left", "aria-hidden": "true", children: j ?? oe }),
376
+ /* @__PURE__ */ o.jsx(
377
+ "input",
378
+ {
379
+ id: k,
380
+ className: "textfield__input",
381
+ type: "text",
382
+ placeholder: f,
383
+ value: _ ?? "",
384
+ disabled: m,
385
+ onChange: (g) => b == null ? void 0 : b(g.target.value)
386
+ }
387
+ ),
388
+ /* @__PURE__ */ o.jsx("span", { className: "textfield__icon textfield__icon--right", "aria-hidden": "true", children: p ?? le })
389
+ ] }),
390
+ x && /* @__PURE__ */ o.jsx("div", { className: S, children: x })
391
+ ] });
392
+ }
393
+ export {
394
+ ie as Button,
395
+ ce as TextField
396
+ };
package/dist/vite.svg ADDED
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
package/package.json ADDED
@@ -0,0 +1,56 @@
1
+ {
2
+ "name": "@cobe84/design-system",
3
+ "private": false,
4
+ "version": "0.1.0",
5
+ "type": "module",
6
+ "main": "dist/nuwsdn-design-system.cjs",
7
+ "module": "dist/nuwsd-design-system.es.js",
8
+ "types": "./dist/index.d.ts",
9
+ "files": [
10
+ "dist"
11
+ ],
12
+ "scripts": {
13
+ "dev": "vite",
14
+ "build": "vite build",
15
+ "preview": "vite preview",
16
+ "storybook": "storybook dev -p 6006",
17
+ "build-storybook": "storybook build",
18
+ "prepublishOnly": "npm run build"
19
+ },
20
+ "peerDependencies": {
21
+ "react": "^19.2.0",
22
+ "react-dom": "^19.2.0"
23
+ },
24
+ "exports": {
25
+ ".": {
26
+ "import": "./dist/nuwsd-design-system.es.js",
27
+ "require": "./dist/nuwsd-design-system.cjs"
28
+ },
29
+ "./dist/design-system.css": "./dist/design-system.css"
30
+ },
31
+ "devDependencies": {
32
+ "@eslint/js": "9.39.1",
33
+ "@storybook/addon-docs": "8.6.14",
34
+ "@storybook/addon-essentials": "8.6.14",
35
+ "@storybook/addon-interactions": "8.6.14",
36
+ "@storybook/react-vite": "8.6.14",
37
+ "@types/node": "24.10.1",
38
+ "@types/react": "19.2.5",
39
+ "@types/react-dom": "19.2.3",
40
+ "@vitejs/plugin-react": "5.0.2",
41
+ "eslint": "9.39.1",
42
+ "eslint-plugin-react-hooks": "7.0.1",
43
+ "eslint-plugin-react-refresh": "0.4.24",
44
+ "globals": "16.5.0",
45
+ "storybook": "8.6.14",
46
+ "typescript": "~5.9.3",
47
+ "typescript-eslint": "8.46.4",
48
+ "vite": "6.4.1",
49
+ "vite-plugin-dts": "^4.5.4"
50
+ },
51
+ "eslintConfig": {
52
+ "extends": [
53
+ "plugin:storybook/recommended"
54
+ ]
55
+ }
56
+ }