@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.
@@ -1,374 +1,441 @@
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
+ 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 - 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}`
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
- }, 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,
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
- }, k = {
30
- "background-color": We
31
- }, w = {
32
+ }, F = {
33
+ "background-color": et
34
+ }, B = {
32
35
  profile: {
33
- resting: k,
36
+ resting: F,
34
37
  hover: P,
35
38
  selected: {
36
- [m]: Ue,
37
- [f]: Ye
39
+ [u]: qe,
40
+ [_]: Ve
38
41
  }
39
42
  },
40
43
  library: {
41
- resting: k,
44
+ resting: F,
42
45
  hover: P,
43
46
  selected: {
44
- [m]: Ge,
45
- [f]: ze
47
+ [u]: Qe,
48
+ [_]: Je
46
49
  }
47
50
  },
48
51
  editing: {
49
- resting: k,
52
+ resting: F,
50
53
  hover: P,
51
54
  selected: {
52
- [m]: he,
53
- [f]: me
55
+ [u]: ge,
56
+ [_]: ve
54
57
  }
55
58
  }
56
- }, I = { color: Be }, Ve = {
59
+ }, N = { color: Ze }, ot = {
57
60
  profile: {
58
- resting: I,
59
- selected: { color: pe, opacity: re }
61
+ resting: N,
62
+ selected: { color: xe, opacity: ce }
60
63
  },
61
- library: { resting: I, selected: I },
64
+ library: { resting: N, selected: N },
62
65
  editing: {
63
- resting: I,
64
- selected: { color: he, opacity: re }
66
+ resting: N,
67
+ selected: { color: ge, opacity: ce }
65
68
  }
66
- }, qe = { "border-left": He }, Je = `
67
- .${o}[data-state='selected'] {
69
+ }, it = { "border-left": tt }, ct = `
70
+ .${c}[data-state='selected'] {
68
71
  z-index: 5;
69
72
  }
70
- .${o} > .${v} {
73
+ .${c} > .${A} {
71
74
  position: absolute;
72
- left: -${n}px;
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
- .${o} > *:not(.${v}):not([data-selectable-card-actions]) {
81
+ .${c} > *:not(.${A}):not([data-selectable-card-actions]) {
79
82
  position: relative;
80
83
  z-index: 1;
81
84
  }
82
- .${o} > [data-selectable-card-actions] {
85
+ .${c} > [data-selectable-card-actions] {
83
86
  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])
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
- `), at = `.${o}[data-pinned='false'][data-state='resting'] {
93
- ${_e(
94
- qe
95
+ `), ht = `.${c}[data-pinned='false'][data-state='resting'] {
96
+ ${Re(
97
+ it
95
98
  )}
96
- }`, lt = `${at}
97
- ${tt}
98
- ${Je}`, rt = {
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: b,
106
+ color: E,
104
107
  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 = {
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
- }, 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,
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
- }, xt = {
113
- ...Ee,
123
+ }, Dt = {
124
+ ...Te,
114
125
  marginLeft: -3
115
- }, ce = ({ leading: t }) => /* @__PURE__ */ e(De, { text: ie, triggerAs: "span", describesTrigger: !1, children: /* @__PURE__ */ e(
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": ie,
120
- style: t ? xt : Ee,
121
- children: /* @__PURE__ */ e(Ce, { size: Et })
130
+ "aria-label": fe,
131
+ style: t ? Dt : Te,
132
+ children: /* @__PURE__ */ e(He, { size: Lt })
122
133
  }
123
- ) }), de = (t) => {
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
- }, Dt = ({
182
+ }, qt = ({
127
183
  value: t,
128
184
  title: a,
129
185
  titleIcon: l,
130
- isDefault: c = !1,
186
+ isDefault: o = !1,
131
187
  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
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: 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
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 (xe)
160
- return /* @__PURE__ */ r(
217
+ if ($e)
218
+ return /* @__PURE__ */ n(
161
219
  "div",
162
220
  {
163
- ref: A,
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: `${o} relative flex shrink-0 flex-col items-center gap-2 px-5 text-center ${X}`.trim(),
227
+ className: `${c} relative flex shrink-0 flex-col items-center gap-2 px-5 text-center ${Z}`.trim(),
170
228
  style: {
171
- width: te,
172
- height: ae,
173
- borderRadius: D,
229
+ width: se,
230
+ height: oe,
231
+ borderRadius: k,
174
232
  boxSizing: "border-box",
175
- paddingTop: `${ht}px`,
176
- paddingBottom: `${mt}px`,
233
+ paddingTop: `${$t}px`,
234
+ paddingBottom: `${yt}px`,
177
235
  justifyContent: "center",
178
- [m]: Y,
179
- [f]: me,
180
- ...j
236
+ [u]: W,
237
+ [_]: ve,
238
+ ...V
181
239
  },
182
240
  children: [
183
- /* @__PURE__ */ r(
241
+ /* @__PURE__ */ n(
184
242
  "svg",
185
243
  {
186
- className: v,
244
+ className: A,
187
245
  width: $,
188
- height: T,
189
- viewBox: `0 0 ${$} ${T}`,
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__ */ 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 } })
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: se,
258
+ d: pe,
201
259
  "data-malachite-shape": "",
202
- style: { fill: `url(#${u})` }
260
+ style: { fill: `url(#${T})` }
203
261
  }
204
262
  ),
205
263
  /* @__PURE__ */ e(
206
264
  "path",
207
265
  {
208
- d: F,
266
+ d: U,
209
267
  "data-malachite-shape": "",
210
- strokeWidth: _,
211
- style: { fill: "none", stroke: `var(${m})` }
268
+ strokeWidth: x,
269
+ style: { fill: "none", stroke: `var(${u})` }
212
270
  }
213
271
  )
214
272
  ]
215
273
  }
216
274
  ),
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
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 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(
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: A,
284
+ ref: L,
227
285
  "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(),
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: te,
234
- height: ae,
235
- borderRadius: D,
291
+ width: se,
292
+ height: oe,
293
+ borderRadius: k,
236
294
  boxSizing: "border-box",
237
- ...j
295
+ ...V
238
296
  },
239
297
  children: [
240
- d ? /* @__PURE__ */ r(
298
+ p ? /* @__PURE__ */ n(
241
299
  "svg",
242
300
  {
243
- className: v,
301
+ className: A,
244
302
  width: $,
245
- height: T,
246
- viewBox: `0 0 ${$} ${T}`,
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__ */ 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 } })
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: se,
315
+ d: pe,
258
316
  "data-malachite-shape": "",
259
- style: { fill: `url(#${u})` }
317
+ style: { fill: `url(#${T})` }
260
318
  }
261
319
  ),
262
320
  /* @__PURE__ */ e(
263
321
  "path",
264
322
  {
265
- d: F,
323
+ d: U,
266
324
  "data-malachite-shape": "",
267
- strokeWidth: _,
268
- style: { fill: "none", stroke: `var(${m})` }
325
+ strokeWidth: x,
326
+ style: { fill: "none", stroke: `var(${u})` }
269
327
  }
270
328
  )
271
329
  ]
