@3t-transform/threeteeui 0.1.3 → 0.1.5

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 (101) hide show
  1. package/dist/cjs/{index-451f61dd.js → index-906c2757.js} +102 -3
  2. package/dist/cjs/loader.cjs.js +4 -3
  3. package/dist/cjs/{tttx-button.cjs.entry.js → tttx-button_2.cjs.entry.js} +50 -24
  4. package/dist/cjs/tttx-form.cjs.entry.js +364 -364
  5. package/dist/cjs/tttx-keyvalue-block.cjs.entry.js +57 -57
  6. package/dist/cjs/tttx-list.cjs.entry.js +43 -43
  7. package/dist/cjs/tttx-loading-spinner.cjs.entry.js +16 -16
  8. package/dist/cjs/tttx-standalone-input.cjs.entry.js +58 -61
  9. package/dist/cjs/tttx.cjs.js +7 -3
  10. package/dist/collection/collection-manifest.json +2 -2
  11. package/dist/collection/components/atoms/tttx-button/tttx-button.js +116 -110
  12. package/dist/collection/components/atoms/tttx-button/tttx-button.stories.js +14 -14
  13. package/dist/collection/components/atoms/tttx-icon/tttx-icon.css +0 -4
  14. package/dist/collection/components/atoms/tttx-icon/tttx-icon.js +62 -62
  15. package/dist/collection/components/atoms/tttx-icon/tttx-icon.stories.js +22 -22
  16. package/dist/collection/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.js +107 -107
  17. package/dist/collection/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.stories.js +38 -38
  18. package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.js +67 -67
  19. package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.stories.js +17 -17
  20. package/dist/collection/components/molecules/tttx-form/lib/setErrorState.js +35 -35
  21. package/dist/collection/components/molecules/tttx-form/lib/validityCheck.js +58 -58
  22. package/dist/collection/components/molecules/tttx-form/tttx-form.css +3 -26
  23. package/dist/collection/components/molecules/tttx-form/tttx-form.js +364 -364
  24. package/dist/collection/components/molecules/tttx-form/tttx-form.stories.js +127 -127
  25. package/dist/collection/components/molecules/tttx-list/tttx-list.js +105 -105
  26. package/dist/collection/components/molecules/tttx-list/tttx-list.stories.js +43 -43
  27. package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.css +3 -26
  28. package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.js +572 -627
  29. package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.stories.js +135 -148
  30. package/dist/collection/components/palette.stories.js +7 -7
  31. package/dist/collection/docs/gettingstarted-developer.stories.js +5 -5
  32. package/dist/collection/icons.js +2838 -2838
  33. package/dist/collection/index.js +1 -1
  34. package/dist/collection/shared/domsanitiser.options.js +14 -14
  35. package/dist/collection/transform-tag-name.js +5 -0
  36. package/dist/components/index.d.ts +9 -0
  37. package/dist/components/index.js +1 -1
  38. package/dist/components/tttx-button.js +59 -48
  39. package/dist/components/tttx-form.js +381 -381
  40. package/dist/components/tttx-icon2.js +29 -29
  41. package/dist/components/tttx-keyvalue-block.js +74 -74
  42. package/dist/components/tttx-list.js +65 -65
  43. package/dist/components/tttx-loading-spinner.js +33 -33
  44. package/dist/components/tttx-standalone-input.js +102 -108
  45. package/dist/esm/{index-0350f122.js → index-4010ad69.js} +101 -4
  46. package/dist/esm/loader.js +4 -3
  47. package/dist/esm/polyfills/core-js.js +0 -0
  48. package/dist/esm/polyfills/css-shim.js +1 -1
  49. package/dist/esm/polyfills/dom.js +0 -0
  50. package/dist/esm/polyfills/es5-html-element.js +0 -0
  51. package/dist/esm/polyfills/index.js +0 -0
  52. package/dist/esm/polyfills/system.js +0 -0
  53. package/dist/esm/{tttx-button.entry.js → tttx-button_2.entry.js} +50 -25
  54. package/dist/esm/tttx-form.entry.js +364 -364
  55. package/dist/esm/tttx-keyvalue-block.entry.js +57 -57
  56. package/dist/esm/tttx-list.entry.js +43 -43
  57. package/dist/esm/tttx-loading-spinner.entry.js +16 -16
  58. package/dist/esm/tttx-standalone-input.entry.js +58 -61
  59. package/dist/esm/tttx.js +4 -3
  60. package/dist/tttx/p-083eeedc.entry.js +1 -0
  61. package/dist/tttx/{p-1b015a9d.entry.js → p-3281444a.entry.js} +1 -1
  62. package/dist/tttx/p-5687f4ad.js +2 -0
  63. package/dist/tttx/p-5c9a1626.entry.js +3 -0
  64. package/dist/tttx/p-931e42c9.entry.js +1 -0
  65. package/dist/tttx/p-b5c1dd86.entry.js +1 -0
  66. package/dist/tttx/{p-a0179cb1.entry.js → p-dab7ee1b.entry.js} +1 -1
  67. package/dist/tttx/tttx.esm.js +1 -1
  68. package/dist/types/components/atoms/tttx-button/tttx-button.d.ts +13 -10
  69. package/dist/types/components/atoms/tttx-button/tttx-button.stories.d.ts +10 -10
  70. package/dist/types/components/atoms/tttx-icon/tttx-icon.d.ts +5 -5
  71. package/dist/types/components/atoms/tttx-icon/tttx-icon.stories.d.ts +20 -20
  72. package/dist/types/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.d.ts +7 -7
  73. package/dist/types/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.stories.d.ts +9 -9
  74. package/dist/types/components/atoms/tttx-loading-spinner/tttx-loading-spinner.d.ts +6 -6
  75. package/dist/types/components/atoms/tttx-loading-spinner/tttx-loading-spinner.stories.d.ts +17 -17
  76. package/dist/types/components/molecules/tttx-form/lib/setErrorState.d.ts +13 -13
  77. package/dist/types/components/molecules/tttx-form/lib/validityCheck.d.ts +17 -17
  78. package/dist/types/components/molecules/tttx-form/tttx-form.d.ts +114 -114
  79. package/dist/types/components/molecules/tttx-form/tttx-form.stories.d.ts +13 -13
  80. package/dist/types/components/molecules/tttx-list/tttx-list.d.ts +11 -11
  81. package/dist/types/components/molecules/tttx-list/tttx-list.stories.d.ts +14 -14
  82. package/dist/types/components/molecules/tttx-standalone-input/tttx-standalone-input.d.ts +53 -56
  83. package/dist/types/components/molecules/tttx-standalone-input/tttx-standalone-input.stories.d.ts +106 -122
  84. package/dist/types/components/palette.stories.d.ts +6 -6
  85. package/dist/types/components.d.ts +0 -6
  86. package/dist/types/docs/gettingstarted-developer.stories.d.ts +5 -5
  87. package/dist/types/icons.d.ts +2 -2
  88. package/dist/types/index.d.ts +1 -1
  89. package/dist/types/shared/domsanitiser.options.d.ts +10 -10
  90. package/dist/types/stencil-public-runtime.d.ts +59 -3
  91. package/dist/types/transform-tag-name.d.ts +1 -0
  92. package/loader/index.d.ts +9 -0
  93. package/package.json +1 -1
  94. package/dist/cjs/tttx-icon.cjs.entry.js +0 -21
  95. package/dist/esm/tttx-icon.entry.js +0 -17
  96. package/dist/tttx/p-4f3958fa.entry.js +0 -1
  97. package/dist/tttx/p-62869344.js +0 -2
  98. package/dist/tttx/p-92465671.entry.js +0 -1
  99. package/dist/tttx/p-bfdf5c4e.entry.js +0 -1
  100. package/dist/tttx/p-c773116b.entry.js +0 -1
  101. package/dist/tttx/p-cd1565e0.entry.js +0 -3
