@nectary/components 5.0.3 → 5.1.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.
@@ -85,6 +85,7 @@ class Accordion extends NectaryElement {
85
85
  }
86
86
  #onChangeReactHandler = (e) => {
87
87
  getReactEventHandler(this, "on-change")?.(e);
88
+ getReactEventHandler(this, "onChange")?.(e);
88
89
  };
89
90
  }
90
91
  defineCustomElement("sinch-accordion", Accordion);
package/bundle.js CHANGED
@@ -586,6 +586,7 @@ class Accordion extends NectaryElement {
586
586
  }
587
587
  #onChangeReactHandler = (e) => {
588
588
  getReactEventHandler(this, "on-change")?.(e);
589
+ getReactEventHandler(this, "onChange")?.(e);
589
590
  };
590
591
  }
591
592
  defineCustomElement("sinch-accordion", Accordion);
@@ -1567,6 +1568,7 @@ class RichText extends NectaryElement {
1567
1568
  }
1568
1569
  #onClickReactHandler = (e) => {
1569
1570
  getReactEventHandler(this, "on-element-click")?.(e);
1571
+ getReactEventHandler(this, "onElementClick")?.(e);
1570
1572
  };
1571
1573
  }
1572
1574
  defineCustomElement("sinch-rich-text", RichText);
@@ -2072,7 +2074,8 @@ class Button extends NectaryElement {
2072
2074
  "disabled",
2073
2075
  "toggled",
2074
2076
  "size",
2075
- "data-size"
2077
+ "data-size",
2078
+ "data-managed-aria-disabled"
2076
2079
  ];
2077
2080
  }
2078
2081
  attributeChangedCallback(name, oldVal, newVal) {
@@ -2081,12 +2084,17 @@ class Button extends NectaryElement {
2081
2084
  this.#$text.textContent = newVal;
2082
2085
  break;
2083
2086
  }
2087
+ case "data-managed-aria-disabled": {
2088
+ this.#updateAriaDisabled(newVal);
2089
+ break;
2090
+ }
2084
2091
  case "disabled": {
2085
2092
  if (!isAttrEqual(oldVal, newVal)) {
2086
2093
  updateBooleanAttribute(this, "disabled", isAttrTrue(newVal));
2087
2094
  }
2088
- this.ariaDisabled = isAttrTrue(newVal).toString();
2089
- this.#internals.ariaDisabled = isAttrTrue(newVal).toString();
2095
+ if (!this.hasAttribute("data-managed-aria-disabled")) {
2096
+ this.#updateAriaDisabled(newVal);
2097
+ }
2090
2098
  break;
2091
2099
  }
2092
2100
  case "toggled": {
@@ -2146,6 +2154,9 @@ class Button extends NectaryElement {
2146
2154
  get formType() {
2147
2155
  return getLiteralAttribute(this, formTypeValues, "form-type", "button");
2148
2156
  }
2157
+ get dataManagedAriaDisabled() {
2158
+ return getBooleanAttribute(this, "data-managed-aria-disabled");
2159
+ }
2149
2160
  #onSizeUpdate() {
2150
2161
  if (!this.isDomConnected) {
2151
2162
  return;
@@ -2167,6 +2178,10 @@ class Button extends NectaryElement {
2167
2178
  }
2168
2179
  }
2169
2180
  };
2181
+ #updateAriaDisabled = (newVal) => {
2182
+ this.ariaDisabled = isAttrTrue(newVal).toString();
2183
+ this.#internals.ariaDisabled = isAttrTrue(newVal).toString();
2184
+ };
2170
2185
  #onButtonKeydown = (e) => {
2171
2186
  switch (e.code) {
2172
2187
  case "Space":
@@ -2567,6 +2582,7 @@ class Checkbox extends NectaryElement {
2567
2582
  };
2568
2583
  #onChangeReactHandler = (e) => {
2569
2584
  getReactEventHandler(this, "on-change")?.(e);
2585
+ getReactEventHandler(this, "onChange")?.(e);
2570
2586
  };
2571
2587
  #onFocusReactHandler = (e) => {
2572
2588
  getReactEventHandler(this, "on-focus")?.(e);
@@ -3183,6 +3199,7 @@ class Pop extends NectaryElement {
3183
3199
  };
3184
3200
  #onCloseReactHandler = (e) => {
3185
3201
  getReactEventHandler(this, "on-close")?.(e);
3202
+ getReactEventHandler(this, "onClose")?.(e);
3186
3203
  };
