q2-tecton-elements 1.18.0 → 1.19.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/click-elsewhere.cjs.entry.js +1 -1
- package/dist/cjs/{icons-e2bc9ee9.js → icons-afbdf88a.js} +1 -1
- package/dist/cjs/{index-eccd5617.js → index-3518c78c.js} +1 -1
- package/dist/cjs/{index-0128397d.js → index-734296a7.js} +476 -271
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/q2-avatar.cjs.entry.js +9 -6
- package/dist/cjs/q2-badge_2.cjs.entry.js +46 -7
- package/dist/cjs/q2-btn_2.cjs.entry.js +30 -5
- package/dist/cjs/q2-calendar.cjs.entry.js +102 -63
- package/dist/cjs/q2-card.cjs.entry.js +17 -6
- package/dist/cjs/q2-carousel-pane.cjs.entry.js +7 -3
- package/dist/cjs/q2-carousel.cjs.entry.js +196 -285
- package/dist/cjs/q2-chart-donut.cjs.entry.js +583 -504
- package/dist/cjs/q2-checkbox-group.cjs.entry.js +9 -7
- package/dist/cjs/q2-checkbox.cjs.entry.js +17 -4
- package/dist/cjs/q2-dropdown-item.cjs.entry.js +9 -3
- package/dist/cjs/q2-dropdown.cjs.entry.js +16 -5
- package/dist/cjs/q2-editable-field.cjs.entry.js +16 -6
- package/dist/cjs/q2-icon.cjs.entry.js +6 -4
- package/dist/cjs/q2-loading-element.cjs.entry.js +6 -2
- package/dist/cjs/q2-loc.cjs.entry.js +5 -3
- package/dist/cjs/q2-message.cjs.entry.js +4 -3
- package/dist/cjs/q2-month-picker.cjs.entry.js +9 -7
- package/dist/cjs/q2-optgroup.cjs.entry.js +6 -5
- package/dist/cjs/q2-option-list_2.cjs.entry.js +21 -7
- package/dist/cjs/q2-option.cjs.entry.js +12 -2
- package/dist/cjs/q2-pagination.cjs.entry.js +11 -3
- package/dist/cjs/q2-pill.cjs.entry.js +25 -7
- package/dist/cjs/q2-radio-group.cjs.entry.js +13 -6
- package/dist/cjs/q2-radio.cjs.entry.js +13 -8
- package/dist/cjs/q2-section.cjs.entry.js +44 -11
- package/dist/cjs/q2-select.cjs.entry.js +26 -17
- package/dist/cjs/q2-stepper-pane.cjs.entry.js +8 -3
- package/dist/cjs/q2-stepper-vertical.cjs.entry.js +5 -4
- package/dist/cjs/q2-stepper.cjs.entry.js +9 -7
- package/dist/cjs/q2-tab-container.cjs.entry.js +14 -9
- package/dist/cjs/q2-tab-pane.cjs.entry.js +10 -2
- package/dist/cjs/q2-tag.cjs.entry.js +20 -7
- package/dist/cjs/q2-tecton-elements.cjs.js +3 -3
- package/dist/cjs/q2-textarea.cjs.entry.js +20 -4
- package/dist/cjs/q2-tooltip.cjs.entry.js +9 -3
- package/dist/cjs/{shapes-c1a60d46.js → shapes-aad2b98f.js} +1 -1
- package/dist/cjs/tecton-tab-pane.cjs.entry.js +17 -2
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/click-elsewhere/index.js +18 -17
- package/dist/collection/components/q2-avatar/index.js +100 -92
- package/dist/collection/components/q2-avatar/styles.css +1 -1
- package/dist/collection/components/q2-badge/index.js +119 -111
- package/dist/collection/components/q2-badge/styles.css +1 -1
- package/dist/collection/components/q2-btn/index.js +349 -322
- package/dist/collection/components/q2-btn/styles.css +7 -7
- package/dist/collection/components/q2-calendar/index.js +578 -552
- package/dist/collection/components/q2-calendar/q2-month-picker.css +1 -1
- package/dist/collection/components/q2-calendar/q2-month-picker.js +112 -116
- package/dist/collection/components/q2-calendar/styles.css +1 -1
- package/dist/collection/components/q2-card/index.js +262 -244
- package/dist/collection/components/q2-card/styles.css +9 -2
- package/dist/collection/components/q2-carousel/index.js +249 -253
- package/dist/collection/components/q2-carousel/styles.css +1 -1
- package/dist/collection/components/q2-carousel-pane/index.js +108 -96
- package/dist/collection/components/q2-carousel-pane/styles.css +5 -4
- package/dist/collection/components/q2-chart-donut/index.js +350 -334
- package/dist/collection/components/q2-chart-donut/styles.css +3 -3
- package/dist/collection/components/q2-checkbox/index.js +296 -287
- package/dist/collection/components/q2-checkbox/styles.css +2 -2
- package/dist/collection/components/q2-checkbox-group/index.js +156 -152
- package/dist/collection/components/q2-checkbox-group/styles.css +1 -1
- package/dist/collection/components/q2-dropdown/index.js +255 -240
- package/dist/collection/components/q2-dropdown/styles.css +1 -1
- package/dist/collection/components/q2-dropdown-item/index.js +134 -123
- package/dist/collection/components/q2-dropdown-item/styles.css +12 -10
- package/dist/collection/components/q2-editable-field/index.js +300 -293
- package/dist/collection/components/q2-editable-field/styles.css +1 -1
- package/dist/collection/components/q2-icon/icons.js +358 -2158
- package/dist/collection/components/q2-icon/index.js +59 -49
- package/dist/collection/components/q2-icon/styles.css +1 -1
- package/dist/collection/components/q2-input/index.js +729 -705
- package/dist/collection/components/q2-input/styles.css +2 -2
- package/dist/collection/components/q2-loading/index.js +143 -132
- package/dist/collection/components/q2-loading/skeleton/q2-loading-element/index.js +85 -74
- package/dist/collection/components/q2-loading/skeleton/shapes.js +23 -36
- package/dist/collection/components/q2-loading/styles.css +1 -1
- package/dist/collection/components/q2-loc/index.js +49 -39
- package/dist/collection/components/q2-loc/styles.css +1 -1
- package/dist/collection/components/q2-message/index.js +101 -92
- package/dist/collection/components/q2-message/styles.css +1 -1
- package/dist/collection/components/q2-optgroup/index.js +64 -56
- package/dist/collection/components/q2-optgroup/styles.css +1 -1
- package/dist/collection/components/q2-option/index.js +244 -229
- package/dist/collection/components/q2-option/styles.css +5 -1
- package/dist/collection/components/q2-option-list/index.js +291 -270
- package/dist/collection/components/q2-option-list/styles.css +1 -1
- package/dist/collection/components/q2-pagination/index.js +183 -179
- package/dist/collection/components/q2-pagination/styles.css +1 -1
- package/dist/collection/components/q2-pill/index.js +260 -208
- package/dist/collection/components/q2-pill/styles.css +1 -1
- package/dist/collection/components/q2-popover/index.js +169 -151
- package/dist/collection/components/q2-popover/styles.css +2 -2
- package/dist/collection/components/q2-radio/index.js +233 -224
- package/dist/collection/components/q2-radio/styles.css +3 -3
- package/dist/collection/components/q2-radio-group/index.js +252 -244
- package/dist/collection/components/q2-radio-group/styles.css +1 -1
- package/dist/collection/components/q2-section/index.js +169 -131
- package/dist/collection/components/q2-section/styles.css +8 -6
- package/dist/collection/components/q2-select/index.js +393 -381
- package/dist/collection/components/q2-select/styles.css +1 -1
- package/dist/collection/components/q2-stepper/index.js +124 -126
- package/dist/collection/components/q2-stepper/styles.css +2 -1
- package/dist/collection/components/q2-stepper-pane/index.js +165 -149
- package/dist/collection/components/q2-stepper-pane/styles.css +1 -1
- package/dist/collection/components/q2-stepper-vertical/index.js +86 -85
- package/dist/collection/components/q2-stepper-vertical/styles.css +1 -1
- package/dist/collection/components/q2-tab-container/index.js +189 -184
- package/dist/collection/components/q2-tab-container/styles.css +1 -1
- package/dist/collection/components/q2-tab-pane/index.js +185 -166
- package/dist/collection/components/q2-tab-pane/styles.css +1 -1
- package/dist/collection/components/q2-tag/index.js +168 -116
- package/dist/collection/components/q2-tag/styles.css +1 -1
- package/dist/collection/components/q2-textarea/index.js +344 -327
- package/dist/collection/components/q2-textarea/styles.css +2 -2
- package/dist/collection/components/q2-tooltip/index.js +147 -133
- package/dist/collection/components/q2-tooltip/styles.css +1 -1
- package/dist/collection/components/tecton-tab-pane/index.js +287 -266
- package/dist/collection/components/tecton-tab-pane/styles.css +1 -1
- package/dist/collection/utils/index.js +2 -6
- package/dist/esm/click-elsewhere.entry.js +1 -1
- package/dist/esm/{icons-ed54e307.js → icons-78da5dd2.js} +1 -1
- package/dist/esm/{index-eac6b89e.js → index-9c591682.js} +1 -1
- package/dist/esm/{index-6d5ed7cc.js → index-bb1c8c7f.js} +476 -271
- package/dist/esm/loader.js +3 -3
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm/q2-avatar.entry.js +9 -6
- package/dist/esm/q2-badge_2.entry.js +46 -7
- package/dist/esm/q2-btn_2.entry.js +30 -5
- package/dist/esm/q2-calendar.entry.js +102 -63
- package/dist/esm/q2-card.entry.js +17 -6
- package/dist/esm/q2-carousel-pane.entry.js +7 -3
- package/dist/esm/q2-carousel.entry.js +196 -285
- package/dist/esm/q2-chart-donut.entry.js +583 -504
- package/dist/esm/q2-checkbox-group.entry.js +9 -7
- package/dist/esm/q2-checkbox.entry.js +17 -4
- package/dist/esm/q2-dropdown-item.entry.js +9 -3
- package/dist/esm/q2-dropdown.entry.js +16 -5
- package/dist/esm/q2-editable-field.entry.js +16 -6
- package/dist/esm/q2-icon.entry.js +6 -4
- package/dist/esm/q2-loading-element.entry.js +6 -2
- package/dist/esm/q2-loc.entry.js +5 -3
- package/dist/esm/q2-message.entry.js +4 -3
- package/dist/esm/q2-month-picker.entry.js +9 -7
- package/dist/esm/q2-optgroup.entry.js +6 -5
- package/dist/esm/q2-option-list_2.entry.js +21 -7
- package/dist/esm/q2-option.entry.js +12 -2
- package/dist/esm/q2-pagination.entry.js +11 -3
- package/dist/esm/q2-pill.entry.js +25 -7
- package/dist/esm/q2-radio-group.entry.js +13 -6
- package/dist/esm/q2-radio.entry.js +13 -8
- package/dist/esm/q2-section.entry.js +44 -11
- package/dist/esm/q2-select.entry.js +26 -17
- package/dist/esm/q2-stepper-pane.entry.js +8 -3
- package/dist/esm/q2-stepper-vertical.entry.js +5 -4
- package/dist/esm/q2-stepper.entry.js +9 -7
- package/dist/esm/q2-tab-container.entry.js +14 -9
- package/dist/esm/q2-tab-pane.entry.js +10 -2
- package/dist/esm/q2-tag.entry.js +20 -7
- package/dist/esm/q2-tecton-elements.js +3 -3
- package/dist/esm/q2-textarea.entry.js +20 -4
- package/dist/esm/q2-tooltip.entry.js +9 -3
- package/dist/esm/{shapes-c32e3ba2.js → shapes-62b8a431.js} +1 -1
- package/dist/esm/tecton-tab-pane.entry.js +17 -2
- package/dist/loader/package.json +1 -0
- package/dist/q2-tecton-elements/p-0ba564b1.entry.js +1 -0
- package/dist/q2-tecton-elements/p-0fad9c5a.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-73154834.js → p-13a639cf.js} +1 -1
- package/dist/q2-tecton-elements/p-16c11d74.entry.js +1 -0
- package/dist/q2-tecton-elements/p-17e0cbf1.entry.js +1 -0
- package/dist/q2-tecton-elements/p-2c9b1308.entry.js +1 -0
- package/dist/q2-tecton-elements/p-2e832e42.entry.js +1 -0
- package/dist/q2-tecton-elements/p-315fdb74.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-c608e3c9.entry.js → p-444415b5.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-4d700630.entry.js +1 -0
- package/dist/q2-tecton-elements/p-54e792bd.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-80014da0.js → p-5e374fbd.js} +1 -1
- package/dist/q2-tecton-elements/p-5f064e1e.entry.js +39 -0
- package/dist/q2-tecton-elements/p-692f2d09.entry.js +1 -0
- package/dist/q2-tecton-elements/p-6e6b5b80.entry.js +1 -0
- package/dist/q2-tecton-elements/p-74136b15.entry.js +1 -0
- package/dist/q2-tecton-elements/p-7e8f43d1.entry.js +1 -0
- package/dist/q2-tecton-elements/p-8e380edf.entry.js +1 -0
- package/dist/q2-tecton-elements/p-926a3e80.js +2 -0
- package/dist/q2-tecton-elements/{p-93c00587.js → p-92e1faf8.js} +1 -1
- package/dist/q2-tecton-elements/p-9772b15f.entry.js +1 -0
- package/dist/q2-tecton-elements/p-97aa8423.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-17cffd7d.entry.js → p-a987402e.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-aaf42539.entry.js +1 -0
- package/dist/q2-tecton-elements/p-ac674c20.entry.js +1 -0
- package/dist/q2-tecton-elements/p-b8b00394.entry.js +1 -0
- package/dist/q2-tecton-elements/p-c444a60b.entry.js +1 -0
- package/dist/q2-tecton-elements/p-c6c489fe.entry.js +1 -0
- package/dist/q2-tecton-elements/p-ce015552.entry.js +1 -0
- package/dist/q2-tecton-elements/p-d464fccc.entry.js +1 -0
- package/dist/q2-tecton-elements/p-de164483.entry.js +1 -0
- package/dist/q2-tecton-elements/p-df91e954.entry.js +1 -0
- package/dist/q2-tecton-elements/p-e6d26f39.entry.js +1 -0
- package/dist/q2-tecton-elements/p-e8e113c2.entry.js +1 -0
- package/dist/q2-tecton-elements/p-f1d06917.entry.js +1 -0
- package/dist/q2-tecton-elements/p-f219fe9d.entry.js +1 -0
- package/dist/q2-tecton-elements/p-f800fd1e.entry.js +1 -0
- package/dist/q2-tecton-elements/p-fb37e67e.entry.js +1 -0
- package/dist/q2-tecton-elements/p-fc134a5d.entry.js +1 -0
- package/dist/q2-tecton-elements/p-fe88e979.entry.js +1 -0
- package/dist/q2-tecton-elements/p-ffb48ccc.entry.js +1 -0
- package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
- package/dist/test/helpers.js +6 -0
- package/dist/types/components/q2-pill/index.d.ts +3 -0
- package/dist/types/components/q2-section/index.d.ts +3 -0
- package/dist/types/components/q2-tag/index.d.ts +3 -0
- package/dist/types/components.d.ts +154 -38
- package/dist/types/stencil-public-runtime.d.ts +20 -4
- package/dist/types/workspace/workspace/{Tecton_tecton-production_master → tecton-production_release_1.19.x}/packages/q2-tecton-elements/.stencil/test/helpers.d.ts +2 -0
- package/package.json +6 -6
- package/dist/q2-tecton-elements/p-02c1b7fd.entry.js +0 -1
- package/dist/q2-tecton-elements/p-04c743f2.entry.js +0 -1
- package/dist/q2-tecton-elements/p-07dc509c.entry.js +0 -1
- package/dist/q2-tecton-elements/p-12caa479.entry.js +0 -1
- package/dist/q2-tecton-elements/p-160dd1c2.entry.js +0 -1
- package/dist/q2-tecton-elements/p-1a3de749.entry.js +0 -1
- package/dist/q2-tecton-elements/p-2061c3fd.entry.js +0 -1
- package/dist/q2-tecton-elements/p-2a217895.entry.js +0 -1
- package/dist/q2-tecton-elements/p-2b94ae62.entry.js +0 -1
- package/dist/q2-tecton-elements/p-2e54f9a0.entry.js +0 -1
- package/dist/q2-tecton-elements/p-375569ff.entry.js +0 -1
- package/dist/q2-tecton-elements/p-3766cc6c.entry.js +0 -1
- package/dist/q2-tecton-elements/p-3eda2714.entry.js +0 -1
- package/dist/q2-tecton-elements/p-421af42d.entry.js +0 -1
- package/dist/q2-tecton-elements/p-4c53713d.entry.js +0 -1
- package/dist/q2-tecton-elements/p-4fd405f5.entry.js +0 -1
- package/dist/q2-tecton-elements/p-509c8924.entry.js +0 -1
- package/dist/q2-tecton-elements/p-55dc3dc1.entry.js +0 -1
- package/dist/q2-tecton-elements/p-5fffb28a.entry.js +0 -1
- package/dist/q2-tecton-elements/p-612e9974.entry.js +0 -1
- package/dist/q2-tecton-elements/p-64ca8c59.entry.js +0 -1
- package/dist/q2-tecton-elements/p-796c2bb5.entry.js +0 -1
- package/dist/q2-tecton-elements/p-86887866.entry.js +0 -1
- package/dist/q2-tecton-elements/p-9204c34d.entry.js +0 -1
- package/dist/q2-tecton-elements/p-9725d55f.entry.js +0 -1
- package/dist/q2-tecton-elements/p-a0fa416d.entry.js +0 -39
- package/dist/q2-tecton-elements/p-bd83e8e2.entry.js +0 -1
- package/dist/q2-tecton-elements/p-be0f2539.entry.js +0 -1
- package/dist/q2-tecton-elements/p-c05b0b55.entry.js +0 -1
- package/dist/q2-tecton-elements/p-c5691700.js +0 -1
- package/dist/q2-tecton-elements/p-d826d7ad.entry.js +0 -1
- package/dist/q2-tecton-elements/p-d9e9340c.entry.js +0 -1
- package/dist/q2-tecton-elements/p-e5757895.entry.js +0 -1
- package/dist/q2-tecton-elements/p-e68c9ef0.entry.js +0 -1
- package/dist/q2-tecton-elements/p-eb33bda4.entry.js +0 -1
- package/dist/q2-tecton-elements/p-f319549d.entry.js +0 -1
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { h } from '@stencil/core';
|
|
2
2
|
import icons from '../q2-icon/icons';
|
|
3
3
|
export class Q2Avatar {
|
|
4
4
|
constructor() {
|
|
5
|
-
this.icon = 'person';
|
|
6
|
-
this.badSrc = false;
|
|
7
|
-
this.isLoaded = false;
|
|
8
5
|
this.onError = () => {
|
|
9
6
|
this.badSrc = true;
|
|
10
7
|
};
|
|
11
8
|
this.onLoad = () => {
|
|
12
9
|
this.isLoaded = true;
|
|
13
10
|
};
|
|
11
|
+
this.name = undefined;
|
|
12
|
+
this.initials = undefined;
|
|
13
|
+
this.src = undefined;
|
|
14
|
+
this.icon = 'person';
|
|
15
|
+
this.badSrc = false;
|
|
16
|
+
this.isLoaded = false;
|
|
14
17
|
}
|
|
15
18
|
srcDidUpdate() {
|
|
16
19
|
this.badSrc = false;
|
|
@@ -43,99 +46,104 @@ export class Q2Avatar {
|
|
|
43
46
|
const isLoaded = this.isLoaded;
|
|
44
47
|
const showInitials = (this.name || this.initials) && (!this.src || this.badSrc);
|
|
45
48
|
const showFallback = !this.name && !this.initials && (!this.src || this.badSrc);
|
|
46
|
-
return (h("div", null,
|
|
47
|
-
showImg && (h("img", { class: isLoaded ? 'avatar-img' : 'avatar-img-default', "test-id": "userImage", src: this.src, onError: this.onError, onLoad: this.onLoad, alt: this.name || '' })),
|
|
48
|
-
showInitials && (h("svg", { viewBox: "0 0 100 100", preserveAspectRatio: "xMidYMid meet", "test-id": "userInitials", class: `avatar-initials size-${computedInitials.length}`, "aria-label": this.name, "aria-hidden": !this.name && 'true' },
|
|
49
|
-
h("text", { x: "50", y: "50", "dominant-baseline": "central", "text-anchor": "middle", "aria-hidden": "true" }, computedInitials))),
|
|
50
|
-
showFallback && (h("div", { "test-id": "fallbackIcon", class: "fallback" },
|
|
51
|
-
h("q2-icon", { type: this.icon })))));
|
|
49
|
+
return (h("div", null, showImg && (h("img", { class: isLoaded ? 'avatar-img' : 'avatar-img-default', "test-id": "userImage", src: this.src, onError: this.onError, onLoad: this.onLoad, alt: this.name || '' })), showInitials && (h("svg", { viewBox: "0 0 100 100", preserveAspectRatio: "xMidYMid meet", "test-id": "userInitials", class: `avatar-initials size-${computedInitials.length}`, "aria-label": this.name, "aria-hidden": !this.name && 'true' }, h("text", { x: "50", y: "50", "dominant-baseline": "central", "text-anchor": "middle", "aria-hidden": "true" }, computedInitials))), showFallback && (h("div", { "test-id": "fallbackIcon", class: "fallback" }, h("q2-icon", { type: this.icon })))));
|
|
52
50
|
}
|
|
53
51
|
static get is() { return "q2-avatar"; }
|
|
54
52
|
static get encapsulation() { return "shadow"; }
|
|
55
|
-
static get originalStyleUrls() {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
"
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
"original": "string",
|
|
84
|
-
"resolved": "string",
|
|
85
|
-
"references": {}
|
|
86
|
-
},
|
|
87
|
-
"required": false,
|
|
88
|
-
"optional": false,
|
|
89
|
-
"docs": {
|
|
90
|
-
"tags": [],
|
|
91
|
-
"text": ""
|
|
92
|
-
},
|
|
93
|
-
"attribute": "initials",
|
|
94
|
-
"reflect": true
|
|
95
|
-
},
|
|
96
|
-
"src": {
|
|
97
|
-
"type": "string",
|
|
98
|
-
"mutable": false,
|
|
99
|
-
"complexType": {
|
|
100
|
-
"original": "string",
|
|
101
|
-
"resolved": "string",
|
|
102
|
-
"references": {}
|
|
103
|
-
},
|
|
104
|
-
"required": false,
|
|
105
|
-
"optional": false,
|
|
106
|
-
"docs": {
|
|
107
|
-
"tags": [],
|
|
108
|
-
"text": ""
|
|
53
|
+
static get originalStyleUrls() {
|
|
54
|
+
return {
|
|
55
|
+
"$": ["styles.scss"]
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
static get styleUrls() {
|
|
59
|
+
return {
|
|
60
|
+
"$": ["styles.css"]
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
static get properties() {
|
|
64
|
+
return {
|
|
65
|
+
"name": {
|
|
66
|
+
"type": "string",
|
|
67
|
+
"mutable": false,
|
|
68
|
+
"complexType": {
|
|
69
|
+
"original": "string",
|
|
70
|
+
"resolved": "string",
|
|
71
|
+
"references": {}
|
|
72
|
+
},
|
|
73
|
+
"required": false,
|
|
74
|
+
"optional": false,
|
|
75
|
+
"docs": {
|
|
76
|
+
"tags": [],
|
|
77
|
+
"text": ""
|
|
78
|
+
},
|
|
79
|
+
"attribute": "name",
|
|
80
|
+
"reflect": true
|
|
109
81
|
},
|
|
110
|
-
"
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
"
|
|
119
|
-
"
|
|
82
|
+
"initials": {
|
|
83
|
+
"type": "string",
|
|
84
|
+
"mutable": false,
|
|
85
|
+
"complexType": {
|
|
86
|
+
"original": "string",
|
|
87
|
+
"resolved": "string",
|
|
88
|
+
"references": {}
|
|
89
|
+
},
|
|
90
|
+
"required": false,
|
|
91
|
+
"optional": false,
|
|
92
|
+
"docs": {
|
|
93
|
+
"tags": [],
|
|
94
|
+
"text": ""
|
|
95
|
+
},
|
|
96
|
+
"attribute": "initials",
|
|
97
|
+
"reflect": true
|
|
120
98
|
},
|
|
121
|
-
"
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
"
|
|
125
|
-
|
|
99
|
+
"src": {
|
|
100
|
+
"type": "string",
|
|
101
|
+
"mutable": false,
|
|
102
|
+
"complexType": {
|
|
103
|
+
"original": "string",
|
|
104
|
+
"resolved": "string",
|
|
105
|
+
"references": {}
|
|
106
|
+
},
|
|
107
|
+
"required": false,
|
|
108
|
+
"optional": false,
|
|
109
|
+
"docs": {
|
|
110
|
+
"tags": [],
|
|
111
|
+
"text": ""
|
|
112
|
+
},
|
|
113
|
+
"attribute": "src",
|
|
114
|
+
"reflect": true
|
|
126
115
|
},
|
|
127
|
-
"
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
116
|
+
"icon": {
|
|
117
|
+
"type": "string",
|
|
118
|
+
"mutable": false,
|
|
119
|
+
"complexType": {
|
|
120
|
+
"original": "string",
|
|
121
|
+
"resolved": "string",
|
|
122
|
+
"references": {}
|
|
123
|
+
},
|
|
124
|
+
"required": false,
|
|
125
|
+
"optional": false,
|
|
126
|
+
"docs": {
|
|
127
|
+
"tags": [],
|
|
128
|
+
"text": ""
|
|
129
|
+
},
|
|
130
|
+
"attribute": "icon",
|
|
131
|
+
"reflect": false,
|
|
132
|
+
"defaultValue": "'person'"
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
static get states() {
|
|
137
|
+
return {
|
|
138
|
+
"badSrc": {},
|
|
139
|
+
"isLoaded": {}
|
|
140
|
+
};
|
|
141
|
+
}
|
|
136
142
|
static get elementRef() { return "el"; }
|
|
137
|
-
static get watchers() {
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
143
|
+
static get watchers() {
|
|
144
|
+
return [{
|
|
145
|
+
"propName": "src",
|
|
146
|
+
"methodName": "srcDidUpdate"
|
|
147
|
+
}];
|
|
148
|
+
}
|
|
141
149
|
}
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { h } from '@stencil/core';
|
|
2
2
|
export class Q2Badge {
|
|
3
3
|
constructor() {
|
|
4
4
|
this.value = 0;
|
|
5
|
+
this.maxLength = undefined;
|
|
6
|
+
this.position = undefined;
|
|
7
|
+
this.size = undefined;
|
|
8
|
+
this.theme = undefined;
|
|
9
|
+
this.status = undefined;
|
|
5
10
|
}
|
|
6
11
|
get badgeText() {
|
|
7
12
|
const maxValue = Math.pow(10, this.maxLength || 2) - 1;
|
|
@@ -21,123 +26,126 @@ export class Q2Badge {
|
|
|
21
26
|
const badgeClass = ['badge'];
|
|
22
27
|
if (this.size === 'large')
|
|
23
28
|
badgeClass.push('size-large');
|
|
24
|
-
return (h("div", { class: "badge-wrapper" },
|
|
25
|
-
h("div", { class: badgeClass.join(' ') },
|
|
26
|
-
h("span", { class: "badge-text" },
|
|
27
|
-
h("slot", null, this.badgeText)))));
|
|
29
|
+
return (h("div", { class: "badge-wrapper" }, h("div", { class: badgeClass.join(' ') }, h("span", { class: "badge-text" }, h("slot", null, this.badgeText)))));
|
|
28
30
|
}
|
|
29
31
|
static get is() { return "q2-badge"; }
|
|
30
32
|
static get encapsulation() { return "shadow"; }
|
|
31
|
-
static get originalStyleUrls() {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
"
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
"original": "number | undefined",
|
|
61
|
-
"resolved": "number",
|
|
62
|
-
"references": {}
|
|
63
|
-
},
|
|
64
|
-
"required": false,
|
|
65
|
-
"optional": false,
|
|
66
|
-
"docs": {
|
|
67
|
-
"tags": [],
|
|
68
|
-
"text": ""
|
|
69
|
-
},
|
|
70
|
-
"attribute": "max-length",
|
|
71
|
-
"reflect": true
|
|
72
|
-
},
|
|
73
|
-
"position": {
|
|
74
|
-
"type": "string",
|
|
75
|
-
"mutable": false,
|
|
76
|
-
"complexType": {
|
|
77
|
-
"original": "'right' | 'left' | undefined",
|
|
78
|
-
"resolved": "\"left\" | \"right\"",
|
|
79
|
-
"references": {}
|
|
80
|
-
},
|
|
81
|
-
"required": false,
|
|
82
|
-
"optional": false,
|
|
83
|
-
"docs": {
|
|
84
|
-
"tags": [],
|
|
85
|
-
"text": ""
|
|
86
|
-
},
|
|
87
|
-
"attribute": "position",
|
|
88
|
-
"reflect": true
|
|
89
|
-
},
|
|
90
|
-
"size": {
|
|
91
|
-
"type": "string",
|
|
92
|
-
"mutable": false,
|
|
93
|
-
"complexType": {
|
|
94
|
-
"original": "'default' | 'large' | undefined",
|
|
95
|
-
"resolved": "\"default\" | \"large\"",
|
|
96
|
-
"references": {}
|
|
97
|
-
},
|
|
98
|
-
"required": false,
|
|
99
|
-
"optional": false,
|
|
100
|
-
"docs": {
|
|
101
|
-
"tags": [],
|
|
102
|
-
"text": ""
|
|
33
|
+
static get originalStyleUrls() {
|
|
34
|
+
return {
|
|
35
|
+
"$": ["styles.scss"]
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
static get styleUrls() {
|
|
39
|
+
return {
|
|
40
|
+
"$": ["styles.css"]
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
static get properties() {
|
|
44
|
+
return {
|
|
45
|
+
"value": {
|
|
46
|
+
"type": "number",
|
|
47
|
+
"mutable": false,
|
|
48
|
+
"complexType": {
|
|
49
|
+
"original": "number",
|
|
50
|
+
"resolved": "number",
|
|
51
|
+
"references": {}
|
|
52
|
+
},
|
|
53
|
+
"required": false,
|
|
54
|
+
"optional": false,
|
|
55
|
+
"docs": {
|
|
56
|
+
"tags": [],
|
|
57
|
+
"text": ""
|
|
58
|
+
},
|
|
59
|
+
"attribute": "value",
|
|
60
|
+
"reflect": true,
|
|
61
|
+
"defaultValue": "0"
|
|
103
62
|
},
|
|
104
|
-
"
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
"
|
|
113
|
-
"
|
|
63
|
+
"maxLength": {
|
|
64
|
+
"type": "number",
|
|
65
|
+
"mutable": false,
|
|
66
|
+
"complexType": {
|
|
67
|
+
"original": "number | undefined",
|
|
68
|
+
"resolved": "number",
|
|
69
|
+
"references": {}
|
|
70
|
+
},
|
|
71
|
+
"required": false,
|
|
72
|
+
"optional": false,
|
|
73
|
+
"docs": {
|
|
74
|
+
"tags": [],
|
|
75
|
+
"text": ""
|
|
76
|
+
},
|
|
77
|
+
"attribute": "max-length",
|
|
78
|
+
"reflect": true
|
|
114
79
|
},
|
|
115
|
-
"
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
"
|
|
119
|
-
|
|
80
|
+
"position": {
|
|
81
|
+
"type": "string",
|
|
82
|
+
"mutable": false,
|
|
83
|
+
"complexType": {
|
|
84
|
+
"original": "'right' | 'left' | undefined",
|
|
85
|
+
"resolved": "\"left\" | \"right\"",
|
|
86
|
+
"references": {}
|
|
87
|
+
},
|
|
88
|
+
"required": false,
|
|
89
|
+
"optional": false,
|
|
90
|
+
"docs": {
|
|
91
|
+
"tags": [],
|
|
92
|
+
"text": ""
|
|
93
|
+
},
|
|
94
|
+
"attribute": "position",
|
|
95
|
+
"reflect": true
|
|
120
96
|
},
|
|
121
|
-
"
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
"
|
|
130
|
-
"
|
|
97
|
+
"size": {
|
|
98
|
+
"type": "string",
|
|
99
|
+
"mutable": false,
|
|
100
|
+
"complexType": {
|
|
101
|
+
"original": "'default' | 'large' | undefined",
|
|
102
|
+
"resolved": "\"default\" | \"large\"",
|
|
103
|
+
"references": {}
|
|
104
|
+
},
|
|
105
|
+
"required": false,
|
|
106
|
+
"optional": false,
|
|
107
|
+
"docs": {
|
|
108
|
+
"tags": [],
|
|
109
|
+
"text": ""
|
|
110
|
+
},
|
|
111
|
+
"attribute": "size",
|
|
112
|
+
"reflect": true
|
|
131
113
|
},
|
|
132
|
-
"
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
"
|
|
136
|
-
|
|
114
|
+
"theme": {
|
|
115
|
+
"type": "string",
|
|
116
|
+
"mutable": false,
|
|
117
|
+
"complexType": {
|
|
118
|
+
"original": "'primary' | 'secondary' | 'tertiary' | undefined",
|
|
119
|
+
"resolved": "\"primary\" | \"secondary\" | \"tertiary\"",
|
|
120
|
+
"references": {}
|
|
121
|
+
},
|
|
122
|
+
"required": false,
|
|
123
|
+
"optional": false,
|
|
124
|
+
"docs": {
|
|
125
|
+
"tags": [],
|
|
126
|
+
"text": ""
|
|
127
|
+
},
|
|
128
|
+
"attribute": "theme",
|
|
129
|
+
"reflect": true
|
|
137
130
|
},
|
|
138
|
-
"
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
131
|
+
"status": {
|
|
132
|
+
"type": "string",
|
|
133
|
+
"mutable": false,
|
|
134
|
+
"complexType": {
|
|
135
|
+
"original": "'info' | 'alert' | 'warning' | 'success' | undefined",
|
|
136
|
+
"resolved": "\"alert\" | \"info\" | \"success\" | \"warning\"",
|
|
137
|
+
"references": {}
|
|
138
|
+
},
|
|
139
|
+
"required": false,
|
|
140
|
+
"optional": false,
|
|
141
|
+
"docs": {
|
|
142
|
+
"tags": [],
|
|
143
|
+
"text": ""
|
|
144
|
+
},
|
|
145
|
+
"attribute": "status",
|
|
146
|
+
"reflect": true
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
}
|
|
142
150
|
static get elementRef() { return "hostElement"; }
|
|
143
151
|
}
|