@nectary/components 0.29.1 → 0.31.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 (347) hide show
  1. package/accordion-item/types.d.ts +1 -2
  2. package/accordion-item/utils.d.ts +2 -1
  3. package/alert/index.js +1 -1
  4. package/alert/types.d.ts +1 -2
  5. package/alert/utils.d.ts +2 -1
  6. package/alert-button/index.js +1 -1
  7. package/avatar/types.d.ts +2 -3
  8. package/avatar/utils.d.ts +3 -2
  9. package/avatar-status/index.js +1 -3
  10. package/avatar-status/types.d.ts +1 -2
  11. package/avatar-status/utils.d.ts +1 -1
  12. package/button/index.js +1 -1
  13. package/button/types.d.ts +14 -2
  14. package/button/utils.d.ts +2 -1
  15. package/card/index.js +1 -1
  16. package/card-container/index.js +1 -1
  17. package/chat-bubble/types.d.ts +2 -3
  18. package/chat-bubble/utils.d.ts +3 -2
  19. package/checkbox/index.js +1 -1
  20. package/colors.json +6 -1
  21. package/date-picker/index.d.ts +19 -0
  22. package/date-picker/index.js +419 -0
  23. package/date-picker/types.d.ts +26 -0
  24. package/date-picker/utils.d.ts +32 -0
  25. package/date-picker/utils.js +145 -0
  26. package/dialog/index.js +23 -5
  27. package/dropdown-checkbox-option/index.js +1 -1
  28. package/icon-button/index.js +1 -1
  29. package/icons/create-icon-class.d.ts +1 -307
  30. package/icons/keyboard-double-arrow-left/index.d.ts +11 -0
  31. package/icons/keyboard-double-arrow-left/index.js +4 -0
  32. package/icons/keyboard-double-arrow-right/index.d.ts +11 -0
  33. package/icons/keyboard-double-arrow-right/index.js +4 -0
  34. package/icons-branded/ai/index.d.ts +11 -0
  35. package/icons-branded/ai/index.js +4 -0
  36. package/icons-branded/chat/index.d.ts +11 -0
  37. package/icons-branded/chat/index.js +4 -0
  38. package/icons-branded/create-icon-class.d.ts +1 -311
  39. package/icons-branded/custom-message/index.d.ts +11 -0
  40. package/icons-branded/custom-message/index.js +4 -0
  41. package/icons-branded/integration/index.d.ts +11 -0
  42. package/icons-branded/integration/index.js +4 -0
  43. package/icons-branded/line-chart-down/index.d.ts +11 -0
  44. package/icons-branded/line-chart-down/index.js +4 -0
  45. package/icons-branded/line-chart-up/index.d.ts +11 -0
  46. package/icons-branded/line-chart-up/index.js +4 -0
  47. package/icons-branded/mms/index.d.ts +11 -0
  48. package/icons-branded/mms/index.js +4 -0
  49. package/icons-branded/push/index.d.ts +11 -0
  50. package/icons-branded/push/index.js +4 -0
  51. package/icons-branded/rcs/index.d.ts +11 -0
  52. package/icons-branded/rcs/index.js +4 -0
  53. package/icons-branded/sms/index.d.ts +11 -0
  54. package/icons-branded/sms/index.js +4 -0
  55. package/icons-branded/time/index.d.ts +11 -0
  56. package/icons-branded/time/index.js +4 -0
  57. package/icons-channel/apple-business-chat-square/index.d.ts +11 -0
  58. package/icons-channel/apple-business-chat-square/index.js +4 -0
  59. package/icons-channel/create-icon-class.d.ts +1 -310
  60. package/icons-channel/create-icon-class.js +1 -1
  61. package/icons-channel/facebook-messenger-square/index.d.ts +11 -0
  62. package/icons-channel/facebook-messenger-square/index.js +4 -0
  63. package/icons-channel/instagram-square/index.d.ts +11 -0
  64. package/icons-channel/instagram-square/index.js +4 -0
  65. package/icons-channel/line-square/index.d.ts +11 -0
  66. package/icons-channel/line-square/index.js +4 -0
  67. package/icons-channel/talk-square/index.d.ts +11 -0
  68. package/icons-channel/talk-square/index.js +4 -0
  69. package/icons-channel/telegram-square/index.d.ts +11 -0
  70. package/icons-channel/telegram-square/index.js +4 -0
  71. package/icons-channel/twitter-square/index.d.ts +11 -0
  72. package/icons-channel/twitter-square/index.js +4 -0
  73. package/icons-channel/viber-square/index.d.ts +11 -0
  74. package/icons-channel/viber-square/index.js +4 -0
  75. package/icons-channel/wechat-square/index.d.ts +11 -0
  76. package/icons-channel/wechat-square/index.js +4 -0
  77. package/icons-channel/whatsapp-square/index.d.ts +11 -0
  78. package/icons-channel/whatsapp-square/index.js +4 -0
  79. package/illustrations/5g/index.d.ts +11 -0
  80. package/illustrations/5g/index.js +4 -0
  81. package/illustrations/about-page/index.d.ts +11 -0
  82. package/illustrations/about-page/index.js +4 -0
  83. package/illustrations/bank/index.d.ts +11 -0
  84. package/illustrations/bank/index.js +4 -0
  85. package/illustrations/boost/index.d.ts +11 -0
  86. package/illustrations/boost/index.js +4 -0
  87. package/illustrations/buildvoicebot/index.d.ts +11 -0
  88. package/illustrations/buildvoicebot/index.js +4 -0
  89. package/illustrations/call-center/index.d.ts +11 -0
  90. package/illustrations/call-center/index.js +4 -0
  91. package/illustrations/cat-texting/index.d.ts +11 -0
  92. package/illustrations/cat-texting/index.js +4 -0
  93. package/illustrations/chat-bot/index.d.ts +11 -0
  94. package/illustrations/chat-bot/index.js +4 -0
  95. package/illustrations/check/index.d.ts +11 -0
  96. package/illustrations/check/index.js +4 -0
  97. package/illustrations/code/index.d.ts +11 -0
  98. package/illustrations/code/index.js +4 -0
  99. package/illustrations/contact-us/index.d.ts +11 -0
  100. package/illustrations/contact-us/index.js +4 -0
  101. package/illustrations/contactus/index.d.ts +11 -0
  102. package/illustrations/contactus/index.js +4 -0
  103. package/illustrations/conversation-api/index.d.ts +11 -0
  104. package/illustrations/conversation-api/index.js +4 -0
  105. package/illustrations/cooking/index.d.ts +11 -0
  106. package/illustrations/cooking/index.js +4 -0
  107. package/illustrations/costumer-support/index.d.ts +11 -0
  108. package/illustrations/costumer-support/index.js +4 -0
  109. package/illustrations/create-illustration-class.d.ts +1 -0
  110. package/illustrations/create-illustration-class.js +68 -0
  111. package/illustrations/credit-card/index.d.ts +11 -0
  112. package/illustrations/credit-card/index.js +4 -0
  113. package/illustrations/credit-card-30-degrees/index.d.ts +11 -0
  114. package/illustrations/credit-card-30-degrees/index.js +4 -0
  115. package/illustrations/cute-bee/index.d.ts +11 -0
  116. package/illustrations/cute-bee/index.js +4 -0
  117. package/illustrations/decorative-flamingo/index.d.ts +11 -0
  118. package/illustrations/decorative-flamingo/index.js +4 -0
  119. package/illustrations/decorative-rainbow/index.d.ts +11 -0
  120. package/illustrations/decorative-rainbow/index.js +4 -0
  121. package/illustrations/delivery-service-package/index.d.ts +11 -0
  122. package/illustrations/delivery-service-package/index.js +4 -0
  123. package/illustrations/desktop/index.d.ts +11 -0
  124. package/illustrations/desktop/index.js +4 -0
  125. package/illustrations/document/index.d.ts +11 -0
  126. package/illustrations/document/index.js +4 -0
  127. package/illustrations/flower-hand/index.d.ts +11 -0
  128. package/illustrations/flower-hand/index.js +4 -0
  129. package/illustrations/football/index.d.ts +11 -0
  130. package/illustrations/football/index.js +4 -0
  131. package/illustrations/geometric-shapes-passing/index.d.ts +11 -0
  132. package/illustrations/geometric-shapes-passing/index.js +4 -0
  133. package/illustrations/girl-on-phone/index.d.ts +11 -0
  134. package/illustrations/girl-on-phone/index.js +4 -0
  135. package/illustrations/global-reach/index.d.ts +11 -0
  136. package/illustrations/global-reach/index.js +4 -0
  137. package/illustrations/hand-ok/index.d.ts +11 -0
  138. package/illustrations/hand-ok/index.js +4 -0
  139. package/illustrations/hands-laptop/index.d.ts +11 -0
  140. package/illustrations/hands-laptop/index.js +4 -0
  141. package/illustrations/handset-omnichannel-messages/index.d.ts +11 -0
  142. package/illustrations/handset-omnichannel-messages/index.js +4 -0
  143. package/illustrations/happy-text/index.d.ts +11 -0
  144. package/illustrations/happy-text/index.js +4 -0
  145. package/illustrations/headphones/index.d.ts +11 -0
  146. package/illustrations/headphones/index.js +4 -0
  147. package/illustrations/heart/index.d.ts +11 -0
  148. package/illustrations/heart/index.js +4 -0
  149. package/illustrations/hero-messages/index.d.ts +11 -0
  150. package/illustrations/hero-messages/index.js +4 -0
  151. package/illustrations/hero-page/index.d.ts +11 -0
  152. package/illustrations/hero-page/index.js +4 -0
  153. package/illustrations/jump/index.d.ts +11 -0
  154. package/illustrations/jump/index.js +4 -0
  155. package/illustrations/laptop-holding/index.d.ts +11 -0
  156. package/illustrations/laptop-holding/index.js +4 -0
  157. package/illustrations/laptop-sitting-verified/index.d.ts +11 -0
  158. package/illustrations/laptop-sitting-verified/index.js +4 -0
  159. package/illustrations/lightning/index.d.ts +11 -0
  160. package/illustrations/lightning/index.js +4 -0
  161. package/illustrations/lock/index.d.ts +11 -0
  162. package/illustrations/lock/index.js +4 -0
  163. package/illustrations/lying-and-looking-at-the-phone/index.d.ts +11 -0
  164. package/illustrations/lying-and-looking-at-the-phone/index.js +4 -0
  165. package/illustrations/magnifying-glass/index.d.ts +11 -0
  166. package/illustrations/magnifying-glass/index.js +4 -0
  167. package/illustrations/man-on-right/index.d.ts +11 -0
  168. package/illustrations/man-on-right/index.js +4 -0
  169. package/illustrations/meeting-scrum/index.d.ts +11 -0
  170. package/illustrations/meeting-scrum/index.js +4 -0
  171. package/illustrations/meeting-scrum-2/index.d.ts +11 -0
  172. package/illustrations/meeting-scrum-2/index.js +4 -0
  173. package/illustrations/megaphone/index.d.ts +11 -0
  174. package/illustrations/megaphone/index.js +4 -0
  175. package/illustrations/menu/index.d.ts +11 -0
  176. package/illustrations/menu/index.js +4 -0
  177. package/illustrations/message-passing/index.d.ts +11 -0
  178. package/illustrations/message-passing/index.js +4 -0
  179. package/illustrations/message-recieved/index.d.ts +11 -0
  180. package/illustrations/message-recieved/index.js +4 -0
  181. package/illustrations/messages/index.d.ts +11 -0
  182. package/illustrations/messages/index.js +4 -0
  183. package/illustrations/messages-on-yellow-bg/index.d.ts +11 -0
  184. package/illustrations/messages-on-yellow-bg/index.js +4 -0
  185. package/illustrations/messages-shopping/index.d.ts +11 -0
  186. package/illustrations/messages-shopping/index.js +4 -0
  187. package/illustrations/monitor/index.d.ts +11 -0
  188. package/illustrations/monitor/index.js +4 -0
  189. package/illustrations/numbers-passing/index.d.ts +11 -0
  190. package/illustrations/numbers-passing/index.js +4 -0
  191. package/illustrations/office-worker/index.d.ts +11 -0
  192. package/illustrations/office-worker/index.js +4 -0
  193. package/illustrations/old-person-on-phone/index.d.ts +11 -0
  194. package/illustrations/old-person-on-phone/index.js +4 -0
  195. package/illustrations/omnichannel-messaging/index.d.ts +11 -0
  196. package/illustrations/omnichannel-messaging/index.js +4 -0
  197. package/illustrations/on-the-phone/index.d.ts +11 -0
  198. package/illustrations/on-the-phone/index.js +4 -0
  199. package/illustrations/parcel-delivery/index.d.ts +11 -0
  200. package/illustrations/parcel-delivery/index.js +4 -0
  201. package/illustrations/passing-heart/index.d.ts +11 -0
  202. package/illustrations/passing-heart/index.js +4 -0
  203. package/illustrations/passing-heart-cool/index.d.ts +11 -0
  204. package/illustrations/passing-heart-cool/index.js +4 -0
  205. package/illustrations/person-on-phone/index.d.ts +11 -0
  206. package/illustrations/person-on-phone/index.js +4 -0
  207. package/illustrations/person-on-walk/index.d.ts +11 -0
  208. package/illustrations/person-on-walk/index.js +4 -0
  209. package/illustrations/person-with-dog/index.d.ts +11 -0
  210. package/illustrations/person-with-dog/index.js +4 -0
  211. package/illustrations/person-with-phone/index.d.ts +11 -0
  212. package/illustrations/person-with-phone/index.js +4 -0
  213. package/illustrations/phone-and-cat/index.js +4 -0
  214. package/illustrations/pineapple/index.d.ts +11 -0
  215. package/illustrations/pineapple/index.js +4 -0
  216. package/illustrations/pizza/index.d.ts +11 -0
  217. package/illustrations/pizza/index.js +4 -0
  218. package/illustrations/plane/index.d.ts +11 -0
  219. package/illustrations/plane/index.js +4 -0
  220. package/illustrations/presenting-charts/index.d.ts +11 -0
  221. package/illustrations/presenting-charts/index.js +4 -0
  222. package/illustrations/product-page/index.d.ts +11 -0
  223. package/illustrations/product-page/index.js +4 -0
  224. package/illustrations/product-page-2/index.d.ts +11 -0
  225. package/illustrations/product-page-2/index.js +4 -0
  226. package/illustrations/scooter/index.d.ts +11 -0
  227. package/illustrations/scooter/index.js +4 -0
  228. package/illustrations/security/index.d.ts +11 -0
  229. package/illustrations/security/index.js +4 -0
  230. package/illustrations/security-camera/index.d.ts +11 -0
  231. package/illustrations/security-camera/index.js +4 -0
  232. package/illustrations/sherlockholmes/index.d.ts +11 -0
  233. package/illustrations/sherlockholmes/index.js +4 -0
  234. package/illustrations/shoe/index.d.ts +11 -0
  235. package/illustrations/shoe/index.js +4 -0
  236. package/illustrations/shopping/index.d.ts +11 -0
  237. package/illustrations/shopping/index.js +4 -0
  238. package/illustrations/shopping-cart/index.d.ts +11 -0
  239. package/illustrations/shopping-cart/index.js +4 -0
  240. package/illustrations/sick-kid/index.d.ts +11 -0
  241. package/illustrations/sick-kid/index.js +4 -0
  242. package/illustrations/sitting-messaging/index.d.ts +11 -0
  243. package/illustrations/sitting-messaging/index.js +4 -0
  244. package/illustrations/sitting-person/index.d.ts +11 -0
  245. package/illustrations/sitting-person/index.js +4 -0
  246. package/illustrations/sitting-person-2/index.d.ts +11 -0
  247. package/illustrations/sitting-person-2/index.js +4 -0
  248. package/illustrations/sofa/index.d.ts +11 -0
  249. package/illustrations/sofa/index.js +4 -0
  250. package/illustrations/stats/index.d.ts +11 -0
  251. package/illustrations/stats/index.js +4 -0
  252. package/illustrations/support-center/index.d.ts +11 -0
  253. package/illustrations/support-center/index.js +4 -0
  254. package/illustrations/supporting-device/index.d.ts +11 -0
  255. package/illustrations/supporting-device/index.js +4 -0
  256. package/illustrations/supporting-device-2/index.d.ts +11 -0
  257. package/illustrations/supporting-device-2/index.js +4 -0
  258. package/illustrations/supporting-device-3/index.d.ts +11 -0
  259. package/illustrations/supporting-device-3/index.js +4 -0
  260. package/illustrations/supporting-device-4/index.d.ts +11 -0
  261. package/illustrations/supporting-device-4/index.js +4 -0
  262. package/illustrations/surf/index.d.ts +11 -0
  263. package/illustrations/surf/index.js +4 -0
  264. package/illustrations/taxi/index.d.ts +11 -0
  265. package/illustrations/taxi/index.js +4 -0
  266. package/illustrations/taxi-2/index.d.ts +11 -0
  267. package/illustrations/taxi-2/index.js +4 -0
  268. package/illustrations/teamwork-from-phone/index.d.ts +11 -0
  269. package/illustrations/teamwork-from-phone/index.js +4 -0
  270. package/illustrations/telemast/index.d.ts +11 -0
  271. package/illustrations/telemast/index.js +4 -0
  272. package/illustrations/texting-sitting/index.d.ts +11 -0
  273. package/illustrations/texting-sitting/index.js +4 -0
  274. package/illustrations/texting-sofa/index.d.ts +11 -0
  275. package/illustrations/texting-sofa/index.js +4 -0
  276. package/illustrations/train/index.d.ts +11 -0
  277. package/illustrations/train/index.js +4 -0
  278. package/illustrations/types.d.ts +16 -0
  279. package/illustrations/types.js +1 -0
  280. package/illustrations/utils.d.ts +3 -0
  281. package/illustrations/utils.js +2 -0
  282. package/illustrations/video-voice-call/index.d.ts +11 -0
  283. package/illustrations/video-voice-call/index.js +4 -0
  284. package/illustrations/voicebot/index.d.ts +11 -0
  285. package/illustrations/voicebot/index.js +4 -0
  286. package/illustrations/walking-on-phone/index.d.ts +11 -0
  287. package/illustrations/walking-on-phone/index.js +4 -0
  288. package/illustrations/what-tools/index.d.ts +11 -0
  289. package/illustrations/what-tools/index.js +4 -0
  290. package/illustrations/win-together/index.d.ts +11 -0
  291. package/illustrations/win-together/index.js +4 -0
  292. package/illustrations/win-together-two-people/index.d.ts +11 -0
  293. package/illustrations/win-together-two-people/index.js +4 -0
  294. package/illustrations/wizard/index.d.ts +11 -0
  295. package/illustrations/wizard/index.js +4 -0
  296. package/illustrations/woman-hand-lifted/index.d.ts +11 -0
  297. package/illustrations/woman-hand-lifted/index.js +4 -0
  298. package/illustrations/woman-on-left/index.d.ts +11 -0
  299. package/illustrations/woman-on-left/index.js +4 -0
  300. package/illustrations/woman-on-right/index.d.ts +11 -0
  301. package/illustrations/woman-on-right/index.js +4 -0
  302. package/input/index.js +1 -1
  303. package/input/types.d.ts +38 -12
  304. package/input/utils.d.ts +2 -1
  305. package/link/index.js +18 -4
  306. package/link/types.d.ts +0 -2
  307. package/logo/create-logo-class.d.ts +1 -311
  308. package/package.json +1 -1
  309. package/popover/index.js +76 -47
  310. package/popover/types.d.ts +1 -2
  311. package/popover/utils.d.ts +2 -1
  312. package/search/index.js +1 -1
  313. package/segment/index.d.ts +1 -0
  314. package/segment/index.js +109 -6
  315. package/segment/types.d.ts +4 -0
  316. package/segment/utils.d.ts +5 -0
  317. package/segment/utils.js +6 -0
  318. package/select/index.js +1 -1
  319. package/spinner/types.d.ts +1 -2
  320. package/spinner/utils.d.ts +2 -1
  321. package/table-cell/types.d.ts +4 -5
  322. package/table-cell/utils.d.ts +2 -1
  323. package/table-head-cell/types.d.ts +4 -4
  324. package/tag/index.js +1 -1
  325. package/tag/types.d.ts +1 -2
  326. package/tag/utils.d.ts +2 -1
  327. package/text/index.js +0 -1
  328. package/text/types.d.ts +1 -2
  329. package/text/utils.d.ts +1 -1
  330. package/textarea/index.js +1 -1
  331. package/theme.css +17 -0
  332. package/title/index.js +0 -2
  333. package/title/types.d.ts +2 -3
  334. package/title/utils.d.ts +4 -3
  335. package/title/utils.js +21 -0
  336. package/toggle/index.js +1 -1
  337. package/tooltip/index.js +1 -1
  338. package/tooltip/types.d.ts +1 -2
  339. package/tooltip/utils.d.ts +2 -1
  340. package/utils.d.ts +4 -0
  341. package/utils.js +35 -4
  342. package/illustration/create-illustration-class.d.ts +0 -310
  343. package/illustration/create-illustration-class.js +0 -51
  344. package/illustration/phone-and-cat/index.js +0 -4
  345. package/illustration/types.d.ts +0 -8
  346. /package/{illustration → date-picker}/types.js +0 -0
  347. /package/{illustration → illustrations}/phone-and-cat/index.d.ts +0 -0
