@quartzds/core 1.0.0-beta.101 → 1.0.0-beta.103

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.
Files changed (110) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/components/index.js +1 -1
  3. package/components/{p-Bs2gYoI1.js → p-Bc6ZTLLS.js} +35 -19
  4. package/components/p-Bc6ZTLLS.js.map +1 -0
  5. package/components/{p-CX33CsGr.js → p-BxzH2nJ3.js} +3 -3
  6. package/components/{p-CX33CsGr.js.map → p-BxzH2nJ3.js.map} +1 -1
  7. package/components/{p-gI_dqe2y.js → p-C9Zam3cp.js} +6 -6
  8. package/components/{p-gI_dqe2y.js.map → p-C9Zam3cp.js.map} +1 -1
  9. package/components/{p-DsDEcBaK.js → p-CY26oHUh.js} +4 -4
  10. package/components/{p-DsDEcBaK.js.map → p-CY26oHUh.js.map} +1 -1
  11. package/components/{p-BV38Aned.js → p-CZWSr0Tw.js} +4 -4
  12. package/components/{p-BV38Aned.js.map → p-CZWSr0Tw.js.map} +1 -1
  13. package/components/{p-DvdFkTCR.js → p-CqnDrfVn.js} +7 -7
  14. package/components/{p-DvdFkTCR.js.map → p-CqnDrfVn.js.map} +1 -1
  15. package/components/{p-DuzHEUpt.js → p-D2Fchejb.js} +3 -3
  16. package/components/{p-DuzHEUpt.js.map → p-D2Fchejb.js.map} +1 -1
  17. package/components/{p-m8C6Jl1D.js → p-Df5vmRk5.js} +5 -5
  18. package/components/{p-m8C6Jl1D.js.map → p-Df5vmRk5.js.map} +1 -1
  19. package/components/qds-action-item.js +28 -19
  20. package/components/qds-action-item.js.map +1 -1
  21. package/components/qds-breadcrumb-item.js +2 -2
  22. package/components/qds-button.js +1 -1
  23. package/components/qds-checkbox.js +1 -1
  24. package/components/qds-chip.js +3 -3
  25. package/components/qds-dialog.js +4 -4
  26. package/components/qds-dropdown.js +1 -1
  27. package/components/qds-form-message.js +2 -2
  28. package/components/qds-icon.js +1 -1
  29. package/components/qds-inline-link.js +2 -2
  30. package/components/qds-input.js +5 -5
  31. package/components/qds-label.js +1 -1
  32. package/components/qds-list-item.js +5 -5
  33. package/components/qds-loader.js +1 -1
  34. package/components/qds-mini-button.js +2 -2
  35. package/components/qds-nav-list-item.js +3 -3
  36. package/components/qds-radio.js +5 -5
  37. package/components/qds-select.js +3 -3
  38. package/components/qds-standalone-link.js +2 -2
  39. package/components/qds-switch.js +1 -1
  40. package/components/qds-tab.js +5 -5
  41. package/components/qds-tabbar.js +4 -4
  42. package/components/qds-table-body.js +1 -1
  43. package/components/qds-table-cell.js +1 -1
  44. package/components/qds-table-head-cell.js +1 -1
  45. package/components/qds-table-head.js +1 -1
  46. package/components/qds-table-row.js +1 -1
  47. package/components/qds-table.js +1 -1
  48. package/components/qds-tag.js +1 -1
  49. package/components/qds-textarea.js +1 -1
  50. package/components/qds-title.js +1 -1
  51. package/components/qds-tooltip.js +1 -1
  52. package/dist/cjs/loader.cjs.js +1 -1
  53. package/dist/cjs/qds-action-item.cjs.entry.js +28 -15
  54. package/dist/cjs/qds-action-item.cjs.entry.js.map +1 -1
  55. package/dist/cjs/qds-action-item.entry.cjs.js.map +1 -1
  56. package/dist/cjs/qds-badge-counter_2.cjs.entry.js +1 -1
  57. package/dist/cjs/qds-checkbox.cjs.entry.js +1 -1
  58. package/dist/cjs/qds-input.cjs.entry.js +1 -1
  59. package/dist/cjs/qds-radio.cjs.entry.js +1 -1
  60. package/dist/cjs/qds-select.cjs.entry.js +1 -1
  61. package/dist/cjs/qds-tag_2.cjs.entry.js +1 -1
  62. package/dist/cjs/qds-tooltip.cjs.entry.js +32 -16
  63. package/dist/cjs/qds-tooltip.cjs.entry.js.map +1 -1
  64. package/dist/cjs/qds-tooltip.entry.cjs.js.map +1 -1
  65. package/dist/cjs/qds.cjs.js +1 -1
  66. package/dist/custom-elements.json +59 -24
  67. package/dist/docs.json +14 -7
  68. package/dist/esm/{helpers-CX33CsGr.js → helpers-BxzH2nJ3.js} +3 -3
  69. package/dist/esm/{helpers-CX33CsGr.js.map → helpers-BxzH2nJ3.js.map} +1 -1
  70. package/dist/esm/loader.js +1 -1
  71. package/dist/esm/qds-action-item.entry.js +30 -17
  72. package/dist/esm/qds-action-item.entry.js.map +1 -1
  73. package/dist/esm/qds-badge-counter_2.entry.js +2 -2
  74. package/dist/esm/qds-breadcrumb-item.entry.js +1 -1
  75. package/dist/esm/qds-checkbox.entry.js +2 -2
  76. package/dist/esm/qds-chip.entry.js +1 -1
  77. package/dist/esm/qds-dialog.entry.js +1 -1
  78. package/dist/esm/qds-dropdown.entry.js +1 -1
  79. package/dist/esm/qds-form-message.entry.js +1 -1
  80. package/dist/esm/qds-icon.entry.js +1 -1
  81. package/dist/esm/qds-inline-link.entry.js +1 -1
  82. package/dist/esm/qds-input.entry.js +2 -2
  83. package/dist/esm/qds-label.entry.js +1 -1
  84. package/dist/esm/qds-list-item.entry.js +1 -1
  85. package/dist/esm/qds-mini-button.entry.js +1 -1
  86. package/dist/esm/qds-nav-list-item.entry.js +1 -1
  87. package/dist/esm/qds-radio.entry.js +2 -2
  88. package/dist/esm/qds-select.entry.js +2 -2
  89. package/dist/esm/qds-standalone-link.entry.js +1 -1
  90. package/dist/esm/qds-switch.entry.js +1 -1
  91. package/dist/esm/qds-tab.entry.js +1 -1
  92. package/dist/esm/qds-tabbar.entry.js +1 -1
  93. package/dist/esm/qds-table-body.entry.js +1 -1
  94. package/dist/esm/qds-table-cell.entry.js +1 -1
  95. package/dist/esm/qds-table-head-cell.entry.js +1 -1
  96. package/dist/esm/qds-table-head.entry.js +1 -1
  97. package/dist/esm/qds-table-row.entry.js +1 -1
  98. package/dist/esm/qds-table.entry.js +1 -1
  99. package/dist/esm/qds-tag_2.entry.js +2 -2
  100. package/dist/esm/qds-textarea.entry.js +1 -1
  101. package/dist/esm/qds-tooltip.entry.js +33 -17
  102. package/dist/esm/qds-tooltip.entry.js.map +1 -1
  103. package/dist/esm/qds.js +1 -1
  104. package/dist/types/components/action-item/action-item.d.ts +5 -2
  105. package/dist/types/components/tooltip/tooltip.d.ts +0 -1
  106. package/dist/types/components.d.ts +1 -1
  107. package/hydrate/index.js +67 -38
  108. package/hydrate/index.mjs +67 -38
  109. package/package.json +1 -1
  110. package/components/p-Bs2gYoI1.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -11,6 +11,20 @@ SPDX-License-Identifier: Apache-2.0
11
11
 
12
12
  > All notable changes to this project will be documented in this file
13
13
 
