@spectrum-web-components/picker 1.12.0-testing.20260223092154 → 1.12.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spectrum-web-components/picker",
3
- "version": "1.12.0-testing.20260223092154",
3
+ "version": "1.12.0",
4
4
  "description": "",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Adobe",
@@ -80,20 +80,20 @@
80
80
  ],
81
81
  "types": "./src/index.d.ts",
82
82
  "dependencies": {
83
- "@spectrum-web-components/base": "1.12.0-testing.20260223092154",
84
- "@spectrum-web-components/button": "1.12.0-testing.20260223092154",
85
- "@spectrum-web-components/field-label": "1.12.0-testing.20260223092154",
86
- "@spectrum-web-components/icon": "1.12.0-testing.20260223092154",
87
- "@spectrum-web-components/icons-ui": "1.12.0-testing.20260223092154",
88
- "@spectrum-web-components/icons-workflow": "1.12.0-testing.20260223092154",
89
- "@spectrum-web-components/menu": "1.12.0-testing.20260223092154",
90
- "@spectrum-web-components/overlay": "1.12.0-testing.20260223092154",
91
- "@spectrum-web-components/popover": "1.12.0-testing.20260223092154",
92
- "@spectrum-web-components/progress-circle": "1.12.0-testing.20260223092154",
93
- "@spectrum-web-components/reactive-controllers": "1.12.0-testing.20260223092154",
94
- "@spectrum-web-components/shared": "1.12.0-testing.20260223092154",
95
- "@spectrum-web-components/tooltip": "1.12.0-testing.20260223092154",
96
- "@spectrum-web-components/tray": "1.12.0-testing.20260223092154"
83
+ "@spectrum-web-components/base": "1.12.0",
84
+ "@spectrum-web-components/button": "1.12.0",
85
+ "@spectrum-web-components/field-label": "1.12.0",
86
+ "@spectrum-web-components/icon": "1.12.0",
87
+ "@spectrum-web-components/icons-ui": "1.12.0",
88
+ "@spectrum-web-components/icons-workflow": "1.12.0",
89
+ "@spectrum-web-components/menu": "1.12.0",
90
+ "@spectrum-web-components/overlay": "1.12.0",
91
+ "@spectrum-web-components/popover": "1.12.0",
92
+ "@spectrum-web-components/progress-circle": "1.12.0",
93
+ "@spectrum-web-components/reactive-controllers": "1.12.0",
94
+ "@spectrum-web-components/shared": "1.12.0",
95
+ "@spectrum-web-components/tooltip": "1.12.0",
96
+ "@spectrum-web-components/tray": "1.12.0"
97
97
  },
