@quartzds/core 1.0.0-beta.121 → 1.0.0-beta.123
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 +66 -0
- package/components/index.js +1 -1
- package/components/{p-CkyaV9az.js → p-B7s906mS.js} +9 -9
- package/components/p-B7s906mS.js.map +1 -0
- package/components/p-BZlKeCFb.js +200 -0
- package/components/p-BZlKeCFb.js.map +1 -0
- package/components/{p-CURs27Ur.js → p-BalM52S_.js} +3 -3
- package/components/{p-CURs27Ur.js.map → p-BalM52S_.js.map} +1 -1
- package/components/{p-C1c4JVlg.js → p-BoSYRCNp.js} +47 -28
- package/components/p-BoSYRCNp.js.map +1 -0
- package/components/p-BvRd7jA2.js +102 -0
- package/components/p-BvRd7jA2.js.map +1 -0
- package/components/{p-B2ZVUvk9.js → p-C93kOEAe.js} +7 -9
- package/components/p-C93kOEAe.js.map +1 -0
- package/components/{p-DtxwXYGb.js → p-C9R8N06B.js} +5 -31
- package/components/p-C9R8N06B.js.map +1 -0
- package/components/{p-DR79BVX5.js → p-CKp062X8.js} +6 -6
- package/components/p-CKp062X8.js.map +1 -0
- package/components/{p-CjVnGhSO.js → p-CVuTVnQo.js} +3 -3
- package/components/{p-CjVnGhSO.js.map → p-CVuTVnQo.js.map} +1 -1
- package/components/{p-D82sb4oJ.js → p-CbY4T0d2.js} +5 -5
- package/components/p-CbY4T0d2.js.map +1 -0
- package/components/{p-DNHI4C-W.js → p-CowZ-pDD.js} +58 -22
- package/components/p-CowZ-pDD.js.map +1 -0
- package/components/{p-CDRwHAIT.js → p-XP2CY_fo.js} +3 -3
- package/components/p-XP2CY_fo.js.map +1 -0
- package/components/{p-5dwtV5iH.js → p-yb0Kv4Y6.js} +24 -6
- package/components/p-yb0Kv4Y6.js.map +1 -0
- package/components/qds-action-item.js +4 -4
- package/components/qds-action-item.js.map +1 -1
- package/components/qds-avatar-media.js +1 -1
- package/components/qds-badge-counter.js +1 -1
- package/components/qds-breadcrumb-item.js +5 -5
- package/components/qds-breadcrumb-item.js.map +1 -1
- package/components/qds-button.js +5 -5
- package/components/qds-button.js.map +1 -1
- package/components/qds-checkbox.js +1 -1
- package/components/qds-chip.js +10 -10
- package/components/qds-chip.js.map +1 -1
- package/components/qds-dialog.js +6 -6
- package/components/qds-divider.js +1 -1
- package/components/qds-dropdown.js +1 -1
- package/components/qds-form-message.js +4 -4
- package/components/qds-form-message.js.map +1 -1
- package/components/qds-icon-button.js +1 -1
- package/components/qds-icon-tab.js +8 -8
- package/components/qds-icon.js +1 -1
- package/components/qds-inline-link.js +4 -4
- package/components/qds-inline-link.js.map +1 -1
- package/components/qds-input.js +17 -13
- package/components/qds-input.js.map +1 -1
- package/components/qds-label.js +153 -1
- package/components/qds-label.js.map +1 -1
- package/components/qds-list-item.js +25 -29
- package/components/qds-list-item.js.map +1 -1
- package/components/qds-loader.js +3 -3
- package/components/qds-loader.js.map +1 -1
- package/components/qds-menu-item.js +6 -6
- 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 +6 -6
- package/components/qds-select.js.map +1 -1
- package/components/qds-standalone-link.js +5 -5
- package/components/qds-standalone-link.js.map +1 -1
- package/components/qds-switch.js +6 -6
- package/components/qds-switch.js.map +1 -1
- package/components/qds-tab.js +20 -15
- package/components/qds-tab.js.map +1 -1
- package/components/qds-tabbar.js +95 -34
- package/components/qds-tabbar.js.map +1 -1
- package/components/qds-table-cell.js +32 -4
- package/components/qds-table-cell.js.map +1 -1
- package/components/qds-table-head-cell.js +32 -4
- package/components/qds-table-head-cell.js.map +1 -1
- package/components/qds-table-row.js +2 -2
- package/components/qds-table-row.js.map +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/loader.cjs.js +1 -1
- package/dist/cjs/qds-action-item.cjs.entry.js +1 -1
- package/dist/cjs/qds-action-item.entry.cjs.js.map +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 +144 -41
- package/dist/cjs/qds-badge-counter.qds-badge-indicator.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-badge-counter_2.cjs.entry.js +1 -1
- package/dist/cjs/qds-breadcrumb-item.cjs.entry.js +2 -2
- package/dist/cjs/qds-breadcrumb-item.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-button.cjs.entry.js +1 -1
- package/dist/cjs/qds-button.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-chip.cjs.entry.js +6 -6
- package/dist/cjs/qds-chip.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-dialog.cjs.entry.js +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 +4 -4
- package/dist/cjs/qds-dropdown.cjs.entry.js +21 -3
- package/dist/cjs/qds-dropdown.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-form-message.cjs.entry.js +2 -2
- package/dist/cjs/qds-form-message.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-icon-tab.cjs.entry.js +3 -3
- package/dist/cjs/qds-icon.cjs.entry.js +9 -29
- package/dist/cjs/qds-icon.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-inline-link.cjs.entry.js +2 -2
- package/dist/cjs/qds-inline-link.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-input.cjs.entry.js +14 -10
- package/dist/cjs/qds-input.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-label.cjs.entry.js +2 -2
- package/dist/cjs/qds-list-item.cjs.entry.js +6 -4
- package/dist/cjs/qds-list-item.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-loader.cjs.entry.js +2 -2
- package/dist/cjs/qds-loader.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-menu-item.cjs.entry.js +2 -2
- package/dist/cjs/qds-mini-button.cjs.entry.js +3 -5
- 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 +4 -4
- 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-standalone-link.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-switch.cjs.entry.js +4 -4
- package/dist/cjs/qds-switch.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-tab.cjs.entry.js +15 -10
- package/dist/cjs/qds-tab.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-tabbar.cjs.entry.js +83 -27
- package/dist/cjs/qds-tabbar.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-table-cell.cjs.entry.js +30 -3
- package/dist/cjs/qds-table-cell.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-table-head-cell.cjs.entry.js +30 -3
- package/dist/cjs/qds-table-head-cell.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-table-row.cjs.entry.js +2 -2
- package/dist/cjs/qds-table-row.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-table.cjs.entry.js +1 -1
- package/dist/cjs/qds-tag.cjs.entry.js +2 -2
- package/dist/cjs/qds-tag.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-textarea.cjs.entry.js +3 -3
- 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 +2 -2
- package/dist/cjs/qds-tooltip.entry.cjs.js.map +1 -1
- package/dist/cjs/qds.cjs.js +1 -1
- package/dist/custom-elements.json +365 -30
- package/dist/docs.json +320 -64
- package/dist/esm/{helpers-eFD8hV6J.js → helpers-Fe2AA6uo.js} +3 -3
- package/dist/esm/{helpers-eFD8hV6J.js.map → helpers-Fe2AA6uo.js.map} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/qds-action-item.entry.js +2 -2
- package/dist/esm/qds-action-item.entry.js.map +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 +146 -43
- package/dist/esm/qds-badge-counter.qds-badge-indicator.entry.js.map +1 -1
- package/dist/esm/qds-badge-counter_2.entry.js +1 -1
- package/dist/esm/qds-breadcrumb-item.entry.js +3 -3
- package/dist/esm/qds-breadcrumb-item.entry.js.map +1 -1
- package/dist/esm/qds-button.entry.js +2 -2
- package/dist/esm/qds-button.entry.js.map +1 -1
- package/dist/esm/qds-chip.entry.js +7 -7
- package/dist/esm/qds-chip.entry.js.map +1 -1
- package/dist/esm/qds-dialog.entry.js +2 -2
- package/dist/esm/qds-divider.qds-icon-button.entry.js.map +1 -1
- package/dist/esm/qds-divider_2.entry.js +5 -5
- package/dist/esm/qds-dropdown.entry.js +22 -4
- package/dist/esm/qds-dropdown.entry.js.map +1 -1
- package/dist/esm/qds-form-message.entry.js +3 -3
- package/dist/esm/qds-form-message.entry.js.map +1 -1
- package/dist/esm/qds-icon-tab.entry.js +4 -4
- package/dist/esm/qds-icon.entry.js +10 -30
- package/dist/esm/qds-icon.entry.js.map +1 -1
- package/dist/esm/qds-inline-link.entry.js +3 -3
- package/dist/esm/qds-inline-link.entry.js.map +1 -1
- package/dist/esm/qds-input.entry.js +15 -11
- package/dist/esm/qds-input.entry.js.map +1 -1
- package/dist/esm/qds-label.entry.js +3 -3
- package/dist/esm/qds-list-item.entry.js +7 -5
- package/dist/esm/qds-list-item.entry.js.map +1 -1
- package/dist/esm/qds-loader.entry.js +2 -2
- package/dist/esm/qds-loader.entry.js.map +1 -1
- package/dist/esm/qds-menu-item.entry.js +3 -3
- 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 +5 -5
- package/dist/esm/qds-select.entry.js.map +1 -1
- package/dist/esm/qds-standalone-link.entry.js +4 -4
- package/dist/esm/qds-standalone-link.entry.js.map +1 -1
- 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 +16 -11
- package/dist/esm/qds-tab.entry.js.map +1 -1
- package/dist/esm/qds-tabbar.entry.js +84 -28
- package/dist/esm/qds-tabbar.entry.js.map +1 -1
- package/dist/esm/qds-table-cell.entry.js +30 -3
- package/dist/esm/qds-table-cell.entry.js.map +1 -1
- package/dist/esm/qds-table-head-cell.entry.js +30 -3
- package/dist/esm/qds-table-head-cell.entry.js.map +1 -1
- package/dist/esm/qds-table-row.entry.js +2 -2
- package/dist/esm/qds-table-row.entry.js.map +1 -1
- package/dist/esm/qds-table.entry.js +1 -1
- package/dist/esm/qds-tag.entry.js +3 -3
- package/dist/esm/qds-tag.entry.js.map +1 -1
- 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/avatar-media/avatar-media.d.ts +14 -5
- package/dist/types/components/checkbox/checkbox.d.ts +4 -0
- package/dist/types/components/icon/icon.d.ts +1 -2
- package/dist/types/components/radio/radio.d.ts +4 -0
- package/dist/types/components/tab/tab.d.ts +1 -1
- package/dist/types/components/tabbar/tabbar.d.ts +27 -1
- package/dist/types/components/table-cell/table-cell.d.ts +6 -0
- package/dist/types/components/table-head-cell/table-head-cell.d.ts +6 -0
- package/dist/types/components.d.ts +72 -15
- package/dist/vscode.html-custom-data.json +79 -4
- package/hydrate/index.js +969 -741
- package/hydrate/index.mjs +969 -741
- package/package.json +1 -2
- package/styles/core.css +24 -22
- package/components/p-5dwtV5iH.js.map +0 -1
- package/components/p-B2ZVUvk9.js.map +0 -1
- package/components/p-C1c4JVlg.js.map +0 -1
- package/components/p-CDRwHAIT.js.map +0 -1
- package/components/p-CkUTS1aU.js +0 -102
- package/components/p-CkUTS1aU.js.map +0 -1
- package/components/p-CkyaV9az.js.map +0 -1
- package/components/p-D82sb4oJ.js.map +0 -1
- package/components/p-D9pW936J.js +0 -164
- package/components/p-D9pW936J.js.map +0 -1
- package/components/p-DNHI4C-W.js.map +0 -1
- package/components/p-DR79BVX5.js.map +0 -1
- package/components/p-DtxwXYGb.js.map +0 -1
- package/components/p-laE-pGH7.js +0 -163
- package/components/p-laE-pGH7.js.map +0 -1
package/components/p-D9pW936J.js
DELETED
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* SPDX-FileCopyrightText: © 2026 Schneider Electric
|
|
3
|
-
*
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import { p as proxyCustomElement, H, c as createEvent, h } from './p-D2489VzR.js';
|
|
7
|
-
import { p as pickFocusEventAttributes, i as invariant, c as inheritAriaAttributes } from './p-CURs27Ur.js';
|
|
8
|
-
import { d as defineCustomElement$3 } from './p-DtxwXYGb.js';
|
|
9
|
-
import { d as defineCustomElement$2 } from './p-laE-pGH7.js';
|
|
10
|
-
import { d as defineCustomElement$1 } from './p-D82sb4oJ.js';
|
|
11
|
-
|
|
12
|
-
const radioCss = "[hidden].sc-qds-radio-h{display:none!important}.sc-qds-radio-h{display:inline-block;line-height:0}.qds-icon.sc-qds-radio,.qds-radio.sc-qds-radio{grid-area:i;place-self:center}.qds-icon.sc-qds-radio{display:none;pointer-events:none}.qds-container.sc-qds-radio{display:grid;grid-template-areas:\"i\"}.qds-label.sc-qds-radio{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.sc-qds-radio:hover{background-color:var(--qds-theme-interactive-background-hover)}.qds-label.sc-qds-radio:active{background-color:var(--qds-theme-interactive-background-pressed)}.qds-label.sc-qds-radio:has(.qds-radio:focus-visible){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.sc-qds-radio{flex:1 1 auto;min-width:0;width:100%}.qds-radio.sc-qds-radio{-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);border-radius:var(--qds-control-rounded-border-radius);cursor:pointer;margin:0;padding:var(--qds-control-toggle-padding);-webkit-print-color-adjust:exact;print-color-adjust:exact}.qds-radio.sc-qds-radio:focus-visible{outline:none}.qds-radio.sc-qds-radio:checked~.qds-icon.sc-qds-radio{color:var(--qds-theme-control-background-contrast);display:block}[aria-disabled=true].sc-qds-radio{opacity:var(--qds-theme-disabled);pointer-events:none}[data-size=small].sc-qds-radio{--qds-form-small-text:var(--qds-control-small-text)}.qds-radio[data-size=small].sc-qds-radio{height:var(--qds-control-toggle-small-box-size);width:var(--qds-control-toggle-small-box-size)}.qds-icon[data-size=small].sc-qds-radio{font-size:var(--qds-control-small-icon-size)}.qds-label[data-size=small].sc-qds-radio{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-inline[data-size=small].sc-qds-radio{min-height:var(--qds-control-small-height);padding:var(--qds-control-standard-padding-auto-height) var(--qds-control-toggle-standard-padding-horizontal)}[data-size=standard].sc-qds-radio{--qds-form-standard-text:var(--qds-control-standard-text)}.qds-radio[data-size=standard].sc-qds-radio{height:var(--qds-control-toggle-standard-box-size);width:var(--qds-control-toggle-standard-box-size)}.qds-icon[data-size=standard].sc-qds-radio{height:var(--qds-control-standard-icon-size);width:var(--qds-control-standard-icon-size)}.qds-label[data-size=standard].sc-qds-radio{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-inline[data-size=standard].sc-qds-radio{min-height:var(--qds-control-standard-height);padding:var(--qds-control-standard-padding-auto-height) var(--qds-control-toggle-standard-padding-horizontal)}[data-size=large].sc-qds-radio{--qds-form-large-text:var(--qds-control-large-text)}.qds-radio[data-size=large].sc-qds-radio{height:var(--qds-control-toggle-large-box-size);width:var(--qds-control-toggle-large-box-size)}.qds-icon[data-size=large].sc-qds-radio{height:var(--qds-control-large-icon-size);width:var(--qds-control-large-icon-size)}.qds-label[data-size=large].sc-qds-radio{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-inline[data-size=large].sc-qds-radio{min-height:var(--qds-control-large-height);padding:var(--qds-control-standard-padding-auto-height) var(--qds-control-toggle-standard-padding-horizontal)}";
|
|
13
|
-
|
|
14
|
-
// SPDX-FileCopyrightText: © 2024 Schneider Electric
|
|
15
|
-
//
|
|
16
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
17
|
-
var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
18
|
-
if (kind === "a" && !f)
|
|
19
|
-
throw new TypeError("Private accessor was defined without a getter");
|
|
20
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
21
|
-
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
22
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
23
|
-
};
|
|
24
|
-
var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
25
|
-
if (kind === "m")
|
|
26
|
-
throw new TypeError("Private method is not writable");
|
|
27
|
-
if (kind === "a" && !f)
|
|
28
|
-
throw new TypeError("Private accessor was defined without a setter");
|
|
29
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
30
|
-
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
31
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
32
|
-
};
|
|
33
|
-
var _Radio_instances, _Radio_inheritedAttributes, _Radio_input, _Radio_computedDisabled_get, _Radio_computedSize_get, _Radio_hasText_get, _Radio_ref, _Radio_onBlur, _Radio_onChange, _Radio_onFocus;
|
|
34
|
-
const Radio = /*@__PURE__*/ proxyCustomElement(class Radio extends H {
|
|
35
|
-
constructor(registerHost) {
|
|
36
|
-
super();
|
|
37
|
-
if (registerHost !== false) {
|
|
38
|
-
this.__registerHost();
|
|
39
|
-
}
|
|
40
|
-
this.blurEmitter = createEvent(this, "qdsBlur", 2);
|
|
41
|
-
this.changeEmitter = createEvent(this, "qdsChange", 6);
|
|
42
|
-
this.focusEmitter = createEvent(this, "qdsFocus", 2);
|
|
43
|
-
_Radio_instances.add(this);
|
|
44
|
-
/**
|
|
45
|
-
* Adds vertical margin to the radio for alignment.
|
|
46
|
-
*
|
|
47
|
-
* This is useful when creating inline layouts so that the first lines have
|
|
48
|
-
* the correct vertical centering.
|
|
49
|
-
*/
|
|
50
|
-
this.inline = false;
|
|
51
|
-
/**
|
|
52
|
-
* The radio button's size.
|
|
53
|
-
*/
|
|
54
|
-
this.size = 'standard';
|
|
55
|
-
_Radio_inheritedAttributes.set(this, {});
|
|
56
|
-
_Radio_input.set(this, void 0);
|
|
57
|
-
_Radio_ref.set(this, (input) => {
|
|
58
|
-
__classPrivateFieldSet(this, _Radio_input, input, "f");
|
|
59
|
-
});
|
|
60
|
-
_Radio_onBlur.set(this, (event) => {
|
|
61
|
-
this.blurEmitter.emit(pickFocusEventAttributes(event));
|
|
62
|
-
});
|
|
63
|
-
_Radio_onChange.set(this, () => {
|
|
64
|
-
this.changeEmitter.emit();
|
|
65
|
-
});
|
|
66
|
-
_Radio_onFocus.set(this, (event) => {
|
|
67
|
-
this.focusEmitter.emit(pickFocusEventAttributes(event));
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
onClick(event) {
|
|
71
|
-
if (__classPrivateFieldGet(this, _Radio_instances, "a", _Radio_computedDisabled_get)) {
|
|
72
|
-
event.stopImmediatePropagation();
|
|
73
|
-
return;
|
|
74
|
-
}
|
|
75
|
-
invariant(__classPrivateFieldGet(this, _Radio_input, "f"));
|
|
76
|
-
this.checked = __classPrivateFieldGet(this, _Radio_input, "f").checked;
|
|
77
|
-
}
|
|
78
|
-
tabindexChanged(newValue) {
|
|
79
|
-
const parsedValue = Number.parseInt(newValue, 10);
|
|
80
|
-
this.tabIndex =
|
|
81
|
-
parsedValue === 0 || Number.isNaN(parsedValue) ? undefined : parsedValue;
|
|
82
|
-
}
|
|
83
|
-
componentWillLoad() {
|
|
84
|
-
__classPrivateFieldSet(this, _Radio_inheritedAttributes, inheritAriaAttributes(this.host), "f");
|
|
85
|
-
this.tabindexChanged(this.host.getAttribute('tabindex') ?? '0');
|
|
86
|
-
}
|
|
87
|
-
render() {
|
|
88
|
-
return (
|
|
89
|
-
// eslint-disable-next-line jsx-a11y/label-has-associated-control
|
|
90
|
-
h("label", { key: 'd0c73be3ff0a081eb00a0857c8d4c44757b6db2b', "aria-disabled": __classPrivateFieldGet(this, _Radio_instances, "a", _Radio_computedDisabled_get) ? 'true' : undefined, class: {
|
|
91
|
-
'qds-inline': this.inline,
|
|
92
|
-
'qds-label': true,
|
|
93
|
-
}, "data-size": __classPrivateFieldGet(this, _Radio_instances, "a", _Radio_computedSize_get) }, h("div", { key: '1018adbd92399c84791fed4bd449220431f8525f', class: "qds-container" }, h("input", { key: 'f7d1a5bdaf8cc9689b7b4d2257cb360377d8a4b6',
|
|
94
|
-
// eslint-disable-next-line jsx-a11y/no-autofocus
|
|
95
|
-
autoFocus: this.host.autofocus, checked: this.checked, class: "qds-radio", "data-size": __classPrivateFieldGet(this, _Radio_instances, "a", _Radio_computedSize_get), disabled: this.disabled, form: this.form, name: this.name, onBlur: __classPrivateFieldGet(this, _Radio_onBlur, "f"), onChange: __classPrivateFieldGet(this, _Radio_onChange, "f"), onFocus: __classPrivateFieldGet(this, _Radio_onFocus, "f"), ref: __classPrivateFieldGet(this, _Radio_ref, "f"), required: this.required, tabIndex: __classPrivateFieldGet(this, _Radio_instances, "a", _Radio_computedDisabled_get) ? undefined : this.tabIndex, type: "radio", value: this.value ?? undefined, ...__classPrivateFieldGet(this, _Radio_inheritedAttributes, "f") }), h("qds-icon", { key: '5d216956b9bc9a9d673f79ef81302f8a085a4f01', "aria-hidden": "true", class: "qds-icon", "data-size": __classPrivateFieldGet(this, _Radio_instances, "a", _Radio_computedSize_get), library: "core", name: "checked-radio" })), __classPrivateFieldGet(this, _Radio_instances, "a", _Radio_hasText_get) && (h("qds-label", { key: '023e5f403ff3299ff37153eb7ee96941f485b308', class: "qds-label-inner", size: __classPrivateFieldGet(this, _Radio_instances, "a", _Radio_computedSize_get), text: this.text }))));
|
|
96
|
-
}
|
|
97
|
-
get host() { return this; }
|
|
98
|
-
static get watchers() { return {
|
|
99
|
-
"tabindex": ["tabindexChanged"]
|
|
100
|
-
}; }
|
|
101
|
-
static get style() { return radioCss; }
|
|
102
|
-
}, [258, "qds-radio", {
|
|
103
|
-
"inline": [4],
|
|
104
|
-
"size": [1],
|
|
105
|
-
"text": [1],
|
|
106
|
-
"checked": [1028],
|
|
107
|
-
"disabled": [4],
|
|
108
|
-
"form": [1],
|
|
109
|
-
"name": [1],
|
|
110
|
-
"required": [4],
|
|
111
|
-
"value": [1032],
|
|
112
|
-
"tabIndex": [32]
|
|
113
|
-
}, [[0, "click", "onClick"]], {
|
|
114
|
-
"tabindex": ["tabindexChanged"]
|
|
115
|
-
}]);
|
|
116
|
-
_Radio_inheritedAttributes = new WeakMap(), _Radio_input = new WeakMap(), _Radio_ref = new WeakMap(), _Radio_onBlur = new WeakMap(), _Radio_onChange = new WeakMap(), _Radio_onFocus = new WeakMap(), _Radio_instances = new WeakSet(), _Radio_computedDisabled_get = function _Radio_computedDisabled_get() {
|
|
117
|
-
return this.disabled ?? false;
|
|
118
|
-
}, _Radio_computedSize_get = function _Radio_computedSize_get() {
|
|
119
|
-
switch (this.size) {
|
|
120
|
-
case 'standard':
|
|
121
|
-
case 'small':
|
|
122
|
-
case 'large': {
|
|
123
|
-
return this.size;
|
|
124
|
-
}
|
|
125
|
-
default: {
|
|
126
|
-
return 'standard';
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
}, _Radio_hasText_get = function _Radio_hasText_get() {
|
|
130
|
-
return this.text !== undefined && this.text !== '';
|
|
131
|
-
};
|
|
132
|
-
function defineCustomElement() {
|
|
133
|
-
if (typeof customElements === "undefined") {
|
|
134
|
-
return;
|
|
135
|
-
}
|
|
136
|
-
const components = ["qds-radio", "qds-icon", "qds-label", "qds-tooltip"];
|
|
137
|
-
components.forEach(tagName => { switch (tagName) {
|
|
138
|
-
case "qds-radio":
|
|
139
|
-
if (!customElements.get(tagName)) {
|
|
140
|
-
customElements.define(tagName, Radio);
|
|
141
|
-
}
|
|
142
|
-
break;
|
|
143
|
-
case "qds-icon":
|
|
144
|
-
if (!customElements.get(tagName)) {
|
|
145
|
-
defineCustomElement$3();
|
|
146
|
-
}
|
|
147
|
-
break;
|
|
148
|
-
case "qds-label":
|
|
149
|
-
if (!customElements.get(tagName)) {
|
|
150
|
-
defineCustomElement$2();
|
|
151
|
-
}
|
|
152
|
-
break;
|
|
153
|
-
case "qds-tooltip":
|
|
154
|
-
if (!customElements.get(tagName)) {
|
|
155
|
-
defineCustomElement$1();
|
|
156
|
-
}
|
|
157
|
-
break;
|
|
158
|
-
} });
|
|
159
|
-
}
|
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ACZ,CAAA,CAAA,WAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAC,iBAAiB,EACvB,IAAI,EAAE,sBAAA,CAAA,IAAI,EAAc,gBAAA,EAAA,GAAA,EAAA,uBAAA,CAAA,EACxB,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,CAAA,CACH,CACK;;;;;;;;;;;;;;;;;;;;;;AA3FV,IAAA,OAAO,IAAI,CAAC,QAAQ,IAAI,KAAK;AAC/B,CAAC,EAAA,uBAAA,GAAA,SAAA,uBAAA,GAAA;AAGC,IAAA,QAAQ,IAAI,CAAC,IAAI;AACf,QAAA,KAAK,UAAU;AACf,QAAA,KAAK,OAAO;QACZ,KAAK,OAAO,EAAE;YACZ,OAAO,IAAI,CAAC,IAAI;;QAElB,SAAS;AACP,YAAA,OAAO,UAAU;;;AAGvB,CAAC,EAAA,kBAAA,GAAA,SAAA,kBAAA,GAAA;IAGC,OAAO,IAAI,CAAC,IAAI,KAAK,SAAS,IAAI,IAAI,CAAC,IAAI,KAAK,EAAE;AACpD,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/radio/radio.css?tag=qds-radio&encapsulation=scoped","src/components/radio/radio.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}\n\n.qds-radio,\n.qds-icon {\n grid-area: radio;\n place-self: center;\n}\n\n.qds-icon {\n display: none;\n pointer-events: none;\n}\n\n.qds-container {\n display: grid;\n grid-template-areas: 'radio';\n}\n\n.qds-label {\n cursor: pointer;\n display: inline-flex;\n align-items: flex-start;\n justify-content: center;\n box-sizing: border-box;\n width: inherit;\n border-radius: var(--qds-control-border-radius);\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 &:has(.qds-radio:focus-visible) {\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\n.qds-label-inner {\n flex: 1 1 auto;\n min-width: 0;\n width: 100%;\n}\n\n.qds-radio {\n appearance: none;\n background-color: var(--qds-theme-interactive-background-default);\n border-radius: var(--qds-control-rounded-border-radius);\n border: var(--qds-control-border-width) solid var(--qds-theme-control-border);\n cursor: pointer;\n margin: 0;\n padding: var(--qds-control-toggle-padding);\n print-color-adjust: exact;\n\n &:focus-visible {\n outline: none;\n }\n\n &:checked {\n & ~ .qds-icon {\n display: block;\n color: var(--qds-theme-control-background-contrast);\n }\n }\n}\n\n[aria-disabled='true'] {\n opacity: var(--qds-theme-disabled);\n pointer-events: none;\n}\n\n[data-size='small'] {\n /* override qds-label font design token */\n --qds-form-small-text: var(--qds-control-small-text);\n\n &.qds-radio {\n width: var(--qds-control-toggle-small-box-size);\n height: var(--qds-control-toggle-small-box-size);\n }\n\n &.qds-icon {\n font-size: var(--qds-control-small-icon-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-inline {\n min-height: var(--qds-control-small-height);\n padding: var(--qds-control-standard-padding-auto-height)\n var(--qds-control-toggle-standard-padding-horizontal);\n }\n}\n\n[data-size='standard'] {\n /* override qds-label font design token */\n --qds-form-standard-text: var(--qds-control-standard-text);\n\n &.qds-radio {\n width: var(--qds-control-toggle-standard-box-size);\n height: var(--qds-control-toggle-standard-box-size);\n }\n\n &.qds-icon {\n width: var(--qds-control-standard-icon-size);\n height: var(--qds-control-standard-icon-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-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 /* override qds-label font design token */\n --qds-form-large-text: var(--qds-control-large-text);\n\n &.qds-radio {\n width: var(--qds-control-toggle-large-box-size);\n height: var(--qds-control-toggle-large-box-size);\n }\n\n &.qds-icon {\n width: var(--qds-control-large-icon-size);\n height: var(--qds-control-large-icon-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-inline {\n min-height: var(--qds-control-large-height);\n padding: var(--qds-control-standard-padding-auto-height)\n var(--qds-control-toggle-standard-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 Component,\n Element,\n Event,\n h,\n Listen,\n Prop,\n State,\n Watch,\n} from '@stencil/core'\n\nimport type { Attributes, QdsFocusEventDetail } from '../../helpers'\nimport {\n inheritAriaAttributes,\n invariant,\n pickFocusEventAttributes,\n} from '../../helpers'\nimport type { Value } from '../controls'\nimport type { Size } from '../shared'\n\n/**\n * `<qds-radio>` elements are rendered as circles that are filled when\n * selected. They are generally used in **radio groups** — collections of radio\n * buttons describing a set of related options.\n *\n * Only one radio button in a given radio group can be selected at the same\n * time.\n *\n * @see https://quartz.se.com/build/components/radio\n */\n@Component({\n tag: 'qds-radio',\n scoped: true,\n styleUrl: 'radio.css',\n})\nexport class Radio implements ComponentInterface {\n /**\n * Adds vertical margin to the radio 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 radio button's size.\n */\n @Prop() public readonly size?: Size = 'standard'\n\n /**\n * The radio button's text.\n */\n @Prop() public readonly text?: string\n\n /**\n * Sets the radio button's state.\n *\n * @webnative\n */\n @Prop({ mutable: true }) public checked?: boolean\n\n /**\n * Prevents the radio button from being interacted with: it cannot be pressed\n * or focused.\n *\n * @webnative\n */\n @Prop() public readonly disabled?: boolean\n\n /**\n * The [`<form>`](https://developer.mozilla.org/docs/Web/HTML/Element/form)\n * element to associate the radio button with (its form owner).\n *\n * The value of this property must be the id of a `<form>` in the same\n * document. If this property is not set, the `<qds-radio>` is associated\n * with its ancestor `<form>` element, if any.\n *\n * This property lets you associate `<qds-radio>` 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 * @webnative\n */\n @Prop() public readonly form?: string\n\n /**\n * Specify the radio group this radio button belongs to.\n *\n * Once a radio group is established, selecting any radio button in that\n * group automatically deselects any currently-selected radio button in the\n * same group.\n *\n * @webnative\n */\n @Prop() public readonly name?: string\n\n /**\n * Specify the group the radio button belongs to as required.\n *\n * If any radio button in a same-named group of radio buttons has the\n * `required` attribute, a radio button in that group must be checked,\n * although it doesn't have to be the one with the attribute applied.\n *\n * @webnative\n */\n @Prop() public readonly required?: boolean\n\n /**\n * The value of the radio button, submitted as a name/value pair with form\n * data.\n *\n * @webnative\n */\n @Prop({ mutable: true }) public value?: Value\n\n /**\n * Emitted when the radio button loses focus.\n */\n @Event({ eventName: 'qdsBlur', bubbles: false, cancelable: false })\n private readonly blurEmitter!: EventEmitter<QdsFocusEventDetail>\n\n /**\n * Emitted when the radio button is checked by the user.\n */\n @Event({ eventName: 'qdsChange', cancelable: false })\n private readonly changeEmitter!: EventEmitter<void>\n\n /**\n * Emitted when the radio button 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 tabIndex?: number\n\n #inheritedAttributes: Attributes = {}\n\n #input?: HTMLInputElement\n\n get #computedDisabled(): boolean {\n return this.disabled ?? 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 #hasText(): boolean {\n return this.text !== undefined && this.text !== ''\n }\n\n @Listen('click')\n protected onClick(event: MouseEvent): void {\n if (this.#computedDisabled) {\n event.stopImmediatePropagation()\n return\n }\n\n invariant(this.#input)\n\n this.checked = this.#input.checked\n }\n\n @Watch('tabindex')\n protected tabindexChanged(newValue: string): void {\n const parsedValue = Number.parseInt(newValue, 10)\n this.tabIndex =\n parsedValue === 0 || Number.isNaN(parsedValue) ? undefined : parsedValue\n }\n\n public componentWillLoad(): void {\n this.#inheritedAttributes = inheritAriaAttributes(this.host)\n this.tabindexChanged(this.host.getAttribute('tabindex') ?? '0')\n }\n\n public render() {\n return (\n // eslint-disable-next-line jsx-a11y/label-has-associated-control\n <label\n aria-disabled={this.#computedDisabled ? 'true' : undefined}\n class={{\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.checked}\n class=\"qds-radio\"\n data-size={this.#computedSize}\n disabled={this.disabled}\n form={this.form}\n name={this.name}\n onBlur={this.#onBlur}\n onChange={this.#onChange}\n onFocus={this.#onFocus}\n ref={this.#ref}\n required={this.required}\n tabIndex={this.#computedDisabled ? undefined : this.tabIndex}\n type=\"radio\"\n value={this.value ?? undefined}\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...this.#inheritedAttributes}\n />\n <qds-icon\n aria-hidden=\"true\"\n class=\"qds-icon\"\n data-size={this.#computedSize}\n library=\"core\"\n name=\"checked-radio\"\n />\n </div>\n {this.#hasText && (\n <qds-label\n class=\"qds-label-inner\"\n size={this.#computedSize}\n text={this.text}\n />\n )}\n </label>\n )\n }\n\n readonly #ref = (input?: HTMLInputElement): void => {\n this.#input = input\n }\n\n readonly #onBlur = (event: FocusEvent): void => {\n this.blurEmitter.emit(pickFocusEventAttributes(event))\n }\n\n readonly #onChange = (): void => {\n this.changeEmitter.emit()\n }\n\n readonly #onFocus = (event: FocusEvent): void => {\n this.focusEmitter.emit(pickFocusEventAttributes(event))\n }\n}\n"],"version":3}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"p-DNHI4C-W.js","mappings":";;;;;;;;;;;;AAAA,MAAM,WAAW,GAAG,2zHAA2zH;;ACA/0H;AACA;AACA;;;;;;;;;;;;;;;;;;MAmCa,QAAQ,iBAAAA,kBAAA,CAAA,MAAA,QAAA,SAAAC,CAAA,CAAA;AANrB,IAAA,WAAA,CAAA,YAAA,EAAA;;;;;;;;;;;AAOE;;;;;AAKG;AACqB,QAAA,IAAM,CAAA,MAAA,GAAY,KAAK;AAE/C;;AAEG;AACqB,QAAA,IAAI,CAAA,IAAA,GAAU,UAAU;AAyBhD;;;;;;;;;;;;;;;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,CAAA,YAAA,GAAqC,KAAK;AAE9E;;AAEG;AACqB,QAAA,IAAY,CAAA,YAAA,GAAY,KAAK;AA0BrD,QAAA,6BAAA,CAAA,GAAA,CAAA,IAAA,EAAmC,EAAE,CAAA;AAmK9B,QAAA,IAAa,CAAA,aAAA,GAAsC,MACxD,IAAI,CAAC,SAAS,CA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,IAAI,IAAI,GAAG,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,CAiJa,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}\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 &:has(.qds-checkbox:focus-visible) {\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\n.qds-label-inner {\n flex: 1 1 auto;\n min-width: 0;\n width: 100%;\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[aria-disabled='true'] {\n opacity: var(--qds-theme-disabled);\n pointer-events: none;\n}\n\n[data-size='small'] {\n /* override qds-label font design token */\n --qds-form-small-text: var(--qds-control-small-text);\n\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-small-icon-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-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 /* override qds-label font design token */\n --qds-form-standard-text: var(--qds-control-standard-text);\n\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-standard-icon-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-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 /* override qds-label font design token */\n --qds-form-large-text: var(--qds-control-large-text);\n\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-large-icon-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-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 State,\n Watch,\n} from '@stencil/core'\n\nimport type { Attributes, QdsFocusEventDetail } from '../../helpers'\nimport { inheritAriaAttributes, pickFocusEventAttributes } 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: { delegatesFocus: true },\n styleUrl: 'checkbox.css',\n})\nexport class Checkbox implements ComponentInterface {\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 * Its value will also be used as the `aria-label` value when the\n * `checkbox-only` attribute is specified.\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 /**\n * Whether or not the text is displayed.\n */\n @Prop() public readonly checkboxOnly: boolean = 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 tabIndex?: number\n\n #inheritedAttributes: Attributes = {}\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('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.changeEmitter.emit()\n this.indeterminate = false\n }\n\n @Watch('checked')\n protected checkedChanged(): void {\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.#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('tabindex')\n protected tabindexChanged(newValue: string): void {\n const parsedValue = Number.parseInt(newValue, 10)\n this.tabIndex =\n parsedValue === 0 || Number.isNaN(parsedValue) ? undefined : parsedValue\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.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.#inheritedAttributes = inheritAriaAttributes(this.host)\n this.tabindexChanged(this.host.getAttribute('tabindex') ?? '0')\n }\n\n public render() {\n return (\n // eslint-disable-next-line jsx-a11y/label-has-associated-control\n <label\n aria-disabled={this.#computedDisabled ? 'true' : undefined}\n class={{\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 onBlur={this.#onBlur}\n onFocus={this.#onFocus}\n required={this.required}\n tabIndex={this.#computedDisabled ? undefined : this.tabIndex}\n type=\"checkbox\"\n aria-label={this.checkboxOnly ? this.text : undefined}\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...this.#inheritedAttributes}\n />\n <qds-icon\n aria-hidden=\"true\"\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 aria-hidden=\"true\"\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 <qds-label\n class=\"qds-label-inner\"\n required={this.required}\n size={this.size}\n text={this.text}\n tabindex={-1}\n tooltipTarget={this.host}\n />\n )}\n </label>\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 #onBlur = (event: FocusEvent): void => {\n this.blurEmitter.emit(pickFocusEventAttributes(event))\n }\n\n readonly #onFocus = (event: FocusEvent): void => {\n this.focusEmitter.emit(pickFocusEventAttributes(event))\n }\n\n #defineGetter(p: PropertyKey, get: () => unknown): void {\n Object.defineProperty(this.host, p, { enumerable: true, get })\n }\n}\n"],"version":3}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"p-DR79BVX5.js","mappings":";;;;;;;;;;AAAA,MAAM,MAAM,GAAG,uqHAAuqH;;ACAtrH;AACA;AACA;;;;;;;;;;;;;;;;;;MAsBa,GAAG,iBAAAA,kBAAA,CAAA,MAAA,GAAA,SAAAC,CAAA,CAAA;AALhB,IAAA,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Q,IAAI,CAAC,MAAM;AACjB,QAAA,KAAK,OAAO;AACZ,QAAA,KAAK,MAAM;AACX,QAAA,KAAK,SAAS;QACd,KAAK,SAAS,EAAE;YACd,OAAO,IAAI,CAAC,MAAM;;QAEpB,SAAS;AACP,YAAA,OAAO,SAAS;;;AAGtB,CAAC,EAAA,iBAAA,GAAA,SAAA,iBAAA,GAAA;AAGC,IAAA,OAAO,CAAC,IAAI,CAAC,KAAK,IAAI,KAAK,KAAK,IAAI,CAAC,UAAU,KAAK,YAAY;AAClE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/tag/tag.css?tag=qds-tag&encapsulation=shadow","src/components/tag/tag.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}\n\n.qds-tag {\n align-items: center;\n box-sizing: border-box;\n display: inline-flex;\n justify-content: center;\n max-width: inherit;\n min-width: inherit;\n width: inherit;\n}\n\n.qds-text {\n overflow: hidden;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 5;\n}\n\n.qds-sr-only {\n clip: rect(0 0 0 0);\n height: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n}\n\n.qds-icon {\n flex-shrink: 0;\n}\n\n[data-status='error'] {\n color: var(--qds-theme-feedback-message-critical);\n}\n\n[data-status='success'] {\n color: var(--qds-theme-feedback-message-success);\n}\n\n[data-status='warning'] {\n color: var(--qds-theme-feedback-message-important);\n}\n\n[data-status='info'] {\n color: var(--qds-theme-feedback-message-informational);\n}\n\n[data-status='neutral'] {\n color: var(--qds-theme-feedback-message-neutral);\n}\n\n[data-importance='subdued'] .qds-text {\n color: var(--qds-theme-text-standard);\n}\n\n[data-importance='standard'] {\n &[data-status='error'] {\n background-color: var(--qds-theme-feedback-message-critical-dimmed);\n }\n\n &[data-status='success'] {\n background-color: var(--qds-theme-feedback-message-success-dimmed);\n }\n\n &[data-status='warning'] {\n background-color: var(--qds-theme-feedback-message-important-dimmed);\n }\n\n &[data-status='info'] {\n background-color: var(--qds-theme-feedback-message-informational-dimmed);\n }\n\n &[data-status='neutral'] {\n background-color: var(--qds-theme-feedback-message-neutral-dimmed);\n }\n}\n\n[data-importance='emphasized'] {\n &[data-status='error'] {\n background-color: var(--qds-theme-feedback-message-critical);\n color: var(--qds-theme-feedback-message-critical-contrast);\n }\n\n &[data-status='success'] {\n background-color: var(--qds-theme-feedback-message-success);\n color: var(--qds-theme-feedback-message-success-contrast);\n }\n\n &[data-status='warning'] {\n background-color: var(--qds-theme-feedback-message-important);\n color: var(--qds-theme-feedback-message-important-contrast);\n }\n\n &[data-status='info'] {\n background-color: var(--qds-theme-feedback-message-informational);\n color: var(--qds-theme-feedback-message-informational-contrast);\n }\n\n &[data-status='neutral'] {\n background-color: var(--qds-theme-feedback-message-neutral);\n color: var(--qds-theme-feedback-message-neutral-contrast);\n }\n}\n\n[data-size='small'] {\n &.qds-tag {\n font: var(--qds-feedback-tag-small-text);\n gap: var(--qds-feedback-tag-small-gap-internal);\n min-height: var(--qds-feedback-tag-small-height);\n border-radius: var(--qds-feedback-tag-small-border-radius);\n }\n\n &.qds-padding {\n padding: var(--qds-feedback-tag-small-padding-vertical)\n var(--qds-feedback-tag-small-padding-horizontal);\n }\n\n &.qds-icon {\n width: var(--qds-feedback-tag-small-icon-size);\n height: var(--qds-feedback-tag-small-icon-size);\n }\n}\n\n[data-size='standard'] {\n &.qds-tag {\n font: var(--qds-feedback-tag-standard-text);\n gap: var(--qds-feedback-tag-standard-gap-internal);\n min-height: var(--qds-feedback-tag-standard-height);\n border-radius: var(--qds-feedback-tag-standard-border-radius);\n }\n\n &.qds-padding {\n padding: var(--qds-feedback-tag-large-padding-vertical)\n var(--qds-feedback-tag-standard-padding-horizontal);\n }\n\n &.qds-icon {\n width: var(--qds-feedback-tag-standard-icon-size);\n height: var(--qds-feedback-tag-standard-icon-size);\n }\n}\n\n[data-size='large'] {\n &.qds-tag {\n font: var(--qds-feedback-tag-large-text);\n gap: var(--qds-feedback-tag-large-gap-internal);\n min-height: var(--qds-feedback-tag-large-height);\n border-radius: var(--qds-feedback-tag-large-border-radius);\n }\n\n &.qds-padding {\n padding: var(--qds-feedback-tag-large-padding-vertical)\n var(--qds-feedback-tag-large-padding-horizontal);\n }\n\n &.qds-icon {\n width: var(--qds-feedback-tag-large-icon-size);\n height: var(--qds-feedback-tag-large-icon-size);\n }\n}\n","// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { ComponentInterface } from '@stencil/core'\nimport { Component, Element, Fragment, h, Prop } from '@stencil/core'\n\nimport type { Attributes } from '../../helpers'\nimport { inheritAriaAttributes } from '../../helpers'\nimport type { Importance, Size, Status } from '../shared'\n\nexport type TagStatus = Status | 'neutral'\n\n/**\n * The `<qds-tag>` element is a static descriptor used for items that need to\n * be labeled, categorized, or organized using keywords that describe them.\n *\n * @see https://quartz.se.com/build/components/tag\n */\n@Component({\n tag: 'qds-tag',\n shadow: true,\n styleUrl: 'tag.css',\n})\nexport class Tag implements ComponentInterface {\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 * The tag's importance.\n */\n @Prop() public readonly importance?: Importance = 'standard'\n\n /**\n * The tag's status.\n */\n @Prop() public readonly status?: TagStatus = 'neutral'\n\n /**\n * The tag's size.\n */\n @Prop() public readonly size?: Size = 'standard'\n\n /**\n * The tag's text.\n */\n @Prop() public readonly text?: string\n\n /**\n * Provides a text description of the icon for screen readers.\n */\n @Prop() public readonly iconDescription?: string\n\n /**\n * Displays an indicator if `true`.\n */\n @Prop() public readonly badge?: boolean = false\n\n /**\n * The indicator badge's accessible text that will be used by\n * screen readers.\n */\n @Prop() public readonly badgeDescription?: string\n\n @Element() private readonly host!: HTMLElement\n\n #inheritedAttributes: Attributes = {}\n\n get #computedImportance(): Importance {\n switch (this.importance) {\n case 'subdued':\n case 'emphasized': {\n return this.importance\n }\n default: {\n return 'standard'\n }\n }\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 #computedStatus(): TagStatus {\n switch (this.status) {\n case 'error':\n case 'info':\n case 'success':\n case 'warning': {\n return this.status\n }\n default: {\n return 'neutral'\n }\n }\n }\n\n get #hasBadge(): boolean {\n return (this.badge ?? false) && this.importance !== 'emphasized'\n }\n\n public componentWillLoad(): void {\n this.#inheritedAttributes = inheritAriaAttributes(this.host)\n }\n\n public render() {\n return (\n <span\n class={{\n 'qds-tag': true,\n 'qds-padding': this.importance !== 'subdued',\n }}\n data-importance={this.#computedImportance}\n data-size={this.#computedSize}\n data-status={this.#computedStatus}\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...this.#inheritedAttributes}\n >\n {this.iconName !== undefined && this.iconName !== '' ? (\n <>\n {this.iconDescription !== undefined &&\n this.iconDescription !== '' && (\n <span class=\"qds-sr-only\">{this.iconDescription}</span>\n )}\n <qds-icon\n aria-hidden=\"true\"\n class=\"qds-icon\"\n data-size={this.#computedSize}\n library={this.iconLibrary}\n name={this.iconName}\n />\n </>\n ) : (\n this.#hasBadge && (\n <qds-badge-indicator\n status={this.#computedStatus}\n description={this.badgeDescription}\n size={this.#computedSize}\n strokeRing\n />\n )\n )}\n <span class=\"qds-text\">{this.text}</span>\n </span>\n )\n }\n}\n"],"version":3}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"p-DtxwXYGb.js","mappings":";;;;;;;;AAAA,MAAM,UAAU,GAAG,wZAAwZ;;ACA3a,MAAM,eAAe,GAAG,gXAAgX;;ACAxY,MAAM,QAAQ,G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A,IAAI,CAAC,GAAG,GAAG,EAAE;AACb,gBAAA,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE;;iBACnB;AACL,gBAAA,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,sBAAA,CAAA,IAAI,iCAAqB,CAAC;oBAClE,IAAI,KAAK,KAAK,SAAS;AAAE,wBAAA,UAAU,CAAC,YAAY,CAAC,GAAG,EAAE,KAAK,CAAC;AAC9D,gBAAA,IAAI,CAAC,GAAG,GAAG,UAAU,CAAC,SAAS;AAC/B,gBAAA,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE;;;AAEzB,QAAA,MAAM;AACN,YAAA,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE;;;AAIrB,IAAA,MAAM,iBAAiB,GAAA;AAC5B,QAAA,sBAAA,CAAA,IAAI,6BAAwB,qBAAqB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAA,GAAA,CAAA;AAC5D,QAAA,MAAM,IAAI,CAAC,OAAO,EAAE;;IAGf,MAAM,GAAA;AACX,QAAA,QACE,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAC,eAAe,EAAA,EACxB,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,KAAK,EAAC,kBAAkB,EAAC,SAAS,EAAE,IAAI,CAAC,GAAG,EAAA,CAAI,CAClD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["clear","checked","checkedRadio","draggable","dropdown","externalLink","indeterminate","inputMonth","inputTel","inputWeek","inputUrl","inputTime","inputDate","inputDatetimeLocal","inputEmail","inputSearch","inputPasswordHide","inputPasswordShow","navigation","next","statusError","checkSolid","statusErrorSolid","statusWarningSolid","statusInfoSolid","toggleOff","toggleOn","defaultLibrary","__stencil_proxyCustomElement","HTMLElement"],"sources":["../../node_modules/@quartzds/generic-icons-core/dist/checked.svg","../../node_modules/@quartzds/generic-icons-core/dist/checked-radio.svg","../../node_modules/@quartzds/generic-icons-core/dist/clear.svg","../../node_modules/@quartzds/generic-icons-core/dist/draggable.svg","../../node_modules/@quartzds/generic-icons-core/dist/dropdown.svg","../../node_modules/@quartzds/generic-icons-core/dist/external-link.svg","../../node_modules/@quartzds/generic-icons-core/dist/indeterminate.svg","../../node_modules/@quartzds/generic-icons-core/dist/input-date.svg","../../node_modules/@quartzds/generic-icons-core/dist/input-datetime-local.svg","../../node_modules/@quartzds/generic-icons-core/dist/input-email.svg","../../node_modules/@quartzds/generic-icons-core/dist/input-month.svg","../../node_modules/@quartzds/generic-icons-core/dist/input-password-hide.svg","../../node_modules/@quartzds/generic-icons-core/dist/input-password-show.svg","../../node_modules/@quartzds/generic-icons-core/dist/input-search.svg","../../node_modules/@quartzds/generic-icons-core/dist/input-tel.svg","../../node_modules/@quartzds/generic-icons-core/dist/input-time.svg","../../node_modules/@quartzds/generic-icons-core/dist/input-url.svg","../../node_modules/@quartzds/generic-icons-core/dist/input-week.svg","../../node_modules/@quartzds/generic-icons-core/dist/navigation.svg","../../node_modules/@quartzds/generic-icons-core/dist/next.svg","../../node_modules/@quartzds/generic-icons-core/dist/status-error.svg","../../node_modules/@quartzds/generic-icons-core/dist/status-error-solid.svg","../../node_modules/@quartzds/generic-icons-core/dist/status-info-solid.svg","../../node_modules/@quartzds/generic-icons-core/dist/status-success-solid.svg","../../node_modules/@quartzds/generic-icons-core/dist/status-warning-solid.svg","../../node_modules/@quartzds/generic-icons-core/dist/toggle-off.svg","../../node_modules/@quartzds/generic-icons-core/dist/toggle-on.svg","src/components/icon/core-library.ts","src/components/icon/default-library.ts","src/components/icon/library.ts","src/components/icon/request.ts","src/components/icon/icon.css?tag=qds-icon&encapsulation=shadow","src/components/icon/icon.tsx"],"sourcesContent":["<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"square\" stroke-miterlimit=\"16\" d=\"m12.111 3.5-5.918 9L3.89 9.024\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path fill=\"currentColor\" d=\"M8 3C5.243 3 3 5.243 3 8s2.243 5 5 5 5-2.243 5-5-2.243-5-5-5Z\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"square\" stroke-miterlimit=\"16\" d=\"M10.827 10.846 5.17 5.189m5.665-.027-5.657 5.657M8 .5a7.5 7.5 0 1 0 0 15 7.5 7.5 0 0 0 0-15Z\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 18 20\"><path fill=\"currentColor\" d=\"M4.96 0a2.148 2.148 0 1 1 0 4.297 2.148 2.148 0 0 1 0-4.296ZM2.812 17.852a2.149 2.149 0 1 0 4.298 0 2.149 2.149 0 0 0-4.298 0Zm0-7.851a2.149 2.149 0 1 0 4.298 0 2.149 2.149 0 0 0-4.298 0Zm10.079-7.852a2.149 2.149 0 1 0 4.297 0 2.149 2.149 0 0 0-4.297 0Zm0 15.703a2.149 2.149 0 1 0 4.297 0 2.149 2.149 0 0 0-4.297 0Zm0-7.851a2.149 2.149 0 1 0 4.297 0 2.149 2.149 0 0 0-4.297 0Z\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 17 16\"><path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"square\" stroke-miterlimit=\"16\" d=\"M15.707 4.443c-1.45 1.45-7.5 7.113-7.5 7.113s-6.05-5.663-7.5-7.113\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"square\" stroke-miterlimit=\"16\" d=\"M10.5.5h5m0 0v5m0-5L9.696 6.305M8.5 3.5h-8v12h12v-8\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"square\" stroke-miterlimit=\"16\" d=\"M3.5 8h9\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path fill=\"currentColor\" d=\"M7.06 11.294q.285.38.284.939 0 .774-.568 1.232-.57.457-1.537.459-.552 0-1.062-.171a2.6 2.6 0 0 1-.866-.475.517.517 0 0 1-.089-.717.31.31 0 0 1 .251-.132q.084 0 .153.029t.187.098q.357.237.68.365c.225.087.464.13.705.127q.56 0 .833-.225t.272-.684q0-.45-.285-.667c-.285-.217-.483-.217-.879-.217h-.484a.37.37 0 0 1-.302-.132.47.47 0 0 1-.106-.301q0-.178.106-.306a.37.37 0 0 1 .302-.127h.339q1.164 0 1.164-.874 0-.41-.246-.628-.245-.22-.68-.221-.62 0-1.325.492a2 2 0 0 1-.187.098.4.4 0 0 1-.153.029.31.31 0 0 1-.251-.132.5.5 0 0 1-.106-.318.46.46 0 0 1 .047-.217c.047-.089.081-.12.149-.183q.357-.297.854-.471c.497-.174.669-.175 1.015-.175q.883 0 1.406.434.522.433.523 1.155c0 .307-.09.607-.259.862a1.43 1.43 0 0 1-.701.539q.534.136.82.514zm5.751 2.128q0 .45-.509.45H9.431q-.518 0-.518-.45 0-.434.518-.434h.883V9.115l-.815.501a.45.45 0 0 1-.213.068.37.37 0 0 1-.301-.153.53.53 0 0 1-.123-.34q0-.246.221-.382l1.317-.816a.96.96 0 0 1 .484-.153q.237 0 .382.145a.54.54 0 0 1 .144.399v4.603h.892q.51 0 .509.434z\"/><path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"square\" stroke-miterlimit=\"16\" d=\"M15.5 6.5H.5m6-4h5m-5 0v-.78C6.5 1.224 6.278.5 5.463.5h.021c-.755 0-.983.724-.983 1.22v1.324c0 .786.074 1.456 1.066 1.456h-.066m.999-2h-4l-.247.002A1.764 1.764 0 0 0 .5 4.267v9.469c0 .975.79 1.765 1.765 1.765h11.471c.975 0 1.765-.79 1.765-1.765V4.263c0-.973-.789-1.763-1.763-1.763h-1.237m.999 0h-2m0 0v-.78c0-.496-.222-1.22-1.037-1.22h.021c-.755 0-.983.724-.983 1.22v1.324c0 .786.074 1.456 1.066 1.456h-.066\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path fill=\"currentColor\" d=\"M7.06 11.294q.285.38.284.939 0 .774-.568 1.232-.57.457-1.537.459-.552 0-1.062-.171a2.6 2.6 0 0 1-.866-.475.517.517 0 0 1-.089-.717.31.31 0 0 1 .251-.132q.084 0 .153.029t.187.098q.357.237.68.365c.225.087.464.13.705.127q.56 0 .833-.225t.272-.684q0-.45-.285-.667c-.285-.217-.483-.217-.879-.217h-.484a.37.37 0 0 1-.302-.132.47.47 0 0 1-.106-.301q0-.178.106-.306a.37.37 0 0 1 .302-.127h.339q1.164 0 1.164-.874 0-.41-.246-.628-.245-.22-.68-.221-.62 0-1.325.492a2 2 0 0 1-.187.098.4.4 0 0 1-.153.029.31.31 0 0 1-.251-.132.5.5 0 0 1-.106-.318.46.46 0 0 1 .047-.217c.047-.089.081-.12.149-.183q.357-.297.854-.471c.497-.174.669-.175 1.015-.175q.883 0 1.406.434.522.433.523 1.155c0 .307-.09.607-.259.862a1.43 1.43 0 0 1-.701.539q.534.136.82.514zm5.751 2.128q0 .45-.509.45H9.431q-.518 0-.518-.45 0-.434.518-.434h.883V9.115l-.815.501a.45.45 0 0 1-.213.068.37.37 0 0 1-.301-.153.53.53 0 0 1-.123-.34q0-.246.221-.382l1.317-.816a.96.96 0 0 1 .484-.153q.237 0 .382.145a.54.54 0 0 1 .144.399v4.603h.892q.51 0 .509.434z\"/><path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"square\" stroke-miterlimit=\"16\" d=\"M15.5 6.5H.5m6-4h5m-5 0v-.78C6.5 1.224 6.278.5 5.463.5h.021c-.755 0-.983.724-.983 1.22v1.324c0 .786.074 1.456 1.066 1.456h-.066m.999-2h-4l-.247.002A1.764 1.764 0 0 0 .5 4.267v9.469c0 .975.79 1.765 1.765 1.765h11.471c.975 0 1.765-.79 1.765-1.765V4.263c0-.973-.789-1.763-1.763-1.763h-1.237m.999 0h-2m0 0v-.78c0-.496-.222-1.22-1.037-1.22h.021c-.755 0-.983.724-.983 1.22v1.324c0 .786.074 1.456 1.066 1.456h-.066\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"square\" stroke-miterlimit=\"16\" d=\"M15.369 3.137 7.99 8.5.734 2.734m14.635.403a1.2 1.2 0 0 0-1.06-.637H1.3a.8.8 0 0 0-.566.234m14.635.403L15.5 5.5v7.2a.8.8 0 0 1-.8.8H1.3a.8.8 0 0 1-.8-.8V3.3a.8.8 0 0 1 .234-.566\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"square\" stroke-miterlimit=\"16\" d=\"M15.5 6.5H.5m6-4h5m-5 0v-.78C6.5 1.224 6.278.5 5.463.5h.021c-.755 0-.983.724-.983 1.22v1.324c0 .786.074 1.456 1.066 1.456h-.066m.999-2h-4l-.247.002A1.764 1.764 0 0 0 .5 4.267v9.469c0 .975.79 1.765 1.765 1.765h11.471c.975 0 1.765-.79 1.765-1.765V4.263c0-.973-.789-1.763-1.763-1.763h-1.237m.999 0h-2m0 0v-.78c0-.496-.222-1.22-1.037-1.22h.021c-.755 0-.983.724-.983 1.22v1.324c0 .786.074 1.456 1.066 1.456h-.066\"/><path fill=\"currentColor\" d=\"M3 10a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm3 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm3 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm3 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm-9 4a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm3 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm3 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm3 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 17 17\"><path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"square\" stroke-miterlimit=\"16\" d=\"m.707.707 15 15m0-6.646c-.365-.704-4.303-5.67-8.088-5.387C4.207 3.93 2.288 6.071.707 9.06c0 0 2.828 4.85 9.126 3.416 2.661-.606 3.477-2.397 5.874-3.415Z\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 17 16\"><path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"square\" stroke-miterlimit=\"16\" d=\"M15.572 8.854c-.365-.704-4.304-5.67-8.088-5.387C4.07 3.722 2.153 5.864.572 8.853c0 0 2.828 4.85 9.126 3.416 2.66-.606 3.477-2.397 5.874-3.415Z\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 17 17\"><path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"square\" stroke-miterlimit=\"16\" d=\"m15.506 15.5-4.254-4.292m0 0a6.284 6.284 0 1 0-1.763 1.253c.755-.412 1.143-.684 1.763-1.253ZM6.565 2.849c-.99 0-1.923.386-2.624 1.087a3.68 3.68 0 0 0-1.047 2.102c-.047.34-.047.685-.003 1.024\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"square\" stroke-miterlimit=\"16\" d=\"M12.5 13.933c0 .866-.702 1.567-1.567 1.567H5.068a1.567 1.567 0 0 1-1.567-1.567V2.062C3.501 1.199 4.2.5 5.063.5h5.876c.863 0 1.562.699 1.562 1.562z\"/><path fill=\"currentColor\" d=\"M8.5 2.5h-2Zm0 11h-1Z\"/><path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"square\" stroke-miterlimit=\"16\" d=\"M8.5 2.5h-2m2 11h-1\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"square\" stroke-miterlimit=\"16\" d=\"M3.955 4.743 2.84 3.627m10.33-.025-1.611-1.608a2.29 2.29 0 0 1 3.94 1.582 2.3 2.3 0 0 1-.67 1.617l-.033.033-1.634-1.6-1.248 1.205m-7.296 8.362-1.374 1.769M8.262 1.2l-.217 1.607M8.262 1.2l1.037.183M8.262 1.2l-.918-.161m4.542 6.321L8.5 8.781v2.718m3.414-6.668a5.43 5.43 0 0 0-3.806-1.548A5.445 5.445 0 0 0 2.66 8.726a5.446 5.446 0 0 0 5.448 5.444 5.446 5.446 0 0 0 5.448-5.444c-.037-1.825-.357-2.65-1.642-3.895Zm-.32 8.362 1.374 1.769M4.437 1.994l-.032-.034A2.29 2.29 0 0 0 .5 3.576a2.28 2.28 0 0 0 .67 1.617l.034.033 1.609-1.609z\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"square\" stroke-miterlimit=\"16\" d=\"M7.95.5v14.987m0-14.988S3.64 4.525 3.64 8.96c0 3.294 4.308 6.528 4.308 6.528M7.948.5s4.338 4.027 4.338 8.46c0 3.295-4.338 6.528-4.338 6.528m0 0a7.5 7.5 0 0 1-5.117-2.075C1.452 12.094.602 10.205.5 8.3m7.45 7.187a7.494 7.494 0 0 0 7.534-6.975M.5 8.3C.5 5 2.08 3.027 3.63 1.912a7.494 7.494 0 0 1 11.854 6.6M.5 8.3c7.893 2.542 14.357.43 14.984.212\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"square\" stroke-miterlimit=\"16\" d=\"M15.5 6.5H.5m6-4h5m-5 0v-.78C6.5 1.224 6.278.5 5.463.5h.021c-.755 0-.983.724-.983 1.22v1.324c0 .786.074 1.456 1.066 1.456h-.066m.999-2h-4l-.247.002A1.764 1.764 0 0 0 .5 4.267v9.469c0 .975.79 1.765 1.765 1.765h11.471c.975 0 1.765-.79 1.765-1.765V4.263c0-.973-.789-1.763-1.763-1.763h-1.237m.999 0h-2m0 0v-.78c0-.496-.222-1.22-1.037-1.22h.021c-.755 0-.983.724-.983 1.22v1.324c0 .786.074 1.456 1.066 1.456h-.066\"/><path fill=\"currentColor\" d=\"M3 12a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm3 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm3 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm3 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"square\" stroke-miterlimit=\"16\" d=\"M4.443.5C5.893 1.95 11.556 8 11.556 8s-5.663 6.05-7.113 7.5\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"square\" stroke-miterlimit=\"16\" d=\"M4.443.5C5.893 1.95 11.556 8 11.556 8s-5.663 6.05-7.113 7.5\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"square\" stroke-miterlimit=\"16\" d=\"M10.827 10.846 5.17 5.189m5.665-.027-5.657 5.657M8 .5a7.5 7.5 0 1 0 0 15 7.5 7.5 0 0 0 0-15Z\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path fill=\"currentColor\" d=\"M8 0a8 8 0 1 0 0 16A8 8 0 0 0 8 0Zm3.181 10.492a.5.5 0 1 1-.708.707L7.989 8.715l-2.457 2.458a.5.5 0 1 1-.708-.707l2.457-2.458-2.465-2.465a.5.5 0 0 1 .707-.707l2.465 2.465 2.492-2.493a.5.5 0 0 1 .707.707L8.695 8.007l2.484 2.484z\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path fill=\"currentColor\" d=\"M8 0C3.589 0 0 3.589 0 8s3.589 8 8 8 8-3.589 8-8-3.589-8-8-8Zm.923 12.064q0 .44-.221.689-.22.248-.648.248-.414 0-.634-.248-.22-.25-.221-.689V7.003q0-.456.221-.696.22-.242.634-.242c.414 0 .49.081.641.242q.228.242.228.696zm-.11-7.522q-.262.24-.758.241-.483 0-.751-.241-.27-.242-.269-.668 0-.441.269-.676c.269-.235.43-.234.751-.234q.495 0 .758.234c.262.234.263.382.263.676q0 .428-.263.668Z\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path fill=\"currentColor\" d=\"M8 0a8 8 0 1 0 0 16A8 8 0 0 0 8 0Zm3.341 5.1-4.208 6.399a.5.5 0 0 1-.882-.089c-.312-.778-.953-1.979-1.403-2.213a.5.5 0 1 1 .459-.888c.602.311 1.141 1.193 1.489 1.883l3.709-5.642a.5.5 0 1 1 .836.55Z\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path fill=\"currentColor\" d=\"M8 0a8 8 0 1 0 0 16A8 8 0 0 0 8 0Zm-.724 3.142q.273-.323.803-.323.515 0 .782.323.264.323.222.853l-.43 5.479q-.014.315-.165.487a.52.52 0 0 1-.409.172.53.53 0 0 1-.423-.172q-.15-.172-.179-.487l-.43-5.479q-.045-.53.229-.853Zm1.585 9.672q-.28.3-.782.301-.487 0-.781-.301-.294-.302-.294-.774 0-.459.294-.753.294-.293.781-.294.501 0 .782.294.28.294.28.753 0 .473-.28.774Z\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"square\" stroke-miterlimit=\"16\" d=\"M8 3.5a4.5 4.5 0 1 1 0 9 4.5 4.5 0 0 1 0-9Z\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"square\" stroke-miterlimit=\"16\" d=\"M8 3.5v9\"/></svg>","// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\nimport checked from '@quartzds/generic-icons-core/checked.svg'\nimport checkedRadio from '@quartzds/generic-icons-core/checked-radio.svg'\nimport clear from '@quartzds/generic-icons-core/clear.svg'\nimport draggable from '@quartzds/generic-icons-core/draggable.svg'\nimport dropdown from '@quartzds/generic-icons-core/dropdown.svg'\nimport externalLink from '@quartzds/generic-icons-core/external-link.svg'\nimport indeterminate from '@quartzds/generic-icons-core/indeterminate.svg'\nimport inputDate from '@quartzds/generic-icons-core/input-date.svg'\nimport inputDatetimeLocal from '@quartzds/generic-icons-core/input-datetime-local.svg'\nimport inputEmail from '@quartzds/generic-icons-core/input-email.svg'\nimport inputMonth from '@quartzds/generic-icons-core/input-month.svg'\nimport inputPasswordHide from '@quartzds/generic-icons-core/input-password-hide.svg'\nimport inputPasswordShow from '@quartzds/generic-icons-core/input-password-show.svg'\nimport inputSearch from '@quartzds/generic-icons-core/input-search.svg'\nimport inputTel from '@quartzds/generic-icons-core/input-tel.svg'\nimport inputTime from '@quartzds/generic-icons-core/input-time.svg'\nimport inputUrl from '@quartzds/generic-icons-core/input-url.svg'\nimport inputWeek from '@quartzds/generic-icons-core/input-week.svg'\nimport navigation from '@quartzds/generic-icons-core/navigation.svg'\nimport next from '@quartzds/generic-icons-core/next.svg'\nimport statusError from '@quartzds/generic-icons-core/status-error.svg'\nimport statusErrorSolid from '@quartzds/generic-icons-core/status-error-solid.svg'\nimport statusInfoSolid from '@quartzds/generic-icons-core/status-info-solid.svg'\nimport checkSolid from '@quartzds/generic-icons-core/status-success-solid.svg'\nimport statusWarningSolid from '@quartzds/generic-icons-core/status-warning-solid.svg'\nimport toggleOff from '@quartzds/generic-icons-core/toggle-off.svg'\nimport toggleOn from '@quartzds/generic-icons-core/toggle-on.svg'\n\nimport type { IconLibrary } from './library'\n\nconst icons: Record<string, string | undefined> = {\n /* eslint-disable @typescript-eslint/naming-convention */\n clear,\n checked,\n 'checked-radio': checkedRadio,\n draggable,\n dropdown,\n 'external-link': externalLink,\n 'external-new-tab-link': externalLink,\n indeterminate,\n 'input-month': inputMonth,\n 'input-tel': inputTel,\n 'input-week': inputWeek,\n 'input-url': inputUrl,\n 'input-time': inputTime,\n 'input-date': inputDate,\n 'input-datetime-local': inputDatetimeLocal,\n 'input-email': inputEmail,\n 'input-search': inputSearch,\n 'input-password-hide': inputPasswordHide,\n 'input-password-show': inputPasswordShow,\n navigation,\n next,\n close: statusError,\n 'status-success-solid': checkSolid,\n 'status-error-solid': statusErrorSolid,\n 'status-warning-solid': statusWarningSolid,\n 'status-info-solid': statusInfoSolid,\n 'toggle-off': toggleOff,\n 'toggle-on': toggleOn,\n /* eslint-enable @typescript-eslint/naming-convention */\n}\n\nconst coreLibrary: IconLibrary = {\n name: 'core',\n resolver: (name) => icons[name] ?? '',\n}\n\nexport default coreLibrary\n","// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\nimport { getAssetPath } from '@stencil/core'\n\nimport type { IconLibrary } from './library'\n\nconst library: IconLibrary = {\n name: 'default',\n resolver: (name) => getAssetPath(`/icons/${name}.svg`),\n}\n\nexport default library\n","// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { Except } from 'type-fest'\n\nimport coreLibrary from './core-library'\nimport defaultLibrary from './default-library'\n\nexport type IconLibraryResolver = (name: string) => string\nexport interface IconLibrary {\n name: string\n resolver: IconLibraryResolver\n}\n\nlet registry: IconLibrary[] = [defaultLibrary, coreLibrary]\n\n/**\n * Returns a library from the registry.\n */\nexport const getIconLibrary = (name: string): IconLibrary | undefined =>\n registry.find((library) => library.name === name)\n\n/**\n * Removes an icon library from the registry.\n */\nexport const unregisterIconLibrary = (name: string): void => {\n registry = registry.filter((library) => library.name !== name)\n}\n\n/**\n * Adds an icon library to the registry or overrides an existing one.\n */\nexport const registerIconLibrary = (\n name: string,\n options: Except<IconLibrary, 'name'>,\n): void => {\n unregisterIconLibrary(name)\n registry.push({\n name,\n ...options,\n })\n}\n","// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\ninterface IconResponse {\n ok: boolean\n status: number\n data: string\n}\n\nconst cachedIconRequests = new Map<\n string,\n IconResponse | Promise<IconResponse>\n>()\n\nconst requestIcon = (url: string): Promise<IconResponse> => {\n const cachedIconRequest = cachedIconRequests.get(url)\n if (cachedIconRequest) return Promise.resolve(cachedIconRequest)\n\n const iconPromise = fetch(url, { mode: 'cors' }).then(async (response) => {\n const iconResponse: IconResponse = {\n ok: response.ok,\n status: response.status,\n data: await response.text(),\n }\n if (response.ok) {\n const div = document.createElement('div')\n div.innerHTML = iconResponse.data\n const child = div.firstElementChild\n iconResponse.data =\n child?.tagName.toLowerCase() === 'svg' ? child.outerHTML : ''\n }\n\n cachedIconRequests.set(url, iconResponse)\n return iconResponse\n })\n cachedIconRequests.set(url, iconPromise)\n return iconPromise\n}\n\nexport default requestIcon\n","/*\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 height: 1em;\n width: 1em;\n}\n\n.qds-container {\n position: relative;\n}\n\n.qds-icon-wrapper {\n display: contents;\n}\n\nsvg {\n display: block;\n fill: currentcolor;\n height: 100%;\n width: 100%;\n}\n","// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { ComponentInterface, EventEmitter } from '@stencil/core'\nimport { Component, Element, Event, h, Prop, State, Watch } from '@stencil/core'\n\nimport type { Attributes } from '../../helpers'\nimport { inheritAriaAttributes } from '../../helpers'\nimport { getIconLibrary } from './library'\nimport requestIcon from './request'\n\nlet parser: DOMParser | undefined\n\n/**\n * @experimental\n */\n@Component({\n tag: 'qds-icon',\n shadow: true,\n styleUrl: 'icon.css',\n})\nexport class Icon implements ComponentInterface {\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 name!: string\n\n /**\n * The name of a registered icon library.\n */\n @Prop() public readonly library: string = 'default'\n\n /**\n * Emitted when the icon has loaded.\n */\n @Event({ eventName: 'qdsLoad', cancelable: false })\n private readonly loadEmitter!: EventEmitter<void>\n\n /**\n * Emitted when the icon fails to load due to an error.\n */\n @Event({ eventName: 'qdsError', cancelable: false })\n private readonly errorEmitter!: EventEmitter<void>\n\n @Element() private readonly host!: HTMLElement\n\n @State() private svg = ''\n\n #inheritedAttributes: Attributes = {}\n\n @Watch('name')\n @Watch('library')\n private async setIcon(): Promise<void> {\n if (!this.name) return\n\n const library = getIconLibrary(this.library)\n if (!library) return\n\n const url = library.resolver(this.name)\n if (!url) {\n this.svg = ''\n return\n }\n\n try {\n const request = await requestIcon(url)\n if (!request.ok) {\n this.svg = ''\n this.errorEmitter.emit()\n return\n }\n\n // Create an instance of the DOM parser. We do it here instead of at the\n // top-level to support SSR while maintaining a single parser instance\n // for optimal performance.\n parser ||= new DOMParser()\n const document = parser.parseFromString(request.data, 'text/html')\n const svgElement = document.body.querySelector('svg')\n if (svgElement === null) {\n this.svg = ''\n this.errorEmitter.emit()\n } else {\n for (const [key, value] of Object.entries(this.#inheritedAttributes))\n if (value !== undefined) svgElement.setAttribute(key, value)\n this.svg = svgElement.outerHTML\n this.loadEmitter.emit()\n }\n } catch {\n this.errorEmitter.emit()\n }\n }\n\n public async componentWillLoad(): Promise<void> {\n this.#inheritedAttributes = inheritAriaAttributes(this.host)\n await this.setIcon()\n }\n\n public render() {\n return (\n <div class=\"qds-container\">\n <span class=\"qds-icon-wrapper\" innerHTML={this.svg} />\n </div>\n )\n }\n}\n"],"version":3}
|
package/components/p-laE-pGH7.js
DELETED
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* SPDX-FileCopyrightText: © 2026 Schneider Electric
|
|
3
|
-
*
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import { p as proxyCustomElement, H, d as readTask, h } from './p-D2489VzR.js';
|
|
7
|
-
import { a as isEllipsisActive } from './p-CURs27Ur.js';
|
|
8
|
-
import { d as defineCustomElement$1 } from './p-D82sb4oJ.js';
|
|
9
|
-
|
|
10
|
-
const labelCss = ":host([hidden]){display:none!important}:host{display:inline-block}.qds-label{align-items:center;box-sizing:border-box;color:var(--qds-theme-control-text-standard);display:inline-flex;gap:var(--qds-text-icon-gap);width:100%}.qds-label:focus-visible{border-radius:var(--qds-focus-border-radius);outline:var(--qds-focus-border-width) solid var(--qds-theme-focus-border);outline-offset:var(--qds-focus-border-offset)}.qds-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.qds-required{color:var(--qds-theme-feedback-field-required);-webkit-user-select:none;user-select:none}[data-size=small][data-importance=standard]{font:var(--qds-form-small-text)}[data-size=small][data-importance=emphasized] .qds-text{font:var(--qds-form-small-text-emphasized)}.qds-inline[data-size=small]{min-height:var(--qds-control-small-height)}.qds-icon[data-size=small]{height:var(--qds-form-small-icon-size);min-width:var(--qds-form-small-icon-size);width:var(--qds-form-small-icon-size)}[data-size=standard][data-importance=standard]{font:var(--qds-form-standard-text)}[data-size=standard][data-importance=emphasized] .qds-text{font:var(--qds-form-standard-text-emphasized)}.qds-inline[data-size=standard]{min-height:var(--qds-control-standard-height)}.qds-icon[data-size=standard]{height:var(--qds-form-standard-icon-size);min-width:var(--qds-form-standard-icon-size);width:var(--qds-form-standard-icon-size)}[data-size=large][data-importance=standard]{font:var(--qds-form-large-text)}[data-size=large][data-importance=emphasized] .qds-text{font:var(--qds-form-large-text-emphasized)}.qds-inline[data-size=large]{min-height:var(--qds-control-large-height)}.qds-icon[data-size=large]{height:var(--qds-form-large-icon-size);min-width:var(--qds-form-large-icon-size);width:var(--qds-form-large-icon-size)}";
|
|
11
|
-
|
|
12
|
-
// SPDX-FileCopyrightText: © 2024 Schneider Electric
|
|
13
|
-
//
|
|
14
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
15
|
-
var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
16
|
-
if (kind === "a" && !f)
|
|
17
|
-
throw new TypeError("Private accessor was defined without a getter");
|
|
18
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
19
|
-
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
20
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
21
|
-
};
|
|
22
|
-
var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
23
|
-
if (kind === "m")
|
|
24
|
-
throw new TypeError("Private method is not writable");
|
|
25
|
-
if (kind === "a" && !f)
|
|
26
|
-
throw new TypeError("Private accessor was defined without a setter");
|
|
27
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
28
|
-
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
29
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
30
|
-
};
|
|
31
|
-
var _Label_instances, _Label_label, _Label_ro, _Label_span, _Label_computedSize_get, _Label_computedImportance_get, _Label_labelRef, _Label_spanRef, _Label_tooltipRef;
|
|
32
|
-
const Label = /*@__PURE__*/ proxyCustomElement(class Label extends H {
|
|
33
|
-
constructor(registerHost) {
|
|
34
|
-
super();
|
|
35
|
-
if (registerHost !== false) {
|
|
36
|
-
this.__registerHost();
|
|
37
|
-
}
|
|
38
|
-
this.__attachShadow();
|
|
39
|
-
_Label_instances.add(this);
|
|
40
|
-
/**
|
|
41
|
-
* Adds vertical margin to the label for alignment.
|
|
42
|
-
*
|
|
43
|
-
* This is useful when creating inline layouts so that the first lines have
|
|
44
|
-
* the correct vertical centering.
|
|
45
|
-
*/
|
|
46
|
-
this.inline = false;
|
|
47
|
-
/**
|
|
48
|
-
* Specify the labelled item as required by appending a red asterisk (*).
|
|
49
|
-
*/
|
|
50
|
-
this.required = false;
|
|
51
|
-
/**
|
|
52
|
-
* The label's size.
|
|
53
|
-
*/
|
|
54
|
-
this.size = 'standard';
|
|
55
|
-
/**
|
|
56
|
-
* The label's importance.
|
|
57
|
-
*/
|
|
58
|
-
this.importance = 'standard';
|
|
59
|
-
this.tooltip = false;
|
|
60
|
-
_Label_label.set(this, void 0);
|
|
61
|
-
_Label_ro.set(this, void 0);
|
|
62
|
-
_Label_span.set(this, void 0);
|
|
63
|
-
_Label_labelRef.set(this, (label) => {
|
|
64
|
-
__classPrivateFieldSet(this, _Label_label, label, "f");
|
|
65
|
-
});
|
|
66
|
-
_Label_spanRef.set(this, (span) => {
|
|
67
|
-
__classPrivateFieldSet(this, _Label_span, span, "f");
|
|
68
|
-
});
|
|
69
|
-
_Label_tooltipRef.set(this, (tooltip) => {
|
|
70
|
-
if (tooltip)
|
|
71
|
-
// eslint-disable-next-line no-param-reassign
|
|
72
|
-
tooltip.target = this.tooltipTarget ?? __classPrivateFieldGet(this, _Label_label, "f");
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
textChanged() {
|
|
76
|
-
if (__classPrivateFieldGet(this, _Label_ro, "f"))
|
|
77
|
-
__classPrivateFieldGet(this, _Label_ro, "f").disconnect();
|
|
78
|
-
if (!__classPrivateFieldGet(this, _Label_span, "f"))
|
|
79
|
-
return;
|
|
80
|
-
const span = __classPrivateFieldGet(this, _Label_span, "f");
|
|
81
|
-
readTask(() => {
|
|
82
|
-
this.tooltip = isEllipsisActive(span);
|
|
83
|
-
});
|
|
84
|
-
__classPrivateFieldSet(this, _Label_ro, new ResizeObserver(([spanEntry]) => {
|
|
85
|
-
this.tooltip = isEllipsisActive(spanEntry.target);
|
|
86
|
-
}), "f");
|
|
87
|
-
__classPrivateFieldGet(this, _Label_ro, "f").observe(__classPrivateFieldGet(this, _Label_span, "f"));
|
|
88
|
-
}
|
|
89
|
-
componentDidLoad() {
|
|
90
|
-
this.textChanged();
|
|
91
|
-
}
|
|
92
|
-
disconnectedCallback() {
|
|
93
|
-
if (__classPrivateFieldGet(this, _Label_ro, "f"))
|
|
94
|
-
__classPrivateFieldGet(this, _Label_ro, "f").disconnect();
|
|
95
|
-
}
|
|
96
|
-
render() {
|
|
97
|
-
return (h("span", { key: '9a45ac712eed524ea4d87837685f6eeb181be38c', class: {
|
|
98
|
-
'qds-inline': this.inline,
|
|
99
|
-
'qds-label': true,
|
|
100
|
-
}, "data-size": __classPrivateFieldGet(this, _Label_instances, "a", _Label_computedSize_get), "data-importance": __classPrivateFieldGet(this, _Label_instances, "a", _Label_computedImportance_get), ref: __classPrivateFieldGet(this, _Label_labelRef, "f"),
|
|
101
|
-
// eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex
|
|
102
|
-
tabIndex: this.tooltip ? 0 : undefined }, this.required && h("span", { key: '30fc4189432271cca78ccc4516d495244bf3a0fb', class: "qds-required" }, "*"), h("span", { key: '0d7f97d2cf2b149d4941aff613e77799a494a86c', class: "qds-text", ref: __classPrivateFieldGet(this, _Label_spanRef, "f") }, this.text), this.tooltip && (h("qds-tooltip", { key: '7cd2b48f3afa11c57fabeb9083cf55051c8170db', "aria-hidden": "true", ref: __classPrivateFieldGet(this, _Label_tooltipRef, "f") }, this.text))));
|
|
103
|
-
}
|
|
104
|
-
static get watchers() { return {
|
|
105
|
-
"text": ["textChanged"]
|
|
106
|
-
}; }
|
|
107
|
-
static get style() { return labelCss; }
|
|
108
|
-
}, [257, "qds-label", {
|
|
109
|
-
"inline": [4],
|
|
110
|
-
"required": [4],
|
|
111
|
-
"size": [1],
|
|
112
|
-
"importance": [1],
|
|
113
|
-
"text": [1],
|
|
114
|
-
"tooltipTarget": [1, "tooltip-target"],
|
|
115
|
-
"tooltip": [32]
|
|
116
|
-
}, undefined, {
|
|
117
|
-
"text": ["textChanged"]
|
|
118
|
-
}]);
|
|
119
|
-
_Label_label = new WeakMap(), _Label_ro = new WeakMap(), _Label_span = new WeakMap(), _Label_labelRef = new WeakMap(), _Label_spanRef = new WeakMap(), _Label_tooltipRef = new WeakMap(), _Label_instances = new WeakSet(), _Label_computedSize_get = function _Label_computedSize_get() {
|
|
120
|
-
switch (this.size) {
|
|
121
|
-
case 'standard':
|
|
122
|
-
case 'small':
|
|
123
|
-
case 'large': {
|
|
124
|
-
return this.size;
|
|
125
|
-
}
|
|
126
|
-
default: {
|
|
127
|
-
return 'standard';
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
}, _Label_computedImportance_get = function _Label_computedImportance_get() {
|
|
131
|
-
switch (this.importance) {
|
|
132
|
-
case 'emphasized':
|
|
133
|
-
case 'standard': {
|
|
134
|
-
return this.importance;
|
|
135
|
-
}
|
|
136
|
-
default: {
|
|
137
|
-
return 'standard';
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
};
|
|
141
|
-
function defineCustomElement() {
|
|
142
|
-
if (typeof customElements === "undefined") {
|
|
143
|
-
return;
|
|
144
|
-
}
|
|
145
|
-
const components = ["qds-label", "qds-tooltip"];
|
|
146
|
-
components.forEach(tagName => { switch (tagName) {
|
|
147
|
-
case "qds-label":
|
|
148
|
-
if (!customElements.get(tagName)) {
|
|
149
|
-
customElements.define(tagName, Label);
|
|
150
|
-
}
|
|
151
|
-
break;
|
|
152
|
-
case "qds-tooltip":
|
|
153
|
-
if (!customElements.get(tagName)) {
|
|
154
|
-
defineCustomElement$1();
|
|
155
|
-
}
|
|
156
|
-
break;
|
|
157
|
-
} });
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
export { Label as L, defineCustomElement as d };
|
|
161
|
-
//# sourceMappingURL=p-laE-pGH7.js.map
|
|
162
|
-
|
|
163
|
-
//# sourceMappingURL=p-laE-pGH7.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"p-laE-pGH7.js","mappings":";;;;;;;;;AAAA,MAAM,QAAQ,GAAG,mwDAAmwD;;ACApxD;AACA;AACA;;;;;;;;;;;;;;;;;;MAqBa,KAAK,iBAAAA,kBAAA,CAAA,MAAA,KAAA,SAAAC,CAAA,CAAA;AALlB,IAAA,WAAA,CAAA,YAAA,EAAA;;;;;;;AAME;;;;;AAKG;AACqB,QAAA,IAAM,CAAA,MAAA,GAAY,KAAK;AAE/C;;AAEG;AACqB,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AAEjD;;AAEG;AACqB,QAAA,IAAI,CAAA,IAAA,GAAU,UAAU;AAEhD;;AAEG;AACqB,QAAA,IAAU,CAAA,UAAA,GAAqB,UAAU;AAahD,QAAA,IAAO,CAAA,OAAA,GAAG,KAAK;QAEhC,YAAwB,CAAA,GAAA,CAAA,IAAA,EAAA,MAAA,CAAA;Q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AA,QAAQ,IAAI,CAAC,IAAI;AACf,QAAA,KAAK,UAAU;AACf,QAAA,KAAK,OAAO;QACZ,KAAK,OAAO,EAAE;YACZ,OAAO,IAAI,CAAC,IAAI;;QAElB,SAAS;AACP,YAAA,OAAO,UAAU;;;AAGvB,CAAC,EAAA,6BAAA,GAAA,SAAA,6BAAA,GAAA;AAGC,IAAA,QAAQ,IAAI,CAAC,UAAU;AACrB,QAAA,KAAK,YAAY;QACjB,KAAK,UAAU,EAAE;YACf,OAAO,IAAI,CAAC,UAAU;;QAExB,SAAS;AACP,YAAA,OAAO,UAAU;;;AAGvB,CAAC;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/label/label.css?tag=qds-label&encapsulation=shadow","src/components/label/label.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}\n\n.qds-label {\n box-sizing: border-box;\n color: var(--qds-theme-control-text-standard);\n display: inline-flex;\n align-items: center;\n gap: var(--qds-text-icon-gap);\n width: 100%;\n\n &:focus-visible {\n outline: var(--qds-focus-border-width) solid var(--qds-theme-focus-border);\n outline-offset: var(--qds-focus-border-offset);\n border-radius: var(--qds-focus-border-radius);\n }\n}\n\n.qds-text {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.qds-required {\n color: var(--qds-theme-feedback-field-required);\n user-select: none;\n}\n\n[data-size='small'] {\n &[data-importance='standard'] {\n font: var(--qds-form-small-text);\n }\n\n &[data-importance='emphasized'] .qds-text {\n font: var(--qds-form-small-text-emphasized);\n }\n\n &.qds-inline {\n min-height: var(--qds-control-small-height);\n }\n\n &.qds-icon {\n height: var(--qds-form-small-icon-size);\n width: var(--qds-form-small-icon-size);\n min-width: var(--qds-form-small-icon-size);\n }\n}\n\n[data-size='standard'] {\n &[data-importance='standard'] {\n font: var(--qds-form-standard-text);\n }\n\n &[data-importance='emphasized'] .qds-text {\n font: var(--qds-form-standard-text-emphasized);\n }\n\n &.qds-inline {\n min-height: var(--qds-control-standard-height);\n }\n\n &.qds-icon {\n height: var(--qds-form-standard-icon-size);\n width: var(--qds-form-standard-icon-size);\n min-width: var(--qds-form-standard-icon-size);\n }\n}\n\n[data-size='large'] {\n &[data-importance='standard'] {\n font: var(--qds-form-large-text);\n }\n\n &[data-importance='emphasized'] .qds-text {\n font: var(--qds-form-large-text-emphasized);\n }\n\n &.qds-inline {\n min-height: var(--qds-control-large-height);\n }\n\n &.qds-icon {\n height: var(--qds-form-large-icon-size);\n width: var(--qds-form-large-icon-size);\n min-width: var(--qds-form-large-icon-size);\n }\n}\n","// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { ComponentInterface } from '@stencil/core'\nimport { Component, h, Prop, readTask, State, Watch } from '@stencil/core'\n\nimport { isEllipsisActive } from '../../helpers'\nimport type { Importance, Size } from '../shared'\nimport type { Tooltip } from '../tooltip/tooltip'\n\nexport type LabelImportance = Exclude<Importance, 'subdued'>\n\n/**\n * `<qds-label>` elements represent a caption for an item in a user interface.\n *\n * @see https://quartz.se.com/build/components/label\n */\n@Component({\n tag: 'qds-label',\n shadow: true,\n styleUrl: 'label.css',\n})\nexport class Label implements ComponentInterface {\n /**\n * Adds vertical margin to the label 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 * Specify the labelled item as required by appending a red asterisk (*).\n */\n @Prop() public readonly required: boolean = false\n\n /**\n * The label's size.\n */\n @Prop() public readonly size?: Size = 'standard'\n\n /**\n * The label's importance.\n */\n @Prop() public readonly importance?: LabelImportance = 'standard'\n\n /**\n * The label's text.\n */\n @Prop() public readonly text?: string\n\n /**\n * The element to which the tooltip is anchored.\n * By default, the tooltip is anchored to the label itself when this prop is not set.\n */\n @Prop() public readonly tooltipTarget?: Tooltip['target']\n\n @State() private tooltip = false\n\n #label?: HTMLSpanElement\n\n #ro?: ResizeObserver\n\n #span?: HTMLSpanElement\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 #computedImportance(): LabelImportance {\n switch (this.importance) {\n case 'emphasized':\n case 'standard': {\n return this.importance\n }\n default: {\n return 'standard'\n }\n }\n }\n\n @Watch('text')\n protected textChanged(): void {\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 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 <span\n class={{\n 'qds-inline': this.inline,\n 'qds-label': true,\n }}\n data-size={this.#computedSize}\n data-importance={this.#computedImportance}\n ref={this.#labelRef}\n // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex\n tabIndex={this.tooltip ? 0 : undefined}\n >\n {this.required && <span class=\"qds-required\">*</span>}\n <span class=\"qds-text\" ref={this.#spanRef}>\n {this.text}\n </span>\n {this.tooltip && (\n <qds-tooltip aria-hidden=\"true\" ref={this.#tooltipRef}>\n {this.text}\n </qds-tooltip>\n )}\n </span>\n )\n }\n\n readonly #labelRef = (label?: HTMLSpanElement): void => {\n this.#label = label\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.tooltipTarget ?? this.#label\n }\n}\n"],"version":3}
|