@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,36 +1,6 @@
1
- import type { TSinchElementReact } from '../types';
1
+ import type { NectaryComponentReactByType, NectaryComponentVanillaByType } from '../types';
2
2
  export type TSinchFileDropInvalidType = 'accept' | 'multiple' | 'size';
3
- export type TSinchFileDropElement = HTMLElement & {
4
- /** Allows to choose multiple files */
5
- multiple: boolean;
6
- /** [A unique file type specifier](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#unique_file_type_specifiers) */
7
- accept: string | null;
8
- /** Max file size in bytes */
9
- size: number | null;
10
- /** Disabled state */
11
- disabled: boolean;
12
- /** Invalid state */
13
- invalid: boolean;
14
- /** Placeholder */
15
- placeholder: string;
16
- /** Change value event */
17
- addEventListener(type: '-change', listener: (e: CustomEvent<File[]>) => void): void;
18
- /** Invalid event */
19
- addEventListener(type: '-invalid', listener: (e: CustomEvent<TSinchFileDropInvalidType>) => void): void;
20
- /** Allows to choose multiple files */
21
- setAttribute(name: 'multiple', value: ''): void;
22
- /** [A unique file type specifier](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#unique_file_type_specifiers) */
23
- setAttribute(name: 'accept', value: string): void;
24
- /** Max file size in bytes */
25
- setAttribute(name: 'size', value: string): void;
26
- /** Placeholder */
27
- setAttribute(name: 'placeholder', value: string): void;
28
- /** Invalid state */
29
- setAttribute(name: 'invalid', value: ''): void;
30
- /** Disabled state */
31
- setAttribute(name: 'disabled', value: ''): void;
32
- };
33
- export type TSinchFileDropReact = TSinchElementReact<TSinchFileDropElement> & {
3
+ export type TSinchFileDropProps = {
34
4
  /** Allows to choose multiple files */
35
5
  multiple?: boolean;
36
6
  /** [A unique file type specifier](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#unique_file_type_specifiers) */
@@ -43,29 +13,37 @@ export type TSinchFileDropReact = TSinchElementReact<TSinchFileDropElement> & {
43
13
  invalid?: boolean;
44
14
  /** Placeholder */
45
15
  placeholder: string;
16
+ };
17
+ export type TSinchFileDropEvents = {
46
18
  /** Change value handler */
47
- 'on-change': (e: CustomEvent<File[]>) => void;
19
+ '-change': (e: CustomEvent<File[]>) => void;
48
20
  /** Invalid handler */
49
- 'on-invalid': (e: CustomEvent<TSinchFileDropInvalidType>) => void;
50
- } & {
51
- style?: {
52
- '--sinch-comp-file-drop-shape-radius'?: string;
53
- '--sinch-comp-file-drop-font-placeholder'?: string;
54
- '--sinch-comp-file-drop-color-default-background-initial'?: string;
55
- '--sinch-comp-file-drop-color-default-background-active'?: string;
56
- '--sinch-comp-file-drop-color-default-border-initial'?: string;
57
- '--sinch-comp-file-drop-color-default-border-active'?: string;
58
- '--sinch-comp-file-drop-color-default-placeholder-initial'?: string;
59
- '--sinch-comp-file-drop-color-default-placeholder-active'?: string;
60
- '--sinch-comp-file-drop-color-invalid-background-initial'?: string;
61
- '--sinch-comp-file-drop-color-invalid-background-active'?: string;
62
- '--sinch-comp-file-drop-color-invalid-border-initial'?: string;
63
- '--sinch-comp-file-drop-color-invalid-border-active'?: string;
64
- '--sinch-comp-file-drop-color-invalid-placeholder-active'?: string;
65
- '--sinch-comp-file-drop-color-disabled-background-initial'?: string;
66
- '--sinch-comp-file-drop-color-disabled-border-initial'?: string;
67
- '--sinch-comp-file-drop-color-disabled-placeholder-initial'?: string;
68
- '--sinch-global-color-text'?: string;
69
- '--sinch-comp-text-font'?: string;
70
- };
21
+ '-invalid': (e: CustomEvent<TSinchFileDropInvalidType>) => void;
22
+ };
23
+ export type TSinchFileDropStyle = {
24
+ '--sinch-comp-file-drop-shape-radius'?: string;
25
+ '--sinch-comp-file-drop-font-placeholder'?: string;
26
+ '--sinch-comp-file-drop-color-default-background-initial'?: string;
27
+ '--sinch-comp-file-drop-color-default-background-active'?: string;
28
+ '--sinch-comp-file-drop-color-default-border-initial'?: string;
29
+ '--sinch-comp-file-drop-color-default-border-active'?: string;
30
+ '--sinch-comp-file-drop-color-default-placeholder-initial'?: string;
31
+ '--sinch-comp-file-drop-color-default-placeholder-active'?: string;
32
+ '--sinch-comp-file-drop-color-invalid-background-initial'?: string;
33
+ '--sinch-comp-file-drop-color-invalid-background-active'?: string;
34
+ '--sinch-comp-file-drop-color-invalid-border-initial'?: string;
35
+ '--sinch-comp-file-drop-color-invalid-border-active'?: string;
36
+ '--sinch-comp-file-drop-color-invalid-placeholder-active'?: string;
37
+ '--sinch-comp-file-drop-color-disabled-background-initial'?: string;
38
+ '--sinch-comp-file-drop-color-disabled-border-initial'?: string;
39
+ '--sinch-comp-file-drop-color-disabled-placeholder-initial'?: string;
40
+ '--sinch-global-color-text'?: string;
41
+ '--sinch-comp-text-font'?: string;
42
+ };
43
+ export type TSinchFileDrop = {
44
+ props: TSinchFileDropProps;
45
+ events: TSinchFileDropEvents;
46
+ style: TSinchFileDropStyle;
71
47
  };
48
+ export type TSinchFileDropElement = NectaryComponentVanillaByType<TSinchFileDrop>;
49
+ export type TSinchFileDropReact = NectaryComponentReactByType<TSinchFileDrop>;
@@ -1,18 +1,22 @@
1
- import type { TSinchFilePickerElement, TSinchFilePickerReact } from './types';
1
+ import type { TSinchFilePicker } from './types';
2
+ import type { NectaryComponentVanilla, NectaryComponentReact } from '../types';
2
3
  declare global {
4
+ interface NectaryComponentMap {
5
+ 'sinch-file-picker': TSinchFilePicker;
6
+ }
3
7
  interface HTMLElementTagNameMap {
4
- 'sinch-file-picker': TSinchFilePickerElement;
8
+ 'sinch-file-picker': NectaryComponentVanilla<'sinch-file-picker'>;
5
9
  }
6
10
  namespace JSX {
7
11
  interface IntrinsicElements {
8
- 'sinch-file-picker': TSinchFilePickerReact;
12
+ 'sinch-file-picker': NectaryComponentReact<'sinch-file-picker'>;
9
13
  }
10
14
  }
11
15
  }
12
16
  declare module 'react' {
13
17
  namespace JSX {
14
18
  interface IntrinsicElements {
15
- 'sinch-file-picker': TSinchFilePickerReact;
19
+ 'sinch-file-picker': NectaryComponentReact<'sinch-file-picker'>;
16
20
  }
17
21
  }
18
22
  }
@@ -1,32 +1,22 @@
1
- import type { TSinchElementReact } from '../types';
1
+ import type { NectaryComponentReactByType, NectaryComponentVanillaByType } from '../types';
2
2
  export type TSinchFilePickerInvalidType = 'size';
3
- export type TSinchFilePickerElement = HTMLElement & {
4
- /** Allows to choose multiple files */
5
- multiple: boolean;
6
- /** [A unique file type specifier](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#unique_file_type_specifiers) */
7
- accept: string | null;
8
- /** Max file size in bytes */
9
- size: number | null;
10
- /** Change value event */
11
- addEventListener(type: '-change', listener: (e: CustomEvent<File[]>) => void): void;
12
- /** Invalid event */
13
- addEventListener(type: '-invalid', listener: (e: CustomEvent<TSinchFilePickerInvalidType>) => void): void;
14
- /** Allows to choose multiple files */
15
- setAttribute(name: 'multiple', value: ''): void;
16
- /** [A unique file type specifier](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#unique_file_type_specifiers) */
17
- setAttribute(name: 'accept', value: string): void;
18
- /** Max file size in bytes */
19
- setAttribute(name: 'size', value: string): void;
20
- };
21
- export type TSinchFilePickerReact = TSinchElementReact<TSinchFilePickerElement> & {
3
+ export type TSinchFilePickerProps = {
22
4
  /** Allows to choose multiple files */
23
5
  multiple?: boolean;
24
6
  /** [A unique file type specifier](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#unique_file_type_specifiers) */
25
7
  accept?: string;
26
8
  /** Max file size in bytes */
27
9
  size?: number;
10
+ };
11
+ export type TSinchFilePickerEvents = {
28
12
  /** Change value handler */
29
- 'on-change': (e: CustomEvent<File[]>) => void;
13
+ '-change': (e: CustomEvent<File[]>) => void;
30
14
  /** Invalid handler */
31
- 'on-invalid': (e: CustomEvent<TSinchFilePickerInvalidType>) => void;
15
+ '-invalid': (e: CustomEvent<TSinchFilePickerInvalidType>) => void;
16
+ };
17
+ export type TSinchFilePicker = {
18
+ props: TSinchFilePickerProps;
19
+ events: TSinchFilePickerEvents;
32
20
  };
21
+ export type TSinchFilePickerElement = NectaryComponentVanillaByType<TSinchFilePicker>;
22
+ export type TSinchFilePickerReact = NectaryComponentReactByType<TSinchFilePicker>;
@@ -1,21 +1,25 @@
1
1
  import '../spinner';
2
2
  import '../icon';
3
3
  import '../text';
4
- import type { TSinchFileStatusElement, TSinchFileStatusReact } from './types';
4
+ import type { TSinchFileStatus } from './types';
5
+ import type { NectaryComponentVanilla, NectaryComponentReact } from '../types';
5
6
  declare global {
7
+ interface NectaryComponentMap {
8
+ 'sinch-file-status': TSinchFileStatus;
9
+ }
6
10
  interface HTMLElementTagNameMap {
7
- 'sinch-file-status': TSinchFileStatusElement;
11
+ 'sinch-file-status': NectaryComponentVanilla<'sinch-file-status'>;
8
12
  }
9
13
  namespace JSX {
10
14
  interface IntrinsicElements {
11
- 'sinch-file-status': TSinchFileStatusReact;
15
+ 'sinch-file-status': NectaryComponentReact<'sinch-file-status'>;
12
16
  }
13
17
  }
14
18
  }
15
19
  declare module 'react' {
16
20
  namespace JSX {
17
21
  interface IntrinsicElements {
18
- 'sinch-file-status': TSinchFileStatusReact;
22
+ 'sinch-file-status': NectaryComponentReact<'sinch-file-status'>;
19
23
  }
20
24
  }
21
25
  }
@@ -1,39 +1,34 @@
1
- import type { TSinchElementReact } from '../types';
1
+ import type { NectaryComponentReactByType, NectaryComponentVanillaByType } from '../types';
2
2
  export type TSinchFileStatusType = 'pending' | 'loading' | 'progress' | 'success' | 'error';
3
- export type TSinchFileStatusElement = HTMLElement & {
3
+ export type TSinchFileStatusProps = {
4
4
  /** File status type */
5
5
  type: TSinchFileStatusType;
6
6
  /** File name */
7
7
  filename: string;
8
- /** File status type */
9
- setAttribute(name: 'type', value: TSinchFileStatusType): void;
10
- /** File name */
11
- setAttribute(name: 'filename', value: string): void;
12
8
  };
13
- export type TSinchFileStatusReact = TSinchElementReact<TSinchFileStatusElement> & {
14
- /** File status type */
15
- type: TSinchFileStatusType;
16
- /** File name */
17
- filename: string;
18
- } & {
19
- style?: {
20
- '--sinch-comp-file-status-shape-radius'?: string;
21
- '--sinch-comp-file-status-color-error-background'?: string;
22
- '--sinch-comp-file-status-color-error-text'?: string;
23
- '--sinch-comp-file-status-color-error-icon'?: string;
24
- '--sinch-comp-file-status-color-success-background'?: string;
25
- '--sinch-comp-file-status-color-success-text'?: string;
26
- '--sinch-comp-file-status-color-success-icon'?: string;
27
- '--sinch-comp-file-status-color-pending-background'?: string;
28
- '--sinch-comp-file-status-color-pending-text'?: string;
29
- '--sinch-comp-file-status-color-pending-icon'?: string;
30
- '--sinch-comp-file-status-color-progress-background'?: string;
31
- '--sinch-comp-file-status-color-progress-text'?: string;
32
- '--sinch-comp-file-status-color-progress-icon'?: string;
33
- '--sinch-comp-file-status-color-loading-background'?: string;
34
- '--sinch-comp-file-status-color-loading-text'?: string;
35
- '--sinch-comp-file-status-color-loading-icon'?: string;
36
- '--sinch-global-color-text'?: string;
37
- '--sinch-global-color-icon'?: string;
38
- };
9
+ export type TSinchFileStatusStyle = {
10
+ '--sinch-comp-file-status-shape-radius'?: string;
11
+ '--sinch-comp-file-status-color-error-background'?: string;
12
+ '--sinch-comp-file-status-color-error-text'?: string;
13
+ '--sinch-comp-file-status-color-error-icon'?: string;
14
+ '--sinch-comp-file-status-color-success-background'?: string;
15
+ '--sinch-comp-file-status-color-success-text'?: string;
16
+ '--sinch-comp-file-status-color-success-icon'?: string;
17
+ '--sinch-comp-file-status-color-pending-background'?: string;
18
+ '--sinch-comp-file-status-color-pending-text'?: string;
19
+ '--sinch-comp-file-status-color-pending-icon'?: string;
20
+ '--sinch-comp-file-status-color-progress-background'?: string;
21
+ '--sinch-comp-file-status-color-progress-text'?: string;
22
+ '--sinch-comp-file-status-color-progress-icon'?: string;
23
+ '--sinch-comp-file-status-color-loading-background'?: string;
24
+ '--sinch-comp-file-status-color-loading-text'?: string;
25
+ '--sinch-comp-file-status-color-loading-icon'?: string;
26
+ '--sinch-global-color-text'?: string;
27
+ '--sinch-global-color-icon'?: string;
28
+ };
29
+ export type TSinchFileStatus = {
30
+ props: TSinchFileStatusProps;
31
+ style: TSinchFileStatusStyle;
39
32
  };
33
+ export type TSinchFileStatusElement = NectaryComponentVanillaByType<TSinchFileStatus>;
34
+ export type TSinchFileStatusReact = NectaryComponentReactByType<TSinchFileStatus>;
package/flag/index.d.ts CHANGED
@@ -1,18 +1,22 @@
1
- import type { TSinchFlagElement, TSinchFlagReact } from './types';
1
+ import type { TSinchFlag } from './types';
2
+ import type { NectaryComponentVanilla, NectaryComponentReact } from '../types';
2
3
  declare global {
4
+ interface NectaryComponentMap {
5
+ 'sinch-flag': TSinchFlag;
6
+ }
3
7
  interface HTMLElementTagNameMap {
4
- 'sinch-flag': TSinchFlagElement;
8
+ 'sinch-flag': NectaryComponentVanilla<'sinch-flag'>;
5
9
  }
6
10
  namespace JSX {
7
11
  interface IntrinsicElements {
8
- 'sinch-flag': TSinchFlagReact;
12
+ 'sinch-flag': NectaryComponentReact<'sinch-flag'>;
9
13
  }
10
14
  }
11
15
  }
12
16
  declare module 'react' {
13
17
  namespace JSX {
14
18
  interface IntrinsicElements {
15
- 'sinch-flag': TSinchFlagReact;
19
+ 'sinch-flag': NectaryComponentReact<'sinch-flag'>;
16
20
  }
17
21
  }
18
22
  }
package/flag/types.d.ts CHANGED
@@ -1,15 +1,14 @@
1
- import type { TSinchElementReact } from '../types';
2
- export type TSinchFlagElement = HTMLElement & {
1
+ import type { NectaryComponentReactByType, NectaryComponentVanillaByType } from '../types';
2
+ export type TSinchFlagProps = {
3
3
  /** Flag country code */
4
4
  code: string;
5
- /** Flag country code */
6
- setAttribute(code: 'name', value: string): void;
7
5
  };
8
- export type TSinchFlagReact = TSinchElementReact<TSinchFlagElement> & {
9
- /** Flag country code */
10
- code: string;
11
- } & {
12
- style?: {
13
- '--sinch-global-size-icon'?: string;
14
- };
6
+ export type TSinchFlagStyle = {
7
+ '--sinch-global-size-icon'?: string;
8
+ };
9
+ export type TSinchFlag = {
10
+ props: TSinchFlagProps;
11
+ style: TSinchFlagStyle;
15
12
  };
13
+ export type TSinchFlagElement = NectaryComponentVanillaByType<TSinchFlag>;
14
+ export type TSinchFlagReact = NectaryComponentReactByType<TSinchFlag>;
package/grid/index.d.ts CHANGED
@@ -1,18 +1,22 @@
1
- import type { TSinchGridElement, TSinchGridReact } from './types';
1
+ import type { TSinchGrid } from './types';
2
+ import type { NectaryComponentReact, NectaryComponentVanilla } from '../types';
2
3
  declare global {
4
+ interface NectaryComponentMap {
5
+ 'sinch-grid': TSinchGrid;
6
+ }
3
7
  interface HTMLElementTagNameMap {
4
- 'sinch-grid': TSinchGridElement;
8
+ 'sinch-grid': NectaryComponentVanilla<'sinch-grid'>;
5
9
  }
6
10
  namespace JSX {
7
11
  interface IntrinsicElements {
8
- 'sinch-grid': TSinchGridReact;
12
+ 'sinch-grid': NectaryComponentReact<'sinch-grid'>;
9
13
  }
10
14
  }
11
15
  }
12
16
  declare module 'react' {
13
17
  namespace JSX {
14
18
  interface IntrinsicElements {
15
- 'sinch-grid': TSinchGridReact;
19
+ 'sinch-grid': NectaryComponentReact<'sinch-grid'>;
16
20
  }
17
21
  }
18
22
  }
package/grid/types.d.ts CHANGED
@@ -1,18 +1,20 @@
1
- import type { TSinchElementReact } from '../types';
2
- export type TSinchGridElement = HTMLElement;
3
- export type TSinchGridReact = TSinchElementReact<TSinchGridElement> & {
4
- style?: {
5
- '--sinch-comp-grid-columns-xl'?: string;
6
- '--sinch-comp-grid-gutter-xl'?: string;
7
- '--sinch-comp-grid-margin-xl'?: string;
8
- '--sinch-comp-grid-columns-l'?: string;
9
- '--sinch-comp-grid-gutter-l'?: string;
10
- '--sinch-comp-grid-margin-l'?: string;
11
- '--sinch-comp-grid-columns-m'?: string;
12
- '--sinch-comp-grid-gutter-m'?: string;
13
- '--sinch-comp-grid-margin-m'?: string;
14
- '--sinch-comp-grid-columns-s'?: string;
15
- '--sinch-comp-grid-gutter-s'?: string;
16
- '--sinch-comp-grid-margin-s'?: string;
17
- };
1
+ import type { NectaryComponentReactByType } from '../types';
2
+ export type TSinchGridStyle = {
3
+ '--sinch-comp-grid-columns-xl'?: string;
4
+ '--sinch-comp-grid-gutter-xl'?: string;
5
+ '--sinch-comp-grid-margin-xl'?: string;
6
+ '--sinch-comp-grid-columns-l'?: string;
7
+ '--sinch-comp-grid-gutter-l'?: string;
8
+ '--sinch-comp-grid-margin-l'?: string;
9
+ '--sinch-comp-grid-columns-m'?: string;
10
+ '--sinch-comp-grid-gutter-m'?: string;
11
+ '--sinch-comp-grid-margin-m'?: string;
12
+ '--sinch-comp-grid-columns-s'?: string;
13
+ '--sinch-comp-grid-gutter-s'?: string;
14
+ '--sinch-comp-grid-margin-s'?: string;
15
+ };
16
+ export type TSinchGrid = {
17
+ style: TSinchGridStyle;
18
18
  };
19
+ export type TSinchGridElement = HTMLElement;
20
+ export type TSinchGridReact = NectaryComponentReactByType<TSinchGridElement>;
@@ -1,18 +1,22 @@
1
- import type { TSinchGridItemElement, TSinchGridItemReact } from './types';
1
+ import type { TSinchGridItem } from './types';
2
+ import type { NectaryComponentReact, NectaryComponentVanilla } from '../types';
2
3
  declare global {
4
+ interface NectaryComponentMap {
5
+ 'sinch-grid-item': TSinchGridItem;
6
+ }
3
7
  interface HTMLElementTagNameMap {
4
- 'sinch-grid-item': TSinchGridItemElement;
8
+ 'sinch-grid-item': NectaryComponentVanilla<'sinch-grid-item'>;
5
9
  }
6
10
  namespace JSX {
7
11
  interface IntrinsicElements {
8
- 'sinch-grid-item': TSinchGridItemReact;
12
+ 'sinch-grid-item': NectaryComponentReact<'sinch-grid-item'>;
9
13
  }
10
14
  }
11
15
  }
12
16
  declare module 'react' {
13
17
  namespace JSX {
14
18
  interface IntrinsicElements {
15
- 'sinch-grid-item': TSinchGridItemReact;
19
+ 'sinch-grid-item': NectaryComponentReact<'sinch-grid-item'>;
16
20
  }
17
21
  }
18
22
  }
@@ -1,17 +1,12 @@
1
- import type { TSinchElementReact } from '../types';
2
- export type TSinchGridItemElement = HTMLElement & {
3
- xl: number | null;
4
- l: number | null;
5
- m: number | null;
6
- s: number | null;
7
- setAttribute(name: 'xl', value: string): void;
8
- setAttribute(name: 'l', value: string): void;
9
- setAttribute(name: 'm', value: string): void;
10
- setAttribute(name: 's', value: string): void;
11
- };
12
- export type TSinchGridItemReact = TSinchElementReact<TSinchGridItemElement> & {
1
+ import type { NectaryComponentReactByType, NectaryComponentVanillaByType } from '../types';
2
+ export type TSinchGridItemProps = {
13
3
  xl?: number;
14
4
  l?: number;
15
5
  m?: number;
16
6
  s?: number;
17
7
  };
8
+ export type TSinchGridItem = {
9
+ props: TSinchGridItemProps;
10
+ };
11
+ export type TSinchGridItemElement = NectaryComponentVanillaByType<TSinchGridItem>;
12
+ export type TSinchGridItemReact = NectaryComponentReactByType<TSinchGridItem>;
@@ -1,20 +1,24 @@
1
1
  import '../tooltip';
2
2
  import '../icon';
3
- import type { TSinchHelpTooltipElement, TSinchHelpTooltipReact } from './types';
3
+ import type { TSinchHelpTooltip } from './types';
4
+ import type { NectaryComponentReact, NectaryComponentVanilla } from '../types';
4
5
  declare global {
6
+ interface NectaryComponentMap {
7
+ 'sinch-help-tooltip': TSinchHelpTooltip;
8
+ }
5
9
  interface HTMLElementTagNameMap {
6
- 'sinch-help-tooltip': TSinchHelpTooltipElement;
10
+ 'sinch-help-tooltip': NectaryComponentVanilla<'sinch-help-tooltip'>;
7
11
  }
8
12
  namespace JSX {
9
13
  interface IntrinsicElements {
10
- 'sinch-help-tooltip': TSinchHelpTooltipReact;
14
+ 'sinch-help-tooltip': NectaryComponentReact<'sinch-help-tooltip'>;
11
15
  }
12
16
  }
13
17
  }
14
18
  declare module 'react' {
15
19
  namespace JSX {
16
20
  interface IntrinsicElements {
17
- 'sinch-help-tooltip': TSinchHelpTooltipReact;
21
+ 'sinch-help-tooltip': NectaryComponentReact<'sinch-help-tooltip'>;
18
22
  }
19
23
  }
20
24
  }
@@ -1,7 +1,12 @@
1
- import type { TSinchTooltipElement, TSinchTooltipReact } from '../tooltip/types';
2
- export type TSinchHelpTooltipElement = TSinchTooltipElement;
3
- export type TSinchHelpTooltipReact = TSinchTooltipReact & {
4
- style?: {
5
- '--sinch-global-size-icon'?: string;
6
- };
1
+ import type { TSinchTooltipProps } from '../tooltip/types';
2
+ import type { NectaryComponentReactByType, NectaryComponentVanillaByType } from '../types';
3
+ export type TSinchHelpTooltipProps = TSinchTooltipProps;
4
+ export type TSinchHelpTooltipStyle = {
5
+ '--sinch-global-size-icon'?: string;
7
6
  };
7
+ export type TSinchHelpTooltip = {
8
+ props: TSinchHelpTooltipProps;
9
+ style: TSinchHelpTooltipStyle;
10
+ };
11
+ export type TSinchHelpTooltipElement = NectaryComponentVanillaByType<TSinchHelpTooltip>;
12
+ export type TSinchHelpTooltipReact = NectaryComponentReactByType<TSinchHelpTooltip>;
@@ -1,18 +1,22 @@
1
- import type { TSinchHorizontalStepperElement, TSinchHorizontalStepperReact } from './types';
1
+ import type { TSinchHorizontalStepper } from './types';
2
+ import type { NectaryComponentReact, NectaryComponentVanilla } from '../types';
2
3
  declare global {
4
+ interface NectaryComponentMap {
5
+ 'sinch-horizontal-stepper': TSinchHorizontalStepper;
6
+ }
3
7
  interface HTMLElementTagNameMap {
4
- 'sinch-horizontal-stepper': TSinchHorizontalStepperElement;
8
+ 'sinch-horizontal-stepper': NectaryComponentVanilla<'sinch-horizontal-stepper'>;
5
9
  }
6
10
  namespace JSX {
7
11
  interface IntrinsicElements {
8
- 'sinch-horizontal-stepper': TSinchHorizontalStepperReact;
12
+ 'sinch-horizontal-stepper': NectaryComponentReact<'sinch-horizontal-stepper'>;
9
13
  }
10
14
  }
11
15
  }
12
16
  declare module 'react' {
13
17
  namespace JSX {
14
18
  interface IntrinsicElements {
15
- 'sinch-horizontal-stepper': TSinchHorizontalStepperReact;
19
+ 'sinch-horizontal-stepper': NectaryComponentReact<'sinch-horizontal-stepper'>;
16
20
  }
17
21
  }
18
22
  }
@@ -1,43 +1,42 @@
1
- import type { TSinchElementReact } from '../types';
2
- export type TSinchHorizontalStepperElement = HTMLElement & {
3
- /** Current item index, starting from 1 */
4
- index: string;
5
- /** Current item index, starting from 1 */
6
- setAttribute(name: 'index', value: string): void;
7
- };
8
- export type TSinchHorizontalStepperReact = TSinchElementReact<TSinchHorizontalStepperElement> & {
1
+ import type { NectaryComponentReactByType, NectaryComponentVanillaByType } from '../types';
2
+ export type TSinchHorizontalStepperProps = {
9
3
  /** Current item index, starting from 1 */
10
4
  index: string;
11
5
  /** Label that is used for a11y */
12
6
  'aria-label': string;
13
- } & {
14
- style?: {
15
- '--sinch-comp-horizontal-stepper-color-background-default'?: string;
16
- '--sinch-comp-horizontal-stepper-color-background-visited-skip'?: string;
17
- '--sinch-comp-horizontal-stepper-color-background-active'?: string;
18
- '--sinch-comp-horizontal-stepper-color-background-visited'?: string;
19
- '--sinch-comp-horizontal-stepper-color-background-visited-error'?: string;
20
- '--sinch-comp-horizontal-stepper-color-border-default'?: string;
21
- '--sinch-comp-horizontal-stepper-color-border-visited-skip'?: string;
22
- '--sinch-comp-horizontal-stepper-color-border-active'?: string;
23
- '--sinch-comp-horizontal-stepper-color-border-visited'?: string;
24
- '--sinch-comp-horizontal-stepper-color-border-visited-error'?: string;
25
- '--sinch-comp-horizontal-stepper-color-icon-default'?: string;
26
- '--sinch-comp-horizontal-stepper-color-icon-visited-skip'?: string;
27
- '--sinch-comp-horizontal-stepper-color-icon-active'?: string;
28
- '--sinch-comp-horizontal-stepper-color-icon-visited'?: string;
29
- '--sinch-comp-horizontal-stepper-color-icon-visited-error'?: string;
30
- '--sinch-comp-horizontal-stepper-color-label'?: string;
31
- '--sinch-comp-horizontal-stepper-color-description'?: string;
32
- '--sinch-comp-horizontal-stepper-color-progress'?: string;
33
- '--sinch-comp-horizontal-stepper-color-progress-visited'?: string;
34
- '--sinch-sys-color-surface-tertiary-default'?: string;
35
- '--sinch-sys-color-basic-pure'?: string;
36
- '--sinch-sys-color-text-default'?: string;
37
- '--sinch-sys-color-text-muted'?: string;
38
- '--sinch-sys-color-feedback-danger-strong'?: string;
39
- '--sinch-ref-color-neutral-350'?: string;
40
- '--sinch-ref-color-neutral-700'?: string;
41
- '--sinch-ref-color-neutral-900'?: string;
42
- };
43
7
  };
8
+ export type TSinchHorizontalStepperStyle = {
9
+ '--sinch-comp-horizontal-stepper-color-background-default'?: string;
10
+ '--sinch-comp-horizontal-stepper-color-background-visited-skip'?: string;
11
+ '--sinch-comp-horizontal-stepper-color-background-active'?: string;
12
+ '--sinch-comp-horizontal-stepper-color-background-visited'?: string;
13
+ '--sinch-comp-horizontal-stepper-color-background-visited-error'?: string;
14
+ '--sinch-comp-horizontal-stepper-color-border-default'?: string;
15
+ '--sinch-comp-horizontal-stepper-color-border-visited-skip'?: string;
16
+ '--sinch-comp-horizontal-stepper-color-border-active'?: string;
17
+ '--sinch-comp-horizontal-stepper-color-border-visited'?: string;
18
+ '--sinch-comp-horizontal-stepper-color-border-visited-error'?: string;
19
+ '--sinch-comp-horizontal-stepper-color-icon-default'?: string;
20
+ '--sinch-comp-horizontal-stepper-color-icon-visited-skip'?: string;
21
+ '--sinch-comp-horizontal-stepper-color-icon-active'?: string;
22
+ '--sinch-comp-horizontal-stepper-color-icon-visited'?: string;
23
+ '--sinch-comp-horizontal-stepper-color-icon-visited-error'?: string;
24
+ '--sinch-comp-horizontal-stepper-color-label'?: string;
25
+ '--sinch-comp-horizontal-stepper-color-description'?: string;
26
+ '--sinch-comp-horizontal-stepper-color-progress'?: string;
27
+ '--sinch-comp-horizontal-stepper-color-progress-visited'?: string;
28
+ '--sinch-sys-color-surface-tertiary-default'?: string;
29
+ '--sinch-sys-color-basic-pure'?: string;
30
+ '--sinch-sys-color-text-default'?: string;
31
+ '--sinch-sys-color-text-muted'?: string;
32
+ '--sinch-sys-color-feedback-danger-strong'?: string;
33
+ '--sinch-ref-color-neutral-350'?: string;
34
+ '--sinch-ref-color-neutral-700'?: string;
35
+ '--sinch-ref-color-neutral-900'?: string;
36
+ };
37
+ export type TSinchHorizontalStepper = {
38
+ props: TSinchHorizontalStepperProps;
39
+ style: TSinchHorizontalStepperStyle;
40
+ };
41
+ export type TSinchHorizontalStepperElement = NectaryComponentVanillaByType<TSinchHorizontalStepper>;
42
+ export type TSinchHorizontalStepperReact = NectaryComponentReactByType<TSinchHorizontalStepper>;
@@ -1,21 +1,25 @@
1
1
  import '../icon';
2
2
  import '../title';
3
3
  import '../text';
4
- import type { TSinchHorizontalStepperItemElement, TSinchHorizontalStepperItemReact } from './types';
4
+ import type { TSinchHorizontalStepperItem } from './types';
5
+ import type { NectaryComponentReact, NectaryComponentVanilla } from '../types';
5
6
  declare global {
7
+ interface NectaryComponentMap {
8
+ 'sinch-horizontal-stepper-item': TSinchHorizontalStepperItem;
9
+ }
6
10
  interface HTMLElementTagNameMap {
7
- 'sinch-horizontal-stepper-item': TSinchHorizontalStepperItemElement;
11
+ 'sinch-horizontal-stepper-item': NectaryComponentVanilla<'sinch-horizontal-stepper-item'>;
8
12
  }
9
13
  namespace JSX {
10
14
  interface IntrinsicElements {
11
- 'sinch-horizontal-stepper-item': TSinchHorizontalStepperItemReact;
15
+ 'sinch-horizontal-stepper-item': NectaryComponentReact<'sinch-horizontal-stepper-item'>;
12
16
  }
13
17
  }
14
18
  }
15
19
  declare module 'react' {
16
20
  namespace JSX {
17
21
  interface IntrinsicElements {
18
- 'sinch-horizontal-stepper-item': TSinchHorizontalStepperItemReact;
22
+ 'sinch-horizontal-stepper-item': NectaryComponentReact<'sinch-horizontal-stepper-item'>;
19
23
  }
20
24
  }
21
25
  }