q2-tecton-elements 1.13.0 → 1.14.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 +1 -1
- package/dist/cjs/{icons-08ffe5c9.js → icons-e2bc9ee9.js} +1 -1
- package/dist/cjs/{index-7febb200.js → index-0128397d.js} +41 -1
- package/dist/cjs/{index-dd823ee6.js → index-0fec9f3b.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/q2-avatar.cjs.entry.js +2 -2
- package/dist/cjs/q2-badge.cjs.entry.js +1 -1
- package/dist/cjs/q2-btn_2.cjs.entry.js +5 -5
- package/dist/cjs/q2-calendar.cjs.entry.js +5 -4
- package/dist/cjs/q2-card.cjs.entry.js +2 -2
- 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 +39976 -0
- package/dist/cjs/q2-checkbox-group.cjs.entry.js +2 -2
- package/dist/cjs/q2-checkbox.cjs.entry.js +10 -13
- package/dist/cjs/q2-dropdown-item.cjs.entry.js +2 -2
- package/dist/cjs/q2-dropdown.cjs.entry.js +4 -4
- package/dist/cjs/q2-editable-field.cjs.entry.js +2 -2
- package/dist/cjs/q2-icon.cjs.entry.js +3 -3
- package/dist/cjs/q2-input.cjs.entry.js +3 -3
- package/dist/cjs/q2-loading-element.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 +2 -2
- package/dist/cjs/q2-option.cjs.entry.js +1 -1
- package/dist/cjs/q2-pagination.cjs.entry.js +3 -3
- package/dist/cjs/q2-pill.cjs.entry.js +2 -2
- package/dist/cjs/q2-radio-group.cjs.entry.js +19 -11
- package/dist/cjs/q2-radio.cjs.entry.js +3 -3
- package/dist/cjs/q2-section.cjs.entry.js +2 -2
- package/dist/cjs/q2-select.cjs.entry.js +16 -8
- package/dist/cjs/q2-stepper-pane.cjs.entry.js +2 -2
- package/dist/cjs/q2-stepper-vertical.cjs.entry.js +2 -2
- package/dist/cjs/q2-stepper.cjs.entry.js +2 -2
- package/dist/cjs/q2-tab-container.cjs.entry.js +2 -2
- package/dist/cjs/q2-tab-pane.cjs.entry.js +1 -1
- package/dist/cjs/q2-tag.cjs.entry.js +2 -2
- package/dist/cjs/q2-tecton-elements.cjs.js +2 -2
- package/dist/cjs/q2-textarea.cjs.entry.js +2 -2
- package/dist/cjs/{shapes-305746b5.js → shapes-c1a60d46.js} +1 -1
- package/dist/cjs/tecton-tab-pane.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/q2-btn/index.js +18 -1
- package/dist/collection/components/q2-btn/styles.css +6 -0
- package/dist/collection/components/q2-calendar/index.js +2 -1
- package/dist/collection/components/q2-calendar/styles.css +7 -0
- package/dist/collection/components/q2-chart-donut/index.js +628 -0
- package/dist/collection/components/q2-chart-donut/styles.css +140 -0
- package/dist/collection/components/q2-checkbox/index.js +31 -16
- package/dist/collection/components/q2-checkbox/styles.css +111 -139
- package/dist/collection/components/q2-dropdown/index.js +18 -1
- package/dist/collection/components/q2-dropdown/styles.css +5 -0
- package/dist/collection/components/q2-input/index.js +18 -1
- package/dist/collection/components/q2-pagination/index.js +1 -1
- package/dist/collection/components/q2-radio/styles.css +21 -18
- package/dist/collection/components/q2-radio-group/index.js +44 -15
- package/dist/collection/components/q2-radio-group/styles.css +36 -32
- package/dist/collection/components/q2-select/index.js +13 -5
- package/dist/collection/components/q2-select/styles.css +7 -2
- package/dist/esm/click-elsewhere.entry.js +1 -1
- package/dist/esm/{icons-b1e11526.js → icons-ed54e307.js} +1 -1
- package/dist/esm/{index-0ff8de52.js → index-14e81efa.js} +1 -1
- package/dist/esm/{index-dbfb3ecc.js → index-6d5ed7cc.js} +41 -1
- package/dist/esm/loader.js +2 -2
- package/dist/esm/q2-avatar.entry.js +2 -2
- package/dist/esm/q2-badge.entry.js +1 -1
- package/dist/esm/q2-btn_2.entry.js +5 -5
- package/dist/esm/q2-calendar.entry.js +5 -4
- package/dist/esm/q2-card.entry.js +2 -2
- 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 +39972 -0
- package/dist/esm/q2-checkbox-group.entry.js +2 -2
- package/dist/esm/q2-checkbox.entry.js +10 -13
- package/dist/esm/q2-dropdown-item.entry.js +2 -2
- package/dist/esm/q2-dropdown.entry.js +4 -4
- package/dist/esm/q2-editable-field.entry.js +2 -2
- package/dist/esm/q2-icon.entry.js +3 -3
- package/dist/esm/q2-input.entry.js +3 -3
- package/dist/esm/q2-loading-element.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 +2 -2
- package/dist/esm/q2-option.entry.js +1 -1
- package/dist/esm/q2-pagination.entry.js +3 -3
- package/dist/esm/q2-pill.entry.js +2 -2
- package/dist/esm/q2-radio-group.entry.js +19 -11
- package/dist/esm/q2-radio.entry.js +3 -3
- package/dist/esm/q2-section.entry.js +2 -2
- package/dist/esm/q2-select.entry.js +16 -8
- package/dist/esm/q2-stepper-pane.entry.js +2 -2
- package/dist/esm/q2-stepper-vertical.entry.js +2 -2
- package/dist/esm/q2-stepper.entry.js +2 -2
- package/dist/esm/q2-tab-container.entry.js +2 -2
- package/dist/esm/q2-tab-pane.entry.js +1 -1
- package/dist/esm/q2-tag.entry.js +2 -2
- package/dist/esm/q2-tecton-elements.js +2 -2
- package/dist/esm/q2-textarea.entry.js +2 -2
- package/dist/esm/{shapes-cff4e1f0.js → shapes-c32e3ba2.js} +1 -1
- package/dist/esm/tecton-tab-pane.entry.js +1 -1
- package/dist/q2-tecton-elements/p-0675f9c8.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-fdfbe75b.entry.js → p-09464226.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-10264ecb.entry.js → p-0e13d5ba.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-d5218cd6.entry.js → p-17cffd7d.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-2846ab94.entry.js → p-1eed57aa.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-2a44f9b8.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-2c15414c.entry.js → p-3796397e.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-a5562aaa.entry.js → p-37f1984c.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-3cfc0cb4.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-dd02cf8d.js → p-431bf43e.js} +1 -1
- package/dist/q2-tecton-elements/{p-ede12fc1.entry.js → p-58e42fc5.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-3fe98e3e.entry.js → p-627df469.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-327cca41.entry.js → p-65e2df25.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-ca7a3380.entry.js → p-663cb6e8.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-e0e7ae8b.entry.js → p-6ced7858.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-6fec9235.entry.js → p-706249e1.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-5bbf2bfe.entry.js → p-7249de38.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-824aebd9.js → p-73154834.js} +1 -1
- package/dist/q2-tecton-elements/p-85cff6ec.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-49b2abc4.entry.js → p-87f448ab.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-3a420dbf.entry.js → p-882eaf0f.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-45eb7739.entry.js → p-8f815678.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-00e8f782.entry.js → p-92886dbe.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-255b2b4c.js → p-93c00587.js} +1 -1
- package/dist/q2-tecton-elements/{p-221abbf6.entry.js → p-9725d55f.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-430a979b.entry.js → p-9af46ffc.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-1305ec5f.entry.js → p-9d8a963b.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-123cdfb9.entry.js → p-ad685b67.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-148391d6.entry.js → p-b066cdd1.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-27736b6b.entry.js → p-bd6c6239.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-0900bec1.entry.js → p-c4eff511.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-c5691700.js +1 -0
- package/dist/q2-tecton-elements/p-cc57b8b1.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-1dfaee64.entry.js → p-cf9e8120.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-4ab30466.entry.js → p-d46efe36.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-d5d2b3c9.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-2bc1de01.entry.js → p-e435159b.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-c20cbb2d.entry.js → p-ea2a290e.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-eeb4a008.entry.js +39 -0
- package/dist/q2-tecton-elements/{p-d33e152c.entry.js → p-fbfb3615.entry.js} +1 -1
- package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
- package/dist/types/components/q2-btn/index.d.ts +1 -0
- package/dist/types/components/q2-chart-donut/index.d.ts +89 -0
- package/dist/types/components/q2-checkbox/index.d.ts +1 -1
- package/dist/types/components/q2-dropdown/index.d.ts +1 -0
- package/dist/types/components/q2-input/index.d.ts +1 -0
- package/dist/types/components/q2-radio-group/index.d.ts +4 -2
- package/dist/types/components.d.ts +48 -0
- package/dist/types/util.d.ts +1 -0
- package/package.json +3 -2
- package/dist/q2-tecton-elements/p-2caa89fd.js +0 -1
- package/dist/q2-tecton-elements/p-3abcb09d.entry.js +0 -1
- package/dist/q2-tecton-elements/p-50e218c7.entry.js +0 -1
- package/dist/q2-tecton-elements/p-a4ae89cc.entry.js +0 -1
- package/dist/q2-tecton-elements/p-ae4fed23.entry.js +0 -1
- package/dist/q2-tecton-elements/p-b2302cd3.entry.js +0 -1
- package/dist/q2-tecton-elements/p-d52b435e.entry.js +0 -1
|
@@ -0,0 +1,140 @@
|
|
|
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
|
+
position: relative;
|
|
69
|
+
aspect-ratio: 1/1;
|
|
70
|
+
width: 100%;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.chart-container {
|
|
74
|
+
aspect-ratio: 1/1;
|
|
75
|
+
width: 100%;
|
|
76
|
+
position: absolute;
|
|
77
|
+
top: 0;
|
|
78
|
+
--comp-color-1: var(--tct-chart-donut-color-1, var(--t-chart-donut-color-1, var(--t-accent-1, #e05252)));
|
|
79
|
+
--comp-color-2: var(--tct-chart-donut-color-2, var(--t-chart-donut-color-2, var(--t-accent-2, #e09952)));
|
|
80
|
+
--comp-color-3: var(--tct-chart-donut-color-3, var(--t-chart-donut-color-3, var(--t-accent-3, #e0e052)));
|
|
81
|
+
--comp-color-4: var(--tct-chart-donut-color-4, var(--t-chart-donut-color-4, var(--t-accent-4, #99e052)));
|
|
82
|
+
--comp-color-5: var(--tct-chart-donut-color-5, var(--t-chart-donut-color-5, var(--t-accent-5, #52e052)));
|
|
83
|
+
--comp-color-6: var(--tct-chart-donut-color-6, var(--t-chart-donut-color-6, var(--t-accent-6, #52e099)));
|
|
84
|
+
--comp-color-7: var(--tct-chart-donut-color-7, var(--t-chart-donut-color-7, var(--t-accent-7, #52e0e0)));
|
|
85
|
+
--comp-color-8: var(--tct-chart-donut-color-8, var(--t-chart-donut-color-8, var(--t-accent-8, #5299e0)));
|
|
86
|
+
--comp-color-9: var(--tct-chart-donut-color-9, var(--t-chart-donut-color-9, var(--t-accent-9, #5252e0)));
|
|
87
|
+
--comp-color-10: var(--tct-chart-donut-color-10, var(--t-chart-donut-color-10, var(--t-accent-10, #9952e0)));
|
|
88
|
+
--comp-color-11: var(--tct-chart-donut-color-11, var(--t-chart-donut-color-11, var(--t-accent-11, #e052e0)));
|
|
89
|
+
--comp-color-12: var(--tct-chart-donut-color-12, var(--t-chart-donut-color-12, var(--t-accent-12, #e05299)));
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.chart-container,
|
|
93
|
+
.center-card {
|
|
94
|
+
--comp-background-color: var(--tct-chart-donut-border-color, var(--t-chart-donut-border-color, var(--t-base, #ffffff)));
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
button {
|
|
98
|
+
--comp-button-vertical-padding: var(--tct-chart-donut-button-vertical-padding, var(--t-chart-donut-button-vertical-padding, var(--app-scale-1, 5px)));
|
|
99
|
+
transition: box-shadow var(--tct-chart-donut-button-tween, var(--t-chart-donut-button-tween, var(--app-tween-1, 0.2s ease)));
|
|
100
|
+
padding: var(--comp-button-vertical-padding) 0;
|
|
101
|
+
}
|
|
102
|
+
button:active {
|
|
103
|
+
box-shadow: var(--const-global-focus), var(--tct-chart-donut-button-hover-box-shadow, var(--t-chart-donut-button-hover-box-shadow, var(--app-shadow-1, 0 2px 4px rgba(0, 0, 0, 0.3))));
|
|
104
|
+
}
|
|
105
|
+
button:hover {
|
|
106
|
+
box-shadow: var(--tct-chart-donut-button-hover-box-shadow, var(--t-chart-donut-button-hover-box-shadow, var(--app-shadow-1, 0 2px 4px rgba(0, 0, 0, 0.3))));
|
|
107
|
+
}
|
|
108
|
+
button:focus {
|
|
109
|
+
box-shadow: var(--const-global-focus), var(--tct-chart-donut-button-hover-box-shadow, var(--t-chart-donut-button-hover-box-shadow, var(--app-shadow-1, 0 2px 4px rgba(0, 0, 0, 0.3))));
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.center-card {
|
|
113
|
+
width: 60%;
|
|
114
|
+
text-align: center;
|
|
115
|
+
color: var(--tct-chart-donut-text-color, var(--t-chart-donut-text-color, var(--t-text, #4d4d4d)));
|
|
116
|
+
margin-inline: auto;
|
|
117
|
+
display: block;
|
|
118
|
+
margin-top: 50%;
|
|
119
|
+
position: relative;
|
|
120
|
+
transform: translateY(-50%);
|
|
121
|
+
}
|
|
122
|
+
.center-card:is(button) {
|
|
123
|
+
cursor: pointer;
|
|
124
|
+
background: var(--comp-background-color);
|
|
125
|
+
border: 0;
|
|
126
|
+
border-radius: var(--tct-chart-donut-button-border-radius, var(--t-chart-donut-button-border-radius, var(--app-border-radius-1, 3px)));
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
q2-icon {
|
|
130
|
+
--t-icon-size: var(--tct-chart-donut-icon-size, var(--t-chart-donut-icon-size, 26px));
|
|
131
|
+
margin-bottom: var(--tct-chart-donut-icon-margin-bottom, var(--t-chart-donut-icon-margin-bottom, var(--app-scale-1x, 5px)));
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.name {
|
|
135
|
+
font-size: var(--tct-chart-donut-name-font-size, var(--t-chart-donut-name-font-size, 14px));
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.value {
|
|
139
|
+
font-size: var(--tct-chart-donut-value-font-size, var(--t-chart-donut-value-font-size, 21px));
|
|
140
|
+
}
|
|
@@ -18,12 +18,6 @@ export class Q2Checkbox {
|
|
|
18
18
|
});
|
|
19
19
|
this.inputElement.focus();
|
|
20
20
|
};
|
|
21
|
-
this.onControlClick = (event) => {
|
|
22
|
-
event.stopPropagation();
|
|
23
|
-
if (this.readonly)
|
|
24
|
-
return;
|
|
25
|
-
this.inputElement.click();
|
|
26
|
-
};
|
|
27
21
|
this.onKeyDown = (event) => {
|
|
28
22
|
if (this.readonly && event.code === 'Space') {
|
|
29
23
|
event.preventDefault();
|
|
@@ -54,22 +48,26 @@ export class Q2Checkbox {
|
|
|
54
48
|
}
|
|
55
49
|
/////// View Methods ///////
|
|
56
50
|
render() {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
51
|
+
const textLabelClasses = ['label-text'];
|
|
52
|
+
if (this.hideLabel)
|
|
53
|
+
textLabelClasses.push('sr');
|
|
54
|
+
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-label": this.label ? loc(this.label) : undefined, "aria-describedby": this.description ? 'description' : undefined, "test-id": "q2CheckboxInnerCheckBox", onKeyDown: this.onKeyDown, onClick: this.onInputClick }),
|
|
56
|
+
h("label", { htmlFor: this.id, class: "label-control", "test-id": "checkboxButton" }, this.generateCheckboxSVG()),
|
|
57
|
+
h("div", { class: textLabelClasses.join(' ') },
|
|
58
|
+
h("label", { "test-id": "checkboxLabel", htmlFor: this.id },
|
|
59
|
+
loc(this.label),
|
|
60
|
+
h("slot", null))),
|
|
61
|
+
this.description && (h("div", { class: "description-text", "test-id": "checkboxDescription", id: "description" }, loc(this.description)))));
|
|
64
62
|
}
|
|
65
63
|
generateCheckboxSVG() {
|
|
66
64
|
if (this.type === 'favorite') {
|
|
67
|
-
return (h("q2-icon", { type: "star", class: "checkbox-icon"
|
|
65
|
+
return (h("q2-icon", { type: "star", class: "checkbox-icon" }));
|
|
68
66
|
}
|
|
69
67
|
if (this.type === 'toggle') {
|
|
70
68
|
return this.generateToggleSVG();
|
|
71
69
|
}
|
|
72
|
-
return (h("svg", { "aria-hidden": "true", width: "20", height: "20", viewBox: "0 0 20 20", class: "checkbox-icon", focusable: "false"
|
|
70
|
+
return (h("svg", { "aria-hidden": "true", width: "20", height: "20", viewBox: "0 0 20 20", class: "checkbox-icon", focusable: "false" },
|
|
73
71
|
h("rect", { x: "1", y: "1", width: "18", height: "18", rx: "3" }),
|
|
74
72
|
(this.checked || this.indeterminate) && this.generateCheckBoxSVGFill()));
|
|
75
73
|
}
|
|
@@ -80,7 +78,7 @@ export class Q2Checkbox {
|
|
|
80
78
|
return (h("polyline", { class: "checkbox-fill checked-fill", points: "5 11 8.5 14.5 15 6" }));
|
|
81
79
|
}
|
|
82
80
|
generateToggleSVG() {
|
|
83
|
-
return (h("div", { class: "toggle-svg"
|
|
81
|
+
return (h("div", { class: "toggle-svg" },
|
|
84
82
|
h("svg", { "aria-hidden": "true", focusable: "false", viewBox: "0 0 46 14", class: "toggle-track" },
|
|
85
83
|
h("rect", { width: "36", height: "14", rx: "7", x: "5" })),
|
|
86
84
|
h("svg", { "aria-hidden": "true", focusable: "false", viewBox: "0 0 30 30", class: "toggle-indicator" },
|
|
@@ -319,6 +317,23 @@ export class Q2Checkbox {
|
|
|
319
317
|
},
|
|
320
318
|
"attribute": "alignment",
|
|
321
319
|
"reflect": true
|
|
320
|
+
},
|
|
321
|
+
"description": {
|
|
322
|
+
"type": "string",
|
|
323
|
+
"mutable": false,
|
|
324
|
+
"complexType": {
|
|
325
|
+
"original": "string",
|
|
326
|
+
"resolved": "string",
|
|
327
|
+
"references": {}
|
|
328
|
+
},
|
|
329
|
+
"required": false,
|
|
330
|
+
"optional": false,
|
|
331
|
+
"docs": {
|
|
332
|
+
"tags": [],
|
|
333
|
+
"text": ""
|
|
334
|
+
},
|
|
335
|
+
"attribute": "description",
|
|
336
|
+
"reflect": true
|
|
322
337
|
}
|
|
323
338
|
}; }
|
|
324
339
|
static get events() { return [{
|
|
@@ -66,205 +66,177 @@ button {
|
|
|
66
66
|
|
|
67
67
|
:host {
|
|
68
68
|
display: block;
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
69
|
+
position: relative;
|
|
70
|
+
padding: var(--tct-checkbox-vertical-padding, var(--t-checkbox-vertical-padding, var(--tct-scale-2, var(--app-scale-2, 10px)))) 0;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.container {
|
|
74
|
+
--comp-checkbox-size: var(--tct-checkbox-size, var(--t-checkbox-size, 20px));
|
|
75
|
+
--comp-checkbox-default-gap: 0 var(--app-scale-2x, 10px);
|
|
76
|
+
--comp-checkbox-tween: var(--tct-tween-1, var(--app-tween-1, 0.2s ease));
|
|
77
|
+
--comp-checkbox-toggle-width: var(--tct-checkbox-toggle-width, var(--t-checkbox-toggle-width, 46px));
|
|
78
|
+
--comp-checkbox-gap: var(--tct-checkbox-gap, var(--t-checkbox-gap, var(--comp-checkbox-default-gap)));
|
|
79
|
+
--comp-checkbox-outer-stroke-color: var(--tct-checkbox-outer-stroke-color, var(--t-checkbox-outer-stroke-color, var(--tct-gray-11, var(--t-gray-11, var(--tct-gray-l1, var(--app-gray-l1, #cccccc))))));
|
|
80
|
+
--comp-checkbox-outer-fill-color: var(--tct-checkbox-outer-fill-color, var(--t-checkbox-outer-fill-color, var(--tct-white, var(--app-white, #ffffff))));
|
|
81
|
+
--comp-checkbox-checked-color: var(--tct-checkbox-check-stroke-color, var(--t-checkbox-check-stroke-color, var(--t-checkbox-fill, var(--tct-gray-5, var(--t-gray-5, var(--tct-gray-d2, var(--app-gray-d2, #404040)))))));
|
|
82
|
+
--comp-control-width: var(--comp-checkbox-size);
|
|
83
|
+
display: grid;
|
|
84
|
+
grid-template-areas: "svg label" "svg description";
|
|
74
85
|
align-items: center;
|
|
75
|
-
--comp-checkbox-
|
|
76
|
-
|
|
77
|
-
var(--tct-gray-11, var(--t-gray-11, var(--tct-gray-l1, var(--app-gray-l1, #cccccc))))
|
|
78
|
-
);
|
|
79
|
-
--comp-checkbox-outer-fill-color: var(
|
|
80
|
-
--tct-checkbox-outer-fill-color,
|
|
81
|
-
var(--tct-white, var(--app-white, #ffffff))
|
|
82
|
-
);
|
|
83
|
-
--comp-checkbox-checked-color: var(
|
|
84
|
-
--tct-checkbox-check-stroke-color,
|
|
85
|
-
var(
|
|
86
|
-
--t-checkbox-fill,
|
|
87
|
-
var(--tct-gray-5, var(--t-gray-5, var(--tct-gray-d2, var(--app-gray-d2, #404040))))
|
|
88
|
-
)
|
|
89
|
-
);
|
|
86
|
+
gap: var(--comp-checkbox-gap);
|
|
87
|
+
grid-template-columns: var(--comp-control-width) 1fr;
|
|
90
88
|
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
89
|
+
:host([type=favorite]) .container {
|
|
90
|
+
--comp-checkbox-favorite-stroke-color: var(--tct-checkbox-favorite-stroke-color, var(--t-checkbox-favorite-stroke-color, var(--t-textA, rgba(77, 77, 77, 0.77))));
|
|
91
|
+
--comp-checkbox-favorite-fill-color: var(--tct-checkbox-favorite-fill-color, var(--t-checkbox-favorite-fill-color, var(--tct-stoplight-warning, var(--const-stoplight-warning, #f0b400))));
|
|
94
92
|
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
height: var(--tct-checkbox-size, 20px);
|
|
98
|
-
width: var(--tct-checkbox-size, 20px);
|
|
99
|
-
border-radius: var(--tct-checkbox-outer-border-radius, var(--tct-border-radius-1, var(--app-border-radius-1, 3px)));
|
|
100
|
-
stroke: var(--comp-checkbox-outer-stroke-color);
|
|
101
|
-
color: var(--comp-checkbox-outer-stroke-color);
|
|
102
|
-
--t-icon-stroke-primary: var(--comp-checkbox-outer-stroke-color);
|
|
103
|
-
stroke-width: var(--tct-checkbox-outer-stroke-width, 2);
|
|
104
|
-
fill: var(--comp-checkbox-outer-fill-color);
|
|
105
|
-
flex-shrink: 0;
|
|
93
|
+
:host([type=toggle]) .container {
|
|
94
|
+
--comp-control-width: var(--comp-checkbox-toggle-width);
|
|
106
95
|
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
96
|
+
:host([alignment=right]) .container, :host([type=toggle]:not([alignment])) .container {
|
|
97
|
+
grid-template-areas: "label svg" "description svg";
|
|
98
|
+
grid-template-columns: 1fr var(--comp-control-width);
|
|
110
99
|
}
|
|
111
100
|
|
|
112
|
-
|
|
113
|
-
|
|
101
|
+
.label-control {
|
|
102
|
+
align-items: center;
|
|
103
|
+
display: flex;
|
|
114
104
|
}
|
|
115
105
|
|
|
116
|
-
.
|
|
117
|
-
|
|
106
|
+
.label-text {
|
|
107
|
+
grid-area: label;
|
|
118
108
|
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
fill: var(--tct-checkbox-checked-outer-fill-color, var(--comp-checkbox-outer-fill-color));
|
|
122
|
-
stroke: var(--tct-checkbox-checked-outer-stroke-color, var(--comp-checkbox-outer-stroke-color));
|
|
109
|
+
:host([description]) .label-text {
|
|
110
|
+
font-weight: var(--tct-checkbox-label-font-weight, var(--t-checkbox-label-font-weight, 600));
|
|
123
111
|
}
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
stroke: var(--tct-checkbox-focused-outer-stroke-color, var(--comp-checkbox-checked-color));
|
|
112
|
+
:host([checked]) .label-text {
|
|
113
|
+
font-weight: var(--tct-checkbox-checked-label-font-weight, var(--t-checkbox-checked-label-font-weight, 600));
|
|
127
114
|
}
|
|
128
115
|
|
|
129
|
-
.
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
stroke-linejoin: round;
|
|
116
|
+
.description-text {
|
|
117
|
+
grid-area: description;
|
|
118
|
+
font-weight: var(--tct-checkbox-description-font-weight, var(--t-checkbox-description-font-weight, 400));
|
|
133
119
|
}
|
|
134
120
|
|
|
135
|
-
|
|
136
|
-
|
|
121
|
+
label {
|
|
122
|
+
cursor: pointer;
|
|
137
123
|
}
|
|
138
124
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
cursor: inherit;
|
|
125
|
+
:host([disabled]),
|
|
126
|
+
:host([group-disabled]) {
|
|
127
|
+
opacity: var(--tct-checkbox-disabled-opacity, var(--t-checkbox-disabled-opacity, var(--tct-disabled-opacity, var(--app-disabled-opacity, 0.4))));
|
|
143
128
|
}
|
|
144
129
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
130
|
+
.checkbox-icon {
|
|
131
|
+
--t-icon-stroke-primary: var(--comp-checkbox-outer-stroke-color);
|
|
132
|
+
width: var(--comp-checkbox-size);
|
|
133
|
+
height: var(--comp-checkbox-size);
|
|
134
|
+
border-radius: var(--tct-checkbox-outer-border-radius, var(--t-checkbox-outer-border-radius, var(--tct-border-radius-1, var(--app-border-radius-1, 3px))));
|
|
135
|
+
stroke: var(--comp-checkbox-outer-stroke-color);
|
|
136
|
+
color: var(--comp-checkbox-outer-stroke-color);
|
|
137
|
+
stroke-width: var(--tct-checkbox-outer-stroke-width, var(--t-checkbox-outer-stroke-width, 2));
|
|
138
|
+
fill: var(--comp-checkbox-outer-fill-color);
|
|
139
|
+
flex-shrink: 0;
|
|
148
140
|
}
|
|
149
|
-
|
|
150
|
-
:
|
|
151
|
-
--
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
);
|
|
155
|
-
--
|
|
156
|
-
--tct-checkbox-favorite-fill-color,
|
|
157
|
-
var(--tct-stoplight-warning, var(--const-stoplight-warning, #f0b400))
|
|
158
|
-
);
|
|
141
|
+
:host([checked]) .checkbox-icon {
|
|
142
|
+
fill: var(--tct-checkbox-checked-outer-fill-color, var(--t-checkbox-checked-outer-fill-color, var(--comp-checkbox-outer-fill-color)));
|
|
143
|
+
stroke: var(--tct-checkbox-checked-outer-stroke-color, var(--t-checkbox-checked-outer-stroke-color, var(--comp-checkbox-outer-stroke-color)));
|
|
144
|
+
}
|
|
145
|
+
:host(:focus-within) .checkbox-icon {
|
|
146
|
+
box-shadow: var(--tct-global-focus, var(--const-global-focus, 0 0 0 2px #33b4ff));
|
|
147
|
+
stroke: var(--tct-checkbox-focused-outer-stroke-color, var(--t-checkbox-focused-outer-stroke-color, var(--comp-checkbox-checked-color)));
|
|
159
148
|
}
|
|
160
|
-
|
|
161
149
|
:host([type=favorite]) .checkbox-icon {
|
|
162
|
-
--tct-icon-stroke-width: var(--tct-checkbox-favorite-stroke-width, 1);
|
|
163
|
-
--tct-icon-stroke-primary: var(--
|
|
164
|
-
|
|
165
|
-
height: var(--tct-checkbox-size, 20px);
|
|
166
|
-
transition: fill var(--tct-tween-2, var(--app-tween-2, 0.4s ease)), color var(--tct-tween-2, var(--app-tween-2, 0.4s ease)), stroke var(--tct-tween-2, var(--app-tween-2, 0.4s ease));
|
|
150
|
+
--tct-icon-stroke-width: var(--tct-checkbox-favorite-stroke-width, var(--t-checkbox-favorite-stroke-width, 1));
|
|
151
|
+
--tct-icon-stroke-primary: var(--comp-checkbox-favorite-stroke-color);
|
|
152
|
+
transition: fill var(--comp-checkbox-tween), color var(--comp-checkbox-tween), stroke var(--comp-checkbox-tween);
|
|
167
153
|
}
|
|
168
|
-
|
|
169
|
-
:
|
|
170
|
-
:
|
|
171
|
-
--tct-icon-stroke-primary: var(--scoped-checkbox-favorite-fill-color);
|
|
172
|
-
--tct-icon-stroke-width: var(--tct-checkbox-favorite-hover-stroke-width, 2);
|
|
154
|
+
:host([type=favorite]:focus-within) .checkbox-icon, :host([type=favorite]:hover) .checkbox-icon {
|
|
155
|
+
--tct-icon-stroke-primary: var(--comp-checkbox-favorite-fill-color);
|
|
156
|
+
--tct-icon-stroke-width: var(--tct-checkbox-favorite-hover-stroke-width, var(--t-checkbox-favorite-hover-stroke-width, 2));
|
|
173
157
|
}
|
|
174
|
-
|
|
175
|
-
:
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
transition: fill var(--tct-tween-1, var(--app-tween-1, 0.2s ease)), color var(--tct-tween-1, var(--app-tween-1, 0.2s ease)), stroke var(--tct-tween-1, var(--app-tween-1, 0.2s ease));
|
|
158
|
+
:host([checked][type=favorite]) .checkbox-icon {
|
|
159
|
+
--tct-icon-stroke-primary: var(--comp-checkbox-favorite-fill-color);
|
|
160
|
+
fill: var(--comp-checkbox-favorite-fill-color);
|
|
161
|
+
transition: fill var(--comp-checkbox-tween), color var(--comp-checkbox-tween), stroke var(--comp-checkbox-tween);
|
|
179
162
|
}
|
|
180
|
-
|
|
181
|
-
:
|
|
182
|
-
:
|
|
183
|
-
--tct-icon-stroke-
|
|
163
|
+
:host([checked][type=favorite]:focus-within) .checkbox-icon, :host([checked][type=favorite]:hover) .checkbox-icon {
|
|
164
|
+
--tct-icon-stroke-primary: var(--comp-checkbox-favorite-stroke-color);
|
|
165
|
+
--tct-icon-fill-primary: var(--comp-checkbox-favorite-fill-color);
|
|
166
|
+
--tct-icon-stroke-width: var(--tct-checkbox-favorite-hover-stroke-width, var(--t-checkbox-favorite-hover-stroke-width, 2));
|
|
184
167
|
}
|
|
185
168
|
|
|
186
|
-
|
|
187
|
-
:
|
|
188
|
-
flex-flow: row-reverse;
|
|
169
|
+
.checkbox-fill {
|
|
170
|
+
stroke: var(--comp-checkbox-checked-color);
|
|
189
171
|
}
|
|
190
172
|
|
|
191
|
-
.
|
|
192
|
-
:
|
|
193
|
-
|
|
194
|
-
|
|
173
|
+
.checked-fill {
|
|
174
|
+
stroke-width: var(--tct-checkbox-check-stroke-width, var(--t-checkbox-check-stroke-width, 2.5));
|
|
175
|
+
stroke-linecap: round;
|
|
176
|
+
stroke-linejoin: round;
|
|
177
|
+
}
|
|
178
|
+
:host([type=toggle]) .checked-fill {
|
|
179
|
+
stroke: var(--tct-checkbox-toggle-icon-stroke, var(--t-checkbox-toggle-icon-stroke, var(--tct-white, var(--app-white, #ffffff))));
|
|
180
|
+
transition: opacity var(--comp-checkbox-tween);
|
|
181
|
+
}
|
|
182
|
+
:host([type=toggle][checked]) .checked-fill {
|
|
183
|
+
stroke: var(--tct-checkbox-toggle-checked-icon-stroke, var(--t-checkbox-toggle-checked-icon-stroke, var(--t-checkbox-text, var(--tct-white, var(--app-white, #ffffff)))));
|
|
195
184
|
}
|
|
196
185
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
cursor: pointer;
|
|
200
|
-
margin-right: 0;
|
|
201
|
-
margin-left: var(--tct-scale-2, var(--app-scale-2, 10px));
|
|
186
|
+
.indeterminate-fill {
|
|
187
|
+
stroke-width: var(--tct-checkbox-indeterminate-stroke-width, var(--t-checkbox-indeterminate-stroke-width, 3.5));
|
|
202
188
|
}
|
|
203
189
|
|
|
204
|
-
|
|
190
|
+
.toggle-svg {
|
|
205
191
|
height: 30px;
|
|
206
|
-
width:
|
|
192
|
+
width: var(--comp-checkbox-toggle-width);
|
|
207
193
|
position: relative;
|
|
208
194
|
}
|
|
209
195
|
|
|
210
|
-
|
|
211
|
-
|
|
196
|
+
.toggle-track,
|
|
197
|
+
.toggle-indicator {
|
|
212
198
|
position: absolute;
|
|
213
199
|
top: 50%;
|
|
214
200
|
transform: translateY(-50%);
|
|
215
201
|
}
|
|
216
202
|
|
|
217
|
-
|
|
218
|
-
fill: var(--tct-checkbox-toggle-track-color, var(--tct-gray-11, var(--t-gray-11, var(--tct-gray-l1, var(--app-gray-l1, #cccccc)))));
|
|
203
|
+
.toggle-track {
|
|
204
|
+
fill: var(--tct-checkbox-toggle-track-color, var(--t-checkbox-toggle-track-color, var(--tct-gray-11, var(--t-gray-11, var(--tct-gray-l1, var(--app-gray-l1, #cccccc))))));
|
|
219
205
|
height: 14px;
|
|
220
206
|
width: 46px;
|
|
221
207
|
}
|
|
222
|
-
|
|
223
|
-
:
|
|
224
|
-
fill: var(--tct-checkbox-toggle-checked-color, var(--comp-checkbox-checked-color));
|
|
208
|
+
:host([checked]) .toggle-track {
|
|
209
|
+
fill: var(--tct-checkbox-toggle-checked-color, var(--t-checkbox-toggle-checked-color, var(--comp-checkbox-checked-color)));
|
|
225
210
|
opacity: 0.5;
|
|
226
211
|
}
|
|
227
212
|
|
|
228
|
-
|
|
229
|
-
transition: left var(--
|
|
213
|
+
.toggle-indicator {
|
|
214
|
+
transition: left var(--comp-checkbox-tween);
|
|
230
215
|
height: 30px;
|
|
231
216
|
width: 30px;
|
|
232
217
|
left: 0;
|
|
233
218
|
border-radius: 50%;
|
|
234
219
|
}
|
|
235
|
-
|
|
236
|
-
:host([type=toggle]) input:checked + label .toggle-indicator {
|
|
220
|
+
:host([checked]) .toggle-indicator {
|
|
237
221
|
left: 21px;
|
|
238
222
|
}
|
|
239
223
|
|
|
240
|
-
|
|
241
|
-
fill: var(--tct-checkbox-toggle-circle-color, var(--tct-gray-9, var(--t-gray-9, var(--tct-gray, var(--app-gray, #999999)))));
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
:host([type=toggle]) input:checked + label .toggle-circle {
|
|
245
|
-
fill: var(--tct-checkbox-toggle-checked-color, var(--comp-checkbox-checked-color));
|
|
224
|
+
.toggle-circle {
|
|
225
|
+
fill: var(--tct-checkbox-toggle-circle-color, var(--t-checkbox-toggle-circle-color, var(--tct-gray-9, var(--t-gray-9, var(--tct-gray, var(--app-gray, #999999))))));
|
|
246
226
|
}
|
|
247
|
-
|
|
248
|
-
:
|
|
249
|
-
:host([type=toggle]) input:not(:checked) + label .on {
|
|
250
|
-
opacity: 0;
|
|
227
|
+
:host([checked]) .toggle-circle {
|
|
228
|
+
fill: var(--tct-checkbox-toggle-checked-color, var(--t-checkbox-toggle-checked-color, var(--comp-checkbox-checked-color)));
|
|
251
229
|
}
|
|
252
|
-
|
|
253
|
-
:
|
|
254
|
-
stroke: var(--tct-checkbox-toggle-checked-color, var(--comp-checkbox-checked-color));
|
|
230
|
+
:host(:focus-within) .toggle-circle {
|
|
231
|
+
stroke: var(--tct-checkbox-toggle-checked-color, var(--t-checkbox-toggle-checked-color, var(--comp-checkbox-checked-color)));
|
|
255
232
|
stroke-width: 10px;
|
|
256
233
|
stroke-opacity: 0.5;
|
|
257
234
|
}
|
|
258
|
-
|
|
259
|
-
:
|
|
260
|
-
stroke: var(--tct-checkbox-toggle-circle-color, var(--tct-gray-9, var(--t-gray-9, var(--tct-gray, var(--app-gray, #999999)))));
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
:host([type=toggle]) .checked-fill {
|
|
264
|
-
stroke: var(--tct-checkbox-toggle-icon-stroke, var(--tct-white, var(--app-white, #ffffff)));
|
|
265
|
-
transition: opacity var(--tct-tween-1, var(--app-tween-1, 0.2s ease));
|
|
235
|
+
:host(:not([checked]):focus-within) .toggle-circle {
|
|
236
|
+
stroke: var(--tct-checkbox-toggle-circle-color, var(--t-checkbox-toggle-circle-color, var(--tct-gray-9, var(--t-gray-9, var(--tct-gray, var(--app-gray, #999999))))));
|
|
266
237
|
}
|
|
267
238
|
|
|
268
|
-
:host([
|
|
269
|
-
|
|
239
|
+
:host([checked]) .off,
|
|
240
|
+
:host(:not([checked])) .on {
|
|
241
|
+
opacity: 0;
|
|
270
242
|
}
|
|
@@ -252,7 +252,7 @@ export class Q2Dropdown {
|
|
|
252
252
|
render() {
|
|
253
253
|
const btnProps = this.toggleButtonProps;
|
|
254
254
|
return (h("click-elsewhere", { class: `dropdown-container${this.dropdownOpen ? ' dropdown-open' : ''}`, onChange: this.onClickElsewhere },
|
|
255
|
-
h("q2-btn", { ref: el => (this.controlElement = el), class: btnProps.className, onClick: this.onToggleClick, onKeyDown: this.onToggleKeydown, fab: btnProps.fab, intent: btnProps.intent, active: btnProps.active, disabled: btnProps.disabled, ariaExpanded: `${!!btnProps.ariaExpanded}`, label: this.hideLabel && this.label ? loc(this.label) : undefined, hideLabel: this.hideLabel, ariaHasPopup: "menu", "test-id": "dropdownButton" }, this.hasCustomButton ? (h("div", { "test-id": "dropdownCustom", class: btnProps.custom ? '' : 'hidden' },
|
|
255
|
+
h("q2-btn", { ref: el => (this.controlElement = el), class: btnProps.className, onClick: this.onToggleClick, onKeyDown: this.onToggleKeydown, fab: btnProps.fab, intent: btnProps.intent, active: btnProps.active, disabled: btnProps.disabled, ariaExpanded: `${!!btnProps.ariaExpanded}`, label: this.hideLabel && this.label ? loc(this.label) : undefined, hideLabel: this.hideLabel, ariaHasPopup: "menu", "test-id": "dropdownButton", block: this.block }, this.hasCustomButton ? (h("div", { "test-id": "dropdownCustom", class: btnProps.custom ? '' : 'hidden' },
|
|
256
256
|
h("slot", { name: "custom-dropdown-button" }))) : (h(Fragment, null,
|
|
257
257
|
this.icon ? h("q2-icon", { type: this.icon }) : ' ',
|
|
258
258
|
this.label && !this.hideLabel && (h("span", { class: "dropdown-button-text" }, loc(this.label)))))),
|
|
@@ -457,6 +457,23 @@ export class Q2Dropdown {
|
|
|
457
457
|
},
|
|
458
458
|
"attribute": "resolved-type",
|
|
459
459
|
"reflect": true
|
|
460
|
+
},
|
|
461
|
+
"block": {
|
|
462
|
+
"type": "boolean",
|
|
463
|
+
"mutable": false,
|
|
464
|
+
"complexType": {
|
|
465
|
+
"original": "boolean",
|
|
466
|
+
"resolved": "boolean",
|
|
467
|
+
"references": {}
|
|
468
|
+
},
|
|
469
|
+
"required": false,
|
|
470
|
+
"optional": false,
|
|
471
|
+
"docs": {
|
|
472
|
+
"tags": [],
|
|
473
|
+
"text": ""
|
|
474
|
+
},
|
|
475
|
+
"attribute": "block",
|
|
476
|
+
"reflect": true
|
|
460
477
|
}
|
|
461
478
|
}; }
|
|
462
479
|
static get states() { return {
|
|
@@ -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, 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 })),
|
|
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, 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 })),
|
|
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" }))),
|
|
@@ -649,6 +649,23 @@ export class Q2Input {
|
|
|
649
649
|
"attribute": "max",
|
|
650
650
|
"reflect": true
|
|
651
651
|
},
|
|
652
|
+
"step": {
|
|
653
|
+
"type": "number",
|
|
654
|
+
"mutable": false,
|
|
655
|
+
"complexType": {
|
|
656
|
+
"original": "number",
|
|
657
|
+
"resolved": "number",
|
|
658
|
+
"references": {}
|
|
659
|
+
},
|
|
660
|
+
"required": false,
|
|
661
|
+
"optional": false,
|
|
662
|
+
"docs": {
|
|
663
|
+
"tags": [],
|
|
664
|
+
"text": ""
|
|
665
|
+
},
|
|
666
|
+
"attribute": "step",
|
|
667
|
+
"reflect": true
|
|
668
|
+
},
|
|
652
669
|
"formatModifier": {
|
|
653
670
|
"type": "string",
|
|
654
671
|
"mutable": false,
|