chordia-ui 3.3.8 → 3.3.9

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.
Files changed (159) hide show
  1. package/dist/AgentLiftCard.cjs.js.map +1 -1
  2. package/dist/AgentLiftCard.es.js +5 -3
  3. package/dist/AgentLiftCard.es.js.map +1 -1
  4. package/dist/CustomFilterChips.cjs.js.map +1 -1
  5. package/dist/CustomFilterChips.es.js +2 -1
  6. package/dist/CustomFilterChips.es.js.map +1 -1
  7. package/dist/FileUploadingState.cjs.js.map +1 -1
  8. package/dist/FileUploadingState.es.js +16 -10
  9. package/dist/FileUploadingState.es.js.map +1 -1
  10. package/dist/IntegrationCard.cjs.js.map +1 -1
  11. package/dist/IntegrationCard.es.js +3 -3
  12. package/dist/IntegrationCard.es.js.map +1 -1
  13. package/dist/SectionLabel.cjs.js.map +1 -1
  14. package/dist/SectionLabel.es.js.map +1 -1
  15. package/dist/SmallButton.cjs.js.map +1 -1
  16. package/dist/SmallButton.es.js +16 -16
  17. package/dist/SmallButton.es.js.map +1 -1
  18. package/dist/SummarySection.cjs.js.map +1 -1
  19. package/dist/SummarySection.es.js +11 -9
  20. package/dist/SummarySection.es.js.map +1 -1
  21. package/dist/TextInput.cjs.js.map +1 -1
  22. package/dist/TextInput.es.js.map +1 -1
  23. package/dist/Timeline.cjs.js.map +1 -1
  24. package/dist/Timeline.es.js +14 -8
  25. package/dist/Timeline.es.js.map +1 -1
  26. package/dist/Tooltip.cjs.js +1 -1
  27. package/dist/Tooltip.cjs.js.map +1 -1
  28. package/dist/Tooltip.es.js +31 -20
  29. package/dist/Tooltip.es.js.map +1 -1
  30. package/dist/TourGuideTooltip.cjs.js.map +1 -1
  31. package/dist/TourGuideTooltip.es.js +2 -1
  32. package/dist/TourGuideTooltip.es.js.map +1 -1
  33. package/dist/UpdatedInteractionRecording.cjs.js +1 -1
  34. package/dist/UpdatedInteractionRecording.cjs.js.map +1 -1
  35. package/dist/UpdatedInteractionRecording.es.js +79 -97
  36. package/dist/UpdatedInteractionRecording.es.js.map +1 -1
  37. package/dist/UploadInteraction.cjs.js.map +1 -1
  38. package/dist/UploadInteraction.es.js.map +1 -1
  39. package/dist/colors.cjs.js +2 -0
  40. package/dist/colors.cjs.js.map +1 -0
  41. package/dist/colors.es.js +2 -0
  42. package/dist/colors.es.js.map +1 -0
  43. package/dist/components/UpdatedInteractionDetails.cjs.js +10 -1
  44. package/dist/components/UpdatedInteractionDetails.cjs.js.map +1 -1
  45. package/dist/components/UpdatedInteractionDetails.es.js +1531 -9
  46. package/dist/components/UpdatedInteractionDetails.es.js.map +1 -1
  47. package/dist/components/chat.cjs.js +30 -1
  48. package/dist/components/chat.cjs.js.map +1 -1
  49. package/dist/components/chat.es.js +2222 -7
  50. package/dist/components/chat.es.js.map +1 -1
  51. package/dist/components/common.cjs.js +1 -1
  52. package/dist/components/common.es.js +32 -25
  53. package/dist/components/common.es.js.map +1 -1
  54. package/dist/components/data.cjs.js +1 -1
  55. package/dist/components/data.cjs.js.map +1 -1
  56. package/dist/components/data.es.js +1033 -4
  57. package/dist/components/data.es.js.map +1 -1
  58. package/dist/components/layout.cjs.js +3 -1
  59. package/dist/components/layout.cjs.js.map +1 -1
  60. package/dist/components/layout.es.js +1533 -8
  61. package/dist/components/layout.es.js.map +1 -1
  62. package/dist/components/login.cjs.js +1 -1
  63. package/dist/components/login.es.js +6 -2
  64. package/dist/components/login.es.js.map +1 -1
  65. package/dist/components/media.cjs.js +1 -1
  66. package/dist/components/media.cjs.js.map +1 -1
  67. package/dist/components/media.es.js +220 -6
  68. package/dist/components/media.es.js.map +1 -1
  69. package/dist/components/models.cjs.js +1 -1
  70. package/dist/components/models.cjs.js.map +1 -1
  71. package/dist/components/models.es.js +91 -2
  72. package/dist/components/models.es.js.map +1 -1
  73. package/dist/components/navigation.cjs.js +1 -1
  74. package/dist/components/navigation.cjs.js.map +1 -1
  75. package/dist/components/navigation.es.js +766 -7
  76. package/dist/components/navigation.es.js.map +1 -1
  77. package/dist/components/notifications.cjs.js +1 -1
  78. package/dist/components/notifications.cjs.js.map +1 -1
  79. package/dist/components/notifications.es.js +368 -3
  80. package/dist/components/notifications.es.js.map +1 -1
  81. package/dist/components/onboarding.cjs.js +1 -1
  82. package/dist/components/onboarding.cjs.js.map +1 -1
  83. package/dist/components/onboarding.es.js +985 -7
  84. package/dist/components/onboarding.es.js.map +1 -1
  85. package/dist/components/primitives.cjs.js +1 -1
  86. package/dist/components/primitives.cjs.js.map +1 -1
  87. package/dist/components/primitives.es.js +635 -25
  88. package/dist/components/primitives.es.js.map +1 -1
  89. package/dist/debugger-wc.cjs.js +4 -4
  90. package/dist/debugger-wc.cjs.js.map +1 -1
  91. package/dist/debugger-wc.es.js +15 -11
  92. package/dist/debugger-wc.es.js.map +1 -1
  93. package/dist/index.cjs.js +1 -1
  94. package/dist/index.cjs2.js +2 -49
  95. package/dist/index.cjs2.js.map +1 -1
  96. package/dist/index.cjs3.js +50 -0
  97. package/dist/index.cjs3.js.map +1 -0
  98. package/dist/index.es.js +104 -99
  99. package/dist/index.es.js.map +1 -1
  100. package/dist/index.es2.js +2632 -1776
  101. package/dist/index.es2.js.map +1 -1
  102. package/dist/index.es3.js +1944 -0
  103. package/dist/index.es3.js.map +1 -0
  104. package/dist/pages/interactionDetails.cjs.js +1 -1
  105. package/dist/pages/interactionDetails.cjs.js.map +1 -1
  106. package/dist/pages/interactionDetails.es.js +70 -47
  107. package/dist/pages/interactionDetails.es.js.map +1 -1
  108. package/dist/sortable.esm.cjs.js +1 -1
  109. package/dist/sortable.esm.cjs.js.map +1 -1
  110. package/dist/sortable.esm.es.js +55 -53
  111. package/dist/sortable.esm.es.js.map +1 -1
  112. package/dist/{chordia-ui.css → style.css} +1 -1
  113. package/package.json +1 -1
  114. package/src/components/UpdatedInteractionDetails/UpdatedInteractionDetails.jsx +318 -77
  115. package/src/components/UpdatedInteractionDetails/UpdatedInteractionRecording.jsx +7 -17
  116. package/dist/ChartRenderer.cjs.js +0 -31
  117. package/dist/ChartRenderer.cjs.js.map +0 -1
  118. package/dist/ChartRenderer.es.js +0 -2210
  119. package/dist/ChartRenderer.es.js.map +0 -1
  120. package/dist/GettingStarted.cjs.js +0 -2
  121. package/dist/GettingStarted.cjs.js.map +0 -1
  122. package/dist/GettingStarted.es.js +0 -983
  123. package/dist/GettingStarted.es.js.map +0 -1
  124. package/dist/InlineConfirm.cjs.js +0 -2
  125. package/dist/InlineConfirm.cjs.js.map +0 -1
  126. package/dist/InlineConfirm.es.js +0 -618
  127. package/dist/InlineConfirm.es.js.map +0 -1
  128. package/dist/InteractionSummaryCard.cjs.js +0 -2
  129. package/dist/InteractionSummaryCard.cjs.js.map +0 -1
  130. package/dist/InteractionSummaryCard.es.js +0 -216
  131. package/dist/InteractionSummaryCard.es.js.map +0 -1
  132. package/dist/LoginPage.cjs.js +0 -3
  133. package/dist/LoginPage.cjs.js.map +0 -1
  134. package/dist/LoginPage.es.js +0 -2618
  135. package/dist/LoginPage.es.js.map +0 -1
  136. package/dist/NavigationBar.cjs.js +0 -2
  137. package/dist/NavigationBar.cjs.js.map +0 -1
  138. package/dist/NavigationBar.es.js +0 -762
  139. package/dist/NavigationBar.es.js.map +0 -1
  140. package/dist/NotificationPanel.cjs.js +0 -2
  141. package/dist/NotificationPanel.cjs.js.map +0 -1
  142. package/dist/NotificationPanel.es.js +0 -371
  143. package/dist/NotificationPanel.es.js.map +0 -1
  144. package/dist/OverlayPanel.cjs.js +0 -2
  145. package/dist/OverlayPanel.cjs.js.map +0 -1
  146. package/dist/OverlayPanel.es.js +0 -93
  147. package/dist/OverlayPanel.es.js.map +0 -1
  148. package/dist/SplitPane.cjs.js +0 -4
  149. package/dist/SplitPane.cjs.js.map +0 -1
  150. package/dist/SplitPane.es.js +0 -1531
  151. package/dist/SplitPane.es.js.map +0 -1
  152. package/dist/SummaryStatsPanel.cjs.js +0 -2
  153. package/dist/SummaryStatsPanel.cjs.js.map +0 -1
  154. package/dist/SummaryStatsPanel.es.js +0 -1027
  155. package/dist/SummaryStatsPanel.es.js.map +0 -1
  156. package/dist/UpdatedInteractionDetails.cjs.js +0 -11
  157. package/dist/UpdatedInteractionDetails.cjs.js.map +0 -1
  158. package/dist/UpdatedInteractionDetails.es.js +0 -1310
  159. package/dist/UpdatedInteractionDetails.es.js.map +0 -1
