prometeo-design-system 4.2.2 → 4.2.4

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.
@@ -3,7 +3,7 @@ import { motion as C } from "framer-motion";
3
3
  import { memo as N, isValidElement as I } from "react";
4
4
  import { c as s } from "./cn-B6yFEsav.js";
5
5
  import z from "./PlainTooltip.es.js";
6
- const E = /* @__PURE__ */ Symbol.for("react.memo"), $ = (t, a, r) => {
6
+ const w = /* @__PURE__ */ Symbol.for("react.memo"), E = (t, a, r) => {
7
7
  if (!t)
8
8
  return null;
9
9
  if (typeof t == "function") {
@@ -13,7 +13,7 @@ const E = /* @__PURE__ */ Symbol.for("react.memo"), $ = (t, a, r) => {
13
13
  if (typeof t == "object") {
14
14
  if (I(t))
15
15
  return t;
16
- if ("$$typeof" in t && t.$$typeof === E) {
16
+ if ("$$typeof" in t && t.$$typeof === w) {
17
17
  const l = t;
18
18
  return /* @__PURE__ */ i.jsx(l, { size: r, className: a });
19
19
  }
@@ -25,10 +25,10 @@ function p({
25
25
  activeTab: a,
26
26
  onTabChange: r,
27
27
  className: l,
28
- tabClassName: o,
28
+ tabClassName: n,
29
29
  activeTabClassName: h,
30
- indicatorClassName: g,
31
- animated: y = !0,
30
+ indicatorClassName: y,
31
+ animated: g = !0,
32
32
  renderTab: d
33
33
  }) {
34
34
  const j = (e) => {
@@ -43,8 +43,8 @@ function p({
43
43
  ),
44
44
  role: "tablist",
45
45
  children: t?.map((e) => {
46
- const n = a === e.id, u = () => j(e), { iconPosition: f = "top", iconSize: T = 24 } = e, v = (c, m, b, k, x) => b ? /* @__PURE__ */ i.jsx(z, { title: b, ...k, children: /* @__PURE__ */ i.jsx("div", { onMouseEnter: m, onClick: x, children: c }) }) : /* @__PURE__ */ i.jsx("div", { onMouseEnter: m, onClick: x, children: c });
47
- return d ? /* @__PURE__ */ i.jsx("div", { children: d(e, n, u, e.onIconClick, e.onIconHover, e.iconTooltipTitle, e.iconTooltipProps, e.iconSize) }, e.id) : /* @__PURE__ */ i.jsxs(
46
+ const o = a === e.id, u = () => j(e), { iconPosition: f = "top", iconSize: T = 24 } = e, v = (c, m, b, k, x) => b ? /* @__PURE__ */ i.jsx(z, { title: b, ...k, children: /* @__PURE__ */ i.jsx("div", { onMouseEnter: m, onClick: x, children: c }) }) : /* @__PURE__ */ i.jsx("div", { onMouseEnter: m, onClick: x, children: c });
47
+ return d ? /* @__PURE__ */ i.jsx("div", { children: d(e, o, u, e.onIconClick, e.onIconHover, e.iconTooltipTitle, e.iconTooltipProps, e.iconSize) }, e.id) : /* @__PURE__ */ i.jsxs(
48
48
  "button",
49
49
  {
50
50
  onClick: u,
@@ -54,13 +54,13 @@ function p({
54
54
  "relative flex flex-col pb-3 justify-center items-center h-max px-4 font-medium focus:outline-none transition-colors",
55
55
  !e.disabled && "hover:text-primary-default-default cursor-pointer",
56
56
  e.disabled && "opacity-50 cursor-default",
57
- o,
58
- n && h
57
+ n,
58
+ o && h
59
59
  ),
60
60
  tabIndex: e.disabled ? -1 : 0,
61
61
  "aria-label": e.title,
62
62
  role: "tab",
63
- "aria-selected": n,
63
+ "aria-selected": o,
64
64
  children: [
65
65
  /* @__PURE__ */ i.jsxs("div", { className: s(
66
66
  "flex items-center gap-0.5",
@@ -72,24 +72,24 @@ function p({
72
72
  {
73
73
  className: s(
74
74
  "transition-all duration-300 ease-in-out relative z-10 group-hover/tablink-item:text-neutral-medium-hover ",
75
- n ? "text-primary-default-default prometeo-fonts-title-medium group-hover/tablink-item:text-primary-default-default" : "text-neutral-medium-default prometeo-fonts-body-large cursor-pointer",
75
+ o ? "text-primary-default-default prometeo-fonts-title-medium group-hover/tablink-item:text-primary-default-default" : "text-neutral-medium-default prometeo-fonts-body-large cursor-pointer",
76
76
  "leading-6! line-clamp-1"
77
77
  ),
78
78
  children: e.title
79
79
  }
80
80
  ),
81
- v($(e.icon, s(
81
+ v(E(e.icon, s(
82
82
  "transition-all duration-300 ease-in-out group-hover/tablink-item:text-neutral-medium-hover ",
83
- n ? "text-primary-default-default prometeo-fonts-title-medium group-hover/tablink-item:text-primary-default-default" : "text-neutral-medium-default prometeo-fonts-body-large"
83
+ o ? "text-primary-default-default prometeo-fonts-title-medium group-hover/tablink-item:text-primary-default-default" : "text-neutral-medium-default prometeo-fonts-body-large"
84
84
  ), T), e.onIconHover, e.iconTooltipTitle, e.iconTooltipProps, e.onIconClick)
85
85
  ] }),
86
- n && y && /* @__PURE__ */ i.jsx(
86
+ o && g && /* @__PURE__ */ i.jsx(
87
87
  C.div,
88
88
  {
89
89
  layoutId: "tab-indicator",
90
90
  className: s(
91
- "absolute -bottom-px left-0 right-0 h-[5px] rounded-t-xl bg-primary-default-default z-0",
92
- g
91
+ "absolute -bottom-px left-1/2 -translate-x-1/2 h-[4px] rounded-t-xl bg-primary-default-default z-0 w-[calc(100%-32px)]",
92
+ y
93
93
  ),
94
94
  transition: {
95
95
  type: "spring",
@@ -112,8 +112,8 @@ const H = N(p, (t, a) => {
112
112
  if (t.activeTab !== a.activeTab || t.className !== a.className || t.tabClassName !== a.tabClassName || t.activeTabClassName !== a.activeTabClassName || t.indicatorClassName !== a.indicatorClassName || t.animated !== a.animated || t.onTabChange !== a.onTabChange || t.renderTab !== a.renderTab || t.items.length !== a.items.length)
113
113
  return !1;
114
114
  for (let r = 0; r < t.items.length; r++) {
115
- const l = t.items[r], o = a.items[r];
116
- if (l.id !== o.id || l.title !== o.title || l.disabled !== o.disabled || l.description !== o.description)
115
+ const l = t.items[r], n = a.items[r];
116
+ if (l.id !== n.id || l.title !== n.title || l.disabled !== n.disabled || l.description !== n.description)
117
117
  return !1;
118
118
  }
119
119
  return !0;
@@ -1,8 +1,15 @@
1
1
  import { default as React } from 'react';
2
2
  import { DropzoneOptions } from 'react-dropzone';
3
- export interface UseFileDropzoneOptions extends Omit<DropzoneOptions, "onDrop"> {
3
+ type MIMETypeString = 'image/*' | 'image/png' | 'image/jpeg' | 'image/gif' | 'image/svg+xml' | 'image/webp' | 'image/vnd.dwg' | 'image/vnd.dxf' | 'text/plain' | 'text/markdown' | 'text/csv' | 'application/pdf' | 'application/postscript' | 'application/illustrator' | 'application/msword' | 'application/vnd.ms-excel' | 'application/vnd.ms-powerpoint' | 'application/vnd.visio' | 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' | 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' | 'application/vnd.openxmlformats-officedocument.presentationml.presentation' | 'application/zip' | 'application/vnd.rar' | 'application/x-7z-compressed' | 'application/gzip' | 'application/x-tar' | 'video/*' | 'video/mp4' | 'video/x-msvideo' | 'video/quicktime' | 'video/webm' | 'video/x-matroska' | 'audio/*' | 'audio/mpeg' | 'audio/wav' | 'audio/mp4' | 'audio/ogg' | 'application/acad' | 'application/step' | 'application/iges' | 'model/stl' | 'message/rfc822' | 'application/vnd.ms-outlook' | 'application/mbox' | 'application/hl7-v2' | 'application/dicom' | 'application/octet-stream';
4
+ export interface UseFileDropzoneOptions extends Omit<DropzoneOptions, "onDrop" | "accept"> {
4
5
  onFilesAccepted?: (files: File[]) => void;
5
6
  onFilesRejected?: (rejectedFiles: unknown[]) => void;
7
+ accept?: Partial<Record<MIMETypeString, string[]>>;
8
+ }
9
+ export interface UseFileDropzoneOptions extends Omit<DropzoneOptions, "onDrop" | "accept"> {
10
+ onFilesAccepted?: (files: File[]) => void;
11
+ onFilesRejected?: (rejectedFiles: unknown[]) => void;
12
+ accept?: Partial<Record<MIMETypeString, string[]>>;
6
13
  }
7
14
  export declare function useFileDropzone({ onFilesAccepted, onFilesRejected, ...options }: UseFileDropzoneOptions): {
8
15
  hasErrors: boolean;
@@ -19,3 +26,4 @@ export declare function useFileDropzone({ onFilesAccepted, onFilesRejected, ...o
19
26
  getRootProps: <T extends import('react-dropzone').DropzoneRootProps>(props?: T) => T;
20
27
  getInputProps: <T extends import('react-dropzone').DropzoneInputProps>(props?: T) => T;
21
28
  };
29
+ export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "prometeo-design-system",
3
3
  "private": false,
4
- "version": "4.2.2",
4
+ "version": "4.2.4",
5
5
  "type": "module",
6
6
  "description": "design kit system",
7
7
  "main": "dist/prometeo-design-system.umd.js",