@porsche-design-system/components-react 3.0.0-alpha.5 → 3.0.0-alpha.6
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 +149 -20
- package/esm/lib/components/accordion.wrapper.js +2 -2
- package/esm/lib/components/banner.wrapper.js +3 -3
- package/esm/lib/components/carousel.wrapper.js +2 -2
- package/esm/lib/components/inline-notification.wrapper.js +3 -3
- package/esm/lib/components/pagination.wrapper.js +2 -2
- package/esm/lib/components/segmented-control.wrapper.js +2 -2
- package/esm/lib/components/stepper-horizontal.wrapper.js +2 -2
- package/esm/lib/components/switch.wrapper.js +2 -2
- package/esm/lib/components/table.wrapper.js +2 -2
- package/esm/lib/components/tabs-bar.wrapper.js +2 -2
- package/esm/lib/components/tabs.wrapper.js +2 -2
- package/lib/components/accordion.wrapper.d.ts +7 -7
- package/lib/components/accordion.wrapper.js +2 -2
- package/lib/components/banner.wrapper.d.ts +18 -2
- package/lib/components/banner.wrapper.js +3 -3
- package/lib/components/carousel.wrapper.d.ts +7 -7
- package/lib/components/carousel.wrapper.js +2 -2
- package/lib/components/inline-notification.wrapper.d.ts +10 -2
- package/lib/components/inline-notification.wrapper.js +3 -3
- package/lib/components/pagination.wrapper.d.ts +9 -9
- package/lib/components/pagination.wrapper.js +2 -2
- package/lib/components/segmented-control.wrapper.d.ts +9 -9
- package/lib/components/segmented-control.wrapper.js +2 -2
- package/lib/components/stepper-horizontal.wrapper.d.ts +9 -9
- package/lib/components/stepper-horizontal.wrapper.js +2 -2
- package/lib/components/switch.wrapper.d.ts +9 -9
- package/lib/components/switch.wrapper.js +2 -2
- package/lib/components/table.wrapper.d.ts +9 -9
- package/lib/components/table.wrapper.js +2 -2
- package/lib/components/tabs-bar.wrapper.d.ts +9 -9
- package/lib/components/tabs-bar.wrapper.js +2 -2
- package/lib/components/tabs.wrapper.d.ts +9 -9
- package/lib/components/tabs.wrapper.js +2 -2
- package/lib/types.d.ts +20 -19
- package/package.json +2 -2
- package/ssr/components/dist/styles/esm/styles-entry.js +76 -84
- package/ssr/components/dist/utils/esm/utils-entry.js +4 -9
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/accordion.wrapper.js +2 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/banner.wrapper.js +4 -4
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/carousel.wrapper.js +2 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/inline-notification.wrapper.js +4 -4
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/pagination.wrapper.js +2 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/segmented-control.wrapper.js +2 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/stepper-horizontal.wrapper.js +2 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/switch.wrapper.js +2 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/table.wrapper.js +2 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/tabs-bar.wrapper.js +2 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/tabs.wrapper.js +2 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/banner.js +5 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button.js +1 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/inline-notification.js +5 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs.js +1 -1
- package/ssr/esm/components/dist/styles/esm/styles-entry.js +76 -84
- package/ssr/esm/components/dist/utils/esm/utils-entry.js +5 -9
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/accordion.wrapper.js +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/banner.wrapper.js +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/carousel.wrapper.js +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/inline-notification.wrapper.js +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/pagination.wrapper.js +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/segmented-control.wrapper.js +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/stepper-horizontal.wrapper.js +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/switch.wrapper.js +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/table.wrapper.js +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/tabs-bar.wrapper.js +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/tabs.wrapper.js +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/banner.js +5 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button.js +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/inline-notification.js +5 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs.js +1 -1
- package/ssr/lib/components/accordion.wrapper.d.ts +7 -7
- package/ssr/lib/components/banner.wrapper.d.ts +18 -2
- package/ssr/lib/components/carousel.wrapper.d.ts +7 -7
- package/ssr/lib/components/inline-notification.wrapper.d.ts +10 -2
- package/ssr/lib/components/pagination.wrapper.d.ts +9 -9
- package/ssr/lib/components/segmented-control.wrapper.d.ts +9 -9
- package/ssr/lib/components/stepper-horizontal.wrapper.d.ts +9 -9
- package/ssr/lib/components/switch.wrapper.d.ts +9 -9
- package/ssr/lib/components/table.wrapper.d.ts +9 -9
- package/ssr/lib/components/tabs-bar.wrapper.d.ts +9 -9
- package/ssr/lib/components/tabs.wrapper.d.ts +9 -9
- package/ssr/lib/dsr-components/banner.d.ts +2 -0
- package/ssr/lib/dsr-components/inline-notification.d.ts +1 -0
- package/ssr/lib/dsr-components/switch.d.ts +0 -3
- package/ssr/lib/types.d.ts +20 -19
|
@@ -15,8 +15,6 @@ hasWindow &&
|
|
|
15
15
|
.forEach((mutation) => { var _a; return (_a = attributeMutationMap.get(mutation.target)) === null || _a === void 0 ? void 0 : _a(); });
|
|
16
16
|
});
|
|
17
17
|
|
|
18
|
-
// TODO: resolve overlap with Breakpoint type from utilities package
|
|
19
|
-
const BREAKPOINTS = ['base', 'xs', 's', 'm', 'l', 'xl'];
|
|
20
18
|
const parseJSON = (prop) => {
|
|
21
19
|
if (typeof prop === 'string') {
|
|
22
20
|
try {
|
|
@@ -233,14 +231,12 @@ const gridNarrowOffset = {
|
|
|
233
231
|
xxl: gridNarrowOffsetXXL,
|
|
234
232
|
};
|
|
235
233
|
|
|
234
|
+
const breakpoints = ['base', 'xs', 's', 'm', 'l', 'xl', 'xxl'];
|
|
235
|
+
|
|
236
236
|
function getMediaQueryMax(max) {
|
|
237
237
|
return `@media(max-width:${breakpoint[max] - 1}px)`;
|
|
238
238
|
}
|
|
239
239
|
|
|
240
|
-
function getMediaQueryMinMax(min, max) {
|
|
241
|
-
return `@media(min-width:${breakpoint[min]}px) and (max-width:${breakpoint[max] - 1}px)`;
|
|
242
|
-
}
|
|
243
|
-
|
|
244
240
|
const spacingStaticXSmall = '4px';
|
|
245
241
|
|
|
246
242
|
const spacingStaticSmall = '8px';
|
|
@@ -309,10 +305,7 @@ const textLargeStyle = {
|
|
|
309
305
|
...fontHyphenationStyle,
|
|
310
306
|
};
|
|
311
307
|
|
|
312
|
-
|
|
313
|
-
const mediaQueries = Object.entries(breakpoint)
|
|
314
|
-
.filter(([key]) => key !== 'xxl')
|
|
315
|
-
.map(([, val]) => `(min-width:${val}px)`);
|
|
308
|
+
const mediaQueries = Object.values(breakpoint).map((v) => `(min-width:${v}px)`);
|
|
316
309
|
hasWindow && window.matchMedia ? mediaQueries.map(window.matchMedia) : [];
|
|
317
310
|
|
|
318
311
|
Object.entries(breakpoint).reduce((result, [key, val]) => (Object.assign(Object.assign({}, result), { [`${val}px`]: key })), {});
|
|
@@ -3954,7 +3947,7 @@ const formatObjectOutput = (value) => {
|
|
|
3954
3947
|
.replace(/^"(.+)"$/, '$1'); // remove wrapping double quotes
|
|
3955
3948
|
};
|
|
3956
3949
|
'value, ' +
|
|
3957
|
-
formatObjectOutput(
|
|
3950
|
+
formatObjectOutput(breakpoints.reduce((prev, key) => (Object.assign(Object.assign({}, prev), { [key + (key !== 'base' ? '?' : '')]: 'value' })), {})).replace(/"/g, '');
|
|
3958
3951
|
|
|
3959
3952
|
const HEADING_TAGS = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
|
|
3960
3953
|
|
|
@@ -4027,35 +4020,6 @@ const getComponentCss$Y = (size, compact, open, theme) => {
|
|
|
4027
4020
|
} }));
|
|
4028
4021
|
};
|
|
4029
4022
|
|
|
4030
|
-
const easeInQuad = 'cubic-bezier(0.45,0,0.55,1)';
|
|
4031
|
-
const easeOutQuad = 'cubic-bezier(0.5,1,0.89,1)';
|
|
4032
|
-
const ANIMATION_DURATION = 600;
|
|
4033
|
-
const getAnimationIn = (keyframesName, durationVar) => {
|
|
4034
|
-
const duration = durationVar ? `var(${durationVar},${ANIMATION_DURATION}ms)` : `${ANIMATION_DURATION}ms`;
|
|
4035
|
-
return {
|
|
4036
|
-
animation: `${duration} $${keyframesName} ${easeInQuad} forwards`,
|
|
4037
|
-
};
|
|
4038
|
-
};
|
|
4039
|
-
const getAnimationOut = (keyframesName) => ({
|
|
4040
|
-
animation: addImportantToRule(`${ANIMATION_DURATION}ms $${keyframesName} ${easeOutQuad} forwards`),
|
|
4041
|
-
});
|
|
4042
|
-
const getKeyframes = (direction, outsideStyle) => {
|
|
4043
|
-
const insideStyle = { opacity: 1, transform: 'translate3d(0,0,0)' };
|
|
4044
|
-
return direction === 'in'
|
|
4045
|
-
? {
|
|
4046
|
-
from: outsideStyle,
|
|
4047
|
-
to: insideStyle,
|
|
4048
|
-
}
|
|
4049
|
-
: {
|
|
4050
|
-
from: insideStyle,
|
|
4051
|
-
to: outsideStyle,
|
|
4052
|
-
};
|
|
4053
|
-
};
|
|
4054
|
-
const getKeyframesMobile = (direction, bottomVar) => getKeyframes(direction, {
|
|
4055
|
-
opacity: 0,
|
|
4056
|
-
transform: `translate3d(0,calc(var(${bottomVar}) + 100%),0)`, // space before and after "+" is crucial
|
|
4057
|
-
});
|
|
4058
|
-
|
|
4059
4023
|
const TOAST_Z_INDEX = 999999;
|
|
4060
4024
|
const MODAL_Z_INDEX = 99999;
|
|
4061
4025
|
const POPOVER_Z_INDEX = 9999;
|
|
@@ -4065,35 +4029,31 @@ const cssVariableTop = '--p-banner-position-top';
|
|
|
4065
4029
|
const cssVariableBottom = '--p-banner-position-bottom';
|
|
4066
4030
|
const cssVariableAnimationDuration = '--p-animation-duration';
|
|
4067
4031
|
const cssVariableZIndex = '--p-internal-banner-z-index';
|
|
4068
|
-
const
|
|
4069
|
-
const
|
|
4070
|
-
const
|
|
4071
|
-
const
|
|
4072
|
-
|
|
4073
|
-
transform: `translate3d(0,calc(-100% - var(${topVar})),0)`, // space before and after "-" is crucial
|
|
4074
|
-
});
|
|
4075
|
-
const getComponentCss$X = () => {
|
|
4032
|
+
const ANIMATION_DURATION$1 = 600;
|
|
4033
|
+
const duration$1 = `var(${cssVariableAnimationDuration},${ANIMATION_DURATION$1}ms)`;
|
|
4034
|
+
const easeInQuad$1 = 'cubic-bezier(0.45,0,0.55,1)';
|
|
4035
|
+
const easeOutQuad$1 = 'cubic-bezier(0.5,1,0.89,1)';
|
|
4036
|
+
const getComponentCss$X = (isOpen) => {
|
|
4076
4037
|
return getCss({
|
|
4077
4038
|
'@global': {
|
|
4078
|
-
':host':
|
|
4079
|
-
|
|
4080
|
-
|
|
4081
|
-
|
|
4082
|
-
|
|
4083
|
-
|
|
4039
|
+
':host': addImportantToEachRule(Object.assign(Object.assign(Object.assign(Object.assign({ [cssVariableTop]: '56px', [cssVariableBottom]: '56px', position: 'fixed', top: 'auto', bottom: `var(${cssVariableBottom})`, left: gridExtendedOffsetBase, right: gridExtendedOffsetBase, margin: 0, padding: 0, width: 'auto', maxWidth: '100%', zIndex: `var(${cssVariableZIndex},${BANNER_Z_INDEX})` }, dropShadowHighStyle), (isOpen
|
|
4040
|
+
? {
|
|
4041
|
+
opacity: 1,
|
|
4042
|
+
visibility: 'inherit',
|
|
4043
|
+
transform: 'translate3d(0,0,0)',
|
|
4044
|
+
transition: `opacity ${duration$1} ${easeInQuad$1}, transform ${duration$1} ${easeInQuad$1}`,
|
|
4045
|
+
}
|
|
4046
|
+
: {
|
|
4047
|
+
opacity: 0,
|
|
4048
|
+
visibility: 'hidden',
|
|
4049
|
+
transform: `translate3d(0,calc(var(${cssVariableBottom}) + 100%),0)`,
|
|
4050
|
+
'&(.hydrated),&(.ssr)': {
|
|
4051
|
+
transition: `visibility 0s linear ${duration$1}, opacity ${duration$1} ${easeOutQuad$1}, transform ${duration$1} ${easeOutQuad$1}`,
|
|
4052
|
+
},
|
|
4053
|
+
})), { [getMediaQueryMin('s')]: Object.assign({ top: `var(${cssVariableTop})`, bottom: 'auto', left: gridExtendedOffsetS, right: gridExtendedOffsetS }, (!isOpen && { transform: `translate3d(0,calc(-100% - var(${cssVariableTop})),0)` })), [getMediaQueryMin('xxl')]: {
|
|
4084
4054
|
left: gridExtendedOffsetXXL,
|
|
4085
4055
|
right: gridExtendedOffsetXXL,
|
|
4086
|
-
} }), hostHiddenStyles))
|
|
4087
|
-
[mediaQueryBaseToS]: getAnimationIn('mobileIn', cssVariableAnimationDuration),
|
|
4088
|
-
[mediaQueryS$1]: getAnimationIn('desktopIn', cssVariableAnimationDuration),
|
|
4089
|
-
}, '&(.banner--close)': {
|
|
4090
|
-
[mediaQueryBaseToS]: getAnimationOut('mobileOut'),
|
|
4091
|
-
[mediaQueryS$1]: getAnimationOut('desktopOut'),
|
|
4092
|
-
} }),
|
|
4093
|
-
'@keyframes mobileIn': getKeyframesMobile('in', cssVariableBottom),
|
|
4094
|
-
'@keyframes mobileOut': getKeyframesMobile('out', cssVariableBottom),
|
|
4095
|
-
'@keyframes desktopIn': getKeyframesDesktop('in', cssVariableTop),
|
|
4096
|
-
'@keyframes desktopOut': getKeyframesDesktop('out', cssVariableTop),
|
|
4056
|
+
} }), hostHiddenStyles)),
|
|
4097
4057
|
},
|
|
4098
4058
|
});
|
|
4099
4059
|
};
|
|
@@ -4390,7 +4350,7 @@ const getComponentCss$T = (icon, iconSource, variant, hideLabel, disabled, loadi
|
|
|
4390
4350
|
backgroundColor,
|
|
4391
4351
|
borderColor,
|
|
4392
4352
|
color: textColor,
|
|
4393
|
-
})), (
|
|
4353
|
+
})), (loading && !isPrimary && frostedGlassStyle)) }, (loading && {
|
|
4394
4354
|
spinner: {
|
|
4395
4355
|
width: fontLineHeight,
|
|
4396
4356
|
height: fontLineHeight,
|
|
@@ -4888,6 +4848,9 @@ const filterDarkContrastLow = toFilter([20, 7, 421, 202, 97, 82]);
|
|
|
4888
4848
|
const filterDarkContrastMedium = toFilter([66, 3, 333, 187, 82, 86]);
|
|
4889
4849
|
const filterDarkContrastHigh = toFilter([68, 6, 108, 187, 104, 88]);
|
|
4890
4850
|
|
|
4851
|
+
const filterLightDisabled = toFilter([63, 8, 108, 188, 94, 86]);
|
|
4852
|
+
const filterDarkDisabled = toFilter([52, 6, 135, 187, 94, 89]);
|
|
4853
|
+
|
|
4891
4854
|
const filterLightNotificationSuccess = toFilter([28, 89, 572, 71, 111, 98]);
|
|
4892
4855
|
const filterLightNotificationWarning = toFilter([58, 53, 820, 12, 112, 103]);
|
|
4893
4856
|
const filterLightNotificationError = toFilter([14, 75, 4140, 347, 100, 97]);
|
|
@@ -4911,7 +4874,7 @@ const sizeMap$2 = {
|
|
|
4911
4874
|
const filter = {
|
|
4912
4875
|
light: {
|
|
4913
4876
|
primary: filterLightPrimary,
|
|
4914
|
-
'state-disabled':
|
|
4877
|
+
'state-disabled': filterLightDisabled,
|
|
4915
4878
|
'contrast-low': filterLightContrastLow,
|
|
4916
4879
|
'contrast-medium': filterLightContrastMedium,
|
|
4917
4880
|
'contrast-high': filterLightContrastHigh,
|
|
@@ -4922,7 +4885,7 @@ const filter = {
|
|
|
4922
4885
|
},
|
|
4923
4886
|
dark: {
|
|
4924
4887
|
primary: filterDarkPrimary,
|
|
4925
|
-
'state-disabled':
|
|
4888
|
+
'state-disabled': filterDarkDisabled,
|
|
4926
4889
|
'contrast-low': filterDarkContrastLow,
|
|
4927
4890
|
'contrast-medium': filterDarkContrastMedium,
|
|
4928
4891
|
'contrast-high': filterDarkContrastHigh,
|
|
@@ -5159,38 +5122,42 @@ const isFullscreenForXl = (fullscreen) => {
|
|
|
5159
5122
|
const entries = Object.entries(fullscreenParsed);
|
|
5160
5123
|
const [lastTrueBreakpoint] = entries.filter(([, val]) => val).pop() || [];
|
|
5161
5124
|
const [lastFalseBreakpoint] = entries.filter(([, val]) => !val).pop() || [];
|
|
5162
|
-
return
|
|
5125
|
+
return breakpoints.indexOf(lastTrueBreakpoint) > breakpoints.indexOf(lastFalseBreakpoint);
|
|
5163
5126
|
}
|
|
5164
5127
|
};
|
|
5165
5128
|
const getSlottedJssStyle = (marginValue, hasHeader, hasDismissButton) => {
|
|
5166
5129
|
const marginPx = `${-marginValue}px`;
|
|
5167
|
-
const marginRem = pxToRemWithUnit(-marginValue);
|
|
5168
5130
|
return Object.assign(Object.assign({ [`&(.${stretchToFullModalWidthClassName})`]: {
|
|
5169
5131
|
width: `calc(100% + ${marginValue * 2}px)`,
|
|
5170
5132
|
margin: `0 ${marginPx}`,
|
|
5171
5133
|
} }, (!hasHeader && {
|
|
5172
5134
|
[`&(.${stretchToFullModalWidthClassName}:first-child)`]: {
|
|
5173
|
-
marginTop: hasDismissButton ?
|
|
5135
|
+
marginTop: hasDismissButton ? pxToRemWithUnit(-marginValue) : marginPx,
|
|
5174
5136
|
},
|
|
5175
5137
|
})), { [`&(.${stretchToFullModalWidthClassName}:last-child)`]: {
|
|
5176
5138
|
marginBottom: marginPx,
|
|
5177
5139
|
} });
|
|
5178
5140
|
};
|
|
5179
|
-
const getComponentCss$x = (
|
|
5180
|
-
const isFullscreenForXlAndXxl = isFullscreenForXl(
|
|
5141
|
+
const getComponentCss$x = (isOpen, isFullscreen, hasDismissButton, hasHeader) => {
|
|
5142
|
+
const isFullscreenForXlAndXxl = isFullscreenForXl(isFullscreen);
|
|
5143
|
+
const duration = isOpen ? '.6s' : '.2s';
|
|
5181
5144
|
return getCss(Object.assign(Object.assign({ '@global': {
|
|
5182
|
-
':host': Object.assign(Object.assign({}, addImportantToEachRule(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ position: 'fixed' }, getInsetJssStyle()), { zIndex: MODAL_Z_INDEX, display: 'flex', alignItems: 'center', justifyContent: 'center', flexWrap: 'wrap' }), (
|
|
5145
|
+
':host': Object.assign(Object.assign({}, addImportantToEachRule(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ position: 'fixed' }, getInsetJssStyle()), { zIndex: MODAL_Z_INDEX, display: 'flex', alignItems: 'center', justifyContent: 'center', flexWrap: 'wrap' }), (isOpen
|
|
5183
5146
|
? {
|
|
5184
|
-
opacity: 1,
|
|
5185
5147
|
visibility: 'inherit',
|
|
5186
5148
|
}
|
|
5187
5149
|
: {
|
|
5188
|
-
opacity: 0,
|
|
5189
5150
|
visibility: 'hidden',
|
|
5151
|
+
transition: 'visibility 0s linear .2s',
|
|
5190
5152
|
})), hostHiddenStyles), {
|
|
5191
5153
|
// workaround via pseudo element to fix stacking (black) background in safari
|
|
5192
|
-
'&::before': Object.assign(Object.assign(Object.assign(Object.assign({ content: '""', position: 'fixed' }, getInsetJssStyle()), { background: themeDarkBackgroundShading
|
|
5193
|
-
|
|
5154
|
+
'&::before': Object.assign(Object.assign(Object.assign(Object.assign({ content: '""', position: 'fixed' }, getInsetJssStyle()), { background: themeDarkBackgroundShading, pointerEvents: 'none' }), (isOpen
|
|
5155
|
+
? Object.assign({ opacity: 1 }, frostedGlassStyle) : {
|
|
5156
|
+
opacity: 0,
|
|
5157
|
+
backdropFilter: 'blur(0px)',
|
|
5158
|
+
WebkitBackdropFilter: 'blur(0px)',
|
|
5159
|
+
})), { transition: `opacity ${duration} ${transitionTimingFunction}, backdrop-filter ${duration} ${transitionTimingFunction},--webkit-backdrop-filter ${duration} ${transitionTimingFunction}` }) }))), { overflowY: 'auto' }),
|
|
5160
|
+
'::slotted': addImportantToEachRule(Object.assign({}, mergeDeep(getSlottedJssStyle(32, hasHeader, hasDismissButton), buildResponsiveStyles(isFullscreen, (fullscreenValue) => ({
|
|
5194
5161
|
[`&(.${stretchToFullModalWidthClassName}`]: {
|
|
5195
5162
|
'&:first-child)': {
|
|
5196
5163
|
borderRadius: fullscreenValue ? 0 : '8px 8px 0 0',
|
|
@@ -5204,19 +5171,20 @@ const getComponentCss$x = (open, fullscreen, hasDismissButton, hasHeader) => {
|
|
|
5204
5171
|
}, root: mergeDeep({
|
|
5205
5172
|
position: 'relative',
|
|
5206
5173
|
boxSizing: 'border-box',
|
|
5207
|
-
|
|
5208
|
-
|
|
5174
|
+
transform: isOpen ? 'scale3d(1,1,1)' : 'scale3d(.9,.9,1)',
|
|
5175
|
+
opacity: isOpen ? 1 : 0,
|
|
5176
|
+
transition: `opacity ${duration} ${transitionTimingFunction},transform ${duration} ${transitionTimingFunction}`,
|
|
5209
5177
|
padding: hasDismissButton ? `${pxToRemWithUnit(32)} 32px 32px 32px` : '32px',
|
|
5210
5178
|
background: backgroundColor,
|
|
5211
5179
|
outline: 0,
|
|
5212
|
-
'&:focus::before': Object.assign({ content: '""', position: 'fixed', border: `${borderWidthBase} solid`, pointerEvents: 'none' }, buildResponsiveStyles(
|
|
5180
|
+
'&:focus::before': Object.assign({ content: '""', position: 'fixed', border: `${borderWidthBase} solid`, pointerEvents: 'none' }, buildResponsiveStyles(isFullscreen, (fullscreenValue) => (Object.assign({ borderRadius: fullscreenValue ? 0 : '12px', borderColor: fullscreenValue ? lightThemePrimaryColor : darkThemePrimaryColor }, getInsetJssStyle(fullscreenValue ? 0 : -4))))),
|
|
5213
5181
|
'&:not(:focus-visible)::before': {
|
|
5214
5182
|
border: 0,
|
|
5215
5183
|
},
|
|
5216
5184
|
[mediaQueryXl]: {
|
|
5217
5185
|
margin: isFullscreenForXlAndXxl ? 0 : `min(192px, 10vh) ${gridExtendedOffsetBase}`,
|
|
5218
5186
|
},
|
|
5219
|
-
}, buildResponsiveStyles(
|
|
5187
|
+
}, buildResponsiveStyles(isFullscreen, getFullscreenJssStyles)) }, (hasHeader && {
|
|
5220
5188
|
header: {
|
|
5221
5189
|
padding: '0 0 8px',
|
|
5222
5190
|
},
|
|
@@ -6336,6 +6304,26 @@ const getComponentCss$3 = (isDisabled, hideLabel, state, hasCounter, theme) => {
|
|
|
6336
6304
|
|
|
6337
6305
|
const cssVariablePositionBottom = '--p-toast-position-bottom'; // CSS custom property exposed as public interface
|
|
6338
6306
|
const cssVariablePositionBottomInternal = '--p-internal-toast-position-bottom';
|
|
6307
|
+
const easeInQuad = 'cubic-bezier(0.45,0,0.55,1)';
|
|
6308
|
+
const easeOutQuad = 'cubic-bezier(0.5,1,0.89,1)';
|
|
6309
|
+
const ANIMATION_DURATION = 600;
|
|
6310
|
+
const duration = `${ANIMATION_DURATION}ms`;
|
|
6311
|
+
const getKeyframes = (direction, outsideStyle) => {
|
|
6312
|
+
const insideStyle = { opacity: 1, transform: 'translate3d(0,0,0)' };
|
|
6313
|
+
return direction === 'in'
|
|
6314
|
+
? {
|
|
6315
|
+
from: outsideStyle,
|
|
6316
|
+
to: insideStyle,
|
|
6317
|
+
}
|
|
6318
|
+
: {
|
|
6319
|
+
from: insideStyle,
|
|
6320
|
+
to: outsideStyle,
|
|
6321
|
+
};
|
|
6322
|
+
};
|
|
6323
|
+
const getKeyframesMobile = (direction, bottomVar) => getKeyframes(direction, {
|
|
6324
|
+
opacity: 0,
|
|
6325
|
+
transform: `translate3d(0,calc(var(${bottomVar}) + 100%),0)`, // space before and after "+" is crucial
|
|
6326
|
+
});
|
|
6339
6327
|
const toastCloseClassName = 'close';
|
|
6340
6328
|
const getComponentCss$1 = () => {
|
|
6341
6329
|
return getCss({
|
|
@@ -6352,8 +6340,12 @@ const getComponentCss$1 = () => {
|
|
|
6352
6340
|
'@keyframes in': getKeyframesMobile('in', cssVariablePositionBottomInternal),
|
|
6353
6341
|
'@keyframes out': getKeyframesMobile('out', cssVariablePositionBottomInternal),
|
|
6354
6342
|
},
|
|
6355
|
-
hydrated:
|
|
6356
|
-
|
|
6343
|
+
hydrated: {
|
|
6344
|
+
animation: `${duration} $in ${easeInQuad} forwards`,
|
|
6345
|
+
},
|
|
6346
|
+
[toastCloseClassName]: {
|
|
6347
|
+
animation: addImportantToRule(`${ANIMATION_DURATION}ms $out ${easeOutQuad} forwards`),
|
|
6348
|
+
},
|
|
6357
6349
|
});
|
|
6358
6350
|
};
|
|
6359
6351
|
|
|
@@ -79,9 +79,6 @@ hasWindow &&
|
|
|
79
79
|
.forEach((mutation) => { var _a; return (_a = attributeMutationMap.get(mutation.target)) === null || _a === void 0 ? void 0 : _a(); });
|
|
80
80
|
});
|
|
81
81
|
|
|
82
|
-
// TODO: resolve overlap with Breakpoint type from utilities package
|
|
83
|
-
const BREAKPOINTS = ['base', 'xs', 's', 'm', 'l', 'xl'];
|
|
84
|
-
|
|
85
82
|
const borderWidthBase = '2px';
|
|
86
83
|
|
|
87
84
|
const themeLightStateFocus = '#1A44EA';
|
|
@@ -133,6 +130,8 @@ function getMediaQueryMin(min) {
|
|
|
133
130
|
return `@media(min-width:${breakpoint[min]}px)`;
|
|
134
131
|
}
|
|
135
132
|
|
|
133
|
+
const breakpoints = ['base', 'xs', 's', 'm', 'l', 'xl', 'xxl'];
|
|
134
|
+
|
|
136
135
|
const _textFontPartA = `${fontStyleNormal} ${fontVariant} ${fontWeightRegular} `;
|
|
137
136
|
const _textFontPartB = `/${fontLineHeight} ${fontFamily}`;
|
|
138
137
|
|
|
@@ -146,10 +145,7 @@ const textSmallStyle = {
|
|
|
146
145
|
...fontHyphenationStyle,
|
|
147
146
|
};
|
|
148
147
|
|
|
149
|
-
|
|
150
|
-
const mediaQueries = Object.entries(breakpoint)
|
|
151
|
-
.filter(([key]) => key !== 'xxl')
|
|
152
|
-
.map(([, val]) => `(min-width:${val}px)`);
|
|
148
|
+
const mediaQueries = Object.values(breakpoint).map((v) => `(min-width:${v}px)`);
|
|
153
149
|
hasWindow && window.matchMedia ? mediaQueries.map(window.matchMedia) : [];
|
|
154
150
|
|
|
155
151
|
Object.entries(breakpoint).reduce((result, [key, val]) => (Object.assign(Object.assign({}, result), { [`${val}px`]: key })), {});
|
|
@@ -3690,7 +3686,7 @@ const formatObjectOutput = (value) => {
|
|
|
3690
3686
|
.replace(/^"(.+)"$/, '$1'); // remove wrapping double quotes
|
|
3691
3687
|
};
|
|
3692
3688
|
'value, ' +
|
|
3693
|
-
formatObjectOutput(
|
|
3689
|
+
formatObjectOutput(breakpoints.reduce((prev, key) => (Object.assign(Object.assign({}, prev), { [key + (key !== 'base' ? '?' : '')]: 'value' })), {})).replace(/"/g, '');
|
|
3694
3690
|
|
|
3695
3691
|
const HEADING_TAGS = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
|
|
3696
3692
|
const resizeMap = new Map();
|
|
@@ -4092,4 +4088,4 @@ const getTextTagType = (host, tag) => {
|
|
|
4092
4088
|
}
|
|
4093
4089
|
};
|
|
4094
4090
|
|
|
4095
|
-
export {
|
|
4091
|
+
export { DISPLAY_TAGS, HEADING_TAGS, HEADLINE_TAGS, TEXT_TAGS, _hasShowPickerSupport, attributeMutationMap, buildCrestSrcSet, buildIconUrl, buildSrcSet, cdnBaseUrl, childrenMutationMap, createPaginationModel, createRange, crestCdnBaseUrl, crestInnerManifest, displaySizeToTagMap, getButtonAriaAttributes, getButtonAttributes, getButtonBaseAriaAttributes, getButtonPureAriaAttributes, getClosestHTMLElement, getContentAriaAttributes, getCurrentActivePage, getDirectChildHTMLElement, getDisplayTagType, getHTMLElement, getHeadingTagType, getHeadlineTagType, getIconColor, getInlineNotificationIconName, getInnerManifest, getLinkButtonThemeForIcon, getRole, getStepperHorizontalIconName, getSvgUrl, getSwitchButtonAriaAttributes, getTextTagType, getThemeForIcon, getTotalPages, hasDocument, hasLocateAction, hasSpecificSlottedTag, hasVisibleIcon, hasWindow, isDisabledOrLoading, isListTypeOrdered, isResizeObserverDefined, isScrollable, isSortable, isStateCompleteOrWarning, isThemeDark, isType, isUrl, isWithinForm, itemTypes, parseAndGetAriaAttributes, parseJSONAttribute, resizeMap, showCustomCalendarOrTimeIndicator, supportsConstructableStylesheets, tempDiv, tempIcon, tempLabel };
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/accordion.wrapper.js
CHANGED
|
@@ -4,10 +4,10 @@ import { useEventCallback, usePrefix, useBrowserLayoutEffect, useMergedClass } f
|
|
|
4
4
|
import { syncRef } from '../../utils.js';
|
|
5
5
|
import { DSRAccordion } from '../dsr-components/accordion.js';
|
|
6
6
|
|
|
7
|
-
const PAccordion = forwardRef(({ compact, heading, onAccordionChange,
|
|
7
|
+
const PAccordion = forwardRef(({ compact, heading, onAccordionChange, onUpdate, open, size = 'small', tag = 'h2', theme = 'light', className, children, ...rest }, ref) => {
|
|
8
8
|
const elementRef = useRef();
|
|
9
9
|
useEventCallback(elementRef, 'accordionChange', onAccordionChange);
|
|
10
|
-
useEventCallback(elementRef, '
|
|
10
|
+
useEventCallback(elementRef, 'update', onUpdate);
|
|
11
11
|
const WebComponentTag = usePrefix('p-accordion');
|
|
12
12
|
const propsToSync = [compact, heading, open, size, tag, theme];
|
|
13
13
|
useBrowserLayoutEffect(() => {
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/banner.wrapper.js
CHANGED
|
@@ -4,14 +4,14 @@ import { useEventCallback, usePrefix, useBrowserLayoutEffect, useMergedClass } f
|
|
|
4
4
|
import { syncRef } from '../../utils.js';
|
|
5
5
|
import { DSRBanner } from '../dsr-components/banner.js';
|
|
6
6
|
|
|
7
|
-
const PBanner = forwardRef(({ description = '', heading = '', onDismiss,
|
|
7
|
+
const PBanner = forwardRef(({ description = '', dismissButton = true, heading = '', onDismiss, open = false, persistent, state = 'info', theme = 'light', width, className, children, ...rest }, ref) => {
|
|
8
8
|
const elementRef = useRef();
|
|
9
9
|
useEventCallback(elementRef, 'dismiss', onDismiss);
|
|
10
10
|
const WebComponentTag = usePrefix('p-banner');
|
|
11
|
-
const propsToSync = [description, heading, persistent, state, theme, width];
|
|
11
|
+
const propsToSync = [description, dismissButton, heading, open, persistent, state, theme, width];
|
|
12
12
|
useBrowserLayoutEffect(() => {
|
|
13
13
|
const { current } = elementRef;
|
|
14
|
-
['description', 'heading', 'persistent', 'state', 'theme', 'width'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
14
|
+
['description', 'dismissButton', 'heading', 'open', 'persistent', 'state', 'theme', 'width'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
15
15
|
}, propsToSync);
|
|
16
16
|
// @ts-ignore
|
|
17
17
|
if (!process.browser) {
|
|
@@ -22,7 +22,7 @@ const PBanner = forwardRef(({ description = '', heading = '', onDismiss, persist
|
|
|
22
22
|
// @ts-ignore
|
|
23
23
|
...(!process.browser
|
|
24
24
|
? {
|
|
25
|
-
children: (jsx(DSRBanner, { ...{ description, heading, persistent, state, theme, width, children } })),
|
|
25
|
+
children: (jsx(DSRBanner, { ...{ description, dismissButton, heading, open, persistent, state, theme, width, children } })),
|
|
26
26
|
}
|
|
27
27
|
: {
|
|
28
28
|
children,
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/carousel.wrapper.js
CHANGED
|
@@ -4,10 +4,10 @@ import { useEventCallback, usePrefix, useBrowserLayoutEffect, useMergedClass } f
|
|
|
4
4
|
import { syncRef } from '../../utils.js';
|
|
5
5
|
import { DSRCarousel } from '../dsr-components/carousel.js';
|
|
6
6
|
|
|
7
|
-
const PCarousel = forwardRef(({ activeSlideIndex = 0, alignHeader = 'left', description, disablePagination, heading, intl, onCarouselChange,
|
|
7
|
+
const PCarousel = forwardRef(({ activeSlideIndex = 0, alignHeader = 'left', description, disablePagination, heading, intl, onCarouselChange, onUpdate, pagination = true, rewind = true, slidesPerPage = 1, theme = 'light', width = 'basic', wrapContent, className, children, ...rest }, ref) => {
|
|
8
8
|
const elementRef = useRef();
|
|
9
9
|
useEventCallback(elementRef, 'carouselChange', onCarouselChange);
|
|
10
|
-
useEventCallback(elementRef, '
|
|
10
|
+
useEventCallback(elementRef, 'update', onUpdate);
|
|
11
11
|
const WebComponentTag = usePrefix('p-carousel');
|
|
12
12
|
const propsToSync = [activeSlideIndex, alignHeader, description, disablePagination, heading, intl, pagination, rewind, slidesPerPage, theme, width, wrapContent];
|
|
13
13
|
useBrowserLayoutEffect(() => {
|
|
@@ -4,15 +4,15 @@ import { useEventCallback, usePrefix, useBrowserLayoutEffect, useMergedClass } f
|
|
|
4
4
|
import { syncRef } from '../../utils.js';
|
|
5
5
|
import { DSRInlineNotification } from '../dsr-components/inline-notification.js';
|
|
6
6
|
|
|
7
|
-
const PInlineNotification = forwardRef(({ actionIcon = 'arrow-right', actionLabel, actionLoading = false, description = '', heading = '', onAction, onDismiss, persistent
|
|
7
|
+
const PInlineNotification = forwardRef(({ actionIcon = 'arrow-right', actionLabel, actionLoading = false, description = '', dismissButton = true, heading = '', onAction, onDismiss, persistent, state = 'info', theme = 'light', className, children, ...rest }, ref) => {
|
|
8
8
|
const elementRef = useRef();
|
|
9
9
|
useEventCallback(elementRef, 'action', onAction);
|
|
10
10
|
useEventCallback(elementRef, 'dismiss', onDismiss);
|
|
11
11
|
const WebComponentTag = usePrefix('p-inline-notification');
|
|
12
|
-
const propsToSync = [actionIcon, actionLabel, actionLoading, description, heading, persistent, state, theme];
|
|
12
|
+
const propsToSync = [actionIcon, actionLabel, actionLoading, description, dismissButton, heading, persistent, state, theme];
|
|
13
13
|
useBrowserLayoutEffect(() => {
|
|
14
14
|
const { current } = elementRef;
|
|
15
|
-
['actionIcon', 'actionLabel', 'actionLoading', 'description', 'heading', 'persistent', 'state', 'theme'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
15
|
+
['actionIcon', 'actionLabel', 'actionLoading', 'description', 'dismissButton', 'heading', 'persistent', 'state', 'theme'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
16
16
|
}, propsToSync);
|
|
17
17
|
// @ts-ignore
|
|
18
18
|
if (!process.browser) {
|
|
@@ -23,7 +23,7 @@ const PInlineNotification = forwardRef(({ actionIcon = 'arrow-right', actionLabe
|
|
|
23
23
|
// @ts-ignore
|
|
24
24
|
...(!process.browser
|
|
25
25
|
? {
|
|
26
|
-
children: (jsx(DSRInlineNotification, { ...{ actionIcon, actionLabel, actionLoading, description, heading, persistent, state, theme, children } })),
|
|
26
|
+
children: (jsx(DSRInlineNotification, { ...{ actionIcon, actionLabel, actionLoading, description, dismissButton, heading, persistent, state, theme, children } })),
|
|
27
27
|
}
|
|
28
28
|
: {
|
|
29
29
|
children,
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/pagination.wrapper.js
CHANGED
|
@@ -4,10 +4,10 @@ import { useEventCallback, usePrefix, useBrowserLayoutEffect, useMergedClass } f
|
|
|
4
4
|
import { syncRef } from '../../utils.js';
|
|
5
5
|
import { DSRPagination } from '../dsr-components/pagination.js';
|
|
6
6
|
|
|
7
|
-
const PPagination = forwardRef(({ activePage = 1, allyLabel, allyLabelNext, allyLabelPage, allyLabelPrev, intl = { root: 'Pagination', prev: 'Previous page', next: 'Next page', page: 'Page', }, itemsPerPage = 1, maxNumberOfPageLinks = { base: 5, xs: 7, },
|
|
7
|
+
const PPagination = forwardRef(({ activePage = 1, allyLabel, allyLabelNext, allyLabelPage, allyLabelPrev, intl = { root: 'Pagination', prev: 'Previous page', next: 'Next page', page: 'Page', }, itemsPerPage = 1, maxNumberOfPageLinks = { base: 5, xs: 7, }, onPageChange, onUpdate, theme = 'light', totalItemsCount = 1, className, ...rest }, ref) => {
|
|
8
8
|
const elementRef = useRef();
|
|
9
|
-
useEventCallback(elementRef, 'change', onChange);
|
|
10
9
|
useEventCallback(elementRef, 'pageChange', onPageChange);
|
|
10
|
+
useEventCallback(elementRef, 'update', onUpdate);
|
|
11
11
|
const WebComponentTag = usePrefix('p-pagination');
|
|
12
12
|
const propsToSync = [activePage, allyLabel, allyLabelNext, allyLabelPage, allyLabelPrev, intl, itemsPerPage, maxNumberOfPageLinks, theme, totalItemsCount];
|
|
13
13
|
useBrowserLayoutEffect(() => {
|
|
@@ -4,10 +4,10 @@ import { useEventCallback, usePrefix, useBrowserLayoutEffect, useMergedClass } f
|
|
|
4
4
|
import { syncRef } from '../../utils.js';
|
|
5
5
|
import { DSRSegmentedControl } from '../dsr-components/segmented-control.js';
|
|
6
6
|
|
|
7
|
-
const PSegmentedControl = forwardRef(({ backgroundColor,
|
|
7
|
+
const PSegmentedControl = forwardRef(({ backgroundColor, onSegmentedControlChange, onUpdate, theme = 'light', value, className, children, ...rest }, ref) => {
|
|
8
8
|
const elementRef = useRef();
|
|
9
|
-
useEventCallback(elementRef, 'change', onChange);
|
|
10
9
|
useEventCallback(elementRef, 'segmentedControlChange', onSegmentedControlChange);
|
|
10
|
+
useEventCallback(elementRef, 'update', onUpdate);
|
|
11
11
|
const WebComponentTag = usePrefix('p-segmented-control');
|
|
12
12
|
const propsToSync = [backgroundColor, theme, value];
|
|
13
13
|
useBrowserLayoutEffect(() => {
|
|
@@ -4,10 +4,10 @@ import { useEventCallback, usePrefix, useBrowserLayoutEffect, useMergedClass } f
|
|
|
4
4
|
import { syncRef } from '../../utils.js';
|
|
5
5
|
import { DSRStepperHorizontal } from '../dsr-components/stepper-horizontal.js';
|
|
6
6
|
|
|
7
|
-
const PStepperHorizontal = forwardRef(({
|
|
7
|
+
const PStepperHorizontal = forwardRef(({ onStepChange, onUpdate, size = 'small', theme = 'light', className, children, ...rest }, ref) => {
|
|
8
8
|
const elementRef = useRef();
|
|
9
|
-
useEventCallback(elementRef, 'change', onChange);
|
|
10
9
|
useEventCallback(elementRef, 'stepChange', onStepChange);
|
|
10
|
+
useEventCallback(elementRef, 'update', onUpdate);
|
|
11
11
|
const WebComponentTag = usePrefix('p-stepper-horizontal');
|
|
12
12
|
const propsToSync = [size, theme];
|
|
13
13
|
useBrowserLayoutEffect(() => {
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/switch.wrapper.js
CHANGED
|
@@ -4,10 +4,10 @@ import { useEventCallback, usePrefix, useBrowserLayoutEffect, useMergedClass } f
|
|
|
4
4
|
import { syncRef } from '../../utils.js';
|
|
5
5
|
import { DSRSwitch } from '../dsr-components/switch.js';
|
|
6
6
|
|
|
7
|
-
const PSwitch = forwardRef(({ alignLabel = 'right', checked = false, disabled = false, hideLabel = false, loading = false,
|
|
7
|
+
const PSwitch = forwardRef(({ alignLabel = 'right', checked = false, disabled = false, hideLabel = false, loading = false, onSwitchChange, onUpdate, stretch = false, theme = 'light', className, children, ...rest }, ref) => {
|
|
8
8
|
const elementRef = useRef();
|
|
9
|
-
useEventCallback(elementRef, 'change', onChange);
|
|
10
9
|
useEventCallback(elementRef, 'switchChange', onSwitchChange);
|
|
10
|
+
useEventCallback(elementRef, 'update', onUpdate);
|
|
11
11
|
const WebComponentTag = usePrefix('p-switch');
|
|
12
12
|
const propsToSync = [alignLabel, checked, disabled, hideLabel, loading, stretch, theme];
|
|
13
13
|
useBrowserLayoutEffect(() => {
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/table.wrapper.js
CHANGED
|
@@ -4,10 +4,10 @@ import { useEventCallback, usePrefix, useBrowserLayoutEffect, useMergedClass } f
|
|
|
4
4
|
import { syncRef } from '../../utils.js';
|
|
5
5
|
import { DSRTable } from '../dsr-components/table.js';
|
|
6
6
|
|
|
7
|
-
const PTable = forwardRef(({ caption,
|
|
7
|
+
const PTable = forwardRef(({ caption, onSortingChange, onUpdate, theme = 'light', className, children, ...rest }, ref) => {
|
|
8
8
|
const elementRef = useRef();
|
|
9
|
-
useEventCallback(elementRef, 'change', onChange);
|
|
10
9
|
useEventCallback(elementRef, 'sortingChange', onSortingChange);
|
|
10
|
+
useEventCallback(elementRef, 'update', onUpdate);
|
|
11
11
|
const WebComponentTag = usePrefix('p-table');
|
|
12
12
|
const propsToSync = [caption, theme];
|
|
13
13
|
useBrowserLayoutEffect(() => {
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/tabs-bar.wrapper.js
CHANGED
|
@@ -4,10 +4,10 @@ import { useEventCallback, usePrefix, useBrowserLayoutEffect, useMergedClass } f
|
|
|
4
4
|
import { syncRef } from '../../utils.js';
|
|
5
5
|
import { DSRTabsBar } from '../dsr-components/tabs-bar.js';
|
|
6
6
|
|
|
7
|
-
const PTabsBar = forwardRef(({ activeTabIndex, gradientColor = 'background-base', gradientColorScheme,
|
|
7
|
+
const PTabsBar = forwardRef(({ activeTabIndex, gradientColor = 'background-base', gradientColorScheme, onTabChange, onUpdate, size = 'small', theme = 'light', weight = 'regular', className, children, ...rest }, ref) => {
|
|
8
8
|
const elementRef = useRef();
|
|
9
|
-
useEventCallback(elementRef, 'change', onChange);
|
|
10
9
|
useEventCallback(elementRef, 'tabChange', onTabChange);
|
|
10
|
+
useEventCallback(elementRef, 'update', onUpdate);
|
|
11
11
|
const WebComponentTag = usePrefix('p-tabs-bar');
|
|
12
12
|
const propsToSync = [activeTabIndex, gradientColor, gradientColorScheme, size, theme, weight];
|
|
13
13
|
useBrowserLayoutEffect(() => {
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/tabs.wrapper.js
CHANGED
|
@@ -4,10 +4,10 @@ import { useEventCallback, usePrefix, useBrowserLayoutEffect, useMergedClass } f
|
|
|
4
4
|
import { syncRef } from '../../utils.js';
|
|
5
5
|
import { DSRTabs } from '../dsr-components/tabs.js';
|
|
6
6
|
|
|
7
|
-
const PTabs = forwardRef(({ activeTabIndex = 0, gradientColor = 'background-base', gradientColorScheme,
|
|
7
|
+
const PTabs = forwardRef(({ activeTabIndex = 0, gradientColor = 'background-base', gradientColorScheme, onTabChange, onUpdate, size = 'small', theme = 'light', weight = 'regular', className, children, ...rest }, ref) => {
|
|
8
8
|
const elementRef = useRef();
|
|
9
|
-
useEventCallback(elementRef, 'change', onChange);
|
|
10
9
|
useEventCallback(elementRef, 'tabChange', onTabChange);
|
|
10
|
+
useEventCallback(elementRef, 'update', onUpdate);
|
|
11
11
|
const WebComponentTag = usePrefix('p-tabs');
|
|
12
12
|
const propsToSync = [activeTabIndex, gradientColor, gradientColorScheme, size, theme, weight];
|
|
13
13
|
useBrowserLayoutEffect(() => {
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/banner.js
CHANGED
|
@@ -66,11 +66,14 @@ import { stripFocusAndHoverStyles } from '../../stripFocusAndHoverStyles.js';
|
|
|
66
66
|
import { getBannerCss as getComponentCss$X } from '../../../../../../components/dist/styles/esm/styles-entry.js';
|
|
67
67
|
|
|
68
68
|
class DSRBanner extends Component {
|
|
69
|
+
get hasDismissButton() {
|
|
70
|
+
return this.props.persistent ? false : this.props.dismissButton;
|
|
71
|
+
}
|
|
69
72
|
render() {
|
|
70
73
|
const { children, namedSlotChildren, otherChildren } = splitChildren(this.props.children);
|
|
71
74
|
const hasTitleSlot = namedSlotChildren.filter(({ props: { slot } }) => slot === 'title').length > 0;
|
|
72
|
-
const style = minifyCss(stripFocusAndHoverStyles(getComponentCss$X()));
|
|
73
|
-
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs(PInlineNotification, { heading: this.props.heading, description: this.props.description, state: this.props.state,
|
|
75
|
+
const style = minifyCss(stripFocusAndHoverStyles(getComponentCss$X(this.props.open)));
|
|
76
|
+
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs(PInlineNotification, { heading: this.props.heading, description: this.props.description, state: this.props.state, dismissButton: this.hasDismissButton, theme: this.props.theme, "aria-hidden": !this.props.open ? 'true' : 'false', children: [namedSlotChildren.filter(({ props: { slot } }) => slot === 'heading').length > 0 ? (jsx("slot", { name: "heading", slot: "heading" })) : (hasTitleSlot && jsx("slot", { name: "title", slot: "heading" })), namedSlotChildren.filter(({ props: { slot } }) => slot === 'description').length > 0 && jsx("slot", { name: "description" })] })] }), this.props.children] }));
|
|
74
77
|
}
|
|
75
78
|
}
|
|
76
79
|
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button.js
CHANGED
|
@@ -64,13 +64,13 @@ import { Component } from 'react';
|
|
|
64
64
|
import { minifyCss } from '../../minifyCss.js';
|
|
65
65
|
import { stripFocusAndHoverStyles } from '../../stripFocusAndHoverStyles.js';
|
|
66
66
|
import { getButtonCss as getComponentCss$T } from '../../../../../../components/dist/styles/esm/styles-entry.js';
|
|
67
|
-
import { getButtonAriaAttributes, getLinkButtonThemeForIcon, hasVisibleIcon
|
|
67
|
+
import { getButtonAriaAttributes, getLinkButtonThemeForIcon, hasVisibleIcon } from '../../../../../../components/dist/utils/esm/utils-entry.js';
|
|
68
68
|
|
|
69
69
|
class DSRButton extends Component {
|
|
70
70
|
render() {
|
|
71
71
|
splitChildren(this.props.children);
|
|
72
72
|
const style = minifyCss(stripFocusAndHoverStyles(getComponentCss$T(this.props.icon, this.props.iconSource, this.props.variant, this.props.hideLabel, this.props.disabled, this.props.loading, this.props.theme)));
|
|
73
|
-
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs("button", { ...getButtonAriaAttributes(this.props.disabled, this.props.loading, this.props.aria), className: "root", type: this.props.type, children: [this.props.loading && (jsx(PSpinner, { className: "spinner", size: "inherit", theme: getLinkButtonThemeForIcon(this.props.variant, this.props.theme), aria: { 'aria-label': 'Loading state:' } })), hasVisibleIcon(this.props.icon, this.props.iconSource) && (jsx(PIcon, { className: "icon", size: "inherit", name: this.props.iconSource ? undefined : this.props.icon, source: this.props.iconSource, color:
|
|
73
|
+
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs("button", { ...getButtonAriaAttributes(this.props.disabled, this.props.loading, this.props.aria), className: "root", type: this.props.type, children: [this.props.loading && (jsx(PSpinner, { className: "spinner", size: "inherit", theme: getLinkButtonThemeForIcon(this.props.variant, this.props.theme), aria: { 'aria-label': 'Loading state:' } })), hasVisibleIcon(this.props.icon, this.props.iconSource) && (jsx(PIcon, { className: "icon", size: "inherit", name: this.props.iconSource ? undefined : this.props.icon, source: this.props.iconSource, color: this.props.disabled ? (this.props.variant === 'primary' ? 'contrast-high' : 'state-disabled') : 'primary', theme: !this.props.disabled ? getLinkButtonThemeForIcon(this.props.variant, this.props.theme) : this.props.theme, "aria-hidden": "true" })), jsx("span", { className: "label", children: jsx("slot", {}) })] })] }), this.props.children] }));
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
|
|
@@ -67,13 +67,16 @@ import { getInlineNotificationCss as getComponentCss$D } from '../../../../../..
|
|
|
67
67
|
import { getInlineNotificationIconName, getContentAriaAttributes } from '../../../../../../components/dist/utils/esm/utils-entry.js';
|
|
68
68
|
|
|
69
69
|
class DSRInlineNotification extends Component {
|
|
70
|
+
get hasDismissButton() {
|
|
71
|
+
return this.props.persistent ? false : this.props.dismissButton;
|
|
72
|
+
}
|
|
70
73
|
render() {
|
|
71
74
|
const { children, namedSlotChildren, otherChildren } = splitChildren(this.props.children);
|
|
72
75
|
const bannerId = 'banner';
|
|
73
76
|
const labelId = 'label';
|
|
74
77
|
const descriptionId = 'description';
|
|
75
|
-
const style = minifyCss(stripFocusAndHoverStyles(getComponentCss$D(this.props.state, !!this.props.actionLabel,
|
|
76
|
-
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs(Fragment, { children: [jsx(PIcon, { className: "icon", name: getInlineNotificationIconName(this.props.state), color: `notification-${this.props.state}`, theme: this.props.theme, "aria-hidden": "true" }), jsxs("div", { id: bannerId, className: "content", ...getContentAriaAttributes(this.props.state, labelId, descriptionId), children: [(this.props.heading || namedSlotChildren.filter(({ props: { slot } }) => slot === 'heading').length > 0) && jsx("h5", { id: labelId, children: this.props.heading || jsx("slot", { name: "heading" }) }), jsx("p", { id: descriptionId, children: this.props.description || jsx("slot", {}) })] }), this.props.actionLabel && (jsx(PButtonPure, { className: "action", theme: this.props.theme, icon: this.props.actionIcon, loading: this.props.actionLoading, children: this.props.actionLabel })),
|
|
78
|
+
const style = minifyCss(stripFocusAndHoverStyles(getComponentCss$D(this.props.state, !!this.props.actionLabel, this.hasDismissButton, this.props.theme)));
|
|
79
|
+
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs(Fragment, { children: [jsx(PIcon, { className: "icon", name: getInlineNotificationIconName(this.props.state), color: `notification-${this.props.state}`, theme: this.props.theme, "aria-hidden": "true" }), jsxs("div", { id: bannerId, className: "content", ...getContentAriaAttributes(this.props.state, labelId, descriptionId), children: [(this.props.heading || namedSlotChildren.filter(({ props: { slot } }) => slot === 'heading').length > 0) && jsx("h5", { id: labelId, children: this.props.heading || jsx("slot", { name: "heading" }) }), jsx("p", { id: descriptionId, children: this.props.description || jsx("slot", {}) })] }), this.props.actionLabel && (jsx(PButtonPure, { className: "action", theme: this.props.theme, icon: this.props.actionIcon, loading: this.props.actionLoading, children: this.props.actionLabel })), this.hasDismissButton && (jsx(PButtonPure, { className: "close", type: "button", icon: "close", theme: this.props.theme, hideLabel: true, "aria-controls": bannerId, children: "Close notification" }))] })] }), this.props.children] }));
|
|
77
80
|
}
|
|
78
81
|
}
|
|
79
82
|
|
|
@@ -76,7 +76,7 @@ class DSRTabs extends Component {
|
|
|
76
76
|
? { ...child, props: { ...child.props, theme: this.props.theme, hidden: this.props.activeTabIndex !== i ? true : null } }
|
|
77
77
|
: child);
|
|
78
78
|
const style = minifyCss(stripFocusAndHoverStyles(getComponentCss$a()));
|
|
79
|
-
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs(Fragment, { children: [jsx(PTabsBar, { className: "root", size: this.props.size, weight: this.props.weight, theme: this.props.theme, gradientColorScheme: this.props.gradientColorScheme, gradientColor: this.props.gradientColor, activeTabIndex: this.props.activeTabIndex, children: otherChildren.map((tab, index) => (jsx("button", { type: "button", children: typeof tab === 'object' && 'props' in tab && tab.props.label }, index))) }), jsx("slot", {})] })] }), manipulatedChildren] }));
|
|
79
|
+
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs(Fragment, { children: [jsx(PTabsBar, { className: "root", size: this.props.size, weight: this.props.weight, theme: this.props.theme, gradientColorScheme: this.props.gradientColorScheme, gradientColor: this.props.gradientColor, activeTabIndex: this.props.activeTabIndex, onUpdate: this.props.onTabsBarUpdate, children: otherChildren.map((tab, index) => (jsx("button", { type: "button", children: typeof tab === 'object' && 'props' in tab && tab.props.label }, index))) }), jsx("slot", {})] })] }), manipulatedChildren] }));
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
|