@3t-transform/threeteeui 0.0.24 → 0.1.0
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-bc080fb4.js → index-451f61dd.js} +51 -60
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/tttx-button.cjs.entry.js +1 -1
- package/dist/cjs/tttx-form.cjs.entry.js +377 -0
- package/dist/cjs/tttx-icon.cjs.entry.js +2 -2
- package/dist/cjs/tttx-keyvalue-block.cjs.entry.js +8 -5
- package/dist/cjs/tttx-list.cjs.entry.js +1677 -7
- package/dist/cjs/tttx-loading-spinner.cjs.entry.js +1 -1
- package/dist/cjs/tttx-standalone-input.cjs.entry.js +7 -3
- package/dist/cjs/tttx.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/atoms/tttx-icon/tttx-icon.css +4 -0
- package/dist/collection/components/atoms/tttx-icon/tttx-icon.stories.js +1 -1
- package/dist/collection/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.js +7 -4
- package/dist/collection/components/molecules/tttx-form/lib/setErrorState.js +35 -0
- package/dist/collection/components/molecules/tttx-form/lib/validityCheck.js +58 -0
- package/dist/collection/components/molecules/tttx-form/tttx-form.css +336 -0
- package/dist/collection/components/molecules/tttx-form/tttx-form.js +364 -0
- package/dist/collection/components/molecules/tttx-form/tttx-form.stories.js +127 -0
- package/dist/collection/components/molecules/tttx-list/tttx-list.css +8 -2
- package/dist/collection/components/molecules/tttx-list/tttx-list.js +33 -7
- package/dist/collection/components/molecules/tttx-list/tttx-list.stories.js +46 -14
- package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.css +25 -3
- package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.js +57 -1
- package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.stories.js +14 -1
- package/dist/collection/shared/domsanitiser.options.js +14 -0
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/{tttx-table.d.ts → tttx-form.d.ts} +4 -4
- package/dist/components/tttx-form.js +394 -0
- package/dist/components/tttx-icon2.js +1 -1
- package/dist/components/tttx-keyvalue-block.js +7 -4
- package/dist/components/tttx-list.js +1678 -7
- package/dist/components/tttx-standalone-input.js +9 -2
- package/dist/esm/{index-901bfd55.js → index-0350f122.js} +51 -60
- package/dist/esm/loader.js +2 -2
- package/dist/esm/tttx-button.entry.js +1 -1
- package/dist/esm/tttx-form.entry.js +373 -0
- package/dist/esm/tttx-icon.entry.js +2 -2
- package/dist/esm/tttx-keyvalue-block.entry.js +8 -5
- package/dist/esm/tttx-list.entry.js +1677 -7
- package/dist/esm/tttx-loading-spinner.entry.js +1 -1
- package/dist/esm/tttx-standalone-input.entry.js +7 -3
- package/dist/esm/tttx.js +2 -2
- package/dist/tttx/{p-a4077908.entry.js → p-1b015a9d.entry.js} +1 -1
- package/dist/tttx/{p-9a382959.entry.js → p-4f3958fa.entry.js} +1 -1
- package/dist/tttx/p-62869344.js +2 -0
- package/dist/tttx/{p-0ae51ec5.entry.js → p-92465671.entry.js} +1 -1
- package/dist/tttx/p-a0179cb1.entry.js +1 -0
- package/dist/tttx/p-b0a6b872.entry.js +1 -0
- package/dist/tttx/p-cd1565e0.entry.js +3 -0
- package/dist/tttx/p-ce015353.entry.js +1 -0
- package/dist/tttx/tttx.esm.js +1 -1
- package/dist/types/components/molecules/tttx-form/lib/setErrorState.d.ts +13 -0
- package/dist/types/components/molecules/tttx-form/lib/validityCheck.d.ts +17 -0
- package/dist/types/components/molecules/tttx-form/tttx-form.d.ts +114 -0
- package/dist/types/components/molecules/{tttx-table/tttx-table.stories.d.ts → tttx-form/tttx-form.stories.d.ts} +2 -10
- package/dist/types/components/molecules/tttx-list/interfaces.d.ts +4 -2
- package/dist/types/components/molecules/tttx-list/tttx-list.d.ts +3 -1
- package/dist/types/components/molecules/tttx-list/tttx-list.stories.d.ts +7 -0
- package/dist/types/components/molecules/tttx-standalone-input/tttx-standalone-input.d.ts +3 -0
- package/dist/types/components/molecules/tttx-standalone-input/tttx-standalone-input.stories.d.ts +16 -0
- package/dist/types/components.d.ts +32 -28
- package/dist/types/shared/domsanitiser.options.d.ts +10 -0
- package/package.json +1 -1
- package/dist/cjs/tttx-table.cjs.entry.js +0 -60
- package/dist/collection/components/atoms/tttx-button/test/tttx-button.e2e.js +0 -9
- package/dist/collection/components/atoms/tttx-button/test/tttx-button.spec.js +0 -43
- package/dist/collection/components/atoms/tttx-icon/test/tttx-icon.e2e.js +0 -9
- package/dist/collection/components/atoms/tttx-icon/test/tttx-icon.spec.js +0 -16
- package/dist/collection/components/atoms/tttx-keyvalue-block/test/tttx-keyvalue-block.spec.js +0 -164
- package/dist/collection/components/atoms/tttx-loading-spinner/Test/tttx-loading-spinner.spec.js +0 -64
- package/dist/collection/components/molecules/tttx-list/test/tttx-list.spec.js +0 -151
- package/dist/collection/components/molecules/tttx-standalone-input/test/tttx-standalone-input.e2e.js +0 -9
- package/dist/collection/components/molecules/tttx-standalone-input/test/tttx-standalone-input.spec.js +0 -146
- package/dist/collection/components/molecules/tttx-table/test/tttx-table.e2e.js +0 -9
- package/dist/collection/components/molecules/tttx-table/tttx-table.css +0 -166
- package/dist/collection/components/molecules/tttx-table/tttx-table.js +0 -174
- package/dist/collection/components/molecules/tttx-table/tttx-table.stories.js +0 -81
- package/dist/components/tttx-table.js +0 -85
- package/dist/esm/tttx-table.entry.js +0 -56
- package/dist/tttx/p-1ec23160.entry.js +0 -1
- package/dist/tttx/p-300ff6a8.entry.js +0 -1
- package/dist/tttx/p-32ad02d3.entry.js +0 -1
- package/dist/tttx/p-80cf5236.entry.js +0 -1
- package/dist/tttx/p-a1bd16a1.entry.js +0 -1
- package/dist/tttx/p-a6953900.entry.js +0 -1
- package/dist/tttx/p-b46e3c59.entry.js +0 -1
- package/dist/tttx/p-c290160b.js +0 -2
- package/dist/tttx/p-dc179257.entry.js +0 -1
- package/dist/tttx/p-e19eb07e.entry.js +0 -1
- package/dist/tttx/p-e4341658.entry.js +0 -1
- package/dist/types/components/atoms/tttx-button/test/tttx-button.e2e.d.ts +0 -1
- package/dist/types/components/atoms/tttx-button/test/tttx-button.spec.d.ts +0 -1
- package/dist/types/components/atoms/tttx-icon/test/tttx-icon.e2e.d.ts +0 -1
- package/dist/types/components/atoms/tttx-icon/test/tttx-icon.spec.d.ts +0 -1
- package/dist/types/components/atoms/tttx-keyvalue-block/test/tttx-keyvalue-block.spec.d.ts +0 -1
- package/dist/types/components/atoms/tttx-loading-spinner/Test/tttx-loading-spinner.spec.d.ts +0 -1
- package/dist/types/components/molecules/tttx-list/test/tttx-list.spec.d.ts +0 -1
- package/dist/types/components/molecules/tttx-standalone-input/test/tttx-standalone-input.e2e.d.ts +0 -1
- package/dist/types/components/molecules/tttx-standalone-input/test/tttx-standalone-input.spec.d.ts +0 -1
- package/dist/types/components/molecules/tttx-table/test/tttx-table.e2e.d.ts +0 -1
- package/dist/types/components/molecules/tttx-table/tttx-table.d.ts +0 -15
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { withActions } from '@storybook/addon-actions/decorator';
|
|
2
|
-
const templateData = [
|
|
3
|
-
{ name: 'John', age: 25, faveColor: 'blue' },
|
|
4
|
-
{ name: 'Jane', age: 30, faveColor: 'green' },
|
|
5
|
-
{ name: 'Bob', age: 40, faveColor: 'red' },
|
|
6
|
-
];
|
|
7
|
-
const templateHeaders = [
|
|
8
|
-
{
|
|
9
|
-
key: 'name',
|
|
10
|
-
label: 'Name'
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
key: 'age',
|
|
14
|
-
label: 'Age'
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
key: 'faveColor',
|
|
18
|
-
label: '',
|
|
19
|
-
actions: [
|
|
20
|
-
{
|
|
21
|
-
label: 'Edit',
|
|
22
|
-
icon: 'edit',
|
|
23
|
-
action: 'edit'
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
label: 'Delete',
|
|
27
|
-
icon: 'delete',
|
|
28
|
-
action: 'delete'
|
|
29
|
-
}
|
|
30
|
-
]
|
|
31
|
-
}
|
|
32
|
-
];
|
|
33
|
-
export default {
|
|
34
|
-
title: 'Molecules/Table',
|
|
35
|
-
component: 'tttx-table',
|
|
36
|
-
argTypes: {
|
|
37
|
-
loading: {
|
|
38
|
-
control: { type: 'boolean' },
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
parameters: {
|
|
42
|
-
actions: {
|
|
43
|
-
handles: ['rowSelected', 'headerClicked'],
|
|
44
|
-
},
|
|
45
|
-
},
|
|
46
|
-
decorators: [withActions],
|
|
47
|
-
};
|
|
48
|
-
const TemplateTable = ({ headers, data, loading, selected }) => `
|
|
49
|
-
|
|
50
|
-
<tttx-table
|
|
51
|
-
id="table"
|
|
52
|
-
></tttx-table>
|
|
53
|
-
|
|
54
|
-
<script>
|
|
55
|
-
if (!table) {
|
|
56
|
-
const table = document.getElementById('table');
|
|
57
|
-
}
|
|
58
|
-
table.headers = ${JSON.stringify(headers)};
|
|
59
|
-
table.data = ${JSON.stringify(data)};
|
|
60
|
-
table.loading = ${loading};
|
|
61
|
-
table.selected = ${selected};
|
|
62
|
-
</script>
|
|
63
|
-
|
|
64
|
-
`;
|
|
65
|
-
export const BasicTable = TemplateTable.bind({});
|
|
66
|
-
BasicTable.args = {
|
|
67
|
-
headers: templateHeaders,
|
|
68
|
-
data: templateData
|
|
69
|
-
};
|
|
70
|
-
export const TablePreSelected = TemplateTable.bind({});
|
|
71
|
-
TablePreSelected.args = {
|
|
72
|
-
headers: templateHeaders,
|
|
73
|
-
data: templateData,
|
|
74
|
-
selected: 1
|
|
75
|
-
};
|
|
76
|
-
export const TableLoading = TemplateTable.bind({});
|
|
77
|
-
TableLoading.args = {
|
|
78
|
-
headers: templateHeaders,
|
|
79
|
-
data: templateData,
|
|
80
|
-
loading: true
|
|
81
|
-
};
|
|
@@ -1,85 +0,0 @@
|
|
|
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 tttxTableCss = "// SPACING $spacing-unit: 4px; // REGULAR $horizontal-spacing: $spacing-unit * 4; $vertical-spacing: $spacing-unit * 2; $base-padding: $vertical-spacing $horizontal-spacing; $base-height: $spacing-unit * 9; $component-spacing: $spacing-unit * 4; // SMALL $horizontal-spacing-sm: $spacing-unit * 2; $vertical-spacing-sm: $spacing-unit * 1; $base-padding-sm: $vertical-spacing-sm $horizontal-spacing-sm; $base-height-sm: $spacing-unit * 7; // COLOURS $grey-0: #212121; $grey-1: #363636; $grey-2: #4c4c4c; $grey-3: #636363; $grey-4: #757575; $grey-5: #9e9e9e; $grey-6: #aeaeae; $grey-7: #c8c8c8; $grey-8: #e3e3e3; $grey-9: #f0f0f0; $white: white; $black: $grey-0; $transparent: transparent; $blue-0: #00187c; $blue-1: #032e8c; $blue-2: #0849a3; $blue-3: #0951a8; $blue-4: #1169ba; $blue-5: #1479c6; $blue-6: #5194d2; $blue-7: #7aacdd; $blue-8: #b9d5ed; $blue-9: #e7f1f9; $red-0: #7c0000; $red-1: #8c0000; $red-2: #a30000; $red-3: #a80000; $red-4: #ba0000; $red-5: #dc0000; $red-6: #d25151; $red-7: #dd7a7a; $red-8: #edc1c1; $red-9: #f9e7e7; $black-1: #e6e6e6; $brand: $blue-0; $accent: $blue-5; $accent-selected: $blue-9; $error: $red-5; $severity-critical: #dc0000; $severity-warning: #f59500; $severity-success: #a2bb31; $severity-info: $accent; $ui-primary: $black; $ui-secondary: $grey-4; $ui-disabled: $grey-2; $ui-placeholder: $grey-5; $ui-background: $grey-9; $ui-sheet: $white; $ui-border: #d5d5d5; // BORDERS $ui-border-radius: 4px; $ui-border-width: 1px; // TYPOGRAPHY $font-size-default: 16px; $font-size-small: 14px; .material-symbols-rounded{font-variation-settings:'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24}.skeleton{animation:skeleton-loading 1s linear infinite alternate;border-radius:4px;width:100%}@keyframes skeleton-loading{0%{background-color:hsl(200, 20%, 80%)}100%{background-color:hsl(200, 20%, 95%)}}:host{display:block}table{box-sizing:border-box;width:100%;border-collapse:collapse;border-spacing:0;border:1px solid #ddd;border-bottom:none}thead tr{height:52px;color:#757575}tbody tr{height:48px;color:#212121}tr{font-family:'Roboto', sans-serif;font-weight:400;font-size:16px;display:flex;align-items:center;border-bottom:1px solid #ddd}.selected{background-color:#F0F0F0}.checked{background-color:#e7f1f9}td,th{min-width:300px;margin-left:16px;display:flex;align-items:left}.skeleton{height:24px;display:block}.align-right{margin-left:auto}";
|
|
5
|
-
|
|
6
|
-
const TttxTable$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
7
|
-
constructor() {
|
|
8
|
-
super();
|
|
9
|
-
this.__registerHost();
|
|
10
|
-
this.__attachShadow();
|
|
11
|
-
this.rowSelected = createEvent(this, "rowSelected", 7);
|
|
12
|
-
this.headerClicked = createEvent(this, "headerClicked", 7);
|
|
13
|
-
this.headers = [];
|
|
14
|
-
this.data = [];
|
|
15
|
-
this.loading = false;
|
|
16
|
-
this.selected = -1;
|
|
17
|
-
}
|
|
18
|
-
handleKeyDown(ev) {
|
|
19
|
-
if (ev.key === 'ArrowDown' || ev.key === 'ArrowUp') {
|
|
20
|
-
this.updateSelectedIndex(ev.key);
|
|
21
|
-
this.emitRowSelected();
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
updateSelectedIndex(key) {
|
|
25
|
-
if (this.selected === -1) {
|
|
26
|
-
this.selected = 0;
|
|
27
|
-
}
|
|
28
|
-
else {
|
|
29
|
-
const isArrowDown = key === 'ArrowDown';
|
|
30
|
-
const isArrowUp = key === 'ArrowUp';
|
|
31
|
-
if (isArrowDown && this.selected < this.data.length - 1) {
|
|
32
|
-
this.selected++;
|
|
33
|
-
}
|
|
34
|
-
else if (isArrowUp && this.selected > 0) {
|
|
35
|
-
this.selected--;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
emitRowSelected() {
|
|
40
|
-
this.rowSelected.emit(this.data[this.selected]);
|
|
41
|
-
}
|
|
42
|
-
rowSelectedHandler(row) {
|
|
43
|
-
this.rowSelected.emit(row);
|
|
44
|
-
this.selected = this.data.findIndex((item) => item === row);
|
|
45
|
-
}
|
|
46
|
-
headerClickedHandler(key) {
|
|
47
|
-
this.headerClicked.emit(key);
|
|
48
|
-
}
|
|
49
|
-
render() {
|
|
50
|
-
return (h(Host, null, h("table", null, h("thead", null, h("tr", null, this.loading ?
|
|
51
|
-
[1, 2, 3].map(() => (h("th", null, h("div", { class: "skeleton" })))) :
|
|
52
|
-
this.headers && this.headers.map((header) => (h("th", { scope: "col", onClick: () => this.headerClickedHandler(header.key) }, header.label))))), h("tbody", null, this.loading ?
|
|
53
|
-
[1, 2, 3].map(() => (h("tr", null, h("td", null, h("div", { class: "skeleton" })), h("td", null, h("div", { class: "skeleton" })), h("td", null, h("div", { class: "skeleton" }))))) :
|
|
54
|
-
Object.keys(this.data).map((key, index) => (h("tr", { class: index === this.selected ? 'selected' : '', onClick: () => this.rowSelectedHandler(this.data[key]) }, this.headers.map((header) => (h("td", null, this.data[key][header.key], " ", header.actions && h("tttx-icon", { class: "align-right", icon: "more_vert" }, h("div", { slot: "popover" }, h("tttx-popover-content", { header: "The humble egg", body: "Most arthropods such as insects, vertebrates (excluding live-bearing mammals), and mollusks lay eggs, although some, such as scorpions, do not.", linkcontext: "Wikipedia_egg", linktext: "Learn more about eggs" })))))))))))));
|
|
55
|
-
}
|
|
56
|
-
static get style() { return tttxTableCss; }
|
|
57
|
-
}, [1, "tttx-table", {
|
|
58
|
-
"headers": [16],
|
|
59
|
-
"data": [16],
|
|
60
|
-
"loading": [4],
|
|
61
|
-
"selected": [2]
|
|
62
|
-
}, [[4, "keydown", "handleKeyDown"]]]);
|
|
63
|
-
function defineCustomElement$1() {
|
|
64
|
-
if (typeof customElements === "undefined") {
|
|
65
|
-
return;
|
|
66
|
-
}
|
|
67
|
-
const components = ["tttx-table", "tttx-icon"];
|
|
68
|
-
components.forEach(tagName => { switch (tagName) {
|
|
69
|
-
case "tttx-table":
|
|
70
|
-
if (!customElements.get(tagName)) {
|
|
71
|
-
customElements.define(tagName, TttxTable$1);
|
|
72
|
-
}
|
|
73
|
-
break;
|
|
74
|
-
case "tttx-icon":
|
|
75
|
-
if (!customElements.get(tagName)) {
|
|
76
|
-
defineCustomElement$2();
|
|
77
|
-
}
|
|
78
|
-
break;
|
|
79
|
-
} });
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
const TttxTable = TttxTable$1;
|
|
83
|
-
const defineCustomElement = defineCustomElement$1;
|
|
84
|
-
|
|
85
|
-
export { TttxTable, defineCustomElement };
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host } from './index-901bfd55.js';
|
|
2
|
-
|
|
3
|
-
const tttxTableCss = "// SPACING $spacing-unit: 4px; // REGULAR $horizontal-spacing: $spacing-unit * 4; $vertical-spacing: $spacing-unit * 2; $base-padding: $vertical-spacing $horizontal-spacing; $base-height: $spacing-unit * 9; $component-spacing: $spacing-unit * 4; // SMALL $horizontal-spacing-sm: $spacing-unit * 2; $vertical-spacing-sm: $spacing-unit * 1; $base-padding-sm: $vertical-spacing-sm $horizontal-spacing-sm; $base-height-sm: $spacing-unit * 7; // COLOURS $grey-0: #212121; $grey-1: #363636; $grey-2: #4c4c4c; $grey-3: #636363; $grey-4: #757575; $grey-5: #9e9e9e; $grey-6: #aeaeae; $grey-7: #c8c8c8; $grey-8: #e3e3e3; $grey-9: #f0f0f0; $white: white; $black: $grey-0; $transparent: transparent; $blue-0: #00187c; $blue-1: #032e8c; $blue-2: #0849a3; $blue-3: #0951a8; $blue-4: #1169ba; $blue-5: #1479c6; $blue-6: #5194d2; $blue-7: #7aacdd; $blue-8: #b9d5ed; $blue-9: #e7f1f9; $red-0: #7c0000; $red-1: #8c0000; $red-2: #a30000; $red-3: #a80000; $red-4: #ba0000; $red-5: #dc0000; $red-6: #d25151; $red-7: #dd7a7a; $red-8: #edc1c1; $red-9: #f9e7e7; $black-1: #e6e6e6; $brand: $blue-0; $accent: $blue-5; $accent-selected: $blue-9; $error: $red-5; $severity-critical: #dc0000; $severity-warning: #f59500; $severity-success: #a2bb31; $severity-info: $accent; $ui-primary: $black; $ui-secondary: $grey-4; $ui-disabled: $grey-2; $ui-placeholder: $grey-5; $ui-background: $grey-9; $ui-sheet: $white; $ui-border: #d5d5d5; // BORDERS $ui-border-radius: 4px; $ui-border-width: 1px; // TYPOGRAPHY $font-size-default: 16px; $font-size-small: 14px; .material-symbols-rounded{font-variation-settings:'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24}.skeleton{animation:skeleton-loading 1s linear infinite alternate;border-radius:4px;width:100%}@keyframes skeleton-loading{0%{background-color:hsl(200, 20%, 80%)}100%{background-color:hsl(200, 20%, 95%)}}:host{display:block}table{box-sizing:border-box;width:100%;border-collapse:collapse;border-spacing:0;border:1px solid #ddd;border-bottom:none}thead tr{height:52px;color:#757575}tbody tr{height:48px;color:#212121}tr{font-family:'Roboto', sans-serif;font-weight:400;font-size:16px;display:flex;align-items:center;border-bottom:1px solid #ddd}.selected{background-color:#F0F0F0}.checked{background-color:#e7f1f9}td,th{min-width:300px;margin-left:16px;display:flex;align-items:left}.skeleton{height:24px;display:block}.align-right{margin-left:auto}";
|
|
4
|
-
|
|
5
|
-
const TttxTable = class {
|
|
6
|
-
constructor(hostRef) {
|
|
7
|
-
registerInstance(this, hostRef);
|
|
8
|
-
this.rowSelected = createEvent(this, "rowSelected", 7);
|
|
9
|
-
this.headerClicked = createEvent(this, "headerClicked", 7);
|
|
10
|
-
this.headers = [];
|
|
11
|
-
this.data = [];
|
|
12
|
-
this.loading = false;
|
|
13
|
-
this.selected = -1;
|
|
14
|
-
}
|
|
15
|
-
handleKeyDown(ev) {
|
|
16
|
-
if (ev.key === 'ArrowDown' || ev.key === 'ArrowUp') {
|
|
17
|
-
this.updateSelectedIndex(ev.key);
|
|
18
|
-
this.emitRowSelected();
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
updateSelectedIndex(key) {
|
|
22
|
-
if (this.selected === -1) {
|
|
23
|
-
this.selected = 0;
|
|
24
|
-
}
|
|
25
|
-
else {
|
|
26
|
-
const isArrowDown = key === 'ArrowDown';
|
|
27
|
-
const isArrowUp = key === 'ArrowUp';
|
|
28
|
-
if (isArrowDown && this.selected < this.data.length - 1) {
|
|
29
|
-
this.selected++;
|
|
30
|
-
}
|
|
31
|
-
else if (isArrowUp && this.selected > 0) {
|
|
32
|
-
this.selected--;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
emitRowSelected() {
|
|
37
|
-
this.rowSelected.emit(this.data[this.selected]);
|
|
38
|
-
}
|
|
39
|
-
rowSelectedHandler(row) {
|
|
40
|
-
this.rowSelected.emit(row);
|
|
41
|
-
this.selected = this.data.findIndex((item) => item === row);
|
|
42
|
-
}
|
|
43
|
-
headerClickedHandler(key) {
|
|
44
|
-
this.headerClicked.emit(key);
|
|
45
|
-
}
|
|
46
|
-
render() {
|
|
47
|
-
return (h(Host, null, h("table", null, h("thead", null, h("tr", null, this.loading ?
|
|
48
|
-
[1, 2, 3].map(() => (h("th", null, h("div", { class: "skeleton" })))) :
|
|
49
|
-
this.headers && this.headers.map((header) => (h("th", { scope: "col", onClick: () => this.headerClickedHandler(header.key) }, header.label))))), h("tbody", null, this.loading ?
|
|
50
|
-
[1, 2, 3].map(() => (h("tr", null, h("td", null, h("div", { class: "skeleton" })), h("td", null, h("div", { class: "skeleton" })), h("td", null, h("div", { class: "skeleton" }))))) :
|
|
51
|
-
Object.keys(this.data).map((key, index) => (h("tr", { class: index === this.selected ? 'selected' : '', onClick: () => this.rowSelectedHandler(this.data[key]) }, this.headers.map((header) => (h("td", null, this.data[key][header.key], " ", header.actions && h("tttx-icon", { class: "align-right", icon: "more_vert" }, h("div", { slot: "popover" }, h("tttx-popover-content", { header: "The humble egg", body: "Most arthropods such as insects, vertebrates (excluding live-bearing mammals), and mollusks lay eggs, although some, such as scorpions, do not.", linkcontext: "Wikipedia_egg", linktext: "Learn more about eggs" })))))))))))));
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
TttxTable.style = tttxTableCss;
|
|
55
|
-
|
|
56
|
-
export { TttxTable as tttx_table };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,h as l,H as i}from"./p-c290160b.js";const d=class{constructor(l){t(this,l),this.keyvalues=void 0,this.horizontal=void 0}renderSingleElements(t){const i=Object.keys(t),d=[];for(let o=0;o<i.length;o++)this.horizontal?d.push(l("div",null,l("dt",null,i[o]),l("dd",null,t[i[o]]))):(d.push(l("dt",null,i[o])),d.push(l("dd",null,t[i[o]])));return d}renderArrayElements(t){const i=[];for(let d=0;d<t.length;d++){const o=t[d];this.horizontal?i.push(l("div",null,l("dt",{class:"mainTitle"},o.title),l("dt",{class:"subTitle"},o.subTitle),l("dd",null,o.data))):(i.push(l("dt",{class:"mainTitle"},o.title)),i.push(l("dt",{class:"subTitle"},o.subTitle)),i.push(l("dd",null,o.data)))}return i}render(){let t,d;return t="string"==typeof this.keyvalues?JSON.parse(this.keyvalues):this.keyvalues,d=Array.isArray(t)?this.renderArrayElements(t):this.renderSingleElements(t),l(i,null,l("dl",{class:this.horizontal?"horizontal":null},d))}};d.style=':host{display:block}dl{margin:0;padding:0;font-family:"Roboto", sans-serif;cursor:default}dt{font-weight:400;line-height:21px;font-size:16px}dt,dt.subTitle{color:#757575}dt.mainTitle{color:#212121}dd{margin:0;font-weight:400;font-size:16px;color:#212121;line-height:21px;margin-bottom:18px}dl.horizontal{display:flex;flex-direction:row;width:100%}dl.horizontal div{flex-grow:1}@media (max-width: 769px){dl.horizontal{flex-wrap:wrap}dl.horizontal div{width:50%}}@media (max-width: 600px){dl.horizontal div{width:100%}}';export{d as tttx_keyvalue_block}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,h as i}from"./p-c290160b.js";const e=class{constructor(i){t(this,i),this.data=void 0}renderListItem(t){return i("li",{class:"item"},t.element&&i("span",{innerHTML:t.element}),t.chevron&&i("tttx-icon",{class:"align-right",icon:"chevron_right"}))}render(){if(this.data)return this._data="string"==typeof this.data?JSON.parse(this.data):this.data,i("ul",{class:"list"},this._data&&this._data.map((t=>this.renderListItem(t))))}};e.style='.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}:host{display:flex;flex-direction:column}.list{margin:0;padding:0}.item{list-style:none;margin:0;padding:0;border-bottom:1px solid #d5d5d5;height:36px;display:flex;align-items:center}.item:first-of-type{border-top:1px solid #d5d5d5}.align-right{margin-left:auto}';export{e as tttx_list}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,h as i}from"./p-c290160b.js";const e=class{constructor(i){t(this,i),this.data=void 0}renderListItem(t){return i("li",{class:"item"},t.element&&i("span",{innerHTML:t.element}),t.chevron&&i("tttx-icon",{class:"align-right",icon:"chevron_right"}))}render(){if(this.data)return this._data="string"==typeof this.data?JSON.parse(this.data):this.data,i("ul",{class:"list"},this._data&&this._data.map((t=>this.renderListItem(t))))}};e.style='.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}:host{display:flex;flex-direction:column}.list{margin:0;padding:0}.item{list-style:none;margin:0;padding:0;border-bottom:1px solid #d5d5d5;height:36px;display:flex;align-items:center}.item:first-of-type{border-top:1px solid #d5d5d5}.align-right{margin-left:auto}.item-text{display:flex;align-items:center}';export{e as tttx_list}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,c as t,h as i,H as s}from"./p-c290160b.js";const r=class{constructor(i){e(this,i),this.rowSelected=t(this,"rowSelected",7),this.headerClicked=t(this,"headerClicked",7),this.headers=[],this.data=[],this.loading=!1,this.selected=-1}handleKeyDown(e){"ArrowDown"!==e.key&&"ArrowUp"!==e.key||(this.updateSelectedIndex(e.key),this.emitRowSelected())}updateSelectedIndex(e){if(-1===this.selected)this.selected=0;else{const t="ArrowUp"===e;"ArrowDown"===e&&this.selected<this.data.length-1?this.selected++:t&&this.selected>0&&this.selected--}}emitRowSelected(){this.rowSelected.emit(this.data[this.selected])}rowSelectedHandler(e){this.rowSelected.emit(e),this.selected=this.data.findIndex((t=>t===e))}headerClickedHandler(e){this.headerClicked.emit(e)}render(){return i(s,null,i("table",null,i("thead",null,i("tr",null,this.loading?[1,2,3].map((()=>i("th",null,i("div",{class:"skeleton"})))):this.headers&&this.headers.map((e=>i("th",{scope:"col",onClick:()=>this.headerClickedHandler(e.key)},e.label))))),i("tbody",null,this.loading?[1,2,3].map((()=>i("tr",null,i("td",null,i("div",{class:"skeleton"})),i("td",null,i("div",{class:"skeleton"})),i("td",null,i("div",{class:"skeleton"}))))):Object.keys(this.data).map(((e,t)=>i("tr",{class:t===this.selected?"selected":"",onClick:()=>this.rowSelectedHandler(this.data[e])},this.headers.map((t=>i("td",null,this.data[e][t.key]," ",t.actions&&i("tttx-icon",{class:"align-right",icon:"more_vert"},i("div",{slot:"popover"},i("tttx-popover-content",{header:"The humble egg",body:"Most arthropods such as insects, vertebrates (excluding live-bearing mammals), and mollusks lay eggs, although some, such as scorpions, do not.",linkcontext:"Wikipedia_egg",linktext:"Learn more about eggs"}))))))))))))}};r.style="// SPACING $spacing-unit: 4px; // REGULAR $horizontal-spacing: $spacing-unit * 4; $vertical-spacing: $spacing-unit * 2; $base-padding: $vertical-spacing $horizontal-spacing; $base-height: $spacing-unit * 9; $component-spacing: $spacing-unit * 4; // SMALL $horizontal-spacing-sm: $spacing-unit * 2; $vertical-spacing-sm: $spacing-unit * 1; $base-padding-sm: $vertical-spacing-sm $horizontal-spacing-sm; $base-height-sm: $spacing-unit * 7; // COLOURS $grey-0: #212121; $grey-1: #363636; $grey-2: #4c4c4c; $grey-3: #636363; $grey-4: #757575; $grey-5: #9e9e9e; $grey-6: #aeaeae; $grey-7: #c8c8c8; $grey-8: #e3e3e3; $grey-9: #f0f0f0; $white: white; $black: $grey-0; $transparent: transparent; $blue-0: #00187c; $blue-1: #032e8c; $blue-2: #0849a3; $blue-3: #0951a8; $blue-4: #1169ba; $blue-5: #1479c6; $blue-6: #5194d2; $blue-7: #7aacdd; $blue-8: #b9d5ed; $blue-9: #e7f1f9; $red-0: #7c0000; $red-1: #8c0000; $red-2: #a30000; $red-3: #a80000; $red-4: #ba0000; $red-5: #dc0000; $red-6: #d25151; $red-7: #dd7a7a; $red-8: #edc1c1; $red-9: #f9e7e7; $black-1: #e6e6e6; $brand: $blue-0; $accent: $blue-5; $accent-selected: $blue-9; $error: $red-5; $severity-critical: #dc0000; $severity-warning: #f59500; $severity-success: #a2bb31; $severity-info: $accent; $ui-primary: $black; $ui-secondary: $grey-4; $ui-disabled: $grey-2; $ui-placeholder: $grey-5; $ui-background: $grey-9; $ui-sheet: $white; $ui-border: #d5d5d5; // BORDERS $ui-border-radius: 4px; $ui-border-width: 1px; // TYPOGRAPHY $font-size-default: 16px; $font-size-small: 14px; .material-symbols-rounded{font-variation-settings:'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24}.skeleton{animation:skeleton-loading 1s linear infinite alternate;border-radius:4px;width:100%}@keyframes skeleton-loading{0%{background-color:hsl(200, 20%, 80%)}100%{background-color:hsl(200, 20%, 95%)}}:host{display:block}table{box-sizing:border-box;width:100%;border-collapse:collapse;border-spacing:0;border:1px solid #ddd;border-bottom:none}thead tr{height:52px;color:#757575}tbody tr{height:48px;color:#212121}tr{font-family:'Roboto', sans-serif;font-weight:400;font-size:16px;display:flex;align-items:center;border-bottom:1px solid #ddd}.selected{background-color:#F0F0F0}.checked{background-color:#e7f1f9}td,th{min-width:300px;margin-left:16px;display:flex;align-items:left}.skeleton{height:24px;display:block}.align-right{margin-left:auto}";export{r as tttx_table}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as i,h as n,H as s}from"./p-c290160b.js";const o=class{constructor(n){t(this,n),this.valueChanged=i(this,"valueChanged",7),this.focusChanged=i(this,"focusChanged",7),this.blurChanged=i(this,"blurChanged",7),this.invalidChanged=i(this,"invalidChanged",7),this.label=void 0,this.showerrormsg=void 0,this.errormsg=void 0,this.iconleft=void 0,this.iconright=void 0,this.inputAutocapitalize=void 0,this.inputAutofocus=void 0,this.inputKeyhint=void 0,this.inputIndex=void 0,this.inputTitle=void 0,this.autocomplete=void 0,this.checked=void 0,this.disabled=void 0,this.max=void 0,this.maxlength=void 0,this.min=void 0,this.minlength=void 0,this.name=void 0,this.pattern=void 0,this.placeholder=void 0,this.readonly=void 0,this.required=void 0,this.step=void 0,this.type="text",this.value=void 0}handleChange(t){const i=t.target;this.value=i.value,this.valueChanged.emit(i.value)}handleFocus(t){this.focusChanged.emit(t.target.value)}handleBlur(t){this.blurChanged.emit(t.target.value)}handleInvalid(t){this.invalidChanged.emit(t.target.value)}render(){const t=["standalone",this.showerrormsg?"invalid":""].join(" ");return n(s,null,n("label",{class:"inputBlock"},this.label,this.required?"":n("span",{class:"optional"}," (optional)"),this.iconleft&&n("div",{class:"icon-left"},n("tttx-icon",{icon:this.iconleft,color:"grey"})),n("input",{class:t,autocapitalize:this.inputAutocapitalize,autofocus:this.inputAutofocus,enterkeyhint:this.inputKeyhint,tabindex:this.inputIndex,title:this.inputTitle,autocomplete:this.autocomplete,checked:this.checked,disabled:this.disabled,max:this.max,maxlength:this.maxlength,min:this.min,minlength:this.minlength,name:this.name,pattern:this.pattern,placeholder:this.placeholder,readonly:this.readonly,required:this.required,step:this.step,type:this.type,value:this.value,onBlur:this.handleBlur.bind(this),onFocus:this.handleFocus.bind(this),onInput:this.handleChange.bind(this),onInvalid:this.handleInvalid.bind(this)}),this.iconright&&n("div",{class:"icon-right"},n("tttx-icon",{icon:this.iconright,color:"grey"})),n("span",{class:["errorBubble",this.showerrormsg&&this.errormsg?"visible":""].join(" ")},n("span",{class:"material-symbols-rounded validationicon"},"warning")," ",this.errormsg)))}};o.style='.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}';export{o as tttx_standalone_input}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as i,h as e}from"./p-c290160b.js";const s=class{constructor(e){t(this,e),this.listSelectedEvent=i(this,"listItemClick",7),this.data=void 0}renderListItem(t){return e("li",{class:"item"},t.element&&e("span",{class:"item-content",innerHTML:t.element}),t.chevron&&e("tttx-icon",{class:"align-right",icon:"chevron_right"}))}render(){if(this.data)return this._data="string"==typeof this.data?JSON.parse(this.data):this.data,e("ul",{class:"list"},this._data&&this._data.map((t=>this.renderListItem(t))))}};s.style='.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}:host{display:flex;flex-direction:column}.list{margin:0;padding:0}.item{list-style:none;margin:0;padding:0;border-bottom:1px solid #d5d5d5;height:36px;display:flex;align-items:center}.item:first-of-type{border-top:1px solid #d5d5d5}.align-right{margin-left:auto}.item-content{display:flex;align-items:center}';export{s as tttx_list}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,h as i}from"./p-c290160b.js";const e=class{constructor(i){t(this,i),this.data=void 0}renderListItem(t){return i("li",{class:"item"},t.element&&i("span",{class:"item-content",innerHTML:t.element}),t.chevron&&i("tttx-icon",{class:"align-right",icon:"chevron_right"}))}render(){if(this.data)return this._data="string"==typeof this.data?JSON.parse(this.data):this.data,i("ul",{class:"list"},this._data&&this._data.map((t=>this.renderListItem(t))))}};e.style='.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}:host{display:flex;flex-direction:column}.list{margin:0;padding:0}.item{list-style:none;margin:0;padding:0;border-bottom:1px solid #d5d5d5;height:36px;display:flex;align-items:center}.item:first-of-type{border-top:1px solid #d5d5d5}.align-right{margin-left:auto}.item-content{display:flex;align-items:center}';export{e as tttx_list}
|
package/dist/tttx/p-c290160b.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
let t,e,n=!1;const l={},s=t=>"object"==(t=typeof t)||"function"===t,o=(t,e,...n)=>{let l=null,o=!1,r=!1;const i=[],u=e=>{for(let n=0;n<e.length;n++)l=e[n],Array.isArray(l)?u(l):null!=l&&"boolean"!=typeof l&&((o="function"!=typeof t&&!s(l))&&(l+=""),o&&r?i[i.length-1].t+=l:i.push(o?c(null,l):l),r=o)};if(u(n),e){const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}const a=c(t,null);return a.l=e,i.length>0&&(a.o=i),a},c=(t,e)=>({i:0,u:t,t:e,h:null,o:null,l:null}),r={},i=(t,e,n)=>{const l=(t=>R(t).$)(t);return{emit:t=>u(l,e,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:t})}},u=(t,e,n)=>{const l=J.ce(e,n);return t.dispatchEvent(l),l},a=new WeakMap,f=t=>"sc-"+t.p,h=(t,e,n,l,o,c)=>{if(n!==l){let r=V(t,e),i=e.toLowerCase();if("class"===e){const e=t.classList,s=y(n),o=y(l);e.remove(...s.filter((t=>t&&!o.includes(t)))),e.add(...o.filter((t=>t&&!s.includes(t))))}else if(r||"o"!==e[0]||"n"!==e[1]){const i=s(l);if((r||i&&null!==l)&&!o)try{if(t.tagName.includes("-"))t[e]=l;else{const s=null==l?"":l;"list"===e?r=!1:null!=n&&t[e]==s||(t[e]=s)}}catch(t){}null==l||!1===l?!1===l&&""!==t.getAttribute(e)||t.removeAttribute(e):(!r||4&c||o)&&!i&&t.setAttribute(e,l=!0===l?"":l)}else e="-"===e[2]?e.slice(3):V(G,i)?i.slice(2):i[2]+e.slice(3),n&&J.rel(t,e,n,!1),l&&J.ael(t,e,l,!1)}},$=/\s/,y=t=>t?t.split($):[],d=(t,e,n,s)=>{const o=11===e.h.nodeType&&e.h.host?e.h.host:e.h,c=t&&t.l||l,r=e.l||l;for(s in c)s in r||h(o,s,c[s],void 0,n,e.i);for(s in r)h(o,s,c[s],r[s],n,e.i)},p=(e,n,l)=>{const s=n.o[l];let o,c,r=0;if(null!==s.t)o=s.h=I.createTextNode(s.t);else if(o=s.h=I.createElement(s.u),d(null,s,!1),null!=t&&o["s-si"]!==t&&o.classList.add(o["s-si"]=t),s.o)for(r=0;r<s.o.length;++r)c=p(e,s,r),c&&o.appendChild(c);return o},m=(t,n,l,s,o,c)=>{let r,i=t;for(i.shadowRoot&&i.tagName===e&&(i=i.shadowRoot);o<=c;++o)s[o]&&(r=p(null,l,o),r&&(s[o].h=r,i.insertBefore(r,n)))},b=(t,e,n,l)=>{for(;e<=n;++e)(l=t[e])&&l.h.remove()},w=(t,e)=>t.u===e.u,S=(t,e)=>{const n=e.h=t.h,l=t.o,s=e.o,o=e.t;null===o?("slot"===e.u||d(t,e,!1),null!==l&&null!==s?((t,e,n,l)=>{let s,o=0,c=0,r=e.length-1,i=e[0],u=e[r],a=l.length-1,f=l[0],h=l[a];for(;o<=r&&c<=a;)null==i?i=e[++o]:null==u?u=e[--r]:null==f?f=l[++c]:null==h?h=l[--a]:w(i,f)?(S(i,f),i=e[++o],f=l[++c]):w(u,h)?(S(u,h),u=e[--r],h=l[--a]):w(i,h)?(S(i,h),t.insertBefore(i.h,u.h.nextSibling),i=e[++o],h=l[--a]):w(u,f)?(S(u,f),t.insertBefore(u.h,i.h),u=e[--r],f=l[++c]):(s=p(e&&e[c],n,c),f=l[++c],s&&i.h.parentNode.insertBefore(s,i.h));o>r?m(t,null==l[a+1]?null:l[a+1].h,n,l,c,a):c>a&&b(e,o,r)})(n,l,e,s):null!==s?(null!==t.t&&(n.textContent=""),m(n,null,e,s,0,s.length-1)):null!==l&&b(l,0,l.length-1)):t.t!==o&&(n.data=o)},g=(t,e)=>{e&&!t.m&&e["s-p"]&&e["s-p"].push(new Promise((e=>t.m=e)))},j=(t,e)=>{if(t.i|=16,!(4&t.i))return g(t,t.S),lt((()=>v(t,e)));t.i|=512},v=(t,e)=>{const n=t.g;let l;return e&&(t.i|=256,t.j&&(t.j.map((([t,e])=>x(n,t,e))),t.j=null),l=x(n,"componentWillLoad")),P(l,(()=>M(t,n,e)))},M=async(t,e,n)=>{const l=t.$,s=l["s-rc"];n&&(t=>{const e=t.v,n=t.$,l=e.i,s=((t,e)=>{let n=f(e);const l=D.get(n);if(t=11===t.nodeType?t:I,l)if("string"==typeof l){let e,s=a.get(t=t.head||t);s||a.set(t,s=new Set),s.has(n)||(e=I.createElement("style"),e.innerHTML=l,t.insertBefore(e,t.querySelector("link")),s&&s.add(n))}else t.adoptedStyleSheets.includes(l)||(t.adoptedStyleSheets=[...t.adoptedStyleSheets,l]);return n})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&l&&(n["s-sc"]=s,n.classList.add(s+"-h"),2&l&&n.classList.add(s+"-s"))})(t);k(t,e),s&&(s.map((t=>t())),l["s-rc"]=void 0);{const e=l["s-p"],n=()=>C(t);0===e.length?n():(Promise.all(e).then(n),t.i|=4,e.length=0)}},k=(n,l)=>{try{l=l.render(),n.i&=-17,n.i|=2,((n,l)=>{const s=n.$,i=n.M||c(null,null),u=(t=>t&&t.u===r)(l)?l:o(null,null,l);e=s.tagName,u.u=null,u.i|=4,n.M=u,u.h=i.h=s.shadowRoot||s,t=s["s-sc"],S(i,u)})(n,l)}catch(t){_(t,n.$)}return null},C=t=>{const e=t.$,n=t.S;64&t.i||(t.i|=64,E(e),t.k(e),n||O()),t.m&&(t.m(),t.m=void 0),512&t.i&&nt((()=>j(t,!1))),t.i&=-517},O=()=>{E(I.documentElement),nt((()=>u(G,"appload",{detail:{namespace:"tttx"}})))},x=(t,e,n)=>{if(t&&t[e])try{return t[e](n)}catch(t){_(t)}},P=(t,e)=>t&&t.then?t.then(e):e(),E=t=>t.classList.add("hydrated"),L=(t,e,n)=>{if(e.C){const l=Object.entries(e.C),o=t.prototype;if(l.map((([t,[l]])=>{(31&l||2&n&&32&l)&&Object.defineProperty(o,t,{get(){return((t,e)=>R(this).O.get(e))(0,t)},set(n){((t,e,n,l)=>{const o=R(t),c=o.O.get(e),r=o.i,i=o.g;n=((t,e)=>null==t||s(t)?t:4&e?"false"!==t&&(""===t||!!t):2&e?parseFloat(t):1&e?t+"":t)(n,l.C[e][0]),8&r&&void 0!==c||n===c||Number.isNaN(c)&&Number.isNaN(n)||(o.O.set(e,n),i&&2==(18&r)&&j(o,!1))})(this,t,n,e)},configurable:!0,enumerable:!0})})),1&n){const e=new Map;o.attributeChangedCallback=function(t,n,l){J.jmp((()=>{const n=e.get(t);if(this.hasOwnProperty(n))l=this[n],delete this[n];else if(o.hasOwnProperty(n)&&"number"==typeof this[n]&&this[n]==l)return;this[n]=(null!==l||"boolean"!=typeof this[n])&&l}))},t.observedAttributes=l.filter((([t,e])=>15&e[0])).map((([t,n])=>{const l=n[1]||t;return e.set(l,t),l}))}}return t},N=(t,e={})=>{const n=[],l=e.exclude||[],s=G.customElements,o=I.head,c=o.querySelector("meta[charset]"),r=I.createElement("style"),i=[];let u,a=!0;Object.assign(J,e),J.P=new URL(e.resourcesUrl||"./",I.baseURI).href,t.map((t=>{t[1].map((e=>{const o={i:e[0],p:e[1],C:e[2],L:e[3]};o.C=e[2],o.L=e[3];const c=o.p,r=class extends HTMLElement{constructor(t){super(t),q(t=this,o),1&o.i&&t.attachShadow({mode:"open"})}connectedCallback(){u&&(clearTimeout(u),u=null),a?i.push(this):J.jmp((()=>(t=>{if(0==(1&J.i)){const e=R(t),n=e.v,l=()=>{};if(1&e.i)T(t,e,n.L);else{e.i|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){g(e,e.S=n);break}}n.C&&Object.entries(n.C).map((([e,[n]])=>{if(31&n&&t.hasOwnProperty(e)){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n,l,s)=>{if(0==(32&e.i)){{if(e.i|=32,(s=B(n)).then){const t=()=>{};s=await s,t()}s.isProxied||(L(s,n,2),s.isProxied=!0);const t=()=>{};e.i|=8;try{new s(e)}catch(t){_(t)}e.i&=-9,t()}if(s.style){let t=s.style;const e=f(n);if(!D.has(e)){const l=()=>{};((t,e,n)=>{let l=D.get(t);Q&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=e:l.replaceSync(e)):l=e,D.set(t,l)})(e,t,!!(1&n.i)),l()}}}const o=e.S,c=()=>j(e,!0);o&&o["s-rc"]?o["s-rc"].push(c):c()})(0,e,n)}l()}})(this)))}disconnectedCallback(){J.jmp((()=>(()=>{if(0==(1&J.i)){const t=R(this);t.N&&(t.N.map((t=>t())),t.N=void 0)}})()))}componentOnReady(){return R(this).T}};o.W=t[0],l.includes(c)||s.get(c)||(n.push(c),s.define(c,L(r,o,1)))}))})),r.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",r.setAttribute("data-styles",""),o.insertBefore(r,c?c.nextSibling:o.firstChild),a=!1,i.length?i.map((t=>t.connectedCallback())):J.jmp((()=>u=setTimeout(O,30)))},T=(t,e,n)=>{n&&n.map((([n,l,s])=>{const o=A(t,n),c=W(e,s),r=F(n);J.ael(o,l,c,r),(e.N=e.N||[]).push((()=>J.rel(o,l,c,r)))}))},W=(t,e)=>n=>{try{256&t.i?t.g[e](n):(t.j=t.j||[]).push([e,n])}catch(t){_(t)}},A=(t,e)=>4&e?I:t,F=t=>0!=(2&t),H=new WeakMap,R=t=>H.get(t),U=(t,e)=>H.set(e.g=t,e),q=(t,e)=>{const n={i:0,$:t,v:e,O:new Map};return n.T=new Promise((t=>n.k=t)),t["s-p"]=[],t["s-rc"]=[],T(t,n,e.L),H.set(t,n)},V=(t,e)=>e in t,_=(t,e)=>(0,console.error)(t,e),z=new Map,B=t=>{const e=t.p.replace(/-/g,"_"),n=t.W,l=z.get(n);return l?l[e]:import(`./${n}.entry.js`).then((t=>(z.set(n,t),t[e])),_)
|
|
2
|
-
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/},D=new Map,G="undefined"!=typeof window?window:{},I=G.document||{head:{}},J={i:0,P:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,l)=>t.addEventListener(e,n,l),rel:(t,e,n,l)=>t.removeEventListener(e,n,l),ce:(t,e)=>new CustomEvent(t,e)},K=t=>Promise.resolve(t),Q=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(t){}return!1})(),X=[],Y=[],Z=(t,e)=>l=>{t.push(l),n||(n=!0,e&&4&J.i?nt(et):J.raf(et))},tt=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){_(t)}t.length=0},et=()=>{tt(X),tt(Y),(n=X.length>0)&&J.raf(et)},nt=t=>K().then(t),lt=Z(Y,!0);export{r as H,N as b,i as c,o as h,K as p,U as r}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,h as i}from"./p-c290160b.js";const e=class{constructor(i){t(this,i),this.data=void 0}renderListItem(t){return i("li",{class:"item"},t.element&&i("span",{innerHTML:t.element}),t.chevron&&i("tttx-icon",{class:"align-right",icon:"chevron_right"}))}render(){if(this.data)return this._data="string"==typeof this.data?JSON.parse(this.data):this.data,i("ul",{class:"list"},this._data&&this._data.map((t=>this.renderListItem(t))))}};e.style='.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}:host{display:flex;flex-direction:column}.list{margin:0;padding:0}.item{list-style:none;margin:0;padding:0;border-bottom:1px solid #d5d5d5;height:36px;display:flex;align-items:center}.item:first-of-type{border-top:1px solid #d5d5d5}.align-right{margin-left:auto}.item-content{display:flex;align-items:center}';export{e as tttx_list}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as i,h as e}from"./p-c290160b.js";const s=class{constructor(e){t(this,e),this.listSelectedEvent=i(this,"listItemClick",7),this.data=void 0}renderListItem(t){return e("li",{class:"item",onClick:()=>{this.listSelectedEvent.emit({})}},t.element&&e("span",{class:"item-content",innerHTML:t.element}),t.chevron&&e("tttx-icon",{class:"align-right",icon:"chevron_right"}))}render(){if(this.data)return this._data="string"==typeof this.data?JSON.parse(this.data):this.data,e("ul",{class:"list"},this._data&&this._data.map((t=>this.renderListItem(t))))}};s.style='.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}:host{display:flex;flex-direction:column}.list{margin:0;padding:0}.item{list-style:none;margin:0;padding:0;border-bottom:1px solid #d5d5d5;height:36px;display:flex;align-items:center}.item:first-of-type{border-top:1px solid #d5d5d5}.align-right{margin-left:auto}.item-content{display:flex;align-items:center}';export{s as tttx_list}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,h as i}from"./p-c290160b.js";const e=class{constructor(i){t(this,i),this.data=void 0}renderListItem(t){return i("li",{class:"item"},t.element&&i("span",{innerHTML:t.element}),t.chevron&&i("tttx-icon",{class:"align-right",icon:"chevron_right"}))}render(){if(this.data)return this._data="string"==typeof this.data?JSON.parse(this.data):this.data,i("ul",{class:"list"},this._data&&this._data.map((t=>this.renderListItem(t))))}};e.style='.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}:host{display:flex;flex-direction:column}.list{margin:0;padding:0}.item{list-style:none;margin:0;padding:0;border-bottom:1px solid #d5d5d5;height:36px;display:flex;align-items:center}.align-right{margin-left:auto}.item-text{display:flex;align-items:center}';export{e as tttx_list}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/types/components/atoms/tttx-loading-spinner/Test/tttx-loading-spinner.spec.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/types/components/molecules/tttx-standalone-input/test/tttx-standalone-input.e2e.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/types/components/molecules/tttx-standalone-input/test/tttx-standalone-input.spec.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { EventEmitter } from '../../../stencil-public-runtime';
|
|
2
|
-
export declare class TttxTable {
|
|
3
|
-
headers: any[];
|
|
4
|
-
data: any[];
|
|
5
|
-
loading: boolean;
|
|
6
|
-
selected: number;
|
|
7
|
-
rowSelected: EventEmitter<any>;
|
|
8
|
-
headerClicked: EventEmitter<any>;
|
|
9
|
-
handleKeyDown(ev: KeyboardEvent): void;
|
|
10
|
-
updateSelectedIndex(key: string): void;
|
|
11
|
-
emitRowSelected(): void;
|
|
12
|
-
rowSelectedHandler(row: any): void;
|
|
13
|
-
headerClickedHandler(key: string): void;
|
|
14
|
-
render(): any;
|
|
15
|
-
}
|