14
+ ## @quartzds/core [1.0.0-beta.103](https://github.com/quartzds/core-foundations/compare/@quartzds/core@1.0.0-beta.102...@quartzds/core@1.0.0-beta.103) (2025-08-05)
15
+
16
+
17
+ ### 🐛 Bug Fixes
18
+
19
+ * **qds-tooltip:** update middleware and recalculate position on initial display and fix box shadow token ([1660ba2](https://github.com/quartzds/core-foundations/commit/1660ba2c24091852a9ab30efeeaa13adb7337bb5))
20
+
21
+ ## @quartzds/core [1.0.0-beta.102](https://github.com/quartzds/core-foundations/compare/@quartzds/core@1.0.0-beta.101...@quartzds/core@1.0.0-beta.102) (2025-07-31)
22
+
23
+
24
+ ### 🐛 Bug Fixes
25
+
26
+ * **a11y:** add role `menuitem` to the `qds-action-item` ([6160f1f](https://github.com/quartzds/core-foundations/commit/6160f1f9fbaa8a8e0924b3bf2f55d5be47f840c8))
27
+
14
28
  ## @quartzds/core [1.0.0-beta.101](https://github.com/quartzds/core-foundations/compare/@quartzds/core@1.0.0-beta.100...@quartzds/core@1.0.0-beta.101) (2025-07-29)
15
29
 
16
30
 
@@ -4,7 +4,7 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
  export { g as getAssetPath, r as render, s as setAssetPath, a as setNonce, b as setPlatformOptions } from './p-DdPT87mZ.js';
7
- export { r as registerIconLibrary, u as unregisterIconLibrary } from './p-DuzHEUpt.js';
7
+ export { r as registerIconLibrary, u as unregisterIconLibrary } from './p-D2Fchejb.js';
8
8
  export { QdsActionItem, defineCustomElement as defineCustomElementQdsActionItem } from './qds-action-item.js';
9
9
  export { QdsBadgeCounter, defineCustomElement as defineCustomElementQdsBadgeCounter } from './qds-badge-counter.js';
10
10
  export { QdsBadgeIndicator, defineCustomElement as defineCustomElementQdsBadgeIndicator } from './qds-badge-indicator.js';
@@ -5,13 +5,20 @@
5
5
  */
6
6
  import { p as proxyCustomElement, H, c as createEvent, h, e as Host } from './p-DdPT87mZ.js';
7
7
  import { o as offset, f as flip, s as shift, b as arrow, c as computePosition, a as autoUpdate, l as limitShift } from './p-MCOLEIOA.js';
8
- import { e as ignorePromise, c as propertyToPx, a as invariant, r as resolveTarget, d as roundByDPR, j as isTouchDevice } from './p-CX33CsGr.js';
8
+ import { e as ignorePromise, c as propertyToPx, i as invariant, r as resolveTarget, d as roundByDPR, j as isTouchDevice } from './p-BxzH2nJ3.js';
9
9
 
10
- const tooltipCss = ":host([hidden]){display:none!important}:host{align-items:flex-start;background-color:var(--qds-theme-accessory-background);border-radius:var(--qds-accessory-border-radius);box-shadow:var(--qds-theme-accessory-elevation);box-sizing:border-box;color:var(--qds-theme-text-standard);display:flex;flex-direction:column;gap:var(--qds-accessory-gap-children-unrelated);left:0;top:0}:host:before{content:\"\";height:100%;left:0;position:absolute;top:0;width:100%}::slotted(blockquote),::slotted(button),::slotted(dd),::slotted(dl),::slotted(fieldset),::slotted(figure),::slotted(h1),::slotted(h2),::slotted(h3),::slotted(h4),::slotted(h5),::slotted(h6),::slotted(hr),::slotted(input),::slotted(menu),::slotted(ol),::slotted(p),::slotted(pre),::slotted(select),::slotted(textarea),::slotted(ul){margin:0}:host([data-side=bottom]):before,:host([data-side=top]):before{height:calc(var(--qds-accessory-gap-floating, 0px) + var(--qds-signature-triangle-pointer-size-height, 0px));top:100%}:host([data-side=bottom]):before{top:calc((var(--qds-accessory-gap-floating, 0px) + var(--qds-signature-triangle-pointer-size-height, 0px))*-1)}:host([data-side=left]):before,:host([data-side=right]):before{left:100%;width:calc(var(--qds-accessory-gap-floating, 0px) + var(--qds-signature-triangle-pointer-size-height, 0px))}:host([data-side=right]):before{left:calc((var(--qds-accessory-gap-floating, 0px) + var(--qds-signature-triangle-pointer-size-height, 0px))*-1)}.qds-arrow{height:var(--qds-signature-triangle-pointer-size-height);position:absolute;width:var(--qds-signature-triangle-pointer-size-width)}.qds-arrow:before{background-color:var(--qds-theme-accessory-background);clip-path:polygon(0 0,100% 0,50% 100%);height:100%}.qds-arrow:after,.qds-arrow:before{content:\"\";position:absolute;width:100%}.qds-arrow:after{background-color:var(--qds-theme-accessory-border);bottom:calc(var(--qds-accessory-border-width)*-1);clip-path:polygon(0 10%,100% 10%,50% 100%);height:calc(100% + var(--qds-accessory-border-width));z-index:-1}.qds-arrow[data-side=bottom]{top:calc((var(--qds-signature-triangle-pointer-size-height) - var(--qds-accessory-effect-section-position-y))*-1);transform:rotate(180deg)}.qds-arrow[data-side=left]{right:calc((var(--qds-accessory-gap-floating) + var(--qds-signature-triangle-pointer-size-height))*-1 + var(--qds-accessory-effect-section-position-y));transform:rotate(-90deg)}.qds-arrow[data-side=right]{left:calc((var(--qds-accessory-gap-floating) + var(--qds-signature-triangle-pointer-size-height))*-1 + var(--qds-accessory-effect-section-position-y));transform:rotate(90deg)}.qds-arrow[data-side=top]{bottom:calc((var(--qds-signature-triangle-pointer-size-height) - var(--qds-accessory-effect-section-position-y))*-1)}.qds-tooltip{align-items:inherit;border:var(--qds-accessory-border-width) solid var(--qds-theme-accessory-border);border-radius:var(--qds-accessory-border-radius);display:inherit;flex-direction:inherit;flex-wrap:inherit;gap:inherit;justify-content:inherit;padding:var(--qds-accessory-padding)}";
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-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;top:0}:host:before{content:\"\";height:100%;left:0;position:absolute;top:0;width:100%}::slotted(blockquote),::slotted(button),::slotted(dd),::slotted(dl),::slotted(fieldset),::slotted(figure),::slotted(h1),::slotted(h2),::slotted(h3),::slotted(h4),::slotted(h5),::slotted(h6),::slotted(hr),::slotted(input),::slotted(menu),::slotted(ol),::slotted(p),::slotted(pre),::slotted(select),::slotted(textarea),::slotted(ul){margin:0}:host([data-side=bottom]):before,:host([data-side=top]):before{height:calc(var(--qds-accessory-gap-floating, 0px) + var(--qds-signature-triangle-pointer-size-height, 0px));top:100%}:host([data-side=bottom]):before{top:calc((var(--qds-accessory-gap-floating, 0px) + var(--qds-signature-triangle-pointer-size-height, 0px))*-1)}:host([data-side=left]):before,:host([data-side=right]):before{left:100%;width:calc(var(--qds-accessory-gap-floating, 0px) + var(--qds-signature-triangle-pointer-size-height, 0px))}:host([data-side=right]):before{left:calc((var(--qds-accessory-gap-floating, 0px) + var(--qds-signature-triangle-pointer-size-height, 0px))*-1)}.qds-arrow{height:var(--qds-signature-triangle-pointer-size-height);position:absolute;width:var(--qds-signature-triangle-pointer-size-width)}.qds-arrow:before{background-color:var(--qds-theme-accessory-background);clip-path:polygon(0 0,100% 0,50% 100%);height:100%}.qds-arrow:after,.qds-arrow:before{content:\"\";position:absolute;width:100%}.qds-arrow:after{background-color:var(--qds-theme-accessory-border);bottom:calc(var(--qds-accessory-border-width)*-1);clip-path:polygon(0 10%,100% 10%,50% 100%);height:calc(100% + var(--qds-accessory-border-width));z-index:-1}.qds-arrow[data-side=bottom]{top:calc((var(--qds-signature-triangle-pointer-size-height) - var(--qds-accessory-effect-section-position-y))*-1);transform:rotate(180deg)}.qds-arrow[data-side=left]{right:calc((var(--qds-accessory-gap-floating) + var(--qds-signature-triangle-pointer-size-height))*-1 + var(--qds-accessory-effect-section-position-y));transform:rotate(-90deg)}.qds-arrow[data-side=right]{left:calc((var(--qds-accessory-gap-floating) + var(--qds-signature-triangle-pointer-size-height))*-1 + var(--qds-accessory-effect-section-position-y));transform:rotate(90deg)}.qds-arrow[data-side=top]{bottom:calc((var(--qds-signature-triangle-pointer-size-height) - var(--qds-accessory-effect-section-position-y))*-1)}.qds-tooltip{align-items:inherit;border:var(--qds-accessory-border-width) solid var(--qds-theme-accessory-border);border-radius:var(--qds-accessory-border-radius);display:inherit;flex-direction:inherit;flex-wrap:inherit;gap:inherit;justify-content:inherit;padding:var(--qds-accessory-padding)}";
11
11
 
12
12
  // SPDX-FileCopyrightText: © 2024 Schneider Electric
13
13
  //
14
14
  // SPDX-License-Identifier: Apache-2.0
15
+ var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
16
+ if (kind === "a" && !f)
17
+ throw new TypeError("Private accessor was defined without a getter");
18
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
19
+ throw new TypeError("Cannot read private member from an object whose class did not declare it");
20
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
21
+ };
15
22
  var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
16
23
  if (kind === "m")
17
24
  throw new TypeError("Private method is not writable");
@@ -21,14 +28,7 @@ var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) ||
21
28
  throw new TypeError("Cannot write private member to an object whose class did not declare it");
22
29
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
23
30
  };
24
- var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
25
- if (kind === "a" && !f)
26
- throw new TypeError("Private accessor was defined without a getter");
27
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
28
- throw new TypeError("Cannot read private member from an object whose class did not declare it");
29
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
30
- };
31
- var _Tooltip_instances, _Tooltip_arrowContainerElement, _Tooltip_cleanup, _Tooltip_clickedTooltip, _Tooltip_isTouchDevice, _Tooltip_listeners, _Tooltip_referenceElement, _Tooltip_arrowContainerRef, _Tooltip_boundTooltipPointerDown, _Tooltip_handleFocus, _Tooltip_boundFocus, _Tooltip_handleKeyDown, _Tooltip_boundKeyDown, _Tooltip_handlePointerenter, _Tooltip_boundPointerenter, _Tooltip_handlePointerleave, _Tooltip_boundPointerleave, _Tooltip_handleFocusOut, _Tooltip_boundFocusout, _Tooltip_handlePointerdown, _Tooltip_boundPointerdown, _Tooltip_handleReferenceClick, _Tooltip_boundReferenceClick, _Tooltip_on, _Tooltip_removeEventListeners;
31
+ var _Tooltip_instances, _Tooltip_arrowContainerElement, _Tooltip_cleanup, _Tooltip_clickedTooltip, _Tooltip_isTouchDevice, _Tooltip_opened, _Tooltip_listeners, _Tooltip_referenceElement, _Tooltip_arrowContainerRef, _Tooltip_boundTooltipPointerDown, _Tooltip_handleFocus, _Tooltip_boundFocus, _Tooltip_handleKeyDown, _Tooltip_boundKeyDown, _Tooltip_handlePointerenter, _Tooltip_boundPointerenter, _Tooltip_handlePointerleave, _Tooltip_boundPointerleave, _Tooltip_handleFocusOut, _Tooltip_boundFocusout, _Tooltip_handlePointerdown, _Tooltip_boundPointerdown, _Tooltip_handleReferenceClick, _Tooltip_boundReferenceClick, _Tooltip_on, _Tooltip_removeEventListeners;
32
32
  let autoIncrementingId = 1;
