@nectary/labs 2.3.4 → 2.4.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 (35) hide show
  1. package/README.md +354 -0
  2. package/color-select/index.d.ts +39 -0
  3. package/color-select/index.js +96 -0
  4. package/index.d.ts +2 -0
  5. package/index.js +3 -0
  6. package/package.json +2 -6
  7. package/{phone-preview.d.ts → phone-preview/index.d.ts} +18 -7
  8. package/phone-preview/index.js +94 -0
  9. package/phone-preview-rcs-channel/index.d.ts +49 -0
  10. package/phone-preview-rcs-channel/index.js +175 -0
  11. package/phone-preview-rcs-channel-actions/index.d.ts +37 -0
  12. package/phone-preview-rcs-channel-actions/index.js +126 -0
  13. package/phone-preview-rcs-channel-info/index.d.ts +29 -0
  14. package/phone-preview-rcs-channel-info/index.js +64 -0
  15. package/phone-preview-rcs-channel-info-option/index.d.ts +40 -0
  16. package/phone-preview-rcs-channel-info-option/index.js +106 -0
  17. package/phone-preview-rcs-channel-options/index.d.ts +27 -0
  18. package/phone-preview-rcs-channel-options/index.js +46 -0
  19. package/phone-preview-rcs-channel-tabs/index.d.ts +34 -0
  20. package/phone-preview-rcs-channel-tabs/index.js +79 -0
  21. package/{phone-preview-rcs-chat.d.ts → phone-preview-rcs-chat/index.d.ts} +20 -8
  22. package/phone-preview-rcs-chat/index.js +79 -0
  23. package/phone-preview-rcs-chat-message/index.d.ts +35 -0
  24. package/phone-preview-rcs-chat-message/index.js +48 -0
  25. package/utils/element.d.ts +9 -0
  26. package/utils/element.js +35 -0
  27. package/utils/index.d.ts +1 -1
  28. package/utils/index.js +1 -1
  29. package/Readme.md +0 -1
  30. package/color-select.d.ts +0 -34
  31. package/color-select.js +0 -79
  32. package/phone-preview-rcs-channel.d.ts +0 -50
  33. package/phone-preview-rcs-channel.js +0 -319
  34. package/phone-preview-rcs-chat.js +0 -162
  35. package/phone-preview.js +0 -120
