@3t-transform/threeteeui 0.0.15 → 0.0.16

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 (132) hide show
  1. package/dist/cjs/index-864b7110.js +1531 -0
  2. package/dist/cjs/index.cjs.js +2 -0
  3. package/dist/cjs/loader.cjs.js +22 -0
  4. package/dist/cjs/tttx-button.cjs.entry.js +28 -0
  5. package/dist/cjs/tttx-checkbox.cjs.entry.js +28 -0
  6. package/dist/cjs/tttx-form.cjs.entry.js +374 -0
  7. package/dist/cjs/tttx-icon.cjs.entry.js +1863 -0
  8. package/dist/cjs/tttx-list.cjs.entry.js +198 -0
  9. package/dist/cjs/tttx-loading-spinner.cjs.entry.js +26 -0
  10. package/dist/cjs/tttx-popover-content.cjs.entry.js +23 -0
  11. package/dist/cjs/tttx-standalone-input.cjs.entry.js +136 -0
  12. package/dist/cjs/tttx-table.cjs.entry.js +60 -0
  13. package/dist/cjs/tttx.cjs.js +23 -0
  14. package/dist/collection/collection-manifest.json +20 -0
  15. package/dist/collection/components/atoms/tttx-button/tttx-button.css +62 -0
  16. package/dist/collection/components/atoms/tttx-button/tttx-button.js +93 -0
  17. package/dist/collection/components/atoms/tttx-button/tttx-button.stories.js +27 -0
  18. package/dist/collection/components/atoms/tttx-icon/tttx-icon.css +105 -0
  19. package/dist/collection/components/atoms/tttx-icon/tttx-icon.js +116 -0
  20. package/dist/collection/components/atoms/tttx-icon/tttx-icon.stories.js +47 -0
  21. package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.css +48 -0
  22. package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.js +66 -0
  23. package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.stories.js +17 -0
  24. package/dist/collection/components/atoms/tttx-popover-content/tttx-popover-content.css +30 -0
  25. package/dist/collection/components/atoms/tttx-popover-content/tttx-popover-content.js +96 -0
  26. package/dist/collection/components/atoms/tttx-popover-content/tttx-popover-content.stories.js +23 -0
  27. package/dist/collection/components/atoms/ttx-checkbox/tttx-checkbox.css +181 -0
  28. package/dist/collection/components/atoms/ttx-checkbox/tttx-checkbox.js +101 -0
  29. package/dist/collection/components/atoms/ttx-checkbox/tttx-checkbox.stories.js +13 -0
  30. package/dist/collection/components/molecules/tttx-form/tttx-form.css +230 -0
  31. package/dist/collection/components/molecules/tttx-form/tttx-form.js +451 -0
  32. package/dist/collection/components/molecules/tttx-form/tttx-form.stories.js +109 -0
  33. package/dist/collection/components/molecules/tttx-list/tttx-list.css +56 -0
  34. package/dist/collection/components/molecules/tttx-list/tttx-list.js +311 -0
  35. package/dist/collection/components/molecules/tttx-list/tttx-list.stories.js +37 -0
  36. package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.css +177 -0
  37. package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.js +569 -0
  38. package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.stories.js +156 -0
  39. package/dist/collection/components/molecules/tttx-table/tttx-table.css +166 -0
  40. package/dist/collection/components/molecules/tttx-table/tttx-table.js +177 -0
  41. package/dist/collection/components/molecules/tttx-table/tttx-table.stories.js +81 -0
  42. package/dist/collection/components/palette.stories.js +88 -0
  43. package/dist/collection/docs/gettingstarted-developer.stories.js +9 -0
  44. package/dist/collection/icons.js +2838 -0
  45. package/dist/collection/index.js +1 -0
  46. package/dist/components/index.d.ts +39 -0
  47. package/dist/components/index.js +10 -0
  48. package/dist/components/tttx-button.d.ts +11 -0
  49. package/dist/components/tttx-button.js +45 -0
  50. package/dist/components/tttx-checkbox.d.ts +11 -0
  51. package/dist/components/tttx-checkbox.js +46 -0
  52. package/dist/components/tttx-form.d.ts +11 -0
  53. package/dist/components/tttx-form.js +391 -0
  54. package/dist/components/tttx-icon.d.ts +11 -0
  55. package/dist/components/tttx-icon.js +6 -0
  56. package/dist/components/tttx-icon2.js +1877 -0
  57. package/dist/components/tttx-list.d.ts +11 -0
  58. package/dist/components/tttx-list.js +225 -0
  59. package/dist/components/tttx-loading-spinner.d.ts +11 -0
  60. package/dist/components/tttx-loading-spinner.js +6 -0
  61. package/dist/components/tttx-loading-spinner2.js +40 -0
  62. package/dist/components/tttx-popover-content.d.ts +11 -0
  63. package/dist/components/tttx-popover-content.js +6 -0
  64. package/dist/components/tttx-popover-content2.js +39 -0
  65. package/dist/components/tttx-standalone-input.d.ts +11 -0
  66. package/dist/components/tttx-standalone-input.js +179 -0
  67. package/dist/components/tttx-table.d.ts +11 -0
  68. package/dist/components/tttx-table.js +91 -0
  69. package/dist/esm/index-232e347b.js +1502 -0
  70. package/dist/esm/index.js +1 -0
  71. package/dist/esm/loader.js +18 -0
  72. package/dist/esm/polyfills/core-js.js +11 -0
  73. package/dist/esm/polyfills/css-shim.js +1 -0
  74. package/dist/esm/polyfills/dom.js +79 -0
  75. package/dist/esm/polyfills/es5-html-element.js +1 -0
  76. package/dist/esm/polyfills/index.js +34 -0
  77. package/dist/esm/polyfills/system.js +6 -0
  78. package/dist/esm/tttx-button.entry.js +24 -0
  79. package/dist/esm/tttx-checkbox.entry.js +24 -0
  80. package/dist/esm/tttx-form.entry.js +370 -0
  81. package/dist/esm/tttx-icon.entry.js +1859 -0
  82. package/dist/esm/tttx-list.entry.js +194 -0
  83. package/dist/esm/tttx-loading-spinner.entry.js +22 -0
  84. package/dist/esm/tttx-popover-content.entry.js +19 -0
  85. package/dist/esm/tttx-standalone-input.entry.js +132 -0
  86. package/dist/esm/tttx-table.entry.js +56 -0
  87. package/dist/esm/tttx.js +18 -0
  88. package/dist/index.cjs.js +1 -0
  89. package/dist/index.js +1 -0
  90. package/dist/tttx/index.esm.js +0 -0
  91. package/dist/tttx/p-01e1894e.entry.js +1 -0
  92. package/dist/tttx/p-10316ff1.entry.js +1 -0
  93. package/dist/tttx/p-125f06b3.entry.js +1 -0
  94. package/dist/tttx/p-184c4fae.js +2 -0
  95. package/dist/tttx/p-3973b7dd.entry.js +1 -0
  96. package/dist/tttx/p-5ce1ba22.entry.js +1 -0
  97. package/dist/tttx/p-6828fe6f.entry.js +1 -0
  98. package/dist/tttx/p-b1c22f5f.entry.js +1 -0
  99. package/dist/tttx/p-c7f9be65.entry.js +1 -0
  100. package/dist/tttx/p-fe4c70b2.entry.js +1 -0
  101. package/dist/tttx/tttx.esm.js +1 -0
  102. package/dist/types/components/atoms/tttx-button/tttx-button.d.ts +9 -0
  103. package/dist/types/components/atoms/tttx-button/tttx-button.stories.d.ts +20 -0
  104. package/dist/types/components/atoms/tttx-icon/tttx-icon.d.ts +14 -0
  105. package/dist/types/components/atoms/tttx-icon/tttx-icon.stories.d.ts +21 -0
  106. package/dist/types/components/atoms/tttx-loading-spinner/tttx-loading-spinner.d.ts +6 -0
  107. package/dist/types/components/atoms/tttx-loading-spinner/tttx-loading-spinner.stories.d.ts +17 -0
  108. package/dist/types/components/atoms/tttx-popover-content/tttx-popover-content.d.ts +7 -0
  109. package/dist/types/components/atoms/tttx-popover-content/tttx-popover-content.stories.d.ts +18 -0
  110. package/dist/types/components/atoms/ttx-checkbox/tttx-checkbox.d.ts +9 -0
  111. package/dist/types/components/atoms/ttx-checkbox/tttx-checkbox.stories.d.ts +6 -0
  112. package/dist/types/components/molecules/tttx-form/tttx-form.d.ts +134 -0
  113. package/dist/types/components/molecules/tttx-form/tttx-form.stories.d.ts +12 -0
  114. package/dist/types/components/molecules/tttx-list/tttx-list.d.ts +51 -0
  115. package/dist/types/components/molecules/tttx-list/tttx-list.stories.d.ts +13 -0
  116. package/dist/types/components/molecules/tttx-standalone-input/tttx-standalone-input.d.ts +38 -0
  117. package/dist/types/components/molecules/tttx-standalone-input/tttx-standalone-input.stories.d.ts +106 -0
  118. package/dist/types/components/molecules/tttx-table/tttx-table.d.ts +15 -0
  119. package/dist/types/components/molecules/tttx-table/tttx-table.stories.d.ts +21 -0
  120. package/dist/types/components/palette.stories.d.ts +6 -0
  121. package/dist/types/components.d.ts +264 -0
  122. package/dist/types/docs/gettingstarted-developer.stories.d.ts +5 -0
  123. package/dist/types/icons.d.ts +2 -0
  124. package/dist/types/index.d.ts +1 -0
  125. package/dist/types/stencil-public-runtime.d.ts +1637 -0
  126. package/loader/cdn.js +3 -0
  127. package/loader/index.cjs.js +3 -0
  128. package/loader/index.d.ts +21 -0
  129. package/loader/index.es2017.js +3 -0
  130. package/loader/index.js +4 -0
  131. package/loader/package.json +11 -0
  132. package/package.json +1 -1
