@3t-transform/threeteeui 0.0.10 → 0.0.12

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.
Files changed (93) hide show
  1. package/dist/cjs/{index-8a4cb9bc.js → index-61cd741f.js} +43 -88
  2. package/dist/cjs/loader.cjs.js +3 -4
  3. package/dist/cjs/tttx-button.cjs.entry.js +2 -2
  4. package/dist/cjs/tttx-checkbox.cjs.entry.js +3 -3
  5. package/dist/cjs/tttx-form.cjs.entry.js +169 -41
  6. package/dist/cjs/tttx-icon.cjs.entry.js +2 -2
  7. package/dist/cjs/tttx-list.cjs.entry.js +198 -0
  8. package/dist/cjs/tttx-loading-spinner.cjs.entry.js +4 -4
  9. package/dist/cjs/tttx-popover-content.cjs.entry.js +2 -2
  10. package/dist/cjs/tttx-standalone-input.cjs.entry.js +134 -0
  11. package/dist/cjs/tttx.cjs.js +3 -7
  12. package/dist/collection/collection-manifest.json +4 -3
  13. package/dist/collection/components/atoms/tttx-button/tttx-button.css +1 -0
  14. package/dist/collection/components/atoms/tttx-button/tttx-button.stories.js +3 -3
  15. package/dist/collection/components/atoms/tttx-icon/tttx-icon.css +3 -3
  16. package/dist/collection/components/atoms/tttx-icon/tttx-icon.stories.js +15 -15
  17. package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.css +1 -1
  18. package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.js +2 -2
  19. package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.stories.js +1 -1
  20. package/dist/collection/components/atoms/tttx-popover-content/tttx-popover-content.js +1 -1
  21. package/dist/collection/components/atoms/tttx-popover-content/tttx-popover-content.stories.js +3 -3
  22. package/dist/collection/components/atoms/ttx-checkbox/tttx-checkbox.css +85 -39
  23. package/dist/collection/components/atoms/ttx-checkbox/tttx-checkbox.js +1 -1
  24. package/dist/collection/components/atoms/ttx-checkbox/tttx-checkbox.stories.js +5 -5
  25. package/dist/collection/components/molecules/tttx-form/tttx-form.css +230 -0
  26. package/dist/collection/components/molecules/tttx-form/tttx-form.js +195 -55
  27. package/dist/collection/components/molecules/tttx-form/tttx-form.stories.js +97 -28
  28. package/dist/collection/components/molecules/tttx-list/tttx-list.css +56 -0
  29. package/dist/collection/components/molecules/tttx-list/tttx-list.js +311 -0
  30. package/dist/collection/components/molecules/tttx-list/tttx-list.stories.js +37 -0
  31. package/dist/collection/components/molecules/{tttx-input/tttx-input.css → tttx-standalone-input/tttx-standalone-input.css} +77 -49
  32. package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.js +561 -0
  33. package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.stories.js +156 -0
  34. package/dist/collection/components/palette.stories.js +81 -81
  35. package/dist/collection/docs/gettingstarted-developer.stories.js +4 -4
  36. package/dist/components/index.d.ts +2 -10
  37. package/dist/components/index.js +3 -2
  38. package/dist/components/tttx-button.js +1 -1
  39. package/dist/components/tttx-checkbox.js +2 -2
  40. package/dist/components/tttx-form.js +167 -39
  41. package/dist/components/tttx-icon2.js +1 -1
  42. package/dist/components/{tttx-input.d.ts → tttx-list.d.ts} +4 -4
  43. package/dist/components/tttx-list.js +225 -0
  44. package/dist/components/tttx-loading-spinner.js +1 -38
  45. package/dist/components/tttx-loading-spinner2.js +40 -0
  46. package/dist/components/tttx-popover-content.js +1 -1
  47. package/dist/components/tttx-standalone-input.d.ts +11 -0
  48. package/dist/components/tttx-standalone-input.js +178 -0
  49. package/dist/esm/{index-9654537d.js → index-d8718abe.js} +44 -88
  50. package/dist/esm/loader.js +3 -4
  51. package/dist/esm/polyfills/css-shim.js +1 -1
  52. package/dist/esm/tttx-button.entry.js +2 -2
  53. package/dist/esm/tttx-checkbox.entry.js +3 -3
  54. package/dist/esm/tttx-form.entry.js +169 -41
  55. package/dist/esm/tttx-icon.entry.js +2 -2
  56. package/dist/esm/tttx-list.entry.js +194 -0
  57. package/dist/esm/tttx-loading-spinner.entry.js +4 -4
  58. package/dist/esm/tttx-popover-content.entry.js +2 -2
  59. package/dist/esm/tttx-standalone-input.entry.js +130 -0
  60. package/dist/esm/tttx.js +3 -4
  61. package/dist/tttx/p-1b6b4223.entry.js +1 -0
  62. package/dist/tttx/p-1ea7e424.entry.js +1 -0
  63. package/dist/tttx/{p-3cb692d6.entry.js → p-629411bc.entry.js} +1 -1
  64. package/dist/tttx/p-7d84c410.entry.js +1 -0
  65. package/dist/tttx/p-80bbe164.js +2 -0
  66. package/dist/tttx/{p-1884203f.entry.js → p-daa82b1b.entry.js} +1 -1
  67. package/dist/tttx/p-db1f56ba.entry.js +1 -0
  68. package/dist/tttx/p-dee50f14.entry.js +1 -0
  69. package/dist/tttx/{p-674e2f18.entry.js → p-e5c02c27.entry.js} +1 -1
  70. package/dist/tttx/tttx.esm.js +1 -1
  71. package/dist/types/components/molecules/tttx-form/tttx-form.d.ts +14 -7
  72. package/dist/types/components/molecules/tttx-form/tttx-form.stories.d.ts +1 -8
  73. package/dist/types/components/molecules/tttx-list/tttx-list.d.ts +51 -0
  74. package/dist/types/components/molecules/tttx-list/tttx-list.stories.d.ts +13 -0
  75. package/dist/types/components/molecules/tttx-standalone-input/tttx-standalone-input.d.ts +38 -0
  76. package/dist/types/components/molecules/tttx-standalone-input/tttx-standalone-input.stories.d.ts +106 -0
  77. package/dist/types/components.d.ts +88 -39
  78. package/dist/types/stencil-public-runtime.d.ts +3 -59
  79. package/loader/index.d.ts +0 -9
  80. package/package.json +67 -65
  81. package/readme.md +89 -86
  82. package/dist/cjs/tttx-input.cjs.entry.js +0 -44
  83. package/dist/collection/components/molecules/tttx-input/tttx-input.js +0 -259
  84. package/dist/collection/components/molecules/tttx-input/tttx-input.stories.js +0 -106
  85. package/dist/components/tttx-input.js +0 -77
  86. package/dist/esm/tttx-input.entry.js +0 -40
  87. package/dist/tttx/p-317b13d3.entry.js +0 -1
  88. package/dist/tttx/p-3cd7ad04.entry.js +0 -1
  89. package/dist/tttx/p-b6cc2780.js +0 -2
  90. package/dist/tttx/p-f30a0e84.entry.js +0 -1
  91. package/dist/tttx/p-f4855113.entry.js +0 -1
  92. package/dist/types/components/molecules/tttx-input/tttx-input.d.ts +0 -20
  93. package/dist/types/components/molecules/tttx-input/tttx-input.stories.d.ts +0 -60
