@nectary/components 4.10.4 → 4.11.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/index.d.ts +13 -0
- package/accordion/index.js +7 -2
- package/accordion-item/index.d.ts +23 -1
- package/accordion-item/index.js +3 -2
- package/action-menu/index.d.ts +12 -0
- package/action-menu/index.js +3 -2
- package/action-menu-option/index.d.ts +14 -0
- package/action-menu-option/index.js +3 -2
- package/alert/index.d.ts +14 -1
- package/alert/index.js +3 -2
- package/avatar/index.d.ts +21 -1
- package/avatar/index.js +3 -2
- package/badge/index.d.ts +21 -2
- package/badge/index.js +3 -2
- package/button/index.d.ts +25 -1
- package/button/index.js +3 -2
- package/button-group/index.d.ts +14 -0
- package/button-group/index.js +3 -2
- package/button-group-item/index.d.ts +15 -0
- package/button-group-item/index.js +3 -2
- package/card/index.d.ts +17 -1
- package/card/index.js +3 -2
- package/card-container/index.d.ts +4 -0
- package/card-container/index.js +3 -2
- package/card-v2/index.d.ts +15 -0
- package/card-v2/index.js +3 -2
- package/card-v2-title/index.d.ts +15 -1
- package/card-v2-title/index.js +3 -2
- package/checkbox/index.d.ts +28 -0
- package/checkbox/index.js +3 -2
- package/chip/index.d.ts +16 -0
- package/chip/index.js +3 -2
- package/code-tag/index.d.ts +9 -0
- package/code-tag/index.js +3 -2
- package/color-menu/index.d.ts +20 -1
- package/color-menu/index.js +3 -2
- package/color-menu-option/index.d.ts +11 -0
- package/color-menu-option/index.js +3 -2
- package/color-swatch/index.d.ts +11 -0
- package/color-swatch/index.js +3 -2
- package/date-picker/index.d.ts +35 -1
- package/date-picker/index.js +3 -2
- package/dialog/index.d.ts +15 -0
- package/dialog/index.js +3 -2
- package/emoji/index.d.ts +11 -0
- package/emoji/index.js +3 -2
- package/emoji-picker/index.d.ts +15 -1
- package/emoji-picker/index.js +3 -2
- package/field/index.d.ts +21 -0
- package/field/index.js +3 -2
- package/file-drop/index.d.ts +23 -0
- package/file-drop/index.js +3 -2
- package/file-picker/index.d.ts +15 -0
- package/file-picker/index.js +3 -2
- package/file-status/index.d.ts +14 -1
- package/file-status/index.js +3 -2
- package/flag/index.d.ts +11 -0
- package/flag/index.js +3 -2
- package/grid/index.d.ts +4 -0
- package/grid/index.js +3 -2
- package/grid-item/index.d.ts +12 -0
- package/grid-item/index.js +3 -2
- package/help-tooltip/index.d.ts +17 -0
- package/help-tooltip/index.js +3 -2
- package/horizontal-stepper/index.d.ts +11 -0
- package/horizontal-stepper/index.js +3 -2
- package/horizontal-stepper-item/index.d.ts +14 -1
- package/horizontal-stepper-item/index.js +3 -2
- package/icon/index.d.ts +12 -0
- package/icon/index.js +3 -2
- package/inline-alert/index.d.ts +16 -1
- package/inline-alert/index.js +3 -2
- package/input/index.d.ts +45 -1
- package/input/index.js +3 -2
- package/link/index.d.ts +26 -0
- package/link/index.js +3 -2
- package/list/index.d.ts +5 -0
- package/list/index.js +3 -2
- package/list-item/index.d.ts +5 -0
- package/list-item/index.js +3 -2
- package/package.json +2 -2
- package/pagination/index.d.ts +20 -1
- package/pagination/index.js +3 -2
- package/persistent-overlay/index.d.ts +13 -0
- package/persistent-overlay/index.js +3 -2
- package/pop/index.d.ts +21 -2
- package/pop/index.js +3 -2
- package/popover/index.d.ts +20 -1
- package/popover/index.js +3 -2
- package/progress/index.d.ts +12 -0
- package/progress/index.js +3 -2
- package/progress-stepper/index.d.ts +15 -1
- package/progress-stepper/index.js +3 -2
- package/progress-stepper-item/index.d.ts +16 -0
- package/progress-stepper-item/index.js +3 -2
- package/radio/index.d.ts +19 -0
- package/radio/index.js +3 -2
- package/radio-option/index.d.ts +18 -0
- package/radio-option/index.js +3 -2
- package/rich-text/index.d.ts +14 -0
- package/rich-text/index.js +3 -2
- package/rich-textarea/index.d.ts +28 -0
- package/rich-textarea/index.js +3 -2
- package/segment/index.d.ts +18 -1
- package/segment/index.js +3 -2
- package/segment-collapse/index.d.ts +14 -0
- package/segment-collapse/index.js +3 -2
- package/segmented-control/index.d.ts +11 -0
- package/segmented-control/index.js +3 -2
- package/segmented-control-option/index.d.ts +16 -0
- package/segmented-control-option/index.js +3 -2
- package/segmented-icon-control/index.d.ts +13 -0
- package/segmented-icon-control/index.js +3 -2
- package/segmented-icon-control-option/index.d.ts +14 -0
- package/segmented-icon-control-option/index.js +3 -2
- package/select-button/index.d.ts +21 -0
- package/select-button/index.js +3 -2
- package/select-menu/index.d.ts +30 -0
- package/select-menu/index.js +3 -2
- package/skeleton/index.d.ts +9 -0
- package/skeleton/index.js +3 -2
- package/skeleton-item/index.d.ts +4 -0
- package/skeleton-item/index.js +3 -2
- package/spinner/index.d.ts +12 -0
- package/spinner/index.js +3 -2
- package/stop-events/index.d.ts +6 -1
- package/stop-events/index.js +3 -2
- package/table/index.d.ts +5 -0
- package/table/index.js +3 -2
- package/table-body/index.d.ts +5 -0
- package/table-body/index.js +3 -2
- package/table-cell/index.d.ts +8 -1
- package/table-cell/index.js +3 -2
- package/table-head/index.d.ts +5 -0
- package/table-head/index.js +3 -2
- package/table-head-cell/index.d.ts +15 -0
- package/table-head-cell/index.js +3 -2
- package/table-row/index.d.ts +11 -0
- package/table-row/index.js +3 -2
- package/tabs/index.d.ts +13 -1
- package/tabs/index.js +3 -2
- package/tabs-icon-option/index.d.ts +16 -0
- package/tabs-icon-option/index.js +3 -2
- package/tabs-option/index.d.ts +18 -0
- package/tabs-option/index.js +3 -2
- package/tag/index.d.ts +15 -0
- package/tag/index.js +3 -2
- package/text/index.d.ts +17 -1
- package/text/index.js +3 -2
- package/textarea/index.d.ts +38 -0
- package/textarea/index.js +3 -2
- package/tile-control/index.d.ts +17 -0
- package/tile-control/index.js +3 -2
- package/tile-control-option/index.d.ts +18 -0
- package/tile-control-option/index.js +3 -2
- package/time-picker/index.d.ts +21 -1
- package/time-picker/index.js +3 -2
- package/title/index.d.ts +15 -1
- package/title/index.js +3 -2
- package/toast/index.d.ts +16 -1
- package/toast/index.js +3 -2
- package/toast-manager/index.d.ts +14 -2
- package/toast-manager/index.js +3 -2
- package/toggle/index.d.ts +20 -0
- package/toggle/index.js +3 -2
- package/tooltip/index.d.ts +21 -2
- package/tooltip/index.js +3 -2
- package/vertical-stepper/index.d.ts +11 -0
- package/vertical-stepper/index.js +3 -2
- package/vertical-stepper-item/index.d.ts +14 -1
- package/vertical-stepper-item/index.js +3 -2
package/checkbox/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import { setFormValue } from '../utils/form';
|
|
|
4
4
|
const templateHTML = '<style>:host{display:inline-block;vertical-align:middle;outline:0}#wrapper{display:flex;flex-direction:row;box-sizing:border-box;width:100%;min-height:24px;--sinch-local-color-background:var(--sinch-comp-checkbox-color-default-background-initial);--sinch-local-color-background-hover:var(--sinch-comp-checkbox-color-default-background-hover);--sinch-local-color-background-active:var(--sinch-comp-checkbox-color-default-background-active);--sinch-local-color-border:var(--sinch-comp-checkbox-color-default-border-initial);--sinch-local-color-border-hover:var(--sinch-comp-checkbox-color-default-border-hover);--sinch-local-color-border-active:var(--sinch-comp-checkbox-color-default-border-active);--sinch-local-color-text:var(--sinch-comp-checkbox-color-default-text-initial)}:host([invalid])>#wrapper{--sinch-local-color-background:var(--sinch-comp-checkbox-color-invalid-background-initial);--sinch-local-color-background-hover:var(--sinch-comp-checkbox-color-invalid-background-hover);--sinch-local-color-background-active:var(--sinch-comp-checkbox-color-invalid-background-active);--sinch-local-color-border:var(--sinch-comp-checkbox-color-invalid-border-initial);--sinch-local-color-border-hover:var(--sinch-comp-checkbox-color-invalid-border-hover);--sinch-local-color-border-active:var(--sinch-comp-checkbox-color-invalid-border-active);--sinch-local-color-text:var(--sinch-comp-checkbox-color-invalid-text-initial)}:host([checked])>#wrapper{--sinch-local-color-background:var(--sinch-comp-checkbox-color-checked-background-initial);--sinch-local-color-background-hover:var(--sinch-comp-checkbox-color-checked-background-hover);--sinch-local-color-background-active:var(--sinch-comp-checkbox-color-checked-background-active);--sinch-local-color-border:var(--sinch-comp-checkbox-color-checked-border-initial);--sinch-local-color-border-hover:var(--sinch-comp-checkbox-color-checked-border-hover);--sinch-local-color-border-active:var(--sinch-comp-checkbox-color-checked-border-active)}:host([disabled])>#wrapper{--sinch-local-color-background:var(--sinch-comp-checkbox-color-disabled-background-initial);--sinch-local-color-border:var(--sinch-comp-checkbox-color-disabled-border-initial);--sinch-local-color-text:var(--sinch-comp-checkbox-color-disabled-text-initial)}:host([disabled][checked])>#wrapper{--sinch-local-color-background:var(--sinch-comp-checkbox-color-checked-disabled-background-initial);--sinch-local-color-border:var(--sinch-comp-checkbox-color-checked-disabled-border-initial)}#checkbox{width:18px;height:18px;cursor:pointer}:host([disabled]) #checkbox{cursor:initial}#icon-container{position:relative;width:18px;height:18px;align-self:flex-start;margin-top:3px}#checkbox::before{content:"";position:absolute;inset:-3px;border:2px solid var(--sinch-comp-checkbox-color-default-outline-focus);border-radius:calc(var(--sinch-comp-checkbox-shape-radius) + 3px);transition:opacity .1s linear;opacity:0;box-sizing:border-box;pointer-events:none}:host(:focus-visible) #checkbox::before{opacity:1}#checkbox::after{content:"";position:absolute;width:18px;height:18px;inset:0;margin:auto;background-color:var(--sinch-local-color-background);border:1px solid var(--sinch-local-color-border);border-radius:var(--sinch-comp-checkbox-shape-radius);transition:background-color .1s linear;box-sizing:border-box;pointer-events:none}:host(:hover:not([disabled])) #checkbox::after{background-color:var(--sinch-local-color-background-hover);border-color:var(--sinch-local-color-border-hover)}:host(:active:not([disabled])) #checkbox::after{background-color:var(--sinch-local-color-background-active);border-color:var(--sinch-local-color-border-active)}#icon-checkmark,#icon-indeterminate{position:absolute;left:1px;top:1px;width:16px;height:16px;transition:opacity .1s linear;opacity:0;pointer-events:none;fill:var(--sinch-sys-color-surface-primary-default)}:host(:not([indeterminate])[checked]) #icon-checkmark{opacity:1}:host([indeterminate][checked]) #icon-indeterminate{opacity:1}@media (prefers-reduced-motion){#checkbox::after,#checkbox::before,#icon-checkmark,#icon-indeterminate{transition:none}}#label{flex:1;align-self:center;padding-left:8px;font:var(--sinch-comp-checkbox-font-label);cursor:pointer;--sinch-global-color-text:var(--sinch-local-color-text)}:host(:not([text])) #label,:host([text=""]) #label{display:none}:host([disabled]) #label{cursor:initial}</style><div id="wrapper"><div id="icon-container"><div id="checkbox"></div><svg id="icon-checkmark" viewBox="0 0 24 24" aria-hidden="true"><path d="M9 16.17 5.53 12.7a.996.996 0 1 0-1.41 1.41l4.18 4.18c.39.39 1.02.39 1.41 0L20.29 7.71a.996.996 0 1 0-1.41-1.41L9 16.17Z"/></svg><svg id="icon-indeterminate" viewBox="0 0 24 24" aria-hidden="true"><path d="M18 13H6c-.55 0-1-.45-1-1s.45-1 1-1h12c.55 0 1 .45 1 1s-.45 1-1 1Z"/></svg></div><sinch-rich-text id="label"></sinch-rich-text></div>';
|
|
5
5
|
const template = document.createElement('template');
|
|
6
6
|
template.innerHTML = templateHTML;
|
|
7
|
-
|
|
7
|
+
export class Checkbox extends NectaryElement {
|
|
8
8
|
#$label;
|
|
9
9
|
#controller = null;
|
|
10
10
|
#internals;
|
|
@@ -164,4 +164,5 @@ defineCustomElement('sinch-checkbox', class extends NectaryElement {
|
|
|
164
164
|
#onBlurReactHandler = e => {
|
|
165
165
|
getReactEventHandler(this, 'on-blur')?.(e);
|
|
166
166
|
};
|
|
167
|
-
}
|
|
167
|
+
}
|
|
168
|
+
defineCustomElement('sinch-checkbox', Checkbox);
|
package/chip/index.d.ts
CHANGED
|
@@ -1,7 +1,23 @@
|
|
|
1
1
|
import '../text';
|
|
2
2
|
import '../icon';
|
|
3
|
+
import { NectaryElement } from '../utils';
|
|
3
4
|
import type { TSinchChip } from './types';
|
|
4
5
|
import type { NectaryComponentVanilla, NectaryComponentReact } from '../types';
|
|
6
|
+
export declare class Chip extends NectaryElement {
|
|
7
|
+
#private;
|
|
8
|
+
constructor();
|
|
9
|
+
connectedCallback(): void;
|
|
10
|
+
disconnectedCallback(): void;
|
|
11
|
+
static get observedAttributes(): string[];
|
|
12
|
+
attributeChangedCallback(name: string, oldVal: string | null, newVal: string | null): void;
|
|
13
|
+
get color(): string | null;
|
|
14
|
+
set color(value: string | null);
|
|
15
|
+
get text(): string;
|
|
16
|
+
set text(value: string);
|
|
17
|
+
get small(): boolean;
|
|
18
|
+
set small(isSmall: boolean);
|
|
19
|
+
get focusable(): boolean;
|
|
20
|
+
}
|
|
5
21
|
declare global {
|
|
6
22
|
interface NectaryComponentMap {
|
|
7
23
|
'sinch-chip': TSinchChip;
|
package/chip/index.js
CHANGED
|
@@ -5,7 +5,7 @@ const templateHTML = '<style>:host{display:inline-block;vertical-align:middle;ou
|
|
|
5
5
|
import { getChipColorBg, getChipColorFg } from './utils';
|
|
6
6
|
const template = document.createElement('template');
|
|
7
7
|
template.innerHTML = templateHTML;
|
|
8
|
-
|
|
8
|
+
export class Chip extends NectaryElement {
|
|
9
9
|
#$text;
|
|
10
10
|
#$button;
|
|
11
11
|
#controller = null;
|
|
@@ -141,4 +141,5 @@ defineCustomElement('sinch-chip', class extends NectaryElement {
|
|
|
141
141
|
#onClickReactHandler = e => {
|
|
142
142
|
getReactEventHandler(this, 'on-click')?.(e);
|
|
143
143
|
};
|
|
144
|
-
}
|
|
144
|
+
}
|
|
145
|
+
defineCustomElement('sinch-chip', Chip);
|
package/code-tag/index.d.ts
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
|
+
import { NectaryElement } from '../utils';
|
|
1
2
|
import type { TSinchCodeTag } from './types';
|
|
2
3
|
import type { NectaryComponentVanilla, NectaryComponentReact } from '../types';
|
|
4
|
+
export declare class CodeTag extends NectaryElement {
|
|
5
|
+
#private;
|
|
6
|
+
constructor();
|
|
7
|
+
static get observedAttributes(): string[];
|
|
8
|
+
attributeChangedCallback(name: string, oldVal: string | null, newVal: string | null): void;
|
|
9
|
+
get text(): string;
|
|
10
|
+
set text(value: string);
|
|
11
|
+
}
|
|
3
12
|
declare global {
|
|
4
13
|
interface NectaryComponentMap {
|
|
5
14
|
'sinch-code-tag': TSinchCodeTag;
|
package/code-tag/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { defineCustomElement, getAttribute, updateAttribute, NectaryElement } fr
|
|
|
2
2
|
const templateHTML = '<style>:host{display:inline}#content{font:var(--sinch-comp-code-tag-font-text);font-size:inherit;line-height:inherit;color:var(--sinch-comp-code-tag-color-default-text-initial);border:1px solid var(--sinch-comp-code-tag-color-default-border-initial);background-color:var(--sinch-comp-code-tag-color-default-background-initial);padding:0 .25em;border-radius:var(--sinch-comp-code-tag-shape-radius);white-space:var(--sinch-global-text-white-space,normal)}</style><span id="content"></span>';
|
|
3
3
|
const template = document.createElement('template');
|
|
4
4
|
template.innerHTML = templateHTML;
|
|
5
|
-
|
|
5
|
+
export class CodeTag extends NectaryElement {
|
|
6
6
|
#$text;
|
|
7
7
|
constructor() {
|
|
8
8
|
super();
|
|
@@ -28,4 +28,5 @@ defineCustomElement('sinch-code-tag', class extends NectaryElement {
|
|
|
28
28
|
set text(value) {
|
|
29
29
|
updateAttribute(this, 'text', value);
|
|
30
30
|
}
|
|
31
|
-
}
|
|
31
|
+
}
|
|
32
|
+
defineCustomElement('sinch-code-tag', CodeTag);
|
package/color-menu/index.d.ts
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
|
+
import { NectaryElement } from '../utils';
|
|
1
2
|
import type { TSinchColorMenu } from './types';
|
|
2
|
-
import type { NectaryComponentReact, NectaryComponentVanilla } from '../types';
|
|
3
|
+
import type { NectaryComponentReact, NectaryComponentVanilla, TRect } from '../types';
|
|
4
|
+
export declare class ColorMenu extends NectaryElement {
|
|
5
|
+
#private;
|
|
6
|
+
constructor();
|
|
7
|
+
connectedCallback(): void;
|
|
8
|
+
disconnectedCallback(): void;
|
|
9
|
+
static get observedAttributes(): string[];
|
|
10
|
+
attributeChangedCallback(name: string): void;
|
|
11
|
+
set value(value: string);
|
|
12
|
+
get value(): string;
|
|
13
|
+
set colors(value: string | null);
|
|
14
|
+
get colors(): string | null;
|
|
15
|
+
set rows(value: number | null);
|
|
16
|
+
get rows(): number | null;
|
|
17
|
+
set cols(value: number | null);
|
|
18
|
+
get cols(): number | null;
|
|
19
|
+
get focusable(): boolean;
|
|
20
|
+
nthItemRect(index: number): TRect | null;
|
|
21
|
+
}
|
|
3
22
|
declare global {
|
|
4
23
|
interface NectaryComponentMap {
|
|
5
24
|
'sinch-color-menu': TSinchColorMenu;
|
package/color-menu/index.js
CHANGED
|
@@ -5,7 +5,7 @@ const ITEM_WIDTH = 44;
|
|
|
5
5
|
const ITEM_HEIGHT = 56;
|
|
6
6
|
const template = document.createElement('template');
|
|
7
7
|
template.innerHTML = templateHTML;
|
|
8
|
-
|
|
8
|
+
export class ColorMenu extends NectaryElement {
|
|
9
9
|
#$listbox;
|
|
10
10
|
#$optionsSlot;
|
|
11
11
|
#controller = null;
|
|
@@ -305,4 +305,5 @@ defineCustomElement('sinch-color-menu', class extends NectaryElement {
|
|
|
305
305
|
#onChangeReactHandler = e => {
|
|
306
306
|
getReactEventHandler(this, 'on-change')?.(e);
|
|
307
307
|
};
|
|
308
|
-
}
|
|
308
|
+
}
|
|
309
|
+
defineCustomElement('sinch-color-menu', ColorMenu);
|
|
@@ -1,7 +1,18 @@
|
|
|
1
1
|
import '../color-swatch';
|
|
2
2
|
import '../tooltip';
|
|
3
|
+
import { NectaryElement } from '../utils';
|
|
3
4
|
import type { TSinchColorMenuOption } from './types';
|
|
4
5
|
import type { NectaryComponentReact, NectaryComponentVanilla } from '../types';
|
|
6
|
+
export declare class ColorMenuOption extends NectaryElement {
|
|
7
|
+
#private;
|
|
8
|
+
constructor();
|
|
9
|
+
connectedCallback(): void;
|
|
10
|
+
disconnectedCallback(): void;
|
|
11
|
+
static get observedAttributes(): string[];
|
|
12
|
+
attributeChangedCallback(name: string, _: string | null, newVal: string | null): void;
|
|
13
|
+
set value(value: string);
|
|
14
|
+
get value(): string;
|
|
15
|
+
}
|
|
5
16
|
declare global {
|
|
6
17
|
interface NectaryComponentMap {
|
|
7
18
|
'sinch-color-menu-option': TSinchColorMenuOption;
|
|
@@ -5,7 +5,7 @@ import { defineCustomElement, getAttribute, NectaryElement, updateAttribute } fr
|
|
|
5
5
|
const templateHTML = '<style>:host{display:block;outline:0}#wrapper{width:44px;height:56px;padding:12px 6px;box-sizing:border-box}#swatch-wrapper{position:relative;cursor:pointer;width:32px;height:32px}#swatch-wrapper::after{content:"";position:absolute;width:34px;height:34px;inset:-3px;border:2px solid var(--sinch-comp-color-menu-option-color-default-border-initial);border-radius:50%;pointer-events:none}:host([data-checked]) #swatch-wrapper::after{border-color:var(--sinch-comp-color-menu-option-color-default-border-selected)}:host([data-selected]) #swatch-wrapper::after{border-color:var(--sinch-comp-color-menu-option-color-default-border-focus)}:host(:hover) #swatch-wrapper::after{border-color:var(--sinch-comp-color-menu-option-color-default-border-hover)}:host(:active) #swatch-wrapper::after{border-color:var(--sinch-comp-color-menu-option-color-default-border-active)}</style><div id="wrapper"><sinch-tooltip id="tooltip"><div id="swatch-wrapper"><sinch-color-swatch id="swatch"></sinch-color-swatch></div></sinch-tooltip></div>';
|
|
6
6
|
const template = document.createElement('template');
|
|
7
7
|
template.innerHTML = templateHTML;
|
|
8
|
-
|
|
8
|
+
export class ColorMenuOption extends NectaryElement {
|
|
9
9
|
#$wrapper;
|
|
10
10
|
#$tooltip;
|
|
11
11
|
#$swatch;
|
|
@@ -45,4 +45,5 @@ defineCustomElement('sinch-color-menu-option', class extends NectaryElement {
|
|
|
45
45
|
get value() {
|
|
46
46
|
return getAttribute(this, 'value', '');
|
|
47
47
|
}
|
|
48
|
-
}
|
|
48
|
+
}
|
|
49
|
+
defineCustomElement('sinch-color-menu-option', ColorMenuOption);
|
package/color-swatch/index.d.ts
CHANGED
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
import '../text';
|
|
2
|
+
import { NectaryElement } from '../utils';
|
|
2
3
|
import type { TSinchColorSwatch } from './types';
|
|
3
4
|
import type { NectaryComponentReact, NectaryComponentVanilla } from '../types';
|
|
5
|
+
export declare class ColorSwatch extends NectaryElement {
|
|
6
|
+
#private;
|
|
7
|
+
constructor();
|
|
8
|
+
connectedCallback(): void;
|
|
9
|
+
disconnectedCallback(): void;
|
|
10
|
+
static get observedAttributes(): string[];
|
|
11
|
+
attributeChangedCallback(name: string): void;
|
|
12
|
+
get name(): string | null;
|
|
13
|
+
set name(value: string | null);
|
|
14
|
+
}
|
|
4
15
|
declare global {
|
|
5
16
|
interface NectaryComponentMap {
|
|
6
17
|
'sinch-color-swatch': TSinchColorSwatch;
|
package/color-swatch/index.js
CHANGED
|
@@ -4,7 +4,7 @@ const templateHTML = '<style>:host{display:inline-block;vertical-align:middle}#w
|
|
|
4
4
|
import { getSwatchColorBg } from './utils';
|
|
5
5
|
const template = document.createElement('template');
|
|
6
6
|
template.innerHTML = templateHTML;
|
|
7
|
-
|
|
7
|
+
export class ColorSwatch extends NectaryElement {
|
|
8
8
|
#$wrapper;
|
|
9
9
|
constructor() {
|
|
10
10
|
super();
|
|
@@ -51,4 +51,5 @@ defineCustomElement('sinch-color-swatch', class extends NectaryElement {
|
|
|
51
51
|
setClass(this.#$wrapper, 'no-color', true);
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
}
|
|
54
|
+
}
|
|
55
|
+
defineCustomElement('sinch-color-swatch', ColorSwatch);
|
package/date-picker/index.d.ts
CHANGED
|
@@ -1,7 +1,41 @@
|
|
|
1
1
|
import '../icon';
|
|
2
2
|
import '../text';
|
|
3
|
+
import { NectaryElement } from '../utils';
|
|
3
4
|
import type { TSinchDatePicker } from './types';
|
|
4
|
-
import type { NectaryComponentReact, NectaryComponentVanilla } from '../types';
|
|
5
|
+
import type { NectaryComponentReact, NectaryComponentVanilla, TRect } from '../types';
|
|
6
|
+
export declare class DatePicker extends NectaryElement {
|
|
7
|
+
#private;
|
|
8
|
+
static formAssociated: boolean;
|
|
9
|
+
constructor();
|
|
10
|
+
connectedCallback(): void;
|
|
11
|
+
disconnectedCallback(): void;
|
|
12
|
+
formAssociatedCallback(): void;
|
|
13
|
+
formResetCallback(): void;
|
|
14
|
+
formStateRestoreCallback(state: string | FormData | null): void;
|
|
15
|
+
static get observedAttributes(): string[];
|
|
16
|
+
attributeChangedCallback(name: string, prevValue: string | null, newVal: string | null): void;
|
|
17
|
+
set name(value: string);
|
|
18
|
+
get name(): string;
|
|
19
|
+
set locale(value: string);
|
|
20
|
+
get locale(): string;
|
|
21
|
+
set value(value: string);
|
|
22
|
+
get value(): string;
|
|
23
|
+
set min(value: string);
|
|
24
|
+
get min(): string;
|
|
25
|
+
set max(value: string);
|
|
26
|
+
get max(): string;
|
|
27
|
+
set range(isRanged: boolean);
|
|
28
|
+
get range(): boolean;
|
|
29
|
+
set prevMonthAriaLabel(value: string);
|
|
30
|
+
get prevMonthAriaLabel(): string;
|
|
31
|
+
set nextMonthAriaLabel(value: string);
|
|
32
|
+
get nextMonthAriaLabel(): string;
|
|
33
|
+
get prevYearButtonRect(): TRect;
|
|
34
|
+
get nextYearButtonRect(): TRect;
|
|
35
|
+
get prevMonthButtonRect(): TRect;
|
|
36
|
+
get nextMonthButtonRect(): TRect;
|
|
37
|
+
nthButtonRect(index: number): TRect | null;
|
|
38
|
+
}
|
|
5
39
|
declare global {
|
|
6
40
|
interface NectaryComponentMap {
|
|
7
41
|
'sinch-date-picker': TSinchDatePicker;
|
package/date-picker/index.js
CHANGED
|
@@ -6,7 +6,7 @@ const templateHTML = '<style>:host{display:block;outline:0}#content{width:fit-co
|
|
|
6
6
|
import { areDatesEqual, canGoNextMonth, canGoNextYear, canGoPrevMonth, canGoPrevYear, clampMaxDate, clampMinDate, cloneDate, dateToIso, decMonth, decYear, getCalendarMonth, getDayNames, getMonthNames, incMonth, incYear, isDateBetween, isDateOnScreen, isoToDate, isValidDate, sortDates, today } from './utils';
|
|
7
7
|
const template = document.createElement('template');
|
|
8
8
|
template.innerHTML = templateHTML;
|
|
9
|
-
|
|
9
|
+
export class DatePicker extends NectaryElement {
|
|
10
10
|
#$month;
|
|
11
11
|
#$weeks;
|
|
12
12
|
#$days;
|
|
@@ -407,4 +407,5 @@ defineCustomElement('sinch-date-picker', class extends NectaryElement {
|
|
|
407
407
|
#onChangeReactHandler = e => {
|
|
408
408
|
getReactEventHandler(this, 'on-change')?.(e);
|
|
409
409
|
};
|
|
410
|
-
}
|
|
410
|
+
}
|
|
411
|
+
defineCustomElement('sinch-date-picker', DatePicker);
|
package/dialog/index.d.ts
CHANGED
|
@@ -1,8 +1,23 @@
|
|
|
1
1
|
import '../icon';
|
|
2
2
|
import '../stop-events';
|
|
3
3
|
import '../title';
|
|
4
|
+
import { NectaryElement } from '../utils';
|
|
4
5
|
import type { TSinchDialog } from './types';
|
|
5
6
|
import type { NectaryComponentReact, NectaryComponentVanilla } from '../types';
|
|
7
|
+
export declare class Dialog extends NectaryElement {
|
|
8
|
+
#private;
|
|
9
|
+
constructor();
|
|
10
|
+
connectedCallback(): void;
|
|
11
|
+
disconnectedCallback(): void;
|
|
12
|
+
static get observedAttributes(): string[];
|
|
13
|
+
attributeChangedCallback(name: string, oldVal: string | null, newVal: string | null): void;
|
|
14
|
+
set caption(caption: string);
|
|
15
|
+
get caption(): string;
|
|
16
|
+
set open(isOpen: boolean);
|
|
17
|
+
get open(): boolean;
|
|
18
|
+
get dialogRect(): import("../types").TRect;
|
|
19
|
+
get closeButtonRect(): import("../types").TRect;
|
|
20
|
+
}
|
|
6
21
|
declare global {
|
|
7
22
|
interface NectaryComponentMap {
|
|
8
23
|
'sinch-dialog': TSinchDialog;
|
package/dialog/index.js
CHANGED
|
@@ -6,7 +6,7 @@ const templateHTML = '<style>:host{display:contents;--sinch-comp-dialog-max-widt
|
|
|
6
6
|
import { disableScroll, enableScroll } from './utils';
|
|
7
7
|
const template = document.createElement('template');
|
|
8
8
|
template.innerHTML = templateHTML;
|
|
9
|
-
|
|
9
|
+
export class Dialog extends NectaryElement {
|
|
10
10
|
#$dialog;
|
|
11
11
|
#$closeButton;
|
|
12
12
|
#$caption;
|
|
@@ -145,4 +145,5 @@ defineCustomElement('sinch-dialog', class extends NectaryElement {
|
|
|
145
145
|
#onActionSlotChange = () => {
|
|
146
146
|
setClass(this.#$actionWrapper, 'empty', this.#$actionSlot.assignedElements().length === 0);
|
|
147
147
|
};
|
|
148
|
-
}
|
|
148
|
+
}
|
|
149
|
+
defineCustomElement('sinch-dialog', Dialog);
|
package/emoji/index.d.ts
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
|
+
import { NectaryElement } from '../utils';
|
|
1
2
|
import type { TSinchEmoji } from './types';
|
|
2
3
|
import type { NectaryComponentReact, NectaryComponentVanilla } from '../types';
|
|
4
|
+
export declare class Emoji extends NectaryElement {
|
|
5
|
+
#private;
|
|
6
|
+
constructor();
|
|
7
|
+
connectedCallback(): void;
|
|
8
|
+
disconnectedCallback(): void;
|
|
9
|
+
static get observedAttributes(): string[];
|
|
10
|
+
attributeChangedCallback(name: string, _: string | null, newVal: string | null): void;
|
|
11
|
+
set char(value: string);
|
|
12
|
+
get char(): string;
|
|
13
|
+
}
|
|
3
14
|
declare global {
|
|
4
15
|
interface NectaryComponentMap {
|
|
5
16
|
'sinch-emoji': TSinchEmoji;
|
package/emoji/index.js
CHANGED
|
@@ -3,7 +3,7 @@ const templateHTML = '<style>:host{display:contents;--sinch-comp-emoji-vertical-
|
|
|
3
3
|
import { getEmojiBaseUrl, getEmojiUrl } from './utils';
|
|
4
4
|
const template = document.createElement('template');
|
|
5
5
|
template.innerHTML = templateHTML;
|
|
6
|
-
|
|
6
|
+
export class Emoji extends NectaryElement {
|
|
7
7
|
#$img;
|
|
8
8
|
constructor() {
|
|
9
9
|
super();
|
|
@@ -43,4 +43,5 @@ defineCustomElement('sinch-emoji', class extends NectaryElement {
|
|
|
43
43
|
}
|
|
44
44
|
this.#$img.src = getEmojiUrl(getEmojiBaseUrl(this), this.char);
|
|
45
45
|
}
|
|
46
|
-
}
|
|
46
|
+
}
|
|
47
|
+
defineCustomElement('sinch-emoji', Emoji);
|
package/emoji-picker/index.d.ts
CHANGED
|
@@ -8,8 +8,22 @@ import '../tabs-icon-option';
|
|
|
8
8
|
import '../emoji';
|
|
9
9
|
import '../text';
|
|
10
10
|
import '../icon';
|
|
11
|
+
import { NectaryElement } from '../utils';
|
|
11
12
|
import type { TSinchEmojiPicker } from './types';
|
|
12
|
-
import type { NectaryComponentReact, NectaryComponentVanilla } from '../types';
|
|
13
|
+
import type { NectaryComponentReact, NectaryComponentVanilla, TRect } from '../types';
|
|
14
|
+
export declare class EmojiPicker extends NectaryElement {
|
|
15
|
+
#private;
|
|
16
|
+
constructor();
|
|
17
|
+
connectedCallback(): void;
|
|
18
|
+
disconnectedCallback(): void;
|
|
19
|
+
get skinToneButtonRect(): TRect;
|
|
20
|
+
get searchInputRect(): TRect;
|
|
21
|
+
get searchClearButtonRect(): TRect;
|
|
22
|
+
nthSkinToneRect(index: number): TRect | null;
|
|
23
|
+
nthTabRect(index: number): TRect | null;
|
|
24
|
+
nthEmojiRect(index: number): TRect | null;
|
|
25
|
+
get focusable(): boolean;
|
|
26
|
+
}
|
|
13
27
|
declare global {
|
|
14
28
|
interface NectaryComponentMap {
|
|
15
29
|
'sinch-emoji-picker': TSinchEmojiPicker;
|
package/emoji-picker/index.js
CHANGED
|
@@ -18,7 +18,7 @@ const template = document.createElement('template');
|
|
|
18
18
|
const MIN_SEARCH_LENGTH = 2;
|
|
19
19
|
const SEARCH_DEBOUNCE_TIMEOUT = 300;
|
|
20
20
|
template.innerHTML = templateHTML;
|
|
21
|
-
|
|
21
|
+
export class EmojiPicker extends NectaryElement {
|
|
22
22
|
#$tabs;
|
|
23
23
|
#$searchInput;
|
|
24
24
|
#$searchClearButton;
|
|
@@ -304,4 +304,5 @@ defineCustomElement('sinch-emoji-picker', class extends NectaryElement {
|
|
|
304
304
|
btn.appendChild(el);
|
|
305
305
|
return btn;
|
|
306
306
|
}
|
|
307
|
-
}
|
|
307
|
+
}
|
|
308
|
+
defineCustomElement('sinch-emoji-picker', EmojiPicker);
|
package/field/index.d.ts
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
|
+
import { NectaryElement } from '../utils';
|
|
1
2
|
import type { TSinchField } from './types';
|
|
2
3
|
import type { NectaryComponentVanilla, NectaryComponentReact } from '../types';
|
|
4
|
+
export declare class Field extends NectaryElement {
|
|
5
|
+
#private;
|
|
6
|
+
topSection: HTMLDivElement;
|
|
7
|
+
constructor();
|
|
8
|
+
connectedCallback(): void;
|
|
9
|
+
disconnectedCallback(): void;
|
|
10
|
+
static get observedAttributes(): string[];
|
|
11
|
+
shouldShowTopSection(): void;
|
|
12
|
+
attributeChangedCallback(name: string, oldVal: string | null, newVal: string | null): void;
|
|
13
|
+
set label(value: string | null);
|
|
14
|
+
get label(): string | null;
|
|
15
|
+
set optionalText(value: string | null);
|
|
16
|
+
get optionalText(): string | null;
|
|
17
|
+
set additionalText(value: string | null);
|
|
18
|
+
get additionalText(): string | null;
|
|
19
|
+
set invalidText(value: string | null);
|
|
20
|
+
get invalidText(): string | null;
|
|
21
|
+
set disabled(isDisabled: boolean);
|
|
22
|
+
get disabled(): boolean;
|
|
23
|
+
}
|
|
3
24
|
declare global {
|
|
4
25
|
interface NectaryComponentMap {
|
|
5
26
|
'sinch-field': TSinchField;
|
package/field/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { defineCustomElement, getAttribute, getBooleanAttribute, getFirstSlotEle
|
|
|
2
2
|
const templateHTML = '<style>:host{display:block}#wrapper{display:flex;flex-direction:column;width:100%}#bottom,#top{display:flex;align-items:baseline}#top{height:24px;margin-bottom:2px}#top.empty{display:none}#additional,#invalid,#label,#optional{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#label{font:var(--sinch-comp-field-font-label);color:var(--sinch-comp-field-color-default-label-initial)}#optional{flex:1;font:var(--sinch-comp-field-font-optional);color:var(--sinch-comp-field-color-default-optional-initial);text-align:right}#additional{flex:1;text-align:right;font:var(--sinch-comp-field-font-additional);color:var(--sinch-comp-field-color-default-additional-initial);line-height:20px;margin-top:2px}#additional:empty{display:none}#invalid{font:var(--sinch-comp-field-font-invalid);color:var(--sinch-comp-field-color-invalid-text-initial);line-height:20px;margin-top:2px}#invalid:empty{display:none}#tooltip{align-self:center;margin:0 8px;display:flex}#tooltip.empty{display:none}:host([disabled]) #label{color:var(--sinch-comp-field-color-disabled-label-initial)}:host([disabled]) #additional{color:var(--sinch-comp-field-color-disabled-additional-initial)}:host([disabled]) #optional{color:var(--sinch-comp-field-color-disabled-optional-initial)}</style><div id="wrapper"><div id="top"><label id="label" for="input"></label><div id="tooltip"><slot name="tooltip"></slot></div><span id="optional"></span></div><slot name="input"></slot><div id="bottom"><div id="invalid"></div><div id="additional"></div></div></div>';
|
|
3
3
|
const template = document.createElement('template');
|
|
4
4
|
template.innerHTML = templateHTML;
|
|
5
|
-
|
|
5
|
+
export class Field extends NectaryElement {
|
|
6
6
|
#$label;
|
|
7
7
|
#$optionalText;
|
|
8
8
|
#$additionalText;
|
|
@@ -117,4 +117,5 @@ defineCustomElement('sinch-field', class extends NectaryElement {
|
|
|
117
117
|
#onTooltipSlotChange = () => {
|
|
118
118
|
setClass(this.#$tooltipWrapper, 'empty', this.#$tooltipSlot.assignedElements().length === 0);
|
|
119
119
|
};
|
|
120
|
-
}
|
|
120
|
+
}
|
|
121
|
+
defineCustomElement('sinch-field', Field);
|
package/file-drop/index.d.ts
CHANGED
|
@@ -1,7 +1,30 @@
|
|
|
1
1
|
import '../text';
|
|
2
2
|
import '../file-picker';
|
|
3
|
+
import { NectaryElement } from '../utils';
|
|
3
4
|
import type { TSinchFileDrop } from './types';
|
|
4
5
|
import type { NectaryComponentVanilla, NectaryComponentReact } from '../types';
|
|
6
|
+
export declare class FileDrop extends NectaryElement {
|
|
7
|
+
#private;
|
|
8
|
+
constructor();
|
|
9
|
+
connectedCallback(): void;
|
|
10
|
+
disconnectedCallback(): void;
|
|
11
|
+
static get observedAttributes(): string[];
|
|
12
|
+
attributeChangedCallback(name: string, oldVal: string | null, newVal: string | null): void;
|
|
13
|
+
set multiple(isMultiple: boolean);
|
|
14
|
+
get multiple(): boolean;
|
|
15
|
+
set accept(value: string | null);
|
|
16
|
+
get accept(): string | null;
|
|
17
|
+
get size(): number | null;
|
|
18
|
+
set size(value: number | null);
|
|
19
|
+
set text(value: string);
|
|
20
|
+
get text(): string;
|
|
21
|
+
set placeholder(value: string);
|
|
22
|
+
get placeholder(): string;
|
|
23
|
+
set disabled(isDisabled: boolean);
|
|
24
|
+
get disabled(): boolean;
|
|
25
|
+
set invalid(isInvalid: boolean);
|
|
26
|
+
get invalid(): boolean;
|
|
27
|
+
}
|
|
5
28
|
declare global {
|
|
6
29
|
interface NectaryComponentMap {
|
|
7
30
|
'sinch-file-drop': TSinchFileDrop;
|
package/file-drop/index.js
CHANGED
|
@@ -5,7 +5,7 @@ const templateHTML = '<style>:host{display:block}#wrapper{position:relative;disp
|
|
|
5
5
|
import { areFilesAccepted, areItemsAccepted, doFilesSatisfySize } from './utils';
|
|
6
6
|
const template = document.createElement('template');
|
|
7
7
|
template.innerHTML = templateHTML;
|
|
8
|
-
|
|
8
|
+
export class FileDrop extends NectaryElement {
|
|
9
9
|
#$filePicker;
|
|
10
10
|
#$dropArea;
|
|
11
11
|
#$placeholder;
|
|
@@ -208,4 +208,5 @@ defineCustomElement('sinch-file-drop', class extends NectaryElement {
|
|
|
208
208
|
detail: type
|
|
209
209
|
}));
|
|
210
210
|
}
|
|
211
|
-
}
|
|
211
|
+
}
|
|
212
|
+
defineCustomElement('sinch-file-drop', FileDrop);
|
package/file-picker/index.d.ts
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
|
+
import { NectaryElement } from '../utils';
|
|
1
2
|
import type { TSinchFilePicker } from './types';
|
|
2
3
|
import type { NectaryComponentVanilla, NectaryComponentReact } from '../types';
|
|
4
|
+
export declare class FilePicker extends NectaryElement {
|
|
5
|
+
#private;
|
|
6
|
+
constructor();
|
|
7
|
+
connectedCallback(): void;
|
|
8
|
+
disconnectedCallback(): void;
|
|
9
|
+
static get observedAttributes(): string[];
|
|
10
|
+
attributeChangedCallback(name: string, oldVal: string | null, newVal: string | null): void;
|
|
11
|
+
set multiple(isMultiple: boolean);
|
|
12
|
+
get multiple(): boolean;
|
|
13
|
+
set accept(value: string | null);
|
|
14
|
+
get accept(): string | null;
|
|
15
|
+
get size(): number | null;
|
|
16
|
+
set size(value: number | null);
|
|
17
|
+
}
|
|
3
18
|
declare global {
|
|
4
19
|
interface NectaryComponentMap {
|
|
5
20
|
'sinch-file-picker': TSinchFilePicker;
|
package/file-picker/index.js
CHANGED
|
@@ -3,7 +3,7 @@ const templateHTML = '<style>:host{display:inline-block}::slotted(*){display:blo
|
|
|
3
3
|
import { doFilesSatisfySize } from './utils';
|
|
4
4
|
const template = document.createElement('template');
|
|
5
5
|
template.innerHTML = templateHTML;
|
|
6
|
-
|
|
6
|
+
export class FilePicker extends NectaryElement {
|
|
7
7
|
#$input;
|
|
8
8
|
#$targetSlot;
|
|
9
9
|
#controller = null;
|
|
@@ -97,4 +97,5 @@ defineCustomElement('sinch-file-picker', class extends NectaryElement {
|
|
|
97
97
|
#onInvalidReactHandler = e => {
|
|
98
98
|
getReactEventHandler(this, 'on-invalid')?.(e);
|
|
99
99
|
};
|
|
100
|
-
}
|
|
100
|
+
}
|
|
101
|
+
defineCustomElement('sinch-file-picker', FilePicker);
|
package/file-status/index.d.ts
CHANGED
|
@@ -1,8 +1,21 @@
|
|
|
1
1
|
import '../spinner';
|
|
2
2
|
import '../icon';
|
|
3
3
|
import '../text';
|
|
4
|
-
import
|
|
4
|
+
import { NectaryElement } from '../utils';
|
|
5
|
+
import type { TSinchFileStatusType, TSinchFileStatus } from './types';
|
|
5
6
|
import type { NectaryComponentVanilla, NectaryComponentReact } from '../types';
|
|
7
|
+
export declare class FileStatus extends NectaryElement {
|
|
8
|
+
#private;
|
|
9
|
+
constructor();
|
|
10
|
+
connectedCallback(): void;
|
|
11
|
+
disconnectedCallback(): void;
|
|
12
|
+
get type(): TSinchFileStatusType;
|
|
13
|
+
set type(value: TSinchFileStatusType);
|
|
14
|
+
get filename(): string;
|
|
15
|
+
set filename(value: string);
|
|
16
|
+
static get observedAttributes(): string[];
|
|
17
|
+
attributeChangedCallback(name: string, oldVal: string | null, newVal: string | null): void;
|
|
18
|
+
}
|
|
6
19
|
declare global {
|
|
7
20
|
interface NectaryComponentMap {
|
|
8
21
|
'sinch-file-status': TSinchFileStatus;
|
package/file-status/index.js
CHANGED
|
@@ -6,7 +6,7 @@ const templateHTML = '<style>:host{display:block}#wrapper{display:flex;flex-dire
|
|
|
6
6
|
import { typeValues } from './utils';
|
|
7
7
|
const template = document.createElement('template');
|
|
8
8
|
template.innerHTML = templateHTML;
|
|
9
|
-
|
|
9
|
+
export class FileStatus extends NectaryElement {
|
|
10
10
|
#$filename;
|
|
11
11
|
#$contentSlot;
|
|
12
12
|
#controller = null;
|
|
@@ -58,4 +58,5 @@ defineCustomElement('sinch-file-status', class extends NectaryElement {
|
|
|
58
58
|
#onContentSlotChange = () => {
|
|
59
59
|
updateBooleanAttribute(this.#$filename, 'emphasized', this.#$contentSlot.assignedElements().length > 0);
|
|
60
60
|
};
|
|
61
|
-
}
|
|
61
|
+
}
|
|
62
|
+
defineCustomElement('sinch-file-status', FileStatus);
|
package/flag/index.d.ts
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
|
+
import { NectaryElement } from '../utils';
|
|
1
2
|
import type { TSinchFlag } from './types';
|
|
2
3
|
import type { NectaryComponentVanilla, NectaryComponentReact } from '../types';
|
|
4
|
+
export declare class Flag extends NectaryElement {
|
|
5
|
+
#private;
|
|
6
|
+
constructor();
|
|
7
|
+
connectedCallback(): void;
|
|
8
|
+
disconnectedCallback(): void;
|
|
9
|
+
static get observedAttributes(): string[];
|
|
10
|
+
attributeChangedCallback(name: string, _: string | null, newVal: string | null): void;
|
|
11
|
+
set code(value: string);
|
|
12
|
+
get code(): string;
|
|
13
|
+
}
|
|
3
14
|
declare global {
|
|
4
15
|
interface NectaryComponentMap {
|
|
5
16
|
'sinch-flag': TSinchFlag;
|
package/flag/index.js
CHANGED
|
@@ -3,7 +3,7 @@ const templateHTML = '<style>:host{display:contents}#image{pointer-events:none;w
|
|
|
3
3
|
import { getFlagUrl } from './utils';
|
|
4
4
|
const template = document.createElement('template');
|
|
5
5
|
template.innerHTML = templateHTML;
|
|
6
|
-
|
|
6
|
+
export class Flag extends NectaryElement {
|
|
7
7
|
#$img;
|
|
8
8
|
constructor() {
|
|
9
9
|
super();
|
|
@@ -43,4 +43,5 @@ defineCustomElement('sinch-flag', class extends NectaryElement {
|
|
|
43
43
|
}
|
|
44
44
|
this.#$img.src = getFlagUrl(this, this.code);
|
|
45
45
|
}
|
|
46
|
-
}
|
|
46
|
+
}
|
|
47
|
+
defineCustomElement('sinch-flag', Flag);
|
package/grid/index.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
import { NectaryElement } from '../utils';
|
|
1
2
|
import type { TSinchGrid } from './types';
|
|
2
3
|
import type { NectaryComponentReact, NectaryComponentVanilla } from '../types';
|
|
4
|
+
export declare class Grid extends NectaryElement {
|
|
5
|
+
constructor();
|
|
6
|
+
}
|
|
3
7
|
declare global {
|
|
4
8
|
interface NectaryComponentMap {
|
|
5
9
|
'sinch-grid': TSinchGrid;
|
package/grid/index.js
CHANGED
|
@@ -2,10 +2,11 @@ import { defineCustomElement, NectaryElement } from '../utils';
|
|
|
2
2
|
const templateHTML = '<style>:host{display:grid;grid-template-columns:repeat(var(--sinch-comp-grid-columns-xl),minmax(0,1fr));grid-column-gap:var(--sinch-comp-grid-gutter-xl);grid-row-gap:var(--sinch-comp-grid-gutter-xl);padding:var(--sinch-comp-grid-margin-xl)}@media only screen and (max-width:1439px){:host{grid-template-columns:repeat(var(--sinch-comp-grid-columns-l),minmax(0,1fr));grid-column-gap:var(--sinch-comp-grid-gutter-l);grid-row-gap:var(--sinch-comp-grid-gutter-l);padding:var(--sinch-comp-grid-margin-l)}}@media only screen and (max-width:1023px){:host{grid-template-columns:repeat(var(--sinch-comp-grid-columns-m),minmax(0,1fr));grid-column-gap:var(--sinch-comp-grid-gutter-m);grid-row-gap:var(--sinch-comp-grid-gutter-m);padding:var(--sinch-comp-grid-margin-m)}}@media only screen and (max-width:767px){:host{grid-template-columns:repeat(var(--sinch-comp-grid-columns-s),minmax(0,1fr));grid-column-gap:var(--sinch-comp-grid-gutter-s);grid-row-gap:var(--sinch-comp-grid-gutter-s);padding:var(--sinch-comp-grid-margin-s)}}</style><slot name="item"></slot>';
|
|
3
3
|
const template = document.createElement('template');
|
|
4
4
|
template.innerHTML = templateHTML;
|
|
5
|
-
|
|
5
|
+
export class Grid extends NectaryElement {
|
|
6
6
|
constructor() {
|
|
7
7
|
super();
|
|
8
8
|
const shadowRoot = this.attachShadow();
|
|
9
9
|
shadowRoot.appendChild(template.content.cloneNode(true));
|
|
10
10
|
}
|
|
11
|
-
}
|
|
11
|
+
}
|
|
12
|
+
defineCustomElement('sinch-grid', Grid);
|
package/grid-item/index.d.ts
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
|
+
import { NectaryElement } from '../utils';
|
|
1
2
|
import type { TSinchGridItem } from './types';
|
|
2
3
|
import type { NectaryComponentReact, NectaryComponentVanilla } from '../types';
|
|
4
|
+
export declare class GridItem extends NectaryElement {
|
|
5
|
+
constructor();
|
|
6
|
+
get s(): number | null;
|
|
7
|
+
set s(value: number | null);
|
|
8
|
+
get m(): number | null;
|
|
9
|
+
set m(value: number | null);
|
|
10
|
+
get l(): number | null;
|
|
11
|
+
set l(value: number | null);
|
|
12
|
+
get xl(): number | null;
|
|
13
|
+
set xl(value: number | null);
|
|
14
|
+
}
|
|
3
15
|
declare global {
|
|
4
16
|
interface NectaryComponentMap {
|
|
5
17
|
'sinch-grid-item': TSinchGridItem;
|