@@ -0,0 +1,46 @@
1
+ import { defineCustomElement, NectaryElement } from '../utils';
2
+ import templateHTML from './template.html';
3
+ const template = document.createElement('template');
4
+ template.innerHTML = templateHTML;
5
+ export class PhonePreviewRcsChannelOptions extends NectaryElement {
6
+ #optionsContainer;
7
+ #controller = null;
8
+ constructor() {
9
+ super();
10
+ const shadowRoot = this.attachShadow();
11
+ shadowRoot.appendChild(template.content.cloneNode(true));
12
+ this.#optionsContainer = shadowRoot.querySelector('#options-container');
13
+ }
14
+ connectedCallback() {
15
+ super.connectedCallback();
16
+ this.#controller = new AbortController();
17
+ const { signal } = this.#controller;
18
+ this.#optionsContainer.addEventListener('click', this.#onOptionClick, { signal });
19
+ }
20
+ disconnectedCallback() {
21
+ super.disconnectedCallback();
22
+ this.#controller?.abort();
23
+ this.#controller = null;
24
+ }
25
+ static get observedAttributes() {
26
+ return [];
27
+ }
28
+ attributeChangedCallback(name, oldVal, newVal) {
29
+ if (oldVal === newVal) {
30
+ // No change needed
31
+ }
32
+ }
33
+ #onOptionClick = (event) => {
34
+ const target = event.target;
35
+ if (target.tagName === 'BUTTON') {
36
+ const buttonText = target.textContent?.trim();
37
+ this.dispatchEvent(new CustomEvent('-option-click', {
38
+ detail: {
39
+ action: buttonText,
40
+ element: target,
41
+ },
42
+ }));
43
+ }
44
+ };
45
+ }
46
+ defineCustomElement('sinch-labs-phone-preview-rcs-channel-options', PhonePreviewRcsChannelOptions);
@@ -0,0 +1,34 @@
1
+ import { NectaryElement } from '../utils';
2
+ import type React from 'react';
3
+ export declare class PhonePreviewRcsChannelTabs extends NectaryElement {
4
+ #private;
5
+ constructor();
6
+ connectedCallback(): void;
7
+ disconnectedCallback(): void;
8
+ static get observedAttributes(): string[];
9
+ attributeChangedCallback(name: string, oldVal: string | null, newVal: string | null): void;
10
+ get color(): string;
11
+ set color(value: string);
12
+ get activeTab(): number;
13
+ set activeTab(value: number);
14
+ }
15
+ type Props = {
16
+ color?: string;
17
+ 'active-tab'?: number;
18
+ };
19
+ type ElementProps = Partial<{
20
+ [K in keyof Props]: Props[K] | string;
21
+ }>;
22
+ declare global {
23
+ interface HTMLElementTagNameMap {
24
+ 'sinch-labs-phone-preview-rcs-channel-tabs': ElementProps & HTMLElement;
25
+ }
26
+ }
27
+ declare module 'react' {
28
+ namespace JSX {
29
+ interface IntrinsicElements {
30
+ 'sinch-labs-phone-preview-rcs-channel-tabs': ElementProps & React.ClassAttributes<HTMLElement> & React.HTMLAttributes<HTMLElement>;
31
+ }
32
+ }
33
+ }
34
+ export {};
@@ -0,0 +1,79 @@
1
+ import { defineCustomElement, NectaryElement } from '../utils';
2
+ import templateHTML from './template.html';
3
+ const template = document.createElement('template');
4
+ template.innerHTML = templateHTML;
5
+ export class PhonePreviewRcsChannelTabs extends NectaryElement {
6
+ #tabsContainer;
7
+ #controller = null;
8
+ constructor() {
9
+ super();
10
+ const shadowRoot = this.attachShadow();
11
+ shadowRoot.appendChild(template.content.cloneNode(true));
12
+ this.#tabsContainer = shadowRoot.querySelector('#tabs-container');
13
+ }
14
+ connectedCallback() {
15
+ super.connectedCallback();
16
+ this.#controller = new AbortController();
17
+ const { signal } = this.#controller;
18
+ this.#tabsContainer.addEventListener('click', this.#onTabClick, { signal });
19
+ this.#updateUI();
20
+ }
21
+ disconnectedCallback() {
22
+ super.disconnectedCallback();
23
+ this.#controller?.abort();
24
+ this.#controller = null;
25
+ }
26
+ static get observedAttributes() {
27
+ return ['color', 'active-tab'];
28
+ }
29
+ attributeChangedCallback(name, oldVal, newVal) {
30
+ if (oldVal === newVal) {
31
+ return;
32
+ }
33
+ this.#updateUI();
34
+ }
35
+ get color() {
36
+ return this.getAttribute('color') ?? 'var(--sinch-sys-color-primary-default)';
37
+ }
38
+ set color(value) {
39
+ this.setAttribute('color', value);
40
+ }
41
+ get activeTab() {
42
+ const value = this.getAttribute('active-tab');
43
+ return (value !== null) ? parseInt(value, 10) : 0;
44
+ }
45
+ set activeTab(value) {
46
+ this.setAttribute('active-tab', value.toString());
47
+ }
48
+ #updateUI() {
49
+ if (!this.isDomConnected) {
50
+ return;
51
+ }
52
+ // Update CSS custom property for highlight color
53
+ this.#tabsContainer.style.setProperty('--highlight-color', this.color);
54
+ // Update active tab state
55
+ const buttons = this.#tabsContainer.querySelectorAll('button');
56
+ buttons.forEach((button, index) => {
57
+ if (index === this.activeTab) {
58
+ button.classList.add('active');
59
+ }
60
+ else {
61
+ button.classList.remove('active');
62
+ }
63
+ });
64
+ }
65
+ #onTabClick = (event) => {
66
+ const target = event.target;
67
+ if (target.tagName === 'BUTTON') {
68
+ const buttons = Array.from(this.#tabsContainer.querySelectorAll('button'));
69
+ const clickedIndex = buttons.indexOf(target);
70
+ if (clickedIndex !== -1) {
71
+ this.activeTab = clickedIndex;
72
+ this.dispatchEvent(new CustomEvent('-tab-change', {
73
+ detail: clickedIndex,
74
+ }));
75
+ }
76
+ }
77
+ };
78
+ }
79
+ defineCustomElement('sinch-labs-phone-preview-rcs-channel-tabs', PhonePreviewRcsChannelTabs);
@@ -1,4 +1,6 @@
1
1
  import '@nectary/components/icon';
