@nectary/components 0.39.0 → 0.40.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 (115) hide show
  1. package/accordion/index.js +47 -84
  2. package/accordion-item/index.js +26 -53
  3. package/action-menu/index.d.ts +0 -1
  4. package/action-menu/index.js +179 -223
  5. package/action-menu/types.d.ts +8 -18
  6. package/action-menu-option/index.d.ts +1 -0
  7. package/action-menu-option/index.js +51 -62
  8. package/action-menu-option/types.d.ts +9 -0
  9. package/action-menu-option/utils.d.ts +2 -0
  10. package/action-menu-option/utils.js +3 -0
  11. package/alert/index.js +6 -20
  12. package/avatar/index.js +12 -31
  13. package/avatar-badge/index.js +8 -22
  14. package/avatar-status/index.js +1 -1
  15. package/button/index.js +42 -92
  16. package/card/index.js +21 -59
  17. package/chat-avatar/index.js +8 -22
  18. package/chat-block/index.js +29 -69
  19. package/chat-bubble/index.js +6 -20
  20. package/checkbox/index.js +55 -107
  21. package/chip/index.d.ts +13 -0
  22. package/chip/index.js +137 -0
  23. package/chip/types.d.ts +38 -0
  24. package/color-menu/index.d.ts +13 -0
  25. package/color-menu/index.js +464 -0
  26. package/color-menu/types.d.ts +37 -0
  27. package/color-swatch/index.d.ts +13 -0
  28. package/color-swatch/index.js +59 -0
  29. package/color-swatch/types.d.ts +12 -0
  30. package/colors.json +57 -49
  31. package/date-picker/index.js +161 -292
  32. package/dialog/index.js +70 -142
  33. package/dropdown-checkbox-option/index.js +6 -20
  34. package/dropdown-radio-option/index.js +6 -20
  35. package/field/index.js +25 -63
  36. package/file-drop/index.js +123 -200
  37. package/file-picker/index.d.ts +0 -1
  38. package/file-picker/index.js +55 -108
  39. package/file-status/index.js +15 -39
  40. package/help-tooltip/index.js +1 -1
  41. package/horizontal-stepper/index.js +33 -59
  42. package/horizontal-stepper-item/index.js +13 -37
  43. package/icon-button/index.js +39 -84
  44. package/icons-channel/notify/index.d.ts +11 -0
  45. package/icons-channel/notify/index.js +4 -0
  46. package/illustrations/create-illustration-class.js +1 -1
  47. package/inline-alert/index.js +29 -81
  48. package/input/index.js +113 -222
  49. package/link/index.js +46 -96
  50. package/list-item/index.js +1 -1
  51. package/package.json +12 -14
  52. package/pagination/index.js +109 -163
  53. package/popover/index.js +224 -294
  54. package/progress/index.js +9 -28
  55. package/radio/index.js +103 -169
  56. package/radio-option/index.js +24 -48
  57. package/segment/index.js +49 -130
  58. package/segment-collapse/index.js +24 -49
  59. package/segmented-control/index.js +36 -73
  60. package/segmented-control-option/index.js +41 -87
  61. package/segmented-icon-control/index.js +47 -84
  62. package/segmented-icon-control-option/index.js +38 -79
  63. package/select-button/index.d.ts +13 -0
  64. package/select-button/index.js +153 -0
  65. package/select-button/types.d.ts +43 -0
  66. package/select-menu/index.d.ts +11 -0
  67. package/select-menu/index.js +346 -0
  68. package/select-menu/types.d.ts +29 -0
  69. package/select-menu/types.js +1 -0
  70. package/{dropdown-text-option → select-menu-option}/index.d.ts +5 -7
  71. package/select-menu-option/index.js +76 -0
  72. package/{select-option → select-menu-option}/types.d.ts +8 -9
  73. package/stop-events/index.js +7 -20
  74. package/table-head-cell/index.js +7 -21
  75. package/tabs/index.js +103 -165
  76. package/tabs-option/index.js +20 -44
  77. package/tag/index.d.ts +0 -1
  78. package/tag/index.js +37 -38
  79. package/tag/types.d.ts +13 -7
  80. package/textarea/index.js +92 -167
  81. package/theme.css +80 -49
  82. package/tile-control/index.js +55 -96
  83. package/tile-control-option/index.js +40 -86
  84. package/time-picker/index.js +216 -368
  85. package/title/index.js +6 -20
  86. package/toast/index.js +32 -70
  87. package/toast-manager/index.js +141 -217
  88. package/toggle/index.js +54 -106
  89. package/types.d.ts +7 -0
  90. package/utils/colors.d.ts +10 -0
  91. package/utils/colors.js +121 -0
  92. package/{utils.d.ts → utils/index.d.ts} +17 -9
  93. package/{utils.js → utils/index.js} +96 -39
  94. package/vertical-stepper/index.js +29 -50
  95. package/vertical-stepper-item/index.js +13 -37
  96. package/dropdown/index.d.ts +0 -12
  97. package/dropdown/index.js +0 -415
  98. package/dropdown/types.d.ts +0 -32
  99. package/dropdown-text-option/index.js +0 -104
  100. package/dropdown-text-option/types.d.ts +0 -16
  101. package/select/index.d.ts +0 -13
  102. package/select/index.js +0 -316
  103. package/select/types.d.ts +0 -53
  104. package/select-option/index.d.ts +0 -11
  105. package/select-option/index.js +0 -8
  106. package/tag/utils.d.ts +0 -5
  107. package/tag/utils.js +0 -6
  108. package/tag-close/index.d.ts +0 -12
  109. package/tag-close/index.js +0 -42
  110. package/tag-close/types.d.ts +0 -5
  111. /package/{dropdown-text-option → chip}/types.js +0 -0
  112. /package/{dropdown → color-menu}/types.js +0 -0
  113. /package/{select-option → color-swatch}/types.js +0 -0
  114. /package/{select → select-button}/types.js +0 -0
  115. /package/{tag-close → select-menu-option}/types.js +0 -0
