@adobe/spectrum-wc-core 2.0.0-beta.2 → 2.0.0-beta.3

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 (136) hide show
  1. package/CHANGELOG.md +75 -9
  2. package/dist/components/accordion/Accordion.base.js +28 -22
  3. package/dist/components/accordion/Accordion.base.js.map +1 -1
  4. package/dist/components/accordion/AccordionItem.base.d.ts +16 -6
  5. package/dist/components/accordion/AccordionItem.base.js +6 -3
  6. package/dist/components/accordion/AccordionItem.base.js.map +1 -1
  7. package/dist/components/action-group/ActionGroup.base.d.ts +108 -0
  8. package/dist/components/action-group/ActionGroup.base.js +53 -0
  9. package/dist/components/action-group/ActionGroup.base.js.map +1 -0
  10. package/dist/components/action-group/ActionGroup.types.d.ts +17 -0
  11. package/dist/components/action-group/ActionGroup.types.js +12 -0
  12. package/dist/components/action-group/ActionGroup.types.js.map +1 -0
  13. package/dist/components/action-group/index.d.ts +13 -0
  14. package/dist/components/action-group/index.js +3 -0
  15. package/dist/components/alert-banner/AlertBanner.base.js +11 -10
  16. package/dist/components/alert-banner/AlertBanner.base.js.map +1 -1
  17. package/dist/components/asset/Asset.base.d.ts +1 -1
  18. package/dist/components/asset/Asset.base.js +14 -8
  19. package/dist/components/asset/Asset.base.js.map +1 -1
  20. package/dist/components/avatar/Avatar.base.js +18 -22
  21. package/dist/components/avatar/Avatar.base.js.map +1 -1
  22. package/dist/components/badge/Badge.base.d.ts +24 -8
  23. package/dist/components/badge/Badge.base.js +22 -17
  24. package/dist/components/badge/Badge.base.js.map +1 -1
  25. package/dist/components/button/Button.base.d.ts +20 -10
  26. package/dist/components/button/Button.base.js +17 -12
  27. package/dist/components/button/Button.base.js.map +1 -1
  28. package/dist/components/button-group/ButtonGroup.base.js +19 -12
  29. package/dist/components/button-group/ButtonGroup.base.js.map +1 -1
  30. package/dist/components/card/Card.base.d.ts +95 -46
  31. package/dist/components/card/Card.base.js +71 -23
  32. package/dist/components/card/Card.base.js.map +1 -1
  33. package/dist/components/card/Card.types.d.ts +1 -0
  34. package/dist/components/card/Card.types.js +2 -2
  35. package/dist/components/card/Card.types.js.map +1 -1
  36. package/dist/components/card/index.js +3 -3
  37. package/dist/components/divider/Divider.base.js +13 -8
  38. package/dist/components/divider/Divider.base.js.map +1 -1
  39. package/dist/components/dropzone/Dropzone.base.d.ts +74 -0
  40. package/dist/components/dropzone/Dropzone.base.js +82 -0
  41. package/dist/components/dropzone/Dropzone.base.js.map +1 -0
  42. package/dist/components/dropzone/Dropzone.types.d.ts +43 -0
  43. package/dist/components/dropzone/Dropzone.types.js +15 -0
  44. package/dist/components/dropzone/Dropzone.types.js.map +1 -0
  45. package/dist/components/dropzone/index.d.ts +13 -0
  46. package/dist/components/dropzone/index.js +3 -0
  47. package/dist/components/icon/Icon.base.d.ts +11 -7
  48. package/dist/components/icon/Icon.base.js +13 -20
  49. package/dist/components/icon/Icon.base.js.map +1 -1
  50. package/dist/components/illustrated-message/IllustratedMessage.base.d.ts +22 -8
  51. package/dist/components/illustrated-message/IllustratedMessage.base.js +33 -20
  52. package/dist/components/illustrated-message/IllustratedMessage.base.js.map +1 -1
  53. package/dist/components/infield-button/InfieldButton.base.d.ts +28 -0
  54. package/dist/components/infield-button/InfieldButton.base.js +22 -0
  55. package/dist/components/infield-button/InfieldButton.base.js.map +1 -0
  56. package/dist/components/infield-button/InfieldButton.types.d.ts +13 -0
  57. package/dist/components/infield-button/InfieldButton.types.js +11 -0
  58. package/dist/components/infield-button/InfieldButton.types.js.map +1 -0
  59. package/dist/components/infield-button/index.d.ts +13 -0
  60. package/dist/components/infield-button/index.js +3 -0
  61. package/dist/components/meter/Meter.base.js +11 -9
  62. package/dist/components/meter/Meter.base.js.map +1 -1
  63. package/dist/components/popover/Popover.base.js +46 -42
  64. package/dist/components/popover/Popover.base.js.map +1 -1
  65. package/dist/components/progress-circle/ProgressCircle.base.d.ts +0 -1
  66. package/dist/components/progress-circle/ProgressCircle.base.js +26 -22
  67. package/dist/components/progress-circle/ProgressCircle.base.js.map +1 -1
  68. package/dist/components/status-light/StatusLight.base.d.ts +1 -1
  69. package/dist/components/status-light/StatusLight.base.js +12 -9
  70. package/dist/components/status-light/StatusLight.base.js.map +1 -1
  71. package/dist/components/tabs/Tabs.base.js +44 -32
  72. package/dist/components/tabs/Tabs.base.js.map +1 -1
  73. package/dist/components/tooltip/Tooltip.base.js +57 -22
  74. package/dist/components/tooltip/Tooltip.base.js.map +1 -1
  75. package/dist/controllers/color-controller/src/color-controller.js +45 -44
  76. package/dist/controllers/color-controller/src/color-controller.js.map +1 -1
  77. package/dist/controllers/drag-and-drop-controller/index.d.ts +12 -0
  78. package/dist/controllers/drag-and-drop-controller/index.js +2 -0
  79. package/dist/controllers/drag-and-drop-controller/src/drag-and-drop-controller.d.ts +68 -0
  80. package/dist/controllers/drag-and-drop-controller/src/drag-and-drop-controller.js +56 -0
  81. package/dist/controllers/drag-and-drop-controller/src/drag-and-drop-controller.js.map +1 -0
  82. package/dist/controllers/index.d.ts +4 -1
  83. package/dist/controllers/index.js +14 -11
  84. package/dist/controllers/page-scroll-lock-controller/index.d.ts +12 -0
  85. package/dist/controllers/page-scroll-lock-controller/index.js +2 -0
  86. package/dist/controllers/{page-scroll-lock.js → page-scroll-lock-controller/src/page-scroll-lock.js} +1 -1
  87. package/dist/controllers/page-scroll-lock-controller/src/page-scroll-lock.js.map +1 -0
  88. package/dist/controllers/slot-presence-controller/index.d.ts +12 -0
  89. package/dist/controllers/slot-presence-controller/index.js +2 -0
  90. package/dist/controllers/slot-presence-controller/src/slot-presence-controller.d.ts +57 -0
  91. package/dist/controllers/slot-presence-controller/src/slot-presence-controller.js +44 -0
  92. package/dist/controllers/slot-presence-controller/src/slot-presence-controller.js.map +1 -0
  93. package/dist/controllers/slot-text-controller/index.d.ts +12 -0
  94. package/dist/controllers/slot-text-controller/index.js +2 -0
  95. package/dist/controllers/slot-text-controller/src/slot-text-controller.d.ts +92 -0
  96. package/dist/controllers/slot-text-controller/src/slot-text-controller.js +53 -0
  97. package/dist/controllers/slot-text-controller/src/slot-text-controller.js.map +1 -0
  98. package/dist/element/index.d.ts +1 -1
  99. package/dist/element/index.js +2 -2
  100. package/dist/element/spectrum-element.d.ts +58 -15
  101. package/dist/element/spectrum-element.js +55 -36
  102. package/dist/element/spectrum-element.js.map +1 -1
  103. package/dist/element/version.d.ts +2 -2
  104. package/dist/element/version.js +1 -1
  105. package/dist/element/version.js.map +1 -1
  106. package/dist/mixins/index.d.ts +0 -2
  107. package/dist/mixins/index.js +4 -6
  108. package/dist/mixins/linear-progress-mixin.d.ts +1 -2
  109. package/dist/mixins/linear-progress-mixin.js +35 -34
  110. package/dist/mixins/linear-progress-mixin.js.map +1 -1
  111. package/dist/mixins/pending-mixin.js +12 -11
  112. package/dist/mixins/pending-mixin.js.map +1 -1
  113. package/dist/mixins/sized-mixin.d.ts +28 -0
  114. package/dist/mixins/sized-mixin.js +6 -6
  115. package/dist/mixins/sized-mixin.js.map +1 -1
  116. package/dist/utils/dev-validation.d.ts +88 -0
  117. package/dist/utils/dev-validation.js +33 -0
  118. package/dist/utils/dev-validation.js.map +1 -0
  119. package/dist/utils/index.d.ts +2 -0
  120. package/dist/utils/index.js +12 -10
  121. package/dist/utils/is-focus-visible-in-tree.d.ts +33 -0
  122. package/dist/utils/is-focus-visible-in-tree.js +11 -0
  123. package/dist/utils/is-focus-visible-in-tree.js.map +1 -0
  124. package/package.json +68 -15
  125. package/dist/_virtual/_@oxc-project_runtime@0.124.0/helpers/defineProperty.js +0 -12
  126. package/dist/_virtual/_@oxc-project_runtime@0.124.0/helpers/toPrimitive.js +0 -14
  127. package/dist/_virtual/_@oxc-project_runtime@0.124.0/helpers/toPropertyKey.js +0 -9
  128. package/dist/_virtual/_@oxc-project_runtime@0.124.0/helpers/typeof.js +0 -11
  129. package/dist/controllers/page-scroll-lock.js.map +0 -1
  130. package/dist/mixins/observe-slot-presence.d.ts +0 -12
  131. package/dist/mixins/observe-slot-presence.js +0 -40
  132. package/dist/mixins/observe-slot-presence.js.map +0 -1
  133. package/dist/mixins/observe-slot-text.d.ts +0 -11
  134. package/dist/mixins/observe-slot-text.js +0 -60
  135. package/dist/mixins/observe-slot-text.js.map +0 -1
  136. /package/dist/controllers/{page-scroll-lock.d.ts → page-scroll-lock-controller/src/page-scroll-lock.d.ts} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"IllustratedMessage.base.js","names":[],"sources":["../../../components/illustrated-message/IllustratedMessage.base.ts"],"sourcesContent":["/**\n * Copyright 2026 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { PropertyValues } from 'lit';\nimport { property } from 'lit/decorators.js';\n\nimport { SpectrumElement } from '@adobe/spectrum-wc-core/element/index.js';\n\nimport { SlotAttributePropagationController } from '../../controllers/slot-attribute-propagation-controller/index.js';\nimport {\n ILLUSTRATED_MESSAGE_VALID_ORIENTATIONS,\n ILLUSTRATED_MESSAGE_VALID_SIZES,\n type IllustratedMessageOrientation,\n type IllustratedMessageSize,\n} from './IllustratedMessage.types.js';\n\n/**\n * An illustrated message displays an illustration and a message, typically\n * used in empty states or error pages.\n *\n * @slot - Decorative or informative SVG illustration\n * @slot heading - The heading element, h2–h6\n * @todo SWC-1943 Add slot constraints once the CEM slot constraints work is complete:\n * `{required} {allowedChildren: h2, h3, h4, h5, h6} {maxChildren: 1}`\n * @slot description - Supporting description text\n * @slot actions - Optional action controls displayed below the description, typically a button or button group. Receives `size` automatically from the illustrated message.\n */\nexport abstract class IllustratedMessageBase extends SpectrumElement {\n // ─────────────────────────\n // API TO OVERRIDE\n // ─────────────────────────\n\n /**\n * @internal\n */\n static readonly VALID_SIZES: readonly IllustratedMessageSize[] =\n ILLUSTRATED_MESSAGE_VALID_SIZES;\n\n /**\n * @internal\n */\n static readonly VALID_ORIENTATIONS: readonly IllustratedMessageOrientation[] =\n ILLUSTRATED_MESSAGE_VALID_ORIENTATIONS;\n\n // ──────────────────\n // SHARED API\n // ──────────────────\n\n /**\n * The size of the message\n *\n * @default m\n */\n @property({ type: String, reflect: true })\n public size: IllustratedMessageSize = 'm';\n\n /**\n * The layout orientation\n */\n @property({ type: String, reflect: true })\n public orientation: IllustratedMessageOrientation = 'vertical';\n\n // ──────────────────────\n // IMPLEMENTATION\n // ──────────────────────\n\n private readonly _sizePropagation = new SlotAttributePropagationController(\n this,\n {\n attribute: 'size',\n getValue: () => this.size,\n slotName: 'actions',\n }\n );\n\n protected override updated(changedProperties: PropertyValues): void {\n super.updated(changedProperties);\n\n if (window.__swc?.DEBUG) {\n if (\n changedProperties.has('size') &&\n !ILLUSTRATED_MESSAGE_VALID_SIZES.includes(this.size)\n ) {\n window.__swc.warn(\n this,\n `<${this.localName}> received an invalid \"size\" value of \"${this.size}\". Valid values are ${ILLUSTRATED_MESSAGE_VALID_SIZES.join(', ')}.`,\n 'https://opensource.adobe.com/spectrum-web-components/components/illustrated-message/',\n { issues: [`size=\"${this.size}\"`] }\n );\n }\n\n if (\n changedProperties.has('orientation') &&\n !ILLUSTRATED_MESSAGE_VALID_ORIENTATIONS.includes(this.orientation)\n ) {\n window.__swc.warn(\n this,\n `<${this.localName}> received an invalid \"orientation\" value of \"${this.orientation}\". Valid values are ${ILLUSTRATED_MESSAGE_VALID_ORIENTATIONS.join(', ')}.`,\n 'https://opensource.adobe.com/spectrum-web-components/components/illustrated-message/',\n { issues: [`orientation=\"${this.orientation}\"`] }\n );\n }\n }\n }\n\n protected handleActionsSlotChange(): void {\n this._sizePropagation.propagate();\n }\n\n /**\n * @internal\n *\n * Validates that the heading slot only contains `<h2>`–`<h6>` elements.\n * Rendering subclasses must wire this to the heading slot's `slotchange`\n * event (e.g. `<slot name=\"heading\" @slotchange=${this.handleHeadingSlotChange}>`)\n * for the validation warning to fire.\n */\n protected handleHeadingSlotChange(event: Event): void {\n if (window.__swc?.DEBUG) {\n const headingSlot = event.target as HTMLSlotElement;\n for (const el of headingSlot.assignedElements()) {\n if (!['H2', 'H3', 'H4', 'H5', 'H6'].includes(el.tagName)) {\n window.__swc.warn(\n this,\n `<${this.localName}> heading slot received a <${el.tagName.toLowerCase()}> element. Only <h2>–<h6> elements are allowed in the heading slot.`,\n 'https://opensource.adobe.com/spectrum-web-components/components/illustrated-message/',\n { issues: [`heading slot: <${el.tagName.toLowerCase()}>`] }\n );\n }\n }\n }\n }\n}\n"],"mappings":";;;;;;OAoCsB,IAAtB,cAAqD,EAAgB;;2BA2B7B,wBAMc,oCAMhB,IAAI,EACtC,MACA;GACE,WAAW;GACX,gBAAgB,KAAK;GACrB,UAAU;GACX,CACF;;CAED,QAA2B,GAAyC;;AAGlE,EAFA,MAAM,QAAQ,EAAkB,GAEhC,IAAI,OAAO,UAAA,QAAA,EAAO,UAEd,EAAkB,IAAI,OAAO,IAC7B,CAAC,EAAgC,SAAS,KAAK,KAAK,IAEpD,OAAO,MAAM,KACX,MACA,IAAI,KAAK,UAAU,yCAAyC,KAAK,KAAK,sBAAsB,EAAgC,KAAK,KAAK,CAAC,IACvI,wFACA,EAAE,QAAQ,CAAC,SAAS,KAAK,KAAK,GAAG,EAAE,CACpC,EAID,EAAkB,IAAI,cAAc,IACpC,CAAC,EAAuC,SAAS,KAAK,YAAY,IAElE,OAAO,MAAM,KACX,MACA,IAAI,KAAK,UAAU,gDAAgD,KAAK,YAAY,sBAAsB,EAAuC,KAAK,KAAK,CAAC,IAC5J,wFACA,EAAE,QAAQ,CAAC,gBAAgB,KAAK,YAAY,GAAG,EAAE,CAClD;;CAKP,0BAA0C;AACxC,OAAK,iBAAiB,WAAW;;CAWnC,wBAAkC,GAAoB;;AACpD,OAAA,IAAI,OAAO,UAAA,QAAA,EAAO,OAAO;GACvB,IAAM,IAAc,EAAM;AAC1B,QAAK,IAAM,KAAM,EAAY,kBAAkB,CAC7C,CAAK;IAAC;IAAM;IAAM;IAAM;IAAM;IAAK,CAAC,SAAS,EAAG,QAAQ,IACtD,OAAO,MAAM,KACX,MACA,IAAI,KAAK,UAAU,6BAA6B,EAAG,QAAQ,aAAa,CAAC,sEACzE,wFACA,EAAE,QAAQ,CAAC,kBAAkB,EAAG,QAAQ,aAAa,CAAC,GAAG,EAAE,CAC5D;;;;uBA3FP,0BAMA,MAWD,EAAS;CAAE,MAAM;CAAQ,SAAS;CAAM,CAAC,CAAA,EAAA,EAAA,WAAA,QAAA,KAAA,EAAA,KAMzC,EAAS;CAAE,MAAM;CAAQ,SAAS;CAAM,CAAC,CAAA,EAAA,EAAA,WAAA,eAAA,KAAA,EAAA"}
