@stackone/malachite 2.49.1 → 2.50.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/COMPONENTS.md +1 -1
- package/dist/components/CardStrip.js +3 -3
- package/dist/components/CardStrip.js.map +1 -1
- package/dist/components/Dropdown.js +351 -345
- package/dist/components/Dropdown.js.map +1 -1
- package/dist/components/SelectableCard.js +273 -206
- package/dist/components/SelectableCard.js.map +1 -1
- package/dist/components/escapeLayers.js +2 -1
- package/dist/components/escapeLayers.js.map +1 -1
- package/dist/index.d.ts +10 -0
- package/dist/tailwind.css.js +1 -1
- package/package.json +1 -1
|
@@ -1,374 +1,441 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useRef as
|
|
3
|
-
import { Button as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
import { jsxs as n, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as we, useId as ke, useState as Pe, useEffect as Fe } from "react";
|
|
3
|
+
import { Button as Be } from "./Button.js";
|
|
4
|
+
import Ye from "./CustomIcons/CheckIcon.js";
|
|
5
|
+
import ze from "./CustomIcons/CopyIcon.js";
|
|
6
|
+
import Ue from "./CustomIcons/DismissIcon.js";
|
|
7
|
+
import Ge from "./CustomIcons/ExternalLinkIcon.js";
|
|
8
|
+
import We from "./CustomIcons/GlobeIcon.js";
|
|
9
|
+
import He from "./CustomIcons/PinIcon.js";
|
|
10
|
+
import { Tag as Xe } from "./Tag.js";
|
|
11
|
+
import _e from "./Tooltip.js";
|
|
12
|
+
import re from "./TruncatedTooltip.js";
|
|
13
|
+
import h from "./Typography/Text.js";
|
|
14
|
+
import { useCardStripSlot as je } from "./cardStripSlot.js";
|
|
15
|
+
import { FOCUS_RING as Ee, FOCUS_RING_WITHIN_RADIO as Me } from "./focusRing.js";
|
|
16
|
+
import { useAdoptedStyleSheet as Ke } from "./useAdoptedStyleSheet.js";
|
|
17
|
+
const G = 240, se = `${G}px`, oe = "116px", ie = "var(--malachite-radius-xxl, 14px)", k = `${ie} ${ie} 0 0`, E = "var(--malachite-selectable-card-muted-foreground, #7b7b7b)", Ze = "var(--malachite-text-secondary, #7b7b7b)", xe = "var(--malachite-selectable-card-accent, #047b43)", Ve = "var(--malachite-selectable-card-selected-tint, #e7f8f1)", qe = "var(--malachite-selectable-card-selected-border, #047b43)", ce = 0.7, Je = "var(--malachite-selectable-card-library-selected-tint, #f1f1f1)", Qe = "var(--malachite-selectable-card-library-selected-border, #bbbbbb)", ge = "var(--malachite-selectable-card-pending-foreground, #96580a)", ve = "var(--malachite-selectable-card-editing-tint, #f9f2e9)", de = "var(--malachite-selectable-card-selected-surface-end, #ffffff)", et = "var(--malachite-selectable-card-background, #f1f1f1)", tt = "1px solid var(--malachite-selectable-card-border, #dddddd)", at = "var(--malachite-selectable-card-hover-background, #e8e8e8)", lt = 14, s = lt, x = 2, Ie = 116, nt = 14, Se = 2, Vt = s - x / 2, $ = G + s * 2, y = Ie + Se + x, rt = (t) => {
|
|
18
|
+
const a = x / 2, l = s + a, o = s + G - a, i = a, r = nt - a;
|
|
16
19
|
return [
|
|
17
|
-
`M${l -
|
|
18
|
-
`A${
|
|
19
|
-
`L${l} ${i +
|
|
20
|
-
`A${
|
|
21
|
-
`L${
|
|
22
|
-
`A${
|
|
23
|
-
`L${
|
|
24
|
-
`A${
|
|
20
|
+
`M${l - s} ${t}`,
|
|
21
|
+
`A${s} ${s} 0 0 0 ${l} ${t - s}`,
|
|
22
|
+
`L${l} ${i + r}`,
|
|
23
|
+
`A${r} ${r} 0 0 1 ${l + r} ${i}`,
|
|
24
|
+
`L${o - r} ${i}`,
|
|
25
|
+
`A${r} ${r} 0 0 1 ${o} ${i + r}`,
|
|
26
|
+
`L${o} ${t - s}`,
|
|
27
|
+
`A${s} ${s} 0 0 0 ${o + s} ${t}`
|
|
25
28
|
].join(" ");
|
|
26
|
-
},
|
|
27
|
-
"background-color":
|
|
29
|
+
}, U = rt(Ie + Se / 2), pe = `${U} Z`, A = "malachite-selectable-card-outline", c = "malachite-selectable-card", st = "malachite-selectable-card-style", u = "--malachite-selectable-card-state-outline", _ = "--malachite-selectable-card-state-tint", P = {
|
|
30
|
+
"background-color": at,
|
|
28
31
|
"border-left-color": "transparent"
|
|
29
|
-
},
|
|
30
|
-
"background-color":
|
|
31
|
-
},
|
|
32
|
+
}, F = {
|
|
33
|
+
"background-color": et
|
|
34
|
+
}, B = {
|
|
32
35
|
profile: {
|
|
33
|
-
resting:
|
|
36
|
+
resting: F,
|
|
34
37
|
hover: P,
|
|
35
38
|
selected: {
|
|
36
|
-
[
|
|
37
|
-
[
|
|
39
|
+
[u]: qe,
|
|
40
|
+
[_]: Ve
|
|
38
41
|
}
|
|
39
42
|
},
|
|
40
43
|
library: {
|
|
41
|
-
resting:
|
|
44
|
+
resting: F,
|
|
42
45
|
hover: P,
|
|
43
46
|
selected: {
|
|
44
|
-
[
|
|
45
|
-
[
|
|
47
|
+
[u]: Qe,
|
|
48
|
+
[_]: Je
|
|
46
49
|
}
|
|
47
50
|
},
|
|
48
51
|
editing: {
|
|
49
|
-
resting:
|
|
52
|
+
resting: F,
|
|
50
53
|
hover: P,
|
|
51
54
|
selected: {
|
|
52
|
-
[
|
|
53
|
-
[
|
|
55
|
+
[u]: ge,
|
|
56
|
+
[_]: ve
|
|
54
57
|
}
|
|
55
58
|
}
|
|
56
|
-
},
|
|
59
|
+
}, N = { color: Ze }, ot = {
|
|
57
60
|
profile: {
|
|
58
|
-
resting:
|
|
59
|
-
selected: { color:
|
|
61
|
+
resting: N,
|
|
62
|
+
selected: { color: xe, opacity: ce }
|
|
60
63
|
},
|
|
61
|
-
library: { resting:
|
|
64
|
+
library: { resting: N, selected: N },
|
|
62
65
|
editing: {
|
|
63
|
-
resting:
|
|
64
|
-
selected: { color:
|
|
66
|
+
resting: N,
|
|
67
|
+
selected: { color: ge, opacity: ce }
|
|
65
68
|
}
|
|
66
|
-
},
|
|
67
|
-
.${
|
|
69
|
+
}, it = { "border-left": tt }, ct = `
|
|
70
|
+
.${c}[data-state='selected'] {
|
|
68
71
|
z-index: 5;
|
|
69
72
|
}
|
|
70
|
-
.${
|
|
73
|
+
.${c} > .${A} {
|
|
71
74
|
position: absolute;
|
|
72
|
-
left: -${
|
|
75
|
+
left: -${s}px;
|
|
73
76
|
top: 0;
|
|
74
77
|
z-index: 0;
|
|
75
78
|
overflow: visible;
|
|
76
79
|
pointer-events: none;
|
|
77
80
|
}
|
|
78
|
-
.${
|
|
81
|
+
.${c} > *:not(.${A}):not([data-selectable-card-actions]) {
|
|
79
82
|
position: relative;
|
|
80
83
|
z-index: 1;
|
|
81
84
|
}
|
|
82
|
-
.${
|
|
85
|
+
.${c} > [data-selectable-card-actions] {
|
|
83
86
|
z-index: 2;
|
|
84
|
-
}`,
|
|
85
|
-
`),
|
|
86
|
-
${
|
|
87
|
-
}`,
|
|
88
|
-
(t) => Object.keys(
|
|
89
|
-
(a) =>
|
|
87
|
+
}`, Re = (t) => Object.entries(t).map(([a, l]) => ` ${a}: ${l};`).join(`
|
|
88
|
+
`), dt = (t, a) => a === "hover" ? `.${c}[data-variant='${t}'][data-state='resting'][data-hoverable]:hover` : `.${c}[data-variant='${t}'][data-state='${a}']`, pt = (t, a, l) => `${dt(t, a)} {
|
|
89
|
+
${Re(l)}
|
|
90
|
+
}`, mt = Object.keys(B).flatMap(
|
|
91
|
+
(t) => Object.keys(B[t]).map(
|
|
92
|
+
(a) => pt(t, a, B[t][a])
|
|
90
93
|
)
|
|
91
94
|
).join(`
|
|
92
|
-
`),
|
|
93
|
-
${
|
|
94
|
-
|
|
95
|
+
`), ht = `.${c}[data-pinned='false'][data-state='resting'] {
|
|
96
|
+
${Re(
|
|
97
|
+
it
|
|
95
98
|
)}
|
|
96
|
-
}`,
|
|
97
|
-
${
|
|
98
|
-
${
|
|
99
|
+
}`, ft = `${ht}
|
|
100
|
+
${mt}
|
|
101
|
+
${ct}`, bt = {
|
|
99
102
|
display: "-webkit-box",
|
|
100
103
|
WebkitLineClamp: 2,
|
|
101
104
|
WebkitBoxOrient: "vertical",
|
|
102
105
|
overflow: "hidden",
|
|
103
|
-
color:
|
|
106
|
+
color: E,
|
|
104
107
|
lineHeight: 1.6
|
|
105
|
-
},
|
|
108
|
+
}, ut = { color: E, letterSpacing: "0.11px" }, _t = `rounded-xs text-[length:var(--malachite-font-size-xsmall,11px)] text-[var(--malachite-text-muted,rgb(76,75,75))] no-underline transition-colors hover:text-[var(--malachite-text-primary)] ${Ee}`, Et = { lineHeight: 1.6 }, xt = { marginLeft: 2, verticalAlign: "-1px" }, gt = 12, vt = `inline-flex h-4 max-w-full min-w-0 cursor-pointer items-center gap-1 self-start rounded-[5px] border-0 bg-[var(--malachite-tag-default-background,rgba(123,123,123,0.1))] px-1.5 text-[length:var(--malachite-font-size-xsmall,11px)] text-[var(--malachite-selectable-card-muted-foreground,#7b7b7b)] transition-colors hover:text-[var(--malachite-text-primary)] hover:[background-image:linear-gradient(var(--malachite-tag-default-background,rgba(123,123,123,0.1)),var(--malachite-tag-default-background,rgba(123,123,123,0.1)))] ${Ee}`, Y = 11, It = 1200, me = {
|
|
109
|
+
display: "inline-flex",
|
|
110
|
+
alignItems: "center",
|
|
111
|
+
gap: 8
|
|
112
|
+
}, St = {
|
|
113
|
+
fontFamily: "var(--malachite-font-mono, monospace)",
|
|
114
|
+
fontSize: "var(--malachite-font-size-xsmall, 11px)",
|
|
115
|
+
overflowWrap: "anywhere"
|
|
116
|
+
}, z = { flexShrink: 0 }, W = "var(--malachite-selectable-card-pending-foreground, #96580a)", Rt = { color: W }, Tt = { color: W, opacity: 0.7 }, $t = 36, yt = 38, he = {
|
|
106
117
|
color: "var(--malachite-text-primary)",
|
|
107
118
|
marginLeft: -2.25
|
|
108
|
-
},
|
|
109
|
-
color:
|
|
119
|
+
}, Nt = { transform: "translateY(-1px)" }, At = "inline-flex items-center justify-center [&_svg]:size-[10px]!", Ct = { color: E }, fe = "Default profile", Lt = 16, Te = {
|
|
120
|
+
color: xe,
|
|
110
121
|
display: "inline-flex",
|
|
111
122
|
transform: "rotate(45deg)"
|
|
112
|
-
},
|
|
113
|
-
...
|
|
123
|
+
}, Dt = {
|
|
124
|
+
...Te,
|
|
114
125
|
marginLeft: -3
|
|
115
|
-
},
|
|
126
|
+
}, be = ({ leading: t }) => /* @__PURE__ */ e(_e, { text: fe, triggerAs: "span", describesTrigger: !1, children: /* @__PURE__ */ e(
|
|
116
127
|
"span",
|
|
117
128
|
{
|
|
118
129
|
role: "img",
|
|
119
|
-
"aria-label":
|
|
120
|
-
style: t ?
|
|
121
|
-
children: /* @__PURE__ */ e(
|
|
130
|
+
"aria-label": fe,
|
|
131
|
+
style: t ? Dt : Te,
|
|
132
|
+
children: /* @__PURE__ */ e(He, { size: Lt })
|
|
122
133
|
}
|
|
123
|
-
) }),
|
|
134
|
+
) }), Ot = ({ address: t, labelId: a, tuckIntoCount: l }) => {
|
|
135
|
+
const [o, i] = Pe(null), r = o !== null;
|
|
136
|
+
Fe(() => {
|
|
137
|
+
if (o === null)
|
|
138
|
+
return;
|
|
139
|
+
const b = setTimeout(() => i(null), It);
|
|
140
|
+
return () => clearTimeout(b);
|
|
141
|
+
}, [o]);
|
|
142
|
+
const f = r ? /* @__PURE__ */ n("span", { style: me, children: [
|
|
143
|
+
/* @__PURE__ */ e(Ye, { size: Y, style: z }),
|
|
144
|
+
"Copied"
|
|
145
|
+
] }) : /* @__PURE__ */ n("span", { style: me, children: [
|
|
146
|
+
/* @__PURE__ */ e("span", { style: St, children: t.value }),
|
|
147
|
+
/* @__PURE__ */ e(ze, { size: Y, style: z })
|
|
148
|
+
] });
|
|
149
|
+
return /* @__PURE__ */ n(
|
|
150
|
+
"span",
|
|
151
|
+
{
|
|
152
|
+
className: `${l ? "-mb-[7px] " : ""}flex min-w-0 flex-col items-start *:max-w-full`,
|
|
153
|
+
children: [
|
|
154
|
+
/* @__PURE__ */ e(_e, { text: f, triggerAs: "span", describesTrigger: !1, placement: "bottom", children: /* @__PURE__ */ n(
|
|
155
|
+
"button",
|
|
156
|
+
{
|
|
157
|
+
type: "button",
|
|
158
|
+
"aria-label": `Copy ${t.value}`,
|
|
159
|
+
"data-selectable-card-address": "",
|
|
160
|
+
className: vt,
|
|
161
|
+
onClick: () => {
|
|
162
|
+
var b, d;
|
|
163
|
+
(d = (b = navigator.clipboard) == null ? void 0 : b.writeText(t.value)) == null || d.then(
|
|
164
|
+
() => i(Date.now()),
|
|
165
|
+
() => {
|
|
166
|
+
}
|
|
167
|
+
);
|
|
168
|
+
},
|
|
169
|
+
children: [
|
|
170
|
+
/* @__PURE__ */ e(We, { size: Y, style: z }),
|
|
171
|
+
/* @__PURE__ */ e("span", { id: a, className: "min-w-0 truncate", children: t.label })
|
|
172
|
+
]
|
|
173
|
+
}
|
|
174
|
+
) }),
|
|
175
|
+
/* @__PURE__ */ e("span", { role: "status", className: "sr-only", children: r ? "Copied" : "" })
|
|
176
|
+
]
|
|
177
|
+
}
|
|
178
|
+
);
|
|
179
|
+
}, ue = (t) => {
|
|
124
180
|
const a = t.filter((l) => l !== void 0);
|
|
125
181
|
return a.length > 0 ? a.join(" ") : void 0;
|
|
126
|
-
},
|
|
182
|
+
}, qt = ({
|
|
127
183
|
value: t,
|
|
128
184
|
title: a,
|
|
129
185
|
titleIcon: l,
|
|
130
|
-
isDefault:
|
|
186
|
+
isDefault: o = !1,
|
|
131
187
|
variant: i = "profile",
|
|
132
|
-
eyebrow:
|
|
133
|
-
status:
|
|
134
|
-
description:
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
188
|
+
eyebrow: r,
|
|
189
|
+
status: f,
|
|
190
|
+
description: b,
|
|
191
|
+
address: d,
|
|
192
|
+
countLabel: g,
|
|
193
|
+
link: v,
|
|
194
|
+
actions: I,
|
|
195
|
+
onDismiss: S,
|
|
196
|
+
dismissLabel: H = "Dismiss",
|
|
197
|
+
dismissDisabledReason: X,
|
|
198
|
+
selected: p = !1,
|
|
199
|
+
loading: $e = !1,
|
|
200
|
+
loadingLabel: ye = "Loading…",
|
|
201
|
+
loadingHint: j,
|
|
202
|
+
disabled: R = !1,
|
|
203
|
+
dimmed: M = !1,
|
|
204
|
+
onSelect: C,
|
|
205
|
+
tabIndex: Ne,
|
|
206
|
+
"aria-label": K,
|
|
207
|
+
className: Z = "",
|
|
208
|
+
style: V
|
|
152
209
|
}) => {
|
|
153
|
-
const { pinned:
|
|
154
|
-
|
|
155
|
-
const
|
|
156
|
-
|
|
157
|
-
|
|
210
|
+
const { pinned: Ae } = je(), Ce = !p && !R, L = we(null);
|
|
211
|
+
Ke(L, ft, st);
|
|
212
|
+
const m = `mal-selectable-card-${ke().replace(/[^a-zA-Z0-9_-]/g, "")}`, T = `${m}-outline`, q = `${m}-eyebrow`, J = `${m}-status`, D = `${m}-title`, Q = `${m}-description`, O = d ? void 0 : b, ee = `${m}-count`, te = `${m}-address`, Le = K ? void 0 : ue([r ? q : void 0, D, f ? J : void 0]), De = ue([
|
|
213
|
+
O ? Q : void 0,
|
|
214
|
+
d ? te : void 0,
|
|
215
|
+
g ? ee : void 0
|
|
158
216
|
]);
|
|
159
|
-
if (
|
|
160
|
-
return /* @__PURE__ */
|
|
217
|
+
if ($e)
|
|
218
|
+
return /* @__PURE__ */ n(
|
|
161
219
|
"div",
|
|
162
220
|
{
|
|
163
|
-
ref:
|
|
221
|
+
ref: L,
|
|
164
222
|
role: "status",
|
|
165
223
|
"aria-busy": "true",
|
|
166
224
|
"aria-live": "polite",
|
|
167
225
|
"data-variant": "editing",
|
|
168
226
|
"data-state": "selected",
|
|
169
|
-
className: `${
|
|
227
|
+
className: `${c} relative flex shrink-0 flex-col items-center gap-2 px-5 text-center ${Z}`.trim(),
|
|
170
228
|
style: {
|
|
171
|
-
width:
|
|
172
|
-
height:
|
|
173
|
-
borderRadius:
|
|
229
|
+
width: se,
|
|
230
|
+
height: oe,
|
|
231
|
+
borderRadius: k,
|
|
174
232
|
boxSizing: "border-box",
|
|
175
|
-
paddingTop: `${
|
|
176
|
-
paddingBottom: `${
|
|
233
|
+
paddingTop: `${$t}px`,
|
|
234
|
+
paddingBottom: `${yt}px`,
|
|
177
235
|
justifyContent: "center",
|
|
178
|
-
[
|
|
179
|
-
[
|
|
180
|
-
...
|
|
236
|
+
[u]: W,
|
|
237
|
+
[_]: ve,
|
|
238
|
+
...V
|
|
181
239
|
},
|
|
182
240
|
children: [
|
|
183
|
-
/* @__PURE__ */
|
|
241
|
+
/* @__PURE__ */ n(
|
|
184
242
|
"svg",
|
|
185
243
|
{
|
|
186
|
-
className:
|
|
244
|
+
className: A,
|
|
187
245
|
width: $,
|
|
188
|
-
height:
|
|
189
|
-
viewBox: `0 0 ${$} ${
|
|
246
|
+
height: y,
|
|
247
|
+
viewBox: `0 0 ${$} ${y}`,
|
|
190
248
|
fill: "none",
|
|
191
249
|
"aria-hidden": "true",
|
|
192
250
|
children: [
|
|
193
|
-
/* @__PURE__ */ e("defs", { children: /* @__PURE__ */
|
|
194
|
-
/* @__PURE__ */ e("stop", { offset: "0", style: { stopColor: `var(${
|
|
195
|
-
/* @__PURE__ */ e("stop", { offset: "1", style: { stopColor:
|
|
251
|
+
/* @__PURE__ */ e("defs", { children: /* @__PURE__ */ n("linearGradient", { id: T, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
252
|
+
/* @__PURE__ */ e("stop", { offset: "0", style: { stopColor: `var(${_})` } }),
|
|
253
|
+
/* @__PURE__ */ e("stop", { offset: "1", style: { stopColor: de } })
|
|
196
254
|
] }) }),
|
|
197
255
|
/* @__PURE__ */ e(
|
|
198
256
|
"path",
|
|
199
257
|
{
|
|
200
|
-
d:
|
|
258
|
+
d: pe,
|
|
201
259
|
"data-malachite-shape": "",
|
|
202
|
-
style: { fill: `url(#${
|
|
260
|
+
style: { fill: `url(#${T})` }
|
|
203
261
|
}
|
|
204
262
|
),
|
|
205
263
|
/* @__PURE__ */ e(
|
|
206
264
|
"path",
|
|
207
265
|
{
|
|
208
|
-
d:
|
|
266
|
+
d: U,
|
|
209
267
|
"data-malachite-shape": "",
|
|
210
|
-
strokeWidth:
|
|
211
|
-
style: { fill: "none", stroke: `var(${
|
|
268
|
+
strokeWidth: x,
|
|
269
|
+
style: { fill: "none", stroke: `var(${u})` }
|
|
212
270
|
}
|
|
213
271
|
)
|
|
214
272
|
]
|
|
215
273
|
}
|
|
216
274
|
),
|
|
217
|
-
/* @__PURE__ */ e(
|
|
218
|
-
|
|
275
|
+
/* @__PURE__ */ e(h, { size: "small", fontWeight: "semi-bold", style: Rt, children: ye }),
|
|
276
|
+
j ? /* @__PURE__ */ e(h, { size: "xsmall", fontWeight: "semi-bold", style: Tt, children: j }) : null
|
|
219
277
|
]
|
|
220
278
|
}
|
|
221
279
|
);
|
|
222
|
-
const
|
|
223
|
-
return /* @__PURE__ */
|
|
280
|
+
const w = i === "library", ae = ot[i][p ? "selected" : "resting"], le = !!I || !!S, ne = X !== void 0, Oe = I && S ? "pr-[48px]" : le ? "pr-[18px]" : "pr-1";
|
|
281
|
+
return /* @__PURE__ */ n(
|
|
224
282
|
"div",
|
|
225
283
|
{
|
|
226
|
-
ref:
|
|
284
|
+
ref: L,
|
|
227
285
|
"data-variant": i,
|
|
228
|
-
"data-pinned":
|
|
229
|
-
"data-state":
|
|
230
|
-
"data-hoverable":
|
|
231
|
-
className: `${
|
|
286
|
+
"data-pinned": Ae ? "true" : "false",
|
|
287
|
+
"data-state": p ? "selected" : "resting",
|
|
288
|
+
"data-hoverable": Ce ? "" : void 0,
|
|
289
|
+
className: `${c} group relative grid shrink-0 grid-rows-[1fr_auto] ${Me} ${Z}`.trim(),
|
|
232
290
|
style: {
|
|
233
|
-
width:
|
|
234
|
-
height:
|
|
235
|
-
borderRadius:
|
|
291
|
+
width: se,
|
|
292
|
+
height: oe,
|
|
293
|
+
borderRadius: k,
|
|
236
294
|
boxSizing: "border-box",
|
|
237
|
-
...
|
|
295
|
+
...V
|
|
238
296
|
},
|
|
239
297
|
children: [
|
|
240
|
-
|
|
298
|
+
p ? /* @__PURE__ */ n(
|
|
241
299
|
"svg",
|
|
242
300
|
{
|
|
243
|
-
className:
|
|
301
|
+
className: A,
|
|
244
302
|
width: $,
|
|
245
|
-
height:
|
|
246
|
-
viewBox: `0 0 ${$} ${
|
|
303
|
+
height: y,
|
|
304
|
+
viewBox: `0 0 ${$} ${y}`,
|
|
247
305
|
fill: "none",
|
|
248
306
|
"aria-hidden": "true",
|
|
249
307
|
children: [
|
|
250
|
-
/* @__PURE__ */ e("defs", { children: /* @__PURE__ */
|
|
251
|
-
/* @__PURE__ */ e("stop", { offset: "0", style: { stopColor: `var(${
|
|
252
|
-
/* @__PURE__ */ e("stop", { offset: "1", style: { stopColor:
|
|
308
|
+
/* @__PURE__ */ e("defs", { children: /* @__PURE__ */ n("linearGradient", { id: T, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
309
|
+
/* @__PURE__ */ e("stop", { offset: "0", style: { stopColor: `var(${_})` } }),
|
|
310
|
+
/* @__PURE__ */ e("stop", { offset: "1", style: { stopColor: de } })
|
|
253
311
|
] }) }),
|
|
254
312
|
/* @__PURE__ */ e(
|
|
255
313
|
"path",
|
|
256
314
|
{
|
|
257
|
-
d:
|
|
315
|
+
d: pe,
|
|
258
316
|
"data-malachite-shape": "",
|
|
259
|
-
style: { fill: `url(#${
|
|
317
|
+
style: { fill: `url(#${T})` }
|
|
260
318
|
}
|
|
261
319
|
),
|
|
262
320
|
/* @__PURE__ */ e(
|
|
263
321
|
"path",
|
|
264
322
|
{
|
|
265
|
-
d:
|
|
323
|
+
d: U,
|
|
266
324
|
"data-malachite-shape": "",
|
|
267
|
-
strokeWidth:
|
|
268
|
-
style: { fill: "none", stroke: `var(${
|
|
325
|
+
strokeWidth: x,
|
|
326
|
+
style: { fill: "none", stroke: `var(${u})` }
|
|
269
327
|
}
|
|
270
328
|
)
|
|
271
329
|
]
|
|
272
330
|
}
|
|
273
331
|
) : null,
|
|
274
|
-
/* @__PURE__ */
|
|
332
|
+
/* @__PURE__ */ n(
|
|
275
333
|
"button",
|
|
276
334
|
{
|
|
277
335
|
type: "button",
|
|
278
336
|
role: "radio",
|
|
279
337
|
"data-value": t,
|
|
280
|
-
"aria-checked":
|
|
281
|
-
"aria-label":
|
|
282
|
-
"aria-labelledby":
|
|
283
|
-
"aria-describedby":
|
|
284
|
-
"aria-disabled":
|
|
285
|
-
tabIndex:
|
|
338
|
+
"aria-checked": p,
|
|
339
|
+
"aria-label": K,
|
|
340
|
+
"aria-labelledby": Le,
|
|
341
|
+
"aria-describedby": De,
|
|
342
|
+
"aria-disabled": R || void 0,
|
|
343
|
+
tabIndex: Ne ?? (p ? 0 : -1),
|
|
286
344
|
onClick: () => {
|
|
287
|
-
|
|
345
|
+
R || p || C == null || C(t);
|
|
288
346
|
},
|
|
289
|
-
className: `flex min-w-0 appearance-none flex-col border-0 bg-transparent py-0 pt-3 pr-4 pl-4 text-left outline-none ${
|
|
290
|
-
style: { borderRadius:
|
|
347
|
+
className: `flex min-w-0 appearance-none flex-col border-0 bg-transparent py-0 pt-3 pr-4 pl-4 text-left outline-none ${R ? "cursor-not-allowed" : "cursor-pointer"}`,
|
|
348
|
+
style: { borderRadius: k },
|
|
291
349
|
children: [
|
|
292
|
-
/* @__PURE__ */ e("div", { className: `flex h-[13px] shrink-0 items-center gap-2 ${
|
|
293
|
-
|
|
350
|
+
/* @__PURE__ */ e("div", { className: `flex h-[13px] shrink-0 items-center gap-2 ${Oe}`, children: /* @__PURE__ */ n("div", { className: "flex min-w-0 items-center gap-1.5", children: [
|
|
351
|
+
w ? /* @__PURE__ */ n("span", { id: D, className: "flex min-w-0 items-center gap-1.5", children: [
|
|
294
352
|
l ? /* @__PURE__ */ e(
|
|
295
353
|
"span",
|
|
296
354
|
{
|
|
297
355
|
className: "flex shrink-0 items-center",
|
|
298
|
-
style:
|
|
356
|
+
style: he,
|
|
299
357
|
children: l
|
|
300
358
|
}
|
|
301
359
|
) : null,
|
|
302
|
-
|
|
303
|
-
/* @__PURE__ */ e(
|
|
304
|
-
|
|
360
|
+
o ? /* @__PURE__ */ e("span", { className: "flex shrink-0 items-center", children: /* @__PURE__ */ e(be, { leading: !l }) }) : null,
|
|
361
|
+
/* @__PURE__ */ e(re, { text: a, children: /* @__PURE__ */ e(
|
|
362
|
+
h,
|
|
305
363
|
{
|
|
306
364
|
size: "small",
|
|
307
365
|
fontWeight: "semi-bold",
|
|
308
|
-
style:
|
|
366
|
+
style: M ? { color: E } : void 0,
|
|
309
367
|
children: a
|
|
310
368
|
}
|
|
311
369
|
) })
|
|
312
370
|
] }) : null,
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
371
|
+
r ? /* @__PURE__ */ e("span", { id: q, className: "flex min-w-0", children: /* @__PURE__ */ e(h, { size: "xsmall", fontWeight: "semi-bold", style: ae, children: r }) }) : null,
|
|
372
|
+
f ? /* @__PURE__ */ e("span", { id: J, className: "flex min-w-0", children: /* @__PURE__ */ e(
|
|
373
|
+
Xe,
|
|
316
374
|
{
|
|
317
|
-
value:
|
|
318
|
-
type:
|
|
375
|
+
value: f.label,
|
|
376
|
+
type: f.type ?? "default",
|
|
319
377
|
textTransform: "none",
|
|
320
378
|
paddingSize: "compact"
|
|
321
379
|
}
|
|
322
380
|
) }) : null
|
|
323
381
|
] }) }),
|
|
324
|
-
/* @__PURE__ */
|
|
382
|
+
/* @__PURE__ */ n(
|
|
325
383
|
"div",
|
|
326
384
|
{
|
|
327
|
-
className: `mt-[11px] flex min-w-0 flex-1 flex-col gap-1 pt-3 ${
|
|
385
|
+
className: `mt-[11px] flex min-w-0 flex-1 flex-col gap-1 pt-3 ${w ? "justify-end" : "justify-between"}`,
|
|
328
386
|
children: [
|
|
329
|
-
|
|
387
|
+
w ? null : /* @__PURE__ */ n("div", { id: D, className: "flex min-w-0 items-center gap-1.5", children: [
|
|
330
388
|
l ? /* @__PURE__ */ e(
|
|
331
389
|
"span",
|
|
332
390
|
{
|
|
333
391
|
className: "flex shrink-0 items-center",
|
|
334
|
-
style:
|
|
392
|
+
style: he,
|
|
335
393
|
children: l
|
|
336
394
|
}
|
|
337
395
|
) : null,
|
|
338
|
-
|
|
339
|
-
/* @__PURE__ */ e(
|
|
340
|
-
|
|
396
|
+
o ? /* @__PURE__ */ e("span", { className: "flex shrink-0 items-center", children: /* @__PURE__ */ e(be, { leading: !l }) }) : null,
|
|
397
|
+
/* @__PURE__ */ e(re, { text: a, children: /* @__PURE__ */ e(
|
|
398
|
+
h,
|
|
341
399
|
{
|
|
342
400
|
size: "small",
|
|
343
401
|
fontWeight: "semi-bold",
|
|
344
|
-
style:
|
|
402
|
+
style: M ? { color: E } : void 0,
|
|
345
403
|
children: a
|
|
346
404
|
}
|
|
347
405
|
) })
|
|
348
406
|
] }),
|
|
349
|
-
|
|
407
|
+
O ? /* @__PURE__ */ e("span", { id: Q, className: "block min-w-0", children: /* @__PURE__ */ e(h, { size: "xsmall", style: bt, children: O }) }) : null
|
|
350
408
|
]
|
|
351
409
|
}
|
|
352
410
|
)
|
|
353
411
|
]
|
|
354
412
|
}
|
|
355
413
|
),
|
|
356
|
-
/* @__PURE__ */
|
|
357
|
-
|
|
414
|
+
/* @__PURE__ */ n("div", { className: "flex min-w-0 flex-col gap-1 self-end pr-4 pb-3 pl-4", children: [
|
|
415
|
+
d ? /* @__PURE__ */ e(
|
|
416
|
+
Ot,
|
|
417
|
+
{
|
|
418
|
+
address: d,
|
|
419
|
+
labelId: te,
|
|
420
|
+
tuckIntoCount: !v && !!g
|
|
421
|
+
},
|
|
422
|
+
d.value
|
|
423
|
+
) : null,
|
|
424
|
+
v ? /* @__PURE__ */ e("span", { className: "min-w-0", style: Et, children: /* @__PURE__ */ n(
|
|
358
425
|
"a",
|
|
359
426
|
{
|
|
360
|
-
href:
|
|
427
|
+
href: v.href,
|
|
361
428
|
target: "_blank",
|
|
362
429
|
rel: "noopener noreferrer",
|
|
363
|
-
className:
|
|
430
|
+
className: _t,
|
|
364
431
|
"data-selectable-card-link": "",
|
|
365
432
|
children: [
|
|
366
|
-
|
|
433
|
+
v.label,
|
|
367
434
|
/* @__PURE__ */ e("span", { "aria-hidden": "true", children: /* @__PURE__ */ e(
|
|
368
|
-
|
|
435
|
+
Ge,
|
|
369
436
|
{
|
|
370
|
-
size:
|
|
371
|
-
style:
|
|
437
|
+
size: gt,
|
|
438
|
+
style: xt
|
|
372
439
|
}
|
|
373
440
|
) }),
|
|
374
441
|
" ",
|
|
@@ -376,33 +443,33 @@ ${Je}`, rt = {
|
|
|
376
443
|
]
|
|
377
444
|
}
|
|
378
445
|
) }) : null,
|
|
379
|
-
|
|
446
|
+
g ? /* @__PURE__ */ e("span", { id: ee, className: "min-w-0 truncate", children: /* @__PURE__ */ e(h, { size: "xsmall", fontWeight: "semi-bold", style: ut, children: g }) }) : null
|
|
380
447
|
] }),
|
|
381
|
-
|
|
448
|
+
le ? /* @__PURE__ */ n(
|
|
382
449
|
"div",
|
|
383
450
|
{
|
|
384
451
|
"data-selectable-card-actions": "",
|
|
385
452
|
className: "absolute top-3 right-2 flex h-[13px] shrink-0 items-center gap-2.5",
|
|
386
453
|
children: [
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
454
|
+
I ? /* @__PURE__ */ e("span", { className: "flex items-center gap-2.5", style: Nt, children: I }) : null,
|
|
455
|
+
S ? /* @__PURE__ */ e(
|
|
456
|
+
Be,
|
|
390
457
|
{
|
|
391
458
|
type: "button",
|
|
392
459
|
variant: "ghost",
|
|
393
460
|
size: "xsmall",
|
|
394
461
|
iconOnly: !0,
|
|
395
|
-
"aria-label":
|
|
396
|
-
tooltip:
|
|
397
|
-
disabled:
|
|
462
|
+
"aria-label": H,
|
|
463
|
+
tooltip: X ?? H,
|
|
464
|
+
disabled: ne,
|
|
398
465
|
className: "shrink-0",
|
|
399
|
-
onClick:
|
|
466
|
+
onClick: S,
|
|
400
467
|
children: /* @__PURE__ */ e(
|
|
401
468
|
"span",
|
|
402
469
|
{
|
|
403
|
-
className:
|
|
404
|
-
style:
|
|
405
|
-
children: /* @__PURE__ */ e(
|
|
470
|
+
className: At,
|
|
471
|
+
style: ne ? Ct : ae,
|
|
472
|
+
children: /* @__PURE__ */ e(Ue, {})
|
|
406
473
|
}
|
|
407
474
|
)
|
|
408
475
|
}
|
|
@@ -415,12 +482,12 @@ ${Je}`, rt = {
|
|
|
415
482
|
);
|
|
416
483
|
};
|
|
417
484
|
export {
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
485
|
+
lt as CARD_FLARE_PX,
|
|
486
|
+
Vt as CARD_FLARE_TIP_PX,
|
|
487
|
+
G as CARD_WIDTH_PX,
|
|
488
|
+
A as FLARE_CLASS,
|
|
489
|
+
Se as STRIP_RULE_PX,
|
|
490
|
+
qt as SelectableCard,
|
|
491
|
+
qt as default
|
|
425
492
|
};
|
|
426
493
|
//# sourceMappingURL=SelectableCard.js.map
|