@@ -0,0 +1,198 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-61cd741f.js');
6
+
7
+ 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}";
8
+
9
+ const TttxList = class {
10
+ constructor(hostRef) {
11
+ index.registerInstance(this, hostRef);
12
+ this.listPaginate = index.createEvent(this, "listPaginate", 7);
13
+ this.listSelectedEvent = index.createEvent(this, "listSelectedEvent", 7);
14
+ this.listItemClick = index.createEvent(this, "listItemClick", 7);
15
+ this.rowCount = 0;
16
+ this.name = undefined;
17
+ this.selectable = undefined;
18
+ this.items = [];
19
+ this.selectedIds = [];
20
+ this.loading = true;
21
+ this.lastPage = false;
22
+ }
23
+ listLoadHandler(event) {
24
+ if (event.detail.name !== this.name)
25
+ return;
26
+ this.items = [...this.items, ...event.detail.items];
27
+ this.loading = false;
28
+ this.lastPage = event.detail.lastPage;
29
+ this.renderRows(event.detail.items);
30
+ if (this.scrollableParent.clientHeight === this.scrollableParent.scrollHeight)
31
+ this.listPaginateHandler();
32
+ }
33
+ listPaginateHandler() {
34
+ // 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
35
+ if (this.lastPage || this.loading)
36
+ return;
37
+ this.loading = true;
38
+ this.listPaginate.emit({ name: this.name });
39
+ }
40
+ listClearDataCacheHandler(event) {
41
+ if (event.detail.name !== this.name)
42
+ return;
43
+ this.items = [];
44
+ this.selectedIds = [];
45
+ this.listItemContainer()
46
+ .querySelectorAll(".tttx-list__row")
47
+ .forEach((node) => {
48
+ node.remove();
49
+ });
50
+ this.rowCount = 0;
51
+ this.lastPage = false;
52
+ this.loading = false;
53
+ }
54
+ listActionSelectedEventHandler(event) {
55
+ if (event.detail.name !== this.name || !this.selectable || this.selectedIds.length === 0)
56
+ return;
57
+ const selectedRows = this.selectedIds.map(id => {
58
+ return this.items[id];
59
+ });
60
+ if (event.detail.removeRows)
61
+ this.removeSelectedRows();
62
+ this.listSelectedEvent.emit({
63
+ name: this.name,
64
+ eventName: event.detail.eventName,
65
+ selectedRows,
66
+ });
67
+ }
68
+ removeSelectedRows() {
69
+ const orderedSelectedIds = [...this.selectedIds].sort((a, b) => {
70
+ return b - a;
71
+ });
72
+ orderedSelectedIds.forEach(itemIndex => {
73
+ this.items.splice(itemIndex, 1);
74
+ this.listItemContainer().removeChild(this.listItemContainer().querySelector(`[data-row-id="${itemIndex}"]`));
75
+ // If this removes the scrollbar and we're not on the last page, load in a new page
76
+ if (this.scrollableParent.clientHeight === this.scrollableParent.scrollHeight)
77
+ this.listPaginateHandler();
78
+ });
79
+ // Empty selected ids with mutation rather than assignment to avoid unecessary component rerender
80
+ this.selectedIds.splice(0, this.selectedIds.length);
81
+ }
82
+ listItemClickHandler(itemData) {
83
+ if (this.selectedIds.length !== 0)
84
+ return;
85
+ this.listItemClick.emit({ itemData, name: this.name });
86
+ }
87
+ componentWillLoad() {
88
+ this.template = this.host.querySelector("template");
89
+ this.scrollableParent = this.getScrollableParent(this.host);
90
+ const scrollableContext = this.scrollableParent === document.scrollingElement ? document : this.scrollableParent;
91
+ scrollableContext.addEventListener("scroll", this.scrollHandler.bind(this));
92
+ window.addEventListener("resize", this.scrollHandler.bind(this));
93
+ }
94
+ componentDidLoad() {
95
+ // Emit event to load first page
96
+ this.listPaginate.emit({ name: this.name });
97
+ }
98
+ listItemContainer() {
99
+ return this.host.shadowRoot.querySelector(".list-item-container");
100
+ }
101
+ async scrollHandler() {
102
+ const { clientHeight, scrollTop, scrollHeight } = this.scrollableParent;
103
+ if (Math.abs(scrollHeight - clientHeight - scrollTop) < 26)
104
+ this.listPaginateHandler();
105
+ }
106
+ isScrollable(node) {
107
+ const hasScrollbar = ["scroll", "auto"].includes(node.style.overflowY);
108
+ return hasScrollbar;
109
+ }
110
+ getScrollableParent(node) {
111
+ if (!node || node === document.body) {
112
+ return document.scrollingElement;
113
+ }
114
+ else {
115
+ return this.isScrollable(node) ? node : this.getScrollableParent(node.parentElement);
116
+ }
117
+ }
118
+ appendRowCheckbox(rowContainer) {
119
+ if (!this.selectable)
120
+ return;
121
+ const rowId = this.rowCount;
122
+ const checkbox = document.createElement("input");
123
+ checkbox.setAttribute("type", "checkbox");
124
+ checkbox.addEventListener("click", e => {
125
+ e.stopPropagation();
126
+ if (e.target.checked) {
127
+ this.selectedIds = [...this.selectedIds, rowId];
128
+ rowContainer.classList.add("selected");
129
+ }
130
+ else {
131
+ this.selectedIds = this.selectedIds.filter(id => {
132
+ return id !== rowId;
133
+ });
134
+ rowContainer.classList.remove("selected");
135
+ }
136
+ });
137
+ rowContainer.setAttribute("data-row-id", `${rowId}`);
138
+ this.rowCount++;
139
+ rowContainer.appendChild(checkbox);
140
+ }
141
+ appendSeededTemplate(rowData, rowContainer) {
142
+ this.template.childNodes.forEach(child => {
143
+ const clone = child.cloneNode(false);
144
+ if (clone.getAttribute("data-fields")) {
145
+ const fields = clone.getAttribute("data-fields").replace(/\s/g, "").split(",");
146
+ const filteredRowData = Object.fromEntries(fields.map((field) => {
147
+ return [field, rowData[field]];
148
+ }));
149
+ clone.setAttribute("row-data", JSON.stringify(filteredRowData));
150
+ }
151
+ else {
152
+ clone.setAttribute("row-data", JSON.stringify(rowData));
153
+ }
154
+ rowContainer.appendChild(clone);
155
+ });
156
+ }
157
+ appendGenericTemplate(rowData, rowContainer) {
158
+ const row = document.createElement("div");
159
+ row.classList.add("generic-template__content");
160
+ row.textContent = rowData.text;
161
+ rowContainer.appendChild(row);
162
+ if (!rowData.icon)
163
+ return;
164
+ const icon = document.createElement("span");
165
+ icon.classList.add("material-symbols-rounded");
166
+ icon.textContent = rowData.icon;
167
+ if (rowData.iconColor)
168
+ icon.style["color"] = rowData.iconColor;
169
+ row.prepend(icon);
170
+ }
171
+ row(rowData) {
172
+ const rowContainer = document.createElement("div");
173
+ rowContainer.classList.add("tttx-list__row");
174
+ rowContainer.addEventListener("click", () => {
175
+ this.listItemClickHandler(rowData);
176
+ });
177
+ this.appendRowCheckbox(rowContainer);
178
+ this.template ? this.appendSeededTemplate(rowData, rowContainer) : this.appendGenericTemplate(rowData, rowContainer);
179
+ return rowContainer;
180
+ }
181
+ renderRows(batchData) {
182
+ batchData.forEach(rowData => {
183
+ this.listItemContainer().appendChild(this.row(rowData));
184
+ });
185
+ }
186
+ loadIndicator() {
187
+ if (!this.loading)
188
+ return;
189
+ return index.h("div", { class: "load-indicator" }, index.h("tttx-loading-spinner", { size: 'large' }));
190
+ }
191
+ render() {
192
+ return (index.h(index.Host, null, index.h("div", { class: "list-item-container", tabindex: "0" }, !this.loading && this.items.length === 0 ? "No data to display" : undefined), this.loadIndicator()));
193
+ }
194
+ get host() { return index.getElement(this); }
195
+ };
196
+ TttxList.style = tttxListCss;
197
+
198
+ exports.tttx_list = TttxList;
@@ -2,9 +2,9 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-8a4cb9bc.js');
5
+ const index = require('./index-61cd741f.js');
6
6
 