3187
3204
  #dispatchCloseEvent() {
3188
3205
  this.dispatchEvent(
@@ -3641,9 +3658,11 @@ class Tooltip extends NectaryElement {
3641
3658
  }
3642
3659
  #onShowReactHandler = () => {
3643
3660
  getReactEventHandler(this, "on-show")?.();
3661
+ getReactEventHandler(this, "onShow")?.();
3644
3662
  };
3645
3663
  #onHideReactHandler = () => {
3646
3664
  getReactEventHandler(this, "on-hide")?.();
3665
+ getReactEventHandler(this, "onHide")?.();
3647
3666
  };
3648
3667
  }
3649
3668
  defineCustomElement("sinch-tooltip", Tooltip);
@@ -3989,6 +4008,7 @@ class ColorMenu extends NectaryElement {
3989
4008
  }
3990
4009
  #onChangeReactHandler = (e) => {
3991
4010
  getReactEventHandler(this, "on-change")?.(e);
4011
+ getReactEventHandler(this, "onChange")?.(e);
3992
4012
  };
3993
4013
  }
3994
4014
  defineCustomElement("sinch-color-menu", ColorMenu);
@@ -4528,6 +4548,7 @@ class DatePicker extends NectaryElement {
4528
4548
  }
4529
4549
  #onChangeReactHandler = (e) => {
4530
4550
  getReactEventHandler(this, "on-change")?.(e);
4551
+ getReactEventHandler(this, "onChange")?.(e);
4531
4552
  };
4532
4553
  }
4533
4554
  defineCustomElement("sinch-date-picker", DatePicker);
@@ -4695,6 +4716,7 @@ class Dialog extends NectaryElement {
4695
4716
  };
4696
4717
  #onCloseReactHandler = (e) => {
4697
4718
  getReactEventHandler(this, "on-close")?.(e);
4719
+ getReactEventHandler(this, "onClose")?.(e);
4698
4720
  };
4699
4721
  #dispatchCloseEvent(detail, cancelable) {
4700
4722
  this.dispatchEvent(new CustomEvent("-close", { detail, cancelable }));
@@ -5682,6 +5704,7 @@ class Input extends NectaryElement {
5682
5704
  }
5683
5705
  #onChangeReactHandler = (e) => {
5684
5706
  getReactEventHandler(this, "on-change")?.(e);
5707
+ getReactEventHandler(this, "onChange")?.(e);
5685
5708
  };
5686
5709
  #onFocusReactHandler = () => {
5687
5710
  getReactEventHandler(this, "on-focus")?.();
@@ -5977,6 +6000,7 @@ class Tabs extends NectaryElement {
5977
6000
  }
5978
6001
  #onChangeReactHandler = (e) => {
5979
6002
  getReactEventHandler(this, "on-change")?.(e);
6003
+ getReactEventHandler(this, "onChange")?.(e);
5980
6004
  };
5981
6005
  }
5982
6006
  defineCustomElement("sinch-tabs", Tabs);
@@ -6209,6 +6233,7 @@ class EmojiPicker extends NectaryElement {
6209
6233
  };
6210
6234
  #onChangeReactHandler = (e) => {
6211
6235
  getReactEventHandler(this, "on-change")?.(e);
6236
+ getReactEventHandler(this, "onChange")?.(e);
6212
6237
  };
6213
6238
  get focusable() {
6214
6239
  return true;
@@ -6605,9 +6630,11 @@ class FilePicker extends NectaryElement {
6605
6630
  };
6606
6631
  #onChangeReactHandler = (e) => {
6607
6632
  getReactEventHandler(this, "on-change")?.(e);
6633
+ getReactEventHandler(this, "onChange")?.(e);
6608
6634
  };
6609
6635
  #onInvalidReactHandler = (e) => {
6610
6636
  getReactEventHandler(this, "on-invalid")?.(e);
6637
+ getReactEventHandler(this, "onInvalid")?.(e);
6611
6638
  };
6612
6639
  }
6613
6640
  defineCustomElement("sinch-file-picker", FilePicker);
@@ -6850,9 +6877,11 @@ class FileDrop extends NectaryElement {
6850
6877
  };
