q2-tecton-elements 1.23.0-alpha.0 → 1.24.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/action-sheet-4b366e9a.js +84 -0
- package/dist/cjs/charting-d02cba1f.js +3127 -0
- package/dist/cjs/{index-3518c78c.js → index-e00b4210.js} +33 -7
- package/dist/cjs/{installCanvasRenderer-b4d10c92.js → installCanvasRenderer-6c4fbcc9.js} +230 -1130
- package/dist/cjs/installLabelLayout-d6b548fe.js +1048 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/q2-action-sheet.cjs.entry.js +218 -0
- package/dist/cjs/q2-badge_2.cjs.entry.js +1 -1
- package/dist/cjs/q2-btn_2.cjs.entry.js +2 -2
- package/dist/cjs/q2-calendar.cjs.entry.js +1 -1
- package/dist/cjs/q2-card.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-chart-area.cjs.entry.js +4569 -0
- package/dist/cjs/q2-chart-bar.cjs.entry.js +25 -3133
- package/dist/cjs/q2-chart-donut.cjs.entry.js +9 -8
- package/dist/cjs/q2-checkbox-group.cjs.entry.js +1 -1
- package/dist/cjs/q2-checkbox.cjs.entry.js +2 -2
- package/dist/cjs/q2-dropdown-item.cjs.entry.js +1 -1
- package/dist/cjs/q2-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/q2-editable-field.cjs.entry.js +1 -1
- package/dist/cjs/q2-icon.cjs.entry.js +1 -1
- package/dist/cjs/q2-loading-element.cjs.entry.js +1 -1
- package/dist/cjs/q2-loc.cjs.entry.js +1 -1
- package/dist/cjs/q2-message.cjs.entry.js +1 -1
- package/dist/cjs/q2-month-picker.cjs.entry.js +1 -1
- package/dist/cjs/q2-optgroup_2.cjs.entry.js +93 -0
- package/dist/cjs/q2-option-list_2.cjs.entry.js +230 -88
- package/dist/cjs/q2-pagination.cjs.entry.js +1 -1
- package/dist/cjs/q2-pill.cjs.entry.js +57 -18
- 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 +149 -409
- package/dist/cjs/q2-stepper-pane.cjs.entry.js +1 -1
- package/dist/cjs/q2-stepper-vertical.cjs.entry.js +1 -1
- package/dist/cjs/q2-stepper.cjs.entry.js +1 -1
- package/dist/cjs/q2-tab-container.cjs.entry.js +1 -1
- package/dist/cjs/q2-tag.cjs.entry.js +21 -6
- package/dist/cjs/q2-tecton-elements.cjs.js +1 -1
- package/dist/cjs/q2-textarea.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/q2-action-sheet/index.js +345 -0
- package/dist/collection/components/q2-action-sheet/styles.css +215 -0
- package/dist/collection/components/q2-card/index.js +1 -1
- package/dist/collection/components/q2-chart-area/index.js +622 -0
- package/dist/collection/components/q2-chart-area/styles.css +82 -0
- package/dist/collection/components/q2-chart-bar/index.js +4 -4
- package/dist/collection/components/q2-chart-bar/styles.css +3 -6
- package/dist/collection/components/q2-chart-donut/index.js +1 -1
- package/dist/collection/components/q2-checkbox/index.js +2 -2
- package/dist/collection/components/q2-checkbox/styles.css +1 -0
- package/dist/collection/components/q2-dropdown/index.js +1 -1
- package/dist/collection/components/q2-loading/index.js +1 -1
- package/dist/collection/components/q2-loading/skeleton/q2-loading-element/styles.css +4 -0
- package/dist/collection/components/q2-loading/styles.css +4 -0
- package/dist/collection/components/q2-optgroup/styles.css +2 -2
- package/dist/collection/components/q2-option/index.js +1 -56
- package/dist/collection/components/q2-option/styles.css +7 -0
- package/dist/collection/components/q2-option-list/index.js +290 -102
- package/dist/collection/components/q2-pill/index.js +79 -18
- package/dist/collection/components/q2-pill/styles.css +1 -2
- package/dist/collection/components/q2-popover/index.js +21 -5
- package/dist/collection/components/q2-popover/styles.css +10 -67
- package/dist/collection/components/q2-radio/index.js +2 -2
- package/dist/collection/components/q2-select/index.js +197 -427
- package/dist/collection/components/q2-select/styles.css +5 -11
- package/dist/collection/components/q2-tag/index.js +38 -5
- package/dist/collection/utils/action-sheet.js +79 -0
- package/dist/collection/utils/index.js +31 -7
- package/dist/components/action-sheet.js +81 -0
- package/dist/components/charting.js +3113 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +2 -0
- package/dist/components/index10.js +1 -1
- package/dist/components/index11.js +42 -353
- package/dist/components/index12.js +44 -97
- package/dist/components/index13.js +495 -580
- package/dist/components/index14.js +137 -0
- package/dist/components/index15.js +626 -0
- package/dist/components/index5.js +1 -1
- package/dist/components/index6.js +1 -1
- package/dist/components/index7.js +1 -1
- package/dist/components/index8.js +1 -1
- package/dist/components/index9.js +3 -3
- package/dist/components/installCanvasRenderer.js +188 -1123
- package/dist/components/installLabelLayout.js +1042 -0
- package/dist/components/q2-action-sheet.d.ts +11 -0
- package/dist/components/q2-action-sheet.js +282 -0
- package/dist/components/q2-calendar.js +1 -1
- package/dist/components/q2-card.js +2 -2
- package/dist/components/q2-carousel-pane.js +1 -1
- package/dist/components/q2-carousel.js +1 -1
- package/dist/components/q2-chart-area.d.ts +11 -0
- package/dist/components/q2-chart-area.js +4604 -0
- package/dist/components/q2-chart-bar.js +11 -3119
- package/dist/components/q2-chart-donut.js +4 -3
- package/dist/components/q2-checkbox-group.js +1 -1
- package/dist/components/q2-checkbox.js +2 -2
- package/dist/components/q2-dropdown.js +2 -2
- package/dist/components/q2-editable-field.js +1 -1
- package/dist/components/q2-loading-element.js +1 -1
- package/dist/components/q2-loc.js +1 -1
- package/dist/components/q2-month-picker.js +1 -1
- package/dist/components/q2-optgroup.js +1 -70
- package/dist/components/q2-option-list.js +1 -1
- package/dist/components/q2-option.js +1 -76
- package/dist/components/q2-pagination.js +1 -1
- package/dist/components/q2-pill.js +62 -21
- package/dist/components/q2-popover.js +1 -1
- package/dist/components/q2-radio-group.js +1 -1
- package/dist/components/q2-radio.js +3 -3
- package/dist/components/q2-section.js +1 -1
- package/dist/components/q2-select.js +181 -427
- package/dist/components/q2-stepper-pane.js +1 -1
- package/dist/components/q2-stepper-vertical.js +1 -1
- package/dist/components/q2-stepper.js +1 -1
- package/dist/components/q2-tab-container.js +1 -1
- package/dist/components/q2-tag.js +24 -8
- package/dist/components/q2-textarea.js +1 -1
- package/dist/esm/action-sheet-a9597b32.js +81 -0
- package/dist/esm/charting-2a73ba8e.js +3113 -0
- package/dist/esm/{index-9c591682.js → index-ca21e539.js} +32 -8
- package/dist/esm/{installCanvasRenderer-0143b52d.js → installCanvasRenderer-4a470516.js} +188 -1123
- package/dist/esm/installLabelLayout-d660eaad.js +1042 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/q2-action-sheet.entry.js +214 -0
- package/dist/esm/q2-badge_2.entry.js +1 -1
- package/dist/esm/q2-btn_2.entry.js +2 -2
- package/dist/esm/q2-calendar.entry.js +1 -1
- package/dist/esm/q2-card.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-chart-area.entry.js +4565 -0
- package/dist/esm/q2-chart-bar.entry.js +11 -3119
- package/dist/esm/q2-chart-donut.entry.js +4 -3
- package/dist/esm/q2-checkbox-group.entry.js +1 -1
- package/dist/esm/q2-checkbox.entry.js +2 -2
- package/dist/esm/q2-dropdown-item.entry.js +1 -1
- package/dist/esm/q2-dropdown.entry.js +1 -1
- package/dist/esm/q2-editable-field.entry.js +1 -1
- package/dist/esm/q2-icon.entry.js +1 -1
- package/dist/esm/q2-loading-element.entry.js +1 -1
- package/dist/esm/q2-loc.entry.js +1 -1
- package/dist/esm/q2-message.entry.js +1 -1
- package/dist/esm/q2-month-picker.entry.js +1 -1
- package/dist/esm/q2-optgroup_2.entry.js +88 -0
- package/dist/esm/q2-option-list_2.entry.js +230 -88
- package/dist/esm/q2-pagination.entry.js +1 -1
- package/dist/esm/q2-pill.entry.js +57 -18
- 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 +149 -409
- package/dist/esm/q2-stepper-pane.entry.js +1 -1
- package/dist/esm/q2-stepper-vertical.entry.js +1 -1
- package/dist/esm/q2-stepper.entry.js +1 -1
- package/dist/esm/q2-tab-container.entry.js +1 -1
- package/dist/esm/q2-tag.entry.js +21 -6
- package/dist/esm/q2-tecton-elements.js +1 -1
- package/dist/esm/q2-textarea.entry.js +1 -1
- package/dist/q2-tecton-elements/{p-db873db2.entry.js → p-0473f4f7.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-520c40f6.entry.js → p-13a1390b.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-9ebb283a.entry.js → p-13deb3ed.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-0ba564b1.entry.js → p-1d854203.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-1f71774f.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-18cc4758.entry.js → p-256d3fe6.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-9281adaa.entry.js → p-282f0f8c.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-2d2c5af2.entry.js → p-30969629.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-30cd888b.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-fc134a5d.entry.js → p-37cf9c97.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-fb37e67e.entry.js → p-388349b5.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-458b1987.js +1 -0
- package/dist/q2-tecton-elements/p-52063431.js +39 -0
- package/dist/q2-tecton-elements/p-5589ae0f.entry.js +1 -0
- package/dist/q2-tecton-elements/p-619aed74.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-4625184b.entry.js → p-63b67260.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-e4dc9ac0.entry.js → p-63e363ad.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-cbd1289a.entry.js → p-6736df05.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-72fe10cc.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-c4640b55.entry.js → p-75b817c6.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-c3f27fe2.entry.js → p-7a116095.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-7c94119b.entry.js +1 -0
- package/dist/q2-tecton-elements/p-833398d1.js +1 -0
- package/dist/q2-tecton-elements/{p-ce015552.entry.js → p-90572e43.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-91153c61.entry.js +1 -0
- package/dist/q2-tecton-elements/p-9792de8a.entry.js +1 -0
- package/dist/q2-tecton-elements/p-9acfa94e.js +1 -0
- package/dist/q2-tecton-elements/p-a1926e65.js +1 -0
- package/dist/q2-tecton-elements/{p-ffb48ccc.entry.js → p-b3a8cdc5.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-ce3f203c.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-041b3a82.entry.js → p-ce91cd9b.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-b8b00394.entry.js → p-cefc9d0b.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-d05beeb7.entry.js +1 -0
- package/dist/q2-tecton-elements/p-dc7c8371.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-16c11d74.entry.js → p-e58581fc.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-f800fd1e.entry.js → p-e886c55b.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-6e6b5b80.entry.js → p-f0ec4d2c.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-97aa8423.entry.js → p-f94e7043.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-c444a60b.entry.js → p-fcb7d191.entry.js} +1 -1
- package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
- package/dist/test/helpers.js +3 -2
- package/dist/types/components/q2-action-sheet/index.d.ts +52 -0
- package/dist/types/components/q2-card/index.d.ts +1 -1
- package/dist/types/components/q2-chart-area/index.d.ts +40 -0
- package/dist/types/components/q2-chart-bar/index.d.ts +2 -2
- package/dist/types/components/q2-chart-donut/index.d.ts +1 -1
- package/dist/types/components/q2-checkbox/index.d.ts +4 -1
- package/dist/types/components/q2-option/index.d.ts +0 -3
- package/dist/types/components/q2-option-list/index.d.ts +16 -8
- package/dist/types/components/q2-pill/index.d.ts +10 -1
- package/dist/types/components/q2-popover/index.d.ts +2 -0
- package/dist/types/components/q2-select/index.d.ts +46 -47
- package/dist/types/components/q2-tag/index.d.ts +3 -2
- package/dist/types/components.d.ts +100 -13
- package/dist/types/global.d.ts +10 -1
- package/dist/types/utils/action-sheet.d.ts +12 -0
- package/dist/types/utils/index.d.ts +3 -1
- package/dist/types/workspace/workspace/{_production_release_1.22.x-alpha → Tecton_tecton-production_master}/packages/q2-tecton-elements/.stencil/test/helpers.d.ts +1 -1
- package/package.json +3 -2
- package/dist/cjs/q2-optgroup.cjs.entry.js +0 -56
- package/dist/cjs/q2-option.cjs.entry.js +0 -46
- package/dist/esm/q2-optgroup.entry.js +0 -52
- package/dist/esm/q2-option.entry.js +0 -42
- package/dist/q2-tecton-elements/p-0d8dd75a.entry.js +0 -1
- package/dist/q2-tecton-elements/p-0fad9c5a.entry.js +0 -1
- package/dist/q2-tecton-elements/p-1f85cced.js +0 -39
- package/dist/q2-tecton-elements/p-2c9b1308.entry.js +0 -1
- package/dist/q2-tecton-elements/p-5e374fbd.js +0 -1
- package/dist/q2-tecton-elements/p-6b52a262.entry.js +0 -1
- package/dist/q2-tecton-elements/p-aaf42539.entry.js +0 -1
- package/dist/q2-tecton-elements/p-cf41970f.entry.js +0 -1
- package/dist/q2-tecton-elements/p-de164483.entry.js +0 -1
- package/dist/q2-tecton-elements/p-e6d26f39.entry.js +0 -1
- package/dist/q2-tecton-elements/p-f1d06917.entry.js +0 -1
- package/dist/q2-tecton-elements/p-f35bf6a3.entry.js +0 -1
|
@@ -0,0 +1,626 @@
|
|
|
1
|
+
import { h } from '@stencil/core/internal/client';
|
|
2
|
+
|
|
3
|
+
function createCommonjsModule(fn, basedir, module) {
|
|
4
|
+
return module = {
|
|
5
|
+
path: basedir,
|
|
6
|
+
exports: {},
|
|
7
|
+
require: function (path, base) {
|
|
8
|
+
return commonjsRequire();
|
|
9
|
+
}
|
|
10
|
+
}, fn(module, module.exports), module.exports;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function commonjsRequire () {
|
|
14
|
+
throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
var smoothscroll = createCommonjsModule(function (module, exports) {
|
|
18
|
+
/* smoothscroll v0.4.4 - 2019 - Dustan Kasten, Jeremias Menichelli - MIT License */
|
|
19
|
+
(function () {
|
|
20
|
+
|
|
21
|
+
// polyfill
|
|
22
|
+
function polyfill() {
|
|
23
|
+
// aliases
|
|
24
|
+
var w = window;
|
|
25
|
+
var d = document;
|
|
26
|
+
|
|
27
|
+
// return if scroll behavior is supported and polyfill is not forced
|
|
28
|
+
if (
|
|
29
|
+
'scrollBehavior' in d.documentElement.style &&
|
|
30
|
+
w.__forceSmoothScrollPolyfill__ !== true
|
|
31
|
+
) {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// globals
|
|
36
|
+
var Element = w.HTMLElement || w.Element;
|
|
37
|
+
var SCROLL_TIME = 468;
|
|
38
|
+
|
|
39
|
+
// object gathering original scroll methods
|
|
40
|
+
var original = {
|
|
41
|
+
scroll: w.scroll || w.scrollTo,
|
|
42
|
+
scrollBy: w.scrollBy,
|
|
43
|
+
elementScroll: Element.prototype.scroll || scrollElement,
|
|
44
|
+
scrollIntoView: Element.prototype.scrollIntoView
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
// define timing method
|
|
48
|
+
var now =
|
|
49
|
+
w.performance && w.performance.now
|
|
50
|
+
? w.performance.now.bind(w.performance)
|
|
51
|
+
: Date.now;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* indicates if a the current browser is made by Microsoft
|
|
55
|
+
* @method isMicrosoftBrowser
|
|
56
|
+
* @param {String} userAgent
|
|
57
|
+
* @returns {Boolean}
|
|
58
|
+
*/
|
|
59
|
+
function isMicrosoftBrowser(userAgent) {
|
|
60
|
+
var userAgentPatterns = ['MSIE ', 'Trident/', 'Edge/'];
|
|
61
|
+
|
|
62
|
+
return new RegExp(userAgentPatterns.join('|')).test(userAgent);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/*
|
|
66
|
+
* IE has rounding bug rounding down clientHeight and clientWidth and
|
|
67
|
+
* rounding up scrollHeight and scrollWidth causing false positives
|
|
68
|
+
* on hasScrollableSpace
|
|
69
|
+
*/
|
|
70
|
+
var ROUNDING_TOLERANCE = isMicrosoftBrowser(w.navigator.userAgent) ? 1 : 0;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* changes scroll position inside an element
|
|
74
|
+
* @method scrollElement
|
|
75
|
+
* @param {Number} x
|
|
76
|
+
* @param {Number} y
|
|
77
|
+
* @returns {undefined}
|
|
78
|
+
*/
|
|
79
|
+
function scrollElement(x, y) {
|
|
80
|
+
this.scrollLeft = x;
|
|
81
|
+
this.scrollTop = y;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* returns result of applying ease math function to a number
|
|
86
|
+
* @method ease
|
|
87
|
+
* @param {Number} k
|
|
88
|
+
* @returns {Number}
|
|
89
|
+
*/
|
|
90
|
+
function ease(k) {
|
|
91
|
+
return 0.5 * (1 - Math.cos(Math.PI * k));
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* indicates if a smooth behavior should be applied
|
|
96
|
+
* @method shouldBailOut
|
|
97
|
+
* @param {Number|Object} firstArg
|
|
98
|
+
* @returns {Boolean}
|
|
99
|
+
*/
|
|
100
|
+
function shouldBailOut(firstArg) {
|
|
101
|
+
if (
|
|
102
|
+
firstArg === null ||
|
|
103
|
+
typeof firstArg !== 'object' ||
|
|
104
|
+
firstArg.behavior === undefined ||
|
|
105
|
+
firstArg.behavior === 'auto' ||
|
|
106
|
+
firstArg.behavior === 'instant'
|
|
107
|
+
) {
|
|
108
|
+
// first argument is not an object/null
|
|
109
|
+
// or behavior is auto, instant or undefined
|
|
110
|
+
return true;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
if (typeof firstArg === 'object' && firstArg.behavior === 'smooth') {
|
|
114
|
+
// first argument is an object and behavior is smooth
|
|
115
|
+
return false;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// throw error when behavior is not supported
|
|
119
|
+
throw new TypeError(
|
|
120
|
+
'behavior member of ScrollOptions ' +
|
|
121
|
+
firstArg.behavior +
|
|
122
|
+
' is not a valid value for enumeration ScrollBehavior.'
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* indicates if an element has scrollable space in the provided axis
|
|
128
|
+
* @method hasScrollableSpace
|
|
129
|
+
* @param {Node} el
|
|
130
|
+
* @param {String} axis
|
|
131
|
+
* @returns {Boolean}
|
|
132
|
+
*/
|
|
133
|
+
function hasScrollableSpace(el, axis) {
|
|
134
|
+
if (axis === 'Y') {
|
|
135
|
+
return el.clientHeight + ROUNDING_TOLERANCE < el.scrollHeight;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
if (axis === 'X') {
|
|
139
|
+
return el.clientWidth + ROUNDING_TOLERANCE < el.scrollWidth;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* indicates if an element has a scrollable overflow property in the axis
|
|
145
|
+
* @method canOverflow
|
|
146
|
+
* @param {Node} el
|
|
147
|
+
* @param {String} axis
|
|
148
|
+
* @returns {Boolean}
|
|
149
|
+
*/
|
|
150
|
+
function canOverflow(el, axis) {
|
|
151
|
+
var overflowValue = w.getComputedStyle(el, null)['overflow' + axis];
|
|
152
|
+
|
|
153
|
+
return overflowValue === 'auto' || overflowValue === 'scroll';
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* indicates if an element can be scrolled in either axis
|
|
158
|
+
* @method isScrollable
|
|
159
|
+
* @param {Node} el
|
|
160
|
+
* @param {String} axis
|
|
161
|
+
* @returns {Boolean}
|
|
162
|
+
*/
|
|
163
|
+
function isScrollable(el) {
|
|
164
|
+
var isScrollableY = hasScrollableSpace(el, 'Y') && canOverflow(el, 'Y');
|
|
165
|
+
var isScrollableX = hasScrollableSpace(el, 'X') && canOverflow(el, 'X');
|
|
166
|
+
|
|
167
|
+
return isScrollableY || isScrollableX;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* finds scrollable parent of an element
|
|
172
|
+
* @method findScrollableParent
|
|
173
|
+
* @param {Node} el
|
|
174
|
+
* @returns {Node} el
|
|
175
|
+
*/
|
|
176
|
+
function findScrollableParent(el) {
|
|
177
|
+
while (el !== d.body && isScrollable(el) === false) {
|
|
178
|
+
el = el.parentNode || el.host;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
return el;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* self invoked function that, given a context, steps through scrolling
|
|
186
|
+
* @method step
|
|
187
|
+
* @param {Object} context
|
|
188
|
+
* @returns {undefined}
|
|
189
|
+
*/
|
|
190
|
+
function step(context) {
|
|
191
|
+
var time = now();
|
|
192
|
+
var value;
|
|
193
|
+
var currentX;
|
|
194
|
+
var currentY;
|
|
195
|
+
var elapsed = (time - context.startTime) / SCROLL_TIME;
|
|
196
|
+
|
|
197
|
+
// avoid elapsed times higher than one
|
|
198
|
+
elapsed = elapsed > 1 ? 1 : elapsed;
|
|
199
|
+
|
|
200
|
+
// apply easing to elapsed time
|
|
201
|
+
value = ease(elapsed);
|
|
202
|
+
|
|
203
|
+
currentX = context.startX + (context.x - context.startX) * value;
|
|
204
|
+
currentY = context.startY + (context.y - context.startY) * value;
|
|
205
|
+
|
|
206
|
+
context.method.call(context.scrollable, currentX, currentY);
|
|
207
|
+
|
|
208
|
+
// scroll more if we have not reached our destination
|
|
209
|
+
if (currentX !== context.x || currentY !== context.y) {
|
|
210
|
+
w.requestAnimationFrame(step.bind(w, context));
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* scrolls window or element with a smooth behavior
|
|
216
|
+
* @method smoothScroll
|
|
217
|
+
* @param {Object|Node} el
|
|
218
|
+
* @param {Number} x
|
|
219
|
+
* @param {Number} y
|
|
220
|
+
* @returns {undefined}
|
|
221
|
+
*/
|
|
222
|
+
function smoothScroll(el, x, y) {
|
|
223
|
+
var scrollable;
|
|
224
|
+
var startX;
|
|
225
|
+
var startY;
|
|
226
|
+
var method;
|
|
227
|
+
var startTime = now();
|
|
228
|
+
|
|
229
|
+
// define scroll context
|
|
230
|
+
if (el === d.body) {
|
|
231
|
+
scrollable = w;
|
|
232
|
+
startX = w.scrollX || w.pageXOffset;
|
|
233
|
+
startY = w.scrollY || w.pageYOffset;
|
|
234
|
+
method = original.scroll;
|
|
235
|
+
} else {
|
|
236
|
+
scrollable = el;
|
|
237
|
+
startX = el.scrollLeft;
|
|
238
|
+
startY = el.scrollTop;
|
|
239
|
+
method = scrollElement;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
// scroll looping over a frame
|
|
243
|
+
step({
|
|
244
|
+
scrollable: scrollable,
|
|
245
|
+
method: method,
|
|
246
|
+
startTime: startTime,
|
|
247
|
+
startX: startX,
|
|
248
|
+
startY: startY,
|
|
249
|
+
x: x,
|
|
250
|
+
y: y
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
// ORIGINAL METHODS OVERRIDES
|
|
255
|
+
// w.scroll and w.scrollTo
|
|
256
|
+
w.scroll = w.scrollTo = function() {
|
|
257
|
+
// avoid action when no arguments are passed
|
|
258
|
+
if (arguments[0] === undefined) {
|
|
259
|
+
return;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
// avoid smooth behavior if not required
|
|
263
|
+
if (shouldBailOut(arguments[0]) === true) {
|
|
264
|
+
original.scroll.call(
|
|
265
|
+
w,
|
|
266
|
+
arguments[0].left !== undefined
|
|
267
|
+
? arguments[0].left
|
|
268
|
+
: typeof arguments[0] !== 'object'
|
|
269
|
+
? arguments[0]
|
|
270
|
+
: w.scrollX || w.pageXOffset,
|
|
271
|
+
// use top prop, second argument if present or fallback to scrollY
|
|
272
|
+
arguments[0].top !== undefined
|
|
273
|
+
? arguments[0].top
|
|
274
|
+
: arguments[1] !== undefined
|
|
275
|
+
? arguments[1]
|
|
276
|
+
: w.scrollY || w.pageYOffset
|
|
277
|
+
);
|
|
278
|
+
|
|
279
|
+
return;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
// LET THE SMOOTHNESS BEGIN!
|
|
283
|
+
smoothScroll.call(
|
|
284
|
+
w,
|
|
285
|
+
d.body,
|
|
286
|
+
arguments[0].left !== undefined
|
|
287
|
+
? ~~arguments[0].left
|
|
288
|
+
: w.scrollX || w.pageXOffset,
|
|
289
|
+
arguments[0].top !== undefined
|
|
290
|
+
? ~~arguments[0].top
|
|
291
|
+
: w.scrollY || w.pageYOffset
|
|
292
|
+
);
|
|
293
|
+
};
|
|
294
|
+
|
|
295
|
+
// w.scrollBy
|
|
296
|
+
w.scrollBy = function() {
|
|
297
|
+
// avoid action when no arguments are passed
|
|
298
|
+
if (arguments[0] === undefined) {
|
|
299
|
+
return;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
// avoid smooth behavior if not required
|
|
303
|
+
if (shouldBailOut(arguments[0])) {
|
|
304
|
+
original.scrollBy.call(
|
|
305
|
+
w,
|
|
306
|
+
arguments[0].left !== undefined
|
|
307
|
+
? arguments[0].left
|
|
308
|
+
: typeof arguments[0] !== 'object' ? arguments[0] : 0,
|
|
309
|
+
arguments[0].top !== undefined
|
|
310
|
+
? arguments[0].top
|
|
311
|
+
: arguments[1] !== undefined ? arguments[1] : 0
|
|
312
|
+
);
|
|
313
|
+
|
|
314
|
+
return;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
// LET THE SMOOTHNESS BEGIN!
|
|
318
|
+
smoothScroll.call(
|
|
319
|
+
w,
|
|
320
|
+
d.body,
|
|
321
|
+
~~arguments[0].left + (w.scrollX || w.pageXOffset),
|
|
322
|
+
~~arguments[0].top + (w.scrollY || w.pageYOffset)
|
|
323
|
+
);
|
|
324
|
+
};
|
|
325
|
+
|
|
326
|
+
// Element.prototype.scroll and Element.prototype.scrollTo
|
|
327
|
+
Element.prototype.scroll = Element.prototype.scrollTo = function() {
|
|
328
|
+
// avoid action when no arguments are passed
|
|
329
|
+
if (arguments[0] === undefined) {
|
|
330
|
+
return;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
// avoid smooth behavior if not required
|
|
334
|
+
if (shouldBailOut(arguments[0]) === true) {
|
|
335
|
+
// if one number is passed, throw error to match Firefox implementation
|
|
336
|
+
if (typeof arguments[0] === 'number' && arguments[1] === undefined) {
|
|
337
|
+
throw new SyntaxError('Value could not be converted');
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
original.elementScroll.call(
|
|
341
|
+
this,
|
|
342
|
+
// use left prop, first number argument or fallback to scrollLeft
|
|
343
|
+
arguments[0].left !== undefined
|
|
344
|
+
? ~~arguments[0].left
|
|
345
|
+
: typeof arguments[0] !== 'object' ? ~~arguments[0] : this.scrollLeft,
|
|
346
|
+
// use top prop, second argument or fallback to scrollTop
|
|
347
|
+
arguments[0].top !== undefined
|
|
348
|
+
? ~~arguments[0].top
|
|
349
|
+
: arguments[1] !== undefined ? ~~arguments[1] : this.scrollTop
|
|
350
|
+
);
|
|
351
|
+
|
|
352
|
+
return;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
var left = arguments[0].left;
|
|
356
|
+
var top = arguments[0].top;
|
|
357
|
+
|
|
358
|
+
// LET THE SMOOTHNESS BEGIN!
|
|
359
|
+
smoothScroll.call(
|
|
360
|
+
this,
|
|
361
|
+
this,
|
|
362
|
+
typeof left === 'undefined' ? this.scrollLeft : ~~left,
|
|
363
|
+
typeof top === 'undefined' ? this.scrollTop : ~~top
|
|
364
|
+
);
|
|
365
|
+
};
|
|
366
|
+
|
|
367
|
+
// Element.prototype.scrollBy
|
|
368
|
+
Element.prototype.scrollBy = function() {
|
|
369
|
+
// avoid action when no arguments are passed
|
|
370
|
+
if (arguments[0] === undefined) {
|
|
371
|
+
return;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
// avoid smooth behavior if not required
|
|
375
|
+
if (shouldBailOut(arguments[0]) === true) {
|
|
376
|
+
original.elementScroll.call(
|
|
377
|
+
this,
|
|
378
|
+
arguments[0].left !== undefined
|
|
379
|
+
? ~~arguments[0].left + this.scrollLeft
|
|
380
|
+
: ~~arguments[0] + this.scrollLeft,
|
|
381
|
+
arguments[0].top !== undefined
|
|
382
|
+
? ~~arguments[0].top + this.scrollTop
|
|
383
|
+
: ~~arguments[1] + this.scrollTop
|
|
384
|
+
);
|
|
385
|
+
|
|
386
|
+
return;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
this.scroll({
|
|
390
|
+
left: ~~arguments[0].left + this.scrollLeft,
|
|
391
|
+
top: ~~arguments[0].top + this.scrollTop,
|
|
392
|
+
behavior: arguments[0].behavior
|
|
393
|
+
});
|
|
394
|
+
};
|
|
395
|
+
|
|
396
|
+
// Element.prototype.scrollIntoView
|
|
397
|
+
Element.prototype.scrollIntoView = function() {
|
|
398
|
+
// avoid smooth behavior if not required
|
|
399
|
+
if (shouldBailOut(arguments[0]) === true) {
|
|
400
|
+
original.scrollIntoView.call(
|
|
401
|
+
this,
|
|
402
|
+
arguments[0] === undefined ? true : arguments[0]
|
|
403
|
+
);
|
|
404
|
+
|
|
405
|
+
return;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
// LET THE SMOOTHNESS BEGIN!
|
|
409
|
+
var scrollableParent = findScrollableParent(this);
|
|
410
|
+
var parentRects = scrollableParent.getBoundingClientRect();
|
|
411
|
+
var clientRects = this.getBoundingClientRect();
|
|
412
|
+
|
|
413
|
+
if (scrollableParent !== d.body) {
|
|
414
|
+
// reveal element inside parent
|
|
415
|
+
smoothScroll.call(
|
|
416
|
+
this,
|
|
417
|
+
scrollableParent,
|
|
418
|
+
scrollableParent.scrollLeft + clientRects.left - parentRects.left,
|
|
419
|
+
scrollableParent.scrollTop + clientRects.top - parentRects.top
|
|
420
|
+
);
|
|
421
|
+
|
|
422
|
+
// reveal parent in viewport unless is fixed
|
|
423
|
+
if (w.getComputedStyle(scrollableParent).position !== 'fixed') {
|
|
424
|
+
w.scrollBy({
|
|
425
|
+
left: parentRects.left,
|
|
426
|
+
top: parentRects.top,
|
|
427
|
+
behavior: 'smooth'
|
|
428
|
+
});
|
|
429
|
+
}
|
|
430
|
+
} else {
|
|
431
|
+
// reveal element in viewport
|
|
432
|
+
w.scrollBy({
|
|
433
|
+
left: clientRects.left,
|
|
434
|
+
top: clientRects.top,
|
|
435
|
+
behavior: 'smooth'
|
|
436
|
+
});
|
|
437
|
+
}
|
|
438
|
+
};
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
{
|
|
442
|
+
// commonjs
|
|
443
|
+
module.exports = { polyfill: polyfill };
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
}());
|
|
447
|
+
});
|
|
448
|
+
|
|
449
|
+
function isHostLosingFocus(event, hostElement) {
|
|
450
|
+
const type = event.type;
|
|
451
|
+
const focusInTypes = ['focusin', 'focus'];
|
|
452
|
+
const isFocusIn = focusInTypes.includes(type);
|
|
453
|
+
// on focusin: `target` is element losing focus, `relatedTarget` is element gaining focus
|
|
454
|
+
// on focusout: `target` is element gaining focus, `relatedTarget` is element losing focus
|
|
455
|
+
const elementGainingFocus = isFocusIn ? event.target : event.relatedTarget;
|
|
456
|
+
const isElementNestedInHostElement = (element) => {
|
|
457
|
+
if (element === hostElement)
|
|
458
|
+
return true;
|
|
459
|
+
if (element.parentElement) {
|
|
460
|
+
return isElementNestedInHostElement(element.parentElement);
|
|
461
|
+
}
|
|
462
|
+
return false;
|
|
463
|
+
};
|
|
464
|
+
if (!(elementGainingFocus instanceof HTMLElement))
|
|
465
|
+
return false;
|
|
466
|
+
return !isElementNestedInHostElement(elementGainingFocus);
|
|
467
|
+
}
|
|
468
|
+
function isRelatedTargetWithinHost(event, element) {
|
|
469
|
+
return event.relatedTarget !== element && !element.contains(event.relatedTarget);
|
|
470
|
+
}
|
|
471
|
+
function isEventFromElement(event, element) {
|
|
472
|
+
var _a;
|
|
473
|
+
return ((_a = event.composedPath) === null || _a === void 0 ? void 0 : _a.call(event)[0]) === element;
|
|
474
|
+
}
|
|
475
|
+
function overrideFocus(hostElement) {
|
|
476
|
+
hostElement.focus = () => hostElement === null || hostElement === void 0 ? void 0 : hostElement.dispatchEvent(new FocusEvent('focus', { bubbles: false }));
|
|
477
|
+
}
|
|
478
|
+
function addSmoothScrollPolyfill() {
|
|
479
|
+
if (!isSafari())
|
|
480
|
+
return false;
|
|
481
|
+
smoothscroll.polyfill();
|
|
482
|
+
return (window.__forceSmoothScrollPolyfill__ = true);
|
|
483
|
+
}
|
|
484
|
+
function isFirefox() {
|
|
485
|
+
const userAgent = navigator.userAgent.toLowerCase();
|
|
486
|
+
return userAgent.includes('firefox');
|
|
487
|
+
}
|
|
488
|
+
function isTouchDevice() {
|
|
489
|
+
return 'ontouchstart' in window || navigator.maxTouchPoints > 0;
|
|
490
|
+
}
|
|
491
|
+
function isSafari() {
|
|
492
|
+
const userAgent = navigator.userAgent.toLowerCase();
|
|
493
|
+
return userAgent.includes('safari') && !userAgent.includes('chrome');
|
|
494
|
+
}
|
|
495
|
+
let guid = 1000;
|
|
496
|
+
function createGuid() {
|
|
497
|
+
return guid++;
|
|
498
|
+
}
|
|
499
|
+
function nextPaint(fn) {
|
|
500
|
+
requestAnimationFrame(() => {
|
|
501
|
+
requestAnimationFrame(fn);
|
|
502
|
+
});
|
|
503
|
+
}
|
|
504
|
+
function waitForNextPaint() {
|
|
505
|
+
return new Promise(resolve => nextPaint(resolve));
|
|
506
|
+
}
|
|
507
|
+
function loc(key, subs) {
|
|
508
|
+
var _a, _b, _c;
|
|
509
|
+
if (!key)
|
|
510
|
+
return '';
|
|
511
|
+
if (((_a = window.Tecton) === null || _a === void 0 ? void 0 : _a.noStrings) === true) {
|
|
512
|
+
return key;
|
|
513
|
+
}
|
|
514
|
+
return (_c = (_b = window === null || window === void 0 ? void 0 : window.TectonElements) === null || _b === void 0 ? void 0 : _b.loc(key, subs)) !== null && _c !== void 0 ? _c : key;
|
|
515
|
+
}
|
|
516
|
+
function labelDOM(target) {
|
|
517
|
+
const { label, hideLabel } = target;
|
|
518
|
+
if (!label || hideLabel)
|
|
519
|
+
return;
|
|
520
|
+
let helpText = '';
|
|
521
|
+
if (target.optional) {
|
|
522
|
+
helpText = h("span", { class: "optional-tag" }, loc('tecton.element.input.optional'));
|
|
523
|
+
}
|
|
524
|
+
if (target.readonly) {
|
|
525
|
+
helpText = h("span", { class: "optional-tag" }, loc('tecton.element.input.readonly'));
|
|
526
|
+
}
|
|
527
|
+
return (h("label", { htmlFor: target.inputId, class: target.readonly ? 'readonly-field' : '' },
|
|
528
|
+
loc(target.label),
|
|
529
|
+
helpText));
|
|
530
|
+
}
|
|
531
|
+
function handleAriaLabel(target) {
|
|
532
|
+
const { ariaLabel } = target;
|
|
533
|
+
if (!ariaLabel)
|
|
534
|
+
return;
|
|
535
|
+
if ('hideLabel' in target)
|
|
536
|
+
target.hideLabel = true;
|
|
537
|
+
target.label = loc(ariaLabel);
|
|
538
|
+
target.ariaLabel = undefined;
|
|
539
|
+
}
|
|
540
|
+
function messagesDOM(target) {
|
|
541
|
+
const type = target.hasError ? 'danger' : 'info';
|
|
542
|
+
return (h("div", { class: "messages-container" },
|
|
543
|
+
h("q2-message", { appearance: "minimal", description: true, type: type },
|
|
544
|
+
h("ul", { id: target.inputDescribedBy }, target.messages.map(message => (h("li", null, loc(message))))))));
|
|
545
|
+
}
|
|
546
|
+
function setMessageHeight(target) {
|
|
547
|
+
const messageContainer = target.hostElement.shadowRoot.querySelector('.messages-container');
|
|
548
|
+
const q2Message = messageContainer.querySelector('q2-message');
|
|
549
|
+
nextPaint(() => {
|
|
550
|
+
const height = target.showMessages && target.hasFocus ? q2Message.getBoundingClientRect().height : 0;
|
|
551
|
+
if (messageContainer.style.getPropertyValue('height') === `${height}px`)
|
|
552
|
+
return;
|
|
553
|
+
if (height === 0) {
|
|
554
|
+
q2Message.classList.add('invisible');
|
|
555
|
+
messageContainer.style.removeProperty('height');
|
|
556
|
+
}
|
|
557
|
+
else {
|
|
558
|
+
q2Message.classList.remove('invisible');
|
|
559
|
+
messageContainer.style.setProperty('height', `${height}px`);
|
|
560
|
+
}
|
|
561
|
+
});
|
|
562
|
+
}
|
|
563
|
+
function setPopProperties(target) {
|
|
564
|
+
var _a, _b, _c, _d;
|
|
565
|
+
const { dropdownContainer, popDirection } = target;
|
|
566
|
+
if (dropdownContainer) {
|
|
567
|
+
dropdownContainer.style.maxHeight = null;
|
|
568
|
+
}
|
|
569
|
+
if (popDirection) {
|
|
570
|
+
return (target.privatePopDirection = popDirection);
|
|
571
|
+
}
|
|
572
|
+
const controlElement = target.inputField || target.controlElement;
|
|
573
|
+
const minPopHeight = target.minPopHeight || null;
|
|
574
|
+
// Add sizable so that we can capture the height
|
|
575
|
+
dropdownContainer.classList.add('sizable');
|
|
576
|
+
const dropdownHeight = dropdownContainer.getBoundingClientRect().height;
|
|
577
|
+
dropdownContainer.classList.remove('sizable');
|
|
578
|
+
const { top: topOffset, height } = controlElement.getBoundingClientRect();
|
|
579
|
+
const scrollY = ((_b = (_a = window.Tecton) === null || _a === void 0 ? void 0 : _a.platformDimensions) === null || _b === void 0 ? void 0 : _b.scrollY) || 0;
|
|
580
|
+
const innerHeight = ((_d = (_c = window.Tecton) === null || _c === void 0 ? void 0 : _c.platformDimensions) === null || _d === void 0 ? void 0 : _d.innerHeight) || window.innerHeight;
|
|
581
|
+
const bottomOffset = scrollY + innerHeight - topOffset - height;
|
|
582
|
+
const canShowFullSizeBelow = bottomOffset > dropdownHeight;
|
|
583
|
+
const canShowFullSizeAbove = dropdownHeight <= topOffset;
|
|
584
|
+
// Prefer full size above or below
|
|
585
|
+
if (canShowFullSizeBelow) {
|
|
586
|
+
return (target.privatePopDirection = 'down');
|
|
587
|
+
}
|
|
588
|
+
else if (canShowFullSizeAbove || !minPopHeight) {
|
|
589
|
+
determinePopOffset(target);
|
|
590
|
+
return (target.privatePopDirection = 'up');
|
|
591
|
+
}
|
|
592
|
+
// If full size will not fit and minHeight is set, then make as tall as possible
|
|
593
|
+
const displayBuffer = 5;
|
|
594
|
+
const canShowSmallBelow = bottomOffset >= minPopHeight + displayBuffer;
|
|
595
|
+
if (canShowSmallBelow) {
|
|
596
|
+
const maxBelowHeight = Math.max(bottomOffset - displayBuffer, minPopHeight);
|
|
597
|
+
dropdownContainer.style.maxHeight = `${maxBelowHeight}px`;
|
|
598
|
+
return (target.privatePopDirection = 'down');
|
|
599
|
+
}
|
|
600
|
+
else {
|
|
601
|
+
const maxAboveHeight = Math.max(topOffset, minPopHeight);
|
|
602
|
+
dropdownContainer.style.maxHeight = `${maxAboveHeight}px`;
|
|
603
|
+
determinePopOffset(target);
|
|
604
|
+
return (target.privatePopDirection = 'up');
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
const determinePopOffset = ({ dropdownContainer, inputField }) => {
|
|
608
|
+
var _a, _b;
|
|
609
|
+
if (!inputField)
|
|
610
|
+
return;
|
|
611
|
+
const inputFieldHeight = (_b = (_a = inputField.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.input-field')) === null || _b === void 0 ? void 0 : _b.getBoundingClientRect().height;
|
|
612
|
+
dropdownContainer.style.setProperty('--comp-dropup-offset', `${inputFieldHeight}px`);
|
|
613
|
+
};
|
|
614
|
+
const resizeIframe = () => {
|
|
615
|
+
var _a, _b;
|
|
616
|
+
return (_b = (_a = window.TectonElements) === null || _a === void 0 ? void 0 : _a.resizeIframe) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
617
|
+
};
|
|
618
|
+
// Handling color attribute (deprecated)
|
|
619
|
+
const handleColor = (target) => {
|
|
620
|
+
if (!target.intent && ['primary', 'secondary'].includes(target.color)) {
|
|
621
|
+
target.intent = `workflow-${target.color}`;
|
|
622
|
+
target.color = undefined;
|
|
623
|
+
}
|
|
624
|
+
};
|
|
625
|
+
|
|
626
|
+
export { isTouchDevice as a, isRelatedTargetWithinHost as b, createGuid as c, isHostLosingFocus as d, addSmoothScrollPolyfill as e, setMessageHeight as f, labelDOM as g, handleAriaLabel as h, isEventFromElement as i, handleColor as j, isFirefox as k, loc as l, messagesDOM as m, nextPaint as n, overrideFocus as o, resizeIframe as r, setPopProperties as s, waitForNextPaint as w };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
|
-
import { h as handleAriaLabel,
|
|
2
|
+
import { h as handleAriaLabel, j as handleColor, o as overrideFocus, i as isEventFromElement, l as loc } from './index15.js';
|
|
3
3
|
import { d as defineCustomElement$1 } from './index9.js';
|
|
4
4
|
|
|
5
5
|
const stylesCss = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #33b4ff #06C)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch: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}:host([hidden]){display:none}:host([block]){display:block;width:100%}:host{--comp-btn-primary-bg:var(--tct-btn-primary-bg, var(--t-btn-primary-bg, #2e2e2e));--comp-btn-primary-font-color:var(--tct-btn-primary-font-color, var(--t-btn-primary-font-color, var(--tct-white, var(--app-white, #ffffff))));--comp-btn-fallback-box-shadow:0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);--comp-btn-fallback-hover-box-shadow:0 5px 10px rgba(0, 0, 0, 0.19), 0 3px 3px rgba(0, 0, 0, 0.23);--comp-btn-neutral-fallback-hover-box-shadow:0 5px 10px rgba(0, 0, 0, 0.24), 0 3px 3px rgba(0, 0, 0, 0.36);--comp-btn-primary-box-shadow:var(--tct-btn-primary-box-shadow, var(--t-btn-primary-box-shadow, var(--comp-btn-fallback-box-shadow)));--comp-btn-primary-hover-box-shadow:var(--tct-btn-primary-hover-box-shadow, var(--t-btn-primary-hover-box-shadow, var(--comp-btn-fallback-hover-box-shadow)));--comp-btn-secondary-bg:var(--tct-btn-secondary-bg, var(--t-button-default-bg, #cccccc));--comp-btn-secondary-font-color:var(--tct-btn-secondary-font-color, var(--t-btn-secondary-font-color, var(--t-button-default-font-color, #2e2e2e)));--comp-btn-secondary-box-shadow:var(--tct-btn-secondary-box-shadow, var(--t-btn-secondary-box-shadow, var(--comp-btn-fallback-box-shadow)));--comp-btn-secondary-hover-box-shadow:var(--tct-btn-secondary-hover-box-shadow, var(--t-btn-secondary-hover-box-shadow, var(--comp-btn-fallback-hover-box-shadow)));--comp-btn-tween:var(--tct-btn-tween, var(--t-btn-tween, var(--tct-tween-1, var(--app-tween-1, 0.2s ease))));--comp-btn-neutral-bg:var(--tct-btn-neutral-bg, transparent);--comp-btn-neutral-font-color:var(--tct-btn-neutral-font-color, var(--t-btn-neutral-font-color, var(--t-button-default-font-color, #2e2e2e)));--comp-btn-neutral-box-shadow:var(--tct-btn-neutral-box-shadow, var(--t-btn-neutral-box-shadow, var(--comp-btn-fallback-box-shadow)));--comp-btn-neutral-hover-box-shadow:var(--tct-btn-neutral-hover-box-shadow, var(--t-btn-neutral-hover-box-shadow, var(--comp-btn-neutral-fallback-hover-box-shadow)))}button{margin:var(--tct-scale-0, var(--app-scale-0x, 0));padding:var(--tct-scale-0, var(--app-scale-0x, 0));display:inline-block;width:100%;hyphens:auto;border:0;background:transparent;box-shadow:none;border-radius:0;font-weight:400;color:inherit;cursor:pointer;transition:var(--comp-btn-tween);transition-property:background, color, box-shadow, fill, border-color, border-width;outline:0}button:disabled{opacity:var(--tct-btn-disabled-opacity, var(--t-btn-disabled-opacity, var(--tct-disabled-opacity, var(--app-disabled-opacity, 0.4))));cursor:not-allowed}:host([size=\"1\"]) button{padding:var(--tct-scale-1, var(--app-scale-1x, 5px))}:host([color]:not([size])) button,:host([intent]:not([size])) button{padding:var(--tct-btn-padding, var(--t-btn-padding, var(--tct-scale-2, var(--app-scale-2x, 10px))))}:host([size=\"2\"]) button{padding:var(--tct-scale-2, var(--app-scale-2x, 10px))}:host([size=\"3\"]) button{padding:var(--tct-scale-3, var(--app-scale-3x, 15px))}:host([size=\"4x\"]) button{padding:var(--tct-scale-4x, var(--app-scale-4x, 20px))}:host([size=\"4\"]) button{padding:var(--tct-scale-6x, var(--app-scale-6x, 30px))}:host([color]) button,:host([intent]) button{border-style:solid;font-size:var(--tct-btn-font-size, var(--t-btn-font-size, inherit))}:host([color=primary]) button,:host([intent=workflow-primary]) button{background:var(--comp-btn-primary-bg);color:var(--comp-btn-primary-font-color);border-color:var(--tct-btn-primary-border-color, var(--t-btn-primary-border-color, transparent));border-width:var(--tct-btn-primary-border-width, var(--t-btn-primary-border-width, 0));border-radius:var(--tct-btn-primary-border-radius, var(--t-btn-primary-border-radius, var(--tct-border-radius-1, var(--app-border-radius-1, 3px))));box-shadow:var(--comp-btn-primary-box-shadow);font-weight:var(--tct-btn-primary-font-weight, var(--t-btn-primary-font-weight, 600));text-transform:var(--tct-btn-primary-text-transform, var(--t-btn-primary-text-transform, none));letter-spacing:var(--tct-btn-primary-letter-spacing, var(--t-btn-primary-letter-spacing, normal))}:host([color=primary]) button:enabled:hover,:host([color=primary]) button:enabled:focus,:host([color=primary]) button:enabled:active,:host([intent=workflow-primary]) button:enabled:hover,:host([intent=workflow-primary]) button:enabled:focus,:host([intent=workflow-primary]) button:enabled:active{background:var(--tct-btn-primary-hover-bg, var(--t-btn-primary-hover-bg, var(--tct-gray-5, var(--t-gray-5, var(--tct-gray-d2, var(--app-gray-d2, #404040))))));color:var(--tct-btn-primary-hover-font-color, var(--t-btn-primary-hover-font-color, var(--tct-white, var(--app-white, #ffffff))));border-color:var(--tct-btn-primary-hover-border-color, var(--t-btn-primary-hover-border-color, var(--tct-btn-primary-border-color, var(--t-btn-primary-border-color, transparent))))}:host([color=primary]) button:hover:enabled,:host([color=primary]) button:active:enabled,:host([intent=workflow-primary]) button:hover:enabled,:host([intent=workflow-primary]) button:active:enabled{box-shadow:var(--comp-btn-primary-hover-box-shadow)}:host([color=primary]) button:focus,:host([color=primary]) button:focus:hover:enabled,:host([color=primary]) button:focus:active:enabled,:host([intent=workflow-primary]) button:focus,:host([intent=workflow-primary]) button:focus:hover:enabled,:host([intent=workflow-primary]) button:focus:active:enabled{box-shadow:var(--const-double-focus-ring), var(--comp-btn-primary-hover-box-shadow)}:host([color=primary]) button:disabled,:host([intent=workflow-primary]) button:disabled{background:var(--tct-btn-primary-disabled-bg, var(--t-btn-primary-disabled-bg, var(--comp-btn-primary-bg)));color:var(--tct-btn-primary-disabled-font-color, var(--t-btn-primary-disabled-font-color, var(--comp-btn-primary-font-color)));box-shadow:var(--tct-btn-primary-disabled-box-shadow, var(--t-btn-primary-disabled-box-shadow, var(--comp-btn-primary-box-shadow)))}:host([color=secondary]) button,:host([intent=workflow-secondary]) button{background:var(--comp-btn-secondary-bg);color:var(--comp-btn-secondary-font-color, var(--tct-btn-secondary-font-color, var(--t-btn-secondary-font-color, var(--tct-white, var(--app-white, #ffffff)))));border-color:var(--tct-btn-secondary-border-color, var(--t-btn-secondary-border-color, transparent));border-width:var(--tct-btn-secondary-border-width, var(--t-btn-secondary-border-width, 0));border-radius:var(--tct-btn-secondary-border-radius, var(--t-btn-secondary-border-radius, var(--tct-border-radius-1, var(--app-border-radius-1, 3px))));box-shadow:var(--comp-btn-secondary-box-shadow);font-weight:var(--tct-btn-secondary-font-weight, var(--t-btn-secondary-font-weight, 600));text-transform:var(--tct-btn-secondary-text-transform, var(--t-btn-secondary-text-transform, none));letter-spacing:var(--tct-btn-secondary-letter-spacing, var(--t-btn-secondary-letter-spacing, normal))}:host([color=secondary]) button:enabled:hover,:host([color=secondary]) button:enabled:focus,:host([color=secondary]) button:enabled:active,:host([intent=workflow-secondary]) button:enabled:hover,:host([intent=workflow-secondary]) button:enabled:focus,:host([intent=workflow-secondary]) button:enabled:active{background:var(--tct-btn-secondary-hover-bg, var(--t-btn-secondary-hover-bg, var(--tct-gray-5, var(--t-gray-5, var(--tct-gray-d2, var(--app-gray-d2, #404040))))));color:var(--tct-btn-secondary-hover-font-color, var(--t-btn-secondary-hover-font-color, var(--t-button-default-hover-font-color, var(--tct-white, var(--app-white, #ffffff)))));border-color:var(--tct-btn-secondary-hover-border-color, var(--t-btn-secondary-hover-border-color, var(--tct-btn-secondary-border-color, var(--t-btn-secondary-border-color, transparent))))}:host([color=secondary]) button:hover:enabled,:host([color=secondary]) button:active:enabled,:host([intent=workflow-secondary]) button:hover:enabled,:host([intent=workflow-secondary]) button:active:enabled{box-shadow:var(--comp-btn-secondary-hover-box-shadow)}:host([color=secondary]) button:focus,:host([color=secondary]) button:focus:hover:enabled,:host([color=secondary]) button:focus:active:enabled,:host([intent=workflow-secondary]) button:focus,:host([intent=workflow-secondary]) button:focus:hover:enabled,:host([intent=workflow-secondary]) button:focus:active:enabled{box-shadow:var(--const-double-focus-ring), var(--comp-btn-secondary-hover-box-shadow)}:host([color=secondary]) button:disabled,:host([intent=workflow-secondary]) button:disabled{background:var(--tct-btn-secondary-disabled-bg, var(--t-btn-secondary-disabled-bg, var(--comp-btn-secondary-bg)));color:var(--tct-btn-secondary-disabled-font-color, var(--t-btn-secondary-disabled-font-color, var(--comp-btn-secondary-font-color)));box-shadow:var(--tct-btn-secondary-disabled-box-shadow, var(--t-btn-secondary-disabled-box-shadow, var(--comp-btn-secondary-box-shadow)))}:host([intent=neutral]) button{background:var(--comp-btn-neutral-bg, var(--tct-btn-neutral-bg, var(--t-btn-neutral-bg, transparent)));color:var(--comp-btn-neutral-font-color, var(--tct-btn-neutral-font-color, var(--t-btn-neutral-font-color, var(--tct-gray-1, var(--t-gray-1, var(--tct-black, var(--app-black, #0d0d0d)))))));border-color:var(--tct-btn-neutral-border-color, var(--t-btn-neutral-border-color, transparent));border-width:var(--tct-btn-neutral-border-width, var(--t-btn-neutral-border-width, 0));border-radius:var(--tct-btn-neutral-border-radius, var(--t-btn-neutral-border-radius, var(--tct-border-radius-1, var(--app-border-radius-1, 3px))));box-shadow:var(--comp-btn-neutral-box-shadow);font-weight:var(--tct-btn-neutral-font-weight, var(--t-btn-neutral-font-weight, 600));text-transform:var(--tct-btn-neutral-text-transform, var(--t-btn-neutral-text-transform, none));letter-spacing:var(--tct-btn-neutral-letter-spacing, var(--t-btn-neutral-letter-spacing, normal))}:host([intent=neutral]) button:enabled:hover,:host([intent=neutral]) button:enabled:focus,:host([intent=neutral]) button:enabled:active{background:var(--tct-btn-neutral-hover-bg, var(--t-btn-neutral-hover-bg, transparent));color:var(--tct-btn-neutral-hover-font-color, var(--t-btn-neutral-hover-font-color, var(--tct-white, var(--app-white, #ffffff))));border-color:var(--tct-btn-neutral-hover-border-color, var(--t-btn-neutral-hover-border-color, var(--tct-btn-neutral-border-color, var(--t-btn-neutral-border-color, transparent))))}:host([intent=neutral]) button:hover:enabled,:host([intent=neutral]) button:active:enabled{box-shadow:var(--comp-btn-neutral-hover-box-shadow)}:host([intent=neutral]) button:focus,:host([intent=neutral]) button:focus:hover:enabled,:host([intent=neutral]) button:focus:active:enabled{box-shadow:var(--const-double-focus-ring), var(--comp-btn-neutral-hover-box-shadow)}:host([intent=neutral]) button:disabled{background:var(--tct-btn-neutral-disabled-bg, var(--t-btn-neutral-disabled-bg, var(--comp-btn-neutral-bg)));color:var(--tct-btn-neutral-disabled-font-color, var(--t-btn-neutral-disabled-font-color, var(--comp-btn-neutral-font-color)));box-shadow:var(--tct-btn-neutral-disabled-box-shadow, var(--comp-btn-neutral-box-shadow))}:host button.icon-only{width:var(--tct-btn-icon-width, var(--t-btn-icon-width, 44px));height:var(--tct-btn-icon-height, var(--t-btn-icon-height, 44px));border-radius:var(--tct-btn-icon-border-radius, var(--t-btn-icon-border-radius, 0))}:host button.icon-only:hover,:host button.icon-only:focus{background-color:var(--tct-btn-icon-hover-bg, var(--t-btn-icon-hover-bg, var(--tct-gray-13, var(--t-gray-13, var(--tct-gray-l3, var(--app-gray-l3, #f2f2f2))))))}:host(:not([intent])[active]) button.icon-only{background-color:var(--tct-btn-icon-active-bg, var(--t-btn-icon-active-bg, var(--tct-gray-14, var(--t-gray-14, var(--tct-gray-l3, var(--app-gray-l3, #f2f2f2))))))}:host(:not([intent])) button.icon-only:hover *,:host(:not([intent])) button.icon-only:focus *,:host(:not([intent])[active]) button.icon-only *{color:var(--tct-btn-icon-hover-color, var(--t-btn-icon-hover-color, var(--tct-link-hover-color, var(--t-link-hover-color, #080808))))}:host([badge]) button{padding:var(--tct-btn-badge-padding, var(--t-btn-badge-padding, 2px 5px));font-size:var(--tct-btn-badge-font-size, var(--t-btn-badge-font-size, var(--tct-btn-font-size, var(--t-btn-font-size, inherit))));border-radius:var(--tct-btn-badge-border-radius, var(--t-btn-badge-border-radius, var(--tct-border-radius-1, var(--app-border-radius-1, 3px))));background-color:var(--tct-btn-badge-bg, var(--t-btn-badge-bg, transparent));color:var(--tct-btn-badge-font-color, var(--t-btn-badge-font-color, inherit))}:host([badge]) button ::slotted(q2-icon){--tct-icon-size:1em}:host([badge]:hover) button:enabled{background-color:var(--tct-btn-badge-hover-bg, var(--t-btn-badge-hover-bg, var(--tct-gray-14, var(--t-gray-14, var(--tct-gray-l3, var(--app-gray-l3, #f2f2f2))))));color:var(--tct-btn-badge-hover-font-color, var(--t-btn-badge-hover-font-color, var(--tct-gray-5, var(--t-gray-5, var(--tct-gray-d2, var(--app-gray-d2, #404040))))))}:host(.selected[badge]) button,:host([active][badge]) button{background-color:var(--tct-btn-badge-active-bg, var(--t-btn-badge-active-bg, var(--comp-btn-primary-bg)));color:var(--tct-btn-badge-active-font-color, var(--t-btn-badge-active-font-color, var(--comp-btn-primary-font-color)))}div{display:flex;align-items:center;justify-content:center;gap:var(--app-scale-1x, 5px)}:host([loading]) .icon-right div{flex-direction:row-reverse}q2-loading{--tct-loading-primary-color:currentColor;--tct-loading-secondary-color:currentColor;--tct-loading-spinner-size:24px}:host([loading]) ::slotted(q2-icon){display:none}:host([loading]) button{pointer-events:none}:host([block]) button,:host([block]) button.icon-only{display:block;width:100%}";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
|
-
import { h as handleAriaLabel, l as loc } from './
|
|
2
|
+
import { h as handleAriaLabel, l as loc } from './index15.js';
|
|
3
3
|
import { d as defineCustomElement$3 } from './index5.js';
|
|
4
4
|
import { d as defineCustomElement$2 } from './index7.js';
|
|
5
5
|
import { d as defineCustomElement$1 } from './index9.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Fragment } from '@stencil/core/internal/client';
|
|
2
|
-
import { c as createGuid,
|
|
2
|
+
import { c as createGuid, f as setMessageHeight, h as handleAriaLabel, o as overrideFocus, l as loc, i as isEventFromElement, g as labelDOM, m as messagesDOM } from './index15.js';
|
|
3
3
|
import { d as defineCustomElement$4 } from './index4.js';
|
|
4
4
|
import { d as defineCustomElement$3 } from './index5.js';
|
|
5
5
|
import { d as defineCustomElement$2 } from './index7.js';
|