q2-tecton-elements 1.14.2 → 1.15.1-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{index-0fec9f3b.js → index-afc50fbb.js} +18 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/q2-avatar.cjs.entry.js +7 -2
- package/dist/cjs/{q2-input.cjs.entry.js → q2-badge_2.cjs.entry.js} +77 -18
- package/dist/cjs/q2-btn_2.cjs.entry.js +7 -6
- package/dist/cjs/q2-calendar.cjs.entry.js +5 -6
- package/dist/cjs/q2-card.cjs.entry.js +15 -8
- package/dist/cjs/q2-carousel-pane.cjs.entry.js +2 -2
- package/dist/cjs/q2-carousel.cjs.entry.js +2 -2
- package/dist/cjs/q2-chart-donut.cjs.entry.js +9 -4
- package/dist/cjs/q2-checkbox-group.cjs.entry.js +2 -2
- package/dist/cjs/q2-checkbox.cjs.entry.js +12 -13
- package/dist/cjs/q2-dropdown-item.cjs.entry.js +2 -2
- package/dist/cjs/q2-dropdown.cjs.entry.js +2 -2
- package/dist/cjs/q2-editable-field.cjs.entry.js +4 -4
- package/dist/cjs/q2-icon.cjs.entry.js +2 -2
- package/dist/cjs/q2-loc.cjs.entry.js +2 -2
- package/dist/cjs/q2-message.cjs.entry.js +2 -2
- package/dist/cjs/q2-optgroup.cjs.entry.js +2 -2
- package/dist/cjs/q2-option-list.cjs.entry.js +6 -6
- package/dist/cjs/q2-option.cjs.entry.js +12 -1
- package/dist/cjs/q2-pagination.cjs.entry.js +2 -2
- package/dist/cjs/q2-pill.cjs.entry.js +10 -3
- package/dist/cjs/q2-radio-group.cjs.entry.js +2 -2
- package/dist/cjs/q2-radio.cjs.entry.js +3 -2
- package/dist/cjs/q2-section.cjs.entry.js +2 -2
- package/dist/cjs/q2-select.cjs.entry.js +300 -195
- package/dist/cjs/q2-stepper-pane.cjs.entry.js +2 -2
- package/dist/cjs/q2-stepper-vertical.cjs.entry.js +3 -2
- package/dist/cjs/q2-stepper.cjs.entry.js +21 -4
- package/dist/cjs/q2-tab-container.cjs.entry.js +16 -6
- package/dist/cjs/q2-tab-pane.cjs.entry.js +8 -1
- package/dist/cjs/q2-tag.cjs.entry.js +2 -2
- package/dist/cjs/q2-tecton-elements.cjs.js +1 -1
- package/dist/cjs/q2-textarea.cjs.entry.js +2 -2
- package/dist/cjs/q2-tooltip.cjs.entry.js +33 -0
- package/dist/cjs/tecton-tab-pane.cjs.entry.js +6 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/q2-avatar/index.js +8 -2
- package/dist/collection/components/q2-avatar/styles.css +9 -1
- package/dist/collection/components/q2-badge/index.js +4 -9
- package/dist/collection/components/q2-badge/styles.css +21 -14
- package/dist/collection/components/q2-btn/index.js +7 -6
- package/dist/collection/components/q2-btn/styles.css +10 -12
- package/dist/collection/components/q2-calendar/helpers.js +1 -1
- package/dist/collection/components/q2-calendar/index.js +2 -3
- package/dist/collection/components/q2-calendar/styles.css +7 -7
- package/dist/collection/components/q2-card/index.js +33 -8
- package/dist/collection/components/q2-card/styles.css +33 -36
- package/dist/collection/components/q2-carousel/styles.css +1 -1
- package/dist/collection/components/q2-carousel-pane/styles.css +1 -1
- package/dist/collection/components/q2-chart-donut/index.js +13 -6
- package/dist/collection/components/q2-chart-donut/styles.css +20 -10
- package/dist/collection/components/q2-checkbox/index.js +10 -11
- package/dist/collection/components/q2-checkbox/styles.css +2 -2
- package/dist/collection/components/q2-checkbox-group/styles.css +3 -3
- package/dist/collection/components/q2-dropdown/styles.css +6 -6
- package/dist/collection/components/q2-dropdown-item/styles.css +3 -3
- package/dist/collection/components/q2-editable-field/index.js +19 -2
- package/dist/collection/components/q2-editable-field/styles.css +4 -4
- package/dist/collection/components/q2-icon/styles.css +1 -1
- package/dist/collection/components/q2-input/index.js +90 -23
- package/dist/collection/components/q2-input/styles.css +33 -26
- package/dist/collection/components/q2-loading/styles.css +4 -4
- package/dist/collection/components/q2-loc/styles.css +1 -1
- package/dist/collection/components/q2-message/styles.css +19 -17
- package/dist/collection/components/q2-optgroup/styles.css +7 -11
- package/dist/collection/components/q2-option/index.js +15 -3
- package/dist/collection/components/q2-option/styles.css +12 -5
- package/dist/collection/components/q2-option-list/index.js +22 -7
- package/dist/collection/components/q2-option-list/styles.css +5 -5
- package/dist/collection/components/q2-pagination/styles.css +1 -1
- package/dist/collection/components/q2-pill/index.js +26 -2
- package/dist/collection/components/q2-pill/styles.css +18 -17
- package/dist/collection/components/q2-radio/index.js +1 -0
- package/dist/collection/components/q2-radio/styles.css +2 -2
- package/dist/collection/components/q2-radio-group/styles.css +3 -3
- package/dist/collection/components/q2-section/styles.css +6 -6
- package/dist/collection/components/q2-select/index.js +316 -202
- package/dist/collection/components/q2-select/styles.css +24 -13
- package/dist/collection/components/q2-stepper/index.js +30 -6
- package/dist/collection/components/q2-stepper/styles.css +50 -12
- package/dist/collection/components/q2-stepper-pane/styles.css +1 -1
- package/dist/collection/components/q2-stepper-vertical/index.js +1 -0
- package/dist/collection/components/q2-stepper-vertical/styles.css +14 -14
- package/dist/collection/components/q2-tab-container/index.js +22 -4
- package/dist/collection/components/q2-tab-container/styles.css +23 -9
- package/dist/collection/components/q2-tab-pane/index.js +58 -1
- package/dist/collection/components/q2-tab-pane/styles.css +1 -1
- package/dist/collection/components/q2-tag/styles.css +4 -6
- package/dist/collection/components/q2-textarea/styles.css +2 -2
- package/dist/collection/components/q2-tooltip/index.js +120 -0
- package/dist/collection/components/q2-tooltip/styles.css +276 -0
- package/dist/collection/components/tecton-tab-pane/index.js +57 -1
- package/dist/collection/components/tecton-tab-pane/styles.css +1 -1
- package/dist/collection/utils/index.js +18 -2
- package/dist/esm/{index-14e81efa.js → index-2ca8c93c.js} +18 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/q2-avatar.entry.js +7 -2
- package/dist/esm/{q2-input.entry.js → q2-badge_2.entry.js} +78 -20
- package/dist/esm/q2-btn_2.entry.js +7 -6
- package/dist/esm/q2-calendar.entry.js +5 -6
- package/dist/esm/q2-card.entry.js +15 -8
- package/dist/esm/q2-carousel-pane.entry.js +2 -2
- package/dist/esm/q2-carousel.entry.js +2 -2
- package/dist/esm/q2-chart-donut.entry.js +9 -4
- package/dist/esm/q2-checkbox-group.entry.js +2 -2
- package/dist/esm/q2-checkbox.entry.js +12 -13
- package/dist/esm/q2-dropdown-item.entry.js +2 -2
- package/dist/esm/q2-dropdown.entry.js +2 -2
- package/dist/esm/q2-editable-field.entry.js +4 -4
- package/dist/esm/q2-icon.entry.js +2 -2
- package/dist/esm/q2-loc.entry.js +2 -2
- package/dist/esm/q2-message.entry.js +2 -2
- package/dist/esm/q2-optgroup.entry.js +2 -2
- package/dist/esm/q2-option-list.entry.js +6 -6
- package/dist/esm/q2-option.entry.js +12 -1
- package/dist/esm/q2-pagination.entry.js +2 -2
- package/dist/esm/q2-pill.entry.js +10 -3
- package/dist/esm/q2-radio-group.entry.js +2 -2
- package/dist/esm/q2-radio.entry.js +3 -2
- package/dist/esm/q2-section.entry.js +2 -2
- package/dist/esm/q2-select.entry.js +300 -195
- package/dist/esm/q2-stepper-pane.entry.js +2 -2
- package/dist/esm/q2-stepper-vertical.entry.js +3 -2
- package/dist/esm/q2-stepper.entry.js +21 -4
- package/dist/esm/q2-tab-container.entry.js +16 -6
- package/dist/esm/q2-tab-pane.entry.js +9 -2
- package/dist/esm/q2-tag.entry.js +2 -2
- package/dist/esm/q2-tecton-elements.js +1 -1
- package/dist/esm/q2-textarea.entry.js +2 -2
- package/dist/esm/q2-tooltip.entry.js +29 -0
- package/dist/esm/tecton-tab-pane.entry.js +7 -2
- package/dist/q2-tecton-elements/p-0a8b8d14.entry.js +1 -0
- package/dist/q2-tecton-elements/p-0b5fbbe8.entry.js +1 -0
- package/dist/q2-tecton-elements/p-0d00030f.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-85cff6ec.entry.js → p-0e9c7220.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-1b0f826e.entry.js +1 -0
- package/dist/q2-tecton-elements/p-1c430c2a.entry.js +1 -0
- package/dist/q2-tecton-elements/p-2d2008fd.entry.js +1 -0
- package/dist/q2-tecton-elements/p-34f99830.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-ead64414.entry.js → p-35bde69c.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-d46efe36.entry.js → p-376988ef.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-41fcf343.js +1 -0
- package/dist/q2-tecton-elements/p-49612230.entry.js +1 -0
- package/dist/q2-tecton-elements/p-4b48fde6.entry.js +1 -0
- package/dist/q2-tecton-elements/p-4ec2cb69.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-ea2a290e.entry.js → p-5270b0ff.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-5e990654.entry.js +1 -0
- package/dist/q2-tecton-elements/p-60a7a11e.entry.js +1 -0
- package/dist/q2-tecton-elements/p-677faf2c.entry.js +1 -0
- package/dist/q2-tecton-elements/p-6e10db80.entry.js +1 -0
- package/dist/q2-tecton-elements/p-6f884c60.entry.js +1 -0
- package/dist/q2-tecton-elements/p-822d3d6c.entry.js +1 -0
- package/dist/q2-tecton-elements/p-8584c6bc.entry.js +1 -0
- package/dist/q2-tecton-elements/p-87766054.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-eeb4a008.entry.js → p-879aa7ac.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-92e9f290.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-627df469.entry.js → p-b6c45ef6.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-cf9e8120.entry.js → p-b7dc4e93.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-c59d601e.entry.js +1 -0
- package/dist/q2-tecton-elements/p-d040bf99.entry.js +1 -0
- package/dist/q2-tecton-elements/p-d79386c6.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-fbfb3615.entry.js → p-dd3f64a7.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-58e42fc5.entry.js → p-dd792081.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-ef2f68b2.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-882eaf0f.entry.js → p-f617c54a.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-f66adef0.entry.js +1 -0
- package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
- package/dist/types/components/q2-avatar/index.d.ts +2 -0
- package/dist/types/components/q2-badge/index.d.ts +0 -1
- package/dist/types/components/q2-card/index.d.ts +1 -0
- package/dist/types/components/q2-checkbox/index.d.ts +0 -1
- package/dist/types/components/q2-editable-field/index.d.ts +1 -0
- package/dist/types/components/q2-input/index.d.ts +6 -2
- package/dist/types/components/q2-option/index.d.ts +2 -0
- package/dist/types/components/q2-option-list/index.d.ts +4 -4
- package/dist/types/components/q2-pill/index.d.ts +2 -0
- package/dist/types/components/q2-select/index.d.ts +37 -24
- package/dist/types/components/q2-stepper/index.d.ts +1 -0
- package/dist/types/components/q2-tab-container/index.d.ts +4 -0
- package/dist/types/components/q2-tab-pane/index.d.ts +5 -1
- package/dist/types/components/q2-tooltip/index.d.ts +10 -0
- package/dist/types/components/tecton-tab-pane/index.d.ts +5 -1
- package/dist/types/components.d.ts +43 -0
- package/dist/types/utils/index.d.ts +3 -1
- package/dist/types/workspace/workspace/{tecton-production_release_1.14.x → tecton-production_release_1.16.x}/packages/q2-tecton-elements/.stencil/test/elements/q2-tag-test.d.ts +0 -0
- package/dist/types/workspace/workspace/{tecton-production_release_1.14.x → tecton-production_release_1.16.x}/packages/q2-tecton-elements/.stencil/test/helpers.d.ts +0 -0
- package/package.json +2 -2
- package/dist/cjs/q2-badge.cjs.entry.js +0 -43
- package/dist/esm/q2-badge.entry.js +0 -39
- package/dist/q2-tecton-elements/p-0675f9c8.entry.js +0 -1
- package/dist/q2-tecton-elements/p-09464226.entry.js +0 -1
- package/dist/q2-tecton-elements/p-0e13d5ba.entry.js +0 -1
- package/dist/q2-tecton-elements/p-1eed57aa.entry.js +0 -1
- package/dist/q2-tecton-elements/p-3796397e.entry.js +0 -1
- package/dist/q2-tecton-elements/p-37f1984c.entry.js +0 -1
- package/dist/q2-tecton-elements/p-3cfc0cb4.entry.js +0 -1
- package/dist/q2-tecton-elements/p-431bf43e.js +0 -1
- package/dist/q2-tecton-elements/p-65e2df25.entry.js +0 -1
- package/dist/q2-tecton-elements/p-663cb6e8.entry.js +0 -1
- package/dist/q2-tecton-elements/p-6727f6d0.entry.js +0 -1
- package/dist/q2-tecton-elements/p-6ced7858.entry.js +0 -1
- package/dist/q2-tecton-elements/p-706249e1.entry.js +0 -1
- package/dist/q2-tecton-elements/p-7249de38.entry.js +0 -1
- package/dist/q2-tecton-elements/p-7ddb159c.entry.js +0 -1
- package/dist/q2-tecton-elements/p-87f448ab.entry.js +0 -1
- package/dist/q2-tecton-elements/p-8f815678.entry.js +0 -1
- package/dist/q2-tecton-elements/p-92886dbe.entry.js +0 -1
- package/dist/q2-tecton-elements/p-94303312.entry.js +0 -1
- package/dist/q2-tecton-elements/p-9af46ffc.entry.js +0 -1
- package/dist/q2-tecton-elements/p-9d8a963b.entry.js +0 -1
- package/dist/q2-tecton-elements/p-b066cdd1.entry.js +0 -1
- package/dist/q2-tecton-elements/p-bd6c6239.entry.js +0 -1
- package/dist/q2-tecton-elements/p-c4eff511.entry.js +0 -1
- package/dist/q2-tecton-elements/p-e435159b.entry.js +0 -1
|
@@ -6,23 +6,21 @@ export class Q2Checkbox {
|
|
|
6
6
|
this.id = `checkbox-${createGuid()}`;
|
|
7
7
|
///// Actions ////////
|
|
8
8
|
this.onInputClick = (event) => {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
if (
|
|
9
|
+
const hasCustomHandler = !!this.hostElement.onchange;
|
|
10
|
+
const isNotInteractive = this.disabled || this.readonly;
|
|
11
|
+
if (isNotInteractive || hasCustomHandler)
|
|
12
|
+
event.preventDefault();
|
|
13
|
+
if (isNotInteractive)
|
|
12
14
|
return;
|
|
13
15
|
if (!(event.target instanceof HTMLInputElement))
|
|
14
16
|
return;
|
|
17
|
+
const { value, checked } = event.target;
|
|
15
18
|
this.change.emit({
|
|
16
|
-
value
|
|
17
|
-
checked
|
|
19
|
+
value,
|
|
20
|
+
checked,
|
|
18
21
|
});
|
|
19
22
|
this.inputElement.focus();
|
|
20
23
|
};
|
|
21
|
-
this.onKeyDown = (event) => {
|
|
22
|
-
if (this.readonly && event.code === 'Space') {
|
|
23
|
-
event.preventDefault();
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
24
|
}
|
|
27
25
|
////////// LIFECYCLE HOOKS ////////
|
|
28
26
|
componentWillLoad() {
|
|
@@ -30,6 +28,7 @@ export class Q2Checkbox {
|
|
|
30
28
|
}
|
|
31
29
|
componentDidLoad() {
|
|
32
30
|
overrideFocus(this.hostElement);
|
|
31
|
+
this.hostElement.click = () => this.inputElement.click();
|
|
33
32
|
}
|
|
34
33
|
//////// Host Element Events ////////
|
|
35
34
|
defaultChangeHandler(event) {
|
|
@@ -52,7 +51,7 @@ export class Q2Checkbox {
|
|
|
52
51
|
if (this.hideLabel)
|
|
53
52
|
textLabelClasses.push('sr');
|
|
54
53
|
return (h("div", { class: "container" },
|
|
55
|
-
h("input", { ref: el => (this.inputElement = el), id: this.id, type: "checkbox", checked: this.indeterminate || this.checked || false, disabled: !!this.disabled || !!this.groupDisabled, class: "sr", value: this.value, name: this.name || this.id, "aria-
|
|
54
|
+
h("input", { ref: el => (this.inputElement = el), id: this.id, type: "checkbox", checked: this.indeterminate || this.checked || false, disabled: !!this.disabled || !!this.groupDisabled, class: "sr", value: this.value, name: this.name || this.id, "aria-describedby": this.description ? 'description' : undefined, "test-id": "q2CheckboxInnerCheckBox", onClick: this.onInputClick }),
|
|
56
55
|
h("label", { htmlFor: this.id, class: "label-control", "test-id": "checkboxButton" }, this.generateCheckboxSVG()),
|
|
57
56
|
h("div", { class: textLabelClasses.join(' ') },
|
|
58
57
|
h("label", { "test-id": "checkboxLabel", htmlFor: this.id },
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
*:focus {
|
|
10
10
|
outline: none;
|
|
11
|
-
box-shadow: var(--const-global-focus);
|
|
11
|
+
box-shadow: var(--const-global-focus, 0 0 0 2px #33b4ff);
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
:host {
|
|
@@ -67,7 +67,7 @@ button {
|
|
|
67
67
|
:host {
|
|
68
68
|
display: block;
|
|
69
69
|
position: relative;
|
|
70
|
-
padding: var(--tct-checkbox-vertical-padding, var(--t-checkbox-vertical-padding, var(--tct-scale-2, var(--app-scale-
|
|
70
|
+
padding: var(--tct-checkbox-vertical-padding, var(--t-checkbox-vertical-padding, var(--tct-scale-2, var(--app-scale-2x, 10px)))) 0;
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
.container {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
*:focus {
|
|
10
10
|
outline: none;
|
|
11
|
-
box-shadow: var(--const-global-focus);
|
|
11
|
+
box-shadow: var(--const-global-focus, 0 0 0 2px #33b4ff);
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
:host {
|
|
@@ -65,7 +65,7 @@ button {
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
:host {
|
|
68
|
-
margin-top: var(--tct-scale-2, var(--app-scale-
|
|
68
|
+
margin-top: var(--tct-scale-2, var(--app-scale-2x, 10px));
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
fieldset {
|
|
@@ -110,7 +110,7 @@ legend.sr-only {
|
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
.optional-tag {
|
|
113
|
-
margin-left: var(--tct-input-label-optional-margin-left, var(--tct-scale-1, var(--app-scale-
|
|
113
|
+
margin-left: var(--tct-input-label-optional-margin-left, var(--tct-scale-1, var(--app-scale-1x, 5px)));
|
|
114
114
|
color: var(--tct-input-label-optional-font-color, var(--tct-a11y-color, var(--t-a11y-gray-color, var(--tct-gray-7, var(--t-gray-7, var(--tct-gray-d1, var(--app-gray-d1, #666666)))))));
|
|
115
115
|
font-size: var(--tct-input-label-optional-font-size, 12px);
|
|
116
116
|
font-weight: var(--tct-input-label-optional-font-weight, 400);
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
*:focus {
|
|
10
10
|
outline: none;
|
|
11
|
-
box-shadow: var(--const-global-focus);
|
|
11
|
+
box-shadow: var(--const-global-focus, 0 0 0 2px #33b4ff);
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
:host {
|
|
@@ -67,18 +67,18 @@ button {
|
|
|
67
67
|
.q2-element-dropdown {
|
|
68
68
|
display: none;
|
|
69
69
|
position: absolute;
|
|
70
|
-
background-color: var(--app-white);
|
|
71
|
-
color: var(--t-
|
|
70
|
+
background-color: var(--app-white, #ffffff);
|
|
71
|
+
color: var(--t-text, #4d4d4d);
|
|
72
72
|
left: 0;
|
|
73
73
|
width: 100%;
|
|
74
74
|
z-index: 100;
|
|
75
75
|
margin-top: 1px;
|
|
76
|
-
box-shadow: var(--app-shadow-1);
|
|
76
|
+
box-shadow: var(--app-shadow-1, 0 2px 4px rgba(0, 0, 0, 0.3));
|
|
77
77
|
height: 0;
|
|
78
78
|
overflow: hidden;
|
|
79
79
|
opacity: 0;
|
|
80
80
|
visibility: hidden;
|
|
81
|
-
transition: opacity var(--app-tween-1);
|
|
81
|
+
transition: opacity var(--app-tween-1, 0.2s ease);
|
|
82
82
|
border-radius: var(--tct-dropdown-border-radius, --t-dropdown-border-radius, 0);
|
|
83
83
|
--comp-scrollbar-size: var(--tct-scrollbar-size, var(--t-scrollbar-size, var(--app-scale-1x, 5px)));
|
|
84
84
|
--comp-scrollbar-border-radius: var(--tct-scrollbar-border-radius, var(--t-scrollbar-border-radius, var(--app-border-radius-1, 3px)));
|
|
@@ -138,7 +138,7 @@ button {
|
|
|
138
138
|
}
|
|
139
139
|
|
|
140
140
|
.dropdown-button.unstyled .dropdown-button-content {
|
|
141
|
-
padding: var(--tct-scale-2, var(--app-scale-
|
|
141
|
+
padding: var(--tct-scale-2, var(--app-scale-2x, 10px)) var(--tct-scale-1, var(--app-scale-1x, 5px));
|
|
142
142
|
}
|
|
143
143
|
|
|
144
144
|
.q2-element-dropdown {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
*:focus {
|
|
10
10
|
outline: none;
|
|
11
|
-
box-shadow: var(--const-global-focus);
|
|
11
|
+
box-shadow: var(--const-global-focus, 0 0 0 2px #33b4ff);
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
:host {
|
|
@@ -65,7 +65,7 @@ button {
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
.dropdown-separator {
|
|
68
|
-
margin: 0 var(--tct-scale-1, var(--app-scale-
|
|
68
|
+
margin: 0 var(--tct-scale-1, var(--app-scale-1x, 5px));
|
|
69
69
|
border-bottom: 1px solid var(--tct-dropdown-item-separator-color, var(--tct-gray-11, var(--t-gray-11, var(--tct-gray-l1, var(--app-gray-l1, #cccccc)))));
|
|
70
70
|
}
|
|
71
71
|
|
|
@@ -80,7 +80,7 @@ button {
|
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
.dropdown-item-content {
|
|
83
|
-
padding: 12px var(--tct-scale-3, var(--app-scale-
|
|
83
|
+
padding: 12px var(--tct-scale-3, var(--app-scale-3x, 15px));
|
|
84
84
|
text-align: left;
|
|
85
85
|
background-color: var(--tct-dropdown-item-bg, var(--tct-white, var(--t-base, var(--app-white, #ffffff))));
|
|
86
86
|
color: var(--tct-dropdown-item-font-color, inherit);
|
|
@@ -121,7 +121,7 @@ export class Q2EditableField {
|
|
|
121
121
|
}
|
|
122
122
|
generateEditStateDOM() {
|
|
123
123
|
return (h("div", { class: this.wrapperClass, hidden: !this.editing },
|
|
124
|
-
h("q2-input", { ref: el => (this.q2InputElement = el), label: this.locLabel, hideLabel: this.hideLabel, value: this.value, hints: (Array.isArray(this.hints) && this.hints.map(str => loc(str))) || undefined, errors: (Array.isArray(this.errors) && this.errors.map(str => loc(str))) || undefined, type: this.type, formatModifier: this.formatModifier, maxlength: this.maxlength, "test-id": "editableInput", onInput: this.inputInput, onChange: this.inputChange, onKeyDown: this.inputKeyDown, onClick: this.inputClick }),
|
|
124
|
+
h("q2-input", { ref: el => (this.q2InputElement = el), label: this.locLabel, hideLabel: this.hideLabel, value: this.value, hints: (Array.isArray(this.hints) && this.hints.map(str => loc(str))) || undefined, errors: (Array.isArray(this.errors) && this.errors.map(str => loc(str))) || undefined, type: this.type, disabled: this.disabled, formatModifier: this.formatModifier, maxlength: this.maxlength, "test-id": "editableInput", onInput: this.inputInput, onChange: this.inputChange, onKeyDown: this.inputKeyDown, onClick: this.inputClick }),
|
|
125
125
|
h("q2-btn", { class: "cancel-edit", label: `${loc('tecton.element.editableField.cancel')} ${this.locLabel}`, "hide-label": true, "test-id": "cancelButton", onClick: this.cancelClick },
|
|
126
126
|
h("q2-icon", { type: "close" })),
|
|
127
127
|
h("q2-btn", { class: "save-edit", label: `${loc('tecton.element.editableField.save')} ${this.locLabel}`, "hide-label": true, "test-id": "saveButton", onClick: this.saveClick },
|
|
@@ -141,7 +141,7 @@ export class Q2EditableField {
|
|
|
141
141
|
this.generateEditBtn()));
|
|
142
142
|
}
|
|
143
143
|
generateEditBtn() {
|
|
144
|
-
return (h("q2-btn", { ref: el => (this.q2EditBtnElement = el), class: "begin-edit", label: `${loc('tecton.element.editableField.edit')} ${this.locLabel}`, "hide-label": true, "test-id": "editButton", onClick: this.editClick },
|
|
144
|
+
return (h("q2-btn", { ref: el => (this.q2EditBtnElement = el), class: "begin-edit", label: `${loc('tecton.element.editableField.edit')} ${this.locLabel}`, "hide-label": true, disabled: this.disabled, "test-id": "editButton", onClick: this.editClick },
|
|
145
145
|
h("q2-icon", { type: "edit" })));
|
|
146
146
|
}
|
|
147
147
|
static get is() { return "q2-editable-field"; }
|
|
@@ -326,6 +326,23 @@ export class Q2EditableField {
|
|
|
326
326
|
"attribute": "persistent-label",
|
|
327
327
|
"reflect": true
|
|
328
328
|
},
|
|
329
|
+
"disabled": {
|
|
330
|
+
"type": "boolean",
|
|
331
|
+
"mutable": false,
|
|
332
|
+
"complexType": {
|
|
333
|
+
"original": "boolean",
|
|
334
|
+
"resolved": "boolean",
|
|
335
|
+
"references": {}
|
|
336
|
+
},
|
|
337
|
+
"required": false,
|
|
338
|
+
"optional": false,
|
|
339
|
+
"docs": {
|
|
340
|
+
"tags": [],
|
|
341
|
+
"text": ""
|
|
342
|
+
},
|
|
343
|
+
"attribute": "disabled",
|
|
344
|
+
"reflect": true
|
|
345
|
+
},
|
|
329
346
|
"hints": {
|
|
330
347
|
"type": "unknown",
|
|
331
348
|
"mutable": false,
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
*:focus {
|
|
10
10
|
outline: none;
|
|
11
|
-
box-shadow: var(--const-global-focus);
|
|
11
|
+
box-shadow: var(--const-global-focus, 0 0 0 2px #33b4ff);
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
:host {
|
|
@@ -79,7 +79,7 @@ button {
|
|
|
79
79
|
|
|
80
80
|
q2-input,
|
|
81
81
|
.text-wrapper {
|
|
82
|
-
margin: 0 var(--tct-scale-2, var(--app-scale-
|
|
82
|
+
margin: 0 var(--tct-scale-2, var(--app-scale-2x, 10px)) 0 0;
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
q2-input {
|
|
@@ -104,7 +104,7 @@ q2-btn {
|
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
dl {
|
|
107
|
-
margin: var(--tct-scale-0, var(--app-scale-
|
|
107
|
+
margin: var(--tct-scale-0, var(--app-scale-0x, 0));
|
|
108
108
|
}
|
|
109
109
|
|
|
110
110
|
dt {
|
|
@@ -112,7 +112,7 @@ dt {
|
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
dd {
|
|
115
|
-
margin-left: var(--tct-scale-0, var(--app-scale-
|
|
115
|
+
margin-left: var(--tct-scale-0, var(--app-scale-0x, 0));
|
|
116
116
|
display: flex;
|
|
117
117
|
align-items: center;
|
|
118
118
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, Prop, Element, State, Event, h, Watch, Listen } from '@stencil/core';
|
|
1
|
+
import { Component, Prop, Element, State, Event, h, Watch, Listen, Fragment } from '@stencil/core';
|
|
2
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';
|
|
@@ -150,17 +150,32 @@ export class Q2Input {
|
|
|
150
150
|
return maskedTypes.includes(this.type);
|
|
151
151
|
}
|
|
152
152
|
get wrapperClasses() {
|
|
153
|
-
const
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
153
|
+
const classNames = ['field-container'];
|
|
154
|
+
if (this.hasError)
|
|
155
|
+
classNames.push('has-error');
|
|
156
|
+
if (!!this.value)
|
|
157
|
+
classNames.push('has-value');
|
|
158
|
+
if (this.clearable && !!this.value)
|
|
159
|
+
classNames.push('has-clear');
|
|
160
|
+
if (this.hasFocus)
|
|
161
|
+
classNames.push('has-focus');
|
|
162
|
+
if (this.formattedValueObject.prefix)
|
|
163
|
+
classNames.push('has-prefix');
|
|
164
|
+
if (this.computedIconLeft)
|
|
165
|
+
classNames.push('has-icon-left');
|
|
166
|
+
if (this.showIconSeparator)
|
|
167
|
+
classNames.push('has-icon-separator');
|
|
168
|
+
if (this.formattedValueObject.suffix)
|
|
169
|
+
classNames.push('has-suffix');
|
|
170
|
+
if (!this.formattedValueObject.suffix && this.iconRight)
|
|
171
|
+
classNames.push('has-icon-right');
|
|
172
|
+
if (this.type === 'currency')
|
|
173
|
+
classNames.push('right-aligned');
|
|
174
|
+
else
|
|
175
|
+
classNames.push('left-aligned');
|
|
176
|
+
if (this.hasCustomDisplaySlot)
|
|
177
|
+
classNames.push('has-custom-display');
|
|
178
|
+
return classNames.join(' ');
|
|
164
179
|
}
|
|
165
180
|
get computedType() {
|
|
166
181
|
const inputTypeMap = {
|
|
@@ -201,7 +216,7 @@ export class Q2Input {
|
|
|
201
216
|
}
|
|
202
217
|
return this.iconLeft;
|
|
203
218
|
}
|
|
204
|
-
get
|
|
219
|
+
get showIconSeparator() {
|
|
205
220
|
return this.type === 'credit-card' || !!this.formattedValueObject.prefix;
|
|
206
221
|
}
|
|
207
222
|
get computedClassForIconLeft() {
|
|
@@ -277,27 +292,43 @@ export class Q2Input {
|
|
|
277
292
|
render() {
|
|
278
293
|
return (h("div", { class: this.wrapperClasses },
|
|
279
294
|
labelDOM(this),
|
|
280
|
-
this.
|
|
295
|
+
this.inputContainerDOM(),
|
|
281
296
|
messagesDOM(this)));
|
|
282
297
|
}
|
|
298
|
+
get hasCustomDisplaySlot() {
|
|
299
|
+
return !!this.hostElement.querySelector('[slot=custom-display]');
|
|
300
|
+
}
|
|
283
301
|
/* tslint:disable:cyclomatic-complexity */
|
|
284
|
-
|
|
302
|
+
inputContainerDOM() {
|
|
285
303
|
return (h("div", { class: "input-container" },
|
|
286
304
|
h("div", { class: "input-icons-container-left" },
|
|
287
305
|
this.formattedValueObject.prefix && (h("span", { class: "input-prefix" }, this.formattedValueObject.prefix)),
|
|
288
306
|
this.computedIconLeft && (h("q2-icon", { type: this.computedIconLeft, class: this.computedClassForIconLeft })),
|
|
289
|
-
this.
|
|
307
|
+
this.showIconSeparator && h("div", { class: "vertical-separator" }),
|
|
290
308
|
this.hasError && this.type === 'currency' && (h("q2-icon", { type: "error", class: "icon-error" }))),
|
|
291
|
-
this.pseudo ?
|
|
309
|
+
this.pseudo ? this.pseudoInputDOM() : this.standardInputDOM(),
|
|
292
310
|
h("div", { class: "input-icons-container-right" },
|
|
293
311
|
this.canClear && (h("q2-btn", { class: "btn-clear", ariaLabel: loc('tecton.element.input.clear', [this.label]), "test-id": "clearButton", onClick: this.onClearInput },
|
|
294
312
|
h("q2-icon", { type: "close", class: "icon-clear" }))),
|
|
295
313
|
['password', 'text'].includes(this.type) && this.showVisibilityToggle && (h("q2-btn", { class: "btn-visibility-toggle", "test-id": "toggleVisibilityButton", onClick: this.onToggleVisibility }, this.visibilityToggleText)),
|
|
296
314
|
this.formattedValueObject.suffix && (h("span", { class: "input-suffix" }, this.formattedValueObject.suffix)),
|
|
315
|
+
this.badgeValue && (h("q2-badge", { size: "large", theme: this.badgeTheme }, this.badgeValue)),
|
|
297
316
|
this.iconRight && !this.formattedValueObject.suffix && (h("q2-icon", { type: this.iconRight, class: "icon-right" })),
|
|
298
317
|
this.hasError && this.type !== 'currency' && (h("q2-icon", { type: "error", class: "icon-error" })))));
|
|
299
318
|
}
|
|
300
319
|
/* tslint:enable:cyclomatic-complexity */
|
|
320
|
+
/* tslint:disable:cyclomatic-complexity */
|
|
321
|
+
standardInputDOM() {
|
|
322
|
+
const { hasCustomDisplaySlot } = this;
|
|
323
|
+
const inputClasses = ['input-field'];
|
|
324
|
+
if (hasCustomDisplaySlot)
|
|
325
|
+
inputClasses.push('sr');
|
|
326
|
+
return (h(Fragment, null,
|
|
327
|
+
hasCustomDisplaySlot && (h("div", { class: "custom-display-container" },
|
|
328
|
+
h("slot", { name: "custom-display" }))),
|
|
329
|
+
h("input", { class: inputClasses.join(' '), id: this.inputId, type: this.computedType, size: this.formattedValueObject.prefix ? 10 : undefined, max: this.max, min: this.min, step: this.step, "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 })));
|
|
330
|
+
}
|
|
331
|
+
/* tslint:enable:cyclomatic-complexity */
|
|
301
332
|
pseudoInputDOM() {
|
|
302
333
|
const showPlaceholder = !this.value && !!this.placeholder;
|
|
303
334
|
let ariaLabelSuffix = '';
|
|
@@ -307,9 +338,11 @@ export class Q2Input {
|
|
|
307
338
|
if (this.readonly) {
|
|
308
339
|
ariaLabelSuffix = loc('tecton.element.input.readonly');
|
|
309
340
|
}
|
|
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":
|
|
312
|
-
h("
|
|
341
|
+
return (h("div", { class: "pseudo-input-container" },
|
|
342
|
+
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 === 'true' ? 'true' : 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" },
|
|
343
|
+
h("div", { class: "custom-display-container" },
|
|
344
|
+
h("slot", { name: "custom-display" },
|
|
345
|
+
h("span", { class: showPlaceholder ? 'placeholder-text' : '' }, showPlaceholder ? this.placeholder : this.value))))));
|
|
313
346
|
}
|
|
314
347
|
calculateCursorPositionOnInput() {
|
|
315
348
|
const input = this.inputField;
|
|
@@ -377,7 +410,7 @@ export class Q2Input {
|
|
|
377
410
|
},
|
|
378
411
|
"label": {
|
|
379
412
|
"type": "string",
|
|
380
|
-
"mutable":
|
|
413
|
+
"mutable": true,
|
|
381
414
|
"complexType": {
|
|
382
415
|
"original": "string",
|
|
383
416
|
"resolved": "string",
|
|
@@ -394,7 +427,7 @@ export class Q2Input {
|
|
|
394
427
|
},
|
|
395
428
|
"hideLabel": {
|
|
396
429
|
"type": "boolean",
|
|
397
|
-
"mutable":
|
|
430
|
+
"mutable": true,
|
|
398
431
|
"complexType": {
|
|
399
432
|
"original": "boolean",
|
|
400
433
|
"resolved": "boolean",
|
|
@@ -752,6 +785,40 @@ export class Q2Input {
|
|
|
752
785
|
"attribute": "text-hidden",
|
|
753
786
|
"reflect": true
|
|
754
787
|
},
|
|
788
|
+
"badgeValue": {
|
|
789
|
+
"type": "string",
|
|
790
|
+
"mutable": false,
|
|
791
|
+
"complexType": {
|
|
792
|
+
"original": "string",
|
|
793
|
+
"resolved": "string",
|
|
794
|
+
"references": {}
|
|
795
|
+
},
|
|
796
|
+
"required": false,
|
|
797
|
+
"optional": false,
|
|
798
|
+
"docs": {
|
|
799
|
+
"tags": [],
|
|
800
|
+
"text": ""
|
|
801
|
+
},
|
|
802
|
+
"attribute": "badge-value",
|
|
803
|
+
"reflect": true
|
|
804
|
+
},
|
|
805
|
+
"badgeTheme": {
|
|
806
|
+
"type": "string",
|
|
807
|
+
"mutable": false,
|
|
808
|
+
"complexType": {
|
|
809
|
+
"original": "'primary' | 'secondary' | 'tertiary'",
|
|
810
|
+
"resolved": "\"primary\" | \"secondary\" | \"tertiary\"",
|
|
811
|
+
"references": {}
|
|
812
|
+
},
|
|
813
|
+
"required": false,
|
|
814
|
+
"optional": false,
|
|
815
|
+
"docs": {
|
|
816
|
+
"tags": [],
|
|
817
|
+
"text": ""
|
|
818
|
+
},
|
|
819
|
+
"attribute": "badge-theme",
|
|
820
|
+
"reflect": true
|
|
821
|
+
},
|
|
755
822
|
"ariaControls": {
|
|
756
823
|
"type": "string",
|
|
757
824
|
"mutable": false,
|
|
@@ -805,7 +872,7 @@ export class Q2Input {
|
|
|
805
872
|
},
|
|
806
873
|
"ariaLabel": {
|
|
807
874
|
"type": "string",
|
|
808
|
-
"mutable":
|
|
875
|
+
"mutable": true,
|
|
809
876
|
"complexType": {
|
|
810
877
|
"original": "string",
|
|
811
878
|
"resolved": "string",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
*:focus {
|
|
10
10
|
outline: none;
|
|
11
|
-
box-shadow: var(--const-global-focus);
|
|
11
|
+
box-shadow: var(--const-global-focus, 0 0 0 2px #33b4ff);
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
:host {
|
|
@@ -89,7 +89,7 @@ label {
|
|
|
89
89
|
padding-left: var(--tct-input-label-padding-left, var(--t-input-label-padding-left, 0));
|
|
90
90
|
padding-right: var(--tct-input-label-padding-right, var(--t-input-label-padding-right, 0));
|
|
91
91
|
margin-top: var(--tct-input-label-margin-top, var(--t-input-label-margin-top, 0));
|
|
92
|
-
margin-bottom: var(--tct-input-label-margin-bottom, var(--t-input-label-margin-bottom, var(--tct-scale-1, var(--app-scale-
|
|
92
|
+
margin-bottom: var(--tct-input-label-margin-bottom, var(--t-input-label-margin-bottom, var(--tct-scale-1, var(--app-scale-1x, 5px))));
|
|
93
93
|
color: var(--tct-input-label-font-color, var(--t-input-label-font-color, inherit));
|
|
94
94
|
font-size: var(--tct-input-label-font-size, var(--t-input-label-font-size, inherit));
|
|
95
95
|
font-weight: var(--tct-input-label-font-weight, var(--t-input-label-font-weight, 600));
|
|
@@ -99,14 +99,14 @@ label {
|
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
.optional-tag {
|
|
102
|
-
margin-left: var(--tct-input-label-optional-margin-left, var(--t-input-label-optional-margin-left, var(--tct-scale-1, var(--app-scale-
|
|
102
|
+
margin-left: var(--tct-input-label-optional-margin-left, var(--t-input-label-optional-margin-left, var(--tct-scale-1, var(--app-scale-1x, 5px))));
|
|
103
103
|
color: var(--tct-input-label-optional-font-color, var(--t-input-label-optional-font-color, var(--t-textA, var(--t-a11y-gray-color, rgba(77, 77, 77, 0.77)))));
|
|
104
104
|
font-size: var(--tct-input-label-optional-font-size, var(--t-input-label-optional-font-size, 12px));
|
|
105
105
|
font-weight: var(--tct-input-label-optional-font-weight, var(--t-input-label-optional-font-weight, 400));
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
.input-container {
|
|
109
|
-
background-color: var(--tct-input-bg, var(--t-input-bg, var(--
|
|
109
|
+
background-color: var(--tct-input-bg, var(--t-input-bg, var(--t-gray-14, #fcfcfd)));
|
|
110
110
|
display: flex;
|
|
111
111
|
align-items: center;
|
|
112
112
|
--comp-input-horizontal-gap: var(--tct-input-horizontal-gap, var(--t-input-horizontal-gap, 8px));
|
|
@@ -114,21 +114,17 @@ label {
|
|
|
114
114
|
--comp-input-border-top-right-radius: var(--tct-input-border-top-right-radius, var(--t-input-border-top-right-radius, var(--tct-border-radius-1, var(--app-border-radius-1, 3px))));
|
|
115
115
|
--comp-input-border-bottom-right-radius: var(--tct-input-border-bottom-right-radius, var(--t-input-border-bottom-right-radius, var(--tct-border-radius-1, var(--app-border-radius-1, 3px))));
|
|
116
116
|
--comp-input-border-bottom-left-radius: var(--tct-input-border-bottom-left-radius, var(--t-input-border-bottom-left-radius, var(--tct-border-radius-1, var(--app-border-radius-1, 3px))));
|
|
117
|
-
--comp-input-border-radius: var(--comp-input-border-top-left-radius)
|
|
118
|
-
var(--comp-input-border-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
var(--tct-input-border-right-width, 1px) var(--tct-input-border-bottom-width, 1px)
|
|
122
|
-
var(--tct-input-border-left-width, 1px);
|
|
117
|
+
--comp-input-border-radius: var(--comp-input-border-top-left-radius) var(--comp-input-border-top-right-radius)
|
|
118
|
+
var(--comp-input-border-bottom-right-radius) var(--comp-input-border-bottom-left-radius);
|
|
119
|
+
--comp-input-border-width: var(--tct-input-border-top-width, 1px) var(--tct-input-border-right-width, 1px)
|
|
120
|
+
var(--tct-input-border-bottom-width, 1px) var(--tct-input-border-left-width, 1px);
|
|
123
121
|
--comp-input-focus-border-width: var(--tct-input-focus-border-top-width, 1px)
|
|
124
|
-
var(--tct-input-focus-border-right-width, 1px)
|
|
125
|
-
var(--tct-input-focus-border-bottom-width, 1px)
|
|
122
|
+
var(--tct-input-focus-border-right-width, 1px) var(--tct-input-focus-border-bottom-width, 1px)
|
|
126
123
|
var(--tct-input-focus-border-left-width, 1px);
|
|
127
|
-
--comp-input-prefix-clearance: calc(
|
|
128
|
-
3 * var(--tct-input-prefix-font-size, 14px) + var(--tct-scale-1, 5px)
|
|
129
|
-
);
|
|
124
|
+
--comp-input-prefix-clearance: calc(3 * var(--tct-input-prefix-font-size, 14px) + var(--tct-scale-1, 5px));
|
|
130
125
|
--comp-input-icon-clearance: 34px;
|
|
131
|
-
--comp-input-min-height: var(--tct-input-min-height, 44px);
|
|
126
|
+
--comp-input-min-height: var(--tct-input-min-height, var(--t-input-min-height, 44px));
|
|
127
|
+
--comp-input-max-height: var(--tct-input-max-height, var(--t-input-max-height));
|
|
132
128
|
border-width: var(--comp-input-border-width);
|
|
133
129
|
border-style: solid;
|
|
134
130
|
border-color: var(--tct-input-border-color, var(--t-input-border-color, var(--tct-gray-11, var(--t-gray-11, #cccccc))));
|
|
@@ -148,9 +144,11 @@ label {
|
|
|
148
144
|
appearance: none;
|
|
149
145
|
box-sizing: border-box;
|
|
150
146
|
min-height: var(--comp-input-min-height);
|
|
147
|
+
max-height: var(--comp-input-max-height);
|
|
148
|
+
overflow-y: hidden;
|
|
151
149
|
height: var(--tct-input-height, var(--t-input-height, 44px));
|
|
152
150
|
width: 100%;
|
|
153
|
-
padding: 0 var(--tct-input-horizontal-padding, var(--t-input-horizontal-padding, var(--tct-scale-2, var(--app-scale-
|
|
151
|
+
padding: 0 var(--tct-input-horizontal-padding, var(--t-input-horizontal-padding, var(--tct-scale-2, var(--app-scale-2x, 10px))));
|
|
154
152
|
background-color: transparent;
|
|
155
153
|
color: var(--tct-input-font-color, var(--t-input-font-color, var(--t-text, inherit)));
|
|
156
154
|
display: inline-block;
|
|
@@ -188,6 +186,21 @@ label {
|
|
|
188
186
|
display: inline-flex;
|
|
189
187
|
align-items: center;
|
|
190
188
|
}
|
|
189
|
+
.has-custom-display .input-field:is(button) {
|
|
190
|
+
height: auto;
|
|
191
|
+
padding: 0;
|
|
192
|
+
}
|
|
193
|
+
.input-field:is(button) span {
|
|
194
|
+
white-space: nowrap;
|
|
195
|
+
overflow: hidden;
|
|
196
|
+
text-overflow: ellipsis;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.has-custom-display .custom-display-container {
|
|
200
|
+
--comp-default-padding: var(--app-scale-2x, 10px) var(--app-scale-2x, 10px) var(--app-scale-3x, 15px);
|
|
201
|
+
padding: var(--tct-input-padding, var(--t-input-padding, var(--comp-default-padding)));
|
|
202
|
+
width: 100%;
|
|
203
|
+
}
|
|
191
204
|
|
|
192
205
|
.input-container:focus-within {
|
|
193
206
|
border-width: var(--comp-input-focus-border-width, 1px);
|
|
@@ -200,15 +213,10 @@ label {
|
|
|
200
213
|
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)))));
|
|
201
214
|
}
|
|
202
215
|
|
|
203
|
-
.pseudo-input {
|
|
216
|
+
.pseudo-input-container {
|
|
204
217
|
min-width: 0;
|
|
205
218
|
flex: 1;
|
|
206
219
|
}
|
|
207
|
-
.pseudo-input span {
|
|
208
|
-
white-space: nowrap;
|
|
209
|
-
overflow: hidden;
|
|
210
|
-
text-overflow: ellipsis;
|
|
211
|
-
}
|
|
212
220
|
|
|
213
221
|
.input-icons-container-left,
|
|
214
222
|
.input-icons-container-right {
|
|
@@ -255,8 +263,7 @@ q2-icon {
|
|
|
255
263
|
align-items: center;
|
|
256
264
|
justify-content: center;
|
|
257
265
|
min-height: calc(
|
|
258
|
-
var(--comp-input-min-height) - var(--tct-input-focus-border-top-width, var(--t-input-focus-border-top-width, 1px)) -
|
|
259
|
-
var(--tct-input-focus-border-bottom-width, var(--t-input-focus-border-bottom-width, 1px))
|
|
266
|
+
var(--comp-input-min-height) - var(--tct-input-focus-border-top-width, var(--t-input-focus-border-top-width, 1px)) - var(--tct-input-focus-border-bottom-width, var(--t-input-focus-border-bottom-width, 1px))
|
|
260
267
|
);
|
|
261
268
|
height: calc(
|
|
262
269
|
var(--tct-input-height, var(--t-input-height, 44px)) - var(--tct-input-focus-border-top-width, var(--t-input-focus-border-top-width, 1px)) - var(--tct-input-focus-border-bottom-width, var(--t-input-focus-border-bottom-width, 1px))
|
|
@@ -294,7 +301,7 @@ q2-icon {
|
|
|
294
301
|
|
|
295
302
|
.pw-show {
|
|
296
303
|
position: absolute;
|
|
297
|
-
margin-right: var(--tct-scale-2, var(--app-scale-
|
|
304
|
+
margin-right: var(--tct-scale-2, var(--app-scale-2x, 10px));
|
|
298
305
|
}
|
|
299
306
|
|
|
300
307
|
.btn-clear {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
*:focus {
|
|
10
10
|
outline: none;
|
|
11
|
-
box-shadow: var(--const-global-focus);
|
|
11
|
+
box-shadow: var(--const-global-focus, 0 0 0 2px #33b4ff);
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
:host {
|
|
@@ -102,7 +102,7 @@ button {
|
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
:host(:not([inline]):not([modifiers*=inline])) {
|
|
105
|
-
font-size: var(--tct-loading-spinner-size, var(--
|
|
105
|
+
font-size: var(--tct-loading-spinner-size, var(--t-loading-spinner-size, var(--app-scale-12x, 60px)));
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
.q2-loading-animation {
|
|
@@ -129,12 +129,12 @@ button {
|
|
|
129
129
|
}
|
|
130
130
|
|
|
131
131
|
.half-circle-spinner .circle.circle-1 {
|
|
132
|
-
border-top-color: var(--tct-loading-primary-color, var(--t-loading-primary-color, #
|
|
132
|
+
border-top-color: var(--tct-loading-primary-color, var(--t-loading-primary-color, var(--t-primary, #0079c1)));
|
|
133
133
|
animation: half-circle-spinner-animation 1s infinite;
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
.half-circle-spinner .circle.circle-2 {
|
|
137
|
-
border-bottom-color: var(--tct-loading-secondary-color, var(--t-loading-secondary-color, #
|
|
137
|
+
border-bottom-color: var(--tct-loading-secondary-color, var(--t-loading-secondary-color, #9ddd4f));
|
|
138
138
|
animation: half-circle-spinner-animation 1s infinite alternate;
|
|
139
139
|
}
|
|
140
140
|
|