@porsche-design-system/components-react 3.14.0 → 3.15.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/cjs/lib/components/model-signature.wrapper.cjs +3 -3
- package/esm/lib/components/model-signature.wrapper.d.ts +29 -3
- package/esm/lib/components/model-signature.wrapper.mjs +3 -3
- package/esm/lib/types.d.ts +56 -10
- package/package.json +2 -2
- package/ssr/cjs/components/dist/styles/esm/styles-entry.cjs +51 -44
- package/ssr/cjs/components/dist/utils/esm/utils-entry.cjs +10 -5
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/model-signature.wrapper.cjs +5 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flyout-navigation-item.cjs +1 -5
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flyout-navigation.cjs +1 -5
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flyout.cjs +1 -5
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/modal.cjs +1 -15
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/model-signature.cjs +6 -2
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-option.cjs +9 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/text-field-wrapper.cjs +2 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/textarea-wrapper.cjs +1 -0
- package/ssr/esm/components/dist/styles/esm/styles-entry.mjs +51 -44
- package/ssr/esm/components/dist/utils/esm/utils-entry.mjs +10 -5
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/model-signature.wrapper.mjs +5 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flyout-navigation-item.mjs +1 -5
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flyout-navigation.mjs +1 -5
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flyout.mjs +1 -5
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/modal.mjs +1 -15
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/model-signature.mjs +8 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-option.mjs +10 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/text-field-wrapper.mjs +2 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/textarea-wrapper.mjs +1 -0
- package/ssr/esm/lib/components/model-signature.wrapper.d.ts +29 -3
- package/ssr/esm/lib/dsr-components/modal.d.ts +0 -8
- package/ssr/esm/lib/dsr-components/text-field-wrapper.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/textarea-wrapper.d.ts +1 -0
- package/ssr/esm/lib/types.d.ts +56 -10
|
@@ -95,6 +95,7 @@ class DSRTextFieldWrapper extends react.Component {
|
|
|
95
95
|
hasCounter;
|
|
96
96
|
isCounterVisible;
|
|
97
97
|
hasUnit;
|
|
98
|
+
eventListener;
|
|
98
99
|
render() {
|
|
99
100
|
const { children, namedSlotChildren, otherChildren } = splitChildren.splitChildren(this.props.children);
|
|
100
101
|
const { readOnly, disabled, type } = typeof otherChildren[0] === 'object' && 'props' in otherChildren[0] && otherChildren[0]?.props || {};
|
|
@@ -110,8 +111,8 @@ class DSRTextFieldWrapper extends react.Component {
|
|
|
110
111
|
const isTime = utilsEntry.isType(type, 'time');
|
|
111
112
|
utilsEntry.isWithinForm(this.props.host);
|
|
112
113
|
const hasAction = utilsEntry.hasLocateAction(this.props.actionIcon);
|
|
113
|
-
const hasCounter = false; // hasCounterAndIsTypeText(otherChildren[0]?.props);
|
|
114
114
|
const isClearable = typeof otherChildren[0] === 'object' && 'props' in otherChildren[0] && !!otherChildren[0]?.props.value;
|
|
115
|
+
const hasCounter = false; // hasCounterAndIsTypeText(otherChildren[0]?.props);
|
|
115
116
|
const style = minifyCss.minifyCss(stripFocusAndHoverStyles.stripFocusAndHoverStyles(stylesEntry.getTextFieldWrapperCss(disabled, this.props.hideLabel, this.props.state, this.props.isCounterVisible, this.props.isCounterVisible ? 'suffix' : this.props.unitPosition, isPassword ? 'password' : type, this.props.showPasswordToggle, this.props.isWithinForm, this.props.submitButton, this.props.theme)));
|
|
116
117
|
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsxs("div", { className: "root", children: [jsxRuntime.jsx(label.Label, { hasLabel: this.props.label || namedSlotChildren.filter(({ props: { slot } }) => slot === 'label').length > 0, hasDescription: this.props.description || namedSlotChildren.filter(({ props: { slot } }) => slot === 'description').length > 0, host: null, label: this.props.label, description: this.props.description, formElement: typeof otherChildren[0] === 'object' && 'props' in otherChildren[0] && otherChildren[0]?.props, isDisabled: disabled }), jsxRuntime.jsxs("div", { className: "wrapper", children: [jsxRuntime.jsx("slot", {}), hasCounter , (this.props.isCounterVisible) && (jsxRuntime.jsx("span", { className: "unit-counter", "aria-hidden": "true", children: this.props.unit })), isPassword && this.props.showPasswordToggle ? (jsxRuntime.jsx(buttonPure_wrapper.PButtonPure, { ...buttonProps, type: "button", icon: this.props.showPassword ? 'view-off' : 'view', disabled: disabled, aria: { 'aria-pressed': this.props.showPassword ? 'true' : 'false' }, children: "Toggle password visibility" })) : utilsEntry.showCustomCalendarOrTimeIndicator(isCalendar, isTime) ? (jsxRuntime.jsxs(buttonPure_wrapper.PButtonPure, { ...buttonProps, type: "button", icon: isCalendar ? 'calendar' : 'clock', disabled: disabled, children: ["Show $", isCalendar ? 'date' : 'time', " picker"] })) : (isSearch && [
|
|
117
118
|
// TODO: create an own component, which would fix SSR support too
|
|
@@ -15,6 +15,7 @@ class DSRTextareaWrapper extends react.Component {
|
|
|
15
15
|
counterElement;
|
|
16
16
|
ariaElement;
|
|
17
17
|
hasCounter;
|
|
18
|
+
eventListener;
|
|
18
19
|
render() {
|
|
19
20
|
const { children, namedSlotChildren, otherChildren } = splitChildren.splitChildren(this.props.children);
|
|
20
21
|
const { disabled } = typeof otherChildren[0] === 'object' && 'props' in otherChildren[0] && otherChildren[0]?.props || {};
|
|
@@ -40,7 +40,7 @@ function toPrimitive(t, r) {
|
|
|
40
40
|
|
|
41
41
|
function toPropertyKey(t) {
|
|
42
42
|
var i = toPrimitive(t, "string");
|
|
43
|
-
return "symbol" == _typeof(i) ? i :
|
|
43
|
+
return "symbol" == _typeof(i) ? i : i + "";
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
function _defineProperties(target, props) {
|
|
@@ -3682,6 +3682,10 @@ debounce(800, (el, ariaElement) => {
|
|
|
3682
3682
|
ariaElement.innerText = `You have ${el.maxLength - el.value.length} out of ${el.maxLength} characters left`;
|
|
3683
3683
|
});
|
|
3684
3684
|
|
|
3685
|
+
const getCDNBaseURL = () => global.PORSCHE_DESIGN_SYSTEM_CDN_URL + "/porsche-design-system";
|
|
3686
|
+
|
|
3687
|
+
const MODEL_SIGNATURES_MANIFEST = { "718": { "src": "718.min.493a9e3509d6e263fa2207150082def5.svg", "width": 79, "height": 26 }, "911": { "src": "911.min.b68f913216168583298ccf83f1a6b8d5.svg", "width": 94, "height": 25 }, "boxster": { "src": "boxster.min.c321738789b37fda4bba3f7c587542aa.svg", "width": 239, "height": 26 }, "cayenne": { "src": "cayenne.min.25562011631a831516f91ec31d144104.svg", "width": 245, "height": 35 }, "cayman": { "src": "cayman.min.cc8919694c002873e1bb6a3c1dae5d41.svg", "width": 229, "height": 35 }, "macan": { "src": "macan.min.a1844f4c8d23b75e371745e9b8eb49b9.svg", "width": 196, "height": 26 }, "panamera": { "src": "panamera.min.6dae8095186567168f85c145845f090c.svg", "width": 260, "height": 25 }, "taycan": { "src": "taycan.min.df444c6f4cc1f627ceaf1b02584d6bea.svg", "width": 167, "height": 36 }, "turbo-s": { "src": "turbo-s.min.73f1e10731caffe93c07d96fa08546c1.svg", "width": 199, "height": 25 }, "turbo": { "src": "turbo.min.6a4084a8704a6c47a099b2de56b22aef.svg", "width": 143, "height": 25 } };
|
|
3688
|
+
|
|
3685
3689
|
/* Auto Generated Start */
|
|
3686
3690
|
const themeLight = {
|
|
3687
3691
|
primaryColor: '#010205',
|
|
@@ -3951,6 +3955,10 @@ const getSchemedHighContrastMediaQuery = (light, dark) => {
|
|
|
3951
3955
|
};
|
|
3952
3956
|
};
|
|
3953
3957
|
|
|
3958
|
+
const forcedColorsMediaQuery = (style) => {
|
|
3959
|
+
return { '@media (forced-colors: active)': style };
|
|
3960
|
+
};
|
|
3961
|
+
|
|
3954
3962
|
// NOTE: handpicked selection of plugins from jss-preset-default
|
|
3955
3963
|
const jss = createJss({
|
|
3956
3964
|
plugins: [
|
|
@@ -7033,64 +7041,63 @@ const getComponentCss$C = (isOpen, backdrop, isFullscreen, hasDismissButton, has
|
|
|
7033
7041
|
});
|
|
7034
7042
|
};
|
|
7035
7043
|
|
|
7036
|
-
const
|
|
7037
|
-
|
|
7038
|
-
const colorToFilterLight = {
|
|
7039
|
-
primary: filterLightPrimary,
|
|
7040
|
-
'contrast-low': filterLightContrastLow,
|
|
7041
|
-
'contrast-medium': filterLightContrastMedium,
|
|
7042
|
-
'contrast-high': filterLightContrastHigh,
|
|
7043
|
-
};
|
|
7044
|
-
const colorToFilterDark = {
|
|
7045
|
-
primary: filterDarkPrimary,
|
|
7046
|
-
'contrast-low': filterDarkContrastLow,
|
|
7047
|
-
'contrast-medium': filterDarkContrastMedium,
|
|
7048
|
-
'contrast-high': filterDarkContrastHigh,
|
|
7044
|
+
const getSvgUrl = (model) => {
|
|
7045
|
+
return `${getCDNBaseURL()}/model-signatures/${MODEL_SIGNATURES_MANIFEST[model].src}`;
|
|
7049
7046
|
};
|
|
7050
|
-
|
|
7051
|
-
|
|
7052
|
-
|
|
7053
|
-
|
|
7047
|
+
|
|
7048
|
+
const cssVariableWidth = '--p-model-signature-width';
|
|
7049
|
+
const cssVariableHeight = '--p-model-signature-height';
|
|
7050
|
+
const cssVariableColor = '--p-model-signature-color';
|
|
7051
|
+
const { canvasTextColor: canvasTextColor$1 } = getHighContrastColors();
|
|
7052
|
+
const getThemedColor = (color, themedColors) => {
|
|
7053
|
+
const colorMap = {
|
|
7054
|
+
primary: themedColors.primaryColor,
|
|
7055
|
+
inherit: 'black',
|
|
7056
|
+
'contrast-low': themedColors.contrastLowColor,
|
|
7057
|
+
'contrast-medium': themedColors.contrastMediumColor,
|
|
7058
|
+
'contrast-high': themedColors.contrastHighColor,
|
|
7059
|
+
};
|
|
7060
|
+
return colorMap[color];
|
|
7054
7061
|
};
|
|
7055
|
-
const getComponentCss$B = (size, color, theme) => {
|
|
7062
|
+
const getComponentCss$B = (model, safeZone, size, color, theme) => {
|
|
7063
|
+
const { width, height } = MODEL_SIGNATURES_MANIFEST[model];
|
|
7056
7064
|
const isSizeInherit = size === 'inherit';
|
|
7057
|
-
const isColorInherit = color === 'inherit';
|
|
7058
7065
|
return getCss({
|
|
7059
7066
|
'@global': {
|
|
7060
7067
|
':host': {
|
|
7061
7068
|
display: 'inline-block',
|
|
7062
7069
|
verticalAlign: 'top',
|
|
7070
|
+
maxWidth: '100%',
|
|
7071
|
+
maxHeight: '100%',
|
|
7072
|
+
// width + height style can't be !important atm to be backwards compatible with e.g. `<p-model-signature size="inherit" style="height: 50px"/>`
|
|
7073
|
+
width: `var(${cssVariableWidth},${isSizeInherit ? 'auto' : width + 'px'})`,
|
|
7074
|
+
height: `var(${cssVariableHeight},auto)`,
|
|
7063
7075
|
...addImportantToEachRule({
|
|
7064
|
-
|
|
7065
|
-
|
|
7066
|
-
|
|
7067
|
-
|
|
7068
|
-
|
|
7069
|
-
|
|
7070
|
-
|
|
7076
|
+
mask: `url(${getSvgUrl(model)}) no-repeat left top / contain`,
|
|
7077
|
+
aspectRatio: `${width} / ${safeZone ? 36 : height}`, // 36px is the max-height for SVG model signature creation
|
|
7078
|
+
background: `var(${cssVariableColor},${getThemedColor(color, getThemedColors(theme))})`,
|
|
7079
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7080
|
+
background: `var(${cssVariableColor},${getThemedColor(color, getThemedColors('dark'))})`,
|
|
7081
|
+
}),
|
|
7082
|
+
...forcedColorsMediaQuery({
|
|
7083
|
+
background: canvasTextColor$1,
|
|
7071
7084
|
}),
|
|
7072
7085
|
...colorSchemeStyles,
|
|
7073
7086
|
...hostHiddenStyles,
|
|
7074
7087
|
}),
|
|
7075
7088
|
},
|
|
7089
|
+
'::slotted(:is(img,video))': addImportantToEachRule({
|
|
7090
|
+
display: 'block', // prevents unintended bottom white-space
|
|
7091
|
+
width: '100%',
|
|
7092
|
+
height: '100%',
|
|
7093
|
+
objectFit: 'cover',
|
|
7094
|
+
}),
|
|
7095
|
+
// the <img /> is only needed for a11y compliance because of alt text and to handle the fetch priority
|
|
7076
7096
|
img: {
|
|
7077
|
-
|
|
7078
|
-
|
|
7079
|
-
|
|
7080
|
-
|
|
7081
|
-
...(!isColorInherit && {
|
|
7082
|
-
filter: colorToFilterMap[theme][color],
|
|
7083
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7084
|
-
filter: colorToFilterMap.dark[color],
|
|
7085
|
-
}),
|
|
7086
|
-
...(isHighContrastMode &&
|
|
7087
|
-
getSchemedHighContrastMediaQuery({
|
|
7088
|
-
filter: colorToFilterMap.light[color],
|
|
7089
|
-
}, {
|
|
7090
|
-
filter: colorToFilterMap.dark[color],
|
|
7091
|
-
})),
|
|
7092
|
-
}),
|
|
7093
|
-
...(isSizeInherit && { height: size }),
|
|
7097
|
+
position: 'absolute', // prevents unintended bottom white-space
|
|
7098
|
+
opacity: 0,
|
|
7099
|
+
width: '1px',
|
|
7100
|
+
height: '1px',
|
|
7094
7101
|
},
|
|
7095
7102
|
},
|
|
7096
7103
|
});
|
|
@@ -40,7 +40,7 @@ function toPrimitive(t, r) {
|
|
|
40
40
|
|
|
41
41
|
function toPropertyKey(t) {
|
|
42
42
|
var i = toPrimitive(t, "string");
|
|
43
|
-
return "symbol" == _typeof(i) ? i :
|
|
43
|
+
return "symbol" == _typeof(i) ? i : i + "";
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
function _defineProperties(target, props) {
|
|
@@ -3245,6 +3245,12 @@ const getListAriaAttributes = (label, isRequired, hasFilter, isOpen, multiple =
|
|
|
3245
3245
|
}),
|
|
3246
3246
|
};
|
|
3247
3247
|
};
|
|
3248
|
+
const getOptionAriaAttributes = (isSelected, isDisabled, isHidden, hasValue) => ({
|
|
3249
|
+
...(!isHidden && { 'aria-selected': isSelected ? 'true' : 'false' }),
|
|
3250
|
+
'aria-disabled': isDisabled ? 'true' : null,
|
|
3251
|
+
'aria-hidden': isHidden ? 'true' : null,
|
|
3252
|
+
'aria-label': hasValue ? null : 'Empty value',
|
|
3253
|
+
});
|
|
3248
3254
|
|
|
3249
3255
|
const attributeMutationMap = new Map();
|
|
3250
3256
|
hasWindow &&
|
|
@@ -3544,7 +3550,7 @@ const ICONS_MANIFEST = { "360": "360.min.d3b2874981886b5ebece31655f92a3ad.svg",
|
|
|
3544
3550
|
|
|
3545
3551
|
const MARQUES_MANIFEST = { "porscheMarqueTrademark": { "medium": { "1x": { "png": "porsche-marque-trademark.medium.min.da075315857e239ff46bf4c150648ff0@1x.png", "webp": "porsche-marque-trademark.medium.min.5c6af9aa7946fea34f60c8f8c95d0188@1x.webp" }, "2x": { "png": "porsche-marque-trademark.medium.min.aa801f42028b1c385a5e26ae115da598@2x.png", "webp": "porsche-marque-trademark.medium.min.fff6e9b91481cc5b1fc6c9b62987ccaf@2x.webp" }, "3x": { "png": "porsche-marque-trademark.medium.min.824818d15eaf445f50e0a2391613f214@3x.png", "webp": "porsche-marque-trademark.medium.min.f67092ff6b5f4ecb4add73d6ae153db0@3x.webp" } }, "small": { "1x": { "png": "porsche-marque-trademark.small.min.020244b41a29323e2a7932a264514cdf@1x.png", "webp": "porsche-marque-trademark.small.min.783639706bead66b2d56e3b8b64bd61f@1x.webp" }, "2x": { "png": "porsche-marque-trademark.small.min.92184fae44511ceda8320443c17110b1@2x.png", "webp": "porsche-marque-trademark.small.min.760a57efa93d4e7e16e26128ec7ead46@2x.webp" }, "3x": { "png": "porsche-marque-trademark.small.min.fd545cea4298f5d797246d5805711646@3x.png", "webp": "porsche-marque-trademark.small.min.1726036a7829347e1e24d1eb54fc0d64@3x.webp" } } }, "porscheMarque": { "medium": { "1x": { "png": "porsche-marque.medium.min.a98627440b05154565f9f9dfc1ad6187@1x.png", "webp": "porsche-marque.medium.min.fa908e4dfdc5536b0e933e1670d20e1f@1x.webp" }, "2x": { "png": "porsche-marque.medium.min.089d6dd560fff7a2bf613ae6d528990e@2x.png", "webp": "porsche-marque.medium.min.7f0893dc57f2607a2cb0b817d96cb985@2x.webp" }, "3x": { "png": "porsche-marque.medium.min.2cb874345ef290831c929f6caabfeef8@3x.png", "webp": "porsche-marque.medium.min.3534cf066b4e2e737dca62de495f9616@3x.webp" } }, "small": { "1x": { "png": "porsche-marque.small.min.ac2042736af5512cf547c89fa7924c4f@1x.png", "webp": "porsche-marque.small.min.005debed5bf72cf0a9a791b1521f5e1d@1x.webp" }, "2x": { "png": "porsche-marque.small.min.22f1e9dc90399d9a5287eda689b60dba@2x.png", "webp": "porsche-marque.small.min.df4317325d04ffef28c7839aa6d499a0@2x.webp" }, "3x": { "png": "porsche-marque.small.min.49209245f04eadef8817b9bbae80d3e1@3x.png", "webp": "porsche-marque.small.min.cfd6149aaa3bc5b3b522538e5f650890@3x.webp" } } }, "porscheMarque75": { "medium": { "1x": { "png": "porsche-marque75.medium.min.0a02e2256062de963f2fef2c02d20200@1x.png", "webp": "porsche-marque75.medium.min.99b2d657558f0531d639782974e8fd06@1x.webp" }, "2x": { "png": "porsche-marque75.medium.min.1d41ecfb8f5277d3f4bd65d25d22eea3@2x.png", "webp": "porsche-marque75.medium.min.e32580cd1ac179e354ed8fcb31694168@2x.webp" }, "3x": { "png": "porsche-marque75.medium.min.373bcb5f89d31c8b6084e66e902b9f4c@3x.png", "webp": "porsche-marque75.medium.min.4a003d1e5e81db062bf92d52ba797087@3x.webp" } }, "small": { "1x": { "png": "porsche-marque75.small.min.f5b37fe12cd4487432ff77fdd8469f7d@1x.png", "webp": "porsche-marque75.small.min.146b06cffe2b11c07f3113a51f337b98@1x.webp" }, "2x": { "png": "porsche-marque75.small.min.20d86908f2190640a6f24fce1ee49035@2x.png", "webp": "porsche-marque75.small.min.025770f8db54857874c130999b370ed8@2x.webp" }, "3x": { "png": "porsche-marque75.small.min.e89b13e14a088a273107bf1057f7f67d@3x.png", "webp": "porsche-marque75.small.min.a725d2ec7bd07be17afd8feb2589b156@3x.webp" } } } };
|
|
3546
3552
|
|
|
3547
|
-
const MODEL_SIGNATURES_MANIFEST = { "718": "718.min.
|
|
3553
|
+
const MODEL_SIGNATURES_MANIFEST = { "718": { "src": "718.min.493a9e3509d6e263fa2207150082def5.svg", "width": 79, "height": 26 }, "911": { "src": "911.min.b68f913216168583298ccf83f1a6b8d5.svg", "width": 94, "height": 25 }, "boxster": { "src": "boxster.min.c321738789b37fda4bba3f7c587542aa.svg", "width": 239, "height": 26 }, "cayenne": { "src": "cayenne.min.25562011631a831516f91ec31d144104.svg", "width": 245, "height": 35 }, "cayman": { "src": "cayman.min.cc8919694c002873e1bb6a3c1dae5d41.svg", "width": 229, "height": 35 }, "macan": { "src": "macan.min.a1844f4c8d23b75e371745e9b8eb49b9.svg", "width": 196, "height": 26 }, "panamera": { "src": "panamera.min.6dae8095186567168f85c145845f090c.svg", "width": 260, "height": 25 }, "taycan": { "src": "taycan.min.df444c6f4cc1f627ceaf1b02584d6bea.svg", "width": 167, "height": 36 }, "turbo-s": { "src": "turbo-s.min.73f1e10731caffe93c07d96fa08546c1.svg", "width": 199, "height": 25 }, "turbo": { "src": "turbo.min.6a4084a8704a6c47a099b2de56b22aef.svg", "width": 143, "height": 25 } };
|
|
3548
3554
|
|
|
3549
3555
|
// NOTE: handpicked selection of plugins from jss-preset-default
|
|
3550
3556
|
createJss({
|
|
@@ -3733,9 +3739,8 @@ Object.entries(innerManifest[size])
|
|
|
3733
3739
|
.join();
|
|
3734
3740
|
const buildImgSrc = (innerManifest) => `${getCDNBaseURL()}/marque/${innerManifest.medium['2x'].png}`;
|
|
3735
3741
|
const getSvgUrl = (model) => {
|
|
3736
|
-
return `${getCDNBaseURL()}/model-signatures/${MODEL_SIGNATURES_MANIFEST[model]}`;
|
|
3742
|
+
return `${getCDNBaseURL()}/model-signatures/${MODEL_SIGNATURES_MANIFEST[model].src}`;
|
|
3737
3743
|
};
|
|
3738
|
-
const modelSignatureHeight = 36;
|
|
3739
3744
|
|
|
3740
3745
|
const INTERNAL_MULTI_SELECT_SLOT = 'internal-select';
|
|
3741
3746
|
const getSelectedOptions = (options) => options.filter((option) => option.selected);
|
|
@@ -3960,4 +3965,4 @@ const getTextTagType = (host, tag) => {
|
|
|
3960
3965
|
}
|
|
3961
3966
|
};
|
|
3962
3967
|
|
|
3963
|
-
export { DISPLAY_TAGS, HEADING_TAGS, HEADLINE_TAGS, INTERNAL_MULTI_SELECT_SLOT, INTERNAL_SELECT_SLOT, ItemType, TEXT_TAGS, _hasShowPickerSupport, anchorSlot, attributeMutationMap, buildCrestImgSrc, buildCrestSrcSet, buildIconUrl, buildImgSrc, buildSrcSet, createPaginationItems, createRange, crestSize, displaySizeToTagMap, getButtonAriaAttributes, getButtonAttributes, getButtonBaseAriaAttributes, getButtonPureAriaAttributes, getCDNBaseURL, getClosestHTMLElement, getComboboxAriaAttributes, getContentAriaAttributes, getCurrentActivePage, getDirectChildHTMLElement, getDisplayTagType, getHTMLElement, getHeadingTagType, getHeadlineTagType, getIconColor, getInlineNotificationIconName, getInnerManifest, getListAriaAttributes, getRole, getSelectedOptionMap, getSelectedOptionString, getSelectedOptionValues, getSelectedOptions, getStepperHorizontalIconName, getSvgUrl, getSwitchButtonAriaAttributes, getTextTagType, getThemeForIcon, getTotalPages, hasDocument, hasLocateAction, hasSpecificDirectChildTag, hasVisibleIcon, hasWindow, headerSlot, isCurrentInput, isCustomDropdown, isDisabledOrLoading, isInfinitePagination, isListTypeOrdered, isScrollable, isSortable, isStateCompleteOrWarning, isThemeDark, isTouchDevice, isType, isUrl, isWithinForm,
|
|
3968
|
+
export { DISPLAY_TAGS, HEADING_TAGS, HEADLINE_TAGS, INTERNAL_MULTI_SELECT_SLOT, INTERNAL_SELECT_SLOT, ItemType, TEXT_TAGS, _hasShowPickerSupport, anchorSlot, attributeMutationMap, buildCrestImgSrc, buildCrestSrcSet, buildIconUrl, buildImgSrc, buildSrcSet, createPaginationItems, createRange, crestSize, displaySizeToTagMap, getButtonAriaAttributes, getButtonAttributes, getButtonBaseAriaAttributes, getButtonPureAriaAttributes, getCDNBaseURL, getClosestHTMLElement, getComboboxAriaAttributes, getContentAriaAttributes, getCurrentActivePage, getDirectChildHTMLElement, getDisplayTagType, getHTMLElement, getHeadingTagType, getHeadlineTagType, getIconColor, getInlineNotificationIconName, getInnerManifest, getListAriaAttributes, getOptionAriaAttributes, getRole, getSelectedOptionMap, getSelectedOptionString, getSelectedOptionValues, getSelectedOptions, getStepperHorizontalIconName, getSvgUrl, getSwitchButtonAriaAttributes, getTextTagType, getThemeForIcon, getTotalPages, hasDocument, hasLocateAction, hasSpecificDirectChildTag, hasVisibleIcon, hasWindow, headerSlot, isCurrentInput, isCustomDropdown, isDisabledOrLoading, isInfinitePagination, isListTypeOrdered, isScrollable, isSortable, isStateCompleteOrWarning, isThemeDark, isTouchDevice, isType, isUrl, isWithinForm, observedNodesMap, parseAndGetAriaAttributes, parseJSONAttribute, scrollAreaClass, showCustomCalendarOrTimeIndicator, supportsConstructableStylesheets, supportsNativePopover, tempDiv, tempIcon, tempLabel };
|
|
@@ -5,13 +5,13 @@ import { usePrefix, useTheme, useBrowserLayoutEffect, useMergedClass } from '../
|
|
|
5
5
|
import { syncRef } from '../../utils.mjs';
|
|
6
6
|
import { DSRModelSignature } from '../dsr-components/model-signature.mjs';
|
|
7
7
|
|
|
8
|
-
const PModelSignature = forwardRef(({ color = 'primary', model = '911', size = 'small', theme, className, ...rest }, ref) => {
|
|
8
|
+
const PModelSignature = forwardRef(({ color = 'primary', fetchPriority = 'auto', lazy = false, model = '911', safeZone = true, size = 'small', theme, className, children, ...rest }, ref) => {
|
|
9
9
|
const elementRef = useRef();
|
|
10
10
|
const WebComponentTag = usePrefix('p-model-signature');
|
|
11
|
-
const propsToSync = [color, model, size, theme || useTheme()];
|
|
11
|
+
const propsToSync = [color, fetchPriority, lazy, model, safeZone, size, theme || useTheme()];
|
|
12
12
|
useBrowserLayoutEffect(() => {
|
|
13
13
|
const { current } = elementRef;
|
|
14
|
-
['color', 'model', 'size', 'theme'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
14
|
+
['color', 'fetchPriority', 'lazy', 'model', 'safeZone', 'size', 'theme'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
15
15
|
}, propsToSync);
|
|
16
16
|
// @ts-ignore
|
|
17
17
|
if (!process.browser) {
|
|
@@ -22,9 +22,10 @@ const PModelSignature = forwardRef(({ color = 'primary', model = '911', size = '
|
|
|
22
22
|
// @ts-ignore
|
|
23
23
|
...(!process.browser
|
|
24
24
|
? {
|
|
25
|
-
children: (jsx(DSRModelSignature, { color, model, size, theme: theme || useTheme() })),
|
|
25
|
+
children: (jsx(DSRModelSignature, { color, fetchPriority, lazy, model, safeZone, size, theme: theme || useTheme(), children })),
|
|
26
26
|
}
|
|
27
27
|
: {
|
|
28
|
+
children,
|
|
28
29
|
suppressHydrationWarning: true,
|
|
29
30
|
}),
|
|
30
31
|
class: useMergedClass(elementRef, className),
|
|
@@ -86,11 +86,7 @@ class DSRFlyoutNavigationItem extends Component {
|
|
|
86
86
|
render() {
|
|
87
87
|
splitChildren(this.props.children);
|
|
88
88
|
const style = minifyCss(stripFocusAndHoverStyles(getComponentCss$Q(this.open, this.theme)));
|
|
89
|
-
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs(Fragment, { children: [jsx(PButtonPure, { className: "button", type: "button", size: "medium", alignLabel: "start", stretch: true, icon: "arrow-head-right", active: this.open, aria: { 'aria-expanded': this.open }, theme: this.theme, children: this.props.label }), jsxs("div", { className: "scroller",
|
|
90
|
-
// ignore needed for pipeline
|
|
91
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
92
|
-
/* @ts-ignore */
|
|
93
|
-
inert: this.open ? null : '', children: [jsxs("div", { className: "header", children: [jsx(PButtonPure, { className: "back", type: "button", size: "medium", icon: "arrow-head-left", hideLabel: true, theme: this.theme, children: "Back" }), jsx("h2", { className: "heading", children: this.props.label })] }), jsx("div", { className: "content", children: jsx("slot", {}) })] })] })] }), this.props.children] }));
|
|
89
|
+
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs(Fragment, { children: [jsx(PButtonPure, { className: "button", type: "button", size: "medium", alignLabel: "start", stretch: true, icon: "arrow-head-right", active: this.open, aria: { 'aria-expanded': this.open }, theme: this.theme, children: this.props.label }), jsxs("div", { className: "scroller", inert: this.open ? null : '', children: [jsxs("div", { className: "header", children: [jsx(PButtonPure, { className: "back", type: "button", size: "medium", icon: "arrow-head-left", hideLabel: true, theme: this.theme, children: "Back" }), jsx("h2", { className: "heading", children: this.props.label })] }), jsx("div", { className: "content", children: jsx("slot", {}) })] })] })] }), this.props.children] }));
|
|
94
90
|
}
|
|
95
91
|
}
|
|
96
92
|
|
|
@@ -84,11 +84,7 @@ class DSRFlyoutNavigation extends Component {
|
|
|
84
84
|
render() {
|
|
85
85
|
splitChildren(this.props.children);
|
|
86
86
|
const style = minifyCss(stripFocusAndHoverStyles(getComponentCss$R(this.props.open, !!this.props.activeIdentifier, this.props.theme)));
|
|
87
|
-
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs("dialog", {
|
|
88
|
-
// ignore needed for pipeline
|
|
89
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
90
|
-
/* @ts-ignore */
|
|
91
|
-
inert: this.props.open ? null : '', tabIndex: -1, children: [jsx("div", { className: "header", children: jsx(PButtonPure, { className: "dismiss", type: "button", size: "medium", icon: "close", hideLabel: true, theme: this.props.theme, children: "Dismiss flyout" }) }), jsx("div", { className: "scroller", children: jsx("nav", { className: "content", ...parseAndGetAriaAttributes(this.props.aria), children: jsx("slot", {}) }) })] })] }), this.props.children] }));
|
|
87
|
+
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs("dialog", { inert: this.props.open ? null : '', tabIndex: -1, children: [jsx("div", { className: "header", children: jsx(PButtonPure, { className: "dismiss", type: "button", size: "medium", icon: "close", hideLabel: true, theme: this.props.theme, children: "Dismiss flyout" }) }), jsx("div", { className: "scroller", children: jsx("nav", { className: "content", ...parseAndGetAriaAttributes(this.props.aria), children: jsx("slot", {}) }) })] })] }), this.props.children] }));
|
|
92
88
|
}
|
|
93
89
|
}
|
|
94
90
|
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flyout.mjs
CHANGED
|
@@ -96,11 +96,7 @@ class DSRFlyout extends Component {
|
|
|
96
96
|
const hasFooter = namedSlotChildren.filter(({ props: { slot } }) => slot === 'footer').length > 0;
|
|
97
97
|
const hasSubFooter = namedSlotChildren.filter(({ props: { slot } }) => slot === 'sub-footer').length > 0;
|
|
98
98
|
const style = minifyCss(stripFocusAndHoverStyles(getComponentCss$P(this.props.open, (positionDeprecationMap[this.props.position] || this.props.position), hasFooter, hasSubFooter, this.props.theme)));
|
|
99
|
-
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsx("dialog", {
|
|
100
|
-
// ignore needed for pipeline
|
|
101
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
102
|
-
/* @ts-ignore */
|
|
103
|
-
inert: this.props.open ? null : '', tabIndex: -1, ...parseAndGetAriaAttributes(this.props.aria), children: jsxs("div", { className: "wrapper", ...(hasSubFooter && { onScroll: this.props.updateShadow }), children: [jsxs("div", { className: "header", children: [jsx(PButtonPure, { className: "dismiss", type: "button", hideLabel: true, icon: "close", theme: this.props.theme, children: "Dismiss flyout" }), hasHeader && jsx("slot", { name: "header" })] }, "header"), jsx("div", { className: "content", children: jsx("slot", {}) }), hasFooter && (jsx("div", { className: "footer", children: jsx("slot", { name: "footer" }) }, "footer")), hasSubFooter && (jsx("div", { className: "sub-footer", children: jsx("slot", { name: "sub-footer" }) }, "sub-footer"))] }) })] }), this.props.children] }));
|
|
99
|
+
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsx("dialog", { inert: this.props.open ? null : '', tabIndex: -1, ...parseAndGetAriaAttributes(this.props.aria), children: jsxs("div", { className: "wrapper", ...(hasSubFooter && { onScroll: this.props.updateShadow }), children: [jsxs("div", { className: "header", children: [jsx(PButtonPure, { className: "dismiss", type: "button", hideLabel: true, icon: "close", theme: this.props.theme, children: "Dismiss flyout" }), hasHeader && jsx("slot", { name: "header" })] }, "header"), jsx("div", { className: "content", children: jsx("slot", {}) }), hasFooter && (jsx("div", { className: "footer", children: jsx("slot", { name: "footer" }) }, "footer")), hasSubFooter && (jsx("div", { className: "sub-footer", children: jsx("slot", { name: "sub-footer" }) }, "sub-footer"))] }) })] }), this.props.children] }));
|
|
104
100
|
}
|
|
105
101
|
}
|
|
106
102
|
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/modal.mjs
CHANGED
|
@@ -77,16 +77,6 @@ import { parseAndGetAriaAttributes } from '../../../../../../components/dist/uti
|
|
|
77
77
|
|
|
78
78
|
class DSRModal extends Component {
|
|
79
79
|
host;
|
|
80
|
-
scrollContainerEl; // Necessary to avoid stacking background bug in safari
|
|
81
|
-
focusedElBeforeOpen;
|
|
82
|
-
dismissBtn;
|
|
83
|
-
hasHeader;
|
|
84
|
-
hasFooter;
|
|
85
|
-
footer;
|
|
86
|
-
dialog;
|
|
87
|
-
get hasDismissButton() {
|
|
88
|
-
return this.props.disableCloseButton ? false : this.props.dismissButton;
|
|
89
|
-
}
|
|
90
80
|
render() {
|
|
91
81
|
const { children, namedSlotChildren, otherChildren } = splitChildren(this.props.children);
|
|
92
82
|
const hasHeader = (this.props.heading || namedSlotChildren.filter(({ props: { slot } }) => slot === 'heading').length > 0);
|
|
@@ -99,11 +89,7 @@ class DSRModal extends Component {
|
|
|
99
89
|
'aria-label': this.props.heading,
|
|
100
90
|
'aria-hidden': !this.props.open,
|
|
101
91
|
...parseAndGetAriaAttributes(this.props.aria),
|
|
102
|
-
}), tabIndex: -1,
|
|
103
|
-
// ignore needed for pipeline
|
|
104
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
105
|
-
/* @ts-ignore */
|
|
106
|
-
inert: this.props.open ? null : '', children: [hasDismissButton && (jsx("div", { className: "controls", children: jsx(PButtonPure, { className: "dismiss", type: "button", hideLabel: true, icon: "close", theme: this.props.theme, children: "Dismiss modal" }) })), hasHeader && (jsx("div", { className: "header", children: this.props.heading ? jsx("h2", { children: this.props.heading }) : jsx("slot", { name: "heading" }) })), jsx("div", { className: "content", children: jsx("slot", {}) }), hasFooter && (jsx("div", { className: "footer", children: jsx("slot", { name: "footer" }) }))] }) }) })] }), this.props.children] }));
|
|
92
|
+
}), tabIndex: -1, inert: this.props.open ? null : '', children: [hasDismissButton && (jsx("div", { className: "controls", children: jsx(PButtonPure, { className: "dismiss", type: "button", hideLabel: true, icon: "close", theme: this.props.theme, children: "Dismiss modal" }) })), hasHeader && (jsx("div", { className: "header", children: this.props.heading ? jsx("h2", { children: this.props.heading }) : jsx("slot", { name: "heading" }) }, "heading")), jsx("div", { className: "content", children: jsx("slot", {}) }), hasFooter && (jsx("div", { className: "footer", children: jsx("slot", { name: "footer" }) }, "footer"))] }) }) })] }), this.props.children] }));
|
|
107
93
|
}
|
|
108
94
|
}
|
|
109
95
|
|
|
@@ -1,15 +1,19 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { splitChildren } from '../../splitChildren.mjs';
|
|
2
3
|
import { Component } from 'react';
|
|
3
4
|
import { minifyCss } from '../../minifyCss.mjs';
|
|
4
5
|
import { stripFocusAndHoverStyles } from '../../stripFocusAndHoverStyles.mjs';
|
|
5
6
|
import { getModelSignatureCss as getComponentCss$B } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
|
|
6
|
-
import { getSvgUrl
|
|
7
|
+
import { getSvgUrl } from '../../../../../../components/dist/utils/esm/utils-entry.mjs';
|
|
7
8
|
|
|
8
9
|
class DSRModelSignature extends Component {
|
|
9
10
|
host;
|
|
10
11
|
render() {
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
splitChildren(this.props.children);
|
|
13
|
+
const fetchPriority = this.props.fetchPriority !== 'auto' ? this.props.fetchPriority : null;
|
|
14
|
+
const loading = this.props.lazy === true ? 'lazy' : null;
|
|
15
|
+
const style = minifyCss(stripFocusAndHoverStyles(getComponentCss$B(this.props.model, this.props.safeZone, this.props.size, this.props.color, this.props.theme)));
|
|
16
|
+
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs(Fragment, { children: [jsx("slot", {}), jsx("img", { fetchpriority: fetchPriority, loading: loading, src: getSvgUrl(this.props.model), alt: this.props.model })] })] }), this.props.children] }));
|
|
13
17
|
}
|
|
14
18
|
}
|
|
15
19
|
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-option.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import '../components/accordion.wrapper.mjs';
|
|
3
3
|
import '../components/banner.wrapper.mjs';
|
|
4
4
|
import '../components/button.wrapper.mjs';
|
|
@@ -22,7 +22,7 @@ import '../components/grid.wrapper.mjs';
|
|
|
22
22
|
import '../components/grid-item.wrapper.mjs';
|
|
23
23
|
import '../components/heading.wrapper.mjs';
|
|
24
24
|
import '../components/headline.wrapper.mjs';
|
|
25
|
-
import '../components/icon.wrapper.mjs';
|
|
25
|
+
import { PIcon } from '../components/icon.wrapper.mjs';
|
|
26
26
|
import '../components/inline-notification.wrapper.mjs';
|
|
27
27
|
import '../components/link.wrapper.mjs';
|
|
28
28
|
import '../components/link-pure.wrapper.mjs';
|
|
@@ -73,14 +73,20 @@ import { Component } from 'react';
|
|
|
73
73
|
import { minifyCss } from '../../minifyCss.mjs';
|
|
74
74
|
import { stripFocusAndHoverStyles } from '../../stripFocusAndHoverStyles.mjs';
|
|
75
75
|
import { getSelectOptionCss as getComponentCss$p } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
|
|
76
|
+
import { getOptionAriaAttributes } from '../../../../../../components/dist/utils/esm/utils-entry.mjs';
|
|
76
77
|
|
|
77
78
|
class DSRSelectOption extends Component {
|
|
78
79
|
host;
|
|
79
80
|
render() {
|
|
80
81
|
splitChildren(this.props.children);
|
|
81
82
|
const { theme = 'light', selected, highlighted, hidden } = this.props;
|
|
82
|
-
minifyCss(stripFocusAndHoverStyles(getComponentCss$p(theme)));
|
|
83
|
-
return (
|
|
83
|
+
const style = minifyCss(stripFocusAndHoverStyles(getComponentCss$p(theme)));
|
|
84
|
+
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsx(Fragment, { children: jsxs("div", { role: "option", className: {
|
|
85
|
+
option: true,
|
|
86
|
+
'option--selected': selected,
|
|
87
|
+
'option--highlighted': highlighted,
|
|
88
|
+
'option--disabled': this.props.disabled,
|
|
89
|
+
}, ...getOptionAriaAttributes(selected, this.props.disabled, hidden, !!this.props.value), children: [jsx("slot", {}), selected && (jsx(PIcon, { className: "icon", "aria-hidden": "true", name: "check", color: this.props.disabled ? 'state-disabled' : 'primary', theme: theme }))] }) })] }), this.props.children] }));
|
|
84
90
|
}
|
|
85
91
|
}
|
|
86
92
|
|
|
@@ -93,6 +93,7 @@ class DSRTextFieldWrapper extends Component {
|
|
|
93
93
|
hasCounter;
|
|
94
94
|
isCounterVisible;
|
|
95
95
|
hasUnit;
|
|
96
|
+
eventListener;
|
|
96
97
|
render() {
|
|
97
98
|
const { children, namedSlotChildren, otherChildren } = splitChildren(this.props.children);
|
|
98
99
|
const { readOnly, disabled, type } = typeof otherChildren[0] === 'object' && 'props' in otherChildren[0] && otherChildren[0]?.props || {};
|
|
@@ -108,8 +109,8 @@ class DSRTextFieldWrapper extends Component {
|
|
|
108
109
|
const isTime = isType(type, 'time');
|
|
109
110
|
isWithinForm(this.props.host);
|
|
110
111
|
const hasAction = hasLocateAction(this.props.actionIcon);
|
|
111
|
-
const hasCounter = false; // hasCounterAndIsTypeText(otherChildren[0]?.props);
|
|
112
112
|
const isClearable = typeof otherChildren[0] === 'object' && 'props' in otherChildren[0] && !!otherChildren[0]?.props.value;
|
|
113
|
+
const hasCounter = false; // hasCounterAndIsTypeText(otherChildren[0]?.props);
|
|
113
114
|
const style = minifyCss(stripFocusAndHoverStyles(getComponentCss$7(disabled, this.props.hideLabel, this.props.state, this.props.isCounterVisible, this.props.isCounterVisible ? 'suffix' : this.props.unitPosition, isPassword ? 'password' : type, this.props.showPasswordToggle, this.props.isWithinForm, this.props.submitButton, this.props.theme)));
|
|
114
115
|
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs("div", { className: "root", children: [jsx(Label, { hasLabel: this.props.label || namedSlotChildren.filter(({ props: { slot } }) => slot === 'label').length > 0, hasDescription: this.props.description || namedSlotChildren.filter(({ props: { slot } }) => slot === 'description').length > 0, host: null, label: this.props.label, description: this.props.description, formElement: typeof otherChildren[0] === 'object' && 'props' in otherChildren[0] && otherChildren[0]?.props, isDisabled: disabled }), jsxs("div", { className: "wrapper", children: [jsx("slot", {}), hasCounter , (this.props.isCounterVisible) && (jsx("span", { className: "unit-counter", "aria-hidden": "true", children: this.props.unit })), isPassword && this.props.showPasswordToggle ? (jsx(PButtonPure, { ...buttonProps, type: "button", icon: this.props.showPassword ? 'view-off' : 'view', disabled: disabled, aria: { 'aria-pressed': this.props.showPassword ? 'true' : 'false' }, children: "Toggle password visibility" })) : showCustomCalendarOrTimeIndicator(isCalendar, isTime) ? (jsxs(PButtonPure, { ...buttonProps, type: "button", icon: isCalendar ? 'calendar' : 'clock', disabled: disabled, children: ["Show $", isCalendar ? 'date' : 'time', " picker"] })) : (isSearch && [
|
|
115
116
|
// TODO: create an own component, which would fix SSR support too
|
|
@@ -13,6 +13,7 @@ class DSRTextareaWrapper extends Component {
|
|
|
13
13
|
counterElement;
|
|
14
14
|
ariaElement;
|
|
15
15
|
hasCounter;
|
|
16
|
+
eventListener;
|
|
16
17
|
render() {
|
|
17
18
|
const { children, namedSlotChildren, otherChildren } = splitChildren(this.props.children);
|
|
18
19
|
const { disabled } = typeof otherChildren[0] === 'object' && 'props' in otherChildren[0] && otherChildren[0]?.props || {};
|
|
@@ -1,16 +1,28 @@
|
|
|
1
1
|
import { type HTMLAttributes } from 'react';
|
|
2
|
-
import type { ModelSignatureColor, ModelSignatureModel, ModelSignatureSize, Theme } from '../types';
|
|
2
|
+
import type { ModelSignatureColor, ModelSignatureFetchPriority, ModelSignatureModel, ModelSignatureSize, Theme } from '../types';
|
|
3
3
|
export type PModelSignatureProps = Omit<HTMLAttributes<{}>, 'color'> & {
|
|
4
4
|
/**
|
|
5
5
|
* Adapts the color of the component.
|
|
6
6
|
*/
|
|
7
7
|
color?: ModelSignatureColor;
|
|
8
|
+
/**
|
|
9
|
+
* Defines the fetch priority of the model signature. In the end it is just a recommendation to the browser, but it defines the priority on its own.
|
|
10
|
+
*/
|
|
11
|
+
fetchPriority?: ModelSignatureFetchPriority;
|
|
12
|
+
/**
|
|
13
|
+
* Defines whether the model signature is always loaded or only loaded when it is in the viewport (this feature may not work reliably).
|
|
14
|
+
*/
|
|
15
|
+
lazy?: boolean;
|
|
8
16
|
/**
|
|
9
17
|
* Adapts the model of the component.
|
|
10
18
|
*/
|
|
11
19
|
model?: ModelSignatureModel;
|
|
12
20
|
/**
|
|
13
|
-
*
|
|
21
|
+
* When set to `true`, then all model signatures are visually aligned with each other. When set to `false` the model signature comes without any safe zone.
|
|
22
|
+
*/
|
|
23
|
+
safeZone?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Adapts the size of the component. When set to `inherit` a CSS `width` or `height` needs to be defined on the host but not both.
|
|
14
26
|
*/
|
|
15
27
|
size?: ModelSignatureSize;
|
|
16
28
|
/**
|
|
@@ -23,16 +35,30 @@ export declare const PModelSignature: import("react").ForwardRefExoticComponent<
|
|
|
23
35
|
* Adapts the color of the component.
|
|
24
36
|
*/
|
|
25
37
|
color?: ModelSignatureColor;
|
|
38
|
+
/**
|
|
39
|
+
* Defines the fetch priority of the model signature. In the end it is just a recommendation to the browser, but it defines the priority on its own.
|
|
40
|
+
*/
|
|
41
|
+
fetchPriority?: ModelSignatureFetchPriority;
|
|
42
|
+
/**
|
|
43
|
+
* Defines whether the model signature is always loaded or only loaded when it is in the viewport (this feature may not work reliably).
|
|
44
|
+
*/
|
|
45
|
+
lazy?: boolean;
|
|
26
46
|
/**
|
|
27
47
|
* Adapts the model of the component.
|
|
28
48
|
*/
|
|
29
49
|
model?: ModelSignatureModel;
|
|
30
50
|
/**
|
|
31
|
-
*
|
|
51
|
+
* When set to `true`, then all model signatures are visually aligned with each other. When set to `false` the model signature comes without any safe zone.
|
|
52
|
+
*/
|
|
53
|
+
safeZone?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Adapts the size of the component. When set to `inherit` a CSS `width` or `height` needs to be defined on the host but not both.
|
|
32
56
|
*/
|
|
33
57
|
size?: ModelSignatureSize;
|
|
34
58
|
/**
|
|
35
59
|
* Adapts color depending on theme.
|
|
36
60
|
*/
|
|
37
61
|
theme?: Theme;
|
|
62
|
+
} & {
|
|
63
|
+
children?: import("react").ReactNode;
|
|
38
64
|
} & import("react").RefAttributes<HTMLElement>>;
|
|
@@ -1,13 +1,5 @@
|
|
|
1
1
|
import { Component } from 'react';
|
|
2
2
|
export declare class DSRModal extends Component<any> {
|
|
3
3
|
host: HTMLElement;
|
|
4
|
-
private scrollContainerEl;
|
|
5
|
-
private focusedElBeforeOpen;
|
|
6
|
-
private dismissBtn;
|
|
7
|
-
private hasHeader;
|
|
8
|
-
private hasFooter;
|
|
9
|
-
private footer;
|
|
10
|
-
private dialog;
|
|
11
|
-
private get hasDismissButton();
|
|
12
4
|
render(): JSX.Element;
|
|
13
5
|
}
|
package/ssr/esm/lib/types.d.ts
CHANGED
|
@@ -1025,16 +1025,56 @@ declare const TILE_PRODUCT_ASPECT_RATIOS: readonly [
|
|
|
1025
1025
|
];
|
|
1026
1026
|
export type LinkTileProductAspectRatio = Extract<TileAspectRatio, (typeof TILE_PRODUCT_ASPECT_RATIOS)[number]>;
|
|
1027
1027
|
declare const MODEL_SIGNATURES_MANIFEST: {
|
|
1028
|
-
"718":
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1028
|
+
"718": {
|
|
1029
|
+
src: string;
|
|
1030
|
+
width: number;
|
|
1031
|
+
height: number;
|
|
1032
|
+
};
|
|
1033
|
+
"911": {
|
|
1034
|
+
src: string;
|
|
1035
|
+
width: number;
|
|
1036
|
+
height: number;
|
|
1037
|
+
};
|
|
1038
|
+
boxster: {
|
|
1039
|
+
src: string;
|
|
1040
|
+
width: number;
|
|
1041
|
+
height: number;
|
|
1042
|
+
};
|
|
1043
|
+
cayenne: {
|
|
1044
|
+
src: string;
|
|
1045
|
+
width: number;
|
|
1046
|
+
height: number;
|
|
1047
|
+
};
|
|
1048
|
+
cayman: {
|
|
1049
|
+
src: string;
|
|
1050
|
+
width: number;
|
|
1051
|
+
height: number;
|
|
1052
|
+
};
|
|
1053
|
+
macan: {
|
|
1054
|
+
src: string;
|
|
1055
|
+
width: number;
|
|
1056
|
+
height: number;
|
|
1057
|
+
};
|
|
1058
|
+
panamera: {
|
|
1059
|
+
src: string;
|
|
1060
|
+
width: number;
|
|
1061
|
+
height: number;
|
|
1062
|
+
};
|
|
1063
|
+
taycan: {
|
|
1064
|
+
src: string;
|
|
1065
|
+
width: number;
|
|
1066
|
+
height: number;
|
|
1067
|
+
};
|
|
1068
|
+
"turbo-s": {
|
|
1069
|
+
src: string;
|
|
1070
|
+
width: number;
|
|
1071
|
+
height: number;
|
|
1072
|
+
};
|
|
1073
|
+
turbo: {
|
|
1074
|
+
src: string;
|
|
1075
|
+
width: number;
|
|
1076
|
+
height: number;
|
|
1077
|
+
};
|
|
1038
1078
|
};
|
|
1039
1079
|
declare const MARQUE_VARIANTS: readonly [
|
|
1040
1080
|
"75-years",
|
|
@@ -1059,6 +1099,12 @@ declare const MODAL_ARIA_ATTRIBUTES: readonly [
|
|
|
1059
1099
|
];
|
|
1060
1100
|
export type ModalAriaAttribute = (typeof MODAL_ARIA_ATTRIBUTES)[number];
|
|
1061
1101
|
export type ModalBackdrop = Backdrop;
|
|
1102
|
+
declare const MODEL_SIGNATURE_FETCH_PRIORITY: readonly [
|
|
1103
|
+
"low",
|
|
1104
|
+
"high",
|
|
1105
|
+
"auto"
|
|
1106
|
+
];
|
|
1107
|
+
export type ModelSignatureFetchPriority = (typeof MODEL_SIGNATURE_FETCH_PRIORITY)[number];
|
|
1062
1108
|
declare const MODEL_SIGNATURE_SIZES: readonly [
|
|
1063
1109
|
"small",
|
|
1064
1110
|
"inherit"
|