@3t-transform/threeteeui 0.1.37 → 0.1.41

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 (125) hide show
  1. package/dist/cjs/domsanitiser.options-277161b9.js +1667 -0
  2. package/dist/cjs/{index-457ca775.js → index-76f14107.js} +2 -88
  3. package/dist/cjs/loader.cjs.js +2 -3
  4. package/dist/cjs/tttx-button.cjs.entry.js +25 -25
  5. package/dist/cjs/tttx-filter.cjs.entry.js +159 -159
  6. package/dist/cjs/tttx-form.cjs.entry.js +457 -373
  7. package/dist/cjs/tttx-icon.cjs.entry.js +11 -11
  8. package/dist/cjs/tttx-keyvalue-block.cjs.entry.js +59 -59
  9. package/dist/cjs/tttx-list.cjs.entry.js +32 -1694
  10. package/dist/cjs/tttx-loading-spinner.cjs.entry.js +16 -16
  11. package/dist/cjs/tttx-sorter.cjs.entry.js +102 -102
  12. package/dist/cjs/tttx-standalone-input.cjs.entry.js +79 -79
  13. package/dist/cjs/tttx-toolbar.cjs.entry.js +10 -10
  14. package/dist/cjs/tttx.cjs.js +2 -6
  15. package/dist/collection/collection-manifest.json +2 -2
  16. package/dist/collection/components/atoms/tttx-button/tttx-button.css +4 -4
  17. package/dist/collection/components/atoms/tttx-button/tttx-button.js +110 -110
  18. package/dist/collection/components/atoms/tttx-button/tttx-button.stories.js +14 -14
  19. package/dist/collection/components/atoms/tttx-icon/tttx-icon.js +62 -62
  20. package/dist/collection/components/atoms/tttx-icon/tttx-icon.stories.js +22 -22
  21. package/dist/collection/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.js +109 -109
  22. package/dist/collection/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.stories.js +38 -38
  23. package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.js +67 -67
  24. package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.stories.js +17 -17
  25. package/dist/collection/components/molecules/tttx-filter/tttx-filter.js +334 -334
  26. package/dist/collection/components/molecules/tttx-filter/tttx-filter.stories.js +62 -62
  27. package/dist/collection/components/molecules/tttx-form/lib/setErrorState.js +37 -37
  28. package/dist/collection/components/molecules/tttx-form/lib/validityCheck.js +61 -58
  29. package/dist/collection/components/molecules/tttx-form/tttx-form.css +98 -2
  30. package/dist/collection/components/molecules/tttx-form/tttx-form.js +477 -393
  31. package/dist/collection/components/molecules/tttx-form/tttx-form.stories.js +274 -218
  32. package/dist/collection/components/molecules/tttx-list/tttx-list.js +105 -105
  33. package/dist/collection/components/molecules/tttx-list/tttx-list.stories.js +43 -43
  34. package/dist/collection/components/molecules/tttx-sorter/tttx-sorter.js +224 -224
  35. package/dist/collection/components/molecules/tttx-sorter/tttx-sorter.stories.js +42 -42
  36. package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.js +759 -759
  37. package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.stories.js +172 -172
  38. package/dist/collection/components/molecules/tttx-toolbar/tttx-toolbar.js +44 -44
  39. package/dist/collection/components/molecules/tttx-toolbar/tttx-toolbar.stories.js +14 -14
  40. package/dist/collection/components/palette.stories.js +7 -7
  41. package/dist/collection/docs/gettingstarted-developer.stories.js +5 -5
  42. package/dist/collection/icons.js +2838 -2838
  43. package/dist/collection/index.js +1 -1
  44. package/dist/collection/shared/domsanitiser.options.js +14 -14
  45. package/dist/components/domsanitiser.options.js +1664 -0
  46. package/dist/components/index.d.ts +0 -9
  47. package/dist/components/index.js +1 -1
  48. package/dist/components/tttx-button.js +49 -49
  49. package/dist/components/tttx-filter.js +191 -191
  50. package/dist/components/tttx-form.js +475 -391
  51. package/dist/components/tttx-icon2.js +28 -28
  52. package/dist/components/tttx-keyvalue-block.js +76 -76
  53. package/dist/components/tttx-list.js +54 -1716
  54. package/dist/components/tttx-loading-spinner.js +33 -33
  55. package/dist/components/tttx-sorter.js +130 -130
  56. package/dist/components/tttx-standalone-input.js +130 -130
  57. package/dist/components/tttx-toolbar.js +26 -26
  58. package/dist/esm/domsanitiser.options-cc420431.js +1664 -0
  59. package/dist/esm/{index-d784fb3e.js → index-9cde46a5.js} +3 -88
  60. package/dist/esm/loader.js +2 -3
  61. package/dist/esm/polyfills/core-js.js +0 -0
  62. package/dist/esm/polyfills/css-shim.js +1 -1
  63. package/dist/esm/polyfills/dom.js +0 -0
  64. package/dist/esm/polyfills/es5-html-element.js +0 -0
  65. package/dist/esm/polyfills/index.js +0 -0
  66. package/dist/esm/polyfills/system.js +0 -0
  67. package/dist/esm/tttx-button.entry.js +25 -25
  68. package/dist/esm/tttx-filter.entry.js +159 -159
  69. package/dist/esm/tttx-form.entry.js +457 -373
  70. package/dist/esm/tttx-icon.entry.js +11 -11
  71. package/dist/esm/tttx-keyvalue-block.entry.js +59 -59
  72. package/dist/esm/tttx-list.entry.js +32 -1694
  73. package/dist/esm/tttx-loading-spinner.entry.js +16 -16
  74. package/dist/esm/tttx-sorter.entry.js +102 -102
  75. package/dist/esm/tttx-standalone-input.entry.js +79 -79
  76. package/dist/esm/tttx-toolbar.entry.js +10 -10
  77. package/dist/esm/tttx.js +2 -3
  78. package/dist/tttx/{p-400868f1.entry.js → p-3b1be372.entry.js} +1 -1
  79. package/dist/tttx/{p-563605b2.entry.js → p-561224f5.entry.js} +1 -1
  80. package/dist/tttx/{p-b720c4ad.entry.js → p-9f1e9cc1.entry.js} +1 -1
  81. package/dist/tttx/{p-798a098a.entry.js → p-aef96333.entry.js} +1 -1
  82. package/dist/tttx/p-b4290a5b.js +3 -0
  83. package/dist/tttx/p-bd1edaed.entry.js +1 -0
  84. package/dist/tttx/p-d0ff9ad0.entry.js +1 -0
  85. package/dist/tttx/{p-cac26a1b.entry.js → p-d2f1aa8e.entry.js} +1 -1
  86. package/dist/tttx/p-db059a69.js +2 -0
  87. package/dist/tttx/p-dc2a37b0.entry.js +1 -0
  88. package/dist/tttx/{p-ab6ce9f6.entry.js → p-e53c7f9d.entry.js} +1 -1
  89. package/dist/tttx/{p-92cade7f.entry.js → p-f885f17a.entry.js} +1 -1
  90. package/dist/tttx/tttx.esm.js +1 -1
  91. package/dist/types/components/atoms/tttx-button/tttx-button.d.ts +10 -10
  92. package/dist/types/components/atoms/tttx-button/tttx-button.stories.d.ts +10 -10
  93. package/dist/types/components/atoms/tttx-icon/tttx-icon.d.ts +5 -5
  94. package/dist/types/components/atoms/tttx-icon/tttx-icon.stories.d.ts +20 -20
  95. package/dist/types/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.d.ts +7 -7
  96. package/dist/types/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.stories.d.ts +9 -9
  97. package/dist/types/components/atoms/tttx-loading-spinner/tttx-loading-spinner.d.ts +6 -6
  98. package/dist/types/components/atoms/tttx-loading-spinner/tttx-loading-spinner.stories.d.ts +17 -17
  99. package/dist/types/components/molecules/tttx-filter/tttx-filter.d.ts +39 -39
  100. package/dist/types/components/molecules/tttx-filter/tttx-filter.stories.d.ts +68 -68
  101. package/dist/types/components/molecules/tttx-form/lib/setErrorState.d.ts +13 -13
  102. package/dist/types/components/molecules/tttx-form/lib/validityCheck.d.ts +17 -17
  103. package/dist/types/components/molecules/tttx-form/tttx-form.d.ts +133 -111
  104. package/dist/types/components/molecules/tttx-form/tttx-form.stories.d.ts +278 -13
  105. package/dist/types/components/molecules/tttx-list/tttx-list.d.ts +11 -11
  106. package/dist/types/components/molecules/tttx-list/tttx-list.stories.d.ts +14 -14
  107. package/dist/types/components/molecules/tttx-sorter/tttx-sorter.d.ts +19 -19
  108. package/dist/types/components/molecules/tttx-sorter/tttx-sorter.stories.d.ts +30 -30
  109. package/dist/types/components/molecules/tttx-standalone-input/tttx-standalone-input.d.ts +69 -69
  110. package/dist/types/components/molecules/tttx-standalone-input/tttx-standalone-input.stories.d.ts +143 -143
  111. package/dist/types/components/molecules/tttx-toolbar/tttx-toolbar.d.ts +4 -4
  112. package/dist/types/components/molecules/tttx-toolbar/tttx-toolbar.stories.d.ts +13 -13
  113. package/dist/types/components/palette.stories.d.ts +6 -6
  114. package/dist/types/components.d.ts +1 -1
  115. package/dist/types/docs/gettingstarted-developer.stories.d.ts +5 -5
  116. package/dist/types/icons.d.ts +2 -2
  117. package/dist/types/index.d.ts +1 -1
  118. package/dist/types/shared/domsanitiser.options.d.ts +10 -10
  119. package/dist/types/stencil-public-runtime.d.ts +3 -59
  120. package/loader/index.d.ts +0 -9
  121. package/package.json +1 -1
  122. package/dist/tttx/p-0ebffdfc.js +0 -2
  123. package/dist/tttx/p-72e7f7dd.entry.js +0 -3
  124. package/dist/tttx/p-c4162029.entry.js +0 -1
  125. package/dist/tttx/p-eb126fd0.entry.js +0 -1
