@quartzds/core 1.0.0-beta.81 → 1.0.0-beta.82
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/index.js +2 -2
- package/components/{p-7b04d43e.js → p-002e77af.js} +656 -328
- package/components/p-002e77af.js.map +1 -0
- package/components/{p-9df62f97.js → p-065d722e.js} +18 -7
- package/components/{p-9df62f97.js.map → p-065d722e.js.map} +1 -1
- package/components/{p-d279ae53.js → p-2e88c3cc.js} +11 -3
- package/components/p-2e88c3cc.js.map +1 -0
- package/components/{p-b82bac0a.js → p-84aae53b.js} +20 -11
- package/components/p-84aae53b.js.map +1 -0
- package/components/{p-698edde1.js → p-86778e81.js} +79 -44
- package/components/p-86778e81.js.map +1 -0
- package/components/{p-028b9d2e.js → p-86a0fdf3.js} +11 -4
- package/components/p-86a0fdf3.js.map +1 -0
- package/components/{p-7f6e797a.js → p-938d74a8.js} +17 -12
- package/components/p-938d74a8.js.map +1 -0
- package/components/{p-82461767.js → p-9a9561a8.js} +8 -80
- package/components/p-9a9561a8.js.map +1 -0
- package/components/{p-f5ba28ff.js → p-ae6eda4e.js} +41 -30
- package/components/p-ae6eda4e.js.map +1 -0
- package/components/{p-f85b490c.js → p-ed500f42.js} +72 -28
- package/components/p-ed500f42.js.map +1 -0
- package/components/{p-355efdb1.js → p-ee2621aa.js} +11 -5
- package/components/p-ee2621aa.js.map +1 -0
- package/components/{p-4141d6ed.js → p-efdb8fa2.js} +2 -2
- package/components/p-efdb8fa2.js.map +1 -0
- package/components/qds-badge-counter.js +1 -1
- package/components/qds-badge-indicator.js +1 -1
- package/components/qds-breadcrumb-item.js +65 -15
- package/components/qds-breadcrumb-item.js.map +1 -1
- package/components/qds-button.js +1 -1
- package/components/qds-checkbox.js +1 -1
- package/components/qds-chip.js +46 -25
- package/components/qds-chip.js.map +1 -1
- package/components/qds-dialog.js +9 -4
- package/components/qds-dialog.js.map +1 -1
- package/components/qds-divider.js +1 -1
- package/components/qds-dropdown.js +25 -18
- package/components/qds-dropdown.js.map +1 -1
- package/components/qds-form-message.js +18 -8
- package/components/qds-form-message.js.map +1 -1
- package/components/qds-icon.js +1 -1
- package/components/qds-inline-link.js +18 -17
- package/components/qds-inline-link.js.map +1 -1
- package/components/qds-input.js +116 -51
- package/components/qds-input.js.map +1 -1
- package/components/qds-label.js +1 -1
- package/components/qds-list-item.js +21 -22
- package/components/qds-list-item.js.map +1 -1
- package/components/qds-loader.js +6 -4
- package/components/qds-loader.js.map +1 -1
- package/components/qds-nav-list-item.js +32 -16
- package/components/qds-nav-list-item.js.map +1 -1
- package/components/qds-progress-bar.js +26 -8
- package/components/qds-progress-bar.js.map +1 -1
- package/components/qds-radio.js +25 -24
- package/components/qds-radio.js.map +1 -1
- package/components/qds-select.js +117 -27
- package/components/qds-select.js.map +1 -1
- package/components/qds-standalone-link.js +26 -19
- package/components/qds-standalone-link.js.map +1 -1
- package/components/qds-switch.js +70 -21
- package/components/qds-switch.js.map +1 -1
- package/components/qds-tab.js +71 -45
- package/components/qds-tab.js.map +1 -1
- package/components/qds-tabbar.js +34 -27
- package/components/qds-tabbar.js.map +1 -1
- package/components/qds-table-body.js +3 -3
- package/components/qds-table-body.js.map +1 -1
- package/components/qds-table-cell.js +3 -5
- package/components/qds-table-cell.js.map +1 -1
- package/components/qds-table-head-cell.js +3 -7
- package/components/qds-table-head-cell.js.map +1 -1
- package/components/qds-table-head.js +3 -3
- package/components/qds-table-head.js.map +1 -1
- package/components/qds-table-row.js +3 -3
- package/components/qds-table-row.js.map +1 -1
- package/components/qds-table.js +3 -3
- package/components/qds-table.js.map +1 -1
- package/components/qds-tag.js +1 -1
- package/components/qds-textarea.js +92 -35
- package/components/qds-textarea.js.map +1 -1
- package/components/qds-title.js +1 -1
- package/components/qds-tooltip.js +1 -1
- package/dist/cjs/helpers-cdd65bd0.js.map +1 -1
- package/dist/cjs/{index-a9985af0.js → index-644fe556.js} +720 -273
- package/dist/cjs/index-644fe556.js.map +1 -0
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/{library-57845012.js → library-1fda56bc.js} +2 -2
- package/dist/cjs/{library-57845012.js.map → library-1fda56bc.js.map} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/qds-badge-counter_2.cjs.entry.js +151 -0
- package/dist/cjs/qds-badge-counter_2.cjs.entry.js.map +1 -0
- package/dist/cjs/qds-breadcrumb-item.cjs.entry.js +53 -12
- package/dist/cjs/qds-breadcrumb-item.cjs.entry.js.map +1 -1
- package/dist/cjs/qds-button.cjs.entry.js +73 -38
- package/dist/cjs/qds-button.cjs.entry.js.map +1 -1
- package/dist/cjs/qds-checkbox.cjs.entry.js +67 -22
- package/dist/cjs/qds-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/qds-chip.cjs.entry.js +43 -21
- package/dist/cjs/qds-chip.cjs.entry.js.map +1 -1
- package/dist/cjs/qds-dialog.cjs.entry.js +8 -3
- package/dist/cjs/qds-dialog.cjs.entry.js.map +1 -1
- package/dist/cjs/qds-divider.cjs.entry.js +9 -3
- package/dist/cjs/qds-divider.cjs.entry.js.map +1 -1
- package/dist/cjs/qds-dropdown.cjs.entry.js +24 -17
- package/dist/cjs/qds-dropdown.cjs.entry.js.map +1 -1
- package/dist/cjs/qds-form-message.cjs.entry.js +16 -6
- package/dist/cjs/qds-form-message.cjs.entry.js.map +1 -1
- package/dist/cjs/qds-icon.cjs.entry.js +7 -5
- package/dist/cjs/qds-icon.cjs.entry.js.map +1 -1
- package/dist/cjs/qds-inline-link.cjs.entry.js +16 -15
- package/dist/cjs/qds-inline-link.cjs.entry.js.map +1 -1
- package/dist/cjs/qds-input.cjs.entry.js +109 -41
- package/dist/cjs/qds-input.cjs.entry.js.map +1 -1
- package/dist/cjs/qds-label.cjs.entry.js +16 -5
- package/dist/cjs/qds-label.cjs.entry.js.map +1 -1
- package/dist/cjs/qds-list-item.cjs.entry.js +17 -18
- package/dist/cjs/qds-list-item.cjs.entry.js.map +1 -1
- package/dist/cjs/qds-loader.cjs.entry.js +5 -3
- package/dist/cjs/qds-loader.cjs.entry.js.map +1 -1
- package/dist/cjs/qds-nav-list-item.cjs.entry.js +29 -13
- package/dist/cjs/qds-nav-list-item.cjs.entry.js.map +1 -1
- package/dist/cjs/qds-progress-bar.cjs.entry.js +26 -8
- package/dist/cjs/qds-progress-bar.cjs.entry.js.map +1 -1
- package/dist/cjs/qds-radio.cjs.entry.js +22 -21
- package/dist/cjs/qds-radio.cjs.entry.js.map +1 -1
- package/dist/cjs/qds-select.cjs.entry.js +114 -23
- package/dist/cjs/qds-select.cjs.entry.js.map +1 -1
- package/dist/cjs/qds-standalone-link.cjs.entry.js +24 -17
- package/dist/cjs/qds-standalone-link.cjs.entry.js.map +1 -1
- package/dist/cjs/qds-switch.cjs.entry.js +68 -18
- package/dist/cjs/qds-switch.cjs.entry.js.map +1 -1
- package/dist/cjs/qds-tab.cjs.entry.js +64 -38
- package/dist/cjs/qds-tab.cjs.entry.js.map +1 -1
- package/dist/cjs/qds-tabbar.cjs.entry.js +27 -20
- package/dist/cjs/qds-tabbar.cjs.entry.js.map +1 -1
- package/dist/cjs/qds-table-body.cjs.entry.js +2 -2
- package/dist/cjs/qds-table-body.cjs.entry.js.map +1 -1
- package/dist/cjs/qds-table-cell.cjs.entry.js +2 -4
- package/dist/cjs/qds-table-cell.cjs.entry.js.map +1 -1
- package/dist/cjs/qds-table-head-cell.cjs.entry.js +2 -6
- package/dist/cjs/qds-table-head-cell.cjs.entry.js.map +1 -1
- package/dist/cjs/qds-table-head.cjs.entry.js +2 -2
- package/dist/cjs/qds-table-head.cjs.entry.js.map +1 -1
- package/dist/cjs/qds-table-row.cjs.entry.js +2 -2
- package/dist/cjs/qds-table-row.cjs.entry.js.map +1 -1
- package/dist/cjs/qds-table.cjs.entry.js +2 -2
- package/dist/cjs/qds-table.cjs.entry.js.map +1 -1
- package/dist/cjs/qds-tag_2.cjs.entry.js +30 -16
- package/dist/cjs/qds-tag_2.cjs.entry.js.map +1 -1
- package/dist/cjs/qds-textarea.cjs.entry.js +90 -30
- package/dist/cjs/qds-textarea.cjs.entry.js.map +1 -1
- package/dist/cjs/{qds-badge-counter_3.cjs.entry.js → qds-tooltip.cjs.entry.js} +40 -152
- package/dist/cjs/qds-tooltip.cjs.entry.js.map +1 -0
- package/dist/cjs/qds.cjs.js +3 -3
- package/dist/cjs/qds.cjs.js.map +1 -1
- package/dist/custom-elements.json +102 -201
- package/dist/docs.d.ts +8 -0
- package/dist/docs.json +870 -630
- package/dist/esm/{helpers-4eb4fa44.js → helpers-d08540f8.js} +2 -2
- package/dist/esm/helpers-d08540f8.js.map +1 -0
- package/dist/esm/{index-5291e8ff.js → index-be1284b6.js} +720 -273
- package/dist/esm/index-be1284b6.js.map +1 -0
- package/dist/esm/index.js +2 -2
- package/dist/esm/{library-9edbe354.js → library-a92b7d9e.js} +2 -2
- package/dist/esm/{library-9edbe354.js.map → library-a92b7d9e.js.map} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/qds-badge-counter_2.entry.js +146 -0
- package/dist/esm/qds-badge-counter_2.entry.js.map +1 -0
- package/dist/esm/qds-breadcrumb-item.entry.js +54 -13
- package/dist/esm/qds-breadcrumb-item.entry.js.map +1 -1
- package/dist/esm/qds-button.entry.js +74 -39
- package/dist/esm/qds-button.entry.js.map +1 -1
- package/dist/esm/qds-checkbox.entry.js +69 -24
- package/dist/esm/qds-checkbox.entry.js.map +1 -1
- package/dist/esm/qds-chip.entry.js +44 -22
- package/dist/esm/qds-chip.entry.js.map +1 -1
- package/dist/esm/qds-dialog.entry.js +9 -4
- package/dist/esm/qds-dialog.entry.js.map +1 -1
- package/dist/esm/qds-divider.entry.js +10 -4
- package/dist/esm/qds-divider.entry.js.map +1 -1
- package/dist/esm/qds-dropdown.entry.js +25 -18
- package/dist/esm/qds-dropdown.entry.js.map +1 -1
- package/dist/esm/qds-form-message.entry.js +17 -7
- package/dist/esm/qds-form-message.entry.js.map +1 -1
- package/dist/esm/qds-icon.entry.js +8 -6
- package/dist/esm/qds-icon.entry.js.map +1 -1
- package/dist/esm/qds-inline-link.entry.js +17 -16
- package/dist/esm/qds-inline-link.entry.js.map +1 -1
- package/dist/esm/qds-input.entry.js +111 -43
- package/dist/esm/qds-input.entry.js.map +1 -1
- package/dist/esm/qds-label.entry.js +17 -6
- package/dist/esm/qds-label.entry.js.map +1 -1
- package/dist/esm/qds-list-item.entry.js +18 -19
- package/dist/esm/qds-list-item.entry.js.map +1 -1
- package/dist/esm/qds-loader.entry.js +5 -3
- package/dist/esm/qds-loader.entry.js.map +1 -1
- package/dist/esm/qds-nav-list-item.entry.js +30 -14
- package/dist/esm/qds-nav-list-item.entry.js.map +1 -1
- package/dist/esm/qds-progress-bar.entry.js +26 -8
- package/dist/esm/qds-progress-bar.entry.js.map +1 -1
- package/dist/esm/qds-radio.entry.js +23 -22
- package/dist/esm/qds-radio.entry.js.map +1 -1
- package/dist/esm/qds-select.entry.js +116 -25
- package/dist/esm/qds-select.entry.js.map +1 -1
- package/dist/esm/qds-standalone-link.entry.js +25 -18
- package/dist/esm/qds-standalone-link.entry.js.map +1 -1
- package/dist/esm/qds-switch.entry.js +70 -20
- package/dist/esm/qds-switch.entry.js.map +1 -1
- package/dist/esm/qds-tab.entry.js +65 -39
- package/dist/esm/qds-tab.entry.js.map +1 -1
- package/dist/esm/qds-tabbar.entry.js +28 -21
- package/dist/esm/qds-tabbar.entry.js.map +1 -1
- package/dist/esm/qds-table-body.entry.js +3 -3
- package/dist/esm/qds-table-body.entry.js.map +1 -1
- package/dist/esm/qds-table-cell.entry.js +3 -5
- package/dist/esm/qds-table-cell.entry.js.map +1 -1
- package/dist/esm/qds-table-head-cell.entry.js +3 -7
- package/dist/esm/qds-table-head-cell.entry.js.map +1 -1
- package/dist/esm/qds-table-head.entry.js +3 -3
- package/dist/esm/qds-table-head.entry.js.map +1 -1
- package/dist/esm/qds-table-row.entry.js +3 -3
- package/dist/esm/qds-table-row.entry.js.map +1 -1
- package/dist/esm/qds-table.entry.js +3 -3
- package/dist/esm/qds-table.entry.js.map +1 -1
- package/dist/esm/qds-tag_2.entry.js +31 -17
- package/dist/esm/qds-tag_2.entry.js.map +1 -1
- package/dist/esm/qds-textarea.entry.js +92 -32
- package/dist/esm/qds-textarea.entry.js.map +1 -1
- package/dist/esm/{qds-badge-counter_3.entry.js → qds-tooltip.entry.js} +42 -152
- package/dist/esm/qds-tooltip.entry.js.map +1 -0
- package/dist/esm/qds.js +4 -4
- package/dist/esm/qds.js.map +1 -1
- package/dist/types/components/breadcrumb-item/breadcrumb-item.d.ts +4 -0
- package/dist/types/components/checkbox/checkbox.d.ts +0 -6
- package/dist/types/components/chip/chip.d.ts +0 -6
- package/dist/types/components/input/input.d.ts +1 -29
- package/dist/types/components/select/select.d.ts +0 -6
- package/dist/types/components/switch/switch.d.ts +0 -6
- package/dist/types/components/tag/tag.d.ts +1 -1
- package/dist/types/components/textarea/textarea.d.ts +1 -28
- package/dist/types/components.d.ts +623 -91
- package/dist/types/stencil-public-runtime.d.ts +6 -0
- package/dist/vscode.html-custom-data.json +0 -80
- package/hydrate/index.d.ts +28 -5
- package/hydrate/index.js +2748 -1041
- package/hydrate/index.mjs +2748 -1041
- package/package.json +3 -3
- package/components/p-028b9d2e.js.map +0 -1
- package/components/p-355efdb1.js.map +0 -1
- package/components/p-4141d6ed.js.map +0 -1
- package/components/p-698edde1.js.map +0 -1
- package/components/p-7b04d43e.js.map +0 -1
- package/components/p-7f6e797a.js.map +0 -1
- package/components/p-82461767.js.map +0 -1
- package/components/p-b82bac0a.js.map +0 -1
- package/components/p-d279ae53.js.map +0 -1
- package/components/p-f5ba28ff.js.map +0 -1
- package/components/p-f85b490c.js.map +0 -1
- package/dist/cjs/index-a9985af0.js.map +0 -1
- package/dist/cjs/qds-badge-counter_3.cjs.entry.js.map +0 -1
- package/dist/esm/helpers-4eb4fa44.js.map +0 -1
- package/dist/esm/index-5291e8ff.js.map +0 -1
- package/dist/esm/qds-badge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AAK,SAAS,GAAG,IAAI,GAAG,IAAI,CAAC,KAAK,CAAA;AACrD,CAAC,2DAyOa,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/textarea/textarea.css?tag=qds-textarea&encapsulation=shadow","src/components/textarea/textarea.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 resize: both;\n}\n\nslot {\n display: none;\n}\n\n.qds-textarea {\n background-color: var(--qds-theme-control-input-background);\n border-radius: var(--qds-control-border-radius);\n border: var(--qds-control-border-width) solid var(--qds-theme-control-border);\n box-sizing: border-box;\n color: var(--qds-theme-control-text-standard);\n height: 100%;\n padding-inline: var(--qds-control-input-padding-horizontal);\n resize: inherit;\n width: 100%;\n\n &:not(:focus)[aria-invalid='true'] {\n border-color: var(--qds-theme-feedback-result-failure);\n }\n\n &:disabled {\n opacity: var(--qds-theme-disabled);\n pointer-events: none;\n }\n\n &:focus-visible {\n outline: var(--qds-control-input-focus-border-width) solid\n var(--qds-theme-control-input-focus-border);\n }\n\n &:placeholder-shown {\n color: var(--qds-theme-control-text-placeholder);\n }\n}\n\n[data-size='small'] {\n font: var(--qds-control-small-text);\n padding-block: var(--qds-control-small-padding-auto-height);\n}\n\n[data-size='standard'] {\n font: var(--qds-control-standard-text);\n padding-block: var(--qds-control-standard-padding-auto-height);\n}\n\n[data-size='large'] {\n font: var(--qds-control-large-text);\n padding-block: var(--qds-control-large-padding-auto-height);\n}\n","// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { ComponentInterface, EventEmitter } from '@stencil/core'\nimport {\n AttachInternals,\n Component,\n Element,\n Event,\n h,\n Host,\n Listen,\n Prop,\n State,\n Watch,\n} from '@stencil/core'\n\nimport type {\n Attributes,\n QdsFocusEventDetail,\n QdsInputEventDetail,\n} from '../../helpers'\nimport {\n inheritAriaAttributes,\n invariant,\n pickFocusEventAttributes,\n pickInputEventAttributes,\n} from '../../helpers'\nimport type {\n AutoCapitalize,\n EnterKeyHint,\n InputMode,\n Value,\n} from '../controls'\nimport { CUSTOM_ERROR_FLAGS, NO_ERROR_FLAGS, VALID_STATE } from '../controls'\nimport type { Size } from '../shared'\n\nexport type TextAreaAutoComplete = 'off' | 'on'\n// TODO: `hard` value isn't supported by Firefox or Safari\nexport type Wrap = 'off' | 'soft'\n\n/**\n * The `<qds-textarea>` element represents a multi-line plain-text editing\n * control, useful when you want to allow users to enter a sizeable amount of\n * free-form text, for example a comment on a review or feedback form.\n *\n * @see https://quartz.se.com/build/components/textarea\n */\n@Component({\n tag: 'qds-textarea',\n formAssociated: true,\n shadow: { delegatesFocus: true },\n styleUrl: 'textarea.css',\n})\nexport class TextArea implements ComponentInterface {\n /**\n * The textarea's size.\n *\n * > **_NOTE:_** The native [`size` HTML attribute][] is not supported. CSS\n * `width` should be used instead if this functionality is needed.\n *\n * [`size` HTML attribute]: https://developer.mozilla.org/docs/Web/HTML/Attributes/size\n */\n @Prop() public readonly size?: Size = 'standard'\n\n /**\n * Controls whether and how input is automatically capitalized as it is\n * entered/edited by the user. Possible values:\n *\n * - `\"off\"` or `\"none\"`: No auto-capitalization is applied (all letters\n * default to lowercase).\n * - `\"on\"` or `\"sentences\"`: The first letter of each sentence defaults to a\n * capital letter; all other letters default to lowercase.\n * - `\"words\"`: The first letter of each word defaults to a capital letter;\n * all other letters default to lowercase.\n * - `\"characters\"`: All letters default to uppercase.\n *\n * @webnative\n */\n @Prop({ attribute: 'autocapitalize' })\n public readonly autoCapitalize?: AutoCapitalize\n\n /**\n * Indicates whether the value of the textarea can be automatically completed\n * by the browser. Possible values:\n *\n * `off`: The user must explicitly enter a value into this field for every\n * use, or the document provides its own auto-completion method; the browser\n * does not automatically complete the entry.\n * `on`: The browser can automatically complete the value based on values\n * that the user has entered during previous uses.\n *\n * If the `autocomplete` attribute is not specified on a `<qds-textarea>`\n * element, then the browser uses the `autocomplete` attribute value of the\n * `<qds-textarea>` element's form owner. The form owner is either the\n * [`<form>`][] element that this `<qds-textarea>` element is a descendant of\n * or the form element whose `id` is specified by the `form` attribute of the\n * `qds-textarea` element. For more information, see the [`autocomplete`]\n * attribute in [`<form>`][].\n *\n * [`<form>`]: https://developer.mozilla.org/docs/Web/HTML/Element/form\n * [`autocomplete`]: https://developer.mozilla.org/docs/Web/HTML/Element/form#autocomplete\n *\n * @webnative\n */\n @Prop({ attribute: 'autocomplete' })\n public readonly autoComplete?: TextAreaAutoComplete\n\n /**\n * Specify whether the input should have focus when the page loads.\n *\n * @webnative\n */\n @Prop({ attribute: 'autofocus' }) public readonly autoFocus?: boolean\n\n /**\n * The visible width of the text control, in average character widths. If it\n * is specified, it must be a positive integer. If it is not specified, the\n * default value is `20`.\n *\n * @webnative\n */\n @Prop() public readonly cols?: number\n\n /**\n * Prevents the textarea from being interacted with: it cannot be pressed or\n * focused.\n *\n * @webnative\n */\n @Prop() public disabled?: boolean\n\n /**\n * What action label (or icon) to present for the enter key on virtual\n * keyboards. Possible values:\n *\n * - `\"done\"`: Typically meaning there is nothing more to input and the input\n * method editor (IME) will be closed.\n * - `\"enter\"`:\tTypically inserting a new line.\n * - `\"go\"`: \tTypically meaning to take the user to the target of the text\n * they typed.\n * - `\"next\"`: \tTypically taking the user to the next field that will accept\n * text.\n * - `\"previous\"`: Typically taking the user to the previous field that will\n * accept text.\n * - `\"search\"`: Typically taking the user to the results of searching for\n * the text they have typed.\n * - `\"send\"`: Typically delivering the text to its target.\n *\n * @webnative\n */\n // FIXME: Can't use `attribute` option here to name this `enterKeyHint` instead.\n @Prop() public readonly enterkeyhint?: EnterKeyHint\n\n /**\n * The [`<form>`][] element to associate the input 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-textarea>` is associated\n * with its ancestor `<form>` element, if any.\n *\n * This attribute lets you associate `<qds-textarea>` 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 * Provide a hint to browsers as to the type of virtual keyboard\n * configuration to use when editing this element or its contents.\n *\n * @webnative\n */\n // FIXME: Can't use `attribute` option here to name this `inputMode` instead.\n @Prop() public readonly inputmode?: InputMode\n\n /**\n * Returns a list of the [`<label>`][] elements associated with the\n * `qds-textarea` 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 * The maximum number of characters (as UTF-16 code units) the user can enter\n * into the textarea. This must be an non-negative integer value. If no\n * `maxlength` is specified, or an invalid value is specified, the textarea\n * has no maximum length.\n *\n * The textarea will fail [constraint validation][] if the length of the text\n * entered into the field is greater than `maxlength` UTF-16 code units long.\n * By default, browsers prevent users from entering more characters than\n * allowed by the `maxlength` attribute. See [Client-side validation][] for\n * more information.\n *\n * [constraint validation]: https://developer.mozilla.org/docs/Web/Guide/HTML/Constraint_validation\n * [Client-side validation]: https://developer.mozilla.org/docs/Web/HTML/Element/input#client-side_validation\n *\n * @webnative\n */\n @Prop({ attribute: 'maxlength' }) public readonly maxLength?: number\n\n /**\n * The minimum number of characters (as UTF-16 code units) the user can enter\n * into the textarea. This must be an non-negative integer value smaller than\n * or equal to the value specified by `maxlength`. If no `minlength` is\n * specified, or an invalid value is specified, the textarea has no minimum\n * length.\n *\n * The textarea will fail [constraint validation][] if the length of the text\n * entered into the field is fewer than `minlength` UTF-16 code units long,\n * preventing form submission. See [Client-side validation][] for more\n * information.\n *\n * [constraint validation]: https://developer.mozilla.org/docs/Web/Guide/HTML/Constraint_validation\n * [Client-side validation]: https://developer.mozilla.org/docs/Web/HTML/Element/input#client-side_validation\n *\n * @webnative\n */\n @Prop({ attribute: 'minlength' }) public readonly minLength?: number\n\n /**\n * The name of the textarea, which is submitted with the form data.\n *\n * @webnative\n */\n @Prop() public readonly name?: string\n\n /**\n * Text that appears in the textarea when it has no value set.\n *\n * @webnative\n */\n @Prop() public readonly placeholder?: string\n\n /**\n * A value must be specified for the textarea before the owning form can be\n * submitted.\n *\n * See [Client-side validation][] and the [HTML attribute: `required`][] for\n * more information.\n *\n * [Client-side validation]: https://developer.mozilla.org/docs/Web/HTML/Element/input#client-side_validation\n * [HTML attribute: `required`]: https://developer.mozilla.org/docs/Web/HTML/Attributes/required\n *\n * @webnative\n */\n @Prop() public readonly required?: boolean\n\n /**\n * The number of visible text lines for the control. If it is specified, it\n * must be a positive integer. If it is not specified, the default value is\n * `2`.\n *\n * @webnative\n */\n @Prop() public readonly rows?: number\n\n /**\n * Get or set the selection direction of a text selection.\n *\n * > **_NOTE:_** This property has no effect when used as an attribute.\n *\n * @webnative\n */\n @Prop({ mutable: true })\n // FIXME: Use `HTMLTextAreaElement['selectionDirection']` instead.\n // eslint-disable-next-line unicorn/no-null\n public selectionDirection: HTMLInputElement['selectionDirection'] = null\n\n /**\n * Get or set the ending position or offset of a text selection.\n *\n * > **_NOTE:_** This property has no effect when used as an attribute.\n *\n * @webnative\n */\n @Prop({ mutable: true })\n // FIXME: Use `HTMLTextAreaElement['selectionEnd']` instead.\n // eslint-disable-next-line unicorn/no-null\n public selectionEnd: HTMLInputElement['selectionEnd'] = null\n\n /**\n * Get or set the starting position or offset of a text selection.\n *\n * > **_NOTE:_** This property has no effect when used as an attribute.\n *\n * @webnative\n */\n @Prop({ mutable: true })\n // FIXME: Use `HTMLTextAreaElement['selectionStart']` instead.\n // eslint-disable-next-line unicorn/no-null\n public selectionStart: HTMLInputElement['selectionStart'] = null\n\n /**\n * Defines whether the textarea may be checked for spelling errors.\n *\n * @webnative\n */\n @Prop({ attribute: 'spellcheck' }) public readonly spellCheck?: boolean\n\n /**\n * The error message that would be shown to the user if the `<qds-select>`\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-select>`.\n *\n * [`ValidityState`]: https://developer.mozilla.org/docs/Web/API/ValidityState\n *\n * @readonly\n * @webnative\n */\n @Prop() public readonly validity: ElementInternals['validity'] = VALID_STATE\n\n /**\n * The value of the textarea.\n *\n * @webnative\n */\n @Prop({ mutable: true }) public value?: Value\n\n /**\n * True if `<qds-textarea>` will be validated when the form is submitted;\n * false otherwise.\n *\n * @readonly\n * @webnative\n */\n @Prop() public readonly willValidate: ElementInternals['willValidate'] = false\n\n /**\n * Indicates how the control should wrap the value for form submission.\n * Possible values are:\n *\n * - `hard`: The browser automatically inserts line breaks (`CR+LF`) so that\n * each line is no longer than the width of the control; the `cols` attribute\n * must be specified for this to take effect\n * - `soft`: The browser ensures that all line breaks in the entered value\n * are a `CR+LF` pair, but no additional line breaks are added to the value.\n * - `off`: Like `soft` but changes appearance to `white-space: pre` so line\n * segments exceeding `cols` are not wrapped and the `<qds-textarea>` becomes\n * horizontally scrollable.\n *\n * If this attribute is not specified, `soft` is its default value.\n *\n * @webnative\n */\n @Prop() public readonly wrap?: Wrap\n\n @AttachInternals() private readonly internals!: ElementInternals\n\n /**\n * Emitted when the textarea loses focus.\n */\n @Event({ eventName: 'qdsBlur', bubbles: false, cancelable: false })\n private readonly blurEmitter!: EventEmitter<QdsFocusEventDetail>\n\n /**\n * Emitted when an alteration to the textarea's value is committed by the\n * user.\n */\n @Event({ eventName: 'qdsChange', cancelable: false })\n private readonly changeEmitter!: EventEmitter<void>\n\n /**\n * Emitted when the textarea gains focus.\n */\n @Event({ eventName: 'qdsFocus', bubbles: false, cancelable: false })\n private readonly focusEmitter!: EventEmitter<QdsFocusEventDetail>\n\n /**\n * Emitted when the textarea's value changes.\n */\n @Event({ eventName: 'qdsInput', cancelable: false })\n private readonly inputEmitter!: EventEmitter<QdsInputEventDetail>\n\n @Element() private readonly host!: HTMLQdsTextareaElement\n\n @State() private invalid = false\n\n @State() private tabIndex?: number\n\n #inheritedAttributes: Attributes = {}\n\n #textarea?: HTMLTextAreaElement\n\n get #computedDisabled(): boolean {\n return (\n (this.host.matches(':disabled') || (this.disabled ?? false)) &&\n this.host.getAttribute('disabled') !== 'false'\n )\n }\n\n get #computedValue(): Parameters<ElementInternals['setFormValue']>[0] {\n if (typeof this.value === 'number') return this.value.toString()\n // eslint-disable-next-line unicorn/no-null\n return this.value === undefined ? null : this.value\n }\n\n @Listen('click')\n protected onClick(event: MouseEvent): void {\n if (this.#computedDisabled) event.stopImmediatePropagation()\n }\n\n @Watch('disabled')\n protected disabledChanged(): void {\n if (this.#computedDisabled)\n // eslint-disable-next-line unicorn/no-null\n this.internals.setFormValue(null)\n else this.internals.setFormValue(this.#computedValue)\n }\n\n @Watch('selectionDirection')\n protected selectionDirectionChanged(): void {\n invariant(this.#textarea)\n\n // @ts-expect-error: `null` is a valid value according to the HTML spec.\n this.#textarea.selectionDirection = this.selectionDirection\n }\n\n @Watch('selectionEnd')\n protected selectionEndChanged(): void {\n invariant(this.#textarea)\n\n // @ts-expect-error: `null` is a valid value according to the HTML spec.\n this.#textarea.selectionEnd = this.selectionEnd\n }\n\n @Watch('selectionStart')\n protected selectionStartChanged(): void {\n invariant(this.#textarea)\n\n // @ts-expect-error: `null` is a valid value according to the HTML spec.\n this.#textarea.selectionStart = this.selectionStart\n }\n\n @Watch('tabindex')\n protected tabindexChanged(newValue: string): void {\n const parsedValue = Number.parseInt(newValue, 10)\n this.tabIndex =\n parsedValue === 0 || Number.isNaN(parsedValue) ? undefined : parsedValue\n }\n\n @Watch('maxLength')\n @Watch('minLength')\n @Watch('required')\n @Watch('value')\n protected validationChanged(): void {\n invariant(this.#textarea)\n\n if (this.maxLength !== undefined) this.#textarea.maxLength = this.maxLength\n if (this.minLength !== undefined) this.#textarea.minLength = this.minLength\n this.#textarea.required = this.required ?? false\n // eslint-disable-next-line unicorn/no-null\n if (this.value != null) this.#textarea.value = this.value.toString()\n\n const { valid } = this.#textarea.validity\n if (valid)\n this.internals.setValidity(NO_ERROR_FLAGS, undefined, this.#textarea)\n else\n this.internals.setValidity(\n this.#textarea.validity,\n this.#textarea.validationMessage,\n this.#textarea,\n )\n this.invalid = !valid\n }\n\n @Watch('value')\n protected valueChanged(): void {\n if (!this.#computedDisabled)\n this.internals.setFormValue(this.#computedValue)\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.#defineGetter('selectionDirection', this.#getSelectionDirection)\n this.#defineGetter('selectionStart', this.#getSelectionStart)\n this.#defineGetter('selectionEnd', this.#getSelectionEnd)\n\n this.#inheritedAttributes = inheritAriaAttributes(this.host)\n this.tabindexChanged(this.host.getAttribute('tabindex') ?? '0')\n }\n\n public componentDidLoad(): void {\n invariant(this.#textarea)\n\n this.validationChanged()\n this.valueChanged()\n }\n\n public render() {\n return (\n <Host>\n <textarea\n aria-invalid={this.invalid.toString()}\n autoCapitalize={this.autoCapitalize}\n autoComplete={this.autoComplete}\n // eslint-disable-next-line jsx-a11y/no-autofocus\n autoFocus={this.autoFocus}\n class=\"qds-textarea\"\n cols={this.cols}\n data-size={this.size ?? 'standard'}\n disabled={this.disabled}\n enterKeyHint={this.enterkeyhint}\n inputMode={this.inputmode}\n maxLength={this.maxLength}\n minLength={this.minLength}\n onBlur={this.#onBlur}\n onChange={this.#onChange}\n onFocus={this.#onFocus}\n onInput={this.#onInput}\n placeholder={this.placeholder}\n ref={this.#ref}\n rows={this.rows}\n spellcheck={this.spellCheck}\n tabIndex={this.#computedDisabled ? undefined : this.tabIndex}\n wrap={this.wrap}\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...this.#inheritedAttributes}\n />\n <slot onSlotchange={this.#onSlotchange} />\n </Host>\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: HTMLTextAreaElement['setCustomValidity'] = (\n error,\n ) => {\n if (error)\n this.internals.setValidity(CUSTOM_ERROR_FLAGS, error, this.#textarea)\n else this.internals.setValidity(NO_ERROR_FLAGS)\n this.invalid = !!error\n }\n\n public select: HTMLTextAreaElement['select'] = () => {\n invariant(this.#textarea)\n\n this.#textarea.select()\n }\n\n public setRangeText = (\n replacement: string,\n start: number,\n end: number,\n selectionMode?: SelectionMode,\n ): void => {\n invariant(this.#textarea)\n\n this.#textarea.setRangeText(replacement, start, end, selectionMode)\n\n if (this.value !== this.#textarea.value) {\n this.value = this.#textarea.value\n this.inputEmitter.emit()\n this.changeEmitter.emit()\n }\n }\n\n public setSelectionRange: HTMLTextAreaElement['setSelectionRange'] = (\n start,\n end,\n direction,\n ) => {\n invariant(this.#textarea)\n\n this.#textarea.setSelectionRange(start, end, direction)\n }\n\n readonly #getSelectionDirection: () => HTMLTextAreaElement['selectionDirection'] =\n () => {\n invariant(this.#textarea)\n\n return this.#textarea.selectionDirection\n }\n\n readonly #getSelectionStart: () => HTMLTextAreaElement['selectionStart'] =\n () => {\n invariant(this.#textarea)\n\n return this.#textarea.selectionStart\n }\n\n readonly #getSelectionEnd: () => HTMLTextAreaElement['selectionEnd'] = () => {\n invariant(this.#textarea)\n\n return this.#textarea.selectionEnd\n }\n\n readonly #ref = (textarea?: HTMLTextAreaElement): void => {\n this.#textarea = textarea\n }\n\n readonly #onBlur = (event: FocusEvent): void => {\n this.blurEmitter.emit(pickFocusEventAttributes(event))\n }\n\n readonly #onChange = (): void => {\n this.changeEmitter.emit()\n }\n\n readonly #onFocus = (event: FocusEvent): void => {\n this.focusEmitter.emit(pickFocusEventAttributes(event))\n }\n\n readonly #onInput = (event: InputEvent): void => {\n invariant(this.#textarea)\n\n this.value = this.#textarea.value\n this.inputEmitter.emit(pickInputEventAttributes(event))\n }\n\n readonly #onSlotchange = (): void => {\n invariant(this.#textarea)\n this.#textarea.innerHTML = this.host.innerHTML\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-textarea.entry.js","mappings":";;;;;;;;;AAAA,MAAM,WAAW,GAAG,sqCAAsqC,CAAC;AAC3rC,0BAAe,WAAW;;ACD1B;AACA;AACA;;;;;;;;;;;;;;;;;;MAgDa,QAAQ;IANrB;;;;;;;;;;;;;;;;;;;;;;QAe0B,SAAI,GAAU,UAAU,CAAA;;;;;;;;;;;;;;;;;;QAoFxB,SAAI,GAAsC,IAAI,CAAA;;;;;;;;;;QAoB9C,WAAM,GAC5B,EAAgC,CAAA;;;;;;;;QAuF3B,uBAAkB,GAA2C,IAAI,CAAA;;;;;;;;QAYjE,iBAAY,GAAqC,IAAI,CAAA;;;;;;;;QAYrD,mBAAc,GAAuC,IAAI,CAAA;;;;;;;;QAUhD,sBAAiB,GAA0C,EAAE,CAAA;;;;;;;;;QAUrD,aAAQ,GAAiC,WAAW,CAAA;;;;;;;;QAgBpD,iBAAY,GAAqC,KAAK,CAAA;QAkD7D,YAAO,GAAG,KAAK,CAAA;QAIhC,wCAAmC,EAAE,EAAA;QAErC,qCAA+B;QAsJxB,kBAAa,GAAsC,MACxD,IAAI,CAAC,SAAS,CAAC,aAAa,EAAE,CAAA;QAEzB,mBAAc,GAAuC,MAC1D,IAAI,CAAC,SAAS,CAAC,cAAc,EAAE,CAAA;QAE1B,sBAAiB,GAA6C,CACnE,KAAK;YAEL,IAAI,KAAK;gB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AE,IAAI,CAAC,IAAI,EACf,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC,UAAU,EAChC,QAAQ,EAAE,uBAAA,IAAI,2DAAkB,GAAG,SAAS,GAAG,IAAI,CAAC,QAAQ,EAC5D,IAAI,EAAE,IAAI,CAAC,IAAI,KAEX,uBAAA,IAAI,qCAAqB,GAC7B,EACF,6DAAM,YAAY,EAAE,uBAAA,IAAI,8BAAc,GAAI,CACrC,EACR;KACF;;;;;;;;;;;;;;;;;IAjJC,QACE,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC,QAAQ,IAAI,KAAK,CAAC;QAC3D,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,KAAK,OAAO,EAC/C;AACH,CAAC;IAGC,IAAI,OAAO,IAAI,CAAC,KAAK,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAA;;IAEhE,OAAO,IAAI,CAAC,KAAK,KAAK,SAAS,GAAG,IAAI,GAAG,IAAI,CAAC,KAAK,CAAA;AACrD,CAAC,2DAyOa,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/textarea/textarea.css?tag=qds-textarea&encapsulation=shadow","src/components/textarea/textarea.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 resize: both;\n}\n\nslot {\n display: none;\n}\n\n.qds-textarea {\n background-color: var(--qds-theme-control-input-background);\n border-radius: var(--qds-control-border-radius);\n border: var(--qds-control-border-width) solid var(--qds-theme-control-border);\n box-sizing: border-box;\n color: var(--qds-theme-control-text-standard);\n height: 100%;\n padding-inline: var(--qds-control-input-padding-horizontal);\n resize: inherit;\n width: 100%;\n\n &:not(:focus)[aria-invalid='true'] {\n border-color: var(--qds-theme-feedback-result-failure);\n }\n\n &:disabled {\n opacity: var(--qds-theme-disabled);\n pointer-events: none;\n }\n\n &:focus-visible {\n outline: var(--qds-control-input-focus-border-width) solid\n var(--qds-theme-control-input-focus-border);\n }\n\n &:placeholder-shown {\n color: var(--qds-theme-control-text-placeholder);\n }\n}\n\n[data-size='small'] {\n font: var(--qds-control-small-text);\n padding-block: var(--qds-control-small-padding-auto-height);\n}\n\n[data-size='standard'] {\n font: var(--qds-control-standard-text);\n padding-block: var(--qds-control-standard-padding-auto-height);\n}\n\n[data-size='large'] {\n font: var(--qds-control-large-text);\n padding-block: var(--qds-control-large-padding-auto-height);\n}\n","// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { ComponentInterface, EventEmitter } from '@stencil/core'\nimport {\n AttachInternals,\n Component,\n Element,\n Event,\n h,\n Host,\n Listen,\n Prop,\n State,\n Watch,\n} from '@stencil/core'\n\nimport type {\n Attributes,\n QdsFocusEventDetail,\n QdsInputEventDetail,\n} from '../../helpers'\nimport {\n inheritAriaAttributes,\n invariant,\n pickFocusEventAttributes,\n pickInputEventAttributes,\n} from '../../helpers'\nimport type { EnterKeyHint, InputMode, Value } from '../controls'\nimport { CUSTOM_ERROR_FLAGS, NO_ERROR_FLAGS, VALID_STATE } from '../controls'\nimport type { Size } from '../shared'\n\nexport type TextAreaAutoComplete = 'off' | 'on'\n// TODO: `hard` value isn't supported by Firefox or Safari\nexport type Wrap = 'off' | 'soft'\n\n/**\n * The `<qds-textarea>` element represents a multi-line plain-text editing\n * control, useful when you want to allow users to enter a sizeable amount of\n * free-form text, for example a comment on a review or feedback form.\n *\n * @see https://quartz.se.com/build/components/textarea\n */\n@Component({\n tag: 'qds-textarea',\n formAssociated: true,\n shadow: { delegatesFocus: true },\n styleUrl: 'textarea.css',\n})\nexport class TextArea implements ComponentInterface {\n /**\n * The textarea's size.\n *\n * > **_NOTE:_** The native [`size` HTML attribute][] is not supported. CSS\n * `width` should be used instead if this functionality is needed.\n *\n * [`size` HTML attribute]: https://developer.mozilla.org/docs/Web/HTML/Attributes/size\n */\n @Prop() public readonly size?: Size = 'standard'\n\n /**\n * Indicates whether the value of the textarea can be automatically completed\n * by the browser. Possible values:\n *\n * `off`: The user must explicitly enter a value into this field for every\n * use, or the document provides its own auto-completion method; the browser\n * does not automatically complete the entry.\n * `on`: The browser can automatically complete the value based on values\n * that the user has entered during previous uses.\n *\n * If the `autocomplete` attribute is not specified on a `<qds-textarea>`\n * element, then the browser uses the `autocomplete` attribute value of the\n * `<qds-textarea>` element's form owner. The form owner is either the\n * [`<form>`][] element that this `<qds-textarea>` element is a descendant of\n * or the form element whose `id` is specified by the `form` attribute of the\n * `qds-textarea` element. For more information, see the [`autocomplete`]\n * attribute in [`<form>`][].\n *\n * [`<form>`]: https://developer.mozilla.org/docs/Web/HTML/Element/form\n * [`autocomplete`]: https://developer.mozilla.org/docs/Web/HTML/Element/form#autocomplete\n *\n * @webnative\n */\n @Prop({ attribute: 'autocomplete' })\n public readonly autoComplete?: TextAreaAutoComplete\n\n /**\n * The visible width of the text control, in average character widths. If it\n * is specified, it must be a positive integer. If it is not specified, the\n * default value is `20`.\n *\n * @webnative\n */\n @Prop() public readonly cols?: number\n\n /**\n * Prevents the textarea from being interacted with: it cannot be pressed or\n * focused.\n *\n * @webnative\n */\n @Prop() public disabled?: boolean\n\n /**\n * What action label (or icon) to present for the enter key on virtual\n * keyboards. Possible values:\n *\n * - `\"done\"`: Typically meaning there is nothing more to input and the input\n * method editor (IME) will be closed.\n * - `\"enter\"`:\tTypically inserting a new line.\n * - `\"go\"`: \tTypically meaning to take the user to the target of the text\n * they typed.\n * - `\"next\"`: \tTypically taking the user to the next field that will accept\n * text.\n * - `\"previous\"`: Typically taking the user to the previous field that will\n * accept text.\n * - `\"search\"`: Typically taking the user to the results of searching for\n * the text they have typed.\n * - `\"send\"`: Typically delivering the text to its target.\n *\n * @webnative\n */\n // FIXME: Can't use `attribute` option here to name this `enterKeyHint` instead.\n @Prop() public readonly enterkeyhint?: EnterKeyHint\n\n /**\n * The [`<form>`][] element to associate the input 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-textarea>` is associated\n * with its ancestor `<form>` element, if any.\n *\n * This attribute lets you associate `<qds-textarea>` 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 * Provide a hint to browsers as to the type of virtual keyboard\n * configuration to use when editing this element or its contents.\n *\n * @webnative\n */\n // FIXME: Can't use `attribute` option here to name this `inputMode` instead.\n @Prop() public readonly inputmode?: InputMode\n\n /**\n * Returns a list of the [`<label>`][] elements associated with the\n * `qds-textarea` 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 * The maximum number of characters (as UTF-16 code units) the user can enter\n * into the textarea. This must be an non-negative integer value. If no\n * `maxlength` is specified, or an invalid value is specified, the textarea\n * has no maximum length.\n *\n * The textarea will fail [constraint validation][] if the length of the text\n * entered into the field is greater than `maxlength` UTF-16 code units long.\n * By default, browsers prevent users from entering more characters than\n * allowed by the `maxlength` attribute. See [Client-side validation][] for\n * more information.\n *\n * [constraint validation]: https://developer.mozilla.org/docs/Web/Guide/HTML/Constraint_validation\n * [Client-side validation]: https://developer.mozilla.org/docs/Web/HTML/Element/input#client-side_validation\n *\n * @webnative\n */\n @Prop({ attribute: 'maxlength' }) public readonly maxLength?: number\n\n /**\n * The minimum number of characters (as UTF-16 code units) the user can enter\n * into the textarea. This must be an non-negative integer value smaller than\n * or equal to the value specified by `maxlength`. If no `minlength` is\n * specified, or an invalid value is specified, the textarea has no minimum\n * length.\n *\n * The textarea will fail [constraint validation][] if the length of the text\n * entered into the field is fewer than `minlength` UTF-16 code units long,\n * preventing form submission. See [Client-side validation][] for more\n * information.\n *\n * [constraint validation]: https://developer.mozilla.org/docs/Web/Guide/HTML/Constraint_validation\n * [Client-side validation]: https://developer.mozilla.org/docs/Web/HTML/Element/input#client-side_validation\n *\n * @webnative\n */\n @Prop({ attribute: 'minlength' }) public readonly minLength?: number\n\n /**\n * The name of the textarea, which is submitted with the form data.\n *\n * @webnative\n */\n @Prop() public readonly name?: string\n\n /**\n * Text that appears in the textarea when it has no value set.\n *\n * @webnative\n */\n @Prop() public readonly placeholder?: string\n\n /**\n * A value must be specified for the textarea before the owning form can be\n * submitted.\n *\n * See [Client-side validation][] and the [HTML attribute: `required`][] for\n * more information.\n *\n * [Client-side validation]: https://developer.mozilla.org/docs/Web/HTML/Element/input#client-side_validation\n * [HTML attribute: `required`]: https://developer.mozilla.org/docs/Web/HTML/Attributes/required\n *\n * @webnative\n */\n @Prop() public readonly required?: boolean\n\n /**\n * The number of visible text lines for the control. If it is specified, it\n * must be a positive integer. If it is not specified, the default value is\n * `2`.\n *\n * @webnative\n */\n @Prop() public readonly rows?: number\n\n /**\n * Get or set the selection direction of a text selection.\n *\n * > **_NOTE:_** This property has no effect when used as an attribute.\n *\n * @webnative\n */\n @Prop({ mutable: true })\n // FIXME: Use `HTMLTextAreaElement['selectionDirection']` instead.\n // eslint-disable-next-line unicorn/no-null\n public selectionDirection: HTMLInputElement['selectionDirection'] = null\n\n /**\n * Get or set the ending position or offset of a text selection.\n *\n * > **_NOTE:_** This property has no effect when used as an attribute.\n *\n * @webnative\n */\n @Prop({ mutable: true })\n // FIXME: Use `HTMLTextAreaElement['selectionEnd']` instead.\n // eslint-disable-next-line unicorn/no-null\n public selectionEnd: HTMLInputElement['selectionEnd'] = null\n\n /**\n * Get or set the starting position or offset of a text selection.\n *\n * > **_NOTE:_** This property has no effect when used as an attribute.\n *\n * @webnative\n */\n @Prop({ mutable: true })\n // FIXME: Use `HTMLTextAreaElement['selectionStart']` instead.\n // eslint-disable-next-line unicorn/no-null\n public selectionStart: HTMLInputElement['selectionStart'] = null\n\n /**\n * The error message that would be shown to the user if the `<qds-select>`\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-select>`.\n *\n * [`ValidityState`]: https://developer.mozilla.org/docs/Web/API/ValidityState\n *\n * @readonly\n * @webnative\n */\n @Prop() public readonly validity: ElementInternals['validity'] = VALID_STATE\n\n /**\n * The value of the textarea.\n *\n * @webnative\n */\n @Prop({ mutable: true }) public value?: Value\n\n /**\n * True if `<qds-textarea>` will be validated when the form is submitted;\n * false otherwise.\n *\n * @readonly\n * @webnative\n */\n @Prop() public readonly willValidate: ElementInternals['willValidate'] = false\n\n /**\n * Indicates how the control should wrap the value for form submission.\n * Possible values are:\n *\n * - `hard`: The browser automatically inserts line breaks (`CR+LF`) so that\n * each line is no longer than the width of the control; the `cols` attribute\n * must be specified for this to take effect\n * - `soft`: The browser ensures that all line breaks in the entered value\n * are a `CR+LF` pair, but no additional line breaks are added to the value.\n * - `off`: Like `soft` but changes appearance to `white-space: pre` so line\n * segments exceeding `cols` are not wrapped and the `<qds-textarea>` becomes\n * horizontally scrollable.\n *\n * If this attribute is not specified, `soft` is its default value.\n *\n * @webnative\n */\n @Prop() public readonly wrap?: Wrap\n\n @AttachInternals() private readonly internals!: ElementInternals\n\n /**\n * Emitted when the textarea loses focus.\n */\n @Event({ eventName: 'qdsBlur', bubbles: false, cancelable: false })\n private readonly blurEmitter!: EventEmitter<QdsFocusEventDetail>\n\n /**\n * Emitted when an alteration to the textarea's value is committed by the\n * user.\n */\n @Event({ eventName: 'qdsChange', cancelable: false })\n private readonly changeEmitter!: EventEmitter<void>\n\n /**\n * Emitted when the textarea gains focus.\n */\n @Event({ eventName: 'qdsFocus', bubbles: false, cancelable: false })\n private readonly focusEmitter!: EventEmitter<QdsFocusEventDetail>\n\n /**\n * Emitted when the textarea's value changes.\n */\n @Event({ eventName: 'qdsInput', cancelable: false })\n private readonly inputEmitter!: EventEmitter<QdsInputEventDetail>\n\n @Element() private readonly host!: HTMLElement\n\n @State() private invalid = false\n\n @State() private tabIndex?: number\n\n #inheritedAttributes: Attributes = {}\n\n #textarea?: HTMLTextAreaElement\n\n get #computedDisabled(): boolean {\n return (\n (this.host.matches(':disabled') || (this.disabled ?? false)) &&\n this.host.getAttribute('disabled') !== 'false'\n )\n }\n\n get #computedValue(): Parameters<ElementInternals['setFormValue']>[0] {\n if (typeof this.value === 'number') return this.value.toString()\n // eslint-disable-next-line unicorn/no-null\n return this.value === undefined ? null : this.value\n }\n\n @Listen('click')\n protected onClick(event: MouseEvent): void {\n if (this.#computedDisabled) event.stopImmediatePropagation()\n }\n\n @Watch('disabled')\n protected disabledChanged(): void {\n if (this.#computedDisabled)\n // eslint-disable-next-line unicorn/no-null\n this.internals.setFormValue(null)\n else this.internals.setFormValue(this.#computedValue)\n }\n\n @Watch('selectionDirection')\n protected selectionDirectionChanged(): void {\n invariant(this.#textarea)\n\n // @ts-expect-error: `null` is a valid value according to the HTML spec.\n this.#textarea.selectionDirection = this.selectionDirection\n }\n\n @Watch('selectionEnd')\n protected selectionEndChanged(): void {\n invariant(this.#textarea)\n\n // @ts-expect-error: `null` is a valid value according to the HTML spec.\n this.#textarea.selectionEnd = this.selectionEnd\n }\n\n @Watch('selectionStart')\n protected selectionStartChanged(): void {\n invariant(this.#textarea)\n\n // @ts-expect-error: `null` is a valid value according to the HTML spec.\n this.#textarea.selectionStart = this.selectionStart\n }\n\n @Watch('tabindex')\n protected tabindexChanged(newValue: string): void {\n const parsedValue = Number.parseInt(newValue, 10)\n this.tabIndex =\n parsedValue === 0 || Number.isNaN(parsedValue) ? undefined : parsedValue\n }\n\n @Watch('maxLength')\n @Watch('minLength')\n @Watch('required')\n @Watch('value')\n protected validationChanged(): void {\n invariant(this.#textarea)\n\n if (this.maxLength !== undefined) this.#textarea.maxLength = this.maxLength\n if (this.minLength !== undefined) this.#textarea.minLength = this.minLength\n this.#textarea.required = this.required ?? false\n // eslint-disable-next-line unicorn/no-null\n if (this.value != null) this.#textarea.value = this.value.toString()\n\n const { valid } = this.#textarea.validity\n if (valid)\n this.internals.setValidity(NO_ERROR_FLAGS, undefined, this.#textarea)\n else\n this.internals.setValidity(\n this.#textarea.validity,\n this.#textarea.validationMessage,\n this.#textarea,\n )\n this.invalid = !valid\n }\n\n @Watch('value')\n protected valueChanged(): void {\n if (!this.#computedDisabled)\n this.internals.setFormValue(this.#computedValue)\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.#defineGetter('selectionDirection', this.#getSelectionDirection)\n this.#defineGetter('selectionStart', this.#getSelectionStart)\n this.#defineGetter('selectionEnd', this.#getSelectionEnd)\n\n this.#inheritedAttributes = inheritAriaAttributes(this.host)\n this.tabindexChanged(this.host.getAttribute('tabindex') ?? '0')\n }\n\n public componentDidLoad(): void {\n invariant(this.#textarea)\n\n this.validationChanged()\n this.valueChanged()\n }\n\n public render() {\n return (\n <Host>\n <textarea\n aria-invalid={this.invalid.toString()}\n autoCapitalize={this.host.autocapitalize}\n autoComplete={this.autoComplete}\n // eslint-disable-next-line jsx-a11y/no-autofocus\n autoFocus={this.host.autofocus}\n class=\"qds-textarea\"\n cols={this.cols}\n data-size={this.size ?? 'standard'}\n disabled={this.disabled}\n enterKeyHint={this.enterkeyhint}\n inputMode={this.inputmode}\n maxLength={this.maxLength}\n minLength={this.minLength}\n onBlur={this.#onBlur}\n onChange={this.#onChange}\n onFocus={this.#onFocus}\n onInput={this.#onInput}\n placeholder={this.placeholder}\n ref={this.#ref}\n rows={this.rows}\n spellcheck={this.host.spellcheck}\n tabIndex={this.#computedDisabled ? undefined : this.tabIndex}\n wrap={this.wrap}\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...this.#inheritedAttributes}\n />\n <slot onSlotchange={this.#onSlotchange} />\n </Host>\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: HTMLTextAreaElement['setCustomValidity'] = (\n error,\n ) => {\n if (error)\n this.internals.setValidity(CUSTOM_ERROR_FLAGS, error, this.#textarea)\n else this.internals.setValidity(NO_ERROR_FLAGS)\n this.invalid = !!error\n }\n\n public select: HTMLTextAreaElement['select'] = () => {\n invariant(this.#textarea)\n\n this.#textarea.select()\n }\n\n public setRangeText = (\n replacement: string,\n start: number,\n end: number,\n selectionMode?: SelectionMode,\n ): void => {\n invariant(this.#textarea)\n\n this.#textarea.setRangeText(replacement, start, end, selectionMode)\n\n if (this.value !== this.#textarea.value) {\n this.value = this.#textarea.value\n this.inputEmitter.emit()\n this.changeEmitter.emit()\n }\n }\n\n public setSelectionRange: HTMLTextAreaElement['setSelectionRange'] = (\n start,\n end,\n direction,\n ) => {\n invariant(this.#textarea)\n\n this.#textarea.setSelectionRange(start, end, direction)\n }\n\n readonly #getSelectionDirection: () => HTMLTextAreaElement['selectionDirection'] =\n () => {\n invariant(this.#textarea)\n\n return this.#textarea.selectionDirection\n }\n\n readonly #getSelectionStart: () => HTMLTextAreaElement['selectionStart'] =\n () => {\n invariant(this.#textarea)\n\n return this.#textarea.selectionStart\n }\n\n readonly #getSelectionEnd: () => HTMLTextAreaElement['selectionEnd'] = () => {\n invariant(this.#textarea)\n\n return this.#textarea.selectionEnd\n }\n\n readonly #ref = (textarea?: HTMLTextAreaElement): void => {\n this.#textarea = textarea\n }\n\n readonly #onBlur = (event: FocusEvent): void => {\n this.blurEmitter.emit(pickFocusEventAttributes(event))\n }\n\n readonly #onChange = (): void => {\n this.changeEmitter.emit()\n }\n\n readonly #onFocus = (event: FocusEvent): void => {\n this.focusEmitter.emit(pickFocusEventAttributes(event))\n }\n\n readonly #onInput = (event: InputEvent): void => {\n invariant(this.#textarea)\n\n this.value = this.#textarea.value\n this.inputEmitter.emit(pickInputEventAttributes(event))\n }\n\n readonly #onSlotchange = (): void => {\n invariant(this.#textarea)\n this.#textarea.innerHTML = this.host.innerHTML\n }\n\n #defineGetter(p: PropertyKey, get: () => unknown): void {\n Object.defineProperty(this.host, p, { enumerable: true, get })\n }\n}\n"],"version":3}
|
|
@@ -3,132 +3,11 @@
|
|
|
3
3
|
*
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { r as registerInstance,
|
|
6
|
+
import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-be1284b6.js';
|
|
7
7
|
import { o as offset, f as flip, s as shift, l as limitShift, b as arrow, c as computePosition, a as autoUpdate } from './floating-ui.dom.esm-61986f35.js';
|
|
8
|
-
import { f as ignorePromise, d as propertyToPx,
|
|
8
|
+
import { f as ignorePromise, d as propertyToPx, c as invariant, r as resolveTarget, e as roundByDPR, j as isTouchDevice } from './helpers-d08540f8.js';
|
|
9
9
|
|
|
10
|
-
const
|
|
11
|
-
const QdsBadgeCounterStyle0 = badgeCounterCss;
|
|
12
|
-
|
|
13
|
-
// SPDX-FileCopyrightText: © 2024 Schneider Electric
|
|
14
|
-
//
|
|
15
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
16
|
-
var __classPrivateFieldGet$2 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
17
|
-
if (kind === "a" && !f)
|
|
18
|
-
throw new TypeError("Private accessor was defined without a getter");
|
|
19
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
20
|
-
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
21
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
22
|
-
};
|
|
23
|
-
var _BadgeCounter_instances, _BadgeCounter_computedValue_get, _BadgeCounter_computedImportance_get, _BadgeCounter_computedSize_get;
|
|
24
|
-
const BadgeCounter = class {
|
|
25
|
-
constructor(hostRef) {
|
|
26
|
-
registerInstance(this, hostRef);
|
|
27
|
-
_BadgeCounter_instances.add(this);
|
|
28
|
-
this.description = undefined;
|
|
29
|
-
this.importance = 'standard';
|
|
30
|
-
this.size = 'standard';
|
|
31
|
-
this.strokeRing = false;
|
|
32
|
-
this.value = undefined;
|
|
33
|
-
}
|
|
34
|
-
render() {
|
|
35
|
-
return (h("span", { key: 'c10f61ebe0ba000dad466c46e9565a5422cf8207', class: {
|
|
36
|
-
'qds-badge-counter': true,
|
|
37
|
-
'qds-stroke-ring': this.strokeRing,
|
|
38
|
-
}, "data-importance": __classPrivateFieldGet$2(this, _BadgeCounter_instances, "a", _BadgeCounter_computedImportance_get), "data-size": __classPrivateFieldGet$2(this, _BadgeCounter_instances, "a", _BadgeCounter_computedSize_get) }, __classPrivateFieldGet$2(this, _BadgeCounter_instances, "a", _BadgeCounter_computedValue_get), h("span", { key: '62cf8cdf190ef3bb4b36fce245871d81cd2b7aab', class: "qds-sr-only" }, this.description)));
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
_BadgeCounter_instances = new WeakSet(), _BadgeCounter_computedValue_get = function _BadgeCounter_computedValue_get() {
|
|
42
|
-
const value = typeof this.value === 'string'
|
|
43
|
-
? Number.parseInt(this.value, 10)
|
|
44
|
-
: // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
45
|
-
(this.value ?? Number.NaN);
|
|
46
|
-
if (Number.isNaN(value) || value < 0)
|
|
47
|
-
return '';
|
|
48
|
-
return value < 100 ? value.toString() : '99+';
|
|
49
|
-
}, _BadgeCounter_computedImportance_get = function _BadgeCounter_computedImportance_get() {
|
|
50
|
-
switch (this.importance) {
|
|
51
|
-
case 'subdued':
|
|
52
|
-
case 'destructive':
|
|
53
|
-
case 'subdued-destructive':
|
|
54
|
-
case 'emphasized': {
|
|
55
|
-
return this.importance;
|
|
56
|
-
}
|
|
57
|
-
default: {
|
|
58
|
-
return 'standard';
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}, _BadgeCounter_computedSize_get = function _BadgeCounter_computedSize_get() {
|
|
62
|
-
switch (this.size) {
|
|
63
|
-
case 'hero':
|
|
64
|
-
case 'large':
|
|
65
|
-
case 'small': {
|
|
66
|
-
return this.size;
|
|
67
|
-
}
|
|
68
|
-
default: {
|
|
69
|
-
return 'standard';
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
};
|
|
73
|
-
BadgeCounter.style = QdsBadgeCounterStyle0;
|
|
74
|
-
|
|
75
|
-
const badgeIndicatorCss = ":host([hidden]){display:none!important}:host{display:inline-block}.qds-badge-indicator{align-items:center;background-color:var(--qds-theme-feedback-message-neutral);border-radius:var(--qds-control-toggle-indicator-rounded-border-radius);display:flex;height:var(--qds-badge-indicator-standard-height);justify-content:center;width:var(--qds-badge-indicator-standard-height)}.qds-stroke-ring{border:var(--qds-badge-border-width) solid var(--qds-theme-feedback-message-neutral-contrast)}.qds-sr-only{clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}[data-status=error]{background-color:var(--qds-theme-feedback-message-critical)}.qds-stroke-ring[data-status=error]{border-color:var(--qds-theme-feedback-message-neutral-contrast)}[data-status=info]{background-color:var(--qds-theme-feedback-message-informational)}.qds-stroke-ring[data-status=info]{border-color:var(--qds-theme-feedback-message-neutral-contrast)}[data-status=neutral]{background-color:var(--qds-theme-feedback-availability-unavailable)}.qds-stroke-ring[data-status=neutral]{border-color:var(--qds-theme-feedback-message-neutral-contrast)}[data-status=success]{background-color:var(--qds-theme-signature-color-default)}.qds-stroke-ring[data-status=success]{border-color:var(--qds-theme-feedback-message-neutral-contrast)}[data-status=warning]{background-color:var(--qds-theme-feedback-message-important)}.qds-stroke-ring[data-status=warning]{border-color:var(--qds-theme-feedback-message-neutral-contrast)}[data-size=small]{height:var(--qds-badge-indicator-small-height);width:var(--qds-badge-indicator-small-height)}[data-size=standard]{height:var(--qds-badge-indicator-standard-height);width:var(--qds-badge-indicator-standard-height)}[data-size=large]{height:var(--qds-badge-indicator-large-height);width:var(--qds-badge-indicator-large-height)}[data-size=hero]{height:var(--qds-badge-indicator-hero-height);width:var(--qds-badge-indicator-hero-height)}";
|
|
76
|
-
const QdsBadgeIndicatorStyle0 = badgeIndicatorCss;
|
|
77
|
-
|
|
78
|
-
// SPDX-FileCopyrightText: © 2024 Schneider Electric
|
|
79
|
-
//
|
|
80
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
81
|
-
var __classPrivateFieldGet$1 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
82
|
-
if (kind === "a" && !f)
|
|
83
|
-
throw new TypeError("Private accessor was defined without a getter");
|
|
84
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
85
|
-
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
86
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
87
|
-
};
|
|
88
|
-
var _BadgeIndicator_instances, _BadgeIndicator_computedStatus_get, _BadgeIndicator_computedSize_get;
|
|
89
|
-
const BadgeIndicator = class {
|
|
90
|
-
constructor(hostRef) {
|
|
91
|
-
registerInstance(this, hostRef);
|
|
92
|
-
_BadgeIndicator_instances.add(this);
|
|
93
|
-
this.description = undefined;
|
|
94
|
-
this.size = 'standard';
|
|
95
|
-
this.status = 'neutral';
|
|
96
|
-
this.strokeRing = false;
|
|
97
|
-
}
|
|
98
|
-
render() {
|
|
99
|
-
return (h("div", { key: 'fbbd2e4f60e31f9d339146c76c53aa1eda61c7a3', class: {
|
|
100
|
-
'qds-badge-indicator': true,
|
|
101
|
-
'qds-stroke-ring': this.strokeRing,
|
|
102
|
-
}, "data-size": __classPrivateFieldGet$1(this, _BadgeIndicator_instances, "a", _BadgeIndicator_computedSize_get), "data-status": __classPrivateFieldGet$1(this, _BadgeIndicator_instances, "a", _BadgeIndicator_computedStatus_get) }, h("span", { key: '6d6ffc1d4d2bc42af510fb01756589da89c02675', class: "qds-sr-only" }, this.description)));
|
|
103
|
-
}
|
|
104
|
-
};
|
|
105
|
-
_BadgeIndicator_instances = new WeakSet(), _BadgeIndicator_computedStatus_get = function _BadgeIndicator_computedStatus_get() {
|
|
106
|
-
switch (this.status) {
|
|
107
|
-
case 'error':
|
|
108
|
-
case 'info':
|
|
109
|
-
case 'success':
|
|
110
|
-
case 'warning': {
|
|
111
|
-
return this.status;
|
|
112
|
-
}
|
|
113
|
-
default: {
|
|
114
|
-
return 'neutral';
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
}, _BadgeIndicator_computedSize_get = function _BadgeIndicator_computedSize_get() {
|
|
118
|
-
switch (this.size) {
|
|
119
|
-
case 'hero':
|
|
120
|
-
case 'large':
|
|
121
|
-
case 'small': {
|
|
122
|
-
return this.size;
|
|
123
|
-
}
|
|
124
|
-
default: {
|
|
125
|
-
return 'standard';
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
};
|
|
129
|
-
BadgeIndicator.style = QdsBadgeIndicatorStyle0;
|
|
130
|
-
|
|
131
|
-
const tooltipCss = ":host([hidden]){display:none!important}:host{align-items:flex-start;background-color:var(--qds-theme-accessory-background);border-radius:var(--qds-accessory-border-radius);box-shadow:var(--qds-theme-accessory-elevation);box-sizing:border-box;color:var(--qds-theme-text-standard);display:flex;flex-direction:column;gap:var(--qds-accessory-gap-children-unrelated);left:0;padding:var(--qds-accessory-padding);top:0}:host([aria-hidden=true]){display:none}:host:before{content:\"\";height:100%;left:0;position:absolute;top:0;width:100%}::slotted(blockquote),::slotted(button),::slotted(dd),::slotted(dl),::slotted(fieldset),::slotted(figure),::slotted(h1),::slotted(h2),::slotted(h3),::slotted(h4),::slotted(h5),::slotted(h6),::slotted(hr),::slotted(input),::slotted(menu),::slotted(ol),::slotted(p),::slotted(pre),::slotted(select),::slotted(textarea),::slotted(ul){margin:0}:host([data-side=bottom]):before,:host([data-side=top]):before{height:calc(var(--qds-accessory-gap-floating, 0px) + var(--qds-signature-triangle-pointer-size-height, 0px));top:100%}:host([data-side=bottom]):before{top:calc((var(--qds-accessory-gap-floating, 0px) + var(--qds-signature-triangle-pointer-size-height, 0px))*-1)}:host([data-side=left]):before,:host([data-side=right]):before{left:100%;width:calc(var(--qds-accessory-gap-floating, 0px) + var(--qds-signature-triangle-pointer-size-height, 0px))}:host([data-side=right]):before{left:calc((var(--qds-accessory-gap-floating, 0px) + var(--qds-signature-triangle-pointer-size-height, 0px))*-1)}.qds-arrow-container{height:var(--qds-signature-triangle-pointer-size-width);position:absolute;width:var(--qds-signature-triangle-pointer-size-width)}.qds-arrow-container[data-side=bottom]{bottom:100%;transform:rotate(180deg)}.qds-arrow-container[data-side=left]{left:100%;transform:rotate(-90deg)}.qds-arrow-container[data-side=right]{right:100%;transform:rotate(90deg)}.qds-arrow-container[data-side=top]{top:100%}.qds-arrow{fill:var(--qds-theme-accessory-background)}";
|
|
10
|
+
const tooltipCss = ":host([hidden]){display:none!important}:host{align-items:flex-start;background-color:var(--qds-theme-accessory-background);border-radius:var(--qds-accessory-border-radius);box-shadow:var(--qds-theme-accessory-elevation);box-sizing:border-box;color:var(--qds-theme-text-standard);display:flex;flex-direction:column;gap:var(--qds-accessory-gap-children-unrelated);left:0;padding:var(--qds-accessory-padding);top:0}:host:before{content:\"\";height:100%;left:0;position:absolute;top:0;width:100%}::slotted(blockquote),::slotted(button),::slotted(dd),::slotted(dl),::slotted(fieldset),::slotted(figure),::slotted(h1),::slotted(h2),::slotted(h3),::slotted(h4),::slotted(h5),::slotted(h6),::slotted(hr),::slotted(input),::slotted(menu),::slotted(ol),::slotted(p),::slotted(pre),::slotted(select),::slotted(textarea),::slotted(ul){margin:0}:host([data-side=bottom]):before,:host([data-side=top]):before{height:calc(var(--qds-accessory-gap-floating, 0px) + var(--qds-signature-triangle-pointer-size-height, 0px));top:100%}:host([data-side=bottom]):before{top:calc((var(--qds-accessory-gap-floating, 0px) + var(--qds-signature-triangle-pointer-size-height, 0px))*-1)}:host([data-side=left]):before,:host([data-side=right]):before{left:100%;width:calc(var(--qds-accessory-gap-floating, 0px) + var(--qds-signature-triangle-pointer-size-height, 0px))}:host([data-side=right]):before{left:calc((var(--qds-accessory-gap-floating, 0px) + var(--qds-signature-triangle-pointer-size-height, 0px))*-1)}.qds-arrow-container{height:var(--qds-signature-triangle-pointer-size-width);position:absolute;width:var(--qds-signature-triangle-pointer-size-width)}.qds-arrow-container[data-side=bottom]{bottom:100%;transform:rotate(180deg)}.qds-arrow-container[data-side=left]{left:100%;transform:rotate(-90deg)}.qds-arrow-container[data-side=right]{right:100%;transform:rotate(90deg)}.qds-arrow-container[data-side=top]{top:100%}.qds-arrow{fill:var(--qds-theme-accessory-background)}";
|
|
132
11
|
const QdsTooltipStyle0 = tooltipCss;
|
|
133
12
|
|
|
134
13
|
// SPDX-FileCopyrightText: © 2024 Schneider Electric
|
|
@@ -157,6 +36,38 @@ const Tooltip = class {
|
|
|
157
36
|
registerInstance(this, hostRef);
|
|
158
37
|
this.closeEmitter = createEvent(this, "qdsClose", 2);
|
|
159
38
|
_Tooltip_instances.add(this);
|
|
39
|
+
/**
|
|
40
|
+
* Prevents the tooltip from being shown by user interaction. The tooltip can
|
|
41
|
+
* still be displayed by calling the `show()` method.
|
|
42
|
+
*/
|
|
43
|
+
this.disabled = false;
|
|
44
|
+
/**
|
|
45
|
+
* Disable Floating UI's
|
|
46
|
+
* [`flip` middleware](https://floating-ui.com/docs/flip).
|
|
47
|
+
*/
|
|
48
|
+
this.noFlip = false;
|
|
49
|
+
/**
|
|
50
|
+
* Disable Floating UI's
|
|
51
|
+
* [`shift` middleware](https://floating-ui.com/docs/shift).
|
|
52
|
+
*/
|
|
53
|
+
this.noShift = false;
|
|
54
|
+
/**
|
|
55
|
+
* Where to place the tooltip relative to the `target`.
|
|
56
|
+
*
|
|
57
|
+
* @see https://floating-ui.com/docs/tutorial#placements
|
|
58
|
+
*/
|
|
59
|
+
this.placement = 'top';
|
|
60
|
+
/**
|
|
61
|
+
* Determines the events that cause the tooltip to show. Multiple event names
|
|
62
|
+
* are separated by spaces.
|
|
63
|
+
*/
|
|
64
|
+
this.trigger = 'pointerenter focus';
|
|
65
|
+
this.open = false;
|
|
66
|
+
this.side = 'top';
|
|
67
|
+
this.aShape = '';
|
|
68
|
+
this.aViewbox = '0 0 0 0';
|
|
69
|
+
this.aHeight = 0;
|
|
70
|
+
this.aGap = 0;
|
|
160
71
|
_Tooltip_arrowContainerElement.set(this, void 0);
|
|
161
72
|
_Tooltip_cleanup.set(this, void 0);
|
|
162
73
|
_Tooltip_clickedTooltip.set(this, false);
|
|
@@ -187,27 +98,6 @@ const Tooltip = class {
|
|
|
187
98
|
_Tooltip_boundReferenceClick.set(this, () => {
|
|
188
99
|
ignorePromise(__classPrivateFieldGet(this, _Tooltip_instances, "m", _Tooltip_handleReferenceClick).call(this));
|
|
189
100
|
});
|
|
190
|
-
this.autoUpdateOptions = undefined;
|
|
191
|
-
this.disabled = false;
|
|
192
|
-
this.flipOptions = undefined;
|
|
193
|
-
this.noFlip = false;
|
|
194
|
-
this.noShift = false;
|
|
195
|
-
this.offsetOptions = undefined;
|
|
196
|
-
this.placement = 'top';
|
|
197
|
-
this.shiftOptions = undefined;
|
|
198
|
-
this.strategy = undefined;
|
|
199
|
-
this.target = undefined;
|
|
200
|
-
this.trigger = 'pointerenter focus';
|
|
201
|
-
this.hostPosition = undefined;
|
|
202
|
-
this.hostTransform = undefined;
|
|
203
|
-
this.open = false;
|
|
204
|
-
this.middleware = undefined;
|
|
205
|
-
this.side = 'top';
|
|
206
|
-
this.aStyles = undefined;
|
|
207
|
-
this.aShape = '';
|
|
208
|
-
this.aViewbox = '0 0 0 0';
|
|
209
|
-
this.aHeight = 0;
|
|
210
|
-
this.aGap = 0;
|
|
211
101
|
}
|
|
212
102
|
/**
|
|
213
103
|
* Show the tooltip.
|
|
@@ -216,7 +106,7 @@ const Tooltip = class {
|
|
|
216
106
|
if (this.open)
|
|
217
107
|
return;
|
|
218
108
|
this.open = true;
|
|
219
|
-
this.host.
|
|
109
|
+
this.host.hidden = false;
|
|
220
110
|
this.startAutoUpdate();
|
|
221
111
|
}
|
|
222
112
|
/**
|
|
@@ -228,7 +118,7 @@ const Tooltip = class {
|
|
|
228
118
|
this.closeEmitter.emit();
|
|
229
119
|
this.open = false;
|
|
230
120
|
__classPrivateFieldSet(this, _Tooltip_clickedTooltip, false, "f");
|
|
231
|
-
this.host.
|
|
121
|
+
this.host.hidden = true;
|
|
232
122
|
if (__classPrivateFieldGet(this, _Tooltip_cleanup, "f"))
|
|
233
123
|
__classPrivateFieldGet(this, _Tooltip_cleanup, "f").call(this);
|
|
234
124
|
}
|
|
@@ -353,7 +243,7 @@ const Tooltip = class {
|
|
|
353
243
|
}
|
|
354
244
|
async componentWillLoad() {
|
|
355
245
|
__classPrivateFieldSet(this, _Tooltip_isTouchDevice, isTouchDevice(), "f");
|
|
356
|
-
this.host.
|
|
246
|
+
this.host.hidden = true;
|
|
357
247
|
await this.updateReferenceElement();
|
|
358
248
|
autoIncrementingId += 1;
|
|
359
249
|
}
|
|
@@ -367,10 +257,10 @@ const Tooltip = class {
|
|
|
367
257
|
__classPrivateFieldGet(this, _Tooltip_referenceElement, "f").removeAttribute('aria-describedby');
|
|
368
258
|
}
|
|
369
259
|
render() {
|
|
370
|
-
return (h(Host, { key: '
|
|
260
|
+
return (h(Host, { key: '114ce7124b90e23ba4b3c543250643aeb8c17bd9', "data-side": this.side, role: this.host.role ?? 'tooltip', style: {
|
|
371
261
|
position: this.hostPosition,
|
|
372
262
|
transform: this.hostTransform,
|
|
373
|
-
} }, h("slot", { key: '
|
|
263
|
+
} }, h("slot", { key: '861def5240ff80d80f0853638c8316ad23b58c0a' }), h("svg", { key: '46ad55d05f20ca456d0bff3745f478321a15d61b', "aria-hidden": "true", "data-side": this.side, class: "qds-arrow-container", ref: __classPrivateFieldGet(this, _Tooltip_arrowContainerRef, "f"), viewBox: this.aViewbox, style: this.aStyles }, h("path", { key: '362ecf3e19eedad6099a2e694dbdaee4e8ab15a0', class: "qds-arrow", d: this.aShape }))));
|
|
374
264
|
}
|
|
375
265
|
get host() { return getElement(this); }
|
|
376
266
|
static get watchers() { return {
|
|
@@ -434,6 +324,6 @@ _Tooltip_arrowContainerElement = new WeakMap(), _Tooltip_cleanup = new WeakMap()
|
|
|
434
324
|
};
|
|
435
325
|
Tooltip.style = QdsTooltipStyle0;
|
|
436
326
|
|
|
437
|
-
export {
|
|
327
|
+
export { Tooltip as qds_tooltip };
|
|
438
328
|
|
|
439
|
-
//# sourceMappingURL=qds-
|
|
329
|
+
//# sourceMappingURL=qds-tooltip.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"qds-tooltip.entry.js","mappings":";;;;;;;;;AAAA,MAAM,UAAU,GAAG,k6DAAk6D,CAAC;AACt7D,yBAAe,UAAU;;ACDzB;AACA;AACA;;;;;;;;;;;;;;;;;;AA8CA,IAAI,kBAAkB,GAAG,CAAC,CAAA;MAgBb,OAAO;IALpB;;;;;;;;QAkB0B,aAAQ,GAAY,KAAK,CAAA;;;;;QAoBzB,WAAM,GAAY,KAAK,CAAA;;;;;QAMvB,YAAO,GAAY,KAAK,CAAA;;;;;;QAkBxB,cAAS,GAAc,KAAK,CAAA;;;;;QAwC5B,YAAO,GAC7B,oBAAoB,CAAA;QAcL,SAAI,GAAG,KAAK,CAAA;QAIZ,SAAI,GAAS,KAAK,CAAA;QAIlB,WAAM,GAAG,EAAE,CAAA;QAEX,aAAQ,GAAG,SAAS,CA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,CAAC;;;;;","names":[],"sources":["src/components/tooltip/tooltip.css?tag=qds-tooltip&encapsulation=shadow","src/components/tooltip/tooltip.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: © 2024 Schneider Electric\n *\n * SPDX-License-Identifier: Apache-2.0\n */\n\n@import url('../shared.css');\n\n:host {\n align-items: flex-start;\n background-color: var(--qds-theme-accessory-background);\n border-radius: var(--qds-accessory-border-radius);\n box-shadow: var(--qds-theme-accessory-elevation);\n box-sizing: border-box;\n color: var(--qds-theme-text-standard);\n display: flex;\n flex-direction: column;\n gap: var(--qds-accessory-gap-children-unrelated);\n left: 0;\n padding: var(--qds-accessory-padding);\n top: 0;\n}\n\n:host::before {\n content: '';\n height: 100%;\n left: 0;\n position: absolute;\n top: 0;\n width: 100%;\n}\n\n::slotted(blockquote),\n::slotted(button),\n::slotted(dd),\n::slotted(dl),\n::slotted(fieldset),\n::slotted(figure),\n::slotted(h1),\n::slotted(h2),\n::slotted(h3),\n::slotted(h4),\n::slotted(h5),\n::slotted(h6),\n::slotted(hr),\n::slotted(input),\n::slotted(menu),\n::slotted(ol),\n::slotted(p),\n::slotted(pre),\n::slotted(select),\n::slotted(textarea),\n::slotted(ul) {\n margin: 0;\n}\n\n:host([data-side='top'])::before,\n:host([data-side='bottom'])::before {\n height: calc(\n var(--qds-accessory-gap-floating, 0px) +\n var(--qds-signature-triangle-pointer-size-height, 0px)\n );\n top: 100%;\n}\n\n:host([data-side='bottom'])::before {\n top: calc(\n -1 * (var(--qds-accessory-gap-floating, 0px) +\n var(--qds-signature-triangle-pointer-size-height, 0px))\n );\n}\n\n:host([data-side='left'])::before,\n:host([data-side='right'])::before {\n width: calc(\n var(--qds-accessory-gap-floating, 0px) +\n var(--qds-signature-triangle-pointer-size-height, 0px)\n );\n left: 100%;\n}\n\n:host([data-side='right'])::before {\n left: calc(\n -1 * (var(--qds-accessory-gap-floating, 0px) +\n var(--qds-signature-triangle-pointer-size-height, 0px))\n );\n}\n\n.qds-arrow-container {\n height: var(--qds-signature-triangle-pointer-size-width);\n position: absolute;\n width: var(--qds-signature-triangle-pointer-size-width);\n\n &[data-side='bottom'] {\n bottom: 100%;\n transform: rotate(180deg);\n }\n\n &[data-side='left'] {\n left: 100%;\n transform: rotate(-90deg);\n }\n\n &[data-side='right'] {\n right: 100%;\n transform: rotate(90deg);\n }\n\n &[data-side='top'] {\n top: 100%;\n }\n}\n\n.qds-arrow {\n fill: var(--qds-theme-accessory-background);\n}\n","// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\nimport type {\n AutoUpdateOptions,\n DetectOverflowOptions,\n FlipOptions,\n Middleware,\n Placement,\n ReferenceElement,\n ShiftOptions,\n Side,\n Strategy,\n} from '@floating-ui/dom'\nimport {\n arrow,\n autoUpdate,\n computePosition,\n flip,\n limitShift,\n offset,\n shift,\n} from '@floating-ui/dom'\nimport type { ComponentInterface, EventEmitter } from '@stencil/core'\nimport {\n Component,\n Element,\n Event,\n h,\n Host,\n Method,\n Prop,\n State,\n Watch,\n} from '@stencil/core'\nimport type { Split } from 'type-fest'\n\nimport type { OffsetOptions } from '../../helpers'\nimport {\n ignorePromise,\n invariant,\n isTouchDevice,\n propertyToPx,\n resolveTarget,\n roundByDPR,\n} from '../../helpers'\n\nlet autoIncrementingId = 1\n\nexport type TriggerEvent = Extract<\n keyof GlobalEventHandlersEventMap,\n 'click' | 'focus' | 'focusin' | 'pointerenter'\n>\n\n/**\n * @slot Content to display in the dropdown.\n * @see https://quartz.se.com/build/components/tooltip\n */\n@Component({\n tag: 'qds-tooltip',\n shadow: true,\n styleUrl: 'tooltip.css',\n})\nexport class Tooltip implements ComponentInterface {\n /**\n * Options to pass to Floating UI's\n * [`autoUpdate()` function](https://floating-ui.com/docs/autoUpdate).\n *\n * @see https://floating-ui.com/docs/autoupdate#options\n */\n @Prop() public readonly autoUpdateOptions?: AutoUpdateOptions\n\n /**\n * Prevents the tooltip from being shown by user interaction. The tooltip can\n * still be displayed by calling the `show()` method.\n */\n @Prop() public readonly disabled: boolean = false\n\n /**\n * Options to pass to Floating UI's\n * [`flip` middleware](https://floating-ui.com/docs/flip).\n *\n * The [`crossAxis` option](https://floating-ui.com/docs/flip#crossaxis) is\n * set to the value of the `noShift` property by default for interoperability\n * with the [`shift` middleware](https://floating-ui.com/docs/shift).\n *\n * @see https://floating-ui.com/docs/flip#options\n */\n @Prop() public readonly flipOptions?: Partial<\n DetectOverflowOptions & FlipOptions\n >\n\n /**\n * Disable Floating UI's\n * [`flip` middleware](https://floating-ui.com/docs/flip).\n */\n @Prop() public readonly noFlip: boolean = false\n\n /**\n * Disable Floating UI's\n * [`shift` middleware](https://floating-ui.com/docs/shift).\n */\n @Prop() public readonly noShift: boolean = false\n\n /**\n * Options to pass to Floating UI's\n * [`offset` middleware](https://floating-ui.com/docs/offset).\n *\n * The [`mainAxis` option](https://floating-ui.com/docs/offset#mainaxis) is\n * not supported.\n *\n * @see https://floating-ui.com/docs/offset#options\n */\n @Prop() public readonly offsetOptions?: OffsetOptions\n\n /**\n * Where to place the tooltip relative to the `target`.\n *\n * @see https://floating-ui.com/docs/tutorial#placements\n */\n @Prop() public readonly placement: Placement = 'top'\n\n /**\n * Options to pass to Floating UI's\n * [`shift` middleware](https://floating-ui.com/docs/shift).\n *\n * @see https://floating-ui.com/docs/shift#options\n */\n @Prop() public readonly shiftOptions?: Partial<\n DetectOverflowOptions & ShiftOptions\n >\n\n /**\n * The CSS position strategy to use.\n *\n * @see https://floating-ui.com/docs/computeposition#strategy\n */\n @Prop() public readonly strategy?: Strategy\n\n /**\n * The trigger element that will trigger the tooltip. The target specified\n * can be any of the following:\n *\n * - A CSS selector string\n * - A reference to an [`Element`][] or [Virtual Element][]\n * - A function returning a reference to an [`Element`][],\n * [Virtual Element][], or a CSS selector string\n *\n * [`Element`]: https://developer.mozilla.org/docs/Web/API/Element\n * [Virtual Element]: https://floating-ui.com/docs/virtual-elements\n */\n @Prop() public readonly target?:\n | ReferenceElement\n | string\n | (() => ReferenceElement | string)\n\n /**\n * Determines the events that cause the tooltip to show. Multiple event names\n * are separated by spaces.\n */\n @Prop() public readonly trigger?: TriggerEvent[] | string =\n 'pointerenter focus'\n\n /**\n * Emitted when the tooltip is closed.\n */\n @Event({ eventName: 'qdsClose', bubbles: false, cancelable: false })\n private readonly closeEmitter!: EventEmitter<void>\n\n @Element() private readonly host!: HTMLElement\n\n @State() private hostPosition?: string\n\n @State() private hostTransform?: string\n\n @State() private open = false\n\n @State() private middleware?: Middleware[]\n\n @State() private side: Side = 'top'\n\n @State() private aStyles?: Record<string, string | undefined>\n\n @State() private aShape = ''\n\n @State() private aViewbox = '0 0 0 0'\n\n @State() private aHeight = 0\n\n @State() private aGap = 0\n\n #arrowContainerElement?: SVGElement\n\n #cleanup?: () => void\n\n #clickedTooltip = false\n\n #isTouchDevice = false\n\n #listeners: {\n element: Element\n event: keyof GlobalEventHandlersEventMap\n listener: EventListenerOrEventListenerObject\n }[] = []\n\n #referenceElement?: ReferenceElement\n\n /**\n * Show the tooltip.\n */\n @Method()\n public async show(): Promise<void> {\n if (this.open) return\n\n this.open = true\n this.host.hidden = false\n this.startAutoUpdate()\n }\n\n /**\n * Close the tooltip.\n */\n @Method()\n public async close(): Promise<void> {\n if (!this.open) return\n\n this.closeEmitter.emit()\n\n this.open = false\n this.#clickedTooltip = false\n this.host.hidden = true\n if (this.#cleanup) this.#cleanup()\n }\n\n /**\n * Update the tooltip's arrow.\n *\n * This method should typically be called when the Quartz platform was\n * changed.\n */\n @Method()\n public async updateArrow(): Promise<void> {\n const aWidth =\n propertyToPx(this.host, `--qds-signature-triangle-pointer-size-width`) ??\n 0\n const aTipRadius =\n propertyToPx(this.host, `--qds-signature-triangle-pointer-tip-radius`) ??\n 0\n const svgX = (aWidth / 2) * (aTipRadius / -8 + 1)\n const svgY = ((this.aHeight / 2) * aTipRadius) / 4\n\n this.aHeight =\n propertyToPx(this.host, `--qds-signature-triangle-pointer-size-height`) ??\n 0\n this.aViewbox = `0 0 ${aWidth} ${Math.max(this.aHeight, aWidth)}`\n this.aGap = propertyToPx(this.host, '--qds-accessory-gap-floating') ?? 0\n this.aShape =\n 'M0,0' +\n ` H${aWidth}` +\n ` L${aWidth - svgX},${this.aHeight - svgY}` +\n ` Q${aWidth / 2},${this.aHeight} ${svgX},${this.aHeight - svgY}` +\n ' Z'\n }\n\n @Watch('aGap')\n @Watch('aHeight')\n @Watch('flipOptions')\n @Watch('noFlip')\n @Watch('noShift')\n @Watch('offsetOptions')\n @Watch('shiftOptions')\n protected async updateMiddleware(): Promise<void> {\n invariant(this.#arrowContainerElement)\n\n this.middleware = [\n offset({\n ...this.offsetOptions,\n mainAxis: this.aGap + this.aHeight,\n }),\n !this.noFlip &&\n flip({\n crossAxis: this.noShift,\n ...this.flipOptions,\n }),\n !this.noShift &&\n shift({\n limiter: limitShift(),\n ...this.shiftOptions,\n }),\n arrow({\n element: this.#arrowContainerElement,\n }),\n ].filter((middleware): middleware is Middleware => middleware !== false)\n }\n\n @Watch('target')\n private async updateReferenceElement(): Promise<void> {\n this.disconnectedCallback()\n\n this.#referenceElement = resolveTarget(this.target)\n\n if (!(this.#referenceElement instanceof globalThis.Element)) return\n\n this.updateEventListeners()\n this.host.id ||= `qds-tooltip-${autoIncrementingId}`\n this.#referenceElement.setAttribute('aria-describedby', this.host.id)\n }\n\n @Watch('trigger')\n private updateEventListeners(): void {\n if (!(this.#referenceElement instanceof globalThis.Element)) return\n\n const triggers = Array.isArray(this.trigger)\n ? this.trigger\n : ((this.trigger?.split(' ') as Split<TriggerEvent, ' '> | undefined) ??\n [])\n\n this.#removeEventListeners()\n\n if (this.#isTouchDevice)\n this.#on(this.#referenceElement, 'click', this.#boundReferenceClick)\n this.#on(document.documentElement, 'pointerdown', this.#boundPointerdown)\n this.#on(this.host, 'pointerdown', this.#boundTooltipPointerdown)\n\n for (const trigger of triggers) {\n switch (trigger) {\n case 'click': {\n this.#on(this.#referenceElement, 'click', this.#boundReferenceClick)\n break\n }\n case 'focus':\n case 'focusin': {\n this.#on(this.#referenceElement, trigger, this.#boundFocus)\n this.#on(this.#referenceElement, 'focusout', this.#boundFocusout)\n this.#on(this.host, 'focusout', this.#boundFocusout)\n break\n }\n case 'pointerenter': {\n this.#on(\n this.#referenceElement,\n 'pointerenter',\n this.#boundPointerenter,\n )\n this.#on(\n this.#referenceElement,\n 'pointerleave',\n this.#boundPointerleave,\n )\n this.#on(this.host, 'pointerleave', this.#boundPointerleave)\n break\n }\n default:\n }\n }\n }\n\n @Watch('middleware')\n @Watch('placement')\n @Watch('strategy')\n private async updatePosition(): Promise<void> {\n invariant(this.#referenceElement)\n\n const { x, y, middlewareData, placement, strategy } = await computePosition(\n this.#referenceElement,\n this.host,\n {\n middleware: this.middleware,\n placement: this.placement,\n strategy: this.strategy,\n },\n )\n const [side] = placement.split('-') as Split<Placement, '-'>\n\n this.hostPosition = strategy\n this.hostTransform = `translate(${roundByDPR(x)}px,${roundByDPR(y)}px)`\n this.side = side\n\n if (middlewareData.arrow === undefined) return\n const { x: aX, y: aY, centerOffset } = middlewareData.arrow\n this.aStyles = {\n display: centerOffset === 0 ? undefined : 'none',\n left: aX === undefined ? '' : `${aX}px`,\n top: aY === undefined ? '' : `${aY}px`,\n }\n }\n\n @Watch('autoUpdateOptions')\n private startAutoUpdate(): void {\n invariant(this.#referenceElement)\n\n if (this.#cleanup) this.#cleanup()\n this.#cleanup = autoUpdate(\n this.#referenceElement,\n this.host,\n () => {\n ignorePromise(this.updatePosition())\n },\n this.autoUpdateOptions,\n )\n }\n\n public async componentWillLoad(): Promise<void> {\n this.#isTouchDevice = isTouchDevice()\n this.host.hidden = true\n await this.updateReferenceElement()\n autoIncrementingId += 1\n }\n\n public async componentDidLoad(): Promise<void> {\n await this.updateArrow()\n }\n\n public disconnectedCallback(): void {\n if (!(this.#referenceElement instanceof globalThis.Element)) return\n\n this.#removeEventListeners()\n this.#referenceElement.removeAttribute('aria-describedby')\n }\n\n public render() {\n return (\n <Host\n data-side={this.side}\n role={this.host.role ?? 'tooltip'}\n style={{\n position: this.hostPosition,\n transform: this.hostTransform,\n }}\n >\n <slot />\n <svg\n aria-hidden=\"true\"\n data-side={this.side}\n class=\"qds-arrow-container\"\n ref={this.#arrowContainerRef}\n viewBox={this.aViewbox}\n style={this.aStyles}\n >\n <path class=\"qds-arrow\" d={this.aShape} />\n </svg>\n </Host>\n )\n }\n\n readonly #arrowContainerRef = (svg?: SVGElement): void => {\n this.#arrowContainerElement = svg\n }\n\n readonly #boundTooltipPointerdown = (): void => {\n this.#clickedTooltip = true\n }\n\n async #handleFocus(): Promise<void> {\n if (!this.disabled) await this.show()\n }\n\n readonly #boundFocus = (): void => {\n ignorePromise(this.#handleFocus())\n }\n\n async #handlePointerenter(): Promise<void> {\n if (!this.disabled) await this.show()\n }\n\n readonly #boundPointerenter = (): void => {\n ignorePromise(this.#handlePointerenter())\n }\n\n async #handlePointerleave(event: Event): Promise<void> {\n if (\n !this.#clickedTooltip &&\n document.activeElement !== this.#referenceElement &&\n document.activeElement?.closest('qds-tooltip') !== this.host &&\n event instanceof PointerEvent &&\n event.relatedTarget !== this.#referenceElement &&\n event.relatedTarget !== this.host\n )\n await this.close()\n }\n\n readonly #boundPointerleave = (event: Event): void => {\n ignorePromise(this.#handlePointerleave(event))\n }\n\n async #handleFocusOut(event: Event): Promise<void> {\n if (!(event instanceof FocusEvent)) return\n const { relatedTarget } = event\n\n if (\n relatedTarget instanceof globalThis.Element &&\n !this.host.contains(relatedTarget) &&\n this.#referenceElement !== relatedTarget\n )\n await this.close()\n }\n\n readonly #boundFocusout = (event: Event): void => {\n ignorePromise(this.#handleFocusOut(event))\n }\n\n async #handlePointerdown(event: Event): Promise<void> {\n const composedPath = event.composedPath()\n const withinBounds =\n composedPath.includes(this.host) ||\n (this.#referenceElement instanceof globalThis.Element &&\n composedPath.includes(this.#referenceElement))\n if (!withinBounds) await this.close()\n }\n\n readonly #boundPointerdown = (event: Event): void => {\n ignorePromise(this.#handlePointerdown(event))\n }\n\n async #handleReferenceClick(): Promise<void> {\n if (!this.disabled) await (this.open ? this.close() : this.show())\n }\n\n readonly #boundReferenceClick = (): void => {\n ignorePromise(this.#handleReferenceClick())\n }\n\n #on(\n element: Element,\n event: keyof GlobalEventHandlersEventMap,\n listener: EventListenerOrEventListenerObject,\n ): void {\n const hasListener = this.#listeners.some(\n (value) => value.element === element && value.event === event,\n )\n if (hasListener) return\n\n element.addEventListener(event, listener)\n this.#listeners.push({ element, event, listener })\n }\n\n #removeEventListeners(): void {\n for (const { element, event, listener } of this.#listeners)\n element.removeEventListener(event, listener)\n this.#listeners = []\n }\n}\n"],"version":3}
|
package/dist/esm/qds.js
CHANGED
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
*
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
7
|
-
export { s as setNonce } from './index-
|
|
6
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-be1284b6.js';
|
|
7
|
+
export { s as setNonce } from './index-be1284b6.js';
|
|
8
8
|
import { g as globalScripts } from './app-globals-8ced3a41.js';
|
|
9
9
|
|
|
10
10
|
/*
|
|
11
|
-
Stencil Client Patch Browser v4.
|
|
11
|
+
Stencil Client Patch Browser v4.27.1 | MIT Licensed | https://stenciljs.com
|
|
12
12
|
*/
|
|
13
13
|
var patchBrowser = () => {
|
|
14
14
|
const importMeta = import.meta.url;
|
|
@@ -21,7 +21,7 @@ var patchBrowser = () => {
|
|
|
21
21
|
|
|
22
22
|
patchBrowser().then(async (options) => {
|
|
23
23
|
await globalScripts();
|
|
24
|
-
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]},[[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]}]]],[\"qds-input\",[[81,\"qds-input\",{\"noIcon\":[4,\"no-icon\"],\"size\":[1],\"accept\":[1],\"autoCapitalize\":[1,\"autocapitalize\"],\"autoComplete\":[1,\"autocomplete\"],\"autoFocus\":[4,\"autofocus\"],\"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\"],\"spellCheck\":[4,\"spellcheck\"],\"step\":[8],\"type\":[1],\"validationMessage\":[1,\"validation-message\"],\"validity\":[16],\"value\":[1032],\"willValidate\":[4,\"will-validate\"],\"invalid\":[32],\"tabIndex\":[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-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],\"autoFocus\":[4,\"autofocus\"],\"value\":[8],\"isPressed\":[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-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-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\"],\"autoFocus\":[4,\"autofocus\"],\"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\"],\"invalid\":[32],\"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-breadcrumb-item\",[[17,\"qds-breadcrumb-item\",{\"text\":[1],\"href\":[1],\"hreflang\":[1],\"referrerPolicy\":[1,\"referrerpolicy\"],\"rel\":[1],\"target\":[1]}]]],[\"qds-dialog\",[[1,\"qds-dialog\",{\"open\":[1540]},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],\"autoFocus\":[4,\"autofocus\"],\"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],\"autoCapitalize\":[1,\"autocapitalize\"],\"autoComplete\":[1,\"autocomplete\"],\"autoFocus\":[4,\"autofocus\"],\"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\"],\"spellCheck\":[4,\"spellcheck\"],\"validationMessage\":[1,\"validation-message\"],\"validity\":[16],\"value\":[1032],\"willValidate\":[4,\"will-validate\"],\"wrap\":[1],\"invalid\":[32],\"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],\"autoFocus\":[4,\"autofocus\"],\"checked\":[1028],\"disabled\":[4],\"form\":[1],\"indeterminate\":[1028],\"name\":[1],\"required\":[4],\"validationMessage\":[1,\"validation-message\"],\"validity\":[16],\"value\":[8],\"willValidate\":[4,\"will-validate\"],\"tabIndex\":[32]},[[0,\"click\",\"onClick\"]],{\"checked\":[\"checkedChanged\"],\"disabled\":[\"disabledChanged\"],\"tabindex\":[\"tabindexChanged\"],\"value\":[\"valueChanged\"]}]]],[\"qds-divider\",[[1,\"qds-divider\",{\"importance\":[1],\"vertical\":[4]}]]],[\"qds-badge-counter_3\",[[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\"]}],[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],\"aShape\":[32],\"aViewbox\":[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\"],\"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\",[[17,\"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],\"popupType\":[1,\"popup-type\"],\"size\":[1],\"text\":[1],\"disabled\":[4],\"download\":[1],\"form\":[1],\"formAction\":[1,\"formaction\"],\"formMethod\":[1,\"formmethod\"],\"formNoValidate\":[4,\"formnovalidate\"],\"formTarget\":[1,\"formtarget\"],\"href\":[1],\"rel\":[1],\"name\":[1],\"target\":[1],\"type\":[1],\"value\":[1],\"tabIndex\":[32],\"tooltip\":[32]},[[0,\"click\",\"onClick\"]],{\"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\"]}],[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]}]]]]"), options);
|
|
24
|
+
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]},[[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]}]]],[\"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\"],\"invalid\":[32],\"tabIndex\":[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-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],\"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-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-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\"],\"invalid\":[32],\"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]},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],\"invalid\":[32],\"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\"],\"tabIndex\":[32]},[[0,\"click\",\"onClick\"]],{\"checked\":[\"checkedChanged\"],\"disabled\":[\"disabledChanged\"],\"tabindex\":[\"tabindexChanged\"],\"value\":[\"valueChanged\"]}]]],[\"qds-divider\",[[1,\"qds-divider\",{\"importance\":[1],\"vertical\":[4]}]]],[\"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],\"aShape\":[32],\"aViewbox\":[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\"],\"target\":[\"updateReferenceElement\"],\"trigger\":[\"updateEventListeners\"],\"middleware\":[\"updatePosition\"],\"placement\":[\"updatePosition\"],\"strategy\":[\"updatePosition\"],\"autoUpdateOptions\":[\"startAutoUpdate\"]}]]],[\"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\",[[17,\"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],\"popupType\":[1,\"popup-type\"],\"size\":[1],\"text\":[1],\"disabled\":[4],\"download\":[1],\"form\":[1],\"formAction\":[1,\"formaction\"],\"formMethod\":[1,\"formmethod\"],\"formNoValidate\":[4,\"formnovalidate\"],\"formTarget\":[1,\"formtarget\"],\"href\":[1],\"rel\":[1],\"name\":[1],\"target\":[1],\"type\":[1],\"value\":[1],\"tabIndex\":[32],\"tooltip\":[32]},[[0,\"click\",\"onClick\"]],{\"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\"]}],[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]}]]]]"), options);
|
|
25
25
|
});
|
|
26
26
|
|
|
27
27
|
//# sourceMappingURL=qds.js.map
|
package/dist/esm/qds.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"qds.js","mappings":";;;;;;;;;AAAA;AACA;AACA;AAKA,IAAI,YAAY,GAAG,MAAM;AAUzB,EAAE,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC;AACrC,EAAE,MAAM,IAAI,GAAiE,EAAE,CAAC;AAChF,EAAE,IAAI,UAAU,KAAK,EAAE,EAAE;AACzB,IAAI,IAAI,CAAC,YAAY,GAAG,IAAI,GAAG,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC,IAAI,CAAC;AACtD,GAAG;AACH,EAAE,OAAO,cAAc,CAAC,IAAI,CAAC,CAAC;AAC9B,CAAC;;ACnBD,YAAY,EAAE,CAAC,IAAI,CAAC,OAAO,OAAO,KAAK;AACvC,EAAE,MAAM,aAAa,EAAE,CAAC;AACxB,EAAE,OAAO,aAAa,CAAC,4BAA4B,EAAE,OAAO,CAAC,CAAC;AAC9D,CAAC,CAAC","names":[],"sources":["../../node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v4.
|
|
1
|
+
{"file":"qds.js","mappings":";;;;;;;;;AAAA;AACA;AACA;AAKA,IAAI,YAAY,GAAG,MAAM;AAUzB,EAAE,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC;AACrC,EAAE,MAAM,IAAI,GAAiE,EAAE,CAAC;AAChF,EAAE,IAAI,UAAU,KAAK,EAAE,EAAE;AACzB,IAAI,IAAI,CAAC,YAAY,GAAG,IAAI,GAAG,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC,IAAI,CAAC;AACtD,GAAG;AACH,EAAE,OAAO,cAAc,CAAC,IAAI,CAAC,CAAC;AAC9B,CAAC;;ACnBD,YAAY,EAAE,CAAC,IAAI,CAAC,OAAO,OAAO,KAAK;AACvC,EAAE,MAAM,aAAa,EAAE,CAAC;AACxB,EAAE,OAAO,aAAa,CAAC,4BAA4B,EAAE,OAAO,CAAC,CAAC;AAC9D,CAAC,CAAC","names":[],"sources":["../../node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v4.27.1 | MIT Licensed | https://stenciljs.com\n */\n\n// src/client/client-patch-browser.ts\nimport { BUILD, NAMESPACE } from \"@stencil/core/internal/app-data\";\nimport { consoleDevInfo, H, promiseResolve, win } from \"@stencil/core\";\nvar patchBrowser = () => {\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo(\"Running in development mode.\");\n }\n if (BUILD.cloneNodeFix) {\n patchCloneNodeFix(H.prototype);\n }\n const scriptElm = BUILD.scriptDataOpts ? win.document && Array.from(win.document.querySelectorAll(\"script\")).find(\n (s) => new RegExp(`/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) || s.getAttribute(\"data-stencil-namespace\") === NAMESPACE\n ) : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})[\"data-opts\"] || {} : {};\n if (importMeta !== \"\") {\n opts.resourcesUrl = new URL(\".\", importMeta).href;\n }\n return promiseResolve(opts);\n};\nvar patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function(deep) {\n if (this.nodeName === \"TEMPLATE\") {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport {\n patchBrowser\n};\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(async (options) => {\n await globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"version":3}
|