@alfadocs/ui-kit 0.2.0 → 0.2.2
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/dist/_chunks/{chat-input-DOlsB1fm.js → chat-input-Bov-gkwP.js} +40 -38
- package/dist/_chunks/{combobox-DCNXqbC7.js → combobox-BLWruOxK.js} +74 -75
- package/dist/_chunks/{freemium-paywall-CnvceDav.js → freemium-paywall-CrVefV0M.js} +2 -2
- package/dist/_chunks/{leo-sidebar-CfEY-xi2.js → leo-sidebar-kHO45M6C.js} +2 -2
- package/dist/_chunks/{link-8QmFjIz2.js → link-BcYW1eNM.js} +48 -32
- package/dist/_chunks/{message-card-ChCX9Iv6.js → message-card-DjvsB_3U.js} +12 -12
- package/dist/_chunks/{message-tray-n8q9ITXI.js → message-tray-BbnAzlLH.js} +23 -23
- package/dist/_chunks/{notification-card-hBlPN1-c.js → notification-card-uTPEvAQS.js} +21 -21
- package/dist/_chunks/{notification-tray-C5cnXbl9.js → notification-tray-PGtMqXbP.js} +56 -56
- package/dist/_chunks/{payment-form-C3vT_npe.js → payment-form-B_BdHwjb.js} +21 -21
- package/dist/_chunks/transaction-chip-DE6DITun.js +196 -0
- package/dist/agent-catalog.json +15 -1
- package/dist/components/chat-input/index.js +1 -1
- package/dist/components/combobox/index.js +1 -1
- package/dist/components/freemium-paywall/index.js +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/link/index.js +1 -1
- package/dist/components/link/link.d.ts +1 -0
- package/dist/components/message-card/index.js +1 -1
- package/dist/components/message-tray/index.js +1 -1
- package/dist/components/notification-card/index.js +1 -1
- package/dist/components/notification-tray/index.js +1 -1
- package/dist/components/payment-form/index.js +1 -1
- package/dist/components/transaction-chip/index.d.ts +3 -0
- package/dist/components/transaction-chip/index.js +5 -0
- package/dist/components/transaction-chip/transaction-chip.d.ts +30 -0
- package/dist/i18n/config.js +36 -0
- package/dist/i18n/resources.d.ts +36 -0
- package/dist/index.js +34 -32
- package/dist/locales/de.json +12 -0
- package/dist/locales/en.json +12 -0
- package/dist/locales/it.json +12 -0
- package/dist/patterns/leo-assistant/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as b, jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as k } from "react";
|
|
3
3
|
import { c as w } from "./index-D2ZczOXr.js";
|
|
4
4
|
import { useTranslation as N } from "react-i18next";
|
|
@@ -15,7 +15,7 @@ const _ = [
|
|
|
15
15
|
["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
|
|
16
16
|
], j = L("external-link", _), T = w(
|
|
17
17
|
[
|
|
18
|
-
"ds:
|
|
18
|
+
"ds:underline-offset-4",
|
|
19
19
|
"ds:rounded-[var(--radius-xs)]",
|
|
20
20
|
"ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
|
|
21
21
|
"ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
|
|
@@ -37,73 +37,89 @@ const _ = [
|
|
|
37
37
|
weight: {
|
|
38
38
|
normal: "ds:font-normal",
|
|
39
39
|
strong: "ds:font-semibold"
|
|
40
|
+
},
|
|
41
|
+
// When the link carries an icon, the anchor itself becomes a flex
|
|
42
|
+
// container so glyphs centre on the text optical centre — the
|
|
43
|
+
// previous `vertical-align: -0.125em` heuristic over-corrected when
|
|
44
|
+
// the link was the only thing on its line (e.g. each <li> of a
|
|
45
|
+
// vertical sidebar nav). Text-only links remain plain `inline` so
|
|
46
|
+
// they wrap naturally inside a paragraph.
|
|
47
|
+
hasIcon: {
|
|
48
|
+
no: "ds:inline",
|
|
49
|
+
yes: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]"
|
|
40
50
|
}
|
|
41
51
|
},
|
|
42
52
|
defaultVariants: {
|
|
43
53
|
intent: "default",
|
|
44
|
-
weight: "normal"
|
|
54
|
+
weight: "normal",
|
|
55
|
+
hasIcon: "no"
|
|
45
56
|
}
|
|
46
57
|
}
|
|
47
58
|
), q = k(
|
|
48
59
|
({
|
|
49
60
|
href: l,
|
|
50
|
-
external:
|
|
51
|
-
disabled:
|
|
52
|
-
startIcon:
|
|
53
|
-
endIcon:
|
|
61
|
+
external: e = !1,
|
|
62
|
+
disabled: s = !1,
|
|
63
|
+
startIcon: i,
|
|
64
|
+
endIcon: a,
|
|
54
65
|
intent: t,
|
|
55
66
|
weight: c,
|
|
56
67
|
className: f,
|
|
57
68
|
children: u,
|
|
58
69
|
target: m,
|
|
59
|
-
rel:
|
|
60
|
-
onClick:
|
|
70
|
+
rel: r,
|
|
71
|
+
onClick: o,
|
|
61
72
|
...v
|
|
62
|
-
},
|
|
63
|
-
const { t:
|
|
64
|
-
return /* @__PURE__ */
|
|
73
|
+
}, h) => {
|
|
74
|
+
const { t: p } = N(), g = e ? "_blank" : m, x = e ? [r, "noopener", "noreferrer"].filter(Boolean).join(" ") : r, y = p("ui.link.opensInNewTab", "Opens in a new tab");
|
|
75
|
+
return /* @__PURE__ */ b(
|
|
65
76
|
"a",
|
|
66
77
|
{
|
|
67
|
-
ref:
|
|
68
|
-
href:
|
|
69
|
-
role:
|
|
70
|
-
"aria-disabled":
|
|
78
|
+
ref: h,
|
|
79
|
+
href: s ? void 0 : l,
|
|
80
|
+
role: s ? "link" : void 0,
|
|
81
|
+
"aria-disabled": s || void 0,
|
|
71
82
|
target: g,
|
|
72
83
|
rel: x || void 0,
|
|
73
|
-
onClick: (
|
|
74
|
-
if (
|
|
75
|
-
|
|
84
|
+
onClick: (d) => {
|
|
85
|
+
if (s) {
|
|
86
|
+
d.preventDefault();
|
|
76
87
|
return;
|
|
77
88
|
}
|
|
78
|
-
|
|
89
|
+
o == null || o(d);
|
|
79
90
|
},
|
|
80
91
|
"data-component": "link",
|
|
81
92
|
"data-intent": t ?? "default",
|
|
82
|
-
className: T({
|
|
93
|
+
className: T({
|
|
94
|
+
intent: t,
|
|
95
|
+
weight: c,
|
|
96
|
+
hasIcon: !!(i || a || e) ? "yes" : "no",
|
|
97
|
+
className: f
|
|
98
|
+
}),
|
|
83
99
|
...v,
|
|
84
100
|
children: [
|
|
85
|
-
|
|
101
|
+
i ? /* @__PURE__ */ n(
|
|
86
102
|
"span",
|
|
87
103
|
{
|
|
88
104
|
"aria-hidden": "true",
|
|
89
|
-
className: "ds:inline-flex ds:items-center ds:
|
|
90
|
-
children:
|
|
105
|
+
className: "ds:inline-flex ds:items-center ds:[&_svg]:size-[1em]",
|
|
106
|
+
children: i
|
|
91
107
|
}
|
|
92
108
|
) : null,
|
|
93
109
|
u,
|
|
94
|
-
|
|
110
|
+
e ? /* @__PURE__ */ n(
|
|
95
111
|
"span",
|
|
96
112
|
{
|
|
97
|
-
className: "ds:inline-flex ds:items-center
|
|
98
|
-
"aria-label":
|
|
99
|
-
children: /* @__PURE__ */
|
|
113
|
+
className: "ds:inline-flex ds:items-center",
|
|
114
|
+
"aria-label": y,
|
|
115
|
+
children: /* @__PURE__ */ n(j, { "aria-hidden": "true", className: "ds:size-[1em]" })
|
|
100
116
|
}
|
|
101
|
-
) :
|
|
117
|
+
) : a ? /* @__PURE__ */ n(
|
|
102
118
|
"span",
|
|
103
119
|
{
|
|
104
120
|
"aria-hidden": "true",
|
|
105
|
-
className: "ds:inline-flex ds:items-center ds:
|
|
106
|
-
children:
|
|
121
|
+
className: "ds:inline-flex ds:items-center ds:[&_svg]:size-[1em]",
|
|
122
|
+
children: a
|
|
107
123
|
}
|
|
108
124
|
) : null
|
|
109
125
|
]
|
|
@@ -115,4 +131,4 @@ q.displayName = "Link";
|
|
|
115
131
|
export {
|
|
116
132
|
q as L
|
|
117
133
|
};
|
|
118
|
-
//# sourceMappingURL=link-
|
|
134
|
+
//# sourceMappingURL=link-BcYW1eNM.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as a, jsxs as l } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as B, useMemo as L, useState as U, useRef as W, useCallback as _ } from "react";
|
|
3
|
-
import { c as
|
|
4
|
-
import { useTranslation as
|
|
5
|
-
import { I as
|
|
3
|
+
import { c as D } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as E } from "react-i18next";
|
|
5
|
+
import { I as H } from "./icon-button-C4CGcYuz.js";
|
|
6
6
|
import { B as k } from "./button-DD_0Xdmr.js";
|
|
7
|
-
import { A as
|
|
8
|
-
import { T as
|
|
7
|
+
import { A as X } from "./avatar-Dcr6XuDQ.js";
|
|
8
|
+
import { T as q } from "./timestamp-BV2lC-wV.js";
|
|
9
9
|
import { X as G } from "./x-CCcI3eJp.js";
|
|
10
|
-
const J =
|
|
10
|
+
const J = D(
|
|
11
11
|
[
|
|
12
12
|
"ds:relative ds:flex ds:gap-[var(--spacing-sm)]",
|
|
13
13
|
"ds:rounded-[var(--radius-sm)]",
|
|
@@ -84,7 +84,7 @@ const Q = B(
|
|
|
84
84
|
className: T,
|
|
85
85
|
...z
|
|
86
86
|
}, K) => {
|
|
87
|
-
const { t: n, i18n: v } =
|
|
87
|
+
const { t: n, i18n: v } = E(), M = L(() => {
|
|
88
88
|
const s = new Date(e.sentAt);
|
|
89
89
|
return Number.isNaN(s.getTime()) ? "" : new Intl.DateTimeFormat(v.language, {
|
|
90
90
|
dateStyle: "medium",
|
|
@@ -132,7 +132,7 @@ const Q = B(
|
|
|
132
132
|
"aria-label": C,
|
|
133
133
|
className: j + " ds:contents",
|
|
134
134
|
onClick: (s) => {
|
|
135
|
-
s.defaultPrevented || s.metaKey || s.ctrlKey || s.shiftKey || r(e);
|
|
135
|
+
s.defaultPrevented || s.metaKey || s.ctrlKey || s.shiftKey || (s.preventDefault(), r(e));
|
|
136
136
|
},
|
|
137
137
|
children: i
|
|
138
138
|
}
|
|
@@ -171,7 +171,7 @@ const Q = B(
|
|
|
171
171
|
...z,
|
|
172
172
|
children: [
|
|
173
173
|
/* @__PURE__ */ a(
|
|
174
|
-
|
|
174
|
+
X,
|
|
175
175
|
{
|
|
176
176
|
name: e.sender.name,
|
|
177
177
|
src: e.sender.avatarUrl,
|
|
@@ -217,7 +217,7 @@ const Q = B(
|
|
|
217
217
|
) : null,
|
|
218
218
|
/* @__PURE__ */ a("p", { className: "ds:m-0 type-body-sm ds:text-[color:var(--muted-foreground)] ds:[overflow:hidden] ds:[display:-webkit-box] ds:[-webkit-box-orient:vertical] ds:[-webkit-line-clamp:2] ds:break-words", children: e.preview }),
|
|
219
219
|
/* @__PURE__ */ a(
|
|
220
|
-
|
|
220
|
+
q,
|
|
221
221
|
{
|
|
222
222
|
value: e.sentAt,
|
|
223
223
|
shape: "chip",
|
|
@@ -258,7 +258,7 @@ const Q = B(
|
|
|
258
258
|
] }) : null
|
|
259
259
|
] }),
|
|
260
260
|
d === "compact" && t ? /* @__PURE__ */ a("span", { className: "ds:relative ds:z-[1] ds:opacity-0 ds:group-hover:opacity-100 ds:group-focus-within:opacity-100 ds:transition-opacity ds:motion-reduce:transition-none", children: /* @__PURE__ */ a(
|
|
261
|
-
|
|
261
|
+
H,
|
|
262
262
|
{
|
|
263
263
|
icon: /* @__PURE__ */ a(G, {}),
|
|
264
264
|
intent: "ghost",
|
|
@@ -277,4 +277,4 @@ export {
|
|
|
277
277
|
Q as M,
|
|
278
278
|
O as i
|
|
279
279
|
};
|
|
280
|
-
//# sourceMappingURL=message-card-
|
|
280
|
+
//# sourceMappingURL=message-card-DjvsB_3U.js.map
|
|
@@ -6,8 +6,8 @@ import { useTranslation as W } from "react-i18next";
|
|
|
6
6
|
import { I as ue } from "./icon-button-C4CGcYuz.js";
|
|
7
7
|
import { B as _ } from "./button-DD_0Xdmr.js";
|
|
8
8
|
import { S as U } from "./separator-CYU_bGFn.js";
|
|
9
|
-
import { S as
|
|
10
|
-
import { M as pe } from "./message-card-
|
|
9
|
+
import { S as f } from "./skeleton-CZbwyJAA.js";
|
|
10
|
+
import { M as pe } from "./message-card-DjvsB_3U.js";
|
|
11
11
|
import { u as ge } from "./registry-C9nwlNyL.js";
|
|
12
12
|
import { M as Y } from "./mail-C8irm52s.js";
|
|
13
13
|
const fe = {
|
|
@@ -162,12 +162,12 @@ function R() {
|
|
|
162
162
|
"aria-hidden": "true",
|
|
163
163
|
className: "ds:flex ds:items-start ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-sm)]",
|
|
164
164
|
children: [
|
|
165
|
-
/* @__PURE__ */ s(
|
|
165
|
+
/* @__PURE__ */ s(f, { variant: "circular", size: "sm" }),
|
|
166
166
|
/* @__PURE__ */ c("div", { className: "ds:flex-1 ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
|
|
167
|
-
/* @__PURE__ */ s(
|
|
168
|
-
/* @__PURE__ */ s(
|
|
169
|
-
/* @__PURE__ */ s(
|
|
170
|
-
/* @__PURE__ */ s(
|
|
167
|
+
/* @__PURE__ */ s(f, { variant: "text", size: "md", width: "60%" }),
|
|
168
|
+
/* @__PURE__ */ s(f, { variant: "text", size: "sm", width: "80%" }),
|
|
169
|
+
/* @__PURE__ */ s(f, { variant: "text", size: "sm", width: "95%" }),
|
|
170
|
+
/* @__PURE__ */ s(f, { variant: "text", size: "sm", width: "30%" })
|
|
171
171
|
] })
|
|
172
172
|
]
|
|
173
173
|
}
|
|
@@ -202,10 +202,10 @@ const Te = oe(
|
|
|
202
202
|
items: t,
|
|
203
203
|
unreadCount: T,
|
|
204
204
|
open: k,
|
|
205
|
-
onOpenChange:
|
|
205
|
+
onOpenChange: v,
|
|
206
206
|
onItemClick: u,
|
|
207
207
|
onDismiss: p,
|
|
208
|
-
onMarkRead:
|
|
208
|
+
onMarkRead: y,
|
|
209
209
|
onMarkAllRead: C,
|
|
210
210
|
loading: G = !1,
|
|
211
211
|
maxVisible: J,
|
|
@@ -218,12 +218,12 @@ const Te = oe(
|
|
|
218
218
|
...D
|
|
219
219
|
}, ee) => {
|
|
220
220
|
var A;
|
|
221
|
-
const { t: d } = W(), N = k !== void 0, [se, ae] = q(!1), z = N ? k : se,
|
|
221
|
+
const { t: d } = W(), N = k !== void 0, [se, ae] = q(!1), z = N ? k : se, h = F(
|
|
222
222
|
(e) => {
|
|
223
|
-
N || ae(e),
|
|
223
|
+
N || ae(e), v == null || v(e);
|
|
224
224
|
},
|
|
225
|
-
[N,
|
|
226
|
-
), [
|
|
225
|
+
[N, v]
|
|
226
|
+
), [g, I] = q(
|
|
227
227
|
() => t.map((e) => ({ item: e, leaving: !1 }))
|
|
228
228
|
), K = F(() => {
|
|
229
229
|
if (typeof window > "u") return 200;
|
|
@@ -246,12 +246,12 @@ const Te = oe(
|
|
|
246
246
|
return o;
|
|
247
247
|
});
|
|
248
248
|
}, [t]), H(() => {
|
|
249
|
-
if (!
|
|
249
|
+
if (!g.some((n) => n.leaving)) return;
|
|
250
250
|
const e = K(), r = setTimeout(() => {
|
|
251
251
|
I((n) => n.filter((o) => !o.leaving));
|
|
252
252
|
}, e);
|
|
253
253
|
return () => clearTimeout(r);
|
|
254
|
-
}, [
|
|
254
|
+
}, [g, K]);
|
|
255
255
|
const M = m(null), O = m((A = t[0]) == null ? void 0 : A.id);
|
|
256
256
|
H(() => {
|
|
257
257
|
var n;
|
|
@@ -279,8 +279,8 @@ const Te = oe(
|
|
|
279
279
|
P.current = z;
|
|
280
280
|
const ie = le(
|
|
281
281
|
() => ({
|
|
282
|
-
open: () =>
|
|
283
|
-
close: () =>
|
|
282
|
+
open: () => h(!0),
|
|
283
|
+
close: () => h(!1),
|
|
284
284
|
isOpen: () => P.current,
|
|
285
285
|
getItems: () => l.current.map((e) => ({ id: e.id, read: !!e.read })),
|
|
286
286
|
getUnreadCount: () => V.current ?? l.current.filter((e) => !e.read).length,
|
|
@@ -290,14 +290,14 @@ const Te = oe(
|
|
|
290
290
|
},
|
|
291
291
|
markRead: (e) => {
|
|
292
292
|
const r = l.current.find((n) => n.id === e);
|
|
293
|
-
r && (
|
|
293
|
+
r && (y == null || y(r));
|
|
294
294
|
},
|
|
295
295
|
dismiss: (e) => {
|
|
296
296
|
const r = l.current.find((n) => n.id === e);
|
|
297
297
|
r && (p == null || p(r));
|
|
298
298
|
}
|
|
299
299
|
}),
|
|
300
|
-
[
|
|
300
|
+
[h, u, y, p]
|
|
301
301
|
), B = m(null);
|
|
302
302
|
return me(ee, () => B.current, []), ge(fe, ie, a), /* @__PURE__ */ s(
|
|
303
303
|
"div",
|
|
@@ -307,7 +307,7 @@ const Te = oe(
|
|
|
307
307
|
"data-component-id": a,
|
|
308
308
|
className: [ve({ size: w }), $].filter(Boolean).join(" "),
|
|
309
309
|
...D,
|
|
310
|
-
children: /* @__PURE__ */ c(b.Root, { open: z, onOpenChange:
|
|
310
|
+
children: /* @__PURE__ */ c(b.Root, { open: z, onOpenChange: h, children: [
|
|
311
311
|
/* @__PURE__ */ s(b.Trigger, { asChild: !0, children: /* @__PURE__ */ s(
|
|
312
312
|
ue,
|
|
313
313
|
{
|
|
@@ -364,14 +364,14 @@ const Te = oe(
|
|
|
364
364
|
/* @__PURE__ */ s(
|
|
365
365
|
"div",
|
|
366
366
|
{
|
|
367
|
-
role: "list",
|
|
367
|
+
role: g.length > 0 ? "list" : void 0,
|
|
368
368
|
"data-max-visible": J,
|
|
369
369
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)] ds:overflow-y-auto ds:pt-[var(--spacing-xs)] ds:flex-1 ds:sm:flex-none ds:sm:[max-block-size:var(--message-tray-max-block-size,26rem)]",
|
|
370
370
|
children: G ? /* @__PURE__ */ c(L, { children: [
|
|
371
371
|
/* @__PURE__ */ s(R, {}),
|
|
372
372
|
/* @__PURE__ */ s(R, {}),
|
|
373
373
|
/* @__PURE__ */ s(R, {})
|
|
374
|
-
] }) :
|
|
374
|
+
] }) : g.length === 0 ? /* @__PURE__ */ s(be, {}) : g.map(({ item: e, leaving: r }) => /* @__PURE__ */ s(
|
|
375
375
|
pe,
|
|
376
376
|
{
|
|
377
377
|
item: e,
|
|
@@ -411,4 +411,4 @@ export {
|
|
|
411
411
|
Te as M,
|
|
412
412
|
fe as m
|
|
413
413
|
};
|
|
414
|
-
//# sourceMappingURL=message-tray-
|
|
414
|
+
//# sourceMappingURL=message-tray-BbnAzlLH.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as a, jsxs as n } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as M, useMemo as P, useState as R, useRef as B, useCallback as L } from "react";
|
|
3
|
-
import { c as
|
|
4
|
-
import { useTranslation as
|
|
5
|
-
import { I as
|
|
3
|
+
import { c as D } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as U } from "react-i18next";
|
|
5
|
+
import { I as W } from "./icon-button-C4CGcYuz.js";
|
|
6
6
|
import { B as N } from "./button-DD_0Xdmr.js";
|
|
7
|
-
import { T as
|
|
8
|
-
import { X } from "./x-CCcI3eJp.js";
|
|
9
|
-
const
|
|
7
|
+
import { T as E } from "./timestamp-BV2lC-wV.js";
|
|
8
|
+
import { X as H } from "./x-CCcI3eJp.js";
|
|
9
|
+
const X = D(
|
|
10
10
|
[
|
|
11
11
|
"ds:relative ds:flex ds:gap-[var(--spacing-sm)]",
|
|
12
12
|
"ds:rounded-[var(--radius-sm)]",
|
|
@@ -73,10 +73,10 @@ const q = U(
|
|
|
73
73
|
"ds:focus-visible:after:outline-offset-[length:var(--focus-ring-offset)]",
|
|
74
74
|
"ds:forced-colors:focus-visible:after:outline-[CanvasText]"
|
|
75
75
|
].join(" ");
|
|
76
|
-
function
|
|
76
|
+
function q(e) {
|
|
77
77
|
return /^(https?:\/\/(?!\/)|\/(?!\/)|#)/.test(e);
|
|
78
78
|
}
|
|
79
|
-
const
|
|
79
|
+
const G = M(
|
|
80
80
|
({
|
|
81
81
|
item: e,
|
|
82
82
|
variant: r = "compact",
|
|
@@ -89,7 +89,7 @@ const J = M(
|
|
|
89
89
|
className: z,
|
|
90
90
|
...T
|
|
91
91
|
}, K) => {
|
|
92
|
-
const { t: u, i18n: v } =
|
|
92
|
+
const { t: u, i18n: v } = U(), S = P(() => {
|
|
93
93
|
const s = new Date(e.createdAt);
|
|
94
94
|
return Number.isNaN(s.getTime()) ? "" : new Intl.DateTimeFormat(v.language, {
|
|
95
95
|
dateStyle: "medium",
|
|
@@ -112,7 +112,7 @@ const J = M(
|
|
|
112
112
|
time: S,
|
|
113
113
|
unreadSuffix: I,
|
|
114
114
|
defaultValue: "{{title}}, {{time}}{{unreadSuffix}}"
|
|
115
|
-
}), p = !!e.url &&
|
|
115
|
+
}), p = !!e.url && q(e.url), i = /* @__PURE__ */ a(
|
|
116
116
|
"span",
|
|
117
117
|
{
|
|
118
118
|
className: [
|
|
@@ -130,7 +130,7 @@ const J = M(
|
|
|
130
130
|
"aria-label": x,
|
|
131
131
|
className: C + " ds:contents",
|
|
132
132
|
onClick: (s) => {
|
|
133
|
-
s.defaultPrevented || s.metaKey || s.ctrlKey || s.shiftKey || t(e);
|
|
133
|
+
s.defaultPrevented || s.metaKey || s.ctrlKey || s.shiftKey || (s.preventDefault(), t(e));
|
|
134
134
|
},
|
|
135
135
|
children: i
|
|
136
136
|
}
|
|
@@ -149,7 +149,7 @@ const J = M(
|
|
|
149
149
|
href: e.url,
|
|
150
150
|
className: "ds:text-[color:var(--foreground)] ds:no-underline ds:hover:underline ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
151
151
|
onClick: (s) => {
|
|
152
|
-
s.defaultPrevented || s.metaKey || s.ctrlKey || s.shiftKey || t(e);
|
|
152
|
+
s.defaultPrevented || s.metaKey || s.ctrlKey || s.shiftKey || (s.preventDefault(), t(e));
|
|
153
153
|
},
|
|
154
154
|
children: i
|
|
155
155
|
}
|
|
@@ -163,7 +163,7 @@ const J = M(
|
|
|
163
163
|
"data-read": e.read ? "true" : "false",
|
|
164
164
|
"data-leaving": g ? "true" : void 0,
|
|
165
165
|
"aria-hidden": g || void 0,
|
|
166
|
-
className:
|
|
166
|
+
className: X({ variant: r, size: k, state: F, className: z }),
|
|
167
167
|
...T,
|
|
168
168
|
children: [
|
|
169
169
|
e.icon ? /* @__PURE__ */ a(
|
|
@@ -191,7 +191,7 @@ const J = M(
|
|
|
191
191
|
] }),
|
|
192
192
|
e.description ? /* @__PURE__ */ a("p", { className: "ds:m-0 type-body-sm ds:text-[color:var(--muted-foreground)] ds:[overflow:hidden] ds:[display:-webkit-box] ds:[-webkit-box-orient:vertical] ds:[-webkit-line-clamp:2] ds:break-words", children: e.description }) : null,
|
|
193
193
|
/* @__PURE__ */ a(
|
|
194
|
-
|
|
194
|
+
E,
|
|
195
195
|
{
|
|
196
196
|
value: e.createdAt,
|
|
197
197
|
shape: "chip",
|
|
@@ -212,7 +212,7 @@ const J = M(
|
|
|
212
212
|
{
|
|
213
213
|
href: e.url,
|
|
214
214
|
onClick: (s) => {
|
|
215
|
-
s.defaultPrevented || s.metaKey || s.ctrlKey || s.shiftKey || t == null || t(e);
|
|
215
|
+
s.defaultPrevented || s.metaKey || s.ctrlKey || s.shiftKey || (s.preventDefault(), t == null || t(e));
|
|
216
216
|
},
|
|
217
217
|
children: l
|
|
218
218
|
}
|
|
@@ -232,9 +232,9 @@ const J = M(
|
|
|
232
232
|
] }) : null
|
|
233
233
|
] }),
|
|
234
234
|
r === "compact" && d ? /* @__PURE__ */ a("span", { className: "ds:relative ds:z-[1] ds:opacity-0 ds:group-hover:opacity-100 ds:group-focus-within:opacity-100 ds:transition-opacity ds:motion-reduce:transition-none", children: /* @__PURE__ */ a(
|
|
235
|
-
|
|
235
|
+
W,
|
|
236
236
|
{
|
|
237
|
-
icon: /* @__PURE__ */ a(
|
|
237
|
+
icon: /* @__PURE__ */ a(H, {}),
|
|
238
238
|
intent: "ghost",
|
|
239
239
|
size: "sm",
|
|
240
240
|
"aria-label": u(
|
|
@@ -249,9 +249,9 @@ const J = M(
|
|
|
249
249
|
);
|
|
250
250
|
}
|
|
251
251
|
);
|
|
252
|
-
|
|
252
|
+
G.displayName = "NotificationCard";
|
|
253
253
|
export {
|
|
254
|
-
|
|
255
|
-
|
|
254
|
+
G as N,
|
|
255
|
+
q as i
|
|
256
256
|
};
|
|
257
|
-
//# sourceMappingURL=notification-card-
|
|
257
|
+
//# sourceMappingURL=notification-card-uTPEvAQS.js.map
|