@3t-transform/threeteeui 0.0.13 → 0.0.15

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 (121) hide show
  1. package/package.json +7 -4
  2. package/dist/cjs/index-bf39be87.js +0 -1530
  3. package/dist/cjs/index.cjs.js +0 -2
  4. package/dist/cjs/loader.cjs.js +0 -22
  5. package/dist/cjs/tttx-button.cjs.entry.js +0 -28
  6. package/dist/cjs/tttx-checkbox.cjs.entry.js +0 -28
  7. package/dist/cjs/tttx-form.cjs.entry.js +0 -186
  8. package/dist/cjs/tttx-icon.cjs.entry.js +0 -1861
  9. package/dist/cjs/tttx-list.cjs.entry.js +0 -198
  10. package/dist/cjs/tttx-loading-spinner.cjs.entry.js +0 -26
  11. package/dist/cjs/tttx-popover-content.cjs.entry.js +0 -23
  12. package/dist/cjs/tttx-standalone-input.cjs.entry.js +0 -136
  13. package/dist/cjs/tttx.cjs.js +0 -23
  14. package/dist/collection/collection-manifest.json +0 -19
  15. package/dist/collection/components/atoms/tttx-button/tttx-button.css +0 -62
  16. package/dist/collection/components/atoms/tttx-button/tttx-button.js +0 -93
  17. package/dist/collection/components/atoms/tttx-button/tttx-button.stories.js +0 -27
  18. package/dist/collection/components/atoms/tttx-icon/tttx-icon.css +0 -105
  19. package/dist/collection/components/atoms/tttx-icon/tttx-icon.js +0 -114
  20. package/dist/collection/components/atoms/tttx-icon/tttx-icon.stories.js +0 -47
  21. package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.css +0 -48
  22. package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.js +0 -66
  23. package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.stories.js +0 -17
  24. package/dist/collection/components/atoms/tttx-popover-content/tttx-popover-content.css +0 -30
  25. package/dist/collection/components/atoms/tttx-popover-content/tttx-popover-content.js +0 -96
  26. package/dist/collection/components/atoms/tttx-popover-content/tttx-popover-content.stories.js +0 -23
  27. package/dist/collection/components/atoms/ttx-checkbox/tttx-checkbox.css +0 -181
  28. package/dist/collection/components/atoms/ttx-checkbox/tttx-checkbox.js +0 -101
  29. package/dist/collection/components/atoms/ttx-checkbox/tttx-checkbox.stories.js +0 -13
  30. package/dist/collection/components/molecules/tttx-form/tttx-form.css +0 -230
  31. package/dist/collection/components/molecules/tttx-form/tttx-form.js +0 -249
  32. package/dist/collection/components/molecules/tttx-form/tttx-form.stories.js +0 -102
  33. package/dist/collection/components/molecules/tttx-list/tttx-list.css +0 -56
  34. package/dist/collection/components/molecules/tttx-list/tttx-list.js +0 -311
  35. package/dist/collection/components/molecules/tttx-list/tttx-list.stories.js +0 -37
  36. package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.css +0 -177
  37. package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.js +0 -569
  38. package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.stories.js +0 -156
  39. package/dist/collection/components/palette.stories.js +0 -88
  40. package/dist/collection/docs/gettingstarted-developer.stories.js +0 -9
  41. package/dist/collection/icons.js +0 -2838
  42. package/dist/collection/index.js +0 -1
  43. package/dist/components/index.d.ts +0 -38
  44. package/dist/components/index.js +0 -9
  45. package/dist/components/tttx-button.d.ts +0 -11
  46. package/dist/components/tttx-button.js +0 -45
  47. package/dist/components/tttx-checkbox.d.ts +0 -11
  48. package/dist/components/tttx-checkbox.js +0 -46
  49. package/dist/components/tttx-form.d.ts +0 -11
  50. package/dist/components/tttx-form.js +0 -203
  51. package/dist/components/tttx-icon.d.ts +0 -11
  52. package/dist/components/tttx-icon.js +0 -6
  53. package/dist/components/tttx-icon2.js +0 -1875
  54. package/dist/components/tttx-list.d.ts +0 -11
  55. package/dist/components/tttx-list.js +0 -225
  56. package/dist/components/tttx-loading-spinner.d.ts +0 -11
  57. package/dist/components/tttx-loading-spinner.js +0 -6
  58. package/dist/components/tttx-loading-spinner2.js +0 -40
  59. package/dist/components/tttx-popover-content.d.ts +0 -11
  60. package/dist/components/tttx-popover-content.js +0 -42
  61. package/dist/components/tttx-standalone-input.d.ts +0 -11
  62. package/dist/components/tttx-standalone-input.js +0 -178
  63. package/dist/esm/index-63c4d25e.js +0 -1501
  64. package/dist/esm/index.js +0 -1
  65. package/dist/esm/loader.js +0 -18
  66. package/dist/esm/polyfills/core-js.js +0 -11
  67. package/dist/esm/polyfills/css-shim.js +0 -1
  68. package/dist/esm/polyfills/dom.js +0 -79
  69. package/dist/esm/polyfills/es5-html-element.js +0 -1
  70. package/dist/esm/polyfills/index.js +0 -34
  71. package/dist/esm/polyfills/system.js +0 -6
  72. package/dist/esm/tttx-button.entry.js +0 -24
  73. package/dist/esm/tttx-checkbox.entry.js +0 -24
  74. package/dist/esm/tttx-form.entry.js +0 -182
  75. package/dist/esm/tttx-icon.entry.js +0 -1857
  76. package/dist/esm/tttx-list.entry.js +0 -194
  77. package/dist/esm/tttx-loading-spinner.entry.js +0 -22
  78. package/dist/esm/tttx-popover-content.entry.js +0 -19
  79. package/dist/esm/tttx-standalone-input.entry.js +0 -132
  80. package/dist/esm/tttx.js +0 -18
  81. package/dist/index.cjs.js +0 -1
  82. package/dist/index.js +0 -1
  83. package/dist/tttx/index.esm.js +0 -0
  84. package/dist/tttx/p-1a4eb1f3.entry.js +0 -1
  85. package/dist/tttx/p-25953f82.entry.js +0 -1
  86. package/dist/tttx/p-2b6720ac.entry.js +0 -1
  87. package/dist/tttx/p-2d54f8aa.entry.js +0 -1
  88. package/dist/tttx/p-4c57bcbd.entry.js +0 -1
  89. package/dist/tttx/p-709246f5.entry.js +0 -1
  90. package/dist/tttx/p-95a29e09.entry.js +0 -1
  91. package/dist/tttx/p-ad0c3fe4.entry.js +0 -1
  92. package/dist/tttx/p-bec472d8.js +0 -2
  93. package/dist/tttx/tttx.esm.js +0 -1
  94. package/dist/types/components/atoms/tttx-button/tttx-button.d.ts +0 -9
  95. package/dist/types/components/atoms/tttx-button/tttx-button.stories.d.ts +0 -20
  96. package/dist/types/components/atoms/tttx-icon/tttx-icon.d.ts +0 -14
  97. package/dist/types/components/atoms/tttx-icon/tttx-icon.stories.d.ts +0 -21
  98. package/dist/types/components/atoms/tttx-loading-spinner/tttx-loading-spinner.d.ts +0 -6
  99. package/dist/types/components/atoms/tttx-loading-spinner/tttx-loading-spinner.stories.d.ts +0 -17
  100. package/dist/types/components/atoms/tttx-popover-content/tttx-popover-content.d.ts +0 -7
  101. package/dist/types/components/atoms/tttx-popover-content/tttx-popover-content.stories.d.ts +0 -18
  102. package/dist/types/components/atoms/ttx-checkbox/tttx-checkbox.d.ts +0 -9
  103. package/dist/types/components/atoms/ttx-checkbox/tttx-checkbox.stories.d.ts +0 -6
  104. package/dist/types/components/molecules/tttx-form/tttx-form.d.ts +0 -18
  105. package/dist/types/components/molecules/tttx-form/tttx-form.stories.d.ts +0 -6
  106. package/dist/types/components/molecules/tttx-list/tttx-list.d.ts +0 -51
  107. package/dist/types/components/molecules/tttx-list/tttx-list.stories.d.ts +0 -13
  108. package/dist/types/components/molecules/tttx-standalone-input/tttx-standalone-input.d.ts +0 -38
  109. package/dist/types/components/molecules/tttx-standalone-input/tttx-standalone-input.stories.d.ts +0 -106
  110. package/dist/types/components/palette.stories.d.ts +0 -6
  111. package/dist/types/components.d.ts +0 -236
  112. package/dist/types/docs/gettingstarted-developer.stories.d.ts +0 -5
  113. package/dist/types/icons.d.ts +0 -2
  114. package/dist/types/index.d.ts +0 -1
  115. package/dist/types/stencil-public-runtime.d.ts +0 -1637
  116. package/loader/cdn.js +0 -3
  117. package/loader/index.cjs.js +0 -3
  118. package/loader/index.d.ts +0 -21
  119. package/loader/index.es2017.js +0 -3
  120. package/loader/index.js +0 -4
  121. package/loader/package.json +0 -11
