@telia-ace/knowledge-widget-ui 1.0.26-next.4 → 1.0.26-next.6

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