q2-tecton-elements 1.9.7 → 1.10.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{icons-077ed9b7.js → icons-fa5f4367.js} +22 -22
- package/dist/cjs/index-14348270.js +557 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/q2-avatar.cjs.entry.js +1 -1
- package/dist/cjs/q2-btn_2.cjs.entry.js +4 -4
- package/dist/cjs/q2-calendar.cjs.entry.js +2 -2
- package/dist/cjs/q2-carousel-pane.cjs.entry.js +1 -1
- package/dist/cjs/q2-carousel.cjs.entry.js +1 -1
- package/dist/cjs/q2-checkbox-group.cjs.entry.js +2 -2
- package/dist/cjs/q2-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/q2-dropdown-item.cjs.entry.js +1 -1
- package/dist/cjs/q2-dropdown.cjs.entry.js +2 -2
- package/dist/cjs/q2-editable-field.cjs.entry.js +1 -1
- package/dist/cjs/q2-icon.cjs.entry.js +23 -10
- package/dist/cjs/q2-input.cjs.entry.js +8 -3
- package/dist/cjs/q2-loc.cjs.entry.js +1 -1
- package/dist/cjs/q2-optgroup.cjs.entry.js +1 -1
- package/dist/cjs/q2-option.cjs.entry.js +43 -5
- package/dist/cjs/q2-radio-group.cjs.entry.js +1 -1
- package/dist/cjs/q2-radio.cjs.entry.js +1 -1
- package/dist/cjs/q2-section.cjs.entry.js +1 -1
- package/dist/cjs/q2-select.cjs.entry.js +104 -62
- package/dist/cjs/q2-stepper-pane.cjs.entry.js +27 -0
- package/dist/cjs/q2-stepper.cjs.entry.js +187 -0
- package/dist/cjs/q2-tab-container.cjs.entry.js +12 -464
- package/dist/cjs/q2-tecton-elements.cjs.js +1 -1
- package/dist/cjs/q2-textarea.cjs.entry.js +1 -1
- package/dist/cjs/tecton-tab-pane.cjs.entry.js +3 -0
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/q2-btn/index.js +3 -3
- package/dist/collection/components/q2-calendar/styles.css +18 -0
- package/dist/collection/components/q2-checkbox-group/styles.css +12 -2
- package/dist/collection/components/q2-dropdown/styles.css +18 -0
- package/dist/collection/components/q2-icon/icons.js +22 -22
- package/dist/collection/components/q2-icon/index.js +41 -9
- package/dist/collection/components/q2-icon/styles.css +33 -42
- package/dist/collection/components/q2-input/index.js +7 -2
- package/dist/collection/components/q2-option/index.js +104 -8
- package/dist/collection/components/q2-option/styles.css +31 -37
- package/dist/collection/components/q2-select/index.js +106 -62
- package/dist/collection/components/q2-select/styles.css +18 -0
- package/dist/collection/components/q2-stepper/index.js +283 -0
- package/dist/collection/components/q2-stepper/styles.css +253 -0
- package/dist/collection/components/q2-stepper-pane/index.js +76 -0
- package/dist/collection/components/q2-stepper-pane/styles.css +70 -0
- package/dist/collection/components/q2-tab-container/index.js +2 -9
- package/dist/collection/components/tecton-tab-pane/index.js +3 -0
- package/dist/collection/utils/index.js +23 -2
- package/dist/esm/{icons-5506a72c.js → icons-17612675.js} +22 -22
- package/dist/esm/index-da24669a.js +548 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/q2-avatar.entry.js +1 -1
- package/dist/esm/q2-btn_2.entry.js +4 -4
- package/dist/esm/q2-calendar.entry.js +2 -2
- package/dist/esm/q2-carousel-pane.entry.js +1 -1
- package/dist/esm/q2-carousel.entry.js +1 -1
- package/dist/esm/q2-checkbox-group.entry.js +2 -2
- package/dist/esm/q2-checkbox.entry.js +1 -1
- package/dist/esm/q2-dropdown-item.entry.js +1 -1
- package/dist/esm/q2-dropdown.entry.js +2 -2
- package/dist/esm/q2-editable-field.entry.js +1 -1
- package/dist/esm/q2-icon.entry.js +23 -10
- package/dist/esm/q2-input.entry.js +8 -3
- package/dist/esm/q2-loc.entry.js +1 -1
- package/dist/esm/q2-optgroup.entry.js +1 -1
- package/dist/esm/q2-option.entry.js +44 -6
- package/dist/esm/q2-radio-group.entry.js +1 -1
- package/dist/esm/q2-radio.entry.js +1 -1
- package/dist/esm/q2-section.entry.js +1 -1
- package/dist/esm/q2-select.entry.js +104 -62
- package/dist/esm/q2-stepper-pane.entry.js +23 -0
- package/dist/esm/q2-stepper.entry.js +183 -0
- package/dist/esm/q2-tab-container.entry.js +2 -454
- package/dist/esm/q2-tecton-elements.js +1 -1
- package/dist/esm/q2-textarea.entry.js +1 -1
- package/dist/esm/tecton-tab-pane.entry.js +3 -0
- package/dist/q2-tecton-elements/{p-f1ec7948.entry.js → p-2a28baa9.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-9f328dbd.entry.js → p-2c2a5d58.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-93799868.entry.js → p-2f2bbed9.entry.js} +3 -3
- package/dist/q2-tecton-elements/p-37d281b7.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-dfe693e9.entry.js → p-3f2590c0.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-4d283b84.entry.js +1 -0
- package/dist/q2-tecton-elements/p-5289f040.entry.js +1 -0
- package/dist/q2-tecton-elements/p-576509e6.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-c6d4933e.entry.js → p-64eef8d1.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-89ae4f7b.entry.js → p-65894494.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-6ed006a7.entry.js +1 -0
- package/dist/q2-tecton-elements/p-6f570344.js +1 -0
- package/dist/q2-tecton-elements/{p-0c23d50a.entry.js → p-7520656d.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-7c06467f.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-ccb8126f.entry.js → p-82b24667.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-ec245511.entry.js → p-86116f5c.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-ed433950.entry.js → p-891ca6f8.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-8b4f6d3f.entry.js +1 -0
- package/dist/q2-tecton-elements/p-98bb1355.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-0e9e5b53.entry.js → p-9b420e22.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-aaa55918.js +1 -0
- package/dist/q2-tecton-elements/{p-915ce8d8.entry.js → p-c14e0622.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-c92e3bc2.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-7a952b02.entry.js → p-d0d605dc.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-e3a27b97.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-72f9686c.entry.js → p-ebee91e2.entry.js} +1 -1
- package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
- package/dist/types/components/q2-icon/index.d.ts +1 -0
- package/dist/types/components/q2-option/index.d.ts +9 -2
- package/dist/types/components/q2-select/index.d.ts +4 -1
- package/dist/types/components/q2-stepper/index.d.ts +33 -0
- package/dist/types/components/q2-stepper-pane/index.d.ts +9 -0
- package/dist/types/components/tecton-tab-pane/index.d.ts +1 -0
- package/dist/types/components.d.ts +46 -0
- package/dist/types/global.d.ts +1 -0
- package/dist/types/utils/index.d.ts +5 -2
- package/dist/types/workspace/workspace/{_tecton-production_release_1.9.x → tecton-production_release_1.10.x}/packages/q2-tecton-elements/.stencil/test/helpers.d.ts +0 -0
- package/package.json +2 -2
- package/dist/cjs/index-2dcb1a72.js +0 -99
- package/dist/esm/index-f3de8cee.js +0 -91
- package/dist/q2-tecton-elements/p-031a8f06.js +0 -1
- package/dist/q2-tecton-elements/p-0feefe56.js +0 -1
- package/dist/q2-tecton-elements/p-1022a1c6.entry.js +0 -1
- package/dist/q2-tecton-elements/p-12f6dc10.entry.js +0 -1
- package/dist/q2-tecton-elements/p-1ece7876.entry.js +0 -1
- package/dist/q2-tecton-elements/p-5da60194.entry.js +0 -1
- package/dist/q2-tecton-elements/p-b0cb8867.entry.js +0 -1
- package/dist/q2-tecton-elements/p-b6436a3a.entry.js +0 -1
- package/dist/q2-tecton-elements/p-d93abdce.entry.js +0 -1
- package/dist/q2-tecton-elements/p-e5e8eac3.entry.js +0 -1
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import { h } from './index-5fa3e016.js';
|
|
2
|
-
|
|
3
|
-
let guid = 1000;
|
|
4
|
-
function createGuid() {
|
|
5
|
-
return guid++;
|
|
6
|
-
}
|
|
7
|
-
function loc(key, subs) {
|
|
8
|
-
var _a, _b;
|
|
9
|
-
if (!key)
|
|
10
|
-
return '';
|
|
11
|
-
return (_b = (_a = window === null || window === void 0 ? void 0 : window.TectonElements) === null || _a === void 0 ? void 0 : _a.loc(key, subs)) !== null && _b !== void 0 ? _b : key;
|
|
12
|
-
}
|
|
13
|
-
function labelDOM(target) {
|
|
14
|
-
const { label, hideLabel } = target;
|
|
15
|
-
if (!label || hideLabel)
|
|
16
|
-
return;
|
|
17
|
-
return (h("label", { htmlFor: target.inputId, class: target.readonly ? 'readonly-field' : '' },
|
|
18
|
-
loc(target.label),
|
|
19
|
-
target.optional ? (h("span", { class: "optional-tag" }, loc('tecton.element.input.optional'))) : ('')));
|
|
20
|
-
}
|
|
21
|
-
function handleAriaLabel(target) {
|
|
22
|
-
const { ariaLabel } = target;
|
|
23
|
-
if (!ariaLabel)
|
|
24
|
-
return;
|
|
25
|
-
if ('hideLabel' in target)
|
|
26
|
-
target.hideLabel = true;
|
|
27
|
-
target.label = loc(ariaLabel);
|
|
28
|
-
target.ariaLabel = undefined;
|
|
29
|
-
}
|
|
30
|
-
function messagesDOM(target) {
|
|
31
|
-
const type = target.hasError ? 'danger' : 'info';
|
|
32
|
-
return (h("div", { class: "messages-container" },
|
|
33
|
-
h("q2-message", { appearance: "minimal", description: true, type: type },
|
|
34
|
-
h("ul", { id: target.inputDescribedBy }, target.messages.map(message => (h("li", null, loc(message))))))));
|
|
35
|
-
}
|
|
36
|
-
function setMessageHeight(target) {
|
|
37
|
-
const messageContainer = target.hostElement.shadowRoot.querySelector('.messages-container');
|
|
38
|
-
const q2Message = messageContainer.querySelector('q2-message');
|
|
39
|
-
const height = target.showMessages && target.hasFocus ? q2Message.getBoundingClientRect().height : 0;
|
|
40
|
-
if (messageContainer.style.getPropertyValue('height') === `${height}px`)
|
|
41
|
-
return;
|
|
42
|
-
if (height === 0) {
|
|
43
|
-
q2Message.classList.add('invisible');
|
|
44
|
-
messageContainer.style.removeProperty('height');
|
|
45
|
-
}
|
|
46
|
-
else {
|
|
47
|
-
q2Message.classList.remove('invisible');
|
|
48
|
-
messageContainer.style.setProperty('height', `${height}px`);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
function setPopProperties(target) {
|
|
52
|
-
const { dropdownContainer, popDirection } = target;
|
|
53
|
-
if (dropdownContainer) {
|
|
54
|
-
dropdownContainer.style.maxHeight = null;
|
|
55
|
-
}
|
|
56
|
-
if (popDirection) {
|
|
57
|
-
return (target.privatePopDirection = popDirection);
|
|
58
|
-
}
|
|
59
|
-
const controlElement = target.inputField || target.controlElement;
|
|
60
|
-
const minPopHeight = target.minPopHeight || null;
|
|
61
|
-
// Add sizable so that we can capture the height
|
|
62
|
-
dropdownContainer.classList.add('sizable');
|
|
63
|
-
const dropdownHeight = dropdownContainer.getBoundingClientRect().height;
|
|
64
|
-
dropdownContainer.classList.remove('sizable');
|
|
65
|
-
const { top: topOffset, height } = controlElement.getBoundingClientRect();
|
|
66
|
-
const bottomOffset = window.innerHeight - topOffset - height;
|
|
67
|
-
const canShowFullSizeBelow = bottomOffset > dropdownHeight;
|
|
68
|
-
const canShowFullSizeAbove = dropdownHeight <= topOffset;
|
|
69
|
-
// Prefer full size above or below
|
|
70
|
-
if (canShowFullSizeBelow) {
|
|
71
|
-
return (target.privatePopDirection = 'down');
|
|
72
|
-
}
|
|
73
|
-
else if (canShowFullSizeAbove || !minPopHeight) {
|
|
74
|
-
return (target.privatePopDirection = 'up');
|
|
75
|
-
}
|
|
76
|
-
// If full size will not fit and minHeight is set, then make as tall as possible
|
|
77
|
-
const displayBuffer = 5;
|
|
78
|
-
const canShowSmallBelow = bottomOffset >= minPopHeight + displayBuffer;
|
|
79
|
-
if (canShowSmallBelow) {
|
|
80
|
-
const maxBelowHeight = Math.max(bottomOffset - displayBuffer, minPopHeight);
|
|
81
|
-
dropdownContainer.style.maxHeight = `${maxBelowHeight}px`;
|
|
82
|
-
return (target.privatePopDirection = 'down');
|
|
83
|
-
}
|
|
84
|
-
else {
|
|
85
|
-
const maxAboveHeight = Math.max(topOffset, minPopHeight);
|
|
86
|
-
dropdownContainer.style.maxHeight = `${maxAboveHeight}px`;
|
|
87
|
-
return (target.privatePopDirection = 'up');
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
export { setMessageHeight as a, labelDOM as b, createGuid as c, handleAriaLabel as h, loc as l, messagesDOM as m, setPopProperties as s };
|