prometeo-design-system 2.3.3 → 2.3.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-DsbEyjth.js → Button-Bc0LYLfg.js} +1 -1
- package/dist/Button.es.js +1 -1
- package/dist/{CardProfile-BhFog7j5.js → CardProfile-BhHJmvqs.js} +78 -53
- package/dist/CardProfile.es.js +1 -1
- package/dist/CheckBox.es.js +78 -75
- package/dist/CheckboxFormik.es.js +1 -1
- package/dist/DatePicker.es.js +2 -2
- package/dist/DialogModal.es.js +1 -1
- package/dist/DrawerDesktop.es.js +2 -2
- package/dist/DrawerMobile.es.js +1 -1
- package/dist/DropZone.es.js +1 -1
- package/dist/Header.es.js +1 -1
- package/dist/Icons/Icons.d.ts +2 -0
- package/dist/Icons.es.js +98 -64
- package/dist/Image.es.js +1 -1
- package/dist/{ImageGallery-DnoRTpCr.js → ImageGallery-BeADef_g.js} +2 -2
- package/dist/ImageGallery.es.js +1 -1
- package/dist/Input.es.js +1 -1
- package/dist/InputFormik.es.js +1 -1
- 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/SegmentedButton.es.js +1 -1
- package/dist/Select.es.js +420 -269
- package/dist/SelectFormik.es.js +1 -1
- package/dist/Skeleton.es.js +41 -41
- package/dist/Spinner.es.js +1 -1
- package/dist/Steps.es.js +1 -1
- package/dist/SwipeContainer.es.js +1 -1
- package/dist/Switch.es.js +1 -1
- 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/CardProfile/CardProfile.d.ts +5 -5
- package/dist/components/CheckBox/CheckBox.d.ts +5 -2
- package/dist/components/Select/Select.d.ts +11 -3
- package/dist/components/Shared/Chip.d.ts +14 -0
- package/dist/components/Shared/HelperComponent.d.ts +13 -0
- package/dist/components/Sidebar/components/changue-account.d.ts +3 -3
- package/dist/{jsx-runtime-DKDX3adD.js → jsx-runtime-ByW6EXIE.js} +96 -94
- package/dist/prometeo-design-system.css +1 -1
- package/dist/prometeo-design-system.es.js +6 -6
- package/package.json +1 -1
- package/src/styles/intellisense.css +5 -0
package/dist/SelectFormik.es.js
CHANGED
package/dist/Skeleton.es.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { c as
|
|
3
|
-
import { memo as
|
|
4
|
-
const
|
|
5
|
-
const e =
|
|
6
|
-
let
|
|
7
|
-
const
|
|
8
|
-
if (
|
|
9
|
-
const
|
|
10
|
-
switch (
|
|
1
|
+
import { j as E } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
|
+
import { c as B } from "./cn-B6yFEsav.js";
|
|
3
|
+
import { memo as N, useRef as R, useCallback as D, useLayoutEffect as M } from "react";
|
|
4
|
+
const y = (n) => {
|
|
5
|
+
const e = R(null), { debugMode: h = !1, className: f = "", children: k, shape: C = "rounded", animation: g = "shimmer", onlyContainer: i = !1 } = n;
|
|
6
|
+
let m = "255, 255, 255", d = "255, 255, 255, 0.1";
|
|
7
|
+
const b = D(() => {
|
|
8
|
+
if (i || !e.current) return;
|
|
9
|
+
const o = d.split(",").map(Number), c = m.match(/\d+/g);
|
|
10
|
+
switch (g) {
|
|
11
11
|
case "shimmer":
|
|
12
|
-
e.current.classList.add("skeleton-shimmer-animation"),
|
|
12
|
+
e.current.classList.add("skeleton-shimmer-animation"), o && o.length >= 3 && (e.current.style.setProperty("--shimmer-color-r", o[0].toString()), e.current.style.setProperty("--shimmer-color-g", o[1].toString()), e.current.style.setProperty("--shimmer-color-b", o[2].toString()), e.current.style.setProperty("--shimmer-color-a", o[3].toString()));
|
|
13
13
|
break;
|
|
14
14
|
case "none":
|
|
15
15
|
e.current.style.animation = "none";
|
|
@@ -18,56 +18,56 @@ const b = (y) => {
|
|
|
18
18
|
e.current.classList.add("skeleton-border-animation"), e.current.style.backgroundColor = "transparent", c && c.length >= 3 && (e.current.style.setProperty("--border-color-r", c[0]), e.current.style.setProperty("--border-color-g", c[1]), e.current.style.setProperty("--border-color-b", c[2]));
|
|
19
19
|
break;
|
|
20
20
|
}
|
|
21
|
-
}, [d, m, i
|
|
22
|
-
|
|
21
|
+
}, [g, d, m, i]);
|
|
22
|
+
M(() => {
|
|
23
23
|
if (e.current) {
|
|
24
|
-
const
|
|
25
|
-
let
|
|
26
|
-
for (;
|
|
27
|
-
const
|
|
28
|
-
if (
|
|
29
|
-
return
|
|
30
|
-
|
|
24
|
+
const o = (l) => {
|
|
25
|
+
let t = l;
|
|
26
|
+
for (; t && t !== document.body; ) {
|
|
27
|
+
const a = window.getComputedStyle(t).backgroundColor;
|
|
28
|
+
if (a && a !== "transparent" && a !== "rgba(0, 0, 0, 0)")
|
|
29
|
+
return a;
|
|
30
|
+
t = t.parentElement;
|
|
31
31
|
}
|
|
32
|
-
const
|
|
33
|
-
return
|
|
34
|
-
}, c = (
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
const
|
|
38
|
-
if (!
|
|
39
|
-
|
|
40
|
-
const
|
|
41
|
-
return [
|
|
32
|
+
const r = window.getComputedStyle(document.body).backgroundColor;
|
|
33
|
+
return r && r !== "transparent" && r !== "rgba(0, 0, 0, 0)" ? r : "rgb(255, 255, 255)";
|
|
34
|
+
}, c = (l) => {
|
|
35
|
+
const t = document.createElement("canvas");
|
|
36
|
+
t.width = 1, t.height = 1;
|
|
37
|
+
const r = t.getContext("2d");
|
|
38
|
+
if (!r) return [255, 255, 255];
|
|
39
|
+
r.fillStyle = l, r.fillRect(0, 0, 1, 1);
|
|
40
|
+
const a = r.getImageData(0, 0, 1, 1).data;
|
|
41
|
+
return [a[0], a[1], a[2]];
|
|
42
42
|
};
|
|
43
43
|
if (!e.current.parentElement) return;
|
|
44
|
-
const
|
|
44
|
+
const p = o(e.current.parentElement), s = c(p), w = s.reduce((l, t) => l + t, 0) < 382;
|
|
45
45
|
let u;
|
|
46
|
-
w ? u = `rgb(${s[0] + 10}, ${s[1] + 10}, ${s[2] + 10})` : (u = `rgb(${s[0] - 30}, ${s[1] - 30}, ${s[2] - 30})`,
|
|
46
|
+
w ? u = `rgb(${s[0] + 10}, ${s[1] + 10}, ${s[2] + 10})` : (u = `rgb(${s[0] - 30}, ${s[1] - 30}, ${s[2] - 30})`, m = "115,115,115", d = "255,255,255, 0.4"), i && (u = "transparent", e.current.style.animation = "none"), e.current.style.backgroundColor = u, b();
|
|
47
47
|
}
|
|
48
|
-
}, [m, i,
|
|
48
|
+
}, [d, m, i, b]);
|
|
49
49
|
const S = {
|
|
50
50
|
circle: "rounded-full aspect-square",
|
|
51
51
|
square: "rounded-none",
|
|
52
52
|
rounded: "rounded"
|
|
53
53
|
};
|
|
54
|
-
return /* @__PURE__ */
|
|
54
|
+
return /* @__PURE__ */ E.jsx(
|
|
55
55
|
"div",
|
|
56
56
|
{
|
|
57
57
|
ref: e,
|
|
58
|
-
className:
|
|
59
|
-
|
|
58
|
+
className: B(
|
|
59
|
+
h && " border-red-600/20 border",
|
|
60
60
|
f,
|
|
61
61
|
"skeleton-container",
|
|
62
|
-
S[
|
|
62
|
+
S[C]
|
|
63
63
|
),
|
|
64
|
-
children:
|
|
64
|
+
children: k
|
|
65
65
|
},
|
|
66
66
|
`skeleton-${Math.random().toFixed(10)}`
|
|
67
67
|
);
|
|
68
68
|
};
|
|
69
|
-
|
|
70
|
-
const
|
|
69
|
+
y.displayName = "Skeleton";
|
|
70
|
+
const x = N(y, (n, e) => n.debugMode === e.debugMode && n.className === e.className && n.children === e.children && n.shape === e.shape && n.animation === e.animation && n.onlyContainer === e.onlyContainer);
|
|
71
71
|
export {
|
|
72
|
-
|
|
72
|
+
x as Skeleton
|
|
73
73
|
};
|
package/dist/Spinner.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as e } from "./jsx-runtime-
|
|
1
|
+
import { j as e } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
2
|
import { ClipLoader as l, SyncLoader as m, HashLoader as p, GridLoader as x, DotLoader as j, BounceLoader as f } from "react-spinners";
|
|
3
3
|
import { c as L } from "./cn-B6yFEsav.js";
|
|
4
4
|
const y = ({
|
package/dist/Steps.es.js
CHANGED
package/dist/Switch.es.js
CHANGED
package/dist/TabLinks.es.js
CHANGED
package/dist/Table.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 { c as l } from "./cn-B6yFEsav.js";
|
|
3
3
|
import * as o from "react";
|
|
4
4
|
const n = o.forwardRef(({ className: e, ...t }, a) => /* @__PURE__ */ r.jsx("div", { className: "w-full", children: /* @__PURE__ */ r.jsx(
|
package/dist/TextArea.es.js
CHANGED
package/dist/Tooltip.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as e } from "./jsx-runtime-
|
|
1
|
+
import { j as e } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
2
|
import { AnimatePresence as f, motion as n } from "framer-motion";
|
|
3
3
|
import { useState as p, cloneElement as x } from "react";
|
|
4
4
|
import { Icons as b } from "./Icons.es.js";
|
|
@@ -9,8 +9,8 @@ export interface ISessionLocalStorage {
|
|
|
9
9
|
name: string;
|
|
10
10
|
email: string;
|
|
11
11
|
username: string;
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
areaId: IArea;
|
|
13
|
+
companyId: ICompany;
|
|
14
14
|
expires_at: string;
|
|
15
15
|
logoutDate: string;
|
|
16
16
|
token: string;
|
|
@@ -28,7 +28,7 @@ interface ICardProfileImage {
|
|
|
28
28
|
}
|
|
29
29
|
interface ICardProfileContent {
|
|
30
30
|
isExpanded: boolean;
|
|
31
|
-
|
|
31
|
+
nameUser: string;
|
|
32
32
|
nameCompany: string;
|
|
33
33
|
nameArea: string;
|
|
34
34
|
cardProfile: ReactNode;
|
|
@@ -39,9 +39,9 @@ interface ICardProfileOptions {
|
|
|
39
39
|
isExpanded: boolean;
|
|
40
40
|
}
|
|
41
41
|
export declare const CardProfile: (({ children }: ICardProfile) => import("react/jsx-runtime").JSX.Element) & {
|
|
42
|
-
Menu: ({ isExpanded, sessions, onClickLogout, handleTokenLogin }: IDropMenu) => import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
Menu: ({ isExpanded, sessions, onClickLogout, handleTokenLogin, }: IDropMenu) => import("react/jsx-runtime").JSX.Element;
|
|
43
43
|
Image: ({ imageUrl, fallbackText }: ICardProfileImage) => import("react/jsx-runtime").JSX.Element;
|
|
44
|
-
Content: ({ isExpanded,
|
|
44
|
+
Content: ({ isExpanded, nameUser, nameCompany, nameArea, cardProfile, onClick, }: ICardProfileContent) => import("react/jsx-runtime").JSX.Element;
|
|
45
45
|
Separator: () => import("react/jsx-runtime").JSX.Element;
|
|
46
46
|
Options: ({ isExpanded, onClick }: ICardProfileOptions) => import("react/jsx-runtime").JSX.Element;
|
|
47
47
|
};
|
|
@@ -3,5 +3,8 @@ export type CheckBoxProps = {
|
|
|
3
3
|
className?: string;
|
|
4
4
|
disabled?: boolean;
|
|
5
5
|
} & HTMLProps<HTMLInputElement>;
|
|
6
|
-
declare const
|
|
7
|
-
|
|
6
|
+
declare const _default: import('react').MemoExoticComponent<{
|
|
7
|
+
({ className, disabled, ...rest }: CheckBoxProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
displayName: string;
|
|
9
|
+
}>;
|
|
10
|
+
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ComponentType, JSX } from 'react';
|
|
1
|
+
import { ComponentType, JSX, default as React } from 'react';
|
|
2
|
+
import { ComponentVariant, LabelVariant } from '../Shared/types';
|
|
2
3
|
export type SelectDisplayMode = "compact" | "chips";
|
|
3
|
-
export type LabelVariant = "default" | "static";
|
|
4
4
|
type PathValue<T, P extends string> = P extends keyof T ? T[P] : P extends `${infer K}.${infer Rest}` ? K extends keyof T ? PathValue<T[K], Rest> : never : never;
|
|
5
5
|
type Paths<T> = T extends object ? {
|
|
6
6
|
[K in keyof T & string]: T[K] extends object ? K | `${K}.${Paths<T[K]>}` : K;
|
|
@@ -16,21 +16,25 @@ export type CustomSelectionDisplayProps<T> = {
|
|
|
16
16
|
placeholder?: string;
|
|
17
17
|
multiple: boolean;
|
|
18
18
|
onRemoveOption: (optionId: string | number) => void;
|
|
19
|
+
disabled?: boolean;
|
|
19
20
|
};
|
|
20
21
|
interface SelectOptionRendererProps<T = unknown> {
|
|
21
22
|
option: SelectOptionType | T;
|
|
22
23
|
isSelected: boolean;
|
|
23
24
|
onSelect: (option: SelectOptionType) => void;
|
|
24
25
|
multiple: boolean;
|
|
26
|
+
disabled?: boolean;
|
|
25
27
|
}
|
|
26
28
|
export interface CustomSelectOptionRendererProps<T> extends SelectOptionRendererProps<T> {
|
|
27
29
|
option: T;
|
|
28
30
|
onSelect: () => void;
|
|
31
|
+
disabled?: boolean;
|
|
29
32
|
}
|
|
33
|
+
export type SelectVariant = "default" | "error" | "success";
|
|
30
34
|
export interface SelectProps<T = unknown> {
|
|
31
35
|
label: string;
|
|
32
36
|
value: (string | number)[];
|
|
33
|
-
|
|
37
|
+
isLoading?: boolean;
|
|
34
38
|
options: T[];
|
|
35
39
|
onOptionClick?: (option: SelectOptionType, name?: string) => void;
|
|
36
40
|
onChange?: (newValue: SelectOptionType[], name?: string) => void;
|
|
@@ -56,6 +60,10 @@ export interface SelectProps<T = unknown> {
|
|
|
56
60
|
attachToParent?: boolean;
|
|
57
61
|
name?: string;
|
|
58
62
|
overflow?: 'wrap' | 'scroll';
|
|
63
|
+
errorComponent?: React.ReactNode;
|
|
64
|
+
helperComponent?: React.ReactNode;
|
|
65
|
+
disabled?: boolean;
|
|
66
|
+
variant?: ComponentVariant;
|
|
59
67
|
}
|
|
60
68
|
declare const _default: <T>(props: SelectProps<T>) => JSX.Element;
|
|
61
69
|
export default _default;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ComponentVariant } from './types';
|
|
2
|
+
type ChipProps = {
|
|
3
|
+
id: string | number;
|
|
4
|
+
label: string;
|
|
5
|
+
onRemove?: (optionId: string | number) => void;
|
|
6
|
+
className?: string;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
variant?: ComponentVariant;
|
|
9
|
+
};
|
|
10
|
+
declare const _default: import('react').MemoExoticComponent<{
|
|
11
|
+
({ id, label, onRemove, className, disabled, variant }: ChipProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
displayName: string;
|
|
13
|
+
}>;
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ComponentVariant } from './types';
|
|
3
|
+
export interface HelperTextProps {
|
|
4
|
+
ref?: React.RefObject<HTMLDivElement | null>;
|
|
5
|
+
children: React.ReactNode | string;
|
|
6
|
+
variant: ComponentVariant;
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
declare const _default: React.MemoExoticComponent<{
|
|
10
|
+
(props: HelperTextProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
displayName: string;
|
|
12
|
+
}>;
|
|
13
|
+
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ISessionLocalStorage } from '../../CardProfile/CardProfile';
|
|
2
|
-
export default function ChangeAccount({ sessions, handleTokenLogin }: {
|
|
3
|
-
sessions?: ISessionLocalStorage[];
|
|
4
|
-
handleTokenLogin?: (token: string) => void;
|
|
2
|
+
export default function ChangeAccount({ sessions, handleTokenLogin, }: {
|
|
3
|
+
readonly sessions?: ISessionLocalStorage[];
|
|
4
|
+
readonly handleTokenLogin?: (token: string) => void;
|
|
5
5
|
}): import("react/jsx-runtime").JSX.Element;
|