q2-tecton-elements 1.18.0 → 1.19.1
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-e2bc9ee9.js → icons-afbdf88a.js} +1 -1
- package/dist/cjs/{index-eccd5617.js → index-3518c78c.js} +1 -1
- package/dist/cjs/{index-0128397d.js → index-734296a7.js} +476 -271
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/q2-avatar.cjs.entry.js +9 -6
- package/dist/cjs/q2-badge_2.cjs.entry.js +46 -7
- package/dist/cjs/q2-btn_2.cjs.entry.js +30 -5
- package/dist/cjs/q2-calendar.cjs.entry.js +102 -63
- package/dist/cjs/q2-card.cjs.entry.js +17 -6
- package/dist/cjs/q2-carousel-pane.cjs.entry.js +7 -3
- package/dist/cjs/q2-carousel.cjs.entry.js +196 -285
- package/dist/cjs/q2-chart-donut.cjs.entry.js +583 -504
- package/dist/cjs/q2-checkbox-group.cjs.entry.js +9 -7
- package/dist/cjs/q2-checkbox.cjs.entry.js +17 -4
- package/dist/cjs/q2-dropdown-item.cjs.entry.js +9 -3
- package/dist/cjs/q2-dropdown.cjs.entry.js +16 -5
- package/dist/cjs/q2-editable-field.cjs.entry.js +16 -6
- package/dist/cjs/q2-icon.cjs.entry.js +6 -4
- package/dist/cjs/q2-loading-element.cjs.entry.js +6 -2
- package/dist/cjs/q2-loc.cjs.entry.js +5 -3
- package/dist/cjs/q2-message.cjs.entry.js +4 -3
- package/dist/cjs/q2-month-picker.cjs.entry.js +9 -7
- package/dist/cjs/q2-optgroup.cjs.entry.js +6 -5
- package/dist/cjs/q2-option-list_2.cjs.entry.js +21 -7
- package/dist/cjs/q2-option.cjs.entry.js +12 -2
- package/dist/cjs/q2-pagination.cjs.entry.js +11 -3
- package/dist/cjs/q2-pill.cjs.entry.js +25 -7
- package/dist/cjs/q2-radio-group.cjs.entry.js +13 -6
- package/dist/cjs/q2-radio.cjs.entry.js +13 -8
- package/dist/cjs/q2-section.cjs.entry.js +44 -11
- package/dist/cjs/q2-select.cjs.entry.js +26 -17
- package/dist/cjs/q2-stepper-pane.cjs.entry.js +8 -3
- package/dist/cjs/q2-stepper-vertical.cjs.entry.js +5 -4
- package/dist/cjs/q2-stepper.cjs.entry.js +9 -7
- package/dist/cjs/q2-tab-container.cjs.entry.js +14 -9
- package/dist/cjs/q2-tab-pane.cjs.entry.js +10 -2
- package/dist/cjs/q2-tag.cjs.entry.js +20 -7
- package/dist/cjs/q2-tecton-elements.cjs.js +3 -3
- package/dist/cjs/q2-textarea.cjs.entry.js +20 -4
- package/dist/cjs/q2-tooltip.cjs.entry.js +9 -3
- package/dist/cjs/{shapes-c1a60d46.js → shapes-aad2b98f.js} +1 -1
- package/dist/cjs/tecton-tab-pane.cjs.entry.js +17 -2
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/click-elsewhere/index.js +18 -17
- package/dist/collection/components/q2-avatar/index.js +100 -92
- package/dist/collection/components/q2-avatar/styles.css +1 -1
- package/dist/collection/components/q2-badge/index.js +119 -111
- package/dist/collection/components/q2-badge/styles.css +1 -1
- package/dist/collection/components/q2-btn/index.js +349 -322
- package/dist/collection/components/q2-btn/styles.css +7 -7
- package/dist/collection/components/q2-calendar/index.js +578 -552
- package/dist/collection/components/q2-calendar/q2-month-picker.css +1 -1
- package/dist/collection/components/q2-calendar/q2-month-picker.js +112 -116
- package/dist/collection/components/q2-calendar/styles.css +1 -1
- package/dist/collection/components/q2-card/index.js +262 -244
- package/dist/collection/components/q2-card/styles.css +9 -2
- package/dist/collection/components/q2-carousel/index.js +249 -253
- package/dist/collection/components/q2-carousel/styles.css +1 -1
- package/dist/collection/components/q2-carousel-pane/index.js +108 -96
- package/dist/collection/components/q2-carousel-pane/styles.css +5 -4
- package/dist/collection/components/q2-chart-donut/index.js +350 -334
- package/dist/collection/components/q2-chart-donut/styles.css +3 -3
- package/dist/collection/components/q2-checkbox/index.js +296 -287
- package/dist/collection/components/q2-checkbox/styles.css +2 -2
- package/dist/collection/components/q2-checkbox-group/index.js +156 -152
- package/dist/collection/components/q2-checkbox-group/styles.css +1 -1
- package/dist/collection/components/q2-dropdown/index.js +255 -240
- package/dist/collection/components/q2-dropdown/styles.css +1 -1
- package/dist/collection/components/q2-dropdown-item/index.js +134 -123
- package/dist/collection/components/q2-dropdown-item/styles.css +12 -10
- package/dist/collection/components/q2-editable-field/index.js +300 -293
- package/dist/collection/components/q2-editable-field/styles.css +1 -1
- package/dist/collection/components/q2-icon/icons.js +358 -2158
- package/dist/collection/components/q2-icon/index.js +59 -49
- package/dist/collection/components/q2-icon/styles.css +1 -1
- package/dist/collection/components/q2-input/index.js +729 -705
- package/dist/collection/components/q2-input/styles.css +2 -2
- package/dist/collection/components/q2-loading/index.js +143 -132
- package/dist/collection/components/q2-loading/skeleton/q2-loading-element/index.js +85 -74
- package/dist/collection/components/q2-loading/skeleton/shapes.js +23 -36
- package/dist/collection/components/q2-loading/styles.css +1 -1
- package/dist/collection/components/q2-loc/index.js +49 -39
- package/dist/collection/components/q2-loc/styles.css +1 -1
- package/dist/collection/components/q2-message/index.js +101 -92
- package/dist/collection/components/q2-message/styles.css +1 -1
- package/dist/collection/components/q2-optgroup/index.js +64 -56
- package/dist/collection/components/q2-optgroup/styles.css +1 -1
- package/dist/collection/components/q2-option/index.js +244 -229
- package/dist/collection/components/q2-option/styles.css +5 -1
- package/dist/collection/components/q2-option-list/index.js +291 -270
- package/dist/collection/components/q2-option-list/styles.css +1 -1
- package/dist/collection/components/q2-pagination/index.js +183 -179
- package/dist/collection/components/q2-pagination/styles.css +1 -1
- package/dist/collection/components/q2-pill/index.js +260 -208
- package/dist/collection/components/q2-pill/styles.css +1 -1
- package/dist/collection/components/q2-popover/index.js +169 -151
- package/dist/collection/components/q2-popover/styles.css +2 -2
- package/dist/collection/components/q2-radio/index.js +233 -224
- package/dist/collection/components/q2-radio/styles.css +3 -3
- package/dist/collection/components/q2-radio-group/index.js +252 -244
- package/dist/collection/components/q2-radio-group/styles.css +1 -1
- package/dist/collection/components/q2-section/index.js +169 -131
- package/dist/collection/components/q2-section/styles.css +8 -6
- package/dist/collection/components/q2-select/index.js +393 -381
- package/dist/collection/components/q2-select/styles.css +1 -1
- package/dist/collection/components/q2-stepper/index.js +124 -126
- package/dist/collection/components/q2-stepper/styles.css +2 -1
- package/dist/collection/components/q2-stepper-pane/index.js +165 -149
- package/dist/collection/components/q2-stepper-pane/styles.css +1 -1
- package/dist/collection/components/q2-stepper-vertical/index.js +86 -85
- package/dist/collection/components/q2-stepper-vertical/styles.css +1 -1
- package/dist/collection/components/q2-tab-container/index.js +189 -184
- package/dist/collection/components/q2-tab-container/styles.css +1 -1
- package/dist/collection/components/q2-tab-pane/index.js +185 -166
- package/dist/collection/components/q2-tab-pane/styles.css +1 -1
- package/dist/collection/components/q2-tag/index.js +168 -116
- package/dist/collection/components/q2-tag/styles.css +1 -1
- package/dist/collection/components/q2-textarea/index.js +344 -327
- package/dist/collection/components/q2-textarea/styles.css +2 -2
- package/dist/collection/components/q2-tooltip/index.js +147 -133
- package/dist/collection/components/q2-tooltip/styles.css +1 -1
- package/dist/collection/components/tecton-tab-pane/index.js +287 -266
- package/dist/collection/components/tecton-tab-pane/styles.css +1 -1
- package/dist/collection/utils/index.js +2 -6
- package/dist/esm/click-elsewhere.entry.js +1 -1
- package/dist/esm/{icons-ed54e307.js → icons-78da5dd2.js} +1 -1
- package/dist/esm/{index-eac6b89e.js → index-9c591682.js} +1 -1
- package/dist/esm/{index-6d5ed7cc.js → index-bb1c8c7f.js} +476 -271
- package/dist/esm/loader.js +3 -3
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm/q2-avatar.entry.js +9 -6
- package/dist/esm/q2-badge_2.entry.js +46 -7
- package/dist/esm/q2-btn_2.entry.js +30 -5
- package/dist/esm/q2-calendar.entry.js +102 -63
- package/dist/esm/q2-card.entry.js +17 -6
- package/dist/esm/q2-carousel-pane.entry.js +7 -3
- package/dist/esm/q2-carousel.entry.js +196 -285
- package/dist/esm/q2-chart-donut.entry.js +583 -504
- package/dist/esm/q2-checkbox-group.entry.js +9 -7
- package/dist/esm/q2-checkbox.entry.js +17 -4
- package/dist/esm/q2-dropdown-item.entry.js +9 -3
- package/dist/esm/q2-dropdown.entry.js +16 -5
- package/dist/esm/q2-editable-field.entry.js +16 -6
- package/dist/esm/q2-icon.entry.js +6 -4
- package/dist/esm/q2-loading-element.entry.js +6 -2
- package/dist/esm/q2-loc.entry.js +5 -3
- package/dist/esm/q2-message.entry.js +4 -3
- package/dist/esm/q2-month-picker.entry.js +9 -7
- package/dist/esm/q2-optgroup.entry.js +6 -5
- package/dist/esm/q2-option-list_2.entry.js +21 -7
- package/dist/esm/q2-option.entry.js +12 -2
- package/dist/esm/q2-pagination.entry.js +11 -3
- package/dist/esm/q2-pill.entry.js +25 -7
- package/dist/esm/q2-radio-group.entry.js +13 -6
- package/dist/esm/q2-radio.entry.js +13 -8
- package/dist/esm/q2-section.entry.js +44 -11
- package/dist/esm/q2-select.entry.js +26 -17
- package/dist/esm/q2-stepper-pane.entry.js +8 -3
- package/dist/esm/q2-stepper-vertical.entry.js +5 -4
- package/dist/esm/q2-stepper.entry.js +9 -7
- package/dist/esm/q2-tab-container.entry.js +14 -9
- package/dist/esm/q2-tab-pane.entry.js +10 -2
- package/dist/esm/q2-tag.entry.js +20 -7
- package/dist/esm/q2-tecton-elements.js +3 -3
- package/dist/esm/q2-textarea.entry.js +20 -4
- package/dist/esm/q2-tooltip.entry.js +9 -3
- package/dist/esm/{shapes-c32e3ba2.js → shapes-62b8a431.js} +1 -1
- package/dist/esm/tecton-tab-pane.entry.js +17 -2
- package/dist/loader/package.json +1 -0
- package/dist/q2-tecton-elements/p-0ba564b1.entry.js +1 -0
- package/dist/q2-tecton-elements/p-0fad9c5a.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-73154834.js → p-13a639cf.js} +1 -1
- package/dist/q2-tecton-elements/p-16c11d74.entry.js +1 -0
- package/dist/q2-tecton-elements/p-17e0cbf1.entry.js +1 -0
- package/dist/q2-tecton-elements/p-2c9b1308.entry.js +1 -0
- package/dist/q2-tecton-elements/p-2e832e42.entry.js +1 -0
- package/dist/q2-tecton-elements/p-315fdb74.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-c608e3c9.entry.js → p-444415b5.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-4d700630.entry.js +1 -0
- package/dist/q2-tecton-elements/p-54e792bd.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-80014da0.js → p-5e374fbd.js} +1 -1
- package/dist/q2-tecton-elements/p-5f064e1e.entry.js +39 -0
- package/dist/q2-tecton-elements/p-692f2d09.entry.js +1 -0
- package/dist/q2-tecton-elements/p-6e6b5b80.entry.js +1 -0
- package/dist/q2-tecton-elements/p-74136b15.entry.js +1 -0
- package/dist/q2-tecton-elements/p-7e8f43d1.entry.js +1 -0
- package/dist/q2-tecton-elements/p-8e380edf.entry.js +1 -0
- package/dist/q2-tecton-elements/p-926a3e80.js +2 -0
- package/dist/q2-tecton-elements/{p-93c00587.js → p-92e1faf8.js} +1 -1
- package/dist/q2-tecton-elements/p-9772b15f.entry.js +1 -0
- package/dist/q2-tecton-elements/p-97aa8423.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-17cffd7d.entry.js → p-a987402e.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-aaf42539.entry.js +1 -0
- package/dist/q2-tecton-elements/p-ac674c20.entry.js +1 -0
- package/dist/q2-tecton-elements/p-b8b00394.entry.js +1 -0
- package/dist/q2-tecton-elements/p-c444a60b.entry.js +1 -0
- package/dist/q2-tecton-elements/p-c6c489fe.entry.js +1 -0
- package/dist/q2-tecton-elements/p-ce015552.entry.js +1 -0
- package/dist/q2-tecton-elements/p-d464fccc.entry.js +1 -0
- package/dist/q2-tecton-elements/p-de164483.entry.js +1 -0
- package/dist/q2-tecton-elements/p-df91e954.entry.js +1 -0
- package/dist/q2-tecton-elements/p-e6d26f39.entry.js +1 -0
- package/dist/q2-tecton-elements/p-e8e113c2.entry.js +1 -0
- package/dist/q2-tecton-elements/p-f1d06917.entry.js +1 -0
- package/dist/q2-tecton-elements/p-f219fe9d.entry.js +1 -0
- package/dist/q2-tecton-elements/p-f800fd1e.entry.js +1 -0
- package/dist/q2-tecton-elements/p-fb37e67e.entry.js +1 -0
- package/dist/q2-tecton-elements/p-fc134a5d.entry.js +1 -0
- package/dist/q2-tecton-elements/p-fe88e979.entry.js +1 -0
- package/dist/q2-tecton-elements/p-ffb48ccc.entry.js +1 -0
- package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
- package/dist/test/helpers.js +6 -0
- package/dist/types/components/q2-pill/index.d.ts +3 -0
- package/dist/types/components/q2-section/index.d.ts +3 -0
- package/dist/types/components/q2-tag/index.d.ts +3 -0
- package/dist/types/components.d.ts +154 -38
- package/dist/types/stencil-public-runtime.d.ts +20 -4
- package/dist/types/workspace/workspace/{Tecton_tecton-production_master → tecton-production_release_1.19.x}/packages/q2-tecton-elements/.stencil/test/helpers.d.ts +2 -0
- package/package.json +6 -6
- package/dist/q2-tecton-elements/p-02c1b7fd.entry.js +0 -1
- package/dist/q2-tecton-elements/p-04c743f2.entry.js +0 -1
- package/dist/q2-tecton-elements/p-07dc509c.entry.js +0 -1
- package/dist/q2-tecton-elements/p-12caa479.entry.js +0 -1
- package/dist/q2-tecton-elements/p-160dd1c2.entry.js +0 -1
- package/dist/q2-tecton-elements/p-1a3de749.entry.js +0 -1
- package/dist/q2-tecton-elements/p-2061c3fd.entry.js +0 -1
- package/dist/q2-tecton-elements/p-2a217895.entry.js +0 -1
- package/dist/q2-tecton-elements/p-2b94ae62.entry.js +0 -1
- package/dist/q2-tecton-elements/p-2e54f9a0.entry.js +0 -1
- package/dist/q2-tecton-elements/p-375569ff.entry.js +0 -1
- package/dist/q2-tecton-elements/p-3766cc6c.entry.js +0 -1
- package/dist/q2-tecton-elements/p-3eda2714.entry.js +0 -1
- package/dist/q2-tecton-elements/p-421af42d.entry.js +0 -1
- package/dist/q2-tecton-elements/p-4c53713d.entry.js +0 -1
- package/dist/q2-tecton-elements/p-4fd405f5.entry.js +0 -1
- package/dist/q2-tecton-elements/p-509c8924.entry.js +0 -1
- package/dist/q2-tecton-elements/p-55dc3dc1.entry.js +0 -1
- package/dist/q2-tecton-elements/p-5fffb28a.entry.js +0 -1
- package/dist/q2-tecton-elements/p-612e9974.entry.js +0 -1
- package/dist/q2-tecton-elements/p-64ca8c59.entry.js +0 -1
- package/dist/q2-tecton-elements/p-796c2bb5.entry.js +0 -1
- package/dist/q2-tecton-elements/p-86887866.entry.js +0 -1
- package/dist/q2-tecton-elements/p-9204c34d.entry.js +0 -1
- package/dist/q2-tecton-elements/p-9725d55f.entry.js +0 -1
- package/dist/q2-tecton-elements/p-a0fa416d.entry.js +0 -39
- package/dist/q2-tecton-elements/p-bd83e8e2.entry.js +0 -1
- package/dist/q2-tecton-elements/p-be0f2539.entry.js +0 -1
- package/dist/q2-tecton-elements/p-c05b0b55.entry.js +0 -1
- package/dist/q2-tecton-elements/p-c5691700.js +0 -1
- package/dist/q2-tecton-elements/p-d826d7ad.entry.js +0 -1
- package/dist/q2-tecton-elements/p-d9e9340c.entry.js +0 -1
- package/dist/q2-tecton-elements/p-e5757895.entry.js +0 -1
- package/dist/q2-tecton-elements/p-e68c9ef0.entry.js +0 -1
- package/dist/q2-tecton-elements/p-eb33bda4.entry.js +0 -1
- package/dist/q2-tecton-elements/p-f319549d.entry.js +0 -1
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { h, Fragment, } from '@stencil/core';
|
|
2
2
|
import { loc, addSmoothScrollPolyfill, overrideFocus, isEventFromElement } from 'src/utils';
|
|
3
3
|
addSmoothScrollPolyfill();
|
|
4
4
|
export class Q2Stepper {
|
|
5
5
|
constructor() {
|
|
6
|
-
this.currentStep = 1;
|
|
7
|
-
this.scrollEnabled = false;
|
|
8
|
-
this.showScrollLeft = false;
|
|
9
|
-
this.showScrollRight = false;
|
|
10
6
|
this.scheduledAfterRender = [];
|
|
11
7
|
////////// EVENT HANDLERS ////////
|
|
12
8
|
this.onSlotChange = () => {
|
|
@@ -72,6 +68,12 @@ export class Q2Stepper {
|
|
|
72
68
|
this.showScrollLeft = !!scrollLeft;
|
|
73
69
|
this.showScrollRight = scrollWidth !== scrollLeft + clientWidth;
|
|
74
70
|
};
|
|
71
|
+
this.currentStep = 1;
|
|
72
|
+
this.stepCount = undefined;
|
|
73
|
+
this.lastEnabledStep = undefined;
|
|
74
|
+
this.scrollEnabled = false;
|
|
75
|
+
this.showScrollLeft = false;
|
|
76
|
+
this.showScrollRight = false;
|
|
75
77
|
}
|
|
76
78
|
////////// LIFECYCLE HOOKS ////////
|
|
77
79
|
componentWillLoad() {
|
|
@@ -182,138 +184,134 @@ export class Q2Stepper {
|
|
|
182
184
|
stepClasses.push(`status-${status}`);
|
|
183
185
|
const isLocked = status === 'locked';
|
|
184
186
|
const disabled = isLocked || stepNumber > lastEnabledStep;
|
|
185
|
-
return (h("li", { role: "presentation" },
|
|
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))))),
|
|
192
|
-
stepIndex ? h("hr", null) : ''));
|
|
187
|
+
return (h("li", { role: "presentation" }, 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) }, h(Fragment, null, statusIcon ? (h("div", { class: "step-icon" }, h("q2-icon", { type: statusIcon }))) : (h("div", { class: "step-bubble" }, stepNumber)), label && (h("div", { class: "step-label", id: labelId }, loc(label))), label && description && (h("div", { class: "step-description", id: descriptionId }, loc(description))))), stepIndex ? h("hr", null) : ''));
|
|
193
188
|
}
|
|
194
189
|
render() {
|
|
195
190
|
const { stepCount, scrollEnabled, showScrollLeft, showScrollRight } = this;
|
|
196
191
|
const containerClasses = ['step-container'];
|
|
197
192
|
if (scrollEnabled)
|
|
198
193
|
containerClasses.push('has-scroll');
|
|
199
|
-
return (h(Fragment, null,
|
|
200
|
-
h("div", { class: containerClasses.join(' ') },
|
|
201
|
-
scrollEnabled && (h(Fragment, null,
|
|
202
|
-
h("div", { class: "gradient-left", hidden: !showScrollLeft }),
|
|
203
|
-
h("div", { class: "gradient-right", hidden: !showScrollRight }),
|
|
204
|
-
h("q2-btn", { class: "btn-left", hidden: !this.showScrollLeft, onClick: () => this.onScrollBtnClick('left') },
|
|
205
|
-
h("q2-icon", { type: "chevron-left" })),
|
|
206
|
-
h("q2-btn", { class: "btn-right", hidden: !this.showScrollRight, onClick: () => this.onScrollBtnClick('right') },
|
|
207
|
-
h("q2-icon", { type: "chevron-right" })))),
|
|
208
|
-
h("ul", { onScroll: this.checkScrollState, ref: el => (this.listElement = el), role: "tablist" }, [...Array(stepCount).keys()].map(stepIndex => this.renderStepBtn(stepIndex)))),
|
|
209
|
-
h("div", null,
|
|
210
|
-
h("slot", { onSlotchange: () => this.onSlotChange() }))));
|
|
194
|
+
return (h(Fragment, null, h("div", { class: containerClasses.join(' ') }, scrollEnabled && (h(Fragment, null, h("div", { class: "gradient-left", hidden: !showScrollLeft }), h("div", { class: "gradient-right", hidden: !showScrollRight }), h("q2-btn", { class: "btn-left", hidden: !this.showScrollLeft, onClick: () => this.onScrollBtnClick('left') }, h("q2-icon", { type: "chevron-left" })), h("q2-btn", { class: "btn-right", hidden: !this.showScrollRight, onClick: () => this.onScrollBtnClick('right') }, h("q2-icon", { type: "chevron-right" })))), h("ul", { onScroll: this.checkScrollState, ref: el => (this.listElement = el), role: "tablist" }, [...Array(stepCount).keys()].map(stepIndex => this.renderStepBtn(stepIndex)))), h("div", null, h("slot", { onSlotchange: () => this.onSlotChange() }))));
|
|
211
195
|
}
|
|
212
196
|
static get is() { return "q2-stepper"; }
|
|
213
197
|
static get encapsulation() { return "shadow"; }
|
|
214
|
-
static get originalStyleUrls() {
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
"
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
"original": "number",
|
|
244
|
-
"resolved": "number",
|
|
245
|
-
"references": {}
|
|
246
|
-
},
|
|
247
|
-
"required": false,
|
|
248
|
-
"optional": false,
|
|
249
|
-
"docs": {
|
|
250
|
-
"tags": [],
|
|
251
|
-
"text": ""
|
|
252
|
-
},
|
|
253
|
-
"attribute": "step-count",
|
|
254
|
-
"reflect": false
|
|
255
|
-
},
|
|
256
|
-
"lastEnabledStep": {
|
|
257
|
-
"type": "number",
|
|
258
|
-
"mutable": true,
|
|
259
|
-
"complexType": {
|
|
260
|
-
"original": "number",
|
|
261
|
-
"resolved": "number",
|
|
262
|
-
"references": {}
|
|
263
|
-
},
|
|
264
|
-
"required": false,
|
|
265
|
-
"optional": false,
|
|
266
|
-
"docs": {
|
|
267
|
-
"tags": [],
|
|
268
|
-
"text": ""
|
|
198
|
+
static get originalStyleUrls() {
|
|
199
|
+
return {
|
|
200
|
+
"$": ["styles.scss"]
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
static get styleUrls() {
|
|
204
|
+
return {
|
|
205
|
+
"$": ["styles.css"]
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
static get properties() {
|
|
209
|
+
return {
|
|
210
|
+
"currentStep": {
|
|
211
|
+
"type": "number",
|
|
212
|
+
"mutable": true,
|
|
213
|
+
"complexType": {
|
|
214
|
+
"original": "number",
|
|
215
|
+
"resolved": "number",
|
|
216
|
+
"references": {}
|
|
217
|
+
},
|
|
218
|
+
"required": false,
|
|
219
|
+
"optional": false,
|
|
220
|
+
"docs": {
|
|
221
|
+
"tags": [],
|
|
222
|
+
"text": ""
|
|
223
|
+
},
|
|
224
|
+
"attribute": "current-step",
|
|
225
|
+
"reflect": true,
|
|
226
|
+
"defaultValue": "1"
|
|
269
227
|
},
|
|
270
|
-
"
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
"tags": [],
|
|
287
|
-
"text": ""
|
|
228
|
+
"stepCount": {
|
|
229
|
+
"type": "number",
|
|
230
|
+
"mutable": true,
|
|
231
|
+
"complexType": {
|
|
232
|
+
"original": "number",
|
|
233
|
+
"resolved": "number",
|
|
234
|
+
"references": {}
|
|
235
|
+
},
|
|
236
|
+
"required": false,
|
|
237
|
+
"optional": false,
|
|
238
|
+
"docs": {
|
|
239
|
+
"tags": [],
|
|
240
|
+
"text": ""
|
|
241
|
+
},
|
|
242
|
+
"attribute": "step-count",
|
|
243
|
+
"reflect": false
|
|
288
244
|
},
|
|
289
|
-
"
|
|
290
|
-
"
|
|
291
|
-
"
|
|
292
|
-
"
|
|
245
|
+
"lastEnabledStep": {
|
|
246
|
+
"type": "number",
|
|
247
|
+
"mutable": true,
|
|
248
|
+
"complexType": {
|
|
249
|
+
"original": "number",
|
|
250
|
+
"resolved": "number",
|
|
251
|
+
"references": {}
|
|
252
|
+
},
|
|
253
|
+
"required": false,
|
|
254
|
+
"optional": false,
|
|
255
|
+
"docs": {
|
|
256
|
+
"tags": [],
|
|
257
|
+
"text": ""
|
|
258
|
+
},
|
|
259
|
+
"attribute": "last-enabled-step",
|
|
260
|
+
"reflect": false
|
|
293
261
|
}
|
|
294
|
-
}
|
|
262
|
+
};
|
|
263
|
+
}
|
|
264
|
+
static get states() {
|
|
265
|
+
return {
|
|
266
|
+
"scrollEnabled": {},
|
|
267
|
+
"showScrollLeft": {},
|
|
268
|
+
"showScrollRight": {}
|
|
269
|
+
};
|
|
270
|
+
}
|
|
271
|
+
static get events() {
|
|
272
|
+
return [{
|
|
273
|
+
"method": "change",
|
|
274
|
+
"name": "change",
|
|
275
|
+
"bubbles": true,
|
|
276
|
+
"cancelable": true,
|
|
277
|
+
"composed": true,
|
|
278
|
+
"docs": {
|
|
279
|
+
"tags": [],
|
|
280
|
+
"text": ""
|
|
281
|
+
},
|
|
282
|
+
"complexType": {
|
|
283
|
+
"original": "any",
|
|
284
|
+
"resolved": "any",
|
|
285
|
+
"references": {}
|
|
286
|
+
}
|
|
287
|
+
}];
|
|
288
|
+
}
|
|
295
289
|
static get elementRef() { return "hostElement"; }
|
|
296
|
-
static get watchers() {
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
290
|
+
static get watchers() {
|
|
291
|
+
return [{
|
|
292
|
+
"propName": "currentStep",
|
|
293
|
+
"methodName": "currentStepChanged"
|
|
294
|
+
}];
|
|
295
|
+
}
|
|
296
|
+
static get listeners() {
|
|
297
|
+
return [{
|
|
298
|
+
"name": "change",
|
|
299
|
+
"method": "defaultChangeHandler",
|
|
300
|
+
"target": undefined,
|
|
301
|
+
"capture": false,
|
|
302
|
+
"passive": false
|
|
303
|
+
}, {
|
|
304
|
+
"name": "focus",
|
|
305
|
+
"method": "delegateFocus",
|
|
306
|
+
"target": undefined,
|
|
307
|
+
"capture": false,
|
|
308
|
+
"passive": false
|
|
309
|
+
}, {
|
|
310
|
+
"name": "statusChange",
|
|
311
|
+
"method": "statusChangeHandler",
|
|
312
|
+
"target": undefined,
|
|
313
|
+
"capture": false,
|
|
314
|
+
"passive": false
|
|
315
|
+
}];
|
|
316
|
+
}
|
|
319
317
|
}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
*:focus {
|
|
10
10
|
outline: none;
|
|
11
|
-
box-shadow: var(--const-
|
|
11
|
+
box-shadow: var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #33b4ff #06C);
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
:host {
|
|
@@ -141,6 +141,7 @@ li {
|
|
|
141
141
|
padding: 0;
|
|
142
142
|
transition-property: box-shadow;
|
|
143
143
|
outline: none;
|
|
144
|
+
margin-top: 2px;
|
|
144
145
|
--comp-active-color: var(--t-primary, #0079c1);
|
|
145
146
|
}
|
|
146
147
|
.step-btn.status-complete {
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { h, Fragment, } from '@stencil/core';
|
|
2
2
|
import { createGuid, loc, nextPaint } from 'src/utils';
|
|
3
3
|
export class Q2StepperPane {
|
|
4
4
|
constructor() {
|
|
5
|
+
this.label = undefined;
|
|
6
|
+
this.description = undefined;
|
|
7
|
+
this.isActive = undefined;
|
|
8
|
+
this.showWithChildren = undefined;
|
|
9
|
+
this.status = undefined;
|
|
5
10
|
this.isChildActive = false;
|
|
6
11
|
}
|
|
7
12
|
/// LifeCycle Hooks ///
|
|
@@ -41,164 +46,175 @@ export class Q2StepperPane {
|
|
|
41
46
|
/// DOM ///
|
|
42
47
|
render() {
|
|
43
48
|
const { label, description, isActive } = this;
|
|
44
|
-
return (h(Fragment, null,
|
|
45
|
-
h("div", { role: "tabpanel", "aria-label": label && loc(label), "aria-description": description && loc(description), tabindex: "0", hidden: !isActive && !(this.isChildActive && this.showWithChildren) },
|
|
46
|
-
h("slot", null)),
|
|
47
|
-
h("slot", { name: "children" })));
|
|
49
|
+
return (h(Fragment, null, h("div", { role: "tabpanel", "aria-label": label && loc(label), "aria-description": description && loc(description), tabindex: "0", hidden: !isActive && !(this.isChildActive && this.showWithChildren) }, h("slot", null)), h("slot", { name: "children" })));
|
|
48
50
|
}
|
|
49
51
|
static get is() { return "q2-stepper-pane"; }
|
|
50
52
|
static get encapsulation() { return "shadow"; }
|
|
51
|
-
static get originalStyleUrls() {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
"
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
"original": "string",
|
|
80
|
-
"resolved": "string",
|
|
81
|
-
"references": {}
|
|
82
|
-
},
|
|
83
|
-
"required": false,
|
|
84
|
-
"optional": false,
|
|
85
|
-
"docs": {
|
|
86
|
-
"tags": [],
|
|
87
|
-
"text": ""
|
|
88
|
-
},
|
|
89
|
-
"attribute": "description",
|
|
90
|
-
"reflect": true
|
|
91
|
-
},
|
|
92
|
-
"isActive": {
|
|
93
|
-
"type": "boolean",
|
|
94
|
-
"mutable": false,
|
|
95
|
-
"complexType": {
|
|
96
|
-
"original": "boolean",
|
|
97
|
-
"resolved": "boolean",
|
|
98
|
-
"references": {}
|
|
99
|
-
},
|
|
100
|
-
"required": false,
|
|
101
|
-
"optional": false,
|
|
102
|
-
"docs": {
|
|
103
|
-
"tags": [],
|
|
104
|
-
"text": ""
|
|
105
|
-
},
|
|
106
|
-
"attribute": "is-active",
|
|
107
|
-
"reflect": true
|
|
108
|
-
},
|
|
109
|
-
"showWithChildren": {
|
|
110
|
-
"type": "boolean",
|
|
111
|
-
"mutable": false,
|
|
112
|
-
"complexType": {
|
|
113
|
-
"original": "boolean",
|
|
114
|
-
"resolved": "boolean",
|
|
115
|
-
"references": {}
|
|
116
|
-
},
|
|
117
|
-
"required": false,
|
|
118
|
-
"optional": false,
|
|
119
|
-
"docs": {
|
|
120
|
-
"tags": [],
|
|
121
|
-
"text": ""
|
|
53
|
+
static get originalStyleUrls() {
|
|
54
|
+
return {
|
|
55
|
+
"$": ["styles.scss"]
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
static get styleUrls() {
|
|
59
|
+
return {
|
|
60
|
+
"$": ["styles.css"]
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
static get properties() {
|
|
64
|
+
return {
|
|
65
|
+
"label": {
|
|
66
|
+
"type": "string",
|
|
67
|
+
"mutable": false,
|
|
68
|
+
"complexType": {
|
|
69
|
+
"original": "string",
|
|
70
|
+
"resolved": "string",
|
|
71
|
+
"references": {}
|
|
72
|
+
},
|
|
73
|
+
"required": false,
|
|
74
|
+
"optional": false,
|
|
75
|
+
"docs": {
|
|
76
|
+
"tags": [],
|
|
77
|
+
"text": ""
|
|
78
|
+
},
|
|
79
|
+
"attribute": "label",
|
|
80
|
+
"reflect": true
|
|
122
81
|
},
|
|
123
|
-
"
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
"
|
|
132
|
-
"
|
|
82
|
+
"description": {
|
|
83
|
+
"type": "string",
|
|
84
|
+
"mutable": false,
|
|
85
|
+
"complexType": {
|
|
86
|
+
"original": "string",
|
|
87
|
+
"resolved": "string",
|
|
88
|
+
"references": {}
|
|
89
|
+
},
|
|
90
|
+
"required": false,
|
|
91
|
+
"optional": false,
|
|
92
|
+
"docs": {
|
|
93
|
+
"tags": [],
|
|
94
|
+
"text": ""
|
|
95
|
+
},
|
|
96
|
+
"attribute": "description",
|
|
97
|
+
"reflect": true
|
|
133
98
|
},
|
|
134
|
-
"
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
"
|
|
138
|
-
|
|
99
|
+
"isActive": {
|
|
100
|
+
"type": "boolean",
|
|
101
|
+
"mutable": false,
|
|
102
|
+
"complexType": {
|
|
103
|
+
"original": "boolean",
|
|
104
|
+
"resolved": "boolean",
|
|
105
|
+
"references": {}
|
|
106
|
+
},
|
|
107
|
+
"required": false,
|
|
108
|
+
"optional": false,
|
|
109
|
+
"docs": {
|
|
110
|
+
"tags": [],
|
|
111
|
+
"text": ""
|
|
112
|
+
},
|
|
113
|
+
"attribute": "is-active",
|
|
114
|
+
"reflect": true
|
|
139
115
|
},
|
|
140
|
-
"
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
"
|
|
155
|
-
"
|
|
116
|
+
"showWithChildren": {
|
|
117
|
+
"type": "boolean",
|
|
118
|
+
"mutable": false,
|
|
119
|
+
"complexType": {
|
|
120
|
+
"original": "boolean",
|
|
121
|
+
"resolved": "boolean",
|
|
122
|
+
"references": {}
|
|
123
|
+
},
|
|
124
|
+
"required": false,
|
|
125
|
+
"optional": false,
|
|
126
|
+
"docs": {
|
|
127
|
+
"tags": [],
|
|
128
|
+
"text": ""
|
|
129
|
+
},
|
|
130
|
+
"attribute": "show-with-children",
|
|
131
|
+
"reflect": true
|
|
156
132
|
},
|
|
157
|
-
"
|
|
158
|
-
"
|
|
159
|
-
"
|
|
160
|
-
"
|
|
161
|
-
"
|
|
162
|
-
|
|
133
|
+
"status": {
|
|
134
|
+
"type": "string",
|
|
135
|
+
"mutable": false,
|
|
136
|
+
"complexType": {
|
|
137
|
+
"original": "'complete' | 'error' | 'locked'",
|
|
138
|
+
"resolved": "\"complete\" | \"error\" | \"locked\"",
|
|
139
|
+
"references": {}
|
|
140
|
+
},
|
|
141
|
+
"required": false,
|
|
142
|
+
"optional": false,
|
|
143
|
+
"docs": {
|
|
144
|
+
"tags": [],
|
|
145
|
+
"text": ""
|
|
146
|
+
},
|
|
147
|
+
"attribute": "status",
|
|
148
|
+
"reflect": true
|
|
149
|
+
}
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
static get states() {
|
|
153
|
+
return {
|
|
154
|
+
"isChildActive": {}
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
static get events() {
|
|
158
|
+
return [{
|
|
159
|
+
"method": "statusChange",
|
|
160
|
+
"name": "statusChange",
|
|
161
|
+
"bubbles": true,
|
|
162
|
+
"cancelable": true,
|
|
163
|
+
"composed": true,
|
|
164
|
+
"docs": {
|
|
165
|
+
"tags": [],
|
|
166
|
+
"text": ""
|
|
167
|
+
},
|
|
168
|
+
"complexType": {
|
|
169
|
+
"original": "IStepperPaneEvent",
|
|
170
|
+
"resolved": "IStepperPaneEvent",
|
|
171
|
+
"references": {
|
|
172
|
+
"IStepperPaneEvent": {
|
|
173
|
+
"location": "local"
|
|
174
|
+
}
|
|
163
175
|
}
|
|
164
176
|
}
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
177
|
+
}, {
|
|
178
|
+
"method": "activeChange",
|
|
179
|
+
"name": "activeChange",
|
|
180
|
+
"bubbles": true,
|
|
181
|
+
"cancelable": true,
|
|
182
|
+
"composed": true,
|
|
183
|
+
"docs": {
|
|
184
|
+
"tags": [],
|
|
185
|
+
"text": ""
|
|
186
|
+
},
|
|
187
|
+
"complexType": {
|
|
188
|
+
"original": "IStepperPaneEvent",
|
|
189
|
+
"resolved": "IStepperPaneEvent",
|
|
190
|
+
"references": {
|
|
191
|
+
"IStepperPaneEvent": {
|
|
192
|
+
"location": "local"
|
|
193
|
+
}
|
|
182
194
|
}
|
|
183
195
|
}
|
|
184
|
-
}
|
|
185
|
-
|
|
196
|
+
}];
|
|
197
|
+
}
|
|
186
198
|
static get elementRef() { return "hostElement"; }
|
|
187
|
-
static get watchers() {
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
199
|
+
static get watchers() {
|
|
200
|
+
return [{
|
|
201
|
+
"propName": "status",
|
|
202
|
+
"methodName": "statusChanged"
|
|
203
|
+
}, {
|
|
204
|
+
"propName": "isActive",
|
|
205
|
+
"methodName": "isActiveChanged"
|
|
206
|
+
}, {
|
|
207
|
+
"propName": "showWithChildren",
|
|
208
|
+
"methodName": "checkForActiveChildren"
|
|
209
|
+
}];
|
|
210
|
+
}
|
|
211
|
+
static get listeners() {
|
|
212
|
+
return [{
|
|
213
|
+
"name": "activeChange",
|
|
214
|
+
"method": "checkForActiveChildren",
|
|
215
|
+
"target": undefined,
|
|
216
|
+
"capture": false,
|
|
217
|
+
"passive": false
|
|
218
|
+
}];
|
|
219
|
+
}
|
|
204
220
|
}
|