6851
6878
  #onChangeReactHandler = (e) => {
6852
6879
  getReactEventHandler(this, "on-change")?.(e);
6880
+ getReactEventHandler(this, "onChange")?.(e);
6853
6881
  };
6854
6882
  #onInvalidReactHandler = (e) => {
6855
6883
  getReactEventHandler(this, "on-invalid")?.(e);
6884
+ getReactEventHandler(this, "onInvalid")?.(e);
6856
6885
  };
6857
6886
  #dispatchChangeEvent(files) {
6858
6887
  this.dispatchEvent(
@@ -7159,9 +7188,11 @@ class HelpTooltip extends NectaryElement {
7159
7188
  };
7160
7189
  #onTooltipShowReactHandler = () => {
7161
7190
  getReactEventHandler(this, "on-show")?.();
7191
+ getReactEventHandler(this, "onShow")?.();
7162
7192
  };
7163
7193
  #onTooltipHideReactHandler = () => {
7164
7194
  getReactEventHandler(this, "on-hide")?.();
7195
+ getReactEventHandler(this, "onHide")?.();
7165
7196
  };
7166
7197
  }
7167
7198
  defineCustomElement("sinch-help-tooltip", HelpTooltip);
@@ -7420,6 +7451,7 @@ class Pagination extends NectaryElement {
7420
7451
  }
7421
7452
  #onChangeReactHandler = (e) => {
7422
7453
  getReactEventHandler(this, "on-change")?.(e);
7454
+ getReactEventHandler(this, "onChange")?.(e);
7423
7455
  };
7424
7456
  get focusable() {
7425
7457
  return true;
@@ -7534,6 +7566,7 @@ class PersistentOverlay extends NectaryElement {
7534
7566
  }
7535
7567
  #onVisibilityAlteredReactHandler = (e) => {
7536
7568
  getReactEventHandler(this, "on-visibility-altered")?.(e);
7569
+ getReactEventHandler(this, "onVisibilityAltered")?.(e);
7537
7570
  };
7538
7571
  }
7539
7572
  defineCustomElement("sinch-persistent-overlay", PersistentOverlay);
@@ -7826,6 +7859,7 @@ class ProgressStepper extends NectaryElement {
7826
7859
  };
7827
7860
  #onChangeReactHandler = (e) => {
7828
7861
  getReactEventHandler(this, "on-change")?.(e);
7862
+ getReactEventHandler(this, "onChange")?.(e);
7829
7863
  };
7830
7864
  }
7831
7865
  defineCustomElement("sinch-progress-stepper", ProgressStepper);
@@ -8147,6 +8181,7 @@ class Radio extends NectaryElement {
8147
8181
  }
8148
8182
  #onChangeReactHandler = (e) => {
8149
8183
  getReactEventHandler(this, "on-change")?.(e);
8184
+ getReactEventHandler(this, "onChange")?.(e);
8150
8185
  };
8151
8186
  }
8152
8187
  defineCustomElement("sinch-radio", Radio);
@@ -10282,6 +10317,7 @@ class RichTextarea extends NectaryElement {
10282
10317
  };
10283
10318
  #onChangeReactHandler = (e) => {
10284
10319
  getReactEventHandler(this, "on-change")?.(e);
10320
+ getReactEventHandler(this, "onChange")?.(e);
10285
10321
  };
10286
10322
  #onFocusReactHandler = () => {
10287
10323
  getReactEventHandler(this, "on-focus")?.();
@@ -10291,6 +10327,7 @@ class RichTextarea extends NectaryElement {
10291
10327
  };
10292
10328
  #onSelectionReactHandler = (e) => {
10293
10329
  getReactEventHandler(this, "on-selection")?.(e);
10330
+ getReactEventHandler(this, "onSelection")?.(e);
10294
10331
  };
10295
10332
  }
10296
10333
  defineCustomElement("sinch-rich-textarea", RichTextarea);
@@ -10350,6 +10387,7 @@ class SegmentCollapse extends NectaryElement {
10350
10387
  };
10351
10388
  #onChangeReactHandler = (e) => {
10352
10389
  getReactEventHandler(this, "on-change")?.(e);
10390
+ getReactEventHandler(this, "onChange")?.(e);
10353
10391
  };
10354
10392
  }
10355
10393
  defineCustomElement("sinch-segment-collapse", SegmentCollapse);