@@ -1,618 +0,0 @@
1
- import { jsx as e, jsxs as u } from "react/jsx-runtime";
2
- import { useState as x, useRef as D, useEffect as M } from "react";
3
- import { Check as E } from "lucide-react";
4
- import { S as O } from "./SmallButton.es.js";
5
- function G({ colors: s = [] }) {
6
- const t = s.reduce((n, r) => (n[r.category] || (n[r.category] = []), n[r.category].push(r), n), {});
7
- return /* @__PURE__ */ e(
8
- "div",
9
- {
10
- style: {
11
- fontFamily: "system-ui, -apple-system, sans-serif"
12
- },
13
- children: Object.entries(t).map(([n, r]) => /* @__PURE__ */ u("div", { style: { marginBottom: "24px" }, children: [
14
- /* @__PURE__ */ e(
15
- "div",
16
- {
17
- style: {
18
- fontSize: "11px",
19
- letterSpacing: "0.14em",
20
- textTransform: "uppercase",
21
- marginBottom: "12px",
22
- color: "rgba(30, 33, 37, 0.62)",
23
- fontWeight: 650
24
- },
25
- children: n
26
- }
27
- ),
28
- /* @__PURE__ */ e(
29
- "div",
30
- {
31
- style: {
32
- display: "grid",
33
- gridTemplateColumns: "repeat(auto-fill, minmax(220px, 1fr))",
34
- gap: "12px"
35
- },
36
- children: r.map((o, l) => /* @__PURE__ */ u(
37
- "div",
38
- {
39
- style: {
40
- border: "1px solid rgba(52, 58, 64, 0.12)",
41
- borderRadius: "12px",
42
- overflow: "hidden",
43
- background: "rgba(255, 255, 255, 0.72)"
44
- },
45
- children: [
46
- /* @__PURE__ */ e(
47
- "div",
48
- {
49
- style: {
50
- height: "64px",
51
- background: o.hex,
52
- borderBottom: "1px solid rgba(52, 58, 64, 0.10)"
53
- }
54
- }
55
- ),
56
- /* @__PURE__ */ u("div", { style: { padding: "10px 12px" }, children: [
57
- /* @__PURE__ */ e(
58
- "div",
59
- {
60
- style: {
61
- fontSize: "13px",
62
- fontWeight: 680,
63
- color: "rgba(30, 33, 37, 0.92)",
64
- marginBottom: "4px"
65
- },
66
- children: o.name
67
- }
68
- ),
69
- /* @__PURE__ */ e(
70
- "div",
71
- {
72
- style: {
73
- fontSize: "11.5px",
74
- fontFamily: "ui-monospace, monospace",
75
- color: "rgba(30, 33, 37, 0.52)",
76
- marginBottom: "6px"
77
- },
78
- children: o.hex
79
- }
80
- ),
81
- /* @__PURE__ */ e(
82
- "div",
83
- {
84
- style: {
85
- fontSize: "11.5px",
86
- color: "rgba(30, 33, 37, 0.62)",
87
- lineHeight: 1.4
88
- },
89
- children: o.usage
90
- }
91
- )
92
- ] })
93
- ]
94
- },
95
- l
96
- ))
97
- }
98
- )
99
- ] }, n))
100
- }
101
- );
102
- }
103
- function J({ children: s, color: t, icon: n, ...r }) {
104
- const l = {
105
- ...{
106
- fontSize: "var(--text-xs)",
107
- padding: "1px 5px",
108
- borderRadius: "var(--radius-sm)",
109
- display: "inline-flex",
110
- alignItems: "center"
111
- },
112
- color: t,
113
- backgroundColor: `color-mix(in srgb, ${t} 15%, transparent)`,
114
- ...r.style
115
- };
116
- return /* @__PURE__ */ u("span", { style: l, ...r, children: [
117
- n && /* @__PURE__ */ e("span", { style: { marginRight: "3px" }, children: n }),
118
- s
119
- ] });
120
- }
121
- function $({
122
- checked: s = !1,
123
- onChange: t,
124
- label: n,
125
- size: r = "md",
126
- disabled: o = !1,
127
- style: l,
128
- ...p
129
- }) {
130
- const i = r === "sm" ? 12 : 16, d = r === "sm" ? 8 : 11;
131
- return /* @__PURE__ */ u(
132
- "label",
133
- {
134
- style: {
135
- display: "inline-flex",
136
- alignItems: "center",
137
- gap: r === "sm" ? 3 : "var(--spacing-2)",
138
- fontSize: r === "sm" ? "var(--text-xs)" : "var(--text-sm)",
139
- color: o ? "var(--text-faint)" : "var(--text-base)",
140
- cursor: o ? "not-allowed" : "pointer",
141
- userSelect: "none",
142
- ...l
143
- },
144
- onClick: (c) => {
145
- c.preventDefault(), !o && t && t(!s);
146
- },
147
- ...p,
148
- children: [
149
- /* @__PURE__ */ e(
150
- "span",
151
- {
152
- style: {
153
- width: i,
154
- height: i,
155
- borderRadius: r === "sm" ? 2 : 3,
156
- border: `1px solid ${s ? "var(--text-ink)" : "var(--border)"}`,
157
- background: s ? "var(--text-ink)" : "transparent",
158
- display: "inline-flex",
159
- alignItems: "center",
160
- justifyContent: "center",
161
- transition: "var(--transition-fast)",
162
- flexShrink: 0,
163
- opacity: o ? 0.5 : 1
164
- },
165
- children: s && /* @__PURE__ */ e(E, { size: d, style: { color: "white" }, strokeWidth: 3 })
166
- }
167
- ),
168
- n
169
- ]
170
- }
171
- );
172
- }
173
- const P = {
174
- width: "100%",
175
- padding: "var(--spacing-2)",
176
- fontSize: "var(--text-md)",
177
- border: "1px solid var(--border)",
178
- borderRadius: "var(--radius)",
179
- backgroundColor: "var(--paper)",
180
- color: "var(--text-base)",
181
- fontFamily: "var(--font-sans)",
182
- outline: "none",
183
- transition: "border-color 0.15s ease"
184
- };
185
- function K({
186
- value: s,
187
- onChange: t,
188
- placeholder: n,
189
- disabled: r = !1,
190
- mono: o = !1,
191
- rows: l = 4,
192
- resize: p = !0,
193
- style: i,
194
- ...d
195
- }) {
196
- return /* @__PURE__ */ e(
197
- "textarea",
198
- {
199
- value: s,
200
- onChange: (c) => t == null ? void 0 : t(c.target.value),
201
- placeholder: n,
202
- disabled: r,
203
- rows: l,
204
- style: {
205
- ...P,
206
- resize: p ? "vertical" : "none",
207
- minHeight: l * 20,
208
- ...o ? { fontFamily: "var(--font-mono)" } : {},
209
- ...r ? { opacity: 0.6, cursor: "not-allowed" } : {},
210
- ...i
211
- },
212
- onFocus: (c) => {
213
- c.currentTarget.style.borderColor = "var(--border-hover)";
214
- },
215
- onBlur: (c) => {
216
- c.currentTarget.style.borderColor = "var(--border)";
217
- },
218
- ...d
219
- }
220
- );
221
- }
222
- const V = {
223
- width: "100%",
224
- padding: "var(--spacing-1) var(--spacing-2)",
225
- fontSize: "var(--text-md)",
226
- border: "1px solid var(--border)",
227
- borderRadius: "var(--radius)",
228
- backgroundColor: "var(--paper)",
229
- color: "var(--text-base)",
230
- fontFamily: "var(--font-sans)",
231
- cursor: "pointer",
232
- outline: "none",
233
- transition: "border-color 0.15s ease"
234
- };
235
- function Q({
236
- value: s,
237
- onChange: t,
238
- options: n = [],
239
- disabled: r = !1,
240
- placeholder: o,
241
- style: l,
242
- ...p
243
- }) {
244
- return /* @__PURE__ */ u(
245
- "select",
246
- {
247
- value: s,
248
- onChange: (i) => t == null ? void 0 : t(i.target.value),
249
- disabled: r,
250
- style: {
251
- ...V,
252
- ...r ? { opacity: 0.6, cursor: "not-allowed" } : {},
253
- ...l
254
- },
255
- onFocus: (i) => {
256
- i.currentTarget.style.borderColor = "var(--border-hover)";
257
- },
258
- onBlur: (i) => {
259
- i.currentTarget.style.borderColor = "var(--border)";
260
- },
261
- ...p,
262
- children: [
263
- o && /* @__PURE__ */ e("option", { value: "", children: o }),
264
- n.map((i) => /* @__PURE__ */ e("option", { value: i.value, children: i.label }, i.value))
265
- ]
266
- }
267
- );
268
- }
269
- function U({
270
- value: s = [],
271
- onChange: t,
272
- options: n = [],
273
- placeholder: r = "Select options",
274
- disabled: o = !1,
275
- leftIcon: l = null,
276
- rightIcon: p = null,
277
- maxMenuHeight: i = 240,
278
- draggable: d = !1
279
- }) {
280
- const [c, R] = x(!1), [j, T] = x(null), [g, B] = x(n), [I, h] = x(null), b = D(null), S = D(null);
281
- M(() => {
282
- B(n);
283
- }, [n]);
284
- const w = new Set((s || []).map(String)), L = (a) => {
285
- if (!t) return;
286
- const v = String(a), m = new Set(w);
287
- m.has(v) ? m.delete(v) : m.add(v), t(Array.from(m));
288
- };
289
- M(() => {
290
- if (!c) return;
291
- const a = (v) => {
292
- b.current && !b.current.contains(v.target) && S.current && !S.current.contains(v.target) && R(!1);
293
- };
294
- return document.addEventListener("mousedown", a), () => document.removeEventListener("mousedown", a);
295
- }, [c]);
296
- const y = w.size, H = y === 0 ? r : `${y} selected`;
297
- return /* @__PURE__ */ u("div", { style: { position: "relative", width: "100%" }, children: [
298
- /* @__PURE__ */ u(
299
- "button",
300
- {
301
- type: "button",
302
- ref: b,
303
- disabled: o,
304
- onClick: () => !o && R((a) => !a),
305
- style: {
306
- // Match Select base style as closely as possible
307
- width: "100%",
308
- display: "flex",
309
- alignItems: "center",
310
- justifyContent: "space-between",
311
- gap: 8,
312
- padding: "var(--spacing-1) var(--spacing-2)",
313
- borderRadius: "var(--radius)",
314
- ...c ? {
315
- borderBottomLeftRadius: 0,
316
- borderBottomRightRadius: 0
317
- } : {},
318
- border: "1px solid var(--border)",
319
- backgroundColor: o ? "rgba(249, 250, 251, 1)" : "var(--paper)",
320
- color: y === 0 ? "var(--text-muted)" : "var(--text-base)",
321
- cursor: o ? "not-allowed" : "pointer",
322
- fontFamily: "var(--font-sans)",
323
- fontSize: "var(--text-md)",
324
- outline: "none",
325
- transition: "border-color 0.15s ease, background-color 0.15s ease"
326
- },
327
- onMouseEnter: (a) => {
328
- o || (a.currentTarget.style.borderColor = "var(--border-hover)");
329
- },
330
- onMouseLeave: (a) => {
331
- o || (a.currentTarget.style.borderColor = "var(--border)");
332
- },
333
- children: [
334
- /* @__PURE__ */ u(
335
- "div",
336
- {
337
- style: {
338
- display: "flex",
339
- alignItems: "center",
340
- gap: 8,
341
- minWidth: 0,
342
- flex: 1
343
- },
344
- children: [
345
- l && /* @__PURE__ */ e("span", { style: { flexShrink: 0, display: "inline-flex" }, children: l }),
346
- /* @__PURE__ */ e(
347
- "span",
348
- {
349
- style: {
350
- whiteSpace: "nowrap",
351
- overflow: "hidden",
352
- textOverflow: "ellipsis"
353
- },
354
- children: H
355
- }
356
- )
357
- ]
358
- }
359
- ),
360
- /* @__PURE__ */ e("span", { style: { flexShrink: 0, display: "inline-flex" }, children: p || /* @__PURE__ */ e(
361
- "svg",
362
- {
363
- width: "16",
364
- height: "16",
365
- viewBox: "0 0 20 20",
366
- fill: "none",
367
- xmlns: "http://www.w3.org/2000/svg",
368
- style: {
369
- transform: c ? "rotate(180deg)" : "rotate(0deg)",
370
- transition: "transform 150ms ease",
371
- color: "var(--text-muted)"
372
- },
373
- children: /* @__PURE__ */ e(
374
- "path",
375
- {
376
- d: "M5.25 7.5L10 12.25L14.75 7.5",
377
- stroke: "currentColor",
378
- strokeWidth: "1.5",
379
- strokeLinecap: "round",
380
- strokeLinejoin: "round"
381
- }
382
- )
383
- }
384
- ) })
385
- ]
386
- }
387
- ),
388
- c && /* @__PURE__ */ e(
389
- "div",
390
- {
391
- ref: S,
392
- style: {
393
- position: "absolute",
394
- zIndex: 40,
395
- marginTop: 0,
396
- width: "100%",
397
- maxHeight: i,
398
- overflowY: "auto",
399
- backgroundColor: "#FFFFFF",
400
- borderRadius: 8,
401
- borderTopLeftRadius: 0,
402
- borderTopRightRadius: 0,
403
- border: "1px solid rgba(209, 213, 219, 1)",
404
- borderTop: "none",
405
- boxShadow: "0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1)"
406
- },
407
- children: /* @__PURE__ */ e("div", { style: { padding: "4px 0" }, children: g && g.length === 0 ? /* @__PURE__ */ e(
408
- "div",
409
- {
410
- style: {
411
- padding: "8px 12px",
412
- fontSize: "var(--text-sm)",
413
- color: "var(--text-muted)",
414
- fontFamily: "var(--font-sans)"
415
- },
416
- children: "No options"
417
- }
418
- ) : g.map((a) => {
419
- const v = w.has(String(a.value)), m = I === String(a.value);
420
- return /* @__PURE__ */ u(
421
- "div",
422
- {
423
- style: {
424
- display: "flex",
425
- alignItems: "center",
426
- gap: 8,
427
- padding: "6px 12px",
428
- cursor: "pointer",
429
- backgroundColor: j === String(a.value) ? "var(--hover-warm)" : "transparent",
430
- opacity: m ? 0.6 : 1
431
- },
432
- onClick: () => L(a.value),
433
- onMouseEnter: () => T(String(a.value)),
434
- onMouseLeave: () => T(null),
435
- draggable: d,
436
- onDragStart: (f) => {
437
- d && (h(String(a.value)), f.dataTransfer && (f.dataTransfer.effectAllowed = "move"));
438
- },
439
- onDragOver: (f) => {
440
- d && f.preventDefault();
441
- },
442
- onDrop: (f) => {
443
- if (!d) return;
444
- f.preventDefault();
445
- const k = g.findIndex(
446
- (z) => String(z.value) === I
447
- ), C = g.findIndex(
448
- (z) => String(z.value) === String(a.value)
449
- );
450
- if (k === -1 || C === -1 || k === C) {
451
- h(null);
452
- return;
453
- }
454
- const F = [...g], [W] = F.splice(k, 1);
455
- F.splice(C, 0, W), B(F), h(null);
456
- },
457
- onDragEnd: () => {
458
- d && h(null);
459
- },
460
- children: [
461
- d && /* @__PURE__ */ e(
462
- "span",
463
- {
464
- style: {
465
- display: "inline-flex",
466
- alignItems: "center",
467
- justifyContent: "center",
468
- width: 14,
469
- height: 14,
470
- color: "var(--text-faint)",
471
- cursor: "grab"
472
- },
473
- onClick: (f) => {
474
- f.stopPropagation();
475
- },
476
- children: /* @__PURE__ */ e(
477
- "svg",
478
- {
479
- width: "10",
480
- height: "10",
481
- viewBox: "0 0 20 20",
482
- fill: "none",
483
- xmlns: "http://www.w3.org/2000/svg",
484
- children: /* @__PURE__ */ e(
485
- "path",
486
- {
487
- d: "M4 7H16M4 10H16M4 13H16",
488
- stroke: "currentColor",
489
- strokeWidth: "1.4",
490
- strokeLinecap: "round"
491
- }
492
- )
493
- }
494
- )
495
- }
496
- ),
497
- /* @__PURE__ */ e(
498
- $,
499
- {
500
- size: "sm",
501
- checked: v,
502
- onChange: () => L(a.value),
503
- style: { gap: 0 }
504
- }
505
- ),
506
- /* @__PURE__ */ e(
507
- "span",
508
- {
509
- style: {
510
- fontSize: "var(--text-sm)",
511
- color: "var(--text-base)",
512
- fontFamily: "var(--font-sans)"
513
- },
514
- children: a.label
515
- }
516
- )
517
- ]
518
- },
519
- a.value
520
- );
521
- }) })
522
- }
523
- )
524
- ] });
525
- }
526
- function X({ children: s, htmlFor: t, style: n }) {
527
- return /* @__PURE__ */ e(
528
- "label",
529
- {
530
- htmlFor: t,
531
- style: {
532
- display: "block",
533
- fontSize: "var(--text-base)",
534
- color: "var(--text-muted)",
535
- marginBottom: "var(--spacing-1)",
536
- fontFamily: "var(--font-sans)",
537
- ...n
538
- },
539
- children: s
540
- }
541
- );
542
- }
543
- function Z({
544
- children: s,
545
- onConfirm: t,
546
- prompt: n = "Delete?",
547
- confirmLabel: r = "Yes",
548
- cancelLabel: o = "No",
549
- style: l
550
- }) {
551
- const [p, i] = x(!1);
552
- return p ? /* @__PURE__ */ u(
553
- "span",
554
- {
555
- style: {
556
- display: "inline-flex",
557
- alignItems: "center",
558
- gap: "var(--spacing-1)",
559
- ...l
560
- },
561
- children: [
562
- /* @__PURE__ */ e(
563
- "span",
564
- {
565
- style: {
566
- fontSize: "var(--text-sm)",
567
- color: "var(--text-muted)"
568
- },
569
- children: n
570
- }
571
- ),
572
- /* @__PURE__ */ e(
573
- O,
574
- {
575
- variant: "ghost",
576
- size: "sm",
577
- onClick: (d) => {
578
- d.stopPropagation(), t == null || t(), i(!1);
579
- },
580
- style: { color: "var(--text-ink)", fontWeight: "var(--font-semibold)" },
581
- children: r
582
- }
583
- ),
584
- /* @__PURE__ */ e(
585
- O,
586
- {
587
- variant: "ghost",
588
- size: "sm",
589
- onClick: (d) => {
590
- d.stopPropagation(), i(!1);
591
- },
592
- children: o
593
- }
594
- )
595
- ]
596
- }
597
- ) : /* @__PURE__ */ e(
598
- "span",
599
- {
600
- onClick: (d) => {
601
- d.stopPropagation(), i(!0);
602
- },
603
- style: { cursor: "pointer", ...l },
604
- children: s
605
- }
606
- );
607
- }
608
- export {
609
- J as B,
610
- $ as C,
611
- X as F,
612
- Z as I,
613
- U as M,
614
- Q as S,
615
- K as T,
616
- G as a
617
- };
618
- //# sourceMappingURL=InlineConfirm.es.js.map