@nectary/components 0.22.0 → 0.24.0

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.
Files changed (450) hide show
  1. package/accordion/index.js +3 -6
  2. package/accordion-item/index.d.ts +1 -1
  3. package/accordion-item/index.js +4 -7
  4. package/alert/index.js +3 -5
  5. package/alert-button/index.js +3 -6
  6. package/alert-close/index.d.ts +1 -1
  7. package/alert-close/index.js +4 -7
  8. package/avatar/index.d.ts +1 -1
  9. package/avatar/index.js +4 -6
  10. package/avatar-badge/index.d.ts +1 -1
  11. package/avatar-badge/index.js +4 -6
  12. package/avatar-status/index.d.ts +1 -1
  13. package/avatar-status/index.js +4 -6
  14. package/button/index.js +3 -6
  15. package/card/index.js +3 -6
  16. package/card-button/index.js +3 -6
  17. package/card-container/index.js +3 -6
  18. package/card-link/index.d.ts +1 -1
  19. package/card-link/index.js +4 -7
  20. package/chat/index.js +3 -6
  21. package/chat-avatar/index.js +3 -6
  22. package/chat-block/index.js +3 -6
  23. package/chat-bubble/index.js +3 -6
  24. package/checkbox/index.js +3 -6
  25. package/dialog/index.d.ts +3 -4
  26. package/dialog/index.js +5 -8
  27. package/dropdown/index.js +4 -7
  28. package/dropdown-option/index.d.ts +2 -1
  29. package/dropdown-option/index.js +4 -6
  30. package/grid/index.js +3 -5
  31. package/grid-item/index.js +3 -5
  32. package/help-tooltip/index.d.ts +1 -1
  33. package/help-tooltip/index.js +4 -6
  34. package/icon-button/index.js +3 -6
  35. package/icons/access-time/index.d.ts +11 -0
  36. package/icons/access-time/index.js +4 -0
  37. package/icons/add-alert/index.js +4 -0
  38. package/icons/add-comment/index.d.ts +11 -0
  39. package/icons/add-comment/index.js +4 -0
  40. package/icons/alt-route/index.d.ts +11 -0
  41. package/icons/alt-route/index.js +4 -0
  42. package/icons/app-settings-alt/index.js +4 -0
  43. package/icons/apps/index.js +4 -0
  44. package/icons/arrow-back/index.js +4 -0
  45. package/icons/arrow-back-ios/index.js +4 -0
  46. package/icons/arrow-downward/index.js +4 -0
  47. package/icons/arrow-drop-down/index.js +4 -0
  48. package/icons/arrow-drop-down-circle/index.js +4 -0
  49. package/icons/arrow-drop-up/index.js +4 -0
  50. package/icons/arrow-forward/index.js +4 -0
  51. package/icons/arrow-forward-ios/index.js +4 -0
  52. package/icons/arrow-left/index.js +4 -0
  53. package/icons/arrow-right/index.js +4 -0
  54. package/icons/arrow-upward/index.js +4 -0
  55. package/icons/assignment/index.d.ts +11 -0
  56. package/icons/assignment/index.js +4 -0
  57. package/icons/attach-email/index.js +4 -0
  58. package/icons/attachment/index.js +4 -0
  59. package/icons/auto-delete/index.js +4 -0
  60. package/icons/campaign/index.js +4 -0
  61. package/icons/cancel/index.js +4 -0
  62. package/icons/chat/index.d.ts +11 -0
  63. package/icons/chat/index.js +4 -0
  64. package/icons/chat-bubble-outline/index.d.ts +11 -0
  65. package/icons/chat-bubble-outline/index.js +4 -0
  66. package/icons/check/index.js +4 -0
  67. package/icons/check-circle-outline/index.d.ts +11 -0
  68. package/icons/check-circle-outline/index.js +4 -0
  69. package/icons/chevron-left/index.js +4 -0
  70. package/icons/chevron-right/index.js +4 -0
  71. package/icons/close/index.js +4 -0
  72. package/icons/cloud/index.js +4 -0
  73. package/icons/cloud-circle/index.js +4 -0
  74. package/icons/cloud-done/index.js +4 -0
  75. package/icons/cloud-download/index.js +4 -0
  76. package/icons/cloud-off/index.js +4 -0
  77. package/icons/cloud-queue/index.js +4 -0
  78. package/icons/cloud-upload/index.js +4 -0
  79. package/icons/comment/index.d.ts +11 -0
  80. package/icons/comment/index.js +4 -0
  81. package/icons/create/index.d.ts +11 -0
  82. package/icons/create/index.js +4 -0
  83. package/{icon → icons}/create-icon-class.d.ts +1 -1
  84. package/{icon → icons}/create-icon-class.js +3 -5
  85. package/icons/create-new-folder/index.js +4 -0
  86. package/icons/done-all/index.d.ts +11 -0
  87. package/icons/done-all/index.js +4 -0
  88. package/icons/double-arrow/index.js +4 -0
  89. package/icons/download/index.js +4 -0
  90. package/icons/download-done/index.js +4 -0
  91. package/{icon → icons}/east/index.js +1 -1
  92. package/icons/error/index.js +4 -0
  93. package/icons/error-outline/index.js +4 -0
  94. package/icons/expand-less/index.js +4 -0
  95. package/icons/expand-more/index.js +4 -0
  96. package/icons/filter-list/index.js +4 -0
  97. package/icons/first-page/index.js +4 -0
  98. package/icons/folder/index.js +4 -0
  99. package/icons/folder-open/index.js +4 -0
  100. package/icons/folder-shared/index.js +4 -0
  101. package/icons/forum/index.d.ts +11 -0
  102. package/icons/forum/index.js +4 -0
  103. package/icons/fullscreen/index.js +4 -0
  104. package/icons/fullscreen-exit/index.js +4 -0
  105. package/icons/help-outline/index.js +4 -0
  106. package/icons/history/index.d.ts +11 -0
  107. package/icons/history/index.js +4 -0
  108. package/icons/home-work/index.js +4 -0
  109. package/icons/info-outline/index.d.ts +11 -0
  110. package/icons/info-outline/index.js +4 -0
  111. package/icons/insert-emoticon/index.d.ts +11 -0
  112. package/icons/insert-emoticon/index.js +4 -0
  113. package/icons/keyboard-arrow-down/index.js +4 -0
  114. package/icons/keyboard-arrow-left/index.js +4 -0
  115. package/icons/keyboard-arrow-right/index.js +4 -0
  116. package/icons/keyboard-arrow-up/index.js +4 -0
  117. package/icons/last-page/index.js +4 -0
  118. package/icons/legend-toggle/index.js +4 -0
  119. package/icons/local-offer/index.d.ts +11 -0
  120. package/icons/local-offer/index.js +4 -0
  121. package/icons/mark-chat-read/index.d.ts +11 -0
  122. package/icons/mark-chat-read/index.js +4 -0
  123. package/icons/mark-chat-unread/index.d.ts +11 -0
  124. package/icons/mark-chat-unread/index.js +4 -0
  125. package/icons/menu/index.js +4 -0
  126. package/icons/menu-open/index.js +4 -0
  127. package/icons/mic-none/index.d.ts +11 -0
  128. package/icons/mic-none/index.js +4 -0
  129. package/{icon → icons}/more-horiz/index.js +1 -1
  130. package/icons/more-time/index.d.ts +11 -0
  131. package/icons/more-time/index.js +4 -0
  132. package/{icon → icons}/more-vert/index.js +1 -1
  133. package/{icon → icons}/north/index.js +1 -1
  134. package/{icon → icons}/north-east/index.js +1 -1
  135. package/{icon → icons}/north-west/index.js +1 -1
  136. package/icons/notes/index.d.ts +11 -0
  137. package/icons/notes/index.js +4 -0
  138. package/icons/notification-important/index.js +4 -0
  139. package/icons/notifications-none/index.d.ts +11 -0
  140. package/icons/notifications-none/index.js +4 -0
  141. package/icons/open-in-new/index.js +4 -0
  142. package/icons/pause-circle-outline/index.d.ts +11 -0
  143. package/icons/pause-circle-outline/index.js +4 -0
  144. package/icons/payments/index.js +4 -0
  145. package/icons/play-circle-outline/index.d.ts +11 -0
  146. package/icons/play-circle-outline/index.js +4 -0
  147. package/icons/refresh/index.js +4 -0
  148. package/icons/reply/index.d.ts +11 -0
  149. package/icons/reply/index.js +4 -0
  150. package/icons/request-quote/index.js +4 -0
  151. package/icons/rule-folder/index.js +4 -0
  152. package/icons/search/index.js +4 -0
  153. package/icons/send/index.d.ts +11 -0
  154. package/icons/send/index.js +4 -0
  155. package/icons/settings/index.d.ts +11 -0
  156. package/icons/settings/index.js +4 -0
  157. package/icons/snippet-folder/index.js +4 -0
  158. package/{icon → icons}/south/index.js +1 -1
  159. package/{icon → icons}/south-east/index.js +1 -1
  160. package/{icon → icons}/south-west/index.js +1 -1
  161. package/icons/star/index.d.ts +11 -0
  162. package/icons/star/index.js +4 -0
  163. package/icons/star-outline/index.d.ts +11 -0
  164. package/icons/star-outline/index.js +4 -0
  165. package/icons/stop/index.d.ts +11 -0
  166. package/icons/stop/index.js +4 -0
  167. package/icons/subdirectory-arrow-left/index.js +4 -0
  168. package/icons/subdirectory-arrow-right/index.js +4 -0
  169. package/icons/swap-vert/index.d.ts +11 -0
  170. package/icons/swap-vert/index.js +4 -0
  171. package/icons/switch-left/index.d.ts +11 -0
  172. package/icons/switch-left/index.js +4 -0
  173. package/icons/switch-right/index.d.ts +11 -0
  174. package/icons/switch-right/index.js +4 -0
  175. package/icons/text-snippet/index.js +4 -0
  176. package/icons/topic/index.js +4 -0
  177. package/icons/types.js +1 -0
  178. package/icons/undo/index.d.ts +11 -0
  179. package/icons/undo/index.js +4 -0
  180. package/icons/unfold-less/index.js +4 -0
  181. package/icons/unfold-more/index.js +4 -0
  182. package/icons/update/index.d.ts +11 -0
  183. package/icons/update/index.js +4 -0
  184. package/icons/upload/index.js +4 -0
  185. package/icons/volume-off/index.d.ts +11 -0
  186. package/icons/volume-off/index.js +4 -0
  187. package/icons/volume-up/index.d.ts +11 -0
  188. package/icons/volume-up/index.js +4 -0
  189. package/icons/warning/index.js +4 -0
  190. package/icons/warning-amber/index.js +4 -0
  191. package/{icon → icons}/west/index.js +1 -1
  192. package/icons-branded/barchart-down/index.d.ts +11 -0
  193. package/{icon-branded → icons-branded}/barchart-down/index.js +2 -2
  194. package/icons-branded/barchart-up/index.d.ts +11 -0
  195. package/{icon-branded → icons-branded}/barchart-up/index.js +2 -2
  196. package/{icon-branded/contact → icons-branded/bell}/index.d.ts +2 -2
  197. package/icons-branded/bell/index.js +4 -0
  198. package/{icon-branded/multiple-channels → icons-branded/campaigns}/index.d.ts +2 -2
  199. package/{icon-branded → icons-branded}/campaigns/index.js +2 -2
  200. package/icons-branded/chatbot/index.d.ts +11 -0
  201. package/{icon-branded → icons-branded}/chatbot/index.js +2 -2
  202. package/icons-branded/contact/index.d.ts +11 -0
  203. package/{icon-branded → icons-branded}/contact/index.js +2 -2
  204. package/{icon-branded → icons-branded}/create-icon-class.d.ts +1 -1
  205. package/{icon-branded → icons-branded}/create-icon-class.js +4 -6
  206. package/{icon-branded/campaigns → icons-branded/home}/index.d.ts +2 -2
  207. package/{icon-branded → icons-branded}/home/index.js +2 -2
  208. package/icons-branded/multiple-channels/index.d.ts +11 -0
  209. package/{icon-branded → icons-branded}/multiple-channels/index.js +2 -2
  210. package/{icon-branded/chatbot → icons-branded/rocket}/index.d.ts +2 -2
  211. package/{icon-branded → icons-branded}/rocket/index.js +2 -2
  212. package/icons-branded/settings/index.d.ts +11 -0
  213. package/{icon-branded → icons-branded}/settings/index.js +2 -2
  214. package/{icon-branded/barchart-up → icons-branded/user}/index.d.ts +2 -2
  215. package/icons-branded/user/index.js +4 -0
  216. package/{icon-branded/barchart-down → icons-branded/users}/index.d.ts +2 -2
  217. package/{icon-branded → icons-branded}/users/index.js +2 -2
  218. package/icons-channel/apple-business-chat/index.d.ts +11 -0
  219. package/icons-channel/apple-business-chat/index.js +4 -0
  220. package/icons-channel/create-icon-class.d.ts +310 -0
  221. package/icons-channel/create-icon-class.js +51 -0
  222. package/icons-channel/facebook-messenger/index.d.ts +11 -0
  223. package/icons-channel/facebook-messenger/index.js +4 -0
  224. package/icons-channel/instagram/index.d.ts +11 -0
  225. package/icons-channel/instagram/index.js +4 -0
  226. package/icons-channel/line/index.d.ts +11 -0
  227. package/icons-channel/line/index.js +4 -0
  228. package/icons-channel/talk/index.d.ts +11 -0
  229. package/icons-channel/talk/index.js +4 -0
  230. package/icons-channel/telegram/index.d.ts +11 -0
  231. package/icons-channel/telegram/index.js +4 -0
  232. package/icons-channel/twitter/index.d.ts +11 -0
  233. package/icons-channel/twitter/index.js +4 -0
  234. package/icons-channel/types.d.ts +7 -0
  235. package/icons-channel/viber/index.d.ts +11 -0
  236. package/icons-channel/viber/index.js +4 -0
  237. package/icons-channel/wechat/index.d.ts +11 -0
  238. package/icons-channel/wechat/index.js +4 -0
  239. package/icons-channel/whatsapp/index.d.ts +11 -0
  240. package/icons-channel/whatsapp/index.js +4 -0
  241. package/illustration/create-illustration-class.d.ts +1 -1
  242. package/illustration/create-illustration-class.js +3 -5
  243. package/index.d.ts +140 -95
  244. package/index.js +140 -95
  245. package/input/index.js +3 -6
  246. package/link/index.d.ts +1 -1
  247. package/link/index.js +6 -27
  248. package/logo/create-logo-class.d.ts +1 -1
  249. package/logo/create-logo-class.js +3 -5
  250. package/package.json +1 -1
  251. package/pagination/index.d.ts +6 -3
  252. package/pagination/index.js +19 -8
  253. package/popover/index.js +3 -6
  254. package/radio/index.js +3 -6
  255. package/radio-option/index.js +3 -6
  256. package/search/index.d.ts +2 -2
  257. package/search/index.js +6 -9
  258. package/search-option/index.js +3 -5
  259. package/segment/index.js +3 -6
  260. package/segment-collapse/index.d.ts +2 -2
  261. package/segment-collapse/index.js +5 -7
  262. package/select/index.js +22 -8
  263. package/spinner/index.js +3 -5
  264. package/table/index.js +3 -5
  265. package/table-body/index.js +3 -5
  266. package/table-cell/index.js +3 -5
  267. package/table-head/index.js +3 -5
  268. package/table-head-cell/index.js +3 -5
  269. package/table-row/index.js +3 -5
  270. package/tabs/index.js +3 -6
  271. package/tabs-option/index.js +4 -7
  272. package/tag/index.d.ts +1 -1
  273. package/tag/index.js +4 -6
  274. package/tag-close/index.d.ts +1 -1
  275. package/tag-close/index.js +4 -7
  276. package/textarea/index.js +3 -6
  277. package/title/index.d.ts +1 -1
  278. package/title/index.js +4 -7
  279. package/toggle/index.js +3 -6
  280. package/tooltip/index.js +3 -5
  281. package/utils.d.ts +10 -3
  282. package/utils.js +22 -14
  283. package/icon/add-alert/index.js +0 -4
  284. package/icon/app-settings-alt/index.js +0 -4
  285. package/icon/apps/index.js +0 -4
  286. package/icon/arrow-back/index.js +0 -4
  287. package/icon/arrow-back-ios/index.js +0 -4
  288. package/icon/arrow-downward/index.js +0 -4
  289. package/icon/arrow-drop-down/index.js +0 -4
  290. package/icon/arrow-drop-down-circle/index.js +0 -4
  291. package/icon/arrow-drop-up/index.js +0 -4
  292. package/icon/arrow-forward/index.js +0 -4
  293. package/icon/arrow-forward-ios/index.js +0 -4
  294. package/icon/arrow-left/index.js +0 -4
  295. package/icon/arrow-right/index.js +0 -4
  296. package/icon/arrow-upward/index.js +0 -4
  297. package/icon/attach-email/index.js +0 -4
  298. package/icon/attachment/index.js +0 -4
  299. package/icon/auto-delete/index.js +0 -4
  300. package/icon/campaign/index.js +0 -4
  301. package/icon/cancel/index.js +0 -4
  302. package/icon/check/index.js +0 -4
  303. package/icon/chevron-left/index.js +0 -4
  304. package/icon/chevron-right/index.js +0 -4
  305. package/icon/close/index.js +0 -4
  306. package/icon/cloud/index.js +0 -4
  307. package/icon/cloud-circle/index.js +0 -4
  308. package/icon/cloud-done/index.js +0 -4
  309. package/icon/cloud-download/index.js +0 -4
  310. package/icon/cloud-off/index.js +0 -4
  311. package/icon/cloud-queue/index.js +0 -4
  312. package/icon/cloud-upload/index.js +0 -4
  313. package/icon/create-new-folder/index.js +0 -4
  314. package/icon/double-arrow/index.js +0 -4
  315. package/icon/download/index.js +0 -4
  316. package/icon/download-done/index.js +0 -4
  317. package/icon/error/index.js +0 -4
  318. package/icon/error-outline/index.js +0 -4
  319. package/icon/expand-less/index.js +0 -4
  320. package/icon/expand-more/index.js +0 -4
  321. package/icon/filter-list/index.js +0 -4
  322. package/icon/first-page/index.js +0 -4
  323. package/icon/folder/index.js +0 -4
  324. package/icon/folder-open/index.js +0 -4
  325. package/icon/folder-shared/index.js +0 -4
  326. package/icon/fullscreen/index.js +0 -4
  327. package/icon/fullscreen-exit/index.js +0 -4
  328. package/icon/help-outline/index.js +0 -4
  329. package/icon/home-work/index.js +0 -4
  330. package/icon/keyboard-arrow-down/index.js +0 -4
  331. package/icon/keyboard-arrow-left/index.js +0 -4
  332. package/icon/keyboard-arrow-right/index.js +0 -4
  333. package/icon/keyboard-arrow-up/index.js +0 -4
  334. package/icon/last-page/index.js +0 -4
  335. package/icon/legend-toggle/index.js +0 -4
  336. package/icon/menu/index.js +0 -4
  337. package/icon/menu-open/index.js +0 -4
  338. package/icon/notification-important/index.js +0 -4
  339. package/icon/open-in-new/index.js +0 -4
  340. package/icon/payments/index.js +0 -4
  341. package/icon/refresh/index.js +0 -4
  342. package/icon/request-quote/index.js +0 -4
  343. package/icon/rule-folder/index.js +0 -4
  344. package/icon/search/index.js +0 -4
  345. package/icon/snippet-folder/index.js +0 -4
  346. package/icon/subdirectory-arrow-left/index.js +0 -4
  347. package/icon/subdirectory-arrow-right/index.js +0 -4
  348. package/icon/switch-left/index.d.ts +0 -11
  349. package/icon/switch-left/index.js +0 -4
  350. package/icon/switch-right/index.d.ts +0 -11
  351. package/icon/switch-right/index.js +0 -4
  352. package/icon/text-snippet/index.js +0 -4
  353. package/icon/topic/index.js +0 -4
  354. package/icon/unfold-less/index.js +0 -4
  355. package/icon/unfold-more/index.js +0 -4
  356. package/icon/upload/index.js +0 -4
  357. package/icon/warning/index.js +0 -4
  358. package/icon/warning-amber/index.js +0 -4
  359. package/icon-branded/home/index.d.ts +0 -11
  360. package/icon-branded/rocket/index.d.ts +0 -11
  361. package/icon-branded/settings/index.d.ts +0 -11
  362. package/icon-branded/user/index.d.ts +0 -11
  363. package/icon-branded/user/index.js +0 -4
  364. package/icon-branded/users/index.d.ts +0 -11
  365. /package/{icon → icons}/add-alert/index.d.ts +0 -0
  366. /package/{icon → icons}/app-settings-alt/index.d.ts +0 -0
  367. /package/{icon → icons}/apps/index.d.ts +0 -0
  368. /package/{icon → icons}/arrow-back/index.d.ts +0 -0
  369. /package/{icon → icons}/arrow-back-ios/index.d.ts +0 -0
  370. /package/{icon → icons}/arrow-downward/index.d.ts +0 -0
  371. /package/{icon → icons}/arrow-drop-down/index.d.ts +0 -0
  372. /package/{icon → icons}/arrow-drop-down-circle/index.d.ts +0 -0
  373. /package/{icon → icons}/arrow-drop-up/index.d.ts +0 -0
  374. /package/{icon → icons}/arrow-forward/index.d.ts +0 -0
  375. /package/{icon → icons}/arrow-forward-ios/index.d.ts +0 -0
  376. /package/{icon → icons}/arrow-left/index.d.ts +0 -0
  377. /package/{icon → icons}/arrow-right/index.d.ts +0 -0
  378. /package/{icon → icons}/arrow-upward/index.d.ts +0 -0
  379. /package/{icon → icons}/attach-email/index.d.ts +0 -0
  380. /package/{icon → icons}/attachment/index.d.ts +0 -0
  381. /package/{icon → icons}/auto-delete/index.d.ts +0 -0
  382. /package/{icon → icons}/campaign/index.d.ts +0 -0
  383. /package/{icon → icons}/cancel/index.d.ts +0 -0
  384. /package/{icon → icons}/check/index.d.ts +0 -0
  385. /package/{icon → icons}/chevron-left/index.d.ts +0 -0
  386. /package/{icon → icons}/chevron-right/index.d.ts +0 -0
  387. /package/{icon → icons}/close/index.d.ts +0 -0
  388. /package/{icon → icons}/cloud/index.d.ts +0 -0
  389. /package/{icon → icons}/cloud-circle/index.d.ts +0 -0
  390. /package/{icon → icons}/cloud-done/index.d.ts +0 -0
  391. /package/{icon → icons}/cloud-download/index.d.ts +0 -0
  392. /package/{icon → icons}/cloud-off/index.d.ts +0 -0
  393. /package/{icon → icons}/cloud-queue/index.d.ts +0 -0
  394. /package/{icon → icons}/cloud-upload/index.d.ts +0 -0
  395. /package/{icon → icons}/create-new-folder/index.d.ts +0 -0
  396. /package/{icon → icons}/double-arrow/index.d.ts +0 -0
  397. /package/{icon → icons}/download/index.d.ts +0 -0
  398. /package/{icon → icons}/download-done/index.d.ts +0 -0
  399. /package/{icon → icons}/east/index.d.ts +0 -0
  400. /package/{icon → icons}/error/index.d.ts +0 -0
  401. /package/{icon → icons}/error-outline/index.d.ts +0 -0
  402. /package/{icon → icons}/expand-less/index.d.ts +0 -0
  403. /package/{icon → icons}/expand-more/index.d.ts +0 -0
  404. /package/{icon → icons}/filter-list/index.d.ts +0 -0
  405. /package/{icon → icons}/first-page/index.d.ts +0 -0
  406. /package/{icon → icons}/folder/index.d.ts +0 -0
  407. /package/{icon → icons}/folder-open/index.d.ts +0 -0
  408. /package/{icon → icons}/folder-shared/index.d.ts +0 -0
  409. /package/{icon → icons}/fullscreen/index.d.ts +0 -0
  410. /package/{icon → icons}/fullscreen-exit/index.d.ts +0 -0
  411. /package/{icon → icons}/help-outline/index.d.ts +0 -0
  412. /package/{icon → icons}/home-work/index.d.ts +0 -0
  413. /package/{icon → icons}/keyboard-arrow-down/index.d.ts +0 -0
  414. /package/{icon → icons}/keyboard-arrow-left/index.d.ts +0 -0
  415. /package/{icon → icons}/keyboard-arrow-right/index.d.ts +0 -0
  416. /package/{icon → icons}/keyboard-arrow-up/index.d.ts +0 -0
  417. /package/{icon → icons}/last-page/index.d.ts +0 -0
  418. /package/{icon → icons}/legend-toggle/index.d.ts +0 -0
  419. /package/{icon → icons}/menu/index.d.ts +0 -0
  420. /package/{icon → icons}/menu-open/index.d.ts +0 -0
  421. /package/{icon → icons}/more-horiz/index.d.ts +0 -0
  422. /package/{icon → icons}/more-vert/index.d.ts +0 -0
  423. /package/{icon → icons}/north/index.d.ts +0 -0
  424. /package/{icon → icons}/north-east/index.d.ts +0 -0
  425. /package/{icon → icons}/north-west/index.d.ts +0 -0
  426. /package/{icon → icons}/notification-important/index.d.ts +0 -0
  427. /package/{icon → icons}/open-in-new/index.d.ts +0 -0
  428. /package/{icon → icons}/payments/index.d.ts +0 -0
  429. /package/{icon → icons}/refresh/index.d.ts +0 -0
  430. /package/{icon → icons}/request-quote/index.d.ts +0 -0
  431. /package/{icon → icons}/rule-folder/index.d.ts +0 -0
  432. /package/{icon → icons}/search/index.d.ts +0 -0
  433. /package/{icon → icons}/snippet-folder/index.d.ts +0 -0
  434. /package/{icon → icons}/south/index.d.ts +0 -0
  435. /package/{icon → icons}/south-east/index.d.ts +0 -0
  436. /package/{icon → icons}/south-west/index.d.ts +0 -0
  437. /package/{icon → icons}/subdirectory-arrow-left/index.d.ts +0 -0
  438. /package/{icon → icons}/subdirectory-arrow-right/index.d.ts +0 -0
  439. /package/{icon → icons}/text-snippet/index.d.ts +0 -0
  440. /package/{icon → icons}/topic/index.d.ts +0 -0
  441. /package/{icon → icons}/types.d.ts +0 -0
  442. /package/{icon → icons}/unfold-less/index.d.ts +0 -0
  443. /package/{icon → icons}/unfold-more/index.d.ts +0 -0
  444. /package/{icon → icons}/upload/index.d.ts +0 -0
  445. /package/{icon → icons}/warning/index.d.ts +0 -0
  446. /package/{icon → icons}/warning-amber/index.d.ts +0 -0
  447. /package/{icon → icons}/west/index.d.ts +0 -0
  448. /package/{icon-branded → icons-branded}/types.d.ts +0 -0
  449. /package/{icon-branded → icons-branded}/types.js +0 -0
  450. /package/{icon → icons-channel}/types.js +0 -0
