@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.
@@ -1,175 +1,175 @@
1
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;
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${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}`
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 = 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,
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": tt
34
+ "background-color": lt
35
35
  }, B = {
36
36
  profile: {
37
37
  resting: F,
38
38
  hover: P,
39
39
  selected: {
40
- [u]: Je,
41
- [_]: qe
40
+ [_]: Qe,
41
+ [E]: Je
42
42
  }
43
43
  },
44
44
  library: {
45
45
  resting: F,
46
46
  hover: P,
47
47
  selected: {
48
- [u]: et,
49
- [_]: Qe
48
+ [_]: tt,
49
+ [E]: et
50
50
  }
51
51
  },
52
52
  editing: {
53
53
  resting: F,
54
54
  hover: P,
55
55
  selected: {
56
- [u]: ge,
57
- [_]: ve
56
+ [_]: ve,
57
+ [E]: Ie
58
58
  }
59
59
  }
60
- }, N = { color: Ve }, it = {
60
+ }, N = { color: qe }, ct = {
61
61
  profile: {
62
62
  resting: N,
63
- selected: { color: xe, opacity: ce }
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: ge, opacity: ce }
68
+ selected: { color: ve, opacity: de }
69
69
  }
70
- }, ct = { "border-left": at }, dt = `
71
- .${c}[data-state='selected'] {
70
+ }, dt = { "border-left": at }, pt = `
71
+ .${d}[data-state='selected'] {
72
72
  z-index: 5;
73
73
  }
74
- .${c} > .${A} {
74
+ .${d} > .${A} {
75
75
  position: absolute;
76
- left: -${s}px;
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
- .${c} > *:not(.${A}):not([data-selectable-card-actions]) {
82
+ .${d} > *:not(.${A}):not([data-selectable-card-actions]) {
83
83
  position: relative;
84
84
  z-index: 1;
85
85
  }
86
- .${c} > [data-selectable-card-actions] {
86
+ .${d} > [data-selectable-card-actions] {
87
87
  z-index: 2;
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(
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
- (a) => mt(t, a, B[t][a])
93
+ (l) => ht(t, l, B[t][l])
94
94
  )
95
95
  ).join(`
96
- `), ft = `.${c}[data-pinned='false'][data-state='resting'] {
96
+ `), bt = `.${d}[data-pinned='false'][data-state='resting'] {
97
97
  ${Re(
98
- ct
98
+ dt
99
99
  )}
100
- }`, bt = `${ft}
101
- ${ht}
102
- ${dt}`, ut = {
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: E,
107
+ color: x,
108
108
  lineHeight: 1.6
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 = {
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
- }, St = {
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 }, Tt = { color: W, opacity: 0.7 }, $t = 36, yt = 38, he = {
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
- }, 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,
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
- }, Dt = {
125
- ...Te,
124
+ }, Ot = {
125
+ ...$e,
126
126
  marginLeft: -3
127
- }, be = ({ leading: t }) => /* @__PURE__ */ e(_e, { text: fe, triggerAs: "span", describesTrigger: !1, children: /* @__PURE__ */ e(
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": fe,
132
- style: t ? Dt : Te,
133
- children: /* @__PURE__ */ e(He, { size: Lt })
131
+ "aria-label": be,
132
+ style: t ? Ot : $e,
133
+ children: /* @__PURE__ */ e(Xe, { size: Dt })
134
134
  }
135
- ) }), Ot = ({ address: t, labelId: a, tuckIntoCount: l }) => {
136
- const [o, i] = Pe(null), r = o !== null;
137
- Fe(() => {
138
- if (o === null)
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(() => i(null), Ze);
140
+ const b = setTimeout(() => c(null), Ve);
141
141
  return () => clearTimeout(b);
142
- }, [o]);
143
- const f = r ? /* @__PURE__ */ n("span", { style: me, children: [
144
- /* @__PURE__ */ e(Ye, { size: Y, style: z }),
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: me, children: [
147
- /* @__PURE__ */ e("span", { style: St, children: t.value }),
148
- /* @__PURE__ */ e(ze, { size: Y, style: z })
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: `${l ? "-mb-[7px] " : ""}flex min-w-0 flex-col items-start *:max-w-full`,
153
+ className: `${a ? "-mb-[7px] " : ""}flex min-w-0 flex-col items-start *:max-w-full`,
154
154
  children: [
155
- /* @__PURE__ */ e(_e, { text: f, triggerAs: "span", describesTrigger: !1, placement: "bottom", children: /* @__PURE__ */ n(
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: It,
161
+ className: St,
162
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()),
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(We, { size: Y, style: z }),
172
- /* @__PURE__ */ e("span", { id: a, className: "min-w-0 truncate", children: t.label })
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
- }, ue = (t) => {
181
- const a = t.filter((l) => l !== void 0);
182
- return a.length > 0 ? a.join(" ") : void 0;
183
- }, Jt = ({
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: a,
186
- titleIcon: l,
187
- isDefault: o = !1,
188
- variant: i = "profile",
185
+ title: l,
186
+ titleIcon: a,
187
+ isDefault: s = !1,
188
+ variant: c = "profile",
189
189
  eyebrow: r,
190
- status: f,
190
+ status: o,
191
191
  description: b,
192
- address: d,
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: p = !1,
200
- loading: $e = !1,
201
- loadingLabel: ye = "Loading…",
199
+ selected: h = !1,
200
+ loading: ye = !1,
201
+ loadingLabel: Ne = "Loading…",
202
202
  loadingHint: j,
203
- disabled: R = !1,
203
+ disabled: T = !1,
204
204
  dimmed: M = !1,
205
205
  onSelect: C,
206
- tabIndex: Ne,
206
+ tabIndex: Ae,
207
207
  "aria-label": K,
208
208
  className: Z = "",
209
209
  style: V
210
210
  }) => {
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
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 ($e)
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: `${c} relative flex shrink-0 flex-col items-center gap-2 px-5 text-center ${Z}`.trim(),
229
+ className: `${d} relative flex shrink-0 flex-col items-center gap-2 px-5 text-center ${Z}`.trim(),
229
230
  style: {
230
- width: se,
231
- height: oe,
231
+ width: ie,
232
+ height: se,
232
233
  borderRadius: k,
233
234
  boxSizing: "border-box",
234
- paddingTop: `${$t}px`,
235
- paddingBottom: `${yt}px`,
235
+ paddingTop: `${yt}px`,
236
+ paddingBottom: `${Nt}px`,
236
237
  justifyContent: "center",
237
- [u]: W,
238
- [_]: ve,
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: 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 } })
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: pe,
260
+ d: me,
260
261
  "data-malachite-shape": "",
261
- style: { fill: `url(#${T})` }
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: x,
270
- style: { fill: "none", stroke: `var(${u})` }
270
+ strokeWidth: u,
271
+ style: { fill: "none", stroke: `var(${_})` }
271
272
  }
272
273
  )
