@3t-transform/threeteeui 0.0.9 → 0.0.11
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.
- package/dist/cjs/{index-8a4cb9bc.js → index-bf39be87.js} +41 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/tttx-button.cjs.entry.js +2 -2
- package/dist/cjs/tttx-checkbox.cjs.entry.js +3 -3
- package/dist/cjs/tttx-form.cjs.entry.js +169 -41
- package/dist/cjs/tttx-icon.cjs.entry.js +2 -2
- package/dist/cjs/tttx-loading-spinner.cjs.entry.js +26 -0
- package/dist/cjs/tttx-popover-content.cjs.entry.js +2 -2
- package/dist/cjs/tttx-standalone-input.cjs.entry.js +134 -0
- package/dist/cjs/tttx.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +3 -2
- package/dist/collection/components/atoms/tttx-button/tttx-button.css +1 -0
- package/dist/collection/components/atoms/tttx-button/tttx-button.stories.js +3 -3
- package/dist/collection/components/atoms/tttx-icon/tttx-icon.css +8 -4
- package/dist/collection/components/atoms/tttx-icon/tttx-icon.stories.js +15 -15
- package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.css +48 -0
- package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.js +66 -0
- package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.stories.js +17 -0
- package/dist/collection/components/atoms/tttx-popover-content/tttx-popover-content.js +1 -1
- package/dist/collection/components/atoms/tttx-popover-content/tttx-popover-content.stories.js +3 -3
- package/dist/collection/components/atoms/ttx-checkbox/tttx-checkbox.css +86 -43
- package/dist/collection/components/atoms/ttx-checkbox/tttx-checkbox.js +1 -1
- package/dist/collection/components/atoms/ttx-checkbox/tttx-checkbox.stories.js +5 -5
- package/dist/collection/components/molecules/tttx-form/tttx-form.css +230 -0
- package/dist/collection/components/molecules/tttx-form/tttx-form.js +195 -55
- package/dist/collection/components/molecules/tttx-form/tttx-form.stories.js +97 -28
- package/dist/collection/components/molecules/{tttx-input/tttx-input.css → tttx-standalone-input/tttx-standalone-input.css} +78 -53
- package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.js +561 -0
- package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.stories.js +156 -0
- package/dist/collection/components/palette.stories.js +81 -81
- package/dist/collection/docs/gettingstarted-developer.stories.js +4 -4
- package/dist/components/index.d.ts +2 -1
- package/dist/components/index.js +2 -1
- package/dist/components/tttx-button.js +1 -1
- package/dist/components/tttx-checkbox.js +2 -2
- package/dist/components/tttx-form.js +167 -39
- package/dist/components/tttx-icon2.js +1 -1
- package/dist/components/{tttx-input.d.ts → tttx-loading-spinner.d.ts} +4 -4
- package/dist/components/tttx-loading-spinner.js +43 -0
- package/dist/components/tttx-popover-content.js +1 -1
- package/dist/components/tttx-standalone-input.d.ts +11 -0
- package/dist/components/tttx-standalone-input.js +178 -0
- package/dist/esm/{index-9654537d.js → index-63c4d25e.js} +41 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/tttx-button.entry.js +2 -2
- package/dist/esm/tttx-checkbox.entry.js +3 -3
- package/dist/esm/tttx-form.entry.js +169 -41
- package/dist/esm/tttx-icon.entry.js +2 -2
- package/dist/esm/tttx-loading-spinner.entry.js +22 -0
- package/dist/esm/tttx-popover-content.entry.js +2 -2
- package/dist/esm/tttx-standalone-input.entry.js +130 -0
- package/dist/esm/tttx.js +3 -3
- package/dist/tttx/{p-3cb692d6.entry.js → p-1a4eb1f3.entry.js} +1 -1
- package/dist/tttx/p-2d54f8aa.entry.js +1 -0
- package/dist/tttx/p-338b3976.entry.js +1 -0
- package/dist/tttx/p-4c57bcbd.entry.js +1 -0
- package/dist/tttx/p-709246f5.entry.js +1 -0
- package/dist/tttx/p-95a29e09.entry.js +1 -0
- package/dist/tttx/{p-1884203f.entry.js → p-ad0c3fe4.entry.js} +1 -1
- package/dist/tttx/p-bec472d8.js +2 -0
- package/dist/tttx/tttx.esm.js +1 -1
- package/dist/types/components/atoms/tttx-loading-spinner/tttx-loading-spinner.d.ts +6 -0
- package/dist/types/components/atoms/tttx-loading-spinner/tttx-loading-spinner.stories.d.ts +17 -0
- package/dist/types/components/molecules/tttx-form/tttx-form.d.ts +14 -7
- package/dist/types/components/molecules/tttx-form/tttx-form.stories.d.ts +1 -8
- package/dist/types/components/molecules/tttx-standalone-input/tttx-standalone-input.d.ts +38 -0
- package/dist/types/components/molecules/tttx-standalone-input/tttx-standalone-input.stories.d.ts +106 -0
- package/dist/types/components.d.ts +73 -31
- package/package.json +67 -65
- package/readme.md +89 -86
- package/dist/cjs/tttx-input.cjs.entry.js +0 -44
- package/dist/collection/components/molecules/tttx-input/tttx-input.js +0 -259
- package/dist/collection/components/molecules/tttx-input/tttx-input.stories.js +0 -106
- package/dist/components/tttx-input.js +0 -77
- package/dist/esm/tttx-input.entry.js +0 -40
- package/dist/tttx/p-8e977b49.entry.js +0 -1
- package/dist/tttx/p-b6cc2780.js +0 -2
- package/dist/tttx/p-beb8e3fc.entry.js +0 -1
- package/dist/tttx/p-ece1c722.entry.js +0 -1
- package/dist/tttx/p-f30a0e84.entry.js +0 -1
- package/dist/types/components/molecules/tttx-input/tttx-input.d.ts +0 -20
- package/dist/types/components/molecules/tttx-input/tttx-input.stories.d.ts +0 -60
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { Components, JSX } from "../types/components";
|
|
2
2
|
|
|
3
|
-
interface
|
|
4
|
-
export const
|
|
5
|
-
prototype:
|
|
6
|
-
new ():
|
|
3
|
+
interface TttxLoadingSpinner extends Components.TttxLoadingSpinner, HTMLElement {}
|
|
4
|
+
export const TttxLoadingSpinner: {
|
|
5
|
+
prototype: TttxLoadingSpinner;
|
|
6
|
+
new (): TttxLoadingSpinner;
|
|
7
7
|
};
|
|
8
8
|
/**
|
|
9
9
|
* Used to define this component and all nested components recursively.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
|
+
|
|
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
|
+
|
|
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
|
+
}
|
|
39
|
+
|
|
40
|
+
const TttxLoadingSpinner = TttxLoadingSpinner$1;
|
|
41
|
+
const defineCustomElement = defineCustomElement$1;
|
|
42
|
+
|
|
43
|
+
export { TttxLoadingSpinner, defineCustomElement };
|
|
@@ -13,7 +13,7 @@ const TttxPopoverContent$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
|
|
|
13
13
|
this.linktext = undefined;
|
|
14
14
|
}
|
|
15
15
|
render() {
|
|
16
|
-
return (h(Host, null, this.header && h("h4", null, this.header), this.body && h("p", null, this.body), this.linkcontext && h("span", { class: "linky", onClick:
|
|
16
|
+
return (h(Host, null, this.header && h("h4", null, this.header), this.body && h("p", null, this.body), this.linkcontext && (h("span", { class: "linky", onClick: evt => console.log(this.linkcontext, evt) }, this.linktext || 'More Information'))));
|
|
17
17
|
}
|
|
18
18
|
static get style() { return tttxPopoverContentCss; }
|
|
19
19
|
}, [1, "tttx-popover-content", {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface TttxStandaloneInput extends Components.TttxStandaloneInput, HTMLElement {}
|
|
4
|
+
export const TttxStandaloneInput: {
|
|
5
|
+
prototype: TttxStandaloneInput;
|
|
6
|
+
new (): TttxStandaloneInput;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { d as defineCustomElement$2 } from './tttx-icon2.js';
|
|
3
|
+
|
|
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-family:\"Material Symbols Rounded\", sans-serif;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;color:#9e9e9e}.icon-left.sc-tttx-standalone-input,.icon-right.sc-tttx-standalone-input{flex-basis:24px}.icon-left.sc-tttx-standalone-input span.sc-tttx-standalone-input,.icon-right.sc-tttx-standalone-input span.sc-tttx-standalone-input{font-size:24px;line-height:24px;text-align:center;display:block;width:24px;height:24px;margin-top:4px}.icon-left.sc-tttx-standalone-input span.sc-tttx-standalone-input{margin-left:4px}.icon-right.sc-tttx-standalone-input span.sc-tttx-standalone-input{margin-right:4px}.icon-right.sc-tttx-standalone-input{margin-top:5px;margin-right:4px}.icon-left.sc-tttx-standalone-input{margin-top:5px;margin-left:4px}.iconleft.sc-tttx-standalone-input .input.sc-tttx-standalone-input{padding-left:4px}.iconright.sc-tttx-standalone-input .input.sc-tttx-standalone-input{padding-right:4px}.focused.sc-tttx-standalone-input{border-color:#1479c6}.errormsg.sc-tttx-standalone-input{display:flex;justify-content:center;align-items:center;float:left;margin-bottom:16px;box-sizing:border-box;background-color:transparent;height:26px;font-size:14px;border-radius:none;z-index:2;color:#dc0000}.errormsg.sc-tttx-standalone-input .validationicon.sc-tttx-standalone-input{width:16px;height:16px;font-size:16px;margin-right:4px;vertical-align:middle;color:#dc0000}.danger.sc-tttx-standalone-input{color:#dc0000}.optional.sc-tttx-standalone-input{color:#757575;font-weight:normal}label.inputBlock.sc-tttx-standalone-input{display:block;position:relative;line-height:21px}label.sc-tttx-standalone-input{font-weight:500;font-size:16px}input.sc-tttx-standalone-input:not([type=submit]){font-family:\"Roboto\", serif;box-sizing:border-box;width:100%;height:36px;padding:0 16px;font-size:16px;border:1px solid #d5d5d5;border-radius:4px;margin-top:4px}input[type=date].sc-tttx-standalone-input{background:white;display:block;min-width:calc(100% - 18px);line-height:37px}input.invalid.sc-tttx-standalone-input:invalid,input.standalone.invalid.sc-tttx-standalone-input{border:1px solid #dc0000}input.sc-tttx-standalone-input~.errorBubble.sc-tttx-standalone-input{min-height:27px;position:relative;font-size:14px;font-weight:normal;width:100%;font-family:\"Roboto\", sans-serif;color:#dc0000;display:flex;align-content:center;align-items:center;justify-items:center}input.sc-tttx-standalone-input~.errorBubble.sc-tttx-standalone-input:not(.visible){visibility:hidden}input.sc-tttx-standalone-input~.errorBubble.sc-tttx-standalone-input span.sc-tttx-standalone-input{color:#dc0000;font-size:16px;margin-right:4px;height:16px}input.invalid.sc-tttx-standalone-input:invalid~.errorBubble.sc-tttx-standalone-input{position:relative;font-size:14px;font-weight:normal;width:100%;font-family:\"Roboto\", sans-serif;color:#dc0000;visibility:visible}input.sc-tttx-standalone-input:focus{border-color:#1479c6}.sc-tttx-standalone-input-h{display:block}";
|
|
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.isfocused = false;
|
|
12
|
+
this.label = undefined;
|
|
13
|
+
this.valid = undefined;
|
|
14
|
+
this.showerrormsg = undefined;
|
|
15
|
+
this.errormsg = undefined;
|
|
16
|
+
this.iconleft = undefined;
|
|
17
|
+
this.iconright = undefined;
|
|
18
|
+
this.autocapitalize = undefined;
|
|
19
|
+
this.autocomplete = undefined;
|
|
20
|
+
this.autofocus = undefined;
|
|
21
|
+
this.checked = undefined;
|
|
22
|
+
this.disabled = undefined;
|
|
23
|
+
this.max = undefined;
|
|
24
|
+
this.maxlength = undefined;
|
|
25
|
+
this.min = undefined;
|
|
26
|
+
this.minlength = undefined;
|
|
27
|
+
this.name = undefined;
|
|
28
|
+
this.pattern = undefined;
|
|
29
|
+
this.placeholder = undefined;
|
|
30
|
+
this.readonly = undefined;
|
|
31
|
+
this.required = undefined;
|
|
32
|
+
this.step = undefined;
|
|
33
|
+
this.type = 'text';
|
|
34
|
+
this.value = undefined;
|
|
35
|
+
}
|
|
36
|
+
handleChange(event) {
|
|
37
|
+
const target = event.target;
|
|
38
|
+
this.value = target.value;
|
|
39
|
+
this.valueChanged.emit(target.value);
|
|
40
|
+
}
|
|
41
|
+
handleFocus() {
|
|
42
|
+
this.isfocused = true;
|
|
43
|
+
}
|
|
44
|
+
handleBlur() {
|
|
45
|
+
this.isfocused = false;
|
|
46
|
+
}
|
|
47
|
+
render() {
|
|
48
|
+
const classNames = ['standalone', this.showerrormsg ? 'invalid' : ''].join(' ');
|
|
49
|
+
return (h(Host, null, h("label", { class: 'inputBlock' }, this.label, !this.required ? h("span", { class: "optional" }, "\u00A0(optional)") : '', this.iconleft && (h("div", { class: "icon-left" }, h("tttx-icon", { icon: this.iconleft, colour: "grey" }))), h("input", { class: classNames, autocapitalize: this.type === 'url' || this.type === 'email' || this.type === 'password' ? this.autocapitalize : null, autofocus: this.autofocus, autocomplete: this.type === 'text' ||
|
|
50
|
+
this.type === 'search' ||
|
|
51
|
+
this.type === 'url' ||
|
|
52
|
+
this.type === 'tel' ||
|
|
53
|
+
this.type === 'email' ||
|
|
54
|
+
this.type === 'password' ||
|
|
55
|
+
this.type === 'datepickers' ||
|
|
56
|
+
this.type === 'range' ||
|
|
57
|
+
this.type === 'color'
|
|
58
|
+
? this.autocomplete
|
|
59
|
+
: null, checked: this.type === 'checkbox' || this.type === 'radio' ? this.checked : null, disabled: !this.required ? this.disabled : null, max: this.type === 'date' ||
|
|
60
|
+
this.type === 'month' ||
|
|
61
|
+
this.type === 'week' ||
|
|
62
|
+
this.type === 'time' ||
|
|
63
|
+
this.type === 'datetime-local' ||
|
|
64
|
+
this.type === 'number' ||
|
|
65
|
+
this.type === 'range'
|
|
66
|
+
? this.max
|
|
67
|
+
: null, maxlength: this.maxlength, min: this.type === 'date' ||
|
|
68
|
+
this.type === 'month' ||
|
|
69
|
+
this.type === 'week' ||
|
|
70
|
+
this.type === 'time' ||
|
|
71
|
+
this.type === 'datetime-local' ||
|
|
72
|
+
this.type === 'number' ||
|
|
73
|
+
this.type === 'range'
|
|
74
|
+
? this.min
|
|
75
|
+
: null, minlength: this.maxlength, name: this.name, pattern: this.type === 'text' ||
|
|
76
|
+
this.type === 'date' ||
|
|
77
|
+
this.type === 'search' ||
|
|
78
|
+
this.type === 'url' ||
|
|
79
|
+
this.type === 'tel' ||
|
|
80
|
+
this.type === 'email' ||
|
|
81
|
+
this.type === 'password'
|
|
82
|
+
? this.pattern
|
|
83
|
+
: null, placeholder: this.type === 'text' ||
|
|
84
|
+
this.type === 'tel' ||
|
|
85
|
+
this.type === 'email' ||
|
|
86
|
+
this.type === 'url' ||
|
|
87
|
+
this.type === 'password' ||
|
|
88
|
+
this.type === 'search'
|
|
89
|
+
? this.placeholder
|
|
90
|
+
: null, readonly: this.type === 'text' ||
|
|
91
|
+
this.type === 'search' ||
|
|
92
|
+
this.type === 'url' ||
|
|
93
|
+
this.type === 'tel' ||
|
|
94
|
+
this.type === 'email' ||
|
|
95
|
+
this.type === 'password' ||
|
|
96
|
+
this.type === 'date' ||
|
|
97
|
+
this.type === 'month' ||
|
|
98
|
+
this.type === 'week' ||
|
|
99
|
+
this.type === 'time' ||
|
|
100
|
+
this.type === 'datetime-local' ||
|
|
101
|
+
this.type === 'number'
|
|
102
|
+
? this.readonly
|
|
103
|
+
: null, required: this.type === 'text' ||
|
|
104
|
+
this.type === 'search' ||
|
|
105
|
+
this.type === 'url' ||
|
|
106
|
+
this.type === 'tel' ||
|
|
107
|
+
this.type === 'email' ||
|
|
108
|
+
this.type === 'password' ||
|
|
109
|
+
this.type === 'date' ||
|
|
110
|
+
this.type === 'month' ||
|
|
111
|
+
this.type === 'week' ||
|
|
112
|
+
this.type === 'time' ||
|
|
113
|
+
this.type === 'datetime-local' ||
|
|
114
|
+
this.type === 'number' ||
|
|
115
|
+
this.type === 'checkbox' ||
|
|
116
|
+
this.type === 'radio' ||
|
|
117
|
+
this.type === 'file'
|
|
118
|
+
? this.required
|
|
119
|
+
: null, step: this.type === 'date' ||
|
|
120
|
+
this.type === 'month' ||
|
|
121
|
+
this.type === 'week' ||
|
|
122
|
+
this.type === 'time' ||
|
|
123
|
+
this.type === 'datetime-local' ||
|
|
124
|
+
this.type === 'number' ||
|
|
125
|
+
this.type === 'range'
|
|
126
|
+
? this.step
|
|
127
|
+
: null, type: this.type, value: this.value, onBlur: this.handleBlur.bind(this), onFocus: this.handleFocus.bind(this), onInput: this.handleChange.bind(this) }), this.iconright && (h("div", { class: "icon-right" }, h("tttx-icon", { icon: this.iconright, colour: "grey" }))), h("span", { class: ['errorBubble', this.showerrormsg && this.errormsg ? 'visible' : ''].join(' ') }, h("span", { class: "material-symbols-rounded validationicon" }, "warning"), " ", this.errormsg))));
|
|
128
|
+
}
|
|
129
|
+
static get style() { return tttxStandaloneInputCss; }
|
|
130
|
+
}, [2, "tttx-standalone-input", {
|
|
131
|
+
"label": [1],
|
|
132
|
+
"valid": [4],
|
|
133
|
+
"showerrormsg": [4],
|
|
134
|
+
"errormsg": [1],
|
|
135
|
+
"iconleft": [1],
|
|
136
|
+
"iconright": [1],
|
|
137
|
+
"autocapitalize": [1],
|
|
138
|
+
"autocomplete": [1],
|
|
139
|
+
"autofocus": [4],
|
|
140
|
+
"checked": [4],
|
|
141
|
+
"disabled": [4],
|
|
142
|
+
"max": [8],
|
|
143
|
+
"maxlength": [8],
|
|
144
|
+
"min": [8],
|
|
145
|
+
"minlength": [8],
|
|
146
|
+
"name": [1],
|
|
147
|
+
"pattern": [1],
|
|
148
|
+
"placeholder": [1],
|
|
149
|
+
"readonly": [8],
|
|
150
|
+
"required": [4],
|
|
151
|
+
"step": [8],
|
|
152
|
+
"type": [1],
|
|
153
|
+
"value": [1032],
|
|
154
|
+
"isfocused": [32]
|
|
155
|
+
}]);
|
|
156
|
+
function defineCustomElement$1() {
|
|
157
|
+
if (typeof customElements === "undefined") {
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
160
|
+
const components = ["tttx-standalone-input", "tttx-icon"];
|
|
161
|
+
components.forEach(tagName => { switch (tagName) {
|
|
162
|
+
case "tttx-standalone-input":
|
|
163
|
+
if (!customElements.get(tagName)) {
|
|
164
|
+
customElements.define(tagName, TttxInput);
|
|
165
|
+
}
|
|
166
|
+
break;
|
|
167
|
+
case "tttx-icon":
|
|
168
|
+
if (!customElements.get(tagName)) {
|
|
169
|
+
defineCustomElement$2();
|
|
170
|
+
}
|
|
171
|
+
break;
|
|
172
|
+
} });
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
const TttxStandaloneInput = TttxInput;
|
|
176
|
+
const defineCustomElement = defineCustomElement$1;
|
|
177
|
+
|
|
178
|
+
export { TttxStandaloneInput, defineCustomElement };
|
|
@@ -281,6 +281,9 @@ const attachStyles = (hostRef) => {
|
|
|
281
281
|
// DOM WRITE!!
|
|
282
282
|
elm['s-sc'] = scopeId;
|
|
283
283
|
elm.classList.add(scopeId + '-h');
|
|
284
|
+
if (flags & 2 /* CMP_FLAGS.scopedCssEncapsulation */) {
|
|
285
|
+
elm.classList.add(scopeId + '-s');
|
|
286
|
+
}
|
|
284
287
|
}
|
|
285
288
|
endAttachStyles();
|
|
286
289
|
};
|
|
@@ -826,6 +829,9 @@ const dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
826
829
|
promise = safeCall(instance, 'componentWillLoad');
|
|
827
830
|
}
|
|
828
831
|
}
|
|
832
|
+
{
|
|
833
|
+
promise = then(promise, () => safeCall(instance, 'componentWillRender'));
|
|
834
|
+
}
|
|
829
835
|
endSchedule();
|
|
830
836
|
return then(promise, () => updateComponent(hostRef, instance, isInitialLoad));
|
|
831
837
|
};
|
|
@@ -895,6 +901,9 @@ const postUpdateComponent = (hostRef) => {
|
|
|
895
901
|
const endPostUpdate = createTime('postUpdate', tagName);
|
|
896
902
|
const instance = hostRef.$lazyInstance$ ;
|
|
897
903
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
904
|
+
{
|
|
905
|
+
safeCall(instance, 'componentDidRender');
|
|
906
|
+
}
|
|
898
907
|
if (!(hostRef.$flags$ & 64 /* HOST_FLAGS.hasLoadedComponent */)) {
|
|
899
908
|
hostRef.$flags$ |= 64 /* HOST_FLAGS.hasLoadedComponent */;
|
|
900
909
|
{
|
|
@@ -959,6 +968,7 @@ const getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propNam
|
|
|
959
968
|
const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
960
969
|
// check our new property value against our internal value
|
|
961
970
|
const hostRef = getHostRef(ref);
|
|
971
|
+
const elm = hostRef.$hostElement$ ;
|
|
962
972
|
const oldVal = hostRef.$instanceValues$.get(propName);
|
|
963
973
|
const flags = hostRef.$flags$;
|
|
964
974
|
const instance = hostRef.$lazyInstance$ ;
|
|
@@ -971,6 +981,22 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
971
981
|
// set our new value!
|
|
972
982
|
hostRef.$instanceValues$.set(propName, newVal);
|
|
973
983
|
if (instance) {
|
|
984
|
+
// get an array of method names of watch functions to call
|
|
985
|
+
if (cmpMeta.$watchers$ && flags & 128 /* HOST_FLAGS.isWatchReady */) {
|
|
986
|
+
const watchMethods = cmpMeta.$watchers$[propName];
|
|
987
|
+
if (watchMethods) {
|
|
988
|
+
// this instance is watching for when this property changed
|
|
989
|
+
watchMethods.map((watchMethodName) => {
|
|
990
|
+
try {
|
|
991
|
+
// fire off each of the watch methods that are watching this property
|
|
992
|
+
instance[watchMethodName](newVal, oldVal, propName);
|
|
993
|
+
}
|
|
994
|
+
catch (e) {
|
|
995
|
+
consoleError(e, elm);
|
|
996
|
+
}
|
|
997
|
+
});
|
|
998
|
+
}
|
|
999
|
+
}
|
|
974
1000
|
if ((flags & (2 /* HOST_FLAGS.hasRendered */ | 16 /* HOST_FLAGS.isQueuedForUpdate */)) === 2 /* HOST_FLAGS.hasRendered */) {
|
|
975
1001
|
// looks like this value actually changed, so we've got work to do!
|
|
976
1002
|
// but only if we've already rendered, otherwise just chill out
|
|
@@ -993,6 +1019,9 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
993
1019
|
*/
|
|
994
1020
|
const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
995
1021
|
if (cmpMeta.$members$) {
|
|
1022
|
+
if (Cstr.watchers) {
|
|
1023
|
+
cmpMeta.$watchers$ = Cstr.watchers;
|
|
1024
|
+
}
|
|
996
1025
|
// It's better to have a const than two Object.entries()
|
|
997
1026
|
const members = Object.entries(cmpMeta.$members$);
|
|
998
1027
|
const prototype = Cstr.prototype;
|
|
@@ -1097,6 +1126,12 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1097
1126
|
endLoad();
|
|
1098
1127
|
}
|
|
1099
1128
|
if (!Cstr.isProxied) {
|
|
1129
|
+
// we've never proxied this Constructor before
|
|
1130
|
+
// let's add the getters/setters to its prototype before
|
|
1131
|
+
// the first time we create an instance of the implementation
|
|
1132
|
+
{
|
|
1133
|
+
cmpMeta.$watchers$ = Cstr.watchers;
|
|
1134
|
+
}
|
|
1100
1135
|
proxyComponent(Cstr, cmpMeta, 2 /* PROXY_FLAGS.proxyState */);
|
|
1101
1136
|
Cstr.isProxied = true;
|
|
1102
1137
|
}
|
|
@@ -1120,6 +1155,9 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1120
1155
|
{
|
|
1121
1156
|
hostRef.$flags$ &= ~8 /* HOST_FLAGS.isConstructingInstance */;
|
|
1122
1157
|
}
|
|
1158
|
+
{
|
|
1159
|
+
hostRef.$flags$ |= 128 /* HOST_FLAGS.isWatchReady */;
|
|
1160
|
+
}
|
|
1123
1161
|
endNewInstance();
|
|
1124
1162
|
}
|
|
1125
1163
|
if (Cstr.style) {
|
|
@@ -1239,6 +1277,9 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1239
1277
|
{
|
|
1240
1278
|
cmpMeta.$listeners$ = compactMeta[3];
|
|
1241
1279
|
}
|
|
1280
|
+
{
|
|
1281
|
+
cmpMeta.$watchers$ = {};
|
|
1282
|
+
}
|
|
1242
1283
|
const tagName = cmpMeta.$tagName$;
|
|
1243
1284
|
const HostElement = class extends HTMLElement {
|
|
1244
1285
|
// StencilLazyHost
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-63c4d25e.js';
|
|
2
|
+
export { s as setNonce } from './index-63c4d25e.js';
|
|
3
3
|
|
|
4
4
|
/*
|
|
5
5
|
Stencil Client Patch Esm v2.22.3 | MIT Licensed | https://stenciljs.com
|
|
@@ -11,7 +11,7 @@ const patchEsm = () => {
|
|
|
11
11
|
const defineCustomElements = (win, options) => {
|
|
12
12
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
13
13
|
return patchEsm().then(() => {
|
|
14
|
-
return bootstrapLazy([["tttx-input",[[
|
|
14
|
+
return bootstrapLazy([["tttx-standalone-input",[[2,"tttx-standalone-input",{"label":[1],"valid":[4],"showerrormsg":[4],"errormsg":[1],"iconleft":[1],"iconright":[1],"autocapitalize":[1],"autocomplete":[1],"autofocus":[4],"checked":[4],"disabled":[4],"max":[8],"maxlength":[8],"min":[8],"minlength":[8],"name":[1],"pattern":[1],"placeholder":[1],"readonly":[8],"required":[4],"step":[8],"type":[1],"value":[1032],"isfocused":[32]}]]],["tttx-button",[[1,"tttx-button",{"fontColor":[1,"font-color"],"buttonStyle":[1,"button-style"]},[[0,"clickEvent","onClicked"]]]]],["tttx-checkbox",[[1,"tttx-checkbox",{"value":[4],"label":[1],"required":[4]}]]],["tttx-form",[[1,"tttx-form",{"formschema":[8],"submitValue":[8,"submit-value"]}]]],["tttx-loading-spinner",[[1,"tttx-loading-spinner",{"loadingMessage":[1028,"loading-message"],"size":[1025]}]]],["tttx-popover-content",[[1,"tttx-popover-content",{"header":[1],"body":[1],"linkcontext":[1],"linktext":[1]}]]],["tttx-icon",[[1,"tttx-icon",{"icon":[1],"colour":[1]},[[4,"click","handleDocumentClick"]]]]]], options);
|
|
15
15
|
});
|
|
16
16
|
};
|
|
17
17
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host } from './index-63c4d25e.js';
|
|
2
2
|
|
|
3
|
-
const tttxButtonCss = ".material-symbols-rounded{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}.button{height:36px;padding:8px 16px;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:hover{background:#f0f0f0}.button:active{background:#e3e3e3}.primary-blue{background:#1479c6;border:1px solid #1479c6}.primary-blue:hover{background:#1169ba}.primary-blue:active{background:#0951a8}.secondary-white{background:white;border:1px solid #212121}:host{display:inline-block}.spacingleft{margin-left:8px}.font-white{color:white}.font-black{color:#212121}";
|
|
3
|
+
const tttxButtonCss = ".material-symbols-rounded{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}.button{height:36px;padding:8px 16px;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:hover{background:#f0f0f0}.button:active{background:#e3e3e3}.primary-blue{background:#1479c6;border:1px solid #1479c6;color:white}.primary-blue:hover{background:#1169ba}.primary-blue:active{background:#0951a8}.secondary-white{background:white;border:1px solid #212121}:host{display:inline-block}.spacingleft{margin-left:8px}.font-white{color:white}.font-black{color:#212121}";
|
|
4
4
|
|
|
5
5
|
const TttxButton = class {
|
|
6
6
|
constructor(hostRef) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host } from './index-63c4d25e.js';
|
|
2
2
|
|
|
3
|
-
const tttxCheckboxCss = ".material-symbols-rounded{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}.material-symbols-rounded{font-family:\"Material Symbols Rounded\";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}.
|
|
3
|
+
const tttxCheckboxCss = ".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}.icon-left,.icon-right{flex-basis:24px}.icon-left span,.icon-right span{font-size:24px;line-height:24px;text-align:center;display:block;width:24px;height:24px;margin-top:4px}.icon-left span{margin-left:4px}.icon-right span{margin-right:4px}.icon-right{margin-top:5px;margin-right:4px}.icon-left{margin-top:5px;margin-left:4px}.iconleft .input{padding-left:4px}.iconright .input{padding-right:4px}.focused{border-color:#1479c6}.errormsg{display:flex;justify-content:center;align-items:center;float:left;margin-bottom:16px;box-sizing:border-box;background-color:transparent;height:26px;font-size:14px;border-radius:none;z-index:2;color:#dc0000}.errormsg .validationicon{width:16px;height:16px;font-size:16px;margin-right:4px;vertical-align:middle;color:#dc0000}.danger{color:#dc0000}.optional{color:#757575;font-weight:normal}label.inputBlock{display:block;position:relative;line-height:21px}label{font-weight:500;font-size:16px}input:not([type=submit]){font-family:\"Roboto\", serif;box-sizing:border-box;width:100%;height:36px;padding:0 16px;font-size:16px;border:1px solid #d5d5d5;border-radius:4px;margin-top:4px}input[type=date]{background:white;display:block;min-width:calc(100% - 18px);line-height:37px}input.invalid:invalid,input.standalone.invalid{border:1px solid #dc0000}input~.errorBubble{min-height:27px;position:relative;font-size:14px;font-weight:normal;width:100%;font-family:\"Roboto\", sans-serif;color:#dc0000;display:flex;align-content:center;align-items:center;justify-items:center}input~.errorBubble:not(.visible){visibility:hidden}input~.errorBubble span{color:#dc0000;font-size:16px;margin-right:4px;height:16px}input.invalid:invalid~.errorBubble{position:relative;font-size:14px;font-weight:normal;width:100%;font-family:\"Roboto\", sans-serif;color:#dc0000;visibility:visible}input:focus{border-color:#1479c6}:host{display:block}.spacing{margin-bottom:16px}";
|
|
4
4
|
|
|
5
5
|
const TttxCheckbox = class {
|
|
6
6
|
constructor(hostRef) {
|
|
@@ -16,7 +16,7 @@ const TttxCheckbox = class {
|
|
|
16
16
|
this.valueChanged.emit(target.checked);
|
|
17
17
|
}
|
|
18
18
|
render() {
|
|
19
|
-
return (h(Host, null, h("div", { class: "field spacing" }, this.label && h("label", { class: "label" }, this.label, !this.required ? h("span", { class: "optional" }, " (optional)") : ''), h("input", { type: "checkbox", class: "input", onChange: event => this.handleClick(event), checked: this.value }))));
|
|
19
|
+
return (h(Host, null, h("div", { class: "field spacing" }, this.label && (h("label", { class: "label" }, this.label, !this.required ? h("span", { class: "optional" }, " (optional)") : '')), h("input", { type: "checkbox", class: "input", onChange: event => this.handleClick(event), checked: this.value }))));
|
|
20
20
|
}
|
|
21
21
|
};
|
|
22
22
|
TttxCheckbox.style = tttxCheckboxCss;
|