98
98
  "keywords": [
99
99
  "design-system",
package/src/Picker.d.ts CHANGED
@@ -132,10 +132,7 @@ export declare class ExpandableElement extends SpectrumElement {
132
132
  */
133
133
  disconnectedCallback(): void;
134
134
  }
135
- declare const PickerBase_base: typeof ExpandableElement & {
136
- new (...args: any[]): import("@spectrum-web-components/base").SizedElementInterface;
137
- prototype: import("@spectrum-web-components/base").SizedElementInterface;
138
- } & import("@spectrum-web-components/core/mixins").SizedElementConstructor;
135
+ declare const PickerBase_base: typeof ExpandableElement & import("@spectrum-web-components/base").Constructor<import("@spectrum-web-components/base").SizedElementInterface> & import("@spectrum-web-components/base").SizedElementConstructor;
139
136
  /**
140
137
  * @slot label - The placeholder content for the Picker
141
138
  * @slot description - The description content for the Picker
@@ -422,10 +419,7 @@ export declare class PickerBase extends PickerBase_base {
422
419
  connectedCallback(): void;
423
420
  disconnectedCallback(): void;
424
421
  }
425
- declare const Picker_base: typeof ExpandableElement & {
426
- new (...args: any[]): import("@spectrum-web-components/base").SizedElementInterface;
427
- prototype: import("@spectrum-web-components/base").SizedElementInterface;
428
- } & import("@spectrum-web-components/core/mixins").SizedElementConstructor;
422
+ declare const Picker_base: typeof ExpandableElement & import("@spectrum-web-components/base").Constructor<import("@spectrum-web-components/base").SizedElementInterface> & import("@spectrum-web-components/base").SizedElementConstructor;
429
423
  /**
430
424
  * An `<sp-picker>` is a dropdown selection component that allows users to choose
431
425
  * a single option from a list of menu items. It supports keyboard navigation,
package/src/Picker.dev.js CHANGED
@@ -540,13 +540,15 @@ export class PickerBase extends SizedMixin(ExpandableElement, {
540
540
  * @param event - The slotchange event
541
541
  */
542
542
  handleTooltipSlotchange(event) {
543
- var _a;
544
- this.tooltipEl = event.target.assignedElements()[0];
545
- if ((_a = this.tooltipEl) == null ? void 0 : _a.selfManaged) {
543
+ const tooltipEl = event.target.assignedElements()[0];
544
+ this.tooltipEl = tooltipEl;
545
+ if (tooltipEl == null ? void 0 : tooltipEl.selfManaged) {
546
+ if (this.button) {
547
+ tooltipEl.triggerElement = this.button;
548
+ }
546
549
  this.updateComplete.then(() => {
547
- var _a2;
548
- if (((_a2 = this.tooltipEl) == null ? void 0 : _a2.overlayElement) && this.button) {
549
- this.tooltipEl.overlayElement.triggerElement = this.button;
550
+ if (tooltipEl.selfManaged && this.button) {
551
+ tooltipEl.triggerElement = this.button;
550
552
  }
551
553
  });
552
554
  }
@@ -1012,12 +1014,8 @@ export class PickerBase extends SizedMixin(ExpandableElement, {
1012
1014
  super.connectedCallback();
1013
1015
  this.updateComplete.then(() => {
1014
1016
  var _a;
1015
- if (!((_a = this.tooltipEl) == null ? void 0 : _a.selfManaged)) {
1016
- return;
1017
- }
1018
- const overlayElement = this.tooltipEl.overlayElement;
1019
- if (overlayElement) {
1020
- overlayElement.triggerElement = this.button;
1017
+ if (((_a = this.tooltipEl) == null ? void 0 : _a.selfManaged) && this.button) {
1018
+ this.tooltipEl.triggerElement = this.button;
1021
1019
  }
1022
1020
  });
1023
1021
  this.recentlyConnected = this.hasUpdated;
@@ -1417,13 +1415,15 @@ export class Picker extends SizedMixin(ExpandableElement, {
1417
1415
  * @param event - The slotchange event
1418
1416
  */
1419
1417
  handleTooltipSlotchange(event) {
1420
- var _a;
1421
- this.tooltipEl = event.target.assignedElements()[0];
1422
- if ((_a = this.tooltipEl) == null ? void 0 : _a.selfManaged) {
1418
+ const tooltipEl = event.target.assignedElements()[0];
1419
+ this.tooltipEl = tooltipEl;
1420
+ if (tooltipEl == null ? void 0 : tooltipEl.selfManaged) {
1421
+ if (this.button) {
1422
+ tooltipEl.triggerElement = this.button;
1423
+ }
1423
1424
  this.updateComplete.then(() => {
1424
- var _a2;
1425
- if (((_a2 = this.tooltipEl) == null ? void 0 : _a2.overlayElement) && this.button) {
1426
- this.tooltipEl.overlayElement.triggerElement = this.button;
1425
+ if (tooltipEl.selfManaged && this.button) {
1426
+ tooltipEl.triggerElement = this.button;
1427
1427
  }
1428
1428
  });
1429
1429
  }
@@ -1755,12 +1755,7 @@ export class Picker extends SizedMixin(ExpandableElement, {
1755
1755
  * Allows parent components to react to menu scroll events.
1756
1756
  */
1757
1757
  onScroll() {
1758
- this.dispatchEvent(
1759
- new Event("scroll", {
1760
- cancelable: true,
1761
- composed: true
1762
- })
1763
- );
1758
+ this.dispatchEvent(new Event("scroll"));
1764
1759
  }
1765
1760
  /**
1766
1761
  * Renders the menu and overlay structure.
@@ -1881,12 +1876,8 @@ export class Picker extends SizedMixin(ExpandableElement, {
1881
1876
  super.connectedCallback();
1882
1877
  this.updateComplete.then(() => {
1883
1878
  var _a;
1884
- if (!((_a = this.tooltipEl) == null ? void 0 : _a.selfManaged)) {
1885
- return;
1886
- }
1887
- const overlayElement = this.tooltipEl.overlayElement;
1888
- if (overlayElement) {
1889
- overlayElement.triggerElement = this.button;
1879
+ if (((_a = this.tooltipEl) == null ? void 0 : _a.selfManaged) && this.button) {
1880
+ this.tooltipEl.triggerElement = this.button;
1890
1881
  }
1891
1882
  });
1892
1883
  this.recentlyConnected = this.hasUpdated;