2
+ import { NectaryElement } from '../utils';
3
+ import '../phone-preview-rcs-chat-message';
2
4
  import type React from 'react';
3
5
  /**
4
6
  * RCS chat preview component.
@@ -6,15 +8,25 @@ import type React from 'react';
6
8
  * @param props.name Brand name.
7
9
  * @param props.description Brand description.
8
10
  * @param props.logo Brand logo image.
9
- * @param props.messages List of messages.
10
11
  */
11
- export declare const RcsChatPreview: (props: {
12
- name: string;
13
- description: string;
14
- logo: string;
15
- messages: string[];
16
- }) => Node | Node[];
17
- type Props = Parameters<typeof RcsChatPreview>[0];
12
+ export declare class RcsChatPreview extends NectaryElement {
13
+ #private;
14
+ constructor();
15
+ connectedCallback(): void;
16
+ static get observedAttributes(): string[];
17
+ attributeChangedCallback(name: string, oldVal: string | null, newVal: string | null): void;
18
+ get name(): string;
19
+ set name(value: string);
20
+ get description(): string;
21
+ set description(value: string);
22
+ get logo(): string;
23
+ set logo(value: string);
24
+ }
25
+ type Props = {
26
+ name?: string;
27
+ description?: string;
28
+ logo?: string;
29
+ };
18
30
  type ElementProps = Partial<{
19
31
  [K in keyof Props]: Props[K] | string;
20
32
  }>;
