@nectary/components 0.29.1 → 0.30.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 (113) hide show
  1. package/accordion-item/types.d.ts +1 -2
  2. package/accordion-item/utils.d.ts +2 -1
  3. package/alert/index.js +1 -1
  4. package/alert/types.d.ts +1 -2
  5. package/alert/utils.d.ts +2 -1
  6. package/alert-button/index.js +1 -1
  7. package/avatar/types.d.ts +2 -3
  8. package/avatar/utils.d.ts +3 -2
  9. package/avatar-status/index.js +1 -3
  10. package/avatar-status/types.d.ts +1 -2
  11. package/avatar-status/utils.d.ts +1 -1
  12. package/button/index.js +1 -1
  13. package/button/types.d.ts +1 -2
  14. package/button/utils.d.ts +2 -1
  15. package/card/index.js +1 -1
  16. package/card-container/index.js +1 -1
  17. package/chat-bubble/types.d.ts +2 -3
  18. package/chat-bubble/utils.d.ts +3 -2
  19. package/checkbox/index.js +1 -1
  20. package/colors.json +6 -1
  21. package/date-picker/index.d.ts +19 -0
  22. package/date-picker/index.js +419 -0
  23. package/date-picker/types.d.ts +26 -0
  24. package/date-picker/types.js +1 -0
  25. package/date-picker/utils.d.ts +32 -0
  26. package/date-picker/utils.js +142 -0
  27. package/dialog/index.js +23 -5
  28. package/dropdown-checkbox-option/index.js +1 -1
  29. package/icon-button/index.js +1 -1
  30. package/icons/create-icon-class.d.ts +1 -307
  31. package/icons/keyboard-double-arrow-left/index.d.ts +11 -0
  32. package/icons/keyboard-double-arrow-left/index.js +4 -0
  33. package/icons/keyboard-double-arrow-right/index.d.ts +11 -0
  34. package/icons/keyboard-double-arrow-right/index.js +4 -0
  35. package/icons-branded/chat/index.d.ts +11 -0
  36. package/icons-branded/chat/index.js +4 -0
  37. package/icons-branded/create-icon-class.d.ts +1 -311
  38. package/icons-branded/mms/index.d.ts +11 -0
  39. package/icons-branded/mms/index.js +4 -0
  40. package/icons-branded/push/index.d.ts +11 -0
  41. package/icons-branded/push/index.js +4 -0
  42. package/icons-branded/rcs/index.d.ts +11 -0
  43. package/icons-branded/rcs/index.js +4 -0
  44. package/icons-branded/sms/index.d.ts +11 -0
  45. package/icons-branded/sms/index.js +4 -0
  46. package/icons-channel/apple-business-chat-square/index.d.ts +11 -0
  47. package/icons-channel/apple-business-chat-square/index.js +4 -0
  48. package/icons-channel/create-icon-class.d.ts +1 -310
  49. package/icons-channel/create-icon-class.js +1 -1
  50. package/icons-channel/facebook-messenger-square/index.d.ts +11 -0
  51. package/icons-channel/facebook-messenger-square/index.js +4 -0
  52. package/icons-channel/instagram-square/index.d.ts +11 -0
  53. package/icons-channel/instagram-square/index.js +4 -0
  54. package/icons-channel/line-square/index.d.ts +11 -0
  55. package/icons-channel/line-square/index.js +4 -0
  56. package/icons-channel/talk-square/index.d.ts +11 -0
  57. package/icons-channel/talk-square/index.js +4 -0
  58. package/icons-channel/telegram-square/index.d.ts +11 -0
  59. package/icons-channel/telegram-square/index.js +4 -0
  60. package/icons-channel/twitter-square/index.d.ts +11 -0
  61. package/icons-channel/twitter-square/index.js +4 -0
  62. package/icons-channel/viber-square/index.d.ts +11 -0
  63. package/icons-channel/viber-square/index.js +4 -0
  64. package/icons-channel/wechat-square/index.d.ts +11 -0
  65. package/icons-channel/wechat-square/index.js +4 -0
  66. package/icons-channel/whatsapp-square/index.d.ts +11 -0
  67. package/icons-channel/whatsapp-square/index.js +4 -0
  68. package/illustration/create-illustration-class.d.ts +1 -310
  69. package/illustration/create-illustration-class.js +20 -3
  70. package/illustration/phone-and-cat/index.js +1 -1
  71. package/illustration/types.d.ts +8 -0
  72. package/illustration/utils.d.ts +3 -0
  73. package/illustration/utils.js +2 -0
  74. package/input/index.js +1 -1
  75. package/input/types.d.ts +4 -5
  76. package/input/utils.d.ts +2 -1
  77. package/link/index.js +18 -4
  78. package/link/types.d.ts +0 -2
  79. package/logo/create-logo-class.d.ts +1 -311
  80. package/package.json +1 -1
  81. package/popover/index.js +76 -47
  82. package/popover/types.d.ts +1 -2
  83. package/popover/utils.d.ts +2 -1
  84. package/search/index.js +1 -1
  85. package/segment/index.d.ts +1 -0
  86. package/segment/index.js +109 -6
  87. package/segment/types.d.ts +4 -0
  88. package/segment/utils.d.ts +5 -0
  89. package/segment/utils.js +6 -0
  90. package/select/index.js +1 -1
  91. package/spinner/types.d.ts +1 -2
  92. package/spinner/utils.d.ts +2 -1
  93. package/table-cell/types.d.ts +4 -5
  94. package/table-cell/utils.d.ts +2 -1
  95. package/table-head-cell/types.d.ts +4 -4
  96. package/tag/index.js +1 -1
  97. package/tag/types.d.ts +1 -2
  98. package/tag/utils.d.ts +2 -1
  99. package/text/index.js +0 -1
  100. package/text/types.d.ts +1 -2
  101. package/text/utils.d.ts +1 -1
  102. package/textarea/index.js +1 -1
  103. package/theme.css +17 -0
  104. package/title/index.js +0 -2
  105. package/title/types.d.ts +2 -3
  106. package/title/utils.d.ts +4 -3
  107. package/title/utils.js +21 -0
  108. package/toggle/index.js +1 -1
  109. package/tooltip/index.js +1 -1
  110. package/tooltip/types.d.ts +1 -2
  111. package/tooltip/utils.d.ts +2 -1
  112. package/utils.d.ts +4 -0
  113. package/utils.js +35 -4
