@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,19 +1,5 @@
1
- import type { TSinchElementReact } from '../types';
2
- export type TSinchTabsOptionElement = HTMLElement & {
3
- /** Value */
4
- value: string;
5
- /** Text */
6
- text: string;
7
- /** Disabled */
8
- disabled: boolean;
9
- /** Value */
10
- setAttribute(name: 'value', value: string): void;
11
- /** Text */
12
- setAttribute(name: 'text', value: string): void;
13
- /** Disabled */
14
- setAttribute(name: 'disabled', value: ''): void;
15
- };
16
- export type TSinchTabsOptionReact = TSinchElementReact<TSinchTabsOptionElement> & {
1
+ import type { NectaryComponentReactByType, NectaryComponentVanillaByType } from '../types';
2
+ export type TSinchTabsOptionProps = {
17
3
  /** Value */
18
4
  value: string;
19
5
  /** Text */
@@ -22,23 +8,28 @@ export type TSinchTabsOptionReact = TSinchElementReact<TSinchTabsOptionElement>
22
8
  'aria-label': string;
23
9
  /** Disabled */
24
10
  disabled?: boolean;
25
- } & {
26
- style?: {
27
- '--sinch-comp-tab-font-label'?: string;
28
- '--sinch-comp-tab-size-icon'?: string;
29
- '--sinch-comp-tab-shape-radius'?: string;
30
- '--sinch-comp-tab-color-default-background-initial'?: string;
31
- '--sinch-comp-tab-color-default-background-hover'?: string;
32
- '--sinch-comp-tab-color-default-text-initial'?: string;
33
- '--sinch-comp-tab-color-default-icon-initial'?: string;
34
- '--sinch-comp-tab-color-default-outline-focus'?: string;
35
- '--sinch-comp-tab-color-checked-text-initial'?: string;
36
- '--sinch-comp-tab-color-checked-icon-initial'?: string;
37
- '--sinch-comp-tab-color-checked-border-initial'?: string;
38
- '--sinch-comp-tab-color-disabled-text-initial'?: string;
39
- '--sinch-comp-tab-color-disabled-icon-initial'?: string;
40
- '--sinch-global-color-text'?: string;
41
- '--sinch-global-color-icon'?: string;
42
- '--sinch-global-size-icon'?: string;
43
- };
44
11
  };
12
+ export type TSinchTabsOptionStyle = {
13
+ '--sinch-comp-tab-font-label'?: string;
14
+ '--sinch-comp-tab-size-icon'?: string;
15
+ '--sinch-comp-tab-shape-radius'?: string;
16
+ '--sinch-comp-tab-color-default-background-initial'?: string;
17
+ '--sinch-comp-tab-color-default-background-hover'?: string;
18
+ '--sinch-comp-tab-color-default-text-initial'?: string;
19
+ '--sinch-comp-tab-color-default-icon-initial'?: string;
20
+ '--sinch-comp-tab-color-default-outline-focus'?: string;
21
+ '--sinch-comp-tab-color-checked-text-initial'?: string;
22
+ '--sinch-comp-tab-color-checked-icon-initial'?: string;
23
+ '--sinch-comp-tab-color-checked-border-initial'?: string;
24
+ '--sinch-comp-tab-color-disabled-text-initial'?: string;
25
+ '--sinch-comp-tab-color-disabled-icon-initial'?: string;
26
+ '--sinch-global-color-text'?: string;
27
+ '--sinch-global-color-icon'?: string;
28
+ '--sinch-global-size-icon'?: string;
29
+ };
30
+ export type TSinchTabsOption = {
31
+ props: TSinchTabsOptionProps;
32
+ style: TSinchTabsOptionStyle;
33
+ };
34
+ export type TSinchTabsOptionElement = NectaryComponentVanillaByType<TSinchTabsOption>;
35
+ export type TSinchTabsOptionReact = NectaryComponentReactByType<TSinchTabsOption>;
package/tag/index.d.ts CHANGED
@@ -1,20 +1,24 @@
1
1
  import '../text';
2
2
  import '../tooltip';
3
- import type { TSinchTagElement, TSinchTagReact } from './types';
3
+ import type { TSinchTag } from './types';
4
+ import type { NectaryComponentReact, NectaryComponentVanilla } from '../types';
4
5
  declare global {
6
+ interface NectaryComponentMap {
7
+ 'sinch-tag': TSinchTag;
8
+ }
5
9
  interface HTMLElementTagNameMap {
6
- 'sinch-tag': TSinchTagElement;
10
+ 'sinch-tag': NectaryComponentVanilla<'sinch-tag'>;
7
11
  }
8
12
  namespace JSX {
9
13
  interface IntrinsicElements {
10
- 'sinch-tag': TSinchTagReact;
14
+ 'sinch-tag': NectaryComponentReact<'sinch-tag'>;
11
15
  }
12
16
  }
13
17
  }
14
18
  declare module 'react' {
15
19
  namespace JSX {
16
20
  interface IntrinsicElements {
17
- 'sinch-tag': TSinchTagReact;
21
+ 'sinch-tag': NectaryComponentReact<'sinch-tag'>;
18
22
  }
19
23
  }
20
24
  }
package/tag/types.d.ts CHANGED
@@ -1,25 +1,7 @@
1
1
  import type { TSinchTagColor } from './colors';
2
- import type { TSinchElementReact } from '../types';
2
+ import type { NectaryComponentReactByType, NectaryComponentVanillaByType } from '../types';
3
3
  export type { TSinchTagColor };
4
- export type TSinchTagElement = HTMLElement & {
5
- /** Text */
6
- text: string;
7
- /** Color, gray by default */
8
- color: TSinchTagColor | null;
9
- /** Small */
10
- small: boolean;
11
- /** Ellipsis */
12
- ellipsis: boolean;
13
- /** Text */
14
- setAttribute(name: 'text', value: string): void;
15
- /** Color, gray by default */
16
- setAttribute(name: 'color', value: string): void;
17
- /** Small */
18
- setAttribute(name: 'small', value: ''): void;
19
- /** Ellipsis */
20
- setAttribute(name: 'ellipsis', value: ''): void;
21
- };
22
- export type TSinchTagReact = TSinchElementReact<TSinchTagElement> & {
4
+ export type TSinchTagProps = {
23
5
  /** Text */
24
6
  text: string;
25
7
  /** Color, gray by default */
@@ -28,19 +10,24 @@ export type TSinchTagReact = TSinchElementReact<TSinchTagElement> & {
28
10
  small?: boolean;
29
11
  /** Ellipsis */
30
12
  ellipsis?: boolean;
31
- } & {
32
- style?: {
33
- '--sinch-comp-tag-size-container-m'?: string;
34
- '--sinch-comp-tag-size-container-s'?: string;
35
- '--sinch-comp-tag-size-icon-m'?: string;
36
- '--sinch-comp-tag-size-icon-s'?: string;
37
- '--sinch-comp-tag-shape-radius'?: string;
38
- '--sinch-comp-tag-font-size-m-label'?: string;
39
- '--sinch-comp-tag-font-size-s-label'?: string;
40
- '--sinch-comp-tag-color-default-background'?: string;
41
- '--sinch-comp-tag-color-default-foreground'?: string;
42
- '--sinch-global-color-text'?: string;
43
- '--sinch-global-color-icon'?: string;
44
- '--sinch-global-size-icon'?: string;
45
- };
46
13
  };
14
+ export type TSinchTagStyle = {
15
+ '--sinch-comp-tag-size-container-m'?: string;
16
+ '--sinch-comp-tag-size-container-s'?: string;
17
+ '--sinch-comp-tag-size-icon-m'?: string;
18
+ '--sinch-comp-tag-size-icon-s'?: string;
19
+ '--sinch-comp-tag-shape-radius'?: string;
20
+ '--sinch-comp-tag-font-size-m-label'?: string;
21
+ '--sinch-comp-tag-font-size-s-label'?: string;
22
+ '--sinch-comp-tag-color-default-background'?: string;
23
+ '--sinch-comp-tag-color-default-foreground'?: string;
24
+ '--sinch-global-color-text'?: string;
25
+ '--sinch-global-color-icon'?: string;
26
+ '--sinch-global-size-icon'?: string;
27
+ };
28
+ export type TSinchTag = {
29
+ props: TSinchTagProps;
30
+ style: TSinchTagStyle;
31
+ };
32
+ export type TSinchTagElement = NectaryComponentVanillaByType<TSinchTag>;
33
+ export type TSinchTagReact = NectaryComponentReactByType<TSinchTag>;
package/text/index.d.ts CHANGED
@@ -1,18 +1,22 @@
1
- import type { TSinchTextElement, TSinchTextReact } from './types';
1
+ import type { TSinchText } from './types';
2
+ import type { NectaryComponentVanilla, NectaryComponentReact } from '../types';
2
3
  declare global {
4
+ interface NectaryComponentMap {
5
+ 'sinch-text': TSinchText;
6
+ }
3
7
  interface HTMLElementTagNameMap {
4
- 'sinch-text': TSinchTextElement;
8
+ 'sinch-text': NectaryComponentVanilla<'sinch-text'>;
5
9
  }
6
10
  namespace JSX {
7
11
  interface IntrinsicElements {
8
- 'sinch-text': TSinchTextReact;
12
+ 'sinch-text': NectaryComponentReact<'sinch-text'>;
9
13
  }
10
14
  }
11
15
  }
12
16
  declare module 'react' {
13
17
  namespace JSX {
14
18
  interface IntrinsicElements {
15
- 'sinch-text': TSinchTextReact;
19
+ 'sinch-text': NectaryComponentReact<'sinch-text'>;
16
20
  }
17
21
  }
18
22
  }
package/text/types.d.ts CHANGED
@@ -1,24 +1,6 @@
1
- import type { TSinchElementReact } from '../types';
1
+ import type { NectaryComponentReactByType, NectaryComponentVanillaByType } from '../types';
2
2
  export type TSinchTextType = 'm' | 's' | 'xs' | 'xxs';
3
- export type TSinchTextElement = HTMLElement & {
4
- /** Type */
5
- type: TSinchTextType;
6
- /** Block (“paragraph”, default) or inline (“span”) */
7
- inline: boolean;
8
- /** Emphasized */
9
- emphasized: boolean;
10
- /** Cuts the long text with “…” ellipsis */
11
- ellipsis: boolean;
12
- /** Type */
13
- setAttribute(name: 'type', value: TSinchTextType): void;
14
- /** Block (“paragraph”, default) or inline (“span”) */
15
- setAttribute(name: 'inline', value: ''): void;
16
- /** Emphasized */
17
- setAttribute(name: 'emphasized', value: ''): void;
18
- /** Cuts the long text with “…” ellipsis */
19
- setAttribute(name: 'ellipsis', value: ''): void;
20
- };
21
- export type TSinchTextReact = TSinchElementReact<TSinchTextElement> & {
3
+ export type TSinchTextProps = {
22
4
  /** Type */
23
5
  type: TSinchTextType;
24
6
  /** Block (“paragraph”, default) or inline (“span”) */
@@ -27,18 +9,23 @@ export type TSinchTextReact = TSinchElementReact<TSinchTextElement> & {
27
9
  emphasized?: boolean;
28
10
  /** Cuts the long text with “…” ellipsis */
29
11
  ellipsis?: boolean;
30
- } & {
31
- style?: {
32
- '--sinch-comp-text-align'?: string;
33
- '--sinch-comp-text-font'?: string;
34
- '--sinch-sys-font-body-m'?: string;
35
- '--sinch-sys-font-body-s'?: string;
36
- '--sinch-sys-font-body-xs'?: string;
37
- '--sinch-sys-font-body-xxs'?: string;
38
- '--sinch-sys-font-body-emphasize'?: string;
39
- '--sinch-sys-font-body-emphasize-s'?: string;
40
- '--sinch-global-color-text'?: string;
41
- '--sinch-sys-color-text-default'?: string;
42
- '--sinch-global-text-white-space'?: string;
43
- };
44
12
  };
13
+ export type TSinchTextStyle = {
14
+ '--sinch-comp-text-align'?: string;
15
+ '--sinch-comp-text-font'?: string;
16
+ '--sinch-sys-font-body-m'?: string;
17
+ '--sinch-sys-font-body-s'?: string;
18
+ '--sinch-sys-font-body-xs'?: string;
19
+ '--sinch-sys-font-body-xxs'?: string;
20
+ '--sinch-sys-font-body-emphasize'?: string;
21
+ '--sinch-sys-font-body-emphasize-s'?: string;
22
+ '--sinch-global-color-text'?: string;
23
+ '--sinch-sys-color-text-default'?: string;
24
+ '--sinch-global-text-white-space'?: string;
25
+ };
26
+ export type TSinchText = {
27
+ props: TSinchTextProps;
28
+ style: TSinchTextStyle;
29
+ };
30
+ export type TSinchTextElement = NectaryComponentVanillaByType<TSinchText>;
31
+ export type TSinchTextReact = NectaryComponentReactByType<TSinchText>;
@@ -1,18 +1,22 @@
1
- import type { TSinchTextareaElement, TSinchTextareaReact } from './types';
1
+ import type { TSinchTextarea } from './types';
2
+ import type { NectaryComponentReact, NectaryComponentVanilla } from '../types';
2
3
  declare global {
4
+ interface NectaryComponentMap {
5
+ 'sinch-textarea': TSinchTextarea;
6
+ }
3
7
  interface HTMLElementTagNameMap {
4
- 'sinch-textarea': TSinchTextareaElement;
8
+ 'sinch-textarea': NectaryComponentVanilla<'sinch-textarea'>;
5
9
  }
6
10
  namespace JSX {
7
11
  interface IntrinsicElements {
8
- 'sinch-textarea': TSinchTextareaReact;
12
+ 'sinch-textarea': NectaryComponentReact<'sinch-textarea'>;
9
13
  }
10
14
  }
11
15
  }
12
16
  declare module 'react' {
13
17
  namespace JSX {
14
18
  interface IntrinsicElements {
15
- 'sinch-textarea': TSinchTextareaReact;
19
+ 'sinch-textarea': NectaryComponentReact<'sinch-textarea'>;
16
20
  }
17
21
  }
18
22
  }
@@ -1,42 +1,5 @@
1
- import type { TSinchElementReact } from '../types';
2
- export type TSinchTextareaElement = HTMLElement & {
3
- /** Value */
4
- value: string;
5
- /** Text that appears in the text field when it has no value set */
6
- placeholder: string | null;
7
- /** Disabled */
8
- disabled: boolean;
9
- /** Invalid state */
10
- invalid: boolean;
11
- selectionStart: HTMLTextAreaElement['selectionStart'];
12
- selectionEnd: HTMLTextAreaElement['selectionEnd'];
13
- selectionDirection: HTMLTextAreaElement['selectionDirection'];
14
- /** Number of rows */
15
- rows: HTMLTextAreaElement['rows'];
16
- minRows: HTMLTextAreaElement['rows'];
17
- /** Whether the text field is resizable */
18
- resizable: boolean;
19
- /** Change value event */
20
- addEventListener(type: '-change', listener: (e: CustomEvent<string>) => void): void;
21
- /** Focus event */
22
- addEventListener(type: '-focus', listener: (e: CustomEvent<void>) => void): void;
23
- /** Blur event */
24
- addEventListener(type: '-blur', listener: (e: CustomEvent<void>) => void): void;
25
- /** Value */
26
- setAttribute(name: 'value', value: string): void;
27
- /** Text that appears in the text field when it has no value set */
28
- setAttribute(name: 'placeholder', value: string): void;
29
- /** Invalid state */
30
- setAttribute(name: 'invalid', value: ''): void;
31
- /** Disabled */
32
- setAttribute(name: 'disabled', value: ''): void;
33
- /** Number of rows */
34
- setAttribute(name: 'rows', value: string): void;
35
- setAttribute(name: 'minrows', value: string): void;
36
- /** Whether the text field is resizable */
37
- setAttribute(name: 'resizable', value: ''): void;
38
- };
39
- export type TSinchTextareaReact = TSinchElementReact<TSinchTextareaElement> & {
1
+ import type { NectaryComponentReactByType, NectaryComponentVanillaByType } from '../types';
2
+ export type TSinchTextareaProps = {
40
3
  /** Value */
41
4
  value: string;
42
5
  /** Text that appears in the text field when it has no value set */
@@ -51,24 +14,35 @@ export type TSinchTextareaReact = TSinchElementReact<TSinchTextareaElement> & {
51
14
  minRows?: number;
52
15
  /** Whether the text field is resizable */
53
16
  resizable?: boolean;
17
+ selectionStart?: number;
18
+ selectionEnd?: number;
19
+ selectionDirection?: 'forward' | 'backward' | 'none';
20
+ };
21
+ export type TSinchTextareaEvents = {
54
22
  /** Change value handler */
55
- 'on-change'?: (e: CustomEvent<string>) => void;
23
+ '-change'?: (e: CustomEvent<string>) => void;
56
24
  /** Focus handler */
57
- 'on-focus'?: (e: CustomEvent<void>) => void;
25
+ '-focus'?: (e: CustomEvent<void>) => void;
58
26
  /** Blur handler */
59
- 'on-blur'?: (e: CustomEvent<void>) => void;
60
- } & {
61
- style?: {
62
- '--sinch-comp-textarea-shape-radius'?: string;
63
- '--sinch-comp-textarea-font-input'?: string;
64
- '--sinch-comp-textarea-size-resize-handle'?: string;
65
- '--sinch-comp-textarea-color-default-background-initial'?: string;
66
- '--sinch-comp-textarea-color-default-text-initial'?: string;
67
- '--sinch-comp-textarea-color-default-text-placeholder'?: string;
68
- '--sinch-comp-textarea-color-default-border-initial'?: string;
69
- '--sinch-comp-textarea-color-default-border-focus'?: string;
70
- '--sinch-comp-textarea-color-invalid-border-initial'?: string;
71
- '--sinch-comp-textarea-color-disabled-text-initial'?: string;
72
- '--sinch-comp-textarea-color-disabled-border-initial'?: string;
73
- };
27
+ '-blur'?: (e: CustomEvent<void>) => void;
28
+ };
29
+ export type TSinchTextareaStyle = {
30
+ '--sinch-comp-textarea-shape-radius'?: string;
31
+ '--sinch-comp-textarea-font-input'?: string;
32
+ '--sinch-comp-textarea-size-resize-handle'?: string;
33
+ '--sinch-comp-textarea-color-default-background-initial'?: string;
34
+ '--sinch-comp-textarea-color-default-text-initial'?: string;
35
+ '--sinch-comp-textarea-color-default-text-placeholder'?: string;
36
+ '--sinch-comp-textarea-color-default-border-initial'?: string;
37
+ '--sinch-comp-textarea-color-default-border-focus'?: string;
38
+ '--sinch-comp-textarea-color-invalid-border-initial'?: string;
39
+ '--sinch-comp-textarea-color-disabled-text-initial'?: string;
40
+ '--sinch-comp-textarea-color-disabled-border-initial'?: string;
41
+ };
42
+ export type TSinchTextarea = {
43
+ props: TSinchTextareaProps;
44
+ events: TSinchTextareaEvents;
45
+ style: TSinchTextareaStyle;
74
46
  };
47
+ export type TSinchTextareaElement = NectaryComponentVanillaByType<TSinchTextarea>;
48
+ export type TSinchTextareaReact = NectaryComponentReactByType<TSinchTextarea>;
@@ -1,18 +1,22 @@
1
- import type { TSinchTileControlElement, TSinchTileControlReact } from './types';
1
+ import type { TSinchTileControl } from './types';
2
+ import type { NectaryComponentVanilla, NectaryComponentReact } from '../types';
2
3
  declare global {
4
+ interface NectaryComponentMap {
5
+ 'sinch-tile-control': TSinchTileControl;
6
+ }
3
7
  interface HTMLElementTagNameMap {
4
- 'sinch-tile-control': TSinchTileControlElement;
8
+ 'sinch-tile-control': NectaryComponentVanilla<'sinch-tile-control'>;
5
9
  }
6
10
  namespace JSX {
7
11
  interface IntrinsicElements {
8
- 'sinch-tile-control': TSinchTileControlReact;
12
+ 'sinch-tile-control': NectaryComponentReact<'sinch-tile-control'>;
9
13
  }
10
14
  }
11
15
  }
12
16
  declare module 'react' {
13
17
  namespace JSX {
14
18
  interface IntrinsicElements {
15
- 'sinch-tile-control': TSinchTileControlReact;
19
+ 'sinch-tile-control': NectaryComponentReact<'sinch-tile-control'>;
16
20
  }
17
21
  }
18
22
  }
@@ -1,27 +1,7 @@
1
- import type { TSinchElementReact } from '../types';
1
+ import type { NectaryComponentReactByType, NectaryComponentVanillaByType } from '../types';
2
2
  /** Number of coumns from 1 to 10 */
3
3
  export type TSinchTileControlColumns = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | number;
4
- export type TSinchTileControlElement = HTMLElement & {
5
- /** Value */
6
- value: string;
7
- /** Small */
8
- small: boolean;
9
- /** Multiple */
10
- multiple: boolean;
11
- /** Number of columns from 1 to 10 */
12
- cols: TSinchTileControlColumns;
13
- /** Change value event */
14
- addEventListener(type: '-change', listener: (e: CustomEvent<string>) => void): void;
15
- /** Value */
16
- setAttribute(name: 'value', value: string): void;
17
- /** Small */
18
- setAttribute(name: 'small', value: ''): void;
19
- /** Multiple */
20
- setAttribute(name: 'multiple', value: ''): void;
21
- /** Number of columns from 1 to 10 */
22
- setAttribute(name: 'cols', value: string): void;
23
- };
24
- export type TSinchTileControlReact = TSinchElementReact<TSinchTileControlElement> & {
4
+ export type TSinchTileControlProps = {
25
5
  /** Value */
26
6
  value: string;
27
7
  /** Multiple */
@@ -32,10 +12,18 @@ export type TSinchTileControlReact = TSinchElementReact<TSinchTileControlElement
32
12
  cols: TSinchTileControlColumns;
33
13
  /** Label that is used for a11y */
34
14
  'aria-label': string;
15
+ };
16
+ export type TSinchTileControlEvents = {
35
17
  /** Change value handler */
36
- 'on-change'?: (e: CustomEvent<string>) => void;
37
- } & {
38
- style?: {
39
- '--sinch-grid-num-columns'?: string;
40
- };
18
+ '-change'?: (e: CustomEvent<string>) => void;
19
+ };
20
+ export type TSinchTileControlStyle = {
21
+ '--sinch-grid-num-columns'?: string;
22
+ };
23
+ export type TSinchTileControl = {
24
+ props: TSinchTileControlProps;
25
+ events: TSinchTileControlEvents;
26
+ style: TSinchTileControlStyle;
41
27
  };
28
+ export type TSinchTileControlElement = NectaryComponentVanillaByType<TSinchTileControl>;
29
+ export type TSinchTileControlReact = NectaryComponentReactByType<TSinchTileControl>;
@@ -1,18 +1,22 @@
1
- import type { TSinchTileControlOptionElement, TSinchTileControlOptionReact } from './types';
1
+ import type { TSinchTileControlOption } from './types';
2
+ import type { NectaryComponentReact, NectaryComponentVanilla } from '../types';
2
3
  declare global {
4
+ interface NectaryComponentMap {
5
+ 'sinch-tile-control-option': TSinchTileControlOption;
6
+ }
3
7
  interface HTMLElementTagNameMap {
4
- 'sinch-tile-control-option': TSinchTileControlOptionElement;
8
+ 'sinch-tile-control-option': NectaryComponentVanilla<'sinch-tile-control-option'>;
5
9
  }
6
10
  namespace JSX {
7
11
  interface IntrinsicElements {
8
- 'sinch-tile-control-option': TSinchTileControlOptionReact;
12
+ 'sinch-tile-control-option': NectaryComponentReact<'sinch-tile-control-option'>;
9
13
  }
10
14
  }
11
15
  }
12
16
  declare module 'react' {
13
17
  namespace JSX {
14
18
  interface IntrinsicElements {
15
- 'sinch-tile-control-option': TSinchTileControlOptionReact;
19
+ 'sinch-tile-control-option': NectaryComponentReact<'sinch-tile-control-option'>;
16
20
  }
17
21
  }
18
22
  }
@@ -1,27 +1,5 @@
1
- import type { TSinchElementReact } from '../types';
2
- export type TSinchTileControlOptionElement = HTMLElement & {
3
- /** Value */
4
- value: string;
5
- /** Text content */
6
- text: string;
7
- /** Disabled */
8
- disabled: boolean;
9
- /** Small */
10
- small: boolean;
11
- /** Focus event */
12
- addEventListener(type: '-focus', listener: (e: CustomEvent<void>) => void): void;
13
- /** Blur event */
14
- addEventListener(type: '-blur', listener: (e: CustomEvent<void>) => void): void;
15
- /** Value */
16
- setAttribute(name: 'value', value: string): void;
17
- /** Text content */
18
- setAttribute(attr: 'text', value: string): void;
19
- /** Disabled */
20
- setAttribute(name: 'disabled', value: ''): void;
21
- /** Small */
22
- setAttribute(name: 'small', value: ''): void;
23
- };
24
- export type TSinchTileControlOptionReact = TSinchElementReact<TSinchTileControlOptionElement> & {
1
+ import type { NectaryComponentReactByType, NectaryComponentVanillaByType } from '../types';
2
+ export type TSinchTileControlOptionProps = {
25
3
  /** Value */
26
4
  value: string;
27
5
  /** Text content */
@@ -30,37 +8,45 @@ export type TSinchTileControlOptionReact = TSinchElementReact<TSinchTileControlO
30
8
  'aria-label': string;
31
9
  /** Disabled */
32
10
  disabled?: boolean;
11
+ };
12
+ export type TSinchTileControlOptionEvents = {
33
13
  /** Focus handler */
34
- 'on-focus'?: (e: CustomEvent<void>) => void;
14
+ '-focus'?: (e: CustomEvent<void>) => void;
35
15
  /** Blur handler */
36
- 'on-blur'?: (e: CustomEvent<void>) => void;
37
- } & {
38
- style?: {
39
- '--sinch-comp-tile-control-shape-radius-l'?: string;
40
- '--sinch-comp-tile-control-shape-radius-s'?: string;
41
- '--sinch-comp-tile-control-font-label'?: string;
42
- '--sinch-comp-tile-control-size-m-icon'?: string;
43
- '--sinch-comp-tile-control-size-s-icon'?: string;
44
- '--sinch-comp-tile-control-color-default-background-initial'?: string;
45
- '--sinch-comp-tile-control-color-default-border-initial'?: string;
46
- '--sinch-comp-tile-control-color-default-text-initial'?: string;
47
- '--sinch-comp-tile-control-color-default-icon-initial'?: string;
48
- '--sinch-comp-tile-control-color-default-background-hover'?: string;
49
- '--sinch-comp-tile-control-color-default-border-hover'?: string;
50
- '--sinch-comp-tile-control-color-default-outline-focus'?: string;
51
- '--sinch-comp-tile-control-color-checked-background-initial'?: string;
52
- '--sinch-comp-tile-control-color-checked-border-initial'?: string;
53
- '--sinch-comp-tile-control-color-checked-text-initial'?: string;
54
- '--sinch-comp-tile-control-color-checked-icon-initial'?: string;
55
- '--sinch-comp-tile-control-color-disabled-background-initial'?: string;
56
- '--sinch-comp-tile-control-color-disabled-border-initial'?: string;
57
- '--sinch-comp-tile-control-color-disabled-text-initial'?: string;
58
- '--sinch-comp-tile-control-color-disabled-icon-initial'?: string;
59
- '--sinch-comp-tile-control-shadow-initial'?: string;
60
- '--sinch-comp-tile-control-shadow-hover'?: string;
61
- '--sinch-comp-tile-control-shadow-active'?: string;
62
- '--sinch-comp-tile-control-shadow-disabled'?: string;
63
- '--sinch-global-size-icon'?: string;
64
- '--sinch-global-color-icon'?: string;
65
- };
16
+ '-blur'?: (e: CustomEvent<void>) => void;
17
+ };
18
+ export type TSinchTileControlOptionStyle = {
19
+ '--sinch-comp-tile-control-shape-radius-l'?: string;
20
+ '--sinch-comp-tile-control-shape-radius-s'?: string;
21
+ '--sinch-comp-tile-control-font-label'?: string;
22
+ '--sinch-comp-tile-control-size-m-icon'?: string;
23
+ '--sinch-comp-tile-control-size-s-icon'?: string;
24
+ '--sinch-comp-tile-control-color-default-background-initial'?: string;
25
+ '--sinch-comp-tile-control-color-default-border-initial'?: string;
26
+ '--sinch-comp-tile-control-color-default-text-initial'?: string;
27
+ '--sinch-comp-tile-control-color-default-icon-initial'?: string;
28
+ '--sinch-comp-tile-control-color-default-background-hover'?: string;
29
+ '--sinch-comp-tile-control-color-default-border-hover'?: string;
30
+ '--sinch-comp-tile-control-color-default-outline-focus'?: string;
31
+ '--sinch-comp-tile-control-color-checked-background-initial'?: string;
32
+ '--sinch-comp-tile-control-color-checked-border-initial'?: string;
33
+ '--sinch-comp-tile-control-color-checked-text-initial'?: string;
34
+ '--sinch-comp-tile-control-color-checked-icon-initial'?: string;
35
+ '--sinch-comp-tile-control-color-disabled-background-initial'?: string;
36
+ '--sinch-comp-tile-control-color-disabled-border-initial'?: string;
37
+ '--sinch-comp-tile-control-color-disabled-text-initial'?: string;
38
+ '--sinch-comp-tile-control-color-disabled-icon-initial'?: string;
39
+ '--sinch-comp-tile-control-shadow-initial'?: string;
40
+ '--sinch-comp-tile-control-shadow-hover'?: string;
41
+ '--sinch-comp-tile-control-shadow-active'?: string;
42
+ '--sinch-comp-tile-control-shadow-disabled'?: string;
43
+ '--sinch-global-size-icon'?: string;
44
+ '--sinch-global-color-icon'?: string;
45
+ };
46
+ export type TSinchTileControlOption = {
47
+ props: TSinchTileControlOptionProps;
48
+ events: TSinchTileControlOptionEvents;
49
+ style: TSinchTileControlOptionStyle;
66
50
  };
51
+ export type TSinchTileControlOptionElement = NectaryComponentVanillaByType<TSinchTileControlOption>;
52
+ export type TSinchTileControlOptionReact = NectaryComponentReactByType<TSinchTileControlOption>;
@@ -1,21 +1,25 @@
1
1
  import '../icon';
2
2
  import '../segmented-control';
3
3
  import '../segmented-control-option';
4
- import type { TSinchTimePickerElement, TSinchTimePickerReact } from './types';
4
+ import type { TSinchTimePicker } from './types';
5
+ import type { NectaryComponentReact, NectaryComponentVanilla } from '../types';
5
6
  declare global {
7
+ interface NectaryComponentMap {
8
+ 'sinch-time-picker': TSinchTimePicker;
9
+ }
6
10
  interface HTMLElementTagNameMap {
7
- 'sinch-time-picker': TSinchTimePickerElement;
11
+ 'sinch-time-picker': NectaryComponentVanilla<'sinch-time-picker'>;
8
12
  }
9
13
  namespace JSX {
10
14
  interface IntrinsicElements {
11
- 'sinch-time-picker': TSinchTimePickerReact;
15
+ 'sinch-time-picker': NectaryComponentReact<'sinch-time-picker'>;
12
16
  }
13
17
  }
14
18
  }
15
19
  declare module 'react' {
16
20
  namespace JSX {
17
21
  interface IntrinsicElements {
18
- 'sinch-time-picker': TSinchTimePickerReact;
22
+ 'sinch-time-picker': NectaryComponentReact<'sinch-time-picker'>;
19
23
  }
20
24
  }
21
25
  }