@3t-transform/threeteeui 0.1.4 → 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 (94) hide show
  1. package/dist/cjs/{index-5f6cbac9.js → index-906c2757.js} +14 -1
  2. package/dist/cjs/loader.cjs.js +2 -2
  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 +2 -2
  10. package/dist/collection/components/atoms/tttx-button/tttx-button.js +116 -110
  11. package/dist/collection/components/atoms/tttx-button/tttx-button.stories.js +14 -14
  12. package/dist/collection/components/atoms/tttx-icon/tttx-icon.css +0 -4
  13. package/dist/collection/components/atoms/tttx-icon/tttx-icon.js +62 -62
  14. package/dist/collection/components/atoms/tttx-icon/tttx-icon.stories.js +22 -22
  15. package/dist/collection/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.js +107 -107
  16. package/dist/collection/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.stories.js +38 -38
  17. package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.js +67 -67
  18. package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.stories.js +17 -17
  19. package/dist/collection/components/molecules/tttx-form/lib/setErrorState.js +35 -35
  20. package/dist/collection/components/molecules/tttx-form/lib/validityCheck.js +58 -58
  21. package/dist/collection/components/molecules/tttx-form/tttx-form.css +3 -32
  22. package/dist/collection/components/molecules/tttx-form/tttx-form.js +364 -364
  23. package/dist/collection/components/molecules/tttx-form/tttx-form.stories.js +127 -127
  24. package/dist/collection/components/molecules/tttx-list/tttx-list.js +105 -105
  25. package/dist/collection/components/molecules/tttx-list/tttx-list.stories.js +43 -43
  26. package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.css +3 -32
  27. package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.js +572 -627
  28. package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.stories.js +135 -148
  29. package/dist/collection/components/palette.stories.js +7 -7
  30. package/dist/collection/docs/gettingstarted-developer.stories.js +5 -5
  31. package/dist/collection/icons.js +2838 -2838
  32. package/dist/collection/index.js +1 -1
  33. package/dist/collection/shared/domsanitiser.options.js +14 -14
  34. package/dist/collection/transform-tag-name.js +5 -0
  35. package/dist/components/tttx-button.js +59 -48
  36. package/dist/components/tttx-form.js +381 -381
  37. package/dist/components/tttx-icon2.js +29 -29
  38. package/dist/components/tttx-keyvalue-block.js +74 -74
  39. package/dist/components/tttx-list.js +65 -65
  40. package/dist/components/tttx-loading-spinner.js +33 -33
  41. package/dist/components/tttx-standalone-input.js +102 -108
  42. package/dist/esm/{index-ffdc7592.js → index-4010ad69.js} +14 -2
  43. package/dist/esm/loader.js +3 -3
  44. package/dist/esm/polyfills/core-js.js +0 -0
  45. package/dist/esm/polyfills/dom.js +0 -0
  46. package/dist/esm/polyfills/es5-html-element.js +0 -0
  47. package/dist/esm/polyfills/index.js +0 -0
  48. package/dist/esm/polyfills/system.js +0 -0
  49. package/dist/esm/{tttx-button.entry.js → tttx-button_2.entry.js} +50 -25
  50. package/dist/esm/tttx-form.entry.js +364 -364
  51. package/dist/esm/tttx-keyvalue-block.entry.js +57 -57
  52. package/dist/esm/tttx-list.entry.js +43 -43
  53. package/dist/esm/tttx-loading-spinner.entry.js +16 -16
  54. package/dist/esm/tttx-standalone-input.entry.js +58 -61
  55. package/dist/esm/tttx.js +3 -3
  56. package/dist/tttx/p-083eeedc.entry.js +1 -0
  57. package/dist/tttx/{p-f97a61bb.entry.js → p-3281444a.entry.js} +1 -1
  58. package/dist/tttx/p-5687f4ad.js +2 -0
  59. package/dist/tttx/{p-d7423a2c.entry.js → p-5c9a1626.entry.js} +1 -1
  60. package/dist/tttx/p-931e42c9.entry.js +1 -0
  61. package/dist/tttx/p-b5c1dd86.entry.js +1 -0
  62. package/dist/tttx/{p-ed708390.entry.js → p-dab7ee1b.entry.js} +1 -1
  63. package/dist/tttx/tttx.esm.js +1 -1
  64. package/dist/types/components/atoms/tttx-button/tttx-button.d.ts +13 -10
  65. package/dist/types/components/atoms/tttx-button/tttx-button.stories.d.ts +10 -10
  66. package/dist/types/components/atoms/tttx-icon/tttx-icon.d.ts +5 -5
  67. package/dist/types/components/atoms/tttx-icon/tttx-icon.stories.d.ts +20 -20
  68. package/dist/types/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.d.ts +7 -7
  69. package/dist/types/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.stories.d.ts +9 -9
  70. package/dist/types/components/atoms/tttx-loading-spinner/tttx-loading-spinner.d.ts +6 -6
  71. package/dist/types/components/atoms/tttx-loading-spinner/tttx-loading-spinner.stories.d.ts +17 -17
  72. package/dist/types/components/molecules/tttx-form/lib/setErrorState.d.ts +13 -13
  73. package/dist/types/components/molecules/tttx-form/lib/validityCheck.d.ts +17 -17
  74. package/dist/types/components/molecules/tttx-form/tttx-form.d.ts +114 -114
  75. package/dist/types/components/molecules/tttx-form/tttx-form.stories.d.ts +13 -13
  76. package/dist/types/components/molecules/tttx-list/tttx-list.d.ts +11 -11
  77. package/dist/types/components/molecules/tttx-list/tttx-list.stories.d.ts +14 -14
  78. package/dist/types/components/molecules/tttx-standalone-input/tttx-standalone-input.d.ts +53 -56
  79. package/dist/types/components/molecules/tttx-standalone-input/tttx-standalone-input.stories.d.ts +106 -122
  80. package/dist/types/components/palette.stories.d.ts +6 -6
  81. package/dist/types/components.d.ts +0 -6
  82. package/dist/types/docs/gettingstarted-developer.stories.d.ts +5 -5
  83. package/dist/types/icons.d.ts +2 -2
  84. package/dist/types/index.d.ts +1 -1
  85. package/dist/types/shared/domsanitiser.options.d.ts +10 -10
  86. package/dist/types/transform-tag-name.d.ts +1 -0
  87. package/package.json +1 -1
  88. package/dist/cjs/tttx-icon.cjs.entry.js +0 -21
  89. package/dist/esm/tttx-icon.entry.js +0 -17
  90. package/dist/tttx/p-31c15d5e.entry.js +0 -1
  91. package/dist/tttx/p-6f51edf0.entry.js +0 -1
  92. package/dist/tttx/p-a31641f0.entry.js +0 -1
  93. package/dist/tttx/p-ccd04459.js +0 -2
  94. package/dist/tttx/p-e351f833.entry.js +0 -1
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1,14 +1,14 @@
1
- function tagRegXp(tagName) {
2
- return RegExp(/^tttx-/).exec(tagName);
3
- }
4
- function attributeNameCheck() {
5
- return true;
6
- }
7
- const domSanitiserOptions = {
8
- CUSTOM_ELEMENT_HANDLING: {
9
- tagNameCheck: tagRegXp,
10
- attributeNameCheck: attributeNameCheck,
11
- allowCustomizedBuiltInElements: false, // customized built-ins are not allowed
12
- }
13
- };
14
- export default domSanitiserOptions;
1
+ function tagRegXp(tagName) {
2
+ return RegExp(/^tttx-/).exec(tagName);
3
+ }
4
+ function attributeNameCheck() {
5
+ return true;
6
+ }
7
+ const domSanitiserOptions = {
8
+ CUSTOM_ELEMENT_HANDLING: {
9
+ tagNameCheck: tagRegXp,
10
+ attributeNameCheck: attributeNameCheck,
11
+ allowCustomizedBuiltInElements: false, // customized built-ins are not allowed
12
+ }
13
+ };
14
+ export default domSanitiserOptions;
@@ -0,0 +1,5 @@
1
+ export const transformTagName = (tagNameToBeTransformed, knownUntransformedTagName, knownUntransformedTagNameElementReference) => {
2
+ const actualCurrentTag = knownUntransformedTagNameElementReference.tagName.toLowerCase();
3
+ const [prefix, suffix] = actualCurrentTag.split(knownUntransformedTagName);
4
+ return prefix + tagNameToBeTransformed + suffix;
5
+ };
@@ -1,56 +1,67 @@
1
1
  import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
