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