@@ -2,39 +2,39 @@ import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/clien
2
2
 
3
3
  const tttxLoadingSpinnerCss = ".material-symbols-rounded{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}.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
4
 
5
- const TttxLoadingSpinner$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
6
- constructor() {
7
- super();
8
- this.__registerHost();
9
- this.__attachShadow();
10
- this.loadingMessage = undefined;
11
- this.size = 'large';
12
- }
13
- renderLoadingMessage() {
14
- if (!this.loadingMessage)
15
- return '';
16
- return h("div", { class: "loading-text" }, "Loading, please wait...");
17
- }
18
- render() {
19
- return (h("div", null, h("div", { class: "loading-box" }, h("span", { class: `spinner ${this.size}` })), this.renderLoadingMessage()));
20
- }
21
- static get style() { return tttxLoadingSpinnerCss; }
22
- }, [1, "tttx-loading-spinner", {
23
- "loadingMessage": [1028, "loading-message"],
24
- "size": [1025]
25
- }]);
26
- function defineCustomElement$1() {
27
- if (typeof customElements === "undefined") {
28
- return;
29
- }
30
- const components = ["tttx-loading-spinner"];
31
- components.forEach(tagName => { switch (tagName) {
32
- case "tttx-loading-spinner":
33
- if (!customElements.get(tagName)) {
34
- customElements.define(tagName, TttxLoadingSpinner$1);
35
- }
36
- break;
37
- } });
5
+ const TttxLoadingSpinner$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
6
+ constructor() {
7
+ super();
8
+ this.__registerHost();
9
+ this.__attachShadow();
10
+ this.loadingMessage = undefined;
11
+ this.size = 'large';
12
+ }
13
+ renderLoadingMessage() {
14
+ if (!this.loadingMessage)
15
+ return '';
16
+ return h("div", { class: "loading-text" }, "Loading, please wait...");
17
+ }
18
+ render() {
19
+ return (h("div", null, h("div", { class: "loading-box" }, h("span", { class: `spinner ${this.size}` })), this.renderLoadingMessage()));
20
+ }
21
+ static get style() { return tttxLoadingSpinnerCss; }
22
+ }, [1, "tttx-loading-spinner", {
23
+ "loadingMessage": [1028, "loading-message"],
24
+ "size": [1025]
25
+ }]);
26
+ function defineCustomElement$1() {
27
+ if (typeof customElements === "undefined") {
28
+ return;
29
+ }
30
+ const components = ["tttx-loading-spinner"];
31
+ components.forEach(tagName => { switch (tagName) {
32
+ case "tttx-loading-spinner":
33
+ if (!customElements.get(tagName)) {
34
+ customElements.define(tagName, TttxLoadingSpinner$1);
35
+ }
36
+ break;
37
+ } });
38
38
  }
