@3t-transform/threeteeui 0.2.85 → 0.2.87
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/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/tttx-data-pattern.cjs.entry.js +25 -0
- package/dist/cjs/tttx-expander.cjs.entry.js +17 -6
- package/dist/cjs/{tttx-filter.cjs.entry.js → tttx-filter_4.cjs.entry.js} +209 -0
- package/dist/cjs/tttx-multiselect-box.cjs.entry.js +2 -2
- package/dist/cjs/tttx-tag.cjs.entry.js +3 -2
- package/dist/cjs/tttx.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/atoms/tttx-tag/tttx-tag.css +0 -1
- package/dist/collection/components/atoms/tttx-tag/tttx-tag.js +20 -1
- package/dist/collection/components/atoms/tttx-tag/tttx-tag.stories.js +8 -3
- package/dist/collection/components/molecules/tttx-expander/tttx-expander.css +13 -0
- package/dist/collection/components/molecules/tttx-expander/tttx-expander.js +26 -10
- package/dist/collection/components/molecules/tttx-expander/tttx-expander.stories.js +10 -10
- package/dist/collection/components/molecules/tttx-multiselect-box/tttx-multiselect-box.css +1 -3
- package/dist/collection/components/molecules/tttx-multiselect-box/tttx-multiselect-box.js +1 -1
- package/dist/collection/components/organisms/tttx-data-pattern/tttx-data-pattern.css +3 -0
- package/dist/collection/components/organisms/tttx-data-pattern/tttx-data-pattern.js +99 -0
- package/dist/collection/components/organisms/tttx-data-pattern/tttx-data-pattern.stories.js +35 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/tttx-data-pattern.d.ts +11 -0
- package/dist/components/tttx-data-pattern.js +86 -0
- package/dist/components/tttx-expander.js +20 -8
- package/dist/components/tttx-filter.js +1 -223
- package/dist/{esm/tttx-filter.entry.js → components/tttx-filter2.js} +44 -8
- package/dist/components/tttx-list.js +1 -92
- package/dist/{esm/tttx-list.entry.js → components/tttx-list2.js} +33 -9
- package/dist/components/tttx-multiselect-box.js +2 -2
- package/dist/components/tttx-sorter.js +1 -142
- package/dist/{esm/tttx-sorter.entry.js → components/tttx-sorter2.js} +38 -8
- package/dist/components/tttx-tag.js +5 -3
- package/dist/components/tttx-toolbar.js +1 -47
- package/dist/{esm/tttx-toolbar.entry.js → components/tttx-toolbar2.js} +25 -7
- package/dist/esm/loader.js +1 -1
- package/dist/esm/tttx-data-pattern.entry.js +21 -0
- package/dist/esm/tttx-expander.entry.js +17 -6
- package/dist/esm/tttx-filter_4.entry.js +395 -0
- package/dist/esm/tttx-multiselect-box.entry.js +2 -2
- package/dist/esm/tttx-tag.entry.js +3 -2
- package/dist/esm/tttx.js +1 -1
- package/dist/tttx/p-003798cb.entry.js +1 -0
- package/dist/tttx/p-02515882.entry.js +1 -0
- package/dist/tttx/p-1190c6e5.entry.js +1 -0
- package/dist/tttx/p-a2d59582.entry.js +1 -0
- package/dist/tttx/{p-8503e35b.entry.js → p-ebcf2c5f.entry.js} +1 -1
- package/dist/tttx/tttx.esm.js +1 -1
- package/dist/types/components/atoms/tttx-tag/tttx-tag.d.ts +1 -0
- package/dist/types/components/atoms/tttx-tag/tttx-tag.stories.d.ts +6 -0
- package/dist/types/components/molecules/tttx-expander/tttx-expander.d.ts +9 -3
- package/dist/types/components/organisms/tttx-data-pattern/tttx-data-pattern.d.ts +7 -0
- package/dist/types/components/organisms/tttx-data-pattern/tttx-data-pattern.stories.d.ts +13 -0
- package/dist/types/components.d.ts +26 -3
- package/package.json +1 -1
- package/dist/cjs/tttx-list.cjs.entry.js +0 -74
- package/dist/cjs/tttx-sorter.cjs.entry.js +0 -118
- package/dist/cjs/tttx-toolbar.cjs.entry.js +0 -35
- package/dist/tttx/p-0343ca04.entry.js +0 -1
- package/dist/tttx/p-4d349193.entry.js +0 -1
- package/dist/tttx/p-5ca83a07.entry.js +0 -1
- package/dist/tttx/p-7346c185.entry.js +0 -1
- package/dist/tttx/p-96d6a1ed.entry.js +0 -1
- package/dist/tttx/p-df198186.entry.js +0 -1
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { d as defineCustomElement$1 } from './tttx-icon2.js';
|
|
2
3
|
|
|
3
4
|
const tttxFilterCss = ".material-symbols-rounded{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}.material-symbols-rounded{font-family:\"Material Symbols Rounded\", sans-serif;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;color:#9e9e9e}.filter-container{background-color:white;position:relative}.filter-container .filter-button{display:inline-flex;justify-content:center;align-items:center;font-size:14px;font-weight:400;font-family:\"Roboto\", serif;text-transform:uppercase;color:#212121;border:1px solid #d5d5d5;border-radius:4px;background:transparent;height:36px;width:95px;margin:0;padding-right:16px;cursor:pointer}@media (max-width: 475px){.filter-container .filter-button{padding-left:4px}}.filter-container .filter-button .filter-icon{padding-left:8px;padding-right:4px}.filter-container .filter-button.--list-icon{font-size:0;width:36px;height:36px;padding:0}.filter-container .filter-button.--list-icon .filter-icon{padding:0}.filter-container .filter-button.--list-icon:hover{background:#e3e3e3}.filter-container .filter-button.--table-icon{font-size:0;width:36px;height:36px;padding:0;border:none}.filter-container .filter-button.--table-icon .filter-icon{padding:0;width:24px;height:24px}.filter-container .filter-button.--table-icon:hover{background:#e3e3e3;border-radius:50%;width:36px;height:36px}.filter-container .filter-button:hover{background:#e3e3e3}.filter-container .filter-popover-container{display:flex;flex-direction:column;gap:8px;border-radius:4px;box-shadow:0px 1px 5px #1111114D;position:absolute;top:36px;left:0px;background-color:white;padding:8px 16px}.filter-container .filter-popover-container .filter-header{color:#757575;text-transform:uppercase;font-size:14px;font-weight:500;font-family:\"Roboto\", serif;padding-top:4px;padding-bottom:5px}.filter-container .filter-popover-container .filter-options-container{display:flex;flex-direction:column;gap:4px;border-top:1px solid #d5d5d5;border-bottom:1px solid #d5d5d5;padding-bottom:8px}.filter-container .filter-popover-container .filter-option{display:flex;flex-direction:row;align-items:center;min-height:36px;padding-left:8px}.filter-container .filter-popover-container .filter-option .select-all-icon{padding-right:6px}.filter-container .filter-popover-container .filter-option .checkbox-icon{padding-right:8px}.filter-container .filter-popover-container .filter-option .filter-label{padding-left:8px;padding-bottom:3px;font-size:16px;font-weight:500;font-family:\"Roboto\", serif}.filter-container .filter-popover-container .filter-option:first-child{padding-top:8px}.filter-container .filter-popover-container .filter-popover-button-container{display:flex;justify-content:flex-end;align-items:center}.filter-container .filter-popover-container .filter-popover-button-container .close-button{height:36px;width:74px;background-color:white;border:1px solid #d5d5d5;border-radius:4px;text-transform:uppercase;margin-right:8px;font-size:14px;font-weight:400;font-family:\"Roboto\", serif;color:#212121}.filter-container .filter-popover-container .filter-popover-button-container .apply-button{height:36px;width:73px;background-color:#1479c6;color:white;border-radius:4px;border:none;text-transform:uppercase;font-size:14px;font-weight:400;font-family:\"Roboto\", serif}.filter-container .filter-popover-container.--with-search-field .filter-header{border-bottom:1px solid #d5d5d5}.filter-container .filter-popover-container.--with-search-field .search-field-container{position:relative;color:#d5d5d5;height:36px}.filter-container .filter-popover-container.--with-search-field .search-field-container .search-icon{position:absolute;top:6px;left:8px}.filter-container .filter-popover-container.--with-search-field .search-field-container .search-input{padding-left:36px;border:1px solid #d5d5d5;border-radius:4px;height:36px;width:100%;font-size:16px;font-family:\"Roboto\", serif;font-weight:500;box-sizing:border-box}.filter-container .filter-popover-container.--with-search-field .search-field-container .search-input:focus-visible,.filter-container .filter-popover-container.--with-search-field .search-field-container .search-input:focus{outline:none;border:1px solid #1479c6}.filter-container .filter-popover-container.--with-search-field .search-field-container .search-input::placeholder{color:#9e9e9e;font-size:16px;font-family:\"Roboto\", serif;font-weight:500}";
|
|
4
5
|
|
|
5
|
-
const TttxFilter = class {
|
|
6
|
-
constructor(
|
|
7
|
-
|
|
6
|
+
const TttxFilter = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
7
|
+
constructor() {
|
|
8
|
+
super();
|
|
9
|
+
this.__registerHost();
|
|
10
|
+
this.__attachShadow();
|
|
8
11
|
this.filterChangeEvent = createEvent(this, "filterChangeEvent", 7);
|
|
9
12
|
this.toggleFilter = createEvent(this, "toggleFilter", 7);
|
|
10
13
|
this.filterKey = undefined;
|
|
@@ -182,8 +185,41 @@ const TttxFilter = class {
|
|
|
182
185
|
return h("div", { class: 'filter-option', tabIndex: -1, onClick: () => this.onFilterOptionSelected(option.optionText), key: option.optionText }, h("tttx-icon", { icon: checkboxIcon, color: checkboxColor, class: 'checkbox-icon' }), this.showOptionIcons && h("tttx-icon", { icon: option.optionIcon, color: option.optionIconColor }), h("label", { class: 'filter-label' }, option.optionText));
|
|
183
186
|
})), h("div", { class: 'filter-popover-button-container' }, h("button", { type: 'button', class: 'close-button', onClick: this.onCloseButtonClick.bind(this) }, "Close"), h("button", { type: 'button', class: 'apply-button', onClick: this.onApplyFilterButtonClick.bind(this) }, "Apply")))))));
|
|
184
187
|
}
|
|
185
|
-
get el() { return
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
+
get el() { return this; }
|
|
189
|
+
static get style() { return tttxFilterCss; }
|
|
190
|
+
}, [1, "tttx-filter", {
|
|
191
|
+
"filterKey": [1, "filter-key"],
|
|
192
|
+
"filterOptions": [1, "filter-options"],
|
|
193
|
+
"showSelectAll": [4, "show-select-all"],
|
|
194
|
+
"showSearchField": [4, "show-search-field"],
|
|
195
|
+
"showOptionIcons": [4, "show-option-icons"],
|
|
196
|
+
"filterButtonStyle": [1, "filter-button-style"],
|
|
197
|
+
"filterHeader": [1, "filter-header"],
|
|
198
|
+
"defaultFilterOptions": [1, "default-filter-options"],
|
|
199
|
+
"popoverWidth": [1, "popover-width"],
|
|
200
|
+
"showPopover": [32],
|
|
201
|
+
"displayedFilterSettings": [32],
|
|
202
|
+
"selectedFilters": [32],
|
|
203
|
+
"filterSearchTerm": [32],
|
|
204
|
+
"allSelected": [32]
|
|
205
|
+
}, [[0, "closeFilter", "handleCloseFilter"]]]);
|
|
206
|
+
function defineCustomElement() {
|
|
207
|
+
if (typeof customElements === "undefined") {
|
|
208
|
+
return;
|
|
209
|
+
}
|
|
210
|
+
const components = ["tttx-filter", "tttx-icon"];
|
|
211
|
+
components.forEach(tagName => { switch (tagName) {
|
|
212
|
+
case "tttx-filter":
|
|
213
|
+
if (!customElements.get(tagName)) {
|
|
214
|
+
customElements.define(tagName, TttxFilter);
|
|
215
|
+
}
|
|
216
|
+
break;
|
|
217
|
+
case "tttx-icon":
|
|
218
|
+
if (!customElements.get(tagName)) {
|
|
219
|
+
defineCustomElement$1();
|
|
220
|
+
}
|
|
221
|
+
break;
|
|
222
|
+
} });
|
|
223
|
+
}
|
|
188
224
|
|
|
189
|
-
export { TttxFilter as
|
|
225
|
+
export { TttxFilter as T, defineCustomElement as d };
|
|
@@ -1,95 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { p as purify, d as domSanitiserOptions } from './domsanitiser.options.js';
|
|
3
|
-
import { d as defineCustomElement$2 } from './tttx-icon2.js';
|
|
4
|
-
|
|
5
|
-
const tttxListCss = ".material-symbols-rounded{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}.material-symbols-rounded{font-family:\"Material Symbols Rounded\", sans-serif;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;color:#9e9e9e}:host{display:flex;flex-direction:column}.list{margin:0;padding:0}li{display:flex;align-items:flex-start}li.item{list-style:none;margin:0;padding:8px;border-bottom:1px solid #d5d5d5;min-height:36px}li.item:first-of-type{border-top:1px solid #d5d5d5}li.item.clickable:hover{cursor:pointer}li.item.toggleable:hover{cursor:pointer}li.item.active{background-color:rgba(17, 17, 17, 0.1)}li.item.active:hover{background-color:rgba(17, 17, 17, 0.15)}li.item.selected{background-color:#ebfbfc}li.item.selected:hover{background-color:#e0f8f9}li.item.selected.active{background-color:#ccf3f6}li.item.selected.active:hover{background-color:#bff0f3}li.item .icons{display:flex;justify-content:flex-end;flex-grow:1;align-items:center;height:36px}li.item .icons tttx-icon:hover{cursor:pointer}li.item .icons *{display:flex}li.item:hover{background-color:rgba(17, 17, 17, 0.05)}.align-right{margin-left:auto}.item-content{display:flex;align-items:center;flex-grow:2;min-height:36px}.checkbox{padding:6px;margin-left:-8px}";
|
|
6
|
-
|
|
7
|
-
const TttxList$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
8
|
-
constructor() {
|
|
9
|
-
super();
|
|
10
|
-
this.__registerHost();
|
|
11
|
-
this.__attachShadow();
|
|
12
|
-
this.rowClick = createEvent(this, "listRowClick", 7);
|
|
13
|
-
this.rowCheckboxClick = createEvent(this, "listRowCheckboxClick", 7);
|
|
14
|
-
this.data = undefined;
|
|
15
|
-
this._data = undefined;
|
|
16
|
-
this.name = undefined;
|
|
17
|
-
}
|
|
18
|
-
onDataChange() {
|
|
19
|
-
if (!this.data) {
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
if (typeof this.data === 'string') {
|
|
23
|
-
this._data = JSON.parse(this.data);
|
|
24
|
-
}
|
|
25
|
-
else {
|
|
26
|
-
this._data = [...this.data];
|
|
27
|
-
}
|
|
28
|
-
for (const data of this._data) {
|
|
29
|
-
if (data.hasCheckbox && data.checked === undefined) {
|
|
30
|
-
data.checked = false;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
componentWillLoad() {
|
|
35
|
-
// dynamic constructor: any props can be added later
|
|
36
|
-
this.onDataChange();
|
|
37
|
-
}
|
|
38
|
-
onRowCheckboxHandler(event, item) {
|
|
39
|
-
event.stopPropagation();
|
|
40
|
-
if (!item.rowData)
|
|
41
|
-
return;
|
|
42
|
-
this.rowCheckboxClick.emit({ key: item.key, name: this.name, data: item.rowData });
|
|
43
|
-
}
|
|
44
|
-
onRowClickHandler(item) {
|
|
45
|
-
if ((!item.clickable && !item.toggleable) || !item.rowData)
|
|
46
|
-
return;
|
|
47
|
-
this.rowClick.emit({ key: item.key, name: this.name, data: item.rowData });
|
|
48
|
-
}
|
|
49
|
-
renderListItem(item) {
|
|
50
|
-
const cleanHTML = purify.sanitize(item.element, domSanitiserOptions);
|
|
51
|
-
return (h(Fragment, null, item.hasCheckbox && (h("div", { class: "checkbox" }, h("tttx-icon", { icon: item.checked ? 'check_box' : 'check_box_outline_blank', color: item.checked ? 'blue' : 'grey', onClick: event => {
|
|
52
|
-
this.onRowCheckboxHandler(event, item);
|
|
53
|
-
} }))), item.element && h("span", { class: "item-content", innerHTML: cleanHTML }), item.icon && (h("span", { class: "icons" }, h("tttx-icon", { class: "align-right", icon: item.icon, color: 'black' })))));
|
|
54
|
-
}
|
|
55
|
-
render() {
|
|
56
|
-
if (!this._data)
|
|
57
|
-
return;
|
|
58
|
-
return (h("ul", { class: "list" }, this._data.map((item) => (h("li", { key: item.key, class: 'item' +
|
|
59
|
-
(item.clickable ? ' clickable' : '') +
|
|
60
|
-
(item.toggleable ? ' toggleable' : '') +
|
|
61
|
-
(item.checked ? ' selected' : '') +
|
|
62
|
-
(item.active ? ' active' : ''), onClick: () => {
|
|
63
|
-
this.onRowClickHandler(item);
|
|
64
|
-
} }, this.renderListItem(item))))));
|
|
65
|
-
}
|
|
66
|
-
static get watchers() { return {
|
|
67
|
-
"data": ["onDataChange"]
|
|
68
|
-
}; }
|
|
69
|
-
static get style() { return tttxListCss; }
|
|
70
|
-
}, [1, "tttx-list", {
|
|
71
|
-
"data": [1025],
|
|
72
|
-
"name": [1],
|
|
73
|
-
"_data": [32]
|
|
74
|
-
}]);
|
|
75
|
-
function defineCustomElement$1() {
|
|
76
|
-
if (typeof customElements === "undefined") {
|
|
77
|
-
return;
|
|
78
|
-
}
|
|
79
|
-
const components = ["tttx-list", "tttx-icon"];
|
|
80
|
-
components.forEach(tagName => { switch (tagName) {
|
|
81
|
-
case "tttx-list":
|
|
82
|
-
if (!customElements.get(tagName)) {
|
|
83
|
-
customElements.define(tagName, TttxList$1);
|
|
84
|
-
}
|
|
85
|
-
break;
|
|
86
|
-
case "tttx-icon":
|
|
87
|
-
if (!customElements.get(tagName)) {
|
|
88
|
-
defineCustomElement$2();
|
|
89
|
-
}
|
|
90
|
-
break;
|
|
91
|
-
} });
|
|
92
|
-
}
|
|
1
|
+
import { T as TttxList$1, d as defineCustomElement$1 } from './tttx-list2.js';
|
|
93
2
|
|
|
94
3
|
const TttxList = TttxList$1;
|
|
95
4
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { p as purify, d as domSanitiserOptions } from './domsanitiser.options
|
|
3
|
-
import './
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Fragment } from '@stencil/core/internal/client';
|
|
2
|
+
import { p as purify, d as domSanitiserOptions } from './domsanitiser.options.js';
|
|
3
|
+
import { d as defineCustomElement$1 } from './tttx-icon2.js';
|
|
4
4
|
|
|
5
5
|
const tttxListCss = ".material-symbols-rounded{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}.material-symbols-rounded{font-family:\"Material Symbols Rounded\", sans-serif;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;color:#9e9e9e}:host{display:flex;flex-direction:column}.list{margin:0;padding:0}li{display:flex;align-items:flex-start}li.item{list-style:none;margin:0;padding:8px;border-bottom:1px solid #d5d5d5;min-height:36px}li.item:first-of-type{border-top:1px solid #d5d5d5}li.item.clickable:hover{cursor:pointer}li.item.toggleable:hover{cursor:pointer}li.item.active{background-color:rgba(17, 17, 17, 0.1)}li.item.active:hover{background-color:rgba(17, 17, 17, 0.15)}li.item.selected{background-color:#ebfbfc}li.item.selected:hover{background-color:#e0f8f9}li.item.selected.active{background-color:#ccf3f6}li.item.selected.active:hover{background-color:#bff0f3}li.item .icons{display:flex;justify-content:flex-end;flex-grow:1;align-items:center;height:36px}li.item .icons tttx-icon:hover{cursor:pointer}li.item .icons *{display:flex}li.item:hover{background-color:rgba(17, 17, 17, 0.05)}.align-right{margin-left:auto}.item-content{display:flex;align-items:center;flex-grow:2;min-height:36px}.checkbox{padding:6px;margin-left:-8px}";
|
|
6
6
|
|
|
7
|
-
const TttxList = class {
|
|
8
|
-
constructor(
|
|
9
|
-
|
|
7
|
+
const TttxList = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
8
|
+
constructor() {
|
|
9
|
+
super();
|
|
10
|
+
this.__registerHost();
|
|
11
|
+
this.__attachShadow();
|
|
10
12
|
this.rowClick = createEvent(this, "listRowClick", 7);
|
|
11
13
|
this.rowCheckboxClick = createEvent(this, "listRowCheckboxClick", 7);
|
|
12
14
|
this.data = undefined;
|
|
@@ -64,7 +66,29 @@ const TttxList = class {
|
|
|
64
66
|
static get watchers() { return {
|
|
65
67
|
"data": ["onDataChange"]
|
|
66
68
|
}; }
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
+
static get style() { return tttxListCss; }
|
|
70
|
+
}, [1, "tttx-list", {
|
|
71
|
+
"data": [1025],
|
|
72
|
+
"name": [1],
|
|
73
|
+
"_data": [32]
|
|
74
|
+
}]);
|
|
75
|
+
function defineCustomElement() {
|
|
76
|
+
if (typeof customElements === "undefined") {
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
const components = ["tttx-list", "tttx-icon"];
|
|
80
|
+
components.forEach(tagName => { switch (tagName) {
|
|
81
|
+
case "tttx-list":
|
|
82
|
+
if (!customElements.get(tagName)) {
|
|
83
|
+
customElements.define(tagName, TttxList);
|
|
84
|
+
}
|
|
85
|
+
break;
|
|
86
|
+
case "tttx-icon":
|
|
87
|
+
if (!customElements.get(tagName)) {
|
|
88
|
+
defineCustomElement$1();
|
|
89
|
+
}
|
|
90
|
+
break;
|
|
91
|
+
} });
|
|
92
|
+
}
|
|
69
93
|
|
|
70
|
-
export { TttxList as
|
|
94
|
+
export { TttxList as T, defineCustomElement as d };
|
|
@@ -4,7 +4,7 @@ import { d as defineCustomElement$4 } from './tttx-button2.js';
|
|
|
4
4
|
import { d as defineCustomElement$3 } from './tttx-icon2.js';
|
|
5
5
|
import { d as defineCustomElement$2 } from './tttx-standalone-input2.js';
|
|
6
6
|
|
|
7
|
-
const tttxMultiselectBoxCss = ".material-symbols-rounded{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}:host{display:flex;gap:4px}.label{font-size:16px;font-style:normal;font-weight:500;line-height:normal}:host(.inline) .label{padding-top:8px}:host(.block){flex-direction:column}.dropdown-container{
|
|
7
|
+
const tttxMultiselectBoxCss = ".material-symbols-rounded{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}:host{display:flex;gap:4px}.label{font-size:16px;font-style:normal;font-weight:500;line-height:normal}:host(.inline) .label{padding-top:8px}:host(.block){flex-direction:column}.dropdown-container{position:relative;display:flex;flex-direction:column;width:100%}.dropdown-container:focus-visible{outline:none}.dropdown-container:focus .dropdown-selector{border:1px solid #1479c6}.dropdown-selector,.dropdown-body{display:flex;border-radius:4px;background-color:white}.dropdown-selector{align-items:center;gap:8px;padding:6px 8px 6px 16px;cursor:pointer;border:1px solid #d5d5d5}.dropdown-selector-chevron{margin-left:auto;height:24px;align-self:flex-start}.dropdown-selector-chevron>tttx-icon{cursor:pointer}.dropdown-selector-html-content{display:flex;gap:8px;flex-wrap:wrap}.dropdown-body-container{position:relative}.dropdown-body{position:absolute;display:flex;position:absolute;flex-direction:column;box-shadow:0px 1px 5px #1111114D;padding-bottom:8px;border:1px solid #d5d5d5;width:100%}.dropdown-options-list{display:flex;flex-direction:column;overflow-y:auto;scrollbar-gutter:stable;max-height:288px}.dropdown-option{padding:6px 8px 6px 16px;cursor:pointer;display:flex;gap:8px}.dropdown-option .checkbox-icon{height:24px}.dropdown-option .plaintext-option{line-height:24px}.dropdown-option:hover{background-color:#1111110d}.dropdown-option:active,.dropdown-option.selected{background-color:#ebfbfc}.placeholder{color:#9e9e9e}.searchbox{padding:8px 16px 8px 16px;height:52px;box-sizing:border-box}.searchbox tttx-standalone-input{margin-top:-4px}.hidden{display:none}.footer{display:flex;gap:8px;flex-direction:row-reverse;padding:8px 16px 0 16px;border-top:1px solid #d5d5d5}";
|
|
8
8
|
|
|
9
9
|
const TttxMultiselectBox$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
10
10
|
constructor() {
|
|
@@ -125,7 +125,7 @@ const TttxMultiselectBox$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
|
|
|
125
125
|
const chevronIcon = this.open ? 'expand_less' : 'expand_more';
|
|
126
126
|
return (h(Host, { class: this.inline ? 'inline' : 'block' }, this.label && h("div", { class: "label" }, this.label), h("div", { tabindex: "0", class: "dropdown-container" }, h("div", { class: "dropdown-selector", onClick: this.onDropdownClicked.bind(this) }, this.dropdownSelectorContent(), h("div", { class: "dropdown-selector-chevron" }, h("tttx-icon", { icon: chevronIcon, color: "black" }))), this.open && (h("div", { class: "dropdown-body-container" }, h("div", { class: "dropdown-body", style: Object.assign({}, this.bodyOffset) }, this.searchEnabled &&
|
|
127
127
|
/* istanbul ignore next */
|
|
128
|
-
h("div", { class: "searchbox" }, h("tttx-standalone-input", { type: "text", label: "", required: true, showerrorbubble: false, iconleft: 'search', onInput: this.handleSearchInput.bind(this), inline: true })), h("div", { class: "dropdown-options-list" }, this.unsavedSelectedItems.map((option) => {
|
|
128
|
+
h("div", { class: "searchbox" }, h("tttx-standalone-input", { type: "text", placeholder: 'Search', label: "", required: true, showerrorbubble: false, iconleft: 'search', onInput: this.handleSearchInput.bind(this), inline: true })), h("div", { class: "dropdown-options-list" }, this.unsavedSelectedItems.map((option) => {
|
|
129
129
|
return this.dropdownOption(option);
|
|
130
130
|
})), h("div", { class: 'footer' }, h("tttx-button", { design: "primary", onClick: this.applyChanges.bind(this) }, "Apply"), h("tttx-button", { onClick: this.onCancel.bind(this) }, "Cancel"))))))));
|
|
131
131
|
}
|
|
@@ -1,145 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { d as defineCustomElement$2 } from './tttx-icon2.js';
|
|
3
|
-
|
|
4
|
-
const tttxSorterCss = ".material-symbols-rounded{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}.sorter-container{display:flex;flex-direction:row;position:relative;border:1px solid #d5d5d5;border-radius:4px;font-weight:400;box-sizing:border-box;height:36px;cursor:pointer;width:220px}@media (max-width: 475px){.sorter-container{width:68px}}.sorter-container .arrow-toggle-button{display:inline-flex;justify-content:center;align-items:center;flex-direction:column;background-color:white;border:none;border-bottom-left-radius:4px;border-top-left-radius:4px}@media (max-width: 475px){.sorter-container .arrow-toggle-button{padding-right:0px;padding-left:8px}}.sorter-container .arrow-toggle-button .hydrated{display:flex;justify-content:center;align-items:center;cursor:pointer}.sorter-container .arrow-toggle-button span{display:block;margin:auto;line-height:16px}.sorter-container .arrow-toggle-button .material-symbols-rounded{color:#212121}.sorter-container .dropdown-selector{display:inline-flex;position:relative;flex-grow:1}.sorter-container .dropdown-selector .dropdown-selector-button{display:inline-flex;flex-direction:row;gap:4px;padding-right:4px;align-items:center;color:#212121;width:100%}@media (max-width: 475px){.sorter-container .dropdown-selector .dropdown-selector-button .dropdown-selector-text{display:none}}.sorter-container .dropdown-selector .dropdown-selector-chevron{display:inline-flex;margin-left:auto;right:0;top:0;flex-direction:row;align-items:center;height:36px}.sorter-container .dropdown-selector .dropdown-selector-chevron .hydrated{height:24px;cursor:pointer}@media (max-width: 475px){.sorter-container .dropdown-selector .dropdown-selector-chevron{padding-right:2px}}.sorter-container .dropdown-options-list{position:absolute;top:36px;left:0;z-index:1;width:220px;line-height:21px;font-size:16px;border-radius:4px;padding-top:8px;padding-bottom:7px;box-shadow:0px 1px 5px #1111114D;box-sizing:border-box;background-color:white}@media (max-width: 475px){.sorter-container .dropdown-options-list{width:220px;padding-top:8px}}.sorter-container .dropdown-options-list .dropdown-option{padding:8px 16px;font-size:16px;line-height:21px}.sorter-container .dropdown-options-list .dropdown-option:hover,.sorter-container .dropdown-options-list .dropdown-option:focus{background-color:#ebfbfc}.sorter-container.--expanded{border-color:#1579c6}@media (max-width: 475px){.sorter-container.--expanded{border:none}}";
|
|
5
|
-
|
|
6
|
-
const TttxSorter$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
7
|
-
constructor() {
|
|
8
|
-
super();
|
|
9
|
-
this.__registerHost();
|
|
10
|
-
this.__attachShadow();
|
|
11
|
-
this.sorterChangeEvent = createEvent(this, "sorterChangeEvent", 7);
|
|
12
|
-
this.toggleSorter = createEvent(this, "toggleSorter", 7);
|
|
13
|
-
this.sorterKey = undefined;
|
|
14
|
-
this.defaultSortDirection = 'descending';
|
|
15
|
-
this.fieldOptionsData = null;
|
|
16
|
-
this.defaultOption = '';
|
|
17
|
-
this.selectedField = this.defaultOption;
|
|
18
|
-
this.sortDirection = this.defaultSortDirection;
|
|
19
|
-
this.dropdownExpand = false;
|
|
20
|
-
this.dropdownOptions = undefined;
|
|
21
|
-
}
|
|
22
|
-
handleCloseSorter() {
|
|
23
|
-
this.dropdownExpand = false;
|
|
24
|
-
}
|
|
25
|
-
emitSortEvent() {
|
|
26
|
-
this.sorterChangeEvent.emit({
|
|
27
|
-
sorterDirection: this.sortDirection,
|
|
28
|
-
sorterKey: this.sorterKey,
|
|
29
|
-
sortField: this.selectedField,
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
onSortToggleClick(event) {
|
|
33
|
-
event.preventDefault();
|
|
34
|
-
if (this.sortDirection == 'ascending') {
|
|
35
|
-
this.sortDirection = 'descending';
|
|
36
|
-
}
|
|
37
|
-
else {
|
|
38
|
-
this.sortDirection = 'ascending';
|
|
39
|
-
}
|
|
40
|
-
this.emitSortEvent();
|
|
41
|
-
}
|
|
42
|
-
onDropdownClicked() {
|
|
43
|
-
this.dropdownExpand = !this.dropdownExpand;
|
|
44
|
-
this.toggleSorter.emit(this.dropdownExpand);
|
|
45
|
-
}
|
|
46
|
-
onDropdownSelected(event) {
|
|
47
|
-
this.dropdownExpand = false;
|
|
48
|
-
const target = event.target;
|
|
49
|
-
this.selectedField = target.innerHTML;
|
|
50
|
-
this.emitSortEvent();
|
|
51
|
-
this.toggleSorter.emit(this.dropdownExpand);
|
|
52
|
-
}
|
|
53
|
-
// getOptionsList() {
|
|
54
|
-
// return this.el.shadowRoot.querySelectorAll('.dropdown-option');
|
|
55
|
-
// }
|
|
56
|
-
// /* istanbul ignore next */
|
|
57
|
-
// @Listen('keyup')
|
|
58
|
-
// handleKeyDown(ev: KeyboardEvent) {
|
|
59
|
-
// const keyboardEventValue = ev.key;
|
|
60
|
-
// if (document.activeElement.id != `sorter__${this.sorterKey}`) return;
|
|
61
|
-
// switch (keyboardEventValue) {
|
|
62
|
-
// case 'Enter':
|
|
63
|
-
// if (this._focussedElementIndex > -1) {
|
|
64
|
-
// const options = this.el.shadowRoot.querySelectorAll('.dropdown-option');
|
|
65
|
-
// this.selectedField = options[this._focussedElementIndex].innerHTML;
|
|
66
|
-
// this.emitSortEvent();
|
|
67
|
-
// }
|
|
68
|
-
// this.dropdownExpand = false;
|
|
69
|
-
// break;
|
|
70
|
-
// case 'Escape':
|
|
71
|
-
// this.dropdownExpand = false;
|
|
72
|
-
// break;
|
|
73
|
-
// case 'ArrowDown':
|
|
74
|
-
// this.dropdownExpand = true;
|
|
75
|
-
// if (this._focussedElementIndex > -1) {
|
|
76
|
-
// const options = this.getOptionsList();
|
|
77
|
-
// const currentOption = options[this._focussedElementIndex] as HTMLElement;
|
|
78
|
-
// currentOption.blur();
|
|
79
|
-
// options[this._focussedElementIndex].focus();
|
|
80
|
-
// this._focussedElementIndex + 1 < options.length ? this._focussedElementIndex++ : (this._focussedElementIndex = 0);
|
|
81
|
-
// } else {
|
|
82
|
-
// this._focussedElementIndex++;
|
|
83
|
-
// }
|
|
84
|
-
// break;
|
|
85
|
-
// case 'ArrowUp':
|
|
86
|
-
// this.dropdownExpand = true;
|
|
87
|
-
// if (this._focussedElementIndex == -1) {
|
|
88
|
-
// const options = this.getOptionsList();
|
|
89
|
-
// this._focussedElementIndex = options.length - 1;
|
|
90
|
-
// } else {
|
|
91
|
-
// const options = this.getOptionsList();
|
|
92
|
-
// const currentOption = options[this._focussedElementIndex] as HTMLElement;
|
|
93
|
-
// currentOption.blur();
|
|
94
|
-
// this._focussedElementIndex > 0 ? this._focussedElementIndex-- : (this._focussedElementIndex = options.length - 1);
|
|
95
|
-
// options[this._focussedElementIndex].focus();
|
|
96
|
-
// }
|
|
97
|
-
// break;
|
|
98
|
-
// }
|
|
99
|
-
// }
|
|
100
|
-
render() {
|
|
101
|
-
const parsedFieldOptionsData = typeof this.fieldOptionsData === 'string' ? JSON.parse(this.fieldOptionsData) : this.fieldOptionsData;
|
|
102
|
-
if (!this.fieldOptionsData)
|
|
103
|
-
return;
|
|
104
|
-
const arrowIcon = this.sortDirection == 'ascending' ? 'arrow_upward' : 'arrow_downward';
|
|
105
|
-
const chevronIcon = this.dropdownExpand ? 'expand_less' : 'expand_more';
|
|
106
|
-
const selectedOption = this.selectedField;
|
|
107
|
-
const dropdownSelectorClassNameModifier = this.dropdownExpand ? '--expanded' : '';
|
|
108
|
-
const sorterKey = `sorter__${this.sorterKey}`;
|
|
109
|
-
return (h(Host, { id: sorterKey }, h("div", { tabindex: 0, class: `sorter-container ${dropdownSelectorClassNameModifier}` }, h("button", { class: "arrow-toggle-button", type: "button", onClick: this.onSortToggleClick.bind(this) }, h("tttx-icon", { icon: arrowIcon, color: "black" })), h("div", { class: "dropdown-selector", onClick: this.onDropdownClicked.bind(this) }, h("div", { class: "dropdown-selector-button" }, h("div", { class: "dropdown-selector-text" }, selectedOption), h("div", { class: "dropdown-selector-chevron" }, h("tttx-icon", { icon: chevronIcon, color: "black" })))), this.dropdownExpand && (h("div", { class: "dropdown-options-list" }, parsedFieldOptionsData.sorterOptions.map(option => {
|
|
110
|
-
return (h("div", { class: "dropdown-option", tabIndex: -1, onClick: this.onDropdownSelected.bind(this), key: option.optionLabel }, option.optionLabel));
|
|
111
|
-
}))))));
|
|
112
|
-
}
|
|
113
|
-
get el() { return this; }
|
|
114
|
-
static get style() { return tttxSorterCss; }
|
|
115
|
-
}, [1, "tttx-sorter", {
|
|
116
|
-
"sorterKey": [1, "sorter-key"],
|
|
117
|
-
"defaultSortDirection": [1, "default-sort-direction"],
|
|
118
|
-
"fieldOptionsData": [1, "field-options-data"],
|
|
119
|
-
"defaultOption": [1, "default-option"],
|
|
120
|
-
"selectedField": [32],
|
|
121
|
-
"sortDirection": [32],
|
|
122
|
-
"dropdownExpand": [32],
|
|
123
|
-
"dropdownOptions": [32]
|
|
124
|
-
}, [[0, "closeSorter", "handleCloseSorter"]]]);
|
|
125
|
-
function defineCustomElement$1() {
|
|
126
|
-
if (typeof customElements === "undefined") {
|
|
127
|
-
return;
|
|
128
|
-
}
|
|
129
|
-
const components = ["tttx-sorter", "tttx-icon"];
|
|
130
|
-
components.forEach(tagName => { switch (tagName) {
|
|
131
|
-
case "tttx-sorter":
|
|
132
|
-
if (!customElements.get(tagName)) {
|
|
133
|
-
customElements.define(tagName, TttxSorter$1);
|
|
134
|
-
}
|
|
135
|
-
break;
|
|
136
|
-
case "tttx-icon":
|
|
137
|
-
if (!customElements.get(tagName)) {
|
|
138
|
-
defineCustomElement$2();
|
|
139
|
-
}
|
|
140
|
-
break;
|
|
141
|
-
} });
|
|
142
|
-
}
|
|
1
|
+
import { T as TttxSorter$1, d as defineCustomElement$1 } from './tttx-sorter2.js';
|
|
143
2
|
|
|
144
3
|
const TttxSorter = TttxSorter$1;
|
|
145
4
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { d as defineCustomElement$1 } from './tttx-icon2.js';
|
|
2
3
|
|
|
3
4
|
const tttxSorterCss = ".material-symbols-rounded{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}.sorter-container{display:flex;flex-direction:row;position:relative;border:1px solid #d5d5d5;border-radius:4px;font-weight:400;box-sizing:border-box;height:36px;cursor:pointer;width:220px}@media (max-width: 475px){.sorter-container{width:68px}}.sorter-container .arrow-toggle-button{display:inline-flex;justify-content:center;align-items:center;flex-direction:column;background-color:white;border:none;border-bottom-left-radius:4px;border-top-left-radius:4px}@media (max-width: 475px){.sorter-container .arrow-toggle-button{padding-right:0px;padding-left:8px}}.sorter-container .arrow-toggle-button .hydrated{display:flex;justify-content:center;align-items:center;cursor:pointer}.sorter-container .arrow-toggle-button span{display:block;margin:auto;line-height:16px}.sorter-container .arrow-toggle-button .material-symbols-rounded{color:#212121}.sorter-container .dropdown-selector{display:inline-flex;position:relative;flex-grow:1}.sorter-container .dropdown-selector .dropdown-selector-button{display:inline-flex;flex-direction:row;gap:4px;padding-right:4px;align-items:center;color:#212121;width:100%}@media (max-width: 475px){.sorter-container .dropdown-selector .dropdown-selector-button .dropdown-selector-text{display:none}}.sorter-container .dropdown-selector .dropdown-selector-chevron{display:inline-flex;margin-left:auto;right:0;top:0;flex-direction:row;align-items:center;height:36px}.sorter-container .dropdown-selector .dropdown-selector-chevron .hydrated{height:24px;cursor:pointer}@media (max-width: 475px){.sorter-container .dropdown-selector .dropdown-selector-chevron{padding-right:2px}}.sorter-container .dropdown-options-list{position:absolute;top:36px;left:0;z-index:1;width:220px;line-height:21px;font-size:16px;border-radius:4px;padding-top:8px;padding-bottom:7px;box-shadow:0px 1px 5px #1111114D;box-sizing:border-box;background-color:white}@media (max-width: 475px){.sorter-container .dropdown-options-list{width:220px;padding-top:8px}}.sorter-container .dropdown-options-list .dropdown-option{padding:8px 16px;font-size:16px;line-height:21px}.sorter-container .dropdown-options-list .dropdown-option:hover,.sorter-container .dropdown-options-list .dropdown-option:focus{background-color:#ebfbfc}.sorter-container.--expanded{border-color:#1579c6}@media (max-width: 475px){.sorter-container.--expanded{border:none}}";
|
|
4
5
|
|
|
5
|
-
const TttxSorter = class {
|
|
6
|
-
constructor(
|
|
7
|
-
|
|
6
|
+
const TttxSorter = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
7
|
+
constructor() {
|
|
8
|
+
super();
|
|
9
|
+
this.__registerHost();
|
|
10
|
+
this.__attachShadow();
|
|
8
11
|
this.sorterChangeEvent = createEvent(this, "sorterChangeEvent", 7);
|
|
9
12
|
this.toggleSorter = createEvent(this, "toggleSorter", 7);
|
|
10
13
|
this.sorterKey = undefined;
|
|
@@ -107,8 +110,35 @@ const TttxSorter = class {
|
|
|
107
110
|
return (h("div", { class: "dropdown-option", tabIndex: -1, onClick: this.onDropdownSelected.bind(this), key: option.optionLabel }, option.optionLabel));
|
|
108
111
|
}))))));
|
|
109
112
|
}
|
|
110
|
-
get el() { return
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
+
get el() { return this; }
|
|
114
|
+
static get style() { return tttxSorterCss; }
|
|
115
|
+
}, [1, "tttx-sorter", {
|
|
116
|
+
"sorterKey": [1, "sorter-key"],
|
|
117
|
+
"defaultSortDirection": [1, "default-sort-direction"],
|
|
118
|
+
"fieldOptionsData": [1, "field-options-data"],
|
|
119
|
+
"defaultOption": [1, "default-option"],
|
|
120
|
+
"selectedField": [32],
|
|
121
|
+
"sortDirection": [32],
|
|
122
|
+
"dropdownExpand": [32],
|
|
123
|
+
"dropdownOptions": [32]
|
|
124
|
+
}, [[0, "closeSorter", "handleCloseSorter"]]]);
|
|
125
|
+
function defineCustomElement() {
|
|
126
|
+
if (typeof customElements === "undefined") {
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
const components = ["tttx-sorter", "tttx-icon"];
|
|
130
|
+
components.forEach(tagName => { switch (tagName) {
|
|
131
|
+
case "tttx-sorter":
|
|
132
|
+
if (!customElements.get(tagName)) {
|
|
133
|
+
customElements.define(tagName, TttxSorter);
|
|
134
|
+
}
|
|
135
|
+
break;
|
|
136
|
+
case "tttx-icon":
|
|
137
|
+
if (!customElements.get(tagName)) {
|
|
138
|
+
defineCustomElement$1();
|
|
139
|
+
}
|
|
140
|
+
break;
|
|
141
|
+
} });
|
|
142
|
+
}
|
|
113
143
|
|
|
114
|
-
export { TttxSorter as
|
|
144
|
+
export { TttxSorter as T, defineCustomElement as d };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
|
|
3
|
-
const tttxTagCss = ".material-symbols-rounded{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}button{cursor:pointer}.button{font-family:Roboto, serif;box-sizing:border-box;height:36px;min-width:36px;padding:0;margin:0;background:transparent;color:#212121;border:1px solid #c8c8c8;border-radius:4px;text-transform:uppercase;display:flex;justify-content:left;align-items:center;font-size:14px;font-weight:500}.button-content{display:block;padding:0 16px}.icon-left,.icon-right{margin-top:4px}.iconleft{padding-left:8px}.iconleft .button-content{padding-left:4px}.iconright{padding-right:8px}.iconright .button-content{padding-right:4px}.notext{padding:0 6px}.button:active{background:rgba(17, 17, 17, 0.2);border:1px solid #d5d5d5}.primary{background:#1479c6;border:1px solid #1479c6;color:white}.primary:active{background:#1464a2;border:1px solid #1464a2}.borderless{background:transparent;border:none;color:#212121}.borderless:active{background:rgba(17, 17, 17, 0.2);border:none}.borderless-circle{background:transparent;border:none;color:#212121;border-radius:50%}.borderless-circle:active{border:none}.borderless-circle:focus{border-color:transparent}.danger{background:#dc0000;border:1px solid #dc0000;color:white}.danger:active{background:#b00000;border:1px solid #b00000}.disabled{background:#aeaeae;border:none;color:#4c4c4c;cursor:not-allowed}.disabled:active{background:#aeaeae;border:none;color:#4c4c4c;cursor:not-allowed}@media (hover: hover){.button:hover{background:rgba(17, 17, 17, 0.1);border:1px solid #d5d5d5}.primary:hover{background:#146eb3;border:1px solid #146eb3}.borderless:hover{background:rgba(17, 17, 17, 0.1);border:none}.borderless-circle:hover{background:rgba(17, 17, 17, 0.1);border:none}.danger:hover{background:#c60000;border:1px solid #c60000}.disabled:hover{background:#aeaeae;border:none;color:#4c4c4c;cursor:not-allowed}}:host{display:inline-block}.tag{border-radius:20px;padding:4px;font-family:\"Roboto\", sans-serif;font-size:14px;font-weight:400}.tag span{margin-left:4px;margin-right:4px
|
|
3
|
+
const tttxTagCss = ".material-symbols-rounded{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}button{cursor:pointer}.button{font-family:Roboto, serif;box-sizing:border-box;height:36px;min-width:36px;padding:0;margin:0;background:transparent;color:#212121;border:1px solid #c8c8c8;border-radius:4px;text-transform:uppercase;display:flex;justify-content:left;align-items:center;font-size:14px;font-weight:500}.button-content{display:block;padding:0 16px}.icon-left,.icon-right{margin-top:4px}.iconleft{padding-left:8px}.iconleft .button-content{padding-left:4px}.iconright{padding-right:8px}.iconright .button-content{padding-right:4px}.notext{padding:0 6px}.button:active{background:rgba(17, 17, 17, 0.2);border:1px solid #d5d5d5}.primary{background:#1479c6;border:1px solid #1479c6;color:white}.primary:active{background:#1464a2;border:1px solid #1464a2}.borderless{background:transparent;border:none;color:#212121}.borderless:active{background:rgba(17, 17, 17, 0.2);border:none}.borderless-circle{background:transparent;border:none;color:#212121;border-radius:50%}.borderless-circle:active{border:none}.borderless-circle:focus{border-color:transparent}.danger{background:#dc0000;border:1px solid #dc0000;color:white}.danger:active{background:#b00000;border:1px solid #b00000}.disabled{background:#aeaeae;border:none;color:#4c4c4c;cursor:not-allowed}.disabled:active{background:#aeaeae;border:none;color:#4c4c4c;cursor:not-allowed}@media (hover: hover){.button:hover{background:rgba(17, 17, 17, 0.1);border:1px solid #d5d5d5}.primary:hover{background:#146eb3;border:1px solid #146eb3}.borderless:hover{background:rgba(17, 17, 17, 0.1);border:none}.borderless-circle:hover{background:rgba(17, 17, 17, 0.1);border:none}.danger:hover{background:#c60000;border:1px solid #c60000}.disabled:hover{background:#aeaeae;border:none;color:#4c4c4c;cursor:not-allowed}}:host{display:inline-block}.tag{border-radius:20px;padding:4px;font-family:\"Roboto\", sans-serif;font-size:14px;font-weight:400}.tag span{margin-left:4px;margin-right:4px}.icon{height:18px;width:18px;font-weight:400}";
|
|
4
4
|
|
|
5
5
|
const TttxTag$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
6
6
|
constructor() {
|
|
@@ -9,14 +9,16 @@ const TttxTag$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
9
9
|
this.__attachShadow();
|
|
10
10
|
this.text = undefined;
|
|
11
11
|
this.color = '#d5d5d5';
|
|
12
|
+
this.textColor = '#212121';
|
|
12
13
|
}
|
|
13
14
|
render() {
|
|
14
|
-
return (h(Host, null, h("div", { class: "tag", style: { 'background-color': this.color } }, h("span", null, this.text))));
|
|
15
|
+
return (h(Host, null, h("div", { class: "tag", style: { 'background-color': this.color, color: this.textColor } }, h("span", null, this.text))));
|
|
15
16
|
}
|
|
16
17
|
static get style() { return tttxTagCss; }
|
|
17
18
|
}, [1, "tttx-tag", {
|
|
18
19
|
"text": [1],
|
|
19
|
-
"color": [1]
|
|
20
|
+
"color": [1],
|
|
21
|
+
"textColor": [1, "text-color"]
|
|
20
22
|
}]);
|
|
21
23
|
function defineCustomElement$1() {
|
|
22
24
|
if (typeof customElements === "undefined") {
|
|
@@ -1,50 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
const tttxToolbarCss = ".container{display:flex;align-items:flex-end;row-gap:8px;padding:8px 0;flex-wrap:wrap}.container.bordered{border-bottom:1px solid #d5d5d5}.desktop ::slotted([slot=before]){flex:1 1 0px}.desktop ::slotted([slot=center]){flex:0 1 fit-content}.desktop ::slotted([slot=after]){flex:1 1 0px}::slotted([slot=before]){display:flex;align-items:flex-end;flex-wrap:wrap;gap:8px}::slotted([slot=center]){display:flex;justify-content:center;align-items:flex-end;flex-wrap:wrap;gap:8px}::slotted([slot=after]){display:flex;justify-content:end;align-items:flex-end;flex-wrap:wrap;gap:8px}";
|
|
4
|
-
|
|
5
|
-
const TttxToolbar$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
6
|
-
constructor() {
|
|
7
|
-
super();
|
|
8
|
-
this.__registerHost();
|
|
9
|
-
this.__attachShadow();
|
|
10
|
-
this.border = true;
|
|
11
|
-
this.viewSize = undefined;
|
|
12
|
-
}
|
|
13
|
-
handleResize() {
|
|
14
|
-
this.setViewSize();
|
|
15
|
-
}
|
|
16
|
-
async componentWillLoad() {
|
|
17
|
-
this.setViewSize();
|
|
18
|
-
}
|
|
19
|
-
setViewSize() {
|
|
20
|
-
if (window.innerWidth < 698) {
|
|
21
|
-
this.viewSize = 'mobile';
|
|
22
|
-
}
|
|
23
|
-
else {
|
|
24
|
-
this.viewSize = 'desktop';
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
render() {
|
|
28
|
-
return (h(Host, null, h("div", { class: `container ${this.border ? 'bordered' : ''} ${this.viewSize}` }, h("slot", { name: 'before' }), h("slot", { name: 'center' }), h("slot", { name: 'after' }))));
|
|
29
|
-
}
|
|
30
|
-
static get style() { return tttxToolbarCss; }
|
|
31
|
-
}, [1, "tttx-toolbar", {
|
|
32
|
-
"border": [4],
|
|
33
|
-
"viewSize": [32]
|
|
34
|
-
}, [[9, "resize", "handleResize"]]]);
|
|
35
|
-
function defineCustomElement$1() {
|
|
36
|
-
if (typeof customElements === "undefined") {
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
const components = ["tttx-toolbar"];
|
|
40
|
-
components.forEach(tagName => { switch (tagName) {
|
|
41
|
-
case "tttx-toolbar":
|
|
42
|
-
if (!customElements.get(tagName)) {
|
|
43
|
-
customElements.define(tagName, TttxToolbar$1);
|
|
44
|
-
}
|
|
45
|
-
break;
|
|
46
|
-
} });
|
|
47
|
-
}
|
|
1
|
+
import { T as TttxToolbar$1, d as defineCustomElement$1 } from './tttx-toolbar2.js';
|
|
48
2
|
|
|
49
3
|
const TttxToolbar = TttxToolbar$1;
|
|
50
4
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
|
|
3
3
|
const tttxToolbarCss = ".container{display:flex;align-items:flex-end;row-gap:8px;padding:8px 0;flex-wrap:wrap}.container.bordered{border-bottom:1px solid #d5d5d5}.desktop ::slotted([slot=before]){flex:1 1 0px}.desktop ::slotted([slot=center]){flex:0 1 fit-content}.desktop ::slotted([slot=after]){flex:1 1 0px}::slotted([slot=before]){display:flex;align-items:flex-end;flex-wrap:wrap;gap:8px}::slotted([slot=center]){display:flex;justify-content:center;align-items:flex-end;flex-wrap:wrap;gap:8px}::slotted([slot=after]){display:flex;justify-content:end;align-items:flex-end;flex-wrap:wrap;gap:8px}";
|
|
4
4
|
|
|
5
|
-
const TttxToolbar = class {
|
|
6
|
-
constructor(
|
|
7
|
-
|
|
5
|
+
const TttxToolbar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
6
|
+
constructor() {
|
|
7
|
+
super();
|
|
8
|
+
this.__registerHost();
|
|
9
|
+
this.__attachShadow();
|
|
8
10
|
this.border = true;
|
|
9
11
|
this.viewSize = undefined;
|
|
10
12
|
}
|
|
@@ -25,7 +27,23 @@ const TttxToolbar = class {
|
|
|
25
27
|
render() {
|
|
26
28
|
return (h(Host, null, h("div", { class: `container ${this.border ? 'bordered' : ''} ${this.viewSize}` }, h("slot", { name: 'before' }), h("slot", { name: 'center' }), h("slot", { name: 'after' }))));
|
|
27
29
|
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
+
static get style() { return tttxToolbarCss; }
|
|
31
|
+
}, [1, "tttx-toolbar", {
|
|
32
|
+
"border": [4],
|
|
33
|
+
"viewSize": [32]
|
|
34
|
+
}, [[9, "resize", "handleResize"]]]);
|
|
35
|
+
function defineCustomElement() {
|
|
36
|
+
if (typeof customElements === "undefined") {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
const components = ["tttx-toolbar"];
|
|
40
|
+
components.forEach(tagName => { switch (tagName) {
|
|
41
|
+
case "tttx-toolbar":
|
|
42
|
+
if (!customElements.get(tagName)) {
|
|
43
|
+
customElements.define(tagName, TttxToolbar);
|
|
44
|
+
}
|
|
45
|
+
break;
|
|
46
|
+
} });
|
|
47
|
+
}
|
|
30
48
|
|
|
31
|
-
export { TttxToolbar as
|
|
49
|
+
export { TttxToolbar as T, defineCustomElement as d };
|
package/dist/esm/loader.js
CHANGED
|
@@ -11,7 +11,7 @@ const patchEsm = () => {
|
|
|
11
11
|
const defineCustomElements = (win, options) => {
|
|
12
12
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
13
13
|
return patchEsm().then(() => {
|
|
14
|
-
return bootstrapLazy([["tttx-multiselect-box",[[1,"tttx-multiselect-box",{"optionsData":[1,"options-data"],"label":[1],"inline":[4],"placeholder":[1],"searchEnabled":[4,"search-enabled"],"htmlVisibleValue":[4,"html-visible-value"],"visibleValue":[1,"visible-value"],"open":[32],"unsavedSelectedItems":[32],"searchTerm":[32]},[[0,"closeSelectBox","handleCloseSelectBox"],[0,"blur","handleBlur"]]]]],["tttx-dialog-box",[[1,"tttx-dialog-box",{"data":[1025],"size":[1],"open":[1028],"allowOverflow":[4,"allow-overflow"],"elementSize":[32]},[[9,"resize","handleResize"]]]]],["tttx-select-box",[[1,"tttx-select-box",{"optionsData":[1,"options-data"],"label":[1],"inline":[4],"placeholder":[1],"searchEnabled":[4,"search-enabled"],"selectedValue":[1,"selected-value"],"open":[32],"selectedItem":[32],"searchTerm":[32]},[[0,"closeSelectBox","handleCloseSelectBox"],[0,"blur","handleBlur"]]]]],["tttx-tree-view",[[1,"tttx-tree-view",{"data":[1040],"treeData":[32],"selectedId":[32]}]]],["tttx-expander",[[1,"tttx-expander",{"name":[1],"
|
|
14
|
+
return bootstrapLazy([["tttx-data-pattern",[[1,"tttx-data-pattern",{"data":[1],"sorteroptions":[1],"filteroptions":[1],"filterheader":[1]}]]],["tttx-multiselect-box",[[1,"tttx-multiselect-box",{"optionsData":[1,"options-data"],"label":[1],"inline":[4],"placeholder":[1],"searchEnabled":[4,"search-enabled"],"htmlVisibleValue":[4,"html-visible-value"],"visibleValue":[1,"visible-value"],"open":[32],"unsavedSelectedItems":[32],"searchTerm":[32]},[[0,"closeSelectBox","handleCloseSelectBox"],[0,"blur","handleBlur"]]]]],["tttx-dialog-box",[[1,"tttx-dialog-box",{"data":[1025],"size":[1],"open":[1028],"allowOverflow":[4,"allow-overflow"],"elementSize":[32]},[[9,"resize","handleResize"]]]]],["tttx-select-box",[[1,"tttx-select-box",{"optionsData":[1,"options-data"],"label":[1],"inline":[4],"placeholder":[1],"searchEnabled":[4,"search-enabled"],"selectedValue":[1,"selected-value"],"open":[32],"selectedItem":[32],"searchTerm":[32]},[[0,"closeSelectBox","handleCloseSelectBox"],[0,"blur","handleBlur"]]]]],["tttx-tree-view",[[1,"tttx-tree-view",{"data":[1040],"treeData":[32],"selectedId":[32]}]]],["tttx-expander",[[1,"tttx-expander",{"name":[1],"open":[4],"lefticon":[1],"lefticoncolor":[1],"isExpanded":[32]}]]],["tttx-tabs",[[2,"tttx-tabs",{"tabsName":[1,"tabs-name"],"navigation":[4],"wide":[4],"tabs":[1],"_tabs":[32]},[[0,"keydown","handleKeyDown"]]]]],["tttx-form",[[1,"tttx-form",{"formschema":[1025],"data":[1032],"submit":[64]}]]],["tttx-keyvalue-block",[[1,"tttx-keyvalue-block",{"keyvalues":[1],"horizontal":[4],"spacedout":[4],"_elements":[32]}]]],["tttx-loading-spinner",[[1,"tttx-loading-spinner",{"loadingMessage":[1028,"loading-message"],"size":[1025]}]]],["tttx-percentage-bar",[[2,"tttx-percentage-bar",{"percentage":[8],"thresholds":[1],"color":[1],"min":[1],"labelid":[1],"_percentage":[32],"_ranges":[32],"_min":[32]}]]],["tttx-qrcode",[[1,"tttx-qrcode",{"link":[1025],"size":[1026]}]]],["tttx-tag",[[1,"tttx-tag",{"text":[1],"color":[1],"textColor":[1,"text-color"]}]]],["tttx-textarea",[[2,"tttx-textarea",{"label":[1],"secondarylabel":[1],"showerrormsg":[4],"showerrorbubble":[4],"errormsg":[1],"rows":[2],"textareaautofocus":[4],"inputkeyhint":[1],"inputindex":[8],"inputtitle":[1],"disabled":[4],"maxlength":[8],"name":[1],"placeholder":[1],"readonly":[8],"required":[4],"value":[1032]}]]],["tttx-icon",[[1,"tttx-icon",{"icon":[1],"color":[1]}]]],["tttx-standalone-input",[[2,"tttx-standalone-input",{"label":[1],"secondarylabel":[1],"showerrormsg":[4],"showerrorbubble":[4],"errormsg":[1],"iconleft":[1],"iconleftcolor":[1],"iconright":[1],"iconrightcolor":[1],"inputicon":[1],"inputiconcolor":[1],"inline":[4],"inputautocapitalize":[1],"inputautofocus":[4],"inputkeyhint":[1],"inputindex":[8],"inputtitle":[1],"autocomplete":[1],"checked":[4],"disabled":[4],"max":[8],"maxlength":[8],"min":[8],"minlength":[8],"name":[1],"pattern":[1],"placeholder":[1],"readonly":[8],"required":[4],"step":[8],"type":[1],"value":[1032]}]]],["tttx-filter_4",[[1,"tttx-filter",{"filterKey":[1,"filter-key"],"filterOptions":[1,"filter-options"],"showSelectAll":[4,"show-select-all"],"showSearchField":[4,"show-search-field"],"showOptionIcons":[4,"show-option-icons"],"filterButtonStyle":[1,"filter-button-style"],"filterHeader":[1,"filter-header"],"defaultFilterOptions":[1,"default-filter-options"],"popoverWidth":[1,"popover-width"],"showPopover":[32],"displayedFilterSettings":[32],"selectedFilters":[32],"filterSearchTerm":[32],"allSelected":[32]},[[0,"closeFilter","handleCloseFilter"]]],[1,"tttx-list",{"data":[1025],"name":[1],"_data":[32]}],[1,"tttx-sorter",{"sorterKey":[1,"sorter-key"],"defaultSortDirection":[1,"default-sort-direction"],"fieldOptionsData":[1,"field-options-data"],"defaultOption":[1,"default-option"],"selectedField":[32],"sortDirection":[32],"dropdownExpand":[32],"dropdownOptions":[32]},[[0,"closeSorter","handleCloseSorter"]]],[1,"tttx-toolbar",{"border":[4],"viewSize":[32]},[[9,"resize","handleResize"]]]]],["tttx-button",[[1,"tttx-button",{"notext":[4],"icon":[1],"iconposition":[1],"iconcolor":[1025],"design":[1]}]]]], options);
|
|
15
15
|
});
|
|
16
16
|
};
|
|
17
17
|
|