q2-tecton-elements 1.28.3 → 1.29.1
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/click-elsewhere_2.cjs.entry.js +4 -3
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/q2-action-sheet.cjs.entry.js +10 -5
- package/dist/cjs/q2-badge.cjs.entry.js +43 -0
- package/dist/cjs/q2-btn_2.cjs.entry.js +1 -1
- package/dist/cjs/q2-calendar.cjs.entry.js +5 -0
- package/dist/cjs/q2-checkbox.cjs.entry.js +16 -7
- package/dist/cjs/q2-data-table.cjs.entry.js +287 -0
- package/dist/cjs/{q2-badge_2.cjs.entry.js → q2-input.cjs.entry.js} +1 -38
- package/dist/cjs/q2-section.cjs.entry.js +1 -1
- package/dist/cjs/q2-tecton-elements.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/q2-action-sheet/index.js +26 -4
- package/dist/collection/components/q2-action-sheet/styles.css +2 -2
- package/dist/collection/components/q2-btn/styles.css +4 -0
- package/dist/collection/components/q2-calendar/index.js +5 -0
- package/dist/collection/components/q2-checkbox/index.js +15 -6
- package/dist/collection/components/q2-checkbox/styles.css +5 -0
- package/dist/collection/components/q2-data-table/index.js +539 -0
- package/dist/collection/components/q2-data-table/styles.css +192 -0
- package/dist/collection/components/q2-input/styles.css +1 -1
- package/dist/collection/components/q2-popover/index.js +4 -3
- package/dist/collection/components/q2-section/styles.css +17 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/index10.js +72 -55
- package/dist/components/index11.js +56 -44
- package/dist/components/index12.js +42 -42
- package/dist/components/index13.js +40 -538
- package/dist/components/index14.js +518 -136
- package/dist/components/index15.js +174 -574
- package/dist/components/index16.js +589 -0
- package/dist/components/index3.js +1 -1
- package/dist/components/index5.js +3 -3
- package/dist/components/index6.js +93 -94
- package/dist/components/index7.js +112 -2927
- package/dist/components/index8.js +2919 -3347
- package/dist/components/index9.js +3343 -56
- package/dist/components/q2-action-sheet.js +18 -12
- package/dist/components/q2-calendar.js +11 -6
- package/dist/components/q2-card.js +2 -2
- package/dist/components/q2-carousel-pane.js +1 -1
- package/dist/components/q2-carousel.js +3 -3
- package/dist/components/q2-chart-area.js +1 -1
- package/dist/components/q2-chart-bar.js +1 -1
- package/dist/components/q2-chart-donut.js +2 -2
- package/dist/components/q2-checkbox-group.js +2 -2
- package/dist/components/q2-checkbox.js +1 -133
- package/dist/components/q2-data-table.d.ts +11 -0
- package/dist/components/q2-data-table.js +349 -0
- package/dist/components/q2-dropdown-item.js +1 -1
- package/dist/components/q2-dropdown.js +5 -5
- package/dist/components/q2-editable-field.js +4 -4
- package/dist/components/q2-icon.js +1 -1
- package/dist/components/q2-input.js +1 -1
- package/dist/components/q2-loading.js +1 -1
- package/dist/components/q2-loc.js +1 -1
- package/dist/components/q2-message.js +1 -1
- package/dist/components/q2-month-picker.js +3 -3
- package/dist/components/q2-optgroup.js +1 -1
- package/dist/components/q2-option-list.js +1 -1
- package/dist/components/q2-option.js +1 -1
- package/dist/components/q2-pagination.js +4 -4
- package/dist/components/q2-pill.js +4 -4
- package/dist/components/q2-popover.js +1 -1
- package/dist/components/q2-radio-group.js +2 -2
- package/dist/components/q2-radio.js +1 -1
- package/dist/components/q2-section.js +4 -4
- package/dist/components/q2-select.js +6 -6
- package/dist/components/q2-stepper-pane.js +1 -1
- package/dist/components/q2-stepper-vertical.js +2 -2
- package/dist/components/q2-stepper.js +3 -3
- package/dist/components/q2-tab-container.js +3 -3
- package/dist/components/q2-tag.js +4 -4
- package/dist/components/q2-textarea.js +2 -2
- package/dist/components/q2-tooltip.js +1 -1
- package/dist/docs.json +280 -3
- package/dist/esm/click-elsewhere_2.entry.js +4 -3
- package/dist/esm/loader.js +1 -1
- package/dist/esm/q2-action-sheet.entry.js +10 -5
- package/dist/esm/q2-badge.entry.js +39 -0
- package/dist/esm/q2-btn_2.entry.js +1 -1
- package/dist/esm/q2-calendar.entry.js +5 -0
- package/dist/esm/q2-checkbox.entry.js +16 -7
- package/dist/esm/q2-data-table.entry.js +283 -0
- package/dist/esm/{q2-badge_2.entry.js → q2-input.entry.js} +3 -39
- package/dist/esm/q2-section.entry.js +1 -1
- package/dist/esm/q2-tecton-elements.js +1 -1
- package/dist/q2-tecton-elements/p-00b2c345.entry.js +1 -0
- package/dist/q2-tecton-elements/p-0112df78.entry.js +1 -0
- package/dist/q2-tecton-elements/p-08286237.entry.js +1 -0
- package/dist/q2-tecton-elements/p-18df4e0d.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-6975e5e4.entry.js → p-38885cc4.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-42d03011.entry.js +1 -0
- package/dist/q2-tecton-elements/p-47aefcc2.entry.js +1 -0
- package/dist/q2-tecton-elements/p-9a327827.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-807e2e44.entry.js → p-ccc497d5.entry.js} +1 -1
- package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
- package/dist/types/components/q2-action-sheet/index.d.ts +1 -0
- package/dist/types/components/q2-checkbox/index.d.ts +4 -0
- package/dist/types/components/q2-data-table/index.d.ts +94 -0
- package/dist/types/components.d.ts +47 -0
- package/package.json +3 -3
- package/dist/q2-tecton-elements/p-0b7003c4.entry.js +0 -1
- package/dist/q2-tecton-elements/p-1b9e07b4.entry.js +0 -1
- package/dist/q2-tecton-elements/p-3bf06809.entry.js +0 -1
- package/dist/q2-tecton-elements/p-92e746c8.entry.js +0 -1
- package/dist/q2-tecton-elements/p-d6824ce5.entry.js +0 -1
- /package/dist/types/workspace/workspace/{tecton-production_release_1.28.x → tecton-production_release_1.29.x}/packages/q2-tecton-elements/.stencil/test/helpers.d.ts +0 -0
|
@@ -94,6 +94,7 @@ export class Q2ActionSheet {
|
|
|
94
94
|
return (h(Fragment, null, h("div", { class: "content", ref: el => (this.contentElement = el) }, h("q2-option-list", { ref: el => (this.optionListElement = el), multiple: listProps.multiple, noSelect: listProps.noSelect, onChange: this.onListChange, onPopoverState: this.onListPopoverStateChange, selectedOptions: listProps.selectedOptions }, h("slot", null))), h("footer", null, listProps.multiple && (h("q2-btn", { "test-id": "btnDone", intent: "workflow-primary", onClick: this.onListDone }, loc('tecton.element.actionSheet.done'))))));
|
|
95
95
|
};
|
|
96
96
|
this.data = undefined;
|
|
97
|
+
this.title = undefined;
|
|
97
98
|
this.hideClose = undefined;
|
|
98
99
|
this.isScrollable = false;
|
|
99
100
|
this.renderStatus = 'is-closing';
|
|
@@ -150,14 +151,16 @@ export class Q2ActionSheet {
|
|
|
150
151
|
}
|
|
151
152
|
updateDialogMinMaxHeight() {
|
|
152
153
|
const windowHeight = window.innerHeight;
|
|
153
|
-
this.dialogElement.style.setProperty('--comp-
|
|
154
|
-
this.dialogElement.style.setProperty('--comp-
|
|
154
|
+
this.dialogElement.style.setProperty('--comp-action-sheet-computed-min-height', `${Math.floor(windowHeight * this.minHeight)}px`);
|
|
155
|
+
this.dialogElement.style.setProperty('--comp-action-sheet-computed-max-height', `${Math.floor(windowHeight * this.maxHeight)}px`);
|
|
155
156
|
}
|
|
156
157
|
/// Methods ///
|
|
157
158
|
async hide(data = { value: '', values: [], type: 'confirm' }) {
|
|
158
159
|
this.close.emit(data);
|
|
159
160
|
this.renderStatus = 'is-closing';
|
|
160
161
|
this.dialogElement.addEventListener('transitionend', () => {
|
|
162
|
+
if (this.renderStatus !== 'is-closing')
|
|
163
|
+
return;
|
|
161
164
|
this.dialogElement.close();
|
|
162
165
|
this.renderStatus = null;
|
|
163
166
|
this.data = undefined;
|
|
@@ -176,6 +179,8 @@ export class Q2ActionSheet {
|
|
|
176
179
|
this.dialogElement.showModal();
|
|
177
180
|
this.renderStatus = 'is-opening';
|
|
178
181
|
this.dialogElement.addEventListener('transitionend', () => {
|
|
182
|
+
if (this.renderStatus !== 'is-opening')
|
|
183
|
+
return;
|
|
179
184
|
this.renderStatus = 'is-open';
|
|
180
185
|
this.focusContent();
|
|
181
186
|
}, { once: true });
|
|
@@ -183,7 +188,7 @@ export class Q2ActionSheet {
|
|
|
183
188
|
render() {
|
|
184
189
|
var _a;
|
|
185
190
|
const { data } = this;
|
|
186
|
-
const showHeader = (data === null || data === void 0 ? void 0 : data.title) || !this.hideClose;
|
|
191
|
+
const showHeader = (data === null || data === void 0 ? void 0 : data.title) || this.title || !this.hideClose;
|
|
187
192
|
const renderStatus = this.renderStatus || '';
|
|
188
193
|
let RenderContent = null;
|
|
189
194
|
switch (data === null || data === void 0 ? void 0 : data.appearance) {
|
|
@@ -199,7 +204,7 @@ export class Q2ActionSheet {
|
|
|
199
204
|
}
|
|
200
205
|
const appearance = (data === null || data === void 0 ? void 0 : data.appearance) || 'slot';
|
|
201
206
|
const interiorClasses = `interior is-${appearance}`;
|
|
202
|
-
return (h("dialog", { ref: el => (this.dialogElement = el), class: renderStatus, onClick: this.onClick }, h("div", { class: interiorClasses }, showHeader && (h("header", null, h("div", { class: "title" }, data === null || data === void 0 ? void 0 : data.title), h("q2-btn", { class: "btn-close", "test-id": "btnClose", onClick: this.onCancel, label: "tecton.element.actionSheet.close", "hide-label": true }, h("q2-icon", { type: "close" })))), ((_a = this.data) === null || _a === void 0 ? void 0 : _a.description) && h("p", null, data.description), RenderContent && h(RenderContent, { data: this.data }))));
|
|
207
|
+
return (h("dialog", { ref: el => (this.dialogElement = el), class: renderStatus, onClick: this.onClick }, h("div", { class: interiorClasses }, showHeader && (h("header", null, h("div", { class: "title" }, (data === null || data === void 0 ? void 0 : data.title) || this.title), !this.hideClose && (h("q2-btn", { class: "btn-close", "test-id": "btnClose", onClick: this.onCancel, label: "tecton.element.actionSheet.close", "hide-label": true }, h("q2-icon", { type: "close" }))))), ((_a = this.data) === null || _a === void 0 ? void 0 : _a.description) && h("p", null, data.description), RenderContent && h(RenderContent, { data: this.data }))));
|
|
203
208
|
}
|
|
204
209
|
static get is() { return "q2-action-sheet"; }
|
|
205
210
|
static get encapsulation() { return "shadow"; }
|
|
@@ -235,6 +240,23 @@ export class Q2ActionSheet {
|
|
|
235
240
|
"text": ""
|
|
236
241
|
}
|
|
237
242
|
},
|
|
243
|
+
"title": {
|
|
244
|
+
"type": "string",
|
|
245
|
+
"mutable": false,
|
|
246
|
+
"complexType": {
|
|
247
|
+
"original": "string",
|
|
248
|
+
"resolved": "string",
|
|
249
|
+
"references": {}
|
|
250
|
+
},
|
|
251
|
+
"required": false,
|
|
252
|
+
"optional": false,
|
|
253
|
+
"docs": {
|
|
254
|
+
"tags": [],
|
|
255
|
+
"text": ""
|
|
256
|
+
},
|
|
257
|
+
"attribute": "title",
|
|
258
|
+
"reflect": false
|
|
259
|
+
},
|
|
238
260
|
"hideClose": {
|
|
239
261
|
"type": "boolean",
|
|
240
262
|
"mutable": false,
|
|
@@ -86,8 +86,8 @@ dialog {
|
|
|
86
86
|
--comp-content-gradient-height: var(--tct-action-sheet-content-gradient-height, var(--t-action-sheet-content-gradient-height, var(--app-scale-2x, 10px)));
|
|
87
87
|
--comp-dialog-interior-gap-default: var(--app-scale-2x, 10px);
|
|
88
88
|
--comp-dialog-max-width: var(--tct-action-sheet-max-width, var(--t-action-sheet-max-width, 400px));
|
|
89
|
-
--comp-dialog-max-height: var(--tct-action-sheet-max-height, var(--t-action-sheet-max-height, 75vh));
|
|
90
|
-
--comp-dialog-min-height: var(--tct-action-sheet-min-height, var(--t-action-sheet-min-height, 20vh));
|
|
89
|
+
--comp-dialog-max-height: var(--tct-action-sheet-max-height, var(--t-action-sheet-max-height, var(--comp-action-sheet-computed-max-height, 75vh)));
|
|
90
|
+
--comp-dialog-min-height: var(--tct-action-sheet-min-height, var(--t-action-sheet-min-height, var(--comp-action-sheet-computed-min-height, 20vh)));
|
|
91
91
|
--comp-dialog-box-shadow: var(--tct-action-sheet-box-shadow, var(--t-action-sheet-box-shadow, var(--app-shadow-2, 0 3px 6px rgba(0, 0, 0, 0.3))));
|
|
92
92
|
position: fixed;
|
|
93
93
|
top: 100%;
|
|
@@ -78,6 +78,10 @@ button {
|
|
|
78
78
|
width: 100%;
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
+
::slotted(q2-icon) {
|
|
82
|
+
pointer-events: none;
|
|
83
|
+
}
|
|
84
|
+
|
|
81
85
|
:host {
|
|
82
86
|
--comp-btn-primary-bg: var(--tct-btn-primary-bg, var(--t-btn-primary-bg, #2e2e2e));
|
|
83
87
|
--comp-btn-primary-font-color: var(--tct-btn-primary-font-color, var(--t-btn-primary-font-color, var(--tct-white, var(--app-white, #ffffff))));
|
|
@@ -597,6 +597,11 @@ export class Q2Calendar {
|
|
|
597
597
|
const formattedDate = formatDateShort(inputDate);
|
|
598
598
|
this.change.emit({ value: formatDateISO(inputDate) });
|
|
599
599
|
this.typedValue = formattedDate;
|
|
600
|
+
this.setHints({
|
|
601
|
+
isValid: true,
|
|
602
|
+
message: `${loc('tecton.element.calendar.hint.selection')}: ${formatDateLong(inputDate)}`,
|
|
603
|
+
messageType: 'success',
|
|
604
|
+
});
|
|
600
605
|
}
|
|
601
606
|
inputField() {
|
|
602
607
|
return (h("q2-input", { ref: el => (this.controlElement = el), class: "calendar-input-field", value: this.formattedValue, label: loc(this.label), hideLabel: this.hideLabel, disabled: !!this.disabled, readonly: !!this.readonly, clearable: this.canClear, placeholder: this.computedPlaceholder, optional: !!this.optional, ariaExpanded: `${!!this.open}`, errors: (this.localizedErrors.length > 0 && this.localizedErrors) ||
|
|
@@ -5,10 +5,9 @@ export class Q2Checkbox {
|
|
|
5
5
|
this._id = `checkbox-${createGuid()}`;
|
|
6
6
|
///// Actions ////////
|
|
7
7
|
this.onInputClick = (event) => {
|
|
8
|
-
|
|
8
|
+
event.stopPropagation();
|
|
9
|
+
event.preventDefault();
|
|
9
10
|
const isNotInteractive = this.disabled || this.readonly;
|
|
10
|
-
if (isNotInteractive || hasCustomHandler)
|
|
11
|
-
event.preventDefault();
|
|
12
11
|
if (isNotInteractive)
|
|
13
12
|
return;
|
|
14
13
|
if (!(event.target instanceof HTMLInputElement))
|
|
@@ -45,9 +44,8 @@ export class Q2Checkbox {
|
|
|
45
44
|
}
|
|
46
45
|
//////// Host Element Events ////////
|
|
47
46
|
defaultChangeHandler(event) {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
47
|
+
// We use setTimeout to give an opportunity to call preventDefault
|
|
48
|
+
setTimeout(() => this.handleChangeEvent(event), 0);
|
|
51
49
|
}
|
|
52
50
|
delegateFocus(event) {
|
|
53
51
|
if (!isEventFromElement(event, this.hostElement))
|
|
@@ -58,6 +56,17 @@ export class Q2Checkbox {
|
|
|
58
56
|
ariaLabelObserver() {
|
|
59
57
|
handleAriaLabel(this);
|
|
60
58
|
}
|
|
59
|
+
handleChangeEvent(event) {
|
|
60
|
+
if (this.readonly ||
|
|
61
|
+
this.disabled ||
|
|
62
|
+
this.hostElement.onchange ||
|
|
63
|
+
event.defaultPrevented ||
|
|
64
|
+
event.target !== this.hostElement ||
|
|
65
|
+
!event.detail) {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
this.checked = event.detail.checked;
|
|
69
|
+
}
|
|
61
70
|
/////// View Methods ///////
|
|
62
71
|
render() {
|
|
63
72
|
const textLabelClasses = ['label-text'];
|
|
@@ -93,6 +93,10 @@ button {
|
|
|
93
93
|
--comp-checkbox-favorite-stroke-color: var(--tct-checkbox-favorite-stroke-color, var(--t-checkbox-favorite-stroke-color, var(--t-a11y-gray-color-AA, #949494)));
|
|
94
94
|
--comp-checkbox-favorite-fill-color: var(--tct-checkbox-favorite-fill-color, var(--t-checkbox-favorite-fill-color, #db7d24));
|
|
95
95
|
}
|
|
96
|
+
:host([hide-label]:not([hide-label=false])) .container {
|
|
97
|
+
grid-template-areas: "svg";
|
|
98
|
+
grid-template-columns: var(--comp-control-width);
|
|
99
|
+
}
|
|
96
100
|
:host([type=toggle]) .container {
|
|
97
101
|
--comp-control-width: var(--comp-checkbox-toggle-width);
|
|
98
102
|
}
|
|
@@ -108,6 +112,7 @@ button {
|
|
|
108
112
|
|
|
109
113
|
.label-text {
|
|
110
114
|
grid-area: label;
|
|
115
|
+
font-weight: var(--tct-checkbox-label-font-weight, var(--t-checkbox-label-font-weight, 400));
|
|
111
116
|
}
|
|
112
117
|
:host([description]) .label-text {
|
|
113
118
|
font-weight: var(--tct-checkbox-label-font-weight, var(--t-checkbox-label-font-weight, 600));
|