@nectary/components 4.10.5 → 4.11.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 (173) hide show
  1. package/accordion/index.d.ts +13 -0
  2. package/accordion/index.js +3 -2
  3. package/accordion-item/index.d.ts +23 -1
  4. package/accordion-item/index.js +3 -2
  5. package/action-menu/index.d.ts +12 -0
  6. package/action-menu/index.js +3 -2
  7. package/action-menu-option/index.d.ts +14 -0
  8. package/action-menu-option/index.js +3 -2
  9. package/alert/index.d.ts +14 -1
  10. package/alert/index.js +3 -2
  11. package/avatar/index.d.ts +21 -1
  12. package/avatar/index.js +3 -2
  13. package/badge/index.d.ts +21 -2
  14. package/badge/index.js +3 -2
  15. package/button/index.d.ts +25 -1
  16. package/button/index.js +3 -2
  17. package/button-group/index.d.ts +14 -0
  18. package/button-group/index.js +3 -2
  19. package/button-group-item/index.d.ts +15 -0
  20. package/button-group-item/index.js +3 -2
  21. package/card/index.d.ts +17 -1
  22. package/card/index.js +3 -2
  23. package/card-container/index.d.ts +4 -0
  24. package/card-container/index.js +3 -2
  25. package/card-v2/index.d.ts +15 -0
  26. package/card-v2/index.js +3 -2
  27. package/card-v2-title/index.d.ts +15 -1
  28. package/card-v2-title/index.js +3 -2
  29. package/checkbox/index.d.ts +28 -0
  30. package/checkbox/index.js +3 -2
  31. package/chip/index.d.ts +16 -0
  32. package/chip/index.js +3 -2
  33. package/code-tag/index.d.ts +9 -0
  34. package/code-tag/index.js +3 -2
  35. package/color-menu/index.d.ts +20 -1
  36. package/color-menu/index.js +3 -2
  37. package/color-menu-option/index.d.ts +11 -0
  38. package/color-menu-option/index.js +3 -2
  39. package/color-swatch/index.d.ts +11 -0
  40. package/color-swatch/index.js +3 -2
  41. package/date-picker/index.d.ts +35 -1
  42. package/date-picker/index.js +3 -2
  43. package/dialog/index.d.ts +15 -0
  44. package/dialog/index.js +3 -2
  45. package/emoji/index.d.ts +11 -0
  46. package/emoji/index.js +3 -2
  47. package/emoji-picker/index.d.ts +15 -1
  48. package/emoji-picker/index.js +3 -2
  49. package/field/index.d.ts +21 -0
  50. package/field/index.js +3 -2
  51. package/file-drop/index.d.ts +23 -0
  52. package/file-drop/index.js +3 -2
  53. package/file-picker/index.d.ts +15 -0
  54. package/file-picker/index.js +3 -2
  55. package/file-status/index.d.ts +14 -1
  56. package/file-status/index.js +3 -2
  57. package/flag/index.d.ts +11 -0
  58. package/flag/index.js +3 -2
  59. package/grid/index.d.ts +4 -0
  60. package/grid/index.js +3 -2
  61. package/grid-item/index.d.ts +12 -0
  62. package/grid-item/index.js +3 -2
  63. package/help-tooltip/index.d.ts +17 -0
  64. package/help-tooltip/index.js +3 -2
  65. package/horizontal-stepper/index.d.ts +11 -0
  66. package/horizontal-stepper/index.js +3 -2
  67. package/horizontal-stepper-item/index.d.ts +14 -1
  68. package/horizontal-stepper-item/index.js +3 -2
  69. package/icon/index.d.ts +12 -0
  70. package/icon/index.js +3 -2
  71. package/inline-alert/index.d.ts +16 -1
  72. package/inline-alert/index.js +3 -2
  73. package/input/index.d.ts +45 -1
  74. package/input/index.js +3 -2
  75. package/link/index.d.ts +26 -0
  76. package/link/index.js +3 -2
  77. package/list/index.d.ts +5 -0
  78. package/list/index.js +3 -2
  79. package/list-item/index.d.ts +5 -0
  80. package/list-item/index.js +3 -2
  81. package/package.json +2 -2
  82. package/pagination/index.d.ts +20 -1
  83. package/pagination/index.js +3 -2
  84. package/persistent-overlay/index.d.ts +13 -0
  85. package/persistent-overlay/index.js +3 -2
  86. package/pop/index.d.ts +21 -2
  87. package/pop/index.js +3 -2
  88. package/popover/index.d.ts +20 -1
  89. package/popover/index.js +3 -2
  90. package/progress/index.d.ts +12 -0
  91. package/progress/index.js +3 -2
  92. package/progress-stepper/index.d.ts +15 -1
  93. package/progress-stepper/index.js +3 -2
  94. package/progress-stepper-item/index.d.ts +16 -0
  95. package/progress-stepper-item/index.js +3 -2
  96. package/radio/index.d.ts +19 -0
  97. package/radio/index.js +3 -2
  98. package/radio-option/index.d.ts +18 -0
  99. package/radio-option/index.js +3 -2
  100. package/rich-text/index.d.ts +14 -0
  101. package/rich-text/index.js +3 -2
  102. package/rich-textarea/index.d.ts +28 -0
  103. package/rich-textarea/index.js +3 -2
  104. package/segment/index.d.ts +18 -1
  105. package/segment/index.js +3 -2
  106. package/segment-collapse/index.d.ts +14 -0
  107. package/segment-collapse/index.js +3 -2
  108. package/segmented-control/index.d.ts +11 -0
  109. package/segmented-control/index.js +3 -2
  110. package/segmented-control-option/index.d.ts +16 -0
  111. package/segmented-control-option/index.js +3 -2
  112. package/segmented-icon-control/index.d.ts +13 -0
  113. package/segmented-icon-control/index.js +3 -2
  114. package/segmented-icon-control-option/index.d.ts +14 -0
  115. package/segmented-icon-control-option/index.js +3 -2
  116. package/select-button/index.d.ts +21 -0
  117. package/select-button/index.js +3 -2
  118. package/select-menu/index.d.ts +30 -0
  119. package/select-menu/index.js +3 -2
  120. package/skeleton/index.d.ts +9 -0
  121. package/skeleton/index.js +3 -2
  122. package/skeleton-item/index.d.ts +4 -0
  123. package/skeleton-item/index.js +3 -2
  124. package/spinner/index.d.ts +12 -0
  125. package/spinner/index.js +3 -2
  126. package/stop-events/index.d.ts +6 -1
  127. package/stop-events/index.js +3 -2
  128. package/table/index.d.ts +5 -0
  129. package/table/index.js +3 -2
  130. package/table-body/index.d.ts +5 -0
  131. package/table-body/index.js +3 -2
  132. package/table-cell/index.d.ts +8 -1
  133. package/table-cell/index.js +3 -2
  134. package/table-head/index.d.ts +5 -0
  135. package/table-head/index.js +3 -2
  136. package/table-head-cell/index.d.ts +15 -0
  137. package/table-head-cell/index.js +3 -2
  138. package/table-row/index.d.ts +11 -0
  139. package/table-row/index.js +3 -2
  140. package/tabs/index.d.ts +13 -1
  141. package/tabs/index.js +3 -2
  142. package/tabs-icon-option/index.d.ts +16 -0
  143. package/tabs-icon-option/index.js +3 -2
  144. package/tabs-option/index.d.ts +18 -0
  145. package/tabs-option/index.js +3 -2
  146. package/tag/index.d.ts +15 -0
  147. package/tag/index.js +3 -2
  148. package/text/index.d.ts +17 -1
  149. package/text/index.js +3 -2
  150. package/textarea/index.d.ts +38 -0
  151. package/textarea/index.js +3 -2
  152. package/tile-control/index.d.ts +17 -0
  153. package/tile-control/index.js +3 -2
  154. package/tile-control-option/index.d.ts +18 -0
  155. package/tile-control-option/index.js +3 -2
  156. package/time-picker/index.d.ts +21 -1
  157. package/time-picker/index.js +3 -2
  158. package/title/index.d.ts +15 -1
  159. package/title/index.js +3 -2
  160. package/toast/index.d.ts +16 -1
  161. package/toast/index.js +3 -2
  162. package/toast-manager/index.d.ts +14 -2
  163. package/toast-manager/index.js +3 -2
  164. package/toggle/index.d.ts +20 -0
  165. package/toggle/index.js +3 -2
  166. package/tooltip/index.d.ts +21 -2
  167. package/tooltip/index.js +3 -2
  168. package/types.d.ts +10 -7
  169. package/utils/adapters.d.ts +4 -4
  170. package/vertical-stepper/index.d.ts +11 -0
  171. package/vertical-stepper/index.js +3 -2
  172. package/vertical-stepper-item/index.d.ts +14 -1
  173. package/vertical-stepper-item/index.js +3 -2