1
+ {"version":3,"file":"IllustratedMessage.base.js","names":[],"sources":["../../../components/illustrated-message/IllustratedMessage.base.ts"],"sourcesContent":["/**\n * Copyright 2026 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { PropertyValues } from 'lit';\nimport { property } from 'lit/decorators.js';\n\nimport { SlotTextController } from '@adobe/spectrum-wc-core/controllers/slot-text-controller/index.js';\nimport { SpectrumElement } from '@adobe/spectrum-wc-core/element/index.js';\nimport {\n validateAllowedChildren,\n validateEnum,\n warnIf,\n} from '@adobe/spectrum-wc-core/utils/index.js';\n\nimport { SlotAttributePropagationController } from '../../controllers/slot-attribute-propagation-controller/index.js';\nimport {\n ILLUSTRATED_MESSAGE_VALID_ORIENTATIONS,\n ILLUSTRATED_MESSAGE_VALID_SIZES,\n type IllustratedMessageOrientation,\n type IllustratedMessageSize,\n} from './IllustratedMessage.types.js';\n\n/**\n * An illustrated message displays an illustration and a message, typically\n * used in empty states or error pages.\n *\n * @slot - Decorative or informative SVG illustration\n * @slot heading - Optional heading; when present, must be a single h2–h6 element.\n * Both constraints (allowed h2–h6 children and a single heading) are validated\n * in dev mode.\n * @slot description - Supporting description text\n * @slot actions - Optional action controls displayed below the description, typically a button or button group. Receives `size` automatically from the illustrated message.\n */\nexport abstract class IllustratedMessageBase extends SpectrumElement {\n // ─────────────────────────\n // API TO OVERRIDE\n // ─────────────────────────\n\n /**\n * @internal\n */\n static readonly VALID_SIZES: readonly IllustratedMessageSize[] =\n ILLUSTRATED_MESSAGE_VALID_SIZES;\n\n /**\n * @internal\n */\n static readonly VALID_ORIENTATIONS: readonly IllustratedMessageOrientation[] =\n ILLUSTRATED_MESSAGE_VALID_ORIENTATIONS;\n\n // ──────────────────\n // SHARED API\n // ──────────────────\n\n /**\n * The size of the message\n *\n * @default m\n */\n @property({ type: String, reflect: true })\n public size: IllustratedMessageSize = 'm';\n\n /**\n * The layout orientation\n */\n @property({ type: String, reflect: true })\n public orientation: IllustratedMessageOrientation = 'vertical';\n\n // ──────────────────────\n // CONTROLLERS\n // ──────────────────────\n\n /**\n * Observes whether the default (illustration) slot has assigned content.\n *\n * @internal\n */\n protected slotText = new SlotTextController(this);\n\n // ──────────────────────\n // IMPLEMENTATION\n // ──────────────────────\n\n private readonly _sizePropagation = new SlotAttributePropagationController(\n this,\n {\n attribute: 'size',\n getValue: () => this.size,\n slotName: 'actions',\n }\n );\n\n /**\n * Whether the default (illustration) slot has assigned content, so\n * rendering subclasses can collapse the illustration wrapper when no\n * illustration is provided instead of reserving its fixed size.\n */\n protected get hasIllustration(): boolean {\n return this.slotText.hasContent;\n }\n\n protected override update(changedProperties: PropertyValues): void {\n if (changedProperties.has('size')) {\n validateEnum(this, {\n prop: 'size',\n value: this.size,\n valid: ILLUSTRATED_MESSAGE_VALID_SIZES,\n url: 'https://spectrum-web-components.adobe.com/?path=/docs/components-illustrated-message--docs',\n });\n }\n\n if (changedProperties.has('orientation')) {\n validateEnum(this, {\n prop: 'orientation',\n value: this.orientation,\n valid: ILLUSTRATED_MESSAGE_VALID_ORIENTATIONS,\n url: 'https://spectrum-web-components.adobe.com/?path=/docs/components-illustrated-message--docs',\n });\n }\n\n super.update(changedProperties);\n }\n\n protected handleActionsSlotChange(): void {\n this._sizePropagation.propagate();\n }\n\n /**\n * @internal\n *\n * Validates the heading slot: children must be `<h2>`–`<h6>`, and at most a\n * single heading is allowed. Rendering subclasses must wire this to the\n * heading slot's `slotchange` event (e.g.\n * `<slot name=\"heading\" @slotchange=${this.handleHeadingSlotChange}>`) for the\n * validation warnings to fire.\n */\n protected handleHeadingSlotChange(event: Event): void {\n const slot = event.target as HTMLSlotElement;\n const url =\n 'https://spectrum-web-components.adobe.com/?path=/docs/components-illustrated-message--docs';\n validateAllowedChildren(\n this,\n slot,\n ['h2', 'h3', 'h4', 'h5', 'h6'],\n 'heading',\n url\n );\n const headingCount = slot.assignedElements().length;\n warnIf(\n this,\n headingCount > 1,\n `<${this.localName}> \"heading\" slot accepts a single heading element but received ${headingCount}.`,\n url,\n { issues: [`heading slot: ${headingCount} elements`] }\n );\n }\n}\n"],"mappings":";;;;;;;;OA0CsB,IAAtB,cAAqD,EAAgB;;2BA2B7B,wBAMc,4BAW/B,IAAI,EAAmB,KAAK,0BAMb,IAAI,EACtC,MACA;GACE,WAAW;GACX,gBAAgB,KAAK;GACrB,UAAU;GACX,CACF;;CAOD,IAAc,kBAA2B;AACvC,SAAO,KAAK,SAAS;;CAGvB,OAA0B,GAAyC;AAmBjE,EAlBI,EAAkB,IAAI,OAAO,IAC/B,EAAa,MAAM;GACjB,MAAM;GACN,OAAO,KAAK;GACZ,OAAO;GACP,KAAK;GACN,CAAC,EAGA,EAAkB,IAAI,cAAc,IACtC,EAAa,MAAM;GACjB,MAAM;GACN,OAAO,KAAK;GACZ,OAAO;GACP,KAAK;GACN,CAAC,EAGJ,MAAM,OAAO,EAAkB;;CAGjC,0BAA0C;AACxC,OAAK,iBAAiB,WAAW;;CAYnC,wBAAkC,GAAoB;EACpD,IAAM,IAAO,EAAM,QACb,IACJ;AACF,IACE,MACA,GACA;GAAC;GAAM;GAAM;GAAM;GAAM;GAAK,EAC9B,WACA,EACD;EACD,IAAM,IAAe,EAAK,kBAAkB,CAAC;AAC7C,IACE,MACA,IAAe,GACf,IAAI,KAAK,UAAU,iEAAiE,EAAa,IACjG,GACA,EAAE,QAAQ,CAAC,iBAAiB,EAAa,WAAW,EAAE,CACvD;;;uBAhHD,0BAMA,MAWD,EAAS;CAAE,MAAM;CAAQ,SAAS;CAAM,CAAC,CAAA,EAAA,EAAA,WAAA,QAAA,KAAA,EAAA,KAMzC,EAAS;CAAE,MAAM;CAAQ,SAAS;CAAM,CAAC,CAAA,EAAA,EAAA,WAAA,eAAA,KAAA,EAAA"}
@@ -0,0 +1,28 @@
1
+ import { ButtonBase } from '../button';
2
+ import { InfieldButtonSize } from './InfieldButton.types.js';
3
+ /**
4
+ * Abstract base class for infield button components. Extends ButtonBase with a
5
+ * restricted size set, quiet treatment, and non-focusable shadow root.
6
+ *
7
+ * Infield buttons are always embedded inside a form field (e.g. number field). They are
8
+ * clickable via pointer only; they are not in the tab order and not independently focusable.
9
+ * All keyboard behavior is owned by the parent field, which also provides the visible
10
+ * focus ring. The parent field is expected to set the `size` attribute.
11
+ *
12
+ * @slot icon - Icon to display inside the button.
13
+ *
14
+ * @attribute {ElementSize} size - Size delegated from the parent field. Defaults to
15
+ * medium when no parent sets it, though standalone usage is not supported.
16
+ */
17
+ export declare abstract class InfieldButtonBase extends ButtonBase {
18
+ /** @internal */
19
+ static readonly VALID_SIZES: readonly InfieldButtonSize[];
20
+ /** @internal */
21
+ static readonly NO_DEFAULT_SIZE = true;
22
+ static shadowRootOptions: ShadowRootInit;
23
+ /**
24
+ * Applies the quiet (no-background) visual treatment. Used when the infield button
25
+ * is part of a quiet field variant.
26
+ */
27
+ quiet: boolean;
28
+ }
@@ -0,0 +1,22 @@
1
+ import { __decorate as e } from "../../_virtual/_@oxc-project_runtime@0.124.0/helpers/decorate.js";
2
+ import { INFIELD_BUTTON_VALID_SIZES as t } from "./InfieldButton.types.js";
3
+ import { property as n } from "lit/decorators.js";
4
+ import { SpectrumElement as r } from "@adobe/spectrum-wc-core/element/index.js";
5
+ import { ButtonBase as i } from "@adobe/spectrum-wc-core/components/button";
6
+ //#region components/infield-button/InfieldButton.base.ts
7
+ var a, o = class extends i {
8
+ constructor(...e) {
9
+ super(...e), this.quiet = !1;
10
+ }
11
+ };
12
+ a = o, a.VALID_SIZES = t, a.NO_DEFAULT_SIZE = !0, a.shadowRootOptions = {
13
+ ...r.shadowRootOptions,
14
+ delegatesFocus: !1
15
+ }, e([n({
16
+ type: Boolean,
17
+ reflect: !0
18
+ })], o.prototype, "quiet", void 0);
19
+ //#endregion
20
+ export { o as InfieldButtonBase };
21
+
22
+ //# sourceMappingURL=InfieldButton.base.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InfieldButton.base.js","names":[],"sources":["../../../components/infield-button/InfieldButton.base.ts"],"sourcesContent":["/**\n * Copyright 2026 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { property } from 'lit/decorators.js';\n\nimport { ButtonBase } from '@adobe/spectrum-wc-core/components/button';\nimport { SpectrumElement } from '@adobe/spectrum-wc-core/element/index.js';\n\nimport {\n INFIELD_BUTTON_VALID_SIZES,\n type InfieldButtonSize,\n} from './InfieldButton.types.js';\n\n/**\n * Abstract base class for infield button components. Extends ButtonBase with a\n * restricted size set, quiet treatment, and non-focusable shadow root.\n *\n * Infield buttons are always embedded inside a form field (e.g. number field). They are\n * clickable via pointer only; they are not in the tab order and not independently focusable.\n * All keyboard behavior is owned by the parent field, which also provides the visible\n * focus ring. The parent field is expected to set the `size` attribute.\n *\n * @slot icon - Icon to display inside the button.\n *\n * @attribute {ElementSize} size - Size delegated from the parent field. Defaults to\n * medium when no parent sets it, though standalone usage is not supported.\n */\nexport abstract class InfieldButtonBase extends ButtonBase {\n // ────────────────────\n // API OVERRIDES\n // ────────────────────\n\n /** @internal */\n static override readonly VALID_SIZES: readonly InfieldButtonSize[] =\n INFIELD_BUTTON_VALID_SIZES;\n\n // The parent field owns sizing; infield buttons must not auto-reflect size=\"m\"\n // when no explicit size is provided. Overriding NO_DEFAULT_SIZE lets the\n // SizedMixin setter and update() read this flag via this.constructor, so the\n // decision cascades through the full prototype chain without closure leakage.\n /** @internal */\n static override readonly NO_DEFAULT_SIZE = true;\n\n // Infield buttons are clickable but never independently focusable. The parent field\n // owns keyboard behavior and supplies the only focus ring.\n static override shadowRootOptions: ShadowRootInit = {\n ...SpectrumElement.shadowRootOptions,\n delegatesFocus: false,\n };\n\n // ───────────────────\n // API ADDITIONS\n // ───────────────────\n\n /**\n * Applies the quiet (no-background) visual treatment. Used when the infield button\n * is part of a quiet field variant.\n */\n @property({ type: Boolean, reflect: true })\n public quiet: boolean = false;\n}\n"],"mappings":";;;;;;OAoCsB,IAAtB,cAAgD,EAAW;;4BAgCjC;;;uBAzBtB,uBAOyC,0BAIS;CAClD,GAAG,EAAgB;CACnB,gBAAgB;CACjB,KAUA,EAAS;CAAE,MAAM;CAAS,SAAS;CAAM,CAAC,CAAA,EAAA,EAAA,WAAA,SAAA,KAAA,EAAA"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Copyright 2026 Adobe. All rights reserved.
3
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ * you may not use this file except in compliance with the License. You may obtain a copy
5
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+ *
7
+ * Unless required by applicable law or agreed to in writing, software distributed under
8
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ * OF ANY KIND, either express or implied. See the License for the specific language
10
+ * governing permissions and limitations under the License.
11
+ */
12
+ export declare const INFIELD_BUTTON_VALID_SIZES: readonly ["s", "m", "l", "xl"];
13
+ export type InfieldButtonSize = (typeof INFIELD_BUTTON_VALID_SIZES)[number];
@@ -0,0 +1,11 @@
1
+ //#region components/infield-button/InfieldButton.types.ts
2
+ var e = [
3
+ "s",
4
+ "m",
5
+ "l",
6
+ "xl"
7
+ ];
8
+ //#endregion
9
+ export { e as INFIELD_BUTTON_VALID_SIZES };
10
+
11
+ //# sourceMappingURL=InfieldButton.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InfieldButton.types.js","names":[],"sources":["../../../components/infield-button/InfieldButton.types.ts"],"sourcesContent":["/**\n * Copyright 2026 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport type { ElementSize } from '@adobe/spectrum-wc-core/mixins/index.js';\n\n// ──────────────────\n// SHARED\n// ──────────────────\n\nexport const INFIELD_BUTTON_VALID_SIZES = [\n 's',\n 'm',\n 'l',\n 'xl',\n] as const satisfies readonly ElementSize[];\n\n// ──────────────────\n// TYPES\n// ──────────────────\n\nexport type InfieldButtonSize = (typeof INFIELD_BUTTON_VALID_SIZES)[number];\n"],"mappings":";AAkBA,IAAa,IAA6B;CACxC;CACA;CACA;CACA;CACD"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Copyright 2026 Adobe. All rights reserved.
3
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ * you may not use this file except in compliance with the License. You may obtain a copy
5
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+ *
7
+ * Unless required by applicable law or agreed to in writing, software distributed under
8
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ * OF ANY KIND, either express or implied. See the License for the specific language
10
+ * governing permissions and limitations under the License.
11
+ */
12
+ export * from './InfieldButton.base.js';
13
+ export * from './InfieldButton.types.js';
@@ -0,0 +1,3 @@
1
+ import { INFIELD_BUTTON_VALID_SIZES as e } from "./InfieldButton.types.js";
2
+ import { InfieldButtonBase as t } from "./InfieldButton.base.js";
3
+ export { e as INFIELD_BUTTON_VALID_SIZES, t as InfieldButtonBase };
@@ -3,8 +3,9 @@ import { METER_VARIANTS as t } from "./Meter.types.js";
3
3
  import { property as n } from "lit/decorators.js";
