@quartzds/core 1.0.0-beta.123 → 1.0.0-beta.125
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +43 -0
- package/components/index.js +1 -1
- package/components/{p-BvRd7jA2.js → p-2tdMcXmA.js} +5 -5
- package/components/{p-BvRd7jA2.js.map → p-2tdMcXmA.js.map} +1 -1
- package/components/{p-CVuTVnQo.js → p-B6ToH-uM.js} +4 -4
- package/components/p-B6ToH-uM.js.map +1 -0
- package/components/{p-C93kOEAe.js → p-BRpaYGSM.js} +5 -5
- package/components/{p-C93kOEAe.js.map → p-BRpaYGSM.js.map} +1 -1
- package/components/{p-CbY4T0d2.js → p-B_CYrw-t.js} +3 -3
- package/components/{p-CbY4T0d2.js.map → p-B_CYrw-t.js.map} +1 -1
- package/components/{p-BoSYRCNp.js → p-BceRDckL.js} +4 -4
- package/components/{p-BoSYRCNp.js.map → p-BceRDckL.js.map} +1 -1
- package/components/{p-BZlKeCFb.js → p-BuCcV5P1.js} +9 -9
- package/components/p-BuCcV5P1.js.map +1 -0
- package/components/{p-B7s906mS.js → p-CG_jPYOl.js} +5 -5
- package/components/{p-B7s906mS.js.map → p-CG_jPYOl.js.map} +1 -1
- package/components/p-CaibVX_2.js +3539 -0
- package/components/p-CaibVX_2.js.map +1 -0
- package/components/{p-CowZ-pDD.js → p-CgQQYnEy.js} +75 -39
- package/components/p-CgQQYnEy.js.map +1 -0
- package/components/{p-yb0Kv4Y6.js → p-DTMrBXCl.js} +24 -9
- package/components/p-DTMrBXCl.js.map +1 -0
- package/components/{p-C9R8N06B.js → p-EjoVBa5a.js} +3 -3
- package/components/{p-C9R8N06B.js.map → p-EjoVBa5a.js.map} +1 -1
- package/components/{p-CKp062X8.js → p-ox2syNht.js} +6 -6
- package/components/{p-CKp062X8.js.map → p-ox2syNht.js.map} +1 -1
- package/components/qds-action-item.js +3 -3
- package/components/qds-avatar-media.js +1 -1
- package/components/qds-breadcrumb-item.js +11 -6
- package/components/qds-breadcrumb-item.js.map +1 -1
- package/components/qds-button.js +9 -9
- package/components/qds-button.js.map +1 -1
- package/components/qds-checkbox.js +1 -1
- package/components/qds-chip.js +5 -5
- package/components/qds-chip.js.map +1 -1
- package/components/qds-dialog.js +5 -5
- package/components/qds-dialog.js.map +1 -1
- package/components/qds-divider.js +1 -1
- package/components/qds-dropdown.js +1 -1
- package/components/qds-form-message.js +23 -17
- package/components/qds-form-message.js.map +1 -1
- package/components/qds-icon-button.js +1 -1
- package/components/qds-icon-tab.js +4 -4
- package/components/qds-icon.js +1 -1
- package/components/qds-inline-link.js +5 -5
- package/components/qds-inline-link.js.map +1 -1
- package/components/qds-input.js +3 -3
- package/components/qds-label.js +2 -2
- package/components/qds-list-item.js +16 -13
- package/components/qds-list-item.js.map +1 -1
- package/components/qds-loader.js +1 -1
- package/components/qds-menu-item.js +38 -12
- package/components/qds-menu-item.js.map +1 -1
- package/components/qds-mini-button.js +1 -1
- package/components/qds-progress-bar.js +1 -1
- package/components/qds-radio.js +1 -1
- package/components/qds-select.js +3 -3
- package/components/qds-standalone-link.js +4 -4
- package/components/qds-switch.js +6 -6
- package/components/qds-switch.js.map +1 -1
- package/components/qds-tab.js +7 -7
- package/components/qds-tabbar.js +59 -38
- package/components/qds-tabbar.js.map +1 -1
- package/components/qds-table-cell.js +2 -2
- package/components/qds-table-head-cell.js +2 -2
- package/components/qds-table-row.js +1 -1
- package/components/qds-table.js +1 -1
- package/components/qds-tag.js +1 -1
- package/components/qds-textarea.js +3 -3
- package/components/qds-title.js +1 -1
- package/components/qds-tooltip.js +1 -1
- package/dist/cjs/helpers-DjUgyTKn.js +3559 -0
- package/dist/cjs/helpers-DjUgyTKn.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/qds-action-item.cjs.entry.js +1 -1
- package/dist/cjs/qds-avatar-media.qds-checkbox.qds-radio.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-avatar-media_3.cjs.entry.js +72 -36
- package/dist/cjs/qds-breadcrumb-item.cjs.entry.js +9 -4
- package/dist/cjs/qds-breadcrumb-item.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-button.cjs.entry.js +7 -7
- package/dist/cjs/qds-button.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-chip.cjs.entry.js +2 -2
- package/dist/cjs/qds-chip.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-dialog.cjs.entry.js +2 -2
- package/dist/cjs/qds-dialog.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-divider.qds-icon-button.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-divider_2.cjs.entry.js +3 -3
- package/dist/cjs/qds-dropdown.cjs.entry.js +20 -6
- package/dist/cjs/qds-dropdown.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-form-message.cjs.entry.js +26 -16
- package/dist/cjs/qds-form-message.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-icon-tab.cjs.entry.js +1 -1
- package/dist/cjs/qds-icon.cjs.entry.js +1 -1
- package/dist/cjs/qds-inline-link.cjs.entry.js +4 -4
- package/dist/cjs/qds-inline-link.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-input.cjs.entry.js +1 -1
- package/dist/cjs/qds-label.cjs.entry.js +1 -1
- package/dist/cjs/qds-list-item.cjs.entry.js +8 -5
- package/dist/cjs/qds-list-item.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-menu-item.cjs.entry.js +34 -8
- package/dist/cjs/qds-menu-item.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-mini-button.cjs.entry.js +2 -2
- package/dist/cjs/qds-progress-bar.cjs.entry.js +1 -1
- package/dist/cjs/qds-select.cjs.entry.js +2 -2
- package/dist/cjs/qds-standalone-link.cjs.entry.js +3 -3
- package/dist/cjs/qds-switch.cjs.entry.js +5 -5
- package/dist/cjs/qds-switch.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-tab.cjs.entry.js +4 -4
- package/dist/cjs/qds-tabbar.cjs.entry.js +57 -33
- package/dist/cjs/qds-tabbar.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-table-cell.cjs.entry.js +2 -2
- package/dist/cjs/qds-table-head-cell.cjs.entry.js +2 -2
- package/dist/cjs/qds-table-row.cjs.entry.js +1 -1
- package/dist/cjs/qds-table.cjs.entry.js +1 -1
- package/dist/cjs/qds-tag.cjs.entry.js +3 -3
- package/dist/cjs/qds-textarea.cjs.entry.js +3 -3
- package/dist/cjs/qds-title.cjs.entry.js +2 -2
- package/dist/cjs/qds-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/qds.cjs.js +1 -1
- package/dist/custom-elements.json +224 -70
- package/dist/docs.json +48 -6
- package/dist/esm/helpers-mPQzhx-O.js +3539 -0
- package/dist/esm/helpers-mPQzhx-O.js.map +1 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/qds-action-item.entry.js +1 -1
- package/dist/esm/qds-avatar-media.qds-checkbox.qds-radio.entry.js.map +1 -1
- package/dist/esm/qds-avatar-media_3.entry.js +72 -36
- package/dist/esm/qds-breadcrumb-item.entry.js +9 -4
- package/dist/esm/qds-breadcrumb-item.entry.js.map +1 -1
- package/dist/esm/qds-button.entry.js +7 -7
- package/dist/esm/qds-button.entry.js.map +1 -1
- package/dist/esm/qds-chip.entry.js +2 -2
- package/dist/esm/qds-chip.entry.js.map +1 -1
- package/dist/esm/qds-dialog.entry.js +2 -2
- package/dist/esm/qds-dialog.entry.js.map +1 -1
- package/dist/esm/qds-divider.qds-icon-button.entry.js.map +1 -1
- package/dist/esm/qds-divider_2.entry.js +3 -3
- package/dist/esm/qds-dropdown.entry.js +20 -6
- package/dist/esm/qds-dropdown.entry.js.map +1 -1
- package/dist/esm/qds-form-message.entry.js +26 -16
- package/dist/esm/qds-form-message.entry.js.map +1 -1
- package/dist/esm/qds-icon-tab.entry.js +1 -1
- package/dist/esm/qds-icon.entry.js +1 -1
- package/dist/esm/qds-inline-link.entry.js +4 -4
- package/dist/esm/qds-inline-link.entry.js.map +1 -1
- package/dist/esm/qds-input.entry.js +1 -1
- package/dist/esm/qds-label.entry.js +1 -1
- package/dist/esm/qds-list-item.entry.js +8 -5
- package/dist/esm/qds-list-item.entry.js.map +1 -1
- package/dist/esm/qds-menu-item.entry.js +34 -8
- package/dist/esm/qds-menu-item.entry.js.map +1 -1
- package/dist/esm/qds-mini-button.entry.js +2 -2
- package/dist/esm/qds-progress-bar.entry.js +1 -1
- package/dist/esm/qds-select.entry.js +2 -2
- package/dist/esm/qds-standalone-link.entry.js +3 -3
- package/dist/esm/qds-switch.entry.js +5 -5
- package/dist/esm/qds-switch.entry.js.map +1 -1
- package/dist/esm/qds-tab.entry.js +4 -4
- package/dist/esm/qds-tabbar.entry.js +57 -33
- package/dist/esm/qds-tabbar.entry.js.map +1 -1
- package/dist/esm/qds-table-cell.entry.js +2 -2
- package/dist/esm/qds-table-head-cell.entry.js +2 -2
- package/dist/esm/qds-table-row.entry.js +1 -1
- package/dist/esm/qds-table.entry.js +1 -1
- package/dist/esm/qds-tag.entry.js +3 -3
- package/dist/esm/qds-textarea.entry.js +3 -3
- package/dist/esm/qds-title.entry.js +2 -2
- package/dist/esm/qds-tooltip.entry.js +1 -1
- package/dist/esm/qds.js +1 -1
- package/dist/types/components/checkbox/checkbox.d.ts +9 -9
- package/dist/types/components/dropdown/dropdown.d.ts +1 -0
- package/dist/types/components/form-message/form-message.d.ts +2 -0
- package/dist/types/components/menu-item/menu-item.d.ts +1 -0
- package/dist/types/components/tabbar/tabbar.d.ts +2 -0
- package/dist/types/components.d.ts +3 -2
- package/dist/types/helpers.d.ts +6 -1
- package/dist/vscode.html-custom-data.json +1 -1
- package/hydrate/index.js +3560 -193
- package/hydrate/index.mjs +3560 -193
- package/package.json +2 -1
- package/components/p-BZlKeCFb.js.map +0 -1
- package/components/p-BalM52S_.js +0 -291
- package/components/p-BalM52S_.js.map +0 -1
- package/components/p-CVuTVnQo.js.map +0 -1
- package/components/p-CowZ-pDD.js.map +0 -1
- package/components/p-yb0Kv4Y6.js.map +0 -1
- package/dist/cjs/helpers-Qs3cpKiI.js +0 -308
- package/dist/cjs/helpers-Qs3cpKiI.js.map +0 -1
- package/dist/esm/helpers-Fe2AA6uo.js +0 -291
- package/dist/esm/helpers-Fe2AA6uo.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"qds-inline-link.entry.cjs.js","sources":["src/components/inline-link/inline-link.css?tag=qds-inline-link&encapsulation=shadow","src/components/inline-link/inline-link.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:host(:focus-visible) {\n /* inner ring */\n outline: var(--qds-theme-focus-border-contrast) solid\n var(--qds-focus-light-border-width);\n outline-offset: 0;\n\n /* outer ring */\n box-shadow: 0 0 0 var(--qds-focus-heavy-border-width)\n var(--qds-theme-focus-border);\n border-radius: var(--qds-control-border-radius);\n}\n\n.qds-icon {\n height: var(--qds-control-hero-icon-size);\n width: var(--qds-control-hero-icon-size);\n}\n\n.qds-inline-link {\n display: flex;\n gap: var(--qds-text-icon-gap);\n align-items: center;\n}\n\n.qds-disabled {\n opacity: var(--qds-theme-disabled);\n pointer-events: none;\n}\n\n[data-importance='subdued'] {\n color: var(--qds-theme-link-subdued-default);\n\n &:visited {\n color: var(--qds-theme-link-visited-default);\n }\n\n &:hover {\n color: var(--qds-theme-link-subdued-hover);\n }\n\n &:active {\n color: var(--qds-theme-link-subdued-pressed);\n }\n\n &:visited:hover {\n color: var(--qds-theme-link-visited-hover);\n }\n\n &:visited:active {\n color: var(--qds-theme-link-visited-pressed);\n }\n}\n\n[data-importance='standard'] {\n color: var(--qds-theme-link-standard-default);\n\n &:visited {\n color: var(--qds-theme-link-visited-default);\n }\n\n &:hover {\n color: var(--qds-theme-link-standard-hover);\n }\n\n &:active {\n color: var(--qds-theme-link-standard-pressed);\n }\n\n &:visited:hover {\n color: var(--qds-theme-link-visited-hover);\n }\n\n &:visited:active {\n color: var(--qds-theme-link-visited-pressed);\n }\n}\n\n[data-importance='emphasized'] {\n color: var(--qds-theme-link-emphasized-default);\n\n &:visited {\n color: var(--qds-theme-link-visited-default);\n }\n\n &:hover {\n color: var(--qds-theme-link-emphasized-hover);\n }\n\n &:active {\n color: var(--qds-theme-link-emphasized-pressed);\n }\n\n &:visited:hover {\n color: var(--qds-theme-link-visited-hover);\n }\n\n &:visited:active {\n color: var(--qds-theme-link-visited-pressed);\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'\nimport type { LiteralUnion } from 'type-fest'\n\nimport type { QdsFocusEventDetail } from '../../helpers'\nimport {\n determineLinkIcon,\n invariant,\n pickFocusEventAttributes,\n} from '../../helpers'\nimport type { Importance, LinkIcon, Target } from '../shared'\n\n/**\n * `<qds-inline-link>` elements, with their `href` property, create a hyperlink\n * to web pages, files, email addresses, locations in the same page, or\n * anything else a URL can address.\n *\n * Content within each `<qds-inline-link>` *should* indicate the inline link's\n * destination. If the `href` property is present, pressing the enter key while\n * focused on the `<qds-inline-link>` element will activate it.\n *\n * @slot Content to display for the inline link.\n * @see https://quartz.se.com/build/components/inline-link\n */\n@Component({\n tag: 'qds-inline-link',\n shadow: true,\n styleUrl: 'inline-link.css',\n})\nexport class InlineLink implements ComponentInterface {\n /**\n * Prevents the inline link from being interacted with: it cannot be pressed\n * or focused.\n */\n @Prop() public readonly disabled: boolean = false\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 * The inline link's importance.\n */\n @Prop() public readonly importance?: Importance = 'standard'\n\n /**\n * Causes the browser to treat the linked URL as a download. Can be used with\n * or without a `filename` value:\n *\n * - Without a value, the browser will suggest a filename/extension,\n * generated from various sources:\n *\n * - The\n * [`Content-Disposition`](https://developer.mozilla.org/docs/Web/HTTP/Headers/Content-Disposition)\n * HTTP header\n * - The final segment in the URL\n * [path](https://developer.mozilla.org/docs/Web/API/URL/pathname)\n * - The\n * [media type](https://developer.mozilla.org/docs/Glossary/MIME_type)\n * (from the\n * [`Content-Type`](https://developer.mozilla.org/docs/Web/HTTP/Headers/Content-Type)\n * header, the start of a\n * [`data:` URL](https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URLs),\n * or\n * [`Blob.type`](https://developer.mozilla.org/docs/Web/API/Blob/type)\n * for a\n * [`blob:` URL](https://developer.mozilla.org/docs/Web/API/URL/createObjectURL))\n * - `filename`: defining a value suggests it as the filename. `/` and `\\`\n * characters are converted to underscores (`_`). Filesystems may forbid\n * other characters in filenames, so browsers will adjust the suggested name\n * if necessary.\n *\n * @webnative\n */\n @Prop() public readonly download?: boolean | string\n\n /**\n * The URL that the inline link points to. Inline links are not restricted to\n * HTTP-based URLs — they can use any URL scheme supported by browsers:\n *\n * - Sections of a page with document fragments\n * - Specific text portions with\n * [text fragments](https://developer.mozilla.org/docs/Web/Text_fragments)\n * - Pieces of media files with media fragments\n * - Telephone numbers with `tel:` URLs\n * - Email addresses with `mailto:` URLs\n * - While web browsers may not support other URL schemes, websites can with\n * [`registerProtocolHandler()`](https://developer.mozilla.org/docs/Web/API/Navigator/registerProtocolHandler)\n *\n * @webnative\n */\n @Prop() public readonly href?: URL | string\n\n /**\n * Hints at the human language of the linked URL. No built-in functionality.\n * Allowed values are the same as\n * [the global `lang` attribute](https://developer.mozilla.org/docs/Web/HTML/Global_attributes/lang).\n *\n * @webnative\n */\n @Prop() public readonly hreflang?: string\n\n /**\n * How much of the\n * [referrer](https://developer.mozilla.org/docs/Web/HTTP/Headers/Referer)\n * to send when following the inline link.\n *\n * - `no-referrer`: The\n * [`Referer`](https://developer.mozilla.org/docs/Web/HTTP/Headers/Referer)\n * header will not be sent.\n * - `no-referrer-when-downgrade`: The\n * [`Referer`](https://developer.mozilla.org/docs/Web/HTTP/Headers/Referer)\n * header will not be sent to\n * [origin](https://developer.mozilla.org/docs/Glossary/Origin)s\n * without [TLS](https://developer.mozilla.org/docs/Glossary/TLS)\n * ([HTTPS](https://developer.mozilla.org/docs/Glossary/HTTPS)).\n * - `origin`: The sent referrer will be limited to the origin of the\n * referring page: its\n * [scheme](https://developer.mozilla.org/docs/Learn/Common_questions/What_is_a_URL),\n * [host](https://developer.mozilla.org/docs/Glossary/Host), and\n * [port](https://developer.mozilla.org/docs/Glossary/Port).\n * - `origin-when-cross-origin`: The referrer sent to other origins will be\n * limited to the scheme, the host, and the port. Navigations on the same\n * origin will still include the path.\n * - `same-origin`: A referrer will be sent for\n * [same origin](https://developer.mozilla.org/docs/Glossary/Same-origin_policy),\n * but cross-origin requests will contain no referrer information.\n * - `strict-origin`: Only send the origin of the document as the referrer\n * when the protocol security level stays the same (HTTPS→HTTPS), but don't\n * send it to a less secure destination (HTTPS→HTTP).\n * - `strict-origin-when-cross-origin` (default): Send a full URL when\n * performing a same-origin request, only send the origin when the protocol\n * security level stays the same (HTTPS→HTTPS), and send no header to a less\n * secure destination (HTTPS→HTTP).\n * - `unsafe-url`: The referrer will include the origin and the path (but not the\n * [fragment](https://developer.mozilla.org/docs/Web/API/HTMLAnchorElement/hash),\n * [password](https://developer.mozilla.org/docs/Web/API/HTMLAnchorElement/password),\n * or [username](https://developer.mozilla.org/docs/Web/API/HTMLAnchorElement/username)).\n * **This value is unsafe** because it leaks origins and paths from\n * TLS-protected resources to insecure origins.\n *\n * @webnative\n */\n @Prop({ attribute: 'referrerpolicy' })\n public readonly referrerPolicy?: ReferrerPolicy\n\n /**\n * The relationship of the linked URL as space-separated\n * [link types](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel).\n *\n * The following list includes some of the most important existing keywords.\n * Every keyword within a space-separated value should be unique within that\n * value.\n *\n * - [`alternate`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-alternate):\n * Alternate representations of the current document.\n * - [`author`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-author):\n * Author of the current document or article.\n * - [`bookmark`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-bookmark):\n * Permalink for the nearest ancestor section.\n * - [`external`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-external):\n * The referenced document is not part of the same site as the current\n * document. An icon will be rendered next to the text if this value is\n * specified.\n * - [`help`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-help):\n * Link to context-sensitive help.\n * - [`license`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-license):\n * Indicates that the main content of the current document is covered by the\n * copyright license described by the referenced document.\n * - [`me`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel/me):\n * Indicates that the current document represents the person who owns the\n * linked content.\n * - [`next`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-next):\n * Indicates that the current document is a part of a series and that the\n * next document in the series is the referenced document.\n * - [`nofollow`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-nofollow):\n * Indicates that the current document's original author or publisher does\n * not endorse the referenced document.\n * - [`noopener`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel/noopener):\n * Creates a top-level browsing context that is not an auxiliary browsing\n * context if the hyperlink would create either of those, to begin with (i.e.,\n * has an appropriate `target` attribute value).\n * - [`noreferrer`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-noreferrer):\n * No `Referer` header will be included. Additionally, has the same effect as\n * `noopener`.\n * - [`opener`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-opener):\n * Creates an auxiliary browsing context if the hyperlink would otherwise\n * create a top-level browsing context that is not an auxiliary browsing\n * context (i.e., has \"`_blank`\" as `target` attribute value).\n * - [`prev`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-prev):\n * Indicates that the current document is a part of a series and that the\n * previous document in the series is the referenced document.\n * - [`search`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-search):\n * Gives a link to a resource that can be used to search through the current\n * document and its related pages.\n * - [`tag`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-tag):\n * Gives a tag (identified by the given address) that applies to the current\n * document.\n *\n * @webnative\n */\n @Prop() public readonly rel?: string\n\n /**\n * Where to display the linked URL, as the name for a browsing context (a\n * tab, window, or\n * [`<iframe>`](https://developer.mozilla.org/docs/Web/HTML/Element/iframe).\n * The following keywords have special meanings for where to load the URL:\n *\n * - `_blank`: usually a new tab, but users can configure browsers to open a new\n * window instead.\n * - `_parent`: the parent browsing context of the current one. If no parent,\n * behaves as `_self`.\n * - `_self`: the current browsing context.\n * - `_top`: the topmost browsing context (the \"highest\" context that's an\n * ancestor of the current one). If no ancestors, behaves as `_self`.\n *\n * @webnative\n */\n @Prop() public readonly target?: LiteralUnion<Target, string>\n\n /**\n * Emitted when the inline link loses focus.\n */\n @Event({ eventName: 'qdsBlur', bubbles: false, cancelable: false })\n private readonly blurEmitter!: EventEmitter<QdsFocusEventDetail>\n\n /**\n * Emitted when the inline link 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 linkIcon?: LinkIcon\n\n @AttachInternals() private readonly internals!: ElementInternals\n\n #savedTabIndex = 0\n\n #link?: HTMLAnchorElement\n\n get #computedImportance(): Importance {\n switch (this.importance) {\n case 'subdued':\n case 'emphasized': {\n return this.importance\n }\n default: {\n return 'standard'\n }\n }\n }\n\n get #openInNewTab(): boolean {\n return this.target === '_blank'\n }\n\n @Listen('click')\n protected onClick(event: MouseEvent): void {\n if (this.disabled) event.stopImmediatePropagation()\n }\n\n @Listen('keydown')\n protected onKeydown(event: KeyboardEvent): void {\n invariant(this.#link)\n if (this.disabled) return\n if (event.key === 'Enter') this.#link.click()\n }\n\n @Watch('disabled')\n protected disabledChanged(): void {\n this.internals.ariaDisabled = this.disabled.toString()\n if (this.disabled) this.host.removeAttribute('tabindex')\n else this.host.tabIndex = this.#savedTabIndex\n }\n\n @Watch('tabindex')\n protected tabindexChanged(newValue: string): void {\n const parsedValue = Number.parseInt(newValue, 10)\n // FIXME: `undefined` instead of `0` causes `qdsFocus/qdsBlur` E2E tests\n // to fail, but it's not clear why this is the case since it works for\n // other components.\n this.#savedTabIndex = Number.isNaN(parsedValue) ? 0 : parsedValue\n if (this.disabled) this.host.removeAttribute('tabindex')\n else this.host.tabIndex = this.#savedTabIndex\n }\n\n @Watch('rel')\n @Watch('target')\n protected hrefTargetChanged(): void {\n this.linkIcon = determineLinkIcon(this.target, this.rel)\n this.#updateAriaLabelElements()\n }\n\n public componentWillLoad(): void {\n this.internals.role = 'link'\n this.disabledChanged()\n this.hrefTargetChanged()\n this.tabindexChanged(this.host.getAttribute('tabindex') ?? '0')\n }\n\n public componentDidLoad(): void {\n this.#updateAriaLabelElements()\n }\n\n public render() {\n return (\n <a\n aria-hidden=\"true\"\n class={{\n 'qds-inline-link': true,\n 'qds-disabled': this.disabled,\n }}\n data-importance={this.#computedImportance}\n download={this.download}\n href={this.href?.toString()}\n hrefLang={this.hreflang}\n onBlur={this.#onBlur}\n onFocus={this.#onFocus}\n referrerPolicy={this.referrerPolicy}\n rel={this.rel}\n tabIndex={-1}\n target={this.target}\n ref={this.#linkRef}\n >\n {this.iconName !== undefined && this.iconName !== '' && (\n <qds-icon\n class=\"qds-icon\"\n library={this.iconLibrary}\n name={this.iconName}\n />\n )}\n <slot onSlotchange={this.#onSlotchange} />\n {this.linkIcon && (\n <qds-icon class=\"qds-icon\" library=\"core\" name={this.linkIcon} />\n )}\n </a>\n )\n }\n\n readonly #linkRef = (link?: HTMLAnchorElement): void => {\n this.#link = link\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 readonly #updateAriaLabelElements = (): void => {\n this.internals.ariaLabel = `${this.host.textContent} ${\n this.#openInNewTab ? 'Opens in a new tab' : ''\n }`.trim()\n }\n\n readonly #onSlotchange = (): void => {\n this.#updateAriaLabelElements()\n }\n}\n"],"names":["pickFocusEventAttributes","invariant","determineLinkIcon","h"],"mappings":";;;;;;;;;;AAAA,MAAM,aAAa,GAAG,68DAA68D;;ACAn+D;AACA;AACA;;;;;;;;;;;;;;;;;;MAyCa,UAAU,GAAA,MAAA;AALvB,IAAA,WAAA,CAAA,OAAA,EAAA;;;;;;;;;;;;AAME;;;AAGG;AACqB,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AASjD;;AAEG;AACqB,QAAA,IAAW,CAAA,WAAA,GAAW,SAAS;AAEvD;;AAEG;AACqB,QAAA,IAAU,CAAA,UAAA,GAAgB,UAAU;AAoM5D,QAAA,yBAAA,CAAA,GAAA,CAAA,IAAA,EAAiB,CAAC,CAAA;QAElB,gBAAyB,CAAA,GAAA,CAAA,IAAA,EAAA,MAAA,CAAA;QAqGhB,mBAAW,CAAA,GAAA,CAAA,IAAA,EAAA,CAAC,IAAwB,KAAU;YACrD,sBAAA,CAAA,IAAI,EAAA,gBAAA,EAAS,IAAI,EAAA,GAAA,CAAA;AACnB,SAAC,CAAA;QAEQ,kBAAU,CAAA,GAAA,CAAA,IAAA,EAAA,CAAC,KAAiB,KAAU;YAC7C,IAAI,CAAC,WAAW,CAAC,IAAI,CAACA,gCAAwB,CAAC,KAAK,CAAC,CAAC;AACxD,SAAC,CAAA;QAEQ,mBAAW,CAAA,GAAA,CAAA,IAAA,EAAA,CAAC,KAAiB,KAAU;YAC9C,IAAI,CAAC,YAAY,CAAC,IAAI,CAACA,gCAAwB,CAAC,KAAK,CAAC,CAAC;AACzD,SAAC,CAAA;A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inline-link/inline-link.css?tag=qds-inline-link&encapsulation=shadow","src/components/inline-link/inline-link.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:host(:focus-visible) {\n /* inner ring */\n outline: var(--qds-theme-focus-border-contrast) solid\n var(--qds-focus-light-border-width);\n outline-offset: 0;\n\n /* outer ring */\n box-shadow: 0 0 0 var(--qds-focus-heavy-border-width)\n var(--qds-theme-focus-border);\n border-radius: var(--qds-control-border-radius);\n}\n\n.qds-icon {\n height: var(--qds-control-hero-icon-size);\n width: var(--qds-control-hero-icon-size);\n transform: scaleX(var(--qds-direction-factor, 1));\n}\n\n.qds-inline-link {\n display: flex;\n gap: var(--qds-text-icon-gap);\n align-items: center;\n}\n\n.qds-disabled {\n opacity: var(--qds-theme-disabled);\n pointer-events: none;\n}\n\n[data-importance='subdued'] {\n color: var(--qds-theme-link-subdued-default);\n\n &:visited {\n color: var(--qds-theme-link-visited-default);\n }\n\n &:hover {\n color: var(--qds-theme-link-subdued-hover);\n }\n\n &:active {\n color: var(--qds-theme-link-subdued-pressed);\n }\n\n &:visited:hover {\n color: var(--qds-theme-link-visited-hover);\n }\n\n &:visited:active {\n color: var(--qds-theme-link-visited-pressed);\n }\n}\n\n[data-importance='standard'] {\n color: var(--qds-theme-link-standard-default);\n\n &:visited {\n color: var(--qds-theme-link-visited-default);\n }\n\n &:hover {\n color: var(--qds-theme-link-standard-hover);\n }\n\n &:active {\n color: var(--qds-theme-link-standard-pressed);\n }\n\n &:visited:hover {\n color: var(--qds-theme-link-visited-hover);\n }\n\n &:visited:active {\n color: var(--qds-theme-link-visited-pressed);\n }\n}\n\n[data-importance='emphasized'] {\n color: var(--qds-theme-link-emphasized-default);\n\n &:visited {\n color: var(--qds-theme-link-visited-default);\n }\n\n &:hover {\n color: var(--qds-theme-link-emphasized-hover);\n }\n\n &:active {\n color: var(--qds-theme-link-emphasized-pressed);\n }\n\n &:visited:hover {\n color: var(--qds-theme-link-visited-hover);\n }\n\n &:visited:active {\n color: var(--qds-theme-link-visited-pressed);\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'\nimport type { LiteralUnion } from 'type-fest'\n\nimport type { QdsFocusEventDetail } from '../../helpers'\nimport {\n determineLinkIcon,\n invariant,\n pickFocusEventAttributes,\n} from '../../helpers'\nimport type { Importance, LinkIcon, Target } from '../shared'\n\n/**\n * `<qds-inline-link>` elements, with their `href` property, create a hyperlink\n * to web pages, files, email addresses, locations in the same page, or\n * anything else a URL can address.\n *\n * Content within each `<qds-inline-link>` *should* indicate the inline link's\n * destination. If the `href` property is present, pressing the enter key while\n * focused on the `<qds-inline-link>` element will activate it.\n *\n * @slot Content to display for the inline link.\n * @see https://quartz.se.com/build/components/inline-link\n */\n@Component({\n tag: 'qds-inline-link',\n shadow: true,\n styleUrl: 'inline-link.css',\n})\nexport class InlineLink implements ComponentInterface {\n /**\n * Prevents the inline link from being interacted with: it cannot be pressed\n * or focused.\n */\n @Prop() public readonly disabled: boolean = false\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 * The inline link's importance.\n */\n @Prop() public readonly importance?: Importance = 'standard'\n\n /**\n * Causes the browser to treat the linked URL as a download. Can be used with\n * or without a `filename` value:\n *\n * - Without a value, the browser will suggest a filename/extension,\n * generated from various sources:\n *\n * - The\n * [`Content-Disposition`](https://developer.mozilla.org/docs/Web/HTTP/Headers/Content-Disposition)\n * HTTP header\n * - The final segment in the URL\n * [path](https://developer.mozilla.org/docs/Web/API/URL/pathname)\n * - The\n * [media type](https://developer.mozilla.org/docs/Glossary/MIME_type)\n * (from the\n * [`Content-Type`](https://developer.mozilla.org/docs/Web/HTTP/Headers/Content-Type)\n * header, the start of a\n * [`data:` URL](https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URLs),\n * or\n * [`Blob.type`](https://developer.mozilla.org/docs/Web/API/Blob/type)\n * for a\n * [`blob:` URL](https://developer.mozilla.org/docs/Web/API/URL/createObjectURL))\n * - `filename`: defining a value suggests it as the filename. `/` and `\\`\n * characters are converted to underscores (`_`). Filesystems may forbid\n * other characters in filenames, so browsers will adjust the suggested name\n * if necessary.\n *\n * @webnative\n */\n @Prop() public readonly download?: boolean | string\n\n /**\n * The URL that the inline link points to. Inline links are not restricted to\n * HTTP-based URLs — they can use any URL scheme supported by browsers:\n *\n * - Sections of a page with document fragments\n * - Specific text portions with\n * [text fragments](https://developer.mozilla.org/docs/Web/Text_fragments)\n * - Pieces of media files with media fragments\n * - Telephone numbers with `tel:` URLs\n * - Email addresses with `mailto:` URLs\n * - While web browsers may not support other URL schemes, websites can with\n * [`registerProtocolHandler()`](https://developer.mozilla.org/docs/Web/API/Navigator/registerProtocolHandler)\n *\n * @webnative\n */\n @Prop() public readonly href?: URL | string\n\n /**\n * Hints at the human language of the linked URL. No built-in functionality.\n * Allowed values are the same as\n * [the global `lang` attribute](https://developer.mozilla.org/docs/Web/HTML/Global_attributes/lang).\n *\n * @webnative\n */\n @Prop() public readonly hreflang?: string\n\n /**\n * How much of the\n * [referrer](https://developer.mozilla.org/docs/Web/HTTP/Headers/Referer)\n * to send when following the inline link.\n *\n * - `no-referrer`: The\n * [`Referer`](https://developer.mozilla.org/docs/Web/HTTP/Headers/Referer)\n * header will not be sent.\n * - `no-referrer-when-downgrade`: The\n * [`Referer`](https://developer.mozilla.org/docs/Web/HTTP/Headers/Referer)\n * header will not be sent to\n * [origin](https://developer.mozilla.org/docs/Glossary/Origin)s\n * without [TLS](https://developer.mozilla.org/docs/Glossary/TLS)\n * ([HTTPS](https://developer.mozilla.org/docs/Glossary/HTTPS)).\n * - `origin`: The sent referrer will be limited to the origin of the\n * referring page: its\n * [scheme](https://developer.mozilla.org/docs/Learn/Common_questions/What_is_a_URL),\n * [host](https://developer.mozilla.org/docs/Glossary/Host), and\n * [port](https://developer.mozilla.org/docs/Glossary/Port).\n * - `origin-when-cross-origin`: The referrer sent to other origins will be\n * limited to the scheme, the host, and the port. Navigations on the same\n * origin will still include the path.\n * - `same-origin`: A referrer will be sent for\n * [same origin](https://developer.mozilla.org/docs/Glossary/Same-origin_policy),\n * but cross-origin requests will contain no referrer information.\n * - `strict-origin`: Only send the origin of the document as the referrer\n * when the protocol security level stays the same (HTTPS→HTTPS), but don't\n * send it to a less secure destination (HTTPS→HTTP).\n * - `strict-origin-when-cross-origin` (default): Send a full URL when\n * performing a same-origin request, only send the origin when the protocol\n * security level stays the same (HTTPS→HTTPS), and send no header to a less\n * secure destination (HTTPS→HTTP).\n * - `unsafe-url`: The referrer will include the origin and the path (but not the\n * [fragment](https://developer.mozilla.org/docs/Web/API/HTMLAnchorElement/hash),\n * [password](https://developer.mozilla.org/docs/Web/API/HTMLAnchorElement/password),\n * or [username](https://developer.mozilla.org/docs/Web/API/HTMLAnchorElement/username)).\n * **This value is unsafe** because it leaks origins and paths from\n * TLS-protected resources to insecure origins.\n *\n * @webnative\n */\n @Prop({ attribute: 'referrerpolicy' })\n public readonly referrerPolicy?: ReferrerPolicy\n\n /**\n * The relationship of the linked URL as space-separated\n * [link types](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel).\n *\n * The following list includes some of the most important existing keywords.\n * Every keyword within a space-separated value should be unique within that\n * value.\n *\n * - [`alternate`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-alternate):\n * Alternate representations of the current document.\n * - [`author`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-author):\n * Author of the current document or article.\n * - [`bookmark`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-bookmark):\n * Permalink for the nearest ancestor section.\n * - [`external`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-external):\n * The referenced document is not part of the same site as the current\n * document. An icon will be rendered next to the text if this value is\n * specified.\n * - [`help`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-help):\n * Link to context-sensitive help.\n * - [`license`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-license):\n * Indicates that the main content of the current document is covered by the\n * copyright license described by the referenced document.\n * - [`me`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel/me):\n * Indicates that the current document represents the person who owns the\n * linked content.\n * - [`next`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-next):\n * Indicates that the current document is a part of a series and that the\n * next document in the series is the referenced document.\n * - [`nofollow`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-nofollow):\n * Indicates that the current document's original author or publisher does\n * not endorse the referenced document.\n * - [`noopener`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel/noopener):\n * Creates a top-level browsing context that is not an auxiliary browsing\n * context if the hyperlink would create either of those, to begin with (i.e.,\n * has an appropriate `target` attribute value).\n * - [`noreferrer`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-noreferrer):\n * No `Referer` header will be included. Additionally, has the same effect as\n * `noopener`.\n * - [`opener`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-opener):\n * Creates an auxiliary browsing context if the hyperlink would otherwise\n * create a top-level browsing context that is not an auxiliary browsing\n * context (i.e., has \"`_blank`\" as `target` attribute value).\n * - [`prev`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-prev):\n * Indicates that the current document is a part of a series and that the\n * previous document in the series is the referenced document.\n * - [`search`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-search):\n * Gives a link to a resource that can be used to search through the current\n * document and its related pages.\n * - [`tag`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-tag):\n * Gives a tag (identified by the given address) that applies to the current\n * document.\n *\n * @webnative\n */\n @Prop() public readonly rel?: string\n\n /**\n * Where to display the linked URL, as the name for a browsing context (a\n * tab, window, or\n * [`<iframe>`](https://developer.mozilla.org/docs/Web/HTML/Element/iframe).\n * The following keywords have special meanings for where to load the URL:\n *\n * - `_blank`: usually a new tab, but users can configure browsers to open a new\n * window instead.\n * - `_parent`: the parent browsing context of the current one. If no parent,\n * behaves as `_self`.\n * - `_self`: the current browsing context.\n * - `_top`: the topmost browsing context (the \"highest\" context that's an\n * ancestor of the current one). If no ancestors, behaves as `_self`.\n *\n * @webnative\n */\n @Prop() public readonly target?: LiteralUnion<Target, string>\n\n /**\n * Emitted when the inline link loses focus.\n */\n @Event({ eventName: 'qdsBlur', bubbles: false, cancelable: false })\n private readonly blurEmitter!: EventEmitter<QdsFocusEventDetail>\n\n /**\n * Emitted when the inline link 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 linkIcon?: LinkIcon\n\n @AttachInternals() private readonly internals!: ElementInternals\n\n #savedTabIndex = 0\n\n #link?: HTMLAnchorElement\n\n get #computedImportance(): Importance {\n switch (this.importance) {\n case 'subdued':\n case 'emphasized': {\n return this.importance\n }\n default: {\n return 'standard'\n }\n }\n }\n\n get #openInNewTab(): boolean {\n return this.target === '_blank'\n }\n\n @Listen('click')\n protected onClick(event: MouseEvent): void {\n if (this.disabled) event.stopImmediatePropagation()\n }\n\n @Listen('keydown')\n protected onKeydown(event: KeyboardEvent): void {\n invariant(this.#link)\n if (this.disabled) return\n if (event.key === 'Enter') this.#link.click()\n }\n\n @Watch('disabled')\n protected disabledChanged(): void {\n this.internals.ariaDisabled = this.disabled.toString()\n if (this.disabled) this.host.removeAttribute('tabindex')\n else this.host.tabIndex = this.#savedTabIndex\n }\n\n @Watch('tabindex')\n protected tabindexChanged(newValue: string): void {\n const parsedValue = Number.parseInt(newValue, 10)\n // FIXME: `undefined` instead of `0` causes `qdsFocus/qdsBlur` E2E tests\n // to fail, but it's not clear why this is the case since it works for\n // other components.\n this.#savedTabIndex = Number.isNaN(parsedValue) ? 0 : parsedValue\n if (this.disabled) this.host.removeAttribute('tabindex')\n else this.host.tabIndex = this.#savedTabIndex\n }\n\n @Watch('rel')\n @Watch('target')\n protected hrefTargetChanged(): void {\n this.linkIcon = determineLinkIcon(this.target, this.rel)\n this.#updateAriaLabelElements()\n }\n\n public componentWillLoad(): void {\n this.internals.role = 'link'\n this.disabledChanged()\n this.hrefTargetChanged()\n this.tabindexChanged(this.host.getAttribute('tabindex') ?? '0')\n }\n\n public componentDidLoad(): void {\n this.#updateAriaLabelElements()\n }\n\n public render() {\n return (\n <a\n aria-hidden=\"true\"\n class={{\n 'qds-inline-link': true,\n 'qds-disabled': this.disabled,\n }}\n data-importance={this.#computedImportance}\n download={this.download}\n href={this.href?.toString()}\n hrefLang={this.hreflang}\n onBlur={this.#onBlur}\n onFocus={this.#onFocus}\n referrerPolicy={this.referrerPolicy}\n rel={this.rel}\n tabIndex={-1}\n target={this.target}\n ref={this.#linkRef}\n >\n {this.iconName !== undefined && this.iconName !== '' && (\n <qds-icon\n class=\"qds-icon\"\n library={this.iconLibrary}\n name={this.iconName}\n />\n )}\n <slot onSlotchange={this.#onSlotchange} />\n {this.linkIcon && (\n <qds-icon class=\"qds-icon\" library=\"core\" name={this.linkIcon} />\n )}\n </a>\n )\n }\n\n readonly #linkRef = (link?: HTMLAnchorElement): void => {\n this.#link = link\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 readonly #updateAriaLabelElements = (): void => {\n this.internals.ariaLabel = `${this.host.textContent} ${\n this.#openInNewTab ? 'Opens in a new tab' : ''\n }`.trim()\n }\n\n readonly #onSl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c,EACnC,GAAG,EAAE,IAAI,CAAC,GAAG,EACb,QAAQ,EAAE,EAAE,EACZ,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,GAAG,EAAE,sBAAA,CAAA,IAAI,EAAS,mBAAA,EAAA,GAAA,CAAA,EAAA,EAEjB,IAAI,CAAC,QAAQ,KAAK,SAAS,IAAI,IAAI,CAAC,QAAQ,KAAK,EAAE,KAClDA,OACE,CAAA,UAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,UAAU,EAChB,OAAO,EAAE,IAAI,CAAC,WAAW,EACzB,IAAI,EAAE,IAAI,CAAC,QAAQ,GACnB,CACH,EACDA,OAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,YAAY,EAAE,sBAAA,CAAA,IAAI,gCAAc,EAAI,CAAA,EACzC,IAAI,CAAC,QAAQ,KACZA,uEAAU,KAAK,EAAC,UAAU,EAAC,OAAO,EAAC,MAAM,EAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAI,CAAA,CAClE,CACC;;;;;;;;;;;AA9FN,IAAA,QAAQ,IAAI,CAAC,UAAU;AACrB,QAAA,KAAK,SAAS;QACd,KAAK,YAAY,EAAE;YACjB,OAAO,IAAI,CAAC,UAAU;;QAExB,SAAS;AACP,YAAA,OAAO,UAAU;;;AAGvB,CAAC,EAAA,4BAAA,GAAA,SAAA,4BAAA,GAAA;AAGC,IAAA,OAAO,IAAI,CAAC,MAAM,KAAK,QAAQ;AACjC,CAAC;;;;;"}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
8
|
var index = require('./index-DIY7gpXM.js');
|
|
9
|
-
var helpers = require('./helpers-
|
|
9
|
+
var helpers = require('./helpers-DjUgyTKn.js');
|
|
10
10
|
var controls = require('./controls-DKGeNyr5.js');
|
|
11
11
|
|
|
12
12
|
const inputCss = ":host([hidden]){display:none!important}:host{display:inline-block}@-moz-document url-prefix(){[type=date]~.qds-icon-container,[type=datetime-local]~.qds-icon-container,[type=month]~.qds-icon-container,[type=time]~.qds-icon-container,[type=week]~.qds-icon-container{display:none}}input[type=password]::-ms-reveal{display:none}.qds-container,.qds-input{max-width:inherit;width:inherit}.qds-container{align-content:flex-start;align-items:center;box-sizing:border-box;display:grid;grid-template-areas:\"e\"}.qds-icon-container,.qds-input{grid-area:e}.qds-focus-ring{border-radius:max(1px,var(\n --qds-form-input-border-radius-top-left,var(--qds-form-input-border-radius)\n )) max(1px,var(\n --qds-form-input-border-radius-top-right,var(--qds-form-input-border-radius)\n )) max(1px,var(\n --qds-form-input-border-radius-bottom-right,var(--qds-form-input-border-radius)\n )) max(1px,var(\n --qds-form-input-border-radius-bottom-left,var(--qds-form-input-border-radius)\n ));box-shadow:0 0 0 var(--qds-focus-heavy-border-width) var(--qds-theme-focus-border);grid-area:e;height:calc(100% + var(--qds-form-input-border-width-default) - var(\n --qds-form-input-border-width-block-end,\n var(--qds-form-input-border-width-default)\n ));isolation:isolate;outline:var(--qds-theme-focus-border-contrast) solid var(--qds-focus-light-border-width);outline-offset:0;pointer-events:none;visibility:hidden;width:calc(100% + var(--qds-form-input-border-width-default) - var(\n --qds-form-input-border-width-inline-end,\n var(--qds-form-input-border-width-default)\n ))}[data-size=large]{font:var(--qds-form-large-text);min-height:var(--qds-form-input-large-height);padding-inline:var(--qds-form-input-large-padding-start) var(--qds-form-input-large-padding-end)}.qds-password-padding[data-size=large],[data-size=large][type=date],[data-size=large][type=datetime-local],[data-size=large][type=month],[data-size=large][type=time],[data-size=large][type=week]{padding-inline:var(--qds-form-input-large-padding-end) calc(var(--qds-form-input-large-padding-end) + var(--qds-form-input-large-height))}[data-size=large]~.qds-icon-container{padding-inline-end:var(--qds-form-input-large-padding-end)}[data-size=large][type=number]{padding-inline:var(--qds-form-input-large-padding-start) var(--qds-form-input-large-padding-end)}[data-size=large][type=file]{padding-block:var(--qds-form-input-large-padding-start) var(--qds-form-input-large-padding-end)}[data-size=large][type=file]::file-selector-button{font:var(--qds-form-large-text);margin-inline-end:var(--qds-control-large-gap-siblings-related);min-height:var(--qds-form-input-large-height);padding-inline:var(--qds-control-button-large-padding-horizontal)}[data-size=large][type=search]{padding-inline:var(--qds-form-input-large-padding-end) calc(var(--qds-form-input-small-height) + var(--qds-control-mini-button-standard-size) + var(--qds-form-input-large-padding-end) + var(--qds-form-input-large-gap-internal))}[data-size=large][type=search]~.qds-icon-container{gap:var(--qds-form-input-large-gap-internal)}.qds-custom-icon-padding[data-size=large]{padding-inline:var(--qds-form-input-large-padding-start) calc(var(--qds-form-input-large-padding-end) + var(--qds-form-input-large-height))}.qds-dual-icon-padding[data-size=large]{padding-inline:var(--qds-form-input-large-padding-start) calc(var(--qds-form-input-large-padding-end) + var(--qds-form-input-large-height) + var(--qds-control-mini-button-standard-size) + var(--qds-form-input-large-gap-internal))}.qds-dual-icon-padding[data-size=large]~.qds-icon-container{gap:var(--qds-form-input-large-gap-internal)}.qds-padding[data-size=large]{padding-inline:var(--qds-form-input-large-padding-start) var(--qds-form-input-large-padding-end)}[data-size=large]{@-moz-document url-prefix(){&[type=date],&[type=datetime-local],&[type=month],&[type=time],&[type=week]{padding-inline:var(--qds-form-input-large-padding-start) var(--qds-form-input-large-padding-end)}}}[data-size=standard]{font:var(--qds-form-standard-text);min-height:var(--qds-form-input-standard-height);padding-inline:var(--qds-form-input-standard-padding-start) var(--qds-form-input-standard-padding-end)}.qds-password-padding[data-size=standard],[data-size=standard][type=date],[data-size=standard][type=datetime-local],[data-size=standard][type=month],[data-size=standard][type=time],[data-size=standard][type=week]{padding-inline:var(--qds-form-input-standard-padding-start) calc(var(--qds-form-input-standard-padding-end) + var(--qds-form-input-standard-height))}[data-size=standard]~.qds-icon-container{padding-inline-end:var(--qds-form-input-standard-padding-end)}[data-size=standard][type=number]{padding-inline:var(--qds-form-input-standard-padding-start) var(--qds-form-input-standard-padding-end)}[data-size=standard][type=file]{padding-block:var(--qds-form-input-standard-padding-start) var(--qds-form-input-standard-padding-end)}[data-size=standard][type=file]::file-selector-button{font:var(--qds-form-standard-text);margin-inline-end:var(--qds-control-standard-gap-siblings-related);min-height:var(--qds-form-input-standard-height);padding-inline:var(--qds-control-button-standard-padding-horizontal)}[data-size=standard][type=search]{padding-inline:var(--qds-form-input-standard-padding-end) calc(var(--qds-form-input-small-height) + var(--qds-control-mini-button-standard-size) + var(--qds-form-input-standard-padding-end) + var(--qds-form-input-standard-gap-internal))}[data-size=standard][type=search]~.qds-icon-container{gap:var(--qds-form-input-standard-gap-internal)}.qds-custom-icon-padding[data-size=standard]{padding-inline:var(--qds-form-input-standard-padding-start) calc(var(--qds-form-input-standard-padding-end) + var(--qds-form-input-standard-height))}.qds-dual-icon-padding[data-size=standard]{padding-inline:var(--qds-form-input-standard-padding-start) calc(var(--qds-form-input-standard-padding-end) + var(--qds-form-input-standard-height) + var(--qds-control-mini-button-standard-size) + var(--qds-form-input-standard-gap-internal))}.qds-dual-icon-padding[data-size=standard]~.qds-icon-container{gap:var(--qds-form-input-standard-gap-internal)}.qds-padding[data-size=standard]{padding-inline:var(--qds-form-input-standard-padding-start) var(--qds-form-input-standard-padding-end)}[data-size=standard]{@-moz-document url-prefix(){&[type=date],&[type=datetime-local],&[type=month],&[type=time],&[type=week]{padding-inline:var(--qds-form-input-standard-padding-start) var(--qds-form-input-standard-padding-end)}}}[data-size=small]{font:var(--qds-form-small-text);min-height:var(--qds-form-input-small-height);padding-inline:var(--qds-form-input-small-padding-start) var(--qds-form-input-small-padding-end)}.qds-password-padding[data-size=small],[data-size=small][type=date],[data-size=small][type=datetime-local],[data-size=small][type=month],[data-size=small][type=time],[data-size=small][type=week]{padding-inline:var(--qds-form-input-small-padding-end) calc(var(--qds-form-input-small-padding-end) + var(--qds-form-input-small-height))}[data-size=small]~.qds-icon-container{padding-inline-end:var(--qds-form-input-small-padding-end)}[data-size=small][type=number]{padding-inline:var(--qds-form-input-small-padding-start) var(--qds-form-input-small-padding-end)}[data-size=small][type=file]{padding-block:var(--qds-form-input-small-padding-start) var(--qds-form-input-small-padding-end)}[data-size=small][type=file]::file-selector-button{font:var(--qds-form-small-text);margin-inline-end:var(--qds-control-small-gap-siblings-related);min-height:var(--qds-form-input-small-height);padding-inline:var(--qds-control-button-small-padding-horizontal)}[data-size=small][type=search]{padding-inline:var(--qds-form-input-small-padding-end) calc(var(--qds-form-input-small-height) + var(--qds-control-mini-button-standard-size) + var(--qds-form-input-small-padding-end) + var(--qds-form-input-small-gap-internal))}[data-size=small][type=search]~.qds-icon-container{gap:var(--qds-form-input-small-gap-internal)}.qds-custom-icon-padding[data-size=small]{padding-inline:var(--qds-form-input-small-padding-start) calc(var(--qds-form-input-small-padding-end) + var(--qds-form-input-small-height))}.qds-dual-icon-padding[data-size=small]{padding-inline:var(--qds-form-input-small-padding-start) calc(var(--qds-form-input-small-padding-end) + var(--qds-form-input-small-height) + var(--qds-control-mini-button-standard-size) + var(--qds-form-input-small-gap-internal))}.qds-dual-icon-padding[data-size=small]~.qds-icon-container{gap:var(--qds-form-input-small-gap-internal)}.qds-padding[data-size=small]{padding-inline:var(--qds-form-input-small-padding-start) var(--qds-form-input-small-padding-end)}[data-size=small]{@-moz-document url-prefix(){&[type=date],&[type=datetime-local],&[type=month],&[type=time],&[type=week]{padding-inline:var(--qds-form-input-small-padding-start) var(--qds-form-input-small-padding-end)}}}.qds-input{-webkit-appearance:textfield;appearance:textfield;background-color:var(--qds-theme-form-input-background-default);border-color:var(--qds-theme-form-input-border-default);border-radius:var(\n --qds-form-input-border-radius-top-left,var(--qds-form-input-border-radius)\n ) var(\n --qds-form-input-border-radius-top-right,var(--qds-form-input-border-radius)\n ) var(\n --qds-form-input-border-radius-bottom-right,var(--qds-form-input-border-radius)\n ) var(\n --qds-form-input-border-radius-bottom-left,var(--qds-form-input-border-radius)\n );border-style:solid;border-width:var(--qds-form-input-border-width-default) var(\n --qds-form-input-border-width-inline-end,var(--qds-form-input-border-width-default)\n ) var(\n --qds-form-input-border-width-block-end,var(--qds-form-input-border-width-default)\n ) var(--qds-form-input-border-width-default);box-sizing:border-box;color:var(--qds-theme-form-input-text-active);grid-area:e;padding-block:0}.qds-input.qds-hide~.qds-icon-container{display:none}.qds-input:disabled,.qds-input:disabled~.qds-icon-container{opacity:var(--qds-theme-disabled);pointer-events:none}.qds-input:focus-visible{outline:none}.qds-input:focus-visible~.qds-focus-ring{visibility:visible}.qds-input:read-only{background-color:var(--qds-theme-form-input-background-read-only);border-color:var(--qds-theme-form-input-border-disabled)}.qds-input:placeholder-shown{color:var(--qds-theme-control-text-placeholder)}.qds-input:hover{background-color:var(--qds-theme-form-input-background-hover);border-color:var(--qds-theme-form-input-border-hover)}.qds-input:active{background-color:var(--qds-theme-form-input-background-active);color:var(--qds-theme-form-input-text-active)}.qds-input::-webkit-search-cancel-button,.qds-input:is([type=date],[type=datetime-local],[type=month],[type=time],[type=week])::-webkit-calendar-picker-indicator{display:none}.qds-input[type=file]::file-selector-button{background-color:initial;border:var(--qds-form-input-border-width-default) solid var(--qds-theme-form-input-border-default);border-radius:var(--qds-control-border-radius);color:var(--qds-theme-form-input-text-active)}.qds-input[type=file]::file-selector-button:hover{background-color:var(--qds-theme-interactive-background-hover)}.qds-input[type=file]::file-selector-button:active{background-color:var(--qds-theme-interactive-background-pressed)}.qds-input[type=color]{-webkit-appearance:none;appearance:none;cursor:pointer;min-width:50px;padding-block:var(--qds-form-input-standard-padding-end);padding-inline:var(--qds-form-input-standard-padding-end)}.qds-input[type=color]::-webkit-color-swatch-wrapper{padding:0}.qds-input[type=color]::-webkit-color-swatch{border:var(--qds-form-input-border-width-default) solid var(--qds-theme-form-input-border-default);border-radius:var(--qds-control-border-radius)}.qds-input[type=color]::-moz-color-swatch{border:var(--qds-form-input-border-width-default) solid var(--qds-theme-form-input-border-default);border-radius:var(--qds-control-border-radius)}.qds-input[type=color]:hover{background-color:var(--qds-theme-interactive-background-hover)}.qds-input[type=color]:active{background-color:var(--qds-theme-interactive-background-pressed)}.qds-input.qds-search-padding[data-size=standard]{padding-inline:var(--qds-form-input-standard-padding-end) calc(var(--qds-form-input-small-height) + var(--qds-form-input-standard-padding-end))}.qds-input[data-size=standard][type=file]{height:auto}.qds-input.qds-search-padding[data-size=large]{padding-inline:var(--qds-form-input-large-padding-end) calc(var(--qds-form-input-small-height) + var(--qds-form-input-large-padding-end))}.qds-input[data-size=large][type=file]{height:auto}.qds-input.qds-search-padding[data-size=small]{padding-inline:var(--qds-form-input-small-padding-end) calc(var(--qds-form-input-small-height) + var(--qds-form-input-small-padding-end))}.qds-input[data-size=small][type=file]{height:auto}.qds-input{@-moz-document url-prefix(){&[type=number]{appearance:none}}}.qds-input[data-status]{border-width:var(--qds-form-input-border-width-status) var(\n --qds-form-input-border-width-inline-end,var(--qds-form-input-border-width-status)\n ) var(\n --qds-form-input-border-width-block-end,var(--qds-form-input-border-width-status)\n ) var(--qds-form-input-border-width-status)}.qds-input[data-status=success]{border-color:var(--qds-theme-form-input-border-success)}.qds-input[data-status=warning]{border-color:var(--qds-theme-form-input-border-warning)}.qds-input:not(:focus):user-invalid,.qds-input[data-status=error]{border-color:var(--qds-theme-form-input-border-error)}.qds-icon-container{align-items:center;display:flex;justify-content:center;justify-self:end}";
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
8
|
var index = require('./index-DIY7gpXM.js');
|
|
9
|
-
var helpers = require('./helpers-
|
|
9
|
+
var helpers = require('./helpers-DjUgyTKn.js');
|
|
10
10
|
|
|
11
11
|
const labelCss = ":host([hidden]){display:none!important}:host{display:inline-block}.qds-label{align-items:center;box-sizing:border-box;color:var(--qds-theme-control-text-standard);display:inline-flex;gap:var(--qds-text-icon-gap);width:100%}.qds-label:focus-visible{border-radius:var(--qds-focus-border-radius);outline:var(--qds-focus-border-width) solid var(--qds-theme-focus-border);outline-offset:var(--qds-focus-border-offset)}.qds-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.qds-required{color:var(--qds-theme-feedback-field-required);-webkit-user-select:none;user-select:none}[data-size=small][data-importance=standard]{font:var(--qds-form-small-text)}[data-size=small][data-importance=emphasized] .qds-text{font:var(--qds-form-small-text-emphasized)}.qds-inline[data-size=small]{min-height:var(--qds-control-small-height)}.qds-icon[data-size=small]{height:var(--qds-form-small-icon-size);min-width:var(--qds-form-small-icon-size);width:var(--qds-form-small-icon-size)}[data-size=standard][data-importance=standard]{font:var(--qds-form-standard-text)}[data-size=standard][data-importance=emphasized] .qds-text{font:var(--qds-form-standard-text-emphasized)}.qds-inline[data-size=standard]{min-height:var(--qds-control-standard-height)}.qds-icon[data-size=standard]{height:var(--qds-form-standard-icon-size);min-width:var(--qds-form-standard-icon-size);width:var(--qds-form-standard-icon-size)}[data-size=large][data-importance=standard]{font:var(--qds-form-large-text)}[data-size=large][data-importance=emphasized] .qds-text{font:var(--qds-form-large-text-emphasized)}.qds-inline[data-size=large]{min-height:var(--qds-control-large-height)}.qds-icon[data-size=large]{height:var(--qds-form-large-icon-size);min-width:var(--qds-form-large-icon-size);width:var(--qds-form-large-icon-size)}";
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
8
|
var index = require('./index-DIY7gpXM.js');
|
|
9
|
-
var helpers = require('./helpers-
|
|
9
|
+
var helpers = require('./helpers-DjUgyTKn.js');
|
|
10
10
|
|
|
11
11
|
const listItemCss = ":host([hidden]){display:none!important}:host{display:block}.qds-disabled{opacity:var(--qds-theme-disabled);pointer-events:none}.qds-indented-content,.qds-list-item{align-items:center;border-radius:var(--qds-control-border-radius);box-sizing:border-box}.qds-indented-content{align-self:stretch;cursor:default;display:flex;flex:1 0}.qds-destination{transform:scaleX(var(--qds-direction-factor,1))}.qds-icon,.qds-main-icon{color:var(--qds-theme-text-standard)}.qds-picture{flex-shrink:0}.qds-texts{display:flex;flex:1 0;flex-direction:column;justify-items:center;padding:0;position:relative}.qds-texts:focus-visible{border-radius:var(--qds-control-border-radius);box-shadow:0 0 0 var(--qds-focus-heavy-border-width) var(--qds-theme-focus-border);outline:var(--qds-theme-focus-border-contrast) solid var(--qds-focus-light-border-width);outline-offset:0}.qds-input{-webkit-appearance:none;appearance:none;background:none;border:none;border-radius:var(--qds-control-border-radius);inset:0;margin:0;outline:none;position:absolute}.qds-title{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}.qds-title,.qds-tooltip-title{color:var(--qds-theme-title)}.qds-subtitle{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:5;overflow:hidden}.qds-subtitle,.qds-tooltip-subtitle{color:var(--qds-theme-subtitle)}.qds-kicker{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;overflow:hidden}.qds-kicker,.qds-tooltip-kicker{color:var(--qds-theme-kicker)}.qds-draggable{cursor:grab}.qds-cursor-pointer{cursor:pointer}[data-size=small] .qds-indented-content{gap:var(--qds-list-item-small-gap-internal);min-height:var(--qds-list-item-small-height);padding:var(--qds-list-item-small-padding-vertical) var(--qds-list-item-small-padding-horizontal)}[data-size=small] .qds-icon{height:var(--qds-control-small-icon-size);width:var(--qds-control-small-icon-size)}[data-size=small] .qds-main-icon{height:var(--qds-list-item-small-icon-size);width:var(--qds-list-item-small-icon-size)}[data-size=small] .qds-texts{gap:var(--qds-list-item-small-titles-gap)}[data-size=small] .qds-kicker,[data-size=small] .qds-tooltip-kicker{font:var(--qds-list-item-small-kicker)}[data-size=small] .qds-title,[data-size=small] .qds-tooltip-title{font:var(--qds-list-item-small-title)}[data-size=small] .qds-subtitle,[data-size=small] .qds-tooltip-subtitle{font:var(--qds-list-item-small-subtitle)}[data-size=small] .qds-picture{height:var(--qds-list-item-small-picture-size);width:var(--qds-list-item-small-picture-size)}[data-size=standard] .qds-indented-content{gap:var(--qds-list-item-standard-gap-internal);min-height:var(--qds-list-item-standard-height);padding:var(--qds-list-item-standard-padding-vertical) var(--qds-list-item-standard-padding-horizontal)}[data-size=standard] .qds-icon{height:var(--qds-control-standard-icon-size);width:var(--qds-control-standard-icon-size)}[data-size=standard] .qds-main-icon{height:var(--qds-list-item-standard-icon-size);width:var(--qds-list-item-standard-icon-size)}[data-size=standard] .qds-texts{gap:var(--qds-list-item-standard-titles-gap)}[data-size=standard] .qds-kicker,[data-size=standard] .qds-tooltip-kicker{font:var(--qds-list-item-standard-kicker)}[data-size=standard] .qds-title,[data-size=standard] .qds-tooltip-title{font:var(--qds-list-item-standard-title)}[data-size=standard] .qds-subtitle,[data-size=standard] .qds-tooltip-subtitle{font:var(--qds-list-item-standard-subtitle)}[data-size=standard] .qds-picture{height:var(--qds-list-item-standard-picture-size);width:var(--qds-list-item-standard-picture-size)}[data-size=large] .qds-indented-content{gap:var(--qds-list-item-large-gap-internal);min-height:var(--qds-list-item-large-height);padding:var(--qds-list-item-large-padding-vertical) var(--qds-list-item-large-padding-horizontal)}[data-size=large] .qds-icon{height:var(--qds-control-large-icon-size);width:var(--qds-control-large-icon-size)}[data-size=large] .qds-main-icon{height:var(--qds-list-item-large-icon-size);width:var(--qds-list-item-large-icon-size)}[data-size=large] .qds-texts{gap:var(--qds-list-item-large-titles-gap)}[data-size=large] .qds-kicker,[data-size=large] .qds-tooltip-kicker{font:var(--qds-list-item-large-kicker)}[data-size=large] .qds-title,[data-size=large] .qds-tooltip-title{font:var(--qds-list-item-large-title)}[data-size=large] .qds-subtitle,[data-size=large] .qds-tooltip-subtitle{font:var(--qds-list-item-large-subtitle)}[data-size=large] .qds-picture{height:var(--qds-list-item-large-picture-size);width:var(--qds-list-item-large-picture-size)}.qds-list-item{display:block}.qds-list-item:hover:not(.qds-static){background-color:var(--qds-theme-interactive-background-hover)}.qds-list-item:active:not(.qds-static),.qds-list-item:not(.qds-has-submenu):not(.qds-static):active{background-color:var(--qds-theme-interactive-background-pressed)}.qds-selected.qds-list-item{background-color:var(--qds-theme-interactive-background-selected)}.qds-selected.qds-list-item:hover{background-color:var(--qds-theme-interactive-background-selected-hover)}.qds-selected.qds-list-item:active{background-color:var(\n --qds-theme-interactive-background-selected-pressed\n )}.qds-selected[data-size=small] .qds-title{font:var(--qds-list-item-small-title-emphasized)}.qds-selected[data-size=standard] .qds-title{font:var(--qds-list-item-standard-title-emphasized)}.qds-selected[data-size=large] .qds-title{font:var(--qds-list-item-large-title-emphasized)}";
|
|
12
12
|
|
|
@@ -30,6 +30,9 @@ var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) ||
|
|
|
30
30
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
31
31
|
};
|
|
32
32
|
var _ListItem_instances, _ListItem_roText, _ListItem_roSubTitle, _ListItem_text, _ListItem_subtitle, _ListItem_iconButton, _ListItem_checkbox, _ListItem_radio, _ListItem_computedDestination_get, _ListItem_computedIndeterminate_get, _ListItem_computedListAction_get, _ListItem_computedSelected_get, _ListItem_computedSize_get, _ListItem_hasSubmenu_get, _ListItem_onBlur, _ListItem_onFocus, _ListItem_onCheck, _ListItem_onSelect, _ListItem_divTitleRef, _ListItem_divSubtitleRef, _ListItem_textTooltipRef, _ListItem_iconButtonRef, _ListItem_onSlotChange, _ListItem_checkboxRef, _ListItem_radioRef;
|
|
33
|
+
const stopImmediatePropagation = (event) => {
|
|
34
|
+
event.stopImmediatePropagation();
|
|
35
|
+
};
|
|
33
36
|
const ListItem = class {
|
|
34
37
|
constructor(hostRef) {
|
|
35
38
|
index.registerInstance(this, hostRef);
|
|
@@ -226,18 +229,18 @@ const ListItem = class {
|
|
|
226
229
|
this.subtitleChanged();
|
|
227
230
|
}
|
|
228
231
|
render() {
|
|
229
|
-
return (index.h(index.Host, { key: '
|
|
232
|
+
return (index.h(index.Host, { key: '5a3a3df94d196e2c3740c9a7cd47b9cd28f6259c' }, index.h("div", { key: '19458ba3e18483d63c3e1d767198757c40f8af1d', class: {
|
|
230
233
|
'qds-list-item': true,
|
|
231
234
|
'qds-has-submenu': __classPrivateFieldGet(this, _ListItem_instances, "a", _ListItem_hasSubmenu_get),
|
|
232
235
|
'qds-disabled': this.disabled,
|
|
233
236
|
'qds-selected': __classPrivateFieldGet(this, _ListItem_instances, "a", _ListItem_computedSelected_get),
|
|
234
237
|
'qds-static': __classPrivateFieldGet(this, _ListItem_instances, "a", _ListItem_computedListAction_get) === 'none',
|
|
235
|
-
}, "data-size": __classPrivateFieldGet(this, _ListItem_instances, "a", _ListItem_computedSize_get) }, index.h("div", { key: '
|
|
238
|
+
}, "data-size": __classPrivateFieldGet(this, _ListItem_instances, "a", _ListItem_computedSize_get) }, index.h("div", { key: '330677408fefe3434033699287497cdbb0229de8', class: {
|
|
236
239
|
'qds-indented-content': true,
|
|
237
240
|
'qds-cursor-pointer': !this.disabled && __classPrivateFieldGet(this, _ListItem_instances, "a", _ListItem_computedListAction_get) !== 'none',
|
|
238
|
-
} }, __classPrivateFieldGet(this, _ListItem_instances, "a", _ListItem_computedListAction_get) === 'multiselect' && (index.h("qds-checkbox", { key: '
|
|
241
|
+
} }, __classPrivateFieldGet(this, _ListItem_instances, "a", _ListItem_computedListAction_get) === 'multiselect' && (index.h("qds-checkbox", { key: '6951ebdb2c5d31b045e867c08f8f7a59b477d7a3', checked: this.selected, indeterminate: this.indeterminate, size: this.size, text: this.text, disabled: this.disabled, checkboxOnly: true, onQdsChange: stopImmediatePropagation, ref: __classPrivateFieldGet(this, _ListItem_checkboxRef, "f") })), __classPrivateFieldGet(this, _ListItem_instances, "a", _ListItem_computedListAction_get) === 'radio' && (index.h("qds-radio", { key: 'afe26df255406172e85866f9f8ad0c117dd7c80d', checked: this.selected, size: this.size, onQdsChange: __classPrivateFieldGet(this, _ListItem_onSelect, "f"), disabled: this.disabled, "aria-label": this.text, ref: __classPrivateFieldGet(this, _ListItem_radioRef, "f") })), this.host.draggable && (index.h("qds-icon", { key: 'f5398339399b1b5ed40eb99fddfd4da70e46cc06', class: "qds-icon qds-list-action qds-draggable", library: "core", name: "draggable" })), this.imageSrc !== undefined && this.imageSrc !== '' && (index.h("img", { key: '92330554b0bac82bb1830518f646fbc07494028f', class: "qds-picture", src: this.imageSrc, alt: "" })), this.iconName !== undefined && this.iconName !== '' && (index.h("qds-icon", { key: '59ec62d45dd9f0970435f33492625f78dbf5917f', class: "qds-main-icon", library: this.iconLibrary, name: this.iconName })), this.avatarSrc !== undefined && this.avatarSrc !== '' && (index.h("qds-avatar-media", { key: '48638dc5625c1b452cef3425aa154809f9db119b', class: "qds-picture", src: this.avatarSrc })), index.h("div", { key: '77a1f8424be02a7d363edc66db61ad3b55b3b29b', class: "qds-texts", role: __classPrivateFieldGet(this, _ListItem_instances, "a", _ListItem_computedListAction_get) === 'select' ? 'option' : undefined, tabIndex: __classPrivateFieldGet(this, _ListItem_instances, "a", _ListItem_computedListAction_get) === 'select' && !this.disabled
|
|
239
242
|
? 0
|
|
240
|
-
: undefined, onFocus: __classPrivateFieldGet(this, _ListItem_onFocus, "f"), onBlur: __classPrivateFieldGet(this, _ListItem_onBlur, "f") }, this.kicker !== undefined && this.kicker !== '' && (index.h("div", { key: '
|
|
243
|
+
: undefined, onFocus: __classPrivateFieldGet(this, _ListItem_onFocus, "f"), onBlur: __classPrivateFieldGet(this, _ListItem_onBlur, "f") }, this.kicker !== undefined && this.kicker !== '' && (index.h("div", { key: 'bd286572a596d6834deb37c78355fd0c513b507b', class: "qds-kicker" }, this.kicker)), index.h("div", { key: 'e47ad0f2262a6b703ad60910ecda70f9055a99cd', class: "qds-title", ref: __classPrivateFieldGet(this, _ListItem_divTitleRef, "f") }, this.text), this.subtitle !== undefined && this.subtitle !== '' && (index.h("div", { key: '454e29db383d4d42388302c2a0c2e3e829110d69', class: "qds-subtitle", ref: __classPrivateFieldGet(this, _ListItem_divSubtitleRef, "f") }, this.subtitle))), this.badge !== undefined && this.badge !== '' && (index.h("qds-badge-counter", { key: '954a084ce37eb83a184e21b34f04a552384d113a', size: __classPrivateFieldGet(this, _ListItem_instances, "a", _ListItem_computedSize_get), strokeRing: true, value: this.badge, description: this.badgeDescription })), __classPrivateFieldGet(this, _ListItem_instances, "a", _ListItem_hasSubmenu_get) && (index.h("qds-icon-button", { key: 'ee6d36f38f7f2503dfbbf59add9dd381ce9634d4', iconName: "dots-3-vertical", importance: "subdued", "aria-label": "more actions", disabled: this.disabled, ref: __classPrivateFieldGet(this, _ListItem_iconButtonRef, "f") })), __classPrivateFieldGet(this, _ListItem_instances, "a", _ListItem_computedDestination_get) !== undefined && (index.h("qds-icon", { key: '07065d6e8cb830d7df88fa2222418957a352f36a', class: "qds-icon qds-destination", library: "core", name: __classPrivateFieldGet(this, _ListItem_instances, "a", _ListItem_computedDestination_get) }))), __classPrivateFieldGet(this, _ListItem_instances, "a", _ListItem_hasSubmenu_get) && (index.h("qds-dropdown", { key: '89fd9526aabb5d3d51252b767abf4b61cfad3699', class: "qds-accessory qds-related", placement: "right-start", target: __classPrivateFieldGet(this, _ListItem_iconButtonRef, "f"), role: "menu" }, index.h("slot", { key: '8543f5c404208d1a8e2e2e7b7504fb212caef8f1', onSlotchange: __classPrivateFieldGet(this, _ListItem_onSlotChange, "f") }))), this.showDivider && index.h("qds-divider", { key: '147261b3b694ab5fc53cde8f92bf2d4bf9db78aa' }), (this.textTooltip || this.subtitleTooltip) && (index.h("qds-tooltip", { key: 'd241910d595e17d4624fbfeaebb3c592e9861250', "aria-hidden": "true", ref: __classPrivateFieldGet(this, _ListItem_textTooltipRef, "f") }, index.h("div", { key: '2e0fbef65e5aff8fd9cd6a746914e19c4509e5ae', class: "qds-tooltip-kicker" }, this.kicker), index.h("div", { key: '0258af911af8835bf23bed6ab204e47b50dde61d', class: "qds-tooltip-title" }, this.text), index.h("div", { key: 'cd81e5f0a52ad03b876967bb41549af3a3603d5f', class: "qds-tooltip-subtitle" }, this.subtitle))))));
|
|
241
244
|
}
|
|
242
245
|
get host() { return index.getElement(this); }
|
|
243
246
|
static get watchers() { return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"qds-list-item.entry.cjs.js","sources":["src/components/list-item/list-item.css?tag=qds-list-item&encapsulation=shadow","src/components/list-item/list-item.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-disabled {\n opacity: var(--qds-theme-disabled);\n pointer-events: none;\n}\n\n.qds-list-item,\n.qds-indented-content {\n align-items: center;\n box-sizing: border-box;\n border-radius: var(--qds-control-border-radius);\n}\n\n.qds-indented-content {\n display: flex;\n flex: 1 0;\n align-self: stretch;\n cursor: default;\n}\n\n.qds-destination {\n transform: scaleX(var(--qds-direction-factor, 1));\n}\n\n.qds-icon,\n.qds-main-icon {\n color: var(--qds-theme-text-standard);\n}\n\n.qds-picture {\n flex-shrink: 0;\n}\n\n.qds-texts {\n justify-items: center;\n display: flex;\n flex: 1 0;\n flex-direction: column;\n padding: 0;\n position: relative;\n\n &:focus-visible {\n /* inner ring */\n outline: var(--qds-theme-focus-border-contrast) solid\n var(--qds-focus-light-border-width);\n outline-offset: 0;\n\n /* outer ring */\n box-shadow: 0 0 0 var(--qds-focus-heavy-border-width)\n var(--qds-theme-focus-border);\n border-radius: var(--qds-control-border-radius);\n }\n}\n\n.qds-input {\n appearance: none;\n background: none;\n border: none;\n border-radius: var(--qds-control-border-radius);\n inset: 0;\n margin: 0;\n outline: none;\n position: absolute;\n}\n\n.qds-title {\n color: var(--qds-theme-title);\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n overflow: hidden;\n}\n\n.qds-tooltip-title {\n color: var(--qds-theme-title);\n}\n\n.qds-subtitle {\n color: var(--qds-theme-subtitle);\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 5;\n overflow: hidden;\n}\n\n.qds-tooltip-subtitle {\n color: var(--qds-theme-subtitle);\n}\n\n.qds-kicker {\n color: var(--qds-theme-kicker);\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 1;\n overflow: hidden;\n}\n\n.qds-tooltip-kicker {\n color: var(--qds-theme-kicker);\n}\n\n.qds-draggable {\n cursor: grab;\n}\n\n.qds-cursor-pointer {\n cursor: pointer;\n}\n\n[data-size='small'] {\n .qds-indented-content {\n gap: var(--qds-list-item-small-gap-internal);\n min-height: var(--qds-list-item-small-height);\n padding: var(--qds-list-item-small-padding-vertical)\n var(--qds-list-item-small-padding-horizontal);\n }\n\n .qds-icon {\n height: var(--qds-control-small-icon-size);\n width: var(--qds-control-small-icon-size);\n }\n\n .qds-main-icon {\n height: var(--qds-list-item-small-icon-size);\n width: var(--qds-list-item-small-icon-size);\n }\n\n .qds-texts {\n gap: var(--qds-list-item-small-titles-gap);\n }\n\n .qds-kicker,\n .qds-tooltip-kicker {\n font: var(--qds-list-item-small-kicker);\n }\n\n .qds-title,\n .qds-tooltip-title {\n font: var(--qds-list-item-small-title);\n }\n\n .qds-subtitle,\n .qds-tooltip-subtitle {\n font: var(--qds-list-item-small-subtitle);\n }\n\n .qds-picture {\n height: var(--qds-list-item-small-picture-size);\n width: var(--qds-list-item-small-picture-size);\n }\n}\n\n[data-size='standard'] {\n .qds-indented-content {\n gap: var(--qds-list-item-standard-gap-internal);\n min-height: var(--qds-list-item-standard-height);\n padding: var(--qds-list-item-standard-padding-vertical)\n var(--qds-list-item-standard-padding-horizontal);\n }\n\n .qds-icon {\n height: var(--qds-control-standard-icon-size);\n width: var(--qds-control-standard-icon-size);\n }\n\n .qds-main-icon {\n height: var(--qds-list-item-standard-icon-size);\n width: var(--qds-list-item-standard-icon-size);\n }\n\n .qds-texts {\n gap: var(--qds-list-item-standard-titles-gap);\n }\n\n .qds-kicker,\n .qds-tooltip-kicker {\n font: var(--qds-list-item-standard-kicker);\n }\n\n .qds-title,\n .qds-tooltip-title {\n font: var(--qds-list-item-standard-title);\n }\n\n .qds-subtitle,\n .qds-tooltip-subtitle {\n font: var(--qds-list-item-standard-subtitle);\n }\n\n .qds-picture {\n height: var(--qds-list-item-standard-picture-size);\n width: var(--qds-list-item-standard-picture-size);\n }\n}\n\n[data-size='large'] {\n .qds-indented-content {\n gap: var(--qds-list-item-large-gap-internal);\n min-height: var(--qds-list-item-large-height);\n padding: var(--qds-list-item-large-padding-vertical)\n var(--qds-list-item-large-padding-horizontal);\n }\n\n .qds-icon {\n height: var(--qds-control-large-icon-size);\n width: var(--qds-control-large-icon-size);\n }\n\n .qds-main-icon {\n height: var(--qds-list-item-large-icon-size);\n width: var(--qds-list-item-large-icon-size);\n }\n\n .qds-texts {\n gap: var(--qds-list-item-large-titles-gap);\n }\n\n .qds-kicker,\n .qds-tooltip-kicker {\n font: var(--qds-list-item-large-kicker);\n }\n\n .qds-title,\n .qds-tooltip-title {\n font: var(--qds-list-item-large-title);\n }\n\n .qds-subtitle,\n .qds-tooltip-subtitle {\n font: var(--qds-list-item-large-subtitle);\n }\n\n .qds-picture {\n height: var(--qds-list-item-large-picture-size);\n width: var(--qds-list-item-large-picture-size);\n }\n}\n\n.qds-list-item {\n display: block;\n\n &:hover:not(.qds-static) {\n background-color: var(--qds-theme-interactive-background-hover);\n }\n\n &:active:not(.qds-static) {\n background-color: var(--qds-theme-interactive-background-pressed);\n }\n\n &:not(.qds-has-submenu, .qds-static):active {\n background-color: var(--qds-theme-interactive-background-pressed);\n }\n}\n\n.qds-selected {\n &.qds-list-item {\n background-color: var(--qds-theme-interactive-background-selected);\n\n &:hover {\n background-color: var(--qds-theme-interactive-background-selected-hover);\n }\n\n &:active {\n background-color: var(\n --qds-theme-interactive-background-selected-pressed\n );\n }\n }\n\n &[data-size='small'] .qds-title {\n font: var(--qds-list-item-small-title-emphasized);\n }\n\n &[data-size='standard'] .qds-title {\n font: var(--qds-list-item-standard-title-emphasized);\n }\n\n &[data-size='large'] .qds-title {\n font: var(--qds-list-item-large-title-emphasized);\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 Host,\n Listen,\n Prop,\n readTask,\n State,\n Watch,\n} from '@stencil/core'\n\nimport type { QdsFocusEventDetail } from '../../helpers'\nimport {\n invariant,\n isEllipsisActive,\n pickFocusEventAttributes,\n} from '../../helpers'\nimport type { Size } from '../shared'\n\nexport type Destination = 'navigation'\nexport type ListAction = 'multiselect' | 'none' | 'radio' | 'select'\n\n/**\n *\n *\n * @see https://quartz.se.com/build/components/list-item\n */\n@Component({\n tag: 'qds-list-item',\n shadow: { delegatesFocus: false },\n styleUrl: 'list-item.css',\n})\nexport class ListItem implements ComponentInterface {\n /**\n * The destination action that the list item denotes through its rightmost icon.\n */\n @Prop() public readonly destination?: Destination\n\n /**\n * Prevents the list item from being interacted with: it cannot be selected\n * or focused.\n */\n @Prop() public readonly disabled: boolean = false\n\n /**\n * Control how to display the bottom divider line.\n *\n * By default, the divider is not visible.\n */\n @Prop() public readonly showDivider: boolean = false\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 * The URL of the avatar image to display.\n */\n @Prop() public readonly avatarSrc?: string\n\n /**\n * The URL of the picture to display.\n *\n * This is used to display a picture in the list item.\n * It is not used for the avatar image.\n */\n @Prop() public readonly imageSrc?: string\n\n /**\n * Text to display for the kicker.\n */\n @Prop() public readonly kicker?: string\n\n /**\n * The type of list-level action that the list item supports\n */\n @Prop() public readonly listAction: ListAction = 'select'\n\n /**\n * The list items's size.\n */\n @Prop() public readonly size?: Size = 'standard'\n\n /**\n * Whether or not the list item is selected.\n */\n @Prop({ mutable: true }) public selected?: boolean\n\n /**\n * Sets the list item to an indeterminate state, only when `list-action=\"indeterminate\"`.\n * This is usually applied to items that represent a \"select all/none\" behavior when associated\n * items have a mix of selected and unselected states.\n *\n * @webnative\n */\n @Prop({ mutable: true }) public indeterminate?: boolean\n\n /**\n * The primary text of the list item.\n */\n @Prop() public readonly text!: string\n\n /**\n * Text to display below the primary text.\n */\n @Prop() public readonly subtitle?: string\n\n /**\n * Displays a counter badge if a number or string representing a number is used.\n *\n * @webnative\n */\n @Prop() public readonly badge?: number | string\n\n /**\n * The counter badge's accessible text that will be used by\n * screen readers.\n */\n @Prop() public readonly badgeDescription?: string\n\n /**\n * Emitted when the list item 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 list item gains focus.\n */\n @Event({ eventName: 'qdsFocus', bubbles: false, cancelable: false })\n private readonly focusEmitter!: EventEmitter<QdsFocusEventDetail>\n\n @AttachInternals() private readonly internals!: ElementInternals\n\n @Element() private readonly host!: HTMLElement\n\n @State() private textTooltip = false\n\n @State() private subtitleTooltip = false\n\n @State() private hasSubmenuSlot = false\n\n #roText?: ResizeObserver\n\n #roSubTitle?: ResizeObserver\n\n #text?: HTMLDivElement\n\n #subtitle?: HTMLDivElement\n\n #iconButton!: HTMLQdsIconButtonElement\n\n #checkbox?: HTMLQdsCheckboxElement\n\n #radio?: HTMLQdsRadioElement\n\n get #computedDestination(): Destination | undefined {\n switch (this.destination) {\n case 'navigation': {\n return this.destination\n }\n default: {\n return undefined\n }\n }\n }\n\n get #computedIndeterminate(): boolean {\n return this.indeterminate ?? false\n }\n\n get #computedListAction(): ListAction {\n switch (this.listAction) {\n case 'radio':\n case 'multiselect':\n case 'select':\n case 'none': {\n return this.listAction\n }\n default: {\n return 'select'\n }\n }\n }\n\n get #computedSelected(): boolean {\n return this.selected ?? 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 #hasSubmenu(): boolean {\n return this.hasSubmenuSlot\n }\n\n @Listen('click')\n protected onClick(event: MouseEvent): void {\n if (this.disabled || this.hasSubmenuSlot) {\n event.stopImmediatePropagation()\n return\n }\n\n if (this.#computedListAction === 'multiselect') {\n invariant(this.#checkbox)\n this.#onCheck(event)\n }\n\n if (this.#computedListAction === 'radio') {\n invariant(this.#radio)\n this.#onSelect(event)\n }\n // Always prevent default behavior to avoid the internal `<input>`\n // to toggle `checked` state inappropriately.\n //\n // Note that this will need adjustments once we add the `item-action` slot.\n event.preventDefault()\n }\n\n @Listen('keydown')\n protected onKeydown(event: KeyboardEvent): void {\n if (event.key === 'Enter') this.host.click()\n }\n\n @Listen('keyup')\n protected onKeyup(event: KeyboardEvent): void {\n if (event.key === ' ') this.host.click()\n }\n\n @Listen('dragstart')\n protected onDragstart(): void {\n if (!this.host.draggable) return\n this.host.setAttribute('aria-grabbed', 'true')\n }\n\n @Listen('dragend')\n protected onDragend(): void {\n if (!this.host.draggable) return\n this.host.removeAttribute('aria-grabbed')\n }\n\n @Watch('disabled')\n protected disabledChanged(): void {\n this.internals.ariaDisabled = this.disabled.toString()\n }\n\n @Watch('listAction')\n protected listActionChanged(newValue: ListAction | undefined): void {\n this.internals.ariaChecked =\n (newValue === 'radio' || newValue === 'multiselect') &&\n this.#computedSelected\n ? 'true'\n : 'false'\n }\n\n @Watch('text')\n protected textChanged(): void {\n if (this.#roText) this.#roText.disconnect()\n\n if (!this.#text || !this.text) return\n\n invariant(this.#text)\n\n const div = this.#text\n readTask(() => {\n this.textTooltip = isEllipsisActive(div)\n })\n this.#roText = new ResizeObserver(([divEntry]) => {\n this.textTooltip = isEllipsisActive(divEntry.target as HTMLDivElement)\n })\n this.#roText.observe(this.#text)\n }\n\n @Watch('subtitle')\n protected subtitleChanged(): void {\n if (this.#roSubTitle) this.#roSubTitle.disconnect()\n\n if (!this.#subtitle || this.subtitle === undefined || this.subtitle === '')\n return\n\n invariant(this.#subtitle)\n const div = this.#subtitle\n readTask(() => {\n this.subtitleTooltip = isEllipsisActive(div)\n })\n this.#roSubTitle = new ResizeObserver(([divEntry]) => {\n this.subtitleTooltip = isEllipsisActive(divEntry.target as HTMLDivElement)\n })\n this.#roSubTitle.observe(this.#subtitle)\n }\n\n public componentWillLoad(): void {\n this.hasSubmenuSlot = this.host.hasChildNodes()\n\n const subtitle =\n this.subtitle === undefined || this.subtitle === ''\n ? ''\n : ` ${this.subtitle}`\n const kicker =\n this.kicker === undefined || this.kicker === '' ? '' : ` ${this.kicker}`\n this.internals.ariaLabel = `${this.text} ${subtitle} ${kicker}`.trim()\n switch (this.listAction) {\n case 'select': {\n this.internals.role = 'generic'\n break\n }\n default: {\n this.internals.role = 'listitem'\n break\n }\n }\n this.disabledChanged()\n }\n\n public componentDidLoad(): void {\n this.textChanged()\n this.subtitleChanged()\n }\n\n public render() {\n return (\n <Host>\n <div\n class={{\n 'qds-list-item': true,\n 'qds-has-submenu': this.#hasSubmenu,\n 'qds-disabled': this.disabled,\n 'qds-selected': this.#computedSelected,\n 'qds-static': this.#computedListAction === 'none',\n }}\n data-size={this.#computedSize}\n >\n <div\n class={{\n 'qds-indented-content': true,\n 'qds-cursor-pointer':\n !this.disabled && this.#computedListAction !== 'none',\n }}\n >\n {this.#computedListAction === 'multiselect' && (\n <qds-checkbox\n checked={this.selected}\n indeterminate={this.indeterminate}\n size={this.size}\n text={this.text}\n disabled={this.disabled}\n checkboxOnly\n onQdsChange={this.#onCheck}\n ref={this.#checkboxRef}\n />\n )}\n\n {this.#computedListAction === 'radio' && (\n <qds-radio\n checked={this.selected}\n size={this.size}\n onQdsChange={this.#onSelect}\n disabled={this.disabled}\n aria-label={this.text}\n ref={this.#radioRef}\n />\n )}\n\n {this.host.draggable && (\n <qds-icon\n class=\"qds-icon qds-list-action qds-draggable\"\n library=\"core\"\n name=\"draggable\"\n />\n )}\n\n {this.imageSrc !== undefined && this.imageSrc !== '' && (\n <img class=\"qds-picture\" src={this.imageSrc} alt=\"\" />\n )}\n\n {this.iconName !== undefined && this.iconName !== '' && (\n <qds-icon\n class=\"qds-main-icon\"\n library={this.iconLibrary}\n name={this.iconName}\n />\n )}\n {this.avatarSrc !== undefined && this.avatarSrc !== '' && (\n <qds-avatar-media class=\"qds-picture\" src={this.avatarSrc} />\n )}\n\n <div\n class=\"qds-texts\"\n role={\n this.#computedListAction === 'select' ? 'option' : undefined\n }\n tabIndex={\n this.#computedListAction === 'select' && !this.disabled\n ? 0\n : undefined\n }\n onFocus={this.#onFocus}\n onBlur={this.#onBlur}\n >\n {this.kicker !== undefined && this.kicker !== '' && (\n <div class=\"qds-kicker\">{this.kicker}</div>\n )}\n <div class=\"qds-title\" ref={this.#divTitleRef}>\n {this.text}\n </div>\n {this.subtitle !== undefined && this.subtitle !== '' && (\n <div class=\"qds-subtitle\" ref={this.#divSubtitleRef}>\n {this.subtitle}\n </div>\n )}\n </div>\n\n {this.badge !== undefined && this.badge !== '' && (\n <qds-badge-counter\n size={this.#computedSize}\n strokeRing\n value={this.badge}\n description={this.badgeDescription}\n />\n )}\n\n {this.#hasSubmenu && (\n <qds-icon-button\n iconName=\"dots-3-vertical\"\n importance=\"subdued\"\n aria-label=\"more actions\"\n disabled={this.disabled}\n ref={this.#iconButtonRef}\n />\n )}\n\n {this.#computedDestination !== undefined && (\n <qds-icon\n class=\"qds-icon qds-destination\"\n library=\"core\"\n name={this.#computedDestination}\n />\n )}\n </div>\n {this.#hasSubmenu && (\n <qds-dropdown\n class=\"qds-accessory qds-related\"\n placement=\"right-start\"\n target={this.#iconButtonRef}\n role=\"menu\"\n >\n <slot onSlotchange={this.#onSlotChange} />\n </qds-dropdown>\n )}\n {this.showDivider && <qds-divider />}\n {(this.textTooltip || this.subtitleTooltip) && (\n <qds-tooltip aria-hidden=\"true\" ref={this.#textTooltipRef}>\n <div class=\"qds-tooltip-kicker\">{this.kicker}</div>\n <div class=\"qds-tooltip-title\">{this.text}</div>\n <div class=\"qds-tooltip-subtitle\">{this.subtitle}</div>\n </qds-tooltip>\n )}\n </div>\n </Host>\n )\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 readonly #onCheck = (event: Event): void => {\n event.stopImmediatePropagation()\n this.selected = this.#computedIndeterminate ? true : !this.#computedSelected\n this.changeEmitter.emit()\n this.indeterminate = false\n }\n\n readonly #onSelect = (event: Event): void => {\n event.stopImmediatePropagation()\n if (!this.#computedSelected) {\n this.selected = !this.#computedSelected\n this.changeEmitter.emit()\n }\n }\n\n readonly #divTitleRef = (div?: HTMLDivElement): void => {\n this.#text = div\n }\n\n readonly #divSubtitleRef = (div?: HTMLDivElement): void => {\n this.#subtitle = div\n }\n\n readonly #textTooltipRef = (tooltip?: HTMLQdsTooltipElement): void => {\n if (tooltip)\n // eslint-disable-next-line no-param-reassign\n tooltip.target = this.host\n }\n\n readonly #iconButtonRef = (\n iconButton?: HTMLQdsIconButtonElement,\n ): HTMLQdsIconButtonElement => {\n if (iconButton) {\n this.#iconButton = iconButton\n }\n\n return this.#iconButton\n }\n\n readonly #onSlotChange = (event: Event): void => {\n invariant(event.target instanceof HTMLSlotElement)\n const slot = event.target\n this.hasSubmenuSlot = slot.assignedNodes().length > 0\n }\n\n readonly #checkboxRef = (checkbox?: HTMLQdsCheckboxElement): void => {\n this.#checkbox = checkbox\n }\n\n readonly #radioRef = (radio?: HTMLQdsRadioElement): void => {\n this.#radio = radio\n }\n}\n"],"names":["pickFocusEventAttributes","invariant","readTask","isEllipsisActive","h","Host"],"mappings":";;;;;;;;;;AAAA,MAAM,WAAW,GAAG,m2KAAm2K;;ACAv3K;AACA;AACA;;;;;;;;;;;;;;;;;;MAsCa,QAAQ,GAAA,MAAA;AALrB,IAAA,WAAA,CAAA,OAAA,EAAA;;;;;;;;;;;;;AAWE;;;AAGG;AACqB,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AAEjD;;;;AAIG;A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,cAAc;AAC5B,CAAC;;;;;"}
|
|
1
|
+
{"version":3,"file":"qds-list-item.entry.cjs.js","sources":["src/components/list-item/list-item.css?tag=qds-list-item&encapsulation=shadow","src/components/list-item/list-item.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-disabled {\n opacity: var(--qds-theme-disabled);\n pointer-events: none;\n}\n\n.qds-list-item,\n.qds-indented-content {\n align-items: center;\n box-sizing: border-box;\n border-radius: var(--qds-control-border-radius);\n}\n\n.qds-indented-content {\n display: flex;\n flex: 1 0;\n align-self: stretch;\n cursor: default;\n}\n\n.qds-destination {\n transform: scaleX(var(--qds-direction-factor, 1));\n}\n\n.qds-icon,\n.qds-main-icon {\n color: var(--qds-theme-text-standard);\n}\n\n.qds-picture {\n flex-shrink: 0;\n}\n\n.qds-texts {\n justify-items: center;\n display: flex;\n flex: 1 0;\n flex-direction: column;\n padding: 0;\n position: relative;\n\n &:focus-visible {\n /* inner ring */\n outline: var(--qds-theme-focus-border-contrast) solid\n var(--qds-focus-light-border-width);\n outline-offset: 0;\n\n /* outer ring */\n box-shadow: 0 0 0 var(--qds-focus-heavy-border-width)\n var(--qds-theme-focus-border);\n border-radius: var(--qds-control-border-radius);\n }\n}\n\n.qds-input {\n appearance: none;\n background: none;\n border: none;\n border-radius: var(--qds-control-border-radius);\n inset: 0;\n margin: 0;\n outline: none;\n position: absolute;\n}\n\n.qds-title {\n color: var(--qds-theme-title);\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n overflow: hidden;\n}\n\n.qds-tooltip-title {\n color: var(--qds-theme-title);\n}\n\n.qds-subtitle {\n color: var(--qds-theme-subtitle);\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 5;\n overflow: hidden;\n}\n\n.qds-tooltip-subtitle {\n color: var(--qds-theme-subtitle);\n}\n\n.qds-kicker {\n color: var(--qds-theme-kicker);\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 1;\n overflow: hidden;\n}\n\n.qds-tooltip-kicker {\n color: var(--qds-theme-kicker);\n}\n\n.qds-draggable {\n cursor: grab;\n}\n\n.qds-cursor-pointer {\n cursor: pointer;\n}\n\n[data-size='small'] {\n .qds-indented-content {\n gap: var(--qds-list-item-small-gap-internal);\n min-height: var(--qds-list-item-small-height);\n padding: var(--qds-list-item-small-padding-vertical)\n var(--qds-list-item-small-padding-horizontal);\n }\n\n .qds-icon {\n height: var(--qds-control-small-icon-size);\n width: var(--qds-control-small-icon-size);\n }\n\n .qds-main-icon {\n height: var(--qds-list-item-small-icon-size);\n width: var(--qds-list-item-small-icon-size);\n }\n\n .qds-texts {\n gap: var(--qds-list-item-small-titles-gap);\n }\n\n .qds-kicker,\n .qds-tooltip-kicker {\n font: var(--qds-list-item-small-kicker);\n }\n\n .qds-title,\n .qds-tooltip-title {\n font: var(--qds-list-item-small-title);\n }\n\n .qds-subtitle,\n .qds-tooltip-subtitle {\n font: var(--qds-list-item-small-subtitle);\n }\n\n .qds-picture {\n height: var(--qds-list-item-small-picture-size);\n width: var(--qds-list-item-small-picture-size);\n }\n}\n\n[data-size='standard'] {\n .qds-indented-content {\n gap: var(--qds-list-item-standard-gap-internal);\n min-height: var(--qds-list-item-standard-height);\n padding: var(--qds-list-item-standard-padding-vertical)\n var(--qds-list-item-standard-padding-horizontal);\n }\n\n .qds-icon {\n height: var(--qds-control-standard-icon-size);\n width: var(--qds-control-standard-icon-size);\n }\n\n .qds-main-icon {\n height: var(--qds-list-item-standard-icon-size);\n width: var(--qds-list-item-standard-icon-size);\n }\n\n .qds-texts {\n gap: var(--qds-list-item-standard-titles-gap);\n }\n\n .qds-kicker,\n .qds-tooltip-kicker {\n font: var(--qds-list-item-standard-kicker);\n }\n\n .qds-title,\n .qds-tooltip-title {\n font: var(--qds-list-item-standard-title);\n }\n\n .qds-subtitle,\n .qds-tooltip-subtitle {\n font: var(--qds-list-item-standard-subtitle);\n }\n\n .qds-picture {\n height: var(--qds-list-item-standard-picture-size);\n width: var(--qds-list-item-standard-picture-size);\n }\n}\n\n[data-size='large'] {\n .qds-indented-content {\n gap: var(--qds-list-item-large-gap-internal);\n min-height: var(--qds-list-item-large-height);\n padding: var(--qds-list-item-large-padding-vertical)\n var(--qds-list-item-large-padding-horizontal);\n }\n\n .qds-icon {\n height: var(--qds-control-large-icon-size);\n width: var(--qds-control-large-icon-size);\n }\n\n .qds-main-icon {\n height: var(--qds-list-item-large-icon-size);\n width: var(--qds-list-item-large-icon-size);\n }\n\n .qds-texts {\n gap: var(--qds-list-item-large-titles-gap);\n }\n\n .qds-kicker,\n .qds-tooltip-kicker {\n font: var(--qds-list-item-large-kicker);\n }\n\n .qds-title,\n .qds-tooltip-title {\n font: var(--qds-list-item-large-title);\n }\n\n .qds-subtitle,\n .qds-tooltip-subtitle {\n font: var(--qds-list-item-large-subtitle);\n }\n\n .qds-picture {\n height: var(--qds-list-item-large-picture-size);\n width: var(--qds-list-item-large-picture-size);\n }\n}\n\n.qds-list-item {\n display: block;\n\n &:hover:not(.qds-static) {\n background-color: var(--qds-theme-interactive-background-hover);\n }\n\n &:active:not(.qds-static) {\n background-color: var(--qds-theme-interactive-background-pressed);\n }\n\n &:not(.qds-has-submenu, .qds-static):active {\n background-color: var(--qds-theme-interactive-background-pressed);\n }\n}\n\n.qds-selected {\n &.qds-list-item {\n background-color: var(--qds-theme-interactive-background-selected);\n\n &:hover {\n background-color: var(--qds-theme-interactive-background-selected-hover);\n }\n\n &:active {\n background-color: var(\n --qds-theme-interactive-background-selected-pressed\n );\n }\n }\n\n &[data-size='small'] .qds-title {\n font: var(--qds-list-item-small-title-emphasized);\n }\n\n &[data-size='standard'] .qds-title {\n font: var(--qds-list-item-standard-title-emphasized);\n }\n\n &[data-size='large'] .qds-title {\n font: var(--qds-list-item-large-title-emphasized);\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 Host,\n Listen,\n Prop,\n readTask,\n State,\n Watch,\n} from '@stencil/core'\n\nimport type { QdsFocusEventDetail } from '../../helpers'\nimport {\n invariant,\n isEllipsisActive,\n pickFocusEventAttributes,\n} from '../../helpers'\nimport type { Size } from '../shared'\n\nexport type Destination = 'navigation'\nexport type ListAction = 'multiselect' | 'none' | 'radio' | 'select'\n\nconst stopImmediatePropagation = (event: Event): void => {\n event.stopImmediatePropagation()\n}\n\n/**\n *\n *\n * @see https://quartz.se.com/build/components/list-item\n */\n@Component({\n tag: 'qds-list-item',\n shadow: { delegatesFocus: false },\n styleUrl: 'list-item.css',\n})\nexport class ListItem implements ComponentInterface {\n /**\n * The destination action that the list item denotes through its rightmost icon.\n */\n @Prop() public readonly destination?: Destination\n\n /**\n * Prevents the list item from being interacted with: it cannot be selected\n * or focused.\n */\n @Prop() public readonly disabled: boolean = false\n\n /**\n * Control how to display the bottom divider line.\n *\n * By default, the divider is not visible.\n */\n @Prop() public readonly showDivider: boolean = false\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 * The URL of the avatar image to display.\n */\n @Prop() public readonly avatarSrc?: string\n\n /**\n * The URL of the picture to display.\n *\n * This is used to display a picture in the list item.\n * It is not used for the avatar image.\n */\n @Prop() public readonly imageSrc?: string\n\n /**\n * Text to display for the kicker.\n */\n @Prop() public readonly kicker?: string\n\n /**\n * The type of list-level action that the list item supports\n */\n @Prop() public readonly listAction: ListAction = 'select'\n\n /**\n * The list items's size.\n */\n @Prop() public readonly size?: Size = 'standard'\n\n /**\n * Whether or not the list item is selected.\n */\n @Prop({ mutable: true }) public selected?: boolean\n\n /**\n * Sets the list item to an indeterminate state, only when `list-action=\"indeterminate\"`.\n * This is usually applied to items that represent a \"select all/none\" behavior when associated\n * items have a mix of selected and unselected states.\n *\n * @webnative\n */\n @Prop({ mutable: true }) public indeterminate?: boolean\n\n /**\n * The primary text of the list item.\n */\n @Prop() public readonly text!: string\n\n /**\n * Text to display below the primary text.\n */\n @Prop() public readonly subtitle?: string\n\n /**\n * Displays a counter badge if a number or string representing a number is used.\n *\n * @webnative\n */\n @Prop() public readonly badge?: number | string\n\n /**\n * The counter badge's accessible text that will be used by\n * screen readers.\n */\n @Prop() public readonly badgeDescription?: string\n\n /**\n * Emitted when the list item 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 list item gains focus.\n */\n @Event({ eventName: 'qdsFocus', bubbles: false, cancelable: false })\n private readonly focusEmitter!: EventEmitter<QdsFocusEventDetail>\n\n @AttachInternals() private readonly internals!: ElementInternals\n\n @Element() private readonly host!: HTMLElement\n\n @State() private textTooltip = false\n\n @State() private subtitleTooltip = false\n\n @State() private hasSubmenuSlot = false\n\n #roText?: ResizeObserver\n\n #roSubTitle?: ResizeObserver\n\n #text?: HTMLDivElement\n\n #subtitle?: HTMLDivElement\n\n #iconButton!: HTMLQdsIconButtonElement\n\n #checkbox?: HTMLQdsCheckboxElement\n\n #radio?: HTMLQdsRadioElement\n\n get #computedDestination(): Destination | undefined {\n switch (this.destination) {\n case 'navigation': {\n return this.destination\n }\n default: {\n return undefined\n }\n }\n }\n\n get #computedIndeterminate(): boolean {\n return this.indeterminate ?? false\n }\n\n get #computedListAction(): ListAction {\n switch (this.listAction) {\n case 'radio':\n case 'multiselect':\n case 'select':\n case 'none': {\n return this.listAction\n }\n default: {\n return 'select'\n }\n }\n }\n\n get #computedSelected(): boolean {\n return this.selected ?? 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 #hasSubmenu(): boolean {\n return this.hasSubmenuSlot\n }\n\n @Listen('click')\n protected onClick(event: MouseEvent): void {\n if (this.disabled || this.hasSubmenuSlot) {\n event.stopImmediatePropagation()\n return\n }\n\n if (this.#computedListAction === 'multiselect') {\n invariant(this.#checkbox)\n this.#onCheck(event)\n }\n\n if (this.#computedListAction === 'radio') {\n invariant(this.#radio)\n this.#onSelect(event)\n }\n // Always prevent default behavior to avoid the internal `<input>`\n // to toggle `checked` state inappropriately.\n //\n // Note that this will need adjustments once we add the `item-action` slot.\n event.preventDefault()\n }\n\n @Listen('keydown')\n protected onKeydown(event: KeyboardEvent): void {\n if (event.key === 'Enter') this.host.click()\n }\n\n @Listen('keyup')\n protected onKeyup(event: KeyboardEvent): void {\n if (event.key === ' ') this.host.click()\n }\n\n @Listen('dragstart')\n protected onDragstart(): void {\n if (!this.host.draggable) return\n this.host.setAttribute('aria-grabbed', 'true')\n }\n\n @Listen('dragend')\n protected onDragend(): void {\n if (!this.host.draggable) return\n this.host.removeAttribute('aria-grabbed')\n }\n\n @Watch('disabled')\n protected disabledChanged(): void {\n this.internals.ariaDisabled = this.disabled.toString()\n }\n\n @Watch('listAction')\n protected listActionChanged(newValue: ListAction | undefined): void {\n this.internals.ariaChecked =\n (newValue === 'radio' || newValue === 'multiselect') &&\n this.#computedSelected\n ? 'true'\n : 'false'\n }\n\n @Watch('text')\n protected textChanged(): void {\n if (this.#roText) this.#roText.disconnect()\n\n if (!this.#text || !this.text) return\n\n invariant(this.#text)\n\n const div = this.#text\n readTask(() => {\n this.textTooltip = isEllipsisActive(div)\n })\n this.#roText = new ResizeObserver(([divEntry]) => {\n this.textTooltip = isEllipsisActive(divEntry.target as HTMLDivElement)\n })\n this.#roText.observe(this.#text)\n }\n\n @Watch('subtitle')\n protected subtitleChanged(): void {\n if (this.#roSubTitle) this.#roSubTitle.disconnect()\n\n if (!this.#subtitle || this.subtitle === undefined || this.subtitle === '')\n return\n\n invariant(this.#subtitle)\n const div = this.#subtitle\n readTask(() => {\n this.subtitleTooltip = isEllipsisActive(div)\n })\n this.#roSubTitle = new ResizeObserver(([divEntry]) => {\n this.subtitleTooltip = isEllipsisActive(divEntry.target as HTMLDivElement)\n })\n this.#roSubTitle.observe(this.#subtitle)\n }\n\n public componentWillLoad(): void {\n this.hasSubmenuSlot = this.host.hasChildNodes()\n\n const subtitle =\n this.subtitle === undefined || this.subtitle === ''\n ? ''\n : ` ${this.subtitle}`\n const kicker =\n this.kicker === undefined || this.kicker === '' ? '' : ` ${this.kicker}`\n this.internals.ariaLabel = `${this.text} ${subtitle} ${kicker}`.trim()\n switch (this.listAction) {\n case 'select': {\n this.internals.role = 'generic'\n break\n }\n default: {\n this.internals.role = 'listitem'\n break\n }\n }\n this.disabledChanged()\n }\n\n public componentDidLoad(): void {\n this.textChanged()\n this.subtitleChanged()\n }\n\n public render() {\n return (\n <Host>\n <div\n class={{\n 'qds-list-item': true,\n 'qds-has-submenu': this.#hasSubmenu,\n 'qds-disabled': this.disabled,\n 'qds-selected': this.#computedSelected,\n 'qds-static': this.#computedListAction === 'none',\n }}\n data-size={this.#computedSize}\n >\n <div\n class={{\n 'qds-indented-content': true,\n 'qds-cursor-pointer':\n !this.disabled && this.#computedListAction !== 'none',\n }}\n >\n {this.#computedListAction === 'multiselect' && (\n <qds-checkbox\n checked={this.selected}\n indeterminate={this.indeterminate}\n size={this.size}\n text={this.text}\n disabled={this.disabled}\n checkboxOnly\n onQdsChange={stopImmediatePropagation}\n ref={this.#checkboxRef}\n />\n )}\n\n {this.#computedListAction === 'radio' && (\n <qds-radio\n checked={this.selected}\n size={this.size}\n onQdsChange={this.#onSelect}\n disabled={this.disabled}\n aria-label={this.text}\n ref={this.#radioRef}\n />\n )}\n\n {this.host.draggable && (\n <qds-icon\n class=\"qds-icon qds-list-action qds-draggable\"\n library=\"core\"\n name=\"draggable\"\n />\n )}\n\n {this.imageSrc !== undefined && this.imageSrc !== '' && (\n <img class=\"qds-picture\" src={this.imageSrc} alt=\"\" />\n )}\n\n {this.iconName !== undefined && this.iconName !== '' && (\n <qds-icon\n class=\"qds-main-icon\"\n library={this.iconLibrary}\n name={this.iconName}\n />\n )}\n {this.avatarSrc !== undefined && this.avatarSrc !== '' && (\n <qds-avatar-media class=\"qds-picture\" src={this.avatarSrc} />\n )}\n\n <div\n class=\"qds-texts\"\n role={\n this.#computedListAction === 'select' ? 'option' : undefined\n }\n tabIndex={\n this.#computedListAction === 'select' && !this.disabled\n ? 0\n : undefined\n }\n onFocus={this.#onFocus}\n onBlur={this.#onBlur}\n >\n {this.kicker !== undefined && this.kicker !== '' && (\n <div class=\"qds-kicker\">{this.kicker}</div>\n )}\n <div class=\"qds-title\" ref={this.#divTitleRef}>\n {this.text}\n </div>\n {this.subtitle !== undefined && this.subtitle !== '' && (\n <div class=\"qds-subtitle\" ref={this.#divSubtitleRef}>\n {this.subtitle}\n </div>\n )}\n </div>\n\n {this.badge !== undefined && this.badge !== '' && (\n <qds-badge-counter\n size={this.#computedSize}\n strokeRing\n value={this.badge}\n description={this.badgeDescription}\n />\n )}\n\n {this.#hasSubmenu && (\n <qds-icon-button\n iconName=\"dots-3-vertical\"\n importance=\"subdued\"\n aria-label=\"more actions\"\n disabled={this.disabled}\n ref={this.#iconButtonRef}\n />\n )}\n\n {this.#computedDestination !== undefined && (\n <qds-icon\n class=\"qds-icon qds-destination\"\n library=\"core\"\n name={this.#computedDestination}\n />\n )}\n </div>\n {this.#hasSubmenu && (\n <qds-dropdown\n class=\"qds-accessory qds-related\"\n placement=\"right-start\"\n target={this.#iconButtonRef}\n role=\"menu\"\n >\n <slot onSlotchange={this.#onSlotChange} />\n </qds-dropdown>\n )}\n {this.showDivider && <qds-divider />}\n {(this.textTooltip || this.subtitleTooltip) && (\n <qds-tooltip aria-hidden=\"true\" ref={this.#textTooltipRef}>\n <div class=\"qds-tooltip-kicker\">{this.kicker}</div>\n <div class=\"qds-tooltip-title\">{this.text}</div>\n <div class=\"qds-tooltip-subtitle\">{this.subtitle}</div>\n </qds-tooltip>\n )}\n </div>\n </Host>\n )\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 readonly #onCheck = (event: Event): void => {\n event.stopImmediatePropagation()\n this.selected = this.#computedIndeterminate ? true : !this.#computedSelected\n this.changeEmitter.emit()\n this.indeterminate = false\n }\n\n readonly #onSelect = (event: Event): void => {\n event.stopImmediatePropagation()\n if (!this.#computedSelected) {\n this.selected = !this.#computedSelected\n this.changeEmitter.emit()\n }\n }\n\n readonly #divTitleRef = (div?: HTMLDivElement): void => {\n this.#text = div\n }\n\n readonly #divSubtitleRef = (div?: HTMLDivElement): void => {\n this.#subtitle = div\n }\n\n readonly #textTooltipRef = (tooltip?: HTMLQdsTooltipElement): void => {\n if (tooltip)\n // eslint-disable-next-line no-param-reassign\n tooltip.target = this.host\n }\n\n readonly #iconButtonRef = (\n iconButton?: HTMLQdsIconButtonElement,\n ): HTMLQdsIconButtonElement => {\n if (iconButton) {\n this.#iconButton = iconButton\n }\n\n return this.#iconButton\n }\n\n readonly #onSlotChange = (event: Event): void => {\n invariant(event.target instanceof HTMLSlotElement)\n const slot = event.target\n this.hasSubmenuSlot = slot.assignedNodes().length > 0\n }\n\n readonly #checkboxRef = (checkbox?: HTMLQdsCheckboxElement): void => {\n this.#checkbox = checkbox\n }\n\n readonly #radioRef = (radio?: HTMLQdsRadioElement): void => {\n this.#radio = radio\n }\n}\n"],"names":["pickFocusEventAttributes","invariant","readTask","isEllipsisActive","h","Host"],"mappings":";;;;;;;;;;AAAA,MAAM,WAAW,GAAG,m2KAAm2K;;ACAv3K;AACA;AACA;;;;;;;;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f,QAAA,KAAK,UAAU;AACf,QAAA,KAAK,OAAO;QACZ,KAAK,OAAO,EAAE;YACZ,OAAO,IAAI,CAAC,IAAI;;QAElB,SAAS;AACP,YAAA,OAAO,UAAU;;;AAGvB,CAAC,EAAA,wBAAA,GAAA,SAAA,wBAAA,GAAA;IAGC,OAAO,IAAI,CAAC,cAAc;AAC5B,CAAC;;;;;"}
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
8
|
var index = require('./index-DIY7gpXM.js');
|
|
9
|
-
var helpers = require('./helpers-
|
|
9
|
+
var helpers = require('./helpers-DjUgyTKn.js');
|
|
10
10
|
|
|
11
|
-
const menuItemCss = ":host([hidden]){display:none!important}:host{display:block}:host(:focus-visible){border-radius:var(--qds-control-border-radius);box-shadow:0 0 0 var(--qds-focus-heavy-border-width) var(--qds-theme-focus-border);outline:var(--qds-theme-focus-border-contrast) solid var(--qds-focus-light-border-width);outline-offset:0}.qds-menu-item-container{align-items:center;display:flex
|
|
11
|
+
const menuItemCss = ":host([hidden]){display:none!important}:host{display:block}:host(:focus-visible){border-radius:var(--qds-control-border-radius);box-shadow:0 0 0 var(--qds-focus-heavy-border-width) var(--qds-theme-focus-border);outline:var(--qds-theme-focus-border-contrast) solid var(--qds-focus-light-border-width);outline-offset:0}.qds-menu-item-container{align-items:center;display:flex}.qds-disabled{cursor:not-allowed;opacity:var(--qds-theme-disabled);pointer-events:none}.qds-icon{color:var(--qds-theme-text-standard);transform:scaleX(var(--qds-direction-factor,1))}.menu-item-checkable,.qds-icon{flex-shrink:0}.qds-text{color:var(--qds-theme-title);flex-grow:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.qds-shortcut{color:var(--qds-theme-text-subdued)}[data-size=small] .qds-menu-item-container{gap:var(--qds-list-item-small-gap-internal);padding-block:var(--qds-list-item-small-padding-vertical);padding-inline:var(--qds-list-item-small-padding-horizontal)}[data-size=small] .menu-item-checkable,[data-size=small] .qds-icon{height:var(--qds-control-small-icon-size);width:var(--qds-control-small-icon-size)}[data-size=small] .qds-text{font:var(--qds-list-item-small-title)}[data-size=standard] .qds-menu-item-container{gap:var(--qds-list-item-standard-gap-internal);padding-block:var(--qds-list-item-standard-padding-vertical);padding-inline:var(--qds-list-item-standard-padding-horizontal)}[data-size=standard] .menu-item-checkable,[data-size=standard] .qds-icon{height:var(--qds-control-standard-icon-size);width:var(--qds-control-standard-icon-size)}[data-size=standard] .qds-text{font:var(--qds-list-item-standard-title)}[data-size=large] .qds-menu-item-container{gap:var(--qds-list-item-large-gap-internal);padding-block:var(--qds-list-item-large-padding-vertical);padding-inline:var(--qds-list-item-large-padding-horizontal)}[data-size=large] .menu-item-checkable,[data-size=large] .qds-icon{height:var(--qds-control-large-icon-size);width:var(--qds-control-large-icon-size)}[data-size=large] .qds-text{font:var(--qds-list-item-large-title)}.qds-menu-item{align-items:center;-webkit-appearance:none;appearance:none;border:none;border-radius:var(--qds-control-border-radius);box-sizing:border-box;color:var(--qds-theme-text-standard);cursor:pointer;text-align:initial;-webkit-text-decoration:none;text-decoration:none}.qds-menu-item:not(.qds-selected):not(.qds-disabled):hover{background-color:var(--qds-theme-interactive-background-hover)}.qds-menu-item:not(.qds-selected):not(.qds-disabled):active{background-color:var(--qds-theme-interactive-background-pressed)}";
|
|
12
12
|
|
|
13
13
|
// SPDX-FileCopyrightText: © 2025 Schneider Electric
|
|
14
14
|
//
|
|
@@ -29,7 +29,7 @@ var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) ||
|
|
|
29
29
|
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
30
30
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
31
31
|
};
|
|
32
|
-
var _MenuItem_instances, _MenuItem_ro, _MenuItem_menuItem, _MenuItem_span, _MenuItem_computedSize_get, _MenuItem_computedType_get, _MenuItem_computedCheckable_get, _MenuItem_computedChecked_get, _MenuItem_computedDisabled_get, _MenuItem_hasSubmenu_get, _MenuItem_menuitemDivRef, _MenuItem_spanRef, _MenuItem_tooltipRef;
|
|
32
|
+
var _MenuItem_instances, _MenuItem_ro, _MenuItem_menuItem, _MenuItem_span, _MenuItem_submenuDropdown, _MenuItem_submenuPlacement_get, _MenuItem_computedSize_get, _MenuItem_computedType_get, _MenuItem_computedCheckable_get, _MenuItem_computedChecked_get, _MenuItem_computedDisabled_get, _MenuItem_hasSubmenu_get, _MenuItem_menuitemDivRef, _MenuItem_spanRef, _MenuItem_tooltipRef;
|
|
33
33
|
const MenuItem = class {
|
|
34
34
|
constructor(hostRef) {
|
|
35
35
|
index.registerInstance(this, hostRef);
|
|
@@ -62,6 +62,7 @@ const MenuItem = class {
|
|
|
62
62
|
_MenuItem_ro.set(this, void 0);
|
|
63
63
|
_MenuItem_menuItem.set(this, void 0);
|
|
64
64
|
_MenuItem_span.set(this, void 0);
|
|
65
|
+
_MenuItem_submenuDropdown.set(this, void 0);
|
|
65
66
|
_MenuItem_menuitemDivRef.set(this, (menuItem) => {
|
|
66
67
|
if (menuItem) {
|
|
67
68
|
__classPrivateFieldSet(this, _MenuItem_menuItem, menuItem, "f");
|
|
@@ -92,6 +93,24 @@ const MenuItem = class {
|
|
|
92
93
|
this.checked = !__classPrivateFieldGet(this, _MenuItem_instances, "a", _MenuItem_computedChecked_get);
|
|
93
94
|
this.selectEmitter.emit();
|
|
94
95
|
}
|
|
96
|
+
if (__classPrivateFieldGet(this, _MenuItem_instances, "a", _MenuItem_hasSubmenu_get) && __classPrivateFieldGet(this, _MenuItem_submenuDropdown, "f")) {
|
|
97
|
+
__classPrivateFieldGet(this, _MenuItem_submenuDropdown, "f").placement = helpers.isRTL(this.host)
|
|
98
|
+
? __classPrivateFieldGet(this, _MenuItem_instances, "a", _MenuItem_submenuPlacement_get)
|
|
99
|
+
: __classPrivateFieldGet(this, _MenuItem_instances, "a", _MenuItem_submenuPlacement_get);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
async onKeydown(event) {
|
|
103
|
+
if (!__classPrivateFieldGet(this, _MenuItem_instances, "a", _MenuItem_hasSubmenu_get) || !__classPrivateFieldGet(this, _MenuItem_submenuDropdown, "f"))
|
|
104
|
+
return;
|
|
105
|
+
const openKey = helpers.getSubmenuOpenKey(this.host);
|
|
106
|
+
if (event.key === openKey || event.key === ' ' || event.key === 'Enter') {
|
|
107
|
+
event.preventDefault();
|
|
108
|
+
event.stopPropagation();
|
|
109
|
+
__classPrivateFieldGet(this, _MenuItem_submenuDropdown, "f").placement =
|
|
110
|
+
event.key === openKey ? __classPrivateFieldGet(this, _MenuItem_instances, "a", _MenuItem_submenuPlacement_get) : __classPrivateFieldGet(this, _MenuItem_instances, "a", _MenuItem_submenuPlacement_get);
|
|
111
|
+
await __classPrivateFieldGet(this, _MenuItem_submenuDropdown, "f").show();
|
|
112
|
+
await __classPrivateFieldGet(this, _MenuItem_submenuDropdown, "f").focusFirstItem();
|
|
113
|
+
}
|
|
95
114
|
}
|
|
96
115
|
disabledChanged() {
|
|
97
116
|
this.internals.ariaDisabled = __classPrivateFieldGet(this, _MenuItem_instances, "a", _MenuItem_computedDisabled_get).toString();
|
|
@@ -113,16 +132,21 @@ const MenuItem = class {
|
|
|
113
132
|
}
|
|
114
133
|
componentWillLoad() {
|
|
115
134
|
this.hasSubmenuSlot = this.host.hasChildNodes();
|
|
116
|
-
this.internals.role =
|
|
117
|
-
|
|
135
|
+
this.internals.role = this.hasSubmenuSlot
|
|
136
|
+
? 'menu'
|
|
137
|
+
: this.type === 'checkbox'
|
|
138
|
+
? 'menuitemcheckbox'
|
|
139
|
+
: 'menuitem';
|
|
118
140
|
this.disabledChanged();
|
|
119
141
|
}
|
|
120
142
|
render() {
|
|
121
|
-
return (index.h("div", { key: '
|
|
143
|
+
return (index.h("div", { key: 'fae8f24bbefcdc64c004b8da65a70cd8b9fe8438', class: {
|
|
122
144
|
'qds-menu-item': true,
|
|
123
145
|
'qds-disabled': __classPrivateFieldGet(this, _MenuItem_instances, "a", _MenuItem_computedDisabled_get),
|
|
124
146
|
'qds-has-submenu': __classPrivateFieldGet(this, _MenuItem_instances, "a", _MenuItem_hasSubmenu_get),
|
|
125
|
-
}, ref: __classPrivateFieldGet(this, _MenuItem_menuitemDivRef, "f"), "data-size": __classPrivateFieldGet(this, _MenuItem_instances, "a", _MenuItem_computedSize_get), "aria-hidden": "true" }, index.h("div", { key: '
|
|
147
|
+
}, ref: __classPrivateFieldGet(this, _MenuItem_menuitemDivRef, "f"), "data-size": __classPrivateFieldGet(this, _MenuItem_instances, "a", _MenuItem_computedSize_get), "aria-hidden": "true" }, index.h("div", { key: 'b45e71326da41fc69fd8c9a39ba169eb47f2c8dc', class: "qds-menu-item-container" }, __classPrivateFieldGet(this, _MenuItem_instances, "a", _MenuItem_computedCheckable_get) && !__classPrivateFieldGet(this, _MenuItem_instances, "a", _MenuItem_computedChecked_get) && (index.h("span", { key: 'd71f665a70cd44ca1fd13715a7caebf01714993c', class: "menu-item-checkable" })), __classPrivateFieldGet(this, _MenuItem_instances, "a", _MenuItem_computedChecked_get) && (index.h("qds-icon", { key: '6e50fb81a27ef336c33a7d0a0efe073f0760e5c0', class: "qds-icon", library: "core", name: "checked" })), this.iconName !== undefined && this.iconName !== '' && (index.h("qds-icon", { key: '1c746859fb0e38ea9ad2cbce505dfba50db6342a', class: "qds-icon", library: this.iconLibrary, name: this.iconName })), index.h("span", { key: '035d26a96b245959e98a89b652b60af3feb837c5', class: "qds-text", ref: __classPrivateFieldGet(this, _MenuItem_spanRef, "f") }, this.text), this.shortcut !== undefined && this.shortcut !== '' && (index.h("span", { key: 'ab0cae8c88d869426ebb91769ec45186f1f73342', class: "qds-shortcut" }, this.shortcut)), __classPrivateFieldGet(this, _MenuItem_instances, "a", _MenuItem_hasSubmenu_get) && (index.h("qds-icon", { key: '363565cb9b80eb1063fc95c46bc59bbf5d5f2ae3', class: "qds-icon", library: "core", name: "navigation" }))), __classPrivateFieldGet(this, _MenuItem_instances, "a", _MenuItem_hasSubmenu_get) && (index.h("qds-dropdown", { key: 'f44a9870d3b5c5cdc24f27ba67e4bfda6f00252a', class: "qds-accessory qds-related", target: __classPrivateFieldGet(this, _MenuItem_menuitemDivRef, "f"), ref: (element) => {
|
|
148
|
+
__classPrivateFieldSet(this, _MenuItem_submenuDropdown, element, "f");
|
|
149
|
+
} }, index.h("slot", { key: '45c0814fb09df52fc2cbc63f0d35e6d4f09f2a55' }))), this.tooltip && (index.h("qds-tooltip", { key: '2dac01c4221bd941b3b62946f5ddc92f4682182a', ref: __classPrivateFieldGet(this, _MenuItem_tooltipRef, "f") }, this.text))));
|
|
126
150
|
}
|
|
127
151
|
get host() { return index.getElement(this); }
|
|
128
152
|
static get watchers() { return {
|
|
@@ -130,7 +154,9 @@ const MenuItem = class {
|
|
|
130
154
|
"checked": ["checkedChanged"]
|
|
131
155
|
}; }
|
|
132
156
|
};
|
|
133
|
-
_MenuItem_ro = new WeakMap(), _MenuItem_menuItem = new WeakMap(), _MenuItem_span = new WeakMap(), _MenuItem_menuitemDivRef = new WeakMap(), _MenuItem_spanRef = new WeakMap(), _MenuItem_tooltipRef = new WeakMap(), _MenuItem_instances = new WeakSet(),
|
|
157
|
+
_MenuItem_ro = new WeakMap(), _MenuItem_menuItem = new WeakMap(), _MenuItem_span = new WeakMap(), _MenuItem_submenuDropdown = new WeakMap(), _MenuItem_menuitemDivRef = new WeakMap(), _MenuItem_spanRef = new WeakMap(), _MenuItem_tooltipRef = new WeakMap(), _MenuItem_instances = new WeakSet(), _MenuItem_submenuPlacement_get = function _MenuItem_submenuPlacement_get() {
|
|
158
|
+
return helpers.isRTL(this.host) ? 'left-start' : 'right-start';
|
|
159
|
+
}, _MenuItem_computedSize_get = function _MenuItem_computedSize_get() {
|
|
134
160
|
switch (this.size) {
|
|
135
161
|
case 'standard':
|
|
136
162
|
case 'small':
|