@3t-transform/threeteeui 0.0.6 → 0.0.8
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-8a7479e4.js → index-8a4cb9bc.js} +256 -407
- package/dist/cjs/loader.cjs.js +4 -3
- package/dist/cjs/tttx-button.cjs.entry.js +28 -0
- package/dist/cjs/tttx-checkbox.cjs.entry.js +28 -0
- package/dist/cjs/tttx-form.cjs.entry.js +58 -0
- package/dist/cjs/tttx-icon.cjs.entry.js +1845 -5
- package/dist/cjs/tttx-input.cjs.entry.js +44 -0
- package/dist/cjs/tttx-loading-spinner.cjs.entry.js +26 -0
- package/dist/cjs/tttx-popover-content.cjs.entry.js +23 -0
- package/dist/cjs/tttx.cjs.js +7 -3
- package/dist/collection/collection-manifest.json +9 -5
- package/dist/collection/components/atoms/tttx-button/tttx-button.css +61 -0
- package/dist/collection/components/atoms/tttx-button/tttx-button.js +93 -0
- package/dist/collection/components/atoms/tttx-button/tttx-button.stories.js +27 -0
- package/dist/collection/components/atoms/tttx-icon/tttx-icon.css +101 -0
- package/dist/collection/components/atoms/tttx-icon/tttx-icon.js +114 -0
- package/dist/collection/components/atoms/tttx-icon/tttx-icon.stories.js +47 -0
- 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 +15 -0
- package/dist/collection/components/atoms/tttx-popover-content/tttx-popover-content.css +30 -0
- package/dist/collection/components/atoms/tttx-popover-content/tttx-popover-content.js +96 -0
- package/dist/collection/components/atoms/tttx-popover-content/tttx-popover-content.stories.js +23 -0
- package/dist/collection/components/atoms/ttx-checkbox/tttx-checkbox.css +135 -0
- package/dist/collection/components/atoms/ttx-checkbox/tttx-checkbox.js +101 -0
- package/dist/collection/components/atoms/ttx-checkbox/tttx-checkbox.stories.js +13 -0
- package/dist/collection/components/molecules/tttx-form/tttx-form.js +109 -0
- package/dist/collection/components/molecules/tttx-form/tttx-form.stories.js +33 -0
- package/dist/collection/components/molecules/tttx-input/tttx-input.css +149 -0
- package/dist/collection/components/molecules/tttx-input/tttx-input.js +259 -0
- package/dist/collection/components/molecules/tttx-input/tttx-input.stories.js +106 -0
- package/dist/collection/components/palette.stories.js +88 -0
- package/dist/collection/icons.js +2838 -0
- package/dist/components/index.d.ts +16 -3
- package/dist/components/index.js +7 -3
- package/dist/components/{tttx-worksheet.d.ts → tttx-button.d.ts} +4 -4
- package/dist/components/tttx-button.js +45 -0
- package/dist/components/tttx-checkbox.d.ts +11 -0
- package/dist/components/tttx-checkbox.js +46 -0
- package/dist/components/{tttx-page.d.ts → tttx-form.d.ts} +4 -4
- package/dist/components/tttx-form.js +75 -0
- package/dist/components/tttx-icon.js +1 -32
- package/dist/components/tttx-icon2.js +1875 -0
- package/dist/components/tttx-input.d.ts +11 -0
- package/dist/components/tttx-input.js +77 -0
- package/dist/components/tttx-loading-spinner.d.ts +11 -0
- package/dist/components/tttx-loading-spinner.js +43 -0
- package/dist/components/tttx-popover-content.d.ts +11 -0
- package/dist/components/tttx-popover-content.js +42 -0
- package/dist/esm/{index-854ff56f.js → index-9654537d.js} +254 -408
- package/dist/esm/loader.js +4 -3
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm/tttx-button.entry.js +24 -0
- package/dist/esm/tttx-checkbox.entry.js +24 -0
- package/dist/esm/tttx-form.entry.js +54 -0
- package/dist/esm/tttx-icon.entry.js +1845 -5
- package/dist/esm/tttx-input.entry.js +40 -0
- package/dist/esm/tttx-loading-spinner.entry.js +22 -0
- package/dist/esm/tttx-popover-content.entry.js +19 -0
- package/dist/esm/tttx.js +4 -3
- package/dist/tttx/p-1884203f.entry.js +1 -0
- package/dist/tttx/p-317b13d3.entry.js +1 -0
- package/dist/tttx/p-3cb692d6.entry.js +1 -0
- package/dist/tttx/p-3cd7ad04.entry.js +1 -0
- package/dist/tttx/p-674e2f18.entry.js +1 -0
- package/dist/tttx/p-a23389f1.entry.js +1 -0
- package/dist/tttx/p-b6cc2780.js +2 -0
- package/dist/tttx/p-f30a0e84.entry.js +1 -0
- package/dist/tttx/tttx.esm.js +1 -1
- package/dist/types/components/atoms/tttx-button/tttx-button.d.ts +9 -0
- package/dist/types/components/atoms/tttx-button/tttx-button.stories.d.ts +20 -0
- package/dist/types/components/atoms/tttx-icon/tttx-icon.d.ts +14 -0
- package/dist/types/components/atoms/tttx-icon/tttx-icon.stories.d.ts +21 -0
- 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 +5 -0
- package/dist/types/components/atoms/tttx-popover-content/tttx-popover-content.d.ts +7 -0
- package/dist/types/components/atoms/tttx-popover-content/tttx-popover-content.stories.d.ts +18 -0
- package/dist/types/components/atoms/ttx-checkbox/tttx-checkbox.d.ts +9 -0
- package/dist/types/{docs/template.stories.d.ts → components/atoms/ttx-checkbox/tttx-checkbox.stories.d.ts} +1 -0
- package/dist/types/components/molecules/tttx-form/tttx-form.d.ts +11 -0
- package/dist/types/components/molecules/tttx-form/tttx-form.stories.d.ts +13 -0
- package/dist/types/components/molecules/tttx-input/tttx-input.d.ts +20 -0
- package/dist/types/components/molecules/tttx-input/tttx-input.stories.d.ts +60 -0
- package/dist/types/components/palette.stories.d.ts +6 -0
- package/dist/types/components.d.ts +142 -38
- package/dist/types/icons.d.ts +2 -0
- package/dist/types/stencil-public-runtime.d.ts +59 -3
- package/loader/index.d.ts +9 -0
- package/package.json +33 -25
- package/readme.md +14 -32
- package/dist/cjs/toolbar-656be6e6.js +0 -34259
- package/dist/cjs/tttx-page.cjs.entry.js +0 -927
- package/dist/cjs/tttx-worksheet.cjs.entry.js +0 -47
- package/dist/collection/components/components/tttx-icon/tttx-icon.css +0 -89
- package/dist/collection/components/components/tttx-icon/tttx-icon.js +0 -59
- package/dist/collection/components/components/tttx-icon/tttx-icon.stories.js +0 -40
- package/dist/collection/components/patterns/tttx-page/tttx-page.css +0 -162
- package/dist/collection/components/patterns/tttx-page/tttx-page.js +0 -213
- package/dist/collection/components/patterns/tttx-page/tttx-page.stories.js +0 -80
- package/dist/collection/components/patterns/tttx-worksheet/tttx-worksheet.css +0 -134
- package/dist/collection/components/patterns/tttx-worksheet/tttx-worksheet.js +0 -70
- package/dist/collection/components/patterns/tttx-worksheet/tttx-worksheet.stories.js +0 -44
- package/dist/collection/docs/template.stories.js +0 -10
- package/dist/components/tttx-page.js +0 -953
- package/dist/components/tttx-worksheet.js +0 -6
- package/dist/components/tttx-worksheet2.js +0 -34288
- package/dist/esm/toolbar-cede4385.js +0 -34231
- package/dist/esm/tttx-page.entry.js +0 -923
- package/dist/esm/tttx-worksheet.entry.js +0 -43
- package/dist/tttx/p-4b57de2e.entry.js +0 -1
- package/dist/tttx/p-61f78304.entry.js +0 -1
- package/dist/tttx/p-7244abd4.entry.js +0 -1
- package/dist/tttx/p-d038fe18.js +0 -1
- package/dist/tttx/p-ddfeb0ba.js +0 -2
- package/dist/tttx/tttx.css +0 -1
- package/dist/types/components/components/tttx-icon/tttx-icon.d.ts +0 -5
- package/dist/types/components/components/tttx-icon/tttx-icon.stories.d.ts +0 -24
- package/dist/types/components/patterns/tttx-page/tttx-page.d.ts +0 -21
- package/dist/types/components/patterns/tttx-page/tttx-page.stories.d.ts +0 -48
- package/dist/types/components/patterns/tttx-worksheet/tttx-worksheet.d.ts +0 -9
- package/dist/types/components/patterns/tttx-worksheet/tttx-worksheet.stories.d.ts +0 -23
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-8a4cb9bc.js');
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
|
-
Stencil Client Patch Esm v2.
|
|
8
|
+
Stencil Client Patch Esm v2.22.3 | MIT Licensed | https://stenciljs.com
|
|
9
9
|
*/
|
|
10
10
|
const patchEsm = () => {
|
|
11
11
|
return index.promiseResolve();
|
|
@@ -14,8 +14,9 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["tttx-
|
|
17
|
+
return index.bootstrapLazy([["tttx-input.cjs",[[1,"tttx-input",{"label":[1],"valid":[4],"showerrormsg":[4],"errormsg":[1],"value":[1025],"type":[1],"placeholder":[1],"pattern":[1],"iconleft":[1],"iconright":[1],"required":[4],"isfocused":[32]}]]],["tttx-button.cjs",[[1,"tttx-button",{"fontColor":[1,"font-color"],"buttonStyle":[1,"button-style"]},[[0,"clickEvent","onClicked"]]]]],["tttx-checkbox.cjs",[[1,"tttx-checkbox",{"value":[4],"label":[1],"required":[4]}]]],["tttx-form.cjs",[[1,"tttx-form",{"dataAttribute":[1,"data-attribute"],"functionAttribute":[1,"function-attribute"]}]]],["tttx-loading-spinner.cjs",[[1,"tttx-loading-spinner",{"loadingMessage":[1028,"loading-message"],"size":[1025]}]]],["tttx-popover-content.cjs",[[1,"tttx-popover-content",{"header":[1],"body":[1],"linkcontext":[1],"linktext":[1]}]]],["tttx-icon.cjs",[[1,"tttx-icon",{"icon":[1],"colour":[1]},[[4,"click","handleDocumentClick"]]]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
21
|
+
exports.setNonce = index.setNonce;
|
|
21
22
|
exports.defineCustomElements = defineCustomElements;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-8a4cb9bc.js');
|
|
6
|
+
|
|
7
|
+
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}";
|
|
8
|
+
|
|
9
|
+
const TttxButton = class {
|
|
10
|
+
constructor(hostRef) {
|
|
11
|
+
index.registerInstance(this, hostRef);
|
|
12
|
+
this.clickEvent = index.createEvent(this, "clickEvent", 7);
|
|
13
|
+
this.fontColor = undefined;
|
|
14
|
+
this.buttonStyle = undefined;
|
|
15
|
+
}
|
|
16
|
+
onClick() {
|
|
17
|
+
this.clickEvent.emit('clicked');
|
|
18
|
+
}
|
|
19
|
+
onClicked(event) {
|
|
20
|
+
console.log('Picked up a clickEvent', event);
|
|
21
|
+
}
|
|
22
|
+
render() {
|
|
23
|
+
return (index.h(index.Host, null, index.h("button", { onClick: this.onClick.bind(this), class: `button ${this.fontColor} ${this.buttonStyle}` }, index.h("span", null, index.h("slot", null)))));
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
TttxButton.style = tttxButtonCss;
|
|
27
|
+
|
|
28
|
+
exports.tttx_button = TttxButton;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-8a4cb9bc.js');
|
|
6
|
+
|
|
7
|
+
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}.field{clear:both}.container{display:flex;flex-wrap:wrap;box-sizing:border-box;height:36px;border:1px solid #c8c8c8;border-radius:4px}.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}.input{flex-grow:1;border:none;outline:none;font-size:16px;padding:8px 16px;background-color:transparent}.iconleft .input{padding-left:4px}.iconright .input{padding-right:4px}.label{display:block;height:18px;font-weight:600;color:#212121;font-size:16px;margin-bottom:4px;z-index:1}.disabled{background:#f0f0f0;color:#9e9e9e;border-color:#c8c8c8}.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}:host{display:block}.spacing{margin-bottom:16px}";
|
|
8
|
+
|
|
9
|
+
const TttxCheckbox = class {
|
|
10
|
+
constructor(hostRef) {
|
|
11
|
+
index.registerInstance(this, hostRef);
|
|
12
|
+
this.valueChanged = index.createEvent(this, "valueChanged", 7);
|
|
13
|
+
this.value = undefined;
|
|
14
|
+
this.label = undefined;
|
|
15
|
+
this.required = undefined;
|
|
16
|
+
}
|
|
17
|
+
handleClick(event) {
|
|
18
|
+
const target = event.target;
|
|
19
|
+
this.value = target.checked;
|
|
20
|
+
this.valueChanged.emit(target.checked);
|
|
21
|
+
}
|
|
22
|
+
render() {
|
|
23
|
+
return (index.h(index.Host, null, index.h("div", { class: "field spacing" }, this.label && index.h("label", { class: "label" }, this.label, !this.required ? index.h("span", { class: "optional" }, " (optional)") : ''), index.h("input", { type: "checkbox", class: "input", onChange: event => this.handleClick(event), checked: this.value }))));
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
TttxCheckbox.style = tttxCheckboxCss;
|
|
27
|
+
|
|
28
|
+
exports.tttx_checkbox = TttxCheckbox;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-8a4cb9bc.js');
|
|
6
|
+
|
|
7
|
+
const TttxForm = class {
|
|
8
|
+
constructor(hostRef) {
|
|
9
|
+
index.registerInstance(this, hostRef);
|
|
10
|
+
this.formSubmit = index.createEvent(this, "formSubmit", 7);
|
|
11
|
+
this.fetchFormData = () => {
|
|
12
|
+
let validForm = true;
|
|
13
|
+
const formData = {};
|
|
14
|
+
const elements = this.el.querySelectorAll(`[${this.dataAttribute}]`);
|
|
15
|
+
elements.forEach((element) => {
|
|
16
|
+
const inputElement = element;
|
|
17
|
+
validForm = validForm ? this.validateFormField(inputElement) : false;
|
|
18
|
+
formData[inputElement.getAttribute(this.dataAttribute)] = inputElement.value;
|
|
19
|
+
});
|
|
20
|
+
return validForm ? formData : null;
|
|
21
|
+
};
|
|
22
|
+
this.dataAttribute = 'form-data';
|
|
23
|
+
this.functionAttribute = 'function-data';
|
|
24
|
+
}
|
|
25
|
+
validateFormField(element) {
|
|
26
|
+
let isValid = true;
|
|
27
|
+
const isRequired = element.hasAttribute("required");
|
|
28
|
+
if (isRequired && !element.value) {
|
|
29
|
+
// required and not set, show error
|
|
30
|
+
element.setAttribute("showerrormsg", "true");
|
|
31
|
+
isValid = false;
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
// required and set, ensure error does not show
|
|
35
|
+
element.removeAttribute("showerrormsg");
|
|
36
|
+
}
|
|
37
|
+
return isValid;
|
|
38
|
+
}
|
|
39
|
+
componentDidLoad() {
|
|
40
|
+
const elements = this.el.querySelectorAll(`[${this.functionAttribute}]`);
|
|
41
|
+
elements.forEach((element) => {
|
|
42
|
+
element.addEventListener('click', event => {
|
|
43
|
+
event.preventDefault();
|
|
44
|
+
const formData = this.fetchFormData();
|
|
45
|
+
if (formData) {
|
|
46
|
+
// only emit event if form data is valid
|
|
47
|
+
this.formSubmit.emit(this.fetchFormData());
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
render() {
|
|
53
|
+
return (index.h("div", null, index.h("slot", null)));
|
|
54
|
+
}
|
|
55
|
+
get el() { return index.getElement(this); }
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
exports.tttx_form = TttxForm;
|