@telia-ace/knowledge-widget-ui 1.1.2 → 1.1.3

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/index.mjs CHANGED
@@ -1,33 +1,33 @@
1
1
  import { jsx as o, jsxs as p, Fragment as se } from "react/jsx-runtime";
2
- import { useRouteData as ie, Link as Me, Icon as P, List as G, list as re, invertedHoverButton as le, ItemList as j, itemList as R, Drawer as Pe, Dropdown as ce, headingElement as K, Text as de, Button as U, paddedBorderTabStyle as X, Confirm as Be, SymbolBadge as S, StyledText as _, convertToStringAttributes as me, useKeyPress as M, useContainer as je, useEventListener as Z, Timestamp as he, DateFormats as fe, TextLink as V, useIsTabbing as Re, usePrevious as We, borderTabStyle as q, Paragraph as Ee, genericHtml as He, AnchorLink as Oe, WidgetLink as Ye } from "@telia-ace/widget-ui";
2
+ import { useRouteData as re, Link as Pe, Icon as P, List as G, list as le, invertedHoverButton as ce, ItemList as j, itemList as R, Drawer as Be, Dropdown as de, headingElement as K, Text as me, Button as U, paddedBorderTabStyle as Z, Confirm as je, SymbolBadge as S, StyledText as _, convertToStringAttributes as he, useKeyPress as M, useContainer as Re, useEventListener as ee, Timestamp as fe, DateFormats as ue, TextLink as V, useIsTabbing as We, usePrevious as Ee, borderTabStyle as q, Paragraph as He, genericHtml as Oe, AnchorLink as Ye, WidgetLink as _e } from "@telia-ace/widget-ui";
3
3
  export * from "@telia-ace/widget-ui";
4
- import { createParams as B, formatUrl as ee, appendClassNames as z, htmlParentContains as _e } from "@telia-ace/widget-utilities";
4
+ import { createParams as B, formatUrl as te, appendClassNames as z, htmlParentContains as Ve } from "@telia-ace/widget-utilities";
5
5
  import c from "@emotion/styled";
