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.
Files changed (52) 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-BhFog7j5.js → CardProfile-BhHJmvqs.js} +78 -53
  5. package/dist/CardProfile.es.js +1 -1
  6. package/dist/CheckBox.es.js +78 -75
  7. package/dist/CheckboxFormik.es.js +1 -1
  8. package/dist/DatePicker.es.js +2 -2
  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/Icons.d.ts +2 -0
  15. package/dist/Icons.es.js +98 -64
  16. package/dist/Image.es.js +1 -1
  17. package/dist/{ImageGallery-DnoRTpCr.js → ImageGallery-BeADef_g.js} +2 -2
  18. package/dist/ImageGallery.es.js +1 -1
  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-p4Pll4Cm.js → LayoutGeneric-jDE96L2N.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.es.js +420 -269
  32. package/dist/SelectFormik.es.js +1 -1
  33. package/dist/Skeleton.es.js +41 -41
  34. package/dist/Spinner.es.js +1 -1
  35. package/dist/Steps.es.js +1 -1
  36. package/dist/SwipeContainer.es.js +1 -1
  37. package/dist/Switch.es.js +1 -1
  38. package/dist/TabLinks.es.js +1 -1
  39. package/dist/Table.es.js +1 -1
  40. package/dist/TextArea.es.js +1 -1
  41. package/dist/Tooltip.es.js +1 -1
  42. package/dist/components/CardProfile/CardProfile.d.ts +5 -5
  43. package/dist/components/CheckBox/CheckBox.d.ts +5 -2
  44. package/dist/components/Select/Select.d.ts +11 -3
  45. package/dist/components/Shared/Chip.d.ts +14 -0
  46. package/dist/components/Shared/HelperComponent.d.ts +13 -0
  47. package/dist/components/Sidebar/components/changue-account.d.ts +3 -3
  48. package/dist/{jsx-runtime-DKDX3adD.js → jsx-runtime-ByW6EXIE.js} +96 -94
  49. package/dist/prometeo-design-system.css +1 -1
  50. package/dist/prometeo-design-system.es.js +6 -6
  51. package/package.json +1 -1
  52. package/src/styles/intellisense.css +5 -0
@@ -1,4 +1,4 @@
1
- import { j as t } from "./jsx-runtime-DKDX3adD.js";
1
+ import { j as t } from "./jsx-runtime-ByW6EXIE.js";
2
2
  import { Icons as g } from "./Icons.es.js";
3
3
  import { c as d } from "./cn-B6yFEsav.js";
4
4
  import { useField as $, ErrorMessage as q } from "formik";
