@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.
@@ -1,374 +1,442 @@
1
- import { jsxs as r, jsx as e } from "react/jsx-runtime";
2
- import { useRef as Ne, useId as Se } from "react";
3
- import { Button as ye } from "./Button.js";
4
- import Le from "./CustomIcons/DismissIcon.js";
5
- import Ae from "./CustomIcons/ExternalLinkIcon.js";
6
- import Ce from "./CustomIcons/PinIcon.js";
7
- import { Tag as Oe } from "./Tag.js";
8
- import De from "./Tooltip.js";
9
- import ee from "./TruncatedTooltip.js";
10
- import p from "./Typography/Text.js";
11
- import { useCardStripSlot as Pe } from "./cardStripSlot.js";
12
- import { FOCUS_RING as ke, FOCUS_RING_WITHIN_RADIO as we } from "./focusRing.js";
13
- import { useAdoptedStyleSheet as Fe } from "./useAdoptedStyleSheet.js";
14
- const B = 240, te = `${B}px`, ae = "116px", le = "var(--malachite-radius-xxl, 14px)", D = `${le} ${le} 0 0`, b = "var(--malachite-selectable-card-muted-foreground, #7b7b7b)", Be = "var(--malachite-text-secondary, #7b7b7b)", pe = "var(--malachite-selectable-card-accent, #047b43)", Ye = "var(--malachite-selectable-card-selected-tint, #e7f8f1)", Ue = "var(--malachite-selectable-card-selected-border, #047b43)", re = 0.7, ze = "var(--malachite-selectable-card-library-selected-tint, #f1f1f1)", Ge = "var(--malachite-selectable-card-library-selected-border, #bbbbbb)", he = "var(--malachite-selectable-card-pending-foreground, #96580a)", me = "var(--malachite-selectable-card-editing-tint, #f9f2e9)", ne = "var(--malachite-selectable-card-selected-surface-end, #ffffff)", We = "var(--malachite-selectable-card-background, #f1f1f1)", He = "1px solid var(--malachite-selectable-card-border, #dddddd)", Xe = "var(--malachite-selectable-card-hover-background, #e8e8e8)", je = 14, n = je, _ = 2, fe = 116, Me = 14, be = 2, Ot = n - _ / 2, $ = B + n * 2, T = fe + be + _, Ke = (t) => {
15
- const a = _ / 2, l = n + a, c = n + B - a, i = a, s = Me - a;
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 - n} ${t}`,
18
- `A${n} ${n} 0 0 0 ${l} ${t - n}`,
19
- `L${l} ${i + s}`,
20
- `A${s} ${s} 0 0 1 ${l + s} ${i}`,
21
- `L${c - s} ${i}`,
22
- `A${s} ${s} 0 0 1 ${c} ${i + s}`,
23
- `L${c} ${t - n}`,
24
- `A${n} ${n} 0 0 0 ${c + n} ${t}`
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
- }, F = Ke(fe + be / 2), se = `${F} Z`, v = "malachite-selectable-card-outline", o = "malachite-selectable-card", Ze = "malachite-selectable-card-style", m = "--malachite-selectable-card-state-outline", f = "--malachite-selectable-card-state-tint", P = {
27
- "background-color": Xe,
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
- }, k = {
30
- "background-color": We
31
- }, w = {
33
+ }, F = {
34
+ "background-color": tt
35
+ }, B = {
32
36
  profile: {
33
- resting: k,
37
+ resting: F,
34
38
  hover: P,
35
39
  selected: {
36
- [m]: Ue,
37
- [f]: Ye
40
+ [u]: Je,
41
+ [_]: qe
38
42
  }
39
43
  },
40
44
  library: {
41
- resting: k,
45
+ resting: F,
42
46
  hover: P,
43
47
  selected: {
44
- [m]: Ge,
45
- [f]: ze
48
+ [u]: et,
49
+ [_]: Qe
46
50
  }
47
51
  },
48
52
  editing: {
49
- resting: k,
53
+ resting: F,
50
54
  hover: P,
51
55
  selected: {
52
- [m]: he,
53
- [f]: me
56
+ [u]: ge,
57
+ [_]: ve
54
58
  }
55
59
  }
56
- }, I = { color: Be }, Ve = {
60
+ }, N = { color: Ve }, it = {
57
61
  profile: {
58
- resting: I,
59
- selected: { color: pe, opacity: re }
62
+ resting: N,
63
+ selected: { color: xe, opacity: ce }
60
64
  },
61
- library: { resting: I, selected: I },
65
+ library: { resting: N, selected: N },
62
66
  editing: {
63
- resting: I,
64
- selected: { color: he, opacity: re }
67
+ resting: N,
68
+ selected: { color: ge, opacity: ce }
65
69
  }
66
- }, qe = { "border-left": He }, Je = `
67
- .${o}[data-state='selected'] {
70
+ }, ct = { "border-left": at }, dt = `
71
+ .${c}[data-state='selected'] {
68
72
  z-index: 5;
69
73
  }
70
- .${o} > .${v} {
74
+ .${c} > .${A} {
71
75
  position: absolute;
72
- left: -${n}px;
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
- .${o} > *:not(.${v}):not([data-selectable-card-actions]) {
82
+ .${c} > *:not(.${A}):not([data-selectable-card-actions]) {
79
83
  position: relative;
80
84
  z-index: 1;
81
85
  }
82
- .${o} > [data-selectable-card-actions] {
86
+ .${c} > [data-selectable-card-actions] {
83
87
  z-index: 2;
84
- }`, _e = (t) => Object.entries(t).map(([a, l]) => ` ${a}: ${l};`).join(`
85
- `), Qe = (t, a) => a === "hover" ? `.${o}[data-variant='${t}'][data-state='resting'][data-hoverable]:hover` : `.${o}[data-variant='${t}'][data-state='${a}']`, et = (t, a, l) => `${Qe(t, a)} {
86
- ${_e(l)}
87
- }`, tt = Object.keys(w).flatMap(
88
- (t) => Object.keys(w[t]).map(
89
- (a) => et(t, a, w[t][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
- `), at = `.${o}[data-pinned='false'][data-state='resting'] {
93
- ${_e(
94
- qe
96
+ `), ft = `.${c}[data-pinned='false'][data-state='resting'] {
97
+ ${Re(
98
+ ct
95
99
  )}
96
- }`, lt = `${at}
97
- ${tt}
98
- ${Je}`, rt = {
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: b,
107
+ color: E,
104
108
  lineHeight: 1.6
105
- }, nt = { color: b, letterSpacing: "0.11px" }, st = `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)] ${ke}`, ot = { lineHeight: 1.6 }, it = { marginLeft: 2, verticalAlign: "-1px" }, ct = 12, Y = "var(--malachite-selectable-card-pending-foreground, #96580a)", dt = { color: Y }, pt = { color: Y, opacity: 0.7 }, ht = 36, mt = 38, oe = {
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
- }, ft = { transform: "translateY(-1px)" }, bt = "inline-flex items-center justify-center [&_svg]:size-[10px]!", _t = { color: b }, ie = "Default profile", Et = 16, Ee = {
109
- color: pe,
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
- }, xt = {
113
- ...Ee,
124
+ }, Dt = {
125
+ ...Te,
114
126
  marginLeft: -3
115
- }, ce = ({ leading: t }) => /* @__PURE__ */ e(De, { text: ie, triggerAs: "span", describesTrigger: !1, children: /* @__PURE__ */ e(
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": ie,
120
- style: t ? xt : Ee,
121
- children: /* @__PURE__ */ e(Ce, { size: Et })
131
+ "aria-label": fe,
132
+ style: t ? Dt : Te,
133
+ children: /* @__PURE__ */ e(He, { size: Lt })
122
134
  }
123
- ) }), de = (t) => {
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
- }, Dt = ({
183
+ }, Jt = ({
127
184
  value: t,
128
185
  title: a,
129
186
  titleIcon: l,
130
- isDefault: c = !1,
187
+ isDefault: o = !1,
131
188
  variant: i = "profile",
132
- eyebrow: s,
133
- status: E,
134
- description: N,
135
- countLabel: S,
136
- link: y,
137
- actions: x,
138
- onDismiss: R,
139
- dismissLabel: U = "Dismiss",
140
- dismissDisabledReason: z,
141
- selected: d = !1,
142
- loading: xe = !1,
143
- loadingLabel: Re = "Loading…",
144
- loadingHint: G,
145
- disabled: g = !1,
146
- dimmed: W = !1,
147
- onSelect: L,
148
- tabIndex: ge,
149
- "aria-label": H,
150
- className: X = "",
151
- style: j
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: ue } = Pe(), $e = !d && !g, A = Ne(null);
154
- Fe(A, lt, Ze);
155
- const h = `mal-selectable-card-${Se().replace(/[^a-zA-Z0-9_-]/g, "")}`, u = `${h}-outline`, M = `${h}-eyebrow`, K = `${h}-status`, C = `${h}-title`, Z = `${h}-description`, V = `${h}-count`, Te = H ? void 0 : de([s ? M : void 0, C, E ? K : void 0]), Ie = de([
156
- N ? Z : void 0,
157
- S ? V : void 0
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 (xe)
160
- return /* @__PURE__ */ r(
218
+ if ($e)
219
+ return /* @__PURE__ */ n(
161
220
  "div",
162
221
  {
163
- ref: A,
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: `${o} relative flex shrink-0 flex-col items-center gap-2 px-5 text-center ${X}`.trim(),
228
+ className: `${c} relative flex shrink-0 flex-col items-center gap-2 px-5 text-center ${Z}`.trim(),
170
229
  style: {
171
- width: te,
172
- height: ae,
173
- borderRadius: D,
230
+ width: se,
231
+ height: oe,
232
+ borderRadius: k,
174
233
  boxSizing: "border-box",
175
- paddingTop: `${ht}px`,
176
- paddingBottom: `${mt}px`,
234
+ paddingTop: `${$t}px`,
235
+ paddingBottom: `${yt}px`,
177
236
  justifyContent: "center",
178
- [m]: Y,
179
- [f]: me,
180
- ...j
237
+ [u]: W,
238
+ [_]: ve,
239
+ ...V
181
240
  },
182
241
  children: [
183
- /* @__PURE__ */ r(
242
+ /* @__PURE__ */ n(
184
243
  "svg",
185
244
  {
186
- className: v,
245
+ className: A,
187
246
  width: $,
188
- height: T,
189
- viewBox: `0 0 ${$} ${T}`,
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__ */ r("linearGradient", { id: u, x1: "0", y1: "0", x2: "0", y2: "1", children: [
194
- /* @__PURE__ */ e("stop", { offset: "0", style: { stopColor: `var(${f})` } }),
195
- /* @__PURE__ */ e("stop", { offset: "1", style: { stopColor: ne } })
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: se,
259
+ d: pe,
201
260
  "data-malachite-shape": "",
202
- style: { fill: `url(#${u})` }
261
+ style: { fill: `url(#${T})` }
203
262
  }
204
263
  ),
205
264
  /* @__PURE__ */ e(
206
265
  "path",
207
266
  {
208
- d: F,
267
+ d: U,
209
268
  "data-malachite-shape": "",
210
- strokeWidth: _,
211
- style: { fill: "none", stroke: `var(${m})` }
269
+ strokeWidth: x,
270
+ style: { fill: "none", stroke: `var(${u})` }
212
271
  }
213
272
  )
214
273
  ]
215
274
  }
216
275
  ),
217
- /* @__PURE__ */ e(p, { size: "small", fontWeight: "semi-bold", style: dt, children: Re }),
218
- G ? /* @__PURE__ */ e(p, { size: "xsmall", fontWeight: "semi-bold", style: pt, children: G }) : null
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 O = i === "library", q = Ve[i][d ? "selected" : "resting"], J = !!x || !!R, Q = z !== void 0, ve = x && R ? "pr-[48px]" : J ? "pr-[18px]" : "pr-1";
223
- return /* @__PURE__ */ r(
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: A,
285
+ ref: L,
227
286
  "data-variant": i,
228
- "data-pinned": ue ? "true" : "false",
229
- "data-state": d ? "selected" : "resting",
230
- "data-hoverable": $e ? "" : void 0,
231
- className: `${o} group relative grid shrink-0 grid-rows-[1fr_auto] ${we} ${X}`.trim(),
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: te,
234
- height: ae,
235
- borderRadius: D,
292
+ width: se,
293
+ height: oe,
294
+ borderRadius: k,
236
295
  boxSizing: "border-box",
237
- ...j
296
+ ...V
238
297
  },
239
298
  children: [
240
- d ? /* @__PURE__ */ r(
299
+ p ? /* @__PURE__ */ n(
241
300
  "svg",
242
301
  {
243
- className: v,
302
+ className: A,
244
303
  width: $,
245
- height: T,
246
- viewBox: `0 0 ${$} ${T}`,
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__ */ r("linearGradient", { id: u, x1: "0", y1: "0", x2: "0", y2: "1", children: [
251
- /* @__PURE__ */ e("stop", { offset: "0", style: { stopColor: `var(${f})` } }),
252
- /* @__PURE__ */ e("stop", { offset: "1", style: { stopColor: ne } })
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: se,
316
+ d: pe,
258
317
  "data-malachite-shape": "",
259
- style: { fill: `url(#${u})` }
318
+ style: { fill: `url(#${T})` }
260
319
  }
261
320
  ),
262
321
  /* @__PURE__ */ e(
263
322
  "path",
264
323
  {
265
- d: F,
324
+ d: U,
266
325
  "data-malachite-shape": "",
267
- strokeWidth: _,
268
- style: { fill: "none", stroke: `var(${m})` }
326
+ strokeWidth: x,
327
+ style: { fill: "none", stroke: `var(${u})` }
269
328
  }
270
329
  )
271
330
  ]
272
331
  }
273
332
  ) : null,
274
- /* @__PURE__ */ r(
333
+ /* @__PURE__ */ n(
275
334
  "button",
276
335
  {
277
336
  type: "button",
278
337
  role: "radio",
279
338
  "data-value": t,
280
- "aria-checked": d,
281
- "aria-label": H,
282
- "aria-labelledby": Te,
283
- "aria-describedby": Ie,
284
- "aria-disabled": g || void 0,
285
- tabIndex: ge ?? (d ? 0 : -1),
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
- g || d || L == null || L(t);
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 ${g ? "cursor-not-allowed" : "cursor-pointer"}`,
290
- style: { borderRadius: D },
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 ${ve}`, children: /* @__PURE__ */ r("div", { className: "flex min-w-0 items-center gap-1.5", children: [
293
- O ? /* @__PURE__ */ r("span", { id: C, className: "flex min-w-0 items-center gap-1.5", children: [
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: oe,
357
+ style: he,
299
358
  children: l
300
359
  }
301
360
  ) : null,
302
- c ? /* @__PURE__ */ e("span", { className: "flex shrink-0 items-center", children: /* @__PURE__ */ e(ce, { leading: !l }) }) : null,
303
- /* @__PURE__ */ e(ee, { text: a, children: /* @__PURE__ */ e(
304
- p,
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: W ? { color: b } : void 0,
367
+ style: M ? { color: E } : void 0,
309
368
  children: a
310
369
  }
311
370
  ) })
312
371
  ] }) : null,
313
- s ? /* @__PURE__ */ e("span", { id: M, className: "flex min-w-0", children: /* @__PURE__ */ e(p, { size: "xsmall", fontWeight: "semi-bold", style: q, children: s }) }) : null,
314
- E ? /* @__PURE__ */ e("span", { id: K, className: "flex min-w-0", children: /* @__PURE__ */ e(
315
- Oe,
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: E.label,
318
- type: E.type ?? "default",
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__ */ r(
383
+ /* @__PURE__ */ n(
325
384
  "div",
326
385
  {
327
- className: `mt-[11px] flex min-w-0 flex-1 flex-col gap-1 pt-3 ${O ? "justify-end" : "justify-between"}`,
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
- O ? null : /* @__PURE__ */ r("div", { id: C, className: "flex min-w-0 items-center gap-1.5", children: [
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: oe,
393
+ style: he,
335
394
  children: l
336
395
  }
337
396
  ) : null,
338
- c ? /* @__PURE__ */ e("span", { className: "flex shrink-0 items-center", children: /* @__PURE__ */ e(ce, { leading: !l }) }) : null,
339
- /* @__PURE__ */ e(ee, { text: a, children: /* @__PURE__ */ e(
340
- p,
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: W ? { color: b } : void 0,
403
+ style: M ? { color: E } : void 0,
345
404
  children: a
346
405
  }
347
406
  ) })
348
407
  ] }),
349
- N ? /* @__PURE__ */ e("span", { id: Z, className: "block min-w-0", children: /* @__PURE__ */ e(p, { size: "xsmall", style: rt, children: N }) }) : null
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__ */ r("div", { className: "flex min-w-0 flex-col gap-1 self-end pr-4 pb-3 pl-4", children: [
357
- y ? /* @__PURE__ */ e("span", { className: "min-w-0", style: ot, children: /* @__PURE__ */ r(
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: y.href,
428
+ href: v.href,
361
429
  target: "_blank",
362
430
  rel: "noopener noreferrer",
363
- className: st,
431
+ className: Et,
364
432
  "data-selectable-card-link": "",
365
433
  children: [
366
- y.label,
434
+ v.label,
367
435
  /* @__PURE__ */ e("span", { "aria-hidden": "true", children: /* @__PURE__ */ e(
368
- Ae,
436
+ Ge,
369
437
  {
370
- size: ct,
371
- style: it
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
- S ? /* @__PURE__ */ e("span", { id: V, className: "min-w-0 truncate", children: /* @__PURE__ */ e(p, { size: "xsmall", fontWeight: "semi-bold", style: nt, children: S }) }) : null
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
- J ? /* @__PURE__ */ r(
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
- x ? /* @__PURE__ */ e("span", { className: "flex items-center gap-2.5", style: ft, children: x }) : null,
388
- R ? /* @__PURE__ */ e(
389
- ye,
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": U,
396
- tooltip: z ?? U,
397
- disabled: Q,
463
+ "aria-label": H,
464
+ tooltip: X ?? H,
465
+ disabled: ne,
398
466
  className: "shrink-0",
399
- onClick: R,
467
+ onClick: S,
400
468
  children: /* @__PURE__ */ e(
401
469
  "span",
402
470
  {
403
- className: bt,
404
- style: Q ? _t : q,
405
- children: /* @__PURE__ */ e(Le, {})
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
- je as CARD_FLARE_PX,
419
- Ot as CARD_FLARE_TIP_PX,
420
- B as CARD_WIDTH_PX,
421
- v as FLARE_CLASS,
422
- be as STRIP_RULE_PX,
423
- Dt as SelectableCard,
424
- Dt as default
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