@porsche-design-system/components-react 3.32.0-rc.0 → 3.32.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 +25 -2
- package/bin/patchRemixRunProcessBrowserGlobalIdentifier.js +0 -0
- package/cjs/lib/components/button-group.wrapper.cjs +1 -0
- package/esm/lib/components/button-group.wrapper.d.ts +1 -0
- package/esm/lib/components/button-group.wrapper.mjs +1 -0
- package/esm/lib/components/radio-group-option.wrapper.d.ts +2 -0
- package/esm/lib/types.d.ts +3 -1
- package/package.json +5 -5
- package/ssr/cjs/components/dist/styles/esm/styles-entry.cjs +105 -44
- package/ssr/cjs/components/dist/utils/esm/utils-entry.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/button-group.wrapper.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/radio-group-option.wrapper.cjs +3 -2
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button-group.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox.cjs +2 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-date.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-email.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-month.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-number.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-password.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-search.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-tel.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-text.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-time.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-url.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-week.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/label.cjs +4 -2
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/legacy-label.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/multi-select.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pin-code.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/radio-group-option.cjs +9 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/radio-group.cjs +3 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/segmented-control.cjs +3 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/textarea.cjs +1 -0
- package/ssr/esm/components/dist/styles/esm/styles-entry.mjs +105 -45
- package/ssr/esm/components/dist/utils/esm/utils-entry.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/button-group.wrapper.mjs +1 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/radio-group-option.wrapper.mjs +3 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button-group.mjs +1 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox.mjs +2 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-date.mjs +1 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-email.mjs +1 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-month.mjs +1 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-number.mjs +1 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-password.mjs +1 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-search.mjs +1 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-tel.mjs +1 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-text.mjs +1 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-time.mjs +1 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-url.mjs +1 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-week.mjs +1 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/label.mjs +4 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/legacy-label.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/multi-select.mjs +1 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pin-code.mjs +1 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/radio-group-option.mjs +10 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/radio-group.mjs +4 -5
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/segmented-control.mjs +3 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select.mjs +1 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/textarea.mjs +1 -0
- package/ssr/esm/lib/components/button-group.wrapper.d.ts +1 -0
- package/ssr/esm/lib/components/radio-group-option.wrapper.d.ts +2 -0
- package/ssr/esm/lib/dsr-components/button-group.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/checkbox.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/input-date.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/input-email.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/input-month.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/input-number.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/input-password.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/input-search.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/input-tel.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/input-text.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/input-time.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/input-url.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/input-week.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/label.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/multi-select.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/pin-code.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/radio-group-option.d.ts +4 -0
- package/ssr/esm/lib/dsr-components/radio-group.d.ts +2 -1
- package/ssr/esm/lib/dsr-components/segmented-control.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/select.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/textarea.d.ts +1 -0
- package/ssr/esm/lib/types.d.ts +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -14,12 +14,35 @@ 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.0-rc.
|
|
17
|
+
## [3.32.0-rc.2] - 2026-02-03
|
|
18
18
|
|
|
19
19
|
### Added
|
|
20
20
|
|
|
21
|
-
- `
|
|
21
|
+
- `Checkbox`, `Input-*`, `Multi-Select`, `Pin Code`, `Radio Button Group`, `Segmented-Control`, `Select`, `Textarea`:
|
|
22
|
+
New slot `label-after` to add custom content (e.g. `Popover`) after the `label` element
|
|
23
|
+
([#4181](https://github.com/porsche-design-system/porsche-design-system/pull/4181))
|
|
24
|
+
- `Angular`: Bumped peer dependency to support Angular new major version 21 ([#4178](https://github.com/porsche-design-system/porsche-design-system/pull/4178))
|
|
25
|
+
- `Carousel`:
|
|
26
|
+
- `width` prop now supports `wide` and `full` values ([#4180](https://github.com/porsche-design-system/porsche-design-system/pull/4180))
|
|
27
|
+
- `--p-carousel-px` CSS custom property introduced to control horizontal padding (when used, the `width` prop has no effect anymore)
|
|
28
|
+
([#4180](https://github.com/porsche-design-system/porsche-design-system/pull/4180))
|
|
29
|
+
|
|
30
|
+
## [3.32.0-rc.1] - 2026-01-12
|
|
31
|
+
|
|
32
|
+
### Added
|
|
33
|
+
|
|
34
|
+
- `AG Grid`: Bumped peer dependency to support AG Grid new major version 35
|
|
22
35
|
([#4143](https://github.com/porsche-design-system/porsche-design-system/issues/4143))
|
|
36
|
+
|
|
37
|
+
### Fixed
|
|
38
|
+
|
|
39
|
+
- `Radio Group Option`: missing `delegatesFocus`
|
|
40
|
+
([#4135](https://github.com/porsche-design-system/porsche-design-system/pull/4135))
|
|
41
|
+
|
|
42
|
+
## [3.32.0-rc.0] - 2025-12-16
|
|
43
|
+
|
|
44
|
+
### Added
|
|
45
|
+
|
|
23
46
|
- `Multi Select, Select`:
|
|
24
47
|
- `selected` slot for custom selection rendering and enabling complex options
|
|
25
48
|
- `options-status` slot for loading, error and no results states when using custom filtering
|
|
File without changes
|
|
@@ -6,6 +6,7 @@ var react = require('react');
|
|
|
6
6
|
var hooks = require('../../hooks.cjs');
|
|
7
7
|
var utils = require('../../utils.cjs');
|
|
8
8
|
|
|
9
|
+
/** @deprecated since v3.32.0, will be removed with next major release. Use simple styles instead. */
|
|
9
10
|
const PButtonGroup = /*#__PURE__*/ react.forwardRef(({ direction = { base: 'column', xs: 'row' }, className, ...rest }, ref) => {
|
|
10
11
|
const elementRef = react.useRef(undefined);
|
|
11
12
|
const WebComponentTag = hooks.usePrefix('p-button-group');
|
|
@@ -6,6 +6,7 @@ export type PButtonGroupProps = BaseProps & {
|
|
|
6
6
|
*/
|
|
7
7
|
direction?: BreakpointCustomizable<ButtonGroupDirection>;
|
|
8
8
|
};
|
|
9
|
+
/** @deprecated since v3.32.0, will be removed with next major release. Use simple styles instead. */
|
|
9
10
|
export declare const PButtonGroup: import("react").ForwardRefExoticComponent<Omit<import("react").DOMAttributes<{}>, "onChange" | "onInput" | "onToggle"> & Pick<import("react").HTMLAttributes<{}>, "suppressHydrationWarning" | "autoFocus" | "className" | "dir" | "hidden" | "id" | "inert" | "lang" | "slot" | "style" | "tabIndex" | "title" | "translate" | "role"> & {
|
|
10
11
|
/**
|
|
11
12
|
* Defines the direction of the main and cross axis. The default is ’{base: ‘column’, xs: ‘row’}' showing buttons vertically stacked on mobile viewports and side-by-side in a horizontal row from breakpoint ‘xs’. You always need to provide a base value when using breakpoints.
|
|
@@ -4,6 +4,7 @@ import { forwardRef, useRef } from 'react';
|
|
|
4
4
|
import { usePrefix, useBrowserLayoutEffect, useMergedClass } from '../../hooks.mjs';
|
|
5
5
|
import { syncRef } from '../../utils.mjs';
|
|
6
6
|
|
|
7
|
+
/** @deprecated since v3.32.0, will be removed with next major release. Use simple styles instead. */
|
|
7
8
|
const PButtonGroup = /*#__PURE__*/ forwardRef(({ direction = { base: 'column', xs: 'row' }, className, ...rest }, ref) => {
|
|
8
9
|
const elementRef = useRef(undefined);
|
|
9
10
|
const WebComponentTag = usePrefix('p-button-group');
|
package/esm/lib/types.d.ts
CHANGED
|
@@ -924,7 +924,9 @@ export type CanvasSidebarStartUpdateEventDetail = {
|
|
|
924
924
|
};
|
|
925
925
|
declare const CAROUSEL_WIDTHS: readonly [
|
|
926
926
|
"basic",
|
|
927
|
-
"extended"
|
|
927
|
+
"extended",
|
|
928
|
+
"wide",
|
|
929
|
+
"full"
|
|
928
930
|
];
|
|
929
931
|
export type CarouselWidth = (typeof CAROUSEL_WIDTHS)[number];
|
|
930
932
|
declare const CAROUSEL_SLIDES_PER_PAGE: (string | number)[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@porsche-design-system/components-react",
|
|
3
|
-
"version": "3.32.0-rc.
|
|
3
|
+
"version": "3.32.0-rc.2",
|
|
4
4
|
"description": "Porsche Design System is a component library designed to help developers create the best experience for software or services distributed by Dr. Ing. h.c. F. Porsche AG.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"porsche",
|
|
@@ -17,12 +17,12 @@
|
|
|
17
17
|
"license": "SEE LICENSE IN LICENSE",
|
|
18
18
|
"homepage": "https://designsystem.porsche.com",
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@porsche-design-system/components-js": "3.32.0-rc.
|
|
20
|
+
"@porsche-design-system/components-js": "3.32.0-rc.2"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
|
-
"ag-grid-community": ">=
|
|
24
|
-
"ag-grid-enterprise": ">=
|
|
25
|
-
"ag-grid-react": ">=
|
|
23
|
+
"ag-grid-community": ">= 35.0.0 <36.0.0",
|
|
24
|
+
"ag-grid-enterprise": ">= 35.0.0 <36.0.0",
|
|
25
|
+
"ag-grid-react": ">= 35.0.0 <36.0.0",
|
|
26
26
|
"react": ">=19.0.0 <20.0.0",
|
|
27
27
|
"react-dom": ">=19.0.0 <20.0.0",
|
|
28
28
|
"tailwindcss": ">= 4.0.0 <5.0.0"
|
|
@@ -157,6 +157,18 @@ const _getGridOffsetXXL = (width) => `calc(${_gridPadding} + ${_gridSafeZoneXXL}
|
|
|
157
157
|
|
|
158
158
|
const gridFullOffset = _gridPadding;
|
|
159
159
|
|
|
160
|
+
const gridWideOffsetBase = _gridSafeZoneBase;
|
|
161
|
+
|
|
162
|
+
const gridWideOffsetS = _gridSafeZoneS;
|
|
163
|
+
|
|
164
|
+
const gridWideOffsetXXL = `calc(${_gridPadding} + ${_gridSafeZoneXXL})`;
|
|
165
|
+
|
|
166
|
+
const gridWideOffset = {
|
|
167
|
+
base: gridWideOffsetBase,
|
|
168
|
+
s: gridWideOffsetS,
|
|
169
|
+
xxl: gridWideOffsetXXL,
|
|
170
|
+
};
|
|
171
|
+
|
|
160
172
|
const gridExtendedOffsetBase = _gridSafeZoneBase;
|
|
161
173
|
|
|
162
174
|
const gridExtendedOffsetS = _getGridOffsetS('extended');
|
|
@@ -3631,7 +3643,7 @@ const hasShowPickerSupport = () => (hasDocument &&
|
|
|
3631
3643
|
'showPicker' in HTMLInputElement.prototype &&
|
|
3632
3644
|
CSS.supports('selector(::-webkit-calendar-picker-indicator)'));
|
|
3633
3645
|
|
|
3634
|
-
const prefix = `[Porsche Design System v${"3.32.0-rc.
|
|
3646
|
+
const prefix = `[Porsche Design System v${"3.32.0-rc.2"}]` // this part isn't covered by unit tests
|
|
3635
3647
|
;
|
|
3636
3648
|
const consoleError = (...messages) => {
|
|
3637
3649
|
console.error(prefix, ...messages); // eslint-disable-line no-console
|
|
@@ -5164,6 +5176,18 @@ const getComponentCss$1j = (theme, isSidebarStartOpen, isSidebarEndOpen) => {
|
|
|
5164
5176
|
});
|
|
5165
5177
|
};
|
|
5166
5178
|
|
|
5179
|
+
/**
|
|
5180
|
+
* @css-variable {"name": "--p-carousel-px", "description": "Defines the logical inline start and end padding of the carousel, the extra space is used to show parts of the next/previous slide. When used then the prop `width` has no effect anymore.", "defaultValue": ""}
|
|
5181
|
+
*/
|
|
5182
|
+
const cssVarPaddingInline = '--p-carousel-px';
|
|
5183
|
+
/**
|
|
5184
|
+
* @css-variable {"name": "--p-carousel-ps", "description": "Defines the logical inline start padding of the carousel, the extra space is used to show parts of the next/previous slide. Needs to be used in combination with `--p-carousel-px` or `--p-carousel-pe`. When used then the prop `width` has no effect anymore.", "defaultValue": ""}
|
|
5185
|
+
*/
|
|
5186
|
+
const cssVarPaddingInlineStart = '--p-carousel-ps';
|
|
5187
|
+
/**
|
|
5188
|
+
* @css-variable {"name": "--p-carousel-pe", "description": "Defines the logical inline end padding of the carousel, the extra space is used to show parts of the next/previous slide. Needs to be used in combination with `--p-carousel-px` or `--p-carousel-ps`. When used then the prop `width` has no effect anymore.", "defaultValue": ""}
|
|
5189
|
+
*/
|
|
5190
|
+
const cssVarPaddingInlineEnd = '--p-carousel-pe';
|
|
5167
5191
|
/**
|
|
5168
5192
|
* @css-variable {"name": "--p-carousel-prev-next-filter", "description": "CSS Filter applied to the navigation (prev/next buttons)", "defaultValue": "none"}
|
|
5169
5193
|
*/
|
|
@@ -5191,6 +5215,12 @@ const mediaQueryPointerCoarse = '@media (pointer: coarse)';
|
|
|
5191
5215
|
const spacingMap = {
|
|
5192
5216
|
basic: gridBasicOffset,
|
|
5193
5217
|
extended: gridExtendedOffset,
|
|
5218
|
+
wide: gridWideOffset,
|
|
5219
|
+
full: {
|
|
5220
|
+
base: gridFullOffset,
|
|
5221
|
+
s: gridFullOffset,
|
|
5222
|
+
xxl: gridFullOffset
|
|
5223
|
+
},
|
|
5194
5224
|
};
|
|
5195
5225
|
const backfaceVisibilityJssStyle = {
|
|
5196
5226
|
backfaceVisibility: 'hidden',
|
|
@@ -5306,14 +5336,17 @@ const getComponentCss$1i = (gradientColor, hasHeading, hasDescription, hasContro
|
|
|
5306
5336
|
},
|
|
5307
5337
|
header: {
|
|
5308
5338
|
display: 'grid',
|
|
5309
|
-
|
|
5339
|
+
paddingInlineStart: `var(${cssVarPaddingInlineStart},var(${cssVarPaddingInline},${spacingMap[width].base}))`,
|
|
5340
|
+
paddingInlineEnd: `var(${cssVarPaddingInlineEnd},var(${cssVarPaddingInline},${spacingMap[width].base}))`,
|
|
5310
5341
|
[mediaQueryS]: {
|
|
5311
|
-
gridTemplateColumns: 'minmax(0px,
|
|
5312
|
-
|
|
5342
|
+
gridTemplateColumns: 'minmax(0px,1fr) auto',
|
|
5343
|
+
paddingInlineStart: `var(${cssVarPaddingInlineStart},var(${cssVarPaddingInline},${spacingMap[width].s}))`,
|
|
5344
|
+
paddingInlineEnd: `var(${cssVarPaddingInlineEnd},var(${cssVarPaddingInline},${spacingMap[width].s}))`,
|
|
5313
5345
|
...(hasNavigation && { columnGap: spacingStaticMedium }),
|
|
5314
5346
|
},
|
|
5315
5347
|
[mediaQueryXXL]: {
|
|
5316
|
-
|
|
5348
|
+
paddingInlineStart: `var(${cssVarPaddingInlineStart},var(${cssVarPaddingInline},${spacingMap[width].xxl}))`,
|
|
5349
|
+
paddingInlineEnd: `var(${cssVarPaddingInlineEnd},var(${cssVarPaddingInline},${spacingMap[width].xxl}))`,
|
|
5317
5350
|
},
|
|
5318
5351
|
},
|
|
5319
5352
|
nav: {
|
|
@@ -5345,12 +5378,16 @@ const getComponentCss$1i = (gradientColor, hasHeading, hasDescription, hasContro
|
|
|
5345
5378
|
position: 'relative',
|
|
5346
5379
|
// !important is necessary to override inline styles set by splide library
|
|
5347
5380
|
...addImportantToEachRule({
|
|
5348
|
-
|
|
5381
|
+
paddingBlock: '0px',
|
|
5382
|
+
paddingInlineStart: `var(${cssVarPaddingInlineStart},var(${cssVarPaddingInline},${spacingMap[width].base}))`,
|
|
5383
|
+
paddingInlineEnd: `var(${cssVarPaddingInlineEnd},var(${cssVarPaddingInline},${spacingMap[width].base}))`,
|
|
5349
5384
|
[mediaQueryS]: {
|
|
5350
|
-
|
|
5385
|
+
paddingInlineStart: `var(${cssVarPaddingInlineStart},var(${cssVarPaddingInline},${spacingMap[width].s}))`,
|
|
5386
|
+
paddingInlineEnd: `var(${cssVarPaddingInlineEnd},var(${cssVarPaddingInline},${spacingMap[width].s}))`,
|
|
5351
5387
|
},
|
|
5352
5388
|
[mediaQueryXXL]: {
|
|
5353
|
-
|
|
5389
|
+
paddingInlineStart: `var(${cssVarPaddingInlineStart},var(${cssVarPaddingInline},${spacingMap[width].xxl}))`,
|
|
5390
|
+
paddingInlineEnd: `var(${cssVarPaddingInlineEnd},var(${cssVarPaddingInline},${spacingMap[width].xxl}))`,
|
|
5354
5391
|
},
|
|
5355
5392
|
}),
|
|
5356
5393
|
'&--draggable': {
|
|
@@ -5580,13 +5617,13 @@ const getSlottedCheckboxRadioButtonStyles = (state, isDisabled, isLoading, theme
|
|
|
5580
5617
|
...(!disabledOrLoading &&
|
|
5581
5618
|
!isHighContrastMode &&
|
|
5582
5619
|
hoverMediaQuery({
|
|
5583
|
-
'&(input:hover)
|
|
5620
|
+
'&(input:hover),.label-wrapper:hover~.wrapper &(input)': {
|
|
5584
5621
|
borderColor: uncheckedHoverColor,
|
|
5585
5622
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5586
5623
|
borderColor: uncheckedHoverColorDark,
|
|
5587
5624
|
}),
|
|
5588
5625
|
},
|
|
5589
|
-
'&(input:checked:hover)
|
|
5626
|
+
'&(input:checked:hover),.label-wrapper:hover~.wrapper &(input:checked)': {
|
|
5590
5627
|
borderColor: checkedHoverColor,
|
|
5591
5628
|
backgroundColor: checkedHoverColor,
|
|
5592
5629
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
@@ -5594,7 +5631,7 @@ const getSlottedCheckboxRadioButtonStyles = (state, isDisabled, isLoading, theme
|
|
|
5594
5631
|
backgroundColor: checkedHoverColorDark,
|
|
5595
5632
|
}),
|
|
5596
5633
|
},
|
|
5597
|
-
'label:hover~.wrapper &(input)': supportsChromiumMediaQuery({
|
|
5634
|
+
'.label-wrapper:hover~.wrapper &(input)': supportsChromiumMediaQuery({
|
|
5598
5635
|
transition: 'unset', // Fixes chrome bug where transition properties are stuck on hover
|
|
5599
5636
|
}),
|
|
5600
5637
|
})),
|
|
@@ -5619,26 +5656,44 @@ const getFunctionalComponentRequiredStyles = () => {
|
|
|
5619
5656
|
};
|
|
5620
5657
|
};
|
|
5621
5658
|
|
|
5622
|
-
const
|
|
5659
|
+
const getFunctionalComponentLabelAfterStyles = (isDisabledOrLoading, additionalIsDisabledJssStyle) => {
|
|
5660
|
+
return {
|
|
5661
|
+
'slot[name="label-after"]': {
|
|
5662
|
+
display: 'inline-block',
|
|
5663
|
+
verticalAlign: 'top',
|
|
5664
|
+
...(isDisabledOrLoading && {
|
|
5665
|
+
pointerEvents: 'none',
|
|
5666
|
+
opacity: '0.4', // workaround: must be opacity because color tokens would not affect e.g. slotted `popover`
|
|
5667
|
+
...additionalIsDisabledJssStyle,
|
|
5668
|
+
}),
|
|
5669
|
+
},
|
|
5670
|
+
};
|
|
5671
|
+
};
|
|
5672
|
+
const getFunctionalComponentLabelStyles = (isDisabledOrLoading, hideLabel, theme, additionalDefaultJssStyle, additionalLabelWrapperJssStyle, additionalIsShownJssStyle) => {
|
|
5623
5673
|
const { primaryColor, disabledColor, contrastHighColor } = getThemedColors(theme);
|
|
5624
5674
|
const { primaryColor: primaryColorDark, disabledColor: disabledColorDark, contrastHighColor: contrastHighColorDark, } = getThemedColors('dark');
|
|
5625
5675
|
return {
|
|
5676
|
+
'label-wrapper': {
|
|
5677
|
+
...buildResponsiveStyles(hideLabel, (isHidden) => ({
|
|
5678
|
+
...(!isHidden && { minWidth: 'fit-content' }), // ensures label contents don't shrink to zero in grid containers
|
|
5679
|
+
...getHiddenTextJssStyle(isHidden, additionalIsShownJssStyle),
|
|
5680
|
+
})),
|
|
5681
|
+
...additionalLabelWrapperJssStyle,
|
|
5682
|
+
},
|
|
5626
5683
|
label: {
|
|
5627
5684
|
...textSmallStyle,
|
|
5628
5685
|
cursor: isDisabledOrLoading ? 'not-allowed' : 'pointer',
|
|
5629
|
-
justifySelf: 'flex-start', // ensures label is not getting stretched by flex or grid context of its parent
|
|
5630
5686
|
color: isDisabledOrLoading ? disabledColor : primaryColor,
|
|
5631
5687
|
transition: getTransition('color'), // for smooth transitions between e.g. disabled state
|
|
5632
|
-
...buildResponsiveStyles(hideLabel, (isHidden) => getHiddenTextJssStyle(isHidden, additionalIsShownJssStyle)),
|
|
5633
5688
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5634
5689
|
color: isDisabledOrLoading ? disabledColorDark : primaryColorDark,
|
|
5635
5690
|
}),
|
|
5691
|
+
display: 'inline',
|
|
5636
5692
|
'&:empty': {
|
|
5637
5693
|
display: 'none', // prevents outer spacing caused by parents grid gap, in case no label value is defined (although it has to be set to be a11y compliant)
|
|
5638
5694
|
},
|
|
5639
|
-
'
|
|
5695
|
+
'&:is(span)': {
|
|
5640
5696
|
cursor: 'unset',
|
|
5641
|
-
marginTop: `-${spacingStaticXSmall}`,
|
|
5642
5697
|
fontSize: fontSizeTextXSmall,
|
|
5643
5698
|
...(!isDisabledOrLoading && {
|
|
5644
5699
|
color: contrastHighColor,
|
|
@@ -5646,6 +5701,8 @@ const getFunctionalComponentLabelStyles = (isDisabledOrLoading, hideLabel, theme
|
|
|
5646
5701
|
color: contrastHighColorDark,
|
|
5647
5702
|
}),
|
|
5648
5703
|
}),
|
|
5704
|
+
...buildResponsiveStyles(hideLabel, (isHidden) => getHiddenTextJssStyle(isHidden, { marginTop: `-${spacingStaticXSmall}` })),
|
|
5705
|
+
marginTop: `-${spacingStaticXSmall}`,
|
|
5649
5706
|
},
|
|
5650
5707
|
...additionalDefaultJssStyle,
|
|
5651
5708
|
},
|
|
@@ -5767,7 +5824,7 @@ const getComponentCss$1h = (hideLabel, state, isDisabled, isLoading, theme) => {
|
|
|
5767
5824
|
// .label / .required
|
|
5768
5825
|
...getFunctionalComponentLabelStyles(isDisabled || isLoading, hideLabel, theme, {
|
|
5769
5826
|
gridArea: '1/2',
|
|
5770
|
-
}, {
|
|
5827
|
+
}, null, {
|
|
5771
5828
|
paddingTop: '2px', // compensate vertical alignment
|
|
5772
5829
|
paddingInlineStart: spacingStaticSmall, // asymmetric padding used instead of gap to prevent not clickable area between label and input
|
|
5773
5830
|
}),
|
|
@@ -5936,6 +5993,7 @@ const getComponentCss$1g = (hideLabel, state, isDisabled, isLoading, compact, th
|
|
|
5936
5993
|
...hostHiddenStyles,
|
|
5937
5994
|
}),
|
|
5938
5995
|
},
|
|
5996
|
+
...getFunctionalComponentLabelAfterStyles(disabledOrLoading),
|
|
5939
5997
|
...preventFoucOfNestedElementsStyles,
|
|
5940
5998
|
input: getCheckboxBaseStyles(theme, isDisabled, isLoading, state, compact),
|
|
5941
5999
|
...(isLoading
|
|
@@ -5973,13 +6031,13 @@ const getComponentCss$1g = (hideLabel, state, isDisabled, isLoading, compact, th
|
|
|
5973
6031
|
...(!disabledOrLoading &&
|
|
5974
6032
|
!isHighContrastMode &&
|
|
5975
6033
|
hoverMediaQuery({
|
|
5976
|
-
'input:hover
|
|
6034
|
+
'input:hover,.wrapper:has(.label-wrapper:hover) input': {
|
|
5977
6035
|
borderColor: uncheckedHoverColor,
|
|
5978
6036
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5979
6037
|
borderColor: uncheckedHoverColorDark,
|
|
5980
6038
|
}),
|
|
5981
6039
|
},
|
|
5982
|
-
'input:checked:hover
|
|
6040
|
+
'input:checked:hover,.wrapper:has(.label-wrapper:hover) input:checked': {
|
|
5983
6041
|
borderColor: checkedHoverColor,
|
|
5984
6042
|
backgroundColor: checkedHoverColor,
|
|
5985
6043
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
@@ -5987,7 +6045,7 @@ const getComponentCss$1g = (hideLabel, state, isDisabled, isLoading, compact, th
|
|
|
5987
6045
|
backgroundColor: checkedHoverColorDark,
|
|
5988
6046
|
}),
|
|
5989
6047
|
},
|
|
5990
|
-
'input:indeterminate:hover
|
|
6048
|
+
'input:indeterminate:hover,.wrapper:has(.label-wrapper:hover) input:indeterminate': {
|
|
5991
6049
|
background, // Safari fix: ensures proper rendering of 'indeterminate' mode with 'checked' state.
|
|
5992
6050
|
borderColor: uncheckedHoverColor, // Safari fix: ensures proper rendering of 'indeterminate' mode with 'checked' state.
|
|
5993
6051
|
backgroundImage: getIndeterminateSVGBackgroundImage(escapeHashCharacter(indeterminateIconHoverColor)),
|
|
@@ -5997,7 +6055,7 @@ const getComponentCss$1g = (hideLabel, state, isDisabled, isLoading, compact, th
|
|
|
5997
6055
|
backgroundColor: 'transparent',
|
|
5998
6056
|
}),
|
|
5999
6057
|
},
|
|
6000
|
-
'label:hover~.wrapper input': supportsChromiumMediaQuery({
|
|
6058
|
+
'.label-wrapper:hover~.wrapper input': supportsChromiumMediaQuery({
|
|
6001
6059
|
transition: 'unset', // Fixes chrome bug where transition properties are stuck on hover
|
|
6002
6060
|
}),
|
|
6003
6061
|
})),
|
|
@@ -6019,21 +6077,24 @@ const getComponentCss$1g = (hideLabel, state, isDisabled, isLoading, compact, th
|
|
|
6019
6077
|
},
|
|
6020
6078
|
root: {
|
|
6021
6079
|
display: 'grid',
|
|
6022
|
-
gridTemplateColumns: 'auto minmax(0, 1fr)',
|
|
6023
6080
|
rowGap: spacingStaticXSmall,
|
|
6024
6081
|
...(disabledOrLoading && {
|
|
6025
6082
|
cursor: 'not-allowed',
|
|
6026
6083
|
}),
|
|
6027
6084
|
},
|
|
6028
6085
|
wrapper: {
|
|
6086
|
+
display: 'grid',
|
|
6087
|
+
gridTemplateColumns: 'auto minmax(0, 1fr)',
|
|
6088
|
+
},
|
|
6089
|
+
'input-wrapper': {
|
|
6029
6090
|
...textSmallStyle,
|
|
6030
6091
|
minWidth: minimumTouchTargetSize,
|
|
6031
6092
|
minHeight: minimumTouchTargetSize,
|
|
6032
6093
|
justifyContent: 'center',
|
|
6033
6094
|
alignItems: 'center',
|
|
6095
|
+
alignSelf: 'flex-start', // in case label becomes multiline
|
|
6034
6096
|
display: 'grid',
|
|
6035
6097
|
gridArea: '1/1',
|
|
6036
|
-
alignSelf: 'flex-start', // in case label becomes multiline
|
|
6037
6098
|
height,
|
|
6038
6099
|
},
|
|
6039
6100
|
...(isLoading && {
|
|
@@ -6049,16 +6110,13 @@ const getComponentCss$1g = (hideLabel, state, isDisabled, isLoading, compact, th
|
|
|
6049
6110
|
}),
|
|
6050
6111
|
// .label / .required
|
|
6051
6112
|
...getFunctionalComponentLabelStyles(isDisabled || isLoading, hideLabel, theme, {
|
|
6052
|
-
gridArea: '1/2',
|
|
6053
6113
|
...(isLoading && { pointerEvents: 'none' }), // prevent default htmlFor behavior. TODO: Remove as soon as label component for custom form components exists.
|
|
6054
|
-
}, {
|
|
6114
|
+
}, null, {
|
|
6055
6115
|
paddingTop,
|
|
6056
6116
|
paddingInlineStart,
|
|
6057
6117
|
}),
|
|
6058
6118
|
// .message
|
|
6059
|
-
...getFunctionalComponentStateMessageStyles(theme, state, {
|
|
6060
|
-
gridColumn: '1/3',
|
|
6061
|
-
}),
|
|
6119
|
+
...getFunctionalComponentStateMessageStyles(theme, state, {}),
|
|
6062
6120
|
// .loading
|
|
6063
6121
|
...getFunctionalComponentLoadingMessageStyles(),
|
|
6064
6122
|
});
|
|
@@ -6100,7 +6158,7 @@ const getSlottedTextFieldTextareaSelectStyles = (child, state, isLoading, theme,
|
|
|
6100
6158
|
...(!isLoading &&
|
|
6101
6159
|
hoverMediaQuery({
|
|
6102
6160
|
// with the media query the selector has higher priority and overrides disabled styles
|
|
6103
|
-
[`::slotted(${child}:not(:disabled):not(:focus):not([readonly]):hover)
|
|
6161
|
+
[`::slotted(${child}:not(:disabled):not(:focus):not([readonly]):hover),.label-wrapper:hover~.wrapper ::slotted(${child}:not(:disabled):not(:focus):not([readonly]))${child === 'select' ? ',.label-wrapper:hover~.wrapper ::part(select-wrapper-dropdown)' : ''}`]: {
|
|
6104
6162
|
borderColor: formStateHoverColor || primaryColor,
|
|
6105
6163
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6106
6164
|
borderColor: formStateHoverColorDark || primaryColorDark,
|
|
@@ -6220,6 +6278,7 @@ const getFunctionalComponentInputBaseStyles = (disabled, loading, hideLabel, sta
|
|
|
6220
6278
|
[`${cssVarButtonPureMargin}`]: `calc(-1px * ${buttonCompensation})`,
|
|
6221
6279
|
}),
|
|
6222
6280
|
},
|
|
6281
|
+
...getFunctionalComponentLabelAfterStyles(disabled),
|
|
6223
6282
|
...preventFoucOfNestedElementsStyles,
|
|
6224
6283
|
input: {
|
|
6225
6284
|
all: 'unset',
|
|
@@ -6296,7 +6355,7 @@ const getFunctionalComponentInputBaseStyles = (disabled, loading, hideLabel, sta
|
|
|
6296
6355
|
},
|
|
6297
6356
|
}),
|
|
6298
6357
|
// .label / .required
|
|
6299
|
-
...getFunctionalComponentLabelStyles(disabled, hideLabel, theme, !disabled &&
|
|
6358
|
+
...getFunctionalComponentLabelStyles(disabled, hideLabel, theme, null, !disabled &&
|
|
6300
6359
|
!readOnly &&
|
|
6301
6360
|
hoverMediaQuery({
|
|
6302
6361
|
'&:hover~.wrapper': hoverStyles,
|
|
@@ -9274,6 +9333,7 @@ const getComponentCss$D = (isOpen, isDisabled, hideLabel, state, compact, theme)
|
|
|
9274
9333
|
[`${cssVarInternalOptgroupScaling}`]: scalingVar,
|
|
9275
9334
|
}),
|
|
9276
9335
|
},
|
|
9336
|
+
...getFunctionalComponentLabelAfterStyles(isDisabled),
|
|
9277
9337
|
...preventFoucOfNestedElementsStyles,
|
|
9278
9338
|
button: {
|
|
9279
9339
|
...getButtonJssStyle('multi-select', isOpen, isDisabled, state, scalingVar, theme),
|
|
@@ -9484,6 +9544,7 @@ const getComponentCss$B = (hideLabel, state, isDisabled, isLoading, length, comp
|
|
|
9484
9544
|
...hostHiddenStyles,
|
|
9485
9545
|
}),
|
|
9486
9546
|
},
|
|
9547
|
+
...getFunctionalComponentLabelAfterStyles(isDisabled),
|
|
9487
9548
|
...preventFoucOfNestedElementsStyles,
|
|
9488
9549
|
// input
|
|
9489
9550
|
...inputStyles,
|
|
@@ -9705,7 +9766,7 @@ const getComponentCss$z = (hideLabel, state, isDisabled, isLoading, theme) => {
|
|
|
9705
9766
|
// .label / .required
|
|
9706
9767
|
...getFunctionalComponentLabelStyles(isDisabled || isLoading, hideLabel, theme, {
|
|
9707
9768
|
gridArea: '1/2',
|
|
9708
|
-
}, {
|
|
9769
|
+
}, null, {
|
|
9709
9770
|
paddingTop: '2px', // compensate vertical alignment
|
|
9710
9771
|
paddingInlineStart: spacingStaticSmall, // asymmetric padding used instead of gap to prevent not clickable area between label and input
|
|
9711
9772
|
}),
|
|
@@ -9771,6 +9832,7 @@ const getComponentCss$y = (disabled, loading, state, theme) => {
|
|
|
9771
9832
|
}),
|
|
9772
9833
|
display: 'block',
|
|
9773
9834
|
},
|
|
9835
|
+
...getFunctionalComponentLabelAfterStyles(disabledOrLoading),
|
|
9774
9836
|
input: {
|
|
9775
9837
|
gridArea: '1/1',
|
|
9776
9838
|
borderRadius: '50%',
|
|
@@ -9827,13 +9889,13 @@ const getComponentCss$y = (disabled, loading, state, theme) => {
|
|
|
9827
9889
|
...(!disabledOrLoading &&
|
|
9828
9890
|
!isHighContrastMode &&
|
|
9829
9891
|
hoverMediaQuery({
|
|
9830
|
-
'input:hover
|
|
9892
|
+
'input:hover,.wrapper:has(~.label-wrapper:hover) input': {
|
|
9831
9893
|
borderColor: uncheckedHoverColor,
|
|
9832
9894
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
9833
9895
|
borderColor: uncheckedHoverColorDark,
|
|
9834
9896
|
}),
|
|
9835
9897
|
},
|
|
9836
|
-
'input:checked:hover
|
|
9898
|
+
'input:checked:hover,.wrapper:has(~.label-wrapper:hover) input:checked': {
|
|
9837
9899
|
borderColor: checkedHoverColor,
|
|
9838
9900
|
backgroundColor: checkedHoverColor,
|
|
9839
9901
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
@@ -9841,7 +9903,7 @@ const getComponentCss$y = (disabled, loading, state, theme) => {
|
|
|
9841
9903
|
backgroundColor: checkedHoverColorDark,
|
|
9842
9904
|
}),
|
|
9843
9905
|
},
|
|
9844
|
-
'label:hover
|
|
9906
|
+
'.wrapper:has(~.label-wrapper:hover) input': supportsChromiumMediaQuery({
|
|
9845
9907
|
transition: 'unset', // Fixes a chrome bug where transition properties are stuck on hover
|
|
9846
9908
|
}),
|
|
9847
9909
|
})),
|
|
@@ -9870,7 +9932,6 @@ const getComponentCss$y = (disabled, loading, state, theme) => {
|
|
|
9870
9932
|
wrapper: {
|
|
9871
9933
|
...textSmallStyle,
|
|
9872
9934
|
display: 'grid',
|
|
9873
|
-
gridArea: '1/1',
|
|
9874
9935
|
minWidth: minimumTouchTargetSize,
|
|
9875
9936
|
minHeight: minimumTouchTargetSize,
|
|
9876
9937
|
justifyContent: 'center',
|
|
@@ -9893,9 +9954,7 @@ const getComponentCss$y = (disabled, loading, state, theme) => {
|
|
|
9893
9954
|
},
|
|
9894
9955
|
}),
|
|
9895
9956
|
// .label / .required
|
|
9896
|
-
...getFunctionalComponentLabelStyles(disabled || loading, false, theme, {
|
|
9897
|
-
gridArea: '1/2',
|
|
9898
|
-
}, {
|
|
9957
|
+
...getFunctionalComponentLabelStyles(disabled || loading, false, theme, null, null, {
|
|
9899
9958
|
paddingTop,
|
|
9900
9959
|
paddingInlineStart,
|
|
9901
9960
|
}),
|
|
@@ -9908,7 +9967,7 @@ const cssVarInternalRadioGroupScaling = '--p-internal-radio-group-scaling';
|
|
|
9908
9967
|
const groupRadioGroupDirectionJssStyles = {
|
|
9909
9968
|
column: {
|
|
9910
9969
|
flexFlow: 'column nowrap',
|
|
9911
|
-
alignItems: '
|
|
9970
|
+
alignItems: 'start',
|
|
9912
9971
|
},
|
|
9913
9972
|
row: {
|
|
9914
9973
|
flexFlow: 'row wrap',
|
|
@@ -9936,6 +9995,7 @@ const getComponentCss$x = (disabled, loading, hideLabel, state, compact, directi
|
|
|
9936
9995
|
}),
|
|
9937
9996
|
[`${cssVarInternalRadioGroupOptionScaling}`]: scalingVar,
|
|
9938
9997
|
},
|
|
9998
|
+
...getFunctionalComponentLabelAfterStyles(disabled),
|
|
9939
9999
|
...preventFoucOfNestedElementsStyles,
|
|
9940
10000
|
},
|
|
9941
10001
|
root: {
|
|
@@ -9966,9 +10026,6 @@ const getComponentCss$x = (disabled, loading, hideLabel, state, compact, directi
|
|
|
9966
10026
|
// .label / .required
|
|
9967
10027
|
...getFunctionalComponentLabelStyles(disabled, hideLabel, theme, {
|
|
9968
10028
|
cursor: 'inherit',
|
|
9969
|
-
'&:is(legend)': {
|
|
9970
|
-
marginBottom: spacingStaticXSmall, // this fixes a known layout bug of the legend element (in all browsers) when the parent fieldset is a flex or grid container
|
|
9971
|
-
},
|
|
9972
10029
|
}),
|
|
9973
10030
|
// .message
|
|
9974
10031
|
...getFunctionalComponentStateMessageStyles(theme, state),
|
|
@@ -10216,6 +10273,7 @@ const getComponentCss$u = (minWidth, maxWidth, columns, disabled, hideLabel, sta
|
|
|
10216
10273
|
...hostHiddenStyles,
|
|
10217
10274
|
}),
|
|
10218
10275
|
},
|
|
10276
|
+
...getFunctionalComponentLabelAfterStyles(disabled),
|
|
10219
10277
|
...preventFoucOfNestedElementsStyles,
|
|
10220
10278
|
'slot:not([name])': {
|
|
10221
10279
|
display: 'grid',
|
|
@@ -10261,7 +10319,7 @@ const getButtonStyles = (isOpen, state, theme) => {
|
|
|
10261
10319
|
margin: 0,
|
|
10262
10320
|
padding: 0,
|
|
10263
10321
|
background: 'transparent',
|
|
10264
|
-
border: `${borderWidthBase} solid ${isOpen ? primaryColor : formStateColor || contrastMediumColor}`, // using border of styled select below for label:hover selector
|
|
10322
|
+
border: `${borderWidthBase} solid ${isOpen ? primaryColor : formStateColor || contrastMediumColor}`, // using border of styled select below for .label-wrapper:hover selector
|
|
10265
10323
|
borderRadius: borderRadiusSmall,
|
|
10266
10324
|
outline: '0',
|
|
10267
10325
|
cursor: 'pointer',
|
|
@@ -10575,6 +10633,7 @@ const getComponentCss$q = (isOpen, isDisabled, hideLabel, state, compact, theme)
|
|
|
10575
10633
|
[`${cssVarInternalOptgroupScaling}`]: scalingVar,
|
|
10576
10634
|
}),
|
|
10577
10635
|
},
|
|
10636
|
+
...getFunctionalComponentLabelAfterStyles(isDisabled),
|
|
10578
10637
|
...preventFoucOfNestedElementsStyles,
|
|
10579
10638
|
button: {
|
|
10580
10639
|
...getButtonJssStyle('select', isOpen, isDisabled, state, scalingVar, theme),
|
|
@@ -11986,6 +12045,7 @@ const getComponentCss$3 = (isDisabled, isReadonly, hideLabel, state, compact, co
|
|
|
11986
12045
|
...hostHiddenStyles,
|
|
11987
12046
|
}),
|
|
11988
12047
|
},
|
|
12048
|
+
...getFunctionalComponentLabelAfterStyles(isDisabled),
|
|
11989
12049
|
...preventFoucOfNestedElementsStyles,
|
|
11990
12050
|
textarea: {
|
|
11991
12051
|
resize,
|
|
@@ -12046,7 +12106,7 @@ const getComponentCss$3 = (isDisabled, isReadonly, hideLabel, state, compact, co
|
|
|
12046
12106
|
},
|
|
12047
12107
|
...hoverMediaQuery({
|
|
12048
12108
|
// with the media query the selector has higher priority and overrides disabled styles
|
|
12049
|
-
'textarea:not(:disabled):not(:focus):not([readonly]):hover
|
|
12109
|
+
'textarea:not(:disabled):not(:focus):not([readonly]):hover,.label-wrapper:hover~.wrapper textarea:not(:disabled):not(:focus):not([readonly])': {
|
|
12050
12110
|
borderColor: formStateHoverColor || primaryColor,
|
|
12051
12111
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
12052
12112
|
borderColor: formStateHoverColorDark || primaryColorDark,
|
|
@@ -12220,6 +12280,7 @@ exports.getFlexCss = getComponentCss$14;
|
|
|
12220
12280
|
exports.getFlexItemCss = getComponentCss$15;
|
|
12221
12281
|
exports.getFlyoutCss = getComponentCss$13;
|
|
12222
12282
|
exports.getFunctionalComponentInputBaseStyles = getFunctionalComponentInputBaseStyles;
|
|
12283
|
+
exports.getFunctionalComponentLabelAfterStyles = getFunctionalComponentLabelAfterStyles;
|
|
12223
12284
|
exports.getFunctionalComponentLabelStyles = getFunctionalComponentLabelStyles;
|
|
12224
12285
|
exports.getFunctionalComponentLoadingMessageStyles = getFunctionalComponentLoadingMessageStyles;
|
|
12225
12286
|
exports.getFunctionalComponentNoResultsOptionStyles = getFunctionalComponentNoResultsOptionStyles;
|
|
@@ -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.0-rc.
|
|
3449
|
+
const prefix = `[Porsche Design System v${"3.32.0-rc.2"}]` // 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
|
|
@@ -7,6 +7,7 @@ var hooks = require('../../hooks.cjs');
|
|
|
7
7
|
var utils = require('../../utils.cjs');
|
|
8
8
|
var buttonGroup = require('../dsr-components/button-group.cjs');
|
|
9
9
|
|
|
10
|
+
/** @deprecated since v3.32.0, will be removed with next major release. Use simple styles instead. */
|
|
10
11
|
const PButtonGroup = /*#__PURE__*/ react.forwardRef(({ direction = { base: 'column', xs: 'row' }, className, children, ...rest }, ref) => {
|
|
11
12
|
const elementRef = react.useRef(undefined);
|
|
12
13
|
const WebComponentTag = hooks.usePrefix('p-button-group');
|
|
@@ -7,7 +7,7 @@ var hooks = require('../../hooks.cjs');
|
|
|
7
7
|
var utils = require('../../utils.cjs');
|
|
8
8
|
var radioGroupOption = require('../dsr-components/radio-group-option.cjs');
|
|
9
9
|
|
|
10
|
-
const PRadioGroupOption = /*#__PURE__*/ react.forwardRef(({ disabled = false, label, loading = false, value, className, ...rest }, ref) => {
|
|
10
|
+
const PRadioGroupOption = /*#__PURE__*/ react.forwardRef(({ disabled = false, label, loading = false, value, className, children, ...rest }, ref) => {
|
|
11
11
|
const elementRef = react.useRef(undefined);
|
|
12
12
|
const WebComponentTag = hooks.usePrefix('p-radio-group-option');
|
|
13
13
|
const propsToSync = [disabled, label, loading, value];
|
|
@@ -20,9 +20,10 @@ const PRadioGroupOption = /*#__PURE__*/ react.forwardRef(({ disabled = false, la
|
|
|
20
20
|
// @ts-ignore
|
|
21
21
|
...(!process.browser
|
|
22
22
|
? {
|
|
23
|
-
children: (jsxRuntime.jsx(radioGroupOption.DSRRadioGroupOption, { disabled, label, loading, value })),
|
|
23
|
+
children: (jsxRuntime.jsx(radioGroupOption.DSRRadioGroupOption, { disabled, label, loading, value, children })),
|
|
24
24
|
}
|
|
25
25
|
: {
|
|
26
|
+
children,
|
|
26
27
|
suppressHydrationWarning: true,
|
|
27
28
|
}),
|
|
28
29
|
'data-ssr': '',
|
package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button-group.cjs
CHANGED
|
@@ -8,6 +8,7 @@ var stylesEntry = require('../../../../../../components/dist/styles/esm/styles-e
|
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* @slot {"name": "", "description": "Default slot for the buttons to group." }
|
|
11
|
+
* @deprecated since v3.32.0, will be removed with next major release. Use simple styles instead.
|
|
11
12
|
*/
|
|
12
13
|
class DSRButtonGroup extends react.Component {
|
|
13
14
|
host;
|
package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox.cjs
CHANGED
|
@@ -14,6 +14,7 @@ var spinner_wrapper = require('../components/spinner.wrapper.cjs');
|
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* @slot {"name": "label", "description": "Shows a label. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed." }
|
|
17
|
+
* @slot {"name": "label-after", "description": "Places additional content after the label text (for content that should not be part of the label, e.g. external links or `p-popover`)."}
|
|
17
18
|
* @slot {"name": "message", "description": "Shows a state message. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed." }
|
|
18
19
|
*/
|
|
19
20
|
class DSRCheckbox extends react.Component {
|
|
@@ -40,7 +41,7 @@ class DSRCheckbox extends react.Component {
|
|
|
40
41
|
const { namedSlotChildren} = splitChildren.splitChildren(this.props.children);
|
|
41
42
|
const id = 'checkbox';
|
|
42
43
|
const style = minifyCss.minifyCss(stylesEntry.getCheckboxCss(this.props.hideLabel, this.props.state, this.props.disabled, this.props.loading, this.props.compact, this.props.theme));
|
|
43
|
-
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.
|
|
44
|
+
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.jsxs("div", { className: "wrapper", children: [jsxRuntime.jsxs("div", { className: "input-wrapper", children: [jsxRuntime.jsx("input", { type: "checkbox", id: id, "aria-describedby": `${utilsEntry.descriptionId} ${stateMessage.messageId}`, "aria-invalid": this.props.state === 'error' ? 'true' : null, "aria-disabled": this.props.loading || this.props.disabled ? 'true' : null, checked: this.props.checked, form: this.props.form, value: this.props.value, name: this.props.name, onBlur: this.props.onBlur, required: this.props.required, disabled: this.props.disabled }), this.props.loading && (jsxRuntime.jsx(spinner_wrapper.PSpinner, { className: "spinner", size: "inherit", theme: this.props.theme, "aria-hidden": "true" }))] }), 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, htmlFor: id, label: this.props.label, isLoading: this.props.loading, isDisabled: this.props.disabled, isRequired: this.props.required })] }), 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] }));
|
|
44
45
|
}
|
|
45
46
|
}
|
|
46
47
|
|