@3t-transform/threeteeui 0.0.11 → 0.0.13
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-list.cjs.entry.js +198 -0
- package/dist/cjs/tttx-standalone-input.cjs.entry.js +9 -7
- package/dist/cjs/tttx.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/molecules/tttx-list/tttx-list.css +56 -0
- package/dist/collection/components/molecules/tttx-list/tttx-list.js +311 -0
- package/dist/collection/components/molecules/tttx-list/tttx-list.stories.js +37 -0
- package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.js +37 -29
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/tttx-list.d.ts +11 -0
- package/dist/components/tttx-list.js +225 -0
- package/dist/components/tttx-loading-spinner.js +1 -38
- package/dist/components/tttx-loading-spinner2.js +40 -0
- package/dist/components/tttx-standalone-input.js +10 -10
- package/dist/esm/loader.js +1 -1
- package/dist/esm/tttx-list.entry.js +194 -0
- package/dist/esm/tttx-standalone-input.entry.js +9 -7
- package/dist/esm/tttx.js +1 -1
- package/dist/tttx/p-25953f82.entry.js +1 -0
- package/dist/tttx/p-2b6720ac.entry.js +1 -0
- package/dist/tttx/tttx.esm.js +1 -1
- package/dist/types/components/molecules/tttx-list/tttx-list.d.ts +51 -0
- package/dist/types/components/molecules/tttx-list/tttx-list.stories.d.ts +13 -0
- package/dist/types/components/molecules/tttx-standalone-input/tttx-standalone-input.d.ts +4 -4
- package/dist/types/components.d.ts +26 -2
- package/package.json +1 -1
- package/dist/tttx/p-338b3976.entry.js +0 -1
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-63c4d25e.js';
|
|
2
|
+
|
|
3
|
+
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}.tttx-list__row{min-height:52px;line-height:36px;padding:8px;display:flex;flex-direction:row;align-items:center;cursor:pointer;border-bottom:1px solid #d5d5d5}.tttx-list__row .generic-template__content{width:100%;display:flex;align-items:center;gap:8px}.tttx-list__row:first-of-type{border-top:1px solid #d5d5d5}.tttx-list__row:focus,.tttx-list__row:active{background-color:#e6e6e6}.tttx-list__row.selected{background-color:#e7f1f9}.load-indicator{display:flex;justify-content:center}";
|
|
4
|
+
|
|
5
|
+
const TttxList = class {
|
|
6
|
+
constructor(hostRef) {
|
|
7
|
+
registerInstance(this, hostRef);
|
|
8
|
+
this.listPaginate = createEvent(this, "listPaginate", 7);
|
|
9
|
+
this.listSelectedEvent = createEvent(this, "listSelectedEvent", 7);
|
|
10
|
+
this.listItemClick = createEvent(this, "listItemClick", 7);
|
|
11
|
+
this.rowCount = 0;
|
|
12
|
+
this.name = undefined;
|
|
13
|
+
this.selectable = undefined;
|
|
14
|
+
this.items = [];
|
|
15
|
+
this.selectedIds = [];
|
|
16
|
+
this.loading = true;
|
|
17
|
+
this.lastPage = false;
|
|
18
|
+
}
|
|
19
|
+
listLoadHandler(event) {
|
|
20
|
+
if (event.detail.name !== this.name)
|
|
21
|
+
return;
|
|
22
|
+
this.items = [...this.items, ...event.detail.items];
|
|
23
|
+
this.loading = false;
|
|
24
|
+
this.lastPage = event.detail.lastPage;
|
|
25
|
+
this.renderRows(event.detail.items);
|
|
26
|
+
if (this.scrollableParent.clientHeight === this.scrollableParent.scrollHeight)
|
|
27
|
+
this.listPaginateHandler();
|
|
28
|
+
}
|
|
29
|
+
listPaginateHandler() {
|
|
30
|
+
// We don't want to emit an event to load the next page if this is the last page, or if we're already loading
|
|
31
|
+
if (this.lastPage || this.loading)
|
|
32
|
+
return;
|
|
33
|
+
this.loading = true;
|
|
34
|
+
this.listPaginate.emit({ name: this.name });
|
|
35
|
+
}
|
|
36
|
+
listClearDataCacheHandler(event) {
|
|
37
|
+
if (event.detail.name !== this.name)
|
|
38
|
+
return;
|
|
39
|
+
this.items = [];
|
|
40
|
+
this.selectedIds = [];
|
|
41
|
+
this.listItemContainer()
|
|
42
|
+
.querySelectorAll(".tttx-list__row")
|
|
43
|
+
.forEach((node) => {
|
|
44
|
+
node.remove();
|
|
45
|
+
});
|
|
46
|
+
this.rowCount = 0;
|
|
47
|
+
this.lastPage = false;
|
|
48
|
+
this.loading = false;
|
|
49
|
+
}
|
|
50
|
+
listActionSelectedEventHandler(event) {
|
|
51
|
+
if (event.detail.name !== this.name || !this.selectable || this.selectedIds.length === 0)
|
|
52
|
+
return;
|
|
53
|
+
const selectedRows = this.selectedIds.map(id => {
|
|
54
|
+
return this.items[id];
|
|
55
|
+
});
|
|
56
|
+
if (event.detail.removeRows)
|
|
57
|
+
this.removeSelectedRows();
|
|
58
|
+
this.listSelectedEvent.emit({
|
|
59
|
+
name: this.name,
|
|
60
|
+
eventName: event.detail.eventName,
|
|
61
|
+
selectedRows,
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
removeSelectedRows() {
|
|
65
|
+
const orderedSelectedIds = [...this.selectedIds].sort((a, b) => {
|
|
66
|
+
return b - a;
|
|
67
|
+
});
|
|
68
|
+
orderedSelectedIds.forEach(itemIndex => {
|
|
69
|
+
this.items.splice(itemIndex, 1);
|
|
70
|
+
this.listItemContainer().removeChild(this.listItemContainer().querySelector(`[data-row-id="${itemIndex}"]`));
|
|
71
|
+
// If this removes the scrollbar and we're not on the last page, load in a new page
|
|
72
|
+
if (this.scrollableParent.clientHeight === this.scrollableParent.scrollHeight)
|
|
73
|
+
this.listPaginateHandler();
|
|
74
|
+
});
|
|
75
|
+
// Empty selected ids with mutation rather than assignment to avoid unecessary component rerender
|
|
76
|
+
this.selectedIds.splice(0, this.selectedIds.length);
|
|
77
|
+
}
|
|
78
|
+
listItemClickHandler(itemData) {
|
|
79
|
+
if (this.selectedIds.length !== 0)
|
|
80
|
+
return;
|
|
81
|
+
this.listItemClick.emit({ itemData, name: this.name });
|
|
82
|
+
}
|
|
83
|
+
componentWillLoad() {
|
|
84
|
+
this.template = this.host.querySelector("template");
|
|
85
|
+
this.scrollableParent = this.getScrollableParent(this.host);
|
|
86
|
+
const scrollableContext = this.scrollableParent === document.scrollingElement ? document : this.scrollableParent;
|
|
87
|
+
scrollableContext.addEventListener("scroll", this.scrollHandler.bind(this));
|
|
88
|
+
window.addEventListener("resize", this.scrollHandler.bind(this));
|
|
89
|
+
}
|
|
90
|
+
componentDidLoad() {
|
|
91
|
+
// Emit event to load first page
|
|
92
|
+
this.listPaginate.emit({ name: this.name });
|
|
93
|
+
}
|
|
94
|
+
listItemContainer() {
|
|
95
|
+
return this.host.shadowRoot.querySelector(".list-item-container");
|
|
96
|
+
}
|
|
97
|
+
async scrollHandler() {
|
|
98
|
+
const { clientHeight, scrollTop, scrollHeight } = this.scrollableParent;
|
|
99
|
+
if (Math.abs(scrollHeight - clientHeight - scrollTop) < 26)
|
|
100
|
+
this.listPaginateHandler();
|
|
101
|
+
}
|
|
102
|
+
isScrollable(node) {
|
|
103
|
+
const hasScrollbar = ["scroll", "auto"].includes(node.style.overflowY);
|
|
104
|
+
return hasScrollbar;
|
|
105
|
+
}
|
|
106
|
+
getScrollableParent(node) {
|
|
107
|
+
if (!node || node === document.body) {
|
|
108
|
+
return document.scrollingElement;
|
|
109
|
+
}
|
|
110
|
+
else {
|
|
111
|
+
return this.isScrollable(node) ? node : this.getScrollableParent(node.parentElement);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
appendRowCheckbox(rowContainer) {
|
|
115
|
+
if (!this.selectable)
|
|
116
|
+
return;
|
|
117
|
+
const rowId = this.rowCount;
|
|
118
|
+
const checkbox = document.createElement("input");
|
|
119
|
+
checkbox.setAttribute("type", "checkbox");
|
|
120
|
+
checkbox.addEventListener("click", e => {
|
|
121
|
+
e.stopPropagation();
|
|
122
|
+
if (e.target.checked) {
|
|
123
|
+
this.selectedIds = [...this.selectedIds, rowId];
|
|
124
|
+
rowContainer.classList.add("selected");
|
|
125
|
+
}
|
|
126
|
+
else {
|
|
127
|
+
this.selectedIds = this.selectedIds.filter(id => {
|
|
128
|
+
return id !== rowId;
|
|
129
|
+
});
|
|
130
|
+
rowContainer.classList.remove("selected");
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
rowContainer.setAttribute("data-row-id", `${rowId}`);
|
|
134
|
+
this.rowCount++;
|
|
135
|
+
rowContainer.appendChild(checkbox);
|
|
136
|
+
}
|
|
137
|
+
appendSeededTemplate(rowData, rowContainer) {
|
|
138
|
+
this.template.childNodes.forEach(child => {
|
|
139
|
+
const clone = child.cloneNode(false);
|
|
140
|
+
if (clone.getAttribute("data-fields")) {
|
|
141
|
+
const fields = clone.getAttribute("data-fields").replace(/\s/g, "").split(",");
|
|
142
|
+
const filteredRowData = Object.fromEntries(fields.map((field) => {
|
|
143
|
+
return [field, rowData[field]];
|
|
144
|
+
}));
|
|
145
|
+
clone.setAttribute("row-data", JSON.stringify(filteredRowData));
|
|
146
|
+
}
|
|
147
|
+
else {
|
|
148
|
+
clone.setAttribute("row-data", JSON.stringify(rowData));
|
|
149
|
+
}
|
|
150
|
+
rowContainer.appendChild(clone);
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
appendGenericTemplate(rowData, rowContainer) {
|
|
154
|
+
const row = document.createElement("div");
|
|
155
|
+
row.classList.add("generic-template__content");
|
|
156
|
+
row.textContent = rowData.text;
|
|
157
|
+
rowContainer.appendChild(row);
|
|
158
|
+
if (!rowData.icon)
|
|
159
|
+
return;
|
|
160
|
+
const icon = document.createElement("span");
|
|
161
|
+
icon.classList.add("material-symbols-rounded");
|
|
162
|
+
icon.textContent = rowData.icon;
|
|
163
|
+
if (rowData.iconColor)
|
|
164
|
+
icon.style["color"] = rowData.iconColor;
|
|
165
|
+
row.prepend(icon);
|
|
166
|
+
}
|
|
167
|
+
row(rowData) {
|
|
168
|
+
const rowContainer = document.createElement("div");
|
|
169
|
+
rowContainer.classList.add("tttx-list__row");
|
|
170
|
+
rowContainer.addEventListener("click", () => {
|
|
171
|
+
this.listItemClickHandler(rowData);
|
|
172
|
+
});
|
|
173
|
+
this.appendRowCheckbox(rowContainer);
|
|
174
|
+
this.template ? this.appendSeededTemplate(rowData, rowContainer) : this.appendGenericTemplate(rowData, rowContainer);
|
|
175
|
+
return rowContainer;
|
|
176
|
+
}
|
|
177
|
+
renderRows(batchData) {
|
|
178
|
+
batchData.forEach(rowData => {
|
|
179
|
+
this.listItemContainer().appendChild(this.row(rowData));
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
loadIndicator() {
|
|
183
|
+
if (!this.loading)
|
|
184
|
+
return;
|
|
185
|
+
return h("div", { class: "load-indicator" }, h("tttx-loading-spinner", { size: 'large' }));
|
|
186
|
+
}
|
|
187
|
+
render() {
|
|
188
|
+
return (h(Host, null, h("div", { class: "list-item-container", tabindex: "0" }, !this.loading && this.items.length === 0 ? "No data to display" : undefined), this.loadIndicator()));
|
|
189
|
+
}
|
|
190
|
+
get host() { return getElement(this); }
|
|
191
|
+
};
|
|
192
|
+
TttxList.style = tttxListCss;
|
|
193
|
+
|
|
194
|
+
export { TttxList as tttx_list };
|
|
@@ -6,9 +6,9 @@ const TttxInput = class {
|
|
|
6
6
|
constructor(hostRef) {
|
|
7
7
|
registerInstance(this, hostRef);
|
|
8
8
|
this.valueChanged = createEvent(this, "valueChanged", 7);
|
|
9
|
-
this.
|
|
9
|
+
this.focusChanged = createEvent(this, "focusChanged", 7);
|
|
10
|
+
this.blurChanged = createEvent(this, "blurChanged", 7);
|
|
10
11
|
this.label = undefined;
|
|
11
|
-
this.valid = undefined;
|
|
12
12
|
this.showerrormsg = undefined;
|
|
13
13
|
this.errormsg = undefined;
|
|
14
14
|
this.iconleft = undefined;
|
|
@@ -36,11 +36,13 @@ const TttxInput = class {
|
|
|
36
36
|
this.value = target.value;
|
|
37
37
|
this.valueChanged.emit(target.value);
|
|
38
38
|
}
|
|
39
|
-
handleFocus() {
|
|
40
|
-
|
|
39
|
+
handleFocus(event) {
|
|
40
|
+
const target = event.target;
|
|
41
|
+
this.valueChanged.emit(target.value);
|
|
41
42
|
}
|
|
42
|
-
handleBlur() {
|
|
43
|
-
|
|
43
|
+
handleBlur(event) {
|
|
44
|
+
const target = event.target;
|
|
45
|
+
this.valueChanged.emit(target.value);
|
|
44
46
|
}
|
|
45
47
|
render() {
|
|
46
48
|
const classNames = ['standalone', this.showerrormsg ? 'invalid' : ''].join(' ');
|
|
@@ -70,7 +72,7 @@ const TttxInput = class {
|
|
|
70
72
|
this.type === 'number' ||
|
|
71
73
|
this.type === 'range'
|
|
72
74
|
? this.min
|
|
73
|
-
: null, minlength: this.
|
|
75
|
+
: null, minlength: this.minlength, name: this.name, pattern: this.type === 'text' ||
|
|
74
76
|
this.type === 'date' ||
|
|
75
77
|
this.type === 'search' ||
|
|
76
78
|
this.type === 'url' ||
|
package/dist/esm/tttx.js
CHANGED
|
@@ -14,5 +14,5 @@ const patchBrowser = () => {
|
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
patchBrowser().then(options => {
|
|
17
|
-
return bootstrapLazy([["tttx-standalone-input",[[2,"tttx-standalone-input",{"label":[1],"
|
|
17
|
+
return bootstrapLazy([["tttx-list",[[1,"tttx-list",{"name":[1],"selectable":[4],"items":[32],"selectedIds":[32],"loading":[32],"lastPage":[32]},[[4,"listPageLoad","listLoadHandler"],[4,"listClearDataCache","listClearDataCacheHandler"],[4,"listActionSelectedEvent","listActionSelectedEventHandler"]]]]],["tttx-standalone-input",[[2,"tttx-standalone-input",{"label":[1],"showerrormsg":[4],"errormsg":[1],"iconleft":[1],"iconright":[1],"autocapitalize":[1],"autocomplete":[1],"autofocus":[4],"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-button",[[1,"tttx-button",{"fontColor":[1,"font-color"],"buttonStyle":[1,"button-style"]},[[0,"clickEvent","onClicked"]]]]],["tttx-checkbox",[[1,"tttx-checkbox",{"value":[4],"label":[1],"required":[4]}]]],["tttx-form",[[1,"tttx-form",{"formschema":[8],"submitValue":[8,"submit-value"]}]]],["tttx-popover-content",[[1,"tttx-popover-content",{"header":[1],"body":[1],"linkcontext":[1],"linktext":[1]}]]],["tttx-icon",[[1,"tttx-icon",{"icon":[1],"colour":[1]},[[4,"click","handleDocumentClick"]]]]],["tttx-loading-spinner",[[1,"tttx-loading-spinner",{"loadingMessage":[1028,"loading-message"],"size":[1025]}]]]], options);
|
|
18
18
|
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as i,h as s,H as n}from"./p-bec472d8.js";const e=class{constructor(s){t(this,s),this.valueChanged=i(this,"valueChanged",7),this.focusChanged=i(this,"focusChanged",7),this.blurChanged=i(this,"blurChanged",7),this.label=void 0,this.showerrormsg=void 0,this.errormsg=void 0,this.iconleft=void 0,this.iconright=void 0,this.autocapitalize=void 0,this.autocomplete=void 0,this.autofocus=void 0,this.checked=void 0,this.disabled=void 0,this.max=void 0,this.maxlength=void 0,this.min=void 0,this.minlength=void 0,this.name=void 0,this.pattern=void 0,this.placeholder=void 0,this.readonly=void 0,this.required=void 0,this.step=void 0,this.type="text",this.value=void 0}handleChange(t){const i=t.target;this.value=i.value,this.valueChanged.emit(i.value)}handleFocus(t){this.valueChanged.emit(t.target.value)}handleBlur(t){this.valueChanged.emit(t.target.value)}render(){const t=["standalone",this.showerrormsg?"invalid":""].join(" ");return s(n,null,s("label",{class:"inputBlock"},this.label,this.required?"":s("span",{class:"optional"}," (optional)"),this.iconleft&&s("div",{class:"icon-left"},s("tttx-icon",{icon:this.iconleft,colour:"grey"})),s("input",{class:t,autocapitalize:"url"===this.type||"email"===this.type||"password"===this.type?this.autocapitalize:null,autofocus:this.autofocus,autocomplete:"text"===this.type||"search"===this.type||"url"===this.type||"tel"===this.type||"email"===this.type||"password"===this.type||"datepickers"===this.type||"range"===this.type||"color"===this.type?this.autocomplete:null,checked:"checkbox"===this.type||"radio"===this.type?this.checked:null,disabled:this.required?null:this.disabled,max:"date"===this.type||"month"===this.type||"week"===this.type||"time"===this.type||"datetime-local"===this.type||"number"===this.type||"range"===this.type?this.max:null,maxlength:this.maxlength,min:"date"===this.type||"month"===this.type||"week"===this.type||"time"===this.type||"datetime-local"===this.type||"number"===this.type||"range"===this.type?this.min:null,minlength:this.minlength,name:this.name,pattern:"text"===this.type||"date"===this.type||"search"===this.type||"url"===this.type||"tel"===this.type||"email"===this.type||"password"===this.type?this.pattern:null,placeholder:"text"===this.type||"tel"===this.type||"email"===this.type||"url"===this.type||"password"===this.type||"search"===this.type?this.placeholder:null,readonly:"text"===this.type||"search"===this.type||"url"===this.type||"tel"===this.type||"email"===this.type||"password"===this.type||"date"===this.type||"month"===this.type||"week"===this.type||"time"===this.type||"datetime-local"===this.type||"number"===this.type?this.readonly:null,required:"text"===this.type||"search"===this.type||"url"===this.type||"tel"===this.type||"email"===this.type||"password"===this.type||"date"===this.type||"month"===this.type||"week"===this.type||"time"===this.type||"datetime-local"===this.type||"number"===this.type||"checkbox"===this.type||"radio"===this.type||"file"===this.type?this.required:null,step:"date"===this.type||"month"===this.type||"week"===this.type||"time"===this.type||"datetime-local"===this.type||"number"===this.type||"range"===this.type?this.step:null,type:this.type,value:this.value,onBlur:this.handleBlur.bind(this),onFocus:this.handleFocus.bind(this),onInput:this.handleChange.bind(this)}),this.iconright&&s("div",{class:"icon-right"},s("tttx-icon",{icon:this.iconright,colour:"grey"})),s("span",{class:["errorBubble",this.showerrormsg&&this.errormsg?"visible":""].join(" ")},s("span",{class:"material-symbols-rounded validationicon"},"warning")," ",this.errormsg)))}};e.style='.material-symbols-rounded.sc-tttx-standalone-input{font-variation-settings:"FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24}.material-symbols-rounded.sc-tttx-standalone-input{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}.icon-left.sc-tttx-standalone-input,.icon-right.sc-tttx-standalone-input{flex-basis:24px}.icon-left.sc-tttx-standalone-input span.sc-tttx-standalone-input,.icon-right.sc-tttx-standalone-input span.sc-tttx-standalone-input{font-size:24px;line-height:24px;text-align:center;display:block;width:24px;height:24px;margin-top:4px}.icon-left.sc-tttx-standalone-input span.sc-tttx-standalone-input{margin-left:4px}.icon-right.sc-tttx-standalone-input span.sc-tttx-standalone-input{margin-right:4px}.icon-right.sc-tttx-standalone-input{margin-top:5px;margin-right:4px}.icon-left.sc-tttx-standalone-input{margin-top:5px;margin-left:4px}.iconleft.sc-tttx-standalone-input .input.sc-tttx-standalone-input{padding-left:4px}.iconright.sc-tttx-standalone-input .input.sc-tttx-standalone-input{padding-right:4px}.focused.sc-tttx-standalone-input{border-color:#1479c6}.errormsg.sc-tttx-standalone-input{display:flex;justify-content:center;align-items:center;float:left;margin-bottom:16px;box-sizing:border-box;background-color:transparent;height:26px;font-size:14px;border-radius:none;z-index:2;color:#dc0000}.errormsg.sc-tttx-standalone-input .validationicon.sc-tttx-standalone-input{width:16px;height:16px;font-size:16px;margin-right:4px;vertical-align:middle;color:#dc0000}.danger.sc-tttx-standalone-input{color:#dc0000}.optional.sc-tttx-standalone-input{color:#757575;font-weight:normal}label.inputBlock.sc-tttx-standalone-input{display:block;position:relative;line-height:21px}label.sc-tttx-standalone-input{font-weight:500;font-size:16px}input.sc-tttx-standalone-input:not([type=submit]){font-family:"Roboto", serif;box-sizing:border-box;width:100%;height:36px;padding:0 16px;font-size:16px;border:1px solid #d5d5d5;border-radius:4px;margin-top:4px}input[type=date].sc-tttx-standalone-input{background:white;display:block;min-width:calc(100% - 18px);line-height:37px}input.invalid.sc-tttx-standalone-input:invalid,input.standalone.invalid.sc-tttx-standalone-input{border:1px solid #dc0000}input.sc-tttx-standalone-input~.errorBubble.sc-tttx-standalone-input{min-height:27px;position:relative;font-size:14px;font-weight:normal;width:100%;font-family:"Roboto", sans-serif;color:#dc0000;display:flex;align-content:center;align-items:center;justify-items:center}input.sc-tttx-standalone-input~.errorBubble.sc-tttx-standalone-input:not(.visible){visibility:hidden}input.sc-tttx-standalone-input~.errorBubble.sc-tttx-standalone-input span.sc-tttx-standalone-input{color:#dc0000;font-size:16px;margin-right:4px;height:16px}input.invalid.sc-tttx-standalone-input:invalid~.errorBubble.sc-tttx-standalone-input{position:relative;font-size:14px;font-weight:normal;width:100%;font-family:"Roboto", sans-serif;color:#dc0000;visibility:visible}input.sc-tttx-standalone-input:focus{border-color:#1479c6}.sc-tttx-standalone-input-h{display:block}';export{e as tttx_standalone_input}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as i,h as s,H as e,g as o}from"./p-bec472d8.js";const n=class{constructor(s){t(this,s),this.listPaginate=i(this,"listPaginate",7),this.listSelectedEvent=i(this,"listSelectedEvent",7),this.listItemClick=i(this,"listItemClick",7),this.rowCount=0,this.name=void 0,this.selectable=void 0,this.items=[],this.selectedIds=[],this.loading=!0,this.lastPage=!1}listLoadHandler(t){t.detail.name===this.name&&(this.items=[...this.items,...t.detail.items],this.loading=!1,this.lastPage=t.detail.lastPage,this.renderRows(t.detail.items),this.scrollableParent.clientHeight===this.scrollableParent.scrollHeight&&this.listPaginateHandler())}listPaginateHandler(){this.lastPage||this.loading||(this.loading=!0,this.listPaginate.emit({name:this.name}))}listClearDataCacheHandler(t){t.detail.name===this.name&&(this.items=[],this.selectedIds=[],this.listItemContainer().querySelectorAll(".tttx-list__row").forEach((t=>{t.remove()})),this.rowCount=0,this.lastPage=!1,this.loading=!1)}listActionSelectedEventHandler(t){if(t.detail.name!==this.name||!this.selectable||0===this.selectedIds.length)return;const i=this.selectedIds.map((t=>this.items[t]));t.detail.removeRows&&this.removeSelectedRows(),this.listSelectedEvent.emit({name:this.name,eventName:t.detail.eventName,selectedRows:i})}removeSelectedRows(){[...this.selectedIds].sort(((t,i)=>i-t)).forEach((t=>{this.items.splice(t,1),this.listItemContainer().removeChild(this.listItemContainer().querySelector(`[data-row-id="${t}"]`)),this.scrollableParent.clientHeight===this.scrollableParent.scrollHeight&&this.listPaginateHandler()})),this.selectedIds.splice(0,this.selectedIds.length)}listItemClickHandler(t){0===this.selectedIds.length&&this.listItemClick.emit({itemData:t,name:this.name})}componentWillLoad(){this.template=this.host.querySelector("template"),this.scrollableParent=this.getScrollableParent(this.host),(this.scrollableParent===document.scrollingElement?document:this.scrollableParent).addEventListener("scroll",this.scrollHandler.bind(this)),window.addEventListener("resize",this.scrollHandler.bind(this))}componentDidLoad(){this.listPaginate.emit({name:this.name})}listItemContainer(){return this.host.shadowRoot.querySelector(".list-item-container")}async scrollHandler(){const{clientHeight:t,scrollTop:i,scrollHeight:s}=this.scrollableParent;Math.abs(s-t-i)<26&&this.listPaginateHandler()}isScrollable(t){return["scroll","auto"].includes(t.style.overflowY)}getScrollableParent(t){return t&&t!==document.body?this.isScrollable(t)?t:this.getScrollableParent(t.parentElement):document.scrollingElement}appendRowCheckbox(t){if(!this.selectable)return;const i=this.rowCount,s=document.createElement("input");s.setAttribute("type","checkbox"),s.addEventListener("click",(s=>{s.stopPropagation(),s.target.checked?(this.selectedIds=[...this.selectedIds,i],t.classList.add("selected")):(this.selectedIds=this.selectedIds.filter((t=>t!==i)),t.classList.remove("selected"))})),t.setAttribute("data-row-id",`${i}`),this.rowCount++,t.appendChild(s)}appendSeededTemplate(t,i){this.template.childNodes.forEach((s=>{const e=s.cloneNode(!1);if(e.getAttribute("data-fields")){const i=e.getAttribute("data-fields").replace(/\s/g,"").split(","),s=Object.fromEntries(i.map((i=>[i,t[i]])));e.setAttribute("row-data",JSON.stringify(s))}else e.setAttribute("row-data",JSON.stringify(t));i.appendChild(e)}))}appendGenericTemplate(t,i){const s=document.createElement("div");if(s.classList.add("generic-template__content"),s.textContent=t.text,i.appendChild(s),!t.icon)return;const e=document.createElement("span");e.classList.add("material-symbols-rounded"),e.textContent=t.icon,t.iconColor&&(e.style.color=t.iconColor),s.prepend(e)}row(t){const i=document.createElement("div");return i.classList.add("tttx-list__row"),i.addEventListener("click",(()=>{this.listItemClickHandler(t)})),this.appendRowCheckbox(i),this.template?this.appendSeededTemplate(t,i):this.appendGenericTemplate(t,i),i}renderRows(t){t.forEach((t=>{this.listItemContainer().appendChild(this.row(t))}))}loadIndicator(){if(this.loading)return s("div",{class:"load-indicator"},s("tttx-loading-spinner",{size:"large"}))}render(){return s(e,null,s("div",{class:"list-item-container",tabindex:"0"},this.loading||0!==this.items.length?void 0:"No data to display"),this.loadIndicator())}get host(){return o(this)}};n.style='.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}.tttx-list__row{min-height:52px;line-height:36px;padding:8px;display:flex;flex-direction:row;align-items:center;cursor:pointer;border-bottom:1px solid #d5d5d5}.tttx-list__row .generic-template__content{width:100%;display:flex;align-items:center;gap:8px}.tttx-list__row:first-of-type{border-top:1px solid #d5d5d5}.tttx-list__row:focus,.tttx-list__row:active{background-color:#e6e6e6}.tttx-list__row.selected{background-color:#e7f1f9}.load-indicator{display:flex;justify-content:center}';export{n as tttx_list}
|
package/dist/tttx/tttx.esm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as
|
|
1
|
+
import{p as e,b as t}from"./p-bec472d8.js";export{s as setNonce}from"./p-bec472d8.js";(()=>{const t=import.meta.url,a={};return""!==t&&(a.resourcesUrl=new URL(".",t).href),e(a)})().then((e=>t([["p-2b6720ac",[[1,"tttx-list",{name:[1],selectable:[4],items:[32],selectedIds:[32],loading:[32],lastPage:[32]},[[4,"listPageLoad","listLoadHandler"],[4,"listClearDataCache","listClearDataCacheHandler"],[4,"listActionSelectedEvent","listActionSelectedEventHandler"]]]]],["p-25953f82",[[2,"tttx-standalone-input",{label:[1],showerrormsg:[4],errormsg:[1],iconleft:[1],iconright:[1],autocapitalize:[1],autocomplete:[1],autofocus:[4],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]}]]],["p-1a4eb1f3",[[1,"tttx-button",{fontColor:[1,"font-color"],buttonStyle:[1,"button-style"]},[[0,"clickEvent","onClicked"]]]]],["p-2d54f8aa",[[1,"tttx-checkbox",{value:[4],label:[1],required:[4]}]]],["p-95a29e09",[[1,"tttx-form",{formschema:[8],submitValue:[8,"submit-value"]}]]],["p-ad0c3fe4",[[1,"tttx-popover-content",{header:[1],body:[1],linkcontext:[1],linktext:[1]}]]],["p-709246f5",[[1,"tttx-icon",{icon:[1],colour:[1]},[[4,"click","handleDocumentClick"]]]]],["p-4c57bcbd",[[1,"tttx-loading-spinner",{loadingMessage:[1028,"loading-message"],size:[1025]}]]]],e)));
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { EventEmitter } from "../../../stencil-public-runtime";
|
|
2
|
+
interface LoadEventOptions {
|
|
3
|
+
name: string;
|
|
4
|
+
items: object[];
|
|
5
|
+
lastPage: boolean;
|
|
6
|
+
}
|
|
7
|
+
interface ActionSelectedEventOptions {
|
|
8
|
+
name: string;
|
|
9
|
+
eventName: string;
|
|
10
|
+
removeRows: boolean;
|
|
11
|
+
}
|
|
12
|
+
interface GenericTemplateData {
|
|
13
|
+
text: string;
|
|
14
|
+
icon?: string;
|
|
15
|
+
iconColor?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare class TttxList {
|
|
18
|
+
host: HTMLElement;
|
|
19
|
+
name: string;
|
|
20
|
+
selectable: boolean;
|
|
21
|
+
items: object[];
|
|
22
|
+
selectedIds: number[];
|
|
23
|
+
loading: boolean;
|
|
24
|
+
lastPage: boolean;
|
|
25
|
+
private template;
|
|
26
|
+
private scrollableParent;
|
|
27
|
+
private rowCount;
|
|
28
|
+
listLoadHandler(event: CustomEvent<LoadEventOptions>): void;
|
|
29
|
+
listPaginate: EventEmitter;
|
|
30
|
+
listPaginateHandler(): void;
|
|
31
|
+
listClearDataCacheHandler(event: CustomEvent): void;
|
|
32
|
+
listActionSelectedEventHandler(event: CustomEvent<ActionSelectedEventOptions>): void;
|
|
33
|
+
listSelectedEvent: EventEmitter;
|
|
34
|
+
removeSelectedRows(): void;
|
|
35
|
+
listItemClick: EventEmitter;
|
|
36
|
+
listItemClickHandler(itemData: object): void;
|
|
37
|
+
componentWillLoad(): void;
|
|
38
|
+
componentDidLoad(): void;
|
|
39
|
+
listItemContainer(): Element;
|
|
40
|
+
scrollHandler(): Promise<void>;
|
|
41
|
+
isScrollable(node: HTMLElement): boolean;
|
|
42
|
+
getScrollableParent(node: HTMLElement): any;
|
|
43
|
+
appendRowCheckbox(rowContainer: HTMLElement): void;
|
|
44
|
+
appendSeededTemplate(rowData: object, rowContainer: HTMLElement): void;
|
|
45
|
+
appendGenericTemplate(rowData: GenericTemplateData, rowContainer: HTMLElement): void;
|
|
46
|
+
row(rowData: object): HTMLDivElement;
|
|
47
|
+
renderRows(batchData: object[]): void;
|
|
48
|
+
loadIndicator(): any;
|
|
49
|
+
render(): any;
|
|
50
|
+
}
|
|
51
|
+
export {};
|
|
@@ -6,9 +6,7 @@ export type TimeSyntax = `${number}${number}:${number}${number}`;
|
|
|
6
6
|
export type DateTimeLocalSyntax = `${number}${number}${number}${number}-${number}${number}-${number}${number}T${number}${number}:${number}${number}`;
|
|
7
7
|
export type MinMaxDates = DateSyntax | MonthSyntax | WeekSyntax | TimeSyntax | DateTimeLocalSyntax;
|
|
8
8
|
export declare class TttxInput {
|
|
9
|
-
isfocused: boolean;
|
|
10
9
|
label: string;
|
|
11
|
-
valid: boolean;
|
|
12
10
|
showerrormsg: boolean;
|
|
13
11
|
errormsg: string;
|
|
14
12
|
iconleft: string;
|
|
@@ -32,7 +30,9 @@ export declare class TttxInput {
|
|
|
32
30
|
value: string | number;
|
|
33
31
|
valueChanged: EventEmitter<string>;
|
|
34
32
|
handleChange(event: Event | InputEvent): void;
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
focusChanged: EventEmitter<string>;
|
|
34
|
+
handleFocus(event: Event | InputEvent): void;
|
|
35
|
+
blurChanged: EventEmitter<string>;
|
|
36
|
+
handleBlur(event: Event | InputEvent): void;
|
|
37
37
|
render(): any;
|
|
38
38
|
}
|
|
@@ -24,6 +24,10 @@ export namespace Components {
|
|
|
24
24
|
"colour": string;
|
|
25
25
|
"icon": string;
|
|
26
26
|
}
|
|
27
|
+
interface TttxList {
|
|
28
|
+
"name": string;
|
|
29
|
+
"selectable": boolean;
|
|
30
|
+
}
|
|
27
31
|
interface TttxLoadingSpinner {
|
|
28
32
|
"loadingMessage": boolean;
|
|
29
33
|
"size": 'small' | 'large';
|
|
@@ -56,7 +60,6 @@ export namespace Components {
|
|
|
56
60
|
"showerrormsg": boolean;
|
|
57
61
|
"step": string | number;
|
|
58
62
|
"type": string;
|
|
59
|
-
"valid": boolean;
|
|
60
63
|
"value": string | number;
|
|
61
64
|
}
|
|
62
65
|
}
|
|
@@ -72,6 +75,10 @@ export interface TttxFormCustomEvent<T> extends CustomEvent<T> {
|
|
|
72
75
|
detail: T;
|
|
73
76
|
target: HTMLTttxFormElement;
|
|
74
77
|
}
|
|
78
|
+
export interface TttxListCustomEvent<T> extends CustomEvent<T> {
|
|
79
|
+
detail: T;
|
|
80
|
+
target: HTMLTttxListElement;
|
|
81
|
+
}
|
|
75
82
|
export interface TttxStandaloneInputCustomEvent<T> extends CustomEvent<T> {
|
|
76
83
|
detail: T;
|
|
77
84
|
target: HTMLTttxStandaloneInputElement;
|
|
@@ -101,6 +108,12 @@ declare global {
|
|
|
101
108
|
prototype: HTMLTttxIconElement;
|
|
102
109
|
new (): HTMLTttxIconElement;
|
|
103
110
|
};
|
|
111
|
+
interface HTMLTttxListElement extends Components.TttxList, HTMLStencilElement {
|
|
112
|
+
}
|
|
113
|
+
var HTMLTttxListElement: {
|
|
114
|
+
prototype: HTMLTttxListElement;
|
|
115
|
+
new (): HTMLTttxListElement;
|
|
116
|
+
};
|
|
104
117
|
interface HTMLTttxLoadingSpinnerElement extends Components.TttxLoadingSpinner, HTMLStencilElement {
|
|
105
118
|
}
|
|
106
119
|
var HTMLTttxLoadingSpinnerElement: {
|
|
@@ -124,6 +137,7 @@ declare global {
|
|
|
124
137
|
"tttx-checkbox": HTMLTttxCheckboxElement;
|
|
125
138
|
"tttx-form": HTMLTttxFormElement;
|
|
126
139
|
"tttx-icon": HTMLTttxIconElement;
|
|
140
|
+
"tttx-list": HTMLTttxListElement;
|
|
127
141
|
"tttx-loading-spinner": HTMLTttxLoadingSpinnerElement;
|
|
128
142
|
"tttx-popover-content": HTMLTttxPopoverContentElement;
|
|
129
143
|
"tttx-standalone-input": HTMLTttxStandaloneInputElement;
|
|
@@ -150,6 +164,13 @@ declare namespace LocalJSX {
|
|
|
150
164
|
"colour"?: string;
|
|
151
165
|
"icon"?: string;
|
|
152
166
|
}
|
|
167
|
+
interface TttxList {
|
|
168
|
+
"name"?: string;
|
|
169
|
+
"onListItemClick"?: (event: TttxListCustomEvent<any>) => void;
|
|
170
|
+
"onListPaginate"?: (event: TttxListCustomEvent<any>) => void;
|
|
171
|
+
"onListSelectedEvent"?: (event: TttxListCustomEvent<any>) => void;
|
|
172
|
+
"selectable"?: boolean;
|
|
173
|
+
}
|
|
153
174
|
interface TttxLoadingSpinner {
|
|
154
175
|
"loadingMessage"?: boolean;
|
|
155
176
|
"size"?: 'small' | 'large';
|
|
@@ -175,6 +196,8 @@ declare namespace LocalJSX {
|
|
|
175
196
|
"min"?: MinMaxDates | number;
|
|
176
197
|
"minlength"?: string | number;
|
|
177
198
|
"name"?: string;
|
|
199
|
+
"onBlurChanged"?: (event: TttxStandaloneInputCustomEvent<string>) => void;
|
|
200
|
+
"onFocusChanged"?: (event: TttxStandaloneInputCustomEvent<string>) => void;
|
|
178
201
|
"onValueChanged"?: (event: TttxStandaloneInputCustomEvent<string>) => void;
|
|
179
202
|
"pattern"?: string;
|
|
180
203
|
"placeholder"?: string;
|
|
@@ -183,7 +206,6 @@ declare namespace LocalJSX {
|
|
|
183
206
|
"showerrormsg"?: boolean;
|
|
184
207
|
"step"?: string | number;
|
|
185
208
|
"type"?: string;
|
|
186
|
-
"valid"?: boolean;
|
|
187
209
|
"value"?: string | number;
|
|
188
210
|
}
|
|
189
211
|
interface IntrinsicElements {
|
|
@@ -191,6 +213,7 @@ declare namespace LocalJSX {
|
|
|
191
213
|
"tttx-checkbox": TttxCheckbox;
|
|
192
214
|
"tttx-form": TttxForm;
|
|
193
215
|
"tttx-icon": TttxIcon;
|
|
216
|
+
"tttx-list": TttxList;
|
|
194
217
|
"tttx-loading-spinner": TttxLoadingSpinner;
|
|
195
218
|
"tttx-popover-content": TttxPopoverContent;
|
|
196
219
|
"tttx-standalone-input": TttxStandaloneInput;
|
|
@@ -204,6 +227,7 @@ declare module "@stencil/core" {
|
|
|
204
227
|
"tttx-checkbox": LocalJSX.TttxCheckbox & JSXBase.HTMLAttributes<HTMLTttxCheckboxElement>;
|
|
205
228
|
"tttx-form": LocalJSX.TttxForm & JSXBase.HTMLAttributes<HTMLTttxFormElement>;
|
|
206
229
|
"tttx-icon": LocalJSX.TttxIcon & JSXBase.HTMLAttributes<HTMLTttxIconElement>;
|
|
230
|
+
"tttx-list": LocalJSX.TttxList & JSXBase.HTMLAttributes<HTMLTttxListElement>;
|
|
207
231
|
"tttx-loading-spinner": LocalJSX.TttxLoadingSpinner & JSXBase.HTMLAttributes<HTMLTttxLoadingSpinnerElement>;
|
|
208
232
|
"tttx-popover-content": LocalJSX.TttxPopoverContent & JSXBase.HTMLAttributes<HTMLTttxPopoverContentElement>;
|
|
209
233
|
"tttx-standalone-input": LocalJSX.TttxStandaloneInput & JSXBase.HTMLAttributes<HTMLTttxStandaloneInputElement>;
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as i,h as s,H as n}from"./p-bec472d8.js";const e=class{constructor(s){t(this,s),this.valueChanged=i(this,"valueChanged",7),this.isfocused=!1,this.label=void 0,this.valid=void 0,this.showerrormsg=void 0,this.errormsg=void 0,this.iconleft=void 0,this.iconright=void 0,this.autocapitalize=void 0,this.autocomplete=void 0,this.autofocus=void 0,this.checked=void 0,this.disabled=void 0,this.max=void 0,this.maxlength=void 0,this.min=void 0,this.minlength=void 0,this.name=void 0,this.pattern=void 0,this.placeholder=void 0,this.readonly=void 0,this.required=void 0,this.step=void 0,this.type="text",this.value=void 0}handleChange(t){const i=t.target;this.value=i.value,this.valueChanged.emit(i.value)}handleFocus(){this.isfocused=!0}handleBlur(){this.isfocused=!1}render(){const t=["standalone",this.showerrormsg?"invalid":""].join(" ");return s(n,null,s("label",{class:"inputBlock"},this.label,this.required?"":s("span",{class:"optional"}," (optional)"),this.iconleft&&s("div",{class:"icon-left"},s("tttx-icon",{icon:this.iconleft,colour:"grey"})),s("input",{class:t,autocapitalize:"url"===this.type||"email"===this.type||"password"===this.type?this.autocapitalize:null,autofocus:this.autofocus,autocomplete:"text"===this.type||"search"===this.type||"url"===this.type||"tel"===this.type||"email"===this.type||"password"===this.type||"datepickers"===this.type||"range"===this.type||"color"===this.type?this.autocomplete:null,checked:"checkbox"===this.type||"radio"===this.type?this.checked:null,disabled:this.required?null:this.disabled,max:"date"===this.type||"month"===this.type||"week"===this.type||"time"===this.type||"datetime-local"===this.type||"number"===this.type||"range"===this.type?this.max:null,maxlength:this.maxlength,min:"date"===this.type||"month"===this.type||"week"===this.type||"time"===this.type||"datetime-local"===this.type||"number"===this.type||"range"===this.type?this.min:null,minlength:this.maxlength,name:this.name,pattern:"text"===this.type||"date"===this.type||"search"===this.type||"url"===this.type||"tel"===this.type||"email"===this.type||"password"===this.type?this.pattern:null,placeholder:"text"===this.type||"tel"===this.type||"email"===this.type||"url"===this.type||"password"===this.type||"search"===this.type?this.placeholder:null,readonly:"text"===this.type||"search"===this.type||"url"===this.type||"tel"===this.type||"email"===this.type||"password"===this.type||"date"===this.type||"month"===this.type||"week"===this.type||"time"===this.type||"datetime-local"===this.type||"number"===this.type?this.readonly:null,required:"text"===this.type||"search"===this.type||"url"===this.type||"tel"===this.type||"email"===this.type||"password"===this.type||"date"===this.type||"month"===this.type||"week"===this.type||"time"===this.type||"datetime-local"===this.type||"number"===this.type||"checkbox"===this.type||"radio"===this.type||"file"===this.type?this.required:null,step:"date"===this.type||"month"===this.type||"week"===this.type||"time"===this.type||"datetime-local"===this.type||"number"===this.type||"range"===this.type?this.step:null,type:this.type,value:this.value,onBlur:this.handleBlur.bind(this),onFocus:this.handleFocus.bind(this),onInput:this.handleChange.bind(this)}),this.iconright&&s("div",{class:"icon-right"},s("tttx-icon",{icon:this.iconright,colour:"grey"})),s("span",{class:["errorBubble",this.showerrormsg&&this.errormsg?"visible":""].join(" ")},s("span",{class:"material-symbols-rounded validationicon"},"warning")," ",this.errormsg)))}};e.style='.material-symbols-rounded.sc-tttx-standalone-input{font-variation-settings:"FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24}.material-symbols-rounded.sc-tttx-standalone-input{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}.icon-left.sc-tttx-standalone-input,.icon-right.sc-tttx-standalone-input{flex-basis:24px}.icon-left.sc-tttx-standalone-input span.sc-tttx-standalone-input,.icon-right.sc-tttx-standalone-input span.sc-tttx-standalone-input{font-size:24px;line-height:24px;text-align:center;display:block;width:24px;height:24px;margin-top:4px}.icon-left.sc-tttx-standalone-input span.sc-tttx-standalone-input{margin-left:4px}.icon-right.sc-tttx-standalone-input span.sc-tttx-standalone-input{margin-right:4px}.icon-right.sc-tttx-standalone-input{margin-top:5px;margin-right:4px}.icon-left.sc-tttx-standalone-input{margin-top:5px;margin-left:4px}.iconleft.sc-tttx-standalone-input .input.sc-tttx-standalone-input{padding-left:4px}.iconright.sc-tttx-standalone-input .input.sc-tttx-standalone-input{padding-right:4px}.focused.sc-tttx-standalone-input{border-color:#1479c6}.errormsg.sc-tttx-standalone-input{display:flex;justify-content:center;align-items:center;float:left;margin-bottom:16px;box-sizing:border-box;background-color:transparent;height:26px;font-size:14px;border-radius:none;z-index:2;color:#dc0000}.errormsg.sc-tttx-standalone-input .validationicon.sc-tttx-standalone-input{width:16px;height:16px;font-size:16px;margin-right:4px;vertical-align:middle;color:#dc0000}.danger.sc-tttx-standalone-input{color:#dc0000}.optional.sc-tttx-standalone-input{color:#757575;font-weight:normal}label.inputBlock.sc-tttx-standalone-input{display:block;position:relative;line-height:21px}label.sc-tttx-standalone-input{font-weight:500;font-size:16px}input.sc-tttx-standalone-input:not([type=submit]){font-family:"Roboto", serif;box-sizing:border-box;width:100%;height:36px;padding:0 16px;font-size:16px;border:1px solid #d5d5d5;border-radius:4px;margin-top:4px}input[type=date].sc-tttx-standalone-input{background:white;display:block;min-width:calc(100% - 18px);line-height:37px}input.invalid.sc-tttx-standalone-input:invalid,input.standalone.invalid.sc-tttx-standalone-input{border:1px solid #dc0000}input.sc-tttx-standalone-input~.errorBubble.sc-tttx-standalone-input{min-height:27px;position:relative;font-size:14px;font-weight:normal;width:100%;font-family:"Roboto", sans-serif;color:#dc0000;display:flex;align-content:center;align-items:center;justify-items:center}input.sc-tttx-standalone-input~.errorBubble.sc-tttx-standalone-input:not(.visible){visibility:hidden}input.sc-tttx-standalone-input~.errorBubble.sc-tttx-standalone-input span.sc-tttx-standalone-input{color:#dc0000;font-size:16px;margin-right:4px;height:16px}input.invalid.sc-tttx-standalone-input:invalid~.errorBubble.sc-tttx-standalone-input{position:relative;font-size:14px;font-weight:normal;width:100%;font-family:"Roboto", sans-serif;color:#dc0000;visibility:visible}input.sc-tttx-standalone-input:focus{border-color:#1479c6}.sc-tttx-standalone-input-h{display:block}';export{e as tttx_standalone_input}
|