@nectary/components 4.8.1 → 4.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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 +2 -2
  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/types.d.ts +18 -38
  122. package/select-menu-option/index.d.ts +8 -4
  123. package/select-menu-option/types.d.ts +27 -33
  124. package/select-menu-option/utils.d.ts +2 -2
  125. package/skeleton/index.d.ts +8 -4
  126. package/skeleton/types.d.ts +14 -13
  127. package/skeleton-item/index.d.ts +8 -4
  128. package/skeleton-item/types.d.ts +20 -19
  129. package/spinner/index.d.ts +8 -4
  130. package/spinner/types.d.ts +12 -13
  131. package/table/index.d.ts +7 -4
  132. package/table/types.d.ts +2 -2
  133. package/table-body/index.d.ts +7 -4
  134. package/table-body/types.d.ts +2 -2
  135. package/table-cell/index.d.ts +8 -4
  136. package/table-cell/types.d.ts +11 -10
  137. package/table-head/index.d.ts +7 -4
  138. package/table-head/types.d.ts +2 -2
  139. package/table-head-cell/index.d.ts +8 -4
  140. package/table-head-cell/types.d.ts +15 -18
  141. package/table-row/index.d.ts +8 -4
  142. package/table-row/types.d.ts +14 -15
  143. package/tabs/index.d.ts +8 -4
  144. package/tabs/types.d.ts +19 -16
  145. package/tabs-icon-option/index.d.ts +8 -4
  146. package/tabs-icon-option/types.d.ts +21 -26
  147. package/tabs-option/index.d.ts +8 -4
  148. package/tabs-option/types.d.ts +26 -35
  149. package/tag/index.d.ts +9 -4
  150. package/tag/index.js +18 -1
  151. package/tag/types.d.ts +24 -31
  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,25 +1,5 @@
