@nectary/components 0.24.0 → 0.26.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/colors.json +2 -0
- package/dialog/index.js +2 -2
- package/icons/add/index.d.ts +11 -0
- package/icons/add/index.js +4 -0
- package/icons/add-box/index.d.ts +11 -0
- package/icons/add-box/index.js +4 -0
- package/icons/add-circle/index.d.ts +11 -0
- package/icons/add-circle/index.js +4 -0
- package/icons/add-circle-outline/index.d.ts +11 -0
- package/icons/add-circle-outline/index.js +4 -0
- package/icons/amp-stories/index.d.ts +11 -0
- package/icons/amp-stories/index.js +4 -0
- package/icons/archive/index.d.ts +11 -0
- package/icons/archive/index.js +4 -0
- package/icons/attach-file/index.d.ts +11 -0
- package/icons/attach-file/index.js +4 -0
- package/icons/attach-money/index.d.ts +11 -0
- package/icons/attach-money/index.js +4 -0
- package/icons/attribution/index.d.ts +11 -0
- package/icons/attribution/index.js +4 -0
- package/icons/backspace/index.d.ts +11 -0
- package/icons/backspace/index.js +4 -0
- package/icons/ballot/index.d.ts +11 -0
- package/icons/ballot/index.js +4 -0
- package/icons/bar-chart/index.d.ts +11 -0
- package/icons/bar-chart/index.js +4 -0
- package/icons/biotech/index.d.ts +11 -0
- package/icons/biotech/index.js +4 -0
- package/icons/block/index.d.ts +11 -0
- package/icons/block/index.js +4 -0
- package/icons/border-all/index.d.ts +11 -0
- package/icons/border-all/index.js +4 -0
- package/icons/border-bottom/index.d.ts +11 -0
- package/icons/border-bottom/index.js +4 -0
- package/icons/border-clear/index.d.ts +11 -0
- package/icons/border-clear/index.js +4 -0
- package/icons/border-horizontal/index.d.ts +11 -0
- package/icons/border-horizontal/index.js +4 -0
- package/icons/border-inner/index.d.ts +11 -0
- package/icons/border-inner/index.js +4 -0
- package/icons/border-left/index.d.ts +11 -0
- package/icons/border-left/index.js +4 -0
- package/icons/border-outer/index.d.ts +11 -0
- package/icons/border-outer/index.js +4 -0
- package/icons/border-right/index.d.ts +11 -0
- package/icons/border-right/index.js +4 -0
- package/icons/border-style/index.d.ts +11 -0
- package/icons/border-style/index.js +4 -0
- package/icons/border-top/index.d.ts +11 -0
- package/icons/border-top/index.js +4 -0
- package/icons/border-vertical/index.d.ts +11 -0
- package/icons/border-vertical/index.js +4 -0
- package/icons/bubble-chart/index.d.ts +11 -0
- package/icons/bubble-chart/index.js +4 -0
- package/icons/calculate/index.d.ts +11 -0
- package/icons/calculate/index.js +4 -0
- package/icons/clear/index.d.ts +11 -0
- package/icons/clear/index.js +4 -0
- package/icons/content-copy/index.d.ts +11 -0
- package/icons/content-copy/index.js +4 -0
- package/icons/content-cut/index.d.ts +11 -0
- package/icons/content-cut/index.js +4 -0
- package/icons/content-paste/index.d.ts +11 -0
- package/icons/content-paste/index.js +4 -0
- package/icons/delete-sweep/index.d.ts +11 -0
- package/icons/delete-sweep/index.js +4 -0
- package/icons/drafts/index.d.ts +11 -0
- package/icons/drafts/index.js +4 -0
- package/icons/drag-handle/index.d.ts +11 -0
- package/icons/drag-handle/index.js +4 -0
- package/icons/dynamic-feed/index.d.ts +11 -0
- package/icons/dynamic-feed/index.js +4 -0
- package/icons/file-copy/index.d.ts +11 -0
- package/icons/file-copy/index.js +4 -0
- package/icons/flag/index.d.ts +11 -0
- package/icons/flag/index.js +4 -0
- package/icons/font-download/index.d.ts +11 -0
- package/icons/font-download/index.js +4 -0
- package/icons/format-align-center/index.d.ts +11 -0
- package/icons/format-align-center/index.js +4 -0
- package/icons/format-align-justify/index.d.ts +11 -0
- package/icons/format-align-justify/index.js +4 -0
- package/icons/format-align-left/index.d.ts +11 -0
- package/icons/format-align-left/index.js +4 -0
- package/icons/format-align-right/index.d.ts +11 -0
- package/icons/format-align-right/index.js +4 -0
- package/icons/format-bold/index.d.ts +11 -0
- package/icons/format-bold/index.js +4 -0
- package/icons/format-clear/index.d.ts +11 -0
- package/icons/format-clear/index.js +4 -0
- package/icons/format-color-reset/index.d.ts +11 -0
- package/icons/format-color-reset/index.js +4 -0
- package/icons/format-indent-decrease/index.d.ts +11 -0
- package/icons/format-indent-decrease/index.js +4 -0
- package/icons/format-indent-increase/index.d.ts +11 -0
- package/icons/format-indent-increase/index.js +4 -0
- package/icons/format-italic/index.d.ts +11 -0
- package/icons/format-italic/index.js +4 -0
- package/icons/format-line-spacing/index.d.ts +11 -0
- package/icons/format-line-spacing/index.js +4 -0
- package/icons/format-list-bulleted/index.d.ts +11 -0
- package/icons/format-list-bulleted/index.js +4 -0
- package/icons/format-list-numbered/index.d.ts +11 -0
- package/icons/format-list-numbered/index.js +4 -0
- package/icons/format-list-numbered-rtl/index.d.ts +11 -0
- package/icons/format-list-numbered-rtl/index.js +4 -0
- package/icons/format-paint/index.d.ts +11 -0
- package/icons/format-paint/index.js +4 -0
- package/icons/format-quote/index.d.ts +11 -0
- package/icons/format-quote/index.js +4 -0
- package/icons/format-shapes/index.d.ts +11 -0
- package/icons/format-shapes/index.js +4 -0
- package/icons/format-size/index.d.ts +11 -0
- package/icons/format-size/index.js +4 -0
- package/icons/format-strikethrough/index.d.ts +11 -0
- package/icons/format-strikethrough/index.js +4 -0
- package/icons/format-textdirection-l-to-r/index.d.ts +11 -0
- package/icons/format-textdirection-l-to-r/index.js +4 -0
- package/icons/format-textdirection-r-to-l/index.d.ts +11 -0
- package/icons/format-textdirection-r-to-l/index.js +4 -0
- package/icons/format-underlined/index.d.ts +11 -0
- package/icons/format-underlined/index.js +4 -0
- package/icons/forward/index.d.ts +11 -0
- package/icons/forward/index.js +4 -0
- package/icons/functions/index.d.ts +11 -0
- package/icons/functions/index.js +4 -0
- package/icons/gesture/index.d.ts +11 -0
- package/icons/gesture/index.js +4 -0
- package/icons/height/index.d.ts +11 -0
- package/icons/height/index.js +4 -0
- package/icons/highlight/index.d.ts +11 -0
- package/icons/highlight/index.js +4 -0
- package/icons/horizontal-rule/index.d.ts +11 -0
- package/icons/horizontal-rule/index.js +4 -0
- package/icons/how-to-reg/index.d.ts +11 -0
- package/icons/how-to-reg/index.js +4 -0
- package/icons/how-to-vote/index.d.ts +11 -0
- package/icons/how-to-vote/index.js +4 -0
- package/icons/inbox/index.d.ts +11 -0
- package/icons/inbox/index.js +4 -0
- package/icons/insert-chart/index.d.ts +11 -0
- package/icons/insert-chart/index.js +4 -0
- package/icons/insert-chart-outlined/index.d.ts +11 -0
- package/icons/insert-chart-outlined/index.js +4 -0
- package/icons/insert-comment/index.d.ts +11 -0
- package/icons/insert-comment/index.js +4 -0
- package/icons/insert-drive-file/index.d.ts +11 -0
- package/icons/insert-drive-file/index.js +4 -0
- package/icons/insert-emoticon/index.js +1 -1
- package/icons/insert-invitation/index.d.ts +11 -0
- package/icons/insert-invitation/index.js +4 -0
- package/icons/insert-link/index.d.ts +11 -0
- package/icons/insert-link/index.js +4 -0
- package/icons/insert-photo/index.d.ts +11 -0
- package/icons/insert-photo/index.js +4 -0
- package/icons/insights/index.d.ts +11 -0
- package/icons/insights/index.js +4 -0
- package/icons/linear-scale/index.d.ts +11 -0
- package/icons/linear-scale/index.js +4 -0
- package/icons/link/index.d.ts +11 -0
- package/icons/link/index.js +4 -0
- package/icons/link-off/index.d.ts +11 -0
- package/icons/link-off/index.js +4 -0
- package/icons/low-priority/index.d.ts +11 -0
- package/icons/low-priority/index.js +4 -0
- package/icons/mail/index.d.ts +11 -0
- package/icons/mail/index.js +4 -0
- package/icons/markunread/index.d.ts +11 -0
- package/icons/markunread/index.js +4 -0
- package/icons/merge-type/index.d.ts +11 -0
- package/icons/merge-type/index.js +4 -0
- package/icons/mode/index.d.ts +11 -0
- package/icons/mode/index.js +4 -0
- package/icons/mode-comment/index.d.ts +11 -0
- package/icons/mode-comment/index.js +4 -0
- package/icons/monetization-on/index.d.ts +11 -0
- package/icons/monetization-on/index.js +4 -0
- package/icons/money-off/index.d.ts +11 -0
- package/icons/money-off/index.js +4 -0
- package/icons/money-off-csred/index.d.ts +11 -0
- package/icons/money-off-csred/index.js +4 -0
- package/icons/move-to-inbox/index.d.ts +11 -0
- package/icons/move-to-inbox/index.js +4 -0
- package/icons/multiline-chart/index.d.ts +11 -0
- package/icons/multiline-chart/index.js +4 -0
- package/icons/next-week/index.d.ts +11 -0
- package/icons/next-week/index.js +4 -0
- package/icons/notes/index.js +1 -1
- package/icons/outlined-flag/index.d.ts +11 -0
- package/icons/outlined-flag/index.js +4 -0
- package/icons/pie-chart/index.d.ts +11 -0
- package/icons/pie-chart/index.js +4 -0
- package/icons/pie-chart-outline/index.d.ts +11 -0
- package/icons/pie-chart-outline/index.js +4 -0
- package/icons/policy/index.d.ts +11 -0
- package/icons/policy/index.js +4 -0
- package/icons/post-add/index.d.ts +11 -0
- package/icons/post-add/index.js +4 -0
- package/icons/publish/index.d.ts +11 -0
- package/icons/publish/index.js +4 -0
- package/icons/push-pin/index.d.ts +11 -0
- package/icons/push-pin/index.js +4 -0
- package/icons/redo/index.d.ts +11 -0
- package/icons/redo/index.js +4 -0
- package/icons/remove/index.d.ts +11 -0
- package/icons/remove/index.js +4 -0
- package/icons/remove-circle/index.d.ts +11 -0
- package/icons/remove-circle/index.js +4 -0
- package/icons/remove-circle-outline/index.d.ts +11 -0
- package/icons/remove-circle-outline/index.js +4 -0
- package/icons/reply-all/index.d.ts +11 -0
- package/icons/reply-all/index.js +4 -0
- package/icons/report/index.d.ts +11 -0
- package/icons/report/index.js +4 -0
- package/icons/report-off/index.d.ts +11 -0
- package/icons/report-off/index.js +4 -0
- package/icons/report-outline/index.d.ts +11 -0
- package/icons/report-outline/index.js +4 -0
- package/icons/save/index.d.ts +11 -0
- package/icons/save/index.js +4 -0
- package/icons/save-alt/index.d.ts +11 -0
- package/icons/save-alt/index.js +4 -0
- package/icons/scatter-plot/index.d.ts +11 -0
- package/icons/scatter-plot/index.js +4 -0
- package/icons/score/index.d.ts +11 -0
- package/icons/score/index.js +4 -0
- package/icons/select-all/index.d.ts +11 -0
- package/icons/select-all/index.js +4 -0
- package/icons/short-text/index.d.ts +11 -0
- package/icons/short-text/index.js +4 -0
- package/icons/show-chart/index.d.ts +11 -0
- package/icons/show-chart/index.js +4 -0
- package/icons/smart-toy/index.d.ts +11 -0
- package/icons/smart-toy/index.js +4 -0
- package/icons/sort/index.d.ts +11 -0
- package/icons/sort/index.js +4 -0
- package/icons/space-bar/index.d.ts +11 -0
- package/icons/space-bar/index.js +4 -0
- package/icons/square-foot/index.d.ts +11 -0
- package/icons/square-foot/index.js +4 -0
- package/icons/stacked-line-chart/index.d.ts +11 -0
- package/icons/stacked-line-chart/index.js +4 -0
- package/icons/strikethrough-s/index.d.ts +11 -0
- package/icons/strikethrough-s/index.js +4 -0
- package/icons/subscript/index.d.ts +11 -0
- package/icons/subscript/index.js +4 -0
- package/icons/superscript/index.d.ts +11 -0
- package/icons/superscript/index.js +4 -0
- package/icons/table-chart/index.d.ts +11 -0
- package/icons/table-chart/index.js +4 -0
- package/icons/table-rows/index.d.ts +11 -0
- package/icons/table-rows/index.js +4 -0
- package/icons/text-fields/index.d.ts +11 -0
- package/icons/text-fields/index.js +4 -0
- package/icons/text-format/index.d.ts +11 -0
- package/icons/text-format/index.js +4 -0
- package/icons/title/index.d.ts +11 -0
- package/icons/title/index.js +4 -0
- package/icons/unarchive/index.d.ts +11 -0
- package/icons/unarchive/index.js +4 -0
- package/icons/vertical-align-bottom/index.d.ts +11 -0
- package/icons/vertical-align-bottom/index.js +4 -0
- package/icons/vertical-align-center/index.d.ts +11 -0
- package/icons/vertical-align-center/index.js +4 -0
- package/icons/vertical-align-top/index.d.ts +11 -0
- package/icons/vertical-align-top/index.js +4 -0
- package/icons/waves/index.d.ts +11 -0
- package/icons/waves/index.js +4 -0
- package/icons/weekend/index.d.ts +11 -0
- package/icons/weekend/index.js +4 -0
- package/icons/where-to-vote/index.d.ts +11 -0
- package/icons/where-to-vote/index.js +4 -0
- package/icons/wrap-text/index.d.ts +11 -0
- package/icons/wrap-text/index.js +4 -0
- package/index.d.ts +137 -0
- package/index.js +138 -1
- package/package.json +3 -5
- package/popover/index.js +1 -1
- package/search/index.js +55 -42
- package/search-option/index.d.ts +1 -1
- package/search-option/index.js +4 -4
- package/segment/index.d.ts +2 -1
- package/segment/index.js +16 -3
- package/segment-collapse/index.d.ts +1 -0
- package/segment-collapse/index.js +23 -25
- package/segmented-control/index.d.ts +20 -0
- package/segmented-control/index.js +208 -0
- package/segmented-control-option/index.d.ts +29 -0
- package/segmented-control-option/index.js +112 -0
- package/segmented-icon-control/index.d.ts +22 -0
- package/segmented-icon-control/index.js +126 -0
- package/segmented-icon-control-option/index.d.ts +27 -0
- package/segmented-icon-control-option/index.js +103 -0
- package/tabs/index.js +1 -1
- package/tabs-option/index.js +10 -26
package/tabs-option/index.js
CHANGED
|
@@ -1,27 +1,26 @@
|
|
|
1
1
|
import _classPrivateFieldGet from '@babel/runtime/helpers/classPrivateFieldGet';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _onClick;
|
|
4
4
|
|
|
5
5
|
function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
|
|
6
6
|
|
|
7
7
|
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
|
8
8
|
|
|
9
9
|
import { defineCustomElement, getAttribute, getBooleanAttribute, isAttrTrue, NectaryElement, updateAttribute, updateBooleanAttribute } from '../utils';
|
|
10
|
-
const templateHTML = '<style>:host{display:
|
|
10
|
+
const templateHTML = '<style>:host{display:block;outline:0}:host()>*{pointer-events:none}#wrapper{display:flex;flex-direction:row;align-items:center;gap:12px;position:relative;width:100%;height:42px;padding:8px 20px;box-sizing:border-box;box-shadow:0 1px 0 0 var(--sinch-color-stormy-100);color:var(--sinch-color-stormy-500);background-color:var(--sinch-color-snow-100);--sinch-color-icon:var(--sinch-color-stormy-500);--sinch-size-icon:16px}#content{font:var(--sinch-font-title-s);flex-shrink:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host([checked]:not([checked=false])) #wrapper{box-shadow:0 2px 0 0 var(--sinch-color-stormy-500)}#button{all:initial;position:absolute;left:0;top:0;box-sizing:border-box;width:100%;height:100%;cursor:pointer}#button:disabled{cursor:unset}:host([disabled]:not([disabled=false])) #wrapper{color:var(--sinch-color-stormy-100);--sinch-color-icon:var(--sinch-color-stormy-100)}</style><div id="wrapper"><slot name="icon"></slot><label for="input" id="content"></label> <button id="button" type="radio"/></div>';
|
|
11
11
|
export const isTabsOptionElement = element => {
|
|
12
12
|
return element instanceof Element && element.tagName === 'SINCH-TABS-OPTION';
|
|
13
13
|
};
|
|
14
14
|
const template = document.createElement('template');
|
|
15
15
|
template.innerHTML = templateHTML;
|
|
16
|
-
defineCustomElement('sinch-tabs-option', (
|
|
16
|
+
defineCustomElement('sinch-tabs-option', (_onClick = new WeakMap(), class extends NectaryElement {
|
|
17
17
|
constructor() {
|
|
18
18
|
super();
|
|
19
19
|
|
|
20
|
-
_classPrivateFieldInitSpec(this,
|
|
20
|
+
_classPrivateFieldInitSpec(this, _onClick, {
|
|
21
21
|
writable: true,
|
|
22
22
|
value: e => {
|
|
23
23
|
e.stopPropagation();
|
|
24
|
-
this.$input.checked = false;
|
|
25
24
|
this.dispatchEvent(new CustomEvent('change', {
|
|
26
25
|
bubbles: true,
|
|
27
26
|
detail: this.value
|
|
@@ -31,17 +30,17 @@ defineCustomElement('sinch-tabs-option', (_onInput = new WeakMap(), class extend
|
|
|
31
30
|
|
|
32
31
|
const shadowRoot = this.attachShadow();
|
|
33
32
|
shadowRoot.appendChild(template.content.cloneNode(true));
|
|
34
|
-
this.$
|
|
33
|
+
this.$button = shadowRoot.querySelector('#button');
|
|
35
34
|
this.$label = shadowRoot.querySelector('#content');
|
|
36
35
|
}
|
|
37
36
|
|
|
38
37
|
connectedCallback() {
|
|
39
38
|
this.setAttribute('role', 'tab');
|
|
40
|
-
this.$
|
|
39
|
+
this.$button.addEventListener('click', _classPrivateFieldGet(this, _onClick));
|
|
41
40
|
}
|
|
42
41
|
|
|
43
42
|
disconnectedCallback() {
|
|
44
|
-
this.$
|
|
43
|
+
this.$button.removeEventListener('click', _classPrivateFieldGet(this, _onClick));
|
|
45
44
|
}
|
|
46
45
|
|
|
47
46
|
static get observedAttributes() {
|
|
@@ -90,39 +89,24 @@ defineCustomElement('sinch-tabs-option', (_onInput = new WeakMap(), class extend
|
|
|
90
89
|
|
|
91
90
|
case 'checked':
|
|
92
91
|
{
|
|
93
|
-
const isChecked = isAttrTrue(newVal);
|
|
94
|
-
this.$input.checked = isChecked;
|
|
95
|
-
|
|
96
|
-
if (isChecked) {
|
|
97
|
-
this.scrollIntoView?.({
|
|
98
|
-
block: 'nearest'
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
|
|
102
92
|
updateAttribute(this, 'aria-selected', isAttrTrue(newVal));
|
|
103
93
|
break;
|
|
104
94
|
}
|
|
105
95
|
|
|
106
96
|
case 'disabled':
|
|
107
97
|
{
|
|
108
|
-
this.$
|
|
109
|
-
break;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
case 'value':
|
|
113
|
-
{
|
|
114
|
-
this.$input.value = newVal ?? '';
|
|
98
|
+
this.$button.disabled = isAttrTrue(newVal);
|
|
115
99
|
break;
|
|
116
100
|
}
|
|
117
101
|
}
|
|
118
102
|
}
|
|
119
103
|
|
|
120
104
|
focus() {
|
|
121
|
-
this.$
|
|
105
|
+
this.$button.focus();
|
|
122
106
|
}
|
|
123
107
|
|
|
124
108
|
blur() {
|
|
125
|
-
this.$
|
|
109
|
+
this.$button.blur();
|
|
126
110
|
}
|
|
127
111
|
|
|
128
112
|
}));
|