q2-tecton-elements 1.12.0-alpha.0 → 1.13.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/click-elsewhere.cjs.entry.js +5 -7
- package/dist/cjs/{icons-4595ee47.js → icons-08ffe5c9.js} +394 -384
- package/dist/cjs/{index-c2e53804.js → index-7febb200.js} +112 -65
- package/dist/cjs/{index-a55d3c34.js → index-dd823ee6.js} +27 -14
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/q2-avatar.cjs.entry.js +2 -2
- package/dist/cjs/q2-badge.cjs.entry.js +43 -0
- package/dist/cjs/q2-btn_2.cjs.entry.js +13 -13
- package/dist/cjs/q2-calendar.cjs.entry.js +53 -59
- package/dist/cjs/q2-card.cjs.entry.js +127 -0
- package/dist/cjs/q2-carousel-pane.cjs.entry.js +5 -5
- package/dist/cjs/q2-carousel.cjs.entry.js +318 -106
- package/dist/cjs/q2-checkbox-group.cjs.entry.js +6 -3
- package/dist/cjs/q2-checkbox.cjs.entry.js +18 -10
- package/dist/cjs/q2-dropdown-item.cjs.entry.js +7 -7
- package/dist/cjs/q2-dropdown.cjs.entry.js +8 -17
- package/dist/cjs/q2-editable-field.cjs.entry.js +5 -8
- package/dist/cjs/q2-icon.cjs.entry.js +3 -3
- package/dist/cjs/q2-input.cjs.entry.js +439 -437
- package/dist/cjs/q2-loading-element.cjs.entry.js +3 -3
- package/dist/cjs/q2-loc.cjs.entry.js +2 -2
- package/dist/cjs/q2-message.cjs.entry.js +5 -5
- package/dist/cjs/q2-optgroup.cjs.entry.js +3 -3
- package/dist/cjs/q2-option-list.cjs.entry.js +359 -0
- package/dist/cjs/q2-option.cjs.entry.js +3 -11
- package/dist/cjs/q2-pagination.cjs.entry.js +116 -0
- package/dist/cjs/q2-pill.cjs.entry.js +137 -0
- package/dist/cjs/q2-radio-group.cjs.entry.js +43 -18
- package/dist/cjs/q2-radio.cjs.entry.js +21 -4
- package/dist/cjs/q2-section.cjs.entry.js +5 -7
- package/dist/cjs/q2-select.cjs.entry.js +23 -26
- package/dist/cjs/q2-stepper-pane.cjs.entry.js +42 -4
- package/dist/cjs/q2-stepper-vertical.cjs.entry.js +278 -0
- package/dist/cjs/q2-stepper.cjs.entry.js +10 -12
- package/dist/cjs/q2-tab-container.cjs.entry.js +12 -8
- package/dist/cjs/q2-tab-pane.cjs.entry.js +1 -1
- package/dist/cjs/q2-tag.cjs.entry.js +94 -0
- package/dist/cjs/q2-tecton-elements.cjs.js +3 -3
- package/dist/cjs/q2-textarea.cjs.entry.js +8 -8
- package/dist/cjs/{shapes-086c0365.js → shapes-305746b5.js} +9 -16
- package/dist/cjs/tecton-tab-pane.cjs.entry.js +2 -5
- package/dist/collection/collection-manifest.json +10 -3
- package/dist/collection/components/click-elsewhere/index.js +4 -6
- package/dist/collection/components/q2-badge/index.js +148 -0
- package/dist/collection/components/q2-badge/styles.css +134 -0
- package/dist/collection/components/q2-btn/index.js +14 -14
- package/dist/collection/components/q2-btn/styles.css +1 -1
- package/dist/collection/components/q2-calendar/helpers.js +22 -20
- package/dist/collection/components/q2-calendar/index.js +44 -37
- package/dist/collection/components/q2-calendar/validation.js +4 -2
- package/dist/collection/components/q2-card/index.js +347 -0
- package/dist/collection/components/q2-card/styles.css +177 -0
- package/dist/collection/components/q2-carousel/index.js +11 -16
- package/dist/collection/components/q2-carousel/styles.css +3 -3
- package/dist/collection/components/q2-carousel-pane/index.js +2 -2
- package/dist/collection/components/q2-carousel-pane/styles.css +8 -3
- package/dist/collection/components/q2-checkbox/index.js +37 -12
- package/dist/collection/components/q2-checkbox-group/index.js +22 -1
- package/dist/collection/components/q2-dropdown/index.js +6 -15
- package/dist/collection/components/q2-dropdown-item/index.js +5 -5
- package/dist/collection/components/q2-editable-field/index.js +3 -6
- package/dist/collection/components/q2-icon/icons.js +393 -383
- package/dist/collection/components/q2-input/formatting/credit-card.js +15 -13
- package/dist/collection/components/q2-input/formatting/currency.js +162 -162
- package/dist/collection/components/q2-input/formatting/date.js +1 -1
- package/dist/collection/components/q2-input/formatting/generic.js +7 -8
- package/dist/collection/components/q2-input/formatting/number.js +6 -9
- package/dist/collection/components/q2-input/formatting/numeric.js +5 -5
- package/dist/collection/components/q2-input/formatting/phone.js +215 -215
- package/dist/collection/components/q2-input/formatting/postal.js +1 -1
- package/dist/collection/components/q2-input/index.js +81 -25
- package/dist/collection/components/q2-input/styles.css +19 -14
- package/dist/collection/components/q2-loading/index.js +4 -4
- package/dist/collection/components/q2-loading/skeleton/q2-loading-element/index.js +1 -1
- package/dist/collection/components/q2-loading/skeleton/shapes.js +8 -15
- package/dist/collection/components/q2-message/index.js +3 -3
- package/dist/collection/components/q2-optgroup/index.js +1 -1
- package/dist/collection/components/q2-option/index.js +19 -25
- package/dist/collection/components/q2-option/styles.css +5 -0
- package/dist/collection/components/q2-option-list/index.js +648 -0
- package/dist/collection/components/q2-option-list/styles.css +128 -0
- package/dist/collection/components/q2-pagination/index.js +275 -0
- package/dist/collection/components/q2-pagination/styles.css +120 -0
- package/dist/collection/components/q2-pill/index.js +324 -0
- package/dist/collection/components/q2-pill/styles.css +229 -0
- package/dist/collection/components/q2-radio/index.js +38 -1
- package/dist/collection/components/q2-radio-group/index.js +66 -24
- package/dist/collection/components/q2-section/index.js +5 -7
- package/dist/collection/components/q2-select/index.js +40 -25
- package/dist/collection/components/q2-stepper/index.js +8 -10
- package/dist/collection/components/q2-stepper/styles.css +5 -5
- package/dist/collection/components/q2-stepper-pane/index.js +133 -5
- package/dist/collection/components/q2-stepper-vertical/index.js +346 -0
- package/dist/collection/components/q2-stepper-vertical/styles.css +273 -0
- package/dist/collection/components/q2-tab-container/index.js +11 -7
- package/dist/collection/components/q2-tag/index.js +200 -0
- package/dist/collection/components/q2-tag/styles.css +141 -0
- package/dist/collection/components/q2-textarea/index.js +6 -6
- package/dist/collection/components/tecton-tab-pane/index.js +3 -10
- package/dist/collection/utils/index.js +25 -13
- package/dist/esm/click-elsewhere.entry.js +5 -7
- package/dist/esm/{icons-3ee662ea.js → icons-b1e11526.js} +394 -384
- package/dist/esm/{index-ec6660af.js → index-0ff8de52.js} +27 -15
- package/dist/esm/{index-be8376c0.js → index-dbfb3ecc.js} +112 -65
- package/dist/esm/loader.js +3 -3
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm/q2-avatar.entry.js +2 -2
- package/dist/esm/q2-badge.entry.js +39 -0
- package/dist/esm/q2-btn_2.entry.js +13 -13
- package/dist/esm/q2-calendar.entry.js +53 -59
- package/dist/esm/q2-card.entry.js +123 -0
- package/dist/esm/q2-carousel-pane.entry.js +5 -5
- package/dist/esm/q2-carousel.entry.js +318 -106
- package/dist/esm/q2-checkbox-group.entry.js +6 -3
- package/dist/esm/q2-checkbox.entry.js +18 -10
- package/dist/esm/q2-dropdown-item.entry.js +7 -7
- package/dist/esm/q2-dropdown.entry.js +8 -17
- package/dist/esm/q2-editable-field.entry.js +5 -8
- package/dist/esm/q2-icon.entry.js +3 -3
- package/dist/esm/q2-input.entry.js +439 -437
- package/dist/esm/q2-loading-element.entry.js +3 -3
- package/dist/esm/q2-loc.entry.js +2 -2
- package/dist/esm/q2-message.entry.js +5 -5
- package/dist/esm/q2-optgroup.entry.js +3 -3
- package/dist/esm/q2-option-list.entry.js +355 -0
- package/dist/esm/q2-option.entry.js +3 -11
- package/dist/esm/q2-pagination.entry.js +112 -0
- package/dist/esm/q2-pill.entry.js +133 -0
- package/dist/esm/q2-radio-group.entry.js +43 -18
- package/dist/esm/q2-radio.entry.js +21 -4
- package/dist/esm/q2-section.entry.js +5 -7
- package/dist/esm/q2-select.entry.js +23 -26
- package/dist/esm/q2-stepper-pane.entry.js +42 -4
- package/dist/esm/q2-stepper-vertical.entry.js +274 -0
- package/dist/esm/q2-stepper.entry.js +10 -12
- package/dist/esm/q2-tab-container.entry.js +12 -8
- package/dist/esm/q2-tab-pane.entry.js +1 -1
- package/dist/esm/q2-tag.entry.js +90 -0
- package/dist/esm/q2-tecton-elements.js +3 -3
- package/dist/esm/q2-textarea.entry.js +8 -8
- package/dist/esm/{shapes-81c11dfe.js → shapes-cff4e1f0.js} +9 -16
- package/dist/esm/tecton-tab-pane.entry.js +2 -5
- package/dist/loader/index.d.ts +0 -1
- package/dist/q2-tecton-elements/{p-75e87cca.entry.js → p-00e8f782.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-0900bec1.entry.js +1 -0
- package/dist/q2-tecton-elements/p-10264ecb.entry.js +1 -0
- package/dist/q2-tecton-elements/p-123cdfb9.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-fbf7c5e6.entry.js → p-1305ec5f.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-148391d6.entry.js +1 -0
- package/dist/q2-tecton-elements/p-1dfaee64.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-32ad664c.entry.js → p-221abbf6.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-c90a6016.js → p-255b2b4c.js} +1 -1
- package/dist/q2-tecton-elements/p-27736b6b.entry.js +1 -0
- package/dist/q2-tecton-elements/p-2846ab94.entry.js +1 -0
- package/dist/q2-tecton-elements/p-2bc1de01.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-8ea2c4f7.entry.js → p-2c15414c.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-2caa89fd.js +1 -0
- package/dist/q2-tecton-elements/p-327cca41.entry.js +1 -0
- package/dist/q2-tecton-elements/p-3a420dbf.entry.js +1 -0
- package/dist/q2-tecton-elements/p-3abcb09d.entry.js +1 -0
- package/dist/q2-tecton-elements/p-3fe98e3e.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-bb2e110a.entry.js → p-430a979b.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-7e6fc65d.entry.js → p-45eb7739.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-750bcd33.entry.js → p-49b2abc4.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-9b50c3c3.entry.js → p-4ab30466.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-50e218c7.entry.js +1 -0
- package/dist/q2-tecton-elements/p-5bbf2bfe.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-ac859fcc.entry.js → p-6fec9235.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-824aebd9.js +1 -0
- package/dist/q2-tecton-elements/p-a4ae89cc.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-50967020.entry.js → p-a5562aaa.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-ae4fed23.entry.js +1 -0
- package/dist/q2-tecton-elements/p-b2302cd3.entry.js +1 -0
- package/dist/q2-tecton-elements/p-c20cbb2d.entry.js +1 -0
- package/dist/q2-tecton-elements/p-ca7a3380.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-a6f8d09a.entry.js → p-d33e152c.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-9024859f.entry.js → p-d5218cd6.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-d52b435e.entry.js +1 -0
- package/dist/q2-tecton-elements/p-dd02cf8d.js +1 -0
- package/dist/q2-tecton-elements/{p-07a5d703.entry.js → p-e0e7ae8b.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-7e030e92.entry.js → p-ede12fc1.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-df182f61.entry.js → p-fdfbe75b.entry.js} +1 -1
- package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
- package/dist/test/elements/q2-tag-test.js +151 -0
- package/dist/test/helpers.js +20 -9
- package/dist/types/components/q2-badge/index.d.ts +13 -0
- package/dist/types/components/q2-btn/index.d.ts +3 -3
- package/dist/types/components/q2-calendar/helpers.d.ts +1 -0
- package/dist/types/components/q2-calendar/index.d.ts +2 -1
- package/dist/types/components/q2-calendar/validation.d.ts +1 -1
- package/dist/types/components/q2-card/index.d.ts +35 -0
- package/dist/types/components/q2-checkbox/index.d.ts +3 -1
- package/dist/types/components/q2-checkbox-group/index.d.ts +1 -0
- package/dist/types/components/q2-dropdown/index.d.ts +1 -1
- package/dist/types/components/q2-editable-field/index.d.ts +1 -1
- package/dist/types/components/q2-input/formatting/credit-card.d.ts +1 -3
- package/dist/types/components/q2-input/index.d.ts +5 -2
- package/dist/types/components/q2-option/index.d.ts +2 -3
- package/dist/types/components/q2-option-list/index.d.ts +62 -0
- package/dist/types/components/q2-pagination/index.d.ts +30 -0
- package/dist/types/components/q2-pill/index.d.ts +39 -0
- package/dist/types/components/q2-radio/index.d.ts +4 -1
- package/dist/types/components/q2-radio-group/index.d.ts +5 -1
- package/dist/types/components/q2-select/index.d.ts +2 -1
- package/dist/types/components/q2-stepper/index.d.ts +1 -1
- package/dist/types/components/q2-stepper-pane/index.d.ts +16 -1
- package/dist/types/components/q2-stepper-vertical/index.d.ts +52 -0
- package/dist/types/components/q2-tab-container/index.d.ts +1 -1
- package/dist/types/components/q2-tag/index.d.ts +28 -0
- package/dist/types/components/tecton-tab-pane/index.d.ts +2 -2
- package/dist/types/components.d.ts +235 -11
- package/dist/types/global.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +6 -4
- package/dist/types/util.d.ts +2 -10
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/types/workspace/workspace/Tecton_tecton-production_master/packages/q2-tecton-elements/.stencil/test/elements/q2-tag-test.d.ts +1 -0
- package/dist/types/workspace/workspace/{_production_release_1.11.0-alpha → Tecton_tecton-production_master}/packages/q2-tecton-elements/.stencil/test/helpers.d.ts +6 -3
- package/package.json +13 -13
- package/dist/q2-tecton-elements/p-06fff43d.entry.js +0 -1
- package/dist/q2-tecton-elements/p-080839ed.js +0 -1
- package/dist/q2-tecton-elements/p-29a37091.entry.js +0 -1
- package/dist/q2-tecton-elements/p-37aba2a4.js +0 -1
- package/dist/q2-tecton-elements/p-4cd00f1a.js +0 -1
- package/dist/q2-tecton-elements/p-6702eb4d.entry.js +0 -1
- package/dist/q2-tecton-elements/p-768e3a5d.entry.js +0 -1
- package/dist/q2-tecton-elements/p-843b1ee9.entry.js +0 -1
- package/dist/q2-tecton-elements/p-943c7745.entry.js +0 -1
- package/dist/q2-tecton-elements/p-95a73559.entry.js +0 -1
- package/dist/q2-tecton-elements/p-9a977ee6.entry.js +0 -1
- package/dist/q2-tecton-elements/p-b281c349.entry.js +0 -1
- package/dist/q2-tecton-elements/p-c5e55b9f.entry.js +0 -1
- package/dist/q2-tecton-elements/p-ccbe9158.entry.js +0 -1
- package/dist/q2-tecton-elements/p-db6f90ac.entry.js +0 -1
- package/dist/q2-tecton-elements/p-fa6eea5c.entry.js +0 -1
|
@@ -195,7 +195,7 @@ const postalCodeFormats = {
|
|
|
195
195
|
WF: '986##',
|
|
196
196
|
ZM: '#####',
|
|
197
197
|
US: '#####',
|
|
198
|
-
'US+4': '#####-####'
|
|
198
|
+
'US+4': '#####-####',
|
|
199
199
|
};
|
|
200
200
|
export default function formatPostalCode(value, modifier = 'US') {
|
|
201
201
|
const mask = postalCodeFormats[modifier];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Component, Prop, Element, State, Event, h, Watch, Listen } from '@stencil/core';
|
|
2
|
-
import { createGuid, labelDOM, loc, messagesDOM, setMessageHeight, handleAriaLabel, overrideFocus, isEventFromElement } from 'src/utils';
|
|
2
|
+
import { createGuid, labelDOM, loc, messagesDOM, setMessageHeight, handleAriaLabel, overrideFocus, isEventFromElement, } from 'src/utils';
|
|
3
3
|
import formatCurrency from './formatting/currency';
|
|
4
4
|
import formatPhoneNumber from './formatting/phone';
|
|
5
5
|
import formatSSN from './formatting/ssn';
|
|
@@ -59,7 +59,7 @@ export class Q2Input {
|
|
|
59
59
|
const eventDetail = {
|
|
60
60
|
value: '',
|
|
61
61
|
formattedValue: '',
|
|
62
|
-
minFormattedLength: this.formattedValueObject.minFormattedLength
|
|
62
|
+
minFormattedLength: this.formattedValueObject.minFormattedLength,
|
|
63
63
|
};
|
|
64
64
|
this.input.emit(eventDetail);
|
|
65
65
|
this.change.emit(eventDetail);
|
|
@@ -98,17 +98,17 @@ export class Q2Input {
|
|
|
98
98
|
percentage: formatPercentage,
|
|
99
99
|
postal: formatPostalCode,
|
|
100
100
|
date: formatDate,
|
|
101
|
-
'credit-card': formatCreditCard.format
|
|
101
|
+
'credit-card': formatCreditCard.format,
|
|
102
102
|
};
|
|
103
103
|
if (formattingFunctions[this.type]) {
|
|
104
104
|
return formattingFunctions[this.type](value, this.formatModifier, valueChangedFromProperty);
|
|
105
105
|
}
|
|
106
106
|
return {
|
|
107
|
-
value
|
|
107
|
+
value,
|
|
108
108
|
formattedValue: value,
|
|
109
109
|
fullyFormattedValue: value,
|
|
110
110
|
formattingCharacterCount: 0,
|
|
111
|
-
unformattedValue: value
|
|
111
|
+
unformattedValue: value,
|
|
112
112
|
};
|
|
113
113
|
}
|
|
114
114
|
get canClear() {
|
|
@@ -145,7 +145,7 @@ export class Q2Input {
|
|
|
145
145
|
'percentage',
|
|
146
146
|
'postal',
|
|
147
147
|
'date',
|
|
148
|
-
'credit-card'
|
|
148
|
+
'credit-card',
|
|
149
149
|
];
|
|
150
150
|
return maskedTypes.includes(this.type);
|
|
151
151
|
}
|
|
@@ -180,7 +180,7 @@ export class Q2Input {
|
|
|
180
180
|
percentage: 'tel',
|
|
181
181
|
postal: 'tel',
|
|
182
182
|
date: 'tel',
|
|
183
|
-
'credit-card': 'tel'
|
|
183
|
+
'credit-card': 'tel',
|
|
184
184
|
};
|
|
185
185
|
if (['password', 'text'].includes(this.type) && this.textHidden) {
|
|
186
186
|
return 'password';
|
|
@@ -260,15 +260,14 @@ export class Q2Input {
|
|
|
260
260
|
handleDataInput(newFormattedValue) {
|
|
261
261
|
if (this.maxlength === undefined ||
|
|
262
262
|
newFormattedValue.unformattedValue.length <= this.maxlength ||
|
|
263
|
-
newFormattedValue.unformattedValue.length <=
|
|
264
|
-
this.formattedValueObject.unformattedValue.length) {
|
|
263
|
+
newFormattedValue.unformattedValue.length <= this.formattedValueObject.unformattedValue.length) {
|
|
265
264
|
this.formattedValueObject = newFormattedValue;
|
|
266
265
|
}
|
|
267
266
|
else if (this.maxlength) {
|
|
268
267
|
newFormattedValue = this.getFormattedValue(newFormattedValue.unformattedValue.substring(0, this.maxlength), false);
|
|
269
268
|
this.formattedValueObject = newFormattedValue;
|
|
270
269
|
}
|
|
271
|
-
//ORDER IMPORTANT: calculate cursor position -> set value -> set cursor position
|
|
270
|
+
// ORDER IMPORTANT: calculate cursor position -> set value -> set cursor position
|
|
272
271
|
const cursorPosition = this.calculateCursorPositionOnInput();
|
|
273
272
|
this.inputField.value = this.formattedValueObject.formattedValue;
|
|
274
273
|
this.input.emit(Object.assign({ value: this.formattedValueObject.value, formattedValue: this.formattedValueObject.fullyFormattedValue, minFormattedLength: this.formattedValueObject.minFormattedLength }, (this.formattedValueObject.type && { type: this.formattedValueObject.type })));
|
|
@@ -281,6 +280,7 @@ export class Q2Input {
|
|
|
281
280
|
this.inputDOM(),
|
|
282
281
|
messagesDOM(this)));
|
|
283
282
|
}
|
|
283
|
+
/* tslint:disable:cyclomatic-complexity */
|
|
284
284
|
inputDOM() {
|
|
285
285
|
return (h("div", { class: "input-container" },
|
|
286
286
|
h("div", { class: "input-icons-container-left" },
|
|
@@ -288,7 +288,7 @@ export class Q2Input {
|
|
|
288
288
|
this.computedIconLeft && (h("q2-icon", { type: this.computedIconLeft, class: this.computedClassForIconLeft })),
|
|
289
289
|
this.showIconSeperator && h("div", { class: "vertical-separator" }),
|
|
290
290
|
this.hasError && this.type === 'currency' && (h("q2-icon", { type: "error", class: "icon-error" }))),
|
|
291
|
-
this.pseudo ? (this.pseudoInputDOM()) : (h("input", { class: "input-field", id: this.inputId, type: this.computedType, size: this.formattedValueObject.prefix ? 10 : undefined, "aria-describedby": this.inputDescribedBy, "aria-required": `${!this.optional}`, "aria-invalid": `${this.hasError}`, "aria-controls": (this.ariaControls && `${this.ariaControls}`) || undefined, "aria-owns": (this.ariaOwns && `${this.ariaOwns}`) || undefined, "aria-haspopup": (this.ariaHaspopup && `${this.ariaHaspopup}`) || undefined, "aria-expanded": (!!this.ariaExpanded && `${!!this.ariaExpanded}`) || undefined, "aria-activedescendant": this.ariaActivedescendant && `${this.ariaActivedescendant}`, "aria-label": this.hideLabel && this.label ? loc(this.label) : undefined, autocomplete: this.autocomplete ? this.autocomplete : 'off', autocapitalize: this.autocapitalize === 'on' ? 'on' : 'off', autocorrect: this.autocorrect === 'on' ? 'on' : 'off', placeholder: (this.placeholder && loc(this.placeholder)) || undefined, role: (this.role && `${this.role}`) || undefined, "test-id": "inputField", readonly: !!this.readonly, disabled: !!this.disabled, onFocus: this.onInputFocus, onBlur: this.onInputBlur, onKeyDown: this.onInputKeydown, onInput: this.onInputInput, onPaste: this.onInputPaste })),
|
|
291
|
+
this.pseudo ? (this.pseudoInputDOM()) : (h("input", { class: "input-field", id: this.inputId, type: this.computedType, size: this.formattedValueObject.prefix ? 10 : undefined, max: this.max, min: this.min, "aria-current": this.current || undefined, "aria-describedby": this.inputDescribedBy, "aria-required": `${!this.optional}`, "aria-invalid": `${this.hasError}`, "aria-controls": (this.ariaControls && `${this.ariaControls}`) || undefined, "aria-owns": (this.ariaOwns && `${this.ariaOwns}`) || undefined, "aria-haspopup": (this.ariaHaspopup && `${this.ariaHaspopup}`) || undefined, "aria-expanded": (!!this.ariaExpanded && `${!!this.ariaExpanded}`) || undefined, "aria-activedescendant": this.ariaActivedescendant && `${this.ariaActivedescendant}`, "aria-label": this.hideLabel && this.label ? loc(this.label) : undefined, autocomplete: this.autocomplete ? this.autocomplete : 'off', autocapitalize: this.autocapitalize === 'on' ? 'on' : 'off', autocorrect: this.autocorrect === 'on' ? 'on' : 'off', placeholder: (this.placeholder && loc(this.placeholder)) || undefined, role: (this.role && `${this.role}`) || undefined, "test-id": "inputField", readonly: !!this.readonly, disabled: !!this.disabled, onFocus: this.onInputFocus, onBlur: this.onInputBlur, onKeyDown: this.onInputKeydown, onInput: this.onInputInput, onPaste: this.onInputPaste })),
|
|
292
292
|
h("div", { class: "input-icons-container-right" },
|
|
293
293
|
this.canClear && (h("q2-btn", { class: "btn-clear", ariaLabel: loc('tecton.element.input.clear', [this.label]), "test-id": "clearButton", onClick: this.onClearInput },
|
|
294
294
|
h("q2-icon", { type: "close", class: "icon-clear" }))),
|
|
@@ -297,23 +297,30 @@ export class Q2Input {
|
|
|
297
297
|
this.iconRight && !this.formattedValueObject.suffix && (h("q2-icon", { type: this.iconRight, class: "icon-right" })),
|
|
298
298
|
this.hasError && this.type !== 'currency' && (h("q2-icon", { type: "error", class: "icon-error" })))));
|
|
299
299
|
}
|
|
300
|
+
/* tslint:enable:cyclomatic-complexity */
|
|
300
301
|
pseudoInputDOM() {
|
|
301
302
|
const showPlaceholder = !this.value && !!this.placeholder;
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
303
|
+
let ariaLabelSuffix = '';
|
|
304
|
+
if (this.optional) {
|
|
305
|
+
ariaLabelSuffix = loc('tecton.element.input.optional');
|
|
306
|
+
}
|
|
307
|
+
if (this.readonly) {
|
|
308
|
+
ariaLabelSuffix = loc('tecton.element.input.readonly');
|
|
309
|
+
}
|
|
310
|
+
return (h("div", { class: "pseudo-input" },
|
|
311
|
+
h("button", { class: "input-field", type: "button", id: this.inputId, "aria-describedby": this.inputDescribedBy, "aria-required": `${!this.optional}`, "aria-invalid": `${this.hasError}`, "aria-controls": (this.ariaControls && `${this.ariaControls}`) || undefined, "aria-owns": (this.ariaOwns && `${this.ariaOwns}`) || undefined, "aria-haspopup": (this.ariaHaspopup && `${this.ariaHaspopup}`) || undefined, "aria-expanded": (!!this.ariaExpanded && `${!!this.ariaExpanded}`) || undefined, "aria-activedescendant": this.ariaActivedescendant && `${this.ariaActivedescendant}`, "aria-label": `${this.value}, ${(this.label && loc(this.label)) || ''}${ariaLabelSuffix}`, role: (this.role && `${this.role}`) || undefined, disabled: !!this.disabled, "test-id": "q2InputInnerClearButton" },
|
|
312
|
+
h("span", { class: showPlaceholder ? 'placeholder-text' : '' }, showPlaceholder ? this.placeholder : this.value))));
|
|
307
313
|
}
|
|
308
314
|
calculateCursorPositionOnInput() {
|
|
309
315
|
const input = this.inputField;
|
|
310
316
|
const formattedLength = this.formattedValueObject.formattedValue.length;
|
|
311
317
|
const currentValueLength = input.value.length;
|
|
318
|
+
const defaultPosition = this.type === 'currency' ? formattedLength : 0;
|
|
312
319
|
return {
|
|
313
|
-
startingPosition: (input && input.selectionStart) ||
|
|
320
|
+
startingPosition: (input && input.selectionStart) || defaultPosition,
|
|
314
321
|
valueLength: formattedLength,
|
|
315
322
|
previousValueLength: input && currentValueLength,
|
|
316
|
-
hasSelection: false
|
|
323
|
+
hasSelection: false,
|
|
317
324
|
};
|
|
318
325
|
}
|
|
319
326
|
calculateCursorPositionOnFocus() {
|
|
@@ -324,16 +331,14 @@ export class Q2Input {
|
|
|
324
331
|
startingPosition,
|
|
325
332
|
valueLength,
|
|
326
333
|
previousValueLength: valueLength,
|
|
327
|
-
hasSelection: getSelection().toString().length > 0
|
|
334
|
+
hasSelection: getSelection().toString().length > 0,
|
|
328
335
|
};
|
|
329
336
|
}
|
|
330
337
|
setCursorPosition(cursorData) {
|
|
331
338
|
if (this.canSetSelection && !cursorData.hasSelection) {
|
|
332
339
|
const input = this.inputField;
|
|
333
340
|
const { valueLength, previousValueLength, startingPosition } = cursorData;
|
|
334
|
-
if (startingPosition === valueLength &&
|
|
335
|
-
valueLength >= previousValueLength &&
|
|
336
|
-
this.type === 'currency') {
|
|
341
|
+
if (startingPosition === valueLength && valueLength >= previousValueLength && this.type === 'currency') {
|
|
337
342
|
input.setSelectionRange(valueLength, valueLength);
|
|
338
343
|
}
|
|
339
344
|
else {
|
|
@@ -610,6 +615,40 @@ export class Q2Input {
|
|
|
610
615
|
"attribute": "optional",
|
|
611
616
|
"reflect": true
|
|
612
617
|
},
|
|
618
|
+
"min": {
|
|
619
|
+
"type": "number",
|
|
620
|
+
"mutable": false,
|
|
621
|
+
"complexType": {
|
|
622
|
+
"original": "number",
|
|
623
|
+
"resolved": "number",
|
|
624
|
+
"references": {}
|
|
625
|
+
},
|
|
626
|
+
"required": false,
|
|
627
|
+
"optional": false,
|
|
628
|
+
"docs": {
|
|
629
|
+
"tags": [],
|
|
630
|
+
"text": ""
|
|
631
|
+
},
|
|
632
|
+
"attribute": "min",
|
|
633
|
+
"reflect": true
|
|
634
|
+
},
|
|
635
|
+
"max": {
|
|
636
|
+
"type": "number",
|
|
637
|
+
"mutable": false,
|
|
638
|
+
"complexType": {
|
|
639
|
+
"original": "number",
|
|
640
|
+
"resolved": "number",
|
|
641
|
+
"references": {}
|
|
642
|
+
},
|
|
643
|
+
"required": false,
|
|
644
|
+
"optional": false,
|
|
645
|
+
"docs": {
|
|
646
|
+
"tags": [],
|
|
647
|
+
"text": ""
|
|
648
|
+
},
|
|
649
|
+
"attribute": "max",
|
|
650
|
+
"reflect": true
|
|
651
|
+
},
|
|
613
652
|
"formatModifier": {
|
|
614
653
|
"type": "string",
|
|
615
654
|
"mutable": false,
|
|
@@ -782,11 +821,11 @@ export class Q2Input {
|
|
|
782
821
|
"reflect": false
|
|
783
822
|
},
|
|
784
823
|
"ariaExpanded": {
|
|
785
|
-
"type": "
|
|
824
|
+
"type": "string",
|
|
786
825
|
"mutable": false,
|
|
787
826
|
"complexType": {
|
|
788
|
-
"original": "
|
|
789
|
-
"resolved": "
|
|
827
|
+
"original": "string",
|
|
828
|
+
"resolved": "string",
|
|
790
829
|
"references": {}
|
|
791
830
|
},
|
|
792
831
|
"required": false,
|
|
@@ -815,6 +854,23 @@ export class Q2Input {
|
|
|
815
854
|
"attribute": "aria-activedescendant",
|
|
816
855
|
"reflect": false
|
|
817
856
|
},
|
|
857
|
+
"current": {
|
|
858
|
+
"type": "string",
|
|
859
|
+
"mutable": false,
|
|
860
|
+
"complexType": {
|
|
861
|
+
"original": "'page' | 'step' | 'location' | 'date' | 'time' | 'true' | 'false'",
|
|
862
|
+
"resolved": "\"date\" | \"false\" | \"location\" | \"page\" | \"step\" | \"time\" | \"true\"",
|
|
863
|
+
"references": {}
|
|
864
|
+
},
|
|
865
|
+
"required": false,
|
|
866
|
+
"optional": false,
|
|
867
|
+
"docs": {
|
|
868
|
+
"tags": [],
|
|
869
|
+
"text": ""
|
|
870
|
+
},
|
|
871
|
+
"attribute": "current",
|
|
872
|
+
"reflect": false
|
|
873
|
+
},
|
|
818
874
|
"errors": {
|
|
819
875
|
"type": "unknown",
|
|
820
876
|
"mutable": false,
|
|
@@ -128,7 +128,7 @@ label {
|
|
|
128
128
|
3 * var(--tct-input-prefix-font-size, 14px) + var(--tct-scale-1, 5px)
|
|
129
129
|
);
|
|
130
130
|
--comp-input-icon-clearance: 34px;
|
|
131
|
-
--comp-input-min-height: 44px;
|
|
131
|
+
--comp-input-min-height: var(--tct-input-min-height, 44px);
|
|
132
132
|
border-width: var(--comp-input-border-width);
|
|
133
133
|
border-style: solid;
|
|
134
134
|
border-color: var(--tct-input-border-color, var(--t-input-border-color, var(--tct-gray-11, var(--t-gray-11, #cccccc))));
|
|
@@ -153,6 +153,8 @@ label {
|
|
|
153
153
|
padding: 0 var(--tct-input-horizontal-padding, var(--t-input-horizontal-padding, var(--tct-scale-2, var(--app-scale-2, 10px))));
|
|
154
154
|
background-color: transparent;
|
|
155
155
|
color: var(--tct-input-font-color, var(--t-input-font-color, var(--t-text, inherit)));
|
|
156
|
+
display: inline-block;
|
|
157
|
+
text-align: var(--tct-input-align, "start");
|
|
156
158
|
/* To remove up/down arrow in number field for webkit based browser */
|
|
157
159
|
/* For Firefox */
|
|
158
160
|
}
|
|
@@ -167,12 +169,25 @@ label {
|
|
|
167
169
|
.input-field[type=number] {
|
|
168
170
|
-moz-appearance: textfield;
|
|
169
171
|
}
|
|
172
|
+
.input-field::-ms-clear {
|
|
173
|
+
display: none;
|
|
174
|
+
}
|
|
175
|
+
.input-field[type=search]::-webkit-search-decoration, .input-field[type=search]::-webkit-search-cancel-button, .input-field[type=search]::-webkit-search-results-button, .input-field[type=search]::-webkit-search-results-decoration {
|
|
176
|
+
display: none;
|
|
177
|
+
}
|
|
170
178
|
.input-field[disabled] {
|
|
171
179
|
cursor: not-allowed;
|
|
172
180
|
}
|
|
173
181
|
.right-aligned .input-field {
|
|
174
182
|
text-align: right;
|
|
175
183
|
}
|
|
184
|
+
.input-field:is(input) {
|
|
185
|
+
flex: 1;
|
|
186
|
+
}
|
|
187
|
+
.input-field:is(button) {
|
|
188
|
+
display: inline-flex;
|
|
189
|
+
align-items: center;
|
|
190
|
+
}
|
|
176
191
|
|
|
177
192
|
.input-container:focus-within {
|
|
178
193
|
border-width: var(--comp-input-focus-border-width, 1px);
|
|
@@ -180,24 +195,14 @@ label {
|
|
|
180
195
|
box-shadow: var(--tct-global-focus, var(--const-global-focus, 0 0 0 2px #33b4ff)), var(--tct-input-focus-box-shadow, var(--t-input-focus-box-shadow, 0 0 transparent));
|
|
181
196
|
}
|
|
182
197
|
|
|
183
|
-
input
|
|
184
|
-
display: inline-block;
|
|
185
|
-
}
|
|
186
|
-
input::-ms-clear {
|
|
187
|
-
display: none;
|
|
188
|
-
}
|
|
189
|
-
input[type=search]::-webkit-search-decoration, input[type=search]::-webkit-search-cancel-button, input[type=search]::-webkit-search-results-button, input[type=search]::-webkit-search-results-decoration {
|
|
190
|
-
display: none;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
input::placeholder,
|
|
198
|
+
.input-field::placeholder,
|
|
194
199
|
.placeholder-text {
|
|
195
200
|
color: var(--tct-input-placeholder-font-color, var(--t-input-placeholder-font-color, var(--t-textA, var(--app-gray-d1, rgba(77, 77, 77, 0.77)))));
|
|
196
201
|
}
|
|
197
202
|
|
|
198
203
|
.pseudo-input {
|
|
199
|
-
|
|
200
|
-
|
|
204
|
+
min-width: 0;
|
|
205
|
+
flex: 1;
|
|
201
206
|
}
|
|
202
207
|
.pseudo-input span {
|
|
203
208
|
white-space: nowrap;
|
|
@@ -21,9 +21,9 @@ export class Q2Loading {
|
|
|
21
21
|
const loaderMap = {
|
|
22
22
|
default: this.spinner,
|
|
23
23
|
spinner: this.spinner,
|
|
24
|
-
skeleton: this.skeletonLoader
|
|
24
|
+
skeleton: this.skeletonLoader,
|
|
25
25
|
};
|
|
26
|
-
return loaderMap[this.type] || loaderMap
|
|
26
|
+
return loaderMap[this.type] || loaderMap.default;
|
|
27
27
|
}
|
|
28
28
|
get modifiersSet() {
|
|
29
29
|
if (this.type !== 'skeleton' || !this.modifiers) {
|
|
@@ -44,9 +44,9 @@ export class Q2Loading {
|
|
|
44
44
|
get spinnerShape() {
|
|
45
45
|
const spinnerMap = {
|
|
46
46
|
default: this.halfCircleSpinner,
|
|
47
|
-
'half-circle': this.halfCircleSpinner
|
|
47
|
+
'half-circle': this.halfCircleSpinner,
|
|
48
48
|
};
|
|
49
|
-
return spinnerMap[this.type] || spinnerMap
|
|
49
|
+
return spinnerMap[this.type] || spinnerMap.default;
|
|
50
50
|
}
|
|
51
51
|
get localizedLabel() {
|
|
52
52
|
return loc(this.label || 'tecton.element.loading.ariaLabel');
|
|
@@ -1,22 +1,20 @@
|
|
|
1
1
|
import { h } from '@stencil/core';
|
|
2
2
|
export const atoms = {
|
|
3
3
|
circle: ({ width, additionalClasses }) => (h("div", { class: `skeleton-shape circle ${additionalClasses || ''}`, style: { width, height: width } })),
|
|
4
|
-
rectangle: ({ width, height, borderRadius, additionalClasses }) => (h("div", { class: `skeleton-shape rectangle ${additionalClasses || ''}`, style: { width, height, borderRadius } }))
|
|
4
|
+
rectangle: ({ width, height, borderRadius, additionalClasses }) => (h("div", { class: `skeleton-shape rectangle ${additionalClasses || ''}`, style: { width, height, borderRadius } })),
|
|
5
5
|
};
|
|
6
6
|
export const molecules = {
|
|
7
7
|
field: () => (h("div", { class: "skeleton-shape field" },
|
|
8
8
|
h("div", { class: "skeleton-field-label" }, atoms.rectangle({ height: '1rem', width: '50%' })),
|
|
9
9
|
atoms.rectangle({
|
|
10
10
|
height: 'var(--tct-input-height, 42px)',
|
|
11
|
-
borderRadius: '3px'
|
|
11
|
+
borderRadius: '3px',
|
|
12
12
|
}))),
|
|
13
13
|
text: (counts, modifiers) => {
|
|
14
14
|
var _a;
|
|
15
15
|
const rows = (_a = counts === null || counts === void 0 ? void 0 : counts[0]) !== null && _a !== void 0 ? _a : 1;
|
|
16
16
|
const hasHeader = modifiers === null || modifiers === void 0 ? void 0 : modifiers.has('header');
|
|
17
|
-
const alignment = ((modifiers === null || modifiers === void 0 ? void 0 : modifiers.has('center')) && 'center') ||
|
|
18
|
-
((modifiers === null || modifiers === void 0 ? void 0 : modifiers.has('right')) && 'right') ||
|
|
19
|
-
'left';
|
|
17
|
+
const alignment = ((modifiers === null || modifiers === void 0 ? void 0 : modifiers.has('center')) && 'center') || ((modifiers === null || modifiers === void 0 ? void 0 : modifiers.has('right')) && 'right') || 'left';
|
|
20
18
|
const smallHeaderClass = (modifiers === null || modifiers === void 0 ? void 0 : modifiers.has('smallheader')) ? ' smaller' : '';
|
|
21
19
|
const additionalClasses = hasHeader ? `header ${alignment}${smallHeaderClass}` : '';
|
|
22
20
|
return (h("div", { class: "skeleton-shape text" },
|
|
@@ -25,7 +23,7 @@ export const molecules = {
|
|
|
25
23
|
Array(rows)
|
|
26
24
|
.fill(undefined)
|
|
27
25
|
.map(() => atoms.rectangle({ height: '1rem' }))));
|
|
28
|
-
}
|
|
26
|
+
},
|
|
29
27
|
};
|
|
30
28
|
export const shapes = {
|
|
31
29
|
circle: () => {
|
|
@@ -57,7 +55,7 @@ export const shapes = {
|
|
|
57
55
|
.map(() => atoms.rectangle({ height: '1.5rem' }))),
|
|
58
56
|
bordered && (h("div", { class: "skeleton-table-row-border" }, atoms.rectangle({
|
|
59
57
|
height: '1px',
|
|
60
|
-
additionalClasses: 'no-margin'
|
|
58
|
+
additionalClasses: 'no-margin',
|
|
61
59
|
})))))))));
|
|
62
60
|
},
|
|
63
61
|
field: molecules.field,
|
|
@@ -66,17 +64,12 @@ export const shapes = {
|
|
|
66
64
|
const columns = (_a = ((counts === null || counts === void 0 ? void 0 : counts[1]) && (counts === null || counts === void 0 ? void 0 : counts[0]))) !== null && _a !== void 0 ? _a : 1;
|
|
67
65
|
const rows = (_c = (_b = counts === null || counts === void 0 ? void 0 : counts[1]) !== null && _b !== void 0 ? _b : counts === null || counts === void 0 ? void 0 : counts[0]) !== null && _c !== void 0 ? _c : 1;
|
|
68
66
|
const totalItems = columns * rows;
|
|
69
|
-
return (h("div", { class: `skeleton-shape form flex columns-${columns}` }, !!totalItems &&
|
|
70
|
-
Array(totalItems)
|
|
71
|
-
.fill(undefined)
|
|
72
|
-
.map(molecules.field)));
|
|
67
|
+
return (h("div", { class: `skeleton-shape form flex columns-${columns}` }, !!totalItems && Array(totalItems).fill(undefined).map(molecules.field)));
|
|
73
68
|
},
|
|
74
69
|
text: molecules.text,
|
|
75
70
|
'detailed-item': (counts, modifiers) => {
|
|
76
71
|
const isSquare = modifiers === null || modifiers === void 0 ? void 0 : modifiers.has('square');
|
|
77
|
-
const alignment = ((modifiers === null || modifiers === void 0 ? void 0 : modifiers.has('center')) && 'center') ||
|
|
78
|
-
((modifiers === null || modifiers === void 0 ? void 0 : modifiers.has('right')) && 'right') ||
|
|
79
|
-
'left';
|
|
72
|
+
const alignment = ((modifiers === null || modifiers === void 0 ? void 0 : modifiers.has('center')) && 'center') || ((modifiers === null || modifiers === void 0 ? void 0 : modifiers.has('right')) && 'right') || 'left';
|
|
80
73
|
return (h("div", { class: `skeleton-shape detailed-item flex ${alignment}` },
|
|
81
74
|
h("div", { class: `detailed-item-image flex-${alignment}` }, isSquare
|
|
82
75
|
? atoms.rectangle({ width: '1.5em', height: '1.5em', borderRadius: '3px' })
|
|
@@ -91,6 +84,6 @@ export const shapes = {
|
|
|
91
84
|
Array(cells)
|
|
92
85
|
.fill(undefined)
|
|
93
86
|
.map(() => atoms.rectangle({ height: '1rem' }))));
|
|
94
|
-
}
|
|
87
|
+
},
|
|
95
88
|
};
|
|
96
89
|
export default shapes;
|
|
@@ -137,8 +137,8 @@ function generateIcon(type) {
|
|
|
137
137
|
warning: 'warning',
|
|
138
138
|
danger: 'error',
|
|
139
139
|
error: 'error',
|
|
140
|
-
info: 'info'
|
|
140
|
+
info: 'info',
|
|
141
141
|
};
|
|
142
|
-
const icon = iconMap[type] || iconMap
|
|
143
|
-
return h("q2-icon", { type: icon, class: "message-icon" });
|
|
142
|
+
const icon = iconMap[type] || iconMap.info;
|
|
143
|
+
return (h("q2-icon", { type: icon, class: "message-icon" }));
|
|
144
144
|
}
|
|
@@ -14,7 +14,7 @@ export class Q2Optgroup {
|
|
|
14
14
|
const observer = new MutationObserver(this.setHidden);
|
|
15
15
|
observer.observe(this.hostElement, { childList: true, attributes: true, subtree: true });
|
|
16
16
|
this.mutationObserver = observer;
|
|
17
|
-
//set initially
|
|
17
|
+
// set initially
|
|
18
18
|
this.setHidden();
|
|
19
19
|
this.disabledWatcher(this.disabled);
|
|
20
20
|
}
|
|
@@ -1,23 +1,16 @@
|
|
|
1
|
-
import { Component, Prop, h,
|
|
1
|
+
import { Component, Prop, h, Element, Host } from '@stencil/core';
|
|
2
2
|
export class Q2Option {
|
|
3
3
|
constructor() {
|
|
4
4
|
this.role = 'option';
|
|
5
5
|
this.tabindex = '-1';
|
|
6
6
|
this._multiSelectHidden = false;
|
|
7
|
-
this.onClick = (event) => {
|
|
8
|
-
event.stopImmediatePropagation();
|
|
9
|
-
const { disabled, disabledGroup } = this;
|
|
10
|
-
if (disabled || disabledGroup)
|
|
11
|
-
return;
|
|
12
|
-
this.click.emit();
|
|
13
|
-
};
|
|
14
7
|
}
|
|
15
8
|
render() {
|
|
16
9
|
const { disabled, disabledGroup, selected, _multiSelectHidden } = this;
|
|
17
10
|
const isDisabled = disabled || disabledGroup;
|
|
18
11
|
return (h(Host, { "aria-disabled": isDisabled ? 'true' : undefined, "aria-selected": selected ? 'true' : undefined, "aria-hidden": _multiSelectHidden ? 'true' : undefined },
|
|
19
12
|
this.selected && h("q2-icon", { type: "checkmark" }),
|
|
20
|
-
h("div", { class: "content"
|
|
13
|
+
h("div", { class: "content" },
|
|
21
14
|
h("slot", null))));
|
|
22
15
|
}
|
|
23
16
|
static get is() { return "q2-option"; }
|
|
@@ -218,6 +211,23 @@ export class Q2Option {
|
|
|
218
211
|
"attribute": "active",
|
|
219
212
|
"reflect": true
|
|
220
213
|
},
|
|
214
|
+
"noSelect": {
|
|
215
|
+
"type": "boolean",
|
|
216
|
+
"mutable": false,
|
|
217
|
+
"complexType": {
|
|
218
|
+
"original": "boolean",
|
|
219
|
+
"resolved": "boolean",
|
|
220
|
+
"references": {}
|
|
221
|
+
},
|
|
222
|
+
"required": false,
|
|
223
|
+
"optional": false,
|
|
224
|
+
"docs": {
|
|
225
|
+
"tags": [],
|
|
226
|
+
"text": ""
|
|
227
|
+
},
|
|
228
|
+
"attribute": "_no-select",
|
|
229
|
+
"reflect": true
|
|
230
|
+
},
|
|
221
231
|
"_multiSelectHidden": {
|
|
222
232
|
"type": "boolean",
|
|
223
233
|
"mutable": false,
|
|
@@ -237,21 +247,5 @@ export class Q2Option {
|
|
|
237
247
|
"defaultValue": "false"
|
|
238
248
|
}
|
|
239
249
|
}; }
|
|
240
|
-
static get events() { return [{
|
|
241
|
-
"method": "click",
|
|
242
|
-
"name": "click",
|
|
243
|
-
"bubbles": true,
|
|
244
|
-
"cancelable": true,
|
|
245
|
-
"composed": true,
|
|
246
|
-
"docs": {
|
|
247
|
-
"tags": [],
|
|
248
|
-
"text": ""
|
|
249
|
-
},
|
|
250
|
-
"complexType": {
|
|
251
|
-
"original": "any",
|
|
252
|
-
"resolved": "any",
|
|
253
|
-
"references": {}
|
|
254
|
-
}
|
|
255
|
-
}]; }
|
|
256
250
|
static get elementRef() { return "hostElement"; }
|
|
257
251
|
}
|
|
@@ -75,6 +75,11 @@ button {
|
|
|
75
75
|
gap: var(--tct-scale-1, var(--app-scale-1, 5px));
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
+
:host([_no-select]) {
|
|
79
|
+
grid-template-columns: 1fr;
|
|
80
|
+
grid-template-areas: "content";
|
|
81
|
+
}
|
|
82
|
+
|
|
78
83
|
:host([aria-disabled]) {
|
|
79
84
|
cursor: not-allowed;
|
|
80
85
|
opacity: var(--tct-disabled-opacity, var(--app-disabled-opacity, 0.4));
|