@3t-transform/threeteeui 0.2.88 → 0.2.89
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-44c9fa62.js → index-992a9fb3.js} +386 -8
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/tttx-button.cjs.entry.js +1 -1
- package/dist/cjs/tttx-checkbox-group-caption.cjs.entry.js +16 -0
- package/dist/cjs/tttx-checkbox-group-heading.cjs.entry.js +16 -0
- package/dist/cjs/tttx-checkbox-group.cjs.entry.js +19 -0
- package/dist/cjs/tttx-checkbox.cjs.entry.js +43 -0
- package/dist/cjs/tttx-data-pattern.cjs.entry.js +1 -1
- package/dist/cjs/tttx-dialog-box.cjs.entry.js +1 -1
- package/dist/cjs/tttx-expander.cjs.entry.js +1 -1
- package/dist/cjs/tttx-filter_4.cjs.entry.js +1 -1
- package/dist/cjs/tttx-form.cjs.entry.js +1 -1
- package/dist/cjs/tttx-icon.cjs.entry.js +1 -1
- package/dist/cjs/tttx-keyvalue-block.cjs.entry.js +1 -1
- package/dist/cjs/tttx-loading-spinner.cjs.entry.js +1 -1
- package/dist/cjs/tttx-multiselect-box.cjs.entry.js +1 -1
- package/dist/cjs/tttx-percentage-bar.cjs.entry.js +1 -1
- package/dist/cjs/tttx-qrcode.cjs.entry.js +1 -1
- package/dist/cjs/tttx-select-box.cjs.entry.js +1 -1
- package/dist/cjs/tttx-standalone-input.cjs.entry.js +1 -1
- package/dist/cjs/tttx-tabs.cjs.entry.js +1 -1
- package/dist/cjs/tttx-tag.cjs.entry.js +1 -1
- package/dist/cjs/tttx-textarea.cjs.entry.js +1 -1
- package/dist/cjs/tttx-tree-view.cjs.entry.js +1 -1
- package/dist/cjs/tttx.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +4 -0
- package/dist/collection/components/atoms/tttx-checkbox/tttx-checkbox.css +28 -0
- package/dist/collection/components/atoms/tttx-checkbox/tttx-checkbox.js +154 -0
- package/dist/collection/components/atoms/tttx-checkbox/tttx-checkbox.stories.js +69 -0
- package/dist/collection/components/molecules/tttx-checkbox-group/components/tttx-checkbox-group-caption.js +7 -0
- package/dist/collection/components/molecules/tttx-checkbox-group/components/tttx-checkbox-group-heading.js +7 -0
- package/dist/collection/components/molecules/tttx-checkbox-group/tttx-checkbox-group.css +24 -0
- package/dist/collection/components/molecules/tttx-checkbox-group/tttx-checkbox-group.js +18 -0
- package/dist/collection/components/molecules/tttx-checkbox-group/tttx-checkbox-group.stories.js +83 -0
- package/dist/components/index.d.ts +4 -0
- package/dist/components/index.js +4 -0
- package/dist/components/tttx-checkbox-group-caption.d.ts +11 -0
- package/dist/components/tttx-checkbox-group-caption.js +29 -0
- package/dist/components/tttx-checkbox-group-heading.d.ts +11 -0
- package/dist/components/tttx-checkbox-group-heading.js +29 -0
- package/dist/components/tttx-checkbox-group.d.ts +11 -0
- package/dist/components/tttx-checkbox-group.js +33 -0
- package/dist/components/tttx-checkbox.d.ts +11 -0
- package/dist/components/tttx-checkbox.js +68 -0
- package/dist/esm/{index-65b1e0d1.js → index-b11965d8.js} +386 -8
- package/dist/esm/loader.js +3 -3
- package/dist/esm/tttx-button.entry.js +1 -1
- package/dist/esm/tttx-checkbox-group-caption.entry.js +12 -0
- package/dist/esm/tttx-checkbox-group-heading.entry.js +12 -0
- package/dist/esm/tttx-checkbox-group.entry.js +15 -0
- package/dist/esm/tttx-checkbox.entry.js +39 -0
- package/dist/esm/tttx-data-pattern.entry.js +1 -1
- package/dist/esm/tttx-dialog-box.entry.js +1 -1
- package/dist/esm/tttx-expander.entry.js +1 -1
- package/dist/esm/tttx-filter_4.entry.js +1 -1
- package/dist/esm/tttx-form.entry.js +1 -1
- package/dist/esm/tttx-icon.entry.js +1 -1
- package/dist/esm/tttx-keyvalue-block.entry.js +1 -1
- package/dist/esm/tttx-loading-spinner.entry.js +1 -1
- package/dist/esm/tttx-multiselect-box.entry.js +1 -1
- package/dist/esm/tttx-percentage-bar.entry.js +1 -1
- package/dist/esm/tttx-qrcode.entry.js +1 -1
- package/dist/esm/tttx-select-box.entry.js +1 -1
- package/dist/esm/tttx-standalone-input.entry.js +1 -1
- package/dist/esm/tttx-tabs.entry.js +1 -1
- package/dist/esm/tttx-tag.entry.js +1 -1
- package/dist/esm/tttx-textarea.entry.js +1 -1
- package/dist/esm/tttx-tree-view.entry.js +1 -1
- package/dist/esm/tttx.js +3 -3
- package/dist/tttx/p-12bb33d0.entry.js +1 -0
- package/dist/tttx/{p-15a42062.entry.js → p-15b7a577.entry.js} +1 -1
- package/dist/tttx/{p-fe46ecd4.entry.js → p-177a760d.entry.js} +1 -1
- package/dist/tttx/{p-6bd70736.entry.js → p-22738f43.entry.js} +1 -1
- package/dist/tttx/{p-1c2f0e77.entry.js → p-34f328f9.entry.js} +1 -1
- package/dist/tttx/{p-fa12ed9d.entry.js → p-61741832.entry.js} +1 -1
- package/dist/tttx/p-61ef7773.entry.js +1 -0
- package/dist/tttx/p-65bb4035.js +2 -0
- package/dist/tttx/p-67f24d17.entry.js +1 -0
- package/dist/tttx/{p-8526fe6d.entry.js → p-69642b71.entry.js} +1 -1
- package/dist/tttx/p-73a7a3b8.entry.js +1 -0
- package/dist/tttx/{p-02515882.entry.js → p-7f1452fb.entry.js} +1 -1
- package/dist/tttx/{p-1190c6e5.entry.js → p-87b6e5a9.entry.js} +1 -1
- package/dist/tttx/{p-14d89f70.entry.js → p-93e63568.entry.js} +1 -1
- package/dist/tttx/{p-ebcf2c5f.entry.js → p-9ad58b75.entry.js} +1 -1
- package/dist/tttx/{p-f12eb43b.entry.js → p-a94f7efc.entry.js} +1 -1
- package/dist/tttx/{p-aab2c93c.entry.js → p-b189ca0f.entry.js} +1 -1
- package/dist/tttx/{p-46a6a5db.entry.js → p-bc363141.entry.js} +1 -1
- package/dist/tttx/{p-f2d08143.entry.js → p-be16cf2d.entry.js} +1 -1
- package/dist/tttx/{p-0b2026f7.entry.js → p-e2dda35e.entry.js} +1 -1
- package/dist/tttx/{p-a2d59582.entry.js → p-e7b7d2e2.entry.js} +1 -1
- package/dist/tttx/{p-003798cb.entry.js → p-f27adb48.entry.js} +1 -1
- package/dist/tttx/{p-291d5ae0.entry.js → p-fe6c321b.entry.js} +1 -1
- package/dist/tttx/tttx.esm.js +1 -1
- package/dist/types/components/atoms/tttx-checkbox/tttx-checkbox.d.ts +17 -0
- package/dist/types/components/atoms/tttx-checkbox/tttx-checkbox.stories.d.ts +47 -0
- package/dist/types/components/molecules/tttx-checkbox-group/components/tttx-checkbox-group-caption.d.ts +3 -0
- package/dist/types/components/molecules/tttx-checkbox-group/components/tttx-checkbox-group-heading.d.ts +3 -0
- package/dist/types/components/molecules/tttx-checkbox-group/interfaces.d.ts +10 -0
- package/dist/types/components/molecules/tttx-checkbox-group/tttx-checkbox-group.d.ts +3 -0
- package/dist/types/components/molecules/tttx-checkbox-group/tttx-checkbox-group.stories.d.ts +15 -0
- package/dist/types/components.d.ts +67 -0
- package/package.json +3 -3
- package/dist/tttx/p-99a41e8e.js +0 -2
package/dist/collection/components/molecules/tttx-checkbox-group/tttx-checkbox-group.stories.js
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
title: 'Molecules/CheckboxGroup',
|
|
3
|
+
component: 'tttx-checkbox-group',
|
|
4
|
+
argTypes: {
|
|
5
|
+
checkboxGroupHeading: {
|
|
6
|
+
control: { type: 'text' },
|
|
7
|
+
default: 'Checkbox Group',
|
|
8
|
+
},
|
|
9
|
+
},
|
|
10
|
+
};
|
|
11
|
+
const CheckboxGroupTemplate = ({ heading, checkboxData, captionTop, captionBottom }) => {
|
|
12
|
+
return `
|
|
13
|
+
<tttx-checkbox-group >
|
|
14
|
+
${heading ? `
|
|
15
|
+
<tttx-checkbox-group-heading>
|
|
16
|
+
${heading}
|
|
17
|
+
</tttx-checkbox-group-heading>
|
|
18
|
+
` : ''}
|
|
19
|
+
|
|
20
|
+
${captionTop ? `
|
|
21
|
+
<tttx-checkbox-group-caption>
|
|
22
|
+
${captionTop}
|
|
23
|
+
</tttx-checkbox-group-caption>
|
|
24
|
+
` : ''}
|
|
25
|
+
|
|
26
|
+
${checkboxData.map(checkboxInfo => {
|
|
27
|
+
const { label, checked, inline, indeterminate } = checkboxInfo;
|
|
28
|
+
return `
|
|
29
|
+
<tttx-checkbox
|
|
30
|
+
checkbox-id="checkbox"
|
|
31
|
+
label="${label}"
|
|
32
|
+
${inline && 'inline'}
|
|
33
|
+
${indeterminate && 'indeterminate'}
|
|
34
|
+
${checked && 'checked'}
|
|
35
|
+
>
|
|
36
|
+
</tttx-checkbox> `;
|
|
37
|
+
}).join('')}
|
|
38
|
+
|
|
39
|
+
${captionBottom ? `
|
|
40
|
+
<tttx-checkbox-group-caption>
|
|
41
|
+
${captionBottom}
|
|
42
|
+
</tttx-checkbox-group-caption>
|
|
43
|
+
` : ''}
|
|
44
|
+
</tttx-checkbox-group>
|
|
45
|
+
`;
|
|
46
|
+
};
|
|
47
|
+
export const singleCheckbox = CheckboxGroupTemplate.bind({});
|
|
48
|
+
singleCheckbox.args = {
|
|
49
|
+
heading: 'Safety-critical',
|
|
50
|
+
captionTop: 'This tags selected activities as safety-critical and can be changed indivudually once added',
|
|
51
|
+
checkboxData: [
|
|
52
|
+
{
|
|
53
|
+
checkboxId: 'checkbox-id',
|
|
54
|
+
label: 'Tag as safety-critical',
|
|
55
|
+
}
|
|
56
|
+
]
|
|
57
|
+
};
|
|
58
|
+
export const multipleCheckboxes = CheckboxGroupTemplate.bind({});
|
|
59
|
+
multipleCheckboxes.args = {
|
|
60
|
+
heading: 'Favorite Cartoon Dad',
|
|
61
|
+
captionTop: 'This is a primary judge of character',
|
|
62
|
+
checkboxData: [
|
|
63
|
+
{
|
|
64
|
+
checkboxId: 'checkbox-id',
|
|
65
|
+
label: 'Homer Sampson',
|
|
66
|
+
checked: true
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
checkboxId: 'checkbox-id',
|
|
70
|
+
label: 'Fred Flinrock',
|
|
71
|
+
indeterminate: true
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
checkboxId: 'checkbox-id',
|
|
75
|
+
label: 'George Aeroplanesone',
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
checkboxId: 'checkbox-id',
|
|
79
|
+
label: 'Other',
|
|
80
|
+
}
|
|
81
|
+
],
|
|
82
|
+
captionBottom: 'Only messing',
|
|
83
|
+
};
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
/* tttx custom elements */
|
|
2
2
|
export { TttxButton as TttxButton } from '../types/components/atoms/tttx-button/tttx-button';
|
|
3
|
+
export { TttxCheckbox as TttxCheckbox } from '../types/components/atoms/tttx-checkbox/tttx-checkbox';
|
|
4
|
+
export { TttxCheckboxGroup as TttxCheckboxGroup } from '../types/components/molecules/tttx-checkbox-group/tttx-checkbox-group';
|
|
5
|
+
export { TttxCheckboxGroupCaption as TttxCheckboxGroupCaption } from '../types/components/molecules/tttx-checkbox-group/components/tttx-checkbox-group-caption';
|
|
6
|
+
export { TttxCheckboxGroupHeading as TttxCheckboxGroupHeading } from '../types/components/molecules/tttx-checkbox-group/components/tttx-checkbox-group-heading';
|
|
3
7
|
export { TttxDataPattern as TttxDataPattern } from '../types/components/organisms/tttx-data-pattern/tttx-data-pattern';
|
|
4
8
|
export { TttxDialogBox as TttxDialogBox } from '../types/components/molecules/tttx-dialog-box/tttx-dialog-box';
|
|
5
9
|
export { TttxExpander as TttxExpander } from '../types/components/molecules/tttx-expander/tttx-expander';
|
package/dist/components/index.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
export { setAssetPath, setNonce, setPlatformOptions } from '@stencil/core/internal/client';
|
|
2
2
|
export { TttxButton, defineCustomElement as defineCustomElementTttxButton } from './tttx-button.js';
|
|
3
|
+
export { TttxCheckbox, defineCustomElement as defineCustomElementTttxCheckbox } from './tttx-checkbox.js';
|
|
4
|
+
export { TttxCheckboxGroup, defineCustomElement as defineCustomElementTttxCheckboxGroup } from './tttx-checkbox-group.js';
|
|
5
|
+
export { TttxCheckboxGroupCaption, defineCustomElement as defineCustomElementTttxCheckboxGroupCaption } from './tttx-checkbox-group-caption.js';
|
|
6
|
+
export { TttxCheckboxGroupHeading, defineCustomElement as defineCustomElementTttxCheckboxGroupHeading } from './tttx-checkbox-group-heading.js';
|
|
3
7
|
export { TttxDataPattern, defineCustomElement as defineCustomElementTttxDataPattern } from './tttx-data-pattern.js';
|
|
4
8
|
export { TttxDialogBox, defineCustomElement as defineCustomElementTttxDialogBox } from './tttx-dialog-box.js';
|
|
5
9
|
export { TttxExpander, defineCustomElement as defineCustomElementTttxExpander } from './tttx-expander.js';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface TttxCheckboxGroupCaption extends Components.TttxCheckboxGroupCaption, HTMLElement {}
|
|
4
|
+
export const TttxCheckboxGroupCaption: {
|
|
5
|
+
prototype: TttxCheckboxGroupCaption;
|
|
6
|
+
new (): TttxCheckboxGroupCaption;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
|
|
3
|
+
const TttxCheckboxGroupCaption$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
4
|
+
constructor() {
|
|
5
|
+
super();
|
|
6
|
+
this.__registerHost();
|
|
7
|
+
}
|
|
8
|
+
render() {
|
|
9
|
+
return (h(Host, null, h("div", { class: 'tttx-checkbox-group__caption' }, h("slot", null))));
|
|
10
|
+
}
|
|
11
|
+
}, [4, "tttx-checkbox-group-caption"]);
|
|
12
|
+
function defineCustomElement$1() {
|
|
13
|
+
if (typeof customElements === "undefined") {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
const components = ["tttx-checkbox-group-caption"];
|
|
17
|
+
components.forEach(tagName => { switch (tagName) {
|
|
18
|
+
case "tttx-checkbox-group-caption":
|
|
19
|
+
if (!customElements.get(tagName)) {
|
|
20
|
+
customElements.define(tagName, TttxCheckboxGroupCaption$1);
|
|
21
|
+
}
|
|
22
|
+
break;
|
|
23
|
+
} });
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const TttxCheckboxGroupCaption = TttxCheckboxGroupCaption$1;
|
|
27
|
+
const defineCustomElement = defineCustomElement$1;
|
|
28
|
+
|
|
29
|
+
export { TttxCheckboxGroupCaption, defineCustomElement };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface TttxCheckboxGroupHeading extends Components.TttxCheckboxGroupHeading, HTMLElement {}
|
|
4
|
+
export const TttxCheckboxGroupHeading: {
|
|
5
|
+
prototype: TttxCheckboxGroupHeading;
|
|
6
|
+
new (): TttxCheckboxGroupHeading;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
|
|
3
|
+
const TttxCheckboxGroupHeading$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
4
|
+
constructor() {
|
|
5
|
+
super();
|
|
6
|
+
this.__registerHost();
|
|
7
|
+
}
|
|
8
|
+
render() {
|
|
9
|
+
return (h(Host, null, h("div", { class: 'tttx-checkbox-group__heading' }, h("slot", null))));
|
|
10
|
+
}
|
|
11
|
+
}, [4, "tttx-checkbox-group-heading"]);
|
|
12
|
+
function defineCustomElement$1() {
|
|
13
|
+
if (typeof customElements === "undefined") {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
const components = ["tttx-checkbox-group-heading"];
|
|
17
|
+
components.forEach(tagName => { switch (tagName) {
|
|
18
|
+
case "tttx-checkbox-group-heading":
|
|
19
|
+
if (!customElements.get(tagName)) {
|
|
20
|
+
customElements.define(tagName, TttxCheckboxGroupHeading$1);
|
|
21
|
+
}
|
|
22
|
+
break;
|
|
23
|
+
} });
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const TttxCheckboxGroupHeading = TttxCheckboxGroupHeading$1;
|
|
27
|
+
const defineCustomElement = defineCustomElement$1;
|
|
28
|
+
|
|
29
|
+
export { TttxCheckboxGroupHeading, defineCustomElement };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface TttxCheckboxGroup extends Components.TttxCheckboxGroup, HTMLElement {}
|
|
4
|
+
export const TttxCheckboxGroup: {
|
|
5
|
+
prototype: TttxCheckboxGroup;
|
|
6
|
+
new (): TttxCheckboxGroup;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
|
|
3
|
+
const tttxCheckboxGroupCss = ".material-symbols-rounded{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}.tttx-checkbox-group{display:flex;flex-direction:column}.tttx-checkbox-group__caption{color:#757575;font-family:\"Roboto\", sans-serif;font-size:14px;font-weight:normal;line-height:19px;margin-bottom:4px}.tttx-checkbox-group__heading{color:#212121;font-family:\"Roboto\", sans-serif;font-size:16px;font-weight:500;line-height:16px;margin-bottom:4px}";
|
|
4
|
+
|
|
5
|
+
const TttxCheckboxGroup$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
6
|
+
constructor() {
|
|
7
|
+
super();
|
|
8
|
+
this.__registerHost();
|
|
9
|
+
this.__attachShadow();
|
|
10
|
+
}
|
|
11
|
+
render() {
|
|
12
|
+
return (h(Host, null, h("div", { class: 'tttx-checkbox-group' }, h("slot", null))));
|
|
13
|
+
}
|
|
14
|
+
static get style() { return tttxCheckboxGroupCss; }
|
|
15
|
+
}, [1, "tttx-checkbox-group"]);
|
|
16
|
+
function defineCustomElement$1() {
|
|
17
|
+
if (typeof customElements === "undefined") {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
const components = ["tttx-checkbox-group"];
|
|
21
|
+
components.forEach(tagName => { switch (tagName) {
|
|
22
|
+
case "tttx-checkbox-group":
|
|
23
|
+
if (!customElements.get(tagName)) {
|
|
24
|
+
customElements.define(tagName, TttxCheckboxGroup$1);
|
|
25
|
+
}
|
|
26
|
+
break;
|
|
27
|
+
} });
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const TttxCheckboxGroup = TttxCheckboxGroup$1;
|
|
31
|
+
const defineCustomElement = defineCustomElement$1;
|
|
32
|
+
|
|
33
|
+
export { TttxCheckboxGroup, defineCustomElement };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface TttxCheckbox extends Components.TttxCheckbox, HTMLElement {}
|
|
4
|
+
export const TttxCheckbox: {
|
|
5
|
+
prototype: TttxCheckbox;
|
|
6
|
+
new (): TttxCheckbox;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,68 @@
|
|
|
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 tttxCheckboxCss = ".material-symbols-rounded{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}.tttx-checkbox{padding:8px;display:flex;justify-content:flex-start;font-size:16px;align-items:center;font-weight:normal;line-height:19px}.tttx-checkbox tttx-icon{height:24px}.tttx-checkbox.--inline{display:inline-flex}.tttx-checkbox__input{display:none}.tttx-checkbox__label{margin-left:8px;padding-right:0;color:#212121;font-weight:normal}";
|
|
5
|
+
|
|
6
|
+
const TttxCheckbox$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
7
|
+
constructor() {
|
|
8
|
+
super();
|
|
9
|
+
this.__registerHost();
|
|
10
|
+
this.checkboxChangeEvent = createEvent(this, "checkboxChangeEvent", 3);
|
|
11
|
+
this.checkboxId = undefined;
|
|
12
|
+
this.label = undefined;
|
|
13
|
+
this.inline = false;
|
|
14
|
+
this.indeterminate = false;
|
|
15
|
+
this.checked = undefined;
|
|
16
|
+
}
|
|
17
|
+
watchIndeterminateChange(newValue) {
|
|
18
|
+
this.checkbox.indeterminate = newValue;
|
|
19
|
+
}
|
|
20
|
+
onClick() {
|
|
21
|
+
const { checked, indeterminate } = this;
|
|
22
|
+
this.checkboxChangeEvent.emit({
|
|
23
|
+
indeterminate,
|
|
24
|
+
checked
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
componentDidLoad() {
|
|
28
|
+
this.checkbox.indeterminate = this.indeterminate;
|
|
29
|
+
}
|
|
30
|
+
render() {
|
|
31
|
+
const checkBoxIcon = this.checked ? 'check_box' : 'check_box_outline_blank';
|
|
32
|
+
const renderedIcon = this.indeterminate ? 'indeterminate_check_box' : checkBoxIcon;
|
|
33
|
+
return (h(Host, null, h("label", { class: `tttx-checkbox ${this.inline ? '--inline' : ''}` }, h("input", { class: "tttx-checkbox__input", type: "checkbox", id: this.checkboxId, checked: this.checked, ref: (el) => this.checkbox = el }), h("tttx-icon", { color: this.checked ? 'blue' : null, icon: renderedIcon, onClick: this.onClick.bind(this) }), h("span", { class: "tttx-checkbox__label" }, this.label))));
|
|
34
|
+
}
|
|
35
|
+
static get watchers() { return {
|
|
36
|
+
"indeterminate": ["watchIndeterminateChange"]
|
|
37
|
+
}; }
|
|
38
|
+
static get style() { return tttxCheckboxCss; }
|
|
39
|
+
}, [0, "tttx-checkbox", {
|
|
40
|
+
"checkboxId": [1, "checkbox-id"],
|
|
41
|
+
"label": [1],
|
|
42
|
+
"inline": [4],
|
|
43
|
+
"indeterminate": [4],
|
|
44
|
+
"checked": [4]
|
|
45
|
+
}]);
|
|
46
|
+
function defineCustomElement$1() {
|
|
47
|
+
if (typeof customElements === "undefined") {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
const components = ["tttx-checkbox", "tttx-icon"];
|
|
51
|
+
components.forEach(tagName => { switch (tagName) {
|
|
52
|
+
case "tttx-checkbox":
|
|
53
|
+
if (!customElements.get(tagName)) {
|
|
54
|
+
customElements.define(tagName, TttxCheckbox$1);
|
|
55
|
+
}
|
|
56
|
+
break;
|
|
57
|
+
case "tttx-icon":
|
|
58
|
+
if (!customElements.get(tagName)) {
|
|
59
|
+
defineCustomElement$2();
|
|
60
|
+
}
|
|
61
|
+
break;
|
|
62
|
+
} });
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
const TttxCheckbox = TttxCheckbox$1;
|
|
66
|
+
const defineCustomElement = defineCustomElement$1;
|
|
67
|
+
|
|
68
|
+
export { TttxCheckbox, defineCustomElement };
|