prometeo-design-system 1.8.3 → 1.8.5
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/Avatar.es.js +1 -1
- package/dist/Button.es.js +1 -1
- package/dist/{CardProfile-Bg_q2qMm.js → CardProfile-BZajBGbO.js} +1 -1
- package/dist/CardProfile.es.js +1 -1
- package/dist/CheckBox.es.js +1 -1
- package/dist/CheckboxFormik.es.js +1 -1
- package/dist/DialogModal.es.js +1 -1
- package/dist/DrawerDesktop.es.js +1 -1
- package/dist/DrawerMobile.es.js +1 -1
- package/dist/DropZone.es.js +1 -1
- package/dist/Header.es.js +4 -4
- package/dist/Icons.es.js +1 -1
- package/dist/Input.es.js +132 -117
- package/dist/InputFormik.es.js +129 -64
- package/dist/InputMultiple.es.js +1 -1
- package/dist/{LayoutGeneric-p4Pll4Cm.js → LayoutGeneric-jDE96L2N.js} +1 -1
- package/dist/LayoutGeneric.es.js +1 -1
- package/dist/Logo.es.js +1 -1
- package/dist/Menu.es.js +1 -1
- package/dist/OtpInput.es.js +1 -1
- package/dist/Pagination.es.js +1 -1
- package/dist/ProfilePictureUpload.es.js +1 -1
- package/dist/ProgressBar.es.js +1 -1
- package/dist/Select.es.js +1 -1
- package/dist/SelectFormik.es.js +1 -1
- package/dist/Spinner.es.js +1 -1
- package/dist/Steps.es.js +1 -1
- package/dist/SwipeContainer.es.js +1 -1
- package/dist/Switch.d.ts +2 -0
- package/dist/Switch.es.js +94 -0
- package/dist/TabLinks.es.js +1 -1
- package/dist/Table.es.js +1 -1
- package/dist/TextArea.es.js +1 -1
- package/dist/Tooltip.es.js +1 -1
- package/dist/components/Switch/Switch.d.ts +8 -0
- package/dist/exports/Switch.d.ts +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/{jsx-runtime-DKDX3adD.js → jsx-runtime-ByW6EXIE.js} +96 -94
- package/dist/preview/SwitchPreview.d.ts +2 -0
- package/dist/prometeo-design-system.css +1 -1
- package/dist/prometeo-design-system.es.js +29 -27
- package/package.json +1 -1
package/dist/Avatar.es.js
CHANGED
package/dist/Button.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as o } from "./jsx-runtime-
|
|
1
|
+
import { j as o } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
2
|
import { c as x } from "./cn-B6yFEsav.js";
|
|
3
3
|
import { c as N } from "./index-BOQuZ0gG.js";
|
|
4
4
|
import { useAnimationControls as k, motion as y } from "framer-motion";
|
package/dist/CardProfile.es.js
CHANGED
package/dist/CheckBox.es.js
CHANGED
package/dist/DialogModal.es.js
CHANGED
package/dist/DrawerDesktop.es.js
CHANGED
package/dist/DrawerMobile.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as r } from "./jsx-runtime-
|
|
1
|
+
import { j as r } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
2
|
import { forwardRef as O, useState as g, useRef as x, useCallback as t, useImperativeHandle as D } from "react";
|
|
3
3
|
import { Drawer as n } from "vaul";
|
|
4
4
|
import { c as R } from "./cn-B6yFEsav.js";
|
package/dist/DropZone.es.js
CHANGED
package/dist/Header.es.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { j as e } from "./jsx-runtime-
|
|
1
|
+
import { j as e } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
2
|
import { c as x } from "./cn-B6yFEsav.js";
|
|
3
3
|
import { motion as i } from "framer-motion";
|
|
4
4
|
import { memo as m } from "react";
|
|
5
|
-
const n = ({ title: t, subtitle:
|
|
5
|
+
const n = ({ title: t, subtitle: l, children: s, className: a }) => /* @__PURE__ */ e.jsx("header", { className: x("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", a), children: /* @__PURE__ */ e.jsxs(
|
|
6
6
|
i.div,
|
|
7
7
|
{
|
|
8
8
|
initial: { opacity: 0, y: -10 },
|
|
@@ -11,10 +11,10 @@ const n = ({ title: t, subtitle: s, children: l, className: a }) => /* @__PURE__
|
|
|
11
11
|
className: "flex justify-between items-center w-full ",
|
|
12
12
|
children: [
|
|
13
13
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col leading-6", children: [
|
|
14
|
-
/* @__PURE__ */ e.jsx("h3", { className: "text-xs font-semibold text-neutral-medium-default leading-1 sm:leading-2", children:
|
|
14
|
+
/* @__PURE__ */ e.jsx("h3", { className: "text-xs font-semibold text-neutral-medium-default leading-1 sm:leading-2 prometeo-fonts-headline-large", children: l }),
|
|
15
15
|
/* @__PURE__ */ e.jsx("h1", { className: "text-xl font-bold text-neutral-strong-default sm:text-2xl md:text-3xl xl:text-[32px] 2xl:text-[34px]", children: t })
|
|
16
16
|
] }),
|
|
17
|
-
/* @__PURE__ */ e.jsx("div", { className: "flex gap-4", children:
|
|
17
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex gap-4", children: s })
|
|
18
18
|
]
|
|
19
19
|
}
|
|
20
20
|
) }), f = m(n);
|
package/dist/Icons.es.js
CHANGED
package/dist/Input.es.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { Icons as
|
|
1
|
+
import { j as t } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
|
+
import { Icons as O } from "./Icons.es.js";
|
|
3
3
|
import { c as e } from "./cn-B6yFEsav.js";
|
|
4
|
-
import { memo as
|
|
5
|
-
import { useDebounce as
|
|
6
|
-
import
|
|
7
|
-
const
|
|
4
|
+
import { memo as ue, useState as N, useRef as ce, useCallback as fe, useEffect as $, useLayoutEffect as ie } from "react";
|
|
5
|
+
import { useDebounce as de } from "use-debounce";
|
|
6
|
+
import pe from "./Spinner.es.js";
|
|
7
|
+
const j = {
|
|
8
8
|
default: {
|
|
9
9
|
container: "",
|
|
10
10
|
input: e(
|
|
@@ -53,161 +53,176 @@ const h = {
|
|
|
53
53
|
"peer-focus:text-success-light"
|
|
54
54
|
)
|
|
55
55
|
}
|
|
56
|
-
},
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
input: "h-10 px-3 text-sm",
|
|
60
|
-
label: "text-xs peer-focus:text-xs peer-placeholder-shown:text-sm",
|
|
61
|
-
icon: "w-4 h-4 right-3"
|
|
62
|
-
},
|
|
63
|
-
medium: {
|
|
64
|
-
container: "text-base",
|
|
65
|
-
input: "h-12 px-3 text-base",
|
|
66
|
-
label: "text-sm peer-focus:text-sm peer-placeholder-shown:text-base",
|
|
67
|
-
icon: "w-5 h-5 right-3"
|
|
68
|
-
},
|
|
69
|
-
large: {
|
|
70
|
-
container: "text-lg",
|
|
71
|
-
input: "h-14 px-3 text-lg",
|
|
72
|
-
label: "text-sm peer-focus:text-sm peer-placeholder-shown:text-lg",
|
|
73
|
-
icon: "w-6 h-6 right-3"
|
|
74
|
-
}
|
|
75
|
-
}, ie = ({
|
|
76
|
-
label: w,
|
|
77
|
-
icon: n,
|
|
56
|
+
}, xe = ({
|
|
57
|
+
label: C,
|
|
58
|
+
icon: a,
|
|
78
59
|
iconPosition: m = "left",
|
|
79
|
-
onChange:
|
|
80
|
-
value:
|
|
81
|
-
debounceMs:
|
|
82
|
-
name:
|
|
60
|
+
onChange: S,
|
|
61
|
+
value: n = "",
|
|
62
|
+
debounceMs: u = 0,
|
|
63
|
+
name: E,
|
|
83
64
|
width: g = "100%",
|
|
84
|
-
height:
|
|
85
|
-
variant:
|
|
65
|
+
height: s,
|
|
66
|
+
variant: c = "default",
|
|
86
67
|
labelVariant: o = "default",
|
|
87
|
-
size:
|
|
88
|
-
disabled:
|
|
89
|
-
type:
|
|
90
|
-
isFetching:
|
|
91
|
-
errorComponent:
|
|
92
|
-
helperComponent:
|
|
93
|
-
placeholder:
|
|
94
|
-
required:
|
|
95
|
-
onFocus:
|
|
96
|
-
onBlur:
|
|
97
|
-
onEmptied:
|
|
98
|
-
onKeyDown:
|
|
99
|
-
onKeyUp:
|
|
68
|
+
size: T = "medium",
|
|
69
|
+
disabled: k = !1,
|
|
70
|
+
type: r = "text",
|
|
71
|
+
isFetching: f,
|
|
72
|
+
errorComponent: H,
|
|
73
|
+
helperComponent: L,
|
|
74
|
+
placeholder: G,
|
|
75
|
+
required: P = !1,
|
|
76
|
+
onFocus: J,
|
|
77
|
+
onBlur: K,
|
|
78
|
+
onEmptied: D,
|
|
79
|
+
onKeyDown: Q,
|
|
80
|
+
onKeyUp: U
|
|
100
81
|
}) => {
|
|
101
|
-
const [
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
82
|
+
const [h, R] = N(n), [v] = de(h, u), [W, V] = N(!1), [z, X] = N(!1), b = ce(null);
|
|
83
|
+
let i = T;
|
|
84
|
+
s && (i = "customHeight");
|
|
85
|
+
const d = {
|
|
86
|
+
small: {
|
|
87
|
+
container: "text-sm",
|
|
88
|
+
input: "h-10 px-3 text-sm",
|
|
89
|
+
label: "text-xs peer-focus:text-xs peer-placeholder-shown:text-sm",
|
|
90
|
+
icon: "w-4 h-4 right-3"
|
|
91
|
+
},
|
|
92
|
+
medium: {
|
|
93
|
+
container: "text-base",
|
|
94
|
+
input: "h-12 px-3 text-base",
|
|
95
|
+
label: "text-sm peer-focus:text-sm peer-placeholder-shown:text-base",
|
|
96
|
+
icon: "w-5 h-5 right-3"
|
|
97
|
+
},
|
|
98
|
+
large: {
|
|
99
|
+
container: "text-lg",
|
|
100
|
+
input: "h-14 px-3 text-lg",
|
|
101
|
+
label: "text-sm peer-focus:text-sm peer-placeholder-shown:text-lg",
|
|
102
|
+
icon: "w-6 h-6 right-3"
|
|
103
|
+
},
|
|
104
|
+
customHeight: {
|
|
105
|
+
container: "text-base",
|
|
106
|
+
input: "text-base",
|
|
107
|
+
label: "text-sm peer-focus:text-sm peer-placeholder-shown:text-xs ",
|
|
108
|
+
icon: "w-6 h-6 right-3"
|
|
109
|
+
}
|
|
110
|
+
}, A = fe(S, [S]);
|
|
111
|
+
$(() => {
|
|
112
|
+
u > 0 && v !== n && A(v);
|
|
113
|
+
}, [v, u, A, n]), $(() => {
|
|
114
|
+
R(n);
|
|
115
|
+
}, [n]);
|
|
116
|
+
const Y = () => {
|
|
117
|
+
V(!0), J?.();
|
|
118
|
+
}, Z = () => {
|
|
119
|
+
V(!1), K?.();
|
|
120
|
+
}, _ = (p) => {
|
|
121
|
+
const x = p.target.value, B = p.target.name, l = h;
|
|
122
|
+
R(x), l.length > 0 && x.length === 0 && D?.(), (!u || u === 0) && S(x, B);
|
|
123
|
+
}, q = () => {
|
|
124
|
+
X(!z);
|
|
116
125
|
}, I = {};
|
|
117
|
-
g && g !== "100%" && (I.width = g),
|
|
118
|
-
const
|
|
119
|
-
return
|
|
120
|
-
if (
|
|
121
|
-
const
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
126
|
+
g && g !== "100%" && (I.width = g), s && (I.height = s);
|
|
127
|
+
const M = h.length > 0, F = c === "error" && H, ee = !F && L, te = r === "password", re = () => o === "static" || W || M ? "-top-2 left-2 scale-90" : a ? `top-1/2 -translate-y-1/2 ${m === "left" ? "ml-6" : "mr-6"} scale-100 ` : "top-1/2 -translate-y-1/2 scale-100", se = () => o === "static" ? s ? "text-sm" : "text-xs" : s ? d.customHeight.label : d[i].label, oe = () => s ? { height: s } : {}, le = () => o === "default" ? C : G || C || "", ae = () => te ? a ? m === "left" ? "pl-10 pr-10" : "pr-16" : "pr-10" : a ? m === "left" ? "pl-10 pr-3" : "pr-10 pl-3" : "", ne = o === "default" && "transition-all duration-200 ease-in-out";
|
|
128
|
+
return ie(() => {
|
|
129
|
+
if (b.current) {
|
|
130
|
+
const x = ((B) => {
|
|
131
|
+
let l = B;
|
|
132
|
+
for (; l && l !== document.body; ) {
|
|
133
|
+
const y = window.getComputedStyle(l).backgroundColor;
|
|
134
|
+
if (y && y !== "transparent" && y !== "rgba(0, 0, 0, 0)")
|
|
135
|
+
return y;
|
|
136
|
+
l = l.parentElement;
|
|
137
|
+
}
|
|
138
|
+
const w = window.getComputedStyle(document.body).backgroundColor;
|
|
139
|
+
return w && w !== "transparent" && w !== "rgba(0, 0, 0, 0)" ? w : "rgb(255, 255, 255)";
|
|
140
|
+
})(b.current.parentElement);
|
|
141
|
+
b.current.style.backgroundColor = x;
|
|
125
142
|
}
|
|
126
|
-
}, []), /* @__PURE__ */
|
|
127
|
-
/* @__PURE__ */
|
|
143
|
+
}, []), /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
144
|
+
/* @__PURE__ */ t.jsxs(
|
|
128
145
|
"div",
|
|
129
146
|
{
|
|
130
147
|
className: e(
|
|
131
148
|
"relative",
|
|
132
|
-
|
|
149
|
+
d[i].container,
|
|
133
150
|
!g && "w-full",
|
|
134
151
|
"bg-inherit",
|
|
135
152
|
o === "static" && "mt-2"
|
|
136
153
|
),
|
|
137
154
|
style: I,
|
|
138
155
|
children: [
|
|
139
|
-
/* @__PURE__ */
|
|
156
|
+
/* @__PURE__ */ t.jsx(
|
|
140
157
|
"input",
|
|
141
158
|
{
|
|
142
|
-
id:
|
|
143
|
-
name:
|
|
144
|
-
type:
|
|
145
|
-
value:
|
|
146
|
-
placeholder:
|
|
159
|
+
id: E,
|
|
160
|
+
name: E,
|
|
161
|
+
type: r === "password" && z ? "text" : r,
|
|
162
|
+
value: h,
|
|
163
|
+
placeholder: le(),
|
|
147
164
|
className: e(
|
|
148
165
|
"peer w-full border-1 rounded-lg bg-transparent appearance-none transition-all duration-200 ease-in-out",
|
|
149
166
|
"focus:outline-none px-3",
|
|
150
167
|
o === "default" && "placeholder:text-transparent",
|
|
151
168
|
o === "static" && "placeholder:text-neutral-medium-default placeholder:opacity-50",
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
te()
|
|
169
|
+
d[i].input,
|
|
170
|
+
j[c].input,
|
|
171
|
+
a && "pr-10",
|
|
172
|
+
k && "bg-transparent opacity-60 border-neutral-strong-default text-neutral-medium-disabled",
|
|
173
|
+
j[c].container,
|
|
174
|
+
ae()
|
|
159
175
|
),
|
|
160
|
-
style:
|
|
161
|
-
onChange:
|
|
162
|
-
onFocus:
|
|
163
|
-
onBlur:
|
|
164
|
-
disabled:
|
|
165
|
-
required:
|
|
166
|
-
onEmptied:
|
|
167
|
-
onKeyDown:
|
|
168
|
-
onKeyUp:
|
|
176
|
+
style: oe(),
|
|
177
|
+
onChange: _,
|
|
178
|
+
onFocus: Y,
|
|
179
|
+
onBlur: Z,
|
|
180
|
+
disabled: k,
|
|
181
|
+
required: P,
|
|
182
|
+
onEmptied: D,
|
|
183
|
+
onKeyDown: Q,
|
|
184
|
+
onKeyUp: U
|
|
169
185
|
}
|
|
170
186
|
),
|
|
171
|
-
/* @__PURE__ */
|
|
187
|
+
/* @__PURE__ */ t.jsx(
|
|
172
188
|
"label",
|
|
173
189
|
{
|
|
174
|
-
ref:
|
|
175
|
-
htmlFor:
|
|
190
|
+
ref: b,
|
|
191
|
+
htmlFor: E,
|
|
176
192
|
className: e(
|
|
177
193
|
"absolute left-3 pointer-events-none px-1 z-10",
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
194
|
+
ne,
|
|
195
|
+
se(),
|
|
196
|
+
j[c].label,
|
|
197
|
+
re(),
|
|
198
|
+
P && "after:content-['*'] after:text-error-default after:ml-1",
|
|
199
|
+
k && "text-neutral-medium-disabled prometeo-fonts-label-large"
|
|
184
200
|
),
|
|
185
|
-
children:
|
|
201
|
+
children: C
|
|
186
202
|
}
|
|
187
203
|
),
|
|
188
|
-
(
|
|
204
|
+
(a || r === "password" || f) && /* @__PURE__ */ t.jsx(
|
|
189
205
|
"div",
|
|
190
206
|
{
|
|
191
207
|
className: e(
|
|
192
208
|
"absolute top-1/2 -translate-y-1/2 flex items-center justify-center z-10",
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
s === "password" && !p ? "cursor-pointer" : "pointer-events-none",
|
|
209
|
+
d[i].icon,
|
|
210
|
+
j[c].icon,
|
|
211
|
+
r === "password" && !f ? "cursor-pointer" : "pointer-events-none",
|
|
197
212
|
m === "right" ? "right-3" : "left-3"
|
|
198
213
|
),
|
|
199
|
-
onClick:
|
|
200
|
-
onMouseDown: (
|
|
201
|
-
children: /* @__PURE__ */
|
|
214
|
+
onClick: r === "password" && !f ? q : void 0,
|
|
215
|
+
onMouseDown: (p) => r === "password" && !f && p.preventDefault(),
|
|
216
|
+
children: /* @__PURE__ */ t.jsx("div", { children: f && r !== "password" ? /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(pe, { size: 24, color: "#7c86ff", loading: !0, variant: "clip" }) }) : r === "password" ? z ? /* @__PURE__ */ t.jsx(O.EyeVisibility, { size: 24, className: "" }) : /* @__PURE__ */ t.jsx(O.EyeVisibilityOff, { size: 24, className: "" }) : a })
|
|
202
217
|
}
|
|
203
218
|
)
|
|
204
219
|
]
|
|
205
220
|
}
|
|
206
221
|
),
|
|
207
|
-
|
|
208
|
-
|
|
222
|
+
ee && L,
|
|
223
|
+
F && H
|
|
209
224
|
] });
|
|
210
|
-
},
|
|
225
|
+
}, Ce = ue(xe);
|
|
211
226
|
export {
|
|
212
|
-
|
|
227
|
+
Ce as default
|
|
213
228
|
};
|