@quartzds/core 1.0.0-beta.96 → 1.0.0-beta.98
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 +21 -0
- package/components/index.d.ts +2 -0
- package/components/index.js +2 -1
- package/components/index.js.map +1 -1
- package/components/{p-70d12c72.js → p-1bf3d7c6.js} +2 -2
- package/components/{p-70d12c72.js.map → p-1bf3d7c6.js.map} +1 -1
- package/components/{p-0f913a5b.js → p-29ad6b4e.js} +3 -3
- package/components/{p-0f913a5b.js.map → p-29ad6b4e.js.map} +1 -1
- package/components/{p-056195cc.js → p-6879ec37.js} +2 -2
- package/components/{p-056195cc.js.map → p-6879ec37.js.map} +1 -1
- package/components/{p-6b3dea37.js → p-88fcb762.js} +10 -9
- package/components/p-88fcb762.js.map +1 -0
- package/components/{p-deac3387.js → p-a4f61139.js} +5 -5
- package/components/{p-deac3387.js.map → p-a4f61139.js.map} +1 -1
- package/components/{p-2456dfb8.js → p-a6ca0040.js} +3 -3
- package/components/{p-2456dfb8.js.map → p-a6ca0040.js.map} +1 -1
- package/components/{p-8e8bd915.js → p-c4122977.js} +2 -3
- package/components/p-c4122977.js.map +1 -0
- package/components/{p-8abba29b.js → p-c58c7ab6.js} +2 -2
- package/components/p-c58c7ab6.js.map +1 -0
- package/components/{p-251cd601.js → p-da0bfe0b.js} +4 -4
- package/components/{p-251cd601.js.map → p-da0bfe0b.js.map} +1 -1
- package/components/qds-breadcrumb-item.js +2 -2
- package/components/qds-button.js +1 -1
- package/components/qds-checkbox.js +1 -1
- package/components/qds-chip.js +3 -3
- package/components/qds-dialog.js +1 -1
- package/components/qds-divider.js +1 -1
- package/components/qds-dropdown.js +1 -1
- package/components/qds-form-message.js +2 -2
- package/components/qds-icon.js +1 -1
- package/components/qds-inline-link.js +2 -2
- package/components/qds-input.js +5 -5
- package/components/qds-input.js.map +1 -1
- package/components/qds-label.js +1 -1
- package/components/qds-list-item.js +5 -5
- package/components/qds-loader.js +1 -1
- package/components/qds-mini-button.d.ts +11 -0
- package/components/qds-mini-button.js +163 -0
- package/components/qds-mini-button.js.map +1 -0
- package/components/qds-nav-list-item.js +6 -6
- package/components/qds-progress-bar.js +1 -1
- package/components/qds-radio.js +6 -6
- package/components/qds-select.js +2 -2
- package/components/qds-standalone-link.js +4 -4
- package/components/qds-switch.js +4 -4
- package/components/qds-tab.js +5 -5
- package/components/qds-tabbar.js +5 -5
- package/components/qds-table-body.js +2 -2
- package/components/qds-table-cell.js +2 -2
- package/components/qds-table-head-cell.js +1 -1
- package/components/qds-table-head.js +2 -2
- package/components/qds-table-row.js +2 -2
- package/components/qds-table.js +2 -2
- package/components/qds-tag.js +1 -1
- package/components/qds-textarea.js +1 -1
- package/components/qds-title.js +1 -1
- package/components/qds-tooltip.js +1 -1
- package/dist/cjs/{helpers-10154521.js → helpers-666c4403.js} +2 -2
- package/dist/cjs/helpers-666c4403.js.map +1 -0
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/{library-23467d99.js → library-9772b9c7.js} +1 -2
- package/dist/cjs/library-9772b9c7.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/qds-breadcrumb-item.cjs.entry.js +1 -1
- package/dist/cjs/qds-button.cjs.entry.js +7 -6
- package/dist/cjs/qds-button.cjs.entry.js.map +1 -1
- package/dist/cjs/qds-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/qds-chip.cjs.entry.js +1 -1
- package/dist/cjs/qds-dialog.cjs.entry.js +1 -1
- package/dist/cjs/qds-divider.cjs.entry.js +1 -1
- package/dist/cjs/qds-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/qds-form-message.cjs.entry.js +1 -1
- package/dist/cjs/qds-icon.cjs.entry.js +2 -2
- package/dist/cjs/qds-inline-link.cjs.entry.js +1 -1
- package/dist/cjs/qds-input.cjs.entry.js +2 -2
- package/dist/cjs/qds-input.cjs.entry.js.map +1 -1
- package/dist/cjs/qds-label.cjs.entry.js +1 -1
- package/dist/cjs/qds-list-item.cjs.entry.js +1 -1
- package/dist/cjs/qds-mini-button.cjs.entry.js +136 -0
- package/dist/cjs/qds-mini-button.cjs.entry.js.map +1 -0
- package/dist/cjs/qds-nav-list-item.cjs.entry.js +4 -4
- package/dist/cjs/qds-progress-bar.cjs.entry.js +1 -1
- package/dist/cjs/qds-radio.cjs.entry.js +3 -3
- package/dist/cjs/qds-select.cjs.entry.js +1 -1
- package/dist/cjs/qds-standalone-link.cjs.entry.js +3 -3
- package/dist/cjs/qds-switch.cjs.entry.js +4 -4
- package/dist/cjs/qds-tab.cjs.entry.js +1 -1
- package/dist/cjs/qds-tabbar.cjs.entry.js +1 -1
- package/dist/cjs/qds-table-body.cjs.entry.js +2 -2
- package/dist/cjs/qds-table-cell.cjs.entry.js +2 -2
- package/dist/cjs/qds-table-head-cell.cjs.entry.js +1 -1
- package/dist/cjs/qds-table-head.cjs.entry.js +2 -2
- package/dist/cjs/qds-table-row.cjs.entry.js +2 -2
- package/dist/cjs/qds-table.cjs.entry.js +2 -2
- package/dist/cjs/qds-tag_2.cjs.entry.js +2 -2
- package/dist/cjs/qds-textarea.cjs.entry.js +1 -1
- package/dist/cjs/qds-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/qds.cjs.js +1 -1
- package/dist/custom-elements.json +353 -0
- package/dist/docs.json +320 -1
- package/dist/esm/{helpers-2e4ca34d.js → helpers-10f68bf3.js} +2 -2
- package/dist/esm/helpers-10f68bf3.js.map +1 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/{library-52ae166a.js → library-5ba069f5.js} +1 -2
- package/dist/esm/library-5ba069f5.js.map +1 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/qds-breadcrumb-item.entry.js +1 -1
- package/dist/esm/qds-button.entry.js +7 -6
- package/dist/esm/qds-button.entry.js.map +1 -1
- package/dist/esm/qds-checkbox.entry.js +1 -1
- package/dist/esm/qds-chip.entry.js +1 -1
- package/dist/esm/qds-dialog.entry.js +1 -1
- package/dist/esm/qds-divider.entry.js +1 -1
- package/dist/esm/qds-dropdown.entry.js +1 -1
- package/dist/esm/qds-form-message.entry.js +1 -1
- package/dist/esm/qds-icon.entry.js +2 -2
- package/dist/esm/qds-inline-link.entry.js +1 -1
- package/dist/esm/qds-input.entry.js +2 -2
- package/dist/esm/qds-input.entry.js.map +1 -1
- package/dist/esm/qds-label.entry.js +1 -1
- package/dist/esm/qds-list-item.entry.js +1 -1
- package/dist/esm/qds-mini-button.entry.js +132 -0
- package/dist/esm/qds-mini-button.entry.js.map +1 -0
- package/dist/esm/qds-nav-list-item.entry.js +4 -4
- package/dist/esm/qds-progress-bar.entry.js +1 -1
- package/dist/esm/qds-radio.entry.js +3 -3
- package/dist/esm/qds-select.entry.js +1 -1
- package/dist/esm/qds-standalone-link.entry.js +3 -3
- package/dist/esm/qds-switch.entry.js +4 -4
- package/dist/esm/qds-tab.entry.js +1 -1
- package/dist/esm/qds-tabbar.entry.js +1 -1
- package/dist/esm/qds-table-body.entry.js +2 -2
- package/dist/esm/qds-table-cell.entry.js +2 -2
- package/dist/esm/qds-table-head-cell.entry.js +1 -1
- package/dist/esm/qds-table-head.entry.js +2 -2
- package/dist/esm/qds-table-row.entry.js +2 -2
- package/dist/esm/qds-table.entry.js +2 -2
- package/dist/esm/qds-tag_2.entry.js +2 -2
- package/dist/esm/qds-textarea.entry.js +1 -1
- package/dist/esm/qds-tooltip.entry.js +1 -1
- package/dist/esm/qds.js +1 -1
- package/dist/types/components/mini-button/mini-button.d.ts +82 -0
- package/dist/types/components/shared.d.ts +1 -1
- package/dist/types/components.d.ts +115 -0
- package/dist/vscode.html-custom-data.json +51 -0
- package/hydrate/index.js +451 -310
- package/hydrate/index.mjs +451 -310
- package/package.json +1 -1
- package/components/p-6b3dea37.js.map +0 -1
- package/components/p-8abba29b.js.map +0 -1
- package/components/p-8e8bd915.js.map +0 -1
- package/dist/cjs/helpers-10154521.js.map +0 -1
- package/dist/cjs/library-23467d99.js.map +0 -1
- package/dist/esm/helpers-2e4ca34d.js.map +0 -1
- package/dist/esm/library-52ae166a.js.map +0 -1
|
@@ -180,7 +180,7 @@ const determineLinkIcon = (href, target) => {
|
|
|
180
180
|
const opensInNewTab = target === '_blank';
|
|
181
181
|
if (isExternalLink)
|
|
182
182
|
return opensInNewTab ? 'external-new-tab-link' : 'external-link';
|
|
183
|
-
return
|
|
183
|
+
return undefined;
|
|
184
184
|
};
|
|
185
185
|
function attachInternals() {
|
|
186
186
|
// @ts-expect-error: This is very unsafe but it's not possible to do this in
|
|
@@ -201,4 +201,4 @@ const resolveTarget = (target) => {
|
|
|
201
201
|
|
|
202
202
|
export { attachInternals as a, inheritAriaAttributes as b, invariant as c, propertyToPx as d, roundByDPR as e, ignorePromise as f, determineLinkIcon as g, pickInputEventAttributes as h, isOverflowing as i, isTouchDevice as j, pickFocusEventAttributes as p, resolveTarget as r };
|
|
203
203
|
|
|
204
|
-
//# sourceMappingURL=helpers-
|
|
204
|
+
//# sourceMappingURL=helpers-10f68bf3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"helpers-10f68bf3.js","mappings":";;;;;AAAA;AACA;AACA;AAaA,MAAM,iBAAiB,GAAG,CACxB,OAAgB,EAChB,aAAuB,EAAE;IAEzB,MAAM,eAAe,GAAe,EAAE;IAEtC,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE;QAClC,MAAM,KAAK,GAAG,OAAO,CAAC,YAAY,CAAC,SAAS,CAAC;QAC7C,IAAI,KAAK,KAAK,IAAI,EAAE;YAClB,eAAe,CAAC,SAAS,CAAC,GAAG,KAAK;YAClC,OAAO,CAAC,eAAe,CAAC,SAAS,CAAC;;;IAItC,OAAO,eAAe;AACxB,CAAC;AAmBD,MAAM,cAAc,GAAoB;IACtC,uBAAuB;IACvB,aAAa;IACb,mBAAmB;IACnB,mBAAmB;IACnB,6BAA6B;IAC7B,WAAW;IACX,cAAc;IACd,eAAe;IACf,eAAe;IACf,mBAAmB;IACnB,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,OAAO,OAAO;AAChB;;;;","names":[],"sources":["src/helpers.ts"],"sourcesContent":["// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\nimport type {\n MiddlewareState,\n OffsetOptions as LibraryOffsetOptions,\n ReferenceElement,\n} from '@floating-ui/dom'\nimport type { Except, Replace } from 'type-fest'\n\nimport type { LinkIcon } from './components/shared'\n\nexport type Attributes = Record<string, string | undefined>\n\nconst inheritAttributes = (\n element: Element,\n attributes: string[] = [],\n): Attributes => {\n const attributeObject: Attributes = {}\n\n for (const attribute of attributes) {\n const value = element.getAttribute(attribute)\n if (value !== null) {\n attributeObject[attribute] = value\n element.removeAttribute(attribute)\n }\n }\n\n return attributeObject\n}\n\ntype ARIAAttribute =\n | Replace<Lowercase<keyof ARIAMixin>, 'aria', 'aria-'>\n | 'aria-activedescendant'\n | 'aria-braillelabel'\n | 'aria-brailleroledescription'\n | 'aria-colindextext'\n | 'aria-controls'\n | 'aria-describedby'\n | 'aria-description'\n | 'aria-details'\n | 'aria-errormessage'\n | 'aria-flowto'\n | 'aria-labelledby'\n | 'aria-owns'\n | 'aria-relevant'\n | 'aria-rowindextext'\n\nconst ariaAttributes: ARIAAttribute[] = [\n 'aria-activedescendant',\n 'aria-atomic',\n 'aria-autocomplete',\n 'aria-braillelabel',\n 'aria-brailleroledescription',\n 'aria-busy',\n 'aria-checked',\n 'aria-colcount',\n 'aria-colindex',\n 'aria-colindextext',\n 'aria-colspan',\n 'aria-controls',\n 'aria-current',\n 'aria-describedby',\n 'aria-description',\n 'aria-details',\n 'aria-disabled',\n 'aria-errormessage',\n 'aria-expanded',\n 'aria-flowto',\n 'aria-haspopup',\n 'aria-hidden',\n 'aria-invalid',\n 'aria-keyshortcuts',\n 'aria-label',\n 'aria-labelledby',\n 'aria-level',\n 'aria-live',\n 'aria-multiline',\n 'aria-multiselectable',\n 'aria-orientation',\n 'aria-owns',\n 'aria-placeholder',\n 'aria-posinset',\n 'aria-pressed',\n 'aria-readonly',\n 'aria-relevant',\n 'aria-required',\n 'aria-roledescription',\n 'aria-rowcount',\n 'aria-rowindex',\n 'aria-rowindextext',\n 'aria-rowspan',\n 'aria-selected',\n 'aria-setsize',\n 'aria-sort',\n 'aria-valuemax',\n 'aria-valuemin',\n 'aria-valuenow',\n 'aria-valuetext',\n 'role',\n]\n\n/**\n * Returns an array of aria attributes that should be copied from\n * the shadow host element to a target within the light DOM.\n *\n * @param element The element that the attributes should be copied from.\n */\nexport const inheritAriaAttributes = (\n element: Element,\n): ReturnType<typeof inheritAttributes> =>\n inheritAttributes(element, ariaAttributes)\n\nconst isProduction = process.env.NODE_ENV === 'production'\nconst prefix = 'Invariant failed'\n\n/**\n * Throws an error if the value is falsy.\n *\n * @param value Value to test.\n * @param message Optional message to display in development builds.\n */\nexport function invariant(value: unknown, message?: string): asserts value {\n // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions\n if (value) return\n if (isProduction) throw new Error(prefix)\n\n const error = message === undefined ? prefix : `${prefix}: ${message}`\n throw new Error(error)\n}\n\n/**\n * From an object pick a set of keys.\n *\n * @param object Object to pick from.\n * @param keys They keys to pick.\n * @returns New object with only the picked keys.\n */\nexport const pick = <T, K extends keyof T>(\n object: T,\n ...keys: K[]\n): Pick<T, K> => {\n const returnValue: Partial<Pick<T, K>> = {}\n for (const key of keys) returnValue[key] = object[key]\n return returnValue as Pick<T, K>\n}\n\nexport type QdsFocusEventDetail = Pick<FocusEvent, 'relatedTarget'>\nexport type QdsInputEventDetail = Pick<\n InputEvent,\n 'data' | 'inputType' | 'isComposing'\n>\nexport const pickFocusEventAttributes = (\n event: FocusEvent,\n): QdsFocusEventDetail => pick(event, 'relatedTarget')\nexport const pickInputEventAttributes = (\n event: InputEvent,\n): QdsInputEventDetail => pick(event, 'data', 'inputType', 'isComposing')\n\nconst getConversionFactor = (\n element: Element,\n unit: string,\n): number | undefined => {\n switch (unit) {\n case 'cm': {\n return 96 / 2.54\n }\n case 'em': {\n return Number.parseFloat(\n globalThis.getComputedStyle(\n element.parentElement ?? document.documentElement,\n ).fontSize,\n )\n }\n case 'in': {\n return 96\n }\n case 'mm': {\n return 96 / 25.4\n }\n case 'pc': {\n return 16\n }\n case 'pt': {\n return 96 / 72\n }\n case 'px': {\n return 1\n }\n case 'rem': {\n return Number.parseFloat(\n globalThis.getComputedStyle(document.documentElement).fontSize,\n )\n }\n default: {\n return undefined\n }\n }\n}\n\nexport const propertyToPx = (\n element: Element,\n property: string,\n): number | undefined => {\n const value = globalThis.getComputedStyle(element).getPropertyValue(property)\n const number = Number.parseFloat(value)\n if (Number.isNaN(number)) return undefined\n const unit = /\\s*[\\d+.-]*\\s*(.*)/.exec(value)?.[1] ?? ''\n\n const conversionFactor = getConversionFactor(element, unit) ?? 1\n return number * conversionFactor\n}\n\nexport const ignorePromise = <T>(promise: Promise<T>): void => {\n promise.catch(() => {\n invariant(false)\n })\n}\n\nexport const isTouchDevice = (): boolean =>\n 'ontouchstart' in globalThis ||\n ('maxTouchPoints' in globalThis && globalThis.navigator.maxTouchPoints > 0)\n\nexport const roundByDPR = (value: number): number => {\n const dpr = devicePixelRatio || 1\n return Math.round(value * dpr) / dpr\n}\n\n/**\n * Checks if an element's content is overflowing.\n *\n * @param element The element to check.\n * @returns `true` if overflowing, `false` otherwise.\n */\nexport const isOverflowing = (element: Element): boolean => {\n const { clientHeight, clientWidth, scrollHeight, scrollWidth } = element\n return scrollHeight > clientHeight + 1 || scrollWidth > clientWidth\n}\n\nexport const determineLinkIcon = (\n href?: URL | string,\n target?: string,\n): LinkIcon | undefined => {\n if (href === undefined) return undefined\n\n let link\n try {\n link = new URL(href, globalThis.location.href)\n } catch {\n return undefined\n }\n const isExternalLink = link.origin !== globalThis.location.origin\n const opensInNewTab = target === '_blank'\n\n if (isExternalLink)\n return opensInNewTab ? 'external-new-tab-link' : 'external-link'\n return undefined\n}\n\nexport function attachInternals(this: unknown): ElementInternals {\n // @ts-expect-error: This is very unsafe but it's not possible to do this in\n // Stencil.js without creating a form-associated custom\n // element.\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-return\n return this.attachInternals()\n}\n\nexport const resolveTarget = (\n target?: ReferenceElement | string | (() => ReferenceElement | string),\n): ReferenceElement | undefined => {\n const resolvedTarget = typeof target === 'function' ? target() : target\n if (typeof resolvedTarget !== 'string') return resolvedTarget\n\n const element = document.querySelector(resolvedTarget)\n if (element === null) throw new Error('String must resolve to an Element.')\n return element\n}\n\nexport type OffsetValue = Except<\n Exclude<\n LibraryOffsetOptions,\n // eslint-disable-next-line @typescript-eslint/ban-types\n Function | number\n >,\n 'mainAxis'\n>\nexport type OffsetFunction = (state: MiddlewareState) => OffsetValue\nexport type OffsetOptions = OffsetFunction | OffsetValue\n"],"version":3}
|
package/dist/esm/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
export { r as registerIconLibrary, u as unregisterIconLibrary } from './library-
|
|
6
|
+
export { r as registerIconLibrary, u as unregisterIconLibrary } from './library-5ba069f5.js';
|
|
7
7
|
import './index-bc9462c1.js';
|
|
8
8
|
|
|
9
9
|
// SPDX-FileCopyrightText: © 2024 Schneider Electric
|
|
@@ -72,7 +72,6 @@ const icons = {
|
|
|
72
72
|
'input-password-show': inputPasswordShowSvg,
|
|
73
73
|
navigation: navigationSvg,
|
|
74
74
|
next: nextSvg,
|
|
75
|
-
'new-tab-link': externalLinkSvg,
|
|
76
75
|
close: statusErrorSvg,
|
|
77
76
|
'status-error': statusErrorSvg,
|
|
78
77
|
'status-info': statusInfoSvg,
|
|
@@ -116,4 +115,4 @@ const registerIconLibrary = (name, options) => {
|
|
|
116
115
|
|
|
117
116
|
export { getIconLibrary as g, registerIconLibrary as r, unregisterIconLibrary as u };
|
|
118
117
|
|
|
119
|
-
//# sourceMappingURL=library-
|
|
118
|
+
//# sourceMappingURL=library-5ba069f5.js.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AEC,aAAU;IACzB,cAAc,EAAEC,cAAW;IAC3B,qBAAqB,EAAEC,oBAAiB;IACxC,qBAAqB,EAAEC,oBAAiB;gBACxCC,aAAU;UACVC,OAAI;IACJ,KAAK,EAAEC,cAAW;IAClB,cAAc,EAAEA,cAAW;IAC3B,aAAa,EAAEC,aAAU;IACzB,gBAAgB,EAAEnB,UAAO;IACzB,gBAAgB,EAAEoB,gBAAa;;CAEhC,CAAA;AAED,MAAM,WAAW,GAAgB;IAC/B,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,CAAC,IAAI,KAAK,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE;CACtC;;ACnED;AAQA,MAAM,OAAO,GAAgB;IAC3B,IAAI,EAAE,SAAS;IACf,QAAQ,EAAE,CAAC,IAAI,KAAK,YAAY,CAAC,UAAU,IAAI,MAAM,CAAC;CACvD;;ACXD;AAeA,IAAI,QAAQ,GAAkB,CAACC,OAAc,EAAE,WAAW,CAAC,CAAA;AAE3D;;;MAGa,cAAc,GAAG,CAAC,IAAY,KACzC,QAAQ,CAAC,IAAI,CAAC,CAAC,OAAO,KAAK,OAAO,CAAC,IAAI,KAAK,IAAI,EAAC;AAEnD;;;MAGa,qBAAqB,GAAG,CAAC,IAAY;IAChD,QAAQ,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,OAAO,KAAK,OAAO,CAAC,IAAI,KAAK,IAAI,CAAC,CAAA;AAChE,EAAC;AAED;;;MAGa,mBAAmB,GAAG,CACjC,IAAY,EACZ,OAAoC;IAEpC,qBAAqB,CAAC,IAAI,CAAC,CAAA;IAC3B,QAAQ,CAAC,IAAI,CAAC;QACZ,IAAI;QACJ,GAAG,OAAO;KACX,CAAC,CAAA;AACJ;;;;","names":["clear","checked","draggable","dropdown","externalLink","indeterminate","inputMonth","inputTel","inputWeek","inputUrl","inputTime","inputDate","inputDatetimeLocal","inputEmail","inputSearch","inputPasswordHide","inputPasswordShow","navigation","next","statusError","statusInfo","statusWarning","defaultLibrary"],"sources":["../../node_modules/@quartzds/generic-icons-core/dist/checked.svg","../../node_modules/@quartzds/generic-icons-core/dist/clear.svg","../../node_modules/@quartzds/generic-icons-core/dist/draggable.svg","../../node_modules/@quartzds/generic-icons-core/dist/dropdown.svg","../../node_modules/@quartzds/generic-icons-core/dist/external-link.svg","../../node_modules/@quartzds/generic-icons-core/dist/indeterminate.svg","../../node_modules/@quartzds/generic-icons-core/dist/input-date.svg","../../node_modules/@quartzds/generic-icons-core/dist/input-datetime-local.svg","../../node_modules/@quartzds/generic-icons-core/dist/input-email.svg","../../node_modules/@quartzds/generic-icons-core/dist/input-month.svg","../../node_modules/@quartzds/generic-icons-core/dist/input-password-hide.svg","../../node_modules/@quartzds/generic-icons-core/dist/input-password-show.svg","../../node_modules/@quartzds/generic-icons-core/dist/input-search.svg","../../node_modules/@quartzds/generic-icons-core/dist/input-tel.svg","../../node_modules/@quartzds/generic-icons-core/dist/input-time.svg","../../node_modules/@quartzds/generic-icons-core/dist/input-url.svg","../../node_modules/@quartzds/generic-icons-core/dist/input-week.svg","../../node_modules/@quartzds/generic-icons-core/dist/navigation.svg","../../node_modules/@quartzds/generic-icons-core/dist/next.svg","../../node_modules/@quartzds/generic-icons-core/dist/status-error.svg","../../node_modules/@quartzds/generic-icons-core/dist/status-info.svg","../../node_modules/@quartzds/generic-icons-core/dist/status-warning.svg","src/components/icon/core-library.ts","src/components/icon/default-library.ts","src/components/icon/library.ts"],"sourcesContent":["<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path d=\"M6.31 11.86 3.08 8.63l.71-.71 2.52 2.52 5.9-5.94.71.7z\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 16 16\"><path fill=\"currentColor\" d=\"m11.43 5.26-.71-.7-2.74 2.76-2.73-2.76-.71.7 2.74 2.77-2.74 2.77.71.71 2.73-2.77 2.74 2.77.71-.71-2.74-2.77z\"/><circle cx=\"8\" cy=\"8\" r=\"7.5\" stroke=\"currentColor\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\"><path d=\"M4.96 0a2.148 2.148 0 1 1 0 4.297A2.148 2.148 0 0 1 4.96 0zM2.812 17.852a2.148 2.148 0 1 0 4.297 0 2.148 2.148 0 0 0-4.297 0zm0-7.852a2.148 2.148 0 1 0 4.297 0 2.148 2.148 0 0 0-4.297 0zm10.079-7.852a2.148 2.148 0 1 0 4.297 0 2.148 2.148 0 0 0-4.297 0zm0 15.704a2.148 2.148 0 1 0 4.297 0 2.148 2.148 0 0 0-4.297 0zm0-7.852a2.148 2.148 0 1 0 4.297 0 2.148 2.148 0 0 0-4.297 0z\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path d=\"M7.95 12.39 2.06 4.76l.79-.61 5.11 6.62 5.23-6.63.78.62z\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\"><path fill=\"currentColor\" fill-rule=\"evenodd\" d=\"M13.16 0H20v6.72h-1.03V1.76l-6.46 6.46-.73-.73 6.46-6.46h-5.08zM0 3h11.05v1.02H1.03v14.95h15V8.53h1.02V20H0z\" clip-rule=\"evenodd\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\"><path fill=\"none\" stroke=\"currentColor\" d=\"M.5 10h19\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 20 20\"><path stroke=\"currentColor\" d=\"M1.5 8.5h17m-12 0v9m7-9v9m-12-6h17m-17 3h17m-17-10h17v13h-17zm6-1v2a1 1 0 0 1-2 0v-2a1 1 0 0 1 2 0Zm7 0v2a1 1 0 1 1-2 0v-2a1 1 0 1 1 2 0Z\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 20 20\"><path stroke=\"currentColor\" d=\"M1.5 8.5h17m-12 0v9m7-9v9m-12-6h17m-17 3h17m-17-10h17v13h-17zm6-1v2a1 1 0 0 1-2 0v-2a1 1 0 0 1 2 0Zm7 0v2a1 1 0 1 1-2 0v-2a1 1 0 1 1 2 0Z\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 20 20\"><path stroke=\"currentColor\" d=\"M.5 2.5h19m-19 0v15h19v-15m-19 0 9.5 8 9.5-8\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 20 20\"><path stroke=\"currentColor\" d=\"M1.5 8.5h17m-12 0v9m7-9v9m-12-6h17m-17 3h17m-17-10h17v13h-17zm6-1v2a1 1 0 0 1-2 0v-2a1 1 0 0 1 2 0Zm7 0v2a1 1 0 1 1-2 0v-2a1 1 0 1 1 2 0Z\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\"><path fill=\"none\" stroke=\"currentColor\" d=\"m.5.5 19 19m-3.443-5.82c1.006-.79 1.997-1.626 3.443-2.239-.463-.892-2.811-6.857-10.245-6.823m2.995 7.646a3.304 3.304 0 1 1-4.624-4.608l-.022-.03s-5.153.05-7.102 3.817c0 0 3.582 6.142 11.56 4.325a8.2 8.2 0 0 0 2.599-1.078m-1.781-4.367a3.305 3.305 0 0 0-2.638-3.237\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\"><path fill=\"none\" stroke=\"currentColor\" d=\"M9.255 4.258c7.435-.033 9.783 5.931 10.245 6.823-3.036 1.289-4.07 3.558-7.44 4.325C4.082 17.223.5 11.081.5 11.081c1.95-3.767 7.102-3.817 7.102-3.817l.022.03a3.304 3.304 0 1 0 2.617-.568\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path d=\"M3.95 6.96h1c0-1.12.91-2.02 2.02-2.02v-1c-1.67 0-3.02 1.36-3.02 3.02Zm10.08 6.36L9.99 9.28c.63-.79 1.03-1.78 1.03-2.86a4.6 4.6 0 0 0-4.6-4.6c-2.54 0-4.6 2.07-4.6 4.6s2.06 4.6 4.6 4.6c1.09 0 2.08-.4 2.86-1.03l4.04 4.04zm-7.61-3.3c-1.99 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6Z\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 20 20\"><path stroke=\"currentColor\" stroke-linejoin=\"round\" stroke-miterlimit=\"3.864\" d=\"m1 15.502 2.472 2.272c.66-.017 1.468-1.254 2.528-2.272 2.086-2.002 2.376-2.075 2.176-2.235.161.2-2.006-1.481-2.006-1.481s1.492-1.673 3.368-3.036a117 117 0 0 1 3.442-2.403l.994 2.403s.933-.536 2.688-2.058C18.227 5.337 19.5 4.554 19.5 4.554l-2-2.552S12.82 1.79 6.933 6.228C2.574 9.513 1 15.502 1 15.502Z\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path d=\"m13.31 5 .71-.71-2.32-2.32-.71.71.8.8-.64.64c-.86-.71-1.95-1.16-3.16-1.16S5.7 3.4 4.84 4.11l-.63-.63.8-.8-.71-.71-2.32 2.32.71.71.8-.8.63.63a4.97 4.97 0 0 0-1.14 3.14c0 1.68.84 3.16 2.12 4.07l-1.25 1.25.71.71 1.45-1.45c.61.26 1.28.41 1.98.41s1.31-.14 1.89-.38l1.36 1.36.71-.71-1.15-1.15c1.32-.9 2.19-2.41 2.19-4.13 0-1.19-.44-2.27-1.14-3.13l.64-.64zM8 11.97c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4Zm.49-6.59h-1v2.79l2.16 2.16.71-.71-1.87-1.87z\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 20 20\"><path stroke=\"currentColor\" stroke-linejoin=\"round\" d=\"M10.01.5v19m0-19a9.5 9.5 0 0 1 9.5 9.5M10.01.5C5.387.5.5 4.5.5 10.5m9.51-10s-5.537 3-5.537 10.716c0 5.284 5.537 8.284 5.537 8.284m0-19s5.426 3 5.426 10.716c0 5.284-5.426 8.284-5.426 8.284m0 0c-5.079 0-9.227-3.986-9.487-9.001M10.01 19.5a9.5 9.5 0 0 0 9.5-9.5m0 0c-.795.277-9.01 3.603-19.018.38\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 20 20\"><path stroke=\"currentColor\" d=\"M1.5 8.5h17m-12 0v9m7-9v9m-12-6h17m-17 3h17m-17-10h17v13h-17zm6-1v2a1 1 0 0 1-2 0v-2a1 1 0 0 1 2 0Zm7 0v2a1 1 0 1 1-2 0v-2a1 1 0 1 1 2 0Z\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path d=\"m4.77 13.97-.62-.78 6.62-5.23-6.62-5.11.61-.79 7.63 5.89z\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\"><path stroke=\"currentColor\" d=\"m5.495.5 8.664 8.664c.462.462.462 1.21 0 1.672L5.495 19.5\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path d=\"m11.43 5.26-.71-.7-2.74 2.76-2.73-2.76-.71.7 2.74 2.77-2.74 2.77.71.71 2.73-2.77 2.74 2.77.71-.71-2.74-2.77z\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\"><path fill=\"currentColor\" d=\"M9 4h2.41v2.15H9zm.13 12.51V7.97h2.18v8.54z\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\"><path fill=\"currentColor\" d=\"M9.57 12.48c-.13-.12-.2-.29-.23-.52l-.67-7-.02-.18c0-.37.13-.67.39-.89s.58-.33.98-.33.72.11.98.33.39.52.39.89l-.02.2-.67 6.98c-.02.23-.1.4-.23.52a.65.65 0 0 1-.46.18.65.65 0 0 1-.46-.18zm-.5 3.57a1.34 1.34 0 0 1-.38-.96 1.32 1.32 0 0 1 1.33-1.35c.38 0 .7.13.95.39s.38.58.38.96a1.32 1.32 0 0 1-1.33 1.35c-.38 0-.7-.13-.95-.39Z\"/></svg>","// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\n// FIXME: TypeScript and Webpack can resolve exports from the package.json\n// `exports` field but Rollup can't. `@quartzds/generic-icons-core/*.svg`\n// _should_ work but it doesn't.\n/* eslint-disable import/no-unresolved */\nimport checked from '@quartzds/generic-icons-core/dist/checked.svg'\nimport clear from '@quartzds/generic-icons-core/dist/clear.svg'\nimport draggable from '@quartzds/generic-icons-core/dist/draggable.svg'\nimport dropdown from '@quartzds/generic-icons-core/dist/dropdown.svg'\nimport externalLink from '@quartzds/generic-icons-core/dist/external-link.svg'\nimport indeterminate from '@quartzds/generic-icons-core/dist/indeterminate.svg'\nimport inputDate from '@quartzds/generic-icons-core/dist/input-date.svg'\nimport inputDatetimeLocal from '@quartzds/generic-icons-core/dist/input-datetime-local.svg'\nimport inputEmail from '@quartzds/generic-icons-core/dist/input-email.svg'\nimport inputMonth from '@quartzds/generic-icons-core/dist/input-month.svg'\nimport inputPasswordHide from '@quartzds/generic-icons-core/dist/input-password-hide.svg'\nimport inputPasswordShow from '@quartzds/generic-icons-core/dist/input-password-show.svg'\nimport inputSearch from '@quartzds/generic-icons-core/dist/input-search.svg'\nimport inputTel from '@quartzds/generic-icons-core/dist/input-tel.svg'\nimport inputTime from '@quartzds/generic-icons-core/dist/input-time.svg'\nimport inputUrl from '@quartzds/generic-icons-core/dist/input-url.svg'\nimport inputWeek from '@quartzds/generic-icons-core/dist/input-week.svg'\nimport navigation from '@quartzds/generic-icons-core/dist/navigation.svg'\nimport next from '@quartzds/generic-icons-core/dist/next.svg'\nimport statusError from '@quartzds/generic-icons-core/dist/status-error.svg'\nimport statusInfo from '@quartzds/generic-icons-core/dist/status-info.svg'\nimport statusWarning from '@quartzds/generic-icons-core/dist/status-warning.svg'\n\n/* eslint-enable import/no-unresolved */\nimport type { IconLibrary } from './library'\n\nconst icons: Record<string, string | undefined> = {\n /* eslint-disable @typescript-eslint/naming-convention */\n clear,\n checked,\n draggable,\n dropdown,\n 'external-link': externalLink,\n 'external-new-tab-link': externalLink,\n indeterminate,\n 'input-month': inputMonth,\n 'input-tel': inputTel,\n 'input-week': inputWeek,\n 'input-url': inputUrl,\n 'input-time': inputTime,\n 'input-date': inputDate,\n 'input-datetime-local': inputDatetimeLocal,\n 'input-email': inputEmail,\n 'input-search': inputSearch,\n 'input-password-hide': inputPasswordHide,\n 'input-password-show': inputPasswordShow,\n navigation,\n next,\n close: statusError,\n 'status-error': statusError,\n 'status-info': statusInfo,\n 'status-success': checked,\n 'status-warning': statusWarning,\n /* eslint-enable @typescript-eslint/naming-convention */\n}\n\nconst coreLibrary: IconLibrary = {\n name: 'core',\n resolver: (name) => icons[name] ?? '',\n}\n\nexport default coreLibrary\n","// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\nimport { getAssetPath } from '@stencil/core'\n\nimport type { IconLibrary } from './library'\n\nconst library: IconLibrary = {\n name: 'default',\n resolver: (name) => getAssetPath(`/icons/${name}.svg`),\n}\n\nexport default library\n","// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { Except } from 'type-fest'\n\nimport coreLibrary from './core-library'\nimport defaultLibrary from './default-library'\n\nexport type IconLibraryResolver = (name: string) => string\nexport interface IconLibrary {\n name: string\n resolver: IconLibraryResolver\n}\n\nlet registry: IconLibrary[] = [defaultLibrary, coreLibrary]\n\n/**\n * Returns a library from the registry.\n */\nexport const getIconLibrary = (name: string): IconLibrary | undefined =>\n registry.find((library) => library.name === name)\n\n/**\n * Removes an icon library from the registry.\n */\nexport const unregisterIconLibrary = (name: string): void => {\n registry = registry.filter((library) => library.name !== name)\n}\n\n/**\n * Adds an icon library to the registry or overrides an existing one.\n */\nexport const registerIconLibrary = (\n name: string,\n options: Except<IconLibrary, 'name'>,\n): void => {\n unregisterIconLibrary(name)\n registry.push({\n name,\n ...options,\n })\n}\n"],"version":3}
|
package/dist/esm/loader.js
CHANGED
|
@@ -10,7 +10,7 @@ import { g as globalScripts } from './app-globals-8ced3a41.js';
|
|
|
10
10
|
const defineCustomElements = async (win, options) => {
|
|
11
11
|
if (typeof window === 'undefined') return undefined;
|
|
12
12
|
await globalScripts();
|
|
13
|
-
return bootstrapLazy(JSON.parse("[[\"qds-tab\",[[1,\"qds-tab\",{\"action\":[1],\"badge\":[8],\"badgeCounterImportance\":[1,\"badge-counter-importance\"],\"badgeDescription\":[1,\"badge-description\"],\"badgeIndicatorStatus\":[1,\"badge-indicator-status\"],\"disabled\":[4],\"iconLibrary\":[1,\"icon-library\"],\"iconName\":[1,\"icon-name\"],\"iconOnly\":[4,\"icon-only\"],\"importance\":[1],\"indicatorPosition\":[1,\"indicator-position\"],\"panel\":[1],\"tagIconDescription\":[1,\"tag-icon-description\"],\"tagIconName\":[1,\"tag-icon-name\"],\"tagIconLibrary\":[1,\"tag-icon-library\"],\"tagImportance\":[1,\"tag-importance\"],\"tagSize\":[1,\"tag-size\"],\"tagStatus\":[1,\"tag-status\"],\"tagText\":[1,\"tag-text\"],\"selected\":[4],\"size\":[1],\"subtitle\":[1],\"text\":[1],\"href\":[1],\"tabIndex\":[32],\"isIndicatorOnTop\":[32]},[[0,\"click\",\"onClick\"]],{\"panel\":[\"panelChanged\"],\"tabindex\":[\"tabindexChanged\"]}]]],[\"qds-tabbar\",[[17,\"qds-tabbar\",{\"layer\":[1],\"level\":[1],\"orientation\":[1],\"tablistDescription\":[1,\"tablist-description\"],\"disableEndArrow\":[32],\"disableStartArrow\":[32],\"activeTab\":[32]},[[9,\"resize\",\"windowResize\"]]]]],[\"qds-input\",[[81,\"qds-input\",{\"noIcon\":[4,\"no-icon\"],\"size\":[1],\"accept\":[1],\"autoComplete\":[1,\"autocomplete\"],\"capture\":[1],\"disabled\":[4],\"enterkeyhint\":[1],\"files\":[16],\"form\":[1],\"inputmode\":[1],\"labels\":[16],\"max\":[8],\"maxLength\":[2,\"maxlength\"],\"min\":[8],\"minLength\":[2,\"minlength\"],\"multiple\":[4],\"name\":[1],\"pattern\":[1],\"placeholder\":[1],\"required\":[4],\"selectionDirection\":[1025,\"selection-direction\"],\"selectionEnd\":[1026,\"selection-end\"],\"selectionStart\":[1026,\"selection-start\"],\"step\":[8],\"type\":[1],\"validationMessage\":[1,\"validation-message\"],\"validity\":[16],\"value\":[1032],\"willValidate\":[4,\"will-validate\"],\"tabIndex\":[32],\"isPasswordVisible\":[32]},[[0,\"click\",\"onClick\"],[0,\"keydown\",\"onKeydown\"]],{\"disabled\":[\"disabledChanged\"],\"selectionDirection\":[\"selectionDirectionChanged\"],\"selectionEnd\":[\"selectionEndChanged\"],\"selectionStart\":[\"selectionStartChanged\"],\"tabindex\":[\"tabindexChanged\"],\"max\":[\"validationChanged\"],\"maxLength\":[\"validationChanged\"],\"min\":[\"validationChanged\"],\"minLength\":[\"validationChanged\"],\"pattern\":[\"validationChanged\"],\"required\":[\"validationChanged\"],\"step\":[\"validationChanged\"],\"type\":[\"validationChanged\"],\"value\":[\"validationChanged\",\"valueChanged\"]}]]],[\"qds-list-item\",[[17,\"qds-list-item\",{\"destination\":[1],\"disabled\":[4],\"divider\":[1],\"iconName\":[1,\"icon-name\"],\"iconLibrary\":[1,\"icon-library\"],\"kicker\":[1],\"listAction\":[1,\"list-action\"],\"size\":[1],\"checked\":[1028],\"selected\":[1028],\"indeterminate\":[1028],\"text\":[1],\"subtitle\":[1],\"tabIndex\":[32]},[[0,\"click\",\"onClick\"]],{\"tabindex\":[\"tabindexChanged\"]}]]],[\"qds-radio\",[[2,\"qds-radio\",{\"inline\":[4],\"size\":[1],\"text\":[1],\"checked\":[1028],\"disabled\":[4],\"form\":[1],\"name\":[1],\"required\":[4],\"value\":[1032],\"tabIndex\":[32]},[[0,\"click\",\"onClick\"]],{\"tabindex\":[\"tabindexChanged\"]}]]],[\"qds-chip\",[[81,\"qds-chip\",{\"iconName\":[1,\"icon-name\"],\"iconLibrary\":[1,\"icon-library\"],\"size\":[1],\"type\":[1],\"text\":[1],\"checked\":[1028],\"form\":[1],\"disabled\":[4],\"name\":[1],\"value\":[8],\"isPressed\":[32],\"isSelected\":[32],\"tabIndex\":[32],\"tooltip\":[32]},[[0,\"click\",\"onClick\"],[0,\"keydown\",\"handleKeyDown\"],[0,\"keyup\",\"handleKeyUp\"]],{\"checked\":[\"checkedChanged\"],\"disabled\":[\"disabledChanged\"],\"tabindex\":[\"tabindexChanged\"],\"value\":[\"valueChanged\"]}]]],[\"qds-nav-list-item\",[[17,\"qds-nav-list-item\",{\"collapsed\":[4],\"disabled\":[4],\"iconName\":[1,\"icon-name\"],\"iconLibrary\":[1,\"icon-library\"],\"size\":[1],\"selected\":[4],\"subtext\":[1],\"text\":[1],\"tabIndex\":[32]},[[0,\"click\",\"onClick\"]],{\"tabindex\":[\"tabindexChanged\"]}]]],[\"qds-breadcrumb-item\",[[17,\"qds-breadcrumb-item\",{\"text\":[1],\"href\":[1],\"hreflang\":[1],\"referrerPolicy\":[1,\"referrerpolicy\"],\"rel\":[1],\"target\":[1],\"tooltip\":[32]},null,{\"text\":[\"textChanged\"]}]]],[\"qds-form-message\",[[1,\"qds-form-message\",{\"inline\":[4],\"size\":[1],\"status\":[1],\"statusDescription\":[1,\"status-description\"],\"text\":[1]}]]],[\"qds-inline-link\",[[17,\"qds-inline-link\",{\"disabled\":[4],\"iconName\":[1,\"icon-name\"],\"iconLibrary\":[1,\"icon-library\"],\"importance\":[1],\"download\":[8],\"href\":[1],\"hreflang\":[1],\"referrerPolicy\":[1,\"referrerpolicy\"],\"rel\":[1],\"target\":[1],\"linkIcon\":[32],\"tabIndex\":[32]},[[0,\"click\",\"onClick\"]],{\"disabled\":[\"disabledChanged\"],\"tabindex\":[\"tabindexChanged\"],\"href\":[\"hrefTargetChanged\"],\"target\":[\"hrefTargetChanged\"]}]]],[\"qds-loader\",[[65,\"qds-loader\",{\"size\":[1],\"status\":[1]},null,{\"status\":[\"statusChanged\"]}]]],[\"qds-select\",[[81,\"qds-select\",{\"size\":[1],\"autoComplete\":[1,\"autocomplete\"],\"disabled\":[4],\"form\":[1],\"length\":[2],\"multiple\":[4],\"name\":[1],\"options\":[16],\"required\":[4],\"selectedIndex\":[1026,\"selected-index\"],\"selectedOptions\":[16],\"type\":[1],\"validationMessage\":[1,\"validation-message\"],\"validity\":[16],\"value\":[1025],\"willValidate\":[4,\"will-validate\"],\"tabIndex\":[32]},[[0,\"click\",\"onClick\"]],{\"disabled\":[\"disabledChanged\"],\"selectedIndex\":[\"selectedIndexChanged\"],\"tabindex\":[\"tabindexChanged\"],\"required\":[\"validationChanged\"],\"value\":[\"validationChanged\"]}]]],[\"qds-standalone-link\",[[17,\"qds-standalone-link\",{\"disabled\":[4],\"iconName\":[1,\"icon-name\"],\"iconLibrary\":[1,\"icon-library\"],\"importance\":[1],\"size\":[1],\"visitable\":[4],\"download\":[8],\"href\":[1],\"hreflang\":[1],\"referrerPolicy\":[1,\"referrerpolicy\"],\"rel\":[1],\"target\":[1],\"linkIcon\":[32],\"tabIndex\":[32]},[[0,\"click\",\"onClick\"]],{\"disabled\":[\"disabledChanged\"],\"tabindex\":[\"tabindexChanged\"],\"href\":[\"hrefTargetChanged\"],\"target\":[\"hrefTargetChanged\"]}]]],[\"qds-dialog\",[[1,\"qds-dialog\",{\"open\":[1540],\"hasTitleSlot\":[32],\"hasFooterSlot\":[32]},null,{\"open\":[\"openChanged\"]}]]],[\"qds-dropdown\",[[1,\"qds-dropdown\",{\"autoUpdateOptions\":[16],\"disabled\":[4],\"flipOptions\":[16],\"noFlip\":[4,\"no-flip\"],\"noShift\":[4,\"no-shift\"],\"offsetOptions\":[16],\"placement\":[1],\"shiftOptions\":[16],\"strategy\":[1],\"target\":[1],\"hostAriaLabelledBy\":[32],\"hostDisplay\":[32],\"hostPosition\":[32],\"hostTransform\":[32],\"update\":[64]},[[4,\"click\",\"handleMouseDown\"]],{\"target\":[\"updateReferenceElement\"],\"flipOptions\":[\"updateMiddleware\"],\"noFlip\":[\"updateMiddleware\"],\"noShift\":[\"updateMiddleware\"],\"offsetOptions\":[\"updateMiddleware\"],\"shiftOptions\":[\"updateMiddleware\"],\"placement\":[\"updatePosition\"],\"strategy\":[\"updatePosition\"],\"autoUpdateOptions\":[\"startAutoUpdate\"]}]]],[\"qds-progress-bar\",[[65,\"qds-progress-bar\",{\"size\":[1],\"labels\":[16],\"max\":[8],\"position\":[2],\"value\":[8],\"width\":[32]},null,{\"max\":[\"maxChanged\"],\"value\":[\"valueChanged\"]}]]],[\"qds-switch\",[[81,\"qds-switch\",{\"inline\":[4],\"size\":[1],\"checked\":[1028],\"disabled\":[4],\"form\":[1],\"labels\":[16],\"name\":[1],\"value\":[8],\"validationMessage\":[1,\"validation-message\"],\"validity\":[16],\"willValidate\":[4,\"will-validate\"],\"tabIndex\":[32],\"inheritedAttributes\":[32]},[[0,\"click\",\"onClick\"]],{\"checked\":[\"checkedChanged\"],\"disabled\":[\"disabledChanged\"],\"tabindex\":[\"tabindexChanged\"],\"value\":[\"valueChanged\"]}]]],[\"qds-table\",[[1,\"qds-table\"]]],[\"qds-table-body\",[[1,\"qds-table-body\"]]],[\"qds-table-cell\",[[1,\"qds-table-cell\",{\"colSpan\":[2,\"colspan\"],\"rowSpan\":[2,\"rowspan\"]}]]],[\"qds-table-head\",[[1,\"qds-table-head\"]]],[\"qds-table-head-cell\",[[1,\"qds-table-head-cell\",{\"abbr\":[1],\"colSpan\":[2,\"colspan\"],\"rowSpan\":[2,\"rowspan\"],\"scope\":[1]}]]],[\"qds-table-row\",[[1,\"qds-table-row\"]]],[\"qds-textarea\",[[81,\"qds-textarea\",{\"size\":[1],\"autoComplete\":[1,\"autocomplete\"],\"cols\":[2],\"disabled\":[4],\"enterkeyhint\":[1],\"form\":[1],\"inputmode\":[1],\"labels\":[16],\"maxLength\":[2,\"maxlength\"],\"minLength\":[2,\"minlength\"],\"name\":[1],\"placeholder\":[1],\"required\":[4],\"rows\":[2],\"selectionDirection\":[1025,\"selection-direction\"],\"selectionEnd\":[1026,\"selection-end\"],\"selectionStart\":[1026,\"selection-start\"],\"validationMessage\":[1,\"validation-message\"],\"validity\":[16],\"value\":[1032],\"willValidate\":[4,\"will-validate\"],\"wrap\":[1],\"tabIndex\":[32]},[[0,\"click\",\"onClick\"]],{\"disabled\":[\"disabledChanged\"],\"selectionDirection\":[\"selectionDirectionChanged\"],\"selectionEnd\":[\"selectionEndChanged\"],\"selectionStart\":[\"selectionStartChanged\"],\"tabindex\":[\"tabindexChanged\"],\"maxLength\":[\"validationChanged\"],\"minLength\":[\"validationChanged\"],\"required\":[\"validationChanged\"],\"value\":[\"validationChanged\",\"valueChanged\"]}]]],[\"qds-checkbox\",[[81,\"qds-checkbox\",{\"inline\":[4],\"size\":[1],\"text\":[1],\"checked\":[1028],\"disabled\":[4],\"form\":[1],\"indeterminate\":[1028],\"name\":[1],\"required\":[4],\"validationMessage\":[1,\"validation-message\"],\"validity\":[16],\"value\":[8],\"willValidate\":[4,\"will-validate\"],\"checkboxOnly\":[4,\"checkbox-only\"],\"tabIndex\":[32]},[[0,\"click\",\"onClick\"]],{\"checked\":[\"checkedChanged\"],\"disabled\":[\"disabledChanged\"],\"tabindex\":[\"tabindexChanged\"],\"value\":[\"valueChanged\"]}]]],[\"qds-divider\",[[1,\"qds-divider\",{\"importance\":[1],\"vertical\":[4]},null,{\"vertical\":[\"verticalChanged\"]}]]],[\"qds-badge-counter_2\",[[1,\"qds-badge-counter\",{\"description\":[1],\"importance\":[1],\"size\":[1],\"strokeRing\":[4,\"stroke-ring\"],\"value\":[8]}],[1,\"qds-badge-indicator\",{\"description\":[1],\"size\":[1],\"status\":[1],\"strokeRing\":[4,\"stroke-ring\"]}]]],[\"qds-tooltip\",[[1,\"qds-tooltip\",{\"autoUpdateOptions\":[16],\"disabled\":[4],\"flipOptions\":[16],\"noFlip\":[4,\"no-flip\"],\"noShift\":[4,\"no-shift\"],\"offsetOptions\":[16],\"placement\":[1],\"shiftOptions\":[16],\"strategy\":[1],\"target\":[1],\"trigger\":[1],\"hostPosition\":[32],\"hostTransform\":[32],\"open\":[32],\"middleware\":[32],\"side\":[32],\"aStyles\":[32],\"aHeight\":[32],\"aGap\":[32],\"show\":[64],\"close\":[64],\"updateArrow\":[64]},null,{\"aGap\":[\"updateMiddleware\"],\"aHeight\":[\"updateMiddleware\"],\"flipOptions\":[\"updateMiddleware\"],\"noFlip\":[\"updateMiddleware\"],\"noShift\":[\"updateMiddleware\"],\"offsetOptions\":[\"updateMiddleware\"],\"shiftOptions\":[\"updateMiddleware\"],\"role\":[\"updateAriaHasPopup\"],\"open\":[\"setAriaExpanded\"],\"target\":[\"updateReferenceElement\"],\"trigger\":[\"updateEventListeners\"],\"middleware\":[\"updatePosition\"],\"placement\":[\"updatePosition\"],\"strategy\":[\"updatePosition\"],\"autoUpdateOptions\":[\"startAutoUpdate\"]}]]],[\"qds-icon\",[[1,\"qds-icon\",{\"name\":[1],\"library\":[1],\"svg\":[32]},null,{\"name\":[\"setIcon\"],\"library\":[\"setIcon\"]}]]],[\"qds-button\",[[65,\"qds-button\",{\"action\":[1],\"badge\":[8],\"badgeDescription\":[1,\"badge-description\"],\"badgeIndicatorStatus\":[1,\"badge-indicator-status\"],\"iconName\":[1,\"icon-name\"],\"iconLibrary\":[1,\"icon-library\"],\"importance\":[1],\"size\":[1],\"text\":[1],\"iconOnly\":[4,\"icon-only\"],\"disabled\":[4],\"download\":[1],\"form\":[1],\"formAction\":[1,\"formaction\"],\"formMethod\":[1,\"formmethod\"],\"formNoValidate\":[4,\"formnovalidate\"],\"formTarget\":[1,\"formtarget\"],\"href\":[1],\"labels\":[16],\"rel\":[1],\"name\":[1],\"target\":[1],\"type\":[1],\"validationMessage\":[1,\"validation-message\"],\"validity\":[16],\"value\":[1],\"willValidate\":[4,\"will-validate\"],\"tooltip\":[32]},[[0,\"blur\",\"onBlur\"],[0,\"click\",\"onClick\"],[0,\"focus\",\"onFocus\"],[0,\"keydown\",\"onKeydown\"],[0,\"keyup\",\"onKeyup\"]],{\"disabled\":[\"disabledChanged\"],\"href\":[\"hrefChanged\"],\"tabindex\":[\"tabindexChanged\"],\"text\":[\"textChanged\"]}]]],[\"qds-tag_2\",[[1,\"qds-tag\",{\"iconName\":[1,\"icon-name\"],\"iconLibrary\":[1,\"icon-library\"],\"importance\":[1],\"status\":[1],\"size\":[1],\"text\":[1],\"iconDescription\":[1,\"icon-description\"],\"badge\":[4],\"badgeDescription\":[1,\"badge-description\"]}],[1,\"qds-title\",{\"alignment\":[1],\"iconName\":[1,\"icon-name\"],\"iconLibrary\":[1,\"icon-library\"],\"kicker\":[1],\"layer\":[1],\"level\":[1],\"subtitle\":[1],\"tag\":[1],\"variant\":[1]}]]],[\"qds-label\",[[1,\"qds-label\",{\"inline\":[4],\"required\":[4],\"size\":[1],\"text\":[1],\"tooltip\":[32]},null,{\"text\":[\"textChanged\"]}]]]]"), options);
|
|
13
|
+
return bootstrapLazy(JSON.parse("[[\"qds-tab\",[[1,\"qds-tab\",{\"action\":[1],\"badge\":[8],\"badgeCounterImportance\":[1,\"badge-counter-importance\"],\"badgeDescription\":[1,\"badge-description\"],\"badgeIndicatorStatus\":[1,\"badge-indicator-status\"],\"disabled\":[4],\"iconLibrary\":[1,\"icon-library\"],\"iconName\":[1,\"icon-name\"],\"iconOnly\":[4,\"icon-only\"],\"importance\":[1],\"indicatorPosition\":[1,\"indicator-position\"],\"panel\":[1],\"tagIconDescription\":[1,\"tag-icon-description\"],\"tagIconName\":[1,\"tag-icon-name\"],\"tagIconLibrary\":[1,\"tag-icon-library\"],\"tagImportance\":[1,\"tag-importance\"],\"tagSize\":[1,\"tag-size\"],\"tagStatus\":[1,\"tag-status\"],\"tagText\":[1,\"tag-text\"],\"selected\":[4],\"size\":[1],\"subtitle\":[1],\"text\":[1],\"href\":[1],\"tabIndex\":[32],\"isIndicatorOnTop\":[32]},[[0,\"click\",\"onClick\"]],{\"panel\":[\"panelChanged\"],\"tabindex\":[\"tabindexChanged\"]}]]],[\"qds-tabbar\",[[17,\"qds-tabbar\",{\"layer\":[1],\"level\":[1],\"orientation\":[1],\"tablistDescription\":[1,\"tablist-description\"],\"disableEndArrow\":[32],\"disableStartArrow\":[32],\"activeTab\":[32]},[[9,\"resize\",\"windowResize\"]]]]],[\"qds-input\",[[81,\"qds-input\",{\"noIcon\":[4,\"no-icon\"],\"size\":[1],\"accept\":[1],\"autoComplete\":[1,\"autocomplete\"],\"capture\":[1],\"disabled\":[4],\"enterkeyhint\":[1],\"files\":[16],\"form\":[1],\"inputmode\":[1],\"labels\":[16],\"max\":[8],\"maxLength\":[2,\"maxlength\"],\"min\":[8],\"minLength\":[2,\"minlength\"],\"multiple\":[4],\"name\":[1],\"pattern\":[1],\"placeholder\":[1],\"required\":[4],\"selectionDirection\":[1025,\"selection-direction\"],\"selectionEnd\":[1026,\"selection-end\"],\"selectionStart\":[1026,\"selection-start\"],\"step\":[8],\"type\":[1],\"validationMessage\":[1,\"validation-message\"],\"validity\":[16],\"value\":[1032],\"willValidate\":[4,\"will-validate\"],\"tabIndex\":[32],\"isPasswordVisible\":[32]},[[0,\"click\",\"onClick\"],[0,\"keydown\",\"onKeydown\"]],{\"disabled\":[\"disabledChanged\"],\"selectionDirection\":[\"selectionDirectionChanged\"],\"selectionEnd\":[\"selectionEndChanged\"],\"selectionStart\":[\"selectionStartChanged\"],\"tabindex\":[\"tabindexChanged\"],\"max\":[\"validationChanged\"],\"maxLength\":[\"validationChanged\"],\"min\":[\"validationChanged\"],\"minLength\":[\"validationChanged\"],\"pattern\":[\"validationChanged\"],\"required\":[\"validationChanged\"],\"step\":[\"validationChanged\"],\"type\":[\"validationChanged\"],\"value\":[\"validationChanged\",\"valueChanged\"]}]]],[\"qds-list-item\",[[17,\"qds-list-item\",{\"destination\":[1],\"disabled\":[4],\"divider\":[1],\"iconName\":[1,\"icon-name\"],\"iconLibrary\":[1,\"icon-library\"],\"kicker\":[1],\"listAction\":[1,\"list-action\"],\"size\":[1],\"checked\":[1028],\"selected\":[1028],\"indeterminate\":[1028],\"text\":[1],\"subtitle\":[1],\"tabIndex\":[32]},[[0,\"click\",\"onClick\"]],{\"tabindex\":[\"tabindexChanged\"]}]]],[\"qds-radio\",[[2,\"qds-radio\",{\"inline\":[4],\"size\":[1],\"text\":[1],\"checked\":[1028],\"disabled\":[4],\"form\":[1],\"name\":[1],\"required\":[4],\"value\":[1032],\"tabIndex\":[32]},[[0,\"click\",\"onClick\"]],{\"tabindex\":[\"tabindexChanged\"]}]]],[\"qds-chip\",[[81,\"qds-chip\",{\"iconName\":[1,\"icon-name\"],\"iconLibrary\":[1,\"icon-library\"],\"size\":[1],\"type\":[1],\"text\":[1],\"checked\":[1028],\"form\":[1],\"disabled\":[4],\"name\":[1],\"value\":[8],\"isPressed\":[32],\"isSelected\":[32],\"tabIndex\":[32],\"tooltip\":[32]},[[0,\"click\",\"onClick\"],[0,\"keydown\",\"handleKeyDown\"],[0,\"keyup\",\"handleKeyUp\"]],{\"checked\":[\"checkedChanged\"],\"disabled\":[\"disabledChanged\"],\"tabindex\":[\"tabindexChanged\"],\"value\":[\"valueChanged\"]}]]],[\"qds-nav-list-item\",[[17,\"qds-nav-list-item\",{\"collapsed\":[4],\"disabled\":[4],\"iconName\":[1,\"icon-name\"],\"iconLibrary\":[1,\"icon-library\"],\"size\":[1],\"selected\":[4],\"subtext\":[1],\"text\":[1],\"tabIndex\":[32]},[[0,\"click\",\"onClick\"]],{\"tabindex\":[\"tabindexChanged\"]}]]],[\"qds-breadcrumb-item\",[[17,\"qds-breadcrumb-item\",{\"text\":[1],\"href\":[1],\"hreflang\":[1],\"referrerPolicy\":[1,\"referrerpolicy\"],\"rel\":[1],\"target\":[1],\"tooltip\":[32]},null,{\"text\":[\"textChanged\"]}]]],[\"qds-form-message\",[[1,\"qds-form-message\",{\"inline\":[4],\"size\":[1],\"status\":[1],\"statusDescription\":[1,\"status-description\"],\"text\":[1]}]]],[\"qds-inline-link\",[[17,\"qds-inline-link\",{\"disabled\":[4],\"iconName\":[1,\"icon-name\"],\"iconLibrary\":[1,\"icon-library\"],\"importance\":[1],\"download\":[8],\"href\":[1],\"hreflang\":[1],\"referrerPolicy\":[1,\"referrerpolicy\"],\"rel\":[1],\"target\":[1],\"linkIcon\":[32],\"tabIndex\":[32]},[[0,\"click\",\"onClick\"]],{\"disabled\":[\"disabledChanged\"],\"tabindex\":[\"tabindexChanged\"],\"href\":[\"hrefTargetChanged\"],\"target\":[\"hrefTargetChanged\"]}]]],[\"qds-loader\",[[65,\"qds-loader\",{\"size\":[1],\"status\":[1]},null,{\"status\":[\"statusChanged\"]}]]],[\"qds-mini-button\",[[65,\"qds-mini-button\",{\"disabled\":[4],\"name\":[1],\"library\":[1],\"target\":[1],\"href\":[1],\"rel\":[1],\"text\":[1]},[[0,\"click\",\"onClick\"],[0,\"blur\",\"onBlur\"],[0,\"focus\",\"onFocus\"],[0,\"keydown\",\"onKeydown\"],[0,\"keyup\",\"onKeyup\"]],{\"disabled\":[\"disabledChanged\"],\"href\":[\"hrefChanged\"],\"tabindex\":[\"tabindexChanged\"],\"text\":[\"textChanged\"]}]]],[\"qds-select\",[[81,\"qds-select\",{\"size\":[1],\"autoComplete\":[1,\"autocomplete\"],\"disabled\":[4],\"form\":[1],\"length\":[2],\"multiple\":[4],\"name\":[1],\"options\":[16],\"required\":[4],\"selectedIndex\":[1026,\"selected-index\"],\"selectedOptions\":[16],\"type\":[1],\"validationMessage\":[1,\"validation-message\"],\"validity\":[16],\"value\":[1025],\"willValidate\":[4,\"will-validate\"],\"tabIndex\":[32]},[[0,\"click\",\"onClick\"]],{\"disabled\":[\"disabledChanged\"],\"selectedIndex\":[\"selectedIndexChanged\"],\"tabindex\":[\"tabindexChanged\"],\"required\":[\"validationChanged\"],\"value\":[\"validationChanged\"]}]]],[\"qds-standalone-link\",[[17,\"qds-standalone-link\",{\"disabled\":[4],\"iconName\":[1,\"icon-name\"],\"iconLibrary\":[1,\"icon-library\"],\"importance\":[1],\"size\":[1],\"visitable\":[4],\"download\":[8],\"href\":[1],\"hreflang\":[1],\"referrerPolicy\":[1,\"referrerpolicy\"],\"rel\":[1],\"target\":[1],\"linkIcon\":[32],\"tabIndex\":[32]},[[0,\"click\",\"onClick\"]],{\"disabled\":[\"disabledChanged\"],\"tabindex\":[\"tabindexChanged\"],\"href\":[\"hrefTargetChanged\"],\"target\":[\"hrefTargetChanged\"]}]]],[\"qds-dialog\",[[1,\"qds-dialog\",{\"open\":[1540],\"hasTitleSlot\":[32],\"hasFooterSlot\":[32]},null,{\"open\":[\"openChanged\"]}]]],[\"qds-dropdown\",[[1,\"qds-dropdown\",{\"autoUpdateOptions\":[16],\"disabled\":[4],\"flipOptions\":[16],\"noFlip\":[4,\"no-flip\"],\"noShift\":[4,\"no-shift\"],\"offsetOptions\":[16],\"placement\":[1],\"shiftOptions\":[16],\"strategy\":[1],\"target\":[1],\"hostAriaLabelledBy\":[32],\"hostDisplay\":[32],\"hostPosition\":[32],\"hostTransform\":[32],\"update\":[64]},[[4,\"click\",\"handleMouseDown\"]],{\"target\":[\"updateReferenceElement\"],\"flipOptions\":[\"updateMiddleware\"],\"noFlip\":[\"updateMiddleware\"],\"noShift\":[\"updateMiddleware\"],\"offsetOptions\":[\"updateMiddleware\"],\"shiftOptions\":[\"updateMiddleware\"],\"placement\":[\"updatePosition\"],\"strategy\":[\"updatePosition\"],\"autoUpdateOptions\":[\"startAutoUpdate\"]}]]],[\"qds-progress-bar\",[[65,\"qds-progress-bar\",{\"size\":[1],\"labels\":[16],\"max\":[8],\"position\":[2],\"value\":[8],\"width\":[32]},null,{\"max\":[\"maxChanged\"],\"value\":[\"valueChanged\"]}]]],[\"qds-switch\",[[81,\"qds-switch\",{\"inline\":[4],\"size\":[1],\"checked\":[1028],\"disabled\":[4],\"form\":[1],\"labels\":[16],\"name\":[1],\"value\":[8],\"validationMessage\":[1,\"validation-message\"],\"validity\":[16],\"willValidate\":[4,\"will-validate\"],\"tabIndex\":[32],\"inheritedAttributes\":[32]},[[0,\"click\",\"onClick\"]],{\"checked\":[\"checkedChanged\"],\"disabled\":[\"disabledChanged\"],\"tabindex\":[\"tabindexChanged\"],\"value\":[\"valueChanged\"]}]]],[\"qds-table\",[[1,\"qds-table\"]]],[\"qds-table-body\",[[1,\"qds-table-body\"]]],[\"qds-table-cell\",[[1,\"qds-table-cell\",{\"colSpan\":[2,\"colspan\"],\"rowSpan\":[2,\"rowspan\"]}]]],[\"qds-table-head\",[[1,\"qds-table-head\"]]],[\"qds-table-head-cell\",[[1,\"qds-table-head-cell\",{\"abbr\":[1],\"colSpan\":[2,\"colspan\"],\"rowSpan\":[2,\"rowspan\"],\"scope\":[1]}]]],[\"qds-table-row\",[[1,\"qds-table-row\"]]],[\"qds-textarea\",[[81,\"qds-textarea\",{\"size\":[1],\"autoComplete\":[1,\"autocomplete\"],\"cols\":[2],\"disabled\":[4],\"enterkeyhint\":[1],\"form\":[1],\"inputmode\":[1],\"labels\":[16],\"maxLength\":[2,\"maxlength\"],\"minLength\":[2,\"minlength\"],\"name\":[1],\"placeholder\":[1],\"required\":[4],\"rows\":[2],\"selectionDirection\":[1025,\"selection-direction\"],\"selectionEnd\":[1026,\"selection-end\"],\"selectionStart\":[1026,\"selection-start\"],\"validationMessage\":[1,\"validation-message\"],\"validity\":[16],\"value\":[1032],\"willValidate\":[4,\"will-validate\"],\"wrap\":[1],\"tabIndex\":[32]},[[0,\"click\",\"onClick\"]],{\"disabled\":[\"disabledChanged\"],\"selectionDirection\":[\"selectionDirectionChanged\"],\"selectionEnd\":[\"selectionEndChanged\"],\"selectionStart\":[\"selectionStartChanged\"],\"tabindex\":[\"tabindexChanged\"],\"maxLength\":[\"validationChanged\"],\"minLength\":[\"validationChanged\"],\"required\":[\"validationChanged\"],\"value\":[\"validationChanged\",\"valueChanged\"]}]]],[\"qds-checkbox\",[[81,\"qds-checkbox\",{\"inline\":[4],\"size\":[1],\"text\":[1],\"checked\":[1028],\"disabled\":[4],\"form\":[1],\"indeterminate\":[1028],\"name\":[1],\"required\":[4],\"validationMessage\":[1,\"validation-message\"],\"validity\":[16],\"value\":[8],\"willValidate\":[4,\"will-validate\"],\"checkboxOnly\":[4,\"checkbox-only\"],\"tabIndex\":[32]},[[0,\"click\",\"onClick\"]],{\"checked\":[\"checkedChanged\"],\"disabled\":[\"disabledChanged\"],\"tabindex\":[\"tabindexChanged\"],\"value\":[\"valueChanged\"]}]]],[\"qds-divider\",[[1,\"qds-divider\",{\"importance\":[1],\"vertical\":[4]},null,{\"vertical\":[\"verticalChanged\"]}]]],[\"qds-badge-counter_2\",[[1,\"qds-badge-counter\",{\"description\":[1],\"importance\":[1],\"size\":[1],\"strokeRing\":[4,\"stroke-ring\"],\"value\":[8]}],[1,\"qds-badge-indicator\",{\"description\":[1],\"size\":[1],\"status\":[1],\"strokeRing\":[4,\"stroke-ring\"]}]]],[\"qds-icon\",[[1,\"qds-icon\",{\"name\":[1],\"library\":[1],\"svg\":[32]},null,{\"name\":[\"setIcon\"],\"library\":[\"setIcon\"]}]]],[\"qds-button\",[[65,\"qds-button\",{\"action\":[1],\"badge\":[8],\"badgeDescription\":[1,\"badge-description\"],\"badgeIndicatorStatus\":[1,\"badge-indicator-status\"],\"iconName\":[1,\"icon-name\"],\"iconLibrary\":[1,\"icon-library\"],\"importance\":[1],\"size\":[1],\"text\":[1],\"iconOnly\":[4,\"icon-only\"],\"disabled\":[4],\"download\":[1],\"form\":[1],\"formAction\":[1,\"formaction\"],\"formMethod\":[1,\"formmethod\"],\"formNoValidate\":[4,\"formnovalidate\"],\"formTarget\":[1,\"formtarget\"],\"href\":[1],\"labels\":[16],\"rel\":[1],\"name\":[1],\"target\":[1],\"type\":[1],\"validationMessage\":[1,\"validation-message\"],\"validity\":[16],\"value\":[1],\"willValidate\":[4,\"will-validate\"],\"tooltip\":[32]},[[0,\"blur\",\"onBlur\"],[0,\"click\",\"onClick\"],[0,\"focus\",\"onFocus\"],[0,\"keydown\",\"onKeydown\"],[0,\"keyup\",\"onKeyup\"]],{\"disabled\":[\"disabledChanged\"],\"href\":[\"hrefChanged\"],\"tabindex\":[\"tabindexChanged\"],\"text\":[\"textChanged\"]}]]],[\"qds-tag_2\",[[1,\"qds-tag\",{\"iconName\":[1,\"icon-name\"],\"iconLibrary\":[1,\"icon-library\"],\"importance\":[1],\"status\":[1],\"size\":[1],\"text\":[1],\"iconDescription\":[1,\"icon-description\"],\"badge\":[4],\"badgeDescription\":[1,\"badge-description\"]}],[1,\"qds-title\",{\"alignment\":[1],\"iconName\":[1,\"icon-name\"],\"iconLibrary\":[1,\"icon-library\"],\"kicker\":[1],\"layer\":[1],\"level\":[1],\"subtitle\":[1],\"tag\":[1],\"variant\":[1]}]]],[\"qds-tooltip\",[[1,\"qds-tooltip\",{\"autoUpdateOptions\":[16],\"disabled\":[4],\"flipOptions\":[16],\"noFlip\":[4,\"no-flip\"],\"noShift\":[4,\"no-shift\"],\"offsetOptions\":[16],\"placement\":[1],\"shiftOptions\":[16],\"strategy\":[1],\"target\":[1],\"trigger\":[1],\"hostPosition\":[32],\"hostTransform\":[32],\"open\":[32],\"middleware\":[32],\"side\":[32],\"aStyles\":[32],\"aHeight\":[32],\"aGap\":[32],\"show\":[64],\"close\":[64],\"updateArrow\":[64]},null,{\"aGap\":[\"updateMiddleware\"],\"aHeight\":[\"updateMiddleware\"],\"flipOptions\":[\"updateMiddleware\"],\"noFlip\":[\"updateMiddleware\"],\"noShift\":[\"updateMiddleware\"],\"offsetOptions\":[\"updateMiddleware\"],\"shiftOptions\":[\"updateMiddleware\"],\"role\":[\"updateAriaHasPopup\"],\"open\":[\"setAriaExpanded\"],\"target\":[\"updateReferenceElement\"],\"trigger\":[\"updateEventListeners\"],\"middleware\":[\"updatePosition\"],\"placement\":[\"updatePosition\"],\"strategy\":[\"updatePosition\"],\"autoUpdateOptions\":[\"startAutoUpdate\"]}]]],[\"qds-label\",[[1,\"qds-label\",{\"inline\":[4],\"required\":[4],\"size\":[1],\"text\":[1],\"tooltip\":[32]},null,{\"text\":[\"textChanged\"]}]]]]"), options);
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
export { defineCustomElements };
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { r as registerInstance, a as readTask, h, F as Fragment } from './index-bc9462c1.js';
|
|
7
|
-
import { a as attachInternals, i as isOverflowing } from './helpers-
|
|
7
|
+
import { a as attachInternals, i as isOverflowing } from './helpers-10f68bf3.js';
|
|
8
8
|
|
|
9
9
|
const breadcrumbItemCss = ":host([hidden]){display:none!important}:host{display:inline-block}.qds-anchor{-webkit-text-decoration:none;text-decoration:none}.qds-anchor:hover{-webkit-text-decoration:underline;text-decoration:underline}.qds-breadcrumb-item{align-items:center;display:inline-flex;font:var(--qds-control-standard-text);gap:var(--qds-control-standard-gap-siblings-related);height:var(--qds-control-standard-height);width:inherit}.qds-divider{margin-inline:auto}.qds-overflow{line-height:normal;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.qds-anchor,.qds-breadcrumb-item{color:var(--qds-theme-control-text-standard)}.qds-anchor:focus-visible,.qds-breadcrumb-item: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)}";
|
|
10
10
|
const QdsBreadcrumbItemStyle0 = breadcrumbItemCss;
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { r as registerInstance, c as createEvent, a as readTask, h, d as getElement } from './index-bc9462c1.js';
|
|
7
|
-
import { p as pickFocusEventAttributes, i as isOverflowing } from './helpers-
|
|
7
|
+
import { p as pickFocusEventAttributes, i as isOverflowing } from './helpers-10f68bf3.js';
|
|
8
8
|
import { V as VALID_STATE, C as CUSTOM_ERROR_FLAGS, N as NO_ERROR_FLAGS } from './controls-a4768aaf.js';
|
|
9
9
|
|
|
10
|
-
const buttonCss = ":host([hidden]){display:none!important}:host{display:inline-block}.qds-button:disabled,.qds-disabled{opacity:var(--qds-theme-disabled);pointer-events:none}.qds-overflow{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.qds-overflow[data-size=hero]{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;white-space:normal}.qds-action{transform:scaleX(var(--qds-direction-factor,1))}.qds-container{display:grid;grid-template-areas:\"h\"}.qds-focus-ring{border-radius:max(1px,var(\n --qds-control-border-radius-top-left,var(--qds-control-border-radius)\n )) max(1px,var(\n --qds-control-border-radius-top-right,var(--qds-control-border-radius)\n )) max(1px,var(\n --qds-control-border-radius-bottom-right,var(--qds-control-border-radius)\n )) max(1px,var(\n --qds-control-border-radius-bottom-left,var(--qds-control-border-radius)\n ));grid-area:h;height:calc(100% + var(--qds-control-border-width) - var(--qds-control-border-width-block-end, var(--qds-control-border-width)));isolation:isolate;outline:var(--qds-theme-focus-border) solid var(--qds-focus-border-width);outline-offset:var(--qds-focus-border-offset);pointer-events:none;visibility:hidden;width:calc(100% + var(--qds-control-border-width) - var(\n --qds-control-border-width-inline-end,\n var(--qds-control-border-width)\n ))}:host(:focus-visible) .qds-focus-ring{visibility:visible}.qds-button{align-items:center;-webkit-appearance:none;appearance:none;background-color:initial;border:none;border-radius:var(\n --qds-control-border-radius-top-left,var(--qds-control-border-radius)\n ) var(--qds-control-border-radius-top-right,var(--qds-control-border-radius)) var(\n --qds-control-border-radius-bottom-right,var(--qds-control-border-radius)\n ) var(\n --qds-control-border-radius-bottom-left,var(--qds-control-border-radius)\n );box-sizing:border-box;cursor:pointer;display:inline-flex;grid-area:h;justify-content:center;min-width:0;outline:none;padding-block:0;position:relative;-webkit-print-color-adjust:exact;print-color-adjust:exact;text-align:center;-webkit-user-select:none;user-select:none}.qds-button:any-link{-webkit-text-decoration:none;text-decoration:none}.qds-icon{flex-shrink:0}.qds-indicator{inset-block-start:0;inset-inline-end:0;position:absolute;transform:translate(50%,-50%)}[data-size=small]{font:var(--qds-control-small-text)}.qds-button[data-size=small]{gap:var(--qds-control-small-gap-internal);height:var(--qds-control-small-height);padding-inline:var(--qds-control-button-small-padding-horizontal)}.qds-button.qds-icon-only[data-size=small]{width:var(--qds-control-small-height)}.qds-icon[data-size=small]{font-size:var(--qds-control-small-icon-size)}[data-size=standard]{font:var(--qds-control-standard-text)}.qds-button[data-size=standard]{gap:var(--qds-control-standard-gap-internal);height:var(--qds-control-standard-height);padding-inline:var(--qds-control-button-standard-padding-horizontal)}.qds-button.qds-icon-only[data-size=standard]{width:var(--qds-control-standard-height)}.qds-icon[data-size=standard]{font-size:var(--qds-control-standard-icon-size)}[data-size=large]{font:var(--qds-control-large-text)}.qds-button[data-size=large]{gap:var(--qds-control-large-gap-internal);height:var(--qds-control-large-height);padding-inline:var(--qds-control-button-large-padding-horizontal)}.qds-button.qds-icon-only[data-size=large]{width:var(--qds-control-large-height)}.qds-icon[data-size=large]{font-size:var(--qds-control-large-icon-size)}[data-size=large],[data-size=small],[data-size=standard]{line-height:normal}.qds-button.qds-icon-only[data-size=large],.qds-button.qds-icon-only[data-size=small],.qds-button.qds-icon-only[data-size=standard]{padding-inline:0}[data-size=hero]{font:var(--qds-control-hero-text)}.qds-button[data-size=hero]{border-radius:var(\n --qds-control-border-radius-top-left,var(--qds-control-hero-border-radius)\n ) var(\n --qds-control-border-radius-top-right,var(--qds-control-hero-border-radius)\n ) var(\n --qds-control-border-radius-bottom-right,var(--qds-control-hero-border-radius)\n ) var(\n --qds-control-border-radius-bottom-left,var(--qds-control-hero-border-radius)\n );gap:var(--qds-control-hero-gap-internal);padding-block:var(--qds-control-hero-padding-auto-height);padding-inline:var(--qds-control-button-hero-padding-horizontal)}.qds-button.qds-icon-only[data-size=hero]{height:var(--qds-control-hero-height);padding-inline:0;width:var(--qds-control-hero-height)}.qds-focus-ring[data-size=hero]{border-radius:max(1px,var(\n --qds-control-border-radius-top-left,var(--qds-control-hero-border-radius)\n )) max(1px,var(\n --qds-control-border-radius-top-right,var(--qds-control-hero-border-radius)\n )) max(1px,var(\n --qds-control-border-radius-bottom-right,var(--qds-control-hero-border-radius)\n )) max(1px,var(\n --qds-control-border-radius-bottom-left,var(--qds-control-hero-border-radius)\n ))}.qds-icon[data-size=hero]{font-size:var(--qds-control-hero-icon-size)}[data-importance=subdued]{color:var(--qds-theme-link-standard-default)}.qds-button[data-importance=subdued]{border-block-end:var(--qds-control-border-width) solid #0000;padding-inline:0}.qds-button[data-importance=subdued]:hover{border-block-end:var(--qds-control-border-width) solid var(--qds-theme-link-standard-hover);color:var(--qds-theme-link-standard-hover)}.qds-button[data-importance=subdued]:active{border-block-end:var(--qds-control-border-width) solid var(--qds-theme-link-standard-pressed);color:var(--qds-theme-link-standard-pressed)}.qds-button[data-importance=subdued]:not(.qds-icon-only){border-radius:0}.qds-button.qds-icon-only[data-importance=subdued]{border:none;color:var(--qds-theme-control-text-standard)}.qds-button.qds-icon-only[data-importance=subdued]:hover{background-color:var(--qds-theme-interactive-background-hover)}.qds-button.qds-icon-only[data-importance=subdued]:active{background-color:var(--qds-theme-interactive-background-pressed)}[data-importance=standard]{color:var(--qds-theme-control-text-standard)}.qds-button[data-importance=standard]{border-color:var(--qds-theme-control-border);border-style:solid;border-width:var(--qds-control-border-width) var(\n --qds-control-border-width-inline-end,var(--qds-control-border-width)\n ) var(--qds-control-border-width-block-end,var(--qds-control-border-width)) var(--qds-control-border-width)}.qds-button[data-importance=standard]:hover{background-color:var(--qds-theme-interactive-background-hover)}.qds-button[data-importance=standard]:active{background-color:var(--qds-theme-interactive-background-pressed)}.qds-button[data-importance=emphasized]{background-color:var(--qds-theme-signature-color-default);color:var(--qds-theme-signature-color-contrast)}.qds-button[data-importance=emphasized]:hover{background-color:var(--qds-theme-signature-color-hover)}.qds-button[data-importance=emphasized]:active{background-color:var(--qds-theme-signature-color-pressed)}.qds-button[data-importance=destructive]{background-color:var(--qds-theme-feedback-action-destructive-default);color:var(--qds-theme-feedback-action-destructive-contrast)}.qds-button[data-importance=destructive]:hover{background-color:var(--qds-theme-feedback-action-destructive-hover)}.qds-button[data-importance=destructive]:active{background-color:var(--qds-theme-feedback-action-destructive-pressed)}[data-importance=subdued-destructive]{color:var(--qds-theme-feedback-action-destructive-default)}.qds-button[data-importance=subdued-destructive]{border-block-end:var(--qds-control-border-width) solid #0000;padding-inline:0}.qds-button[data-importance=subdued-destructive]:hover{border-block-end:var(--qds-control-border-width) solid var(--qds-theme-feedback-action-destructive-hover);color:var(--qds-theme-feedback-action-destructive-hover)}.qds-button[data-importance=subdued-destructive]:active{border-block-end:var(--qds-control-border-width) solid var(--qds-theme-feedback-action-destructive-pressed);color:var(--qds-theme-feedback-action-destructive-pressed)}.qds-button[data-importance=subdued-destructive]:not(.qds-icon-only){border-radius:0}.qds-button.qds-icon-only[data-importance=subdued-destructive]{border:none}.qds-button.qds-icon-only[data-importance=subdued-destructive]:hover{background-color:var(--qds-theme-interactive-background-hover);color:var(--qds-theme-feedback-action-destructive-default)}.qds-button.qds-icon-only[data-importance=subdued-destructive]:active{background-color:var(--qds-theme-interactive-background-pressed);color:var(--qds-theme-feedback-action-destructive-default)}:is([data-action=dropdown],[data-action=dropdown-close]) .qds-action{margin-inline-start:auto;transition-duration:.3s;transition-property:transform}[data-importance=standard]:is([data-action=dropdown],[data-action=dropdown-close]){background-color:var(--qds-theme-control-input-background)}:is([data-action=dropdown],[data-action=dropdown-close]):not([data-importance=subdued]):not([data-importance=subdued-destructive]){padding-inline:var(--qds-control-input-padding-horizontal)}[data-action=dropdown-close] .qds-action{transform:rotate(-180deg)}";
|
|
10
|
+
const buttonCss = ":host([hidden]){display:none!important}:host{display:inline-block;outline:none}.qds-button:disabled,.qds-disabled{opacity:var(--qds-theme-disabled);pointer-events:none}.qds-overflow{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.qds-overflow[data-size=hero]{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;white-space:normal}.qds-action{transform:scaleX(var(--qds-direction-factor,1))}.qds-container{display:grid;grid-template-areas:\"h\"}.qds-focus-ring{border-radius:max(1px,var(\n --qds-control-border-radius-top-left,var(--qds-control-border-radius)\n )) max(1px,var(\n --qds-control-border-radius-top-right,var(--qds-control-border-radius)\n )) max(1px,var(\n --qds-control-border-radius-bottom-right,var(--qds-control-border-radius)\n )) max(1px,var(\n --qds-control-border-radius-bottom-left,var(--qds-control-border-radius)\n ));grid-area:h;height:calc(100% + var(--qds-control-border-width) - var(--qds-control-border-width-block-end, var(--qds-control-border-width)));isolation:isolate;outline:var(--qds-theme-focus-border) solid var(--qds-focus-border-width);outline-offset:var(--qds-focus-border-offset);pointer-events:none;visibility:hidden;width:calc(100% + var(--qds-control-border-width) - var(\n --qds-control-border-width-inline-end,\n var(--qds-control-border-width)\n ))}:host(:focus-visible) .qds-focus-ring{visibility:visible}.qds-button{align-items:center;-webkit-appearance:none;appearance:none;background-color:initial;border:none;border-radius:var(\n --qds-control-border-radius-top-left,var(--qds-control-border-radius)\n ) var(--qds-control-border-radius-top-right,var(--qds-control-border-radius)) var(\n --qds-control-border-radius-bottom-right,var(--qds-control-border-radius)\n ) var(\n --qds-control-border-radius-bottom-left,var(--qds-control-border-radius)\n );box-sizing:border-box;cursor:pointer;display:inline-flex;grid-area:h;justify-content:center;min-width:0;outline:none;padding-block:0;position:relative;-webkit-print-color-adjust:exact;print-color-adjust:exact;text-align:center;-webkit-user-select:none;user-select:none}.qds-button:any-link{-webkit-text-decoration:none;text-decoration:none}.qds-icon{flex-shrink:0}.qds-indicator{inset-block-start:0;inset-inline-end:0;position:absolute;transform:translate(50%,-50%)}[data-size=small]{font:var(--qds-control-small-text)}.qds-button[data-size=small]{gap:var(--qds-control-small-gap-internal);height:var(--qds-control-small-height);padding-inline:var(--qds-control-button-small-padding-horizontal)}.qds-button.qds-icon-only[data-size=small]{width:var(--qds-control-small-height)}.qds-icon[data-size=small]{font-size:var(--qds-control-small-icon-size)}[data-size=standard]{font:var(--qds-control-standard-text)}.qds-button[data-size=standard]{gap:var(--qds-control-standard-gap-internal);height:var(--qds-control-standard-height);padding-inline:var(--qds-control-button-standard-padding-horizontal)}.qds-button.qds-icon-only[data-size=standard]{width:var(--qds-control-standard-height)}.qds-icon[data-size=standard]{font-size:var(--qds-control-standard-icon-size)}[data-size=large]{font:var(--qds-control-large-text)}.qds-button[data-size=large]{gap:var(--qds-control-large-gap-internal);height:var(--qds-control-large-height);padding-inline:var(--qds-control-button-large-padding-horizontal)}.qds-button.qds-icon-only[data-size=large]{width:var(--qds-control-large-height)}.qds-icon[data-size=large]{font-size:var(--qds-control-large-icon-size)}[data-size=large],[data-size=small],[data-size=standard]{line-height:normal}.qds-button.qds-icon-only[data-size=large],.qds-button.qds-icon-only[data-size=small],.qds-button.qds-icon-only[data-size=standard]{padding-inline:0}[data-size=hero]{font:var(--qds-control-hero-text)}.qds-button[data-size=hero]{border-radius:var(\n --qds-control-border-radius-top-left,var(--qds-control-hero-border-radius)\n ) var(\n --qds-control-border-radius-top-right,var(--qds-control-hero-border-radius)\n ) var(\n --qds-control-border-radius-bottom-right,var(--qds-control-hero-border-radius)\n ) var(\n --qds-control-border-radius-bottom-left,var(--qds-control-hero-border-radius)\n );gap:var(--qds-control-hero-gap-internal);padding-block:var(--qds-control-hero-padding-auto-height);padding-inline:var(--qds-control-button-hero-padding-horizontal)}.qds-button.qds-icon-only[data-size=hero]{height:var(--qds-control-hero-height);padding-inline:0;width:var(--qds-control-hero-height)}.qds-focus-ring[data-size=hero]{border-radius:max(1px,var(\n --qds-control-border-radius-top-left,var(--qds-control-hero-border-radius)\n )) max(1px,var(\n --qds-control-border-radius-top-right,var(--qds-control-hero-border-radius)\n )) max(1px,var(\n --qds-control-border-radius-bottom-right,var(--qds-control-hero-border-radius)\n )) max(1px,var(\n --qds-control-border-radius-bottom-left,var(--qds-control-hero-border-radius)\n ))}.qds-icon[data-size=hero]{font-size:var(--qds-control-hero-icon-size)}[data-importance=subdued]{color:var(--qds-theme-link-standard-default)}.qds-button[data-importance=subdued]{border-block-end:var(--qds-control-border-width) solid #0000;padding-inline:0}.qds-button[data-importance=subdued]:hover{border-block-end:var(--qds-control-border-width) solid var(--qds-theme-link-standard-hover);color:var(--qds-theme-link-standard-hover)}.qds-button[data-importance=subdued]:active{border-block-end:var(--qds-control-border-width) solid var(--qds-theme-link-standard-pressed);color:var(--qds-theme-link-standard-pressed)}.qds-button[data-importance=subdued]:not(.qds-icon-only){border-radius:0}.qds-button.qds-icon-only[data-importance=subdued]{border:none;color:var(--qds-theme-control-text-standard)}.qds-button.qds-icon-only[data-importance=subdued]:hover{background-color:var(--qds-theme-interactive-background-hover)}.qds-button.qds-icon-only[data-importance=subdued]:active{background-color:var(--qds-theme-interactive-background-pressed)}[data-importance=standard]{color:var(--qds-theme-control-text-standard)}.qds-button[data-importance=standard]{border-color:var(--qds-theme-control-border);border-style:solid;border-width:var(--qds-control-border-width) var(\n --qds-control-border-width-inline-end,var(--qds-control-border-width)\n ) var(--qds-control-border-width-block-end,var(--qds-control-border-width)) var(--qds-control-border-width)}.qds-button[data-importance=standard]:hover{background-color:var(--qds-theme-interactive-background-hover)}.qds-button[data-importance=standard]:active{background-color:var(--qds-theme-interactive-background-pressed)}.qds-button[data-importance=emphasized]{background-color:var(--qds-theme-signature-color-default);color:var(--qds-theme-signature-color-contrast)}.qds-button[data-importance=emphasized]:hover{background-color:var(--qds-theme-signature-color-hover)}.qds-button[data-importance=emphasized]:active{background-color:var(--qds-theme-signature-color-pressed)}.qds-button[data-importance=destructive]{background-color:var(--qds-theme-feedback-action-destructive-default);color:var(--qds-theme-feedback-action-destructive-contrast)}.qds-button[data-importance=destructive]:hover{background-color:var(--qds-theme-feedback-action-destructive-hover)}.qds-button[data-importance=destructive]:active{background-color:var(--qds-theme-feedback-action-destructive-pressed)}[data-importance=subdued-destructive]{color:var(--qds-theme-feedback-action-destructive-default)}.qds-button[data-importance=subdued-destructive]{border-block-end:var(--qds-control-border-width) solid #0000;padding-inline:0}.qds-button[data-importance=subdued-destructive]:hover{border-block-end:var(--qds-control-border-width) solid var(--qds-theme-feedback-action-destructive-hover);color:var(--qds-theme-feedback-action-destructive-hover)}.qds-button[data-importance=subdued-destructive]:active{border-block-end:var(--qds-control-border-width) solid var(--qds-theme-feedback-action-destructive-pressed);color:var(--qds-theme-feedback-action-destructive-pressed)}.qds-button[data-importance=subdued-destructive]:not(.qds-icon-only){border-radius:0}.qds-button.qds-icon-only[data-importance=subdued-destructive]{border:none}.qds-button.qds-icon-only[data-importance=subdued-destructive]:hover{background-color:var(--qds-theme-interactive-background-hover);color:var(--qds-theme-feedback-action-destructive-default)}.qds-button.qds-icon-only[data-importance=subdued-destructive]:active{background-color:var(--qds-theme-interactive-background-pressed);color:var(--qds-theme-feedback-action-destructive-default)}:is([data-action=dropdown],[data-action=dropdown-close]) .qds-action{margin-inline-start:auto;transition-duration:.3s;transition-property:transform}[data-importance=standard]:is([data-action=dropdown],[data-action=dropdown-close]){background-color:var(--qds-theme-control-input-background)}:is([data-action=dropdown],[data-action=dropdown-close]):not([data-importance=subdued]):not([data-importance=subdued-destructive]){padding-inline:var(--qds-control-input-padding-horizontal)}[data-action=dropdown-close] .qds-action{transform:rotate(-180deg)}";
|
|
11
11
|
const QdsButtonStyle0 = buttonCss;
|
|
12
12
|
|
|
13
13
|
// SPDX-FileCopyrightText: © 2024 Schneider Electric
|
|
@@ -270,6 +270,7 @@ const Button = class {
|
|
|
270
270
|
__classPrivateFieldGet(this, _Button_instances, "m", _Button_defineGetter).call(this, 'labels', () => this.internals.labels);
|
|
271
271
|
this.hrefChanged();
|
|
272
272
|
this.tabindexChanged(this.host.getAttribute('tabindex') ?? '0');
|
|
273
|
+
this.disabledChanged();
|
|
273
274
|
}
|
|
274
275
|
componentDidLoad() {
|
|
275
276
|
this.textChanged();
|
|
@@ -284,16 +285,16 @@ const Button = class {
|
|
|
284
285
|
const ariaLabel = hasBadgeProperties
|
|
285
286
|
? `${this.text} ${this.badge} ${this.badgeDescription}`
|
|
286
287
|
: this.text;
|
|
287
|
-
return (h("div", { key: '
|
|
288
|
+
return (h("div", { key: '702708f8e1fb763ff5eb1c6cc66ee85a861481f7', class: "qds-container", onClick: __classPrivateFieldGet(this, _Button_onClick, "f"), onKeyDown: preventDefault, onKeyUp: preventDefault, onKeyPress: preventDefault, "aria-hidden": "true" }, h(Tag, { key: '1682ff00575959f79b05b33a7d7c0b35a75a34fe', class: {
|
|
288
289
|
'qds-button': true,
|
|
289
290
|
'qds-disabled': Tag === 'a' ? __classPrivateFieldGet(this, _Button_instances, "a", _Button_computedDisabled_get) : false,
|
|
290
291
|
'qds-icon-only': __classPrivateFieldGet(this, _Button_instances, "a", _Button_iconOnly_get),
|
|
291
|
-
}, "data-importance": __classPrivateFieldGet(this, _Button_instances, "a", _Button_computedImportance_get), "data-size": __classPrivateFieldGet(this, _Button_instances, "a", _Button_computedSize_get), "data-action": __classPrivateFieldGet(this, _Button_instances, "a", _Button_computedAction_get), disabled: Tag === 'a' ? undefined : this.disabled, download: Tag === 'a' ? this.download : undefined, formAction: this.formAction, formMethod: this.formMethod, formNoValidate: this.formNoValidate, formTarget: this.formTarget, href: Tag === 'a' ? this.href : undefined, name: Tag === 'a' ? undefined : this.name, ref: __classPrivateFieldGet(this, _Button_buttonRef, "f"), rel: Tag === 'a' ? this.rel : undefined, tabIndex: -1, target: Tag === 'a' ? this.target : undefined, type: Tag === 'a' ? undefined : __classPrivateFieldGet(this, _Button_instances, "a", _Button_buttonType_get), value: Tag === 'a' ? undefined : this.value, "aria-label": __classPrivateFieldGet(this, _Button_instances, "a", _Button_iconOnly_get) ? ariaLabel : undefined }, this.iconName !== undefined && this.iconName !== '' && (h("qds-icon", { key: '
|
|
292
|
+
}, "data-importance": __classPrivateFieldGet(this, _Button_instances, "a", _Button_computedImportance_get), "data-size": __classPrivateFieldGet(this, _Button_instances, "a", _Button_computedSize_get), "data-action": __classPrivateFieldGet(this, _Button_instances, "a", _Button_computedAction_get), disabled: Tag === 'a' ? undefined : this.disabled, download: Tag === 'a' ? this.download : undefined, formAction: this.formAction, formMethod: this.formMethod, formNoValidate: this.formNoValidate, formTarget: this.formTarget, href: Tag === 'a' ? this.href : undefined, name: Tag === 'a' ? undefined : this.name, ref: __classPrivateFieldGet(this, _Button_buttonRef, "f"), rel: Tag === 'a' ? this.rel : undefined, tabIndex: -1, target: Tag === 'a' ? this.target : undefined, type: Tag === 'a' ? undefined : __classPrivateFieldGet(this, _Button_instances, "a", _Button_buttonType_get), value: Tag === 'a' ? undefined : this.value, "aria-label": __classPrivateFieldGet(this, _Button_instances, "a", _Button_iconOnly_get) ? ariaLabel : undefined }, this.iconName !== undefined && this.iconName !== '' && (h("qds-icon", { key: 'd75c65f24d52d8f4a8a99dfa8f435297dd399efe', class: "qds-icon", "data-size": __classPrivateFieldGet(this, _Button_instances, "a", _Button_computedSize_get), library: this.iconLibrary, name: this.iconName })), !__classPrivateFieldGet(this, _Button_instances, "a", _Button_iconOnly_get) && (h("span", { key: 'b2fe2406ca354bf34e81fa9395d206fe66d57ab9', class: "qds-overflow", "data-size": __classPrivateFieldGet(this, _Button_instances, "a", _Button_computedSize_get), ref: __classPrivateFieldGet(this, _Button_spanRef, "f") }, this.text)), isIndicator(this.badge) && (h("qds-badge-indicator", { key: '28e28dfb47cfc2f8febd023723240538412df388', class: "qds-indicator", status: this.badgeIndicatorStatus, description: this.badgeDescription, size: __classPrivateFieldGet(this, _Button_instances, "a", _Button_computedSize_get), strokeRing: true })), isCounter(this.badge) && (h("qds-badge-counter", { key: '781cab4817e2ae4ea96e19b1b2b4948f6e57992d', class: {
|
|
292
293
|
'qds-indicator': __classPrivateFieldGet(this, _Button_instances, "a", _Button_iconOnly_get),
|
|
293
|
-
}, description: this.badgeDescription, importance: __classPrivateFieldGet(this, _Button_instances, "a", _Button_computedImportance_get), size: __classPrivateFieldGet(this, _Button_instances, "a", _Button_computedSize_get), strokeRing: true, value: this.badge })), __classPrivateFieldGet(this, _Button_instances, "a", _Button_computedActionIcon_get) !== undefined && (h("qds-icon", { key: '
|
|
294
|
+
}, description: this.badgeDescription, importance: __classPrivateFieldGet(this, _Button_instances, "a", _Button_computedImportance_get), size: __classPrivateFieldGet(this, _Button_instances, "a", _Button_computedSize_get), strokeRing: true, value: this.badge })), __classPrivateFieldGet(this, _Button_instances, "a", _Button_computedActionIcon_get) !== undefined && (h("qds-icon", { key: '2aa8501f50cbcc504ee544b4ee0826bd069b958a', class: "qds-icon qds-action", "data-size": __classPrivateFieldGet(this, _Button_instances, "a", _Button_computedSize_get), library: "core", name: __classPrivateFieldGet(this, _Button_instances, "a", _Button_computedActionIcon_get) }))), h("div", { key: 'cda54b0026742813a2469b613ddc494a4a546755', class: {
|
|
294
295
|
'qds-focus-ring': true,
|
|
295
296
|
'qds-icon-only': __classPrivateFieldGet(this, _Button_instances, "a", _Button_iconOnly_get),
|
|
296
|
-
}, "data-importance": __classPrivateFieldGet(this, _Button_instances, "a", _Button_computedImportance_get), "data-size": __classPrivateFieldGet(this, _Button_instances, "a", _Button_computedSize_get) }), this.tooltip && (h("qds-tooltip", { key: '
|
|
297
|
+
}, "data-importance": __classPrivateFieldGet(this, _Button_instances, "a", _Button_computedImportance_get), "data-size": __classPrivateFieldGet(this, _Button_instances, "a", _Button_computedSize_get) }), this.tooltip && (h("qds-tooltip", { key: '80ef7d7cba1108a521dcbd88576933a2eb6589e5', ref: __classPrivateFieldGet(this, _Button_tooltipRef, "f") }, this.text))));
|
|
297
298
|
}
|
|
298
299
|
static get formAssociated() { return true; }
|
|
299
300
|
get host() { return getElement(this); }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"qds-button.entry.js","mappings":";;;;;;;;;AAAA,MAAM,SAAS,GAAG,uiSAAuiS,CAAC;AAC1jS,wBAAe,SAAS;;ACDxB;AACA;AACA;;;;;;;;;;;;;;;;;;AAgCA,MAAM,SAAS,GAAG,CAAC,KAAc,KAC/B,OAAO,KAAK,KAAK,QAAQ;MACrB,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;MACvC,OAAO,KAAK,KAAK,QAAQ,CAAA;AAE/B,MAAM,WAAW,GAAG,CAAC,KAAc,KACjC,KAAK,KAAK,EAAE,IAAI,KAAK,KAAK,IAAI,CAAA;AAEhC,MAAM,cAAc,GAAG,CAAC,KAAiC;IACvD,KAAK,CAAC,cAAc,EAAE,CAAA;AACxB,CAAC,CAAA;MAgBY,MAAM;IANnB;;;;;;;;;;;;;;;QA8BkB,yBAAoB,GAClC,SAAS,CAAA;;;;QAYa,gBAAW,GAAW,SAAS,CAAA;;;;QAK/B,eAAU,GAAsB,UAAU,CAAA;;;;QAK1C,SAAI,GAAmB,UAAU,CAAA;;;;QAUjC,aAAQ,GAAY,KAAK,CAAA;;;;;;;;;;;;;;;;;;QAoCzB,SAAI,GAAsC,IAAI,CAAA;;;;;;;;;;;QA8CtD,mBAAc,GAAY,KAAK,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;QA4B/B,eAAU,GAAuC,OAAO,CAAA;;;;;;;;;;QAmBhD,WAAM,GAC5B,EAAgC,CAAA;;;;;;QAOV,QAAG,GAAY,UAAU,CAAA;;;;;;;;QAsDjC,sBAAiB,GAA0C,EAAE,CAAA;;;;;;;;;QAUrD,aAAQ,GAAiC,WAAW,CAAA;;;;;;;;QAkBpD,iBAAY,GAAqC,KAAK,CAAA;QAgB7D,YAAO,GAAG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,CAAA;AACjC,CAAC;IAGC,QAAQ,IAAI,CAAC,MAAM;QACjB,KAAK,UAAU,CAAC;QAChB,KAAK,gBAAgB,CAAC;QACtB,KAAK,MAAM,EAAE;YACX,OAAO,IAAI,CAAC,MAAM,CAAA;SACnB;QACD,SAAS;YACP,OAAO,SAAS,CAAA;SACjB;KACF;AACH,CAAC;IAGC,QAAQ,IAAI,CAAC,MAAM;QACjB,KAAK,UAAU,CAAC;QAChB,KAAK,MAAM,EAAE;YACX,OAAO,IAAI,CAAC,MAAM,CAAA;SACnB;QACD,KAAK,gBAAgB,EAAE;YACrB,OAAO,UAAU,CAAA;SAClB;QACD,SAAS;YACP,OAAO,SAAS,CAAA;SACjB;KACF;AACH,CAAC;IAGC,OAAO,IAAI,CAAC,QAAQ,IAAI,KAAK,CAAA;AAC/B,CAAC;IAGC,QAAQ,IAAI,CAAC,UAAU;QACrB,KAAK,YAAY,CAAC;QAClB,KAAK,SAAS,CAAC;QACf,KAAK,aAAa,CAAC;QACnB,KAAK,qBAAqB,EAAE;YAC1B,OAAO,IAAI,CAAC,UAAU,CAAA;SACvB;QACD,SAAS;YACP,OAAO,UAAU,CAAA;SAClB;KACF;AACH,CAAC;IAGC,QAAQ,IAAI,CAAC,IAAI;QACf,KAAK,OAAO,CAAC;QACb,KAAK,OAAO,CAAC;QACb,KAAK,MAAM,EAAE;YACX,OAAO,IAAI,CAAC,IAAI,CAAA;SACjB;QACD,SAAS;YACP,OAAO,UAAU,CAAA;SAClB;KACF;AACH,CAAC,uDAkPa,CAAc,EAAE,GAAkB;IAC9C,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAA;AAChE,CAAC;;;;;","names":[],"sources":["src/components/button/button.css?tag=qds-button&encapsulation=shadow","src/components/button/button.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: © 2024 Schneider Electric\n *\n * SPDX-License-Identifier: Apache-2.0\n */\n\n@import url('../shared.css');\n\n:host {\n display: inline-block;\n}\n\n.qds-button:disabled,\n.qds-disabled {\n opacity: var(--qds-theme-disabled);\n pointer-events: none;\n}\n\n.qds-overflow {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n\n &[data-size='hero'] {\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n white-space: normal;\n }\n}\n\n.qds-action {\n transform: scaleX(var(--qds-direction-factor, 1));\n}\n\n.qds-container {\n display: grid;\n grid-template-areas: 'button';\n}\n\n.qds-focus-ring {\n border-radius: max(\n 1px,\n var(\n --qds-control-border-radius-top-left,\n var(--qds-control-border-radius)\n )\n )\n max(\n 1px,\n var(\n --qds-control-border-radius-top-right,\n var(--qds-control-border-radius)\n )\n )\n max(\n 1px,\n var(\n --qds-control-border-radius-bottom-right,\n var(--qds-control-border-radius)\n )\n )\n max(\n 1px,\n var(\n --qds-control-border-radius-bottom-left,\n var(--qds-control-border-radius)\n )\n );\n grid-area: button;\n isolation: isolate;\n outline: var(--qds-theme-focus-border) solid var(--qds-focus-border-width);\n outline-offset: var(--qds-focus-border-offset);\n pointer-events: none;\n visibility: hidden;\n width: calc(\n 100% + var(--qds-control-border-width) -\n var(\n --qds-control-border-width-inline-end,\n var(--qds-control-border-width)\n )\n );\n height: calc(\n 100% + var(--qds-control-border-width) -\n var(--qds-control-border-width-block-end, var(--qds-control-border-width))\n );\n}\n\n:host(:focus-visible) .qds-focus-ring {\n visibility: visible;\n}\n\n.qds-button {\n position: relative;\n align-items: center;\n appearance: none;\n\n /* Avoid automatic minimum size on flex element: https://www.w3.org/TR/css-flexbox-1/#min-size-auto */\n min-width: 0;\n background-color: initial;\n border: none;\n border-radius: var(\n --qds-control-border-radius-top-left,\n var(--qds-control-border-radius)\n )\n var(--qds-control-border-radius-top-right, var(--qds-control-border-radius))\n var(\n --qds-control-border-radius-bottom-right,\n var(--qds-control-border-radius)\n )\n var(\n --qds-control-border-radius-bottom-left,\n var(--qds-control-border-radius)\n );\n box-sizing: border-box;\n cursor: pointer;\n display: inline-flex;\n grid-area: button;\n justify-content: center;\n outline: none;\n padding-block: 0;\n print-color-adjust: exact;\n text-align: center;\n user-select: none;\n\n &:any-link {\n text-decoration: none;\n }\n}\n\n.qds-icon {\n flex-shrink: 0;\n}\n\n.qds-indicator {\n position: absolute;\n inset-block-start: 0;\n inset-inline-end: 0;\n transform: translate(50%, -50%);\n}\n\n[data-size='small'] {\n font: var(--qds-control-small-text);\n\n &.qds-button {\n gap: var(--qds-control-small-gap-internal);\n height: var(--qds-control-small-height);\n padding-inline: var(--qds-control-button-small-padding-horizontal);\n\n &.qds-icon-only {\n width: var(--qds-control-small-height);\n }\n }\n\n &.qds-icon {\n font-size: var(--qds-control-small-icon-size);\n }\n}\n\n[data-size='standard'] {\n font: var(--qds-control-standard-text);\n\n &.qds-button {\n gap: var(--qds-control-standard-gap-internal);\n height: var(--qds-control-standard-height);\n padding-inline: var(--qds-control-button-standard-padding-horizontal);\n\n &.qds-icon-only {\n width: var(--qds-control-standard-height);\n }\n }\n\n &.qds-icon {\n font-size: var(--qds-control-standard-icon-size);\n }\n}\n\n[data-size='large'] {\n font: var(--qds-control-large-text);\n\n &.qds-button {\n gap: var(--qds-control-large-gap-internal);\n height: var(--qds-control-large-height);\n padding-inline: var(--qds-control-button-large-padding-horizontal);\n\n &.qds-icon-only {\n width: var(--qds-control-large-height);\n }\n }\n\n &.qds-icon {\n font-size: var(--qds-control-large-icon-size);\n }\n}\n\n[data-size='small'],\n[data-size='standard'],\n[data-size='large'] {\n line-height: normal;\n\n &.qds-button.qds-icon-only {\n padding-inline: 0;\n }\n}\n\n[data-size='hero'] {\n font: var(--qds-control-hero-text);\n\n &.qds-button {\n border-radius: var(\n --qds-control-border-radius-top-left,\n var(--qds-control-hero-border-radius)\n )\n var(\n --qds-control-border-radius-top-right,\n var(--qds-control-hero-border-radius)\n )\n var(\n --qds-control-border-radius-bottom-right,\n var(--qds-control-hero-border-radius)\n )\n var(\n --qds-control-border-radius-bottom-left,\n var(--qds-control-hero-border-radius)\n );\n gap: var(--qds-control-hero-gap-internal);\n padding-block: var(--qds-control-hero-padding-auto-height);\n padding-inline: var(--qds-control-button-hero-padding-horizontal);\n\n &.qds-icon-only {\n height: var(--qds-control-hero-height);\n padding-inline: 0;\n width: var(--qds-control-hero-height);\n }\n }\n\n &.qds-focus-ring {\n border-radius: max(\n 1px,\n var(\n --qds-control-border-radius-top-left,\n var(--qds-control-hero-border-radius)\n )\n )\n max(\n 1px,\n var(\n --qds-control-border-radius-top-right,\n var(--qds-control-hero-border-radius)\n )\n )\n max(\n 1px,\n var(\n --qds-control-border-radius-bottom-right,\n var(--qds-control-hero-border-radius)\n )\n )\n max(\n 1px,\n var(\n --qds-control-border-radius-bottom-left,\n var(--qds-control-hero-border-radius)\n )\n );\n }\n\n &.qds-icon {\n font-size: var(--qds-control-hero-icon-size);\n }\n}\n\n[data-importance='subdued'] {\n color: var(--qds-theme-link-standard-default);\n\n &.qds-button {\n border-block-end: var(--qds-control-border-width) solid transparent;\n padding-inline: 0;\n\n &:hover {\n border-block-end: var(--qds-control-border-width) solid\n var(--qds-theme-link-standard-hover);\n color: var(--qds-theme-link-standard-hover);\n }\n\n &:active {\n border-block-end: var(--qds-control-border-width) solid\n var(--qds-theme-link-standard-pressed);\n color: var(--qds-theme-link-standard-pressed);\n }\n\n &:not(.qds-icon-only) {\n border-radius: 0;\n }\n\n &.qds-icon-only {\n border: none;\n color: var(--qds-theme-control-text-standard);\n\n &:hover {\n background-color: var(--qds-theme-interactive-background-hover);\n }\n\n &:active {\n background-color: var(--qds-theme-interactive-background-pressed);\n }\n }\n }\n}\n\n[data-importance='standard'] {\n color: var(--qds-theme-control-text-standard);\n\n &.qds-button {\n border-color: var(--qds-theme-control-border);\n border-style: solid;\n border-width: var(--qds-control-border-width)\n var(\n --qds-control-border-width-inline-end,\n var(--qds-control-border-width)\n )\n var(--qds-control-border-width-block-end, var(--qds-control-border-width))\n var(--qds-control-border-width);\n\n &:hover {\n background-color: var(--qds-theme-interactive-background-hover);\n }\n\n &:active {\n background-color: var(--qds-theme-interactive-background-pressed);\n }\n }\n}\n\n[data-importance='emphasized'] {\n &.qds-button {\n background-color: var(--qds-theme-signature-color-default);\n color: var(--qds-theme-signature-color-contrast);\n\n &:hover {\n background-color: var(--qds-theme-signature-color-hover);\n }\n\n &:active {\n background-color: var(--qds-theme-signature-color-pressed);\n }\n }\n}\n\n[data-importance='destructive'] {\n &.qds-button {\n background-color: var(--qds-theme-feedback-action-destructive-default);\n color: var(--qds-theme-feedback-action-destructive-contrast);\n\n &:hover {\n background-color: var(--qds-theme-feedback-action-destructive-hover);\n }\n\n &:active {\n background-color: var(--qds-theme-feedback-action-destructive-pressed);\n }\n }\n}\n\n[data-importance='subdued-destructive'] {\n color: var(--qds-theme-feedback-action-destructive-default);\n\n &.qds-button {\n border-block-end: var(--qds-control-border-width) solid transparent;\n padding-inline: 0;\n\n &:hover {\n border-block-end: var(--qds-control-border-width) solid\n var(--qds-theme-feedback-action-destructive-hover);\n color: var(--qds-theme-feedback-action-destructive-hover);\n }\n\n &:active {\n border-block-end: var(--qds-control-border-width) solid\n var(--qds-theme-feedback-action-destructive-pressed);\n color: var(--qds-theme-feedback-action-destructive-pressed);\n }\n\n &:not(.qds-icon-only) {\n border-radius: 0;\n }\n\n &.qds-icon-only {\n border: none;\n\n &:hover {\n background-color: var(--qds-theme-interactive-background-hover);\n color: var(--qds-theme-feedback-action-destructive-default);\n }\n\n &:active {\n background-color: var(--qds-theme-interactive-background-pressed);\n color: var(--qds-theme-feedback-action-destructive-default);\n }\n }\n }\n}\n\n:is([data-action='dropdown'], [data-action='dropdown-close']) {\n .qds-action {\n margin-inline-start: auto;\n transition-duration: 0.3s;\n transition-property: transform;\n }\n\n &[data-importance='standard'] {\n background-color: var(--qds-theme-control-input-background);\n }\n\n &:not([data-importance='subdued'], [data-importance='subdued-destructive']) {\n padding-inline: var(--qds-control-input-padding-horizontal);\n }\n}\n\n[data-action='dropdown-close'] .qds-action {\n transform: rotate(-180deg);\n}\n","// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { ComponentInterface, EventEmitter } from '@stencil/core'\nimport {\n AttachInternals,\n Component,\n Element,\n Event,\n h,\n Listen,\n Prop,\n readTask,\n State,\n Watch,\n} from '@stencil/core'\nimport type { LiteralUnion } from 'type-fest'\n\nimport type { QdsFocusEventDetail } from '../../helpers'\nimport { isOverflowing, pickFocusEventAttributes } from '../../helpers'\nimport { CUSTOM_ERROR_FLAGS, NO_ERROR_FLAGS, VALID_STATE } from '../controls'\nimport type { Importance, Size } from '../shared'\n\nexport type Action = 'dropdown-close' | 'dropdown' | 'next'\nexport type ButtonImportance =\n | Importance\n | 'destructive'\n | 'subdued-destructive'\nexport type ButtonSize = Size | 'hero'\nexport type ButtonTarget = '_blank' | '_parent' | '_self' | '_top'\nexport type ButtonType = 'button' | 'reset' | 'submit'\nexport type FormMethod = 'dialog' | 'get' | 'post'\n\nconst isCounter = (value: unknown): value is number =>\n typeof value === 'string'\n ? !Number.isNaN(Number.parseFloat(value))\n : typeof value === 'number'\n\nconst isIndicator = (value: unknown): value is '' | true =>\n value === '' || value === true\n\nconst preventDefault = (event: KeyboardEvent | MouseEvent): void => {\n event.preventDefault()\n}\n/**\n * The `<qds-button>` element is an interactive element activated by a user\n * with a mouse, keyboard, finger, voice command, or other assistive technology.\n * Once activated, it then performs a programmable action, such as submitting a\n * [form](https://developer.mozilla.org/docs/Learn/Forms)\n * or opening a dialog.\n *\n * @see https://quartz.se.com/build/components/button\n */\n@Component({\n tag: 'qds-button',\n formAssociated: true,\n shadow: true,\n styleUrl: 'button.css',\n})\nexport class Button implements ComponentInterface {\n /**\n * The name of the action icon to render.\n */\n @Prop() public readonly action?: Action\n\n /**\n * Displays an indicator if `true` or the empty string. Otherwise, displays a\n * counter badge if a number or string representing a number is used.\n *\n * @webnative\n */\n @Prop() public readonly badge?: number | string | true\n\n /**\n * The indicator or counter badge's accessible text that will be used by\n * screen readers.\n */\n @Prop() public readonly badgeDescription?: string\n\n /**\n * The indicator's status.\n */\n @Prop()\n public readonly badgeIndicatorStatus?: HTMLQdsBadgeIndicatorElement['status'] =\n 'neutral'\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 button's importance.\n */\n @Prop() public readonly importance?: ButtonImportance = 'standard'\n\n /**\n * The button's size.\n */\n @Prop() public readonly size?: Size | 'hero' = 'standard'\n\n /**\n * The button's text.\n */\n @Prop() public readonly text!: string\n\n /**\n * Sets if button is icon only.\n */\n @Prop() public readonly iconOnly: boolean = false\n\n /**\n * Prevents the button from being interacted with: it cannot be pressed or\n * focused.\n *\n * @webnative\n */\n @Prop()\n public readonly disabled?: boolean\n\n /**\n * Tells the browser to download the linked file as this filename. Only used\n * when `href` is set.\n *\n * @webnative\n */\n @Prop() public readonly download?: string\n\n /**\n * The [`<form>`][] element to associate the button with (its form owner).\n *\n * The value of this attribute must be the id of a `<form>` in the same\n * document. If this attribute is not set, the `<qds-button>` is associated\n * with its ancestor `<form>` element, if any.\n *\n * This attribute lets you associate `<qds-button>` elements to `<form>`s\n * anywhere in the document, not just inside a `<form>`. It can also override\n * an ancestor `<form>` element.\n *\n * [`<form>`]: https://developer.mozilla.org/docs/Web/HTML/Element/form\n *\n * @readonly\n * @webnative\n */\n // eslint-disable-next-line unicorn/no-null\n @Prop() public readonly form: ElementInternals['form'] | string = null\n\n /**\n * The URL that processes the information submitted by the button. Overrides\n * the [`action`](https://developer.mozilla.org/docs/Web/HTML/Element/button#attr-formaction)\n * attribute of the button's form owner. Does nothing if there is no form owner.\n *\n * @webnative\n */\n @Prop({ attribute: 'formaction' }) public readonly formAction?: string\n\n /**\n * If the button is a submit button (it's inside/associated with a `<form>`\n * and doesn't have `type=\"button\"`), this attribute specifies the\n * [HTTP method][] used to submit the form, or `dialog` which won't submit\n * the form. Possible values:\n *\n * - `get`: The form data are appended to the form's action URL, with a ? as\n * a separator, and the resulting URL is sent to the server. Use this method\n * when the form has no side effects, like search forms.\n * - `post`: The data from the form are included in the body of the HTTP\n * request when sent to the server. Use when the form contains information\n * that shouldn't be public, like login credentials.\n * - `dialog`: Close the dialog box in which the button finds itself, if any,\n * and do not submit the button's form owner.\n *\n * If specified, this attribute overrides the `method` attribute of the\n * button's form owner.\n *\n * [HTTP method]: https://developer.mozilla.org/docs/Web/HTTP/Methods\n *\n * @webnative\n */\n @Prop({ attribute: 'formmethod' }) public readonly formMethod?: FormMethod\n\n /**\n * If the button is a submit button, this attribute specifies that the form\n * is not to be\n * [validated](https://developer.mozilla.org/docs/Learn/Forms/Form_validation)\n * when it is submitted. If this attribute is specified, it overrides the\n * [`novalidate`](https://developer.mozilla.org/docs/Web/HTML/Element/form#attr-novalidate)\n * attribute of the button's form owner.\n *\n * @webnative\n */\n @Prop({ attribute: 'formnovalidate' })\n public readonly formNoValidate: boolean = false\n\n /**\n * If the button is a submit button, this attribute is an author-defined name\n * or standardized, underscore-prefixed keyword indicating where to display\n * the response from submitting the form. This is the `name` of, or keyword\n * for, a browsing context (a tab, window, or\n * [`<iframe>`](https://developer.mozilla.org/docs/Web/HTML/Element/iframe)).\n * If this attribute is specified, it overrides the\n * [`target`](https://developer.mozilla.org/docs/Web/HTML/Element/form#attr-target)\n * attribute of the button's form owner. The following keywords have special\n * meanings:\n *\n * - `_blank`: Load the response into a new unnamed browsing context — usually\n * a new tab or window, depending on the user's browser settings.\n * - `_parent`: Load the response into the parent browsing context of the\n * current one. If there is no parent, this option behaves the same way as\n * `_self`.\n * - `_self`: Load the response into the same browsing context as the current\n * one.\n * - `_top`: Load the response into the top-level browsing context (that is,\n * the browsing context that is an ancestor of the current one, and has no\n * parent). If there is no parent, this option behaves the same way as\n * `_self`.\n *\n * @webnative\n */\n @Prop({ attribute: 'formtarget' })\n public readonly formTarget: LiteralUnion<ButtonTarget, string> = '_self'\n\n /**\n * When set, the underlying button will be rendered as an `<a>` with this\n * `href` instead of a `<button>`.\n *\n * @webnative\n */\n @Prop() public readonly href?: string\n\n /**\n * Returns a list of the [`<label>`][] elements associated with the\n * `qds-button` element.\n *\n * [`<label>`]: https://developer.mozilla.org/docs/Web/HTML/Element/label\n *\n * @readonly\n * @webnative\n */\n @Prop() public readonly labels: ElementInternals['labels'] =\n {} as ElementInternals['labels']\n\n /**\n * When href is define and the button act as a link (`<a>`), the `rel` will be added to the element.\n *\n * @webnative\n */\n @Prop() public readonly rel?: string = 'noopener'\n\n /**\n * The name of the button, submitted as a pair with the button's `value` as\n * part of the form data, when that button is used to submit the form.\n * Ignored when `href` is set.\n *\n * @webnative\n */\n @Prop() public readonly name?: 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<ButtonTarget, string>\n\n /**\n * The type of button.\n *\n * `button`: The button has no default behavior, and does nothing when\n * pressed by default. It can have client-side scripts listen to the\n * element's events, which are triggered when the events occur.\n *\n * `submit`: The button submits the form data to the server. This is the\n * default if the attribute is not specified for buttons associated with a\n * `<form>`, or if the attribute is an empty or invalid value.\n *\n * `reset`: The button resets all the controls to their initial values.\n *\n * @webnative\n */\n @Prop() public readonly type?: ButtonType\n\n /**\n * The error message that would be shown to the user if the `<qds-button>`\n * was to be checked for validity.\n *\n * @readonly\n * @webnative\n */\n @Prop()\n public readonly validationMessage: ElementInternals['validationMessage'] = ''\n\n /**\n * The [`ValidityState`][] object for this `<qds-button>`.\n *\n * [`ValidityState`]: https://developer.mozilla.org/docs/Web/API/ValidityState\n *\n * @readonly\n * @webnative\n */\n @Prop() public readonly validity: ElementInternals['validity'] = VALID_STATE\n\n /**\n * Defines the value associated with the button's `name` when it's submitted\n * with the form data. This value is passed to the server in params when the\n * form is submitted using this button. Ignored when `href` is set.\n *\n * @webnative\n */\n @Prop() public readonly value?: string\n\n /**\n * True if `<qds-button>` will be validated when the form is submitted; false\n * otherwise.\n *\n * @readonly\n * @webnative\n */\n @Prop() public readonly willValidate: ElementInternals['willValidate'] = false\n\n /**\n * Emitted when the button loses focus.\n */\n @Event({ eventName: 'qdsBlur', bubbles: false, cancelable: false })\n private readonly blurEmitter!: EventEmitter<QdsFocusEventDetail>\n\n /**\n * Emitted when the button gains focus.\n */\n @Event({ eventName: 'qdsFocus', bubbles: false, cancelable: false })\n private readonly focusEmitter!: EventEmitter<QdsFocusEventDetail>\n\n @Element() private readonly host!: HTMLQdsButtonElement\n\n @State() private tooltip = false\n\n @AttachInternals() private readonly internals!: ElementInternals\n\n #savedTabIndex = 0\n\n #button?: HTMLAnchorElement | HTMLButtonElement\n\n #span?: HTMLSpanElement\n\n #ro?: ResizeObserver\n\n get #buttonType(): ButtonType {\n if (this.type === undefined)\n return this.internals.form ? 'submit' : 'button'\n return this.type\n }\n\n get #iconOnly(): boolean {\n const hasIcon = this.iconName !== undefined && this.iconName !== ''\n\n return hasIcon && this.iconOnly\n }\n\n get #computedAction(): Action | undefined {\n switch (this.action) {\n case 'dropdown':\n case 'dropdown-close':\n case 'next': {\n return this.action\n }\n default: {\n return undefined\n }\n }\n }\n\n get #computedActionIcon(): Exclude<Action, 'dropdown-close'> | undefined {\n switch (this.action) {\n case 'dropdown':\n case 'next': {\n return this.action\n }\n case 'dropdown-close': {\n return 'dropdown'\n }\n default: {\n return undefined\n }\n }\n }\n\n get #computedDisabled(): boolean {\n return this.disabled ?? false\n }\n\n get #computedImportance(): ButtonImportance {\n switch (this.importance) {\n case 'emphasized':\n case 'subdued':\n case 'destructive':\n case 'subdued-destructive': {\n return this.importance\n }\n default: {\n return 'standard'\n }\n }\n }\n\n get #computedSize(): ButtonSize {\n switch (this.size) {\n case 'small':\n case 'large':\n case 'hero': {\n return this.size\n }\n default: {\n return 'standard'\n }\n }\n }\n\n @Listen('blur')\n protected onBlur(event: FocusEvent): void {\n this.blurEmitter.emit(pickFocusEventAttributes(event))\n }\n\n @Listen('click')\n protected onClick(event: MouseEvent): void {\n if (this.#computedDisabled) {\n event.stopImmediatePropagation()\n return\n }\n\n if (this.#buttonType === 'button' || !this.internals.form) return\n if (this.#buttonType === 'reset') {\n this.internals.form.reset()\n } else {\n this.internals.form.requestSubmit()\n }\n event.preventDefault()\n }\n\n @Listen('focus')\n protected onFocus(event: FocusEvent): void {\n this.focusEmitter.emit(pickFocusEventAttributes(event))\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 @Watch('disabled')\n protected disabledChanged(): void {\n this.internals.ariaDisabled = this.#computedDisabled.toString()\n if (this.#computedDisabled) this.host.removeAttribute('tabindex')\n else this.host.tabIndex = this.#savedTabIndex\n }\n\n @Watch('href')\n protected hrefChanged(): void {\n this.internals.role = this.href === undefined ? 'button' : 'link'\n }\n\n @Watch('tabindex')\n protected tabindexChanged(newValue: string | null): void {\n if (newValue !== null) {\n const parsedValue = Number.parseInt(newValue, 10)\n this.#savedTabIndex =\n Number.isNaN(parsedValue) || !Number.isFinite(parsedValue)\n ? 0\n : parsedValue\n }\n if (this.#computedDisabled) this.host.removeAttribute('tabindex')\n else this.host.tabIndex = this.#savedTabIndex\n }\n\n @Watch('text')\n protected textChanged(): void {\n this.internals.ariaLabel = this.text\n\n if (this.#ro) this.#ro.disconnect()\n if (!this.#span) return\n\n const span = this.#span\n readTask(() => {\n this.tooltip = isOverflowing(span)\n })\n this.#ro = new ResizeObserver(([spanEntry]) => {\n this.tooltip = isOverflowing(spanEntry.target)\n })\n this.#ro.observe(this.#span)\n }\n\n public componentWillLoad(): void {\n this.#defineGetter('form', () => this.internals.form)\n this.#defineGetter('willValidate', () => this.internals.willValidate)\n this.#defineGetter('validity', () => this.internals.validity)\n this.#defineGetter(\n 'validationMessage',\n () => this.internals.validationMessage,\n )\n this.#defineGetter('labels', () => this.internals.labels)\n\n this.hrefChanged()\n this.tabindexChanged(this.host.getAttribute('tabindex') ?? '0')\n }\n\n public componentDidLoad(): void {\n this.textChanged()\n }\n\n public disconnectedCallback(): void {\n if (this.#ro) this.#ro.disconnect()\n }\n\n public render() {\n const Tag = this.href === undefined ? 'button' : 'a'\n const hasBadgeProperties =\n this.badgeDescription !== undefined && this.badge !== undefined\n const ariaLabel = hasBadgeProperties\n ? `${this.text} ${this.badge} ${this.badgeDescription}`\n : this.text\n\n return (\n <div\n class=\"qds-container\"\n onClick={this.#onClick}\n onKeyDown={preventDefault}\n onKeyUp={preventDefault}\n onKeyPress={preventDefault}\n aria-hidden=\"true\"\n >\n <Tag\n class={{\n 'qds-button': true,\n 'qds-disabled': Tag === 'a' ? this.#computedDisabled : false,\n 'qds-icon-only': this.#iconOnly,\n }}\n data-importance={this.#computedImportance}\n data-size={this.#computedSize}\n data-action={this.#computedAction}\n disabled={Tag === 'a' ? undefined : this.disabled}\n download={Tag === 'a' ? this.download : undefined}\n formAction={this.formAction}\n formMethod={this.formMethod}\n formNoValidate={this.formNoValidate}\n formTarget={this.formTarget}\n href={Tag === 'a' ? this.href : undefined}\n name={Tag === 'a' ? undefined : this.name}\n ref={this.#buttonRef}\n rel={Tag === 'a' ? this.rel : undefined}\n tabIndex={-1}\n target={Tag === 'a' ? this.target : undefined}\n type={Tag === 'a' ? undefined : this.#buttonType}\n value={Tag === 'a' ? undefined : this.value}\n aria-label={this.#iconOnly ? ariaLabel : undefined}\n >\n {this.iconName !== undefined && this.iconName !== '' && (\n <qds-icon\n class=\"qds-icon\"\n data-size={this.#computedSize}\n library={this.iconLibrary}\n name={this.iconName}\n />\n )}\n {!this.#iconOnly && (\n <span\n class=\"qds-overflow\"\n data-size={this.#computedSize}\n ref={this.#spanRef}\n >\n {this.text}\n </span>\n )}\n {isIndicator(this.badge) && (\n <qds-badge-indicator\n class=\"qds-indicator\"\n status={this.badgeIndicatorStatus}\n description={this.badgeDescription}\n size={this.#computedSize}\n strokeRing\n />\n )}\n {isCounter(this.badge) && (\n <qds-badge-counter\n class={{\n 'qds-indicator': this.#iconOnly,\n }}\n description={this.badgeDescription}\n importance={this.#computedImportance}\n size={this.#computedSize}\n strokeRing\n value={this.badge}\n />\n )}\n {this.#computedActionIcon !== undefined && (\n <qds-icon\n class=\"qds-icon qds-action\"\n data-size={this.#computedSize}\n library=\"core\"\n name={this.#computedActionIcon}\n />\n )}\n </Tag>\n <div\n class={{\n 'qds-focus-ring': true,\n 'qds-icon-only': this.#iconOnly,\n }}\n data-importance={this.#computedImportance}\n data-size={this.#computedSize}\n />\n {this.tooltip && (\n <qds-tooltip ref={this.#tooltipRef}>{this.text}</qds-tooltip>\n )}\n </div>\n )\n }\n\n public checkValidity: ElementInternals['checkValidity'] = () =>\n this.internals.checkValidity()\n\n public reportValidity: ElementInternals['reportValidity'] = () =>\n this.internals.reportValidity()\n\n public setCustomValidity: HTMLButtonElement['setCustomValidity'] = (\n error,\n ) => {\n if (error)\n this.internals.setValidity(CUSTOM_ERROR_FLAGS, error, this.#button)\n else this.internals.setValidity(NO_ERROR_FLAGS)\n }\n\n readonly #buttonRef = (\n button?: HTMLAnchorElement | HTMLButtonElement,\n ): void => {\n this.#button = button\n }\n\n readonly #spanRef = (span?: HTMLSpanElement): void => {\n this.#span = span\n }\n\n readonly #tooltipRef = (tooltip?: HTMLQdsTooltipElement): void => {\n if (tooltip)\n // eslint-disable-next-line no-param-reassign\n tooltip.target = this.host\n }\n\n readonly #onClick = (event: MouseEvent): void => {\n if (this.#computedDisabled) {\n preventDefault(event)\n }\n }\n\n #defineGetter(p: PropertyKey, get: () => unknown): void {\n Object.defineProperty(this.host, p, { enumerable: true, get })\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"qds-button.entry.js","mappings":";;;;;;;;;AAAA,MAAM,SAAS,GAAG,ojSAAojS,CAAC;AACvkS,wBAAe,SAAS;;ACDxB;AACA;AACA;;;;;;;;;;;;;;;;;;AAgCA,MAAM,SAAS,GAAG,CAAC,KAAc,KAC/B,OAAO,KAAK,KAAK,QAAQ;MACrB,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;MACvC,OAAO,KAAK,KAAK,QAAQ,CAAA;AAE/B,MAAM,WAAW,GAAG,CAAC,KAAc,KACjC,KAAK,KAAK,EAAE,IAAI,KAAK,KAAK,IAAI,CAAA;AAEhC,MAAM,cAAc,GAAG,CAAC,KAAiC;IACvD,KAAK,CAAC,cAAc,EAAE,CAAA;AACxB,CAAC,CAAA;MAgBY,MAAM;IANnB;;;;;;;;;;;;;;;QA8BkB,yBAAoB,GAClC,SAAS,CAAA;;;;QAYa,gBAAW,GAAW,SAAS,CAAA;;;;QAK/B,eAAU,GAAsB,UAAU,CAAA;;;;QAK1C,SAAI,GAAmB,UAAU,CAAA;;;;QAUjC,aAAQ,GAAY,KAAK,CAAA;;;;;;;;;;;;;;;;;;QAoCzB,SAAI,GAAsC,IAAI,CAAA;;;;;;;;;;;QA8CtD,mBAAc,GAAY,KAAK,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;QA4B/B,eAAU,GAAuC,OAAO,CAAA;;;;;;;;;;QAmBhD,WAAM,GAC5B,EAAgC,CAAA;;;;;;QAOV,QAAG,GAAY,UAAU,CAAA;;;;;;;;QAsDjC,sBAAiB,GAA0C,EAAE,CAAA;;;;;;;;;QAUrD,aAAQ,GAAiC,WAAW,CAAA;;;;;;;;QAkBpD,iBAAY,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I,CAAC,QAAQ,KAAK,EAAE,CAAA;IAEnE,OAAO,OAAO,IAAI,IAAI,CAAC,QAAQ,CAAA;AACjC,CAAC;IAGC,QAAQ,IAAI,CAAC,MAAM;QACjB,KAAK,UAAU,CAAC;QAChB,KAAK,gBAAgB,CAAC;QACtB,KAAK,MAAM,EAAE;YACX,OAAO,IAAI,CAAC,MAAM,CAAA;SACnB;QACD,SAAS;YACP,OAAO,SAAS,CAAA;SACjB;KACF;AACH,CAAC;IAGC,QAAQ,IAAI,CAAC,MAAM;QACjB,KAAK,UAAU,CAAC;QAChB,KAAK,MAAM,EAAE;YACX,OAAO,IAAI,CAAC,MAAM,CAAA;SACnB;QACD,KAAK,gBAAgB,EAAE;YACrB,OAAO,UAAU,CAAA;SAClB;QACD,SAAS;YACP,OAAO,SAAS,CAAA;SACjB;KACF;AACH,CAAC;IAGC,OAAO,IAAI,CAAC,QAAQ,IAAI,KAAK,CAAA;AAC/B,CAAC;IAGC,QAAQ,IAAI,CAAC,UAAU;QACrB,KAAK,YAAY,CAAC;QAClB,KAAK,SAAS,CAAC;QACf,KAAK,aAAa,CAAC;QACnB,KAAK,qBAAqB,EAAE;YAC1B,OAAO,IAAI,CAAC,UAAU,CAAA;SACvB;QACD,SAAS;YACP,OAAO,UAAU,CAAA;SAClB;KACF;AACH,CAAC;IAGC,QAAQ,IAAI,CAAC,IAAI;QACf,KAAK,OAAO,CAAC;QACb,KAAK,OAAO,CAAC;QACb,KAAK,MAAM,EAAE;YACX,OAAO,IAAI,CAAC,IAAI,CAAA;SACjB;QACD,SAAS;YACP,OAAO,UAAU,CAAA;SAClB;KACF;AACH,CAAC,uDAmPa,CAAc,EAAE,GAAkB;IAC9C,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAA;AAChE,CAAC;;;;;","names":[],"sources":["src/components/button/button.css?tag=qds-button&encapsulation=shadow","src/components/button/button.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 outline: none;\n}\n\n.qds-button:disabled,\n.qds-disabled {\n opacity: var(--qds-theme-disabled);\n pointer-events: none;\n}\n\n.qds-overflow {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n\n &[data-size='hero'] {\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n white-space: normal;\n }\n}\n\n.qds-action {\n transform: scaleX(var(--qds-direction-factor, 1));\n}\n\n.qds-container {\n display: grid;\n grid-template-areas: 'button';\n}\n\n.qds-focus-ring {\n border-radius: max(\n 1px,\n var(\n --qds-control-border-radius-top-left,\n var(--qds-control-border-radius)\n )\n )\n max(\n 1px,\n var(\n --qds-control-border-radius-top-right,\n var(--qds-control-border-radius)\n )\n )\n max(\n 1px,\n var(\n --qds-control-border-radius-bottom-right,\n var(--qds-control-border-radius)\n )\n )\n max(\n 1px,\n var(\n --qds-control-border-radius-bottom-left,\n var(--qds-control-border-radius)\n )\n );\n grid-area: button;\n isolation: isolate;\n outline: var(--qds-theme-focus-border) solid var(--qds-focus-border-width);\n outline-offset: var(--qds-focus-border-offset);\n pointer-events: none;\n visibility: hidden;\n width: calc(\n 100% + var(--qds-control-border-width) -\n var(\n --qds-control-border-width-inline-end,\n var(--qds-control-border-width)\n )\n );\n height: calc(\n 100% + var(--qds-control-border-width) -\n var(--qds-control-border-width-block-end, var(--qds-control-border-width))\n );\n}\n\n:host(:focus-visible) .qds-focus-ring {\n visibility: visible;\n}\n\n.qds-button {\n position: relative;\n align-items: center;\n appearance: none;\n\n /* Avoid automatic minimum size on flex element: https://www.w3.org/TR/css-flexbox-1/#min-size-auto */\n min-width: 0;\n background-color: initial;\n border: none;\n border-radius: var(\n --qds-control-border-radius-top-left,\n var(--qds-control-border-radius)\n )\n var(--qds-control-border-radius-top-right, var(--qds-control-border-radius))\n var(\n --qds-control-border-radius-bottom-right,\n var(--qds-control-border-radius)\n )\n var(\n --qds-control-border-radius-bottom-left,\n var(--qds-control-border-radius)\n );\n box-sizing: border-box;\n cursor: pointer;\n display: inline-flex;\n grid-area: button;\n justify-content: center;\n outline: none;\n padding-block: 0;\n print-color-adjust: exact;\n text-align: center;\n user-select: none;\n\n &:any-link {\n text-decoration: none;\n }\n}\n\n.qds-icon {\n flex-shrink: 0;\n}\n\n.qds-indicator {\n position: absolute;\n inset-block-start: 0;\n inset-inline-end: 0;\n transform: translate(50%, -50%);\n}\n\n[data-size='small'] {\n font: var(--qds-control-small-text);\n\n &.qds-button {\n gap: var(--qds-control-small-gap-internal);\n height: var(--qds-control-small-height);\n padding-inline: var(--qds-control-button-small-padding-horizontal);\n\n &.qds-icon-only {\n width: var(--qds-control-small-height);\n }\n }\n\n &.qds-icon {\n font-size: var(--qds-control-small-icon-size);\n }\n}\n\n[data-size='standard'] {\n font: var(--qds-control-standard-text);\n\n &.qds-button {\n gap: var(--qds-control-standard-gap-internal);\n height: var(--qds-control-standard-height);\n padding-inline: var(--qds-control-button-standard-padding-horizontal);\n\n &.qds-icon-only {\n width: var(--qds-control-standard-height);\n }\n }\n\n &.qds-icon {\n font-size: var(--qds-control-standard-icon-size);\n }\n}\n\n[data-size='large'] {\n font: var(--qds-control-large-text);\n\n &.qds-button {\n gap: var(--qds-control-large-gap-internal);\n height: var(--qds-control-large-height);\n padding-inline: var(--qds-control-button-large-padding-horizontal);\n\n &.qds-icon-only {\n width: var(--qds-control-large-height);\n }\n }\n\n &.qds-icon {\n font-size: var(--qds-control-large-icon-size);\n }\n}\n\n[data-size='small'],\n[data-size='standard'],\n[data-size='large'] {\n line-height: normal;\n\n &.qds-button.qds-icon-only {\n padding-inline: 0;\n }\n}\n\n[data-size='hero'] {\n font: var(--qds-control-hero-text);\n\n &.qds-button {\n border-radius: var(\n --qds-control-border-radius-top-left,\n var(--qds-control-hero-border-radius)\n )\n var(\n --qds-control-border-radius-top-right,\n var(--qds-control-hero-border-radius)\n )\n var(\n --qds-control-border-radius-bottom-right,\n var(--qds-control-hero-border-radius)\n )\n var(\n --qds-control-border-radius-bottom-left,\n var(--qds-control-hero-border-radius)\n );\n gap: var(--qds-control-hero-gap-internal);\n padding-block: var(--qds-control-hero-padding-auto-height);\n padding-inline: var(--qds-control-button-hero-padding-horizontal);\n\n &.qds-icon-only {\n height: var(--qds-control-hero-height);\n padding-inline: 0;\n width: var(--qds-control-hero-height);\n }\n }\n\n &.qds-focus-ring {\n border-radius: max(\n 1px,\n var(\n --qds-control-border-radius-top-left,\n var(--qds-control-hero-border-radius)\n )\n )\n max(\n 1px,\n var(\n --qds-control-border-radius-top-right,\n var(--qds-control-hero-border-radius)\n )\n )\n max(\n 1px,\n var(\n --qds-control-border-radius-bottom-right,\n var(--qds-control-hero-border-radius)\n )\n )\n max(\n 1px,\n var(\n --qds-control-border-radius-bottom-left,\n var(--qds-control-hero-border-radius)\n )\n );\n }\n\n &.qds-icon {\n font-size: var(--qds-control-hero-icon-size);\n }\n}\n\n[data-importance='subdued'] {\n color: var(--qds-theme-link-standard-default);\n\n &.qds-button {\n border-block-end: var(--qds-control-border-width) solid transparent;\n padding-inline: 0;\n\n &:hover {\n border-block-end: var(--qds-control-border-width) solid\n var(--qds-theme-link-standard-hover);\n color: var(--qds-theme-link-standard-hover);\n }\n\n &:active {\n border-block-end: var(--qds-control-border-width) solid\n var(--qds-theme-link-standard-pressed);\n color: var(--qds-theme-link-standard-pressed);\n }\n\n &:not(.qds-icon-only) {\n border-radius: 0;\n }\n\n &.qds-icon-only {\n border: none;\n color: var(--qds-theme-control-text-standard);\n\n &:hover {\n background-color: var(--qds-theme-interactive-background-hover);\n }\n\n &:active {\n background-color: var(--qds-theme-interactive-background-pressed);\n }\n }\n }\n}\n\n[data-importance='standard'] {\n color: var(--qds-theme-control-text-standard);\n\n &.qds-button {\n border-color: var(--qds-theme-control-border);\n border-style: solid;\n border-width: var(--qds-control-border-width)\n var(\n --qds-control-border-width-inline-end,\n var(--qds-control-border-width)\n )\n var(--qds-control-border-width-block-end, var(--qds-control-border-width))\n var(--qds-control-border-width);\n\n &:hover {\n background-color: var(--qds-theme-interactive-background-hover);\n }\n\n &:active {\n background-color: var(--qds-theme-interactive-background-pressed);\n }\n }\n}\n\n[data-importance='emphasized'] {\n &.qds-button {\n background-color: var(--qds-theme-signature-color-default);\n color: var(--qds-theme-signature-color-contrast);\n\n &:hover {\n background-color: var(--qds-theme-signature-color-hover);\n }\n\n &:active {\n background-color: var(--qds-theme-signature-color-pressed);\n }\n }\n}\n\n[data-importance='destructive'] {\n &.qds-button {\n background-color: var(--qds-theme-feedback-action-destructive-default);\n color: var(--qds-theme-feedback-action-destructive-contrast);\n\n &:hover {\n background-color: var(--qds-theme-feedback-action-destructive-hover);\n }\n\n &:active {\n background-color: var(--qds-theme-feedback-action-destructive-pressed);\n }\n }\n}\n\n[data-importance='subdued-destructive'] {\n color: var(--qds-theme-feedback-action-destructive-default);\n\n &.qds-button {\n border-block-end: var(--qds-control-border-width) solid transparent;\n padding-inline: 0;\n\n &:hover {\n border-block-end: var(--qds-control-border-width) solid\n var(--qds-theme-feedback-action-destructive-hover);\n color: var(--qds-theme-feedback-action-destructive-hover);\n }\n\n &:active {\n border-block-end: var(--qds-control-border-width) solid\n var(--qds-theme-feedback-action-destructive-pressed);\n color: var(--qds-theme-feedback-action-destructive-pressed);\n }\n\n &:not(.qds-icon-only) {\n border-radius: 0;\n }\n\n &.qds-icon-only {\n border: none;\n\n &:hover {\n background-color: var(--qds-theme-interactive-background-hover);\n color: var(--qds-theme-feedback-action-destructive-default);\n }\n\n &:active {\n background-color: var(--qds-theme-interactive-background-pressed);\n color: var(--qds-theme-feedback-action-destructive-default);\n }\n }\n }\n}\n\n:is([data-action='dropdown'], [data-action='dropdown-close']) {\n .qds-action {\n margin-inline-start: auto;\n transition-duration: 0.3s;\n transition-property: transform;\n }\n\n &[data-importance='standard'] {\n background-color: var(--qds-theme-control-input-background);\n }\n\n &:not([data-importance='subdued'], [data-importance='subdued-destructive']) {\n padding-inline: var(--qds-control-input-padding-horizontal);\n }\n}\n\n[data-action='dropdown-close'] .qds-action {\n transform: rotate(-180deg);\n}\n","// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { ComponentInterface, EventEmitter } from '@stencil/core'\nimport {\n AttachInternals,\n Component,\n Element,\n Event,\n h,\n Listen,\n Prop,\n readTask,\n State,\n Watch,\n} from '@stencil/core'\nimport type { LiteralUnion } from 'type-fest'\n\nimport type { QdsFocusEventDetail } from '../../helpers'\nimport { isOverflowing, pickFocusEventAttributes } from '../../helpers'\nimport { CUSTOM_ERROR_FLAGS, NO_ERROR_FLAGS, VALID_STATE } from '../controls'\nimport type { Importance, Size } from '../shared'\n\nexport type Action = 'dropdown-close' | 'dropdown' | 'next'\nexport type ButtonImportance =\n | Importance\n | 'destructive'\n | 'subdued-destructive'\nexport type ButtonSize = Size | 'hero'\nexport type ButtonTarget = '_blank' | '_parent' | '_self' | '_top'\nexport type ButtonType = 'button' | 'reset' | 'submit'\nexport type FormMethod = 'dialog' | 'get' | 'post'\n\nconst isCounter = (value: unknown): value is number =>\n typeof value === 'string'\n ? !Number.isNaN(Number.parseFloat(value))\n : typeof value === 'number'\n\nconst isIndicator = (value: unknown): value is '' | true =>\n value === '' || value === true\n\nconst preventDefault = (event: KeyboardEvent | MouseEvent): void => {\n event.preventDefault()\n}\n/**\n * The `<qds-button>` element is an interactive element activated by a user\n * with a mouse, keyboard, finger, voice command, or other assistive technology.\n * Once activated, it then performs a programmable action, such as submitting a\n * [form](https://developer.mozilla.org/docs/Learn/Forms)\n * or opening a dialog.\n *\n * @see https://quartz.se.com/build/components/button\n */\n@Component({\n tag: 'qds-button',\n formAssociated: true,\n shadow: true,\n styleUrl: 'button.css',\n})\nexport class Button implements ComponentInterface {\n /**\n * The name of the action icon to render.\n */\n @Prop() public readonly action?: Action\n\n /**\n * Displays an indicator if `true` or the empty string. Otherwise, displays a\n * counter badge if a number or string representing a number is used.\n *\n * @webnative\n */\n @Prop() public readonly badge?: number | string | true\n\n /**\n * The indicator or counter badge's accessible text that will be used by\n * screen readers.\n */\n @Prop() public readonly badgeDescription?: string\n\n /**\n * The indicator's status.\n */\n @Prop()\n public readonly badgeIndicatorStatus?: HTMLQdsBadgeIndicatorElement['status'] =\n 'neutral'\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 button's importance.\n */\n @Prop() public readonly importance?: ButtonImportance = 'standard'\n\n /**\n * The button's size.\n */\n @Prop() public readonly size?: Size | 'hero' = 'standard'\n\n /**\n * The button's text.\n */\n @Prop() public readonly text!: string\n\n /**\n * Sets if button is icon only.\n */\n @Prop() public readonly iconOnly: boolean = false\n\n /**\n * Prevents the button from being interacted with: it cannot be pressed or\n * focused.\n *\n * @webnative\n */\n @Prop()\n public readonly disabled?: boolean\n\n /**\n * Tells the browser to download the linked file as this filename. Only used\n * when `href` is set.\n *\n * @webnative\n */\n @Prop() public readonly download?: string\n\n /**\n * The [`<form>`][] element to associate the button with (its form owner).\n *\n * The value of this attribute must be the id of a `<form>` in the same\n * document. If this attribute is not set, the `<qds-button>` is associated\n * with its ancestor `<form>` element, if any.\n *\n * This attribute lets you associate `<qds-button>` elements to `<form>`s\n * anywhere in the document, not just inside a `<form>`. It can also override\n * an ancestor `<form>` element.\n *\n * [`<form>`]: https://developer.mozilla.org/docs/Web/HTML/Element/form\n *\n * @readonly\n * @webnative\n */\n // eslint-disable-next-line unicorn/no-null\n @Prop() public readonly form: ElementInternals['form'] | string = null\n\n /**\n * The URL that processes the information submitted by the button. Overrides\n * the [`action`](https://developer.mozilla.org/docs/Web/HTML/Element/button#attr-formaction)\n * attribute of the button's form owner. Does nothing if there is no form owner.\n *\n * @webnative\n */\n @Prop({ attribute: 'formaction' }) public readonly formAction?: string\n\n /**\n * If the button is a submit button (it's inside/associated with a `<form>`\n * and doesn't have `type=\"button\"`), this attribute specifies the\n * [HTTP method][] used to submit the form, or `dialog` which won't submit\n * the form. Possible values:\n *\n * - `get`: The form data are appended to the form's action URL, with a ? as\n * a separator, and the resulting URL is sent to the server. Use this method\n * when the form has no side effects, like search forms.\n * - `post`: The data from the form are included in the body of the HTTP\n * request when sent to the server. Use when the form contains information\n * that shouldn't be public, like login credentials.\n * - `dialog`: Close the dialog box in which the button finds itself, if any,\n * and do not submit the button's form owner.\n *\n * If specified, this attribute overrides the `method` attribute of the\n * button's form owner.\n *\n * [HTTP method]: https://developer.mozilla.org/docs/Web/HTTP/Methods\n *\n * @webnative\n */\n @Prop({ attribute: 'formmethod' }) public readonly formMethod?: FormMethod\n\n /**\n * If the button is a submit button, this attribute specifies that the form\n * is not to be\n * [validated](https://developer.mozilla.org/docs/Learn/Forms/Form_validation)\n * when it is submitted. If this attribute is specified, it overrides the\n * [`novalidate`](https://developer.mozilla.org/docs/Web/HTML/Element/form#attr-novalidate)\n * attribute of the button's form owner.\n *\n * @webnative\n */\n @Prop({ attribute: 'formnovalidate' })\n public readonly formNoValidate: boolean = false\n\n /**\n * If the button is a submit button, this attribute is an author-defined name\n * or standardized, underscore-prefixed keyword indicating where to display\n * the response from submitting the form. This is the `name` of, or keyword\n * for, a browsing context (a tab, window, or\n * [`<iframe>`](https://developer.mozilla.org/docs/Web/HTML/Element/iframe)).\n * If this attribute is specified, it overrides the\n * [`target`](https://developer.mozilla.org/docs/Web/HTML/Element/form#attr-target)\n * attribute of the button's form owner. The following keywords have special\n * meanings:\n *\n * - `_blank`: Load the response into a new unnamed browsing context — usually\n * a new tab or window, depending on the user's browser settings.\n * - `_parent`: Load the response into the parent browsing context of the\n * current one. If there is no parent, this option behaves the same way as\n * `_self`.\n * - `_self`: Load the response into the same browsing context as the current\n * one.\n * - `_top`: Load the response into the top-level browsing context (that is,\n * the browsing context that is an ancestor of the current one, and has no\n * parent). If there is no parent, this option behaves the same way as\n * `_self`.\n *\n * @webnative\n */\n @Prop({ attribute: 'formtarget' })\n public readonly formTarget: LiteralUnion<ButtonTarget, string> = '_self'\n\n /**\n * When set, the underlying button will be rendered as an `<a>` with this\n * `href` instead of a `<button>`.\n *\n * @webnative\n */\n @Prop() public readonly href?: string\n\n /**\n * Returns a list of the [`<label>`][] elements associated with the\n * `qds-button` element.\n *\n * [`<label>`]: https://developer.mozilla.org/docs/Web/HTML/Element/label\n *\n * @readonly\n * @webnative\n */\n @Prop() public readonly labels: ElementInternals['labels'] =\n {} as ElementInternals['labels']\n\n /**\n * When href is define and the button act as a link (`<a>`), the `rel` will be added to the element.\n *\n * @webnative\n */\n @Prop() public readonly rel?: string = 'noopener'\n\n /**\n * The name of the button, submitted as a pair with the button's `value` as\n * part of the form data, when that button is used to submit the form.\n * Ignored when `href` is set.\n *\n * @webnative\n */\n @Prop() public readonly name?: 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<ButtonTarget, string>\n\n /**\n * The type of button.\n *\n * `button`: The button has no default behavior, and does nothing when\n * pressed by default. It can have client-side scripts listen to the\n * element's events, which are triggered when the events occur.\n *\n * `submit`: The button submits the form data to the server. This is the\n * default if the attribute is not specified for buttons associated with a\n * `<form>`, or if the attribute is an empty or invalid value.\n *\n * `reset`: The button resets all the controls to their initial values.\n *\n * @webnative\n */\n @Prop() public readonly type?: ButtonType\n\n /**\n * The error message that would be shown to the user if the `<qds-button>`\n * was to be checked for validity.\n *\n * @readonly\n * @webnative\n */\n @Prop()\n public readonly validationMessage: ElementInternals['validationMessage'] = ''\n\n /**\n * The [`ValidityState`][] object for this `<qds-button>`.\n *\n * [`ValidityState`]: https://developer.mozilla.org/docs/Web/API/ValidityState\n *\n * @readonly\n * @webnative\n */\n @Prop() public readonly validity: ElementInternals['validity'] = VALID_STATE\n\n /**\n * Defines the value associated with the button's `name` when it's submitted\n * with the form data. This value is passed to the server in params when the\n * form is submitted using this button. Ignored when `href` is set.\n *\n * @webnative\n */\n @Prop() public readonly value?: string\n\n /**\n * True if `<qds-button>` will be validated when the form is submitted; false\n * otherwise.\n *\n * @readonly\n * @webnative\n */\n @Prop() public readonly willValidate: ElementInternals['willValidate'] = false\n\n /**\n * Emitted when the button loses focus.\n */\n @Event({ eventName: 'qdsBlur', bubbles: false, cancelable: false })\n private readonly blurEmitter!: EventEmitter<QdsFocusEventDetail>\n\n /**\n * Emitted when the button gains focus.\n */\n @Event({ eventName: 'qdsFocus', bubbles: false, cancelable: false })\n private readonly focusEmitter!: EventEmitter<QdsFocusEventDetail>\n\n @Element() private readonly host!: HTMLQdsButtonElement\n\n @State() private tooltip = false\n\n @AttachInternals() private readonly internals!: ElementInternals\n\n #savedTabIndex = 0\n\n #button?: HTMLAnchorElement | HTMLButtonElement\n\n #span?: HTMLSpanElement\n\n #ro?: ResizeObserver\n\n get #buttonType(): ButtonType {\n if (this.type === undefined)\n return this.internals.form ? 'submit' : 'button'\n return this.type\n }\n\n get #iconOnly(): boolean {\n const hasIcon = this.iconName !== undefined && this.iconName !== ''\n\n return hasIcon && this.iconOnly\n }\n\n get #computedAction(): Action | undefined {\n switch (this.action) {\n case 'dropdown':\n case 'dropdown-close':\n case 'next': {\n return this.action\n }\n default: {\n return undefined\n }\n }\n }\n\n get #computedActionIcon(): Exclude<Action, 'dropdown-close'> | undefined {\n switch (this.action) {\n case 'dropdown':\n case 'next': {\n return this.action\n }\n case 'dropdown-close': {\n return 'dropdown'\n }\n default: {\n return undefined\n }\n }\n }\n\n get #computedDisabled(): boolean {\n return this.disabled ?? false\n }\n\n get #computedImportance(): ButtonImportance {\n switch (this.importance) {\n case 'emphasized':\n case 'subdued':\n case 'destructive':\n case 'subdued-destructive': {\n return this.importance\n }\n default: {\n return 'standard'\n }\n }\n }\n\n get #computedSize(): ButtonSize {\n switch (this.size) {\n case 'small':\n case 'large':\n case 'hero': {\n return this.size\n }\n default: {\n return 'standard'\n }\n }\n }\n\n @Listen('blur')\n protected onBlur(event: FocusEvent): void {\n this.blurEmitter.emit(pickFocusEventAttributes(event))\n }\n\n @Listen('click')\n protected onClick(event: MouseEvent): void {\n if (this.#computedDisabled) {\n event.stopImmediatePropagation()\n return\n }\n\n if (this.#buttonType === 'button' || !this.internals.form) return\n if (this.#buttonType === 'reset') {\n this.internals.form.reset()\n } else {\n this.internals.form.requestSubmit()\n }\n event.preventDefault()\n }\n\n @Listen('focus')\n protected onFocus(event: FocusEvent): void {\n this.focusEmitter.emit(pickFocusEventAttributes(event))\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 @Watch('disabled')\n protected disabledChanged(): void {\n this.internals.ariaDisabled = this.#computedDisabled.toString()\n if (this.#computedDisabled) this.host.removeAttribute('tabindex')\n else this.host.tabIndex = this.#savedTabIndex\n }\n\n @Watch('href')\n protected hrefChanged(): void {\n this.internals.role = this.href === undefined ? 'button' : 'link'\n }\n\n @Watch('tabindex')\n protected tabindexChanged(newValue: string | null): void {\n if (newValue !== null) {\n const parsedValue = Number.parseInt(newValue, 10)\n this.#savedTabIndex =\n Number.isNaN(parsedValue) || !Number.isFinite(parsedValue)\n ? 0\n : parsedValue\n }\n if (this.#computedDisabled) this.host.removeAttribute('tabindex')\n else this.host.tabIndex = this.#savedTabIndex\n }\n\n @Watch('text')\n protected textChanged(): void {\n this.internals.ariaLabel = this.text\n\n if (this.#ro) this.#ro.disconnect()\n if (!this.#span) return\n\n const span = this.#span\n readTask(() => {\n this.tooltip = isOverflowing(span)\n })\n this.#ro = new ResizeObserver(([spanEntry]) => {\n this.tooltip = isOverflowing(spanEntry.target)\n })\n this.#ro.observe(this.#span)\n }\n\n public componentWillLoad(): void {\n this.#defineGetter('form', () => this.internals.form)\n this.#defineGetter('willValidate', () => this.internals.willValidate)\n this.#defineGetter('validity', () => this.internals.validity)\n this.#defineGetter(\n 'validationMessage',\n () => this.internals.validationMessage,\n )\n this.#defineGetter('labels', () => this.internals.labels)\n\n this.hrefChanged()\n this.tabindexChanged(this.host.getAttribute('tabindex') ?? '0')\n this.disabledChanged()\n }\n\n public componentDidLoad(): void {\n this.textChanged()\n }\n\n public disconnectedCallback(): void {\n if (this.#ro) this.#ro.disconnect()\n }\n\n public render() {\n const Tag = this.href === undefined ? 'button' : 'a'\n const hasBadgeProperties =\n this.badgeDescription !== undefined && this.badge !== undefined\n const ariaLabel = hasBadgeProperties\n ? `${this.text} ${this.badge} ${this.badgeDescription}`\n : this.text\n\n return (\n <div\n class=\"qds-container\"\n onClick={this.#onClick}\n onKeyDown={preventDefault}\n onKeyUp={preventDefault}\n onKeyPress={preventDefault}\n aria-hidden=\"true\"\n >\n <Tag\n class={{\n 'qds-button': true,\n 'qds-disabled': Tag === 'a' ? this.#computedDisabled : false,\n 'qds-icon-only': this.#iconOnly,\n }}\n data-importance={this.#computedImportance}\n data-size={this.#computedSize}\n data-action={this.#computedAction}\n disabled={Tag === 'a' ? undefined : this.disabled}\n download={Tag === 'a' ? this.download : undefined}\n formAction={this.formAction}\n formMethod={this.formMethod}\n formNoValidate={this.formNoValidate}\n formTarget={this.formTarget}\n href={Tag === 'a' ? this.href : undefined}\n name={Tag === 'a' ? undefined : this.name}\n ref={this.#buttonRef}\n rel={Tag === 'a' ? this.rel : undefined}\n tabIndex={-1}\n target={Tag === 'a' ? this.target : undefined}\n type={Tag === 'a' ? undefined : this.#buttonType}\n value={Tag === 'a' ? undefined : this.value}\n aria-label={this.#iconOnly ? ariaLabel : undefined}\n >\n {this.iconName !== undefined && this.iconName !== '' && (\n <qds-icon\n class=\"qds-icon\"\n data-size={this.#computedSize}\n library={this.iconLibrary}\n name={this.iconName}\n />\n )}\n {!this.#iconOnly && (\n <span\n class=\"qds-overflow\"\n data-size={this.#computedSize}\n ref={this.#spanRef}\n >\n {this.text}\n </span>\n )}\n {isIndicator(this.badge) && (\n <qds-badge-indicator\n class=\"qds-indicator\"\n status={this.badgeIndicatorStatus}\n description={this.badgeDescription}\n size={this.#computedSize}\n strokeRing\n />\n )}\n {isCounter(this.badge) && (\n <qds-badge-counter\n class={{\n 'qds-indicator': this.#iconOnly,\n }}\n description={this.badgeDescription}\n importance={this.#computedImportance}\n size={this.#computedSize}\n strokeRing\n value={this.badge}\n />\n )}\n {this.#computedActionIcon !== undefined && (\n <qds-icon\n class=\"qds-icon qds-action\"\n data-size={this.#computedSize}\n library=\"core\"\n name={this.#computedActionIcon}\n />\n )}\n </Tag>\n <div\n class={{\n 'qds-focus-ring': true,\n 'qds-icon-only': this.#iconOnly,\n }}\n data-importance={this.#computedImportance}\n data-size={this.#computedSize}\n />\n {this.tooltip && (\n <qds-tooltip ref={this.#tooltipRef}>{this.text}</qds-tooltip>\n )}\n </div>\n )\n }\n\n public checkValidity: ElementInternals['checkValidity'] = () =>\n this.internals.checkValidity()\n\n public reportValidity: ElementInternals['reportValidity'] = () =>\n this.internals.reportValidity()\n\n public setCustomValidity: HTMLButtonElement['setCustomValidity'] = (\n error,\n ) => {\n if (error)\n this.internals.setValidity(CUSTOM_ERROR_FLAGS, error, this.#button)\n else this.internals.setValidity(NO_ERROR_FLAGS)\n }\n\n readonly #buttonRef = (\n button?: HTMLAnchorElement | HTMLButtonElement,\n ): void => {\n this.#button = button\n }\n\n readonly #spanRef = (span?: HTMLSpanElement): void => {\n this.#span = span\n }\n\n readonly #tooltipRef = (tooltip?: HTMLQdsTooltipElement): void => {\n if (tooltip)\n // eslint-disable-next-line no-param-reassign\n tooltip.target = this.host\n }\n\n readonly #onClick = (event: MouseEvent): void => {\n if (this.#computedDisabled) {\n preventDefault(event)\n }\n }\n\n #defineGetter(p: PropertyKey, get: () => unknown): void {\n Object.defineProperty(this.host, p, { enumerable: true, get })\n }\n}\n"],"version":3}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { r as registerInstance, c as createEvent, h, d as getElement } from './index-bc9462c1.js';
|
|
7
|
-
import { p as pickFocusEventAttributes, b as inheritAriaAttributes } from './helpers-
|
|
7
|
+
import { p as pickFocusEventAttributes, b as inheritAriaAttributes } from './helpers-10f68bf3.js';
|
|
8
8
|
import { V as VALID_STATE, C as CUSTOM_ERROR_FLAGS, N as NO_ERROR_FLAGS } from './controls-a4768aaf.js';
|
|
9
9
|
|
|
10
10
|
const checkboxCss = ":host([hidden]){display:none!important}:host{display:inline-block;line-height:0}.qds-box,.qds-checkbox,.qds-icon{grid-area:f;place-self:center}.qds-box,.qds-icon{display:none;pointer-events:none}.qds-box{border-radius:var(--qds-control-toggle-indicator-border-radius)}.qds-container{align-self:flex-start;display:grid;grid-template-areas:\"f\"}.qds-icon{color:var(--qds-theme-signature-color-contrast)}.qds-label{cursor:pointer;display:inline-flex;width:inherit}.qds-label-inner{flex:1 1 auto;min-width:0}.qds-checkbox{-webkit-appearance:none;appearance:none;background-color:var(--qds-theme-control-input-background);border:var(--qds-control-border-width) solid var(--qds-theme-control-border);border-radius:var(--qds-control-border-radius);cursor:pointer;margin:0;-webkit-print-color-adjust:exact;print-color-adjust:exact}.qds-checkbox:focus-visible{outline:var(--qds-theme-focus-border) solid var(--qds-focus-border-width);outline-offset:var(--qds-focus-border-offset)}.qds-checkbox:active~.qds-box,.qds-checkbox:hover~.qds-box{display:block}.qds-checkbox:hover~.qds-box{background-color:var(--qds-theme-signature-color-hover)}.qds-checkbox:active~.qds-box{background-color:var(--qds-theme-signature-color-pressed)}.qds-checkbox:checked~.qds-checked,.qds-checkbox:indeterminate~.qds-indeterminate{display:block}.qds-checkbox:checked,.qds-checkbox:indeterminate{background-color:var(--qds-theme-signature-color-default);border-color:#0000}.qds-checkbox:checked:hover,.qds-checkbox:indeterminate:hover{background-color:var(--qds-theme-signature-color-hover)}.qds-checkbox:checked:active,.qds-checkbox:indeterminate:active{background-color:var(--qds-theme-signature-color-pressed)}[aria-disabled=true]{opacity:var(--qds-theme-disabled);pointer-events:none}.qds-checkbox[data-size=small]{height:var(--qds-control-toggle-box-small-size);width:var(--qds-control-toggle-box-small-size)}.qds-icon[data-size=small]{font-size:var(--qds-control-small-icon-size)}.qds-box[data-size=small]{height:var(--qds-control-toggle-indicator-small-size);width:var(--qds-control-toggle-indicator-small-size)}.qds-inline[data-size=small]{margin-block:var(--qds-control-small-padding-auto-height)}.qds-label[data-size=small]{gap:var(--qds-control-small-gap-siblings-related)}.qds-checkbox[data-size=standard]{height:var(--qds-control-toggle-box-standard-size);width:var(--qds-control-toggle-box-standard-size)}.qds-icon[data-size=standard]{font-size:var(--qds-control-standard-icon-size)}.qds-box[data-size=standard]{height:var(--qds-control-toggle-indicator-standard-size);width:var(--qds-control-toggle-indicator-standard-size)}.qds-inline[data-size=standard]{margin-block:var(--qds-control-standard-padding-auto-height)}.qds-label[data-size=standard]{gap:var(--qds-control-standard-gap-siblings-related)}.qds-checkbox[data-size=large]{height:var(--qds-control-toggle-box-large-size);width:var(--qds-control-toggle-box-large-size)}.qds-icon[data-size=large]{font-size:var(--qds-control-large-icon-size)}.qds-box[data-size=large]{height:var(--qds-control-toggle-indicator-large-size);width:var(--qds-control-toggle-indicator-large-size)}.qds-inline[data-size=large]{margin-block:var(--qds-control-large-padding-auto-height)}.qds-label[data-size=large]{gap:var(--qds-control-large-gap-siblings-related)}";
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { r as registerInstance, c as createEvent, a as readTask, h, d as getElement } from './index-bc9462c1.js';
|
|
7
|
-
import { p as pickFocusEventAttributes, b as inheritAriaAttributes, c as invariant, i as isOverflowing } from './helpers-
|
|
7
|
+
import { p as pickFocusEventAttributes, b as inheritAriaAttributes, c as invariant, i as isOverflowing } from './helpers-10f68bf3.js';
|
|
8
8
|
|
|
9
9
|
const chipCss = ":host([hidden]){display:none!important}:host{display:block}[aria-disabled=true]{opacity:var(--qds-theme-disabled);pointer-events:none}.qds-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.qds-label{display:flex}.qds-container{min-width:0}.qds-target{-webkit-appearance:none;appearance:none;background-color:initial;border:none;color:inherit;cursor:pointer;display:flex;outline:none;padding:0;pointer-events:auto}.qds-target:disabled{pointer-events:none}.qds-alignment{align-items:center;display:flex}.qds-cursor{cursor:pointer}.qds-icon{flex-shrink:0}.qds-closable-chip,.qds-container{align-items:center;-webkit-appearance:none;appearance:none;background-color:initial;border:var(--qds-control-border-width) solid var(--qds-theme-control-border);border-radius:var(--qds-control-rounded-border-radius);box-sizing:border-box;color:var(--qds-theme-control-text-standard);display:inline-flex;justify-content:center;padding-block:0;-webkit-user-select:none;user-select:none}.qds-closable-chip{pointer-events:none}.qds-closable-chip:focus-within{outline:var(--qds-theme-focus-border) solid var(--qds-focus-border-width);outline-offset:var(--qds-focus-border-offset)}.qds-container:hover{background-color:var(--qds-theme-interactive-background-hover)}.qds-checkbox:active~.qds-container,.qds-closable-chip:has(.qds-target:active),.qds-container.qds-pressed-state{background-color:var(--qds-theme-interactive-background-pressed)}.qds-container.qds-selected-state{background-color:var(--qds-theme-interactive-background-selected)}.qds-checkbox{clip-path:inset(50%);margin:0;position:absolute}.qds-checkbox:focus-visible~.qds-container{outline:var(--qds-theme-focus-border) solid var(--qds-focus-border-width);outline-offset:var(--qds-focus-border-offset)}.qds-closable-chip[data-size=small],.qds-container[data-size=small]{gap:var(--qds-control-small-gap-internal);height:var(--qds-control-small-height);padding-inline:var(--qds-control-chip-small-padding-horizontal)}.qds-icon[data-size=small]{--qds-experimental-icon-click-target-size:var(--qds-control-small-height);height:var(--qds-control-small-icon-size);width:var(--qds-control-small-icon-size)}.qds-text[data-size=small]{font:var(--qds-control-small-text);line-height:normal}.qds-closable-chip[data-size=standard],.qds-container[data-size=standard]{gap:var(--qds-control-standard-gap-internal);height:var(--qds-control-standard-height);padding-inline:var(--qds-control-chip-standard-padding-horizontal)}.qds-icon[data-size=standard]{--qds-experimental-icon-click-target-size:var(\n --qds-control-standard-height\n );height:var(--qds-control-standard-icon-size);width:var(--qds-control-standard-icon-size)}.qds-text[data-size=standard]{font:var(--qds-control-standard-text);line-height:normal}.qds-closable-chip[data-size=large],.qds-container[data-size=large]{gap:var(--qds-control-large-gap-internal);height:var(--qds-control-large-height);padding-inline:var(--qds-control-chip-large-padding-horizontal)}.qds-icon[data-size=large]{--qds-experimental-icon-click-target-size:var(--qds-control-large-height);height:var(--qds-control-large-icon-size);width:var(--qds-control-large-icon-size)}.qds-text[data-size=large]{font:var(--qds-control-large-text);line-height:normal}";
|
|
10
10
|
const QdsChipStyle0 = chipCss;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { r as registerInstance, c as createEvent, h, H as Host, d as getElement } from './index-bc9462c1.js';
|
|
7
|
-
import { c as invariant, b as inheritAriaAttributes } from './helpers-
|
|
7
|
+
import { c as invariant, b as inheritAriaAttributes } from './helpers-10f68bf3.js';
|
|
8
8
|
|
|
9
9
|
const dialogCss = ":host([hidden]){display:none!important}:host{display:none;height:-moz-fit-content;height:fit-content;inset:0;position:fixed;width:-moz-fit-content;width:fit-content}:host([open]){display:block}.qds-dialog{background-color:var(--qds-theme-popup-background);border:var(--qds-popup-border-width) solid var(--qds-theme-popup-border);border-radius:var(--qds-popup-border-radius);box-shadow:var(--qds-theme-popup-elevation);height:inherit;padding:0;width:inherit}.qds-dialog::backdrop{background:initial}.qds-dialog[open]~.qds-backdrop{-webkit-backdrop-filter:blur(var(--qds-theme-popup-overlay-blur));backdrop-filter:blur(var(--qds-theme-popup-overlay-blur));background-color:var(--qds-theme-popup-overlay-background);inset:0;opacity:var(--qds-theme-popup-overlay-opacity);position:fixed}.qds-content,.qds-footer,.qds-title{padding:var(--qds-popup-padding) var(--qds-popup-padding) var(--qds-popup-section-padding)}.qds-content{align-items:flex-start;display:flex;flex-direction:column;gap:var(--qds-popup-gap-children-related);height:calc(100% - var(--qds-popup-padding)*2);padding:var(--qds-popup-padding)}::slotted(blockquote),::slotted(button),::slotted(dd),::slotted(dl),::slotted(fieldset),::slotted(figure),::slotted(h1),::slotted(h2),::slotted(h3),::slotted(h4),::slotted(h5),::slotted(h6),::slotted(hr),::slotted(input),::slotted(menu),::slotted(ol),::slotted(p),::slotted(pre),::slotted(select),::slotted(textarea),::slotted(ul){margin:0}";
|
|
10
10
|
const QdsDialogStyle0 = dialogCss;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { r as registerInstance, h } from './index-bc9462c1.js';
|
|
7
|
-
import { a as attachInternals } from './helpers-
|
|
7
|
+
import { a as attachInternals } from './helpers-10f68bf3.js';
|
|
8
8
|
|
|
9
9
|
const dividerCss = ":host([hidden]){display:none!important}:host{display:block}.qds-divider{border:none;height:var(--qds-control-border-width);margin:0;width:100%}.qds-vertical{height:100%;width:var(--qds-control-border-width)}[data-importance=standard]{background-color:var(--qds-theme-divider-standard)}[data-importance=emphasized]{background-color:var(--qds-theme-divider-emphasized)}[data-importance=subdued]{background-color:var(--qds-theme-divider-subdued)}";
|
|
10
10
|
const QdsDividerStyle0 = dividerCss;
|