@nectary/components 0.29.0 → 0.30.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 (124) hide show
  1. package/accordion-item/types.d.ts +1 -2
  2. package/accordion-item/utils.d.ts +2 -1
  3. package/action-menu-option/index.js +1 -1
  4. package/alert/index.js +1 -1
  5. package/alert/types.d.ts +1 -2
  6. package/alert/utils.d.ts +2 -1
  7. package/alert-button/index.js +1 -1
  8. package/avatar/types.d.ts +2 -3
  9. package/avatar/utils.d.ts +3 -2
  10. package/avatar-status/index.js +1 -3
  11. package/avatar-status/types.d.ts +1 -2
  12. package/avatar-status/utils.d.ts +1 -1
  13. package/button/index.js +1 -1
  14. package/button/types.d.ts +1 -2
  15. package/button/utils.d.ts +2 -1
  16. package/card/index.js +1 -1
  17. package/card-container/index.js +1 -1
  18. package/chat-bubble/types.d.ts +2 -3
  19. package/chat-bubble/utils.d.ts +3 -2
  20. package/checkbox/index.js +1 -1
  21. package/colors.json +6 -1
  22. package/date-picker/index.d.ts +19 -0
  23. package/date-picker/index.js +419 -0
  24. package/date-picker/types.d.ts +26 -0
  25. package/date-picker/types.js +1 -0
  26. package/date-picker/utils.d.ts +32 -0
  27. package/date-picker/utils.js +142 -0
  28. package/dialog/index.js +23 -5
  29. package/dropdown/index.js +2 -2
  30. package/dropdown-checkbox-option/index.js +1 -9
  31. package/dropdown-checkbox-option/types.d.ts +0 -1
  32. package/dropdown-radio-option/index.js +1 -9
  33. package/dropdown-radio-option/types.d.ts +0 -1
  34. package/dropdown-text-option/index.d.ts +1 -2
  35. package/dropdown-text-option/index.js +2 -9
  36. package/dropdown-text-option/types.d.ts +0 -1
  37. package/icon-button/index.js +1 -1
  38. package/icons/create-icon-class.d.ts +1 -307
  39. package/icons/keyboard-double-arrow-left/index.d.ts +11 -0
  40. package/icons/keyboard-double-arrow-left/index.js +4 -0
  41. package/icons/keyboard-double-arrow-right/index.d.ts +11 -0
  42. package/icons/keyboard-double-arrow-right/index.js +4 -0
  43. package/icons-branded/chat/index.d.ts +11 -0
  44. package/icons-branded/chat/index.js +4 -0
  45. package/icons-branded/create-icon-class.d.ts +1 -311
  46. package/icons-branded/mms/index.d.ts +11 -0
  47. package/icons-branded/mms/index.js +4 -0
  48. package/icons-branded/push/index.d.ts +11 -0
  49. package/icons-branded/push/index.js +4 -0
  50. package/icons-branded/rcs/index.d.ts +11 -0
  51. package/icons-branded/rcs/index.js +4 -0
  52. package/icons-branded/sms/index.d.ts +11 -0
  53. package/icons-branded/sms/index.js +4 -0
  54. package/icons-channel/apple-business-chat-square/index.d.ts +11 -0
  55. package/icons-channel/apple-business-chat-square/index.js +4 -0
  56. package/icons-channel/create-icon-class.d.ts +1 -310
  57. package/icons-channel/create-icon-class.js +1 -1
  58. package/icons-channel/facebook-messenger-square/index.d.ts +11 -0
  59. package/icons-channel/facebook-messenger-square/index.js +4 -0
  60. package/icons-channel/instagram-square/index.d.ts +11 -0
  61. package/icons-channel/instagram-square/index.js +4 -0
  62. package/icons-channel/line-square/index.d.ts +11 -0
  63. package/icons-channel/line-square/index.js +4 -0
  64. package/icons-channel/talk-square/index.d.ts +11 -0
  65. package/icons-channel/talk-square/index.js +4 -0
  66. package/icons-channel/telegram-square/index.d.ts +11 -0
  67. package/icons-channel/telegram-square/index.js +4 -0
  68. package/icons-channel/twitter-square/index.d.ts +11 -0
  69. package/icons-channel/twitter-square/index.js +4 -0
  70. package/icons-channel/viber-square/index.d.ts +11 -0
  71. package/icons-channel/viber-square/index.js +4 -0
  72. package/icons-channel/wechat-square/index.d.ts +11 -0
  73. package/icons-channel/wechat-square/index.js +4 -0
  74. package/icons-channel/whatsapp-square/index.d.ts +11 -0
  75. package/icons-channel/whatsapp-square/index.js +4 -0
  76. package/illustration/create-illustration-class.d.ts +1 -310
  77. package/illustration/create-illustration-class.js +20 -3
  78. package/illustration/phone-and-cat/index.js +1 -1
  79. package/illustration/types.d.ts +8 -0
  80. package/illustration/utils.d.ts +3 -0
  81. package/illustration/utils.js +2 -0
  82. package/input/index.js +1 -1
  83. package/input/types.d.ts +4 -5
  84. package/input/utils.d.ts +2 -1
  85. package/link/index.js +18 -4
  86. package/link/types.d.ts +0 -2
  87. package/logo/create-logo-class.d.ts +1 -311
  88. package/package.json +1 -1
  89. package/popover/index.js +76 -47
  90. package/popover/types.d.ts +1 -2
  91. package/popover/utils.d.ts +2 -1
  92. package/radio-option/index.js +1 -1
  93. package/search/index.js +4 -4
  94. package/search-option/index.js +1 -14
  95. package/search-option/types.d.ts +0 -1
  96. package/segment/index.d.ts +1 -0
  97. package/segment/index.js +109 -6
  98. package/segment/types.d.ts +4 -0
  99. package/segment/utils.d.ts +5 -0
  100. package/segment/utils.js +6 -0
  101. package/select/index.js +1 -1
  102. package/spinner/types.d.ts +1 -2
  103. package/spinner/utils.d.ts +2 -1
  104. package/table-cell/types.d.ts +4 -5
  105. package/table-cell/utils.d.ts +2 -1
  106. package/table-head-cell/types.d.ts +4 -4
  107. package/tag/index.js +1 -1
  108. package/tag/types.d.ts +1 -2
  109. package/tag/utils.d.ts +2 -1
  110. package/text/index.js +0 -1
  111. package/text/types.d.ts +1 -2
  112. package/text/utils.d.ts +1 -1
  113. package/textarea/index.js +1 -1
  114. package/theme.css +17 -0
  115. package/title/index.js +0 -2
  116. package/title/types.d.ts +2 -3
  117. package/title/utils.d.ts +4 -3
  118. package/title/utils.js +21 -0
  119. package/toggle/index.js +1 -1
  120. package/tooltip/index.js +1 -1
  121. package/tooltip/types.d.ts +1 -2
  122. package/tooltip/utils.d.ts +2 -1
  123. package/utils.d.ts +4 -0
  124. package/utils.js +35 -4