6
- import { forwardRef as W, useCallback as k, useState as F, useEffect as E, useMemo as Ve, useRef as ue, useImperativeHandle as qe } from "react";
7
- import { css as y, keyframes as ge } from "@emotion/react";
8
- const pe = ({
6
+ import { forwardRef as W, useCallback as k, useState as F, useEffect as E, useMemo as qe, useRef as ge, useImperativeHandle as Ge } from "react";
7
+ import { css as y, keyframes as pe } from "@emotion/react";
8
+ const ye = ({
9
9
  title: t = "",
10
10
  className: e,
11
11
  id: n,
12
12
  parent: a,
13
- connection: s,
14
- type: i,
13
+ connection: i,
14
+ type: s,
15
15
  target: r,
16
16
  href: m,
17
17
  children: l,
18
18
  connectionKey: d
19
19
  }) => {
20
- const u = {}, { name: h, params: f } = ie();
21
- switch (i) {
20
+ const u = {}, { name: h, params: f } = re();
21
+ switch (s) {
22
22
  case "default":
23
23
  case "guide":
24
- const { id: x, title: $ } = a;
25
- let v = d || s;
26
- x !== n && !d && (v = void 0), u.routeName = h, u.params = B({
24
+ const { id: x, title: v } = a;
25
+ let $ = d || i;
26
+ x !== n && !d && ($ = void 0), u.routeName = h, u.params = B({
27
27
  ...f,
28
28
  guide: n,
29
- connection: v,
30
- uriName: n === x ? ee($) : ee(t)
29
+ connection: $,
30
+ uriName: n === x ? te(v) : te(t)
31
31
  });
32
32
  break;
33
33
  case "link":
@@ -35,29 +35,29 @@ const pe = ({
35
35
  break;
36
36
  }
37
37
  return /* @__PURE__ */ o(
38
- Me,
38
+ Pe,
39
39
  {
40
40
  className: z(e, "humany-dialog-link"),
41
41
  ...u,
42
42
  children: l || /* @__PURE__ */ p(se, { children: [
43
- i === "link" && /* @__PURE__ */ o(P, { faIcon: "link" }),
43
+ s === "link" && /* @__PURE__ */ o(P, { faIcon: "link" }),
44
44
  /* @__PURE__ */ o("span", { children: t })
45
45
  ] })
46
46
  }
47
47
  );
48
- }, Ct = W(
48
+ }, At = W(
49
49
  ({ className: t, dialog: e, ...n }, a) => e.length ? /* @__PURE__ */ o(
50
- Ge,
50
+ Ke,
51
51
  {
52
52
  className: z(t, "humany-dialog"),
53
53
  items: e,
54
- renderItem: (s) => /* @__PURE__ */ o("li", { "data-dialog": s.connection, children: /* @__PURE__ */ o(pe, { ...s }) }, s.connection),
54
+ renderItem: (i) => /* @__PURE__ */ o("li", { "data-dialog": i.connection, children: /* @__PURE__ */ o(ye, { ...i }) }, i.connection),
55
55
  ...n,
56
56
  ref: a
57
57
  }
58
58
  ) : null
59
- ), Ge = c(G)`
60
- ${re}
59
+ ), Ke = c(G)`
60
+ ${le}
61
61
  a {
62
62
  min-width: 150px;
63
63
  max-width: 400px;
@@ -65,7 +65,7 @@ const pe = ({
65
65
  white-space: normal;
66
66
  ${(t) => {
67
67
  var e, n;
68
- return ((e = t.theme.colors) == null ? void 0 : e.primary) && le({
68
+ return ((e = t.theme.colors) == null ? void 0 : e.primary) && ce({
69
69
  primaryColor: (n = t.theme.colors) == null ? void 0 : n.primary,
70
70
  secondaryColor: "#FFFFFF",
71
71
  theme: t.theme
@@ -79,30 +79,30 @@ const pe = ({
79
79
  return (e = t.theme.sizes) == null ? void 0 : e.small;
80
80
  }} 0 0;
81
81
  }
82
- `, At = ({
82
+ `, Mt = ({
83
83
  trigger: t,
84
84
  header: e,
85
85
  className: n,
86
86
  animation: a,
87
- fullScreen: s,
88
- onToggle: i,
87
+ fullScreen: i,
88
+ onToggle: s,
89
89
  children: r,
90
90
  ref: m,
91
91
  closeButtonAriaLabel: l,
92
92
  ...d
93
93
  }) => /* @__PURE__ */ o(
94
- Pe,
94
+ Be,
95
95
  {
96
96
  className: z(n, "humany-drawer-list"),
97
97
  trigger: t,
98
98
  header: e,
99
99
  animation: a,
100
- fullScreen: s,
101
- onToggle: i,
100
+ fullScreen: i,
101
+ onToggle: s,
102
102
  closeButtonAriaLabel: l,
103
- children: /* @__PURE__ */ o(Ke, { ...d, children: r })
103
+ children: /* @__PURE__ */ o(Ue, { ...d, children: r })
104
104
  }
105
- ), Ke = c(j)`
105
+ ), Ue = c(j)`
106
106
  ${R}
107
107
  font-family: ${(t) => {
108
108
  var e;
@@ -120,17 +120,17 @@ const pe = ({
120
120
  return (e = t.theme.fonts) == null ? void 0 : e.normal;
121
121
  }};
122
122
  }
123
- `, Mt = ({
123
+ `, Pt = ({
124
124
  items: t,
125
125
  renderItem: e,
126
126
  trigger: n,
127
127
  header: a,
128
- children: s
129
- }) => /* @__PURE__ */ o(ce, { className: "humany-dropdown-actions", trigger: n, children: /* @__PURE__ */ p(Ue, { children: [
130
- !!a && /* @__PURE__ */ o(Je, { children: a }),
131
- t && e && /* @__PURE__ */ o(Qe, { items: t, renderItem: e }),
132
- s
133
- ] }) }), Ue = c.div`
128
+ children: i
129
+ }) => /* @__PURE__ */ o(de, { className: "humany-dropdown-actions", trigger: n, children: /* @__PURE__ */ p(Je, { children: [
130
+ !!a && /* @__PURE__ */ o(Qe, { children: a }),
131
+ t && e && /* @__PURE__ */ o(Xe, { items: t, renderItem: e }),
132
+ i
133
+ ] }) }), Je = c.div`
134
134
  background: #fff;
135
135
  border: #ccc 1px solid;
136
136
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
@@ -142,7 +142,7 @@ const pe = ({
142
142
  var e;
143
143
  return (e = t.theme.fonts) == null ? void 0 : e.normal;
144
144
  }};
145
- `, Je = c.div`
145
+ `, Qe = c.div`
146
146
  padding: ${(t) => {
147
147
  var e;
148
148
  return (e = t.theme.sizes) == null ? void 0 : e.normal;
@@ -175,7 +175,7 @@ const pe = ({
175
175
  return (e = t.theme.sizes) == null ? void 0 : e.small;
176
176
  }};
177
177
  }
178
- `, Qe = c(G)`
178
+ `, Xe = c(G)`
179
179
  list-style: none;
180
180
  padding: 0;
181
181
  margin: 0;
@@ -210,21 +210,21 @@ const pe = ({
210
210
  }
211
211
  }
212
212
  }
213
- `, Pt = ({
213
+ `, Bt = ({
214
214
  trigger: t,
215
215
  className: e,
216
216
  children: n,
217
217
  closeButtonAriaLabel: a,
218
- ...s
218
+ ...i
219
219
  }) => /* @__PURE__ */ o(
220
- ce,
220
+ de,
221
221
  {
222
222
  className: z(e, "humany-dropdown-list"),
223
223
  closeButtonAriaLabel: a,
224
224
  trigger: t,
225
- children: /* @__PURE__ */ o(Xe, { ...s, children: n })
225
+ children: /* @__PURE__ */ o(Ze, { ...i, children: n })
226
226
  }
227
- ), Xe = c(j)`
227
+ ), Ze = c(j)`
228
228
  ${R}
229
229
  font-family: ${(t) => {
230
230
  var e;
@@ -260,7 +260,7 @@ const pe = ({
260
260
  }
261
261
  }
262
262
  }
263
- `, Ze = (t) => y`
263
+ `, et = (t) => y`
264
264
  ${t["data-loading"] && "position: relative;"};
265
265
  ${t["data-loading"] && "min-height: 150px;"}
266
266
  > * {
@@ -270,7 +270,7 @@ const pe = ({
270
270
  .humany-loader {
271
271
  opacity: ${t["data-loading"] ? "1" : "0"};
272
272
  }
273
- `, Bt = c(P)`
273
+ `, jt = c(P)`
274
274
  && {
275
275
  font-size: ${(t) => {
276
276
  var e;
@@ -278,7 +278,7 @@ const pe = ({
278
278
  }};
279
279
  }
280
280
  width: 1.2em;
281
- `, jt = c(de)`
281
+ `, Rt = c(me)`
282
282
  font-size: ${(t) => {
283
283
  var e;
284
284
  return (e = t.theme.fonts) == null ? void 0 : e.medium;
@@ -289,7 +289,7 @@ const pe = ({
289
289
  var e;
290
290
  return (e = t.theme.colors) == null ? void 0 : e.text;
291
291
  }};
292
- `, et = c(U)`
292
+ `, tt = c(U)`
293
293
  display: flex;
294
294
  align-items: center;
295
295
 
@@ -303,11 +303,11 @@ const pe = ({
303
303
  }}
304
304
 
305
305
  &:focus-visible {
306
- ${(t) => t["data-has-label"] === "true" && X}
306
+ ${(t) => t["data-has-label"] === "true" && Z}
307
307
 
308
308
  svg, i {
309
309
  ${(t) => t["data-has-label"] === "false" && t["data-has-symbol"] === "true" && y`
310
- ${X(t)}
310
+ ${Z(t)}
311
311
  box-sizing: content-box;
312
312
  `}
313
313
  }
@@ -317,13 +317,13 @@ const pe = ({
317
317
  flex: 1;
318
318
  font-weight: 300;
319
319
  }
320
- `, tt = ({
320
+ `, nt = ({
321
321
  addFavoriteTooltip: t,
322
322
  removeFavoriteCancelLabel: e,
323
323
  removeFavoriteConfirmLabel: n,
324
324
  removeFavoriteHeader: a,
325
- removeFavoriteLabel: s,
326
- removeFavoriteTooltip: i,
325
+ removeFavoriteLabel: i,
326
+ removeFavoriteTooltip: s,
327
327
  id: r,
328
328
  isFavorite: m,
329
329
  guideTitle: l,
@@ -334,16 +334,16 @@ const pe = ({
334
334
  h(r);
335
335
  }, [r, h]), x = k(() => {
336
336
  u(r);
337
- }, [r, u]), $ = `${m ? i : t}${l ? `: "${l}"` : ""}`;
337
+ }, [r, u]), v = `${m ? s : t}${l ? `: "${l}"` : ""}`;
338
338
  return m ? /* @__PURE__ */ o(
339
- Be,
339
+ je,
340
340
  {
341
341
  trigger: /* @__PURE__ */ p(
342
- te,
342
+ ne,
343
343
  {
344
344
  className: "humany-favorite-button",
345
- title: $,
346
- "aria-label": $,
345
+ title: v,
346
+ "aria-label": v,
347
347
  "data-favorite": "true",
348
348
  "data-has-label": d ? "true" : "false",
349
349
  "data-has-symbol": "true",
@@ -363,14 +363,14 @@ const pe = ({
363
363
  cancelLabel: e,
364
364
  confirmLabel: n,
365
365
  header: a,
366
- text: s
366
+ text: i
367
367
  }
368
368
  ) : /* @__PURE__ */ p(
369
- te,
369
+ ne,
370
370
  {
371
371
  className: "humany-favorite-button",
372
- title: $,
373
- "aria-label": $,
372
+ title: v,
373
+ "aria-label": v,
374
374
  onClick: x,
375
375
  "data-favorite": "false",
376
376
  "data-has-label": d ? "true" : "false",
@@ -381,7 +381,7 @@ const pe = ({
381
381
  ]
382
382
  }
383
383
  );
384
- }, te = c(et)`
384
+ }, ne = c(tt)`
385
385
  grid-area: favorite;
386
386
 
387
387
  &:focus-visible {
@@ -406,7 +406,7 @@ const pe = ({
406
406
  }
407
407
 
408
408
  ${(t) => {
409
- var e, n, a, s, i, r, m;
409
+ var e, n, a, i, s, r, m;
410
410
  return ((e = t.theme.colors) == null ? void 0 : e.text) && y`
411
411
  svg {
412
412
  stroke: ${(n = t.theme.colors) == null ? void 0 : n.text};
@@ -416,10 +416,10 @@ const pe = ({
416
416
  }
417
417
 
418
418
  ${t["data-favorite"] === "true" && `
419
- fill: ${(s = t.theme.colors) == null ? void 0 : s.text};
419
+ fill: ${(i = t.theme.colors) == null ? void 0 : i.text};
420
420
 
421
421
  path {
422
- fill: ${(i = t.theme.colors) == null ? void 0 : i.text};
422
+ fill: ${(s = t.theme.colors) == null ? void 0 : s.text};
423
423
  }
424
424
  `};
425
425
  }
@@ -443,28 +443,28 @@ const pe = ({
443
443
  }
444
444
  `;
445
445
  }}
446
- `, Rt = W(
446
+ `, Wt = W(
447
447
  ({
448
448
  onFeedback: t = () => {
449
449
  },
450
450
  direction: e = "horizontal",
451
451
  className: n,
452
452
  header: a,
453
- positive: s,
454
- negative: i,
453
+ positive: i,
454
+ negative: s,
455
455
  selected: r,
456
456
  ...m
457
457
  }, l) => /* @__PURE__ */ p(
458
- at,
458
+ ot,
459
459
  {
460
460
  className: z(n, "humany-feedback"),
461
461
  "data-direction": e,
462
- ...me(m),
462
+ ...he(m),
463
463
  ref: l,
464
464
  children: [
465
- !!a && /* @__PURE__ */ o(nt, { children: a }),
465
+ !!a && /* @__PURE__ */ o(at, { children: a }),
466
466
  /* @__PURE__ */ p(
467
- ne,
467
+ ae,
468
468
  {
469
469
  className: "humany-feedback-button",
470
470
  disabled: !!r,
@@ -473,12 +473,12 @@ const pe = ({
473
473
  onClick: () => t("positive"),
474
474
  children: [
475
475
  /* @__PURE__ */ o(P, { faIcon: "smile-o" }),
476
- /* @__PURE__ */ o("span", { children: s })
476
+ /* @__PURE__ */ o("span", { children: i })
477
477
  ]
478
478
  }
479
479
  ),
480
480
  /* @__PURE__ */ p(
481
- ne,
481
+ ae,
482
482
  {
483
483
  className: "humany-feedback-button",
484
484
  disabled: !!r,
@@ -487,14 +487,14 @@ const pe = ({
487
487
  onClick: () => t("negative"),
488
488
  children: [
489
489
  /* @__PURE__ */ o(P, { faIcon: "frown-o" }),
490
- /* @__PURE__ */ o("span", { children: i })
490
+ /* @__PURE__ */ o("span", { children: s })
491
491
  ]
492
492
  }
493
493
  )
494
494
  ]
495
495
  }
496
496
  )
497
- ), nt = c(_)`
497
+ ), at = c(_)`
498
498
  font-weight: normal;
499
499
  margin: 0 0 ${(t) => {
500
500
  var e;
@@ -505,7 +505,7 @@ const pe = ({
505
505
  return (e = t.theme.fonts) == null ? void 0 : e.normal;
506
506
  }};
507
507
  display: block;
508
- `, ne = c(U)`
508
+ `, ae = c(U)`
509
509
  display: inline-block;
510
510
  font-size: ${(t) => {
511
511
  var e;
@@ -533,7 +533,7 @@ const pe = ({
533
533
 
534
534
  ${(t) => {
535
535
  var e, n;
536
- return ((e = t.theme.colors) == null ? void 0 : e.primary) && le({
536
+ return ((e = t.theme.colors) == null ? void 0 : e.primary) && ce({
537
537
  active: t["data-selected"],
538
538
  primaryColor: (n = t.theme.colors) == null ? void 0 : n.primary,
539
539
  secondaryColor: "#FFFFFF",
@@ -547,7 +547,7 @@ const pe = ({
547
547
  return (e = t.theme.sizes) == null ? void 0 : e.small;
548
548
  }} 0 0;
549
549
  }
550
- `, at = c.div`
550
+ `, ot = c.div`
551
551
  ${(t) => {
552
552
  var e;
553
553
  return t["data-direction"] === "vertical" && y`
@@ -559,27 +559,27 @@ const pe = ({
559
559
  }
560
560
  `;
561
561
  }}
562
- `, Wt = () => {
563
- const [t, e] = F(null), n = M("ArrowLeft"), a = M("ArrowRight"), s = M("ArrowUp"), i = M("ArrowDown");
562
+ `, Et = () => {
563
+ const [t, e] = F(null), n = M("ArrowLeft"), a = M("ArrowRight"), i = M("ArrowUp"), s = M("ArrowDown");
564
564
  return E(() => {
565
- e(n ? "left" : a ? "right" : s ? "up" : i ? "down" : null);
566
- }, [n, a, s, i]), t;
567
- }, Et = (t, e) => {
568
- const [n, a] = F(t), s = k(() => setTimeout(() => {
565
+ e(n ? "left" : a ? "right" : i ? "up" : s ? "down" : null);
566
+ }, [n, a, i, s]), t;
567
+ }, Ht = (t, e) => {
568
+ const [n, a] = F(t), i = k(() => setTimeout(() => {
569
569
  a(t);
570
570
  }, e), [e, a, t]);
571
571
  return E(
572
572
  () => {
573
- const i = s();
573
+ const s = i();
574
574
  return () => {
575
- clearTimeout(i);
575
+ clearTimeout(s);
576
576
  };
577
577
  },
578
- [s]
578
+ [i]
579
579
  // Only re-call effect if value or delay changes
580
580
  ), n;
581
- }, ot = () => {
582
- const t = je(), [e, n] = F([]), a = t.get("favorites");
581
+ }, it = () => {
582
+ const t = Re(), [e, n] = F([]), a = t.get("favorites");
583
583
  E(() => {
584
584
  if (a) {
585
585
  n(a.get());
@@ -592,17 +592,17 @@ const pe = ({
592
592
  );
593
593
  }
594
594
  }, []);
595
- const s = (l) => a ? a.add(l) : Promise.resolve([]), i = (l) => a ? a.remove(l) : Promise.resolve([]), r = () => a ? a.clear() : Promise.resolve([]), m = k(
596
- (l) => e.indexOf(l) > -1 ? i(l) : s(l),
595
+ const i = (l) => a ? a.add(l) : Promise.resolve([]), s = (l) => a ? a.remove(l) : Promise.resolve([]), r = () => a ? a.clear() : Promise.resolve([]), m = k(
596
+ (l) => e.indexOf(l) > -1 ? s(l) : i(l),
597
597
  // eslint-disable-next-line react-hooks/exhaustive-deps
598
598
  [e]
599
599
  );
600
600
  return [
601
601
  e,
602
- Ve(
602
+ qe(
603
603
  () => ({
604
- addFavorite: s,
605
- removeFavorite: i,
604
+ addFavorite: i,
605
+ removeFavorite: s,
606
606
  clearFavorites: r,
607
607
  toggleFavorite: m
608
608
  }),
@@ -610,26 +610,26 @@ const pe = ({
610
610
  [e]
611
611
  )
612
612
  ];
613
- }, Ht = () => {
614
- const [t, e] = F(!1), n = ue(), a = k(() => e(!0), [e]), s = k(() => e(!1), [e]);
615
- return Z("mouseenter", a, n.current), Z("mouseleave", s, n.current), [t, n];
613
+ }, Ot = () => {
614
+ const [t, e] = F(!1), n = ge(), a = k(() => e(!0), [e]), i = k(() => e(!1), [e]);
615
+ return ee("mouseenter", a, n.current), ee("mouseleave", i, n.current), [t, n];
616
616
  }, st = ({
617
- format: t = fe.YYYY_MM_DD_HH_MM,
617
+ format: t = ue.YYYY_MM_DD_HH_MM,
618
618
  className: e = "",
619
619
  byLabel: n = "",
620
620
  modifiedLabel: a = "",
621
- publishedLabel: s = "",
622
- modifiedBy: i = "",
621
+ publishedLabel: i = "",
622
+ modifiedBy: s = "",
623
623
  publishedBy: r = "",
624
624
  showModified: m = !1,
625
625
  showPublished: l = !1,
626
626
  modified: d,
627
627
  published: u
628
628
  }) => {
629
- const h = l && u ? /* @__PURE__ */ o(ae, { format: t, timestamp: u }) : null, f = m && d ? /* @__PURE__ */ o(ae, { format: t, timestamp: d }) : null;
629
+ const h = l && u ? /* @__PURE__ */ o(oe, { format: t, timestamp: u }) : null, f = m && d ? /* @__PURE__ */ o(oe, { format: t, timestamp: d }) : null;
630
630
  return !h && !f ? null : /* @__PURE__ */ p(Y, { className: z(e, "humany-metadata"), children: [
631
631
  h && /* @__PURE__ */ p(Y, { className: "humany-published", children: [
632
- s,
632
+ i,
633
633
  h,
634
634
  n && r && ` ${n.replace("{{editor}}", r)}`
635
635
  ] }),
@@ -637,28 +637,28 @@ const pe = ({
637
637
  h && ", ",
638
638
  a,
639
639
  f,
640
- n && i && ` ${n.replace("{{editor}}", i)}`
640
+ n && s && ` ${n.replace("{{editor}}", s)}`
641
641
  ] })
642
642
  ] });
643
- }, ae = c(he)`
643
+ }, oe = c(fe)`
644
644
  &:not(:first-child) {
645
645
  margin-left: 4px;
646
646
  }
647
647
  &:not(:last-child) {
648
648
  margin-right: 4px;
649
649
  }
650
- `, Y = c(de)`
650
+ `, Y = c(me)`
651
651
  font-style: italic;
652
- `, it = ({ tags: t }) => t.filter((e) => e.symbol).length ? /* @__PURE__ */ o(
653
- ct,
652
+ `, rt = ({ tags: t }) => t.filter((e) => e.symbol).length ? /* @__PURE__ */ o(
653
+ dt,
654
654
  {
655
655
  className: "humany-guide-list-tags",
656
656
  items: t,
657
- renderItem: ({ id: e, symbol: n, title: a }) => n && /* @__PURE__ */ o("li", { "data-tag": e, children: /* @__PURE__ */ o(dt, { size: 18, symbol: n, title: a }) }, e)
657
+ renderItem: ({ id: e, symbol: n, title: a }) => n && /* @__PURE__ */ o("li", { "data-tag": e, children: /* @__PURE__ */ o(mt, { size: 18, symbol: n, title: a }) }, e)
658
658
  }
659
- ) : null, Ot = W(({ title: t, id: e, route: n, symbolSize: a, collapseUri: s, children: i }, r) => {
660
- const { params: m } = ie();
661
- return /* @__PURE__ */ p(rt, { ref: r, "data-guide": e, children: [
659
+ ) : null, Yt = W(({ title: t, id: e, route: n, symbolSize: a, collapseUri: i, children: s }, r) => {
660
+ const { params: m } = re();
661
+ return /* @__PURE__ */ p(lt, { ref: r, "data-guide": e, children: [
662
662
  /* @__PURE__ */ o(
663
663
  V,
664
664
  {
@@ -667,7 +667,7 @@ const pe = ({
667
667
  routeName: n,
668
668
  params: B({
669
669
  ...m,
670
- uriName: s || void 0,
670
+ uriName: i || void 0,
671
671
  id: void 0,
672
672
  guide: void 0,
673
673
  accordion: void 0
@@ -682,9 +682,9 @@ const pe = ({
682
682
  )
683
683
  }
684
684
  ),
685
- i
685
+ s
686
686
  ] });
687
- }), rt = c.li`
687
+ }), lt = c.li`
688
688
  > a {
689
689
  grid-column: 1/-1;
690
690
  font-weight: bold;
@@ -697,14 +697,14 @@ const pe = ({
697
697
  > div {
698
698
  grid-column: 1/-1;
699
699
  }
700
- `, Yt = W(
700
+ `, _t = W(
701
701
  ({
702
702
  expandable: t = !1,
703
703
  routing: e = {},
704
704
  paramMappers: n = {},
705
705
  symbolSize: a = 11,
706
- pageRole: s = "link",
707
- pageCaret: i = "down",
706
+ pageRole: i = "link",
707
+ pageCaret: s = "down",
708
708
  showTags: r = !1,
709
709
  showFavoriteToggle: m = !1,
710
710
  localPaging: l = !1,
@@ -715,22 +715,23 @@ const pe = ({
715
715
  metadata: h = {},
716
716
  pageLabel: f,
717
717
  className: x,
718
- children: $,
719
- items: v,
718
+ children: v,
719
+ items: $,
720
720
  renderItem: N,
721
- addFavoriteTooltip: ye,
722
- removeFavoriteCancelLabel: $e,
723
- removeFavoriteConfirmLabel: ve,
724
- removeFavoriteHeader: xe,
725
- removeFavoriteLabel: be,
726
- removeFavoriteTooltip: we,
727
- ...ke
728
- }, ze) => {
729
- const J = Re(), I = ue(), T = We(v), { guide: Se = "guide", page: Ne = "index" } = e, {
730
- guide: Le = ({ id: g }) => B({ guide: g }),
731
- page: Q = () => B()
732
- } = n, [Ie, Te] = ot();
733
- qe(ze, () => I.current);
721
+ addFavoriteTooltip: $e,
722
+ removeFavoriteCancelLabel: ve,
723
+ removeFavoriteConfirmLabel: xe,
724
+ removeFavoriteHeader: be,
725
+ removeFavoriteLabel: we,
726
+ removeFavoriteTooltip: ke,
727
+ searchResultsEmptyLabel: ze,
728
+ ...J
729
+ }, Se) => {
730
+ const Q = We(), I = ge(), T = Ee($), { guide: Ne = "guide", page: Le = "index" } = e, {
731
+ guide: Ie = ({ id: g }) => B({ guide: g }),
732
+ page: X = () => B()
733
+ } = n, [Te, De] = it();
734
+ Ge(Se, () => I.current);
734
735
  const H = (g) => {
735
736
  const { id: w, title: b, tags: L, published: C, modified: D, publishedBy: A, modifiedBy: O } = g;
736
737
  return /* @__PURE__ */ p(
@@ -745,9 +746,9 @@ const pe = ({
745
746
  className: "humany-guide-link",
746
747
  title: b,
747
748
  "aria-label": b,
748
- routeName: Se,
749
- onClick: (Ae) => d(Ae, g),
750
- params: Le(g),
749
+ routeName: Ne,
750
+ onClick: (Me) => d(Me, g),
751
+ params: Ie(g),
751
752
  text: b,
752
753
  children: /* @__PURE__ */ o(
753
754
  S,
@@ -762,23 +763,23 @@ const pe = ({
762
763
  }
763
764
  ),
764
765
  m && /* @__PURE__ */ o(
765
- tt,
766
+ nt,
766
767
  {
767
768
  guideTitle: b,
768
- addFavoriteTooltip: ye,
769
- removeFavoriteCancelLabel: $e,
770
- removeFavoriteConfirmLabel: ve,
771
- removeFavoriteHeader: xe,
772
- removeFavoriteLabel: be,
773
- removeFavoriteTooltip: we,
774
- isFavorite: Ie.indexOf(w) > -1,
775
- actions: Te,
769
+ addFavoriteTooltip: $e,
770
+ removeFavoriteCancelLabel: ve,
771
+ removeFavoriteConfirmLabel: xe,
772
+ removeFavoriteHeader: be,
773
+ removeFavoriteLabel: we,
774
+ removeFavoriteTooltip: ke,
775
+ isFavorite: Te.indexOf(w) > -1,
776
+ actions: De,
776
777
  id: w
777
778
  }
778
779
  ),
779
- r && /* @__PURE__ */ o(it, { tags: L }),
780
+ r && /* @__PURE__ */ o(rt, { tags: L }),
780
781
  /* @__PURE__ */ o(
781
- mt,
782
+ ht,
782
783
  {
783
784
  ...h,
784
785
  indent: t ? void 0 : a,
@@ -792,21 +793,21 @@ const pe = ({
792
793
  },
793
794
  w
794
795
  );
795
- }, De = k(
796
+ }, Fe = k(
796
797
  (g, w, b) => N ? N(g, w, b, H) : H(g),
797
798
  [N, H]
798
- ), Fe = k(
799
+ ), Ce = k(
799
800
  (g) => {
800
- l && (g.preventDefault(), u("page", Q()));
801
+ l && (g.preventDefault(), u("page", X()));
801
802
  },
802
803
  [u, l]
803
804
  );
804
805
  E(() => {
805
- if (T && T.length < v.length && I.current) {
806
+ if (T && T.length < $.length && I.current) {
806
807
  const g = I.current.querySelectorAll(
807
808
  ".humany-guide-list > ul > li"
808
809
  ), w = g[T.length];
809
- if (g.length === v.length && T.length) {
810
+ if (g.length === $.length && T.length) {
810
811
  const b = g[T.length];
811
812
  if (b) {
812
813
  const L = b.querySelector(
@@ -821,7 +822,7 @@ const pe = ({
821
822
  const A = Array.from(
822
823
  D.addedNodes
823
824
  ).find((O) => O.tagName === "A");
824
- A && _e(I.current, document.activeElement) && (J && A.focus(), C.disconnect());
825
+ A && Ve(I.current, document.activeElement) && (Q && A.focus(), C.disconnect());
825
826
  }
826
827
  });
827
828
  }).observe(w, {
@@ -834,20 +835,20 @@ const pe = ({
834
835
  });
835
836
  }
836
837
  });
837
- const Ce = !!Object.keys(h).filter(
838
+ const Ae = !!Object.keys(h).filter(
838
839
  (g) => typeof h[g] < "u"
839
840
  ).length;
840
841
  return /* @__PURE__ */ p(
841
- lt,
842
+ ct,
842
843
  {
843
844
  className: z(x, "humany-guide-list"),
844
- "data-item-count": v.length,
845
- items: v,
846
- renderItem: De,
847
- isTabbing: J,
845
+ "data-item-count": $.length,
846
+ items: $,
847
+ renderItem: Fe,
848
+ isTabbing: Q,
848
849
  expandable: t ? "true" : "false",
849
- "grid-items": r || m || Ce ? "true" : "false",
850
- ...me(ke),
850
+ "grid-items": r || m || Ae ? "true" : "false",
851
+ ...he(J),
851
852
  ref: I,
852
853
  children: [
853
854
  f ? /* @__PURE__ */ o(
@@ -856,25 +857,26 @@ const pe = ({
856
857
  text: f,
857
858
  title: f,
858
859
  "aria-label": f,
859
- routeName: Ne,
860
- role: s,
861
- params: Q(),
862
- onClick: Fe,
860
+ routeName: Le,
861
+ role: i,
862
+ params: X(),
863
+ onClick: Ce,
863
864
  children: /* @__PURE__ */ o(
864
865
  S,
865
866
  {
866
867
  size: a,
867
- symbol: { type: "Svg", content: `caret-${i}` }
868
+ symbol: { type: "Svg", content: `caret-${s}` }
868
869
  }
869
870
  )
870
871
  }
871
872
  ) : null,
872
- $
873
+ v,
874
+ !J["data-loading"] && $.length === 0 && /* @__PURE__ */ o("p", { children: ze })
873
875
  ]
874
876
  }
875
877
  );
876
878
  }
877
- ), lt = c(j)`
879
+ ), ct = c(j)`
878
880
  ${R}
879
881
  padding: ${(t) => {
880
882
  var e;
@@ -1025,8 +1027,8 @@ const pe = ({
1025
1027
  text-decoration: underline;
1026
1028
  }
1027
1029
  }
1028
- `, ct = c(G)`
1029
- ${re}
1030
+ `, dt = c(G)`
1031
+ ${le}
1030
1032
  display: flex;
1031
1033
  margin: 0 0 0 auto;
1032
1034
  grid-area: tags;
@@ -1041,7 +1043,7 @@ const pe = ({
1041
1043
  align-items: center;
1042
1044
  justify-content: space-between;
1043
1045
  }
1044
- `, dt = c(S)`
1046
+ `, mt = c(S)`
1045
1047
  display: block;
1046
1048
  color: ${(t) => {
1047
1049
  var e;
@@ -1058,7 +1060,7 @@ const pe = ({
1058
1060
  font-size: ${t.size}px;
1059
1061
  `;
1060
1062
  }}
1061
- `, mt = c(st)`
1063
+ `, ht = c(st)`
1062
1064
  grid-area: metadata;
1063
1065
  text-overflow: ellipsis;
1064
1066
  overflow: hidden;
@@ -1070,11 +1072,11 @@ const pe = ({
1070
1072
  var e;
1071
1073
  return typeof t.indent == "number" && `text-indent: calc(${(e = t.theme.sizes) == null ? void 0 : e.small} * 2 + ${t.indent}px);`;
1072
1074
  }}
1073
- `, ht = ge`
1075
+ `, ft = pe`
1074
1076
  100% {
1075
1077
  transform: rotate(360deg);
1076
1078
  }
1077
- `, ft = ge`
1079
+ `, ut = pe`
1078
1080
  0% {
1079
1081
  stroke-dasharray: 1, 200;
1080
1082
  stroke-dashoffset: 0;
@@ -1087,8 +1089,8 @@ const pe = ({
1087
1089
  stroke-dasharray: 89, 200;
1088
1090
  stroke-dashoffset: -124px;
1089
1091
  }
1090
- `, ut = c.svg`
1091
- animation: ${ht} 2s linear infinite;
1092
+ `, gt = c.svg`
1093
+ animation: ${ft} 2s linear infinite;
1092
1094
  height: 100%;
1093
1095
  transform-origin: center center;
1094
1096
  width: 100%;
@@ -1099,7 +1101,7 @@ const pe = ({
1099
1101
  right: 0;
1100
1102
  margin: auto;
1101
1103
  transition: 200ms ease-out opacity;
1102
- `, gt = c.div`
1104
+ `, pt = c.div`
1103
1105
  position: absolute;
1104
1106
  top: 0;
1105
1107
  bottom: 0;
@@ -1118,7 +1120,7 @@ const pe = ({
1118
1120
  .humany-spinner-svg {
1119
1121
  opacity: ${(t) => t["data-loading"] ? "1" : "0"};
1120
1122
  }
1121
- `, pt = c.div`
1123
+ `, yt = c.div`
1122
1124
  position: relative;
1123
1125
  margin: 0 auto;
1124
1126
  width: 100px;
@@ -1127,18 +1129,18 @@ const pe = ({
1127
1129
  display: block;
1128
1130
  padding-top: 100%;
1129
1131
  }
1130
- `, yt = c.circle`
1132
+ `, $t = c.circle`
1131
1133
  stroke-dasharray: 1, 200;
1132
1134
  stroke-dashoffset: 0;
1133
- animation: ${ft} 1.5s ease-in-out infinite;
1135
+ animation: ${ut} 1.5s ease-in-out infinite;
1134
1136
  stroke-linecap: round;
1135
1137
  stroke: ${(t) => {
1136
1138
  var e;
1137
1139
  return (e = t.theme.colors) == null ? void 0 : e.primary;
1138
1140
  }};
1139
1141
  stroke-width: 2px;
1140
- `, $t = ({ loading: t = !1 }) => /* @__PURE__ */ o(gt, { className: "humany-loader", "data-loading": t, children: /* @__PURE__ */ o(pt, { className: "humany-spinner", children: /* @__PURE__ */ o(ut, { className: "humany-spinner-svg", viewBox: "25 25 50 50", children: /* @__PURE__ */ o(
1141
- yt,
1142
+ `, vt = ({ loading: t = !1 }) => /* @__PURE__ */ o(pt, { className: "humany-loader", "data-loading": t, children: /* @__PURE__ */ o(yt, { className: "humany-spinner", children: /* @__PURE__ */ o(gt, { className: "humany-spinner-svg", viewBox: "25 25 50 50", children: /* @__PURE__ */ o(
1143
+ $t,
1142
1144
  {
1143
1145
  cx: "50",
1144
1146
  cy: "50",
@@ -1147,14 +1149,14 @@ const pe = ({
1147
1149
  "stroke-width": "2",
1148
1150
  "stroke-miterlimit": "10"
1149
1151
  }
1150
- ) }) }) }), _t = ({
1152
+ ) }) }) }), Vt = ({
1151
1153
  className: t,
1152
1154
  showHeader: e,
1153
1155
  notificationList: n,
1154
1156
  loading: a,
1155
- ...s
1157
+ ...i
1156
1158
  }) => {
1157
- const [i, r] = F(null), {
1159
+ const [s, r] = F(null), {
1158
1160
  id: m,
1159
1161
  title: l,
1160
1162
  symbol: d,
@@ -1162,9 +1164,9 @@ const pe = ({
1162
1164
  defaultHeaderOptions: h = { visible: !0 }
1163
1165
  } = n || {};
1164
1166
  return !u.length && !a ? null : /* @__PURE__ */ o(
1165
- xt,
1167
+ bt,
1166
1168
  {
1167
- ...s,
1169
+ ...i,
1168
1170
  "data-loading": a,
1169
1171
  "data-show-header": typeof e == "boolean" ? e : h.visible,
1170
1172
  className: z(t, "humany-notification-list"),
@@ -1172,50 +1174,50 @@ const pe = ({
1172
1174
  header: l,
1173
1175
  symbol: d,
1174
1176
  items: u,
1175
- renderItem: ({ id: f, title: x, body: $, modified: v, expandable: N }) => /* @__PURE__ */ o(
1176
- bt,
1177
+ renderItem: ({ id: f, title: x, body: v, modified: $, expandable: N }) => /* @__PURE__ */ o(
1178
+ wt,
1177
1179
  {
1178
1180
  "data-notification": f,
1179
- "data-expanded": N ? i === f : !0,
1181
+ "data-expanded": N ? s === f : !0,
1180
1182
  children: N ? /* @__PURE__ */ p(se, { children: [
1181
1183
  /* @__PURE__ */ p(
1182
- vt,
1184
+ xt,
1183
1185
  {
1184
1186
  title: x,
1185
1187
  "aria-label": x,
1186
- "aria-expanded": i === f,
1187
- onClick: () => r(i === f ? null : f),
1188
+ "aria-expanded": s === f,
1189
+ onClick: () => r(s === f ? null : f),
1188
1190
  children: [
1189
1191
  /* @__PURE__ */ o("span", { children: x }),
1190
1192
  /* @__PURE__ */ o(
1191
- wt,
1193
+ kt,
1192
1194
  {
1193
1195
  size: 11,
1194
1196
  symbol: {
1195
1197
  type: "Svg",
1196
- content: `caret-${i === f ? "up" : "down"}`
1198
+ content: `caret-${s === f ? "up" : "down"}`
1197
1199
  }
1198
1200
  }
1199
1201
  )
1200
1202
  ]
1201
1203
  }
1202
1204
  ),
1203
- /* @__PURE__ */ o(oe, { html: $ }),
1204
- v && /* @__PURE__ */ o(
1205
- kt,
1205
+ /* @__PURE__ */ o(ie, { html: v }),
1206
+ $ && /* @__PURE__ */ o(
1207
+ zt,
1206
1208
  {
1207
- format: fe.YYYY_MM_DD,
1208
- timestamp: v
1209
+ format: ue.YYYY_MM_DD,
1210
+ timestamp: $
1209
1211
  }
1210
1212
  )
1211
- ] }) : /* @__PURE__ */ o(oe, { html: $ })
1213
+ ] }) : /* @__PURE__ */ o(ie, { html: v })
1212
1214
  },
1213
1215
  f
1214
1216
  ),
1215
- children: /* @__PURE__ */ o($t, { loading: a })
1217
+ children: /* @__PURE__ */ o(vt, { loading: a })
1216
1218
  }
1217
1219
  );
1218
- }, vt = c(U)`
1220
+ }, xt = c(U)`
1219
1221
  display: flex;
1220
1222
  justify-content: space-between;
1221
1223
  align-items: center;
@@ -1252,8 +1254,8 @@ const pe = ({
1252
1254
  text-decoration: underline;
1253
1255
  }
1254
1256
  }
1255
- `, xt = c(j)`
1256
- ${Ze}
1257
+ `, bt = c(j)`
1258
+ ${et}
1257
1259
  ${R}
1258
1260
  overflow: hidden;
1259
1261
  justify-content: flex-start;
@@ -1277,14 +1279,14 @@ const pe = ({
1277
1279
  text-decoration: underline;
1278
1280
  }
1279
1281
  }
1280
- `, oe = c(Ee)`
1281
- ${He}
1282
+ `, ie = c(He)`
1283
+ ${Oe}
1282
1284
  font-weight: 300;
1283
1285
 
1284
1286
  p {
1285
1287
  white-space: normal;
1286
1288
  }
1287
- `, bt = c.li`
1289
+ `, wt = c.li`
1288
1290
  .humany-paragraph {
1289
1291
  display: none;
1290
1292
  &:not(:only-child) {
@@ -1311,7 +1313,7 @@ const pe = ({
1311
1313
  return (e = t.theme.colors) == null ? void 0 : e.accent;
1312
1314
  }};
1313
1315
  }
1314
- `, wt = c(S)`
1316
+ `, kt = c(S)`
1315
1317
  margin: 0 0 0 ${(t) => {
1316
1318
  var e;
1317
1319
  return (e = t.theme.sizes) == null ? void 0 : e.small;
@@ -1322,64 +1324,64 @@ const pe = ({
1322
1324
  return (e = t.theme.colors) == null ? void 0 : e.primary;
1323
1325
  }};
1324
1326
  }
1325
- `, kt = c(he)`
1327
+ `, zt = c(fe)`
1326
1328
  font-size: ${(t) => {
1327
1329
  var e;
1328
1330
  return (e = t.theme.fonts) == null ? void 0 : e.small;
1329
1331
  }};
1330
1332
  font-weight: 300;
1331
- `, zt = (t) => new RegExp("^#", "i").test(t), St = (t) => ({ children: e, ...n }) => {
1333
+ `, St = (t) => new RegExp("^#", "i").test(t), Nt = (t) => ({ children: e, ...n }) => {
1332
1334
  const {
1333
1335
  implementation: a,
1334
- name: s
1335
- } = t.get("$widget"), { href: i = "" } = n;
1336
- if (zt(i))
1337
- return /* @__PURE__ */ o(Oe, { smooth: !0, to: i, children: e });
1336
+ name: i
1337
+ } = t.get("$widget"), { href: s = "" } = n;
1338
+ if (St(s))
1339
+ return /* @__PURE__ */ o(Ye, { smooth: !0, to: s, children: e });
1338
1340
  const r = a.bindings.map((d) => d.replace(/\./g, "\\.")).join("|"), l = new RegExp(
1339
1341
  `^((http[s]?:)?//)?(${r})/([^\\s]+)`
1340
- ).exec(i);
1342
+ ).exec(s);
1341
1343
  if (l && l.length >= 4) {
1342
1344
  const d = l[4];
1343
- if (a.widgets.get(d) && !d.startsWith("blob?") && !d.startsWith(s))
1344
- return /* @__PURE__ */ o(Ye, { widgetName: d, children: e });
1345
+ if (a.widgets.get(d) && !d.startsWith("blob?") && !d.startsWith(i))
1346
+ return /* @__PURE__ */ o(_e, { widgetName: d, children: e });
1345
1347
  }
1346
1348
  return /* @__PURE__ */ o("a", { ...n, children: e });
1347
- }, Vt = (t, e = []) => ({
1349
+ }, qt = (t, e = []) => ({
1348
1350
  transform: {
1349
1351
  a: (n) => {
1350
- const { children: a, ...s } = n, i = s["data-target"];
1351
- if (i && e.length) {
1352
+ const { children: a, ...i } = n, s = i["data-target"];
1353
+ if (s && e.length) {
1352
1354
  const m = e.find(
1353
- ({ connection: l }) => l === i
1355
+ ({ connection: l }) => l === s
1354
1356
  );
1355
1357
  if (m)
1356
- return /* @__PURE__ */ o(pe, { ...m, children: a });
1358
+ return /* @__PURE__ */ o(ye, { ...m, children: a });
1357
1359
  }
1358
- return St(t)(n);
1360
+ return Nt(t)(n);
1359
1361
  }
1360
1362
  }
1361
1363
  });
1362
1364
  export {
1363
- Ot as AccordionListItem,
1364
- pe as DialogLink,
1365
- Ct as DialogList,
1366
- At as DrawerList,
1367
- Mt as DropdownActions,
1368
- Pt as DropdownList,
1369
- tt as FavoriteButton,
1370
- Rt as Feedback,
1371
- Yt as GuideList,
1372
- $t as Loader,
1373
- gt as LoaderWrapper,
1365
+ Yt as AccordionListItem,
1366
+ ye as DialogLink,
1367
+ At as DialogList,
1368
+ Mt as DrawerList,
1369
+ Pt as DropdownActions,
1370
+ Bt as DropdownList,
1371
+ nt as FavoriteButton,
1372
+ Wt as Feedback,
1373
+ _t as GuideList,
1374
+ vt as Loader,
1375
+ pt as LoaderWrapper,
1374
1376
  st as Metadata,
1375
- _t as NotificationList,
1376
- Bt as SmallCaret,
1377
- jt as StyledHeaderText,
1378
- et as StyledListButton,
1379
- Vt as guideRenderInstructions,
1380
- Ze as loadingOpacity,
1381
- Wt as useArrowKeys,
1382
- Et as useDebounce,
1383
- ot as useFavorites,
1384
- Ht as useHover
1377
+ Vt as NotificationList,
1378
+ jt as SmallCaret,
1379
+ Rt as StyledHeaderText,
1380
+ tt as StyledListButton,
1381
+ qt as guideRenderInstructions,
1382
+ et as loadingOpacity,
1383
+ Et as useArrowKeys,
1384
+ Ht as useDebounce,
1385
+ it as useFavorites,
1386
+ Ot as useHover
1385
1387
  };