prometeo-design-system 8.3.0 → 8.3.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.
@@ -1,12 +1,12 @@
1
1
  import { j as t } from "./jsx-runtime-GkKLlHH4.js";
2
2
  import { c as I } from "./cn-B6yFEsav.js";
3
- import { g as n } from "./utils-X4-h3cum.js";
3
+ import { g as o } from "./utils-X4-h3cum.js";
4
4
  import { useRef as m, useState as Q, useMemo as re, useEffect as le } from "react";
5
5
  import ae from "./Popover.es.js";
6
- import { Search as ne } from "./Icon-Search.es.js";
7
- import { CheckSmall as oe } from "./Icon-CheckSmall.es.js";
6
+ import { Search as oe } from "./Icon-Search.es.js";
7
+ import { CheckSmall as ne } from "./Icon-CheckSmall.es.js";
8
8
  function se({
9
- label: o,
9
+ label: n,
10
10
  icon: T,
11
11
  display: G,
12
12
  error: U,
@@ -16,7 +16,7 @@ function se({
16
16
  emptyMessage: V = "No hay opciones disponibles",
17
17
  options: s,
18
18
  optionValue: $,
19
- optionLabel: b,
19
+ optionLabel: h,
20
20
  optionGroup: N,
21
21
  optionLeading: k,
22
22
  selectedValues: C,
@@ -28,16 +28,16 @@ function se({
28
28
  limitReached: D,
29
29
  limitMessage: A,
30
30
  searchValue: X,
31
- onSearchChange: h,
31
+ onSearchChange: b,
32
32
  className: Y
33
33
  }) {
34
- const g = m(null), q = m(null), v = m(null), j = m(null), [u, B] = Q(!1), [c, E] = Q(""), w = C.length > 0, i = h !== void 0, Z = i ? X ?? "" : c, R = re(() => {
34
+ const g = m(null), q = m(null), v = m(null), j = m(null), [u, B] = Q(!1), [c, E] = Q(""), w = C.length > 0, i = b !== void 0, Z = i ? X ?? "" : c, R = re(() => {
35
35
  if (i || !c.trim()) return s;
36
36
  const e = c.trim().toLowerCase();
37
37
  return s.filter(
38
- (r) => n(r, b).toLowerCase().includes(e)
38
+ (r) => o(r, h).toLowerCase().includes(e)
39
39
  );
40
- }, [s, c, i, b]);
40
+ }, [s, c, i, h]);
41
41
  le(() => {
42
42
  u && requestAnimationFrame(() => {
43
43
  if (y && j.current) {
@@ -75,7 +75,7 @@ function se({
75
75
  ref: g,
76
76
  type: "button",
77
77
  disabled: O,
78
- "aria-label": o,
78
+ "aria-label": n,
79
79
  "aria-haspopup": "listbox",
80
80
  "aria-expanded": u,
81
81
  title: x ? M : void 0,
@@ -84,7 +84,7 @@ function se({
84
84
  "inline-flex h-8 items-center gap-1.5 rounded-full border px-3 transition-colors",
85
85
  "pyrion-fonts-label-medium",
86
86
  O ? "cursor-default" : "cursor-pointer",
87
- w ? "bg-neutral-secondary-default border-neutral-default-default text-neutral-secondary-default" : "border-dashed border-neutral-default-default bg-transparent text-neutral-tertiary-default",
87
+ w ? "bg-neutral-secondary-default hover:bg-neutral-secondary-hover border-neutral-default-default hover:border-neutral-default-hover text-neutral-secondary-default" : "border-dashed border-neutral-default-default hover:border-neutral-default-hover bg-transparent hover:bg-neutral-primary-hover text-neutral-tertiary-default",
88
88
  U && "border-dashed border-(--text-semantic-error-onneutral-default) text-semantic-error-onneutral-default",
89
89
  // En lectura el chip no se apaga: el valor tiene que seguir legible.
90
90
  // El que se atenúa es el deshabilitado, que sí es un bloqueo temporal.
@@ -93,7 +93,7 @@ function se({
93
93
  ),
94
94
  children: [
95
95
  T,
96
- w ? G : o
96
+ w ? G : n
97
97
  ]
98
98
  }
99
99
  ),
@@ -107,7 +107,7 @@ function se({
107
107
  zIndex: 60,
108
108
  onOpen: () => B(!0),
109
109
  onClose: () => {
110
- B(!1), E(""), h?.("");
110
+ B(!1), E(""), b?.("");
111
111
  },
112
112
  className: "p-0!",
113
113
  children: /* @__PURE__ */ t.jsxs(
@@ -117,14 +117,14 @@ function se({
117
117
  className: "bg-neutral-primary-default border-neutral-default-default radius-large flex w-72 flex-col overflow-hidden border",
118
118
  children: [
119
119
  y && /* @__PURE__ */ t.jsxs("div", { className: "border-neutral-default-default flex items-center gap-2 border-b px-3 py-2", children: [
120
- /* @__PURE__ */ t.jsx(ne, { size: 16, className: "text-neutral-tertiary-default shrink-0" }),
120
+ /* @__PURE__ */ t.jsx(oe, { size: 16, className: "text-neutral-tertiary-default shrink-0" }),
121
121
  /* @__PURE__ */ t.jsx(
122
122
  "input",
123
123
  {
124
124
  ref: j,
125
125
  value: Z,
126
- onChange: (e) => i ? h?.(e.target.value) : E(e.target.value),
127
- placeholder: `Buscar ${o.toLowerCase()}…`,
126
+ onChange: (e) => i ? b?.(e.target.value) : E(e.target.value),
127
+ placeholder: `Buscar ${n.toLowerCase()}…`,
128
128
  className: "pyrion-fonts-body-small text-neutral-primary-default placeholder:text-neutral-tertiary-default w-full bg-transparent outline-none"
129
129
  }
130
130
  )
@@ -134,13 +134,13 @@ function se({
134
134
  {
135
135
  ref: v,
136
136
  role: "listbox",
137
- "aria-label": o,
137
+ "aria-label": n,
138
138
  className: "max-h-72 overflow-y-auto p-1",
139
139
  children: [
140
140
  a && /* @__PURE__ */ t.jsx("p", { className: "pyrion-fonts-body-small text-neutral-tertiary-default px-3 py-2", children: "Cargando…" }),
141
141
  !a && R.length === 0 && /* @__PURE__ */ t.jsx("p", { className: "pyrion-fonts-body-small text-neutral-tertiary-default px-3 py-2", children: V }),
142
142
  !a && R.map((e) => {
143
- const r = n(e, $), f = n(e, b), l = N ? n(e, N) : void 0, z = k ? n(e, k) : void 0, p = C.includes(r), F = !!D && !p, te = l !== void 0 && l !== P;
143
+ const r = o(e, $), f = o(e, h), l = N ? o(e, N) : void 0, z = k ? o(e, k) : void 0, p = C.includes(r), F = !!D && !p, te = l !== void 0 && l !== P;
144
144
  return P = l, /* @__PURE__ */ t.jsxs("div", { children: [
145
145
  te && /* @__PURE__ */ t.jsx("p", { className: "pyrion-fonts-label-small text-neutral-tertiary-default px-3 pt-2 pb-1", children: l }),
146
146
  /* @__PURE__ */ t.jsxs(
@@ -161,7 +161,7 @@ function se({
161
161
  children: [
162
162
  z,
163
163
  /* @__PURE__ */ t.jsx("span", { className: "flex-1 truncate", children: f }),
164
- p && /* @__PURE__ */ t.jsx(oe, { size: 16, className: "shrink-0" })
164
+ p && /* @__PURE__ */ t.jsx(ne, { size: 16, className: "shrink-0" })
165
165
  ]
166
166
  }
167
167
  )
@@ -1,29 +1,29 @@
1
1
  import { j as e } from "./jsx-runtime-GkKLlHH4.js";
2
- import { c as k } from "./cn-B6yFEsav.js";
3
- import { useRef as p, useState as D } from "react";
4
- import { D as P } from "./DatePicker-CdLqTQWn.js";
5
- import w from "./Popover.es.js";
6
- import { CalendarToday as N } from "./Icon-CalendarToday.es.js";
7
- import { CloseSmall as R } from "./Icon-CloseSmall.es.js";
8
- const I = new Intl.DateTimeFormat("es-AR", { day: "numeric", month: "short" });
9
- function K({
2
+ import { c as v } from "./cn-B6yFEsav.js";
3
+ import { useRef as p, useState as k } from "react";
4
+ import { D } from "./DatePicker-CdLqTQWn.js";
5
+ import P from "./Popover.es.js";
6
+ import { CalendarToday as w } from "./Icon-CalendarToday.es.js";
7
+ import { CloseSmall as N } from "./Icon-CloseSmall.es.js";
8
+ const R = new Intl.DateTimeFormat("es-AR", { day: "numeric", month: "short" });
9
+ function I({
10
10
  label: s,
11
11
  value: t,
12
- onChange: i,
12
+ onChange: d,
13
13
  error: m,
14
14
  disabled: a,
15
- disabledReason: x,
15
+ disabledReason: h,
16
16
  readOnly: n,
17
- disabledDates: b,
18
- clearLabel: y = "Quitar fecha",
19
- className: g
17
+ disabledDates: x,
18
+ clearLabel: b = "Quitar fecha",
19
+ className: y
20
20
  }) {
21
- const l = p(null), d = p(null), [c, u] = D(!1), f = !!a || !!n, o = () => {
22
- d.current?.close(), l.current?.focus();
23
- }, h = (r) => {
21
+ const l = p(null), i = p(null), [u, c] = k(!1), f = !!a || !!n, o = () => {
22
+ i.current?.close(), l.current?.focus();
23
+ }, g = (r) => {
24
24
  r.key === "Escape" && (r.stopPropagation(), o());
25
25
  }, j = (r) => {
26
- r.key === "Escape" && c && (r.stopPropagation(), o());
26
+ r.key === "Escape" && u && (r.stopPropagation(), o());
27
27
  };
28
28
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
29
29
  /* @__PURE__ */ e.jsx(
@@ -34,53 +34,53 @@ function K({
34
34
  disabled: f,
35
35
  "aria-label": s,
36
36
  "aria-haspopup": "dialog",
37
- "aria-expanded": c,
38
- title: a ? x : void 0,
37
+ "aria-expanded": u,
38
+ title: a ? h : void 0,
39
39
  onKeyDown: j,
40
- className: k(
40
+ className: v(
41
41
  "inline-flex h-8 items-center gap-1.5 rounded-full border px-3 transition-colors",
42
42
  "pyrion-fonts-label-medium",
43
43
  f ? "cursor-default" : "cursor-pointer",
44
- t ? "bg-neutral-secondary-default border-neutral-default-default text-neutral-secondary-default" : "border-dashed border-neutral-default-default bg-transparent text-neutral-tertiary-default",
44
+ t ? "bg-neutral-secondary-default hover:bg-neutral-secondary-hover border-neutral-default-default hover:border-neutral-default-hover text-neutral-secondary-default" : "border-dashed border-neutral-default-default hover:border-neutral-default-hover bg-transparent hover:bg-neutral-primary-hover text-neutral-tertiary-default",
45
45
  m && "border-dashed border-(--text-semantic-error-onneutral-default) text-semantic-error-onneutral-default",
46
46
  // En lectura el chip no se apaga: el valor tiene que seguir legible.
47
47
  // El que se atenúa es el deshabilitado, que sí es un bloqueo temporal.
48
48
  a && "opacity-50",
49
- g
49
+ y
50
50
  ),
51
51
  children: t ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
52
- /* @__PURE__ */ e.jsx(N, { size: 14, className: "shrink-0" }),
53
- I.format(t)
52
+ /* @__PURE__ */ e.jsx(w, { size: 14, className: "shrink-0" }),
53
+ R.format(t)
54
54
  ] }) : `+ ${s}`
55
55
  }
56
56
  ),
57
57
  /* @__PURE__ */ e.jsx(
58
- w,
58
+ P,
59
59
  {
60
- ref: d,
60
+ ref: i,
61
61
  triggerRef: l,
62
62
  trigger: "click",
63
63
  hideIndicator: !0,
64
64
  zIndex: 60,
65
- onOpen: () => u(!0),
66
- onClose: () => u(!1),
65
+ onOpen: () => c(!0),
66
+ onClose: () => c(!1),
67
67
  className: "p-0!",
68
68
  children: /* @__PURE__ */ e.jsxs(
69
69
  "div",
70
70
  {
71
- onKeyDown: h,
71
+ onKeyDown: g,
72
72
  className: "bg-neutral-primary-default border-neutral-default-default radius-large flex flex-col overflow-hidden border",
73
73
  children: [
74
74
  /* @__PURE__ */ e.jsx(
75
- P,
75
+ D,
76
76
  {
77
77
  variant: "only-calendar",
78
78
  mode: "single",
79
79
  selected: t,
80
80
  onSelect: (r) => {
81
- i(r ?? void 0), o();
81
+ d(r ?? void 0), o();
82
82
  },
83
- disabledDates: b,
83
+ disabledDates: x,
84
84
  disabled: n
85
85
  }
86
86
  ),
@@ -89,12 +89,12 @@ function K({
89
89
  {
90
90
  type: "button",
91
91
  onClick: () => {
92
- i(void 0), o();
92
+ d(void 0), o();
93
93
  },
94
94
  className: "pyrion-fonts-body-small text-neutral-tertiary-default hover:bg-neutral-secondary-default border-neutral-default-default flex items-center gap-2 border-t px-3 py-2 text-left",
95
95
  children: [
96
- /* @__PURE__ */ e.jsx(R, { size: 14 }),
97
- y
96
+ /* @__PURE__ */ e.jsx(N, { size: 14 }),
97
+ b
98
98
  ]
99
99
  }
100
100
  )
@@ -105,7 +105,7 @@ function K({
105
105
  )
106
106
  ] });
107
107
  }
108
- K.displayName = "DatePickerPill";
108
+ I.displayName = "DatePickerPill";
109
109
  export {
110
- K as default
110
+ I as default
111
111
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "prometeo-design-system",
3
3
  "private": false,
4
- "version": "8.3.0",
4
+ "version": "8.3.1",
5
5
  "type": "module",
6
6
  "description": "design kit system",
7
7
  "main": "dist/prometeo-design-system.umd.js",