q2-tecton-elements 1.14.3 → 1.16.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/{index-0fec9f3b.js → index-afc50fbb.js} +18 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/q2-avatar.cjs.entry.js +7 -2
- package/dist/cjs/{q2-input.cjs.entry.js → q2-badge_2.cjs.entry.js} +77 -18
- package/dist/cjs/q2-btn_2.cjs.entry.js +7 -6
- package/dist/cjs/q2-calendar.cjs.entry.js +5 -6
- package/dist/cjs/q2-card.cjs.entry.js +15 -8
- package/dist/cjs/q2-carousel-pane.cjs.entry.js +2 -2
- package/dist/cjs/q2-carousel.cjs.entry.js +2 -2
- package/dist/cjs/q2-chart-donut.cjs.entry.js +8 -3
- package/dist/cjs/q2-checkbox-group.cjs.entry.js +2 -2
- package/dist/cjs/q2-checkbox.cjs.entry.js +12 -13
- package/dist/cjs/q2-dropdown-item.cjs.entry.js +2 -2
- package/dist/cjs/q2-dropdown.cjs.entry.js +2 -2
- package/dist/cjs/q2-editable-field.cjs.entry.js +4 -4
- package/dist/cjs/q2-icon.cjs.entry.js +2 -2
- package/dist/cjs/q2-loc.cjs.entry.js +2 -2
- package/dist/cjs/q2-message.cjs.entry.js +2 -2
- package/dist/cjs/q2-optgroup.cjs.entry.js +2 -2
- package/dist/cjs/q2-option-list.cjs.entry.js +6 -6
- package/dist/cjs/q2-option.cjs.entry.js +12 -1
- package/dist/cjs/q2-pagination.cjs.entry.js +2 -2
- package/dist/cjs/q2-pill.cjs.entry.js +10 -3
- package/dist/cjs/q2-radio-group.cjs.entry.js +2 -2
- package/dist/cjs/q2-radio.cjs.entry.js +3 -2
- package/dist/cjs/q2-section.cjs.entry.js +2 -2
- package/dist/cjs/q2-select.cjs.entry.js +300 -195
- package/dist/cjs/q2-stepper-pane.cjs.entry.js +2 -2
- package/dist/cjs/q2-stepper-vertical.cjs.entry.js +3 -2
- package/dist/cjs/q2-stepper.cjs.entry.js +21 -4
- package/dist/cjs/q2-tab-container.cjs.entry.js +16 -6
- package/dist/cjs/q2-tab-pane.cjs.entry.js +8 -1
- package/dist/cjs/q2-tag.cjs.entry.js +2 -2
- package/dist/cjs/q2-tecton-elements.cjs.js +1 -1
- package/dist/cjs/q2-textarea.cjs.entry.js +2 -2
- package/dist/cjs/q2-tooltip.cjs.entry.js +33 -0
- package/dist/cjs/tecton-tab-pane.cjs.entry.js +6 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/q2-avatar/index.js +8 -2
- package/dist/collection/components/q2-avatar/styles.css +9 -1
- package/dist/collection/components/q2-badge/index.js +4 -9
- package/dist/collection/components/q2-badge/styles.css +21 -14
- package/dist/collection/components/q2-btn/index.js +7 -6
- package/dist/collection/components/q2-btn/styles.css +10 -12
- package/dist/collection/components/q2-calendar/helpers.js +1 -1
- package/dist/collection/components/q2-calendar/index.js +2 -3
- package/dist/collection/components/q2-calendar/styles.css +7 -7
- package/dist/collection/components/q2-card/index.js +33 -8
- package/dist/collection/components/q2-card/styles.css +33 -36
- package/dist/collection/components/q2-carousel/styles.css +1 -1
- package/dist/collection/components/q2-carousel-pane/styles.css +1 -1
- package/dist/collection/components/q2-chart-donut/index.js +6 -1
- package/dist/collection/components/q2-chart-donut/styles.css +8 -5
- package/dist/collection/components/q2-checkbox/index.js +10 -11
- package/dist/collection/components/q2-checkbox/styles.css +2 -2
- package/dist/collection/components/q2-checkbox-group/styles.css +3 -3
- package/dist/collection/components/q2-dropdown/styles.css +6 -6
- package/dist/collection/components/q2-dropdown-item/styles.css +3 -3
- package/dist/collection/components/q2-editable-field/index.js +19 -2
- package/dist/collection/components/q2-editable-field/styles.css +4 -4
- package/dist/collection/components/q2-icon/styles.css +1 -1
- package/dist/collection/components/q2-input/index.js +90 -23
- package/dist/collection/components/q2-input/styles.css +33 -26
- package/dist/collection/components/q2-loading/styles.css +4 -4
- package/dist/collection/components/q2-loc/styles.css +1 -1
- package/dist/collection/components/q2-message/styles.css +19 -17
- package/dist/collection/components/q2-optgroup/styles.css +7 -11
- package/dist/collection/components/q2-option/index.js +15 -3
- package/dist/collection/components/q2-option/styles.css +12 -5
- package/dist/collection/components/q2-option-list/index.js +22 -7
- package/dist/collection/components/q2-option-list/styles.css +5 -5
- package/dist/collection/components/q2-pagination/styles.css +1 -1
- package/dist/collection/components/q2-pill/index.js +26 -2
- package/dist/collection/components/q2-pill/styles.css +18 -17
- package/dist/collection/components/q2-radio/index.js +1 -0
- package/dist/collection/components/q2-radio/styles.css +2 -2
- package/dist/collection/components/q2-radio-group/styles.css +3 -3
- package/dist/collection/components/q2-section/styles.css +6 -6
- package/dist/collection/components/q2-select/index.js +316 -202
- package/dist/collection/components/q2-select/styles.css +24 -13
- package/dist/collection/components/q2-stepper/index.js +30 -6
- package/dist/collection/components/q2-stepper/styles.css +50 -12
- package/dist/collection/components/q2-stepper-pane/styles.css +1 -1
- package/dist/collection/components/q2-stepper-vertical/index.js +1 -0
- package/dist/collection/components/q2-stepper-vertical/styles.css +14 -14
- package/dist/collection/components/q2-tab-container/index.js +22 -4
- package/dist/collection/components/q2-tab-container/styles.css +23 -9
- package/dist/collection/components/q2-tab-pane/index.js +58 -1
- package/dist/collection/components/q2-tab-pane/styles.css +1 -1
- package/dist/collection/components/q2-tag/styles.css +4 -6
- package/dist/collection/components/q2-textarea/styles.css +2 -2
- package/dist/collection/components/q2-tooltip/index.js +120 -0
- package/dist/collection/components/q2-tooltip/styles.css +276 -0
- package/dist/collection/components/tecton-tab-pane/index.js +57 -1
- package/dist/collection/components/tecton-tab-pane/styles.css +1 -1
- package/dist/collection/utils/index.js +18 -2
- package/dist/esm/{index-14e81efa.js → index-2ca8c93c.js} +18 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/q2-avatar.entry.js +7 -2
- package/dist/esm/{q2-input.entry.js → q2-badge_2.entry.js} +78 -20
- package/dist/esm/q2-btn_2.entry.js +7 -6
- package/dist/esm/q2-calendar.entry.js +5 -6
- package/dist/esm/q2-card.entry.js +15 -8
- package/dist/esm/q2-carousel-pane.entry.js +2 -2
- package/dist/esm/q2-carousel.entry.js +2 -2
- package/dist/esm/q2-chart-donut.entry.js +8 -3
- package/dist/esm/q2-checkbox-group.entry.js +2 -2
- package/dist/esm/q2-checkbox.entry.js +12 -13
- package/dist/esm/q2-dropdown-item.entry.js +2 -2
- package/dist/esm/q2-dropdown.entry.js +2 -2
- package/dist/esm/q2-editable-field.entry.js +4 -4
- package/dist/esm/q2-icon.entry.js +2 -2
- package/dist/esm/q2-loc.entry.js +2 -2
- package/dist/esm/q2-message.entry.js +2 -2
- package/dist/esm/q2-optgroup.entry.js +2 -2
- package/dist/esm/q2-option-list.entry.js +6 -6
- package/dist/esm/q2-option.entry.js +12 -1
- package/dist/esm/q2-pagination.entry.js +2 -2
- package/dist/esm/q2-pill.entry.js +10 -3
- package/dist/esm/q2-radio-group.entry.js +2 -2
- package/dist/esm/q2-radio.entry.js +3 -2
- package/dist/esm/q2-section.entry.js +2 -2
- package/dist/esm/q2-select.entry.js +300 -195
- package/dist/esm/q2-stepper-pane.entry.js +2 -2
- package/dist/esm/q2-stepper-vertical.entry.js +3 -2
- package/dist/esm/q2-stepper.entry.js +21 -4
- package/dist/esm/q2-tab-container.entry.js +16 -6
- package/dist/esm/q2-tab-pane.entry.js +9 -2
- package/dist/esm/q2-tag.entry.js +2 -2
- package/dist/esm/q2-tecton-elements.js +1 -1
- package/dist/esm/q2-textarea.entry.js +2 -2
- package/dist/esm/q2-tooltip.entry.js +29 -0
- package/dist/esm/tecton-tab-pane.entry.js +7 -2
- package/dist/q2-tecton-elements/p-0a8b8d14.entry.js +1 -0
- package/dist/q2-tecton-elements/p-0b5fbbe8.entry.js +1 -0
- package/dist/q2-tecton-elements/p-0d00030f.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-85cff6ec.entry.js → p-0e9c7220.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-1b0f826e.entry.js +1 -0
- package/dist/q2-tecton-elements/p-1c430c2a.entry.js +1 -0
- package/dist/q2-tecton-elements/p-2d2008fd.entry.js +1 -0
- package/dist/q2-tecton-elements/p-34f99830.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-ead64414.entry.js → p-35bde69c.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-d46efe36.entry.js → p-376988ef.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-41fcf343.js +1 -0
- package/dist/q2-tecton-elements/p-49612230.entry.js +1 -0
- package/dist/q2-tecton-elements/p-4b48fde6.entry.js +1 -0
- package/dist/q2-tecton-elements/p-4ec2cb69.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-ea2a290e.entry.js → p-5270b0ff.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-5e990654.entry.js +1 -0
- package/dist/q2-tecton-elements/p-60a7a11e.entry.js +1 -0
- package/dist/q2-tecton-elements/p-677faf2c.entry.js +1 -0
- package/dist/q2-tecton-elements/p-6e10db80.entry.js +1 -0
- package/dist/q2-tecton-elements/p-6f884c60.entry.js +1 -0
- package/dist/q2-tecton-elements/p-822d3d6c.entry.js +1 -0
- package/dist/q2-tecton-elements/p-8584c6bc.entry.js +1 -0
- package/dist/q2-tecton-elements/p-87766054.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-fd5130c4.entry.js → p-879aa7ac.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-92e9f290.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-627df469.entry.js → p-b6c45ef6.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-cf9e8120.entry.js → p-b7dc4e93.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-c59d601e.entry.js +1 -0
- package/dist/q2-tecton-elements/p-d040bf99.entry.js +1 -0
- package/dist/q2-tecton-elements/p-d79386c6.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-fbfb3615.entry.js → p-dd3f64a7.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-58e42fc5.entry.js → p-dd792081.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-ef2f68b2.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-882eaf0f.entry.js → p-f617c54a.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-f66adef0.entry.js +1 -0
- package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
- package/dist/types/components/q2-avatar/index.d.ts +2 -0
- package/dist/types/components/q2-badge/index.d.ts +0 -1
- package/dist/types/components/q2-card/index.d.ts +1 -0
- package/dist/types/components/q2-checkbox/index.d.ts +0 -1
- package/dist/types/components/q2-editable-field/index.d.ts +1 -0
- package/dist/types/components/q2-input/index.d.ts +6 -2
- package/dist/types/components/q2-option/index.d.ts +2 -0
- package/dist/types/components/q2-option-list/index.d.ts +4 -4
- package/dist/types/components/q2-pill/index.d.ts +2 -0
- package/dist/types/components/q2-select/index.d.ts +37 -24
- package/dist/types/components/q2-stepper/index.d.ts +1 -0
- package/dist/types/components/q2-tab-container/index.d.ts +4 -0
- package/dist/types/components/q2-tab-pane/index.d.ts +5 -1
- package/dist/types/components/q2-tooltip/index.d.ts +10 -0
- package/dist/types/components/tecton-tab-pane/index.d.ts +5 -1
- package/dist/types/components.d.ts +43 -0
- package/dist/types/utils/index.d.ts +3 -1
- package/dist/types/workspace/workspace/{tecton-production_release_1.14.x → Tecton_tecton-production_master}/packages/q2-tecton-elements/.stencil/test/elements/q2-tag-test.d.ts +0 -0
- package/dist/types/workspace/workspace/{tecton-production_release_1.14.x → Tecton_tecton-production_master}/packages/q2-tecton-elements/.stencil/test/helpers.d.ts +0 -0
- package/package.json +2 -2
- package/dist/cjs/q2-badge.cjs.entry.js +0 -43
- package/dist/esm/q2-badge.entry.js +0 -39
- package/dist/q2-tecton-elements/p-0675f9c8.entry.js +0 -1
- package/dist/q2-tecton-elements/p-09464226.entry.js +0 -1
- package/dist/q2-tecton-elements/p-0e13d5ba.entry.js +0 -1
- package/dist/q2-tecton-elements/p-1eed57aa.entry.js +0 -1
- package/dist/q2-tecton-elements/p-3796397e.entry.js +0 -1
- package/dist/q2-tecton-elements/p-37f1984c.entry.js +0 -1
- package/dist/q2-tecton-elements/p-3cfc0cb4.entry.js +0 -1
- package/dist/q2-tecton-elements/p-431bf43e.js +0 -1
- package/dist/q2-tecton-elements/p-65e2df25.entry.js +0 -1
- package/dist/q2-tecton-elements/p-663cb6e8.entry.js +0 -1
- package/dist/q2-tecton-elements/p-6727f6d0.entry.js +0 -1
- package/dist/q2-tecton-elements/p-6ced7858.entry.js +0 -1
- package/dist/q2-tecton-elements/p-706249e1.entry.js +0 -1
- package/dist/q2-tecton-elements/p-7249de38.entry.js +0 -1
- package/dist/q2-tecton-elements/p-7ddb159c.entry.js +0 -1
- package/dist/q2-tecton-elements/p-87f448ab.entry.js +0 -1
- package/dist/q2-tecton-elements/p-8f815678.entry.js +0 -1
- package/dist/q2-tecton-elements/p-92886dbe.entry.js +0 -1
- package/dist/q2-tecton-elements/p-94303312.entry.js +0 -1
- package/dist/q2-tecton-elements/p-9af46ffc.entry.js +0 -1
- package/dist/q2-tecton-elements/p-9d8a963b.entry.js +0 -1
- package/dist/q2-tecton-elements/p-b066cdd1.entry.js +0 -1
- package/dist/q2-tecton-elements/p-bd6c6239.entry.js +0 -1
- package/dist/q2-tecton-elements/p-c4eff511.entry.js +0 -1
- package/dist/q2-tecton-elements/p-e435159b.entry.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, Prop, h, Element
|
|
1
|
+
import { Component, Prop, h, Element } from '@stencil/core';
|
|
2
2
|
export class Q2Badge {
|
|
3
3
|
constructor() {
|
|
4
4
|
this.value = 0;
|
|
@@ -17,19 +17,14 @@ export class Q2Badge {
|
|
|
17
17
|
}
|
|
18
18
|
return value;
|
|
19
19
|
}
|
|
20
|
-
|
|
20
|
+
render() {
|
|
21
21
|
const badgeClass = ['badge'];
|
|
22
|
-
if (this.badgeText)
|
|
23
|
-
badgeClass.push(`digit-${this.badgeText.length}`);
|
|
24
22
|
if (this.size === 'large')
|
|
25
23
|
badgeClass.push('size-large');
|
|
26
24
|
return (h("div", { class: "badge-wrapper" },
|
|
27
|
-
h("slot", null),
|
|
28
25
|
h("div", { class: badgeClass.join(' ') },
|
|
29
|
-
h("span", { class: "badge-text" },
|
|
30
|
-
|
|
31
|
-
render() {
|
|
32
|
-
return h(Fragment, null, this.badgeText ? this.generateMarkup() : h("slot", null));
|
|
26
|
+
h("span", { class: "badge-text" },
|
|
27
|
+
h("slot", null, this.badgeText)))));
|
|
33
28
|
}
|
|
34
29
|
static get is() { return "q2-badge"; }
|
|
35
30
|
static get encapsulation() { return "shadow"; }
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
*:focus {
|
|
10
10
|
outline: none;
|
|
11
|
-
box-shadow: var(--const-global-focus);
|
|
11
|
+
box-shadow: var(--const-global-focus, 0 0 0 2px #33b4ff);
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
:host {
|
|
@@ -69,39 +69,44 @@ button {
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
.badge-wrapper {
|
|
72
|
-
--comp-badge-background: var(--t-
|
|
73
|
-
--comp-badge-color: var(--t-
|
|
72
|
+
--comp-badge-background: var(--t-gray8, #61c4ff);
|
|
73
|
+
--comp-badge-color: var(--t-base, #ffffff);
|
|
74
|
+
--comp-badge-border-color: var(--t-secondary-l1, #9a9898);
|
|
74
75
|
}
|
|
75
76
|
:host([status=info]) .badge-wrapper {
|
|
76
77
|
--comp-badge-background: var(--const-stoplight-info, #0079C1);
|
|
77
78
|
--comp-badge-color: var(--const-stoplight-info-text, #ffffff);
|
|
79
|
+
--comp-badge-border-color: var(--const-stoplight-info-l1, #3a9bd6);
|
|
78
80
|
}
|
|
79
81
|
:host([status=alert]) .badge-wrapper {
|
|
80
82
|
--comp-badge-background: var(--const-stoplight-alert, #C30000);
|
|
81
83
|
--comp-badge-color: var(--const-stoplight-alert-text, #ffffff);
|
|
84
|
+
--comp-badge-border-color: var(--const-stoplight-alert-l1, #e42929);
|
|
82
85
|
}
|
|
83
86
|
:host([status=warning]) .badge-wrapper {
|
|
84
87
|
--comp-badge-background: var(--const-stoplight-warning, #F0B400);
|
|
85
88
|
--comp-badge-color: var(--const-stoplight-warning-text, #423535);
|
|
89
|
+
--comp-badge-border-color: var(--const-stoplight-warning-l1, #f9ce4c);
|
|
86
90
|
}
|
|
87
91
|
:host([status=success]) .badge-wrapper {
|
|
88
|
-
--comp-badge-background: var(--const-stoplight-success, #
|
|
92
|
+
--comp-badge-background: var(--const-stoplight-success, #57fc45);
|
|
89
93
|
--comp-badge-color: var(--const-stoplight-success-text, #ffffff);
|
|
94
|
+
--comp-badge-border-color: var(--const-stoplight-success-l1, #2eaa21);
|
|
90
95
|
}
|
|
91
96
|
:host([theme=primary]) .badge-wrapper {
|
|
92
|
-
--comp-badge-background: var(--t-primary, #
|
|
97
|
+
--comp-badge-background: var(--t-primary, #0079c2);
|
|
93
98
|
--comp-badge-color: var(--t-primary-text, #ffffff);
|
|
94
|
-
--comp-badge-border-color: var(--t-primary-l1, #
|
|
99
|
+
--comp-badge-border-color: var(--t-primary-l1, #3a9bd6);
|
|
95
100
|
}
|
|
96
101
|
:host([theme=secondary]) .badge-wrapper {
|
|
97
|
-
--comp-badge-background: var(--t-secondary, #
|
|
102
|
+
--comp-badge-background: var(--t-secondary, #b4c2cd);
|
|
98
103
|
--comp-badge-color: var(--t-secondary-text, #ffffff);
|
|
99
|
-
--comp-badge-border-color: var(--t-secondary-l1, #
|
|
104
|
+
--comp-badge-border-color: var(--t-secondary-l1, #c6d1db);
|
|
100
105
|
}
|
|
101
106
|
:host([theme=tertiary]) .badge-wrapper {
|
|
102
|
-
--comp-badge-background: var(--t-tertiary, #
|
|
107
|
+
--comp-badge-background: var(--t-tertiary, #e9f5fc);
|
|
103
108
|
--comp-badge-color: var(--t-tertiary-text, #000000);
|
|
104
|
-
--comp-badge-border-color: var(--t-tertiary-l1, #
|
|
109
|
+
--comp-badge-border-color: var(--t-tertiary-l1, #f3f4f5);
|
|
105
110
|
}
|
|
106
111
|
|
|
107
112
|
.badge {
|
|
@@ -109,22 +114,24 @@ button {
|
|
|
109
114
|
line-height: 16px;
|
|
110
115
|
height: 16px;
|
|
111
116
|
min-width: 16px;
|
|
112
|
-
background-color: var(--comp-badge-background);
|
|
113
117
|
text-align: center;
|
|
114
118
|
padding: 0 4px;
|
|
115
119
|
color: var(--comp-badge-color);
|
|
120
|
+
background-color: var(--comp-badge-background);
|
|
121
|
+
border-style: solid;
|
|
116
122
|
border-color: var(--comp-badge-border-color);
|
|
117
|
-
border-width:
|
|
118
|
-
border-radius: 8px;
|
|
123
|
+
border-width: var(--tct-badge-border-width, var(--t-badge-border-width, 1px));
|
|
124
|
+
border-radius: var(--tct-badge-border-radius, var(--t-badge-border-radius, 8px));
|
|
119
125
|
}
|
|
120
126
|
|
|
121
127
|
.badge.size-large {
|
|
122
128
|
font-size: 14px;
|
|
123
129
|
height: 22px;
|
|
124
130
|
min-width: 22px;
|
|
125
|
-
border-radius: 11px;
|
|
131
|
+
border-radius: var(--tct-badge-border-radius, var(--t-badge-border-radius, 11px));
|
|
126
132
|
line-height: 22px;
|
|
127
133
|
padding: 0 6px;
|
|
134
|
+
border-color: var(--comp-badge-border-color);
|
|
128
135
|
}
|
|
129
136
|
|
|
130
137
|
.badge-wrapper {
|
|
@@ -64,11 +64,12 @@ export class Q2Btn {
|
|
|
64
64
|
!hideLabel && label ? loc(label) : h("slot", { onSlotchange: this.handleSlotChange }))));
|
|
65
65
|
}
|
|
66
66
|
get buttonAttributes() {
|
|
67
|
+
var _a, _b, _c;
|
|
67
68
|
return {
|
|
68
|
-
ariaExpanded: this.ariaExpanded !== undefined ? `${this.ariaExpanded.toString() === 'true'}` : undefined,
|
|
69
|
-
ariaHasPopup: this.ariaHasPopup !== undefined ? `${this.ariaHasPopup.toString() === 'true'}` : undefined,
|
|
69
|
+
ariaExpanded: this.ariaExpanded !== undefined ? `${((_a = this.ariaExpanded) === null || _a === void 0 ? void 0 : _a.toString()) === 'true'}` : undefined,
|
|
70
|
+
ariaHasPopup: this.ariaHasPopup !== undefined ? `${((_b = this.ariaHasPopup) === null || _b === void 0 ? void 0 : _b.toString()) === 'true'}` : undefined,
|
|
70
71
|
ariaLabel: this.label && this.hideLabel ? loc(this.label) : undefined,
|
|
71
|
-
ariaSelected: this.ariaSelected !== undefined ? `${this.ariaSelected.toString() === 'true'}` : undefined,
|
|
72
|
+
ariaSelected: this.ariaSelected !== undefined ? `${((_c = this.ariaSelected) === null || _c === void 0 ? void 0 : _c.toString()) === 'true'}` : undefined,
|
|
72
73
|
disabled: this.disabled || false,
|
|
73
74
|
type: this.type || 'button',
|
|
74
75
|
tabindex: this.tabIndex || undefined,
|
|
@@ -153,7 +154,7 @@ export class Q2Btn {
|
|
|
153
154
|
},
|
|
154
155
|
"label": {
|
|
155
156
|
"type": "string",
|
|
156
|
-
"mutable":
|
|
157
|
+
"mutable": true,
|
|
157
158
|
"complexType": {
|
|
158
159
|
"original": "string",
|
|
159
160
|
"resolved": "string",
|
|
@@ -170,7 +171,7 @@ export class Q2Btn {
|
|
|
170
171
|
},
|
|
171
172
|
"hideLabel": {
|
|
172
173
|
"type": "boolean",
|
|
173
|
-
"mutable":
|
|
174
|
+
"mutable": true,
|
|
174
175
|
"complexType": {
|
|
175
176
|
"original": "boolean",
|
|
176
177
|
"resolved": "boolean",
|
|
@@ -187,7 +188,7 @@ export class Q2Btn {
|
|
|
187
188
|
},
|
|
188
189
|
"ariaLabel": {
|
|
189
190
|
"type": "string",
|
|
190
|
-
"mutable":
|
|
191
|
+
"mutable": true,
|
|
191
192
|
"complexType": {
|
|
192
193
|
"original": "string",
|
|
193
194
|
"resolved": "string",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
*:focus {
|
|
10
10
|
outline: none;
|
|
11
|
-
box-shadow: var(--const-global-focus);
|
|
11
|
+
box-shadow: var(--const-global-focus, 0 0 0 2px #33b4ff);
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
:host {
|
|
@@ -81,10 +81,8 @@ button {
|
|
|
81
81
|
--comp-btn-primary-bg: var(--tct-btn-primary-bg, var(--t-btn-primary-bg, #2e2e2e));
|
|
82
82
|
--comp-btn-primary-font-color: var(--tct-btn-primary-font-color, var(--t-btn-primary-font-color, var(--tct-white, var(--app-white, #ffffff))));
|
|
83
83
|
--comp-btn-fallback-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
|
|
84
|
-
--comp-btn-fallback-hover-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.19),
|
|
85
|
-
|
|
86
|
-
--comp-btn-neutral-fallback-hover-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.24),
|
|
87
|
-
0 3px 3px rgba(0, 0, 0, 0.36);
|
|
84
|
+
--comp-btn-fallback-hover-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.19), 0 3px 3px rgba(0, 0, 0, 0.23);
|
|
85
|
+
--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);
|
|
88
86
|
--comp-btn-primary-box-shadow: var(--tct-btn-primary-box-shadow, var(--t-btn-primary-box-shadow, var(--comp-btn-fallback-box-shadow)));
|
|
89
87
|
--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)));
|
|
90
88
|
--comp-btn-secondary-bg: var(--tct-btn-secondary-bg, var(--t-button-default-bg, #cccccc));
|
|
@@ -99,8 +97,8 @@ button {
|
|
|
99
97
|
}
|
|
100
98
|
|
|
101
99
|
button {
|
|
102
|
-
margin: var(--tct-scale-0, var(--app-scale-
|
|
103
|
-
padding: var(--tct-scale-0, var(--app-scale-
|
|
100
|
+
margin: var(--tct-scale-0, var(--app-scale-0x, 0));
|
|
101
|
+
padding: var(--tct-scale-0, var(--app-scale-0x, 0));
|
|
104
102
|
display: inline-block;
|
|
105
103
|
width: 100%;
|
|
106
104
|
border: 0;
|
|
@@ -119,16 +117,16 @@ button:disabled {
|
|
|
119
117
|
cursor: not-allowed;
|
|
120
118
|
}
|
|
121
119
|
:host([size="1"]) button {
|
|
122
|
-
padding: var(--tct-scale-1, var(--app-scale-
|
|
120
|
+
padding: var(--tct-scale-1, var(--app-scale-1x, 5px));
|
|
123
121
|
}
|
|
124
122
|
:host([color]:not([size])) button, :host([intent]:not([size])) button {
|
|
125
|
-
padding: var(--tct-btn-padding, var(--t-btn-padding, var(--tct-scale-2, var(--app-scale-
|
|
123
|
+
padding: var(--tct-btn-padding, var(--t-btn-padding, var(--tct-scale-2, var(--app-scale-2x, 10px))));
|
|
126
124
|
}
|
|
127
125
|
:host([size="2"]) button {
|
|
128
|
-
padding: var(--tct-scale-2, var(--app-scale-
|
|
126
|
+
padding: var(--tct-scale-2, var(--app-scale-2x, 10px));
|
|
129
127
|
}
|
|
130
128
|
:host([size="3"]) button {
|
|
131
|
-
padding: var(--tct-scale-3, var(--app-scale-
|
|
129
|
+
padding: var(--tct-scale-3, var(--app-scale-3x, 15px));
|
|
132
130
|
}
|
|
133
131
|
:host([size="4x"]) button {
|
|
134
132
|
padding: var(--tct-scale-4x, var(--app-scale-4x, 20px));
|
|
@@ -258,7 +256,7 @@ div {
|
|
|
258
256
|
display: flex;
|
|
259
257
|
align-items: center;
|
|
260
258
|
justify-content: center;
|
|
261
|
-
gap: var(--app-scale-
|
|
259
|
+
gap: var(--app-scale-1x, 5px);
|
|
262
260
|
}
|
|
263
261
|
:host([loading]) .icon-right div {
|
|
264
262
|
flex-direction: row-reverse;
|
|
@@ -15,7 +15,7 @@ export function formatDateShort(value) {
|
|
|
15
15
|
month: '2-digit',
|
|
16
16
|
day: '2-digit',
|
|
17
17
|
year: 'numeric',
|
|
18
|
-
timeZone:
|
|
18
|
+
timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone,
|
|
19
19
|
}).format(new Date(isoDate));
|
|
20
20
|
}
|
|
21
21
|
export function formatDateLong(value) {
|
|
@@ -181,8 +181,7 @@ export class Q2Calendar {
|
|
|
181
181
|
const dateCell = event.target.closest('td:not([aria-hidden])');
|
|
182
182
|
if (!dateCell)
|
|
183
183
|
return;
|
|
184
|
-
|
|
185
|
-
this.selectDate(this.generateDateFromDay(day));
|
|
184
|
+
this.selectDate(removeTimezoneOffset(new Date(dateCell.dataset.date)));
|
|
186
185
|
this.closeCalendar();
|
|
187
186
|
};
|
|
188
187
|
this.onDateKeydown = (event) => {
|
|
@@ -302,7 +301,7 @@ export class Q2Calendar {
|
|
|
302
301
|
year: 'numeric',
|
|
303
302
|
month: '2-digit',
|
|
304
303
|
day: '2-digit',
|
|
305
|
-
timeZone:
|
|
304
|
+
timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone,
|
|
306
305
|
}).format(dateValue);
|
|
307
306
|
}
|
|
308
307
|
get computedPlaceholder() {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
*:focus {
|
|
10
10
|
outline: none;
|
|
11
|
-
box-shadow: var(--const-global-focus);
|
|
11
|
+
box-shadow: var(--const-global-focus, 0 0 0 2px #33b4ff);
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
:host {
|
|
@@ -67,18 +67,18 @@ button {
|
|
|
67
67
|
.q2-element-dropdown {
|
|
68
68
|
display: none;
|
|
69
69
|
position: absolute;
|
|
70
|
-
background-color: var(--app-white);
|
|
71
|
-
color: var(--t-
|
|
70
|
+
background-color: var(--app-white, #ffffff);
|
|
71
|
+
color: var(--t-text, #4d4d4d);
|
|
72
72
|
left: 0;
|
|
73
73
|
width: 100%;
|
|
74
74
|
z-index: 100;
|
|
75
75
|
margin-top: 1px;
|
|
76
|
-
box-shadow: var(--app-shadow-1);
|
|
76
|
+
box-shadow: var(--app-shadow-1, 0 2px 4px rgba(0, 0, 0, 0.3));
|
|
77
77
|
height: 0;
|
|
78
78
|
overflow: hidden;
|
|
79
79
|
opacity: 0;
|
|
80
80
|
visibility: hidden;
|
|
81
|
-
transition: opacity var(--app-tween-1);
|
|
81
|
+
transition: opacity var(--app-tween-1, 0.2s ease);
|
|
82
82
|
border-radius: var(--tct-dropdown-border-radius, --t-dropdown-border-radius, 0);
|
|
83
83
|
--comp-scrollbar-size: var(--tct-scrollbar-size, var(--t-scrollbar-size, var(--app-scale-1x, 5px)));
|
|
84
84
|
--comp-scrollbar-border-radius: var(--tct-scrollbar-border-radius, var(--t-scrollbar-border-radius, var(--app-border-radius-1, 3px)));
|
|
@@ -156,7 +156,7 @@ q2-input {
|
|
|
156
156
|
flex: 1 1;
|
|
157
157
|
flex-basis: calc(100% - var(--tct-btn-icon-width, 44px));
|
|
158
158
|
margin: 0;
|
|
159
|
-
padding: var(--tct-calendar-label-vertical-padding, var(--t-calendar-label-vertical-padding, var(--tct-scale-2, var(--app-scale-
|
|
159
|
+
padding: var(--tct-calendar-label-vertical-padding, var(--t-calendar-label-vertical-padding, var(--tct-scale-2, var(--app-scale-2x, 10px)))) 0;
|
|
160
160
|
}
|
|
161
161
|
|
|
162
162
|
.calendar-hint {
|
|
@@ -228,6 +228,6 @@ td[aria-selected] {
|
|
|
228
228
|
.calendar-disclaimer {
|
|
229
229
|
font-size: var(--tct-calendar-disclaimer-font-size, var(--t-calendar-disclaimer-font-size, var(--tct-font-size-small, var(--app-font-size-small, 12px))));
|
|
230
230
|
border-top: 1px solid var(--tct-calendar-disclaimer-border-color, var(--t-calendar-disclaimer-border-color, var(--tct-gray-13, var(--t-gray-13, var(--tct-gray-l3, var(--app-gray-l3, #e6e6e6))))));
|
|
231
|
-
padding: var(--tct-calendar-disclaimer-padding, var(--tct-scale-2, var(--app-scale-
|
|
231
|
+
padding: var(--tct-calendar-disclaimer-padding, var(--tct-scale-2, var(--app-scale-2x, 10px)));
|
|
232
232
|
text-align: left;
|
|
233
233
|
}
|
|
@@ -70,6 +70,8 @@ export class Q2Card {
|
|
|
70
70
|
}
|
|
71
71
|
determineAutoSmall() {
|
|
72
72
|
var _a, _b;
|
|
73
|
+
if (this.isStatic)
|
|
74
|
+
return;
|
|
73
75
|
if (this.hostElement.hasAttribute('is-small'))
|
|
74
76
|
return;
|
|
75
77
|
const { containerElement, avatarElement } = this;
|
|
@@ -91,28 +93,34 @@ export class Q2Card {
|
|
|
91
93
|
return (h(Fragment, null,
|
|
92
94
|
this.bar && (h("div", { class: "bar", "test-id": "bar", style: { '--comp-bar-color': this.barColor } })),
|
|
93
95
|
this.generateAvatar(),
|
|
94
|
-
h("div", { class: "
|
|
96
|
+
h("div", { class: "content", "test-id": "contentContainer", ref: e => (this.containerElement = e) },
|
|
95
97
|
this.title && h("h3", { "test-id": "title" }, this.title),
|
|
96
|
-
this.description && h("p", { "test-id": "description" }, this.description)
|
|
97
|
-
|
|
98
|
+
this.description && h("p", { "test-id": "description" }, this.description),
|
|
99
|
+
h("slot", null)),
|
|
100
|
+
this.isTouch && !this.isStatic && (h("q2-icon", { "test-id": "touchIndicator", type: "chevron-right", class: "touch-indicator" }))));
|
|
98
101
|
}
|
|
99
102
|
generateContainerClasses() {
|
|
100
|
-
const { isSmall, isAutoSmall, avatarName, avatarInitials, avatarSrc, avatarIcon, isTouch, isAutoTouch } = this;
|
|
101
|
-
const result = [];
|
|
103
|
+
const { isSmall, isAutoSmall, avatarName, avatarInitials, avatarSrc, avatarIcon, isTouch, isAutoTouch, isStatic, } = this;
|
|
104
|
+
const result = ['container'];
|
|
102
105
|
const showSmall = isSmall || isAutoSmall;
|
|
103
106
|
const showTouch = isTouch || isAutoTouch;
|
|
104
107
|
const hasAvatar = avatarName || avatarInitials || avatarSrc || avatarIcon;
|
|
105
108
|
if (showSmall)
|
|
106
109
|
result.push('is-small');
|
|
107
|
-
if (showTouch)
|
|
110
|
+
if (showTouch && !isStatic)
|
|
108
111
|
result.push('is-touch');
|
|
109
112
|
if (hasAvatar)
|
|
110
113
|
result.push('has-avatar');
|
|
111
114
|
return result.join(' ');
|
|
112
115
|
}
|
|
113
116
|
render() {
|
|
114
|
-
const { url } = this;
|
|
115
|
-
|
|
117
|
+
const { url, isStatic } = this;
|
|
118
|
+
if (!!url)
|
|
119
|
+
return (h("a", { ref: e => (this.clickableElement = e), href: this.url, class: this.generateContainerClasses(), target: this.target, rel: "noopener noreferrer", "test-id": "clickableElement", onClick: this.handleClick }, this.generateContent()));
|
|
120
|
+
else if (isStatic)
|
|
121
|
+
return (h("div", { ref: e => (this.clickableElement = e), class: this.generateContainerClasses(), "test-id": "clickableElement" }, this.generateContent()));
|
|
122
|
+
else
|
|
123
|
+
return (h("button", { ref: e => (this.clickableElement = e), class: this.generateContainerClasses(), "test-id": "clickableElement", type: "button", onClick: this.handleClick }, this.generateContent()));
|
|
116
124
|
}
|
|
117
125
|
static get is() { return "q2-card"; }
|
|
118
126
|
static get encapsulation() { return "shadow"; }
|
|
@@ -259,6 +267,23 @@ export class Q2Card {
|
|
|
259
267
|
"attribute": "bar",
|
|
260
268
|
"reflect": true
|
|
261
269
|
},
|
|
270
|
+
"isStatic": {
|
|
271
|
+
"type": "boolean",
|
|
272
|
+
"mutable": false,
|
|
273
|
+
"complexType": {
|
|
274
|
+
"original": "boolean",
|
|
275
|
+
"resolved": "boolean",
|
|
276
|
+
"references": {}
|
|
277
|
+
},
|
|
278
|
+
"required": false,
|
|
279
|
+
"optional": false,
|
|
280
|
+
"docs": {
|
|
281
|
+
"tags": [],
|
|
282
|
+
"text": ""
|
|
283
|
+
},
|
|
284
|
+
"attribute": "is-static",
|
|
285
|
+
"reflect": true
|
|
286
|
+
},
|
|
262
287
|
"isTouch": {
|
|
263
288
|
"type": "boolean",
|
|
264
289
|
"mutable": false,
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
*:focus {
|
|
10
10
|
outline: none;
|
|
11
|
-
box-shadow: var(--const-global-focus);
|
|
11
|
+
box-shadow: var(--const-global-focus, 0 0 0 2px #33b4ff);
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
:host {
|
|
@@ -68,22 +68,39 @@ button {
|
|
|
68
68
|
display: block;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
|
|
72
|
-
a {
|
|
73
|
-
--comp-border-radius: var(--tct-card-border-radius, var(--t-card-border-radius, var(--app-border-radius-1, 3px)));
|
|
74
|
-
--comp-border-width: var(--tct-card-border-width, var(--t-card-border-width, 0px));
|
|
71
|
+
.container {
|
|
75
72
|
position: relative;
|
|
76
73
|
width: 100%;
|
|
77
74
|
text-align: start;
|
|
78
|
-
cursor: pointer;
|
|
79
75
|
height: 100%;
|
|
80
76
|
display: grid;
|
|
81
77
|
gap: var(--tct-card-gap, var(--t-card-gap, var(--app-scale-3x, 15px)));
|
|
82
78
|
margin: 0;
|
|
79
|
+
color: var(--tct-card-color, var(--t-card-color, var(--t-text, #4d4d4d)));
|
|
80
|
+
--comp-avatar-size: var(--tct-card-avatar-size, var(--t-card-avatar-size, 44px));
|
|
81
|
+
--comp-chevron-size: 0;
|
|
82
|
+
--comp-bar-width: var(--tct-card-bar-width, var(--t-card-bar-width, var(--app-scale-2x, 10px)));
|
|
83
|
+
--comp-card-padding: var(--tct-card-padding, var(--t-card-padding, var(--app-scale-4x, 20px)));
|
|
84
|
+
}
|
|
85
|
+
.container.is-small {
|
|
86
|
+
--comp-avatar-size: var(--tct-card-avatar-size, var(--t-card-avatar-size, 26px));
|
|
87
|
+
}
|
|
88
|
+
.container.has-avatar {
|
|
89
|
+
grid-template-columns: var(--comp-avatar-size) 1fr;
|
|
90
|
+
--tct-avatar-width: var(--comp-avatar-size);
|
|
91
|
+
--tct-avatar-height: var(--comp-avatar-size);
|
|
92
|
+
--tct-icon-size: var(--comp-avatar-size);
|
|
93
|
+
}
|
|
94
|
+
:host([bar][is-static]) .container {
|
|
95
|
+
padding-left: var(--comp-card-padding);
|
|
96
|
+
}
|
|
97
|
+
.container:is(button), .container:is(a) {
|
|
98
|
+
--comp-border-radius: var(--tct-card-border-radius, var(--t-card-border-radius, var(--app-border-radius-1, 3px)));
|
|
99
|
+
--comp-border-width: var(--tct-card-border-width, var(--t-card-border-width, 0px));
|
|
100
|
+
cursor: pointer;
|
|
83
101
|
border: none;
|
|
84
102
|
background: var(--tct-card-background, var(--t-card-background, var(--t-base, #ffffff)));
|
|
85
|
-
padding: var(--
|
|
86
|
-
color: var(--tct-card-color, var(--t-card-color, var(--t-text, #4d4d4d)));
|
|
103
|
+
padding: var(--comp-card-padding);
|
|
87
104
|
text-decoration: none;
|
|
88
105
|
border-width: var(--comp-border-width);
|
|
89
106
|
border-color: var(--tct-card-border-color, var(--t-card-border-color, transparent));
|
|
@@ -91,50 +108,30 @@ a {
|
|
|
91
108
|
border-radius: var(--comp-border-radius);
|
|
92
109
|
transition: box-shadow var(--tct-tween-1, var(--app-tween-1, 0.2s ease));
|
|
93
110
|
box-shadow: var(--tct-card-box-shadow, var(--t-card-box-shadow, var(--app-shadow-2, 0 3px 6px rgba(0, 0, 0, 0.3))));
|
|
94
|
-
--comp-avatar-size: var(--tct-card-avatar-size, var(--t-card-avatar-size, 44px));
|
|
95
|
-
--comp-chevron-size: 0;
|
|
96
111
|
}
|
|
97
112
|
@media (hover: hover) {
|
|
98
|
-
button:hover, button:active, button:focus,
|
|
99
|
-
a:hover,
|
|
100
|
-
a:active,
|
|
101
|
-
a:focus {
|
|
113
|
+
.container:is(button):hover, .container:is(button):active, .container:is(button):focus, .container:is(a):hover, .container:is(a):active, .container:is(a):focus {
|
|
102
114
|
color: var(--tct-card-color, var(--t-card-color, var(--t-text, #4d4d4d)));
|
|
103
115
|
}
|
|
104
|
-
button:hover,
|
|
105
|
-
a:hover {
|
|
116
|
+
.container:is(button):hover, .container:is(a):hover {
|
|
106
117
|
box-shadow: var(--tct-card-hover-box-shadow, var(--t-card-hover-box-shadow, var(--app-shadow-3, 0 4px 12px rgba(0, 0, 0, 0.3))));
|
|
107
118
|
}
|
|
108
|
-
button:active,
|
|
109
|
-
a:active {
|
|
119
|
+
.container:is(button):active, .container:is(a):active {
|
|
110
120
|
box-shadow: var(--tct-card-active-box-shadow, var(--t-card-active-box-shadow, var(--app-shadow-1, 0 2px 4px rgba(0, 0, 0, 0.3))));
|
|
111
121
|
}
|
|
112
122
|
}
|
|
113
|
-
button.is-
|
|
114
|
-
a.is-small {
|
|
115
|
-
--comp-avatar-size: var(--tct-card-avatar-size, var(--t-card-avatar-size, 26px));
|
|
116
|
-
}
|
|
117
|
-
button.is-touch,
|
|
118
|
-
a.is-touch {
|
|
123
|
+
.container:is(button).is-touch, .container:is(a).is-touch {
|
|
119
124
|
--comp-chevron-size: var(--tct-card-chevron-size, var(--t-card-chevron-size, 26px));
|
|
120
125
|
grid-template-columns: 1fr var(--comp-chevron-size);
|
|
121
126
|
}
|
|
122
|
-
button.has-avatar,
|
|
123
|
-
a.has-avatar {
|
|
124
|
-
grid-template-columns: var(--comp-avatar-size) 1fr;
|
|
125
|
-
--tct-avatar-width: var(--comp-avatar-size);
|
|
126
|
-
--tct-avatar-height: var(--comp-avatar-size);
|
|
127
|
-
--tct-icon-size: var(--comp-avatar-size);
|
|
128
|
-
}
|
|
129
|
-
button.has-avatar.is-touch,
|
|
130
|
-
a.has-avatar.is-touch {
|
|
127
|
+
.container:is(button).has-avatar.is-touch, .container:is(a).has-avatar.is-touch {
|
|
131
128
|
grid-template-columns: var(--comp-avatar-size) 1fr var(--comp-chevron-size);
|
|
132
129
|
}
|
|
133
130
|
|
|
134
|
-
.
|
|
131
|
+
.content {
|
|
135
132
|
overflow: hidden;
|
|
136
133
|
display: grid;
|
|
137
|
-
gap: var(--tct-card-
|
|
134
|
+
gap: var(--tct-card-content-gap, var(--t-card-content-gap, var(--app-scale-1x, 5px)));
|
|
138
135
|
align-content: start;
|
|
139
136
|
}
|
|
140
137
|
|
|
@@ -166,7 +163,7 @@ p {
|
|
|
166
163
|
border-radius: var(--comp-bar-border-radius) 0 0 var(--comp-bar-border-radius);
|
|
167
164
|
position: absolute;
|
|
168
165
|
inset: 0 auto auto 0;
|
|
169
|
-
width: var(--
|
|
166
|
+
width: var(--comp-bar-width);
|
|
170
167
|
background: var(--comp-bar-color);
|
|
171
168
|
height: 100%;
|
|
172
169
|
}
|
|
@@ -64,6 +64,7 @@ export class Q2ChartDonut {
|
|
|
64
64
|
if (!(event.target instanceof HTMLElement))
|
|
65
65
|
return;
|
|
66
66
|
this.clearSelection();
|
|
67
|
+
event.stopPropagation();
|
|
67
68
|
};
|
|
68
69
|
}
|
|
69
70
|
/// LifeCycle Hooks ///
|
|
@@ -167,6 +168,10 @@ export class Q2ChartDonut {
|
|
|
167
168
|
chart.on('mouseover', (params) => {
|
|
168
169
|
this.hoveredId = params.data.id;
|
|
169
170
|
});
|
|
171
|
+
chart.on('click', params => {
|
|
172
|
+
// Don't emit click event when clicking a chart slice
|
|
173
|
+
params.event.event.stopPropagation();
|
|
174
|
+
});
|
|
170
175
|
chart.on('mouseout', () => {
|
|
171
176
|
this.hoveredId = null;
|
|
172
177
|
});
|
|
@@ -305,7 +310,7 @@ export class Q2ChartDonut {
|
|
|
305
310
|
'aria-roledescription': loc('tecton.element.chartDonut.button.roleDescription'),
|
|
306
311
|
}
|
|
307
312
|
: null;
|
|
308
|
-
return (h("div", { class: "center-card-container" },
|
|
313
|
+
return (h("div", { class: "center-card-container", style: { width: `calc(${this.innerRadius} - 10%)` } },
|
|
309
314
|
h(TagName, Object.assign({ class: "center-card", "test-id": "centerCard" }, props),
|
|
310
315
|
icon && (h("q2-icon", { type: icon, style: color && { color } })),
|
|
311
316
|
name && h("div", { class: "name" }, name),
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
*:focus {
|
|
10
10
|
outline: none;
|
|
11
|
-
box-shadow: var(--const-global-focus);
|
|
11
|
+
box-shadow: var(--const-global-focus, 0 0 0 2px #33b4ff);
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
:host {
|
|
@@ -73,6 +73,9 @@ button {
|
|
|
73
73
|
.container {
|
|
74
74
|
aspect-ratio: 1/1;
|
|
75
75
|
width: 100%;
|
|
76
|
+
display: flex;
|
|
77
|
+
justify-content: center;
|
|
78
|
+
align-items: center;
|
|
76
79
|
}
|
|
77
80
|
|
|
78
81
|
.chart-container {
|
|
@@ -98,7 +101,7 @@ button {
|
|
|
98
101
|
}
|
|
99
102
|
|
|
100
103
|
button {
|
|
101
|
-
--comp-button-vertical-padding: var(--tct-chart-donut-button-vertical-padding, var(--t-chart-donut-button-vertical-padding, var(--app-scale-
|
|
104
|
+
--comp-button-vertical-padding: var(--tct-chart-donut-button-vertical-padding, var(--t-chart-donut-button-vertical-padding, var(--app-scale-1x, 5px)));
|
|
102
105
|
transition: box-shadow var(--tct-chart-donut-button-tween, var(--t-chart-donut-button-tween, var(--app-tween-1, 0.2s ease)));
|
|
103
106
|
padding: var(--comp-button-vertical-padding) 0;
|
|
104
107
|
}
|
|
@@ -113,14 +116,14 @@ button:focus {
|
|
|
113
116
|
}
|
|
114
117
|
|
|
115
118
|
.center-card-container {
|
|
116
|
-
width: 100%;
|
|
117
119
|
position: absolute;
|
|
118
120
|
top: 50%;
|
|
119
121
|
transform: translateY(-50%);
|
|
122
|
+
padding: var(--tct-chart-donut-button-container-padding, var(--t-chart-donut-button-container-padding, var(--app-scale-1x, 5px)));
|
|
120
123
|
}
|
|
121
124
|
|
|
122
125
|
.center-card {
|
|
123
|
-
width:
|
|
126
|
+
width: 100%;
|
|
124
127
|
text-align: center;
|
|
125
128
|
color: var(--tct-chart-donut-text-color, var(--t-chart-donut-text-color, var(--t-text, #4d4d4d)));
|
|
126
129
|
margin-inline: auto;
|
|
@@ -134,7 +137,7 @@ button:focus {
|
|
|
134
137
|
}
|
|
135
138
|
|
|
136
139
|
q2-icon {
|
|
137
|
-
--
|
|
140
|
+
--tct-icon-size: var(--tct-chart-donut-icon-size, var(--t-chart-donut-icon-size, 26px));
|
|
138
141
|
margin-bottom: var(--tct-chart-donut-icon-margin-bottom, var(--t-chart-donut-icon-margin-bottom, var(--app-scale-1x, 5px)));
|
|
139
142
|
}
|
|
140
143
|
|
|
@@ -6,23 +6,21 @@ export class Q2Checkbox {
|
|
|
6
6
|
this.id = `checkbox-${createGuid()}`;
|
|
7
7
|
///// Actions ////////
|
|
8
8
|
this.onInputClick = (event) => {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
if (
|
|
9
|
+
const hasCustomHandler = !!this.hostElement.onchange;
|
|
10
|
+
const isNotInteractive = this.disabled || this.readonly;
|
|
11
|
+
if (isNotInteractive || hasCustomHandler)
|
|
12
|
+
event.preventDefault();
|
|
13
|
+
if (isNotInteractive)
|
|
12
14
|
return;
|
|
13
15
|
if (!(event.target instanceof HTMLInputElement))
|
|
14
16
|
return;
|
|
17
|
+
const { value, checked } = event.target;
|
|
15
18
|
this.change.emit({
|
|
16
|
-
value
|
|
17
|
-
checked
|
|
19
|
+
value,
|
|
20
|
+
checked,
|
|
18
21
|
});
|
|
19
22
|
this.inputElement.focus();
|
|
20
23
|
};
|
|
21
|
-
this.onKeyDown = (event) => {
|
|
22
|
-
if (this.readonly && event.code === 'Space') {
|
|
23
|
-
event.preventDefault();
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
24
|
}
|
|
27
25
|
////////// LIFECYCLE HOOKS ////////
|
|
28
26
|
componentWillLoad() {
|
|
@@ -30,6 +28,7 @@ export class Q2Checkbox {
|
|
|
30
28
|
}
|
|
31
29
|
componentDidLoad() {
|
|
32
30
|
overrideFocus(this.hostElement);
|
|
31
|
+
this.hostElement.click = () => this.inputElement.click();
|
|
33
32
|
}
|
|
34
33
|
//////// Host Element Events ////////
|
|
35
34
|
defaultChangeHandler(event) {
|
|
@@ -52,7 +51,7 @@ export class Q2Checkbox {
|
|
|
52
51
|
if (this.hideLabel)
|
|
53
52
|
textLabelClasses.push('sr');
|
|
54
53
|
return (h("div", { class: "container" },
|
|
55
|
-
h("input", { ref: el => (this.inputElement = el), id: this.id, type: "checkbox", checked: this.indeterminate || this.checked || false, disabled: !!this.disabled || !!this.groupDisabled, class: "sr", value: this.value, name: this.name || this.id, "aria-
|
|
54
|
+
h("input", { ref: el => (this.inputElement = el), id: this.id, type: "checkbox", checked: this.indeterminate || this.checked || false, disabled: !!this.disabled || !!this.groupDisabled, class: "sr", value: this.value, name: this.name || this.id, "aria-describedby": this.description ? 'description' : undefined, "test-id": "q2CheckboxInnerCheckBox", onClick: this.onInputClick }),
|
|
56
55
|
h("label", { htmlFor: this.id, class: "label-control", "test-id": "checkboxButton" }, this.generateCheckboxSVG()),
|
|
57
56
|
h("div", { class: textLabelClasses.join(' ') },
|
|
58
57
|
h("label", { "test-id": "checkboxLabel", htmlFor: this.id },
|