@stackone/malachite 2.42.2 → 2.43.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/README.md +7 -0
- package/dist/components/ActionMenu.js +70 -70
- package/dist/components/ActionMenu.js.map +1 -1
- package/dist/components/CardStrip.js +179 -172
- package/dist/components/CardStrip.js.map +1 -1
- package/dist/components/Chat/ChatModelPicker.js +74 -73
- package/dist/components/Chat/ChatModelPicker.js.map +1 -1
- package/dist/components/Dropdown.js +432 -419
- package/dist/components/Dropdown.js.map +1 -1
- package/dist/components/MultiSelect.js +218 -213
- package/dist/components/MultiSelect.js.map +1 -1
- package/dist/components/Popover.js +102 -102
- package/dist/components/Popover.js.map +1 -1
- package/dist/components/QueryInput.js +65 -65
- package/dist/components/QueryInput.js.map +1 -1
- package/dist/components/SelectableCard.js +194 -168
- package/dist/components/SelectableCard.js.map +1 -1
- package/dist/components/focusRing.js +7 -6
- package/dist/components/focusRing.js.map +1 -1
- package/dist/components/overlayBehaviour.js +145 -94
- package/dist/components/overlayBehaviour.js.map +1 -1
- package/dist/components/overlayLayers.js +34 -0
- package/dist/components/overlayLayers.js.map +1 -0
- package/dist/components/portalOverlay.js.map +1 -1
- package/dist/index.d.ts +8 -0
- package/dist/tailwind.css.js +1 -1
- package/package.json +4 -3
|
@@ -1,74 +1,75 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useRef as
|
|
1
|
+
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as Ne, useId as Se } from "react";
|
|
3
3
|
import { Button as ye } from "./Button.js";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
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";
|
|
9
10
|
import p from "./Typography/Text.js";
|
|
10
|
-
import { useCardStripSlot as
|
|
11
|
-
import {
|
|
12
|
-
import { useAdoptedStyleSheet as
|
|
13
|
-
const
|
|
14
|
-
const a =
|
|
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;
|
|
15
16
|
return [
|
|
16
|
-
`M${l -
|
|
17
|
-
`A${
|
|
18
|
-
`L${l} ${i +
|
|
19
|
-
`A${
|
|
20
|
-
`L${c -
|
|
21
|
-
`A${
|
|
22
|
-
`L${c} ${t -
|
|
23
|
-
`A${
|
|
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}`
|
|
24
25
|
].join(" ");
|
|
25
|
-
},
|
|
26
|
-
"background-color":
|
|
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,
|
|
27
28
|
"border-left-color": "transparent"
|
|
28
|
-
}, P = {
|
|
29
|
-
"background-color": Ue
|
|
30
29
|
}, k = {
|
|
30
|
+
"background-color": We
|
|
31
|
+
}, w = {
|
|
31
32
|
profile: {
|
|
32
|
-
resting:
|
|
33
|
-
hover:
|
|
33
|
+
resting: k,
|
|
34
|
+
hover: P,
|
|
34
35
|
selected: {
|
|
35
|
-
[m]:
|
|
36
|
-
[f]:
|
|
36
|
+
[m]: Ue,
|
|
37
|
+
[f]: Ye
|
|
37
38
|
}
|
|
38
39
|
},
|
|
39
40
|
library: {
|
|
40
|
-
resting:
|
|
41
|
-
hover:
|
|
41
|
+
resting: k,
|
|
42
|
+
hover: P,
|
|
42
43
|
selected: {
|
|
43
|
-
[m]:
|
|
44
|
-
[f]:
|
|
44
|
+
[m]: Ge,
|
|
45
|
+
[f]: ze
|
|
45
46
|
}
|
|
46
47
|
},
|
|
47
48
|
editing: {
|
|
48
|
-
resting:
|
|
49
|
-
hover:
|
|
49
|
+
resting: k,
|
|
50
|
+
hover: P,
|
|
50
51
|
selected: {
|
|
51
|
-
[m]:
|
|
52
|
-
[f]:
|
|
52
|
+
[m]: he,
|
|
53
|
+
[f]: me
|
|
53
54
|
}
|
|
54
55
|
}
|
|
55
|
-
}, I = { color:
|
|
56
|
+
}, I = { color: Be }, Ve = {
|
|
56
57
|
profile: {
|
|
57
58
|
resting: I,
|
|
58
|
-
selected: { color:
|
|
59
|
+
selected: { color: pe, opacity: re }
|
|
59
60
|
},
|
|
60
61
|
library: { resting: I, selected: I },
|
|
61
62
|
editing: {
|
|
62
63
|
resting: I,
|
|
63
|
-
selected: { color:
|
|
64
|
+
selected: { color: he, opacity: re }
|
|
64
65
|
}
|
|
65
|
-
},
|
|
66
|
+
}, qe = { "border-left": He }, Je = `
|
|
66
67
|
.${o}[data-state='selected'] {
|
|
67
68
|
z-index: 5;
|
|
68
69
|
}
|
|
69
70
|
.${o} > .${v} {
|
|
70
71
|
position: absolute;
|
|
71
|
-
left: -${
|
|
72
|
+
left: -${n}px;
|
|
72
73
|
top: 0;
|
|
73
74
|
z-index: 0;
|
|
74
75
|
overflow: visible;
|
|
@@ -80,122 +81,123 @@ const F = 240, ee = `${F}px`, te = "116px", ae = "var(--malachite-radius-xxl, 14
|
|
|
80
81
|
}
|
|
81
82
|
.${o} > [data-selectable-card-actions] {
|
|
82
83
|
z-index: 2;
|
|
83
|
-
}`,
|
|
84
|
-
`),
|
|
85
|
-
${
|
|
86
|
-
}`,
|
|
87
|
-
(t) => Object.keys(
|
|
88
|
-
(a) =>
|
|
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])
|
|
89
90
|
)
|
|
90
91
|
).join(`
|
|
91
|
-
`),
|
|
92
|
-
${
|
|
93
|
-
|
|
92
|
+
`), at = `.${o}[data-pinned='false'][data-state='resting'] {
|
|
93
|
+
${_e(
|
|
94
|
+
qe
|
|
94
95
|
)}
|
|
95
|
-
}`,
|
|
96
|
-
${
|
|
97
|
-
${
|
|
96
|
+
}`, lt = `${at}
|
|
97
|
+
${tt}
|
|
98
|
+
${Je}`, rt = {
|
|
98
99
|
display: "-webkit-box",
|
|
99
100
|
WebkitLineClamp: 2,
|
|
100
101
|
WebkitBoxOrient: "vertical",
|
|
101
102
|
overflow: "hidden",
|
|
102
103
|
color: b,
|
|
103
104
|
lineHeight: 1.6
|
|
104
|
-
},
|
|
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 = {
|
|
105
106
|
color: "var(--malachite-text-primary)",
|
|
106
107
|
marginLeft: -2.25
|
|
107
|
-
},
|
|
108
|
-
color:
|
|
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,
|
|
109
110
|
display: "inline-flex",
|
|
110
111
|
transform: "rotate(45deg)"
|
|
111
|
-
},
|
|
112
|
+
}, xt = {
|
|
112
113
|
...Ee,
|
|
113
114
|
marginLeft: -3
|
|
114
|
-
},
|
|
115
|
+
}, ce = ({ leading: t }) => /* @__PURE__ */ e(De, { text: ie, triggerAs: "span", describesTrigger: !1, children: /* @__PURE__ */ e(
|
|
115
116
|
"span",
|
|
116
117
|
{
|
|
117
118
|
role: "img",
|
|
118
|
-
"aria-label":
|
|
119
|
-
style: t ?
|
|
120
|
-
children: /* @__PURE__ */ e(
|
|
119
|
+
"aria-label": ie,
|
|
120
|
+
style: t ? xt : Ee,
|
|
121
|
+
children: /* @__PURE__ */ e(Ce, { size: Et })
|
|
121
122
|
}
|
|
122
|
-
) }),
|
|
123
|
+
) }), de = (t) => {
|
|
123
124
|
const a = t.filter((l) => l !== void 0);
|
|
124
125
|
return a.length > 0 ? a.join(" ") : void 0;
|
|
125
|
-
},
|
|
126
|
+
}, Dt = ({
|
|
126
127
|
value: t,
|
|
127
128
|
title: a,
|
|
128
129
|
titleIcon: l,
|
|
129
130
|
isDefault: c = !1,
|
|
130
131
|
variant: i = "profile",
|
|
131
|
-
eyebrow:
|
|
132
|
-
status:
|
|
133
|
-
description:
|
|
134
|
-
countLabel:
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
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,
|
|
139
141
|
selected: d = !1,
|
|
140
|
-
loading:
|
|
142
|
+
loading: xe = !1,
|
|
141
143
|
loadingLabel: Re = "Loading…",
|
|
142
144
|
loadingHint: G,
|
|
143
|
-
disabled:
|
|
144
|
-
dimmed:
|
|
145
|
-
onSelect:
|
|
146
|
-
tabIndex:
|
|
147
|
-
"aria-label":
|
|
148
|
-
className:
|
|
145
|
+
disabled: g = !1,
|
|
146
|
+
dimmed: W = !1,
|
|
147
|
+
onSelect: L,
|
|
148
|
+
tabIndex: ge,
|
|
149
|
+
"aria-label": H,
|
|
150
|
+
className: X = "",
|
|
149
151
|
style: j
|
|
150
152
|
}) => {
|
|
151
|
-
const { pinned:
|
|
152
|
-
|
|
153
|
-
const h = `mal-selectable-card-${Se().replace(/[^a-zA-Z0-9_-]/g, "")}`, u = `${h}-outline`,
|
|
154
|
-
|
|
155
|
-
|
|
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
|
|
156
158
|
]);
|
|
157
|
-
if (
|
|
158
|
-
return /* @__PURE__ */
|
|
159
|
+
if (xe)
|
|
160
|
+
return /* @__PURE__ */ r(
|
|
159
161
|
"div",
|
|
160
162
|
{
|
|
161
|
-
ref:
|
|
163
|
+
ref: A,
|
|
162
164
|
role: "status",
|
|
163
165
|
"aria-busy": "true",
|
|
164
166
|
"aria-live": "polite",
|
|
165
167
|
"data-variant": "editing",
|
|
166
168
|
"data-state": "selected",
|
|
167
|
-
className: `${o} relative flex shrink-0 flex-col items-center gap-2 px-5 text-center ${
|
|
169
|
+
className: `${o} relative flex shrink-0 flex-col items-center gap-2 px-5 text-center ${X}`.trim(),
|
|
168
170
|
style: {
|
|
169
|
-
width:
|
|
170
|
-
height:
|
|
171
|
-
borderRadius:
|
|
171
|
+
width: te,
|
|
172
|
+
height: ae,
|
|
173
|
+
borderRadius: D,
|
|
172
174
|
boxSizing: "border-box",
|
|
173
|
-
paddingTop: `${
|
|
174
|
-
paddingBottom: `${
|
|
175
|
+
paddingTop: `${ht}px`,
|
|
176
|
+
paddingBottom: `${mt}px`,
|
|
175
177
|
justifyContent: "center",
|
|
176
|
-
[m]:
|
|
177
|
-
[f]:
|
|
178
|
+
[m]: Y,
|
|
179
|
+
[f]: me,
|
|
178
180
|
...j
|
|
179
181
|
},
|
|
180
182
|
children: [
|
|
181
|
-
/* @__PURE__ */
|
|
183
|
+
/* @__PURE__ */ r(
|
|
182
184
|
"svg",
|
|
183
185
|
{
|
|
184
186
|
className: v,
|
|
185
|
-
width:
|
|
186
|
-
height:
|
|
187
|
-
viewBox: `0 0 ${
|
|
187
|
+
width: $,
|
|
188
|
+
height: T,
|
|
189
|
+
viewBox: `0 0 ${$} ${T}`,
|
|
188
190
|
fill: "none",
|
|
189
191
|
"aria-hidden": "true",
|
|
190
192
|
children: [
|
|
191
|
-
/* @__PURE__ */ e("defs", { children: /* @__PURE__ */
|
|
193
|
+
/* @__PURE__ */ e("defs", { children: /* @__PURE__ */ r("linearGradient", { id: u, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
192
194
|
/* @__PURE__ */ e("stop", { offset: "0", style: { stopColor: `var(${f})` } }),
|
|
193
|
-
/* @__PURE__ */ e("stop", { offset: "1", style: { stopColor:
|
|
195
|
+
/* @__PURE__ */ e("stop", { offset: "1", style: { stopColor: ne } })
|
|
194
196
|
] }) }),
|
|
195
197
|
/* @__PURE__ */ e(
|
|
196
198
|
"path",
|
|
197
199
|
{
|
|
198
|
-
d:
|
|
200
|
+
d: se,
|
|
199
201
|
"data-malachite-shape": "",
|
|
200
202
|
style: { fill: `url(#${u})` }
|
|
201
203
|
}
|
|
@@ -203,56 +205,56 @@ ${Ze}`, tt = {
|
|
|
203
205
|
/* @__PURE__ */ e(
|
|
204
206
|
"path",
|
|
205
207
|
{
|
|
206
|
-
d:
|
|
208
|
+
d: F,
|
|
207
209
|
"data-malachite-shape": "",
|
|
208
|
-
strokeWidth:
|
|
210
|
+
strokeWidth: _,
|
|
209
211
|
style: { fill: "none", stroke: `var(${m})` }
|
|
210
212
|
}
|
|
211
213
|
)
|
|
212
214
|
]
|
|
213
215
|
}
|
|
214
216
|
),
|
|
215
|
-
/* @__PURE__ */ e(p, { size: "small", fontWeight: "semi-bold", style:
|
|
216
|
-
G ? /* @__PURE__ */ e(p, { size: "xsmall", fontWeight: "semi-bold", style:
|
|
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
|
|
217
219
|
]
|
|
218
220
|
}
|
|
219
221
|
);
|
|
220
|
-
const
|
|
221
|
-
return /* @__PURE__ */
|
|
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(
|
|
222
224
|
"div",
|
|
223
225
|
{
|
|
224
|
-
ref:
|
|
226
|
+
ref: A,
|
|
225
227
|
"data-variant": i,
|
|
226
|
-
"data-pinned":
|
|
228
|
+
"data-pinned": ue ? "true" : "false",
|
|
227
229
|
"data-state": d ? "selected" : "resting",
|
|
228
|
-
"data-hoverable":
|
|
229
|
-
className: `${o} group relative grid shrink-0 grid-rows-[1fr_auto] ${
|
|
230
|
+
"data-hoverable": $e ? "" : void 0,
|
|
231
|
+
className: `${o} group relative grid shrink-0 grid-rows-[1fr_auto] ${we} ${X}`.trim(),
|
|
230
232
|
style: {
|
|
231
|
-
width:
|
|
232
|
-
height:
|
|
233
|
-
borderRadius:
|
|
233
|
+
width: te,
|
|
234
|
+
height: ae,
|
|
235
|
+
borderRadius: D,
|
|
234
236
|
boxSizing: "border-box",
|
|
235
237
|
...j
|
|
236
238
|
},
|
|
237
239
|
children: [
|
|
238
|
-
d ? /* @__PURE__ */
|
|
240
|
+
d ? /* @__PURE__ */ r(
|
|
239
241
|
"svg",
|
|
240
242
|
{
|
|
241
243
|
className: v,
|
|
242
|
-
width:
|
|
243
|
-
height:
|
|
244
|
-
viewBox: `0 0 ${
|
|
244
|
+
width: $,
|
|
245
|
+
height: T,
|
|
246
|
+
viewBox: `0 0 ${$} ${T}`,
|
|
245
247
|
fill: "none",
|
|
246
248
|
"aria-hidden": "true",
|
|
247
249
|
children: [
|
|
248
|
-
/* @__PURE__ */ e("defs", { children: /* @__PURE__ */
|
|
250
|
+
/* @__PURE__ */ e("defs", { children: /* @__PURE__ */ r("linearGradient", { id: u, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
249
251
|
/* @__PURE__ */ e("stop", { offset: "0", style: { stopColor: `var(${f})` } }),
|
|
250
|
-
/* @__PURE__ */ e("stop", { offset: "1", style: { stopColor:
|
|
252
|
+
/* @__PURE__ */ e("stop", { offset: "1", style: { stopColor: ne } })
|
|
251
253
|
] }) }),
|
|
252
254
|
/* @__PURE__ */ e(
|
|
253
255
|
"path",
|
|
254
256
|
{
|
|
255
|
-
d:
|
|
257
|
+
d: se,
|
|
256
258
|
"data-malachite-shape": "",
|
|
257
259
|
style: { fill: `url(#${u})` }
|
|
258
260
|
}
|
|
@@ -260,123 +262,147 @@ ${Ze}`, tt = {
|
|
|
260
262
|
/* @__PURE__ */ e(
|
|
261
263
|
"path",
|
|
262
264
|
{
|
|
263
|
-
d:
|
|
265
|
+
d: F,
|
|
264
266
|
"data-malachite-shape": "",
|
|
265
|
-
strokeWidth:
|
|
267
|
+
strokeWidth: _,
|
|
266
268
|
style: { fill: "none", stroke: `var(${m})` }
|
|
267
269
|
}
|
|
268
270
|
)
|
|
269
271
|
]
|
|
270
272
|
}
|
|
271
273
|
) : null,
|
|
272
|
-
/* @__PURE__ */
|
|
274
|
+
/* @__PURE__ */ r(
|
|
273
275
|
"button",
|
|
274
276
|
{
|
|
275
277
|
type: "button",
|
|
276
278
|
role: "radio",
|
|
277
279
|
"data-value": t,
|
|
278
280
|
"aria-checked": d,
|
|
279
|
-
"aria-label":
|
|
280
|
-
"aria-labelledby":
|
|
281
|
-
"aria-describedby":
|
|
282
|
-
"aria-disabled":
|
|
283
|
-
tabIndex:
|
|
281
|
+
"aria-label": H,
|
|
282
|
+
"aria-labelledby": Te,
|
|
283
|
+
"aria-describedby": Ie,
|
|
284
|
+
"aria-disabled": g || void 0,
|
|
285
|
+
tabIndex: ge ?? (d ? 0 : -1),
|
|
284
286
|
onClick: () => {
|
|
285
|
-
|
|
287
|
+
g || d || L == null || L(t);
|
|
286
288
|
},
|
|
287
|
-
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 ${
|
|
288
|
-
style: { borderRadius:
|
|
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 },
|
|
289
291
|
children: [
|
|
290
|
-
/* @__PURE__ */ e("div", { className: `flex h-[13px] shrink-0 items-center gap-2 ${
|
|
291
|
-
|
|
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: [
|
|
292
294
|
l ? /* @__PURE__ */ e(
|
|
293
295
|
"span",
|
|
294
296
|
{
|
|
295
297
|
className: "flex shrink-0 items-center",
|
|
296
|
-
style:
|
|
298
|
+
style: oe,
|
|
297
299
|
children: l
|
|
298
300
|
}
|
|
299
301
|
) : null,
|
|
300
|
-
c ? /* @__PURE__ */ e("span", { className: "flex shrink-0 items-center", children: /* @__PURE__ */ e(
|
|
301
|
-
/* @__PURE__ */ e(
|
|
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(
|
|
302
304
|
p,
|
|
303
305
|
{
|
|
304
306
|
size: "small",
|
|
305
307
|
fontWeight: "semi-bold",
|
|
306
|
-
style:
|
|
308
|
+
style: W ? { color: b } : void 0,
|
|
307
309
|
children: a
|
|
308
310
|
}
|
|
309
311
|
) })
|
|
310
312
|
] }) : null,
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
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,
|
|
314
316
|
{
|
|
315
|
-
value:
|
|
316
|
-
type:
|
|
317
|
+
value: E.label,
|
|
318
|
+
type: E.type ?? "default",
|
|
317
319
|
textTransform: "none",
|
|
318
320
|
paddingSize: "compact"
|
|
319
321
|
}
|
|
320
322
|
) }) : null
|
|
321
323
|
] }) }),
|
|
322
|
-
/* @__PURE__ */
|
|
324
|
+
/* @__PURE__ */ r(
|
|
323
325
|
"div",
|
|
324
326
|
{
|
|
325
|
-
className: `mt-[11px] flex min-w-0 flex-1 flex-col gap-1 pt-3 ${
|
|
327
|
+
className: `mt-[11px] flex min-w-0 flex-1 flex-col gap-1 pt-3 ${O ? "justify-end" : "justify-between"}`,
|
|
326
328
|
children: [
|
|
327
|
-
|
|
329
|
+
O ? null : /* @__PURE__ */ r("div", { id: C, className: "flex min-w-0 items-center gap-1.5", children: [
|
|
328
330
|
l ? /* @__PURE__ */ e(
|
|
329
331
|
"span",
|
|
330
332
|
{
|
|
331
333
|
className: "flex shrink-0 items-center",
|
|
332
|
-
style:
|
|
334
|
+
style: oe,
|
|
333
335
|
children: l
|
|
334
336
|
}
|
|
335
337
|
) : null,
|
|
336
|
-
c ? /* @__PURE__ */ e("span", { className: "flex shrink-0 items-center", children: /* @__PURE__ */ e(
|
|
337
|
-
/* @__PURE__ */ e(
|
|
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(
|
|
338
340
|
p,
|
|
339
341
|
{
|
|
340
342
|
size: "small",
|
|
341
343
|
fontWeight: "semi-bold",
|
|
342
|
-
style:
|
|
344
|
+
style: W ? { color: b } : void 0,
|
|
343
345
|
children: a
|
|
344
346
|
}
|
|
345
347
|
) })
|
|
346
348
|
] }),
|
|
347
|
-
|
|
349
|
+
N ? /* @__PURE__ */ e("span", { id: Z, className: "block min-w-0", children: /* @__PURE__ */ e(p, { size: "xsmall", style: rt, children: N }) }) : null
|
|
348
350
|
]
|
|
349
351
|
}
|
|
350
352
|
)
|
|
351
353
|
]
|
|
352
354
|
}
|
|
353
355
|
),
|
|
354
|
-
/* @__PURE__ */
|
|
355
|
-
|
|
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(
|
|
358
|
+
"a",
|
|
359
|
+
{
|
|
360
|
+
href: y.href,
|
|
361
|
+
target: "_blank",
|
|
362
|
+
rel: "noopener noreferrer",
|
|
363
|
+
className: st,
|
|
364
|
+
"data-selectable-card-link": "",
|
|
365
|
+
children: [
|
|
366
|
+
y.label,
|
|
367
|
+
/* @__PURE__ */ e("span", { "aria-hidden": "true", children: /* @__PURE__ */ e(
|
|
368
|
+
Ae,
|
|
369
|
+
{
|
|
370
|
+
size: ct,
|
|
371
|
+
style: it
|
|
372
|
+
}
|
|
373
|
+
) }),
|
|
374
|
+
" ",
|
|
375
|
+
/* @__PURE__ */ e("span", { className: "sr-only", children: "(opens in a new tab)" })
|
|
376
|
+
]
|
|
377
|
+
}
|
|
378
|
+
) }) : 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
|
|
380
|
+
] }),
|
|
381
|
+
J ? /* @__PURE__ */ r(
|
|
356
382
|
"div",
|
|
357
383
|
{
|
|
358
384
|
"data-selectable-card-actions": "",
|
|
359
385
|
className: "absolute top-3 right-2 flex h-[13px] shrink-0 items-center gap-2.5",
|
|
360
386
|
children: [
|
|
361
|
-
|
|
362
|
-
|
|
387
|
+
x ? /* @__PURE__ */ e("span", { className: "flex items-center gap-2.5", style: ft, children: x }) : null,
|
|
388
|
+
R ? /* @__PURE__ */ e(
|
|
363
389
|
ye,
|
|
364
390
|
{
|
|
365
391
|
type: "button",
|
|
366
392
|
variant: "ghost",
|
|
367
393
|
size: "xsmall",
|
|
368
394
|
iconOnly: !0,
|
|
369
|
-
"aria-label":
|
|
370
|
-
tooltip:
|
|
371
|
-
disabled:
|
|
395
|
+
"aria-label": U,
|
|
396
|
+
tooltip: z ?? U,
|
|
397
|
+
disabled: Q,
|
|
372
398
|
className: "shrink-0",
|
|
373
|
-
onClick:
|
|
399
|
+
onClick: R,
|
|
374
400
|
children: /* @__PURE__ */ e(
|
|
375
401
|
"span",
|
|
376
402
|
{
|
|
377
|
-
className:
|
|
378
|
-
style:
|
|
379
|
-
children: /* @__PURE__ */ e(
|
|
403
|
+
className: bt,
|
|
404
|
+
style: Q ? _t : q,
|
|
405
|
+
children: /* @__PURE__ */ e(Le, {})
|
|
380
406
|
}
|
|
381
407
|
)
|
|
382
408
|
}
|
|
@@ -389,12 +415,12 @@ ${Ze}`, tt = {
|
|
|
389
415
|
);
|
|
390
416
|
};
|
|
391
417
|
export {
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
418
|
+
je as CARD_FLARE_PX,
|
|
419
|
+
Ot as CARD_FLARE_TIP_PX,
|
|
420
|
+
B as CARD_WIDTH_PX,
|
|
395
421
|
v as FLARE_CLASS,
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
422
|
+
be as STRIP_RULE_PX,
|
|
423
|
+
Dt as SelectableCard,
|
|
424
|
+
Dt as default
|
|
399
425
|
};
|
|
400
426
|
//# sourceMappingURL=SelectableCard.js.map
|