q2-tecton-elements 1.14.3 → 1.16.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 +8 -3
- 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 +6 -1
- package/dist/collection/components/q2-chart-donut/styles.css +8 -5
- 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 +8 -3
- 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-fd5130c4.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_tecton-production_master}/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_tecton-production_master}/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
|
@@ -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)));
|
|
@@ -136,14 +136,21 @@ button {
|
|
|
136
136
|
|
|
137
137
|
.q2-select-input {
|
|
138
138
|
margin: 0;
|
|
139
|
+
--tct-input-min-height: var(--tct-select-input-min-height, var(--t-select-input-min-height));
|
|
140
|
+
--tct-input-max-height: var(--tct-select-input-max-height, var(--t-select-input-max-height, 100px));
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
::slotted([slot=_selected-display]) {
|
|
144
|
+
width: 100%;
|
|
145
|
+
min-height: var(--comp-selected-display-height, 44px);
|
|
139
146
|
}
|
|
140
147
|
|
|
141
148
|
.custom-display-content {
|
|
142
149
|
position: absolute;
|
|
143
150
|
bottom: 0;
|
|
144
|
-
left: calc(var(--tct-scale-2, var(--app-scale-
|
|
151
|
+
left: calc(var(--tct-scale-2, var(--app-scale-2x, 10px)) + 1px);
|
|
145
152
|
height: 44px;
|
|
146
|
-
width: calc(100% - 34px - var(--tct-scale-3, var(--app-scale-
|
|
153
|
+
width: calc(100% - 34px - var(--tct-scale-3, var(--app-scale-3x, 15px)));
|
|
147
154
|
overflow: hidden;
|
|
148
155
|
cursor: pointer;
|
|
149
156
|
transition: left var(--tct-tween-2, var(--app-tween-1, 0.2s ease));
|
|
@@ -156,11 +163,11 @@ button {
|
|
|
156
163
|
|
|
157
164
|
.is-searchable.is-focused .custom-display-content,
|
|
158
165
|
.is-searchable .custom-display-content:active {
|
|
159
|
-
left: calc(var(--tct-scale-3, var(--app-scale-
|
|
166
|
+
left: calc(var(--tct-scale-3, var(--app-scale-3x, 15px)) + 1px);
|
|
160
167
|
}
|
|
161
168
|
|
|
162
169
|
.has-error .custom-display-content {
|
|
163
|
-
width: calc(100% - 68px - var(--tct-scale-3, var(--app-scale-
|
|
170
|
+
width: calc(100% - 68px - var(--tct-scale-3, var(--app-scale-3x, 15px)));
|
|
164
171
|
}
|
|
165
172
|
|
|
166
173
|
.dropdown-open .q2-select-dropdown {
|
|
@@ -169,14 +176,18 @@ button {
|
|
|
169
176
|
}
|
|
170
177
|
|
|
171
178
|
.multi-select-header {
|
|
172
|
-
padding: var(--tct-scale-1, var(--app-scale-
|
|
179
|
+
padding: var(--tct-scale-1, var(--app-scale-1x, 5px)) var(--tct-scale-2, var(--app-scale-2x, 10px));
|
|
180
|
+
position: sticky;
|
|
181
|
+
top: 0;
|
|
182
|
+
z-index: 5;
|
|
183
|
+
background: var(--app-white);
|
|
173
184
|
}
|
|
174
185
|
|
|
175
186
|
.show-all-options {
|
|
176
|
-
margin-right: var(--tct-scale-1, var(--app-scale-
|
|
177
|
-
margin-left: var(--tct-scale-2, var(--app-scale-
|
|
187
|
+
margin-right: var(--tct-scale-1, var(--app-scale-1x, 5px));
|
|
188
|
+
margin-left: var(--tct-scale-2, var(--app-scale-2x, 10px));
|
|
178
189
|
}
|
|
179
190
|
|
|
180
191
|
.q2-element-dropdown.dropup {
|
|
181
|
-
bottom:
|
|
192
|
+
bottom: var(--comp-dropup-offset);
|
|
182
193
|
}
|
|
@@ -109,6 +109,13 @@ export class Q2Stepper {
|
|
|
109
109
|
return;
|
|
110
110
|
this.focusStep(this.currentStep, true, true);
|
|
111
111
|
}
|
|
112
|
+
statusChangeHandler(event) {
|
|
113
|
+
const index = Array.from(this.allPanes).findIndex(el => event.detail.id === el.id);
|
|
114
|
+
if (index > -1) {
|
|
115
|
+
this.allPanes[index].status = event.detail.status;
|
|
116
|
+
this.renderStepBtn(index);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
112
119
|
////////// GETTER METHODS ////////
|
|
113
120
|
get allPanes() {
|
|
114
121
|
return this.hostElement.querySelectorAll('q2-stepper-pane');
|
|
@@ -159,18 +166,29 @@ export class Q2Stepper {
|
|
|
159
166
|
renderStepBtn(stepIndex) {
|
|
160
167
|
var _a;
|
|
161
168
|
const { allPanes, stepCount, currentStep, lastEnabledStep } = this;
|
|
162
|
-
const { id, label, description } = (_a = allPanes === null || allPanes === void 0 ? void 0 : allPanes[stepIndex]) !== null && _a !== void 0 ? _a : {};
|
|
169
|
+
const { id, label, description, status } = (_a = allPanes === null || allPanes === void 0 ? void 0 : allPanes[stepIndex]) !== null && _a !== void 0 ? _a : {};
|
|
163
170
|
const stepNumber = stepIndex + 1;
|
|
164
171
|
const isCurrentStep = stepNumber === currentStep;
|
|
165
172
|
const labelId = label && `label-${id}`;
|
|
166
173
|
const descriptionId = label && description && `description-${id}`;
|
|
167
174
|
const btnLabel = !label && loc('tecton.element.stepper.number', [`${stepNumber}`, `${stepCount}`]);
|
|
175
|
+
let statusIcon;
|
|
176
|
+
if (status === 'complete')
|
|
177
|
+
statusIcon = 'success';
|
|
178
|
+
else if (status === 'error')
|
|
179
|
+
statusIcon = 'warning';
|
|
180
|
+
const stepClasses = ['step-btn'];
|
|
181
|
+
if (status)
|
|
182
|
+
stepClasses.push(`status-${status}`);
|
|
183
|
+
const isLocked = status === 'locked';
|
|
184
|
+
const disabled = isLocked || stepNumber > lastEnabledStep;
|
|
168
185
|
return (h("li", { role: "presentation" },
|
|
169
|
-
h("button", { class:
|
|
170
|
-
h(
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
186
|
+
h("button", { class: stepClasses.join(' '), type: "button", "aria-labelledby": labelId, "aria-describedBy": descriptionId, "aria-label": btnLabel, "aria-selected": isCurrentStep, "aria-controls": id, "aria-disabled": disabled ? 'true' : null, role: "tab", tabIndex: isCurrentStep ? 0 : -1, onKeyDown: ev => this.onStepKeyDown(ev, stepNumber), onClick: ev => !isLocked && this.onStepClick(ev, stepNumber) },
|
|
187
|
+
h(Fragment, null,
|
|
188
|
+
statusIcon ? (h("div", { class: "step-icon" },
|
|
189
|
+
h("q2-icon", { type: statusIcon }))) : (h("div", { class: "step-bubble" }, stepNumber)),
|
|
190
|
+
label && (h("div", { class: "step-label", id: labelId }, loc(label))),
|
|
191
|
+
label && description && (h("div", { class: "step-description", id: descriptionId }, loc(description))))),
|
|
174
192
|
stepIndex ? h("hr", null) : ''));
|
|
175
193
|
}
|
|
176
194
|
render() {
|
|
@@ -291,5 +309,11 @@ export class Q2Stepper {
|
|
|
291
309
|
"target": undefined,
|
|
292
310
|
"capture": false,
|
|
293
311
|
"passive": false
|
|
312
|
+
}, {
|
|
313
|
+
"name": "statusChange",
|
|
314
|
+
"method": "statusChangeHandler",
|
|
315
|
+
"target": undefined,
|
|
316
|
+
"capture": false,
|
|
317
|
+
"passive": false
|
|
294
318
|
}]; }
|
|
295
319
|
}
|
|
@@ -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 {
|
|
@@ -72,13 +72,18 @@ button {
|
|
|
72
72
|
ul {
|
|
73
73
|
--comp-bullet-bg: var(--tct-stepper-bullet-active-bg, var(--t-stepper-bullet-active-bg, var(--t-primary, #0079c1)));
|
|
74
74
|
--comp-bullet-font-color: var(--tct-stepper-bullet-active-font-color, var(--t-stepper-bullet-active-font-color, var(--t-primary-font-color, #ffffff)));
|
|
75
|
-
--comp-bullet-size: var(--tct-stepper-
|
|
76
|
-
--comp-bullet-gap: var(--tct-stepper-
|
|
75
|
+
--comp-bullet-size: var(--tct-stepper-btn-icon-size, var(--t-stepper-btn-icon-size, 24px));
|
|
76
|
+
--comp-bullet-gap: var(--tct-stepper-btn-gap, var(--t-stepper-btn-gap, var(--app-scale-3x, 15px)));
|
|
77
77
|
--comp-bullet-border-offset: var(--tct-stepper-bullet-border-offset, var(--t-stepper-bullet-border-offset, 4px));
|
|
78
|
-
--comp-bullet-border: var(--tct-stepper-bullet-border, var(--t-stepper-bullet-border, 2px solid var(--t-primary-l3)));
|
|
79
|
-
--comp-bullet-font-size: var(
|
|
78
|
+
--comp-bullet-border: var(--tct-stepper-bullet-border, var(--t-stepper-bullet-border, 2px solid var(--t-primary-l3, #21acff)));
|
|
79
|
+
--comp-bullet-font-size: var-list(var-prefixer(stepper-btn-label-font-size), 16px);
|
|
80
80
|
--comp-step-width: var(--tct-stepper-step-width, var(--t-stepper-step-width, var(--t-stepper-step-width, 80px)));
|
|
81
81
|
--comp-step-gap: var(--tct-stepper-step-gap, var(--t-stepper-step-gap, 5px));
|
|
82
|
+
--comp-top-btn-icon-size: var(--tct-stepper-btn-icon-size, var(--t-stepper-btn-icon-size, 24px));
|
|
83
|
+
--comp-btn-icon-size: var(--comp-top-btn-icon-size);
|
|
84
|
+
--comp-btn-content-gap: var(--tct-stepper-btn-gap, var(--t-stepper-btn-gap, var(--app-scale-3x, 15px)));
|
|
85
|
+
--comp-btn-label-font-size: var-list(var-prefixer(stepper-btn-label-font-size), 16px);
|
|
86
|
+
--comp-btn-label-color: var(--tct-stepper-label-color, var(--t-stepper-label-color, var(--t-text, #4d4d4d)));
|
|
82
87
|
--comp-tween: var(--tct-stepper-tween, var(--t-stepper-tween, var(--app-tween-1, 0.2s ease)));
|
|
83
88
|
overflow-x: auto;
|
|
84
89
|
display: flex;
|
|
@@ -135,31 +140,55 @@ li {
|
|
|
135
140
|
padding: 0;
|
|
136
141
|
transition-property: box-shadow;
|
|
137
142
|
outline: none;
|
|
143
|
+
--comp-active-color: var(--t-primary, #0079c1);
|
|
144
|
+
}
|
|
145
|
+
.step-btn.status-complete {
|
|
146
|
+
--comp-active-color: var(--const-stoplight-success, #0e8a00);
|
|
147
|
+
}
|
|
148
|
+
.step-btn.status-error {
|
|
149
|
+
--comp-active-color: var(--const-stoplight-alert, #c30000);
|
|
138
150
|
}
|
|
139
151
|
.step-btn[aria-disabled] {
|
|
140
|
-
cursor:
|
|
152
|
+
cursor: not-allowed;
|
|
141
153
|
}
|
|
142
154
|
.step-btn[aria-disabled], .step-btn[aria-disabled] + hr {
|
|
143
155
|
--comp-bullet-font-color: var(--tct-stepper-bullet-inactive-font-color, var(--t-stepper-bullet-inactive-font-color, var(--t-text, #4d4d4d)));
|
|
144
156
|
--comp-bullet-bg: var(--tct-stepper-bullet-inactive-bg, var(--t-stepper-bullet-inactive-bg, var(--t-gray-12, #d9d9d9)));
|
|
145
157
|
}
|
|
146
158
|
|
|
159
|
+
.step-icon,
|
|
147
160
|
.step-bubble {
|
|
161
|
+
display: flex;
|
|
162
|
+
justify-content: center;
|
|
163
|
+
align-items: center;
|
|
164
|
+
line-height: 0;
|
|
148
165
|
margin: var(--comp-bullet-gap) auto;
|
|
149
|
-
background: var(--comp-bullet-bg);
|
|
150
166
|
color: var(--comp-bullet-font-color);
|
|
151
|
-
width: var(--comp-
|
|
152
|
-
height: var(--comp-
|
|
153
|
-
min-height: var(--comp-
|
|
167
|
+
width: var(--comp-btn-icon-size);
|
|
168
|
+
height: var(--comp-btn-icon-size);
|
|
169
|
+
min-height: var(--comp-btn-icon-size);
|
|
154
170
|
font-size: var(--comp-bullet-font-size);
|
|
155
171
|
transition: var(--comp-tween);
|
|
156
172
|
transition-property: background, color;
|
|
157
173
|
border-radius: 50%;
|
|
158
174
|
position: relative;
|
|
159
175
|
}
|
|
176
|
+
.step-icon q2-icon,
|
|
177
|
+
.step-bubble q2-icon {
|
|
178
|
+
fill: var(--comp-active-color);
|
|
179
|
+
--tct-icon-stroke-primary: var(--comp-active-color);
|
|
180
|
+
--tct-icon-stroke-secondary: var(--t-base, #ffffff);
|
|
181
|
+
}
|
|
182
|
+
.status-complete .step-icon, .status-error .step-icon,
|
|
183
|
+
.status-complete .step-bubble,
|
|
184
|
+
.status-error .step-bubble {
|
|
185
|
+
background: var(--comp-active-color);
|
|
186
|
+
}
|
|
187
|
+
[aria-selected] .step-icon,
|
|
160
188
|
[aria-selected] .step-bubble {
|
|
161
189
|
font-weight: var(--tct-stepper-bullet-active-font-weight, var(--t-stepper-bullet-active-font-weight, 600));
|
|
162
190
|
}
|
|
191
|
+
[aria-selected] .step-icon:before,
|
|
163
192
|
[aria-selected] .step-bubble:before {
|
|
164
193
|
content: "";
|
|
165
194
|
position: absolute;
|
|
@@ -168,6 +197,11 @@ li {
|
|
|
168
197
|
height: calc(var(--comp-bullet-size) + var(--comp-bullet-border-offset));
|
|
169
198
|
border-radius: 50%;
|
|
170
199
|
border: var(--comp-bullet-border);
|
|
200
|
+
border-color: var(--comp-active-color);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.step-bubble {
|
|
204
|
+
background: var(--comp-bullet-bg);
|
|
171
205
|
}
|
|
172
206
|
|
|
173
207
|
hr {
|
|
@@ -224,12 +258,12 @@ hr {
|
|
|
224
258
|
}
|
|
225
259
|
|
|
226
260
|
.gradient-left {
|
|
227
|
-
background-image: linear-gradient(to
|
|
261
|
+
background-image: linear-gradient(to left, var(--t-base-a0, rgba(255, 255, 255, 0)), var(--t-base-a2, rgba(255, 255, 255, 0.5)) 10%, var(--t-base, #ffffff) 100%);
|
|
228
262
|
left: 0;
|
|
229
263
|
}
|
|
230
264
|
|
|
231
265
|
.gradient-right {
|
|
232
|
-
background-image: linear-gradient(to right, var(--t-base-a0), var(--t-base));
|
|
266
|
+
background-image: linear-gradient(to right, var(--t-base-a0, rgba(255, 255, 255, 0)), var(--t-base-a2, rgba(255, 255, 255, 0.5)) 10%, var(--t-base, #ffffff) 100%);
|
|
233
267
|
right: 0;
|
|
234
268
|
}
|
|
235
269
|
|
|
@@ -243,6 +277,10 @@ hr {
|
|
|
243
277
|
top: calc(50% - 22px);
|
|
244
278
|
z-index: 2;
|
|
245
279
|
}
|
|
280
|
+
.btn-left q2-icon,
|
|
281
|
+
.btn-right q2-icon {
|
|
282
|
+
--tct-icon-stroke-width: 3;
|
|
283
|
+
}
|
|
246
284
|
|
|
247
285
|
.btn-left {
|
|
248
286
|
left: 0;
|
|
@@ -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 {
|
|
@@ -158,20 +158,20 @@ ul ul[aria-hidden=true] {
|
|
|
158
158
|
.step-btn {
|
|
159
159
|
min-height: var(--tct-advanced-stepper-btn-height, var(--t-advanced-stepper-btn-height, 40px));
|
|
160
160
|
font-size: var(--tct-advanced-stepper-btn-font-size, var(--t-advanced-stepper-btn-font-size, 16px));
|
|
161
|
-
--comp-active-color: var(--t-primary);
|
|
161
|
+
--comp-active-color: var(--t-primary, #0079c1);
|
|
162
162
|
}
|
|
163
163
|
.step-btn.status-complete {
|
|
164
|
-
--comp-active-color: var(--const-stoplight-success);
|
|
164
|
+
--comp-active-color: var(--const-stoplight-success, #0e8a00);
|
|
165
165
|
}
|
|
166
166
|
.step-btn.status-error {
|
|
167
|
-
--comp-active-color: var(--const-stoplight-alert);
|
|
167
|
+
--comp-active-color: var(--const-stoplight-alert, #c30000);
|
|
168
168
|
}
|
|
169
169
|
.step-btn.status-locked {
|
|
170
170
|
cursor: not-allowed;
|
|
171
171
|
}
|
|
172
172
|
|
|
173
173
|
.step-child-btn {
|
|
174
|
-
--comp-active-color: var(--t-primary);
|
|
174
|
+
--comp-active-color: var(--t-primary, #0079c1);
|
|
175
175
|
min-height: var(--tct-advanced-stepper-child-btn-height, var(--t-advanced-stepper-child-btn-height, 30px));
|
|
176
176
|
padding-left: var(--tct-advanced-stepper-child-btn-left-padding, var(--t-advanced-stepper-child-btn-left-padding, var(--app-scale-2x, 10px)));
|
|
177
177
|
font-size: var(--tct-advanced-stepper-child-btn-font-size, var(--t-advanced-stepper-child-btn-font-size, 12px));
|
|
@@ -184,8 +184,8 @@ ul ul[aria-hidden=true] {
|
|
|
184
184
|
border-left-color: var(--comp-active-color);
|
|
185
185
|
}
|
|
186
186
|
.step-child-btn.status-error {
|
|
187
|
-
--comp-btn-label-color: var(--const-stoplight-alert);
|
|
188
|
-
--comp-active-color: var(--const-stoplight-alert);
|
|
187
|
+
--comp-btn-label-color: var(--const-stoplight-alert, #c30000);
|
|
188
|
+
--comp-active-color: var(--const-stoplight-alert, #c30000);
|
|
189
189
|
}
|
|
190
190
|
.step-child-btn.status-locked {
|
|
191
191
|
cursor: not-allowed;
|
|
@@ -212,8 +212,8 @@ ul ul[aria-hidden=true] {
|
|
|
212
212
|
|
|
213
213
|
.step-icon,
|
|
214
214
|
.step-bubble {
|
|
215
|
-
background: var(--t-primary);
|
|
216
|
-
color: var(--t-base);
|
|
215
|
+
background: var(--t-primary, #0079c1);
|
|
216
|
+
color: var(--t-base, #ffffff);
|
|
217
217
|
border-radius: 50%;
|
|
218
218
|
}
|
|
219
219
|
.status-complete .step-icon, .status-error .step-icon,
|
|
@@ -223,16 +223,16 @@ ul ul[aria-hidden=true] {
|
|
|
223
223
|
}
|
|
224
224
|
.step-icon q2-icon,
|
|
225
225
|
.step-bubble q2-icon {
|
|
226
|
-
--tct-icon-stroke-secondary: var(--t-base);
|
|
226
|
+
--tct-icon-stroke-secondary: var(--t-base, #ffffff);
|
|
227
227
|
}
|
|
228
228
|
.status-locked .step-icon,
|
|
229
229
|
.status-locked .step-bubble {
|
|
230
|
-
background: var(--t-gray-12);
|
|
231
|
-
color: var(--t-text);
|
|
230
|
+
background: var(--t-gray-12, #d9d9d9);
|
|
231
|
+
color: var(--t-text, #4d4d4d);
|
|
232
232
|
}
|
|
233
233
|
[aria-selected=true] .step-icon,
|
|
234
234
|
[aria-selected=true] .step-bubble {
|
|
235
|
-
box-shadow: 0 0 0 2px var(--t-base), 0 0 0 4px var(--comp-active-color);
|
|
235
|
+
box-shadow: 0 0 0 2px var(--t-base, #ffffff), 0 0 0 4px var(--comp-active-color);
|
|
236
236
|
}
|
|
237
237
|
|
|
238
238
|
.step-bubble {
|
|
@@ -248,7 +248,7 @@ ul ul[aria-hidden=true] {
|
|
|
248
248
|
}
|
|
249
249
|
[aria-selected=true] .step-child-icon q2-icon {
|
|
250
250
|
fill: var(--comp-active-color);
|
|
251
|
-
--tct-icon-stroke-secondary: var(--t-base);
|
|
251
|
+
--tct-icon-stroke-secondary: var(--t-base, #ffffff);
|
|
252
252
|
}
|
|
253
253
|
|
|
254
254
|
.spacer {
|
|
@@ -25,17 +25,21 @@ export class Q2TabContainer {
|
|
|
25
25
|
});
|
|
26
26
|
};
|
|
27
27
|
this.setTabs = () => {
|
|
28
|
-
this.tabs = this.tabPanes.map(({ label, value }) => ({
|
|
28
|
+
this.tabs = this.tabPanes.map(({ label, value, badgeCount, badgeDescription }) => ({
|
|
29
29
|
label: (label && loc(label)) || '',
|
|
30
30
|
value,
|
|
31
|
+
badgeCount,
|
|
32
|
+
badgeDescription,
|
|
31
33
|
}));
|
|
32
34
|
};
|
|
33
35
|
this.onTabClick = (event) => {
|
|
34
|
-
const
|
|
36
|
+
const targetValue = event.target.closest('button[role="tab"]')
|
|
37
|
+
.dataset.value;
|
|
38
|
+
const isAlreadySelected = this.value === targetValue;
|
|
35
39
|
if (isAlreadySelected)
|
|
36
40
|
return;
|
|
37
41
|
this.change.emit({
|
|
38
|
-
value:
|
|
42
|
+
value: targetValue,
|
|
39
43
|
});
|
|
40
44
|
};
|
|
41
45
|
this.onTabKeyDown = (event) => {
|
|
@@ -147,6 +151,9 @@ export class Q2TabContainer {
|
|
|
147
151
|
const index = this.tabs.findIndex(el => el.value === this.selectedTabValue);
|
|
148
152
|
this.moveFocus(index);
|
|
149
153
|
}
|
|
154
|
+
onBadge() {
|
|
155
|
+
this.setTabs();
|
|
156
|
+
}
|
|
150
157
|
///////// Lifecycle Hooks /////////
|
|
151
158
|
componentWillLoad() {
|
|
152
159
|
const observer = new MutationObserver(this.updateTabData);
|
|
@@ -211,7 +218,12 @@ export class Q2TabContainer {
|
|
|
211
218
|
const { label, value } = tab;
|
|
212
219
|
const isSelected = this.selectedTabValue === value;
|
|
213
220
|
return (h("li", { role: "presentation" },
|
|
214
|
-
h("button", { id: `tab-${this.guid}-${index}`, "data-value": value, "test-id": "tabLink", tabIndex: isSelected ? 0 : -1, role: "tab", "aria-selected": isSelected ? 'true' : 'false', "aria-controls": `tab-pane-${this.guid}-${index}`, onClick: this.onTabClick, onKeyDown: this.onTabKeyDown }, label)));
|
|
221
|
+
h("button", { id: `tab-${this.guid}-${index}`, "data-value": value, "test-id": "tabLink", tabIndex: isSelected ? 0 : -1, role: "tab", "aria-selected": isSelected ? 'true' : 'false', "aria-controls": `tab-pane-${this.guid}-${index}`, onClick: this.onTabClick, onKeyDown: this.onTabKeyDown }, tab.badgeCount === undefined ? label : this.generateTabWithBadge(tab, isSelected))));
|
|
222
|
+
}
|
|
223
|
+
generateTabWithBadge(tab, isSelected) {
|
|
224
|
+
return (h("div", { class: "tab-pane-badge", "aria-label": `${tab.label}, ${tab.badgeCount} ${tab.badgeDescription || loc('tecton.element.tab.pane.new')}` },
|
|
225
|
+
tab.label,
|
|
226
|
+
h("q2-badge", { value: tab.badgeCount, theme: isSelected ? 'primary' : undefined })));
|
|
215
227
|
}
|
|
216
228
|
static get is() { return "q2-tab-container"; }
|
|
217
229
|
static get encapsulation() { return "shadow"; }
|
|
@@ -374,5 +386,11 @@ export class Q2TabContainer {
|
|
|
374
386
|
"target": undefined,
|
|
375
387
|
"capture": false,
|
|
376
388
|
"passive": false
|
|
389
|
+
}, {
|
|
390
|
+
"name": "badge",
|
|
391
|
+
"method": "onBadge",
|
|
392
|
+
"target": undefined,
|
|
393
|
+
"capture": false,
|
|
394
|
+
"passive": false
|
|
377
395
|
}]; }
|
|
378
396
|
}
|
|
@@ -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,10 +79,10 @@ button {
|
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
ul {
|
|
82
|
-
--comp-container-padding: var(--tct-scale-1, var(--app-scale-
|
|
82
|
+
--comp-container-padding: var(--tct-scale-1, var(--app-scale-1x, 5px)) var(--tct-scale-1, var(--app-scale-1x, 5px)) 0;
|
|
83
83
|
padding: var(--tct-tab-container-padding, var(--t-tab-container-padding, var(--comp-container-padding)));
|
|
84
84
|
display: flex;
|
|
85
|
-
gap: var(--tct-tab-gap, var(--t-tab-gap, var(--tct-scale-1, var(--app-scale-
|
|
85
|
+
gap: var(--tct-tab-gap, var(--t-tab-gap, var(--tct-scale-1, var(--app-scale-1x, 5px))));
|
|
86
86
|
list-style: none;
|
|
87
87
|
border-bottom: 1px solid var(--tct-tab-container-border-color, var(--t-tab-container-border-color, var(--tct-gray-11, var(--t-gray-11, var(--tct-gray-l1, var(--app-gray-l1, #cccccc))))));
|
|
88
88
|
overflow-x: auto;
|
|
@@ -118,14 +118,14 @@ li button {
|
|
|
118
118
|
width: var(--tct-tab-width, var(--t-tab-width, 100%));
|
|
119
119
|
text-align: var(--tct-tab-text-align, var(--t-tab-text-align, center));
|
|
120
120
|
text-decoration: var(--tct-tab-text-decoration, var(--t-tab-text-decoration, none));
|
|
121
|
-
padding: var(--tct-tab-padding, var(--t-tab-padding, var(--tct-scale-2, var(--app-scale-
|
|
121
|
+
padding: var(--tct-tab-padding, var(--t-tab-padding, var(--tct-scale-2, var(--app-scale-2x, 10px))));
|
|
122
122
|
color: var(--tct-tab-inactive-color, var(--t-tab-inactive-color, inherit));
|
|
123
123
|
font-size: var(--tct-tab-font-size, var(--t-tab-font-size, 17px));
|
|
124
124
|
display: block;
|
|
125
125
|
transition: color var(--tct-tween-2, var(--app-tween-2, 0.4s ease)), border-color var(--tct-tween-1, var(--app-tween-1, 0.2s ease));
|
|
126
126
|
}
|
|
127
127
|
:host([type=section]) li button {
|
|
128
|
-
--comp-tab-section-padding: var(--tct-scale-2, var(--app-scale-
|
|
128
|
+
--comp-tab-section-padding: var(--tct-scale-2, var(--app-scale-2x, 10px)) var(--tct-scale-1, var(--app-scale-1x, 5px));
|
|
129
129
|
font-size: inherit;
|
|
130
130
|
padding: var(--tct-tab-section-padding, var(--t-tab-section-padding, var(--comp-tab-section-padding)));
|
|
131
131
|
}
|
|
@@ -149,14 +149,14 @@ li button[aria-selected=true] {
|
|
|
149
149
|
}
|
|
150
150
|
@media screen and (max-width: 767px) {
|
|
151
151
|
li button {
|
|
152
|
-
--comp-tab-padding: var(--tct-scale-2, var(--app-scale-
|
|
152
|
+
--comp-tab-padding: var(--tct-scale-2, var(--app-scale-2x, 10px)) var(--tct-scale-1, var(--app-scale-1x, 5px));
|
|
153
153
|
font-size: inherit;
|
|
154
154
|
padding: var(--tct-tab-padding, var(--t-tab-padding, var(--comp-tab-padding)));
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
157
|
|
|
158
158
|
.tab-content {
|
|
159
|
-
--comp-tab-content-padding: var(--tct-scale-2, var(--app-scale-
|
|
159
|
+
--comp-tab-content-padding: var(--tct-scale-2, var(--app-scale-2x, 10px)) 0;
|
|
160
160
|
padding: var(--tct-tab-content-padding, var(--t-tab-content-padding, var(--comp-tab-content-padding)));
|
|
161
161
|
}
|
|
162
162
|
.tab-content:focus {
|
|
@@ -174,12 +174,12 @@ li button[aria-selected=true] {
|
|
|
174
174
|
}
|
|
175
175
|
|
|
176
176
|
.gradient-left {
|
|
177
|
-
background-image: linear-gradient(to
|
|
177
|
+
background-image: linear-gradient(to left, var(--t-base-a0), var(--t-base-a2) 10%, var(--t-base) 100%);
|
|
178
178
|
left: 0;
|
|
179
179
|
}
|
|
180
180
|
|
|
181
181
|
.gradient-right {
|
|
182
|
-
background-image: linear-gradient(to right, var(--t-base-a0), var(--t-base));
|
|
182
|
+
background-image: linear-gradient(to right, var(--t-base-a0), var(--t-base-a2) 10%, var(--t-base) 100%);
|
|
183
183
|
right: 0;
|
|
184
184
|
}
|
|
185
185
|
|
|
@@ -193,6 +193,10 @@ li button[aria-selected=true] {
|
|
|
193
193
|
top: calc(50% - 22px);
|
|
194
194
|
z-index: 2;
|
|
195
195
|
}
|
|
196
|
+
.btn-left q2-icon,
|
|
197
|
+
.btn-right q2-icon {
|
|
198
|
+
--tct-icon-stroke-width: 3;
|
|
199
|
+
}
|
|
196
200
|
|
|
197
201
|
.btn-left {
|
|
198
202
|
left: 0;
|
|
@@ -200,4 +204,14 @@ li button[aria-selected=true] {
|
|
|
200
204
|
|
|
201
205
|
.btn-right {
|
|
202
206
|
right: 0;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.tab-pane-badge {
|
|
210
|
+
display: flex;
|
|
211
|
+
justify-content: space-between;
|
|
212
|
+
align-items: center;
|
|
213
|
+
}
|
|
214
|
+
.tab-pane-badge q2-badge {
|
|
215
|
+
margin-left: 5px;
|
|
216
|
+
margin-right: 5px;
|
|
203
217
|
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import { Component, Prop, h } from '@stencil/core';
|
|
1
|
+
import { Component, Prop, Event, Watch, h } from '@stencil/core';
|
|
2
2
|
export class Q2TabPane {
|
|
3
|
+
badgeObserver() {
|
|
4
|
+
this.badge.emit();
|
|
5
|
+
}
|
|
3
6
|
render() {
|
|
4
7
|
return (h("div", { id: `tab-pane-${this.guid}-${this.index}`, class: `tab-pane${this.selected ? '' : ' hidden'}`, role: "tabpanel", tabindex: "-1", "aria-hidden": `${!this.selected}`, "aria-labelledby": `tab-${this.guid}-${this.index}` },
|
|
5
8
|
h("slot", null)));
|
|
@@ -81,6 +84,40 @@ export class Q2TabPane {
|
|
|
81
84
|
"attribute": "selected",
|
|
82
85
|
"reflect": true
|
|
83
86
|
},
|
|
87
|
+
"badgeCount": {
|
|
88
|
+
"type": "number",
|
|
89
|
+
"mutable": false,
|
|
90
|
+
"complexType": {
|
|
91
|
+
"original": "number",
|
|
92
|
+
"resolved": "number",
|
|
93
|
+
"references": {}
|
|
94
|
+
},
|
|
95
|
+
"required": false,
|
|
96
|
+
"optional": false,
|
|
97
|
+
"docs": {
|
|
98
|
+
"tags": [],
|
|
99
|
+
"text": ""
|
|
100
|
+
},
|
|
101
|
+
"attribute": "badge-count",
|
|
102
|
+
"reflect": true
|
|
103
|
+
},
|
|
104
|
+
"badgeDescription": {
|
|
105
|
+
"type": "string",
|
|
106
|
+
"mutable": false,
|
|
107
|
+
"complexType": {
|
|
108
|
+
"original": "string",
|
|
109
|
+
"resolved": "string",
|
|
110
|
+
"references": {}
|
|
111
|
+
},
|
|
112
|
+
"required": false,
|
|
113
|
+
"optional": false,
|
|
114
|
+
"docs": {
|
|
115
|
+
"tags": [],
|
|
116
|
+
"text": ""
|
|
117
|
+
},
|
|
118
|
+
"attribute": "badge-description",
|
|
119
|
+
"reflect": true
|
|
120
|
+
},
|
|
84
121
|
"index": {
|
|
85
122
|
"type": "number",
|
|
86
123
|
"mutable": false,
|
|
@@ -116,4 +153,24 @@ export class Q2TabPane {
|
|
|
116
153
|
"reflect": false
|
|
117
154
|
}
|
|
118
155
|
}; }
|
|
156
|
+
static get events() { return [{
|
|
157
|
+
"method": "badge",
|
|
158
|
+
"name": "badge",
|
|
159
|
+
"bubbles": true,
|
|
160
|
+
"cancelable": true,
|
|
161
|
+
"composed": true,
|
|
162
|
+
"docs": {
|
|
163
|
+
"tags": [],
|
|
164
|
+
"text": ""
|
|
165
|
+
},
|
|
166
|
+
"complexType": {
|
|
167
|
+
"original": "boolean",
|
|
168
|
+
"resolved": "boolean",
|
|
169
|
+
"references": {}
|
|
170
|
+
}
|
|
171
|
+
}]; }
|
|
172
|
+
static get watchers() { return [{
|
|
173
|
+
"propName": "badgeCount",
|
|
174
|
+
"methodName": "badgeObserver"
|
|
175
|
+
}]; }
|
|
119
176
|
}
|
|
@@ -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 {
|
|
@@ -84,11 +84,11 @@ button {
|
|
|
84
84
|
--comp-tag-color: var(--t-primary-text, #ffffff);
|
|
85
85
|
}
|
|
86
86
|
:host([theme=secondary]) .tag-wrapper {
|
|
87
|
-
--comp-tag-background: var(--t-secondary-l5, #
|
|
87
|
+
--comp-tag-background: var(--t-secondary-l5, #d9e1e6);
|
|
88
88
|
--comp-tag-color: var(--t-secondary-text, #000000);
|
|
89
89
|
}
|
|
90
90
|
:host([theme=tertiary]) .tag-wrapper {
|
|
91
|
-
--comp-tag-background: var(--t-tertiary-l5, #
|
|
91
|
+
--comp-tag-background: var(--t-tertiary-l5, #f4fafe);
|
|
92
92
|
--comp-tag-color: var(--t-tertiary-text, #000000);
|
|
93
93
|
}
|
|
94
94
|
|
|
@@ -106,9 +106,7 @@ button {
|
|
|
106
106
|
|
|
107
107
|
.btn-wrapper {
|
|
108
108
|
--comp-tag-clickable-size: var(--tct-tag-clickable-size, var(--t-tag-clickable-size, 44px));
|
|
109
|
-
--comp-tag-btn-offset: calc(
|
|
110
|
-
calc(calc(var(--comp-tag-clickable-size) - var(--comp-tag-btn-size)) / 2) * -1
|
|
111
|
-
);
|
|
109
|
+
--comp-tag-btn-offset: calc(calc(calc(var(--comp-tag-clickable-size) - var(--comp-tag-btn-size)) / 2) * -1);
|
|
112
110
|
height: var(--comp-tag-clickable-size);
|
|
113
111
|
width: var(--comp-tag-clickable-size);
|
|
114
112
|
display: flex;
|