@@ -10517,6 +10555,7 @@ class SegmentedControl extends NectaryElement {
10517
10555
  }
10518
10556
  #onChangeReactHandler = (e) => {
10519
10557
  getReactEventHandler(this, "on-change")?.(e);
10558
+ getReactEventHandler(this, "onChange")?.(e);
10520
10559
  };
10521
10560
  }
10522
10561
  defineCustomElement("sinch-segmented-control", SegmentedControl);
@@ -10688,6 +10727,7 @@ class SegmentedIconControl extends NectaryElement {
10688
10727
  }
10689
10728
  #onChangeReactHandler = (e) => {
10690
10729
  getReactEventHandler(this, "on-change")?.(e);
10730
+ getReactEventHandler(this, "onChange")?.(e);
10691
10731
  };
10692
10732
  }
10693
10733
  defineCustomElement("sinch-segmented-icon-control", SegmentedIconControl);
@@ -11387,9 +11427,11 @@ class SelectMenu extends NectaryElement {
11387
11427
  }
11388
11428
  #onChangeReactHandler = (e) => {
11389
11429
  getReactEventHandler(this, "on-change")?.(e);
11430
+ getReactEventHandler(this, "onChange")?.(e);
11390
11431
  };
11391
11432
  #onSearchChangeReactHandler = (e) => {
11392
11433
  getReactEventHandler(this, "on-search-change")?.(e);
11434
+ getReactEventHandler(this, "onSearchChange")?.(e);
11393
11435
  };
11394
11436
  }
11395
11437
  defineCustomElement("sinch-select-menu", SelectMenu);
@@ -12192,6 +12234,7 @@ class Textarea extends NectaryElement {
12192
12234
  }
12193
12235
  #onChangeReactHandler = (e) => {
12194
12236
  getReactEventHandler(this, "on-change")?.(e);
12237
+ getReactEventHandler(this, "onChange")?.(e);
12195
12238
  };
12196
12239
  #onFocusReactHandler = () => {
12197
12240
  getReactEventHandler(this, "on-focus")?.();
@@ -12583,6 +12626,7 @@ class TimePicker extends NectaryElement {
12583
12626
  };
12584
12627
  #onChangeReactHandler = (e) => {
12585
12628
  getReactEventHandler(this, "on-change")?.(e);
12629
+ getReactEventHandler(this, "onChange")?.(e);
12586
12630
  };
12587
12631
  }
12588
12632
  defineCustomElement("sinch-time-picker", TimePicker);
@@ -12842,6 +12886,7 @@ class Toast extends NectaryElement {
12842
12886
  }
12843
12887
  #onTimeoutReactHandler = (e) => {
12844
12888
  getReactEventHandler(this, "on-timeout")?.(e);
12889
+ getReactEventHandler(this, "onTimeout")?.(e);
12845
12890
  };
12846
12891
  }
12847
12892
  defineCustomElement("sinch-toast", Toast);
@@ -12978,6 +13023,7 @@ class Toggle extends NectaryElement {
12978
13023
  };
12979
13024
  #onChangeReactHandler = (e) => {
12980
13025
  getReactEventHandler(this, "on-change")?.(e);
13026
+ getReactEventHandler(this, "onChange")?.(e);
12981
13027
  };
12982
13028
  #onFocusReactHandler = (e) => {
12983
13029
  getReactEventHandler(this, "on-focus")?.(e);
package/button/index.d.ts CHANGED
@@ -23,4 +23,5 @@ export declare class Button extends NectaryElement {
23
23
  get focusable(): boolean;
24
24
  set formType(value: TSinchButtonFormType);
25
25
  get formType(): TSinchButtonFormType;
26
+ get dataManagedAriaDisabled(): boolean;
26
27
  }
package/button/index.js CHANGED
@@ -53,7 +53,8 @@ class Button extends NectaryElement {
53
53
  "disabled",
54
54
  "toggled",
55
55
  "size",
56
- "data-size"
56
+ "data-size",
57
+ "data-managed-aria-disabled"
57
58
  ];
58
59
  }
