@porsche-design-system/components-react 4.3.0 → 4.4.0-rc.1

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 (38) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/cjs/lib/components/popover.wrapper.cjs +4 -3
  3. package/esm/lib/components/popover.wrapper.d.ts +26 -2
  4. package/esm/lib/components/popover.wrapper.mjs +5 -4
  5. package/package.json +2 -2
  6. package/ssr/cjs/components/dist/styles/esm/styles-entry.cjs +354 -143
  7. package/ssr/cjs/components/dist/utils/esm/utils-entry.cjs +1 -1
  8. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/popover.wrapper.cjs +5 -4
  9. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/banner.cjs +15 -5
  10. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/dialog-base.cjs +3 -7
  11. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/drilldown.cjs +3 -0
  12. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/fc-dismiss-button.cjs +16 -0
  13. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flyout.cjs +14 -1
  14. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/inline-notification.cjs +2 -2
  15. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/modal.cjs +14 -1
  16. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/popover.cjs +65 -16
  17. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/sheet.cjs +14 -1
  18. package/ssr/esm/components/dist/styles/esm/styles-entry.mjs +354 -144
  19. package/ssr/esm/components/dist/utils/esm/utils-entry.mjs +1 -1
  20. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/popover.wrapper.mjs +6 -5
  21. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/banner.mjs +15 -5
  22. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/dialog-base.mjs +3 -7
  23. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/drilldown.mjs +3 -0
  24. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/fc-dismiss-button.mjs +14 -0
  25. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flyout.mjs +14 -1
  26. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/inline-notification.mjs +2 -2
  27. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/modal.mjs +14 -1
  28. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/popover.mjs +66 -17
  29. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/sheet.mjs +14 -1
  30. package/ssr/esm/lib/components/popover.wrapper.d.ts +26 -2
  31. package/ssr/esm/lib/dsr-components/banner.d.ts +2 -0
  32. package/ssr/esm/lib/dsr-components/dialog-base.d.ts +2 -2
  33. package/ssr/esm/lib/dsr-components/drilldown.d.ts +1 -0
  34. package/ssr/esm/lib/dsr-components/fc-dismiss-button.d.ts +16 -0
  35. package/ssr/esm/lib/dsr-components/flyout.d.ts +1 -0
  36. package/ssr/esm/lib/dsr-components/modal.d.ts +1 -0
  37. package/ssr/esm/lib/dsr-components/popover.d.ts +16 -7
  38. package/ssr/esm/lib/dsr-components/sheet.d.ts +1 -0
@@ -3849,7 +3849,7 @@ const OPTION_LIST_SAFE_ZONE = 6;
3849
3849
 
3850
3850
  const getCDNBaseURL = () => global.PORSCHE_DESIGN_SYSTEM_CDN_URL + "/porsche-design-system";
3851
3851
 
3852
- const prefix = `[Porsche Design System v${"4.3.0"}]` // this part isn't covered by unit tests
3852
+ const prefix = `[Porsche Design System v${"4.4.0-rc.1"}]` // this part isn't covered by unit tests
3853
3853
  ;