@@ -1,35 +1,35 @@
1
1
  import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
2
 
3
- const tttxIconCss = ".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:inline-block;cursor:default;user-select:none}.icon-size{width:24px;height:24px}.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}.darkred{color:#A20000}.orange{color:#f59500}.blue{color:#1479c6}.green{color:#a2bb31}.gray{color:#757575}.black{color:#212121}.white{color:white}";
3
+ const tttxIconCss = ".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:inline-block;cursor:default;user-select:none}.icon-size{width:24px;height:24px}.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}";
4
4
 
5
- const TttxIcon = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
6
- constructor() {
7
- super();
8
- this.__registerHost();
9
- this.__attachShadow();
10
- this.icon = undefined;
11
- this.color = 'grey';
12
- }
13
- render() {
14
- return (h(Host, null, h("span", { class: `material-symbols-rounded ${this.color ? this.color : ''}` }, this.icon)));
15
- }
16
- static get style() { return tttxIconCss; }
17
- }, [1, "tttx-icon", {
18
- "icon": [1],
19
- "color": [1]
20
- }]);
21
- function defineCustomElement() {
22
- if (typeof customElements === "undefined") {
23
- return;
24
- }
25
- const components = ["tttx-icon"];
26
- components.forEach(tagName => { switch (tagName) {
27
- case "tttx-icon":
28
- if (!customElements.get(tagName)) {
29
- customElements.define(tagName, TttxIcon);
30
- }
31
- break;
32
- } });
5
+ const TttxIcon = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
6
+ constructor() {
7
+ super();
8
+ this.__registerHost();
9
+ this.__attachShadow();
10
+ this.icon = undefined;
11
+ this.color = 'grey';
12
+ }
13
+ render() {
14
+ return (h(Host, null, h("span", { class: `material-symbols-rounded ${this.color ? this.color : ''}` }, this.icon)));
15
+ }
16
+ static get style() { return tttxIconCss; }
17
+ }, [1, "tttx-icon", {
18
+ "icon": [1],
19
+ "color": [1]
20
+ }]);
21
+ function defineCustomElement() {
22
+ if (typeof customElements === "undefined") {
23
+ return;
24
+ }
25
+ const components = ["tttx-icon"];
26
+ components.forEach(tagName => { switch (tagName) {
27
+ case "tttx-icon":
28
+ if (!customElements.get(tagName)) {
29
+ customElements.define(tagName, TttxIcon);
30
+ }
31
+ break;
32
+ } });
33
33
  }
