@porsche-design-system/components-react 3.7.0 → 3.8.0-rc.0

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.
Files changed (84) hide show
  1. package/CHANGELOG.md +122 -16
  2. package/cjs/lib/components/button-pure.wrapper.cjs +1 -1
  3. package/cjs/lib/components/carousel.wrapper.cjs +1 -1
  4. package/cjs/lib/components/display.wrapper.cjs +1 -1
  5. package/cjs/lib/components/flyout.wrapper.cjs +1 -1
  6. package/cjs/lib/components/heading.wrapper.cjs +1 -1
  7. package/cjs/lib/components/headline.wrapper.cjs +1 -1
  8. package/cjs/lib/components/link-pure.wrapper.cjs +1 -1
  9. package/cjs/lib/components/modal.wrapper.cjs +3 -3
  10. package/cjs/lib/components/switch.wrapper.cjs +1 -1
  11. package/cjs/lib/components/text.wrapper.cjs +1 -1
  12. package/esm/lib/components/button-pure.wrapper.d.ts +1 -1
  13. package/esm/lib/components/button-pure.wrapper.mjs +1 -1
  14. package/esm/lib/components/carousel.wrapper.d.ts +1 -1
  15. package/esm/lib/components/carousel.wrapper.mjs +1 -1
  16. package/esm/lib/components/display.wrapper.d.ts +1 -1
  17. package/esm/lib/components/display.wrapper.mjs +1 -1
  18. package/esm/lib/components/flyout.wrapper.d.ts +1 -1
  19. package/esm/lib/components/flyout.wrapper.mjs +1 -1
  20. package/esm/lib/components/heading.wrapper.d.ts +1 -1
  21. package/esm/lib/components/heading.wrapper.mjs +1 -1
  22. package/esm/lib/components/headline.wrapper.d.ts +1 -1
  23. package/esm/lib/components/headline.wrapper.mjs +1 -1
  24. package/esm/lib/components/link-pure.wrapper.d.ts +1 -1
  25. package/esm/lib/components/link-pure.wrapper.mjs +1 -1
  26. package/esm/lib/components/modal.wrapper.d.ts +9 -1
  27. package/esm/lib/components/modal.wrapper.mjs +3 -3
  28. package/esm/lib/components/switch.wrapper.d.ts +1 -1
  29. package/esm/lib/components/switch.wrapper.mjs +1 -1
  30. package/esm/lib/components/text.wrapper.d.ts +1 -1
  31. package/esm/lib/components/text.wrapper.mjs +1 -1
  32. package/esm/lib/types.d.ts +36 -28
  33. package/package.json +2 -2
  34. package/ssr/cjs/components/dist/styles/esm/styles-entry.cjs +3188 -3069
  35. package/ssr/cjs/components/dist/utils/esm/utils-entry.cjs +1129 -1262
  36. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/button-pure.wrapper.cjs +1 -1
  37. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/carousel.wrapper.cjs +1 -1
  38. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/display.wrapper.cjs +1 -1
  39. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/flyout.wrapper.cjs +1 -1
  40. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/heading.wrapper.cjs +1 -1
  41. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/headline.wrapper.cjs +1 -1
  42. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/link-pure.wrapper.cjs +1 -1
  43. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/modal.wrapper.cjs +4 -4
  44. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/switch.wrapper.cjs +1 -1
  45. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/text.wrapper.cjs +1 -1
  46. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/carousel.cjs +4 -1
  47. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/display.cjs +5 -1
  48. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flyout.cjs +9 -3
  49. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/heading.cjs +5 -1
  50. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/headline.cjs +5 -1
  51. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-tile-model-signature.cjs +1 -1
  52. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/modal.cjs +5 -2
  53. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pin-code.cjs +1 -1
  54. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/popover.cjs +5 -6
  55. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/scroller.cjs +1 -1
  56. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/text-list-item.cjs +1 -1
  57. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/text.cjs +5 -1
  58. package/ssr/esm/components/dist/styles/esm/styles-entry.mjs +3188 -3069
  59. package/ssr/esm/components/dist/utils/esm/utils-entry.mjs +1130 -1264
  60. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/button-pure.wrapper.mjs +1 -1
  61. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/carousel.wrapper.mjs +1 -1
  62. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/display.wrapper.mjs +1 -1
  63. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/flyout.wrapper.mjs +1 -1
  64. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/heading.wrapper.mjs +1 -1
  65. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/headline.wrapper.mjs +1 -1
  66. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/link-pure.wrapper.mjs +1 -1
  67. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/modal.wrapper.mjs +4 -4
  68. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/switch.wrapper.mjs +1 -1
  69. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/text.wrapper.mjs +1 -1
  70. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/carousel.mjs +4 -1
  71. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/display.mjs +5 -1
  72. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flyout.mjs +10 -4
  73. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/heading.mjs +5 -1
  74. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/headline.mjs +5 -1
  75. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-tile-model-signature.mjs +1 -1
  76. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/modal.mjs +5 -2
  77. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pin-code.mjs +1 -1
  78. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/popover.mjs +5 -6
  79. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/scroller.mjs +2 -2
  80. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/text-list-item.mjs +1 -1
  81. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/text.mjs +5 -1
  82. package/ssr/esm/lib/components/modal.wrapper.d.ts +9 -1
  83. package/ssr/esm/lib/dsr-components/popover.d.ts +2 -0
  84. package/ssr/esm/lib/types.d.ts +36 -28