package/dialog/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 _$dialog, _$closeButton, _$caption, _isConnected, _onCancel, _onCloseClick, _onBackdropClick, _onCloseReactHandler, _dispatchCloseEvent, _setOpen;
4
+ var _$dialog, _$closeButton, _$caption, _isConnected, _prevOverflowValue, _onCancel, _onCloseClick, _onBackdropClick, _onCloseReactHandler, _dispatchCloseEvent, _setOpen;
5
5
 
6
6
  function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
7
7
 
@@ -15,10 +15,10 @@ import dialogPolyfill from 'dialog-polyfill';
15
15
  import '../icon-button';
16
16
  import '../icons/close';
17
17
  import { defineCustomElement, getAttribute, getBooleanAttribute, getRect, isAttrTrue, updateAttribute, getReactEventHandler, NectaryElement } from '../utils';
18
- const templateHTML = '<style>dialog{position:absolute;left:0;right:0;margin:auto;display:flex;flex-direction:column;padding:24px;max-width:512px;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)}dialog:not([open]){display:none}dialog+.backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background-color:#000;opacity:.55}dialog::backdrop{background-color:#000;opacity:.55}._dialog_overlay{position:fixed;top:0;right:0;bottom:0;left:0}dialog.fixed{position:fixed;top:50%;transform:translate(0,-50%)}#header{display:flex;flex-direction:row;justify-content:space-between;align-items:flex-start;margin-bottom:16px}#caption{font:var(--sinch-font-title-m);color:var(--sinch-color-text-default);white-space:nowrap;text-overflow:ellipsis;overflow:hidden}#content-wrapper{min-height:0;overflow:auto;max-height:var(--sinch-dialog-max-height,50vh)}#buttons{display:flex;flex-direction:row;justify-content:flex-end;gap:16px;margin-top:24px}sinch-icon-button{transform:translate(4px,-4px)}</style><dialog><div id="header"><span id="caption"></span><sinch-icon-button id="close" small tabindex="0"><sinch-icon-close slot="icon"></sinch-icon-close></sinch-icon-button></div><div id="content-wrapper"><slot name="content"></slot></div><div id="buttons"><slot name="buttons"></slot></div></dialog>';
18
+ const templateHTML = '<style>dialog{position:fixed;left:0;right:0;margin:auto;display:flex;flex-direction:column;padding:24px;max-width:var(--sinch-dialog-max-width,512px);max-height:unset;border-radius:var(--sinch-shape-radius-l);box-sizing:border-box;contain:content;background-color:var(--sinch-color-snow-100);color:var(--sinch-color-text-default);font:var(--sinch-font-body);border:none;box-shadow:var(--sinch-elevation-level-3)}dialog:not([open]){display:none}dialog+.backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background-color:#000;opacity:.55}dialog::backdrop{background-color:#000;opacity:.55}._dialog_overlay{position:fixed;top:0;right:0;bottom:0;left:0}dialog.fixed{position:fixed;top:50%;transform:translate(0,-50%)}#header{display:flex;flex-direction:row;justify-content:space-between;align-items:flex-start;margin-bottom:16px}#caption{font:var(--sinch-font-title-m);color:var(--sinch-color-text-default);white-space:nowrap;text-overflow:ellipsis;overflow:hidden}#content-wrapper{min-height:0;overflow:auto;max-height:var(--sinch-dialog-max-height,50vh)}#buttons{display:flex;flex-direction:row;justify-content:flex-end;gap:16px;margin-top:24px}sinch-icon-button{transform:translate(4px,-4px)}</style><dialog><div id="header"><span id="caption"></span><sinch-icon-button id="close" small tabindex="0"><sinch-icon-close slot="icon"></sinch-icon-close></sinch-icon-button></div><div id="content-wrapper"><slot name="content"></slot></div><div id="buttons"><slot name="buttons"></slot></div></dialog>';
19
19
  const template = document.createElement('template');
20
20
  template.innerHTML = templateHTML;
