q2-tecton-elements 1.12.0-alpha.0 → 1.12.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/{icons-4595ee47.js → icons-9bd0febe.js} +10 -0
- package/dist/cjs/{index-a55d3c34.js → index-773c3eec.js} +25 -12
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/q2-avatar.cjs.entry.js +1 -1
- package/dist/cjs/q2-btn_2.cjs.entry.js +3 -3
- package/dist/cjs/q2-calendar.cjs.entry.js +15 -4
- package/dist/cjs/q2-card.cjs.entry.js +89 -0
- package/dist/cjs/q2-carousel-pane.cjs.entry.js +1 -1
- package/dist/cjs/q2-carousel.cjs.entry.js +1 -1
- package/dist/cjs/q2-checkbox-group.cjs.entry.js +4 -1
- package/dist/cjs/q2-checkbox.cjs.entry.js +17 -6
- package/dist/cjs/q2-dropdown-item.cjs.entry.js +1 -1
- package/dist/cjs/q2-dropdown.cjs.entry.js +2 -2
- package/dist/cjs/q2-editable-field.cjs.entry.js +1 -1
- package/dist/cjs/q2-icon.cjs.entry.js +2 -2
- package/dist/cjs/q2-input.cjs.entry.js +12 -7
- package/dist/cjs/q2-loc.cjs.entry.js +1 -1
- package/dist/cjs/q2-message.cjs.entry.js +1 -1
- package/dist/cjs/q2-optgroup.cjs.entry.js +1 -1
- package/dist/cjs/q2-option-list.cjs.entry.js +357 -0
- package/dist/cjs/q2-option.cjs.entry.js +2 -10
- package/dist/cjs/q2-pagination.cjs.entry.js +118 -0
- package/dist/cjs/q2-pill.cjs.entry.js +137 -0
- package/dist/cjs/q2-radio-group.cjs.entry.js +40 -12
- package/dist/cjs/q2-radio.cjs.entry.js +20 -3
- package/dist/cjs/q2-section.cjs.entry.js +1 -1
- package/dist/cjs/q2-select.cjs.entry.js +14 -6
- package/dist/cjs/q2-stepper-pane.cjs.entry.js +1 -1
- package/dist/cjs/q2-stepper.cjs.entry.js +2 -2
- package/dist/cjs/q2-tab-container.cjs.entry.js +5 -1
- package/dist/cjs/q2-tag.cjs.entry.js +94 -0
- package/dist/cjs/q2-tecton-elements.cjs.js +1 -1
- package/dist/cjs/q2-textarea.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +5 -0
- package/dist/collection/components/q2-btn/styles.css +1 -1
- package/dist/collection/components/q2-calendar/helpers.js +6 -0
- package/dist/collection/components/q2-calendar/index.js +25 -3
- package/dist/collection/components/q2-calendar/styles.css +1 -1
- package/dist/collection/components/q2-card/index.js +290 -0
- package/dist/collection/components/q2-card/styles.css +161 -0
- package/dist/collection/components/q2-checkbox/index.js +32 -4
- package/dist/collection/components/q2-checkbox/styles.css +1 -1
- package/dist/collection/components/q2-checkbox-group/index.js +21 -0
- package/dist/collection/components/q2-dropdown/styles.css +3 -3
- package/dist/collection/components/q2-icon/icons.js +10 -0
- package/dist/collection/components/q2-input/index.js +63 -6
- package/dist/collection/components/q2-input/styles.css +25 -33
- package/dist/collection/components/q2-loading/styles.css +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 +646 -0
- package/dist/collection/components/q2-option-list/styles.css +128 -0
- package/dist/collection/components/q2-pagination/index.js +277 -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 +227 -0
- package/dist/collection/components/q2-radio/index.js +38 -1
- package/dist/collection/components/q2-radio-group/index.js +64 -19
- package/dist/collection/components/q2-select/index.js +30 -4
- package/dist/collection/components/q2-select/styles.css +4 -4
- package/dist/collection/components/q2-stepper/styles.css +8 -8
- package/dist/collection/components/q2-tab-container/index.js +4 -0
- package/dist/collection/components/q2-tag/index.js +200 -0
- package/dist/collection/components/q2-tag/styles.css +141 -0
- package/dist/collection/utils/index.js +24 -12
- package/dist/esm/{icons-3ee662ea.js → icons-6a143c2f.js} +10 -0
- package/dist/esm/{index-ec6660af.js → index-fa32f694.js} +25 -13
- package/dist/esm/loader.js +1 -1
- package/dist/esm/q2-avatar.entry.js +1 -1
- package/dist/esm/q2-btn_2.entry.js +3 -3
- package/dist/esm/q2-calendar.entry.js +15 -4
- package/dist/esm/q2-card.entry.js +85 -0
- package/dist/esm/q2-carousel-pane.entry.js +1 -1
- package/dist/esm/q2-carousel.entry.js +1 -1
- package/dist/esm/q2-checkbox-group.entry.js +4 -1
- package/dist/esm/q2-checkbox.entry.js +17 -6
- package/dist/esm/q2-dropdown-item.entry.js +1 -1
- package/dist/esm/q2-dropdown.entry.js +2 -2
- package/dist/esm/q2-editable-field.entry.js +1 -1
- package/dist/esm/q2-icon.entry.js +2 -2
- package/dist/esm/q2-input.entry.js +12 -7
- package/dist/esm/q2-loc.entry.js +1 -1
- package/dist/esm/q2-message.entry.js +1 -1
- package/dist/esm/q2-optgroup.entry.js +1 -1
- package/dist/esm/q2-option-list.entry.js +353 -0
- package/dist/esm/q2-option.entry.js +3 -11
- package/dist/esm/q2-pagination.entry.js +114 -0
- package/dist/esm/q2-pill.entry.js +133 -0
- package/dist/esm/q2-radio-group.entry.js +41 -13
- package/dist/esm/q2-radio.entry.js +20 -3
- package/dist/esm/q2-section.entry.js +1 -1
- package/dist/esm/q2-select.entry.js +14 -6
- package/dist/esm/q2-stepper-pane.entry.js +1 -1
- package/dist/esm/q2-stepper.entry.js +2 -2
- package/dist/esm/q2-tab-container.entry.js +5 -1
- package/dist/esm/q2-tag.entry.js +90 -0
- package/dist/esm/q2-tecton-elements.js +1 -1
- package/dist/esm/q2-textarea.entry.js +1 -1
- package/dist/q2-tecton-elements/p-08668234.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-fbf7c5e6.entry.js → p-0a7cff38.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-167a19fd.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-07a5d703.entry.js → p-30bf5f44.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-7e030e92.entry.js → p-34415315.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-3c6f73cb.js +1 -0
- package/dist/q2-tecton-elements/p-54300d2f.entry.js +1 -0
- package/dist/q2-tecton-elements/p-54f0d64e.entry.js +1 -0
- package/dist/q2-tecton-elements/p-5b906cf1.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-06fff43d.entry.js → p-650d7497.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-7ce98c1a.entry.js +1 -0
- package/dist/q2-tecton-elements/p-8c22e6b4.entry.js +1 -0
- package/dist/q2-tecton-elements/p-91dba21f.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-a6f8d09a.entry.js → p-9a3c37ab.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-75e87cca.entry.js → p-a0248299.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-aca8302b.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-df182f61.entry.js → p-af202624.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-c5e55b9f.entry.js → p-b9c2c1d3.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-c3d68d5c.js +1 -0
- package/dist/q2-tecton-elements/{p-bb2e110a.entry.js → p-c5199147.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-843b1ee9.entry.js → p-c5e6f7fa.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-ce44ee47.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-50967020.entry.js → p-d3058002.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-d65aaed2.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-9b50c3c3.entry.js → p-d9bc6494.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-df86f160.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-9a977ee6.entry.js → p-e38080d2.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-e9d69ba8.entry.js +1 -0
- package/dist/q2-tecton-elements/p-f98dc161.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-7e6fc65d.entry.js → p-fa9e3825.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-b281c349.entry.js → p-fe6407a4.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 +14 -3
- package/dist/types/components/q2-calendar/helpers.d.ts +1 -0
- package/dist/types/components/q2-calendar/index.d.ts +1 -0
- package/dist/types/components/q2-card/index.d.ts +31 -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-input/index.d.ts +3 -0
- 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 +1 -0
- package/dist/types/components/q2-tag/index.d.ts +28 -0
- package/dist/types/components.d.ts +175 -1
- 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 +4 -1
- package/package.json +2 -2
- 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-943c7745.entry.js +0 -1
- package/dist/q2-tecton-elements/p-95a73559.entry.js +0 -1
- package/dist/q2-tecton-elements/p-ac859fcc.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
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
* {
|
|
2
|
+
box-sizing: border-box;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
*:active {
|
|
6
|
+
outline: none;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
*:focus {
|
|
10
|
+
outline: none;
|
|
11
|
+
box-shadow: var(--const-global-focus);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
:host {
|
|
15
|
+
box-shadow: none !important;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
::-moz-focus-inner {
|
|
19
|
+
border: none;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
input,
|
|
23
|
+
textarea,
|
|
24
|
+
button {
|
|
25
|
+
font-family: inherit;
|
|
26
|
+
font-size: inherit;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
:host(.sr),
|
|
30
|
+
:host(.sr) button {
|
|
31
|
+
border: 0;
|
|
32
|
+
clip: rect(0 0 0 0);
|
|
33
|
+
height: 1px;
|
|
34
|
+
margin: -1px;
|
|
35
|
+
overflow: hidden;
|
|
36
|
+
padding: 0;
|
|
37
|
+
position: absolute;
|
|
38
|
+
width: 1px;
|
|
39
|
+
white-space: nowrap;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.sr,
|
|
43
|
+
.sr button {
|
|
44
|
+
border: 0;
|
|
45
|
+
clip: rect(0 0 0 0);
|
|
46
|
+
height: 1px;
|
|
47
|
+
margin: -1px;
|
|
48
|
+
overflow: hidden;
|
|
49
|
+
padding: 0;
|
|
50
|
+
position: absolute;
|
|
51
|
+
width: 1px;
|
|
52
|
+
white-space: nowrap;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.hidden {
|
|
56
|
+
display: none;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
:host([hidden]) {
|
|
60
|
+
display: none;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.invisible {
|
|
64
|
+
visibility: hidden;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
:host {
|
|
68
|
+
display: block;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
button,
|
|
72
|
+
a {
|
|
73
|
+
width: 100%;
|
|
74
|
+
text-align: start;
|
|
75
|
+
cursor: pointer;
|
|
76
|
+
height: 100%;
|
|
77
|
+
display: grid;
|
|
78
|
+
gap: var(--tct-card-gap, var(--t-card-gap, var(--app-scale-3x, 15px)));
|
|
79
|
+
margin: 0;
|
|
80
|
+
border: none;
|
|
81
|
+
background: var(--tct-card-background, var(--t-card-background, var(--t-base, #ffffff)));
|
|
82
|
+
padding: var(--tct-card-padding, var(--t-card-padding, var(--app-scale-4x, 20px)));
|
|
83
|
+
color: var(--tct-card-color, var(--t-card-color, var(--t-text, #4d4d4d)));
|
|
84
|
+
text-decoration: none;
|
|
85
|
+
border-radius: var(--tct-card-border-radius, var(--t-card-border-radius, var(--app-border-radius-1, 3px)));
|
|
86
|
+
transition: box-shadow var(--tct-tween-1, var(--app-tween-1, 0.2s ease));
|
|
87
|
+
box-shadow: var(--tct-card-box-shadow, var(--t-card-box-shadow, var(--app-shadow-2, 0 3px 6px rgba(0, 0, 0, 0.3))));
|
|
88
|
+
--comp-avatar-size: var(--tct-card-avatar-size, var(--t-card-avatar-size, 44px));
|
|
89
|
+
--comp-chevron-size: 0;
|
|
90
|
+
}
|
|
91
|
+
@media (hover: hover) {
|
|
92
|
+
button:hover, button:active, button:focus,
|
|
93
|
+
a:hover,
|
|
94
|
+
a:active,
|
|
95
|
+
a:focus {
|
|
96
|
+
color: var(--tct-card-color, var(--t-card-color, var(--t-text, #4d4d4d)));
|
|
97
|
+
}
|
|
98
|
+
button:hover,
|
|
99
|
+
a:hover {
|
|
100
|
+
box-shadow: var(--tct-card-hover-box-shadow, var(--t-card-hover-box-shadow, var(--app-shadow-3, 0 4px 12px rgba(0, 0, 0, 0.3))));
|
|
101
|
+
}
|
|
102
|
+
button:active,
|
|
103
|
+
a:active {
|
|
104
|
+
box-shadow: var(--tct-card-active-box-shadow, var(--t-card-active-box-shadow, var(--app-shadow-1, 0 2px 4px rgba(0, 0, 0, 0.3))));
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
button.is-small,
|
|
108
|
+
a.is-small {
|
|
109
|
+
--comp-avatar-size: var(--tct-card-avatar-size, var(--t-card-avatar-size, 26px));
|
|
110
|
+
}
|
|
111
|
+
button.is-touch,
|
|
112
|
+
a.is-touch {
|
|
113
|
+
--comp-chevron-size: var(--tct-card-chevron-size, var(--t-card-chevron-size, 26px));
|
|
114
|
+
grid-template-columns: 1fr var(--comp-chevron-size);
|
|
115
|
+
}
|
|
116
|
+
button.has-avatar,
|
|
117
|
+
a.has-avatar {
|
|
118
|
+
grid-template-columns: var(--comp-avatar-size) 1fr;
|
|
119
|
+
--tct-avatar-width: var(--comp-avatar-size);
|
|
120
|
+
--tct-avatar-height: var(--comp-avatar-size);
|
|
121
|
+
--tct-icon-size: var(--comp-avatar-size);
|
|
122
|
+
}
|
|
123
|
+
button.has-avatar.is-touch,
|
|
124
|
+
a.has-avatar.is-touch {
|
|
125
|
+
grid-template-columns: var(--comp-avatar-size) 1fr var(--comp-chevron-size);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.container {
|
|
129
|
+
overflow: hidden;
|
|
130
|
+
display: grid;
|
|
131
|
+
gap: var(--tct-card-container-gap, var(--t-card-container-gap, var(--app-scale-1x, 5px)));
|
|
132
|
+
align-content: start;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
h3,
|
|
136
|
+
p {
|
|
137
|
+
margin: 0;
|
|
138
|
+
padding: 0;
|
|
139
|
+
line-height: var(--tct-card-font-height, var(--t-card-font-height, 20px));
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
h3 {
|
|
143
|
+
font-weight: var(--tct-card-font-weight, var(--t-card-font-weight, 600));
|
|
144
|
+
font-size: var(--tct-card-font-size, var(--t-card-font-size, 17px));
|
|
145
|
+
text-overflow: ellipsis;
|
|
146
|
+
overflow: hidden;
|
|
147
|
+
white-space: nowrap;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
p {
|
|
151
|
+
text-overflow: ellipsis;
|
|
152
|
+
overflow: hidden;
|
|
153
|
+
display: -webkit-box;
|
|
154
|
+
-webkit-line-clamp: 2;
|
|
155
|
+
-webkit-box-orient: vertical;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.touch-indicator {
|
|
159
|
+
align-self: center;
|
|
160
|
+
--tct-icon-size: var(--comp-chevron-size);
|
|
161
|
+
}
|
|
@@ -5,9 +5,10 @@ export class Q2Checkbox {
|
|
|
5
5
|
this.checked = false;
|
|
6
6
|
this.id = `checkbox-${createGuid()}`;
|
|
7
7
|
///// Actions ////////
|
|
8
|
-
this.
|
|
8
|
+
this.onInputClick = (event) => {
|
|
9
9
|
event.stopPropagation();
|
|
10
|
-
|
|
10
|
+
event.preventDefault();
|
|
11
|
+
if (this.disabled || this.readonly)
|
|
11
12
|
return;
|
|
12
13
|
if (!(event.target instanceof HTMLInputElement))
|
|
13
14
|
return;
|
|
@@ -19,8 +20,15 @@ export class Q2Checkbox {
|
|
|
19
20
|
};
|
|
20
21
|
this.onControlClick = (event) => {
|
|
21
22
|
event.stopPropagation();
|
|
23
|
+
if (this.readonly)
|
|
24
|
+
return;
|
|
22
25
|
this.inputElement.click();
|
|
23
26
|
};
|
|
27
|
+
this.onKeyDown = (event) => {
|
|
28
|
+
if (this.readonly && event.code === 'Space') {
|
|
29
|
+
event.preventDefault();
|
|
30
|
+
}
|
|
31
|
+
};
|
|
24
32
|
}
|
|
25
33
|
////////// LIFECYCLE HOOKS ////////
|
|
26
34
|
componentWillLoad() {
|
|
@@ -31,7 +39,10 @@ export class Q2Checkbox {
|
|
|
31
39
|
}
|
|
32
40
|
//////// Host Element Events ////////
|
|
33
41
|
defaultChangeHandler(event) {
|
|
34
|
-
if (
|
|
42
|
+
if (!this.readonly &&
|
|
43
|
+
event.target === this.hostElement &&
|
|
44
|
+
!this.hostElement.onchange &&
|
|
45
|
+
!!event.detail) {
|
|
35
46
|
this.checked = event.detail.checked;
|
|
36
47
|
}
|
|
37
48
|
}
|
|
@@ -47,7 +58,7 @@ export class Q2Checkbox {
|
|
|
47
58
|
/////// View Methods ///////
|
|
48
59
|
render() {
|
|
49
60
|
return (h("div", { class: "checkbox-container" },
|
|
50
|
-
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-label": this.label && this.hideLabel ? loc(this.label) : undefined, "test-id": "q2CheckboxInnerCheckBox",
|
|
61
|
+
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-label": this.label && this.hideLabel ? loc(this.label) : undefined, "test-id": "q2CheckboxInnerCheckBox", onKeyDown: this.onKeyDown, onClick: this.onInputClick }),
|
|
51
62
|
h("label", { "test-id": "checkboxButton" },
|
|
52
63
|
this.generateCheckboxSVG(),
|
|
53
64
|
!this.hideLabel && (h("div", { class: "q2-checkbox-label-content" },
|
|
@@ -210,6 +221,23 @@ export class Q2Checkbox {
|
|
|
210
221
|
"attribute": "disabled",
|
|
211
222
|
"reflect": true
|
|
212
223
|
},
|
|
224
|
+
"readonly": {
|
|
225
|
+
"type": "boolean",
|
|
226
|
+
"mutable": false,
|
|
227
|
+
"complexType": {
|
|
228
|
+
"original": "boolean",
|
|
229
|
+
"resolved": "boolean",
|
|
230
|
+
"references": {}
|
|
231
|
+
},
|
|
232
|
+
"required": false,
|
|
233
|
+
"optional": false,
|
|
234
|
+
"docs": {
|
|
235
|
+
"tags": [],
|
|
236
|
+
"text": ""
|
|
237
|
+
},
|
|
238
|
+
"attribute": "readonly",
|
|
239
|
+
"reflect": true
|
|
240
|
+
},
|
|
213
241
|
"value": {
|
|
214
242
|
"type": "string",
|
|
215
243
|
"mutable": false,
|
|
@@ -138,7 +138,7 @@ input:focus + label .checkbox-icon {
|
|
|
138
138
|
|
|
139
139
|
.q2-checkbox-label-content {
|
|
140
140
|
font-weight: var(--tct-checkbox-font-weight, 400);
|
|
141
|
-
width: calc(100% - var(--tct-checkbox-size, 20px) - var(--tct-scale-2, var(--app-scale-2, 10px)));
|
|
141
|
+
width: calc( 100% - var(--tct-checkbox-size, 20px) - var(--tct-scale-2, var(--app-scale-2, 10px)) );
|
|
142
142
|
cursor: inherit;
|
|
143
143
|
}
|
|
144
144
|
|
|
@@ -3,6 +3,7 @@ import { createGuid, loc } from 'src/utils';
|
|
|
3
3
|
export class Q2CheckboxGroup {
|
|
4
4
|
constructor() {
|
|
5
5
|
this.disabled = false;
|
|
6
|
+
this.readonly = false;
|
|
6
7
|
this.optional = false;
|
|
7
8
|
this.hasError = false;
|
|
8
9
|
this.id = `checkbox-group-${createGuid()}`;
|
|
@@ -39,6 +40,8 @@ export class Q2CheckboxGroup {
|
|
|
39
40
|
}
|
|
40
41
|
}
|
|
41
42
|
valueUpdated() {
|
|
43
|
+
if (this.readonly)
|
|
44
|
+
return;
|
|
42
45
|
this.checkboxElements.forEach(check => {
|
|
43
46
|
if (this.protectedValue.hasOwnProperty(check.value)) {
|
|
44
47
|
check.checked = this.value[check.value];
|
|
@@ -130,6 +133,24 @@ export class Q2CheckboxGroup {
|
|
|
130
133
|
"reflect": true,
|
|
131
134
|
"defaultValue": "false"
|
|
132
135
|
},
|
|
136
|
+
"readonly": {
|
|
137
|
+
"type": "boolean",
|
|
138
|
+
"mutable": false,
|
|
139
|
+
"complexType": {
|
|
140
|
+
"original": "boolean",
|
|
141
|
+
"resolved": "boolean",
|
|
142
|
+
"references": {}
|
|
143
|
+
},
|
|
144
|
+
"required": false,
|
|
145
|
+
"optional": false,
|
|
146
|
+
"docs": {
|
|
147
|
+
"tags": [],
|
|
148
|
+
"text": ""
|
|
149
|
+
},
|
|
150
|
+
"attribute": "readonly",
|
|
151
|
+
"reflect": true,
|
|
152
|
+
"defaultValue": "false"
|
|
153
|
+
},
|
|
133
154
|
"optional": {
|
|
134
155
|
"type": "boolean",
|
|
135
156
|
"mutable": false,
|
|
@@ -146,14 +146,14 @@ button {
|
|
|
146
146
|
|
|
147
147
|
q2-btn[color=primary] ~ .q2-element-dropdown.dropup,
|
|
148
148
|
q2-btn[intent=workflow-primary] ~ .q2-element-dropdown.dropup {
|
|
149
|
-
bottom: calc(var(
|
|
149
|
+
bottom: calc( var-list(var-prefixer(btn-icon-height), 44px) + var-list(var-prefixer(btn-primary-border-width), 0) );
|
|
150
150
|
}
|
|
151
151
|
|
|
152
152
|
q2-btn[color=secondary] ~ .q2-element-dropdown.dropup,
|
|
153
153
|
q2-btn[intent=workflow-secondary] ~ .q2-element-dropdown.dropup {
|
|
154
|
-
bottom: calc(var(
|
|
154
|
+
bottom: calc( var-list(var-prefixer(btn-icon-height), 44px) + var-list(var-prefixer(btn-secondary-border-width), 0) );
|
|
155
155
|
}
|
|
156
156
|
|
|
157
157
|
q2-btn[intent=neutral] ~ .q2-element-dropdown.dropup {
|
|
158
|
-
bottom: calc(var(
|
|
158
|
+
bottom: calc( var-list(var-prefixer(btn-icon-height), 44px) + var-list(var-prefixer(btn-neutral-border-width), 0) );
|
|
159
159
|
}
|
|
@@ -163,6 +163,16 @@ const icons = {
|
|
|
163
163
|
markup: () => (h("g", null,
|
|
164
164
|
h("path", { d: "M13 2C6.986 2 2.11 6.559 2.11 12.182c0 3.2 1.579 6.054 4.046 7.92V24l3.716-2.062c.991.278 2.04.427 3.128.427 6.014 0 10.89-4.559 10.89-10.183C23.89 6.56 19.013 2 13 2zm1.147 13.655l-2.816-2.926-5.424 2.999 5.946-6.31 2.816 2.926 5.424-3-5.946 6.31z", class: "filled" })))
|
|
165
165
|
},
|
|
166
|
+
'brand-payrecs-color': {
|
|
167
|
+
markup: () => (h("g", { "fill-rule": "evenodd" },
|
|
168
|
+
h("path", { fill: "#194879", d: "M9.27-347v-6.29h3.17c1.99 0 3.27.01 3.43.02.97.06 1.8.25 2.55.59 1.21.55 2.08 1.53 2.43 2.74.27.96.25 2.09-.06 2.99-.03.1-.12.3-.19.43-.38.78-1 1.42-1.81 1.86-.07.04-.12.07-.12.08 0 0 .59.88 1.31 1.93.72 1.06 1.31 1.93 1.31 1.94s-1.02.01-2.25.01h-2.25l-1.07-1.58-1.07-1.58H13.5v3.16H9.27v-6.3zm6.01-.08c.36-.03.64-.1.86-.23.06-.03.17-.12.25-.21.13-.13.16-.17.23-.31.09-.19.12-.3.15-.53.04-.38-.04-.77-.22-1.05-.17-.26-.39-.42-.72-.52-.29-.09-.32-.09-1.36-.1l-.96-.01v2.96h.79c.43.02.87.01.98 0z", transform: "translate(4 360)" }),
|
|
169
|
+
h("path", { fill: "#508dca", d: "M-3.3-383v-6.29h3.14c1.86 0 3.25.01 3.41.02 2.48.14 4.21 1.18 4.92 2.97.37.93.42 2.14.13 3.15-.27.92-.86 1.75-1.64 2.29-.67.47-1.49.79-2.44.94-.59.1-.96.12-2.25.12H.92v3.1H-3.3v-6.3zm6.26-.1c.48-.09.81-.28 1.02-.6.17-.25.23-.5.21-.91-.01-.3-.03-.44-.13-.63-.22-.47-.63-.71-1.31-.77-.1-.01-.55-.02-1.01-.02H.92v2.96l.95-.01c.8.01.96 0 1.09-.02z", transform: "translate(4 396)" })))
|
|
170
|
+
},
|
|
171
|
+
'brand-payrecs-filled': {
|
|
172
|
+
markup: () => (h("g", { class: "filled" },
|
|
173
|
+
h("path", { d: "M9.27-347v-6.29h3.17c1.99 0 3.27.01 3.43.02.97.06 1.8.25 2.55.59 1.21.55 2.08 1.53 2.43 2.74.27.96.25 2.09-.06 2.99-.03.1-.12.3-.19.43-.38.78-1 1.42-1.81 1.86-.07.04-.12.07-.12.08 0 0 .59.88 1.31 1.93.72 1.06 1.31 1.93 1.31 1.94s-1.02.01-2.25.01h-2.25l-1.07-1.58-1.07-1.58H13.5v3.16H9.27v-6.3zm6.01-.08c.36-.03.64-.1.86-.23.06-.03.17-.12.25-.21.13-.13.16-.17.23-.31.09-.19.12-.3.15-.53.04-.38-.04-.77-.22-1.05-.17-.26-.39-.42-.72-.52-.29-.09-.32-.09-1.36-.1l-.96-.01v2.96h.79c.43.02.87.01.98 0z", transform: "translate(4 360)" }),
|
|
174
|
+
h("path", { d: "M-3.3-383v-6.29h3.14c1.86 0 3.25.01 3.41.02 2.48.14 4.21 1.18 4.92 2.97.37.93.42 2.14.13 3.15-.27.92-.86 1.75-1.64 2.29-.67.47-1.49.79-2.44.94-.59.1-.96.12-2.25.12H.92v3.1H-3.3v-6.3zm6.26-.1c.48-.09.81-.28 1.02-.6.17-.25.23-.5.21-.91-.01-.3-.03-.44-.13-.63-.22-.47-.63-.71-1.31-.77-.1-.01-.55-.02-1.01-.02H.92v2.96l.95-.01c.8.01.96 0 1.09-.02z", transform: "translate(4 396)" })))
|
|
175
|
+
},
|
|
166
176
|
'brand-snapchat-color': {
|
|
167
177
|
markup: () => (h("g", { fill: "none", "fill-rule": "evenodd" },
|
|
168
178
|
h("g", null,
|
|
@@ -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" }))),
|
|
@@ -299,11 +299,17 @@ export class Q2Input {
|
|
|
299
299
|
}
|
|
300
300
|
pseudoInputDOM() {
|
|
301
301
|
const showPlaceholder = !this.value && !!this.placeholder;
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
302
|
+
let ariaLabelSuffix = '';
|
|
303
|
+
if (this.optional) {
|
|
304
|
+
ariaLabelSuffix = loc('tecton.element.input.optional');
|
|
305
|
+
}
|
|
306
|
+
if (this.readonly) {
|
|
307
|
+
ariaLabelSuffix = loc('tecton.element.input.readonly');
|
|
308
|
+
}
|
|
309
|
+
return (h("div", { class: "pseudo-input" },
|
|
310
|
+
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)) ||
|
|
311
|
+
''}${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;
|
|
@@ -610,6 +616,40 @@ export class Q2Input {
|
|
|
610
616
|
"attribute": "optional",
|
|
611
617
|
"reflect": true
|
|
612
618
|
},
|
|
619
|
+
"min": {
|
|
620
|
+
"type": "number",
|
|
621
|
+
"mutable": false,
|
|
622
|
+
"complexType": {
|
|
623
|
+
"original": "number",
|
|
624
|
+
"resolved": "number",
|
|
625
|
+
"references": {}
|
|
626
|
+
},
|
|
627
|
+
"required": false,
|
|
628
|
+
"optional": false,
|
|
629
|
+
"docs": {
|
|
630
|
+
"tags": [],
|
|
631
|
+
"text": ""
|
|
632
|
+
},
|
|
633
|
+
"attribute": "min",
|
|
634
|
+
"reflect": true
|
|
635
|
+
},
|
|
636
|
+
"max": {
|
|
637
|
+
"type": "number",
|
|
638
|
+
"mutable": false,
|
|
639
|
+
"complexType": {
|
|
640
|
+
"original": "number",
|
|
641
|
+
"resolved": "number",
|
|
642
|
+
"references": {}
|
|
643
|
+
},
|
|
644
|
+
"required": false,
|
|
645
|
+
"optional": false,
|
|
646
|
+
"docs": {
|
|
647
|
+
"tags": [],
|
|
648
|
+
"text": ""
|
|
649
|
+
},
|
|
650
|
+
"attribute": "max",
|
|
651
|
+
"reflect": true
|
|
652
|
+
},
|
|
613
653
|
"formatModifier": {
|
|
614
654
|
"type": "string",
|
|
615
655
|
"mutable": false,
|
|
@@ -815,6 +855,23 @@ export class Q2Input {
|
|
|
815
855
|
"attribute": "aria-activedescendant",
|
|
816
856
|
"reflect": false
|
|
817
857
|
},
|
|
858
|
+
"current": {
|
|
859
|
+
"type": "string",
|
|
860
|
+
"mutable": false,
|
|
861
|
+
"complexType": {
|
|
862
|
+
"original": "'page' | 'step' | 'location' | 'date' | 'time' | 'true' | 'false'",
|
|
863
|
+
"resolved": "\"date\" | \"false\" | \"location\" | \"page\" | \"step\" | \"time\" | \"true\"",
|
|
864
|
+
"references": {}
|
|
865
|
+
},
|
|
866
|
+
"required": false,
|
|
867
|
+
"optional": false,
|
|
868
|
+
"docs": {
|
|
869
|
+
"tags": [],
|
|
870
|
+
"text": ""
|
|
871
|
+
},
|
|
872
|
+
"attribute": "current",
|
|
873
|
+
"reflect": false
|
|
874
|
+
},
|
|
818
875
|
"errors": {
|
|
819
876
|
"type": "unknown",
|
|
820
877
|
"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;
|
|
@@ -249,13 +254,8 @@ q2-icon {
|
|
|
249
254
|
display: inline-flex;
|
|
250
255
|
align-items: center;
|
|
251
256
|
justify-content: center;
|
|
252
|
-
min-height: calc(
|
|
253
|
-
|
|
254
|
-
var(--tct-input-focus-border-bottom-width, var(--t-input-focus-border-bottom-width, 1px))
|
|
255
|
-
);
|
|
256
|
-
height: calc(
|
|
257
|
-
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))
|
|
258
|
-
);
|
|
257
|
+
min-height: calc( 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)) );
|
|
258
|
+
height: calc( 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)) );
|
|
259
259
|
font-size: var(--tct-input-prefix-font-size, var(--t-input-prefix-font-size, inherit));
|
|
260
260
|
color: var(--tct-input-prefix-font-color, var(--t-input-prefix-font-color, inherit));
|
|
261
261
|
background-color: var(--tct-input-prefix-bg, var(--t-input-prefix-bg, var(--tct-input-bg, var(--t-input-bg, var(--tct-gray-14, var(--t-gray-14, #f2f2f2))))));
|
|
@@ -263,23 +263,15 @@ q2-icon {
|
|
|
263
263
|
}
|
|
264
264
|
|
|
265
265
|
.input-prefix {
|
|
266
|
-
border-top-left-radius: calc(
|
|
267
|
-
|
|
268
|
-
);
|
|
269
|
-
border-bottom-left-radius: calc(
|
|
270
|
-
var(--comp-input-border-bottom-left-radius) - var(--tct-input-border-bottom-width, var(--t-input-border-bottom-width, 1px)) - var(--tct-input-border-left-width, var(--t-input-border-left-width, 1px))
|
|
271
|
-
);
|
|
266
|
+
border-top-left-radius: calc( var(--comp-input-border-top-left-radius) - var(--tct-input-border-top-width, var(--t-input-border-top-width, 1px)) - var(--tct-input-border-left-width, var(--t-input-border-left-width, 1px)) );
|
|
267
|
+
border-bottom-left-radius: calc( var(--comp-input-border-bottom-left-radius) - var(--tct-input-border-bottom-width, var(--t-input-border-bottom-width, 1px)) - var(--tct-input-border-left-width, var(--t-input-border-left-width, 1px)) );
|
|
272
268
|
pointer-events: none;
|
|
273
269
|
/* used to allow iOS voiceover to display keyboard in input TCT-1194 */
|
|
274
270
|
}
|
|
275
271
|
|
|
276
272
|
.input-suffix {
|
|
277
|
-
border-top-right-radius: calc(
|
|
278
|
-
|
|
279
|
-
);
|
|
280
|
-
border-bottom-right-radius: calc(
|
|
281
|
-
var(--comp-input-border-bottom-right-radius) - var(--tct-input-border-bottom-width, var(--t-input-border-bottom-width, 1px)) - var(--tct-input-border-right-width, var(--t-input-border-right-width, 1px))
|
|
282
|
-
);
|
|
273
|
+
border-top-right-radius: calc( var(--comp-input-border-top-right-radius) - var(--tct-input-border-top-width, var(--t-input-border-top-width, 1px)) - var(--tct-input-border-right-width, var(--t-input-border-right-width, 1px)) );
|
|
274
|
+
border-bottom-right-radius: calc( var(--comp-input-border-bottom-right-radius) - var(--tct-input-border-bottom-width, var(--t-input-border-bottom-width, 1px)) - var(--tct-input-border-right-width, var(--t-input-border-right-width, 1px)) );
|
|
283
275
|
}
|
|
284
276
|
|
|
285
277
|
.icon-error {
|
|
@@ -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));
|