273
274
  ]
274
275
  }
275
276
  ),
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
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 = 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
+ 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": i,
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(),
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: se,
293
- height: oe,
293
+ width: ie,
294
+ height: se,
294
295
  borderRadius: k,
295
296
  boxSizing: "border-box",
296
297
  ...V
297
298
  },
298
299
  children: [
299
- p ? /* @__PURE__ */ n(
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: 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 } })
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: pe,
317
+ d: me,
317
318
  "data-malachite-shape": "",
318
- style: { fill: `url(#${T})` }
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: x,
327
- style: { fill: "none", stroke: `var(${u})` }
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": p,
340
+ "aria-checked": h,
340
341
  "aria-label": K,
341
- "aria-labelledby": Le,
342
- "aria-describedby": De,
343
- "aria-disabled": R || void 0,
344
- tabIndex: Ne ?? (p ? 0 : -1),
342
+ "aria-labelledby": De,
343
+ "aria-describedby": Oe,
344
+ "aria-disabled": T || void 0,
345
+ tabIndex: Ae ?? (h ? 0 : -1),
345
346
  onClick: () => {
346
- R || p || C == null || C(t);
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 ${R ? "cursor-not-allowed" : "cursor-pointer"}`,
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 ${Oe}`, children: /* @__PURE__ */ n("div", { className: "flex min-w-0 items-center gap-1.5", children: [
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
- l ? /* @__PURE__ */ e(
354
+ a ? /* @__PURE__ */ e(
354
355
  "span",
355
356
  {
356
357
  className: "flex shrink-0 items-center",
357
- style: he,
358
- children: l
358
+ style: fe,
359
+ children: a
359
360
  }
360
361
  ) : null,
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,
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: E } : void 0,
368
- children: a
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(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,
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: f.label,
377
- type: f.type ?? "default",
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
- l ? /* @__PURE__ */ e(
393
+ a ? /* @__PURE__ */ e(
390
394
  "span",
391
395
  {
392
396
  className: "flex shrink-0 items-center",
393
- style: he,
394
- children: l
397
+ style: fe,
398
+ children: a
395
399
  }
396
400
  ) : null,
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,
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: E } : void 0,
404
- children: a
407
+ style: M ? { color: x } : void 0,
408
+ children: l
405
409
  }
406
410
  ) })
407
411
  ] }),
408
- O ? /* @__PURE__ */ e("span", { id: Q, className: "block min-w-0", children: /* @__PURE__ */ e(h, { size: "xsmall", style: ut, children: O }) }) : null
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
- d ? /* @__PURE__ */ e(
417
- Ot,
420
+ p ? /* @__PURE__ */ e(
421
+ wt,
418
422
  {
419
- address: d,
420
- labelId: te,
423
+ address: p,
424
+ labelId: le,
421
425
  tuckIntoCount: !v && !!g
422
426
  },
423
- d.value
427
+ p.value
424
428
  ) : null,
425
- v ? /* @__PURE__ */ e("span", { className: "min-w-0", style: xt, children: /* @__PURE__ */ n(
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: Et,
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
- Ge,
440
+ We,
437
441
  {
438
- size: vt,
439
- style: gt
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: ee, className: "min-w-0 truncate", children: /* @__PURE__ */ e(h, { size: "xsmall", fontWeight: "semi-bold", style: _t, children: g }) }) : null
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
- le ? /* @__PURE__ */ n(
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: Nt, children: I }) : null,
459
+ I ? /* @__PURE__ */ e("span", { className: "flex items-center gap-2.5", style: At, children: I }) : null,
456
460
  S ? /* @__PURE__ */ e(
457
- Be,
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: ne,
469
+ disabled: re,
466
470
  className: "shrink-0",
467
471
  onClick: S,
468
472
  children: /* @__PURE__ */ e(
469
473
  "span",
470
474
  {
471
- className: At,
472
- style: ne ? Ct : ae,
473
- children: /* @__PURE__ */ e(Ue, {})
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
- nt as CARD_FLARE_PX,
487
- qt as CARD_FLARE_TIP_PX,
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
- Se as STRIP_RULE_PX,
491
- Jt as SelectableCard,
492
- Jt as default
494
+ Te as STRIP_RULE_PX,
495
+ Qt as SelectableCard,
496
+ Qt as default
493
497
  };
494
498
  //# sourceMappingURL=SelectableCard.js.map