2
  import { d as defineCustomElement$2 } from './tttx-icon2.js';
3
3
 
4
+ const transformTagName = (tagNameToBeTransformed, knownUntransformedTagName, knownUntransformedTagNameElementReference) => {
5
+ const actualCurrentTag = knownUntransformedTagNameElementReference.tagName.toLowerCase();
6
+ const [prefix, suffix] = actualCurrentTag.split(knownUntransformedTagName);
7
+ return prefix + tagNameToBeTransformed + suffix;
8
+ };
9
+
4
10
  const tttxButtonCss = ".material-symbols-rounded{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}.button{font-family:Roboto, serif;box-sizing:border-box;height:36px;min-width:36px;padding:0;margin:0;background:transparent;color:#212121;border:1px solid #c8c8c8;border-radius:4px;text-transform:uppercase;display:flex;justify-content:left;align-items:center;font-size:14px;font-weight:400}.button-content{display:block;padding:0 16px}.icon-left,.icon-right{margin-top:4px}.iconleft{padding-left:8px}.iconleft .button-content{padding-left:4px}.iconright{padding-right:8px}.iconright .button-content{padding-right:4px}.notext{padding:0 6px}.button:hover{background:rgba(17, 17, 17, 0.1);border:1px solid #D5D5D5}.button:active{background:rgba(17, 17, 17, 0.2);border:1px solid #D5D5D5}.primary{background:#1479c6;border:1px solid #1479c6;color:white}.primary:hover{background:#146EB3;border:1px solid #146EB3}.primary:active{background:#1464A2;border:1px solid #1464A2}.borderless{background:transparent;border:none;color:#212121}.borderless:hover{background:rgba(17, 17, 17, 0.1);border:none}.borderless:active{background:rgba(17, 17, 17, 0.2);border:none}.danger{background:#DC0000;border:1px solid #DC0000;color:white}.danger:hover{background:#C60000;border:1px solid #C60000}.danger:active{background:#B00000;border:1px solid #B00000}.disabled{background:#aeaeae;border:none;color:#4c4c4c;cursor:not-allowed}.disabled:hover{background:#aeaeae;border:none;color:#4c4c4c;cursor:not-allowed}.disabled:active{background:#aeaeae;border:none;color:#4c4c4c;cursor:not-allowed}:host{display:inline-block}.spacingleft{margin-left:8px}";