7
- const tttxLoadingSpinnerCss = ".material-symbols-rounded{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}.spinner-container{position:absolute}.loading-box{display:flex;align-items:center;justify-content:center}.loading-text{font-size:16px;font-weight:400;padding-top:10px;text-align:center}.spinner{border:solid #1479c6;border-bottom-color:#D5D5D5;border-radius:50%;position:relative;box-sizing:border-box;animation:rotation 1s linear infinite}.spinner.small{height:20px;width:20px;border-width:4px}.spinner.large{height:60px;width:60px;border-width:8px}@keyframes rotation{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";
7
+ const tttxLoadingSpinnerCss = ".material-symbols-rounded{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}.spinner-container{position:absolute}.loading-box{display:flex;align-items:center;justify-content:center}.loading-text{font-size:16px;font-weight:400;padding-top:10px;text-align:center}.spinner{border:solid #1479c6;border-bottom-color:#d5d5d5;border-radius:50%;position:relative;box-sizing:border-box;animation:rotation 1s linear infinite}.spinner.small{height:20px;width:20px;border-width:4px}.spinner.large{height:60px;width:60px;border-width:8px}@keyframes rotation{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";
8
8
 
9
9
  const TttxLoadingSpinner = class {
10
10
  constructor(hostRef) {
@@ -15,10 +15,10 @@ const TttxLoadingSpinner = class {
15
15
  renderLoadingMessage() {
16
16
  if (!this.loadingMessage)
17
17
  return '';
18
- return index.h("div", { class: 'loading-text' }, "Loading, please wait...");
18
+ return index.h("div", { class: "loading-text" }, "Loading, please wait...");
19
19
  }
20
20
  render() {
21
- return index.h("div", { class: 'spinner-container' }, index.h("div", { class: "loading-box" }, index.h("span", { class: `spinner ${this.size}` })), this.renderLoadingMessage());
21
+ return (index.h("div", { class: "spinner-container" }, index.h("div", { class: "loading-box" }, index.h("span", { class: `spinner ${this.size}` })), this.renderLoadingMessage()));
22
22
  }
23
23
  };
24
24
  TttxLoadingSpinner.style = tttxLoadingSpinnerCss;
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-8a4cb9bc.js');
5
+ const index = require('./index-61cd741f.js');
6
6
 
7
7
  const tttxPopoverContentCss = ".material-symbols-rounded{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}:host{display:block;max-width:400px}h4{margin:0;font-size:15px;font-weight:700;color:black;margin-bottom:4px}p{margin:0;font-size:14px;font-weight:normal;color:black;margin-bottom:4px}.linky{color:#1479c6;text-decoration:none;cursor:pointer}";
8
8
 
@@ -15,7 +15,7 @@ const TttxPopoverContent = class {
15
15
  this.linktext = undefined;
16
16
  }
17
17
  render() {
18
- return (index.h(index.Host, null, this.header && index.h("h4", null, this.header), this.body && index.h("p", null, this.body), this.linkcontext && index.h("span", { class: "linky", onClick: (evt) => console.log(this.linkcontext, evt) }, this.linktext || 'More Information')));
18
+ return (index.h(index.Host, null, this.header && index.h("h4", null, this.header), this.body && index.h("p", null, this.body), this.linkcontext && (index.h("span", { class: "linky", onClick: evt => console.log(this.linkcontext, evt) }, this.linktext || 'More Information'))));
19
19
  }
20
20
  };
21
21
  TttxPopoverContent.style = tttxPopoverContentCss;
@@ -0,0 +1,134 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-61cd741f.js');
6
+
7
+ const tttxStandaloneInputCss = ".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}";
8
+
9
+ const TttxInput = class {
10
+ constructor(hostRef) {
11
+ index.registerInstance(this, hostRef);
12
+ this.valueChanged = index.createEvent(this, "valueChanged", 7);
13
+ this.isfocused = false;
14
+ this.label = undefined;
15
+ this.valid = undefined;
16
+ this.showerrormsg = undefined;
17
+ this.errormsg = undefined;
18
+ this.iconleft = undefined;
19
+ this.iconright = undefined;
20
+ this.autocapitalize = undefined;
21
+ this.autocomplete = undefined;
22
+ this.autofocus = undefined;
23
+ this.checked = undefined;
24
+ this.disabled = undefined;
25
+ this.max = undefined;
26
+ this.maxlength = undefined;
27
+ this.min = undefined;
28
+ this.minlength = undefined;
29
+ this.name = undefined;
30
+ this.pattern = undefined;
31
+ this.placeholder = undefined;
32
+ this.readonly = undefined;
33
+ this.required = undefined;
34
+ this.step = undefined;
35
+ this.type = 'text';
36
+ this.value = undefined;
37
+ }
38
+ handleChange(event) {
39
+ const target = event.target;
40
+ this.value = target.value;
41
+ this.valueChanged.emit(target.value);
42
+ }
43
+ handleFocus() {
44
+ this.isfocused = true;
45
+ }
46
+ handleBlur() {
47
+ this.isfocused = false;
48
+ }
49
+ render() {
50
+ const classNames = ['standalone', this.showerrormsg ? 'invalid' : ''].join(' ');
51
+ return (index.h(index.Host, null, index.h("label", { class: 'inputBlock' }, this.label, !this.required ? index.h("span", { class: "optional" }, "\u00A0(optional)") : '', this.iconleft && (index.h("div", { class: "icon-left" }, index.h("tttx-icon", { icon: this.iconleft, colour: "grey" }))), index.h("input", { class: classNames, autocapitalize: this.type === 'url' || this.type === 'email' || this.type === 'password' ? this.autocapitalize : null, autofocus: this.autofocus, autocomplete: this.type === 'text' ||
52
+ this.type === 'search' ||
53
+ this.type === 'url' ||
54
+ this.type === 'tel' ||
55
+ this.type === 'email' ||
56
+ this.type === 'password' ||
57
+ this.type === 'datepickers' ||
58
+ this.type === 'range' ||
59
+ this.type === 'color'
60
+ ? this.autocomplete
61
+ : null, checked: this.type === 'checkbox' || this.type === 'radio' ? this.checked : null, disabled: !this.required ? this.disabled : null, max: this.type === 'date' ||
62
+ this.type === 'month' ||
63
+ this.type === 'week' ||
64
+ this.type === 'time' ||
65
+ this.type === 'datetime-local' ||
66
+ this.type === 'number' ||
67
+ this.type === 'range'
68
+ ? this.max
69
+ : null, maxlength: this.maxlength, min: this.type === 'date' ||
70
+ this.type === 'month' ||
71
+ this.type === 'week' ||
72
+ this.type === 'time' ||
73
+ this.type === 'datetime-local' ||
74
+ this.type === 'number' ||
75
+ this.type === 'range'
76
+ ? this.min
77
+ : null, minlength: this.maxlength, name: this.name, pattern: this.type === 'text' ||
78
+ this.type === 'date' ||
79
+ this.type === 'search' ||
80
+ this.type === 'url' ||
81
+ this.type === 'tel' ||
82
+ this.type === 'email' ||
83
+ this.type === 'password'
84
+ ? this.pattern
85
+ : null, placeholder: this.type === 'text' ||
86
+ this.type === 'tel' ||
87
+ this.type === 'email' ||
88
+ this.type === 'url' ||
89
+ this.type === 'password' ||
90
+ this.type === 'search'
91
+ ? this.placeholder
92
+ : null, readonly: this.type === 'text' ||
93
+ this.type === 'search' ||
94
+ this.type === 'url' ||
95
+ this.type === 'tel' ||
96
+ this.type === 'email' ||
97
+ this.type === 'password' ||
98
+ this.type === 'date' ||
99
+ this.type === 'month' ||
100
+ this.type === 'week' ||
101
+ this.type === 'time' ||
102
+ this.type === 'datetime-local' ||
103
+ this.type === 'number'
104
+ ? this.readonly
105
+ : null, required: this.type === 'text' ||
106
+ this.type === 'search' ||
107
+ this.type === 'url' ||
108
+ this.type === 'tel' ||
109
+ this.type === 'email' ||
110
+ this.type === 'password' ||
111
+ this.type === 'date' ||
112
+ this.type === 'month' ||
113
+ this.type === 'week' ||
114
+ this.type === 'time' ||
115
+ this.type === 'datetime-local' ||
116
+ this.type === 'number' ||
117
+ this.type === 'checkbox' ||
118
+ this.type === 'radio' ||
119
+ this.type === 'file'
120
+ ? this.required
121
+ : null, step: this.type === 'date' ||
122
+ this.type === 'month' ||
123
+ this.type === 'week' ||
124
+ this.type === 'time' ||
125
+ this.type === 'datetime-local' ||
126
+ this.type === 'number' ||
127
+ this.type === 'range'
128
+ ? this.step
129
+ : null, type: this.type, value: this.value, onBlur: this.handleBlur.bind(this), onFocus: this.handleFocus.bind(this), onInput: this.handleChange.bind(this) }), this.iconright && (index.h("div", { class: "icon-right" }, index.h("tttx-icon", { icon: this.iconright, colour: "grey" }))), index.h("span", { class: ['errorBubble', this.showerrormsg && this.errormsg ? 'visible' : ''].join(' ') }, index.h("span", { class: "material-symbols-rounded validationicon" }, "warning"), " ", this.errormsg))));
130
+ }
131
+ };
132
+ TttxInput.style = tttxStandaloneInputCss;
133
+
134
+ exports.tttx_standalone_input = TttxInput;
@@ -1,11 +1,9 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-8a4cb9bc.js');
3
+ const index = require('./index-61cd741f.js');
6
4
 
7
5
  /*
8
- Stencil Client Patch Browser v2.22.3 | MIT Licensed | https://stenciljs.com
6
+ Stencil Client Patch Browser v2.20.0 | MIT Licensed | https://stenciljs.com
9
7
  */
10
8
  const patchBrowser = () => {
11
9
  const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('tttx.cjs.js', document.baseURI).href));
