@nectary/components 0.38.0 → 0.39.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 (54) hide show
  1. package/accordion/types.d.ts +1 -0
  2. package/card/index.d.ts +2 -0
  3. package/card/index.js +6 -31
  4. package/date-picker/index.js +42 -2
  5. package/date-picker/types.d.ts +25 -1
  6. package/dialog/index.d.ts +1 -0
  7. package/dialog/index.js +3 -2
  8. package/dropdown/types.d.ts +2 -0
  9. package/inline-alert/index.js +1 -1
  10. package/package.json +1 -1
  11. package/pagination/types.d.ts +1 -0
  12. package/radio/types.d.ts +1 -0
  13. package/segment/index.js +1 -1
  14. package/segment-collapse/types.d.ts +1 -0
  15. package/segmented-control/types.d.ts +1 -0
  16. package/segmented-icon-control/types.d.ts +1 -0
  17. package/select/types.d.ts +1 -1
  18. package/tabs/types.d.ts +1 -0
  19. package/tag/index.d.ts +1 -0
  20. package/tag/index.js +10 -3
  21. package/tag/utils.d.ts +3 -0
  22. package/tag/utils.js +6 -1
  23. package/tag-close/index.js +5 -1
  24. package/tag-close/types.d.ts +3 -1
  25. package/time-picker/index.js +9 -1
  26. package/time-picker/types.d.ts +5 -1
  27. package/toast/index.d.ts +17 -0
  28. package/toast/index.js +153 -0
  29. package/toast/types.d.ts +28 -0
  30. package/toast/utils.d.ts +5 -0
  31. package/toast/utils.js +6 -0
  32. package/toast-manager/index.d.ts +17 -0
  33. package/toast-manager/index.js +271 -0
  34. package/toast-manager/types.d.ts +7 -0
  35. package/toggle/index.js +3 -4
  36. package/toggle/types.d.ts +1 -0
  37. package/utils.d.ts +1 -0
  38. package/utils.js +22 -0
  39. package/card-button/index.d.ts +0 -11
  40. package/card-button/index.js +0 -77
  41. package/card-button/types.d.ts +0 -12
  42. package/card-link/index.d.ts +0 -12
  43. package/card-link/index.js +0 -115
  44. package/card-link/types.d.ts +0 -14
  45. package/search/index.d.ts +0 -14
  46. package/search/index.js +0 -523
  47. package/search/types.d.ts +0 -25
  48. package/search/types.js +0 -1
  49. package/search-option/index.d.ts +0 -11
  50. package/search-option/index.js +0 -55
  51. package/search-option/types.d.ts +0 -9
  52. package/search-option/types.js +0 -1
  53. /package/{card-link → toast}/types.js +0 -0
  54. /package/{card-button → toast-manager}/types.js +0 -0
package/search/types.d.ts DELETED
@@ -1,25 +0,0 @@
1
- import type { TRect, TSinchElementReact } from '../types';
2
- import type { SyntheticEvent } from 'react';
3
- export declare type TSinchSearchElement = HTMLElement & {
4
- value: string;
5
- label: string | null;
6
- placeholder: string | null;
7
- maxVisibleItems: number | null;
8
- selectionStart: HTMLInputElement['selectionStart'];
9
- selectionEnd: HTMLInputElement['selectionEnd'];
10
- selectionDirection: HTMLInputElement['selectionDirection'];
11
- readonly dropdownRect: TRect;
12
- setAttribute(name: 'value', value: string): void;
13
- setAttribute(name: 'label', value: string): void;
14
- setAttribute(name: 'placeholder', value: string): void;
15
- setAttribute(name: 'maxvisibleitems', value: string): void;
16
- };
17
- export declare type TSinchSearchReact = TSinchElementReact<TSinchSearchElement> & {
18
- value: string;
19
- label?: string;
20
- placeholder?: string;
21
- maxVisibleItems?: number;
22
- 'aria-label': string;
23
- 'clear-aria-label': string;
24
- onChange: (e: SyntheticEvent<TSinchSearchElement, CustomEvent<string>>) => void;
25
- };
package/search/types.js DELETED
@@ -1 +0,0 @@
1
- export {};
@@ -1,11 +0,0 @@
1
- import type { TSinchSearchOptionElement, TSinchSearchOptionReact } from './types';
2
- declare global {
3
- namespace JSX {
4
- interface IntrinsicElements {
5
- 'sinch-search-option': TSinchSearchOptionReact;
6
- }
7
- }
8
- interface HTMLElementTagNameMap {
9
- 'sinch-search-option': TSinchSearchOptionElement;
10
- }
11
- }
@@ -1,55 +0,0 @@
1
- import _classPrivateFieldGet from '@babel/runtime/helpers/classPrivateFieldGet';
2
- import _classPrivateFieldSet from '@babel/runtime/helpers/classPrivateFieldSet';
3
-
4
- var _$content;
5
-
6
- function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
7
-
8
- function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
9
-
10
- import { defineCustomElement, getAttribute, NectaryElement, updateAttribute } from '../utils';
11
- const templateHTML = '<style>:host{display:block}#wrapper{display:block;box-sizing:border-box;line-height:40px;padding:0 12px;width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host(:hover)>#wrapper,:host([data-selected])>#wrapper{background-color:var(--sinch-color-snow-500)}</style><div id="wrapper"></div>';
12
- const template = document.createElement('template');
13
- template.innerHTML = templateHTML;
14
- defineCustomElement('sinch-search-option', (_$content = new WeakMap(), class extends NectaryElement {
15
- constructor() {
16
- super();
17
-
18
- _classPrivateFieldInitSpec(this, _$content, {
19
- writable: true,
20
- value: void 0
21
- });
22
-
23
- const shadowRoot = this.attachShadow();
24
- shadowRoot.appendChild(template.content.cloneNode(true));
25
-
26
- _classPrivateFieldSet(this, _$content, shadowRoot.querySelector('#wrapper'));
27
- }
28
-
29
- connectedCallback() {
30
- this.setAttribute('role', 'option');
31
- }
32
-
33
- static get observedAttributes() {
34
- return ['text'];
35
- }
36
-
37
- attributeChangedCallback(name, oldVal, newVal) {
38
- switch (name) {
39
- case 'text':
40
- {
41
- _classPrivateFieldGet(this, _$content).textContent = newVal;
42
- break;
43
- }
44
- }
45
- }
46
-
47
- set text(value) {
48
- updateAttribute(this, 'text', value);
49
- }
50
-
51
- get text() {
52
- return getAttribute(this, 'text', '');
53
- }
54
-
55
- }));
@@ -1,9 +0,0 @@
1
- import type { TSinchElementReact } from '../types';
2
- export declare type TSinchSearchOptionElement = HTMLElement & {
3
- text: string;
4
- setAttribute(name: 'text', value: string): void;
5
- };
6
- export declare type TSinchSearchOptionReact = TSinchElementReact<TSinchSearchOptionElement> & {
7
- text: string;
8
- 'aria-label': string;
9
- };
@@ -1 +0,0 @@
1
- export {};
File without changes
File without changes