q2-tecton-elements 1.17.1 → 1.19.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 +1 -1
- package/dist/cjs/{icons-e2bc9ee9.js → icons-afbdf88a.js} +1 -1
- package/dist/cjs/{index-afc50fbb.js → index-3518c78c.js} +9 -1
- package/dist/cjs/{index-0128397d.js → index-734296a7.js} +476 -271
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/q2-avatar.cjs.entry.js +9 -6
- package/dist/cjs/q2-badge_2.cjs.entry.js +46 -7
- package/dist/cjs/q2-btn_2.cjs.entry.js +31 -5
- package/dist/cjs/q2-calendar.cjs.entry.js +89 -62
- package/dist/cjs/q2-card.cjs.entry.js +17 -6
- package/dist/cjs/q2-carousel-pane.cjs.entry.js +7 -3
- package/dist/cjs/q2-carousel.cjs.entry.js +196 -285
- package/dist/cjs/q2-chart-donut.cjs.entry.js +583 -504
- package/dist/cjs/q2-checkbox-group.cjs.entry.js +9 -7
- package/dist/cjs/q2-checkbox.cjs.entry.js +17 -4
- package/dist/cjs/q2-dropdown-item.cjs.entry.js +9 -3
- package/dist/cjs/q2-dropdown.cjs.entry.js +16 -5
- package/dist/cjs/q2-editable-field.cjs.entry.js +16 -6
- package/dist/cjs/q2-icon.cjs.entry.js +6 -4
- package/dist/cjs/q2-loading-element.cjs.entry.js +6 -2
- package/dist/cjs/q2-loc.cjs.entry.js +5 -3
- package/dist/cjs/q2-message.cjs.entry.js +4 -3
- package/dist/cjs/q2-month-picker.cjs.entry.js +149 -0
- package/dist/cjs/q2-optgroup.cjs.entry.js +6 -5
- package/dist/cjs/{q2-option-list.cjs.entry.js → q2-option-list_2.cjs.entry.js} +120 -23
- package/dist/cjs/q2-option.cjs.entry.js +12 -2
- package/dist/cjs/q2-pagination.cjs.entry.js +18 -4
- package/dist/cjs/q2-pill.cjs.entry.js +40 -20
- package/dist/cjs/q2-radio-group.cjs.entry.js +13 -6
- package/dist/cjs/q2-radio.cjs.entry.js +13 -8
- package/dist/cjs/q2-section.cjs.entry.js +9 -4
- package/dist/cjs/q2-select.cjs.entry.js +28 -21
- package/dist/cjs/q2-stepper-pane.cjs.entry.js +8 -3
- package/dist/cjs/q2-stepper-vertical.cjs.entry.js +5 -4
- package/dist/cjs/q2-stepper.cjs.entry.js +9 -7
- package/dist/cjs/q2-tab-container.cjs.entry.js +14 -9
- package/dist/cjs/q2-tab-pane.cjs.entry.js +10 -2
- package/dist/cjs/q2-tag.cjs.entry.js +32 -17
- package/dist/cjs/q2-tecton-elements.cjs.js +3 -3
- package/dist/cjs/q2-textarea.cjs.entry.js +20 -4
- package/dist/cjs/q2-tooltip.cjs.entry.js +70 -14
- package/dist/cjs/{shapes-c1a60d46.js → shapes-aad2b98f.js} +1 -1
- package/dist/cjs/tecton-tab-pane.cjs.entry.js +17 -2
- package/dist/collection/collection-manifest.json +4 -2
- package/dist/collection/components/click-elsewhere/index.js +18 -17
- package/dist/collection/components/q2-avatar/index.js +100 -92
- package/dist/collection/components/q2-avatar/styles.css +1 -1
- package/dist/collection/components/q2-badge/index.js +119 -111
- package/dist/collection/components/q2-badge/styles.css +1 -1
- package/dist/collection/components/q2-btn/index.js +351 -306
- package/dist/collection/components/q2-btn/styles.css +8 -7
- package/dist/collection/components/q2-calendar/index.js +565 -551
- package/dist/collection/components/q2-calendar/q2-month-picker.css +130 -0
- package/dist/collection/components/q2-calendar/q2-month-picker.js +242 -0
- package/dist/collection/components/q2-calendar/styles.css +1 -1
- package/dist/collection/components/q2-card/index.js +262 -244
- package/dist/collection/components/q2-card/styles.css +9 -2
- package/dist/collection/components/q2-carousel/index.js +249 -253
- package/dist/collection/components/q2-carousel/styles.css +1 -1
- package/dist/collection/components/q2-carousel-pane/index.js +108 -96
- package/dist/collection/components/q2-carousel-pane/styles.css +5 -4
- package/dist/collection/components/q2-chart-donut/index.js +350 -334
- package/dist/collection/components/q2-chart-donut/styles.css +3 -3
- package/dist/collection/components/q2-checkbox/index.js +296 -287
- package/dist/collection/components/q2-checkbox/styles.css +2 -2
- package/dist/collection/components/q2-checkbox-group/index.js +156 -152
- package/dist/collection/components/q2-checkbox-group/styles.css +1 -1
- package/dist/collection/components/q2-dropdown/index.js +255 -240
- package/dist/collection/components/q2-dropdown/styles.css +1 -1
- package/dist/collection/components/q2-dropdown-item/index.js +134 -123
- package/dist/collection/components/q2-dropdown-item/styles.css +12 -10
- package/dist/collection/components/q2-editable-field/index.js +300 -293
- package/dist/collection/components/q2-editable-field/styles.css +1 -1
- package/dist/collection/components/q2-icon/icons.js +358 -2158
- package/dist/collection/components/q2-icon/index.js +59 -49
- package/dist/collection/components/q2-icon/styles.css +1 -1
- package/dist/collection/components/q2-input/index.js +729 -705
- package/dist/collection/components/q2-input/styles.css +2 -2
- package/dist/collection/components/q2-loading/index.js +143 -132
- package/dist/collection/components/q2-loading/skeleton/q2-loading-element/index.js +85 -74
- package/dist/collection/components/q2-loading/skeleton/shapes.js +23 -36
- package/dist/collection/components/q2-loading/styles.css +1 -1
- package/dist/collection/components/q2-loc/index.js +49 -39
- package/dist/collection/components/q2-loc/styles.css +1 -1
- package/dist/collection/components/q2-message/index.js +101 -92
- package/dist/collection/components/q2-message/styles.css +1 -1
- package/dist/collection/components/q2-optgroup/index.js +64 -56
- package/dist/collection/components/q2-optgroup/styles.css +1 -1
- package/dist/collection/components/q2-option/index.js +244 -229
- package/dist/collection/components/q2-option/styles.css +5 -1
- package/dist/collection/components/q2-option-list/index.js +295 -319
- package/dist/collection/components/q2-option-list/styles.css +2 -50
- package/dist/collection/components/q2-pagination/index.js +183 -173
- package/dist/collection/components/q2-pagination/styles.css +1 -1
- package/dist/collection/components/q2-pill/index.js +276 -221
- package/dist/collection/components/q2-pill/styles.css +12 -7
- package/dist/collection/components/q2-popover/index.js +263 -0
- package/dist/collection/components/q2-popover/styles.css +205 -0
- package/dist/collection/components/q2-radio/index.js +233 -224
- package/dist/collection/components/q2-radio/styles.css +3 -3
- package/dist/collection/components/q2-radio-group/index.js +252 -244
- package/dist/collection/components/q2-radio-group/styles.css +1 -1
- package/dist/collection/components/q2-section/index.js +134 -125
- package/dist/collection/components/q2-section/styles.css +12 -1
- package/dist/collection/components/q2-select/index.js +395 -385
- package/dist/collection/components/q2-select/styles.css +1 -1
- package/dist/collection/components/q2-stepper/index.js +124 -126
- package/dist/collection/components/q2-stepper/styles.css +2 -1
- package/dist/collection/components/q2-stepper-pane/index.js +165 -149
- package/dist/collection/components/q2-stepper-pane/styles.css +1 -1
- package/dist/collection/components/q2-stepper-vertical/index.js +86 -85
- package/dist/collection/components/q2-stepper-vertical/styles.css +1 -1
- package/dist/collection/components/q2-tab-container/index.js +189 -184
- package/dist/collection/components/q2-tab-container/styles.css +1 -1
- package/dist/collection/components/q2-tab-pane/index.js +185 -166
- package/dist/collection/components/q2-tab-pane/styles.css +1 -1
- package/dist/collection/components/q2-tag/index.js +180 -125
- package/dist/collection/components/q2-tag/styles.css +2 -6
- package/dist/collection/components/q2-textarea/index.js +344 -327
- package/dist/collection/components/q2-textarea/styles.css +2 -2
- package/dist/collection/components/q2-tooltip/index.js +207 -104
- package/dist/collection/components/q2-tooltip/styles.css +63 -83
- package/dist/collection/components/tecton-tab-pane/index.js +287 -266
- package/dist/collection/components/tecton-tab-pane/styles.css +1 -1
- package/dist/collection/utils/index.js +9 -6
- package/dist/esm/click-elsewhere.entry.js +1 -1
- package/dist/esm/{icons-ed54e307.js → icons-78da5dd2.js} +1 -1
- package/dist/esm/{index-2ca8c93c.js → index-9c591682.js} +9 -2
- package/dist/esm/{index-6d5ed7cc.js → index-bb1c8c7f.js} +476 -271
- package/dist/esm/loader.js +3 -3
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm/q2-avatar.entry.js +9 -6
- package/dist/esm/q2-badge_2.entry.js +46 -7
- package/dist/esm/q2-btn_2.entry.js +31 -5
- package/dist/esm/q2-calendar.entry.js +89 -62
- package/dist/esm/q2-card.entry.js +17 -6
- package/dist/esm/q2-carousel-pane.entry.js +7 -3
- package/dist/esm/q2-carousel.entry.js +196 -285
- package/dist/esm/q2-chart-donut.entry.js +583 -504
- package/dist/esm/q2-checkbox-group.entry.js +9 -7
- package/dist/esm/q2-checkbox.entry.js +17 -4
- package/dist/esm/q2-dropdown-item.entry.js +9 -3
- package/dist/esm/q2-dropdown.entry.js +16 -5
- package/dist/esm/q2-editable-field.entry.js +16 -6
- package/dist/esm/q2-icon.entry.js +6 -4
- package/dist/esm/q2-loading-element.entry.js +6 -2
- package/dist/esm/q2-loc.entry.js +5 -3
- package/dist/esm/q2-message.entry.js +4 -3
- package/dist/esm/q2-month-picker.entry.js +145 -0
- package/dist/esm/q2-optgroup.entry.js +6 -5
- package/dist/esm/{q2-option-list.entry.js → q2-option-list_2.entry.js} +120 -24
- package/dist/esm/q2-option.entry.js +12 -2
- package/dist/esm/q2-pagination.entry.js +18 -4
- package/dist/esm/q2-pill.entry.js +40 -20
- package/dist/esm/q2-radio-group.entry.js +13 -6
- package/dist/esm/q2-radio.entry.js +13 -8
- package/dist/esm/q2-section.entry.js +9 -4
- package/dist/esm/q2-select.entry.js +28 -21
- package/dist/esm/q2-stepper-pane.entry.js +8 -3
- package/dist/esm/q2-stepper-vertical.entry.js +5 -4
- package/dist/esm/q2-stepper.entry.js +9 -7
- package/dist/esm/q2-tab-container.entry.js +14 -9
- package/dist/esm/q2-tab-pane.entry.js +10 -2
- package/dist/esm/q2-tag.entry.js +32 -17
- package/dist/esm/q2-tecton-elements.js +3 -3
- package/dist/esm/q2-textarea.entry.js +20 -4
- package/dist/esm/q2-tooltip.entry.js +70 -14
- package/dist/esm/{shapes-c32e3ba2.js → shapes-62b8a431.js} +1 -1
- package/dist/esm/tecton-tab-pane.entry.js +17 -2
- package/dist/loader/package.json +1 -0
- package/dist/q2-tecton-elements/p-0ba564b1.entry.js +1 -0
- package/dist/q2-tecton-elements/p-0fad9c5a.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-73154834.js → p-13a639cf.js} +1 -1
- package/dist/q2-tecton-elements/p-16c11d74.entry.js +1 -0
- package/dist/q2-tecton-elements/p-17e0cbf1.entry.js +1 -0
- package/dist/q2-tecton-elements/p-18e095af.entry.js +1 -0
- package/dist/q2-tecton-elements/p-2c9b1308.entry.js +1 -0
- package/dist/q2-tecton-elements/p-2e832e42.entry.js +1 -0
- package/dist/q2-tecton-elements/p-315fdb74.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-318758d4.entry.js → p-444415b5.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-4d700630.entry.js +1 -0
- package/dist/q2-tecton-elements/p-4f0f45e7.entry.js +1 -0
- package/dist/q2-tecton-elements/p-54e792bd.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-41fcf343.js → p-5e374fbd.js} +1 -1
- package/dist/q2-tecton-elements/p-5f064e1e.entry.js +39 -0
- package/dist/q2-tecton-elements/p-692f2d09.entry.js +1 -0
- package/dist/q2-tecton-elements/p-6e6b5b80.entry.js +1 -0
- package/dist/q2-tecton-elements/p-7e8f43d1.entry.js +1 -0
- package/dist/q2-tecton-elements/p-8e380edf.entry.js +1 -0
- package/dist/q2-tecton-elements/p-926a3e80.js +2 -0
- package/dist/q2-tecton-elements/{p-93c00587.js → p-92e1faf8.js} +1 -1
- package/dist/q2-tecton-elements/p-9772b15f.entry.js +1 -0
- package/dist/q2-tecton-elements/p-97aa8423.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-17cffd7d.entry.js → p-a987402e.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-aaf42539.entry.js +1 -0
- package/dist/q2-tecton-elements/p-ac674c20.entry.js +1 -0
- package/dist/q2-tecton-elements/p-b8b00394.entry.js +1 -0
- package/dist/q2-tecton-elements/p-c444a60b.entry.js +1 -0
- package/dist/q2-tecton-elements/p-c6c489fe.entry.js +1 -0
- package/dist/q2-tecton-elements/p-ce015552.entry.js +1 -0
- package/dist/q2-tecton-elements/p-d464fccc.entry.js +1 -0
- package/dist/q2-tecton-elements/p-de164483.entry.js +1 -0
- package/dist/q2-tecton-elements/p-df91e954.entry.js +1 -0
- package/dist/q2-tecton-elements/p-e6d26f39.entry.js +1 -0
- package/dist/q2-tecton-elements/p-e8e113c2.entry.js +1 -0
- package/dist/q2-tecton-elements/p-f1d06917.entry.js +1 -0
- package/dist/q2-tecton-elements/p-f800fd1e.entry.js +1 -0
- package/dist/q2-tecton-elements/p-fb37e67e.entry.js +1 -0
- package/dist/q2-tecton-elements/p-fc134a5d.entry.js +1 -0
- package/dist/q2-tecton-elements/p-fe88e979.entry.js +1 -0
- package/dist/q2-tecton-elements/p-ffb48ccc.entry.js +1 -0
- package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
- package/dist/test/helpers.js +6 -0
- package/dist/types/components/q2-btn/index.d.ts +1 -0
- package/dist/types/components/q2-calendar/q2-month-picker.d.ts +24 -0
- package/dist/types/components/q2-option-list/index.d.ts +1 -4
- package/dist/types/components/q2-pill/index.d.ts +10 -3
- package/dist/types/components/q2-popover/index.d.ts +26 -0
- package/dist/types/components/q2-tag/index.d.ts +8 -2
- package/dist/types/components/q2-tooltip/index.d.ts +12 -0
- package/dist/types/components.d.ts +203 -38
- package/dist/types/stencil-public-runtime.d.ts +20 -4
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/types/workspace/workspace/{tecton-production_release_1.17.x → Tecton_tecton-production_master}/packages/q2-tecton-elements/.stencil/test/helpers.d.ts +2 -0
- package/package.json +6 -6
- package/dist/q2-tecton-elements/p-06865cf5.entry.js +0 -1
- package/dist/q2-tecton-elements/p-0d849ed4.entry.js +0 -1
- package/dist/q2-tecton-elements/p-2a217895.entry.js +0 -1
- package/dist/q2-tecton-elements/p-2b94ae62.entry.js +0 -1
- package/dist/q2-tecton-elements/p-2faed36b.entry.js +0 -1
- package/dist/q2-tecton-elements/p-30a4fdfb.entry.js +0 -1
- package/dist/q2-tecton-elements/p-30f81b22.entry.js +0 -1
- package/dist/q2-tecton-elements/p-31070ab8.entry.js +0 -1
- package/dist/q2-tecton-elements/p-41c22a16.entry.js +0 -1
- package/dist/q2-tecton-elements/p-445e7c45.entry.js +0 -1
- package/dist/q2-tecton-elements/p-44bdaf52.entry.js +0 -1
- package/dist/q2-tecton-elements/p-4c53713d.entry.js +0 -1
- package/dist/q2-tecton-elements/p-4da9b6b6.entry.js +0 -1
- package/dist/q2-tecton-elements/p-5acb7ec6.entry.js +0 -1
- package/dist/q2-tecton-elements/p-64605d17.entry.js +0 -1
- package/dist/q2-tecton-elements/p-64ca8c59.entry.js +0 -1
- package/dist/q2-tecton-elements/p-654fcd6b.entry.js +0 -1
- package/dist/q2-tecton-elements/p-661c2092.entry.js +0 -1
- package/dist/q2-tecton-elements/p-732dafd0.entry.js +0 -1
- package/dist/q2-tecton-elements/p-815c8a7d.entry.js +0 -1
- package/dist/q2-tecton-elements/p-824a1d7c.entry.js +0 -1
- package/dist/q2-tecton-elements/p-8543a0e1.entry.js +0 -1
- package/dist/q2-tecton-elements/p-916fd90b.entry.js +0 -1
- package/dist/q2-tecton-elements/p-94b3c534.entry.js +0 -1
- package/dist/q2-tecton-elements/p-9725d55f.entry.js +0 -1
- package/dist/q2-tecton-elements/p-a45c6b65.entry.js +0 -1
- package/dist/q2-tecton-elements/p-a659d112.entry.js +0 -1
- package/dist/q2-tecton-elements/p-b4b8f85c.entry.js +0 -39
- package/dist/q2-tecton-elements/p-b595b415.entry.js +0 -1
- package/dist/q2-tecton-elements/p-c5691700.js +0 -1
- package/dist/q2-tecton-elements/p-cde0cdff.entry.js +0 -1
- package/dist/q2-tecton-elements/p-d3e4cc5d.entry.js +0 -1
- package/dist/q2-tecton-elements/p-d781e2d9.entry.js +0 -1
- package/dist/q2-tecton-elements/p-d8d9e8eb.entry.js +0 -1
- package/dist/q2-tecton-elements/p-fbf23146.entry.js +0 -1
- package/dist/test/elements/q2-tag-test.js +0 -151
- package/dist/types/workspace/workspace/tecton-production_release_1.17.x/packages/q2-tecton-elements/.stencil/test/elements/q2-tag-test.d.ts +0 -1
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
import { h, } from '@stencil/core';
|
|
2
|
+
export class Q2Popover {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.privateDirection = 'down';
|
|
5
|
+
this.direction = undefined;
|
|
6
|
+
this.align = undefined;
|
|
7
|
+
this.open = undefined;
|
|
8
|
+
this.block = undefined;
|
|
9
|
+
this.minHeight = undefined;
|
|
10
|
+
this.controlElement = undefined;
|
|
11
|
+
}
|
|
12
|
+
/// Lifecycle hooks ///
|
|
13
|
+
componentDidLoad() {
|
|
14
|
+
if (this.open)
|
|
15
|
+
this.determinePopDirection();
|
|
16
|
+
}
|
|
17
|
+
componentWillRender() {
|
|
18
|
+
if (this.containerElement && this.containerElement && this.open)
|
|
19
|
+
this.determinePopDirection();
|
|
20
|
+
}
|
|
21
|
+
/// Methods ///
|
|
22
|
+
async toggle() {
|
|
23
|
+
this.open = !this.open;
|
|
24
|
+
}
|
|
25
|
+
/// Watchers ///
|
|
26
|
+
openChanged(open) {
|
|
27
|
+
this.popoverStateChanged.emit({ open });
|
|
28
|
+
}
|
|
29
|
+
/// Listeners ///
|
|
30
|
+
popoverStateHandler(event) {
|
|
31
|
+
const { detail: { open }, } = event;
|
|
32
|
+
if (open === this.open)
|
|
33
|
+
return;
|
|
34
|
+
this.open = open;
|
|
35
|
+
event.stopPropagation();
|
|
36
|
+
}
|
|
37
|
+
/// Helpers ///
|
|
38
|
+
determinePopDirection() {
|
|
39
|
+
var _a;
|
|
40
|
+
const { containerElement, contentElement, direction, controlElement } = this;
|
|
41
|
+
if (containerElement)
|
|
42
|
+
containerElement.style.maxHeight = null;
|
|
43
|
+
if (direction) {
|
|
44
|
+
return (this.privateDirection = direction);
|
|
45
|
+
}
|
|
46
|
+
const contentHeight = contentElement.clientHeight;
|
|
47
|
+
const { top: topOffset, height } = (_a = controlElement === null || controlElement === void 0 ? void 0 : controlElement.getBoundingClientRect()) !== null && _a !== void 0 ? _a : {
|
|
48
|
+
top: 0,
|
|
49
|
+
height: 0,
|
|
50
|
+
};
|
|
51
|
+
const bottomOffset = window.innerHeight - topOffset - height;
|
|
52
|
+
const canShowFullSizeBelow = bottomOffset > contentHeight;
|
|
53
|
+
const canShowFullSizeAbove = contentHeight <= topOffset;
|
|
54
|
+
// Prefer full size above or below
|
|
55
|
+
if (canShowFullSizeBelow) {
|
|
56
|
+
return (this.privateDirection = 'down');
|
|
57
|
+
}
|
|
58
|
+
else if (canShowFullSizeAbove || !this.minHeight) {
|
|
59
|
+
this.determinePopOffset();
|
|
60
|
+
return (this.privateDirection = 'up');
|
|
61
|
+
}
|
|
62
|
+
// If full size will not fit and minHeight is set, then make as tall as possible
|
|
63
|
+
const { minHeight = 150 } = this;
|
|
64
|
+
const displayBuffer = 5;
|
|
65
|
+
const canShowSmallBelow = bottomOffset >= minHeight + displayBuffer;
|
|
66
|
+
if (canShowSmallBelow) {
|
|
67
|
+
const maxBelowHeight = Math.max(bottomOffset - displayBuffer, minHeight);
|
|
68
|
+
containerElement.style.setProperty('--comp-pop-max-height', `${maxBelowHeight}px`);
|
|
69
|
+
return (this.privateDirection = 'down');
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
const maxAboveHeight = Math.max(topOffset, minHeight);
|
|
73
|
+
containerElement.style.setProperty('--comp-pop-max-height', `${maxAboveHeight}px`);
|
|
74
|
+
this.determinePopOffset();
|
|
75
|
+
return (this.privateDirection = 'up');
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
determinePopOffset() {
|
|
79
|
+
var _a;
|
|
80
|
+
const { controlElement, containerElement } = this;
|
|
81
|
+
const dropdownHeight = (_a = controlElement === null || controlElement === void 0 ? void 0 : controlElement.getBoundingClientRect().height) !== null && _a !== void 0 ? _a : 0;
|
|
82
|
+
containerElement.style.setProperty('--comp-pop-offset', `${dropdownHeight}px`);
|
|
83
|
+
}
|
|
84
|
+
/// DOM ///
|
|
85
|
+
render() {
|
|
86
|
+
const containerClasses = ['container', this.privateDirection];
|
|
87
|
+
return (h("div", { ref: el => (this.containerElement = el), class: containerClasses.join(' '), role: "menu" }, h("div", { ref: el => (this.contentElement = el), class: "content" }, h("slot", null))));
|
|
88
|
+
}
|
|
89
|
+
static get is() { return "q2-popover"; }
|
|
90
|
+
static get encapsulation() { return "shadow"; }
|
|
91
|
+
static get originalStyleUrls() {
|
|
92
|
+
return {
|
|
93
|
+
"$": ["styles.scss"]
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
static get styleUrls() {
|
|
97
|
+
return {
|
|
98
|
+
"$": ["styles.css"]
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
static get properties() {
|
|
102
|
+
return {
|
|
103
|
+
"direction": {
|
|
104
|
+
"type": "string",
|
|
105
|
+
"mutable": false,
|
|
106
|
+
"complexType": {
|
|
107
|
+
"original": "'up' | 'down'",
|
|
108
|
+
"resolved": "\"down\" | \"up\"",
|
|
109
|
+
"references": {}
|
|
110
|
+
},
|
|
111
|
+
"required": false,
|
|
112
|
+
"optional": false,
|
|
113
|
+
"docs": {
|
|
114
|
+
"tags": [],
|
|
115
|
+
"text": ""
|
|
116
|
+
},
|
|
117
|
+
"attribute": "direction",
|
|
118
|
+
"reflect": true
|
|
119
|
+
},
|
|
120
|
+
"align": {
|
|
121
|
+
"type": "string",
|
|
122
|
+
"mutable": false,
|
|
123
|
+
"complexType": {
|
|
124
|
+
"original": "'left' | 'right'",
|
|
125
|
+
"resolved": "\"left\" | \"right\"",
|
|
126
|
+
"references": {}
|
|
127
|
+
},
|
|
128
|
+
"required": false,
|
|
129
|
+
"optional": false,
|
|
130
|
+
"docs": {
|
|
131
|
+
"tags": [],
|
|
132
|
+
"text": ""
|
|
133
|
+
},
|
|
134
|
+
"attribute": "align",
|
|
135
|
+
"reflect": true
|
|
136
|
+
},
|
|
137
|
+
"open": {
|
|
138
|
+
"type": "boolean",
|
|
139
|
+
"mutable": true,
|
|
140
|
+
"complexType": {
|
|
141
|
+
"original": "boolean",
|
|
142
|
+
"resolved": "boolean",
|
|
143
|
+
"references": {}
|
|
144
|
+
},
|
|
145
|
+
"required": false,
|
|
146
|
+
"optional": false,
|
|
147
|
+
"docs": {
|
|
148
|
+
"tags": [],
|
|
149
|
+
"text": ""
|
|
150
|
+
},
|
|
151
|
+
"attribute": "open",
|
|
152
|
+
"reflect": true
|
|
153
|
+
},
|
|
154
|
+
"block": {
|
|
155
|
+
"type": "boolean",
|
|
156
|
+
"mutable": false,
|
|
157
|
+
"complexType": {
|
|
158
|
+
"original": "boolean",
|
|
159
|
+
"resolved": "boolean",
|
|
160
|
+
"references": {}
|
|
161
|
+
},
|
|
162
|
+
"required": false,
|
|
163
|
+
"optional": false,
|
|
164
|
+
"docs": {
|
|
165
|
+
"tags": [],
|
|
166
|
+
"text": ""
|
|
167
|
+
},
|
|
168
|
+
"attribute": "block",
|
|
169
|
+
"reflect": true
|
|
170
|
+
},
|
|
171
|
+
"minHeight": {
|
|
172
|
+
"type": "number",
|
|
173
|
+
"mutable": false,
|
|
174
|
+
"complexType": {
|
|
175
|
+
"original": "number",
|
|
176
|
+
"resolved": "number",
|
|
177
|
+
"references": {}
|
|
178
|
+
},
|
|
179
|
+
"required": false,
|
|
180
|
+
"optional": false,
|
|
181
|
+
"docs": {
|
|
182
|
+
"tags": [],
|
|
183
|
+
"text": ""
|
|
184
|
+
},
|
|
185
|
+
"attribute": "min-height",
|
|
186
|
+
"reflect": false
|
|
187
|
+
},
|
|
188
|
+
"controlElement": {
|
|
189
|
+
"type": "unknown",
|
|
190
|
+
"mutable": false,
|
|
191
|
+
"complexType": {
|
|
192
|
+
"original": "HTMLElement",
|
|
193
|
+
"resolved": "HTMLElement",
|
|
194
|
+
"references": {
|
|
195
|
+
"HTMLElement": {
|
|
196
|
+
"location": "global"
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
"required": false,
|
|
201
|
+
"optional": false,
|
|
202
|
+
"docs": {
|
|
203
|
+
"tags": [],
|
|
204
|
+
"text": ""
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
static get events() {
|
|
210
|
+
return [{
|
|
211
|
+
"method": "popoverStateChanged",
|
|
212
|
+
"name": "popoverStateChanged",
|
|
213
|
+
"bubbles": true,
|
|
214
|
+
"cancelable": true,
|
|
215
|
+
"composed": true,
|
|
216
|
+
"docs": {
|
|
217
|
+
"tags": [],
|
|
218
|
+
"text": ""
|
|
219
|
+
},
|
|
220
|
+
"complexType": {
|
|
221
|
+
"original": "{ open: boolean }",
|
|
222
|
+
"resolved": "{ open: boolean; }",
|
|
223
|
+
"references": {}
|
|
224
|
+
}
|
|
225
|
+
}];
|
|
226
|
+
}
|
|
227
|
+
static get methods() {
|
|
228
|
+
return {
|
|
229
|
+
"toggle": {
|
|
230
|
+
"complexType": {
|
|
231
|
+
"signature": "() => Promise<void>",
|
|
232
|
+
"parameters": [],
|
|
233
|
+
"references": {
|
|
234
|
+
"Promise": {
|
|
235
|
+
"location": "global"
|
|
236
|
+
}
|
|
237
|
+
},
|
|
238
|
+
"return": "Promise<void>"
|
|
239
|
+
},
|
|
240
|
+
"docs": {
|
|
241
|
+
"text": "",
|
|
242
|
+
"tags": []
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
};
|
|
246
|
+
}
|
|
247
|
+
static get elementRef() { return "hostElement"; }
|
|
248
|
+
static get watchers() {
|
|
249
|
+
return [{
|
|
250
|
+
"propName": "open",
|
|
251
|
+
"methodName": "openChanged"
|
|
252
|
+
}];
|
|
253
|
+
}
|
|
254
|
+
static get listeners() {
|
|
255
|
+
return [{
|
|
256
|
+
"name": "popoverState",
|
|
257
|
+
"method": "popoverStateHandler",
|
|
258
|
+
"target": undefined,
|
|
259
|
+
"capture": false,
|
|
260
|
+
"passive": false
|
|
261
|
+
}];
|
|
262
|
+
}
|
|
263
|
+
}
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
* {
|
|
2
|
+
box-sizing: border-box;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
*:active {
|
|
6
|
+
outline: none;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
*:focus {
|
|
10
|
+
outline: none;
|
|
11
|
+
box-shadow: var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #33b4ff #06C);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
:host {
|
|
15
|
+
box-shadow: none !important;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
::-moz-focus-inner {
|
|
19
|
+
border: none;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
input,
|
|
23
|
+
textarea,
|
|
24
|
+
button {
|
|
25
|
+
font-family: inherit;
|
|
26
|
+
font-size: inherit;
|
|
27
|
+
font-stretch: inherit;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
:host(.sr),
|
|
31
|
+
:host(.sr) button {
|
|
32
|
+
border: 0;
|
|
33
|
+
clip: rect(0 0 0 0);
|
|
34
|
+
height: 1px;
|
|
35
|
+
margin: -1px;
|
|
36
|
+
overflow: hidden;
|
|
37
|
+
padding: 0;
|
|
38
|
+
position: absolute;
|
|
39
|
+
width: 1px;
|
|
40
|
+
white-space: nowrap;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.sr,
|
|
44
|
+
.sr button {
|
|
45
|
+
border: 0;
|
|
46
|
+
clip: rect(0 0 0 0);
|
|
47
|
+
height: 1px;
|
|
48
|
+
margin: -1px;
|
|
49
|
+
overflow: hidden;
|
|
50
|
+
padding: 0;
|
|
51
|
+
position: absolute;
|
|
52
|
+
width: 1px;
|
|
53
|
+
white-space: nowrap;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.hidden {
|
|
57
|
+
display: none;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
:host([hidden]) {
|
|
61
|
+
display: none;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.invisible {
|
|
65
|
+
visibility: hidden;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
* {
|
|
69
|
+
box-sizing: border-box;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
*:active {
|
|
73
|
+
outline: none;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
*:focus {
|
|
77
|
+
outline: none;
|
|
78
|
+
box-shadow: var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #33b4ff #06C);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
:host {
|
|
82
|
+
box-shadow: none !important;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
::-moz-focus-inner {
|
|
86
|
+
border: none;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
input,
|
|
90
|
+
textarea,
|
|
91
|
+
button {
|
|
92
|
+
font-family: inherit;
|
|
93
|
+
font-size: inherit;
|
|
94
|
+
font-stretch: inherit;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
:host(.sr),
|
|
98
|
+
:host(.sr) button {
|
|
99
|
+
border: 0;
|
|
100
|
+
clip: rect(0 0 0 0);
|
|
101
|
+
height: 1px;
|
|
102
|
+
margin: -1px;
|
|
103
|
+
overflow: hidden;
|
|
104
|
+
padding: 0;
|
|
105
|
+
position: absolute;
|
|
106
|
+
width: 1px;
|
|
107
|
+
white-space: nowrap;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.sr,
|
|
111
|
+
.sr button {
|
|
112
|
+
border: 0;
|
|
113
|
+
clip: rect(0 0 0 0);
|
|
114
|
+
height: 1px;
|
|
115
|
+
margin: -1px;
|
|
116
|
+
overflow: hidden;
|
|
117
|
+
padding: 0;
|
|
118
|
+
position: absolute;
|
|
119
|
+
width: 1px;
|
|
120
|
+
white-space: nowrap;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.hidden {
|
|
124
|
+
display: none;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
:host([hidden]) {
|
|
128
|
+
display: none;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.invisible {
|
|
132
|
+
visibility: hidden;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
:host {
|
|
136
|
+
display: inline-flex;
|
|
137
|
+
width: 100%;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.container {
|
|
141
|
+
display: block;
|
|
142
|
+
overflow: hidden;
|
|
143
|
+
opacity: 0;
|
|
144
|
+
height: 0;
|
|
145
|
+
position: absolute;
|
|
146
|
+
visibility: hidden;
|
|
147
|
+
background-color: var(--tct-popover-background-color, var(--t-popover-background-color, var(--app-white, #ffffff)));
|
|
148
|
+
color: var(--tct-popover-text-color, var(--t-popover-text-color, var(--t-text, #4d4d4d)));
|
|
149
|
+
z-index: var(--tct-popover-z-index, var(--t-popover-z-index, 100));
|
|
150
|
+
width: max-content;
|
|
151
|
+
min-width: var(--tct-popover-min-width, var(--t-popover-min-width, 135px));
|
|
152
|
+
box-shadow: var(--tct-popover-box-shadow, var(--t-popover-box-shadow, var(--app-shadow-1, 0 2px 4px rgba(0, 0, 0, 0.3))));
|
|
153
|
+
text-align: start;
|
|
154
|
+
left: 0;
|
|
155
|
+
transition: opacity var(--app-tween-1, 0.2s ease);
|
|
156
|
+
border-radius: var(--tct-popover-border-radius, var(--t-popover-border-radius, 0));
|
|
157
|
+
max-height: var(--comp-pop-max-height);
|
|
158
|
+
--comp-scrollbar-size: var(--tct-scrollbar-size, var(--t-scrollbar-size, var(--app-scale-1x, 5px)));
|
|
159
|
+
--comp-scrollbar-border-radius: var(--tct-scrollbar-border-radius, var(--t-scrollbar-border-radius, var(--app-border-radius-1, 3px)));
|
|
160
|
+
--comp-scrollbar-color: var(--tct-scrollbar-color, var(--t-scrollbar-color, var(--t-a11y-gray-color, #747474)));
|
|
161
|
+
scrollbar-width: thin;
|
|
162
|
+
scrollbar-color: var(--comp-scrollbar-color) transparent;
|
|
163
|
+
}
|
|
164
|
+
.container::-webkit-scrollbar {
|
|
165
|
+
width: var(--comp-scrollbar-size);
|
|
166
|
+
height: var(--comp-scrollbar-size);
|
|
167
|
+
margin: 5px;
|
|
168
|
+
}
|
|
169
|
+
.container::-webkit-scrollbar-thumb {
|
|
170
|
+
background: var(--comp-scrollbar-color);
|
|
171
|
+
border-radius: var(--comp-scrollbar-border-radius);
|
|
172
|
+
}
|
|
173
|
+
.container::-webkit-scrollbar-track {
|
|
174
|
+
background: transparent;
|
|
175
|
+
border-radius: var(--comp-scrollbar-border-radius);
|
|
176
|
+
}
|
|
177
|
+
:host([block]) .container {
|
|
178
|
+
left: unset;
|
|
179
|
+
right: unset;
|
|
180
|
+
width: 100%;
|
|
181
|
+
}
|
|
182
|
+
:host([align=right]) .container {
|
|
183
|
+
right: 0;
|
|
184
|
+
text-align: end;
|
|
185
|
+
left: unset;
|
|
186
|
+
}
|
|
187
|
+
:host([open]) .container {
|
|
188
|
+
display: block;
|
|
189
|
+
height: auto;
|
|
190
|
+
overflow: auto;
|
|
191
|
+
opacity: 1;
|
|
192
|
+
visibility: visible;
|
|
193
|
+
}
|
|
194
|
+
.container.up {
|
|
195
|
+
bottom: var(--comp-pop-offset);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
click-elsewhere {
|
|
199
|
+
position: relative;
|
|
200
|
+
display: block;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.content {
|
|
204
|
+
height: auto;
|
|
205
|
+
}
|