@@ -0,0 +1,79 @@
1
+ import '@nectary/components/icon';
2
+ import { defineCustomElement, NectaryElement } from '../utils';
3
+ import '../phone-preview-rcs-chat-message';
4
+ import templateHTML from './template.html';
5
+ const template = document.createElement('template');
6
+ template.innerHTML = templateHTML;
7
+ /**
8
+ * RCS chat preview component.
9
+ *
10
+ * @param props.name Brand name.
11
+ * @param props.description Brand description.
12
+ * @param props.logo Brand logo image.
13
+ */
14
+ export class RcsChatPreview extends NectaryElement {
15
+ #headerLogo;
16
+ #mainLogo;
17
+ #brandName;
18
+ #brandDescription;
19
+ #transparentIcon = 'data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=';
20
+ constructor() {
21
+ super();
22
+ const shadowRoot = this.attachShadow();
23
+ shadowRoot.appendChild(template.content.cloneNode(true));
24
+ this.#headerLogo = shadowRoot.querySelector('#header-logo');
25
+ this.#mainLogo = shadowRoot.querySelector('#main-logo');
26
+ this.#brandName = shadowRoot.querySelector('#brand-name');
27
+ this.#brandDescription = shadowRoot.querySelector('#brand-description');
28
+ }
29
+ connectedCallback() {
30
+ super.connectedCallback();
31
+ this.#updateUI();
32
+ }
33
+ static get observedAttributes() {
34
+ return ['name', 'description', 'logo'];
35
+ }
36
+ attributeChangedCallback(name, oldVal, newVal) {
37
+ if (oldVal === newVal) {
38
+ return;
39
+ }
40
+ switch (name) {
41
+ case 'name':
42
+ case 'description':
43
+ case 'logo':
44
+ this.#updateUI();
45
+ break;
46
+ }
47
+ }
48
+ get name() {
49
+ return this.getAttribute('name') ?? '';
50
+ }
51
+ set name(value) {
52
+ this.setAttribute('name', value);
53
+ }
54
+ get description() {
55
+ return this.getAttribute('description') ?? '';
56
+ }
57
+ set description(value) {
58
+ this.setAttribute('description', value);
59
+ }
60
+ get logo() {
61
+ return this.getAttribute('logo') ?? '';
62
+ }
63
+ set logo(value) {
64
+ this.setAttribute('logo', value);
65
+ }
66
+ #updateUI() {
67
+ if (!this.isDomConnected) {
68
+ return;
69
+ }
70
+ const logoSrc = this.logo !== '' ? this.logo : this.#transparentIcon;
71
+ const displayName = this.name !== '' ? this.name : 'Brand name';
72
+ const displayDescription = this.description !== '' ? this.description : 'Brand description';
73
+ this.#headerLogo.src = logoSrc;
74
+ this.#mainLogo.src = logoSrc;
75
+ this.#brandName.textContent = displayName;
76
+ this.#brandDescription.textContent = displayDescription;
77
+ }
78
+ }
79
+ defineCustomElement('sinch-labs-phone-preview-rcs-chat', RcsChatPreview);
@@ -0,0 +1,35 @@
1
+ import { NectaryElement } from '../utils';
2
+ import type React from 'react';
3
+ /**
4
+ * Individual RCS chat message component.
5
+ *
6
+ * @param props.text Message text content.
7
+ */
8
+ export declare class RcsChatMessage extends NectaryElement {
9
+ #private;
10
+ constructor();
11
+ connectedCallback(): void;
12
+ static get observedAttributes(): string[];
13
+ attributeChangedCallback(name: string, oldVal: string | null, newVal: string | null): void;
14
+ get text(): string;
15
+ set text(value: string);
16
+ }
17
+ type Props = {
18
+ text?: string;
19
+ };
20
+ type ElementProps = Partial<{
21
+ [K in keyof Props]: Props[K] | string;
22
+ }>;
23
+ declare global {
24
+ interface HTMLElementTagNameMap {
25
+ 'sinch-labs-phone-preview-rcs-chat-message': ElementProps & HTMLElement;
26
+ }
27
+ }
28
+ declare module 'react' {
29
+ namespace JSX {
30
+ interface IntrinsicElements {
31
+ 'sinch-labs-phone-preview-rcs-chat-message': ElementProps & React.ClassAttributes<HTMLElement> & React.HTMLAttributes<HTMLElement>;
32
+ }
33
+ }
34
+ }
35
+ export {};
@@ -0,0 +1,48 @@
1
+ import { defineCustomElement, NectaryElement } from '../utils';
2
+ import templateHTML from './template.html';
3
+ const template = document.createElement('template');
4
+ template.innerHTML = templateHTML;
5
+ /**
6
+ * Individual RCS chat message component.
7
+ *
8
+ * @param props.text Message text content.
9
+ */
10
+ export class RcsChatMessage extends NectaryElement {
11
+ #messageText;
12
+ constructor() {
13
+ super();
14
+ const shadowRoot = this.attachShadow();
15
+ shadowRoot.appendChild(template.content.cloneNode(true));
16
+ this.#messageText = shadowRoot.querySelector('#message-text');
17
+ }
18
+ connectedCallback() {
19
+ super.connectedCallback();
20
+ this.#updateUI();
21
+ }
22
+ static get observedAttributes() {
23
+ return ['text'];
24
+ }
25
+ attributeChangedCallback(name, oldVal, newVal) {
26
+ if (oldVal === newVal) {
27
+ return;
28
+ }
29
+ switch (name) {
30
+ case 'text':
31
+ this.#updateUI();
32
+ break;
33
+ }
34
+ }
35
+ get text() {
36
+ return this.getAttribute('text') ?? '';
37
+ }
38
+ set text(value) {
39
+ this.setAttribute('text', value);
40
+ }
41
+ #updateUI() {
42
+ if (!this.isDomConnected) {
43
+ return;
44
+ }
45
+ this.#messageText.textContent = this.text !== '' ? this.text : 'Sample message';
46
+ }
47
+ }
48
+ defineCustomElement('sinch-labs-phone-preview-rcs-chat-message', RcsChatMessage);
@@ -6,3 +6,12 @@ declare global {
6
6
  customElements?: CustomElementRegistry;
7
7
  }
8
8
  }
9
+ export declare class NectaryElement extends HTMLElement {
10
+ #private;
11
+ attachShadow(options?: Partial<ShadowRootInit>): ShadowRoot;
12
+ version: string;
13
+ get focusable(): boolean;
14
+ connectedCallback(): void;
15
+ disconnectedCallback(): void;
16
+ get isDomConnected(): boolean;
17
+ }
package/utils/element.js CHANGED
@@ -1,13 +1,19 @@
1
+ import pkg from '../package.json';
1
2
  const nectaryDefinitions = new Map();
2
3
  let nectaryRegistry = null;