39
39
 
40
40
  const TttxLoadingSpinner = TttxLoadingSpinner$1;
@@ -3,136 +3,136 @@ import { d as defineCustomElement$2 } from './tttx-icon2.js';
3
3
 
4
4
  const tttxSorterCss = ".material-symbols-rounded{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}.sorter-container{display:flex;flex-direction:row;position:relative;border:1px solid #d5d5d5;border-radius:4px;font-weight:400;box-sizing:border-box;height:36px}@media (max-width: 475px){.sorter-container{width:68px}}.sorter-container .arrow-toggle-button{display:inline-flex;justify-content:center;align-items:center;flex-direction:column;background-color:white;border:none;border-bottom-left-radius:4px;border-top-left-radius:4px}@media (max-width: 475px){.sorter-container .arrow-toggle-button{padding-right:0px;padding-left:8px}}.sorter-container .arrow-toggle-button .hydrated{display:flex;justify-content:center;align-items:center}.sorter-container .arrow-toggle-button span{display:block;margin:auto;line-height:16px}.sorter-container .arrow-toggle-button .material-symbols-rounded{color:#212121}.sorter-container .dropdown-selector{display:inline-flex;position:relative;flex-grow:1}.sorter-container .dropdown-selector .dropdown-selector-button{display:inline-flex;flex-direction:row;gap:4px;padding-right:4px;align-items:center;color:#212121;width:100%}@media (max-width: 475px){.sorter-container .dropdown-selector .dropdown-selector-button .dropdown-selector-text{display:none}}.sorter-container .dropdown-selector .dropdown-selector-chevron{display:inline-flex;margin-left:auto;right:0;top:0;flex-direction:row;align-items:center;height:36px}.sorter-container .dropdown-selector .dropdown-selector-chevron .hydrated{height:24px}@media (max-width: 475px){.sorter-container .dropdown-selector .dropdown-selector-chevron{padding-right:2px}}.sorter-container .dropdown-options-list{position:absolute;top:36px;left:0;z-index:1;width:100%;line-height:21px;font-size:16px;border-radius:4px;padding-top:8px;padding-bottom:7px;box-shadow:0px 1px 5px #1111114D;box-sizing:border-box;background-color:white}@media (max-width: 475px){.sorter-container .dropdown-options-list{width:220px;padding-top:8px}}.sorter-container .dropdown-options-list .dropdown-option{padding:8px 16px;font-size:16px;line-height:21px}.sorter-container .dropdown-options-list .dropdown-option:hover,.sorter-container .dropdown-options-list .dropdown-option:focus{background-color:#e7f1f9}.sorter-container.--expanded{border-color:#1579c6}@media (max-width: 475px){.sorter-container.--expanded{border:none}}";
5
5
 
