@porsche-design-system/components-react 3.0.0-rc.1 → 3.0.0-rc.2
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 +36 -0
- package/bin/patchRemixRunProcessBrowserGlobalIdentifier.js +35 -26
- package/esm/lib/components/icon.wrapper.js +1 -1
- package/esm/lib/components/scroller.wrapper.js +3 -3
- package/lib/components/icon.wrapper.js +1 -1
- package/lib/components/scroller.wrapper.d.ts +15 -7
- package/lib/components/scroller.wrapper.js +3 -3
- package/lib/types.d.ts +210 -191
- package/package.json +2 -2
- package/ssr/components/dist/styles/esm/styles-entry.js +180 -77
- package/ssr/components/dist/utils/esm/utils-entry.js +45 -7
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/icon.wrapper.js +1 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/scroller.wrapper.js +4 -4
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/select-wrapper-dropdown.wrapper.js +38 -0
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/stepper-horizontal.wrapper.js +0 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/scroller.js +2 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-wrapper-dropdown.js +34 -0
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-wrapper.js +6 -3
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/stepper-horizontal.js +1 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs-bar.js +1 -1
- package/ssr/esm/components/dist/styles/esm/styles-entry.js +180 -78
- package/ssr/esm/components/dist/utils/esm/utils-entry.js +40 -8
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/icon.wrapper.js +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/scroller.wrapper.js +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/select-wrapper-dropdown.wrapper.js +36 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/stepper-horizontal.wrapper.js +0 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/scroller.js +3 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-wrapper-dropdown.js +32 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-wrapper.js +6 -3
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/stepper-horizontal.js +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs-bar.js +1 -1
- package/ssr/lib/components/scroller.wrapper.d.ts +15 -7
- package/ssr/lib/components/select-wrapper-dropdown.wrapper.d.ts +30 -0
- package/ssr/lib/dsr-components/select-wrapper.d.ts +0 -1
- package/ssr/lib/types.d.ts +210 -191
|
@@ -3226,6 +3226,10 @@ function jssNested() {
|
|
|
3226
3226
|
};
|
|
3227
3227
|
}
|
|
3228
3228
|
|
|
3229
|
+
function getDefaultExportFromCjs (x) {
|
|
3230
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
3231
|
+
}
|
|
3232
|
+
|
|
3229
3233
|
function getAugmentedNamespace(n) {
|
|
3230
3234
|
if (n.__esModule) return n;
|
|
3231
3235
|
var f = n.default;
|
|
@@ -3287,7 +3291,7 @@ var _tslib$1 = {};
|
|
|
3287
3291
|
return t;
|
|
3288
3292
|
};
|
|
3289
3293
|
return exports.__assign.apply(this, arguments);
|
|
3290
|
-
};
|
|
3294
|
+
};
|
|
3291
3295
|
} (_tslib$1));
|
|
3292
3296
|
|
|
3293
3297
|
var require$$1 = /*@__PURE__*/getAugmentedNamespace(jss_esm);
|
|
@@ -3647,6 +3651,8 @@ function jssCombineAndSortMQ(options) {
|
|
|
3647
3651
|
|
|
3648
3652
|
var dist = jssCombineAndSortMQ;
|
|
3649
3653
|
|
|
3654
|
+
var jssPluginSortMediaQueries = /*@__PURE__*/getDefaultExportFromCjs(dist);
|
|
3655
|
+
|
|
3650
3656
|
/* Auto Generated Start */
|
|
3651
3657
|
const themeLight = {
|
|
3652
3658
|
primaryColor: '#010205',
|
|
@@ -3790,36 +3796,20 @@ const focusPseudoJssStyle = {
|
|
|
3790
3796
|
outline: 0,
|
|
3791
3797
|
},
|
|
3792
3798
|
};
|
|
3793
|
-
const getTextHiddenJssStyle = (isHidden) => isHidden
|
|
3794
|
-
? getScreenReaderOnlyJssStyle()
|
|
3795
|
-
: {
|
|
3796
|
-
position: 'static',
|
|
3797
|
-
width: 'auto',
|
|
3798
|
-
height: 'auto',
|
|
3799
|
-
margin: 0,
|
|
3800
|
-
overflow: 'visible',
|
|
3801
|
-
clip: 'auto',
|
|
3802
|
-
clipPath: 'none',
|
|
3803
|
-
whiteSpace: 'normal',
|
|
3804
|
-
};
|
|
3805
|
-
const getFormTextHiddenJssStyle = (isHidden) => (Object.assign(Object.assign({}, getTextHiddenJssStyle(isHidden)), { width: 'fit-content' }));
|
|
3806
|
-
const getFormCheckboxRadioHiddenJssStyle = (isHidden) => (Object.assign(Object.assign({}, getTextHiddenJssStyle(isHidden)), { width: 'auto', padding: `2px 0 0 ${spacingStaticSmall}` }));
|
|
3807
3799
|
/**
|
|
3808
|
-
*
|
|
3800
|
+
* Returns a JSS style object that can be used to visually hide text in the browser, while still allowing it to be accessed by screen readers.
|
|
3801
|
+
* @param {boolean} isHidden - A boolean value indicating whether the text should be hidden or not. Defaults to true.
|
|
3802
|
+
* @param {JssStyle} isShownJssStyle - Additional styles applied when isHidden = false
|
|
3803
|
+
* @returns {JssStyle} - A JSS style object containing styles depending on the value of isHidden and isShownJssStyle.
|
|
3809
3804
|
*/
|
|
3810
|
-
const
|
|
3811
|
-
|
|
3805
|
+
const getHiddenTextJssStyle = (isHidden = true, isShownJssStyle) => isHidden
|
|
3806
|
+
? {
|
|
3812
3807
|
position: 'absolute',
|
|
3808
|
+
width: 0,
|
|
3813
3809
|
height: '1px',
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
overflow: 'hidden',
|
|
3818
|
-
clip: 'rect(1px,1px,1px,1px)',
|
|
3819
|
-
clipPath: 'inset(50%)',
|
|
3820
|
-
whiteSpace: 'nowrap',
|
|
3821
|
-
};
|
|
3822
|
-
};
|
|
3810
|
+
textIndent: '-999999px',
|
|
3811
|
+
}
|
|
3812
|
+
: Object.assign({ position: 'static', width: 'auto', height: 'auto', textIndent: 0 }, isShownJssStyle);
|
|
3823
3813
|
const getBackfaceVisibilityJssStyle = () => ({
|
|
3824
3814
|
backfaceVisibility: 'hidden',
|
|
3825
3815
|
WebkitBackfaceVisibility: 'hidden',
|
|
@@ -3854,7 +3844,7 @@ const jss = createJss({
|
|
|
3854
3844
|
jssGlobal(),
|
|
3855
3845
|
jssNested(),
|
|
3856
3846
|
camelCase(),
|
|
3857
|
-
|
|
3847
|
+
jssPluginSortMediaQueries({ combineMediaQueries: true }),
|
|
3858
3848
|
],
|
|
3859
3849
|
});
|
|
3860
3850
|
const getCss = (jssStyles) => jss
|
|
@@ -4081,7 +4071,7 @@ const getLinkButtonPureStyles = (icon, iconSource, active, isDisabledOrLoading,
|
|
|
4081
4071
|
fontSize: getFontSizeText(sizeValue),
|
|
4082
4072
|
})))), { '&::before': Object.assign(Object.assign(Object.assign({ content: '""', position: 'absolute', top: offsetVertical, bottom: offsetVertical }, buildResponsiveStyles(hideLabel, (hideLabelValue) => ({
|
|
4083
4073
|
right: hideLabelValue ? offsetVertical : offsetHorizontal,
|
|
4084
|
-
left: hideLabelValue
|
|
4074
|
+
left: hideLabelValue ? offsetVertical : offsetHorizontal,
|
|
4085
4075
|
}))), { borderRadius: borderRadiusSmall, transition: getTransition('background-color') }), (active && Object.assign(Object.assign({}, frostedGlassStyle), { backgroundColor: hoverColor }))) }), (!isDisabledOrLoading &&
|
|
4086
4076
|
hoverMediaQuery({
|
|
4087
4077
|
'&:hover::before': Object.assign(Object.assign({}, frostedGlassStyle), { backgroundColor: hoverColor }),
|
|
@@ -4100,6 +4090,12 @@ const getLinkButtonPureStyles = (icon, iconSource, active, isDisabledOrLoading,
|
|
|
4100
4090
|
flexShrink: '0',
|
|
4101
4091
|
width: fontLineHeight,
|
|
4102
4092
|
height: fontLineHeight,
|
|
4093
|
+
// workaround for Safari to optimize vertical alignment of icons
|
|
4094
|
+
// TODO: check if this is still needed after optimized icons are included
|
|
4095
|
+
'@supports (width: round(down, 1px, 1px))': {
|
|
4096
|
+
width: `round(down, ${fontLineHeight}, 1px)`,
|
|
4097
|
+
height: `round(down, ${fontLineHeight}, 1px)`,
|
|
4098
|
+
},
|
|
4103
4099
|
},
|
|
4104
4100
|
label: mergeDeep(buildResponsiveStyles(hideLabel, getVisibilityJssStyle), buildResponsiveStyles(alignLabel, (alignLabelValue) => ({
|
|
4105
4101
|
order: alignLabelValue === 'left' ? -1 : 0,
|
|
@@ -4277,17 +4273,7 @@ const getLinkButtonStyles = (icon, iconSource, variant, hideLabel, isDisabledOrL
|
|
|
4277
4273
|
})), (!isDisabledOrLoading &&
|
|
4278
4274
|
hoverMediaQuery({
|
|
4279
4275
|
'&:hover': Object.assign({ backgroundColor: backgroundColorHover, borderColor: isHighContrastMode ? focusColor : borderColorHover }, (!isPrimary && frostedGlassStyle)),
|
|
4280
|
-
}))), label:
|
|
4281
|
-
? {
|
|
4282
|
-
width: 0,
|
|
4283
|
-
height: '1px',
|
|
4284
|
-
textIndent: '-999999px',
|
|
4285
|
-
}
|
|
4286
|
-
: {
|
|
4287
|
-
width: 'auto',
|
|
4288
|
-
height: 'auto',
|
|
4289
|
-
textIndent: 0,
|
|
4290
|
-
})) }, (hasIcon && {
|
|
4276
|
+
}))), label: buildResponsiveStyles(hideLabel, getHiddenTextJssStyle) }, (hasIcon && {
|
|
4291
4277
|
icon: {
|
|
4292
4278
|
width: fontLineHeight,
|
|
4293
4279
|
height: fontLineHeight,
|
|
@@ -4364,22 +4350,18 @@ const getComponentCss$S = (width, hasPagination, alignHeader, theme) => {
|
|
|
4364
4350
|
[mediaQueryS]: isHeaderAlignCenter
|
|
4365
4351
|
? {
|
|
4366
4352
|
gridColumn: 2,
|
|
4367
|
-
textAlign: 'center', // relevant when text becomes multiline
|
|
4368
4353
|
}
|
|
4369
4354
|
: {
|
|
4370
4355
|
gridColumn: '1 / 3',
|
|
4371
4356
|
},
|
|
4372
4357
|
}),
|
|
4373
|
-
}, header: {
|
|
4374
|
-
|
|
4375
|
-
|
|
4376
|
-
[mediaQueryS]: Object.assign(Object.assign({ fontFamily, fontSize: fontSizeTextSmall, columnGap: spacingStaticMedium, gridTemplateColumns: `${buttonGroupWidth} minmax(0px, 1fr) ${buttonGroupWidth}` }, (isHeaderAlignCenter && {
|
|
4358
|
+
}, header: Object.assign(Object.assign({ display: 'grid', padding: `0 ${spacingMap[width].base}` }, (isHeaderAlignCenter && {
|
|
4359
|
+
textAlign: 'center',
|
|
4360
|
+
})), { [mediaQueryS]: Object.assign(Object.assign({ fontFamily, fontSize: fontSizeTextSmall, columnGap: spacingStaticMedium, gridTemplateColumns: `${buttonGroupWidth} minmax(0px, 1fr) ${buttonGroupWidth}` }, (isHeaderAlignCenter && {
|
|
4377
4361
|
justifyItems: 'center', // relevant when max-width of heading or description is reached
|
|
4378
|
-
})), { padding: `0 ${spacingMap[width].s}` }),
|
|
4379
|
-
[mediaQueryXXL]: {
|
|
4362
|
+
})), { padding: `0 ${spacingMap[width].s}` }), [mediaQueryXXL]: {
|
|
4380
4363
|
padding: `0 ${spacingMap[width].xxl}`,
|
|
4381
|
-
},
|
|
4382
|
-
}, nav: {
|
|
4364
|
+
} }), nav: {
|
|
4383
4365
|
display: 'none',
|
|
4384
4366
|
[mediaQueryS]: {
|
|
4385
4367
|
display: 'flex',
|
|
@@ -4410,7 +4392,7 @@ const getComponentCss$S = (width, hasPagination, alignHeader, theme) => {
|
|
|
4410
4392
|
} }),
|
|
4411
4393
|
'&__list': Object.assign({ display: 'flex', height: '100%' }, getBackfaceVisibilityJssStyle()),
|
|
4412
4394
|
'&__slide': Object.assign(Object.assign({ position: 'relative', flexShrink: 0 }, getBackfaceVisibilityJssStyle()), { transform: 'translateZ(0)' }),
|
|
4413
|
-
'&__sr':
|
|
4395
|
+
'&__sr': getHiddenTextJssStyle(), // appears in the DOM when sliding
|
|
4414
4396
|
} }, (hasPagination && {
|
|
4415
4397
|
pagination: Object.assign(Object.assign({}, buildResponsiveStyles(hasPagination, (hasPaginationValue) => ({
|
|
4416
4398
|
display: hasPaginationValue ? 'flex' : 'none',
|
|
@@ -4509,7 +4491,7 @@ const getCheckboxRadioJssStyle = (hideLabel, state, isDisabled, isLoading, theme
|
|
|
4509
4491
|
display: 'flex',
|
|
4510
4492
|
alignItems: 'flex-start',
|
|
4511
4493
|
},
|
|
4512
|
-
}, text: Object.assign(Object.assign(Object.assign({ order: 1, cursor: disabledOrLoading ? 'default' : 'pointer' }, textSmallStyle), { color: disabledOrLoading ? disabledColor : primaryColor, transition: getTransition('color') }), buildResponsiveStyles(hideLabel,
|
|
4494
|
+
}, text: Object.assign(Object.assign(Object.assign({ order: 1, cursor: disabledOrLoading ? 'default' : 'pointer' }, textSmallStyle), { color: disabledOrLoading ? disabledColor : primaryColor, transition: getTransition('color') }), buildResponsiveStyles(hideLabel, (isHidden) => getHiddenTextJssStyle(isHidden, { padding: `2px 0 0 ${spacingStaticSmall}` }))) }, getFunctionalComponentRequiredStyles()), getFunctionalComponentStateMessageStyles(theme, state));
|
|
4513
4495
|
};
|
|
4514
4496
|
|
|
4515
4497
|
const getInlineSVGBackgroundImage = (path) => {
|
|
@@ -4927,7 +4909,7 @@ const getComponentCss$E = (color, size, theme) => {
|
|
|
4927
4909
|
filter: filter.light[color],
|
|
4928
4910
|
}, {
|
|
4929
4911
|
filter: filter.dark[color],
|
|
4930
|
-
}))), { WebkitAnimation: `${isDark ? keyFramesDark : keyFramesLight} 1ms` }))), (isSizeInherit
|
|
4912
|
+
}))), { WebkitAnimation: `${isDark ? `${keyFramesDark}-${color}` : `${keyFramesLight}-${color}`} 1ms` }))), (isSizeInherit
|
|
4931
4913
|
? {
|
|
4932
4914
|
width: size,
|
|
4933
4915
|
height: size,
|
|
@@ -4937,7 +4919,7 @@ const getComponentCss$E = (color, size, theme) => {
|
|
|
4937
4919
|
height: fontLineHeight,
|
|
4938
4920
|
font: `${sizeMap$2[size]} ${fontFamily}`,
|
|
4939
4921
|
})) }, (!isColorInherit && {
|
|
4940
|
-
[`@keyframes ${isDark ? keyFramesDark : keyFramesLight}`]: forceRerenderAnimationStyle,
|
|
4922
|
+
[`@keyframes ${isDark ? `${keyFramesDark}-${color}` : `${keyFramesLight}-${color}`}`]: forceRerenderAnimationStyle,
|
|
4941
4923
|
})),
|
|
4942
4924
|
});
|
|
4943
4925
|
};
|
|
@@ -5000,7 +4982,6 @@ const getComponentCss$D = (state, hasAction, hasClose, theme) => {
|
|
|
5000
4982
|
|
|
5001
4983
|
const getComponentCss$C = (icon, iconSource, active, stretch, size, hideLabel, alignLabel, underline, hasSlottedAnchor, theme) => {
|
|
5002
4984
|
const { focusColor } = getThemedColors(theme);
|
|
5003
|
-
const hasIcon = hasVisibleIcon(icon, iconSource);
|
|
5004
4985
|
return getCss(mergeDeep(getLinkButtonPureStyles(icon, iconSource, active, false, stretch, size, hideLabel, alignLabel, hasSlottedAnchor, theme), Object.assign(Object.assign({}, (hasSlottedAnchor && {
|
|
5005
4986
|
'@global': addImportantToEachRule({
|
|
5006
4987
|
'::slotted': {
|
|
@@ -5010,7 +4991,7 @@ const getComponentCss$C = (icon, iconSource, active, stretch, size, hideLabel, a
|
|
|
5010
4991
|
// (https://bugs.webkit.org/show_bug.cgi?id=178237)
|
|
5011
4992
|
'&(a)::before': Object.assign({ content: '""', position: 'fixed', top: offsetVertical, bottom: offsetVertical, borderRadius: borderRadiusSmall }, buildResponsiveStyles(hideLabel, (hideLabelValue) => ({
|
|
5012
4993
|
right: hideLabelValue ? offsetVertical : offsetHorizontal,
|
|
5013
|
-
left: hideLabelValue
|
|
4994
|
+
left: hideLabelValue ? offsetVertical : offsetHorizontal,
|
|
5014
4995
|
}))),
|
|
5015
4996
|
'&(a:focus)::before': {
|
|
5016
4997
|
border: `${borderWidthBase} solid ${focusColor}`,
|
|
@@ -5053,6 +5034,7 @@ const getComponentCss$B = (icon, iconSource, variant, hideLabel, hasSlottedAncho
|
|
|
5053
5034
|
}) })))));
|
|
5054
5035
|
};
|
|
5055
5036
|
|
|
5037
|
+
// array is redefined instead of using the one from in model-signature
|
|
5056
5038
|
const LINK_TILE_MODEL_SIGNATURE_HEADING_TAGS = ['h2', 'h3', 'h4', 'h5', 'h6'];
|
|
5057
5039
|
|
|
5058
5040
|
const getComponentCss$A = (aspectRatio, weight, direction, hasDescription) => {
|
|
@@ -5104,7 +5086,7 @@ const getComponentCss$y = (size) => {
|
|
|
5104
5086
|
|
|
5105
5087
|
const mediaQueryXl = getMediaQueryMin('xl');
|
|
5106
5088
|
const { backgroundColor, primaryColor: lightThemePrimaryColor } = getThemedColors('light');
|
|
5107
|
-
const { primaryColor: darkThemePrimaryColor } = getThemedColors('dark');
|
|
5089
|
+
const { primaryColor: darkThemePrimaryColor, contrastHighColor: darkThemeContrastHighColor } = getThemedColors('dark');
|
|
5108
5090
|
const transitionTimingFunction = 'cubic-bezier(.16,1,.3,1)';
|
|
5109
5091
|
const stretchToFullModalWidthClassName = 'stretch-to-full-modal-width';
|
|
5110
5092
|
const getFullscreenJssStyles = (fullscreen) => {
|
|
@@ -5202,8 +5184,8 @@ const getComponentCss$x = (isOpen, isFullscreen, hasDismissButton, hasHeader) =>
|
|
|
5202
5184
|
})), (hasDismissButton && {
|
|
5203
5185
|
dismiss: Object.assign({ position: 'absolute', top: '8px', right: '8px', border: `2px solid ${backgroundColor}`, borderRadius: '4px', background: backgroundColor }, hoverMediaQuery({
|
|
5204
5186
|
'&:hover': {
|
|
5205
|
-
background:
|
|
5206
|
-
borderColor:
|
|
5187
|
+
background: darkThemeContrastHighColor,
|
|
5188
|
+
borderColor: darkThemeContrastHighColor,
|
|
5207
5189
|
},
|
|
5208
5190
|
})),
|
|
5209
5191
|
})));
|
|
@@ -5381,7 +5363,7 @@ const getComponentCss$u = (direction, theme) => {
|
|
|
5381
5363
|
borderColor: 'transparent',
|
|
5382
5364
|
} }),
|
|
5383
5365
|
},
|
|
5384
|
-
label:
|
|
5366
|
+
label: getHiddenTextJssStyle(),
|
|
5385
5367
|
icon: {
|
|
5386
5368
|
display: 'inline-block',
|
|
5387
5369
|
transform: 'translate3d(0,0,0)', // Fixes movement on hover in Safari
|
|
@@ -5586,6 +5568,7 @@ const getComponentCss$q = (maxWidth) => {
|
|
|
5586
5568
|
},
|
|
5587
5569
|
});
|
|
5588
5570
|
};
|
|
5571
|
+
|
|
5589
5572
|
const getBaseChildStyles = (child, state, theme, additionalDefaultJssStyle) => {
|
|
5590
5573
|
const { primaryColor, contrastLowColor, contrastMediumColor, disabledColor } = getThemedColors(theme);
|
|
5591
5574
|
const { formStateColor, formStateHoverColor } = getThemedFormStateColors(theme, state);
|
|
@@ -5619,7 +5602,7 @@ const getLabelStyles = (child, isDisabled, hideLabel, state, theme, counterOrUni
|
|
|
5619
5602
|
flexDirection: 'column',
|
|
5620
5603
|
gap: spacingStaticXSmall,
|
|
5621
5604
|
position: 'relative',
|
|
5622
|
-
'&__text': Object.assign(Object.assign(Object.assign(Object.assign({ display: 'block' }, buildResponsiveStyles(hideLabel,
|
|
5605
|
+
'&__text': Object.assign(Object.assign(Object.assign(Object.assign({ display: 'block' }, buildResponsiveStyles(hideLabel, (isHidden) => getHiddenTextJssStyle(isHidden, { width: 'fit-content' }))), textSmallStyle), { color: isDisabled ? disabledColor : primaryColor, transition: getTransition('color'), '&+&': Object.assign({ marginTop: `-${spacingStaticXSmall}`, fontSize: fontSizeTextXSmall }, (!isDisabled && {
|
|
5623
5606
|
color: contrastHighColor,
|
|
5624
5607
|
})) }), hoverMediaQuery({
|
|
5625
5608
|
'&:hover': {
|
|
@@ -5636,14 +5619,10 @@ const getLabelStyles = (child, isDisabled, hideLabel, state, theme, counterOrUni
|
|
|
5636
5619
|
})),
|
|
5637
5620
|
}));
|
|
5638
5621
|
};
|
|
5639
|
-
|
|
5640
|
-
const
|
|
5641
|
-
|
|
5642
|
-
|
|
5643
|
-
zIndex: 0,
|
|
5644
|
-
cursor: 'pointer',
|
|
5645
|
-
padding: `8px ${ICON_SPACE} 8px ${spacingStaticMedium}`,
|
|
5646
|
-
}))), root: {
|
|
5622
|
+
|
|
5623
|
+
const OPTION_HEIGHT = 40; // optgroups are higher and ignored
|
|
5624
|
+
const getComponentCss$p = (isDisabled, native, hideLabel, state, theme) => {
|
|
5625
|
+
return getCss(Object.assign(Object.assign(Object.assign({ '@global': addImportantToEachRule(Object.assign({ ':host': Object.assign({ display: 'block' }, hostHiddenStyles) }, getBaseChildStyles('select', state, theme, Object.assign({ position: 'static', zIndex: 0, cursor: 'pointer', padding: `8px calc(${fontLineHeight} + 10px + ${borderWidthBase} * 2 + ${spacingStaticSmall} * 2) 8px ${spacingStaticMedium}` }, (!native && !isDisabled && { borderColor: 'transparent' }))))), root: {
|
|
5647
5626
|
display: 'block',
|
|
5648
5627
|
position: 'relative',
|
|
5649
5628
|
} }, getLabelStyles('select', isDisabled, hideLabel, state, theme, {
|
|
@@ -5660,6 +5639,129 @@ const getComponentCss$p = (isDisabled, hideLabel, state, theme) => {
|
|
|
5660
5639
|
})), getFunctionalComponentRequiredStyles()), getFunctionalComponentStateMessageStyles(theme, state)));
|
|
5661
5640
|
};
|
|
5662
5641
|
|
|
5642
|
+
const dropdownPositionVar = '--p-internal-dropdown-position';
|
|
5643
|
+
const getButtonStyles = (direction, isOpen, state, theme) => {
|
|
5644
|
+
const { primaryColor, disabledColor, contrastMediumColor } = getThemedColors(theme);
|
|
5645
|
+
const { formStateHoverColor, formStateColor } = getThemedFormStateColors(theme, state);
|
|
5646
|
+
const isDirectionDown = direction === 'down';
|
|
5647
|
+
return {
|
|
5648
|
+
'@global': {
|
|
5649
|
+
button: Object.assign(Object.assign(Object.assign({ position: 'absolute', top: 0, height: `calc(${fontLineHeight} + 10px + ${borderWidthBase} * 2 + ${spacingStaticSmall} * 2)`, width: '100%', font: textSmallStyle.font.replace('ex', 'ex + 6px'), padding: 0, background: 'transparent', border: `${borderWidthBase} solid ${isOpen ? primaryColor : formStateColor || contrastMediumColor}`, borderRadius: borderRadiusSmall, outline: '0', cursor: 'pointer', transition: getTransition('border-color'), '&:focus, &:focus ~ ul': {
|
|
5650
|
+
borderColor: primaryColor,
|
|
5651
|
+
} }, hoverMediaQuery({
|
|
5652
|
+
'&:not(:disabled):not(:focus):hover': {
|
|
5653
|
+
borderColor: isOpen ? primaryColor : formStateHoverColor || primaryColor,
|
|
5654
|
+
},
|
|
5655
|
+
})), { '&:disabled': {
|
|
5656
|
+
cursor: 'not-allowed',
|
|
5657
|
+
borderColor: disabledColor,
|
|
5658
|
+
} }), (isOpen && {
|
|
5659
|
+
[isDirectionDown ? 'borderBottomLeftRadius' : 'borderTopLeftRadius']: 0,
|
|
5660
|
+
[isDirectionDown ? 'borderBottomRightRadius' : 'borderTopRightRadius']: 0,
|
|
5661
|
+
})),
|
|
5662
|
+
},
|
|
5663
|
+
};
|
|
5664
|
+
};
|
|
5665
|
+
const getFilterStyles = (direction, isOpen, state, disabled, theme) => {
|
|
5666
|
+
const { primaryColor, backgroundColor, disabledColor, contrastMediumColor } = getThemedColors(theme);
|
|
5667
|
+
const { formStateHoverColor, formStateColor } = getThemedFormStateColors(theme, state);
|
|
5668
|
+
const isDirectionDown = direction === 'down';
|
|
5669
|
+
const placeHolderJssStyle = {
|
|
5670
|
+
opacity: 1,
|
|
5671
|
+
color: disabled ? disabledColor : primaryColor,
|
|
5672
|
+
};
|
|
5673
|
+
return {
|
|
5674
|
+
'@global': {
|
|
5675
|
+
input: Object.assign(Object.assign(Object.assign(Object.assign({ display: 'block', position: 'absolute', zIndex: 1, bottom: '2px', left: '2px', width: `calc(100% - (${fontLineHeight} + 6px + ${borderWidthBase} * 2 + ${spacingStaticSmall} * 2))`, height: `calc(${fontLineHeight} + 6px + ${borderWidthBase} * 2 + ${spacingStaticSmall} * 2)`, font: textSmallStyle.font.replace('ex', 'ex + 6px'), padding: `13px ${spacingStaticMedium}`, outline: '0', appearance: 'none', boxSizing: 'border-box', border: '0', borderRadius: borderRadiusSmall, opacity: 0 }, textSmallStyle), { textIndent: 0, cursor: disabled ? 'not-allowed' : 'text', color: primaryColor, background: backgroundColor, '&::placeholder': placeHolderJssStyle, '&::-webkit-input-placeholder': placeHolderJssStyle, '&::-moz-placeholder': placeHolderJssStyle, '&:not(:disabled):focus': {
|
|
5676
|
+
opacity: 1,
|
|
5677
|
+
'&+span, &~ ul': {
|
|
5678
|
+
borderColor: primaryColor,
|
|
5679
|
+
},
|
|
5680
|
+
} }), hoverMediaQuery({
|
|
5681
|
+
'&:not(:disabled)': {
|
|
5682
|
+
'&+span:hover': {
|
|
5683
|
+
borderColor: isOpen ? primaryColor : formStateHoverColor || primaryColor,
|
|
5684
|
+
},
|
|
5685
|
+
'&:hover': {
|
|
5686
|
+
'&+span, &~ul': {
|
|
5687
|
+
borderColor: isOpen ? primaryColor : formStateHoverColor || primaryColor,
|
|
5688
|
+
},
|
|
5689
|
+
},
|
|
5690
|
+
},
|
|
5691
|
+
})), { '&+span': Object.assign(Object.assign(Object.assign({
|
|
5692
|
+
// for focus outline and clicking arrow since input ends left of the icon
|
|
5693
|
+
position: 'absolute' }, getInsetJssStyle()), { transition: getTransition('border-color'), pointerEvents: 'all', cursor: disabled ? 'not-allowed' : 'pointer', border: `${borderWidthBase} solid ${isOpen ? primaryColor : formStateColor || contrastMediumColor}`, borderRadius: borderRadiusSmall }), (isOpen && {
|
|
5694
|
+
[isDirectionDown ? 'borderBottomLeftRadius' : 'borderTopLeftRadius']: 0,
|
|
5695
|
+
[isDirectionDown ? 'borderBottomRightRadius' : 'borderTopRightRadius']: 0,
|
|
5696
|
+
})) }),
|
|
5697
|
+
},
|
|
5698
|
+
};
|
|
5699
|
+
};
|
|
5700
|
+
const getListStyles = (direction, theme) => {
|
|
5701
|
+
const isDirectionDown = direction === 'down';
|
|
5702
|
+
const { primaryColor, backgroundColor, contrastMediumColor, contrastHighColor, backgroundSurfaceColor, disabledColor, } = getThemedColors(theme);
|
|
5703
|
+
const { highlightColor } = getHighContrastColors();
|
|
5704
|
+
return {
|
|
5705
|
+
'@global': {
|
|
5706
|
+
ul: Object.assign(Object.assign(Object.assign(Object.assign({ display: 'flex', flexDirection: 'column', gap: spacingStaticSmall, position: `var(${dropdownPositionVar})`, padding: '6px', margin: 0, background: backgroundColor }, textSmallStyle), { zIndex: 10, left: 0, right: 0, [isDirectionDown ? 'top' : 'bottom']: 'calc(100% - 2px)', boxSizing: 'border-box', maxHeight: `${8.5 * (OPTION_HEIGHT + 8) + 6 + 2}px`, overflowY: 'auto', WebkitOverflowScrolling: 'touch', scrollBehavior: 'smooth', border: `2px solid ${primaryColor}`, [isDirectionDown ? 'borderTop' : 'borderBottom']: addImportantToRule(`1px solid ${contrastMediumColor}`) }), (isDirectionDown
|
|
5707
|
+
? ['borderBottomLeftRadius', 'borderBottomRightRadius']
|
|
5708
|
+
: ['borderTopLeftRadius', 'borderTopRightRadius']).reduce((result, curr) => (Object.assign(Object.assign({}, result), { [curr]: borderRadiusSmall })), {})), { scrollbarWidth: 'thin', scrollbarColor: 'auto', transition: getTransition('border-color'), transform: 'translate3d(0,0,0)' }),
|
|
5709
|
+
},
|
|
5710
|
+
option: Object.assign(Object.assign({ display: 'flex', justifyContent: 'space-between', gap: '12px', padding: `${spacingStaticSmall} 12px`, flex: `1 0 calc(${fontLineHeight} + ${spacingStaticSmall} * 2)`, color: contrastHighColor, cursor: 'pointer', textAlign: 'left', wordBreak: 'break-word', boxSizing: 'border-box', borderRadius: borderRadiusSmall, transition: ['background-color', 'color'].map(getTransition).join(), '&[role=status]': {
|
|
5711
|
+
cursor: 'not-allowed',
|
|
5712
|
+
}, '&__sr': getHiddenTextJssStyle() }, hoverMediaQuery({
|
|
5713
|
+
'&:not([aria-disabled]):not([role=status]):hover': {
|
|
5714
|
+
color: isHighContrastMode ? highlightColor : primaryColor,
|
|
5715
|
+
background: backgroundSurfaceColor,
|
|
5716
|
+
},
|
|
5717
|
+
})), { '&--highlighted, &--selected': {
|
|
5718
|
+
color: isHighContrastMode ? highlightColor : primaryColor,
|
|
5719
|
+
background: backgroundSurfaceColor,
|
|
5720
|
+
}, '&--selected': {
|
|
5721
|
+
cursor: 'default',
|
|
5722
|
+
pointerEvents: 'none',
|
|
5723
|
+
}, '&--disabled': {
|
|
5724
|
+
cursor: 'not-allowed',
|
|
5725
|
+
color: disabledColor,
|
|
5726
|
+
}, '&--hidden': {
|
|
5727
|
+
display: 'none',
|
|
5728
|
+
} }),
|
|
5729
|
+
optgroup: {
|
|
5730
|
+
display: 'block',
|
|
5731
|
+
padding: '3px 14px',
|
|
5732
|
+
fontWeight: fontWeightSemiBold,
|
|
5733
|
+
'&:not(:first-child)': {
|
|
5734
|
+
marginTop: spacingStaticSmall,
|
|
5735
|
+
},
|
|
5736
|
+
'&~$option': {
|
|
5737
|
+
paddingLeft: '24px',
|
|
5738
|
+
},
|
|
5739
|
+
},
|
|
5740
|
+
};
|
|
5741
|
+
};
|
|
5742
|
+
const getComponentCss$o = (direction, isOpen, state, disabled, filter, theme) => {
|
|
5743
|
+
const { primaryColor, contrastMediumColor, disabledColor } = getThemedColors(theme);
|
|
5744
|
+
const { formStateColor, formStateHoverColor } = getThemedFormStateColors(theme, state);
|
|
5745
|
+
return getCss(
|
|
5746
|
+
// merge because of global styles
|
|
5747
|
+
mergeDeep({
|
|
5748
|
+
'@global': {
|
|
5749
|
+
':host': Object.assign({ [dropdownPositionVar]: 'absolute', display: 'block', position: `var(${dropdownPositionVar})`, font: textSmallStyle.font.replace('ex', 'ex + 6px'), marginTop: `calc(-1 * (${fontLineHeight} + 10px + ${borderWidthBase} * 2 + ${spacingStaticSmall} * 2))`, paddingTop: `calc(${fontLineHeight} + 10px + ${borderWidthBase} * 2 + ${spacingStaticSmall} * 2)`, left: 0, right: 0, color: disabled ? disabledColor : formStateColor || contrastMediumColor }, (!disabled &&
|
|
5750
|
+
!isHighContrastMode &&
|
|
5751
|
+
hoverMediaQuery({
|
|
5752
|
+
'&(:hover)': {
|
|
5753
|
+
color: formStateHoverColor || primaryColor,
|
|
5754
|
+
},
|
|
5755
|
+
}))),
|
|
5756
|
+
},
|
|
5757
|
+
'sr-text': {
|
|
5758
|
+
display: 'none',
|
|
5759
|
+
},
|
|
5760
|
+
}, filter
|
|
5761
|
+
? getFilterStyles(direction, isOpen, state, disabled, theme)
|
|
5762
|
+
: getButtonStyles(direction, isOpen, state, theme), isOpen && getListStyles(direction, theme)));
|
|
5763
|
+
};
|
|
5764
|
+
|
|
5663
5765
|
const sizeSmall = '48px';
|
|
5664
5766
|
const sizeMedium = '72px';
|
|
5665
5767
|
const sizeLarge = '104px';
|
|
@@ -5722,7 +5824,7 @@ const getComponentCss$n = (size, theme) => {
|
|
|
5722
5824
|
},
|
|
5723
5825
|
},
|
|
5724
5826
|
root: Object.assign(Object.assign({ display: 'block' }, buildResponsiveStyles(size, (s) => sizeMap$1[s])), { margin: 0, padding: 0, boxSizing: 'border-box', strokeWidth: 1.5 }),
|
|
5725
|
-
'sr-only':
|
|
5827
|
+
'sr-only': getHiddenTextJssStyle(),
|
|
5726
5828
|
});
|
|
5727
5829
|
};
|
|
5728
5830
|
|
|
@@ -5785,7 +5887,7 @@ const getComponentCss$m = (state, disabled, theme) => {
|
|
|
5785
5887
|
height: fontLineHeight,
|
|
5786
5888
|
width: fontLineHeight,
|
|
5787
5889
|
},
|
|
5788
|
-
})), { 'sr-only':
|
|
5890
|
+
})), { 'sr-only': getHiddenTextJssStyle() }));
|
|
5789
5891
|
};
|
|
5790
5892
|
|
|
5791
5893
|
const getComponentCss$l = (size) => {
|
|
@@ -5875,7 +5977,7 @@ const getComponentCss$k = (alignLabel, hideLabel, stretch, checked, disabled, lo
|
|
|
5875
5977
|
},
|
|
5876
5978
|
})), { label: Object.assign(Object.assign(Object.assign({}, textSmallStyle), { paddingTop: '2px', minWidth: 0, minHeight: 0, color: textColor }), mergeDeep(buildResponsiveStyles(alignLabel, (alignLabelValue) => ({
|
|
5877
5979
|
order: alignLabelValue === 'left' ? -1 : 0,
|
|
5878
|
-
})), buildResponsiveStyles(hideLabel,
|
|
5980
|
+
})), buildResponsiveStyles(hideLabel, getHiddenTextJssStyle))) }));
|
|
5879
5981
|
};
|
|
5880
5982
|
|
|
5881
5983
|
const getComponentCss$j = () => {
|
|
@@ -5957,7 +6059,7 @@ const getComponentCss$g = (active, direction, hideLabel, multiline) => {
|
|
|
5957
6059
|
} }),
|
|
5958
6060
|
}
|
|
5959
6061
|
: hideLabel && {
|
|
5960
|
-
span: Object.assign(Object.assign({},
|
|
6062
|
+
span: Object.assign(Object.assign({}, getHiddenTextJssStyle()), { display: 'block', border: 0 }),
|
|
5961
6063
|
})) }, (sortable && {
|
|
5962
6064
|
icon: {
|
|
5963
6065
|
transition: getTransition('opacity'),
|
|
@@ -6027,9 +6129,9 @@ const getComponentCss$c = (size, weight, theme) => {
|
|
|
6027
6129
|
display: 'block',
|
|
6028
6130
|
position: 'absolute',
|
|
6029
6131
|
width: 0,
|
|
6030
|
-
height:
|
|
6132
|
+
height: '2px',
|
|
6031
6133
|
left: 0,
|
|
6032
|
-
bottom: isHighContrastMode ? '
|
|
6134
|
+
bottom: isHighContrastMode ? '0' : '-2px',
|
|
6033
6135
|
background: isHighContrastMode ? getHighContrastColors().canvasTextColor : primaryColor,
|
|
6034
6136
|
'&--enable-transition': {
|
|
6035
6137
|
willChange: 'width',
|
|
@@ -6108,7 +6210,7 @@ const getComponentCss$9 = (color, hasLabel, theme) => {
|
|
|
6108
6210
|
marginRight: '10px',
|
|
6109
6211
|
transition: getTransition('background-color'),
|
|
6110
6212
|
borderRadius: borderRadiusSmall,
|
|
6111
|
-
}, 'sr-only':
|
|
6213
|
+
}, 'sr-only': getHiddenTextJssStyle() }));
|
|
6112
6214
|
};
|
|
6113
6215
|
|
|
6114
6216
|
const getThemedBackgroundHoverColor = (tagColor, themedColors, theme) => {
|
|
@@ -6236,7 +6338,7 @@ const getComponentCss$7 = (isDisabled, hideLabel, state, hasUnitOrVisibleCounter
|
|
|
6236
6338
|
},
|
|
6237
6339
|
})), getFunctionalComponentRequiredStyles()), getFunctionalComponentStateMessageStyles(theme, state)), {
|
|
6238
6340
|
// TODO: could be made conditional if we had hasUnit
|
|
6239
|
-
'sr-only': Object.assign(Object.assign({},
|
|
6341
|
+
'sr-only': Object.assign(Object.assign({}, getHiddenTextJssStyle()), { padding: 0 }) }));
|
|
6240
6342
|
};
|
|
6241
6343
|
|
|
6242
6344
|
/** @deprecated */
|
|
@@ -6333,7 +6435,7 @@ const getComponentCss$3 = (isDisabled, hideLabel, state, hasCounter, theme) => {
|
|
|
6333
6435
|
color: contrastMediumColor,
|
|
6334
6436
|
},
|
|
6335
6437
|
})), getFunctionalComponentRequiredStyles()), getFunctionalComponentStateMessageStyles(theme, state)), (hasCounter && {
|
|
6336
|
-
'sr-only': Object.assign(Object.assign({},
|
|
6438
|
+
'sr-only': Object.assign(Object.assign({}, getHiddenTextJssStyle()), { padding: 0 }),
|
|
6337
6439
|
})));
|
|
6338
6440
|
};
|
|
6339
6441
|
|
|
@@ -6402,4 +6504,4 @@ const getComponentCss = (size, theme) => {
|
|
|
6402
6504
|
});
|
|
6403
6505
|
};
|
|
6404
6506
|
|
|
6405
|
-
export { getComponentCss$Y as getAccordionCss, getComponentCss$X as getBannerCss, getComponentCss$T as getButtonCss, getComponentCss$W as getButtonGroupCss, getComponentCss$V as getButtonPureCss, getComponentCss$U as getButtonTileCss, getComponentCss$S as getCarouselCss, getComponentCss$R as getCheckboxWrapperCss, getComponentCss$Q as getContentWrapperCss, getComponentCss$P as getCrestCss, getComponentCss$O as getDisplayCss, getComponentCss$N as getDividerCss, getComponentCss$L as getFieldsetCss, getComponentCss$M as getFieldsetWrapperCss, getComponentCss$J as getFlexCss, getComponentCss$K as getFlexItemCss, getFunctionalComponentRequiredStyles, getFunctionalComponentStateMessageStyles, getComponentCss$H as getGridCss, getComponentCss$I as getGridItemCss, getComponentCss$G as getHeadingCss, getComponentCss$F as getHeadlineCss, getComponentCss$E as getIconCss, getComponentCss$D as getInlineNotificationCss, getComponentCss$B as getLinkCss, getComponentCss$C as getLinkPureCss, getComponentCss$B as getLinkSocialCss, getComponentCss$z as getLinkTileCss, getComponentCss$A as getLinkTileModelSignatureCss, getComponentCss$y as getMarqueCss, getComponentCss$x as getModalCss, getComponentCss$w as getModelSignatureCss, getComponentCss$v as getPaginationCss, getComponentCss$u as getPopoverCss, getComponentCss$t as getRadioButtonWrapperCss, getComponentCss$s as getScrollerCss, getComponentCss$q as getSegmentedControlCss, getComponentCss$r as getSegmentedControlItemCss, getComponentCss$p as getSelectWrapperCss, getComponentCss$n as getSpinnerCss, getComponentCss$l as getStepperHorizontalCss, getComponentCss$m as getStepperHorizontalItemCss, getComponentCss$k as getSwitchCss, getComponentCss$j as getTableBodyCss, getComponentCss$i as getTableCellCss, getComponentCss$h as getTableCss, getComponentCss$g as getTableHeadCellCss, getComponentCss$e as getTableHeadCss, getComponentCss$f as getTableHeadRowCss, getComponentCss$d as getTableRowCss, getComponentCss$c as getTabsBarCss, getComponentCss$a as getTabsCss, getComponentCss$b as getTabsItemCss, getComponentCss$8 as getTagCss, getComponentCss$9 as getTagDismissibleCss, getComponentCss$4 as getTextCss, getComponentCss$7 as getTextFieldWrapperCss, getComponentCss$6 as getTextListCss, getComponentCss$5 as getTextListItemCss, getComponentCss$3 as getTextareaWrapperCss, getComponentCss$1 as getToastCss, getComponentCss as getWordmarkCss };
|
|
6507
|
+
export { getComponentCss$Y as getAccordionCss, getComponentCss$X as getBannerCss, getComponentCss$T as getButtonCss, getComponentCss$W as getButtonGroupCss, getComponentCss$V as getButtonPureCss, getComponentCss$U as getButtonTileCss, getComponentCss$S as getCarouselCss, getComponentCss$R as getCheckboxWrapperCss, getComponentCss$Q as getContentWrapperCss, getComponentCss$P as getCrestCss, getComponentCss$O as getDisplayCss, getComponentCss$N as getDividerCss, getComponentCss$L as getFieldsetCss, getComponentCss$M as getFieldsetWrapperCss, getComponentCss$J as getFlexCss, getComponentCss$K as getFlexItemCss, getFunctionalComponentRequiredStyles, getFunctionalComponentStateMessageStyles, getComponentCss$H as getGridCss, getComponentCss$I as getGridItemCss, getComponentCss$G as getHeadingCss, getComponentCss$F as getHeadlineCss, getComponentCss$E as getIconCss, getComponentCss$D as getInlineNotificationCss, getComponentCss$B as getLinkCss, getComponentCss$C as getLinkPureCss, getComponentCss$B as getLinkSocialCss, getComponentCss$z as getLinkTileCss, getComponentCss$A as getLinkTileModelSignatureCss, getComponentCss$y as getMarqueCss, getComponentCss$x as getModalCss, getComponentCss$w as getModelSignatureCss, getComponentCss$v as getPaginationCss, getComponentCss$u as getPopoverCss, getComponentCss$t as getRadioButtonWrapperCss, getComponentCss$s as getScrollerCss, getComponentCss$q as getSegmentedControlCss, getComponentCss$r as getSegmentedControlItemCss, getComponentCss$p as getSelectWrapperCss, getComponentCss$o as getSelectWrapperDropdownCss, getComponentCss$n as getSpinnerCss, getComponentCss$l as getStepperHorizontalCss, getComponentCss$m as getStepperHorizontalItemCss, getComponentCss$k as getSwitchCss, getComponentCss$j as getTableBodyCss, getComponentCss$i as getTableCellCss, getComponentCss$h as getTableCss, getComponentCss$g as getTableHeadCellCss, getComponentCss$e as getTableHeadCss, getComponentCss$f as getTableHeadRowCss, getComponentCss$d as getTableRowCss, getComponentCss$c as getTabsBarCss, getComponentCss$a as getTabsCss, getComponentCss$b as getTabsItemCss, getComponentCss$8 as getTagCss, getComponentCss$9 as getTagDismissibleCss, getComponentCss$4 as getTextCss, getComponentCss$7 as getTextFieldWrapperCss, getComponentCss$6 as getTextListCss, getComponentCss$5 as getTextListItemCss, getComponentCss$3 as getTextareaWrapperCss, getComponentCss$1 as getToastCss, getComponentCss as getWordmarkCss };
|
|
@@ -166,6 +166,13 @@ hasWindow &&
|
|
|
166
166
|
.forEach((node) => childrenMutationMap.get(node)());
|
|
167
167
|
});
|
|
168
168
|
|
|
169
|
+
const isTouchDevice = () => {
|
|
170
|
+
if (!hasWindow) {
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
return !!('ontouchstart' in window || window.navigator.maxTouchPoints > 0);
|
|
174
|
+
};
|
|
175
|
+
|
|
169
176
|
/* eslint-disable no-undefined,no-param-reassign,no-shadow */
|
|
170
177
|
|
|
171
178
|
/**
|
|
@@ -3072,6 +3079,10 @@ function jssNested() {
|
|
|
3072
3079
|
};
|
|
3073
3080
|
}
|
|
3074
3081
|
|
|
3082
|
+
function getDefaultExportFromCjs (x) {
|
|
3083
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
3084
|
+
}
|
|
3085
|
+
|
|
3075
3086
|
function getAugmentedNamespace(n) {
|
|
3076
3087
|
if (n.__esModule) return n;
|
|
3077
3088
|
var f = n.default;
|
|
@@ -3133,7 +3144,7 @@ var _tslib$1 = {};
|
|
|
3133
3144
|
return t;
|
|
3134
3145
|
};
|
|
3135
3146
|
return exports.__assign.apply(this, arguments);
|
|
3136
|
-
};
|
|
3147
|
+
};
|
|
3137
3148
|
} (_tslib$1));
|
|
3138
3149
|
|
|
3139
3150
|
var require$$1 = /*@__PURE__*/getAugmentedNamespace(jss_esm);
|
|
@@ -3493,6 +3504,8 @@ function jssCombineAndSortMQ(options) {
|
|
|
3493
3504
|
|
|
3494
3505
|
var dist = jssCombineAndSortMQ;
|
|
3495
3506
|
|
|
3507
|
+
var jssPluginSortMediaQueries = /*@__PURE__*/getDefaultExportFromCjs(dist);
|
|
3508
|
+
|
|
3496
3509
|
/* Auto Generated Start */
|
|
3497
3510
|
const themeLight = {
|
|
3498
3511
|
primaryColor: '#010205',
|
|
@@ -3615,7 +3628,7 @@ createJss({
|
|
|
3615
3628
|
jssGlobal(),
|
|
3616
3629
|
jssNested(),
|
|
3617
3630
|
camelCase$1(),
|
|
3618
|
-
|
|
3631
|
+
jssPluginSortMediaQueries({ combineMediaQueries: true }),
|
|
3619
3632
|
],
|
|
3620
3633
|
});
|
|
3621
3634
|
const supportsConstructableStylesheets = () => {
|
|
@@ -3641,10 +3654,6 @@ const isScrollable = (isPrevHidden, isNextHidden) => {
|
|
|
3641
3654
|
const hasDocument = typeof document !== 'undefined';
|
|
3642
3655
|
|
|
3643
3656
|
hasDocument && 'scrollBehavior' in document.documentElement.style;
|
|
3644
|
-
const win = typeof window !== 'undefined' ? window : {};
|
|
3645
|
-
win.document || { head: {} };
|
|
3646
|
-
(win.HTMLElement || class {
|
|
3647
|
-
});
|
|
3648
3657
|
|
|
3649
3658
|
const formatObjectOutput = (value) => {
|
|
3650
3659
|
return JSON.stringify(value)
|
|
@@ -3795,7 +3804,7 @@ Object.entries(innerManifest[size])
|
|
|
3795
3804
|
.join();
|
|
3796
3805
|
|
|
3797
3806
|
const CDN_BASE_URL = (typeof window !== 'undefined' && window.PORSCHE_DESIGN_SYSTEM_CDN === 'cn' ? 'https://cdn.ui.porsche.cn' : 'https://cdn.ui.porsche.com') + '/porsche-design-system/model-signatures';
|
|
3798
|
-
const MODEL_SIGNATURES_MANIFEST = { "718": "718.min.
|
|
3807
|
+
const MODEL_SIGNATURES_MANIFEST = { "718": "718.min.d92dc0fe91e67bd51120d91c5cd1eb2f.svg", "911": "911.min.5c462658f9d472e90a139173414e8fdd.svg", "boxster": "boxster.min.5e7b22a1fa25004a4f97807d57f32b21.svg", "cayenne": "cayenne.min.4026ba6b335cc98e10592f900cf731e1.svg", "cayman": "cayman.min.c634f6f3de1d67610b2e4230e60337fb.svg", "macan": "macan.min.e38fbf34ed4f00066620901babd99af0.svg", "panamera": "panamera.min.d35913b252657f7c5cfcae74cfd61b26.svg", "taycan": "taycan.min.ba4e7c3cb86a78d626d4463b81be0f23.svg", "turbo-s": "turbo-s.min.8201d60c1b5e00daf9e23784fd199111.svg", "turbo": "turbo.min.cfde5de85fdc84be597dfad4402c5f6f.svg" };
|
|
3799
3808
|
const getSvgUrl = (model) => {
|
|
3800
3809
|
const cdnBaseUrl = CDN_BASE_URL
|
|
3801
3810
|
;
|
|
@@ -4012,6 +4021,29 @@ if (tempIcon) {
|
|
|
4012
4021
|
tempIcon.style.width = ICON_SIZE;
|
|
4013
4022
|
tempIcon.style.marginRight = ICON_MARGIN;
|
|
4014
4023
|
}
|
|
4024
|
+
const getSelectWrapperDropdownButtonAriaAttributes = (isOpen, labelId, descriptionId, dropdownId, activeDescendantId) => {
|
|
4025
|
+
return Object.assign({ 'aria-labelledby': labelId, 'aria-describedby': descriptionId || null, 'aria-haspopup': 'listbox', 'aria-expanded': isOpen ? 'true' : 'false', 'aria-controls': dropdownId }, (isOpen && {
|
|
4026
|
+
'aria-activedescendant': `option-${activeDescendantId}`,
|
|
4027
|
+
}));
|
|
4028
|
+
};
|
|
4029
|
+
const getFilterInputAriaAttributes = (isOpen, isRequired, labelId, descriptionId, dropdownId, activeDescendantId) => {
|
|
4030
|
+
return Object.assign(Object.assign(Object.assign({}, getSelectWrapperDropdownButtonAriaAttributes(isOpen, labelId, descriptionId, dropdownId, activeDescendantId)), { 'aria-autocomplete': 'list' }), (isRequired && {
|
|
4031
|
+
'aria-required': 'true',
|
|
4032
|
+
}));
|
|
4033
|
+
};
|
|
4034
|
+
const getHighlightedOptionMapIndex = (arr) => arr.findIndex((item) => item.highlighted);
|
|
4035
|
+
const getSelectedOptionMap = (arr) => arr.find((item) => item.selected);
|
|
4036
|
+
const isCustomDropdown = (filter, native) => {
|
|
4037
|
+
if (filter) {
|
|
4038
|
+
return true;
|
|
4039
|
+
}
|
|
4040
|
+
else if (native) {
|
|
4041
|
+
return false;
|
|
4042
|
+
}
|
|
4043
|
+
else {
|
|
4044
|
+
return !isTouchDevice();
|
|
4045
|
+
}
|
|
4046
|
+
};
|
|
4015
4047
|
const isStateCompleteOrWarning = (state) => {
|
|
4016
4048
|
return state === 'complete' || state === 'warning';
|
|
4017
4049
|
};
|
|
@@ -4055,4 +4087,4 @@ const getTextTagType = (host, tag) => {
|
|
|
4055
4087
|
}
|
|
4056
4088
|
};
|
|
4057
4089
|
|
|
4058
|
-
export { DISPLAY_TAGS, HEADING_TAGS, HEADLINE_TAGS, TEXT_TAGS, _hasShowPickerSupport, attributeMutationMap, buildCrestSrcSet, buildIconUrl, buildSrcSet, cdnBaseUrl, childrenMutationMap, createPaginationModel, createRange, crestCdnBaseUrl, crestInnerManifest, crestSize, 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, isHighContrastMode, isListTypeOrdered, isScrollable, isSortable, isStateCompleteOrWarning, isThemeDark, isType, isUrl, isWithinForm, itemTypes, modelSignatureHeight, parseAndGetAriaAttributes, parseJSONAttribute, resizeMap, showCustomCalendarOrTimeIndicator, supportsConstructableStylesheets, tempDiv, tempIcon, tempLabel };
|
|
4090
|
+
export { DISPLAY_TAGS, HEADING_TAGS, HEADLINE_TAGS, TEXT_TAGS, _hasShowPickerSupport, attributeMutationMap, buildCrestSrcSet, buildIconUrl, buildSrcSet, cdnBaseUrl, childrenMutationMap, createPaginationModel, createRange, crestCdnBaseUrl, crestInnerManifest, crestSize, displaySizeToTagMap, getButtonAriaAttributes, getButtonAttributes, getButtonBaseAriaAttributes, getButtonPureAriaAttributes, getClosestHTMLElement, getContentAriaAttributes, getCurrentActivePage, getDirectChildHTMLElement, getDisplayTagType, getFilterInputAriaAttributes, getHTMLElement, getHeadingTagType, getHeadlineTagType, getHighlightedOptionMapIndex, getIconColor, getInlineNotificationIconName, getInnerManifest, getLinkButtonThemeForIcon, getRole, getSelectWrapperDropdownButtonAriaAttributes, getSelectedOptionMap, getStepperHorizontalIconName, getSvgUrl, getSwitchButtonAriaAttributes, getTextTagType, getThemeForIcon, getTotalPages, hasDocument, hasLocateAction, hasSpecificSlottedTag, hasVisibleIcon, hasWindow, isCustomDropdown, isDisabledOrLoading, isHighContrastMode, isListTypeOrdered, isScrollable, isSortable, isStateCompleteOrWarning, isThemeDark, isTouchDevice, isType, isUrl, isWithinForm, itemTypes, modelSignatureHeight, parseAndGetAriaAttributes, parseJSONAttribute, resizeMap, showCustomCalendarOrTimeIndicator, supportsConstructableStylesheets, tempDiv, tempIcon, tempLabel };
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/icon.wrapper.js
CHANGED
|
@@ -4,7 +4,7 @@ import { usePrefix, useBrowserLayoutEffect, useMergedClass } from '../../hooks.j
|
|
|
4
4
|
import { syncRef } from '../../utils.js';
|
|
5
5
|
import { DSRIcon } from '../dsr-components/icon.js';
|
|
6
6
|
|
|
7
|
-
const PIcon = forwardRef(({ aria, color = 'primary', lazy
|
|
7
|
+
const PIcon = forwardRef(({ aria, color = 'primary', lazy, name = 'arrow-right', size = 'small', source, theme = 'light', className, ...rest }, ref) => {
|
|
8
8
|
const elementRef = useRef();
|
|
9
9
|
const WebComponentTag = usePrefix('p-icon');
|
|
10
10
|
const propsToSync = [aria, color, lazy, name, size, source, theme];
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/scroller.wrapper.js
CHANGED
|
@@ -4,13 +4,13 @@ import { usePrefix, useBrowserLayoutEffect, useMergedClass } from '../../hooks.j
|
|
|
4
4
|
import { syncRef } from '../../utils.js';
|
|
5
5
|
import { DSRScroller } from '../dsr-components/scroller.js';
|
|
6
6
|
|
|
7
|
-
const PScroller = forwardRef(({ alignScrollIndicator = 'center', gradientColor = 'background-base', gradientColorScheme, scrollIndicatorPosition, scrollToPosition, scrollbar = false, theme = 'light', className, children, ...rest }, ref) => {
|
|
7
|
+
const PScroller = forwardRef(({ alignScrollIndicator = 'center', aria, gradientColor = 'background-base', gradientColorScheme, scrollIndicatorPosition, scrollToPosition, scrollbar = false, theme = 'light', className, children, ...rest }, ref) => {
|
|
8
8
|
const elementRef = useRef();
|
|
9
9
|
const WebComponentTag = usePrefix('p-scroller');
|
|
10
|
-
const propsToSync = [alignScrollIndicator, gradientColor, gradientColorScheme, scrollIndicatorPosition, scrollToPosition, scrollbar, theme];
|
|
10
|
+
const propsToSync = [alignScrollIndicator, aria, gradientColor, gradientColorScheme, scrollIndicatorPosition, scrollToPosition, scrollbar, theme];
|
|
11
11
|
useBrowserLayoutEffect(() => {
|
|
12
12
|
const { current } = elementRef;
|
|
13
|
-
['alignScrollIndicator', 'gradientColor', 'gradientColorScheme', 'scrollIndicatorPosition', 'scrollToPosition', 'scrollbar', 'theme'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
13
|
+
['alignScrollIndicator', 'aria', 'gradientColor', 'gradientColorScheme', 'scrollIndicatorPosition', 'scrollToPosition', 'scrollbar', 'theme'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
14
14
|
}, propsToSync);
|
|
15
15
|
// @ts-ignore
|
|
16
16
|
if (!process.browser) {
|
|
@@ -21,7 +21,7 @@ const PScroller = forwardRef(({ alignScrollIndicator = 'center', gradientColor =
|
|
|
21
21
|
// @ts-ignore
|
|
22
22
|
...(!process.browser
|
|
23
23
|
? {
|
|
24
|
-
children: (jsx(DSRScroller, { ...{ alignScrollIndicator, gradientColor, gradientColorScheme, scrollIndicatorPosition, scrollToPosition, scrollbar, theme, children } })),
|
|
24
|
+
children: (jsx(DSRScroller, { ...{ alignScrollIndicator, aria, gradientColor, gradientColorScheme, scrollIndicatorPosition, scrollToPosition, scrollbar, theme, children } })),
|
|
25
25
|
}
|
|
26
26
|
: {
|
|
27
27
|
children,
|