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