@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
package/link/index.js CHANGED
@@ -1,18 +1,18 @@
1
1
  import _classPrivateFieldGet from '@babel/runtime/helpers/classPrivateFieldGet';
2
2
  import _classPrivateFieldSet from '@babel/runtime/helpers/classPrivateFieldSet';
3
3
 
4
- var _$anchor, _$text, _onClick;
4
+ var _$anchor, _$text;
5
5
 
6
6
  function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
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, getBooleanAttribute, getAttribute, updateBooleanAttribute, updateAttribute } from '../utils';
12
- const templateHTML = '<style>:host{display:inline;outline:0}a{font:var(--sinch-font-body);font-size:inherit;line-height:inherit;color:var(--sinch-color-text-link);fill:var(--sinch-color-text-link)}svg{display:none;transform:translateY(.15em);margin-left:.4em;width:.8em;pointer-events:none}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-200);pointer-events:none;cursor:initial;fill:var(--sinch-color-tropical-200)}:host([external]:not([external=false])) svg{display:inline-block}</style><a><span></span><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M14.222 14.222H1.778V1.778H8V0H1.778C.79 0 0 .8 0 1.778v12.444C0 15.2.791 16 1.778 16h12.444C15.2 16 16 15.2 16 14.222V8h-1.778v6.222ZM9.778 0v1.778h3.19l-8.737 8.738 1.253 1.253 8.738-8.738v3.191H16V0H9.778Z"/></svg></a>';
10
+ import '../icons/cancel';
11
+ import { defineCustomElement, getBooleanAttribute, getAttribute, updateBooleanAttribute, updateAttribute, NectaryElement } from '../utils';
12
+ const templateHTML = '<style>:host{display:inline;outline:0}a{font:var(--sinch-font-body);font-size:inherit;line-height:inherit;color:var(--sinch-color-text-link);fill:var(--sinch-color-text-link)}svg{display:none;transform:translateY(.15em);margin-left:.4em;width:.8em;pointer-events:none}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-200);pointer-events:none;cursor:initial;fill:var(--sinch-color-tropical-200)}:host([external]:not([external=false])) svg{display:inline-block}</style><a><span></span> <svg viewBox="0 0 16 16" aria-hidden="true"><path d="M14.222 14.222H1.778V1.778H8V0H1.778C.79 0 0 .8 0 1.778v12.444C0 15.2.791 16 1.778 16h12.444C15.2 16 16 15.2 16 14.222V8h-1.778v6.222ZM9.778 0v1.778h3.19l-8.737 8.738 1.253 1.253 8.738-8.738v3.191H16V0H9.778Z"/></svg></a>';
13
13
  const template = document.createElement('template');
14
14
  template.innerHTML = templateHTML;