5
11
 
6
- const TttxButton$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
7
- constructor() {
8
- super();
9
- this.__registerHost();
10
- this.__attachShadow();
11
- this._iconcolor = 'black';
12
- this.notext = undefined;
13
- this.icon = undefined;
14
- this.iconposition = 'left';
15
- this.design = 'default';
16
- }
17
- componentWillLoad() {
18
- this._design = this.design;
19
- const designs = ['primary', 'default', 'disabled', 'danger', 'borderless'];
20
- if (!designs.includes(this.design)) {
21
- this._design = 'default';
22
- }
23
- if (this._design === 'primary' || this._design === 'danger') {
24
- this._iconcolor = 'white';
25
- }
26
- }
27
- render() {
28
- return (h(Host, null, h("button", { class: `button ${this._design} ${this.icon ? 'withicon' : ''} ${this.icon && this.iconposition ? 'icon' + this.iconposition : ''} ${this.notext ? 'notext' : ''}` }, this.icon && this.iconposition === 'left' && (h("div", { class: "icon-left" }, h("tttx-icon", { icon: this.icon, color: this._iconcolor }))), !this.notext && h("div", { class: "button-content" }, h("slot", null)), this.icon && this.iconposition === 'right' && (h("div", { class: "icon-right" }, h("tttx-icon", { icon: this.icon, color: this._iconcolor }))))));
29
- }
30
- static get style() { return tttxButtonCss; }
31
- }, [1, "tttx-button", {
32
- "notext": [4],
33
- "icon": [1],
34
- "iconposition": [1],
35
- "design": [1]
36
- }]);
37
- function defineCustomElement$1() {
38
- if (typeof customElements === "undefined") {
39
- return;
40
- }
41
- const components = ["tttx-button", "tttx-icon"];
42
- components.forEach(tagName => { switch (tagName) {
43
- case "tttx-button":
44
- if (!customElements.get(tagName)) {
45
- customElements.define(tagName, TttxButton$1);
46
- }
47
- break;
48
- case "tttx-icon":
49
- if (!customElements.get(tagName)) {
50
- defineCustomElement$2();
51
- }
52
- break;
53
- } });
12
+ const TttxButton$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
13
+ constructor() {
14
+ super();
15
+ this.__registerHost();
16
+ this.__attachShadow();
17
+ this._iconcolor = 'black';
18
+ this.notext = undefined;
19
+ this.icon = undefined;
20
+ this.iconposition = 'left';
21
+ this.design = 'default';
22
+ }
23
+ connectedCallback() {
24
+ const TttxButton = transformTagName('tttx-button', 'tttx-button', this.el);
25
+ this.buttonEl = this.el.closest(TttxButton);
26
+ }
27
+ componentWillLoad() {
28
+ this._design = this.design;
29
+ const designs = ['primary', 'default', 'disabled', 'danger', 'borderless'];
30
+ if (!designs.includes(this.design)) {
31
+ this._design = 'default';
32
+ }
33
+ if (this._design === 'primary' || this._design === 'danger') {
34
+ this._iconcolor = 'white';
35
+ }
36
+ }
37
+ render() {
38
+ return (h(Host, null, h("button", { class: `button ${this._design} ${this.icon ? 'withicon' : ''} ${this.icon && this.iconposition ? 'icon' + this.iconposition : ''} ${this.notext ? 'notext' : ''}` }, this.icon && this.iconposition === 'left' && (h("div", { class: "icon-left" }, h("tttx-icon", { icon: this.icon, color: this._iconcolor }))), !this.notext && h("div", { class: "button-content" }, h("slot", null)), this.icon && this.iconposition === 'right' && (h("div", { class: "icon-right" }, h("tttx-icon", { icon: this.icon, color: this._iconcolor }))))));
39
+ }
40
+ get el() { return this; }
41
+ static get style() { return tttxButtonCss; }
42
+ }, [1, "tttx-button", {
43
+ "notext": [4],
44
+ "icon": [1],
45
+ "iconposition": [1],
46
+ "design": [1]
47
+ }]);
48
+ function defineCustomElement$1() {
49
+ if (typeof customElements === "undefined") {
50
+ return;
51
+ }
52
+ const components = ["tttx-button", "tttx-icon"];
53
+ components.forEach(tagName => { switch (tagName) {
54
+ case "tttx-button":
55
+ if (!customElements.get(tagName)) {
56
+ customElements.define(tagName, TttxButton$1);
57
+ }
58
+ break;
59
+ case "tttx-icon":
60
+ if (!customElements.get(tagName)) {
61
+ defineCustomElement$2();
62
+ }
63
+ break;
64
+ } });
54
65
  }
55
66
 
56
67
  const TttxButton = TttxButton$1;