@nectary/components 4.10.5 → 4.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/accordion/index.d.ts +13 -0
- package/accordion/index.js +3 -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/types.d.ts +10 -7
- package/utils/adapters.d.ts +4 -4
- 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
|
@@ -1,7 +1,23 @@
|
|
|
1
1
|
import '../icon';
|
|
2
2
|
import '../text';
|
|
3
|
+
import { NectaryElement } from '../utils';
|
|
3
4
|
import type { TSinchProgressStepperItem } from './types';
|
|
4
5
|
import type { NectaryComponentReact, NectaryComponentVanilla } from '../types';
|
|
6
|
+
export declare class ProgressStepperItem 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 value(value: string);
|
|
14
|
+
get value(): string;
|
|
15
|
+
set text(value: string);
|
|
16
|
+
get text(): string;
|
|
17
|
+
set invalid(isInvalid: boolean);
|
|
18
|
+
get invalid(): boolean;
|
|
19
|
+
get focusable(): boolean;
|
|
20
|
+
}
|
|
5
21
|
declare global {
|
|
6
22
|
interface NectaryComponentMap {
|
|
7
23
|
'sinch-progress-stepper-item': TSinchProgressStepperItem;
|
|
@@ -5,7 +5,7 @@ const templateHTML = '<style>:host{display:block;outline:0}#button{position:rela
|
|
|
5
5
|
import { ATTR_PROGRESS_STEPPER_ITEM_ACTIVE_DESCENDANT, ATTR_PROGRESS_STEPPER_ITEM_CHECKED, ATTR_PROGRESS_STEPPER_ITEM_STATUS, isProgressStepperItemActive, isProgressStepperItemActiveDescendant } from './utils';
|
|
6
6
|
const template = document.createElement('template');
|
|
7
7
|
template.innerHTML = templateHTML;
|
|
8
|
-
|
|
8
|
+
export class ProgressStepperItem extends NectaryElement {
|
|
9
9
|
#$text;
|
|
10
10
|
constructor() {
|
|
11
11
|
super();
|
|
@@ -80,4 +80,5 @@ defineCustomElement('sinch-progress-stepper-item', class extends NectaryElement
|
|
|
80
80
|
#updateTabIndex() {
|
|
81
81
|
this.tabIndex = isProgressStepperItemActiveDescendant(this) && isProgressStepperItemActive(this) ? 0 : -1;
|
|
82
82
|
}
|
|
83
|
-
}
|
|
83
|
+
}
|
|
84
|
+
defineCustomElement('sinch-progress-stepper-item', ProgressStepperItem);
|
package/radio/index.d.ts
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
|
+
import { NectaryElement } from '../utils';
|
|
1
2
|
import type { TSinchRadio } from './types';
|
|
2
3
|
import type { NectaryComponentReact, NectaryComponentVanilla } from '../types';
|
|
4
|
+
export declare class Radio extends NectaryElement {
|
|
5
|
+
#private;
|
|
6
|
+
static formAssociated: boolean;
|
|
7
|
+
constructor();
|
|
8
|
+
connectedCallback(): void;
|
|
9
|
+
disconnectedCallback(): void;
|
|
10
|
+
formAssociatedCallback(): void;
|
|
11
|
+
formResetCallback(): void;
|
|
12
|
+
formStateRestoreCallback(state: string | FormData | null): void;
|
|
13
|
+
static get observedAttributes(): string[];
|
|
14
|
+
set name(value: string);
|
|
15
|
+
get name(): string;
|
|
16
|
+
set value(value: string);
|
|
17
|
+
get value(): string;
|
|
18
|
+
set invalid(isInvalid: boolean);
|
|
19
|
+
get invalid(): boolean;
|
|
20
|
+
attributeChangedCallback(name: string, oldVal: string | null, newVal: string | null): void;
|
|
21
|
+
}
|
|
3
22
|
declare global {
|
|
4
23
|
interface NectaryComponentMap {
|
|
5
24
|
'sinch-radio': TSinchRadio;
|
package/radio/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { setFormValue } from '../utils/form';
|
|
|
3
3
|
const templateHTML = '<style>:host{display:block}#wrapper{display:flex;flex-direction:var(--sinch-comp-radio-direction,column);gap:var(--sinch-comp-radio-gap,8px);box-sizing:border-box;width:100%}</style><div id="wrapper"><slot></slot></div>';
|
|
4
4
|
const template = document.createElement('template');
|
|
5
5
|
template.innerHTML = templateHTML;
|
|
6
|
-
|
|
6
|
+
export class Radio extends NectaryElement {
|
|
7
7
|
#$slot;
|
|
8
8
|
#controller = null;
|
|
9
9
|
#internals;
|
|
@@ -196,4 +196,5 @@ defineCustomElement('sinch-radio', class extends NectaryElement {
|
|
|
196
196
|
#onChangeReactHandler = e => {
|
|
197
197
|
getReactEventHandler(this, 'on-change')?.(e);
|
|
198
198
|
};
|
|
199
|
-
}
|
|
199
|
+
}
|
|
200
|
+
defineCustomElement('sinch-radio', Radio);
|
package/radio-option/index.d.ts
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
|
+
import { NectaryElement } from '../utils';
|
|
1
2
|
import type { TSinchRadioOption } from './types';
|
|
2
3
|
import type { NectaryComponentReact, NectaryComponentVanilla } from '../types';
|
|
4
|
+
export declare class RadioOption 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 checked(isChecked: boolean);
|
|
12
|
+
get checked(): boolean;
|
|
13
|
+
set value(value: string);
|
|
14
|
+
get value(): string;
|
|
15
|
+
set disabled(isDisabled: boolean);
|
|
16
|
+
get disabled(): boolean;
|
|
17
|
+
set text(value: string);
|
|
18
|
+
get text(): string;
|
|
19
|
+
get focusable(): boolean;
|
|
20
|
+
}
|
|
3
21
|
declare global {
|
|
4
22
|
interface NectaryComponentMap {
|
|
5
23
|
'sinch-radio-option': TSinchRadioOption;
|
package/radio-option/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { defineCustomElement, getAttribute, getBooleanAttribute, isAttrEqual, is
|
|
|
2
2
|
const templateHTML = '<style>:host{display:block;outline:0}#wrapper{display:flex;flex-direction:row;box-sizing:border-box;width:100%;min-height:24px;--sinch-local-color-background:var(--sinch-comp-radio-color-default-background-initial);--sinch-local-color-background-hover:var(--sinch-comp-radio-color-default-background-hover);--sinch-local-color-background-active:var(--sinch-comp-radio-color-default-background-active);--sinch-local-color-border:var(--sinch-comp-radio-color-default-border-initial);--sinch-local-color-border-hover:var(--sinch-comp-radio-color-default-border-hover);--sinch-local-color-border-active:var(--sinch-comp-radio-color-default-border-active);--sinch-local-color-knob:var(--sinch-comp-radio-color-checked-knob-initial);--sinch-local-color-knob-hover:var(--sinch-comp-radio-color-checked-knob-hover);--sinch-local-color-knob-active:var(--sinch-comp-radio-color-checked-knob-active);--sinch-local-color-text:var(--sinch-comp-radio-color-default-label-initial)}:host([data-invalid])>#wrapper{--sinch-local-color-border:var(--sinch-comp-radio-color-invalid-border-initial);--sinch-local-color-border-hover:var(--sinch-comp-radio-color-invalid-border-hover);--sinch-local-color-border-active:var(--sinch-comp-radio-color-invalid-border-active);--sinch-local-color-text:var(--sinch-comp-radio-color-invalid-label-initial)}:host([checked])>#wrapper{--sinch-local-color-border:var(--sinch-comp-radio-color-checked-border-initial);--sinch-local-color-border-hover:var(--sinch-comp-radio-color-checked-border-hover);--sinch-local-color-border-active:var(--sinch-comp-radio-color-checked-border-active)}:host([disabled])>#wrapper{--sinch-local-color-background:var(--sinch-comp-radio-color-disabled-background-initial);--sinch-local-color-border:var(--sinch-comp-radio-color-disabled-border-initial);--sinch-local-color-text:var(--sinch-comp-radio-color-disabled-label-initial)}:host([disabled][checked])>#wrapper{--sinch-local-color-border:var(--sinch-comp-radio-color-checked-disabled-border-initial);--sinch-local-color-knob:var(--sinch-comp-radio-color-checked-disabled-knob-initial);--sinch-local-color-text:var(--sinch-comp-radio-color-checked-disabled-label-initial)}#input{all:initial;display:block;width:18px;height:18px;cursor:pointer}:host([disabled]) #input{cursor:initial}#input-wrapper{position:relative;width:18px;height:18px;align-self:flex-start;margin-top:3px}#input::before{content:"";position:absolute;inset:-3px;border:2px solid var(--sinch-comp-radio-color-default-outline-focus);border-radius:50%;transition:opacity .1s linear;opacity:0;box-sizing:border-box;pointer-events:none}:host(:focus-visible) #input::before{opacity:1}#input::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:50%;box-sizing:border-box;pointer-events:none}:host(:hover:not([disabled])) #input::after{background-color:var(--sinch-local-color-background-hover);border-color:var(--sinch-local-color-border-hover)}:host(:active:not([disabled])) #input::after{background-color:var(--sinch-local-color-background-active);border-color:var(--sinch-local-color-border-active)}#knob{position:absolute;width:10px;height:10px;inset:0;margin:auto;border-radius:50%;transition:opacity .1s linear;opacity:0;background-color:var(--sinch-local-color-knob);pointer-events:none}:host([checked]) #knob{opacity:1}:host(:hover:not([disabled])) #knob{background-color:var(--sinch-local-color-knob-hover)}:host(:active:not([disabled])) #knob{background-color:var(--sinch-local-color-knob-active)}@media (prefers-reduced-motion){#input::after,#input::before,#knob{transition:none}}#label{flex:1;align-self:center;padding-left:8px;font:var(--sinch-comp-radio-font-label);color:var(--sinch-local-color-text);cursor:pointer}#label:empty{display:none}:host([disabled]) #label{cursor:initial}</style><div id="wrapper"><div id="input-wrapper"><div id="input"></div><div id="knob"></div></div><span id="label"></span></div>';
|
|
3
3
|
const template = document.createElement('template');
|
|
4
4
|
template.innerHTML = templateHTML;
|
|
5
|
-
|
|
5
|
+
export class RadioOption extends NectaryElement {
|
|
6
6
|
#$label;
|
|
7
7
|
constructor() {
|
|
8
8
|
super();
|
|
@@ -76,4 +76,5 @@ defineCustomElement('sinch-radio-option', class extends NectaryElement {
|
|
|
76
76
|
get focusable() {
|
|
77
77
|
return true;
|
|
78
78
|
}
|
|
79
|
-
}
|
|
79
|
+
}
|
|
80
|
+
defineCustomElement('sinch-radio-option', RadioOption);
|
package/rich-text/index.d.ts
CHANGED
|
@@ -1,8 +1,22 @@
|
|
|
1
1
|
import '../emoji';
|
|
2
2
|
import '../code-tag';
|
|
3
3
|
import '../link';
|
|
4
|
+
import { NectaryElement } from '../utils';
|
|
4
5
|
import type { TSinchRichText } from './types';
|
|
6
|
+
import type { TSinchTextType } from '../text/types';
|
|
5
7
|
import type { NectaryComponentReact, NectaryComponentVanilla } from '../types';
|
|
8
|
+
export declare class RichText extends NectaryElement {
|
|
9
|
+
#private;
|
|
10
|
+
constructor();
|
|
11
|
+
connectedCallback(): void;
|
|
12
|
+
disconnectedCallback(): void;
|
|
13
|
+
static get observedAttributes(): string[];
|
|
14
|
+
attributeChangedCallback(name: string, _oldVal: string | null, _newVal: string | null): void;
|
|
15
|
+
get size(): TSinchTextType;
|
|
16
|
+
set size(value: TSinchTextType);
|
|
17
|
+
get text(): string;
|
|
18
|
+
set text(value: string);
|
|
19
|
+
}
|
|
6
20
|
declare global {
|
|
7
21
|
interface NectaryComponentMap {
|
|
8
22
|
'sinch-rich-text': TSinchRichText;
|
package/rich-text/index.js
CHANGED
|
@@ -7,7 +7,7 @@ const templateHTML = '<style>:host{display:block;--sinch-comp-rich-text-font:var
|
|
|
7
7
|
import { createParseVisitor, sizeValues } from './utils';
|
|
8
8
|
const template = document.createElement('template');
|
|
9
9
|
template.innerHTML = templateHTML;
|
|
10
|
-
|
|
10
|
+
export class RichText extends NectaryElement {
|
|
11
11
|
#wrapper;
|
|
12
12
|
#parseVisitor;
|
|
13
13
|
#controller = null;
|
|
@@ -98,4 +98,5 @@ defineCustomElement('sinch-rich-text', class extends NectaryElement {
|
|
|
98
98
|
#onClickReactHandler = e => {
|
|
99
99
|
getReactEventHandler(this, 'on-element-click')?.(e);
|
|
100
100
|
};
|
|
101
|
-
}
|
|
101
|
+
}
|
|
102
|
+
defineCustomElement('sinch-rich-text', RichText);
|
package/rich-textarea/index.d.ts
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
|
+
import { NectaryElement } from '../utils';
|
|
1
2
|
import type { TSinchRichTextarea } from './types';
|
|
2
3
|
import type { NectaryComponentVanilla, NectaryComponentReact } from '../types';
|
|
4
|
+
export declare class RichTextarea 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 value(value: string);
|
|
12
|
+
get value(): string;
|
|
13
|
+
set placeholder(value: string | null);
|
|
14
|
+
get placeholder(): string | null;
|
|
15
|
+
set disabled(isDisabled: boolean);
|
|
16
|
+
get disabled(): boolean;
|
|
17
|
+
set rows(value: HTMLTextAreaElement['rows']);
|
|
18
|
+
get rows(): HTMLTextAreaElement['rows'];
|
|
19
|
+
get focusable(): boolean;
|
|
20
|
+
focus(): void;
|
|
21
|
+
blur(): void;
|
|
22
|
+
insertText(value: string): void;
|
|
23
|
+
insertLink(text: string, href: string): void;
|
|
24
|
+
formatItalic(): void;
|
|
25
|
+
formatBold(): void;
|
|
26
|
+
formatStrikethrough(): void;
|
|
27
|
+
formatCodeTag(): void;
|
|
28
|
+
formatOrderedList(): void;
|
|
29
|
+
formatUnorderedList(): void;
|
|
30
|
+
}
|
|
3
31
|
declare global {
|
|
4
32
|
interface NectaryComponentMap {
|
|
5
33
|
'sinch-rich-textarea': TSinchRichTextarea;
|
package/rich-textarea/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import { createParseVisitor, deleteContentBackward, formatIndent, formatInline,
|
|
|
5
5
|
const template = document.createElement('template');
|
|
6
6
|
template.innerHTML = templateHTML;
|
|
7
7
|
const SUPPORTS_SHADOW_SELECTION = typeof window.ShadowRoot.prototype.getSelection === 'function';
|
|
8
|
-
|
|
8
|
+
export class RichTextarea extends NectaryElement {
|
|
9
9
|
#$input;
|
|
10
10
|
#$placeholder;
|
|
11
11
|
#controller = null;
|
|
@@ -461,4 +461,5 @@ defineCustomElement('sinch-rich-textarea', class extends NectaryElement {
|
|
|
461
461
|
#onSelectionReactHandler = e => {
|
|
462
462
|
getReactEventHandler(this, 'on-selection')?.(e);
|
|
463
463
|
};
|
|
464
|
-
}
|
|
464
|
+
}
|
|
465
|
+
defineCustomElement('sinch-rich-textarea', RichTextarea);
|
package/segment/index.d.ts
CHANGED
|
@@ -1,6 +1,23 @@
|
|
|
1
1
|
import '../title';
|
|
2
|
+
import { NectaryElement } from '../utils';
|
|
2
3
|
import type { TSinchSegment } from './types';
|
|
3
|
-
import type { NectaryComponentReact, NectaryComponentVanilla } from '../types';
|
|
4
|
+
import type { NectaryComponentReact, NectaryComponentVanilla, TRect } from '../types';
|
|
5
|
+
import type { TSinchSize } from '../utils/size';
|
|
6
|
+
export declare class Segment 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 caption(caption: string);
|
|
14
|
+
get caption(): string;
|
|
15
|
+
set collapsed(isChecked: boolean);
|
|
16
|
+
get collapsed(): boolean;
|
|
17
|
+
get size(): TSinchSize;
|
|
18
|
+
set size(value: TSinchSize);
|
|
19
|
+
get collapseButtonRect(): TRect | null;
|
|
20
|
+
}
|
|
4
21
|
declare global {
|
|
5
22
|
interface NectaryComponentMap {
|
|
6
23
|
'sinch-segment': TSinchSegment;
|
package/segment/index.js
CHANGED
|
@@ -6,7 +6,7 @@ const templateHTML = '<style>:host{display:block}#wrapper{display:flex;flex-dire
|
|
|
6
6
|
import { getTitleTypeFromSize } from './utils';
|
|
7
7
|
const template = document.createElement('template');
|
|
8
8
|
template.innerHTML = templateHTML;
|
|
9
|
-
|
|
9
|
+
export class Segment extends NectaryElement {
|
|
10
10
|
#$caption;
|
|
11
11
|
#$previewSlot;
|
|
12
12
|
#$previewWrapper;
|
|
@@ -106,4 +106,5 @@ defineCustomElement('sinch-segment', class extends NectaryElement {
|
|
|
106
106
|
#onActionSlotChange = () => {
|
|
107
107
|
setClass(this.#$actionWrapper, 'empty', this.#$actionSlot.assignedElements().length === 0);
|
|
108
108
|
};
|
|
109
|
-
}
|
|
109
|
+
}
|
|
110
|
+
defineCustomElement('sinch-segment', Segment);
|
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
import '../icon';
|
|
2
|
+
import { NectaryElement } from '../utils';
|
|
2
3
|
import type { TSinchSegmentExpand } from './types';
|
|
3
4
|
import type { NectaryComponentVanilla, NectaryComponentReact } from '../types';
|
|
5
|
+
export declare class SegmentCollapse extends NectaryElement {
|
|
6
|
+
#private;
|
|
7
|
+
constructor();
|
|
8
|
+
connectedCallback(): void;
|
|
9
|
+
disconnectedCallback(): void;
|
|
10
|
+
static get observedAttributes(): string[];
|
|
11
|
+
attributeChangedCallback(name: string, oldVal: string | null, newVal: string | null): void;
|
|
12
|
+
set value(isChecked: boolean);
|
|
13
|
+
get value(): boolean;
|
|
14
|
+
get focusable(): boolean;
|
|
15
|
+
focus(): void;
|
|
16
|
+
blur(): void;
|
|
17
|
+
}
|
|
4
18
|
declare global {
|
|
5
19
|
interface NectaryComponentMap {
|
|
6
20
|
'sinch-segment-collapse': TSinchSegmentExpand;
|
|
@@ -3,7 +3,7 @@ import { defineCustomElement, getBooleanAttribute, getReactEventHandler, isAttrT
|
|
|
3
3
|
const templateHTML = '<style>:host{display:block;--sinch-global-size-icon:32px}#icon-dropdown{display:block;will-change:transform;transform:rotate(180deg)}:host([value]:not([value=false])) #icon-dropdown{transform:rotate(0)}</style><sinch-button id="button" size="s"><sinch-icon icons-version="2" name="fa-chevron-down" id="icon-dropdown" slot="icon"></sinch-icon></sinch-button>';
|
|
4
4
|
const template = document.createElement('template');
|
|
5
5
|
template.innerHTML = templateHTML;
|
|
6
|
-
|
|
6
|
+
export class SegmentCollapse extends NectaryElement {
|
|
7
7
|
#$button;
|
|
8
8
|
constructor() {
|
|
9
9
|
super();
|
|
@@ -56,4 +56,5 @@ defineCustomElement('sinch-segment-collapse', class extends NectaryElement {
|
|
|
56
56
|
#onChangeReactHandler = e => {
|
|
57
57
|
getReactEventHandler(this, 'on-change')?.(e);
|
|
58
58
|
};
|
|
59
|
-
}
|
|
59
|
+
}
|
|
60
|
+
defineCustomElement('sinch-segment-collapse', SegmentCollapse);
|
|
@@ -1,5 +1,16 @@
|
|
|
1
|
+
import { NectaryElement } from '../utils';
|
|
1
2
|
import type { TSinchSegmentedControl } from './types';
|
|
2
3
|
import type { NectaryComponentVanilla, NectaryComponentReact } from '../types';
|
|
4
|
+
export declare class SegmentedControl 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 value(value: string);
|
|
12
|
+
get value(): string;
|
|
13
|
+
}
|
|
3
14
|
declare global {
|
|
4
15
|
interface NectaryComponentMap {
|
|
5
16
|
'sinch-segmented-control': TSinchSegmentedControl;
|
|
@@ -2,7 +2,7 @@ import { defineCustomElement, getAttribute, getBooleanAttribute, getReactEventHa
|
|
|
2
2
|
const templateHTML = '<style>:host{display:block;outline:0}#wrapper{display:flex;flex-direction:row;width:100%;box-sizing:border-box;position:relative;z-index:0}</style><div id="wrapper"><slot></slot></div>';
|
|
3
3
|
const template = document.createElement('template');
|
|
4
4
|
template.innerHTML = templateHTML;
|
|
5
|
-
|
|
5
|
+
export class SegmentedControl extends NectaryElement {
|
|
6
6
|
#$slot;
|
|
7
7
|
#controller = null;
|
|
8
8
|
constructor() {
|
|
@@ -82,4 +82,5 @@ defineCustomElement('sinch-segmented-control', class extends NectaryElement {
|
|
|
82
82
|
#onChangeReactHandler = e => {
|
|
83
83
|
getReactEventHandler(this, 'on-change')?.(e);
|
|
84
84
|
};
|
|
85
|
-
}
|
|
85
|
+
}
|
|
86
|
+
defineCustomElement('sinch-segmented-control', SegmentedControl);
|
|
@@ -1,5 +1,21 @@
|
|
|
1
|
+
import { NectaryElement } from '../utils';
|
|
1
2
|
import type { TSinchSegmentedControlOption } from './types';
|
|
2
3
|
import type { NectaryComponentVanilla, NectaryComponentReact } from '../types';
|
|
4
|
+
export declare class SegmentedControlOption 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 value(value: string);
|
|
12
|
+
get value(): string;
|
|
13
|
+
set disabled(isDisabled: boolean);
|
|
14
|
+
get disabled(): boolean;
|
|
15
|
+
set text(value: string);
|
|
16
|
+
get text(): string;
|
|
17
|
+
get focusable(): boolean;
|
|
18
|
+
}
|
|
3
19
|
declare global {
|
|
4
20
|
interface NectaryComponentMap {
|
|
5
21
|
'sinch-segmented-control-option': TSinchSegmentedControlOption;
|
|
@@ -2,7 +2,7 @@ import { defineCustomElement, getAttribute, getBooleanAttribute, getReactEventHa
|
|
|
2
2
|
const templateHTML = '<style>:host{display:block;outline:0}#wrapper{position:relative;display:flex;flex-direction:row;align-items:center;gap:12px;width:100%;height:32px;padding:0 16px;box-sizing:border-box;color:var(--sinch-local-color-text);background-color:var(--sinch-local-color-background);cursor:pointer;--sinch-local-color-text:var(--sinch-comp-segmented-control-color-default-text-initial);--sinch-local-shape-radius:var(--sinch-comp-segmented-control-shape-radius);--sinch-local-color-border:var(--sinch-comp-segmented-control-color-default-border-initial);--sinch-local-color-background:var(--sinch-comp-segmented-control-color-default-background-initial);--sinch-global-color-icon:var(--sinch-comp-segmented-control-color-default-icon-initial);--sinch-global-size-icon:var(--sinch-comp-segmented-control-size-icon)}:host(:hover){--sinch-local-color-background:var(--sinch-comp-segmented-control-color-default-background-hover)}:host(:first-child) #wrapper{border-top-left-radius:var(--sinch-local-shape-radius);border-bottom-left-radius:var(--sinch-local-shape-radius)}:host(:last-child) #wrapper{border-top-right-radius:var(--sinch-local-shape-radius);border-bottom-right-radius:var(--sinch-local-shape-radius)}:host([data-checked]) #wrapper{--sinch-local-color-text:var(--sinch-comp-segmented-control-color-checked-text-initial);--sinch-global-color-icon:var(--sinch-comp-segmented-control-color-checked-icon-initial);--sinch-local-color-border:var(--sinch-comp-segmented-control-color-checked-border-initial);--sinch-local-color-background:var(--sinch-comp-segmented-control-color-checked-background-initial)}:host([disabled]) #wrapper{--sinch-local-color-text:var(--sinch-comp-segmented-control-color-disabled-text-initial);--sinch-global-color-icon:var(--sinch-comp-segmented-control-color-disabled-icon-initial);--sinch-local-color-border:var(--sinch-comp-segmented-control-color-disabled-border-initial);--sinch-local-color-background:var(--sinch-comp-segmented-control-color-disabled-background-initial)}#border{position:absolute;inset:0;border:1px solid var(--sinch-local-color-border);pointer-events:none;box-sizing:border-box}:host(:first-child) #border{border-top-left-radius:var(--sinch-local-shape-radius);border-bottom-left-radius:var(--sinch-local-shape-radius)}:host(:last-child) #border{border-top-right-radius:var(--sinch-local-shape-radius);border-bottom-right-radius:var(--sinch-local-shape-radius)}:host(:not(:first-child)) #border{border-left-width:0}:host([data-checked]) #border{border-width:2px}:host([data-checked]:not(:first-child)) #border{left:-1px}#outline{display:none;position:absolute;inset:-3px;border:2px solid var(--sinch-comp-segmented-control-color-default-outline-focus);pointer-events:none;box-sizing:border-box;z-index:1}:host(:focus-visible) #outline{display:block}:host(:first-child) #outline{border-top-left-radius:calc(var(--sinch-local-shape-radius) + 3px);border-bottom-left-radius:calc(var(--sinch-local-shape-radius) + 3px)}:host(:last-child) #outline{border-top-right-radius:calc(var(--sinch-local-shape-radius) + 3px);border-bottom-right-radius:calc(var(--sinch-local-shape-radius) + 3px)}:host(:not(:first-child)) #outline{left:-4px}#content{font:var(--sinch-comp-segmented-control-font-label);flex-shrink:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;pointer-events:none}::slotted(*){display:block;pointer-events:none}</style><div id="wrapper"><slot name="icon"></slot><span id="content"></span><div id="border"></div><div id="outline"></div></div>';
|
|
3
3
|
const template = document.createElement('template');
|
|
4
4
|
template.innerHTML = templateHTML;
|
|
5
|
-
|
|
5
|
+
export class SegmentedControlOption extends NectaryElement {
|
|
6
6
|
#$label;
|
|
7
7
|
#controller = null;
|
|
8
8
|
constructor() {
|
|
@@ -92,4 +92,5 @@ defineCustomElement('sinch-segmented-control-option', class extends NectaryEleme
|
|
|
92
92
|
#onBlurReactHandler = () => {
|
|
93
93
|
getReactEventHandler(this, 'on-blur')?.();
|
|
94
94
|
};
|
|
95
|
-
}
|
|
95
|
+
}
|
|
96
|
+
defineCustomElement('sinch-segmented-control-option', SegmentedControlOption);
|
|
@@ -1,5 +1,18 @@
|
|
|
1
|
+
import { NectaryElement } from '../utils';
|
|
1
2
|
import type { TSinchSegmentedIconControl } from './types';
|
|
2
3
|
import type { NectaryComponentVanilla, NectaryComponentReact } from '../types';
|
|
4
|
+
export declare class SegmentedIconControl 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 value(value: string);
|
|
12
|
+
get value(): string;
|
|
13
|
+
set multiple(isMultiple: boolean);
|
|
14
|
+
get multiple(): boolean;
|
|
15
|
+
}
|
|
3
16
|
declare global {
|
|
4
17
|
interface NectaryComponentMap {
|
|
5
18
|
'sinch-segmented-icon-control': TSinchSegmentedIconControl;
|
|
@@ -2,7 +2,7 @@ import { defineCustomElement, getAttribute, getBooleanAttribute, unpackCsv, getF
|
|
|
2
2
|
const templateHTML = '<style>:host{display:block;outline:0}#wrapper{display:flex;flex-direction:row;width:100%;box-sizing:border-box;position:relative;z-index:0}</style><div id="wrapper"><slot></slot></div>';
|
|
3
3
|
const template = document.createElement('template');
|
|
4
4
|
template.innerHTML = templateHTML;
|
|
5
|
-
|
|
5
|
+
export class SegmentedIconControl extends NectaryElement {
|
|
6
6
|
#$slot;
|
|
7
7
|
#controller = null;
|
|
8
8
|
constructor() {
|
|
@@ -98,4 +98,5 @@ defineCustomElement('sinch-segmented-icon-control', class extends NectaryElement
|
|
|
98
98
|
#onChangeReactHandler = e => {
|
|
99
99
|
getReactEventHandler(this, 'on-change')?.(e);
|
|
100
100
|
};
|
|
101
|
-
}
|
|
101
|
+
}
|
|
102
|
+
defineCustomElement('sinch-segmented-icon-control', SegmentedIconControl);
|
|
@@ -1,5 +1,19 @@
|
|
|
1
|
+
import { NectaryElement } from '../utils';
|
|
1
2
|
import type { TSinchSegmentedIconControlOption } from './types';
|
|
2
3
|
import type { NectaryComponentVanilla, NectaryComponentReact } from '../types';
|
|
4
|
+
export declare class SegmentedIconControlOption 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 value(value: string);
|
|
12
|
+
get value(): string;
|
|
13
|
+
set disabled(isDisabled: boolean);
|
|
14
|
+
get disabled(): boolean;
|
|
15
|
+
get focusable(): boolean;
|
|
16
|
+
}
|
|
3
17
|
declare global {
|
|
4
18
|
interface NectaryComponentMap {
|
|
5
19
|
'sinch-segmented-icon-control-option': TSinchSegmentedIconControlOption;
|
|
@@ -2,7 +2,7 @@ import { defineCustomElement, getAttribute, getBooleanAttribute, getReactEventHa
|
|
|
2
2
|
const templateHTML = '<style>:host{display:block;outline:0}#wrapper{position:relative;width:56px;height:32px;padding:3px 16px;box-sizing:border-box;background-color:var(--sinch-local-color-background);cursor:pointer;--sinch-global-color-icon:var(--sinch-comp-segmented-control-color-default-icon-initial);--sinch-global-size-icon:var(--sinch-comp-segmented-control-size-icon);--sinch-local-shape-radius:var(--sinch-comp-segmented-control-shape-radius);--sinch-local-color-border:var(--sinch-comp-segmented-control-color-default-border-initial);--sinch-local-color-background:var(--sinch-comp-segmented-control-color-default-background-initial)}:host(:hover){--sinch-local-color-background:var(--sinch-comp-segmented-control-color-default-background-hover)}:host(:first-child) #wrapper{border-top-left-radius:var(--sinch-local-shape-radius);border-bottom-left-radius:var(--sinch-local-shape-radius)}:host(:last-child) #wrapper{border-top-right-radius:var(--sinch-local-shape-radius);border-bottom-right-radius:var(--sinch-local-shape-radius)}:host([data-checked]) #wrapper{--sinch-global-color-icon:var(--sinch-comp-segmented-control-color-checked-icon-initial);--sinch-local-color-border:var(--sinch-comp-segmented-control-color-checked-border-initial);--sinch-local-color-background:var(--sinch-comp-segmented-control-color-checked-background-initial)}:host([disabled]) #wrapper{--sinch-global-color-icon:var(--sinch-comp-segmented-control-color-disabled-icon-initial);--sinch-local-color-border:var(--sinch-comp-segmented-control-color-disabled-border-initial);--sinch-local-color-background:var(--sinch-comp-segmented-control-color-disabled-background-initial);cursor:initial}#border{position:absolute;inset:0;border:1px solid var(--sinch-local-color-border);pointer-events:none;box-sizing:border-box}:host(:first-child) #border{border-top-left-radius:var(--sinch-local-shape-radius);border-bottom-left-radius:var(--sinch-local-shape-radius)}:host(:last-child) #border{border-top-right-radius:var(--sinch-local-shape-radius);border-bottom-right-radius:var(--sinch-local-shape-radius)}:host(:not(:first-child)) #border{border-left-width:0}:host([data-checked]) #border{border-width:2px}:host([data-checked]:not(:first-child)) #border{left:-1px}#outline{display:none;position:absolute;inset:-3px;border:2px solid var(--sinch-comp-segmented-control-color-default-outline-focus);pointer-events:none;box-sizing:border-box;z-index:1}:host(:focus-visible) #outline{display:block}:host(:first-child) #outline{border-top-left-radius:calc(var(--sinch-local-shape-radius) + 3px);border-bottom-left-radius:calc(var(--sinch-local-shape-radius) + 3px)}:host(:last-child) #outline{border-top-right-radius:calc(var(--sinch-local-shape-radius) + 3px);border-bottom-right-radius:calc(var(--sinch-local-shape-radius) + 3px)}:host(:not(:first-child)) #outline{left:-4px}::slotted(*){display:block;pointer-events:none}</style><div id="wrapper"><slot name="icon"></slot><div id="border"></div><div id="outline"></div></div>';
|
|
3
3
|
const template = document.createElement('template');
|
|
4
4
|
template.innerHTML = templateHTML;
|
|
5
|
-
|
|
5
|
+
export class SegmentedIconControlOption extends NectaryElement {
|
|
6
6
|
#controller = null;
|
|
7
7
|
constructor() {
|
|
8
8
|
super();
|
|
@@ -79,4 +79,5 @@ defineCustomElement('sinch-segmented-icon-control-option', class extends Nectary
|
|
|
79
79
|
#onBlurReactHandler = () => {
|
|
80
80
|
getReactEventHandler(this, 'on-blur')?.();
|
|
81
81
|
};
|
|
82
|
-
}
|
|
82
|
+
}
|
|
83
|
+
defineCustomElement('sinch-segmented-icon-control-option', SegmentedIconControlOption);
|
package/select-button/index.d.ts
CHANGED
|
@@ -1,7 +1,28 @@
|
|
|
1
1
|
import '../text';
|
|
2
2
|
import '../icon';
|
|
3
|
+
import { NectaryElement } from '../utils';
|
|
3
4
|
import type { TSinchSelectButtonProps, TSinchSelectButtonStyle, TSinchSelectButtonEvents } from './types';
|
|
4
5
|
import type { NectaryComponentVanilla, NectaryComponentReact } from '../types';
|
|
6
|
+
import type { TSinchSize } from '../utils/size';
|
|
7
|
+
export declare class SelectButton 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 text(value: string);
|
|
15
|
+
get text(): string;
|
|
16
|
+
set placeholder(value: string | null);
|
|
17
|
+
get placeholder(): string | null;
|
|
18
|
+
set invalid(isInvalid: boolean);
|
|
19
|
+
get invalid(): boolean;
|
|
20
|
+
set disabled(isDisabled: boolean);
|
|
21
|
+
get disabled(): boolean;
|
|
22
|
+
set size(size: TSinchSize);
|
|
23
|
+
get size(): TSinchSize;
|
|
24
|
+
get focusable(): boolean;
|
|
25
|
+
}
|
|
5
26
|
declare global {
|
|
6
27
|
interface NectaryComponentMap {
|
|
7
28
|
'sinch-select-button': {
|
package/select-button/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import { DEFAULT_SIZE, sizeValues } from '../utils/size';
|
|
|
5
5
|
const templateHTML = '<style>:host{display:inline-block;vertical-align:middle;outline:0;cursor:pointer}:host([disabled]){cursor:initial}#wrapper{position:relative;display:flex;flex-direction:row;align-items:center;gap:8px;box-sizing:border-box;width:100%;height:var(--sinch-local-size);padding:0 8px 0 12px;background-color:var(--sinch-comp-select-button-color-default-background-initial);border-radius:var(--sinch-local-shape-radius);--sinch-local-size:var(--sinch-comp-select-button-size-container-m);--sinch-global-size-icon:var(--sinch-comp-select-button-size-icon-m);--sinch-local-shape-radius:var(--sinch-comp-select-button-shape-radius-size-m);--sinch-global-color-icon:var(--sinch-comp-select-button-color-default-icon-initial)}:host([data-size="l"])>#wrapper{--sinch-local-size:var(--sinch-comp-select-button-size-container-l);--sinch-global-size-icon:var(--sinch-comp-select-button-size-icon-l);--sinch-local-shape-radius:var(--sinch-comp-select-button-shape-radius-size-l)}:host([data-size="m"])>#wrapper{--sinch-local-size:var(--sinch-comp-select-button-size-container-m);--sinch-global-size-icon:var(--sinch-comp-select-button-size-icon-m);--sinch-local-shape-radius:var(--sinch-comp-select-button-shape-radius-size-m)}:host([data-size="s"])>#wrapper{--sinch-local-size:var(--sinch-comp-select-button-size-container-s);--sinch-global-size-icon:var(--sinch-comp-select-button-size-icon-s);--sinch-local-shape-radius:var(--sinch-comp-select-button-shape-radius-size-s)}:host([data-size="l"]) #wrapper{padding:0 12px}:host([data-size="m"]) #wrapper{padding:0 8px 0 12px}:host([data-size="s"]) #wrapper{padding:0 4px 0 12px}:host([disabled]) #wrapper{--sinch-global-color-icon:var(--sinch-comp-select-button-color-disabled-icon-initial)}#text{flex:1;min-width:0;--sinch-comp-text-font:var(--sinch-comp-select-button-font-input);--sinch-global-color-text:var(--sinch-comp-select-button-color-default-text-initial)}#text:empty{display:none}#placeholder{display:none;flex:1;min-width:0;--sinch-comp-text-font:var(--sinch-comp-select-button-font-placeholder);--sinch-global-color-text:var(--sinch-comp-select-button-color-default-placeholder-initial)}#text:empty+#placeholder{display:block}#border{position:absolute;border:1px solid var(--sinch-comp-select-button-color-default-border-initial);border-radius:var(--sinch-local-shape-radius);inset:0;pointer-events:none}:host(:focus-visible) #border{border-color:var(--sinch-comp-select-button-color-default-border-focus);border-width:2px}:host([invalid]) #border{border-color:var(--sinch-comp-select-button-color-invalid-border-initial)}:host([disabled]) #border{border-color:var(--sinch-comp-select-button-color-disabled-border-initial)}:host([disabled]) #text{--sinch-global-color-text:var(--sinch-comp-select-button-color-disabled-text-initial)}:host([disabled]) #placeholder{--sinch-global-color-text:var(--sinch-comp-select-button-color-disabled-placeholder-initial)}#left{display:flex;flex-direction:row;align-self:stretch;align-items:center;gap:4px;margin-left:-4px}#left.empty{display:none}#dropdown-icon{margin-left:-4px}</style><div id="wrapper" inert><div id="border"></div><div id="left"><slot name="left"></slot></div><slot name="icon"></slot><sinch-text id="text" type="m" ellipsis></sinch-text><sinch-text id="placeholder" type="m" ellipsis></sinch-text><sinch-icon icons-version="2" name="fa-chevron-down" id="dropdown-icon"></sinch-icon></div>';
|
|
6
6
|
const template = document.createElement('template');
|
|
7
7
|
template.innerHTML = templateHTML;
|
|
8
|
-
|
|
8
|
+
export class SelectButton extends NectaryElement {
|
|
9
9
|
#$text;
|
|
10
10
|
#$placeholder;
|
|
11
11
|
#$leftSlot;
|
|
@@ -199,4 +199,5 @@ defineCustomElement('sinch-select-button', class extends NectaryElement {
|
|
|
199
199
|
#onBlurReactHandler = () => {
|
|
200
200
|
getReactEventHandler(this, 'on-blur')?.();
|
|
201
201
|
};
|
|
202
|
-
}
|
|
202
|
+
}
|
|
203
|
+
defineCustomElement('sinch-select-button', SelectButton);
|
package/select-menu/index.d.ts
CHANGED
|
@@ -1,8 +1,38 @@
|
|
|
1
1
|
import '../input';
|
|
2
2
|
import '../icon';
|
|
3
3
|
import '../text';
|
|
4
|
+
import { NectaryElement } from '../utils';
|
|
4
5
|
import type { TSinchSelectMenu } from './types';
|
|
5
6
|
import type { NectaryComponentReact, NectaryComponentVanilla } from '../types';
|
|
7
|
+
export declare class SelectMenu extends NectaryElement {
|
|
8
|
+
#private;
|
|
9
|
+
static formAssociated: boolean;
|
|
10
|
+
constructor();
|
|
11
|
+
connectedCallback(): void;
|
|
12
|
+
disconnectedCallback(): void;
|
|
13
|
+
formAssociatedCallback(): void;
|
|
14
|
+
formResetCallback(): void;
|
|
15
|
+
formStateRestoreCallback(state: string | FormData | null): void;
|
|
16
|
+
static get observedAttributes(): string[];
|
|
17
|
+
attributeChangedCallback(name: string, oldVal: string | null, newVal: string | null): void;
|
|
18
|
+
set name(value: string);
|
|
19
|
+
get name(): string;
|
|
20
|
+
set value(value: string);
|
|
21
|
+
get value(): string;
|
|
22
|
+
set rows(value: number | null);
|
|
23
|
+
get rows(): number | null;
|
|
24
|
+
set multiple(isMultiple: boolean);
|
|
25
|
+
get multiple(): boolean;
|
|
26
|
+
set searchable(isSearchable: boolean | null);
|
|
27
|
+
get searchable(): boolean | null;
|
|
28
|
+
set 'search-autocomplete'(autocomplete: string);
|
|
29
|
+
get 'search-autocomplete'(): string;
|
|
30
|
+
set 'search-placeholder'(placeholder: string);
|
|
31
|
+
get 'search-placeholder'(): string;
|
|
32
|
+
set 'search-value'(value: string);
|
|
33
|
+
get 'search-value'(): string;
|
|
34
|
+
get focusable(): boolean;
|
|
35
|
+
}
|
|
6
36
|
declare global {
|
|
7
37
|
interface NectaryComponentMap {
|
|
8
38
|
'sinch-select-menu': TSinchSelectMenu;
|
package/select-menu/index.js
CHANGED
|
@@ -9,7 +9,7 @@ const ITEM_HEIGHT = 40;
|
|
|
9
9
|
const NUM_ITEMS_SEARCH = 7;
|
|
10
10
|
const template = document.createElement('template');
|
|
11
11
|
template.innerHTML = templateHTML;
|
|
12
|
-
|
|
12
|
+
export class SelectMenu extends NectaryElement {
|
|
13
13
|
#$optionSlot;
|
|
14
14
|
#$listbox;
|
|
15
15
|
#$search;
|
|
@@ -415,4 +415,5 @@ defineCustomElement('sinch-select-menu', class extends NectaryElement {
|
|
|
415
415
|
#onSearchChangeReactHandler = e => {
|
|
416
416
|
getReactEventHandler(this, 'on-search-change')?.(e);
|
|
417
417
|
};
|
|
418
|
-
}
|
|
418
|
+
}
|
|
419
|
+
defineCustomElement('sinch-select-menu', SelectMenu);
|
package/skeleton/index.d.ts
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
|
+
import { NectaryElement } from '../utils';
|
|
1
2
|
import type { TSinchSkeleton } from './types';
|
|
2
3
|
import type { NectaryComponentReact, NectaryComponentVanilla } from '../types';
|
|
4
|
+
export declare class Skeleton 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
|
+
}
|
|
3
12
|
declare global {
|
|
4
13
|
interface NectaryComponentMap {
|
|
5
14
|
'sinch-skeleton': TSinchSkeleton;
|
package/skeleton/index.js
CHANGED
|
@@ -4,7 +4,7 @@ const template = document.createElement('template');
|
|
|
4
4
|
template.innerHTML = templateHTML;
|
|
5
5
|
const ANIMATION_DURATION = 2000;
|
|
6
6
|
const BORDER_WIDTH = 1;
|
|
7
|
-
|
|
7
|
+
export class Skeleton extends NectaryElement {
|
|
8
8
|
#animation = null;
|
|
9
9
|
#shimmer;
|
|
10
10
|
#wrapper;
|
|
@@ -105,4 +105,5 @@ defineCustomElement('sinch-skeleton', class extends NectaryElement {
|
|
|
105
105
|
rect.setAttribute('rx', radius.toString());
|
|
106
106
|
this.#clip.appendChild(rect);
|
|
107
107
|
}
|
|
108
|
-
}
|
|
108
|
+
}
|
|
109
|
+
defineCustomElement('sinch-skeleton', Skeleton);
|
package/skeleton-item/index.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
import { NectaryElement } from '../utils';
|
|
1
2
|
import type { TSinchSkeletonItem } from './types';
|
|
2
3
|
import type { NectaryComponentReact, NectaryComponentVanilla } from '../types';
|
|
4
|
+
export declare class SkeletonItem extends NectaryElement {
|
|
5
|
+
constructor();
|
|
6
|
+
}
|
|
3
7
|
declare global {
|
|
4
8
|
interface NectaryComponentMap {
|
|
5
9
|
'sinch-skeleton-item': TSinchSkeletonItem;
|
package/skeleton-item/index.js
CHANGED
|
@@ -2,10 +2,11 @@ import { defineCustomElement, NectaryElement } from '../utils';
|
|
|
2
2
|
const templateHTML = '<style>:host{display:block;height:var(--sinch-sys-size-m);--sinch-local-shape-radius:var(--sinch-sys-shape-radius-m)}:host([size=xs]){height:var(--sinch-sys-size-xs);--sinch-local-shape-radius:var(--sinch-sys-shape-radius-xs)}:host([size="s"]){height:var(--sinch-sys-size-s);--sinch-local-shape-radius:var(--sinch-sys-shape-radius-s)}:host([size="m"]){height:var(--sinch-sys-size-m);--sinch-local-shape-radius:var(--sinch-sys-shape-radius-m)}:host([size="l"]){height:var(--sinch-sys-size-l);--sinch-local-shape-radius:var(--sinch-sys-shape-radius-l)}#content{height:100%;background-color:var(--sinch-sys-color-border-subtle);border-radius:var(--sinch-local-shape-radius)}</style><div id="content"></div>';
|
|
3
3
|
const template = document.createElement('template');
|
|
4
4
|
template.innerHTML = templateHTML;
|
|
5
|
-
|
|
5
|
+
export class SkeletonItem 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-skeleton-item', SkeletonItem);
|