@telia-ace/knowledge-widget-ui 1.1.2-rc.0 → 1.1.2-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/hooks/use-hover.d.ts +4 -1
- package/index.js +249 -249
- package/index.mjs +255 -247
- package/package.json +4 -4
package/hooks/use-hover.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -12,136 +12,136 @@
|
|
|
12
12
|
margin: 0 ${e=>{var t;return(t=e.theme.sizes)==null?void 0:t.small}} 0 0;
|
|
13
13
|
}
|
|
14
14
|
`,fe=({trigger:e,header:t,className:a,animation:o,fullScreen:i,onToggle:r,children:l,ref:h,closeButtonAriaLabel:c,...m})=>n.jsx(s.Drawer,{className:v.appendClassNames(a,"humany-drawer-list"),trigger:e,header:t,animation:o,fullScreen:i,onToggle:r,closeButtonAriaLabel:c,children:n.jsx(ge,{...m,children:l})}),ge=d(s.ItemList)`
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
font-size: ${e=>{var t;return(t=e.theme.fonts)==null?void 0:t.normal}};
|
|
22
|
-
}
|
|
23
|
-
`,pe=({items:e,renderItem:t,trigger:a,header:o,children:i})=>n.jsx(s.Dropdown,{className:"humany-dropdown-actions",trigger:a,children:n.jsxs(xe,{children:[!!o&&n.jsx(ye,{children:o}),e&&t&&n.jsx(ve,{items:e,renderItem:t}),i]})}),xe=d.div`
|
|
24
|
-
background: #fff;
|
|
25
|
-
border: #ccc 1px solid;
|
|
26
|
-
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
|
|
27
|
-
font-family: ${e=>{var t;return(t=e.theme.fonts)==null?void 0:t.type}};
|
|
15
|
+
${s.itemList}
|
|
16
|
+
font-family: ${e=>{var t;return(t=e.theme.fonts)==null?void 0:t.type}};
|
|
17
|
+
padding: ${e=>{var t;return(t=e.theme.sizes)==null?void 0:t.medium}};
|
|
18
|
+
> ul > li {
|
|
19
|
+
overflow: visible;
|
|
20
|
+
font-weight: 300;
|
|
28
21
|
font-size: ${e=>{var t;return(t=e.theme.fonts)==null?void 0:t.normal}};
|
|
22
|
+
}
|
|
23
|
+
`,pe=({items:e,renderItem:t,trigger:a,header:o,children:i})=>n.jsx(s.Dropdown,{className:"humany-dropdown-actions",trigger:a,children:n.jsxs(xe,{children:[!!o&&n.jsx(ye,{children:o}),e&&t&&n.jsx(ve,{items:e,renderItem:t}),i]})}),xe=d.div`
|
|
24
|
+
background: #fff;
|
|
25
|
+
border: #ccc 1px solid;
|
|
26
|
+
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
|
|
27
|
+
font-family: ${e=>{var t;return(t=e.theme.fonts)==null?void 0:t.type}};
|
|
28
|
+
font-size: ${e=>{var t;return(t=e.theme.fonts)==null?void 0:t.normal}};
|
|
29
29
|
`,ye=d.div`
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
padding: ${e=>{var t;return(t=e.theme.sizes)==null?void 0:t.normal}};
|
|
31
|
+
padding-bottom: 0;
|
|
32
|
+
font-size: ${e=>{var t;return(t=e.theme.fonts)==null?void 0:t.normal}};
|
|
33
|
+
font-weight: normal;
|
|
34
|
+
white-space: nowrap;
|
|
35
|
+
display: flex;
|
|
36
|
+
align-items: center;
|
|
37
|
+
|
|
38
|
+
h1,
|
|
39
|
+
h2,
|
|
40
|
+
h3,
|
|
41
|
+
h4,
|
|
42
|
+
h5,
|
|
43
|
+
h6 {
|
|
44
|
+
margin: 0;
|
|
33
45
|
font-weight: normal;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
align-items: center;
|
|
37
|
-
|
|
38
|
-
h1,
|
|
39
|
-
h2,
|
|
40
|
-
h3,
|
|
41
|
-
h4,
|
|
42
|
-
h5,
|
|
43
|
-
h6 {
|
|
44
|
-
margin: 0;
|
|
45
|
-
font-weight: normal;
|
|
46
|
-
padding-bottom: 0;
|
|
47
|
-
}
|
|
46
|
+
padding-bottom: 0;
|
|
47
|
+
}
|
|
48
48
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
49
|
+
svg,
|
|
50
|
+
i {
|
|
51
|
+
margin-right: ${e=>{var t;return(t=e.theme.sizes)==null?void 0:t.small}};
|
|
52
|
+
}
|
|
53
53
|
`,ve=d(s.List)`
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}
|
|
54
|
+
list-style: none;
|
|
55
|
+
padding: 0;
|
|
56
|
+
margin: 0;
|
|
57
|
+
padding: ${e=>{var t;return(t=e.theme.sizes)==null?void 0:t.small}} 0;
|
|
58
|
+
|
|
59
|
+
li {
|
|
60
|
+
background: #fff;
|
|
61
|
+
|
|
62
|
+
a {
|
|
63
|
+
display: block;
|
|
64
|
+
font-size: ${e=>{var t;return(t=e.theme.fonts)==null?void 0:t.small}};
|
|
65
|
+
padding: ${e=>{var t,a;return`${(t=e.theme.sizes)==null?void 0:t.small} ${(a=e.theme.sizes)==null?void 0:a.normal}`}};
|
|
66
|
+
cursor: pointer;
|
|
67
|
+
color: #555;
|
|
68
|
+
text-decoration: none;
|
|
69
|
+
|
|
70
|
+
&:hover {
|
|
71
|
+
background: #f9f9f9;
|
|
72
|
+
color: ${e=>{var t;return(t=e.theme.colors)==null?void 0:t.primary}};
|
|
73
|
+
}
|
|
75
74
|
}
|
|
75
|
+
}
|
|
76
76
|
`,$e=({trigger:e,className:t,children:a,closeButtonAriaLabel:o,...i})=>n.jsx(s.Dropdown,{className:v.appendClassNames(t,"humany-dropdown-list"),closeButtonAriaLabel:o,trigger:e,children:n.jsx(be,{...i,children:a})}),be=d(s.ItemList)`
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
}
|
|
97
|
-
}
|
|
77
|
+
${s.itemList}
|
|
78
|
+
font-family: ${e=>{var t;return(t=e.theme.fonts)==null?void 0:t.type}};
|
|
79
|
+
> div {
|
|
80
|
+
${e=>{var t;return s.headingElement(e)("> h1",y.css`
|
|
81
|
+
font-size: ${(t=e.theme.fonts)==null?void 0:t.normal};
|
|
82
|
+
line-height: 1.2em;
|
|
83
|
+
`)}}
|
|
84
|
+
}
|
|
85
|
+
> ul > li {
|
|
86
|
+
overflow: visible;
|
|
87
|
+
font-weight: 300;
|
|
88
|
+
font-size: ${e=>{var t;return(t=e.theme.fonts)==null?void 0:t.normal}};
|
|
89
|
+
|
|
90
|
+
a {
|
|
91
|
+
display: inline-block;
|
|
92
|
+
|
|
93
|
+
@media (hover: hover) {
|
|
94
|
+
&:hover {
|
|
95
|
+
text-decoration: underline;
|
|
98
96
|
}
|
|
97
|
+
}
|
|
99
98
|
}
|
|
99
|
+
}
|
|
100
100
|
`,W=e=>y.css`
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
101
|
+
${e["data-loading"]&&"position: relative;"};
|
|
102
|
+
${e["data-loading"]&&"min-height: 150px;"}
|
|
103
|
+
> * {
|
|
104
|
+
transition: 200ms ease-out opacity;
|
|
105
|
+
opacity: ${e["data-loading"]?"0.5":"1"};
|
|
106
|
+
}
|
|
107
|
+
.humany-loader {
|
|
108
|
+
opacity: ${e["data-loading"]?"1":"0"};
|
|
109
|
+
}
|
|
110
110
|
`,we=d(s.Icon)`
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
111
|
+
&& {
|
|
112
|
+
font-size: ${e=>{var t;return(t=e.theme.fonts)==null?void 0:t.small}};
|
|
113
|
+
}
|
|
114
|
+
width: 1.2em;
|
|
115
115
|
`,je=d(s.Text)`
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
116
|
+
font-size: ${e=>{var t;return(t=e.theme.fonts)==null?void 0:t.medium}};
|
|
117
|
+
font-weight: normal;
|
|
118
|
+
line-height: 1.2em;
|
|
119
|
+
color: ${e=>{var t;return(t=e.theme.colors)==null?void 0:t.text}};
|
|
120
120
|
`,q=d(s.Button)`
|
|
121
|
-
|
|
122
|
-
|
|
121
|
+
display: flex;
|
|
122
|
+
align-items: center;
|
|
123
123
|
|
|
124
|
-
|
|
124
|
+
${e=>{var t;return e["data-has-label"]==="true"&&e["data-has-symbol"]==="true"&&`
|
|
125
125
|
svg, i {
|
|
126
126
|
margin: 0 ${(t=e.theme.sizes)==null?void 0:t.small} 0 0;
|
|
127
127
|
}
|
|
128
128
|
`}}
|
|
129
129
|
|
|
130
|
-
|
|
131
|
-
|
|
130
|
+
&:focus-visible {
|
|
131
|
+
${e=>e["data-has-label"]==="true"&&s.paddedBorderTabStyle}
|
|
132
132
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
}
|
|
133
|
+
svg, i {
|
|
134
|
+
${e=>e["data-has-label"]==="false"&&e["data-has-symbol"]==="true"&&y.css`
|
|
135
|
+
${s.paddedBorderTabStyle(e)}
|
|
136
|
+
box-sizing: content-box;
|
|
137
|
+
`}
|
|
139
138
|
}
|
|
139
|
+
}
|
|
140
140
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
141
|
+
span {
|
|
142
|
+
flex: 1;
|
|
143
|
+
font-weight: 300;
|
|
144
|
+
}
|
|
145
145
|
`,Y=({addFavoriteTooltip:e,removeFavoriteCancelLabel:t,removeFavoriteConfirmLabel:a,removeFavoriteHeader:o,removeFavoriteLabel:i,removeFavoriteTooltip:r,id:l,isFavorite:h,guideTitle:c,buttonLabel:m="",actions:{addFavorite:p,removeFavorite:f}})=>{const g=u.useCallback(()=>{f(l)},[l,f]),w=u.useCallback(()=>{p(l)},[l,p]),$=`${h?r:e}${c?`: "${c}"`:""}`;return h?n.jsx(s.Confirm,{trigger:n.jsxs(E,{className:"humany-favorite-button",title:$,"aria-label":$,"data-favorite":"true","data-has-label":m?"true":"false","data-has-symbol":"true",children:[n.jsx(s.SymbolBadge,{size:16,symbol:{type:"Svg",content:"star-empty"}}),m&&n.jsx(s.StyledText,{children:m})]}),onConfirm:g,cancelLabel:t,confirmLabel:a,header:o,text:i}):n.jsxs(E,{className:"humany-favorite-button",title:$,"aria-label":$,onClick:w,"data-favorite":"false","data-has-label":m?"true":"false","data-has-symbol":"true",children:[n.jsx(s.SymbolBadge,{size:16,symbol:{type:"Svg",content:"star-empty"}}),m&&n.jsx(s.StyledText,{children:m})]})},E=d(q)`
|
|
146
146
|
grid-area: favorite;
|
|
147
147
|
|
|
@@ -199,50 +199,50 @@
|
|
|
199
199
|
}
|
|
200
200
|
`}}
|
|
201
201
|
`,ke=u.forwardRef(({onFeedback:e=()=>{},direction:t="horizontal",className:a,header:o,positive:i,negative:r,selected:l,...h},c)=>n.jsxs(ze,{className:v.appendClassNames(a,"humany-feedback"),"data-direction":t,...s.convertToStringAttributes(h),ref:c,children:[!!o&&n.jsx(Se,{children:o}),n.jsxs(M,{className:"humany-feedback-button",disabled:!!l,"data-selected":l==="positive","data-direction":t,onClick:()=>e("positive"),children:[n.jsx(s.Icon,{faIcon:"smile-o"}),n.jsx("span",{children:i})]}),n.jsxs(M,{className:"humany-feedback-button",disabled:!!l,"data-selected":l==="negative","data-direction":t,onClick:()=>e("negative"),children:[n.jsx(s.Icon,{faIcon:"frown-o"}),n.jsx("span",{children:r})]})]})),Se=d(s.StyledText)`
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
202
|
+
font-weight: normal;
|
|
203
|
+
margin: 0 0 ${e=>{var t;return(t=e.theme.sizes)==null?void 0:t.normal}};
|
|
204
|
+
font-size: ${e=>{var t;return(t=e.theme.fonts)==null?void 0:t.normal}};
|
|
205
|
+
display: block;
|
|
206
206
|
`,M=d(s.Button)`
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
207
|
+
display: inline-block;
|
|
208
|
+
font-size: ${e=>{var t;return(t=e.theme.fonts)==null?void 0:t.normal}};
|
|
209
|
+
font-weight: 300;
|
|
210
|
+
&& {
|
|
211
|
+
margin-right: ${e=>{var t;return(t=e.theme.sizes)==null?void 0:t.large}};
|
|
212
|
+
}
|
|
213
213
|
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
214
|
+
${e=>{var t,a;return e["data-direction"]==="horizontal"&&y.css`
|
|
215
|
+
width: 225px;
|
|
216
|
+
max-width: calc(50% - ${(t=e.theme.sizes)==null?void 0:t.large} - ${(a=e.theme.sizes)==null?void 0:a.small});
|
|
217
|
+
`}}
|
|
218
218
|
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
219
|
+
${e=>e["data-direction"]==="vertical"&&y.css`
|
|
220
|
+
min-width: 190px;
|
|
221
|
+
`}
|
|
222
222
|
|
|
223
223
|
${e=>{var t,a;return((t=e.theme.colors)==null?void 0:t.primary)&&s.invertedHoverButton({active:e["data-selected"],primaryColor:(a=e.theme.colors)==null?void 0:a.primary,secondaryColor:"#FFFFFF",theme:e.theme})}}
|
|
224
224
|
|
|
225
225
|
i {
|
|
226
|
-
|
|
227
|
-
|
|
226
|
+
margin: 0 ${e=>{var t;return(t=e.theme.sizes)==null?void 0:t.small}} 0 0;
|
|
227
|
+
}
|
|
228
228
|
`,ze=d.div`
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
229
|
+
${e=>{var t;return e["data-direction"]==="vertical"&&y.css`
|
|
230
|
+
> button {
|
|
231
|
+
width: 100%;
|
|
232
|
+
&:not(:last-child) {
|
|
233
|
+
margin-bottom: ${(t=e.theme.sizes)==null?void 0:t.normal};
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
`}}
|
|
237
237
|
`,Le=()=>{const[e,t]=u.useState(null),a=s.useKeyPress("ArrowLeft"),o=s.useKeyPress("ArrowRight"),i=s.useKeyPress("ArrowUp"),r=s.useKeyPress("ArrowDown"),l=()=>{t(a?"left":o?"right":i?"up":r?"down":null)};return u.useEffect(l,[a,o,i,r]),e},Ne=(e,t)=>{const[a,o]=u.useState(e),i=u.useCallback(()=>setTimeout(()=>{o(e)},t),[t,o,e]);return u.useEffect(()=>{const r=i();return()=>{clearTimeout(r)}},[i]),a},_=()=>{const e=s.useContainer(),[t,a]=u.useState([]),o=e.get("favorites");u.useEffect(()=>{if(o){a(o.get());const{events:c}=e.get("$widget");return c.subscribe("widget:favorites-updated",(p,{updated:f})=>{a([...f])})}},[]);const i=c=>o?o.add(c):Promise.resolve([]),r=c=>o?o.remove(c):Promise.resolve([]),l=()=>o?o.clear():Promise.resolve([]),h=u.useCallback(c=>t.indexOf(c)>-1?r(c):i(c),[t]);return[t,u.useMemo(()=>({addFavorite:i,removeFavorite:r,clearFavorites:l,toggleFavorite:h}),[t])]},Ce=()=>{const[e,t]=u.useState(!1),a=u.useRef(),o=u.useCallback(()=>t(!0),[t]),i=u.useCallback(()=>t(!1),[t]);return s.useEventListener("mouseenter",o,a.current),s.useEventListener("mouseleave",i,a.current),[e,a]},K=({format:e=s.DateFormats.YYYY_MM_DD_HH_MM,className:t="",byLabel:a="",modifiedLabel:o="",publishedLabel:i="",modifiedBy:r="",publishedBy:l="",showModified:h=!1,showPublished:c=!1,modified:m,published:p})=>{const f=c&&p?n.jsx(O,{format:e,timestamp:p}):null,g=h&&m?n.jsx(O,{format:e,timestamp:m}):null;return!f&&!g?null:n.jsxs(F,{className:v.appendClassNames(t,"humany-metadata"),children:[f&&n.jsxs(F,{className:"humany-published",children:[i,f,a&&l&&` ${a.replace("{{editor}}",l)}`]}),g&&n.jsxs(F,{className:"humany-modified",children:[f&&", ",o,g,a&&r&&` ${a.replace("{{editor}}",r)}`]})]})},O=d(s.Timestamp)`
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
238
|
+
&:not(:first-child) {
|
|
239
|
+
margin-left: 4px;
|
|
240
|
+
}
|
|
241
|
+
&:not(:last-child) {
|
|
242
|
+
margin-right: 4px;
|
|
243
|
+
}
|
|
244
244
|
`,F=d(s.Text)`
|
|
245
|
-
|
|
245
|
+
font-style: italic;
|
|
246
246
|
`,Te=({tags:e})=>e.filter(t=>t.symbol).length?n.jsx(Pe,{className:"humany-guide-list-tags",items:e,renderItem:({id:t,symbol:a,title:o})=>a&&n.jsx("li",{"data-tag":t,children:n.jsx(Ae,{size:18,symbol:a,title:o})},t)}):null,Ie=u.forwardRef(({title:e,id:t,route:a,symbolSize:o,collapseUri:i,children:r},l)=>{const{params:h}=s.useRouteData();return n.jsxs(De,{ref:l,"data-guide":t,children:[n.jsx(s.TextLink,{title:e,"aria-label":e,routeName:a,params:v.createParams({...h,uriName:i||void 0,id:void 0,guide:void 0,accordion:void 0}),text:e,children:n.jsx(s.SymbolBadge,{size:o,symbol:{type:"Svg",content:"caret-up"}})}),r]})}),De=d.li`
|
|
247
247
|
> a {
|
|
248
248
|
grid-column: 1/-1;
|
|
@@ -417,130 +417,130 @@
|
|
|
417
417
|
stroke-dashoffset: -124px;
|
|
418
418
|
}
|
|
419
419
|
`,Oe=d.svg`
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
420
|
+
animation: ${Ee} 2s linear infinite;
|
|
421
|
+
height: 100%;
|
|
422
|
+
transform-origin: center center;
|
|
423
|
+
width: 100%;
|
|
424
|
+
position: absolute;
|
|
425
|
+
top: 0;
|
|
426
|
+
bottom: 0;
|
|
427
|
+
left: 0;
|
|
428
|
+
right: 0;
|
|
429
|
+
margin: auto;
|
|
430
|
+
transition: 200ms ease-out opacity;
|
|
431
431
|
`,U=d.div`
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
432
|
+
position: absolute;
|
|
433
|
+
top: 0;
|
|
434
|
+
bottom: 0;
|
|
435
|
+
left: 0;
|
|
436
|
+
right: 0;
|
|
437
|
+
height: 100%;
|
|
438
|
+
width: 100%;
|
|
439
|
+
pointer-events: ${e=>e["data-loading"]?"all":"none"};
|
|
440
|
+
display: flex;
|
|
441
|
+
flex-direction: column;
|
|
442
|
+
justify-content: center;
|
|
443
|
+
transition: 200ms ease-out opacity;
|
|
444
|
+
box-sizing: border-box;
|
|
445
|
+
overflow: hidden;
|
|
446
446
|
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
447
|
+
.humany-spinner-svg {
|
|
448
|
+
opacity: ${e=>e["data-loading"]?"1":"0"};
|
|
449
|
+
}
|
|
450
450
|
`,He=d.div`
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
451
|
+
position: relative;
|
|
452
|
+
margin: 0 auto;
|
|
453
|
+
width: 100px;
|
|
454
|
+
&:before {
|
|
455
|
+
content: '';
|
|
456
|
+
display: block;
|
|
457
|
+
padding-top: 100%;
|
|
458
|
+
}
|
|
459
459
|
`,We=d.circle`
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
460
|
+
stroke-dasharray: 1, 200;
|
|
461
|
+
stroke-dashoffset: 0;
|
|
462
|
+
animation: ${Me} 1.5s ease-in-out infinite;
|
|
463
|
+
stroke-linecap: round;
|
|
464
|
+
stroke: ${e=>{var t;return(t=e.theme.colors)==null?void 0:t.primary}};
|
|
465
|
+
stroke-width: 2px;
|
|
466
466
|
`,V=({loading:e=!1})=>n.jsx(U,{className:"humany-loader","data-loading":e,children:n.jsx(He,{className:"humany-spinner",children:n.jsx(Oe,{className:"humany-spinner-svg",viewBox:"25 25 50 50",children:n.jsx(We,{cx:"50",cy:"50",r:"20",fill:"none","stroke-width":"2","stroke-miterlimit":"10"})})})}),qe=({className:e,showHeader:t,notificationList:a,loading:o,...i})=>{const[r,l]=u.useState(null),{id:h,title:c,symbol:m,notifications:p=[],defaultHeaderOptions:f={visible:!0}}=a||{};return!p.length&&!o?null:n.jsx(_e,{...i,"data-loading":o,"data-show-header":typeof t=="boolean"?t:f.visible,className:v.appendClassNames(e,"humany-notification-list"),"data-notification-category":h,header:c,symbol:m,items:p,renderItem:({id:g,title:w,body:$,modified:b,expandable:S})=>n.jsx(Ke,{"data-notification":g,"data-expanded":S?r===g:!0,children:S?n.jsxs(n.Fragment,{children:[n.jsxs(Ye,{title:w,"aria-label":w,"aria-expanded":r===g,onClick:()=>l(r===g?null:g),children:[n.jsx("span",{children:w}),n.jsx(Ue,{size:11,symbol:{type:"Svg",content:`caret-${r===g?"up":"down"}`}})]}),n.jsx(H,{html:$}),b&&n.jsx(Ve,{format:s.DateFormats.YYYY_MM_DD,timestamp:b})]}):n.jsx(H,{html:$})},g),children:n.jsx(V,{loading:o})})},Ye=d(s.Button)`
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
467
|
+
display: flex;
|
|
468
|
+
justify-content: space-between;
|
|
469
|
+
align-items: center;
|
|
470
|
+
width: 100%;
|
|
471
|
+
text-align: left;
|
|
472
|
+
svg,
|
|
473
|
+
i {
|
|
474
|
+
color: ${e=>{var t;return(t=e.theme.colors)==null?void 0:t.primary}};
|
|
475
|
+
}
|
|
476
|
+
span {
|
|
477
|
+
color: ${e=>{var t;return(t=e.theme.colors)==null?void 0:t.text}};
|
|
478
|
+
font-size: ${e=>{var t;return(t=e.theme.fonts)==null?void 0:t.normal}};
|
|
479
|
+
overflow: hidden;
|
|
480
|
+
text-overflow: ellipsis;
|
|
481
|
+
flex: 1;
|
|
482
|
+
white-space: nowrap;
|
|
483
|
+
}
|
|
484
|
+
&:focus-visible {
|
|
485
|
+
${s.borderTabStyle}
|
|
476
486
|
span {
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
overflow: hidden;
|
|
480
|
-
text-overflow: ellipsis;
|
|
481
|
-
flex: 1;
|
|
482
|
-
white-space: nowrap;
|
|
483
|
-
}
|
|
484
|
-
&:focus-visible {
|
|
485
|
-
${s.borderTabStyle}
|
|
486
|
-
span {
|
|
487
|
-
color: ${e=>{var t;return(t=e.theme.colors)==null?void 0:t.primary}};
|
|
488
|
-
text-decoration: underline;
|
|
489
|
-
}
|
|
487
|
+
color: ${e=>{var t;return(t=e.theme.colors)==null?void 0:t.primary}};
|
|
488
|
+
text-decoration: underline;
|
|
490
489
|
}
|
|
490
|
+
}
|
|
491
491
|
`,_e=d(s.ItemList)`
|
|
492
|
-
|
|
493
|
-
|
|
492
|
+
${W}
|
|
493
|
+
${s.itemList}
|
|
494
494
|
overflow: hidden;
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
495
|
+
justify-content: flex-start;
|
|
496
|
+
padding: ${e=>{var t;return(t=e.theme.sizes)==null?void 0:t.large}};
|
|
497
|
+
${e=>!e["data-show-header"]&&y.css`
|
|
498
|
+
> div {
|
|
499
|
+
${s.headingElement(e)("h1",y.css`
|
|
500
|
+
display: none;
|
|
501
|
+
`)}
|
|
502
|
+
}
|
|
503
|
+
`}
|
|
504
504
|
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
}
|
|
505
|
+
@media (hover: hover) {
|
|
506
|
+
button:hover {
|
|
507
|
+
text-decoration: underline;
|
|
509
508
|
}
|
|
509
|
+
}
|
|
510
510
|
`,H=d(s.Paragraph)`
|
|
511
|
-
|
|
512
|
-
|
|
511
|
+
${s.genericHtml}
|
|
512
|
+
font-weight: 300;
|
|
513
513
|
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
514
|
+
p {
|
|
515
|
+
white-space: normal;
|
|
516
|
+
}
|
|
517
517
|
`,Ke=d.li`
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
}
|
|
518
|
+
.humany-paragraph {
|
|
519
|
+
display: none;
|
|
520
|
+
&:not(:only-child) {
|
|
521
|
+
${e=>{var t,a,o;return((t=e.theme.sizes)==null?void 0:t.cardinal)&&((a=e.theme.sizes)==null?void 0:a.normal)&&y.css`
|
|
522
|
+
margin: ${(o=e.theme.sizes)==null?void 0:o.normal} 0;
|
|
523
|
+
`}}
|
|
525
524
|
}
|
|
525
|
+
}
|
|
526
526
|
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
display: block;
|
|
530
|
-
}
|
|
531
|
-
`}
|
|
532
|
-
|
|
533
|
-
> span {
|
|
527
|
+
${e=>e["data-expanded"]&&y.css`
|
|
528
|
+
.humany-paragraph {
|
|
534
529
|
display: block;
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
530
|
+
}
|
|
531
|
+
`}
|
|
532
|
+
|
|
533
|
+
> span {
|
|
534
|
+
display: block;
|
|
535
|
+
font-weight: 300;
|
|
536
|
+
color: ${e=>{var t;return(t=e.theme.colors)==null?void 0:t.accent}};
|
|
537
|
+
}
|
|
538
538
|
`,Ue=d(s.SymbolBadge)`
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
539
|
+
margin: 0 0 0 ${e=>{var t;return(t=e.theme.sizes)==null?void 0:t.small}};
|
|
540
|
+
line {
|
|
541
|
+
stroke: ${e=>{var t;return(t=e.theme.colors)==null?void 0:t.primary}};
|
|
542
|
+
}
|
|
543
543
|
`,Ve=d(s.Timestamp)`
|
|
544
|
-
|
|
545
|
-
|
|
544
|
+
font-size: ${e=>{var t;return(t=e.theme.fonts)==null?void 0:t.small}};
|
|
545
|
+
font-weight: 300;
|
|
546
546
|
`,Ge=e=>new RegExp("^#","i").test(e),Je=e=>({children:t,...a})=>{const{implementation:o,name:i}=e.get("$widget"),{href:r=""}=a;if(Ge(r))return n.jsx(s.AnchorLink,{smooth:!0,to:r,children:t});const l=o.bindings.map(m=>m.replace(/\./g,"\\.")).join("|"),c=new RegExp(`^((http[s]?:)?//)?(${l})/([^\\s]+)`).exec(r);if(c&&c.length>=4){const m=c[4];if(o.widgets.get(m)&&!m.startsWith("blob?")&&!m.startsWith(i))return n.jsx(s.WidgetLink,{widgetName:m,children:t})}return n.jsx("a",{...a,children:t})},Qe=(e,t=[])=>({transform:{a:a=>{const{children:o,...i}=a,r=i["data-target"];if(r&&t.length){const h=t.find(({connection:c})=>c===r);if(h)return n.jsx(P,{...h,children:o})}return Je(e)(a)}}});exports.AccordionListItem=Ie;exports.DialogLink=P;exports.DialogList=he;exports.DrawerList=fe;exports.DropdownActions=pe;exports.DropdownList=$e;exports.FavoriteButton=Y;exports.Feedback=ke;exports.GuideList=Be;exports.Loader=V;exports.LoaderWrapper=U;exports.Metadata=K;exports.NotificationList=qe;exports.SmallCaret=we;exports.StyledHeaderText=je;exports.StyledListButton=q;exports.guideRenderInstructions=Qe;exports.loadingOpacity=W;exports.useArrowKeys=Le;exports.useDebounce=Ne;exports.useFavorites=_;exports.useHover=Ce;Object.keys(s).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>s[e]})});
|
package/index.mjs
CHANGED
|
@@ -103,107 +103,113 @@ const pe = ({
|
|
|
103
103
|
children: /* @__PURE__ */ o(Ke, { ...d, children: r })
|
|
104
104
|
}
|
|
105
105
|
), Ke = c(j)`
|
|
106
|
-
|
|
107
|
-
|
|
106
|
+
${R}
|
|
107
|
+
font-family: ${(t) => {
|
|
108
108
|
var e;
|
|
109
109
|
return (e = t.theme.fonts) == null ? void 0 : e.type;
|
|
110
110
|
}};
|
|
111
|
-
|
|
111
|
+
padding: ${(t) => {
|
|
112
112
|
var e;
|
|
113
113
|
return (e = t.theme.sizes) == null ? void 0 : e.medium;
|
|
114
114
|
}};
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
115
|
+
> ul > li {
|
|
116
|
+
overflow: visible;
|
|
117
|
+
font-weight: 300;
|
|
118
|
+
font-size: ${(t) => {
|
|
119
119
|
var e;
|
|
120
120
|
return (e = t.theme.fonts) == null ? void 0 : e.normal;
|
|
121
121
|
}};
|
|
122
|
-
|
|
123
|
-
`, Mt = ({
|
|
122
|
+
}
|
|
123
|
+
`, Mt = ({
|
|
124
|
+
items: t,
|
|
125
|
+
renderItem: e,
|
|
126
|
+
trigger: n,
|
|
127
|
+
header: a,
|
|
128
|
+
children: s
|
|
129
|
+
}) => /* @__PURE__ */ o(ce, { className: "humany-dropdown-actions", trigger: n, children: /* @__PURE__ */ p(Ue, { children: [
|
|
124
130
|
!!a && /* @__PURE__ */ o(Je, { children: a }),
|
|
125
131
|
t && e && /* @__PURE__ */ o(Qe, { items: t, renderItem: e }),
|
|
126
132
|
s
|
|
127
133
|
] }) }), Ue = c.div`
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
134
|
+
background: #fff;
|
|
135
|
+
border: #ccc 1px solid;
|
|
136
|
+
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
|
|
137
|
+
font-family: ${(t) => {
|
|
132
138
|
var e;
|
|
133
139
|
return (e = t.theme.fonts) == null ? void 0 : e.type;
|
|
134
140
|
}};
|
|
135
|
-
|
|
141
|
+
font-size: ${(t) => {
|
|
136
142
|
var e;
|
|
137
143
|
return (e = t.theme.fonts) == null ? void 0 : e.normal;
|
|
138
144
|
}};
|
|
139
145
|
`, Je = c.div`
|
|
140
|
-
|
|
146
|
+
padding: ${(t) => {
|
|
141
147
|
var e;
|
|
142
148
|
return (e = t.theme.sizes) == null ? void 0 : e.normal;
|
|
143
149
|
}};
|
|
144
|
-
|
|
145
|
-
|
|
150
|
+
padding-bottom: 0;
|
|
151
|
+
font-size: ${(t) => {
|
|
146
152
|
var e;
|
|
147
153
|
return (e = t.theme.fonts) == null ? void 0 : e.normal;
|
|
148
154
|
}};
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
155
|
+
font-weight: normal;
|
|
156
|
+
white-space: nowrap;
|
|
157
|
+
display: flex;
|
|
158
|
+
align-items: center;
|
|
153
159
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
160
|
+
h1,
|
|
161
|
+
h2,
|
|
162
|
+
h3,
|
|
163
|
+
h4,
|
|
164
|
+
h5,
|
|
165
|
+
h6 {
|
|
166
|
+
margin: 0;
|
|
167
|
+
font-weight: normal;
|
|
168
|
+
padding-bottom: 0;
|
|
169
|
+
}
|
|
164
170
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
171
|
+
svg,
|
|
172
|
+
i {
|
|
173
|
+
margin-right: ${(t) => {
|
|
168
174
|
var e;
|
|
169
175
|
return (e = t.theme.sizes) == null ? void 0 : e.small;
|
|
170
176
|
}};
|
|
171
|
-
|
|
177
|
+
}
|
|
172
178
|
`, Qe = c(G)`
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
179
|
+
list-style: none;
|
|
180
|
+
padding: 0;
|
|
181
|
+
margin: 0;
|
|
182
|
+
padding: ${(t) => {
|
|
177
183
|
var e;
|
|
178
184
|
return (e = t.theme.sizes) == null ? void 0 : e.small;
|
|
179
185
|
}} 0;
|
|
180
186
|
|
|
181
|
-
|
|
182
|
-
|
|
187
|
+
li {
|
|
188
|
+
background: #fff;
|
|
183
189
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
190
|
+
a {
|
|
191
|
+
display: block;
|
|
192
|
+
font-size: ${(t) => {
|
|
187
193
|
var e;
|
|
188
194
|
return (e = t.theme.fonts) == null ? void 0 : e.small;
|
|
189
195
|
}};
|
|
190
|
-
|
|
196
|
+
padding: ${(t) => {
|
|
191
197
|
var e, n;
|
|
192
198
|
return `${(e = t.theme.sizes) == null ? void 0 : e.small} ${(n = t.theme.sizes) == null ? void 0 : n.normal}`;
|
|
193
199
|
}};
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
200
|
+
cursor: pointer;
|
|
201
|
+
color: #555;
|
|
202
|
+
text-decoration: none;
|
|
197
203
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
204
|
+
&:hover {
|
|
205
|
+
background: #f9f9f9;
|
|
206
|
+
color: ${(t) => {
|
|
201
207
|
var e;
|
|
202
208
|
return (e = t.theme.colors) == null ? void 0 : e.primary;
|
|
203
209
|
}};
|
|
204
|
-
|
|
205
|
-
}
|
|
210
|
+
}
|
|
206
211
|
}
|
|
212
|
+
}
|
|
207
213
|
`, Pt = ({
|
|
208
214
|
trigger: t,
|
|
209
215
|
className: e,
|
|
@@ -219,75 +225,75 @@ const pe = ({
|
|
|
219
225
|
children: /* @__PURE__ */ o(Xe, { ...s, children: n })
|
|
220
226
|
}
|
|
221
227
|
), Xe = c(j)`
|
|
222
|
-
|
|
223
|
-
|
|
228
|
+
${R}
|
|
229
|
+
font-family: ${(t) => {
|
|
224
230
|
var e;
|
|
225
231
|
return (e = t.theme.fonts) == null ? void 0 : e.type;
|
|
226
232
|
}};
|
|
227
|
-
|
|
228
|
-
|
|
233
|
+
> div {
|
|
234
|
+
${(t) => {
|
|
229
235
|
var e;
|
|
230
236
|
return K(t)(
|
|
231
237
|
"> h1",
|
|
232
238
|
y`
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
239
|
+
font-size: ${(e = t.theme.fonts) == null ? void 0 : e.normal};
|
|
240
|
+
line-height: 1.2em;
|
|
241
|
+
`
|
|
236
242
|
);
|
|
237
243
|
}}
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
244
|
+
}
|
|
245
|
+
> ul > li {
|
|
246
|
+
overflow: visible;
|
|
247
|
+
font-weight: 300;
|
|
248
|
+
font-size: ${(t) => {
|
|
243
249
|
var e;
|
|
244
250
|
return (e = t.theme.fonts) == null ? void 0 : e.normal;
|
|
245
251
|
}};
|
|
246
252
|
|
|
247
|
-
|
|
248
|
-
|
|
253
|
+
a {
|
|
254
|
+
display: inline-block;
|
|
249
255
|
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
}
|
|
254
|
-
}
|
|
256
|
+
@media (hover: hover) {
|
|
257
|
+
&:hover {
|
|
258
|
+
text-decoration: underline;
|
|
255
259
|
}
|
|
260
|
+
}
|
|
256
261
|
}
|
|
262
|
+
}
|
|
257
263
|
`, Ze = (t) => y`
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
264
|
+
${t["data-loading"] && "position: relative;"};
|
|
265
|
+
${t["data-loading"] && "min-height: 150px;"}
|
|
266
|
+
> * {
|
|
267
|
+
transition: 200ms ease-out opacity;
|
|
268
|
+
opacity: ${t["data-loading"] ? "0.5" : "1"};
|
|
269
|
+
}
|
|
270
|
+
.humany-loader {
|
|
271
|
+
opacity: ${t["data-loading"] ? "1" : "0"};
|
|
272
|
+
}
|
|
267
273
|
`, Bt = c(P)`
|
|
268
|
-
|
|
269
|
-
|
|
274
|
+
&& {
|
|
275
|
+
font-size: ${(t) => {
|
|
270
276
|
var e;
|
|
271
277
|
return (e = t.theme.fonts) == null ? void 0 : e.small;
|
|
272
278
|
}};
|
|
273
|
-
|
|
274
|
-
|
|
279
|
+
}
|
|
280
|
+
width: 1.2em;
|
|
275
281
|
`, jt = c(de)`
|
|
276
|
-
|
|
282
|
+
font-size: ${(t) => {
|
|
277
283
|
var e;
|
|
278
284
|
return (e = t.theme.fonts) == null ? void 0 : e.medium;
|
|
279
285
|
}};
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
286
|
+
font-weight: normal;
|
|
287
|
+
line-height: 1.2em;
|
|
288
|
+
color: ${(t) => {
|
|
283
289
|
var e;
|
|
284
290
|
return (e = t.theme.colors) == null ? void 0 : e.text;
|
|
285
291
|
}};
|
|
286
292
|
`, et = c(U)`
|
|
287
|
-
|
|
288
|
-
|
|
293
|
+
display: flex;
|
|
294
|
+
align-items: center;
|
|
289
295
|
|
|
290
|
-
|
|
296
|
+
${(t) => {
|
|
291
297
|
var e;
|
|
292
298
|
return t["data-has-label"] === "true" && t["data-has-symbol"] === "true" && `
|
|
293
299
|
svg, i {
|
|
@@ -296,21 +302,21 @@ const pe = ({
|
|
|
296
302
|
`;
|
|
297
303
|
}}
|
|
298
304
|
|
|
299
|
-
|
|
300
|
-
|
|
305
|
+
&:focus-visible {
|
|
306
|
+
${(t) => t["data-has-label"] === "true" && X}
|
|
301
307
|
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
}
|
|
308
|
+
svg, i {
|
|
309
|
+
${(t) => t["data-has-label"] === "false" && t["data-has-symbol"] === "true" && y`
|
|
310
|
+
${X(t)}
|
|
311
|
+
box-sizing: content-box;
|
|
312
|
+
`}
|
|
308
313
|
}
|
|
314
|
+
}
|
|
309
315
|
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
316
|
+
span {
|
|
317
|
+
flex: 1;
|
|
318
|
+
font-weight: 300;
|
|
319
|
+
}
|
|
314
320
|
`, tt = ({
|
|
315
321
|
addFavoriteTooltip: t,
|
|
316
322
|
removeFavoriteCancelLabel: e,
|
|
@@ -489,41 +495,41 @@ const pe = ({
|
|
|
489
495
|
}
|
|
490
496
|
)
|
|
491
497
|
), nt = c(_)`
|
|
492
|
-
|
|
493
|
-
|
|
498
|
+
font-weight: normal;
|
|
499
|
+
margin: 0 0 ${(t) => {
|
|
494
500
|
var e;
|
|
495
501
|
return (e = t.theme.sizes) == null ? void 0 : e.normal;
|
|
496
502
|
}};
|
|
497
|
-
|
|
503
|
+
font-size: ${(t) => {
|
|
498
504
|
var e;
|
|
499
505
|
return (e = t.theme.fonts) == null ? void 0 : e.normal;
|
|
500
506
|
}};
|
|
501
|
-
|
|
507
|
+
display: block;
|
|
502
508
|
`, ne = c(U)`
|
|
503
|
-
|
|
504
|
-
|
|
509
|
+
display: inline-block;
|
|
510
|
+
font-size: ${(t) => {
|
|
505
511
|
var e;
|
|
506
512
|
return (e = t.theme.fonts) == null ? void 0 : e.normal;
|
|
507
513
|
}};
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
514
|
+
font-weight: 300;
|
|
515
|
+
&& {
|
|
516
|
+
margin-right: ${(t) => {
|
|
511
517
|
var e;
|
|
512
518
|
return (e = t.theme.sizes) == null ? void 0 : e.large;
|
|
513
519
|
}};
|
|
514
|
-
|
|
520
|
+
}
|
|
515
521
|
|
|
516
|
-
|
|
522
|
+
${(t) => {
|
|
517
523
|
var e, n;
|
|
518
524
|
return t["data-direction"] === "horizontal" && y`
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
525
|
+
width: 225px;
|
|
526
|
+
max-width: calc(50% - ${(e = t.theme.sizes) == null ? void 0 : e.large} - ${(n = t.theme.sizes) == null ? void 0 : n.small});
|
|
527
|
+
`;
|
|
522
528
|
}}
|
|
523
529
|
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
530
|
+
${(t) => t["data-direction"] === "vertical" && y`
|
|
531
|
+
min-width: 190px;
|
|
532
|
+
`}
|
|
527
533
|
|
|
528
534
|
${(t) => {
|
|
529
535
|
var e, n;
|
|
@@ -536,22 +542,22 @@ const pe = ({
|
|
|
536
542
|
}}
|
|
537
543
|
|
|
538
544
|
i {
|
|
539
|
-
|
|
545
|
+
margin: 0 ${(t) => {
|
|
540
546
|
var e;
|
|
541
547
|
return (e = t.theme.sizes) == null ? void 0 : e.small;
|
|
542
548
|
}} 0 0;
|
|
543
|
-
|
|
549
|
+
}
|
|
544
550
|
`, at = c.div`
|
|
545
|
-
|
|
551
|
+
${(t) => {
|
|
546
552
|
var e;
|
|
547
553
|
return t["data-direction"] === "vertical" && y`
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
554
|
+
> button {
|
|
555
|
+
width: 100%;
|
|
556
|
+
&:not(:last-child) {
|
|
557
|
+
margin-bottom: ${(e = t.theme.sizes) == null ? void 0 : e.normal};
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
`;
|
|
555
561
|
}}
|
|
556
562
|
`, Wt = () => {
|
|
557
563
|
const [t, e] = F(null), n = M("ArrowLeft"), a = M("ArrowRight"), s = M("ArrowUp"), i = M("ArrowDown");
|
|
@@ -635,14 +641,14 @@ const pe = ({
|
|
|
635
641
|
] })
|
|
636
642
|
] });
|
|
637
643
|
}, ae = c(he)`
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
+
&:not(:first-child) {
|
|
645
|
+
margin-left: 4px;
|
|
646
|
+
}
|
|
647
|
+
&:not(:last-child) {
|
|
648
|
+
margin-right: 4px;
|
|
649
|
+
}
|
|
644
650
|
`, Y = c(de)`
|
|
645
|
-
|
|
651
|
+
font-style: italic;
|
|
646
652
|
`, it = ({ tags: t }) => t.filter((e) => e.symbol).length ? /* @__PURE__ */ o(
|
|
647
653
|
ct,
|
|
648
654
|
{
|
|
@@ -1082,55 +1088,55 @@ const pe = ({
|
|
|
1082
1088
|
stroke-dashoffset: -124px;
|
|
1083
1089
|
}
|
|
1084
1090
|
`, ut = c.svg`
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1091
|
+
animation: ${ht} 2s linear infinite;
|
|
1092
|
+
height: 100%;
|
|
1093
|
+
transform-origin: center center;
|
|
1094
|
+
width: 100%;
|
|
1095
|
+
position: absolute;
|
|
1096
|
+
top: 0;
|
|
1097
|
+
bottom: 0;
|
|
1098
|
+
left: 0;
|
|
1099
|
+
right: 0;
|
|
1100
|
+
margin: auto;
|
|
1101
|
+
transition: 200ms ease-out opacity;
|
|
1096
1102
|
`, gt = c.div`
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1103
|
+
position: absolute;
|
|
1104
|
+
top: 0;
|
|
1105
|
+
bottom: 0;
|
|
1106
|
+
left: 0;
|
|
1107
|
+
right: 0;
|
|
1108
|
+
height: 100%;
|
|
1109
|
+
width: 100%;
|
|
1110
|
+
pointer-events: ${(t) => t["data-loading"] ? "all" : "none"};
|
|
1111
|
+
display: flex;
|
|
1112
|
+
flex-direction: column;
|
|
1113
|
+
justify-content: center;
|
|
1114
|
+
transition: 200ms ease-out opacity;
|
|
1115
|
+
box-sizing: border-box;
|
|
1116
|
+
overflow: hidden;
|
|
1111
1117
|
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1118
|
+
.humany-spinner-svg {
|
|
1119
|
+
opacity: ${(t) => t["data-loading"] ? "1" : "0"};
|
|
1120
|
+
}
|
|
1115
1121
|
`, pt = c.div`
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1122
|
+
position: relative;
|
|
1123
|
+
margin: 0 auto;
|
|
1124
|
+
width: 100px;
|
|
1125
|
+
&:before {
|
|
1126
|
+
content: '';
|
|
1127
|
+
display: block;
|
|
1128
|
+
padding-top: 100%;
|
|
1129
|
+
}
|
|
1124
1130
|
`, yt = c.circle`
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1131
|
+
stroke-dasharray: 1, 200;
|
|
1132
|
+
stroke-dashoffset: 0;
|
|
1133
|
+
animation: ${ft} 1.5s ease-in-out infinite;
|
|
1134
|
+
stroke-linecap: round;
|
|
1135
|
+
stroke: ${(t) => {
|
|
1130
1136
|
var e;
|
|
1131
1137
|
return (e = t.theme.colors) == null ? void 0 : e.primary;
|
|
1132
1138
|
}};
|
|
1133
|
-
|
|
1139
|
+
stroke-width: 2px;
|
|
1134
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(
|
|
1135
1141
|
yt,
|
|
1136
1142
|
{
|
|
@@ -1210,118 +1216,118 @@ const pe = ({
|
|
|
1210
1216
|
}
|
|
1211
1217
|
);
|
|
1212
1218
|
}, vt = c(U)`
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1219
|
+
display: flex;
|
|
1220
|
+
justify-content: space-between;
|
|
1221
|
+
align-items: center;
|
|
1222
|
+
width: 100%;
|
|
1223
|
+
text-align: left;
|
|
1224
|
+
svg,
|
|
1225
|
+
i {
|
|
1226
|
+
color: ${(t) => {
|
|
1221
1227
|
var e;
|
|
1222
1228
|
return (e = t.theme.colors) == null ? void 0 : e.primary;
|
|
1223
1229
|
}};
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1230
|
+
}
|
|
1231
|
+
span {
|
|
1232
|
+
color: ${(t) => {
|
|
1227
1233
|
var e;
|
|
1228
1234
|
return (e = t.theme.colors) == null ? void 0 : e.text;
|
|
1229
1235
|
}};
|
|
1230
|
-
|
|
1236
|
+
font-size: ${(t) => {
|
|
1231
1237
|
var e;
|
|
1232
1238
|
return (e = t.theme.fonts) == null ? void 0 : e.normal;
|
|
1233
1239
|
}};
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1240
|
+
overflow: hidden;
|
|
1241
|
+
text-overflow: ellipsis;
|
|
1242
|
+
flex: 1;
|
|
1243
|
+
white-space: nowrap;
|
|
1244
|
+
}
|
|
1245
|
+
&:focus-visible {
|
|
1246
|
+
${q}
|
|
1247
|
+
span {
|
|
1248
|
+
color: ${(t) => {
|
|
1243
1249
|
var e;
|
|
1244
1250
|
return (e = t.theme.colors) == null ? void 0 : e.primary;
|
|
1245
1251
|
}};
|
|
1246
|
-
|
|
1247
|
-
}
|
|
1252
|
+
text-decoration: underline;
|
|
1248
1253
|
}
|
|
1254
|
+
}
|
|
1249
1255
|
`, xt = c(j)`
|
|
1250
|
-
|
|
1251
|
-
|
|
1256
|
+
${Ze}
|
|
1257
|
+
${R}
|
|
1252
1258
|
overflow: hidden;
|
|
1253
|
-
|
|
1254
|
-
|
|
1259
|
+
justify-content: flex-start;
|
|
1260
|
+
padding: ${(t) => {
|
|
1255
1261
|
var e;
|
|
1256
1262
|
return (e = t.theme.sizes) == null ? void 0 : e.large;
|
|
1257
1263
|
}};
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1264
|
+
${(t) => !t["data-show-header"] && y`
|
|
1265
|
+
> div {
|
|
1266
|
+
${K(t)(
|
|
1261
1267
|
"h1",
|
|
1262
1268
|
y`
|
|
1263
|
-
|
|
1264
|
-
|
|
1269
|
+
display: none;
|
|
1270
|
+
`
|
|
1265
1271
|
)}
|
|
1266
|
-
|
|
1267
|
-
|
|
1272
|
+
}
|
|
1273
|
+
`}
|
|
1268
1274
|
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
}
|
|
1275
|
+
@media (hover: hover) {
|
|
1276
|
+
button:hover {
|
|
1277
|
+
text-decoration: underline;
|
|
1273
1278
|
}
|
|
1279
|
+
}
|
|
1274
1280
|
`, oe = c(Ee)`
|
|
1275
|
-
|
|
1276
|
-
|
|
1281
|
+
${He}
|
|
1282
|
+
font-weight: 300;
|
|
1277
1283
|
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1284
|
+
p {
|
|
1285
|
+
white-space: normal;
|
|
1286
|
+
}
|
|
1281
1287
|
`, bt = c.li`
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1288
|
+
.humany-paragraph {
|
|
1289
|
+
display: none;
|
|
1290
|
+
&:not(:only-child) {
|
|
1291
|
+
${(t) => {
|
|
1286
1292
|
var e, n, a;
|
|
1287
1293
|
return ((e = t.theme.sizes) == null ? void 0 : e.cardinal) && ((n = t.theme.sizes) == null ? void 0 : n.normal) && y`
|
|
1288
|
-
|
|
1289
|
-
|
|
1294
|
+
margin: ${(a = t.theme.sizes) == null ? void 0 : a.normal} 0;
|
|
1295
|
+
`;
|
|
1290
1296
|
}}
|
|
1291
|
-
}
|
|
1292
1297
|
}
|
|
1298
|
+
}
|
|
1293
1299
|
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
display: block;
|
|
1297
|
-
}
|
|
1298
|
-
`}
|
|
1299
|
-
|
|
1300
|
-
> span {
|
|
1300
|
+
${(t) => t["data-expanded"] && y`
|
|
1301
|
+
.humany-paragraph {
|
|
1301
1302
|
display: block;
|
|
1302
|
-
|
|
1303
|
-
|
|
1303
|
+
}
|
|
1304
|
+
`}
|
|
1305
|
+
|
|
1306
|
+
> span {
|
|
1307
|
+
display: block;
|
|
1308
|
+
font-weight: 300;
|
|
1309
|
+
color: ${(t) => {
|
|
1304
1310
|
var e;
|
|
1305
1311
|
return (e = t.theme.colors) == null ? void 0 : e.accent;
|
|
1306
1312
|
}};
|
|
1307
|
-
|
|
1313
|
+
}
|
|
1308
1314
|
`, wt = c(S)`
|
|
1309
|
-
|
|
1315
|
+
margin: 0 0 0 ${(t) => {
|
|
1310
1316
|
var e;
|
|
1311
1317
|
return (e = t.theme.sizes) == null ? void 0 : e.small;
|
|
1312
1318
|
}};
|
|
1313
|
-
|
|
1314
|
-
|
|
1319
|
+
line {
|
|
1320
|
+
stroke: ${(t) => {
|
|
1315
1321
|
var e;
|
|
1316
1322
|
return (e = t.theme.colors) == null ? void 0 : e.primary;
|
|
1317
1323
|
}};
|
|
1318
|
-
|
|
1324
|
+
}
|
|
1319
1325
|
`, kt = c(he)`
|
|
1320
|
-
|
|
1326
|
+
font-size: ${(t) => {
|
|
1321
1327
|
var e;
|
|
1322
1328
|
return (e = t.theme.fonts) == null ? void 0 : e.small;
|
|
1323
1329
|
}};
|
|
1324
|
-
|
|
1330
|
+
font-weight: 300;
|
|
1325
1331
|
`, zt = (t) => new RegExp("^#", "i").test(t), St = (t) => ({ children: e, ...n }) => {
|
|
1326
1332
|
const {
|
|
1327
1333
|
implementation: a,
|
|
@@ -1343,7 +1349,9 @@ const pe = ({
|
|
|
1343
1349
|
a: (n) => {
|
|
1344
1350
|
const { children: a, ...s } = n, i = s["data-target"];
|
|
1345
1351
|
if (i && e.length) {
|
|
1346
|
-
const m = e.find(
|
|
1352
|
+
const m = e.find(
|
|
1353
|
+
({ connection: l }) => l === i
|
|
1354
|
+
);
|
|
1347
1355
|
if (m)
|
|
1348
1356
|
return /* @__PURE__ */ o(pe, { ...m, children: a });
|
|
1349
1357
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@telia-ace/knowledge-widget-ui",
|
|
3
|
-
"version": "1.1.2-rc.
|
|
3
|
+
"version": "1.1.2-rc.2",
|
|
4
4
|
"main": "./index.js",
|
|
5
5
|
"types": "./index.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
}
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@telia-ace/knowledge-widget-core": "^1.1.2-rc.
|
|
14
|
-
"@telia-ace/widget-ui": "^1.1.2-rc.
|
|
15
|
-
"@telia-ace/widget-utilities": "^1.1.2-rc.
|
|
13
|
+
"@telia-ace/knowledge-widget-core": "^1.1.2-rc.2",
|
|
14
|
+
"@telia-ace/widget-ui": "^1.1.2-rc.2",
|
|
15
|
+
"@telia-ace/widget-utilities": "^1.1.2-rc.2",
|
|
16
16
|
"@webprovisions/platform": "^1.1.4"
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|