@porsche-design-system/components-react 3.26.0 → 3.27.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.
- package/CHANGELOG.md +32 -0
- package/ag-grid/cjs/index.cjs +12 -0
- package/ag-grid/esm/index.d.ts +1 -0
- package/ag-grid/esm/index.mjs +1 -0
- package/ag-grid/package.json +6 -0
- package/cjs/public-api.cjs +1 -0
- package/esm/public-api.d.ts +1 -1
- package/esm/public-api.mjs +1 -1
- package/package.json +10 -6
- package/ssr/cjs/components/dist/styles/esm/styles-entry.cjs +40 -140
- package/ssr/cjs/components/dist/utils/esm/utils-entry.cjs +7 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/popover.cjs +9 -6
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/public-api.cjs +1 -0
- package/ssr/esm/components/dist/styles/esm/styles-entry.mjs +40 -140
- package/ssr/esm/components/dist/utils/esm/utils-entry.mjs +7 -5
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/popover.mjs +9 -6
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/public-api.mjs +1 -1
- package/ssr/esm/lib/dsr-components/popover.d.ts +3 -3
- package/ssr/esm/public-api.d.ts +1 -1
- package/ag-grid/theme.css +0 -8425
package/CHANGELOG.md
CHANGED
|
@@ -14,6 +14,38 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0),
|
|
|
14
14
|
|
|
15
15
|
### [Unreleased]
|
|
16
16
|
|
|
17
|
+
### [3.27.0-rc.1] - 2025-02-17
|
|
18
|
+
|
|
19
|
+
#### Changed
|
|
20
|
+
|
|
21
|
+
- **Breaking Change** `AG Grid`: Updated from v32 to v33, which introduced a new Theming API. AG Grid migrated from a
|
|
22
|
+
CSS-based theming approach to a JavaScript object-based theming system. As a result, our custom theme also had to be
|
|
23
|
+
adjusted accordingly. ([#3740](https://github.com/porsche-design-system/porsche-design-system/pull/3740))
|
|
24
|
+
|
|
25
|
+
#### Fixed
|
|
26
|
+
|
|
27
|
+
- Styles: `vanilla-extract` returns `getMediaQueryMax`, `getMediaQueryMin`, `getMediaQueryMinMax` & `getSkeletonStyle`
|
|
28
|
+
in wrong format ([#3753](https://github.com/porsche-design-system/porsche-design-system/pull/3753))
|
|
29
|
+
|
|
30
|
+
### [3.27.0-rc.0] - 2025-02-13
|
|
31
|
+
|
|
32
|
+
#### Added
|
|
33
|
+
|
|
34
|
+
- `@font-face` supports Thai language
|
|
35
|
+
([#3750](https://github.com/porsche-design-system/porsche-design-system/pull/3750))
|
|
36
|
+
- Partials: `getFontLinks` supports preloading `thai` subset
|
|
37
|
+
([#3750](https://github.com/porsche-design-system/porsche-design-system/pull/3750))
|
|
38
|
+
|
|
39
|
+
#### Changed
|
|
40
|
+
|
|
41
|
+
- `Popover`: gets rendered on `#top-layer` which enables it to be shown correctly even when used e.g. within a scroll
|
|
42
|
+
container ([#3732](https://github.com/porsche-design-system/porsche-design-system/pull/3732))
|
|
43
|
+
|
|
44
|
+
#### Removed
|
|
45
|
+
|
|
46
|
+
- `Popover`: default styling for slotted anchors
|
|
47
|
+
([#3732](https://github.com/porsche-design-system/porsche-design-system/pull/3732))
|
|
48
|
+
|
|
17
49
|
### [3.26.0] - 2025-02-07
|
|
18
50
|
|
|
19
51
|
### [3.26.0-rc.0] - 2025-02-06
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var agGrid = require('@porsche-design-system/components-js/ag-grid');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Object.keys(agGrid).forEach(function (k) {
|
|
8
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () { return agGrid[k]; }
|
|
11
|
+
});
|
|
12
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@porsche-design-system/components-js/ag-grid';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@porsche-design-system/components-js/ag-grid';
|
package/cjs/public-api.cjs
CHANGED
|
@@ -159,6 +159,7 @@ exports.PTextarea = textarea_wrapper.PTextarea;
|
|
|
159
159
|
exports.PTextareaWrapper = textareaWrapper_wrapper.PTextareaWrapper;
|
|
160
160
|
exports.PToast = toast_wrapper.PToast;
|
|
161
161
|
exports.PWordmark = wordmark_wrapper.PWordmark;
|
|
162
|
+
exports.PorscheDesignSystemContext = provider.PorscheDesignSystemContext;
|
|
162
163
|
exports.PorscheDesignSystemProvider = provider.PorscheDesignSystemProvider;
|
|
163
164
|
exports.skipCheckForPorscheDesignSystemProviderDuringTests = hooks.skipCheckForPorscheDesignSystemProviderDuringTests;
|
|
164
165
|
exports.useToastManager = hooks.useToastManager;
|
package/esm/public-api.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { componentsReady } from '@porsche-design-system/components-js';
|
|
2
2
|
export * from './lib/components';
|
|
3
3
|
export * from './lib/types';
|
|
4
|
-
export { PorscheDesignSystemProvider } from './provider';
|
|
4
|
+
export { PorscheDesignSystemProvider, PorscheDesignSystemContext } from './provider';
|
|
5
5
|
export { skipCheckForPorscheDesignSystemProviderDuringTests, useToastManager } from './hooks';
|
|
6
6
|
export { skipPorscheDesignSystemCDNRequestsDuringTests } from './utils';
|
package/esm/public-api.mjs
CHANGED
|
@@ -73,6 +73,6 @@ export { PTextarea } from './lib/components/textarea.wrapper.mjs';
|
|
|
73
73
|
export { PTextareaWrapper } from './lib/components/textarea-wrapper.wrapper.mjs';
|
|
74
74
|
export { PToast } from './lib/components/toast.wrapper.mjs';
|
|
75
75
|
export { PWordmark } from './lib/components/wordmark.wrapper.mjs';
|
|
76
|
-
export { PorscheDesignSystemProvider } from './provider.mjs';
|
|
76
|
+
export { PorscheDesignSystemContext, PorscheDesignSystemProvider } from './provider.mjs';
|
|
77
77
|
export { skipCheckForPorscheDesignSystemProviderDuringTests, useToastManager } from './hooks.mjs';
|
|
78
78
|
export { skipPorscheDesignSystemCDNRequestsDuringTests } from './utils.mjs';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@porsche-design-system/components-react",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.27.0-rc.1",
|
|
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",
|
|
@@ -17,12 +17,12 @@
|
|
|
17
17
|
"license": "SEE LICENSE IN LICENSE",
|
|
18
18
|
"homepage": "https://designsystem.porsche.com",
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@porsche-design-system/components-js": "3.
|
|
20
|
+
"@porsche-design-system/components-js": "3.27.0-rc.1"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
|
-
"ag-grid-community": ">=
|
|
24
|
-
"ag-grid-enterprise": ">=
|
|
25
|
-
"ag-grid-react": ">=
|
|
23
|
+
"ag-grid-community": ">= 33.0.0 <34.0.0",
|
|
24
|
+
"ag-grid-enterprise": ">= 33.0.0 <34.0.0",
|
|
25
|
+
"ag-grid-react": ">= 33.0.0 <34.0.0",
|
|
26
26
|
"react": ">=19.0.0 <20.0.0",
|
|
27
27
|
"react-dom": ">=19.0.0 <20.0.0"
|
|
28
28
|
},
|
|
@@ -75,7 +75,11 @@
|
|
|
75
75
|
"import": "./styles/vanilla-extract/esm/vanilla-extract/index.mjs",
|
|
76
76
|
"default": "./styles/vanilla-extract/cjs/vanilla-extract/index.cjs"
|
|
77
77
|
},
|
|
78
|
-
"./ag-grid
|
|
78
|
+
"./ag-grid": {
|
|
79
|
+
"types": "./ag-grid/esm/index.d.ts",
|
|
80
|
+
"import": "./ag-grid/esm/index.mjs",
|
|
81
|
+
"default": "./ag-grid/cjs/index.cjs"
|
|
82
|
+
},
|
|
79
83
|
"./testing": {
|
|
80
84
|
"types": "./testing/index.d.ts",
|
|
81
85
|
"default": "./testing/index.cjs"
|
|
@@ -129,7 +129,7 @@ function createRule(name, decl, options) {
|
|
|
129
129
|
return null;
|
|
130
130
|
}
|
|
131
131
|
|
|
132
|
-
var join
|
|
132
|
+
var join = function join(value, by) {
|
|
133
133
|
var result = '';
|
|
134
134
|
|
|
135
135
|
for (var i = 0; i < value.length; i++) {
|
|
@@ -159,9 +159,9 @@ var toCssValue = function toCssValue(value) {
|
|
|
159
159
|
for (var i = 0; i < value.length; i++) {
|
|
160
160
|
if (value[i] === '!important') break;
|
|
161
161
|
if (cssValue) cssValue += ', ';
|
|
162
|
-
cssValue += join
|
|
162
|
+
cssValue += join(value[i], ' ');
|
|
163
163
|
}
|
|
164
|
-
} else cssValue = join
|
|
164
|
+
} else cssValue = join(value, ', '); // Add !important, because it was ignored.
|
|
165
165
|
|
|
166
166
|
|
|
167
167
|
if (value[value.length - 1] === '!important') {
|
|
@@ -4087,7 +4087,6 @@ const getComponentCss$1a = (size, compact, open, theme, sticky) => {
|
|
|
4087
4087
|
};
|
|
4088
4088
|
|
|
4089
4089
|
const TOAST_Z_INDEX = 999999;
|
|
4090
|
-
const POPOVER_Z_INDEX = 9999;
|
|
4091
4090
|
const BANNER_Z_INDEX = 99;
|
|
4092
4091
|
|
|
4093
4092
|
const getBannerPopoverResetStyles = () => {
|
|
@@ -8858,116 +8857,20 @@ const getComponentCss$y = (hideLabel, state, isDisabled, isLoading, length, them
|
|
|
8858
8857
|
});
|
|
8859
8858
|
};
|
|
8860
8859
|
|
|
8861
|
-
const
|
|
8860
|
+
const POPOVER_SAFE_ZONE = 8;
|
|
8862
8861
|
|
|
8863
|
-
const {
|
|
8864
|
-
const
|
|
8865
|
-
top: {
|
|
8866
|
-
bottom: '100%',
|
|
8867
|
-
left: '50%',
|
|
8868
|
-
transform: 'translate3d(-50%, 0, 0)', // translate3d used to fix Safari shadow bug
|
|
8869
|
-
},
|
|
8870
|
-
right: {
|
|
8871
|
-
top: '50%',
|
|
8872
|
-
left: '100%',
|
|
8873
|
-
transform: 'translate3d(0, -50%, 0)',
|
|
8874
|
-
},
|
|
8875
|
-
bottom: {
|
|
8876
|
-
top: '100%',
|
|
8877
|
-
left: '50%',
|
|
8878
|
-
transform: 'translate3d(-50%, 0, 0)',
|
|
8879
|
-
},
|
|
8880
|
-
left: {
|
|
8881
|
-
top: '50%',
|
|
8882
|
-
right: '100%',
|
|
8883
|
-
transform: 'translate3d(0, -50%, 0)',
|
|
8884
|
-
},
|
|
8885
|
-
};
|
|
8886
|
-
const borderWidth = '12px';
|
|
8887
|
-
const transparentColor = 'transparent';
|
|
8888
|
-
const join = (...arr) => arr.join(' ');
|
|
8889
|
-
const getDirectionArrowMap = (theme) => {
|
|
8890
|
-
const { backgroundColor, backgroundSurfaceColor } = getThemedColors(theme);
|
|
8891
|
-
const { backgroundSurfaceColor: backgroundSurfaceColorDark } = getThemedColors('dark');
|
|
8892
|
-
const isDark = isThemeDark(theme);
|
|
8893
|
-
return {
|
|
8894
|
-
top: {
|
|
8895
|
-
top: 0,
|
|
8896
|
-
left: '50%',
|
|
8897
|
-
transform: 'translateX(-50%)',
|
|
8898
|
-
borderWidth: join(borderWidth, borderWidth, 0),
|
|
8899
|
-
...(isHighContrastMode
|
|
8900
|
-
? {
|
|
8901
|
-
borderColor: join(canvasTextColor, canvasColor, canvasColor),
|
|
8902
|
-
}
|
|
8903
|
-
: {
|
|
8904
|
-
borderColor: join(isDark ? backgroundSurfaceColor : backgroundColor, transparentColor, transparentColor),
|
|
8905
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8906
|
-
borderColor: join(backgroundSurfaceColorDark, transparentColor, transparentColor),
|
|
8907
|
-
}),
|
|
8908
|
-
}),
|
|
8909
|
-
},
|
|
8910
|
-
right: {
|
|
8911
|
-
top: '50%',
|
|
8912
|
-
right: 0,
|
|
8913
|
-
transform: 'translateY(-50%)',
|
|
8914
|
-
borderWidth: join(borderWidth, borderWidth, borderWidth, 0),
|
|
8915
|
-
...(isHighContrastMode
|
|
8916
|
-
? {
|
|
8917
|
-
borderColor: join(canvasColor, canvasTextColor, canvasColor, canvasColor),
|
|
8918
|
-
}
|
|
8919
|
-
: {
|
|
8920
|
-
borderColor: join(transparentColor, isDark ? backgroundSurfaceColor : backgroundColor, transparentColor, transparentColor),
|
|
8921
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8922
|
-
borderColor: join(transparentColor, backgroundSurfaceColorDark, transparentColor, transparentColor),
|
|
8923
|
-
}),
|
|
8924
|
-
}),
|
|
8925
|
-
},
|
|
8926
|
-
bottom: {
|
|
8927
|
-
bottom: 0,
|
|
8928
|
-
left: '50%',
|
|
8929
|
-
transform: 'translateX(-50%)',
|
|
8930
|
-
borderWidth: join(0, borderWidth, borderWidth),
|
|
8931
|
-
...(isHighContrastMode
|
|
8932
|
-
? {
|
|
8933
|
-
borderColor: join(canvasColor, canvasColor, canvasTextColor),
|
|
8934
|
-
}
|
|
8935
|
-
: {
|
|
8936
|
-
borderColor: join(transparentColor, transparentColor, isDark ? backgroundSurfaceColor : backgroundColor),
|
|
8937
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8938
|
-
borderColor: join(transparentColor, transparentColor, backgroundSurfaceColorDark),
|
|
8939
|
-
}),
|
|
8940
|
-
}),
|
|
8941
|
-
},
|
|
8942
|
-
left: {
|
|
8943
|
-
top: '50%',
|
|
8944
|
-
left: 0,
|
|
8945
|
-
transform: 'translateY(-50%)',
|
|
8946
|
-
borderWidth: join(borderWidth, 0, borderWidth, borderWidth),
|
|
8947
|
-
...(isHighContrastMode
|
|
8948
|
-
? {
|
|
8949
|
-
borderColor: join(canvasColor, canvasColor, canvasColor, canvasTextColor),
|
|
8950
|
-
}
|
|
8951
|
-
: {
|
|
8952
|
-
borderColor: join(transparentColor, transparentColor, transparentColor, isDark ? backgroundSurfaceColor : backgroundColor),
|
|
8953
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8954
|
-
borderColor: join(transparentColor, transparentColor, transparentColor, backgroundSurfaceColorDark),
|
|
8955
|
-
}),
|
|
8956
|
-
}),
|
|
8957
|
-
},
|
|
8958
|
-
};
|
|
8959
|
-
};
|
|
8960
|
-
const getComponentCss$x = (direction, isNativePopoverCase, theme) => {
|
|
8862
|
+
const { canvasTextColor } = getHighContrastColors();
|
|
8863
|
+
const getComponentCss$x = (theme) => {
|
|
8961
8864
|
const { hoverColor, backgroundColor, primaryColor, backgroundSurfaceColor } = getThemedColors(theme);
|
|
8962
8865
|
const { hoverColor: hoverColorDark, primaryColor: primaryColorDark, backgroundSurfaceColor: backgroundSurfaceColorDark, } = getThemedColors('dark');
|
|
8963
8866
|
const shadowColor = 'rgba(0,0,0,0.3)';
|
|
8964
8867
|
return getCss({
|
|
8965
8868
|
'@global': {
|
|
8966
8869
|
':host': {
|
|
8870
|
+
position: 'relative', // ensures correct reference for floating ui fallback positioning in older browsers
|
|
8967
8871
|
display: 'inline-block',
|
|
8968
8872
|
verticalAlign: 'top',
|
|
8969
8873
|
...addImportantToEachRule({
|
|
8970
|
-
position: 'relative',
|
|
8971
8874
|
...colorSchemeStyles,
|
|
8972
8875
|
...hostHiddenStyles,
|
|
8973
8876
|
}),
|
|
@@ -8978,18 +8881,13 @@ const getComponentCss$x = (direction, isNativePopoverCase, theme) => {
|
|
|
8978
8881
|
margin: 0,
|
|
8979
8882
|
},
|
|
8980
8883
|
button: {
|
|
8884
|
+
all: 'unset',
|
|
8981
8885
|
display: 'block',
|
|
8982
|
-
|
|
8983
|
-
appearance: 'none',
|
|
8984
|
-
background: 'transparent',
|
|
8985
|
-
border: 0,
|
|
8986
|
-
padding: 0,
|
|
8987
|
-
cursor: 'pointer',
|
|
8988
|
-
...textSmallStyle,
|
|
8886
|
+
font: `${fontSizeTextSmall} ${fontFamily}`, // needed for correct width/height definition based on ex-unit
|
|
8989
8887
|
width: fontLineHeight, // width needed to improve ssr support
|
|
8990
8888
|
height: fontLineHeight, // height needed to improve ssr support
|
|
8991
8889
|
borderRadius: '50%',
|
|
8992
|
-
|
|
8890
|
+
cursor: 'pointer',
|
|
8993
8891
|
...hoverMediaQuery({
|
|
8994
8892
|
transition: getTransition('background-color'),
|
|
8995
8893
|
'&:hover': {
|
|
@@ -9007,47 +8905,49 @@ const getComponentCss$x = (direction, isNativePopoverCase, theme) => {
|
|
|
9007
8905
|
icon: {
|
|
9008
8906
|
transform: 'translate3d(0,0,0)', // Fixes movement on hover in Safari
|
|
9009
8907
|
},
|
|
9010
|
-
|
|
9011
|
-
|
|
9012
|
-
? {
|
|
9013
|
-
...getPopoverResetJssStyle(),
|
|
9014
|
-
}
|
|
9015
|
-
: {
|
|
9016
|
-
inset: `${-safeZonePx}px`,
|
|
9017
|
-
}),
|
|
8908
|
+
popover: {
|
|
8909
|
+
all: 'unset',
|
|
9018
8910
|
position: 'absolute',
|
|
9019
|
-
zIndex: POPOVER_Z_INDEX,
|
|
9020
|
-
filter: `drop-shadow(0 0 16px ${shadowColor})`,
|
|
9021
8911
|
pointerEvents: 'none',
|
|
8912
|
+
filter: `drop-shadow(0 0 16px ${shadowColor})`,
|
|
9022
8913
|
animation: `${motionDurationShort} $fadeIn ${motionEasingBase} forwards`
|
|
9023
8914
|
,
|
|
9024
|
-
'
|
|
9025
|
-
|
|
9026
|
-
|
|
9027
|
-
|
|
9028
|
-
|
|
8915
|
+
'&:not(:popover-open)': {
|
|
8916
|
+
display: 'none', // ensures popover is not flickering when closed in some situations
|
|
8917
|
+
},
|
|
8918
|
+
'&:-internal-popover-in-top-layer::backdrop': {
|
|
8919
|
+
display: 'none',
|
|
9029
8920
|
},
|
|
9030
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
9031
|
-
filter: `drop-shadow(0 0 16px ${shadowColor})`,
|
|
9032
|
-
}),
|
|
9033
8921
|
},
|
|
9034
|
-
|
|
8922
|
+
arrow: {
|
|
9035
8923
|
position: 'absolute',
|
|
9036
|
-
|
|
9037
|
-
|
|
8924
|
+
width: '24px',
|
|
8925
|
+
height: '12px',
|
|
8926
|
+
clipPath: 'polygon(50% 0, 100% 110%, 0 110%)',
|
|
8927
|
+
...(isHighContrastMode
|
|
8928
|
+
? {
|
|
8929
|
+
background: canvasTextColor,
|
|
8930
|
+
}
|
|
8931
|
+
: {
|
|
8932
|
+
background: isThemeDark(theme) ? backgroundSurfaceColor : backgroundColor,
|
|
8933
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8934
|
+
background: backgroundSurfaceColorDark,
|
|
8935
|
+
}),
|
|
8936
|
+
}),
|
|
8937
|
+
},
|
|
8938
|
+
content: {
|
|
8939
|
+
maxWidth: `min(calc(100dvw - ${POPOVER_SAFE_ZONE * 2}px), 48ch)`,
|
|
8940
|
+
width: 'max-content', // ensures in older browsers correct width
|
|
9038
8941
|
boxSizing: 'border-box',
|
|
9039
|
-
|
|
9040
|
-
padding: '8px 16px',
|
|
8942
|
+
padding: `${spacingStaticSmall} ${spacingStaticMedium}`,
|
|
9041
8943
|
pointerEvents: 'auto',
|
|
9042
|
-
...directionPositionMap[direction],
|
|
9043
|
-
...textSmallStyle,
|
|
9044
|
-
listStyleType: 'none',
|
|
9045
|
-
color: primaryColor,
|
|
9046
|
-
whiteSpace: 'inherit',
|
|
9047
8944
|
borderRadius: borderRadiusSmall,
|
|
9048
8945
|
...(isHighContrastMode && {
|
|
9049
8946
|
outline: `1px solid ${canvasTextColor}`,
|
|
9050
8947
|
}),
|
|
8948
|
+
...textSmallStyle,
|
|
8949
|
+
background: isThemeDark(theme) ? backgroundSurfaceColor : backgroundColor,
|
|
8950
|
+
color: primaryColor,
|
|
9051
8951
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
9052
8952
|
background: backgroundSurfaceColorDark,
|
|
9053
8953
|
color: primaryColorDark,
|
|
@@ -129,7 +129,7 @@ function createRule(name, decl, options) {
|
|
|
129
129
|
return null;
|
|
130
130
|
}
|
|
131
131
|
|
|
132
|
-
var join
|
|
132
|
+
var join = function join(value, by) {
|
|
133
133
|
var result = '';
|
|
134
134
|
|
|
135
135
|
for (var i = 0; i < value.length; i++) {
|
|
@@ -159,9 +159,9 @@ var toCssValue = function toCssValue(value) {
|
|
|
159
159
|
for (var i = 0; i < value.length; i++) {
|
|
160
160
|
if (value[i] === '!important') break;
|
|
161
161
|
if (cssValue) cssValue += ', ';
|
|
162
|
-
cssValue += join
|
|
162
|
+
cssValue += join(value[i], ' ');
|
|
163
163
|
}
|
|
164
|
-
} else cssValue = join
|
|
164
|
+
} else cssValue = join(value, ', '); // Add !important, because it was ignored.
|
|
165
165
|
|
|
166
166
|
|
|
167
167
|
if (value[value.length - 1] === '!important') {
|
|
@@ -3541,7 +3541,9 @@ const supportsNativePopover = () => {
|
|
|
3541
3541
|
return Object.prototype.hasOwnProperty.call(HTMLElement.prototype, 'popover');
|
|
3542
3542
|
};
|
|
3543
3543
|
// determine it once
|
|
3544
|
-
supportsNativePopover();
|
|
3544
|
+
const hasNativePopoverSupport = supportsNativePopover();
|
|
3545
|
+
// getter for easy mocking
|
|
3546
|
+
const getHasNativePopoverSupport = () => hasNativePopoverSupport;
|
|
3545
3547
|
|
|
3546
3548
|
const hasDocument = typeof document !== 'undefined';
|
|
3547
3549
|
|
|
@@ -3936,6 +3938,7 @@ exports.getCurrentActivePage = getCurrentActivePage;
|
|
|
3936
3938
|
exports.getDirectChildHTMLElement = getDirectChildHTMLElement;
|
|
3937
3939
|
exports.getDisplayTagType = getDisplayTagType;
|
|
3938
3940
|
exports.getHTMLElement = getHTMLElement;
|
|
3941
|
+
exports.getHasNativePopoverSupport = getHasNativePopoverSupport;
|
|
3939
3942
|
exports.getHeadingTagType = getHeadingTagType;
|
|
3940
3943
|
exports.getHeadlineTagType = getHeadlineTagType;
|
|
3941
3944
|
exports.getIconColor = getIconColor;
|
package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/popover.cjs
CHANGED
|
@@ -7,6 +7,7 @@ var splitChildren = require('../../splitChildren.cjs');
|
|
|
7
7
|
var minifyCss = require('../../minifyCss.cjs');
|
|
8
8
|
var stripFocusAndHoverStyles = require('../../stripFocusAndHoverStyles.cjs');
|
|
9
9
|
var stylesEntry = require('../../../../../../components/dist/styles/esm/styles-entry.cjs');
|
|
10
|
+
var utilsEntry = require('../../../../../../components/dist/utils/esm/utils-entry.cjs');
|
|
10
11
|
var icon_wrapper = require('../components/icon.wrapper.cjs');
|
|
11
12
|
|
|
12
13
|
/**
|
|
@@ -15,16 +16,18 @@ var icon_wrapper = require('../components/icon.wrapper.cjs');
|
|
|
15
16
|
class DSRPopover extends react.Component {
|
|
16
17
|
host;
|
|
17
18
|
open = false;
|
|
18
|
-
spacer;
|
|
19
19
|
popover;
|
|
20
20
|
button;
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
arrow;
|
|
22
|
+
cleanUp;
|
|
23
|
+
hasNativePopoverSupport = utilsEntry.getHasNativePopoverSupport();
|
|
23
24
|
render() {
|
|
24
25
|
splitChildren.splitChildren(this.props.children);
|
|
25
|
-
const style = minifyCss.minifyCss(stripFocusAndHoverStyles.stripFocusAndHoverStyles(stylesEntry.getPopoverCss(this.props.
|
|
26
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open",
|
|
27
|
-
|
|
26
|
+
const style = minifyCss.minifyCss(stripFocusAndHoverStyles.stripFocusAndHoverStyles(stylesEntry.getPopoverCss(this.props.theme).replace(/(:host {[\S\s]+?})[\S\s]+(button {[\S\s]+?})[\S\s]+(.icon {[\S\s]+?})[\S\s]+(.label {[\S\s]+?})[\S\s]+/, '$1\n$2\n$3\n$4')));
|
|
27
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("button", { type: "button", ...utilsEntry.parseAndGetAriaAttributes({
|
|
28
|
+
...utilsEntry.parseAndGetAriaAttributes(this.props.aria),
|
|
29
|
+
...{ 'aria-expanded': this.props.open },
|
|
30
|
+
}), children: [jsxRuntime.jsx(icon_wrapper.PIcon, { className: "icon", name: "information", theme: this.props.theme }), jsxRuntime.jsx("span", { className: "label", children: "More information" })] }), this.props.open && (jsxRuntime.jsxs("div", { className: "popover", popover: "auto", children: [jsxRuntime.jsx("div", { className: "arrow" }), jsxRuntime.jsx("div", { className: "content", children: this.props.description ? jsxRuntime.jsx("p", { children: this.props.description }) : jsxRuntime.jsx("slot", {}) })] }))] })] }), this.props.children] }));
|
|
28
31
|
}
|
|
29
32
|
}
|
|
30
33
|
|
|
@@ -159,6 +159,7 @@ exports.PTextarea = textarea_wrapper.PTextarea;
|
|
|
159
159
|
exports.PTextareaWrapper = textareaWrapper_wrapper.PTextareaWrapper;
|
|
160
160
|
exports.PToast = toast_wrapper.PToast;
|
|
161
161
|
exports.PWordmark = wordmark_wrapper.PWordmark;
|
|
162
|
+
exports.PorscheDesignSystemContext = provider.PorscheDesignSystemContext;
|
|
162
163
|
exports.PorscheDesignSystemProvider = provider.PorscheDesignSystemProvider;
|
|
163
164
|
exports.skipCheckForPorscheDesignSystemProviderDuringTests = hooks.skipCheckForPorscheDesignSystemProviderDuringTests;
|
|
164
165
|
exports.useToastManager = hooks.useToastManager;
|