@telia-ace/knowledge-widget-ui 1.0.40-experimental.9 → 1.0.40

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/index.js CHANGED
@@ -1,100 +1,1391 @@
1
- export * from "@telia-ace/widget-ui";
2
- import { LitElement as u, nothing as f, html as t, unsafeCSS as v } from "lit";
3
- import { property as p, state as g } from "lit/decorators.js";
4
- const w = `.wrapper{overflow:hidden;justify-content:flex-start;padding:var(--notification-list-padding, var(--size-large));margin:var(--notification-list-margin, 0);min-width:var(--notification-list-min-width)}@media (hover: hover){.wrapper button:hover{text-decoration:underline}}.wrapper h1{margin:0 0 var(--size-normal);font-size:var(--fonts-medium);font-weight:400;line-height:1.8em;color:var(--colors-text)}.wrapper h1{display:flex;align-items:center}.wrapper h1 i{margin:7px var(--size-normal) 0 0;width:24px;display:inline-block;vertical-align:text-bottom;align-self:flex-start;min-width:24px;min-height:24px;text-align:center}.wrapper .notification-title{display:none}.wrapper[data-show-header=true] .notification-title{display:block}ul{padding:0;margin:0;list-style:none}ul>li{margin:0 0 var(--size-normal);white-space:nowrap;text-overflow:ellipsis;min-width:0}ul>li:focus{outline-offset:-2px}ul>li>a{text-decoration:none}ul>li:last-child{margin:0}li .notification-body{font-size:var(--fonts-normal);line-height:1.5em;color:var(--colors-text);font-weight:300;display:none}li .notification-body h1,li .notification-body h2,li .notification-body h3,li .notification-body h4,li .notification-body h5,li .notification-body h6{word-break:break-word}li .notification-body h1:first-child,li .notification-body h2:first-child,li .notification-body h3:first-child,li .notification-body h4:first-child,li .notification-body h5:first-child,li .notification-body h6:first-child{margin-top:0}li .notification-body h1:only-child,li .notification-body h2:only-child,li .notification-body h3:only-child,li .notification-body h4:only-child,li .notification-body h5:only-child,li .notification-body h6:only-child{margin:0}li .notification-body h1:last-child,li .notification-body h2:last-child,li .notification-body h3:last-child,li .notification-body h4:last-child,li .notification-body h5:last-child,li .notification-body h6:last-child{margin-bottom:0}li .notification-body a{color:var(--colors-link)}li .notification-body a:focus-visible{outline:var(--accessibility-border);color:var(--accessibility-colors-inactiveText);border-color:transparent;text-decoration:underline}li .notification-body img{max-width:100%!important;height:auto!important}li .notification-body p{word-break:break-word;margin:var(--size-normal) 0}li .notification-body p:first-child{margin:0 0 var(--size-normal)}li .notification-body p:last-child{margin:var(--size-normal) 0 0}li .notification-body p:only-child{margin:0}li .notification-body:not(:only-child){margin:var(--size-normal) 0}li .notification-body p{white-space:normal}li[data-expanded=true] .notification-body{display:block}li>span{display:block;font-weight:300;color:var(--colors-accent)}button{-webkit-appearance:button;text-transform:none;overflow:visible;outline:none;border:none;background-color:transparent;cursor:pointer;font-family:inherit;font-size:inherit;line-height:normal;margin:0;padding:0;display:flex;justify-content:space-between;align-items:center;width:100%;text-align:left}button svg,button i{color:var(--colors-primary)}button span{color:var(--colors-text);font-size:var(--fonts-normal);overflow:hidden;text-overflow:ellipsis;flex:1;white-space:nowrap}button:focus-visible{outline:var(--accessibility-border);color:var(--accessibility-colors-inactiveText);border-color:transparent}button:focus-visible span{color:var(--colors-primary);text-decoration:underline}.timestamp{font-size:var(--fonts-small);font-weight:300}ui-symbol-badge{margin:0 0 0 var(--size-small);--icon-color: var(--colors-primary)}
5
- `;
6
- var x = Object.defineProperty, $ = Object.getOwnPropertyDescriptor, c = (d, e, o, l) => {
7
- for (var i = l > 1 ? void 0 : l ? $(e, o) : e, r = d.length - 1, n; r >= 0; r--)
8
- (n = d[r]) && (i = (l ? n(e, o, i) : n(i)) || i);
9
- return l && i && x(e, o, i), i;
1
+ var He = Object.defineProperty, je = Object.defineProperties;
2
+ var Oe = Object.getOwnPropertyDescriptors;
3
+ var R = Object.getOwnPropertySymbols;
4
+ var oe = Object.prototype.hasOwnProperty, se = Object.prototype.propertyIsEnumerable;
5
+ var re = (t, e, a) => e in t ? He(t, e, { enumerable: !0, configurable: !0, writable: !0, value: a }) : t[e] = a, y = (t, e) => {
6
+ for (var a in e || (e = {}))
7
+ oe.call(e, a) && re(t, a, e[a]);
8
+ if (R)
9
+ for (var a of R(e))
10
+ se.call(e, a) && re(t, a, e[a]);
11
+ return t;
12
+ }, k = (t, e) => je(t, Oe(e));
13
+ var w = (t, e) => {
14
+ var a = {};
15
+ for (var r in t)
16
+ oe.call(t, r) && e.indexOf(r) < 0 && (a[r] = t[r]);
17
+ if (t != null && R)
18
+ for (var r of R(t))
19
+ e.indexOf(r) < 0 && se.call(t, r) && (a[r] = t[r]);
20
+ return a;
10
21
  };
11
- class a extends u {
12
- constructor() {
13
- super(), this._expanded = null, this.loading = !1, this.showHeader = !1;
22
+ import { css as $, keyframes as he } from "@emotion/react";
23
+ import d from "@emotion/styled";
24
+ import { useRouteData as ge, Link as Ye, Icon as H, List as Z, list as pe, invertedHoverButton as ye, Drawer as _e, ItemList as O, itemList as Y, Dropdown as $e, headingElement as ee, Text as ve, Button as te, paddedBorderTabStyle as ie, Confirm as Ke, SymbolBadge as N, StyledText as J, convertToStringAttributes as xe, useKeyPress as W, useContainer as Ve, useEventListener as le, DateFormats as be, Timestamp as we, useIsTabbing as qe, usePrevious as Ge, TextLink as Q, borderTabStyle as X, Paragraph as Ue, genericHtml as Je, AnchorLink as Qe, WidgetLink as Xe } from "@telia-ace/widget-ui";
25
+ export * from "@telia-ace/widget-ui";
26
+ import n, { forwardRef as _, useCallback as z, useState as T, useEffect as K, useMemo as Ze, useRef as Ee, useImperativeHandle as et } from "react";
27
+ import { createParams as j, formatUrl as ce, appendClassNames as S, htmlParentContains as tt } from "@telia-ace/widget-utilities";
28
+ const at = ({
29
+ title: t = "",
30
+ className: e,
31
+ id: a,
32
+ parent: r,
33
+ connection: s,
34
+ type: i,
35
+ target: o,
36
+ href: c,
37
+ children: m,
38
+ connectionKey: f
39
+ }) => {
40
+ const u = {}, { name: l, params: h } = ge();
41
+ switch (i) {
42
+ case "default":
43
+ case "guide":
44
+ const { id: E, title: g } = r;
45
+ let v = f || s;
46
+ E !== a && !f && (v = void 0), u.routeName = l, u.params = j(k(y({}, h), {
47
+ guide: a,
48
+ connection: v,
49
+ uriName: a === E ? ce(g) : ce(t)
50
+ }));
51
+ break;
52
+ case "link":
53
+ u.href = c, u.target = o;
54
+ break;
14
55
  }
15
- render() {
16
- var n;
17
- if (!this.notificationList || !((n = this.notificationList) != null && n.notifications) && !this.loading)
18
- return f;
19
- const {
20
- id: e,
21
- title: o,
22
- symbol: l,
23
- notifications: i = [],
24
- defaultHeaderOptions: r = { visible: !0 }
25
- } = this.notificationList || {};
26
- return t`
27
- <div
28
- class="wrapper"
29
- data-notification-category=${this.id}
30
- data-loading=${this.loading}
31
- data-show-header=${typeof this.showHeader == "boolean" ? this.showHeader : r.visible}
32
- >
33
- ${o ? t`<h1 class="notification-title">${o}</h1>` : f}
34
- <ul>
35
- ${this.notificationList.notifications.map(
36
- ({ id: s, title: h, body: b, modified: m, expandable: y }) => t`<li
37
- data-expanded=${y ? this._expanded === s : !0}
38
- >
39
- ${y ? t`
40
- <button
41
- title=${h}
42
- aria-label=${h}
43
- aria-expanded=${this._expanded === s}
44
- @click=${() => {
45
- this._expanded = this._expanded === s ? null : s;
46
- }}
47
- >
48
- <span>${h}</span>
49
- ${this._expanded === s ? t` <ui-symbol-badge
50
- size="11"
51
- .symbol=${{
52
- type: "Svg",
53
- content: "caret-up"
54
- }}
55
- />` : t` <ui-symbol-badge
56
- size="11"
57
- .symbol=${{
58
- type: "Svg",
59
- content: "caret-down"
60
- }}
61
- />`}
62
- </button>
63
- <ui-html
64
- class="notification-body"
65
- .html=${b}
66
- ></ui-html>
67
- ${m ? t`<ui-timestamp
68
- .timestamp=${m}
69
- ></ui-timestamp>` : f}
70
- ` : t`
71
- <ui-html
72
- class="notification-body"
73
- .html=${b}
74
- ></ui-html>
75
- `}
76
- </li>`
77
- )}
78
- </ul>
79
- </div>
56
+ return /* @__PURE__ */ n.createElement(Ye, y({ className: S(e, "humany-dialog-link") }, u), m || /* @__PURE__ */ n.createElement(n.Fragment, null, i === "link" && /* @__PURE__ */ n.createElement(H, { faIcon: "link" }), /* @__PURE__ */ n.createElement("span", null, t)));
57
+ }, ke = at, ta = _((s, r) => {
58
+ var i = s, { className: t, dialog: e } = i, a = w(i, ["className", "dialog"]);
59
+ return e.length ? /* @__PURE__ */ n.createElement(
60
+ nt,
61
+ k(y({
62
+ className: S(t, "humany-dialog"),
63
+ items: e,
64
+ renderItem: (o) => /* @__PURE__ */ n.createElement("li", { key: o.connection, "data-dialog": o.connection }, /* @__PURE__ */ n.createElement(ke, y({}, o)))
65
+ }, a), {
66
+ ref: r
67
+ })
68
+ ) : null;
69
+ }), nt = d(Z)`
70
+ ${pe}
71
+ a {
72
+ min-width: 150px;
73
+ max-width: 400px;
74
+ display: block;
75
+ white-space: normal;
76
+ ${(t) => {
77
+ var e, a;
78
+ return ((e = t.theme.colors) == null ? void 0 : e.primary) && ye({
79
+ primaryColor: (a = t.theme.colors) == null ? void 0 : a.primary,
80
+ secondaryColor: "#FFFFFF",
81
+ theme: t.theme
82
+ });
83
+ }}
84
+ }
85
+
86
+ i {
87
+ margin: 0 ${(t) => {
88
+ var e;
89
+ return (e = t.theme.sizes) == null ? void 0 : e.small;
90
+ }} 0 0;
91
+ }
92
+ `, rt = (u) => {
93
+ var l = u, {
94
+ trigger: t,
95
+ header: e,
96
+ className: a,
97
+ animation: r,
98
+ fullScreen: s,
99
+ onToggle: i,
100
+ children: o,
101
+ ref: c,
102
+ closeButtonAriaLabel: m
103
+ } = l, f = w(l, [
104
+ "trigger",
105
+ "header",
106
+ "className",
107
+ "animation",
108
+ "fullScreen",
109
+ "onToggle",
110
+ "children",
111
+ "ref",
112
+ "closeButtonAriaLabel"
113
+ ]);
114
+ return /* @__PURE__ */ n.createElement(
115
+ _e,
116
+ {
117
+ className: S(a, "humany-drawer-list"),
118
+ trigger: t,
119
+ header: e,
120
+ animation: r,
121
+ fullScreen: s,
122
+ onToggle: i,
123
+ closeButtonAriaLabel: m
124
+ },
125
+ /* @__PURE__ */ n.createElement(ot, y({}, f), o)
126
+ );
127
+ }, aa = rt, ot = d(O)`
128
+ ${Y}
129
+ font-family: ${(t) => {
130
+ var e;
131
+ return (e = t.theme.fonts) == null ? void 0 : e.type;
132
+ }};
133
+ padding: ${(t) => {
134
+ var e;
135
+ return (e = t.theme.sizes) == null ? void 0 : e.medium;
136
+ }};
137
+ > ul > li {
138
+ overflow: visible;
139
+ font-weight: 300;
140
+ font-size: ${(t) => {
141
+ var e;
142
+ return (e = t.theme.fonts) == null ? void 0 : e.normal;
143
+ }};
144
+ }
145
+ `, st = ({ items: t, renderItem: e, trigger: a, header: r, children: s }) => /* @__PURE__ */ n.createElement($e, { className: "humany-dropdown-actions", trigger: a }, /* @__PURE__ */ n.createElement(it, null, !!r && /* @__PURE__ */ n.createElement(lt, null, r), t && e && /* @__PURE__ */ n.createElement(ct, { items: t, renderItem: e }), s)), na = st, it = d.div`
146
+ background: #fff;
147
+ border: #ccc 1px solid;
148
+ box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
149
+ font-family: ${(t) => {
150
+ var e;
151
+ return (e = t.theme.fonts) == null ? void 0 : e.type;
152
+ }};
153
+ font-size: ${(t) => {
154
+ var e;
155
+ return (e = t.theme.fonts) == null ? void 0 : e.normal;
156
+ }};
157
+ `, lt = d.div`
158
+ padding: ${(t) => {
159
+ var e;
160
+ return (e = t.theme.sizes) == null ? void 0 : e.normal;
161
+ }};
162
+ padding-bottom: 0;
163
+ font-size: ${(t) => {
164
+ var e;
165
+ return (e = t.theme.fonts) == null ? void 0 : e.normal;
166
+ }};
167
+ font-weight: normal;
168
+ white-space: nowrap;
169
+ display: flex;
170
+ align-items: center;
171
+
172
+ h1,
173
+ h2,
174
+ h3,
175
+ h4,
176
+ h5,
177
+ h6 {
178
+ margin: 0;
179
+ font-weight: normal;
180
+ padding-bottom: 0;
181
+ }
182
+
183
+ svg,
184
+ i {
185
+ margin-right: ${(t) => {
186
+ var e;
187
+ return (e = t.theme.sizes) == null ? void 0 : e.small;
188
+ }};
189
+ }
190
+ `, ct = d(Z)`
191
+ list-style: none;
192
+ padding: 0;
193
+ margin: 0;
194
+ padding: ${(t) => {
195
+ var e;
196
+ return (e = t.theme.sizes) == null ? void 0 : e.small;
197
+ }} 0;
198
+
199
+ li {
200
+ background: #fff;
201
+
202
+ a {
203
+ display: block;
204
+ font-size: ${(t) => {
205
+ var e;
206
+ return (e = t.theme.fonts) == null ? void 0 : e.small;
207
+ }};
208
+ padding: ${(t) => {
209
+ var e, a;
210
+ return `${(e = t.theme.sizes) == null ? void 0 : e.small} ${(a = t.theme.sizes) == null ? void 0 : a.normal}`;
211
+ }};
212
+ cursor: pointer;
213
+ color: #555;
214
+ text-decoration: none;
215
+
216
+ &:hover {
217
+ background: #f9f9f9;
218
+ color: ${(t) => {
219
+ var e;
220
+ return (e = t.theme.colors) == null ? void 0 : e.primary;
221
+ }};
222
+ }
223
+ }
224
+ }
225
+ `, mt = (i) => {
226
+ var o = i, {
227
+ trigger: t,
228
+ className: e,
229
+ children: a,
230
+ closeButtonAriaLabel: r
231
+ } = o, s = w(o, [
232
+ "trigger",
233
+ "className",
234
+ "children",
235
+ "closeButtonAriaLabel"
236
+ ]);
237
+ return /* @__PURE__ */ n.createElement(
238
+ $e,
239
+ {
240
+ className: S(e, "humany-dropdown-list"),
241
+ closeButtonAriaLabel: r,
242
+ trigger: t
243
+ },
244
+ /* @__PURE__ */ n.createElement(dt, y({}, s), a)
245
+ );
246
+ }, ra = mt, dt = d(O)`
247
+ ${Y}
248
+ font-family: ${(t) => {
249
+ var e;
250
+ return (e = t.theme.fonts) == null ? void 0 : e.type;
251
+ }};
252
+ > div {
253
+ ${(t) => {
254
+ var e;
255
+ return ee(t)(
256
+ "> h1",
257
+ $`
258
+ font-size: ${(e = t.theme.fonts) == null ? void 0 : e.normal};
259
+ line-height: 1.2em;
260
+ `
261
+ );
262
+ }}
263
+ }
264
+ > ul > li {
265
+ overflow: visible;
266
+ font-weight: 300;
267
+ font-size: ${(t) => {
268
+ var e;
269
+ return (e = t.theme.fonts) == null ? void 0 : e.normal;
270
+ }};
271
+
272
+ a {
273
+ display: inline-block;
274
+
275
+ @media (hover: hover) {
276
+ &:hover {
277
+ text-decoration: underline;
278
+ }
279
+ }
280
+ }
281
+ }
282
+ `, ut = (t) => $`
283
+ ${t["data-loading"] && "position: relative;"};
284
+ ${t["data-loading"] && "min-height: 150px;"}
285
+ > * {
286
+ transition: 200ms ease-out opacity;
287
+ opacity: ${t["data-loading"] ? "0.5" : "1"};
288
+ }
289
+ .humany-loader {
290
+ opacity: ${t["data-loading"] ? "1" : "0"};
291
+ }
292
+ `, oa = d(H)`
293
+ && {
294
+ font-size: ${(t) => {
295
+ var e;
296
+ return (e = t.theme.fonts) == null ? void 0 : e.small;
297
+ }};
298
+ }
299
+ width: 1.2em;
300
+ `, sa = d(ve)`
301
+ font-size: ${(t) => {
302
+ var e;
303
+ return (e = t.theme.fonts) == null ? void 0 : e.medium;
304
+ }};
305
+ font-weight: normal;
306
+ line-height: 1.2em;
307
+ color: ${(t) => {
308
+ var e;
309
+ return (e = t.theme.colors) == null ? void 0 : e.text;
310
+ }};
311
+ `, ft = d(te)`
312
+ display: flex;
313
+ align-items: center;
314
+
315
+ ${(t) => {
316
+ var e;
317
+ return t["data-has-label"] === "true" && t["data-has-symbol"] === "true" && `
318
+ svg, i {
319
+ margin: 0 ${(e = t.theme.sizes) == null ? void 0 : e.small} 0 0;
320
+ }
321
+ `;
322
+ }}
323
+
324
+ &:focus-visible {
325
+ ${(t) => t["data-has-label"] === "true" && ie}
326
+
327
+ svg, i {
328
+ ${(t) => t["data-has-label"] === "false" && t["data-has-symbol"] === "true" && $`
329
+ ${ie(t)}
330
+ box-sizing: content-box;
331
+ `}
332
+ }
333
+ }
334
+
335
+ span {
336
+ flex: 1;
337
+ font-weight: 300;
338
+ }
339
+ `, ht = ({
340
+ addFavoriteTooltip: t,
341
+ removeFavoriteCancelLabel: e,
342
+ removeFavoriteConfirmLabel: a,
343
+ removeFavoriteHeader: r,
344
+ removeFavoriteLabel: s,
345
+ removeFavoriteTooltip: i,
346
+ id: o,
347
+ isFavorite: c,
348
+ guideTitle: m,
349
+ buttonLabel: f = "",
350
+ actions: { addFavorite: u, removeFavorite: l }
351
+ }) => {
352
+ const h = z(() => {
353
+ l(o);
354
+ }, [o, l]), E = z(() => {
355
+ u(o);
356
+ }, [o, u]), g = `${c ? i : t}${m ? `: "${m}"` : ""}`;
357
+ return /* @__PURE__ */ n.createElement(n.Fragment, null, c ? /* @__PURE__ */ n.createElement(
358
+ Ke,
359
+ {
360
+ trigger: /* @__PURE__ */ n.createElement(
361
+ me,
362
+ {
363
+ className: "humany-favorite-button",
364
+ title: g,
365
+ "aria-label": g,
366
+ "data-favorite": "true",
367
+ "data-has-label": f ? "true" : "false",
368
+ "data-has-symbol": "true"
369
+ },
370
+ /* @__PURE__ */ n.createElement(
371
+ N,
372
+ {
373
+ size: 16,
374
+ symbol: { type: "Svg", content: "star-empty" }
375
+ }
376
+ ),
377
+ f && /* @__PURE__ */ n.createElement(J, null, f)
378
+ ),
379
+ onConfirm: h,
380
+ cancelLabel: e,
381
+ confirmLabel: a,
382
+ header: r,
383
+ text: s
384
+ }
385
+ ) : /* @__PURE__ */ n.createElement(
386
+ me,
387
+ {
388
+ className: "humany-favorite-button",
389
+ title: g,
390
+ "aria-label": g,
391
+ onClick: E,
392
+ "data-favorite": "false",
393
+ "data-has-label": f ? "true" : "false",
394
+ "data-has-symbol": "true"
395
+ },
396
+ /* @__PURE__ */ n.createElement(N, { size: 16, symbol: { type: "Svg", content: "star-empty" } }),
397
+ f && /* @__PURE__ */ n.createElement(J, null, f)
398
+ ));
399
+ }, gt = ht, me = d(ft)`
400
+ grid-area: favorite;
401
+
402
+ &:focus-visible {
403
+ svg {
404
+ ${(t) => {
405
+ var e, a;
406
+ return t["data-favorite"] === "true" ? `
407
+ fill: transparent;
408
+
409
+ path {
410
+ fill: transparent;
411
+ }
412
+ ` : `
413
+ fill: ${(e = t.theme.colors) == null ? void 0 : e.text};
414
+
415
+ path {
416
+ fill: ${(a = t.theme.colors) == null ? void 0 : a.text};
417
+ }
418
+ `;
419
+ }}
420
+ }
421
+ }
422
+
423
+ ${(t) => {
424
+ var e, a, r, s, i, o, c;
425
+ return ((e = t.theme.colors) == null ? void 0 : e.text) && $`
426
+ svg {
427
+ stroke: ${(a = t.theme.colors) == null ? void 0 : a.text};
428
+
429
+ path {
430
+ stroke: ${(r = t.theme.colors) == null ? void 0 : r.text};
431
+ }
432
+
433
+ ${t["data-favorite"] === "true" && `
434
+ fill: ${(s = t.theme.colors) == null ? void 0 : s.text};
435
+
436
+ path {
437
+ fill: ${(i = t.theme.colors) == null ? void 0 : i.text};
438
+ }
439
+ `}
440
+ }
441
+
442
+ &:hover {
443
+ svg {
444
+ ${t["data-favorite"] === "true" ? `
445
+ fill: transparent;
446
+
447
+ path {
448
+ fill: transparent;
449
+ }
450
+ ` : `
451
+ fill: ${(o = t.theme.colors) == null ? void 0 : o.text};
452
+
453
+ path {
454
+ fill: ${(c = t.theme.colors) == null ? void 0 : c.text};
455
+ }
456
+ `}
457
+ }
458
+ }
80
459
  `;
460
+ }}
461
+ `, ia = _(
462
+ (f, m) => {
463
+ var u = f, {
464
+ onFeedback: t = () => {
465
+ },
466
+ direction: e = "horizontal",
467
+ className: a,
468
+ header: r,
469
+ positive: s,
470
+ negative: i,
471
+ selected: o
472
+ } = u, c = w(u, [
473
+ "onFeedback",
474
+ "direction",
475
+ "className",
476
+ "header",
477
+ "positive",
478
+ "negative",
479
+ "selected"
480
+ ]);
481
+ return /* @__PURE__ */ n.createElement(
482
+ yt,
483
+ k(y({
484
+ className: S(a, "humany-feedback"),
485
+ "data-direction": e
486
+ }, xe(c)), {
487
+ ref: m
488
+ }),
489
+ !!r && /* @__PURE__ */ n.createElement(pt, null, r),
490
+ /* @__PURE__ */ n.createElement(
491
+ de,
492
+ {
493
+ className: "humany-feedback-button",
494
+ disabled: !!o,
495
+ "aria-pressed": o === "positive",
496
+ "data-selected": o === "positive",
497
+ "data-direction": e,
498
+ onClick: () => t("positive")
499
+ },
500
+ /* @__PURE__ */ n.createElement(H, { faIcon: "smile-o" }),
501
+ /* @__PURE__ */ n.createElement("span", null, s)
502
+ ),
503
+ /* @__PURE__ */ n.createElement(
504
+ de,
505
+ {
506
+ className: "humany-feedback-button",
507
+ disabled: !!o,
508
+ "aria-pressed": o === "negative",
509
+ "data-selected": o === "negative",
510
+ "data-direction": e,
511
+ onClick: () => t("negative")
512
+ },
513
+ /* @__PURE__ */ n.createElement(H, { faIcon: "frown-o" }),
514
+ /* @__PURE__ */ n.createElement("span", null, i)
515
+ )
516
+ );
517
+ }
518
+ ), pt = d(J)`
519
+ font-weight: normal;
520
+ margin: 0 0 ${(t) => {
521
+ var e;
522
+ return (e = t.theme.sizes) == null ? void 0 : e.normal;
523
+ }};
524
+ font-size: ${(t) => {
525
+ var e;
526
+ return (e = t.theme.fonts) == null ? void 0 : e.normal;
527
+ }};
528
+ display: block;
529
+ `, de = d(te)`
530
+ display: inline-block;
531
+ font-size: ${(t) => {
532
+ var e;
533
+ return (e = t.theme.fonts) == null ? void 0 : e.normal;
534
+ }};
535
+ font-weight: 300;
536
+ && {
537
+ margin-right: ${(t) => {
538
+ var e;
539
+ return (e = t.theme.sizes) == null ? void 0 : e.large;
540
+ }};
541
+ }
542
+
543
+ ${(t) => {
544
+ var e, a;
545
+ return t["data-direction"] === "horizontal" && $`
546
+ width: 225px;
547
+ max-width: calc(50% - ${(e = t.theme.sizes) == null ? void 0 : e.large} - ${(a = t.theme.sizes) == null ? void 0 : a.small});
548
+ `;
549
+ }}
550
+
551
+ ${(t) => t["data-direction"] === "vertical" && $`
552
+ min-width: 190px;
553
+ `}
554
+
555
+ ${(t) => {
556
+ var e, a;
557
+ return ((e = t.theme.colors) == null ? void 0 : e.primary) && ye({
558
+ active: t["data-selected"],
559
+ primaryColor: (a = t.theme.colors) == null ? void 0 : a.primary,
560
+ secondaryColor: "#FFFFFF",
561
+ theme: t.theme
562
+ });
563
+ }}
564
+
565
+ i {
566
+ margin: 0 ${(t) => {
567
+ var e;
568
+ return (e = t.theme.sizes) == null ? void 0 : e.small;
569
+ }} 0 0;
570
+ }
571
+ `, yt = d.div`
572
+ ${(t) => {
573
+ var e;
574
+ return t["data-direction"] === "vertical" && $`
575
+ > button {
576
+ width: 100%;
577
+ &:not(:last-child) {
578
+ margin-bottom: ${(e = t.theme.sizes) == null ? void 0 : e.normal};
579
+ }
580
+ }
581
+ `;
582
+ }}
583
+ `, $t = () => {
584
+ const [t, e] = T(null), a = W("ArrowLeft"), r = W("ArrowRight"), s = W("ArrowUp"), i = W("ArrowDown");
585
+ return K(() => {
586
+ e(a ? "left" : r ? "right" : s ? "up" : i ? "down" : null);
587
+ }, [a, r, s, i]), t;
588
+ }, la = $t, vt = (t, e) => {
589
+ const [a, r] = T(t), s = z(() => setTimeout(() => {
590
+ r(t);
591
+ }, e), [e, r, t]);
592
+ return K(
593
+ () => {
594
+ const i = s();
595
+ return () => {
596
+ clearTimeout(i);
597
+ };
598
+ },
599
+ [s]
600
+ ), a;
601
+ }, ca = vt, xt = () => {
602
+ const t = Ve(), [e, a] = T([]), r = t.get("favorites");
603
+ K(() => {
604
+ if (r) {
605
+ a(r.get());
606
+ const { events: m } = t.get("$widget");
607
+ return m.subscribe("widget:favorites-updated", (u, { updated: l }) => {
608
+ a([...l]);
609
+ });
610
+ }
611
+ }, []);
612
+ const s = (m) => r ? r.add(m) : Promise.resolve([]), i = (m) => r ? r.remove(m) : Promise.resolve([]), o = () => r ? r.clear() : Promise.resolve([]), c = z(
613
+ (m) => e.indexOf(m) > -1 ? i(m) : s(m),
614
+ [e]
615
+ );
616
+ return [
617
+ e,
618
+ Ze(
619
+ () => ({
620
+ addFavorite: s,
621
+ removeFavorite: i,
622
+ clearFavorites: o,
623
+ toggleFavorite: c
624
+ }),
625
+ [e]
626
+ )
627
+ ];
628
+ }, bt = xt, ma = () => {
629
+ const [t, e] = T(!1), a = Ee(), r = z(() => e(!0), [e]), s = z(() => e(!1), [e]);
630
+ return le("mouseenter", r, a.current), le("mouseleave", s, a.current), [t, a];
631
+ }, wt = ({
632
+ format: t = be.YYYY_MM_DD_HH_MM,
633
+ className: e = "",
634
+ byLabel: a = "",
635
+ modifiedLabel: r = "",
636
+ publishedLabel: s = "",
637
+ modifiedBy: i = "",
638
+ publishedBy: o = "",
639
+ showModified: c = !1,
640
+ showPublished: m = !1,
641
+ modified: f,
642
+ published: u
643
+ }) => {
644
+ const l = m && u ? /* @__PURE__ */ n.createElement(ue, { format: t, timestamp: u }) : null, h = c && f ? /* @__PURE__ */ n.createElement(ue, { format: t, timestamp: f }) : null;
645
+ return !l && !h ? null : /* @__PURE__ */ n.createElement(U, { className: S(e, "humany-metadata") }, l && /* @__PURE__ */ n.createElement(U, { className: "humany-published" }, s, l, a && o && ` ${a.replace("{{editor}}", o)}`), h && /* @__PURE__ */ n.createElement(U, { className: "humany-modified" }, l && ", ", r, h, a && i && ` ${a.replace("{{editor}}", i)}`));
646
+ }, Et = wt, ue = d(we)`
647
+ &:not(:first-child) {
648
+ margin-left: 4px;
649
+ }
650
+ &:not(:last-child) {
651
+ margin-right: 4px;
652
+ }
653
+ `, U = d(ve)`
654
+ font-style: italic;
655
+ `, kt = ({ tags: t }) => t.filter((e) => e.symbol).length ? /* @__PURE__ */ n.createElement(
656
+ Nt,
657
+ {
658
+ className: "humany-guide-list-tags",
659
+ items: t,
660
+ renderItem: ({ id: e, symbol: a, title: r }) => a && /* @__PURE__ */ n.createElement("li", { key: e, "data-tag": e }, /* @__PURE__ */ n.createElement(Lt, { size: 18, symbol: a, title: r }))
661
+ }
662
+ ) : null, da = _(({ title: t, id: e, route: a, symbolSize: r, collapseUri: s, children: i }, o) => {
663
+ const { params: c } = ge();
664
+ return /* @__PURE__ */ n.createElement(zt, { ref: o, "data-guide": e }, /* @__PURE__ */ n.createElement(
665
+ Q,
666
+ {
667
+ title: t,
668
+ "aria-label": t,
669
+ routeName: a,
670
+ params: j(k(y({}, c), {
671
+ uriName: s || void 0,
672
+ id: void 0,
673
+ guide: void 0,
674
+ accordion: void 0
675
+ })),
676
+ text: t
677
+ },
678
+ /* @__PURE__ */ n.createElement(N, { size: r, symbol: { type: "Svg", content: "caret-up" } })
679
+ ), i);
680
+ }), zt = d.li`
681
+ > a {
682
+ grid-column: 1/-1;
683
+ font-weight: bold;
684
+ margin: 0 0 ${(t) => {
685
+ var e;
686
+ return (e = t.theme.sizes) == null ? void 0 : e.normal;
687
+ }} 0;
688
+ }
689
+
690
+ > div {
691
+ grid-column: 1/-1;
692
+ }
693
+ `, ua = _(
694
+ (Gt, Fe) => {
695
+ var ae = Gt, {
696
+ expandable: t = !1,
697
+ routing: e = {},
698
+ paramMappers: a = {},
699
+ symbolSize: r = 11,
700
+ pageRole: s = "link",
701
+ pageCaret: i = "down",
702
+ showTags: o = !1,
703
+ showFavoriteToggle: c = !1,
704
+ localPaging: m = !1,
705
+ onItemClick: f = () => {
706
+ },
707
+ dispatch: u = () => {
708
+ },
709
+ metadata: l = {},
710
+ pageLabel: h,
711
+ className: E,
712
+ children: g,
713
+ items: v,
714
+ renderItem: L,
715
+ addFavoriteTooltip: C,
716
+ removeFavoriteCancelLabel: M,
717
+ removeFavoriteConfirmLabel: ze,
718
+ removeFavoriteHeader: Se,
719
+ removeFavoriteLabel: Ne,
720
+ removeFavoriteTooltip: Le
721
+ } = ae, De = w(ae, [
722
+ "expandable",
723
+ "routing",
724
+ "paramMappers",
725
+ "symbolSize",
726
+ "pageRole",
727
+ "pageCaret",
728
+ "showTags",
729
+ "showFavoriteToggle",
730
+ "localPaging",
731
+ "onItemClick",
732
+ "dispatch",
733
+ "metadata",
734
+ "pageLabel",
735
+ "className",
736
+ "children",
737
+ "items",
738
+ "renderItem",
739
+ "addFavoriteTooltip",
740
+ "removeFavoriteCancelLabel",
741
+ "removeFavoriteConfirmLabel",
742
+ "removeFavoriteHeader",
743
+ "removeFavoriteLabel",
744
+ "removeFavoriteTooltip"
745
+ ]);
746
+ const V = qe(), F = Ee(), I = Ge(v), { guide: Ie = "guide", page: Ae = "index" } = e, {
747
+ guide: Te = ({ id: p }) => j({ guide: p }),
748
+ page: ne = () => j()
749
+ } = a, [Ce, Me] = bt();
750
+ et(Fe, () => F.current);
751
+ const q = (p) => {
752
+ const { id: b, title: x, tags: D, published: P, modified: A, publishedBy: B, modifiedBy: G } = p;
753
+ return /* @__PURE__ */ n.createElement(
754
+ "li",
755
+ {
756
+ key: b,
757
+ "data-guide": b,
758
+ "has-metadata": (!!(l != null && l.showPublished) && !!P || !!(l != null && l.showModified) && !!A).toString()
759
+ },
760
+ /* @__PURE__ */ n.createElement(
761
+ Q,
762
+ {
763
+ className: "humany-guide-link",
764
+ title: x,
765
+ "aria-label": x,
766
+ routeName: Ie,
767
+ onClick: (We) => f(We, p),
768
+ params: Te(p),
769
+ text: x
770
+ },
771
+ /* @__PURE__ */ n.createElement(
772
+ N,
773
+ {
774
+ size: r,
775
+ symbol: {
776
+ type: "Svg",
777
+ content: t ? "caret-down" : "caret-right"
778
+ }
779
+ }
780
+ )
781
+ ),
782
+ c && /* @__PURE__ */ n.createElement(
783
+ gt,
784
+ {
785
+ guideTitle: x,
786
+ addFavoriteTooltip: C,
787
+ removeFavoriteCancelLabel: M,
788
+ removeFavoriteConfirmLabel: ze,
789
+ removeFavoriteHeader: Se,
790
+ removeFavoriteLabel: Ne,
791
+ removeFavoriteTooltip: Le,
792
+ isFavorite: Ce.indexOf(b) > -1,
793
+ actions: Me,
794
+ id: b
795
+ }
796
+ ),
797
+ o && /* @__PURE__ */ n.createElement(kt, { tags: D }),
798
+ /* @__PURE__ */ n.createElement(
799
+ Dt,
800
+ k(y({}, l), {
801
+ indent: t ? void 0 : r,
802
+ modified: A,
803
+ published: P,
804
+ publishedBy: B,
805
+ modifiedBy: G
806
+ })
807
+ )
808
+ );
809
+ }, Pe = z(
810
+ (p, b, x) => L ? L(p, b, x, q) : q(p),
811
+ [L, q]
812
+ ), Be = z(
813
+ (p) => {
814
+ m && (p.preventDefault(), u("page", ne()));
815
+ },
816
+ [u, m]
817
+ );
818
+ K(() => {
819
+ if (V && I && I.length < v.length && F.current) {
820
+ const p = F.current.querySelectorAll(".humany-guide-list > ul > li"), b = p[I.length];
821
+ if (p.length === v.length && I.length) {
822
+ const x = p[I.length];
823
+ if (x) {
824
+ const D = x.querySelector(
825
+ ".humany-guide-link"
826
+ );
827
+ D && D.focus();
828
+ }
829
+ } else
830
+ b && new MutationObserver((D, P) => {
831
+ D.forEach((A) => {
832
+ if (A.addedNodes) {
833
+ const B = Array.from(
834
+ A.addedNodes
835
+ ).find((G) => G.tagName === "A");
836
+ B && tt(F.current, document.activeElement) && (V && B.focus(), P.disconnect());
837
+ }
838
+ });
839
+ }).observe(b, {
840
+ attributes: !1,
841
+ characterData: !1,
842
+ childList: !0,
843
+ subtree: !0,
844
+ attributeOldValue: !1,
845
+ characterDataOldValue: !1
846
+ });
847
+ }
848
+ });
849
+ const Re = !!Object.keys(l).filter(
850
+ (p) => typeof l[p] != "undefined"
851
+ ).length;
852
+ return /* @__PURE__ */ n.createElement(
853
+ St,
854
+ k(y({
855
+ className: S(E, "humany-guide-list"),
856
+ "data-item-count": v.length,
857
+ items: v,
858
+ renderItem: Pe,
859
+ isTabbing: V,
860
+ expandable: t ? "true" : "false",
861
+ "grid-items": o || c || Re ? "true" : "false"
862
+ }, xe(De)), {
863
+ ref: F
864
+ }),
865
+ h ? /* @__PURE__ */ n.createElement(
866
+ Q,
867
+ {
868
+ text: h,
869
+ title: h,
870
+ "aria-label": h,
871
+ routeName: Ae,
872
+ role: s,
873
+ params: ne(),
874
+ onClick: Be
875
+ },
876
+ /* @__PURE__ */ n.createElement(
877
+ N,
878
+ {
879
+ size: r,
880
+ symbol: { type: "Svg", content: `caret-${i}` }
881
+ }
882
+ )
883
+ ) : null,
884
+ g
885
+ );
886
+ }
887
+ ), St = d(O)`
888
+ ${Y}
889
+ padding: ${(t) => {
890
+ var e;
891
+ return (e = t.theme.sizes) == null ? void 0 : e.large;
892
+ }};
893
+ overflow: auto;
894
+ justify-content: flex-start;
895
+ white-space: nowrap;
896
+ font-weight: 300;
897
+ text-decoration: none;
898
+
899
+ > div {
900
+ ${(t) => ee(t)(
901
+ "> h1",
902
+ $`
903
+ white-space: pre-wrap;
904
+ `
905
+ )}
906
+ }
907
+
908
+ > ul > li {
909
+ ${(t) => {
910
+ var e, a;
911
+ return t["grid-items"] === "true" && $`
912
+ display: grid;
913
+ grid-template-columns: auto 1fr 1fr;
914
+ gap: 0px 0px;
915
+ grid-template-areas: '. favorite tags';
916
+ align-items: center;
917
+
918
+ > button {
919
+ margin: 0 0 0 ${(e = t.theme.sizes) == null ? void 0 : e.small};
920
+
921
+ &[data-favorite='false'] {
922
+ ${t.isTabbing ? "opacity: 0;" : "display: none;"};
923
+ &:focus {
924
+ opacity: 1;
925
+ }
926
+ }
927
+ }
928
+
929
+ > span {
930
+ font-size: ${(a = t.theme.fonts) == null ? void 0 : a.small};
931
+ }
932
+
933
+ &:hover {
934
+ button[data-favorite='false'] {
935
+ display: flex;
936
+ justify-self: flex-start;
937
+ }
938
+ }
939
+
940
+ &[has-metadata='true'] {
941
+ grid-template-rows: 1fr 1fr;
942
+ grid-template-areas:
943
+ '. favorite tags'
944
+ 'metadata metadata metadata';
945
+ }
946
+ `;
947
+ }}
948
+ > a {
949
+ color: ${(t) => {
950
+ var e;
951
+ return (e = t.theme.colors) == null ? void 0 : e.primary;
952
+ }};
953
+ overflow: hidden;
954
+ text-overflow: ellipsis;
955
+ max-width: 100%;
956
+ display: inline-block;
957
+
958
+ svg {
959
+ margin: 0 calc(${(t) => {
960
+ var e;
961
+ return (e = t.theme.sizes) == null ? void 0 : e.small;
962
+ }}*2) 0 0;
963
+ line {
964
+ stroke: ${(t) => {
965
+ var e;
966
+ return (e = t.theme.colors) == null ? void 0 : e.primary;
967
+ }};
968
+ }
969
+ }
970
+
971
+ ${(t) => {
972
+ var e;
973
+ return t.expandable === "true" && $`
974
+ display: flex;
975
+ flex-direction: row-reverse;
976
+ justify-content: flex-end;
977
+ align-items: center;
978
+
979
+ span {
980
+ overflow: hidden;
981
+ text-overflow: ellipsis;
982
+ }
983
+
984
+ svg {
985
+ margin: 0 0 0 ${(e = t.theme.sizes) == null ? void 0 : e.small};
986
+ }
987
+ `;
988
+ }}
989
+
990
+ &:focus-visible {
991
+ ${X}
992
+ text-decoration: underline;
993
+ }
994
+
995
+ @media (hover: hover) {
996
+ &:hover {
997
+ text-decoration: underline;
998
+ }
999
+ }
1000
+ }
1001
+ }
1002
+
1003
+ > a {
1004
+ color: ${(t) => {
1005
+ var e;
1006
+ return (e = t.theme.colors) == null ? void 0 : e.text;
1007
+ }};
1008
+ margin: ${(t) => {
1009
+ var e;
1010
+ return (e = t.theme.sizes) == null ? void 0 : e.normal;
1011
+ }} 0 0;
1012
+ align-self: flex-start;
1013
+ align-items: center;
1014
+ display: flex;
1015
+
1016
+ span {
1017
+ text-decoration: underline;
1018
+ }
1019
+
1020
+ svg {
1021
+ margin: 0 calc(${(t) => {
1022
+ var e;
1023
+ return (e = t.theme.sizes) == null ? void 0 : e.small;
1024
+ }}*2) 0 0;
1025
+ line {
1026
+ stroke: ${(t) => {
1027
+ var e;
1028
+ return (e = t.theme.colors) == null ? void 0 : e.text;
1029
+ }};
1030
+ }
1031
+ }
1032
+
1033
+ &:focus-visible {
1034
+ ${X}
1035
+ text-decoration: underline;
1036
+ }
1037
+ }
1038
+ `, Nt = d(Z)`
1039
+ ${pe}
1040
+ display: flex;
1041
+ margin: 0 0 0 auto;
1042
+ grid-area: tags;
1043
+
1044
+ li,
1045
+ li:last-child {
1046
+ margin: 0 0 0 ${(t) => {
1047
+ var e;
1048
+ return (e = t.theme.sizes) == null ? void 0 : e.small;
1049
+ }};
1050
+ display: flex;
1051
+ align-items: center;
1052
+ justify-content: space-between;
1053
+ }
1054
+ `, Lt = d(N)`
1055
+ display: block;
1056
+ color: ${(t) => {
1057
+ var e;
1058
+ return (e = t.theme.colors) == null ? void 0 : e.primary;
1059
+ }};
1060
+ ${(t) => {
1061
+ if (t.symbol.type === "Uri")
1062
+ return `
1063
+ width: ${t.size}px;
1064
+ height: ${t.size}px;
1065
+ `;
1066
+ if (t.symbol.type === "FontAwesome")
1067
+ return `
1068
+ font-size: ${t.size}px;
1069
+ `;
1070
+ }}
1071
+ `, Dt = d(Et)`
1072
+ grid-area: metadata;
1073
+ text-overflow: ellipsis;
1074
+ overflow: hidden;
1075
+ font-size: ${(t) => {
1076
+ var e;
1077
+ return (e = t.theme.fonts) == null ? void 0 : e.small;
1078
+ }};
1079
+ ${(t) => {
1080
+ var e;
1081
+ return typeof t.indent == "number" && `text-indent: calc(${(e = t.theme.sizes) == null ? void 0 : e.small} * 2 + ${t.indent}px);`;
1082
+ }}
1083
+ `, Ft = he`
1084
+ 100% {
1085
+ transform: rotate(360deg);
1086
+ }
1087
+ `, It = he`
1088
+ 0% {
1089
+ stroke-dasharray: 1, 200;
1090
+ stroke-dashoffset: 0;
1091
+ }
1092
+ 50% {
1093
+ stroke-dasharray: 89, 200;
1094
+ stroke-dashoffset: -35px;
1095
+ }
1096
+ 100% {
1097
+ stroke-dasharray: 89, 200;
1098
+ stroke-dashoffset: -124px;
1099
+ }
1100
+ `, At = d.svg`
1101
+ animation: ${Ft} 2s linear infinite;
1102
+ height: 100%;
1103
+ transform-origin: center center;
1104
+ width: 100%;
1105
+ position: absolute;
1106
+ top: 0;
1107
+ bottom: 0;
1108
+ left: 0;
1109
+ right: 0;
1110
+ margin: auto;
1111
+ transition: 200ms ease-out opacity;
1112
+ `, Tt = d.div`
1113
+ position: absolute;
1114
+ top: 0;
1115
+ bottom: 0;
1116
+ left: 0;
1117
+ right: 0;
1118
+ height: 100%;
1119
+ width: 100%;
1120
+ pointer-events: ${(t) => t["data-loading"] ? "all" : "none"};
1121
+ display: flex;
1122
+ flex-direction: column;
1123
+ justify-content: center;
1124
+ transition: 200ms ease-out opacity;
1125
+ box-sizing: border-box;
1126
+ overflow: hidden;
1127
+
1128
+ .humany-spinner-svg {
1129
+ opacity: ${(t) => t["data-loading"] ? "1" : "0"};
1130
+ }
1131
+ `, Ct = d.div`
1132
+ position: relative;
1133
+ margin: 0 auto;
1134
+ width: 100px;
1135
+ &:before {
1136
+ content: '';
1137
+ display: block;
1138
+ padding-top: 100%;
1139
+ }
1140
+ `, Mt = d.circle`
1141
+ stroke-dasharray: 1, 200;
1142
+ stroke-dashoffset: 0;
1143
+ animation: ${It} 1.5s ease-in-out infinite;
1144
+ stroke-linecap: round;
1145
+ stroke: ${(t) => {
1146
+ var e;
1147
+ return (e = t.theme.colors) == null ? void 0 : e.primary;
1148
+ }};
1149
+ stroke-width: 2px;
1150
+ `, Pt = ({ loading: t = !1 }) => /* @__PURE__ */ n.createElement(Tt, { className: "humany-loader", "data-loading": t }, /* @__PURE__ */ n.createElement(Ct, { className: "humany-spinner" }, /* @__PURE__ */ n.createElement(At, { className: "humany-spinner-svg", viewBox: "25 25 50 50" }, /* @__PURE__ */ n.createElement(
1151
+ Mt,
1152
+ {
1153
+ cx: "50",
1154
+ cy: "50",
1155
+ r: "20",
1156
+ fill: "none",
1157
+ "stroke-width": "2",
1158
+ "stroke-miterlimit": "10"
1159
+ }
1160
+ )))), Bt = Pt, Rt = (i) => {
1161
+ var o = i, {
1162
+ className: t,
1163
+ showHeader: e,
1164
+ notificationList: a,
1165
+ loading: r
1166
+ } = o, s = w(o, [
1167
+ "className",
1168
+ "showHeader",
1169
+ "notificationList",
1170
+ "loading"
1171
+ ]);
1172
+ const [c, m] = T(null), {
1173
+ id: f,
1174
+ title: u,
1175
+ symbol: l,
1176
+ notifications: h = [],
1177
+ defaultHeaderOptions: E = { visible: !0 }
1178
+ } = a || {};
1179
+ return !h.length && !r ? null : /* @__PURE__ */ n.createElement(
1180
+ Ht,
1181
+ k(y({}, s), {
1182
+ "data-loading": r,
1183
+ "data-show-header": typeof e == "boolean" ? e : E.visible,
1184
+ className: S(t, "humany-notification-list"),
1185
+ "data-notification-category": f,
1186
+ header: u,
1187
+ symbol: l,
1188
+ items: h,
1189
+ renderItem: ({ id: g, title: v, body: L, modified: C, expandable: M }) => /* @__PURE__ */ n.createElement(
1190
+ jt,
1191
+ {
1192
+ key: g,
1193
+ "data-notification": g,
1194
+ "data-expanded": M ? c === g : !0
1195
+ },
1196
+ M ? /* @__PURE__ */ n.createElement(n.Fragment, null, /* @__PURE__ */ n.createElement(
1197
+ Wt,
1198
+ {
1199
+ title: v,
1200
+ "aria-label": v,
1201
+ "aria-expanded": c === g,
1202
+ onClick: () => m(c === g ? null : g)
1203
+ },
1204
+ /* @__PURE__ */ n.createElement("span", null, v),
1205
+ /* @__PURE__ */ n.createElement(
1206
+ Ot,
1207
+ {
1208
+ size: 11,
1209
+ symbol: {
1210
+ type: "Svg",
1211
+ content: `caret-${c === g ? "up" : "down"}`
1212
+ }
1213
+ }
1214
+ )
1215
+ ), /* @__PURE__ */ n.createElement(fe, { html: L }), C && /* @__PURE__ */ n.createElement(
1216
+ Yt,
1217
+ {
1218
+ format: be.YYYY_MM_DD,
1219
+ timestamp: C
1220
+ }
1221
+ )) : /* @__PURE__ */ n.createElement(fe, { html: L })
1222
+ )
1223
+ }),
1224
+ /* @__PURE__ */ n.createElement(Bt, { loading: r })
1225
+ );
1226
+ }, Wt = d(te)`
1227
+ display: flex;
1228
+ justify-content: space-between;
1229
+ align-items: center;
1230
+ width: 100%;
1231
+ text-align: left;
1232
+ svg,
1233
+ i {
1234
+ color: ${(t) => {
1235
+ var e;
1236
+ return (e = t.theme.colors) == null ? void 0 : e.primary;
1237
+ }};
1238
+ }
1239
+ span {
1240
+ color: ${(t) => {
1241
+ var e;
1242
+ return (e = t.theme.colors) == null ? void 0 : e.text;
1243
+ }};
1244
+ font-size: ${(t) => {
1245
+ var e;
1246
+ return (e = t.theme.fonts) == null ? void 0 : e.normal;
1247
+ }};
1248
+ overflow: hidden;
1249
+ text-overflow: ellipsis;
1250
+ flex: 1;
1251
+ white-space: nowrap;
1252
+ }
1253
+ &:focus-visible {
1254
+ ${X}
1255
+ span {
1256
+ color: ${(t) => {
1257
+ var e;
1258
+ return (e = t.theme.colors) == null ? void 0 : e.primary;
1259
+ }};
1260
+ text-decoration: underline;
1261
+ }
1262
+ }
1263
+ `, Ht = d(O)`
1264
+ ${ut}
1265
+ ${Y}
1266
+ overflow: hidden;
1267
+ justify-content: flex-start;
1268
+ padding: ${(t) => {
1269
+ var e;
1270
+ return (e = t.theme.sizes) == null ? void 0 : e.large;
1271
+ }};
1272
+ ${(t) => !t["data-show-header"] && $`
1273
+ > div {
1274
+ ${ee(t)(
1275
+ "h1",
1276
+ $`
1277
+ display: none;
1278
+ `
1279
+ )}
1280
+ }
1281
+ `}
1282
+
1283
+ @media (hover: hover) {
1284
+ button:hover {
1285
+ text-decoration: underline;
1286
+ }
1287
+ }
1288
+ `, fe = d(Ue)`
1289
+ ${Je}
1290
+ font-weight: 300;
1291
+
1292
+ p {
1293
+ white-space: normal;
1294
+ }
1295
+ `, jt = d.li`
1296
+ .humany-paragraph {
1297
+ display: none;
1298
+ &:not(:only-child) {
1299
+ ${(t) => {
1300
+ var e, a, r;
1301
+ return ((e = t.theme.sizes) == null ? void 0 : e.cardinal) && ((a = t.theme.sizes) == null ? void 0 : a.normal) && $`
1302
+ margin: ${(r = t.theme.sizes) == null ? void 0 : r.normal} 0;
1303
+ `;
1304
+ }}
1305
+ }
1306
+ }
1307
+
1308
+ ${(t) => t["data-expanded"] && $`
1309
+ .humany-paragraph {
1310
+ display: block;
1311
+ }
1312
+ `}
1313
+
1314
+ > span {
1315
+ display: block;
1316
+ font-weight: 300;
1317
+ color: ${(t) => {
1318
+ var e;
1319
+ return (e = t.theme.colors) == null ? void 0 : e.accent;
1320
+ }};
1321
+ }
1322
+ `, Ot = d(N)`
1323
+ margin: 0 0 0 ${(t) => {
1324
+ var e;
1325
+ return (e = t.theme.sizes) == null ? void 0 : e.small;
1326
+ }};
1327
+ line {
1328
+ stroke: ${(t) => {
1329
+ var e;
1330
+ return (e = t.theme.colors) == null ? void 0 : e.primary;
1331
+ }};
1332
+ }
1333
+ `, Yt = d(we)`
1334
+ font-size: ${(t) => {
1335
+ var e;
1336
+ return (e = t.theme.fonts) == null ? void 0 : e.small;
1337
+ }};
1338
+ font-weight: 300;
1339
+ `, fa = Rt, _t = (t) => new RegExp("^#", "i").test(t), Kt = (t) => (r) => {
1340
+ var s = r, { children: e } = s, a = w(s, ["children"]);
1341
+ const {
1342
+ implementation: i,
1343
+ name: o
1344
+ } = t.get("$widget"), { href: c = "" } = a;
1345
+ if (_t(c))
1346
+ return /* @__PURE__ */ n.createElement(Qe, { smooth: !0, to: c }, e);
1347
+ const m = i.bindings.map((l) => l.replace(/\./g, "\\.")).join("|"), u = new RegExp(`^((http[s]?:)?//)?(${m})/([^\\s]+)`).exec(c);
1348
+ if (u && u.length >= 4) {
1349
+ const l = u[4];
1350
+ if (i.widgets.get(l) && !l.startsWith("blob?") && !l.startsWith(o))
1351
+ return /* @__PURE__ */ n.createElement(Xe, { widgetName: l }, e);
1352
+ }
1353
+ return /* @__PURE__ */ n.createElement("a", y({}, a), e);
1354
+ }, Vt = Kt, qt = (t, e = []) => ({
1355
+ transform: {
1356
+ a: (a) => {
1357
+ const c = a, { children: r } = c, i = w(c, ["children"])["data-target"];
1358
+ if (i && e.length) {
1359
+ const m = e.find(({ connection: f }) => f === i);
1360
+ if (m)
1361
+ return /* @__PURE__ */ n.createElement(ke, y({}, m), r);
1362
+ }
1363
+ return Vt(t)(a);
1364
+ }
81
1365
  }
82
- }
83
- a.styles = v(w);
84
- c([
85
- p({ type: Object })
86
- ], a.prototype, "notificationList", 2);
87
- c([
88
- p({ type: Boolean })
89
- ], a.prototype, "loading", 2);
90
- c([
91
- p({ type: Boolean })
92
- ], a.prototype, "showHeader", 2);
93
- c([
94
- g()
95
- ], a.prototype, "_expanded", 2);
96
- customElements.get("ui-notification-list") || customElements.define("ui-notification-list", a);
1366
+ }), ha = qt;
97
1367
  export {
98
- a as NotificationListUi
1368
+ da as AccordionListItem,
1369
+ ke as DialogLink,
1370
+ ta as DialogList,
1371
+ aa as DrawerList,
1372
+ na as DropdownActions,
1373
+ ra as DropdownList,
1374
+ gt as FavoriteButton,
1375
+ ia as Feedback,
1376
+ ua as GuideList,
1377
+ Bt as Loader,
1378
+ Tt as LoaderWrapper,
1379
+ Et as Metadata,
1380
+ fa as NotificationList,
1381
+ oa as SmallCaret,
1382
+ sa as StyledHeaderText,
1383
+ ft as StyledListButton,
1384
+ ha as guideRenderInstructions,
1385
+ ut as loadingOpacity,
1386
+ la as useArrowKeys,
1387
+ ca as useDebounce,
1388
+ bt as useFavorites,
1389
+ ma as useHover
99
1390
  };
100
1391
  //# sourceMappingURL=index.js.map