@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 +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
+ };
@@ -19,6 +19,15 @@ export { TttxInput as TttxStandaloneInput } from '../types/components/molecules/
19
19
  */
20
20
  export declare const setAssetPath: (path: string) => void;
21
21
 
22
+ /**
23
+ * Used to specify a nonce value that corresponds with an application's CSP.
24
+ * When set, the nonce will be added to all dynamically created script and style tags at runtime.
25
+ * Alternatively, the nonce value can be set on a meta tag in the DOM head
26
+ * (<meta name="csp-nonce" content="{ nonce value here }" />) which
27
+ * will result in the same behavior.
28
+ */
29
+ export declare const setNonce: (nonce: string) => void
30
+
22
31
  export interface SetPlatformOptions {
23
32
  raf?: (c: FrameRequestCallback) => number;
24
33
  ael?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
@@ -1,4 +1,4 @@
1
- export { setAssetPath, setPlatformOptions } from '@stencil/core/internal/client';
1
+ export { setAssetPath, setNonce, setPlatformOptions } from '@stencil/core/internal/client';
2
2
  export { TttxButton, defineCustomElement as defineCustomElementTttxButton } from './tttx-button.js';
3
3
  export { TttxForm, defineCustomElement as defineCustomElementTttxForm } from './tttx-form.js';
4
4
  export { TttxIcon, defineCustomElement as defineCustomElementTttxIcon } from './tttx-icon.js';
@@ -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;