@@ -1,88 +1,28 @@
1
- import _classPrivateFieldGet from '@babel/runtime/helpers/classPrivateFieldGet';
2
- import _classPrivateFieldSet from '@babel/runtime/helpers/classPrivateFieldSet';
3
-
4
- var _$slot, _onSlotChange, _onOptionChange, _onValueChange, _onSmallChange, _onChangeReactHandler;
5
-
6
- function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
7
-
8
- function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
9
-
10
- function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
11
-
12
- function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
13
-
14
1
  import { defineCustomElement, getAttribute, getBooleanAttribute, getCsvSet, getFirstCsvValue, getIntegerAttribute, getReactEventHandler, NectaryElement, updateAttribute, updateBooleanAttribute, updateCsv, updateIntegerAttribute } from '../utils';
15
2
  const templateHTML = '<style>:host{display:block;outline:0;--sinch-grid-num-columns:1}#wrapper{display:grid;grid-template-columns:repeat(var(--sinch-grid-num-columns),auto);gap:16px;width:fit-content}:host([small]:not([small=false])) #wrapper{gap:8px}:host([cols="2"]){--sinch-grid-num-columns:2}:host([cols="3"]){--sinch-grid-num-columns:3}:host([cols="4"]){--sinch-grid-num-columns:4}:host([cols="5"]){--sinch-grid-num-columns:5}:host([cols="6"]){--sinch-grid-num-columns:6}:host([cols="7"]){--sinch-grid-num-columns:7}:host([cols="8"]){--sinch-grid-num-columns:8}</style><div id="wrapper"><slot></slot></div>';
16
3
  const template = document.createElement('template');
17
4
  template.innerHTML = templateHTML;