@@ -1,198 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-bf39be87.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;
@@ -1,26 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-bf39be87.js');
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)}}";
8
-
9
- const TttxLoadingSpinner = class {
10
- constructor(hostRef) {
11
- index.registerInstance(this, hostRef);
12
- this.loadingMessage = undefined;
13
- this.size = 'large';
14
- }
15
- renderLoadingMessage() {
16
- if (!this.loadingMessage)
17
- return '';
18
- return index.h("div", { class: "loading-text" }, "Loading, please wait...");
19
- }
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()));
22
- }
23
- };
24
- TttxLoadingSpinner.style = tttxLoadingSpinnerCss;
25
-
26
- exports.tttx_loading_spinner = TttxLoadingSpinner;
@@ -1,23 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-bf39be87.js');
6
-
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
-
9
- const TttxPopoverContent = class {
10
- constructor(hostRef) {
11
- index.registerInstance(this, hostRef);
12
- this.header = undefined;
13
- this.body = undefined;
14
- this.linkcontext = undefined;
15
- this.linktext = undefined;
16
- }
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'))));
19
- }
20
- };
21
- TttxPopoverContent.style = tttxPopoverContentCss;
22
-
23
- exports.tttx_popover_content = TttxPopoverContent;
@@ -1,136 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-bf39be87.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.focusChanged = index.createEvent(this, "focusChanged", 7);
14
- this.blurChanged = index.createEvent(this, "blurChanged", 7);
15
- this.label = 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(event) {
44
- const target = event.target;
45
- this.valueChanged.emit(target.value);
46
- }
47
- handleBlur(event) {
48
- const target = event.target;
49
- this.valueChanged.emit(target.value);
50
- }
51
- render() {
52
- const classNames = ['standalone', this.showerrormsg ? 'invalid' : ''].join(' ');
53
- 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' ||
54
- this.type === 'search' ||
55
- this.type === 'url' ||
56
- this.type === 'tel' ||
57
- this.type === 'email' ||
58
- this.type === 'password' ||
59
- this.type === 'datepickers' ||
60
- this.type === 'range' ||
61
- this.type === 'color'
62
- ? this.autocomplete
63
- : null, checked: this.type === 'checkbox' || this.type === 'radio' ? this.checked : null, disabled: !this.required ? this.disabled : null, max: this.type === 'date' ||
64
- this.type === 'month' ||
65
- this.type === 'week' ||
66
- this.type === 'time' ||
67
- this.type === 'datetime-local' ||
68
- this.type === 'number' ||
69
- this.type === 'range'
70
- ? this.max
71
- : null, maxlength: this.maxlength, min: this.type === 'date' ||
72
- this.type === 'month' ||
73
- this.type === 'week' ||
74
- this.type === 'time' ||
75
- this.type === 'datetime-local' ||
76
- this.type === 'number' ||
77
- this.type === 'range'
78
- ? this.min
79
- : null, minlength: this.minlength, name: this.name, pattern: this.type === 'text' ||
80
- this.type === 'date' ||
81
- this.type === 'search' ||
82
- this.type === 'url' ||
83
- this.type === 'tel' ||
84
- this.type === 'email' ||
85
- this.type === 'password'
86
- ? this.pattern
87
- : null, placeholder: this.type === 'text' ||
88
- this.type === 'tel' ||
89
- this.type === 'email' ||
90
- this.type === 'url' ||
91
- this.type === 'password' ||
92
- this.type === 'search'
93
- ? this.placeholder
94
- : null, readonly: this.type === 'text' ||
95
- this.type === 'search' ||
96
- this.type === 'url' ||
97
- this.type === 'tel' ||
98
- this.type === 'email' ||
99
- this.type === 'password' ||
100
- this.type === 'date' ||
101
- this.type === 'month' ||
102
- this.type === 'week' ||
103
- this.type === 'time' ||
104
- this.type === 'datetime-local' ||
105
- this.type === 'number'
106
- ? this.readonly
107
- : null, required: this.type === 'text' ||
108
- this.type === 'search' ||
109
- this.type === 'url' ||
110
- this.type === 'tel' ||
111
- this.type === 'email' ||
112
- this.type === 'password' ||
113
- this.type === 'date' ||
114
- this.type === 'month' ||
115
- this.type === 'week' ||
116
- this.type === 'time' ||
117
- this.type === 'datetime-local' ||
118
- this.type === 'number' ||
119
- this.type === 'checkbox' ||
120
- this.type === 'radio' ||
121
- this.type === 'file'
122
- ? this.required
123
- : null, step: this.type === 'date' ||
124
- this.type === 'month' ||
125
- this.type === 'week' ||
126
- this.type === 'time' ||
127
- this.type === 'datetime-local' ||
128
- this.type === 'number' ||
129
- this.type === 'range'
130
- ? this.step
131
- : 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))));
132
- }
133
- };
134
- TttxInput.style = tttxStandaloneInputCss;
135
-
136
- exports.tttx_standalone_input = TttxInput;
@@ -1,23 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-bf39be87.js');
6
-
7
- /*
8
- Stencil Client Patch Browser v2.22.3 | MIT Licensed | https://stenciljs.com
9
- */
10
- const patchBrowser = () => {
11
- 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));
12
- const opts = {};
13
- if (importMeta !== '') {
14
- opts.resourcesUrl = new URL('.', importMeta).href;
15
- }
16
- return index.promiseResolve(opts);
17
- };
18
-
19
- patchBrowser().then(options => {
20
- 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],"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.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
- });
22
-
23
- exports.setNonce = index.setNonce;
@@ -1,19 +0,0 @@
1
- {
2
- "entries": [
3
- "./components/molecules/tttx-standalone-input/tttx-standalone-input.js",
4
- "./components/atoms/tttx-button/tttx-button.js",
5
- "./components/atoms/tttx-icon/tttx-icon.js",
6
- "./components/atoms/tttx-loading-spinner/tttx-loading-spinner.js",
7
- "./components/atoms/tttx-popover-content/tttx-popover-content.js",
8
- "./components/atoms/ttx-checkbox/tttx-checkbox.js",
9
- "./components/molecules/tttx-form/tttx-form.js",
10
- "./components/molecules/tttx-list/tttx-list.js"
11
- ],
12
- "compiler": {
13
- "name": "@stencil/core",
14
- "version": "2.22.3",
15
- "typescriptVersion": "4.9.4"
16
- },
17
- "collections": [],
18
- "bundles": []
19
- }
@@ -1,62 +0,0 @@
1
- .material-symbols-rounded {
2
- font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24;
3
- }
4
-
5
- .button {
6
- height: 36px;
7
- padding: 8px 16px;
8
- margin: 0;
9
- background: transparent;
10
- color: #212121;
11
- border: 1px solid #c8c8c8;
12
- border-radius: 4px;
13
- text-transform: uppercase;
14
- display: flex;
15
- justify-content: left;
16
- align-items: center;
17
- font-size: 14px;
18
- font-weight: 400;
19
- }
20
-
21
- .button:hover {
22
- background: #f0f0f0;
23
- }
24
-
25
- .button:active {
26
- background: #e3e3e3;
27
- }
28
-
29
- .primary-blue {
30
- background: #1479c6;
31
- border: 1px solid #1479c6;
32
- color: white;
33
- }
34
-
35
- .primary-blue:hover {
36
- background: #1169ba;
37
- }
38
-
39
- .primary-blue:active {
40
- background: #0951a8;
41
- }
42
-
43
- .secondary-white {
44
- background: white;
45
- border: 1px solid #212121;
46
- }
47
-
48
- :host {
49
- display: inline-block;
50
- }
51
-
52
- .spacingleft {
53
- margin-left: 8px;
54
- }
55
-
56
- .font-white {
57
- color: white;
58
- }
59
-
60
- .font-black {
61
- color: #212121;
62
- }
@@ -1,93 +0,0 @@
1
- import { Host, h } from '@stencil/core';
2
- export class TttxButton {
3
- constructor() {
4
- this.fontColor = undefined;
5
- this.buttonStyle = undefined;
6
- }
7
- onClick() {
8
- this.clickEvent.emit('clicked');
9
- }
10
- onClicked(event) {
11
- console.log('Picked up a clickEvent', event);
12
- }
13
- render() {
14
- return (h(Host, null, h("button", { onClick: this.onClick.bind(this), class: `button ${this.fontColor} ${this.buttonStyle}` }, h("span", null, h("slot", null)))));
15
- }
16
- static get is() { return "tttx-button"; }
17
- static get encapsulation() { return "shadow"; }
18
- static get originalStyleUrls() {
19
- return {
20
- "$": ["tttx-button.scss"]
21
- };
22
- }
23
- static get styleUrls() {
24
- return {
25
- "$": ["tttx-button.css"]
26
- };
27
- }
28
- static get properties() {
29
- return {
30
- "fontColor": {
31
- "type": "string",
32
- "mutable": false,
33
- "complexType": {
34
- "original": "string",
35
- "resolved": "string",
36
- "references": {}
37
- },
38
- "required": false,
39
- "optional": false,
40
- "docs": {
41
- "tags": [],
42
- "text": ""
43
- },
44
- "attribute": "font-color",
45
- "reflect": false
46
- },
47
- "buttonStyle": {
48
- "type": "string",
49
- "mutable": false,
50
- "complexType": {
51
- "original": "string",
52
- "resolved": "string",
53
- "references": {}
54
- },
55
- "required": false,
56
- "optional": false,
57
- "docs": {
58
- "tags": [],
59
- "text": ""
60
- },
61
- "attribute": "button-style",
62
- "reflect": false
63
- }
64
- };
65
- }
66
- static get events() {
67
- return [{
68
- "method": "clickEvent",
69
- "name": "clickEvent",
70
- "bubbles": true,
71
- "cancelable": true,
72
- "composed": true,
73
- "docs": {
74
- "tags": [],
75
- "text": ""
76
- },
77
- "complexType": {
78
- "original": "string",
79
- "resolved": "string",
80
- "references": {}
81
- }
82
- }];
83
- }
84
- static get listeners() {
85
- return [{
86
- "name": "clickEvent",
87
- "method": "onClicked",
88
- "target": undefined,
89
- "capture": false,
90
- "passive": false
91
- }];
92
- }
93
- }
@@ -1,27 +0,0 @@
1
- export default {
2
- title: 'Atoms/Button',
3
- component: 'tttx-button',
4
- argTypes: {
5
- fontColor: {
6
- control: {
7
- type: 'select',
8
- options: ['font-white', 'font-black'],
9
- },
10
- },
11
- buttonStyle: {
12
- control: {
13
- type: 'select',
14
- options: ['primary-blue', 'secondary-white'],
15
- },
16
- },
17
- },
18
- };
19
- const Template = ({ content, fontColor, buttonStyle }) => `
20
- <tttx-button font-color=${fontColor} button-style=${buttonStyle}>${content}</tttx-button>
21
- `;
22
- export const Default = Template.bind({});
23
- Default.args = {
24
- content: 'My Button',
25
- fontColor: 'font-white',
26
- buttonStyle: 'primary-blue',
27
- };