@nectary/components 4.8.2 → 4.9.1

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 (178) hide show
  1. package/accordion/index.d.ts +8 -4
  2. package/accordion/types.d.ts +11 -16
  3. package/accordion-item/index.d.ts +8 -4
  4. package/accordion-item/types.d.ts +30 -47
  5. package/action-menu/index.d.ts +8 -4
  6. package/action-menu/types.d.ts +7 -8
  7. package/action-menu-option/index.d.ts +8 -4
  8. package/action-menu-option/types.d.ts +28 -32
  9. package/action-menu-option/utils.d.ts +1 -2
  10. package/alert/index.d.ts +8 -4
  11. package/alert/types.d.ts +22 -27
  12. package/avatar/index.d.ts +8 -4
  13. package/avatar/types.d.ts +25 -42
  14. package/badge/index.d.ts +8 -4
  15. package/badge/types.d.ts +18 -32
  16. package/button/index.d.ts +8 -4
  17. package/button/types.d.ts +140 -160
  18. package/button-group/index.d.ts +8 -4
  19. package/button-group/types.d.ts +10 -9
  20. package/button-group-item/index.d.ts +8 -4
  21. package/button-group-item/types.d.ts +42 -42
  22. package/card/index.d.ts +8 -4
  23. package/card/types.d.ts +8 -19
  24. package/card-container/index.d.ts +7 -4
  25. package/card-container/types.d.ts +2 -2
  26. package/card-v2/index.d.ts +8 -4
  27. package/card-v2/types.d.ts +41 -53
  28. package/card-v2-title/index.d.ts +8 -4
  29. package/card-v2-title/types.d.ts +21 -33
  30. package/checkbox/index.d.ts +8 -4
  31. package/checkbox/types.d.ts +45 -65
  32. package/chip/index.d.ts +8 -4
  33. package/chip/types.d.ts +30 -44
  34. package/code-tag/index.d.ts +8 -4
  35. package/code-tag/types.d.ts +15 -16
  36. package/color-menu/index.d.ts +8 -4
  37. package/color-menu/types.d.ts +15 -22
  38. package/color-menu-option/index.d.ts +8 -4
  39. package/color-menu-option/types.d.ts +14 -15
  40. package/color-swatch/index.d.ts +8 -4
  41. package/color-swatch/types.d.ts +15 -16
  42. package/date-picker/index.d.ts +8 -4
  43. package/date-picker/types.d.ts +50 -79
  44. package/dialog/index.d.ts +8 -4
  45. package/dialog/types.d.ts +30 -34
  46. package/emoji/index.d.ts +8 -4
  47. package/emoji/types.d.ts +11 -12
  48. package/emoji-picker/index.d.ts +8 -4
  49. package/emoji-picker/types.d.ts +25 -18
  50. package/field/index.d.ts +8 -4
  51. package/field/types.d.ts +21 -38
  52. package/file-drop/index.d.ts +8 -4
  53. package/file-drop/types.d.ts +33 -55
  54. package/file-picker/index.d.ts +8 -4
  55. package/file-picker/types.d.ts +12 -22
  56. package/file-status/index.d.ts +8 -4
  57. package/file-status/types.d.ts +27 -32
  58. package/flag/index.d.ts +8 -4
  59. package/flag/types.d.ts +10 -11
  60. package/grid/index.d.ts +8 -4
  61. package/grid/types.d.ts +19 -17
  62. package/grid-item/index.d.ts +8 -4
  63. package/grid-item/types.d.ts +7 -12
  64. package/help-tooltip/index.d.ts +8 -4
  65. package/help-tooltip/types.d.ts +11 -6
  66. package/horizontal-stepper/index.d.ts +8 -4
  67. package/horizontal-stepper/types.d.ts +37 -38
  68. package/horizontal-stepper-item/index.d.ts +8 -4
  69. package/horizontal-stepper-item/types.d.ts +30 -39
  70. package/icon/index.d.ts +8 -4
  71. package/icon/types.d.ts +18 -28
  72. package/inline-alert/index.d.ts +8 -4
  73. package/inline-alert/types.d.ts +30 -33
  74. package/input/index.d.ts +8 -4
  75. package/input/types.d.ts +54 -89
  76. package/link/index.d.ts +8 -4
  77. package/link/types.d.ts +31 -57
  78. package/list/index.d.ts +7 -4
  79. package/list/types.d.ts +2 -2
  80. package/list-item/index.d.ts +8 -4
  81. package/list-item/types.d.ts +10 -8
  82. package/package.json +3 -3
  83. package/pagination/index.d.ts +8 -4
  84. package/pagination/types.d.ts +31 -27
  85. package/persistent-overlay/index.d.ts +8 -4
  86. package/persistent-overlay/types.d.ts +19 -21
  87. package/pop/index.d.ts +8 -4
  88. package/pop/types.d.ts +13 -23
  89. package/popover/index.d.ts +8 -4
  90. package/popover/types.d.ts +20 -32
  91. package/progress/index.d.ts +8 -4
  92. package/progress/types.d.ts +13 -14
  93. package/progress-stepper/index.d.ts +8 -4
  94. package/progress-stepper/types.d.ts +10 -15
  95. package/progress-stepper-item/index.d.ts +8 -4
  96. package/progress-stepper-item/types.d.ts +35 -44
  97. package/radio/index.d.ts +8 -4
  98. package/radio/types.d.ts +16 -15
  99. package/radio-option/index.d.ts +8 -4
  100. package/radio-option/types.d.ts +35 -40
  101. package/rich-text/index.d.ts +8 -4
  102. package/rich-text/types.d.ts +31 -31
  103. package/rich-text/utils.js +1 -1
  104. package/rich-textarea/index.d.ts +8 -4
  105. package/rich-textarea/types.d.ts +37 -43
  106. package/segment/index.d.ts +8 -4
  107. package/segment/types.d.ts +18 -21
  108. package/segment-collapse/index.d.ts +8 -4
  109. package/segment-collapse/types.d.ts +15 -12
  110. package/segmented-control/index.d.ts +8 -4
  111. package/segmented-control/types.d.ts +11 -8
  112. package/segmented-control-option/index.d.ts +8 -4
  113. package/segmented-control-option/types.d.ts +32 -34
  114. package/segmented-icon-control/index.d.ts +8 -4
  115. package/segmented-icon-control/types.d.ts +11 -10
  116. package/segmented-icon-control-option/index.d.ts +8 -4
  117. package/segmented-icon-control-option/types.d.ts +28 -28
  118. package/select-button/index.d.ts +12 -4
  119. package/select-button/types.d.ts +38 -58
  120. package/select-menu/index.d.ts +8 -4
  121. package/select-menu/index.js +1 -1
  122. package/select-menu/types.d.ts +19 -38
  123. package/select-menu-option/index.d.ts +8 -4
  124. package/select-menu-option/types.d.ts +27 -33
  125. package/select-menu-option/utils.d.ts +2 -2
  126. package/skeleton/index.d.ts +8 -4
  127. package/skeleton/types.d.ts +14 -13
  128. package/skeleton-item/index.d.ts +8 -4
  129. package/skeleton-item/types.d.ts +20 -19
  130. package/spinner/index.d.ts +8 -4
  131. package/spinner/types.d.ts +12 -13
  132. package/table/index.d.ts +7 -4
  133. package/table/types.d.ts +2 -2
  134. package/table-body/index.d.ts +7 -4
  135. package/table-body/types.d.ts +2 -2
  136. package/table-cell/index.d.ts +8 -4
  137. package/table-cell/types.d.ts +11 -10
  138. package/table-head/index.d.ts +7 -4
  139. package/table-head/types.d.ts +2 -2
  140. package/table-head-cell/index.d.ts +8 -4
  141. package/table-head-cell/types.d.ts +15 -18
  142. package/table-row/index.d.ts +8 -4
  143. package/table-row/types.d.ts +14 -15
  144. package/tabs/index.d.ts +8 -4
  145. package/tabs/types.d.ts +19 -16
  146. package/tabs-icon-option/index.d.ts +8 -4
  147. package/tabs-icon-option/types.d.ts +21 -26
  148. package/tabs-option/index.d.ts +8 -4
  149. package/tabs-option/types.d.ts +26 -35
  150. package/tag/index.d.ts +8 -4
  151. package/tag/types.d.ts +22 -35
  152. package/text/index.d.ts +8 -4
  153. package/text/types.d.ts +21 -34
  154. package/textarea/index.d.ts +8 -4
  155. package/textarea/types.d.ts +30 -56
  156. package/tile-control/index.d.ts +8 -4
  157. package/tile-control/types.d.ts +15 -27
  158. package/tile-control-option/index.d.ts +8 -4
  159. package/tile-control-option/types.d.ts +41 -55
  160. package/time-picker/index.d.ts +8 -4
  161. package/time-picker/types.d.ts +42 -47
  162. package/title/index.d.ts +8 -4
  163. package/title/types.d.ts +18 -31
  164. package/toast/index.d.ts +8 -4
  165. package/toast/types.d.ts +31 -39
  166. package/toast-manager/index.d.ts +8 -4
  167. package/toast-manager/types.d.ts +13 -10
  168. package/toggle/index.d.ts +8 -4
  169. package/toggle/types.d.ts +29 -34
  170. package/tooltip/index.d.ts +8 -4
  171. package/tooltip/types.d.ts +25 -39
  172. package/types.d.ts +20 -6
  173. package/utils/adapters.d.ts +30 -0
  174. package/utils/adapters.js +1 -0
  175. package/vertical-stepper/index.d.ts +8 -4
  176. package/vertical-stepper/types.d.ts +29 -30
  177. package/vertical-stepper-item/index.d.ts +8 -4
  178. package/vertical-stepper-item/types.d.ts +34 -43