@@ -7,7 +7,7 @@ var hooks = require('../../hooks.cjs');
7
7
  var utils = require('../../utils.cjs');
8
8
  var buttonPure = require('../dsr-components/button-pure.cjs');
9
9
 
10
- const PButtonPure = react.forwardRef(({ active = false, alignLabel = 'right', aria, disabled = false, hideLabel = false, icon = 'arrow-right', iconSource, loading = false, size = 'small', stretch = false, theme = 'light', type = 'submit', weight = 'regular', className, children, ...rest }, ref) => {
10
+ const PButtonPure = react.forwardRef(({ active = false, alignLabel = 'end', aria, disabled = false, hideLabel = false, icon = 'arrow-right', iconSource, loading = false, size = 'small', stretch = false, theme = 'light', type = 'submit', weight = 'regular', className, children, ...rest }, ref) => {
11
11
  const elementRef = react.useRef();
12
12
  const WebComponentTag = hooks.usePrefix('p-button-pure');
13
13
  const propsToSync = [active, alignLabel, aria, disabled, hideLabel, icon, iconSource, loading, size, stretch, theme, type, weight];
@@ -7,7 +7,7 @@ var hooks = require('../../hooks.cjs');
7
7
  var utils = require('../../utils.cjs');
8
8
  var carousel = require('../dsr-components/carousel.cjs');
9
9
 
10
- const PCarousel = react.forwardRef(({ activeSlideIndex = 0, alignHeader = 'left', description, disablePagination, heading, intl, onCarouselChange, onUpdate, pagination = true, rewind = true, skipLinkTarget, slidesPerPage = 1, theme = 'light', width = 'basic', wrapContent, className, children, ...rest }, ref) => {
10
+ const PCarousel = react.forwardRef(({ activeSlideIndex = 0, alignHeader = 'start', description, disablePagination, heading, intl, onCarouselChange, onUpdate, pagination = true, rewind = true, skipLinkTarget, slidesPerPage = 1, theme = 'light', width = 'basic', wrapContent, className, children, ...rest }, ref) => {
11
11
  const elementRef = react.useRef();
12
12
  hooks.useEventCallback(elementRef, 'carouselChange', onCarouselChange);
13
13
  hooks.useEventCallback(elementRef, 'update', onUpdate);
@@ -7,7 +7,7 @@ var hooks = require('../../hooks.cjs');
7
7
  var utils = require('../../utils.cjs');
8
8
  var display = require('../dsr-components/display.cjs');
9
9
 
10
- const PDisplay = react.forwardRef(({ align = 'left', color = 'primary', ellipsis = false, size = 'large', tag, theme = 'light', className, children, ...rest }, ref) => {
10
+ const PDisplay = react.forwardRef(({ align = 'start', color = 'primary', ellipsis = false, size = 'large', tag, theme = 'light', className, children, ...rest }, ref) => {
11
11
  const elementRef = react.useRef();
12
12
  const WebComponentTag = hooks.usePrefix('p-display');
13
13
  const propsToSync = [align, color, ellipsis, size, tag, theme];
@@ -7,7 +7,7 @@ var hooks = require('../../hooks.cjs');
7
7
  var utils = require('../../utils.cjs');
8
8
  var flyout = require('../dsr-components/flyout.cjs');
9
9
 
10
- const PFlyout = react.forwardRef(({ aria, onDismiss, open = false, position = 'right', theme = 'light', className, children, ...rest }, ref) => {
10
+ const PFlyout = react.forwardRef(({ aria, onDismiss, open = false, position = 'end', theme = 'light', className, children, ...rest }, ref) => {
11
11
  const elementRef = react.useRef();
12
12
  hooks.useEventCallback(elementRef, 'dismiss', onDismiss);
13
13
  const WebComponentTag = hooks.usePrefix('p-flyout');
@@ -7,7 +7,7 @@ var hooks = require('../../hooks.cjs');
7
7
  var utils = require('../../utils.cjs');
8
8
  var heading = require('../dsr-components/heading.cjs');
9
9
 
10
- const PHeading = react.forwardRef(({ align = 'left', color = 'primary', ellipsis = false, size = 'xx-large', tag, theme = 'light', className, children, ...rest }, ref) => {
10
+ const PHeading = react.forwardRef(({ align = 'start', color = 'primary', ellipsis = false, size = 'xx-large', tag, theme = 'light', className, children, ...rest }, ref) => {
11
11
  const elementRef = react.useRef();
12
12
  const WebComponentTag = hooks.usePrefix('p-heading');
13
13
  const propsToSync = [align, color, ellipsis, size, tag, theme];
@@ -8,7 +8,7 @@ var utils = require('../../utils.cjs');
8
8
  var headline = require('../dsr-components/headline.cjs');
9
9
 
10
10
  /** @deprecated since v3.0.0, will be removed with next major release. Please use "p-heading" instead. */
11
- const PHeadline = react.forwardRef(({ align = 'left', color = 'primary', ellipsis = false, tag, theme = 'light', variant = 'headline-1', className, children, ...rest }, ref) => {
11
+ const PHeadline = react.forwardRef(({ align = 'start', color = 'primary', ellipsis = false, tag, theme = 'light', variant = 'headline-1', className, children, ...rest }, ref) => {
12
12
  const elementRef = react.useRef();
13
13
  const WebComponentTag = hooks.usePrefix('p-headline');
14
14
  const propsToSync = [align, color, ellipsis, tag, theme, variant];
@@ -7,7 +7,7 @@ var hooks = require('../../hooks.cjs');
7
7
  var utils = require('../../utils.cjs');
8
8
  var linkPure = require('../dsr-components/link-pure.cjs');
9
9
 
10
- const PLinkPure = react.forwardRef(({ active = false, alignLabel = 'right', aria, download, hideLabel = false, href, icon = 'arrow-right', iconSource, rel, size = 'small', stretch = false, target = '_self', theme = 'light', underline = false, weight = 'regular', className, children, ...rest }, ref) => {
10
+ const PLinkPure = react.forwardRef(({ active = false, alignLabel = 'end', aria, download, hideLabel = false, href, icon = 'arrow-right', iconSource, rel, size = 'small', stretch = false, target = '_self', theme = 'light', underline = false, weight = 'regular', className, children, ...rest }, ref) => {
11
11
  const elementRef = react.useRef();
12
12
  const WebComponentTag = hooks.usePrefix('p-link-pure');
13
13
  const propsToSync = [active, alignLabel, aria, download, hideLabel, href, icon, iconSource, rel, size, stretch, target, theme, underline, weight];
@@ -7,15 +7,15 @@ var hooks = require('../../hooks.cjs');
7
7
  var utils = require('../../utils.cjs');
8
8
  var modal = require('../dsr-components/modal.cjs');
9
9
 
10
- const PModal = react.forwardRef(({ aria, disableBackdropClick = false, disableCloseButton, dismissButton = true, fullscreen = false, heading, onClose, onDismiss, open = false, className, children, ...rest }, ref) => {
10
+ const PModal = react.forwardRef(({ aria, disableBackdropClick = false, disableCloseButton, dismissButton = true, fullscreen = false, heading, onClose, onDismiss, open = false, theme = 'light', className, children, ...rest }, ref) => {
11
11
  const elementRef = react.useRef();
12
12
  hooks.useEventCallback(elementRef, 'close', onClose);
13
13
  hooks.useEventCallback(elementRef, 'dismiss', onDismiss);
14
14
  const WebComponentTag = hooks.usePrefix('p-modal');
15
- const propsToSync = [aria, disableBackdropClick, disableCloseButton, dismissButton, fullscreen, heading, open];
15
+ const propsToSync = [aria, disableBackdropClick, disableCloseButton, dismissButton, fullscreen, heading, open, theme];
16
16
  hooks.useBrowserLayoutEffect(() => {
17
17
  const { current } = elementRef;
18
- ['aria', 'disableBackdropClick', 'disableCloseButton', 'dismissButton', 'fullscreen', 'heading', 'open'].forEach((propName, i) => (current[propName] = propsToSync[i]));
18
+ ['aria', 'disableBackdropClick', 'disableCloseButton', 'dismissButton', 'fullscreen', 'heading', 'open', 'theme'].forEach((propName, i) => (current[propName] = propsToSync[i]));
19
19
  }, propsToSync);
20
20
  // @ts-ignore
21
21
  if (!process.browser) {
@@ -26,7 +26,7 @@ const PModal = react.forwardRef(({ aria, disableBackdropClick = false, disableCl
26
26
  // @ts-ignore
27
27
  ...(!process.browser
28
28
  ? {
29
- children: (jsxRuntime.jsx(modal.DSRModal, { aria, disableBackdropClick, disableCloseButton, dismissButton, fullscreen, heading, open, children })),
29
+ children: (jsxRuntime.jsx(modal.DSRModal, { aria, disableBackdropClick, disableCloseButton, dismissButton, fullscreen, heading, open, theme, children })),
30
30
  }
31
31
  : {
32
32
  children,
@@ -7,7 +7,7 @@ var hooks = require('../../hooks.cjs');
7
7
  var utils = require('../../utils.cjs');
8
8
  var _switch = require('../dsr-components/switch.cjs');
9
9
 
10
- const PSwitch = react.forwardRef(({ alignLabel = 'right', checked = false, disabled = false, hideLabel = false, loading = false, onSwitchChange, onUpdate, stretch = false, theme = 'light', className, children, ...rest }, ref) => {
10
+ const PSwitch = react.forwardRef(({ alignLabel = 'end', checked = false, disabled = false, hideLabel = false, loading = false, onSwitchChange, onUpdate, stretch = false, theme = 'light', className, children, ...rest }, ref) => {
11
11
  const elementRef = react.useRef();
12
12
  hooks.useEventCallback(elementRef, 'switchChange', onSwitchChange);
13
13
  hooks.useEventCallback(elementRef, 'update', onUpdate);
@@ -7,7 +7,7 @@ var hooks = require('../../hooks.cjs');
7
7
  var utils = require('../../utils.cjs');
8
8
  var text = require('../dsr-components/text.cjs');
9
9
 
10
- const PText = react.forwardRef(({ align = 'left', color = 'primary', ellipsis = false, size = 'small', tag = 'p', theme = 'light', weight = 'regular', className, children, ...rest }, ref) => {
10
+ const PText = react.forwardRef(({ align = 'start', color = 'primary', ellipsis = false, size = 'small', tag = 'p', theme = 'light', weight = 'regular', className, children, ...rest }, ref) => {
11
11
  const elementRef = react.useRef();
12
12
  const WebComponentTag = hooks.usePrefix('p-text');
13
13
  const propsToSync = [align, color, ellipsis, size, tag, theme, weight];
@@ -86,6 +86,9 @@ class DSRCarousel extends react.Component {
86
86
  }
87
87
  render() {
88
88
  const { children, namedSlotChildren, otherChildren } = splitChildren.splitChildren(this.props.children);
89
+ const alignHeaderDeprecationMap = {
90
+ left: 'start',
91
+ };
89
92
  const btnProps = {
90
93
  className: 'btn',
91
94
  type: 'button',
@@ -99,7 +102,7 @@ class DSRCarousel extends react.Component {
99
102
  ? typeof this.props.disablePagination === 'object'
100
103
  ? Object.fromEntries(Object.entries(this.props.disablePagination).map(([key, value]) => [key, !value]))
101
104
  : !this.props.disablePagination
102
- : this.props.pagination, utilsEntry.isInfinitePagination(this.props.amountOfPages), this.props.alignHeader, this.props.theme)));
105
+ : this.props.pagination, utilsEntry.isInfinitePagination(this.props.amountOfPages), (alignHeaderDeprecationMap[this.props.alignHeader] || this.props.alignHeader), this.props.theme)));
103
106
  return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { className: "header", children: [this.props.heading ? jsxRuntime.jsx("h2", { id: "heading", children: this.props.heading }) : jsxRuntime.jsx("slot", { name: "heading" }), (this.props.description || namedSlotChildren.filter(({ props: { slot } }) => slot === 'description').length > 0) &&
104
107
  ((this.props.description && jsxRuntime.jsx("p", { children: this.props.description })) || jsxRuntime.jsx("slot", { name: "description" })), jsxRuntime.jsxs("div", { className: "nav", children: [this.props.skipLinkTarget && (jsxRuntime.jsx(linkPure_wrapper.PLinkPure, { href: this.props.skipLinkTarget, theme: this.props.theme, icon: "arrow-last", className: "btn skip-link", alignLabel: "left", hideLabel: true, "aria-describedby": this.props.heading ? 'heading' : null, children: "Skip carousel entries" })), (this.props.slidesPerPage === 'auto' || typeof this.props.slidesPerPage === 'object' || this.props.slidesPerPage < otherChildren.length) && [
105
108
  jsxRuntime.jsx(buttonPure_wrapper.PButtonPure, { ...btnProps, icon: "arrow-left" }),
@@ -12,8 +12,12 @@ class DSRDisplay extends react.Component {
12
12
  host;
13
13
  render() {
14
14
  splitChildren.splitChildren(this.props.children);
15
+ const alignDeprecationMap = {
16
+ left: 'start',
17
+ right: 'end',
18
+ };
15
19
  const TagType = utilsEntry.getDisplayTagType(null, this.props.size, this.props.tag);
16
- const style = minifyCss.minifyCss(stripFocusAndHoverStyles.stripFocusAndHoverStyles(stylesEntry.getDisplayCss(this.props.size, this.props.align, this.props.color, this.props.ellipsis, this.props.theme)));
20
+ const style = minifyCss.minifyCss(stripFocusAndHoverStyles.stripFocusAndHoverStyles(stylesEntry.getDisplayCss(this.props.size, (alignDeprecationMap[this.props.align] || this.props.align), this.props.color, this.props.ellipsis, this.props.theme)));
17
21
  return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsx(TagType, { className: "root", children: jsxRuntime.jsx("slot", {}) })] }), this.props.children] }));
18
22
  }
19
23
  }
@@ -85,16 +85,22 @@ class DSRFlyout extends react.Component {
85
85
  hasSubFooter;
86
86
  render() {
87
87
  const { children, namedSlotChildren, otherChildren } = splitChildren.splitChildren(this.props.children);
88
+ const positionDeprecationMap = {
89
+ left: 'start',
90
+ right: 'end',
91
+ };
88
92
  const hasHeader = namedSlotChildren.filter(({ props: { slot } }) => slot === 'header').length > 0;
89
93
  const hasFooter = namedSlotChildren.filter(({ props: { slot } }) => slot === 'footer').length > 0;
90
94
  const hasSubFooter = namedSlotChildren.filter(({ props: { slot } }) => slot === 'sub-footer').length > 0;
91
- const dismissBtn = (jsxRuntime.jsx(buttonPure_wrapper.PButtonPure, { className: "dismiss", type: "button", hideLabel: true, icon: "close", theme: this.props.theme, children: "Dismiss flyout" }));
92
- const style = minifyCss.minifyCss(stripFocusAndHoverStyles.stripFocusAndHoverStyles(stylesEntry.getFlyoutCss(this.props.open, this.props.position, hasHeader, hasFooter, hasSubFooter, this.props.theme)));
95
+ const style = minifyCss.minifyCss(stripFocusAndHoverStyles.stripFocusAndHoverStyles(stylesEntry.getFlyoutCss(this.props.open, (positionDeprecationMap[this.props.position] || this.props.position), hasFooter, hasSubFooter, this.props.theme)));
93
96
  return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs("div", { className: "root", role: "dialog", ...utilsEntry.parseAndGetAriaAttributes({
94
97
  'aria-modal': true,
95
98
  'aria-hidden': !this.props.open,
96
99
  ...utilsEntry.parseAndGetAriaAttributes(this.props.aria),
97
- }), tabIndex: -1, ...(hasSubFooter && { onScroll: this.props.onScroll }), children: [jsxRuntime.jsxs("div", { className: "header", children: [dismissBtn, hasHeader && (jsxRuntime.jsx("div", { className: "header-content", children: jsxRuntime.jsx("slot", { name: "header" }) }))] }), jsxRuntime.jsx("div", { className: "content", children: jsxRuntime.jsx("slot", {}) }), hasFooter && (jsxRuntime.jsx("div", { className: "footer", children: jsxRuntime.jsx("slot", { name: "footer" }) })), hasSubFooter && (jsxRuntime.jsx("div", { className: "sub-footer", children: jsxRuntime.jsx("slot", { name: "sub-footer" }) }))] }) })] }), this.props.children] }));
100
+ }), tabIndex: -1,
101
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
102
+ /* @ts-ignore */
103
+ inert: this.props.open ? null : '', ...(hasSubFooter && { onScroll: this.props.onScroll }), children: [jsxRuntime.jsxs("div", { className: "header", children: [jsxRuntime.jsx(buttonPure_wrapper.PButtonPure, { className: "dismiss", type: "button", hideLabel: true, icon: "close", theme: this.props.theme, children: "Dismiss flyout" }), hasHeader && jsxRuntime.jsx("slot", { name: "header" })] }), jsxRuntime.jsx("div", { className: "content", children: jsxRuntime.jsx("slot", {}) }), hasFooter && (jsxRuntime.jsx("div", { className: "footer", children: jsxRuntime.jsx("slot", { name: "footer" }) })), hasSubFooter && (jsxRuntime.jsx("div", { className: "sub-footer", children: jsxRuntime.jsx("slot", { name: "sub-footer" }) }))] }) })] }), this.props.children] }));
98
104
  }
99
105
  }
100
106
 
@@ -12,8 +12,12 @@ class DSRHeading extends react.Component {
12
12
  host;
13
13
  render() {
14
14
  splitChildren.splitChildren(this.props.children);
15
+ const alignDeprecationMap = {
16
+ left: 'start',
17
+ right: 'end',
18
+ };
15
19
  const TagType = utilsEntry.getHeadingTagType(null, this.props.size, this.props.tag);
16
- const style = minifyCss.minifyCss(stripFocusAndHoverStyles.stripFocusAndHoverStyles(stylesEntry.getHeadingCss(this.props.size, this.props.align, this.props.color, this.props.ellipsis, this.props.theme)));
20
+ const style = minifyCss.minifyCss(stripFocusAndHoverStyles.stripFocusAndHoverStyles(stylesEntry.getHeadingCss(this.props.size, (alignDeprecationMap[this.props.align] || this.props.align), this.props.color, this.props.ellipsis, this.props.theme)));
17
21
  return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsx(TagType, { className: "root", children: jsxRuntime.jsx("slot", {}) })] }), this.props.children] }));
18
22
  }
19
23
  }
@@ -13,8 +13,12 @@ class DSRHeadline extends react.Component {
13
13
  host;
14
14
  render() {
15
15
  splitChildren.splitChildren(this.props.children);
16
+ const alignDeprecationMap = {
17
+ left: 'start',
18
+ right: 'end',
19
+ };
16
20
  const TagType = utilsEntry.getHeadlineTagType(null, this.props.variant, this.props.tag);
17
- const style = minifyCss.minifyCss(stripFocusAndHoverStyles.stripFocusAndHoverStyles(stylesEntry.getHeadlineCss(this.props.variant, this.props.align, this.props.color, this.props.ellipsis, this.props.theme)));
21
+ const style = minifyCss.minifyCss(stripFocusAndHoverStyles.stripFocusAndHoverStyles(stylesEntry.getHeadlineCss(this.props.variant, (alignDeprecationMap[this.props.align] || this.props.align), this.props.color, this.props.ellipsis, this.props.theme)));
18
22
  return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsx(TagType, { className: "root", children: jsxRuntime.jsx("slot", {}) })] }), this.props.children] }));
19
23
  }
20
24
  }
@@ -95,7 +95,7 @@ class DSRLinkTileModelSignature extends react.Component {
95
95
  'aria-hidden': 'true',
96
96
  };
97
97
  const style = minifyCss.minifyCss(stripFocusAndHoverStyles.stripFocusAndHoverStyles(stylesEntry.getLinkTileModelSignatureCss(this.props.aspectRatio, this.props.weight, this.props.linkDirection, !!this.props.description)));
98
- 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("div", { className: "image-container", children: jsxRuntime.jsx("slot", {}) }), jsxRuntime.jsx(modelSignature_wrapper.PModelSignature, { className: "model", theme: "dark", model: this.props.model }), jsxRuntime.jsxs("div", { className: "content", children: [jsxRuntime.jsx("a", { ...overlayLinkProps }), jsxRuntime.jsx(this.props.headingTag, { className: "heading", children: this.props.heading }), this.props.description && jsxRuntime.jsx("p", { className: "description", children: this.props.description }), jsxRuntime.jsxs("div", { className: "link-group", role: "group", children: [jsxRuntime.jsx("slot", { name: "primary" }), jsxRuntime.jsx("slot", { name: "secondary" })] })] })] })] }), manipulatedChildren] }));
98
+ 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("div", { className: "image-container", children: jsxRuntime.jsx("slot", {}) }), jsxRuntime.jsx("div", { className: "signature", children: jsxRuntime.jsx(modelSignature_wrapper.PModelSignature, { theme: "dark", model: this.props.model }) }), jsxRuntime.jsxs("div", { className: "content", children: [jsxRuntime.jsx("a", { ...overlayLinkProps }), jsxRuntime.jsx(this.props.headingTag, { className: "heading", children: this.props.heading }), this.props.description && jsxRuntime.jsx("p", { className: "description", children: this.props.description }), jsxRuntime.jsxs("div", { className: "link-group", role: "group", children: [jsxRuntime.jsx("slot", { name: "primary" }), jsxRuntime.jsx("slot", { name: "secondary" })] })] })] })] }), manipulatedChildren] }));
99
99
  }