33
33
  const Tooltip = /*@__PURE__*/ proxyCustomElement(class Tooltip extends H {
34
34
  constructor() {
@@ -70,7 +70,21 @@ const Tooltip = /*@__PURE__*/ proxyCustomElement(class Tooltip extends H {
70
70
  _Tooltip_arrowContainerElement.set(this, void 0);
71
71
  _Tooltip_cleanup.set(this, void 0);
72
72
  _Tooltip_clickedTooltip.set(this, false);
73
- _Tooltip_isTouchDevice.set(this, false);
73
+ _Tooltip_isTouchDevice.set(this, false
74
+ /**
75
+ * Whether the tooltip is once opened.
76
+ * This is used to prevent multiple calls to `updateArrow()`,
77
+ * `updateMiddleware()`,
78
+ * and `update()` when the tooltip is already opened.
79
+ */
80
+ );
81
+ /**
82
+ * Whether the tooltip is once opened.
83
+ * This is used to prevent multiple calls to `updateArrow()`,
84
+ * `updateMiddleware()`,
85
+ * and `update()` when the tooltip is already opened.
86
+ */
87
+ _Tooltip_opened.set(this, false);
74
88
  _Tooltip_listeners.set(this, []);
75
89
  _Tooltip_referenceElement.set(this, void 0);
76
90
  _Tooltip_arrowContainerRef.set(this, (div) => {
@@ -109,6 +123,10 @@ const Tooltip = /*@__PURE__*/ proxyCustomElement(class Tooltip extends H {
109
123
  return;
110
124
  this.open = true;
111
125
  this.startAutoUpdate();
126
+ if (!__classPrivateFieldGet(this, _Tooltip_opened, "f")) {
127
+ await Promise.all([this.updateArrow(), this.updateMiddleware()]);
128
+ }
129
+ __classPrivateFieldSet(this, _Tooltip_opened, true, "f");
112
130
  }
113
131
  /**
114
132
  * Close the tooltip.
@@ -155,6 +173,7 @@ const Tooltip = /*@__PURE__*/ proxyCustomElement(class Tooltip extends H {
155
173
  element: __classPrivateFieldGet(this, _Tooltip_arrowContainerElement, "f"),
156
174
  }),
157
175
  ].filter((middleware) => middleware !== false);
176
+ await this.updatePosition();
158
177
  }
159
178
  updateAriaHasPopup() {
160
179
  __classPrivateFieldSet(this, _Tooltip_referenceElement, resolveTarget(this.target), "f");
@@ -251,9 +270,6 @@ const Tooltip = /*@__PURE__*/ proxyCustomElement(class Tooltip extends H {
251
270
  await this.updateReferenceElement();
252
271
  autoIncrementingId += 1;
253
272
  }
254
- async componentDidLoad() {
255
- await this.updateArrow();
256
- }
257
273
  disconnectedCallback() {
258
274
  if (!(__classPrivateFieldGet(this, _Tooltip_referenceElement, "f") instanceof globalThis.Element))
259
275
  return;
@@ -261,10 +277,10 @@ const Tooltip = /*@__PURE__*/ proxyCustomElement(class Tooltip extends H {
261
277
  __classPrivateFieldGet(this, _Tooltip_referenceElement, "f").removeAttribute('aria-describedby');
262
278
  }
263
279
  render() {
264
- return (h(Host, { key: 'b676c6762fee2afa9db5148a0d61e592903dd195', "data-side": this.side, role: this.host.role ?? 'tooltip', onKeyDown: __classPrivateFieldGet(this, _Tooltip_boundKeyDown, "f"), onPointerDown: __classPrivateFieldGet(this, _Tooltip_boundTooltipPointerDown, "f"), style: {
280
+ return (h(Host, { key: 'bd33dd6ece46638ab96939b285573ae0c42e5d24', "data-side": this.side, role: this.host.role ?? 'tooltip', onKeyDown: __classPrivateFieldGet(this, _Tooltip_boundKeyDown, "f"), onPointerDown: __classPrivateFieldGet(this, _Tooltip_boundTooltipPointerDown, "f"), style: {
265
281
  position: this.hostPosition,
266
282
  transform: this.hostTransform,
267
- } }, h("div", { key: '47666133d72f7121fd938bfb277f1fd5222bff89', class: "qds-tooltip" }, h("slot", { key: 'fc7f16621283fb3c5019214f26775d6b599565e9' })), h("div", { key: '3faae8afe52fba2753b3d1bb5addcfc57bff03f2', class: "qds-arrow", "data-side": this.side, ref: __classPrivateFieldGet(this, _Tooltip_arrowContainerRef, "f"), style: this.aStyles })));
283
+ } }, h("div", { key: 'a34f7726f24fb827a2dcae22150b5ad210fc8567', class: "qds-tooltip" }, h("slot", { key: '8109a6da1ff0b9bcc67619794eab66f6150e4254' })), h("div", { key: '917db4eb3d212caebdb88ac43e59f028a4143e5c', class: "qds-arrow", "data-side": this.side, ref: __classPrivateFieldGet(this, _Tooltip_arrowContainerRef, "f"), style: this.aStyles })));
268
284
  }
269
285
  get host() { return this; }
270
286
  static get watchers() { return {
@@ -325,7 +341,7 @@ const Tooltip = /*@__PURE__*/ proxyCustomElement(class Tooltip extends H {
325
341
  "strategy": ["updatePosition"],
326
342
  "autoUpdateOptions": ["startAutoUpdate"]
327
343
  }]);
328
- _Tooltip_arrowContainerElement = new WeakMap(), _Tooltip_cleanup = new WeakMap(), _Tooltip_clickedTooltip = new WeakMap(), _Tooltip_isTouchDevice = new WeakMap(), _Tooltip_listeners = new WeakMap(), _Tooltip_referenceElement = new WeakMap(), _Tooltip_arrowContainerRef = new WeakMap(), _Tooltip_boundTooltipPointerDown = new WeakMap(), _Tooltip_boundFocus = new WeakMap(), _Tooltip_boundKeyDown = new WeakMap(), _Tooltip_boundPointerenter = new WeakMap(), _Tooltip_boundPointerleave = new WeakMap(), _Tooltip_boundFocusout = new WeakMap(), _Tooltip_boundPointerdown = new WeakMap(), _Tooltip_boundReferenceClick = new WeakMap(), _Tooltip_instances = new WeakSet(), _Tooltip_handleFocus = async function _Tooltip_handleFocus() {
344
+ _Tooltip_arrowContainerElement = new WeakMap(), _Tooltip_cleanup = new WeakMap(), _Tooltip_clickedTooltip = new WeakMap(), _Tooltip_isTouchDevice = new WeakMap(), _Tooltip_opened = new WeakMap(), _Tooltip_listeners = new WeakMap(), _Tooltip_referenceElement = new WeakMap(), _Tooltip_arrowContainerRef = new WeakMap(), _Tooltip_boundTooltipPointerDown = new WeakMap(), _Tooltip_boundFocus = new WeakMap(), _Tooltip_boundKeyDown = new WeakMap(), _Tooltip_boundPointerenter = new WeakMap(), _Tooltip_boundPointerleave = new WeakMap(), _Tooltip_boundFocusout = new WeakMap(), _Tooltip_boundPointerdown = new WeakMap(), _Tooltip_boundReferenceClick = new WeakMap(), _Tooltip_instances = new WeakSet(), _Tooltip_handleFocus = async function _Tooltip_handleFocus() {
329
345
  if (!this.disabled)
330
346
  await this.show();
331
347
  }, _Tooltip_handleKeyDown = async function _Tooltip_handleKeyDown(event) {
@@ -386,6 +402,6 @@ function defineCustomElement() {
386
402
  }
387
403
 
388
404
  export { Tooltip as T, defineCustomElement as d };
389
- //# sourceMappingURL=p-Bs2gYoI1.js.map
405
+ //# sourceMappingURL=p-Bc6ZTLLS.js.map
390
406
 
391
- //# sourceMappingURL=p-Bs2gYoI1.js.map
407
+ //# sourceMappingURL=p-Bc6ZTLLS.js.map
@@ -0,0 +1 @@
1
+ {"file":"p-Bc6ZTLLS.js","mappings":";;;;;;;;;AAAA,MAAM,UAAU,GAAG,48FAA48F;;ACA/9F;AACA;AACA;;;;;;;;;;;;;;;;;;AA8CA,IAAI,kBAAkB,GAAG,CAAC;MAgBb,OAAO,iBAAAA,kBAAA,CAAA,MAAA,OAAA,SAAAC,CAAA,CAAA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I,CAAC,YAAY;AAAE,QAAA,MAAM,IAAI,CAAC,KAAK,EAAE;AACvC,CAAC,kCAMD,eAAK,6BAAA,GAAA;IACH,IAAI,CAAC,IAAI,CAAC,QAAQ;AAAE,QAAA,OAAO,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,KAAK,EAAE,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;AACpE,CAAC,EAOC,WAAA,GAAA,SAAA,WAAA,CAAA,OAAgB,EAChB,KAAwC,EACxC,QAA4C,EAAA;AAE5C,IAAA,MAAM,WAAW,GAAG,sBAAA,CAAA,IAAI,EAAA,kBAAA,EAAA,GAAA,CAAW,CAAC,IAAI,CACtC,CAAC,KAAK,KAAK,KAAK,CAAC,OAAO,KAAK,OAAO,IAAI,KAAK,CAAC,KAAK,KAAK,KAAK,CAC9D;AACD,IAAA,IAAI,WAAW;QAAE;AAEjB,IAAA,OAAO,CAAC,gBAAgB,CAAC,KAAK,EAAE,QAAQ,CAAC;AACzC,IAAA,sBAAA,CAAA,IAAI,EAAA,kBAAA,EAAA,GAAA,CAAW,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;AACpD,CAAC,EAAA,6BAAA,GAAA,SAAA,6BAAA,GAAA;AAGC,IAAA,KAAK,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,sBAAA,CAAA,IAAI,EAAW,kBAAA,EAAA,GAAA,CAAA;AACxD,QAAA,OAAO,CAAC,mBAAmB,CAAC,KAAK,EAAE,QAAQ,CAAC;IAC9C,sBAAA,CAAA,IAAI,EAAA,kBAAA,EAAc,EAAE,EAAA,GAAA,CAAA;AACtB,CAAC;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"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-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 top: 0;\n}\n\n:host::before {\n content: '';\n height: 100%;\n left: 0;\n position: absolute;\n top: 0;\n width: 100%;\n}\n\n::slotted(blockquote),\n::slotted(button),\n::slotted(dd),\n::slotted(dl),\n::slotted(fieldset),\n::slotted(figure),\n::slotted(h1),\n::slotted(h2),\n::slotted(h3),\n::slotted(h4),\n::slotted(h5),\n::slotted(h6),\n::slotted(hr),\n::slotted(input),\n::slotted(menu),\n::slotted(ol),\n::slotted(p),\n::slotted(pre),\n::slotted(select),\n::slotted(textarea),\n::slotted(ul) {\n margin: 0;\n}\n\n:host([data-side='top'])::before,\n:host([data-side='bottom'])::before {\n height: calc(\n var(--qds-accessory-gap-floating, 0px) +\n var(--qds-signature-triangle-pointer-size-height, 0px)\n );\n top: 100%;\n}\n\n:host([data-side='bottom'])::before {\n top: calc(\n -1 * (var(--qds-accessory-gap-floating, 0px) +\n var(--qds-signature-triangle-pointer-size-height, 0px))\n );\n}\n\n:host([data-side='left'])::before,\n:host([data-side='right'])::before {\n width: calc(\n var(--qds-accessory-gap-floating, 0px) +\n var(--qds-signature-triangle-pointer-size-height, 0px)\n );\n left: 100%;\n}\n\n:host([data-side='right'])::before {\n left: calc(\n -1 * (var(--qds-accessory-gap-floating, 0px) +\n var(--qds-signature-triangle-pointer-size-height, 0px))\n );\n}\n\n.qds-arrow {\n position: absolute;\n width: var(--qds-signature-triangle-pointer-size-width);\n height: var(--qds-signature-triangle-pointer-size-height);\n\n &::before {\n content: '';\n position: absolute;\n width: 100%;\n height: 100%;\n background-color: var(--qds-theme-accessory-background);\n clip-path: polygon(0% 0%, 100% 0%, 50% 100%);\n }\n\n &::after {\n content: '';\n position: absolute;\n width: 100%;\n height: calc(100% + var(--qds-accessory-border-width));\n background-color: var(--qds-theme-accessory-border);\n clip-path: polygon(0% 10%, 100% 10%, 50% 100%);\n z-index: -1;\n bottom: calc(-1 * var(--qds-accessory-border-width));\n }\n\n &[data-side='bottom'] {\n top: calc(\n (\n var(--qds-signature-triangle-pointer-size-height) -\n var(--qds-accessory-effect-section-position-y)\n ) * -1\n );\n transform: rotate(180deg);\n }\n\n &[data-side='left'] {\n right: calc(\n (\n (\n var(--qds-accessory-gap-floating) +\n var(--qds-signature-triangle-pointer-size-height)\n ) * -1\n ) + var(--qds-accessory-effect-section-position-y)\n );\n transform: rotate(-90deg);\n }\n\n &[data-side='right'] {\n left: calc(\n (\n (\n var(--qds-accessory-gap-floating) +\n var(--qds-signature-triangle-pointer-size-height)\n ) * -1\n ) + var(--qds-accessory-effect-section-position-y)\n );\n transform: rotate(90deg);\n }\n\n &[data-side='top'] {\n bottom: calc(\n (\n var(--qds-signature-triangle-pointer-size-height) -\n var(--qds-accessory-effect-section-position-y)\n ) * -1\n );\n }\n}\n\n.qds-tooltip {\n border: var(--qds-accessory-border-width) solid\n var(--qds-theme-accessory-border);\n border-radius: var(--qds-accessory-border-radius);\n padding: var(--qds-accessory-padding);\n display: inherit;\n flex-direction: inherit;\n flex-wrap: inherit;\n justify-content: inherit;\n align-items: inherit;\n gap: inherit;\n}\n","// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\nimport type {\n AutoUpdateOptions,\n DetectOverflowOptions,\n FlipOptions,\n Middleware,\n Placement,\n ReferenceElement,\n ShiftOptions,\n Side,\n Strategy,\n} from '@floating-ui/dom'\nimport {\n arrow,\n autoUpdate,\n computePosition,\n flip,\n limitShift,\n offset,\n shift,\n} from '@floating-ui/dom'\nimport type { ComponentInterface, EventEmitter } from '@stencil/core'\nimport {\n Component,\n Element,\n Event,\n h,\n Host,\n Method,\n Prop,\n State,\n Watch,\n} from '@stencil/core'\nimport type { Split } from 'type-fest'\n\nimport type { OffsetOptions } from '../../helpers'\nimport {\n ignorePromise,\n invariant,\n isTouchDevice,\n propertyToPx,\n resolveTarget,\n roundByDPR,\n} from '../../helpers'\n\nlet autoIncrementingId = 1\n\nexport type TriggerEvent = Extract<\n keyof GlobalEventHandlersEventMap,\n 'click' | 'focus' | 'focusin' | 'pointerenter'\n>\n\n/**\n * @slot Content to display in the dropdown.\n * @see https://quartz.se.com/build/components/tooltip\n */\n@Component({\n tag: 'qds-tooltip',\n shadow: true,\n styleUrl: 'tooltip.css',\n})\nexport class Tooltip implements ComponentInterface {\n /**\n * Options to pass to Floating UI's\n * [`autoUpdate()` function](https://floating-ui.com/docs/autoUpdate).\n *\n * @see https://floating-ui.com/docs/autoupdate#options\n */\n @Prop() public readonly autoUpdateOptions?: AutoUpdateOptions\n\n /**\n * Prevents the tooltip from being shown by user interaction. The tooltip can\n * still be displayed by calling the `show()` method.\n */\n @Prop() public readonly disabled: boolean = false\n\n /**\n * Options to pass to Floating UI's\n * [`flip` middleware](https://floating-ui.com/docs/flip).\n *\n * The [`crossAxis` option](https://floating-ui.com/docs/flip#crossaxis) is\n * set to the value of the `noShift` property by default for interoperability\n * with the [`shift` middleware](https://floating-ui.com/docs/shift).\n *\n * @see https://floating-ui.com/docs/flip#options\n */\n @Prop() public readonly flipOptions?: Partial<\n DetectOverflowOptions & FlipOptions\n >\n\n /**\n * Disable Floating UI's\n * [`flip` middleware](https://floating-ui.com/docs/flip).\n */\n @Prop() public readonly noFlip: boolean = false\n\n /**\n * Disable Floating UI's\n * [`shift` middleware](https://floating-ui.com/docs/shift).\n */\n @Prop() public readonly noShift: boolean = false\n\n /**\n * Options to pass to Floating UI's\n * [`offset` middleware](https://floating-ui.com/docs/offset).\n *\n * The [`mainAxis` option](https://floating-ui.com/docs/offset#mainaxis) is\n * not supported.\n *\n * @see https://floating-ui.com/docs/offset#options\n */\n @Prop() public readonly offsetOptions?: OffsetOptions\n\n /**\n * Where to place the tooltip relative to the `target`.\n *\n * @see https://floating-ui.com/docs/tutorial#placements\n */\n @Prop() public readonly placement: Placement = 'top'\n\n /**\n * Options to pass to Floating UI's\n * [`shift` middleware](https://floating-ui.com/docs/shift).\n *\n * @see https://floating-ui.com/docs/shift#options\n */\n @Prop() public readonly shiftOptions?: Partial<\n DetectOverflowOptions & ShiftOptions\n >\n\n /**\n * The CSS position strategy to use.\n *\n * @see https://floating-ui.com/docs/computeposition#strategy\n */\n @Prop() public readonly strategy?: Strategy\n\n /**\n * The trigger element that will trigger the tooltip. The target specified\n * can be any of the following:\n *\n * - A CSS selector string\n * - A reference to an [`Element`][] or [Virtual Element][]\n * - A function returning a reference to an [`Element`][],\n * [Virtual Element][], or a CSS selector string\n *\n * [`Element`]: https://developer.mozilla.org/docs/Web/API/Element\n * [Virtual Element]: https://floating-ui.com/docs/virtual-elements\n */\n @Prop() public readonly target?:\n | ReferenceElement\n | string\n | (() => ReferenceElement | string)\n\n /**\n * Determines the events that cause the tooltip to show. Multiple event names\n * are separated by spaces.\n */\n @Prop() public readonly trigger?: TriggerEvent[] | string =\n 'pointerenter focus'\n\n /**\n * Emitted when the tooltip is closed.\n */\n @Event({ eventName: 'qdsClose', bubbles: false, cancelable: false })\n private readonly closeEmitter!: EventEmitter<void>\n\n @Element() private readonly host!: HTMLElement\n\n @State() private hostPosition?: string\n\n @State() private hostTransform?: string\n\n @State() private open = false\n\n @State() private middleware?: Middleware[]\n\n @State() private side: Side = 'top'\n\n @State() private aStyles?: Record<string, string | undefined>\n\n @State() private aHeight = 0\n\n @State() private aGap = 0\n\n #arrowContainerElement?: HTMLElement\n\n #cleanup?: () => void\n\n #clickedTooltip = false\n\n #isTouchDevice = false\n\n /**\n * Whether the tooltip is once opened.\n * This is used to prevent multiple calls to `updateArrow()`,\n * `updateMiddleware()`,\n * and `update()` when the tooltip is already opened.\n */\n #opened = false\n\n #listeners: {\n element: Element\n event: keyof GlobalEventHandlersEventMap\n listener: EventListenerOrEventListenerObject\n }[] = []\n\n #referenceElement?: ReferenceElement\n\n /**\n * Show the tooltip.\n */\n @Method()\n public async show(): Promise<void> {\n if (this.open) return\n\n this.open = true\n this.startAutoUpdate()\n\n if (!this.#opened) {\n await Promise.all([this.updateArrow(), this.updateMiddleware()])\n }\n\n this.#opened = true\n }\n\n /**\n * Close the tooltip.\n */\n @Method()\n public async close(): Promise<void> {\n if (!this.open) return\n\n this.closeEmitter.emit()\n\n this.open = false\n this.#clickedTooltip = false\n if (this.#cleanup) this.#cleanup()\n }\n\n /**\n * Update the tooltip's arrow.\n *\n * This method should typically be called when the Quartz platform was\n * changed.\n */\n @Method()\n public async updateArrow(): Promise<void> {\n this.aHeight =\n propertyToPx(this.host, `--qds-signature-triangle-pointer-size-height`) ??\n 0\n this.aGap = propertyToPx(this.host, '--qds-accessory-gap-floating') ?? 0\n }\n\n @Watch('aGap')\n @Watch('aHeight')\n @Watch('flipOptions')\n @Watch('noFlip')\n @Watch('noShift')\n @Watch('offsetOptions')\n @Watch('shiftOptions')\n protected async updateMiddleware(): Promise<void> {\n invariant(this.#arrowContainerElement)\n\n this.middleware = [\n offset({\n ...this.offsetOptions,\n mainAxis: this.aGap + this.aHeight,\n }),\n !this.noFlip &&\n flip({\n crossAxis: this.noShift,\n ...this.flipOptions,\n }),\n !this.noShift &&\n shift({\n limiter: limitShift(),\n ...this.shiftOptions,\n }),\n arrow({\n element: this.#arrowContainerElement,\n }),\n ].filter((middleware): middleware is Middleware => middleware !== false)\n\n await this.updatePosition()\n }\n\n @Watch('role')\n protected updateAriaHasPopup(): void {\n this.#referenceElement = resolveTarget(this.target)\n\n if (\n this.#referenceElement instanceof globalThis.Element &&\n this.host.role === 'dialog'\n ) {\n this.#referenceElement.ariaHasPopup = 'dialog'\n }\n }\n\n @Watch('open')\n protected setAriaExpanded(): void {\n this.host.hidden = !this.open\n if (\n this.#referenceElement instanceof globalThis.Element &&\n this.host.role === 'dialog'\n ) {\n this.#referenceElement.ariaExpanded = String(this.open)\n }\n }\n\n @Watch('target')\n private async updateReferenceElement(): Promise<void> {\n this.disconnectedCallback()\n\n this.#referenceElement = resolveTarget(this.target)\n\n if (!(this.#referenceElement instanceof globalThis.Element)) return\n\n this.updateEventListeners()\n this.host.id ||= `qds-tooltip-${autoIncrementingId}`\n this.#referenceElement.setAttribute('aria-describedby', this.host.id)\n\n if (this.host.role === 'dialog') {\n this.#referenceElement.ariaHasPopup = 'dialog'\n }\n }\n\n @Watch('trigger')\n private updateEventListeners(): void {\n if (!(this.#referenceElement instanceof globalThis.Element)) return\n\n const triggers = Array.isArray(this.trigger)\n ? this.trigger\n : ((this.trigger?.split(' ') as Split<TriggerEvent, ' '> | undefined) ??\n [])\n\n this.#removeEventListeners()\n\n if (this.#isTouchDevice)\n this.#on(this.#referenceElement, 'click', this.#boundReferenceClick)\n this.#on(document.documentElement, 'pointerdown', this.#boundPointerdown)\n this.#on(this.#referenceElement, 'keydown', this.#boundKeyDown)\n\n for (const trigger of triggers) {\n switch (trigger) {\n case 'click': {\n this.#on(this.#referenceElement, 'click', this.#boundReferenceClick)\n break\n }\n case 'focus':\n case 'focusin': {\n this.#on(this.#referenceElement, trigger, this.#boundFocus)\n this.#on(this.#referenceElement, 'focusout', this.#boundFocusout)\n this.#on(this.host, 'focusout', this.#boundFocusout)\n break\n }\n case 'pointerenter': {\n this.#on(\n this.#referenceElement,\n 'pointerenter',\n this.#boundPointerenter,\n )\n this.#on(\n this.#referenceElement,\n 'pointerleave',\n this.#boundPointerleave,\n )\n this.#on(this.host, 'pointerleave', this.#boundPointerleave)\n break\n }\n default:\n }\n }\n }\n\n @Watch('middleware')\n @Watch('placement')\n @Watch('strategy')\n private async updatePosition(): Promise<void> {\n invariant(this.#referenceElement)\n\n const { x, y, middlewareData, placement, strategy } = await computePosition(\n this.#referenceElement,\n this.host,\n {\n middleware: this.middleware,\n placement: this.placement,\n strategy: this.strategy,\n },\n )\n const [side] = placement.split('-') as Split<Placement, '-'>\n\n this.hostPosition = strategy\n this.hostTransform = `translate(${roundByDPR(x)}px,${roundByDPR(y)}px)`\n this.side = side\n\n if (middlewareData.arrow === undefined) return\n const { x: aX, y: aY, centerOffset } = middlewareData.arrow\n this.aStyles = {\n display: centerOffset === 0 ? undefined : 'none',\n left: aX === undefined ? '' : `${aX}px`,\n top: aY === undefined ? '' : `${aY}px`,\n }\n }\n\n @Watch('autoUpdateOptions')\n private startAutoUpdate(): void {\n invariant(this.#referenceElement)\n\n if (this.#cleanup) this.#cleanup()\n this.#cleanup = autoUpdate(\n this.#referenceElement,\n this.host,\n () => {\n ignorePromise(this.updatePosition())\n },\n this.autoUpdateOptions,\n )\n }\n\n public async componentWillLoad(): Promise<void> {\n this.#isTouchDevice = isTouchDevice()\n this.host.hidden = true\n await this.updateReferenceElement()\n autoIncrementingId += 1\n }\n\n public disconnectedCallback(): void {\n if (!(this.#referenceElement instanceof globalThis.Element)) return\n\n this.#removeEventListeners()\n this.#referenceElement.removeAttribute('aria-describedby')\n }\n\n public render() {\n return (\n <Host\n data-side={this.side}\n role={this.host.role ?? 'tooltip'}\n onKeyDown={this.#boundKeyDown}\n onPointerDown={this.#boundTooltipPointerDown}\n style={{\n position: this.hostPosition,\n transform: this.hostTransform,\n }}\n >\n <div class=\"qds-tooltip\">\n <slot />\n </div>\n\n <div\n class=\"qds-arrow\"\n data-side={this.side}\n ref={this.#arrowContainerRef}\n style={this.aStyles}\n />\n </Host>\n )\n }\n\n readonly #arrowContainerRef = (div?: HTMLElement): void => {\n this.#arrowContainerElement = div\n }\n\n readonly #boundTooltipPointerDown = (): void => {\n this.#clickedTooltip = true\n }\n\n async #handleFocus(): Promise<void> {\n if (!this.disabled) await this.show()\n }\n\n readonly #boundFocus = (): void => {\n ignorePromise(this.#handleFocus())\n }\n\n async #handleKeyDown(event: Event): Promise<void> {\n if (event instanceof KeyboardEvent && event.key === 'Escape')\n await this.close()\n }\n\n readonly #boundKeyDown = (event: Event): void => {\n ignorePromise(this.#handleKeyDown(event))\n }\n\n async #handlePointerenter(): Promise<void> {\n if (!this.disabled) await this.show()\n }\n\n readonly #boundPointerenter = (): void => {\n ignorePromise(this.#handlePointerenter())\n }\n\n async #handlePointerleave(event: Event): Promise<void> {\n if (\n !this.#clickedTooltip &&\n document.activeElement !== this.#referenceElement &&\n document.activeElement?.closest('qds-tooltip') !== this.host &&\n event instanceof PointerEvent &&\n event.relatedTarget !== this.#referenceElement &&\n event.relatedTarget !== this.host\n )\n await this.close()\n }\n\n readonly #boundPointerleave = (event: Event): void => {\n ignorePromise(this.#handlePointerleave(event))\n }\n\n async #handleFocusOut(event: Event): Promise<void> {\n if (!(event instanceof FocusEvent)) return\n const { relatedTarget } = event\n\n if (\n relatedTarget instanceof globalThis.Element &&\n !this.host.contains(relatedTarget) &&\n this.#referenceElement !== relatedTarget\n )\n await this.close()\n }\n\n readonly #boundFocusout = (event: Event): void => {\n ignorePromise(this.#handleFocusOut(event))\n }\n\n async #handlePointerdown(event: Event): Promise<void> {\n const composedPath = event.composedPath()\n const withinBounds =\n composedPath.includes(this.host) ||\n (this.#referenceElement instanceof globalThis.Element &&\n composedPath.includes(this.#referenceElement))\n if (!withinBounds) await this.close()\n }\n\n readonly #boundPointerdown = (event: Event): void => {\n ignorePromise(this.#handlePointerdown(event))\n }\n\n async #handleReferenceClick(): Promise<void> {\n if (!this.disabled) await (this.open ? this.close() : this.show())\n }\n\n readonly #boundReferenceClick = (): void => {\n ignorePromise(this.#handleReferenceClick())\n }\n\n #on(\n element: Element,\n event: keyof GlobalEventHandlersEventMap,\n listener: EventListenerOrEventListenerObject,\n ): void {\n const hasListener = this.#listeners.some(\n (value) => value.element === element && value.event === event,\n )\n if (hasListener) return\n\n element.addEventListener(event, listener)\n this.#listeners.push({ element, event, listener })\n }\n\n #removeEventListeners(): void {\n for (const { element, event, listener } of this.#listeners)\n element.removeEventListener(event, listener)\n this.#listeners = []\n }\n}\n"],"version":3}
@@ -206,7 +206,7 @@ function resolvePanelElement(tab) {
206
206
  return resolvePanelFromValue(panelValue);
207
207
  }
208
208
 
209
- export { invariant as a, isOverflowing as b, propertyToPx as c, roundByDPR as d, ignorePromise as e, determineLinkIcon as f, pickInputEventAttributes as g, resolvePanelElement as h, inheritAriaAttributes as i, isTouchDevice as j, pickFocusEventAttributes as p, resolveTarget as r };
210
- //# sourceMappingURL=p-CX33CsGr.js.map
209
+ export { isOverflowing as a, inheritAriaAttributes as b, propertyToPx as c, roundByDPR as d, ignorePromise as e, determineLinkIcon as f, pickInputEventAttributes as g, resolvePanelElement as h, invariant as i, isTouchDevice as j, pickFocusEventAttributes as p, resolveTarget as r };
210
+ //# sourceMappingURL=p-BxzH2nJ3.js.map
211
211
 
212
- //# sourceMappingURL=p-CX33CsGr.js.map
212
+ //# sourceMappingURL=p-BxzH2nJ3.js.map
@@ -1 +1 @@
1
- {"file":"p-CX33CsGr.js","mappings":";;;;;AAAA;AACA;AACA;AAaA,MAAM,iBAAiB,GAAG,CACxB,OAAgB,EAChB,UAAuB,GAAA,EAAE,KACX;IACd,MAAM,eAAe,GAAe,EAAE;AAEtC,IAAA,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE;QAClC,MAAM,KAAK,GAAG,OAAO,CAAC,YAAY,CAAC,SAAS,CAAC;AAC7C,QAAA,IAAI,KAAK,KAAK,IAAI,EAAE;AAClB,YAAA,eAAe,CAAC,SAAS,CAAC,GAAG,KAAK;AAClC,YAAA,OAAO,CAAC,eAAe,CAAC,SAAS,CAAC;;;AAItC,IAAA,OAAO,eAAe;AACxB,CAAC;AAmBD,MAAM,cAAc,GAAoB;IACtC,uBAAuB;IACvB,aAAa;IACb,mBAAmB;IACnB,mBAAmB;IACnB,6BAA6B;IAC7B,WAAW;IACX,cAAc;IACd,eAAe;IACf,eAAe;IACf,mBAAmB;IACnB,cAAc;IACd,eAAe;IACf,cAAc;IACd,kBAAkB;IAClB,kBAAkB;IAClB,cAAc;IACd,eAAe;IACf,mBAAmB;IACnB,eAAe;IACf,aAAa;IACb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,CAAC,cAAc,CAAC;IACtD,IAAI,OAAO,KAAK,IAAI;AAAE,QAAA,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC;AAC3E,IAAA,OAAO,OAAO;AAChB;AAEA,SAAS,qBAAqB,CAAC,KAAc,EAAA;AAC3C,IAAA,IAAI,KAAK,YAAY,WAAW,EAAE;AAChC,QAAA,OAAO,KAAK;;AAGd,IAAA,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;QAC7B,MAAM,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC;QAC7C,OAAO,OAAO,YAAY,WAAW,GAAG,OAAO,GAAG,SAAS;;AAG7D,IAAA,OAAO,SAAS;AAClB;AAEM,SAAU,mBAAmB,CACjC,GAAsB,EAAA;IAEtB,MAAM,UAAU,GAAG,OAAO,GAAG,CAAC,KAAK,KAAK,UAAU,GAAG,GAAG,CAAC,KAAK,EAAE,GAAG,GAAG,CAAC,KAAK;AAC5E,IAAA,OAAO,qBAAqB,CAAC,UAAU,CAAC;AAC1C;;;;","names":[],"sources":["src/helpers.ts"],"sourcesContent":["// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\nimport type {\n MiddlewareState,\n OffsetOptions as LibraryOffsetOptions,\n ReferenceElement,\n} from '@floating-ui/dom'\nimport type { Except, Replace } from 'type-fest'\n\nimport type { LinkIcon } from './components/shared'\n\nexport type Attributes = Record<string, string | undefined>\n\nconst inheritAttributes = (\n element: Element,\n attributes: string[] = [],\n): Attributes => {\n const attributeObject: Attributes = {}\n\n for (const attribute of attributes) {\n const value = element.getAttribute(attribute)\n if (value !== null) {\n attributeObject[attribute] = value\n element.removeAttribute(attribute)\n }\n }\n\n return attributeObject\n}\n\ntype ARIAAttribute =\n | Replace<Lowercase<keyof ARIAMixin>, 'aria', 'aria-'>\n | 'aria-activedescendant'\n | 'aria-braillelabel'\n | 'aria-brailleroledescription'\n | 'aria-colindextext'\n | 'aria-controls'\n | 'aria-describedby'\n | 'aria-description'\n | 'aria-details'\n | 'aria-errormessage'\n | 'aria-flowto'\n | 'aria-labelledby'\n | 'aria-owns'\n | 'aria-relevant'\n | 'aria-rowindextext'\n\nconst ariaAttributes: ARIAAttribute[] = [\n 'aria-activedescendant',\n 'aria-atomic',\n 'aria-autocomplete',\n 'aria-braillelabel',\n 'aria-brailleroledescription',\n 'aria-busy',\n 'aria-checked',\n 'aria-colcount',\n 'aria-colindex',\n 'aria-colindextext',\n 'aria-colspan',\n 'aria-controls',\n 'aria-current',\n 'aria-describedby',\n 'aria-description',\n 'aria-details',\n 'aria-disabled',\n 'aria-errormessage',\n 'aria-expanded',\n 'aria-flowto',\n 'aria-haspopup',\n 'aria-hidden',\n 'aria-invalid',\n 'aria-keyshortcuts',\n 'aria-label',\n 'aria-labelledby',\n 'aria-level',\n 'aria-live',\n 'aria-multiline',\n 'aria-multiselectable',\n 'aria-orientation',\n 'aria-owns',\n 'aria-placeholder',\n 'aria-posinset',\n 'aria-pressed',\n 'aria-readonly',\n 'aria-relevant',\n 'aria-required',\n 'aria-roledescription',\n 'aria-rowcount',\n 'aria-rowindex',\n 'aria-rowindextext',\n 'aria-rowspan',\n 'aria-selected',\n 'aria-setsize',\n 'aria-sort',\n 'aria-valuemax',\n 'aria-valuemin',\n 'aria-valuenow',\n 'aria-valuetext',\n 'role',\n]\n\n/**\n * Returns an array of aria attributes that should be copied from\n * the shadow host element to a target within the light DOM.\n *\n * @param element The element that the attributes should be copied from.\n */\nexport const inheritAriaAttributes = (\n element: Element,\n): ReturnType<typeof inheritAttributes> =>\n inheritAttributes(element, ariaAttributes)\n\nconst isProduction = process.env.NODE_ENV === 'production'\nconst prefix = 'Invariant failed'\n\n/**\n * Throws an error if the value is falsy.\n *\n * @param value Value to test.\n * @param message Optional message to display in development builds.\n */\nexport function invariant(value: unknown, message?: string): asserts value {\n // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions\n if (value) return\n if (isProduction) throw new Error(prefix)\n\n const error = message === undefined ? prefix : `${prefix}: ${message}`\n throw new Error(error)\n}\n\n/**\n * From an object pick a set of keys.\n *\n * @param object Object to pick from.\n * @param keys They keys to pick.\n * @returns New object with only the picked keys.\n */\nexport const pick = <T, K extends keyof T>(\n object: T,\n ...keys: K[]\n): Pick<T, K> => {\n const returnValue: Partial<Pick<T, K>> = {}\n for (const key of keys) returnValue[key] = object[key]\n return returnValue as Pick<T, K>\n}\n\nexport type QdsFocusEventDetail = Pick<FocusEvent, 'relatedTarget'>\nexport type QdsInputEventDetail = Pick<\n InputEvent,\n 'data' | 'inputType' | 'isComposing'\n>\nexport const pickFocusEventAttributes = (\n event: FocusEvent,\n): QdsFocusEventDetail => pick(event, 'relatedTarget')\nexport const pickInputEventAttributes = (\n event: InputEvent,\n): QdsInputEventDetail => pick(event, 'data', 'inputType', 'isComposing')\n\nconst getConversionFactor = (\n element: Element,\n unit: string,\n): number | undefined => {\n switch (unit) {\n case 'cm': {\n return 96 / 2.54\n }\n case 'em': {\n return Number.parseFloat(\n globalThis.getComputedStyle(\n element.parentElement ?? document.documentElement,\n ).fontSize,\n )\n }\n case 'in': {\n return 96\n }\n case 'mm': {\n return 96 / 25.4\n }\n case 'pc': {\n return 16\n }\n case 'pt': {\n return 96 / 72\n }\n case 'px': {\n return 1\n }\n case 'rem': {\n return Number.parseFloat(\n globalThis.getComputedStyle(document.documentElement).fontSize,\n )\n }\n default: {\n return undefined\n }\n }\n}\n\nexport const propertyToPx = (\n element: Element,\n property: string,\n): number | undefined => {\n const value = globalThis.getComputedStyle(element).getPropertyValue(property)\n const number = Number.parseFloat(value)\n if (Number.isNaN(number)) return undefined\n const unit = /\\s*[\\d+.-]*\\s*(.*)/.exec(value)?.[1] ?? ''\n\n const conversionFactor = getConversionFactor(element, unit) ?? 1\n return number * conversionFactor\n}\n\nexport const ignorePromise = <T>(promise: Promise<T>): void => {\n promise.catch(() => {\n invariant(false)\n })\n}\n\nexport const isTouchDevice = (): boolean =>\n 'ontouchstart' in globalThis ||\n ('maxTouchPoints' in globalThis && globalThis.navigator.maxTouchPoints > 0)\n\nexport const roundByDPR = (value: number): number => {\n const dpr = devicePixelRatio || 1\n return Math.round(value * dpr) / dpr\n}\n\n/**\n * Checks if an element's content is overflowing.\n *\n * @param element The element to check.\n * @returns `true` if overflowing, `false` otherwise.\n */\nexport const isOverflowing = (element: Element): boolean => {\n const { clientHeight, clientWidth, scrollHeight, scrollWidth } = element\n return scrollHeight > clientHeight + 1 || scrollWidth > clientWidth\n}\n\nexport const determineLinkIcon = (\n href?: URL | string,\n target?: string,\n): LinkIcon | undefined => {\n if (href === undefined) return undefined\n\n let link\n try {\n link = new URL(href, globalThis.location.href)\n } catch {\n return undefined\n }\n const isExternalLink = link.origin !== globalThis.location.origin\n const opensInNewTab = target === '_blank'\n\n if (isExternalLink)\n return opensInNewTab ? 'external-new-tab-link' : 'external-link'\n return undefined\n}\n\nexport const resolveTarget = (\n target?: ReferenceElement | string | (() => ReferenceElement | string),\n): ReferenceElement | undefined => {\n const resolvedTarget = typeof target === 'function' ? target() : target\n if (typeof resolvedTarget !== 'string') return resolvedTarget\n\n const element = document.querySelector(resolvedTarget)\n if (element === null) throw new Error('String must resolve to an Element.')\n return element\n}\n\nfunction resolvePanelFromValue(value: unknown): HTMLElement | undefined {\n if (value instanceof HTMLElement) {\n return value\n }\n\n if (typeof value === 'string') {\n const element = document.querySelector(value)\n return element instanceof HTMLElement ? element : undefined\n }\n\n return undefined\n}\n\nexport function resolvePanelElement(\n tab: HTMLQdsTabElement,\n): HTMLElement | undefined {\n const panelValue = typeof tab.panel === 'function' ? tab.panel() : tab.panel\n return resolvePanelFromValue(panelValue)\n}\n\nexport type OffsetValue = Except<\n Exclude<\n LibraryOffsetOptions,\n // eslint-disable-next-line @typescript-eslint/ban-types\n Function | number\n >,\n 'mainAxis'\n>\nexport type OffsetFunction = (state: MiddlewareState) => OffsetValue\nexport type OffsetOptions = OffsetFunction | OffsetValue\n"],"version":3}
1
+ {"file":"p-Bx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AK,UAAU,GAAG,GAAG,CAAC,KAAK,EAAE,GAAG,GAAG,CAAC,KAAK;AAC5E,IAAA,OAAO,qBAAqB,CAAC,UAAU,CAAC;AAC1C;;;;","names":[],"sources":["src/helpers.ts"],"sourcesContent":["// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\nimport type {\n MiddlewareState,\n OffsetOptions as LibraryOffsetOptions,\n ReferenceElement,\n} from '@floating-ui/dom'\nimport type { Except, Replace } from 'type-fest'\n\nimport type { LinkIcon } from './components/shared'\n\nexport type Attributes = Record<string, string | undefined>\n\nconst inheritAttributes = (\n element: Element,\n attributes: string[] = [],\n): Attributes => {\n const attributeObject: Attributes = {}\n\n for (const attribute of attributes) {\n const value = element.getAttribute(attribute)\n if (value !== null) {\n attributeObject[attribute] = value\n element.removeAttribute(attribute)\n }\n }\n\n return attributeObject\n}\n\ntype ARIAAttribute =\n | Replace<Lowercase<keyof ARIAMixin>, 'aria', 'aria-'>\n | 'aria-activedescendant'\n | 'aria-braillelabel'\n | 'aria-brailleroledescription'\n | 'aria-colindextext'\n | 'aria-controls'\n | 'aria-describedby'\n | 'aria-description'\n | 'aria-details'\n | 'aria-errormessage'\n | 'aria-flowto'\n | 'aria-labelledby'\n | 'aria-owns'\n | 'aria-relevant'\n | 'aria-rowindextext'\n\nconst ariaAttributes: ARIAAttribute[] = [\n 'aria-activedescendant',\n 'aria-atomic',\n 'aria-autocomplete',\n 'aria-braillelabel',\n 'aria-brailleroledescription',\n 'aria-busy',\n 'aria-checked',\n 'aria-colcount',\n 'aria-colindex',\n 'aria-colindextext',\n 'aria-colspan',\n 'aria-controls',\n 'aria-current',\n 'aria-describedby',\n 'aria-description',\n 'aria-details',\n 'aria-disabled',\n 'aria-errormessage',\n 'aria-expanded',\n 'aria-flowto',\n 'aria-haspopup',\n 'aria-hidden',\n 'aria-invalid',\n 'aria-keyshortcuts',\n 'aria-label',\n 'aria-labelledby',\n 'aria-level',\n 'aria-live',\n 'aria-multiline',\n 'aria-multiselectable',\n 'aria-orientation',\n 'aria-owns',\n 'aria-placeholder',\n 'aria-posinset',\n 'aria-pressed',\n 'aria-readonly',\n 'aria-relevant',\n 'aria-required',\n 'aria-roledescription',\n 'aria-rowcount',\n 'aria-rowindex',\n 'aria-rowindextext',\n 'aria-rowspan',\n 'aria-selected',\n 'aria-setsize',\n 'aria-sort',\n 'aria-valuemax',\n 'aria-valuemin',\n 'aria-valuenow',\n 'aria-valuetext',\n 'role',\n]\n\n/**\n * Returns an array of aria attributes that should be copied from\n * the shadow host element to a target within the light DOM.\n *\n * @param element The element that the attributes should be copied from.\n */\nexport const inheritAriaAttributes = (\n element: Element,\n): ReturnType<typeof inheritAttributes> =>\n inheritAttributes(element, ariaAttributes)\n\nconst isProduction = process.env.NODE_ENV === 'production'\nconst prefix = 'Invariant failed'\n\n/**\n * Throws an error if the value is falsy.\n *\n * @param value Value to test.\n * @param message Optional message to display in development builds.\n */\nexport function invariant(value: unknown, message?: string): asserts value {\n // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions\n if (value) return\n if (isProduction) throw new Error(prefix)\n\n const error = message === undefined ? prefix : `${prefix}: ${message}`\n throw new Error(error)\n}\n\n/**\n * From an object pick a set of keys.\n *\n * @param object Object to pick from.\n * @param keys They keys to pick.\n * @returns New object with only the picked keys.\n */\nexport const pick = <T, K extends keyof T>(\n object: T,\n ...keys: K[]\n): Pick<T, K> => {\n const returnValue: Partial<Pick<T, K>> = {}\n for (const key of keys) returnValue[key] = object[key]\n return returnValue as Pick<T, K>\n}\n\nexport type QdsFocusEventDetail = Pick<FocusEvent, 'relatedTarget'>\nexport type QdsInputEventDetail = Pick<\n InputEvent,\n 'data' | 'inputType' | 'isComposing'\n>\nexport const pickFocusEventAttributes = (\n event: FocusEvent,\n): QdsFocusEventDetail => pick(event, 'relatedTarget')\nexport const pickInputEventAttributes = (\n event: InputEvent,\n): QdsInputEventDetail => pick(event, 'data', 'inputType', 'isComposing')\n\nconst getConversionFactor = (\n element: Element,\n unit: string,\n): number | undefined => {\n switch (unit) {\n case 'cm': {\n return 96 / 2.54\n }\n case 'em': {\n return Number.parseFloat(\n globalThis.getComputedStyle(\n element.parentElement ?? document.documentElement,\n ).fontSize,\n )\n }\n case 'in': {\n return 96\n }\n case 'mm': {\n return 96 / 25.4\n }\n case 'pc': {\n return 16\n }\n case 'pt': {\n return 96 / 72\n }\n case 'px': {\n return 1\n }\n case 'rem': {\n return Number.parseFloat(\n globalThis.getComputedStyle(document.documentElement).fontSize,\n )\n }\n default: {\n return undefined\n }\n }\n}\n\nexport const propertyToPx = (\n element: Element,\n property: string,\n): number | undefined => {\n const value = globalThis.getComputedStyle(element).getPropertyValue(property)\n const number = Number.parseFloat(value)\n if (Number.isNaN(number)) return undefined\n const unit = /\\s*[\\d+.-]*\\s*(.*)/.exec(value)?.[1] ?? ''\n\n const conversionFactor = getConversionFactor(element, unit) ?? 1\n return number * conversionFactor\n}\n\nexport const ignorePromise = <T>(promise: Promise<T>): void => {\n promise.catch(() => {\n invariant(false)\n })\n}\n\nexport const isTouchDevice = (): boolean =>\n 'ontouchstart' in globalThis ||\n ('maxTouchPoints' in globalThis && globalThis.navigator.maxTouchPoints > 0)\n\nexport const roundByDPR = (value: number): number => {\n const dpr = devicePixelRatio || 1\n return Math.round(value * dpr) / dpr\n}\n\n/**\n * Checks if an element's content is overflowing.\n *\n * @param element The element to check.\n * @returns `true` if overflowing, `false` otherwise.\n */\nexport const isOverflowing = (element: Element): boolean => {\n const { clientHeight, clientWidth, scrollHeight, scrollWidth } = element\n return scrollHeight > clientHeight + 1 || scrollWidth > clientWidth\n}\n\nexport const determineLinkIcon = (\n href?: URL | string,\n target?: string,\n): LinkIcon | undefined => {\n if (href === undefined) return undefined\n\n let link\n try {\n link = new URL(href, globalThis.location.href)\n } catch {\n return undefined\n }\n const isExternalLink = link.origin !== globalThis.location.origin\n const opensInNewTab = target === '_blank'\n\n if (isExternalLink)\n return opensInNewTab ? 'external-new-tab-link' : 'external-link'\n return undefined\n}\n\nexport const resolveTarget = (\n target?: ReferenceElement | string | (() => ReferenceElement | string),\n): ReferenceElement | undefined => {\n const resolvedTarget = typeof target === 'function' ? target() : target\n if (typeof resolvedTarget !== 'string') return resolvedTarget\n\n const element = document.querySelector(resolvedTarget)\n if (element === null) throw new Error('String must resolve to an Element.')\n return element\n}\n\nfunction resolvePanelFromValue(value: unknown): HTMLElement | undefined {\n if (value instanceof HTMLElement) {\n return value\n }\n\n if (typeof value === 'string') {\n const element = document.querySelector(value)\n return element instanceof HTMLElement ? element : undefined\n }\n\n return undefined\n}\n\nexport function resolvePanelElement(\n tab: HTMLQdsTabElement,\n): HTMLElement | undefined {\n const panelValue = typeof tab.panel === 'function' ? tab.panel() : tab.panel\n return resolvePanelFromValue(panelValue)\n}\n\nexport type OffsetValue = Except<\n Exclude<\n LibraryOffsetOptions,\n // eslint-disable-next-line @typescript-eslint/ban-types\n Function | number\n >,\n 'mainAxis'\n>\nexport type OffsetFunction = (state: MiddlewareState) => OffsetValue\nexport type OffsetOptions = OffsetFunction | OffsetValue\n"],"version":3}
@@ -4,14 +4,14 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
  import { p as proxyCustomElement, H, c as createEvent, d as readTask, h } from './p-DdPT87mZ.js';
7
- import { p as pickFocusEventAttributes, b as isOverflowing } from './p-CX33CsGr.js';
7
+ import { p as pickFocusEventAttributes, a as isOverflowing } from './p-BxzH2nJ3.js';
8
8
  import { V as VALID_STATE, C as CUSTOM_ERROR_FLAGS, N as NO_ERROR_FLAGS } from './p-DQLjJn7-.js';
9
9
  import { d as defineCustomElement$4 } from './p-CdeGV981.js';
10
10
  import { d as defineCustomElement$3 } from './p-C89mbc4M.js';
11
- import { d as defineCustomElement$2 } from './p-DuzHEUpt.js';
12
- import { d as defineCustomElement$1 } from './p-Bs2gYoI1.js';
11
+ import { d as defineCustomElement$2 } from './p-D2Fchejb.js';
12
+ import { d as defineCustomElement$1 } from './p-Bc6ZTLLS.js';
13
13
 
14
- const buttonCss = ":host([hidden]){display:none!important}:host{display:inline-block;outline:none}.qds-button:disabled,.qds-disabled{opacity:var(--qds-theme-disabled);pointer-events:none}.qds-overflow{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.qds-overflow[data-size=hero]{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;white-space:normal}.qds-action{transform:scaleX(var(--qds-direction-factor,1))}.qds-container{display:grid;grid-template-areas:\"a\"}.qds-focus-ring{border-radius:max(1px,var(\n --qds-control-border-radius-top-left,var(--qds-control-border-radius)\n )) max(1px,var(\n --qds-control-border-radius-top-right,var(--qds-control-border-radius)\n )) max(1px,var(\n --qds-control-border-radius-bottom-right,var(--qds-control-border-radius)\n )) max(1px,var(\n --qds-control-border-radius-bottom-left,var(--qds-control-border-radius)\n ));grid-area:a;height:calc(100% + var(--qds-control-border-width) - var(--qds-control-border-width-block-end, var(--qds-control-border-width)));isolation:isolate;outline:var(--qds-theme-focus-border) solid var(--qds-focus-border-width);outline-offset:var(--qds-focus-border-offset);pointer-events:none;visibility:hidden;width:calc(100% + var(--qds-control-border-width) - var(\n --qds-control-border-width-inline-end,\n var(--qds-control-border-width)\n ))}:host(:focus-visible) .qds-focus-ring{visibility:visible}.qds-button{align-items:center;-webkit-appearance:none;appearance:none;background-color:initial;border:none;border-radius:var(\n --qds-control-border-radius-top-left,var(--qds-control-border-radius)\n ) var(--qds-control-border-radius-top-right,var(--qds-control-border-radius)) var(\n --qds-control-border-radius-bottom-right,var(--qds-control-border-radius)\n ) var(\n --qds-control-border-radius-bottom-left,var(--qds-control-border-radius)\n );box-sizing:border-box;cursor:pointer;display:inline-flex;grid-area:a;justify-content:center;min-width:0;outline:none;padding-block:0;position:relative;-webkit-print-color-adjust:exact;print-color-adjust:exact;text-align:center;-webkit-user-select:none;user-select:none}.qds-button:any-link{-webkit-text-decoration:none;text-decoration:none}.qds-icon{flex-shrink:0}.qds-indicator{inset-block-start:0;inset-inline-end:0;position:absolute;transform:translate(50%,-50%)}[data-size=small]{font:var(--qds-control-small-text)}.qds-button[data-size=small]{gap:var(--qds-control-small-gap-internal);height:var(--qds-control-small-height);padding-inline:var(--qds-control-button-small-padding-horizontal)}.qds-button.qds-icon-only[data-size=small]{width:var(--qds-control-small-height)}.qds-icon[data-size=small]{font-size:var(--qds-control-small-icon-size)}[data-size=standard]{font:var(--qds-control-standard-text)}.qds-button[data-size=standard]{gap:var(--qds-control-standard-gap-internal);height:var(--qds-control-standard-height);padding-inline:var(--qds-control-button-standard-padding-horizontal)}.qds-button.qds-icon-only[data-size=standard]{width:var(--qds-control-standard-height)}.qds-icon[data-size=standard]{font-size:var(--qds-control-standard-icon-size)}[data-size=large]{font:var(--qds-control-large-text)}.qds-button[data-size=large]{gap:var(--qds-control-large-gap-internal);height:var(--qds-control-large-height);padding-inline:var(--qds-control-button-large-padding-horizontal)}.qds-button.qds-icon-only[data-size=large]{width:var(--qds-control-large-height)}.qds-icon[data-size=large]{font-size:var(--qds-control-large-icon-size)}[data-size=large],[data-size=small],[data-size=standard]{line-height:normal}.qds-button.qds-icon-only[data-size=large],.qds-button.qds-icon-only[data-size=small],.qds-button.qds-icon-only[data-size=standard]{padding-inline:0}[data-size=hero]{font:var(--qds-control-hero-text)}.qds-button[data-size=hero]{border-radius:var(\n --qds-control-border-radius-top-left,var(--qds-control-hero-border-radius)\n ) var(\n --qds-control-border-radius-top-right,var(--qds-control-hero-border-radius)\n ) var(\n --qds-control-border-radius-bottom-right,var(--qds-control-hero-border-radius)\n ) var(\n --qds-control-border-radius-bottom-left,var(--qds-control-hero-border-radius)\n );gap:var(--qds-control-hero-gap-internal);padding-block:var(--qds-control-hero-padding-auto-height);padding-inline:var(--qds-control-button-hero-padding-horizontal)}.qds-button.qds-icon-only[data-size=hero]{height:var(--qds-control-hero-height);padding-inline:0;width:var(--qds-control-hero-height)}.qds-focus-ring[data-size=hero]{border-radius:max(1px,var(\n --qds-control-border-radius-top-left,var(--qds-control-hero-border-radius)\n )) max(1px,var(\n --qds-control-border-radius-top-right,var(--qds-control-hero-border-radius)\n )) max(1px,var(\n --qds-control-border-radius-bottom-right,var(--qds-control-hero-border-radius)\n )) max(1px,var(\n --qds-control-border-radius-bottom-left,var(--qds-control-hero-border-radius)\n ))}.qds-icon[data-size=hero]{font-size:var(--qds-control-hero-icon-size)}[data-importance=subdued]{color:var(--qds-theme-link-standard-default)}.qds-button[data-importance=subdued]{border-block-end:var(--qds-control-border-width) solid #0000;padding-inline:0}.qds-button[data-importance=subdued]:hover{border-block-end:var(--qds-control-border-width) solid var(--qds-theme-link-standard-hover);color:var(--qds-theme-link-standard-hover)}.qds-button[data-importance=subdued]:active{border-block-end:var(--qds-control-border-width) solid var(--qds-theme-link-standard-pressed);color:var(--qds-theme-link-standard-pressed)}.qds-button[data-importance=subdued]:not(.qds-icon-only){border-radius:0}.qds-button.qds-icon-only[data-importance=subdued]{border:none;color:var(--qds-theme-control-text-standard)}.qds-button.qds-icon-only[data-importance=subdued]:hover{background-color:var(--qds-theme-interactive-background-hover)}.qds-button.qds-icon-only[data-importance=subdued]:active{background-color:var(--qds-theme-interactive-background-pressed)}[data-importance=standard]{color:var(--qds-theme-control-text-standard)}.qds-button[data-importance=standard]{border-color:var(--qds-theme-control-border);border-style:solid;border-width:var(--qds-control-border-width) var(\n --qds-control-border-width-inline-end,var(--qds-control-border-width)\n ) var(--qds-control-border-width-block-end,var(--qds-control-border-width)) var(--qds-control-border-width)}.qds-button[data-importance=standard]:hover{background-color:var(--qds-theme-interactive-background-hover)}.qds-button[data-importance=standard]:active{background-color:var(--qds-theme-interactive-background-pressed)}.qds-button[data-importance=emphasized]{background-color:var(--qds-theme-signature-color-default);color:var(--qds-theme-signature-color-contrast)}.qds-button[data-importance=emphasized]:hover{background-color:var(--qds-theme-signature-color-hover)}.qds-button[data-importance=emphasized]:active{background-color:var(--qds-theme-signature-color-pressed)}.qds-button[data-importance=destructive]{background-color:var(--qds-theme-feedback-action-destructive-default);color:var(--qds-theme-feedback-action-destructive-contrast)}.qds-button[data-importance=destructive]:hover{background-color:var(--qds-theme-feedback-action-destructive-hover)}.qds-button[data-importance=destructive]:active{background-color:var(--qds-theme-feedback-action-destructive-pressed)}[data-importance=subdued-destructive]{color:var(--qds-theme-feedback-action-destructive-default)}.qds-button[data-importance=subdued-destructive]{border-block-end:var(--qds-control-border-width) solid #0000;padding-inline:0}.qds-button[data-importance=subdued-destructive]:hover{border-block-end:var(--qds-control-border-width) solid var(--qds-theme-feedback-action-destructive-hover);color:var(--qds-theme-feedback-action-destructive-hover)}.qds-button[data-importance=subdued-destructive]:active{border-block-end:var(--qds-control-border-width) solid var(--qds-theme-feedback-action-destructive-pressed);color:var(--qds-theme-feedback-action-destructive-pressed)}.qds-button[data-importance=subdued-destructive]:not(.qds-icon-only){border-radius:0}.qds-button.qds-icon-only[data-importance=subdued-destructive]{border:none}.qds-button.qds-icon-only[data-importance=subdued-destructive]:hover{background-color:var(--qds-theme-interactive-background-hover);color:var(--qds-theme-feedback-action-destructive-default)}.qds-button.qds-icon-only[data-importance=subdued-destructive]:active{background-color:var(--qds-theme-interactive-background-pressed);color:var(--qds-theme-feedback-action-destructive-default)}:is([data-action=dropdown],[data-action=dropdown-close]) .qds-action{margin-inline-start:auto;transition-duration:.3s;transition-property:transform}[data-importance=standard]:is([data-action=dropdown],[data-action=dropdown-close]){background-color:var(--qds-theme-control-input-background)}:is([data-action=dropdown],[data-action=dropdown-close]):not([data-importance=subdued]):not([data-importance=subdued-destructive]){padding-inline:var(--qds-control-input-padding-horizontal)}[data-action=dropdown-close] .qds-action{transform:rotate(-180deg)}";
14
+ const buttonCss = ":host([hidden]){display:none!important}:host{display:inline-block;outline:none}.qds-button:disabled,.qds-disabled{opacity:var(--qds-theme-disabled);pointer-events:none}.qds-overflow{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.qds-overflow[data-size=hero]{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;white-space:normal}.qds-action{transform:scaleX(var(--qds-direction-factor,1))}.qds-container{display:grid;grid-template-areas:\"h\"}.qds-focus-ring{border-radius:max(1px,var(\n --qds-control-border-radius-top-left,var(--qds-control-border-radius)\n )) max(1px,var(\n --qds-control-border-radius-top-right,var(--qds-control-border-radius)\n )) max(1px,var(\n --qds-control-border-radius-bottom-right,var(--qds-control-border-radius)\n )) max(1px,var(\n --qds-control-border-radius-bottom-left,var(--qds-control-border-radius)\n ));grid-area:h;height:calc(100% + var(--qds-control-border-width) - var(--qds-control-border-width-block-end, var(--qds-control-border-width)));isolation:isolate;outline:var(--qds-theme-focus-border) solid var(--qds-focus-border-width);outline-offset:var(--qds-focus-border-offset);pointer-events:none;visibility:hidden;width:calc(100% + var(--qds-control-border-width) - var(\n --qds-control-border-width-inline-end,\n var(--qds-control-border-width)\n ))}:host(:focus-visible) .qds-focus-ring{visibility:visible}.qds-button{align-items:center;-webkit-appearance:none;appearance:none;background-color:initial;border:none;border-radius:var(\n --qds-control-border-radius-top-left,var(--qds-control-border-radius)\n ) var(--qds-control-border-radius-top-right,var(--qds-control-border-radius)) var(\n --qds-control-border-radius-bottom-right,var(--qds-control-border-radius)\n ) var(\n --qds-control-border-radius-bottom-left,var(--qds-control-border-radius)\n );box-sizing:border-box;cursor:pointer;display:inline-flex;grid-area:h;justify-content:center;min-width:0;outline:none;padding-block:0;position:relative;-webkit-print-color-adjust:exact;print-color-adjust:exact;text-align:center;-webkit-user-select:none;user-select:none}.qds-button:any-link{-webkit-text-decoration:none;text-decoration:none}.qds-icon{flex-shrink:0}.qds-indicator{inset-block-start:0;inset-inline-end:0;position:absolute;transform:translate(50%,-50%)}[data-size=small]{font:var(--qds-control-small-text)}.qds-button[data-size=small]{gap:var(--qds-control-small-gap-internal);height:var(--qds-control-small-height);padding-inline:var(--qds-control-button-small-padding-horizontal)}.qds-button.qds-icon-only[data-size=small]{width:var(--qds-control-small-height)}.qds-icon[data-size=small]{font-size:var(--qds-control-small-icon-size)}[data-size=standard]{font:var(--qds-control-standard-text)}.qds-button[data-size=standard]{gap:var(--qds-control-standard-gap-internal);height:var(--qds-control-standard-height);padding-inline:var(--qds-control-button-standard-padding-horizontal)}.qds-button.qds-icon-only[data-size=standard]{width:var(--qds-control-standard-height)}.qds-icon[data-size=standard]{font-size:var(--qds-control-standard-icon-size)}[data-size=large]{font:var(--qds-control-large-text)}.qds-button[data-size=large]{gap:var(--qds-control-large-gap-internal);height:var(--qds-control-large-height);padding-inline:var(--qds-control-button-large-padding-horizontal)}.qds-button.qds-icon-only[data-size=large]{width:var(--qds-control-large-height)}.qds-icon[data-size=large]{font-size:var(--qds-control-large-icon-size)}[data-size=large],[data-size=small],[data-size=standard]{line-height:normal}.qds-button.qds-icon-only[data-size=large],.qds-button.qds-icon-only[data-size=small],.qds-button.qds-icon-only[data-size=standard]{padding-inline:0}[data-size=hero]{font:var(--qds-control-hero-text)}.qds-button[data-size=hero]{border-radius:var(\n --qds-control-border-radius-top-left,var(--qds-control-hero-border-radius)\n ) var(\n --qds-control-border-radius-top-right,var(--qds-control-hero-border-radius)\n ) var(\n --qds-control-border-radius-bottom-right,var(--qds-control-hero-border-radius)\n ) var(\n --qds-control-border-radius-bottom-left,var(--qds-control-hero-border-radius)\n );gap:var(--qds-control-hero-gap-internal);padding-block:var(--qds-control-hero-padding-auto-height);padding-inline:var(--qds-control-button-hero-padding-horizontal)}.qds-button.qds-icon-only[data-size=hero]{height:var(--qds-control-hero-height);padding-inline:0;width:var(--qds-control-hero-height)}.qds-focus-ring[data-size=hero]{border-radius:max(1px,var(\n --qds-control-border-radius-top-left,var(--qds-control-hero-border-radius)\n )) max(1px,var(\n --qds-control-border-radius-top-right,var(--qds-control-hero-border-radius)\n )) max(1px,var(\n --qds-control-border-radius-bottom-right,var(--qds-control-hero-border-radius)\n )) max(1px,var(\n --qds-control-border-radius-bottom-left,var(--qds-control-hero-border-radius)\n ))}.qds-icon[data-size=hero]{font-size:var(--qds-control-hero-icon-size)}[data-importance=subdued]{color:var(--qds-theme-link-standard-default)}.qds-button[data-importance=subdued]{border-block-end:var(--qds-control-border-width) solid #0000;padding-inline:0}.qds-button[data-importance=subdued]:hover{border-block-end:var(--qds-control-border-width) solid var(--qds-theme-link-standard-hover);color:var(--qds-theme-link-standard-hover)}.qds-button[data-importance=subdued]:active{border-block-end:var(--qds-control-border-width) solid var(--qds-theme-link-standard-pressed);color:var(--qds-theme-link-standard-pressed)}.qds-button[data-importance=subdued]:not(.qds-icon-only){border-radius:0}.qds-button.qds-icon-only[data-importance=subdued]{border:none;color:var(--qds-theme-control-text-standard)}.qds-button.qds-icon-only[data-importance=subdued]:hover{background-color:var(--qds-theme-interactive-background-hover)}.qds-button.qds-icon-only[data-importance=subdued]:active{background-color:var(--qds-theme-interactive-background-pressed)}[data-importance=standard]{color:var(--qds-theme-control-text-standard)}.qds-button[data-importance=standard]{border-color:var(--qds-theme-control-border);border-style:solid;border-width:var(--qds-control-border-width) var(\n --qds-control-border-width-inline-end,var(--qds-control-border-width)\n ) var(--qds-control-border-width-block-end,var(--qds-control-border-width)) var(--qds-control-border-width)}.qds-button[data-importance=standard]:hover{background-color:var(--qds-theme-interactive-background-hover)}.qds-button[data-importance=standard]:active{background-color:var(--qds-theme-interactive-background-pressed)}.qds-button[data-importance=emphasized]{background-color:var(--qds-theme-signature-color-default);color:var(--qds-theme-signature-color-contrast)}.qds-button[data-importance=emphasized]:hover{background-color:var(--qds-theme-signature-color-hover)}.qds-button[data-importance=emphasized]:active{background-color:var(--qds-theme-signature-color-pressed)}.qds-button[data-importance=destructive]{background-color:var(--qds-theme-feedback-action-destructive-default);color:var(--qds-theme-feedback-action-destructive-contrast)}.qds-button[data-importance=destructive]:hover{background-color:var(--qds-theme-feedback-action-destructive-hover)}.qds-button[data-importance=destructive]:active{background-color:var(--qds-theme-feedback-action-destructive-pressed)}[data-importance=subdued-destructive]{color:var(--qds-theme-feedback-action-destructive-default)}.qds-button[data-importance=subdued-destructive]{border-block-end:var(--qds-control-border-width) solid #0000;padding-inline:0}.qds-button[data-importance=subdued-destructive]:hover{border-block-end:var(--qds-control-border-width) solid var(--qds-theme-feedback-action-destructive-hover);color:var(--qds-theme-feedback-action-destructive-hover)}.qds-button[data-importance=subdued-destructive]:active{border-block-end:var(--qds-control-border-width) solid var(--qds-theme-feedback-action-destructive-pressed);color:var(--qds-theme-feedback-action-destructive-pressed)}.qds-button[data-importance=subdued-destructive]:not(.qds-icon-only){border-radius:0}.qds-button.qds-icon-only[data-importance=subdued-destructive]{border:none}.qds-button.qds-icon-only[data-importance=subdued-destructive]:hover{background-color:var(--qds-theme-interactive-background-hover);color:var(--qds-theme-feedback-action-destructive-default)}.qds-button.qds-icon-only[data-importance=subdued-destructive]:active{background-color:var(--qds-theme-interactive-background-pressed);color:var(--qds-theme-feedback-action-destructive-default)}:is([data-action=dropdown],[data-action=dropdown-close]) .qds-action{margin-inline-start:auto;transition-duration:.3s;transition-property:transform}[data-importance=standard]:is([data-action=dropdown],[data-action=dropdown-close]){background-color:var(--qds-theme-control-input-background)}:is([data-action=dropdown],[data-action=dropdown-close]):not([data-importance=subdued]):not([data-importance=subdued-destructive]){padding-inline:var(--qds-control-input-padding-horizontal)}[data-action=dropdown-close] .qds-action{transform:rotate(-180deg)}";
15
15
 
16
16
  // SPDX-FileCopyrightText: © 2024 Schneider Electric
17
17
  //
@@ -434,6 +434,6 @@ function defineCustomElement() {
434
434
  }
435
435
 
436
436
  export { Button as B, defineCustomElement as d };
437
- //# sourceMappingURL=p-gI_dqe2y.js.map
437
+ //# sourceMappingURL=p-C9Zam3cp.js.map
438
438
 
439
- //# sourceMappingURL=p-gI_dqe2y.js.map
439
+ //# sourceMappingURL=p-C9Zam3cp.js.map