@@ -17,7 +15,5 @@ const patchBrowser = () => {
17
15
  };
18
16
 
19
17
  patchBrowser().then(options => {
20
- return index.bootstrapLazy([["tttx-input.cjs",[[1,"tttx-input",{"label":[1],"valid":[4],"showerrormsg":[4],"errormsg":[1],"value":[1025],"type":[1],"placeholder":[1],"pattern":[1],"iconleft":[1],"iconright":[1],"required":[4],"isfocused":[32]}]]],["tttx-button.cjs",[[1,"tttx-button",{"fontColor":[1,"font-color"],"buttonStyle":[1,"button-style"]},[[0,"clickEvent","onClicked"]]]]],["tttx-checkbox.cjs",[[1,"tttx-checkbox",{"value":[4],"label":[1],"required":[4]}]]],["tttx-form.cjs",[[1,"tttx-form",{"dataAttribute":[1,"data-attribute"],"functionAttribute":[1,"function-attribute"]}]]],["tttx-loading-spinner.cjs",[[1,"tttx-loading-spinner",{"loadingMessage":[1028,"loading-message"],"size":[1025]}]]],["tttx-popover-content.cjs",[[1,"tttx-popover-content",{"header":[1],"body":[1],"linkcontext":[1],"linktext":[1]}]]],["tttx-icon.cjs",[[1,"tttx-icon",{"icon":[1],"colour":[1]},[[4,"click","handleDocumentClick"]]]]]], options);
18
+ return index.bootstrapLazy([["tttx-list.cjs",[[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.cjs",[[2,"tttx-standalone-input",{"label":[1],"valid":[4],"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],"isfocused":[32]}]]],["tttx-button.cjs",[[1,"tttx-button",{"fontColor":[1,"font-color"],"buttonStyle":[1,"button-style"]},[[0,"clickEvent","onClicked"]]]]],["tttx-checkbox.cjs",[[1,"tttx-checkbox",{"value":[4],"label":[1],"required":[4]}]]],["tttx-form.cjs",[[1,"tttx-form",{"formschema":[8],"submitValue":[8,"submit-value"]}]]],["tttx-popover-content.cjs",[[1,"tttx-popover-content",{"header":[1],"body":[1],"linkcontext":[1],"linktext":[1]}]]],["tttx-icon.cjs",[[1,"tttx-icon",{"icon":[1],"colour":[1]},[[4,"click","handleDocumentClick"]]]]],["tttx-loading-spinner.cjs",[[1,"tttx-loading-spinner",{"loadingMessage":[1028,"loading-message"],"size":[1025]}]]]], options);
21
19
  });
