@porsche-design-system/components-react 3.32.0 → 3.32.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 +14 -3
- package/package.json +2 -2
- package/ssr/cjs/components/dist/styles/esm/styles-entry.cjs +32 -2
- package/ssr/cjs/components/dist/utils/esm/utils-entry.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-base.cjs +2 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pin-code.cjs +1 -1
- package/ssr/esm/components/dist/styles/esm/styles-entry.mjs +32 -2
- package/ssr/esm/components/dist/utils/esm/utils-entry.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-base.mjs +2 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pin-code.mjs +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -14,6 +14,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0),
|
|
|
14
14
|
|
|
15
15
|
## [Unreleased]
|
|
16
16
|
|
|
17
|
+
## [3.32.1] - 2026-02-24
|
|
18
|
+
|
|
19
|
+
## [3.32.1-rc.0] - 2026-02-20
|
|
20
|
+
|
|
21
|
+
### Fixed
|
|
22
|
+
|
|
23
|
+
- `Input Email`, `Input Password`, `Input Tel`, `Pin Code`: optimize input direction and behavior in RTL mode
|
|
24
|
+
([#4209](https://github.com/porsche-design-system/porsche-design-system/pull/4209))
|
|
25
|
+
|
|
17
26
|
## [3.32.0] - 2026-02-04
|
|
18
27
|
|
|
19
28
|
## [3.32.0-rc.2] - 2026-02-03
|
|
@@ -23,11 +32,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0),
|
|
|
23
32
|
- `Checkbox`, `Input-*`, `Multi-Select`, `Pin Code`, `Radio Button Group`, `Segmented-Control`, `Select`, `Textarea`:
|
|
24
33
|
New slot `label-after` to add custom content (e.g. `Popover`) after the `label` element
|
|
25
34
|
([#4181](https://github.com/porsche-design-system/porsche-design-system/pull/4181))
|
|
26
|
-
- `Angular`: Bumped peer dependency to support Angular new major version 21
|
|
35
|
+
- `Angular`: Bumped peer dependency to support Angular new major version 21
|
|
36
|
+
([#4178](https://github.com/porsche-design-system/porsche-design-system/pull/4178))
|
|
27
37
|
- `Carousel`:
|
|
28
|
-
- `width` prop now supports `wide` and `full` values
|
|
29
|
-
- `--p-carousel-px` CSS custom property introduced to control horizontal padding (when used, the `width` prop has no effect anymore)
|
|
38
|
+
- `width` prop now supports `wide` and `full` values
|
|
30
39
|
([#4180](https://github.com/porsche-design-system/porsche-design-system/pull/4180))
|
|
40
|
+
- `--p-carousel-px` CSS custom property introduced to control horizontal padding (when used, the `width` prop has no
|
|
41
|
+
effect anymore) ([#4180](https://github.com/porsche-design-system/porsche-design-system/pull/4180))
|
|
31
42
|
|
|
32
43
|
## [3.32.0-rc.1] - 2026-01-12
|
|
33
44
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@porsche-design-system/components-react",
|
|
3
|
-
"version": "3.32.
|
|
3
|
+
"version": "3.32.1",
|
|
4
4
|
"description": "Porsche Design System is a component library designed to help developers create the best experience for software or services distributed by Dr. Ing. h.c. F. Porsche AG.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"porsche",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"license": "SEE LICENSE IN LICENSE",
|
|
18
18
|
"homepage": "https://designsystem.porsche.com",
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@porsche-design-system/components-js": "3.32.
|
|
20
|
+
"@porsche-design-system/components-js": "3.32.1"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
23
|
"ag-grid-community": ">= 35.0.0 <36.0.0",
|
|
@@ -3643,7 +3643,7 @@ const hasShowPickerSupport = () => (hasDocument &&
|
|
|
3643
3643
|
'showPicker' in HTMLInputElement.prototype &&
|
|
3644
3644
|
CSS.supports('selector(::-webkit-calendar-picker-indicator)'));
|
|
3645
3645
|
|
|
3646
|
-
const prefix = `[Porsche Design System v${"3.32.
|
|
3646
|
+
const prefix = `[Porsche Design System v${"3.32.1"}]` // this part isn't covered by unit tests
|
|
3647
3647
|
;
|
|
3648
3648
|
const consoleError = (...messages) => {
|
|
3649
3649
|
console.error(prefix, ...messages); // eslint-disable-line no-console
|
|
@@ -6249,7 +6249,7 @@ const cssVarButtonPurePadding = '--ref-p-input-slotted-padding';
|
|
|
6249
6249
|
* @css-variable {"name": "--ref-p-input-slotted-margin", "description": "When slotting a `p-button-pure` or `p-link-pure` this variable needs to be set as `margin` in oder to adjust the spacings correctly."}
|
|
6250
6250
|
*/
|
|
6251
6251
|
const cssVarButtonPureMargin = '--ref-p-input-slotted-margin';
|
|
6252
|
-
const getFunctionalComponentInputBaseStyles = (disabled, loading, hideLabel, state, compact, readOnly, theme, additionalInputJssStyle) => {
|
|
6252
|
+
const getFunctionalComponentInputBaseStyles = (disabled, loading, hideLabel, state, compact, readOnly, theme, additionalInputJssStyle, additionalHostJssStyle) => {
|
|
6253
6253
|
const scalingVar = getScalingVar$4(compact);
|
|
6254
6254
|
const paddingBlock = `max(2px, ${formElementPaddingVertical} * ${scalingVar})`;
|
|
6255
6255
|
const paddingInline = `max(2px, ${formElementPaddingHorizontal} * ${scalingVar})`;
|
|
@@ -6277,6 +6277,12 @@ const getFunctionalComponentInputBaseStyles = (disabled, loading, hideLabel, sta
|
|
|
6277
6277
|
[`${cssVarButtonPurePadding}`]: `calc(1px * ${buttonCompensation})`,
|
|
6278
6278
|
[`${cssVarButtonPureMargin}`]: `calc(-1px * ${buttonCompensation})`,
|
|
6279
6279
|
}),
|
|
6280
|
+
// Alignment and direction of placeholder is set always to the right in RTL mode, because it is expected to have rtl language as placeholder value
|
|
6281
|
+
'&(:dir(rtl)) input::placeholder': {
|
|
6282
|
+
direction: 'rtl',
|
|
6283
|
+
textAlign: 'end',
|
|
6284
|
+
},
|
|
6285
|
+
...additionalHostJssStyle,
|
|
6280
6286
|
},
|
|
6281
6287
|
...getFunctionalComponentLabelAfterStyles(disabled),
|
|
6282
6288
|
...preventFoucOfNestedElementsStyles,
|
|
@@ -8226,6 +8232,14 @@ const getComponentCss$X = (disabled, loading, hideLabel, state, compact, readOnl
|
|
|
8226
8232
|
'&::-webkit-inner-spin-button, &::-webkit-outer-spin-button': {
|
|
8227
8233
|
WebkitAppearance: 'none',
|
|
8228
8234
|
},
|
|
8235
|
+
},
|
|
8236
|
+
// Overwrites direction to ltr for rtl languages to prevent issues with the email input, e.g. cursor jumping to the
|
|
8237
|
+
// end of the input when typing in the middle of the text. This is necessary because email addresses are assumed
|
|
8238
|
+
// to be always written in ltr direction and the input needs to accommodate that, even in rtl contexts.
|
|
8239
|
+
{
|
|
8240
|
+
'&(:dir(rtl)) .wrapper, &(:dir(rtl)) input:placeholder-shown': {
|
|
8241
|
+
direction: 'ltr',
|
|
8242
|
+
},
|
|
8229
8243
|
}),
|
|
8230
8244
|
'sr-only': getHiddenTextJssStyle(),
|
|
8231
8245
|
});
|
|
@@ -8361,6 +8375,14 @@ const getComponentCss$S = (disabled, loading, hideLabel, state, compact, readOnl
|
|
|
8361
8375
|
'&::-webkit-inner-spin-button, &::-webkit-outer-spin-button': {
|
|
8362
8376
|
WebkitAppearance: 'none',
|
|
8363
8377
|
},
|
|
8378
|
+
},
|
|
8379
|
+
// Overwrites direction to ltr for rtl languages to prevent issues with the tel input, e.g. cursor jumping to the
|
|
8380
|
+
// end of the input when typing in the middle of the text. This is necessary because tel values are assumed
|
|
8381
|
+
// to be always written in ltr direction and the input needs to accommodate that, even in rtl contexts.
|
|
8382
|
+
{
|
|
8383
|
+
'&(:dir(rtl)) .wrapper, &(:dir(rtl)) input:placeholder-shown': {
|
|
8384
|
+
direction: 'ltr',
|
|
8385
|
+
},
|
|
8364
8386
|
}),
|
|
8365
8387
|
'sr-only': getHiddenTextJssStyle(),
|
|
8366
8388
|
});
|
|
@@ -8442,6 +8464,14 @@ const getComponentCss$P = (disabled, loading, hideLabel, state, compact, readOnl
|
|
|
8442
8464
|
'&::-webkit-inner-spin-button, &::-webkit-outer-spin-button': {
|
|
8443
8465
|
WebkitAppearance: 'none',
|
|
8444
8466
|
},
|
|
8467
|
+
},
|
|
8468
|
+
// Overwrites direction to ltr for rtl languages to prevent issues with the url input, e.g. cursor jumping to the
|
|
8469
|
+
// end of the input when typing in the middle of the text. This is necessary because url addresses are assumed
|
|
8470
|
+
// to be always written in ltr direction and the input needs to accommodate that, even in rtl contexts.
|
|
8471
|
+
{
|
|
8472
|
+
'&(:dir(rtl)) .wrapper, &(:dir(rtl)) input:placeholder-shown': {
|
|
8473
|
+
direction: 'ltr',
|
|
8474
|
+
},
|
|
8445
8475
|
}),
|
|
8446
8476
|
'sr-only': getHiddenTextJssStyle(),
|
|
8447
8477
|
});
|
|
@@ -3446,7 +3446,7 @@ const hasShowPickerSupport = () => (hasDocument &&
|
|
|
3446
3446
|
'showPicker' in HTMLInputElement.prototype &&
|
|
3447
3447
|
CSS.supports('selector(::-webkit-calendar-picker-indicator)'));
|
|
3448
3448
|
|
|
3449
|
-
const prefix = `[Porsche Design System v${"3.32.
|
|
3449
|
+
const prefix = `[Porsche Design System v${"3.32.1"}]` // this part isn't covered by unit tests
|
|
3450
3450
|
;
|
|
3451
3451
|
const consoleError$1 = (...messages) => {
|
|
3452
3452
|
console.error(prefix, ...messages); // eslint-disable-line no-console
|
package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-base.cjs
CHANGED
|
@@ -21,7 +21,8 @@ id, label: label$1, description, loading, initialLoading, required, disabled, st
|
|
|
21
21
|
// refElement,
|
|
22
22
|
start, end, }) => {
|
|
23
23
|
const { namedSlotChildren } = splitChildren.splitChildren(children);
|
|
24
|
-
return (jsxRuntime.jsxs("div", { className: "root", children: [jsxRuntime.jsx(label.Label, { hasLabel: !!label$1 || namedSlotChildren.filter(({ props: { slot } }) => slot === 'label').length > 0, hasDescription: !!description || namedSlotChildren.filter(({ props: { slot } }) => slot === 'description').length > 0, host: null, label: label$1, description: description, htmlFor: id, isRequired: required, isLoading: loading, isDisabled: disabled }), jsxRuntime.jsxs("div", { className: "wrapper", children: [jsxRuntime.jsx("slot", { name: "start" }), start, jsxRuntime.jsx("input", { "aria-describedby": loading ? loadingMessage.loadingId : `${utilsEntry.descriptionId} ${stateMessage.messageId}`, "aria-invalid": state === 'error' ? 'true' : null, "aria-disabled": disabled || loading ? 'true' : null, "aria-readonly": readOnly ? 'true' : null, id: id, name: name, form: form, type: type, required: required, placeholder: placeholder, maxLength: maxLength, minLength: minLength, spellCheck: spellCheck, max: max, min: min, step: step, defaultValue: value, readOnly: readOnly, autoComplete: autoComplete, disabled: disabled, pattern: pattern, multiple: multiple
|
|
24
|
+
return (jsxRuntime.jsxs("div", { className: "root", children: [jsxRuntime.jsx(label.Label, { hasLabel: !!label$1 || namedSlotChildren.filter(({ props: { slot } }) => slot === 'label').length > 0, hasDescription: !!description || namedSlotChildren.filter(({ props: { slot } }) => slot === 'description').length > 0, host: null, label: label$1, description: description, htmlFor: id, isRequired: required, isLoading: loading, isDisabled: disabled }), jsxRuntime.jsxs("div", { className: "wrapper", children: [jsxRuntime.jsx("slot", { name: "start" }), start, jsxRuntime.jsx("input", { "aria-describedby": loading ? loadingMessage.loadingId : `${utilsEntry.descriptionId} ${stateMessage.messageId}`, "aria-invalid": state === 'error' ? 'true' : null, "aria-disabled": disabled || loading ? 'true' : null, "aria-readonly": readOnly ? 'true' : null, id: id, name: name, form: form, type: type, required: required, placeholder: placeholder || null, maxLength: maxLength, minLength: minLength, spellCheck: spellCheck, max: max, min: min, step: step, defaultValue: value, readOnly: readOnly, autoComplete: autoComplete, disabled: disabled, pattern: pattern, multiple: multiple, dir: "auto" // This is the default: let the browser decide in which direction the value should be placed.
|
|
25
|
+
}), end, jsxRuntime.jsx("slot", { name: "end" }), loading && jsxRuntime.jsx(spinner_wrapper.PSpinner, { className: "spinner", size: "inherit", theme: theme, "aria-hidden": "true" })] }), jsxRuntime.jsx(stateMessage.StateMessage, { hasMessage: (message || namedSlotChildren.filter(({ props: { slot } }) => slot === 'message').length > 0) && ['success', 'error'].includes(state), state: state, message: message, theme: theme, host: null }), jsxRuntime.jsx(loadingMessage.LoadingMessage, { loading: loading, initialLoading: initialLoading })] }));
|
|
25
26
|
};
|
|
26
27
|
|
|
27
28
|
exports.InputBase = InputBase;
|
package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pin-code.cjs
CHANGED
|
@@ -42,7 +42,7 @@ class DSRPinCode extends react.Component {
|
|
|
42
42
|
this.inputElements = [];
|
|
43
43
|
const currentInputId = 'current-input';
|
|
44
44
|
const style = minifyCss.minifyCss(stylesEntry.getPinCodeCss(this.props.hideLabel, this.props.state, this.props.disabled, this.props.loading, this.props.length, this.props.compact, this.props.theme));
|
|
45
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", 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, htmlFor: currentInputId, isRequired: this.props.required, isLoading: this.props.loading, isDisabled: this.props.disabled }), jsxRuntime.jsxs("div", { className: "wrapper", children: [Array.from(new Array(this.props.length), (_, index) => (jsxRuntime.jsx("input", { name: this.props.name, form: this.props.form, ...(utilsEntry.isCurrentInput(index, this.props.value, this.props.length) && { id: currentInputId }), type: this.props.type === 'number' ? 'text' : this.props.type, "aria-label": `${index + 1}-${this.props.length}`, "aria-describedby": `${utilsEntry.labelId} ${utilsEntry.descriptionId} ${stateMessage.messageId}`, "aria-invalid": this.props.state === 'error' ? 'true' : null, "aria-disabled": this.props.loading ? 'true' : null, autoComplete: "one-time-code", pattern: "\\d*", inputMode: "numeric" // get numeric keyboard on mobile
|
|
45
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", 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, htmlFor: currentInputId, isRequired: this.props.required, isLoading: this.props.loading, isDisabled: this.props.disabled }), jsxRuntime.jsxs("div", { className: "wrapper", dir: "ltr", children: [Array.from(new Array(this.props.length), (_, index) => (jsxRuntime.jsx("input", { name: this.props.name, form: this.props.form, ...(utilsEntry.isCurrentInput(index, this.props.value, this.props.length) && { id: currentInputId }), type: this.props.type === 'number' ? 'text' : this.props.type, "aria-label": `${index + 1}-${this.props.length}`, "aria-describedby": `${utilsEntry.labelId} ${utilsEntry.descriptionId} ${stateMessage.messageId}`, "aria-invalid": this.props.state === 'error' ? 'true' : null, "aria-disabled": this.props.loading ? 'true' : null, autoComplete: "one-time-code", pattern: "\\d*", inputMode: "numeric" // get numeric keyboard on mobile
|
|
46
46
|
, defaultValue: this.props.value[index] === ' ' ? null : this.props.value[index], disabled: this.props.disabled, required: this.props.required, onBlur: this.props.onInputBlur }, index))), this.props.loading && (jsxRuntime.jsx(spinner_wrapper.PSpinner, { className: "spinner", size: "inherit", theme: this.props.theme, "aria-hidden": "true" }))] }), jsxRuntime.jsx(stateMessage.StateMessage, { hasMessage: (this.props.message || namedSlotChildren.filter(({ props: { slot } }) => slot === 'message').length > 0) && ['success', 'error'].includes(this.props.state), state: this.props.state, message: this.props.message, theme: this.props.theme, host: null }), jsxRuntime.jsx(loadingMessage.LoadingMessage, { loading: this.props.loading, initialLoading: this.props.initialLoading })] })] }), this.props.children] }));
|
|
47
47
|
}
|
|
48
48
|
}
|
|
@@ -3641,7 +3641,7 @@ const hasShowPickerSupport = () => (hasDocument &&
|
|
|
3641
3641
|
'showPicker' in HTMLInputElement.prototype &&
|
|
3642
3642
|
CSS.supports('selector(::-webkit-calendar-picker-indicator)'));
|
|
3643
3643
|
|
|
3644
|
-
const prefix = `[Porsche Design System v${"3.32.
|
|
3644
|
+
const prefix = `[Porsche Design System v${"3.32.1"}]` // this part isn't covered by unit tests
|
|
3645
3645
|
;
|
|
3646
3646
|
const consoleError = (...messages) => {
|
|
3647
3647
|
console.error(prefix, ...messages); // eslint-disable-line no-console
|
|
@@ -6247,7 +6247,7 @@ const cssVarButtonPurePadding = '--ref-p-input-slotted-padding';
|
|
|
6247
6247
|
* @css-variable {"name": "--ref-p-input-slotted-margin", "description": "When slotting a `p-button-pure` or `p-link-pure` this variable needs to be set as `margin` in oder to adjust the spacings correctly."}
|
|
6248
6248
|
*/
|
|
6249
6249
|
const cssVarButtonPureMargin = '--ref-p-input-slotted-margin';
|
|
6250
|
-
const getFunctionalComponentInputBaseStyles = (disabled, loading, hideLabel, state, compact, readOnly, theme, additionalInputJssStyle) => {
|
|
6250
|
+
const getFunctionalComponentInputBaseStyles = (disabled, loading, hideLabel, state, compact, readOnly, theme, additionalInputJssStyle, additionalHostJssStyle) => {
|
|
6251
6251
|
const scalingVar = getScalingVar$4(compact);
|
|
6252
6252
|
const paddingBlock = `max(2px, ${formElementPaddingVertical} * ${scalingVar})`;
|
|
6253
6253
|
const paddingInline = `max(2px, ${formElementPaddingHorizontal} * ${scalingVar})`;
|
|
@@ -6275,6 +6275,12 @@ const getFunctionalComponentInputBaseStyles = (disabled, loading, hideLabel, sta
|
|
|
6275
6275
|
[`${cssVarButtonPurePadding}`]: `calc(1px * ${buttonCompensation})`,
|
|
6276
6276
|
[`${cssVarButtonPureMargin}`]: `calc(-1px * ${buttonCompensation})`,
|
|
6277
6277
|
}),
|
|
6278
|
+
// Alignment and direction of placeholder is set always to the right in RTL mode, because it is expected to have rtl language as placeholder value
|
|
6279
|
+
'&(:dir(rtl)) input::placeholder': {
|
|
6280
|
+
direction: 'rtl',
|
|
6281
|
+
textAlign: 'end',
|
|
6282
|
+
},
|
|
6283
|
+
...additionalHostJssStyle,
|
|
6278
6284
|
},
|
|
6279
6285
|
...getFunctionalComponentLabelAfterStyles(disabled),
|
|
6280
6286
|
...preventFoucOfNestedElementsStyles,
|
|
@@ -8224,6 +8230,14 @@ const getComponentCss$X = (disabled, loading, hideLabel, state, compact, readOnl
|
|
|
8224
8230
|
'&::-webkit-inner-spin-button, &::-webkit-outer-spin-button': {
|
|
8225
8231
|
WebkitAppearance: 'none',
|
|
8226
8232
|
},
|
|
8233
|
+
},
|
|
8234
|
+
// Overwrites direction to ltr for rtl languages to prevent issues with the email input, e.g. cursor jumping to the
|
|
8235
|
+
// end of the input when typing in the middle of the text. This is necessary because email addresses are assumed
|
|
8236
|
+
// to be always written in ltr direction and the input needs to accommodate that, even in rtl contexts.
|
|
8237
|
+
{
|
|
8238
|
+
'&(:dir(rtl)) .wrapper, &(:dir(rtl)) input:placeholder-shown': {
|
|
8239
|
+
direction: 'ltr',
|
|
8240
|
+
},
|
|
8227
8241
|
}),
|
|
8228
8242
|
'sr-only': getHiddenTextJssStyle(),
|
|
8229
8243
|
});
|
|
@@ -8359,6 +8373,14 @@ const getComponentCss$S = (disabled, loading, hideLabel, state, compact, readOnl
|
|
|
8359
8373
|
'&::-webkit-inner-spin-button, &::-webkit-outer-spin-button': {
|
|
8360
8374
|
WebkitAppearance: 'none',
|
|
8361
8375
|
},
|
|
8376
|
+
},
|
|
8377
|
+
// Overwrites direction to ltr for rtl languages to prevent issues with the tel input, e.g. cursor jumping to the
|
|
8378
|
+
// end of the input when typing in the middle of the text. This is necessary because tel values are assumed
|
|
8379
|
+
// to be always written in ltr direction and the input needs to accommodate that, even in rtl contexts.
|
|
8380
|
+
{
|
|
8381
|
+
'&(:dir(rtl)) .wrapper, &(:dir(rtl)) input:placeholder-shown': {
|
|
8382
|
+
direction: 'ltr',
|
|
8383
|
+
},
|
|
8362
8384
|
}),
|
|
8363
8385
|
'sr-only': getHiddenTextJssStyle(),
|
|
8364
8386
|
});
|
|
@@ -8440,6 +8462,14 @@ const getComponentCss$P = (disabled, loading, hideLabel, state, compact, readOnl
|
|
|
8440
8462
|
'&::-webkit-inner-spin-button, &::-webkit-outer-spin-button': {
|
|
8441
8463
|
WebkitAppearance: 'none',
|
|
8442
8464
|
},
|
|
8465
|
+
},
|
|
8466
|
+
// Overwrites direction to ltr for rtl languages to prevent issues with the url input, e.g. cursor jumping to the
|
|
8467
|
+
// end of the input when typing in the middle of the text. This is necessary because url addresses are assumed
|
|
8468
|
+
// to be always written in ltr direction and the input needs to accommodate that, even in rtl contexts.
|
|
8469
|
+
{
|
|
8470
|
+
'&(:dir(rtl)) .wrapper, &(:dir(rtl)) input:placeholder-shown': {
|
|
8471
|
+
direction: 'ltr',
|
|
8472
|
+
},
|
|
8443
8473
|
}),
|
|
8444
8474
|
'sr-only': getHiddenTextJssStyle(),
|
|
8445
8475
|
});
|
|
@@ -3444,7 +3444,7 @@ const hasShowPickerSupport = () => (hasDocument &&
|
|
|
3444
3444
|
'showPicker' in HTMLInputElement.prototype &&
|
|
3445
3445
|
CSS.supports('selector(::-webkit-calendar-picker-indicator)'));
|
|
3446
3446
|
|
|
3447
|
-
const prefix = `[Porsche Design System v${"3.32.
|
|
3447
|
+
const prefix = `[Porsche Design System v${"3.32.1"}]` // this part isn't covered by unit tests
|
|
3448
3448
|
;
|
|
3449
3449
|
const consoleError$1 = (...messages) => {
|
|
3450
3450
|
console.error(prefix, ...messages); // eslint-disable-line no-console
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-base.mjs
CHANGED
|
@@ -19,7 +19,8 @@ id, label, description, loading, initialLoading, required, disabled, state, mess
|
|
|
19
19
|
// refElement,
|
|
20
20
|
start, end, }) => {
|
|
21
21
|
const { namedSlotChildren } = splitChildren(children);
|
|
22
|
-
return (jsxs("div", { className: "root", children: [jsx(Label, { hasLabel: !!label || namedSlotChildren.filter(({ props: { slot } }) => slot === 'label').length > 0, hasDescription: !!description || namedSlotChildren.filter(({ props: { slot } }) => slot === 'description').length > 0, host: null, label: label, description: description, htmlFor: id, isRequired: required, isLoading: loading, isDisabled: disabled }), jsxs("div", { className: "wrapper", children: [jsx("slot", { name: "start" }), start, jsx("input", { "aria-describedby": loading ? loadingId : `${descriptionId} ${messageId}`, "aria-invalid": state === 'error' ? 'true' : null, "aria-disabled": disabled || loading ? 'true' : null, "aria-readonly": readOnly ? 'true' : null, id: id, name: name, form: form, type: type, required: required, placeholder: placeholder, maxLength: maxLength, minLength: minLength, spellCheck: spellCheck, max: max, min: min, step: step, defaultValue: value, readOnly: readOnly, autoComplete: autoComplete, disabled: disabled, pattern: pattern, multiple: multiple
|
|
22
|
+
return (jsxs("div", { className: "root", children: [jsx(Label, { hasLabel: !!label || namedSlotChildren.filter(({ props: { slot } }) => slot === 'label').length > 0, hasDescription: !!description || namedSlotChildren.filter(({ props: { slot } }) => slot === 'description').length > 0, host: null, label: label, description: description, htmlFor: id, isRequired: required, isLoading: loading, isDisabled: disabled }), jsxs("div", { className: "wrapper", children: [jsx("slot", { name: "start" }), start, jsx("input", { "aria-describedby": loading ? loadingId : `${descriptionId} ${messageId}`, "aria-invalid": state === 'error' ? 'true' : null, "aria-disabled": disabled || loading ? 'true' : null, "aria-readonly": readOnly ? 'true' : null, id: id, name: name, form: form, type: type, required: required, placeholder: placeholder || null, maxLength: maxLength, minLength: minLength, spellCheck: spellCheck, max: max, min: min, step: step, defaultValue: value, readOnly: readOnly, autoComplete: autoComplete, disabled: disabled, pattern: pattern, multiple: multiple, dir: "auto" // This is the default: let the browser decide in which direction the value should be placed.
|
|
23
|
+
}), end, jsx("slot", { name: "end" }), loading && jsx(PSpinner, { className: "spinner", size: "inherit", theme: theme, "aria-hidden": "true" })] }), jsx(StateMessage, { hasMessage: (message || namedSlotChildren.filter(({ props: { slot } }) => slot === 'message').length > 0) && ['success', 'error'].includes(state), state: state, message: message, theme: theme, host: null }), jsx(LoadingMessage, { loading: loading, initialLoading: initialLoading })] }));
|
|
23
24
|
};
|
|
24
25
|
|
|
25
26
|
export { InputBase };
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pin-code.mjs
CHANGED
|
@@ -40,7 +40,7 @@ class DSRPinCode extends Component {
|
|
|
40
40
|
this.inputElements = [];
|
|
41
41
|
const currentInputId = 'current-input';
|
|
42
42
|
const style = minifyCss(getComponentCss$B(this.props.hideLabel, this.props.state, this.props.disabled, this.props.loading, this.props.length, this.props.compact, this.props.theme));
|
|
43
|
-
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", 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, htmlFor: currentInputId, isRequired: this.props.required, isLoading: this.props.loading, isDisabled: this.props.disabled }), jsxs("div", { className: "wrapper", children: [Array.from(new Array(this.props.length), (_, index) => (jsx("input", { name: this.props.name, form: this.props.form, ...(isCurrentInput(index, this.props.value, this.props.length) && { id: currentInputId }), type: this.props.type === 'number' ? 'text' : this.props.type, "aria-label": `${index + 1}-${this.props.length}`, "aria-describedby": `${labelId} ${descriptionId} ${messageId}`, "aria-invalid": this.props.state === 'error' ? 'true' : null, "aria-disabled": this.props.loading ? 'true' : null, autoComplete: "one-time-code", pattern: "\\d*", inputMode: "numeric" // get numeric keyboard on mobile
|
|
43
|
+
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", 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, htmlFor: currentInputId, isRequired: this.props.required, isLoading: this.props.loading, isDisabled: this.props.disabled }), jsxs("div", { className: "wrapper", dir: "ltr", children: [Array.from(new Array(this.props.length), (_, index) => (jsx("input", { name: this.props.name, form: this.props.form, ...(isCurrentInput(index, this.props.value, this.props.length) && { id: currentInputId }), type: this.props.type === 'number' ? 'text' : this.props.type, "aria-label": `${index + 1}-${this.props.length}`, "aria-describedby": `${labelId} ${descriptionId} ${messageId}`, "aria-invalid": this.props.state === 'error' ? 'true' : null, "aria-disabled": this.props.loading ? 'true' : null, autoComplete: "one-time-code", pattern: "\\d*", inputMode: "numeric" // get numeric keyboard on mobile
|
|
44
44
|
, defaultValue: this.props.value[index] === ' ' ? null : this.props.value[index], disabled: this.props.disabled, required: this.props.required, onBlur: this.props.onInputBlur }, index))), this.props.loading && (jsx(PSpinner, { className: "spinner", size: "inherit", theme: this.props.theme, "aria-hidden": "true" }))] }), jsx(StateMessage, { hasMessage: (this.props.message || namedSlotChildren.filter(({ props: { slot } }) => slot === 'message').length > 0) && ['success', 'error'].includes(this.props.state), state: this.props.state, message: this.props.message, theme: this.props.theme, host: null }), jsx(LoadingMessage, { loading: this.props.loading, initialLoading: this.props.initialLoading })] })] }), this.props.children] }));
|
|
45
45
|
}
|
|
46
46
|
}
|