21
- defineCustomElement('sinch-dialog', (_$dialog = new WeakMap(), _$closeButton = new WeakMap(), _$caption = new WeakMap(), _isConnected = new WeakMap(), _onCancel = new WeakMap(), _onCloseClick = new WeakMap(), _onBackdropClick = new WeakMap(), _onCloseReactHandler = new WeakMap(), _dispatchCloseEvent = new WeakSet(), _setOpen = new WeakSet(), class extends NectaryElement {
21
+ defineCustomElement('sinch-dialog', (_$dialog = new WeakMap(), _$closeButton = new WeakMap(), _$caption = new WeakMap(), _isConnected = new WeakMap(), _prevOverflowValue = new WeakMap(), _onCancel = new WeakMap(), _onCloseClick = new WeakMap(), _onBackdropClick = new WeakMap(), _onCloseReactHandler = new WeakMap(), _dispatchCloseEvent = new WeakSet(), _setOpen = new WeakSet(), class extends NectaryElement {
22
22
  constructor() {
23
23
  super();
24
24
 
@@ -46,6 +46,11 @@ defineCustomElement('sinch-dialog', (_$dialog = new WeakMap(), _$closeButton = n
46
46
  value: false
47
47
  });
48
48
 
49
+ _classPrivateFieldInitSpec(this, _prevOverflowValue, {
50
+ writable: true,
51
+ value: ''
52
+ });
53
+
49
54
  _classPrivateFieldInitSpec(this, _onCancel, {
50
55
  writable: true,
51
56
  value: e => {
@@ -67,10 +72,16 @@ defineCustomElement('sinch-dialog', (_$dialog = new WeakMap(), _$closeButton = n
67
72
  _classPrivateFieldInitSpec(this, _onBackdropClick, {
68
73
  writable: true,
69
74
  value: e => {
75
+ if (e.target !== _classPrivateFieldGet(this, _$dialog)) {
76
+ return;
77
+ }
78
+
70
79
  const rect = this.dialogRect;
71
80
  const isInside = e.x >= rect.x && e.x < rect.x + rect.width && e.y >= rect.y && e.y < rect.y + rect.height;
72
81
 
73
82
  if (!isInside) {
83
+ e.stopPropagation();
84
+
74
85
  _classPrivateMethodGet(this, _dispatchCloseEvent, _dispatchCloseEvent2).call(this);
75
86
  }
76
87
  }
@@ -132,7 +143,8 @@ defineCustomElement('sinch-dialog', (_$dialog = new WeakMap(), _$closeButton = n
132
143
  _classPrivateFieldGet(this, _$closeButton).addEventListener('click', _classPrivateFieldGet(this, _onCloseClick));
133
144
 
134
145
  this.addEventListener('close', _classPrivateFieldGet(this, _onCloseReactHandler));
135
- this.addEventListener('click', _classPrivateFieldGet(this, _onBackdropClick));
146
+
147
+ _classPrivateFieldGet(this, _$dialog).addEventListener('click', _classPrivateFieldGet(this, _onBackdropClick));
136
148
 
137
149
  _classPrivateFieldGet(this, _$dialog).addEventListener('cancel', _classPrivateFieldGet(this, _onCancel));
138
150
 
@@ -147,7 +159,8 @@ defineCustomElement('sinch-dialog', (_$dialog = new WeakMap(), _$closeButton = n
147
159
  _classPrivateFieldGet(this, _$closeButton).removeEventListener('click', _classPrivateFieldGet(this, _onCloseClick));
148
160
 
149
161
  this.removeEventListener('close', _classPrivateFieldGet(this, _onCloseReactHandler));
150
- this.removeEventListener('click', _classPrivateFieldGet(this, _onBackdropClick));
162
+
163
+ _classPrivateFieldGet(this, _$dialog).removeEventListener('click', _classPrivateFieldGet(this, _onBackdropClick));
151
164
 
152
165
  _classPrivateFieldGet(this, _$dialog).removeEventListener('cancel', _classPrivateFieldGet(this, _onCancel));
153
166
 
@@ -174,8 +187,13 @@ function _setOpen2(isOpen) {
174
187
  if (isOpen) {
175
188
  if (!getBooleanAttribute(_classPrivateFieldGet(this, _$dialog), 'open')) {
176
189
  _classPrivateFieldGet(this, _$dialog).showModal();
190
+
191
+ _classPrivateFieldSet(this, _prevOverflowValue, document.body.style.overflow);
192
+
193
+ document.body.style.overflow = 'hidden';
177
194
  }
178
195
  } else {
179
196
  _classPrivateFieldGet(this, _$dialog).close?.();
197
+ document.body.style.overflow = _classPrivateFieldGet(this, _prevOverflowValue);
180
198
  }
181
199
  }
package/dropdown/index.js CHANGED
@@ -325,7 +325,7 @@ function _getPrevOption2() {
325
325
  function _selectOption2($option) {
326
326
  for (const $op of _classPrivateMethodGet(this, _getOptionElements, _getOptionElements2).call(this)) {
327
327
  const isSelected = $op === $option;
328
- $op.selected = isSelected;
328
+ updateBooleanAttribute($op, 'data-selected', isSelected);
329
329
 
330
330
  if (isSelected && this.maxVisibleItems !== null) {
331
331
  $op.scrollIntoView?.({
@@ -361,7 +361,7 @@ function _getOptionElements2() {
361
361
 
362
362
  function _findSelectedOption2(elements) {
363
363
  for (const el of elements) {
364
- if (el.selected) {
364
+ if (getBooleanAttribute(el, 'data-selected')) {
365
365
  return el;
366
366
  }
367
367
  }
@@ -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{display:block}#wrapper{display:flex;position:relative;box-sizing:border-box;height:40px;padding:4px 12px 4px 6px;align-items:center;gap:6px;user-select:none;cursor:pointer}#text{flex-shrink:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}#icon-container{position:relative;width:32px;height:32px}#icon-container::before{content:"";position:absolute;top:7px;left:7px;width:18px;height:18px;border-radius:2px;pointer-events:none;background-color:var(--sinch-color-snow-100);box-shadow:0 0 0 2px var(--sinch-color-stormy-300) inset;transition:background-color .1s linear}#icon-checkmark{position:absolute;left:9px;top:10px;transition:opacity .1s linear;opacity:0;pointer-events:none;fill:var(--sinch-color-snow-100)}:host([checked]:not([checked=false])) #icon-container::before{background-color:var(--sinch-color-tropical-500);box-shadow:0 0 0 2px var(--sinch-color-tropical-500) inset}:host([checked]:not([checked=false])) #icon-checkmark{opacity:1}:host(:hover)>#wrapper,:host([data-selected])>#wrapper{background-color:var(--sinch-color-snow-500)}:host([disabled]:not([disabled=false]))>#wrapper{color:var(--sinch-color-stormy-100);cursor:initial}:host([disabled]:not([disabled=false])) #icon-container::before{box-shadow:0 0 0 2px var(--sinch-color-stormy-100) inset}@media (prefers-reduced-motion){#icon-checkmark,#icon-container::before{transition:none}}</style><div id="wrapper"><div id="icon-container"><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"/></svg></div><span id="text"></span></div>';
11
+ const templateHTML = '<style>:host{display:block}#wrapper{display:flex;position:relative;box-sizing:border-box;height:40px;padding:4px 10px 4px 6px;align-items:center;gap:6px;user-select:none;cursor:pointer}#text{flex-shrink:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}#icon-container{position:relative;width:32px;height:32px}#icon-container::before{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-snow-100);border:2px solid var(--sinch-color-stormy-300);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;fill:var(--sinch-color-snow-100)}:host([checked]:not([checked=false])) #icon-container::before{background-color:var(--sinch-color-tropical-500);border-color:var(--sinch-color-tropical-500)}:host([checked]:not([checked=false])) #icon-checkmark{opacity:1}:host(:hover)>#wrapper,:host([data-selected])>#wrapper{background-color:var(--sinch-color-snow-500)}:host([disabled]:not([disabled=false]))>#wrapper{color:var(--sinch-color-stormy-100);cursor:initial}:host([disabled]:not([disabled=false])) #icon-container::before{border-color:var(--sinch-color-stormy-100)}@media (prefers-reduced-motion){#icon-checkmark,#icon-container::before{transition:none}}</style><div id="wrapper"><div id="icon-container"><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"/></svg></div><span id="text"></span></div>';
12
12
  const template = document.createElement('template');
13
13
  template.innerHTML = templateHTML;
14
14
  defineCustomElement('sinch-dropdown-checkbox-option', (_$text = new WeakMap(), class extends NectaryElement {
@@ -85,12 +85,4 @@ defineCustomElement('sinch-dropdown-checkbox-option', (_$text = new WeakMap(), c
85
85
  return getBooleanAttribute(this, 'checked');
86
86
  }
87
87
 
88
- set selected(isSelected) {
89
- updateBooleanAttribute(this, 'data-selected', isSelected);
90
- }
91
-
92
- get selected() {
93
- return getBooleanAttribute(this, 'data-selected');
94
- }
95
-
96
88
  }));
@@ -3,7 +3,6 @@ export declare type TSinchDropdownCheckboxOptionElement = HTMLElement & {
3
3
  value: string;
4
4
  text: string;
5
5
  checked: boolean;
6
- selected: boolean;
7
6
  disabled: boolean;
8
7
  setAttribute(name: 'value', value: string): void;
9
8
  setAttribute(name: 'text', value: string): void;
@@ -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{display:block}#wrapper{display:flex;position:relative;box-sizing:border-box;height:40px;padding:4px 12px 4px 6px;align-items:center;gap:6px;user-select:none;cursor:pointer}#text{flex-shrink:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}#icon-container{position:relative;width:32px;height:32px}#icon-container::before{content:"";position:absolute;top:6px;left:6px;width:20px;height:20px;border-radius:50%;pointer-events:none;background-color:var(--sinch-color-snow-100);box-shadow:0 0 0 2px var(--sinch-color-stormy-300) 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-tropical-500);pointer-events:none}:host([checked]:not([checked=false])) #icon-container::before{box-shadow:0 0 0 2px var(--sinch-color-tropical-500) inset}:host([checked]:not([checked=false])) #icon-knob{opacity:1}:host(:hover)>#wrapper,:host([data-selected])>#wrapper{background-color:var(--sinch-color-snow-500)}:host([disabled]:not([disabled=false]))>#wrapper{color:var(--sinch-color-stormy-100);cursor:initial}:host([disabled]:not([disabled=false])) #icon-container::before{box-shadow:0 0 0 2px var(--sinch-color-stormy-100) inset}@media (prefers-reduced-motion){#icon-container::before,#icon-knob{transition:none}}</style><div id="wrapper"><div id="icon-container"><div id="icon-knob"></div></div><span id="text"></span></div>';
11
+ const templateHTML = '<style>:host{display:block}#wrapper{display:flex;position:relative;box-sizing:border-box;height:40px;padding:4px 10px 4px 6px;align-items:center;gap:6px;user-select:none;cursor:pointer}#text{flex-shrink:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}#icon-container{position:relative;width:32px;height:32px}#icon-container::before{content:"";position:absolute;top:6px;left:6px;width:20px;height:20px;border-radius:50%;pointer-events:none;background-color:var(--sinch-color-snow-100);border:2px solid var(--sinch-color-stormy-300);transition:background-color .1s linear;box-sizing:border-box}#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-tropical-500);pointer-events:none}:host([checked]:not([checked=false])) #icon-container::before{border-color:var(--sinch-color-tropical-500)}:host([checked]:not([checked=false])) #icon-knob{opacity:1}:host(:hover)>#wrapper,:host([data-selected])>#wrapper{background-color:var(--sinch-color-snow-500)}:host([disabled]:not([disabled=false]))>#wrapper{color:var(--sinch-color-stormy-100);cursor:initial}:host([disabled]:not([disabled=false])) #icon-container::before{border-color:var(--sinch-color-stormy-100)}@media (prefers-reduced-motion){#icon-container::before,#icon-knob{transition:none}}</style><div id="wrapper"><div id="icon-container"><div id="icon-knob"></div></div><span id="text"></span></div>';
12
12
  const template = document.createElement('template');
13
13
  template.innerHTML = templateHTML;
14
14
  defineCustomElement('sinch-dropdown-radio-option', (_$text = new WeakMap(), class extends NectaryElement {
@@ -85,12 +85,4 @@ defineCustomElement('sinch-dropdown-radio-option', (_$text = new WeakMap(), clas
85
85
  return getBooleanAttribute(this, 'checked');
86
86
  }
87
87
 
88
- set selected(isSelected) {
89
- updateBooleanAttribute(this, 'data-selected', isSelected);
90
- }
91
-
92
- get selected() {
93
- return getBooleanAttribute(this, 'data-selected');
94
- }
95
-
96
88
  }));
@@ -3,7 +3,6 @@ export declare type TSinchDropdownRadioOptionElement = HTMLElement & {
3
3
  value: string;
4
4
  text: string;
5
5
  checked: boolean;
6
- selected: boolean;
7
6
  disabled: boolean;
8
7
  setAttribute(name: 'value', value: string): void;
9
8
  setAttribute(name: 'text', value: string): void;
@@ -1,3 +1,4 @@
1
+ import '../icons/check';
1
2
  import { NectaryElement } from '../utils';
2
3
  import type { TSinchDropdownTextOptionElement, TSinchDropdownTextOptionReact } from './types';
3
4
  export declare class DropdownTextOption extends NectaryElement {
@@ -14,8 +15,6 @@ export declare class DropdownTextOption extends NectaryElement {
14
15
  get disabled(): boolean;
15
16
  set checked(isChecked: boolean);
16
17
  get checked(): boolean;
17
- set selected(isSelected: boolean);
18
- get selected(): boolean;
19
18
  get icon(): Element | null;
20
19
  }
21
20
  declare global {
@@ -5,8 +5,9 @@ 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 '../icons/check';
8
9
  import { defineCustomElement, getAttribute, getBooleanAttribute, isAttrTrue, NectaryElement, updateAttribute, updateBooleanAttribute, updateExplicitBooleanAttribute } from '../utils';
9
- const templateHTML = '<style>:host{display:block}#wrapper{display:flex;position:relative;box-sizing:border-box;height:40px;padding:6px 12px;align-items:center;gap:12px;user-select:none;cursor:pointer;--sinch-size-icon:24px}#content{flex-shrink:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host(:hover)>#wrapper,:host([data-selected])>#wrapper{background-color:var(--sinch-color-snow-500)}:host([checked])>#wrapper{padding-right:36px}:host([checked])>#wrapper::after{content:"";position:absolute;top:12px;right:11px;width:18px;height:14px;background-image:url("data:image/svg+xml,%3Csvg xmlns=\'http://www.w3.org/2000/svg\'%3E%3Cpath d=\'M6 11.17 1.83 7 .41 8.41 6 14 18 2 16.59.59 6 11.17Z\' fill=\'%230A273D\'/%3E%3C/svg%3E");background-size:cover;background-repeat:no-repeat}:host([disabled]:not([disabled=false]))>#wrapper{color:var(--sinch-color-stormy-100);cursor:initial;--sinch-color-icon:var(--sinch-color-stormy-100)}</style><div id="wrapper"><slot name="icon"></slot><span id="content"></span></div>';
10
+ const templateHTML = '<style>:host{display:block}#wrapper{display:flex;position:relative;box-sizing:border-box;height:40px;padding:8px 16px;align-items:center;gap:10px;user-select:none;cursor:pointer;--sinch-size-icon:24px}#content{flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host(:hover)>#wrapper,:host([data-selected])>#wrapper{background-color:var(--sinch-color-snow-500)}#check{display:none;margin-right:-6px}:host([checked]:not([checked=false])) #check{display:block}:host([disabled]:not([disabled=false]))>#wrapper{color:var(--sinch-color-stormy-100);cursor:initial;--sinch-color-icon:var(--sinch-color-stormy-100)}::slotted(*){margin-left:-6px}</style><div id="wrapper"><slot name="icon"></slot><span id="content"></span><sinch-icon-check id="check"></sinch-icon-check></div>';
10
11
  const template = document.createElement('template');
11
12
  template.innerHTML = templateHTML;
12
13
 
@@ -95,14 +96,6 @@ export class DropdownTextOption extends NectaryElement {
95
96
  return getBooleanAttribute(this, 'checked');
96
97
  }
97
98
 
98
- set selected(isSelected) {
99
- updateBooleanAttribute(this, 'data-selected', isSelected);
100
- }
101
-
102
- get selected() {
103
- return getBooleanAttribute(this, 'data-selected');
104
- }
105
-
106
99
  get icon() {
107
100
  return _classPrivateFieldGet(this, _$iconSlot).assignedElements()[0] ?? null;
108
101
  }
@@ -3,7 +3,6 @@ export declare type TSinchDropdownTextOptionElement = HTMLElement & {
3
3
  value: string;
4
4
  text: string;
5
5
  checked: boolean;
6
- selected: boolean;
7
6
  disabled: boolean;
8
7
  readonly icon: Element | null;
9
8
  setAttribute(name: 'value', value: string): void;
@@ -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, isAttrTrue, NectaryElement, updateBooleanAttribute } from '../utils';
11
- const templateHTML = '<style>:host{display:inline-block;vertical-align:middle;outline:0}button{all:initial;display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:48px;height:48px;border-radius:4px;background-color:transparent;box-shadow:0 0 0 1px transparent inset;cursor:pointer;--sinch-size-icon:24px;--sinch-color-icon:var(--sinch-icon-button-color, var(--sinch-color-stormy-500))}button:focus{box-shadow:0 0 0 1px var(--sinch-color-stormy-500) inset}button:hover{background-color:var(--sinch-color-snow-500)}button:active{background-color:var(--sinch-color-snow-600)}button:disabled{background-color:transparent;cursor:initial;--sinch-color-spinner-bg:var(--sinch-color-snow-200);--sinch-color-spinner-fg:var(--sinch-color-stormy-200);--sinch-color-icon:var(--sinch-color-stormy-100)}:host([small]:not([small=false]))>button{width:32px;height:32px}button>*{pointer-events:none}</style><button><slot name="icon"></slot></button>';
11
+ const templateHTML = '<style>:host{display:inline-block;vertical-align:middle;outline:0}button{all:initial;display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:48px;height:48px;border-radius:var(--sinch-shape-radius-s);border:1px solid transparent;background-color:transparent;cursor:pointer;--sinch-size-icon:24px;--sinch-color-icon:var(--sinch-icon-button-color, var(--sinch-color-stormy-500))}button:focus{border-color:var(--sinch-color-stormy-500)}button:hover{background-color:var(--sinch-color-snow-500)}button:active{background-color:var(--sinch-color-snow-600)}button:disabled{background-color:transparent;cursor:initial;--sinch-color-spinner-bg:var(--sinch-color-snow-200);--sinch-color-spinner-fg:var(--sinch-color-stormy-200);--sinch-color-icon:var(--sinch-color-stormy-100)}:host([small]:not([small=false]))>button{width:32px;height:32px}button>*{pointer-events:none}</style><button><slot name="icon"></slot></button>';
12
12
  const template = document.createElement('template');
13
13
  template.innerHTML = templateHTML;
14
14
  defineCustomElement('sinch-icon-button', (_$button = new WeakMap(), class extends NectaryElement {
@@ -1,307 +1 @@
1
- export declare const createIconClass: (templateHTML: string) => {
2
- new (): {
3
- $svg: SVGElement;
4
- connectedCallback(): void;
5
- attachShadow(options?: Partial<ShadowRootInit> | undefined): ShadowRoot;
6
- accessKey: string;
7
- readonly accessKeyLabel: string;
8
- autocapitalize: string;
9
- dir: string;
10
- draggable: boolean;
11
- hidden: boolean;
12
- innerText: string;
13
- lang: string;
14
- readonly offsetHeight: number;
15
- readonly offsetLeft: number;
16
- readonly offsetParent: Element | null;
17
- readonly offsetTop: number;
18
- readonly offsetWidth: number;
19
- outerText: string;
20
- spellcheck: boolean;
21
- title: string;
22
- translate: boolean;
23
- attachInternals(): ElementInternals;
24
- click(): void;
25
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions | undefined): void;
26
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions | undefined): void;
27
- removeEventListener<K_1 extends keyof HTMLElementEventMap>(type: K_1, listener: (this: HTMLElement, ev: HTMLElementEventMap[K_1]) => any, options?: boolean | EventListenerOptions | undefined): void;
28
- removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions | undefined): void;
29
- readonly attributes: NamedNodeMap;
30
- readonly classList: DOMTokenList;
31
- className: string;
32
- readonly clientHeight: number;
33
- readonly clientLeft: number;
34
- readonly clientTop: number;
35
- readonly clientWidth: number;
36
- id: string;
37
- readonly localName: string;
38
- readonly namespaceURI: string | null;
39
- onfullscreenchange: ((this: Element, ev: Event) => any) | null;
40
- onfullscreenerror: ((this: Element, ev: Event) => any) | null;
41
- outerHTML: string;
42
- readonly ownerDocument: Document;
43
- readonly part: DOMTokenList;
44
- readonly prefix: string | null;
45
- readonly scrollHeight: number;
46
- scrollLeft: number;
47
- scrollTop: number;
48
- readonly scrollWidth: number;
49
- readonly shadowRoot: ShadowRoot | null;
50
- slot: string;
51
- readonly tagName: string;
52
- closest<K_2 extends keyof HTMLElementTagNameMap>(selector: K_2): HTMLElementTagNameMap[K_2] | null;
53
- closest<K_3 extends keyof SVGElementTagNameMap>(selector: K_3): SVGElementTagNameMap[K_3] | null;
54
- closest<E extends Element = Element>(selectors: string): E | null;
55
- getAttribute(qualifiedName: string): string | null;
56
- getAttributeNS(namespace: string | null, localName: string): string | null;
57
- getAttributeNames(): string[];
58
- getAttributeNode(qualifiedName: string): Attr | null;
59
- getAttributeNodeNS(namespace: string | null, localName: string): Attr | null;
60
- getBoundingClientRect(): DOMRect;
61
- getClientRects(): DOMRectList;
62
- getElementsByClassName(classNames: string): HTMLCollectionOf<Element>;
63
- getElementsByTagName<K_4 extends keyof HTMLElementTagNameMap>(qualifiedName: K_4): HTMLCollectionOf<HTMLElementTagNameMap[K_4]>;
64
- getElementsByTagName<K_5 extends keyof SVGElementTagNameMap>(qualifiedName: K_5): HTMLCollectionOf<SVGElementTagNameMap[K_5]>;
65
- getElementsByTagName(qualifiedName: string): HTMLCollectionOf<Element>;
66
- getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf<HTMLElement>;
67
- getElementsByTagNameNS(namespaceURI: "http://www.w3.org/2000/svg", localName: string): HTMLCollectionOf<SVGElement>;
68
- getElementsByTagNameNS(namespace: string | null, localName: string): HTMLCollectionOf<Element>;
69
- hasAttribute(qualifiedName: string): boolean;
70
- hasAttributeNS(namespace: string | null, localName: string): boolean;
71
- hasAttributes(): boolean;
72
- hasPointerCapture(pointerId: number): boolean;
73
- insertAdjacentElement(where: InsertPosition, element: Element): Element | null;
74
- insertAdjacentHTML(position: InsertPosition, text: string): void;
75
- insertAdjacentText(where: InsertPosition, data: string): void;
76
- matches(selectors: string): boolean;
77
- releasePointerCapture(pointerId: number): void;
78
- removeAttribute(qualifiedName: string): void;
79
- removeAttributeNS(namespace: string | null, localName: string): void;
80
- removeAttributeNode(attr: Attr): Attr;
81
- requestFullscreen(options?: FullscreenOptions | undefined): Promise<void>;
82
- requestPointerLock(): void;
83
- scroll(options?: ScrollToOptions | undefined): void;
84
- scroll(x: number, y: number): void;
85
- scrollBy(options?: ScrollToOptions | undefined): void;
86
- scrollBy(x: number, y: number): void;
87
- scrollIntoView(arg?: boolean | ScrollIntoViewOptions | undefined): void;
88
- scrollTo(options?: ScrollToOptions | undefined): void;
89
- scrollTo(x: number, y: number): void;
90
- setAttribute(qualifiedName: string, value: string): void;
91
- setAttributeNS(namespace: string | null, qualifiedName: string, value: string): void;
92
- setAttributeNode(attr: Attr): Attr | null;
93
- setAttributeNodeNS(attr: Attr): Attr | null;
94
- setPointerCapture(pointerId: number): void;
95
- toggleAttribute(qualifiedName: string, force?: boolean | undefined): boolean;
96
- webkitMatchesSelector(selectors: string): boolean;
97
- readonly baseURI: string;
98
- readonly childNodes: NodeListOf<ChildNode>;
99
- readonly firstChild: ChildNode | null;
100
- readonly isConnected: boolean;
101
- readonly lastChild: ChildNode | null;
102
- readonly nextSibling: ChildNode | null;
103
- readonly nodeName: string;
104
- readonly nodeType: number;
105
- nodeValue: string | null;
106
- readonly parentElement: HTMLElement | null;
107
- readonly parentNode: ParentNode | null;
108
- readonly previousSibling: ChildNode | null;
109
- textContent: string | null;
110
- appendChild<T extends Node>(node: T): T;
111
- cloneNode(deep?: boolean | undefined): Node;
112
- compareDocumentPosition(other: Node): number;
113
- contains(other: Node | null): boolean;
114
- getRootNode(options?: GetRootNodeOptions | undefined): Node;
115
- hasChildNodes(): boolean;
116
- insertBefore<T_1 extends Node>(node: T_1, child: Node | null): T_1;
117
- isDefaultNamespace(namespace: string | null): boolean;
118
- isEqualNode(otherNode: Node | null): boolean;
119
- isSameNode(otherNode: Node | null): boolean;
120
- lookupNamespaceURI(prefix: string | null): string | null;
121
- lookupPrefix(namespace: string | null): string | null;
122
- normalize(): void;
123
- removeChild<T_2 extends Node>(child: T_2): T_2;
124
- replaceChild<T_3 extends Node>(node: Node, child: T_3): T_3;
125
- readonly ATTRIBUTE_NODE: number;
126
- readonly CDATA_SECTION_NODE: number;
127
- readonly COMMENT_NODE: number;
128
- readonly DOCUMENT_FRAGMENT_NODE: number;
129
- readonly DOCUMENT_NODE: number;
130
- readonly DOCUMENT_POSITION_CONTAINED_BY: number;
131
- readonly DOCUMENT_POSITION_CONTAINS: number;
132
- readonly DOCUMENT_POSITION_DISCONNECTED: number;
133
- readonly DOCUMENT_POSITION_FOLLOWING: number;
134
- readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: number;
135
- readonly DOCUMENT_POSITION_PRECEDING: number;
136
- readonly DOCUMENT_TYPE_NODE: number;
137
- readonly ELEMENT_NODE: number;
138
- readonly ENTITY_NODE: number;
139
- readonly ENTITY_REFERENCE_NODE: number;
140
- readonly NOTATION_NODE: number;
141
- readonly PROCESSING_INSTRUCTION_NODE: number;
142
- readonly TEXT_NODE: number;
143
- dispatchEvent(event: Event): boolean;
144
- ariaAtomic: string | null;
145
- ariaAutoComplete: string | null;
146
- ariaBusy: string | null;
147
- ariaChecked: string | null;
148
- ariaColCount: string | null;
149
- ariaColIndex: string | null;
150
- ariaColSpan: string | null;
151
- ariaCurrent: string | null;
152
- ariaDisabled: string | null;
153
- ariaExpanded: string | null;
154
- ariaHasPopup: string | null;
155
- ariaHidden: string | null;
156
- ariaKeyShortcuts: string | null;
157
- ariaLabel: string | null;
158
- ariaLevel: string | null;
159
- ariaLive: string | null;
160
- ariaModal: string | null;
161
- ariaMultiLine: string | null;
162
- ariaMultiSelectable: string | null;
163
- ariaOrientation: string | null;
164
- ariaPlaceholder: string | null;
165
- ariaPosInSet: string | null;
166
- ariaPressed: string | null;
167
- ariaReadOnly: string | null;
168
- ariaRequired: string | null;
169
- ariaRoleDescription: string | null;
170
- ariaRowCount: string | null;
171
- ariaRowIndex: string | null;
172
- ariaRowSpan: string | null;
173
- ariaSelected: string | null;
174
- ariaSetSize: string | null;
175
- ariaSort: string | null;
176
- ariaValueMax: string | null;
177
- ariaValueMin: string | null;
178
- ariaValueNow: string | null;
179
- ariaValueText: string | null;
180
- animate(keyframes: Keyframe[] | PropertyIndexedKeyframes | null, options?: number | KeyframeAnimationOptions | undefined): Animation;
181
- getAnimations(options?: GetAnimationsOptions | undefined): Animation[];
182
- after(...nodes: (string | Node)[]): void;
183
- before(...nodes: (string | Node)[]): void;
184
- remove(): void;
185
- replaceWith(...nodes: (string | Node)[]): void;
186
- innerHTML: string;
187
- readonly nextElementSibling: Element | null;
188
- readonly previousElementSibling: Element | null;
189
- readonly childElementCount: number;
190
- readonly children: HTMLCollection;
191
- readonly firstElementChild: Element | null;
192
- readonly lastElementChild: Element | null;
193
- append(...nodes: (string | Node)[]): void;
194
- prepend(...nodes: (string | Node)[]): void;
195
- querySelector<K_6 extends keyof HTMLElementTagNameMap>(selectors: K_6): HTMLElementTagNameMap[K_6] | null;
196
- querySelector<K_7 extends keyof SVGElementTagNameMap>(selectors: K_7): SVGElementTagNameMap[K_7] | null;
197
- querySelector<E_1 extends Element = Element>(selectors: string): E_1 | null;
198
- querySelectorAll<K_8 extends keyof HTMLElementTagNameMap>(selectors: K_8): NodeListOf<HTMLElementTagNameMap[K_8]>;
199
- querySelectorAll<K_9 extends keyof SVGElementTagNameMap>(selectors: K_9): NodeListOf<SVGElementTagNameMap[K_9]>;
200
- querySelectorAll<E_2 extends Element = Element>(selectors: string): NodeListOf<E_2>;
201
- replaceChildren(...nodes: (string | Node)[]): void;
202
- readonly assignedSlot: HTMLSlotElement | null;
203
- oncopy: ((this: DocumentAndElementEventHandlers, ev: ClipboardEvent) => any) | null;
204
- oncut: ((this: DocumentAndElementEventHandlers, ev: ClipboardEvent) => any) | null;
205
- onpaste: ((this: DocumentAndElementEventHandlers, ev: ClipboardEvent) => any) | null;
206
- readonly style: CSSStyleDeclaration;
207
- contentEditable: string;
208
- enterKeyHint: string;
209
- inputMode: string;
210
- readonly isContentEditable: boolean;
211
- onabort: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;
212
- onanimationcancel: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
213
- onanimationend: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
214
- onanimationiteration: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
215
- onanimationstart: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
216
- onauxclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
217
- onblur: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
218
- oncanplay: ((this: GlobalEventHandlers, ev: Event) => any) | null;
219
- oncanplaythrough: ((this: GlobalEventHandlers, ev: Event) => any) | null;
220
- onchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
221
- onclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
222
- onclose: ((this: GlobalEventHandlers, ev: Event) => any) | null;
223
- oncontextmenu: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
224
- oncuechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
225
- ondblclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
226
- ondrag: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
227
- ondragend: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
228
- ondragenter: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
229
- ondragleave: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
230
- ondragover: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
231
- ondragstart: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
232
- ondrop: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
233
- ondurationchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
234
- onemptied: ((this: GlobalEventHandlers, ev: Event) => any) | null;
235
- onended: ((this: GlobalEventHandlers, ev: Event) => any) | null;
236
- onerror: OnErrorEventHandler;
237
- onfocus: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
238
- onformdata: ((this: GlobalEventHandlers, ev: FormDataEvent) => any) | null;
239
- ongotpointercapture: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
240
- oninput: ((this: GlobalEventHandlers, ev: Event) => any) | null;
241
- oninvalid: ((this: GlobalEventHandlers, ev: Event) => any) | null;
242
- onkeydown: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
243
- onkeypress: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
244
- onkeyup: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
245
- onload: ((this: GlobalEventHandlers, ev: Event) => any) | null;
246
- onloadeddata: ((this: GlobalEventHandlers, ev: Event) => any) | null;
247
- onloadedmetadata: ((this: GlobalEventHandlers, ev: Event) => any) | null;
248
- onloadstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
249
- onlostpointercapture: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
250
- onmousedown: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
251
- onmouseenter: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
252
- onmouseleave: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
253
- onmousemove: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
254
- onmouseout: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
255
- onmouseover: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
256
- onmouseup: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
257
- onpause: ((this: GlobalEventHandlers, ev: Event) => any) | null;
258
- onplay: ((this: GlobalEventHandlers, ev: Event) => any) | null;
259
- onplaying: ((this: GlobalEventHandlers, ev: Event) => any) | null;
260
- onpointercancel: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
261
- onpointerdown: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
262
- onpointerenter: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
263
- onpointerleave: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
264
- onpointermove: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
265
- onpointerout: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
266
- onpointerover: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
267
- onpointerup: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
268
- onprogress: ((this: GlobalEventHandlers, ev: ProgressEvent<EventTarget>) => any) | null;
269
- onratechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
270
- onreset: ((this: GlobalEventHandlers, ev: Event) => any) | null;
271
- onresize: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;
272
- onscroll: ((this: GlobalEventHandlers, ev: Event) => any) | null;
273
- onsecuritypolicyviolation: ((this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any) | null;
274
- onseeked: ((this: GlobalEventHandlers, ev: Event) => any) | null;
275
- onseeking: ((this: GlobalEventHandlers, ev: Event) => any) | null;
276
- onselect: ((this: GlobalEventHandlers, ev: Event) => any) | null;
277
- onselectionchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
278
- onselectstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
279
- onslotchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
280
- onstalled: ((this: GlobalEventHandlers, ev: Event) => any) | null;
281
- onsubmit: ((this: GlobalEventHandlers, ev: SubmitEvent) => any) | null;
282
- onsuspend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
283
- ontimeupdate: ((this: GlobalEventHandlers, ev: Event) => any) | null;
284
- ontoggle: ((this: GlobalEventHandlers, ev: Event) => any) | null;
285
- ontouchcancel?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
286
- ontouchend?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
287
- ontouchmove?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
288
- ontouchstart?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
289
- ontransitioncancel: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
290
- ontransitionend: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
291
- ontransitionrun: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
292
- ontransitionstart: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
293
- onvolumechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
294
- onwaiting: ((this: GlobalEventHandlers, ev: Event) => any) | null;
295
- onwebkitanimationend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
296
- onwebkitanimationiteration: ((this: GlobalEventHandlers, ev: Event) => any) | null;
297
- onwebkitanimationstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
298
- onwebkittransitionend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
299
- onwheel: ((this: GlobalEventHandlers, ev: WheelEvent) => any) | null;
300
- autofocus: boolean;
301
- readonly dataset: DOMStringMap;
302
- nonce?: string | undefined;
303
- tabIndex: number;
304
- blur(): void;
305
- focus(options?: FocusOptions | undefined): void;
306
- };
307
- };
1
+ export declare const createIconClass: (templateHTML: string) => CustomElementConstructor;
@@ -0,0 +1,11 @@
1
+ import type { TSinchIconElement, TSinchIconReact } from '../types';
2
+ declare global {
3
+ namespace JSX {
4
+ interface IntrinsicElements {
5
+ 'sinch-icon-keyboard-double-arrow-left': TSinchIconReact;
6
+ }
7
+ }
8
+ interface HTMLElementTagNameMap {
9
+ 'sinch-icon-keyboard-double-arrow-left': TSinchIconElement;
10
+ }
11
+ }
@@ -0,0 +1,4 @@
1
+ import { defineCustomElement } from '../../utils';
2
+ import { createIconClass } from '../create-icon-class';
3
+ const templateHTML = '<svg viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M18.29 17.29a.996.996 0 0 0 0-1.41L14.42 12l3.88-3.88a.996.996 0 1 0-1.41-1.41L12.3 11.3a.996.996 0 0 0 0 1.41l4.59 4.59c.38.38 1.01.38 1.4-.01z"/><path d="M11.7 17.29a.996.996 0 0 0 0-1.41L7.83 12l3.88-3.88a.996.996 0 1 0-1.41-1.41L5.71 11.3a.996.996 0 0 0 0 1.41l4.59 4.59c.38.38 1.01.38 1.4-.01z"/></svg>';
4
+ defineCustomElement('sinch-icon-keyboard-double-arrow-left', createIconClass(templateHTML));
@@ -0,0 +1,11 @@
1
+ import type { TSinchIconElement, TSinchIconReact } from '../types';
2
+ declare global {
3
+ namespace JSX {
4
+ interface IntrinsicElements {
5
+ 'sinch-icon-keyboard-double-arrow-right': TSinchIconReact;
6
+ }
7
+ }
8
+ interface HTMLElementTagNameMap {
9
+ 'sinch-icon-keyboard-double-arrow-right': TSinchIconElement;
10
+ }
11
+ }
@@ -0,0 +1,4 @@
1
+ import { defineCustomElement } from '../../utils';
2
+ import { createIconClass } from '../create-icon-class';
3
+ const templateHTML = '<svg viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M5.7 6.71a.996.996 0 0 0 0 1.41L9.58 12 5.7 15.88a.996.996 0 1 0 1.41 1.41l4.59-4.59a.996.996 0 0 0 0-1.41L7.12 6.71c-.39-.39-1.03-.39-1.42 0z"/><path d="M12.29 6.71a.996.996 0 0 0 0 1.41L16.17 12l-3.88 3.88a.996.996 0 1 0 1.41 1.41l4.59-4.59a.996.996 0 0 0 0-1.41L13.7 6.7c-.38-.38-1.02-.38-1.41.01z"/></svg>';
4
+ defineCustomElement('sinch-icon-keyboard-double-arrow-right', createIconClass(templateHTML));
@@ -0,0 +1,11 @@
1
+ import type { TSinchIconBrandedElement, TSinchIconBrandedReact } from '../types';
2
+ declare global {
3
+ namespace JSX {
4
+ interface IntrinsicElements {
5
+ 'sinch-icon-branded-chat': TSinchIconBrandedReact;
6
+ }
7
+ }
8
+ interface HTMLElementTagNameMap {
9
+ 'sinch-icon-branded-chat': TSinchIconBrandedElement;
10
+ }
11
+ }
@@ -0,0 +1,4 @@
1
+ import { defineCustomElement } from '../../utils';
2
+ import { createIconClass } from '../create-icon-class';
3
+ const templateHTML = '<svg viewBox="0 0 48 48" aria-hidden="true"><path d="M10 35c0-2.2 1.7-4 4-4 1.4 0 2.7.7 3.3 1.8l-1.1.6c-.4-.8-1.2-1.2-2.2-1.2-1.7 0-2.8 1.2-2.8 2.8 0 1.6 1.1 2.8 2.8 2.8 1 0 1.8-.5 2.2-1.2l1.1.6c-.6 1.1-1.9 1.8-3.3 1.8-2.3 0-4-1.8-4-4Zm14.5-3.8v7.7h-1.3v-3.3H20v3.3h-1.3v-7.7H20v3.2h3.3v-3.2h1.2Zm6.3 6.1h-3.3l-.5 1.6h-1.4l2.8-7.7h1.5l2.8 7.7h-1.4l-.5-1.6Zm-.4-1.2-1.2-3.5-1.2 3.5h2.4Zm7.9-3.7h-2.2v6.5h-1.3v-6.5h-2.2v-1.2h5.6v1.2h.1Z"/><path class="accent" d="M17.2 14c0 .5-.4.9-.9.9s-.9-.4-.9-.9.4-.9.9-.9.9.4.9.9Zm2.1.9c.5 0 .9-.4.9-.9s-.4-.9-.9-.9-.9.4-.9.9.4.9.9.9Zm3.8-.9c0 .5-.4.9-.9.9s-.9-.4-.9-.9.4-.9.9-.9.9.4.9.9Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M13.6 8.1c-.5 0-.9.2-1.3.5s-.5.8-.5 1.3v7.8c0 .5.2.9.5 1.3.3.3.8.5 1.3.5h1.2v3.4l4.8-2.8 1.2-.7H25c.5 0 .9-.2 1.3-.5.3-.3.5-.8.5-1.3v-4.2h6c.2 0 .3.1.4.2.1.1.2.3.2.4v7.8c0 .2-.1.3-.2.4-.1.1-.3.2-.4.2h-2.4V25L26 22.5h-4.5c-.2 0-.3-.1-.4-.2-.1-.1-.2-.3-.2-.4v-1l-1.2.7v.3c0 .5.2.9.5 1.3.3.3.8.5 1.3.5h4.2l5.9 3.4v-3.4h1.2c.5 0 .9-.2 1.3-.5.3-.3.5-.8.5-1.3v-7.8c0-.5-.2-.9-.5-1.3-.3-.3-.8-.5-1.3-.5h-6V9.9c0-.5-.2-.9-.5-1.3-.3-.3-.8-.5-1.3-.5H13.6Zm12 9.6V9.9c0-.2-.1-.3-.2-.4-.1-.1-.3-.2-.4-.2H13.6c-.2 0-.3.1-.4.2-.1.1-.2.3-.2.4v7.8c0 .2.1.3.2.4.1.1.3.2.4.2H16v2.6l3.6-2.1.8-.5H25c.2 0 .3-.1.4-.2.1-.1.2-.2.2-.4Z"/></svg>';
4
+ defineCustomElement('sinch-icon-branded-chat', createIconClass(templateHTML));