@porsche-design-system/components-react 4.2.0-rc.3 → 4.2.0-rc.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -0
- package/cjs/lib/components/flyout.wrapper.cjs +3 -3
- package/esm/lib/components/flyout.wrapper.d.ts +11 -1
- package/esm/lib/components/flyout.wrapper.mjs +3 -3
- package/package.json +2 -2
- package/ssr/cjs/components/dist/styles/esm/styles-entry.cjs +116 -62
- package/ssr/cjs/components/dist/utils/esm/utils-entry.cjs +139 -21
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/flyout.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/banner.cjs +6 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flyout.cjs +7 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/label.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/modal.cjs +6 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/sheet.cjs +6 -0
- package/ssr/esm/components/dist/styles/esm/styles-entry.mjs +116 -62
- package/ssr/esm/components/dist/utils/esm/utils-entry.mjs +136 -22
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/flyout.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/banner.mjs +7 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flyout.mjs +8 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/label.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/modal.mjs +7 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/sheet.mjs +7 -1
- package/ssr/esm/lib/components/flyout.wrapper.d.ts +11 -1
- package/ssr/esm/lib/dsr-components/banner.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/flyout.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/label.d.ts +2 -2
- package/ssr/esm/lib/dsr-components/modal.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/sheet.d.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -14,6 +14,32 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0),
|
|
|
14
14
|
|
|
15
15
|
## [Unreleased]
|
|
16
16
|
|
|
17
|
+
## [4.2.0-rc.5] - 2026-06-12
|
|
18
|
+
|
|
19
|
+
### Added
|
|
20
|
+
|
|
21
|
+
- `Flyout`: Prop `fullscreen` to stretch the flyout to the full viewport width with squared corners, useful for smaller
|
|
22
|
+
viewports ([#4498](https://github.com/porsche-design-system/porsche-design-system/pull/4498))
|
|
23
|
+
|
|
24
|
+
### Fixed
|
|
25
|
+
|
|
26
|
+
- `Flyout`, `Modal`, `Sheet` ([#4498](https://github.com/porsche-design-system/porsche-design-system/pull/4498)):
|
|
27
|
+
- Nested dialog elements no longer cause rendering issues in Chromium
|
|
28
|
+
- Keep the dialog element on the `#top-layer` during the fade-out animation in Safari and Firefox, so closing
|
|
29
|
+
(especially nested) dialogs no longer drop behind surrounding content
|
|
30
|
+
- `Banner`: Keep the popover on the `#top-layer` during the fade-out animation in Safari and Firefox, so it no longer
|
|
31
|
+
drops behind surrounding content while closing
|
|
32
|
+
([#4498](https://github.com/porsche-design-system/porsche-design-system/pull/4498))
|
|
33
|
+
|
|
34
|
+
## [4.2.0-rc.4] - 2026-06-10
|
|
35
|
+
|
|
36
|
+
### Fixed
|
|
37
|
+
|
|
38
|
+
- `Radio Group`: Prevent clicks on `label-after` slot from bubbling to the host element
|
|
39
|
+
([#4477](https://github.com/porsche-design-system/porsche-design-system/pull/4477))
|
|
40
|
+
- `Flyout`, `Modal`, `Sheet`: Prevent dialog elements from reserving layout space in closed state when placed within a
|
|
41
|
+
new stacking context ([#4494](https://github.com/porsche-design-system/porsche-design-system/pull/4494))
|
|
42
|
+
|
|
17
43
|
## [4.2.0-rc.3] - 2026-06-09
|
|
18
44
|
|
|
19
45
|
### Fixed
|
|
@@ -6,16 +6,16 @@ var react = require('react');
|
|
|
6
6
|
var hooks = require('../../hooks.cjs');
|
|
7
7
|
var utils = require('../../utils.cjs');
|
|
8
8
|
|
|
9
|
-
const PFlyout = /*#__PURE__*/ react.forwardRef(({ aria, backdrop = 'blur', background = 'canvas', disableBackdropClick = false, footerBehavior = 'sticky', onDismiss, onMotionHiddenEnd, onMotionVisibleEnd, open = false, position = 'end', className, ...rest }, ref) => {
|
|
9
|
+
const PFlyout = /*#__PURE__*/ react.forwardRef(({ aria, backdrop = 'blur', background = 'canvas', disableBackdropClick = false, footerBehavior = 'sticky', fullscreen = false, onDismiss, onMotionHiddenEnd, onMotionVisibleEnd, open = false, position = 'end', className, ...rest }, ref) => {
|
|
10
10
|
const elementRef = react.useRef(undefined);
|
|
11
11
|
hooks.useEventCallback(elementRef, 'dismiss', onDismiss);
|
|
12
12
|
hooks.useEventCallback(elementRef, 'motionHiddenEnd', onMotionHiddenEnd);
|
|
13
13
|
hooks.useEventCallback(elementRef, 'motionVisibleEnd', onMotionVisibleEnd);
|
|
14
14
|
const WebComponentTag = hooks.usePrefix('p-flyout');
|
|
15
|
-
const propsToSync = [aria, backdrop, background, disableBackdropClick, footerBehavior, open, position];
|
|
15
|
+
const propsToSync = [aria, backdrop, background, disableBackdropClick, footerBehavior, fullscreen, open, position];
|
|
16
16
|
hooks.useBrowserLayoutEffect(() => {
|
|
17
17
|
const { current } = elementRef;
|
|
18
|
-
['aria', 'backdrop', 'background', 'disableBackdropClick', 'footerBehavior', 'open', 'position'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
18
|
+
['aria', 'backdrop', 'background', 'disableBackdropClick', 'footerBehavior', 'fullscreen', 'open', 'position'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
19
19
|
}, propsToSync);
|
|
20
20
|
const props = {
|
|
21
21
|
...rest,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { BaseProps } from '../../BaseProps';
|
|
2
|
-
import type { SelectedAriaAttributes, FlyoutAriaAttribute, FlyoutBackdrop, FlyoutBackground, FlyoutFooterBehavior, FlyoutMotionHiddenEndEventDetail, FlyoutMotionVisibleEndEventDetail, FlyoutPosition } from '../types';
|
|
2
|
+
import type { SelectedAriaAttributes, FlyoutAriaAttribute, FlyoutBackdrop, FlyoutBackground, FlyoutFooterBehavior, BreakpointCustomizable, FlyoutMotionHiddenEndEventDetail, FlyoutMotionVisibleEndEventDetail, FlyoutPosition } from '../types';
|
|
3
3
|
export type PFlyoutProps = BaseProps & {
|
|
4
4
|
/**
|
|
5
5
|
* Sets ARIA attributes.
|
|
@@ -25,6 +25,11 @@ export type PFlyoutProps = BaseProps & {
|
|
|
25
25
|
* @default 'sticky'
|
|
26
26
|
*/
|
|
27
27
|
footerBehavior?: FlyoutFooterBehavior;
|
|
28
|
+
/**
|
|
29
|
+
* If true the flyout stretches to the full viewport width with squared corners. Useful for smaller viewports where the flyout would otherwise fill the screen but still show rounded corners.
|
|
30
|
+
* @default false
|
|
31
|
+
*/
|
|
32
|
+
fullscreen?: BreakpointCustomizable<boolean>;
|
|
28
33
|
/**
|
|
29
34
|
* Emitted when the component requests to be dismissed.
|
|
30
35
|
*/
|
|
@@ -73,6 +78,11 @@ export declare const PFlyout: import("react").ForwardRefExoticComponent<Omit<imp
|
|
|
73
78
|
* @default 'sticky'
|
|
74
79
|
*/
|
|
75
80
|
footerBehavior?: FlyoutFooterBehavior;
|
|
81
|
+
/**
|
|
82
|
+
* If true the flyout stretches to the full viewport width with squared corners. Useful for smaller viewports where the flyout would otherwise fill the screen but still show rounded corners.
|
|
83
|
+
* @default false
|
|
84
|
+
*/
|
|
85
|
+
fullscreen?: BreakpointCustomizable<boolean>;
|
|
76
86
|
/**
|
|
77
87
|
* Emitted when the component requests to be dismissed.
|
|
78
88
|
*/
|
|
@@ -4,16 +4,16 @@ import { forwardRef, useRef } from 'react';
|
|
|
4
4
|
import { useEventCallback, usePrefix, useBrowserLayoutEffect, useMergedClass } from '../../hooks.mjs';
|
|
5
5
|
import { syncRef } from '../../utils.mjs';
|
|
6
6
|
|
|
7
|
-
const PFlyout = /*#__PURE__*/ forwardRef(({ aria, backdrop = 'blur', background = 'canvas', disableBackdropClick = false, footerBehavior = 'sticky', onDismiss, onMotionHiddenEnd, onMotionVisibleEnd, open = false, position = 'end', className, ...rest }, ref) => {
|
|
7
|
+
const PFlyout = /*#__PURE__*/ forwardRef(({ aria, backdrop = 'blur', background = 'canvas', disableBackdropClick = false, footerBehavior = 'sticky', fullscreen = false, onDismiss, onMotionHiddenEnd, onMotionVisibleEnd, open = false, position = 'end', className, ...rest }, ref) => {
|
|
8
8
|
const elementRef = useRef(undefined);
|
|
9
9
|
useEventCallback(elementRef, 'dismiss', onDismiss);
|
|
10
10
|
useEventCallback(elementRef, 'motionHiddenEnd', onMotionHiddenEnd);
|
|
11
11
|
useEventCallback(elementRef, 'motionVisibleEnd', onMotionVisibleEnd);
|
|
12
12
|
const WebComponentTag = usePrefix('p-flyout');
|
|
13
|
-
const propsToSync = [aria, backdrop, background, disableBackdropClick, footerBehavior, open, position];
|
|
13
|
+
const propsToSync = [aria, backdrop, background, disableBackdropClick, footerBehavior, fullscreen, open, position];
|
|
14
14
|
useBrowserLayoutEffect(() => {
|
|
15
15
|
const { current } = elementRef;
|
|
16
|
-
['aria', 'backdrop', 'background', 'disableBackdropClick', 'footerBehavior', 'open', 'position'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
16
|
+
['aria', 'backdrop', 'background', 'disableBackdropClick', 'footerBehavior', 'fullscreen', 'open', 'position'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
17
17
|
}, propsToSync);
|
|
18
18
|
const props = {
|
|
19
19
|
...rest,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@porsche-design-system/components-react",
|
|
3
|
-
"version": "4.2.0-rc.
|
|
3
|
+
"version": "4.2.0-rc.5",
|
|
4
4
|
"description": "Porsche Design System is a component library designed to help developers create the best experience for software or services distributed by Dr. Ing. h.c. F. Porsche AG.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"porsche",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"url": "https://github.com/porsche-design-system/porsche-design-system"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@porsche-design-system/components-js": "4.2.0-rc.
|
|
24
|
+
"@porsche-design-system/components-js": "4.2.0-rc.5"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"ag-grid-community": ">= 35.0.0 <36.0.0",
|
|
@@ -4132,12 +4132,30 @@ const OPTION_LIST_SAFE_ZONE = 6;
|
|
|
4132
4132
|
|
|
4133
4133
|
const getCDNBaseURL = () => global.PORSCHE_DESIGN_SYSTEM_CDN_URL + "/porsche-design-system";
|
|
4134
4134
|
|
|
4135
|
-
const prefix = `[Porsche Design System v${"4.2.0-rc.
|
|
4135
|
+
const prefix = `[Porsche Design System v${"4.2.0-rc.5"}]` // this part isn't covered by unit tests
|
|
4136
4136
|
;
|
|
4137
4137
|
const consoleError = (...messages) => {
|
|
4138
4138
|
console.error(prefix, ...messages);
|
|
4139
4139
|
};
|
|
4140
4140
|
|
|
4141
|
+
// Single source of truth for the two CSS feature queries behind the "keep on #top-layer during fade-out" capability,
|
|
4142
|
+
// shared by the JS detection (`supportsOverlayTransition`) and the CSS `@supports` wrapper
|
|
4143
|
+
// (`overlayTransitionSupportsQuery`) so the two can never drift.
|
|
4144
|
+
const overlayFeature = 'overlay: auto';
|
|
4145
|
+
const allowDiscreteFeature = 'transition-behavior: allow-discrete';
|
|
4146
|
+
/**
|
|
4147
|
+
* Wraps JSS styles in `@supports (overlay: auto) and (transition-behavior: allow-discrete)`, kept in sync with
|
|
4148
|
+
* `supportsOverlayTransition()`. Use it for styles that should only apply where the dialog/popover can stay on the
|
|
4149
|
+
* `#top-layer` during its fade-out (Chromium); other browsers defer the native hide instead (see
|
|
4150
|
+
* `createTopLayerController`).
|
|
4151
|
+
*
|
|
4152
|
+
* @param {JssStyle} style - The styles to apply only when the `overlay` transition is supported.
|
|
4153
|
+
* @returns {JssStyle} The `@supports`-wrapped styles.
|
|
4154
|
+
*/
|
|
4155
|
+
const overlayTransitionSupportsQuery = (style) => {
|
|
4156
|
+
return { [`@supports (${overlayFeature}) and (${allowDiscreteFeature})`]: style };
|
|
4157
|
+
};
|
|
4158
|
+
|
|
4141
4159
|
const headerSlot = 'header';
|
|
4142
4160
|
const anchorSlot = 'anchor';
|
|
4143
4161
|
|
|
@@ -4685,6 +4703,7 @@ const getComponentCss$18 = (isOpen, position, state, hasDismissButton, hasHeadin
|
|
|
4685
4703
|
})),
|
|
4686
4704
|
left: '50vw',
|
|
4687
4705
|
width: `min(calc(100vw - 2 * ${ref(cssVarInsetX, gridExtendedOffsetBase)}),${ref(cssVarMaxWidth, '100ch')})`,
|
|
4706
|
+
overlay: 'none',
|
|
4688
4707
|
'&:popover-open': {
|
|
4689
4708
|
overlay: 'auto',
|
|
4690
4709
|
},
|
|
@@ -4699,10 +4718,10 @@ const getComponentCss$18 = (isOpen, position, state, hasDismissButton, hasHeadin
|
|
|
4699
4718
|
transform: 'translate3d(-50%,0,0)',
|
|
4700
4719
|
}),
|
|
4701
4720
|
transition,
|
|
4702
|
-
//
|
|
4703
|
-
|
|
4721
|
+
// keep the popover on the #top-layer while the fade-out runs (Chromium only; see `overlayTransitionSupportsQuery`)
|
|
4722
|
+
...overlayTransitionSupportsQuery({
|
|
4704
4723
|
transition: `${transition},${getTransition('overlay', duration, easing)} allow-discrete`,
|
|
4705
|
-
},
|
|
4724
|
+
}),
|
|
4706
4725
|
},
|
|
4707
4726
|
},
|
|
4708
4727
|
}, {
|
|
@@ -5899,15 +5918,20 @@ const getFunctionalComponentRequiredStyles = () => {
|
|
|
5899
5918
|
};
|
|
5900
5919
|
|
|
5901
5920
|
const getFunctionalComponentLabelAfterStyles = () => {
|
|
5921
|
+
const labelAfterStyles = {
|
|
5922
|
+
display: 'inline-block',
|
|
5923
|
+
verticalAlign: 'top',
|
|
5924
|
+
'&::slotted(*)': {
|
|
5925
|
+
...addImportantToEachRule({
|
|
5926
|
+
marginInlineStart: ref(spacingStaticXs),
|
|
5927
|
+
}),
|
|
5928
|
+
},
|
|
5929
|
+
};
|
|
5902
5930
|
return {
|
|
5903
|
-
'slot[name="label-after"]':
|
|
5904
|
-
|
|
5905
|
-
|
|
5906
|
-
|
|
5907
|
-
...addImportantToEachRule({
|
|
5908
|
-
marginInlineStart: ref(spacingStaticXs),
|
|
5909
|
-
}),
|
|
5910
|
-
},
|
|
5931
|
+
'slot[name="label-after"]': labelAfterStyles,
|
|
5932
|
+
'.label-after': {
|
|
5933
|
+
display: labelAfterStyles.display,
|
|
5934
|
+
verticalAlign: labelAfterStyles.verticalAlign,
|
|
5911
5935
|
},
|
|
5912
5936
|
};
|
|
5913
5937
|
};
|
|
@@ -6061,18 +6085,14 @@ const getFunctionalComponentDialogBaseStyles = (isVisible, backdrop = 'blur') =>
|
|
|
6061
6085
|
};
|
|
6062
6086
|
};
|
|
6063
6087
|
const dialogBackdropResetJssStyle = {
|
|
6064
|
-
|
|
6065
|
-
|
|
6066
|
-
|
|
6067
|
-
|
|
6068
|
-
|
|
6069
|
-
|
|
6070
|
-
|
|
6071
|
-
|
|
6072
|
-
maxHeight: '100dvh', // ua-style
|
|
6073
|
-
overflow: 'hidden', // ua-style
|
|
6074
|
-
display: 'block', // ua-style
|
|
6075
|
-
outline: 0, // ua-style (we always expect a focusable element to be within the dialog)
|
|
6088
|
+
all: 'unset',
|
|
6089
|
+
position: 'fixed',
|
|
6090
|
+
inset: 0,
|
|
6091
|
+
maxWidth: '100dvw',
|
|
6092
|
+
maxHeight: '100dvh',
|
|
6093
|
+
overflow: 'hidden',
|
|
6094
|
+
display: 'block',
|
|
6095
|
+
outline: 0, // we always expect a focusable element to be within the dialog
|
|
6076
6096
|
'&::backdrop': {
|
|
6077
6097
|
display: 'none', // ua-style (we can't use it atm because it's not animatable in all browsers)
|
|
6078
6098
|
},
|
|
@@ -6081,14 +6101,18 @@ const getDialogBackdropTransitionJssStyle = (isVisible, backdrop = 'blur') => {
|
|
|
6081
6101
|
const isBackdropBlur = backdrop === 'blur';
|
|
6082
6102
|
const duration = isVisible ? 'long' : 'moderate';
|
|
6083
6103
|
const easing = isVisible ? 'in' : 'out';
|
|
6104
|
+
const delay = ref(cssVariableTransitionDuration, isVisible ? '0s' : motionDurationMap[duration]);
|
|
6084
6105
|
// as soon as all browsers are supporting `allow-discrete`, visibility transition shouldn't be necessary anymore
|
|
6085
|
-
const transition = `visibility 0s linear ${
|
|
6106
|
+
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)}`;
|
|
6086
6107
|
return {
|
|
6087
6108
|
zIndex: 9999999, // fallback for fade out stacking until `overlay` + `allow-discrete` is supported in all browsers. It tries to mimic #top-layer positioning hierarchy.
|
|
6088
6109
|
...(isVisible
|
|
6089
6110
|
? {
|
|
6111
|
+
width: '100dvw',
|
|
6112
|
+
height: '100dvh',
|
|
6090
6113
|
visibility: 'inherit',
|
|
6091
6114
|
pointerEvents: 'auto',
|
|
6115
|
+
overlay: 'auto',
|
|
6092
6116
|
background: ref(colorBackdrop),
|
|
6093
6117
|
...(isBackdropBlur && {
|
|
6094
6118
|
WebkitBackdropFilter: ref(blurFrosted),
|
|
@@ -6096,16 +6120,22 @@ const getDialogBackdropTransitionJssStyle = (isVisible, backdrop = 'blur') => {
|
|
|
6096
6120
|
}),
|
|
6097
6121
|
}
|
|
6098
6122
|
: {
|
|
6123
|
+
// When the dialog lives inside a new stacking context, it is no longer promoted to the #top-layer while closed.
|
|
6124
|
+
// In that case it can reserve additional space and break the surrounding layout, so width and height are collapsed to zero.
|
|
6125
|
+
// A future improvement could use `transition-behavior: allow-discrete` to toggle between `display: none` and `block`,
|
|
6126
|
+
// but browser support is still insufficient and behaves inconsistently in Safari and Firefox.
|
|
6127
|
+
width: '0px',
|
|
6128
|
+
height: '0px',
|
|
6099
6129
|
visibility: 'hidden', // element shall not be tabbable with keyboard after fade out transition has finished
|
|
6100
6130
|
pointerEvents: 'none', // element can't be interacted with mouse
|
|
6131
|
+
overlay: 'none',
|
|
6101
6132
|
background: 'transparent',
|
|
6102
6133
|
}),
|
|
6103
6134
|
transition,
|
|
6104
|
-
//
|
|
6105
|
-
|
|
6106
|
-
'@supports (transition-behavior: allow-discrete)': {
|
|
6135
|
+
// keep the dialog on the #top-layer while the fade-out runs (Chromium only; see `overlayTransitionSupportsQuery`)
|
|
6136
|
+
...overlayTransitionSupportsQuery({
|
|
6107
6137
|
transition: `${transition}, ${getTransition('overlay', duration, easing)} allow-discrete`,
|
|
6108
|
-
},
|
|
6138
|
+
}),
|
|
6109
6139
|
};
|
|
6110
6140
|
};
|
|
6111
6141
|
const getScrollerJssStyle = (position) => {
|
|
@@ -6133,13 +6163,17 @@ const getScrollerJssStyle = (position) => {
|
|
|
6133
6163
|
overscrollBehaviorY: 'none',
|
|
6134
6164
|
// TODO: check if smooth scrolling on iOS is given?
|
|
6135
6165
|
background: background.light,
|
|
6166
|
+
// ensure a translate3d style is always applied on .scroller and .modal/.flyout/.sheet to create a new stacking
|
|
6167
|
+
// context and prevent a Chromium paint bug: when a dialog element is nested inside another (e.g. `p-modal` within
|
|
6168
|
+
// `p-flyout`)
|
|
6169
|
+
transform: 'translate3d(0,0,0)',
|
|
6136
6170
|
};
|
|
6137
6171
|
};
|
|
6138
6172
|
const dialogBorderRadius = ref(radius3Xl);
|
|
6139
6173
|
const dialogPaddingTop = ref(spacingFluidMd$1);
|
|
6140
6174
|
const dialogPaddingBottom = `calc(${dialogBorderRadius} + ${ref(spacingFluidMd$1)})`;
|
|
6141
6175
|
const dialogPaddingInline = ref(spacingFluidLg);
|
|
6142
|
-
const dialogGridJssStyle = (
|
|
6176
|
+
const dialogGridJssStyle = () => {
|
|
6143
6177
|
return {
|
|
6144
6178
|
position: 'relative',
|
|
6145
6179
|
display: 'grid',
|
|
@@ -6148,8 +6182,12 @@ const dialogGridJssStyle = (clipPath = 'none') => {
|
|
|
6148
6182
|
paddingTop: dialogPaddingTop,
|
|
6149
6183
|
paddingBottom: dialogPaddingBottom,
|
|
6150
6184
|
alignContent: 'flex-start',
|
|
6185
|
+
// Consumers set their own `clip-path` next to their corner `border-radius` (e.g. `inset(0 round …)`).
|
|
6151
6186
|
// `overflow: clip` can't be used due to a Chromium bug that drops descendant backdrop-filter tiles (e.g. frosted p-tag); `clip-path` clips slotted content to the rounded corners without the faulty paint-containment box while keeping the scroll behavior intact
|
|
6152
|
-
|
|
6187
|
+
// Chromium paint bug: when a dialog element is nested inside another (e.g. `p-modal` within `p-flyout`),
|
|
6188
|
+
// the inner dialog's grid content fails to render. Forcing a new compositing layer via `translate3d`
|
|
6189
|
+
// triggers a repaint and fixes it. Re-check periodically; remove once the upstream Chromium bug is resolved.
|
|
6190
|
+
transform: 'translate3d(0,0,0)',
|
|
6153
6191
|
};
|
|
6154
6192
|
};
|
|
6155
6193
|
const getDialogColorJssStyle = () => {
|
|
@@ -6167,13 +6205,13 @@ const getDialogTransitionJssStyle = (isVisible, slideIn) => {
|
|
|
6167
6205
|
...(isVisible
|
|
6168
6206
|
? {
|
|
6169
6207
|
opacity: 1,
|
|
6170
|
-
transform: '
|
|
6208
|
+
transform: 'translate3d(0,0,0)',
|
|
6171
6209
|
}
|
|
6172
6210
|
: {
|
|
6173
6211
|
opacity: 0,
|
|
6174
|
-
transform: slideIn === '^' ? '
|
|
6212
|
+
transform: slideIn === '^' ? 'translate3d(0,25vh,0)' : `translate3d(${slideIn === '>' ? '-' : ''}100%,0,0)`,
|
|
6175
6213
|
'&:dir(rtl)': {
|
|
6176
|
-
transform: slideIn === '^' ? '
|
|
6214
|
+
transform: slideIn === '^' ? 'translate3d(0,25vh,0)' : `translate3d(${slideIn === '>' ? '' : '-'}100%,0,0)`,
|
|
6177
6215
|
},
|
|
6178
6216
|
}),
|
|
6179
6217
|
transition: `${getTransition('opacity', duration, easing)}, ${getTransition('transform', duration, easing)}`,
|
|
@@ -7284,7 +7322,7 @@ const cssVarRefPaddingBottom$2 = '--ref-p-flyout-pb';
|
|
|
7284
7322
|
* @css-variable {"name": "--ref-p-flyout-px", "description": "Exposes the internally used padding-inline of the Flyout as read only CSS variable. When slotting e.g. a media container, this variable can be used to stretch the element to the full horizontal size of the Flyout."}
|
|
7285
7323
|
*/
|
|
7286
7324
|
const cssVarRefPaddingInline$2 = '--ref-p-flyout-px';
|
|
7287
|
-
const getComponentCss$V = (isOpen, background, backdrop, position, hasHeader, hasFooter, hasSubFooter, footerBehavior) => {
|
|
7325
|
+
const getComponentCss$V = (isOpen, background, backdrop, position, hasHeader, hasFooter, hasSubFooter, footerBehavior, fullscreen) => {
|
|
7288
7326
|
const isPositionStart = position === 'start';
|
|
7289
7327
|
const isFooterFixed = footerBehavior === 'fixed';
|
|
7290
7328
|
return getCss({
|
|
@@ -7335,35 +7373,49 @@ const getComponentCss$V = (isOpen, background, backdrop, position, hasHeader, ha
|
|
|
7335
7373
|
},
|
|
7336
7374
|
},
|
|
7337
7375
|
flyout: {
|
|
7338
|
-
...dialogGridJssStyle(
|
|
7339
|
-
? `inset(0 round 0 ${dialogBorderRadius} ${dialogBorderRadius} 0)` // position 'start': round inline-end (right in LTR) corners only
|
|
7340
|
-
: `inset(0 round ${dialogBorderRadius} 0 0 ${dialogBorderRadius})` // position 'end': round inline-start (left in LTR) corners only
|
|
7341
|
-
),
|
|
7376
|
+
...dialogGridJssStyle(),
|
|
7342
7377
|
...getDialogColorJssStyle(),
|
|
7343
|
-
|
|
7344
|
-
minWidth: '320px',
|
|
7345
|
-
maxWidth: '100vw',
|
|
7346
|
-
// `clip-path` uses physical corners, so mirror for RTL to keep parity with the logical border*Radius below
|
|
7347
|
-
'&:dir(rtl)': {
|
|
7348
|
-
clipPath: isPositionStart
|
|
7349
|
-
? `inset(0 round ${dialogBorderRadius} 0 0 ${dialogBorderRadius})`
|
|
7350
|
-
: `inset(0 round 0 ${dialogBorderRadius} ${dialogBorderRadius} 0)`,
|
|
7351
|
-
},
|
|
7352
|
-
...(isPositionStart
|
|
7378
|
+
...buildResponsiveStyles(fullscreen, (fullscreenValue) => fullscreenValue
|
|
7353
7379
|
? {
|
|
7354
|
-
|
|
7355
|
-
|
|
7356
|
-
|
|
7357
|
-
|
|
7358
|
-
|
|
7380
|
+
// fullscreen spans the whole viewport width, so corners are squared and corner clipping is disabled
|
|
7381
|
+
width: '100dvw',
|
|
7382
|
+
minWidth: 'auto',
|
|
7383
|
+
maxWidth: 'none',
|
|
7384
|
+
borderRadius: 0,
|
|
7385
|
+
clipPath: 'none',
|
|
7386
|
+
// the flyout touches both inline edges, so the inner-side HCM border is no longer needed
|
|
7387
|
+
'&:dir(rtl)': {
|
|
7388
|
+
clipPath: 'none',
|
|
7389
|
+
},
|
|
7359
7390
|
}
|
|
7360
7391
|
: {
|
|
7361
|
-
|
|
7362
|
-
|
|
7363
|
-
|
|
7364
|
-
|
|
7365
|
-
|
|
7366
|
-
|
|
7392
|
+
width: ref(cssVariableWidth$2, 'auto'),
|
|
7393
|
+
minWidth: '320px',
|
|
7394
|
+
maxWidth: '100vw',
|
|
7395
|
+
clipPath: isPositionStart
|
|
7396
|
+
? `inset(0 round 0 ${dialogBorderRadius} ${dialogBorderRadius} 0)` // position 'start': round inline-end (right in LTR) corners only
|
|
7397
|
+
: `inset(0 round ${dialogBorderRadius} 0 0 ${dialogBorderRadius})`, // position 'end': round inline-start (left in LTR) corners only
|
|
7398
|
+
// `clip-path` uses physical corners, so mirror for RTL to keep parity with the logical border*Radius below
|
|
7399
|
+
'&:dir(rtl)': {
|
|
7400
|
+
clipPath: isPositionStart
|
|
7401
|
+
? `inset(0 round ${dialogBorderRadius} 0 0 ${dialogBorderRadius})`
|
|
7402
|
+
: `inset(0 round 0 ${dialogBorderRadius} ${dialogBorderRadius} 0)`,
|
|
7403
|
+
},
|
|
7404
|
+
...(isPositionStart
|
|
7405
|
+
? {
|
|
7406
|
+
borderStartEndRadius: dialogBorderRadius,
|
|
7407
|
+
borderEndEndRadius: dialogBorderRadius,
|
|
7408
|
+
...forcedColorsMediaQuery({
|
|
7409
|
+
borderInlineEnd: '2px solid CanvasText',
|
|
7410
|
+
}),
|
|
7411
|
+
}
|
|
7412
|
+
: {
|
|
7413
|
+
borderStartStartRadius: dialogBorderRadius,
|
|
7414
|
+
borderEndStartRadius: dialogBorderRadius,
|
|
7415
|
+
...forcedColorsMediaQuery({
|
|
7416
|
+
borderInlineStart: '2px solid CanvasText',
|
|
7417
|
+
}),
|
|
7418
|
+
}),
|
|
7367
7419
|
}),
|
|
7368
7420
|
...(isFooterFixed && {
|
|
7369
7421
|
gridTemplateRows: hasHeader ? 'auto 1fr auto' : '1fr',
|
|
@@ -8157,7 +8209,7 @@ const getComponentCss$C = (isOpen, background, backdrop, fullscreen, hasDismissB
|
|
|
8157
8209
|
},
|
|
8158
8210
|
scroller: getScrollerJssStyle('fullscreen'),
|
|
8159
8211
|
modal: {
|
|
8160
|
-
...dialogGridJssStyle(
|
|
8212
|
+
...dialogGridJssStyle(),
|
|
8161
8213
|
...getDialogColorJssStyle(),
|
|
8162
8214
|
...getDialogTransitionJssStyle(isOpen, '^'),
|
|
8163
8215
|
...buildResponsiveStyles(fullscreen, (fullscreenValue) => fullscreenValue
|
|
@@ -8177,6 +8229,7 @@ const getComponentCss$C = (isOpen, background, backdrop, fullscreen, hasDismissB
|
|
|
8177
8229
|
placeSelf: 'center',
|
|
8178
8230
|
margin: `${ref(cssVariableSpacingTop, 'clamp(16px, 10vh, 192px)')} ${gridExtendedOffsetBase} ${ref(cssVariableSpacingBottom, 'clamp(16px, 10vh, 192px)')}`, // horizontal margin is needed to ensure modal is placed on "Porsche Grid" when slotted content is wider than the viewport width
|
|
8179
8231
|
borderRadius: dialogBorderRadius,
|
|
8232
|
+
clipPath: `inset(0 round ${dialogBorderRadius})`, // non-fullscreen has rounded corners, so clip slotted content to them
|
|
8180
8233
|
...forcedColorsMediaQuery({
|
|
8181
8234
|
outline: '2px solid CanvasText',
|
|
8182
8235
|
outlineOffset: '-2px',
|
|
@@ -9229,7 +9282,7 @@ const getComponentCss$n = (isOpen, background, hasDismissButton) => {
|
|
|
9229
9282
|
},
|
|
9230
9283
|
scroller: getScrollerJssStyle('fullscreen'),
|
|
9231
9284
|
sheet: {
|
|
9232
|
-
...dialogGridJssStyle(
|
|
9285
|
+
...dialogGridJssStyle(),
|
|
9233
9286
|
...getDialogColorJssStyle(),
|
|
9234
9287
|
...getDialogTransitionJssStyle(isOpen, '^'),
|
|
9235
9288
|
width: '100%',
|
|
@@ -9237,6 +9290,7 @@ const getComponentCss$n = (isOpen, background, hasDismissButton) => {
|
|
|
9237
9290
|
marginBlockStart: ref(spacingFluidLg), // ensures minimal space at the top to visualize paper sheet like border top radius in case sheet becomes scrollable
|
|
9238
9291
|
borderTopLeftRadius: dialogBorderRadius,
|
|
9239
9292
|
borderTopRightRadius: dialogBorderRadius,
|
|
9293
|
+
clipPath: `inset(0 round ${dialogBorderRadius} ${dialogBorderRadius} 0 0)`, // round top corners only
|
|
9240
9294
|
...forcedColorsMediaQuery({
|
|
9241
9295
|
borderTop: '2px solid CanvasText',
|
|
9242
9296
|
}),
|