@3t-transform/threeteeui 0.0.22 → 0.0.24
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-bf777121.js → index-bc080fb4.js} +2 -148
- package/dist/cjs/loader.cjs.js +3 -4
- package/dist/cjs/tttx-button.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-list.cjs.entry.js +14 -178
- package/dist/cjs/tttx-loading-spinner.cjs.entry.js +1 -1
- package/dist/cjs/tttx-standalone-input.cjs.entry.js +1 -1
- package/dist/cjs/tttx-table.cjs.entry.js +1 -1
- package/dist/cjs/tttx.cjs.js +3 -7
- package/dist/collection/collection-manifest.json +2 -6
- package/dist/collection/components/atoms/tttx-button/test/tttx-button.e2e.js +9 -0
- package/dist/collection/components/atoms/tttx-button/test/tttx-button.spec.js +43 -0
- package/dist/collection/components/atoms/tttx-icon/test/tttx-icon.e2e.js +9 -0
- package/dist/collection/components/atoms/tttx-icon/test/tttx-icon.spec.js +16 -0
- package/dist/collection/components/atoms/tttx-keyvalue-block/test/tttx-keyvalue-block.spec.js +164 -0
- package/dist/collection/components/atoms/tttx-loading-spinner/Test/tttx-loading-spinner.spec.js +64 -0
- package/dist/collection/components/molecules/tttx-list/test/tttx-list.spec.js +151 -0
- package/dist/collection/components/molecules/tttx-list/tttx-list.css +17 -20
- package/dist/collection/components/molecules/tttx-list/tttx-list.js +22 -255
- package/dist/collection/components/molecules/tttx-list/tttx-list.stories.js +34 -32
- package/dist/collection/components/molecules/tttx-standalone-input/test/tttx-standalone-input.e2e.js +9 -0
- package/dist/collection/components/molecules/tttx-standalone-input/test/tttx-standalone-input.spec.js +146 -0
- package/dist/collection/components/molecules/tttx-table/test/tttx-table.e2e.js +9 -0
- package/dist/components/index.d.ts +0 -13
- package/dist/components/index.js +1 -5
- package/dist/components/tttx-button.js +54 -1
- package/dist/components/tttx-list.js +19 -188
- package/dist/components/tttx-loading-spinner.js +38 -1
- package/dist/components/tttx-table.js +2 -8
- package/dist/esm/{index-a05bd606.js → index-901bfd55.js} +3 -147
- package/dist/esm/loader.js +3 -4
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm/tttx-button.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-list.entry.js +14 -178
- package/dist/esm/tttx-loading-spinner.entry.js +1 -1
- package/dist/esm/tttx-standalone-input.entry.js +1 -1
- package/dist/esm/tttx-table.entry.js +1 -1
- package/dist/esm/tttx.js +3 -4
- package/dist/tttx/{p-68ff0f39.entry.js → p-0ae51ec5.entry.js} +1 -1
- package/dist/tttx/{p-9536b8c4.entry.js → p-1ec23160.entry.js} +1 -1
- package/dist/tttx/p-300ff6a8.entry.js +1 -0
- package/dist/tttx/p-32ad02d3.entry.js +1 -0
- package/dist/tttx/{p-a96ca037.entry.js → p-80cf5236.entry.js} +1 -1
- package/dist/tttx/{p-a5808741.entry.js → p-9a382959.entry.js} +1 -1
- package/dist/tttx/{p-46b5551e.entry.js → p-a1bd16a1.entry.js} +1 -1
- package/dist/tttx/{p-93763d3c.entry.js → p-a4077908.entry.js} +1 -1
- package/dist/tttx/p-a6953900.entry.js +1 -0
- package/dist/tttx/p-b46e3c59.entry.js +1 -0
- package/dist/tttx/p-c290160b.js +2 -0
- package/dist/tttx/p-dc179257.entry.js +1 -0
- package/dist/tttx/p-e19eb07e.entry.js +1 -0
- package/dist/tttx/p-e4341658.entry.js +1 -0
- package/dist/tttx/tttx.esm.js +1 -1
- package/dist/types/components/atoms/tttx-button/test/tttx-button.e2e.d.ts +1 -0
- package/dist/types/components/atoms/tttx-button/test/tttx-button.spec.d.ts +1 -0
- package/dist/types/components/atoms/tttx-icon/test/tttx-icon.e2e.d.ts +1 -0
- package/dist/types/components/atoms/tttx-icon/test/tttx-icon.spec.d.ts +1 -0
- package/dist/types/components/atoms/tttx-keyvalue-block/test/tttx-keyvalue-block.spec.d.ts +1 -0
- package/dist/types/components/atoms/tttx-loading-spinner/Test/tttx-loading-spinner.spec.d.ts +1 -0
- package/dist/types/components/molecules/tttx-list/interfaces.d.ts +4 -0
- package/dist/types/components/molecules/tttx-list/test/tttx-list.spec.d.ts +1 -0
- package/dist/types/components/molecules/tttx-list/tttx-list.d.ts +4 -46
- package/dist/types/components/molecules/tttx-list/tttx-list.stories.d.ts +2 -8
- package/dist/types/components/molecules/tttx-standalone-input/test/tttx-standalone-input.e2e.d.ts +1 -0
- package/dist/types/components/molecules/tttx-standalone-input/test/tttx-standalone-input.spec.d.ts +1 -0
- package/dist/types/components/molecules/tttx-standalone-input/tttx-standalone-input.d.ts +6 -6
- package/dist/types/components/molecules/tttx-table/test/tttx-table.e2e.d.ts +1 -0
- package/dist/types/components.d.ts +3 -91
- package/dist/types/stencil-public-runtime.d.ts +3 -59
- package/loader/index.d.ts +0 -9
- package/package.json +3 -2
- package/readme.md +20 -0
- package/dist/cjs/tttx-checkbox.cjs.entry.js +0 -28
- package/dist/cjs/tttx-form.cjs.entry.js +0 -374
- package/dist/cjs/tttx-input-calendar.cjs.entry.js +0 -125
- package/dist/cjs/tttx-popover-content.cjs.entry.js +0 -23
- package/dist/collection/components/atoms/tttx-popover-content/tttx-popover-content.css +0 -30
- package/dist/collection/components/atoms/tttx-popover-content/tttx-popover-content.js +0 -97
- package/dist/collection/components/atoms/tttx-popover-content/tttx-popover-content.stories.js +0 -23
- package/dist/collection/components/atoms/ttx-checkbox/tttx-checkbox.css +0 -181
- package/dist/collection/components/atoms/ttx-checkbox/tttx-checkbox.js +0 -102
- package/dist/collection/components/atoms/ttx-checkbox/tttx-checkbox.stories.js +0 -13
- package/dist/collection/components/molecules/tttx-form/tttx-form.css +0 -314
- package/dist/collection/components/molecules/tttx-form/tttx-form.js +0 -452
- package/dist/collection/components/molecules/tttx-form/tttx-form.stories.js +0 -109
- package/dist/collection/components/molecules/tttx-input-calendar/tttx-input-calendar.css +0 -93
- package/dist/collection/components/molecules/tttx-input-calendar/tttx-input-calendar.js +0 -174
- package/dist/collection/components/molecules/tttx-input-calendar/tttx-input-calendar.stories.js +0 -27
- package/dist/components/tttx-button2.js +0 -56
- package/dist/components/tttx-checkbox.d.ts +0 -11
- package/dist/components/tttx-checkbox.js +0 -46
- package/dist/components/tttx-form.d.ts +0 -11
- package/dist/components/tttx-form.js +0 -391
- package/dist/components/tttx-input-calendar.d.ts +0 -11
- package/dist/components/tttx-input-calendar.js +0 -157
- package/dist/components/tttx-loading-spinner2.js +0 -40
- package/dist/components/tttx-popover-content.d.ts +0 -11
- package/dist/components/tttx-popover-content.js +0 -6
- package/dist/components/tttx-popover-content2.js +0 -39
- package/dist/esm/tttx-checkbox.entry.js +0 -24
- package/dist/esm/tttx-form.entry.js +0 -370
- package/dist/esm/tttx-input-calendar.entry.js +0 -121
- package/dist/esm/tttx-popover-content.entry.js +0 -19
- package/dist/tttx/p-037d286f.entry.js +0 -1
- package/dist/tttx/p-07b134af.js +0 -2
- package/dist/tttx/p-1b63f16a.entry.js +0 -1
- package/dist/tttx/p-45afb84c.entry.js +0 -1
- package/dist/tttx/p-a92ca87e.entry.js +0 -1
- package/dist/tttx/p-f579ed1e.entry.js +0 -1
- package/dist/types/components/atoms/tttx-popover-content/tttx-popover-content.d.ts +0 -7
- package/dist/types/components/atoms/tttx-popover-content/tttx-popover-content.stories.d.ts +0 -18
- package/dist/types/components/atoms/ttx-checkbox/tttx-checkbox.d.ts +0 -9
- package/dist/types/components/atoms/ttx-checkbox/tttx-checkbox.stories.d.ts +0 -6
- package/dist/types/components/molecules/tttx-form/tttx-form.d.ts +0 -134
- package/dist/types/components/molecules/tttx-form/tttx-form.stories.d.ts +0 -12
- package/dist/types/components/molecules/tttx-input-calendar/tttx-input-calendar.d.ts +0 -19
- package/dist/types/components/molecules/tttx-input-calendar/tttx-input-calendar.stories.d.ts +0 -26
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2
|
-
import { Host, h } from '@stencil/core';
|
|
3
|
-
export class TttxInputCalendar {
|
|
4
|
-
constructor() {
|
|
5
|
-
// an array of month numbers mapped to their names
|
|
6
|
-
this.monthNames = Array.from({ length: 12 }, (_, i) => i + 1).map((month) => {
|
|
7
|
-
const date = new Date(0);
|
|
8
|
-
date.setUTCMonth(month - 1);
|
|
9
|
-
return date.toLocaleString('default', { month: 'long' });
|
|
10
|
-
});
|
|
11
|
-
this.onClickOutside = (event) => {
|
|
12
|
-
if (!this.el.contains(event.target) && this.showCalendar) {
|
|
13
|
-
this.showCalendar = false;
|
|
14
|
-
}
|
|
15
|
-
};
|
|
16
|
-
this.onFocusIn = (event) => {
|
|
17
|
-
if (!this.el.contains(event.target) && this.showCalendar) {
|
|
18
|
-
this.showCalendar = false;
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
this.previousHandler = () => {
|
|
22
|
-
if (this.selectedMonth === 1) {
|
|
23
|
-
this.selectedMonth = 12;
|
|
24
|
-
this.selectedYear--;
|
|
25
|
-
}
|
|
26
|
-
else {
|
|
27
|
-
this.selectedMonth--;
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
this.nextHandler = () => {
|
|
31
|
-
if (this.selectedMonth === 12) {
|
|
32
|
-
this.selectedMonth = 1;
|
|
33
|
-
this.selectedYear++;
|
|
34
|
-
}
|
|
35
|
-
else {
|
|
36
|
-
this.selectedMonth++;
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
this.months = false;
|
|
40
|
-
this.years = false;
|
|
41
|
-
this.showCalendar = false;
|
|
42
|
-
this.selectedYear = new Date().getFullYear();
|
|
43
|
-
this.selectedMonth = new Date().getMonth() + 1;
|
|
44
|
-
}
|
|
45
|
-
componentDidLoad() {
|
|
46
|
-
const slot = this.el.shadowRoot.querySelector('slot');
|
|
47
|
-
if (slot) {
|
|
48
|
-
const assignedElements = slot.assignedElements();
|
|
49
|
-
if (assignedElements[0]) {
|
|
50
|
-
assignedElements[0].addEventListener('click', (event) => {
|
|
51
|
-
event.preventDefault();
|
|
52
|
-
this.showCalendar = !this.showCalendar;
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
document.addEventListener('click', this.onClickOutside);
|
|
57
|
-
}
|
|
58
|
-
disconnectedCallback() {
|
|
59
|
-
document.removeEventListener('click', this.onClickOutside);
|
|
60
|
-
}
|
|
61
|
-
getDaysAndDates(year, month) {
|
|
62
|
-
const firstDayOfMonth = new Date(year, month - 1, 1);
|
|
63
|
-
const lastDayOfMonth = new Date(year, month, 0);
|
|
64
|
-
const daysAndDates = [];
|
|
65
|
-
for (let day = firstDayOfMonth; day <= lastDayOfMonth; day.setDate(day.getDate() + 1)) {
|
|
66
|
-
const weekDay = day.getDay();
|
|
67
|
-
const date = day.getDate();
|
|
68
|
-
const dayAndDate = {
|
|
69
|
-
day: weekDay,
|
|
70
|
-
date: date
|
|
71
|
-
};
|
|
72
|
-
daysAndDates.push(dayAndDate);
|
|
73
|
-
}
|
|
74
|
-
return daysAndDates;
|
|
75
|
-
}
|
|
76
|
-
clickDateHandler(event) {
|
|
77
|
-
const { year, month, day } = event;
|
|
78
|
-
const selectedDate = new Date(year, month - 1, day + 1);
|
|
79
|
-
this.inputElement.valueAsDate = selectedDate;
|
|
80
|
-
this.showCalendar = false;
|
|
81
|
-
}
|
|
82
|
-
render() {
|
|
83
|
-
const daysOfWeek = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
|
|
84
|
-
const daysAndDates = this.getDaysAndDates(this.selectedYear, this.selectedMonth);
|
|
85
|
-
const currentYear = new Date().getFullYear();
|
|
86
|
-
const years = Array.from({ length: 11 }, (_, i) => currentYear - 5 + i);
|
|
87
|
-
const calendarGrid = [];
|
|
88
|
-
let currentWeek = [];
|
|
89
|
-
// Fill empty days before the first day of the month
|
|
90
|
-
for (let i = 0; i < daysAndDates[0].day; i++) {
|
|
91
|
-
currentWeek.push(h("td", null));
|
|
92
|
-
}
|
|
93
|
-
// Fill the calendar with days and dates
|
|
94
|
-
daysAndDates.forEach(({ day, date }) => {
|
|
95
|
-
currentWeek.push(h("td", null, h("span", { onClick: () => this.clickDateHandler({ year: this.selectedYear, month: this.selectedMonth, day: date }) }, date)));
|
|
96
|
-
if (day === 6) {
|
|
97
|
-
calendarGrid.push(h("tr", null, currentWeek));
|
|
98
|
-
currentWeek = [];
|
|
99
|
-
}
|
|
100
|
-
});
|
|
101
|
-
// Fill the remaining empty days in the last week
|
|
102
|
-
if (currentWeek.length > 0) {
|
|
103
|
-
while (currentWeek.length < 7) {
|
|
104
|
-
currentWeek.push(h("td", null));
|
|
105
|
-
}
|
|
106
|
-
calendarGrid.push(h("tr", null, currentWeek));
|
|
107
|
-
}
|
|
108
|
-
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) => {
|
|
109
|
-
this.selectedMonth = parseInt(event.target.value);
|
|
110
|
-
} }, 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) => {
|
|
111
|
-
this.selectedYear = parseInt(event.target.value);
|
|
112
|
-
} }, 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))))));
|
|
113
|
-
}
|
|
114
|
-
static get is() { return "tttx-input-calendar"; }
|
|
115
|
-
static get encapsulation() { return "shadow"; }
|
|
116
|
-
static get originalStyleUrls() {
|
|
117
|
-
return {
|
|
118
|
-
"$": ["tttx-input-calendar.scss"]
|
|
119
|
-
};
|
|
120
|
-
}
|
|
121
|
-
static get styleUrls() {
|
|
122
|
-
return {
|
|
123
|
-
"$": ["tttx-input-calendar.css"]
|
|
124
|
-
};
|
|
125
|
-
}
|
|
126
|
-
static get properties() {
|
|
127
|
-
return {
|
|
128
|
-
"months": {
|
|
129
|
-
"type": "boolean",
|
|
130
|
-
"mutable": false,
|
|
131
|
-
"complexType": {
|
|
132
|
-
"original": "boolean",
|
|
133
|
-
"resolved": "boolean",
|
|
134
|
-
"references": {}
|
|
135
|
-
},
|
|
136
|
-
"required": false,
|
|
137
|
-
"optional": false,
|
|
138
|
-
"docs": {
|
|
139
|
-
"tags": [],
|
|
140
|
-
"text": ""
|
|
141
|
-
},
|
|
142
|
-
"attribute": "months",
|
|
143
|
-
"reflect": false,
|
|
144
|
-
"defaultValue": "false"
|
|
145
|
-
},
|
|
146
|
-
"years": {
|
|
147
|
-
"type": "boolean",
|
|
148
|
-
"mutable": false,
|
|
149
|
-
"complexType": {
|
|
150
|
-
"original": "boolean",
|
|
151
|
-
"resolved": "boolean",
|
|
152
|
-
"references": {}
|
|
153
|
-
},
|
|
154
|
-
"required": false,
|
|
155
|
-
"optional": false,
|
|
156
|
-
"docs": {
|
|
157
|
-
"tags": [],
|
|
158
|
-
"text": ""
|
|
159
|
-
},
|
|
160
|
-
"attribute": "years",
|
|
161
|
-
"reflect": false,
|
|
162
|
-
"defaultValue": "false"
|
|
163
|
-
}
|
|
164
|
-
};
|
|
165
|
-
}
|
|
166
|
-
static get states() {
|
|
167
|
-
return {
|
|
168
|
-
"showCalendar": {},
|
|
169
|
-
"selectedYear": {},
|
|
170
|
-
"selectedMonth": {}
|
|
171
|
-
};
|
|
172
|
-
}
|
|
173
|
-
static get elementRef() { return "el"; }
|
|
174
|
-
}
|
package/dist/collection/components/molecules/tttx-input-calendar/tttx-input-calendar.stories.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { withActions } from '@storybook/addon-actions/decorator';
|
|
2
|
-
export default {
|
|
3
|
-
title: 'molecules/Calendar',
|
|
4
|
-
component: 'tttx-input-calendar',
|
|
5
|
-
argTypes: {
|
|
6
|
-
required: {
|
|
7
|
-
control: {
|
|
8
|
-
type: 'boolean'
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
},
|
|
12
|
-
parameters: {
|
|
13
|
-
actions: {
|
|
14
|
-
handles: ['valueChanged', 'focusChanged', 'blurChanged'],
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
decorators: [withActions],
|
|
18
|
-
};
|
|
19
|
-
export const BasicCalendar = ({ required }) => {
|
|
20
|
-
return `<tttx-input-calendar>
|
|
21
|
-
<tttx-standalone-input ${required ? 'required' : ''} label="Choose a date" type="date" />
|
|
22
|
-
</tttx-input-calendar>
|
|
23
|
-
`;
|
|
24
|
-
};
|
|
25
|
-
BasicCalendar.args = {
|
|
26
|
-
required: true
|
|
27
|
-
};
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { d as defineCustomElement$1 } from './tttx-icon2.js';
|
|
3
|
-
|
|
4
|
-
const tttxButtonCss = ".material-symbols-rounded{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}.button{font-family:Roboto, serif;box-sizing:border-box;height:36px;min-width:36px;padding:0;margin:0;background:transparent;color:#212121;border:1px solid #c8c8c8;border-radius:4px;text-transform:uppercase;display:flex;justify-content:left;align-items:center;font-size:14px;font-weight:400}.button-content{display:block;padding:0 16px}.icon-left,.icon-right{margin-top:4px}.iconleft{padding-left:8px}.iconleft .button-content{padding-left:4px}.iconright{padding-right:8px}.iconright .button-content{padding-right:4px}.notext{padding:0 6px}.button:hover{background:rgba(17, 17, 17, 0.1);border:1px solid #D5D5D5}.button:active{background:rgba(17, 17, 17, 0.2);border:1px solid #D5D5D5}.primary{background:#1479c6;border:1px solid #1479c6;color:white}.primary:hover{background:#146EB3;border:1px solid #146EB3}.primary:active{background:#1464A2;border:1px solid #1464A2}.borderless{background:transparent;border:none;color:#212121}.borderless:hover{background:rgba(17, 17, 17, 0.1);border:none}.borderless:active{background:rgba(17, 17, 17, 0.2);border:none}.danger{background:#DC0000;border:1px solid #DC0000;color:white}.danger:hover{background:#C60000;border:1px solid #C60000}.danger:active{background:#B00000;border:1px solid #B00000}.disabled{background:#aeaeae;border:none;color:#4c4c4c;cursor:not-allowed}.disabled:hover{background:#aeaeae;border:none;color:#4c4c4c;cursor:not-allowed}.disabled:active{background:#aeaeae;border:none;color:#4c4c4c;cursor:not-allowed}:host{display:inline-block}.spacingleft{margin-left:8px}";
|
|
5
|
-
|
|
6
|
-
const TttxButton = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
7
|
-
constructor() {
|
|
8
|
-
super();
|
|
9
|
-
this.__registerHost();
|
|
10
|
-
this.__attachShadow();
|
|
11
|
-
this._iconcolor = 'black';
|
|
12
|
-
this.notext = undefined;
|
|
13
|
-
this.icon = undefined;
|
|
14
|
-
this.iconposition = 'left';
|
|
15
|
-
this.design = 'default';
|
|
16
|
-
}
|
|
17
|
-
componentWillLoad() {
|
|
18
|
-
this._design = this.design;
|
|
19
|
-
const designs = ['primary', 'default', 'disabled', 'danger', 'borderless'];
|
|
20
|
-
if (!designs.includes(this.design)) {
|
|
21
|
-
this._design = 'default';
|
|
22
|
-
}
|
|
23
|
-
if (this._design === 'primary' || this._design === 'danger') {
|
|
24
|
-
this._iconcolor = 'white';
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
render() {
|
|
28
|
-
return (h(Host, null, h("button", { class: `button ${this._design} ${this.icon ? 'withicon' : ''} ${this.icon && this.iconposition ? 'icon' + this.iconposition : ''} ${this.notext ? 'notext' : ''}` }, this.icon && this.iconposition === 'left' && (h("div", { class: "icon-left" }, h("tttx-icon", { icon: this.icon, color: this._iconcolor }))), !this.notext && h("div", { class: "button-content" }, h("slot", null)), this.icon && this.iconposition === 'right' && (h("div", { class: "icon-right" }, h("tttx-icon", { icon: this.icon, color: this._iconcolor }))))));
|
|
29
|
-
}
|
|
30
|
-
static get style() { return tttxButtonCss; }
|
|
31
|
-
}, [1, "tttx-button", {
|
|
32
|
-
"notext": [4],
|
|
33
|
-
"icon": [1],
|
|
34
|
-
"iconposition": [1],
|
|
35
|
-
"design": [1]
|
|
36
|
-
}]);
|
|
37
|
-
function defineCustomElement() {
|
|
38
|
-
if (typeof customElements === "undefined") {
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
|
-
const components = ["tttx-button", "tttx-icon"];
|
|
42
|
-
components.forEach(tagName => { switch (tagName) {
|
|
43
|
-
case "tttx-button":
|
|
44
|
-
if (!customElements.get(tagName)) {
|
|
45
|
-
customElements.define(tagName, TttxButton);
|
|
46
|
-
}
|
|
47
|
-
break;
|
|
48
|
-
case "tttx-icon":
|
|
49
|
-
if (!customElements.get(tagName)) {
|
|
50
|
-
defineCustomElement$1();
|
|
51
|
-
}
|
|
52
|
-
break;
|
|
53
|
-
} });
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export { TttxButton as T, defineCustomElement as d };
|
|
@@ -1,11 +0,0 @@
|
|
|
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;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
|
|
3
|
-
const tttxCheckboxCss = ".material-symbols-rounded{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}.material-symbols-rounded{font-family:\"Material Symbols Rounded\", sans-serif;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;color:#9e9e9e}.icon-left,.icon-right{flex-basis:24px}.icon-left span,.icon-right span{font-size:24px;line-height:24px;text-align:center;display:block;width:24px;height:24px;margin-top:4px}.icon-left span{margin-left:4px}.icon-right span{margin-right:4px}.icon-right{margin-top:5px;margin-right:4px}.icon-left{margin-top:5px;margin-left:4px}.iconleft .input{padding-left:4px}.iconright .input{padding-right:4px}.focused{border-color:#1479c6}.errormsg{display:flex;justify-content:center;align-items:center;float:left;margin-bottom:16px;box-sizing:border-box;background-color:transparent;height:26px;font-size:14px;border-radius:none;z-index:2;color:#dc0000}.errormsg .validationicon{width:16px;height:16px;font-size:16px;margin-right:4px;vertical-align:middle;color:#dc0000}.danger{color:#dc0000}.optional{color:#757575;font-weight:normal}label.inputBlock{display:block;position:relative;line-height:21px}label{font-weight:500;font-size:16px}input:not([type=submit]){font-family:\"Roboto\", serif;box-sizing:border-box;width:100%;height:36px;padding:0 16px;font-size:16px;border:1px solid #d5d5d5;border-radius:4px;margin-top:4px}input[type=date]{background:white;display:block;min-width:calc(100% - 18px);line-height:37px}input.invalid:invalid,input.standalone.invalid{border:1px solid #dc0000}input~.errorBubble{min-height:27px;position:relative;font-size:14px;font-weight:normal;width:100%;font-family:\"Roboto\", sans-serif;color:#dc0000;display:flex;align-content:center;align-items:center;justify-items:center}input~.errorBubble:not(.visible){visibility:hidden}input~.errorBubble span{color:#dc0000;font-size:16px;margin-right:4px;height:16px}input.invalid:invalid~.errorBubble{position:relative;font-size:14px;font-weight:normal;width:100%;font-family:\"Roboto\", sans-serif;color:#dc0000;visibility:visible}input:focus{border-color:#1479c6}:host{display:block}.spacing{margin-bottom:16px}";
|
|
4
|
-
|
|
5
|
-
const TttxCheckbox$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
6
|
-
constructor() {
|
|
7
|
-
super();
|
|
8
|
-
this.__registerHost();
|
|
9
|
-
this.__attachShadow();
|
|
10
|
-
this.valueChanged = createEvent(this, "valueChanged", 7);
|
|
11
|
-
this.value = undefined;
|
|
12
|
-
this.label = undefined;
|
|
13
|
-
this.required = undefined;
|
|
14
|
-
}
|
|
15
|
-
handleClick(event) {
|
|
16
|
-
const target = event.target;
|
|
17
|
-
this.value = target.checked;
|
|
18
|
-
this.valueChanged.emit(target.checked);
|
|
19
|
-
}
|
|
20
|
-
render() {
|
|
21
|
-
return (h(Host, null, h("div", { class: "field spacing" }, this.label && (h("label", { class: "label" }, this.label, !this.required ? h("span", { class: "optional" }, " (optional)") : '')), h("input", { type: "checkbox", class: "input", onChange: event => this.handleClick(event), checked: this.value }))));
|
|
22
|
-
}
|
|
23
|
-
static get style() { return tttxCheckboxCss; }
|
|
24
|
-
}, [1, "tttx-checkbox", {
|
|
25
|
-
"value": [4],
|
|
26
|
-
"label": [1],
|
|
27
|
-
"required": [4]
|
|
28
|
-
}]);
|
|
29
|
-
function defineCustomElement$1() {
|
|
30
|
-
if (typeof customElements === "undefined") {
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
const components = ["tttx-checkbox"];
|
|
34
|
-
components.forEach(tagName => { switch (tagName) {
|
|
35
|
-
case "tttx-checkbox":
|
|
36
|
-
if (!customElements.get(tagName)) {
|
|
37
|
-
customElements.define(tagName, TttxCheckbox$1);
|
|
38
|
-
}
|
|
39
|
-
break;
|
|
40
|
-
} });
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
const TttxCheckbox = TttxCheckbox$1;
|
|
44
|
-
const defineCustomElement = defineCustomElement$1;
|
|
45
|
-
|
|
46
|
-
export { TttxCheckbox, defineCustomElement };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { Components, JSX } from "../types/components";
|
|
2
|
-
|
|
3
|
-
interface TttxForm extends Components.TttxForm, HTMLElement {}
|
|
4
|
-
export const TttxForm: {
|
|
5
|
-
prototype: TttxForm;
|
|
6
|
-
new (): TttxForm;
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* Used to define this component and all nested components recursively.
|
|
10
|
-
*/
|
|
11
|
-
export const defineCustomElement: () => void;
|