59
60
  attributeChangedCallback(name, oldVal, newVal) {
@@ -62,12 +63,17 @@ class Button extends NectaryElement {
62
63
  this.#$text.textContent = newVal;
63
64
  break;
64
65
  }
66
+ case "data-managed-aria-disabled": {
67
+ this.#updateAriaDisabled(newVal);
68
+ break;
69
+ }
65
70
  case "disabled": {
66
71
  if (!isAttrEqual(oldVal, newVal)) {
67
72
  updateBooleanAttribute(this, "disabled", isAttrTrue(newVal));
68
73
  }
69
- this.ariaDisabled = isAttrTrue(newVal).toString();
70
- this.#internals.ariaDisabled = isAttrTrue(newVal).toString();
74
+ if (!this.hasAttribute("data-managed-aria-disabled")) {
75
+ this.#updateAriaDisabled(newVal);
76
+ }
71
77
  break;
72
78
  }
73
79
  case "toggled": {
@@ -127,6 +133,9 @@ class Button extends NectaryElement {
127
133
  get formType() {
128
134
  return getLiteralAttribute(this, formTypeValues, "form-type", "button");
129
135
  }
136
+ get dataManagedAriaDisabled() {
137
+ return getBooleanAttribute(this, "data-managed-aria-disabled");
138
+ }
130
139
  #onSizeUpdate() {
131
140
  if (!this.isDomConnected) {
132
141
  return;
@@ -148,6 +157,10 @@ class Button extends NectaryElement {
148
157
  }
149
158
  }
150
159
  };
160
+ #updateAriaDisabled = (newVal) => {
161
+ this.ariaDisabled = isAttrTrue(newVal).toString();
162
+ this.#internals.ariaDisabled = isAttrTrue(newVal).toString();
163
+ };
151
164
  #onButtonKeydown = (e) => {
152
165
  switch (e.code) {
153
166
  case "Space":
package/button/types.d.ts CHANGED
@@ -19,6 +19,7 @@ export type TSinchButtonProps = {
19
19
  toggled?: boolean;
20
20
  /** Makes button participate in forms, `button` by default */
21
21
  'form-type'?: TSinchButtonFormType;
22
+ 'data-managed-aria-disabled'?: boolean;
22
23
  };
23
24
  export type TSinchButtonEvents = {
24
25
  /** Click event handler */
package/checkbox/index.js CHANGED
@@ -163,6 +163,7 @@ class Checkbox extends NectaryElement {
163
163
  };
164
164
  #onChangeReactHandler = (e) => {
165
165
  getReactEventHandler(this, "on-change")?.(e);
166
+ getReactEventHandler(this, "onChange")?.(e);
166
167
  };
167
168
  #onFocusReactHandler = (e) => {
168
169
  getReactEventHandler(this, "on-focus")?.(e);
@@ -301,6 +301,7 @@ class ColorMenu extends NectaryElement {
301
301
  }
302
302
  #onChangeReactHandler = (e) => {
303
303
  getReactEventHandler(this, "on-change")?.(e);
304
+ getReactEventHandler(this, "onChange")?.(e);
304
305
  };
305
306
  }
306
307
  defineCustomElement("sinch-color-menu", ColorMenu);
@@ -410,6 +410,7 @@ class DatePicker extends NectaryElement {
410
410
  }
411
411
  #onChangeReactHandler = (e) => {
412
412
  getReactEventHandler(this, "on-change")?.(e);
413
+ getReactEventHandler(this, "onChange")?.(e);
413
414
  };
414
415
  }
415
416
  defineCustomElement("sinch-date-picker", DatePicker);
package/dialog/index.js CHANGED
@@ -130,6 +130,7 @@ class Dialog extends NectaryElement {
130
130
  };
131
131
  #onCloseReactHandler = (e) => {
132
132
  getReactEventHandler(this, "on-close")?.(e);
133
+ getReactEventHandler(this, "onClose")?.(e);
133
134
  };
134
135
  #dispatchCloseEvent(detail, cancelable) {
135
136
  this.dispatchEvent(new CustomEvent("-close", { detail, cancelable }));
@@ -146,6 +146,7 @@ class EmojiPicker extends NectaryElement {
146
146
  };
147
147
  #onChangeReactHandler = (e) => {
148
148
  getReactEventHandler(this, "on-change")?.(e);
149
+ getReactEventHandler(this, "onChange")?.(e);
149
150
  };
