prometeo-design-system 9.4.2 → 9.5.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.
- package/dist/AttachInput.es.js +1 -1
- package/dist/Card.es.js +1 -1
- package/dist/{CardBackground-Dey2CbfR.js → CardBackground-B5gNTzXW.js} +85 -57
- package/dist/CardBackground.es.js +1 -1
- package/dist/Chat.es.js +2 -2
- package/dist/{ChatCard-BsR1OLNp.js → ChatCard-21E5rAa1.js} +1 -1
- package/dist/ChatCard.es.js +1 -1
- package/dist/Dialog.es.js +1 -1
- package/dist/IconButton.es.js +112 -100
- package/dist/Input.es.js +1 -1
- package/dist/ListItem.es.js +92 -89
- package/dist/Menu.es.js +1 -1
- package/dist/MenuFloating.css +1 -1
- package/dist/NavigationRail.es.js +1 -1
- package/dist/NotificationCard.es.js +1 -1
- package/dist/Popover.es.js +1 -1
- package/dist/SearchBar.es.js +169 -151
- package/dist/Select.es.js +1 -0
- package/dist/SidebarItem.es.js +31 -31
- package/dist/Table.es.js +224 -211
- package/dist/TextArea.es.js +1 -1
- package/dist/components/CardBackground/interactionConfig.d.ts +16 -0
- package/dist/components/IconButton/IconButton.d.ts +2 -1
- package/dist/components/Table/HeadRow.d.ts +1 -1
- package/dist/components/Table/HeadRowContext.d.ts +3 -0
- package/dist/components/Table/types.d.ts +4 -0
- package/dist/exports/IconButton.d.ts +1 -1
- package/dist/prometeo-design-system.es.js +2 -2
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/src/styles/base.css +2 -0
- package/src/styles/utility-variants.css +0 -6
package/dist/AttachInput.es.js
CHANGED
|
@@ -2,7 +2,7 @@ import { j as t } from "./jsx-runtime-CqQglQKg.js";
|
|
|
2
2
|
import { c as o } from "./cn-B6yFEsav.js";
|
|
3
3
|
import { memo as P, forwardRef as E, useCallback as G } from "react";
|
|
4
4
|
import { useDropzone as H } from "react-dropzone";
|
|
5
|
-
import { C as _ } from "./CardBackground-
|
|
5
|
+
import { C as _ } from "./CardBackground-B5gNTzXW.js";
|
|
6
6
|
import { PlainTooltip as q } from "./PlainTooltip.es.js";
|
|
7
7
|
import K from "./HelperComponent.es.js";
|
|
8
8
|
import { c as i } from "./index-BOQuZ0gG.js";
|
package/dist/Card.es.js
CHANGED
|
@@ -2,7 +2,7 @@ import { j as n } from "./jsx-runtime-CqQglQKg.js";
|
|
|
2
2
|
import { useContext as z, createContext as b, memo as d, forwardRef as F, useMemo as H } from "react";
|
|
3
3
|
import { c as i } from "./cn-B6yFEsav.js";
|
|
4
4
|
import { c } from "./index-BOQuZ0gG.js";
|
|
5
|
-
import { C as V, i as E } from "./CardBackground-
|
|
5
|
+
import { C as V, i as E } from "./CardBackground-B5gNTzXW.js";
|
|
6
6
|
const f = b(null);
|
|
7
7
|
function m() {
|
|
8
8
|
const r = z(f);
|
|
@@ -1,69 +1,97 @@
|
|
|
1
1
|
import { j as y } from "./jsx-runtime-CqQglQKg.js";
|
|
2
|
-
import { memo as
|
|
3
|
-
import { c as
|
|
2
|
+
import { memo as w } from "react";
|
|
3
|
+
import { c as A } from "./index-BOQuZ0gG.js";
|
|
4
4
|
import { c as h } from "./cn-B6yFEsav.js";
|
|
5
|
-
function
|
|
5
|
+
function c(r) {
|
|
6
6
|
return !("color" in r.default);
|
|
7
7
|
}
|
|
8
|
-
function
|
|
8
|
+
function E(r) {
|
|
9
9
|
if ("selected" in r) return !0;
|
|
10
10
|
const e = r.default;
|
|
11
11
|
return e == null ? !1 : !("color" in e);
|
|
12
12
|
}
|
|
13
|
-
function
|
|
13
|
+
function f(r, e) {
|
|
14
14
|
return e ? { ...r, ...e } : r;
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function v(r, e) {
|
|
17
17
|
return e ? {
|
|
18
|
-
default:
|
|
19
|
-
hover:
|
|
20
|
-
pressed:
|
|
18
|
+
default: f(r.default, e.default),
|
|
19
|
+
hover: f(r.hover, e.hover),
|
|
20
|
+
pressed: f(r.pressed, e.pressed)
|
|
21
21
|
} : r;
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function P(r, e) {
|
|
24
|
+
if (r == null && e == null) return;
|
|
25
|
+
if (r === "transparent")
|
|
26
|
+
return { color: "transparent", variant: "default" };
|
|
27
|
+
const a = r ?? "neutral";
|
|
28
|
+
return {
|
|
29
|
+
color: a,
|
|
30
|
+
variant: a === "brand" ? "primary" : e ?? "default"
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
function _(r, e) {
|
|
34
|
+
return {
|
|
35
|
+
default: { color: r, variant: e },
|
|
36
|
+
hover: { color: r, variant: e, forced: "hover" },
|
|
37
|
+
pressed: { color: r, variant: e, forced: "pressed" }
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
function x(r, e, a) {
|
|
41
|
+
const t = P(e, a);
|
|
42
|
+
if (!t) return r;
|
|
43
|
+
const n = _(t.color, t.variant);
|
|
44
|
+
return c(r) ? { ...r, default: n } : n;
|
|
45
|
+
}
|
|
46
|
+
function q(r, e) {
|
|
24
47
|
if (!e) return r;
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
48
|
+
const a = x(r, e.color, e.variant);
|
|
49
|
+
return I(a, e.interactionConfig);
|
|
50
|
+
}
|
|
51
|
+
function I(r, e) {
|
|
52
|
+
if (!e) return r;
|
|
53
|
+
const a = c(r), t = a ? r.default : r, n = a ? r.selected : void 0;
|
|
54
|
+
if (!E(e)) {
|
|
55
|
+
const d = v(t, e);
|
|
56
|
+
return n ? { default: d, selected: n } : d;
|
|
29
57
|
}
|
|
30
|
-
const l =
|
|
31
|
-
return !e.selected && !
|
|
58
|
+
const l = v(t, e.default);
|
|
59
|
+
return !e.selected && !n ? { default: l } : {
|
|
32
60
|
default: l,
|
|
33
|
-
selected:
|
|
61
|
+
selected: v(n ?? l, e.selected)
|
|
34
62
|
};
|
|
35
63
|
}
|
|
36
|
-
const
|
|
37
|
-
function
|
|
38
|
-
return { [
|
|
64
|
+
const B = "data-interaction-group", z = "data-interaction-exclude";
|
|
65
|
+
function H() {
|
|
66
|
+
return { [B]: "" };
|
|
39
67
|
}
|
|
40
|
-
function
|
|
68
|
+
function F(r) {
|
|
41
69
|
return r != null && r !== "self";
|
|
42
70
|
}
|
|
43
|
-
function
|
|
71
|
+
function j(r, e) {
|
|
44
72
|
if (r === "transparent")
|
|
45
73
|
return { color: "transparent", variant: "default" };
|
|
46
|
-
const
|
|
74
|
+
const a = r ?? "neutral";
|
|
47
75
|
return {
|
|
48
|
-
color:
|
|
49
|
-
variant:
|
|
76
|
+
color: a,
|
|
77
|
+
variant: a === "brand" ? "primary" : e ?? "default"
|
|
50
78
|
};
|
|
51
79
|
}
|
|
52
|
-
function
|
|
80
|
+
function k(r, e) {
|
|
53
81
|
return {
|
|
54
82
|
default: { color: r, variant: e },
|
|
55
83
|
hover: { color: r, variant: e, forced: "hover" },
|
|
56
84
|
pressed: { color: r, variant: e, forced: "pressed" }
|
|
57
85
|
};
|
|
58
86
|
}
|
|
59
|
-
function m(r, e,
|
|
60
|
-
const { color:
|
|
61
|
-
return
|
|
87
|
+
function m(r, e, a) {
|
|
88
|
+
const { color: t, variant: n } = j(e, a), l = k(t, n);
|
|
89
|
+
return I(l, r);
|
|
62
90
|
}
|
|
63
|
-
function
|
|
91
|
+
function D(r, e) {
|
|
64
92
|
return e || r !== void 0;
|
|
65
93
|
}
|
|
66
|
-
const
|
|
94
|
+
const R = "transition-colors duration-300 ease will-change-colors", u = A(R, {
|
|
67
95
|
variants: {
|
|
68
96
|
color: {
|
|
69
97
|
neutral: "",
|
|
@@ -232,77 +260,77 @@ function i(r) {
|
|
|
232
260
|
if (r.color === "transparent")
|
|
233
261
|
return "transparent";
|
|
234
262
|
if (r.forced) {
|
|
235
|
-
const
|
|
263
|
+
const t = u({
|
|
236
264
|
color: r.color,
|
|
237
265
|
variant: r.color === "brand" ? "primary" : r.variant,
|
|
238
266
|
forced: r.forced,
|
|
239
267
|
disabled: !1
|
|
240
|
-
}),
|
|
268
|
+
}), n = u({
|
|
241
269
|
color: r.color,
|
|
242
270
|
variant: r.color === "brand" ? "primary" : r.variant,
|
|
243
271
|
forced: void 0,
|
|
244
272
|
disabled: !1
|
|
245
273
|
}), l = new Set(
|
|
246
|
-
|
|
274
|
+
n.split(" ").filter((o) => o.startsWith("bg-") && !o.includes(":"))
|
|
247
275
|
);
|
|
248
|
-
return `var(--${
|
|
276
|
+
return `var(--${t.split(" ").filter((o) => o.startsWith("bg-") && !o.includes(":") && !l.has(o))[0] ?? t.split(" ").filter((o) => o.startsWith("bg-") && !o.includes(":")).pop() ?? "bg-neutral-default-default"})`;
|
|
249
277
|
}
|
|
250
|
-
return `var(--${
|
|
278
|
+
return `var(--${u({
|
|
251
279
|
color: r.color,
|
|
252
280
|
variant: r.color === "brand" ? "primary" : r.variant,
|
|
253
281
|
forced: void 0,
|
|
254
282
|
disabled: !1
|
|
255
|
-
}).split(" ").find((
|
|
283
|
+
}).split(" ").find((t) => t.startsWith("bg-") && !t.includes(":")) ?? "bg-neutral-default-default"})`;
|
|
256
284
|
}
|
|
257
285
|
function C(r) {
|
|
258
|
-
const e =
|
|
286
|
+
const e = c(r) ? r.default : r, a = c(r) ? r.selected : void 0, t = {
|
|
259
287
|
"--cell-bg": i(e.default),
|
|
260
288
|
"--cell-bg-hover": i(e.hover),
|
|
261
289
|
"--cell-bg-pressed": i(e.pressed)
|
|
262
290
|
};
|
|
263
|
-
return
|
|
291
|
+
return a && (t["--cell-bg-selected"] = i(a.default), t["--cell-bg-sel-hover"] = i(a.hover), t["--cell-bg-sel-pressed"] = i(a.pressed)), t;
|
|
264
292
|
}
|
|
265
|
-
const
|
|
293
|
+
const L = (r) => {
|
|
266
294
|
const e = {
|
|
267
295
|
color: "neutral",
|
|
268
296
|
variant: "default",
|
|
269
297
|
forced: void 0,
|
|
270
298
|
disabled: !1
|
|
271
299
|
}, {
|
|
272
|
-
color:
|
|
273
|
-
variant:
|
|
274
|
-
forced:
|
|
300
|
+
color: a,
|
|
301
|
+
variant: t,
|
|
302
|
+
forced: n,
|
|
275
303
|
className: l,
|
|
276
304
|
disabled: d,
|
|
277
305
|
children: s,
|
|
278
|
-
interactionConfig:
|
|
306
|
+
interactionConfig: o,
|
|
279
307
|
interactionSource: b,
|
|
280
308
|
...g
|
|
281
309
|
} = { ...e, ...r };
|
|
282
|
-
if (
|
|
283
|
-
const
|
|
284
|
-
return /* @__PURE__ */ y.jsx("div", { className: h(
|
|
310
|
+
if (D(n, d)) {
|
|
311
|
+
const V = u({ color: a, variant: t, forced: n, disabled: d }), N = m(o, a, t), O = C(N);
|
|
312
|
+
return /* @__PURE__ */ y.jsx("div", { className: h(V, l), "data-disabled": d, style: O, ...g, children: s && typeof s == "function" ? s() : s });
|
|
285
313
|
}
|
|
286
|
-
const
|
|
314
|
+
const S = m(o, a, t), T = C(S), p = F(b);
|
|
287
315
|
return /* @__PURE__ */ y.jsx(
|
|
288
316
|
"div",
|
|
289
317
|
{
|
|
290
318
|
"data-cell-interactive": "",
|
|
291
319
|
"data-interaction-grouped": p ? "" : void 0,
|
|
292
320
|
"data-interaction-source": p ? b : void 0,
|
|
293
|
-
className: h(
|
|
321
|
+
className: h(R, l),
|
|
294
322
|
"data-disabled": d,
|
|
295
|
-
style:
|
|
323
|
+
style: T,
|
|
296
324
|
...g,
|
|
297
325
|
children: s && typeof s == "function" ? s() : s
|
|
298
326
|
}
|
|
299
327
|
);
|
|
300
|
-
},
|
|
301
|
-
|
|
328
|
+
}, W = w(L);
|
|
329
|
+
W.displayName = "CardBackground";
|
|
302
330
|
export {
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
331
|
+
W as C,
|
|
332
|
+
z as I,
|
|
333
|
+
q as a,
|
|
334
|
+
B as b,
|
|
335
|
+
H as i
|
|
308
336
|
};
|
package/dist/Chat.es.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { M as f } from "./ChatCard-
|
|
1
|
+
import { M as f } from "./ChatCard-21E5rAa1.js";
|
|
2
2
|
import { j as n } from "./jsx-runtime-CqQglQKg.js";
|
|
3
3
|
import { memo as d, forwardRef as l, useMemo as m } from "react";
|
|
4
4
|
import { c as i } from "./cn-B6yFEsav.js";
|
|
5
|
-
import { C as c } from "./CardBackground-
|
|
5
|
+
import { C as c } from "./CardBackground-B5gNTzXW.js";
|
|
6
6
|
const p = l(
|
|
7
7
|
function({ cardBackground: s, children: a, className: r, ...t }, o) {
|
|
8
8
|
return /* @__PURE__ */ n.jsxs("div", { className: i("relative w-full", r), ref: o, ...t, children: [
|
|
@@ -4,7 +4,7 @@ import { c as l } from "./cn-B6yFEsav.js";
|
|
|
4
4
|
import { c as m } from "./index-BOQuZ0gG.js";
|
|
5
5
|
import { AvatarAndSubavatar as b } from "./Avatar.es.js";
|
|
6
6
|
import S from "./Link.es.js";
|
|
7
|
-
import { C as D } from "./CardBackground-
|
|
7
|
+
import { C as D } from "./CardBackground-B5gNTzXW.js";
|
|
8
8
|
function k(t) {
|
|
9
9
|
if (!t) return;
|
|
10
10
|
if (typeof t == "string") return t;
|
package/dist/ChatCard.es.js
CHANGED
package/dist/Dialog.es.js
CHANGED
|
@@ -3,7 +3,7 @@ import { useContext as Z, createContext as $, forwardRef as ee, memo as F, useRe
|
|
|
3
3
|
import { createPortal as te } from "react-dom";
|
|
4
4
|
import { c as N } from "./cn-B6yFEsav.js";
|
|
5
5
|
import { M as re } from "./MenuFloating-n1T-XNaa.js";
|
|
6
|
-
import { C as oe } from "./CardBackground-
|
|
6
|
+
import { C as oe } from "./CardBackground-B5gNTzXW.js";
|
|
7
7
|
import se from "./IconButton.es.js";
|
|
8
8
|
import { Close as le } from "./Icon-Close.es.js";
|
|
9
9
|
const L = $(null);
|