100
100
  }
101
101
 
@@ -89,13 +89,16 @@ class DSRModal extends react.Component {
89
89
  const hasHeader = !!this.props.heading || namedSlotChildren.filter(({ props: { slot } }) => slot === 'heading').length > 0;
90
90
  const hasFooter = namedSlotChildren.filter(({ props: { slot } }) => slot === 'footer').length > 0;
91
91
  const hasDismissButton = this.props.disableCloseButton ? false : this.props.dismissButton;
92
- const style = minifyCss.minifyCss(stripFocusAndHoverStyles.stripFocusAndHoverStyles(stylesEntry.getModalCss(this.props.open, this.props.fullscreen, hasDismissButton, hasHeader, hasFooter)));
92
+ const style = minifyCss.minifyCss(stripFocusAndHoverStyles.stripFocusAndHoverStyles(stylesEntry.getModalCss(this.props.open, this.props.fullscreen, hasDismissButton, hasHeader, hasFooter, this.props.theme)));
93
93
  return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs("div", { className: "root", role: "dialog", ...utilsEntry.parseAndGetAriaAttributes({
94
94
  'aria-modal': true,
95
95
  'aria-label': this.props.heading,
96
96
  'aria-hidden': !this.props.open,
97
97
  ...utilsEntry.parseAndGetAriaAttributes(this.props.aria),
98
- }), tabIndex: -1, children: [hasDismissButton && (jsxRuntime.jsx(buttonPure_wrapper.PButtonPure, { className: "dismiss", type: "button", hideLabel: true, icon: "close", children: "Dismiss modal" })), hasHeader && (jsxRuntime.jsx("div", { className: "header", children: this.props.heading ? jsxRuntime.jsx("h2", { children: this.props.heading }) : jsxRuntime.jsx("slot", { name: "heading" }) })), jsxRuntime.jsx("div", { className: "content", children: jsxRuntime.jsx("slot", {}) }), hasFooter && (jsxRuntime.jsx("div", { className: "footer", children: jsxRuntime.jsx("slot", { name: "footer" }) }))] }) })] }), this.props.children] }));
98
+ }), tabIndex: -1,
99
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
100
+ /* @ts-ignore */
101
+ inert: this.props.open ? null : '', children: [hasDismissButton && (jsxRuntime.jsx("div", { className: "controls", children: jsxRuntime.jsx(buttonPure_wrapper.PButtonPure, { className: "dismiss", type: "button", hideLabel: true, icon: "close", theme: this.props.theme, children: "Dismiss modal" }) })), hasHeader && (jsxRuntime.jsx("div", { className: "header", children: this.props.heading ? jsxRuntime.jsx("h2", { children: this.props.heading }) : jsxRuntime.jsx("slot", { name: "heading" }) })), jsxRuntime.jsx("div", { className: "content", children: jsxRuntime.jsx("slot", {}) }), hasFooter && (jsxRuntime.jsx("div", { className: "footer", children: jsxRuntime.jsx("slot", { name: "footer" }) }))] }) })] }), this.props.children] }));
99
102
  }
