prometeo-design-system 2.5.7 → 2.6.1

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.
Files changed (55) hide show
  1. package/dist/Avatar.es.js +1 -1
  2. package/dist/{Button-DsbEyjth.js → Button-Bc0LYLfg.js} +1 -1
  3. package/dist/Button.es.js +1 -1
  4. package/dist/{CardProfile-DV3gwvqE.js → CardProfile-DA-HDUpi.js} +1 -1
  5. package/dist/CardProfile.es.js +1 -1
  6. package/dist/CheckBox.es.js +1 -1
  7. package/dist/CheckboxFormik.es.js +1 -1
  8. package/dist/DatePicker.es.js +3 -3
  9. package/dist/DialogModal.es.js +1 -1
  10. package/dist/DrawerDesktop.es.js +2 -2
  11. package/dist/DrawerMobile.es.js +1 -1
  12. package/dist/DropZone.es.js +1 -1
  13. package/dist/Header.es.js +1 -1
  14. package/dist/Icons.es.js +1 -1
  15. package/dist/Image.es.js +1 -1
  16. package/dist/{ImageGallery-DnoRTpCr.js → ImageGallery-BeADef_g.js} +2 -2
  17. package/dist/ImageGallery.es.js +1 -1
  18. package/dist/Input-DHdy-pWf.js +295 -0
  19. package/dist/Input.es.js +1 -1
  20. package/dist/InputFormik.es.js +1 -1
  21. package/dist/InputMultiple.es.js +1 -1
  22. package/dist/{LayoutGeneric-CbaoatQB.js → LayoutGeneric-B6E-yOYJ.js} +1 -1
  23. package/dist/LayoutGeneric.es.js +1 -1
  24. package/dist/Logo.es.js +1 -1
  25. package/dist/Menu.es.js +1 -1
  26. package/dist/OtpInput.es.js +1 -1
  27. package/dist/Pagination.es.js +1 -1
  28. package/dist/ProfilePictureUpload.es.js +1 -1
  29. package/dist/ProgressBar.es.js +1 -1
  30. package/dist/SegmentedButton.es.js +1 -1
  31. package/dist/{Select-CrTtTmXZ.js → Select-B5hkJ8Oy.js} +222 -238
  32. package/dist/Select.es.js +1 -1
  33. package/dist/SelectFormik.es.js +2 -2
  34. package/dist/SelectFormikLegacy.es.js +1 -1
  35. package/dist/SelectSearch.es.js +2 -2
  36. package/dist/Skeleton.es.js +1 -1
  37. package/dist/Spinner.es.js +1 -1
  38. package/dist/Steps.es.js +1 -1
  39. package/dist/SwipeContainer.es.js +1 -1
  40. package/dist/Switch.es.js +1 -1
  41. package/dist/TabLinks.es.js +1 -1
  42. package/dist/Table.es.js +1 -1
  43. package/dist/TextArea.es.js +1 -1
  44. package/dist/Toast.es.js +2 -2
  45. package/dist/ToastProvider.es.js +1 -1
  46. package/dist/Tooltip.es.js +1 -1
  47. package/dist/components/Input/Input.d.ts +2 -2
  48. package/dist/components/InputFormik/InputFormikV2.d.ts +6 -0
  49. package/dist/exports/InputFormikV2.d.ts +2 -0
  50. package/dist/index.d.ts +2 -0
  51. package/dist/{jsx-runtime-DKDX3adD.js → jsx-runtime-ByW6EXIE.js} +96 -94
  52. package/dist/prometeo-design-system.css +1 -1
  53. package/dist/prometeo-design-system.es.js +280 -257
  54. package/package.json +17 -1
  55. package/dist/Input-PNwH7rb6.js +0 -270
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "prometeo-design-system",
3
3
  "private": false,
4
- "version": "2.5.7",
4
+ "version": "2.6.1",
5
5
  "type": "module",
6
6
  "description": "design kit system",
7
7
  "main": "dist/prometeo-design-system.umd.js",
