@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.
- package/accordion-item/types.d.ts +1 -2
- package/accordion-item/utils.d.ts +2 -1
- package/alert/index.js +1 -1
- package/alert/types.d.ts +1 -2
- package/alert/utils.d.ts +2 -1
- package/alert-button/index.js +1 -1
- package/avatar/types.d.ts +2 -3
- package/avatar/utils.d.ts +3 -2
- package/avatar-status/index.js +1 -3
- package/avatar-status/types.d.ts +1 -2
- package/avatar-status/utils.d.ts +1 -1
- package/button/index.js +1 -1
- package/button/types.d.ts +1 -2
- package/button/utils.d.ts +2 -1
- package/card/index.js +1 -1
- package/card-container/index.js +1 -1
- package/chat-bubble/types.d.ts +2 -3
- package/chat-bubble/utils.d.ts +3 -2
- package/checkbox/index.js +1 -1
- package/colors.json +6 -1
- package/date-picker/index.d.ts +19 -0
- package/date-picker/index.js +419 -0
- package/date-picker/types.d.ts +26 -0
- package/date-picker/types.js +1 -0
- package/date-picker/utils.d.ts +32 -0
- package/date-picker/utils.js +142 -0
- package/dialog/index.js +23 -5
- package/dropdown-checkbox-option/index.js +1 -1
- package/icon-button/index.js +1 -1
- package/icons/create-icon-class.d.ts +1 -307
- package/icons/keyboard-double-arrow-left/index.d.ts +11 -0
- package/icons/keyboard-double-arrow-left/index.js +4 -0
- package/icons/keyboard-double-arrow-right/index.d.ts +11 -0
- package/icons/keyboard-double-arrow-right/index.js +4 -0
- package/icons-branded/chat/index.d.ts +11 -0
- package/icons-branded/chat/index.js +4 -0
- package/icons-branded/create-icon-class.d.ts +1 -311
- package/icons-branded/mms/index.d.ts +11 -0
- package/icons-branded/mms/index.js +4 -0
- package/icons-branded/push/index.d.ts +11 -0
- package/icons-branded/push/index.js +4 -0
- package/icons-branded/rcs/index.d.ts +11 -0
- package/icons-branded/rcs/index.js +4 -0
- package/icons-branded/sms/index.d.ts +11 -0
- package/icons-branded/sms/index.js +4 -0
- package/icons-channel/apple-business-chat-square/index.d.ts +11 -0
- package/icons-channel/apple-business-chat-square/index.js +4 -0
- package/icons-channel/create-icon-class.d.ts +1 -310
- package/icons-channel/create-icon-class.js +1 -1
- package/icons-channel/facebook-messenger-square/index.d.ts +11 -0
- package/icons-channel/facebook-messenger-square/index.js +4 -0
- package/icons-channel/instagram-square/index.d.ts +11 -0
- package/icons-channel/instagram-square/index.js +4 -0
- package/icons-channel/line-square/index.d.ts +11 -0
- package/icons-channel/line-square/index.js +4 -0
- package/icons-channel/talk-square/index.d.ts +11 -0
- package/icons-channel/talk-square/index.js +4 -0
- package/icons-channel/telegram-square/index.d.ts +11 -0
- package/icons-channel/telegram-square/index.js +4 -0
- package/icons-channel/twitter-square/index.d.ts +11 -0
- package/icons-channel/twitter-square/index.js +4 -0
- package/icons-channel/viber-square/index.d.ts +11 -0
- package/icons-channel/viber-square/index.js +4 -0
- package/icons-channel/wechat-square/index.d.ts +11 -0
- package/icons-channel/wechat-square/index.js +4 -0
- package/icons-channel/whatsapp-square/index.d.ts +11 -0
- package/icons-channel/whatsapp-square/index.js +4 -0
- package/illustration/create-illustration-class.d.ts +1 -310
- package/illustration/create-illustration-class.js +20 -3
- package/illustration/phone-and-cat/index.js +1 -1
- package/illustration/types.d.ts +8 -0
- package/illustration/utils.d.ts +3 -0
- package/illustration/utils.js +2 -0
- package/input/index.js +1 -1
- package/input/types.d.ts +4 -5
- package/input/utils.d.ts +2 -1
- package/link/index.js +18 -4
- package/link/types.d.ts +0 -2
- package/logo/create-logo-class.d.ts +1 -311
- package/package.json +1 -1
- package/popover/index.js +76 -47
- package/popover/types.d.ts +1 -2
- package/popover/utils.d.ts +2 -1
- package/search/index.js +1 -1
- package/segment/index.d.ts +1 -0
- package/segment/index.js +109 -6
- package/segment/types.d.ts +4 -0
- package/segment/utils.d.ts +5 -0
- package/segment/utils.js +6 -0
- package/select/index.js +1 -1
- package/spinner/types.d.ts +1 -2
- package/spinner/utils.d.ts +2 -1
- package/table-cell/types.d.ts +4 -5
- package/table-cell/utils.d.ts +2 -1
- package/table-head-cell/types.d.ts +4 -4
- package/tag/index.js +1 -1
- package/tag/types.d.ts +1 -2
- package/tag/utils.d.ts +2 -1
- package/text/index.js +0 -1
- package/text/types.d.ts +1 -2
- package/text/utils.d.ts +1 -1
- package/textarea/index.js +1 -1
- package/theme.css +17 -0
- package/title/index.js +0 -2
- package/title/types.d.ts +2 -3
- package/title/utils.d.ts +4 -3
- package/title/utils.js +21 -0
- package/toggle/index.js +1 -1
- package/tooltip/index.js +1 -1
- package/tooltip/types.d.ts +1 -2
- package/tooltip/utils.d.ts +2 -1
- package/utils.d.ts +4 -0
- package/utils.js +35 -4
|
@@ -1,311 +1 @@
|
|
|
1
|
-
export declare const createLogoClass: (templateHTML: string) =>
|
|
2
|
-
new (): {
|
|
3
|
-
$svg: SVGElement;
|
|
4
|
-
size: number;
|
|
5
|
-
inverted: boolean;
|
|
6
|
-
connectedCallback(): void;
|
|
7
|
-
attributeChangedCallback(name: string, _: string | null, newVal: string | null): void;
|
|
8
|
-
attachShadow(options?: Partial<ShadowRootInit> | undefined): ShadowRoot;
|
|
9
|
-
accessKey: string;
|
|
10
|
-
readonly accessKeyLabel: string;
|
|
11
|
-
autocapitalize: string;
|
|
12
|
-
dir: string;
|
|
13
|
-
draggable: boolean;
|
|
14
|
-
hidden: boolean;
|
|
15
|
-
innerText: string;
|
|
16
|
-
lang: string;
|
|
17
|
-
readonly offsetHeight: number;
|
|
18
|
-
readonly offsetLeft: number;
|
|
19
|
-
readonly offsetParent: Element | null;
|
|
20
|
-
readonly offsetTop: number;
|
|
21
|
-
readonly offsetWidth: number;
|
|
22
|
-
outerText: string;
|
|
23
|
-
spellcheck: boolean;
|
|
24
|
-
title: string;
|
|
25
|
-
translate: boolean;
|
|
26
|
-
attachInternals(): ElementInternals;
|
|
27
|
-
click(): void;
|
|
28
|
-
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions | undefined): void;
|
|
29
|
-
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions | undefined): void;
|
|
30
|
-
removeEventListener<K_1 extends keyof HTMLElementEventMap>(type: K_1, listener: (this: HTMLElement, ev: HTMLElementEventMap[K_1]) => any, options?: boolean | EventListenerOptions | undefined): void;
|
|
31
|
-
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions | undefined): void;
|
|
32
|
-
readonly attributes: NamedNodeMap;
|
|
33
|
-
readonly classList: DOMTokenList;
|
|
34
|
-
className: string;
|
|
35
|
-
readonly clientHeight: number;
|
|
36
|
-
readonly clientLeft: number;
|
|
37
|
-
readonly clientTop: number;
|
|
38
|
-
readonly clientWidth: number;
|
|
39
|
-
id: string;
|
|
40
|
-
readonly localName: string;
|
|
41
|
-
readonly namespaceURI: string | null;
|
|
42
|
-
onfullscreenchange: ((this: Element, ev: Event) => any) | null;
|
|
43
|
-
onfullscreenerror: ((this: Element, ev: Event) => any) | null;
|
|
44
|
-
outerHTML: string;
|
|
45
|
-
readonly ownerDocument: Document;
|
|
46
|
-
readonly part: DOMTokenList;
|
|
47
|
-
readonly prefix: string | null;
|
|
48
|
-
readonly scrollHeight: number;
|
|
49
|
-
scrollLeft: number;
|
|
50
|
-
scrollTop: number;
|
|
51
|
-
readonly scrollWidth: number;
|
|
52
|
-
readonly shadowRoot: ShadowRoot | null;
|
|
53
|
-
slot: string;
|
|
54
|
-
readonly tagName: string;
|
|
55
|
-
closest<K_2 extends keyof HTMLElementTagNameMap>(selector: K_2): HTMLElementTagNameMap[K_2] | null;
|
|
56
|
-
closest<K_3 extends keyof SVGElementTagNameMap>(selector: K_3): SVGElementTagNameMap[K_3] | null;
|
|
57
|
-
closest<E extends Element = Element>(selectors: string): E | null;
|
|
58
|
-
getAttribute(qualifiedName: string): string | null;
|
|
59
|
-
getAttributeNS(namespace: string | null, localName: string): string | null;
|
|
60
|
-
getAttributeNames(): string[];
|
|
61
|
-
getAttributeNode(qualifiedName: string): Attr | null;
|
|
62
|
-
getAttributeNodeNS(namespace: string | null, localName: string): Attr | null;
|
|
63
|
-
getBoundingClientRect(): DOMRect;
|
|
64
|
-
getClientRects(): DOMRectList;
|
|
65
|
-
getElementsByClassName(classNames: string): HTMLCollectionOf<Element>;
|
|
66
|
-
getElementsByTagName<K_4 extends keyof HTMLElementTagNameMap>(qualifiedName: K_4): HTMLCollectionOf<HTMLElementTagNameMap[K_4]>;
|
|
67
|
-
getElementsByTagName<K_5 extends keyof SVGElementTagNameMap>(qualifiedName: K_5): HTMLCollectionOf<SVGElementTagNameMap[K_5]>;
|
|
68
|
-
getElementsByTagName(qualifiedName: string): HTMLCollectionOf<Element>;
|
|
69
|
-
getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf<HTMLElement>;
|
|
70
|
-
getElementsByTagNameNS(namespaceURI: "http://www.w3.org/2000/svg", localName: string): HTMLCollectionOf<SVGElement>;
|
|
71
|
-
getElementsByTagNameNS(namespace: string | null, localName: string): HTMLCollectionOf<Element>;
|
|
72
|
-
hasAttribute(qualifiedName: string): boolean;
|
|
73
|
-
hasAttributeNS(namespace: string | null, localName: string): boolean;
|
|
74
|
-
hasAttributes(): boolean;
|
|
75
|
-
hasPointerCapture(pointerId: number): boolean;
|
|
76
|
-
insertAdjacentElement(where: InsertPosition, element: Element): Element | null;
|
|
77
|
-
insertAdjacentHTML(position: InsertPosition, text: string): void;
|
|
78
|
-
insertAdjacentText(where: InsertPosition, data: string): void;
|
|
79
|
-
matches(selectors: string): boolean;
|
|
80
|
-
releasePointerCapture(pointerId: number): void;
|
|
81
|
-
removeAttribute(qualifiedName: string): void;
|
|
82
|
-
removeAttributeNS(namespace: string | null, localName: string): void;
|
|
83
|
-
removeAttributeNode(attr: Attr): Attr;
|
|
84
|
-
requestFullscreen(options?: FullscreenOptions | undefined): Promise<void>;
|
|
85
|
-
requestPointerLock(): void;
|
|
86
|
-
scroll(options?: ScrollToOptions | undefined): void;
|
|
87
|
-
scroll(x: number, y: number): void;
|
|
88
|
-
scrollBy(options?: ScrollToOptions | undefined): void;
|
|
89
|
-
scrollBy(x: number, y: number): void;
|
|
90
|
-
scrollIntoView(arg?: boolean | ScrollIntoViewOptions | undefined): void;
|
|
91
|
-
scrollTo(options?: ScrollToOptions | undefined): void;
|
|
92
|
-
scrollTo(x: number, y: number): void;
|
|
93
|
-
setAttribute(qualifiedName: string, value: string): void;
|
|
94
|
-
setAttributeNS(namespace: string | null, qualifiedName: string, value: string): void;
|
|
95
|
-
setAttributeNode(attr: Attr): Attr | null;
|
|
96
|
-
setAttributeNodeNS(attr: Attr): Attr | null;
|
|
97
|
-
setPointerCapture(pointerId: number): void;
|
|
98
|
-
toggleAttribute(qualifiedName: string, force?: boolean | undefined): boolean;
|
|
99
|
-
webkitMatchesSelector(selectors: string): boolean;
|
|
100
|
-
readonly baseURI: string;
|
|
101
|
-
readonly childNodes: NodeListOf<ChildNode>;
|
|
102
|
-
readonly firstChild: ChildNode | null;
|
|
103
|
-
readonly isConnected: boolean;
|
|
104
|
-
readonly lastChild: ChildNode | null;
|
|
105
|
-
readonly nextSibling: ChildNode | null;
|
|
106
|
-
readonly nodeName: string;
|
|
107
|
-
readonly nodeType: number;
|
|
108
|
-
nodeValue: string | null;
|
|
109
|
-
readonly parentElement: HTMLElement | null;
|
|
110
|
-
readonly parentNode: ParentNode | null;
|
|
111
|
-
readonly previousSibling: ChildNode | null;
|
|
112
|
-
textContent: string | null;
|
|
113
|
-
appendChild<T extends Node>(node: T): T;
|
|
114
|
-
cloneNode(deep?: boolean | undefined): Node;
|
|
115
|
-
compareDocumentPosition(other: Node): number;
|
|
116
|
-
contains(other: Node | null): boolean;
|
|
117
|
-
getRootNode(options?: GetRootNodeOptions | undefined): Node;
|
|
118
|
-
hasChildNodes(): boolean;
|
|
119
|
-
insertBefore<T_1 extends Node>(node: T_1, child: Node | null): T_1;
|
|
120
|
-
isDefaultNamespace(namespace: string | null): boolean;
|
|
121
|
-
isEqualNode(otherNode: Node | null): boolean;
|
|
122
|
-
isSameNode(otherNode: Node | null): boolean;
|
|
123
|
-
lookupNamespaceURI(prefix: string | null): string | null;
|
|
124
|
-
lookupPrefix(namespace: string | null): string | null;
|
|
125
|
-
normalize(): void;
|
|
126
|
-
removeChild<T_2 extends Node>(child: T_2): T_2;
|
|
127
|
-
replaceChild<T_3 extends Node>(node: Node, child: T_3): T_3;
|
|
128
|
-
readonly ATTRIBUTE_NODE: number;
|
|
129
|
-
readonly CDATA_SECTION_NODE: number;
|
|
130
|
-
readonly COMMENT_NODE: number;
|
|
131
|
-
readonly DOCUMENT_FRAGMENT_NODE: number;
|
|
132
|
-
readonly DOCUMENT_NODE: number;
|
|
133
|
-
readonly DOCUMENT_POSITION_CONTAINED_BY: number;
|
|
134
|
-
readonly DOCUMENT_POSITION_CONTAINS: number;
|
|
135
|
-
readonly DOCUMENT_POSITION_DISCONNECTED: number;
|
|
136
|
-
readonly DOCUMENT_POSITION_FOLLOWING: number;
|
|
137
|
-
readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: number;
|
|
138
|
-
readonly DOCUMENT_POSITION_PRECEDING: number;
|
|
139
|
-
readonly DOCUMENT_TYPE_NODE: number;
|
|
140
|
-
readonly ELEMENT_NODE: number;
|
|
141
|
-
readonly ENTITY_NODE: number;
|
|
142
|
-
readonly ENTITY_REFERENCE_NODE: number;
|
|
143
|
-
readonly NOTATION_NODE: number;
|
|
144
|
-
readonly PROCESSING_INSTRUCTION_NODE: number;
|
|
145
|
-
readonly TEXT_NODE: number;
|
|
146
|
-
dispatchEvent(event: Event): boolean;
|
|
147
|
-
ariaAtomic: string | null;
|
|
148
|
-
ariaAutoComplete: string | null;
|
|
149
|
-
ariaBusy: string | null;
|
|
150
|
-
ariaChecked: string | null;
|
|
151
|
-
ariaColCount: string | null;
|
|
152
|
-
ariaColIndex: string | null;
|
|
153
|
-
ariaColSpan: string | null;
|
|
154
|
-
ariaCurrent: string | null;
|
|
155
|
-
ariaDisabled: string | null;
|
|
156
|
-
ariaExpanded: string | null;
|
|
157
|
-
ariaHasPopup: string | null;
|
|
158
|
-
ariaHidden: string | null;
|
|
159
|
-
ariaKeyShortcuts: string | null;
|
|
160
|
-
ariaLabel: string | null;
|
|
161
|
-
ariaLevel: string | null;
|
|
162
|
-
ariaLive: string | null;
|
|
163
|
-
ariaModal: string | null;
|
|
164
|
-
ariaMultiLine: string | null;
|
|
165
|
-
ariaMultiSelectable: string | null;
|
|
166
|
-
ariaOrientation: string | null;
|
|
167
|
-
ariaPlaceholder: string | null;
|
|
168
|
-
ariaPosInSet: string | null;
|
|
169
|
-
ariaPressed: string | null;
|
|
170
|
-
ariaReadOnly: string | null;
|
|
171
|
-
ariaRequired: string | null;
|
|
172
|
-
ariaRoleDescription: string | null;
|
|
173
|
-
ariaRowCount: string | null;
|
|
174
|
-
ariaRowIndex: string | null;
|
|
175
|
-
ariaRowSpan: string | null;
|
|
176
|
-
ariaSelected: string | null;
|
|
177
|
-
ariaSetSize: string | null;
|
|
178
|
-
ariaSort: string | null;
|
|
179
|
-
ariaValueMax: string | null;
|
|
180
|
-
ariaValueMin: string | null;
|
|
181
|
-
ariaValueNow: string | null;
|
|
182
|
-
ariaValueText: string | null;
|
|
183
|
-
animate(keyframes: Keyframe[] | PropertyIndexedKeyframes | null, options?: number | KeyframeAnimationOptions | undefined): Animation;
|
|
184
|
-
getAnimations(options?: GetAnimationsOptions | undefined): Animation[];
|
|
185
|
-
after(...nodes: (string | Node)[]): void;
|
|
186
|
-
before(...nodes: (string | Node)[]): void;
|
|
187
|
-
remove(): void;
|
|
188
|
-
replaceWith(...nodes: (string | Node)[]): void;
|
|
189
|
-
innerHTML: string;
|
|
190
|
-
readonly nextElementSibling: Element | null;
|
|
191
|
-
readonly previousElementSibling: Element | null;
|
|
192
|
-
readonly childElementCount: number;
|
|
193
|
-
readonly children: HTMLCollection;
|
|
194
|
-
readonly firstElementChild: Element | null;
|
|
195
|
-
readonly lastElementChild: Element | null;
|
|
196
|
-
append(...nodes: (string | Node)[]): void;
|
|
197
|
-
prepend(...nodes: (string | Node)[]): void;
|
|
198
|
-
querySelector<K_6 extends keyof HTMLElementTagNameMap>(selectors: K_6): HTMLElementTagNameMap[K_6] | null;
|
|
199
|
-
querySelector<K_7 extends keyof SVGElementTagNameMap>(selectors: K_7): SVGElementTagNameMap[K_7] | null;
|
|
200
|
-
querySelector<E_1 extends Element = Element>(selectors: string): E_1 | null;
|
|
201
|
-
querySelectorAll<K_8 extends keyof HTMLElementTagNameMap>(selectors: K_8): NodeListOf<HTMLElementTagNameMap[K_8]>;
|
|
202
|
-
querySelectorAll<K_9 extends keyof SVGElementTagNameMap>(selectors: K_9): NodeListOf<SVGElementTagNameMap[K_9]>;
|
|
203
|
-
querySelectorAll<E_2 extends Element = Element>(selectors: string): NodeListOf<E_2>;
|
|
204
|
-
replaceChildren(...nodes: (string | Node)[]): void;
|
|
205
|
-
readonly assignedSlot: HTMLSlotElement | null;
|
|
206
|
-
oncopy: ((this: DocumentAndElementEventHandlers, ev: ClipboardEvent) => any) | null;
|
|
207
|
-
oncut: ((this: DocumentAndElementEventHandlers, ev: ClipboardEvent) => any) | null;
|
|
208
|
-
onpaste: ((this: DocumentAndElementEventHandlers, ev: ClipboardEvent) => any) | null;
|
|
209
|
-
readonly style: CSSStyleDeclaration;
|
|
210
|
-
contentEditable: string;
|
|
211
|
-
enterKeyHint: string;
|
|
212
|
-
inputMode: string;
|
|
213
|
-
readonly isContentEditable: boolean;
|
|
214
|
-
onabort: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;
|
|
215
|
-
onanimationcancel: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
|
|
216
|
-
onanimationend: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
|
|
217
|
-
onanimationiteration: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
|
|
218
|
-
onanimationstart: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
|
|
219
|
-
onauxclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
220
|
-
onblur: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
|
|
221
|
-
oncanplay: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
222
|
-
oncanplaythrough: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
223
|
-
onchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
224
|
-
onclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
225
|
-
onclose: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
226
|
-
oncontextmenu: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
227
|
-
oncuechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
228
|
-
ondblclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
229
|
-
ondrag: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
230
|
-
ondragend: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
231
|
-
ondragenter: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
232
|
-
ondragleave: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
233
|
-
ondragover: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
234
|
-
ondragstart: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
235
|
-
ondrop: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
236
|
-
ondurationchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
237
|
-
onemptied: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
238
|
-
onended: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
239
|
-
onerror: OnErrorEventHandler;
|
|
240
|
-
onfocus: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
|
|
241
|
-
onformdata: ((this: GlobalEventHandlers, ev: FormDataEvent) => any) | null;
|
|
242
|
-
ongotpointercapture: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
243
|
-
oninput: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
244
|
-
oninvalid: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
245
|
-
onkeydown: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
|
|
246
|
-
onkeypress: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
|
|
247
|
-
onkeyup: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
|
|
248
|
-
onload: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
249
|
-
onloadeddata: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
250
|
-
onloadedmetadata: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
251
|
-
onloadstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
252
|
-
onlostpointercapture: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
253
|
-
onmousedown: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
254
|
-
onmouseenter: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
255
|
-
onmouseleave: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
256
|
-
onmousemove: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
257
|
-
onmouseout: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
258
|
-
onmouseover: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
259
|
-
onmouseup: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
260
|
-
onpause: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
261
|
-
onplay: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
262
|
-
onplaying: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
263
|
-
onpointercancel: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
264
|
-
onpointerdown: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
265
|
-
onpointerenter: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
266
|
-
onpointerleave: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
267
|
-
onpointermove: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
268
|
-
onpointerout: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
269
|
-
onpointerover: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
270
|
-
onpointerup: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
271
|
-
onprogress: ((this: GlobalEventHandlers, ev: ProgressEvent<EventTarget>) => any) | null;
|
|
272
|
-
onratechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
273
|
-
onreset: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
274
|
-
onresize: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;
|
|
275
|
-
onscroll: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
276
|
-
onsecuritypolicyviolation: ((this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any) | null;
|
|
277
|
-
onseeked: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
278
|
-
onseeking: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
279
|
-
onselect: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
280
|
-
onselectionchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
281
|
-
onselectstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
282
|
-
onslotchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
283
|
-
onstalled: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
284
|
-
onsubmit: ((this: GlobalEventHandlers, ev: SubmitEvent) => any) | null;
|
|
285
|
-
onsuspend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
286
|
-
ontimeupdate: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
287
|
-
ontoggle: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
288
|
-
ontouchcancel?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
|
|
289
|
-
ontouchend?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
|
|
290
|
-
ontouchmove?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
|
|
291
|
-
ontouchstart?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
|
|
292
|
-
ontransitioncancel: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
|
|
293
|
-
ontransitionend: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
|
|
294
|
-
ontransitionrun: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
|
|
295
|
-
ontransitionstart: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
|
|
296
|
-
onvolumechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
297
|
-
onwaiting: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
298
|
-
onwebkitanimationend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
299
|
-
onwebkitanimationiteration: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
300
|
-
onwebkitanimationstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
301
|
-
onwebkittransitionend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
302
|
-
onwheel: ((this: GlobalEventHandlers, ev: WheelEvent) => any) | null;
|
|
303
|
-
autofocus: boolean;
|
|
304
|
-
readonly dataset: DOMStringMap;
|
|
305
|
-
nonce?: string | undefined;
|
|
306
|
-
tabIndex: number;
|
|
307
|
-
blur(): void;
|
|
308
|
-
focus(options?: FocusOptions | undefined): void;
|
|
309
|
-
};
|
|
310
|
-
readonly observedAttributes: string[];
|
|
311
|
-
};
|
|
1
|
+
export declare const createLogoClass: (templateHTML: string) => CustomElementConstructor;
|
package/package.json
CHANGED
package/popover/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _classPrivateFieldGet from '@babel/runtime/helpers/classPrivateFieldGet';
|
|
2
2
|
import _classPrivateFieldSet from '@babel/runtime/helpers/classPrivateFieldSet';
|
|
3
3
|
|
|
4
|
-
var _$target, _$dialog, _isConnected, _onExpand, _onCollapse, _isOpen, _updateOrientation, _onBackdropClick, _onCancel, _onCloseReactHandler, _dispatchCloseEvent;
|
|
4
|
+
var _$target, _$dialog, _isConnected, _resizeThrottle, _prevOverflowValue, _onExpand, _onCollapse, _isOpen, _onResize, _updateOrientation, _onBackdropClick, _onCancel, _onCloseReactHandler, _dispatchCloseEvent;
|
|
5
5
|
|
|
6
6
|
function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
|
|
7
7
|
|
|
@@ -12,20 +12,18 @@ function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollect
|
|
|
12
12
|
function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
|
|
13
13
|
|
|
14
14
|
import dialogPolyfill from 'dialog-polyfill';
|
|
15
|
-
import { defineCustomElement, getBooleanAttribute, getLiteralAttribute, getRect, isAttrTrue, updateLiteralAttribute, getReactEventHandler, updateBooleanAttribute, NectaryElement, getCssVar } from '../utils';
|
|
16
|
-
const templateHTML = '<style>:host{display:inline-block;vertical-align:middle;outline:0}#wrapper{position:relative}dialog{position:fixed;
|
|
15
|
+
import { defineCustomElement, getBooleanAttribute, getLiteralAttribute, getRect, isAttrTrue, updateLiteralAttribute, getReactEventHandler, updateBooleanAttribute, NectaryElement, getCssVar, throttleAnimationFrame } from '../utils';
|
|
16
|
+
const templateHTML = '<style>:host{display:inline-block;vertical-align:middle;outline:0}#wrapper{position:relative}dialog{position:fixed;top:0;left:0;margin:0;outline:0;font:var(--sinch-font-body);color:var(--sinch-color-text-default);background-color:var(--sinch-color-snow-100);box-shadow:var(--sinch-elevation-level-2);border:1px solid var(--sinch-color-snow-500);border-radius:var(--sinch-shape-radius-s);contain:content;padding:0;box-sizing:border-box;max-width:unset;max-height:unset}dialog:not([open]){display:none}dialog::backdrop{background-color:transparent}dialog+.backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background-color:transparent}dialog.fixed{position:fixed;top:50%;transform:translate(0,-50%)}._dialog_overlay{position:fixed;top:0;right:0;bottom:0;left:0}#target{display:flex;flex-direction:column}</style><div id="wrapper"><div id="target" aria-haspopup="dialog" aria-expanded="false"><slot name="target"></slot></div><dialog id="dialog" tabindex="-1"><slot name="content"></slot></dialog></div>';
|
|
17
17
|
import { orientationValues } from './utils';
|
|
18
18
|
const template = document.createElement('template');
|
|
19
19
|
template.innerHTML = templateHTML;
|
|
20
|
-
const
|
|
21
|
-
defineCustomElement('sinch-popover', (_$target = new WeakMap(), _$dialog = new WeakMap(), _isConnected = new WeakMap(), _onExpand = new WeakSet(), _onCollapse = new WeakSet(), _isOpen = new WeakSet(), _updateOrientation = new
|
|
20
|
+
const POPOVER_OFFSET = 4;
|
|
21
|
+
defineCustomElement('sinch-popover', (_$target = new WeakMap(), _$dialog = new WeakMap(), _isConnected = new WeakMap(), _resizeThrottle = new WeakMap(), _prevOverflowValue = new WeakMap(), _onExpand = new WeakSet(), _onCollapse = new WeakSet(), _isOpen = new WeakSet(), _onResize = new WeakMap(), _updateOrientation = new WeakMap(), _onBackdropClick = new WeakMap(), _onCancel = new WeakMap(), _onCloseReactHandler = new WeakMap(), _dispatchCloseEvent = new WeakSet(), class extends NectaryElement {
|
|
22
22
|
constructor() {
|
|
23
23
|
super();
|
|
24
24
|
|
|
25
25
|
_classPrivateMethodInitSpec(this, _dispatchCloseEvent);
|
|
26
26
|
|
|
27
|
-
_classPrivateMethodInitSpec(this, _updateOrientation);
|
|
28
|
-
|
|
29
27
|
_classPrivateMethodInitSpec(this, _isOpen);
|
|
30
28
|
|
|
31
29
|
_classPrivateMethodInitSpec(this, _onCollapse);
|
|
@@ -44,7 +42,62 @@ defineCustomElement('sinch-popover', (_$target = new WeakMap(), _$dialog = new W
|
|
|
44
42
|
|
|
45
43
|
_classPrivateFieldInitSpec(this, _isConnected, {
|
|
46
44
|
writable: true,
|
|
47
|
-
value:
|
|
45
|
+
value: void 0
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
_classPrivateFieldInitSpec(this, _resizeThrottle, {
|
|
49
|
+
writable: true,
|
|
50
|
+
value: void 0
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
_classPrivateFieldInitSpec(this, _prevOverflowValue, {
|
|
54
|
+
writable: true,
|
|
55
|
+
value: ''
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
_classPrivateFieldInitSpec(this, _onResize, {
|
|
59
|
+
writable: true,
|
|
60
|
+
value: () => {
|
|
61
|
+
_classPrivateFieldGet(this, _resizeThrottle).fn();
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
_classPrivateFieldInitSpec(this, _updateOrientation, {
|
|
66
|
+
writable: true,
|
|
67
|
+
value: () => {
|
|
68
|
+
_classPrivateFieldGet(this, _$dialog).style.width = 'fit-content';
|
|
69
|
+
|
|
70
|
+
const targetRect = _classPrivateFieldGet(this, _$target).getBoundingClientRect();
|
|
71
|
+
|
|
72
|
+
const modalRect = _classPrivateFieldGet(this, _$dialog).getBoundingClientRect();
|
|
73
|
+
|
|
74
|
+
let leftPos = 0;
|
|
75
|
+
let topPos = 0;
|
|
76
|
+
const orient = this.orientation;
|
|
77
|
+
const shouldExpandWidthToTarget = getCssVar(this, '--sinch-popover-expand-width') !== null;
|
|
78
|
+
const largestWidth = Math.max(modalRect.width, targetRect.width);
|
|
79
|
+
const resultWidth = shouldExpandWidthToTarget ? largestWidth : modalRect.width;
|
|
80
|
+
|
|
81
|
+
if (orient === 'bottom-right' || orient === 'top-right') {
|
|
82
|
+
leftPos = Math.max(POPOVER_OFFSET, Math.min(targetRect.x, window.innerWidth - resultWidth - POPOVER_OFFSET));
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
if (orient === 'bottom-left' || orient === 'top-left') {
|
|
86
|
+
leftPos = Math.max(POPOVER_OFFSET, targetRect.right - resultWidth);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
if (orient === 'bottom-left' || orient === 'bottom-right') {
|
|
90
|
+
topPos = Math.max(POPOVER_OFFSET, Math.min(targetRect.bottom + POPOVER_OFFSET, window.innerHeight - modalRect.height - POPOVER_OFFSET));
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
if (orient === 'top-left' || orient === 'top-right') {
|
|
94
|
+
topPos = Math.max(POPOVER_OFFSET, targetRect.top - POPOVER_OFFSET - modalRect.height);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
_classPrivateFieldGet(this, _$dialog).style.left = `${leftPos}px`;
|
|
98
|
+
_classPrivateFieldGet(this, _$dialog).style.top = `${topPos}px`;
|
|
99
|
+
_classPrivateFieldGet(this, _$dialog).style.width = `${resultWidth}px`;
|
|
100
|
+
}
|
|
48
101
|
});
|
|
49
102
|
|
|
50
103
|
_classPrivateFieldInitSpec(this, _onBackdropClick, {
|
|
@@ -58,6 +111,8 @@ defineCustomElement('sinch-popover', (_$target = new WeakMap(), _$dialog = new W
|
|
|
58
111
|
const isInside = e.x >= rect.x && e.x < rect.x + rect.width && e.y >= rect.y && e.y < rect.y + rect.height;
|
|
59
112
|
|
|
60
113
|
if (!isInside) {
|
|
114
|
+
e.stopPropagation();
|
|
115
|
+
|
|
61
116
|
_classPrivateMethodGet(this, _dispatchCloseEvent, _dispatchCloseEvent2).call(this);
|
|
62
117
|
}
|
|
63
118
|
}
|
|
@@ -86,6 +141,10 @@ defineCustomElement('sinch-popover', (_$target = new WeakMap(), _$dialog = new W
|
|
|
86
141
|
|
|
87
142
|
_classPrivateFieldSet(this, _$dialog, shadowRoot.querySelector('#dialog'));
|
|
88
143
|
|
|
144
|
+
_classPrivateFieldSet(this, _isConnected, false);
|
|
145
|
+
|
|
146
|
+
_classPrivateFieldSet(this, _resizeThrottle, throttleAnimationFrame(_classPrivateFieldGet(this, _updateOrientation)));
|
|
147
|
+
|
|
89
148
|
dialogPolyfill.registerDialog(_classPrivateFieldGet(this, _$dialog));
|
|
90
149
|
}
|
|
91
150
|
|
|
@@ -159,7 +218,7 @@ defineCustomElement('sinch-popover', (_$target = new WeakMap(), _$dialog = new W
|
|
|
159
218
|
case 'orientation':
|
|
160
219
|
{
|
|
161
220
|
if (_classPrivateMethodGet(this, _isOpen, _isOpen2).call(this)) {
|
|
162
|
-
|
|
221
|
+
_classPrivateFieldGet(this, _updateOrientation).call(this);
|
|
163
222
|
}
|
|
164
223
|
|
|
165
224
|
break;
|
|
@@ -178,9 +237,12 @@ function _onExpand2() {
|
|
|
178
237
|
|
|
179
238
|
_classPrivateFieldGet(this, _$dialog).showModal();
|
|
180
239
|
|
|
181
|
-
|
|
240
|
+
_classPrivateFieldGet(this, _updateOrientation).call(this);
|
|
241
|
+
|
|
242
|
+
_classPrivateFieldSet(this, _prevOverflowValue, document.body.style.overflow);
|
|
182
243
|
|
|
183
244
|
document.body.style.overflow = 'hidden';
|
|
245
|
+
window.addEventListener('resize', _classPrivateFieldGet(this, _onResize));
|
|
184
246
|
}
|
|
185
247
|
|
|
186
248
|
function _onCollapse2() {
|
|
@@ -191,49 +253,16 @@ function _onCollapse2() {
|
|
|
191
253
|
_classPrivateFieldGet(this, _$target).setAttribute('aria-expanded', 'false');
|
|
192
254
|
|
|
193
255
|
_classPrivateFieldGet(this, _$dialog).close?.();
|
|
194
|
-
document.body.style.overflow =
|
|
256
|
+
document.body.style.overflow = _classPrivateFieldGet(this, _prevOverflowValue);
|
|
257
|
+
window.removeEventListener('resize', _classPrivateFieldGet(this, _onResize));
|
|
258
|
+
|
|
259
|
+
_classPrivateFieldGet(this, _resizeThrottle).cancel();
|
|
195
260
|
}
|
|
196
261
|
|
|
197
262
|
function _isOpen2() {
|
|
198
263
|
return _classPrivateFieldGet(this, _isConnected) && getBooleanAttribute(_classPrivateFieldGet(this, _$dialog), 'open');
|
|
199
264
|
}
|
|
200
265
|
|
|
201
|
-
function _updateOrientation2() {
|
|
202
|
-
_classPrivateFieldGet(this, _$dialog).style.transform = 'initial';
|
|
203
|
-
_classPrivateFieldGet(this, _$dialog).style.width = 'fit-content';
|
|
204
|
-
|
|
205
|
-
const targetRect = _classPrivateFieldGet(this, _$target).getBoundingClientRect();
|
|
206
|
-
|
|
207
|
-
const modalRect = _classPrivateFieldGet(this, _$dialog).getBoundingClientRect();
|
|
208
|
-
|
|
209
|
-
let leftOffset = 0;
|
|
210
|
-
let topOffset = 0;
|
|
211
|
-
const orient = this.orientation;
|
|
212
|
-
const shouldExpandWidthToTarget = getCssVar(this, '--sinch-popover-expand-width') !== null;
|
|
213
|
-
const largestWidth = Math.max(modalRect.width, targetRect.width);
|
|
214
|
-
const widthDiff = shouldExpandWidthToTarget ? Math.max(largestWidth - modalRect.width, 0) * 0.5 : 0;
|
|
215
|
-
const resultWidth = shouldExpandWidthToTarget ? largestWidth : modalRect.width;
|
|
216
|
-
|
|
217
|
-
if (orient === 'bottom-right' || orient === 'top-right') {
|
|
218
|
-
leftOffset = Math.min(modalRect.x, Math.max(-modalRect.x, targetRect.x - modalRect.x) + widthDiff);
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
if (orient === 'bottom-left' || orient === 'top-left') {
|
|
222
|
-
leftOffset = Math.min(modalRect.x, Math.max(-modalRect.x, targetRect.x + targetRect.width - modalRect.x - modalRect.width) - widthDiff);
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
if (orient === 'bottom-left' || orient === 'bottom-right') {
|
|
226
|
-
topOffset = Math.min(modalRect.y, Math.max(-modalRect.y, targetRect.y + targetRect.height - modalRect.y + POPOVER_VERTICAL_OFFSET));
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
if (orient === 'top-left' || orient === 'top-right') {
|
|
230
|
-
topOffset = Math.min(modalRect.y, Math.max(-modalRect.y, targetRect.y - modalRect.y - modalRect.height - POPOVER_VERTICAL_OFFSET));
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
_classPrivateFieldGet(this, _$dialog).style.transform = `translate(${leftOffset}px, ${topOffset}px)`;
|
|
234
|
-
_classPrivateFieldGet(this, _$dialog).style.width = `${resultWidth}px`;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
266
|
function _dispatchCloseEvent2() {
|
|
238
267
|
this.dispatchEvent(new CustomEvent('close', {
|
|
239
268
|
bubbles: true
|
package/popover/types.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { TRect, TSinchElementReact } from '../types';
|
|
2
|
-
import type { orientationValues } from './utils';
|
|
3
2
|
import type { SyntheticEvent } from 'react';
|
|
4
|
-
export declare type TSinchPopoverOrientation =
|
|
3
|
+
export declare type TSinchPopoverOrientation = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
5
4
|
export declare type TSinchPopoverElement = HTMLElement & {
|
|
6
5
|
open: boolean;
|
|
7
6
|
orientation: TSinchPopoverOrientation;
|
package/popover/utils.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import type { TSinchPopoverOrientation } from './types';
|
|
2
|
+
export declare const orientationValues: readonly TSinchPopoverOrientation[];
|
package/search/index.js
CHANGED
|
@@ -12,7 +12,7 @@ function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollect
|
|
|
12
12
|
function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
|
|
13
13
|
|
|
14
14
|
import { attrValueToPixels, defineCustomElement, getAttribute, getBooleanAttribute, getIntegerAttribute, getRect, NectaryElement, updateAttribute, updateBooleanAttribute, updateIntegerAttribute } from '../utils';
|
|
15
|
-
const templateHTML = '<style>:host{display:inline-block;vertical-align:middle;outline:0}#wrapper{position:relative;width:100%;box-sizing:border-box;--sinch-size-icon:24px}#label{display:none;font:var(--sinch-font-title-s);color:var(--sinch-color-text-default);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%;height:24px;margin-bottom:2px}#input{all:initial;display:block;border:1px solid var(--sinch-color-stormy-200);box-sizing:border-box;border-radius:
|
|
15
|
+
const templateHTML = '<style>:host{display:inline-block;vertical-align:middle;outline:0}#wrapper{position:relative;width:100%;box-sizing:border-box;--sinch-size-icon:24px}#label{display:none;font:var(--sinch-font-title-s);color:var(--sinch-color-text-default);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%;height:24px;margin-bottom:2px}#input{all:initial;display:block;border:1px solid var(--sinch-color-stormy-200);box-sizing:border-box;border-radius:var(--sinch-shape-radius-s);width:100%;height:48px;padding:0 44px;padding-right: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:focus{border-color:var(--sinch-color-stormy-600)}#icon-search{position:absolute;left:12px;top:12px;pointer-events:none;--sinch-color-icon:var(--sinch-color-stormy-500)}#clear{position:absolute;right:8px;top:8px;display:none;--sinch-color-icon:red}#clear:focus{--sinch-color-icon:var(--sinch-color-stormy-500)}:host([value]:not([value=""])) #clear{display:flex}:host([value]:not([value=""])) #input{padding-right:44px}#listbox{display:none;position:absolute;z-index:1;left:0;top:calc(100% + 8px);width:100%;box-sizing:border-box;font:var(--sinch-font-body);color:var(--sinch-color-text-default);background-color:var(--sinch-color-snow-100);box-shadow:var(--sinch-elevation-level-2);overflow-y:auto}:host([aria-expanded=true]) #listbox{display:block}:host([label]:not([label=""])) #label{display:block}</style><label id="label" for="input"></label><div id="wrapper"><input id="input" type="text"/><sinch-icon-search id="icon-search"></sinch-icon-search><sinch-icon-button id="clear" small><sinch-icon-close id="icon-close" slot="icon"></sinch-icon-close></sinch-icon-button><div id="listbox"><slot name="option"></slot></div></div>';
|
|
16
16
|
import '../icons/search';
|
|
17
17
|
import '../icons/close';
|
|
18
18
|
import '../icon-button';
|
package/segment/index.d.ts
CHANGED