22
-
23
- exports.setNonce = index.setNonce;
@@ -1,17 +1,18 @@
1
1
  {
2
2
  "entries": [
3
+ "./components/molecules/tttx-standalone-input/tttx-standalone-input.js",
3
4
  "./components/atoms/tttx-button/tttx-button.js",
4
5
  "./components/atoms/tttx-icon/tttx-icon.js",
5
6
  "./components/atoms/tttx-loading-spinner/tttx-loading-spinner.js",
6
7
  "./components/atoms/tttx-popover-content/tttx-popover-content.js",
7
8
  "./components/atoms/ttx-checkbox/tttx-checkbox.js",
8
9
  "./components/molecules/tttx-form/tttx-form.js",
9
- "./components/molecules/tttx-input/tttx-input.js"
10
+ "./components/molecules/tttx-list/tttx-list.js"
10
11
  ],
11
12
  "compiler": {
12
13
  "name": "@stencil/core",
13
- "version": "2.22.3",
14
- "typescriptVersion": "4.9.4"
14
+ "version": "2.20.0",
15
+ "typescriptVersion": "4.8.4"
15
16
  },
16
17
  "collections": [],
17
18
  "bundles": []
@@ -29,6 +29,7 @@
29
29
  .primary-blue {
30
30
  background: #1479c6;
31
31
  border: 1px solid #1479c6;
32
+ color: white;
32
33
  }
33
34
 
34
35
  .primary-blue:hover {
@@ -16,12 +16,12 @@ export default {
16
16
  },
17
17
  },
18
18
  };