100
103
  }
101
104
 
@@ -89,7 +89,7 @@ class DSRPinCode extends react.Component {
89
89
  const messageId = 'message';
90
90
  const style = minifyCss.minifyCss(stripFocusAndHoverStyles.stripFocusAndHoverStyles(stylesEntry.getPinCodeCss(this.props.hideLabel, this.props.state, this.props.disabled, this.props.loading, this.props.isWithinForm, this.props.length, this.props.theme)));
91
91
  return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("label", { className: "label", htmlFor: currentInputId, children: [(this.props.label || namedSlotChildren.filter(({ props: { slot } }) => slot === 'label').length > 0) && (jsxRuntime.jsx("span", { id: labelId, className: "label__text", children: this.props.label || jsxRuntime.jsx("slot", { name: "label" }) })), (this.props.description || namedSlotChildren.filter(({ props: { slot } }) => slot === 'description').length > 0) && (jsxRuntime.jsx("span", { id: descriptionId, className: "label__text", children: this.props.description || jsxRuntime.jsx("slot", { name: "description" }) }))] }), jsxRuntime.jsxs("div", { className: "input-container", children: [this.props.loading && (jsxRuntime.jsx(spinner_wrapper.PSpinner, { className: "spinner", size: "inherit", theme: this.props.theme, aria: { 'aria-label': 'Loading state' } })), this.props.isWithinForm && jsxRuntime.jsx("slot", { name: utilsEntry.hiddenInputSlotName }), Array.from(Array(this.props.length), (_, index) => (jsxRuntime.jsx("input", { id: index === this.props.value.length ? currentInputId : null, 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-busy": this.props.loading ? 'true' : null, autoComplete: "one-time-code", pattern: "\\d*", inputMode: "numeric" // get numeric keyboard on mobile
92
- , value: this.props.value[index] === ' ' ? null : this.props.value[index], disabled: this.props.disabled, required: this.props.required })))] }), (this.props.message || namedSlotChildren.filter(({ props: { slot } }) => slot === 'message').length > 0) && ['success', 'error'].includes(this.props.state) && (jsxRuntime.jsx(stateMessage.StateMessage, { id: messageId, state: this.props.state, message: this.props.message, theme: this.props.theme, host: null }))] })] }), this.props.children] }));
92
+ , defaultValue: this.props.value[index] === ' ' ? null : this.props.value[index], disabled: this.props.disabled, required: this.props.required }, index)))] }), (this.props.message || namedSlotChildren.filter(({ props: { slot } }) => slot === 'message').length > 0) && ['success', 'error'].includes(this.props.state) && (jsxRuntime.jsx(stateMessage.StateMessage, { id: messageId, state: this.props.state, message: this.props.message, theme: this.props.theme, host: null }))] })] }), this.props.children] }));
93
93
  }