@@ -157,6 +157,22 @@
157
157
  "types": "./dist/Image.d.ts",
158
158
  "import": "./dist/Image.es.js"
159
159
  },
160
+ "./InputFormikV2": {
161
+ "types": "./dist/InputFormikV2.d.ts",
162
+ "import": "./dist/InputFormikV2.es.js"
163
+ },
164
+ "./SelectSearch": {
165
+ "types": "./dist/SelectSearch.d.ts",
166
+ "import": "./dist/SelectSearch.es.js"
167
+ },
168
+ "./Toast": {
169
+ "types": "./dist/Toast.d.ts",
170
+ "import": "./dist/Toast.es.js"
171
+ },
172
+ "./FAButton":{
173
+ "types": "./dist/FAButton.d.ts",
174
+ "import": "./dist/FAButton.es.js"
175
+ },
160
176
  "./styles": "./dist/prometeo-design-system.css",
161
177
  "./intellisense": "./src/styles/intellisense.css"
162
178
  },
@@ -1,270 +0,0 @@
1
- import { j as r } from "./jsx-runtime-DKDX3adD.js";
2
- import { Icons as R } from "./Icons.es.js";
3
- import { c as t } from "./cn-B6yFEsav.js";
4
- import { useRef as $, useLayoutEffect as be, memo as he, forwardRef as we, useState as S, useCallback as ye, useEffect as k } from "react";
5
- import { useDebounce as je } from "use-debounce";
6
- import Ce from "./Spinner.es.js";
7
- import { B as ze } from "./Button-DsbEyjth.js";
8
- const Ie = (s) => {
9
- let e = s;
10
- for (; e && e !== document.body; ) {
11
- const o = window.getComputedStyle(e).backgroundColor;
12
- if (o && o !== "transparent" && o !== "rgba(0, 0, 0, 0)")
13
- return o;
14
- e = e.parentElement;
15
- }
16
- const l = window.getComputedStyle(document.body).backgroundColor;
17
- return l && l !== "transparent" && l !== "rgba(0, 0, 0, 0)" ? l : "rgb(255, 255, 255)";
18
- };
19
- function Ee() {
20
- const s = $(null);
21
- return be(() => {
22
- if (!s.current || !s.current.parentElement) return;
23
- const e = Ie(s.current.parentElement);
24
- s.current.style.backgroundColor = e;
25
- }, []), {
26
- ref: s
27
- };
28
- }
29
- const h = {
30
- default: {
31
- container: "",
32
- input: t(
33
- "border-neutral-default-default text-neutral-default-default",
34
- "focus:ring-primary-default-default focus:ring-[1px] focus:border-primary-default-default ",
35
- "hover:border-neutral-strong-default"
36
- ),
37
- label: t(
38
- "text-neutral-medium-default",
39
- "peer-focus:text-primary-default-default"
40
- ),
41
- icon: t(
42
- "text-neutral-medium-default",
43
- "peer-focus:text-primary-default-default"
44
- )
45
- },
46
- error: {
47
- container: "",
48
- input: t(
49
- "border-error-default-default text-neutral-default-default",
50
- "focus:border-error-default focus:border-2",
51
- "focus:ring-0 focus:ring-error-default/20"
52
- ),
53
- label: t(
54
- "text-error-light",
55
- "peer-focus:text-error-light"
56
- ),
57
- icon: t(
58
- "text-error-light",
59
- "peer-focus:text-error-light"
60
- )
61
- },
62
- success: {
63
- container: "",
64
- input: t(
65
- "border-success-default-default text-neutral-default-default",
66
- "focus:border-success-default focus:border-2",
67
- "focus:ring-0 focus:ring-success-default/20"
68
- ),
69
- label: t(
70
- "text-success",
71
- "peer-focus:text-success-light"
72
- ),
73
- icon: t(
74
- "text-success-light",
75
- "peer-focus:text-success-light"
76
- )
77
- }
78
- }, T = we(({
79
- label: s,
80
- icon: e,
81
- iconPosition: l = "left",
82
- onChange: w,
83
- value: o = "",
84
- debounceMs: f = 0,
85
- name: y,
86
- width: g = "100%",
87
- height: u,
88
- variant: i = "default",
89
- labelVariant: c = "default",
90
- size: G = "medium",
91
- disabled: j = !1,
92
- type: n = "text",
93
- isFetching: d,
94
- errorComponent: B,
95
- helperComponent: v,
96
- placeholder: J,
97
- required: H = !1,
98
- onFocus: K,
99
- onBlur: Q,
100
- onEmptied: L,
101
- onKeyDown: U,
102
- onKeyUp: W,
103
- className: X,
104
- isActive: p,
105
- style: Y,
106
- readOnly: Z = !1,
107
- onClear: P,
108
- ..._
109
- }, q) => {
110
- const [b, D] = S(o), [C] = je(b, f), [A, V] = S(p || !1), [z, M] = S(!1), { ref: ee } = Ee(), te = $(null), I = q || null || te;
111
- let m = G;
112
- u && (m = "customHeight");
113
- const x = {
114
- small: {
115
- container: "text-sm",
116
- input: "h-10 px-3 text-[1rem]",
117
- label: "text-xs peer-focus:text-xs peer-placeholder-shown:text-sm",
118
- icon: "w-4 h-4 right-3"
119
- },
120
- medium: {
121
- container: "text-base",
122
- input: "h-12 px-3 text-base",
123
- label: "text-sm peer-focus:text-sm peer-placeholder-shown:text-base",
124
- icon: "w-5 h-5 right-3"
125
- },
126
- large: {
127
- container: "text-lg",
128
- input: "h-14 px-3 text-lg",
129
- label: "text-sm peer-focus:text-sm peer-placeholder-shown:text-lg",
130
- icon: "w-6 h-6 right-3"
131
- },
132
- customHeight: {
133
- container: "text-base",
134
- input: "text-base",
135
- label: "text-sm peer-focus:text-sm peer-placeholder-shown:text-xs ",
136
- icon: "w-6 h-6 right-3"
137
- }
138
- }, F = ye(w, []);
139
- k(() => {
140
- f > 0 && C !== o && F(C);
141
- }, [C, f, F, o]), k(() => {
142
- D(o);
143
- }, [o]), k(() => {
144
- p && I.current?.focus();
145
- }, [p, I.current?.focus]);
146
- const re = (a) => {
147
- V(!0), K?.(a);
148
- }, se = (a) => {
149
- p === void 0 && (V(!1), Q?.(a));
150
- }, oe = (a) => {
151
- const N = a.target.value, xe = a.target.name, ge = b;
152
- D(N), ge.length > 0 && N.length === 0 && L?.(), (!f || f === 0) && w(N, xe);
153
- }, le = () => {
154
- M(!z);
155
- }, E = {};
156
- g && g !== "100%" && (E.width = g), u && (E.height = u);
157
- const ne = b.length > 0, O = i === "error" && B, ae = !O && v, ue = n === "password", ce = () => c === "static" || p || A || ne ? "-top-2 left-2 scale-90" : e ? `top-1/2 -translate-y-1/2 ${l === "left" ? "ml-6" : "mr-6"} scale-100 ` : "top-1/2 -translate-y-1/2 scale-100", fe = () => c === "static" ? u ? "text-sm" : "text-xs" : u ? x.customHeight.label : x[m].label, ie = () => u ? { height: u } : {}, de = () => c === "default" ? s : J || s || "", pe = () => ue ? e ? l === "left" ? "pl-10 pr-10" : "pr-16" : "pr-10" : e ? l === "left" ? "pl-10 pr-3" : "pr-10 pl-3" : "", me = c === "default" && "transition-all duration-200 ease-in-out";
158
- return /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
159
- /* @__PURE__ */ r.jsxs(
160
- "div",
161
- {
162
- className: t(
163
- "relative",
164
- x[m].container,
165
- !g && "w-full",
166
- "bg-inherit",
167
- c === "static" && "mt-2",
168
- X
169
- ),
170
- style: { ...Y, ...E },
171
- children: [
172
- /* @__PURE__ */ r.jsx(
173
- "input",
174
- {
175
- id: y,
176
- name: y,
177
- ref: I,
178
- value: b,
179
- placeholder: de(),
180
- type: n === "password" && z ? "text" : n,
181
- className: t(
182
- "peer w-full border rounded-lg bg-transparent appearance-none transition-all duration-200 ease-in-out",
183
- "focus:outline-none px-3",
184
- c === "default" && "placeholder:text-transparent",
185
- c === "static" && "placeholder:text-neutral-medium-default placeholder:opacity-50",
186
- x[m].input,
187
- h[i].input,
188
- e && "pr-10",
189
- j && "bg-transparent opacity-60 border-neutral-strong-default text-neutral-medium-disabled",
190
- h[i].container,
191
- pe()
192
- ),
193
- style: ie(),
194
- onChange: oe,
195
- onFocus: re,
196
- onBlur: se,
197
- disabled: j,
198
- required: H,
199
- onEmptied: L,
200
- onKeyDown: U,
201
- onKeyUp: W,
202
- readOnly: Z,
203
- ..._
204
- }
205
- ),
206
- /* @__PURE__ */ r.jsx(
207
- "label",
208
- {
209
- ref: ee,
210
- htmlFor: y,
211
- className: t(
212
- "absolute left-3 pointer-events-none px-1 z-10",
213
- me,
214
- fe(),
215
- h[i].label,
216
- ce(),
217
- H && "after:content-['*'] after:text-error-default after:ml-1",
218
- j && "text-neutral-medium-disabled prometeo-fonts-label-large"
219
- ),
220
- children: s
221
- }
222
- ),
223
- (e || n === "password" || d) && /* @__PURE__ */ r.jsx(
224
- "button",
225
- {
226
- tabIndex: -1,
227
- type: "button",
228
- className: t(
229
- "absolute top-1/2 -translate-y-1/2 flex items-center justify-center z-10",
230
- x[m].icon,
231
- h[i].icon,
232
- n === "password" && !d ? "cursor-pointer" : "pointer-events-none",
233
- l === "right" ? "right-3" : "left-3"
234
- ),
235
- onClick: n === "password" && !d ? le : void 0,
236
- onMouseDown: (a) => n === "password" && !d && a.preventDefault(),
237
- children: /* @__PURE__ */ r.jsx("div", { children: d && n !== "password" ? /* @__PURE__ */ r.jsx("div", { children: /* @__PURE__ */ r.jsx(Ce, { size: 24, color: "#7c86ff", loading: !0, variant: "clip" }) }) : n === "password" ? z ? /* @__PURE__ */ r.jsx(R.EyeVisibility, { size: 24, className: "" }) : /* @__PURE__ */ r.jsx(R.EyeVisibilityOff, { size: 24, className: "" }) : e })
238
- }
239
- ),
240
- P && /* @__PURE__ */ r.jsx(
241
- ze,
242
- {
243
- type: "button",
244
- color: "secondary",
245
- size: "small",
246
- animate: !1,
247
- className: t(
248
- "absolute top-1/2 -translate-y-1/2 flex items-center justify-center z-10 right-1",
249
- "size-6 p-4 ",
250
- "bg-inherit",
251
- "hover:bg-neutral-default-hover p-4 rounded-full"
252
- ),
253
- label: "",
254
- onClick: P,
255
- icon: /* @__PURE__ */ r.jsx(R.Close, { size: 20, className: "" })
256
- }
257
- )
258
- ]
259
- }
260
- ),
261
- ae && v,
262
- O && B
263
- ] });
264
- });
265
- T.displayName = "Input";
266
- const Pe = he(T);
267
- export {
268
- Pe as I,
269
- Ee as u
270
- };