@@ -1,6 +1,5 @@
1
1
  import type { TSinchElementReact } from '../types';
2
- import type { statusValues } from './utils';
3
- export declare type TSinchAccordionStatusType = typeof statusValues[number];
2
+ export declare type TSinchAccordionStatusType = 'info' | 'success' | 'warn' | 'error';
4
3
  export declare type TSinchAccordionItemElement = HTMLElement & {
5
4
  value: string;
6
5
  label: string;
@@ -1 +1,2 @@
1
- export declare const statusValues: readonly ["info", "success", "warn", "error"];
1
+ import type { TSinchAccordionStatusType } from './types';
2
+ export declare const statusValues: readonly TSinchAccordionStatusType[];
package/alert/index.js CHANGED
@@ -8,7 +8,7 @@ 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 { defineCustomElement, getBooleanAttribute, getAttribute, getLiteralAttribute, updateBooleanAttribute, updateAttribute, updateLiteralAttribute, NectaryElement } from '../utils';
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}#caption{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])) #caption{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="caption"></p><p id="text"></p><slot name="button"></slot></div><slot name="close"></slot></div>';
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:var(--sinch-shape-radius-l);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}#caption{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])) #caption{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="caption"></p><p id="text"></p><slot name="button"></slot></div><slot name="close"></slot></div>';
12
12
  import { typeValues } from './utils';