94
94
  }
95
95
 
@@ -70,7 +70,6 @@ var react = require('react');
70
70
  var minifyCss = require('../../minifyCss.cjs');
71
71
  var stripFocusAndHoverStyles = require('../../stripFocusAndHoverStyles.cjs');
72
72
  var stylesEntry = require('../../../../../../components/dist/styles/esm/styles-entry.cjs');
73
- var utilsEntry = require('../../../../../../components/dist/utils/esm/utils-entry.cjs');
74
73
 
75
74
  class DSRPopover extends react.Component {
76
75
  host;
@@ -78,13 +77,13 @@ class DSRPopover extends react.Component {
78
77
  spacer;
79
78
  popover;
80
79
  button;
80
+ isNative = false;
81
+ parentTableElement;
81
82
  render() {
82
83
  splitChildren.splitChildren(this.props.children);
83
- const style = minifyCss.minifyCss(stripFocusAndHoverStyles.stripFocusAndHoverStyles(stylesEntry.getPopoverCss(this.props.direction, this.props.theme).replace(/(:host {[\S\s]+?})[\S\s]+(button {[\S\s]+?})[\S\s]+(.icon {[\S\s]+?})[\S\s]+(.label {[\S\s]+?})[\S\s]+/, '$1\n$2\n$3\n$4')));
84
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("button", { type: "button", ...utilsEntry.parseAndGetAriaAttributes({
85
- ...utilsEntry.parseAndGetAriaAttributes(this.props.aria),
86
- 'aria-expanded': this.props.open,
87
- }), children: [jsxRuntime.jsx(icon_wrapper.PIcon, { className: "icon", name: "information", theme: this.props.theme }), jsxRuntime.jsx("span", { className: "label", children: "More information" })] }), this.props.open && (jsxRuntime.jsx("div", { className: "spacer", children: jsxRuntime.jsx("div", { className: "popover", children: this.props.description ? jsxRuntime.jsx("p", { children: this.props.description }) : jsxRuntime.jsx("slot", {}) }) }))] })] }), this.props.children] }));
84
+ const style = minifyCss.minifyCss(stripFocusAndHoverStyles.stripFocusAndHoverStyles(stylesEntry.getPopoverCss(this.props.direction, this.props.isNative, this.props.theme).replace(/(:host {[\S\s]+?})[\S\s]+(button {[\S\s]+?})[\S\s]+(.icon {[\S\s]+?})[\S\s]+(.label {[\S\s]+?})[\S\s]+/, '$1\n$2\n$3\n$4')));
85
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("button", { type: "button", ...(this.props.isNative ? { popoverTarget: 'spacer' } : { ...(!this.props.isNative && { 'aria-expanded': this.props.open }),
86
+ }), children: [jsxRuntime.jsx(icon_wrapper.PIcon, { className: "icon", name: "information", theme: this.props.theme }), jsxRuntime.jsx("span", { className: "label", children: "More information" })] }), (this.props.open || this.props.isNative) && (jsxRuntime.jsx("div", { className: "spacer", ...(this.props.isNative && { popover: 'auto', id: 'spacer', onToggle: this.props.onToggle }), children: jsxRuntime.jsx("div", { className: "popover", children: this.props.description ? jsxRuntime.jsx("p", { children: this.props.description }) : jsxRuntime.jsx("slot", {}) }) }))] })] }), this.props.children] }));
88
87
  }