150
151
  get focusable() {
151
152
  return true;
@@ -192,9 +192,11 @@ class FileDrop extends NectaryElement {
192
192
  };
193
193
  #onChangeReactHandler = (e) => {
194
194
  getReactEventHandler(this, "on-change")?.(e);
195
+ getReactEventHandler(this, "onChange")?.(e);
195
196
  };
196
197
  #onInvalidReactHandler = (e) => {
197
198
  getReactEventHandler(this, "on-invalid")?.(e);
199
+ getReactEventHandler(this, "onInvalid")?.(e);
198
200
  };
199
201
  #dispatchChangeEvent(files) {
200
202
  this.dispatchEvent(
@@ -95,9 +95,11 @@ class FilePicker extends NectaryElement {
95
95
  };
96
96
  #onChangeReactHandler = (e) => {
97
97
  getReactEventHandler(this, "on-change")?.(e);
98
+ getReactEventHandler(this, "onChange")?.(e);
98
99
  };
99
100
  #onInvalidReactHandler = (e) => {
100
101
  getReactEventHandler(this, "on-invalid")?.(e);
102
+ getReactEventHandler(this, "onInvalid")?.(e);
101
103
  };
102
104
  }
103
105
  defineCustomElement("sinch-file-picker", FilePicker);
@@ -67,9 +67,11 @@ class HelpTooltip extends NectaryElement {
67
67
  };
68
68
  #onTooltipShowReactHandler = () => {
69
69
  getReactEventHandler(this, "on-show")?.();
70
+ getReactEventHandler(this, "onShow")?.();
70
71
  };
71
72
  #onTooltipHideReactHandler = () => {
72
73
  getReactEventHandler(this, "on-hide")?.();
74
+ getReactEventHandler(this, "onHide")?.();
73
75
  };
74
76
  }
75
77
  defineCustomElement("sinch-help-tooltip", HelpTooltip);
package/input/index.js CHANGED
@@ -666,6 +666,7 @@ class Input extends NectaryElement {
666
666
  }
667
667
  #onChangeReactHandler = (e) => {
668
668
  getReactEventHandler(this, "on-change")?.(e);
669
+ getReactEventHandler(this, "onChange")?.(e);
669
670
  };
670
671
  #onFocusReactHandler = () => {
671
672
  getReactEventHandler(this, "on-focus")?.();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nectary/components",
3
- "version": "5.0.3",
3
+ "version": "5.1.0",
4
4
  "files": [
5
5
  "**/*/*.css",
6
6
  "**/*/*.json",
@@ -137,6 +137,7 @@ class Pagination extends NectaryElement {
137
137
  }
138
138
  #onChangeReactHandler = (e) => {
139
139
  getReactEventHandler(this, "on-change")?.(e);
140
+ getReactEventHandler(this, "onChange")?.(e);
140
141
  };
141
142
  get focusable() {
142
143
  return true;
@@ -92,6 +92,7 @@ class PersistentOverlay extends NectaryElement {
92
92
  }
93
93
  #onVisibilityAlteredReactHandler = (e) => {
94
94
  getReactEventHandler(this, "on-visibility-altered")?.(e);
95
+ getReactEventHandler(this, "onVisibilityAltered")?.(e);
95
96
  };
96
97
  }
97
98
  defineCustomElement("sinch-persistent-overlay", PersistentOverlay);
package/pop/index.js CHANGED
@@ -379,6 +379,7 @@ class Pop extends NectaryElement {
379
379
  };
380
380
  #onCloseReactHandler = (e) => {
381
381
  getReactEventHandler(this, "on-close")?.(e);
382
+ getReactEventHandler(this, "onClose")?.(e);
382
383
  };
383
384
  #dispatchCloseEvent() {
384
385
  this.dispatchEvent(
@@ -197,6 +197,7 @@ class ProgressStepper extends NectaryElement {
197
197
  };
198
198
  #onChangeReactHandler = (e) => {
199
199
  getReactEventHandler(this, "on-change")?.(e);
200
+ getReactEventHandler(this, "onChange")?.(e);
200
201
  };
201
202
  }
202
203
  defineCustomElement("sinch-progress-stepper", ProgressStepper);
package/radio/index.js CHANGED
@@ -188,6 +188,7 @@ class Radio extends NectaryElement {
188
188
  }
189
189
  #onChangeReactHandler = (e) => {
190
190
  getReactEventHandler(this, "on-change")?.(e);