@@ -1,310 +1 @@
1
- export declare const createIllustrationClass: (templateHTML: string) => {
2
- new (): {
3
- $svg: SVGElement;
4
- size: number;
5
- connectedCallback(): void;
6
- attributeChangedCallback(name: string, _: string | null, newVal: string | null): void;
7
- attachShadow(options?: Partial<ShadowRootInit> | undefined): ShadowRoot;
8
- accessKey: string;
9
- readonly accessKeyLabel: string;
10
- autocapitalize: string;
11
- dir: string;
12
- draggable: boolean;
13
- hidden: boolean;
14
- innerText: string;
15
- lang: string;
16
- readonly offsetHeight: number;
17
- readonly offsetLeft: number;
18
- readonly offsetParent: Element | null;
19
- readonly offsetTop: number;
20
- readonly offsetWidth: number;
21
- outerText: string;
22
- spellcheck: boolean;
23
- title: string;
24
- translate: boolean;
25
- attachInternals(): ElementInternals;
26
- click(): void;
27
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions | undefined): void;
28
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions | undefined): void;
29
- removeEventListener<K_1 extends keyof HTMLElementEventMap>(type: K_1, listener: (this: HTMLElement, ev: HTMLElementEventMap[K_1]) => any, options?: boolean | EventListenerOptions | undefined): void;
30
- removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions | undefined): void;
31
- readonly attributes: NamedNodeMap;
32
- readonly classList: DOMTokenList;
33
- className: string;
34
- readonly clientHeight: number;
35
- readonly clientLeft: number;
36
- readonly clientTop: number;
37
- readonly clientWidth: number;
38
- id: string;
39
- readonly localName: string;
40
- readonly namespaceURI: string | null;
41
- onfullscreenchange: ((this: Element, ev: Event) => any) | null;
42
- onfullscreenerror: ((this: Element, ev: Event) => any) | null;
43
- outerHTML: string;
44
- readonly ownerDocument: Document;
45
- readonly part: DOMTokenList;
46
- readonly prefix: string | null;
47
- readonly scrollHeight: number;
48
- scrollLeft: number;
49
- scrollTop: number;
50
- readonly scrollWidth: number;
51
- readonly shadowRoot: ShadowRoot | null;
52
- slot: string;
53
- readonly tagName: string;
54
- closest<K_2 extends keyof HTMLElementTagNameMap>(selector: K_2): HTMLElementTagNameMap[K_2] | null;
55
- closest<K_3 extends keyof SVGElementTagNameMap>(selector: K_3): SVGElementTagNameMap[K_3] | null;
56
- closest<E extends Element = Element>(selectors: string): E | null;
57
- getAttribute(qualifiedName: string): string | null;
58
- getAttributeNS(namespace: string | null, localName: string): string | null;
59
- getAttributeNames(): string[];
60
- getAttributeNode(qualifiedName: string): Attr | null;
61
- getAttributeNodeNS(namespace: string | null, localName: string): Attr | null;
62
- getBoundingClientRect(): DOMRect;
63
- getClientRects(): DOMRectList;
64
- getElementsByClassName(classNames: string): HTMLCollectionOf<Element>;
65
- getElementsByTagName<K_4 extends keyof HTMLElementTagNameMap>(qualifiedName: K_4): HTMLCollectionOf<HTMLElementTagNameMap[K_4]>;
66
- getElementsByTagName<K_5 extends keyof SVGElementTagNameMap>(qualifiedName: K_5): HTMLCollectionOf<SVGElementTagNameMap[K_5]>;
67
- getElementsByTagName(qualifiedName: string): HTMLCollectionOf<Element>;
68
- getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf<HTMLElement>;
69
- getElementsByTagNameNS(namespaceURI: "http://www.w3.org/2000/svg", localName: string): HTMLCollectionOf<SVGElement>;
70
- getElementsByTagNameNS(namespace: string | null, localName: string): HTMLCollectionOf<Element>;
71
- hasAttribute(qualifiedName: string): boolean;
72
- hasAttributeNS(namespace: string | null, localName: string): boolean;
73
- hasAttributes(): boolean;
74
- hasPointerCapture(pointerId: number): boolean;
75
- insertAdjacentElement(where: InsertPosition, element: Element): Element | null;
76
- insertAdjacentHTML(position: InsertPosition, text: string): void;
77
- insertAdjacentText(where: InsertPosition, data: string): void;
78
- matches(selectors: string): boolean;
79
- releasePointerCapture(pointerId: number): void;
80
- removeAttribute(qualifiedName: string): void;
81
- removeAttributeNS(namespace: string | null, localName: string): void;
82
- removeAttributeNode(attr: Attr): Attr;
83
- requestFullscreen(options?: FullscreenOptions | undefined): Promise<void>;
84
- requestPointerLock(): void;
85
- scroll(options?: ScrollToOptions | undefined): void;
86
- scroll(x: number, y: number): void;
87
- scrollBy(options?: ScrollToOptions | undefined): void;
88
- scrollBy(x: number, y: number): void;
89
- scrollIntoView(arg?: boolean | ScrollIntoViewOptions | undefined): void;
90
- scrollTo(options?: ScrollToOptions | undefined): void;
91
- scrollTo(x: number, y: number): void;
92
- setAttribute(qualifiedName: string, value: string): void;
93
- setAttributeNS(namespace: string | null, qualifiedName: string, value: string): void;
94
- setAttributeNode(attr: Attr): Attr | null;
95
- setAttributeNodeNS(attr: Attr): Attr | null;
96
- setPointerCapture(pointerId: number): void;
97
- toggleAttribute(qualifiedName: string, force?: boolean | undefined): boolean;
98
- webkitMatchesSelector(selectors: string): boolean;
99
- readonly baseURI: string;
100
- readonly childNodes: NodeListOf<ChildNode>;
101
- readonly firstChild: ChildNode | null;
102
- readonly isConnected: boolean;
103
- readonly lastChild: ChildNode | null;
104
- readonly nextSibling: ChildNode | null;
105
- readonly nodeName: string;
106
- readonly nodeType: number;
107
- nodeValue: string | null;
108
- readonly parentElement: HTMLElement | null;
109
- readonly parentNode: ParentNode | null;
110
- readonly previousSibling: ChildNode | null;
111
- textContent: string | null;
112
- appendChild<T extends Node>(node: T): T;
113
- cloneNode(deep?: boolean | undefined): Node;
114
- compareDocumentPosition(other: Node): number;
115
- contains(other: Node | null): boolean;
116
- getRootNode(options?: GetRootNodeOptions | undefined): Node;
117
- hasChildNodes(): boolean;
118
- insertBefore<T_1 extends Node>(node: T_1, child: Node | null): T_1;
119
- isDefaultNamespace(namespace: string | null): boolean;
120
- isEqualNode(otherNode: Node | null): boolean;
121
- isSameNode(otherNode: Node | null): boolean;
122
- lookupNamespaceURI(prefix: string | null): string | null;
123
- lookupPrefix(namespace: string | null): string | null;
124
- normalize(): void;
125
- removeChild<T_2 extends Node>(child: T_2): T_2;
126
- replaceChild<T_3 extends Node>(node: Node, child: T_3): T_3;
127
- readonly ATTRIBUTE_NODE: number;
128
- readonly CDATA_SECTION_NODE: number;
129
- readonly COMMENT_NODE: number;
130
- readonly DOCUMENT_FRAGMENT_NODE: number;
131
- readonly DOCUMENT_NODE: number;
132
- readonly DOCUMENT_POSITION_CONTAINED_BY: number;
133
- readonly DOCUMENT_POSITION_CONTAINS: number;
134
- readonly DOCUMENT_POSITION_DISCONNECTED: number;
135
- readonly DOCUMENT_POSITION_FOLLOWING: number;
136
- readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: number;
137
- readonly DOCUMENT_POSITION_PRECEDING: number;
138
- readonly DOCUMENT_TYPE_NODE: number;
139
- readonly ELEMENT_NODE: number;
140
- readonly ENTITY_NODE: number;
141
- readonly ENTITY_REFERENCE_NODE: number;
142
- readonly NOTATION_NODE: number;
143
- readonly PROCESSING_INSTRUCTION_NODE: number;
144
- readonly TEXT_NODE: number;
145
- dispatchEvent(event: Event): boolean;
146
- ariaAtomic: string | null;
147
- ariaAutoComplete: string | null;
148
- ariaBusy: string | null;
149
- ariaChecked: string | null;
150
- ariaColCount: string | null;
151
- ariaColIndex: string | null;
152
- ariaColSpan: string | null;
153
- ariaCurrent: string | null;
154
- ariaDisabled: string | null;
155
- ariaExpanded: string | null;
156
- ariaHasPopup: string | null;
157
- ariaHidden: string | null;
158
- ariaKeyShortcuts: string | null;
159
- ariaLabel: string | null;
160
- ariaLevel: string | null;
161
- ariaLive: string | null;
162
- ariaModal: string | null;
163
- ariaMultiLine: string | null;
164
- ariaMultiSelectable: string | null;
165
- ariaOrientation: string | null;
166
- ariaPlaceholder: string | null;
167
- ariaPosInSet: string | null;
168
- ariaPressed: string | null;
169
- ariaReadOnly: string | null;
170
- ariaRequired: string | null;
171
- ariaRoleDescription: string | null;
172
- ariaRowCount: string | null;
173
- ariaRowIndex: string | null;
174
- ariaRowSpan: string | null;
175
- ariaSelected: string | null;
176
- ariaSetSize: string | null;
177
- ariaSort: string | null;
178
- ariaValueMax: string | null;
179
- ariaValueMin: string | null;
180
- ariaValueNow: string | null;
181
- ariaValueText: string | null;
182
- animate(keyframes: Keyframe[] | PropertyIndexedKeyframes | null, options?: number | KeyframeAnimationOptions | undefined): Animation;
183
- getAnimations(options?: GetAnimationsOptions | undefined): Animation[];
184
- after(...nodes: (string | Node)[]): void;
185
- before(...nodes: (string | Node)[]): void;
186
- remove(): void;
187
- replaceWith(...nodes: (string | Node)[]): void;
188
- innerHTML: string;
189
- readonly nextElementSibling: Element | null;
190
- readonly previousElementSibling: Element | null;
191
- readonly childElementCount: number;
192
- readonly children: HTMLCollection;
193
- readonly firstElementChild: Element | null;
194
- readonly lastElementChild: Element | null;
195
- append(...nodes: (string | Node)[]): void;
196
- prepend(...nodes: (string | Node)[]): void;
197
- querySelector<K_6 extends keyof HTMLElementTagNameMap>(selectors: K_6): HTMLElementTagNameMap[K_6] | null;
198
- querySelector<K_7 extends keyof SVGElementTagNameMap>(selectors: K_7): SVGElementTagNameMap[K_7] | null;
199
- querySelector<E_1 extends Element = Element>(selectors: string): E_1 | null;
200
- querySelectorAll<K_8 extends keyof HTMLElementTagNameMap>(selectors: K_8): NodeListOf<HTMLElementTagNameMap[K_8]>;
201
- querySelectorAll<K_9 extends keyof SVGElementTagNameMap>(selectors: K_9): NodeListOf<SVGElementTagNameMap[K_9]>;
202
- querySelectorAll<E_2 extends Element = Element>(selectors: string): NodeListOf<E_2>;
203
- replaceChildren(...nodes: (string | Node)[]): void;
204
- readonly assignedSlot: HTMLSlotElement | null;
205
- oncopy: ((this: DocumentAndElementEventHandlers, ev: ClipboardEvent) => any) | null;
206
- oncut: ((this: DocumentAndElementEventHandlers, ev: ClipboardEvent) => any) | null;
207
- onpaste: ((this: DocumentAndElementEventHandlers, ev: ClipboardEvent) => any) | null;
208
- readonly style: CSSStyleDeclaration;
209
- contentEditable: string;
210
- enterKeyHint: string;
211
- inputMode: string;
212
- readonly isContentEditable: boolean;
213
- onabort: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;
214
- onanimationcancel: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
215
- onanimationend: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
216
- onanimationiteration: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
217
- onanimationstart: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
218
- onauxclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
219
- onblur: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
220
- oncanplay: ((this: GlobalEventHandlers, ev: Event) => any) | null;
221
- oncanplaythrough: ((this: GlobalEventHandlers, ev: Event) => any) | null;
222
- onchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
223
- onclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
224
- onclose: ((this: GlobalEventHandlers, ev: Event) => any) | null;
225
- oncontextmenu: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
226
- oncuechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
227
- ondblclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
228
- ondrag: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
229
- ondragend: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
230
- ondragenter: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
231
- ondragleave: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
232
- ondragover: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
233
- ondragstart: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
234
- ondrop: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
235
- ondurationchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
236
- onemptied: ((this: GlobalEventHandlers, ev: Event) => any) | null;
237
- onended: ((this: GlobalEventHandlers, ev: Event) => any) | null;
238
- onerror: OnErrorEventHandler;
239
- onfocus: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
240
- onformdata: ((this: GlobalEventHandlers, ev: FormDataEvent) => any) | null;
241
- ongotpointercapture: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
242
- oninput: ((this: GlobalEventHandlers, ev: Event) => any) | null;
243
- oninvalid: ((this: GlobalEventHandlers, ev: Event) => any) | null;
244
- onkeydown: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
245
- onkeypress: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
246
- onkeyup: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
247
- onload: ((this: GlobalEventHandlers, ev: Event) => any) | null;
248
- onloadeddata: ((this: GlobalEventHandlers, ev: Event) => any) | null;
249
- onloadedmetadata: ((this: GlobalEventHandlers, ev: Event) => any) | null;
250
- onloadstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
251
- onlostpointercapture: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
252
- onmousedown: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
253
- onmouseenter: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
254
- onmouseleave: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
255
- onmousemove: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
256
- onmouseout: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
257
- onmouseover: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
258
- onmouseup: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
259
- onpause: ((this: GlobalEventHandlers, ev: Event) => any) | null;
260
- onplay: ((this: GlobalEventHandlers, ev: Event) => any) | null;
261
- onplaying: ((this: GlobalEventHandlers, ev: Event) => any) | null;
262
- onpointercancel: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
263
- onpointerdown: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
264
- onpointerenter: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
265
- onpointerleave: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
266
- onpointermove: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
267
- onpointerout: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
268
- onpointerover: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
269
- onpointerup: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
270
- onprogress: ((this: GlobalEventHandlers, ev: ProgressEvent<EventTarget>) => any) | null;
271
- onratechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
272
- onreset: ((this: GlobalEventHandlers, ev: Event) => any) | null;
273
- onresize: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;
274
- onscroll: ((this: GlobalEventHandlers, ev: Event) => any) | null;
275
- onsecuritypolicyviolation: ((this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any) | null;
276
- onseeked: ((this: GlobalEventHandlers, ev: Event) => any) | null;
277
- onseeking: ((this: GlobalEventHandlers, ev: Event) => any) | null;
278
- onselect: ((this: GlobalEventHandlers, ev: Event) => any) | null;
279
- onselectionchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
280
- onselectstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
281
- onslotchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
282
- onstalled: ((this: GlobalEventHandlers, ev: Event) => any) | null;
283
- onsubmit: ((this: GlobalEventHandlers, ev: SubmitEvent) => any) | null;
284
- onsuspend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
285
- ontimeupdate: ((this: GlobalEventHandlers, ev: Event) => any) | null;
286
- ontoggle: ((this: GlobalEventHandlers, ev: Event) => any) | null;
287
- ontouchcancel?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
288
- ontouchend?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
289
- ontouchmove?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
290
- ontouchstart?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
291
- ontransitioncancel: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
292
- ontransitionend: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
293
- ontransitionrun: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
294
- ontransitionstart: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
295
- onvolumechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
296
- onwaiting: ((this: GlobalEventHandlers, ev: Event) => any) | null;
297
- onwebkitanimationend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
298
- onwebkitanimationiteration: ((this: GlobalEventHandlers, ev: Event) => any) | null;
299
- onwebkitanimationstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
300
- onwebkittransitionend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
301
- onwheel: ((this: GlobalEventHandlers, ev: WheelEvent) => any) | null;
302
- autofocus: boolean;
303
- readonly dataset: DOMStringMap;
304
- nonce?: string | undefined;
305
- tabIndex: number;
306
- blur(): void;
307
- focus(options?: FocusOptions | undefined): void;
308
- };
309
- readonly observedAttributes: string[];
310
- };
1
+ export declare const createIllustrationClass: (templateHTML: string) => CustomElementConstructor;
@@ -1,11 +1,12 @@
1
- import { getIntegerAttribute, NectaryElement, updateAttribute, updateIntegerAttribute } from '../utils';
2
- const illustrationStylesHtml = '<style>:host{display:inline-block;vertical-align:middle}svg{display:block;pointer-events:none}</style>';
1
+ import { getIntegerAttribute, getLiteralAttribute, NectaryElement, updateAttribute, updateIntegerAttribute, updateLiteralAttribute } from '../utils';
2
+ const illustrationStylesHtml = '<style>svg{display:block;pointer-events:none}#wrapper{display:flex;width:100%;height:100%;align-items:center;justify-content:center;overflow:hidden}#wrapper>*{flex-shrink:0}:host([valign=top]) #wrapper{align-items:flex-start}:host([valign=bottom]) #wrapper{align-items:flex-end}:host([background=yellow]) #wrapper{background-color:var(--sinch-color-background-yellow)}:host([background=green]) #wrapper{background-color:var(--sinch-color-background-green)}:host([background=blue]) #wrapper{background-color:var(--sinch-color-background-blue)}:host([background=grey]) #wrapper{background-color:var(--sinch-color-background-grey)}:host([background=white]) #wrapper{background-color:var(--sinch-color-background-white)}</style>';
3
+ import { backgroundValues, valignValues } from './utils';
3
4
  const DEFAULT_SIZE = 256;