89
88
  }
90
89
 
@@ -89,7 +89,7 @@ class DSRScroller extends react.Component {
89
89
  return (jsxRuntime.jsx("div", { className: direction === 'next' ? 'action-next' : 'action-prev', children: jsxRuntime.jsx("button", { type: "button", tabIndex: -1, "aria-hidden": "true", "aria-label": direction, children: jsxRuntime.jsx(icon_wrapper.PIcon, { className: "icon", name: direction === 'next' ? 'arrow-head-right' : 'arrow-head-left', theme: this.props.theme }) }) }, direction));
90
90
  };
91
91
  const style = minifyCss.minifyCss(stripFocusAndHoverStyles.stripFocusAndHoverStyles(stylesEntry.getScrollerCss(deprecationMap[this.props.gradientColorScheme] || this.props.gradientColor, this.isNextHidden, this.isPrevHidden, this.props.scrollIndicatorPosition || this.props.alignScrollIndicator, this.props.scrollbar, this.props.theme)));
92
- 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("div", { className: "scroll-area", children: jsxRuntime.jsxs("div", { className: "scroll-wrapper", role: utilsEntry.parseAndGetAriaAttributes(this.props.aria)?.role || null, tabIndex: utilsEntry.isScrollable(this.isPrevHidden, this.isNextHidden) ? 0 : null, children: [jsxRuntime.jsx("slot", {}), jsxRuntime.jsx("div", { className: "trigger" }), jsxRuntime.jsx("div", { className: "trigger" })] }) }), ['prev', 'next'].map(renderPrevNextButton)] })] }), this.props.children] }));
92
+ 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("div", { className: utilsEntry.scrollAreaClass, children: jsxRuntime.jsxs("div", { className: "scroll-wrapper", role: utilsEntry.parseAndGetAriaAttributes(this.props.aria)?.role || null, tabIndex: utilsEntry.isScrollable(this.isPrevHidden, this.isNextHidden) ? 0 : null, children: [jsxRuntime.jsx("slot", {}), jsxRuntime.jsx("div", { className: "trigger" }), jsxRuntime.jsx("div", { className: "trigger" })] }) }), ['prev', 'next'].map(renderPrevNextButton)] })] }), this.props.children] }));
93
93
  }
