Реверснутый zcode с своими фишками и плагинами Реверснутая ade zcode без z ai, с массовой загрузкой ключей, умным апи роутингом, плагином для командной разработки
reversnutyy-zcode-s-svoimi-fishkami-i-plaginami / fork / team / assets / ui.js 382 строк · изменён 13 нояб., 21:19
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
import { h, Fragment } from 'preact' ;
import { useEffect, useLayoutEffect, useRef, useState, useCallback } from 'preact/hooks' ;
import { html, createStore, useStore, toasts, dismissToast, initials, colorFor, reducedMotion } from './core.js' ;
import { Icon } from './icons.js' ;
const layerStack = [ ] ;
export function pushLayer
entry close
layerStack entry
i layerStack entry
i layerStack i
layerStack
top layerStack layerStack
top top
st status status status
html
shown members max
rest members shown
html
ref
thumb setThumb
root ref
root
btn root
btn
btn btn
ro measure
ro root
ro
value options
html
$ options html
div select $ sm cls value $ value disabled $ disabled aria label $ label
onChange $ e
$ options html
select textarea ref $ ref $ cls value $ value onInput $ onInput $ rest textarea div role ref $ ref onKeyDown $ onKey
style $ pos left pos top width width align
$ children
div $
button type $ cls ref $ ref aria haspopup aria expanded $ open title $ label aria label $ label
onClick $ e o onPointerDown $ e
$ children html
button
$ open html
open onClose kind title wide children footer headExtra label initialFocus
mounted setMounted open
leaving setLeaving
panel
returnTo
closeRef onClose
closeRef onClose
open
returnTo
mounted
t
back returnTo
back back back
t
open
mounted leaving
pop closeRef
el panel
target initialFocus el initialFocus el el
target focus
pop
mounted leaving
mounted
e
items panel x
items e
first items
last items items
e first panel e last
e last e first
out leaving
kind
html
html
confirmStore
title text ok danger
confirmStore title text ok danger resolve
c confirmStore
last setLast
c c c
shown c last
c v confirmStore
html
timer
left t
started
start
t
started
timer t left
timer left started
timer
icon t t
html
list toasts
html
icon title text children
html
icon title text pill onClick tag
inner html
tag
html
html
w hgt r style
html
body rows html
card html html
html
onClick cls children disabled title type rest
busy setBusy
spin setSpin
busy
t
onClick e t
html
html
ic role role role
html
seen i
i
items x
prev
ghosts setGhosts
cur items x x i
gone
k v prev cur k gone v k
prev cur
gone
g gone
g gone x
ghosts items x
out items x
g ghosts out g out g
out
(
close
)
{
const
=
{
}
;
.
push
(
)
;
return
(
)
=>
{
const
=
.
indexOf
(
)
;
if
(
>=
0
)
.
splice
(
,
1
)
;
}
;
}
export
function
hasLayers
(
)
{
return
.
length
>
0
;
}
export
function
closeTopLayer
(
)
{
const
=
[
.
length
-
1
]
;
if
(
)
{
.
close
(
)
;
return
true
;
}
return
false
;
}
export
function
Avatar
(
{ name, id, color, size = 24 , online, status, title }
)
{
const
=
&&
!==
'online'
?
:
''
;
return
` < span class = ${ 'av s' + size} style = ${ { background : colorFor ( id || name, color) } } title = ${ title ?? name} >
${ initials ( name) }
${ online ? html` < i class = ${ 'on ' + st} > </ i> ` : null }
</ span> `
;
}
export
function
AvatarStack
(
{ members = [ ] , max = 4 }
)
{
const
=
.
slice
(
0
,
)
;
const
=
.
length
-
.
length
;
return
` < div class = " av-stack" title = ${ members. map ( ( m ) => m. displayName ) . join ( ', ' ) } >
${ shown. map ( ( m ) => html` < ${ Avatar } key = ${ m. id } name = ${ m. displayName } id = ${ m. id } color = ${ m. avatarColor } size = ${ 20 } title = ${ m. displayName + ' — в сети' } /> ` ) }
${ rest > 0 ? html` < span class = " av s20 more" > +${ rest} </ span> ` : null }
</ div> `
;
}
export
function
Seg
(
{ value, options, onChange, block, disabled, label }
)
{
const
=
useRef
(
null
)
;
const
[
,
]
=
useState
(
null
)
;
useLayoutEffect
(
(
)
=>
{
const
=
.
current
;
if
(
!
)
return
;
const
measure
=
(
)
=>
{
const
=
.
querySelector
(
'button[aria-pressed="true"]'
)
;
if
(
!
)
return
setThumb
(
null
)
;
setThumb
(
{
x
:
.
offsetLeft
,
w
:
.
offsetWidth
}
)
;
}
;
measure
(
)
;
const
=
new
ResizeObserver
(
)
;
.
observe
(
)
;
return
(
)
=>
.
disconnect
(
)
;
}
,
[
,
.
length
]
)
;
return
` < div class = ${ 'seg' + ( block ? ' block' : '' ) } ref = ${ ref} role = " group" aria-label = ${ label} >
${ thumb ? html`< span class = "thumb" style= ${ { width : thumb. w + 'px' , transform : ` translateX( ${ thumb. x - 2 } px) ` , left : '2px' } } ></ span> `
:
null
}
{
.
map
(
(
o
)
=>
` < button type = " button" key = ${ o. id } aria-pressed = ${ String ( o. id === value) } disabled = ${ disabled}
onClick = ${ ( ) => ! disabled && onChange ( o. id ) } > ${ o. label } </ button> `
)
}
<
/
>
` ;
}
// ---------------------------------------------------------------- select (нативный, стилизованный)
export function Select({ value, onChange, options, sm, disabled, label, class: cls = '' }) {
return html `
<
class
=
{
'sel '
+
(
?
'sm '
:
''
)
+
}
=
{
??
''
}
=
{
}
-
=
{
}
=
{
(
e
)
=>
onChange
(
.
currentTarget
.
value
)
}
>
{
.
map
(
(
o
)
=>
` < option key = ${ o. id } value = ${ o. id } > ${ o. label } </ option> `
)
}
<
/
>
` ;
}
// ---------------------------------------------------------------- авто-высота textarea
export function useAutosize(ref, value, max = 400) {
useLayoutEffect(() => {
const el = ref.current;
if (!el) return;
el.style.height = 'auto';
const hgt = Math.min(el.scrollHeight + 2, max);
el.style.height = hgt + 'px';
el.style.overflowY = el.scrollHeight + 2 > max ? 'auto' : 'hidden';
}, [value]);
}
export function AutoTextarea({ value, onInput, max = 400, class: cls = 'ta', ...rest }) {
const ref = useRef(null);
useAutosize(ref, value, max);
return html `
<
=
{
}
class
=
{
}
=
{
}
=
{
}
...
{
}
>
<
/
>
` ;
}
// ---------------------------------------------------------------- поповер
export function Popover({ anchor, onClose, children, align = 'left', width }) {
const ref = useRef(null);
const [pos, setPos] = useState(null);
useLayoutEffect(() => {
if (!anchor) return;
const r = anchor.getBoundingClientRect();
const el = ref.current;
const w = el?.offsetWidth || width || 220;
const hgt = el?.offsetHeight || 200;
let left = align === 'right' ? r.right - w : r.left;
left = Math.max(8, Math.min(left, window.innerWidth - w - 8));
let top = r.bottom + 4;
if (top + hgt > window.innerHeight - 8) top = Math.max(8, r.top - hgt - 4);
setPos({ left, top });
}, [anchor]);
useEffect(() => {
const pop = pushLayer(onClose);
const onDown = (e) => {
if (ref.current?.contains(e.target) || anchor?.contains(e.target)) return;
onClose();
};
document.addEventListener('pointerdown', onDown, true);
const first = ref.current?.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');
first?.focus({ preventScroll: true });
return () => { pop(); document.removeEventListener('pointerdown', onDown, true); };
}, []);
const onKey = (e) => {
if (e.key !== 'ArrowDown' && e.key !== 'ArrowUp') return;
const items = [...ref.current.querySelectorAll('.mi:not(:disabled)')];
if (!items.length) return;
e.preventDefault();
const i = items.indexOf(document.activeElement);
const n = e.key === 'ArrowDown' ? (i + 1) % items.length : (i - 1 + items.length) % items.length;
items[n].focus();
};
return html `
<
class
=
"pop"
=
"menu"
=
{
}
=
{
}
=
{
{
left
:
(
?.
??
-
9999
)
+
'px'
,
top
:
(
?.
??
-
9999
)
+
'px'
,
width
:
?
+
'px'
:
undefined
,
transformOrigin
:
===
'right'
?
'top right'
:
'top left'
}
}
>
{
}
<
/
>
` ;
}
/** Кнопка с выпадающим меню. items: [{label, icon, onClick, danger, checked, sep, hidden, disabled}] */
export function MenuButton({ items, icon = 'more', label = 'Ещё', class: cls = 'ibtn', align = 'right', children, width }) {
const [open, setOpen] = useState(false);
const ref = useRef(null);
const visible = items.filter((i) => !i.hidden);
if (!visible.length) return null;
return html `
<
{
Fragment
}
>
<
=
"button"
class
=
{
}
=
{
}
-
=
"menu"
-
=
{
String
(
)
}
=
{
}
-
=
{
}
=
{
(
e
)
=>
{
.
stopPropagation
(
)
;
setOpen
(
(
o
)
=>
!
)
;
}
}
=
{
(
e
)
=>
.
stopPropagation
(
)
}
>
{
??
` < ${ Icon } name = ${ icon} /> `
}
<
/
>
{
?
` < ${ Popover } anchor = ${ ref. current } align = ${ align} width = ${ width} onClose = ${ ( ) => { setOpen ( false ) ; ref. current ?. focus ( ) ; } } >
${ visible. map ( ( it, i ) => it. sep
? html` < div class = " sep" key = ${ 's' + i} > </ div> `
: html` < button type = " button" role = " menuitem" key = ${ i} class = ${ 'mi' + ( it. danger ? ' danger' : '' ) } disabled = ${ it. disabled }
onClick = ${ ( e ) => e it
) }
<//>`
:
null
}
<
}
const
FOCUSABLE
=
'button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'
;
export
function
Layer
(
{
,
,
=
'drawer'
,
,
,
,
,
,
,
}
)
{
const
[
,
]
=
useState
(
)
;
const
[
,
]
=
useState
(
false
)
;
const
=
useRef
(
null
)
;
const
=
useRef
(
null
)
;
const
=
useRef
(
)
;
.
current
=
;
useEffect
(
(
)
=>
{
if
(
)
{
.
current
=
document
.
activeElement
;
setMounted
(
true
)
;
setLeaving
(
false
)
;
}
else
if
(
)
{
setLeaving
(
true
)
;
const
=
setTimeout
(
(
)
=>
{
setMounted
(
false
)
;
setLeaving
(
false
)
;
}
,
reducedMotion
(
)
?
0
:
200
)
;
const
=
.
current
;
if
(
&&
document
.
contains
(
)
)
.
focus
?.
(
{
preventScroll
:
true
}
)
;
return
(
)
=>
clearTimeout
(
)
;
}
}
,
[
]
)
;
useEffect
(
(
)
=>
{
if
(
!
||
)
return
;
const
=
pushLayer
(
(
)
=>
.
current
?.
(
)
)
;
const
=
.
current
;
requestAnimationFrame
(
(
)
=>
{
const
=
(
&&
?.
querySelector
(
)
)
||
?.
querySelector
(
'[data-autofocus]'
)
||
;
?.
?.
(
{
preventScroll
:
true
}
)
;
}
)
;
return
;
}
,
[
,
]
)
;
if
(
!
)
return
null
;
const
trap
=
(
e
)
=>
{
if
(
.
key
!==
'Tab'
)
return
;
const
=
[
...
.
current
.
querySelectorAll
(
FOCUSABLE
)
]
.
filter
(
(
x
)
=>
.
offsetParent
!==
null
)
;
if
(
!
.
length
)
{
.
preventDefault
(
)
;
return
;
}
const
=
[
0
]
;
const
=
[
.
length
-
1
]
;
if
(
.
shiftKey
&&
(
document
.
activeElement
===
||
document
.
activeElement
===
.
current
)
)
{
.
preventDefault
(
)
;
.
focus
(
)
;
}
else
if
(
!
.
shiftKey
&&
document
.
activeElement
===
)
{
.
preventDefault
(
)
;
.
focus
(
)
;
}
}
;
const
=
?
' out'
:
''
;
if
(
===
'dialog'
)
{
return
` < ${ Fragment } >
< div class = ${ 'backdrop dlg' + out} onClick = ${ ( ) => onClose?. ( ) } > </ div>
< div class = ${ 'dialog' + out} role = " alertdialog" aria-modal = " true" aria-label = ${ label || title} tabindex = " -1" ref = ${ panel} onKeyDown = ${ trap} >
${ children}
</ div>
<//>`
;
}
return
` < ${ Fragment } >
< div class = ${ 'backdrop' + out} onClick = ${ ( ) => onClose?. ( ) } > </ div>
< section class = ${ kind + ( wide ? ' wide' : '' ) + out} role = " dialog" aria-modal = " true" aria-label = ${ label || title} tabindex = " -1" ref = ${ panel} onKeyDown = ${ trap} >
${ kind === 'sheet' ? html` < div class = " grab" > </ div> ` : null }
< header class = " layer-h" >
< div class = " t ell" > ${ title} </ div>
${ headExtra}
< button type = " button" class = " ibtn" title = " Закрыть (Esc)" aria-label = " Закрыть" onClick = ${ ( ) => onClose?. ( ) } > < ${ Icon } name = " x" /> </ button>
</ header>
< div class = " layer-b" > ${ children} </ div>
${ footer ? html` < footer class = " layer-f" > ${ footer} </ footer> ` : null }
</ section>
<//>`
;
}
const
=
createStore
(
null
)
;
export
function
confirmDialog
(
{
,
,
=
'Подтвердить'
,
=
true
}
)
{
return
new
Promise
(
(
resolve
)
=>
.
set
(
{
,
,
,
,
}
)
)
;
}
export
function
ConfirmHost
(
)
{
const
=
useStore
(
)
;
const
[
,
]
=
useState
(
null
)
;
useEffect
(
(
)
=>
{
if
(
)
setLast
(
)
;
}
,
[
]
)
;
const
=
||
;
const
done
=
(
v
)
=>
{
?.
resolve
(
)
;
.
set
(
null
)
;
}
;
return
` < ${ Layer } kind = " dialog" open = ${ ! ! c} onClose = ${ ( ) => done ( false ) } label = ${ shown?. title} initialFocus = " .btn.cancel" >
${ shown ? html` < div class = " t" > ${ shown. title } </ div>
${ shown. text ? html` < div class = " d" > ${ shown. text } </ div> ` : null }
< div class = " row" style = " justify-content : flex-end" >
< button type = " button" class = " btn cancel" onClick = ${ ( ) => done ( false ) } > Отмена</ button>
< button type = " button" class = ${ 'btn ' + ( shown. danger ? 'solid-danger' : 'primary' ) } onClick = ${ ( ) => done ( true ) } > ${ shown. ok } </ button>
</ div> ` : null }
<//>`
;
}
function
ToastItem
(
{ t }
)
{
const
=
useRef
(
0
)
;
const
=
useRef
(
.
timeout
)
;
const
=
useRef
(
0
)
;
const
=
useCallback
(
(
)
=>
{
if
(
!
.
timeout
)
return
;
.
current
=
Date
.
now
(
)
;
.
current
=
setTimeout
(
(
)
=>
dismissToast
(
.
id
)
,
.
current
)
;
}
,
[
]
)
;
const
pause
=
(
)
=>
{
clearTimeout
(
.
current
)
;
.
current
-=
Date
.
now
(
)
-
.
current
;
}
;
useEffect
(
(
)
=>
{
start
(
)
;
return
(
)
=>
clearTimeout
(
.
current
)
;
}
,
[
]
)
;
const
=
.
kind
===
'ok'
?
'check'
:
.
kind
===
'err'
?
'alert'
:
'activity'
;
return
` < div class = ${ 'toast ' + t. kind + ( t. leaving ? ' out' : '' ) } role = ${ t. kind === 'err' ? 'alert' : 'status' }
onMouseEnter = ${ pause} onMouseLeave = ${ start} >
< ${ Icon } name = ${ icon} class = " k" />
< div class = " msg" > ${ t. message } </ div>
${ t. action ? html` < button type = " button" class = " btn" onClick = ${ ( ) => { t. action . onClick ( ) ; dismissToast ( t. id ) ; } } > ${ t. action . label } </ button
< button type = " button" class = " ibtn sm" aria-label = " Скрыть" onClick = ${ ( ) => dismissToast ( t. id ) } > < ${ Icon } name = " x" size = ${ 14 } /> </ button>
</ div> `
;
}
export
function
ToastHost
(
)
{
const
=
useStore
(
)
;
return
` < div class = " toasts" aria-live = " polite" > ${ list. map ( ( t ) => html` < ${ ToastItem } key = ${ t. id } t = ${ t} /> ` ) } </ div> `
;
}
export
function
Empty
(
{
=
'inbox'
,
,
,
}
)
{
return
` < div class = " empty" >
< div class = " tile" > < ${ Icon } name = ${ icon} size = ${ 20 } /> </ div>
${ title ? html` < div class = " t" > ${ title} </ div> ` : null }
${ text ? html` < div class = " d" > ${ text} </ div> ` : null }
${ children}
</ div> `
;
}
export
function
Launcher
(
{
,
,
,
,
,
=
'button'
}
)
{
const
=
` < div class = " tile" > < ${ Icon } name = ${ icon} size = ${ 20 } /> </ div>
< div class = " grow" > < div class = " t ell" > ${ title} </ div> < div class = " d" > ${ text} </ div> </ div>
${ pill ? html` < span class = " pill" > ${ pill} </ span> ` : null } `
;
return
===
'button'
?
` < button type = " button" class = " launcher" onClick = ${ onClick} > ${ inner} </ button> `
:
` < div class = " launcher" > ${ inner} </ div> `
;
}
export
function
Skel
(
{
=
'100%'
,
=
14
,
=
8
,
}
)
{
return
` < div class = " skel" style = ${ { width : typeof w === 'number' ? w + 'px' : w, height : hgt + 'px' , borderRadius : r + 'px' , ... style } } > </ div> `
;
}
export
function
SkelList
(
{ rows = 4 , card = true }
)
{
const
=
Array
.
from
(
{
length
:
}
,
(
_, i
)
=>
` < div class = " li" key = ${ i} >
< ${ Skel } w = ${ 28 } hgt = ${ 28 } r = ${ 14 } />
< div class = " grow stack-s" style = " gap : 6 px " > < ${ Skel } w = ${ ` ${ 55 + ( ( i * 17 ) % 35 ) } % ` } hgt = ${ 11 } /> < ${ Skel } w = ${ ` ${ 30 + ( ( i * 23 ) % 30 ) } % ` } hgt = ${ 9 } /> </ div>
</ div> `
)
;
return
?
` < div class = " card list" > ${ body} </ div> `
:
` < div class = " list" > ${ body} </ div> `
;
}
export
function
Spinner
(
{ size = 16 }
)
{
return
` < span class = " spin" style = ${ { width : size + 'px' , height : size + 'px' } } aria-label = " Загрузка" > </ span> `
;
}
export
function
AsyncButton
(
{
,
class
:
=
'btn'
,
,
,
,
=
'button'
,
...
}
)
{
const
[
,
]
=
useState
(
false
)
;
const
[
,
]
=
useState
(
false
)
;
const
click
=
async
(
e
)
=>
{
if
(
)
return
;
setBusy
(
true
)
;
const
=
setTimeout
(
(
)
=>
setSpin
(
true
)
,
300
)
;
try
{
await
?.
(
)
;
}
finally
{
clearTimeout
(
)
;
setBusy
(
false
)
;
setSpin
(
false
)
;
}
}
;
return
` < button type = ${ type} class = ${ cls} disabled = ${ disabled || busy} title = ${ title} aria-busy = ${ String ( busy) } onClick = ${ click} ...${ rest} >
${ spin ? html` < span class = " spin" > </ span> ` : null } ${ children}
</ button> `
;
}
export
function
Field
(
{ label, hint, children, style }
)
{
return
` < label class = " field" style = ${ style} >
${ label ? html` < span class = " lbl" > ${ label} </ span> ` : null }
${ children}
${ hint ? html` < span class = " hint" > ${ hint} </ span> ` : null }
</ label> `
;
}
export
function
RoleBadge
(
{ role }
)
{
const
ROLE
=
{
owner
:
'Владелец'
,
maintainer
:
'Мейнтейнер'
,
dev
:
'Разработчик'
,
viewer
:
'Наблюдатель'
}
;
const
=
===
'owner'
?
'crown'
:
===
'maintainer'
?
'shield'
:
===
'viewer'
?
'eye'
:
'user'
;
return
` < span class = ${ 'role ' + role} > < ${ Icon } name = ${ ic} size = ${ 12 } /> ${ ROLE [ role] || role} </ span> `
;
}
export
function
stagger
(
i, seen
)
{
if
(
||
>
5
)
return
undefined
;
return
{
animationDelay
:
*
18
+
'ms'
}
;
}
export
function
useLeaving
(
,
keyOf
=
(
x
)
=>
.
id
)
{
const
=
useRef
(
new
Map
(
)
)
;
const
[
,
]
=
useState
(
[
]
)
;
const
=
new
Map
(
.
map
(
(
x, i
)
=>
[
keyOf
(
)
,
{
,
}
]
)
)
;
useEffect
(
(
)
=>
{
const
=
[
]
;
for
(
const
[
,
]
of
.
current
)
if
(
!
.
has
(
)
)
.
push
(
{
...
,
}
)
;
.
current
=
;
if
(
.
length
&&
!
reducedMotion
(
)
)
{
setGhosts
(
(
g
)
=>
[
...
,
...
]
)
;
setTimeout
(
(
)
=>
setGhosts
(
(
g
)
=>
.
filter
(
(
x
)
=>
!
.
includes
(
)
)
)
,
180
)
;
}
}
)
;
if
(
!
.
length
)
return
.
map
(
(
x
)
=>
(
{
item
:
,
leaving
:
false
}
)
)
;
const
=
.
map
(
(
x
)
=>
(
{
item
:
,
leaving
:
false
}
)
)
;
for
(
const
of
)
.
splice
(
Math
.
min
(
.
i
,
.
length
)
,
0
,
{
item
:
.
x
,
leaving
:
true
}
)
;
return
;
}
{
.
stopPropagation
(
)
;
setOpen
(
false
)
;
.
onClick
?.
(
)
;
}
}
>
${ it. icon ? html` < ${ Icon } name = ${ it. icon } /> ` : null }
< span class = " grow ell" >
${ it. label }
</ span>
${ it. checked ? html` < ${ Icon } name = " check" class = " chk-ic" /> ` : null }
</ button>
`
>
`
:
null
}