prometeo-design-system 9.1.3 → 9.2.0
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 +5 -5
- package/dist/Card.es.js +90 -67
- package/dist/CardBackground-Dey2CbfR.js +308 -0
- package/dist/CardBackground.es.js +5 -278
- package/dist/Chat.es.js +9 -9
- package/dist/{ChatCard-Di1YwDBF.js → ChatCard-BsR1OLNp.js} +1 -1
- package/dist/ChatCard.es.js +1 -1
- package/dist/Dialog.es.js +1 -1
- package/dist/Input.es.js +1 -1
- package/dist/Menu.es.js +1 -1
- package/dist/NavigationRail.es.js +1 -1
- package/dist/NotificationCard.es.js +13 -13
- package/dist/Popover.es.js +1 -1
- package/dist/Table.es.js +109 -106
- package/dist/TextArea.es.js +8 -8
- package/dist/components/CardBackground/CardBackground.d.ts +3 -15
- package/dist/components/CardBackground/interactionConfig.d.ts +40 -0
- package/dist/components/Table/index.d.ts +1 -1
- package/dist/components/Table/types.d.ts +1 -1
- package/dist/exports/CardBackground.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/prometeo-design-system.es.js +2 -2
- package/package.json +1 -1
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 _ from "./CardBackground.
|
|
5
|
+
import { C as _ } from "./CardBackground-Dey2CbfR.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";
|
|
@@ -87,13 +87,13 @@ const W = i(
|
|
|
87
87
|
acceptedFormats: d,
|
|
88
88
|
status: u,
|
|
89
89
|
supportingText: f,
|
|
90
|
-
showSupportingText:
|
|
90
|
+
showSupportingText: C,
|
|
91
91
|
disabled: a = !1,
|
|
92
92
|
accept: m,
|
|
93
93
|
maxFiles: h = 1,
|
|
94
94
|
maxSize: v,
|
|
95
95
|
cardBackground: b,
|
|
96
|
-
...
|
|
96
|
+
...z
|
|
97
97
|
}, M) => {
|
|
98
98
|
const D = G(
|
|
99
99
|
(j, y) => {
|
|
@@ -112,7 +112,7 @@ const W = i(
|
|
|
112
112
|
maxFiles: h,
|
|
113
113
|
disabled: a,
|
|
114
114
|
maxSize: v,
|
|
115
|
-
...
|
|
115
|
+
...z
|
|
116
116
|
}), p = g.length > 0, l = p ? "error" : u ?? "default", x = ee(k, A), R = L(l, x, a), S = J[R], I = p ? F([...g], h) : typeof f == "function" ? f() : f, T = d ?? N(m ?? {}), B = N(m ?? {});
|
|
117
117
|
return /* @__PURE__ */ t.jsxs("div", { className: o("w-full flex flex-col gap-1 h-[136px]", n), children: [
|
|
118
118
|
c && /* @__PURE__ */ t.jsx(
|
|
@@ -208,7 +208,7 @@ const W = i(
|
|
|
208
208
|
]
|
|
209
209
|
}
|
|
210
210
|
),
|
|
211
|
-
|
|
211
|
+
C && /* @__PURE__ */ t.jsx(K, { variant: l, disabled: a, className: o(l === "default" && !a && "[&>p]:text-neutral-tertiary-default! [&>svg]:icon-neutral-tertiary-default!"), children: I })
|
|
212
212
|
] });
|
|
213
213
|
}
|
|
214
214
|
);
|
package/dist/Card.es.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { useContext as z, createContext as
|
|
1
|
+
import { j as n } from "./jsx-runtime-CqQglQKg.js";
|
|
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
|
-
import { c
|
|
5
|
-
import V from "./CardBackground.
|
|
6
|
-
const
|
|
4
|
+
import { c } from "./index-BOQuZ0gG.js";
|
|
5
|
+
import { C as V, i as E } from "./CardBackground-Dey2CbfR.js";
|
|
6
|
+
const f = b(null);
|
|
7
7
|
function m() {
|
|
8
|
-
const
|
|
9
|
-
if (!
|
|
8
|
+
const r = z(f);
|
|
9
|
+
if (!r)
|
|
10
10
|
throw new Error(
|
|
11
11
|
"Card compound components (Card.Header, Card.Content, Card.Footer) must be used inside <Card>"
|
|
12
12
|
);
|
|
13
|
-
return
|
|
13
|
+
return r;
|
|
14
14
|
}
|
|
15
|
-
const
|
|
16
|
-
"relative overflow-hidden dropshadow-100 radius-medium border border-neutral-default-default p-3 shrink-0
|
|
15
|
+
const R = c(
|
|
16
|
+
"relative overflow-hidden dropshadow-100 radius-medium border border-neutral-default-default p-3 shrink-0",
|
|
17
17
|
{
|
|
18
18
|
variants: {
|
|
19
19
|
orientation: {
|
|
@@ -25,50 +25,73 @@ const k = d(
|
|
|
25
25
|
orientation: "vertical"
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
|
-
),
|
|
28
|
+
), P = c("shrink-0 z-10", {
|
|
29
29
|
variants: {
|
|
30
30
|
orientation: {
|
|
31
31
|
vertical: "",
|
|
32
32
|
horizontal: ""
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
-
}),
|
|
35
|
+
}), S = c("shrink-0 z-10", {
|
|
36
36
|
variants: {
|
|
37
37
|
orientation: {
|
|
38
38
|
vertical: "",
|
|
39
39
|
horizontal: ""
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
-
}),
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
42
|
+
}), g = c("flex-1 min-h-0 min-w-0 z-10"), O = "card";
|
|
43
|
+
function C(r, o) {
|
|
44
|
+
return {
|
|
45
|
+
color: "neutral",
|
|
46
|
+
variant: "default",
|
|
47
|
+
...r,
|
|
48
|
+
...o
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
function _(r) {
|
|
52
|
+
const o = r?.interactionSource, e = o != null && o !== "self", t = !r?.disabled && r?.forced === void 0 && (e || r?.interactionConfig != null && o !== "self");
|
|
53
|
+
return r?.disabled || r?.forced !== void 0 ? { grouped: !1, props: C(r, {}) } : t ? {
|
|
54
|
+
grouped: !0,
|
|
55
|
+
props: C(r, {
|
|
56
|
+
interactionSource: e ? o : O
|
|
57
|
+
})
|
|
58
|
+
} : {
|
|
59
|
+
grouped: !1,
|
|
60
|
+
props: C(r, { forced: "default" })
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
const A = F(function({
|
|
64
|
+
variant: o = "1-slot",
|
|
65
|
+
direction: e,
|
|
66
|
+
orientation: t,
|
|
67
|
+
cardBackground: a,
|
|
47
68
|
children: h,
|
|
48
|
-
className:
|
|
49
|
-
...
|
|
50
|
-
},
|
|
51
|
-
const
|
|
52
|
-
() => ({ orientation:
|
|
53
|
-
[
|
|
54
|
-
);
|
|
55
|
-
return /* @__PURE__ */
|
|
69
|
+
className: N,
|
|
70
|
+
...j
|
|
71
|
+
}, w) {
|
|
72
|
+
const u = t ?? e ?? "vertical", y = H(
|
|
73
|
+
() => ({ orientation: u, variant: o }),
|
|
74
|
+
[u, o]
|
|
75
|
+
), s = _(a);
|
|
76
|
+
return /* @__PURE__ */ n.jsx(f.Provider, { value: y, children: /* @__PURE__ */ n.jsxs(
|
|
56
77
|
"div",
|
|
57
78
|
{
|
|
58
|
-
ref:
|
|
79
|
+
ref: w,
|
|
59
80
|
className: i(
|
|
60
|
-
|
|
61
|
-
|
|
81
|
+
R({ orientation: u }),
|
|
82
|
+
N
|
|
62
83
|
),
|
|
63
|
-
...
|
|
84
|
+
...j,
|
|
85
|
+
...s.grouped ? E() : {},
|
|
64
86
|
children: [
|
|
65
|
-
/* @__PURE__ */
|
|
87
|
+
/* @__PURE__ */ n.jsx(
|
|
66
88
|
V,
|
|
67
89
|
{
|
|
68
|
-
...
|
|
90
|
+
...s.props,
|
|
69
91
|
className: i(
|
|
70
92
|
"inset-0 absolute z-0",
|
|
71
|
-
|
|
93
|
+
s.grouped && "pointer-events-none",
|
|
94
|
+
s.props.className
|
|
72
95
|
)
|
|
73
96
|
}
|
|
74
97
|
),
|
|
@@ -76,55 +99,55 @@ const k = d(
|
|
|
76
99
|
]
|
|
77
100
|
}
|
|
78
101
|
) });
|
|
79
|
-
}),
|
|
80
|
-
children:
|
|
81
|
-
className:
|
|
82
|
-
...
|
|
102
|
+
}), p = d(function({
|
|
103
|
+
children: o,
|
|
104
|
+
className: e,
|
|
105
|
+
...t
|
|
83
106
|
}) {
|
|
84
|
-
const { orientation:
|
|
85
|
-
return /* @__PURE__ */
|
|
107
|
+
const { orientation: a } = m();
|
|
108
|
+
return /* @__PURE__ */ n.jsx(
|
|
86
109
|
"div",
|
|
87
110
|
{
|
|
88
|
-
className: i(
|
|
89
|
-
...
|
|
90
|
-
children:
|
|
111
|
+
className: i(P({ orientation: a }), e),
|
|
112
|
+
...t,
|
|
113
|
+
children: o
|
|
91
114
|
}
|
|
92
115
|
);
|
|
93
|
-
}),
|
|
94
|
-
children:
|
|
95
|
-
className:
|
|
96
|
-
...
|
|
116
|
+
}), v = d(function({
|
|
117
|
+
children: o,
|
|
118
|
+
className: e,
|
|
119
|
+
...t
|
|
97
120
|
}) {
|
|
98
|
-
return /* @__PURE__ */
|
|
99
|
-
}), x =
|
|
100
|
-
children:
|
|
101
|
-
className:
|
|
102
|
-
...
|
|
121
|
+
return /* @__PURE__ */ n.jsx("div", { className: i(g(), e), ...t, children: o });
|
|
122
|
+
}), x = d(function({
|
|
123
|
+
children: o,
|
|
124
|
+
className: e,
|
|
125
|
+
...t
|
|
103
126
|
}) {
|
|
104
|
-
const { orientation:
|
|
105
|
-
return /* @__PURE__ */
|
|
127
|
+
const { orientation: a } = m();
|
|
128
|
+
return /* @__PURE__ */ n.jsx(
|
|
106
129
|
"div",
|
|
107
130
|
{
|
|
108
|
-
className: i(
|
|
109
|
-
...
|
|
110
|
-
children:
|
|
131
|
+
className: i(S({ orientation: a }), e),
|
|
132
|
+
...t,
|
|
133
|
+
children: o
|
|
111
134
|
}
|
|
112
135
|
);
|
|
113
136
|
});
|
|
114
|
-
function
|
|
115
|
-
return
|
|
137
|
+
function I(r, o) {
|
|
138
|
+
return r.variant === o.variant && r.direction === o.direction && r.orientation === o.orientation && r.className === o.className && r.children === o.children && r.cardBackground === o.cardBackground;
|
|
116
139
|
}
|
|
117
|
-
const
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
140
|
+
const l = d(A, I);
|
|
141
|
+
l.Header = p;
|
|
142
|
+
l.Content = v;
|
|
143
|
+
l.Footer = x;
|
|
144
|
+
l.displayName = "Card";
|
|
145
|
+
p.displayName = "Card.Header";
|
|
146
|
+
v.displayName = "Card.Content";
|
|
124
147
|
x.displayName = "Card.Footer";
|
|
125
148
|
export {
|
|
126
|
-
|
|
127
|
-
|
|
149
|
+
l as Card,
|
|
150
|
+
v as CardContent,
|
|
128
151
|
x as CardFooter,
|
|
129
|
-
|
|
152
|
+
p as CardHeader
|
|
130
153
|
};
|
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
import { j as y } from "./jsx-runtime-CqQglQKg.js";
|
|
2
|
+
import { memo as O } from "react";
|
|
3
|
+
import { c as w } from "./index-BOQuZ0gG.js";
|
|
4
|
+
import { c as h } from "./cn-B6yFEsav.js";
|
|
5
|
+
function v(r) {
|
|
6
|
+
return !("color" in r.default);
|
|
7
|
+
}
|
|
8
|
+
function A(r) {
|
|
9
|
+
if ("selected" in r) return !0;
|
|
10
|
+
const e = r.default;
|
|
11
|
+
return e == null ? !1 : !("color" in e);
|
|
12
|
+
}
|
|
13
|
+
function u(r, e) {
|
|
14
|
+
return e ? { ...r, ...e } : r;
|
|
15
|
+
}
|
|
16
|
+
function f(r, e) {
|
|
17
|
+
return e ? {
|
|
18
|
+
default: u(r.default, e.default),
|
|
19
|
+
hover: u(r.hover, e.hover),
|
|
20
|
+
pressed: u(r.pressed, e.pressed)
|
|
21
|
+
} : r;
|
|
22
|
+
}
|
|
23
|
+
function E(r, e) {
|
|
24
|
+
if (!e) return r;
|
|
25
|
+
const t = v(r), a = t ? r.default : r, o = t ? r.selected : void 0;
|
|
26
|
+
if (!A(e)) {
|
|
27
|
+
const d = f(a, e);
|
|
28
|
+
return o ? { default: d, selected: o } : d;
|
|
29
|
+
}
|
|
30
|
+
const l = f(a, e.default);
|
|
31
|
+
return !e.selected && !o ? { default: l } : {
|
|
32
|
+
default: l,
|
|
33
|
+
selected: f(o ?? l, e.selected)
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
const _ = "data-interaction-group", U = "data-interaction-exclude";
|
|
37
|
+
function $() {
|
|
38
|
+
return { [_]: "" };
|
|
39
|
+
}
|
|
40
|
+
function x(r) {
|
|
41
|
+
return r != null && r !== "self";
|
|
42
|
+
}
|
|
43
|
+
function P(r, e) {
|
|
44
|
+
if (r === "transparent")
|
|
45
|
+
return { color: "transparent", variant: "default" };
|
|
46
|
+
const t = r ?? "neutral";
|
|
47
|
+
return {
|
|
48
|
+
color: t,
|
|
49
|
+
variant: t === "brand" ? "primary" : e ?? "default"
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
function j(r, e) {
|
|
53
|
+
return {
|
|
54
|
+
default: { color: r, variant: e },
|
|
55
|
+
hover: { color: r, variant: e, forced: "hover" },
|
|
56
|
+
pressed: { color: r, variant: e, forced: "pressed" }
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
function m(r, e, t) {
|
|
60
|
+
const { color: a, variant: o } = P(e, t), l = j(a, o);
|
|
61
|
+
return E(l, r);
|
|
62
|
+
}
|
|
63
|
+
function B(r, e) {
|
|
64
|
+
return e || r !== void 0;
|
|
65
|
+
}
|
|
66
|
+
const I = "transition-colors duration-300 ease will-change-colors", c = w(I, {
|
|
67
|
+
variants: {
|
|
68
|
+
color: {
|
|
69
|
+
neutral: "",
|
|
70
|
+
brand: "",
|
|
71
|
+
transparent: ""
|
|
72
|
+
},
|
|
73
|
+
variant: {
|
|
74
|
+
default: "",
|
|
75
|
+
primary: "",
|
|
76
|
+
secondary: "",
|
|
77
|
+
tertiary: ""
|
|
78
|
+
},
|
|
79
|
+
disabled: {
|
|
80
|
+
true: "bg-disabled-default",
|
|
81
|
+
false: ""
|
|
82
|
+
},
|
|
83
|
+
forced: {
|
|
84
|
+
undefined: "",
|
|
85
|
+
default: "",
|
|
86
|
+
hover: "",
|
|
87
|
+
pressed: ""
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
defaultVariants: {
|
|
91
|
+
color: "neutral",
|
|
92
|
+
variant: "default"
|
|
93
|
+
},
|
|
94
|
+
compoundVariants: [
|
|
95
|
+
{
|
|
96
|
+
color: "neutral",
|
|
97
|
+
variant: "default",
|
|
98
|
+
class: "bg-neutral-default-default hover:bg-neutral-default-hover active:bg-neutral-default-pressed",
|
|
99
|
+
disabled: [!1],
|
|
100
|
+
forced: void 0
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
color: "neutral",
|
|
104
|
+
variant: "primary",
|
|
105
|
+
class: "bg-neutral-primary-default hover:bg-neutral-primary-hover active:bg-neutral-primary-pressed",
|
|
106
|
+
disabled: [!1]
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
color: "neutral",
|
|
110
|
+
variant: "secondary",
|
|
111
|
+
class: "bg-neutral-secondary-default hover:bg-neutral-secondary-hover active:bg-neutral-secondary-pressed",
|
|
112
|
+
disabled: [!1]
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
color: "neutral",
|
|
116
|
+
variant: "tertiary",
|
|
117
|
+
class: "bg-neutral-tertiary-default hover:bg-neutral-tertiary-hover active:bg-neutral-tertiary-pressed",
|
|
118
|
+
disabled: [!1]
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
color: "brand",
|
|
122
|
+
variant: "primary",
|
|
123
|
+
class: "bg-brand-overlay-default hover:bg-brand-overlay-hover active:bg-brand-overlay-pressed",
|
|
124
|
+
disabled: [!1]
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
color: "transparent",
|
|
128
|
+
variant: "default",
|
|
129
|
+
class: "bg-transparent hover:bg-transparent active:bg-transparent",
|
|
130
|
+
disabled: [!1]
|
|
131
|
+
},
|
|
132
|
+
// Forced variants
|
|
133
|
+
{
|
|
134
|
+
color: "neutral",
|
|
135
|
+
variant: "default",
|
|
136
|
+
forced: "default",
|
|
137
|
+
class: "bg-neutral-default-default hover:bg-neutral-default-default active:bg-neutral-default-default"
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
color: "neutral",
|
|
141
|
+
variant: "default",
|
|
142
|
+
forced: "hover",
|
|
143
|
+
class: "bg-neutral-default-hover hover:bg-neutral-default-hover active:bg-neutral-default-hover"
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
color: "neutral",
|
|
147
|
+
variant: "default",
|
|
148
|
+
forced: "pressed",
|
|
149
|
+
class: "bg-neutral-default-pressed hover:bg-neutral-default-pressed active:bg-neutral-default-pressed"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
color: "neutral",
|
|
153
|
+
variant: "primary",
|
|
154
|
+
forced: "default",
|
|
155
|
+
class: "bg-neutral-primary-default hover:bg-neutral-primary-default active:bg-neutral-primary-default"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
color: "neutral",
|
|
159
|
+
variant: "primary",
|
|
160
|
+
forced: "hover",
|
|
161
|
+
class: "bg-neutral-primary-hover hover:bg-neutral-primary-hover active:bg-neutral-primary-hover"
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
color: "neutral",
|
|
165
|
+
variant: "primary",
|
|
166
|
+
forced: "pressed",
|
|
167
|
+
class: "bg-neutral-primary-pressed hover:bg-neutral-primary-pressed active:bg-neutral-primary-pressed"
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
color: "neutral",
|
|
171
|
+
variant: "secondary",
|
|
172
|
+
forced: "default",
|
|
173
|
+
class: "bg-neutral-secondary-default hover:bg-neutral-secondary-default active:bg-neutral-secondary-default"
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
color: "neutral",
|
|
177
|
+
variant: "secondary",
|
|
178
|
+
forced: "hover",
|
|
179
|
+
class: "bg-neutral-secondary-hover hover:bg-neutral-secondary-hover active:bg-neutral-secondary-hover"
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
color: "neutral",
|
|
183
|
+
variant: "secondary",
|
|
184
|
+
forced: "pressed",
|
|
185
|
+
class: "bg-neutral-secondary-pressed hover:bg-neutral-secondary-pressed active:bg-neutral-secondary-pressed"
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
color: "neutral",
|
|
189
|
+
variant: "tertiary",
|
|
190
|
+
forced: "default",
|
|
191
|
+
class: "bg-neutral-tertiary-default hover:bg-neutral-tertiary-default active:bg-neutral-tertiary-default"
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
color: "neutral",
|
|
195
|
+
variant: "tertiary",
|
|
196
|
+
forced: "hover",
|
|
197
|
+
class: "bg-neutral-tertiary-hover hover:bg-neutral-tertiary-hover active:bg-neutral-tertiary-hover"
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
color: "neutral",
|
|
201
|
+
variant: "tertiary",
|
|
202
|
+
forced: "pressed",
|
|
203
|
+
class: "bg-neutral-tertiary-pressed hover:bg-neutral-tertiary-pressed active:bg-neutral-tertiary-pressed"
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
color: "brand",
|
|
207
|
+
variant: "primary",
|
|
208
|
+
forced: "default",
|
|
209
|
+
class: "bg-brand-overlay-default hover:bg-brand-overlay-default active:bg-brand-overlay-default"
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
color: "brand",
|
|
213
|
+
variant: "primary",
|
|
214
|
+
forced: "hover",
|
|
215
|
+
class: "bg-brand-overlay-hover hover:bg-brand-overlay-hover active:bg-brand-overlay-hover"
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
color: "brand",
|
|
219
|
+
variant: "primary",
|
|
220
|
+
forced: "pressed",
|
|
221
|
+
class: "bg-brand-overlay-pressed hover:bg-brand-overlay-pressed active:bg-brand-overlay-pressed"
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
color: "transparent",
|
|
225
|
+
variant: "default",
|
|
226
|
+
forced: ["default", "hover", "pressed"],
|
|
227
|
+
class: "bg-transparent hover:bg-transparent active:bg-transparent"
|
|
228
|
+
}
|
|
229
|
+
]
|
|
230
|
+
});
|
|
231
|
+
function i(r) {
|
|
232
|
+
if (r.color === "transparent")
|
|
233
|
+
return "transparent";
|
|
234
|
+
if (r.forced) {
|
|
235
|
+
const a = c({
|
|
236
|
+
color: r.color,
|
|
237
|
+
variant: r.color === "brand" ? "primary" : r.variant,
|
|
238
|
+
forced: r.forced,
|
|
239
|
+
disabled: !1
|
|
240
|
+
}), o = c({
|
|
241
|
+
color: r.color,
|
|
242
|
+
variant: r.color === "brand" ? "primary" : r.variant,
|
|
243
|
+
forced: void 0,
|
|
244
|
+
disabled: !1
|
|
245
|
+
}), l = new Set(
|
|
246
|
+
o.split(" ").filter((n) => n.startsWith("bg-") && !n.includes(":"))
|
|
247
|
+
);
|
|
248
|
+
return `var(--${a.split(" ").filter((n) => n.startsWith("bg-") && !n.includes(":") && !l.has(n))[0] ?? a.split(" ").filter((n) => n.startsWith("bg-") && !n.includes(":")).pop() ?? "bg-neutral-default-default"})`;
|
|
249
|
+
}
|
|
250
|
+
return `var(--${c({
|
|
251
|
+
color: r.color,
|
|
252
|
+
variant: r.color === "brand" ? "primary" : r.variant,
|
|
253
|
+
forced: void 0,
|
|
254
|
+
disabled: !1
|
|
255
|
+
}).split(" ").find((a) => a.startsWith("bg-") && !a.includes(":")) ?? "bg-neutral-default-default"})`;
|
|
256
|
+
}
|
|
257
|
+
function C(r) {
|
|
258
|
+
const e = v(r) ? r.default : r, t = v(r) ? r.selected : void 0, a = {
|
|
259
|
+
"--cell-bg": i(e.default),
|
|
260
|
+
"--cell-bg-hover": i(e.hover),
|
|
261
|
+
"--cell-bg-pressed": i(e.pressed)
|
|
262
|
+
};
|
|
263
|
+
return t && (a["--cell-bg-selected"] = i(t.default), a["--cell-bg-sel-hover"] = i(t.hover), a["--cell-bg-sel-pressed"] = i(t.pressed)), a;
|
|
264
|
+
}
|
|
265
|
+
const D = (r) => {
|
|
266
|
+
const e = {
|
|
267
|
+
color: "neutral",
|
|
268
|
+
variant: "default",
|
|
269
|
+
forced: void 0,
|
|
270
|
+
disabled: !1
|
|
271
|
+
}, {
|
|
272
|
+
color: t,
|
|
273
|
+
variant: a,
|
|
274
|
+
forced: o,
|
|
275
|
+
className: l,
|
|
276
|
+
disabled: d,
|
|
277
|
+
children: s,
|
|
278
|
+
interactionConfig: n,
|
|
279
|
+
interactionSource: b,
|
|
280
|
+
...g
|
|
281
|
+
} = { ...e, ...r };
|
|
282
|
+
if (B(o, d)) {
|
|
283
|
+
const T = c({ color: t, variant: a, forced: o, disabled: d }), N = m(n, t, a), V = C(N);
|
|
284
|
+
return /* @__PURE__ */ y.jsx("div", { className: h(T, l), "data-disabled": d, style: V, ...g, children: s && typeof s == "function" ? s() : s });
|
|
285
|
+
}
|
|
286
|
+
const R = m(n, t, a), S = C(R), p = x(b);
|
|
287
|
+
return /* @__PURE__ */ y.jsx(
|
|
288
|
+
"div",
|
|
289
|
+
{
|
|
290
|
+
"data-cell-interactive": "",
|
|
291
|
+
"data-interaction-grouped": p ? "" : void 0,
|
|
292
|
+
"data-interaction-source": p ? b : void 0,
|
|
293
|
+
className: h(I, l),
|
|
294
|
+
"data-disabled": d,
|
|
295
|
+
style: S,
|
|
296
|
+
...g,
|
|
297
|
+
children: s && typeof s == "function" ? s() : s
|
|
298
|
+
}
|
|
299
|
+
);
|
|
300
|
+
}, F = O(D);
|
|
301
|
+
F.displayName = "CardBackground";
|
|
302
|
+
export {
|
|
303
|
+
F as C,
|
|
304
|
+
U as I,
|
|
305
|
+
_ as a,
|
|
306
|
+
$ as i,
|
|
307
|
+
E as m
|
|
308
|
+
};
|