6
- const TttxSorter$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
7
- constructor() {
8
- super();
9
- this.__registerHost();
10
- this.__attachShadow();
11
- this.sorterChangeEvent = createEvent(this, "sorterChangeEvent", 7);
12
- this.sorterKey = undefined;
13
- this.defaultSortDirection = 'descending';
14
- this.fieldOptionsData = null;
15
- this.defaultOption = '';
16
- this.selectedField = this.defaultOption;
17
- this.sortDirection = this.defaultSortDirection;
18
- this.dropdownExpand = false;
19
- this.dropdownOptions = undefined;
20
- }
21
- emitSortEvent() {
22
- this.sorterChangeEvent.emit({
23
- sorterDirection: this.sortDirection,
24
- sorterKey: this.sorterKey,
25
- sortField: this.selectedField,
26
- });
27
- }
28
- onSortToggleClick(event) {
29
- event.preventDefault();
30
- if (this.sortDirection == 'ascending') {
31
- this.sortDirection = 'descending';
32
- }
33
- else {
34
- this.sortDirection = 'ascending';
35
- }
36
- this.emitSortEvent();
37
- }
38
- onDropdownClicked() {
39
- this.dropdownExpand = !this.dropdownExpand;
40
- }
41
- onDropdownSelected(event) {
42
- this.dropdownExpand = false;
43
- const target = event.target;
44
- this.selectedField = target.innerHTML;
45
- this.emitSortEvent();
46
- }
47
- // getOptionsList() {
48
- // return this.el.shadowRoot.querySelectorAll('.dropdown-option');
49
- // }
50
- // /* istanbul ignore next */
51
- // @Listen('keyup')
52
- // handleKeyDown(ev: KeyboardEvent) {
53
- // const keyboardEventValue = ev.key;
54
- // if (document.activeElement.id != `sorter__${this.sorterKey}`) return;
55
- // switch (keyboardEventValue) {
56
- // case 'Enter':
57
- // if (this._focussedElementIndex > -1) {
58
- // const options = this.el.shadowRoot.querySelectorAll('.dropdown-option');
59
- // this.selectedField = options[this._focussedElementIndex].innerHTML;
60
- // this.emitSortEvent();
61
- // }
62
- // this.dropdownExpand = false;
63
- // break;
64
- // case 'Escape':
65
- // this.dropdownExpand = false;
66
- // break;
67
- // case 'ArrowDown':
68
- // this.dropdownExpand = true;
69
- // if (this._focussedElementIndex > -1) {
70
- // const options = this.getOptionsList();
71
- // const currentOption = options[this._focussedElementIndex] as HTMLElement;
72
- // currentOption.blur();
73
- // options[this._focussedElementIndex].focus();
74
- // this._focussedElementIndex + 1 < options.length ? this._focussedElementIndex++ : (this._focussedElementIndex = 0);
75
- // } else {
76
- // this._focussedElementIndex++;
77
- // }
78
- // break;
79
- // case 'ArrowUp':
80
- // this.dropdownExpand = true;
81
- // if (this._focussedElementIndex == -1) {
82
- // const options = this.getOptionsList();
83
- // this._focussedElementIndex = options.length - 1;
84
- // } else {
85
- // const options = this.getOptionsList();
86
- // const currentOption = options[this._focussedElementIndex] as HTMLElement;
87
- // currentOption.blur();
88
- // this._focussedElementIndex > 0 ? this._focussedElementIndex-- : (this._focussedElementIndex = options.length - 1);
89
- // options[this._focussedElementIndex].focus();
90
- // }
91
- // break;
92
- // }
93
- // }
94
- render() {
95
- const parsedFieldOptionsData = typeof this.fieldOptionsData === 'string' ? JSON.parse(this.fieldOptionsData) : this.fieldOptionsData;
96
- if (!this.fieldOptionsData)
97
- return;
98
- const arrowIcon = this.sortDirection == 'ascending' ? 'arrow_upward' : 'arrow_downward';
99
- const chevronIcon = this.dropdownExpand ? 'expand_less' : 'expand_more';
100
- const selectedOption = this.selectedField;
101
- const dropdownSelectorClassNameModifier = this.dropdownExpand ? '--expanded' : '';
102
- const sorterKey = `sorter__${this.sorterKey}`;
103
- return (h(Host, { id: sorterKey }, h("div", { tabindex: 0, class: `sorter-container ${dropdownSelectorClassNameModifier}` }, h("button", { class: "arrow-toggle-button", type: "button", onClick: this.onSortToggleClick.bind(this) }, h("tttx-icon", { icon: arrowIcon, color: "black" })), h("div", { class: "dropdown-selector", onClick: this.onDropdownClicked.bind(this) }, h("div", { class: "dropdown-selector-button" }, h("div", { class: "dropdown-selector-text" }, selectedOption), h("div", { class: "dropdown-selector-chevron" }, h("tttx-icon", { icon: chevronIcon, color: "black" })))), this.dropdownExpand && (h("div", { class: "dropdown-options-list" }, parsedFieldOptionsData.sorterOptions.map(option => {
104
- return (h("div", { class: "dropdown-option", tabIndex: -1, onClick: this.onDropdownSelected.bind(this), key: option.optionLabel }, option.optionLabel));
105
- }))))));
106
- }
107
- get el() { return this; }
108
- static get style() { return tttxSorterCss; }
109
- }, [1, "tttx-sorter", {
110
- "sorterKey": [1, "sorter-key"],
111
- "defaultSortDirection": [1, "default-sort-direction"],
112
- "fieldOptionsData": [1, "field-options-data"],
113
- "defaultOption": [1, "default-option"],
114
- "selectedField": [32],
115
- "sortDirection": [32],
116
- "dropdownExpand": [32],
117
- "dropdownOptions": [32]
118
- }]);
119
- function defineCustomElement$1() {
120
- if (typeof customElements === "undefined") {
121
- return;
122
- }
123
- const components = ["tttx-sorter", "tttx-icon"];
124
- components.forEach(tagName => { switch (tagName) {
125
- case "tttx-sorter":
126
- if (!customElements.get(tagName)) {
127
- customElements.define(tagName, TttxSorter$1);
128
- }
129
- break;
130
- case "tttx-icon":
131
- if (!customElements.get(tagName)) {
132
- defineCustomElement$2();
133
- }
134
- break;
135
- } });
6
+ const TttxSorter$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
7
+ constructor() {
8
+ super();
9
+ this.__registerHost();
10
+ this.__attachShadow();
11
+ this.sorterChangeEvent = createEvent(this, "sorterChangeEvent", 7);
12
+ this.sorterKey = undefined;
13
+ this.defaultSortDirection = 'descending';
14
+ this.fieldOptionsData = null;
15
+ this.defaultOption = '';
16
+ this.selectedField = this.defaultOption;
17
+ this.sortDirection = this.defaultSortDirection;
18
+ this.dropdownExpand = false;
19
+ this.dropdownOptions = undefined;
20
+ }
21
+ emitSortEvent() {
22
+ this.sorterChangeEvent.emit({
23
+ sorterDirection: this.sortDirection,
24
+ sorterKey: this.sorterKey,
25
+ sortField: this.selectedField,
26
+ });
27
+ }
28
+ onSortToggleClick(event) {
29
+ event.preventDefault();
30
+ if (this.sortDirection == 'ascending') {
31
+ this.sortDirection = 'descending';
32
+ }
33
+ else {
34
+ this.sortDirection = 'ascending';
35
+ }
36
+ this.emitSortEvent();
37
+ }
38
+ onDropdownClicked() {
39
+ this.dropdownExpand = !this.dropdownExpand;
40
+ }
41
+ onDropdownSelected(event) {
42
+ this.dropdownExpand = false;
43
+ const target = event.target;
44
+ this.selectedField = target.innerHTML;
45
+ this.emitSortEvent();
46
+ }
47
+ // getOptionsList() {
48
+ // return this.el.shadowRoot.querySelectorAll('.dropdown-option');
49
+ // }
50
+ // /* istanbul ignore next */
51
+ // @Listen('keyup')
52
+ // handleKeyDown(ev: KeyboardEvent) {
53
+ // const keyboardEventValue = ev.key;
54
+ // if (document.activeElement.id != `sorter__${this.sorterKey}`) return;
55
+ // switch (keyboardEventValue) {
56
+ // case 'Enter':
57
+ // if (this._focussedElementIndex > -1) {
58
+ // const options = this.el.shadowRoot.querySelectorAll('.dropdown-option');
59
+ // this.selectedField = options[this._focussedElementIndex].innerHTML;
60
+ // this.emitSortEvent();
61
+ // }
62
+ // this.dropdownExpand = false;
63
+ // break;
64
+ // case 'Escape':
65
+ // this.dropdownExpand = false;
66
+ // break;
67
+ // case 'ArrowDown':
68
+ // this.dropdownExpand = true;
69
+ // if (this._focussedElementIndex > -1) {
70
+ // const options = this.getOptionsList();
71
+ // const currentOption = options[this._focussedElementIndex] as HTMLElement;
72
+ // currentOption.blur();
73
+ // options[this._focussedElementIndex].focus();
74
+ // this._focussedElementIndex + 1 < options.length ? this._focussedElementIndex++ : (this._focussedElementIndex = 0);
75
+ // } else {
76
+ // this._focussedElementIndex++;
77
+ // }
78
+ // break;
79
+ // case 'ArrowUp':
80
+ // this.dropdownExpand = true;
81
+ // if (this._focussedElementIndex == -1) {
82
+ // const options = this.getOptionsList();
83
+ // this._focussedElementIndex = options.length - 1;
84
+ // } else {
85
+ // const options = this.getOptionsList();
86
+ // const currentOption = options[this._focussedElementIndex] as HTMLElement;
87
+ // currentOption.blur();
88
+ // this._focussedElementIndex > 0 ? this._focussedElementIndex-- : (this._focussedElementIndex = options.length - 1);
89
+ // options[this._focussedElementIndex].focus();
90
+ // }
91
+ // break;
92
+ // }
93
+ // }
94
+ render() {
95
+ const parsedFieldOptionsData = typeof this.fieldOptionsData === 'string' ? JSON.parse(this.fieldOptionsData) : this.fieldOptionsData;
96
+ if (!this.fieldOptionsData)
97
+ return;
98
+ const arrowIcon = this.sortDirection == 'ascending' ? 'arrow_upward' : 'arrow_downward';
99
+ const chevronIcon = this.dropdownExpand ? 'expand_less' : 'expand_more';
100
+ const selectedOption = this.selectedField;
101
+ const dropdownSelectorClassNameModifier = this.dropdownExpand ? '--expanded' : '';
102
+ const sorterKey = `sorter__${this.sorterKey}`;
103
+ return (h(Host, { id: sorterKey }, h("div", { tabindex: 0, class: `sorter-container ${dropdownSelectorClassNameModifier}` }, h("button", { class: "arrow-toggle-button", type: "button", onClick: this.onSortToggleClick.bind(this) }, h("tttx-icon", { icon: arrowIcon, color: "black" })), h("div", { class: "dropdown-selector", onClick: this.onDropdownClicked.bind(this) }, h("div", { class: "dropdown-selector-button" }, h("div", { class: "dropdown-selector-text" }, selectedOption), h("div", { class: "dropdown-selector-chevron" }, h("tttx-icon", { icon: chevronIcon, color: "black" })))), this.dropdownExpand && (h("div", { class: "dropdown-options-list" }, parsedFieldOptionsData.sorterOptions.map(option => {
104
+ return (h("div", { class: "dropdown-option", tabIndex: -1, onClick: this.onDropdownSelected.bind(this), key: option.optionLabel }, option.optionLabel));
105
+ }))))));
106
+ }
107
+ get el() { return this; }
108
+ static get style() { return tttxSorterCss; }
109
+ }, [1, "tttx-sorter", {
110
+ "sorterKey": [1, "sorter-key"],
111
+ "defaultSortDirection": [1, "default-sort-direction"],
112
+ "fieldOptionsData": [1, "field-options-data"],
113
+ "defaultOption": [1, "default-option"],
114
+ "selectedField": [32],
115
+ "sortDirection": [32],
116
+ "dropdownExpand": [32],
117
+ "dropdownOptions": [32]
118
+ }]);
119
+ function defineCustomElement$1() {
120
+ if (typeof customElements === "undefined") {
121
+ return;
122
+ }
123
+ const components = ["tttx-sorter", "tttx-icon"];
124
+ components.forEach(tagName => { switch (tagName) {
125
+ case "tttx-sorter":
126
+ if (!customElements.get(tagName)) {
127
+ customElements.define(tagName, TttxSorter$1);
128
+ }
129
+ break;
130
+ case "tttx-icon":
131
+ if (!customElements.get(tagName)) {
132
+ defineCustomElement$2();
133
+ }
134
+ break;
135
+ } });
136
136
  }