19
- const Template = ({ content, fontColor, buttonStyle }) => `
20
- <tttx-button font-color=${fontColor} button-style=${buttonStyle}>${content}</tttx-button>
19
+ const Template = ({ content, fontColor, buttonStyle }) => `
20
+ <tttx-button font-color=${fontColor} button-style=${buttonStyle}>${content}</tttx-button>
21
21
  `;
22
22
  export const Default = Template.bind({});
23
23
  Default.args = {
24
24
  content: 'My Button',
25
25
  fontColor: 'font-white',
26
- buttonStyle: 'primary-blue'
26
+ buttonStyle: 'primary-blue',
27
27
  };
@@ -73,11 +73,11 @@
73
73
  }
74
74
 
75
75
  .red {
76
- color: #DC0000;
76
+ color: #dc0000;
77
77
  }
78
78
 
79
79
  .orange {
80
- color: #F59500;
80
+ color: #f59500;
81
81
  }
82
82
 
83
83
  .blue {
@@ -85,7 +85,7 @@
85
85
  }
86
86
 
87
87
  .green {
88
- color: #A2BB31;
88
+ color: #a2bb31;
89
89
  }
90
90
 
91
91
  .gray {
@@ -24,21 +24,21 @@ Basic.args = {
24
24
  icon: 'warning',
25
25
  colour: 'red',
26
26
  };
27
- const WithPopoverTemplate = ({ icon, colour }) => `
28
- <div style="overflow: auto; height: 300px;">
29
- <div style="margin-top:150px; height:300px;">
30
- <tttx-icon icon="${icon}" colour="${colour}">
31
- <div slot="popover">
32
- <tttx-popover-content
33
- header="The humble egg"
34
- body="Most arthropods such as insects, vertebrates (excluding live-bearing mammals), and mollusks lay eggs, although some, such as scorpions, do not."
35
- linkcontext="Wikipedia_egg"
36
- linktext="Learn more about eggs"
37
- />
38
- </div>
39
- </tttx-icon>
40
- </div>
41
- </div>
27
+ const WithPopoverTemplate = ({ icon, colour }) => `
28
+ <div style="overflow: auto; height: 300px;">
29
+ <div style="margin-top:150px; height:300px;">
30
+ <tttx-icon icon="${icon}" colour="${colour}">
31
+ <div slot="popover">
32
+ <tttx-popover-content
33
+ header="The humble egg"
34
+ body="Most arthropods such as insects, vertebrates (excluding live-bearing mammals), and mollusks lay eggs, although some, such as scorpions, do not."
35
+ linkcontext="Wikipedia_egg"
36
+ linktext="Learn more about eggs"
37
+ />
38
+ </div>
39
+ </tttx-icon>
40
+ </div>
41
+ </div>
42
42
  `;
