q2-tecton-elements 1.13.0-alpha.0 → 1.13.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 +5 -7
- package/dist/cjs/{icons-4595ee47.js → icons-08ffe5c9.js} +394 -384
- package/dist/cjs/{index-c2e53804.js → index-7febb200.js} +112 -65
- package/dist/cjs/{index-a55d3c34.js → index-dd823ee6.js} +27 -14
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/q2-avatar.cjs.entry.js +2 -2
- package/dist/cjs/q2-badge.cjs.entry.js +43 -0
- package/dist/cjs/q2-btn_2.cjs.entry.js +13 -13
- package/dist/cjs/q2-calendar.cjs.entry.js +53 -59
- package/dist/cjs/q2-card.cjs.entry.js +127 -0
- package/dist/cjs/q2-carousel-pane.cjs.entry.js +5 -5
- package/dist/cjs/q2-carousel.cjs.entry.js +318 -106
- package/dist/cjs/q2-checkbox-group.cjs.entry.js +6 -3
- package/dist/cjs/q2-checkbox.cjs.entry.js +18 -10
- package/dist/cjs/q2-dropdown-item.cjs.entry.js +7 -7
- package/dist/cjs/q2-dropdown.cjs.entry.js +8 -17
- package/dist/cjs/q2-editable-field.cjs.entry.js +5 -8
- package/dist/cjs/q2-icon.cjs.entry.js +3 -3
- package/dist/cjs/q2-input.cjs.entry.js +439 -437
- package/dist/cjs/q2-loading-element.cjs.entry.js +3 -3
- package/dist/cjs/q2-loc.cjs.entry.js +2 -2
- package/dist/cjs/q2-message.cjs.entry.js +5 -5
- package/dist/cjs/q2-optgroup.cjs.entry.js +3 -3
- package/dist/cjs/q2-option-list.cjs.entry.js +359 -0
- package/dist/cjs/q2-option.cjs.entry.js +3 -11
- package/dist/cjs/q2-pagination.cjs.entry.js +116 -0
- package/dist/cjs/q2-pill.cjs.entry.js +137 -0
- package/dist/cjs/q2-radio-group.cjs.entry.js +43 -18
- package/dist/cjs/q2-radio.cjs.entry.js +21 -4
- package/dist/cjs/q2-section.cjs.entry.js +5 -7
- package/dist/cjs/q2-select.cjs.entry.js +23 -26
- package/dist/cjs/q2-stepper-pane.cjs.entry.js +42 -4
- package/dist/cjs/q2-stepper-vertical.cjs.entry.js +278 -0
- package/dist/cjs/q2-stepper.cjs.entry.js +10 -12
- package/dist/cjs/q2-tab-container.cjs.entry.js +12 -8
- package/dist/cjs/q2-tab-pane.cjs.entry.js +1 -1
- package/dist/cjs/q2-tag.cjs.entry.js +94 -0
- package/dist/cjs/q2-tecton-elements.cjs.js +3 -3
- package/dist/cjs/q2-textarea.cjs.entry.js +8 -8
- package/dist/cjs/{shapes-086c0365.js → shapes-305746b5.js} +9 -16
- package/dist/cjs/tecton-tab-pane.cjs.entry.js +2 -5
- package/dist/collection/collection-manifest.json +10 -3
- package/dist/collection/components/click-elsewhere/index.js +4 -6
- package/dist/collection/components/q2-badge/index.js +148 -0
- package/dist/collection/components/q2-badge/styles.css +134 -0
- package/dist/collection/components/q2-btn/index.js +14 -14
- package/dist/collection/components/q2-btn/styles.css +1 -1
- package/dist/collection/components/q2-calendar/helpers.js +22 -20
- package/dist/collection/components/q2-calendar/index.js +44 -37
- package/dist/collection/components/q2-calendar/validation.js +4 -2
- package/dist/collection/components/q2-card/index.js +347 -0
- package/dist/collection/components/q2-card/styles.css +177 -0
- package/dist/collection/components/q2-carousel/index.js +11 -16
- package/dist/collection/components/q2-carousel/styles.css +3 -3
- package/dist/collection/components/q2-carousel-pane/index.js +2 -2
- package/dist/collection/components/q2-carousel-pane/styles.css +8 -3
- package/dist/collection/components/q2-checkbox/index.js +37 -12
- package/dist/collection/components/q2-checkbox-group/index.js +22 -1
- package/dist/collection/components/q2-dropdown/index.js +6 -15
- package/dist/collection/components/q2-dropdown-item/index.js +5 -5
- package/dist/collection/components/q2-editable-field/index.js +3 -6
- package/dist/collection/components/q2-icon/icons.js +393 -383
- package/dist/collection/components/q2-input/formatting/credit-card.js +15 -13
- package/dist/collection/components/q2-input/formatting/currency.js +162 -162
- package/dist/collection/components/q2-input/formatting/date.js +1 -1
- package/dist/collection/components/q2-input/formatting/generic.js +7 -8
- package/dist/collection/components/q2-input/formatting/number.js +6 -9
- package/dist/collection/components/q2-input/formatting/numeric.js +5 -5
- package/dist/collection/components/q2-input/formatting/phone.js +215 -215
- package/dist/collection/components/q2-input/formatting/postal.js +1 -1
- package/dist/collection/components/q2-input/index.js +81 -25
- package/dist/collection/components/q2-input/styles.css +19 -14
- package/dist/collection/components/q2-loading/index.js +4 -4
- package/dist/collection/components/q2-loading/skeleton/q2-loading-element/index.js +1 -1
- package/dist/collection/components/q2-loading/skeleton/shapes.js +8 -15
- package/dist/collection/components/q2-message/index.js +3 -3
- package/dist/collection/components/q2-optgroup/index.js +1 -1
- package/dist/collection/components/q2-option/index.js +19 -25
- package/dist/collection/components/q2-option/styles.css +5 -0
- package/dist/collection/components/q2-option-list/index.js +648 -0
- package/dist/collection/components/q2-option-list/styles.css +128 -0
- package/dist/collection/components/q2-pagination/index.js +275 -0
- package/dist/collection/components/q2-pagination/styles.css +120 -0
- package/dist/collection/components/q2-pill/index.js +324 -0
- package/dist/collection/components/q2-pill/styles.css +229 -0
- package/dist/collection/components/q2-radio/index.js +38 -1
- package/dist/collection/components/q2-radio-group/index.js +66 -24
- package/dist/collection/components/q2-section/index.js +5 -7
- package/dist/collection/components/q2-select/index.js +40 -25
- package/dist/collection/components/q2-stepper/index.js +8 -10
- package/dist/collection/components/q2-stepper/styles.css +5 -5
- package/dist/collection/components/q2-stepper-pane/index.js +133 -5
- package/dist/collection/components/q2-stepper-vertical/index.js +346 -0
- package/dist/collection/components/q2-stepper-vertical/styles.css +273 -0
- package/dist/collection/components/q2-tab-container/index.js +11 -7
- package/dist/collection/components/q2-tag/index.js +200 -0
- package/dist/collection/components/q2-tag/styles.css +141 -0
- package/dist/collection/components/q2-textarea/index.js +6 -6
- package/dist/collection/components/tecton-tab-pane/index.js +3 -10
- package/dist/collection/utils/index.js +25 -13
- package/dist/esm/click-elsewhere.entry.js +5 -7
- package/dist/esm/{icons-3ee662ea.js → icons-b1e11526.js} +394 -384
- package/dist/esm/{index-ec6660af.js → index-0ff8de52.js} +27 -15
- package/dist/esm/{index-be8376c0.js → index-dbfb3ecc.js} +112 -65
- package/dist/esm/loader.js +3 -3
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm/q2-avatar.entry.js +2 -2
- package/dist/esm/q2-badge.entry.js +39 -0
- package/dist/esm/q2-btn_2.entry.js +13 -13
- package/dist/esm/q2-calendar.entry.js +53 -59
- package/dist/esm/q2-card.entry.js +123 -0
- package/dist/esm/q2-carousel-pane.entry.js +5 -5
- package/dist/esm/q2-carousel.entry.js +318 -106
- package/dist/esm/q2-checkbox-group.entry.js +6 -3
- package/dist/esm/q2-checkbox.entry.js +18 -10
- package/dist/esm/q2-dropdown-item.entry.js +7 -7
- package/dist/esm/q2-dropdown.entry.js +8 -17
- package/dist/esm/q2-editable-field.entry.js +5 -8
- package/dist/esm/q2-icon.entry.js +3 -3
- package/dist/esm/q2-input.entry.js +439 -437
- package/dist/esm/q2-loading-element.entry.js +3 -3
- package/dist/esm/q2-loc.entry.js +2 -2
- package/dist/esm/q2-message.entry.js +5 -5
- package/dist/esm/q2-optgroup.entry.js +3 -3
- package/dist/esm/q2-option-list.entry.js +355 -0
- package/dist/esm/q2-option.entry.js +3 -11
- package/dist/esm/q2-pagination.entry.js +112 -0
- package/dist/esm/q2-pill.entry.js +133 -0
- package/dist/esm/q2-radio-group.entry.js +43 -18
- package/dist/esm/q2-radio.entry.js +21 -4
- package/dist/esm/q2-section.entry.js +5 -7
- package/dist/esm/q2-select.entry.js +23 -26
- package/dist/esm/q2-stepper-pane.entry.js +42 -4
- package/dist/esm/q2-stepper-vertical.entry.js +274 -0
- package/dist/esm/q2-stepper.entry.js +10 -12
- package/dist/esm/q2-tab-container.entry.js +12 -8
- package/dist/esm/q2-tab-pane.entry.js +1 -1
- package/dist/esm/q2-tag.entry.js +90 -0
- package/dist/esm/q2-tecton-elements.js +3 -3
- package/dist/esm/q2-textarea.entry.js +8 -8
- package/dist/esm/{shapes-81c11dfe.js → shapes-cff4e1f0.js} +9 -16
- package/dist/esm/tecton-tab-pane.entry.js +2 -5
- package/dist/loader/index.d.ts +0 -1
- package/dist/q2-tecton-elements/{p-75e87cca.entry.js → p-00e8f782.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-0900bec1.entry.js +1 -0
- package/dist/q2-tecton-elements/p-10264ecb.entry.js +1 -0
- package/dist/q2-tecton-elements/p-123cdfb9.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-fbf7c5e6.entry.js → p-1305ec5f.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-148391d6.entry.js +1 -0
- package/dist/q2-tecton-elements/p-1dfaee64.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-32ad664c.entry.js → p-221abbf6.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-c90a6016.js → p-255b2b4c.js} +1 -1
- package/dist/q2-tecton-elements/p-27736b6b.entry.js +1 -0
- package/dist/q2-tecton-elements/p-2846ab94.entry.js +1 -0
- package/dist/q2-tecton-elements/p-2bc1de01.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-8ea2c4f7.entry.js → p-2c15414c.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-2caa89fd.js +1 -0
- package/dist/q2-tecton-elements/p-327cca41.entry.js +1 -0
- package/dist/q2-tecton-elements/p-3a420dbf.entry.js +1 -0
- package/dist/q2-tecton-elements/p-3abcb09d.entry.js +1 -0
- package/dist/q2-tecton-elements/p-3fe98e3e.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-bb2e110a.entry.js → p-430a979b.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-7e6fc65d.entry.js → p-45eb7739.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-750bcd33.entry.js → p-49b2abc4.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-9b50c3c3.entry.js → p-4ab30466.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-50e218c7.entry.js +1 -0
- package/dist/q2-tecton-elements/p-5bbf2bfe.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-ac859fcc.entry.js → p-6fec9235.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-824aebd9.js +1 -0
- package/dist/q2-tecton-elements/p-a4ae89cc.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-50967020.entry.js → p-a5562aaa.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-ae4fed23.entry.js +1 -0
- package/dist/q2-tecton-elements/p-b2302cd3.entry.js +1 -0
- package/dist/q2-tecton-elements/p-c20cbb2d.entry.js +1 -0
- package/dist/q2-tecton-elements/p-ca7a3380.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-a6f8d09a.entry.js → p-d33e152c.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-9024859f.entry.js → p-d5218cd6.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-d52b435e.entry.js +1 -0
- package/dist/q2-tecton-elements/p-dd02cf8d.js +1 -0
- package/dist/q2-tecton-elements/{p-07a5d703.entry.js → p-e0e7ae8b.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-7e030e92.entry.js → p-ede12fc1.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-df182f61.entry.js → p-fdfbe75b.entry.js} +1 -1
- package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
- package/dist/test/elements/q2-tag-test.js +151 -0
- package/dist/test/helpers.js +20 -9
- package/dist/types/components/q2-badge/index.d.ts +13 -0
- package/dist/types/components/q2-btn/index.d.ts +3 -3
- package/dist/types/components/q2-calendar/helpers.d.ts +1 -0
- package/dist/types/components/q2-calendar/index.d.ts +2 -1
- package/dist/types/components/q2-calendar/validation.d.ts +1 -1
- package/dist/types/components/q2-card/index.d.ts +35 -0
- package/dist/types/components/q2-checkbox/index.d.ts +3 -1
- package/dist/types/components/q2-checkbox-group/index.d.ts +1 -0
- package/dist/types/components/q2-dropdown/index.d.ts +1 -1
- package/dist/types/components/q2-editable-field/index.d.ts +1 -1
- package/dist/types/components/q2-input/formatting/credit-card.d.ts +1 -3
- package/dist/types/components/q2-input/index.d.ts +5 -2
- package/dist/types/components/q2-option/index.d.ts +2 -3
- package/dist/types/components/q2-option-list/index.d.ts +62 -0
- package/dist/types/components/q2-pagination/index.d.ts +30 -0
- package/dist/types/components/q2-pill/index.d.ts +39 -0
- package/dist/types/components/q2-radio/index.d.ts +4 -1
- package/dist/types/components/q2-radio-group/index.d.ts +5 -1
- package/dist/types/components/q2-select/index.d.ts +2 -1
- package/dist/types/components/q2-stepper/index.d.ts +1 -1
- package/dist/types/components/q2-stepper-pane/index.d.ts +16 -1
- package/dist/types/components/q2-stepper-vertical/index.d.ts +52 -0
- package/dist/types/components/q2-tab-container/index.d.ts +1 -1
- package/dist/types/components/q2-tag/index.d.ts +28 -0
- package/dist/types/components/tecton-tab-pane/index.d.ts +2 -2
- package/dist/types/components.d.ts +235 -11
- package/dist/types/global.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +6 -4
- package/dist/types/util.d.ts +2 -10
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/types/workspace/workspace/Tecton_tecton-production_master/packages/q2-tecton-elements/.stencil/test/elements/q2-tag-test.d.ts +1 -0
- package/dist/types/workspace/workspace/{_production_release_1.11.0-alpha → Tecton_tecton-production_master}/packages/q2-tecton-elements/.stencil/test/helpers.d.ts +6 -3
- package/package.json +13 -13
- package/dist/q2-tecton-elements/p-06fff43d.entry.js +0 -1
- package/dist/q2-tecton-elements/p-080839ed.js +0 -1
- package/dist/q2-tecton-elements/p-29a37091.entry.js +0 -1
- package/dist/q2-tecton-elements/p-37aba2a4.js +0 -1
- package/dist/q2-tecton-elements/p-4cd00f1a.js +0 -1
- package/dist/q2-tecton-elements/p-6702eb4d.entry.js +0 -1
- package/dist/q2-tecton-elements/p-768e3a5d.entry.js +0 -1
- package/dist/q2-tecton-elements/p-843b1ee9.entry.js +0 -1
- package/dist/q2-tecton-elements/p-943c7745.entry.js +0 -1
- package/dist/q2-tecton-elements/p-95a73559.entry.js +0 -1
- package/dist/q2-tecton-elements/p-9a977ee6.entry.js +0 -1
- package/dist/q2-tecton-elements/p-b281c349.entry.js +0 -1
- package/dist/q2-tecton-elements/p-c5e55b9f.entry.js +0 -1
- package/dist/q2-tecton-elements/p-ccbe9158.entry.js +0 -1
- package/dist/q2-tecton-elements/p-db6f90ac.entry.js +0 -1
- package/dist/q2-tecton-elements/p-fa6eea5c.entry.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-
|
|
2
|
-
import { c as createGuid, l as loc } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-dbfb3ecc.js';
|
|
2
|
+
import { c as createGuid, l as loc } from './index-0ff8de52.js';
|
|
3
3
|
|
|
4
4
|
const stylesCss = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-global-focus)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}:host{margin-top:var(--tct-scale-2, var(--app-scale-2, 10px))}fieldset{padding:var(--tct-input-error-padding, 0);margin:0;border:0}fieldset.has-error{border-color:var(--tct-input-error-border-color, var(--const-stoplight-alert, #c30000));border-width:1px;border-style:solid;border-radius:var(--tct-border-radius-1, var(--app-border-radius-1, 2px));position:relative}fieldset.has-error .error-icon-container{top:8px;right:8px;position:absolute;width:40%;text-align:right;background:linear-gradient(to right, var(--tct-checkbox-group-error-gradient-start, var(--t-base-a0, rgba(255, 255, 255, 0))), var(--tct-checkbox-group-error-gradient-end, var(--t-base, white)))}fieldset.has-error legend+div.error-icon-container.no-label{top:28px}.group-legend{font-weight:600}legend.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;border:0}.optional-tag{margin-left:var(--tct-input-label-optional-margin-left, var(--tct-scale-1, var(--app-scale-1, 5px)));color:var(--tct-input-label-optional-font-color, var(--tct-a11y-color, var(--t-a11y-gray-color, var(--tct-gray-7, var(--t-gray-7, var(--tct-gray-d1, var(--app-gray-d1, #666666)))))));font-size:var(--tct-input-label-optional-font-size, 12px);font-weight:var(--tct-input-label-optional-font-weight, 400)}.flexed{margin:0;display:flex;flex-wrap:wrap;align-items:center;justify-content:center}.flexed.left{justify-content:left}";
|
|
5
5
|
|
|
@@ -8,6 +8,7 @@ const Q2CheckboxGroup = class {
|
|
|
8
8
|
registerInstance(this, hostRef);
|
|
9
9
|
this.change = createEvent(this, "change", 7);
|
|
10
10
|
this.disabled = false;
|
|
11
|
+
this.readonly = false;
|
|
11
12
|
this.optional = false;
|
|
12
13
|
this.hasError = false;
|
|
13
14
|
this.id = `checkbox-group-${createGuid()}`;
|
|
@@ -44,6 +45,8 @@ const Q2CheckboxGroup = class {
|
|
|
44
45
|
}
|
|
45
46
|
}
|
|
46
47
|
valueUpdated() {
|
|
48
|
+
if (this.readonly)
|
|
49
|
+
return;
|
|
47
50
|
this.checkboxElements.forEach(check => {
|
|
48
51
|
if (this.protectedValue.hasOwnProperty(check.value)) {
|
|
49
52
|
check.checked = this.value[check.value];
|
|
@@ -61,7 +64,7 @@ const Q2CheckboxGroup = class {
|
|
|
61
64
|
}
|
|
62
65
|
}
|
|
63
66
|
render() {
|
|
64
|
-
return (h("div", null, this.label || this.optional ? (h("div", { class: "group-legend" }, this.label && loc(this.label), this.optional ?
|
|
67
|
+
return (h("div", null, this.label || this.optional ? (h("div", { class: "group-legend" }, this.label && loc(this.label), this.optional ? h("span", { class: "optional-tag" }, loc('tecton.element.input.optional')) : '')) : (''), h("fieldset", { class: `q2-checkbox-fieldset ${this.hasError ? 'has-error' : ''}`, onChange: this.onInnerCheckboxChange, "aria-required": `${!this.optional}` }, this.label || this.optional ? (h("legend", { class: "sr-only" }, this.label && loc(this.label), this.optional ? (h("span", { class: "optional-tag" }, loc('tecton.element.input.optional'))) : (''))) : (''), this.hasError ? (h("div", { class: `error-icon-container ${this.label || this.optional ? '' : 'no-label'}` }, h("q2-icon", { class: "h(4) w(4) mrg-b(2)", type: "error" }))) : (''), this.inputDom())));
|
|
65
68
|
}
|
|
66
69
|
inputDom() {
|
|
67
70
|
return h("slot", null);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-
|
|
2
|
-
import { c as createGuid, h as handleAriaLabel, o as overrideFocus, i as isEventFromElement, l as loc } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-dbfb3ecc.js';
|
|
2
|
+
import { c as createGuid, h as handleAriaLabel, o as overrideFocus, i as isEventFromElement, l as loc } from './index-0ff8de52.js';
|
|
3
3
|
|
|
4
4
|
const stylesCss = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-global-focus)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}:host{display:block;padding:var(--tct-checkbox-vertical-padding, var(--tct-scale-2, var(--app-scale-2, 10px))) 0}label{display:flex;align-items:center;--comp-checkbox-outer-stroke-color:var(\n --tct-checkbox-outer-stroke-color,\n var(--tct-gray-11, var(--t-gray-11, var(--tct-gray-l1, var(--app-gray-l1, #cccccc))))\n );--comp-checkbox-outer-fill-color:var(\n --tct-checkbox-outer-fill-color,\n var(--tct-white, var(--app-white, #ffffff))\n );--comp-checkbox-checked-color:var(\n --tct-checkbox-check-stroke-color,\n var(\n --t-checkbox-fill,\n var(--tct-gray-5, var(--t-gray-5, var(--tct-gray-d2, var(--app-gray-d2, #404040))))\n )\n )}input:disabled+label{opacity:var(--tct-checkbox-disabled-opacity, var(--tct-disabled-opacity, var(--app-disabled-opacity, 0.4)))}.checkbox-icon{height:var(--tct-checkbox-size, 20px);width:var(--tct-checkbox-size, 20px);border-radius:var(--tct-checkbox-outer-border-radius, var(--tct-border-radius-1, var(--app-border-radius-1, 3px)));stroke:var(--comp-checkbox-outer-stroke-color);color:var(--comp-checkbox-outer-stroke-color);--t-icon-stroke-primary:var(--comp-checkbox-outer-stroke-color);stroke-width:var(--tct-checkbox-outer-stroke-width, 2);fill:var(--comp-checkbox-outer-fill-color);flex-shrink:0}.checkbox-icon,.label-text{cursor:pointer}input:focus+label .checkbox-icon{box-shadow:var(--tct-global-focus, var(--const-global-focus, 0 0 0 2px #33b4ff))}.checkbox-fill{stroke:var(--comp-checkbox-checked-color)}input:checked+label .checkbox-icon{fill:var(--tct-checkbox-checked-outer-fill-color, var(--comp-checkbox-outer-fill-color));stroke:var(--tct-checkbox-checked-outer-stroke-color, var(--comp-checkbox-outer-stroke-color))}input:focus+label .checkbox-icon{stroke:var(--tct-checkbox-focused-outer-stroke-color, var(--comp-checkbox-checked-color))}.checked-fill{stroke-width:var(--tct-checkbox-check-stroke-width, 2.5);stroke-linecap:round;stroke-linejoin:round}.indeterminate-fill{stroke-width:var(--tct-checkbox-indeterminate-stroke-width, 3.5)}.q2-checkbox-label-content{font-weight:var(--tct-checkbox-font-weight, 400);width:calc(100% - var(--tct-checkbox-size, 20px) - var(--tct-scale-2, var(--app-scale-2, 10px)));cursor:inherit}input:checked+label .q2-checkbox-label-content{font-weight:var(--tct-checkbox-selected-font-weight, 600);letter-spacing:var(--tct-checkbox-selected-letter-spacing, 0.25)}:host([type=favorite]){--scoped-checkbox-favorite-stroke-color:var(\n --tct-checkbox-favorite-stroke-color,\n var(--t-textA, rgba(77, 77, 77, 0.77))\n );--scoped-checkbox-favorite-fill-color:var(\n --tct-checkbox-favorite-fill-color,\n var(--tct-stoplight-warning, var(--const-stoplight-warning, #f0b400))\n )}:host([type=favorite]) .checkbox-icon{--tct-icon-stroke-width:var(--tct-checkbox-favorite-stroke-width, 1);--tct-icon-stroke-primary:var(--scoped-checkbox-favorite-stroke-color);width:var(--tct-checkbox-size, 20px);height:var(--tct-checkbox-size, 20px);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))}:host([type=favorite]:focus-within) input+label .checkbox-icon,:host([type=favorite]:hover) input+label .checkbox-icon{--tct-icon-stroke-primary:var(--scoped-checkbox-favorite-fill-color);--tct-icon-stroke-width:var(--tct-checkbox-favorite-hover-stroke-width, 2)}:host([type=favorite]) input:checked+label .checkbox-icon{--tct-icon-stroke-primary:var(--scoped-checkbox-favorite-fill-color);fill:var(--scoped-checkbox-favorite-fill-color);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))}:host([type=favorite]:focus-within) input:checked+label .checkbox-icon,:host([type=favorite]:hover) input:checked+label .checkbox-icon{--tct-icon-stroke-primary:var(--scoped-checkbox-favorite-stroke-color)}:host([alignment=right]) label,:host([type=toggle]:not([alignment=left])) label{flex-flow:row-reverse}.checkbox-icon,:host([type=toggle][alignment=left]) .toggle-svg{margin-right:var(--tct-scale-2, var(--app-scale-2, 10px));margin-left:0}:host([alignment=right]) .checkbox-icon,.toggle-svg{cursor:pointer;margin-right:0;margin-left:var(--tct-scale-2, var(--app-scale-2, 10px))}:host([type=toggle]) .toggle-svg{height:30px;width:46px;position:relative}:host([type=toggle]) .toggle-track,:host([type=toggle]) .toggle-indicator{position:absolute;top:50%;transform:translateY(-50%)}:host([type=toggle]) .toggle-track{fill:var(--tct-checkbox-toggle-track-color, var(--tct-gray-11, var(--t-gray-11, var(--tct-gray-l1, var(--app-gray-l1, #cccccc)))));height:14px;width:46px}:host([type=toggle]) input:checked+label .toggle-track{fill:var(--tct-checkbox-toggle-checked-color, var(--comp-checkbox-checked-color));opacity:0.5}:host([type=toggle]) .toggle-indicator{transition:left var(--tct-tween-1, var(--app-tween-1, 0.2s ease));height:30px;width:30px;left:0;border-radius:50%}:host([type=toggle]) input:checked+label .toggle-indicator{left:21px}:host([type=toggle]) .toggle-circle{fill:var(--tct-checkbox-toggle-circle-color, var(--tct-gray-9, var(--t-gray-9, var(--tct-gray, var(--app-gray, #999999)))))}:host([type=toggle]) input:checked+label .toggle-circle{fill:var(--tct-checkbox-toggle-checked-color, var(--comp-checkbox-checked-color))}:host([type=toggle]) input:checked+label .off,:host([type=toggle]) input:not(:checked)+label .on{opacity:0}:host([type=toggle]) input:focus+label .toggle-circle{stroke:var(--tct-checkbox-toggle-checked-color, var(--comp-checkbox-checked-color));stroke-width:10px;stroke-opacity:0.5}:host([type=toggle]) input:not(:checked):focus+label .toggle-circle{stroke:var(--tct-checkbox-toggle-circle-color, var(--tct-gray-9, var(--t-gray-9, var(--tct-gray, var(--app-gray, #999999)))))}:host([type=toggle]) .checked-fill{stroke:var(--tct-checkbox-toggle-icon-stroke, var(--tct-white, var(--app-white, #ffffff)));transition:opacity var(--tct-tween-1, var(--app-tween-1, 0.2s ease))}:host([type=toggle]) input:checked+label .checked-fill{stroke:var(--tct-checkbox-toggle-checked-icon-stroke, var(--t-checkbox-text, var(--tct-white, var(--app-white, #ffffff))))}";
|
|
5
5
|
|
|
@@ -10,22 +10,30 @@ const Q2Checkbox = class {
|
|
|
10
10
|
this.checked = false;
|
|
11
11
|
this.id = `checkbox-${createGuid()}`;
|
|
12
12
|
///// Actions ////////
|
|
13
|
-
this.
|
|
13
|
+
this.onInputClick = (event) => {
|
|
14
14
|
event.stopPropagation();
|
|
15
|
-
|
|
15
|
+
event.preventDefault();
|
|
16
|
+
if (this.disabled || this.readonly)
|
|
16
17
|
return;
|
|
17
18
|
if (!(event.target instanceof HTMLInputElement))
|
|
18
19
|
return;
|
|
19
20
|
this.change.emit({
|
|
20
21
|
value: event.target.value,
|
|
21
|
-
checked: event.target.checked
|
|
22
|
+
checked: event.target.checked,
|
|
22
23
|
});
|
|
23
24
|
this.inputElement.focus();
|
|
24
25
|
};
|
|
25
26
|
this.onControlClick = (event) => {
|
|
26
27
|
event.stopPropagation();
|
|
28
|
+
if (this.readonly)
|
|
29
|
+
return;
|
|
27
30
|
this.inputElement.click();
|
|
28
31
|
};
|
|
32
|
+
this.onKeyDown = (event) => {
|
|
33
|
+
if (this.readonly && event.code === 'Space') {
|
|
34
|
+
event.preventDefault();
|
|
35
|
+
}
|
|
36
|
+
};
|
|
29
37
|
}
|
|
30
38
|
////////// LIFECYCLE HOOKS ////////
|
|
31
39
|
componentWillLoad() {
|
|
@@ -36,7 +44,7 @@ const Q2Checkbox = class {
|
|
|
36
44
|
}
|
|
37
45
|
//////// Host Element Events ////////
|
|
38
46
|
defaultChangeHandler(event) {
|
|
39
|
-
if (event.target === this.hostElement && !this.hostElement.onchange && !!event.detail) {
|
|
47
|
+
if (!this.readonly && event.target === this.hostElement && !this.hostElement.onchange && !!event.detail) {
|
|
40
48
|
this.checked = event.detail.checked;
|
|
41
49
|
}
|
|
42
50
|
}
|
|
@@ -51,11 +59,11 @@ const Q2Checkbox = class {
|
|
|
51
59
|
}
|
|
52
60
|
/////// View Methods ///////
|
|
53
61
|
render() {
|
|
54
|
-
return (h("div", { class: "checkbox-container" }, h("input", { ref: el => (this.inputElement = el), id: this.id, type: "checkbox", checked: this.indeterminate || this.checked || false, disabled: !!this.disabled || !!this.groupDisabled, class: "sr", value: this.value, name: this.name || this.id, "aria-label": this.label && this.hideLabel ? loc(this.label) : undefined, "test-id": "q2CheckboxInnerCheckBox",
|
|
62
|
+
return (h("div", { class: "checkbox-container" }, h("input", { ref: el => (this.inputElement = el), id: this.id, type: "checkbox", checked: this.indeterminate || this.checked || false, disabled: !!this.disabled || !!this.groupDisabled, class: "sr", value: this.value, name: this.name || this.id, "aria-label": this.label && this.hideLabel ? loc(this.label) : undefined, "test-id": "q2CheckboxInnerCheckBox", onKeyDown: this.onKeyDown, onClick: this.onInputClick }), h("label", { htmlFor: this.id, "test-id": "checkboxButton" }, this.generateCheckboxSVG(), !this.hideLabel && (h("div", { class: "q2-checkbox-label-content" }, h("span", { class: "label-text", onClick: this.onControlClick }, loc(this.label)), h("slot", null))))));
|
|
55
63
|
}
|
|
56
64
|
generateCheckboxSVG() {
|
|
57
65
|
if (this.type === 'favorite') {
|
|
58
|
-
return h("q2-icon", { type: "star", class: "checkbox-icon", onClick: this.onControlClick });
|
|
66
|
+
return (h("q2-icon", { type: "star", class: "checkbox-icon", onClick: this.onControlClick }));
|
|
59
67
|
}
|
|
60
68
|
if (this.type === 'toggle') {
|
|
61
69
|
return this.generateToggleSVG();
|
|
@@ -64,9 +72,9 @@ const Q2Checkbox = class {
|
|
|
64
72
|
}
|
|
65
73
|
generateCheckBoxSVGFill() {
|
|
66
74
|
if (this.indeterminate) {
|
|
67
|
-
return h("line", { class: "checkbox-fill indeterminate-fill", x1: "4", y1: "10", x2: "16", y2: "10" });
|
|
75
|
+
return (h("line", { class: "checkbox-fill indeterminate-fill", x1: "4", y1: "10", x2: "16", y2: "10" }));
|
|
68
76
|
}
|
|
69
|
-
return h("polyline", { class: "checkbox-fill checked-fill", points: "5 11 8.5 14.5 15 6" });
|
|
77
|
+
return (h("polyline", { class: "checkbox-fill checked-fill", points: "5 11 8.5 14.5 15 6" }));
|
|
70
78
|
}
|
|
71
79
|
generateToggleSVG() {
|
|
72
80
|
return (h("div", { class: "toggle-svg", onClick: this.onControlClick }, h("svg", { "aria-hidden": "true", focusable: "false", viewBox: "0 0 46 14", class: "toggle-track" }, h("rect", { width: "36", height: "14", rx: "7", x: "5" })), h("svg", { "aria-hidden": "true", focusable: "false", viewBox: "0 0 30 30", class: "toggle-indicator" }, h("circle", { class: "toggle-circle", width: "20", height: "20", cx: "15", cy: "15", r: "10" }), h("line", { class: "off checked-fill", x1: "12", y1: "18", x2: "18", y2: "12" }), h("line", { class: "off checked-fill", x1: "12", y1: "12", x2: "18", y2: "18" }), h("polyline", { class: "on checked-fill", points: "11,16 14,19 18,12 14,19" }))));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as registerInstance, h, g as getElement } from './index-
|
|
2
|
-
import { h as handleAriaLabel, l as loc } from './index-
|
|
1
|
+
import { r as registerInstance, h, g as getElement } from './index-dbfb3ecc.js';
|
|
2
|
+
import { h as handleAriaLabel, l as loc } from './index-0ff8de52.js';
|
|
3
3
|
|
|
4
4
|
const stylesCss = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-global-focus)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}.dropdown-separator{margin:0 var(--tct-scale-1, var(--app-scale-1, 5px));border-bottom:1px solid var(--tct-dropdown-item-separator-color, var(--tct-gray-11, var(--t-gray-11, var(--tct-gray-l1, var(--app-gray-l1, #cccccc)))))}.dropdown-item-wrapper{display:flex}.dropdown-item{min-height:44px;flex:1 1 100%;padding:var(--tct-dropdown-item-padding, 2px)}.dropdown-item-content{padding:12px var(--tct-scale-3, var(--app-scale-3, 15px));text-align:left;background-color:var(--tct-dropdown-item-bg, var(--tct-white, var(--t-base, var(--app-white, #ffffff))));color:var(--tct-dropdown-item-font-color, inherit);transition:background-color var(--tct-tween-1, var(--app-tween-1, 0.2s ease));overflow:hidden;text-overflow:ellipsis;flex:1}:host(:not([disabled])) .dropdown-item-content:hover,:host(:not([disabled])) .dropdown-item:focus-within .dropdown-item-content{background-color:var(--tct-dropdown-item-selected-bg, var(--tct-gray-14, var(--t-gray-14, var(--tct-gray-l3, var(--app-gray-l3, var(--t-base, #f2f2f2))))));color:var(--tct-dropdown-item-selected-font-color, inherit)}.remove-dropdown-item{flex:0 0 44px;margin:2px}";
|
|
5
5
|
|
|
@@ -11,9 +11,9 @@ const Q2DropdownItem = class {
|
|
|
11
11
|
this.hostElement.dispatchEvent(new CustomEvent('click', {
|
|
12
12
|
detail: {
|
|
13
13
|
type: 'select',
|
|
14
|
-
value: this.value || ''
|
|
14
|
+
value: this.value || '',
|
|
15
15
|
},
|
|
16
|
-
bubbles: true
|
|
16
|
+
bubbles: true,
|
|
17
17
|
}));
|
|
18
18
|
};
|
|
19
19
|
this.onItemKeydown = (event) => {
|
|
@@ -29,9 +29,9 @@ const Q2DropdownItem = class {
|
|
|
29
29
|
this.hostElement.dispatchEvent(new CustomEvent('click', {
|
|
30
30
|
detail: {
|
|
31
31
|
type: 'remove',
|
|
32
|
-
value: this.value || ''
|
|
32
|
+
value: this.value || '',
|
|
33
33
|
},
|
|
34
|
-
bubbles: true
|
|
34
|
+
bubbles: true,
|
|
35
35
|
}));
|
|
36
36
|
};
|
|
37
37
|
this.onRemoveBtnKeydown = (event) => {
|
|
@@ -83,7 +83,7 @@ const Q2DropdownItem = class {
|
|
|
83
83
|
return this.itemDOM();
|
|
84
84
|
}
|
|
85
85
|
separatorDOM() {
|
|
86
|
-
return h("div", { class: "dropdown-separator", role: "separator", "test-id": "dropdownItemSeparator" });
|
|
86
|
+
return (h("div", { class: "dropdown-separator", role: "separator", "test-id": "dropdownItemSeparator" }));
|
|
87
87
|
}
|
|
88
88
|
itemDOM() {
|
|
89
89
|
return (h("div", { class: "dropdown-item-wrapper" }, h("q2-btn", { class: "dropdown-item", label: this.innerLabel, "hide-label": true, disabled: !!this.disabled, role: "menuitem", onClick: this.onItemClick, onKeyDown: this.onItemKeydown, onFocus: this.onItemFocus, "test-id": "dropdownItem" }, h("div", { class: "dropdown-item-content" }, h("slot", null))), !!this.removable ? (h("q2-btn", { class: "remove-dropdown-item", label: this.removeLabel, "hide-label": true, disabled: !!this.disabled, role: "menuitem", onClick: this.onRemoveBtnClick, onKeyDown: this.onRemoveBtnKeydown, onFocus: this.onRemoveBtnFocus, "test-id": "removeDropdownItem" }, h("q2-icon", { type: "close" }))) : ('')));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as registerInstance, h, F as Fragment, g as getElement } from './index-
|
|
2
|
-
import { s as setPopProperties, h as handleAriaLabel, i as isEventFromElement, o as overrideFocus, l as loc } from './index-
|
|
1
|
+
import { r as registerInstance, h, F as Fragment, g as getElement } from './index-dbfb3ecc.js';
|
|
2
|
+
import { s as setPopProperties, h as handleAriaLabel, i as isEventFromElement, o as overrideFocus, l as loc } from './index-0ff8de52.js';
|
|
3
3
|
|
|
4
4
|
const stylesCss = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-global-focus)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}.q2-element-dropdown{display:none;position:absolute;background-color:var(--app-white);color:var(--t-font-color);left:0;width:100%;z-index:100;margin-top:1px;box-shadow:var(--app-shadow-1);height:0;overflow:hidden;opacity:0;visibility:hidden;transition:opacity var(--app-tween-1);border-radius:var(--tct-dropdown-border-radius, --t-dropdown-border-radius, 0);--comp-scrollbar-size:var(--tct-scrollbar-size, var(--t-scrollbar-size, var(--app-scale-1x, 5px)));--comp-scrollbar-border-radius:var(--tct-scrollbar-border-radius, var(--t-scrollbar-border-radius, var(--app-border-radius-1, 3px)));--comp-scrollbar-color:var(--tct-scrollbar-color, var(--t-scrollbar-color, var(--t-a11y-gray-color, #747474)));scrollbar-width:thin;scrollbar-color:var(--comp-scrollbar-color) transparent}.q2-element-dropdown::-webkit-scrollbar{width:var(--comp-scrollbar-size);height:var(--comp-scrollbar-size);margin:5px}.q2-element-dropdown::-webkit-scrollbar-thumb{background:var(--comp-scrollbar-color);border-radius:var(--comp-scrollbar-border-radius)}.q2-element-dropdown::-webkit-scrollbar-track{background:transparent;border-radius:var(--comp-scrollbar-border-radius)}.q2-element-dropdown.sizable{display:block;height:auto}.dropdown-open .q2-element-dropdown{display:block;height:auto;overflow:auto;opacity:1;visibility:visible}:host([alignment=right]) .q2-element-dropdown{left:auto;right:0}:host{display:inline-flex}.dropdown-container{position:relative;display:block}.dropdown-button-content{display:flex;align-items:center}.dropdown-button.unstyled .dropdown-button-content{padding:var(--tct-scale-2, var(--app-scale-2, 10px)) var(--tct-scale-1, var(--app-scale-1, 5px))}.q2-element-dropdown{width:var(--tct-dropdown-width, var(--t-dropdown-width, 175px))}.q2-element-dropdown.dropup{bottom:var(--tct-btn-icon-height, var(--t-btn-icon-height, 44px))}q2-btn[color=primary]~.q2-element-dropdown.dropup,q2-btn[intent=workflow-primary]~.q2-element-dropdown.dropup{bottom:calc(var(--tct-btn-icon-height, var(--t-btn-icon-height, 44px)) + var(--tct-btn-primary-border-width, var(--t-btn-primary-border-width, 0)))}q2-btn[color=secondary]~.q2-element-dropdown.dropup,q2-btn[intent=workflow-secondary]~.q2-element-dropdown.dropup{bottom:calc(var(--tct-btn-icon-height, var(--t-btn-icon-height, 44px)) + var(--tct-btn-secondary-border-width, var(--t-btn-secondary-border-width, 0)))}q2-btn[intent=neutral]~.q2-element-dropdown.dropup{bottom:calc(var(--tct-btn-icon-height, var(--t-btn-icon-height, 44px)) + var(--tct-btn-neutral-border-width, var(--t-btn-neutral-border-width, 0)))}";
|
|
5
5
|
|
|
@@ -99,9 +99,7 @@ const Q2Dropdown = class {
|
|
|
99
99
|
};
|
|
100
100
|
}
|
|
101
101
|
resizeIframe() {
|
|
102
|
-
return
|
|
103
|
-
window.TectonElements.resizeIframe &&
|
|
104
|
-
window.TectonElements.resizeIframe());
|
|
102
|
+
return window.TectonElements && window.TectonElements.resizeIframe && window.TectonElements.resizeIframe();
|
|
105
103
|
}
|
|
106
104
|
resolveMenu() {
|
|
107
105
|
return (this.name &&
|
|
@@ -157,12 +155,10 @@ const Q2Dropdown = class {
|
|
|
157
155
|
});
|
|
158
156
|
}
|
|
159
157
|
navigateTo(featureName, moduleName, queryParams) {
|
|
160
|
-
return
|
|
161
|
-
window.TectonElements.navigateTo(featureName, moduleName, queryParams));
|
|
158
|
+
return window.TectonElements && window.TectonElements.navigateTo(featureName, moduleName, queryParams);
|
|
162
159
|
}
|
|
163
160
|
showOverpanel(overpanelPath, params) {
|
|
164
|
-
return
|
|
165
|
-
window.TectonElements.showOverpanel(overpanelPath, params, undefined, true));
|
|
161
|
+
return window.TectonElements && window.TectonElements.showOverpanel(overpanelPath, params, undefined, true);
|
|
166
162
|
}
|
|
167
163
|
get hasCustomButton() {
|
|
168
164
|
return !!this.hostElement.querySelector('[slot=custom-dropdown-button]');
|
|
@@ -190,7 +186,7 @@ const Q2Dropdown = class {
|
|
|
190
186
|
disabled,
|
|
191
187
|
ariaExpanded,
|
|
192
188
|
className,
|
|
193
|
-
custom
|
|
189
|
+
custom,
|
|
194
190
|
};
|
|
195
191
|
}
|
|
196
192
|
//////// Observers //////////
|
|
@@ -244,12 +240,7 @@ const Q2Dropdown = class {
|
|
|
244
240
|
}
|
|
245
241
|
let targetIndex = 0;
|
|
246
242
|
if (direction === 'next') {
|
|
247
|
-
|
|
248
|
-
targetIndex = activeIndex + 1;
|
|
249
|
-
}
|
|
250
|
-
else {
|
|
251
|
-
targetIndex = 0;
|
|
252
|
-
}
|
|
243
|
+
targetIndex = activeIndex < dropdownItems.length - 1 ? activeIndex + 1 : 0;
|
|
253
244
|
}
|
|
254
245
|
else if (direction === 'prev') {
|
|
255
246
|
if (activeIndex > 0) {
|
|
@@ -264,7 +255,7 @@ const Q2Dropdown = class {
|
|
|
264
255
|
}
|
|
265
256
|
render() {
|
|
266
257
|
const btnProps = this.toggleButtonProps;
|
|
267
|
-
return (h("click-elsewhere", { class: `dropdown-container${this.dropdownOpen ? ' dropdown-open' : ''}`, onChange: this.onClickElsewhere }, 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
|
|
258
|
+
return (h("click-elsewhere", { class: `dropdown-container${this.dropdownOpen ? ' dropdown-open' : ''}`, onChange: this.onClickElsewhere }, 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' }, h("slot", { name: "custom-dropdown-button" }))) : (h(Fragment, null, this.icon ? h("q2-icon", { type: this.icon }) : ' ', this.label && !this.hideLabel && (h("span", { class: "dropdown-button-text" }, loc(this.label)))))), h("div", { ref: el => (this.dropdownContainer = el), class: `q2-element-dropdown ${this.privatePopDirection === 'up' ? 'dropup' : ''}`, role: "menu", onClick: this.onDropdownMenuClick, onKeyDown: this.onDropdownMenuKeydown }, h("div", null, h("slot", null), this.dropdownOpen && (h("q2-btn", { class: "sr close-dropdown", onFocus: this.closeDropdown }))))));
|
|
268
259
|
}
|
|
269
260
|
get hostElement() { return getElement(this); }
|
|
270
261
|
static get watchers() { return {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-
|
|
2
|
-
import { l as loc, h as handleAriaLabel, o as overrideFocus, i as isEventFromElement } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-dbfb3ecc.js';
|
|
2
|
+
import { l as loc, h as handleAriaLabel, o as overrideFocus, i as isEventFromElement } from './index-0ff8de52.js';
|
|
3
3
|
|
|
4
4
|
const stylesCss = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-global-focus)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}:host{display:inline-block;max-width:100%}.q2-editable-field-wrapper:not([hidden]){display:flex}.q2-editable-field-wrapper.editing{align-items:flex-end}q2-input,.text-wrapper{margin:0 var(--tct-scale-2, var(--app-scale-2, 10px)) 0 0}q2-input{flex:1 0 auto;min-width:170px}.text-wrapper{flex:0 auto;align-self:center;display:inline-block}:host([truncated]) .text-wrapper{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}q2-btn{flex:0 0 44px}dl{margin:var(--tct-scale-0, var(--app-scale-0, 0))}dt{font-weight:600}dd{margin-left:var(--tct-scale-0, var(--app-scale-0, 0));display:flex;align-items:center}";
|
|
5
5
|
|
|
@@ -46,7 +46,7 @@ const Q2EditableField = class {
|
|
|
46
46
|
editing: false,
|
|
47
47
|
name: 'save',
|
|
48
48
|
value: this.innerValue || valueFromInputProp,
|
|
49
|
-
formattedValue: this.formattedValue || valueFromInputProp
|
|
49
|
+
formattedValue: this.formattedValue || valueFromInputProp,
|
|
50
50
|
});
|
|
51
51
|
setTimeout(() => {
|
|
52
52
|
const { errors = [] } = this;
|
|
@@ -118,16 +118,13 @@ const Q2EditableField = class {
|
|
|
118
118
|
delegateFocus(event) {
|
|
119
119
|
if (!isEventFromElement(event, this.hostElement))
|
|
120
120
|
return;
|
|
121
|
-
this.hostElement.shadowRoot
|
|
122
|
-
.querySelector(this.editing ? 'q2-input' : 'q2-btn.begin-edit')
|
|
123
|
-
.focus();
|
|
121
|
+
this.hostElement.shadowRoot.querySelector(this.editing ? 'q2-input' : 'q2-btn.begin-edit').focus();
|
|
124
122
|
}
|
|
125
123
|
render() {
|
|
126
124
|
return (h("div", null, this.generateEditStateDOM(), this.generateReadStateDOM()));
|
|
127
125
|
}
|
|
128
126
|
generateEditStateDOM() {
|
|
129
|
-
return (h("div", { class: this.wrapperClass, hidden: !this.editing }, h("q2-input", { ref: el => (this.q2InputElement = el), label: this.locLabel, hideLabel: this.hideLabel, value: this.value, hints: (Array.isArray(this.hints) && this.hints.map(str => loc(str))) || undefined, errors: (Array.isArray(this.errors) && this.errors.map(str => loc(str))) ||
|
|
130
|
-
undefined, type: this.type, formatModifier: this.formatModifier, maxlength: this.maxlength, "test-id": "editableInput", onInput: this.inputInput, onChange: this.inputChange, onKeyDown: this.inputKeyDown, onClick: this.inputClick }), h("q2-btn", { class: "cancel-edit", label: `${loc('tecton.element.editableField.cancel')} ${this.locLabel}`, "hide-label": true, "test-id": "cancelButton", onClick: this.cancelClick }, h("q2-icon", { type: "close" })), h("q2-btn", { class: "save-edit", label: `${loc('tecton.element.editableField.save')} ${this.locLabel}`, "hide-label": true, "test-id": "saveButton", onClick: this.saveClick }, h("q2-icon", { type: "checkmark" }))));
|
|
127
|
+
return (h("div", { class: this.wrapperClass, hidden: !this.editing }, h("q2-input", { ref: el => (this.q2InputElement = el), label: this.locLabel, hideLabel: this.hideLabel, value: this.value, hints: (Array.isArray(this.hints) && this.hints.map(str => loc(str))) || undefined, errors: (Array.isArray(this.errors) && this.errors.map(str => loc(str))) || undefined, type: this.type, formatModifier: this.formatModifier, maxlength: this.maxlength, "test-id": "editableInput", onInput: this.inputInput, onChange: this.inputChange, onKeyDown: this.inputKeyDown, onClick: this.inputClick }), h("q2-btn", { class: "cancel-edit", label: `${loc('tecton.element.editableField.cancel')} ${this.locLabel}`, "hide-label": true, "test-id": "cancelButton", onClick: this.cancelClick }, h("q2-icon", { type: "close" })), h("q2-btn", { class: "save-edit", label: `${loc('tecton.element.editableField.save')} ${this.locLabel}`, "hide-label": true, "test-id": "saveButton", onClick: this.saveClick }, h("q2-icon", { type: "checkmark" }))));
|
|
131
128
|
}
|
|
132
129
|
generateReadStateDOM() {
|
|
133
130
|
if (this.persistentLabel && this.locLabel) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as registerInstance, h, g as getElement } from './index-
|
|
2
|
-
import { c as createGuid } from './index-
|
|
3
|
-
import { i as icons } from './icons-
|
|
1
|
+
import { r as registerInstance, h, g as getElement } from './index-dbfb3ecc.js';
|
|
2
|
+
import { c as createGuid } from './index-0ff8de52.js';
|
|
3
|
+
import { i as icons } from './icons-b1e11526.js';
|
|
4
4
|
|
|
5
5
|
const stylesCss = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-global-focus)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}:host{display:inline-block;height:var(--tct-icon-size, 24px);width:var(--tct-icon-size, 24px);position:relative;fill:none}svg{display:block;position:absolute;top:0;left:0;stroke-width:var(--tct-icon-stroke-width, var(--t-icon-stroke-width, 1.5));stroke-linecap:var(--tct-icon-cap, var(--t-icon-cap, round));stroke-linejoin:var(--tct-icon-cap, var(--t-icon-cap, round))}.stroke-primary{stroke:var(--tct-icon-stroke-primary, var(--t-icon-stroke-primary, var(--t-text, currentColor)))}.stroke-secondary{stroke:var(--tct-icon-stroke-secondary, var(--t-icon-stroke-secondary, var(--t-text, currentColor)))}.fill-primary{fill:var(--tct-icon-stroke-primary, var(--t-icon-stroke-primary, var(--t-text, currentColor)))}.filled{fill:var(--tct-icon-fill, var(--t-icon-fill, none))}.uniform{fill:var(--tct-icon-stroke-primary, var(--t-icon-stroke-primary, currentColor))}:host([type=info]){--tct-icon-stroke-primary:var(--tct-stoplight-info, var(--const-stoplight-info, #0079c1));--tct-icon-stroke-secondary:var(--tct-stoplight-info, var(--const-stoplight-info, #0079c1))}:host([type=success]){--tct-icon-stroke-primary:var(--tct-stoplight-success, var(--const-stoplight-success, #0e8a00));--t-icon-stroke-secondary:var(--tct-stoplight-success, var(--const-stoplight-success, #0e8a00))}:host([type=warning]){--tct-icon-stroke-primary:var(--tct-stoplight-warning, var(--const-stoplight-warning, #f0b400));--t-icon-stroke-secondary:var(--tct-stoplight-warning, var(--const-stoplight-warning, #f0b400))}:host([type=error]){--tct-icon-stroke-primary:var(--tct-stoplight-error, var(--const-stoplight-alert, #c30000));--t-icon-stroke-secondary:var(--tct-stoplight-error, var(--const-stoplight-alert, #c30000))}";
|
|
6
6
|
|