3
4
  export const defineCustomElement = (name, constructor) => {
5
+ console.log(`Defining custom element: ${name} nectaryRegistry`, nectaryRegistry);
4
6
  if (nectaryRegistry !== null) {
5
7
  if (nectaryRegistry.get(name) == null) {
6
8
  nectaryRegistry.define(name, constructor);
9
+ console.log(`Custom element ${name} defined immediately`);
7
10
  }
11
+ console.log(`Custom element ${name} already defined in registry`);
8
12
  return;
9
13
  }
10
14
  nectaryDefinitions.set(name, constructor);
15
+ console.log(`Custom element ${name} queued for definition`);
16
+ console.log(`Current definitions queue: ${Array.from(nectaryDefinitions.keys()).join(', ')}`);
11
17
  };
12
18
  export const setLabRegistry = (registry) => {
13
19
  if (nectaryRegistry !== null) {
@@ -17,6 +23,7 @@ export const setLabRegistry = (registry) => {
17
23
  for (const [name, ctor] of nectaryDefinitions.entries()) {
18
24
  if (nectaryRegistry.get(name) == null) {
19
25
  nectaryRegistry.define(name, ctor);
26
+ console.log(`Custom element ${name} defined in registry`);
20
27
  }
21
28
  }
22
29
  nectaryDefinitions.clear();
@@ -24,3 +31,31 @@ export const setLabRegistry = (registry) => {
24
31
  export const resetLabRegistry = () => {
25
32
  nectaryRegistry = null;
26
33
  };
34
+ export class NectaryElement extends HTMLElement {
35
+ constructor() {
36
+ super(...arguments);
37
+ this.version = pkg.version;
38
+ this.#isDomConnected = false;
39
+ }
40
+ attachShadow(options) {
41
+ return super.attachShadow({
42
+ mode: 'open',
43
+ delegatesFocus: false,
44
+ customElements: nectaryRegistry,
45
+ ...options,
46
+ });
47
+ }
48
+ get focusable() {
49
+ return false;
50
+ }
51
+ #isDomConnected;
52
+ connectedCallback() {
53
+ this.#isDomConnected = true;
54
+ }
55
+ disconnectedCallback() {
56
+ this.#isDomConnected = false;
57
+ }
58
+ get isDomConnected() {
59
+ return this.#isDomConnected;
60
+ }
61
+ }
package/utils/index.d.ts CHANGED
@@ -1 +1 @@
1
- export { defineCustomElement, setLabRegistry } from './element';
1
+ export { defineCustomElement, setLabRegistry, resetLabRegistry, NectaryElement } from './element';
package/utils/index.js CHANGED
@@ -1 +1 @@
1
- export { defineCustomElement, setLabRegistry } from './element';
1
+ export { defineCustomElement, setLabRegistry, resetLabRegistry, NectaryElement } from './element';
package/Readme.md DELETED
@@ -1 +0,0 @@
1
- # Nectary labs
package/color-select.d.ts DELETED
@@ -1,34 +0,0 @@
1
- import '@nectary/components/color-menu';
2
- import '@nectary/components/color-menu-option';
3
- import '@nectary/components/color-swatch';
4
- import '@nectary/components/popover';
5
- import '@nectary/components/select-button';
6
- import { LitElement } from 'lit';
7
- export declare class ColorSelect extends LitElement {
8
- accessor open: boolean;
9
- accessor value: string;
10
- onClose(): void;
11
- onOpen(): void;
12
- onChange(e: CustomEvent<string>): void;
13
- render(): import("lit").TemplateResult<1>;
14
- }
15
- declare const ScopedColorSelect_base: typeof LitElement;
16
- export declare class ScopedColorSelect extends ScopedColorSelect_base {
17
- static elementDefinitions: {
18
- 'sinch-color-select': typeof ColorSelect;
19
- };
20
- render(): import("lit").TemplateResult<1>;
21
- }
22
- declare global {
23
- interface HTMLElementTagNameMap {
24
- 'sinch-labs-color-select': {};
25
- }
26
- }
27
- declare module 'react' {
28
- namespace JSX {
29
- interface IntrinsicElements {
30
- 'sinch-labs-color-select': {};
31
- }
32
- }
33
- }
34
- export {};
package/color-select.js DELETED
@@ -1,79 +0,0 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- import { ScopedRegistryHost } from '@lit-labs/scoped-registry-mixin';
8
- import '@nectary/components/color-menu';
9
- import '@nectary/components/color-menu-option';
10
- import '@nectary/components/color-swatch';
11
- import '@nectary/components/popover';
12
- import '@nectary/components/select-button';
13
- import { html, LitElement } from 'lit';
14
- import { customElement, property } from 'lit/decorators.js';
15
- import { defineCustomElement } from './utils';
16
- let ColorSelect = class ColorSelect extends LitElement {
17
- accessor open = false;
18
- accessor value = '';
19
- onClose() {
20
- this.open = false;
21
- }
22
- onOpen() {
23
- this.open = true;
24
- }
25
- onChange(e) {
26
- this.value = e.detail;
27
- }
28
- render() {
29
- return html `
30
- <sinch-popover
31
- ?open=${this.open}
32
- aria-label="Select color"
33
- orientation="bottom-right"
34
- modal
35
- @-close=${this.onClose}
36
- >
37
- <sinch-select-button
38
- slot="target"
39
- text=${this.value}
40
- placeholder="Select color"
41
- aria-label="Open color select"
42
- @-click=${this.onOpen}
43
- >
44
- <sinch-color-swatch slot="icon" name="${this.value}" />
45
- </sinch-select-button>
46
- <sinch-color-menu
47
- slot="content"
48
- value=${this.value}
49
- aria-label="Color menu"
50
- @-change=${this.onChange}
51
- >
52
- <sinch-color-menu-option value="violet" />
53
- </sinch-color-menu>
54
- </sinch-popover>
55
- </sinch-color-menu></sinch-popover>
56
- `;
57
- }
58
- };
59
- __decorate([
60
- property({ type: 'boolean' })
61
- ], ColorSelect.prototype, "open", null);
62
- __decorate([
63
- property()
64
- ], ColorSelect.prototype, "value", null);
65
- ColorSelect = __decorate([
66
- customElement('sinch-color-select')
67
- ], ColorSelect);
68
- export { ColorSelect };
69
- export class ScopedColorSelect extends ScopedRegistryHost(LitElement) {
70
- // Elements here will be registered against the tag names provided only
71
- // in the shadow root for this element
72
- static { this.elementDefinitions = {
73
- 'sinch-color-select': ColorSelect,
74
- }; }
75
- render() {
76
- return html `<sinch-color-select></sinch-color-select>`;
77
- }
78
- }
79
- defineCustomElement('sinch-labs-color-select', ScopedColorSelect);
@@ -1,50 +0,0 @@
1
- import '@nectary/components/icon';
2
- interface RcsChannelProps {
3
- name: string;
4
- description: string;
5
- color: string;
6
- banner: string;
7
- logo: string;
8
- phones: {
9
- label: string;
10
- number: string;
11
- }[];
12
- websites: {
13
- label: string;
14
- url: string;
15
- }[];
16
- emails: {
17
- label: string;
18
- address: string;
19
- }[];
20
- }
21
- /**
22
- * RCS channel preview component.
23
- *
24
- * @param props.color Brand color, used in the banner (if no image provided) and tabs.
25
- * @param props.name Brand name.
26
- * @param props.description Brand description.
27
- * @param props.banner Brand banner image.
28
- * @param props.logo Brand logo image.
29
- * @param props.phone Brand phone numbers.
30
- * @param props.website Brand website URLs.
31
- * @param props.email Brand email addresses.
32
- */
33
- export declare const RcsChannelPreview: (props: RcsChannelProps) => Node | Node[];
34
- type Props = Partial<Parameters<typeof RcsChannelPreview>[0]>;
35
- type ElementProps = Partial<{
36
- [K in keyof Props]: Props[K] | string;
37
- }>;
38
- declare global {
39
- interface HTMLElementTagNameMap {
40
- 'sinch-labs-phone-preview-rcs-channel': ElementProps & HTMLElement;
41
- }
42
- }
43
- declare module 'react' {
44
- namespace JSX {
45
- interface IntrinsicElements {
46
- 'sinch-labs-phone-preview-rcs-channel': ElementProps & React.ClassAttributes<HTMLElement> & React.HTMLAttributes<HTMLElement>;
47
- }
48
- }
49
- }
50
- export {};