94
94
  }
95
95
 
@@ -12,7 +12,7 @@ class DSRTextListItem extends react.Component {
12
12
  render() {
13
13
  splitChildren.splitChildren(this.props.children);
14
14
  const style = minifyCss.minifyCss(stripFocusAndHoverStyles.stripFocusAndHoverStyles(stylesEntry.getTextListItemCss()));
15
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsx("slot", {}) })] }), this.props.children] }));
15
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsx("span", { children: jsxRuntime.jsx("slot", {}) }) })] }), this.props.children] }));
16
16
  }
17
17
  }
18
18
 
@@ -24,8 +24,12 @@ class DSRText extends react.Component {
24
24
  thin: 'regular',
25
25
  semibold: 'semi-bold',
26
26
  };
27
+ const alignDeprecationMap = {
28
+ left: 'start',
29
+ right: 'end',
30
+ };
27
31
  const TagType = utilsEntry.getTextTagType(null, this.props.tag);
28
- const style = minifyCss.minifyCss(stripFocusAndHoverStyles.stripFocusAndHoverStyles(stylesEntry.getTextCss(this.props.size, (weightDeprecationMap[this.props.weight] || this.props.weight), this.props.align, (colorDeprecationMap[this.props.color] || this.props.color), this.props.ellipsis, this.props.theme)));
32
+ const style = minifyCss.minifyCss(stripFocusAndHoverStyles.stripFocusAndHoverStyles(stylesEntry.getTextCss(this.props.size, (weightDeprecationMap[this.props.weight] || this.props.weight), (alignDeprecationMap[this.props.align] || this.props.align), (colorDeprecationMap[this.props.color] || this.props.color), this.props.ellipsis, this.props.theme)));
29
33
  return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsx(TagType, { className: "root", children: jsxRuntime.jsx("slot", {}) })] }), this.props.children] }));
30
34
  }
31
35
  }