43
43
  export const WithPopover = WithPopoverTemplate.bind({});
44
44
  WithPopover.args = {
@@ -21,7 +21,7 @@
21
21
 
22
22
  .spinner {
23
23
  border: solid #1479c6;
24
- border-bottom-color: #D5D5D5;
24
+ border-bottom-color: #d5d5d5;
25
25
  border-radius: 50%;
26
26
  position: relative;
27
27
  box-sizing: border-box;
@@ -7,10 +7,10 @@ export class TttxLoadingSpinner {
7
7
  renderLoadingMessage() {
8
8
  if (!this.loadingMessage)
9
9
  return '';
10
- return h("div", { class: 'loading-text' }, "Loading, please wait...");
10
+ return h("div", { class: "loading-text" }, "Loading, please wait...");
11
11
  }
12
12
  render() {
13
- return h("div", { class: 'spinner-container' }, h("div", { class: "loading-box" }, h("span", { class: `spinner ${this.size}` })), this.renderLoadingMessage());
13
+ return (h("div", { class: "spinner-container" }, h("div", { class: "loading-box" }, h("span", { class: `spinner ${this.size}` })), this.renderLoadingMessage()));
14
14
  }
15
15
  static get is() { return "tttx-loading-spinner"; }
16
16
  static get encapsulation() { return "shadow"; }
@@ -11,7 +11,7 @@ export default {
11
11
  },
12
12
  },
13
13
  };
14
- export const Example = (args) => {
14
+ export const Example = args => {
15
15
  const size = args.size || 'large';
16
16
  return `<tttx-loading-spinner ${args.loadingMessage ? 'loading-message' : ''} size='${size}' />`;
17
17
  };
@@ -7,7 +7,7 @@ export class TttxPopoverContent {
7
7
  this.linktext = undefined;
8
8
  }
9
9
  render() {
10
- return (h(Host, null, this.header && h("h4", null, this.header), this.body && h("p", null, this.body), this.linkcontext && h("span", { class: "linky", onClick: (evt) => console.log(this.linkcontext, evt) }, this.linktext || 'More Information')));
10
+ return (h(Host, null, this.header && h("h4", null, this.header), this.body && h("p", null, this.body), this.linkcontext && (h("span", { class: "linky", onClick: evt => console.log(this.linkcontext, evt) }, this.linktext || 'More Information'))));
11
11
  }
12
12
  static get is() { return "tttx-popover-content"; }
13
13
  static get encapsulation() { return "shadow"; }
@@ -5,12 +5,12 @@ export default {
5
5
  header: {
6
6
  control: {
7
7
  type: 'text',
8
- }
8
+ },
9
9
  },
10
10
  body: {
11
11
  control: {
12
12
  type: 'text',
13
- }
13
+ },
14
14
  },
15
15
  },
16
16
  };
@@ -19,5 +19,5 @@ export const Basic = Template.bind({});
19
19
  Basic.args = {
20
20
  header: 'HEADER',
21
21
  body: 'BODY',
22
- linkcontext: 'TESTING123'
22
+ linkcontext: 'TESTING123',
23
23
  };