191
+ getReactEventHandler(this, "onChange")?.(e);
191
192
  };
192
193
  }
193
194
  defineCustomElement("sinch-radio", Radio);
@@ -93,6 +93,7 @@ class RichText extends NectaryElement {
93
93
  }
94
94
  #onClickReactHandler = (e) => {
95
95
  getReactEventHandler(this, "on-element-click")?.(e);
96
+ getReactEventHandler(this, "onElementClick")?.(e);
96
97
  };
97
98
  }
98
99
  defineCustomElement("sinch-rich-text", RichText);
@@ -455,6 +455,7 @@ class RichTextarea extends NectaryElement {
455
455
  };
456
456
  #onChangeReactHandler = (e) => {
457
457
  getReactEventHandler(this, "on-change")?.(e);
458
+ getReactEventHandler(this, "onChange")?.(e);
458
459
  };
459
460
  #onFocusReactHandler = () => {
460
461
  getReactEventHandler(this, "on-focus")?.();
@@ -464,6 +465,7 @@ class RichTextarea extends NectaryElement {
464
465
  };
465
466
  #onSelectionReactHandler = (e) => {
466
467
  getReactEventHandler(this, "on-selection")?.(e);
468
+ getReactEventHandler(this, "onSelection")?.(e);
467
469
  };
468
470
  }
469
471
  defineCustomElement("sinch-rich-textarea", RichTextarea);
@@ -58,6 +58,7 @@ class SegmentCollapse extends NectaryElement {
58
58
  };
59
59
  #onChangeReactHandler = (e) => {
60
60
  getReactEventHandler(this, "on-change")?.(e);
61
+ getReactEventHandler(this, "onChange")?.(e);
61
62
  };
62
63
  }
63
64
  defineCustomElement("sinch-segment-collapse", SegmentCollapse);
@@ -78,6 +78,7 @@ class SegmentedControl extends NectaryElement {
78
78
  }
79
79
  #onChangeReactHandler = (e) => {
80
80
  getReactEventHandler(this, "on-change")?.(e);
81
+ getReactEventHandler(this, "onChange")?.(e);
81
82
  };
82
83
  }
83
84
  defineCustomElement("sinch-segmented-control", SegmentedControl);
@@ -95,6 +95,7 @@ class SegmentedIconControl extends NectaryElement {
95
95
  }
96
96
  #onChangeReactHandler = (e) => {
97
97
  getReactEventHandler(this, "on-change")?.(e);
98
+ getReactEventHandler(this, "onChange")?.(e);
98
99
  };
99
100
  }
100
101
  defineCustomElement("sinch-segmented-icon-control", SegmentedIconControl);
@@ -445,9 +445,11 @@ class SelectMenu extends NectaryElement {
445
445
  }
446
446
  #onChangeReactHandler = (e) => {
447
447
  getReactEventHandler(this, "on-change")?.(e);
448
+ getReactEventHandler(this, "onChange")?.(e);
448
449
  };
449
450
  #onSearchChangeReactHandler = (e) => {
450
451
  getReactEventHandler(this, "on-search-change")?.(e);
452
+ getReactEventHandler(this, "onSearchChange")?.(e);
451
453
  };
452
454
  }
453
455
  defineCustomElement("sinch-select-menu", SelectMenu);
package/tabs/index.js CHANGED
@@ -70,6 +70,7 @@ class Tabs extends NectaryElement {
70
70
  }
71
71
  #onChangeReactHandler = (e) => {
72
72
  getReactEventHandler(this, "on-change")?.(e);
73
+ getReactEventHandler(this, "onChange")?.(e);
73
74
  };
74
75
  }
75
76
  defineCustomElement("sinch-tabs", Tabs);
package/textarea/index.js CHANGED
@@ -343,6 +343,7 @@ class Textarea extends NectaryElement {
343
343
  }
344
344
  #onChangeReactHandler = (e) => {
345
345
  getReactEventHandler(this, "on-change")?.(e);
346
+ getReactEventHandler(this, "onChange")?.(e);
346
347
  };
347
348
  #onFocusReactHandler = () => {
348
349
  getReactEventHandler(this, "on-focus")?.();
@@ -325,6 +325,7 @@ class TimePicker extends NectaryElement {
325
325
  };
326
326
  #onChangeReactHandler = (e) => {