@@ -1,15 +1,15 @@
1
- import { j as x } from "./jsx-runtime-DKDX3adD.js";
2
- import { c as E } from "./cn-B6yFEsav.js";
3
- import { memo as P, useRef as B, useCallback as R, useLayoutEffect as D } from "react";
4
- const b = (y) => {
5
- const e = B(null), { debugMode: p = !1, className: f = "", children: h, shape: k = "rounded", animation: d = "shimmer", onlyContainer: l = !1 } = y;
6
- let i = "255, 255, 255", m = "255, 255, 255, 0.1";
7
- const g = R(() => {
8
- if (l || !e.current) return;
9
- const n = m.split(",").map(Number), c = i.match(/\d+/g);
10
- switch (d) {
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"), n && n.length >= 3 && (e.current.style.setProperty("--shimmer-color-r", n[0].toString()), e.current.style.setProperty("--shimmer-color-g", n[1].toString()), e.current.style.setProperty("--shimmer-color-b", n[2].toString()), e.current.style.setProperty("--shimmer-color-a", n[3].toString()));
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, l]);
22
- D(() => {
21
+ }, [g, d, m, i]);
22
+ M(() => {
23
23
  if (e.current) {
24
- const n = (a) => {
25
- let r = a;
26
- for (; r && r !== document.body; ) {
27
- const o = window.getComputedStyle(r).backgroundColor;
28
- if (o && o !== "transparent" && o !== "rgba(0, 0, 0, 0)")
29
- return o;
30
- r = r.parentElement;
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 t = window.getComputedStyle(document.body).backgroundColor;
33
- return t && t !== "transparent" && t !== "rgba(0, 0, 0, 0)" ? t : "rgb(255, 255, 255)";
34
- }, c = (a) => {
35
- const r = document.createElement("canvas");
36
- r.width = 1, r.height = 1;
37
- const t = r.getContext("2d");
38
- if (!t) return [255, 255, 255];
39
- t.fillStyle = a, t.fillRect(0, 0, 1, 1);
40
- const o = t.getImageData(0, 0, 1, 1).data;
41
- return [o[0], o[1], o[2]];
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 C = n(e.current.parentElement), s = c(C), w = s.reduce((a, r) => a + r, 0) < 382;
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})`, i = "115,115,115", m = "255,255,255, 0.4"), l && (u = "transparent", e.current.style.animation = "none"), e.current.style.backgroundColor = u, g();
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, l, g]);
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__ */ x.jsx(
54
+ return /* @__PURE__ */ E.jsx(
55
55
  "div",
56
56
  {
57
57
  ref: e,
58
- className: E(
59
- p && " border-red-600/20 border",
58
+ className: B(
59
+ h && " border-red-600/20 border",
60
60
  f,
61
61
  "skeleton-container",
62
- S[k]
62
+ S[C]
63
63
  ),
64
- children: h
64
+ children: k
65
65
  },
66
66
  `skeleton-${Math.random().toFixed(10)}`
67
67
  );
68
68
  };
69
- b.displayName = "Skeleton";
70
- const L = P(b);
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
- L as Skeleton
72
+ x as Skeleton
73
73
  };
@@ -1,4 +1,4 @@
1
- import { j as e } from "./jsx-runtime-DKDX3adD.js";
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
@@ -1,4 +1,4 @@
1
- import { j as e } from "./jsx-runtime-DKDX3adD.js";
1
+ import { j as e } from "./jsx-runtime-ByW6EXIE.js";
2
2
  import { c as j } from "./cn-B6yFEsav.js";
3
3
  import { motion as r } from "framer-motion";
4
4
  import N from "react";
@@ -1,4 +1,4 @@
1
- import { j as o } from "./jsx-runtime-DKDX3adD.js";
1
+ import { j as o } from "./jsx-runtime-ByW6EXIE.js";
2
2
  import { c as i } from "./cn-B6yFEsav.js";
3
3
  import { useState as d, useRef as D, useEffect as L } from "react";
4
4
  const O = ({
package/dist/Switch.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { j as a } from "./jsx-runtime-DKDX3adD.js";
1
+ import { j as a } from "./jsx-runtime-ByW6EXIE.js";
2
2
  import { c as r } from "./cn-B6yFEsav.js";
3
3
  import { memo as w, useRef as b } from "react";
4
4
  import { motion as c } from "framer-motion";
@@ -1,4 +1,4 @@
1
- import { j as a } from "./jsx-runtime-DKDX3adD.js";
1
+ import { j as a } from "./jsx-runtime-ByW6EXIE.js";
2
2
  import { motion as h } from "framer-motion";
3
3
  import { memo as d } from "react";
4
4
  import { c as i } from "./cn-B6yFEsav.js";
package/dist/Table.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { j as r } from "./jsx-runtime-DKDX3adD.js";
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(
@@ -1,4 +1,4 @@
1
- import { j as y } from "./jsx-runtime-DKDX3adD.js";
1
+ import { j as y } from "./jsx-runtime-ByW6EXIE.js";
2
2
  import { c as C } from "./cn-B6yFEsav.js";
3
3
  import * as s from "react";
4
4
  function M({
@@ -1,4 +1,4 @@
1
- import { j as e } from "./jsx-runtime-DKDX3adD.js";
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
- company_id: ICompany;
13
- area: IArea;
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
- name: string;
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, name, nameCompany, nameArea, cardProfile, onClick }: ICardProfileContent) => import("react/jsx-runtime").JSX.Element;
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 CheckBox: ({ className, disabled, ...rest }: CheckBoxProps) => import("react/jsx-runtime").JSX.Element;
7
- export default CheckBox;
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
- isFetching?: boolean;
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;