prometeo-design-system 4.4.3 → 4.6.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.
package/dist/Header.es.js CHANGED
@@ -1,33 +1,34 @@
1
- import { j as s } from "./jsx-runtime-GkKLlHH4.js";
1
+ import { j as t } from "./jsx-runtime-GkKLlHH4.js";
2
2
  import { c as a } from "./cn-B6yFEsav.js";
3
3
  import { motion as n } from "framer-motion";
4
4
  import { memo as f } from "react";
5
- const c = ({ title: e, subtitle: t, children: i, className: r, subtitleClassName: m, titleClassName: d, mainActionSlot: l }) => /* @__PURE__ */ s.jsxs(
5
+ const c = ({ title: e, subtitle: l, children: s, className: r, subtitleClassName: d, titleClassName: m, mainActionSlot: i }) => /* @__PURE__ */ t.jsxs(
6
6
  n.header,
7
7
  {
8
8
  initial: { opacity: 0, y: -10 },
9
9
  animate: { opacity: 1, y: 0 },
10
10
  transition: { duration: 0.6, ease: "easeOut" },
11
11
  className: a(
12
- "h-16 flex items-center px-4 sm:h-20 md:h-24 md:px-6 lg:h-28 xl:h-32 2xl:h-36 overflow-hidden",
13
- "flex justify-between items-center w-full",
12
+ "flex items-center sm:min-h-20 md:min-h-24 lg:min-h-28 xl:min-h-32 2xl:min-h-36 overflow-hidden px-4 md:px-0 py-2 md:py-3",
13
+ "flex justify-between items-center w-full max-w-full overflow-hidden",
14
+ i && "px-1",
14
15
  r
15
16
  ),
16
17
  children: [
17
- /* @__PURE__ */ s.jsxs("div", { className: a(
18
- "flex items-center md:items-start md:flex-col leading-6 h-full justify-center min-w-max",
19
- l && "justify-start"
18
+ /* @__PURE__ */ t.jsxs("div", { className: a(
19
+ "flex items-center md:items-start md:flex-col leading-6 h-full justify-center overflow-hidden p-1 ",
20
+ i && "justify-start gap-1 w-full"
20
21
  ), children: [
21
- l && /* @__PURE__ */ s.jsx("div", { children: typeof l == "function" ? l() : l }),
22
- /* @__PURE__ */ s.jsxs("div", { className: "flex flex-col leading-6 justify-center", children: [
23
- t && /* @__PURE__ */ s.jsx("h3", { className: a(" prometeo-fonts-body-medium text-neutral-medium-default ", m), children: t }),
24
- e && /* @__PURE__ */ s.jsx("h1", { className: a("prometeo-fonts-headline-small text-neutral-strong-default", d), children: e })
22
+ i && /* @__PURE__ */ t.jsx("div", { className: "md:px-3", children: typeof i == "function" ? i() : i }),
23
+ /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col leading-6 justify-center md:px-6 relative overflow-hidden ", children: [
24
+ l && /* @__PURE__ */ t.jsx("h3", { className: a(" prometeo-fonts-body-medium text-neutral-medium-default line-clamp-1 text-nowrap overflow-hidden text-ellipsis w-full", d), children: l }),
25
+ e && /* @__PURE__ */ t.jsx("h1", { className: a("prometeo-fonts-headline-small text-neutral-strong-default line-clamp-1 text-nowrap overflow-hidden text-ellipsis w-full wrap-break-word", m), children: e })
25
26
  ] })
26
27
  ] }),
27
- i && /* @__PURE__ */ s.jsx("div", { className: "bg-red-400 px-2", children: i })
28
+ s && /* @__PURE__ */ t.jsx("div", { className: "shrink relative", children: s })
28
29
  ]
29
30
  }
30
- ), u = f(c, (e, t) => e.title !== t.title || e.subtitle !== t.subtitle || e.className !== t.className ? !1 : e.children !== t.children ? !e.children && !t.children : !0);
31
+ ), u = f(c, (e, l) => e.title !== l.title || e.subtitle !== l.subtitle || e.className !== l.className ? !1 : e.children !== l.children ? !e.children && !l.children : !0);
31
32
  u.displayName = "Header";
32
33
  export {
33
34
  u as default
@@ -0,0 +1,6 @@
1
+ export * from './exports/IconButton'
2
+ export {}
3
+ import PrometeoDesignSystem from './exports/IconButton'
4
+ export default PrometeoDesignSystem
5
+ export * from './exports/IconButton'
6
+ export {}
@@ -0,0 +1,306 @@
1
+ import { j as r } from "./jsx-runtime-GkKLlHH4.js";
2
+ import { memo as C, useMemo as E } from "react";
3
+ import R from "./Spinner.es.js";
4
+ import { c as b } from "./index-BOQuZ0gG.js";
5
+ import { c as f } from "./cn-B6yFEsav.js";
6
+ const u = {
7
+ small: {
8
+ container: "w-8 h-8 p-0 rounded-[6px]"
9
+ },
10
+ medium: {
11
+ container: "w-8 h-8 p-0 rounded-[6px]"
12
+ },
13
+ large: {
14
+ container: "w-12 h-12 p-0"
15
+ }
16
+ }, e = {
17
+ fill: {
18
+ primary: {
19
+ container: ` bg-primary-default-default border-primary-default-default
20
+ hover:bg-primary-default-hover
21
+ active:bg-primary-default-focused
22
+ `,
23
+ icon: "text-neutral-strong-default! group-hover:text-neutral-strong-hover! group-active:text-neutral-strong-pressed!"
24
+ },
25
+ secondary: {
26
+ container: `bg-neutral-medium-default border-neutral-medium-default
27
+ hover:bg-neutral-medium-hover
28
+ active:bg-neutral-medium-pressed`,
29
+ icon: "text-neutral-strong-default! group-hover:text-neutral-strong-hover! group-active:text-neutral-strong-pressed!"
30
+ },
31
+ success: {
32
+ container: "bg-success-default-default border-success-default-default hover:bg-success-default-hover active:bg-success-default-pressed",
33
+ icon: "text-neutral-weak-default group-hover:text-neutral-weak-hover group-active:text-neutral-weak-pressed"
34
+ },
35
+ error: {
36
+ container: "bg-error-default-default hover:bg-error-default-hover active:bg-error-default-pressed",
37
+ icon: "text-neutral-strong-default group-hover:text-neutral-strong-hover group-active:text-neutral-strong-pressed"
38
+ },
39
+ warning: {
40
+ container: "bg-warning-default-default hover:bg-warning-default-hover active:bg-warning-default-pressed",
41
+ icon: "text-neutral-weak-default group-hover:text-neutral-weak-hover group-active:text-neutral-weak-pressed"
42
+ },
43
+ disabled: {
44
+ container: "bg-primary-medium-disabled border-transparent cursor-default!",
45
+ icon: "text-neutral-strong-disabled group-hover:text-neutral-strong-disabled group-active:text-neutral-strong-disabled"
46
+ }
47
+ },
48
+ outline: {
49
+ primary: {
50
+ container: `bg-transparent border-primary-default-default border
51
+ hover:bg-neutral-default-hover hover:border-primary-medium-hover
52
+ active:bg-neutral-default-pressed active:border-primary-medium-pressed
53
+ `,
54
+ icon: "text-primary-default-default group-hover:text-primary-medium-hover group-active:text-primary-medium-pressed"
55
+ },
56
+ secondary: {
57
+ container: "bg-transparent border-neutral-medium-default border hover:bg-neutral-default-hover hover:border-neutral-medium-hover active:bg-neutral-default-pressed active:border-neutral-medium-pressed",
58
+ icon: "text-neutral-strong-default group-hover:text-neutral-storng-hover group-active:text-neutral-storng-pressed"
59
+ },
60
+ success: {
61
+ container: "border border-success-default-default hover:border-success-default-hover hover:bg-neutral-default-hover active:border-success-default-pressed active:bg-neutral-default-pressed",
62
+ icon: "text-success-medium-default group-hover:text-success-medium-hover group-active:text-success-medium-pressed"
63
+ },
64
+ error: {
65
+ container: "border border-error-default-default hover:border-error-default-hover hover:bg-neutral-default-hover active:border-error-default-pressed active:bg-neutral-default-pressed",
66
+ icon: "text-error-medium-default group-hover:text-error-medium-hover group-active:text-error-medium-pressed"
67
+ },
68
+ warning: {
69
+ container: "border border-warning-default-default hover:border-warning-default-hover hover:bg-neutral-default-hover active:border-warning-default-pressed active:bg-neutral-default-pressed",
70
+ icon: "text-warning-medium-default group-hover:text-warning-medium-hover group-active:text-warning-medium-pressed"
71
+ },
72
+ disabled: {
73
+ container: "bg-neutral-default-disabled border-neutral-default-disabled border cursor-default!",
74
+ icon: "text-neutral-default-disabled group-hover:text-neutral-default-disabled group-active:text-neutral-default-disabled"
75
+ }
76
+ },
77
+ text: {
78
+ primary: {
79
+ container: " bg-transparent border-0 text-primary-default-default hover:bg-neutral-default-hover hover:border-primary-medium-hover active:bg-neutral-default-pressed",
80
+ icon: "text-primary-default-default group-hover:text-primary-medium-hover group-active:text-primary-medium-pressed"
81
+ },
82
+ secondary: {
83
+ container: "bg-transparent border-0 hover:bg-neutral-default-hover hover:border-neutral-medium-hover active:bg-neutral-default-pressed",
84
+ icon: "text-neutral-strong-hover group-hover:text-neutral-storng-hover group-active:text-neutral-storng-pressed"
85
+ },
86
+ success: {
87
+ container: "border border-transparent hover:border-success-default-hover hover:bg-neutral-default-hover hover:border-success-default-hover active:border-success-default-pressed active:bg-neutral-default-pressed",
88
+ icon: "text-success-medium-default group-hover:text-success-medium-hover group-active:text-success-medium-pressed"
89
+ },
90
+ error: {
91
+ container: "border border-transparent hover:border-error-default-hover hover:bg-neutral-default-hover hover:border-error-default-hover active:border-error-default-pressed active:bg-neutral-default-pressed",
92
+ icon: "text-error-medium-default group-hover:text-error-medium-hover group-active:text-error-medium-pressed"
93
+ },
94
+ warning: {
95
+ container: "border border-transparent hover:border-warning-default-hover hover:bg-neutral-default-hover hover:border-warning-default-hover active:border-warning-default-pressed active:bg-neutral-default-pressed",
96
+ icon: "text-warning-medium-default group-hover:text-warning-medium-hover group-active:text-warning-medium-pressed"
97
+ },
98
+ disabled: {
99
+ container: "bg-transparent border-neutral-default-disabled border-none cursor-default! hover:bg-transparent",
100
+ icon: "text-neutral-medium-focused group-hover:text-neutral-medium-focused group-active:text-neutral-medium-focused"
101
+ }
102
+ }
103
+ }, a = {
104
+ small: {
105
+ container: "",
106
+ icon: ""
107
+ },
108
+ medium: {
109
+ container: "",
110
+ icon: ""
111
+ },
112
+ large: {
113
+ container: "",
114
+ icon: ""
115
+ }
116
+ }, h = {
117
+ container: "flex justify-center items-center gap-1 w-max rounded-lg bg-transparent cursor-pointer transition-all ease-in-out duration-300 relative",
118
+ icon: "w-max transition-all ease-in-out duration-300 flex justify-center items-center"
119
+ }, p = {
120
+ true: {
121
+ container: "hover:scale-105 active:scale-95 disabled:scale-100"
122
+ },
123
+ false: {
124
+ container: ""
125
+ }
126
+ }, g = {
127
+ true: {
128
+ icon: "group-hover:rotate-90 group-active:rotate-0 group-disabled:rotate-0"
129
+ },
130
+ false: {
131
+ icon: ""
132
+ }
133
+ }, q = b(h.container, {
134
+ variants: {
135
+ size: {
136
+ small: `${a.small.container} ${u.small.container}`,
137
+ medium: `${a.medium.container} ${u.medium.container}`,
138
+ large: `${a.large.container} ${u.large.container}`
139
+ },
140
+ variant: {
141
+ fill: "",
142
+ outline: "",
143
+ text: ""
144
+ },
145
+ color: {
146
+ primary: "",
147
+ secondary: "",
148
+ success: "",
149
+ error: "",
150
+ warning: "",
151
+ disabled: ""
152
+ },
153
+ animation: {
154
+ true: p.true.container,
155
+ false: p.false.container
156
+ }
157
+ },
158
+ compoundVariants: [
159
+ { variant: "fill", color: "primary", class: e.fill.primary.container },
160
+ { variant: "fill", color: "secondary", class: e.fill.secondary.container },
161
+ { variant: "fill", color: "success", class: e.fill.success.container },
162
+ { variant: "fill", color: "error", class: e.fill.error.container },
163
+ { variant: "fill", color: "warning", class: e.fill.warning.container },
164
+ { variant: "fill", color: "disabled", class: e.fill.disabled.container },
165
+ { variant: "outline", color: "primary", class: e.outline.primary.container },
166
+ { variant: "outline", color: "secondary", class: e.outline.secondary.container },
167
+ { variant: "outline", color: "success", class: e.outline.success.container },
168
+ { variant: "outline", color: "error", class: e.outline.error.container },
169
+ { variant: "outline", color: "warning", class: e.outline.warning.container },
170
+ { variant: "outline", color: "disabled", class: e.outline.disabled.container },
171
+ { variant: "text", color: "primary", class: e.text.primary.container },
172
+ { variant: "text", color: "secondary", class: e.text.secondary.container },
173
+ { variant: "text", color: "success", class: e.text.success.container },
174
+ { variant: "text", color: "error", class: e.text.error.container },
175
+ { variant: "text", color: "warning", class: e.text.warning.container },
176
+ { variant: "text", color: "disabled", class: e.text.disabled.container }
177
+ ],
178
+ defaultVariants: {
179
+ size: "medium",
180
+ variant: "fill",
181
+ color: "primary",
182
+ animation: !0
183
+ }
184
+ }), A = b(h.icon, {
185
+ variants: {
186
+ size: {
187
+ small: a.small.icon,
188
+ medium: a.medium.icon,
189
+ large: a.large.icon
190
+ },
191
+ variant: {
192
+ fill: "",
193
+ outline: "",
194
+ text: ""
195
+ },
196
+ color: {
197
+ primary: "",
198
+ secondary: "",
199
+ success: "",
200
+ error: "",
201
+ warning: "",
202
+ disabled: ""
203
+ },
204
+ animateIcon: {
205
+ true: g.true.icon,
206
+ false: g.false.icon
207
+ }
208
+ },
209
+ compoundVariants: [
210
+ { variant: "fill", color: "primary", class: e.fill.primary.icon },
211
+ { variant: "fill", color: "secondary", class: e.fill.secondary.icon },
212
+ { variant: "fill", color: "success", class: e.fill.success.icon },
213
+ { variant: "fill", color: "error", class: e.fill.error.icon },
214
+ { variant: "fill", color: "warning", class: e.fill.warning.icon },
215
+ { variant: "fill", color: "disabled", class: e.fill.disabled.icon },
216
+ { variant: "outline", color: "primary", class: e.outline.primary.icon },
217
+ { variant: "outline", color: "secondary", class: e.outline.secondary.icon },
218
+ { variant: "outline", color: "success", class: e.outline.success.icon },
219
+ { variant: "outline", color: "error", class: e.outline.error.icon },
220
+ { variant: "outline", color: "warning", class: e.outline.warning.icon },
221
+ { variant: "outline", color: "disabled", class: e.outline.disabled.icon },
222
+ { variant: "text", color: "primary", class: e.text.primary.icon },
223
+ { variant: "text", color: "secondary", class: e.text.secondary.icon },
224
+ { variant: "text", color: "success", class: e.text.success.icon },
225
+ { variant: "text", color: "error", class: e.text.error.icon },
226
+ { variant: "text", color: "warning", class: e.text.warning.icon },
227
+ { variant: "text", color: "disabled", class: e.text.disabled.icon }
228
+ ],
229
+ defaultVariants: {
230
+ size: "medium",
231
+ variant: "fill",
232
+ color: "primary",
233
+ animateIcon: !0
234
+ }
235
+ }), M = ({
236
+ onClick: x,
237
+ icon: y,
238
+ contentClassName: n,
239
+ animate: w = !1,
240
+ animateIcon: j = !1,
241
+ isLoading: t = !1,
242
+ children: V,
243
+ hideSpinner: d = !1,
244
+ spinner: v = /* @__PURE__ */ r.jsx(R, { size: "small", variant: "clip", color: "var(--neutral-600)", className: "size-4 " }),
245
+ type: I,
246
+ className: $,
247
+ disabled: o,
248
+ variant: i = "fill",
249
+ form: k,
250
+ size: l = "medium",
251
+ color: z = "primary"
252
+ }) => {
253
+ const s = V || y;
254
+ if (!s)
255
+ throw new Error('IconButton: Se requiere un icon (prop "icon" o "children")');
256
+ const m = !!(j && !o && !t), S = !!(w && !o && !t), c = o || t ? "disabled" : z, N = E(() => {
257
+ if (t)
258
+ return /* @__PURE__ */ r.jsx("div", { className: "flex items-center justify-center", children: !d && v });
259
+ const B = s;
260
+ return /* @__PURE__ */ r.jsx("div", { className: f("flex items-center justify-center select-none", n), children: /* @__PURE__ */ r.jsx(
261
+ "span",
262
+ {
263
+ className: A({
264
+ size: l,
265
+ variant: i,
266
+ color: c,
267
+ animateIcon: m
268
+ }),
269
+ children: /* @__PURE__ */ r.jsx(B, {})
270
+ }
271
+ ) });
272
+ }, [
273
+ n,
274
+ s,
275
+ i,
276
+ l,
277
+ c,
278
+ t,
279
+ d,
280
+ v,
281
+ m
282
+ ]);
283
+ return /* @__PURE__ */ r.jsx(
284
+ "button",
285
+ {
286
+ type: I,
287
+ className: f(
288
+ "group",
289
+ q({
290
+ size: l,
291
+ variant: i,
292
+ color: c,
293
+ animation: S
294
+ }),
295
+ $
296
+ ),
297
+ disabled: o || t,
298
+ form: k,
299
+ onClick: x,
300
+ children: /* @__PURE__ */ r.jsx("div", { className: `flex items-center gap-1 ${n}`, children: N })
301
+ }
302
+ );
303
+ }, H = C(M);
304
+ export {
305
+ H as default
306
+ };
@@ -1,66 +1,108 @@
1
- import { j as k } from "./jsx-runtime-GkKLlHH4.js";
2
- import { c as A } from "./cn-B6yFEsav.js";
3
- import * as a from "react";
4
- import { forwardRef as E } from "react";
5
- const M = E(
1
+ import { j as o } from "./jsx-runtime-GkKLlHH4.js";
2
+ import { c as i } from "./cn-B6yFEsav.js";
3
+ import * as s from "react";
4
+ import { forwardRef as V, Children as _, isValidElement as $ } from "react";
5
+ const b = V(
6
6
  ({
7
- className: f,
8
- autoResize: r = !1,
9
- userResize: c = !0,
10
- minRows: l = 3,
11
- maxRows: n,
12
- placeholder: d,
13
- onChange: m,
14
- value: h,
15
- rows: p,
16
- disabled: x = !1,
17
- ...g
7
+ className: t,
8
+ autoResize: a = !0,
9
+ userResize: f = !1,
10
+ minRows: d = 1,
11
+ maxRows: u,
12
+ placeholder: H,
13
+ onChange: v,
14
+ value: S,
15
+ rows: n,
16
+ disabled: k = !1,
17
+ children: m,
18
+ ...A
18
19
  // ← Para pasar las props nativas
19
- }, t) => {
20
- const o = a.useRef(null), b = a.useCallback(
20
+ }, l) => {
21
+ const y = s.useRef(null), r = s.useRef(null), L = s.useCallback(
21
22
  (e) => {
22
- o.current = e, typeof t == "function" ? t(e) : t && (t.current = e);
23
+ y.current = e, typeof l == "function" ? l(e) : l && (l.current = e);
23
24
  },
24
- [t]
25
- ), s = a.useCallback(() => {
26
- const e = o.current;
27
- if (!e || !r) return;
25
+ [l]
26
+ ), h = s.useCallback(() => {
27
+ const e = y.current;
28
+ if (!e || !a) return;
28
29
  e.style.height = "auto";
29
- const C = e.scrollHeight, i = Number.parseInt(getComputedStyle(e).lineHeight) || 20, j = l * i + 16;
30
- let u = Math.max(C, j);
31
- if (n) {
32
- const N = n * i + 16;
33
- u = Math.min(u, N);
30
+ const F = e.scrollHeight, x = Number.parseInt(getComputedStyle(e).lineHeight) || 16, I = Math.min((n ?? d) * x, r.current?.clientHeight || 0);
31
+ let c = Math.max(F, I);
32
+ if (u || n) {
33
+ const O = (u || n || 1) * x;
34
+ c = Math.min(c, O);
34
35
  }
35
- e.style.height = `${u}px`;
36
- }, [r, l, n]), y = (e) => {
37
- m?.(e), s();
36
+ e.style.height = `${c}px`, c > x + 12 && (e.style.alignContent = "start");
37
+ }, [a, d, u]), R = () => {
38
+ r.current?.classList.remove("border-neutral-default-default"), r.current?.classList.add("border-primary-default-default");
39
+ }, E = () => {
40
+ r.current?.classList.remove("border-primary-default-default"), r.current?.classList.add("border-neutral-default-default");
41
+ }, z = (e) => {
42
+ v?.(e), h();
38
43
  };
39
- a.useEffect(() => {
40
- s();
41
- }, [s]);
42
- const H = () => c ? r ? "resize-x" : "resize" : "resize-none";
43
- return /* @__PURE__ */ k.jsx(
44
- "textarea",
45
- {
46
- ref: b,
47
- "data-slot": "textarea",
48
- className: A(
49
- "placeholder:text-neutral-medium-default text-neutral-default-default appearance-none border border-neutral-default-default focus:border-primary-default-default flex w-full rounded-md px-3 py-2 outline-none disabled:cursor-default disabled:opacity-50 md:text-sm",
50
- H(),
51
- f
52
- ),
53
- onChange: y,
54
- rows: r ? l : p,
55
- value: h,
56
- placeholder: d,
57
- disabled: x,
58
- ...g
44
+ s.useEffect(() => {
45
+ h();
46
+ }, [h]);
47
+ const M = () => f ? a ? "resize-x" : "resize" : "resize-none", T = typeof m == "function" ? m() : m, B = _.toArray(T);
48
+ let g = null, p = null;
49
+ return B.forEach((e) => {
50
+ if ($(e)) {
51
+ if (e.type === j && !g) {
52
+ g = e;
53
+ return;
54
+ }
55
+ if (e.type === C && !p) {
56
+ p = e;
57
+ return;
58
+ }
59
59
  }
60
- );
60
+ }), /* @__PURE__ */ o.jsxs("div", { ref: r, className: i(
61
+ "transition-all duration-300 ease-in-out",
62
+ "border border-neutral-default-default px-3 rounded-lg",
63
+ "flex gap-1 items-stretch",
64
+ "relative",
65
+ "overflow-auto prometeo-scrollbar-thin-weak"
66
+ ), children: [
67
+ g,
68
+ /* @__PURE__ */ o.jsx(
69
+ "textarea",
70
+ {
71
+ ref: L,
72
+ "data-slot": "textarea",
73
+ className: i(
74
+ // 'border border-amber-400/30',
75
+ "flex-2 shrink-0 min-w-min h-fit my-3 ",
76
+ "prometeo-fonts-body-large resize-none",
77
+ "placeholder:text-neutral-medium-default text-neutral-default-default appearance-none",
78
+ "content-center",
79
+ "outline-none",
80
+ "prometeo-scrollbar-thin-weak",
81
+ M(),
82
+ t
83
+ ),
84
+ onChange: z,
85
+ onFocus: R,
86
+ onBlur: E,
87
+ rows: n ?? d,
88
+ value: S,
89
+ placeholder: H,
90
+ disabled: k,
91
+ ...A
92
+ }
93
+ ),
94
+ p
95
+ ] });
61
96
  }
62
- );
63
- M.displayName = "TextArea";
97
+ ), N = (t) => {
98
+ const { children: a, className: f } = t;
99
+ return /* @__PURE__ */ o.jsx("div", { className: i("slot", f), children: a });
100
+ }, j = (t) => /* @__PURE__ */ o.jsx(N, { ...t, className: i("left-slot flex gap-1 items-center py-3", t?.className) }), C = (t) => /* @__PURE__ */ o.jsx(N, { ...t, className: i("right-slot flex gap-1 items-end py-3", t?.className) }), q = Object.assign(b, {
101
+ Root: b,
102
+ LeftSlot: j,
103
+ RightSlot: C
104
+ });
105
+ q.displayName = "TextArea";
64
106
  export {
65
- M as default
107
+ q as default
66
108
  };
@@ -0,0 +1,22 @@
1
+ import { ButtonVariant, ColorVariant, SizeVariant } from '../Shared/types';
2
+ import { IconComponent } from '../../Icons/types';
3
+ export interface IconButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'children'> {
4
+ onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
5
+ icon?: IconComponent;
6
+ contentClassName?: string;
7
+ animate?: boolean;
8
+ animateIcon?: boolean;
9
+ isLoading?: boolean;
10
+ children?: IconComponent;
11
+ spinner?: React.ReactNode;
12
+ type?: 'button' | "submit" | "reset";
13
+ className?: string;
14
+ disabled?: boolean;
15
+ variant?: ButtonVariant;
16
+ form?: string;
17
+ size?: SizeVariant;
18
+ color?: ColorVariant;
19
+ hideSpinner?: boolean;
20
+ }
21
+ declare const _default: import('react').MemoExoticComponent<({ onClick, icon, contentClassName, animate, animateIcon, isLoading, children, hideSpinner, spinner, type, className, disabled, variant, form, size, color }: IconButtonProps) => React.ReactElement>;
22
+ export default _default;
@@ -1,5 +1,6 @@
1
+ import { ReactNode } from 'react';
1
2
  import * as React from "react";
2
- export interface TextAreaProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, "onChange"> {
3
+ export interface TextAreaProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, "onChange" | "children"> {
3
4
  autoResize?: boolean;
4
5
  userResize?: boolean;
5
6
  minRows?: number;
@@ -10,6 +11,15 @@ export interface TextAreaProps extends Omit<React.TextareaHTMLAttributes<HTMLTex
10
11
  placeholder?: string;
11
12
  rows?: number;
12
13
  disabled?: boolean;
14
+ children?: ReactNode | (() => ReactNode);
13
15
  }
14
- declare const TextArea: React.ForwardRefExoticComponent<TextAreaProps & React.RefAttributes<HTMLTextAreaElement>>;
16
+ type SlotProps = {
17
+ children: React.ReactNode;
18
+ className?: string;
19
+ };
20
+ declare const TextArea: React.ForwardRefExoticComponent<TextAreaProps & React.RefAttributes<HTMLTextAreaElement>> & {
21
+ Root: React.ForwardRefExoticComponent<TextAreaProps & React.RefAttributes<HTMLTextAreaElement>>;
22
+ LeftSlot: (props: SlotProps) => import("react/jsx-runtime").JSX.Element;
23
+ RightSlot: (props: SlotProps) => import("react/jsx-runtime").JSX.Element;
24
+ };
15
25
  export default TextArea;
@@ -0,0 +1,2 @@
1
+ export { default } from '../components/IconButton/IconButton';
2
+ export { type IconButtonProps } from '../components/IconButton/IconButton';
package/dist/index.d.ts CHANGED
@@ -22,6 +22,7 @@ export { default as Switch } from './components/Switch/Switch';
22
22
  export { default as DatePicker } from './components/DatePicker/DatePicker';
23
23
  export { default as RecurrentDatePicker } from './components/RecurrentDatePicker/RecurrentDatePicker';
24
24
  export { default as RecurrentDatePickerRRule } from './components/RecurrentDatePicker/RecurrentDatePickerRRule';
25
+ export { default as IconButton } from './components/IconButton/IconButton';
25
26
  export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, } from './components/Table/Table';
26
27
  export { default as TabLinks } from './components/TabLinks/TabLinks';
27
28
  export { default as TextArea } from './components/TextArea/TextArea';
@@ -2,7 +2,7 @@ import { default as h } from "./Avatar.es.js";
2
2
  import { default as C } from "./Button.es.js";
3
3
  import { default as E } from "./CardProfile.es.js";
4
4
  import { default as R } from "./CheckBox.es.js";
5
- import { default as S, useDialogControl as I } from "./DialogModal.es.js";
5
+ import { default as I, useDialogControl as S } from "./DialogModal.es.js";
6
6
  import { default as M, useDrawerDesktop as j } from "./DrawerDesktop.es.js";
7
7
  import { default as y, useDrawerMobile as H } from "./DrawerMobile.es.js";
8
8
  import { default as A } from "./Header.es.js";
@@ -20,27 +20,28 @@ import { default as fe } from "./Switch.es.js";
20
20
  import { D as ne } from "./DatePicker-QuBgR5DQ.js";
21
21
  import { RecurrentDatePicker as me } from "./RecurrentDatePicker.es.js";
22
22
  import { RecurrentDatePickerRRule as ie } from "./RecurrentDatePickerRRule.es.js";
23
- import { Table as ce, TableBody as be, TableCaption as De, TableCell as ve, TableFooter as Te, TableHead as ge, TableHeader as ke, TableRow as he } from "./Table.es.js";
24
- import { T as Ce } from "./TabLinks-DnoWdrdk.js";
25
- import { default as Ee } from "./TextArea.es.js";
26
- import { default as Re } from "./Tooltip.es.js";
27
- import { default as Se } from "./Skeleton.es.js";
28
- import { default as Le } from "./SegmentedButton.es.js";
29
- import { I as je } from "./ImageGallery-DG9ovlQ-.js";
30
- import { default as ye } from "./Image.es.js";
31
- import { default as Oe, toastpyrion as Ae } from "./Toast.es.js";
32
- import { default as Ge } from "./ToastProvider.es.js";
33
- import { default as Ze } from "./SelectSearch.es.js";
34
- import { default as Je } from "./FAButton.es.js";
35
- import { default as Qe } from "./RadioButton.es.js";
36
- import { B as We } from "./badge-BEx-0Q-K.js";
23
+ import { default as ce } from "./IconButton.es.js";
24
+ import { Table as De, TableBody as ve, TableCaption as Te, TableCell as ge, TableFooter as ke, TableHead as he, TableHeader as Be, TableRow as Ce } from "./Table.es.js";
25
+ import { T as Ee } from "./TabLinks-DnoWdrdk.js";
26
+ import { default as Re } from "./TextArea.es.js";
27
+ import { default as Ie } from "./Tooltip.es.js";
28
+ import { default as Le } from "./Skeleton.es.js";
29
+ import { default as je } from "./SegmentedButton.es.js";
30
+ import { I as ye } from "./ImageGallery-DG9ovlQ-.js";
31
+ import { default as Oe } from "./Image.es.js";
32
+ import { default as _e, toastpyrion as Ge } from "./Toast.es.js";
33
+ import { default as Ze } from "./ToastProvider.es.js";
34
+ import { default as Je } from "./SelectSearch.es.js";
35
+ import { default as Qe } from "./FAButton.es.js";
36
+ import { default as We } from "./RadioButton.es.js";
37
+ import { B as Ye } from "./badge-BEx-0Q-K.js";
37
38
  import { j as s } from "./jsx-runtime-GkKLlHH4.js";
38
39
  import { CloseNavBarDesktop as l } from "./Icons/CloseNavBarDesktop.es.js";
39
- import { default as Ye } from "./OtpInput.es.js";
40
+ import { default as Fe } from "./OtpInput.es.js";
40
41
  import n, { useRef as p, useEffect as m } from "react";
41
42
  import { useDropzone as d } from "react-dropzone";
42
- import { u as Fe } from "./useDevice-vwn4GLwK.js";
43
- import { default as tt } from "./DropZone.es.js";
43
+ import { u as tt } from "./useDevice-vwn4GLwK.js";
44
+ import { default as ot } from "./DropZone.es.js";
44
45
  const D = ({
45
46
  isCollapsed: e,
46
47
  onToggle: t
@@ -95,56 +96,57 @@ const T = (e, t = !0) => {
95
96
  };
96
97
  export {
97
98
  h as Avatar,
98
- We as Badge,
99
+ Ye as Badge,
99
100
  C as Button,
100
101
  E as CardProfile,
101
102
  R as CheckBox,
102
103
  ne as DatePicker,
103
- S as DialogModal,
104
+ I as DialogModal,
104
105
  M as DrawerDesktop,
105
106
  y as DrawerMobile,
106
- tt as DropZone,
107
- Je as FAButton,
107
+ ot as DropZone,
108
+ Qe as FAButton,
108
109
  A as Header,
109
- ye as Image,
110
- je as ImageGallery,
110
+ ce as IconButton,
111
+ Oe as Image,
112
+ ye as ImageGallery,
111
113
  G as Input,
112
114
  Z as InputMultiple,
113
115
  J as Logo,
114
116
  Q as Menu,
115
117
  D as NavbarCollapseButton,
116
- Ye as OtpInput,
118
+ Fe as OtpInput,
117
119
  W as Pagination,
118
120
  Y as ProfilePictureUpload,
119
121
  F as ProgressBar,
120
- Qe as RadioButton,
122
+ We as RadioButton,
121
123
  me as RecurrentDatePicker,
122
124
  ie as RecurrentDatePickerRRule,
123
- Le as SegmentedButton,
125
+ je as SegmentedButton,
124
126
  te as Select,
125
- Ze as SelectSearch,
126
- Se as Skeleton,
127
+ Je as SelectSearch,
128
+ Le as Skeleton,
127
129
  oe as Spinner,
128
130
  se as Steps,
129
131
  fe as Switch,
130
- Ce as TabLinks,
131
- ce as Table,
132
- be as TableBody,
133
- De as TableCaption,
134
- ve as TableCell,
135
- Te as TableFooter,
136
- ge as TableHead,
137
- ke as TableHeader,
138
- he as TableRow,
139
- Ee as TextArea,
140
- Oe as Toast,
141
- Ge as ToastProvider,
142
- Re as Tooltip,
143
- Ae as toastpyrion,
132
+ Ee as TabLinks,
133
+ De as Table,
134
+ ve as TableBody,
135
+ Te as TableCaption,
136
+ ge as TableCell,
137
+ ke as TableFooter,
138
+ he as TableHead,
139
+ Be as TableHeader,
140
+ Ce as TableRow,
141
+ Re as TextArea,
142
+ _e as Toast,
143
+ Ze as ToastProvider,
144
+ Ie as Tooltip,
145
+ Ge as toastpyrion,
144
146
  T as useClickOutside,
145
- I as useDialogControl,
147
+ S as useDialogControl,
146
148
  j as useDrawerDesktop,
147
149
  H as useDrawerMobile,
148
150
  v as useFileDropzone,
149
- Fe as useIsMobile
151
+ tt as useIsMobile
150
152
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "prometeo-design-system",
3
3
  "private": false,
4
- "version": "4.4.3",
4
+ "version": "4.6.0",
5
5
  "type": "module",
6
6
  "description": "design kit system",
7
7
  "main": "dist/prometeo-design-system.umd.js",
@@ -206,6 +206,10 @@
206
206
  "types": "./dist/Chip.d.ts",
207
207
  "import": "./dist/Chip.es.js"
208
208
  },
209
+ "./IconButton": {
210
+ "types": "./dist/IconButton.d.ts",
211
+ "import": "./dist/IconButton.es.js"
212
+ },
209
213
  "./styles": "./dist/styles.css",
210
214
  "./intellisense": "./src/styles/intellisense.css"
211
215
  },