34
34
 
35
35
  export { TttxIcon as T, defineCustomElement as d };
@@ -2,80 +2,80 @@ import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal
2
2
 
3
3
  const tttxKeyvalueBlockCss = ":host{display:block}dl{margin:0;padding:0;font-family:\"Roboto\", sans-serif;cursor:default}dt{font-weight:400;line-height:21px;font-size:16px}dt,dt.subTitle{color:#757575}dt.mainTitle{color:#212121}dd{margin:0;font-weight:400;font-size:16px;color:#212121;line-height:21px;margin-bottom:18px}dl.horizontal{display:flex;flex-direction:row;width:100%}dl.horizontal div{flex-grow:1}@media (max-width: 769px){dl.horizontal{flex-wrap:wrap}dl.horizontal div{width:50%}}@media (max-width: 600px){dl.horizontal div{width:100%}}";
4
4
 
5
- const TttxKeyvalueBlock$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
6
- constructor() {
7
- super();
8
- this.__registerHost();
9
- this.__attachShadow();
10
- this.keyvalues = undefined;
11
- this.horizontal = undefined;
12
- }
13
- renderSingleElements(values) {
14
- const keys = Object.keys(values);
15
- const elements = [];
16
- for (let i = 0; i < keys.length; i++) {
17
- if (this.horizontal) {
18
- elements.push(h("div", null, h("dt", null, keys[i]), h("dd", null, values[keys[i]])));
19
- }
20
- else {
21
- elements.push(h("dt", null, keys[i]));
22
- elements.push(h("dd", null, values[keys[i]]));
23
- }
24
- }
25
- return elements;
26
- }
27
- renderArrayElements(values) {
28
- const elements = [];
29
- for (let i = 0; i < values.length; i++) {
30
- const value = values[i];
31
- if (this.horizontal) {
32
- elements.push(h("div", null, h("dt", { class: 'mainTitle' }, value.title), h("dt", { class: 'subTitle' }, value.subTitle), h("dd", null, value.data)));
33
- }
34
- else {
35
- elements.push(h("dt", { class: 'mainTitle' }, value.title));
36
- elements.push(h("dt", { class: 'subTitle' }, value.subTitle));
37
- elements.push(h("dd", null, value.data));
38
- }
39
- }
40
- return elements;
41
- }
42
- render() {
43
- if (!this.keyvalues) {
44
- return;
45
- }
46
- let values;
47
- if (typeof this.keyvalues === 'string') {
48
- values = JSON.parse(this.keyvalues);
49
- }
50
- else {
51
- values = this.keyvalues;
52
- }
53
- let elements;
54
- if (Array.isArray(values)) {
55
- elements = this.renderArrayElements(values);
56
- }
57
- else {
58
- elements = this.renderSingleElements(values);
59
- }
60
- return (h(Host, null, h("dl", { class: this.horizontal ? 'horizontal' : null }, elements)));
61
- }
62
- static get style() { return tttxKeyvalueBlockCss; }
63
- }, [1, "tttx-keyvalue-block", {
64
- "keyvalues": [8],
65
- "horizontal": [4]
66
- }]);
67
- function defineCustomElement$1() {
68
- if (typeof customElements === "undefined") {
69
- return;
70
- }
71
- const components = ["tttx-keyvalue-block"];
72
- components.forEach(tagName => { switch (tagName) {
73
- case "tttx-keyvalue-block":
74
- if (!customElements.get(tagName)) {
75
- customElements.define(tagName, TttxKeyvalueBlock$1);
76
- }
77
- break;
78
- } });
5
+ const TttxKeyvalueBlock$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
6
+ constructor() {
7
+ super();
8
+ this.__registerHost();
9
+ this.__attachShadow();
10
+ this.keyvalues = undefined;
11
+ this.horizontal = undefined;
12
+ }
13
+ renderSingleElements(values) {
14
+ const keys = Object.keys(values);
15
+ const elements = [];
16
+ for (let i = 0; i < keys.length; i++) {
17
+ if (this.horizontal) {
18
+ elements.push(h("div", null, h("dt", null, keys[i]), h("dd", null, values[keys[i]])));
19
+ }
20
+ else {
21
+ elements.push(h("dt", null, keys[i]));
22
+ elements.push(h("dd", null, values[keys[i]]));
23
+ }
24
+ }
25
+ return elements;
26
+ }
27
+ renderArrayElements(values) {
28
+ const elements = [];
29
+ for (let i = 0; i < values.length; i++) {
30
+ const value = values[i];
31
+ if (this.horizontal) {
32
+ elements.push(h("div", null, h("dt", { class: 'mainTitle' }, value.title), h("dt", { class: 'subTitle' }, value.subTitle), h("dd", null, value.data)));
33
+ }
34
+ else {
35
+ elements.push(h("dt", { class: 'mainTitle' }, value.title));
36
+ elements.push(h("dt", { class: 'subTitle' }, value.subTitle));
37
+ elements.push(h("dd", null, value.data));
38
+ }
39
+ }
40
+ return elements;
41
+ }
42
+ render() {
43
+ if (!this.keyvalues) {
44
+ return;
45
+ }
46
+ let values;
47
+ if (typeof this.keyvalues === 'string') {
48
+ values = JSON.parse(this.keyvalues);
49
+ }
50
+ else {
51
+ values = this.keyvalues;
52
+ }
53
+ let elements;
54
+ if (Array.isArray(values)) {
55
+ elements = this.renderArrayElements(values);
56
+ }
57
+ else {
58
+ elements = this.renderSingleElements(values);
59
+ }
60
+ return (h(Host, null, h("dl", { class: this.horizontal ? 'horizontal' : null }, elements)));
61
+ }
62
+ static get style() { return tttxKeyvalueBlockCss; }
63
+ }, [1, "tttx-keyvalue-block", {
64
+ "keyvalues": [8],
65
+ "horizontal": [4]
66
+ }]);
67
+ function defineCustomElement$1() {
68
+ if (typeof customElements === "undefined") {
69
+ return;
70
+ }
71
+ const components = ["tttx-keyvalue-block"];
72
+ components.forEach(tagName => { switch (tagName) {
73
+ case "tttx-keyvalue-block":
74
+ if (!customElements.get(tagName)) {
75
+ customElements.define(tagName, TttxKeyvalueBlock$1);
76
+ }
77
+ break;
78
+ } });
79
79
  }