13
13
  const template = document.createElement('template');
14
14
  template.innerHTML = templateHTML;
package/alert/types.d.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  import type { TSinchElementReact } from '../types';
2
- import type { typeValues } from './utils';
3
- export declare type TSinchAlertType = typeof typeValues[number];
2
+ export declare type TSinchAlertType = 'info' | 'success' | 'warn' | 'error';
4
3
  export declare type TSinchAlertElement = HTMLElement & {
5
4
  type: TSinchAlertType;
6
5
  text: string;
package/alert/utils.d.ts CHANGED
@@ -1 +1,2 @@
1
- export declare const typeValues: readonly ["info", "success", "warn", "error"];
1
+ import type { TSinchAlertType } from './types';
2
+ export declare const typeValues: readonly TSinchAlertType[];
@@ -8,7 +8,7 @@ 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 { defineCustomElement, getAttribute, NectaryElement, updateAttribute } from '../utils';
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>';
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:var(--sinch-shape-radius-s);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
14
  defineCustomElement('sinch-alert-button', (_$button = new WeakMap(), class extends NectaryElement {
package/avatar/types.d.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  import type { TSinchElementReact } from '../types';
2
- import type { backgroundValues, sizeValues } from './utils';
3
- export declare type TSinchAvatarBackground = typeof backgroundValues[number];
4
- export declare type TSinchAvatarSize = typeof sizeValues[number];
2
+ export declare type TSinchAvatarBackground = 'grey' | 'yellow' | 'blue';
3
+ export declare type TSinchAvatarSize = 'l' | 'm' | 's';
5
4
  export declare type TSinchAvatarElement = HTMLElement & {
6
5
  alt: string;
7
6
  src: string | null;
package/avatar/utils.d.ts CHANGED
@@ -1,2 +1,3 @@
1
- export declare const backgroundValues: readonly ["grey", "yellow", "blue"];
2
- export declare const sizeValues: readonly ["l", "m", "s"];
1
+ import type { TSinchAvatarBackground, TSinchAvatarSize } from './types';
2
+ export declare const backgroundValues: readonly TSinchAvatarBackground[];
3
+ export declare const sizeValues: readonly TSinchAvatarSize[];
@@ -10,9 +10,7 @@ defineCustomElement('sinch-avatar-status', class extends NectaryElement {
10
10
  shadowRoot.appendChild(template.content.cloneNode(true));
11
11
  }
12
12
 
13
- connectedCallback() {
14
- assertColor(this.getAttribute('color'));
15
- }
13
+ connectedCallback() {}
16
14
 
17
15
  static get observedAttributes() {
18
16
  return ['color'];
@@ -1,6 +1,5 @@
1
1
  import type { TSinchElementReact } from '../types';
2
- import type { colorValues } from './utils';
3
- export declare type TSinchAvatarStatusColor = typeof colorValues[number];
2
+ export declare type TSinchAvatarStatusColor = 'red' | 'yellow' | 'green' | 'grey';
4
3
  export declare type TSinchAvatarStatusElement = HTMLElement & {
5
4
  color: TSinchAvatarStatusColor;
6
5
  setAttribute(name: 'color', value: TSinchAvatarStatusColor): void;
@@ -1,5 +1,5 @@
1
1
  import type { TSinchAvatarStatusColor } from './types';
2
- export declare const colorValues: readonly ["red", "yellow", "green", "grey"];
2
+ export declare const colorValues: readonly TSinchAvatarStatusColor[];
3
3
  declare type TAssertColor = (value: string | null) => asserts value is TSinchAvatarStatusColor;
4
4
  export declare const assertColor: TAssertColor;
5
5
  export {};
package/button/index.js CHANGED
@@ -8,7 +8,7 @@ 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 { defineCustomElement, getBooleanAttribute, getAttribute, getLiteralAttribute, isAttrTrue, updateBooleanAttribute, updateAttribute, updateLiteralAttribute, NectaryElement } from '../utils';
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;position:relative;display:flex;align-items:center;justify-content:center;gap:12px;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);cursor:pointer;--sinch-size-icon:24px}button::before{content:"";position:absolute;left:0;top:0;bottom:0;right:0;border:1px solid var(--sinch-color-button-border);border-radius:4px}button:focus{background-color:var(--sinch-color-button-background-focus)}button:focus::before{border-color:var(--sinch-color-button-border-focus);border-width:2px}button:hover{background-color:var(--sinch-color-button-background-hover)}button:hover::before{border-color:var(--sinch-color-button-border-hover)}button:active{background-color:var(--sinch-color-button-background-active)}button:active::before{border-color:var(--sinch-color-button-border-active);border-width:2px}button:disabled{color:var(--sinch-color-button-text-disabled);background-color:var(--sinch-color-button-background-disabled);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:disabled::before{border-color:var(--sinch-color-button-border-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="left-icon"></slot><span id="text"></span><slot name="right-icon"></slot></button>';
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;position:relative;display:flex;align-items:center;justify-content:center;gap:12px;box-sizing:border-box;width:100%;height:48px;padding:12px;border-radius:var(--sinch-shape-radius-s);font:var(--sinch-font-title-s);color:var(--sinch-color-button-text);background-color:var(--sinch-color-button-background);cursor:pointer;--sinch-size-icon:24px}button::before{content:"";position:absolute;left:0;top:0;bottom:0;right:0;border:1px solid var(--sinch-color-button-border);border-radius:var(--sinch-shape-radius-s)}button:focus{background-color:var(--sinch-color-button-background-focus)}button:focus::before{border-color:var(--sinch-color-button-border-focus);border-width:2px}button:hover{background-color:var(--sinch-color-button-background-hover)}button:hover::before{border-color:var(--sinch-color-button-border-hover);border-width:1px}button:active{background-color:var(--sinch-color-button-background-active)}button:active::before{border-color:var(--sinch-color-button-border-active);border-width:2px}button:disabled{color:var(--sinch-color-button-text-disabled);background-color:var(--sinch-color-button-background-disabled);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:disabled::before{border-color:var(--sinch-color-button-border-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;border-radius:var(--sinch-shape-radius-s);--sinch-size-icon:16px}:host([small]:not([small=false]))>button::before{border-radius:var(--sinch-shape-radius-s)}:host([text]:not([text=""])[small]:not([small=false])) button{padding:8px 16px}</style><button><slot name="left-icon"></slot><span id="text"></span><slot name="right-icon"></slot></button>';
12
12
  import { buttonTypes } from './utils';
13
13
  const template = document.createElement('template');
14
14
  template.innerHTML = templateHTML;
package/button/types.d.ts CHANGED
@@ -1,22 +1,34 @@
1
1
  import type { TSinchElementReact } from '../types';
2
- import type { buttonTypes } from './utils';
3
- export declare type TSinchButtonType = typeof buttonTypes[number];
2
+ export declare type TSinchButtonType = 'primary' | 'secondary' | 'cta-primary' | 'cta-secondary' | 'destructive';
4
3
  export declare type TSinchButtonElement = HTMLElement & {
4
+ /** Type */
5
5
  type: TSinchButtonType;
6
+ /** Text content */
6
7
  text: string;
8
+ /** Disabled */
7
9
  disabled: boolean;
10
+ /** Small */
8
11
  small: boolean;
9
12
  focus(): void;
10
13
  blur(): void;
14
+ /** Type */
11
15
  setAttribute(attr: 'type', value: TSinchButtonType): void;
16
+ /** Text content */
12
17
  setAttribute(attr: 'text', value: string): void;
18
+ /** Disabled */
13
19
  setAttribute(attr: 'disabled', value: ''): void;
20
+ /** Small */
14
21
  setAttribute(attr: 'small', value: ''): void;
15
22
  };
16
23
  export declare type TSinchButtonReact = TSinchElementReact<TSinchButtonElement> & {
24
+ /** Type */
17
25
  type: TSinchButtonType;
26
+ /** Text content */
18
27
  text: string;
28
+ /** Label that is used for a11y – might be different from `label` */
19
29
  'aria-label': string;
30
+ /** Disabled */
20
31
  disabled?: boolean;
32
+ /** Small */
21
33
  small?: boolean;
22
34
  };
package/button/utils.d.ts CHANGED
@@ -1 +1,2 @@
1
- export declare const buttonTypes: readonly ["primary", "secondary", "cta-primary", "cta-secondary", "destructive"];
1
+ import type { TSinchButtonType } from './types';
2
+ export declare const buttonTypes: readonly TSinchButtonType[];
package/card/index.js CHANGED
@@ -8,7 +8,7 @@ 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 { defineCustomElement, getBooleanAttribute, getAttribute, updateBooleanAttribute, updateAttribute, setClass, NectaryElement } from '../utils';
11
- 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}#caption{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="caption"></span></div><p id="description"></p><slot name="action"></slot></div></div>';
11
+ const templateHTML = '<style>:host{display:block;outline:0}#wrapper{border-radius:var(--sinch-shape-radius-l);border:1px solid var(--sinch-color-snow-700);background-color:var(--sinch-color-snow-100);box-shadow:var(--sinch-elevation-level-0);overflow:hidden}:host(:hover) #wrapper{box-shadow:var(--sinch-elevation-level-1)}#card-body{padding:24px;box-sizing:border-box;display:flex;flex-direction:column;gap:16px}#illustration-wrapper{display:none;overflow:hidden;height:240px}#illustration-wrapper.active{display:block}#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}#caption{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="caption"></span></div><p id="description"></p><slot name="action"></slot></div></div>';
12
12
  const template = document.createElement('template');
13
13
  template.innerHTML = templateHTML;
14
14
  defineCustomElement('sinch-card', (_$text = new WeakMap(), _$label = new WeakMap(), _$caption = new WeakMap(), _$illustrationSlot = new WeakMap(), _$actionSlot = new WeakMap(), _$illustrationSlotWrapper = new WeakMap(), _onIllustrationSlotChange = new WeakMap(), _updateDisabledAttributeInChildren = new WeakMap(), class extends NectaryElement {
@@ -1,5 +1,5 @@
1
1
  import { defineCustomElement, NectaryElement } from '../utils';
2
- const templateHTML = '<style>:host{display:block}#wrapper{height:100%;padding:24px;box-sizing:border-box;background-color:var(--sinch-color-snow-100);border-radius:8px;border:1px solid var(--sinch-color-snow-700);font:var(--sinch-font-body)}#scroll{overflow:auto;height:100%}</style><div id="wrapper"><div id="scroll"><slot></slot></div></div>';
2
+ const templateHTML = '<style>:host{display:block}#wrapper{height:100%;padding:24px;box-sizing:border-box;background-color:var(--sinch-color-snow-100);border-radius:var(--sinch-shape-radius-l);border:1px solid var(--sinch-color-snow-700);font:var(--sinch-font-body)}#scroll{overflow:auto;height:100%}</style><div id="wrapper"><div id="scroll"><slot></slot></div></div>';
3
3
  const template = document.createElement('template');
4
4
  template.innerHTML = templateHTML;
5
5
  defineCustomElement('sinch-card-container', class extends NectaryElement {
@@ -1,7 +1,6 @@
1
1
  import type { TSinchElementReact } from '../types';
2
- import type { statusValues, typeValues } from './utils';
3
- export declare type TSinchChatBubbleType = typeof typeValues[number];
4
- export declare type TSinchChatBubbleStatus = typeof statusValues[number];
2
+ export declare type TSinchChatBubbleType = 'customer' | 'agent' | 'agent-prev';
3
+ export declare type TSinchChatBubbleStatus = 'sending' | 'sent' | 'received' | 'seen' | 'error';
5
4
  export declare type TSinchChatBubbleElement = HTMLElement & {
6
5
  readonly type: TSinchChatBubbleType | null;
7
6
  text: string;
@@ -1,2 +1,3 @@
1
- export declare const typeValues: readonly ["customer", "agent", "agent-prev"];
2
- export declare const statusValues: readonly ["sending", "sent", "received", "seen", "error"];
1
+ import type { TSinchChatBubbleStatus, TSinchChatBubbleType } from './types';
2
+ export declare const typeValues: readonly TSinchChatBubbleType[];
3
+ export declare const statusValues: readonly TSinchChatBubbleStatus[];
package/checkbox/index.js CHANGED
@@ -8,7 +8,7 @@ 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 { defineCustomElement, getAttribute, getBooleanAttribute, isAttrTrue, NectaryElement, updateAttribute, updateBooleanAttribute, updateExplicitBooleanAttribute } from '../utils';
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);border:2px solid var(--sinch-color-checkbox-border);transition:background-color .1s linear;box-sizing:border-box}#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);border-color:var(--sinch-color-checkbox-border-checked)}#checkbox:focus::before{background-color:var(--sinch-color-checkbox-circle-focus)}#checkbox:focus::after{background-color:var(--sinch-color-checkbox-background-focus);border-color:var(--sinch-color-checkbox-border-focus)}#checkbox:hover::before{background-color:var(--sinch-color-checkbox-circle-hover)}#checkbox:hover::after{background-color:var(--sinch-color-checkbox-background-hover);border-color:var(--sinch-color-checkbox-border-hover)}#checkbox:active::before{background-color:var(--sinch-color-checkbox-circle-active)}#checkbox:active::after{background-color:var(--sinch-color-checkbox-background-active);border-color:var(--sinch-color-checkbox-border-active)}#checkbox:disabled::before{background-color:var(--sinch-color-checkbox-circle-disabled)}#checkbox:disabled::after{background-color:var(--sinch-color-checkbox-background-disabled);border-color:var(--sinch-color-checkbox-border-disabled)}#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);border-color:var(--sinch-color-checkbox-border-focus-checked)}#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);border-color:var(--sinch-color-checkbox-border-hover-checked)}#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);border-color:var(--sinch-color-checkbox-border-active-checked)}#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);border-color:var(--sinch-color-checkbox-border-disabled-checked)}</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>';
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:var(--sinch-shape-radius-xs);pointer-events:none;background-color:var(--sinch-color-checkbox-background);border:2px solid var(--sinch-color-checkbox-border);transition:background-color .1s linear;box-sizing:border-box}#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);border-color:var(--sinch-color-checkbox-border-checked)}#checkbox:focus::before{background-color:var(--sinch-color-checkbox-circle-focus)}#checkbox:focus::after{background-color:var(--sinch-color-checkbox-background-focus);border-color:var(--sinch-color-checkbox-border-focus)}#checkbox:hover::before{background-color:var(--sinch-color-checkbox-circle-hover)}#checkbox:hover::after{background-color:var(--sinch-color-checkbox-background-hover);border-color:var(--sinch-color-checkbox-border-hover)}#checkbox:active::before{background-color:var(--sinch-color-checkbox-circle-active)}#checkbox:active::after{background-color:var(--sinch-color-checkbox-background-active);border-color:var(--sinch-color-checkbox-border-active)}#checkbox:disabled::before{background-color:var(--sinch-color-checkbox-circle-disabled)}#checkbox:disabled::after{background-color:var(--sinch-color-checkbox-background-disabled);border-color:var(--sinch-color-checkbox-border-disabled)}#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);border-color:var(--sinch-color-checkbox-border-focus-checked)}#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);border-color:var(--sinch-color-checkbox-border-hover-checked)}#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);border-color:var(--sinch-color-checkbox-border-active-checked)}#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);border-color:var(--sinch-color-checkbox-border-disabled-checked)}</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
14
  defineCustomElement('sinch-checkbox', (_$input = new WeakMap(), _$label = new WeakMap(), _onCheckboxInput = new WeakMap(), class extends NectaryElement {
package/colors.json CHANGED
@@ -67,5 +67,10 @@
67
67
  "colorOrange400": "#FF8C34",
68
68
  "colorOrange200": "#FFD4B3",
69
69
  "colorBolt400": "#FFBE3C",
70
- "colorBolt200": "#FFE6B3"
70
+ "colorBolt200": "#FFE6B3",
71
+ "colorBackgroundGrey": "#FAFAFA",
72
+ "colorBackgroundGreen": "#DCEDE1",
73
+ "colorBackgroundBlue": "#DEF2FF",
74
+ "colorBackgroundYellow": "#FCECCB",
75
+ "colorBackgroundWhite": "#FFFFFF"
71
76
  }
@@ -0,0 +1,19 @@
1
+ import '../icon-button';
2
+ import '../icons/keyboard-arrow-right';
3
+ import '../icons/keyboard-double-arrow-right';
4
+ import '../icons/keyboard-arrow-left';
5
+ import '../icons/keyboard-double-arrow-left';
6
+ import '../icons/delete-outline';
7
+ import '../icons/today';
8
+ import '../text';
9
+ import type { TSinchDatePickerElement, TSinchDatePickerReact } from './types';
10
+ declare global {
11
+ namespace JSX {
12
+ interface IntrinsicElements {
13
+ 'sinch-date-picker': TSinchDatePickerReact;
14
+ }
15
+ }
16
+ interface HTMLElementTagNameMap {
17
+ 'sinch-date-picker': TSinchDatePickerElement;
18
+ }
19
+ }