272
330
  }
273
331
  ) : null,
274
- /* @__PURE__ */ r(
332
+ /* @__PURE__ */ n(
275
333
  "button",
276
334
  {
277
335
  type: "button",
278
336
  role: "radio",
279
337
  "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),
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
- g || d || L == null || L(t);
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 ${g ? "cursor-not-allowed" : "cursor-pointer"}`,
290
- style: { borderRadius: D },
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 ${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: [
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: oe,
356
+ style: he,
299
357
  children: l
300
358
  }
301
359
  ) : 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,
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: W ? { color: b } : void 0,
366
+ style: M ? { color: E } : void 0,
309
367
  children: a
310
368
  }
311
369
  ) })
312
370
  ] }) : 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,
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: E.label,
318
- type: E.type ?? "default",
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__ */ r(
382
+ /* @__PURE__ */ n(
325
383
  "div",
326
384
  {
327
- className: `mt-[11px] flex min-w-0 flex-1 flex-col gap-1 pt-3 ${O ? "justify-end" : "justify-between"}`,
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
- O ? null : /* @__PURE__ */ r("div", { id: C, className: "flex min-w-0 items-center gap-1.5", children: [
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: oe,
392
+ style: he,
335
393
  children: l
336
394
  }
337
395
  ) : 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,
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: W ? { color: b } : void 0,
402
+ style: M ? { color: E } : void 0,
345
403
  children: a
346
404
  }
347
405
  ) })
348
406
  ] }),
349
- N ? /* @__PURE__ */ e("span", { id: Z, className: "block min-w-0", children: /* @__PURE__ */ e(p, { size: "xsmall", style: rt, children: N }) }) : null
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__ */ 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(
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: y.href,
427
+ href: v.href,
361
428
  target: "_blank",
362
429
  rel: "noopener noreferrer",
363
- className: st,
430
+ className: _t,
364
431
  "data-selectable-card-link": "",
365
432
  children: [
366
- y.label,
433
+ v.label,
367
434
  /* @__PURE__ */ e("span", { "aria-hidden": "true", children: /* @__PURE__ */ e(
368
- Ae,
435
+ Ge,
369
436
  {
370
- size: ct,
371
- style: it
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
- 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
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
- J ? /* @__PURE__ */ r(
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
- x ? /* @__PURE__ */ e("span", { className: "flex items-center gap-2.5", style: ft, children: x }) : null,
388
- R ? /* @__PURE__ */ e(
389
- ye,
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": U,
396
- tooltip: z ?? U,
397
- disabled: Q,
462
+ "aria-label": H,
463
+ tooltip: X ?? H,
464
+ disabled: ne,
398
465
  className: "shrink-0",
399
- onClick: R,
466
+ onClick: S,
400
467
  children: /* @__PURE__ */ e(
401
468
  "span",
402
469
  {
403
- className: bt,
404
- style: Q ? _t : q,
405
- children: /* @__PURE__ */ e(Le, {})
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
- 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
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