4
5
  const MIN_SIZE = 16;
5
6
  const MAX_SIZE = 2048;
6
7
  export const createIllustrationClass = templateHTML => {
7
8
  const template = document.createElement('template');
8
- template.innerHTML = illustrationStylesHtml + templateHTML;
9
+ template.innerHTML = `${illustrationStylesHtml}<div id="wrapper">${templateHTML}</div>`;
9
10
  return class extends NectaryElement {
10
11
  constructor() {
11
12
  super();
@@ -26,6 +27,22 @@ export const createIllustrationClass = templateHTML => {
26
27
  return getIntegerAttribute(this, 'size', DEFAULT_SIZE);
27
28
  }
28
29
 
30
+ get background() {
31
+ return getLiteralAttribute(this, backgroundValues, 'background', null);
32
+ }
33
+
34
+ set background(value) {
35
+ updateLiteralAttribute(this, backgroundValues, 'background', value);
36
+ }
37
+
38
+ get valign() {
39
+ return getLiteralAttribute(this, valignValues, 'valign', null);
40
+ }
41
+
42
+ set valign(value) {
43
+ updateLiteralAttribute(this, valignValues, 'valign', value);
44
+ }
45
+
29
46
  connectedCallback() {
30
47
  updateAttribute(this.$svg, 'preserveAspectRatio', 'xMinYMin meet');
31
48
 
@@ -1,4 +1,4 @@
1
1
  import { defineCustomElement } from '../../utils';
2
2
  import { createIllustrationClass } from '../create-illustration-class';
3
- const templateHTML = '<svg viewBox="0 0 868 800"><g clip-path="url(#a)"><path d="M743.029 800a65.073 65.073 0 0 1-53.216-27.573 65.073 65.073 0 0 1-8.106-59.384c5.049-14.202 10.693-26.125 17.244-36.43a16.512 16.512 0 0 1 10.349-7.26 16.52 16.52 0 0 1 17.112 6.636 16.528 16.528 0 0 1 2.747 12.34 16.528 16.528 0 0 1-2.331 6.009c-5.205 8.187-9.786 17.932-14.002 29.789a32.047 32.047 0 0 0 33.77 42.64c.093 0 .187-.02.281-.027a31.99 31.99 0 0 0 24.058-16.208l10.086-18.181a58.267 58.267 0 0 1 77.436-23.645 16.526 16.526 0 0 1 5.133 3.949 16.538 16.538 0 0 1 3.219 5.62 16.516 16.516 0 0 1-16.974 21.708 16.524 16.524 0 0 1-6.23-1.769 25.243 25.243 0 0 0-33.704 10.161l-10.088 18.184a65.081 65.081 0 0 1-49.516 33.037l-.404.041a65.03 65.03 0 0 1-6.864.363Z" fill="#F2A068"/><path d="M21.409 0h323.305a20.795 20.795 0 0 1 20.773 20.773V232.84H21.409A20.793 20.793 0 0 1 .636 212.063V20.773A20.793 20.793 0 0 1 21.409 0" fill="#007171"/><path d="M222.723 274.478H21.416a20.79 20.79 0 0 0-20.78 20.775v83.553h222.087a20.795 20.795 0 0 0 20.773-20.773v-62.78a20.796 20.796 0 0 0-20.773-20.775Z" fill="#FFBE3C"/><path d="M168.062 337.607c6.056 0 10.965-4.909 10.965-10.966 0-6.056-4.909-10.965-10.965-10.965-6.057 0-10.966 4.909-10.966 10.965 0 6.057 4.909 10.966 10.966 10.966Zm-45.997 0c6.056 0 10.965-4.909 10.965-10.966 0-6.056-4.909-10.965-10.965-10.965s-10.966 4.909-10.966 10.965c0 6.057 4.91 10.966 10.966 10.966Zm-45.992 0c6.056 0 10.965-4.909 10.965-10.966 0-6.056-4.91-10.965-10.965-10.965-6.057 0-10.966 4.909-10.966 10.965 0 6.057 4.91 10.966 10.966 10.966ZM275.57 92.165H90.555a5.386 5.386 0 0 1 0-10.771H275.57a5.386 5.386 0 1 1 0 10.771Zm-92.537 59.28H90.555a5.386 5.386 0 0 1 0-10.772h92.478a5.386 5.386 0 0 1 0 10.772Z" fill="#fff"/><path fill-rule="evenodd" clip-rule="evenodd" d="M615.675 402.718S506.567 240.893 512.588 287.271c10.022 77.194-28.652 55.324-28.549 143.141l131.636-27.694Z" fill="#FFD03C"/><path d="M277.401 386.038c3.642 5.698 6.05 11.584 6.768 17.594.717 6.009-.089 12.206-2.169 18.991l-1.732 5.513a59.046 59.046 0 0 0-1.677 6.901 63.145 63.145 0 0 0-1.008 14.117c.364 9.405 2.681 18.401 6.01 26.604l.286.701.42.72a16513.683 16513.683 0 0 0 38.013 64.194l19.116 32.031 19.213 31.974a10.593 10.593 0 0 0 14.477 3.621 10.592 10.592 0 0 0 3.739-14.447l-18.9-32.161-18.999-32.098a10513.726 10513.726 0 0 0-38.217-64.073l.709 1.419c-2.644-6.398-4.289-12.942-4.57-19.342a42.001 42.001 0 0 1 .612-9.467c.27-1.557.634-3.096 1.09-4.609l.818-2.742.882-3.08c2.308-8.338 3.82-18.177 2.031-27.827a53.554 53.554 0 0 0-4.341-13.764 61.473 61.473 0 0 0-7.372-11.782 9.387 9.387 0 0 0-12.851-1.906 9.391 9.391 0 0 0-2.458 12.758l.114.171-.004-.011Z" fill="#894915"/><path fill-rule="evenodd" clip-rule="evenodd" d="m413.954 576.288 29.177-60.157a30.487 30.487 0 0 1 19.292-16.079 38.811 38.811 0 0 1 45.387 54.136l-46.18 96.655 28.823 45.069h-71.817a47.175 47.175 0 0 1-42.602-26.915l-93.433-196.475a29.248 29.248 0 0 1 9.154-36.183l22.281-16.292 99.918 156.241Zm391.608-43.01a40.67 40.67 0 0 0-39.183-23.337l-9.69.564a40.68 40.68 0 0 0-38.301 41.27 40.68 40.68 0 0 0 5.493 19.756c19.347 33.317 43.264 74.49 60.566 104.293a40 40 0 0 0 27.069 19.203 40.01 40.01 0 0 0 32.249-7.837 39.705 39.705 0 0 0 11.425-48.074L805.571 533.28l-.009-.002Z" fill="#894915"/><path fill-rule="evenodd" clip-rule="evenodd" d="M377.824 344.949a12.204 12.204 0 0 0-11.115-7.168h-78.603a4.447 4.447 0 0 0-4.052 6.281l69.304 152.996a4.445 4.445 0 0 0 4.049 2.612h77.034a8.69 8.69 0 0 0 8.662-8.045 8.688 8.688 0 0 0-.751-4.223c-14.487-31.99-53.076-117.177-64.528-142.453Z" fill="#666"/><path fill-rule="evenodd" clip-rule="evenodd" d="M362.697 337.781h-74.443a12.207 12.207 0 0 0-10.253 5.589 12.196 12.196 0 0 0-.861 11.646l62.278 137.486a12.195 12.195 0 0 0 11.114 7.168h85.497l-73.332-161.889Z" fill="#CCC"/><path d="m306.957 436.433 69.078 1.008a9.722 9.722 0 0 0 .527-19.439l-69.027-2.755a10.6 10.6 0 0 0-.845 21.179h.267" fill="#894915"/><path d="m311.941 433.234 50.786-38.74a8.576 8.576 0 0 0-9.958-13.954l-53.145 35.442a10.605 10.605 0 1 0 12.317 17.252" fill="#894915"/><path d="m312.976 454.594 70.035.094a9.428 9.428 0 0 0 6.592-2.705 9.428 9.428 0 0 0 .24-13.192 9.429 9.429 0 0 0-6.49-2.943l-69.993-2.445a10.6 10.6 0 0 0-.741 21.187h.357" fill="#894915"/><path d="m318.832 472.223 69.075-.122a8.792 8.792 0 0 0 8.82-8.581 8.796 8.796 0 0 0-8.392-8.999l-68.986-3.485a10.604 10.604 0 0 0-11.189 10.048 10.594 10.594 0 0 0 2.745 7.668 10.596 10.596 0 0 0 7.374 3.457c.174 0 .38.014.553.014" fill="#894915"/><path d="m724.223 600.317-.616 95.556H418.485l69.064-149.989-46.043-26.175 46.507-100.311a50.8 50.8 0 0 1 45.514-29.433l169.531-1.917 22.393 22.361-.172 26.205 26.89-17.037 59.448 126.764-84.071 59.019-3.323-5.043Z" fill="#E83452"/><path d="M557.319 352.94a62.209 62.209 0 0 1-6.19-1.828 78.44 78.44 0 0 1-52.411-74.512l.299-65.106a78.392 78.392 0 0 1 11.777-41.066c16.146-25.985 45.044-40.056 75.404-36.729a78.44 78.44 0 0 1 70.058 78.517l-.285 65.113a78.75 78.75 0 0 1-15.324 46.262l8.24 43.835c4.301 14.496 9.597 21.436 21.433 21.436h6.444l-89.524 62.401a22.706 22.706 0 0 1-22.125 2.154 22.985 22.985 0 0 1-13.714-21.766 22.98 22.98 0 0 1 2.06-8.804c8.156-17.366 18.911-40.673 22.597-50.455 2.957-7.847-4.497-15.538-12.929-18.296a78.337 78.337 0 0 1-5.372-1.044c-.164 0-.331-.016-.498-.021l.057-.085.003-.006Z" fill="#894915"/><path d="M499.89 206.638c0-24.892 20.624-44.973 45.718-44.079 23.903.85 42.501 21.22 42.501 45.137v99.733c0 40.975 47.148 94.857 109.757 94.857 51.326 0 93.148-45.871 93.148-91.582 0-14.608-4.84-31.442-10.612-46.326a61.775 61.775 0 0 0-57.687-39.679v-.046a25.351 25.351 0 0 1-24.403-18.508c-5.425-19.304-13.939-47.59-18.822-53.627-13.175-16.298-29.999-19.136-42.958-18.19-12.567.925-25.066-3.231-34.731-11.318-12.074-10.093-31.682-20.741-59.108-18.081-54.897 5.331-81.467 68.801-42.803 102.806v-1.097Z" fill="#FFD03C"/><path d="m544.235 648.578 6.06-20.583c1.713-5.689 8.482-8.984 14.852-7.083 1.193.357 2.32.907 3.336 1.627a12.68 12.68 0 0 1 9.775-1.639c5.338 1.264 8.788 5.656 8.542 10.367a12.568 12.568 0 0 1 6.359 1.129c4.837 2.267 7.083 7.365 5.666 12.067l-.361 1.2c.08.018.16.027.229.046 6.156 1.457 9.809 7.083 8.164 12.546l-4.853 16.146-65.538-3.35s6.009-16.477 7.769-22.473" fill="#842306"/><path fill-rule="evenodd" clip-rule="evenodd" d="M794.51 319.469h.023s-3.59-16.909-6.663-31.407a6.855 6.855 0 0 0-12.933-1.417l-13.4 29.451-37.492-1.081-6.66-31.407a6.852 6.852 0 0 0-5.957-5.377 6.85 6.85 0 0 0-4.129.853 6.85 6.85 0 0 0-2.85 3.108l-36.989 81.247a28.247 28.247 0 0 0-1.444 19.494 28.259 28.259 0 0 0 11.557 15.766l3.581 2.371-121.276 262.123 194.176-24.87 16.098-41.198a493.41 493.41 0 0 0 30.635-235.66c-1.849-16.132-3.942-30.832-6.277-41.996Z" fill="#F2A068"/><path d="M297.328 363.199a6.942 6.942 0 1 0 0-13.884 6.942 6.942 0 0 0 0 13.884Z" fill="#666"/><path d="M789.706 625.226 663.321 642.93a49.191 49.191 0 0 1-16.109-.409l-11.708-2.251a49.199 49.199 0 0 0-32.134 4.744c-14.519 7.59-35.929 17.781-46.17 17.781h-17.535c-7.445 0-13.939 5.736-14.167 13.178a13.59 13.59 0 0 0 3.83 9.88 13.6 13.6 0 0 0 9.759 4.131h28.909c2.248 0 4.487.27 6.67.805l10.669 2.614a77.667 77.667 0 0 0 18.476 2.23h217.714l-31.832-70.407h.013Z" fill="#894915"/><path d="M532.62 303.419c1.787.351 3.608.504 5.429.457a25.29 25.29 0 0 0 17.014-7.209 2.774 2.774 0 0 0 .83-1.981 2.77 2.77 0 0 0-.83-1.981 2.853 2.853 0 0 0-4.005 0 19.426 19.426 0 0 1-26.552.644 2.857 2.857 0 0 0-4.001.192 2.773 2.773 0 0 0-.467 3.088 2.8 2.8 0 0 0 .661.877c3.375 3 7.492 5.041 11.923 5.909" fill="#842306"/></g><defs><clipPath id="a"><path fill="#fff" transform="translate(.636)" d="M0 0h867.101v800H0z"/></clipPath></defs></svg>';
3
+ const templateHTML = '<svg viewBox="0 0 868 800"><path d="M743.029 800a65.073 65.073 0 0 1-53.216-27.573 65.073 65.073 0 0 1-8.106-59.384c5.049-14.202 10.693-26.125 17.244-36.43a16.512 16.512 0 0 1 10.349-7.26 16.52 16.52 0 0 1 17.112 6.636 16.528 16.528 0 0 1 2.747 12.34 16.528 16.528 0 0 1-2.331 6.009c-5.205 8.187-9.786 17.932-14.002 29.789a32.047 32.047 0 0 0 33.77 42.64c.093 0 .187-.02.281-.027a31.99 31.99 0 0 0 24.058-16.208l10.086-18.181a58.267 58.267 0 0 1 77.436-23.645 16.526 16.526 0 0 1 5.133 3.949 16.538 16.538 0 0 1 3.219 5.62 16.516 16.516 0 0 1-16.974 21.708 16.524 16.524 0 0 1-6.23-1.769 25.243 25.243 0 0 0-33.704 10.161l-10.088 18.184a65.081 65.081 0 0 1-49.516 33.037l-.404.041a65.03 65.03 0 0 1-6.864.363Z" fill="#F2A068"/><path d="M21.409 0h323.305a20.795 20.795 0 0 1 20.773 20.773V232.84H21.409A20.793 20.793 0 0 1 .636 212.063V20.773A20.793 20.793 0 0 1 21.409 0" fill="#007171"/><path d="M222.723 274.478H21.416a20.79 20.79 0 0 0-20.78 20.775v83.553h222.087a20.795 20.795 0 0 0 20.773-20.773v-62.78a20.796 20.796 0 0 0-20.773-20.775Z" fill="#FFBE3C"/><path d="M168.062 337.607c6.056 0 10.965-4.909 10.965-10.966 0-6.056-4.909-10.965-10.965-10.965-6.057 0-10.966 4.909-10.966 10.965 0 6.057 4.909 10.966 10.966 10.966Zm-45.997 0c6.056 0 10.965-4.909 10.965-10.966 0-6.056-4.909-10.965-10.965-10.965s-10.966 4.909-10.966 10.965c0 6.057 4.91 10.966 10.966 10.966Zm-45.992 0c6.056 0 10.965-4.909 10.965-10.966 0-6.056-4.91-10.965-10.965-10.965-6.057 0-10.966 4.909-10.966 10.965 0 6.057 4.91 10.966 10.966 10.966ZM275.57 92.165H90.555a5.386 5.386 0 0 1 0-10.771H275.57a5.386 5.386 0 1 1 0 10.771Zm-92.537 59.28H90.555a5.386 5.386 0 0 1 0-10.772h92.478a5.386 5.386 0 0 1 0 10.772Z" fill="#fff"/><path d="M615.675 402.718S506.567 240.893 512.588 287.271c10.022 77.194-28.652 55.324-28.549 143.141l131.636-27.694Z" fill="#FFD03C"/><path d="M277.401 386.038c3.642 5.698 6.05 11.584 6.768 17.594.717 6.009-.089 12.206-2.169 18.991l-1.732 5.513a59.046 59.046 0 0 0-1.677 6.901 63.145 63.145 0 0 0-1.008 14.117c.364 9.405 2.681 18.401 6.01 26.604l.286.701.42.72a16513.683 16513.683 0 0 0 38.013 64.194l19.116 32.031 19.213 31.974a10.593 10.593 0 0 0 14.477 3.621 10.592 10.592 0 0 0 3.738-14.447l-18.899-32.161-18.999-32.098a10513.726 10513.726 0 0 0-38.217-64.073l.709 1.419c-2.644-6.398-4.289-12.942-4.57-19.342a42.001 42.001 0 0 1 .612-9.467c.27-1.557.634-3.096 1.09-4.609l.818-2.742.882-3.08c2.308-8.338 3.82-18.177 2.031-27.827a53.554 53.554 0 0 0-4.341-13.764 61.473 61.473 0 0 0-7.372-11.782 9.387 9.387 0 0 0-12.851-1.906 9.391 9.391 0 0 0-2.458 12.758l.114.171-.004-.011Z" fill="#894915"/><path d="m413.954 576.288 29.177-60.157a30.487 30.487 0 0 1 19.292-16.079 38.811 38.811 0 0 1 45.387 54.136l-46.18 96.655 28.823 45.069h-71.817a47.175 47.175 0 0 1-42.602-26.915l-93.433-196.475a29.248 29.248 0 0 1 9.154-36.183l22.281-16.292 99.918 156.241Zm391.608-43.01a40.67 40.67 0 0 0-39.183-23.337l-9.69.564a40.68 40.68 0 0 0-38.301 41.27 40.68 40.68 0 0 0 5.493 19.756c19.347 33.317 43.264 74.49 60.566 104.293a40 40 0 0 0 27.069 19.203 40.01 40.01 0 0 0 32.249-7.837 39.705 39.705 0 0 0 11.425-48.074L805.571 533.28l-.009-.002Z" fill="#894915"/><path d="M377.824 344.949a12.204 12.204 0 0 0-11.115-7.168h-78.603a4.447 4.447 0 0 0-4.052 6.281l69.304 152.996a4.445 4.445 0 0 0 4.049 2.612h77.034a8.69 8.69 0 0 0 8.662-8.045 8.688 8.688 0 0 0-.751-4.223c-14.487-31.99-53.076-117.177-64.528-142.453Z" fill="#666"/><path d="M362.697 337.781h-74.443a12.207 12.207 0 0 0-10.253 5.589 12.196 12.196 0 0 0-.861 11.646l62.278 137.486a12.195 12.195 0 0 0 11.114 7.168h85.497l-73.332-161.889Z" fill="#CCC"/><path d="m306.957 436.433 69.078 1.008a9.722 9.722 0 0 0 .527-19.439l-69.027-2.755a10.6 10.6 0 0 0-.845 21.179h.267" fill="#894915"/><path d="m311.941 433.234 50.786-38.74a8.576 8.576 0 0 0-9.958-13.954l-53.145 35.442a10.605 10.605 0 1 0 12.317 17.252Z" fill="#894915"/><path d="m312.976 454.594 70.035.094a9.428 9.428 0 0 0 6.592-2.705 9.428 9.428 0 0 0 .24-13.192 9.429 9.429 0 0 0-6.49-2.943l-69.993-2.445a10.6 10.6 0 0 0-.741 21.187h.357" fill="#894915"/><path d="m318.832 472.223 69.075-.122a8.792 8.792 0 0 0 8.82-8.581 8.796 8.796 0 0 0-8.392-8.999l-68.986-3.485a10.604 10.604 0 0 0-11.189 10.048 10.594 10.594 0 0 0 2.745 7.668 10.596 10.596 0 0 0 7.374 3.457c.174 0 .38.014.553.014Z" fill="#894915"/><path d="m724.223 600.317-.616 95.556H418.485l69.064-149.989-46.043-26.175 46.507-100.311a50.8 50.8 0 0 1 45.514-29.433l169.531-1.917 22.393 22.361-.172 26.205 26.89-17.037 59.448 126.764-84.071 59.019-3.323-5.043Z" fill="#E83452"/><path d="M557.319 352.94a62.209 62.209 0 0 1-6.19-1.828 78.44 78.44 0 0 1-52.411-74.512l.299-65.106a78.392 78.392 0 0 1 11.777-41.066c16.146-25.985 45.044-40.056 75.404-36.729a78.44 78.44 0 0 1 70.058 78.517l-.285 65.113a78.75 78.75 0 0 1-15.324 46.262l8.24 43.835c4.301 14.496 9.597 21.436 21.433 21.436h6.444l-89.524 62.401a22.706 22.706 0 0 1-22.125 2.154 22.985 22.985 0 0 1-13.714-21.766 22.98 22.98 0 0 1 2.06-8.804c8.156-17.366 18.911-40.673 22.597-50.455 2.957-7.847-4.497-15.538-12.929-18.296a77.74 77.74 0 0 1-5.372-1.045c-.164 0-.331-.015-.498-.02l.057-.085.003-.006Z" fill="#894915"/><path d="M499.89 206.638c0-24.892 20.624-44.973 45.718-44.079 23.903.85 42.501 21.22 42.501 45.137v99.733c0 40.975 47.148 94.857 109.757 94.857 51.326 0 93.148-45.871 93.148-91.582 0-14.608-4.84-31.442-10.612-46.326a61.775 61.775 0 0 0-57.687-39.679v-.046a25.351 25.351 0 0 1-24.403-18.508c-5.425-19.304-13.939-47.59-18.822-53.627-13.175-16.298-29.999-19.136-42.958-18.19-12.567.925-25.066-3.231-34.731-11.318-12.074-10.093-31.682-20.741-59.108-18.081-54.897 5.331-81.467 68.801-42.803 102.806v-1.097Z" fill="#FFD03C"/><path d="m544.235 648.578 6.06-20.583c1.713-5.689 8.482-8.984 14.852-7.083 1.193.357 2.32.907 3.336 1.627a12.68 12.68 0 0 1 9.775-1.639c5.338 1.264 8.788 5.656 8.542 10.367a12.568 12.568 0 0 1 6.359 1.129c4.837 2.267 7.083 7.365 5.666 12.067l-.361 1.2c.08.018.16.027.229.046 6.156 1.457 9.809 7.083 8.164 12.546l-4.853 16.146-65.538-3.35s6.009-16.477 7.769-22.473Z" fill="#842306"/><path d="M794.51 319.469h.023s-3.59-16.909-6.663-31.407a6.855 6.855 0 0 0-12.933-1.417l-13.4 29.451-37.492-1.081-6.66-31.407a6.852 6.852 0 0 0-5.957-5.377 6.85 6.85 0 0 0-4.129.853 6.85 6.85 0 0 0-2.85 3.108l-36.989 81.247a28.247 28.247 0 0 0-1.444 19.494 28.259 28.259 0 0 0 11.557 15.766l3.581 2.371-121.276 262.123 194.176-24.87 16.098-41.198a493.41 493.41 0 0 0 30.635-235.66c-1.849-16.132-3.942-30.832-6.277-41.996Z" fill="#F2A068"/><path d="M297.328 363.199a6.942 6.942 0 1 0 0-13.884 6.942 6.942 0 0 0 0 13.884Z" fill="#666"/><path d="M789.707 625.226 663.321 642.93a49.191 49.191 0 0 1-16.109-.409l-11.708-2.251a49.199 49.199 0 0 0-32.134 4.744c-14.519 7.59-35.929 17.781-46.17 17.781h-17.535c-7.445 0-13.939 5.736-14.167 13.178a13.59 13.59 0 0 0 3.83 9.88 13.6 13.6 0 0 0 9.759 4.131h28.909c2.248 0 4.487.27 6.67.805l10.669 2.614a77.667 77.667 0 0 0 18.476 2.23h217.714l-31.832-70.407h.014Z" fill="#894915"/><path d="M532.62 303.419c1.787.351 3.608.504 5.429.457a25.29 25.29 0 0 0 17.014-7.209 2.774 2.774 0 0 0 .83-1.981 2.77 2.77 0 0 0-.83-1.981 2.853 2.853 0 0 0-4.005 0 19.426 19.426 0 0 1-26.552.644 2.857 2.857 0 0 0-4.001.192 2.773 2.773 0 0 0-.467 3.088 2.8 2.8 0 0 0 .661.877c3.375 3 7.492 5.041 11.923 5.909" fill="#842306"/></svg>';
4
4
  defineCustomElement('sinch-illustration-phone-and-cat', createIllustrationClass(templateHTML));
@@ -1,8 +1,16 @@
1
1
  import type { TSinchElementReact } from '../types';
2
+ export declare type TSinchIllustrationBackground = 'grey' | 'green' | 'blue' | 'yellow' | 'white';
3
+ export declare type TSinchIllustrationVAlign = 'top' | 'center' | 'bottom';
2
4
  export declare type TSinchIllustrationElement = HTMLElement & {
3
5
  size: number;
6
+ background: TSinchIllustrationBackground | null;
7
+ valign: TSinchIllustrationVAlign | null;
4
8
  setAttribute(name: 'size', value: string): void;
9
+ setAttribute(name: 'background', value: TSinchIllustrationBackground): void;
10
+ setAttribute(name: 'valign', value: TSinchIllustrationVAlign): void;
5
11
  };
6
12
  export declare type TSinchIllustrationReact = TSinchElementReact<TSinchIllustrationElement> & {
7
13
  size?: number;
14
+ background?: TSinchIllustrationBackground;
15
+ valign?: TSinchIllustrationVAlign;
8
16
  };
@@ -0,0 +1,3 @@
1
+ import type { TSinchIllustrationBackground, TSinchIllustrationVAlign } from './types';
2
+ export declare const backgroundValues: TSinchIllustrationBackground[];
3
+ export declare const valignValues: TSinchIllustrationVAlign[];
@@ -0,0 +1,2 @@
1
+ export const backgroundValues = ['blue', 'grey', 'green', 'yellow', 'white'];
2
+ export const valignValues = ['top', 'center', 'bottom'];
package/input/index.js CHANGED
@@ -8,7 +8,7 @@ function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedec
8
8
  function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
9
9
 
10
10
  import { defineCustomElement, getAttribute, getBooleanAttribute, getLiteralAttribute, isAttrTrue, NectaryElement, updateAttribute, updateBooleanAttribute, updateExplicitBooleanAttribute, updateLiteralAttribute } from '../utils';
11
- const templateHTML = '<style>:host{display:inline-block;vertical-align:middle;outline:0;--sinch-color-icon:var(--sinch-color-stormy-500)}#wrapper{width:100%;box-sizing:border-box}#input{all:initial;border:1px solid var(--sinch-color-stormy-200);box-sizing:border-box;border-radius:4px;width:100%;height:48px;margin:2px 0;padding:0 12px;font:var(--sinch-font-body);color:var(--sinch-color-text-default);caret-color:var(--sinch-caret-color,auto);background-color:var(--sinch-color-snow-100)}#input::placeholder{font:var(--sinch-font-body);color:var(--sinch-color-text-muted)}#input:disabled{border-color:var(--sinch-color-snow-500);color:var(--sinch-color-stormy-100)}#input:disabled::placeholder{color:var(--sinch-color-snow-500)}#input:focus{border-color:var(--sinch-color-stormy-600)}#input[type=password]{font-size:1.5em;letter-spacing:.1em}:host([invalidtext]:not([invalidtext=""])) #input:not(:disabled){border-color:var(--sinch-color-text-invalid)}#bottom,#top{display:flex;align-items:baseline}#top{height:24px}#bottom{height:20px}#additional,#invalid,#label,#optional{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#label{font:var(--sinch-font-title-s);color:var(--sinch-color-text-default)}#optional{flex:1;text-align:right;font:var(--sinch-font-small-text);color:var(--sinch-color-text-muted)}#additional{flex:1;text-align:right;font:var(--sinch-font-extra-small-text);color:var(--sinch-color-text-muted)}#invalid{font:var(--sinch-font-extra-small-text);color:var(--sinch-color-text-invalid)}::slotted(sinch-help-tooltip){align-self:center;margin:0 8px}:host([disabled]:not([disabled=false])) :is(#label,#additional,#optional,#invalid){color:var(--sinch-color-stormy-100)}:host([disabled]:not([disabled=false])){--sinch-color-icon:var(--sinch-color-stormy-100)}</style><div id="wrapper"><div id="top"><label id="label" for="input"></label><slot name="tooltip"></slot><span id="optional"></span></div><input id="input" type="text"/><div id="bottom"><span id="invalid"></span> <span id="additional"></span></div></div>';
11
+ const templateHTML = '<style>:host{display:inline-block;vertical-align:middle;outline:0;--sinch-color-icon:var(--sinch-color-stormy-500)}#wrapper{width:100%;box-sizing:border-box}#input-wrapper{display:flex;flex-direction:row;align-items:center;gap:4px;border:1px solid var(--sinch-color-stormy-200);box-sizing:border-box;border-radius:var(--sinch-shape-radius-s);width:100%;height:48px;margin:2px 0;padding:0 8px;background-color:var(--sinch-color-snow-100)}#input{all:initial;flex:1;min-width:0;height:48px;padding:0 4px;font:var(--sinch-font-body);color:var(--sinch-color-text-default);caret-color:var(--sinch-caret-color,auto)}#input::placeholder{font:var(--sinch-font-body);color:var(--sinch-color-text-muted)}#input:disabled{border-color:var(--sinch-color-snow-500);color:var(--sinch-color-stormy-100)}#input:disabled::placeholder{color:var(--sinch-color-snow-500)}#input:focus{border-color:var(--sinch-color-stormy-600)}#input[type=password]{font-size:1.5em;letter-spacing:.1em}:host([invalidtext]:not([invalidtext=""]):not([disabled])) #input-wrapper{border-color:var(--sinch-color-text-invalid)}#bottom,#top{display:flex;align-items:baseline}#top{height:24px}#bottom{height:20px}#additional,#invalid,#label,#optional{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#label{font:var(--sinch-font-title-s);color:var(--sinch-color-text-default)}#optional{flex:1;text-align:right;font:var(--sinch-font-small-text);color:var(--sinch-color-text-muted)}#additional{flex:1;text-align:right;font:var(--sinch-font-extra-small-text);color:var(--sinch-color-text-muted)}#invalid{font:var(--sinch-font-extra-small-text);color:var(--sinch-color-text-invalid)}::slotted(sinch-help-tooltip){align-self:center;margin:0 8px}:host([disabled]:not([disabled=false])) :is(#label,#additional,#optional,#invalid){color:var(--sinch-color-stormy-100)}:host([disabled]:not([disabled=false])){--sinch-color-icon:var(--sinch-color-stormy-100)}</style><div id="wrapper"><div id="top"><label id="label" for="input"></label><slot name="tooltip"></slot><span id="optional"></span></div><div id="input-wrapper"><input id="input" type="text"/><slot name="right"></slot></div><div id="bottom"><span id="invalid"></span> <span id="additional"></span></div></div>';
12
12
  import { inputTypes } from './utils';
13
13
  const template = document.createElement('template');
14
14
  template.innerHTML = templateHTML;
package/input/types.d.ts CHANGED
@@ -1,9 +1,8 @@
1
1
  import type { TSinchElementReact } from '../types';
2
- import type { inputTypes } from './utils';
3
2
  import type { SyntheticEvent } from 'react';
4
- export declare type TTextInputType = typeof inputTypes[number];
3
+ export declare type TSinchInputType = 'text' | 'password';
5
4
  export declare type TSinchInputElement = HTMLElement & {
6
- type: TTextInputType;
5
+ type: TSinchInputType;
7
6
  value: string;
8
7
  label: string;
9
8
  placeholder: string | null;
@@ -17,7 +16,7 @@ export declare type TSinchInputElement = HTMLElement & {
17
16
  focus(): void;
18
17
  blur(): void;
19
18
  addEventListener(type: 'change', listener: (e: CustomEvent<string>) => void): void;
20
- setAttribute(name: 'type', value: TTextInputType): void;
19
+ setAttribute(name: 'type', value: TSinchInputType): void;
21
20
  setAttribute(name: 'value', value: string): void;
22
21
  setAttribute(name: 'label', value: string): void;
23
22
  setAttribute(name: 'placeholder', value: string): void;
@@ -27,7 +26,7 @@ export declare type TSinchInputElement = HTMLElement & {
27
26
  setAttribute(name: 'disabled', value: ''): void;
28
27
  };
29
28
  export declare type TSinchInputReact = TSinchElementReact<TSinchInputElement> & {
30
- type?: TTextInputType;
29
+ type?: TSinchInputType;
31
30
  value: string;
32
31
  label: string;
33
32
  placeholder?: string;
package/input/utils.d.ts CHANGED
@@ -1 +1,2 @@
1
- export declare const inputTypes: readonly ["text", "password"];
1
+ import type { TSinchInputType } from './types';
2
+ export declare const inputTypes: readonly TSinchInputType[];
package/link/index.js CHANGED
@@ -8,8 +8,8 @@ function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedec
8
8
  function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
9
9
 
10
10
  import '../icons/cancel';
11
- import { defineCustomElement, getBooleanAttribute, getAttribute, updateBooleanAttribute, updateAttribute, NectaryElement } from '../utils';
12
- const templateHTML = '<style>:host{display:inline;outline:0}a{font:var(--sinch-font-body);font-size:inherit;line-height:inherit;color:var(--sinch-color-text-link);fill:var(--sinch-color-text-link)}svg{display:none;transform:translateY(.15em);margin-left:.4em;width:.8em;pointer-events:none}a:hover{color:var(--sinch-color-tropical-600);fill:var(--sinch-color-tropical-600)}:host([disabled]:not([disabled=false])) a{color:var(--sinch-color-tropical-200);pointer-events:none;cursor:initial;fill:var(--sinch-color-tropical-200)}:host([external]:not([external=false])) svg{display:inline-block}</style><a><span></span> <svg viewBox="0 0 16 16" aria-hidden="true"><path d="M14.222 14.222H1.778V1.778H8V0H1.778C.79 0 0 .8 0 1.778v12.444C0 15.2.791 16 1.778 16h12.444C15.2 16 16 15.2 16 14.222V8h-1.778v6.222ZM9.778 0v1.778h3.19l-8.737 8.738 1.253 1.253 8.738-8.738v3.191H16V0H9.778Z"/></svg></a>';
11
+ import { defineCustomElement, getBooleanAttribute, getAttribute, updateBooleanAttribute, updateAttribute, NectaryElement, isAttrTrue } from '../utils';
12
+ const templateHTML = '<style>:host{display:inline;outline:0}a{font:var(--sinch-font-body);font-size:inherit;line-height:inherit;color:var(--sinch-color-text-link);fill:var(--sinch-color-text-link);--sinch-size-icon:1em}#icon{display:none;margin-left:.2em;vertical-align:-.25em}a:hover{color:var(--sinch-color-tropical-600);fill:var(--sinch-color-tropical-600)}:host([disabled]:not([disabled=false])) a{color:var(--sinch-color-tropical-200);pointer-events:none;cursor:initial;fill:var(--sinch-color-tropical-200)}:host([external]:not([external=false])) #icon{display:inline-block}</style><a><span id="content"></span><sinch-icon-open-in-new id="icon"></sinch-icon-open-in-new></a>';
13
13
  const template = document.createElement('template');
14
14
  template.innerHTML = templateHTML;
15
15
  defineCustomElement('sinch-link', (_$anchor = new WeakMap(), _$text = new WeakMap(), class extends NectaryElement {
@@ -31,7 +31,7 @@ defineCustomElement('sinch-link', (_$anchor = new WeakMap(), _$text = new WeakMa
31
31
 
32
32
  _classPrivateFieldSet(this, _$anchor, shadowRoot.querySelector('a'));
33
33
 
34
- _classPrivateFieldSet(this, _$text, shadowRoot.querySelector('span'));
34
+ _classPrivateFieldSet(this, _$text, shadowRoot.querySelector('#content'));
35
35
  }
36
36
 
37
37
  get text() {
@@ -67,7 +67,7 @@ defineCustomElement('sinch-link', (_$anchor = new WeakMap(), _$text = new WeakMa
67
67
  }
68
68
 
69
69
  static get observedAttributes() {
70
- return ['text', 'href'];
70
+ return ['text', 'href', 'external', 'disabled'];
71
71
  }
72
72
 
73
73
  attributeChangedCallback(name, _, newVal) {
@@ -78,11 +78,25 @@ defineCustomElement('sinch-link', (_$anchor = new WeakMap(), _$text = new WeakMa
78
78
  break;
79
79
  }
80
80
 
81
+ case 'disabled':
82
+ {
83
+ updateBooleanAttribute(this, 'disabled', isAttrTrue(newVal));
84
+ break;
85
+ }
86
+
81
87
  case 'href':
82
88
  {
83
89
  updateAttribute(_classPrivateFieldGet(this, _$anchor), 'href', newVal);
84
90
  break;
85
91
  }
92
+
93
+ case 'external':
94
+ {
95
+ const isExternal = isAttrTrue(newVal);
96
+ updateAttribute(_classPrivateFieldGet(this, _$anchor), 'target', isExternal ? '_blank' : null);
97
+ updateBooleanAttribute(this, 'external', isExternal);
98
+ break;
99
+ }
86
100
  }
87
101
  }
88
102
 
package/link/types.d.ts CHANGED
@@ -4,8 +4,6 @@ export declare type TSinchLinkElement = HTMLElement & {
4
4
  href: string;
5
5
  disabled: boolean;
6
6
  external: boolean;
7
- focus(): void;
8
- blur(): void;
9
7
  setAttribute(name: 'text', value: string): void;
10
8
  setAttribute(name: 'href', value: string): void;
11
9
  setAttribute(name: 'disabled', value: ''): void;