80
80
 
81
81
  const TttxKeyvalueBlock = TttxKeyvalueBlock$1;
@@ -1650,75 +1650,75 @@ var purify = createCommonjsModule(function (module, exports) {
1650
1650
  //# sourceMappingURL=purify.js.map
1651
1651
  });
1652
1652
 
1653
- function tagRegXp(tagName) {
1654
- return RegExp(/^tttx-/).exec(tagName);
1655
- }
1656
- function attributeNameCheck() {
1657
- return true;
1658
- }
1659
- const domSanitiserOptions = {
1660
- CUSTOM_ELEMENT_HANDLING: {
1661
- tagNameCheck: tagRegXp,
1662
- attributeNameCheck: attributeNameCheck,
1663
- allowCustomizedBuiltInElements: false, // customized built-ins are not allowed
1664
- }
1653
+ function tagRegXp(tagName) {
1654
+ return RegExp(/^tttx-/).exec(tagName);
1655
+ }
1656
+ function attributeNameCheck() {
1657
+ return true;
1658
+ }
1659
+ const domSanitiserOptions = {
1660
+ CUSTOM_ELEMENT_HANDLING: {
1661
+ tagNameCheck: tagRegXp,
1662
+ attributeNameCheck: attributeNameCheck,
1663
+ allowCustomizedBuiltInElements: false, // customized built-ins are not allowed
1664
+ }
1665
1665
  };
1666
1666
 
1667
1667
  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}.list{margin:0;padding:0}.item{list-style:none;margin:0;padding:8px;border-bottom:1px solid #d5d5d5;min-height:36px;display:flex;align-items:center}.item:first-of-type{border-top:1px solid #d5d5d5}.item.clickable:hover{cursor:pointer}.item.clickable:active{background-color:#e6e6e6}.align-right{margin-left:auto}.item-content{display:flex;align-items:center}";
1668
1668
 
1669
- const TttxList$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
1670
- constructor() {
1671
- super();
1672
- this.__registerHost();
1673
- this.__attachShadow();
1674
- this.rowClick = createEvent(this, "listRowClick", 7);
1675
- this.data = undefined;
1676
- this.name = undefined;
1677
- }
1678
- onRowClickHandler(item) {
1679
- if (!item.clickable || !item.rowData)
1680
- return;
1681
- this.rowClick.emit({ name: this.name, data: item.rowData });
1682
- }
1683
- renderListItem(item) {
1684
- const cleanHTML = purify.sanitize(item.element, domSanitiserOptions);
1685
- return (h("li", { class: `item ${item.clickable ? 'clickable' : ''}`, onClick: () => {
1686
- this.onRowClickHandler(item);
1687
- } }, item.element && h("span", { class: "item-content", innerHTML: cleanHTML }), item.icon && h("tttx-icon", { class: "align-right ", icon: item.icon })));
1688
- }
1689
- render() {
1690
- if (!this.data)
1691
- return;
1692
- if (typeof this.data === 'string') {
1693
- this._data = JSON.parse(this.data);
1694
- }
1695
- else {
1696
- this._data = this.data;
1697
- }
1698
- return h("ul", { class: "list" }, this._data.map((item) => this.renderListItem(item)));
1699
- }
1700
- static get style() { return tttxListCss; }
1701
- }, [1, "tttx-list", {
1702
- "data": [1025],
1703
- "name": [1]
1704
- }]);
1705
- function defineCustomElement$1() {
1706
- if (typeof customElements === "undefined") {
1707
- return;
1708
- }
1709
- const components = ["tttx-list", "tttx-icon"];
1710
- components.forEach(tagName => { switch (tagName) {
1711
- case "tttx-list":
1712
- if (!customElements.get(tagName)) {
1713
- customElements.define(tagName, TttxList$1);
1714
- }
1715
- break;
1716
- case "tttx-icon":
1717
- if (!customElements.get(tagName)) {
1718
- defineCustomElement$2();
1719
- }
1720
- break;
1721
- } });
1669
+ const TttxList$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
1670
+ constructor() {
1671
+ super();
1672
+ this.__registerHost();
1673
+ this.__attachShadow();
1674
+ this.rowClick = createEvent(this, "listRowClick", 7);
1675
+ this.data = undefined;
1676
+ this.name = undefined;
1677
+ }
1678
+ onRowClickHandler(item) {
1679
+ if (!item.clickable || !item.rowData)
1680
+ return;
1681
+ this.rowClick.emit({ name: this.name, data: item.rowData });
1682
+ }
1683
+ renderListItem(item) {
1684
+ const cleanHTML = purify.sanitize(item.element, domSanitiserOptions);
1685
+ return (h("li", { class: `item ${item.clickable ? 'clickable' : ''}`, onClick: () => {
1686
+ this.onRowClickHandler(item);
1687
+ } }, item.element && h("span", { class: "item-content", innerHTML: cleanHTML }), item.icon && h("tttx-icon", { class: "align-right ", icon: item.icon })));
1688
+ }
1689
+ render() {
1690
+ if (!this.data)
1691
+ return;
1692
+ if (typeof this.data === 'string') {
1693
+ this._data = JSON.parse(this.data);
1694
+ }
1695
+ else {
1696
+ this._data = this.data;
1697
+ }
1698
+ return h("ul", { class: "list" }, this._data.map((item) => this.renderListItem(item)));
1699
+ }
1700
+ static get style() { return tttxListCss; }
1701
+ }, [1, "tttx-list", {
1702
+ "data": [1025],
1703
+ "name": [1]
1704
+ }]);
1705
+ function defineCustomElement$1() {
1706
+ if (typeof customElements === "undefined") {
1707
+ return;
1708
+ }
1709
+ const components = ["tttx-list", "tttx-icon"];
1710
+ components.forEach(tagName => { switch (tagName) {
1711
+ case "tttx-list":
1712
+ if (!customElements.get(tagName)) {
1713
+ customElements.define(tagName, TttxList$1);
1714
+ }
1715
+ break;
1716
+ case "tttx-icon":
1717
+ if (!customElements.get(tagName)) {
1718
+ defineCustomElement$2();
1719
+ }
1720
+ break;
1721
+ } });
1722
1722
  }
1723
1723
 
1724
1724
  const TttxList = TttxList$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}.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
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", { class: "spinner-container" }, 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", { class: "spinner-container" }, 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;