@@ -1,7 +1,24 @@
1
1
  import '../tooltip';
2
2
  import '../icon';
3
+ import { NectaryElement } from '../utils';
3
4
  import type { TSinchHelpTooltip } from './types';
4
5
  import type { NectaryComponentReact, NectaryComponentVanilla } from '../types';
6
+ export declare class HelpTooltip extends NectaryElement {
7
+ #private;
8
+ constructor();
9
+ connectedCallback(): void;
10
+ disconnectedCallback(): void;
11
+ static get observedAttributes(): string[];
12
+ attributeChangedCallback(name: string, _: string | null, newVal: string | null): void;
13
+ get text(): string;
14
+ set text(value: string);
15
+ get width(): number | undefined;
16
+ set width(value: number | undefined);
17
+ get orientation(): string;
18
+ set orientation(value: string);
19
+ get footprintRect(): import("../types").TRect;
20
+ get tooltipRect(): import("../types").TRect;
21
+ }
5
22
  declare global {
6
23
  interface NectaryComponentMap {
7
24
  'sinch-help-tooltip': TSinchHelpTooltip;
@@ -4,7 +4,7 @@ import { defineCustomElement, getAttribute, getIntegerAttribute, getReactEventHa
4
4
  const templateHTML = '<style>:host{display:contents}#icon{--sinch-global-size-icon:18px}</style><sinch-tooltip type="fast"><sinch-icon icons-version="2" name="circle-question" id="icon"></sinch-icon></sinch-tooltip>';
5
5
  const template = document.createElement('template');
6
6
  template.innerHTML = templateHTML;
7
- defineCustomElement('sinch-help-tooltip', class extends NectaryElement {
7
+ export class HelpTooltip extends NectaryElement {
8
8
  #$tooltip;
9
9
  #controller = null;
10
10
  constructor() {
@@ -71,4 +71,5 @@ defineCustomElement('sinch-help-tooltip', class extends NectaryElement {
71
71
  #onTooltipHideReactHandler = () => {
72
72
  getReactEventHandler(this, 'on-hide')?.();
73
73
  };
74
- });
74
+ }
75
+ defineCustomElement('sinch-help-tooltip', HelpTooltip);
@@ -1,5 +1,16 @@
1
+ import { NectaryElement } from '../utils';
1
2
  import type { TSinchHorizontalStepper } from './types';
2
3
  import type { NectaryComponentReact, NectaryComponentVanilla } from '../types';
4
+ export declare class HorizontalStepper extends NectaryElement {
5
+ #private;
6
+ constructor();
7
+ connectedCallback(): void;
8
+ disconnectedCallback(): void;
9
+ static get observedAttributes(): string[];
10
+ attributeChangedCallback(name: string): void;
11
+ set index(value: string);
12
+ get index(): string;
13
+ }
3
14
  declare global {
4
15
  interface NectaryComponentMap {
5
16
  'sinch-horizontal-stepper': TSinchHorizontalStepper;
@@ -2,7 +2,7 @@ import { clampNumber, defineCustomElement, getAttribute, getIntegerAttribute, Ne
2
2
  const templateHTML = '<style>:host{display:block;outline:0;--sinch-comp-horizontal-stepper-color-background-default:var(--sinch-sys-color-surface-tertiary-default);--sinch-comp-horizontal-stepper-color-background-visited-skip:var(--sinch-sys-color-surface-tertiary-default);--sinch-comp-horizontal-stepper-color-background-active:var(--sinch-ref-color-neutral-700);--sinch-comp-horizontal-stepper-color-background-visited:var(--sinch-ref-color-neutral-350);--sinch-comp-horizontal-stepper-color-background-visited-error:var(--sinch-sys-color-feedback-danger-strong);--sinch-comp-horizontal-stepper-color-border-default:transparent;--sinch-comp-horizontal-stepper-color-border-visited-skip:var(--sinch-ref-color-neutral-700);--sinch-comp-horizontal-stepper-color-border-active:transparent;--sinch-comp-horizontal-stepper-color-border-visited:var(--sinch-ref-color-neutral-700);--sinch-comp-horizontal-stepper-color-border-visited-error:var(--sinch-ref-color-neutral-700);--sinch-comp-horizontal-stepper-color-icon-default:var(--sinch-ref-color-neutral-900);--sinch-comp-horizontal-stepper-color-icon-visited-skip:var(--sinch-ref-color-neutral-900);--sinch-comp-horizontal-stepper-color-icon-active:var(--sinch-sys-color-basic-pure);--sinch-comp-horizontal-stepper-color-icon-visited:var(--sinch-ref-color-neutral-900);--sinch-comp-horizontal-stepper-color-icon-visited-error:var(--sinch-ref-color-neutral-900);--sinch-comp-horizontal-stepper-color-label:var(--sinch-sys-color-text-default);--sinch-comp-horizontal-stepper-color-description:var(--sinch-sys-color-text-muted);--sinch-comp-horizontal-stepper-color-progress:var(--sinch-ref-color-neutral-350);--sinch-comp-horizontal-stepper-color-progress-visited:var(--sinch-ref-color-neutral-700)}#wrapper{position:relative;display:flex;flex-direction:row;gap:28px;width:fit-content}#progress{position:absolute;height:1px;background-color:var(--sinch-comp-horizontal-stepper-color-progress);left:72px;right:72px;top:16px;transform:translateY(-50%)}#bar{position:absolute;height:1px;background-color:var(--sinch-comp-horizontal-stepper-color-progress-visited);left:0;top:0}</style><div id="wrapper"><div id="progress"><div id="bar"></div></div><slot></slot></div>';
3
3
  const template = document.createElement('template');
4
4
  template.innerHTML = templateHTML;
5
- defineCustomElement('sinch-horizontal-stepper', class extends NectaryElement {
5
+ export class HorizontalStepper extends NectaryElement {
6
6
  #$itemsSlot;
7
7
  #$progressBar;
8
8
  constructor() {
@@ -58,4 +58,5 @@ defineCustomElement('sinch-horizontal-stepper', class extends NectaryElement {
58
58
  this.setAttribute('aria-valuemax', String($items.length));
59
59
  this.setAttribute('aria-valuenow', String(valueIndex + 1));
60
60
  };
61
- });
61
+ }
62
+ defineCustomElement('sinch-horizontal-stepper', HorizontalStepper);
@@ -1,8 +1,21 @@
1
1
  import '../icon';
2
2
  import '../title';
3
3
  import '../text';
4
- import type { TSinchHorizontalStepperItem } from './types';
4
+ import { NectaryElement } from '../utils';
5
+ import type { TSinchHorizontalStepperStatusType, TSinchHorizontalStepperItem } from './types';
5
6
  import type { NectaryComponentReact, NectaryComponentVanilla } from '../types';
7
+ export declare class HorizontalStepperItem extends NectaryElement {
8
+ #private;
9
+ constructor();
10
+ static get observedAttributes(): string[];
11
+ attributeChangedCallback(name: string, oldVal: string | null, newVal: string | null): void;
12
+ set label(value: string);
13
+ get label(): string;
14
+ set description(value: string);
15
+ get description(): string;
16
+ get status(): TSinchHorizontalStepperStatusType | null;
17
+ set status(value: TSinchHorizontalStepperStatusType | null);
18
+ }
6
19
  declare global {
7
20
  interface NectaryComponentMap {
8
21
  'sinch-horizontal-stepper-item': TSinchHorizontalStepperItem;
@@ -6,7 +6,7 @@ const templateHTML = '<style>:host{display:block;outline:0}#wrapper{width:144px;
6
6
  import { statusValues } from './utils';
7
7
  const template = document.createElement('template');
8
8
  template.innerHTML = templateHTML;
9
- defineCustomElement('sinch-horizontal-stepper-item', class extends NectaryElement {
9
+ export class HorizontalStepperItem extends NectaryElement {
10
10
  #$label;
11
11
  #$description;
12
12
  #$circleText;
@@ -58,4 +58,5 @@ defineCustomElement('sinch-horizontal-stepper-item', class extends NectaryElemen
58
58
  set status(value) {
59
59
  updateLiteralAttribute(this, statusValues, 'status', value);
60
60
  }
61
- });
61
+ }
62
+ defineCustomElement('sinch-horizontal-stepper-item', HorizontalStepperItem);
package/icon/index.d.ts CHANGED
@@ -1,5 +1,17 @@
1
+ import { NectaryElement } from '../utils';
1
2
  import type { TSinchIcon } from './types';
2
3
  import type { NectaryComponentReact, NectaryComponentVanilla } from '../types';
4
+ export declare class Icon extends NectaryElement {
5
+ #private;
6
+ constructor();
7
+ static get observedAttributes(): string[];
8
+ attributeChangedCallback(name: string, _: string | null, newVal: string | null): void;
9
+ set name(value: string);
10
+ get name(): string;
11
+ set iconsVersion(value: '1' | '2');
12
+ get iconsVersion(): '1' | '2';
13
+ _matchNameToFont(): void;
14
+ }
3
15
  declare global {
4
16
  interface NectaryComponentMap {
5
17
  'sinch-icon': TSinchIcon;
package/icon/index.js CHANGED
@@ -2,7 +2,7 @@ import { defineCustomElement, getAttribute, NectaryElement, updateAttribute } fr
2
2
  const templateHTML = '<style>:host{display:inline-block}#icon{display:block;font-weight:var(--sinch-comp-icon-font-weight);font-size:var(--sinch-global-size-icon, 24px);-webkit-font-smoothing:antialiased;line-height:1;white-space:nowrap;width:var(--sinch-global-size-icon,24px);height:var(--sinch-global-size-icon,24px);color:var(--sinch-global-color-icon,var(--sinch-sys-color-text-default));user-select:none;font-family:var(--sinch-comp-icon-font-family);font-feature-settings:var(--sinch-comp-icon-font-feature-settings)}#icon.zero-to-d{font-family:var(--sinch-comp-icon-font-family-zero-to-d)}#icon.e-to-o{font-family:var(--sinch-comp-icon-font-family-e-to-o)}#icon.p-to-z{font-family:var(--sinch-comp-icon-font-family-p-to-z)}</style><span id="icon" role="img"></span>';
3
3
  const template = document.createElement('template');
4
4
  template.innerHTML = templateHTML;
5
- defineCustomElement('sinch-icon', class extends NectaryElement {
5
+ export class Icon extends NectaryElement {
6
6
  #$icon;
7
7
  constructor() {
8
8
  super();
@@ -56,4 +56,5 @@ defineCustomElement('sinch-icon', class extends NectaryElement {
56
56
  return updateAttribute(this.#$icon, 'class', 'p-to-z');
57
57
  }
58
58
  }
59
- });
59
+ }
60
+ defineCustomElement('sinch-icon', Icon);
@@ -2,8 +2,23 @@ import '../icon';
2
2
  import '../rich-text';
3
3
  import '../text';
4
4
  import '../title';
5
- import type { TSinchInlineAlert } from './types';
5
+ import { NectaryElement } from '../utils';
6
+ import type { TSinchInlineAlertType, TSinchInlineAlert } from './types';
6
7
  import type { NectaryComponentReact, NectaryComponentVanilla } from '../types';
8
+ export declare class InlineAlert extends NectaryElement {
9
+ #private;
10
+ constructor();
11
+ connectedCallback(): void;
12
+ disconnectedCallback(): void;
13
+ static get observedAttributes(): string[];
14
+ attributeChangedCallback(name: string, _: string | null, newVal: string | null): void;
15
+ get type(): TSinchInlineAlertType;
16
+ set type(value: TSinchInlineAlertType);
17
+ get text(): string;
18
+ set text(value: string);
19
+ get caption(): string;
20
+ set caption(value: string);
21
+ }
7
22
  declare global {
8
23
  interface NectaryComponentMap {
9
24
  'sinch-inline-alert': TSinchInlineAlert;
@@ -7,7 +7,7 @@ const templateHTML = '<style>:host{display:block}#wrapper{display:flex;flex-dire
7
7
  import { typeValues } from './utils';
8
8
  const template = document.createElement('template');
9
9
  template.innerHTML = templateHTML;
10
- defineCustomElement('sinch-inline-alert', class extends NectaryElement {
10
+ export class InlineAlert extends NectaryElement {
11
11
  #$text;
12
12
  #$caption;
13
13
  #$closeWrapper;
@@ -80,4 +80,5 @@ defineCustomElement('sinch-inline-alert', class extends NectaryElement {
80
80
  #onActionSlotChange = () => {
81
81
  setClass(this.#$actionWrapper, 'empty', this.#$actionSlot.assignedElements().length === 0);
82
82
  };
83
- });
83
+ }
84
+ defineCustomElement('sinch-inline-alert', InlineAlert);
package/input/index.d.ts CHANGED
@@ -1,5 +1,49 @@
1
- import type { TSinchInput } from './types';
1
+ import { NectaryElement } from '../utils';
2
+ import type { TSinchInputType, TSinchInput } from './types';
2
3
  import type { NectaryComponentReact, NectaryComponentVanilla } from '../types';
4
+ import type { TSinchSize } from '../utils/size';
5
+ export declare class Input extends NectaryElement {
6
+ #private;
7
+ static formAssociated: boolean;
8
+ constructor();
9
+ connectedCallback(): void;
10
+ disconnectedCallback(): void;
11
+ formAssociatedCallback(): void;
12
+ formResetCallback(): void;
13
+ formStateRestoreCallback(state: string | FormData | null): void;
14
+ static get observedAttributes(): string[];
15
+ attributeChangedCallback(name: string, oldVal: string | null, newVal: string | null): void;
16
+ set name(value: string);
17
+ get name(): string;
18
+ set type(value: TSinchInputType);
19
+ get type(): TSinchInputType;
20
+ set value(value: string);
21
+ get value(): string;
22
+ set mask(value: string | null);
23
+ get mask(): string | null;
24
+ set placeholder(value: string | null);
25
+ get placeholder(): string | null;
26
+ set invalid(isInvalid: boolean);
27
+ get invalid(): boolean;
28
+ set disabled(isDisabled: boolean);
29
+ get disabled(): boolean;
30
+ set autofocus(isAutofocus: boolean);
31
+ get autofocus(): boolean;
32
+ set size(size: TSinchSize);
33
+ get size(): TSinchSize;
34
+ set autocomplete(value: string);
35
+ get autocomplete(): string;
36
+ get selectionStart(): HTMLInputElement['selectionStart'];
37
+ set selectionStart(value: HTMLInputElement['selectionStart']);
38
+ get selectionEnd(): HTMLInputElement['selectionEnd'];
39
+ set selectionEnd(value: HTMLInputElement['selectionEnd']);
40
+ get selectionDirection(): HTMLInputElement['selectionDirection'];
41
+ set selectionDirection(value: HTMLInputElement['selectionDirection']);
42
+ setSelectionRange(selectionStart: number, selectionEnd: number): void;
43
+ get focusable(): boolean;
44
+ focus(): void;
45
+ blur(): void;
46
+ }
3
47
  declare global {
4
48
  interface NectaryComponentMap {
5
49
  'sinch-input': TSinchInput;
package/input/index.js CHANGED
@@ -5,7 +5,7 @@ const templateHTML = '<style>:host{all:initial;display:inline-block;vertical-ali
5
5
  import { deleteContentBackward, deleteContentForward, getMaskSymbols, inputTypes, insertText, beginMaskedComposition, endMaskedComposition, splitValueAndMask, getMergedValueSliced, insertFromPaste } from './utils';
6
6
  const template = document.createElement('template');
7
7
  template.innerHTML = templateHTML;
8
- defineCustomElement('sinch-input', class extends NectaryElement {
8
+ export class Input extends NectaryElement {
9
9
  #$input;
10
10
  #$inputMask;
11
11
  #$iconSlot;
@@ -710,4 +710,5 @@ defineCustomElement('sinch-input', class extends NectaryElement {
710
710
  #onWheelReactHandler = e => {
711
711
  getReactEventHandler(this, 'on-wheel')?.(e);
712
712
  };
713
- });
713
+ }
714
+ defineCustomElement('sinch-input', Input);
package/link/index.d.ts CHANGED
@@ -1,6 +1,32 @@
1
1
  import '../icon';
2
+ import { NectaryElement } from '../utils';
2
3
  import type { TSinchLink } from './types';
3
4
  import type { NectaryComponentReact, NectaryComponentVanilla } from '../types';
5
+ export declare class Link extends NectaryElement {
6
+ #private;
7
+ constructor();
8
+ connectedCallback(): void;
9
+ disconnectedCallback(): void;
10
+ static get observedAttributes(): string[];
11
+ attributeChangedCallback(name: string, oldVal: string | null, newVal: string | null): void;
12
+ get text(): string;
13
+ set text(value: string);
14
+ get href(): string;
15
+ set href(value: string);
16
+ set 'use-history'(value: boolean);
17
+ get 'use-history'(): boolean;
18
+ set disabled(isDisabled: boolean);
19
+ get disabled(): boolean;
20
+ set external(isExternal: boolean);
21
+ get external(): boolean;
22
+ set standalone(isstandalone: boolean);
23
+ get standalone(): boolean;
24
+ set preventDefault(isPrevented: boolean);
25
+ get preventDefault(): boolean;
26
+ get focusable(): boolean;
27
+ focus(): void;
28
+ blur(): void;
29
+ }
4
30
  declare global {
5
31
  interface NectaryComponentMap {
6
32
  'sinch-link': TSinchLink;
package/link/index.js CHANGED
@@ -3,7 +3,7 @@ import { defineCustomElement, getBooleanAttribute, getAttribute, updateBooleanAt
3
3
  const templateHTML = '<style>:host{display:inline}a{font:var(--sinch-comp-link-default-font-initial);font-size:inherit;line-height:inherit;text-decoration:var(--sinch-comp-link-default-text-decoration-initial);color:var(--sinch-comp-link-color-default-text-initial);border-radius:.5em;white-space:nowrap;--sinch-global-color-icon:var(--sinch-comp-link-color-default-icon-initial)}a:hover{text-decoration:var(--sinch-comp-link-default-text-decoration-hover);color:var(--sinch-comp-link-color-default-text-hover);--sinch-global-color-icon:var(--sinch-comp-link-color-default-icon-hover)}a:focus-visible{outline:2px solid var(--sinch-comp-link-color-default-outline-focus);outline-offset:2px}:host([standalone]){display:block}:host([standalone]) a{display:block;font:var(--sinch-comp-link-standalone-font-initial);font-size:inherit;line-height:inherit;text-decoration:none;width:fit-content}#external-icon,#standalone-icon{display:none;height:1em}#icon-prefix{display:none;margin-left:-.25em}:host([external]:not([standalone])) #external-icon{display:inline-block;margin-left:.25em;vertical-align:-.2em;--sinch-global-size-icon:1em}:host([standalone][external]) #external-icon{display:inline-block;vertical-align:-.4em;--sinch-global-size-icon:1.5em}:host([standalone]) #icon-prefix{display:inline}:host([standalone]:not([external])) #standalone-icon{display:inline-block;vertical-align:-.4em;--sinch-global-size-icon:1.5em}:host([disabled]) a{color:var(--sinch-comp-link-color-disabled-text-initial);pointer-events:none;cursor:initial;text-decoration:var(--sinch-comp-link-default-text-decoration-disabled);--sinch-global-color-icon:var(--sinch-comp-link-color-disabled-icon-initial)}#content{white-space:var(--sinch-global-text-white-space,normal)}</style><a referrerpolicy="no-referer" aria-hidden="true"><span id="content"></span><span id="icon-prefix">&nbsp;</span><sinch-icon icons-version="2" name="fa-arrow-up-right" id="external-icon"></sinch-icon><sinch-icon icons-version="2" name="fa-arrow-right" id="standalone-icon"></sinch-icon></a>';
4
4
  const template = document.createElement('template');
5
5
  template.innerHTML = templateHTML;
6
- defineCustomElement('sinch-link', class extends NectaryElement {
6
+ export class Link extends NectaryElement {
7
7
  #$anchor;
8
8
  #$text;
9
9
  constructor() {
@@ -147,4 +147,5 @@ defineCustomElement('sinch-link', class extends NectaryElement {
147
147
  #onClickReactHandler = e => {
148
148
  getReactEventHandler(this, 'on-click')?.(e);
149
149
  };
150
- });
150
+ }
151
+ defineCustomElement('sinch-link', Link);
package/list/index.d.ts CHANGED
@@ -1,4 +1,9 @@
1
+ import { NectaryElement } from '../utils';
1
2
  import type { NectaryComponentReact, NectaryComponentVanilla } from '../types';
3
+ export declare class List extends NectaryElement {
4
+ constructor();
5
+ connectedCallback(): void;
6
+ }
2
7
  declare global {
3
8
  interface NectaryComponentMap {
4
9
  'sinch-list': {};
package/list/index.js CHANGED
@@ -2,7 +2,7 @@ import { defineCustomElement, NectaryElement } from '../utils';
2
2
  const templateHTML = '<style>:host{display:block;height:100%}#wrapper{display:flex;flex-direction:column;box-sizing:border-box;width:100%;height:100%;overflow-y:auto}</style><div id="wrapper"><slot></slot></div>';
3
3
  const template = document.createElement('template');
4
4
  template.innerHTML = templateHTML;
5
- defineCustomElement('sinch-list', class extends NectaryElement {
5
+ export class List extends NectaryElement {
6
6
  constructor() {
7
7
  super();
8
8
  const shadowRoot = this.attachShadow();
@@ -11,4 +11,5 @@ defineCustomElement('sinch-list', class extends NectaryElement {
11
11
  connectedCallback() {
12
12
  this.setAttribute('role', 'list');
13
13
  }
14
- });
14
+ }
15
+ defineCustomElement('sinch-list', List);
@@ -1,5 +1,10 @@
1
+ import { NectaryElement } from '../utils';
1
2
  import type { TSinchListItem } from './types';
2
3
  import type { NectaryComponentReact, NectaryComponentVanilla } from '../types';
4
+ export declare class ListItem extends NectaryElement {
5
+ constructor();
6
+ connectedCallback(): void;
7
+ }
3
8
  declare global {
4
9
  interface NectaryComponentMap {
5
10
  'sinch-list-item': TSinchListItem;
@@ -2,7 +2,7 @@ import { defineCustomElement, NectaryElement } from '../utils';
2
2
  const templateHTML = '<style>:host{display:block;outline:0}#wrapper{width:100%;height:100%;box-sizing:border-box;overflow:hidden;padding:8px 0;background-color:var(--sinch-comp-list-color-default-background-initial);border-bottom:1px solid var(--sinch-comp-list-color-default-border-initial)}:host(:last-child)>#wrapper{border-bottom:none}:host(:hover)>#wrapper{background-color:var(--sinch-comp-list-color-default-background-hover)}</style><div id="wrapper"><slot name="content"></slot></div>';
3
3
  const template = document.createElement('template');
4
4
  template.innerHTML = templateHTML;
5
- defineCustomElement('sinch-list-item', class extends NectaryElement {
5
+ export class ListItem extends NectaryElement {
6
6
  constructor() {
7
7
  super();
8
8
  const shadowRoot = this.attachShadow();
@@ -11,4 +11,5 @@ defineCustomElement('sinch-list-item', class extends NectaryElement {
11
11
  connectedCallback() {
12
12
  this.setAttribute('role', 'listitem');
13
13
  }
14
- });
14
+ }
15
+ defineCustomElement('sinch-list-item', ListItem);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nectary/components",
3
- "version": "4.10.5",
3
+ "version": "4.11.1",
4
4
  "files": [
5
5
  "**/*/*.css",
6
6
  "**/*/*.json",
@@ -20,7 +20,7 @@
20
20
  },
21
21
  "dependencies": {
22
22
  "@babel/runtime": "^7.22.15",
23
- "@nectary/assets": "2.4.2"
23
+ "@nectary/assets": "2.5.0"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@babel/cli": "^7.22.15",
@@ -1,6 +1,25 @@
1
1
  import '../icon';
2
+ import { NectaryElement } from '../utils';
2
3
  import type { TSinchPagination } from './types';
3
- import type { NectaryComponentReact, NectaryComponentVanilla } from '../types';
4
+ import type { NectaryComponentReact, NectaryComponentVanilla, TRect } from '../types';
5
+ export declare class Pagination extends NectaryElement {
6
+ #private;
7
+ constructor();
8
+ connectedCallback(): void;
9
+ disconnectedCallback(): void;
10
+ static get observedAttributes(): string[];
11
+ attributeChangedCallback(name: string): void;
12
+ set value(val: number);
13
+ get value(): number;
14
+ set max(val: number);
15
+ get max(): number;
16
+ get focusable(): boolean;
17
+ focus(): void;
18
+ blur(): void;
19
+ get prevButtonRect(): TRect;
20
+ get nextButtonRect(): TRect;
21
+ nthButtonRect(index: number): TRect | null;
22
+ }
4
23
  declare global {
5
24
  interface NectaryComponentMap {
6
25
  'sinch-pagination': TSinchPagination;
@@ -9,7 +9,7 @@ const DOTS_LEFT_INDEX = 1;
9
9
  const DOTS_RIGHT_INDEX = LAST_BTN_INDEX - 1;
10
10
  const template = document.createElement('template');
11
11
  template.innerHTML = templateHTML;
12
- defineCustomElement('sinch-pagination', class extends NectaryElement {
12
+ export class Pagination extends NectaryElement {
13
13
  #$left;
14
14
  #$right;
15
15
  #$buttons;
@@ -144,4 +144,5 @@ defineCustomElement('sinch-pagination', class extends NectaryElement {
144
144
  const btn = this.#$buttons[index];
145
145
  return btn == null ? null : getRect(btn);
146
146
  }
147
- });
147
+ }
148
+ defineCustomElement('sinch-pagination', Pagination);
@@ -1,6 +1,19 @@
1
1
  import '../dialog';
2
+ import { NectaryElement } from '../utils';
2
3
  import type { TSinchPersistentOverlay } from './types';
3
4
  import type { NectaryComponentReact, NectaryComponentVanilla } from '../types';
5
+ export declare class PersistentOverlay extends NectaryElement {
6
+ #private;
7
+ constructor();
8
+ static get observedAttributes(): string[];
9
+ attributeChangedCallback(name: string, oldVal: string | null, newVal: string | null): void;
10
+ connectedCallback(): void;
11
+ disconnectedCallback(): void;
12
+ set caption(caption: string);
13
+ get caption(): string;
14
+ set open(isOpen: boolean);
15
+ get open(): boolean;
16
+ }
4
17
  declare global {
5
18
  interface NectaryComponentMap {
6
19
  'sinch-persistent-overlay': TSinchPersistentOverlay;
@@ -16,7 +16,7 @@ const observeDialogVisibilityManipulation = function (sinchDialogElement, cb) {
16
16
  }, intervalLength);
17
17
  return checkInterval;
18
18
  };
19
- defineCustomElement('sinch-persistent-overlay', class extends NectaryElement {
19
+ export class PersistentOverlay extends NectaryElement {
20
20
  #$sinchDialog;
21
21
  #visibilityObserverInterval;
22
22
  #controller = null;
@@ -98,4 +98,5 @@ defineCustomElement('sinch-persistent-overlay', class extends NectaryElement {
98
98
  #onVisibilityAlteredReactHandler = e => {
99
99
  getReactEventHandler(this, 'on-visibility-altered')?.(e);
100
100
  };
101
- });
101
+ }
102
+ defineCustomElement('sinch-persistent-overlay', PersistentOverlay);
package/pop/index.d.ts CHANGED
@@ -1,5 +1,24 @@
1
- import type { TSinchPop } from './types';
2
- import type { NectaryComponentReact, NectaryComponentVanilla } from '../types';
1
+ import { NectaryElement } from '../utils';
2
+ import type { TSinchPopOrientation, TSinchPop } from './types';
3
+ import type { NectaryComponentReact, NectaryComponentVanilla, TRect } from '../types';
4
+ export declare class Pop extends NectaryElement {
5
+ #private;
6
+ constructor();
7
+ connectedCallback(): void;
8
+ disconnectedCallback(): void;
9
+ static get observedAttributes(): string[];
10
+ set modal(isModal: boolean);
11
+ get modal(): boolean;
12
+ set open(isOpen: boolean);
13
+ get open(): boolean;
14
+ get orientation(): TSinchPopOrientation;
15
+ set orientation(value: TSinchPopOrientation);
16
+ set inset(inset: number);
17
+ get inset(): number;
18
+ get footprintRect(): TRect;
19
+ get popoverRect(): TRect;
20
+ attributeChangedCallback(name: string, oldVal: string | null, newVal: string | null): void;
21
+ }
3
22
  declare global {
4
23
  interface NectaryComponentMap {
5
24
  'sinch-pop': TSinchPop;
package/pop/index.js CHANGED
@@ -3,7 +3,7 @@ const templateHTML = '<style>:host{display:contents;position:relative}dialog{pos
3
3
  import { disableOverscroll, enableOverscroll, orientationValues } from './utils';
4
4
  const template = document.createElement('template');
5
5
  template.innerHTML = templateHTML;
6
- defineCustomElement('sinch-pop', class extends NectaryElement {
6
+ export class Pop extends NectaryElement {
7
7
  #$targetWrapper;
8
8
  #$focus;
9
9
  #$dialog;
@@ -422,4 +422,5 @@ defineCustomElement('sinch-pop', class extends NectaryElement {
422
422
  this.#updateOrientation();
423
423
  }
424
424
  };
425
- });
425
+ }
426
+ defineCustomElement('sinch-pop', Pop);
@@ -1,6 +1,25 @@
1
1
  import '../pop';
2
- import type { TSinchPopover } from './types';
2
+ import { NectaryElement } from '../utils';
3
+ import type { TSinchPopoverOrientation, TSinchPopover } from './types';
3
4
  import type { NectaryComponentReact, NectaryComponentVanilla } from '../types';
5
+ export declare class Popover extends NectaryElement {
6
+ #private;
7
+ constructor();
8
+ connectedCallback(): void;
9
+ disconnectedCallback(): void;
10
+ static get observedAttributes(): string[];
11
+ attributeChangedCallback(name: string, oldVal: string | null, newVal: string | null): void;
12
+ set modal(isModal: boolean);
13
+ get modal(): boolean;
14
+ set open(isOpen: boolean);
15
+ get open(): boolean;
16
+ set tip(hasTip: boolean);
17
+ get tip(): boolean;
18
+ get orientation(): TSinchPopoverOrientation;
19
+ set orientation(value: TSinchPopoverOrientation);
20
+ get footprintRect(): import("../types").TRect;
21
+ get popoverRect(): import("../types").TRect;
22
+ }
4
23
  declare global {
5
24
  interface NectaryComponentMap {
6
25
  'sinch-popover': TSinchPopover;
package/popover/index.js CHANGED
@@ -5,7 +5,7 @@ import { getPopOrientation, orientationValues } from './utils';
5
5
  const TIP_SIZE = 16;
6
6
  const template = document.createElement('template');
7
7
  template.innerHTML = templateHTML;
8
- defineCustomElement('sinch-popover', class extends NectaryElement {
8
+ export class Popover extends NectaryElement {
9
9
  #$pop;
10
10
  #$content;
11
11
  #$tip;
@@ -158,4 +158,5 @@ defineCustomElement('sinch-popover', class extends NectaryElement {
158
158
  const availableSpace = window.innerWidth - contentRect.left - 16;
159
159
  this.#$content.style.maxWidth = `${availableSpace}px`;
160
160
  };
161
- });
161
+ }
162
+ defineCustomElement('sinch-popover', Popover);
@@ -1,6 +1,18 @@
1
1
  import '../text';
2
+ import { NectaryElement } from '../utils';
2
3
  import type { TSinchProgress } from './types';
3
4
  import type { NectaryComponentReact, NectaryComponentVanilla } from '../types';
5
+ export declare class Progress extends NectaryElement {
6
+ #private;
7
+ constructor();
8
+ connectedCallback(): void;
9
+ static get observedAttributes(): string[];
10
+ attributeChangedCallback(name: string, oldVal: string | null, newVal: string | null): void;
11
+ get value(): number;
12
+ set value(value: number);
13
+ get detailed(): boolean;
14
+ set detailed(isDetailed: boolean);
15
+ }
4
16
  declare global {
5
17
  interface NectaryComponentMap {
6
18
  'sinch-progress': TSinchProgress;
package/progress/index.js CHANGED
@@ -3,7 +3,7 @@ import { defineCustomElement, updateAttribute, NectaryElement, updateBooleanAttr
3
3
  const templateHTML = '<style>:host{display:block}#wrapper{display:flex;align-items:center;height:24px}#bar,#progress{height:8px;border-radius:4px}#progress{background-color:var(--sinch-comp-progress-color-default-background-initial);flex:1;min-width:0}#bar{background-color:var(--sinch-comp-progress-color-default-bar-initial);width:0}#text{display:none;width:46px;--sinch-global-color-text:var(--sinch-comp-progress-color-default-text-initial)}:host([detailed]) #text{display:block}</style><div id="wrapper"><sinch-text id="text" type="m"></sinch-text><div id="progress"><div id="bar"></div></div></div>';
4
4
  const template = document.createElement('template');
5
5
  template.innerHTML = templateHTML;
6
- defineCustomElement('sinch-progress', class extends NectaryElement {
6
+ export class Progress extends NectaryElement {
7
7
  #$bar;
8
8
  #$text;
9
9
  constructor() {
@@ -56,4 +56,5 @@ defineCustomElement('sinch-progress', class extends NectaryElement {
56
56
  set detailed(isDetailed) {
57
57
  updateBooleanAttribute(this, 'detailed', isDetailed);
58
58
  }
59
- });
59
+ }
60
+ defineCustomElement('sinch-progress', Progress);
@@ -1,5 +1,19 @@
1
+ import { NectaryElement } from '../utils';
1
2
  import type { TSinchProgressStepper } from './types';
2
- import type { NectaryComponentReact, NectaryComponentVanilla } from '../types';
3
+ import type { NectaryComponentReact, NectaryComponentVanilla, TRect } from '../types';
4
+ export declare class ProgressStepper extends NectaryElement {
5
+ #private;
6
+ constructor();
7
+ connectedCallback(): void;
8
+ disconnectedCallback(): void;
9
+ static get observedAttributes(): string[];
10
+ attributeChangedCallback(name: string, _: string | null, newVal: string | null): void;
11
+ set value(value: string);
12
+ get value(): string;
13
+ set progressValue(value: string);
14
+ get progressValue(): string;
15
+ nthOptionRect(index: number): TRect | null;
16
+ }
3
17
  declare global {
4
18
  interface NectaryComponentMap {
5
19
  'sinch-progress-stepper': TSinchProgressStepper;
@@ -3,7 +3,7 @@ import { defineCustomElement, getAttribute, getReactEventHandler, getRect, getTa
3
3
  const templateHTML = '<style>:host{display:block}#wrapper{display:flex;width:100%}::slotted(sinch-progress-stepper-item){flex:1;min-width:0}</style><div id="wrapper"><slot></slot></div>';
4
4
  const template = document.createElement('template');
5
5
  template.innerHTML = templateHTML;
6
- defineCustomElement('sinch-progress-stepper', class extends NectaryElement {
6
+ export class ProgressStepper extends NectaryElement {
7
7
  #$slot;
8
8
  #controller = null;
9
9
  #$items = [];
@@ -203,4 +203,5 @@ defineCustomElement('sinch-progress-stepper', class extends NectaryElement {
203
203
  #onChangeReactHandler = e => {
204
204
  getReactEventHandler(this, 'on-change')?.(e);
205
205
  };
206
- });
206
+ }
207
+ defineCustomElement('sinch-progress-stepper', ProgressStepper);