18
- defineCustomElement('sinch-tile-control', (_$slot = new WeakMap(), _onSlotChange = new WeakMap(), _onOptionChange = new WeakMap(), _onValueChange = new WeakSet(), _onSmallChange = new WeakSet(), _onChangeReactHandler = new WeakMap(), class extends NectaryElement {
5
+ defineCustomElement('sinch-tile-control', class extends NectaryElement {
6
+ #$slot;
7
+
19
8
  constructor() {
20
9
  super();
21
-
22
- _classPrivateMethodInitSpec(this, _onSmallChange);
23
-
24
- _classPrivateMethodInitSpec(this, _onValueChange);
25
-
26
- _classPrivateFieldInitSpec(this, _$slot, {
27
- writable: true,
28
- value: void 0
29
- });
30
-
31
- _classPrivateFieldInitSpec(this, _onSlotChange, {
32
- writable: true,
33
- value: () => {
34
- _classPrivateMethodGet(this, _onValueChange, _onValueChange2).call(this, this.value);
35
-
36
- _classPrivateMethodGet(this, _onSmallChange, _onSmallChange2).call(this);
37
- }
38
- });
39
-
40
- _classPrivateFieldInitSpec(this, _onOptionChange, {
41
- writable: true,
42
- value: e => {
43
- e.stopPropagation();
44
- const $elem = e.target;
45
- const value = e.detail;
46
- const detail = this.multiple ? updateCsv(this.value, value, !getBooleanAttribute($elem, 'data-checked')) : value;
47
- this.dispatchEvent(new CustomEvent('change', {
48
- detail,
49
- bubbles: true
50
- }));
51
- this.dispatchEvent(new CustomEvent('-change', {
52
- detail
53
- }));
54
- }
55
- });
56
-
57
- _classPrivateFieldInitSpec(this, _onChangeReactHandler, {
58
- writable: true,
59
- value: e => {
60
- getReactEventHandler(this, 'on-change')?.(e);
61
- }
62
- });
63
-
64
10
  const shadowRoot = this.attachShadow();
65
11
  shadowRoot.appendChild(template.content.cloneNode(true));
66
-
67
- _classPrivateFieldSet(this, _$slot, shadowRoot.querySelector('slot'));
12
+ this.#$slot = shadowRoot.querySelector('slot');
68
13
  }
69
14
 
70
15
  connectedCallback() {
71
16
  this.setAttribute('role', 'tablist');
72
-
73
- _classPrivateFieldGet(this, _$slot).addEventListener('option-change', _classPrivateFieldGet(this, _onOptionChange));
74
-
75
- _classPrivateFieldGet(this, _$slot).addEventListener('slotchange', _classPrivateFieldGet(this, _onSlotChange));
76
-
77
- this.addEventListener('-change', _classPrivateFieldGet(this, _onChangeReactHandler));
17
+ this.#$slot.addEventListener('option-change', this.#onOptionChange);
18
+ this.#$slot.addEventListener('slotchange', this.#onSlotChange);
19
+ this.addEventListener('-change', this.#onChangeReactHandler);
78
20
  }
79
21
 
80
22
  disconnectedCallback() {
81
- _classPrivateFieldGet(this, _$slot).removeEventListener('option-change', _classPrivateFieldGet(this, _onOptionChange));
82
-
83
- _classPrivateFieldGet(this, _$slot).removeEventListener('slotchange', _classPrivateFieldGet(this, _onSlotChange));
84
-
85
- this.removeEventListener('-change', _classPrivateFieldGet(this, _onChangeReactHandler));
23
+ this.#$slot.removeEventListener('option-change', this.#onOptionChange);
24
+ this.#$slot.removeEventListener('slotchange', this.#onSlotChange);
25
+ this.removeEventListener('-change', this.#onChangeReactHandler);
86
26
  }
87
27
 
88
28
  static get observedAttributes() {
@@ -133,49 +73,68 @@ defineCustomElement('sinch-tile-control', (_$slot = new WeakMap(), _onSlotChange
133
73
  switch (name) {
134
74
  case 'value':
135
75
  {
136
- _classPrivateMethodGet(this, _onValueChange, _onValueChange2).call(this, newVal ?? '');
137
-
76
+ this.#onValueChange(newVal ?? '');
138
77
  break;
139
78
  }
140
79
 
141
80
  case 'small':
142
81
  {
143
- _classPrivateMethodGet(this, _onSmallChange, _onSmallChange2).call(this);
144
-
82
+ this.#onSmallChange();
145
83
  break;
146
84
  }
147
85
 
148
86
  case 'multiple':
149
87
  {
150
- _classPrivateMethodGet(this, _onValueChange, _onValueChange2).call(this, this.value);
88
+ this.#onValueChange(this.value);
151
89
  }
152
90
  }
153
91
  }
154
92
 
155
- }));
156
-
157
- function _onValueChange2(csv) {
158
- if (this.multiple) {
159
- const values = getCsvSet(csv);
160
-
161
- for (const $option of _classPrivateFieldGet(this, _$slot).assignedElements()) {
162
- const isChecked = !getBooleanAttribute($option, 'disabled') && values.has(getAttribute($option, 'value', ''));
163
- updateBooleanAttribute($option, 'data-checked', isChecked);
164
- }
165
- } else {
166
- const value = getFirstCsvValue(csv);
93
+ #onSlotChange = () => {
94
+ this.#onValueChange(this.value);
95
+ this.#onSmallChange();
96
+ };
97
+ #onOptionChange = e => {
98
+ e.stopPropagation();
99
+ const $elem = e.target;
100
+ const value = e.detail;
101
+ const detail = this.multiple ? updateCsv(this.value, value, !getBooleanAttribute($elem, 'data-checked')) : value;
102
+ this.dispatchEvent(new CustomEvent('change', {
103
+ detail,
104
+ bubbles: true
105
+ }));
106
+ this.dispatchEvent(new CustomEvent('-change', {
107
+ detail
108
+ }));
109
+ };
110
+
111
+ #onValueChange(csv) {
112
+ if (this.multiple) {
113
+ const values = getCsvSet(csv);
114
+
115
+ for (const $option of this.#$slot.assignedElements()) {
116
+ const isChecked = !getBooleanAttribute($option, 'disabled') && values.has(getAttribute($option, 'value', ''));
117
+ updateBooleanAttribute($option, 'data-checked', isChecked);
118
+ }
119
+ } else {
120
+ const value = getFirstCsvValue(csv);
167
121
 
168
- for (const $option of _classPrivateFieldGet(this, _$slot).assignedElements()) {
169
- const isChecked = !getBooleanAttribute($option, 'disabled') && value === getAttribute($option, 'value', '');
170
- updateBooleanAttribute($option, 'data-checked', isChecked);
122
+ for (const $option of this.#$slot.assignedElements()) {
123
+ const isChecked = !getBooleanAttribute($option, 'disabled') && value === getAttribute($option, 'value', '');
124
+ updateBooleanAttribute($option, 'data-checked', isChecked);
125
+ }
171
126
  }
172
127
  }
173
- }
174
128
 
175
- function _onSmallChange2() {
176
- const isSmall = this.small;
129
+ #onSmallChange() {
130
+ const isSmall = this.small;
177
131
 
178
- for (const $opt of _classPrivateFieldGet(this, _$slot).assignedElements()) {
179
- updateBooleanAttribute($opt, 'data-small', isSmall);
132
+ for (const $opt of this.#$slot.assignedElements()) {
133
+ updateBooleanAttribute($opt, 'data-small', isSmall);
134
+ }
180
135
  }
181
- }
136
+
137
+ #onChangeReactHandler = e => {
138
+ getReactEventHandler(this, 'on-change')?.(e);
139
+ };
140
+ });
@@ -1,99 +1,34 @@
1
- import _classPrivateFieldGet from '@babel/runtime/helpers/classPrivateFieldGet';
2
- import _classPrivateFieldSet from '@babel/runtime/helpers/classPrivateFieldSet';
3
-
4
- var _$button, _$text, _onButtonClick, _onButtonFocus, _onButtonBlur, _onFocusReactHandler, _onBlurReactHandler;
5
-
6
- function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
7
-
8
- function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
9
-
10
1
  import { defineCustomElement, getAttribute, getBooleanAttribute, getReactEventHandler, isAttrTrue, NectaryElement, updateAttribute, updateBooleanAttribute, updateExplicitBooleanAttribute } from '../utils';
11
2
  const templateHTML = '<style>:host{display:inline-block;vertical-align:middle;outline:0}button{all:initial;position:relative;display:flex;flex-direction:column;justify-content:space-between;box-sizing:border-box;width:88px;height:88px;padding:16px 8px 8px;border-radius:var(--sinch-shape-radius-l);background-color:var(--sinch-color-snow-100);box-shadow:var(--sinch-elevation-leve-1);cursor:pointer}:host([data-small])>button{width:64px;height:64px;border-radius:var(--sinch-shape-radius-m);padding:12px 4px 4px}button::before{content:"";position:absolute;left:0;top:0;bottom:0;right:0;border:1px solid var(--sinch-color-snow-700);border-radius:var(--sinch-shape-radius-l);pointer-events:none}:host([data-small])>button::before{border-radius:var(--sinch-shape-radius-m)}button:focus-visible::after{position:absolute;content:"";left:50%;top:50%;transform:translate(-50%,-50%);width:100%;height:100%;padding:2px;border:2px solid var(--sinch-color-aqua-400);border-radius:calc(var(--sinch-shape-radius-l) + 4px);pointer-events:none}:host([data-small])>button:focus-visible::after{border-radius:calc(var(--sinch-shape-radius-m) + 4px)}@supports not selector(:focus-visible){button:focus::after{position:absolute;content:"";left:50%;top:50%;transform:translate(-50%,-50%);width:100%;height:100%;padding:2px;border:2px solid var(--sinch-color-aqua-400);border-radius:calc(var(--sinch-shape-radius-l) + 4px)}:host([data-small])>button:focus::after{border-radius:calc(var(--sinch-shape-radius-m) + 4px)}}button:enabled:hover{background-color:var(--sinch-color-tropical-100)}button:enabled:hover::before{border-color:var(--sinch-color-tropical-100)}:host([data-checked])>button:enabled,button:enabled:active{box-shadow:var(--sinch-elevation-level-0)}:host([data-checked])>button:enabled::before,button:enabled:active::before{border-width:2px;border-color:var(--sinch-color-stormy-500)}button:disabled{cursor:initial}button:disabled>#icon,button:disabled>#text{opacity:.5}#text{display:inline-block;min-height:20px;text-align:center;font:var(--sinch-font-text-xs);color:var(--sinch-color-stormy-500);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}#icon{width:32px;height:32px;align-self:center;--sinch-size-icon:32px;--sinch-color-icon:var(--sinch-color-stormy-500)}:host([data-small]) #icon{width:24px;height:24px;--sinch-size-icon:24px}button>*{pointer-events:none}</style><button><div id="icon"><slot name="icon"></slot></div><span id="text"></span></button>';
12
3
  const template = document.createElement('template');
13
4
  template.innerHTML = templateHTML;
14
- defineCustomElement('sinch-tile-control-option', (_$button = new WeakMap(), _$text = new WeakMap(), _onButtonClick = new WeakMap(), _onButtonFocus = new WeakMap(), _onButtonBlur = new WeakMap(), _onFocusReactHandler = new WeakMap(), _onBlurReactHandler = new WeakMap(), class extends NectaryElement {
5
+ defineCustomElement('sinch-tile-control-option', class extends NectaryElement {
6
+ #$button;
7
+ #$text;
8
+
15
9
  constructor() {
16
10
  super();
17
-
18
- _classPrivateFieldInitSpec(this, _$button, {
19
- writable: true,
20
- value: void 0
21
- });
22
-
23
- _classPrivateFieldInitSpec(this, _$text, {
24
- writable: true,
25
- value: void 0
26
- });
27
-
28
- _classPrivateFieldInitSpec(this, _onButtonClick, {
29
- writable: true,
30
- value: e => {
31
- e.stopPropagation();
32
- this.dispatchEvent(new CustomEvent('option-change', {
33
- detail: this.value,
34
- bubbles: true
35
- }));
36
- }
37
- });
38
-
39
- _classPrivateFieldInitSpec(this, _onButtonFocus, {
40
- writable: true,
41
- value: () => {
42
- this.dispatchEvent(new CustomEvent('-focus'));
43
- }
44
- });
45
-
46
- _classPrivateFieldInitSpec(this, _onButtonBlur, {
47
- writable: true,
48
- value: () => {
49
- this.dispatchEvent(new CustomEvent('-blur'));
50
- }
51
- });
52
-
53
- _classPrivateFieldInitSpec(this, _onFocusReactHandler, {
54
- writable: true,
55
- value: () => {
56
- getReactEventHandler(this, 'on-focus')?.();
57
- }
58
- });
59
-
60
- _classPrivateFieldInitSpec(this, _onBlurReactHandler, {
61
- writable: true,
62
- value: () => {
63
- getReactEventHandler(this, 'on-blur')?.();
64
- }
65
- });
66
-
67
11
  const shadowRoot = this.attachShadow();
68
12
  shadowRoot.appendChild(template.content.cloneNode(true));
69
-
70
- _classPrivateFieldSet(this, _$button, shadowRoot.querySelector('button'));
71
-
72
- _classPrivateFieldSet(this, _$text, shadowRoot.querySelector('#text'));
13
+ this.#$button = shadowRoot.querySelector('button');
14
+ this.#$text = shadowRoot.querySelector('#text');
73
15
  }
74
16
 
75
17
  connectedCallback() {
76
18
  this.setAttribute('role', 'tab');
77
-
78
- _classPrivateFieldGet(this, _$button).addEventListener('click', _classPrivateFieldGet(this, _onButtonClick));
79
-
80
- _classPrivateFieldGet(this, _$button).addEventListener('focus', _classPrivateFieldGet(this, _onButtonFocus));
81
-
82
- _classPrivateFieldGet(this, _$button).addEventListener('blur', _classPrivateFieldGet(this, _onButtonBlur));
83
-
84
- this.addEventListener('-focus', _classPrivateFieldGet(this, _onFocusReactHandler));
85
- this.addEventListener('-blur', _classPrivateFieldGet(this, _onBlurReactHandler));
19
+ this.#$button.addEventListener('click', this.#onButtonClick);
20
+ this.#$button.addEventListener('focus', this.#onButtonFocus);
21
+ this.#$button.addEventListener('blur', this.#onButtonBlur);
22
+ this.addEventListener('-focus', this.#onFocusReactHandler);
23
+ this.addEventListener('-blur', this.#onBlurReactHandler);
86
24
  }
87
25
 
88
26
  disconnectedCallback() {
89
- _classPrivateFieldGet(this, _$button).removeEventListener('click', _classPrivateFieldGet(this, _onButtonClick));
90
-
91
- _classPrivateFieldGet(this, _$button).removeEventListener('focus', _classPrivateFieldGet(this, _onButtonFocus));
92
-
93
- _classPrivateFieldGet(this, _$button).removeEventListener('blur', _classPrivateFieldGet(this, _onButtonBlur));
94
-
95
- this.removeEventListener('-focus', _classPrivateFieldGet(this, _onFocusReactHandler));
96
- this.removeEventListener('-blur', _classPrivateFieldGet(this, _onBlurReactHandler));
27
+ this.#$button.removeEventListener('click', this.#onButtonClick);
28
+ this.#$button.removeEventListener('focus', this.#onButtonFocus);
29
+ this.#$button.removeEventListener('blur', this.#onButtonBlur);
30
+ this.removeEventListener('-focus', this.#onFocusReactHandler);
31
+ this.removeEventListener('-blur', this.#onBlurReactHandler);
97
32
  }
98
33
 
99
34
  static get observedAttributes() {
@@ -108,7 +43,7 @@ defineCustomElement('sinch-tile-control-option', (_$button = new WeakMap(), _$te
108
43
  switch (name) {
109
44
  case 'text':
110
45
  {
111
- _classPrivateFieldGet(this, _$text).textContent = newVal;
46
+ this.#$text.textContent = newVal;
112
47
  break;
113
48
  }
114
49
 
@@ -120,7 +55,7 @@ defineCustomElement('sinch-tile-control-option', (_$button = new WeakMap(), _$te
120
55
 
121
56
  case 'disabled':
122
57
  {
123
- _classPrivateFieldGet(this, _$button).disabled = isAttrTrue(newVal);
58
+ this.#$button.disabled = isAttrTrue(newVal);
124
59
  break;
125
60
  }
126
61
  }
@@ -151,11 +86,30 @@ defineCustomElement('sinch-tile-control-option', (_$button = new WeakMap(), _$te
151
86
  }
152
87
 
153
88
  focus() {
154
- _classPrivateFieldGet(this, _$button).focus();
89
+ this.#$button.focus();
155
90
  }
156
91
 
157
92
  blur() {
158
- _classPrivateFieldGet(this, _$button).blur();
93
+ this.#$button.blur();
159
94
  }
160
95
 
161
- }));
96
+ #onButtonClick = e => {
97
+ e.stopPropagation();
98
+ this.dispatchEvent(new CustomEvent('option-change', {
99
+ detail: this.value,
100
+ bubbles: true
101
+ }));
102
+ };
103
+ #onButtonFocus = () => {
104
+ this.dispatchEvent(new CustomEvent('-focus'));
105
+ };
106
+ #onButtonBlur = () => {
107
+ this.dispatchEvent(new CustomEvent('-blur'));
108
+ };
109
+ #onFocusReactHandler = () => {
110
+ getReactEventHandler(this, 'on-focus')?.();
111
+ };
112
+ #onBlurReactHandler = () => {
113
+ getReactEventHandler(this, 'on-blur')?.();
114
+ };
115
+ });