@porsche-design-system/components-react 3.0.0-rc.1 → 3.0.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +36 -0
- package/bin/patchRemixRunProcessBrowserGlobalIdentifier.js +35 -26
- package/esm/lib/components/icon.wrapper.js +1 -1
- package/esm/lib/components/scroller.wrapper.js +3 -3
- package/lib/components/icon.wrapper.js +1 -1
- package/lib/components/scroller.wrapper.d.ts +15 -7
- package/lib/components/scroller.wrapper.js +3 -3
- package/lib/types.d.ts +210 -191
- package/package.json +2 -2
- package/ssr/components/dist/styles/esm/styles-entry.js +180 -77
- package/ssr/components/dist/utils/esm/utils-entry.js +45 -7
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/icon.wrapper.js +1 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/scroller.wrapper.js +4 -4
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/select-wrapper-dropdown.wrapper.js +38 -0
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/stepper-horizontal.wrapper.js +0 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/scroller.js +2 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-wrapper-dropdown.js +34 -0
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-wrapper.js +6 -3
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/stepper-horizontal.js +1 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs-bar.js +1 -1
- package/ssr/esm/components/dist/styles/esm/styles-entry.js +180 -78
- package/ssr/esm/components/dist/utils/esm/utils-entry.js +40 -8
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/icon.wrapper.js +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/scroller.wrapper.js +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/select-wrapper-dropdown.wrapper.js +36 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/stepper-horizontal.wrapper.js +0 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/scroller.js +3 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-wrapper-dropdown.js +32 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-wrapper.js +6 -3
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/stepper-horizontal.js +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs-bar.js +1 -1
- package/ssr/lib/components/scroller.wrapper.d.ts +15 -7
- package/ssr/lib/components/select-wrapper-dropdown.wrapper.d.ts +30 -0
- package/ssr/lib/dsr-components/select-wrapper.d.ts +0 -1
- package/ssr/lib/types.d.ts +210 -191
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,42 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
|
9
9
|
|
|
10
10
|
### [Unreleased]
|
|
11
11
|
|
|
12
|
+
### [3.0.0-rc.2] - 2023-05-09
|
|
13
|
+
|
|
14
|
+
#### Fixed
|
|
15
|
+
|
|
16
|
+
- `Checkbox Wrapper` Safari visual state change while hovering
|
|
17
|
+
[#2508](https://github.com/porsche-design-system/porsche-design-system/pull/2508)
|
|
18
|
+
- `Checkbox Wrapper` keyboard arrow navigation
|
|
19
|
+
[#2508](https://github.com/porsche-design-system/porsche-design-system/pull/2508)
|
|
20
|
+
- `Modal` fix hover state of dismiss button
|
|
21
|
+
([#2510](https://github.com/porsche-design-system/porsche-design-system/pull/2510))
|
|
22
|
+
- `Link Pure`, `Button Pure`: adjust offset of `:hover` and `active` styles
|
|
23
|
+
([#2511](https://github.com/porsche-design-system/porsche-design-system/pull/2511))
|
|
24
|
+
- `Tabs Bar`, `Tabs` ([#2521](https://github.com/porsche-design-system/porsche-design-system/pull/2521)):
|
|
25
|
+
- `focus` state of tabpanel
|
|
26
|
+
- Indicator bar height
|
|
27
|
+
- Optimize icon/text alignment of `Link Pure` and `Button Pure` in Safari
|
|
28
|
+
- `Select Wrapper` multiline option height and scaling behavior
|
|
29
|
+
([#2524](https://github.com/porsche-design-system/porsche-design-system/pull/2524))
|
|
30
|
+
- Fixed accessibility issues of `Tabs`, `Tabs Bar` and `Stepper Horizontal` to comply with v.4.7.0 of `axe-core`
|
|
31
|
+
([#2530](https://github.com/porsche-design-system/porsche-design-system/pull/2530))
|
|
32
|
+
- React: `patchRemixRunProcessBrowserGlobalIdentifier` binary now supports Remix 1.16.0
|
|
33
|
+
([#2537](https://github.com/porsche-design-system/porsche-design-system/pull/2537))
|
|
34
|
+
- Angular: added optional modifier to optional properties for better type checking in strict mode
|
|
35
|
+
([#2544](https://github.com/porsche-design-system/porsche-design-system/pull/2544))
|
|
36
|
+
|
|
37
|
+
#### Added
|
|
38
|
+
|
|
39
|
+
- Deprecation warning to `Icon` component if `lazy` prop is used
|
|
40
|
+
([#2521](https://github.com/porsche-design-system/porsche-design-system/pull/2521))
|
|
41
|
+
- `aria` prop to `Scroller` component
|
|
42
|
+
([#2530](https://github.com/porsche-design-system/porsche-design-system/pull/2530))
|
|
43
|
+
|
|
44
|
+
#### Changed
|
|
45
|
+
|
|
46
|
+
- Model signature asset of 718 model ([#2532](https://github.com/porsche-design-system/porsche-design-system/pull/2532))
|
|
47
|
+
|
|
12
48
|
### [3.0.0-rc.1] - 2023-04-19
|
|
13
49
|
|
|
14
50
|
#### Added
|
|
@@ -26,32 +26,41 @@ var fs__namespace = /*#__PURE__*/_interopNamespaceDefault(fs);
|
|
|
26
26
|
|
|
27
27
|
const patchRemixRunProcessBrowserGlobalIdentifier = () => {
|
|
28
28
|
const packageEntry = require.resolve('@remix-run/dev');
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
.
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
.
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
fs__namespace.
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
29
|
+
const compilerDirPaths = [
|
|
30
|
+
path__namespace.resolve(packageEntry, '../compiler'),
|
|
31
|
+
path__namespace.resolve(packageEntry, '../compiler/js'), // since 1.16.0 the file was moved into js sub-folder
|
|
32
|
+
].filter(fs__namespace.existsSync);
|
|
33
|
+
const filePaths = compilerDirPaths
|
|
34
|
+
.map((compilerDirPath) => fs__namespace.readdirSync(compilerDirPath).map((fileName) => `${compilerDirPath}/${fileName}`))
|
|
35
|
+
.flat()
|
|
36
|
+
// file is currently called compileBrowser.js
|
|
37
|
+
// since 1.16.0 the file is called compiler.js
|
|
38
|
+
.filter((fileName) => fileName.match(/\/(?:compileBrowser|compiler)\.js$/));
|
|
39
|
+
filePaths.forEach((filePath) => {
|
|
40
|
+
const filePathBackup = filePath.replace(/\.js$/, '-original$&');
|
|
41
|
+
if (!fs__namespace.existsSync(filePathBackup)) {
|
|
42
|
+
fs__namespace.copyFileSync(filePath, filePathBackup);
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
fs__namespace.copyFileSync(filePathBackup, filePath);
|
|
46
|
+
}
|
|
47
|
+
const fileContent = fs__namespace.readFileSync(filePath, 'utf8');
|
|
48
|
+
// we want to extend the define config
|
|
49
|
+
// https://github.com/remix-run/remix/blob/main/packages/remix-dev/compiler/js/compiler.ts#L221-L226
|
|
50
|
+
if (fileContent.match(/define: \{/)) {
|
|
51
|
+
// prepending should be safer than appending because JSON.stringify() might be multiline like in source
|
|
52
|
+
// https://github.com/remix-run/remix/blob/05ffb6e2db8f2a0e09caffad6e9b3c897c34cb7d/packages/remix-dev/compiler/compileBrowser.ts#L159-L163
|
|
53
|
+
const newFileContent = fileContent.replace(/"process\.env\.NODE_ENV": JSON\.stringify\(.*/, '"process.browser": "true", // added by Porsche Design System\'s patchRemixRunProcessBrowserGlobalIdentifier.js\n $&');
|
|
54
|
+
const prettyFilePath = filePath.replace(packageEntry.substring(0, packageEntry.indexOf('/node_modules')), '.');
|
|
55
|
+
if (newFileContent.includes('"process.browser": "true"')) {
|
|
56
|
+
console.log(`Successfully patched ${prettyFilePath}`);
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
console.error(`Patching ${prettyFilePath} failed`);
|
|
60
|
+
}
|
|
61
|
+
fs__namespace.writeFileSync(filePath, newFileContent);
|
|
62
|
+
}
|
|
63
|
+
});
|
|
55
64
|
};
|
|
56
65
|
patchRemixRunProcessBrowserGlobalIdentifier();
|
|
57
66
|
|
|
@@ -3,7 +3,7 @@ import { forwardRef, useRef } from 'react';
|
|
|
3
3
|
import { usePrefix, useBrowserLayoutEffect, useMergedClass } from '../../hooks.js';
|
|
4
4
|
import { syncRef } from '../../utils.js';
|
|
5
5
|
|
|
6
|
-
const PIcon = forwardRef(({ aria, color = 'primary', lazy
|
|
6
|
+
const PIcon = forwardRef(({ aria, color = 'primary', lazy, name = 'arrow-right', size = 'small', source, theme = 'light', className, ...rest }, ref) => {
|
|
7
7
|
const elementRef = useRef();
|
|
8
8
|
const WebComponentTag = usePrefix('p-icon');
|
|
9
9
|
const propsToSync = [aria, color, lazy, name, size, source, theme];
|
|
@@ -3,13 +3,13 @@ import { forwardRef, useRef } from 'react';
|
|
|
3
3
|
import { usePrefix, useBrowserLayoutEffect, useMergedClass } from '../../hooks.js';
|
|
4
4
|
import { syncRef } from '../../utils.js';
|
|
5
5
|
|
|
6
|
-
const PScroller = forwardRef(({ alignScrollIndicator = 'center', gradientColor = 'background-base', gradientColorScheme, scrollIndicatorPosition, scrollToPosition, scrollbar = false, theme = 'light', className, ...rest }, ref) => {
|
|
6
|
+
const PScroller = forwardRef(({ alignScrollIndicator = 'center', aria, gradientColor = 'background-base', gradientColorScheme, scrollIndicatorPosition, scrollToPosition, scrollbar = false, theme = 'light', className, ...rest }, ref) => {
|
|
7
7
|
const elementRef = useRef();
|
|
8
8
|
const WebComponentTag = usePrefix('p-scroller');
|
|
9
|
-
const propsToSync = [alignScrollIndicator, gradientColor, gradientColorScheme, scrollIndicatorPosition, scrollToPosition, scrollbar, theme];
|
|
9
|
+
const propsToSync = [alignScrollIndicator, aria, gradientColor, gradientColorScheme, scrollIndicatorPosition, scrollToPosition, scrollbar, theme];
|
|
10
10
|
useBrowserLayoutEffect(() => {
|
|
11
11
|
const { current } = elementRef;
|
|
12
|
-
['alignScrollIndicator', 'gradientColor', 'gradientColorScheme', 'scrollIndicatorPosition', 'scrollToPosition', 'scrollbar', 'theme'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
12
|
+
['alignScrollIndicator', 'aria', 'gradientColor', 'gradientColorScheme', 'scrollIndicatorPosition', 'scrollToPosition', 'scrollbar', 'theme'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
13
13
|
}, propsToSync);
|
|
14
14
|
const props = {
|
|
15
15
|
...rest,
|
|
@@ -5,7 +5,7 @@ var react = require('react');
|
|
|
5
5
|
var hooks = require('../../hooks.js');
|
|
6
6
|
var utils = require('../../utils.js');
|
|
7
7
|
|
|
8
|
-
const PIcon = react.forwardRef(({ aria, color = 'primary', lazy
|
|
8
|
+
const PIcon = react.forwardRef(({ aria, color = 'primary', lazy, name = 'arrow-right', size = 'small', source, theme = 'light', className, ...rest }, ref) => {
|
|
9
9
|
const elementRef = react.useRef();
|
|
10
10
|
const WebComponentTag = hooks.usePrefix('p-icon');
|
|
11
11
|
const propsToSync = [aria, color, lazy, name, size, source, theme];
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
|
-
import type { ScrollerAlignScrollIndicator, ScrollerGradientColor, ScrollerGradientColorScheme, ScrollerScrollIndicatorPosition, ScrollerScrollToPosition, Theme } from '../types';
|
|
2
|
+
import type { ScrollerAlignScrollIndicator, SelectedAriaAttributes, ScrollerAriaAttribute, ScrollerGradientColor, ScrollerGradientColorScheme, ScrollerScrollIndicatorPosition, ScrollerScrollToPosition, Theme } from '../types';
|
|
3
3
|
export type PScrollerProps = Omit<HTMLAttributes<{}>, 'color' | 'onChange'> & {
|
|
4
4
|
/**
|
|
5
|
-
* Sets the vertical position of scroll indicator
|
|
5
|
+
* Sets the vertical position of scroll indicator.
|
|
6
6
|
*/
|
|
7
7
|
alignScrollIndicator?: ScrollerAlignScrollIndicator;
|
|
8
|
+
/**
|
|
9
|
+
* Add ARIA role.
|
|
10
|
+
*/
|
|
11
|
+
aria?: SelectedAriaAttributes<ScrollerAriaAttribute>;
|
|
8
12
|
/**
|
|
9
13
|
* Adapts the background gradient color of prev and next button.
|
|
10
14
|
*/
|
|
@@ -18,11 +22,11 @@ export type PScrollerProps = Omit<HTMLAttributes<{}>, 'color' | 'onChange'> & {
|
|
|
18
22
|
*/
|
|
19
23
|
scrollIndicatorPosition?: ScrollerScrollIndicatorPosition;
|
|
20
24
|
/**
|
|
21
|
-
* Scrolls the scroll area to the left either smooth or immediately
|
|
25
|
+
* Scrolls the scroll area to the left either smooth or immediately.
|
|
22
26
|
*/
|
|
23
27
|
scrollToPosition?: ScrollerScrollToPosition;
|
|
24
28
|
/**
|
|
25
|
-
* Specifies if scrollbar should be shown
|
|
29
|
+
* Specifies if scrollbar should be shown.
|
|
26
30
|
*/
|
|
27
31
|
scrollbar?: boolean;
|
|
28
32
|
/**
|
|
@@ -32,9 +36,13 @@ export type PScrollerProps = Omit<HTMLAttributes<{}>, 'color' | 'onChange'> & {
|
|
|
32
36
|
};
|
|
33
37
|
export declare const PScroller: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<{}>, "color" | "onChange"> & {
|
|
34
38
|
/**
|
|
35
|
-
* Sets the vertical position of scroll indicator
|
|
39
|
+
* Sets the vertical position of scroll indicator.
|
|
36
40
|
*/
|
|
37
41
|
alignScrollIndicator?: ScrollerAlignScrollIndicator;
|
|
42
|
+
/**
|
|
43
|
+
* Add ARIA role.
|
|
44
|
+
*/
|
|
45
|
+
aria?: SelectedAriaAttributes<ScrollerAriaAttribute>;
|
|
38
46
|
/**
|
|
39
47
|
* Adapts the background gradient color of prev and next button.
|
|
40
48
|
*/
|
|
@@ -48,11 +56,11 @@ export declare const PScroller: import("react").ForwardRefExoticComponent<Omit<H
|
|
|
48
56
|
*/
|
|
49
57
|
scrollIndicatorPosition?: ScrollerScrollIndicatorPosition;
|
|
50
58
|
/**
|
|
51
|
-
* Scrolls the scroll area to the left either smooth or immediately
|
|
59
|
+
* Scrolls the scroll area to the left either smooth or immediately.
|
|
52
60
|
*/
|
|
53
61
|
scrollToPosition?: ScrollerScrollToPosition;
|
|
54
62
|
/**
|
|
55
|
-
* Specifies if scrollbar should be shown
|
|
63
|
+
* Specifies if scrollbar should be shown.
|
|
56
64
|
*/
|
|
57
65
|
scrollbar?: boolean;
|
|
58
66
|
/**
|
|
@@ -5,13 +5,13 @@ var react = require('react');
|
|
|
5
5
|
var hooks = require('../../hooks.js');
|
|
6
6
|
var utils = require('../../utils.js');
|
|
7
7
|
|
|
8
|
-
const PScroller = react.forwardRef(({ alignScrollIndicator = 'center', gradientColor = 'background-base', gradientColorScheme, scrollIndicatorPosition, scrollToPosition, scrollbar = false, theme = 'light', className, ...rest }, ref) => {
|
|
8
|
+
const PScroller = react.forwardRef(({ alignScrollIndicator = 'center', aria, gradientColor = 'background-base', gradientColorScheme, scrollIndicatorPosition, scrollToPosition, scrollbar = false, theme = 'light', className, ...rest }, ref) => {
|
|
9
9
|
const elementRef = react.useRef();
|
|
10
10
|
const WebComponentTag = hooks.usePrefix('p-scroller');
|
|
11
|
-
const propsToSync = [alignScrollIndicator, gradientColor, gradientColorScheme, scrollIndicatorPosition, scrollToPosition, scrollbar, theme];
|
|
11
|
+
const propsToSync = [alignScrollIndicator, aria, gradientColor, gradientColorScheme, scrollIndicatorPosition, scrollToPosition, scrollbar, theme];
|
|
12
12
|
hooks.useBrowserLayoutEffect(() => {
|
|
13
13
|
const { current } = elementRef;
|
|
14
|
-
['alignScrollIndicator', 'gradientColor', 'gradientColorScheme', 'scrollIndicatorPosition', 'scrollToPosition', 'scrollbar', 'theme'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
14
|
+
['alignScrollIndicator', 'aria', 'gradientColor', 'gradientColorScheme', 'scrollIndicatorPosition', 'scrollToPosition', 'scrollbar', 'theme'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
15
15
|
}, propsToSync);
|
|
16
16
|
const props = {
|
|
17
17
|
...rest,
|