@quartzds/core 1.0.0-beta.122 → 1.0.0-beta.124
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/CHANGELOG.md +50 -0
- package/components/index.js +1 -1
- package/components/{p-CVuTVnQo.js → p-B6ToH-uM.js} +4 -4
- package/components/p-B6ToH-uM.js.map +1 -0
- package/components/{p-oqmnh-8P.js → p-BGAgQ6J5.js} +5 -5
- package/components/p-BGAgQ6J5.js.map +1 -0
- package/components/{p-DCAlWquR.js → p-BPNu4xuI.js} +8 -8
- package/components/{p-DCAlWquR.js.map → p-BPNu4xuI.js.map} +1 -1
- package/components/{p-io1iVgY1.js → p-BceRDckL.js} +5 -5
- package/components/p-BceRDckL.js.map +1 -0
- package/components/{p-BalM52S_.js → p-Bm_hrsjc.js} +6 -3
- package/components/p-Bm_hrsjc.js.map +1 -0
- package/components/{p-DgYrfIr_.js → p-BxrR19WD.js} +7 -9
- package/components/p-BxrR19WD.js.map +1 -0
- package/components/{p-DRcxeXWE.js → p-CsIsG3ra.js} +75 -39
- package/components/p-CsIsG3ra.js.map +1 -0
- package/components/p-D5u-bDNf.js +102 -0
- package/components/p-D5u-bDNf.js.map +1 -0
- package/components/{p-C0VgKX4J.js → p-DVXvtEPn.js} +5 -5
- package/components/{p-C0VgKX4J.js.map → p-DVXvtEPn.js.map} +1 -1
- package/components/{p-yb0Kv4Y6.js → p-De7cAKF1.js} +24 -9
- package/components/p-De7cAKF1.js.map +1 -0
- package/components/{p-C9R8N06B.js → p-EjoVBa5a.js} +3 -3
- package/components/{p-C9R8N06B.js.map → p-EjoVBa5a.js.map} +1 -1
- package/components/{p-CKp062X8.js → p-Vtb6GsBy.js} +6 -6
- package/components/{p-CKp062X8.js.map → p-Vtb6GsBy.js.map} +1 -1
- package/components/qds-action-item.js +3 -3
- package/components/qds-avatar-media.js +1 -1
- package/components/qds-breadcrumb-item.js +11 -6
- package/components/qds-breadcrumb-item.js.map +1 -1
- package/components/qds-button.js +8 -8
- package/components/qds-button.js.map +1 -1
- package/components/qds-checkbox.js +1 -1
- package/components/qds-chip.js +5 -5
- package/components/qds-chip.js.map +1 -1
- package/components/qds-dialog.js +5 -5
- package/components/qds-dialog.js.map +1 -1
- package/components/qds-divider.js +1 -1
- package/components/qds-dropdown.js +1 -1
- package/components/qds-form-message.js +23 -17
- package/components/qds-form-message.js.map +1 -1
- package/components/qds-icon-button.js +1 -1
- package/components/qds-icon-tab.js +4 -4
- package/components/qds-icon.js +1 -1
- package/components/qds-inline-link.js +5 -5
- package/components/qds-inline-link.js.map +1 -1
- package/components/qds-input.js +3 -3
- package/components/qds-label.js +2 -2
- package/components/qds-list-item.js +16 -13
- package/components/qds-list-item.js.map +1 -1
- package/components/qds-loader.js +2 -2
- package/components/qds-menu-item.js +38 -12
- package/components/qds-menu-item.js.map +1 -1
- package/components/qds-mini-button.js +1 -1
- package/components/qds-progress-bar.js +2 -2
- package/components/qds-radio.js +1 -1
- package/components/qds-select.js +3 -3
- package/components/qds-select.js.map +1 -1
- package/components/qds-standalone-link.js +4 -4
- package/components/qds-switch.js +6 -6
- package/components/qds-switch.js.map +1 -1
- package/components/qds-tab.js +7 -7
- package/components/qds-tab.js.map +1 -1
- package/components/qds-tabbar.js +59 -38
- package/components/qds-tabbar.js.map +1 -1
- package/components/qds-table-cell.js +2 -2
- package/components/qds-table-head-cell.js +2 -2
- package/components/qds-table-row.js +1 -1
- package/components/qds-table.js +1 -1
- package/components/qds-tag.js +1 -1
- package/components/qds-textarea.js +4 -4
- package/components/qds-textarea.js.map +1 -1
- package/components/qds-title.js +1 -1
- package/components/qds-tooltip.js +1 -1
- package/dist/cjs/{helpers-Qs3cpKiI.js → helpers-CPSgo4Ef.js} +8 -2
- package/dist/cjs/{helpers-Qs3cpKiI.js.map → helpers-CPSgo4Ef.js.map} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/qds-action-item.cjs.entry.js +1 -1
- package/dist/cjs/qds-avatar-media.qds-checkbox.qds-radio.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-avatar-media_3.cjs.entry.js +72 -36
- package/dist/cjs/qds-breadcrumb-item.cjs.entry.js +9 -4
- package/dist/cjs/qds-breadcrumb-item.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-button.cjs.entry.js +6 -6
- package/dist/cjs/qds-button.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-chip.cjs.entry.js +2 -2
- package/dist/cjs/qds-chip.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-dialog.cjs.entry.js +2 -2
- package/dist/cjs/qds-dialog.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-divider.qds-icon-button.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-divider_2.cjs.entry.js +3 -3
- package/dist/cjs/qds-dropdown.cjs.entry.js +20 -6
- package/dist/cjs/qds-dropdown.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-form-message.cjs.entry.js +26 -16
- package/dist/cjs/qds-form-message.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-icon-tab.cjs.entry.js +1 -1
- package/dist/cjs/qds-icon.cjs.entry.js +1 -1
- package/dist/cjs/qds-inline-link.cjs.entry.js +4 -4
- package/dist/cjs/qds-inline-link.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-input.cjs.entry.js +1 -1
- package/dist/cjs/qds-label.cjs.entry.js +1 -1
- package/dist/cjs/qds-list-item.cjs.entry.js +8 -5
- package/dist/cjs/qds-list-item.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-loader.cjs.entry.js +1 -1
- package/dist/cjs/qds-menu-item.cjs.entry.js +34 -8
- package/dist/cjs/qds-menu-item.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-mini-button.cjs.entry.js +4 -6
- package/dist/cjs/qds-mini-button.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-progress-bar.cjs.entry.js +2 -2
- package/dist/cjs/qds-select.cjs.entry.js +2 -2
- package/dist/cjs/qds-select.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-standalone-link.cjs.entry.js +3 -3
- package/dist/cjs/qds-switch.cjs.entry.js +5 -5
- package/dist/cjs/qds-switch.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-tab.cjs.entry.js +4 -4
- package/dist/cjs/qds-tab.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-tabbar.cjs.entry.js +57 -33
- package/dist/cjs/qds-tabbar.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-table-cell.cjs.entry.js +2 -2
- package/dist/cjs/qds-table-head-cell.cjs.entry.js +2 -2
- package/dist/cjs/qds-table-row.cjs.entry.js +1 -1
- package/dist/cjs/qds-table.cjs.entry.js +1 -1
- package/dist/cjs/qds-tag.cjs.entry.js +3 -3
- package/dist/cjs/qds-textarea.cjs.entry.js +4 -4
- package/dist/cjs/qds-textarea.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-title.cjs.entry.js +3 -3
- package/dist/cjs/qds-title.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-tooltip.cjs.entry.js +3 -3
- package/dist/cjs/qds-tooltip.entry.cjs.js.map +1 -1
- package/dist/cjs/qds.cjs.js +1 -1
- package/dist/custom-elements.json +224 -70
- package/dist/docs.json +49 -7
- package/dist/esm/{helpers-Fe2AA6uo.js → helpers-JWnSavo8.js} +6 -3
- package/dist/esm/{helpers-Fe2AA6uo.js.map → helpers-JWnSavo8.js.map} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/qds-action-item.entry.js +1 -1
- package/dist/esm/qds-avatar-media.qds-checkbox.qds-radio.entry.js.map +1 -1
- package/dist/esm/qds-avatar-media_3.entry.js +72 -36
- package/dist/esm/qds-breadcrumb-item.entry.js +9 -4
- package/dist/esm/qds-breadcrumb-item.entry.js.map +1 -1
- package/dist/esm/qds-button.entry.js +6 -6
- package/dist/esm/qds-button.entry.js.map +1 -1
- package/dist/esm/qds-chip.entry.js +2 -2
- package/dist/esm/qds-chip.entry.js.map +1 -1
- package/dist/esm/qds-dialog.entry.js +2 -2
- package/dist/esm/qds-dialog.entry.js.map +1 -1
- package/dist/esm/qds-divider.qds-icon-button.entry.js.map +1 -1
- package/dist/esm/qds-divider_2.entry.js +3 -3
- package/dist/esm/qds-dropdown.entry.js +20 -6
- package/dist/esm/qds-dropdown.entry.js.map +1 -1
- package/dist/esm/qds-form-message.entry.js +26 -16
- package/dist/esm/qds-form-message.entry.js.map +1 -1
- package/dist/esm/qds-icon-tab.entry.js +1 -1
- package/dist/esm/qds-icon.entry.js +1 -1
- package/dist/esm/qds-inline-link.entry.js +4 -4
- package/dist/esm/qds-inline-link.entry.js.map +1 -1
- package/dist/esm/qds-input.entry.js +1 -1
- package/dist/esm/qds-label.entry.js +1 -1
- package/dist/esm/qds-list-item.entry.js +8 -5
- package/dist/esm/qds-list-item.entry.js.map +1 -1
- package/dist/esm/qds-loader.entry.js +1 -1
- package/dist/esm/qds-menu-item.entry.js +34 -8
- package/dist/esm/qds-menu-item.entry.js.map +1 -1
- package/dist/esm/qds-mini-button.entry.js +4 -6
- package/dist/esm/qds-mini-button.entry.js.map +1 -1
- package/dist/esm/qds-progress-bar.entry.js +2 -2
- package/dist/esm/qds-select.entry.js +2 -2
- package/dist/esm/qds-select.entry.js.map +1 -1
- package/dist/esm/qds-standalone-link.entry.js +3 -3
- package/dist/esm/qds-switch.entry.js +5 -5
- package/dist/esm/qds-switch.entry.js.map +1 -1
- package/dist/esm/qds-tab.entry.js +4 -4
- package/dist/esm/qds-tab.entry.js.map +1 -1
- package/dist/esm/qds-tabbar.entry.js +57 -33
- package/dist/esm/qds-tabbar.entry.js.map +1 -1
- package/dist/esm/qds-table-cell.entry.js +2 -2
- package/dist/esm/qds-table-head-cell.entry.js +2 -2
- package/dist/esm/qds-table-row.entry.js +1 -1
- package/dist/esm/qds-table.entry.js +1 -1
- package/dist/esm/qds-tag.entry.js +3 -3
- package/dist/esm/qds-textarea.entry.js +4 -4
- package/dist/esm/qds-textarea.entry.js.map +1 -1
- package/dist/esm/qds-title.entry.js +3 -3
- package/dist/esm/qds-title.entry.js.map +1 -1
- package/dist/esm/qds-tooltip.entry.js +3 -3
- package/dist/esm/qds-tooltip.entry.js.map +1 -1
- package/dist/esm/qds.js +1 -1
- package/dist/types/components/checkbox/checkbox.d.ts +9 -9
- package/dist/types/components/dropdown/dropdown.d.ts +1 -0
- package/dist/types/components/form-message/form-message.d.ts +2 -0
- package/dist/types/components/menu-item/menu-item.d.ts +1 -0
- package/dist/types/components/tabbar/tabbar.d.ts +2 -0
- package/dist/types/components.d.ts +3 -2
- package/dist/types/helpers.d.ts +6 -1
- package/dist/vscode.html-custom-data.json +1 -1
- package/hydrate/index.js +311 -191
- package/hydrate/index.mjs +311 -191
- package/package.json +1 -2
- package/components/p-BalM52S_.js.map +0 -1
- package/components/p-CVuTVnQo.js.map +0 -1
- package/components/p-Ck9w5WIb.js +0 -102
- package/components/p-Ck9w5WIb.js.map +0 -1
- package/components/p-DRcxeXWE.js.map +0 -1
- package/components/p-DgYrfIr_.js.map +0 -1
- package/components/p-io1iVgY1.js.map +0 -1
- package/components/p-oqmnh-8P.js.map +0 -1
- package/components/p-yb0Kv4Y6.js.map +0 -1
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { p as proxyCustomElement, H, c as createEvent, d as readTask, h } from './p-D2489VzR.js';
|
|
7
|
-
import { p as pickFocusEventAttributes, f as ignorePromise, a as isEllipsisActive
|
|
7
|
+
import { p as pickFocusEventAttributes, f as ignorePromise, a as isEllipsisActive } from './p-Bm_hrsjc.js';
|
|
8
8
|
import { V as VALID_STATE, C as CUSTOM_ERROR_FLAGS, N as NO_ERROR_FLAGS } from './p-CZRW1LV_.js';
|
|
9
|
-
import { d as defineCustomElement$2 } from './p-
|
|
10
|
-
import { d as defineCustomElement$1 } from './p-
|
|
9
|
+
import { d as defineCustomElement$2 } from './p-EjoVBa5a.js';
|
|
10
|
+
import { d as defineCustomElement$1 } from './p-BGAgQ6J5.js';
|
|
11
11
|
|
|
12
|
-
const checkboxCss = ":host([hidden]){display:none!important}:host{display:inline-block;line-height:0}.qds-checkbox,.qds-icon{grid-area:b;place-self:center}.qds-icon{color:var(--qds-theme-signature-color-contrast);display:none;pointer-events:none}.qds-container{display:grid;grid-template-areas:\"b\"}.qds-label{align-items:flex-start;background-color:var(--qds-theme-interactive-background-default);border-radius:var(--qds-control-border-radius);box-sizing:border-box;cursor:pointer;display:inline-flex;justify-content:center;width:inherit}.qds-label:hover{background-color:var(--qds-theme-interactive-background-hover)}.qds-label:active{background-color:var(--qds-theme-interactive-background-pressed)}
|
|
12
|
+
const checkboxCss = ":host([hidden]){display:none!important}:host{display:inline-block;line-height:0;outline:none}.qds-checkbox,.qds-icon{grid-area:b;place-self:center}.qds-icon{color:var(--qds-theme-signature-color-contrast);display:none;pointer-events:none}.qds-container{display:grid;grid-template-areas:\"b\"}.qds-label{align-items:flex-start;background-color:var(--qds-theme-interactive-background-default);border-radius:var(--qds-control-border-radius);box-sizing:border-box;cursor:pointer;display:inline-flex;justify-content:center;width:inherit}.qds-label:hover{background-color:var(--qds-theme-interactive-background-hover)}.qds-label:active{background-color:var(--qds-theme-interactive-background-pressed)}:host(:focus-visible) .qds-label{box-shadow:0 0 0 var(--qds-focus-heavy-border-width) var(--qds-theme-focus-border);outline:var(--qds-theme-focus-border-contrast) solid var(--qds-focus-light-border-width);outline-offset:0}.qds-label-inner{color:var(--qds-theme-control-text-standard);display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;width:100%}.qds-required{color:var(--qds-theme-feedback-field-required);-webkit-user-select:none;user-select:none}.qds-tooltip{line-height:normal}.qds-checkbox{-webkit-appearance:none;appearance:none;background-color:var(--qds-theme-interactive-background-default);border:var(--qds-control-border-width) solid var(--qds-theme-control-border);cursor:pointer;margin:0;-webkit-print-color-adjust:exact;print-color-adjust:exact}.qds-checkbox:focus-visible{outline:none}.qds-checkbox:checked~.qds-checked,.qds-checkbox:indeterminate~.qds-indeterminate{display:block}.qds-checkbox:checked,.qds-checkbox:indeterminate{background-color:var(--qds-theme-control-background-contrast);border-color:#0000}.qds-disabled{opacity:var(--qds-theme-disabled);pointer-events:none}.qds-checkbox[data-size=small]{border-radius:var(--qds-control-toggle-small-knob-border-radius);height:var(--qds-control-toggle-small-box-size);width:var(--qds-control-toggle-small-box-size)}.qds-icon[data-size=small]{font-size:var(--qds-control-toggle-small-box-size)}.qds-label[data-size=small]{gap:var(--qds-control-small-gap-siblings-related);min-height:var(--qds-control-toggle-small-height);min-width:var(--qds-control-toggle-small-width);padding-block:var(--qds-control-no-inline-small-padding-vertical)}.qds-label-inner[data-size=small]{font:var(--qds-control-small-text)}.qds-inline[data-size=small]{min-height:var(--qds-control-small-height);padding:var(--qds-control-small-padding-auto-height) var(--qds-control-toggle-small-padding-horizontal)}.qds-checkbox[data-size=standard]{border-radius:var(--qds-control-toggle-standard-knob-border-radius);height:var(--qds-control-toggle-standard-box-size);width:var(--qds-control-toggle-standard-box-size)}.qds-icon[data-size=standard]{font-size:var(--qds-control-toggle-standard-box-size)}.qds-label[data-size=standard]{gap:var(--qds-control-standard-gap-siblings-related);min-height:var(--qds-control-toggle-standard-height);min-width:var(--qds-control-toggle-standard-width);padding-block:var(--qds-control-no-inline-standard-padding-vertical)}.qds-label-inner[data-size=standard]{font:var(--qds-control-standard-text)}.qds-inline[data-size=standard]{min-height:var(--qds-control-standard-height);padding:var(--qds-control-standard-padding-auto-height) var(--qds-control-toggle-standard-padding-horizontal)}.qds-checkbox[data-size=large]{border-radius:var(--qds-control-toggle-large-knob-border-radius);height:var(--qds-control-toggle-large-box-size);width:var(--qds-control-toggle-large-box-size)}.qds-icon[data-size=large]{font-size:var(--qds-control-toggle-large-box-size)}.qds-label[data-size=large]{gap:var(--qds-control-large-gap-siblings-related);min-height:var(--qds-control-toggle-large-height);min-width:var(--qds-control-toggle-large-width);padding-block:var(--qds-control-no-inline-large-padding-vertical)}.qds-label-inner[data-size=large]{font:var(--qds-control-large-text)}.qds-inline[data-size=large]{min-height:var(--qds-control-large-height);padding:var(--qds-control-large-padding-auto-height) var(--qds-control-toggle-large-padding-horizontal)}";
|
|
13
13
|
|
|
14
14
|
// SPDX-FileCopyrightText: © 2024 Schneider Electric
|
|
15
15
|
//
|
|
@@ -30,7 +30,7 @@ var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) ||
|
|
|
30
30
|
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
31
31
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
32
32
|
};
|
|
33
|
-
var _Checkbox_instances,
|
|
33
|
+
var _Checkbox_instances, _Checkbox_ro, _Checkbox_savedTabIndex, _Checkbox_span, _Checkbox_tooltip, _Checkbox_computedChecked_get, _Checkbox_computedDisabled_get, _Checkbox_computedIndeterminate_get, _Checkbox_computedSize_get, _Checkbox_computedValue_get, _Checkbox_hasText_get, _Checkbox_spanRef, _Checkbox_tooltipRef, _Checkbox_defineGetter;
|
|
34
34
|
const Checkbox = /*@__PURE__*/ proxyCustomElement(class Checkbox extends H {
|
|
35
35
|
constructor(registerHost) {
|
|
36
36
|
super();
|
|
@@ -43,6 +43,10 @@ const Checkbox = /*@__PURE__*/ proxyCustomElement(class Checkbox extends H {
|
|
|
43
43
|
this.focusEmitter = createEvent(this, "qdsFocus", 2);
|
|
44
44
|
this.internals = this.attachInternals();
|
|
45
45
|
_Checkbox_instances.add(this);
|
|
46
|
+
/**
|
|
47
|
+
* Whether or not the text is displayed.
|
|
48
|
+
*/
|
|
49
|
+
this.checkboxOnly = false;
|
|
46
50
|
/**
|
|
47
51
|
* Adds vertical margin to the checkbox for alignment.
|
|
48
52
|
*
|
|
@@ -103,13 +107,9 @@ const Checkbox = /*@__PURE__*/ proxyCustomElement(class Checkbox extends H {
|
|
|
103
107
|
* @webnative
|
|
104
108
|
*/
|
|
105
109
|
this.willValidate = false;
|
|
106
|
-
/**
|
|
107
|
-
* Whether or not the text is displayed.
|
|
108
|
-
*/
|
|
109
|
-
this.checkboxOnly = false;
|
|
110
110
|
this.tooltip = false;
|
|
111
|
-
_Checkbox_inheritedAttributes.set(this, {});
|
|
112
111
|
_Checkbox_ro.set(this, void 0);
|
|
112
|
+
_Checkbox_savedTabIndex.set(this, 0);
|
|
113
113
|
_Checkbox_span.set(this, void 0);
|
|
114
114
|
_Checkbox_tooltip.set(this, void 0);
|
|
115
115
|
this.checkValidity = () => this.internals.checkValidity();
|
|
@@ -120,16 +120,6 @@ const Checkbox = /*@__PURE__*/ proxyCustomElement(class Checkbox extends H {
|
|
|
120
120
|
else
|
|
121
121
|
this.internals.setValidity(NO_ERROR_FLAGS);
|
|
122
122
|
};
|
|
123
|
-
_Checkbox_onBlur.set(this, (event) => {
|
|
124
|
-
this.blurEmitter.emit(pickFocusEventAttributes(event));
|
|
125
|
-
if (__classPrivateFieldGet(this, _Checkbox_tooltip, "f"))
|
|
126
|
-
ignorePromise(__classPrivateFieldGet(this, _Checkbox_tooltip, "f").close());
|
|
127
|
-
});
|
|
128
|
-
_Checkbox_onFocus.set(this, (event) => {
|
|
129
|
-
this.focusEmitter.emit(pickFocusEventAttributes(event));
|
|
130
|
-
if (__classPrivateFieldGet(this, _Checkbox_tooltip, "f"))
|
|
131
|
-
ignorePromise(__classPrivateFieldGet(this, _Checkbox_tooltip, "f").show());
|
|
132
|
-
});
|
|
133
123
|
_Checkbox_spanRef.set(this, (span) => {
|
|
134
124
|
__classPrivateFieldSet(this, _Checkbox_span, span, "f");
|
|
135
125
|
});
|
|
@@ -141,6 +131,16 @@ const Checkbox = /*@__PURE__*/ proxyCustomElement(class Checkbox extends H {
|
|
|
141
131
|
}
|
|
142
132
|
});
|
|
143
133
|
}
|
|
134
|
+
onBlur(event) {
|
|
135
|
+
this.blurEmitter.emit(pickFocusEventAttributes(event));
|
|
136
|
+
if (__classPrivateFieldGet(this, _Checkbox_tooltip, "f"))
|
|
137
|
+
ignorePromise(__classPrivateFieldGet(this, _Checkbox_tooltip, "f").close());
|
|
138
|
+
}
|
|
139
|
+
onFocus(event) {
|
|
140
|
+
this.focusEmitter.emit(pickFocusEventAttributes(event));
|
|
141
|
+
if (__classPrivateFieldGet(this, _Checkbox_tooltip, "f"))
|
|
142
|
+
ignorePromise(__classPrivateFieldGet(this, _Checkbox_tooltip, "f").show());
|
|
143
|
+
}
|
|
144
144
|
onClick(event) {
|
|
145
145
|
if (__classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_computedDisabled_get)) {
|
|
146
146
|
event.stopImmediatePropagation();
|
|
@@ -148,28 +148,60 @@ const Checkbox = /*@__PURE__*/ proxyCustomElement(class Checkbox extends H {
|
|
|
148
148
|
}
|
|
149
149
|
event.preventDefault();
|
|
150
150
|
this.checked = __classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_computedIndeterminate_get) ? true : !__classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_computedChecked_get);
|
|
151
|
+
this.internals.ariaChecked = this.checked.toString();
|
|
151
152
|
this.changeEmitter.emit();
|
|
152
153
|
this.indeterminate = false;
|
|
153
154
|
}
|
|
155
|
+
onKeyup(event) {
|
|
156
|
+
if (event.key === ' ') {
|
|
157
|
+
this.host.click();
|
|
158
|
+
event.preventDefault();
|
|
159
|
+
}
|
|
160
|
+
}
|
|
154
161
|
checkedChanged() {
|
|
162
|
+
this.internals.ariaChecked = __classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_computedChecked_get).toString();
|
|
155
163
|
this.internals.setFormValue(__classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_computedChecked_get) && !__classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_computedDisabled_get)
|
|
156
164
|
? __classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_computedValue_get)
|
|
157
165
|
: // eslint-disable-next-line unicorn/no-null
|
|
158
166
|
null);
|
|
159
167
|
}
|
|
160
168
|
disabledChanged() {
|
|
169
|
+
if (__classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_computedDisabled_get)) {
|
|
170
|
+
this.internals.ariaDisabled = 'true';
|
|
171
|
+
this.host.removeAttribute('tabindex');
|
|
172
|
+
// eslint-disable-next-line unicorn/no-null
|
|
173
|
+
this.internals.setFormValue(null);
|
|
174
|
+
}
|
|
175
|
+
else {
|
|
176
|
+
this.internals.ariaDisabled = 'false';
|
|
177
|
+
this.host.tabIndex = __classPrivateFieldGet(this, _Checkbox_savedTabIndex, "f");
|
|
178
|
+
if (__classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_computedChecked_get))
|
|
179
|
+
this.internals.setFormValue(__classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_computedValue_get));
|
|
180
|
+
}
|
|
161
181
|
if (__classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_computedChecked_get) && !__classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_computedDisabled_get))
|
|
162
182
|
this.internals.setFormValue(__classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_computedValue_get));
|
|
163
183
|
// eslint-disable-next-line unicorn/no-null
|
|
164
184
|
else
|
|
165
185
|
this.internals.setFormValue(null);
|
|
166
186
|
}
|
|
187
|
+
indeterminateChanged() {
|
|
188
|
+
if (__classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_computedIndeterminate_get))
|
|
189
|
+
this.internals.ariaChecked = 'mixed';
|
|
190
|
+
}
|
|
167
191
|
tabindexChanged(newValue) {
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
192
|
+
if (newValue !== null) {
|
|
193
|
+
const parsedValue = Number.parseInt(newValue, 10);
|
|
194
|
+
__classPrivateFieldSet(this, _Checkbox_savedTabIndex, Number.isNaN(parsedValue) || !Number.isFinite(parsedValue)
|
|
195
|
+
? 0
|
|
196
|
+
: parsedValue, "f");
|
|
197
|
+
}
|
|
198
|
+
if (__classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_computedDisabled_get))
|
|
199
|
+
this.host.removeAttribute('tabindex');
|
|
200
|
+
else
|
|
201
|
+
this.host.tabIndex = __classPrivateFieldGet(this, _Checkbox_savedTabIndex, "f");
|
|
171
202
|
}
|
|
172
203
|
textChanged() {
|
|
204
|
+
this.internals.ariaLabel = this.text;
|
|
173
205
|
if (__classPrivateFieldGet(this, _Checkbox_ro, "f"))
|
|
174
206
|
__classPrivateFieldGet(this, _Checkbox_ro, "f").disconnect();
|
|
175
207
|
if (!__classPrivateFieldGet(this, _Checkbox_span, "f"))
|
|
@@ -188,12 +220,17 @@ const Checkbox = /*@__PURE__*/ proxyCustomElement(class Checkbox extends H {
|
|
|
188
220
|
this.internals.setFormValue(__classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_computedValue_get));
|
|
189
221
|
}
|
|
190
222
|
componentWillLoad() {
|
|
223
|
+
this.internals.role = 'checkbox';
|
|
224
|
+
this.internals.ariaChecked = __classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_computedIndeterminate_get)
|
|
225
|
+
? 'mixed'
|
|
226
|
+
: __classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_computedChecked_get).toString();
|
|
227
|
+
this.internals.ariaDisabled = __classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_computedDisabled_get).toString();
|
|
228
|
+
this.internals.ariaLabel = this.text;
|
|
191
229
|
this.valueChanged();
|
|
192
230
|
__classPrivateFieldGet(this, _Checkbox_instances, "m", _Checkbox_defineGetter).call(this, 'form', () => this.internals.form);
|
|
193
231
|
__classPrivateFieldGet(this, _Checkbox_instances, "m", _Checkbox_defineGetter).call(this, 'willValidate', () => this.internals.willValidate);
|
|
194
232
|
__classPrivateFieldGet(this, _Checkbox_instances, "m", _Checkbox_defineGetter).call(this, 'validity', () => this.internals.validity);
|
|
195
233
|
__classPrivateFieldGet(this, _Checkbox_instances, "m", _Checkbox_defineGetter).call(this, 'validationMessage', () => this.internals.validationMessage);
|
|
196
|
-
__classPrivateFieldSet(this, _Checkbox_inheritedAttributes, inheritAriaAttributes(this.host), "f");
|
|
197
234
|
this.tabindexChanged(this.host.getAttribute('tabindex') ?? '0');
|
|
198
235
|
}
|
|
199
236
|
componentDidLoad() {
|
|
@@ -204,33 +241,33 @@ const Checkbox = /*@__PURE__*/ proxyCustomElement(class Checkbox extends H {
|
|
|
204
241
|
__classPrivateFieldGet(this, _Checkbox_ro, "f").disconnect();
|
|
205
242
|
}
|
|
206
243
|
render() {
|
|
207
|
-
return (
|
|
208
|
-
|
|
209
|
-
h("label", { key: 'ff46801768016168ffb89acd3148a796dd94765f', "aria-disabled": __classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_computedDisabled_get) ? 'true' : undefined, class: {
|
|
244
|
+
return (h("div", { key: '55579e21112535dbaee5c474c2eef661d208767c', "aria-hidden": "true", class: {
|
|
245
|
+
'qds-disabled': __classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_computedDisabled_get),
|
|
210
246
|
'qds-inline': this.inline,
|
|
211
247
|
'qds-label': true,
|
|
212
|
-
}, "data-size": __classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_computedSize_get) }, h("div", { key: '
|
|
248
|
+
}, "data-size": __classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_computedSize_get) }, h("div", { key: '6d857b1109e4111d32d2d2de316bc1a1377f5d23', class: "qds-container" }, h("input", { key: '8a9567b8b796112b7959cf29cd80aa51df051136',
|
|
213
249
|
// eslint-disable-next-line jsx-a11y/no-autofocus
|
|
214
|
-
autoFocus: this.host.autofocus, checked: __classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_computedIndeterminate_get) ? false : this.checked, class: "qds-checkbox", "data-size": __classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_computedSize_get), disabled: __classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_computedDisabled_get), indeterminate: this.indeterminate,
|
|
250
|
+
autoFocus: this.host.autofocus, checked: __classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_computedIndeterminate_get) ? false : this.checked, class: "qds-checkbox", "data-size": __classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_computedSize_get), disabled: __classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_computedDisabled_get), indeterminate: this.indeterminate, required: this.required, type: "checkbox", tabIndex: -1 }), h("qds-icon", { key: 'ade28f729ca2e02d9db5c6e6c5f99f49cc6d7d10', class: {
|
|
215
251
|
'qds-icon': true,
|
|
216
252
|
'qds-checked': true,
|
|
217
|
-
}, "data-size": __classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_computedSize_get), library: "core", name: "checked" }), h("qds-icon", { key: '
|
|
253
|
+
}, "data-size": __classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_computedSize_get), library: "core", name: "checked" }), h("qds-icon", { key: 'c0dfa142dd90dd7d3adf6e57c71becfe949f43e9', class: {
|
|
218
254
|
'qds-icon': true,
|
|
219
255
|
'qds-indeterminate': true,
|
|
220
|
-
}, "data-size": __classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_computedSize_get), library: "core", name: "indeterminate" })), __classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_hasText_get) && (h("span", { key: '
|
|
256
|
+
}, "data-size": __classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_computedSize_get), library: "core", name: "indeterminate" })), __classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_hasText_get) && (h("span", { key: '7918b3d9fe502c90ff7c8d10104952403078d3b9', class: "qds-label-inner", "data-size": __classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_computedSize_get), ref: __classPrivateFieldGet(this, _Checkbox_spanRef, "f") }, this.required === true && h("span", { key: '5f0969933396eb3f271040c6140d81c13df47210', class: "qds-required" }, "*"), this.text)), this.tooltip && (h("qds-tooltip", { key: '77d853746163e94cf682aed525d1b1819e4cd383', class: "qds-tooltip", ref: __classPrivateFieldGet(this, _Checkbox_tooltipRef, "f") }, this.text))));
|
|
221
257
|
}
|
|
222
|
-
static get delegatesFocus() { return true; }
|
|
223
258
|
static get formAssociated() { return true; }
|
|
224
259
|
get host() { return this; }
|
|
225
260
|
static get watchers() { return {
|
|
226
261
|
"checked": ["checkedChanged"],
|
|
227
262
|
"disabled": ["disabledChanged"],
|
|
263
|
+
"indeterminate": ["indeterminateChanged"],
|
|
228
264
|
"tabindex": ["tabindexChanged"],
|
|
229
265
|
"text": ["textChanged"],
|
|
230
266
|
"value": ["valueChanged"]
|
|
231
267
|
}; }
|
|
232
268
|
static get style() { return checkboxCss; }
|
|
233
|
-
}, [
|
|
269
|
+
}, [321, "qds-checkbox", {
|
|
270
|
+
"checkboxOnly": [4, "checkbox-only"],
|
|
234
271
|
"inline": [4],
|
|
235
272
|
"size": [1],
|
|
236
273
|
"text": [1],
|
|
@@ -244,17 +281,16 @@ const Checkbox = /*@__PURE__*/ proxyCustomElement(class Checkbox extends H {
|
|
|
244
281
|
"validity": [16],
|
|
245
282
|
"value": [8],
|
|
246
283
|
"willValidate": [4, "will-validate"],
|
|
247
|
-
"checkboxOnly": [4, "checkbox-only"],
|
|
248
|
-
"tabIndex": [32],
|
|
249
284
|
"tooltip": [32]
|
|
250
|
-
}, [[0, "click", "onClick"]], {
|
|
285
|
+
}, [[0, "blur", "onBlur"], [0, "focus", "onFocus"], [0, "click", "onClick"], [0, "keyup", "onKeyup"]], {
|
|
251
286
|
"checked": ["checkedChanged"],
|
|
252
287
|
"disabled": ["disabledChanged"],
|
|
288
|
+
"indeterminate": ["indeterminateChanged"],
|
|
253
289
|
"tabindex": ["tabindexChanged"],
|
|
254
290
|
"text": ["textChanged"],
|
|
255
291
|
"value": ["valueChanged"]
|
|
256
292
|
}]);
|
|
257
|
-
|
|
293
|
+
_Checkbox_ro = new WeakMap(), _Checkbox_savedTabIndex = new WeakMap(), _Checkbox_span = new WeakMap(), _Checkbox_tooltip = new WeakMap(), _Checkbox_spanRef = new WeakMap(), _Checkbox_tooltipRef = new WeakMap(), _Checkbox_instances = new WeakSet(), _Checkbox_computedChecked_get = function _Checkbox_computedChecked_get() {
|
|
258
294
|
return this.checked ?? false;
|
|
259
295
|
}, _Checkbox_computedDisabled_get = function _Checkbox_computedDisabled_get() {
|
|
260
296
|
return ((this.host.matches(':disabled') || (this.disabled ?? false)) &&
|
|
@@ -305,6 +341,6 @@ function defineCustomElement() {
|
|
|
305
341
|
}
|
|
306
342
|
|
|
307
343
|
export { Checkbox as C, defineCustomElement as d };
|
|
308
|
-
//# sourceMappingURL=p-
|
|
344
|
+
//# sourceMappingURL=p-CsIsG3ra.js.map
|
|
309
345
|
|
|
310
|
-
//# sourceMappingURL=p-
|
|
346
|
+
//# sourceMappingURL=p-CsIsG3ra.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"p-CsIsG3ra.js","mappings":";;;;;;;;;;;AAAA,MAAM,WAAW,GAAG,ijIAAijI;;ACArkI;AACA;AACA;;;;;;;;;;;;;;;;;;MAwCa,QAAQ,iBAAAA,kBAAA,CAAA,MAAA,QAAA,SAAAC,CAAA,CAAA;AANrB,IAAA,WAAA,CAAA,YAAA,EAAA;;;;;;;;;;;AAOE;;AAEG;AACqB,QAAA,IAAY,CAAA,YAAA,GAAY,KAAK;AAErD;;;;;AAKG;AACqB,QAAA,IAAM,CAAA,MAAA,GAAY,KAAK;AAE/C;;AAEG;AACqB,QAAA,IAAI,CAAA,IAAA,GAAU,UAAU;AAsBhD;;;;;;;;;;;;;;;AAeG;;AAEqB,QAAA,IAAI,CAAA,IAAA,GAAsC,IAAI;AAgCtE;;;;;;AAMG;AAEa,QAAA,IAAiB,CAAA,iBAAA,GAA0C,EAAE;AAE7E;;;;;;;AAOG;AACqB,QAAA,IAAQ,CAAA,QAAA,GAAiC,WAAW;AAE5E;;;;AAIG;AACqB,QAAA,IAAK,CAAA,KAAA,GAAmB,IAAI;AAEpD;;;;;;AAMG;AACqB,QAAA,IAAY,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IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;AAC1D,CAAC,EAAA,qBAAA,GAAA,SAAA,qBAAA,GAAA;AAGC,IAAA,OAAO,CAAC,IAAI,CAAC,IAAI,KAAK,EAAE,IAAI,IAAI,CAAC,QAAQ,KAAK,IAAI,KAAK,CAAC,IAAI,CAAC,YAAY;AAC3E,CAAC,EAAA,sBAAA,GAAA,SAAA,sBAAA,CA+Na,CAAc,EAAE,GAAkB,EAAA;AAC9C,IAAA,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC;AAChE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/checkbox/checkbox.css?tag=qds-checkbox&encapsulation=shadow","src/components/checkbox/checkbox.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: © 2024 Schneider Electric\n *\n * SPDX-License-Identifier: Apache-2.0\n */\n\n@import url('../shared.css');\n\n:host {\n display: inline-block;\n line-height: 0;\n outline: none;\n}\n\n.qds-checkbox,\n.qds-icon {\n grid-area: checkbox;\n place-self: center;\n}\n\n.qds-icon {\n display: none;\n pointer-events: none;\n color: var(--qds-theme-signature-color-contrast);\n}\n\n.qds-container {\n display: grid;\n grid-template-areas: 'checkbox';\n}\n\n.qds-label {\n cursor: pointer;\n display: inline-flex;\n width: inherit;\n border-radius: var(--qds-control-border-radius);\n align-items: flex-start;\n box-sizing: border-box;\n justify-content: center;\n background-color: var(--qds-theme-interactive-background-default);\n\n &:hover {\n background-color: var(--qds-theme-interactive-background-hover);\n }\n\n &:active {\n background-color: var(--qds-theme-interactive-background-pressed);\n }\n}\n\n:host(:focus-visible) .qds-label {\n /* inner ring */\n outline: var(--qds-theme-focus-border-contrast) solid\n var(--qds-focus-light-border-width);\n outline-offset: 0;\n\n /* outer ring */\n box-shadow: 0 0 0 var(--qds-focus-heavy-border-width)\n var(--qds-theme-focus-border);\n}\n\n.qds-label-inner {\n color: var(--qds-theme-control-text-standard);\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n overflow: hidden;\n width: 100%;\n}\n\n.qds-required {\n color: var(--qds-theme-feedback-field-required);\n user-select: none;\n}\n\n.qds-tooltip {\n line-height: initial;\n}\n\n.qds-checkbox {\n appearance: none;\n background-color: var(--qds-theme-interactive-background-default);\n border: var(--qds-control-border-width) solid var(--qds-theme-control-border);\n cursor: pointer;\n margin: 0;\n print-color-adjust: exact;\n\n &:focus-visible {\n outline: none;\n }\n\n &:checked ~ .qds-checked,\n &:indeterminate ~ .qds-indeterminate {\n display: block;\n }\n\n &:checked,\n &:indeterminate {\n background-color: var(--qds-theme-control-background-contrast);\n border-color: transparent;\n }\n}\n\n.qds-disabled {\n opacity: var(--qds-theme-disabled);\n pointer-events: none;\n}\n\n[data-size='small'] {\n &.qds-checkbox {\n width: var(--qds-control-toggle-small-box-size);\n height: var(--qds-control-toggle-small-box-size);\n border-radius: var(--qds-control-toggle-small-knob-border-radius);\n }\n\n &.qds-icon {\n font-size: var(--qds-control-toggle-small-box-size);\n }\n\n &.qds-label {\n gap: var(--qds-control-small-gap-siblings-related);\n min-height: var(--qds-control-toggle-small-height);\n padding-block: var(--qds-control-no-inline-small-padding-vertical);\n min-width: var(--qds-control-toggle-small-width);\n }\n\n &.qds-label-inner {\n font: var(--qds-control-small-text);\n }\n\n &.qds-inline {\n min-height: var(--qds-control-small-height);\n padding: var(--qds-control-small-padding-auto-height)\n var(--qds-control-toggle-small-padding-horizontal);\n }\n}\n\n[data-size='standard'] {\n &.qds-checkbox {\n width: var(--qds-control-toggle-standard-box-size);\n height: var(--qds-control-toggle-standard-box-size);\n border-radius: var(--qds-control-toggle-standard-knob-border-radius);\n }\n\n &.qds-icon {\n font-size: var(--qds-control-toggle-standard-box-size);\n }\n\n &.qds-label {\n gap: var(--qds-control-standard-gap-siblings-related);\n min-height: var(--qds-control-toggle-standard-height);\n padding-block: var(--qds-control-no-inline-standard-padding-vertical);\n min-width: var(--qds-control-toggle-standard-width);\n }\n\n &.qds-label-inner {\n font: var(--qds-control-standard-text);\n }\n\n &.qds-inline {\n min-height: var(--qds-control-standard-height);\n padding: var(--qds-control-standard-padding-auto-height)\n var(--qds-control-toggle-standard-padding-horizontal);\n }\n}\n\n[data-size='large'] {\n &.qds-checkbox {\n width: var(--qds-control-toggle-large-box-size);\n height: var(--qds-control-toggle-large-box-size);\n border-radius: var(--qds-control-toggle-large-knob-border-radius);\n }\n\n &.qds-icon {\n font-size: var(--qds-control-toggle-large-box-size);\n }\n\n &.qds-label {\n gap: var(--qds-control-large-gap-siblings-related);\n min-height: var(--qds-control-toggle-large-height);\n padding-block: var(--qds-control-no-inline-large-padding-vertical);\n min-width: var(--qds-control-toggle-large-width);\n }\n\n &.qds-label-inner {\n font: var(--qds-control-large-text);\n }\n\n &.qds-inline {\n min-height: var(--qds-control-large-height);\n padding: var(--qds-control-large-padding-auto-height)\n var(--qds-control-toggle-large-padding-horizontal);\n }\n}\n","// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { ComponentInterface, EventEmitter } from '@stencil/core'\nimport {\n AttachInternals,\n Component,\n Element,\n Event,\n h,\n Listen,\n Prop,\n readTask,\n State,\n Watch,\n} from '@stencil/core'\n\nimport type { QdsFocusEventDetail } from '../../helpers'\nimport {\n ignorePromise,\n isEllipsisActive,\n pickFocusEventAttributes,\n} from '../../helpers'\nimport { CUSTOM_ERROR_FLAGS, NO_ERROR_FLAGS, VALID_STATE } from '../controls'\nimport type { Size } from '../shared'\n\nexport type CheckboxValue = number | string | null\n\n/**\n * `<qds-checkbox>` elements are rendered as boxes that are checked (ticked)\n * when activated, like you might see in an official government paper form. A\n * checkbox allows you to select single values for submission in a form (or not).\n *\n * @see https://quartz.se.com/build/components/checkbox\n */\n@Component({\n tag: 'qds-checkbox',\n formAssociated: true,\n shadow: true,\n styleUrl: 'checkbox.css',\n})\nexport class Checkbox implements ComponentInterface {\n /**\n * Whether or not the text is displayed.\n */\n @Prop() public readonly checkboxOnly: boolean = false\n\n /**\n * Adds vertical margin to the checkbox for alignment.\n *\n * This is useful when creating inline layouts so that the first lines have\n * the correct vertical centering.\n */\n @Prop() public readonly inline: boolean = false\n\n /**\n * The checkbox's size.\n */\n @Prop() public readonly size?: Size = 'standard'\n\n /**\n * The checkbox's text.\n */\n @Prop() public readonly text!: string\n\n /**\n * Sets the checkbox's state.\n *\n * @webnative\n */\n @Prop({ mutable: true }) public checked?: boolean\n\n /**\n * Prevents the checkbox from being interacted with: it cannot be pressed or\n * focused.\n *\n * @webnative\n */\n @Prop() public readonly disabled?: boolean\n\n /**\n * The [`<form>`][] element to associate the checkbox with (its form owner).\n *\n * The value of this attribute must be the id of a `<form>` in the same\n * document. If this attribute is not set, the `<qds-checkbox>` is associated\n * with its ancestor `<form>` element, if any.\n *\n * This attribute lets you associate `<qds-checkbox>` elements to `<form>`s\n * anywhere in the document, not just inside a `<form>`. It can also override\n * an ancestor `<form>` element.\n *\n * [`<form>`]: https://developer.mozilla.org/docs/Web/HTML/Element/form\n *\n * @readonly\n * @webnative\n */\n // eslint-disable-next-line unicorn/no-null\n @Prop() public readonly form: ElementInternals['form'] | string = null\n\n /**\n * Sets the checkbox to an indeterminate state. This is usually applied to\n * checkboxes that represent a \"select all/none\" behavior when associated\n * checkboxes have a mix of checked and unchecked states.\n *\n * @webnative\n */\n @Prop({ mutable: true }) public indeterminate?: boolean\n\n /**\n * The name of the checkbox, which is submitted with the form data.\n *\n * @webnative\n */\n @Prop() public readonly name?: string\n\n /**\n * A value must be specified for the checkbox before the owning form can be\n * submitted.\n *\n * See\n * [Client-side validation](https://developer.mozilla.org/docs/Web/HTML/Element/input#client-side_validation)\n * and the\n * [HTML attribute: `required`](https://developer.mozilla.org/docs/Web/HTML/Attributes/required)\n * for more information.\n *\n * @webnative\n */\n @Prop() public readonly required?: boolean\n\n /**\n * The error message that would be shown to the user if the `<qds-checkbox>`\n * was to be checked for validity.\n *\n * @readonly\n * @webnative\n */\n @Prop()\n public readonly validationMessage: ElementInternals['validationMessage'] = ''\n\n /**\n * The [`ValidityState`][] object for this `<qds-checkbox>`.\n *\n * [`ValidityState`]: https://developer.mozilla.org/docs/Web/API/ValidityState\n *\n * @readonly\n * @webnative\n */\n @Prop() public readonly validity: ElementInternals['validity'] = VALID_STATE\n\n /**\n * The value of the checkbox, submitted as a name/value pair with form data.\n *\n * @webnative\n */\n @Prop() public readonly value?: CheckboxValue = 'on'\n\n /**\n * True if `<qds-checkbox>` will be validated when the form is submitted;\n * false otherwise.\n *\n * @readonly\n * @webnative\n */\n @Prop() public readonly willValidate: ElementInternals['willValidate'] = false\n\n @AttachInternals() private readonly internals!: ElementInternals\n\n /**\n * Emitted when the checkbox loses focus.\n */\n @Event({ eventName: 'qdsBlur', bubbles: false, cancelable: false })\n private readonly blurEmitter!: EventEmitter<QdsFocusEventDetail>\n\n /**\n * Emitted when a change to the checkbox's state is committed by the user.\n */\n @Event({ eventName: 'qdsChange', cancelable: false })\n private readonly changeEmitter!: EventEmitter<void>\n\n /**\n * Emitted when the checkbox gains focus.\n */\n @Event({ eventName: 'qdsFocus', bubbles: false, cancelable: false })\n private readonly focusEmitter!: EventEmitter<QdsFocusEventDetail>\n\n @Element() private readonly host!: HTMLElement\n\n @State() private tooltip = false\n\n #ro?: ResizeObserver\n\n #savedTabIndex = 0\n\n #span?: HTMLSpanElement\n\n #tooltip?: HTMLQdsTooltipElement\n\n get #computedChecked(): boolean {\n return this.checked ?? false\n }\n\n get #computedDisabled(): boolean {\n return (\n (this.host.matches(':disabled') || (this.disabled ?? false)) &&\n this.host.getAttribute('disabled') !== 'false'\n )\n }\n\n get #computedIndeterminate(): boolean {\n return this.indeterminate ?? false\n }\n\n get #computedSize(): Size {\n switch (this.size) {\n case 'standard':\n case 'small':\n case 'large': {\n return this.size\n }\n default: {\n return 'standard'\n }\n }\n }\n\n get #computedValue(): string | null {\n // eslint-disable-next-line unicorn/no-null\n return this.value == null ? null : this.value.toString()\n }\n\n get #hasText(): boolean {\n return (this.text !== '' || this.required === true) && !this.checkboxOnly\n }\n\n @Listen('blur')\n protected onBlur(event: FocusEvent): void {\n this.blurEmitter.emit(pickFocusEventAttributes(event))\n if (this.#tooltip) ignorePromise(this.#tooltip.close())\n }\n\n @Listen('focus')\n protected onFocus(event: FocusEvent): void {\n this.focusEmitter.emit(pickFocusEventAttributes(event))\n if (this.#tooltip) ignorePromise(this.#tooltip.show())\n }\n\n @Listen('click')\n protected onClick(event: MouseEvent): void {\n if (this.#computedDisabled) {\n event.stopImmediatePropagation()\n return\n }\n\n event.preventDefault()\n\n this.checked = this.#computedIndeterminate ? true : !this.#computedChecked\n this.internals.ariaChecked = this.checked.toString()\n this.changeEmitter.emit()\n this.indeterminate = false\n }\n\n @Listen('keyup')\n protected onKeyup(event: KeyboardEvent): void {\n if (event.key === ' ') {\n this.host.click()\n event.preventDefault()\n }\n }\n\n @Watch('checked')\n protected checkedChanged(): void {\n this.internals.ariaChecked = this.#computedChecked.toString()\n this.internals.setFormValue(\n this.#computedChecked && !this.#computedDisabled\n ? this.#computedValue\n : // eslint-disable-next-line unicorn/no-null\n null,\n )\n }\n\n @Watch('disabled')\n protected disabledChanged(): void {\n if (this.#computedDisabled) {\n this.internals.ariaDisabled = 'true'\n this.host.removeAttribute('tabindex')\n // eslint-disable-next-line unicorn/no-null\n this.internals.setFormValue(null)\n } else {\n this.internals.ariaDisabled = 'false'\n this.host.tabIndex = this.#savedTabIndex\n if (this.#computedChecked)\n this.internals.setFormValue(this.#computedValue)\n }\n\n if (this.#computedChecked && !this.#computedDisabled)\n this.internals.setFormValue(this.#computedValue)\n // eslint-disable-next-line unicorn/no-null\n else this.internals.setFormValue(null)\n }\n\n @Watch('indeterminate')\n protected indeterminateChanged(): void {\n if (this.#computedIndeterminate) this.internals.ariaChecked = 'mixed'\n }\n\n @Watch('tabindex')\n protected tabindexChanged(newValue: string | null): void {\n if (newValue !== null) {\n const parsedValue = Number.parseInt(newValue, 10)\n this.#savedTabIndex =\n Number.isNaN(parsedValue) || !Number.isFinite(parsedValue)\n ? 0\n : parsedValue\n }\n if (this.#computedDisabled) this.host.removeAttribute('tabindex')\n else this.host.tabIndex = this.#savedTabIndex\n }\n\n @Watch('text')\n protected textChanged(): void {\n this.internals.ariaLabel = this.text\n\n if (this.#ro) this.#ro.disconnect()\n\n if (!this.#span) return\n\n const span = this.#span\n readTask(() => {\n this.tooltip = isEllipsisActive(span)\n })\n this.#ro = new ResizeObserver(([spanEntry]) => {\n this.tooltip = isEllipsisActive(spanEntry.target as HTMLSpanElement)\n })\n this.#ro.observe(this.#span)\n }\n\n @Watch('value')\n protected valueChanged(): void {\n if (this.#computedChecked && !this.#computedDisabled)\n this.internals.setFormValue(this.#computedValue)\n }\n\n public componentWillLoad(): void {\n this.internals.role = 'checkbox'\n this.internals.ariaChecked = this.#computedIndeterminate\n ? 'mixed'\n : this.#computedChecked.toString()\n this.internals.ariaDisabled = this.#computedDisabled.toString()\n this.internals.ariaLabel = this.text\n this.valueChanged()\n\n this.#defineGetter('form', () => this.internals.form)\n this.#defineGetter('willValidate', () => this.internals.willValidate)\n this.#defineGetter('validity', () => this.internals.validity)\n this.#defineGetter(\n 'validationMessage',\n () => this.internals.validationMessage,\n )\n\n this.tabindexChanged(this.host.getAttribute('tabindex') ?? '0')\n }\n\n public componentDidLoad(): void {\n this.textChanged()\n }\n\n public disconnectedCallback(): void {\n if (this.#ro) this.#ro.disconnect()\n }\n\n public render() {\n return (\n <div\n aria-hidden=\"true\"\n class={{\n 'qds-disabled': this.#computedDisabled,\n 'qds-inline': this.inline,\n 'qds-label': true,\n }}\n data-size={this.#computedSize}\n >\n <div class=\"qds-container\">\n <input\n // eslint-disable-next-line jsx-a11y/no-autofocus\n autoFocus={this.host.autofocus}\n checked={this.#computedIndeterminate ? false : this.checked}\n class=\"qds-checkbox\"\n data-size={this.#computedSize}\n disabled={this.#computedDisabled}\n indeterminate={this.indeterminate}\n required={this.required}\n type=\"checkbox\"\n tabIndex={-1}\n />\n <qds-icon\n class={{\n 'qds-icon': true,\n 'qds-checked': true,\n }}\n data-size={this.#computedSize}\n library=\"core\"\n name=\"checked\"\n />\n <qds-icon\n class={{\n 'qds-icon': true,\n 'qds-indeterminate': true,\n }}\n data-size={this.#computedSize}\n library=\"core\"\n name=\"indeterminate\"\n />\n </div>\n {this.#hasText && (\n <span\n class=\"qds-label-inner\"\n data-size={this.#computedSize}\n ref={this.#spanRef}\n >\n {this.required === true && <span class=\"qds-required\">*</span>}\n {this.text}\n </span>\n )}\n {this.tooltip && (\n <qds-tooltip class=\"qds-tooltip\" ref={this.#tooltipRef}>\n {this.text}\n </qds-tooltip>\n )}\n </div>\n )\n }\n\n public checkValidity: ElementInternals['checkValidity'] = () =>\n this.internals.checkValidity()\n\n public reportValidity: ElementInternals['reportValidity'] = () =>\n this.internals.reportValidity()\n\n public setCustomValidity: HTMLInputElement['setCustomValidity'] = (error) => {\n if (error) this.internals.setValidity(CUSTOM_ERROR_FLAGS, error, this.host)\n else this.internals.setValidity(NO_ERROR_FLAGS)\n }\n\n readonly #spanRef = (span?: HTMLSpanElement): void => {\n this.#span = span\n }\n\n readonly #tooltipRef = (tooltip?: HTMLQdsTooltipElement): void => {\n if (tooltip) {\n // eslint-disable-next-line no-param-reassign\n tooltip.target = this.host\n this.#tooltip = tooltip\n }\n }\n\n #defineGetter(p: PropertyKey, get: () => unknown): void {\n Object.defineProperty(this.host, p, { enumerable: true, get })\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* SPDX-FileCopyrightText: © 2026 Schneider Electric
|
|
3
|
+
*
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { p as proxyCustomElement, H, h } from './p-D2489VzR.js';
|
|
7
|
+
import { d as defineCustomElement$1 } from './p-EjoVBa5a.js';
|
|
8
|
+
|
|
9
|
+
const titleCss = ":host([hidden]){display:none!important}:host{display:block}.qds-titles{display:grid;grid-template-areas:\"f\"}.qds-titles.qds-has-kicker{grid-template-areas:\"g\" \"f\"}.qds-titles.qds-has-subtitle{grid-template-areas:\"f\" \"h\"}.qds-titles.qds-has-kicker.qds-has-subtitle{grid-template-areas:\"g\" \"f\" \"h\"}.qds-has-icon{grid-template-areas:\"i f\";grid-template-columns:auto 1fr}.qds-has-icon.qds-has-kicker{grid-template-areas:\". g\" \"i f\"}.qds-has-icon.qds-has-subtitle{grid-template-areas:\"i f\" \". h\"}.qds-has-icon.qds-has-kicker.qds-has-subtitle{grid-template-areas:\". g\" \"i f\" \". h\"}.qds-title,.qds-titles{hyphens:inherit}.qds-kicker,.qds-subtitle{hyphens:manual}.qds-kicker,.qds-subtitle,.qds-title{margin-block:0}.qds-title{color:var(--qds-theme-title);grid-area:f}.qds-subtitle{color:var(--qds-theme-subtitle);grid-area:h}.qds-kicker{color:var(--qds-theme-kicker);grid-area:g}.qds-icon{align-content:center;color:var(--qds-theme-text-standard);grid-area:i}.qds-root.qds-main .qds-title{font:var(--qds-main-title)}.qds-root.qds-main .qds-subtitle{font:var(--qds-main-subtitle)}.qds-root.qds-main .qds-kicker{font:var(--qds-main-kicker)}.qds-root.qds-main .qds-icon{height:var(--qds-main-titles-icon-crop-height);width:var(--qds-main-titles-icon-size)}.qds-root.qds-main.qds-titles{gap:var(--qds-main-titles-gap)}.qds-root.qds-main.qds-has-icon{gap:var(--qds-main-titles-gap) var(--qds-main-titles-icon-gap)}.qds-root.qds-navigation .qds-title{font:var(--qds-navigation-title)}.qds-root.qds-navigation .qds-subtitle{font:var(--qds-navigation-subtitle)}.qds-root.qds-navigation .qds-kicker{font:var(--qds-navigation-kicker)}.qds-root.qds-navigation .qds-icon{height:var(--qds-navigation-titles-icon-crop-height);width:var(--qds-navigation-titles-icon-size)}.qds-root.qds-navigation.qds-titles{gap:var(--qds-navigation-titles-gap)}.qds-root.qds-navigation.qds-has-icon{gap:var(--qds-navigation-titles-gap) var(--qds-navigation-titles-icon-gap)}.qds-main.qds-section.qds-titles{gap:var(--qds-main-section-titles-gap)}.qds-main.qds-section.qds-has-icon{gap:var(--qds-main-section-titles-gap) var(--qds-main-section-titles-icon-gap)}.qds-main.qds-section .qds-title{font:var(--qds-main-section-title)}.qds-main.qds-section .qds-subtitle{font:var(--qds-main-section-subtitle)}.qds-main.qds-section .qds-kicker{font:var(--qds-main-section-kicker)}.qds-main.qds-section .qds-icon{height:var(--qds-main-section-titles-icon-crop-height);width:var(--qds-main-section-titles-icon-size)}.qds-main.qds-subsection.qds-titles{gap:var(--qds-main-subsection-titles-gap)}.qds-main.qds-subsection.qds-has-icon{gap:var(--qds-main-subsection-titles-gap) var(--qds-main-subsection-titles-icon-gap)}.qds-main.qds-subsection .qds-title{font:var(--qds-main-subsection-title)}.qds-main.qds-subsection .qds-subtitle{font:var(--qds-main-subsection-subtitle)}.qds-main.qds-subsection .qds-kicker{font:var(--qds-main-subsection-kicker)}.qds-main.qds-subsection .qds-icon{height:var(--qds-main-subsection-titles-icon-crop-height);width:var(--qds-main-subsection-titles-icon-size)}.qds-panel.qds-root.qds-titles{gap:var(--qds-panel-titles-gap)}.qds-panel.qds-root.qds-has-icon{gap:var(--qds-panel-titles-gap) var(--qds-panel-titles-icon-gap)}.qds-panel.qds-root .qds-title{font:var(--qds-panel-title)}.qds-panel.qds-root .qds-subtitle{font:var(--qds-panel-subtitle)}.qds-panel.qds-root .qds-kicker{font:var(--qds-panel-kicker)}.qds-panel.qds-root .qds-icon{height:var(--qds-panel-titles-icon-crop-height);width:var(--qds-panel-titles-icon-size)}.qds-panel.qds-section.qds-titles{gap:var(--qds-panel-section-titles-gap)}.qds-panel.qds-section.qds-has-icon{gap:var(--qds-panel-section-titles-gap) var(--qds-panel-section-titles-icon-gap)}.qds-panel.qds-section .qds-title{font:var(--qds-panel-section-title)}.qds-panel.qds-section .qds-subtitle{font:var(--qds-panel-section-subtitle)}.qds-panel.qds-section .qds-kicker{font:var(--qds-panel-section-kicker)}.qds-panel.qds-section .qds-icon{height:var(--qds-panel-section-titles-icon-crop-height);width:var(--qds-panel-section-titles-icon-size)}.qds-panel.qds-subsection.qds-titles{gap:var(--qds-panel-subsection-titles-gap)}.qds-panel.qds-subsection.qds-has-icon{gap:var(--qds-panel-subsection-titles-gap) var(--qds-panel-subsection-titles-icon-gap)}.qds-panel.qds-subsection .qds-title{font:var(--qds-panel-subsection-title)}.qds-panel.qds-subsection .qds-subtitle{font:var(--qds-panel-subsection-subtitle)}.qds-panel.qds-subsection .qds-kicker{font:var(--qds-panel-subsection-kicker)}.qds-panel.qds-subsection .qds-icon{height:var(--qds-panel-subsection-titles-icon-crop-height);width:var(--qds-panel-subsection-titles-icon-size)}.qds-navigation.qds-section.qds-titles{gap:var(--qds-navigation-section-titles-gap)}.qds-navigation.qds-section.qds-has-icon{gap:var(--qds-navigation-section-titles-gap) var(--qds-navigation-section-titles-icon-gap)}.qds-navigation.qds-section .qds-title{font:var(--qds-navigation-section-title)}.qds-navigation.qds-section .qds-subtitle{font:var(--qds-navigation-section-subtitle)}.qds-navigation.qds-section .qds-kicker{font:var(--qds-navigation-section-kicker)}.qds-navigation.qds-section .qds-icon{height:var(--qds-navigation-section-titles-icon-crop-height);width:var(--qds-navigation-section-titles-icon-size)}.qds-navigation.qds-subsection.qds-titles{gap:var(--qds-navigation-subsection-titles-gap)}.qds-navigation.qds-subsection.qds-has-icon{gap:var(--qds-navigation-subsection-titles-gap) var(--qds-navigation-subsection-titles-icon-gap)}.qds-navigation.qds-subsection .qds-title{font:var(--qds-navigation-subsection-title)}.qds-navigation.qds-subsection .qds-subtitle{font:var(--qds-navigation-subsection-subtitle)}.qds-navigation.qds-subsection .qds-kicker{font:var(--qds-navigation-subsection-kicker)}.qds-navigation.qds-subsection .qds-icon{height:var(--qds-navigation-subsection-titles-icon-crop-height);width:var(--qds-navigation-subsection-titles-icon-size)}.qds-popup.qds-root.qds-titles{gap:var(--qds-popup-titles-gap)}.qds-popup.qds-root.qds-has-icon{gap:var(--qds-popup-titles-gap) var(--qds-popup-titles-icon-gap)}.qds-popup.qds-root .qds-title{font:var(--qds-popup-title)}.qds-popup.qds-root .qds-subtitle{font:var(--qds-popup-subtitle)}.qds-popup.qds-root .qds-kicker{font:var(--qds-popup-kicker)}.qds-popup.qds-root .qds-icon{height:var(--qds-popup-titles-icon-crop-height);width:var(--qds-popup-titles-icon-size)}.qds-popup.qds-section.qds-titles{gap:var(--qds-popup-section-titles-gap)}.qds-popup.qds-section.qds-has-icon{gap:var(--qds-popup-section-titles-gap) var(--qds-popup-section-titles-icon-gap)}.qds-popup.qds-section .qds-title{font:var(--qds-popup-section-title)}.qds-popup.qds-section .qds-subtitle{font:var(--qds-popup-section-subtitle)}.qds-popup.qds-section .qds-kicker{font:var(--qds-popup-section-kicker)}.qds-popup.qds-section .qds-icon{height:var(--qds-popup-section-titles-icon-crop-height);width:var(--qds-popup-section-titles-icon-size)}.qds-popup.qds-subsection.qds-titles{gap:var(--qds-popup-subsection-titles-gap)}.qds-popup.qds-subsection.qds-has-icon{gap:var(--qds-popup-subsection-titles-gap) var(--qds-popup-subsection-titles-icon-gap)}.qds-popup.qds-subsection .qds-title{font:var(--qds-popup-subsection-title)}.qds-popup.qds-subsection .qds-subtitle{font:var(--qds-popup-subsection-subtitle)}.qds-popup.qds-subsection .qds-kicker{font:var(--qds-popup-subsection-kicker)}.qds-popup.qds-subsection .qds-icon{height:var(--qds-popup-subsection-titles-icon-crop-height);width:var(--qds-popup-subsection-titles-icon-size)}.qds-accessory.qds-root.qds-titles{gap:var(--qds-accessory-titles-gap)}.qds-accessory.qds-root.qds-has-icon{gap:var(--qds-accessory-titles-gap) var(--qds-accessory-titles-icon-gap)}.qds-accessory.qds-root .qds-title{font:var(--qds-accessory-title)}.qds-accessory.qds-root .qds-subtitle{font:var(--qds-accessory-subtitle)}.qds-accessory.qds-root .qds-kicker{font:var(--qds-accessory-kicker)}.qds-accessory.qds-root .qds-icon{height:var(--qds-accessory-titles-icon-crop-height);width:var(--qds-accessory-titles-icon-size)}.qds-accessory.qds-section.qds-titles{gap:var(--qds-accessory-section-titles-gap)}.qds-accessory.qds-section.qds-has-icon{gap:var(--qds-accessory-section-titles-gap) var(--qds-accessory-section-titles-icon-gap)}.qds-accessory.qds-section .qds-title{font:var(--qds-accessory-section-title)}.qds-accessory.qds-section .qds-subtitle{font:var(--qds-accessory-section-subtitle)}.qds-accessory.qds-section .qds-kicker{font:var(--qds-accessory-section-kicker)}.qds-accessory.qds-section .qds-icon{height:var(--qds-accessory-section-titles-icon-crop-height);width:var(--qds-accessory-section-titles-icon-size)}.qds-titles[data-variant=web-main-section-promo]:is(.qds-root,.qds-section,.qds-subsection){gap:var(--qds-main-section-promo-titles-gap);margin:auto}[data-variant=web-main-section-promo]:is(.qds-root,.qds-section,.qds-subsection) .qds-title{font:var(--qds-main-section-promo-title)}[data-variant=web-main-section-promo]:is(.qds-root,.qds-section,.qds-subsection) .qds-subtitle{font:var(--qds-main-section-promo-subtitle)}[data-variant=web-main-section-promo]:is(.qds-root,.qds-section,.qds-subsection) .qds-kicker{font:var(--qds-main-section-promo-kicker)}.qds-has-icon[data-variant=web-main-section-promo]:is(.qds-root,.qds-section,.qds-subsection){gap:var(--qds-main-section-promo-titles-gap) var(--qds-main-section-promo-titles-icon-gap)}[data-variant=web-main-section-promo]:is(.qds-root,.qds-section,.qds-subsection) .qds-icon{height:var(--qds-main-section-promo-titles-icon-crop-height);width:var(--qds-main-section-promo-titles-icon-size)}[data-alignment=start]{text-align:start}[data-alignment=center]{text-align:center}[data-alignment=end]{text-align:end}.qds-titles[data-variant=web-main-section-display]:is(.qds-root,.qds-section,.qds-subsection){gap:var(--qds-main-section-display-titles-gap)}[data-variant=web-main-section-display]:is(.qds-root,.qds-section,.qds-subsection) .qds-title{font:var(--qds-main-section-display-title)}.qds-titles[data-variant=web-main-subsection-card]:is(.qds-root,.qds-section,.qds-subsection){gap:var(--qds-main-subsection-card-titles-gap)}[data-variant=web-main-subsection-card]:is(.qds-root,.qds-section,.qds-subsection) .qds-title{font:var(--qds-main-subsection-card-standard-title)}.qds-titles[data-variant=web-main-section-hero]:is(.qds-root,.qds-section,.qds-subsection){gap:var(--qds-main-section-hero-titles-gap)}[data-variant=web-main-section-hero]:is(.qds-root,.qds-section,.qds-subsection) .qds-title{font:var(--qds-main-section-hero-title)}";
|
|
10
|
+
|
|
11
|
+
// SPDX-FileCopyrightText: © 2024 Schneider Electric
|
|
12
|
+
//
|
|
13
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
14
|
+
var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
15
|
+
if (kind === "a" && !f)
|
|
16
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
17
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
18
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
19
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
20
|
+
};
|
|
21
|
+
var _Title_instances, _Title_hasSubtitle_get, _Title_hasKicker_get;
|
|
22
|
+
const Title = /*@__PURE__*/ proxyCustomElement(class Title extends H {
|
|
23
|
+
constructor(registerHost) {
|
|
24
|
+
super();
|
|
25
|
+
if (registerHost !== false) {
|
|
26
|
+
this.__registerHost();
|
|
27
|
+
}
|
|
28
|
+
this.__attachShadow();
|
|
29
|
+
this.internals = this.attachInternals();
|
|
30
|
+
_Title_instances.add(this);
|
|
31
|
+
/**
|
|
32
|
+
* The alignment of the title.
|
|
33
|
+
*/
|
|
34
|
+
this.alignment = 'start';
|
|
35
|
+
/**
|
|
36
|
+
* The name of a registered icon library.
|
|
37
|
+
*/
|
|
38
|
+
this.iconLibrary = 'default';
|
|
39
|
+
this.layer = 'main';
|
|
40
|
+
this.level = 'section';
|
|
41
|
+
/**
|
|
42
|
+
* HTML tag to use to render the title.
|
|
43
|
+
*/
|
|
44
|
+
this.tag = 'h2';
|
|
45
|
+
}
|
|
46
|
+
componentWillLoad() {
|
|
47
|
+
this.internals.role = 'group';
|
|
48
|
+
}
|
|
49
|
+
render() {
|
|
50
|
+
const layer = `qds-${this.layer ?? 'main'}`;
|
|
51
|
+
const level = `qds-${this.level ?? 'section'}`;
|
|
52
|
+
const Tag = this.tag ?? 'h2';
|
|
53
|
+
const hasIcon = this.iconName !== undefined && this.iconName !== '';
|
|
54
|
+
return (h("hgroup", { key: '942eec84584a9f0ada443ce2d93e9bfd5553d2ef', "data-alignment": this.alignment ?? 'start', "data-variant": this.variant, class: {
|
|
55
|
+
[layer]: true,
|
|
56
|
+
[level]: true,
|
|
57
|
+
'qds-titles': true,
|
|
58
|
+
'qds-has-icon': hasIcon,
|
|
59
|
+
'qds-has-kicker': __classPrivateFieldGet(this, _Title_instances, "a", _Title_hasKicker_get),
|
|
60
|
+
'qds-has-subtitle': __classPrivateFieldGet(this, _Title_instances, "a", _Title_hasSubtitle_get),
|
|
61
|
+
}, role: "none" }, h(Tag, { key: '73d0c59e0808cfc8b81e67cc7fec19668430f8b9', class: "qds-title", "data-variant": this.variant }, h("slot", { key: '9ef1451c7e2116611cf4a9d7e10e9b0c61c63b31' })), __classPrivateFieldGet(this, _Title_instances, "a", _Title_hasKicker_get) && h("p", { key: '6fb83ecd2a9db814c0336d15e0b24174cdbba1e1', class: "qds-kicker" }, this.kicker), __classPrivateFieldGet(this, _Title_instances, "a", _Title_hasSubtitle_get) && h("p", { key: '62008e9c0934c1700e2d909c7d370265303ee938', class: "qds-subtitle" }, this.subtitle), hasIcon && (h("qds-icon", { key: 'ad0113ac12cc58d136689a70176e4e208b06b1c9', class: "qds-icon", name: this.iconName, library: this.iconLibrary }))));
|
|
62
|
+
}
|
|
63
|
+
static get style() { return titleCss; }
|
|
64
|
+
}, [257, "qds-title", {
|
|
65
|
+
"alignment": [1],
|
|
66
|
+
"iconName": [1, "icon-name"],
|
|
67
|
+
"iconLibrary": [1, "icon-library"],
|
|
68
|
+
"kicker": [1],
|
|
69
|
+
"layer": [1],
|
|
70
|
+
"level": [1],
|
|
71
|
+
"subtitle": [1],
|
|
72
|
+
"tag": [1],
|
|
73
|
+
"variant": [1]
|
|
74
|
+
}]);
|
|
75
|
+
_Title_instances = new WeakSet(), _Title_hasSubtitle_get = function _Title_hasSubtitle_get() {
|
|
76
|
+
return this.subtitle !== undefined && this.subtitle !== '';
|
|
77
|
+
}, _Title_hasKicker_get = function _Title_hasKicker_get() {
|
|
78
|
+
return this.kicker !== undefined && this.kicker !== '';
|
|
79
|
+
};
|
|
80
|
+
function defineCustomElement() {
|
|
81
|
+
if (typeof customElements === "undefined") {
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
const components = ["qds-title", "qds-icon"];
|
|
85
|
+
components.forEach(tagName => { switch (tagName) {
|
|
86
|
+
case "qds-title":
|
|
87
|
+
if (!customElements.get(tagName)) {
|
|
88
|
+
customElements.define(tagName, Title);
|
|
89
|
+
}
|
|
90
|
+
break;
|
|
91
|
+
case "qds-icon":
|
|
92
|
+
if (!customElements.get(tagName)) {
|
|
93
|
+
defineCustomElement$1();
|
|
94
|
+
}
|
|
95
|
+
break;
|
|
96
|
+
} });
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export { Title as T, defineCustomElement as d };
|
|
100
|
+
//# sourceMappingURL=p-D5u-bDNf.js.map
|
|
101
|
+
|
|
102
|
+
//# sourceMappingURL=p-D5u-bDNf.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"p-D5u-bDNf.js","mappings":";;;;;;;;AAAA,MAAM,QAAQ,GAAG,k0UAAk0U;;ACAn1U;AACA;AACA;;;;;;;;;MAyBa,KAAK,iBAAAA,kBAAA,CAAA,MAAA,KAAA,SAAAC,CAAA,CAAA;AALlB,IAAA,WAAA,CAAA,YAAA,EAAA;;;;;;;;AAME;;AAEG;AACq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A,EAAA,IAAI,CAAC,OAAO,EAAA,EAC/C,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAQ,CACJ,EACL,sBAAA,CAAA,IAAI,EAAW,gBAAA,EAAA,GAAA,EAAA,oBAAA,CAAA,IAAI,CAAG,CAAA,GAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,YAAY,EAAE,EAAA,IAAI,CAAC,MAAM,CAAK,EAC1D,sBAAA,CAAA,IAAI,EAAa,gBAAA,EAAA,GAAA,EAAA,sBAAA,CAAA,IAAI,CAAG,CAAA,GAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,cAAc,EAAE,EAAA,IAAI,CAAC,QAAQ,CAAK,EAChE,OAAO,KACN,CACE,CAAA,UAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,UAAU,EAChB,IAAI,EAAE,IAAI,CAAC,QAAQ,EACnB,OAAO,EAAE,IAAI,CAAC,WAAW,EACzB,CAAA,CACH,CACM;;;;;;;;;;;;;;;IA3CX,OAAO,IAAI,CAAC,QAAQ,KAAK,SAAS,IAAI,IAAI,CAAC,QAAQ,KAAK,EAAE;AAC5D,CAAC,EAAA,oBAAA,GAAA,SAAA,oBAAA,GAAA;IAGC,OAAO,IAAI,CAAC,MAAM,KAAK,SAAS,IAAI,IAAI,CAAC,MAAM,KAAK,EAAE;AACxD,CAAC;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/title/title.css?tag=qds-title&encapsulation=shadow","src/components/title/title.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: © 2024 Schneider Electric\n *\n * SPDX-License-Identifier: Apache-2.0\n */\n\n@import url('../shared.css');\n\n:host {\n display: block;\n}\n\n.qds-titles {\n display: grid;\n grid-template-areas: 'title';\n\n &.qds-has-kicker {\n grid-template-areas:\n 'kicker'\n 'title';\n }\n\n &.qds-has-subtitle {\n grid-template-areas:\n 'title'\n 'subtitle';\n }\n\n &.qds-has-kicker.qds-has-subtitle {\n grid-template-areas:\n 'kicker'\n 'title'\n 'subtitle';\n }\n}\n\n.qds-has-icon {\n grid-template-columns: auto 1fr;\n grid-template-areas: 'icon title';\n\n &.qds-has-kicker {\n grid-template-areas:\n '. kicker'\n 'icon title';\n }\n\n &.qds-has-subtitle {\n grid-template-areas:\n 'icon title'\n '. subtitle';\n }\n\n &.qds-has-kicker.qds-has-subtitle {\n grid-template-areas:\n '. kicker'\n 'icon title'\n '. subtitle';\n }\n}\n\n.qds-titles,\n.qds-title {\n hyphens: inherit;\n}\n\n.qds-subtitle,\n.qds-kicker {\n hyphens: initial;\n}\n\n.qds-title,\n.qds-subtitle,\n.qds-kicker {\n margin-block: 0;\n}\n\n.qds-title {\n grid-area: title;\n color: var(--qds-theme-title);\n}\n\n.qds-subtitle {\n grid-area: subtitle;\n color: var(--qds-theme-subtitle);\n}\n\n.qds-kicker {\n grid-area: kicker;\n color: var(--qds-theme-kicker);\n}\n\n.qds-icon {\n grid-area: icon;\n align-content: center;\n color: var(--qds-theme-text-standard);\n}\n\n.qds-root {\n &.qds-main {\n & .qds-title {\n font: var(--qds-main-title);\n }\n\n & .qds-subtitle {\n font: var(--qds-main-subtitle);\n }\n\n & .qds-kicker {\n font: var(--qds-main-kicker);\n }\n\n & .qds-icon {\n width: var(--qds-main-titles-icon-size);\n height: var(--qds-main-titles-icon-crop-height);\n }\n\n &.qds-titles {\n gap: var(--qds-main-titles-gap);\n }\n\n &.qds-has-icon {\n gap: var(--qds-main-titles-gap) var(--qds-main-titles-icon-gap);\n }\n }\n\n &.qds-navigation {\n & .qds-title {\n font: var(--qds-navigation-title);\n }\n\n & .qds-subtitle {\n font: var(--qds-navigation-subtitle);\n }\n\n & .qds-kicker {\n font: var(--qds-navigation-kicker);\n }\n\n & .qds-icon {\n width: var(--qds-navigation-titles-icon-size);\n height: var(--qds-navigation-titles-icon-crop-height);\n }\n\n &.qds-titles {\n gap: var(--qds-navigation-titles-gap);\n }\n\n &.qds-has-icon {\n gap: var(--qds-navigation-titles-gap)\n var(--qds-navigation-titles-icon-gap);\n }\n }\n}\n\n.qds-main {\n &.qds-section {\n &.qds-titles {\n gap: var(--qds-main-section-titles-gap);\n }\n\n &.qds-has-icon {\n gap: var(--qds-main-section-titles-gap)\n var(--qds-main-section-titles-icon-gap);\n }\n\n & .qds-title {\n font: var(--qds-main-section-title);\n }\n\n & .qds-subtitle {\n font: var(--qds-main-section-subtitle);\n }\n\n & .qds-kicker {\n font: var(--qds-main-section-kicker);\n }\n\n & .qds-icon {\n width: var(--qds-main-section-titles-icon-size);\n height: var(--qds-main-section-titles-icon-crop-height);\n }\n }\n\n &.qds-subsection {\n &.qds-titles {\n gap: var(--qds-main-subsection-titles-gap);\n }\n\n &.qds-has-icon {\n gap: var(--qds-main-subsection-titles-gap)\n var(--qds-main-subsection-titles-icon-gap);\n }\n\n & .qds-title {\n font: var(--qds-main-subsection-title);\n }\n\n & .qds-subtitle {\n font: var(--qds-main-subsection-subtitle);\n }\n\n & .qds-kicker {\n font: var(--qds-main-subsection-kicker);\n }\n\n & .qds-icon {\n width: var(--qds-main-subsection-titles-icon-size);\n height: var(--qds-main-subsection-titles-icon-crop-height);\n }\n }\n}\n\n.qds-panel {\n &.qds-root {\n &.qds-titles {\n gap: var(--qds-panel-titles-gap);\n }\n\n &.qds-has-icon {\n gap: var(--qds-panel-titles-gap) var(--qds-panel-titles-icon-gap);\n }\n\n & .qds-title {\n font: var(--qds-panel-title);\n }\n\n & .qds-subtitle {\n font: var(--qds-panel-subtitle);\n }\n\n & .qds-kicker {\n font: var(--qds-panel-kicker);\n }\n\n & .qds-icon {\n width: var(--qds-panel-titles-icon-size);\n height: var(--qds-panel-titles-icon-crop-height);\n }\n }\n\n &.qds-section {\n &.qds-titles {\n gap: var(--qds-panel-section-titles-gap);\n }\n\n &.qds-has-icon {\n gap: var(--qds-panel-section-titles-gap)\n var(--qds-panel-section-titles-icon-gap);\n }\n\n & .qds-title {\n font: var(--qds-panel-section-title);\n }\n\n & .qds-subtitle {\n font: var(--qds-panel-section-subtitle);\n }\n\n & .qds-kicker {\n font: var(--qds-panel-section-kicker);\n }\n\n & .qds-icon {\n width: var(--qds-panel-section-titles-icon-size);\n height: var(--qds-panel-section-titles-icon-crop-height);\n }\n }\n\n &.qds-subsection {\n &.qds-titles {\n gap: var(--qds-panel-subsection-titles-gap);\n }\n\n &.qds-has-icon {\n gap: var(--qds-panel-subsection-titles-gap)\n var(--qds-panel-subsection-titles-icon-gap);\n }\n\n & .qds-title {\n font: var(--qds-panel-subsection-title);\n }\n\n & .qds-subtitle {\n font: var(--qds-panel-subsection-subtitle);\n }\n\n & .qds-kicker {\n font: var(--qds-panel-subsection-kicker);\n }\n\n & .qds-icon {\n width: var(--qds-panel-subsection-titles-icon-size);\n height: var(--qds-panel-subsection-titles-icon-crop-height);\n }\n }\n}\n\n.qds-navigation {\n &.qds-section {\n &.qds-titles {\n gap: var(--qds-navigation-section-titles-gap);\n }\n\n &.qds-has-icon {\n gap: var(--qds-navigation-section-titles-gap)\n var(--qds-navigation-section-titles-icon-gap);\n }\n\n & .qds-title {\n font: var(--qds-navigation-section-title);\n }\n\n & .qds-subtitle {\n font: var(--qds-navigation-section-subtitle);\n }\n\n & .qds-kicker {\n font: var(--qds-navigation-section-kicker);\n }\n\n & .qds-icon {\n width: var(--qds-navigation-section-titles-icon-size);\n height: var(--qds-navigation-section-titles-icon-crop-height);\n }\n }\n\n &.qds-subsection {\n &.qds-titles {\n gap: var(--qds-navigation-subsection-titles-gap);\n }\n\n &.qds-has-icon {\n gap: var(--qds-navigation-subsection-titles-gap)\n var(--qds-navigation-subsection-titles-icon-gap);\n }\n\n & .qds-title {\n font: var(--qds-navigation-subsection-title);\n }\n\n & .qds-subtitle {\n font: var(--qds-navigation-subsection-subtitle);\n }\n\n & .qds-kicker {\n font: var(--qds-navigation-subsection-kicker);\n }\n\n & .qds-icon {\n width: var(--qds-navigation-subsection-titles-icon-size);\n height: var(--qds-navigation-subsection-titles-icon-crop-height);\n }\n }\n}\n\n.qds-popup {\n &.qds-root {\n &.qds-titles {\n gap: var(--qds-popup-titles-gap);\n }\n\n &.qds-has-icon {\n gap: var(--qds-popup-titles-gap) var(--qds-popup-titles-icon-gap);\n }\n\n & .qds-title {\n font: var(--qds-popup-title);\n }\n\n & .qds-subtitle {\n font: var(--qds-popup-subtitle);\n }\n\n & .qds-kicker {\n font: var(--qds-popup-kicker);\n }\n\n & .qds-icon {\n width: var(--qds-popup-titles-icon-size);\n height: var(--qds-popup-titles-icon-crop-height);\n }\n }\n\n &.qds-section {\n &.qds-titles {\n gap: var(--qds-popup-section-titles-gap);\n }\n\n &.qds-has-icon {\n gap: var(--qds-popup-section-titles-gap)\n var(--qds-popup-section-titles-icon-gap);\n }\n\n & .qds-title {\n font: var(--qds-popup-section-title);\n }\n\n & .qds-subtitle {\n font: var(--qds-popup-section-subtitle);\n }\n\n & .qds-kicker {\n font: var(--qds-popup-section-kicker);\n }\n\n & .qds-icon {\n width: var(--qds-popup-section-titles-icon-size);\n height: var(--qds-popup-section-titles-icon-crop-height);\n }\n }\n\n &.qds-subsection {\n &.qds-titles {\n gap: var(--qds-popup-subsection-titles-gap);\n }\n\n &.qds-has-icon {\n gap: var(--qds-popup-subsection-titles-gap)\n var(--qds-popup-subsection-titles-icon-gap);\n }\n\n & .qds-title {\n font: var(--qds-popup-subsection-title);\n }\n\n & .qds-subtitle {\n font: var(--qds-popup-subsection-subtitle);\n }\n\n & .qds-kicker {\n font: var(--qds-popup-subsection-kicker);\n }\n\n & .qds-icon {\n width: var(--qds-popup-subsection-titles-icon-size);\n height: var(--qds-popup-subsection-titles-icon-crop-height);\n }\n }\n}\n\n.qds-accessory {\n &.qds-root {\n &.qds-titles {\n gap: var(--qds-accessory-titles-gap);\n }\n\n &.qds-has-icon {\n gap: var(--qds-accessory-titles-gap) var(--qds-accessory-titles-icon-gap);\n }\n\n & .qds-title {\n font: var(--qds-accessory-title);\n }\n\n & .qds-subtitle {\n font: var(--qds-accessory-subtitle);\n }\n\n & .qds-kicker {\n font: var(--qds-accessory-kicker);\n }\n\n & .qds-icon {\n width: var(--qds-accessory-titles-icon-size);\n height: var(--qds-accessory-titles-icon-crop-height);\n }\n }\n\n &.qds-section {\n &.qds-titles {\n gap: var(--qds-accessory-section-titles-gap);\n }\n\n &.qds-has-icon {\n gap: var(--qds-accessory-section-titles-gap)\n var(--qds-accessory-section-titles-icon-gap);\n }\n\n & .qds-title {\n font: var(--qds-accessory-section-title);\n }\n\n & .qds-subtitle {\n font: var(--qds-accessory-section-subtitle);\n }\n\n & .qds-kicker {\n font: var(--qds-accessory-section-kicker);\n }\n\n & .qds-icon {\n width: var(--qds-accessory-section-titles-icon-size);\n height: var(--qds-accessory-section-titles-icon-crop-height);\n }\n }\n}\n\n[data-variant='web-main-section-promo'] {\n &:is(.qds-root, .qds-section, .qds-subsection) {\n &.qds-titles {\n gap: var(--qds-main-section-promo-titles-gap);\n margin: auto;\n }\n\n & .qds-title {\n font: var(--qds-main-section-promo-title);\n }\n\n & .qds-subtitle {\n font: var(--qds-main-section-promo-subtitle);\n }\n\n & .qds-kicker {\n font: var(--qds-main-section-promo-kicker);\n }\n\n &.qds-has-icon {\n gap: var(--qds-main-section-promo-titles-gap)\n var(--qds-main-section-promo-titles-icon-gap);\n }\n\n & .qds-icon {\n width: var(--qds-main-section-promo-titles-icon-size);\n height: var(--qds-main-section-promo-titles-icon-crop-height);\n }\n }\n}\n\n[data-alignment='start'] {\n text-align: start;\n}\n\n[data-alignment='center'] {\n text-align: center;\n}\n\n[data-alignment='end'] {\n text-align: end;\n}\n\n[data-variant='web-main-section-display'] {\n &:is(.qds-root, .qds-section, .qds-subsection) {\n &.qds-titles {\n gap: var(--qds-main-section-display-titles-gap);\n }\n\n & .qds-title {\n font: var(--qds-main-section-display-title);\n }\n }\n}\n\n[data-variant='web-main-subsection-card'] {\n &:is(.qds-root, .qds-section, .qds-subsection) {\n &.qds-titles {\n gap: var(--qds-main-subsection-card-titles-gap);\n }\n\n & .qds-title {\n font: var(--qds-main-subsection-card-standard-title);\n }\n }\n}\n\n[data-variant='web-main-section-hero'] {\n &:is(.qds-root, .qds-section, .qds-subsection) {\n &.qds-titles {\n gap: var(--qds-main-section-hero-titles-gap);\n }\n\n & .qds-title {\n font: var(--qds-main-section-hero-title);\n }\n }\n}\n","// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { ComponentInterface } from '@stencil/core'\nimport { AttachInternals, Component, h, Prop } from '@stencil/core'\n\nexport type Layer = 'accessory' | 'main' | 'navigation' | 'panel' | 'popup'\nexport type Level = 'root' | 'section' | 'subsection'\nexport type Tag = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'\nexport type TitleVariant =\n | 'web-main-section-display'\n | 'web-main-section-hero'\n | 'web-main-section-promo'\n | 'web-main-subsection-card'\n\nexport type Alignment = 'center' | 'end' | 'start'\n\n/**\n * @slot Content to display for the title.\n * @see https://quartz.se.com/build/components/title\n */\n@Component({\n tag: 'qds-title',\n shadow: true,\n styleUrl: 'title.css',\n})\nexport class Title implements ComponentInterface {\n /**\n * The alignment of the title.\n */\n @Prop() public readonly alignment?: Alignment = 'start'\n\n /**\n * The name of the icon to render.\n *\n * Available names depend on the icon library being used.\n */\n @Prop() public readonly iconName?: string\n\n /**\n * The name of a registered icon library.\n */\n @Prop() public readonly iconLibrary: string = 'default'\n\n /**\n * Text to display for the kicker.\n */\n @Prop() public readonly kicker?: string\n\n @Prop() public readonly layer?: Layer = 'main'\n\n @Prop() public readonly level?: Level = 'section'\n\n /**\n * Text to display for the subtitle.\n */\n @Prop() public readonly subtitle?: string\n\n /**\n * HTML tag to use to render the title.\n */\n @Prop() public readonly tag?: Tag = 'h2'\n\n /**\n * The title's variant.\n */\n @Prop() public readonly variant?: TitleVariant\n\n @AttachInternals() private readonly internals!: ElementInternals\n\n get #hasSubtitle(): boolean {\n return this.subtitle !== undefined && this.subtitle !== ''\n }\n\n get #hasKicker(): boolean {\n return this.kicker !== undefined && this.kicker !== ''\n }\n\n public componentWillLoad(): void {\n this.internals.role = 'group'\n }\n\n public render() {\n const layer = `qds-${this.layer ?? 'main'}`\n const level = `qds-${this.level ?? 'section'}`\n const Tag = this.tag ?? 'h2'\n const hasIcon = this.iconName !== undefined && this.iconName !== ''\n\n return (\n <hgroup\n data-alignment={this.alignment ?? 'start'}\n data-variant={this.variant}\n class={{\n [layer]: true,\n [level]: true,\n 'qds-titles': true,\n 'qds-has-icon': hasIcon,\n 'qds-has-kicker': this.#hasKicker,\n 'qds-has-subtitle': this.#hasSubtitle,\n }}\n role=\"none\"\n >\n <Tag class=\"qds-title\" data-variant={this.variant}>\n <slot />\n </Tag>\n {this.#hasKicker && <p class=\"qds-kicker\">{this.kicker}</p>}\n {this.#hasSubtitle && <p class=\"qds-subtitle\">{this.subtitle}</p>}\n {hasIcon && (\n <qds-icon\n class=\"qds-icon\"\n name={this.iconName}\n library={this.iconLibrary}\n />\n )}\n </hgroup>\n )\n }\n}\n"],"version":3}
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { p as proxyCustomElement, H, c as createEvent, h } from './p-D2489VzR.js';
|
|
7
|
-
import { p as pickFocusEventAttributes } from './p-
|
|
7
|
+
import { p as pickFocusEventAttributes } from './p-Bm_hrsjc.js';
|
|
8
8
|
import { d as defineCustomElement$4 } from './p-XP2CY_fo.js';
|
|
9
9
|
import { d as defineCustomElement$3 } from './p-U2Q0vF-d.js';
|
|
10
|
-
import { d as defineCustomElement$2 } from './p-
|
|
11
|
-
import { d as defineCustomElement$1 } from './p-
|
|
10
|
+
import { d as defineCustomElement$2 } from './p-EjoVBa5a.js';
|
|
11
|
+
import { d as defineCustomElement$1 } from './p-BGAgQ6J5.js';
|
|
12
12
|
|
|
13
13
|
const iconButtonCss = ":host{display:block;outline:none}.qds-focus-ring{border-radius:max(1px,var(\n --qds-form-input-border-radius-top-left,var(--qds-control-border-radius)\n )) max(1px,var(\n --qds-form-input-border-radius-top-right,var(--qds-control-border-radius)\n )) max(1px,var(\n --qds-form-input-border-radius-bottom-right,var(--qds-control-border-radius)\n )) max(1px,var(\n --qds-form-input-border-radius-bottom-left,var(--qds-control-border-radius)\n ));box-shadow:0 0 0 var(--qds-focus-heavy-border-width) var(--qds-theme-focus-border);grid-area:a;height:calc(100% + var(--qds-control-border-width) - var(--qds-control-border-width));isolation:isolate;outline:var(--qds-theme-focus-border-contrast) solid var(--qds-focus-light-border-width);outline-offset:0;pointer-events:none;visibility:hidden;width:calc(100% + var(--qds-control-border-width) - var(\n --qds-form-input-border-width-inline-end,\n var(--qds-control-border-width)\n ))}:host(:focus-visible) .qds-focus-ring{visibility:visible}.qds-container{display:grid;grid-template-areas:\"a\"}.qds-icon-button{align-items:center;-webkit-appearance:none;appearance:none;background-color:initial;border:none;border-radius:var(\n --qds-form-input-border-radius-top-left,var(--qds-control-border-radius)\n ) var(\n --qds-form-input-border-radius-top-right,var(--qds-control-border-radius)\n ) var(\n --qds-form-input-border-radius-bottom-right,var(--qds-control-border-radius)\n ) var(\n --qds-form-input-border-radius-bottom-left,var(--qds-control-border-radius)\n );box-sizing:border-box;color:var(--qds-theme-control-text-standard);cursor:pointer;display:flex;grid-area:a;justify-content:center;line-height:normal;min-width:0;outline:none;padding-inline:0;position:relative;-webkit-user-select:none;user-select:none}.qds-icon-button:hover{background-color:var(--qds-theme-interactive-background-hover)}.qds-icon-button:active{background-color:var(--qds-theme-interactive-background-pressed)}.qds-disabled{opacity:var(--qds-theme-disabled);pointer-events:none}.qds-icon{flex-shrink:0}.qds-indicator{transform:translate(50%,-50%)}.qds-counter,.qds-indicator{position:absolute}[data-size=small]{min-height:var(--qds-control-small-height);width:var(--qds-control-small-height)}.qds-icon[data-size=small]{min-height:var(--qds-control-small-icon-size);width:var(--qds-control-small-icon-size)}[data-size=small] .qds-indicator{inset-block-start:var(\n --qds-control-icon-button-small-badge-indicator-padding-top\n );inset-inline-end:var(\n --qds-control-icon-button-small-badge-indicator-padding-end\n )}[data-size=small] .qds-counter{inset-block-start:calc(var(--qds-control-icon-button-small-badge-counter-padding-top) - var(--qds-feedback-badge-border-width));inset-inline-end:calc(var(--qds-control-icon-button-small-badge-counter-padding-end) - var(--qds-feedback-badge-border-width))}[data-size=standard]{min-height:var(--qds-control-standard-height);width:var(--qds-control-standard-height)}.qds-icon[data-size=standard]{min-height:var(--qds-control-standard-icon-size);width:var(--qds-control-standard-icon-size)}[data-size=standard] .qds-indicator{inset-block-start:var(\n --qds-control-icon-button-standard-badge-indicator-padding-top\n );inset-inline-end:var(\n --qds-control-icon-button-standard-badge-indicator-padding-end\n )}[data-size=standard] .qds-counter{inset-block-start:calc(var(--qds-control-icon-button-standard-badge-counter-padding-top) - var(--qds-feedback-badge-border-width));inset-inline-end:calc(var(--qds-control-icon-button-standard-badge-counter-padding-end) - var(--qds-feedback-badge-border-width))}[data-size=large]{min-height:var(--qds-control-large-height);width:var(--qds-control-large-height)}.qds-icon[data-size=large]{min-height:var(--qds-control-large-icon-size);width:var(--qds-control-large-icon-size)}[data-size=large] .qds-indicator{inset-block-start:var(\n --qds-control-icon-button-large-badge-indicator-padding-top\n );inset-inline-end:var(\n --qds-control-icon-button-large-badge-indicator-padding-end\n )}[data-size=large] .qds-counter{inset-block-start:calc(var(--qds-control-icon-button-large-badge-counter-padding-top) - var(--qds-feedback-badge-border-width));inset-inline-end:calc(var(--qds-control-icon-button-large-badge-counter-padding-end) - var(--qds-feedback-badge-border-width))}[data-size=hero]{border-radius:var(\n --qds-form-input-border-radius-top-left,var(--qds-control-hero-border-radius)\n ) var(\n --qds-form-input-border-radius-top-right,var(--qds-control-hero-border-radius)\n ) var(\n --qds-form-input-border-radius-bottom-right,var(--qds-control-hero-border-radius)\n ) var(\n --qds-form-input-border-radius-bottom-left,var(--qds-control-hero-border-radius)\n );min-height:var(--qds-control-hero-height);width:var(--qds-control-hero-height)}.qds-icon[data-size=hero]{min-height:var(--qds-control-hero-icon-size);width:var(--qds-control-hero-icon-size)}[data-size=hero] .qds-indicator{inset-block-start:var(\n --qds-control-icon-button-hero-badge-indicator-padding-top\n );inset-inline-end:var(\n --qds-control-icon-button-hero-badge-indicator-padding-end\n )}[data-size=hero] .qds-counter{inset-block-start:var(\n --qds-control-icon-button-hero-badge-counter-padding-top\n );inset-inline-end:var(\n --qds-control-icon-button-hero-badge-counter-padding-end\n )}[data-importance=subdued]{color:var(--qds-theme-control-text-standard)}[data-importance=subdued]:hover{background-color:var(--qds-theme-interactive-background-hover)}[data-importance=subdued]:active{background-color:var(--qds-theme-interactive-background-pressed)}[data-importance=standard]{border:var(--qds-control-border-width) solid var(--qds-theme-control-border);color:var(--qds-theme-control-text-standard)}[data-importance=standard]:hover{background-color:var(--qds-theme-interactive-background-hover)}[data-importance=standard]:active{background-color:var(--qds-theme-interactive-background-pressed)}[data-importance=emphasized]{background-color:var(--qds-theme-signature-color-default);color:var(--qds-theme-signature-color-contrast)}[data-importance=emphasized]:hover{background-color:var(--qds-theme-signature-color-hover)}[data-importance=emphasized]:active{background-color:var(--qds-theme-signature-color-pressed)}[data-importance=destructive]{background-color:var(--qds-theme-feedback-action-destructive-default);color:var(--qds-theme-feedback-action-destructive-contrast)}[data-importance=destructive]:hover{background-color:var(--qds-theme-feedback-action-destructive-hover)}[data-importance=destructive]:active{background-color:var(--qds-theme-feedback-action-destructive-pressed)}[data-importance=subdued-destructive]{border:none;color:var(--qds-theme-feedback-action-destructive-default)}[data-importance=subdued-destructive]:hover{background-color:var(--qds-theme-interactive-background-hover);color:var(--qds-theme-feedback-action-destructive-default)}[data-importance=subdued-destructive]:active{background-color:var(--qds-theme-interactive-background-pressed);color:var(--qds-theme-feedback-action-destructive-default)}";
|
|
14
14
|
|
|
@@ -264,6 +264,6 @@ function defineCustomElement() {
|
|
|
264
264
|
}
|
|
265
265
|
|
|
266
266
|
export { IconButton as I, defineCustomElement as d };
|
|
267
|
-
//# sourceMappingURL=p-
|
|
267
|
+
//# sourceMappingURL=p-DVXvtEPn.js.map
|
|
268
268
|
|
|
269
|
-
//# sourceMappingURL=p-
|
|
269
|
+
//# sourceMappingURL=p-DVXvtEPn.js.map
|