@@ -8,11 +8,11 @@ function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedec
8
8
  function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
9
9
 
10
10
  import { isAccordionItemElement } from '../accordion-item';
11
- import { defineCustomElement, getAttribute, getBooleanAttribute, getCSVSet, getFirstCSValue, updateAttribute, updateBooleanAttribute, updateCSV } from '../utils';
11
+ import { defineCustomElement, getAttribute, getBooleanAttribute, getCSVSet, getFirstCSValue, NectaryElement, updateAttribute, updateBooleanAttribute, updateCSV } from '../utils';
12
12
  const templateHTML = '<style>:host{display:block}#wrapper{display:flex;flex-direction:column;box-sizing:border-box;width:100%;height:100%}::slotted(sinch-accordion-item){flex-shrink:1}</style><div id="wrapper"><slot></slot></div>';
13
13
  const template = document.createElement('template');
14
14
  template.innerHTML = templateHTML;
15
- defineCustomElement('sinch-accordion', (_$slot = new WeakMap(), _onSlotChange = new WeakMap(), _onOptionChange = new WeakMap(), class extends HTMLElement {
15
+ defineCustomElement('sinch-accordion', (_$slot = new WeakMap(), _onSlotChange = new WeakMap(), _onOptionChange = new WeakMap(), class extends NectaryElement {
16
16
  constructor() {
17
17
  super();
18
18
 
@@ -49,10 +49,7 @@ defineCustomElement('sinch-accordion', (_$slot = new WeakMap(), _onSlotChange =
49
49
  }
50
50
  });
51
51
 
52
- const shadowRoot = this.attachShadow({
53
- mode: 'closed',
54
- delegatesFocus: true
55
- });
52
+ const shadowRoot = this.attachShadow();
56
53
  shadowRoot.appendChild(template.content.cloneNode(true));
57
54
  shadowRoot.addEventListener('change', _classPrivateFieldGet(this, _onOptionChange));
58
55
 
@@ -1,4 +1,4 @@
1
- import '../icon/keyboard-arrow-down';
1
+ import '../icons/keyboard-arrow-down';
2
2
  import type { TSinchElementReact } from '../types';
3
3
  import type { FocusEvent } from 'react';
4
4
  export declare const isAccordionItemElement: (element: EventTarget | Element | null) => element is TSinchAccordionItemElement;
@@ -7,8 +7,8 @@ function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedec
7
7
 
8
8
  function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
9
9
 
10
- import '../icon/keyboard-arrow-down';
11
- import { defineCustomElement, getAttribute, getBooleanAttribute, getLiteralAttribute, isAttrTrue, updateAttribute, updateBooleanAttribute, updateLiteralAttribute } from '../utils';
10
+ import '../icons/keyboard-arrow-down';
11
+ import { defineCustomElement, getAttribute, getBooleanAttribute, getLiteralAttribute, isAttrTrue, NectaryElement, updateAttribute, updateBooleanAttribute, updateLiteralAttribute } from '../utils';
12
12
  const templateHTML = '<style>:host{display:block;outline:0;min-height:48px}#wrapper{display:flex;flex-direction:column;position:relative;width:100%;height:100%;box-sizing:border-box;overflow:hidden;border-bottom:1px solid var(--sinch-color-stormy-200);--sinch-size-icon:16px}#button{all:initial;cursor:pointer;display:flex;align-items:center;gap:8px;box-sizing:border-box;width:100%;height:48px;padding:12px 8px;font:var(--sinch-font-title-s);color:var(--sinch-color-text-default);fill:var(--sinch-color-stormy-500)}#button>*{pointer-events:none}#button:disabled{cursor:initial;color:var(--sinch-color-stormy-100);fill:var(--sinch-color-stormy-100)}#button::before{width:8px;height:8px;border-radius:50%;margin-left:2px;margin-right:8px}:host([status=success]) #button::before{content:"";background-color:var(--sinch-color-success-500)}:host([status=warn]) #button::before{content:"";background-color:var(--sinch-color-warning-500)}:host([status=error]) #button::before{content:"";background-color:var(--sinch-color-error-500)}:host([status=info]) #button::before{content:"";background-color:var(--sinch-color-informative-500)}#title{flex:1;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}#content{display:none;overflow-y:auto;flex-shrink:1;min-height:0;padding:0 8px 18px;font:var(--sinch-font-body);color:var(--sinch-color-text-default)}#dropdown-icon{--sinch-size-icon:24px}#button[aria-expanded=true]>#dropdown-icon{transform:rotate(180deg)}#button[aria-expanded=true]+#content{display:block}#optional{font:var(--sinch-font-small-text);color:var(--sinch-color-stormy-300)}</style><div id="wrapper"><button id="button" aria-controls="content" aria-expanded="false"><slot name="icon"></slot><span id="title"></span> <span id="optional"></span><sinch-icon-keyboard-arrow-down id="dropdown-icon"></sinch-icon-keyboard-arrow-down></button><div id="content" role="region" aria-labelledby="button"><slot name="content"></slot></div></div>';
13
13
  export const isAccordionItemElement = element => {
14
14
  return element instanceof Element && element.tagName === 'SINCH-ACCORDION-ITEM';
@@ -16,7 +16,7 @@ export const isAccordionItemElement = element => {
16
16
  const statusValues = ['info', 'success', 'warn', 'error'];
17
17
  const template = document.createElement('template');
18
18
  template.innerHTML = templateHTML;
19
- defineCustomElement('sinch-accordion-item', (_$button = new WeakMap(), _$buttonContent = new WeakMap(), _$optionalText = new WeakMap(), _onButtonClick = new WeakMap(), class extends HTMLElement {
19
+ defineCustomElement('sinch-accordion-item', (_$button = new WeakMap(), _$buttonContent = new WeakMap(), _$optionalText = new WeakMap(), _onButtonClick = new WeakMap(), class extends NectaryElement {
20
20
  constructor() {
21
21
  super();
22
22
 
@@ -49,10 +49,7 @@ defineCustomElement('sinch-accordion-item', (_$button = new WeakMap(), _$buttonC
49
49
  }
50
50
  });
51
51
 
52
- const shadowRoot = this.attachShadow({
53
- mode: 'closed',
54
- delegatesFocus: true
55
- });
52
+ const shadowRoot = this.attachShadow();
56
53
  shadowRoot.appendChild(template.content.cloneNode(true));
57
54
 
58
55
  _classPrivateFieldSet(this, _$button, shadowRoot.querySelector('#button'));
package/alert/index.js CHANGED
@@ -7,12 +7,12 @@ function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedec
7
7
 
8
8
  function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
9
9
 
10
- import { defineCustomElement, getBooleanAttribute, getAttribute, getLiteralAttribute, updateBooleanAttribute, updateAttribute, updateLiteralAttribute } from '../utils';
10
+ import { defineCustomElement, getBooleanAttribute, getAttribute, getLiteralAttribute, updateBooleanAttribute, updateAttribute, updateLiteralAttribute, NectaryElement } from '../utils';
11
11
  const templateHTML = '<style>:host{--sinch-color-alert-info-background:#D5E5F8;--sinch-color-alert-success-background:#D7F1D8;--sinch-color-alert-warn-background:#FFE8D6;--sinch-color-alert-error-background:#FCD7D4;display:block}#wrapper{display:flex;flex-direction:row;column-gap:12px;align-items:center;position:relative;padding:12px 18px;border-radius:4px;font:var(--sinch-font-body);color:var(--sinch-color-stormy-600);background-color:var(--sinch-color-alert-info-background);box-sizing:border-box;width:100%;min-height:56px}#body-wrapper{display:flex;flex-direction:row;align-items:center;column-gap:12px;flex:1;min-width:0}#title{display:none;font:var(--sinch-font-title-s);margin:0;margin-bottom:4px}#text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:0;flex:1;min-width:0}:is(#icon-info,#icon-success,#icon-warn,#icon-error){display:none}:host([type=success]) #wrapper{background-color:var(--sinch-color-alert-success-background)}:host([type=warn]) #wrapper{background-color:var(--sinch-color-alert-warn-background)}:host([type=error]) #wrapper{background-color:var(--sinch-color-alert-error-background)}:host([type=info]) #wrapper{background-color:var(--sinch-color-alert-info-background)}:host([type=success]) #icon-success{display:block}:host([type=warn]) #icon-warn{display:block}:host([type=error]) #icon-error{display:block}:host(:is([type=info],:not([type]))) #icon-info{display:block}:host([multiline]:not([multiline=false])) #wrapper{align-items:flex-start;padding:16px 18px}:host([multiline]:not([multiline=false])) #body-wrapper{flex-direction:column;align-items:flex-start}:host([multiline]:not([multiline=false])) #title{display:block}:host([multiline]:not([multiline=false])) :is(#icon-info,#icon-success,#icon-warn,#icon-error){margin-top:2px}:host([multiline]:not([multiline=false])) #text{overflow:unset;text-overflow:unset;white-space:unset}:host([multiline]:not([multiline=false])) ::slotted(sinch-alert-button){margin-top:10px}</style><div id="wrapper"><svg id="icon-info" width="20" height="20" viewBox="0 0 20 20" aria-hidden="true"><path d="M10 0C4.48 0 0 4.48 0 10s4.48 10 10 10 10-4.48 10-10S15.52 0 10 0Zm0 15c-.55 0-1-.45-1-1v-4c0-.55.45-1 1-1s1 .45 1 1v4c0 .55-.45 1-1 1Zm1-8H9V5h2v2Z" fill="#2071CE"/></svg> <svg id="icon-success" width="20" height="20" viewBox="0 0 20 20" aria-hidden="true"><path d="M10 0C4.48 0 0 4.48 0 10s4.48 10 10 10 10-4.48 10-10S15.52 0 10 0ZM7.29 14.29 3.7 10.7a.996.996 0 1 1 1.41-1.41L8 12.17l6.88-6.88a.996.996 0 1 1 1.41 1.41L8.7 14.29a.996.996 0 0 1-1.41 0Z" fill="#2E8540"/></svg> <svg id="icon-warn" width="20" height="20" viewBox="0 0 20 20" aria-hidden="true"><path d="M2.47 18h15.06c1.54 0 2.5-1.67 1.73-3L11.73 1.99c-.77-1.33-2.69-1.33-3.46 0L.74 15c-.77 1.33.19 3 1.73 3ZM10 11c-.55 0-1-.45-1-1V8c0-.55.45-1 1-1s1 .45 1 1v2c0 .55-.45 1-1 1Zm1 4H9v-2h2v2Z" fill="#FF8C34"/></svg> <svg id="icon-error" width="20" height="20" viewBox="0 0 18 18" aria-hidden="true"><path d="M12.32 0H5.68c-.26 0-.52.11-.7.29L.29 4.98c-.18.18-.29.44-.29.7v6.63c0 .27.11.52.29.71l4.68 4.68c.19.19.45.3.71.3h6.63c.27 0 .52-.11.71-.29l4.68-4.68a.99.99 0 0 0 .29-.71V5.68c0-.27-.11-.52-.29-.71L13.02.29c-.18-.18-.44-.29-.7-.29ZM9 14.3c-.72 0-1.3-.58-1.3-1.3 0-.72.58-1.3 1.3-1.3.72 0 1.3.58 1.3 1.3 0 .72-.58 1.3-1.3 1.3ZM9 10c-.55 0-1-.45-1-1V5c0-.55.45-1 1-1s1 .45 1 1v4c0 .55-.45 1-1 1Z" fill="#E31C3D"/></svg><div id="body-wrapper"><p id="title"></p><p id="text"></p><slot name="button"></slot></div><slot name="close"></slot></div>';
12
12
  const typeValues = ['info', 'success', 'warn', 'error'];
13
13
  const template = document.createElement('template');
14
14
  template.innerHTML = templateHTML;
15
- defineCustomElement('sinch-alert', (_$text = new WeakMap(), _$title = new WeakMap(), class extends HTMLElement {
15
+ defineCustomElement('sinch-alert', (_$text = new WeakMap(), _$title = new WeakMap(), class extends NectaryElement {
16
16
  constructor() {
17
17
  super();
18
18
 
@@ -26,9 +26,7 @@ defineCustomElement('sinch-alert', (_$text = new WeakMap(), _$title = new WeakMa
26
26
  value: void 0
27
27
  });
28
28
 
29
- const shadowRoot = this.attachShadow({
30
- mode: 'closed'
31
- });
29
+ const shadowRoot = this.attachShadow();
32
30
  shadowRoot.appendChild(template.content.cloneNode(true));
33
31
 
34
32
  _classPrivateFieldSet(this, _$text, shadowRoot.querySelector('#text'));
@@ -7,11 +7,11 @@ function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedec
7
7
 
8
8
  function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
9
9
 
10
- import { defineCustomElement, getAttribute, updateAttribute } from '../utils';
10
+ import { defineCustomElement, getAttribute, NectaryElement, updateAttribute } from '../utils';
11
11
  const templateHTML = '<style>:host{display:inline-block;vertical-align:middle;outline:0}button{all:initial;padding:9px 16px;border:1px solid var(--sinch-color-stormy-500);border-radius:4px;font:var(--sinch-font-body);font-size:14px;line-height:14px;color:var(--sinch-color-stormy-500);white-space:nowrap;text-overflow:ellipsis;overflow:hidden;cursor:pointer;height:32px;box-sizing:border-box}</style><button></button>';
12
12
  const template = document.createElement('template');
13
13
  template.innerHTML = templateHTML;
14
- defineCustomElement('sinch-alert-button', (_$button = new WeakMap(), class extends HTMLElement {
14
+ defineCustomElement('sinch-alert-button', (_$button = new WeakMap(), class extends NectaryElement {
15
15
  constructor() {
16
16
  super();
17
17
 
@@ -20,10 +20,7 @@ defineCustomElement('sinch-alert-button', (_$button = new WeakMap(), class exten
20
20
  value: void 0
21
21
  });
22
22
 
23
- const shadowRoot = this.attachShadow({
24
- mode: 'closed',
25
- delegatesFocus: true
26
- });
23
+ const shadowRoot = this.attachShadow();
27
24
  shadowRoot.appendChild(template.content.cloneNode(true));
28
25
 
29
26
  _classPrivateFieldSet(this, _$button, shadowRoot.querySelector('button'));
@@ -1,4 +1,4 @@
1
- import '../icon/close';
1
+ import '../icons/close';
2
2
  import type { TSinchElementReact } from '../types';
3
3
  import type { FocusEvent, MouseEvent } from 'react';
4
4
  export declare type TSinchAlertCloseElement = HTMLElement & {
@@ -7,12 +7,12 @@ function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedec
7
7
 
8
8
  function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
9
9
 
10
- import '../icon/close';
11
- import { defineCustomElement } from '../utils';
10
+ import '../icons/close';
11
+ import { defineCustomElement, NectaryElement } from '../utils';
12
12
  const templateHTML = '<style>:host{display:inline-block;vertical-align:middle;outline:0}button{all:initial;display:block;width:24px;height:24px;box-sizing:border-box;cursor:pointer;--sinch-size-icon:24px}sinch-icon-close{display:block;pointer-events:none}</style><button aria-label="close"><sinch-icon-close></sinch-icon-close></button>';
13
13
  const template = document.createElement('template');
14
14
  template.innerHTML = templateHTML;
15
- defineCustomElement('sinch-alert-close', (_$button = new WeakMap(), class extends HTMLElement {
15
+ defineCustomElement('sinch-alert-close', (_$button = new WeakMap(), class extends NectaryElement {
16
16
  constructor() {
17
17
  super();
18
18
 
@@ -21,10 +21,7 @@ defineCustomElement('sinch-alert-close', (_$button = new WeakMap(), class extend
21
21
  value: void 0
22
22
  });
23
23
 
24
- const shadowRoot = this.attachShadow({
25
- mode: 'closed',
26
- delegatesFocus: true
27
- });
24
+ const shadowRoot = this.attachShadow();
28
25
  shadowRoot.appendChild(template.content.cloneNode(true));
29
26
 
30
27
  _classPrivateFieldSet(this, _$button, shadowRoot.querySelector('button'));
package/avatar/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import '../icon/cancel';
1
+ import '../icons/cancel';
2
2
  import type { TSinchElementReact } from '../types';
3
3
  declare const backgroundValues: readonly ["grey", "yellow", "blue"];
4
4
  declare const sizeValues: readonly ["l", "m", "s"];
package/avatar/index.js CHANGED
@@ -7,14 +7,14 @@ function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedec
7
7
 
8
8
  function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
9
9
 
10
- import '../icon/cancel';
11
- import { defineCustomElement, getAttribute, getLiteralAttribute, updateAttribute, updateLiteralAttribute } from '../utils';
10
+ import '../icons/cancel';
11
+ import { defineCustomElement, getAttribute, getLiteralAttribute, NectaryElement, updateAttribute, updateLiteralAttribute } from '../utils';
12
12
  const templateHTML = '<style>:host{display:inline-block;vertical-align:middle;outline:0}#wrapper{position:relative;width:40px;height:40px;font:var(--sinch-font-title-s);line-height:38px;color:var(--sinch-color-text-default);background-color:var(--sinch-color-snow-700);text-align:center;border-radius:50%;border:1px solid var(--sinch-color-snow-100);box-sizing:border-box;text-transform:uppercase;--sinch-avatar-badge-size:16px;--sinch-avatar-badge-font:700 12px/14px "Gilroy","Arial","sans-serif"}:host([background=blue]) #wrapper{background-color:var(--sinch-color-stormy-500);color:var(--sinch-color-snow-100)}:host([background=yellow]) #wrapper{background-color:var(--sinch-color-honey-500)}:host([size="l"]) #wrapper{width:56px;height:56px;font:var(--sinch-font-title-m);line-height:54px;--sinch-avatar-badge-size:20px;--sinch-avatar-badge-font:700 12px/18px "Gilroy","Arial","sans-serif"}:host([size="s"]) #wrapper{width:24px;height:24px;font:var(--sinch-font-extra-small-text);line-height:22px;--sinch-avatar-badge-size:11px;--sinch-avatar-badge-font:500 8px/9px "Gilroy","Arial","sans-serif"}#text{display:block;width:100%;height:100%;box-sizing:border-box}#image{display:none;width:100%;height:100%;object-fit:contain;position:absolute;left:0;top:0;border-radius:50%}:host([src]:not([src=""])) #image{display:block}::slotted(sinch-avatar-badge){position:absolute;top:-2px;left:calc(100% - 15px)}:host([size="l"]) ::slotted(sinch-avatar-badge){left:calc(100% - 19px)}:host([size="s"]) ::slotted(sinch-avatar-badge){left:calc(100% - 9px)}::slotted(sinch-avatar-status){position:absolute;bottom:-2px;right:-2px}:host([size="l"]) ::slotted(sinch-avatar-status){bottom:2px;right:2px}</style><div id="wrapper"><span id="text"></span> <img id="image" alt=""/><slot name="badge"></slot><slot name="status"></slot></div>';
13
13
  const backgroundValues = ['grey', 'yellow', 'blue'];
14
14
  const sizeValues = ['l', 'm', 's'];
15
15
  const template = document.createElement('template');
16
16
  template.innerHTML = templateHTML;
17
- defineCustomElement('sinch-avatar', (_$text = new WeakMap(), _$image = new WeakMap(), class extends HTMLElement {
17
+ defineCustomElement('sinch-avatar', (_$text = new WeakMap(), _$image = new WeakMap(), class extends NectaryElement {
18
18
  constructor() {
19
19
  super();
20
20
 
@@ -28,9 +28,7 @@ defineCustomElement('sinch-avatar', (_$text = new WeakMap(), _$image = new WeakM
28
28
  value: void 0
29
29
  });
30
30
 
31
- const shadowRoot = this.attachShadow({
32
- mode: 'closed'
33
- });
31
+ const shadowRoot = this.attachShadow();
34
32
  shadowRoot.appendChild(template.content.cloneNode(true));
35
33
 
36
34
  _classPrivateFieldSet(this, _$text, shadowRoot.querySelector('#text'));
@@ -1,4 +1,4 @@
1
- import '../icon/cancel';
1
+ import '../icons/cancel';
2
2
  import type { TSinchElementReact } from '../types';
3
3
  export declare type TSinchAvatarBadgeElement = HTMLElement & {
4
4
  text: string;
@@ -7,12 +7,12 @@ function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedec
7
7
 
8
8
  function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
9
9
 
10
- import '../icon/cancel';
11
- import { defineCustomElement, getAttribute, setClass, updateAttribute } from '../utils';
10
+ import '../icons/cancel';
11
+ import { defineCustomElement, getAttribute, NectaryElement, setClass, updateAttribute } from '../utils';
12
12
  const templateHTML = '<style>#text{width:var(--sinch-avatar-badge-size);height:var(--sinch-avatar-badge-size);border:1px solid var(--sinch-color-snow-100);border-radius:calc(var(--sinch-avatar-badge-size)/ 2);text-align:center;box-sizing:border-box;color:var(--sinch-color-snow-100);font:var(--sinch-avatar-badge-font);background-color:var(--sinch-color-raspberry-500)}#text.long{width:fit-content;padding:0 calc(var(--sinch-avatar-badge-size)/ 4)}</style><div id="text"></div>';
13
13
  const template = document.createElement('template');
14
14
  template.innerHTML = templateHTML;
15
- defineCustomElement('sinch-avatar-badge', (_$text = new WeakMap(), class extends HTMLElement {
15
+ defineCustomElement('sinch-avatar-badge', (_$text = new WeakMap(), class extends NectaryElement {
16
16
  constructor() {
17
17
  super();
18
18
 
@@ -21,9 +21,7 @@ defineCustomElement('sinch-avatar-badge', (_$text = new WeakMap(), class extends
21
21
  value: void 0
22
22
  });
23
23
 
24
- const shadowRoot = this.attachShadow({
25
- mode: 'closed'
26
- });
24
+ const shadowRoot = this.attachShadow();
27
25
  shadowRoot.appendChild(template.content.cloneNode(true));
28
26
 
29
27
  _classPrivateFieldSet(this, _$text, shadowRoot.querySelector('#text'));
@@ -1,4 +1,4 @@
1
- import '../icon/cancel';
1
+ import '../icons/cancel';
2
2
  import type { TSinchElementReact } from '../types';
3
3
  declare const colorValues: readonly ["red", "yellow", "green", "grey"];
4
4
  export declare type TSinchAvatarStatusColor = typeof colorValues[number];
@@ -1,5 +1,5 @@
1
- import '../icon/cancel';
2
- import { defineCustomElement, getLiteralAttribute, updateLiteralAttribute } from '../utils';
1
+ import '../icons/cancel';
2
+ import { defineCustomElement, getLiteralAttribute, NectaryElement, updateLiteralAttribute } from '../utils';
3
3
  const templateHTML = '<style>#circle{width:10px;height:10px;border:1px solid var(--sinch-color-snow-100);border-radius:50%;box-sizing:border-box}:host([color=grey]) #circle{background-color:var(--sinch-color-snow-600)}:host([color=yellow]) #circle{background-color:var(--sinch-color-honey-500)}:host([color=red]) #circle{background-color:var(--sinch-color-raspberry-500)}:host([color=green]) #circle{background-color:var(--sinch-color-grass-400)}</style><div id="circle"></div>';
4
4
  const colorValues = ['red', 'yellow', 'green', 'grey'];
5
5
 
@@ -11,12 +11,10 @@ const assertColor = value => {
11
11
 
12
12
  const template = document.createElement('template');
13
13
  template.innerHTML = templateHTML;
14
- defineCustomElement('sinch-avatar-status', class extends HTMLElement {
14
+ defineCustomElement('sinch-avatar-status', class extends NectaryElement {
15
15
  constructor() {
16
16
  super();
17
- const shadowRoot = this.attachShadow({
18
- mode: 'closed'
19
- });
17
+ const shadowRoot = this.attachShadow();
20
18
  shadowRoot.appendChild(template.content.cloneNode(true));
21
19
  }
22
20
 
package/button/index.js CHANGED
@@ -7,12 +7,12 @@ function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedec
7
7
 
8
8
  function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
9
9
 
10
- import { defineCustomElement, getBooleanAttribute, getAttribute, getLiteralAttribute, isAttrTrue, updateBooleanAttribute, updateAttribute, updateLiteralAttribute } from '../utils';
10
+ import { defineCustomElement, getBooleanAttribute, getAttribute, getLiteralAttribute, isAttrTrue, updateBooleanAttribute, updateAttribute, updateLiteralAttribute, NectaryElement } from '../utils';
11
11
  const templateHTML = '<style>:host{--sinch-color-button-background:var(--sinch-color-tropical-500);--sinch-color-button-background-hover:var(--sinch-color-tropical-400);--sinch-color-button-background-focus:var(--sinch-color-tropical-500);--sinch-color-button-background-active:var(--sinch-color-tropical-600);--sinch-color-button-background-disabled:var(--sinch-color-tropical-100);--sinch-color-button-text:var(--sinch-color-text-inverted);--sinch-color-button-text-disabled:var(--sinch-color-text-inverted);--sinch-color-button-border:var(--sinch-color-transparent);--sinch-color-button-border-hover:var(--sinch-color-transparent);--sinch-color-button-border-focus:var(--sinch-color-tropical-700);--sinch-color-button-border-active:var(--sinch-color-transparent);--sinch-color-button-border-disabled:var(--sinch-color-transparent);--sinch-color-spinner-bg:var(--sinch-color-tropical-300);--sinch-color-spinner-fg:var(--sinch-color-snow-100);--sinch-color-icon:var(--sinch-color-text-inverted);display:inline-block;vertical-align:middle;outline:0}:host([type=secondary]){--sinch-color-button-background:var(--sinch-color-snow-100);--sinch-color-button-background-hover:var(--sinch-color-tropical-100);--sinch-color-button-background-focus:var(--sinch-color-snow-100);--sinch-color-button-background-active:var(--sinch-color-tropical-100);--sinch-color-button-background-disabled:var(--sinch-color-snow-100);--sinch-color-button-text:var(--sinch-color-tropical-500);--sinch-color-button-text-disabled:var(--sinch-color-tropical-100);--sinch-color-button-border:var(--sinch-color-tropical-500);--sinch-color-button-border-hover:var(--sinch-color-tropical-500);--sinch-color-button-border-focus:var(--sinch-color-tropical-700);--sinch-color-button-border-active:var(--sinch-color-tropical-500);--sinch-color-button-border-disabled:var(--sinch-color-tropical-100);--sinch-color-spinner-bg:var(--sinch-color-tropical-100);--sinch-color-spinner-fg:var(--sinch-color-tropical-500);--sinch-color-icon:var(--sinch-color-tropical-500)}:host([type=secondary]) button:is(:hover,:active){--sinch-color-spinner-bg:var(--sinch-color-tropical-300);--sinch-color-spinner-fg:var(--sinch-color-snow-100)}:host([type=secondary]) button:disabled{--sinch-color-spinner-bg:var(--sinch-color-tropical-200);--sinch-color-spinner-fg:var(--sinch-color-tropical-400)}:host([type=cta-primary]){--sinch-color-button-background:var(--sinch-color-honey-500);--sinch-color-button-background-hover:var(--sinch-color-honey-400);--sinch-color-button-background-focus:var(--sinch-color-honey-500);--sinch-color-button-background-active:var(--sinch-color-honey-600);--sinch-color-button-background-disabled:var(--sinch-color-honey-100);--sinch-color-button-text:var(--sinch-color-text-default);--sinch-color-button-text-disabled:var(--sinch-color-stormy-300);--sinch-color-button-border:var(--sinch-color-transparent);--sinch-color-button-border-hover:var(--sinch-color-transparent);--sinch-color-button-border-focus:var(--sinch-color-text-default);--sinch-color-button-border-active:var(--sinch-color-transparent);--sinch-color-button-border-disabled:var(--sinch-color-transparent);--sinch-color-spinner-bg:var(--sinch-color-honey-700);--sinch-color-spinner-fg:var(--sinch-color-stormy-600);--sinch-color-icon:var(--sinch-color-text-default)}:host([type=cta-primary]) button:disabled{--sinch-color-spinner-bg:var(--sinch-color-snow-100);--sinch-color-spinner-fg:var(--sinch-color-stormy-300)}:host([type=cta-secondary]){--sinch-color-button-background:var(--sinch-color-snow-100);--sinch-color-button-background-hover:var(--sinch-color-snow-500);--sinch-color-button-background-focus:var(--sinch-color-snow-100);--sinch-color-button-background-active:var(--sinch-color-snow-500);--sinch-color-button-background-disabled:var(--sinch-color-snow-100);--sinch-color-button-text:var(--sinch-color-stormy-500);--sinch-color-button-text-disabled:var(--sinch-color-stormy-200);--sinch-color-button-border:var(--sinch-color-stormy-500);--sinch-color-button-border-hover:var(--sinch-color-stormy-500);--sinch-color-button-border-focus:var(--sinch-color-stormy-500);--sinch-color-button-border-active:var(--sinch-color-stormy-500);--sinch-color-button-border-disabled:var(--sinch-color-stormy-200);--sinch-color-spinner-bg:var(--sinch-color-snow-800);--sinch-color-spinner-fg:var(--sinch-color-stormy-600);--sinch-color-icon:var(--sinch-color-stormy-500)}:host([type=cta-secondary]) button:disabled{--sinch-color-spinner-bg:var(--sinch-color-snow-600);--sinch-color-spinner-fg:var(--sinch-color-stormy-200);--sinch-color-icon:var(--sinch-color-stormy-200)}:host([type=destructive]){--sinch-color-button-background:var(--sinch-color-snow-100);--sinch-color-button-background-hover:var(--sinch-color-error-200);--sinch-color-button-background-focus:var(--sinch-color-snow-100);--sinch-color-button-background-active:var(--sinch-color-error-200);--sinch-color-button-background-disabled:var(--sinch-color-snow-100);--sinch-color-button-text:var(--sinch-color-text-invalid);--sinch-color-button-text-disabled:var(--sinch-color-error-200);--sinch-color-button-border:var(--sinch-color-error-500);--sinch-color-button-border-hover:var(--sinch-color-error-500);--sinch-color-button-border-focus:var(--sinch-color-error-800);--sinch-color-button-border-active:var(--sinch-color-error-500);--sinch-color-button-border-disabled:var(--sinch-color-error-200);--sinch-color-spinner-bg:var(--sinch-color-raspberry-100);--sinch-color-spinner-fg:var(--sinch-color-raspberry-500);--sinch-color-icon:var(--sinch-color-text-invalid)}:host([type=destructive]) button:is(:hover,:active){--sinch-color-spinner-bg:var(--sinch-color-raspberry-200);--sinch-color-spinner-fg:var(--sinch-color-raspberry-500)}:host([type=destructive]) button:disabled{--sinch-color-spinner-bg:var(--sinch-color-raspberry-100);--sinch-color-spinner-fg:var(--sinch-color-raspberry-500)}button{all:initial;display:flex;align-items:center;justify-content:center;gap:15px;box-sizing:border-box;width:100%;height:48px;padding:12px;border-radius:4px;font:var(--sinch-font-title-s);color:var(--sinch-color-button-text);background-color:var(--sinch-color-button-background);box-shadow:0 0 0 1px var(--sinch-color-button-border) inset;cursor:pointer;--sinch-size-icon:24px}button:focus{background-color:var(--sinch-color-button-background-focus);box-shadow:0 0 0 2px var(--sinch-color-button-border-focus) inset}button:hover{background-color:var(--sinch-color-button-background-hover);box-shadow:0 0 0 1px var(--sinch-color-button-border-hover) inset}button:active{background-color:var(--sinch-color-button-background-active);box-shadow:0 0 0 2px var(--sinch-color-button-border-active) inset}button:disabled{color:var(--sinch-color-button-text-disabled);background-color:var(--sinch-color-button-background-disabled);box-shadow:0 0 0 1px var(--sinch-color-button-border-disabled) inset;cursor:initial;--sinch-color-spinner-bg:var(--sinch-color-snow-100);--sinch-color-spinner-fg:var(--sinch-color-tropical-200);--sinch-color-icon:var(--sinch-color-button-text-disabled)}button>*{pointer-events:none}#text{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;display:none}:host([text]:not([text=""])) #text{display:initial}:host([text]:not([text=""])) button{padding:12px 24px}:host([small]:not([small=false]))>button{height:32px;padding:8px;line-height:16px;font-size:14px;gap:8px;--sinch-size-icon:16px}:host([text]:not([text=""])[small]:not([small=false])) button{padding:8px 16px}</style><button><slot name="icon"></slot><span id="text"></span></button>';
12
12
  const buttonTypes = ['primary', 'secondary', 'cta-primary', 'cta-secondary', 'destructive'];
13
13
  const template = document.createElement('template');
14
14
  template.innerHTML = templateHTML;
15
- defineCustomElement('sinch-button', (_$button = new WeakMap(), _$text = new WeakMap(), class extends HTMLElement {
15
+ defineCustomElement('sinch-button', (_$button = new WeakMap(), _$text = new WeakMap(), class extends NectaryElement {
16
16
  constructor() {
17
17
  super();
18
18
 
@@ -26,10 +26,7 @@ defineCustomElement('sinch-button', (_$button = new WeakMap(), _$text = new Weak
26
26
  value: void 0
27
27
  });
28
28
 
29
- const shadowRoot = this.attachShadow({
30
- mode: 'closed',
31
- delegatesFocus: true
32
- });
29
+ const shadowRoot = this.attachShadow();
33
30
  shadowRoot.appendChild(template.content.cloneNode(true));
34
31
 
35
32
  _classPrivateFieldSet(this, _$button, shadowRoot.querySelector('button'));
package/card/index.js CHANGED
@@ -9,11 +9,11 @@ function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollect
9
9
 
10
10
  import { isSinchCardButtonElement } from '../card-button';
11
11
  import { isSinchCardLinkElement } from '../card-link';
12
- import { defineCustomElement, getBooleanAttribute, getAttribute, updateBooleanAttribute, updateAttribute, setClass } from '../utils';
12
+ import { defineCustomElement, getBooleanAttribute, getAttribute, updateBooleanAttribute, updateAttribute, setClass, NectaryElement } from '../utils';
13
13
  const templateHTML = '<style>:host{display:block;outline:0}#wrapper{position:relative}#card-body{padding:24px;box-sizing:border-box;display:flex;flex-direction:column;gap:16px;background-color:var(--sinch-color-snow-100);border-radius:8px;border:1px solid var(--sinch-color-snow-700)}#illustration-wrapper{display:none;flex-direction:column;align-items:center;border-top-left-radius:8px;border-top-right-radius:8px;overflow:hidden;background-color:var(--sinch-color-stormy-500);height:240px}#illustration-wrapper.active{display:flex}#illustration-wrapper.active+#card-body{border-top-left-radius:0;border-top-right-radius:0;border-top:none}#label{margin:0;font:var(--sinch-font-title-xs);color:var(--sinch-color-stormy-300);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}#label:empty{display:none}#header{display:flex;flex-direction:row;align-items:center;gap:8px;--sinch-size-icon:48px}#title{font:var(--sinch-font-title-m);color:var(--sinch-color-stormy-500);flex:1;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}#description{margin:0;font:var(--sinch-font-body);color:var(--sinch-color-stormy-500);flex:1;min-height:0;max-height:120px;overflow-y:auto}#description:empty{display:none}:host([disabled]:not([disabled=false])) :is(#illustration-wrapper,#description,#header,#label){opacity:.6}::slotted(sinch-card-button),::slotted(sinch-card-link){margin-top:20px;align-self:flex-start;max-width:100%}</style><div id="wrapper"><div id="illustration-wrapper"><slot name="illustration"></slot></div><div id="card-body"><p id="label"></p><div id="header"><slot name="icon"></slot><span id="title"></span></div><p id="description"></p><slot name="action"></slot></div></div>';
14
14
  const template = document.createElement('template');
15
15
  template.innerHTML = templateHTML;
16
- defineCustomElement('sinch-card', (_$text = new WeakMap(), _$label = new WeakMap(), _$title = new WeakMap(), _$illustrationSlot = new WeakMap(), _$actionSlot = new WeakMap(), _$illustrationSlotWrapper = new WeakMap(), _onIllustrationSlotChange = new WeakMap(), _updateDisabledAttributeInChildren = new WeakMap(), class extends HTMLElement {
16
+ defineCustomElement('sinch-card', (_$text = new WeakMap(), _$label = new WeakMap(), _$title = new WeakMap(), _$illustrationSlot = new WeakMap(), _$actionSlot = new WeakMap(), _$illustrationSlotWrapper = new WeakMap(), _onIllustrationSlotChange = new WeakMap(), _updateDisabledAttributeInChildren = new WeakMap(), class extends NectaryElement {
17
17
  constructor() {
18
18
  super();
19
19
 
@@ -65,10 +65,7 @@ defineCustomElement('sinch-card', (_$text = new WeakMap(), _$label = new WeakMap
65
65
  }
66
66
  });
67
67
 
68
- const shadowRoot = this.attachShadow({
69
- mode: 'closed',
70
- delegatesFocus: true
71
- });
68
+ const shadowRoot = this.attachShadow();
72
69
  shadowRoot.appendChild(template.content.cloneNode(true));
73
70
 
74
71
  _classPrivateFieldSet(this, _$text, shadowRoot.querySelector('#description'));
@@ -7,14 +7,14 @@ function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedec
7
7
 
8
8
  function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
9
9
 
10
- import { defineCustomElement, getBooleanAttribute, getAttribute, updateAttribute } from '../utils';
10
+ import { defineCustomElement, getBooleanAttribute, getAttribute, updateAttribute, NectaryElement } from '../utils';
11
11
  const templateHTML = '<style>:host{display:inline-block;outline:0}sinch-button{display:block}</style><sinch-button type="primary" small></sinch-button>';
12
12
  export const isSinchCardButtonElement = el => {
13
13
  return el.tagName === 'SINCH-CARD-BUTTON';
14
14
  };
15
15
  const template = document.createElement('template');
16
16
  template.innerHTML = templateHTML;
17
- defineCustomElement('sinch-card-button', (_$button = new WeakMap(), class extends HTMLElement {
17
+ defineCustomElement('sinch-card-button', (_$button = new WeakMap(), class extends NectaryElement {
18
18
  constructor() {
19
19
  super();
20
20
 
@@ -23,10 +23,7 @@ defineCustomElement('sinch-card-button', (_$button = new WeakMap(), class extend
23
23
  value: void 0
24
24
  });
25
25
 
26
- const shadowRoot = this.attachShadow({
27
- mode: 'closed',
28
- delegatesFocus: true
29
- });
26
+ const shadowRoot = this.attachShadow();
30
27
  shadowRoot.appendChild(template.content.cloneNode(true));
31
28
 
32
29
  _classPrivateFieldSet(this, _$button, shadowRoot.querySelector('sinch-button'));
@@ -1,14 +1,11 @@
1
- import { defineCustomElement } from '../utils';
1
+ import { defineCustomElement, NectaryElement } from '../utils';
2
2
  const templateHTML = '<style>:host{display:block}#wrapper{position:relative;padding:24px;box-sizing:border-box;background-color:var(--sinch-color-snow-100);border-radius:8px;border:1px solid var(--sinch-color-snow-700)}</style><div id="wrapper"><slot></slot></div>';
3
3
  const template = document.createElement('template');
4
4
  template.innerHTML = templateHTML;
5
- defineCustomElement('sinch-card-container', class extends HTMLElement {
5
+ defineCustomElement('sinch-card-container', class extends NectaryElement {
6
6
  constructor() {
7
7
  super();
8
- const shadowRoot = this.attachShadow({
9
- mode: 'closed',
10
- delegatesFocus: true
11
- });
8
+ const shadowRoot = this.attachShadow();
12
9
  shadowRoot.appendChild(template.content.cloneNode(true));
13
10
  }
14
11
 
@@ -1,4 +1,4 @@
1
- import '../icon/arrow-forward';
1
+ import '../icons/arrow-forward';
2
2
  import type { TSinchElementReact } from '../types';
3
3
  import type { FocusEvent, MouseEvent } from 'react';
4
4
  export declare const isSinchCardLinkElement: (el: Element) => el is TSinchCardLinkElement;
@@ -7,15 +7,15 @@ function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedec
7
7
 
8
8
  function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
9
9
 
10
- import '../icon/arrow-forward';
11
- import { defineCustomElement, getBooleanAttribute, getAttribute, updateBooleanAttribute, updateAttribute } from '../utils';
10
+ import '../icons/arrow-forward';
11
+ import { defineCustomElement, getBooleanAttribute, getAttribute, updateBooleanAttribute, updateAttribute, NectaryElement } from '../utils';
12
12
  const templateHTML = '<style>:host{display:inline;outline:0}a{display:flex;flex-direction:row;gap:8px;font:var(--sinch-font-emphasized-body);color:var(--sinch-color-tropical-500);text-decoration:none;outline:0;--sinch-color-icon:var(--sinch-color-tropical-500);--sinch-size-icon:24px}a:hover{color:var(--sinch-color-tropical-600);fill:var(--sinch-color-tropical-600)}:host([disabled]:not([disabled=false])) a{color:var(--sinch-color-tropical-300);pointer-events:none;cursor:initial;--sinch-color-icon:var(--sinch-color-tropical-300)}span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;flex-shrink:1}</style><a><span></span><sinch-icon-arrow-forward></sinch-icon-arrow-forward></a>';
13
13
  export const isSinchCardLinkElement = el => {
14
14
  return el.tagName === 'SINCH-CARD-LINK';
15
15
  };
16
16
  const template = document.createElement('template');
17
17
  template.innerHTML = templateHTML;
18
- defineCustomElement('sinch-card-link', (_$anchor = new WeakMap(), _$text = new WeakMap(), _onClick = new WeakMap(), class extends HTMLElement {
18
+ defineCustomElement('sinch-card-link', (_$anchor = new WeakMap(), _$text = new WeakMap(), _onClick = new WeakMap(), class extends NectaryElement {
19
19
  constructor() {
20
20
  super();
21
21
 
@@ -39,10 +39,7 @@ defineCustomElement('sinch-card-link', (_$anchor = new WeakMap(), _$text = new W
39
39
  }
40
40
  });
41
41
 
42
- const shadowRoot = this.attachShadow({
43
- mode: 'closed',
44
- delegatesFocus: true
45
- });
42
+ const shadowRoot = this.attachShadow();
46
43
  shadowRoot.appendChild(template.content.cloneNode(true));
47
44
 
48
45
  _classPrivateFieldSet(this, _$anchor, shadowRoot.querySelector('a'));
package/chat/index.js CHANGED
@@ -1,14 +1,11 @@
1
- import { defineCustomElement } from '../utils';
1
+ import { defineCustomElement, NectaryElement } from '../utils';
2
2
  const templateHTML = '<style>:host{display:block;outline:0}#wrapper{display:flex;flex-direction:column;gap:32px;box-sizing:border-box;width:100%}</style><div id="wrapper"><slot></slot></div>';
3
3
  const template = document.createElement('template');
4
4
  template.innerHTML = templateHTML;
5
- defineCustomElement('sinch-chat', class extends HTMLElement {
5
+ defineCustomElement('sinch-chat', class extends NectaryElement {
6
6
  constructor() {
7
7
  super();
8
- const shadowRoot = this.attachShadow({
9
- mode: 'closed',
10
- delegatesFocus: true
11
- });
8
+ const shadowRoot = this.attachShadow();
12
9
  shadowRoot.appendChild(template.content.cloneNode(true));
13
10
  }
14
11
 
@@ -8,11 +8,11 @@ function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedec
8
8
  function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
9
9
 
10
10
  import '../avatar';
11
- import { defineCustomElement, getAttribute, updateAttribute } from '../utils';
11
+ import { defineCustomElement, getAttribute, NectaryElement, updateAttribute } from '../utils';
12
12
  const templateHTML = '<style>sinch-avatar{display:block}</style><sinch-avatar background="blue" size="l"></sinch-avatar>';
13
13
  const template = document.createElement('template');
14
14
  template.innerHTML = templateHTML;
15
- defineCustomElement('sinch-chat-avatar', (_$avatar = new WeakMap(), class extends HTMLElement {
15
+ defineCustomElement('sinch-chat-avatar', (_$avatar = new WeakMap(), class extends NectaryElement {
16
16
  constructor() {
17
17
  super();
18
18
 
@@ -21,10 +21,7 @@ defineCustomElement('sinch-chat-avatar', (_$avatar = new WeakMap(), class extend
21
21
  value: void 0
22
22
  });
23
23
 
24
- const shadowRoot = this.attachShadow({
25
- mode: 'closed',
26
- delegatesFocus: true
27
- });
24
+ const shadowRoot = this.attachShadow();
28
25
  shadowRoot.appendChild(template.content.cloneNode(true));
29
26
 
30
27
  _classPrivateFieldSet(this, _$avatar, shadowRoot.querySelector('sinch-avatar'));
@@ -12,11 +12,11 @@ function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollect
12
12
  function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
13
13
 
14
14
  import { typeValues } from '../chat-bubble';
15
- import { defineCustomElement, getAttribute, getLiteralAttribute, updateAttribute, updateLiteralAttribute } from '../utils';
15
+ import { defineCustomElement, getAttribute, getLiteralAttribute, NectaryElement, updateAttribute, updateLiteralAttribute } from '../utils';
16
16
  const templateHTML = '<style>:host{display:block;outline:0}#wrapper{position:relative;display:flex;flex-direction:column;gap:4px;align-items:flex-end;padding-left:72px}#stamp{display:flex;gap:4px;margin:0;font:var(--sinch-font-extra-small-text);color:var(--sinch-color-stormy-400)}#avatar{display:none;position:absolute;left:0;top:24px}:host([type=customer])>#wrapper{align-items:flex-start}:host([type=customer]) #avatar{display:block}</style><div id="wrapper"><div id="avatar"><slot name="avatar"></slot></div><p id="stamp"><span id="firstname"></span><span id="lastname"></span>&bull;<span id="time"></span></p><slot name="bubble"></slot></div>';
17
17
  const template = document.createElement('template');
18
18
  template.innerHTML = templateHTML;
19
- defineCustomElement('sinch-chat-block', (_$firstName = new WeakMap(), _$lastName = new WeakMap(), _$timeStamp = new WeakMap(), _$bubbleSlot = new WeakMap(), _onBubbleSlotChange = new WeakMap(), _updateBubbleTypes = new WeakSet(), class extends HTMLElement {
19
+ defineCustomElement('sinch-chat-block', (_$firstName = new WeakMap(), _$lastName = new WeakMap(), _$timeStamp = new WeakMap(), _$bubbleSlot = new WeakMap(), _onBubbleSlotChange = new WeakMap(), _updateBubbleTypes = new WeakSet(), class extends NectaryElement {
20
20
  constructor() {
21
21
  super();
22
22
 
@@ -49,10 +49,7 @@ defineCustomElement('sinch-chat-block', (_$firstName = new WeakMap(), _$lastName
49
49
  }
50
50
  });
51
51
 
52
- const shadowRoot = this.attachShadow({
53
- mode: 'closed',
54
- delegatesFocus: true
55
- });
52
+ const shadowRoot = this.attachShadow();
56
53
  shadowRoot.appendChild(template.content.cloneNode(true));
57
54
 
58
55
  _classPrivateFieldSet(this, _$firstName, shadowRoot.querySelector('#firstname'));
@@ -7,12 +7,12 @@ function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedec
7
7
 
8
8
  function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
9
9
 
10
- import { defineCustomElement, getAttribute, getLiteralAttribute, updateAttribute } from '../utils';
10
+ import { defineCustomElement, getAttribute, getLiteralAttribute, NectaryElement, updateAttribute } from '../utils';
11
11
  const templateHTML = '<style>:host{display:block;outline:0}#text{padding:12px 16px;border-radius:16px;font:var(--sinch-font-body);color:var(--sinch-color-stormy-500);margin:0;max-width:595px;box-sizing:border-box}:host([data-type=customer])>#text{background-color:var(--sinch-color-snow-500);border-top-left-radius:0}:host([data-type=agent-prev])>#text{background-color:var(--sinch-color-snow-700);border-top-right-radius:0}:host([data-type=agent])>#text{background-color:var(--sinch-color-honey-200);border-top-right-radius:0}</style><p id="text"></p>';
12
12
  export const typeValues = ['customer', 'agent', 'agent-prev'];
13
13
  const template = document.createElement('template');
14
14
  template.innerHTML = templateHTML;
15
- defineCustomElement('sinch-chat-bubble', (_$text = new WeakMap(), class extends HTMLElement {
15
+ defineCustomElement('sinch-chat-bubble', (_$text = new WeakMap(), class extends NectaryElement {
16
16
  constructor() {
17
17
  super();
18
18
 
@@ -21,10 +21,7 @@ defineCustomElement('sinch-chat-bubble', (_$text = new WeakMap(), class extends
21
21
  value: void 0
22
22
  });
23
23
 
24
- const shadowRoot = this.attachShadow({
25
- mode: 'closed',
26
- delegatesFocus: true
27
- });
24
+ const shadowRoot = this.attachShadow();
28
25
  shadowRoot.appendChild(template.content.cloneNode(true));
29
26
 
30
27
  _classPrivateFieldSet(this, _$text, shadowRoot.querySelector('#text'));
package/checkbox/index.js CHANGED
@@ -7,11 +7,11 @@ function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedec
7
7
 
8
8
  function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
9
9
 
10
- import { defineCustomElement, getAttribute, getBooleanAttribute, isAttrTrue, updateAttribute, updateBooleanAttribute } from '../utils';
10
+ import { defineCustomElement, getAttribute, getBooleanAttribute, isAttrTrue, NectaryElement, updateAttribute, updateBooleanAttribute } from '../utils';
11
11
  const templateHTML = '<style>:host{--sinch-color-checkbox-circle:var(--sinch-color-transparent);--sinch-color-checkbox-background:var(--sinch-color-snow-100);--sinch-color-checkbox-border:var(--sinch-color-stormy-300);--sinch-color-checkbox-circle-checked:var(--sinch-color-transparent);--sinch-color-checkbox-background-checked:var(--sinch-color-tropical-500);--sinch-color-checkbox-border-checked:var(--sinch-color-tropical-500);--sinch-color-checkbox-circle-hover:var(--sinch-color-snow-500);--sinch-color-checkbox-background-hover:var(--sinch-color-snow-100);--sinch-color-checkbox-border-hover:var(--sinch-color-stormy-300);--sinch-color-checkbox-circle-hover-checked:var(--sinch-color-tropical-100);--sinch-color-checkbox-background-hover-checked:var(--sinch-color-tropical-500);--sinch-color-checkbox-border-hover-checked:var(--sinch-color-tropical-500);--sinch-color-checkbox-circle-focus:var(--sinch-color-snow-800);--sinch-color-checkbox-background-focus:var(--sinch-color-snow-100);--sinch-color-checkbox-border-focus:var(--sinch-color-stormy-300);--sinch-color-checkbox-circle-focus-checked:var(--sinch-color-tropical-200);--sinch-color-checkbox-background-focus-checked:var(--sinch-color-tropical-500);--sinch-color-checkbox-border-focus-checked:var(--sinch-color-tropical-500);--sinch-color-checkbox-circle-active:var(--sinch-color-stormy-100);--sinch-color-checkbox-background-active:var(--sinch-color-snow-100);--sinch-color-checkbox-border-active:var(--sinch-color-stormy-300);--sinch-color-checkbox-circle-active-checked:var(--sinch-color-tropical-300);--sinch-color-checkbox-background-active-checked:var(--sinch-color-tropical-500);--sinch-color-checkbox-border-active-checked:var(--sinch-color-tropical-500);--sinch-color-checkbox-circle-disabled:var(--sinch-color-transparent);--sinch-color-checkbox-background-disabled:var(--sinch-color-snow-100);--sinch-color-checkbox-border-disabled:var(--sinch-color-stormy-100);--sinch-color-checkbox-circle-disabled-checked:var(--sinch-color-transparent);--sinch-color-checkbox-background-disabled-checked:var(--sinch-color-stormy-100);--sinch-color-checkbox-border-disabled-checked:var(--sinch-color-stormy-100);--sinch-color-checkbox-text:var(--sinch-color-text-default);--sinch-color-checkbox-text-disabled:var(--sinch-color-stormy-200);display:inline-block;vertical-align:middle;outline:0}:host([invalid]:not([invalid=false])){--sinch-color-checkbox-border:var(--sinch-color-raspberry-500);--sinch-color-checkbox-background-checked:var(--sinch-color-raspberry-500);--sinch-color-checkbox-border-checked:var(--sinch-color-raspberry-500);--sinch-color-checkbox-border-hover:var(--sinch-color-raspberry-500);--sinch-color-checkbox-circle-hover-checked:var(--sinch-color-raspberry-100);--sinch-color-checkbox-background-hover-checked:var(--sinch-color-raspberry-500);--sinch-color-checkbox-border-hover-checked:var(--sinch-color-raspberry-500);--sinch-color-checkbox-border-focus:var(--sinch-color-raspberry-500);--sinch-color-checkbox-circle-focus-checked:var(--sinch-color-raspberry-200);--sinch-color-checkbox-background-focus-checked:var(--sinch-color-raspberry-500);--sinch-color-checkbox-border-focus-checked:var(--sinch-color-raspberry-500);--sinch-color-checkbox-border-active:var(--sinch-color-raspberry-500);--sinch-color-checkbox-circle-active-checked:var(--sinch-color-raspberry-300);--sinch-color-checkbox-background-active-checked:var(--sinch-color-raspberry-500);--sinch-color-checkbox-border-active-checked:var(--sinch-color-raspberry-500);--sinch-color-checkbox-border-disabled:var(--sinch-color-raspberry-200);--sinch-color-checkbox-background-disabled-checked:var(--sinch-color-raspberry-200);--sinch-color-checkbox-border-disabled-checked:var(--sinch-color-raspberry-200);--sinch-color-checkbox-text:var(--sinch-color-text-invalid);--sinch-color-checkbox-text-disabled:var(--sinch-color-raspberry-200)}#wrapper{display:flex;flex-direction:row;box-sizing:border-box;width:100%;height:32px}#checkbox{all:initial;display:block;width:32px;height:32px;cursor:pointer}#checkbox:disabled{cursor:initial}#icon-container{position:relative;width:32px;height:32px}#checkbox::before{content:"";position:absolute;top:0;left:0;width:32px;height:32px;border-radius:16px;pointer-events:none;background-color:var(--sinch-color-checkbox-circle);transition:background-color .1s linear}#checkbox::after{content:"";position:absolute;top:7px;left:7px;width:18px;height:18px;border-radius:2px;pointer-events:none;background-color:var(--sinch-color-checkbox-background);box-shadow:0 0 0 2px var(--sinch-color-checkbox-border) inset;transition:background-color .1s linear}#icon-checkmark{position:absolute;left:9px;top:10px;transition:opacity .1s linear;opacity:0;pointer-events:none}#icon-indeterminate{position:absolute;left:10px;top:15px;transition:opacity .1s linear;opacity:0;pointer-events:none}@media (prefers-reduced-motion){#checkbox::after,#checkbox::before,#icon-checkmark,#icon-indeterminate{transition:none}}#label{display:none;flex:1;align-self:center;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding-left:6px;font:var(--sinch-font-body);color:var(--sinch-color-checkbox-text)}:host([text]:not([text=""])) #label{display:block}:host([disabled]:not([disabled=false])) #label{color:var(--sinch-color-checkbox-text-disabled)}:host(:is(:not([indeterminate]),[indeterminate=false])) #checkbox:checked~#icon-checkmark{opacity:1}:host([indeterminate]:not([indeterminate=false])) #checkbox:checked~#icon-indeterminate{opacity:1}#checkbox:checked::before{background-color:var(--sinch-color-checkbox-circle-checked)}#checkbox:checked::after{background-color:var(--sinch-color-checkbox-background-checked);box-shadow:0 0 0 2px var(--sinch-color-checkbox-border-checked) inset}#checkbox:focus::before{background-color:var(--sinch-color-checkbox-circle-focus)}#checkbox:focus::after{background-color:var(--sinch-color-checkbox-background-focus);box-shadow:0 0 0 2px var(--sinch-color-checkbox-border-focus) inset}#checkbox:hover::before{background-color:var(--sinch-color-checkbox-circle-hover)}#checkbox:hover::after{background-color:var(--sinch-color-checkbox-background-hover);box-shadow:0 0 0 2px var(--sinch-color-checkbox-border-hover) inset}#checkbox:active::before{background-color:var(--sinch-color-checkbox-circle-active)}#checkbox:active::after{background-color:var(--sinch-color-checkbox-background-active);box-shadow:0 0 0 2px var(--sinch-color-checkbox-border-active) inset}#checkbox:disabled::before{background-color:var(--sinch-color-checkbox-circle-disabled)}#checkbox:disabled::after{background-color:var(--sinch-color-checkbox-background-disabled);box-shadow:0 0 0 2px var(--sinch-color-checkbox-border-disabled) inset}#checkbox:focus:checked::before{background-color:var(--sinch-color-checkbox-circle-focus-checked)}#checkbox:focus:checked::after{background-color:var(--sinch-color-checkbox-background-focus-checked);box-shadow:0 0 0 2px var(--sinch-color-checkbox-border-focus-checked) inset}#checkbox:hover:checked::before{background-color:var(--sinch-color-checkbox-circle-hover-checked)}#checkbox:hover:checked::after{background-color:var(--sinch-color-checkbox-background-hover-checked);box-shadow:0 0 0 2px var(--sinch-color-checkbox-border-hover-checked) inset}#checkbox:active:checked::before{background-color:var(--sinch-color-checkbox-circle-active-checked)}#checkbox:active:checked::after{background-color:var(--sinch-color-checkbox-background-active-checked);box-shadow:0 0 0 2px var(--sinch-color-checkbox-border-active-checked) inset}#checkbox:disabled:checked::before{background-color:var(--sinch-color-checkbox-circle-disabled-checked)}#checkbox:disabled:checked::after{background-color:var(--sinch-color-checkbox-background-disabled-checked);box-shadow:0 0 0 2px var(--sinch-color-checkbox-border-disabled-checked) inset}</style><div id="wrapper"><div id="icon-container"><input id="checkbox" type="checkbox"/> <svg id="icon-checkmark" width="14" height="11" aria-hidden="true"><path d="M14 1.99999L12.59 0.579987L4.98995 8.17L1.49997 4.5L0.0799694 5.91L4.98995 11L14 1.99999Z" fill="white"/></svg> <svg id="icon-indeterminate" width="12" height="2" aria-hidden="true"><line y1="1" x2="12" y2="1" stroke="white" stroke-width="2"/></svg></div><label for="checkbox" id="label"></label></div>';
12
12
  const template = document.createElement('template');
13
13
  template.innerHTML = templateHTML;
14
- defineCustomElement('sinch-checkbox', (_$input = new WeakMap(), _$label = new WeakMap(), _onCheckboxInput = new WeakMap(), class extends HTMLElement {
14
+ defineCustomElement('sinch-checkbox', (_$input = new WeakMap(), _$label = new WeakMap(), _onCheckboxInput = new WeakMap(), class extends NectaryElement {
15
15
  constructor() {
16
16
  super();
17
17
 
@@ -40,10 +40,7 @@ defineCustomElement('sinch-checkbox', (_$input = new WeakMap(), _$label = new We
40
40
  }
41
41
  });
42
42
 
43
- const shadowRoot = this.attachShadow({
44
- mode: 'closed',
45
- delegatesFocus: true
46
- });
43
+ const shadowRoot = this.attachShadow();
47
44
  shadowRoot.appendChild(template.content.cloneNode(true));
48
45
 
49
46
  _classPrivateFieldSet(this, _$input, shadowRoot.querySelector('input'));
package/dialog/index.d.ts CHANGED
@@ -1,13 +1,13 @@
1
1
  import '../icon-button';
2
- import '../icon/close';
2
+ import '../icons/close';
3
3
  import type { TRect, TSinchElementReact } from '../types';
4
4
  import type { SyntheticEvent } from 'react';
5
- declare type TSinchDialogElement = HTMLElement & {
5
+ export declare type TSinchDialogElement = HTMLElement & {
6
6
  caption: string;
7
7
  readonly dialogRect: TRect;
8
8
  readonly closeButtonRect: TRect;
9
9
  };
10
- declare type TSinchDialogReact = TSinchElementReact<TSinchDialogElement> & {
10
+ export declare type TSinchDialogReact = TSinchElementReact<TSinchDialogElement> & {
11
11
  open: boolean;
12
12
  caption: string;
13
13
  'aria-label': string;
@@ -23,4 +23,3 @@ declare global {
23
23
  'sinch-dialog': TSinchDialogElement;
24
24
  }
25
25
  }
26
- export {};