1
- import type { TSinchElementReact } from '../types';
2
- export type TSinchCardV2Element = HTMLElement & {
3
- /** Disabled */
4
- disabled: boolean;
5
- /** Selected */
6
- selected: boolean;
7
- /** Clickable
8
- * @default true if a click event is provided.
9
- */
10
- clickable: boolean;
11
- /** Click event */
12
- addEventListener(type: '-click', listener: (e: CustomEvent<void>) => void): void;
13
- /** Disabled */
14
- setAttribute(name: 'disabled', value: ''): void;
15
- /** Selected */
16
- setAttribute(name: 'selected', value: ''): void;
17
- /** Clickable
18
- * @default true if a click event is provided.
19
- */
20
- setAttribute(name: 'clickable', value: ''): void;
21
- };
22
- export type TSinchCardV2React = TSinchElementReact<TSinchCardV2Element> & {
1
+ import type { NectaryComponentReactByType, NectaryComponentVanillaByType } from '../types';
2
+ export type TSinchCardV2Props = {
23
3
  /** Disabled */
24
4
  disabled?: boolean;
25
5
  /** Selected */
@@ -28,36 +8,44 @@ export type TSinchCardV2React = TSinchElementReact<TSinchCardV2Element> & {
28
8
  * @default true if a click event is provided.
29
9
  */
30
10
  clickable?: boolean;
11
+ };
12
+ export type TSinchCardV2Events = {
31
13
  /** Click even handler */
32
- 'on-click'?: (e: CustomEvent<void>) => void;
33
- } & {
34
- style?: {
35
- '--sinch-comp-card-v2-shape-radius'?: string;
36
- '--sinch-comp-card-v2-shadow-initial'?: string;
37
- '--sinch-comp-card-v2-shadow-hover'?: string;
38
- '--sinch-comp-card-v2-shadow-disabled'?: string;
39
- '--sinch-comp-card-v2-shadow-active'?: string;
40
- '--sinch-comp-card-v2-font-title'?: string;
41
- '--sinch-comp-card-v2-font-description'?: string;
42
- '--sinch-comp-card-v2-color-default-border-initial'?: string;
43
- '--sinch-comp-card-v2-color-default-border-hover'?: string;
44
- '--sinch-comp-card-v2-color-default-border-disabled'?: string;
45
- '--sinch-comp-card-v2-color-default-border-active'?: string;
46
- '--sinch-comp-card-v2-color-default-background-initial'?: string;
47
- '--sinch-comp-card-v2-color-default-background-hover'?: string;
48
- '--sinch-comp-card-v2-color-default-background-disabled'?: string;
49
- '--sinch-comp-card-v2-color-default-background-active'?: string;
50
- '--sinch-comp-card-v2-color-default-description-initial'?: string;
51
- '--sinch-comp-card-v2-color-default-description-disabled'?: string;
52
- '--sinch-comp-card-v2-color-selected-border-initial'?: string;
53
- '--sinch-comp-card-v2-color-selected-border-hover'?: string;
54
- '--sinch-comp-card-v2-color-selected-border-disabled'?: string;
55
- '--sinch-comp-card-v2-color-selected-border-active'?: string;
56
- '--sinch-comp-card-v2-color-selected-background-initial'?: string;
57
- '--sinch-comp-card-v2-color-selected-background-hover'?: string;
58
- '--sinch-comp-card-v2-color-selected-background-disabled'?: string;
59
- '--sinch-comp-card-v2-color-selected-background-active'?: string;
60
- '--sinch-comp-card-v2-color-selected-description-initial'?: string;
61
- '--sinch-comp-card-v2-color-selected-description-disabled'?: string;
62
- };
14
+ '-click'?: (e: CustomEvent<void>) => void;
15
+ };
16
+ export type TSinchCardV2Style = {
17
+ '--sinch-comp-card-v2-shape-radius'?: string;
18
+ '--sinch-comp-card-v2-shadow-initial'?: string;
19
+ '--sinch-comp-card-v2-shadow-hover'?: string;
20
+ '--sinch-comp-card-v2-shadow-disabled'?: string;
21
+ '--sinch-comp-card-v2-shadow-active'?: string;
22
+ '--sinch-comp-card-v2-font-title'?: string;
23
+ '--sinch-comp-card-v2-font-description'?: string;
24
+ '--sinch-comp-card-v2-color-default-border-initial'?: string;
25
+ '--sinch-comp-card-v2-color-default-border-hover'?: string;
26
+ '--sinch-comp-card-v2-color-default-border-disabled'?: string;
27
+ '--sinch-comp-card-v2-color-default-border-active'?: string;
28
+ '--sinch-comp-card-v2-color-default-background-initial'?: string;
29
+ '--sinch-comp-card-v2-color-default-background-hover'?: string;
30
+ '--sinch-comp-card-v2-color-default-background-disabled'?: string;
31
+ '--sinch-comp-card-v2-color-default-background-active'?: string;
32
+ '--sinch-comp-card-v2-color-default-description-initial'?: string;
33
+ '--sinch-comp-card-v2-color-default-description-disabled'?: string;
34
+ '--sinch-comp-card-v2-color-selected-border-initial'?: string;
35
+ '--sinch-comp-card-v2-color-selected-border-hover'?: string;
36
+ '--sinch-comp-card-v2-color-selected-border-disabled'?: string;
37
+ '--sinch-comp-card-v2-color-selected-border-active'?: string;
38
+ '--sinch-comp-card-v2-color-selected-background-initial'?: string;
39
+ '--sinch-comp-card-v2-color-selected-background-hover'?: string;
40
+ '--sinch-comp-card-v2-color-selected-background-disabled'?: string;
41
+ '--sinch-comp-card-v2-color-selected-background-active'?: string;
42
+ '--sinch-comp-card-v2-color-selected-description-initial'?: string;
43
+ '--sinch-comp-card-v2-color-selected-description-disabled'?: string;
44
+ };
45
+ export type TSinchCardV2 = {
46
+ props: TSinchCardV2Props;
47
+ events: TSinchCardV2Events;
48
+ style: TSinchCardV2Style;
63
49
  };
50
+ export type TSinchCardV2Element = NectaryComponentVanillaByType<TSinchCardV2>;
51
+ export type TSinchCardV2React = NectaryComponentReactByType<TSinchCardV2>;
@@ -1,18 +1,22 @@
1
- import type { TSinchCardTitleElement, TSinchCardTitleReact } from './types';
1
+ import type { TSinchCardTitle } from './types';
2
+ import type { NectaryComponentReact, NectaryComponentVanilla } from '../types';
2
3
  declare global {
4
+ interface NectaryComponentMap {
5
+ 'sinch-card-v2-title': TSinchCardTitle;
6
+ }
3
7
  interface HTMLElementTagNameMap {
4
- 'sinch-card-v2-title': TSinchCardTitleElement;
8
+ 'sinch-card-v2-title': NectaryComponentVanilla<'sinch-card-v2-title'>;
5
9
  }
6
10
  namespace JSX {
7
11
  interface IntrinsicElements {
8
- 'sinch-card-v2-title': TSinchCardTitleReact;
12
+ 'sinch-card-v2-title': NectaryComponentReact<'sinch-card-v2-title'>;
9
13
  }
10
14
  }
11
15
  }
12
16
  declare module 'react' {
13
17
  namespace JSX {
14
18
  interface IntrinsicElements {
15
- 'sinch-card-v2-title': TSinchCardTitleReact;
19
+ 'sinch-card-v2-title': NectaryComponentReact<'sinch-card-v2-title'>;
16
20
  }
17
21
  }
18
22
  }
@@ -1,23 +1,6 @@
1
- import type { TSinchElementReact } from '../types';
1
+ import type { NectaryComponentReactByType, NectaryComponentVanillaByType } from '../types';
2
2
  export type TSinchOrientation = 'horizontal' | 'vertical';
3
- export type TSinchCardTitleElement = HTMLElement & {
4
- /** Text */
5
- text: string;
6
- /** Orientation relative to the icon slot */
7
- orientation: TSinchOrientation;
8
- /** Cuts the long text with “…” ellipsis */
9
- ellipsis: boolean;
10
- /** Text */
11
- setAttribute(name: 'text', value: string): void;
12
- /**
13
- * Orientation relative to the icon slot
14
- * @default "horizontal"
15
- */
16
- setAttribute(name: 'orientation', value: TSinchOrientation): void;
17
- /** Cuts the long text with “…” ellipsis */
18
- setAttribute(name: 'ellipsis', value: ''): void;
19
- };
20
- export type TSinchCardTitleReact = TSinchElementReact<TSinchCardTitleElement> & {
3
+ export type TSinchCardTitleProps = {
21
4
  /** Text */
22
5
  text: string;
23
6
  /**
@@ -27,18 +10,23 @@ export type TSinchCardTitleReact = TSinchElementReact<TSinchCardTitleElement> &
27
10
  orientation?: TSinchOrientation;
28
11
  /** Cuts the long text with “…” ellipsis */
29
12
  ellipsis?: boolean;
30
- } & {
31
- style?: {
32
- '--sinch-comp-card-v2-font-title'?: string;
33
- '--sinch-comp-card-v2-color-default-title-initial'?: string;
34
- '--sinch-comp-card-v2-color-default-title-disabled'?: string;
35
- '--sinch-comp-card-v2-color-default-icon-initial'?: string;
36
- '--sinch-comp-card-v2-color-default-icon-disabled'?: string;
37
- '--sinch-comp-card-v2-color-selected-title-disabled'?: string;
38
- '--sinch-comp-card-v2-color-selected-icon-initial'?: string;
39
- '--sinch-comp-card-v2-color-selected-icon-disabled'?: string;
40
- '--sinch-comp-card-v2-size-icon'?: string;
41
- '--sinch-global-color-icon'?: string;
42
- '--sinch-global-size-icon'?: string;
43
- };
44
13
  };
14
+ export type TSinchCardTitleStyle = {
15
+ '--sinch-comp-card-v2-font-title'?: string;
16
+ '--sinch-comp-card-v2-color-default-title-initial'?: string;
17
+ '--sinch-comp-card-v2-color-default-title-disabled'?: string;
18
+ '--sinch-comp-card-v2-color-default-icon-initial'?: string;
19
+ '--sinch-comp-card-v2-color-default-icon-disabled'?: string;
20
+ '--sinch-comp-card-v2-color-selected-title-disabled'?: string;
21
+ '--sinch-comp-card-v2-color-selected-icon-initial'?: string;
22
+ '--sinch-comp-card-v2-color-selected-icon-disabled'?: string;
23
+ '--sinch-comp-card-v2-size-icon'?: string;
24
+ '--sinch-global-color-icon'?: string;
25
+ '--sinch-global-size-icon'?: string;
26
+ };
27
+ export type TSinchCardTitle = {
28
+ props: TSinchCardTitleProps;
29
+ style: TSinchCardTitleStyle;
30
+ };
31
+ export type TSinchCardTitleElement = NectaryComponentVanillaByType<TSinchCardTitle>;
32
+ export type TSinchCardTitleReact = NectaryComponentReactByType<TSinchCardTitle>;
@@ -1,19 +1,23 @@
1
1
  import '../rich-text';
2
- import type { TSinchCheckboxElement, TSinchCheckboxReact } from './types';
2
+ import type { TSinchCheckbox } from './types';
3
+ import type { NectaryComponentReact, NectaryComponentVanilla } from '../types';
3
4
  declare global {
5
+ interface NectaryComponentMap {
6
+ 'sinch-checkbox': TSinchCheckbox;
7
+ }
4
8
  interface HTMLElementTagNameMap {
5
- 'sinch-checkbox': TSinchCheckboxElement;
9
+ 'sinch-checkbox': NectaryComponentVanilla<'sinch-checkbox'>;
6
10
  }
7
11
  namespace JSX {
8
12
  interface IntrinsicElements {
9
- 'sinch-checkbox': TSinchCheckboxReact;
13
+ 'sinch-checkbox': NectaryComponentReact<'sinch-checkbox'>;
10
14
  }
11
15
  }
12
16
  }
13
17
  declare module 'react' {
14
18
  namespace JSX {
15
19
  interface IntrinsicElements {
16
- 'sinch-checkbox': TSinchCheckboxReact;
20
+ 'sinch-checkbox': NectaryComponentReact<'sinch-checkbox'>;
17
21
  }
18
22
  }
19
23
  }
@@ -1,33 +1,5 @@
1
- import type { TSinchElementReact } from '../types';
2
- export type TSinchCheckboxElement = HTMLElement & {
3
- /** Value */
4
- checked: boolean;
5
- /** Indeterminate */
6
- indeterminate: boolean;
7
- /** Disabled */
8
- disabled: boolean;
9
- /** Invalid */
10
- invalid: boolean;
11
- /** Text */
12
- text: string | null;
13
- /** Change value event */
14
- addEventListener(type: '-change', listener: (e: CustomEvent<boolean>) => void): void;
15
- /** Focus event */
16
- addEventListener(type: '-focus', listener: (e: CustomEvent<void>) => void): void;
17
- /** Blur event */
18
- addEventListener(type: '-blur', listener: (e: CustomEvent<void>) => void): void;
19
- /** Checked */
20
- setAttribute(name: 'checked', value: ''): void;
21
- /** Indeterminate */
22
- setAttribute(name: 'indeterminate', value: ''): void;
23
- /** Disabled */
24
- setAttribute(name: 'disabled', value: ''): void;
25
- /** Invalid */
26
- setAttribute(name: 'invalid', value: ''): void;
27
- /** Text */
28
- setAttribute(name: 'text', value: string): void;
29
- };
30
- export type TSinchCheckboxReact = TSinchElementReact<TSinchCheckboxElement> & {
1
+ import type { NectaryComponentReactByType, NectaryComponentVanillaByType } from '../types';
2
+ export type TSinchCheckboxProps = {
31
3
  /** Checked */
32
4
  checked?: boolean;
33
5
  /** Indeterminate */
@@ -40,42 +12,50 @@ export type TSinchCheckboxReact = TSinchElementReact<TSinchCheckboxElement> & {
40
12
  text?: string;
41
13
  /** Label that is used for a11y – might be different from `label` */
42
14
  'aria-label': string;
15
+ };
16
+ export type TSinchCheckboxEvents = {
43
17
  /** Change value handler */
44
- 'on-change'?: (e: CustomEvent<boolean>) => void;
18
+ '-change'?: (e: CustomEvent<boolean>) => void;
45
19
  /** Focus handler */
46
- 'on-focus'?: (e: CustomEvent<void>) => void;
20
+ '-focus'?: (e: CustomEvent<void>) => void;
47
21
  /** Blur handler */
48
- 'on-blur'?: (e: CustomEvent<void>) => void;
49
- } & {
50
- style?: {
51
- '--sinch-comp-checkbox-shape-radius'?: string;
52
- '--sinch-comp-checkbox-font-label'?: string;
53
- '--sinch-comp-checkbox-color-default-background-initial'?: string;
54
- '--sinch-comp-checkbox-color-default-background-hover'?: string;
55
- '--sinch-comp-checkbox-color-default-background-active'?: string;
56
- '--sinch-comp-checkbox-color-default-border-initial'?: string;
57
- '--sinch-comp-checkbox-color-default-border-hover'?: string;
58
- '--sinch-comp-checkbox-color-default-border-active'?: string;
59
- '--sinch-comp-checkbox-color-default-text-initial'?: string;
60
- '--sinch-comp-checkbox-color-default-outline-focus'?: string;
61
- '--sinch-comp-checkbox-color-invalid-background-initial'?: string;
62
- '--sinch-comp-checkbox-color-invalid-background-hover'?: string;
63
- '--sinch-comp-checkbox-color-invalid-background-active'?: string;
64
- '--sinch-comp-checkbox-color-invalid-border-initial'?: string;
65
- '--sinch-comp-checkbox-color-invalid-border-hover'?: string;
66
- '--sinch-comp-checkbox-color-invalid-border-active'?: string;
67
- '--sinch-comp-checkbox-color-invalid-text-initial'?: string;
68
- '--sinch-comp-checkbox-color-checked-background-initial'?: string;
69
- '--sinch-comp-checkbox-color-checked-background-hover'?: string;
70
- '--sinch-comp-checkbox-color-checked-background-active'?: string;
71
- '--sinch-comp-checkbox-color-checked-border-initial'?: string;
72
- '--sinch-comp-checkbox-color-checked-border-hover'?: string;
73
- '--sinch-comp-checkbox-color-checked-border-active'?: string;
74
- '--sinch-comp-checkbox-color-disabled-background-initial'?: string;
75
- '--sinch-comp-checkbox-color-disabled-border-initial'?: string;
76
- '--sinch-comp-checkbox-color-disabled-text-initial'?: string;
77
- '--sinch-comp-checkbox-color-checked-disabled-background-initial'?: string;
78
- '--sinch-comp-checkbox-color-checked-disabled-border-initial'?: string;
79
- '--sinch-sys-color-surface-primary-default'?: string;
80
- };
22
+ '-blur'?: (e: CustomEvent<void>) => void;
23
+ };
24
+ export type TSinchCheckboxStyle = {
25
+ '--sinch-comp-checkbox-shape-radius'?: string;
26
+ '--sinch-comp-checkbox-font-label'?: string;
27
+ '--sinch-comp-checkbox-color-default-background-initial'?: string;
28
+ '--sinch-comp-checkbox-color-default-background-hover'?: string;
29
+ '--sinch-comp-checkbox-color-default-background-active'?: string;
30
+ '--sinch-comp-checkbox-color-default-border-initial'?: string;
31
+ '--sinch-comp-checkbox-color-default-border-hover'?: string;
32
+ '--sinch-comp-checkbox-color-default-border-active'?: string;
33
+ '--sinch-comp-checkbox-color-default-text-initial'?: string;
34
+ '--sinch-comp-checkbox-color-default-outline-focus'?: string;
35
+ '--sinch-comp-checkbox-color-invalid-background-initial'?: string;
36
+ '--sinch-comp-checkbox-color-invalid-background-hover'?: string;
37
+ '--sinch-comp-checkbox-color-invalid-background-active'?: string;
38
+ '--sinch-comp-checkbox-color-invalid-border-initial'?: string;
39
+ '--sinch-comp-checkbox-color-invalid-border-hover'?: string;
40
+ '--sinch-comp-checkbox-color-invalid-border-active'?: string;
41
+ '--sinch-comp-checkbox-color-invalid-text-initial'?: string;
42
+ '--sinch-comp-checkbox-color-checked-background-initial'?: string;
43
+ '--sinch-comp-checkbox-color-checked-background-hover'?: string;
44
+ '--sinch-comp-checkbox-color-checked-background-active'?: string;
45
+ '--sinch-comp-checkbox-color-checked-border-initial'?: string;
46
+ '--sinch-comp-checkbox-color-checked-border-hover'?: string;
47
+ '--sinch-comp-checkbox-color-checked-border-active'?: string;
48
+ '--sinch-comp-checkbox-color-disabled-background-initial'?: string;
49
+ '--sinch-comp-checkbox-color-disabled-border-initial'?: string;
50
+ '--sinch-comp-checkbox-color-disabled-text-initial'?: string;
51
+ '--sinch-comp-checkbox-color-checked-disabled-background-initial'?: string;
52
+ '--sinch-comp-checkbox-color-checked-disabled-border-initial'?: string;
53
+ '--sinch-sys-color-surface-primary-default'?: string;
54
+ };
55
+ export type TSinchCheckbox = {
56
+ props: TSinchCheckboxProps;
57
+ events: TSinchCheckboxEvents;
58
+ style: TSinchCheckboxStyle;
81
59
  };
60
+ export type TSinchCheckboxElement = NectaryComponentVanillaByType<TSinchCheckbox>;
61
+ export type TSinchCheckboxReact = NectaryComponentReactByType<TSinchCheckbox>;
package/chip/index.d.ts CHANGED
@@ -1,20 +1,24 @@
1
1
  import '../text';
2
2
  import '../icon';
3
- import type { TSinchChipElement, TSinchChipReact } from './types';
3
+ import type { TSinchChip } from './types';
4
+ import type { NectaryComponentVanilla, NectaryComponentReact } from '../types';
4
5
  declare global {
6
+ interface NectaryComponentMap {
7
+ 'sinch-chip': TSinchChip;
8
+ }
5
9
  interface HTMLElementTagNameMap {
6
- 'sinch-chip': TSinchChipElement;
10
+ 'sinch-chip': NectaryComponentVanilla<'sinch-chip'>;
7
11
  }
8
12
  namespace JSX {
9
13
  interface IntrinsicElements {
10
- 'sinch-chip': TSinchChipReact;
14
+ 'sinch-chip': NectaryComponentReact<'sinch-chip'>;
11
15
  }
12
16
  }
13
17
  }
14
18
  declare module 'react' {
15
19
  namespace JSX {
16
20
  interface IntrinsicElements {
17
- 'sinch-chip': TSinchChipReact;
21
+ 'sinch-chip': NectaryComponentReact<'sinch-chip'>;
18
22
  }
19
23
  }
20
24
  }
package/chip/types.d.ts CHANGED
@@ -1,56 +1,42 @@
1
1
  import type { TSinchChipColor } from './colors';
2
- import type { TSinchElementReact } from '../types';
2
+ import type { NectaryComponentReactByType, NectaryComponentVanillaByType } from '../types';
3
3
  export type { TSinchChipColor };
4
- export type TSinchChipElement = HTMLElement & {
5
- /** Text */
6
- text: string;
7
- /** Color, gray by default */
8
- color: TSinchChipColor | null;
9
- /** Small */
10
- small: boolean;
11
- /** Click event */
12
- addEventListener(type: '-click', listener: (e: CustomEvent<void>) => void): void;
13
- /** Focus event */
14
- addEventListener(type: '-focus', listener: (e: CustomEvent<void>) => void): void;
15
- /** Blur event */
16
- addEventListener(type: '-blur', listener: (e: CustomEvent<void>) => void): void;
17
- /** Text */
18
- setAttribute(name: 'text', value: string): void;
19
- /** Color, gray by default */
20
- setAttribute(name: 'color', value: string): void;
21
- /** Small */
22
- setAttribute(name: 'small', value: ''): void;
23
- };
24
- export type TSinchChipReact = TSinchElementReact<TSinchChipElement> & {
4
+ export type TSinchChipProps = {
25
5
  /** Text */
26
6
  text: string;
27
7
  /** Color, gray by default */
28
8
  color?: TSinchChipColor;
29
9
  /** Small */
30
10
  small?: boolean;
11
+ };
12
+ export type TSinchChipEvents = {
31
13
  /** Click event handler */
32
- 'on-click'?: (e: CustomEvent<void>) => void;
14
+ '-click'?: (e: CustomEvent<void>) => void;
33
15
  /** Focus event handler */
34
- 'on-focus'?: (e: CustomEvent<void>) => void;
16
+ '-focus'?: (e: CustomEvent<void>) => void;
35
17
  /** Blur event handler */
36
- 'on-blur'?: (e: CustomEvent<void>) => void;
37
- /** Label that is used for a11y` */
38
- 'aria-label': string;
39
- } & {
40
- style?: {
41
- '--sinch-comp-chip-size-container-m'?: string;
42
- '--sinch-comp-chip-size-container-s'?: string;
43
- '--sinch-comp-chip-size-icon-m'?: string;
44
- '--sinch-comp-chip-size-icon-s'?: string;
45
- '--sinch-comp-chip-font-size-m-label'?: string;
46
- '--sinch-comp-chip-font-size-s-label'?: string;
47
- '--sinch-comp-chip-color-neutral-default-background-initial'?: string;
48
- '--sinch-comp-chip-color-neutral-default-foreground-initial'?: string;
49
- '--sinch-comp-chip-color-outiline-focus'?: string;
50
- '--sinch-comp-chip-shape-radius'?: string;
51
- '--sinch-global-color-text'?: string;
52
- '--sinch-global-color-icon'?: string;
53
- '--sinch-global-size-icon'?: string;
54
- '--sinch-comp-text-font'?: string;
55
- };
18
+ '-blur'?: (e: CustomEvent<void>) => void;
19
+ };
20
+ export type TSinchChipStyle = {
21
+ '--sinch-comp-chip-size-container-m'?: string;
22
+ '--sinch-comp-chip-size-container-s'?: string;
23
+ '--sinch-comp-chip-size-icon-m'?: string;
24
+ '--sinch-comp-chip-size-icon-s'?: string;
25
+ '--sinch-comp-chip-font-size-m-label'?: string;
26
+ '--sinch-comp-chip-font-size-s-label'?: string;
27
+ '--sinch-comp-chip-color-neutral-default-background-initial'?: string;
28
+ '--sinch-comp-chip-color-neutral-default-foreground-initial'?: string;
29
+ '--sinch-comp-chip-color-outiline-focus'?: string;
30
+ '--sinch-comp-chip-shape-radius'?: string;
31
+ '--sinch-global-color-text'?: string;
32
+ '--sinch-global-color-icon'?: string;
33
+ '--sinch-global-size-icon'?: string;
34
+ '--sinch-comp-text-font'?: string;
35
+ };
36
+ export type TSinchChip = {
37
+ props: TSinchChipProps;
38
+ events: TSinchChipEvents;
39
+ style: TSinchChipStyle;
56
40
  };
41
+ export type TSinchChipElement = NectaryComponentVanillaByType<TSinchChip>;
42
+ export type TSinchChipReact = NectaryComponentReactByType<TSinchChip>;
@@ -1,18 +1,22 @@
1
- import type { TSinchCodeTagElement, TSinchCodeTagReact } from './types';
1
+ import type { TSinchCodeTag } from './types';
2
+ import type { NectaryComponentVanilla, NectaryComponentReact } from '../types';
2
3
  declare global {
4
+ interface NectaryComponentMap {
5
+ 'sinch-code-tag': TSinchCodeTag;
6
+ }
3
7
  interface HTMLElementTagNameMap {
4
- 'sinch-code-tag': TSinchCodeTagElement;
8
+ 'sinch-code-tag': NectaryComponentVanilla<'sinch-code-tag'>;
5
9
  }
6
10
  namespace JSX {
7
11
  interface IntrinsicElements {
8
- 'sinch-code-tag': TSinchCodeTagReact;
12
+ 'sinch-code-tag': NectaryComponentReact<'sinch-code-tag'>;
9
13
  }
10
14
  }
11
15
  }
12
16
  declare module 'react' {
13
17
  namespace JSX {
14
18
  interface IntrinsicElements {
15
- 'sinch-code-tag': TSinchCodeTagReact;
19
+ 'sinch-code-tag': NectaryComponentReact<'sinch-code-tag'>;
16
20
  }
17
21
  }
18
22
  }
@@ -1,20 +1,19 @@
1
- import type { TSinchElementReact } from '../types';
2
- export type TSinchCodeTagElement = HTMLElement & {
1
+ import type { NectaryComponentReactByType, NectaryComponentVanillaByType } from '../types';
2
+ export type TSinchCodeTagProps = {
3
3
  /** Text content of hyperlink */
4
4
  text: string;
5
- /** Text content of hyperlink */
6
- setAttribute(name: 'text', value: string): void;
7
5
  };
8
- export type TSinchCodeTagReact = TSinchElementReact<TSinchCodeTagElement> & {
9
- /** Text content of hyperlink */
10
- text: string;
11
- } & {
12
- style?: {
13
- '--sinch-comp-code-tag-color-default-text-initial'?: string;
14
- '--sinch-comp-code-tag-color-default-border-initial'?: string;
15
- '--sinch-comp-code-tag-color-default-background-initial'?: string;
16
- '--sinch-comp-code-tag-font-text'?: string;
17
- '--sinch-comp-code-tag-shape-radius'?: string;
18
- '--sinch-global-text-white-space'?: string;
19
- };
6
+ export type TSinchCodeTagStyle = {
7
+ '--sinch-comp-code-tag-color-default-text-initial'?: string;
8
+ '--sinch-comp-code-tag-color-default-border-initial'?: string;
9
+ '--sinch-comp-code-tag-color-default-background-initial'?: string;
10
+ '--sinch-comp-code-tag-font-text'?: string;
11
+ '--sinch-comp-code-tag-shape-radius'?: string;
12
+ '--sinch-global-text-white-space'?: string;
13
+ };
14
+ export type TSinchCodeTag = {
15
+ props: TSinchCodeTagProps;
16
+ style: TSinchCodeTagStyle;
20
17
  };
18
+ export type TSinchCodeTagElement = NectaryComponentVanillaByType<TSinchCodeTag>;
19
+ export type TSinchCodeTagReact = NectaryComponentReactByType<TSinchCodeTag>;
@@ -1,18 +1,22 @@
1
- import type { TSinchColorMenuElement, TSinchColorMenuReact } from './types';
1
+ import type { TSinchColorMenu } from './types';
2
+ import type { NectaryComponentReact, NectaryComponentVanilla } from '../types';
2
3
  declare global {
4
+ interface NectaryComponentMap {
5
+ 'sinch-color-menu': TSinchColorMenu;
6
+ }
3
7
  interface HTMLElementTagNameMap {
4
- 'sinch-color-menu': TSinchColorMenuElement;
8
+ 'sinch-color-menu': NectaryComponentVanilla<'sinch-color-menu'>;
5
9
  }
6
10
  namespace JSX {
7
11
  interface IntrinsicElements {
8
- 'sinch-color-menu': TSinchColorMenuReact;
12
+ 'sinch-color-menu': NectaryComponentReact<'sinch-color-menu'>;
9
13
  }
10
14
  }
11
15
  }
12
16
  declare module 'react' {
13
17
  namespace JSX {
14
18
  interface IntrinsicElements {
15
- 'sinch-color-menu': TSinchColorMenuReact;
19
+ 'sinch-color-menu': NectaryComponentReact<'sinch-color-menu'>;
16
20
  }
17
21
  }
18
22
  }
@@ -1,24 +1,5 @@
1
- import type { TRect, TSinchElementReact } from '../types';
2
- export type TSinchColorMenuElement = HTMLElement & {
3
- /** Value */
4
- value: string;
5
- /** How many rows to show and scroll the rest */
6
- rows: number | null;
7
- /** How many cols to show and scroll the rest */
8
- cols: number | null;
9
- nthItemRect(index: number): TRect | null;
10
- /** Change event */
11
- addEventListener(type: '-change', listener: (e: CustomEvent<string>) => void): void;
12
- /** Comma-separated color names, all colors by default */
13
- setAttribute(name: 'colors', value: string): void;
14
- /** Value */
15
- setAttribute(name: 'value', value: string): void;
16
- /** How many rows to show and scroll the rest */
17
- setAttribute(name: 'rows', value: string): void;
18
- /** How many cols to show and scroll the rest */
19
- setAttribute(name: 'cols', value: string): void;
20
- };
21
- export type TSinchColorMenuReact = TSinchElementReact<TSinchColorMenuElement> & {
1
+ import type { NectaryComponentReactByType, NectaryComponentVanillaByType, TRect } from '../types';
2
+ export type TSinchColorMenuProps = {
22
3
  /** Value */
23
4
  value: string;
24
5
  /** How many rows to show and scroll the rest */
@@ -27,6 +8,18 @@ export type TSinchColorMenuReact = TSinchElementReact<TSinchColorMenuElement> &
27
8
  cols?: number;
28
9
  /** Label that is used for a11y */
29
10
  'aria-label': string;
11
+ };
12
+ export type TSinchColorMenuMethods = {
13
+ nthItemRect(index: number): TRect | null;
14
+ };
15
+ export type TSinchColorMenuEvents = {
30
16
  /** Change event handler */
31
- 'on-change'?: (e: CustomEvent<string>) => void;
17
+ '-change'?: (e: CustomEvent<string>) => void;
18
+ };
19
+ export type TSinchColorMenu = {
20
+ props: TSinchColorMenuProps;
21
+ events: TSinchColorMenuEvents;
22
+ methods: TSinchColorMenuMethods;
32
23
  };
24
+ export type TSinchColorMenuElement = NectaryComponentVanillaByType<TSinchColorMenu>;
25
+ export type TSinchColorMenuReact = NectaryComponentReactByType<TSinchColorMenu>;
@@ -1,20 +1,24 @@
1
1
  import '../color-swatch';
2
2
  import '../tooltip';
3
- import type { TSinchColorMenuOptionElement, TSinchColorMenuOptionReact } from './types';
3
+ import type { TSinchColorMenuOption } from './types';
4
+ import type { NectaryComponentReact, NectaryComponentVanilla } from '../types';
4
5
  declare global {
6
+ interface NectaryComponentMap {
7
+ 'sinch-color-menu-option': TSinchColorMenuOption;
8
+ }
5
9
  interface HTMLElementTagNameMap {
6
- 'sinch-color-menu-option': TSinchColorMenuOptionElement;
10
+ 'sinch-color-menu-option': NectaryComponentVanilla<'sinch-color-menu-option'>;
7
11
  }
8
12
  namespace JSX {
9
13
  interface IntrinsicElements {
10
- 'sinch-color-menu-option': TSinchColorMenuOptionReact;
14
+ 'sinch-color-menu-option': NectaryComponentReact<'sinch-color-menu-option'>;
11
15
  }
12
16
  }
13
17
  }
14
18
  declare module 'react' {
15
19
  namespace JSX {
16
20
  interface IntrinsicElements {
17
- 'sinch-color-menu-option': TSinchColorMenuOptionReact;
21
+ 'sinch-color-menu-option': NectaryComponentReact<'sinch-color-menu-option'>;
18
22
  }
19
23
  }
20
24
  }