3854
3854
  const consoleError = (...messages) => {
3855
3855
  console.error(prefix, ...messages);
@@ -3984,11 +3984,11 @@ const cssVarSummaryTopDeprecated = '--p-accordion-position-sticky-top'; // depre
3984
3984
  /**
3985
3985
  * @css-variable {"name": "--p-accordion-px", "description": "Horizontal padding of the accordion.", "defaultValue": "16px"}
3986
3986
  */
3987
- const cssVarPaddingInline$1 = '--p-accordion-px';
3987
+ const cssVarPaddingInline$2 = '--p-accordion-px';
3988
3988
  /**
3989
3989
  * @css-variable {"name": "--p-accordion-py", "description": "Vertical padding of the accordion.", "defaultValue": "16px"}
3990
3990
  */
3991
- const cssVarPaddingBlock = '--p-accordion-py';
3991
+ const cssVarPaddingBlock$1 = '--p-accordion-py';
3992
3992
  const iconMarker = getInlineSVGBackgroundImage(`<path d="m12 15.125h-.001l-.005-.006-6.494-5.476.642-.768 5.858 4.94 5.858-4.94.642.769-6.497 5.477z"/>`);
3993
3993
  const backgroundMap$1 = {
3994
3994
  canvas: ref(colorCanvas),
@@ -4069,7 +4069,7 @@ const getComponentCss$1a = (alignMarker, background, isCompact, indent, isOpen,
4069
4069
  gridTemplate: `repeat(2, auto) / ${hasSummaryBefore ? 'auto ' : ''}${isIconAlignedStart ? 'auto minmax(0, 1fr)' : 'minmax(0, 1fr) auto'}${hasSummaryAfter ? ' auto ' : ''}`,
4070
4070
  columnGap: gap,
4071
4071
  alignItems: 'center',
4072
- padding: `${ref(cssVarPaddingBlock, background === 'none' ? '0' : paddingBlock)} ${ref(cssVarPaddingInline$1, background === 'none' ? '0' : paddingInline)}`,
4072
+ padding: `${ref(cssVarPaddingBlock$1, background === 'none' ? '0' : paddingBlock)} ${ref(cssVarPaddingInline$2, background === 'none' ? '0' : paddingInline)}`,
4073
4073
  background: backgroundMap$1[background],
4074
4074
  ...(background === 'frosted' && {
4075
4075
  WebkitBackdropFilter: ref(blurFrosted),
@@ -4079,7 +4079,7 @@ const getComponentCss$1a = (alignMarker, background, isCompact, indent, isOpen,
4079
4079
  ...forcedColorsMediaQuery({
4080
4080
  outline: '1px solid CanvasText',
4081
4081
  outlineOffset: background === 'none' ? '0' : '-1px',
4082
- padding: `${ref(cssVarPaddingBlock, paddingBlock)} ${ref(cssVarPaddingInline$1, paddingInline)}`,
4082
+ padding: `${ref(cssVarPaddingBlock$1, paddingBlock)} ${ref(cssVarPaddingInline$2, paddingInline)}`,
4083
4083
  }),
4084
4084
  '&::details-content': addImportantToEachRule({
4085
4085
  display: 'contents', // allows <details> to be used as grid layout
@@ -4104,8 +4104,8 @@ const getComponentCss$1a = (alignMarker, background, isCompact, indent, isOpen,
4104
4104
  opacity: 1,
4105
4105
  paddingTop,
4106
4106
  zIndex: 2, // Ensure details are above summary when using custom padding
4107
- paddingInline: `${ref(cssVarPaddingInline$1, background === 'none' ? '0' : paddingInline)}`,
4108
- marginInline: `calc(-1 * ${ref(cssVarPaddingInline$1, background === 'none' ? '0' : paddingInline)})`,
4107
+ paddingInline: `${ref(cssVarPaddingInline$2, background === 'none' ? '0' : paddingInline)}`,
4108
+ marginInline: `calc(-1 * ${ref(cssVarPaddingInline$2, background === 'none' ? '0' : paddingInline)})`,
4109
4109
  // as soon as all browsers support calc-size(auto) to be transitionable, we can remove the grid-template-rows rule and animation
4110
4110
  gridTemplateRows: '1fr',
4111
4111
  visibility: 'inherit', // since `::details-content` and `allow-discrete` transition doesn't work in Safari we need to take care ourselves for visibility state to be a11y compliant
@@ -4122,8 +4122,8 @@ const getComponentCss$1a = (alignMarker, background, isCompact, indent, isOpen,
4122
4122
  gridTemplateColumns: 'subgrid',
4123
4123
  alignItems: 'center',
4124
4124
  cursor: 'pointer',
4125
- padding: `${ref(cssVarPaddingBlock, background === 'none' ? '0' : paddingBlock)} ${ref(cssVarPaddingInline$1, background === 'none' ? '0' : paddingInline)}`,
4126
- margin: `calc(-1 * ${ref(cssVarPaddingBlock, background === 'none' ? '0' : paddingBlock)}) calc(-1 * ${ref(cssVarPaddingInline$1, background === 'none' ? '0' : paddingInline)})`,
4125
+ padding: `${ref(cssVarPaddingBlock$1, background === 'none' ? '0' : paddingBlock)} ${ref(cssVarPaddingInline$2, background === 'none' ? '0' : paddingInline)}`,
4126
+ margin: `calc(-1 * ${ref(cssVarPaddingBlock$1, background === 'none' ? '0' : paddingBlock)}) calc(-1 * ${ref(cssVarPaddingInline$2, background === 'none' ? '0' : paddingInline)})`,
4127
4127
  ...(isSticky &&
4128
4128
  (background === 'canvas' || background === 'surface') && {
4129
4129
  position: 'sticky',
@@ -4222,9 +4222,6 @@ const getComponentCss$19 = () => {
4222
4222
  });
4223
4223
  };
4224
4224
 
4225
- const TOAST_Z_INDEX = 999999;
4226
- const BANNER_Z_INDEX = 99;
4227
-
4228
4225
  const colorMap$3 = {
4229
4226
  primary: ref(colorPrimary),
4230
4227
  'contrast-higher': ref(colorContrastHigher),
@@ -4289,6 +4286,86 @@ const weightMap = {
4289
4286
  bold: ref(fontWeightBold),
4290
4287
  };
4291
4288
 
4289
+ // Inlined `close` icon (mirrors packages/assets/projects/icons/src/close.svg) rendered as a CSS mask, so the dismiss
4290
+ // button needs neither a nested `p-button` nor a `p-icon` (which would fetch the SVG from the CDN asynchronously).
4291
+ const iconClose = getInlineSVGBackgroundImage('<path d="m18 6.706-5.294 5.294 5.294 5.294-.706.706-5.294-5.294-5.294 5.294-.706-.706 5.294-5.294-5.294-5.294.706-.706 5.294 5.294 5.294-5.294z"/>');
4292
+ // NOTE: Values copied (and reduced to the fixed `compact` + `hideLabel` case the dismiss button always uses) from
4293
+ // `getVariantColors` in `packages/components/src/styles/link-button-styles.ts` to keep the visual identical to the
4294
+ // previously nested `p-button`. If the shared button styling changes, mirror it here (or extract a shared helper).
4295
+ const getVariantColors$1 = (variant) => {
4296
+ const colors = {
4297
+ primary: {
4298
+ textColor: ref(colorCanvas),
4299
+ backgroundColor: ref(colorPrimary),
4300
+ backgroundColorHover: ref(colorContrastHigh),
4301
+ },
4302
+ secondary: {
4303
+ textColor: ref(colorPrimary),
4304
+ backgroundColor: ref(colorFrostedStrong),
4305
+ backgroundColorHover: ref(colorFrosted),
4306
+ },
4307
+ };
4308
+ return colors[variant];
4309
+ };
4310
+ /**
4311
+ * Visual styles for the shared native `<button class="dismiss">` dismiss button. Returns the button rule (reset,
4312
+ * variant colors, focus ring, High Contrast Mode, hover, inlined close-icon mask and the visually-hidden label). Each
4313
+ * consumer merges this with its own positioning styles for the `dismiss` key (e.g. grid placement in
4314
+ * `notification-base-styles` / `dialog-base-styles`).
4315
+ *
4316
+ * Reduced to the dismiss button's fixed configuration (always `compact` + `hideLabel`): padding `6px`, full border
4317
+ * radius and no gap — the responsive `compact`/`hideLabel` branches from `getLinkButtonStyles` are therefore collapsed.
4318
+ */
4319
+ const getFCDismissButtonStyles = (variant) => {
4320
+ const { textColor, backgroundColor, backgroundColorHover } = getVariantColors$1(variant);
4321
+ return {
4322
+ all: 'unset',
4323
+ boxSizing: 'border-box',
4324
+ display: 'grid',
4325
+ placeItems: 'center',
4326
+ padding: '6px',
4327
+ borderRadius: ref(radiusFull),
4328
+ font: `${ref(fontWeightNormal$1)} ${ref(typescaleSm$1)} / ${ref(leadingNormal$1)} ${ref(fontPorscheNext$1)}`,
4329
+ backgroundColor,
4330
+ color: textColor,
4331
+ cursor: 'pointer',
4332
+ // The frosted backdrop-filter is only meaningful for the translucent `secondary` (frosted) background. For the
4333
+ // opaque `primary` background it is invisible AND — because the dialog consumer additionally applies
4334
+ // `filter: invert(1)` on the same element (see `getDialogDismissButtonJssStyle`) — the blurred backdrop bleeds past
4335
+ // the circular edge and the invert amplifies it into a visible glow/halo. So it is applied for `secondary` only.
4336
+ ...(variant === 'secondary' && {
4337
+ WebkitBackdropFilter: ref(blurFrosted),
4338
+ backdropFilter: ref(blurFrosted),
4339
+ }),
4340
+ transition: `${getTransition('background-color')}, ${getTransition('color')}`,
4341
+ ...forcedColorsMediaQuery({
4342
+ forcedColorAdjust: 'none',
4343
+ background: 'Canvas',
4344
+ boxShadow: 'inset 0 0 0 2px ButtonBorder',
4345
+ color: 'ButtonText',
4346
+ }),
4347
+ '&:focus-visible': getFocusBaseStyles(),
4348
+ ...hoverMediaQuery({
4349
+ '&:hover': {
4350
+ backgroundColor: backgroundColorHover,
4351
+ ...forcedColorsMediaQuery({
4352
+ background: 'Canvas',
4353
+ }),
4354
+ },
4355
+ }),
4356
+ '&::before': {
4357
+ content: '""',
4358
+ width: ref(leadingNormal$1),
4359
+ height: ref(leadingNormal$1),
4360
+ WebkitMask: `${iconClose} center/contain no-repeat`, // necessary for Sogou browser support :-)
4361
+ mask: `${iconClose} center/contain no-repeat`,
4362
+ background: 'currentColor', // follows the button's text color (variant + HCM `ButtonText`)
4363
+ },
4364
+ // visually-hidden accessible name (mirrors `hideLabel` on the former `p-button`)
4365
+ '& span': getHiddenTextJssStyle(),
4366
+ };
4367
+ };
4368
+
4292
4369
  const getFunctionalComponentNotificationBaseStyles = (state, hasAction, hasDismissButton, hasHeadingOrHeadingSlot) => {
4293
4370
  return {
4294
4371
  '@global': {
@@ -4339,6 +4416,8 @@ const getFunctionalComponentNotificationBaseStyles = (state, hasAction, hasDismi
4339
4416
  },
4340
4417
  ...(hasDismissButton && {
4341
4418
  dismiss: {
4419
+ // native dismiss button visual (secondary variant); grid positioning is applied on top
4420
+ ...getFCDismissButtonStyles('secondary'),
4342
4421
  gridArea: `1/4/-1`,
4343
4422
  alignSelf: 'flex-start',
4344
4423
  marginBlock: `calc(-6 * ${ref(spacingStatic2Xs)})`,
@@ -4379,12 +4458,12 @@ const cssVarInsetX = '--p-banner-inset-x';
4379
4458
  const cssVarPositionTop = '--p-banner-position-top'; // deprecated (aliased)
4380
4459
  const cssVarPositionBottom = '--p-banner-position-bottom'; // deprecated (aliased)
4381
4460
  const topBottomFallback = '56px';
4382
- const cssVariableZIndex = '--_p-banner-a';
4383
- const getComponentCss$18 = (isOpen, position, state, hasDismissButton, hasHeadingOrHeadingSlot) => {
4461
+ const cssVarTransform = '--_p-banner-a';
4462
+ const getComponentCss$18 = (isOpen, position, state, hasDismissButton, hasHeadingOrHeadingSlot, skipEntryTransition) => {
4384
4463
  const duration = isOpen ? 'moderate' : 'short';
4385
4464
  const easing = isOpen ? 'in' : 'out';
4386
- const transition = `visibility 0s linear ${ref(cssVariableTransitionDuration, isOpen ? '0s' : motionDurationMap[duration])},${getTransition('transform', duration, easing)}`;
4387
- return getCss({
4465
+ const transition = getTransition('transform', duration, easing);
4466
+ const css = getCss({
4388
4467
  ...mergeDeep({
4389
4468
  '@global': {
4390
4469
  ':host': {
@@ -4393,46 +4472,36 @@ const getComponentCss$18 = (isOpen, position, state, hasDismissButton, hasHeadin
4393
4472
  ...hostHiddenStyles,
4394
4473
  }),
4395
4474
  },
4396
- ...preventFoucOfNestedElementsStyles,
4397
4475
  '[popover]': {
4398
4476
  all: 'unset',
4399
4477
  position: 'fixed',
4400
- zIndex: ref(cssVariableZIndex, BANNER_Z_INDEX), // Fallback for browsers lacking `transition-behavior: allow-discrete` — keeps the banner visible during fade-out after leaving the top layer.
4401
4478
  ...buildResponsiveStyles(position, (v) => ({
4402
4479
  ...(v === 'top' && {
4480
+ [cssVarTransform]: `translate3d(-50%,calc(-100% - ${ref(cssVarTop, ref(cssVarPositionTop, topBottomFallback))}),0)`,
4403
4481
  insetBlock: `${ref(cssVarTop, ref(cssVarPositionTop, topBottomFallback))} auto`,
4404
- ...(!isOpen && {
4405
- transform: `translate3d(-50%,calc(-100% - ${ref(cssVarTop, ref(cssVarPositionTop, topBottomFallback))}),0)`,
4406
- }),
4407
4482
  }),
4408
4483
  ...(v === 'bottom' && {
4484
+ [cssVarTransform]: `translate3d(-50%,calc(${ref(cssVarBottom, ref(cssVarPositionBottom, topBottomFallback))} + 100%),0)`,
4409
4485
  insetBlock: `auto ${ref(cssVarBottom, ref(cssVarPositionBottom, topBottomFallback))}`,
4410
- ...(!isOpen && {
4411
- transform: `translate3d(-50%,calc(${ref(cssVarBottom, ref(cssVarPositionBottom, topBottomFallback))} + 100%),0)`,
4412
- }),
4413
4486
  }),
4414
4487
  })),
4415
4488
  left: '50vw',
4416
4489
  width: `min(calc(100vw - 2 * ${ref(cssVarInsetX, gridExtendedOffsetBase)}),${ref(cssVarMaxWidth, '100ch')})`,
4490
+ transform: isOpen ? 'translate3d(-50%,0,0)' : ref(cssVarTransform),
4491
+ transition,
4492
+ // keep the popover on the #top-layer while the fade-out runs (Chromium only; see `overlayTransitionSupportsQuery`)
4493
+ ...overlayTransitionSupportsQuery({
4494
+ transition: `${transition},${getTransition('overlay', duration, easing)} allow-discrete, ${getTransition('display', duration, easing)} allow-discrete`,
4495
+ }),
4417
4496
  overlay: 'none',
4497
+ display: 'none',
4418
4498
  '&:popover-open': {
4419
4499
  overlay: 'auto',
4500
+ display: 'grid',
4420
4501
  },
4421
4502
  '&::backdrop': {
4422
- display: 'none',
4503
+ display: 'none', // reset ua-style
4423
4504
  },
4424
- visibility: 'hidden', // element shall not be tabbable with keyboard after fade out transition has finished
4425
- pointerEvents: 'none', // element can't be interacted with mouse
4426
- ...(isOpen && {
4427
- visibility: 'inherit',
4428
- pointerEvents: 'inherit',
4429
- transform: 'translate3d(-50%,0,0)',
4430
- }),
4431
- transition,
4432
- // keep the popover on the #top-layer while the fade-out runs (Chromium only; see `overlayTransitionSupportsQuery`)
4433
- ...overlayTransitionSupportsQuery({
4434
- transition: `${transition},${getTransition('overlay', duration, easing)} allow-discrete`,
4435
- }),
4436
4505
  },
4437
4506
  },
4438
4507
  }, {
@@ -4443,6 +4512,17 @@ const getComponentCss$18 = (isOpen, position, state, hasDismissButton, hasHeadin
4443
4512
  },
4444
4513
  }, getFunctionalComponentNotificationBaseStyles(state, false, hasDismissButton, hasHeadingOrHeadingSlot)),
4445
4514
  });
4515
+ // Both the `[popover]` box (transform) and its nested `.notification` (opacity) need a `@starting-style`: while closed
4516
+ // the popover is `display: none`, so on open `.notification` renders fresh with a computed `opacity: 1` and has no
4517
+ // prior value to transition from — without the starting value it snaps to full opacity instead of fading in. The
4518
+ // opacity is split onto `.notification` (not `[popover]`) so the frosted-glass backdrop-filter renders correctly.
4519
+ //
4520
+ // `skipEntryTransition` omits the append on the component's FIRST render, so an initially-open banner (`open=true` on
4521
+ // page load) computes straight to its visible transform/opacity and appears instantly instead of sliding/fading in.
4522
+ // Every later render passes `false`, so a user-triggered open still animates normally.
4523
+ return isOpen && false
4524
+ ? `${css}\n@starting-style {\n [popover] {\n transform: ${ref(cssVarTransform)};\n }\n .notification {\n opacity: 0;\n }\n}`
4525
+ : css;
4446
4526
  };
4447
4527
 
4448
4528
  // Needed for slotted anchor and hidden label, which then enlarges the hidden label to equal host size and indents the text to be visually hidden.
@@ -5207,7 +5287,7 @@ const getComponentCss$14 = (isSidebarStartOpen, isSidebarEndOpen, background) =>
5207
5287
  /**
5208
5288
  * @css-variable {"name": "--p-carousel-px", "description": "Defines the logical inline start and end padding of the carousel, the extra space is used to show parts of the next/previous slide. When used then the prop `width` has no effect anymore.", "defaultValue": ""}
5209
5289
  */
5210
- const cssVarPaddingInline = '--p-carousel-px';
5290
+ const cssVarPaddingInline$1 = '--p-carousel-px';
5211
5291
  /**
5212
5292
  * @css-variable {"name": "--p-carousel-ps", "description": "Defines the logical inline start padding of the carousel, the extra space is used to show parts of the next/previous slide. Needs to be used in combination with `--p-carousel-px` or `--p-carousel-pe`. When used then the prop `width` has no effect anymore.", "defaultValue": ""}
5213
5293
  */
@@ -5326,17 +5406,17 @@ const getComponentCss$13 = (gradient, hasHeading, hasDescription, hasControlsSlo
5326
5406
  },
5327
5407
  header: {
5328
5408
  display: 'grid',
5329
- paddingInlineStart: ref(cssVarPaddingInlineStart, ref(cssVarPaddingInline, spacingMap[width].base)),
5330
- paddingInlineEnd: ref(cssVarPaddingInlineEnd, ref(cssVarPaddingInline, spacingMap[width].base)),
5409
+ paddingInlineStart: ref(cssVarPaddingInlineStart, ref(cssVarPaddingInline$1, spacingMap[width].base)),
5410
+ paddingInlineEnd: ref(cssVarPaddingInlineEnd, ref(cssVarPaddingInline$1, spacingMap[width].base)),
5331
5411
  [mediaQueryS]: {
5332
5412
  gridTemplateColumns: 'minmax(0px,1fr) auto',
5333
- paddingInlineStart: ref(cssVarPaddingInlineStart, ref(cssVarPaddingInline, spacingMap[width].s)),
5334
- paddingInlineEnd: ref(cssVarPaddingInlineEnd, ref(cssVarPaddingInline, spacingMap[width].s)),
5413
+ paddingInlineStart: ref(cssVarPaddingInlineStart, ref(cssVarPaddingInline$1, spacingMap[width].s)),
5414
+ paddingInlineEnd: ref(cssVarPaddingInlineEnd, ref(cssVarPaddingInline$1, spacingMap[width].s)),
5335
5415
  ...(hasNavigation && { columnGap: ref(spacingStaticMd) }),
5336
5416
  },
5337
5417
  [mediaQueryXXL]: {
5338
- paddingInlineStart: ref(cssVarPaddingInlineStart, ref(cssVarPaddingInline, spacingMap[width].xxl)),
5339
- paddingInlineEnd: ref(cssVarPaddingInlineEnd, ref(cssVarPaddingInline, spacingMap[width].xxl)),
5418
+ paddingInlineStart: ref(cssVarPaddingInlineStart, ref(cssVarPaddingInline$1, spacingMap[width].xxl)),
5419
+ paddingInlineEnd: ref(cssVarPaddingInlineEnd, ref(cssVarPaddingInline$1, spacingMap[width].xxl)),
5340
5420
  },
5341
5421
  },
5342
5422
  nav: {
@@ -5373,15 +5453,15 @@ const getComponentCss$13 = (gradient, hasHeading, hasDescription, hasControlsSlo
5373
5453
  // !important is necessary to override inline styles set by splide library
5374
5454
  ...addImportantToEachRule({
5375
5455
  paddingBlock: '0px',
5376
- paddingInlineStart: ref(cssVarPaddingInlineStart, ref(cssVarPaddingInline, spacingMap[width].base)),
5377
- paddingInlineEnd: ref(cssVarPaddingInlineEnd, ref(cssVarPaddingInline, spacingMap[width].base)),
5456
+ paddingInlineStart: ref(cssVarPaddingInlineStart, ref(cssVarPaddingInline$1, spacingMap[width].base)),
5457
+ paddingInlineEnd: ref(cssVarPaddingInlineEnd, ref(cssVarPaddingInline$1, spacingMap[width].base)),
5378
5458
  [mediaQueryS]: {
5379
- paddingInlineStart: ref(cssVarPaddingInlineStart, ref(cssVarPaddingInline, spacingMap[width].s)),
5380
- paddingInlineEnd: ref(cssVarPaddingInlineEnd, ref(cssVarPaddingInline, spacingMap[width].s)),
5459
+ paddingInlineStart: ref(cssVarPaddingInlineStart, ref(cssVarPaddingInline$1, spacingMap[width].s)),
5460
+ paddingInlineEnd: ref(cssVarPaddingInlineEnd, ref(cssVarPaddingInline$1, spacingMap[width].s)),
5381
5461
  },
5382
5462
  [mediaQueryXXL]: {
5383
- paddingInlineStart: ref(cssVarPaddingInlineStart, ref(cssVarPaddingInline, spacingMap[width].xxl)),
5384
- paddingInlineEnd: ref(cssVarPaddingInlineEnd, ref(cssVarPaddingInline, spacingMap[width].xxl)),
5463
+ paddingInlineStart: ref(cssVarPaddingInlineStart, ref(cssVarPaddingInline$1, spacingMap[width].xxl)),
5464
+ paddingInlineEnd: ref(cssVarPaddingInlineEnd, ref(cssVarPaddingInline$1, spacingMap[width].xxl)),
5385
5465
  },
5386
5466
  }),
5387
5467
  '&--draggable': {
@@ -5659,8 +5739,20 @@ const getFunctionalComponentLabelAfterStyles = () => {
5659
5739
  const labelAfterStyles = {
5660
5740
  display: 'inline-block',
5661
5741
  verticalAlign: 'top',
5742
+ // The inline-start spacing is applied to the assigned elements via `::slotted(*)` (not to the `<slot>` box or via
5743
+ // `:empty`), so it only exists when the "label-after" slot actually has content — an empty slot renders no margin.
5744
+ // `::slotted()` alone would fail for a slotted `p-popover`, whose `:host` uses `display: contents` (a `contents` box
5745
+ // has no margins). To fix that, we also set `display: inline-block` on the slotted element: since `::slotted()` is a
5746
+ // rule from the *outer* shadow tree, its normal declarations win over the popover's own (inner-tree) normal
5747
+ // `:host { display: contents }` in the shadow-tree cascade — this is a cascade/context precedence, not specificity.
5748
+ // The re-established inline-block box then has something for `margin-inline-start` to apply to.
5749
+ // Note: relies on `p-popover`'s `:host { display: contents }` staying non-`!important`; an inner `!important` would
5750
+ // beat this outer normal declaration. Keeping inline flow (vs. flex/gap) lets label-after follow a wrapped label's
5751
+ // last line. `:host(:has([slot="label-after"]))` would be an alternative but lacks reliable Chrome support for now.
5662
5752
  '&::slotted(*)': {
5663
5753
  ...addImportantToEachRule({
5754
+ display: 'inline-block',
5755
+ verticalAlign: 'top',
5664
5756
  marginInlineStart: ref(spacingStaticXs$1),
5665
5757
  }),
5666
5758
  },
@@ -5814,28 +5906,14 @@ const dialogHostJssStyle = (background) => {
5814
5906
  [cssVarBackgroundColor]: background === 'surface' ? ref(colorSurface) : ref(colorCanvas),
5815
5907
  };
5816
5908
  };
5909
+ // INTENTIONAL DIVERGENCE from `popover-styles.ts` (kept, not aligned — see the mirrored note there):
5910
+ // This dialog stays permanently rendered and collapses its CLOSED state via delayed `visibility: hidden` + `width/height: 0`
5911
+ // (driven by `isVisible`), so `opacity`/`background` fade in BOTH directions with NO `@starting-style`, and an initial
5912
+ // `open=true` computes straight to the visible state (no entry fade on load). `p-popover`/`p-banner` instead use the native
5913
+ // `[popover]` `display: none`/`:popover-open` toggle plus a `@starting-style` entry fade, because those components mimic the
5914
+ // native popover box model. Both share `createTopLayerController` + the Chromium-only `overlay allow-discrete` transition
5915
+ // (`overlayTransitionSupportsQuery`) and the `inert` toggle for tabbability; only the closed-state expression differs.
5817
5916
  const getFunctionalComponentDialogBaseStyles = (isVisible, backdrop = 'blur') => {
5818
- return {
5819
- dialog: {
5820
- ...dialogBackdropResetJssStyle,
5821
- ...getDialogBackdropTransitionJssStyle(isVisible, backdrop),
5822
- },
5823
- };
5824
- };
5825
- const dialogBackdropResetJssStyle = {
5826
- all: 'unset',
5827
- position: 'fixed',
5828
- inset: 0,
5829
- maxWidth: '100dvw',
5830
- maxHeight: '100dvh',
5831
- overflow: 'hidden',
5832
- display: 'block',
5833
- outline: 0, // we always expect a focusable element to be within the dialog
5834
- '&::backdrop': {
5835
- display: 'none', // ua-style (we can't use it atm because it's not animatable in all browsers)
5836
- },
5837
- };
5838
- const getDialogBackdropTransitionJssStyle = (isVisible, backdrop = 'blur') => {
5839
5917
  const isBackdropBlur = backdrop === 'blur';
5840
5918
  const duration = isVisible ? 'long' : 'moderate';
5841
5919
  const easing = isVisible ? 'in' : 'out';
@@ -5843,14 +5921,21 @@ const getDialogBackdropTransitionJssStyle = (isVisible, backdrop = 'blur') => {
5843
5921
  // as soon as all browsers are supporting `allow-discrete`, visibility transition shouldn't be necessary anymore
5844
5922
  const transition = `visibility 0s linear ${delay}, width 0s linear ${delay}, height 0s linear ${delay}, ${getTransition('background-color', duration, easing)}, ${getTransition('-webkit-backdrop-filter', duration, easing)}, ${getTransition('backdrop-filter', duration, easing)}`;
5845
5923
  return {
5846
- zIndex: 9999999, // fallback for fade out stacking until `overlay` + `allow-discrete` is supported in all browsers. It tries to mimic #top-layer positioning hierarchy.
5924
+ all: 'unset',
5925
+ position: 'fixed',
5926
+ inset: 0,
5927
+ maxWidth: '100dvw',
5928
+ maxHeight: '100dvh',
5929
+ overflow: 'hidden',
5930
+ display: 'block',
5931
+ userSelect: 'text', // allows text selection within dialog element (e.g. for copy & paste)
5932
+ outline: 0, // we always expect a focusable element to be within the dialog
5847
5933
  ...(isVisible
5848
5934
  ? {
5849
5935
  width: '100dvw',
5850
5936
  height: '100dvh',
5851
5937
  visibility: 'inherit',
5852
5938
  pointerEvents: 'auto',
5853
- overlay: 'auto',
5854
5939
  background: ref(colorBackdrop),
5855
5940
  ...(isBackdropBlur && {
5856
5941
  WebkitBackdropFilter: ref(blurFrosted),
@@ -5866,7 +5951,6 @@ const getDialogBackdropTransitionJssStyle = (isVisible, backdrop = 'blur') => {
5866
5951
  height: '0px',
5867
5952
  visibility: 'hidden', // element shall not be tabbable with keyboard after fade out transition has finished
5868
5953
  pointerEvents: 'none', // element can't be interacted with mouse
5869
- overlay: 'none',
5870
5954
  background: 'transparent',
5871
5955
  }),
5872
5956
  transition,
@@ -5874,6 +5958,13 @@ const getDialogBackdropTransitionJssStyle = (isVisible, backdrop = 'blur') => {
5874
5958
  ...overlayTransitionSupportsQuery({
5875
5959
  transition: `${transition}, ${getTransition('overlay', duration, easing)} allow-discrete`,
5876
5960
  }),
5961
+ overlay: 'none',
5962
+ '&:modal': {
5963
+ overlay: 'auto',
5964
+ },
5965
+ '&::backdrop': {
5966
+ display: 'none', // reset ua-style (we can't use it atm because it's not animatable in all browsers)
5967
+ },
5877
5968
  };
5878
5969
  };
5879
5970
  const getScrollerJssStyle = (position) => {
@@ -5953,6 +6044,9 @@ const getDialogTransitionJssStyle = (isVisible, slideIn) => {
5953
6044
  };
5954
6045
  const getDialogDismissButtonJssStyle = () => {
5955
6046
  return {
6047
+ // native dismiss button visual (primary variant); positioning + the `invert` filter (renders it light on the
6048
+ // dialog) are applied on top below
6049
+ ...getFCDismissButtonStyles('primary'),
5956
6050
  gridArea: '1/3',
5957
6051
  zIndex: 5, // controls layering + creates new stacking context (prevents content within to be above other dialog areas)
5958
6052
  position: 'sticky',
@@ -7046,7 +7140,7 @@ const getComponentCss$W = (size) => {
7046
7140
  /**
7047
7141
  * @css-variable {"name": "--p-flyout-width", "description": "Width of the flyout.", "defaultValue": "auto"}
7048
7142
  */
7049
- const cssVariableWidth$2 = '--p-flyout-width';
7143
+ const cssVariableWidth$3 = '--p-flyout-width';
7050
7144
  /**
7051
7145
  * @css-variable {"name": "--p-flyout-sticky-top", "description": "@experimental Exposes the header's height as a read-only CSS variable, set automatically by the component. Slotted sticky content can use this value to offset their top position correctly."}
7052
7146
  */
@@ -7077,7 +7171,6 @@ const getComponentCss$V = (isOpen, background, backdrop, position, hasHeader, ha
7077
7171
  ...hostHiddenStyles,
7078
7172
  }),
7079
7173
  },
7080
- ...preventFoucOfNestedElementsStyles,
7081
7174
  slot: {
7082
7175
  ...getSlotJssStyle(),
7083
7176
  '&:not([name])': getSlotMainJssStyle(),
@@ -7100,7 +7193,7 @@ const getComponentCss$V = (isOpen, background, backdrop, position, hasHeader, ha
7100
7193
  '&[name=sub-footer]': getSlotSubFooterJssStyle(),
7101
7194
  }),
7102
7195
  },
7103
- ...getFunctionalComponentDialogBaseStyles(isOpen, backdrop),
7196
+ dialog: getFunctionalComponentDialogBaseStyles(isOpen, backdrop),
7104
7197
  },
7105
7198
  scroller: {
7106
7199
  ...getScrollerJssStyle(isPositionStart ? 'start' : 'end'),
@@ -7129,7 +7222,7 @@ const getComponentCss$V = (isOpen, background, backdrop, position, hasHeader, ha
7129
7222
  },
7130
7223
  }
7131
7224
  : {
7132
- width: ref(cssVariableWidth$2, 'auto'),
7225
+ width: ref(cssVariableWidth$3, 'auto'),
7133
7226
  minWidth: '320px',
7134
7227
  maxWidth: '100vw',
7135
7228
  clipPath: isPositionStart
@@ -7902,7 +7995,7 @@ const getComponentCss$D = (icon, iconSource, variant, hideLabel, hasSlottedAncho
7902
7995
  * @css-variable {"name": "--p-modal-spacing-top", "description": "Spacing of the modal to the top.", "defaultValue": "clamp(16px, 10vh, 192px)"}
7903
7996
  * @css-variable {"name": "--p-modal-spacing-bottom", "description": "Spacing of the modal to the bottom.", "defaultValue": "clamp(16px, 10vh, 192px)"}
7904
7997
  */
7905
- const cssVariableWidth$1 = '--p-modal-width';
7998
+ const cssVariableWidth$2 = '--p-modal-width';
7906
7999
  const cssVariableSpacingTop = '--p-modal-spacing-top'; // TODO: maybe --p-modal-spacing-block-start would be more precise?
7907
8000
  const cssVariableSpacingBottom = '--p-modal-spacing-bottom'; // TODO: maybe --p-modal-spacing-block-end would be more precise?
7908
8001
  /**
@@ -7930,7 +8023,6 @@ const getComponentCss$C = (isOpen, background, backdrop, fullscreen, hasDismissB
7930
8023
  ...hostHiddenStyles,
7931
8024
  }),
7932
8025
  },
7933
- ...preventFoucOfNestedElementsStyles,
7934
8026
  slot: {
7935
8027
  ...getSlotJssStyle(),
7936
8028
  '&:not([name])': getSlotMainJssStyle(),
@@ -7944,7 +8036,7 @@ const getComponentCss$C = (isOpen, background, backdrop, fullscreen, hasDismissB
7944
8036
  '&[name=footer]': getSlotFooterJssStyle(),
7945
8037
  }),
7946
8038
  },
7947
- ...getFunctionalComponentDialogBaseStyles(isOpen, backdrop),
8039
+ dialog: getFunctionalComponentDialogBaseStyles(isOpen, backdrop),
7948
8040
  },
7949
8041
  scroller: getScrollerJssStyle('fullscreen'),
7950
8042
  modal: {
@@ -7962,7 +8054,7 @@ const getComponentCss$C = (isOpen, background, backdrop, fullscreen, hasDismissB
7962
8054
  clipPath: 'none', // fullscreen has square corners, so disable corner clipping
7963
8055
  }
7964
8056
  : {
7965
- width: ref(cssVariableWidth$1, 'auto'),
8057
+ width: ref(cssVariableWidth$2, 'auto'),
7966
8058
  minWidth: '276px', // to be in sync with "Porsche Grid" on viewport = 320px: calc(${gridColumnWidthBase} * 6 + ${gridGap} * 5)
7967
8059
  maxWidth: '1535.5px', // to be in sync with "Porsche Grid" on viewport >= 1920px: `calc(${gridColumnWidthXXL} * 14 + ${gridGap} * 13)`
7968
8060
  placeSelf: 'center',
@@ -7988,11 +8080,11 @@ const getSvgUrl = (model) => {
7988
8080
  /**
7989
8081
  * @css-variable {"name": "--p-model-signature-width", "description": "Overrides the width of the model signature.", "defaultValue": ""}
7990
8082
  */
7991
- const cssVariableWidth = '--p-model-signature-width';
8083
+ const cssVariableWidth$1 = '--p-model-signature-width';
7992
8084
  /**
7993
8085
  * @css-variable {"name": "--p-model-signature-height", "description": "Overrides the height of the model signature.", "defaultValue": "auto"}
7994
8086
  */
7995
- const cssVariableHeight = '--p-model-signature-height';
8087
+ const cssVariableHeight$1 = '--p-model-signature-height';
7996
8088
  /**
7997
8089
  * @css-variable {"name": "--p-model-signature-color", "description": "Overrides the fill color of the model signature. Overrides the `color` property when set.", "defaultValue": ""}
7998
8090
  */
@@ -8015,8 +8107,8 @@ const getComponentCss$B = (model, safeZone, size, color) => {
8015
8107
  maxWidth: '100%',
8016
8108
  maxHeight: '100%',
8017
8109
  // width + height style can't be !important atm to be backwards compatible with e.g. `<p-model-signature size="inherit" style="height: 50px"/>`
8018
- width: ref(cssVariableWidth, isSizeInherit ? 'auto' : `${width}px`),
8019
- height: ref(cssVariableHeight, 'auto'),
8110
+ width: ref(cssVariableWidth$1, isSizeInherit ? 'auto' : `${width}px`),
8111
+ height: ref(cssVariableHeight$1, 'auto'),
8020
8112
  ...addImportantToEachRule({
8021
8113
  mask: `url(${getSvgUrl(model)}) no-repeat left top / contain`,
8022
8114
  aspectRatio: `${width} / ${safeZone ? 36 : height}`, // 36px is the max-height for SVG model signature creation
@@ -8347,97 +8439,216 @@ const getComponentCss$w = (hideLabel, state, isDisabled, isLoading, length, isCo
8347
8439
  });
8348
8440
  };
8349
8441
 
8442
+ // Minimum gap (in px) kept between the panel and the viewport edges. Used both as Floating UI `shift`/`flip` padding
8443
+ // and to inset the panel's default max-width/height (`100dvw/dvh - 2 * POPOVER_SAFE_ZONE`) so it never touches the edge.
8350
8444
  const POPOVER_SAFE_ZONE = 8;
8351
8445
 
8352
- const getComponentCss$v = () => {
8353
- const shadowColor = 'rgba(0,0,0,0.3)';
8354
- return getCss({
8446
+ /**
8447
+ * @css-variable {"name": "--p-popover-w", "description": "Width of the popover.", "defaultValue": "max-content"}
8448
+ */
8449
+ const cssVariableWidth = '--p-popover-w';
8450
+ /**
8451
+ * @css-variable {"name": "--p-popover-h", "description": "Height of the popover.", "defaultValue": "auto"}
8452
+ */
8453
+ const cssVariableHeight = '--p-popover-h';
8454
+ /**
8455
+ * @css-variable {"name": "--p-popover-min-w", "description": "Min width of the popover.", "defaultValue": "0px"}
8456
+ */
8457
+ const cssVariableMinWidth = '--p-popover-min-w';
8458
+ /**
8459
+ * @css-variable {"name": "--p-popover-min-h", "description": "Min height of the popover.", "defaultValue": "auto"}
8460
+ */
8461
+ const cssVariableMinHeight = '--p-popover-min-h';
8462
+ /**
8463
+ * @css-variable {"name": "--p-popover-max-w", "description": "Max width of the popover.", "defaultValue": "min(calc(100dvw - 16px), 48ch)"}
8464
+ */
8465
+ const cssVariableMaxWidth = '--p-popover-max-w';
8466
+ /**
8467
+ * @css-variable {"name": "--p-popover-max-h", "description": "Max height of the popover.", "defaultValue": "calc(100dvh - 16px)"}
8468
+ */
8469
+ const cssVariableMaxHeight = '--p-popover-max-h';
8470
+ /**
8471
+ * @css-variable {"name": "--p-popover-px", "description": "Horizontal padding of the popover. It is recommended to apply an existing Porsche Design System spacing token, e.g. the CSS declaration `--p-popover-px: var(--p-spacing-static-md)`, the Tailwind CSS arbitrary property `[--p-popover-px:var(--spacing-static-md)]` or the equivalent SCSS/JS token.", "defaultValue": "16px"}
8472
+ */
8473
+ const cssVarPaddingInline = '--p-popover-px';
8474
+ /**
8475
+ * @css-variable {"name": "--p-popover-py", "description": "Vertical padding of the popover. It is recommended to apply an existing Porsche Design System spacing token, e.g. the CSS declaration `--p-popover-py: var(--p-spacing-static-sm)`, the Tailwind CSS arbitrary property `[--p-popover-py:var(--spacing-static-sm)]` or the equivalent SCSS/JS token.", "defaultValue": "12px"}
8476
+ */
8477
+ const cssVarPaddingBlock = '--p-popover-py';
8478
+ /**
8479
+ * @css-variable {"name": "--p-popover-radius", "description": "Border radius of the popover. It is recommended to apply an existing Porsche Design System border-radius token, e.g. the CSS declaration `--p-popover-radius: var(--p-radius-lg)`, the Tailwind CSS arbitrary property `[--p-popover-radius:var(--radius-lg)]` or the equivalent SCSS/JS token.", "defaultValue": "12px"}
8480
+ */
8481
+ const cssVarRadius = '--p-popover-radius';
8482
+ const iconInfo = getInlineSVGBackgroundImage(`<path d="M12.5 10v6h-1v-6zm0-2v1h-1V8zM12 4a8 8 0 0 1 0 16 8 8 0 0 1 0-16m0-1c-4.95 0-9 4.05-9 9s4.05 9 9 9 9-4.05 9-9-4.05-9-9-9"/>`);
8483
+ /**
8484
+ * Builds the popover's scoped CSS.
8485
+ * @param isOpen - The effective open state; drives the fade-in/fade-out direction and the `@starting-style` append.
8486
+ * @param isCompact - Reduces padding/spacing and uses smaller radii (mirrors the `compact` prop).
8487
+ * @param skipEntryTransition - Suppresses the `@starting-style` entry fade. Set on the component's first render so an
8488
+ * initially-open popover (`open=true` on page load) appears instantly instead of fading in. Later user-triggered opens
8489
+ * render with this `false`, so they keep the fade-in.
8490
+ * @returns The component CSS string, with a trailing `@starting-style` rule appended while opening (unless skipped).
8491
+ */
8492
+ const getComponentCss$v = (isOpen, isCompact, skipEntryTransition) => {
8493
+ // fade-in on open (via `@starting-style` below), fade-out on close. While closing, the panel keeps `display: grid`
8494
+ // (Chromium via `overlay` + `display` `allow-discrete`; Safari/Firefox via the deferred `hidePopover()`), so
8495
+ // `display: none` only describes the fully-closed terminal state. Tabbability / a11y-tree removal during the fade-out
8496
+ // is handled immediately via the `inert` attribute on the panel (see popover.tsx), so no `visibility` toggle is needed.
8497
+ const duration = 'short';
8498
+ const easing = isOpen ? 'in' : 'out';
8499
+ const transition = getTransition('opacity', duration, easing);
8500
+ const css = getCss({
8355
8501
  '@global': {
8356
- '@keyframes fade-in': {
8357
- from: {
8358
- opacity: 0,
8359
- },
8360
- to: {
8361
- opacity: 1,
8362
- },
8363
- },
8364
8502
  ':host': {
8365
- position: 'relative', // ensures correct reference for floating ui fallback positioning in older browsers
8366
- display: 'inline-block',
8367
- verticalAlign: 'top',
8368
- ...addImportantToEachRule({
8369
- ...hostHiddenStyles,
8370
- }),
8503
+ // `display: contents` so the host box does not participate in visual DOM rendering — the popover mimics the
8504
+ // native `[popover]` element, so the slotted trigger (or default info button) lays out directly in the parent
8505
+ // flow. Enabled by anchoring Floating UI to the assigned trigger element (see `triggerElement` in popover.tsx)
8506
+ // instead of the `<slot>` box, so the slot no longer needs a layout box of its own.
8507
+ display: 'contents',
8508
+ ...addImportantToEachRule(hostHiddenStyles),
8371
8509
  },
8372
- 'slot[name="button"]': {
8510
+ 'slot:not([name]), p': {
8373
8511
  display: 'block',
8374
- },
8375
- ...preventFoucOfNestedElementsStyles,
8376
- p: {
8377
- font: `${ref(fontWeightNormal$1)} ${ref(typescaleSm$1)} / ${ref(leadingNormal$1)} ${ref(fontPorscheNext$1)}`,
8378
- margin: 0,
8512
+ margin: 0, // reset ua-style for paragraphs
8513
+ minWidth: 0, // allow the grid item to shrink below its content size (needed for correct clamping via --p-popover-max-w)
8514
+ minHeight: 0, // allow the grid item to shrink below its content size so overflow scrolls instead of expanding the panel (needed for --p-popover-max-h)
8515
+ maxWidth: 'inherit',
8516
+ maxHeight: 'inherit',
8517
+ boxSizing: 'border-box',
8518
+ padding: `${ref(cssVarPaddingBlock, isCompact ? ref(spacingStaticXs$1) : `calc(12 * ${ref(spacingStatic2Xs)})`)} ${ref(cssVarPaddingInline, isCompact ? ref(spacingStaticSm$1) : ref(spacingStaticMd))}`,
8519
+ overflow: 'hidden auto',
8520
+ overscrollBehaviorY: 'none',
8379
8521
  },
8380
8522
  button: {
8381
8523
  all: 'unset',
8382
- display: 'block',
8524
+ display: 'inline-grid',
8525
+ verticalAlign: 'top',
8383
8526
  font: `${ref(typescaleSm$1)} ${ref(fontPorscheNext$1)}`, // needed for correct width/height definition based on ex-unit
8384
- width: ref(leadingNormal$1), // width needed to improve ssr support
8385
- height: ref(leadingNormal$1), // height needed to improve ssr support
8527
+ width: ref(leadingNormal$1),
8528
+ height: ref(leadingNormal$1),
8386
8529
  borderRadius: ref(radiusFull),
8387
8530
  cursor: 'pointer',
8388
- backgroundColor: ref(colorFrosted),
8531
+ background: ref(colorFrosted),
8389
8532
  transition: getTransition('background-color'),
8390
8533
  WebkitBackdropFilter: ref(blurFrosted),
8391
8534
  backdropFilter: ref(blurFrosted),
8392
8535
  ...hoverMediaQuery({
8393
8536
  '&:hover': {
8394
- backgroundColor: ref(colorFrostedSoft),
8537
+ background: ref(colorFrostedSoft),
8395
8538
  },
8396
8539
  }),
8397
8540
  '&:focus-visible': getFocusBaseStyles(),
8541
+ '&::after': {
8542
+ content: '""',
8543
+ WebkitMask: `${iconInfo} center/contain no-repeat`, // necessary for Sogou browser support :-)
8544
+ mask: `${iconInfo} center/contain no-repeat`,
8545
+ background: ref(colorPrimary),
8546
+ ...forcedColorsMediaQuery({
8547
+ background: 'CanvasText',
8548
+ }),
8549
+ },
8398
8550
  },
8399
8551
  '[popover]': {
8400
8552
  all: 'unset',
8401
- position: 'absolute',
8402
- pointerEvents: 'none',
8403
- filter: `drop-shadow(0 0 16px ${shadowColor})`,
8553
+ position: 'fixed', // matches floating ui's `fixed` strategy; required for correct top-layer positioning in Safari
8554
+ top: 0,
8555
+ left: 0,
8556
+ filter: 'drop-shadow(0 0 16px rgba(0,0,0,.3))',
8404
8557
  backdropFilter: 'drop-shadow(0 0 transparent)', // workaround for Firefox bug not rendering PDS frosted glass correctly when nested inside CSS filter: https://bugzilla.mozilla.org/show_bug.cgi?id=1797051
8405
- animation: `${ref(cssVariableAnimationDuration, ref(durationSm))} fade-in ${ref(easeInOut)} forwards`,
8406
- '&:not(:popover-open)': {
8407
- display: 'none', // ensures popover is not flickering when closed in some situations
8558
+ borderRadius: ref(cssVarRadius, isCompact ? ref(radiusLg) : ref(radiusXl)),
8559
+ // Fallback for engines without CSS relative color syntax (< Chromium 119 / Safari 16.4 / Firefox 128): the
8560
+ // `hsl(from …)` override below would be an invalid value and get dropped, leaving the panel with no background.
8561
+ // The plain `light-dark()` token renders correct white (light) / near-black (dark) as graceful degradation.
8562
+ background: ref(colorCanvas),
8563
+ // Relative color syntax: lightens ONLY the dark scheme (light `#fff` clamps at l=100 → stays white; dark
8564
+ // `l≈1.2%` → `≈15.2%`). Feature-test string kept in sync with `spinner-styles.ts` (one relative-color feature
8565
+ // covers all color functions).
8566
+ '@supports (color: oklch(from red l c h))': {
8567
+ background: `hsl(from ${ref(colorCanvas)} h 0% calc(l + 14))`,
8568
+ },
8569
+ font: `${ref(fontWeightNormal$1)} ${ref(typescaleSm$1)} / ${ref(leadingNormal$1)} ${ref(fontPorscheNext$1)}`,
8570
+ color: ref(colorPrimary),
8571
+ width: ref(cssVariableWidth, 'max-content'),
8572
+ height: ref(cssVariableHeight, 'auto'),
8573
+ minWidth: ref(cssVariableMinWidth, '0px'),
8574
+ minHeight: ref(cssVariableMinHeight, 'auto'),
8575
+ maxWidth: ref(cssVariableMaxWidth, `min(calc(100dvw - ${POPOVER_SAFE_ZONE * 2}px), 48ch)`),
8576
+ maxHeight: ref(cssVariableMaxHeight, `calc(100dvh - ${POPOVER_SAFE_ZONE * 2}px)`),
8577
+ opacity: isOpen ? 1 : 0,
8578
+ transition,
8579
+ // keep the popover on the #top-layer while the fade-out runs (Chromium only; see `overlayTransitionSupportsQuery`)
8580
+ ...overlayTransitionSupportsQuery({
8581
+ transition: `${transition},${getTransition('overlay', duration, easing)} allow-discrete, ${getTransition('display', duration, easing)} allow-discrete`,
8582
+ }),
8583
+ // Unlike `opacity` (driven by the `isOpen` render flag), `overlay` and `display` are toggled via the
8584
+ // `:popover-open` UA state instead of `isOpen`. Both are owned by the browser: they only flip once
8585
+ // `showPopover()` / `hidePopover()` actually promote/remove the element to/from the #top-layer. Driving them
8586
+ // from `isOpen` would desync from that native state — e.g. Safari/Firefox defer `hidePopover()` until the
8587
+ // fade-out ends (see `createTopLayerController`), so `display` must stay `grid` while `:popover-open` is still
8588
+ // truthy; an `isOpen`-based `display: none` would hide the panel instantly and kill the fade. Binding to
8589
+ // `:popover-open` keeps CSS in lockstep with the browser across all engines, while the Chromium-only
8590
+ // `allow-discrete` transition above animates the discrete `overlay`/`display` switch during the fade-out.
8591
+ overlay: 'none',
8592
+ display: 'none',
8593
+ '&:popover-open': {
8594
+ overlay: 'auto',
8595
+ display: 'grid',
8596
+ },
8597
+ ...forcedColorsMediaQuery({
8598
+ outline: '2px solid CanvasText',
8599
+ outlineOffset: '-2px',
8600
+ }),
8601
+ '&::backdrop': {
8602
+ display: 'none', // reset ua-style
8408
8603
  },
8409
8604
  },
8410
8605
  },
8411
- label: getHiddenTextJssStyle(),
8412
- icon: {
8413
- transform: 'translate3d(0,0,0)', // Fixes movement on hover in Safari
8414
- },
8415
8606
  arrow: {
8416
8607
  position: 'absolute',
8417
8608
  width: '24px',
8418
8609
  height: '12px',
8419
8610
  clipPath: 'polygon(50% 0, 100% 110%, 0 110%)',
8420
- background: ref(colorCanvas),
8611
+ background: 'inherit',
8421
8612
  ...forcedColorsMediaQuery({
8422
8613
  background: 'CanvasText',
8423
8614
  }),
8424
8615
  },
8425
- content: {
8426
- maxWidth: `min(calc(100dvw - ${POPOVER_SAFE_ZONE * 2}px), 48ch)`,
8427
- width: 'max-content', // ensures in older browsers correct width
8428
- boxSizing: 'border-box',
8429
- padding: `${ref(spacingStaticSm$1)} ${ref(spacingStaticMd)}`,
8430
- pointerEvents: 'auto',
8431
- borderRadius: ref(radiusXl),
8432
- background: ref(colorCanvas),
8433
- font: `${ref(fontWeightNormal$1)} ${ref(typescaleSm$1)} / ${ref(leadingNormal$1)} ${ref(fontPorscheNext$1)}`,
8434
- color: ref(colorPrimary),
8435
- ...forcedColorsMediaQuery({
8436
- outline: '2px solid CanvasText',
8437
- outlineOffset: '-2px',
8438
- }),
8439
- },
8440
8616
  });
8617
+ // Fade-IN: `@starting-style` supplies the opacity the browser transitions *from* on the first rendered frame, i.e. the
8618
+ // moment the panel leaves `display: none` via `:popover-open` (triggered by `showPopover()`). Without it the panel
8619
+ // snaps to full opacity, because its computed `opacity` is already `1` by the time it is promoted out of `display:
8620
+ // none`. The fade-OUT needs no starting style (a rendered prior state already exists). Appended as raw CSS because the
8621
+ // JSS conditional-rule plugin only supports `@media`/`@supports`/`@container`, not `@starting-style`. Unsupported
8622
+ // engines (< Chromium 117 / Safari 17.5 / Firefox 129) ignore the unknown at-rule and skip the entry fade (graceful
8623
+ // degradation). Formatting mirrors JSS output so the unit-test CSS parser can read it.
8624
+ //
8625
+ // `skipEntryTransition` omits the append on the component's FIRST render, so an initially-open popover (`open=true` on
8626
+ // page load) computes straight to `opacity: 1` and appears instantly instead of fading in. Every later render passes
8627
+ // `false`, so a user-triggered open still fades in normally.
8628
+ //
8629
+ // ALTERNATIVE APPROACH (INTENTIONALLY NOT IMPLEMENTED) — mirror the `dialog-base` (p-modal/p-flyout) pattern and drop `@starting-style`:
8630
+ // Decision: KEEP this divergence (see the mirrored note in `common/dialog-base/dialog-base-styles.ts`). `p-popover`/`p-banner`
8631
+ // mimic the native `[popover]` box model, so they use the native `display: none`/`:popover-open` toggle + `@starting-style`
8632
+ // entry fade rather than the dialog's permanently-rendered `visibility`/`width`/`height` collapse. Both approaches share
8633
+ // `createTopLayerController`, the Chromium-only `overlay allow-discrete` transition (`overlayTransitionSupportsQuery`) and
8634
+ // the `inert` toggle for tabbability; only the closed-state expression differs. The alternative below is documented for
8635
+ // context (and to record its one upside — no entry fade on initial `open=true`), but is deliberately left unimplemented.
8636
+ // • Keep the panel permanently rendered (never `display: none`); collapse the closed state via `visibility: hidden`
8637
+ // + `width/height: 0` instead. Because the element stays rendered, `opacity` fades normally in BOTH directions with
8638
+ // no `@starting-style`, and an initial `open=true` computes straight to `opacity: 1` (appears instantly, no entry
8639
+ // fade) — which fixes the one downside of the current approach (initial `open=true` fades in on page load).
8640
+ // • Caveat: drive `visibility` + `width/height` from the `isOpen` flag with a CLOSE-ONLY delayed transition
8641
+ // (`… 0s linear ${isOpen ? '0s' : motionDurationMap.short}`), NOT from `:popover-open`. `:popover-open` drops
8642
+ // immediately on Chromium (only Safari/FF defer `hidePopover()`), so `:popover-open`-bound dimensions would collapse
8643
+ // to 0 at the START of the Chromium fade-out and clip the panel mid-fade. The delay keeps size/visibility through
8644
+ // the fade and collapses them only afterwards. `:popover-open` then remains solely for `overlay` + the Chromium
8645
+ // `allow-discrete` top-layer retention.
8646
+ // • `visibility: hidden` still occupies layout (can cause scrollbars), which is why it must be paired with
8647
+ // `width/height: 0`. `inert` is still required either way (visibility is delayed, so the panel stays visible/
8648
+ // tabbable during the fade-out).
8649
+ // • Trade-off: removes the `@starting-style` raw-CSS append + the initial-load fade, at the cost of reintroducing the
8650
+ // delayed `visibility` plus delayed `width/height` and tighter coupling to the motion duration.
8651
+ return isOpen && !skipEntryTransition ? `${css}\n@starting-style {\n [popover] {\n opacity: 0;\n }\n}` : css;
8441
8652
  };
8442
8653
 
8443
8654
  const cssVarInternalRadioGroupOptionScaling = '--_p-radio-group-option-a';
@@ -9017,7 +9228,6 @@ const getComponentCss$n = (isOpen, background, hasDismissButton) => {
9017
9228
  ...hostHiddenStyles,
9018
9229
  }),
9019
9230
  },
9020
- ...preventFoucOfNestedElementsStyles,
9021
9231
  slot: {
9022
9232
  ...getSlotJssStyle(),
9023
9233
  '&:not([name])': getSlotMainJssStyle(),
@@ -9026,7 +9236,7 @@ const getComponentCss$n = (isOpen, background, hasDismissButton) => {
9026
9236
  zIndex: 0, // controls layering + creates new stacking context (prevents content within to be above other dialog areas)
9027
9237
  },
9028
9238
  },
9029
- ...getFunctionalComponentDialogBaseStyles(isOpen, 'shading'),
9239
+ dialog: getFunctionalComponentDialogBaseStyles(isOpen, 'shading'),
9030
9240
  },
9031
9241
  scroller: getScrollerJssStyle('fullscreen'),
9032
9242
  sheet: {
@@ -10164,7 +10374,7 @@ const getComponentCss$1 = () => {
10164
10374
  [cssVariablePositionBottomInternal]: ref(cssVariablePositionBottom, '56px'),
10165
10375
  position: 'fixed', // fallback for older browsers without native `popover` support
10166
10376
  inset: `auto ${gridExtendedOffsetBase} ${ref(cssVariablePositionBottomInternal)}`,
10167
- zIndex: TOAST_Z_INDEX, // fallback for older browsers without native `popover` support
10377
+ zIndex: 999999, // fallback for older browsers without native `popover` support
10168
10378
  [getMediaQueryMin('s')]: {
10169
10379
  [cssVariablePositionBottomInternal]: ref(cssVariablePositionBottom, '64px'),
10170
10380
  inset: `auto auto ${ref(cssVariablePositionBottomInternal)} 64px`,
@@ -10263,6 +10473,7 @@ exports.getDividerCss = getComponentCss$$;
10263
10473
  exports.getDrilldownCss = getComponentCss$_;
10264
10474
  exports.getDrilldownItemCss = getComponentCss$Z;
10265
10475
  exports.getDrilldownLinkCss = getComponentCss$Y;
10476
+ exports.getFCDismissButtonStyles = getFCDismissButtonStyles;
10266
10477
  exports.getFieldsetCss = getComponentCss$X;
10267
10478
  exports.getFlagCss = getComponentCss$W;
10268
10479
  exports.getFlyoutCss = getComponentCss$V;