137
137
 
138
138
  const TttxSorter = TttxSorter$1;
@@ -3,136 +3,136 @@ import { d as defineCustomElement$2 } from './tttx-icon2.js';
3
3
 
4
4
  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-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:normal;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}.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}.input-icon.sc-tttx-standalone-input{position:absolute;margin-top:9px;margin-left:4px}.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;line-height:16px;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;line-height:19px;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.inputInline.sc-tttx-standalone-input{display:flex;white-space:nowrap;align-items:center}label.inputInline.sc-tttx-standalone-input .input-container.sc-tttx-standalone-input{margin:0 4px;width:100%;display:flex;align-items:center;gap:4px;position:relative}label.sc-tttx-standalone-input{font-weight:500;font-size:16px;line-height:19px;margin-bottom: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;line-height:19px;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}@media (max-width: 600px){input[type=date].sc-tttx-standalone-input{padding-top:6px}}input.invalid.sc-tttx-standalone-input:invalid,input.standalone.invalid.sc-tttx-standalone-input{border:1px solid #dc0000}.input-icon.sc-tttx-standalone-input~input.sc-tttx-standalone-input{padding:0 32px}input.sc-tttx-standalone-input~.errorBubble.sc-tttx-standalone-input{position:relative;font-size:14px;line-height:16px;font-weight:normal;width:100%;font-family:\"Roboto\", sans-serif;color:#dc0000;display:flex;align-content:center;align-items:center;justify-items:center;margin-top:4px}input.sc-tttx-standalone-input~.errorBubble.sc-tttx-standalone-input:not(.visible){display:none}input.sc-tttx-standalone-input~.errorBubble.sc-tttx-standalone-input span.sc-tttx-standalone-input{color:#dc0000;font-size:16px;margin-right:4px}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}input.sc-tttx-standalone-input:focus{border-color:#1479c6}input.sc-tttx-standalone-input:focus-visible{outline:none}.secondarylabel.sc-tttx-standalone-input{color:#757575;font-size:14px;line-height:16px;font-weight:normal;display:flex;margin-top:4px}label.inputBlock.readonly.sc-tttx-standalone-input{pointer-events:none;user-select:none;color:gray}input[readonly].sc-tttx-standalone-input{cursor:default;pointer-events:none;user-select:none;color:gray}.sc-tttx-standalone-input-h{display:block}.input-container.sc-tttx-standalone-input{position:relative}#icon-left.sc-tttx-standalone-input{position:absolute;left:8px;top:10px}#icon-left.sc-tttx-standalone-input~input.sc-tttx-standalone-input{padding-left:36px}#icon-right.sc-tttx-standalone-input{position:absolute;right:8px;top:10px}#icon-right.sc-tttx-standalone-input~input.sc-tttx-standalone-input{padding-right:36px}";
5
5
 
6
- const TttxInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
7
- constructor() {
8
- super();
9
- this.__registerHost();
10
- this.valueChanged = createEvent(this, "valueChanged", 7);
11
- this.focusChanged = createEvent(this, "focusChanged", 7);
12
- this.blurChanged = createEvent(this, "blurChanged", 7);
13
- this.invalidChanged = createEvent(this, "invalidChanged", 7);
14
- this.inputIconClick = createEvent(this, "inputIconClick", 7);
15
- this.leftIconClick = createEvent(this, "leftIconClick", 7);
16
- this.rightIconClick = createEvent(this, "rightIconClick", 7);
17
- this.label = undefined;
18
- this.secondarylabel = undefined;
19
- this.showerrormsg = undefined;
20
- this.showerrorbubble = true;
21
- this.errormsg = undefined;
22
- this.iconleft = undefined;
23
- this.iconleftcolor = 'grey';
24
- this.iconright = undefined;
25
- this.iconrightcolor = 'grey';
26
- this.inputicon = undefined;
27
- this.inputiconcolor = 'grey';
28
- this.inline = undefined;
29
- this.inputautocapitalize = undefined;
30
- this.inputautofocus = undefined;
31
- this.inputkeyhint = undefined;
32
- this.inputindex = undefined;
33
- this.inputtitle = undefined;
34
- this.autocomplete = undefined;
35
- this.checked = undefined;
36
- this.disabled = undefined;
37
- this.max = undefined;
38
- this.maxlength = undefined;
39
- this.min = undefined;
40
- this.minlength = undefined;
41
- this.name = undefined;
42
- this.pattern = undefined;
43
- this.placeholder = undefined;
44
- this.readonly = undefined;
45
- this.required = undefined;
46
- this.step = undefined;
47
- this.type = 'text';
48
- this.value = undefined;
49
- }
50
- handleChange(event) {
51
- const target = event.target;
52
- this.value = target.value;
53
- this.valueChanged.emit(target.value);
54
- }
55
- handleFocus(event) {
56
- const target = event.target;
57
- this.focusChanged.emit(target.value);
58
- }
59
- handleBlur(event) {
60
- const target = event.target;
61
- this.blurChanged.emit(target.value);
62
- }
63
- handleInvalid(event) {
64
- event.preventDefault();
65
- const target = event.target;
66
- this.invalidChanged.emit(target.value);
67
- }
68
- handleInputIconClick(event) {
69
- event.preventDefault();
70
- this.inputIconClick.emit();
71
- }
72
- handleLeftIconClick(event) {
73
- event.preventDefault();
74
- this.leftIconClick.emit();
75
- }
76
- handleRightIconClick(event) {
77
- event.preventDefault();
78
- this.rightIconClick.emit();
79
- }
80
- render() {
81
- const classNames = ['standalone', this.showerrormsg ? 'invalid' : ''].join(' ');
82
- return (h(Host, null, h("label", { class: this.inline ? 'inputInline' : 'inputBlock' }, this.label, !this.required ? h("span", { class: "optional" }, "\u00A0(optional)") : '', h("div", { class: "input-container" }, this.inputicon && (h("tttx-icon", { class: "input-icon", icon: this.inputicon, color: this.inputiconcolor, onClick: this.handleInputIconClick.bind(this) })), this.iconleft && (h("tttx-icon", { id: "icon-left", icon: this.iconleft, color: this.iconleftcolor, onClick: this.handleLeftIconClick.bind(this) })), this.iconright && (h("tttx-icon", { id: "icon-right", icon: this.iconright, color: this.iconrightcolor, onClick: this.handleRightIconClick.bind(this) })), h("input", { class: classNames, autocapitalize: this.inputautocapitalize, autofocus: this.inputautofocus, enterkeyhint: this.inputkeyhint, tabindex: this.inputindex, title: this.inputtitle, autocomplete: this.autocomplete, checked: this.checked, disabled: this.disabled, max: this.max, maxlength: this.maxlength, min: this.min, minlength: this.minlength, name: this.name, pattern: this.pattern, placeholder: this.placeholder, readonly: this.readonly, required: this.required, step: this.step, type: this.type, value: this.value, onBlur: this.handleBlur.bind(this), onFocus: this.handleFocus.bind(this), onInput: this.handleChange.bind(this), onInvalid: this.handleInvalid.bind(this) }), this.secondarylabel && h("span", { class: "secondarylabel" }, this.secondarylabel), this.showerrorbubble && (h("span", { class: ['errorBubble', this.showerrormsg && this.errormsg ? 'visible' : ''].join(' ') }, h("span", { class: "material-symbols-rounded validationicon" }, "warning"), " ", this.errormsg))))));
83
- }
84
- static get style() { return tttxStandaloneInputCss; }
85
- }, [2, "tttx-standalone-input", {
86
- "label": [1],
87
- "secondarylabel": [1],
88
- "showerrormsg": [4],
89
- "showerrorbubble": [4],
90
- "errormsg": [1],
91
- "iconleft": [1],
92
- "iconleftcolor": [1],
93
- "iconright": [1],
94
- "iconrightcolor": [1],
95
- "inputicon": [1],
96
- "inputiconcolor": [1],
97
- "inline": [4],
98
- "inputautocapitalize": [1],
99
- "inputautofocus": [4],
100
- "inputkeyhint": [1],
101
- "inputindex": [8],
102
- "inputtitle": [1],
103
- "autocomplete": [1],
104
- "checked": [4],
105
- "disabled": [4],
106
- "max": [8],
107
- "maxlength": [8],
108
- "min": [8],
109
- "minlength": [8],
110
- "name": [1],
111
- "pattern": [1],
112
- "placeholder": [1],
113
- "readonly": [8],
114
- "required": [4],
115
- "step": [8],
116
- "type": [1],
117
- "value": [1032]
118
- }]);
119
- function defineCustomElement$1() {
120
- if (typeof customElements === "undefined") {
121
- return;
122
- }
123
- const components = ["tttx-standalone-input", "tttx-icon"];
124
- components.forEach(tagName => { switch (tagName) {
125
- case "tttx-standalone-input":
126
- if (!customElements.get(tagName)) {
127
- customElements.define(tagName, TttxInput);
128
- }
129
- break;
130
- case "tttx-icon":
131
- if (!customElements.get(tagName)) {
132
- defineCustomElement$2();
133
- }
134
- break;
135
- } });
6
+ const TttxInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
7
+ constructor() {
8
+ super();
9
+ this.__registerHost();
10
+ this.valueChanged = createEvent(this, "valueChanged", 7);
11
+ this.focusChanged = createEvent(this, "focusChanged", 7);
12
+ this.blurChanged = createEvent(this, "blurChanged", 7);
13
+ this.invalidChanged = createEvent(this, "invalidChanged", 7);
14
+ this.inputIconClick = createEvent(this, "inputIconClick", 7);
15
+ this.leftIconClick = createEvent(this, "leftIconClick", 7);
16
+ this.rightIconClick = createEvent(this, "rightIconClick", 7);
17
+ this.label = undefined;
18
+ this.secondarylabel = undefined;
19
+ this.showerrormsg = undefined;
20
+ this.showerrorbubble = true;
21
+ this.errormsg = undefined;
22
+ this.iconleft = undefined;
23
+ this.iconleftcolor = 'grey';
24
+ this.iconright = undefined;
25
+ this.iconrightcolor = 'grey';
26
+ this.inputicon = undefined;
27
+ this.inputiconcolor = 'grey';
28
+ this.inline = undefined;
29
+ this.inputautocapitalize = undefined;
30
+ this.inputautofocus = undefined;
31
+ this.inputkeyhint = undefined;
32
+ this.inputindex = undefined;
33
+ this.inputtitle = undefined;
34
+ this.autocomplete = undefined;
35
+ this.checked = undefined;
36
+ this.disabled = undefined;
37
+ this.max = undefined;
38
+ this.maxlength = undefined;
39
+ this.min = undefined;
40
+ this.minlength = undefined;
41
+ this.name = undefined;
42
+ this.pattern = undefined;
43
+ this.placeholder = undefined;
44
+ this.readonly = undefined;
45
+ this.required = undefined;
46
+ this.step = undefined;
47
+ this.type = 'text';
48
+ this.value = undefined;
49
+ }
50
+ handleChange(event) {
51
+ const target = event.target;
52
+ this.value = target.value;
53
+ this.valueChanged.emit(target.value);
54
+ }
55
+ handleFocus(event) {
56
+ const target = event.target;
57
+ this.focusChanged.emit(target.value);
58
+ }
59
+ handleBlur(event) {
60
+ const target = event.target;
61
+ this.blurChanged.emit(target.value);
62
+ }
63
+ handleInvalid(event) {
64
+ event.preventDefault();
65
+ const target = event.target;
66
+ this.invalidChanged.emit(target.value);
67
+ }
68
+ handleInputIconClick(event) {
69
+ event.preventDefault();
70
+ this.inputIconClick.emit();
71
+ }
72
+ handleLeftIconClick(event) {
73
+ event.preventDefault();
74
+ this.leftIconClick.emit();
75
+ }
76
+ handleRightIconClick(event) {
77
+ event.preventDefault();
78
+ this.rightIconClick.emit();
79
+ }
80
+ render() {
81
+ const classNames = ['standalone', this.showerrormsg ? 'invalid' : ''].join(' ');
82
+ return (h(Host, null, h("label", { class: this.inline ? 'inputInline' : 'inputBlock' }, this.label, !this.required ? h("span", { class: "optional" }, "\u00A0(optional)") : '', h("div", { class: "input-container" }, this.inputicon && (h("tttx-icon", { class: "input-icon", icon: this.inputicon, color: this.inputiconcolor, onClick: this.handleInputIconClick.bind(this) })), this.iconleft && (h("tttx-icon", { id: "icon-left", icon: this.iconleft, color: this.iconleftcolor, onClick: this.handleLeftIconClick.bind(this) })), this.iconright && (h("tttx-icon", { id: "icon-right", icon: this.iconright, color: this.iconrightcolor, onClick: this.handleRightIconClick.bind(this) })), h("input", { class: classNames, autocapitalize: this.inputautocapitalize, autofocus: this.inputautofocus, enterkeyhint: this.inputkeyhint, tabindex: this.inputindex, title: this.inputtitle, autocomplete: this.autocomplete, checked: this.checked, disabled: this.disabled, max: this.max, maxlength: this.maxlength, min: this.min, minlength: this.minlength, name: this.name, pattern: this.pattern, placeholder: this.placeholder, readonly: this.readonly, required: this.required, step: this.step, type: this.type, value: this.value, onBlur: this.handleBlur.bind(this), onFocus: this.handleFocus.bind(this), onInput: this.handleChange.bind(this), onInvalid: this.handleInvalid.bind(this) }), this.secondarylabel && h("span", { class: "secondarylabel" }, this.secondarylabel), this.showerrorbubble && (h("span", { class: ['errorBubble', this.showerrormsg && this.errormsg ? 'visible' : ''].join(' ') }, h("span", { class: "material-symbols-rounded validationicon" }, "warning"), " ", this.errormsg))))));
83
+ }
84
+ static get style() { return tttxStandaloneInputCss; }
85
+ }, [2, "tttx-standalone-input", {
86
+ "label": [1],
87
+ "secondarylabel": [1],
88
+ "showerrormsg": [4],
89
+ "showerrorbubble": [4],
90
+ "errormsg": [1],
91
+ "iconleft": [1],
92
+ "iconleftcolor": [1],
93
+ "iconright": [1],
94
+ "iconrightcolor": [1],
95
+ "inputicon": [1],
96
+ "inputiconcolor": [1],
97
+ "inline": [4],
98
+ "inputautocapitalize": [1],
99
+ "inputautofocus": [4],
100
+ "inputkeyhint": [1],
101
+ "inputindex": [8],
102
+ "inputtitle": [1],
103
+ "autocomplete": [1],
104
+ "checked": [4],
105
+ "disabled": [4],
106
+ "max": [8],
107
+ "maxlength": [8],
108
+ "min": [8],
109
+ "minlength": [8],
110
+ "name": [1],
111
+ "pattern": [1],
112
+ "placeholder": [1],
113
+ "readonly": [8],
114
+ "required": [4],
115
+ "step": [8],
116
+ "type": [1],
117
+ "value": [1032]
118
+ }]);
119
+ function defineCustomElement$1() {
120
+ if (typeof customElements === "undefined") {
121
+ return;
122
+ }
123
+ const components = ["tttx-standalone-input", "tttx-icon"];
124
+ components.forEach(tagName => { switch (tagName) {
125
+ case "tttx-standalone-input":
126
+ if (!customElements.get(tagName)) {
127
+ customElements.define(tagName, TttxInput);
128
+ }
129
+ break;
130
+ case "tttx-icon":
131
+ if (!customElements.get(tagName)) {
132
+ defineCustomElement$2();
133
+ }
134
+ break;
135
+ } });
136
136
  }
137
137
 
138
138
  const TttxStandaloneInput = TttxInput;