@@ -1,18 +1,22 @@
1
- import type { TSinchAccordionElement, TSinchAccordionReact } from './types';
1
+ import type { TSinchAccordion } from './types';
2
+ import type { NectaryComponentVanilla, NectaryComponentReact } from '../types';
2
3
  declare global {
4
+ interface NectaryComponentMap {
5
+ 'sinch-accordion': TSinchAccordion;
6
+ }
3
7
  interface HTMLElementTagNameMap {
4
- 'sinch-accordion': TSinchAccordionElement;
8
+ 'sinch-accordion': NectaryComponentVanilla<'sinch-accordion'>;
5
9
  }
6
10
  namespace JSX {
7
11
  interface IntrinsicElements {
8
- 'sinch-accordion': TSinchAccordionReact;
12
+ 'sinch-accordion': NectaryComponentReact<'sinch-accordion'>;
9
13
  }
10
14
  }
11
15
  }
12
16
  declare module 'react' {
13
17
  namespace JSX {
14
18
  interface IntrinsicElements {
15
- 'sinch-accordion': TSinchAccordionReact;
19
+ 'sinch-accordion': NectaryComponentReact<'sinch-accordion'>;
16
20
  }
17
21
  }
18
22
  }
@@ -1,21 +1,16 @@
1
- import type { TSinchElementReact } from '../types';
2
- export type TSinchAccordionElement = HTMLElement & {
3
- /** Value */
4
- value: string;
5
- /** Allows to expand multiple items simultanously */
6
- multiple: boolean;
7
- /** Change value event */
8
- addEventListener(type: '-change', listener: (e: CustomEvent<string>) => void): void;
9
- /** Value */
10
- setAttribute(name: 'value', value: string): void;
11
- /** Allows to expand multiple items simultanously */
12
- setAttribute(name: 'multiple', value: ''): void;
13
- };
14
- export type TSinchAccordionReact = TSinchElementReact<TSinchAccordionElement> & {
1
+ import type { NectaryComponentReactByType, NectaryComponentVanillaByType } from '../types';
2
+ export type TSinchAccordionProps = {
15
3
  /** Value */
16
4
  value: string;
17
5
  multiple?: boolean;
18
- /** Allows to expand multiple items simultanously */
6
+ };
7
+ export type TSinchAccordionEvents = {
19
8
  /** Change value handler */
20
- 'on-change'?: (e: CustomEvent<string>) => void;
9
+ '-change'?: (e: CustomEvent<string>) => void;
10
+ };
11
+ export type TSinchAccordion = {
12
+ props: TSinchAccordionProps;
13
+ events: TSinchAccordionEvents;
21
14
  };
15
+ export type TSinchAccordionElement = NectaryComponentVanillaByType<TSinchAccordion>;
16
+ export type TSinchAccordionReact = NectaryComponentReactByType<TSinchAccordion>;
@@ -1,21 +1,25 @@
1
1
  import '../icon';
2
2
  import '../text';
3
3
  import '../title';
4
- import type { TSinchAccordionItemElement, TSinchAccordionItemReact } from './types';
4
+ import type { TSinchAccordionItem } from './types';
5
+ import type { NectaryComponentVanilla, NectaryComponentReact } from '../types';
5
6
  declare global {
7
+ interface NectaryComponentMap {
8
+ 'sinch-accordion-item': TSinchAccordionItem;
9
+ }
6
10
  interface HTMLElementTagNameMap {
7
- 'sinch-accordion-item': TSinchAccordionItemElement;
11
+ 'sinch-accordion-item': NectaryComponentVanilla<'sinch-accordion-item'>;
8
12
  }
9
13
  namespace JSX {
10
14
  interface IntrinsicElements {
11
- 'sinch-accordion-item': TSinchAccordionItemReact;
15
+ 'sinch-accordion-item': NectaryComponentReact<'sinch-accordion-item'>;
12
16
  }
13
17
  }
14
18
  }
15
19
  declare module 'react' {
16
20
  namespace JSX {
17
21
  interface IntrinsicElements {
18
- 'sinch-accordion-item': TSinchAccordionItemReact;
22
+ 'sinch-accordion-item': NectaryComponentReact<'sinch-accordion-item'>;
19
23
  }
20
24
  }
21
25
  }
@@ -1,28 +1,6 @@
1
- import type { TSinchElementReact } from '../types';
1
+ import type { NectaryComponentReactByType, NectaryComponentVanillaByType } from '../types';
2
2
  export type TSinchAccordionStatusType = 'info' | 'success' | 'warn' | 'error';
3
- export type TSinchAccordionItemElement = HTMLElement & {
4
- /** Value */
5
- value: string;
6
- /** Label */
7
- label: string;
8
- /** Optional text on the right side */
9
- optionalText: string | null;
10
- /** Status */
11
- status: TSinchAccordionStatusType | null;
12
- /** Disabled */
13
- disabled: boolean;
14
- /** Value */
15
- setAttribute(name: 'value', value: string): void;
16
- /** Label */
17
- setAttribute(name: 'label', value: string): void;
18
- /** Optional text on the right side */
19
- setAttribute(name: 'optionaltext', value: string): void;
20
- /** Status */
21
- setAttribute(name: 'status', value: TSinchAccordionStatusType): void;
22
- /** Disabled */
23
- setAttribute(name: 'disabled', value: ''): void;
24
- };
25
- export type TSinchAccordionItemReact = TSinchElementReact<TSinchAccordionItemElement> & {
3
+ export type TSinchAccordionItemProps = {
26
4
  /** Value */
27
5
  value: string;
28
6
  /** Label */
@@ -33,27 +11,32 @@ export type TSinchAccordionItemReact = TSinchElementReact<TSinchAccordionItemEle
33
11
  status?: TSinchAccordionStatusType;
34
12
  /** Disabled */
35
13
  disabled?: boolean;
36
- } & {
37
- style?: {
38
- '--sinch-comp-accordion-color-default-border-initial'?: string;
39
- '--sinch-comp-accordion-color-default-icon-initial'?: string;
40
- '--sinch-comp-accordion-color-default-title-initial'?: string;
41
- '--sinch-comp-accordion-color-default-optional-text-initial'?: string;
42
- '--sinch-comp-accordion-color-default-outline-focus'?: string;
43
- '--sinch-comp-accordion-color-default-status-success'?: string;
44
- '--sinch-comp-accordion-color-default-status-warning'?: string;
45
- '--sinch-comp-accordion-color-default-status-error'?: string;
46
- '--sinch-comp-accordion-color-default-status-info'?: string;
47
- '--sinch-comp-accordion-color-disabled-icon-initial'?: string;
48
- '--sinch-comp-accordion-color-disabled-title-initial'?: string;
49
- '--sinch-comp-accordion-color-disabled-optional-text-initial'?: string;
50
- '--sinch-comp-accordion-font-title'?: string;
51
- '--sinch-comp-accordion-font-optional-text'?: string;
52
- '--sinch-comp-accordion-size-icon'?: string;
53
- '--sinch-global-color-icon'?: string;
54
- '--sinch-global-size-icon'?: string;
55
- '--sinch-global-color-text'?: string;
56
- '--sinch-comp-title-font'?: string;
57
- '--sinch-comp-text-font'?: string;
58
- };
59
14
  };
15
+ export type TSinchAccordionItemStyle = {
16
+ '--sinch-comp-accordion-color-default-border-initial'?: string;
17
+ '--sinch-comp-accordion-color-default-icon-initial'?: string;
18
+ '--sinch-comp-accordion-color-default-title-initial'?: string;
19
+ '--sinch-comp-accordion-color-default-optional-text-initial'?: string;
20
+ '--sinch-comp-accordion-color-default-outline-focus'?: string;
21
+ '--sinch-comp-accordion-color-default-status-success'?: string;
22
+ '--sinch-comp-accordion-color-default-status-warning'?: string;
23
+ '--sinch-comp-accordion-color-default-status-error'?: string;
24
+ '--sinch-comp-accordion-color-default-status-info'?: string;
25
+ '--sinch-comp-accordion-color-disabled-icon-initial'?: string;
26
+ '--sinch-comp-accordion-color-disabled-title-initial'?: string;
27
+ '--sinch-comp-accordion-color-disabled-optional-text-initial'?: string;
28
+ '--sinch-comp-accordion-font-title'?: string;
29
+ '--sinch-comp-accordion-font-optional-text'?: string;
30
+ '--sinch-comp-accordion-size-icon'?: string;
31
+ '--sinch-global-color-icon'?: string;
32
+ '--sinch-global-size-icon'?: string;
33
+ '--sinch-global-color-text'?: string;
34
+ '--sinch-comp-title-font'?: string;
35
+ '--sinch-comp-text-font'?: string;
36
+ };
37
+ export type TSinchAccordionItem = {
38
+ props: TSinchAccordionItemProps;
39
+ style: TSinchAccordionItemStyle;
40
+ };
41
+ export type TSinchAccordionItemElement = NectaryComponentVanillaByType<TSinchAccordionItem>;
42
+ export type TSinchAccordionItemReact = NectaryComponentReactByType<TSinchAccordionItem>;
@@ -1,18 +1,22 @@
1
- import type { TSinchActionMenuElement, TSinchActionMenuReact } from './types';
1
+ import type { TSinchActionMenu } from './types';
2
+ import type { NectaryComponentVanilla, NectaryComponentReact } from '../types';
2
3
  declare global {
4
+ interface NectaryComponentMap {
5
+ 'sinch-action-menu': TSinchActionMenu;
6
+ }
3
7
  interface HTMLElementTagNameMap {
4
- 'sinch-action-menu': TSinchActionMenuElement;
8
+ 'sinch-action-menu': NectaryComponentVanilla<'sinch-action-menu'>;
5
9
  }
6
10
  namespace JSX {
7
11
  interface IntrinsicElements {
8
- 'sinch-action-menu': TSinchActionMenuReact;
12
+ 'sinch-action-menu': NectaryComponentReact<'sinch-action-menu'>;
9
13
  }
10
14
  }
11
15
  }
12
16
  declare module 'react' {
13
17
  namespace JSX {
14
18
  interface IntrinsicElements {
15
- 'sinch-action-menu': TSinchActionMenuReact;
19
+ 'sinch-action-menu': NectaryComponentReact<'sinch-action-menu'>;
16
20
  }
17
21
  }
18
22
  }
@@ -1,13 +1,12 @@
1
- import type { TSinchElementReact } from '../types';
2
- export type TSinchActionMenuElement = HTMLElement & {
3
- /** How many rows to show and scroll the rest */
4
- rows: number | null;
5
- /** How many rows to show and scroll the rest */
6
- setAttribute(name: 'rows', value: string): void;
7
- };
8
- export type TSinchActionMenuReact = TSinchElementReact<TSinchActionMenuElement> & {
1
+ import type { NectaryComponentReactByType, NectaryComponentVanillaByType } from '../types';
2
+ export type TSinchActionMenuProps = {
9
3
  /** How many rows to show and scroll the rest */
10
4
  rows?: number;
11
5
  /** Label that is used for a11y */
12
6
  'aria-label': string;
13
7
  };
8
+ export type TSinchActionMenu = {
9
+ props: TSinchActionMenuProps;
10
+ };
11
+ export type TSinchActionMenuElement = NectaryComponentVanillaByType<TSinchActionMenu>;
12
+ export type TSinchActionMenuReact = NectaryComponentReactByType<TSinchActionMenu>;
@@ -1,19 +1,23 @@
1
1
  import '../text';
2
- import type { TSinchActionMenuOptionElement, TSinchActionMenuOptionReact } from './types';
2
+ import type { TSinchActionMenuOption } from './types';
3
+ import type { NectaryComponentReact, NectaryComponentVanilla } from '../types';
3
4
  declare global {
5
+ interface NectaryComponentMap {
6
+ 'sinch-action-menu-option': TSinchActionMenuOption;
7
+ }
4
8
  interface HTMLElementTagNameMap {
5
- 'sinch-action-menu-option': TSinchActionMenuOptionElement;
9
+ 'sinch-action-menu-option': NectaryComponentVanilla<'sinch-action-menu-option'>;
6
10
  }
7
11
  namespace JSX {
8
12
  interface IntrinsicElements {
9
- 'sinch-action-menu-option': TSinchActionMenuOptionReact;
13
+ 'sinch-action-menu-option': NectaryComponentReact<'sinch-action-menu-option'>;
10
14
  }
11
15
  }
12
16
  }
13
17
  declare module 'react' {
14
18
  namespace JSX {
15
19
  interface IntrinsicElements {
16
- 'sinch-action-menu-option': TSinchActionMenuOptionReact;
20
+ 'sinch-action-menu-option': NectaryComponentReact<'sinch-action-menu-option'>;
17
21
  }
18
22
  }
19
23
  }
@@ -1,40 +1,36 @@
1
- import type { TSinchElementReact } from '../types';
2
- export type TSinchActionMenuOptionElement = HTMLElement & {
3
- /** Display text */
4
- text: string;
5
- /** Disabled state */
6
- disabled: boolean;
7
- /** Click event */
8
- addEventListener(type: '-click', listener: (e: CustomEvent<void>) => void): void;
9
- /** Display text */
10
- setAttribute(name: 'text', value: string): void;
11
- /** Disabled state */
12
- setAttribute(name: 'disabled', value: ''): void;
13
- };
14
- export type TSinchActionMenuOptionReact = TSinchElementReact<TSinchActionMenuOptionElement> & {
1
+ import type { NectaryComponentReactByType, NectaryComponentVanillaByType } from '../types';
2
+ export type TSinchActionMenuOptionProps = {
15
3
  /** Display text */
16
4
  text: string;
17
5
  /** Disabled state */
18
6
  disabled?: boolean;
19
7
  /** Label that is used for a11y */
20
8
  'aria-label': string;
9
+ };
10
+ export type TSinchActionMenuOptionEvents = {
21
11
  /** Click event handler */
22
- 'on-click'?: (e: CustomEvent<void>) => void;
23
- } & {
24
- style?: {
25
- '--sinch-comp-action-menu-color-default-background-initial'?: string;
26
- '--sinch-comp-action-menu-color-default-background-selected'?: string;
27
- '--sinch-comp-action-menu-color-default-background-hover'?: string;
28
- '--sinch-comp-action-menu-color-default-text-initial'?: string;
29
- '--sinch-comp-action-menu-color-default-icon-initial'?: string;
30
- '--sinch-comp-action-menu-color-disabled-background-initial'?: string;
31
- '--sinch-comp-action-menu-color-disabled-text-initial'?: string;
32
- '--sinch-comp-action-menu-color-disabled-icon-initial'?: string;
33
- '--sinch-comp-action-menu-font-option'?: string;
34
- '--sinch-comp-action-menu-size-icon'?: string;
35
- '--sinch-global-color-text'?: string;
36
- '--sinch-global-color-icon'?: string;
37
- '--sinch-global-size-icon'?: string;
38
- '--sinch-comp-text-font'?: string;
39
- };
12
+ '-click'?: (e: CustomEvent<void>) => void;
13
+ };
14
+ export type TSinchActionMenuOptionStyle = {
15
+ '--sinch-comp-action-menu-color-default-background-initial'?: string;
16
+ '--sinch-comp-action-menu-color-default-background-selected'?: string;
17
+ '--sinch-comp-action-menu-color-default-background-hover'?: string;
18
+ '--sinch-comp-action-menu-color-default-text-initial'?: string;
19
+ '--sinch-comp-action-menu-color-default-icon-initial'?: string;
20
+ '--sinch-comp-action-menu-color-disabled-background-initial'?: string;
21
+ '--sinch-comp-action-menu-color-disabled-text-initial'?: string;
22
+ '--sinch-comp-action-menu-color-disabled-icon-initial'?: string;
23
+ '--sinch-comp-action-menu-font-option'?: string;
24
+ '--sinch-comp-action-menu-size-icon'?: string;
25
+ '--sinch-global-color-text'?: string;
26
+ '--sinch-global-color-icon'?: string;
27
+ '--sinch-global-size-icon'?: string;
28
+ '--sinch-comp-text-font'?: string;
29
+ };
30
+ export type TSinchActionMenuOption = {
31
+ props: TSinchActionMenuOptionProps;
32
+ events: TSinchActionMenuOptionEvents;
33
+ style: TSinchActionMenuOptionStyle;
40
34
  };
35
+ export type TSinchActionMenuOptionElement = NectaryComponentVanillaByType<TSinchActionMenuOption>;
36
+ export type TSinchActionMenuOptionReact = NectaryComponentReactByType<TSinchActionMenuOption>;
@@ -1,2 +1 @@
1
- import type { TSinchActionMenuOptionElement } from './types';
2
- export declare const isSinchActionMenuOption: (el: EventTarget | null) => el is TSinchActionMenuOptionElement;
1
+ export declare const isSinchActionMenuOption: (el: EventTarget | null) => el is HTMLElementTagNameMap["sinch-action-menu-option"];
package/alert/index.d.ts CHANGED
@@ -1,21 +1,25 @@
1
1
  import '../icon';
2
2
  import '../rich-text';
3
3
  import '../text';
4
- import type { TSinchAlertElement, TSinchAlertReact } from './types';
4
+ import type { TSinchAlert } from './types';
5
+ import type { NectaryComponentReact, NectaryComponentVanilla } from '../types';
5
6
  declare global {
7
+ interface NectaryComponentMap {
8
+ 'sinch-alert': TSinchAlert;
9
+ }
6
10
  interface HTMLElementTagNameMap {
7
- 'sinch-alert': TSinchAlertElement;
11
+ 'sinch-alert': NectaryComponentVanilla<'sinch-alert'>;
8
12
  }
9
13
  namespace JSX {
10
14
  interface IntrinsicElements {
11
- 'sinch-alert': TSinchAlertReact;
15
+ 'sinch-alert': NectaryComponentReact<'sinch-alert'>;
12
16
  }
13
17
  }
14
18
  }
15
19
  declare module 'react' {
16
20
  namespace JSX {
17
21
  interface IntrinsicElements {
18
- 'sinch-alert': TSinchAlertReact;
22
+ 'sinch-alert': NectaryComponentReact<'sinch-alert'>;
19
23
  }
20
24
  }
21
25
  }
package/alert/types.d.ts CHANGED
@@ -1,34 +1,29 @@
1
- import type { TSinchElementReact } from '../types';
1
+ import type { NectaryComponentReactByType, NectaryComponentVanillaByType } from '../types';
2
2
  export type TSinchAlertType = 'info' | 'warn' | 'error';
3
- export type TSinchAlertElement = HTMLElement & {
3
+ export type TSinchAlertProps = {
4
4
  /** Type */
5
5
  type: TSinchAlertType;
6
6
  /** Text */
7
7
  text: string;
8
- /** Type */
9
- setAttribute(name: 'type', value: TSinchAlertType): void;
10
- /** Text */
11
- setAttribute(name: 'text', value: string): void;
12
8
  };
13
- export type TSinchAlertReact = TSinchElementReact<TSinchAlertElement> & {
14
- /** Type */
15
- type: TSinchAlertType;
16
- /** Text */
17
- text: string;
18
- } & {
19
- style?: {
20
- '--sinch-comp-alert-color-warning-default-background'?: string;
21
- '--sinch-comp-alert-color-warning-default-icon'?: string;
22
- '--sinch-comp-alert-color-warning-default-text'?: string;
23
- '--sinch-comp-alert-color-error-default-background'?: string;
24
- '--sinch-comp-alert-color-error-default-icon'?: string;
25
- '--sinch-comp-alert-color-error-default-text'?: string;
26
- '--sinch-comp-alert-color-info-default-background'?: string;
27
- '--sinch-comp-alert-color-info-default-icon'?: string;
28
- '--sinch-comp-alert-color-info-default-text'?: string;
29
- '--sinch-comp-alert-font-body'?: string;
30
- '--sinch-global-color-icon'?: string;
31
- '--sinch-global-color-text'?: string;
32
- '--sinch-comp-rich-text-font'?: string;
33
- };
9
+ export type TSinchAlertStyle = {
10
+ '--sinch-comp-alert-color-warning-default-background'?: string;
11
+ '--sinch-comp-alert-color-warning-default-icon'?: string;
12
+ '--sinch-comp-alert-color-warning-default-text'?: string;
13
+ '--sinch-comp-alert-color-error-default-background'?: string;
14
+ '--sinch-comp-alert-color-error-default-icon'?: string;
15
+ '--sinch-comp-alert-color-error-default-text'?: string;
16
+ '--sinch-comp-alert-color-info-default-background'?: string;
17
+ '--sinch-comp-alert-color-info-default-icon'?: string;
18
+ '--sinch-comp-alert-color-info-default-text'?: string;
19
+ '--sinch-comp-alert-font-body'?: string;
20
+ '--sinch-global-color-icon'?: string;
21
+ '--sinch-global-color-text'?: string;
22
+ '--sinch-comp-rich-text-font'?: string;
23
+ };
24
+ export type TSinchAlert = {
25
+ props: TSinchAlertProps;
26
+ style: TSinchAlertStyle;
34
27
  };
28
+ export type TSinchAlertElement = NectaryComponentVanillaByType<TSinchAlert>;
29
+ export type TSinchAlertReact = NectaryComponentReactByType<TSinchAlert>;
package/avatar/index.d.ts CHANGED
@@ -1,18 +1,22 @@
1
- import type { TSinchAvatarElement, TSinchAvatarReact } from './types';
1
+ import type { TSinchAvatar } from './types';
2
+ import type { NectaryComponentReact, NectaryComponentVanilla } from '../types';
2
3
  declare global {
4
+ interface NectaryComponentMap {
5
+ 'sinch-avatar': TSinchAvatar;
6
+ }
3
7
  interface HTMLElementTagNameMap {
4
- 'sinch-avatar': TSinchAvatarElement;
8
+ 'sinch-avatar': NectaryComponentVanilla<'sinch-avatar'>;
5
9
  }
6
10
  namespace JSX {
7
11
  interface IntrinsicElements {
8
- 'sinch-avatar': TSinchAvatarReact;
12
+ 'sinch-avatar': NectaryComponentReact<'sinch-avatar'>;
9
13
  }
10
14
  }
11
15
  }
12
16
  declare module 'react' {
13
17
  namespace JSX {
14
18
  interface IntrinsicElements {
15
- 'sinch-avatar': TSinchAvatarReact;
19
+ 'sinch-avatar': NectaryComponentReact<'sinch-avatar'>;
16
20
  }
17
21
  }
18
22
  }
package/avatar/types.d.ts CHANGED
@@ -1,31 +1,9 @@
1
1
  import type { TSinchAvatarColor } from './colors';
2
- import type { TSinchElementReact } from '../types';
2
+ import type { NectaryComponentReactByType, NectaryComponentVanillaByType } from '../types';
3
3
  import type { TSinchSize } from '../utils/size';
4
4
  export type { TSinchAvatarColor };
5
5
  export type TSinchAvatarStatus = 'online' | 'busy' | 'away' | 'offline';
6
- export type TSinchAvatarElement = HTMLElement & {
7
- /** Image source */
8
- src: string | null;
9
- /** Alt text */
10
- alt: string;
11
- /** Background color */
12
- color: TSinchAvatarColor | null;
13
- /** Status */
14
- status: TSinchAvatarStatus | null;
15
- /** Size, `m` by default */
16
- size: TSinchSize;
17
- /** Image source */
18
- setAttribute(name: 'src', value: string): void;
19
- /** Alt text */
20
- setAttribute(name: 'alt', value: string): void;
21
- /** Background color */
22
- setAttribute(name: 'color', value: string): void;
23
- /** Size, `m` by default */
24
- setAttribute(name: 'size', value: TSinchSize): void;
25
- /** Status */
26
- setAttribute(name: 'status', value: TSinchAvatarStatus): void;
27
- };
28
- export type TSinchAvatarReact = TSinchElementReact<TSinchAvatarElement> & {
6
+ export type TSinchAvatarProps = {
29
7
  /** Image source */
30
8
  src?: string;
31
9
  /** Alt text */
@@ -36,22 +14,27 @@ export type TSinchAvatarReact = TSinchElementReact<TSinchAvatarElement> & {
36
14
  size?: TSinchSize;
37
15
  /** Status */
38
16
  status?: TSinchAvatarStatus;
39
- } & {
40
- style?: {
41
- '--sinch-comp-avatar-container-color-default-background'?: string;
42
- '--sinch-comp-avatar-container-color-default-foreground'?: string;
43
- '--sinch-comp-avatar-border-color-default-initial'?: string;
44
- '--sinch-comp-avatar-status-color-online-default-background'?: string;
45
- '--sinch-comp-avatar-status-color-away-default-background'?: string;
46
- '--sinch-comp-avatar-status-color-busy-default-background'?: string;
47
- '--sinch-comp-avatar-status-color-offline-default-background'?: string;
48
- '--sinch-comp-avatar-shape-radius'?: string;
49
- '--sinch-comp-avatar-size-s'?: string;
50
- '--sinch-comp-avatar-size-m'?: string;
51
- '--sinch-comp-avatar-size-l'?: string;
52
- '--sinch-comp-avatar-container-font-size-s-text'?: string;
53
- '--sinch-comp-avatar-container-font-size-m-text'?: string;
54
- '--sinch-comp-avatar-container-font-size-l-text'?: string;
55
- '--sinch-local-size'?: string;
56
- };
57
17
  };
18
+ export type TSinchAvatarStyle = {
19
+ '--sinch-comp-avatar-container-color-default-background'?: string;
20
+ '--sinch-comp-avatar-container-color-default-foreground'?: string;
21
+ '--sinch-comp-avatar-border-color-default-initial'?: string;
22
+ '--sinch-comp-avatar-status-color-online-default-background'?: string;
23
+ '--sinch-comp-avatar-status-color-away-default-background'?: string;
24
+ '--sinch-comp-avatar-status-color-busy-default-background'?: string;
25
+ '--sinch-comp-avatar-status-color-offline-default-background'?: string;
26
+ '--sinch-comp-avatar-shape-radius'?: string;
27
+ '--sinch-comp-avatar-size-s'?: string;
28
+ '--sinch-comp-avatar-size-m'?: string;
29
+ '--sinch-comp-avatar-size-l'?: string;
30
+ '--sinch-comp-avatar-container-font-size-s-text'?: string;
31
+ '--sinch-comp-avatar-container-font-size-m-text'?: string;
32
+ '--sinch-comp-avatar-container-font-size-l-text'?: string;
33
+ '--sinch-local-size'?: string;
34
+ };
35
+ export type TSinchAvatar = {
36
+ props: TSinchAvatarProps;
37
+ style: TSinchAvatarStyle;
38
+ };
39
+ export type TSinchAvatarElement = NectaryComponentVanillaByType<TSinchAvatar>;
40
+ export type TSinchAvatarReact = NectaryComponentReactByType<TSinchAvatar>;
package/badge/index.d.ts CHANGED
@@ -1,18 +1,22 @@
1
- import type { TSinchBadgeElement, TSinchBadgeReact } from './types';
1
+ import type { TSinchBadge } from './types';
2
+ import type { NectaryComponentReact, NectaryComponentVanilla } from '../types';
2
3
  declare global {
4
+ interface NectaryComponentMap {
5
+ 'sinch-badge': TSinchBadge;
6
+ }
3
7
  interface HTMLElementTagNameMap {
4
- 'sinch-badge': TSinchBadgeElement;
8
+ 'sinch-badge': NectaryComponentVanilla<'sinch-badge'>;
5
9
  }
6
10
  namespace JSX {
7
11
  interface IntrinsicElements {
8
- 'sinch-badge': TSinchBadgeReact;
12
+ 'sinch-badge': NectaryComponentReact<'sinch-badge'>;
9
13
  }
10
14
  }
11
15
  }
12
16
  declare module 'react' {
13
17
  namespace JSX {
14
18
  interface IntrinsicElements {
15
- 'sinch-badge': TSinchBadgeReact;
19
+ 'sinch-badge': NectaryComponentReact<'sinch-badge'>;
16
20
  }
17
21
  }
18
22
  }
package/badge/types.d.ts CHANGED
@@ -1,28 +1,7 @@
1
- import type { TRect, TSinchElementReact } from '../types';
1
+ import type { NectaryComponentReactByType, NectaryComponentVanillaByType, TRect } from '../types';
2
2
  import type { TSinchSize } from '../utils/size';
3
3
  export type TSinchBadgeMode = 'square' | 'circle';
4
- export type TSinchBadgeElement = HTMLElement & {
5
- /** Text */
6
- text: string;
7
- /** Size */
8
- size: TSinchSize;
9
- /** Mode, `square` by default */
10
- mode: TSinchBadgeMode;
11
- /** Hidden */
12
- hidden: boolean;
13
- readonly badgeRect: TRect;
14
- /** Text */
15
- setAttribute(name: 'text', value: string): void;
16
- /** Size */
17
- setAttribute(name: 'size', value: TSinchSize): void;
18
- /** Mode, `square` by default */
19
- setAttribute(name: 'mode', value: TSinchBadgeMode): void;
20
- /** Color */
21
- setAttribute(name: 'color', value: string): void;
22
- /** Hidden */
23
- setAttribute(name: 'hidden', value: ''): void;
24
- };
25
- export type TSinchBadgeReact = TSinchElementReact<TSinchBadgeElement> & {
4
+ export type TSinchBadgeProps = {
26
5
  /** Text */
27
6
  text: string;
28
7
  /** Size */
@@ -31,13 +10,20 @@ export type TSinchBadgeReact = TSinchElementReact<TSinchBadgeElement> & {
31
10
  mode?: TSinchBadgeMode;
32
11
  /** Hidden */
33
12
  hidden?: boolean;
34
- } & {
35
- style?: {
36
- '--sinch-comp-badge-color-border'?: string;
37
- '--sinch-comp-badge-color-text'?: string;
38
- '--sinch-comp-badge-color-background'?: string;
39
- '--sinch-comp-badge-shape-radius'?: string;
40
- '--sinch-comp-badge-font-size-l'?: string;
41
- '--sinch-comp-badge-font-size-m'?: string;
42
- };
13
+ /** Badge rect */
14
+ readonly badgeRect?: TRect;
15
+ };
16
+ export type TSinchBadgeStyle = {
17
+ '--sinch-comp-badge-color-border'?: string;
18
+ '--sinch-comp-badge-color-text'?: string;
19
+ '--sinch-comp-badge-color-background'?: string;
20
+ '--sinch-comp-badge-shape-radius'?: string;
21
+ '--sinch-comp-badge-font-size-l'?: string;
22
+ '--sinch-comp-badge-font-size-m'?: string;
23
+ };
24
+ export type TSinchBadge = {
25
+ props: TSinchBadgeProps;
26
+ style: TSinchBadgeStyle;
43
27
  };
28
+ export type TSinchBadgeElement = NectaryComponentVanillaByType<TSinchBadge>;
29
+ export type TSinchBadgeReact = NectaryComponentReactByType<TSinchBadge>;
package/button/index.d.ts CHANGED
@@ -1,18 +1,22 @@
1
- import type { TSinchButtonElement, TSinchButtonReact } from './types';
1
+ import type { TSinchButton } from './types';
2
+ import type { NectaryComponentReact, NectaryComponentVanilla } from '../types';
2
3
  declare global {
4
+ interface NectaryComponentMap {
5
+ 'sinch-button': TSinchButton;
6
+ }
3
7
  interface HTMLElementTagNameMap {
4
- 'sinch-button': TSinchButtonElement;
8
+ 'sinch-button': NectaryComponentVanilla<'sinch-button'>;
5
9
  }
6
10
  namespace JSX {
7
11
  interface IntrinsicElements {
8
- 'sinch-button': TSinchButtonReact;
12
+ 'sinch-button': NectaryComponentReact<'sinch-button'>;
9
13
  }
10
14
  }
11
15
  }
12
16
  declare module 'react' {
13
17
  namespace JSX {
14
18
  interface IntrinsicElements {
15
- 'sinch-button': TSinchButtonReact;
19
+ 'sinch-button': NectaryComponentReact<'sinch-button'>;
16
20
  }
17
21
  }
18
22
  }