15
- defineCustomElement('sinch-link', (_$anchor = new WeakMap(), _$text = new WeakMap(), _onClick = new WeakMap(), class extends HTMLElement {
15
+ defineCustomElement('sinch-link', (_$anchor = new WeakMap(), _$text = new WeakMap(), class extends NectaryElement {
16
16
  constructor() {
17
17
  super();
18
18
 
@@ -26,20 +26,7 @@ defineCustomElement('sinch-link', (_$anchor = new WeakMap(), _$text = new WeakMa
26
26
  value: void 0
27
27
  });
28
28
 
29
- _classPrivateFieldInitSpec(this, _onClick, {
30
- writable: true,
31
- value: e => {
32
- if (this.disabled) {
33
- e.preventDefault();
34
- e.stopPropagation();
35
- }
36
- }
37
- });
38
-
39
- const shadowRoot = this.attachShadow({
40
- mode: 'closed',
41
- delegatesFocus: true
42
- });
29
+ const shadowRoot = this.attachShadow();
43
30
  shadowRoot.appendChild(template.content.cloneNode(true));
44
31
 
45
32
  _classPrivateFieldSet(this, _$anchor, shadowRoot.querySelector('a'));
@@ -47,14 +34,6 @@ defineCustomElement('sinch-link', (_$anchor = new WeakMap(), _$text = new WeakMa
47
34
  _classPrivateFieldSet(this, _$text, shadowRoot.querySelector('span'));
48
35
  }
49
36
 
50
- connectedCallback() {
51
- _classPrivateFieldGet(this, _$anchor).addEventListener('click', _classPrivateFieldGet(this, _onClick));
52
- }
53
-
54
- disconnectedCallback() {
55
- _classPrivateFieldGet(this, _$anchor).removeEventListener('click', _classPrivateFieldGet(this, _onClick));
56
- }
57
-
58
37
  get text() {
59
38
  return getAttribute(this, 'text', '');
60
39
  }
@@ -5,6 +5,7 @@ export declare const createLogoClass: (templateHTML: string) => {
5
5
  inverted: boolean;
6
6
  connectedCallback(): void;
7
7
  attributeChangedCallback(name: string, _: string | null, newVal: string | null): void;
8
+ attachShadow(): ShadowRoot;
8
9
  accessKey: string;
9
10
  readonly accessKeyLabel: string;
10
11
  autocapitalize: string;
@@ -51,7 +52,6 @@ export declare const createLogoClass: (templateHTML: string) => {
51
52
  readonly shadowRoot: ShadowRoot | null;
52
53
  slot: string;
53
54
  readonly tagName: string;
54
- attachShadow(init: ShadowRootInit): ShadowRoot;
55
55
  closest<K_2 extends keyof HTMLElementTagNameMap>(selector: K_2): HTMLElementTagNameMap[K_2] | null;
56
56
  closest<K_3 extends keyof SVGElementTagNameMap>(selector: K_3): SVGElementTagNameMap[K_3] | null;
57
57
  closest<E extends Element = Element>(selectors: string): E | null;
@@ -1,4 +1,4 @@
1
- import { getBooleanAttribute, getIntegerAttribute, updateAttribute, updateBooleanAttribute, updateIntegerAttribute } from '../utils';
1
+ import { getBooleanAttribute, getIntegerAttribute, NectaryElement, updateAttribute, updateBooleanAttribute, updateIntegerAttribute } from '../utils';
2
2
  const logoStylesHtml = '<style>:host{display:inline-block;vertical-align:middle}svg{display:block;fill:var(--sinch-color-stormy-500)}:host([inverted]:not([inverted=false])) svg{fill:var(--sinch-color-snow-100)}</style>';
3
3
  const DEFAULT_SIZE = 16;
4
4
  const MIN_SIZE = 4;
@@ -6,12 +6,10 @@ const MAX_SIZE = 256;
6
6
  export const createLogoClass = templateHTML => {
7
7
  const template = document.createElement('template');
8
8
  template.innerHTML = logoStylesHtml + templateHTML;
9
- return class extends HTMLElement {
9
+ return class extends NectaryElement {
10
10
  constructor() {
11
11
  super();
12
- const shadowRoot = this.attachShadow({
13
- mode: 'closed'
14
- });
12
+ const shadowRoot = this.attachShadow();
15
13
  shadowRoot.appendChild(template.content.cloneNode(true));
16
14
  this.$svg = shadowRoot.querySelector('svg');
17
15
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nectary/components",
3
- "version": "0.22.0",
3
+ "version": "0.24.0",
4
4
  "files": [
5
5
  "theme.css",
6
6
  "**/*/*.js",
@@ -1,12 +1,15 @@
1
- import '../icon/keyboard-arrow-left';
2
- import '../icon/keyboard-arrow-right';
3
- import type { TSinchElementReact } from '../types';
1
+ import '../icons/keyboard-arrow-left';
2
+ import '../icons/keyboard-arrow-right';
3
+ import type { TRect, TSinchElementReact } from '../types';
4
4
  import type { FocusEvent, SyntheticEvent } from 'react';
5
5
  export declare type TSinchPaginationElement = HTMLElement & {
6
6
  value: number;
7
7
  max: number;
8
8
  focus(): void;
9
9
  blur(): void;
10
+ readonly prevButtonRect: TRect;
11
+ readonly nextButtonRect: TRect;
12
+ nthButtonRect(index: number): TRect | null;
10
13
  };
11
14
  export declare type TSinchPaginationReact = TSinchElementReact<TSinchPaginationElement> & {
12
15
  value: number;
@@ -11,9 +11,9 @@ function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollect
11
11
 
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
- import '../icon/keyboard-arrow-left';
15
- import '../icon/keyboard-arrow-right';
16
- import { defineCustomElement, updateAttribute, getIntegerAttribute, setClass } from '../utils';
14
+ import '../icons/keyboard-arrow-left';
15
+ import '../icons/keyboard-arrow-right';
16
+ import { defineCustomElement, updateAttribute, getIntegerAttribute, setClass, NectaryElement, getRect } from '../utils';
17
17
  const templateHTML = '<style>:host{display:inline-block;vertical-align:middle;outline:0}#wrapper{display:flex;justify-content:center;gap:8px;width:100%;box-sizing:border-box}button{all:initial;width:28px;height:28px;box-sizing:border-box;cursor:pointer;text-align:center;contain:strict;--sinch-color-icon:var(--sinch-color-stormy-500)}button:disabled{--sinch-color-icon:var(--sinch-color-stormy-100);cursor:initial}button>*{pointer-events:none}.page{border-radius:50%;font:var(--sinch-font-body);color:var(--sinch-color-stormy-500)}.page.dots>span{display:none}.page.dots::after{content:"..."}.page.active{font:var(--sinch-font-emphasized-body);background-color:var(--sinch-color-snow-600);pointer-events:none;cursor:initial}.page.hidden{display:none}</style><div id="wrapper"><button id="left"><sinch-icon-keyboard-arrow-left></sinch-icon-keyboard-arrow-left></button> <button class="page"><span>1</span></button> <button class="page active"><span>2</span></button> <button class="page"><span>3</span></button> <button class="page"><span>4</span></button> <button class="page"><span>5</span></button> <button class="page dots"><span>6</span></button> <button class="page"><span>20</span></button> <button id="right"><sinch-icon-keyboard-arrow-right></sinch-icon-keyboard-arrow-right></button></div>';
18
18
  const NUM_BUTTONS = 7;
19
19
  const MIDDLE_BTN_INDEX = Math.floor(NUM_BUTTONS / 2);
@@ -23,7 +23,7 @@ const DOTS_LEFT_INDEX = 1;
23
23
  const DOTS_RIGHT_INDEX = LAST_BTN_INDEX - 1;
24
24
  const template = document.createElement('template');
25
25
  template.innerHTML = templateHTML;
26
- defineCustomElement('sinch-pagination', (_$left = new WeakMap(), _$right = new WeakMap(), _$buttons = new WeakMap(), _$wrapper = new WeakMap(), _onValueChange = new WeakSet(), _onButtonClick = new WeakMap(), _clamp = new WeakSet(), _dispatchChangeEvent = new WeakSet(), class extends HTMLElement {
26
+ defineCustomElement('sinch-pagination', (_$left = new WeakMap(), _$right = new WeakMap(), _$buttons = new WeakMap(), _$wrapper = new WeakMap(), _onValueChange = new WeakSet(), _onButtonClick = new WeakMap(), _clamp = new WeakSet(), _dispatchChangeEvent = new WeakSet(), class extends NectaryElement {
27
27
  constructor() {
28
28
  super();
29
29
 
@@ -92,10 +92,7 @@ defineCustomElement('sinch-pagination', (_$left = new WeakMap(), _$right = new W
92
92
  }
93
93
  });
94
94
 
95
- const shadowRoot = this.attachShadow({
96
- mode: 'production' === 'development' ? 'open' : 'closed',
97
- delegatesFocus: true
98
- });
95
+ const shadowRoot = this.attachShadow();
99
96
  shadowRoot.appendChild(template.content.cloneNode(true));
100
97
 
101
98
  _classPrivateFieldSet(this, _$left, shadowRoot.querySelector('#left'));
@@ -171,6 +168,20 @@ defineCustomElement('sinch-pagination', (_$left = new WeakMap(), _$right = new W
171
168
  _classPrivateFieldGet(this, _$buttons).forEach($b => $b.blur());
172
169
  }
173
170
 
171
+ get prevButtonRect() {
172
+ return getRect(_classPrivateFieldGet(this, _$left));
173
+ }
174
+
175
+ get nextButtonRect() {
176
+ return getRect(_classPrivateFieldGet(this, _$right));
177
+ }
178
+
179
+ nthButtonRect(index) {
180
+ const btn = _classPrivateFieldGet(this, _$buttons)[index];
181
+
182
+ return btn == null ? null : getRect(btn);
183
+ }
184
+
174
185
  }));
175
186
 
176
187
  function _onValueChange2() {
package/popover/index.js CHANGED
@@ -12,12 +12,12 @@ 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 dialogPolyfill from 'dialog-polyfill';
15
- import { defineCustomElement, getBooleanAttribute, getLiteralAttribute, getRect, isAttrTrue, updateLiteralAttribute, getReactEventHandler, updateBooleanAttribute } from '../utils';
15
+ import { defineCustomElement, getBooleanAttribute, getLiteralAttribute, getRect, isAttrTrue, updateLiteralAttribute, getReactEventHandler, updateBooleanAttribute, NectaryElement } from '../utils';
16
16
  const templateHTML = '<style>:host{display:inline-block;vertical-align:middle;outline:0}#wrapper{position:relative}dialog{outline:0;font:var(--sinch-font-body);color:var(--sinch-color-text-default);background-color:var(--sinch-color-snow-100);box-shadow:1px 2px 6px rgba(0,0,0,.15);border:1px solid var(--sinch-color-snow-500);border-radius:4px;overflow-y:auto;contain:content;padding:12px;box-sizing:border-box}dialog:not([open]){display:none}dialog::backdrop{background-color:transparent}dialog+.backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background-color:transparent}dialog.fixed{position:fixed;top:50%;transform:translate(0,-50%)}._dialog_overlay{position:fixed;top:0;right:0;bottom:0;left:0}</style><div id="wrapper"><div id="target" aria-haspopup="dialog" aria-expanded="false"><slot name="target"></slot></div><dialog id="dialog" tabindex="-1"><slot name="content"></slot></dialog></div>';
17
17
  const orientationValues = ['top-left', 'top-right', 'bottom-left', 'bottom-right'];
18
18
  const template = document.createElement('template');
19
19
  template.innerHTML = templateHTML;
20
- defineCustomElement('sinch-popover', (_$target = new WeakMap(), _$dialog = new WeakMap(), _isConnected = new WeakMap(), _onExpand = new WeakSet(), _onCollapse = new WeakSet(), _isOpen = new WeakSet(), _updateOrientation = new WeakSet(), _onBackdropClick = new WeakMap(), _onCancel = new WeakMap(), _onCloseReactHandler = new WeakMap(), _dispatchCloseEvent = new WeakSet(), class extends HTMLElement {
20
+ defineCustomElement('sinch-popover', (_$target = new WeakMap(), _$dialog = new WeakMap(), _isConnected = new WeakMap(), _onExpand = new WeakSet(), _onCollapse = new WeakSet(), _isOpen = new WeakSet(), _updateOrientation = new WeakSet(), _onBackdropClick = new WeakMap(), _onCancel = new WeakMap(), _onCloseReactHandler = new WeakMap(), _dispatchCloseEvent = new WeakSet(), class extends NectaryElement {
21
21
  constructor() {
22
22
  super();
23
23
 
@@ -74,10 +74,7 @@ defineCustomElement('sinch-popover', (_$target = new WeakMap(), _$dialog = new W
74
74
  }
75
75
  });
76
76
 
77
- const shadowRoot = this.attachShadow({
78
- mode: 'closed',
79
- delegatesFocus: true
80
- });
77
+ const shadowRoot = this.attachShadow();
81
78
  shadowRoot.appendChild(template.content.cloneNode(true));
82
79
 
83
80
  _classPrivateFieldSet(this, _$target, shadowRoot.querySelector('#target'));
package/radio/index.js CHANGED
@@ -12,7 +12,7 @@ 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 { isRadioOptionElement } from '../radio-option';
15
- import { defineCustomElement, getAttribute, updateAttribute } from '../utils';
15
+ import { defineCustomElement, getAttribute, NectaryElement, updateAttribute } from '../utils';
16
16
  const templateHTML = '<style>:host{display:block}#wrapper{display:flex;flex-direction:column;gap:8px;box-sizing:border-box;width:100%}</style><div id="wrapper"><slot></slot></div>';
17
17
 
18
18
  const findSelectedOption = elements => {
@@ -21,7 +21,7 @@ const findSelectedOption = elements => {
21
21
 
22
22
  const template = document.createElement('template');
23
23
  template.innerHTML = templateHTML;
24
- defineCustomElement('sinch-radio', (_$slot = new WeakMap(), _onOptionKeyDown = new WeakMap(), _onSlotChange = new WeakMap(), _onOptionChange = new WeakMap(), _onValueChange = new WeakSet(), _dispatchChangeEvent = new WeakSet(), _getFirstOption = new WeakSet(), _getLastOption = new WeakSet(), _getNextOption = new WeakSet(), _getPrevOption = new WeakSet(), _getEnabledRadioElements = new WeakSet(), class extends HTMLElement {
24
+ defineCustomElement('sinch-radio', (_$slot = new WeakMap(), _onOptionKeyDown = new WeakMap(), _onSlotChange = new WeakMap(), _onOptionChange = new WeakMap(), _onValueChange = new WeakSet(), _dispatchChangeEvent = new WeakSet(), _getFirstOption = new WeakSet(), _getLastOption = new WeakSet(), _getNextOption = new WeakSet(), _getPrevOption = new WeakSet(), _getEnabledRadioElements = new WeakSet(), class extends NectaryElement {
25
25
  constructor() {
26
26
  super();
27
27
 
@@ -99,10 +99,7 @@ defineCustomElement('sinch-radio', (_$slot = new WeakMap(), _onOptionKeyDown = n
99
99
  }
100
100
  });
101
101
 
102
- const shadowRoot = this.attachShadow({
103
- mode: 'closed',
104
- delegatesFocus: true
105
- });
102
+ const shadowRoot = this.attachShadow();
106
103
  shadowRoot.appendChild(template.content.cloneNode(true));
107
104
  shadowRoot.addEventListener('keydown', _classPrivateFieldGet(this, _onOptionKeyDown));
108
105
  shadowRoot.addEventListener('change', _classPrivateFieldGet(this, _onOptionChange));
@@ -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, 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-radio-outer-circle:var(--sinch-color-transparent);--sinch-color-radio-background:var(--sinch-color-snow-100);--sinch-color-radio-border:var(--sinch-color-stormy-300);--sinch-color-radio-outer-circle-checked:var(--sinch-color-transparent);--sinch-color-radio-border-checked:var(--sinch-color-tropical-500);--sinch-color-radio-outer-circle-hover:var(--sinch-color-snow-500);--sinch-color-radio-border-hover:var(--sinch-color-stormy-300);--sinch-color-radio-outer-circle-hover-checked:var(--sinch-color-tropical-100);--sinch-color-radio-border-hover-checked:var(--sinch-color-tropical-500);--sinch-color-radio-outer-circle-focus:var(--sinch-color-snow-800);--sinch-color-radio-border-focus:var(--sinch-color-stormy-300);--sinch-color-radio-outer-circle-focus-checked:var(--sinch-color-tropical-200);--sinch-color-radio-border-focus-checked:var(--sinch-color-tropical-500);--sinch-color-radio-outer-circle-active:var(--sinch-color-stormy-100);--sinch-color-radio-border-active:var(--sinch-color-stormy-300);--sinch-color-radio-outer-circle-active-checked:var(--sinch-color-tropical-300);--sinch-color-radio-border-active-checked:var(--sinch-color-tropical-500);--sinch-color-radio-outer-circle-disabled:var(--sinch-color-transparent);--sinch-color-radio-border-disabled:var(--sinch-color-stormy-100);--sinch-color-radio-outer-circle-disabled-checked:var(--sinch-color-transparent);--sinch-color-radio-border-disabled-checked:var(--sinch-color-stormy-100);display:block;outline:0}#wrapper{display:flex;height:32px;box-sizing:border-box;width:100%}#input{all:initial;display:block;width:32px;height:32px;cursor:pointer}#input:disabled{cursor:initial}#icon-container{position:relative;width:32px;height:32px}#input::before{content:"";position:absolute;top:0;left:0;width:32px;height:32px;border-radius:50%;pointer-events:none;background-color:var(--sinch-color-radio-outer-circle);transition:background-color .1s linear}#input::after{content:"";position:absolute;top:6px;left:6px;width:20px;height:20px;border-radius:50%;pointer-events:none;background-color:var(--sinch-color-radio-background);box-shadow:0 0 0 2px var(--sinch-color-radio-border) inset;transition:background-color .1s linear}#icon-knob{position:absolute;left:11px;top:11px;width:10px;height:10px;border-radius:50%;transition:opacity .1s linear;opacity:0;background-color:var(--sinch-color-radio-border);pointer-events:none}@media (prefers-reduced-motion){#icon-knob,#input::after,#input::before{transition:none}}#label{align-self:center;flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding-left:8px;font:var(--sinch-font-body);color:var(--sinch-color-text-default)}:host([disabled]:not([disabled=false])) #label{color:var(--sinch-color-stormy-200)}#input:checked::before{background-color:var(--sinch-color-radio-outer-circle-checked)}#input:checked::after{box-shadow:0 0 0 2px var(--sinch-color-radio-border-checked) inset}#input:checked~#icon-knob{opacity:1;background-color:var(--sinch-color-radio-border-checked)}#input:focus::before{background-color:var(--sinch-color-radio-outer-circle-focus)}#input:focus::after{box-shadow:0 0 0 2px var(--sinch-color-radio-border-focus) inset}#input:focus~#icon-knob{background-color:var(--sinch-color-radio-border-focus)}#input:hover::before{background-color:var(--sinch-color-radio-outer-circle-hover)}#input:hover::after{box-shadow:0 0 0 2px var(--sinch-color-radio-border-hover) inset}#input:hover~#icon-knob{background-color:var(--sinch-color-radio-border-hover)}#input:active::before{background-color:var(--sinch-color-radio-outer-circle-active)}#input:active::after{box-shadow:0 0 0 2px var(--sinch-color-radio-border-active) inset}#input:active~#icon-knob{background-color:var(--sinch-color-radio-border-active)}#input:disabled::before{background-color:var(--sinch-color-radio-outer-circle-disabled)}#input:disabled::after{box-shadow:0 0 0 2px var(--sinch-color-radio-border-disabled) inset}#input:disabled~#icon-knob{background-color:var(--sinch-color-radio-border-disabled)}#input:focus:checked::before{background-color:var(--sinch-color-radio-outer-circle-focus-checked)}#input:focus:checked::after{box-shadow:0 0 0 2px var(--sinch-color-radio-border-focus-checked) inset}#input:focus:checked~#icon-knob{opacity:1;background-color:var(--sinch-color-radio-border-focus-checked)}#input:hover:checked::before{background-color:var(--sinch-color-radio-outer-circle-hover-checked)}#input:hover:checked::after{box-shadow:0 0 0 2px var(--sinch-color-radio-border-hover-checked) inset}#input:hover:checked~#icon-knob{opacity:1;background-color:var(--sinch-color-radio-border-hover-checked)}#input:active:checked::before{background-color:var(--sinch-color-radio-outer-circle-active-checked)}#input:active:checked::after{box-shadow:0 0 0 2px var(--sinch-color-radio-border-active-checked) inset}#input:active:checked~#icon-knob{opacity:1;background-color:var(--sinch-color-radio-border-active-checked)}#input:disabled:checked::before{background-color:var(--sinch-color-radio-outer-circle-disabled-checked)}#input:disabled:checked::after{box-shadow:0 0 0 2px var(--sinch-color-radio-border-disabled-checked) inset}#input:disabled:checked~#icon-knob{opacity:1;background-color:var(--sinch-color-radio-border-disabled-checked)}</style><div id="wrapper"><div id="icon-container"><input id="input" type="radio"/><div id="icon-knob"></div></div><label for="input" id="label"></label></div>';
12
12
  export const isRadioOptionElement = element => {
13
13
  return element instanceof Element && element.tagName === 'SINCH-RADIO-OPTION';
14
14
  };
15
15
  const template = document.createElement('template');
16
16
  template.innerHTML = templateHTML;
17
- defineCustomElement('sinch-radio-option', (_$input = new WeakMap(), _$label = new WeakMap(), _onInput = new WeakMap(), class extends HTMLElement {
17
+ defineCustomElement('sinch-radio-option', (_$input = new WeakMap(), _$label = new WeakMap(), _onInput = new WeakMap(), class extends NectaryElement {
18
18
  constructor() {
19
19
  super();
20
20
 
@@ -40,10 +40,7 @@ defineCustomElement('sinch-radio-option', (_$input = new WeakMap(), _$label = ne
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/search/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import '../icon/search';
2
- import '../icon/close';
1
+ import '../icons/search';
2
+ import '../icons/close';
3
3
  import '../icon-button';
4
4
  import type { TRect, TSinchElementReact } from '../types';
5
5
  import type { FocusEvent, SyntheticEvent } from 'react';
package/search/index.js CHANGED
@@ -12,10 +12,10 @@ 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 { isSearchOptionElement } from '../search-option';
15
- import { attrValueToPixels, defineCustomElement, getAttribute, getIntegerAttribute, getRect, updateAttribute, updateIntegerAttribute } from '../utils';
15
+ import { attrValueToPixels, defineCustomElement, getAttribute, getIntegerAttribute, getRect, NectaryElement, updateAttribute, updateIntegerAttribute } from '../utils';
16
16
  const templateHTML = '<style>:host{display:inline-block;vertical-align:middle;outline:0}#wrapper{position:relative;width:100%;box-sizing:border-box;--sinch-size-icon:24px}#label{display:none;font:var(--sinch-font-title-s);color:var(--sinch-color-text-default);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%;height:24px;margin-bottom:2px}#input{all:initial;display:block;border:1px solid var(--sinch-color-stormy-200);box-sizing:border-box;border-radius:4px;width:100%;height:48px;padding:0 44px;padding-right:12px;font:var(--sinch-font-body);color:var(--sinch-color-text-default);caret-color:var(--sinch-caret-color,auto);background-color:var(--sinch-color-snow-100)}#input::placeholder{font:var(--sinch-font-body);color:var(--sinch-color-text-muted)}#input:focus{border-color:var(--sinch-color-stormy-600)}#icon-search{position:absolute;left:12px;top:12px;pointer-events:none;--sinch-color-icon:var(--sinch-color-stormy-500)}#clear{position:absolute;right:8px;top:8px;display:none;--sinch-color-icon:red}#clear:focus{--sinch-color-icon:var(--sinch-color-stormy-500)}:host([value]:not([value=""])) #clear{display:flex}:host([value]:not([value=""])) #input{padding-right:44px}#listbox{display:none;position:absolute;z-index:1;left:0;top:calc(100% + 8px);width:100%;box-sizing:border-box;font:var(--sinch-font-body);color:var(--sinch-color-text-default);background-color:var(--sinch-color-snow-100);box-shadow:1px 2px 4px rgba(0,0,0,.15);overflow-y:auto;contain:content}:host([aria-expanded=true]) #listbox{display:block}:host([label]:not([label=""])) #label{display:block}</style><label id="label" for="input"></label><div id="wrapper"><input id="input" type="text"/><sinch-icon-search id="icon-search"></sinch-icon-search><sinch-icon-button id="clear" small><sinch-icon-close id="icon-close" slot="icon"></sinch-icon-close></sinch-icon-button><div id="listbox"><slot name="option"></slot></div></div>';
17
- import '../icon/search';
18
- import '../icon/close';
17
+ import '../icons/search';
18
+ import '../icons/close';
19
19
  import '../icon-button';
20
20
  const ITEM_HEIGHT = 40;
21
21
 
@@ -31,7 +31,7 @@ const findSelectedOption = elements => {
31
31
 
32
32
  const template = document.createElement('template');
33
33
  template.innerHTML = templateHTML;
34
- defineCustomElement('sinch-search', (_$label = new WeakMap(), _$input = new WeakMap(), _selectionStart = new WeakMap(), _selectionEnd = new WeakMap(), _$optionSlot = new WeakMap(), _$listbox = new WeakMap(), _$clear = new WeakMap(), _isPendingDk = new WeakMap(), _onCompositionStart = new WeakMap(), _onInput = new WeakMap(), _onValueChange = new WeakSet(), _onClearMouseDown = new WeakMap(), _onClear = new WeakMap(), _onInputFocus = new WeakMap(), _onInputBlur = new WeakMap(), _onListboxClick = new WeakMap(), _onListboxKeyPress = new WeakMap(), _onListboxKeyDown = new WeakMap(), _onOptionSlotChange = new WeakMap(), _onExpand = new WeakSet(), _onCollapse = new WeakSet(), _getFirstOption = new WeakSet(), _getLastOption = new WeakSet(), _getNextOption = new WeakSet(), _getPrevOption = new WeakSet(), _selectOption = new WeakSet(), _getOptionElements = new WeakSet(), class extends HTMLElement {
34
+ defineCustomElement('sinch-search', (_$label = new WeakMap(), _$input = new WeakMap(), _selectionStart = new WeakMap(), _selectionEnd = new WeakMap(), _$optionSlot = new WeakMap(), _$listbox = new WeakMap(), _$clear = new WeakMap(), _isPendingDk = new WeakMap(), _onCompositionStart = new WeakMap(), _onInput = new WeakMap(), _onValueChange = new WeakSet(), _onClearMouseDown = new WeakMap(), _onClear = new WeakMap(), _onInputFocus = new WeakMap(), _onInputBlur = new WeakMap(), _onListboxClick = new WeakMap(), _onListboxKeyPress = new WeakMap(), _onListboxKeyDown = new WeakMap(), _onOptionSlotChange = new WeakMap(), _onExpand = new WeakSet(), _onCollapse = new WeakSet(), _getFirstOption = new WeakSet(), _getLastOption = new WeakSet(), _getNextOption = new WeakSet(), _getPrevOption = new WeakSet(), _selectOption = new WeakSet(), _getOptionElements = new WeakSet(), class extends NectaryElement {
35
35
  constructor() {
36
36
  super();
37
37
 
@@ -217,10 +217,7 @@ defineCustomElement('sinch-search', (_$label = new WeakMap(), _$input = new Weak
217
217
  }
218
218
  });
219
219
 
220
- const shadowRoot = this.attachShadow({
221
- mode: 'closed',
222
- delegatesFocus: true
223
- });
220
+ const shadowRoot = this.attachShadow();
224
221
  shadowRoot.appendChild(template.content.cloneNode(true));
225
222
 
226
223
  _classPrivateFieldSet(this, _$input, shadowRoot.querySelector('#input'));
@@ -449,7 +446,7 @@ function _onValueChange2(nextValue) {
449
446
  function _onExpand2() {
450
447
  const elems = _classPrivateMethodGet(this, _getOptionElements, _getOptionElements2).call(this);
451
448
 
452
- if (elems.length === 0 || document.activeElement !== this) {
449
+ if (elems.length === 0 || this.getRootNode().activeElement !== this) {
453
450
  _classPrivateMethodGet(this, _onCollapse, _onCollapse2).call(this);
454
451
 
455
452
  return;
@@ -5,14 +5,14 @@ function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedec
5
5
 
6
6
  function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
7
7
 
8
- import { defineCustomElement, getAttribute, getBooleanAttribute, updateAttribute, updateBooleanAttribute, updateExplicitBooleanAttribute } from '../utils';
8
+ import { defineCustomElement, getAttribute, getBooleanAttribute, NectaryElement, updateAttribute, updateBooleanAttribute, updateExplicitBooleanAttribute } from '../utils';
9
9
  const templateHTML = '<style>:host{display:block}#wrapper{display:block;box-sizing:border-box;line-height:40px;padding:0 12px;width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host(:hover)>#wrapper,:host([data-selected])>#wrapper{background-color:var(--sinch-color-snow-500)}</style><div id="wrapper"></div>';
10
10
  const template = document.createElement('template');
11
11
  template.innerHTML = templateHTML;
12
12
 
13
13
  var _$content = new WeakMap();
14
14
 
15
- class SearchOption extends HTMLElement {
15
+ class SearchOption extends NectaryElement {
16
16
  constructor() {
17
17
  super();
18
18
 
@@ -21,9 +21,7 @@ class SearchOption extends HTMLElement {
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, _$content, shadowRoot.querySelector('#wrapper'));
package/segment/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, updateAttribute, updateBooleanAttribute } from '../utils';
10
+ import { defineCustomElement, getAttribute, getBooleanAttribute, NectaryElement, updateAttribute, updateBooleanAttribute } from '../utils';
11
11
  const templateHTML = '<style>:host{display:block}#wrapper{display:flex;flex-direction:column;width:100%;height:100%;border-radius:4px;box-sizing:border-box;background-color:var(--sinch-color-snow-100);color:var(--sinch-color-text-default);font:var(--sinch-font-body);border:none;box-shadow:1px 2px 8px rgba(0,0,0,.1)}#header{position:relative;display:flex;flex-direction:row;align-items:center;gap:16px;height:32px;padding:24px 32px 16px;--sinch-size-icon:32px}#caption{font:var(--sinch-font-title-l);color:var(--sinch-color-text-default);flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}#content-wrapper{padding:0 32px;flex:1;min-height:0;overflow:auto}#action{display:flex;flex-direction:row;justify-content:flex-end;gap:16px;padding:16px 32px 24px}#info{position:relative;display:flex;flex-direction:row;align-items:center;gap:16px;z-index:1}:host([collapsed]:not([collapsed=false])) :is(#content-wrapper,#action){display:none}:host([collapsed]:not([collapsed=false])) #header{padding-bottom:24px}</style><div id="wrapper"><div id="header"><slot name="icon"></slot><span id="caption"></span><div id="info"><slot name="info"></slot></div><slot name="collapse"></slot></div><div id="content-wrapper"><slot name="content"></slot></div><div id="action"><slot name="action"></slot></div></div>';
12
12
  const template = document.createElement('template');
13
13
  template.innerHTML = templateHTML;
14
- defineCustomElement('sinch-segment', (_$caption = new WeakMap(), class extends HTMLElement {
14
+ defineCustomElement('sinch-segment', (_$caption = new WeakMap(), class extends NectaryElement {
15
15
  constructor() {
16
16
  super();
17
17
 
@@ -20,10 +20,7 @@ defineCustomElement('sinch-segment', (_$caption = new WeakMap(), class extends H
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, _$caption, shadowRoot.querySelector('#caption'));
@@ -1,5 +1,5 @@
1
- import '../icon/expand-less';
2
- import '../icon/expand-more';
1
+ import '../icons/expand-less';
2
+ import '../icons/expand-more';
3
3
  import type { TSinchElementReact } from '../types';
4
4
  import type { FocusEvent, SyntheticEvent } from 'react';
5
5
  export declare type TSinchSegmentExpandElement = HTMLElement & {
@@ -8,13 +8,13 @@ function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedec
8
8
 
9
9
  function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
10
10
 
11
- import '../icon/expand-less';
12
- import '../icon/expand-more';
13
- import { defineCustomElement, getBooleanAttribute, isAttrTrue, updateBooleanAttribute } from '../utils';
11
+ import '../icons/expand-less';
12
+ import '../icons/expand-more';
13
+ import { defineCustomElement, getBooleanAttribute, isAttrTrue, NectaryElement, updateBooleanAttribute } from '../utils';
14
14
  const templateHTML = '<style>:host{display:contents;--sinch-size-icon:32px}input{all:initial;position:absolute;left:0;top:0;width:100%;height:100%;box-sizing:border-box;cursor:pointer}input:focus~sinch-icon-expand-less,input:focus~sinch-icon-expand-more{border-radius:4px;box-shadow:0 0 0 1px var(--sinch-color-stormy-500) inset}#up{display:block}#down{display:none}:host([value]:not([value=false])) #up{display:none}:host([value]:not([value=false])) #down{display:block}</style><input type="checkbox"/><sinch-icon-expand-less id="up"></sinch-icon-expand-less><sinch-icon-expand-more id="down"></sinch-icon-expand-more>';
15
15
  const template = document.createElement('template');
16
16
  template.innerHTML = templateHTML;
17
- defineCustomElement('sinch-segment-collapse', (_$input = new WeakMap(), class extends HTMLElement {
17
+ defineCustomElement('sinch-segment-collapse', (_$input = new WeakMap(), class extends NectaryElement {
18
18
  constructor() {
19
19
  super();
20
20
 
@@ -35,9 +35,7 @@ defineCustomElement('sinch-segment-collapse', (_$input = new WeakMap(), class ex
35
35
  }));
36
36
  });
37
37
 
38
- const shadowRoot = this.attachShadow({
39
- mode: 'closed'
40
- });
38
+ const shadowRoot = this.attachShadow();
41
39
  shadowRoot.appendChild(template.content.cloneNode(true));
42
40
 
43
41
  _classPrivateFieldSet(this, _$input, shadowRoot.querySelector('input'));
package/select/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import _classPrivateFieldGet from '@babel/runtime/helpers/classPrivateFieldGet';
2
2
  import _classPrivateFieldSet from '@babel/runtime/helpers/classPrivateFieldSet';
3
3
 
4
- var _$button, _$buttonContent, _$label, _$optionalText, _$additionalText, _$invalidText, _$dropdown, _$optionSlot, _updateButtonContent, _onValueChange, _getOptionWithValue, _onLabelClick, _onDropdownClick, _onDropdownClose;
4
+ var _$button, _$buttonContent, _$label, _$optionalText, _$additionalText, _$invalidText, _$dropdown, _$optionSlot, _$sh, _createElement, _updateButtonContent, _onValueChange, _getOptionWithValue, _onLabelClick, _onDropdownClick, _onDropdownClose;
5
5
 
6
6
  function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
7
7
 
@@ -14,11 +14,11 @@ function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(
14
14
  import { isDropdownOptionElement } from '../dropdown-option';
15
15
  import '../select-option';
16
16
  import '../dropdown';
17
- import { defineCustomElement, getAttribute, getBooleanAttribute, getIntegerAttribute, isAttrTrue, updateAttribute, updateBooleanAttribute, updateIntegerAttribute } from '../utils';
17
+ import { defineCustomElement, getAttribute, getBooleanAttribute, getIntegerAttribute, isAttrTrue, NectaryElement, updateAttribute, updateBooleanAttribute, updateIntegerAttribute } from '../utils';
18
18
  const templateHTML = '<style>:host{display:inline-block;vertical-align:middle;outline:0;--sinch-color-icon:var(--sinch-color-stormy-500)}#wrapper{position:relative}sinch-dropdown{display:block}#button{all:initial;display:flex;align-items:center;gap:8px;border:1px solid var(--sinch-color-stormy-200);border-radius:4px;box-sizing:border-box;width:100%;height:48px;margin:2px 0;padding:8px 12px;font:var(--sinch-font-body);color:var(--sinch-color-text-default);background-color:var(--sinch-color-snow-100);cursor:pointer}#button:focus{border-color:var(--sinch-color-stormy-600)}#dropdown-icon{fill:var(--sinch-color-stormy-500)}#button>*{pointer-events:none}#button[data-unselected]{color:var(--sinch-color-text-muted)}#button:disabled{border-color:var(--sinch-color-snow-500);color:var(--sinch-color-stormy-100);cursor:initial}#button:disabled #dropdown-icon{fill:var(--sinch-color-stormy-100)}:host([invalidtext]:not([invalidtext=""])) #button:not(:disabled){border-color:var(--sinch-color-text-invalid)}#content{flex:1;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}#bottom,#top{display:flex;align-items:baseline}#top{height:24px}#bottom{height:20px}#additional,#invalid,#label,#optional{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#label{font:var(--sinch-font-title-s);color:var(--sinch-color-text-default)}#optional{flex:1;text-align:right;font:var(--sinch-font-small-text);color:var(--sinch-color-text-muted)}#additional{flex:1;text-align:right;font:var(--sinch-font-extra-small-text);color:var(--sinch-color-text-muted)}#invalid{font:var(--sinch-font-extra-small-text);color:var(--sinch-color-text-invalid)}::slotted(sinch-help-tooltip){align-self:center;margin:0 8px}:host([disabled]:not([disabled=false])) :is(#label,#additional,#optional,#invalid){color:var(--sinch-color-stormy-100)}:host([disabled]:not([disabled=false])){--sinch-color-icon:var(--sinch-color-stormy-100)}#listbox{position:absolute;left:0;top:0;padding-top:74px;width:100%;display:none;list-style:none;outline:0;z-index:1}#listbox-body{font:var(--sinch-font-body);color:var(--sinch-color-text-default);background-color:var(--sinch-color-snow-100);border:1px solid var(--sinch-color-stormy-500);border-top-width:0;border-bottom-left-radius:2px;border-bottom-right-radius:2px;width:100%;box-sizing:border-box;box-shadow:1px 2px 4px rgba(0,0,0,.15);overflow-y:auto}#button[aria-expanded=true]~#listbox{display:block}</style><div id="wrapper"><div id="top"><label id="label" for="dropdown"></label><slot name="tooltip"></slot><span id="optional"></span></div><sinch-dropdown id="dropdown"><button slot="target" id="button"><span id="content"></span> <svg id="dropdown-icon" width="12" height="8" aria-hidden="true"><path d="M1.41.59 6 5.17 10.59.59 12 2 6 8 0 2 1.41.59Z"/></svg></button><slot name="option" slot="option"></slot></sinch-dropdown><div id="bottom"><span id="invalid"></span> <span id="additional"></span></div></div>';
19
19
  const template = document.createElement('template');
20
20
  template.innerHTML = templateHTML;
21
- defineCustomElement('sinch-select', (_$button = new WeakMap(), _$buttonContent = new WeakMap(), _$label = new WeakMap(), _$optionalText = new WeakMap(), _$additionalText = new WeakMap(), _$invalidText = new WeakMap(), _$dropdown = new WeakMap(), _$optionSlot = new WeakMap(), _updateButtonContent = new WeakSet(), _onValueChange = new WeakMap(), _getOptionWithValue = new WeakSet(), _onLabelClick = new WeakMap(), _onDropdownClick = new WeakMap(), _onDropdownClose = new WeakMap(), class extends HTMLElement {
21
+ defineCustomElement('sinch-select', (_$button = new WeakMap(), _$buttonContent = new WeakMap(), _$label = new WeakMap(), _$optionalText = new WeakMap(), _$additionalText = new WeakMap(), _$invalidText = new WeakMap(), _$dropdown = new WeakMap(), _$optionSlot = new WeakMap(), _$sh = new WeakMap(), _createElement = new WeakSet(), _updateButtonContent = new WeakSet(), _onValueChange = new WeakMap(), _getOptionWithValue = new WeakSet(), _onLabelClick = new WeakMap(), _onDropdownClick = new WeakMap(), _onDropdownClose = new WeakMap(), class extends NectaryElement {
22
22
  constructor() {
23
23
  super();
24
24
 
@@ -26,6 +26,8 @@ defineCustomElement('sinch-select', (_$button = new WeakMap(), _$buttonContent =
26
26
 
27
27
  _classPrivateMethodInitSpec(this, _updateButtonContent);
28
28
 
29
+ _classPrivateMethodInitSpec(this, _createElement);
30
+
29
31
  _classPrivateFieldInitSpec(this, _$button, {
30
32
  writable: true,
31
33
  value: void 0
@@ -66,6 +68,11 @@ defineCustomElement('sinch-select', (_$button = new WeakMap(), _$buttonContent =
66
68
  value: void 0
67
69
  });
68
70
 
71
+ _classPrivateFieldInitSpec(this, _$sh, {
72
+ writable: true,
73
+ value: void 0
74
+ });
75
+
69
76
  _classPrivateFieldInitSpec(this, _onValueChange, {
70
77
  writable: true,
71
78
  value: e => {
@@ -98,12 +105,11 @@ defineCustomElement('sinch-select', (_$button = new WeakMap(), _$buttonContent =
98
105
  }
99
106
  });
100
107
 
101
- const shadowRoot = this.attachShadow({
102
- mode: 'closed',
103
- delegatesFocus: true
104
- });
108
+ const shadowRoot = this.attachShadow();
105
109
  shadowRoot.appendChild(template.content.cloneNode(true));
106
110
 
111
+ _classPrivateFieldSet(this, _$sh, shadowRoot);
112
+
107
113
  _classPrivateFieldSet(this, _$button, shadowRoot.querySelector('#button'));
108
114
 
109
115
  _classPrivateFieldSet(this, _$buttonContent, shadowRoot.querySelector('#content'));
@@ -289,6 +295,14 @@ defineCustomElement('sinch-select', (_$button = new WeakMap(), _$buttonContent =
289
295
 
290
296
  }));
291
297
 
298
+ function _createElement2(name) {
299
+ if (Reflect.has(_classPrivateFieldGet(this, _$sh), 'createElement')) {
300
+ return _classPrivateFieldGet(this, _$sh).createElement(name);
301
+ }
302
+
303
+ return document.createElement(name);
304
+ }
305
+
292
306
  function _updateButtonContent2() {
293
307
  if (_classPrivateFieldGet(this, _$button).firstElementChild !== _classPrivateFieldGet(this, _$buttonContent)) {
294
308
  _classPrivateFieldGet(this, _$button).removeChild(_classPrivateFieldGet(this, _$button).firstElementChild);
@@ -307,7 +321,7 @@ function _updateButtonContent2() {
307
321
  const $icon = $option.icon;
308
322
 
309
323
  if ($icon != null) {
310
- _classPrivateFieldGet(this, _$button).prepend($icon.cloneNode(true));
324
+ _classPrivateFieldGet(this, _$button).prepend(_classPrivateMethodGet(this, _createElement, _createElement2).call(this, $icon.tagName.toLowerCase()));
311
325
  }
312
326
  }
313
327
  }
package/spinner/index.js CHANGED
@@ -1,14 +1,12 @@
1
- import { defineCustomElement, getLiteralAttribute, updateLiteralAttribute } from '../utils';
1
+ import { defineCustomElement, getLiteralAttribute, NectaryElement, updateLiteralAttribute } from '../utils';
2
2
  const templateHTML = '<style>:host{display:inline-block;vertical-align:middle}@keyframes spinner{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}div{animation:1.5s linear infinite spinner;animation-play-state:running;border:solid 3px var(--sinch-color-spinner-bg,#d4dadd);border-bottom-color:var(--sinch-color-spinner-fg,#0a273d);border-radius:50%;height:20px;width:20px;box-sizing:border-box;will-change:transform}:host([type=large]) div{height:46px;width:46px;border-width:4px}:host([type=small]) div{height:14px;width:14px;border-width:2px}:host([static]:not([static=false])) div{animation-play-state:paused}</style><div></div>';
3
3
  const spinnerTypes = ['large', 'medium', 'small'];
4
4
  const template = document.createElement('template');
5
5
  template.innerHTML = templateHTML;
6
- defineCustomElement('sinch-spinner', class extends HTMLElement {
6
+ defineCustomElement('sinch-spinner', class extends NectaryElement {
7
7
  constructor() {
8
8
  super();
9
- const shadowRoot = this.attachShadow({
10
- mode: 'closed'
11
- });
9
+ const shadowRoot = this.attachShadow();
12
10
  shadowRoot.appendChild(template.content.cloneNode(true));
13
11
  }
14
12
 
package/table/index.js CHANGED
@@ -1,13 +1,11 @@
1
- import { defineCustomElement } from '../utils';
1
+ import { defineCustomElement, NectaryElement } from '../utils';
2
2
  const templateHTML = '<style>:host{display:table;font:var(--sinch-font-body);color:var(--sinch-color-text-default)}</style><slot></slot>';
3
3
  const template = document.createElement('template');
4
4
  template.innerHTML = templateHTML;
5
- defineCustomElement('sinch-table', class extends HTMLElement {
5
+ defineCustomElement('sinch-table', class extends NectaryElement {
6
6
  constructor() {
7
7
  super();
8
- const shadowRoot = this.attachShadow({
9
- mode: 'closed'
10
- });
8
+ const shadowRoot = this.attachShadow();
11
9
  shadowRoot.appendChild(template.content.cloneNode(true));
12
10
  }
13
11
 
@@ -1,13 +1,11 @@
1
- import { defineCustomElement } from '../utils';
1
+ import { defineCustomElement, NectaryElement } from '../utils';
2
2
  const templateHTML = '<style>:host{display:table-row-group}::slotted(sinch-table-row:hover){background-color:var(--sinch-color-tropical-50)}::slotted(sinch-table-row[selected]:not([selected=false])){background-color:var(--sinch-color-tropical-100)}</style><slot></slot>';
3
3
  const template = document.createElement('template');
4
4
  template.innerHTML = templateHTML;
5
- defineCustomElement('sinch-table-body', class extends HTMLElement {
5
+ defineCustomElement('sinch-table-body', class extends NectaryElement {
6
6
  constructor() {
7
7
  super();
8
- const shadowRoot = this.attachShadow({
9
- mode: 'closed'
10
- });
8
+ const shadowRoot = this.attachShadow();
11
9
  shadowRoot.appendChild(template.content.cloneNode(true));
12
10
  }
13
11
 
@@ -1,14 +1,12 @@
1
- import { defineCustomElement, getLiteralAttribute, updateLiteralAttribute } from '../utils';
1
+ import { defineCustomElement, getLiteralAttribute, NectaryElement, updateLiteralAttribute } from '../utils';
2
2
  const templateHTML = '<style>:host{display:table-cell;vertical-align:top;border-bottom:1px solid var(--sinch-color-snow-600)}#wrapper{display:flex;flex-direction:column;justify-content:center;min-height:48px;box-sizing:border-box;padding:8px 4px}:host(:first-child) #wrapper{padding-left:8px}:host(:last-child) #wrapper{padding-right:8px}:host([align=end]) #wrapper{text-align:end;align-items:flex-end}:host([align=center]) #wrapper{text-align:center;align-items:center}</style><div id="wrapper"><slot></slot></div>';
3
3
  const template = document.createElement('template');
4
4
  template.innerHTML = templateHTML;
5
5
  const alignValues = ['start', 'center', 'end'];
6
- defineCustomElement('sinch-table-cell', class extends HTMLElement {
6
+ defineCustomElement('sinch-table-cell', class extends NectaryElement {
7
7
  constructor() {
8
8
  super();
9
- const shadowRoot = this.attachShadow({
10
- mode: 'closed'
11
- });
9
+ const shadowRoot = this.attachShadow();
12
10
  shadowRoot.appendChild(template.content.cloneNode(true));
13
11
  }
14
12