327
327
  getReactEventHandler(this, "on-change")?.(e);
328
+ getReactEventHandler(this, "onChange")?.(e);
328
329
  };
329
330
  }
330
331
  defineCustomElement("sinch-time-picker", TimePicker);
package/toast/index.js CHANGED
@@ -82,6 +82,7 @@ class Toast extends NectaryElement {
82
82
  }
83
83
  #onTimeoutReactHandler = (e) => {
84
84
  getReactEventHandler(this, "on-timeout")?.(e);
85
+ getReactEventHandler(this, "onTimeout")?.(e);
85
86
  };
86
87
  }
87
88
  defineCustomElement("sinch-toast", Toast);
package/toggle/index.js CHANGED
@@ -134,6 +134,7 @@ class Toggle extends NectaryElement {
134
134
  };
135
135
  #onChangeReactHandler = (e) => {
136
136
  getReactEventHandler(this, "on-change")?.(e);
137
+ getReactEventHandler(this, "onChange")?.(e);
137
138
  };
138
139
  #onFocusReactHandler = (e) => {
139
140
  getReactEventHandler(this, "on-focus")?.(e);
package/tooltip/index.js CHANGED
@@ -277,9 +277,11 @@ class Tooltip extends NectaryElement {
277
277
  }
278
278
  #onShowReactHandler = () => {
279
279
  getReactEventHandler(this, "on-show")?.();
280
+ getReactEventHandler(this, "onShow")?.();
280
281
  };
281
282
  #onHideReactHandler = () => {
282
283
  getReactEventHandler(this, "on-hide")?.();
284
+ getReactEventHandler(this, "onHide")?.();
283
285
  };
284
286
  }
285
287
  defineCustomElement("sinch-tooltip", Tooltip);
package/types.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { ReactifyEvents, WebComponentReactBaseProp, SafeSelect, CamelCaseify, RemoveReadonly, SetAttributes, ExtendEventListeners } from './utils/adapters';
1
+ import type { ReactifyEvents, WebComponentReactBaseProp, SafeSelect, CamelCaseify, RemoveReadonly, SetAttributes, ExtendEventListeners, PatchReactEvents } from './utils/adapters';
2
2
  import type { CSSProperties } from 'react';
3
3
  export type TRect = {
4
4
  x: number;
@@ -7,7 +7,7 @@ export type TRect = {
7
7
  height: number;
8
8
  };
9
9
  export type NectaryComponentVanillaByType<T extends NectaryComponentMap[keyof NectaryComponentMap]> = Omit<HTMLElement, 'addEventListener' | 'removeEventListener'> & ExtendEventListeners<Required<SafeSelect<T, 'events'>>> & SetAttributes<Required<RemoveReadonly<SafeSelect<T, 'props'>>>> & Required<CamelCaseify<SafeSelect<T, 'props'>>> & Required<SafeSelect<T, 'methods'>>;
10
- export type NectaryComponentReactByType<T extends NectaryComponentMap[keyof NectaryComponentMap]> = WebComponentReactBaseProp<NectaryComponentVanillaByType<T>> & ReactifyEvents<SafeSelect<T, 'events'>> & RemoveReadonly<SafeSelect<T, 'props'>> & {
10
+ export type NectaryComponentReactByType<T extends NectaryComponentMap[keyof NectaryComponentMap]> = PatchReactEvents<WebComponentReactBaseProp<NectaryComponentVanillaByType<T>>, ReactifyEvents<SafeSelect<T, 'events'>>> & RemoveReadonly<SafeSelect<T, 'props'>> & {
11
11
  style?: Partial<SafeSelect<T, 'style'>> & CSSProperties;
12
12
  };
13
13
  export type NectaryComponentVanilla<K extends keyof NectaryComponentMap> = NectaryComponentVanillaByType<NectaryComponentMap[K]>;
@@ -27,4 +27,5 @@ export type ReactifyEvents<T> = {
27
27
  export type WebComponentReactBaseProp<T = HTMLElement> = Omit<DetailedHTMLProps<HTMLAttributes<T>, T>, 'className' | 'style'> & {
28
28
  class?: string;
29
29
  };
30
+ export type PatchReactEvents<T, Events> = Omit<T, keyof CamelCaseify<Events>> & Partial<CamelCaseify<Events>> & Partial<Events>;
30
31
  export {};