4
4
  import { SpectrumElement as r } from "@adobe/spectrum-wc-core/element/index.js";
5
5
  import { LINEAR_PROGRESS_VALID_SIZES as i, LinearProgressMixin as a, SizedMixin as o } from "@adobe/spectrum-wc-core/mixins/index.js";
6
+ import { validateEnum as s } from "@adobe/spectrum-wc-core/utils/index.js";
6
7
  //#region components/meter/Meter.base.ts
7
- var s, c = class extends a(o(r, {
8
+ var c, l = class extends a(o(r, {
8
9
  validSizes: i,
9
10
  defaultSize: "m"
10
11
  })) {
@@ -13,18 +14,19 @@ var s, c = class extends a(o(r, {
13
14
  }
14
15
  willUpdate(e) {
15
16
  let t = this.constructor;
16
- if (!t.VARIANTS.includes(this.variant)) {
17
- var n;
18
- (n = window.__swc) != null && n.DEBUG && window.__swc.warn(this, `<${this.localName}> element expects the "variant" attribute to be one of the following:`, "https://spectrum-web-components.adobe.com/?path=/docs/components-meter--docs", { issues: [...t.VARIANTS] }), this.variant = "informative";
19
- }
20
- super.willUpdate(e);
17
+ t.VARIANTS.includes(this.variant) || (s(this, {
18
+ prop: "variant",
19
+ value: this.variant,
20
+ valid: t.VARIANTS,
21
+ url: "https://spectrum-web-components.adobe.com/?path=/docs/components-meter--docs"
22
+ }), this.variant = "informative"), super.willUpdate(e);
21
23
  }
22
24
  };
23
- s = c, s.VARIANTS = t, e([n({
25
+ c = l, c.VARIANTS = t, e([n({
24
26
  type: String,
25
27
  reflect: !0
26
- })], c.prototype, "variant", void 0);
28
+ })], l.prototype, "variant", void 0);
27
29
  //#endregion
28
- export { c as MeterBase };
30
+ export { l as MeterBase };
29
31
 
30
32
  //# sourceMappingURL=Meter.base.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Meter.base.js","names":[],"sources":["../../../components/meter/Meter.base.ts"],"sourcesContent":["/**\n * Copyright 2026 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { PropertyValues } from 'lit';\nimport { property } from 'lit/decorators.js';\n\nimport { SpectrumElement } from '@adobe/spectrum-wc-core/element/index.js';\nimport {\n LINEAR_PROGRESS_VALID_SIZES,\n LinearProgressMixin,\n SizedMixin,\n} from '@adobe/spectrum-wc-core/mixins/index.js';\n\nimport { METER_VARIANTS, type MeterVariant } from './Meter.types.js';\n\n/**\n * A non-focusable, read-only bar that shows a value inside a fixed range.\n * Implements the WAI-ARIA `meter` role on the shadow `.swc-Meter` element\n * (the host carries no ARIA).\n *\n * @attribute {ElementSize} size - The size of the meter.\n */\nexport abstract class MeterBase extends LinearProgressMixin(\n SizedMixin(SpectrumElement, {\n validSizes: LINEAR_PROGRESS_VALID_SIZES,\n defaultSize: 'm',\n })\n) {\n /**\n * The size of the meter.\n *\n * @default m\n */\n declare public size: (typeof LINEAR_PROGRESS_VALID_SIZES)[number];\n\n // ─────────────────────────\n // API TO OVERRIDE\n // ─────────────────────────\n\n /**\n * @internal\n *\n * A readonly array of all valid variants for the meter. Concrete\n * subclasses re-declare with their own valid set so validation logic\n * resolves against `(this.constructor as typeof MeterBase).VARIANTS`.\n */\n static readonly VARIANTS: readonly string[] = METER_VARIANTS;\n\n /**\n * The variant of the meter. Drives the bar fill color.\n */\n @property({ type: String, reflect: true })\n public variant: MeterVariant = 'informative';\n\n // ──────────────────────\n // IMPLEMENTATION\n // ──────────────────────\n\n protected override willUpdate(changes: PropertyValues): void {\n const constructor = this.constructor as typeof MeterBase;\n if (!constructor.VARIANTS.includes(this.variant)) {\n if (window.__swc?.DEBUG) {\n window.__swc.warn(\n this,\n `<${this.localName}> element expects the \"variant\" attribute to be one of the following:`,\n 'https://spectrum-web-components.adobe.com/?path=/docs/components-meter--docs',\n {\n issues: [...constructor.VARIANTS],\n }\n );\n }\n // Unknown variant: fall back to the default so the reflected\n // attribute and fill color always resolve to a valid variant.\n // Normalizing in `willUpdate` (Lit's input-normalization hook) folds\n // the change into the current cycle instead of scheduling a second\n // reactive update.\n this.variant = 'informative';\n }\n super.willUpdate(changes);\n }\n}\n"],"mappings":";;;;;;OA+BsB,IAAtB,cAAwC,EACtC,EAAW,GAAiB;CAC1B,YAAY;CACZ,aAAa;CACd,CAAC,CACH,CAAC;;8BAyB+B;;CAM/B,WAA8B,GAA+B;EAC3D,IAAM,IAAc,KAAK;AACzB,MAAI,CAAC,EAAY,SAAS,SAAS,KAAK,QAAQ,EAAE;;AAgBhD,IAfA,IAAI,OAAO,UAAA,QAAA,EAAO,SAChB,OAAO,MAAM,KACX,MACA,IAAI,KAAK,UAAU,wEACnB,gFACA,EACE,QAAQ,CAAC,GAAG,EAAY,SAAS,EAClC,CACF,EAOH,KAAK,UAAU;;AAEjB,QAAM,WAAW,EAAQ;;;oBAhCmB,MAK7C,EAAS;CAAE,MAAM;CAAQ,SAAS;CAAM,CAAC,CAAA,EAAA,EAAA,WAAA,WAAA,KAAA,EAAA"}
1
+ {"version":3,"file":"Meter.base.js","names":[],"sources":["../../../components/meter/Meter.base.ts"],"sourcesContent":["/**\n * Copyright 2026 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { PropertyValues } from 'lit';\nimport { property } from 'lit/decorators.js';\n\nimport { SpectrumElement } from '@adobe/spectrum-wc-core/element/index.js';\nimport {\n LINEAR_PROGRESS_VALID_SIZES,\n LinearProgressMixin,\n SizedMixin,\n} from '@adobe/spectrum-wc-core/mixins/index.js';\nimport { validateEnum } from '@adobe/spectrum-wc-core/utils/index.js';\n\nimport { METER_VARIANTS, type MeterVariant } from './Meter.types.js';\n\n/**\n * A non-focusable, read-only bar that shows a value inside a fixed range.\n * Implements the WAI-ARIA `meter` role on the shadow `.swc-Meter` element\n * (the host carries no ARIA).\n *\n * @attribute {ElementSize} size - The size of the meter.\n */\nexport abstract class MeterBase extends LinearProgressMixin(\n SizedMixin(SpectrumElement, {\n validSizes: LINEAR_PROGRESS_VALID_SIZES,\n defaultSize: 'm',\n })\n) {\n /**\n * The size of the meter.\n *\n * @default m\n */\n declare public size: (typeof LINEAR_PROGRESS_VALID_SIZES)[number];\n\n // ─────────────────────────\n // API TO OVERRIDE\n // ─────────────────────────\n\n /**\n * @internal\n *\n * A readonly array of all valid variants for the meter. Concrete\n * subclasses re-declare with their own valid set so validation logic\n * resolves against `(this.constructor as typeof MeterBase).VARIANTS`.\n */\n static readonly VARIANTS: readonly string[] = METER_VARIANTS;\n\n /**\n * The variant of the meter. Drives the bar fill color.\n */\n @property({ type: String, reflect: true })\n public variant: MeterVariant = 'informative';\n\n // ──────────────────────\n // IMPLEMENTATION\n // ──────────────────────\n\n protected override willUpdate(changes: PropertyValues): void {\n const constructor = this.constructor as typeof MeterBase;\n if (!constructor.VARIANTS.includes(this.variant)) {\n validateEnum(this, {\n prop: 'variant',\n value: this.variant,\n valid: constructor.VARIANTS,\n url: 'https://spectrum-web-components.adobe.com/?path=/docs/components-meter--docs',\n });\n // Unknown variant: fall back to the default so the reflected\n // attribute and fill color always resolve to a valid variant.\n // Normalizing in `willUpdate` (Lit's input-normalization hook) folds\n // the change into the current cycle instead of scheduling a second\n // reactive update.\n this.variant = 'informative';\n }\n super.willUpdate(changes);\n }\n}\n"],"mappings":";;;;;;;OAgCsB,IAAtB,cAAwC,EACtC,EAAW,GAAiB;CAC1B,YAAY;CACZ,aAAa;CACd,CAAC,CACH,CAAC;;8BAyB+B;;CAM/B,WAA8B,GAA+B;EAC3D,IAAM,IAAc,KAAK;AAezB,EAdK,EAAY,SAAS,SAAS,KAAK,QAAQ,KAC9C,EAAa,MAAM;GACjB,MAAM;GACN,OAAO,KAAK;GACZ,OAAO,EAAY;GACnB,KAAK;GACN,CAAC,EAMF,KAAK,UAAU,gBAEjB,MAAM,WAAW,EAAQ;;;oBA5BmB,MAK7C,EAAS;CAAE,MAAM;CAAQ,SAAS;CAAM,CAAC,CAAA,EAAA,EAAA,WAAA,WAAA,KAAA,EAAA"}
@@ -3,9 +3,9 @@ import { POPOVER_VALID_PLACEMENTS as t, POPOVER_VALID_SIZES as n } from "./Popov
3
3
  import { property as r } from "lit/decorators.js";
4
4
  import { PageScrollLockController as i, PlacementController as a } from "@adobe/spectrum-wc-core/controllers/index.js";
5
5
  import { SpectrumElement as o } from "@adobe/spectrum-wc-core/element/index.js";
6
- import { deepContains as s, getActiveElement as c, isTopDismissible as l, physicalSide as u, registerDismissible as d, resolveTrigger as f, runAfterTransition as p, unregisterDismissible as m } from "@adobe/spectrum-wc-core/utils/index.js";
6
+ import { deepContains as s, getActiveElement as c, isTopDismissible as l, physicalSide as u, registerDismissible as d, resolveTrigger as f, runAfterTransition as p, unregisterDismissible as m, validateEnum as h, warnIf as g } from "@adobe/spectrum-wc-core/utils/index.js";
7
7
  //#region components/popover/Popover.base.ts
8
- var h, g = [
8
+ var _, v = [
9
9
  "placement",
10
10
  "offset",
11
11
  "crossOffset",
@@ -14,7 +14,7 @@ var h, g = [
14
14
  "hideArrow",
15
15
  "tipPadding",
16
16
  "size"
17
- ], _ = class extends o {
17
+ ], y = class extends o {
18
18
  constructor(...e) {
19
19
  super(...e), this.open = !1, this.modal = !1, this.accessibleLabel = "", this.placement = "bottom", this.hideArrow = !1, this.offset = 8, this.crossOffset = 0, this.containerPadding = 8, this.shouldFlip = !0, this.tipPadding = 8, this.triggerElement = null, this.manual = !1, this._placementController = new a(this), this._scrollLock = new i(this), this._interactiveElement = null, this._anchor = null, this._clickTrigger = null, this._triggerPointerActive = !1, this._pressEndAbort = null, this._dismissedByTriggerPress = !1, this._closeSource = null, this._syncingOpen = !1, this._suppressOpenEvent = !1, this._hasCompletedFirstUpdate = !1, this._pendingFocusOnOpen = !1, this._onTriggerPressStart = () => {
20
20
  this._triggerPointerActive = !0, this._pressEndAbort = new AbortController();
@@ -43,7 +43,7 @@ var h, g = [
43
43
  let r = this._isFocusWithin();
44
44
  if (this._syncOpen(!1), this._dispatchClose(e), this._closeTeardown(), r) {
45
45
  var n;
46
- (n = this._interactiveElement) == null || n.focus();
46
+ (n = this._interactiveElement) == null || n.focus({ preventScroll: !0 });
47
47
  }
48
48
  }
49
49
  }, this._onCancel = (e) => {
@@ -74,12 +74,18 @@ var h, g = [
74
74
  super.disconnectedCallback(), this._placementController.stop(), (e = this._cancelAfterTransition) == null || e.call(this), m(this), this._removeEscapeListener(), this._scrollLock.unlock(), this._removeTriggerListeners(), this._clearTriggerAria(), this._interactiveElement = null, this._anchor = null;
75
75
  }
76
76
  update(e) {
77
- var t;
78
- if ((t = window.__swc) != null && t.DEBUG) {
79
- let e = this.constructor;
80
- e.VALID_PLACEMENTS.includes(this.placement) || window.__swc.warn(this, `<${this.localName}> element expects the "placement" attribute to be one of the following:`, "https://spectrum-web-components.adobe.com/?path=/docs/components-popover--docs", { issues: [...e.VALID_PLACEMENTS] });
81
- }
82
- super.update(e);
77
+ let t = this.constructor;
78
+ h(this, {
79
+ prop: "placement",
80
+ value: this.placement,
81
+ valid: t.VALID_PLACEMENTS,
82
+ url: "https://spectrum-web-components.adobe.com/?path=/docs/components-popover--docs"
83
+ }), this.size !== void 0 && h(this, {
84
+ prop: "size",
85
+ value: this.size,
86
+ valid: t.VALID_SIZES,
87
+ url: "https://spectrum-web-components.adobe.com/?path=/docs/components-popover--docs"
88
+ }), super.update(e);
83
89
  }
84
90
  updated(e) {
85
91
  if (super.updated(e), (e.has("for") || e.has("triggerElement") || e.has("modal") || e.has("manual")) && this._wireTrigger(), e.has("open")) {
@@ -89,17 +95,16 @@ var h, g = [
89
95
  this._hasCompletedFirstUpdate = !0;
90
96
  }
91
97
  _positioningChanged(e) {
92
- return g.some((t) => e.has(t));
98
+ return v.some((t) => e.has(t));
93
99
  }
94
100
  _wireTrigger() {
95
- var e;
96
- let { trigger: t, interactiveElement: n } = f(this, {
101
+ let { trigger: e, interactiveElement: t } = f(this, {
97
102
  for: this.for,
98
103
  triggerElement: this.triggerElement instanceof HTMLElement ? this.triggerElement : null
99
104
  });
100
- !t && this.for && (e = window.__swc) != null && e.DEBUG && window.__swc.warn(this, `<${this.localName}> for="${this.for}" did not resolve to an element in the current tree root. Check that the referenced id exists in the same document tree root.`, "https://spectrum-web-components.adobe.com/?path=/docs/components-popover--docs", { level: "high" }), this._interactiveElement && this._interactiveElement !== n && this._clearTriggerAria(), this._interactiveElement = n, this._anchor = this.triggerElement && !(this.triggerElement instanceof HTMLElement) ? this.triggerElement : t, n && (n.ariaControlsElements = [this], n.setAttribute("aria-expanded", String(this.open)), n.setAttribute("aria-haspopup", "dialog"));
101
- let r = this.manual ? null : t;
102
- r !== this._clickTrigger && (this._removeTriggerListeners(), r && (r.addEventListener("pointerdown", this._onTriggerPressStart, { capture: !0 }), r.addEventListener("touchstart", this._onTriggerPressStart, { capture: !0 }), r.addEventListener("click", this._onTriggerClick), this._clickTrigger = r));
105
+ g(this, !e && !!this.for, `<${this.localName}> for="${this.for}" did not resolve to an element in the current tree root. Check that the referenced id exists in the same document tree root.`, "https://spectrum-web-components.adobe.com/?path=/docs/components-popover--docs", { level: "high" }), this._interactiveElement && this._interactiveElement !== t && this._clearTriggerAria(), this._interactiveElement = t, this._anchor = this.triggerElement && !(this.triggerElement instanceof HTMLElement) ? this.triggerElement : e, t && (t.ariaControlsElements = [this], t.setAttribute("aria-expanded", String(this.open)), t.setAttribute("aria-haspopup", "dialog"));
106
+ let n = this.manual ? null : e;
107
+ n !== this._clickTrigger && (this._removeTriggerListeners(), n && (n.addEventListener("pointerdown", this._onTriggerPressStart, { capture: !0 }), n.addEventListener("touchstart", this._onTriggerPressStart, { capture: !0 }), n.addEventListener("click", this._onTriggerClick), this._clickTrigger = n));
103
108
  }
104
109
  _removeTriggerListeners() {
105
110
  var e, t, n;
@@ -134,33 +139,32 @@ var h, g = [
134
139
  });
135
140
  }
136
141
  _show(e = !1) {
137
- var t;
138
- let n = this.internalElement;
139
- if (n) {
140
- if ((t = window.__swc) != null && t.DEBUG && !this.accessibleLabel.trim() && window.__swc.warn(this, `<${this.localName}> must have an "accessible-label" attribute to name the dialog for assistive technology.`, "https://spectrum-web-components.adobe.com/?path=/docs/components-popover--docs", { issues: ["accessible-label"] }), this.modal) {
141
- let t = n, r = t.open;
142
+ let t = this.internalElement;
143
+ if (t) {
144
+ if (g(this, !this.accessibleLabel.trim(), `<${this.localName}> must have an "accessible-label" attribute to name the dialog for assistive technology.`, "https://spectrum-web-components.adobe.com/?path=/docs/components-popover--docs", { issues: ["accessible-label"] }), this.modal) {
145
+ let n = t, r = n.open;
142
146
  if (!r) {
143
- let { scrollX: e, scrollY: n } = window;
147
+ let { scrollX: e, scrollY: t } = window;
144
148
  try {
145
- t.showModal(), r = !0;
149
+ n.showModal(), r = !0;
146
150
  } catch (e) {
147
151
  r = !1;
148
152
  }
149
- window.scrollTo(e, n);
153
+ window.scrollTo(e, t);
150
154
  }
151
155
  if (!r) return;
152
156
  this._removeEscapeListener(), this._scrollLock.lock(), d(this), e || this._dispatchOpen();
153
157
  } else {
154
- let t = n.matches(":popover-open");
155
- if (!t) {
158
+ let n = t.matches(":popover-open");
159
+ if (!n) {
156
160
  this._suppressOpenEvent = e;
157
161
  try {
158
- n.showPopover(), t = !0;
162
+ t.showPopover(), n = !0;
159
163
  } catch (e) {
160
- this._suppressOpenEvent = !1, t = !1;
164
+ this._suppressOpenEvent = !1, n = !1;
161
165
  }
162
166
  }
163
- if (!t) return;
167
+ if (!n) return;
164
168
  this._scrollLock.unlock(), d(this), this._addEscapeListener(), this._pendingFocusOnOpen = this._hasCompletedFirstUpdate;
165
169
  }
166
170
  this._startPositioning();
@@ -241,43 +245,43 @@ var h, g = [
241
245
  }, { fallback: t });
242
246
  }
243
247
  };
244
- h = _, h.VALID_PLACEMENTS = t, h.VALID_SIZES = n, e([r({
248
+ _ = y, _.VALID_PLACEMENTS = t, _.VALID_SIZES = n, e([r({
245
249
  type: Boolean,
246
250
  reflect: !0
247
- })], _.prototype, "open", void 0), e([r({
251
+ })], y.prototype, "open", void 0), e([r({
248
252
  type: Boolean,
249
253
  reflect: !0
250
- })], _.prototype, "modal", void 0), e([r({
254
+ })], y.prototype, "modal", void 0), e([r({
251
255
  type: String,
252
256
  attribute: "accessible-label"
253
- })], _.prototype, "accessibleLabel", void 0), e([r({
257
+ })], y.prototype, "accessibleLabel", void 0), e([r({
254
258
  type: String,
255
259
  reflect: !0
256
- })], _.prototype, "placement", void 0), e([r({
260
+ })], y.prototype, "placement", void 0), e([r({
257
261
  type: String,
258
262
  reflect: !0
259
- })], _.prototype, "size", void 0), e([r({
263
+ })], y.prototype, "size", void 0), e([r({
260
264
  type: Boolean,
261
265
  reflect: !0,
262
266
  attribute: "hide-arrow"
263
- })], _.prototype, "hideArrow", void 0), e([r({ type: Number })], _.prototype, "offset", void 0), e([r({
267
+ })], y.prototype, "hideArrow", void 0), e([r({ type: Number })], y.prototype, "offset", void 0), e([r({
264
268
  type: Number,
265
269
  attribute: "cross-offset"
266
- })], _.prototype, "crossOffset", void 0), e([r({
270
+ })], y.prototype, "crossOffset", void 0), e([r({
267
271
  type: Number,
268
272
  attribute: "container-padding"
269
- })], _.prototype, "containerPadding", void 0), e([r({
273
+ })], y.prototype, "containerPadding", void 0), e([r({
270
274
  type: Boolean,
271
275
  reflect: !0,
272
276
  attribute: "should-flip"
273
- })], _.prototype, "shouldFlip", void 0), e([r({
277
+ })], y.prototype, "shouldFlip", void 0), e([r({
274
278
  type: Number,
275
279
  attribute: "tip-padding"
276
- })], _.prototype, "tipPadding", void 0), e([r({ type: String })], _.prototype, "for", void 0), e([r({ attribute: !1 })], _.prototype, "triggerElement", void 0), e([r({
280
+ })], y.prototype, "tipPadding", void 0), e([r({ type: String })], y.prototype, "for", void 0), e([r({ attribute: !1 })], y.prototype, "triggerElement", void 0), e([r({
277
281
  type: Boolean,
278
282
  reflect: !0
279
- })], _.prototype, "manual", void 0);
283
+ })], y.prototype, "manual", void 0);
280
284
  //#endregion
281
- export { _ as PopoverBase };
285
+ export { y as PopoverBase };
282
286
 
283
287
  //# sourceMappingURL=Popover.base.js.map