@@ -0,0 +1,194 @@
1
+ import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-232e347b.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 };
@@ -0,0 +1,22 @@
1
+ import { r as registerInstance, h } from './index-232e347b.js';
2
+
3
+ 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)}}";
4
+
5
+ const TttxLoadingSpinner = class {
6
+ constructor(hostRef) {
7
+ registerInstance(this, hostRef);
8
+ this.loadingMessage = undefined;
9
+ this.size = 'large';
10
+ }
11
+ renderLoadingMessage() {
12
+ if (!this.loadingMessage)
13
+ return '';
14
+ return h("div", { class: "loading-text" }, "Loading, please wait...");
15
+ }
16
+ render() {
17
+ return (h("div", { class: "spinner-container" }, h("div", { class: "loading-box" }, h("span", { class: `spinner ${this.size}` })), this.renderLoadingMessage()));
18
+ }
19
+ };
20
+ TttxLoadingSpinner.style = tttxLoadingSpinnerCss;
21
+
22
+ export { TttxLoadingSpinner as tttx_loading_spinner };
@@ -0,0 +1,19 @@
1
+ import { r as registerInstance, h, H as Host } from './index-232e347b.js';
2
+
3
+ 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}";
4
+
5
+ const TttxPopoverContent = class {
6
+ constructor(hostRef) {
7
+ registerInstance(this, hostRef);
8
+ this.header = undefined;
9
+ this.body = undefined;
10
+ this.linkcontext = undefined;
11
+ this.linktext = undefined;
12
+ }
13
+ render() {
14
+ 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'))));
15
+ }
16
+ };
17
+ TttxPopoverContent.style = tttxPopoverContentCss;
18
+
19
+ export { TttxPopoverContent as tttx_popover_content };
@@ -0,0 +1,132 @@
1
+ import { r as registerInstance, c as createEvent, h, H as Host } from './index-232e347b.js';
2
+
3
+ const tttxStandaloneInputCss = ".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}.icon-left,.icon-right{flex-basis:24px}.icon-left span,.icon-right span{font-size:24px;line-height:24px;text-align:center;display:block;width:24px;height:24px;margin-top:4px}.icon-left span{margin-left:4px}.icon-right span{margin-right:4px}.icon-right{margin-top:5px;margin-right:4px}.icon-left{margin-top:5px;margin-left:4px}.iconleft .input{padding-left:4px}.iconright .input{padding-right:4px}.focused{border-color:#1479c6}.errormsg{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 .validationicon{width:16px;height:16px;font-size:16px;margin-right:4px;vertical-align:middle;color:#dc0000}.danger{color:#dc0000}.optional{color:#757575;font-weight:normal}label.inputBlock{display:block;position:relative;line-height:21px}label{font-weight:500;font-size:16px}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]{background:white;display:block;min-width:calc(100% - 18px);line-height:37px}input.invalid:invalid,input.standalone.invalid{border:1px solid #dc0000}input~.errorBubble{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~.errorBubble:not(.visible){visibility:hidden}input~.errorBubble span{color:#dc0000;font-size:16px;margin-right:4px;height:16px}input.invalid:invalid~.errorBubble{position:relative;font-size:14px;font-weight:normal;width:100%;font-family:\"Roboto\", sans-serif;color:#dc0000;visibility:visible}input:focus{border-color:#1479c6}:host{display:block}";
4
+
5
+ const TttxInput = class {
6
+ constructor(hostRef) {
7
+ registerInstance(this, hostRef);
8
+ this.valueChanged = createEvent(this, "valueChanged", 7);
9
+ this.focusChanged = createEvent(this, "focusChanged", 7);
10
+ this.blurChanged = createEvent(this, "blurChanged", 7);
11
+ this.label = undefined;
12
+ this.showerrormsg = undefined;
13
+ this.errormsg = undefined;
14
+ this.iconleft = undefined;
15
+ this.iconright = undefined;
16
+ this.autocapitalize = undefined;
17
+ this.autocomplete = undefined;
18
+ this.autofocus = undefined;
19
+ this.checked = undefined;
20
+ this.disabled = undefined;
21
+ this.max = undefined;
22
+ this.maxlength = undefined;
23
+ this.min = undefined;
24
+ this.minlength = undefined;
25
+ this.name = undefined;
26
+ this.pattern = undefined;
27
+ this.placeholder = undefined;
28
+ this.readonly = undefined;
29
+ this.required = undefined;
30
+ this.step = undefined;
31
+ this.type = 'text';
32
+ this.value = undefined;
33
+ }
34
+ handleChange(event) {
35
+ const target = event.target;
36
+ this.value = target.value;
37
+ this.valueChanged.emit(target.value);
38
+ }
39
+ handleFocus(event) {
40
+ const target = event.target;
41
+ this.focusChanged.emit(target.value);
42
+ }
43
+ handleBlur(event) {
44
+ const target = event.target;
45
+ this.blurChanged.emit(target.value);
46
+ }
47
+ render() {
48
+ const classNames = ['standalone', this.showerrormsg ? 'invalid' : ''].join(' ');
49
+ return (h(Host, null, h("label", { class: 'inputBlock' }, this.label, !this.required ? h("span", { class: "optional" }, "\u00A0(optional)") : '', this.iconleft && (h("div", { class: "icon-left" }, h("tttx-icon", { icon: this.iconleft, colour: "grey" }))), h("input", { class: classNames, autocapitalize: this.type === 'url' || this.type === 'email' || this.type === 'password' ? this.autocapitalize : null, autofocus: this.autofocus, autocomplete: this.type === 'text' ||
50
+ this.type === 'search' ||
51
+ this.type === 'url' ||
52
+ this.type === 'tel' ||
53
+ this.type === 'email' ||
54
+ this.type === 'password' ||
55
+ this.type === 'datepickers' ||
56
+ this.type === 'range' ||
57
+ this.type === 'color'
58
+ ? this.autocomplete
59
+ : null, checked: this.type === 'checkbox' || this.type === 'radio' ? this.checked : null, disabled: !this.required ? this.disabled : null, max: this.type === 'date' ||
60
+ this.type === 'month' ||
61
+ this.type === 'week' ||
62
+ this.type === 'time' ||
63
+ this.type === 'datetime-local' ||
64
+ this.type === 'number' ||
65
+ this.type === 'range'
66
+ ? this.max
67
+ : null, maxlength: this.maxlength, min: this.type === 'date' ||
68
+ this.type === 'month' ||
69
+ this.type === 'week' ||
70
+ this.type === 'time' ||
71
+ this.type === 'datetime-local' ||
72
+ this.type === 'number' ||
73
+ this.type === 'range'
74
+ ? this.min
75
+ : null, minlength: this.minlength, name: this.name, pattern: this.type === 'text' ||
76
+ this.type === 'date' ||
77
+ this.type === 'search' ||
78
+ this.type === 'url' ||
79
+ this.type === 'tel' ||
80
+ this.type === 'email' ||
81
+ this.type === 'password'
82
+ ? this.pattern
83
+ : null, placeholder: this.type === 'text' ||
84
+ this.type === 'tel' ||
85
+ this.type === 'email' ||
86
+ this.type === 'url' ||
87
+ this.type === 'password' ||
88
+ this.type === 'search'
89
+ ? this.placeholder
90
+ : null, readonly: this.type === 'text' ||
91
+ this.type === 'search' ||
92
+ this.type === 'url' ||
93
+ this.type === 'tel' ||
94
+ this.type === 'email' ||
95
+ this.type === 'password' ||
96
+ this.type === 'date' ||
97
+ this.type === 'month' ||
98
+ this.type === 'week' ||
99
+ this.type === 'time' ||
100
+ this.type === 'datetime-local' ||
101
+ this.type === 'number'
102
+ ? this.readonly
103
+ : null, required: this.type === 'text' ||
104
+ this.type === 'search' ||
105
+ this.type === 'url' ||
106
+ this.type === 'tel' ||
107
+ this.type === 'email' ||
108
+ this.type === 'password' ||
109
+ this.type === 'date' ||
110
+ this.type === 'month' ||
111
+ this.type === 'week' ||
112
+ this.type === 'time' ||
113
+ this.type === 'datetime-local' ||
114
+ this.type === 'number' ||
115
+ this.type === 'checkbox' ||
116
+ this.type === 'radio' ||
117
+ this.type === 'file'
118
+ ? this.required
119
+ : null, step: this.type === 'date' ||
120
+ this.type === 'month' ||
121
+ this.type === 'week' ||
122
+ this.type === 'time' ||
123
+ this.type === 'datetime-local' ||
124
+ this.type === 'number' ||
125
+ this.type === 'range'
126
+ ? this.step
127
+ : null, type: this.type, value: this.value, onBlur: this.handleBlur.bind(this), onFocus: this.handleFocus.bind(this), onInput: this.handleChange.bind(this) }), this.iconright && (h("div", { class: "icon-right" }, h("tttx-icon", { icon: this.iconright, colour: "grey" }))), h("span", { class: ['errorBubble', this.showerrormsg && this.errormsg ? 'visible' : ''].join(' ') }, h("span", { class: "material-symbols-rounded validationicon" }, "warning"), " ", this.errormsg))));
128
+ }
129
+ };
130
+ TttxInput.style = tttxStandaloneInputCss;
131
+
132
+ export { TttxInput as tttx_standalone_input };
@@ -0,0 +1,56 @@
1
+ import { r as registerInstance, c as createEvent, h, H as Host } from './index-232e347b.js';
2
+
3
+ const tttxTableCss = "// SPACING $spacing-unit: 4px; // REGULAR $horizontal-spacing: $spacing-unit * 4; $vertical-spacing: $spacing-unit * 2; $base-padding: $vertical-spacing $horizontal-spacing; $base-height: $spacing-unit * 9; $component-spacing: $spacing-unit * 4; // SMALL $horizontal-spacing-sm: $spacing-unit * 2; $vertical-spacing-sm: $spacing-unit * 1; $base-padding-sm: $vertical-spacing-sm $horizontal-spacing-sm; $base-height-sm: $spacing-unit * 7; // COLOURS $grey-0: #212121; $grey-1: #363636; $grey-2: #4c4c4c; $grey-3: #636363; $grey-4: #757575; $grey-5: #9e9e9e; $grey-6: #aeaeae; $grey-7: #c8c8c8; $grey-8: #e3e3e3; $grey-9: #f0f0f0; $white: white; $black: $grey-0; $transparent: transparent; $blue-0: #00187c; $blue-1: #032e8c; $blue-2: #0849a3; $blue-3: #0951a8; $blue-4: #1169ba; $blue-5: #1479c6; $blue-6: #5194d2; $blue-7: #7aacdd; $blue-8: #b9d5ed; $blue-9: #e7f1f9; $red-0: #7c0000; $red-1: #8c0000; $red-2: #a30000; $red-3: #a80000; $red-4: #ba0000; $red-5: #dc0000; $red-6: #d25151; $red-7: #dd7a7a; $red-8: #edc1c1; $red-9: #f9e7e7; $black-1: #e6e6e6; $brand: $blue-0; $accent: $blue-5; $accent-selected: $blue-9; $error: $red-5; $severity-critical: #dc0000; $severity-warning: #f59500; $severity-success: #a2bb31; $severity-info: $accent; $ui-primary: $black; $ui-secondary: $grey-4; $ui-disabled: $grey-2; $ui-placeholder: $grey-5; $ui-background: $grey-9; $ui-sheet: $white; $ui-border: #d5d5d5; // BORDERS $ui-border-radius: 4px; $ui-border-width: 1px; // TYPOGRAPHY $font-size-default: 16px; $font-size-small: 14px; .material-symbols-rounded{font-variation-settings:'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24}.skeleton{animation:skeleton-loading 1s linear infinite alternate;border-radius:4px;width:100%}@keyframes skeleton-loading{0%{background-color:hsl(200, 20%, 80%)}100%{background-color:hsl(200, 20%, 95%)}}:host{display:block}table{box-sizing:border-box;width:100%;border-collapse:collapse;border-spacing:0;border:1px solid #ddd;border-bottom:none}thead tr{height:52px;color:#757575}tbody tr{height:48px;color:#212121}tr{font-family:'Roboto', sans-serif;font-weight:400;font-size:16px;display:flex;align-items:center;border-bottom:1px solid #ddd}.selected{background-color:#F0F0F0}.checked{background-color:#e7f1f9}td,th{min-width:300px;margin-left:16px;display:flex;align-items:left}.skeleton{height:24px;display:block}.align-right{margin-left:auto}";
4
+
5
+ const TttxTable = class {
6
+ constructor(hostRef) {
7
+ registerInstance(this, hostRef);
8
+ this.rowSelected = createEvent(this, "rowSelected", 7);
9
+ this.headerClicked = createEvent(this, "headerClicked", 7);
10
+ this.headers = [];
11
+ this.data = {};
12
+ this.loading = false;
13
+ this.selected = -1;
14
+ }
15
+ handleKeyDown(ev) {
16
+ if (ev.key === 'ArrowDown' || ev.key === 'ArrowUp') {
17
+ this.updateSelectedIndex(ev.key);
18
+ this.emitRowSelected();
19
+ }
20
+ }
21
+ updateSelectedIndex(key) {
22
+ if (this.selected === -1) {
23
+ this.selected = 0;
24
+ }
25
+ else {
26
+ const isArrowDown = key === 'ArrowDown';
27
+ const isArrowUp = key === 'ArrowUp';
28
+ if (isArrowDown && this.selected < this.data.length - 1) {
29
+ this.selected++;
30
+ }
31
+ else if (isArrowUp && this.selected > 0) {
32
+ this.selected--;
33
+ }
34
+ }
35
+ }
36
+ emitRowSelected() {
37
+ this.rowSelected.emit(this.data[this.selected]);
38
+ }
39
+ rowSelectedHandler(row) {
40
+ this.rowSelected.emit(row);
41
+ this.selected = this.data.findIndex((item) => item === row);
42
+ }
43
+ headerClickedHandler(key) {
44
+ this.headerClicked.emit(key);
45
+ }
46
+ render() {
47
+ return (h(Host, null, h("table", null, h("thead", null, h("tr", null, this.loading ?
48
+ [1, 2, 3].map(() => (h("th", null, h("div", { class: "skeleton" })))) :
49
+ this.headers && this.headers.map((header) => (h("th", { scope: "col", onClick: () => this.headerClickedHandler(header.key) }, header.label))))), h("tbody", null, this.loading ?
50
+ [1, 2, 3].map(() => (h("tr", null, h("td", null, h("div", { class: "skeleton" })), h("td", null, h("div", { class: "skeleton" })), h("td", null, h("div", { class: "skeleton" }))))) :
51
+ Object.keys(this.data).map((key, index) => (h("tr", { class: index === this.selected ? 'selected' : '', onClick: () => this.rowSelectedHandler(this.data[key]) }, this.headers.map((header) => (h("td", null, this.data[key][header.key], " ", header.actions && h("tttx-icon", { class: "align-right", icon: "more_vert" }, h("div", { slot: "popover" }, h("tttx-popover-content", { header: "The humble egg", body: "Most arthropods such as insects, vertebrates (excluding live-bearing mammals), and mollusks lay eggs, although some, such as scorpions, do not.", linkcontext: "Wikipedia_egg", linktext: "Learn more about eggs" })))))))))))));
52
+ }
53
+ };
54
+ TttxTable.style = tttxTableCss;
55
+
56
+ export { TttxTable as tttx_table };
@@ -0,0 +1,18 @@
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-232e347b.js';
2
+ export { s as setNonce } from './index-232e347b.js';
3
+
4
+ /*
5
+ Stencil Client Patch Browser v2.22.3 | MIT Licensed | https://stenciljs.com
6
+ */
7
+ const patchBrowser = () => {
8
+ const importMeta = import.meta.url;
9
+ const opts = {};
10
+ if (importMeta !== '') {
11
+ opts.resourcesUrl = new URL('.', importMeta).href;
12
+ }
13
+ return promiseResolve(opts);
14
+ };
15
+
16
+ patchBrowser().then(options => {
17
+ return bootstrapLazy([["tttx-table",[[1,"tttx-table",{"headers":[8],"data":[8],"loading":[4],"selected":[2]},[[4,"keydown","handleKeyDown"]]]]],["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",[[1,"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-loading-spinner",[[1,"tttx-loading-spinner",{"loadingMessage":[1028,"loading-message"],"size":[1025]}]]],["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"]]]]]], options);
18
+ });
@@ -0,0 +1 @@
1
+ module.exports = require('./cjs/index.cjs.js');
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ export * from './esm/index.js';
File without changes
@@ -0,0 +1 @@
1
+ import{r as i,c as t,h as o,H as n}from"./p-184c4fae.js";const e=class{constructor(o){i(this,o),this.valueChanged=t(this,"valueChanged",7),this.value=void 0,this.label=void 0,this.required=void 0}handleClick(i){const t=i.target;this.value=t.checked,this.valueChanged.emit(t.checked)}render(){return o(n,null,o("div",{class:"field spacing"},this.label&&o("label",{class:"label"},this.label,this.required?"":o("span",{class:"optional"}," (optional)")),o("input",{type:"checkbox",class:"input",onChange:i=>this.handleClick(i),checked:this.value})))}};e.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}.icon-left,.icon-right{flex-basis:24px}.icon-left span,.icon-right span{font-size:24px;line-height:24px;text-align:center;display:block;width:24px;height:24px;margin-top:4px}.icon-left span{margin-left:4px}.icon-right span{margin-right:4px}.icon-right{margin-top:5px;margin-right:4px}.icon-left{margin-top:5px;margin-left:4px}.iconleft .input{padding-left:4px}.iconright .input{padding-right:4px}.focused{border-color:#1479c6}.errormsg{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 .validationicon{width:16px;height:16px;font-size:16px;margin-right:4px;vertical-align:middle;color:#dc0000}.danger{color:#dc0000}.optional{color:#757575;font-weight:normal}label.inputBlock{display:block;position:relative;line-height:21px}label{font-weight:500;font-size:16px}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]{background:white;display:block;min-width:calc(100% - 18px);line-height:37px}input.invalid:invalid,input.standalone.invalid{border:1px solid #dc0000}input~.errorBubble{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~.errorBubble:not(.visible){visibility:hidden}input~.errorBubble span{color:#dc0000;font-size:16px;margin-right:4px;height:16px}input.invalid:invalid~.errorBubble{position:relative;font-size:14px;font-weight:normal;width:100%;font-family:"Roboto", sans-serif;color:#dc0000;visibility:visible}input:focus{border-color:#1479c6}:host{display:block}.spacing{margin-bottom:16px}';export{e as tttx_checkbox}
@@ -0,0 +1 @@
1
+ import{r as t,h as n,H as e,g as r}from"./p-184c4fae.js";var o="top",i="bottom",a="right",f="left",u="auto",c=[o,i,a,f],s="start",l="end",p="viewport",d="popper",v=c.reduce((function(t,n){return t.concat([n+"-"+s,n+"-"+l])}),[]),h=[].concat(c,[u]).reduce((function(t,n){return t.concat([n,n+"-"+s,n+"-"+l])}),[]),b=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function m(t){return t?(t.nodeName||"").toLowerCase():null}function y(t){if(null==t)return window;if("[object Window]"!==t.toString()){var n=t.ownerDocument;return n&&n.defaultView||window}return t}function w(t){return t instanceof y(t).Element||t instanceof Element}function x(t){return t instanceof y(t).HTMLElement||t instanceof HTMLElement}function g(t){return"undefined"!=typeof ShadowRoot&&(t instanceof y(t).ShadowRoot||t instanceof ShadowRoot)}function O(t){return t.split("-")[0]}var j=Math.max,k=Math.min,M=Math.round;function L(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}function A(){return!/^((?!chrome|android).)*safari/i.test(L())}function E(t,n,e){void 0===n&&(n=!1),void 0===e&&(e=!1);var r=t.getBoundingClientRect(),o=1,i=1;n&&x(t)&&(o=t.offsetWidth>0&&M(r.width)/t.offsetWidth||1,i=t.offsetHeight>0&&M(r.height)/t.offsetHeight||1);var a=(w(t)?y(t):window).visualViewport,f=!A()&&e,u=(r.left+(f&&a?a.offsetLeft:0))/o,c=(r.top+(f&&a?a.offsetTop:0))/i,s=r.width/o,l=r.height/i;return{width:s,height:l,top:c,right:u+s,bottom:c+l,left:u,x:u,y:c}}function P(t){var n=E(t),e=t.offsetWidth,r=t.offsetHeight;return Math.abs(n.width-e)<=1&&(e=n.width),Math.abs(n.height-r)<=1&&(r=n.height),{x:t.offsetLeft,y:t.offsetTop,width:e,height:r}}function R(t,n){var e=n.getRootNode&&n.getRootNode();if(t.contains(n))return!0;if(e&&g(e)){var r=n;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function q(t){return y(t).getComputedStyle(t)}function B(t){return["table","td","th"].indexOf(m(t))>=0}function S(t){return((w(t)?t.ownerDocument:t.document)||window.document).documentElement}function W(t){return"html"===m(t)?t:t.assignedSlot||t.parentNode||(g(t)?t.host:null)||S(t)}function z(t){return x(t)&&"fixed"!==q(t).position?t.offsetParent:null}function C(t){for(var n=y(t),e=z(t);e&&B(e)&&"static"===q(e).position;)e=z(e);return e&&("html"===m(e)||"body"===m(e)&&"static"===q(e).position)?n:e||function(t){var n=/firefox/i.test(L());if(/Trident/i.test(L())&&x(t)&&"fixed"===q(t).position)return null;var e=W(t);for(g(e)&&(e=e.host);x(e)&&["html","body"].indexOf(m(e))<0;){var r=q(e);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||n&&"filter"===r.willChange||n&&r.filter&&"none"!==r.filter)return e;e=e.parentNode}return null}(t)||n}function H(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function I(t,n,e){return j(t,k(n,e))}function T(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function D(t,n){return n.reduce((function(n,e){return n[e]=t,n}),{})}function F(t){return t.split("-")[1]}var $={top:"auto",right:"auto",bottom:"auto",left:"auto"};function _(t){var n,e=t.popper,r=t.popperRect,u=t.placement,c=t.variation,s=t.offsets,p=t.position,d=t.gpuAcceleration,v=t.adaptive,h=t.roundOffsets,b=t.isFixed,m=s.x,w=void 0===m?0:m,x=s.y,g=void 0===x?0:x,O="function"==typeof h?h({x:w,y:g}):{x:w,y:g};w=O.x,g=O.y;var j=s.hasOwnProperty("x"),k=s.hasOwnProperty("y"),L=f,A=o,E=window;if(v){var P=C(e),R="clientHeight",B="clientWidth";P===y(e)&&"static"!==q(P=S(e)).position&&"absolute"===p&&(R="scrollHeight",B="scrollWidth"),(u===o||(u===f||u===a)&&c===l)&&(A=i,g-=(b&&P===E&&E.visualViewport?E.visualViewport.height:P[R])-r.height,g*=d?1:-1),u!==f&&(u!==o&&u!==i||c!==l)||(L=a,w-=(b&&P===E&&E.visualViewport?E.visualViewport.width:P[B])-r.width,w*=d?1:-1)}var W,z=Object.assign({position:p},v&&$),H=!0===h?function(t,n){var e=t.y,r=n.devicePixelRatio||1;return{x:M(t.x*r)/r||0,y:M(e*r)/r||0}}({x:w,y:g},y(e)):{x:w,y:g};return w=H.x,g=H.y,Object.assign({},z,d?((W={})[A]=k?"0":"",W[L]=j?"0":"",W.transform=(E.devicePixelRatio||1)<=1?"translate("+w+"px, "+g+"px)":"translate3d("+w+"px, "+g+"px, 0)",W):((n={})[A]=k?g+"px":"",n[L]=j?w+"px":"",n.transform="",n))}var G={passive:!0},U={left:"right",right:"left",bottom:"top",top:"bottom"};function V(t){return t.replace(/left|right|bottom|top/g,(function(t){return U[t]}))}var J={start:"end",end:"start"};function K(t){return t.replace(/start|end/g,(function(t){return J[t]}))}function N(t){var n=y(t);return{scrollLeft:n.pageXOffset,scrollTop:n.pageYOffset}}function Q(t){return E(S(t)).left+N(t).scrollLeft}function X(t){var n=q(t);return/auto|scroll|overlay|hidden/.test(n.overflow+n.overflowY+n.overflowX)}function Y(t){return["html","body","#document"].indexOf(m(t))>=0?t.ownerDocument.body:x(t)&&X(t)?t:Y(W(t))}function Z(t,n){var e;void 0===n&&(n=[]);var r=Y(t),o=r===(null==(e=t.ownerDocument)?void 0:e.body),i=y(r),a=o?[i].concat(i.visualViewport||[],X(r)?r:[]):r,f=n.concat(a);return o?f:f.concat(Z(W(a)))}function tt(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function nt(t,n,e){return n===p?tt(function(t,n){var e=y(t),r=S(t),o=e.visualViewport,i=r.clientWidth,a=r.clientHeight,f=0,u=0;if(o){i=o.width,a=o.height;var c=A();(c||!c&&"fixed"===n)&&(f=o.offsetLeft,u=o.offsetTop)}return{width:i,height:a,x:f+Q(t),y:u}}(t,e)):w(n)?function(t,n){var e=E(t,!1,"fixed"===n);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}(n,e):tt(function(t){var n,e=S(t),r=N(t),o=null==(n=t.ownerDocument)?void 0:n.body,i=j(e.scrollWidth,e.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=j(e.scrollHeight,e.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),f=-r.scrollLeft+Q(t),u=-r.scrollTop;return"rtl"===q(o||e).direction&&(f+=j(e.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:f,y:u}}(S(t)))}function et(t){var n,e=t.reference,r=t.element,u=t.placement,c=u?O(u):null,p=u?F(u):null,d=e.x+e.width/2-r.width/2,v=e.y+e.height/2-r.height/2;switch(c){case o:n={x:d,y:e.y-r.height};break;case i:n={x:d,y:e.y+e.height};break;case a:n={x:e.x+e.width,y:v};break;case f:n={x:e.x-r.width,y:v};break;default:n={x:e.x,y:e.y}}var h=c?H(c):null;if(null!=h){var b="y"===h?"height":"width";switch(p){case s:n[h]=n[h]-(e[b]/2-r[b]/2);break;case l:n[h]=n[h]+(e[b]/2-r[b]/2)}}return n}function rt(t,n){void 0===n&&(n={});var e=n.placement,r=void 0===e?t.placement:e,f=n.strategy,u=void 0===f?t.strategy:f,s=n.boundary,l=void 0===s?"clippingParents":s,v=n.rootBoundary,h=void 0===v?p:v,b=n.elementContext,y=void 0===b?d:b,g=n.altBoundary,O=void 0!==g&&g,M=n.padding,L=void 0===M?0:M,A=T("number"!=typeof L?L:D(L,c)),P=t.rects.popper,B=t.elements[O?y===d?"reference":d:y],z=function(t,n,e,r){var o="clippingParents"===n?function(t){var n=Z(W(t)),e=["absolute","fixed"].indexOf(q(t).position)>=0&&x(t)?C(t):t;return w(e)?n.filter((function(t){return w(t)&&R(t,e)&&"body"!==m(t)})):[]}(t):[].concat(n),i=[].concat(o,[e]),a=i.reduce((function(n,e){var o=nt(t,e,r);return n.top=j(o.top,n.top),n.right=k(o.right,n.right),n.bottom=k(o.bottom,n.bottom),n.left=j(o.left,n.left),n}),nt(t,i[0],r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}(w(B)?B:B.contextElement||S(t.elements.popper),l,h,u),H=E(t.elements.reference),I=et({reference:H,element:P,strategy:"absolute",placement:r}),F=tt(Object.assign({},P,I)),$=y===d?F:H,_={top:z.top-$.top+A.top,bottom:$.bottom-z.bottom+A.bottom,left:z.left-$.left+A.left,right:$.right-z.right+A.right},G=t.modifiersData.offset;if(y===d&&G){var U=G[r];Object.keys(_).forEach((function(t){var n=[a,i].indexOf(t)>=0?1:-1,e=[o,i].indexOf(t)>=0?"y":"x";_[t]+=U[e]*n}))}return _}function ot(t,n){void 0===n&&(n={});var e=n.boundary,r=n.rootBoundary,o=n.padding,i=n.flipVariations,a=n.allowedAutoPlacements,f=void 0===a?h:a,u=F(n.placement),s=u?i?v:v.filter((function(t){return F(t)===u})):c,l=s.filter((function(t){return f.indexOf(t)>=0}));0===l.length&&(l=s);var p=l.reduce((function(n,i){return n[i]=rt(t,{placement:i,boundary:e,rootBoundary:r,padding:o})[O(i)],n}),{});return Object.keys(p).sort((function(t,n){return p[t]-p[n]}))}const it={name:"flip",enabled:!0,phase:"main",fn:function(t){var n=t.state,e=t.options,r=t.name;if(!n.modifiersData[r]._skip){for(var c=e.mainAxis,l=void 0===c||c,p=e.altAxis,d=void 0===p||p,v=e.fallbackPlacements,h=e.padding,b=e.boundary,m=e.rootBoundary,y=e.altBoundary,w=e.flipVariations,x=void 0===w||w,g=e.allowedAutoPlacements,j=n.options.placement,k=O(j),M=v||(k!==j&&x?function(t){if(O(t)===u)return[];var n=V(t);return[K(t),n,K(n)]}(j):[V(j)]),L=[j].concat(M).reduce((function(t,e){return t.concat(O(e)===u?ot(n,{placement:e,boundary:b,rootBoundary:m,padding:h,flipVariations:x,allowedAutoPlacements:g}):e)}),[]),A=n.rects.reference,E=n.rects.popper,P=new Map,R=!0,q=L[0],B=0;B<L.length;B++){var S=L[B],W=O(S),z=F(S)===s,C=[o,i].indexOf(W)>=0,H=C?"width":"height",I=rt(n,{placement:S,boundary:b,rootBoundary:m,altBoundary:y,padding:h}),T=C?z?a:f:z?i:o;A[H]>E[H]&&(T=V(T));var D=V(T),$=[];if(l&&$.push(I[W]<=0),d&&$.push(I[T]<=0,I[D]<=0),$.every((function(t){return t}))){q=S,R=!1;break}P.set(S,$)}if(R)for(var _=function(t){var n=L.find((function(n){var e=P.get(n);if(e)return e.slice(0,t).every((function(t){return t}))}));if(n)return q=n,"break"},G=x?3:1;G>0&&"break"!==_(G);G--);n.placement!==q&&(n.modifiersData[r]._skip=!0,n.placement=q,n.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function at(t,n,e){return void 0===e&&(e={x:0,y:0}),{top:t.top-n.height-e.y,right:t.right-n.width+e.x,bottom:t.bottom-n.height+e.y,left:t.left-n.width-e.x}}function ft(t){return[o,a,i,f].some((function(n){return t[n]>=0}))}function ut(t,n,e){void 0===e&&(e=!1);var r,o,i=x(n),a=x(n)&&function(t){var n=t.getBoundingClientRect(),e=M(n.width)/t.offsetWidth||1,r=M(n.height)/t.offsetHeight||1;return 1!==e||1!==r}(n),f=S(n),u=E(t,a,e),c={scrollLeft:0,scrollTop:0},s={x:0,y:0};return(i||!i&&!e)&&(("body"!==m(n)||X(f))&&(c=(r=n)!==y(r)&&x(r)?{scrollLeft:(o=r).scrollLeft,scrollTop:o.scrollTop}:N(r)),x(n)?((s=E(n,!0)).x+=n.clientLeft,s.y+=n.clientTop):f&&(s.x=Q(f))),{x:u.left+c.scrollLeft-s.x,y:u.top+c.scrollTop-s.y,width:u.width,height:u.height}}function ct(t){var n=new Map,e=new Set,r=[];function o(t){e.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!e.has(t)){var r=n.get(t);r&&o(r)}})),r.push(t)}return t.forEach((function(t){n.set(t.name,t)})),t.forEach((function(t){e.has(t.name)||o(t)})),r}var st={placement:"bottom",modifiers:[],strategy:"absolute"};function lt(){for(var t=arguments.length,n=new Array(t),e=0;e<t;e++)n[e]=arguments[e];return!n.some((function(t){return!(t&&"function"==typeof t.getBoundingClientRect)}))}function pt(t){void 0===t&&(t={});var n=t.defaultModifiers,e=void 0===n?[]:n,r=t.defaultOptions,o=void 0===r?st:r;return function(t,n,r){void 0===r&&(r=o);var i,a,f={placement:"bottom",orderedModifiers:[],options:Object.assign({},st,o),modifiersData:{},elements:{reference:t,popper:n},attributes:{},styles:{}},u=[],c=!1,s={state:f,setOptions:function(r){var i="function"==typeof r?r(f.options):r;l(),f.options=Object.assign({},o,f.options,i),f.scrollParents={reference:w(t)?Z(t):t.contextElement?Z(t.contextElement):[],popper:Z(n)};var a,c,p=function(t){var n=ct(t);return b.reduce((function(t,e){return t.concat(n.filter((function(t){return t.phase===e})))}),[])}((a=[].concat(e,f.options.modifiers),c=a.reduce((function(t,n){var e=t[n.name];return t[n.name]=e?Object.assign({},e,n,{options:Object.assign({},e.options,n.options),data:Object.assign({},e.data,n.data)}):n,t}),{}),Object.keys(c).map((function(t){return c[t]}))));return f.orderedModifiers=p.filter((function(t){return t.enabled})),f.orderedModifiers.forEach((function(t){var n=t.options,e=t.effect;if("function"==typeof e){var r=e({state:f,name:t.name,instance:s,options:void 0===n?{}:n});u.push(r||function(){})}})),s.update()},forceUpdate:function(){if(!c){var t=f.elements,n=t.reference,e=t.popper;if(lt(n,e)){f.rects={reference:ut(n,C(e),"fixed"===f.options.strategy),popper:P(e)},f.reset=!1,f.placement=f.options.placement,f.orderedModifiers.forEach((function(t){return f.modifiersData[t.name]=Object.assign({},t.data)}));for(var r=0;r<f.orderedModifiers.length;r++)if(!0!==f.reset){var o=f.orderedModifiers[r],i=o.fn,a=o.options;"function"==typeof i&&(f=i({state:f,options:void 0===a?{}:a,name:o.name,instance:s})||f)}else f.reset=!1,r=-1}}},update:(i=function(){return new Promise((function(t){s.forceUpdate(),t(f)}))},function(){return a||(a=new Promise((function(t){Promise.resolve().then((function(){a=void 0,t(i())}))}))),a}),destroy:function(){l(),c=!0}};if(!lt(t,n))return s;function l(){u.forEach((function(t){return t()})),u=[]}return s.setOptions(r).then((function(t){!c&&r.onFirstUpdate&&r.onFirstUpdate(t)})),s}}var dt=pt({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var n=t.state,e=t.instance,r=t.options,o=r.scroll,i=void 0===o||o,a=r.resize,f=void 0===a||a,u=y(n.elements.popper),c=[].concat(n.scrollParents.reference,n.scrollParents.popper);return i&&c.forEach((function(t){t.addEventListener("scroll",e.update,G)})),f&&u.addEventListener("resize",e.update,G),function(){i&&c.forEach((function(t){t.removeEventListener("scroll",e.update,G)})),f&&u.removeEventListener("resize",e.update,G)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var n=t.state;n.modifiersData[t.name]=et({reference:n.rects.reference,element:n.rects.popper,strategy:"absolute",placement:n.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var n=t.state,e=t.options,r=e.gpuAcceleration,o=void 0===r||r,i=e.adaptive,a=void 0===i||i,f=e.roundOffsets,u=void 0===f||f,c={placement:O(n.placement),variation:F(n.placement),popper:n.elements.popper,popperRect:n.rects.popper,gpuAcceleration:o,isFixed:"fixed"===n.options.strategy};null!=n.modifiersData.popperOffsets&&(n.styles.popper=Object.assign({},n.styles.popper,_(Object.assign({},c,{offsets:n.modifiersData.popperOffsets,position:n.options.strategy,adaptive:a,roundOffsets:u})))),null!=n.modifiersData.arrow&&(n.styles.arrow=Object.assign({},n.styles.arrow,_(Object.assign({},c,{offsets:n.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-placement":n.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var n=t.state;Object.keys(n.elements).forEach((function(t){var e=n.styles[t]||{},r=n.attributes[t]||{},o=n.elements[t];x(o)&&m(o)&&(Object.assign(o.style,e),Object.keys(r).forEach((function(t){var n=r[t];!1===n?o.removeAttribute(t):o.setAttribute(t,!0===n?"":n)})))}))},effect:function(t){var n=t.state,e={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(n.elements.popper.style,e.popper),n.styles=e,n.elements.arrow&&Object.assign(n.elements.arrow.style,e.arrow),function(){Object.keys(n.elements).forEach((function(t){var r=n.elements[t],o=n.attributes[t]||{},i=Object.keys(n.styles.hasOwnProperty(t)?n.styles[t]:e[t]).reduce((function(t,n){return t[n]="",t}),{});x(r)&&m(r)&&(Object.assign(r.style,i),Object.keys(o).forEach((function(t){r.removeAttribute(t)})))}))}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var n=t.state,e=t.name,r=t.options.offset,i=void 0===r?[0,0]:r,u=h.reduce((function(t,e){return t[e]=function(t,n,e){var r=O(t),i=[f,o].indexOf(r)>=0?-1:1,u="function"==typeof e?e(Object.assign({},n,{placement:t})):e,c=u[0],s=u[1];return c=c||0,s=(s||0)*i,[f,a].indexOf(r)>=0?{x:s,y:c}:{x:c,y:s}}(e,n.rects,i),t}),{}),c=u[n.placement],s=c.y;null!=n.modifiersData.popperOffsets&&(n.modifiersData.popperOffsets.x+=c.x,n.modifiersData.popperOffsets.y+=s),n.modifiersData[e]=u}},it,{name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var n=t.state,e=t.options,r=t.name,u=e.mainAxis,c=void 0===u||u,l=e.altAxis,p=void 0!==l&&l,d=e.tether,v=void 0===d||d,h=e.tetherOffset,b=void 0===h?0:h,m=rt(n,{boundary:e.boundary,rootBoundary:e.rootBoundary,padding:e.padding,altBoundary:e.altBoundary}),y=O(n.placement),w=F(n.placement),x=!w,g=H(y),M="x"===g?"y":"x",L=n.modifiersData.popperOffsets,A=n.rects.reference,E=n.rects.popper,R="function"==typeof b?b(Object.assign({},n.rects,{placement:n.placement})):b,q="number"==typeof R?{mainAxis:R,altAxis:R}:Object.assign({mainAxis:0,altAxis:0},R),B=n.modifiersData.offset?n.modifiersData.offset[n.placement]:null,S={x:0,y:0};if(L){if(c){var W,z="y"===g?o:f,T="y"===g?i:a,D="y"===g?"height":"width",$=L[g],_=$+m[z],G=$-m[T],U=v?-E[D]/2:0,V=w===s?A[D]:E[D],J=w===s?-E[D]:-A[D],K=n.elements.arrow,N=v&&K?P(K):{width:0,height:0},Q=n.modifiersData["arrow#persistent"]?n.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},X=Q[z],Y=Q[T],Z=I(0,A[D],N[D]),tt=x?A[D]/2-U-Z-X-q.mainAxis:V-Z-X-q.mainAxis,nt=x?-A[D]/2+U+Z+Y+q.mainAxis:J+Z+Y+q.mainAxis,et=n.elements.arrow&&C(n.elements.arrow),ot=null!=(W=null==B?void 0:B[g])?W:0,it=$+nt-ot,at=I(v?k(_,$+tt-ot-(et?"y"===g?et.clientTop||0:et.clientLeft||0:0)):_,$,v?j(G,it):G);L[g]=at,S[g]=at-$}if(p){var ft,ut=L[M],ct="y"===M?"height":"width",st=ut+m["x"===g?o:f],lt=ut-m["x"===g?i:a],pt=-1!==[o,f].indexOf(y),dt=null!=(ft=null==B?void 0:B[M])?ft:0,vt=pt?st:ut-A[ct]-E[ct]-dt+q.altAxis,ht=pt?ut+A[ct]+E[ct]-dt-q.altAxis:lt,bt=v&&pt?function(t,n,e){var r=I(t,n,e);return r>e?e:r}(vt,ut,ht):I(v?vt:st,ut,v?ht:lt);L[M]=bt,S[M]=bt-ut}n.modifiersData[r]=S}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(t){var n,e=t.state,r=t.name,u=t.options,s=e.elements.arrow,l=e.modifiersData.popperOffsets,p=O(e.placement),d=H(p),v=[f,a].indexOf(p)>=0?"height":"width";if(s&&l){var h=function(t,n){return T("number"!=typeof(t="function"==typeof t?t(Object.assign({},n.rects,{placement:n.placement})):t)?t:D(t,c))}(u.padding,e),b=P(s),m="y"===d?o:f,y="y"===d?i:a,w=e.rects.reference[v]+e.rects.reference[d]-l[d]-e.rects.popper[v],x=l[d]-e.rects.reference[d],g=C(s),j=g?"y"===d?g.clientHeight||0:g.clientWidth||0:0,k=j/2-b[v]/2+(w/2-x/2),M=I(h[m],k,j-b[v]-h[y]);e.modifiersData[r]=((n={})[d]=M,n.centerOffset=M-k,n)}},effect:function(t){var n=t.state,e=t.options.element,r=void 0===e?"[data-popper-arrow]":e;null!=r&&("string"!=typeof r||(r=n.elements.popper.querySelector(r)))&&R(n.elements.popper,r)&&(n.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var n=t.state,e=t.name,r=n.rects.reference,o=n.rects.popper,i=n.modifiersData.preventOverflow,a=rt(n,{elementContext:"reference"}),f=rt(n,{altBoundary:!0}),u=at(a,r),c=at(f,o,i),s=ft(u),l=ft(c);n.modifiersData[e]={referenceClippingOffsets:u,popperEscapeOffsets:c,isReferenceHidden:s,hasPopperEscaped:l},n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-reference-hidden":s,"data-popper-escaped":l})}}]});const vt=class{constructor(n){t(this,n),this.icon=void 0,this.colour="grey"}handleDocumentClick(t){t.composedPath().includes(this.referenceElement)||(this.popperElement&&this.popperElement.removeAttribute("data-show"),this.popperInstance&&this.popperInstance.update())}componentWillLoad(){this.hasPopoverSlot=!!this.el.querySelector('[slot="popover"]')}componentDidLoad(){this.popperElement&&(this.popperInstance=dt(this.referenceElement,this.popperElement,{placement:"top",modifiers:[{name:"flip",options:{fallbackPlacements:["bottom"]}},{name:"offset",options:{offset:[0,12]}}]}))}disconnectedCallback(){this.popperInstance.destroy()}render(){return n(e,null,n("span",{onClick:()=>{this.popperElement&&this.popperElement.setAttribute("data-show",""),this.popperInstance&&this.popperInstance.update()},ref:t=>this.referenceElement=t,class:`material-symbols-rounded ${this.colour?this.colour:""} ${this.hasPopoverSlot?"clickable":""}`},this.icon),this.hasPopoverSlot&&n("div",{ref:t=>this.popperElement=t,class:"tooltip"},n("slot",{name:"popover"}),n("div",{class:"arrow","data-popper-arrow":!0})))}get el(){return r(this)}};vt.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:block}.tooltip{background:#ffffff;color:#343434;font-weight:bold;padding:8px 16px;font-size:13px;border-radius:4px;box-shadow:0 0 5px 1px rgba(0, 0, 0, 0.3);display:none}.tooltip[data-show]{display:block}.arrow,.arrow::before{position:absolute;width:8px;height:8px;background:inherit}.arrow{visibility:hidden}.arrow::before{visibility:visible;content:"";transform:rotate(45deg)}.tooltip[data-popper-placement^=top]>.arrow{bottom:-4px}.tooltip[data-popper-placement^=bottom]>.arrow{top:-4px}.tooltip[data-popper-placement^=left]>.arrow{right:-4px}.tooltip[data-popper-placement^=right]>.arrow{left:-4px}.red{color:#dc0000}.orange{color:#f59500}.blue{color:#1479c6}.green{color:#a2bb31}.gray{color:#757575}.black{color:#212121}.white{color:white}.clickable{cursor:pointer}';export{vt as tttx_icon}
@@ -0,0 +1 @@
1
+ import{r as t,c as i,h as e,H as n}from"./p-184c4fae.js";const o=class{constructor(e){t(this,e),this.dataSubmitted=i(this,"dataSubmitted",7),this.dataChanged=i(this,"dataChanged",7),this.template=document.createElement("template"),this.formschema=void 0,this.submitValue=void 0}onFormSchemaChange(t){this._formSchema="string"==typeof t?JSON.parse(t):t}fieldChanged(t){this.dataChanged.emit({name:t.target.name,value:t.target.value})}validityCheck(t){var i,e,n,o;t.preventDefault();const r=t.target;let a=!0,s="";switch(!0){case r.validity.valueMissing:s=null!==(i=r.dataset.required)&&void 0!==i?i:"This field is required";break;case r.validity.patternMismatch:s=null!==(e=r.dataset.pattern)&&void 0!==e?e:"Incorrect format";break;case r.validity.badInput:s=null!==(n=r.dataset.badinput)&&void 0!==n?n:"Wrong input type";break;case r.validity.rangeOverflow||r.validity.rangeUnderflow:s=null!==(o=r.dataset.range)&&void 0!==o?o:"Invalid value";break;default:a=!1}this.setErrorState(r,a,s)}setErrorState(t,i,e){const n=t.parentElement.querySelector(".errorBubble");if(i){t.className="invalid";const i=this.createErrorIcon();n.replaceChildren(i,e)}else t.className="",n.replaceChildren()}createErrorIcon(){const t=document.createElement("span");return t.className="material-symbols-rounded",t.textContent="warning",t}doSubmit(t){t.preventDefault();const i=new FormData(t.target);this.dataSubmitted.emit(i)}componentWillLoad(){this.onFormSchemaChange(this.formschema)}componentWillRender(){this.template=document.createElement("template"),this.populateFormFromSchema()}createInput(t,i){var e;const n=document.createElement("input");return n.name=t,n.type=i.type,n.placeholder=null!==(e=i.placeholder)&&void 0!==e?e:"",n.autocomplete="off",n.autocapitalize="off",n}applyValidation(t,i){var e,n;i.required&&(t.setAttribute("required",""),t.setAttribute("data-required",null!==(e=i.required.message)&&void 0!==e?e:"")),i.pattern&&(t.setAttribute("pattern",i.pattern.pattern),t.setAttribute("data-pattern",null!==(n=i.pattern.message)&&void 0!==n?n:"")),i.badInput&&t.setAttribute("data-badinput",i.badInput.message),i.minmax&&(t.setAttribute("min",i.minmax.min),t.setAttribute("max",i.minmax.max),t.setAttribute("data-range",i.minmax.message)),i.maxlength&&t.setAttribute("maxlength",i.maxlength)}createErrorBubble(){const t=document.createElement("div");return t.className="errorBubble",t}createLabel(t,i,e){const n=document.createElement("label");if(n.className="inputBlock",n.innerText=t.label,!t.validation){const t=document.createElement("span");t.className="optional",t.innerHTML="&nbsp;(optional)",n.appendChild(t)}return n.appendChild(i),n.appendChild(e),n}createSubmitButton(){const t=document.createElement("input");return t.type="submit",t.className="button primary-blue",t.value="Save",t}populateFormFromSchema(){if(!this._formSchema)return;const t=this._formSchema.properties;Object.keys(t).forEach((i=>{const e=t[i].form,n=this.createInput(i,e);e.validation&&this.applyValidation(n,e.validation);const o=this.createErrorBubble(),r=this.createLabel(e,n,o);this.template.content.append(r)}));const i=this.createSubmitButton();this.template.content.append(i)}componentDidRender(){if(!this._formSchema)return;const t=this.template.content.cloneNode(!0);Object.keys(this._formSchema.properties).forEach((i=>{const e=t.querySelector(`[name=${i}]`);e.oninvalid=this.validityCheck.bind(this),e.onblur=this.validityCheck.bind(this),e.onkeyup=this.fieldChanged.bind(this),e.onchange=this.fieldChanged.bind(this)})),this.fieldset.appendChild(t)}render(){return e(n,null,e("form",{onSubmit:this.doSubmit.bind(this)},e("fieldset",{ref:t=>this.fieldset=t})))}static get watchers(){return{formschema:["onFormSchemaChange"]}}};o.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}.icon-left,.icon-right{flex-basis:24px}.icon-left span,.icon-right span{font-size:24px;line-height:24px;text-align:center;display:block;width:24px;height:24px;margin-top:4px}.icon-left span{margin-left:4px}.icon-right span{margin-right:4px}.icon-right{margin-top:5px;margin-right:4px}.icon-left{margin-top:5px;margin-left:4px}.iconleft .input{padding-left:4px}.iconright .input{padding-right:4px}.focused{border-color:#1479c6}.errormsg{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 .validationicon{width:16px;height:16px;font-size:16px;margin-right:4px;vertical-align:middle;color:#dc0000}.danger{color:#dc0000}.optional{color:#757575;font-weight:normal}label.inputBlock{display:block;position:relative;line-height:21px}label{font-weight:500;font-size:16px}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]{background:white;display:block;min-width:calc(100% - 18px);line-height:37px}input.invalid:invalid,input.standalone.invalid{border:1px solid #dc0000}input~.errorBubble{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~.errorBubble:not(.visible){visibility:hidden}input~.errorBubble span{color:#dc0000;font-size:16px;margin-right:4px;height:16px}input.invalid:invalid~.errorBubble{position:relative;font-size:14px;font-weight:normal;width:100%;font-family:"Roboto", sans-serif;color:#dc0000;visibility:visible}input:focus{border-color:#1479c6}.button{height:36px;padding:8px 16px;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:400}.button:hover{background:#f0f0f0}.button:active{background:#e3e3e3}.primary-blue{background:#1479c6;border:1px solid #1479c6;color:white}.primary-blue:hover{background:#1169ba}.primary-blue:active{background:#0951a8}.secondary-white{background:white;border:1px solid #212121}:host{display:block}fieldset{margin:0;padding:0;border:none}input[type=submit]{margin-left:auto}';export{o as tttx_form}
@@ -0,0 +1,2 @@
1
+ let e,n,t=!1;const l={},o=e=>"object"==(e=typeof e)||"function"===e;function s(e){var n,t,l;return null!==(l=null===(t=null===(n=e.head)||void 0===n?void 0:n.querySelector('meta[name="csp-nonce"]'))||void 0===t?void 0:t.getAttribute("content"))&&void 0!==l?l:void 0}const c=(e,n,...t)=>{let l=null,s=!1,c=!1;const r=[],u=n=>{for(let t=0;t<n.length;t++)l=n[t],Array.isArray(l)?u(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof e&&!o(l))&&(l+=""),s&&c?r[r.length-1].t+=l:r.push(s?i(null,l):l),c=s)};if(u(t),n){const e=n.className||n.class;e&&(n.class="object"!=typeof e?e:Object.keys(e).filter((n=>e[n])).join(" "))}const a=i(e,null);return a.l=n,r.length>0&&(a.o=r),a},i=(e,n)=>({i:0,u:e,t:n,m:null,o:null,l:null}),r={},u=e=>V(e).p,a=(e,n,t)=>{const l=u(e);return{emit:e=>f(l,n,{bubbles:!!(4&t),composed:!!(2&t),cancelable:!!(1&t),detail:e})}},f=(e,n,t)=>{const l=Y.ce(n,t);return e.dispatchEvent(l),l},d=new WeakMap,m=e=>"sc-"+e.h,p=(e,n,t,l,s,c)=>{if(t!==l){let i=B(e,n),r=n.toLowerCase();if("class"===n){const n=e.classList,o=y(t),s=y(l);n.remove(...o.filter((e=>e&&!s.includes(e)))),n.add(...s.filter((e=>e&&!o.includes(e))))}else if("ref"===n)l&&l(e);else if(i||"o"!==n[0]||"n"!==n[1]){const r=o(l);if((i||r&&null!==l)&&!s)try{if(e.tagName.includes("-"))e[n]=l;else{const o=null==l?"":l;"list"===n?i=!1:null!=t&&e[n]==o||(e[n]=o)}}catch(e){}null==l||!1===l?!1===l&&""!==e.getAttribute(n)||e.removeAttribute(n):(!i||4&c||s)&&!r&&e.setAttribute(n,l=!0===l?"":l)}else n="-"===n[2]?n.slice(3):B(Q,r)?r.slice(2):r[2]+n.slice(3),t&&Y.rel(e,n,t,!1),l&&Y.ael(e,n,l,!1)}},h=/\s/,y=e=>e?e.split(h):[],$=(e,n,t,o)=>{const s=11===n.m.nodeType&&n.m.host?n.m.host:n.m,c=e&&e.l||l,i=n.l||l;for(o in c)o in i||p(s,o,c[o],void 0,t,n.i);for(o in i)p(s,o,c[o],i[o],t,n.i)},b=(n,t,l)=>{const o=t.o[l];let s,c,i=0;if(null!==o.t)s=o.m=X.createTextNode(o.t);else if(s=o.m=X.createElement(o.u),$(null,o,!1),null!=e&&s["s-si"]!==e&&s.classList.add(s["s-si"]=e),o.o)for(i=0;i<o.o.length;++i)c=b(n,o,i),c&&s.appendChild(c);return s},w=(e,t,l,o,s,c)=>{let i,r=e;for(r.shadowRoot&&r.tagName===n&&(r=r.shadowRoot);s<=c;++s)o[s]&&(i=b(null,l,s),i&&(o[s].m=i,r.insertBefore(i,t)))},v=(e,n,t,l,o)=>{for(;n<=t;++n)(l=e[n])&&(o=l.m,j(l),o.remove())},S=(e,n)=>e.u===n.u,g=(e,n)=>{const t=n.m=e.m,l=e.o,o=n.o,s=n.t;null===s?("slot"===n.u||$(e,n,!1),null!==l&&null!==o?((e,n,t,l)=>{let o,s=0,c=0,i=n.length-1,r=n[0],u=n[i],a=l.length-1,f=l[0],d=l[a];for(;s<=i&&c<=a;)null==r?r=n[++s]:null==u?u=n[--i]:null==f?f=l[++c]:null==d?d=l[--a]:S(r,f)?(g(r,f),r=n[++s],f=l[++c]):S(u,d)?(g(u,d),u=n[--i],d=l[--a]):S(r,d)?(g(r,d),e.insertBefore(r.m,u.m.nextSibling),r=n[++s],d=l[--a]):S(u,f)?(g(u,f),e.insertBefore(u.m,r.m),u=n[--i],f=l[++c]):(o=b(n&&n[c],t,c),f=l[++c],o&&r.m.parentNode.insertBefore(o,r.m));s>i?w(e,null==l[a+1]?null:l[a+1].m,t,l,c,a):c>a&&v(n,s,i)})(t,l,n,o):null!==o?(null!==e.t&&(t.textContent=""),w(t,null,n,o,0,o.length-1)):null!==l&&v(l,0,l.length-1)):e.t!==s&&(t.data=s)},j=e=>{e.l&&e.l.ref&&e.l.ref(null),e.o&&e.o.map(j)},M=(e,n)=>{n&&!e.$&&n["s-p"]&&n["s-p"].push(new Promise((n=>e.$=n)))},k=(e,n)=>{if(e.i|=16,!(4&e.i))return M(e,e.v),ie((()=>C(e,n)));e.i|=512},C=(e,n)=>{const t=e.S;let l;return n&&(e.i|=256,e.g&&(e.g.map((([e,n])=>R(t,e,n))),e.g=null),l=R(t,"componentWillLoad")),l=W(l,(()=>R(t,"componentWillRender"))),W(l,(()=>O(e,t,n)))},O=async(e,n,t)=>{const l=e.p,o=l["s-rc"];t&&(e=>{const n=e.j,t=e.p,l=n.i,o=((e,n)=>{var t;let l=m(n);const o=K.get(l);if(e=11===e.nodeType?e:X,o)if("string"==typeof o){let n,c=d.get(e=e.head||e);if(c||d.set(e,c=new Set),!c.has(l)){{n=X.createElement("style"),n.innerHTML=o;const l=null!==(t=Y.M)&&void 0!==t?t:s(X);null!=l&&n.setAttribute("nonce",l),e.insertBefore(n,e.querySelector("link"))}c&&c.add(l)}}else e.adoptedStyleSheets.includes(o)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,o]);return l})(t.shadowRoot?t.shadowRoot:t.getRootNode(),n);10&l&&(t["s-sc"]=o,t.classList.add(o+"-h"))})(e);x(e,n),o&&(o.map((e=>e())),l["s-rc"]=void 0);{const n=l["s-p"],t=()=>L(e);0===n.length?t():(Promise.all(n).then(t),e.i|=4,n.length=0)}},x=(t,l)=>{try{l=l.render(),t.i&=-17,t.i|=2,((t,l)=>{const o=t.p,s=t.k||i(null,null),u=(e=>e&&e.u===r)(l)?l:c(null,null,l);n=o.tagName,u.u=null,u.i|=4,t.k=u,u.m=s.m=o.shadowRoot||o,e=o["s-sc"],g(s,u)})(t,l)}catch(e){G(e,t.p)}return null},L=e=>{const n=e.p,t=e.S,l=e.v;R(t,"componentDidRender"),64&e.i||(e.i|=64,E(n),R(t,"componentDidLoad"),e.C(n),l||P()),e.$&&(e.$(),e.$=void 0),512&e.i&&ce((()=>k(e,!1))),e.i&=-517},P=()=>{E(X.documentElement),ce((()=>f(Q,"appload",{detail:{namespace:"tttx"}})))},R=(e,n,t)=>{if(e&&e[n])try{return e[n](t)}catch(e){G(e)}},W=(e,n)=>e&&e.then?e.then(n):n(),E=e=>e.classList.add("hydrated"),N=(e,n,t)=>{if(n.O){e.watchers&&(n.L=e.watchers);const l=Object.entries(n.O),s=e.prototype;if(l.map((([e,[l]])=>{(31&l||2&t&&32&l)&&Object.defineProperty(s,e,{get(){return((e,n)=>V(this).P.get(n))(0,e)},set(t){((e,n,t,l)=>{const s=V(e),c=s.p,i=s.P.get(n),r=s.i,u=s.S;if(t=((e,n)=>null==e||o(e)?e:4&n?"false"!==e&&(""===e||!!e):2&n?parseFloat(e):1&n?e+"":e)(t,l.O[n][0]),(!(8&r)||void 0===i)&&t!==i&&(!Number.isNaN(i)||!Number.isNaN(t))&&(s.P.set(n,t),u)){if(l.L&&128&r){const e=l.L[n];e&&e.map((e=>{try{u[e](t,i,n)}catch(e){G(e,c)}}))}2==(18&r)&&k(s,!1)}})(this,e,t,n)},configurable:!0,enumerable:!0})})),1&t){const n=new Map;s.attributeChangedCallback=function(e,t,l){Y.jmp((()=>{const t=n.get(e);if(this.hasOwnProperty(t))l=this[t],delete this[t];else if(s.hasOwnProperty(t)&&"number"==typeof this[t]&&this[t]==l)return;this[t]=(null!==l||"boolean"!=typeof this[t])&&l}))},e.observedAttributes=l.filter((([e,n])=>15&n[0])).map((([e,t])=>{const l=t[1]||e;return n.set(l,e),l}))}}return e},T=(e,n={})=>{var t;const l=[],o=n.exclude||[],c=Q.customElements,i=X.head,r=i.querySelector("meta[charset]"),u=X.createElement("style"),a=[];let f,d=!0;Object.assign(Y,n),Y.R=new URL(n.resourcesUrl||"./",X.baseURI).href,e.map((e=>{e[1].map((n=>{const t={i:n[0],h:n[1],O:n[2],W:n[3]};t.O=n[2],t.W=n[3],t.L={};const s=t.h,i=class extends HTMLElement{constructor(e){super(e),z(e=this,t),1&t.i&&e.attachShadow({mode:"open"})}connectedCallback(){f&&(clearTimeout(f),f=null),d?a.push(this):Y.jmp((()=>(e=>{if(0==(1&Y.i)){const n=V(e),t=n.j,l=()=>{};if(1&n.i)A(e,n,t.W);else{n.i|=1;{let t=e;for(;t=t.parentNode||t.host;)if(t["s-p"]){M(n,n.v=t);break}}t.O&&Object.entries(t.O).map((([n,[t]])=>{if(31&t&&e.hasOwnProperty(n)){const t=e[n];delete e[n],e[n]=t}})),(async(e,n,t,l,o)=>{if(0==(32&n.i)){{if(n.i|=32,(o=J(t)).then){const e=()=>{};o=await o,e()}o.isProxied||(t.L=o.watchers,N(o,t,2),o.isProxied=!0);const e=()=>{};n.i|=8;try{new o(n)}catch(e){G(e)}n.i&=-9,n.i|=128,e()}if(o.style){let e=o.style;const n=m(t);if(!K.has(n)){const l=()=>{};((e,n,t)=>{let l=K.get(e);ee&&t?(l=l||new CSSStyleSheet,"string"==typeof l?l=n:l.replaceSync(n)):l=n,K.set(e,l)})(n,e,!!(1&t.i)),l()}}}const s=n.v,c=()=>k(n,!0);s&&s["s-rc"]?s["s-rc"].push(c):c()})(0,n,t)}l()}})(this)))}disconnectedCallback(){Y.jmp((()=>(()=>{if(0==(1&Y.i)){const e=V(this),n=e.S;e.N&&(e.N.map((e=>e())),e.N=void 0),R(n,"disconnectedCallback")}})()))}componentOnReady(){return V(this).T}};t.A=e[0],o.includes(s)||c.get(s)||(l.push(s),c.define(s,N(i,t,1)))}))}));{u.innerHTML=l+"{visibility:hidden}.hydrated{visibility:inherit}",u.setAttribute("data-styles","");const e=null!==(t=Y.M)&&void 0!==t?t:s(X);null!=e&&u.setAttribute("nonce",e),i.insertBefore(u,r?r.nextSibling:i.firstChild)}d=!1,a.length?a.map((e=>e.connectedCallback())):Y.jmp((()=>f=setTimeout(P,30)))},A=(e,n,t)=>{t&&t.map((([t,l,o])=>{const s=F(e,t),c=D(n,o),i=H(t);Y.ael(s,l,c,i),(n.N=n.N||[]).push((()=>Y.rel(s,l,c,i)))}))},D=(e,n)=>t=>{try{256&e.i?e.S[n](t):(e.g=e.g||[]).push([n,t])}catch(e){G(e)}},F=(e,n)=>4&n?X:e,H=e=>0!=(2&e),U=e=>Y.M=e,q=new WeakMap,V=e=>q.get(e),_=(e,n)=>q.set(n.S=e,n),z=(e,n)=>{const t={i:0,p:e,j:n,P:new Map};return t.T=new Promise((e=>t.C=e)),e["s-p"]=[],e["s-rc"]=[],A(e,t,n.W),q.set(e,t)},B=(e,n)=>n in e,G=(e,n)=>(0,console.error)(e,n),I=new Map,J=e=>{const n=e.h.replace(/-/g,"_"),t=e.A,l=I.get(t);return l?l[n]:import(`./${t}.entry.js`).then((e=>(I.set(t,e),e[n])),G)
2
+ /*!__STENCIL_STATIC_IMPORT_SWITCH__*/},K=new Map,Q="undefined"!=typeof window?window:{},X=Q.document||{head:{}},Y={i:0,R:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,n,t,l)=>e.addEventListener(n,t,l),rel:(e,n,t,l)=>e.removeEventListener(n,t,l),ce:(e,n)=>new CustomEvent(e,n)},Z=e=>Promise.resolve(e),ee=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),ne=[],te=[],le=(e,n)=>l=>{e.push(l),t||(t=!0,n&&4&Y.i?ce(se):Y.raf(se))},oe=e=>{for(let n=0;n<e.length;n++)try{e[n](performance.now())}catch(e){G(e)}e.length=0},se=()=>{oe(ne),oe(te),(t=ne.length>0)&&Y.raf(se)},ce=e=>Z().then(e),ie=le(te,!0);export{r as H,T as b,a as c,u as g,c as h,Z as p,_ as r,U as s}
@@ -0,0 +1 @@
1
+ import{r as o,h as t,H as i}from"./p-184c4fae.js";const s=class{constructor(t){o(this,t),this.header=void 0,this.body=void 0,this.linkcontext=void 0,this.linktext=void 0}render(){return t(i,null,this.header&&t("h4",null,this.header),this.body&&t("p",null,this.body),this.linkcontext&&t("span",{class:"linky",onClick:o=>console.log(this.linkcontext,o)},this.linktext||"More Information"))}};s.style='.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}';export{s as tttx_popover_content}
@@ -0,0 +1 @@
1
+ import{r as e,c as t,h as i,H as s}from"./p-184c4fae.js";const r=class{constructor(i){e(this,i),this.rowSelected=t(this,"rowSelected",7),this.headerClicked=t(this,"headerClicked",7),this.headers=[],this.data={},this.loading=!1,this.selected=-1}handleKeyDown(e){"ArrowDown"!==e.key&&"ArrowUp"!==e.key||(this.updateSelectedIndex(e.key),this.emitRowSelected())}updateSelectedIndex(e){if(-1===this.selected)this.selected=0;else{const t="ArrowUp"===e;"ArrowDown"===e&&this.selected<this.data.length-1?this.selected++:t&&this.selected>0&&this.selected--}}emitRowSelected(){this.rowSelected.emit(this.data[this.selected])}rowSelectedHandler(e){this.rowSelected.emit(e),this.selected=this.data.findIndex((t=>t===e))}headerClickedHandler(e){this.headerClicked.emit(e)}render(){return i(s,null,i("table",null,i("thead",null,i("tr",null,this.loading?[1,2,3].map((()=>i("th",null,i("div",{class:"skeleton"})))):this.headers&&this.headers.map((e=>i("th",{scope:"col",onClick:()=>this.headerClickedHandler(e.key)},e.label))))),i("tbody",null,this.loading?[1,2,3].map((()=>i("tr",null,i("td",null,i("div",{class:"skeleton"})),i("td",null,i("div",{class:"skeleton"})),i("td",null,i("div",{class:"skeleton"}))))):Object.keys(this.data).map(((e,t)=>i("tr",{class:t===this.selected?"selected":"",onClick:()=>this.rowSelectedHandler(this.data[e])},this.headers.map((t=>i("td",null,this.data[e][t.key]," ",t.actions&&i("tttx-icon",{class:"align-right",icon:"more_vert"},i("div",{slot:"popover"},i("tttx-popover-content",{header:"The humble egg",body:"Most arthropods such as insects, vertebrates (excluding live-bearing mammals), and mollusks lay eggs, although some, such as scorpions, do not.",linkcontext:"Wikipedia_egg",linktext:"Learn more about eggs"}))))))))))))}};r.style="// SPACING $spacing-unit: 4px; // REGULAR $horizontal-spacing: $spacing-unit * 4; $vertical-spacing: $spacing-unit * 2; $base-padding: $vertical-spacing $horizontal-spacing; $base-height: $spacing-unit * 9; $component-spacing: $spacing-unit * 4; // SMALL $horizontal-spacing-sm: $spacing-unit * 2; $vertical-spacing-sm: $spacing-unit * 1; $base-padding-sm: $vertical-spacing-sm $horizontal-spacing-sm; $base-height-sm: $spacing-unit * 7; // COLOURS $grey-0: #212121; $grey-1: #363636; $grey-2: #4c4c4c; $grey-3: #636363; $grey-4: #757575; $grey-5: #9e9e9e; $grey-6: #aeaeae; $grey-7: #c8c8c8; $grey-8: #e3e3e3; $grey-9: #f0f0f0; $white: white; $black: $grey-0; $transparent: transparent; $blue-0: #00187c; $blue-1: #032e8c; $blue-2: #0849a3; $blue-3: #0951a8; $blue-4: #1169ba; $blue-5: #1479c6; $blue-6: #5194d2; $blue-7: #7aacdd; $blue-8: #b9d5ed; $blue-9: #e7f1f9; $red-0: #7c0000; $red-1: #8c0000; $red-2: #a30000; $red-3: #a80000; $red-4: #ba0000; $red-5: #dc0000; $red-6: #d25151; $red-7: #dd7a7a; $red-8: #edc1c1; $red-9: #f9e7e7; $black-1: #e6e6e6; $brand: $blue-0; $accent: $blue-5; $accent-selected: $blue-9; $error: $red-5; $severity-critical: #dc0000; $severity-warning: #f59500; $severity-success: #a2bb31; $severity-info: $accent; $ui-primary: $black; $ui-secondary: $grey-4; $ui-disabled: $grey-2; $ui-placeholder: $grey-5; $ui-background: $grey-9; $ui-sheet: $white; $ui-border: #d5d5d5; // BORDERS $ui-border-radius: 4px; $ui-border-width: 1px; // TYPOGRAPHY $font-size-default: 16px; $font-size-small: 14px; .material-symbols-rounded{font-variation-settings:'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24}.skeleton{animation:skeleton-loading 1s linear infinite alternate;border-radius:4px;width:100%}@keyframes skeleton-loading{0%{background-color:hsl(200, 20%, 80%)}100%{background-color:hsl(200, 20%, 95%)}}:host{display:block}table{box-sizing:border-box;width:100%;border-collapse:collapse;border-spacing:0;border:1px solid #ddd;border-bottom:none}thead tr{height:52px;color:#757575}tbody tr{height:48px;color:#212121}tr{font-family:'Roboto', sans-serif;font-weight:400;font-size:16px;display:flex;align-items:center;border-bottom:1px solid #ddd}.selected{background-color:#F0F0F0}.checked{background-color:#e7f1f9}td,th{min-width:300px;margin-left:16px;display:flex;align-items:left}.skeleton{height:24px;display:block}.align-right{margin-left:auto}";export{r as tttx_table}
@@ -0,0 +1 @@
1
+ import{r as t,h as i}from"./p-184c4fae.js";const e=class{constructor(i){t(this,i),this.loadingMessage=void 0,this.size="large"}renderLoadingMessage(){return this.loadingMessage?i("div",{class:"loading-text"},"Loading, please wait..."):""}render(){return i("div",{class:"spinner-container"},i("div",{class:"loading-box"},i("span",{class:`spinner ${this.size}`})),this.renderLoadingMessage())}};e.style='.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)}}';export{e as tttx_loading_spinner}
@@ -0,0 +1 @@
1
+ import{r as i,c as t,h as s,H as e}from"./p-184c4fae.js";const o=class{constructor(s){i(this,s),this.valueChanged=t(this,"valueChanged",7),this.focusChanged=t(this,"focusChanged",7),this.blurChanged=t(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(i){const t=i.target;this.value=t.value,this.valueChanged.emit(t.value)}handleFocus(i){this.focusChanged.emit(i.target.value)}handleBlur(i){this.blurChanged.emit(i.target.value)}render(){const i=["standalone",this.showerrormsg?"invalid":""].join(" ");return s(e,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:i,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)))}};o.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}.icon-left,.icon-right{flex-basis:24px}.icon-left span,.icon-right span{font-size:24px;line-height:24px;text-align:center;display:block;width:24px;height:24px;margin-top:4px}.icon-left span{margin-left:4px}.icon-right span{margin-right:4px}.icon-right{margin-top:5px;margin-right:4px}.icon-left{margin-top:5px;margin-left:4px}.iconleft .input{padding-left:4px}.iconright .input{padding-right:4px}.focused{border-color:#1479c6}.errormsg{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 .validationicon{width:16px;height:16px;font-size:16px;margin-right:4px;vertical-align:middle;color:#dc0000}.danger{color:#dc0000}.optional{color:#757575;font-weight:normal}label.inputBlock{display:block;position:relative;line-height:21px}label{font-weight:500;font-size:16px}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]{background:white;display:block;min-width:calc(100% - 18px);line-height:37px}input.invalid:invalid,input.standalone.invalid{border:1px solid #dc0000}input~.errorBubble{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~.errorBubble:not(.visible){visibility:hidden}input~.errorBubble span{color:#dc0000;font-size:16px;margin-right:4px;height:16px}input.invalid:invalid~.errorBubble{position:relative;font-size:14px;font-weight:normal;width:100%;font-family:"Roboto", sans-serif;color:#dc0000;visibility:visible}input:focus{border-color:#1479c6}:host{display:block}';export{o as tttx_standalone_input}
@@ -0,0 +1 @@
1
+ import{r as t,c as o,h as i,H as e}from"./p-184c4fae.js";const r=class{constructor(i){t(this,i),this.clickEvent=o(this,"clickEvent",7),this.fontColor=void 0,this.buttonStyle=void 0}onClick(){this.clickEvent.emit("clicked")}onClicked(t){console.log("Picked up a clickEvent",t)}render(){return i(e,null,i("button",{onClick:this.onClick.bind(this),class:`button ${this.fontColor} ${this.buttonStyle}`},i("span",null,i("slot",null))))}};r.style='.material-symbols-rounded{font-variation-settings:"FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24}.button{height:36px;padding:8px 16px;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:400}.button:hover{background:#f0f0f0}.button:active{background:#e3e3e3}.primary-blue{background:#1479c6;border:1px solid #1479c6;color:white}.primary-blue:hover{background:#1169ba}.primary-blue:active{background:#0951a8}.secondary-white{background:white;border:1px solid #212121}:host{display:inline-block}.spacingleft{margin-left:8px}.font-white{color:white}.font-black{color:#212121}';export{r as tttx_button}