@quartzds/core 1.0.0-beta.91 → 1.0.0-beta.92
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/components/index.js +2 -2
- package/components/{p-2806fee1.js → p-50f85f75.js} +6 -30
- package/components/p-50f85f75.js.map +1 -0
- package/components/{p-fed0d11f.js → p-5570cc30.js} +2 -2
- package/components/{p-fed0d11f.js.map → p-5570cc30.js.map} +1 -1
- package/components/{p-c80f112a.js → p-70d12c72.js} +7 -24
- package/components/p-70d12c72.js.map +1 -0
- package/components/{p-ba880369.js → p-72c09714.js} +9 -3
- package/components/p-72c09714.js.map +1 -0
- package/components/{p-2bf0797c.js → p-9ffb4b49.js} +7 -7
- package/components/p-9ffb4b49.js.map +1 -0
- package/components/{p-3baf75f4.js → p-a529eb5c.js} +3 -3
- package/components/{p-3baf75f4.js.map → p-a529eb5c.js.map} +1 -1
- package/components/{p-a020ece3.js → p-b5608061.js} +10 -7
- package/components/p-b5608061.js.map +1 -0
- package/components/{p-d6e52d0b.js → p-b6c04008.js} +21 -13
- package/components/p-b6c04008.js.map +1 -0
- package/components/{p-a6310886.js → p-ba860c62.js} +10 -7
- package/components/p-ba860c62.js.map +1 -0
- package/components/{p-3c48ff53.js → p-e22dd76d.js} +2 -2
- package/components/{p-3c48ff53.js.map → p-e22dd76d.js.map} +1 -1
- package/components/{p-b4c302d4.js → p-e2a9e441.js} +3 -3
- package/components/{p-b4c302d4.js.map → p-e2a9e441.js.map} +1 -1
- package/components/qds-badge-counter.js +1 -1
- package/components/qds-badge-indicator.js +1 -1
- package/components/qds-breadcrumb-item.js +7 -4
- package/components/qds-breadcrumb-item.js.map +1 -1
- package/components/qds-button.js +1 -1
- package/components/qds-checkbox.js +1 -1
- package/components/qds-chip.js +12 -9
- package/components/qds-chip.js.map +1 -1
- package/components/qds-dialog.js +3 -3
- package/components/qds-dialog.js.map +1 -1
- package/components/qds-divider.js +1 -1
- package/components/qds-dropdown.js +3 -3
- package/components/qds-form-message.js +4 -4
- package/components/qds-icon.js +1 -1
- package/components/qds-inline-link.js +4 -4
- package/components/qds-input.js +43 -17
- package/components/qds-input.js.map +1 -1
- package/components/qds-label.js +1 -1
- package/components/qds-list-item.js +5 -5
- package/components/qds-loader.js +3 -3
- package/components/qds-nav-list-item.js +6 -6
- package/components/qds-progress-bar.js +3 -3
- package/components/qds-radio.js +7 -7
- package/components/qds-radio.js.map +1 -1
- package/components/qds-select.js +2 -2
- package/components/qds-standalone-link.js +4 -4
- package/components/qds-switch.js +5 -5
- package/components/qds-switch.js.map +1 -1
- package/components/qds-tab.js +7 -7
- package/components/qds-tabbar.js +7 -7
- package/components/qds-table-body.js +2 -2
- package/components/qds-table-cell.js +2 -2
- package/components/qds-table-head-cell.js +1 -1
- package/components/qds-table-head.js +2 -2
- package/components/qds-table-row.js +2 -2
- package/components/qds-table.js +2 -2
- package/components/qds-tag.js +1 -1
- package/components/qds-textarea.js +1 -1
- package/components/qds-title.js +1 -1
- package/components/qds-tooltip.js +1 -1
- package/dist/cjs/{index-523dd2e0.js → index-dbcccf98.js} +6 -29
- package/dist/cjs/index-dbcccf98.js.map +1 -0
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/{library-41b19b9e.js → library-23467d99.js} +8 -2
- package/dist/cjs/library-23467d99.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/qds-badge-counter_2.cjs.entry.js +1 -1
- package/dist/cjs/qds-breadcrumb-item.cjs.entry.js +6 -3
- package/dist/cjs/qds-breadcrumb-item.cjs.entry.js.map +1 -1
- package/dist/cjs/qds-button.cjs.entry.js +16 -8
- package/dist/cjs/qds-button.cjs.entry.js.map +1 -1
- package/dist/cjs/qds-checkbox.cjs.entry.js +3 -3
- package/dist/cjs/qds-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/qds-chip.cjs.entry.js +10 -7
- package/dist/cjs/qds-chip.cjs.entry.js.map +1 -1
- package/dist/cjs/qds-dialog.cjs.entry.js +3 -3
- package/dist/cjs/qds-dialog.cjs.entry.js.map +1 -1
- package/dist/cjs/qds-divider.cjs.entry.js +2 -2
- package/dist/cjs/qds-dropdown.cjs.entry.js +3 -3
- package/dist/cjs/qds-form-message.cjs.entry.js +3 -3
- package/dist/cjs/qds-icon.cjs.entry.js +3 -3
- package/dist/cjs/qds-inline-link.cjs.entry.js +3 -3
- package/dist/cjs/qds-input.cjs.entry.js +36 -11
- package/dist/cjs/qds-input.cjs.entry.js.map +1 -1
- package/dist/cjs/qds-label.cjs.entry.js +8 -5
- package/dist/cjs/qds-label.cjs.entry.js.map +1 -1
- package/dist/cjs/qds-list-item.cjs.entry.js +1 -1
- package/dist/cjs/qds-loader.cjs.entry.js +2 -2
- package/dist/cjs/qds-nav-list-item.cjs.entry.js +4 -4
- package/dist/cjs/qds-progress-bar.cjs.entry.js +3 -3
- package/dist/cjs/qds-radio.cjs.entry.js +4 -4
- package/dist/cjs/qds-radio.cjs.entry.js.map +1 -1
- package/dist/cjs/qds-select.cjs.entry.js +1 -1
- package/dist/cjs/qds-standalone-link.cjs.entry.js +3 -3
- package/dist/cjs/qds-switch.cjs.entry.js +5 -5
- package/dist/cjs/qds-switch.cjs.entry.js.map +1 -1
- package/dist/cjs/qds-tab.cjs.entry.js +1 -1
- package/dist/cjs/qds-tabbar.cjs.entry.js +1 -1
- package/dist/cjs/qds-table-body.cjs.entry.js +2 -2
- package/dist/cjs/qds-table-cell.cjs.entry.js +2 -2
- package/dist/cjs/qds-table-head-cell.cjs.entry.js +1 -1
- package/dist/cjs/qds-table-head.cjs.entry.js +2 -2
- package/dist/cjs/qds-table-row.cjs.entry.js +2 -2
- package/dist/cjs/qds-table.cjs.entry.js +2 -2
- package/dist/cjs/qds-tag_2.cjs.entry.js +7 -4
- package/dist/cjs/qds-tag_2.cjs.entry.js.map +1 -1
- package/dist/cjs/qds-textarea.cjs.entry.js +1 -1
- package/dist/cjs/qds-tooltip.cjs.entry.js +6 -21
- package/dist/cjs/qds-tooltip.cjs.entry.js.map +1 -1
- package/dist/cjs/qds.cjs.js +2 -2
- package/dist/custom-elements.json +50 -20
- package/dist/docs.json +1 -1
- package/dist/esm/{index-b1d6acd2.js → index-bc9462c1.js} +6 -30
- package/dist/esm/index-bc9462c1.js.map +1 -0
- package/dist/esm/index.js +2 -2
- package/dist/esm/{library-2e5458af.js → library-52ae166a.js} +8 -2
- package/dist/esm/library-52ae166a.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/qds-badge-counter_2.entry.js +1 -1
- package/dist/esm/qds-breadcrumb-item.entry.js +6 -3
- package/dist/esm/qds-breadcrumb-item.entry.js.map +1 -1
- package/dist/esm/qds-button.entry.js +16 -8
- package/dist/esm/qds-button.entry.js.map +1 -1
- package/dist/esm/qds-checkbox.entry.js +3 -3
- package/dist/esm/qds-checkbox.entry.js.map +1 -1
- package/dist/esm/qds-chip.entry.js +10 -7
- package/dist/esm/qds-chip.entry.js.map +1 -1
- package/dist/esm/qds-dialog.entry.js +3 -3
- package/dist/esm/qds-dialog.entry.js.map +1 -1
- package/dist/esm/qds-divider.entry.js +2 -2
- package/dist/esm/qds-dropdown.entry.js +3 -3
- package/dist/esm/qds-form-message.entry.js +3 -3
- package/dist/esm/qds-icon.entry.js +3 -3
- package/dist/esm/qds-inline-link.entry.js +3 -3
- package/dist/esm/qds-input.entry.js +36 -11
- package/dist/esm/qds-input.entry.js.map +1 -1
- package/dist/esm/qds-label.entry.js +8 -5
- package/dist/esm/qds-label.entry.js.map +1 -1
- package/dist/esm/qds-list-item.entry.js +1 -1
- package/dist/esm/qds-loader.entry.js +2 -2
- package/dist/esm/qds-nav-list-item.entry.js +4 -4
- package/dist/esm/qds-progress-bar.entry.js +3 -3
- package/dist/esm/qds-radio.entry.js +4 -4
- package/dist/esm/qds-radio.entry.js.map +1 -1
- package/dist/esm/qds-select.entry.js +1 -1
- package/dist/esm/qds-standalone-link.entry.js +3 -3
- package/dist/esm/qds-switch.entry.js +5 -5
- package/dist/esm/qds-switch.entry.js.map +1 -1
- package/dist/esm/qds-tab.entry.js +1 -1
- package/dist/esm/qds-tabbar.entry.js +1 -1
- package/dist/esm/qds-table-body.entry.js +2 -2
- package/dist/esm/qds-table-cell.entry.js +2 -2
- package/dist/esm/qds-table-head-cell.entry.js +1 -1
- package/dist/esm/qds-table-head.entry.js +2 -2
- package/dist/esm/qds-table-row.entry.js +2 -2
- package/dist/esm/qds-table.entry.js +2 -2
- package/dist/esm/qds-tag_2.entry.js +7 -4
- package/dist/esm/qds-tag_2.entry.js.map +1 -1
- package/dist/esm/qds-textarea.entry.js +1 -1
- package/dist/esm/qds-tooltip.entry.js +6 -21
- package/dist/esm/qds-tooltip.entry.js.map +1 -1
- package/dist/esm/qds.js +3 -3
- package/dist/types/components/input/input.d.ts +1 -0
- package/dist/types/components/tooltip/tooltip.d.ts +0 -2
- package/hydrate/index.js +134 -115
- package/hydrate/index.mjs +134 -115
- package/package.json +1 -1
- package/components/p-2806fee1.js.map +0 -1
- package/components/p-2bf0797c.js.map +0 -1
- package/components/p-a020ece3.js.map +0 -1
- package/components/p-a6310886.js.map +0 -1
- package/components/p-ba880369.js.map +0 -1
- package/components/p-c80f112a.js.map +0 -1
- package/components/p-d6e52d0b.js.map +0 -1
- package/dist/cjs/index-523dd2e0.js.map +0 -1
- package/dist/cjs/library-41b19b9e.js.map +0 -1
- package/dist/esm/index-b1d6acd2.js.map +0 -1
- package/dist/esm/library-2e5458af.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-
|
|
1
|
+
{"file":"p-5570cc30.js","mappings":";;;;;;;AAAA,MAAM,iBAAiB,GAAG,i8DAAi8D,CAAC;AAC59D,gCAAe,iBAAiB;;ACDhC;AACA;AACA;;;;;;;;;MAqBa,cAAc;IAL3B;;;;;;;;QAmB0B,SAAI,GAAwB,UAAU,CAAA;;;;QAKtC,WAAM,GAA0B,SAAS,CAAA;;;;QAKzC,eAAU,GAAY,KAAK,CAAA;KA2CpD;IAdQ,MAAM;QACX,QACE,4DACE,KAAK,EAAE;gBACL,qBAAqB,EAAE,IAAI;gBAC3B,iBAAiB,EAAE,IAAI,CAAC,UAAU;aACnC,eACU,uBAAA,IAAI,mEAAc,iBAChB,uBAAA,IAAI,qEAAgB,IAEjC,6DAAM,KAAK,EAAC,aAAa,IAAE,IAAI,CAAC,WAAW,CAAQ,CAC/C,EACP;KACF;;;;;;;;;IAvCC,QAAQ,IAAI,CAAC,MAAM;QACjB,KAAK,OAAO,CAAC;QACb,KAAK,MAAM,CAAC;QACZ,KAAK,SAAS,CAAC;QACf,KAAK,SAAS,EAAE;YACd,OAAO,IAAI,CAAC,MAAM,CAAA;SACnB;QACD,SAAS;YACP,OAAO,SAAS,CAAA;SACjB;KACF;AACH,CAAC;IAGC,QAAQ,IAAI,CAAC,IAAI;QACf,KAAK,MAAM,CAAC;QACZ,KAAK,OAAO,CAAC;QACb,KAAK,OAAO,EAAE;YACZ,OAAO,IAAI,CAAC,IAAI,CAAA;SACjB;QACD,SAAS;YACP,OAAO,UAAU,CAAA;SAClB;KACF;AACH,CAAC;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/badge-indicator/badge-indicator.css?tag=qds-badge-indicator&encapsulation=shadow","src/components/badge-indicator/badge-indicator.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-badge-indicator {\n align-items: center;\n background-color: var(--qds-theme-feedback-message-neutral);\n border-radius: var(--qds-control-toggle-indicator-rounded-border-radius);\n display: flex;\n height: var(--qds-badge-indicator-standard-height);\n justify-content: center;\n width: var(--qds-badge-indicator-standard-height);\n}\n\n.qds-stroke-ring {\n border: var(--qds-badge-border-width) solid\n var(--qds-theme-feedback-message-neutral-contrast);\n}\n\n.qds-sr-only {\n clip: rect(0 0 0 0);\n height: 1px;\n width: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n white-space: nowrap;\n}\n\n[data-status='error'] {\n background-color: var(--qds-theme-feedback-message-critical);\n\n &.qds-stroke-ring {\n border-color: var(--qds-theme-feedback-message-neutral-contrast);\n }\n}\n\n[data-status='info'] {\n background-color: var(--qds-theme-feedback-message-informational);\n\n &.qds-stroke-ring {\n border-color: var(--qds-theme-feedback-message-neutral-contrast);\n }\n}\n\n[data-status='neutral'] {\n background-color: var(--qds-theme-feedback-availability-unavailable);\n\n &.qds-stroke-ring {\n border-color: var(--qds-theme-feedback-message-neutral-contrast);\n }\n}\n\n[data-status='success'] {\n background-color: var(--qds-theme-signature-color-default);\n\n &.qds-stroke-ring {\n border-color: var(--qds-theme-feedback-message-neutral-contrast);\n }\n}\n\n[data-status='warning'] {\n background-color: var(--qds-theme-feedback-message-important);\n\n &.qds-stroke-ring {\n border-color: var(--qds-theme-feedback-message-neutral-contrast);\n }\n}\n\n[data-size='small'] {\n height: var(--qds-badge-indicator-small-height);\n width: var(--qds-badge-indicator-small-height);\n}\n\n[data-size='standard'] {\n height: var(--qds-badge-indicator-standard-height);\n width: var(--qds-badge-indicator-standard-height);\n}\n\n[data-size='large'] {\n height: var(--qds-badge-indicator-large-height);\n width: var(--qds-badge-indicator-large-height);\n}\n\n[data-size='hero'] {\n height: var(--qds-badge-indicator-hero-height);\n width: var(--qds-badge-indicator-hero-height);\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 } from '@stencil/core'\n\nimport type { Size, Status } from '../shared'\n\nexport type BadgeIndicatorSize = Size | 'hero'\nexport type BadgeIndicatorStatus = Status | 'neutral'\n\n/**\n * The `<qds-badge-indicator>` element is a small, rounded UI element used to\n * display status indicators. It is designed to draw the user's eye to\n * important or dynamic content by providing a visual cue that an event has\n * occurred or is waiting to be addressed.\n */\n@Component({\n tag: 'qds-badge-indicator',\n shadow: true,\n styleUrl: 'badge-indicator.css',\n})\nexport class BadgeIndicator implements ComponentInterface {\n /**\n * Adds accessible text to the qds-badge-indicator that will be used by\n * screen readers.\n *\n * @example\n * <qds-badge-indicator description=\"success\"></qds-badge-indicator>\n * // This qds-badge-indicator will be read by screen readers as \"success\"\n */\n @Prop() public readonly description?: string\n\n /**\n * The badge indicator's size.\n */\n @Prop() public readonly size?: BadgeIndicatorSize = 'standard'\n\n /**\n * The badge indicator's status.\n */\n @Prop() public readonly status?: BadgeIndicatorStatus = 'neutral'\n\n /**\n * Shows a stroke ring around the badge indicator for better visibility.\n */\n @Prop() public readonly strokeRing: boolean = false\n\n get #computedStatus(): BadgeIndicatorStatus {\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 #computedSize(): BadgeIndicatorSize {\n switch (this.size) {\n case 'hero':\n case 'large':\n case 'small': {\n return this.size\n }\n default: {\n return 'standard'\n }\n }\n }\n\n public render() {\n return (\n <div\n class={{\n 'qds-badge-indicator': true,\n 'qds-stroke-ring': this.strokeRing,\n }}\n data-size={this.#computedSize}\n data-status={this.#computedStatus}\n >\n <span class=\"qds-sr-only\">{this.description}</span>\n </div>\n )\n }\n}\n"],"version":3}
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
*
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { p as proxyCustomElement, H, c as createEvent, h, d as Host } from './p-
|
|
6
|
+
import { p as proxyCustomElement, H, c as createEvent, h, d as Host } from './p-50f85f75.js';
|
|
7
7
|
import { o as offset, f as flip, s as shift, l as limitShift, b as arrow, c as computePosition, a as autoUpdate } from './p-fdd0abae.js';
|
|
8
8
|
import { f as ignorePromise, d as propertyToPx, c as invariant, r as resolveTarget, e as roundByDPR, j as isTouchDevice } from './p-8abba29b.js';
|
|
9
9
|
|
|
10
|
-
const tooltipCss = ":host([hidden]){display:none!important}:host{align-items:flex-start;background-color:var(--qds-theme-accessory-background);border-radius:var(--qds-accessory-border-radius);box-shadow:var(--qds-theme-accessory-elevation);box-sizing:border-box;color:var(--qds-theme-text-standard);display:flex;flex-direction:column;gap:var(--qds-accessory-gap-children-unrelated);left:0;padding:var(--qds-accessory-padding);top:0}:host:before{content:\"\";height:100%;left:0;position:absolute;top:0;width:100%}::slotted(blockquote),::slotted(button),::slotted(dd),::slotted(dl),::slotted(fieldset),::slotted(figure),::slotted(h1),::slotted(h2),::slotted(h3),::slotted(h4),::slotted(h5),::slotted(h6),::slotted(hr),::slotted(input),::slotted(menu),::slotted(ol),::slotted(p),::slotted(pre),::slotted(select),::slotted(textarea),::slotted(ul){margin:0}:host([data-side=bottom]):before,:host([data-side=top]):before{height:calc(var(--qds-accessory-gap-floating, 0px) + var(--qds-signature-triangle-pointer-size-height, 0px));top:100%}:host([data-side=bottom]):before{top:calc((var(--qds-accessory-gap-floating, 0px) + var(--qds-signature-triangle-pointer-size-height, 0px))*-1)}:host([data-side=left]):before,:host([data-side=right]):before{left:100%;width:calc(var(--qds-accessory-gap-floating, 0px) + var(--qds-signature-triangle-pointer-size-height, 0px))}:host([data-side=right]):before{left:calc((var(--qds-accessory-gap-floating, 0px) + var(--qds-signature-triangle-pointer-size-height, 0px))*-1)}.qds-arrow
|
|
10
|
+
const tooltipCss = ":host([hidden]){display:none!important}:host{align-items:flex-start;background-color:var(--qds-theme-accessory-background);border-radius:var(--qds-accessory-border-radius);box-shadow:var(--qds-theme-accessory-elevation);box-sizing:border-box;color:var(--qds-theme-text-standard);display:flex;flex-direction:column;gap:var(--qds-accessory-gap-children-unrelated);left:0;padding:var(--qds-accessory-padding);top:0}:host:before{content:\"\";height:100%;left:0;position:absolute;top:0;width:100%}::slotted(blockquote),::slotted(button),::slotted(dd),::slotted(dl),::slotted(fieldset),::slotted(figure),::slotted(h1),::slotted(h2),::slotted(h3),::slotted(h4),::slotted(h5),::slotted(h6),::slotted(hr),::slotted(input),::slotted(menu),::slotted(ol),::slotted(p),::slotted(pre),::slotted(select),::slotted(textarea),::slotted(ul){margin:0}:host([data-side=bottom]):before,:host([data-side=top]):before{height:calc(var(--qds-accessory-gap-floating, 0px) + var(--qds-signature-triangle-pointer-size-height, 0px));top:100%}:host([data-side=bottom]):before{top:calc((var(--qds-accessory-gap-floating, 0px) + var(--qds-signature-triangle-pointer-size-height, 0px))*-1)}:host([data-side=left]):before,:host([data-side=right]):before{left:100%;width:calc(var(--qds-accessory-gap-floating, 0px) + var(--qds-signature-triangle-pointer-size-height, 0px))}:host([data-side=right]):before{left:calc((var(--qds-accessory-gap-floating, 0px) + var(--qds-signature-triangle-pointer-size-height, 0px))*-1)}.qds-arrow{height:var(--qds-signature-triangle-pointer-size-height);position:absolute;width:var(--qds-signature-triangle-pointer-size-width)}.qds-arrow:before{background-color:var(--qds-theme-accessory-background);clip-path:polygon(0 0,100% 0,50% 100%);content:\"\";height:100%;position:absolute;width:100%}.qds-arrow[data-side=bottom]{bottom:100%;transform:rotate(180deg)}.qds-arrow[data-side=left]{left:100%;transform:rotate(-90deg)}.qds-arrow[data-side=right]{right:100%;transform:rotate(90deg)}.qds-arrow[data-side=top]{top:100%}";
|
|
11
11
|
const QdsTooltipStyle0 = tooltipCss;
|
|
12
12
|
|
|
13
13
|
// SPDX-FileCopyrightText: © 2024 Schneider Electric
|
|
@@ -66,8 +66,6 @@ const Tooltip = /*@__PURE__*/ proxyCustomElement(class Tooltip extends H {
|
|
|
66
66
|
this.trigger = 'pointerenter focus';
|
|
67
67
|
this.open = false;
|
|
68
68
|
this.side = 'top';
|
|
69
|
-
this.aShape = '';
|
|
70
|
-
this.aViewbox = '0 0 0 0';
|
|
71
69
|
this.aHeight = 0;
|
|
72
70
|
this.aGap = 0;
|
|
73
71
|
_Tooltip_arrowContainerElement.set(this, void 0);
|
|
@@ -76,8 +74,8 @@ const Tooltip = /*@__PURE__*/ proxyCustomElement(class Tooltip extends H {
|
|
|
76
74
|
_Tooltip_isTouchDevice.set(this, false);
|
|
77
75
|
_Tooltip_listeners.set(this, []);
|
|
78
76
|
_Tooltip_referenceElement.set(this, void 0);
|
|
79
|
-
_Tooltip_arrowContainerRef.set(this, (
|
|
80
|
-
__classPrivateFieldSet(this, _Tooltip_arrowContainerElement,
|
|
77
|
+
_Tooltip_arrowContainerRef.set(this, (div) => {
|
|
78
|
+
__classPrivateFieldSet(this, _Tooltip_arrowContainerElement, div, "f");
|
|
81
79
|
});
|
|
82
80
|
_Tooltip_boundTooltipPointerDown.set(this, () => {
|
|
83
81
|
__classPrivateFieldSet(this, _Tooltip_clickedTooltip, true, "f");
|
|
@@ -132,23 +130,10 @@ const Tooltip = /*@__PURE__*/ proxyCustomElement(class Tooltip extends H {
|
|
|
132
130
|
* changed.
|
|
133
131
|
*/
|
|
134
132
|
async updateArrow() {
|
|
135
|
-
const aWidth = propertyToPx(this.host, `--qds-signature-triangle-pointer-size-width`) ??
|
|
136
|
-
0;
|
|
137
|
-
const aTipRadius = propertyToPx(this.host, `--qds-signature-triangle-pointer-tip-radius`) ??
|
|
138
|
-
0;
|
|
139
|
-
const svgX = (aWidth / 2) * (aTipRadius / -8 + 1);
|
|
140
|
-
const svgY = ((this.aHeight / 2) * aTipRadius) / 4;
|
|
141
133
|
this.aHeight =
|
|
142
134
|
propertyToPx(this.host, `--qds-signature-triangle-pointer-size-height`) ??
|
|
143
135
|
0;
|
|
144
|
-
this.aViewbox = `0 0 ${aWidth} ${Math.max(this.aHeight, aWidth)}`;
|
|
145
136
|
this.aGap = propertyToPx(this.host, '--qds-accessory-gap-floating') ?? 0;
|
|
146
|
-
this.aShape =
|
|
147
|
-
'M0,0' +
|
|
148
|
-
` H${aWidth}` +
|
|
149
|
-
` L${aWidth - svgX},${this.aHeight - svgY}` +
|
|
150
|
-
` Q${aWidth / 2},${this.aHeight} ${svgX},${this.aHeight - svgY}` +
|
|
151
|
-
' Z';
|
|
152
137
|
}
|
|
153
138
|
async updateMiddleware() {
|
|
154
139
|
invariant(__classPrivateFieldGet(this, _Tooltip_arrowContainerElement, "f"));
|
|
@@ -277,10 +262,10 @@ const Tooltip = /*@__PURE__*/ proxyCustomElement(class Tooltip extends H {
|
|
|
277
262
|
__classPrivateFieldGet(this, _Tooltip_referenceElement, "f").removeAttribute('aria-describedby');
|
|
278
263
|
}
|
|
279
264
|
render() {
|
|
280
|
-
return (h(Host, { key: '
|
|
265
|
+
return (h(Host, { key: 'fe699b7a444ed3d9632d841d91225aeeebb5db77', "data-side": this.side, role: this.host.role ?? 'tooltip', onKeyDown: __classPrivateFieldGet(this, _Tooltip_boundKeyDown, "f"), onPointerDown: __classPrivateFieldGet(this, _Tooltip_boundTooltipPointerDown, "f"), style: {
|
|
281
266
|
position: this.hostPosition,
|
|
282
267
|
transform: this.hostTransform,
|
|
283
|
-
} }, h("slot", { key: '
|
|
268
|
+
} }, h("slot", { key: '1ef92f15213c41eebaa1b02fa50e38ea455620ea' }), h("div", { key: '090db32a65ec27941b5eb5708330d7043c124a3d', class: "qds-arrow", "data-side": this.side, ref: __classPrivateFieldGet(this, _Tooltip_arrowContainerRef, "f"), style: this.aStyles })));
|
|
284
269
|
}
|
|
285
270
|
get host() { return this; }
|
|
286
271
|
static get watchers() { return {
|
|
@@ -319,8 +304,6 @@ const Tooltip = /*@__PURE__*/ proxyCustomElement(class Tooltip extends H {
|
|
|
319
304
|
"middleware": [32],
|
|
320
305
|
"side": [32],
|
|
321
306
|
"aStyles": [32],
|
|
322
|
-
"aShape": [32],
|
|
323
|
-
"aViewbox": [32],
|
|
324
307
|
"aHeight": [32],
|
|
325
308
|
"aGap": [32],
|
|
326
309
|
"show": [64],
|
|
@@ -405,4 +388,4 @@ function defineCustomElement() {
|
|
|
405
388
|
|
|
406
389
|
export { Tooltip as T, defineCustomElement as d };
|
|
407
390
|
|
|
408
|
-
//# sourceMappingURL=p-
|
|
391
|
+
//# sourceMappingURL=p-70d12c72.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"p-70d12c72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,IAAI,0BAAW,CAAC,IAAI,CACtC,CAAC,KAAK,KAAK,KAAK,CAAC,OAAO,KAAK,OAAO,IAAI,KAAK,CAAC,KAAK,KAAK,KAAK,CAC9D,CAAA;IACD,IAAI,WAAW;QAAE,OAAM;IAEvB,OAAO,CAAC,gBAAgB,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;IACzC,uBAAA,IAAI,0BAAW,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAA;AACpD,CAAC;IAGC,KAAK,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,uBAAA,IAAI,0BAAW;QACxD,OAAO,CAAC,mBAAmB,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;IAC9C,uBAAA,IAAI,sBAAc,EAAE,MAAA,CAAA;AACtB,CAAC;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/tooltip/tooltip.css?tag=qds-tooltip&encapsulation=shadow","src/components/tooltip/tooltip.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 align-items: flex-start;\n background-color: var(--qds-theme-accessory-background);\n border-radius: var(--qds-accessory-border-radius);\n box-shadow: var(--qds-theme-accessory-elevation);\n box-sizing: border-box;\n color: var(--qds-theme-text-standard);\n display: flex;\n flex-direction: column;\n gap: var(--qds-accessory-gap-children-unrelated);\n left: 0;\n padding: var(--qds-accessory-padding);\n top: 0;\n}\n\n:host::before {\n content: '';\n height: 100%;\n left: 0;\n position: absolute;\n top: 0;\n width: 100%;\n}\n\n::slotted(blockquote),\n::slotted(button),\n::slotted(dd),\n::slotted(dl),\n::slotted(fieldset),\n::slotted(figure),\n::slotted(h1),\n::slotted(h2),\n::slotted(h3),\n::slotted(h4),\n::slotted(h5),\n::slotted(h6),\n::slotted(hr),\n::slotted(input),\n::slotted(menu),\n::slotted(ol),\n::slotted(p),\n::slotted(pre),\n::slotted(select),\n::slotted(textarea),\n::slotted(ul) {\n margin: 0;\n}\n\n:host([data-side='top'])::before,\n:host([data-side='bottom'])::before {\n height: calc(\n var(--qds-accessory-gap-floating, 0px) +\n var(--qds-signature-triangle-pointer-size-height, 0px)\n );\n top: 100%;\n}\n\n:host([data-side='bottom'])::before {\n top: calc(\n -1 * (var(--qds-accessory-gap-floating, 0px) +\n var(--qds-signature-triangle-pointer-size-height, 0px))\n );\n}\n\n:host([data-side='left'])::before,\n:host([data-side='right'])::before {\n width: calc(\n var(--qds-accessory-gap-floating, 0px) +\n var(--qds-signature-triangle-pointer-size-height, 0px)\n );\n left: 100%;\n}\n\n:host([data-side='right'])::before {\n left: calc(\n -1 * (var(--qds-accessory-gap-floating, 0px) +\n var(--qds-signature-triangle-pointer-size-height, 0px))\n );\n}\n\n.qds-arrow {\n position: absolute;\n width: var(--qds-signature-triangle-pointer-size-width);\n height: var(--qds-signature-triangle-pointer-size-height);\n\n &::before {\n content: '';\n position: absolute;\n width: 100%;\n height: 100%;\n background-color: var(--qds-theme-accessory-background);\n clip-path: polygon(0% 0%, 100% 0%, 50% 100%);\n }\n\n &[data-side='bottom'] {\n bottom: 100%;\n transform: rotate(180deg);\n }\n\n &[data-side='left'] {\n left: 100%;\n transform: rotate(-90deg);\n }\n\n &[data-side='right'] {\n right: 100%;\n transform: rotate(90deg);\n }\n\n &[data-side='top'] {\n top: 100%;\n }\n}\n","// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\nimport type {\n AutoUpdateOptions,\n DetectOverflowOptions,\n FlipOptions,\n Middleware,\n Placement,\n ReferenceElement,\n ShiftOptions,\n Side,\n Strategy,\n} from '@floating-ui/dom'\nimport {\n arrow,\n autoUpdate,\n computePosition,\n flip,\n limitShift,\n offset,\n shift,\n} from '@floating-ui/dom'\nimport type { ComponentInterface, EventEmitter } from '@stencil/core'\nimport {\n Component,\n Element,\n Event,\n h,\n Host,\n Method,\n Prop,\n State,\n Watch,\n} from '@stencil/core'\nimport type { Split } from 'type-fest'\n\nimport type { OffsetOptions } from '../../helpers'\nimport {\n ignorePromise,\n invariant,\n isTouchDevice,\n propertyToPx,\n resolveTarget,\n roundByDPR,\n} from '../../helpers'\n\nlet autoIncrementingId = 1\n\nexport type TriggerEvent = Extract<\n keyof GlobalEventHandlersEventMap,\n 'click' | 'focus' | 'focusin' | 'pointerenter'\n>\n\n/**\n * @slot Content to display in the dropdown.\n * @see https://quartz.se.com/build/components/tooltip\n */\n@Component({\n tag: 'qds-tooltip',\n shadow: true,\n styleUrl: 'tooltip.css',\n})\nexport class Tooltip implements ComponentInterface {\n /**\n * Options to pass to Floating UI's\n * [`autoUpdate()` function](https://floating-ui.com/docs/autoUpdate).\n *\n * @see https://floating-ui.com/docs/autoupdate#options\n */\n @Prop() public readonly autoUpdateOptions?: AutoUpdateOptions\n\n /**\n * Prevents the tooltip from being shown by user interaction. The tooltip can\n * still be displayed by calling the `show()` method.\n */\n @Prop() public readonly disabled: boolean = false\n\n /**\n * Options to pass to Floating UI's\n * [`flip` middleware](https://floating-ui.com/docs/flip).\n *\n * The [`crossAxis` option](https://floating-ui.com/docs/flip#crossaxis) is\n * set to the value of the `noShift` property by default for interoperability\n * with the [`shift` middleware](https://floating-ui.com/docs/shift).\n *\n * @see https://floating-ui.com/docs/flip#options\n */\n @Prop() public readonly flipOptions?: Partial<\n DetectOverflowOptions & FlipOptions\n >\n\n /**\n * Disable Floating UI's\n * [`flip` middleware](https://floating-ui.com/docs/flip).\n */\n @Prop() public readonly noFlip: boolean = false\n\n /**\n * Disable Floating UI's\n * [`shift` middleware](https://floating-ui.com/docs/shift).\n */\n @Prop() public readonly noShift: boolean = false\n\n /**\n * Options to pass to Floating UI's\n * [`offset` middleware](https://floating-ui.com/docs/offset).\n *\n * The [`mainAxis` option](https://floating-ui.com/docs/offset#mainaxis) is\n * not supported.\n *\n * @see https://floating-ui.com/docs/offset#options\n */\n @Prop() public readonly offsetOptions?: OffsetOptions\n\n /**\n * Where to place the tooltip relative to the `target`.\n *\n * @see https://floating-ui.com/docs/tutorial#placements\n */\n @Prop() public readonly placement: Placement = 'top'\n\n /**\n * Options to pass to Floating UI's\n * [`shift` middleware](https://floating-ui.com/docs/shift).\n *\n * @see https://floating-ui.com/docs/shift#options\n */\n @Prop() public readonly shiftOptions?: Partial<\n DetectOverflowOptions & ShiftOptions\n >\n\n /**\n * The CSS position strategy to use.\n *\n * @see https://floating-ui.com/docs/computeposition#strategy\n */\n @Prop() public readonly strategy?: Strategy\n\n /**\n * The trigger element that will trigger the tooltip. The target specified\n * can be any of the following:\n *\n * - A CSS selector string\n * - A reference to an [`Element`][] or [Virtual Element][]\n * - A function returning a reference to an [`Element`][],\n * [Virtual Element][], or a CSS selector string\n *\n * [`Element`]: https://developer.mozilla.org/docs/Web/API/Element\n * [Virtual Element]: https://floating-ui.com/docs/virtual-elements\n */\n @Prop() public readonly target?:\n | ReferenceElement\n | string\n | (() => ReferenceElement | string)\n\n /**\n * Determines the events that cause the tooltip to show. Multiple event names\n * are separated by spaces.\n */\n @Prop() public readonly trigger?: TriggerEvent[] | string =\n 'pointerenter focus'\n\n /**\n * Emitted when the tooltip is closed.\n */\n @Event({ eventName: 'qdsClose', bubbles: false, cancelable: false })\n private readonly closeEmitter!: EventEmitter<void>\n\n @Element() private readonly host!: HTMLElement\n\n @State() private hostPosition?: string\n\n @State() private hostTransform?: string\n\n @State() private open = false\n\n @State() private middleware?: Middleware[]\n\n @State() private side: Side = 'top'\n\n @State() private aStyles?: Record<string, string | undefined>\n\n @State() private aHeight = 0\n\n @State() private aGap = 0\n\n #arrowContainerElement?: HTMLElement\n\n #cleanup?: () => void\n\n #clickedTooltip = false\n\n #isTouchDevice = false\n\n #listeners: {\n element: Element\n event: keyof GlobalEventHandlersEventMap\n listener: EventListenerOrEventListenerObject\n }[] = []\n\n #referenceElement?: ReferenceElement\n\n /**\n * Show the tooltip.\n */\n @Method()\n public async show(): Promise<void> {\n if (this.open) return\n\n this.open = true\n this.startAutoUpdate()\n }\n\n /**\n * Close the tooltip.\n */\n @Method()\n public async close(): Promise<void> {\n if (!this.open) return\n\n this.closeEmitter.emit()\n\n this.open = false\n this.#clickedTooltip = false\n if (this.#cleanup) this.#cleanup()\n }\n\n /**\n * Update the tooltip's arrow.\n *\n * This method should typically be called when the Quartz platform was\n * changed.\n */\n @Method()\n public async updateArrow(): Promise<void> {\n this.aHeight =\n propertyToPx(this.host, `--qds-signature-triangle-pointer-size-height`) ??\n 0\n this.aGap = propertyToPx(this.host, '--qds-accessory-gap-floating') ?? 0\n }\n\n @Watch('aGap')\n @Watch('aHeight')\n @Watch('flipOptions')\n @Watch('noFlip')\n @Watch('noShift')\n @Watch('offsetOptions')\n @Watch('shiftOptions')\n protected async updateMiddleware(): Promise<void> {\n invariant(this.#arrowContainerElement)\n\n this.middleware = [\n offset({\n ...this.offsetOptions,\n mainAxis: this.aGap + this.aHeight,\n }),\n !this.noFlip &&\n flip({\n crossAxis: this.noShift,\n ...this.flipOptions,\n }),\n !this.noShift &&\n shift({\n limiter: limitShift(),\n ...this.shiftOptions,\n }),\n arrow({\n element: this.#arrowContainerElement,\n }),\n ].filter((middleware): middleware is Middleware => middleware !== false)\n }\n\n @Watch('role')\n protected updateAriaHasPopup(): void {\n this.#referenceElement = resolveTarget(this.target)\n\n if (\n this.#referenceElement instanceof globalThis.Element &&\n this.host.role === 'dialog'\n ) {\n this.#referenceElement.ariaHasPopup = 'dialog'\n }\n }\n\n @Watch('open')\n protected setAriaExpanded(): void {\n this.host.hidden = !this.open\n if (\n this.#referenceElement instanceof globalThis.Element &&\n this.host.role === 'dialog'\n ) {\n this.#referenceElement.ariaExpanded = String(this.open)\n }\n }\n\n @Watch('target')\n private async updateReferenceElement(): Promise<void> {\n this.disconnectedCallback()\n\n this.#referenceElement = resolveTarget(this.target)\n\n if (!(this.#referenceElement instanceof globalThis.Element)) return\n\n this.updateEventListeners()\n this.host.id ||= `qds-tooltip-${autoIncrementingId}`\n this.#referenceElement.setAttribute('aria-describedby', this.host.id)\n\n if (this.host.role === 'dialog') {\n this.#referenceElement.ariaHasPopup = 'dialog'\n }\n }\n\n @Watch('trigger')\n private updateEventListeners(): void {\n if (!(this.#referenceElement instanceof globalThis.Element)) return\n\n const triggers = Array.isArray(this.trigger)\n ? this.trigger\n : ((this.trigger?.split(' ') as Split<TriggerEvent, ' '> | undefined) ??\n [])\n\n this.#removeEventListeners()\n\n if (this.#isTouchDevice)\n this.#on(this.#referenceElement, 'click', this.#boundReferenceClick)\n this.#on(document.documentElement, 'pointerdown', this.#boundPointerdown)\n this.#on(this.#referenceElement, 'keydown', this.#boundKeyDown)\n\n for (const trigger of triggers) {\n switch (trigger) {\n case 'click': {\n this.#on(this.#referenceElement, 'click', this.#boundReferenceClick)\n break\n }\n case 'focus':\n case 'focusin': {\n this.#on(this.#referenceElement, trigger, this.#boundFocus)\n this.#on(this.#referenceElement, 'focusout', this.#boundFocusout)\n this.#on(this.host, 'focusout', this.#boundFocusout)\n break\n }\n case 'pointerenter': {\n this.#on(\n this.#referenceElement,\n 'pointerenter',\n this.#boundPointerenter,\n )\n this.#on(\n this.#referenceElement,\n 'pointerleave',\n this.#boundPointerleave,\n )\n this.#on(this.host, 'pointerleave', this.#boundPointerleave)\n break\n }\n default:\n }\n }\n }\n\n @Watch('middleware')\n @Watch('placement')\n @Watch('strategy')\n private async updatePosition(): Promise<void> {\n invariant(this.#referenceElement)\n\n const { x, y, middlewareData, placement, strategy } = await computePosition(\n this.#referenceElement,\n this.host,\n {\n middleware: this.middleware,\n placement: this.placement,\n strategy: this.strategy,\n },\n )\n const [side] = placement.split('-') as Split<Placement, '-'>\n\n this.hostPosition = strategy\n this.hostTransform = `translate(${roundByDPR(x)}px,${roundByDPR(y)}px)`\n this.side = side\n\n if (middlewareData.arrow === undefined) return\n const { x: aX, y: aY, centerOffset } = middlewareData.arrow\n this.aStyles = {\n display: centerOffset === 0 ? undefined : 'none',\n left: aX === undefined ? '' : `${aX}px`,\n top: aY === undefined ? '' : `${aY}px`,\n }\n }\n\n @Watch('autoUpdateOptions')\n private startAutoUpdate(): void {\n invariant(this.#referenceElement)\n\n if (this.#cleanup) this.#cleanup()\n this.#cleanup = autoUpdate(\n this.#referenceElement,\n this.host,\n () => {\n ignorePromise(this.updatePosition())\n },\n this.autoUpdateOptions,\n )\n }\n\n public async componentWillLoad(): Promise<void> {\n this.#isTouchDevice = isTouchDevice()\n this.host.hidden = true\n await this.updateReferenceElement()\n autoIncrementingId += 1\n }\n\n public async componentDidLoad(): Promise<void> {\n await this.updateArrow()\n }\n\n public disconnectedCallback(): void {\n if (!(this.#referenceElement instanceof globalThis.Element)) return\n\n this.#removeEventListeners()\n this.#referenceElement.removeAttribute('aria-describedby')\n }\n\n public render() {\n return (\n <Host\n data-side={this.side}\n role={this.host.role ?? 'tooltip'}\n onKeyDown={this.#boundKeyDown}\n onPointerDown={this.#boundTooltipPointerDown}\n style={{\n position: this.hostPosition,\n transform: this.hostTransform,\n }}\n >\n <slot />\n <div\n class=\"qds-arrow\"\n data-side={this.side}\n ref={this.#arrowContainerRef}\n style={this.aStyles}\n />\n </Host>\n )\n }\n\n readonly #arrowContainerRef = (div?: HTMLElement): void => {\n this.#arrowContainerElement = div\n }\n\n readonly #boundTooltipPointerDown = (): void => {\n this.#clickedTooltip = true\n }\n\n async #handleFocus(): Promise<void> {\n if (!this.disabled) await this.show()\n }\n\n readonly #boundFocus = (): void => {\n ignorePromise(this.#handleFocus())\n }\n\n async #handleKeyDown(event: Event): Promise<void> {\n if (event instanceof KeyboardEvent && event.key === 'Escape')\n await this.close()\n }\n\n readonly #boundKeyDown = (event: Event): void => {\n ignorePromise(this.#handleKeyDown(event))\n }\n\n async #handlePointerenter(): Promise<void> {\n if (!this.disabled) await this.show()\n }\n\n readonly #boundPointerenter = (): void => {\n ignorePromise(this.#handlePointerenter())\n }\n\n async #handlePointerleave(event: Event): Promise<void> {\n if (\n !this.#clickedTooltip &&\n document.activeElement !== this.#referenceElement &&\n document.activeElement?.closest('qds-tooltip') !== this.host &&\n event instanceof PointerEvent &&\n event.relatedTarget !== this.#referenceElement &&\n event.relatedTarget !== this.host\n )\n await this.close()\n }\n\n readonly #boundPointerleave = (event: Event): void => {\n ignorePromise(this.#handlePointerleave(event))\n }\n\n async #handleFocusOut(event: Event): Promise<void> {\n if (!(event instanceof FocusEvent)) return\n const { relatedTarget } = event\n\n if (\n relatedTarget instanceof globalThis.Element &&\n !this.host.contains(relatedTarget) &&\n this.#referenceElement !== relatedTarget\n )\n await this.close()\n }\n\n readonly #boundFocusout = (event: Event): void => {\n ignorePromise(this.#handleFocusOut(event))\n }\n\n async #handlePointerdown(event: Event): Promise<void> {\n const composedPath = event.composedPath()\n const withinBounds =\n composedPath.includes(this.host) ||\n (this.#referenceElement instanceof globalThis.Element &&\n composedPath.includes(this.#referenceElement))\n if (!withinBounds) await this.close()\n }\n\n readonly #boundPointerdown = (event: Event): void => {\n ignorePromise(this.#handlePointerdown(event))\n }\n\n async #handleReferenceClick(): Promise<void> {\n if (!this.disabled) await (this.open ? this.close() : this.show())\n }\n\n readonly #boundReferenceClick = (): void => {\n ignorePromise(this.#handleReferenceClick())\n }\n\n #on(\n element: Element,\n event: keyof GlobalEventHandlersEventMap,\n listener: EventListenerOrEventListenerObject,\n ): void {\n const hasListener = this.#listeners.some(\n (value) => value.element === element && value.event === event,\n )\n if (hasListener) return\n\n element.addEventListener(event, listener)\n this.#listeners.push({ element, event, listener })\n }\n\n #removeEventListeners(): void {\n for (const { element, event, listener } of this.#listeners)\n element.removeEventListener(event, listener)\n this.#listeners = []\n }\n}\n"],"version":3}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { g as getAssetPath, p as proxyCustomElement, H, c as createEvent, h } from './p-
|
|
6
|
+
import { g as getAssetPath, p as proxyCustomElement, H, c as createEvent, h } from './p-50f85f75.js';
|
|
7
7
|
import { i as inheritAriaAttributes } from './p-8abba29b.js';
|
|
8
8
|
|
|
9
9
|
const checkedSvg = 'data:image/svg+xml;base64,PCEtLSBTUERYLUZpbGVDb3B5cmlnaHRUZXh0OiDCqSAyMDI1IFNjaG5laWRlciBFbGVjdHJpYyBTUERYLUxpY2Vuc2UtSWRlbnRpZmllcjogQXBhY2hlLTIuMCAtLT4KPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHBhdGggZD0iTTYuMzEgMTEuODYgMy4wOCA4LjYzbC43MS0uNzEgMi41MiAyLjUyIDUuOS01Ljk0LjcxLjd6Ii8+PC9zdmc+';
|
|
@@ -26,6 +26,10 @@ const inputEmailSvg = 'data:image/svg+xml;base64,PCEtLSBTUERYLUZpbGVDb3B5cmlnaHR
|
|
|
26
26
|
|
|
27
27
|
const inputMonthSvg = 'data:image/svg+xml;base64,PCEtLSBTUERYLUZpbGVDb3B5cmlnaHRUZXh0OiDCqSAyMDI1IFNjaG5laWRlciBFbGVjdHJpYyBTUERYLUxpY2Vuc2UtSWRlbnRpZmllcjogQXBhY2hlLTIuMCAtLT4KPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCAyMCAyMCI+PHBhdGggc3Ryb2tlPSJjdXJyZW50Q29sb3IiIGQ9Ik0xLjUgOC41aDE3bS0xMiAwdjltNy05djltLTEyLTZoMTdtLTE3IDNoMTdtLTE3LTEwaDE3djEzaC0xN3ptNi0xdjJhMSAxIDAgMCAxLTIgMHYtMmExIDEgMCAwIDEgMiAwWm03IDB2MmExIDEgMCAxIDEtMiAwdi0yYTEgMSAwIDEgMSAyIDBaIi8+PC9zdmc+';
|
|
28
28
|
|
|
29
|
+
const inputPasswordHideSvg = 'data:image/svg+xml;base64,PCEtLSBTU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TcuMjIzLjUgMTEuMDgxLjUgMTEuMDgxYzEuOTUtMy43NjcgNy4xMDItMy44MTcgNy4xMDItMy44MTdsLjAyMi4wM2EzLjMwNCAzLjMwNCAwIDEgMCAyLjYxNy0uNTY4Ii8+PC9zdmc+';
|
|
32
|
+
|
|
29
33
|
const inputSearchSvg = 'data:image/svg+xml;base64,PCEtLSBTUERYLUZpbGVDb3B5cmlnaHRUZXh0OiDCqSAyMDI1IFNjaG5laWRlciBFbGVjdHJpYyBTUERYLUxpY2Vuc2UtSWRlbnRpZmllcjogQXBhY2hlLTIuMCAtLT4KPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHBhdGggZD0iTTMuOTUgNi45NmgxYzAtMS4xMi45MS0yLjAyIDIuMDItMi4wMnYtMWMtMS42NyAwLTMuMDIgMS4zNi0zLjAyIDMuMDJabTEwLjA4IDYuMzZMOS45OSA5LjI4Yy42My0uNzkgMS4wMy0xLjc4IDEuMDMtMi44NmE0LjYgNC42IDAgMCAwLTQuNi00LjZjLTIuNTQgMC00LjYgMi4wNy00LjYgNC42czIuMDYgNC42IDQuNiA0LjZjMS4wOSAwIDIuMDgtLjQgMi44Ni0xLjAzbDQuMDQgNC4wNHptLTcuNjEtMy4zYy0xLjk5IDAtMy42LTEuNjItMy42LTMuNnMxLjYyLTMuNiAzLjYtMy42IDMuNiAxLjYyIDMuNiAzLjYtMS42MiAzLjYtMy42IDMuNloiLz48L3N2Zz4=';
|
|
30
34
|
|
|
31
35
|
const inputTelSvg = 'data:image/svg+xml;base64,PCEtLSBTUERYLUZpbGVDb3B5cmlnaHRUZXh0OiDCqSAyMDI1IFNjaG5laWRlciBFbGVjdHJpYyBTUERYLUxpY2Vuc2UtSWRlbnRpZmllcjogQXBhY2hlLTIuMCAtLT4KPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCAyMCAyMCI+PHBhdGggc3Ryb2tlPSJjdXJyZW50Q29sb3IiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS1taXRlcmxpbWl0PSIzLjg2NCIgZD0ibTEgMTUuNTAyIDIuNDcyIDIuMjcyYy42Ni0uMDE3IDEuNDY4LTEuMjU0IDIuNTI4LTIuMjcyIDIuMDg2LTIuMDAyIDIuMzc2LTIuMDc1IDIuMTc2LTIuMjM1LjE2MS4yLTIuMDA2LTEuNDgxLTIuMDA2LTEuNDgxczEuNDkyLTEuNjczIDMuMzY4LTMuMDM2YTExNyAxMTcgMCAwIDEgMy40NDItMi40MDNsLjk5NCAyLjQwM3MuOTMzLS41MzYgMi42ODgtMi4wNThDMTguMjI3IDUuMzM3IDE5LjUgNC41NTQgMTkuNSA0LjU1NGwtMi0yLjU1MlMxMi44MiAxLjc5IDYuOTMzIDYuMjI4QzIuNTc0IDkuNTEzIDEgMTUuNTAyIDEgMTUuNTAyWiIvPjwvc3ZnPg==';
|
|
@@ -65,6 +69,8 @@ const icons = {
|
|
|
65
69
|
'input-datetime-local': inputDatetimeLocalSvg,
|
|
66
70
|
'input-email': inputEmailSvg,
|
|
67
71
|
'input-search': inputSearchSvg,
|
|
72
|
+
'input-password-hide': inputPasswordHideSvg,
|
|
73
|
+
'input-password-show': inputPasswordShowSvg,
|
|
68
74
|
navigation: navigationSvg,
|
|
69
75
|
next: nextSvg,
|
|
70
76
|
'new-tab-link': externalLinkSvg,
|
|
@@ -220,7 +226,7 @@ const Icon = /*@__PURE__*/ proxyCustomElement(class Icon extends H {
|
|
|
220
226
|
await this.setIcon();
|
|
221
227
|
}
|
|
222
228
|
render() {
|
|
223
|
-
return (h("div", { key: '
|
|
229
|
+
return (h("div", { key: 'b3221eb14c7e0bcc6516b6d486429755186eaf60', class: "qds-container" }, h("span", { key: '36e1438b3525387f1fc9f75aff7c648433f47cf0', class: "qds-icon-wrapper", innerHTML: this.svg }), h("div", { key: '8eb2b41ce0e33002aff177902c851dc2604fd16a', class: "qds-click-target" })));
|
|
224
230
|
}
|
|
225
231
|
get host() { return this; }
|
|
226
232
|
static get watchers() { return {
|
|
@@ -253,4 +259,4 @@ function defineCustomElement() {
|
|
|
253
259
|
|
|
254
260
|
export { Icon as I, defineCustomElement as d, registerIconLibrary as r, unregisterIconLibrary as u };
|
|
255
261
|
|
|
256
|
-
//# sourceMappingURL=p-
|
|
262
|
+
//# sourceMappingURL=p-72c09714.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"p-72c09714.js","mappings":";;;;;;;;AAAA,MAAM,UAAU,GAAG,4UAA4U;;ACA/V,MAAM,QAAQ,GAAG,wgBAAwgB;;ACAzhB,MAAM,YAAY,GAAG,wvBAAwvB;;ACA7wB,MAAM,WAAW,GAAG,gVAAgV;;ACApW,MAAM,eAAe,GAAG,oeAAoe;;ACA5f,MAAM,gBAAgB,GAAG,gUAAgU;;ACAzV,MAAM,YAAY,GAAG,weAAwe;;ACA7f,MAAM,qBAAqB,GAAG,weAAwe;;ACAtgB,MAAM,aAAa,GAAG,4WAA4W;;ACAlY,MAAM,aAAa,GAAG,weAAwe;;ACA9f,MAAM,oBAAoB,GAAG,gpBAAgpB;;ACA7qB,MAAM,oBAAoB,GAAG,wiBAAwiB;;ACArkB,MAAM,cAAc,GAAG,4pBAA4pB;;ACAnrB,MAAM,WAAW,GAAG,wwBAAwwB;;ACA5xB,MAAM,YAAY,GAAG,o2BAAo2B;;ACAz3B,MAAM,WAAW,GAAG,wtBAAwtB;;ACA5uB,MAAM,YAAY,GAAG,weAAwe;;ACA7f,MAAM,aAAa,GAAG,gVAAgV;;ACAtW,MAAM,OAAO,GAAG,gXAAgX;;ACAhY,MAAM,cAAc,GAAG,oZAAoZ;;ACA3a,MAAM,aAAa,GAAG,wVAAwV;;ACA9W,MAAM,gBAAgB,GAAG,gtBAAgtB;;ACAzuB;AAkCA,MAAM,KAAK,GAAuC;;WAEhDA,QAAK;aAC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E,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,uBAAA,IAAI,iCAAqB,CAAC;oBAClE,IAAI,KAAK,KAAK,SAAS;wBAAE,UAAU,CAAC,YAAY,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;gBAC9D,IAAI,CAAC,GAAG,GAAG,UAAU,CAAC,SAAS,CAAA;gBAC/B,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,CAAA;aACxB;SACF;QAAC,MAAM;YACN,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,CAAA;SACzB;KACF;IAEM,MAAM,iBAAiB;QAC5B,uBAAA,IAAI,6BAAwB,qBAAqB,CAAC,IAAI,CAAC,IAAI,CAAC,MAAA,CAAA;QAC5D,MAAM,IAAI,CAAC,OAAO,EAAE,CAAA;KACrB;IAEM,MAAM;QACX,QACE,4DAAK,KAAK,EAAC,eAAe,IACxB,6DAAM,KAAK,EAAC,kBAAkB,EAAC,SAAS,EAAE,IAAI,CAAC,GAAG,GAAI,EACtD,4DAAK,KAAK,EAAC,kBAAkB,GAAG,CAC5B,EACP;KACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["clear","checked","draggable","dropdown","externalLink","indeterminate","inputMonth","inputTel","inputWeek","inputUrl","inputTime","inputDate","inputDatetimeLocal","inputEmail","inputSearch","inputPasswordHide","inputPasswordShow","navigation","next","statusError","statusInfo","statusWarning","defaultLibrary"],"sources":["../../node_modules/@quartzds/generic-icons-core/dist/checked.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-info.svg","../../node_modules/@quartzds/generic-icons-core/dist/status-warning.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 d=\"M6.31 11.86 3.08 8.63l.71-.71 2.52 2.52 5.9-5.94.71.7z\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 16 16\"><path fill=\"currentColor\" d=\"m11.43 5.26-.71-.7-2.74 2.76-2.73-2.76-.71.7 2.74 2.77-2.74 2.77.71.71 2.73-2.77 2.74 2.77.71-.71-2.74-2.77z\"/><circle cx=\"8\" cy=\"8\" r=\"7.5\" stroke=\"currentColor\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\"><path d=\"M4.96 0a2.148 2.148 0 1 1 0 4.297A2.148 2.148 0 0 1 4.96 0zM2.812 17.852a2.148 2.148 0 1 0 4.297 0 2.148 2.148 0 0 0-4.297 0zm0-7.852a2.148 2.148 0 1 0 4.297 0 2.148 2.148 0 0 0-4.297 0zm10.079-7.852a2.148 2.148 0 1 0 4.297 0 2.148 2.148 0 0 0-4.297 0zm0 15.704a2.148 2.148 0 1 0 4.297 0 2.148 2.148 0 0 0-4.297 0zm0-7.852a2.148 2.148 0 1 0 4.297 0 2.148 2.148 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 16 16\"><path d=\"M7.95 12.39 2.06 4.76l.79-.61 5.11 6.62 5.23-6.63.78.62z\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\"><path fill=\"currentColor\" fill-rule=\"evenodd\" d=\"M13.16 0H20v6.72h-1.03V1.76l-6.46 6.46-.73-.73 6.46-6.46h-5.08zM0 3h11.05v1.02H1.03v14.95h15V8.53h1.02V20H0z\" clip-rule=\"evenodd\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\"><path fill=\"none\" stroke=\"currentColor\" d=\"M.5 10h19\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 20 20\"><path stroke=\"currentColor\" d=\"M1.5 8.5h17m-12 0v9m7-9v9m-12-6h17m-17 3h17m-17-10h17v13h-17zm6-1v2a1 1 0 0 1-2 0v-2a1 1 0 0 1 2 0Zm7 0v2a1 1 0 1 1-2 0v-2a1 1 0 1 1 2 0Z\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 20 20\"><path stroke=\"currentColor\" d=\"M1.5 8.5h17m-12 0v9m7-9v9m-12-6h17m-17 3h17m-17-10h17v13h-17zm6-1v2a1 1 0 0 1-2 0v-2a1 1 0 0 1 2 0Zm7 0v2a1 1 0 1 1-2 0v-2a1 1 0 1 1 2 0Z\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 20 20\"><path stroke=\"currentColor\" d=\"M.5 2.5h19m-19 0v15h19v-15m-19 0 9.5 8 9.5-8\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 20 20\"><path stroke=\"currentColor\" d=\"M1.5 8.5h17m-12 0v9m7-9v9m-12-6h17m-17 3h17m-17-10h17v13h-17zm6-1v2a1 1 0 0 1-2 0v-2a1 1 0 0 1 2 0Zm7 0v2a1 1 0 1 1-2 0v-2a1 1 0 1 1 2 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 20 20\"><path fill=\"none\" stroke=\"currentColor\" d=\"m.5.5 19 19m-3.443-5.82c1.006-.79 1.997-1.626 3.443-2.239-.463-.892-2.811-6.857-10.245-6.823m2.995 7.646a3.304 3.304 0 1 1-4.624-4.608l-.022-.03s-5.153.05-7.102 3.817c0 0 3.582 6.142 11.56 4.325a8.2 8.2 0 0 0 2.599-1.078m-1.781-4.367a3.305 3.305 0 0 0-2.638-3.237\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\"><path fill=\"none\" stroke=\"currentColor\" d=\"M9.255 4.258c7.435-.033 9.783 5.931 10.245 6.823-3.036 1.289-4.07 3.558-7.44 4.325C4.082 17.223.5 11.081.5 11.081c1.95-3.767 7.102-3.817 7.102-3.817l.022.03a3.304 3.304 0 1 0 2.617-.568\"/></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 d=\"M3.95 6.96h1c0-1.12.91-2.02 2.02-2.02v-1c-1.67 0-3.02 1.36-3.02 3.02Zm10.08 6.36L9.99 9.28c.63-.79 1.03-1.78 1.03-2.86a4.6 4.6 0 0 0-4.6-4.6c-2.54 0-4.6 2.07-4.6 4.6s2.06 4.6 4.6 4.6c1.09 0 2.08-.4 2.86-1.03l4.04 4.04zm-7.61-3.3c-1.99 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6Z\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 20 20\"><path stroke=\"currentColor\" stroke-linejoin=\"round\" stroke-miterlimit=\"3.864\" d=\"m1 15.502 2.472 2.272c.66-.017 1.468-1.254 2.528-2.272 2.086-2.002 2.376-2.075 2.176-2.235.161.2-2.006-1.481-2.006-1.481s1.492-1.673 3.368-3.036a117 117 0 0 1 3.442-2.403l.994 2.403s.933-.536 2.688-2.058C18.227 5.337 19.5 4.554 19.5 4.554l-2-2.552S12.82 1.79 6.933 6.228C2.574 9.513 1 15.502 1 15.502Z\"/></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 d=\"m13.31 5 .71-.71-2.32-2.32-.71.71.8.8-.64.64c-.86-.71-1.95-1.16-3.16-1.16S5.7 3.4 4.84 4.11l-.63-.63.8-.8-.71-.71-2.32 2.32.71.71.8-.8.63.63a4.97 4.97 0 0 0-1.14 3.14c0 1.68.84 3.16 2.12 4.07l-1.25 1.25.71.71 1.45-1.45c.61.26 1.28.41 1.98.41s1.31-.14 1.89-.38l1.36 1.36.71-.71-1.15-1.15c1.32-.9 2.19-2.41 2.19-4.13 0-1.19-.44-2.27-1.14-3.13l.64-.64zM8 11.97c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4Zm.49-6.59h-1v2.79l2.16 2.16.71-.71-1.87-1.87z\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 20 20\"><path stroke=\"currentColor\" stroke-linejoin=\"round\" d=\"M10.01.5v19m0-19a9.5 9.5 0 0 1 9.5 9.5M10.01.5C5.387.5.5 4.5.5 10.5m9.51-10s-5.537 3-5.537 10.716c0 5.284 5.537 8.284 5.537 8.284m0-19s5.426 3 5.426 10.716c0 5.284-5.426 8.284-5.426 8.284m0 0c-5.079 0-9.227-3.986-9.487-9.001M10.01 19.5a9.5 9.5 0 0 0 9.5-9.5m0 0c-.795.277-9.01 3.603-19.018.38\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 20 20\"><path stroke=\"currentColor\" d=\"M1.5 8.5h17m-12 0v9m7-9v9m-12-6h17m-17 3h17m-17-10h17v13h-17zm6-1v2a1 1 0 0 1-2 0v-2a1 1 0 0 1 2 0Zm7 0v2a1 1 0 1 1-2 0v-2a1 1 0 1 1 2 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 16 16\"><path d=\"m4.77 13.97-.62-.78 6.62-5.23-6.62-5.11.61-.79 7.63 5.89z\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\"><path stroke=\"currentColor\" d=\"m5.495.5 8.664 8.664c.462.462.462 1.21 0 1.672L5.495 19.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 d=\"m11.43 5.26-.71-.7-2.74 2.76-2.73-2.76-.71.7 2.74 2.77-2.74 2.77.71.71 2.73-2.77 2.74 2.77.71-.71-2.74-2.77z\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\"><path fill=\"currentColor\" d=\"M9 4h2.41v2.15H9zm.13 12.51V7.97h2.18v8.54z\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\"><path fill=\"currentColor\" d=\"M9.57 12.48c-.13-.12-.2-.29-.23-.52l-.67-7-.02-.18c0-.37.13-.67.39-.89s.58-.33.98-.33.72.11.98.33.39.52.39.89l-.02.2-.67 6.98c-.02.23-.1.4-.23.52a.65.65 0 0 1-.46.18.65.65 0 0 1-.46-.18zm-.5 3.57a1.34 1.34 0 0 1-.38-.96 1.32 1.32 0 0 1 1.33-1.35c.38 0 .7.13.95.39s.38.58.38.96a1.32 1.32 0 0 1-1.33 1.35c-.38 0-.7-.13-.95-.39Z\"/></svg>","// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\n// FIXME: TypeScript and Webpack can resolve exports from the package.json\n// `exports` field but Rollup can't. `@quartzds/generic-icons-core/*.svg`\n// _should_ work but it doesn't.\n/* eslint-disable import/no-unresolved */\nimport checked from '@quartzds/generic-icons-core/dist/checked.svg'\nimport clear from '@quartzds/generic-icons-core/dist/clear.svg'\nimport draggable from '@quartzds/generic-icons-core/dist/draggable.svg'\nimport dropdown from '@quartzds/generic-icons-core/dist/dropdown.svg'\nimport externalLink from '@quartzds/generic-icons-core/dist/external-link.svg'\nimport indeterminate from '@quartzds/generic-icons-core/dist/indeterminate.svg'\nimport inputDate from '@quartzds/generic-icons-core/dist/input-date.svg'\nimport inputDatetimeLocal from '@quartzds/generic-icons-core/dist/input-datetime-local.svg'\nimport inputEmail from '@quartzds/generic-icons-core/dist/input-email.svg'\nimport inputMonth from '@quartzds/generic-icons-core/dist/input-month.svg'\nimport inputPasswordHide from '@quartzds/generic-icons-core/dist/input-password-hide.svg'\nimport inputPasswordShow from '@quartzds/generic-icons-core/dist/input-password-show.svg'\nimport inputSearch from '@quartzds/generic-icons-core/dist/input-search.svg'\nimport inputTel from '@quartzds/generic-icons-core/dist/input-tel.svg'\nimport inputTime from '@quartzds/generic-icons-core/dist/input-time.svg'\nimport inputUrl from '@quartzds/generic-icons-core/dist/input-url.svg'\nimport inputWeek from '@quartzds/generic-icons-core/dist/input-week.svg'\nimport navigation from '@quartzds/generic-icons-core/dist/navigation.svg'\nimport next from '@quartzds/generic-icons-core/dist/next.svg'\nimport statusError from '@quartzds/generic-icons-core/dist/status-error.svg'\nimport statusInfo from '@quartzds/generic-icons-core/dist/status-info.svg'\nimport statusWarning from '@quartzds/generic-icons-core/dist/status-warning.svg'\n\n/* eslint-enable import/no-unresolved */\nimport type { IconLibrary } from './library'\n\nconst icons: Record<string, string | undefined> = {\n /* eslint-disable @typescript-eslint/naming-convention */\n clear,\n checked,\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 'new-tab-link': externalLink,\n close: statusError,\n 'status-error': statusError,\n 'status-info': statusInfo,\n 'status-success': checked,\n 'status-warning': statusWarning,\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\n.qds-click-target {\n height: var(--qds-experimental-icon-click-target-size);\n left: calc(-1 * (var(--qds-experimental-icon-click-target-size) - 100%) / 2);\n position: absolute;\n top: calc(-1 * (var(--qds-experimental-icon-click-target-size) - 100%) / 2);\n width: var(--qds-experimental-icon-click-target-size);\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 class=\"qds-click-target\" />\n </div>\n )\n }\n}\n"],"version":3}
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
*
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { p as proxyCustomElement, H, c as createEvent, h } from './p-
|
|
6
|
+
import { p as proxyCustomElement, H, c as createEvent, h } from './p-50f85f75.js';
|
|
7
7
|
import { p as pickFocusEventAttributes, i as inheritAriaAttributes } from './p-8abba29b.js';
|
|
8
8
|
import { V as VALID_STATE, C as CUSTOM_ERROR_FLAGS, N as NO_ERROR_FLAGS } from './p-d107c90c.js';
|
|
9
|
-
import { d as defineCustomElement$3 } from './p-
|
|
10
|
-
import { d as defineCustomElement$2 } from './p-
|
|
11
|
-
import { d as defineCustomElement$1 } from './p-
|
|
9
|
+
import { d as defineCustomElement$3 } from './p-72c09714.js';
|
|
10
|
+
import { d as defineCustomElement$2 } from './p-b5608061.js';
|
|
11
|
+
import { d as defineCustomElement$1 } from './p-70d12c72.js';
|
|
12
12
|
|
|
13
|
-
const checkboxCss = ":host([hidden]){display:none!important}:host{display:inline-block;line-height:0}.qds-box,.qds-checkbox,.qds-icon{grid-area:
|
|
13
|
+
const checkboxCss = ":host([hidden]){display:none!important}:host{display:inline-block;line-height:0}.qds-box,.qds-checkbox,.qds-icon{grid-area:a;place-self:center}.qds-box,.qds-icon{display:none;pointer-events:none}.qds-box{border-radius:var(--qds-control-toggle-indicator-border-radius)}.qds-container{align-self:flex-start;display:grid;grid-template-areas:\"a\"}.qds-icon{color:var(--qds-theme-signature-color-contrast)}.qds-label{cursor:pointer;display:inline-flex;width:inherit}.qds-label-inner{flex:1 1 auto;min-width:0}.qds-checkbox{-webkit-appearance:none;appearance:none;background-color:var(--qds-theme-control-input-background);border:var(--qds-control-border-width) solid var(--qds-theme-control-border);border-radius:var(--qds-control-border-radius);cursor:pointer;margin:0;-webkit-print-color-adjust:exact;print-color-adjust:exact}.qds-checkbox:focus-visible{outline:var(--qds-theme-focus-border) solid var(--qds-focus-border-width);outline-offset:var(--qds-focus-border-offset)}.qds-checkbox:active~.qds-box,.qds-checkbox:hover~.qds-box{display:block}.qds-checkbox:hover~.qds-box{background-color:var(--qds-theme-signature-color-hover)}.qds-checkbox:active~.qds-box{background-color:var(--qds-theme-signature-color-pressed)}.qds-checkbox:checked~.qds-checked,.qds-checkbox:indeterminate~.qds-indeterminate{display:block}.qds-checkbox:checked,.qds-checkbox:indeterminate{background-color:var(--qds-theme-signature-color-default);border-color:#0000}.qds-checkbox:checked:hover,.qds-checkbox:indeterminate:hover{background-color:var(--qds-theme-signature-color-hover)}.qds-checkbox:checked:active,.qds-checkbox:indeterminate:active{background-color:var(--qds-theme-signature-color-pressed)}[aria-disabled=true]{opacity:var(--qds-theme-disabled);pointer-events:none}.qds-checkbox[data-size=small]{height:var(--qds-control-toggle-box-small-size);width:var(--qds-control-toggle-box-small-size)}.qds-icon[data-size=small]{font-size:var(--qds-control-small-icon-size)}.qds-box[data-size=small]{height:var(--qds-control-toggle-indicator-small-size);width:var(--qds-control-toggle-indicator-small-size)}.qds-inline[data-size=small]{margin-block:var(--qds-control-small-padding-auto-height)}.qds-label[data-size=small]{gap:var(--qds-control-small-gap-siblings-related)}.qds-checkbox[data-size=standard]{height:var(--qds-control-toggle-box-standard-size);width:var(--qds-control-toggle-box-standard-size)}.qds-icon[data-size=standard]{font-size:var(--qds-control-standard-icon-size)}.qds-box[data-size=standard]{height:var(--qds-control-toggle-indicator-standard-size);width:var(--qds-control-toggle-indicator-standard-size)}.qds-inline[data-size=standard]{margin-block:var(--qds-control-standard-padding-auto-height)}.qds-label[data-size=standard]{gap:var(--qds-control-standard-gap-siblings-related)}.qds-checkbox[data-size=large]{height:var(--qds-control-toggle-box-large-size);width:var(--qds-control-toggle-box-large-size)}.qds-icon[data-size=large]{font-size:var(--qds-control-large-icon-size)}.qds-box[data-size=large]{height:var(--qds-control-toggle-indicator-large-size);width:var(--qds-control-toggle-indicator-large-size)}.qds-inline[data-size=large]{margin-block:var(--qds-control-large-padding-auto-height)}.qds-label[data-size=large]{gap:var(--qds-control-large-gap-siblings-related)}";
|
|
14
14
|
const QdsCheckboxStyle0 = checkboxCss;
|
|
15
15
|
|
|
16
16
|
// SPDX-FileCopyrightText: © 2024 Schneider Electric
|
|
@@ -178,7 +178,7 @@ const Checkbox = /*@__PURE__*/ proxyCustomElement(class Checkbox extends H {
|
|
|
178
178
|
}, "data-size": __classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_computedSize_get), library: "core", name: "checked" }), h("div", { key: 'cc97d644310d3abdb01d115dbfe6e9f2a7a1ba30', class: "qds-box", "data-size": __classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_computedSize_get) }), h("qds-icon", { key: '23fa431abd3bee1a88be51e243d5c7518732825d', "aria-hidden": "true", class: {
|
|
179
179
|
'qds-icon': true,
|
|
180
180
|
'qds-indeterminate': true,
|
|
181
|
-
}, "data-size": __classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_computedSize_get), library: "core", name: "indeterminate" })), __classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_hasText_get) && (h("qds-label", { key: '
|
|
181
|
+
}, "data-size": __classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_computedSize_get), library: "core", name: "indeterminate" })), __classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_hasText_get) && (h("qds-label", { key: 'c412f04c3558b1e1513c67cc314d624ab83f2b15', class: "qds-label-inner", required: this.required, size: this.size, text: this.text }))));
|
|
182
182
|
}
|
|
183
183
|
static get delegatesFocus() { return true; }
|
|
184
184
|
static get formAssociated() { return true; }
|
|
@@ -269,4 +269,4 @@ function defineCustomElement() {
|
|
|
269
269
|
|
|
270
270
|
export { Checkbox as C, defineCustomElement as d };
|
|
271
271
|
|
|
272
|
-
//# sourceMappingURL=p-
|
|
272
|
+
//# sourceMapp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YACP,OAAO,UAAU,CAAA;SAClB;KACF;AACH,CAAC;;IAIC,OAAO,IAAI,CAAC,KAAK,IAAI,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAA;AAC1D,CAAC;IAGC,OAAO,CAAC,IAAI,CAAC,IAAI,KAAK,EAAE,IAAI,IAAI,CAAC,QAAQ,KAAK,IAAI,KAAK,CAAC,IAAI,CAAC,YAAY,CAAA;AAC3E,CAAC,2DAgJa,CAAc,EAAE,GAAkB;IAC9C,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAA;AAChE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"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-box,\n.qds-icon {\n grid-area: checkbox;\n place-self: center;\n}\n\n.qds-icon,\n.qds-box {\n display: none;\n pointer-events: none;\n}\n\n.qds-box {\n border-radius: var(--qds-control-toggle-indicator-border-radius);\n}\n\n.qds-container {\n display: grid;\n align-self: flex-start;\n grid-template-areas: 'checkbox';\n}\n\n.qds-icon {\n color: var(--qds-theme-signature-color-contrast);\n}\n\n.qds-label {\n cursor: pointer;\n display: inline-flex;\n width: inherit;\n}\n\n.qds-label-inner {\n flex: 1 1 auto;\n min-width: 0;\n}\n\n.qds-checkbox {\n appearance: none;\n background-color: var(--qds-theme-control-input-background);\n border-radius: var(--qds-control-border-radius);\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: var(--qds-theme-focus-border) solid var(--qds-focus-border-width);\n outline-offset: var(--qds-focus-border-offset);\n }\n\n &:hover ~ .qds-box,\n &:active ~ .qds-box {\n display: block;\n }\n\n &:hover ~ .qds-box {\n background-color: var(--qds-theme-signature-color-hover);\n }\n\n &:active ~ .qds-box {\n background-color: var(--qds-theme-signature-color-pressed);\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-signature-color-default);\n border-color: transparent;\n\n &:hover {\n background-color: var(--qds-theme-signature-color-hover);\n }\n\n &:active {\n background-color: var(--qds-theme-signature-color-pressed);\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 &.qds-checkbox {\n width: var(--qds-control-toggle-box-small-size);\n height: var(--qds-control-toggle-box-small-size);\n }\n\n &.qds-icon {\n font-size: var(--qds-control-small-icon-size);\n }\n\n &.qds-box {\n width: var(--qds-control-toggle-indicator-small-size);\n height: var(--qds-control-toggle-indicator-small-size);\n }\n\n &.qds-inline {\n margin-block: var(--qds-control-small-padding-auto-height);\n }\n\n &.qds-label {\n gap: var(--qds-control-small-gap-siblings-related);\n }\n}\n\n[data-size='standard'] {\n &.qds-checkbox {\n width: var(--qds-control-toggle-box-standard-size);\n height: var(--qds-control-toggle-box-standard-size);\n }\n\n &.qds-icon {\n font-size: var(--qds-control-standard-icon-size);\n }\n\n &.qds-box {\n width: var(--qds-control-toggle-indicator-standard-size);\n height: var(--qds-control-toggle-indicator-standard-size);\n }\n\n &.qds-inline {\n margin-block: var(--qds-control-standard-padding-auto-height);\n }\n\n &.qds-label {\n gap: var(--qds-control-standard-gap-siblings-related);\n }\n}\n\n[data-size='large'] {\n &.qds-checkbox {\n width: var(--qds-control-toggle-box-large-size);\n height: var(--qds-control-toggle-box-large-size);\n }\n\n &.qds-icon {\n font-size: var(--qds-control-large-icon-size);\n }\n\n &.qds-box {\n width: var(--qds-control-toggle-indicator-large-size);\n height: var(--qds-control-toggle-indicator-large-size);\n }\n\n &.qds-inline {\n margin-block: var(--qds-control-large-padding-auto-height);\n }\n\n &.qds-label {\n gap: var(--qds-control-large-gap-siblings-related);\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 <div class=\"qds-box\" data-size={this.#computedSize} />\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 />\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}
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { p as proxyCustomElement, H, h } from './p-
|
|
6
|
+
import { p as proxyCustomElement, H, h } from './p-50f85f75.js';
|
|
7
7
|
import { i as inheritAriaAttributes } from './p-8abba29b.js';
|
|
8
|
-
import { d as defineCustomElement$1 } from './p-
|
|
8
|
+
import { d as defineCustomElement$1 } from './p-72c09714.js';
|
|
9
9
|
|
|
10
10
|
const titleCss = ":host([hidden]){display:none!important}:host{display:block}.qds-titles{display:grid;grid-template-areas:\"e\"}.qds-titles.qds-has-kicker{grid-template-areas:\"f\" \"e\"}.qds-titles.qds-has-subtitle{grid-template-areas:\"e\" \"g\"}.qds-titles.qds-has-kicker.qds-has-subtitle{grid-template-areas:\"f\" \"e\" \"g\"}.qds-has-icon{grid-template-areas:\"h e\";grid-template-columns:auto 1fr}.qds-has-icon.qds-has-kicker{grid-template-areas:\". f\" \"h e\"}.qds-has-icon.qds-has-subtitle{grid-template-areas:\"h e\" \". g\"}.qds-has-icon.qds-has-kicker.qds-has-subtitle{grid-template-areas:\". f\" \"h e\" \". g\"}.qds-kicker,.qds-subtitle,.qds-title{margin-block:0}.qds-title{color:var(--qds-theme-title);grid-area:e}.qds-subtitle{color:var(--qds-theme-subtitle);grid-area:g}.qds-kicker{color:var(--qds-theme-kicker);grid-area:f}.qds-icon{align-content:center;color:var(--qds-theme-text-standard);grid-area:h}.qds-main.qds-section.qds-titles{gap:var(--qds-main-section-titles-gap)}.qds-main.qds-section.qds-has-icon{gap:var(--qds-main-section-titles-gap) var(--qds-main-section-titles-icon-gap)}.qds-main.qds-section .qds-title{font:var(--qds-main-section-title)}.qds-main.qds-section .qds-subtitle{font:var(--qds-main-section-subtitle)}.qds-main.qds-section .qds-kicker{font:var(--qds-main-section-kicker)}.qds-main.qds-section .qds-icon{height:var(--qds-main-section-titles-icon-crop-height);width:var(--qds-main-section-titles-icon-size)}.qds-main.qds-subsection.qds-titles{gap:var(--qds-main-subsection-titles-gap)}.qds-main.qds-subsection.qds-has-icon{gap:var(--qds-main-subsection-titles-gap) var(--qds-main-subsection-titles-icon-gap)}.qds-main.qds-subsection .qds-title{font:var(--qds-main-subsection-title)}.qds-main.qds-subsection .qds-subtitle{font:var(--qds-main-subsection-subtitle)}.qds-main.qds-subsection .qds-kicker{font:var(--qds-main-subsection-kicker)}.qds-main.qds-subsection .qds-icon{height:var(--qds-main-subsection-titles-icon-crop-height);width:var(--qds-main-subsection-titles-icon-size)}.qds-panel.qds-root.qds-titles{gap:var(--qds-panel-titles-gap)}.qds-panel.qds-root.qds-has-icon{gap:var(--qds-panel-titles-gap) var(--qds-panel-titles-icon-gap)}.qds-panel.qds-root .qds-title{font:var(--qds-panel-title)}.qds-panel.qds-root .qds-subtitle{font:var(--qds-panel-subtitle)}.qds-panel.qds-root .qds-kicker{font:var(--qds-panel-kicker)}.qds-panel.qds-root .qds-icon{height:var(--qds-panel-titles-icon-crop-height);width:var(--qds-panel-titles-icon-size)}.qds-panel.qds-section.qds-titles{gap:var(--qds-panel-section-titles-gap)}.qds-panel.qds-section.qds-has-icon{gap:var(--qds-panel-section-titles-gap) var(--qds-panel-section-titles-icon-gap)}.qds-panel.qds-section .qds-title{font:var(--qds-panel-section-title)}.qds-panel.qds-section .qds-subtitle{font:var(--qds-panel-section-subtitle)}.qds-panel.qds-section .qds-kicker{font:var(--qds-panel-section-kicker)}.qds-panel.qds-section .qds-icon{height:var(--qds-panel-section-titles-icon-crop-height);width:var(--qds-panel-section-titles-icon-size)}.qds-panel.qds-subsection.qds-titles{gap:var(--qds-panel-subsection-titles-gap)}.qds-panel.qds-subsection.qds-has-icon{gap:var(--qds-panel-subsection-titles-gap) var(--qds-panel-subsection-titles-icon-gap)}.qds-panel.qds-subsection .qds-title{font:var(--qds-panel-subsection-title)}.qds-panel.qds-subsection .qds-subtitle{font:var(--qds-panel-subsection-subtitle)}.qds-panel.qds-subsection .qds-kicker{font:var(--qds-panel-subsection-kicker)}.qds-panel.qds-subsection .qds-icon{height:var(--qds-panel-subsection-titles-icon-crop-height);width:var(--qds-panel-subsection-titles-icon-size)}.qds-navigation.qds-section.qds-titles{gap:var(--qds-navigation-section-titles-gap)}.qds-navigation.qds-section.qds-has-icon{gap:var(--qds-navigation-section-titles-gap) var(--qds-navigation-section-titles-icon-gap)}.qds-navigation.qds-section .qds-title{font:var(--qds-navigation-section-title)}.qds-navigation.qds-section .qds-subtitle{font:var(--qds-navigation-section-subtitle)}.qds-navigation.qds-section .qds-kicker{font:var(--qds-navigation-section-kicker)}.qds-navigation.qds-section .qds-icon{height:var(--qds-navigation-section-titles-icon-crop-height);width:var(--qds-navigation-section-titles-icon-size)}.qds-navigation.qds-subsection.qds-titles{gap:var(--qds-navigation-subsection-titles-gap)}.qds-navigation.qds-subsection.qds-has-icon{gap:var(--qds-navigation-subsection-titles-gap) var(--qds-navigation-subsection-titles-icon-gap)}.qds-navigation.qds-subsection .qds-title{font:var(--qds-navigation-subsection-title)}.qds-navigation.qds-subsection .qds-subtitle{font:var(--qds-navigation-subsection-subtitle)}.qds-navigation.qds-subsection .qds-kicker{font:var(--qds-navigation-subsection-kicker)}.qds-navigation.qds-subsection .qds-icon{height:var(--qds-navigation-subsection-titles-icon-crop-height);width:var(--qds-navigation-subsection-titles-icon-size)}.qds-popup.qds-root.qds-titles{gap:var(--qds-popup-titles-gap)}.qds-popup.qds-root.qds-has-icon{gap:var(--qds-popup-titles-gap) var(--qds-popup-titles-icon-gap)}.qds-popup.qds-root .qds-title{font:var(--qds-popup-title)}.qds-popup.qds-root .qds-subtitle{font:var(--qds-popup-subtitle)}.qds-popup.qds-root .qds-kicker{font:var(--qds-popup-kicker)}.qds-popup.qds-root .qds-icon{height:var(--qds-popup-titles-icon-crop-height);width:var(--qds-popup-titles-icon-size)}.qds-popup.qds-section.qds-titles{gap:var(--qds-popup-section-titles-gap)}.qds-popup.qds-section.qds-has-icon{gap:var(--qds-popup-section-titles-gap) var(--qds-popup-section-titles-icon-gap)}.qds-popup.qds-section .qds-title{font:var(--qds-popup-section-title)}.qds-popup.qds-section .qds-subtitle{font:var(--qds-popup-section-subtitle)}.qds-popup.qds-section .qds-kicker{font:var(--qds-popup-section-kicker)}.qds-popup.qds-section .qds-icon{height:var(--qds-popup-section-titles-icon-crop-height);width:var(--qds-popup-section-titles-icon-size)}.qds-popup.qds-subsection.qds-titles{gap:var(--qds-popup-subsection-titles-gap)}.qds-popup.qds-subsection.qds-has-icon{gap:var(--qds-popup-subsection-titles-gap) var(--qds-popup-subsection-titles-icon-gap)}.qds-popup.qds-subsection .qds-title{font:var(--qds-popup-subsection-title)}.qds-popup.qds-subsection .qds-subtitle{font:var(--qds-popup-subsection-subtitle)}.qds-popup.qds-subsection .qds-kicker{font:var(--qds-popup-subsection-kicker)}.qds-popup.qds-subsection .qds-icon{height:var(--qds-popup-subsection-titles-icon-crop-height);width:var(--qds-popup-subsection-titles-icon-size)}.qds-accessory.qds-root.qds-titles{gap:var(--qds-accessory-titles-gap)}.qds-accessory.qds-root.qds-has-icon{gap:var(--qds-accessory-titles-gap) var(--qds-accessory-titles-icon-gap)}.qds-accessory.qds-root .qds-title{font:var(--qds-accessory-title)}.qds-accessory.qds-root .qds-subtitle{font:var(--qds-accessory-subtitle)}.qds-accessory.qds-root .qds-kicker{font:var(--qds-accessory-kicker)}.qds-accessory.qds-root .qds-icon{height:var(--qds-accessory-titles-icon-crop-height);width:var(--qds-accessory-titles-icon-size)}.qds-accessory.qds-section.qds-titles{gap:var(--qds-accessory-section-titles-gap)}.qds-accessory.qds-section.qds-has-icon{gap:var(--qds-accessory-section-titles-gap) var(--qds-accessory-section-titles-icon-gap)}.qds-accessory.qds-section .qds-title{font:var(--qds-accessory-section-title)}.qds-accessory.qds-section .qds-subtitle{font:var(--qds-accessory-section-subtitle)}.qds-accessory.qds-section .qds-kicker{font:var(--qds-accessory-section-kicker)}.qds-accessory.qds-section .qds-icon{height:var(--qds-accessory-section-titles-icon-crop-height);width:var(--qds-accessory-section-titles-icon-size)}.qds-titles[data-variant=web-main-section-promo]:is(.qds-root,.qds-section,.qds-subsection){gap:var(--qds-main-section-promo-titles-gap);margin:auto}[data-variant=web-main-section-promo]:is(.qds-root,.qds-section,.qds-subsection) .qds-title{font:var(--qds-main-section-promo-title)}[data-variant=web-main-section-promo]:is(.qds-root,.qds-section,.qds-subsection) .qds-subtitle{font:var(--qds-main-section-promo-subtitle)}[data-variant=web-main-section-promo]:is(.qds-root,.qds-section,.qds-subsection) .qds-kicker{font:var(--qds-main-section-promo-kicker)}.qds-has-icon[data-variant=web-main-section-promo]:is(.qds-root,.qds-section,.qds-subsection){gap:var(--qds-main-section-promo-titles-gap) var(--qds-main-section-promo-titles-icon-gap)}[data-variant=web-main-section-promo]:is(.qds-root,.qds-section,.qds-subsection) .qds-icon{height:var(--qds-main-section-promo-titles-icon-crop-height);width:var(--qds-main-section-promo-titles-icon-size)}[data-alignment=start]{text-align:start}[data-alignment=center]{text-align:center}[data-alignment=end]{text-align:end}.qds-titles[data-variant=web-main-section-display]:is(.qds-root,.qds-section,.qds-subsection){gap:var(--qds-main-section-display-titles-gap)}[data-variant=web-main-section-display]:is(.qds-root,.qds-section,.qds-subsection) .qds-title{font:var(--qds-main-section-display-title)}.qds-titles[data-variant=web-main-subsection-card]:is(.qds-root,.qds-section,.qds-subsection){gap:var(--qds-main-subsection-card-titles-gap)}[data-variant=web-main-subsection-card]:is(.qds-root,.qds-section,.qds-subsection) .qds-title{font:var(--qds-main-subsection-card-title)}.qds-titles[data-variant=web-main-section-hero]:is(.qds-root,.qds-section,.qds-subsection){gap:var(--qds-main-section-hero-titles-gap)}[data-variant=web-main-section-hero]:is(.qds-root,.qds-section,.qds-subsection) .qds-title{font:var(--qds-main-section-hero-title)}";
|
|
11
11
|
const QdsTitleStyle0 = titleCss;
|
|
@@ -108,4 +108,4 @@ function defineCustomElement() {
|
|
|
108
108
|
|
|
109
109
|
export { Title as T, defineCustomElement as d };
|
|
110
110
|
|
|
111
|
-
//# sourceMappingURL=p-
|
|
111
|
+
//# sourceMappingURL=p-a529eb5c.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-3baf75f4.js","mappings":";;;;;;;;;AAAA,MAAM,QAAQ,GAAG,ixSAAixS,CAAC;AACnyS,uBAAe,QAAQ;;ACDvB;AACA;AACA;;;;;;;;;;;;;;;;;;MA4Ba,KAAK;IALlB;;;;;;;;QAS0B,cAAS,GAAe,OAAO,CAAA;;;;QAY/B,gBAAW,GAAW,SAAS,CAAA;QAO/B,UAAK,GAAW,MAAM,CAAA;QAEtB,UAAK,GAAW,SAAS,CAAA;;;;QAUzB,QAAG,GAAS,IAAI,CAAA;QASxC,qCAAmC,EAAE,EAAA;KAmDtC;IAzCQ,iBAAiB;QACtB,uBAAA,IAAI,8BAAwB,qBAAqB,CAAC,IAAI,CAAC,IAAI,CAAC,MAAA,CAAA;KAC7D;IAEM,MAAM;QACX,MAAM,KAAK,GAAG,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,CAAC;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/title/title.css?tag=qds-title&encapsulation=shadow","src/components/title/title.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: © 2024 Schneider Electric\n *\n * SPDX-License-Identifier: Apache-2.0\n */\n\n@import url('../shared.css');\n\n:host {\n display: block;\n}\n\n.qds-titles {\n display: grid;\n grid-template-areas: 'title';\n\n &.qds-has-kicker {\n grid-template-areas:\n 'kicker'\n 'title';\n }\n\n &.qds-has-subtitle {\n grid-template-areas:\n 'title'\n 'subtitle';\n }\n\n &.qds-has-kicker.qds-has-subtitle {\n grid-template-areas:\n 'kicker'\n 'title'\n 'subtitle';\n }\n}\n\n.qds-has-icon {\n grid-template-columns: auto 1fr;\n grid-template-areas: 'icon title';\n\n &.qds-has-kicker {\n grid-template-areas:\n '. kicker'\n 'icon title';\n }\n\n &.qds-has-subtitle {\n grid-template-areas:\n 'icon title'\n '. subtitle';\n }\n\n &.qds-has-kicker.qds-has-subtitle {\n grid-template-areas:\n '. kicker'\n 'icon title'\n '. subtitle';\n }\n}\n\n.qds-title,\n.qds-subtitle,\n.qds-kicker {\n margin-block: 0;\n}\n\n.qds-title {\n grid-area: title;\n color: var(--qds-theme-title);\n}\n\n.qds-subtitle {\n grid-area: subtitle;\n color: var(--qds-theme-subtitle);\n}\n\n.qds-kicker {\n grid-area: kicker;\n color: var(--qds-theme-kicker);\n}\n\n.qds-icon {\n grid-area: icon;\n align-content: center;\n color: var(--qds-theme-text-standard);\n}\n\n.qds-main {\n &.qds-section {\n &.qds-titles {\n gap: var(--qds-main-section-titles-gap);\n }\n\n &.qds-has-icon {\n gap: var(--qds-main-section-titles-gap)\n var(--qds-main-section-titles-icon-gap);\n }\n\n & .qds-title {\n font: var(--qds-main-section-title);\n }\n\n & .qds-subtitle {\n font: var(--qds-main-section-subtitle);\n }\n\n & .qds-kicker {\n font: var(--qds-main-section-kicker);\n }\n\n & .qds-icon {\n width: var(--qds-main-section-titles-icon-size);\n height: var(--qds-main-section-titles-icon-crop-height);\n }\n }\n\n &.qds-subsection {\n &.qds-titles {\n gap: var(--qds-main-subsection-titles-gap);\n }\n\n &.qds-has-icon {\n gap: var(--qds-main-subsection-titles-gap)\n var(--qds-main-subsection-titles-icon-gap);\n }\n\n & .qds-title {\n font: var(--qds-main-subsection-title);\n }\n\n & .qds-subtitle {\n font: var(--qds-main-subsection-subtitle);\n }\n\n & .qds-kicker {\n font: var(--qds-main-subsection-kicker);\n }\n\n & .qds-icon {\n width: var(--qds-main-subsection-titles-icon-size);\n height: var(--qds-main-subsection-titles-icon-crop-height);\n }\n }\n}\n\n.qds-panel {\n &.qds-root {\n &.qds-titles {\n gap: var(--qds-panel-titles-gap);\n }\n\n &.qds-has-icon {\n gap: var(--qds-panel-titles-gap) var(--qds-panel-titles-icon-gap);\n }\n\n & .qds-title {\n font: var(--qds-panel-title);\n }\n\n & .qds-subtitle {\n font: var(--qds-panel-subtitle);\n }\n\n & .qds-kicker {\n font: var(--qds-panel-kicker);\n }\n\n & .qds-icon {\n width: var(--qds-panel-titles-icon-size);\n height: var(--qds-panel-titles-icon-crop-height);\n }\n }\n\n &.qds-section {\n &.qds-titles {\n gap: var(--qds-panel-section-titles-gap);\n }\n\n &.qds-has-icon {\n gap: var(--qds-panel-section-titles-gap)\n var(--qds-panel-section-titles-icon-gap);\n }\n\n & .qds-title {\n font: var(--qds-panel-section-title);\n }\n\n & .qds-subtitle {\n font: var(--qds-panel-section-subtitle);\n }\n\n & .qds-kicker {\n font: var(--qds-panel-section-kicker);\n }\n\n & .qds-icon {\n width: var(--qds-panel-section-titles-icon-size);\n height: var(--qds-panel-section-titles-icon-crop-height);\n }\n }\n\n &.qds-subsection {\n &.qds-titles {\n gap: var(--qds-panel-subsection-titles-gap);\n }\n\n &.qds-has-icon {\n gap: var(--qds-panel-subsection-titles-gap)\n var(--qds-panel-subsection-titles-icon-gap);\n }\n\n & .qds-title {\n font: var(--qds-panel-subsection-title);\n }\n\n & .qds-subtitle {\n font: var(--qds-panel-subsection-subtitle);\n }\n\n & .qds-kicker {\n font: var(--qds-panel-subsection-kicker);\n }\n\n & .qds-icon {\n width: var(--qds-panel-subsection-titles-icon-size);\n height: var(--qds-panel-subsection-titles-icon-crop-height);\n }\n }\n}\n\n.qds-navigation {\n &.qds-section {\n &.qds-titles {\n gap: var(--qds-navigation-section-titles-gap);\n }\n\n &.qds-has-icon {\n gap: var(--qds-navigation-section-titles-gap)\n var(--qds-navigation-section-titles-icon-gap);\n }\n\n & .qds-title {\n font: var(--qds-navigation-section-title);\n }\n\n & .qds-subtitle {\n font: var(--qds-navigation-section-subtitle);\n }\n\n & .qds-kicker {\n font: var(--qds-navigation-section-kicker);\n }\n\n & .qds-icon {\n width: var(--qds-navigation-section-titles-icon-size);\n height: var(--qds-navigation-section-titles-icon-crop-height);\n }\n }\n\n &.qds-subsection {\n &.qds-titles {\n gap: var(--qds-navigation-subsection-titles-gap);\n }\n\n &.qds-has-icon {\n gap: var(--qds-navigation-subsection-titles-gap)\n var(--qds-navigation-subsection-titles-icon-gap);\n }\n\n & .qds-title {\n font: var(--qds-navigation-subsection-title);\n }\n\n & .qds-subtitle {\n font: var(--qds-navigation-subsection-subtitle);\n }\n\n & .qds-kicker {\n font: var(--qds-navigation-subsection-kicker);\n }\n\n & .qds-icon {\n width: var(--qds-navigation-subsection-titles-icon-size);\n height: var(--qds-navigation-subsection-titles-icon-crop-height);\n }\n }\n}\n\n.qds-popup {\n &.qds-root {\n &.qds-titles {\n gap: var(--qds-popup-titles-gap);\n }\n\n &.qds-has-icon {\n gap: var(--qds-popup-titles-gap) var(--qds-popup-titles-icon-gap);\n }\n\n & .qds-title {\n font: var(--qds-popup-title);\n }\n\n & .qds-subtitle {\n font: var(--qds-popup-subtitle);\n }\n\n & .qds-kicker {\n font: var(--qds-popup-kicker);\n }\n\n & .qds-icon {\n width: var(--qds-popup-titles-icon-size);\n height: var(--qds-popup-titles-icon-crop-height);\n }\n }\n\n &.qds-section {\n &.qds-titles {\n gap: var(--qds-popup-section-titles-gap);\n }\n\n &.qds-has-icon {\n gap: var(--qds-popup-section-titles-gap)\n var(--qds-popup-section-titles-icon-gap);\n }\n\n & .qds-title {\n font: var(--qds-popup-section-title);\n }\n\n & .qds-subtitle {\n font: var(--qds-popup-section-subtitle);\n }\n\n & .qds-kicker {\n font: var(--qds-popup-section-kicker);\n }\n\n & .qds-icon {\n width: var(--qds-popup-section-titles-icon-size);\n height: var(--qds-popup-section-titles-icon-crop-height);\n }\n }\n\n &.qds-subsection {\n &.qds-titles {\n gap: var(--qds-popup-subsection-titles-gap);\n }\n\n &.qds-has-icon {\n gap: var(--qds-popup-subsection-titles-gap)\n var(--qds-popup-subsection-titles-icon-gap);\n }\n\n & .qds-title {\n font: var(--qds-popup-subsection-title);\n }\n\n & .qds-subtitle {\n font: var(--qds-popup-subsection-subtitle);\n }\n\n & .qds-kicker {\n font: var(--qds-popup-subsection-kicker);\n }\n\n & .qds-icon {\n width: var(--qds-popup-subsection-titles-icon-size);\n height: var(--qds-popup-subsection-titles-icon-crop-height);\n }\n }\n}\n\n.qds-accessory {\n &.qds-root {\n &.qds-titles {\n gap: var(--qds-accessory-titles-gap);\n }\n\n &.qds-has-icon {\n gap: var(--qds-accessory-titles-gap) var(--qds-accessory-titles-icon-gap);\n }\n\n & .qds-title {\n font: var(--qds-accessory-title);\n }\n\n & .qds-subtitle {\n font: var(--qds-accessory-subtitle);\n }\n\n & .qds-kicker {\n font: var(--qds-accessory-kicker);\n }\n\n & .qds-icon {\n width: var(--qds-accessory-titles-icon-size);\n height: var(--qds-accessory-titles-icon-crop-height);\n }\n }\n\n &.qds-section {\n &.qds-titles {\n gap: var(--qds-accessory-section-titles-gap);\n }\n\n &.qds-has-icon {\n gap: var(--qds-accessory-section-titles-gap)\n var(--qds-accessory-section-titles-icon-gap);\n }\n\n & .qds-title {\n font: var(--qds-accessory-section-title);\n }\n\n & .qds-subtitle {\n font: var(--qds-accessory-section-subtitle);\n }\n\n & .qds-kicker {\n font: var(--qds-accessory-section-kicker);\n }\n\n & .qds-icon {\n width: var(--qds-accessory-section-titles-icon-size);\n height: var(--qds-accessory-section-titles-icon-crop-height);\n }\n }\n}\n\n[data-variant='web-main-section-promo'] {\n &:is(.qds-root, .qds-section, .qds-subsection) {\n &.qds-titles {\n gap: var(--qds-main-section-promo-titles-gap);\n margin: auto;\n }\n\n & .qds-title {\n font: var(--qds-main-section-promo-title);\n }\n\n & .qds-subtitle {\n font: var(--qds-main-section-promo-subtitle);\n }\n\n & .qds-kicker {\n font: var(--qds-main-section-promo-kicker);\n }\n\n &.qds-has-icon {\n gap: var(--qds-main-section-promo-titles-gap)\n var(--qds-main-section-promo-titles-icon-gap);\n }\n\n & .qds-icon {\n width: var(--qds-main-section-promo-titles-icon-size);\n height: var(--qds-main-section-promo-titles-icon-crop-height);\n }\n }\n}\n\n[data-alignment='start'] {\n text-align: start;\n}\n\n[data-alignment='center'] {\n text-align: center;\n}\n\n[data-alignment='end'] {\n text-align: end;\n}\n\n[data-variant='web-main-section-display'] {\n &:is(.qds-root, .qds-section, .qds-subsection) {\n &.qds-titles {\n gap: var(--qds-main-section-display-titles-gap);\n }\n\n & .qds-title {\n font: var(--qds-main-section-display-title);\n }\n }\n}\n\n[data-variant='web-main-subsection-card'] {\n &:is(.qds-root, .qds-section, .qds-subsection) {\n &.qds-titles {\n gap: var(--qds-main-subsection-card-titles-gap);\n }\n\n & .qds-title {\n font: var(--qds-main-subsection-card-title);\n }\n }\n}\n\n[data-variant='web-main-section-hero'] {\n &:is(.qds-root, .qds-section, .qds-subsection) {\n &.qds-titles {\n gap: var(--qds-main-section-hero-titles-gap);\n }\n\n & .qds-title {\n font: var(--qds-main-section-hero-title);\n }\n }\n}\n","// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { ComponentInterface } from '@stencil/core'\nimport { Component, Element, h, Prop } from '@stencil/core'\n\nimport type { Attributes } from '../../helpers'\nimport { inheritAriaAttributes } from '../../helpers'\n\nexport type Layer = 'accessory' | 'main' | 'navigation' | 'panel' | 'popup'\nexport type Level = 'root' | 'section' | 'subsection'\nexport type Tag = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'\nexport type TitleVariant =\n | 'web-main-section-display'\n | 'web-main-section-hero'\n | 'web-main-section-promo'\n | 'web-main-subsection-card'\n\nexport type Alignment = 'center' | 'end' | 'start'\n\n/**\n * @slot Content to display for the title.\n * @see https://quartz.se.com/build/components/title\n */\n@Component({\n tag: 'qds-title',\n shadow: true,\n styleUrl: 'title.css',\n})\nexport class Title implements ComponentInterface {\n /**\n * The alignment of the title.\n */\n @Prop() public readonly alignment?: Alignment = 'start'\n\n /**\n * The name of the icon to render.\n *\n * Available names depend on the icon library being used.\n */\n @Prop() public readonly iconName?: string\n\n /**\n * The name of a registered icon library.\n */\n @Prop() public readonly iconLibrary: string = 'default'\n\n /**\n * Text to display for the kicker.\n */\n @Prop() public readonly kicker?: string\n\n @Prop() public readonly layer?: Layer = 'main'\n\n @Prop() public readonly level?: Level = 'section'\n\n /**\n * Text to display for the subtitle.\n */\n @Prop() public readonly subtitle?: string\n\n /**\n * HTML tag to use to render the title.\n */\n @Prop() public readonly tag?: Tag = 'h2'\n\n /**\n * The title's variant.\n */\n @Prop() public readonly variant?: TitleVariant\n\n @Element() private readonly host!: HTMLElement\n\n #inheritedAttributes: Attributes = {}\n\n get #hasSubtitle(): boolean {\n return this.subtitle !== undefined && this.subtitle !== ''\n }\n\n get #hasKicker(): boolean {\n return this.kicker !== undefined && this.kicker !== ''\n }\n\n public componentWillLoad(): void {\n this.#inheritedAttributes = inheritAriaAttributes(this.host)\n }\n\n public render() {\n const layer = `qds-${this.layer ?? 'main'}`\n const level = `qds-${this.level ?? 'section'}`\n const Tag = this.tag ?? 'h2'\n const hasIcon = this.iconName !== undefined && this.iconName !== ''\n\n return (\n <hgroup\n data-alignment={this.alignment ?? 'start'}\n data-variant={this.variant}\n class={{\n [layer]: true,\n [level]: true,\n 'qds-titles': true,\n 'qds-has-icon': hasIcon,\n 'qds-has-kicker': this.#hasKicker,\n 'qds-has-subtitle': this.#hasSubtitle,\n }}\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...this.#inheritedAttributes}\n >\n <Tag class=\"qds-title\" data-variant={this.variant}>\n <slot />\n </Tag>\n {this.#hasKicker && <p class=\"qds-kicker\">{this.kicker}</p>}\n {this.#hasSubtitle && <p class=\"qds-subtitle\">{this.subtitle}</p>}\n {hasIcon && (\n <qds-icon\n aria-hidden=\"true\"\n class=\"qds-icon\"\n name={this.iconName}\n library={this.iconLibrary}\n />\n )}\n </hgroup>\n )\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"p-a529eb5c.js","mappings":";;;;;;;;;AAAA,MAAM,QAAQ,GAAG,ixSAAixS,CAAC;AACnyS,uBAAe,QAAQ;;ACDvB;AACA;AACA;;;;;;;;;;;;;;;;;;MA4Ba,KAAK;IALlB;;;;;;;;QAS0B,cAAS,GAAe,OAAO,CAAA;;;;QAY/B,gBAAW,GAAW,SAAS,CAAA;QAO/B,UAAK,GAAW,MAAM,CAAA;QAEtB,UAAK,GAAW,SAAS,CAAA;;;;QAUzB,QAAG,GAAS,IAAI,CAAA;QASxC,qCAAmC,EAAE,EAAA;KAmDtC;IAzCQ,iBAAiB;QACtB,uBAAA,IAAI,8BAAwB,qBAAqB,CAAC,IAAI,CAAC,IAAI,CAAC,MAAA,CAAA;KAC7D;IAEM,MAAM;QACX,MAAM,KAAK,GAAG,OAAO,IAAI,CAAC,KAAK,IAAI,MAAM,EAAE,CAAA;QAC3C,MAAM,KAAK,GAAG,OAAO,IAAI,CAAC,KAAK,IAAI,SAAS,EAAE,CAAA;QAC9C,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,IAAI,IAAI,CAAA;QAC5B,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,KAAK,SAAS,IAAI,IAAI,CAAC,QAAQ,KAAK,EAAE,CAAA;QAEnE,QACE,iFACkB,IAAI,CAAC,SAAS,IAAI,OAAO,kBAC3B,IAAI,CAAC,OAAO,EAC1B,KAAK,EAAE;gBACL,CAAC,KAAK,GAAG,IAAI;gBACb,CAAC,KAAK,GAAG,IAAI;gBACb,YAAY,EAAE,IAAI;gBAClB,cAAc,EAAE,OAAO;gBACvB,gBAAgB,EAAE,uBAAA,IAAI,8CAAW;gBACjC,kBAAkB,EAAE,uBAAA,IAAI,gDAAa;aACtC,KAEG,uBAAA,IAAI,kCAAqB,IAE7B,EAAC,GAAG,qDAAC,KAAK,EAAC,WAAW,kBAAe,IAAI,CAAC,OAAO,IAC/C,8DAAQ,CACJ,EACL,uBAAA,IAAI,8CAAW,IAAI,0DAAG,KAAK,EAAC,YAAY,IAAE,IAAI,CAAC,MAAM,CAAK,EAC1D,uBAAA,IAAI,gDAAa,IAAI,0DAAG,KAAK,EAAC,cAAc,IAAE,IAAI,CAAC,QAAQ,CAAK,EAChE,OAAO,KACN,gFACc,MAAM,EAClB,KAAK,EAAC,UAAU,EAChB,IAAI,EAAE,IAAI,CAAC,QAAQ,EACnB,OAAO,EAAE,IAAI,CAAC,WAAW,GACzB,CACH,CACM,EACV;KACF;;;;;;;;;;;;;;;IA/CC,OAAO,IAAI,CAAC,QAAQ,KAAK,SAAS,IAAI,IAAI,CAAC,QAAQ,KAAK,EAAE,CAAA;AAC5D,CAAC;IAGC,OAAO,IAAI,CAAC,MAAM,KAAK,SAAS,IAAI,IAAI,CAAC,MAAM,KAAK,EAAE,CAAA;AACxD,CAAC;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/title/title.css?tag=qds-title&encapsulation=shadow","src/components/title/title.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: © 2024 Schneider Electric\n *\n * SPDX-License-Identifier: Apache-2.0\n */\n\n@import url('../shared.css');\n\n:host {\n display: block;\n}\n\n.qds-titles {\n display: grid;\n grid-template-areas: 'title';\n\n &.qds-has-kicker {\n grid-template-areas:\n 'kicker'\n 'title';\n }\n\n &.qds-has-subtitle {\n grid-template-areas:\n 'title'\n 'subtitle';\n }\n\n &.qds-has-kicker.qds-has-subtitle {\n grid-template-areas:\n 'kicker'\n 'title'\n 'subtitle';\n }\n}\n\n.qds-has-icon {\n grid-template-columns: auto 1fr;\n grid-template-areas: 'icon title';\n\n &.qds-has-kicker {\n grid-template-areas:\n '. kicker'\n 'icon title';\n }\n\n &.qds-has-subtitle {\n grid-template-areas:\n 'icon title'\n '. subtitle';\n }\n\n &.qds-has-kicker.qds-has-subtitle {\n grid-template-areas:\n '. kicker'\n 'icon title'\n '. subtitle';\n }\n}\n\n.qds-title,\n.qds-subtitle,\n.qds-kicker {\n margin-block: 0;\n}\n\n.qds-title {\n grid-area: title;\n color: var(--qds-theme-title);\n}\n\n.qds-subtitle {\n grid-area: subtitle;\n color: var(--qds-theme-subtitle);\n}\n\n.qds-kicker {\n grid-area: kicker;\n color: var(--qds-theme-kicker);\n}\n\n.qds-icon {\n grid-area: icon;\n align-content: center;\n color: var(--qds-theme-text-standard);\n}\n\n.qds-main {\n &.qds-section {\n &.qds-titles {\n gap: var(--qds-main-section-titles-gap);\n }\n\n &.qds-has-icon {\n gap: var(--qds-main-section-titles-gap)\n var(--qds-main-section-titles-icon-gap);\n }\n\n & .qds-title {\n font: var(--qds-main-section-title);\n }\n\n & .qds-subtitle {\n font: var(--qds-main-section-subtitle);\n }\n\n & .qds-kicker {\n font: var(--qds-main-section-kicker);\n }\n\n & .qds-icon {\n width: var(--qds-main-section-titles-icon-size);\n height: var(--qds-main-section-titles-icon-crop-height);\n }\n }\n\n &.qds-subsection {\n &.qds-titles {\n gap: var(--qds-main-subsection-titles-gap);\n }\n\n &.qds-has-icon {\n gap: var(--qds-main-subsection-titles-gap)\n var(--qds-main-subsection-titles-icon-gap);\n }\n\n & .qds-title {\n font: var(--qds-main-subsection-title);\n }\n\n & .qds-subtitle {\n font: var(--qds-main-subsection-subtitle);\n }\n\n & .qds-kicker {\n font: var(--qds-main-subsection-kicker);\n }\n\n & .qds-icon {\n width: var(--qds-main-subsection-titles-icon-size);\n height: var(--qds-main-subsection-titles-icon-crop-height);\n }\n }\n}\n\n.qds-panel {\n &.qds-root {\n &.qds-titles {\n gap: var(--qds-panel-titles-gap);\n }\n\n &.qds-has-icon {\n gap: var(--qds-panel-titles-gap) var(--qds-panel-titles-icon-gap);\n }\n\n & .qds-title {\n font: var(--qds-panel-title);\n }\n\n & .qds-subtitle {\n font: var(--qds-panel-subtitle);\n }\n\n & .qds-kicker {\n font: var(--qds-panel-kicker);\n }\n\n & .qds-icon {\n width: var(--qds-panel-titles-icon-size);\n height: var(--qds-panel-titles-icon-crop-height);\n }\n }\n\n &.qds-section {\n &.qds-titles {\n gap: var(--qds-panel-section-titles-gap);\n }\n\n &.qds-has-icon {\n gap: var(--qds-panel-section-titles-gap)\n var(--qds-panel-section-titles-icon-gap);\n }\n\n & .qds-title {\n font: var(--qds-panel-section-title);\n }\n\n & .qds-subtitle {\n font: var(--qds-panel-section-subtitle);\n }\n\n & .qds-kicker {\n font: var(--qds-panel-section-kicker);\n }\n\n & .qds-icon {\n width: var(--qds-panel-section-titles-icon-size);\n height: var(--qds-panel-section-titles-icon-crop-height);\n }\n }\n\n &.qds-subsection {\n &.qds-titles {\n gap: var(--qds-panel-subsection-titles-gap);\n }\n\n &.qds-has-icon {\n gap: var(--qds-panel-subsection-titles-gap)\n var(--qds-panel-subsection-titles-icon-gap);\n }\n\n & .qds-title {\n font: var(--qds-panel-subsection-title);\n }\n\n & .qds-subtitle {\n font: var(--qds-panel-subsection-subtitle);\n }\n\n & .qds-kicker {\n font: var(--qds-panel-subsection-kicker);\n }\n\n & .qds-icon {\n width: var(--qds-panel-subsection-titles-icon-size);\n height: var(--qds-panel-subsection-titles-icon-crop-height);\n }\n }\n}\n\n.qds-navigation {\n &.qds-section {\n &.qds-titles {\n gap: var(--qds-navigation-section-titles-gap);\n }\n\n &.qds-has-icon {\n gap: var(--qds-navigation-section-titles-gap)\n var(--qds-navigation-section-titles-icon-gap);\n }\n\n & .qds-title {\n font: var(--qds-navigation-section-title);\n }\n\n & .qds-subtitle {\n font: var(--qds-navigation-section-subtitle);\n }\n\n & .qds-kicker {\n font: var(--qds-navigation-section-kicker);\n }\n\n & .qds-icon {\n width: var(--qds-navigation-section-titles-icon-size);\n height: var(--qds-navigation-section-titles-icon-crop-height);\n }\n }\n\n &.qds-subsection {\n &.qds-titles {\n gap: var(--qds-navigation-subsection-titles-gap);\n }\n\n &.qds-has-icon {\n gap: var(--qds-navigation-subsection-titles-gap)\n var(--qds-navigation-subsection-titles-icon-gap);\n }\n\n & .qds-title {\n font: var(--qds-navigation-subsection-title);\n }\n\n & .qds-subtitle {\n font: var(--qds-navigation-subsection-subtitle);\n }\n\n & .qds-kicker {\n font: var(--qds-navigation-subsection-kicker);\n }\n\n & .qds-icon {\n width: var(--qds-navigation-subsection-titles-icon-size);\n height: var(--qds-navigation-subsection-titles-icon-crop-height);\n }\n }\n}\n\n.qds-popup {\n &.qds-root {\n &.qds-titles {\n gap: var(--qds-popup-titles-gap);\n }\n\n &.qds-has-icon {\n gap: var(--qds-popup-titles-gap) var(--qds-popup-titles-icon-gap);\n }\n\n & .qds-title {\n font: var(--qds-popup-title);\n }\n\n & .qds-subtitle {\n font: var(--qds-popup-subtitle);\n }\n\n & .qds-kicker {\n font: var(--qds-popup-kicker);\n }\n\n & .qds-icon {\n width: var(--qds-popup-titles-icon-size);\n height: var(--qds-popup-titles-icon-crop-height);\n }\n }\n\n &.qds-section {\n &.qds-titles {\n gap: var(--qds-popup-section-titles-gap);\n }\n\n &.qds-has-icon {\n gap: var(--qds-popup-section-titles-gap)\n var(--qds-popup-section-titles-icon-gap);\n }\n\n & .qds-title {\n font: var(--qds-popup-section-title);\n }\n\n & .qds-subtitle {\n font: var(--qds-popup-section-subtitle);\n }\n\n & .qds-kicker {\n font: var(--qds-popup-section-kicker);\n }\n\n & .qds-icon {\n width: var(--qds-popup-section-titles-icon-size);\n height: var(--qds-popup-section-titles-icon-crop-height);\n }\n }\n\n &.qds-subsection {\n &.qds-titles {\n gap: var(--qds-popup-subsection-titles-gap);\n }\n\n &.qds-has-icon {\n gap: var(--qds-popup-subsection-titles-gap)\n var(--qds-popup-subsection-titles-icon-gap);\n }\n\n & .qds-title {\n font: var(--qds-popup-subsection-title);\n }\n\n & .qds-subtitle {\n font: var(--qds-popup-subsection-subtitle);\n }\n\n & .qds-kicker {\n font: var(--qds-popup-subsection-kicker);\n }\n\n & .qds-icon {\n width: var(--qds-popup-subsection-titles-icon-size);\n height: var(--qds-popup-subsection-titles-icon-crop-height);\n }\n }\n}\n\n.qds-accessory {\n &.qds-root {\n &.qds-titles {\n gap: var(--qds-accessory-titles-gap);\n }\n\n &.qds-has-icon {\n gap: var(--qds-accessory-titles-gap) var(--qds-accessory-titles-icon-gap);\n }\n\n & .qds-title {\n font: var(--qds-accessory-title);\n }\n\n & .qds-subtitle {\n font: var(--qds-accessory-subtitle);\n }\n\n & .qds-kicker {\n font: var(--qds-accessory-kicker);\n }\n\n & .qds-icon {\n width: var(--qds-accessory-titles-icon-size);\n height: var(--qds-accessory-titles-icon-crop-height);\n }\n }\n\n &.qds-section {\n &.qds-titles {\n gap: var(--qds-accessory-section-titles-gap);\n }\n\n &.qds-has-icon {\n gap: var(--qds-accessory-section-titles-gap)\n var(--qds-accessory-section-titles-icon-gap);\n }\n\n & .qds-title {\n font: var(--qds-accessory-section-title);\n }\n\n & .qds-subtitle {\n font: var(--qds-accessory-section-subtitle);\n }\n\n & .qds-kicker {\n font: var(--qds-accessory-section-kicker);\n }\n\n & .qds-icon {\n width: var(--qds-accessory-section-titles-icon-size);\n height: var(--qds-accessory-section-titles-icon-crop-height);\n }\n }\n}\n\n[data-variant='web-main-section-promo'] {\n &:is(.qds-root, .qds-section, .qds-subsection) {\n &.qds-titles {\n gap: var(--qds-main-section-promo-titles-gap);\n margin: auto;\n }\n\n & .qds-title {\n font: var(--qds-main-section-promo-title);\n }\n\n & .qds-subtitle {\n font: var(--qds-main-section-promo-subtitle);\n }\n\n & .qds-kicker {\n font: var(--qds-main-section-promo-kicker);\n }\n\n &.qds-has-icon {\n gap: var(--qds-main-section-promo-titles-gap)\n var(--qds-main-section-promo-titles-icon-gap);\n }\n\n & .qds-icon {\n width: var(--qds-main-section-promo-titles-icon-size);\n height: var(--qds-main-section-promo-titles-icon-crop-height);\n }\n }\n}\n\n[data-alignment='start'] {\n text-align: start;\n}\n\n[data-alignment='center'] {\n text-align: center;\n}\n\n[data-alignment='end'] {\n text-align: end;\n}\n\n[data-variant='web-main-section-display'] {\n &:is(.qds-root, .qds-section, .qds-subsection) {\n &.qds-titles {\n gap: var(--qds-main-section-display-titles-gap);\n }\n\n & .qds-title {\n font: var(--qds-main-section-display-title);\n }\n }\n}\n\n[data-variant='web-main-subsection-card'] {\n &:is(.qds-root, .qds-section, .qds-subsection) {\n &.qds-titles {\n gap: var(--qds-main-subsection-card-titles-gap);\n }\n\n & .qds-title {\n font: var(--qds-main-subsection-card-title);\n }\n }\n}\n\n[data-variant='web-main-section-hero'] {\n &:is(.qds-root, .qds-section, .qds-subsection) {\n &.qds-titles {\n gap: var(--qds-main-section-hero-titles-gap);\n }\n\n & .qds-title {\n font: var(--qds-main-section-hero-title);\n }\n }\n}\n","// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { ComponentInterface } from '@stencil/core'\nimport { Component, Element, h, Prop } from '@stencil/core'\n\nimport type { Attributes } from '../../helpers'\nimport { inheritAriaAttributes } from '../../helpers'\n\nexport type Layer = 'accessory' | 'main' | 'navigation' | 'panel' | 'popup'\nexport type Level = 'root' | 'section' | 'subsection'\nexport type Tag = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'\nexport type TitleVariant =\n | 'web-main-section-display'\n | 'web-main-section-hero'\n | 'web-main-section-promo'\n | 'web-main-subsection-card'\n\nexport type Alignment = 'center' | 'end' | 'start'\n\n/**\n * @slot Content to display for the title.\n * @see https://quartz.se.com/build/components/title\n */\n@Component({\n tag: 'qds-title',\n shadow: true,\n styleUrl: 'title.css',\n})\nexport class Title implements ComponentInterface {\n /**\n * The alignment of the title.\n */\n @Prop() public readonly alignment?: Alignment = 'start'\n\n /**\n * The name of the icon to render.\n *\n * Available names depend on the icon library being used.\n */\n @Prop() public readonly iconName?: string\n\n /**\n * The name of a registered icon library.\n */\n @Prop() public readonly iconLibrary: string = 'default'\n\n /**\n * Text to display for the kicker.\n */\n @Prop() public readonly kicker?: string\n\n @Prop() public readonly layer?: Layer = 'main'\n\n @Prop() public readonly level?: Level = 'section'\n\n /**\n * Text to display for the subtitle.\n */\n @Prop() public readonly subtitle?: string\n\n /**\n * HTML tag to use to render the title.\n */\n @Prop() public readonly tag?: Tag = 'h2'\n\n /**\n * The title's variant.\n */\n @Prop() public readonly variant?: TitleVariant\n\n @Element() private readonly host!: HTMLElement\n\n #inheritedAttributes: Attributes = {}\n\n get #hasSubtitle(): boolean {\n return this.subtitle !== undefined && this.subtitle !== ''\n }\n\n get #hasKicker(): boolean {\n return this.kicker !== undefined && this.kicker !== ''\n }\n\n public componentWillLoad(): void {\n this.#inheritedAttributes = inheritAriaAttributes(this.host)\n }\n\n public render() {\n const layer = `qds-${this.layer ?? 'main'}`\n const level = `qds-${this.level ?? 'section'}`\n const Tag = this.tag ?? 'h2'\n const hasIcon = this.iconName !== undefined && this.iconName !== ''\n\n return (\n <hgroup\n data-alignment={this.alignment ?? 'start'}\n data-variant={this.variant}\n class={{\n [layer]: true,\n [level]: true,\n 'qds-titles': true,\n 'qds-has-icon': hasIcon,\n 'qds-has-kicker': this.#hasKicker,\n 'qds-has-subtitle': this.#hasSubtitle,\n }}\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...this.#inheritedAttributes}\n >\n <Tag class=\"qds-title\" data-variant={this.variant}>\n <slot />\n </Tag>\n {this.#hasKicker && <p class=\"qds-kicker\">{this.kicker}</p>}\n {this.#hasSubtitle && <p class=\"qds-subtitle\">{this.subtitle}</p>}\n {hasIcon && (\n <qds-icon\n aria-hidden=\"true\"\n class=\"qds-icon\"\n name={this.iconName}\n library={this.iconLibrary}\n />\n )}\n </hgroup>\n )\n }\n}\n"],"version":3}
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
*
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { p as proxyCustomElement, H, h } from './p-
|
|
6
|
+
import { p as proxyCustomElement, H, r as readTask, h } from './p-50f85f75.js';
|
|
7
7
|
import { b as isOverflowing } from './p-8abba29b.js';
|
|
8
|
-
import { d as defineCustomElement$1 } from './p-
|
|
8
|
+
import { d as defineCustomElement$1 } from './p-70d12c72.js';
|
|
9
9
|
|
|
10
|
-
const labelCss = ":host([hidden]){display:none!important}:host{display:inline-block}.qds-label{box-sizing:border-box;color:var(--qds-theme-control-text-standard);display:inline-flex;gap:var(--qds-text-icon-gap)}.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{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}.qds-required{color:var(--qds-theme-feedback-field-required);-webkit-user-select:none;user-select:none}[data-size=small]{font:var(--qds-control-small-text)}.qds-inline[data-size=small]{margin-block:var(--qds-control-small-padding-auto-height)}[data-size=standard]{font:var(--qds-control-standard-text)}.qds-inline[data-size=standard]{margin-block:var(--qds-control-standard-padding-auto-height)}[data-size=large]{font:var(--qds-control-large-text)}.qds-inline[data-size=large]{margin-block:var(--qds-control-large-padding-auto-height)}";
|
|
10
|
+
const labelCss = ":host([hidden]){display:none!important}:host{display:inline-block}.qds-label{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{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}.qds-required{color:var(--qds-theme-feedback-field-required);-webkit-user-select:none;user-select:none}[data-size=small]{font:var(--qds-control-small-text)}.qds-inline[data-size=small]{margin-block:var(--qds-control-small-padding-auto-height)}[data-size=standard]{font:var(--qds-control-standard-text)}.qds-inline[data-size=standard]{margin-block:var(--qds-control-standard-padding-auto-height)}[data-size=large]{font:var(--qds-control-large-text)}.qds-inline[data-size=large]{margin-block:var(--qds-control-large-padding-auto-height)}";
|
|
11
11
|
const QdsLabelStyle0 = labelCss;
|
|
12
12
|
|
|
13
13
|
// SPDX-FileCopyrightText: © 2024 Schneider Electric
|
|
@@ -72,7 +72,10 @@ const Label = /*@__PURE__*/ proxyCustomElement(class Label extends H {
|
|
|
72
72
|
__classPrivateFieldGet(this, _Label_ro, "f").disconnect();
|
|
73
73
|
if (!__classPrivateFieldGet(this, _Label_span, "f"))
|
|
74
74
|
return;
|
|
75
|
-
|
|
75
|
+
const span = __classPrivateFieldGet(this, _Label_span, "f");
|
|
76
|
+
readTask(() => {
|
|
77
|
+
this.tooltip = isOverflowing(span);
|
|
78
|
+
});
|
|
76
79
|
__classPrivateFieldSet(this, _Label_ro, new ResizeObserver(([spanEntry]) => {
|
|
77
80
|
this.tooltip = isOverflowing(spanEntry.target);
|
|
78
81
|
}), "f");
|
|
@@ -86,12 +89,12 @@ const Label = /*@__PURE__*/ proxyCustomElement(class Label extends H {
|
|
|
86
89
|
__classPrivateFieldGet(this, _Label_ro, "f").disconnect();
|
|
87
90
|
}
|
|
88
91
|
render() {
|
|
89
|
-
return (h("span", { key: '
|
|
92
|
+
return (h("span", { key: 'bd56de0869e706f0b028e0fb03e0cc946cbbf1fd', class: {
|
|
90
93
|
'qds-inline': this.inline,
|
|
91
94
|
'qds-label': true,
|
|
92
95
|
}, "data-size": __classPrivateFieldGet(this, _Label_instances, "a", _Label_computedSize_get), ref: __classPrivateFieldGet(this, _Label_labelRef, "f"),
|
|
93
96
|
// eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex
|
|
94
|
-
tabIndex: this.tooltip ? 0 : undefined }, this.required && h("span", { key: '
|
|
97
|
+
tabIndex: this.tooltip ? 0 : undefined }, this.required && h("span", { key: '9df743ea0b47028f9ae6951d88d2d353fd813a4b', class: "qds-required" }, "*"), h("span", { key: '680c6840424a63e6533230e249ec3b10ac5b0ab7', class: "qds-text", ref: __classPrivateFieldGet(this, _Label_spanRef, "f") }, this.text), this.tooltip && (h("qds-tooltip", { key: '6ec7e5624a50e5d9084580dcd40359fb88d9b8ff', "aria-hidden": "true", ref: __classPrivateFieldGet(this, _Label_tooltipRef, "f") }, this.text))));
|
|
95
98
|
}
|
|
96
99
|
static get watchers() { return {
|
|
97
100
|
"text": ["textChanged"]
|
|
@@ -139,4 +142,4 @@ function defineCustomElement() {
|
|
|
139
142
|
|
|
140
143
|
export { Label as L, defineCustomElement as d };
|
|
141
144
|
|
|
142
|
-
//# sourceMappingURL=p-
|
|
145
|
+
//# sourceMappingURL=p-b5608061.js.map
|