@3t-transform/threeteeui 0.0.15 → 0.0.17
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-864b7110.js +1531 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/loader.cjs.js +22 -0
- package/dist/cjs/tttx-button.cjs.entry.js +34 -0
- package/dist/cjs/tttx-checkbox.cjs.entry.js +28 -0
- package/dist/cjs/tttx-form.cjs.entry.js +374 -0
- package/dist/cjs/tttx-icon.cjs.entry.js +21 -0
- package/dist/cjs/tttx-input-calendar.cjs.entry.js +125 -0
- package/dist/cjs/tttx-keyvalue-block.cjs.entry.js +33 -0
- package/dist/cjs/tttx-list.cjs.entry.js +198 -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-standalone-input.cjs.entry.js +136 -0
- package/dist/cjs/tttx-table.cjs.entry.js +60 -0
- package/dist/cjs/tttx.cjs.js +23 -0
- package/dist/collection/collection-manifest.json +22 -0
- package/dist/collection/components/atoms/tttx-button/tttx-button.css +138 -0
- package/dist/collection/components/atoms/tttx-button/tttx-button.js +110 -0
- package/dist/collection/components/atoms/tttx-button/tttx-button.stories.js +74 -0
- package/dist/collection/components/atoms/tttx-icon/tttx-icon.css +108 -0
- package/dist/collection/components/atoms/tttx-icon/tttx-icon.js +62 -0
- package/dist/collection/components/atoms/tttx-icon/tttx-icon.stories.js +22 -0
- package/dist/collection/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.css +26 -0
- package/dist/collection/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.js +56 -0
- package/dist/collection/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.stories.js +12 -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 +67 -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.css +30 -0
- package/dist/collection/components/atoms/tttx-popover-content/tttx-popover-content.js +97 -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 +181 -0
- package/dist/collection/components/atoms/ttx-checkbox/tttx-checkbox.js +102 -0
- package/dist/collection/components/atoms/ttx-checkbox/tttx-checkbox.stories.js +13 -0
- package/dist/collection/components/molecules/tttx-form/tttx-form.css +314 -0
- package/dist/collection/components/molecules/tttx-form/tttx-form.js +452 -0
- package/dist/collection/components/molecules/tttx-form/tttx-form.stories.js +109 -0
- package/dist/collection/components/molecules/tttx-input-calendar/tttx-input-calendar.css +93 -0
- package/dist/collection/components/molecules/tttx-input-calendar/tttx-input-calendar.js +174 -0
- package/dist/collection/components/molecules/tttx-input-calendar/tttx-input-calendar.stories.js +27 -0
- package/dist/collection/components/molecules/tttx-list/tttx-list.css +56 -0
- package/dist/collection/components/molecules/tttx-list/tttx-list.js +312 -0
- package/dist/collection/components/molecules/tttx-list/tttx-list.stories.js +37 -0
- package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.css +177 -0
- package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.js +570 -0
- package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.stories.js +156 -0
- package/dist/collection/components/molecules/tttx-table/tttx-table.css +166 -0
- package/dist/collection/components/molecules/tttx-table/tttx-table.js +174 -0
- package/dist/collection/components/molecules/tttx-table/tttx-table.stories.js +81 -0
- package/dist/collection/components/palette.stories.js +88 -0
- package/dist/collection/docs/gettingstarted-developer.stories.js +9 -0
- package/dist/collection/icons.js +2838 -0
- package/dist/collection/index.js +1 -0
- package/dist/components/index.d.ts +41 -0
- package/dist/components/index.js +12 -0
- package/dist/components/tttx-button.d.ts +11 -0
- package/dist/components/tttx-button.js +6 -0
- package/dist/components/tttx-button2.js +56 -0
- package/dist/components/tttx-checkbox.d.ts +11 -0
- package/dist/components/tttx-checkbox.js +46 -0
- package/dist/components/tttx-form.d.ts +11 -0
- package/dist/components/tttx-form.js +391 -0
- package/dist/components/tttx-icon.d.ts +11 -0
- package/dist/components/tttx-icon.js +6 -0
- package/dist/components/tttx-icon2.js +35 -0
- package/dist/components/tttx-input-calendar.d.ts +11 -0
- package/dist/components/tttx-input-calendar.js +157 -0
- package/dist/components/tttx-keyvalue-block.d.ts +11 -0
- package/dist/components/tttx-keyvalue-block.js +49 -0
- package/dist/components/tttx-list.d.ts +11 -0
- package/dist/components/tttx-list.js +225 -0
- package/dist/components/tttx-loading-spinner.d.ts +11 -0
- package/dist/components/tttx-loading-spinner.js +6 -0
- package/dist/components/tttx-loading-spinner2.js +40 -0
- package/dist/components/tttx-popover-content.d.ts +11 -0
- package/dist/components/tttx-popover-content.js +6 -0
- package/dist/components/tttx-popover-content2.js +39 -0
- package/dist/components/tttx-standalone-input.d.ts +11 -0
- package/dist/components/tttx-standalone-input.js +179 -0
- package/dist/components/tttx-table.d.ts +11 -0
- package/dist/components/tttx-table.js +91 -0
- package/dist/esm/index-232e347b.js +1502 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/loader.js +18 -0
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/css-shim.js +1 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/esm/tttx-button.entry.js +30 -0
- package/dist/esm/tttx-checkbox.entry.js +24 -0
- package/dist/esm/tttx-form.entry.js +370 -0
- package/dist/esm/tttx-icon.entry.js +17 -0
- package/dist/esm/tttx-input-calendar.entry.js +121 -0
- package/dist/esm/tttx-keyvalue-block.entry.js +29 -0
- package/dist/esm/tttx-list.entry.js +194 -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-standalone-input.entry.js +132 -0
- package/dist/esm/tttx-table.entry.js +56 -0
- package/dist/esm/tttx.js +18 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/tttx/index.esm.js +0 -0
- package/dist/tttx/p-01e1894e.entry.js +1 -0
- package/dist/tttx/p-184c4fae.js +2 -0
- package/dist/tttx/p-1bc3dfee.entry.js +1 -0
- package/dist/tttx/p-1cf8f9e8.entry.js +1 -0
- package/dist/tttx/p-220f7519.entry.js +1 -0
- package/dist/tttx/p-3973b7dd.entry.js +1 -0
- package/dist/tttx/p-5247e827.entry.js +1 -0
- package/dist/tttx/p-6828fe6f.entry.js +1 -0
- package/dist/tttx/p-81904eed.entry.js +1 -0
- package/dist/tttx/p-cf107fb6.entry.js +1 -0
- package/dist/tttx/p-f56fe662.entry.js +1 -0
- package/dist/tttx/p-fe4c70b2.entry.js +1 -0
- package/dist/tttx/tttx.esm.js +1 -0
- package/dist/types/components/atoms/tttx-button/tttx-button.d.ts +10 -0
- package/dist/types/components/atoms/tttx-button/tttx-button.stories.d.ts +10 -0
- package/dist/types/components/atoms/tttx-icon/tttx-icon.d.ts +5 -0
- package/dist/types/components/atoms/tttx-icon/tttx-icon.stories.d.ts +20 -0
- package/dist/types/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.d.ts +4 -0
- package/dist/types/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.stories.d.ts +6 -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 +17 -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/components/atoms/ttx-checkbox/tttx-checkbox.stories.d.ts +6 -0
- package/dist/types/components/molecules/tttx-form/tttx-form.d.ts +134 -0
- package/dist/types/components/molecules/tttx-form/tttx-form.stories.d.ts +12 -0
- package/dist/types/components/molecules/tttx-input-calendar/tttx-input-calendar.d.ts +19 -0
- package/dist/types/components/molecules/tttx-input-calendar/tttx-input-calendar.stories.d.ts +26 -0
- package/dist/types/components/molecules/tttx-list/tttx-list.d.ts +51 -0
- package/dist/types/components/molecules/tttx-list/tttx-list.stories.d.ts +13 -0
- 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/molecules/tttx-table/tttx-table.d.ts +15 -0
- package/dist/types/components/molecules/tttx-table/tttx-table.stories.d.ts +21 -0
- package/dist/types/components/palette.stories.d.ts +6 -0
- package/dist/types/components.d.ts +295 -0
- package/dist/types/docs/gettingstarted-developer.stories.d.ts +5 -0
- package/dist/types/icons.d.ts +2 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +1637 -0
- package/loader/cdn.js +3 -0
- package/loader/index.cjs.js +3 -0
- package/loader/index.d.ts +21 -0
- package/loader/index.es2017.js +3 -0
- package/loader/index.js +4 -0
- package/loader/package.json +11 -0
- package/package.json +4 -4
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
|
|
3
|
+
const tttxIconCss = ".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:inline-block;cursor:default;user-select:none}.icon-size{width:24px;height:24px}.tooltip{background:#ffffff;color:#343434;font-weight:bold;padding:8px 16px;font-size:13px;border-radius:4px;box-shadow:0 0 5px 1px rgba(0, 0, 0, 0.3);display:none}.tooltip[data-show]{display:block}.arrow,.arrow::before{position:absolute;width:8px;height:8px;background:inherit}.arrow{visibility:hidden}.arrow::before{visibility:visible;content:\"\";transform:rotate(45deg)}.tooltip[data-popper-placement^=top]>.arrow{bottom:-4px}.tooltip[data-popper-placement^=bottom]>.arrow{top:-4px}.tooltip[data-popper-placement^=left]>.arrow{right:-4px}.tooltip[data-popper-placement^=right]>.arrow{left:-4px}.red{color:#dc0000}.orange{color:#f59500}.blue{color:#1479c6}.green{color:#a2bb31}.gray{color:#757575}.black{color:#212121}.white{color:white}";
|
|
4
|
+
|
|
5
|
+
const TttxIcon = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
6
|
+
constructor() {
|
|
7
|
+
super();
|
|
8
|
+
this.__registerHost();
|
|
9
|
+
this.__attachShadow();
|
|
10
|
+
this.icon = undefined;
|
|
11
|
+
this.color = 'grey';
|
|
12
|
+
}
|
|
13
|
+
render() {
|
|
14
|
+
return (h(Host, null, h("span", { class: `material-symbols-rounded ${this.color ? this.color : ''}` }, this.icon)));
|
|
15
|
+
}
|
|
16
|
+
static get style() { return tttxIconCss; }
|
|
17
|
+
}, [1, "tttx-icon", {
|
|
18
|
+
"icon": [1],
|
|
19
|
+
"color": [1]
|
|
20
|
+
}]);
|
|
21
|
+
function defineCustomElement() {
|
|
22
|
+
if (typeof customElements === "undefined") {
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
const components = ["tttx-icon"];
|
|
26
|
+
components.forEach(tagName => { switch (tagName) {
|
|
27
|
+
case "tttx-icon":
|
|
28
|
+
if (!customElements.get(tagName)) {
|
|
29
|
+
customElements.define(tagName, TttxIcon);
|
|
30
|
+
}
|
|
31
|
+
break;
|
|
32
|
+
} });
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export { TttxIcon as T, defineCustomElement as d };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface TttxInputCalendar extends Components.TttxInputCalendar, HTMLElement {}
|
|
4
|
+
export const TttxInputCalendar: {
|
|
5
|
+
prototype: TttxInputCalendar;
|
|
6
|
+
new (): TttxInputCalendar;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { d as defineCustomElement$3 } from './tttx-button2.js';
|
|
3
|
+
import { d as defineCustomElement$2 } from './tttx-icon2.js';
|
|
4
|
+
|
|
5
|
+
const tttxInputCalendarCss = ".material-symbols-rounded{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}:host{display:block;--border-radius:4px;position:relative}.calcontainer{-webkit-perspective:500px;perspective:500px}.lefty{float:left}.righty{float:right}.calendar{display:none;position:absolute;box-sizing:border-box;width:312px;height:332px;background-color:white;padding:16px;box-shadow:0px 1px 5px rgba(17, 17, 17, 0.3);border-radius:var(--border-radius)}.calendar-header{display:flex;justify-content:space-between;margin-bottom:8px}.date-display{margin-top:8px}.calendar-header select{border:none;padding:5px}.calendar-table{width:100%;border-collapse:collapse}.calendar-table th{text-align:center;padding:4px;text-transform:uppercase;font-size:14px;color:#757575;border-bottom:1px solid #d5d5d5;margin-bottom:8px}.calendar .calendar-table td{padding:0;margin:0;width:14.2%;text-align:center;height:36px;line-height:36px}.calendar .calendar-table td span:hover{background-color:#f0f0f0}.calendar .calendar-table td span{display:block;text-align:center;padding:4px;cursor:pointer;border-radius:var(--border-radius)}.calendar-visible{display:block}.calendar-table thead tr{border-bottom:1px solid #d5d5d5}";
|
|
6
|
+
|
|
7
|
+
const TttxInputCalendar$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
8
|
+
constructor() {
|
|
9
|
+
super();
|
|
10
|
+
this.__registerHost();
|
|
11
|
+
this.__attachShadow();
|
|
12
|
+
// an array of month numbers mapped to their names
|
|
13
|
+
this.monthNames = Array.from({ length: 12 }, (_, i) => i + 1).map((month) => {
|
|
14
|
+
const date = new Date(0);
|
|
15
|
+
date.setUTCMonth(month - 1);
|
|
16
|
+
return date.toLocaleString('default', { month: 'long' });
|
|
17
|
+
});
|
|
18
|
+
this.onClickOutside = (event) => {
|
|
19
|
+
if (!this.el.contains(event.target) && this.showCalendar) {
|
|
20
|
+
this.showCalendar = false;
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
this.onFocusIn = (event) => {
|
|
24
|
+
if (!this.el.contains(event.target) && this.showCalendar) {
|
|
25
|
+
this.showCalendar = false;
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
this.previousHandler = () => {
|
|
29
|
+
if (this.selectedMonth === 1) {
|
|
30
|
+
this.selectedMonth = 12;
|
|
31
|
+
this.selectedYear--;
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
this.selectedMonth--;
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
this.nextHandler = () => {
|
|
38
|
+
if (this.selectedMonth === 12) {
|
|
39
|
+
this.selectedMonth = 1;
|
|
40
|
+
this.selectedYear++;
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
this.selectedMonth++;
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
this.months = false;
|
|
47
|
+
this.years = false;
|
|
48
|
+
this.showCalendar = false;
|
|
49
|
+
this.selectedYear = new Date().getFullYear();
|
|
50
|
+
this.selectedMonth = new Date().getMonth() + 1;
|
|
51
|
+
}
|
|
52
|
+
componentDidLoad() {
|
|
53
|
+
const slot = this.el.shadowRoot.querySelector('slot');
|
|
54
|
+
if (slot) {
|
|
55
|
+
const assignedElements = slot.assignedElements();
|
|
56
|
+
if (assignedElements[0]) {
|
|
57
|
+
assignedElements[0].addEventListener('click', (event) => {
|
|
58
|
+
event.preventDefault();
|
|
59
|
+
this.showCalendar = !this.showCalendar;
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
document.addEventListener('click', this.onClickOutside);
|
|
64
|
+
}
|
|
65
|
+
disconnectedCallback() {
|
|
66
|
+
document.removeEventListener('click', this.onClickOutside);
|
|
67
|
+
}
|
|
68
|
+
getDaysAndDates(year, month) {
|
|
69
|
+
const firstDayOfMonth = new Date(year, month - 1, 1);
|
|
70
|
+
const lastDayOfMonth = new Date(year, month, 0);
|
|
71
|
+
const daysAndDates = [];
|
|
72
|
+
for (let day = firstDayOfMonth; day <= lastDayOfMonth; day.setDate(day.getDate() + 1)) {
|
|
73
|
+
const weekDay = day.getDay();
|
|
74
|
+
const date = day.getDate();
|
|
75
|
+
const dayAndDate = {
|
|
76
|
+
day: weekDay,
|
|
77
|
+
date: date
|
|
78
|
+
};
|
|
79
|
+
daysAndDates.push(dayAndDate);
|
|
80
|
+
}
|
|
81
|
+
return daysAndDates;
|
|
82
|
+
}
|
|
83
|
+
clickDateHandler(event) {
|
|
84
|
+
const { year, month, day } = event;
|
|
85
|
+
const selectedDate = new Date(year, month - 1, day + 1);
|
|
86
|
+
this.inputElement.valueAsDate = selectedDate;
|
|
87
|
+
this.showCalendar = false;
|
|
88
|
+
}
|
|
89
|
+
render() {
|
|
90
|
+
const daysOfWeek = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
|
|
91
|
+
const daysAndDates = this.getDaysAndDates(this.selectedYear, this.selectedMonth);
|
|
92
|
+
const currentYear = new Date().getFullYear();
|
|
93
|
+
const years = Array.from({ length: 11 }, (_, i) => currentYear - 5 + i);
|
|
94
|
+
const calendarGrid = [];
|
|
95
|
+
let currentWeek = [];
|
|
96
|
+
// Fill empty days before the first day of the month
|
|
97
|
+
for (let i = 0; i < daysAndDates[0].day; i++) {
|
|
98
|
+
currentWeek.push(h("td", null));
|
|
99
|
+
}
|
|
100
|
+
// Fill the calendar with days and dates
|
|
101
|
+
daysAndDates.forEach(({ day, date }) => {
|
|
102
|
+
currentWeek.push(h("td", null, h("span", { onClick: () => this.clickDateHandler({ year: this.selectedYear, month: this.selectedMonth, day: date }) }, date)));
|
|
103
|
+
if (day === 6) {
|
|
104
|
+
calendarGrid.push(h("tr", null, currentWeek));
|
|
105
|
+
currentWeek = [];
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
// Fill the remaining empty days in the last week
|
|
109
|
+
if (currentWeek.length > 0) {
|
|
110
|
+
while (currentWeek.length < 7) {
|
|
111
|
+
currentWeek.push(h("td", null));
|
|
112
|
+
}
|
|
113
|
+
calendarGrid.push(h("tr", null, currentWeek));
|
|
114
|
+
}
|
|
115
|
+
return (h(Host, null, h("div", { class: "calcontainer" }, h("slot", null), h("div", { class: `calendar ${this.showCalendar ? 'calendar-visible' : ''}` }, h("div", { class: "calendar-header" }, h("tttx-button", { onClick: this.previousHandler, design: "borderless", icon: "chevron_left", notext: true }), this.months && h("select", { id: "month-select", onInput: (event) => {
|
|
116
|
+
this.selectedMonth = parseInt(event.target.value);
|
|
117
|
+
} }, Array.from({ length: 12 }, (_, i) => i + 1).map((month) => (h("option", { value: month, selected: month === this.selectedMonth }, this.monthNames[month - 1])))), this.years && h("select", { id: "year-select", onInput: (event) => {
|
|
118
|
+
this.selectedYear = parseInt(event.target.value);
|
|
119
|
+
} }, years.map((year) => (h("option", { value: year, selected: year === this.selectedYear }, year)))), h("div", { class: "date-display" }, this.monthNames[this.selectedMonth - 1], " ", this.selectedYear), h("tttx-button", { onClick: this.nextHandler, design: "borderless", icon: "chevron_right", notext: true })), h("table", { class: "calendar-table" }, h("thead", null, h("tr", null, daysOfWeek.map((day) => (h("th", null, day))))), h("tbody", null, calendarGrid))))));
|
|
120
|
+
}
|
|
121
|
+
get el() { return this; }
|
|
122
|
+
static get style() { return tttxInputCalendarCss; }
|
|
123
|
+
}, [1, "tttx-input-calendar", {
|
|
124
|
+
"months": [4],
|
|
125
|
+
"years": [4],
|
|
126
|
+
"showCalendar": [32],
|
|
127
|
+
"selectedYear": [32],
|
|
128
|
+
"selectedMonth": [32]
|
|
129
|
+
}]);
|
|
130
|
+
function defineCustomElement$1() {
|
|
131
|
+
if (typeof customElements === "undefined") {
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
const components = ["tttx-input-calendar", "tttx-button", "tttx-icon"];
|
|
135
|
+
components.forEach(tagName => { switch (tagName) {
|
|
136
|
+
case "tttx-input-calendar":
|
|
137
|
+
if (!customElements.get(tagName)) {
|
|
138
|
+
customElements.define(tagName, TttxInputCalendar$1);
|
|
139
|
+
}
|
|
140
|
+
break;
|
|
141
|
+
case "tttx-button":
|
|
142
|
+
if (!customElements.get(tagName)) {
|
|
143
|
+
defineCustomElement$3();
|
|
144
|
+
}
|
|
145
|
+
break;
|
|
146
|
+
case "tttx-icon":
|
|
147
|
+
if (!customElements.get(tagName)) {
|
|
148
|
+
defineCustomElement$2();
|
|
149
|
+
}
|
|
150
|
+
break;
|
|
151
|
+
} });
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
const TttxInputCalendar = TttxInputCalendar$1;
|
|
155
|
+
const defineCustomElement = defineCustomElement$1;
|
|
156
|
+
|
|
157
|
+
export { TttxInputCalendar, defineCustomElement };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface TttxKeyvalueBlock extends Components.TttxKeyvalueBlock, HTMLElement {}
|
|
4
|
+
export const TttxKeyvalueBlock: {
|
|
5
|
+
prototype: TttxKeyvalueBlock;
|
|
6
|
+
new (): TttxKeyvalueBlock;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
|
|
3
|
+
const tttxKeyvalueBlockCss = ":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;color:#757575}dd{margin:0;font-weight:400;font-size:16px;color:#212121;line-height:21px;margin-bottom:18px}";
|
|
4
|
+
|
|
5
|
+
const TttxKeyvalueBlock$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
6
|
+
constructor() {
|
|
7
|
+
super();
|
|
8
|
+
this.__registerHost();
|
|
9
|
+
this.__attachShadow();
|
|
10
|
+
this.keyvalues = undefined;
|
|
11
|
+
}
|
|
12
|
+
render() {
|
|
13
|
+
let values;
|
|
14
|
+
if (typeof this.keyvalues === 'string') {
|
|
15
|
+
values = JSON.parse(this.keyvalues);
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
values = this.keyvalues;
|
|
19
|
+
}
|
|
20
|
+
const keys = Object.keys(values);
|
|
21
|
+
const elements = [];
|
|
22
|
+
for (let i = 0; i < keys.length; i++) {
|
|
23
|
+
elements.push(h("dt", null, keys[i]));
|
|
24
|
+
elements.push(h("dd", null, values[keys[i]]));
|
|
25
|
+
}
|
|
26
|
+
return (h(Host, null, h("dl", null, elements)));
|
|
27
|
+
}
|
|
28
|
+
static get style() { return tttxKeyvalueBlockCss; }
|
|
29
|
+
}, [1, "tttx-keyvalue-block", {
|
|
30
|
+
"keyvalues": [8]
|
|
31
|
+
}]);
|
|
32
|
+
function defineCustomElement$1() {
|
|
33
|
+
if (typeof customElements === "undefined") {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
const components = ["tttx-keyvalue-block"];
|
|
37
|
+
components.forEach(tagName => { switch (tagName) {
|
|
38
|
+
case "tttx-keyvalue-block":
|
|
39
|
+
if (!customElements.get(tagName)) {
|
|
40
|
+
customElements.define(tagName, TttxKeyvalueBlock$1);
|
|
41
|
+
}
|
|
42
|
+
break;
|
|
43
|
+
} });
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const TttxKeyvalueBlock = TttxKeyvalueBlock$1;
|
|
47
|
+
const defineCustomElement = defineCustomElement$1;
|
|
48
|
+
|
|
49
|
+
export { TttxKeyvalueBlock, defineCustomElement };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface TttxList extends Components.TttxList, HTMLElement {}
|
|
4
|
+
export const TttxList: {
|
|
5
|
+
prototype: TttxList;
|
|
6
|
+
new (): TttxList;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { d as defineCustomElement$2 } from './tttx-loading-spinner2.js';
|
|
3
|
+
|
|
4
|
+
const tttxListCss = ".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}.tttx-list__row{min-height:52px;line-height:36px;padding:8px;display:flex;flex-direction:row;align-items:center;cursor:pointer;border-bottom:1px solid #d5d5d5}.tttx-list__row .generic-template__content{width:100%;display:flex;align-items:center;gap:8px}.tttx-list__row:first-of-type{border-top:1px solid #d5d5d5}.tttx-list__row:focus,.tttx-list__row:active{background-color:#e6e6e6}.tttx-list__row.selected{background-color:#e7f1f9}.load-indicator{display:flex;justify-content:center}";
|
|
5
|
+
|
|
6
|
+
const TttxList$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
7
|
+
constructor() {
|
|
8
|
+
super();
|
|
9
|
+
this.__registerHost();
|
|
10
|
+
this.__attachShadow();
|
|
11
|
+
this.listPaginate = createEvent(this, "listPaginate", 7);
|
|
12
|
+
this.listSelectedEvent = createEvent(this, "listSelectedEvent", 7);
|
|
13
|
+
this.listItemClick = createEvent(this, "listItemClick", 7);
|
|
14
|
+
this.rowCount = 0;
|
|
15
|
+
this.name = undefined;
|
|
16
|
+
this.selectable = undefined;
|
|
17
|
+
this.items = [];
|
|
18
|
+
this.selectedIds = [];
|
|
19
|
+
this.loading = true;
|
|
20
|
+
this.lastPage = false;
|
|
21
|
+
}
|
|
22
|
+
listLoadHandler(event) {
|
|
23
|
+
if (event.detail.name !== this.name)
|
|
24
|
+
return;
|
|
25
|
+
this.items = [...this.items, ...event.detail.items];
|
|
26
|
+
this.loading = false;
|
|
27
|
+
this.lastPage = event.detail.lastPage;
|
|
28
|
+
this.renderRows(event.detail.items);
|
|
29
|
+
if (this.scrollableParent.clientHeight === this.scrollableParent.scrollHeight)
|
|
30
|
+
this.listPaginateHandler();
|
|
31
|
+
}
|
|
32
|
+
listPaginateHandler() {
|
|
33
|
+
// We don't want to emit an event to load the next page if this is the last page, or if we're already loading
|
|
34
|
+
if (this.lastPage || this.loading)
|
|
35
|
+
return;
|
|
36
|
+
this.loading = true;
|
|
37
|
+
this.listPaginate.emit({ name: this.name });
|
|
38
|
+
}
|
|
39
|
+
listClearDataCacheHandler(event) {
|
|
40
|
+
if (event.detail.name !== this.name)
|
|
41
|
+
return;
|
|
42
|
+
this.items = [];
|
|
43
|
+
this.selectedIds = [];
|
|
44
|
+
this.listItemContainer()
|
|
45
|
+
.querySelectorAll('.tttx-list__row')
|
|
46
|
+
.forEach((node) => {
|
|
47
|
+
node.remove();
|
|
48
|
+
});
|
|
49
|
+
this.rowCount = 0;
|
|
50
|
+
this.lastPage = false;
|
|
51
|
+
this.loading = false;
|
|
52
|
+
}
|
|
53
|
+
listActionSelectedEventHandler(event) {
|
|
54
|
+
if (event.detail.name !== this.name || !this.selectable || this.selectedIds.length === 0)
|
|
55
|
+
return;
|
|
56
|
+
const selectedRows = this.selectedIds.map(id => {
|
|
57
|
+
return this.items[id];
|
|
58
|
+
});
|
|
59
|
+
if (event.detail.removeRows)
|
|
60
|
+
this.removeSelectedRows();
|
|
61
|
+
this.listSelectedEvent.emit({
|
|
62
|
+
name: this.name,
|
|
63
|
+
eventName: event.detail.eventName,
|
|
64
|
+
selectedRows,
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
removeSelectedRows() {
|
|
68
|
+
const orderedSelectedIds = [...this.selectedIds].sort((a, b) => {
|
|
69
|
+
return b - a;
|
|
70
|
+
});
|
|
71
|
+
orderedSelectedIds.forEach(itemIndex => {
|
|
72
|
+
this.items.splice(itemIndex, 1);
|
|
73
|
+
this.listItemContainer().removeChild(this.listItemContainer().querySelector(`[data-row-id="${itemIndex}"]`));
|
|
74
|
+
// If this removes the scrollbar and we're not on the last page, load in a new page
|
|
75
|
+
if (this.scrollableParent.clientHeight === this.scrollableParent.scrollHeight)
|
|
76
|
+
this.listPaginateHandler();
|
|
77
|
+
});
|
|
78
|
+
// Empty selected ids with mutation rather than assignment to avoid unecessary component rerender
|
|
79
|
+
this.selectedIds.splice(0, this.selectedIds.length);
|
|
80
|
+
}
|
|
81
|
+
listItemClickHandler(itemData) {
|
|
82
|
+
if (this.selectedIds.length !== 0)
|
|
83
|
+
return;
|
|
84
|
+
this.listItemClick.emit({ itemData, name: this.name });
|
|
85
|
+
}
|
|
86
|
+
componentWillLoad() {
|
|
87
|
+
this.template = this.host.querySelector('template');
|
|
88
|
+
this.scrollableParent = this.getScrollableParent(this.host);
|
|
89
|
+
const scrollableContext = this.scrollableParent === document.scrollingElement ? document : this.scrollableParent;
|
|
90
|
+
scrollableContext.addEventListener('scroll', this.scrollHandler.bind(this));
|
|
91
|
+
window.addEventListener('resize', this.scrollHandler.bind(this));
|
|
92
|
+
}
|
|
93
|
+
componentDidLoad() {
|
|
94
|
+
// Emit event to load first page
|
|
95
|
+
this.listPaginate.emit({ name: this.name });
|
|
96
|
+
}
|
|
97
|
+
listItemContainer() {
|
|
98
|
+
return this.host.shadowRoot.querySelector('.list-item-container');
|
|
99
|
+
}
|
|
100
|
+
async scrollHandler() {
|
|
101
|
+
const { clientHeight, scrollTop, scrollHeight } = this.scrollableParent;
|
|
102
|
+
if (Math.abs(scrollHeight - clientHeight - scrollTop) < 26)
|
|
103
|
+
this.listPaginateHandler();
|
|
104
|
+
}
|
|
105
|
+
isScrollable(node) {
|
|
106
|
+
const hasScrollbar = ['scroll', 'auto'].includes(node.style.overflowY);
|
|
107
|
+
return hasScrollbar;
|
|
108
|
+
}
|
|
109
|
+
getScrollableParent(node) {
|
|
110
|
+
if (!node || node === document.body) {
|
|
111
|
+
return document.scrollingElement;
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
return this.isScrollable(node) ? node : this.getScrollableParent(node.parentElement);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
appendRowCheckbox(rowContainer) {
|
|
118
|
+
if (!this.selectable)
|
|
119
|
+
return;
|
|
120
|
+
const rowId = this.rowCount;
|
|
121
|
+
const checkbox = document.createElement('input');
|
|
122
|
+
checkbox.setAttribute('type', 'checkbox');
|
|
123
|
+
checkbox.addEventListener('click', e => {
|
|
124
|
+
e.stopPropagation();
|
|
125
|
+
if (e.target.checked) {
|
|
126
|
+
this.selectedIds = [...this.selectedIds, rowId];
|
|
127
|
+
rowContainer.classList.add('selected');
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
this.selectedIds = this.selectedIds.filter(id => {
|
|
131
|
+
return id !== rowId;
|
|
132
|
+
});
|
|
133
|
+
rowContainer.classList.remove('selected');
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
rowContainer.setAttribute('data-row-id', `${rowId}`);
|
|
137
|
+
this.rowCount++;
|
|
138
|
+
rowContainer.appendChild(checkbox);
|
|
139
|
+
}
|
|
140
|
+
appendSeededTemplate(rowData, rowContainer) {
|
|
141
|
+
this.template.childNodes.forEach(child => {
|
|
142
|
+
const clone = child.cloneNode(false);
|
|
143
|
+
if (clone.getAttribute('data-fields')) {
|
|
144
|
+
const fields = clone.getAttribute('data-fields').replace(/\s/g, '').split(',');
|
|
145
|
+
const filteredRowData = Object.fromEntries(fields.map((field) => {
|
|
146
|
+
return [field, rowData[field]];
|
|
147
|
+
}));
|
|
148
|
+
clone.setAttribute('row-data', JSON.stringify(filteredRowData));
|
|
149
|
+
}
|
|
150
|
+
else {
|
|
151
|
+
clone.setAttribute('row-data', JSON.stringify(rowData));
|
|
152
|
+
}
|
|
153
|
+
rowContainer.appendChild(clone);
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
appendGenericTemplate(rowData, rowContainer) {
|
|
157
|
+
const row = document.createElement('div');
|
|
158
|
+
row.classList.add('generic-template__content');
|
|
159
|
+
row.textContent = rowData.text;
|
|
160
|
+
rowContainer.appendChild(row);
|
|
161
|
+
if (!rowData.icon)
|
|
162
|
+
return;
|
|
163
|
+
const icon = document.createElement('span');
|
|
164
|
+
icon.classList.add('material-symbols-rounded');
|
|
165
|
+
icon.textContent = rowData.icon;
|
|
166
|
+
if (rowData.iconColor)
|
|
167
|
+
icon.style['color'] = rowData.iconColor;
|
|
168
|
+
row.prepend(icon);
|
|
169
|
+
}
|
|
170
|
+
row(rowData) {
|
|
171
|
+
const rowContainer = document.createElement('div');
|
|
172
|
+
rowContainer.classList.add('tttx-list__row');
|
|
173
|
+
rowContainer.addEventListener('click', () => {
|
|
174
|
+
this.listItemClickHandler(rowData);
|
|
175
|
+
});
|
|
176
|
+
this.appendRowCheckbox(rowContainer);
|
|
177
|
+
this.template ? this.appendSeededTemplate(rowData, rowContainer) : this.appendGenericTemplate(rowData, rowContainer);
|
|
178
|
+
return rowContainer;
|
|
179
|
+
}
|
|
180
|
+
renderRows(batchData) {
|
|
181
|
+
batchData.forEach(rowData => {
|
|
182
|
+
this.listItemContainer().appendChild(this.row(rowData));
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
loadIndicator() {
|
|
186
|
+
if (!this.loading)
|
|
187
|
+
return;
|
|
188
|
+
return h("div", { class: "load-indicator" }, h("tttx-loading-spinner", { size: 'large' }));
|
|
189
|
+
}
|
|
190
|
+
render() {
|
|
191
|
+
return (h(Host, null, h("div", { class: "list-item-container", tabindex: "0" }, !this.loading && this.items.length === 0 ? 'No data to display' : undefined), this.loadIndicator()));
|
|
192
|
+
}
|
|
193
|
+
get host() { return this; }
|
|
194
|
+
static get style() { return tttxListCss; }
|
|
195
|
+
}, [1, "tttx-list", {
|
|
196
|
+
"name": [1],
|
|
197
|
+
"selectable": [4],
|
|
198
|
+
"items": [32],
|
|
199
|
+
"selectedIds": [32],
|
|
200
|
+
"loading": [32],
|
|
201
|
+
"lastPage": [32]
|
|
202
|
+
}, [[4, "listPageLoad", "listLoadHandler"], [4, "listClearDataCache", "listClearDataCacheHandler"], [4, "listActionSelectedEvent", "listActionSelectedEventHandler"]]]);
|
|
203
|
+
function defineCustomElement$1() {
|
|
204
|
+
if (typeof customElements === "undefined") {
|
|
205
|
+
return;
|
|
206
|
+
}
|
|
207
|
+
const components = ["tttx-list", "tttx-loading-spinner"];
|
|
208
|
+
components.forEach(tagName => { switch (tagName) {
|
|
209
|
+
case "tttx-list":
|
|
210
|
+
if (!customElements.get(tagName)) {
|
|
211
|
+
customElements.define(tagName, TttxList$1);
|
|
212
|
+
}
|
|
213
|
+
break;
|
|
214
|
+
case "tttx-loading-spinner":
|
|
215
|
+
if (!customElements.get(tagName)) {
|
|
216
|
+
defineCustomElement$2();
|
|
217
|
+
}
|
|
218
|
+
break;
|
|
219
|
+
} });
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
const TttxList = TttxList$1;
|
|
223
|
+
const defineCustomElement = defineCustomElement$1;
|
|
224
|
+
|
|
225
|
+
export { TttxList, defineCustomElement };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface TttxLoadingSpinner extends Components.TttxLoadingSpinner, HTMLElement {}
|
|
4
|
+
export const TttxLoadingSpinner: {
|
|
5
|
+
prototype: TttxLoadingSpinner;
|
|
6
|
+
new (): TttxLoadingSpinner;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,40 @@
|
|
|
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 = /*@__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() {
|
|
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);
|
|
35
|
+
}
|
|
36
|
+
break;
|
|
37
|
+
} });
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export { TttxLoadingSpinner as T, defineCustomElement as d };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface TttxPopoverContent extends Components.TttxPopoverContent, HTMLElement {}
|
|
4
|
+
export const TttxPopoverContent: {
|
|
5
|
+
prototype: TttxPopoverContent;
|
|
6
|
+
new (): TttxPopoverContent;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
|
|
3
|
+
const tttxPopoverContentCss = ".material-symbols-rounded{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}:host{display:block;max-width:400px}h4{margin:0;font-size:15px;font-weight:700;color:black;margin-bottom:4px}p{margin:0;font-size:14px;font-weight:normal;color:black;margin-bottom:4px}.linky{color:#1479c6;text-decoration:none;cursor:pointer}";
|
|
4
|
+
|
|
5
|
+
const TttxPopoverContent = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
6
|
+
constructor() {
|
|
7
|
+
super();
|
|
8
|
+
this.__registerHost();
|
|
9
|
+
this.__attachShadow();
|
|
10
|
+
this.header = undefined;
|
|
11
|
+
this.body = undefined;
|
|
12
|
+
this.linkcontext = undefined;
|
|
13
|
+
this.linktext = undefined;
|
|
14
|
+
}
|
|
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: evt => console.log(this.linkcontext, evt) }, this.linktext || 'More Information'))));
|
|
17
|
+
}
|
|
18
|
+
static get style() { return tttxPopoverContentCss; }
|
|
19
|
+
}, [1, "tttx-popover-content", {
|
|
20
|
+
"header": [1],
|
|
21
|
+
"body": [1],
|
|
22
|
+
"linkcontext": [1],
|
|
23
|
+
"linktext": [1]
|
|
24
|
+
}]);
|
|
25
|
+
function defineCustomElement() {
|
|
26
|
+
if (typeof customElements === "undefined") {
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
const components = ["tttx-popover-content"];
|
|
30
|
+
components.forEach(tagName => { switch (tagName) {
|
|
31
|
+
case "tttx-popover-content":
|
|
32
|
+
if (!customElements.get(tagName)) {
|
|
33
|
+
customElements.define(tagName, TttxPopoverContent);
|
|
34
|
+
}
|
|
35
|
+
break;
|
|
36
|
+
} });
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export { TttxPopoverContent as T, defineCustomElement as d };
|
|
@@ -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;
|