@porsche-design-system/components-react 4.0.0-beta.1 → 4.0.0-beta.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.
Files changed (48) hide show
  1. package/CHANGELOG.md +84 -6
  2. package/cjs/lib/components/scroller.wrapper.cjs +3 -3
  3. package/cjs/lib/components/table.wrapper.cjs +3 -3
  4. package/cjs/lib/components/tabs-bar.wrapper.cjs +3 -3
  5. package/cjs/lib/components/tabs.wrapper.cjs +3 -3
  6. package/esm/lib/components/scroller.wrapper.d.ts +20 -4
  7. package/esm/lib/components/scroller.wrapper.mjs +3 -3
  8. package/esm/lib/components/table.wrapper.d.ts +10 -2
  9. package/esm/lib/components/table.wrapper.mjs +3 -3
  10. package/esm/lib/components/tabs-bar.wrapper.d.ts +19 -3
  11. package/esm/lib/components/tabs-bar.wrapper.mjs +3 -3
  12. package/esm/lib/components/tabs.wrapper.d.ts +19 -3
  13. package/esm/lib/components/tabs.wrapper.mjs +3 -3
  14. package/esm/lib/types.d.ts +34 -16
  15. package/package.json +2 -2
  16. package/ssr/cjs/components/dist/styles/esm/styles-entry.cjs +302 -216
  17. package/ssr/cjs/components/dist/utils/esm/utils-entry.cjs +3 -12
  18. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/scroller.wrapper.cjs +4 -4
  19. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/table.wrapper.cjs +4 -4
  20. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/tabs-bar.wrapper.cjs +4 -4
  21. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/tabs.wrapper.cjs +4 -4
  22. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/scroller.cjs +8 -12
  23. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-option.cjs +1 -1
  24. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/stepper-horizontal.cjs +3 -2
  25. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/table.cjs +1 -1
  26. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs-bar.cjs +8 -8
  27. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs.cjs +3 -2
  28. package/ssr/esm/components/dist/styles/esm/styles-entry.mjs +302 -216
  29. package/ssr/esm/components/dist/utils/esm/utils-entry.mjs +4 -11
  30. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/scroller.wrapper.mjs +4 -4
  31. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/table.wrapper.mjs +4 -4
  32. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/tabs-bar.wrapper.mjs +4 -4
  33. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/tabs.wrapper.mjs +4 -4
  34. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/scroller.mjs +9 -13
  35. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-option.mjs +1 -1
  36. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/stepper-horizontal.mjs +3 -2
  37. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/table.mjs +1 -1
  38. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs-bar.mjs +8 -8
  39. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs.mjs +3 -2
  40. package/ssr/esm/lib/components/scroller.wrapper.d.ts +20 -4
  41. package/ssr/esm/lib/components/table.wrapper.d.ts +10 -2
  42. package/ssr/esm/lib/components/tabs-bar.wrapper.d.ts +19 -3
  43. package/ssr/esm/lib/components/tabs.wrapper.d.ts +19 -3
  44. package/ssr/esm/lib/dsr-components/scroller.d.ts +5 -3
  45. package/ssr/esm/lib/dsr-components/stepper-horizontal.d.ts +3 -2
  46. package/ssr/esm/lib/dsr-components/tabs-bar.d.ts +6 -6
  47. package/ssr/esm/lib/dsr-components/tabs.d.ts +2 -1
  48. package/ssr/esm/lib/types.d.ts +34 -16
@@ -3242,8 +3242,6 @@ const parseJSONAttribute = (attribute) => {
3242
3242
  // Convert tmp colon to real colon after all other replacements
3243
3243
  .replace(/__tmp-colon__/g, ':'));
3244
3244
  };
3245
-
3246
- const hasWindow$1 = typeof window !== 'undefined';
3247
3245
  const parseAndGetAriaAttributes = (rawAttributes) => {
3248
3246
  if (rawAttributes) {
3249
3247
  return Object.fromEntries(Object.entries(parseJSONAttribute(rawAttributes)).map(([key, val]) => [
@@ -3254,7 +3252,6 @@ const parseAndGetAriaAttributes = (rawAttributes) => {
3254
3252
  }
3255
3253
  return undefined;
3256
3254
  };
3257
- hasWindow$1 && window.matchMedia?.('(forced-colors: active)').matches;
3258
3255
 
3259
3256
  const getButtonBaseAriaAttributes = (isDisabled, isLoading) => {
3260
3257
  return {
@@ -3399,6 +3396,8 @@ supportsConstructableStylesheets();
3399
3396
  }
3400
3397
  })(); // determine it once
3401
3398
 
3399
+ const hasWindow$1 = typeof window !== 'undefined';
3400
+
3402
3401
  const attributeMutationMap = new Map();
3403
3402
  hasWindow$1 &&
3404
3403
  new MutationObserver((mutations) => {
@@ -3449,18 +3448,12 @@ const hasShowPickerSupport = () => (hasDocument &&
3449
3448
  'showPicker' in HTMLInputElement.prototype &&
3450
3449
  CSS.supports('selector(::-webkit-calendar-picker-indicator)'));
3451
3450
 
3452
- const prefix = `[Porsche Design System v${"4.0.0-beta.1"}]` // this part isn't covered by unit tests
3451
+ const prefix = `[Porsche Design System v${"4.0.0-beta.2"}]` // this part isn't covered by unit tests
3453
3452
  ;
3454
3453
  const consoleError$1 = (...messages) => {
3455
3454
  console.error(prefix, ...messages);
3456
3455
  };
3457
3456
 
3458
- // This class is shared since the popover needs to register a scroll listener to this node in order to hide the popover when the table is scrolled
3459
- const scrollAreaClass = 'scroll-area';
3460
- const isScrollable = (isPrevHidden, isNextHidden) => {
3461
- return !(isPrevHidden && isNextHidden);
3462
- };
3463
-
3464
3457
  /**
3465
3458
  * Checks if the current environment supports the native Popover API.
3466
3459
  *
@@ -4015,7 +4008,6 @@ exports.isDisabledOrLoading = isDisabledOrLoading;
4015
4008
  exports.isElementOfKind = isElementOfKind;
4016
4009
  exports.isInfinitePagination = isInfinitePagination;
4017
4010
  exports.isListTypeOrdered = isListTypeOrdered;
4018
- exports.isScrollable = isScrollable;
4019
4011
  exports.isSortable = isSortable;
4020
4012
  exports.isStateCompleteOrWarning = isStateCompleteOrWarning;
4021
4013
  exports.isUrl = isUrl;
@@ -4023,7 +4015,6 @@ exports.labelId = labelId;
4023
4015
  exports.observedNodesMap = observedNodesMap;
4024
4016
  exports.parseAndGetAriaAttributes = parseAndGetAriaAttributes;
4025
4017
  exports.parseJSONAttribute = parseJSONAttribute;
4026
- exports.scrollAreaClass = scrollAreaClass;
4027
4018
  exports.supportsConstructableStylesheets = supportsConstructableStylesheets;
4028
4019
  exports.supportsNativePopover = supportsNativePopover;
4029
4020
  exports.tempDiv = tempDiv;
@@ -7,20 +7,20 @@ var hooks = require('../../hooks.cjs');
7
7
  var utils = require('../../utils.cjs');
8
8
  var scroller = require('../dsr-components/scroller.cjs');
9
9
 
10
- const PScroller = /*#__PURE__*/ react.forwardRef(({ alignScrollIndicator = 'center', aria, scrollToPosition, scrollbar = false, className, children, ...rest }, ref) => {
10
+ const PScroller = /*#__PURE__*/ react.forwardRef(({ alignScrollIndicator = 'center', aria, compact, scrollToPosition, scrollbar = false, sticky = false, className, children, ...rest }, ref) => {
11
11
  const elementRef = react.useRef(undefined);
12
12
  const WebComponentTag = hooks.usePrefix('p-scroller');
13
- const propsToSync = [alignScrollIndicator, aria, scrollToPosition, scrollbar];
13
+ const propsToSync = [alignScrollIndicator, aria, compact, scrollToPosition, scrollbar, sticky];
14
14
  hooks.useBrowserLayoutEffect(() => {
15
15
  const { current } = elementRef;
16
- ['alignScrollIndicator', 'aria', 'scrollToPosition', 'scrollbar'].forEach((propName, i) => (current[propName] = propsToSync[i]));
16
+ ['alignScrollIndicator', 'aria', 'compact', 'scrollToPosition', 'scrollbar', 'sticky'].forEach((propName, i) => (current[propName] = propsToSync[i]));
17
17
  }, propsToSync);
18
18
  const props = {
19
19
  ...rest,
20
20
  // @ts-ignore
21
21
  ...(!process.browser
22
22
  ? {
23
- children: (jsxRuntime.jsx(scroller.DSRScroller, { alignScrollIndicator, aria, scrollToPosition, scrollbar, children })),
23
+ children: (jsxRuntime.jsx(scroller.DSRScroller, { alignScrollIndicator, aria, compact, scrollToPosition, scrollbar, sticky, children })),
24
24
  }
25
25
  : {
26
26
  children,
@@ -7,21 +7,21 @@ var hooks = require('../../hooks.cjs');
7
7
  var utils = require('../../utils.cjs');
8
8
  var table = require('../dsr-components/table.cjs');
9
9
 
10
- const PTable = /*#__PURE__*/ react.forwardRef(({ caption, compact = false, layout = 'auto', onUpdate, className, children, ...rest }, ref) => {
10
+ const PTable = /*#__PURE__*/ react.forwardRef(({ caption, compact = false, layout = 'auto', onUpdate, sticky = false, className, children, ...rest }, ref) => {
11
11
  const elementRef = react.useRef(undefined);
12
12
  hooks.useEventCallback(elementRef, 'update', onUpdate);
13
13
  const WebComponentTag = hooks.usePrefix('p-table');
14
- const propsToSync = [caption, compact, layout];
14
+ const propsToSync = [caption, compact, layout, sticky];
15
15
  hooks.useBrowserLayoutEffect(() => {
16
16
  const { current } = elementRef;
17
- ['caption', 'compact', 'layout'].forEach((propName, i) => (current[propName] = propsToSync[i]));
17
+ ['caption', 'compact', 'layout', 'sticky'].forEach((propName, i) => (current[propName] = propsToSync[i]));
18
18
  }, propsToSync);
19
19
  const props = {
20
20
  ...rest,
21
21
  // @ts-ignore
22
22
  ...(!process.browser
23
23
  ? {
24
- children: (jsxRuntime.jsx(table.DSRTable, { caption, compact, layout, children })),
24
+ children: (jsxRuntime.jsx(table.DSRTable, { caption, compact, layout, sticky, children })),
25
25
  }
26
26
  : {
27
27
  children,
@@ -7,21 +7,21 @@ var hooks = require('../../hooks.cjs');
7
7
  var utils = require('../../utils.cjs');
8
8
  var tabsBar = require('../dsr-components/tabs-bar.cjs');
9
9
 
10
- const PTabsBar = /*#__PURE__*/ react.forwardRef(({ activeTabIndex, onUpdate, size = 'small', weight = 'regular', className, children, ...rest }, ref) => {
10
+ const PTabsBar = /*#__PURE__*/ react.forwardRef(({ activeTabIndex, background = 'none', compact, onUpdate, size = 'small', weight = 'regular', className, children, ...rest }, ref) => {
11
11
  const elementRef = react.useRef(undefined);
12
12
  hooks.useEventCallback(elementRef, 'update', onUpdate);
13
13
  const WebComponentTag = hooks.usePrefix('p-tabs-bar');
14
- const propsToSync = [activeTabIndex, size, weight];
14
+ const propsToSync = [activeTabIndex, background, compact, size, weight];
15
15
  hooks.useBrowserLayoutEffect(() => {
16
16
  const { current } = elementRef;
17
- ['activeTabIndex', 'size', 'weight'].forEach((propName, i) => (current[propName] = propsToSync[i]));
17
+ ['activeTabIndex', 'background', 'compact', 'size', 'weight'].forEach((propName, i) => (current[propName] = propsToSync[i]));
18
18
  }, propsToSync);
19
19
  const props = {
20
20
  ...rest,
21
21
  // @ts-ignore
22
22
  ...(!process.browser
23
23
  ? {
24
- children: (jsxRuntime.jsx(tabsBar.DSRTabsBar, { activeTabIndex, size, weight, children })),
24
+ children: (jsxRuntime.jsx(tabsBar.DSRTabsBar, { activeTabIndex, background, compact, size, weight, children })),
25
25
  }
26
26
  : {
27
27
  children,
@@ -7,21 +7,21 @@ var hooks = require('../../hooks.cjs');
7
7
  var utils = require('../../utils.cjs');
8
8
  var tabs = require('../dsr-components/tabs.cjs');
9
9
 
10
- const PTabs = /*#__PURE__*/ react.forwardRef(({ activeTabIndex = 0, onUpdate, size = 'small', weight = 'regular', className, children, ...rest }, ref) => {
10
+ const PTabs = /*#__PURE__*/ react.forwardRef(({ activeTabIndex = 0, background = 'none', compact, onUpdate, size = 'small', weight = 'regular', className, children, ...rest }, ref) => {
11
11
  const elementRef = react.useRef(undefined);
12
12
  hooks.useEventCallback(elementRef, 'update', onUpdate);
13
13
  const WebComponentTag = hooks.usePrefix('p-tabs');
14
- const propsToSync = [activeTabIndex, size, weight];
14
+ const propsToSync = [activeTabIndex, background, compact, size, weight];
15
15
  hooks.useBrowserLayoutEffect(() => {
16
16
  const { current } = elementRef;
17
- ['activeTabIndex', 'size', 'weight'].forEach((propName, i) => (current[propName] = propsToSync[i]));
17
+ ['activeTabIndex', 'background', 'compact', 'size', 'weight'].forEach((propName, i) => (current[propName] = propsToSync[i]));
18
18
  }, propsToSync);
19
19
  const props = {
20
20
  ...rest,
21
21
  // @ts-ignore
22
22
  ...(!process.browser
23
23
  ? {
24
- children: (jsxRuntime.jsx(tabs.DSRTabs, { activeTabIndex, size, weight, children })),
24
+ children: (jsxRuntime.jsx(tabs.DSRTabs, { activeTabIndex, background, compact, size, weight, children })),
25
25
  }
26
26
  : {
27
27
  children,
@@ -1,31 +1,27 @@
1
1
  'use strict';
2
2
 
3
3
  var jsxRuntime = require('react/jsx-runtime');
4
- var react = require('react');
5
- require('../../provider.cjs');
6
4
  var splitChildren = require('../../splitChildren.cjs');
5
+ var react = require('react');
7
6
  var minifyCss = require('../../minifyCss.cjs');
8
7
  var stylesEntry = require('../../../../../../components/dist/styles/esm/styles-entry.cjs');
9
8
  var utilsEntry = require('../../../../../../components/dist/utils/esm/utils-entry.cjs');
10
- var button_wrapper = require('../components/button.wrapper.cjs');
11
9
 
12
10
  /**
13
11
  * @slot {"name": "", "description": "Default slot for the scroller content." }
14
12
  */
15
13
  class DSRScroller extends react.Component {
16
14
  host;
17
- isPrevHidden = true;
18
- isNextHidden = true;
15
+ isIndicatorPrevVisible = false;
16
+ isIndicatorNextVisible = false;
19
17
  intersectionObserver;
20
- scrollAreaElement;
18
+ scrollArea;
19
+ sentinelLeft;
20
+ sentinelRight;
21
21
  render() {
22
22
  splitChildren.splitChildren(this.props.children);
23
- const renderPrevNextButton = (direction) => {
24
- return (jsxRuntime.jsx("div", { className: direction === 'next' ? 'action-next' : 'action-prev', children: jsxRuntime.jsx(button_wrapper.PButton, { className: "action-button", variant: "secondary", "hide-label": "true", icon: direction === 'next' ? 'arrow-head-right' : 'arrow-head-left', type: "button", tabIndex: -1, dir: "ltr" // Otherwise icon will be flipped which doesn't make sense in this use case
25
- , children: direction }) }, direction));
26
- };
27
- const style = minifyCss.minifyCss(stylesEntry.getScrollerCss(this.isNextHidden, this.isPrevHidden, this.props.alignScrollIndicator, this.props.scrollbar));
28
- 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] }));
23
+ const style = minifyCss.minifyCss(stylesEntry.getScrollerCss(this.props.isIndicatorPrevVisible, this.props.isIndicatorNextVisible, this.props.sticky, this.props.scrollbar, this.props.compact));
24
+ 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("span", { className: "prev" }), jsxRuntime.jsx("span", { className: "next" }), jsxRuntime.jsxs("div", { className: "scroll", role: utilsEntry.parseAndGetAriaAttributes(this.props.aria)?.role || null, tabIndex: this.props.isIndicatorPrevVisible || this.props.isIndicatorNextVisible ? 0 : null, children: [jsxRuntime.jsx("span", { className: "sentinel" }), jsxRuntime.jsx("slot", {}), jsxRuntime.jsx("span", { className: "sentinel" })] })] })] }), this.props.children] }));
29
25
  }
30
26
  }
31
27
 
@@ -17,7 +17,7 @@ class DSRSelectOption extends react.Component {
17
17
  splitChildren.splitChildren(this.props.children);
18
18
  const { selected: isSelected, highlighted, hidden } = this.props;
19
19
  const isDisabled = this.props.disabled || this.props.disabledParent;
20
- const style = minifyCss.minifyCss(stylesEntry.getSelectOptionCss(this.props.disabled));
20
+ const style = minifyCss.minifyCss(stylesEntry.getSelectOptionCss(isDisabled));
21
21
  return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } })
22
22
  // TODO: get rid of ARIA sprouting and use `elementInternals` API when AXE-CORE supports it: https://github.com/dequelabs/axe-core/issues/4259
23
23
  , "// TODO: get rid of ARIA sprouting and use `elementInternals` API when AXE-CORE supports it: https://github.com/dequelabs/axe-core/issues/4259", jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs("div", { className: Object.entries({
@@ -13,9 +13,10 @@ var scroller_wrapper = require('../components/scroller.wrapper.cjs');
13
13
  */
14
14
  class DSRStepperHorizontal extends react.Component {
15
15
  host;
16
+ scroller;
16
17
  stepperHorizontalItems = [];
17
- scrollerElement;
18
- currentStepIndex;
18
+ slot;
19
+ resizeObserver;
19
20
  render() {
20
21
  const { children, otherChildren } = splitChildren.splitChildren(this.props.children);
21
22
  const manipulatedChildren = children.map((child) => typeof child === 'object' && 'props' in child && otherChildren.includes(child)
@@ -22,7 +22,7 @@ class DSRTable extends react.Component {
22
22
  ? { 'aria-label': this.props.caption }
23
23
  : hasSlottedCaption && { 'aria-labelledby': captionId };
24
24
  const style = minifyCss.minifyCss(stylesEntry.getTableCss(this.props.compact, this.props.layout));
25
- 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: [hasSlottedCaption && (jsxRuntime.jsx("div", { id: captionId, className: "caption", children: jsxRuntime.jsx("slot", { name: "caption" }) })), jsxRuntime.jsx(scroller_wrapper.PScroller, { scrollbar: true, children: jsxRuntime.jsx("div", { className: "table", role: "table", ...tableAttr, children: jsxRuntime.jsx("slot", {}) }) })] })] }), this.props.children] }));
25
+ 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: [hasSlottedCaption && (jsxRuntime.jsx("div", { id: captionId, className: "caption", children: jsxRuntime.jsx("slot", { name: "caption" }) })), jsxRuntime.jsx(scroller_wrapper.PScroller, { scrollbar: true, compact: this.props.compact, sticky: this.props.sticky, children: jsxRuntime.jsx("div", { className: "table", role: "table", ...tableAttr, children: jsxRuntime.jsx("slot", {}) }) })] })] }), this.props.children] }));
26
26
  }
27
27
  }
28
28
 
@@ -15,13 +15,13 @@ var scroller_wrapper = require('../components/scroller.wrapper.cjs');
15
15
  */
16
16
  class DSRTabsBar extends react.Component {
17
17
  host;
18
- tabElements = [];
19
- internalTabIndex = this.props.activeTabIndex; // to not override and mutate external prop value
20
- barElement;
21
- scrollerElement;
22
- direction = 'next';
18
+ tabs = [];
19
+ bar;
20
+ scroller;
21
+ slot;
23
22
  hasPTabsParent;
24
- areTabsButtons;
23
+ isTabList;
24
+ resizeObserver;
25
25
  render() {
26
26
  const { children, otherChildren } = splitChildren.splitChildren(this.props.children);
27
27
  const manipulatedChildren = children.map((child, i) => typeof child === 'object' && 'props' in child && otherChildren.includes(child)
@@ -45,8 +45,8 @@ class DSRTabsBar extends react.Component {
45
45
  }
46
46
  : child
47
47
  : child);
48
- const style = minifyCss.minifyCss(stylesEntry.getTabsBarCss(this.props.size, this.props.weight));
49
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsxs(scroller_wrapper.PScroller, { className: "scroller", ...(this.props.areTabsButtons && { aria: { role: 'tablist' } }), alignScrollIndicator: "top", children: [jsxRuntime.jsx("slot", {}), jsxRuntime.jsx("span", { className: "bar" })] })] }), manipulatedChildren] }));
48
+ const style = minifyCss.minifyCss(stylesEntry.getTabsBarCss(this.props.background, this.props.size, this.props.compact));
49
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsxs(scroller_wrapper.PScroller, { className: "scroller", compact: this.props.compact, ...(this.props.isTabList && { aria: { role: 'tablist' } }), children: [jsxRuntime.jsx("slot", {}), jsxRuntime.jsx("span", { className: "bar" })] })] }), manipulatedChildren] }));
50
50
  }
51
51
  }
52
52
 
@@ -15,14 +15,15 @@ var tabsBar_wrapper = require('../components/tabs-bar.wrapper.cjs');
15
15
  */
16
16
  class DSRTabs extends react.Component {
17
17
  host;
18
- tabsItemElements = [];
18
+ tabsItems = [];
19
+ slot;
19
20
  render() {
20
21
  const { children, otherChildren } = splitChildren.splitChildren(this.props.children);
21
22
  const manipulatedChildren = children.map((child, i) => typeof child === 'object' && 'props' in child && otherChildren.includes(child)
22
23
  ? { ...child, props: { ...child.props, theme: this.props.theme, hidden: this.props.activeTabIndex !== i ? true : null } }
23
24
  : child);
24
25
  const style = minifyCss.minifyCss(stylesEntry.getTabsCss());
25
- 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.jsx(tabsBar_wrapper.PTabsBar, { className: "root", size: this.props.size, weight: this.props.weight, activeTabIndex: this.props.activeTabIndex, children: otherChildren.map((tab, index) => (jsxRuntime.jsx("button", { type: "button", children: typeof tab === 'object' && 'props' in tab && tab.props.label }, index))) }), jsxRuntime.jsx("slot", {})] })] }), manipulatedChildren] }));
26
+ 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.jsx(tabsBar_wrapper.PTabsBar, { className: "root", size: this.props.size, background: this.props.background, compact: this.props.compact, activeTabIndex: this.props.activeTabIndex, children: otherChildren.map((tab, index) => (jsxRuntime.jsx("button", { type: "button", children: typeof tab === 'object' && 'props' in tab && tab.props.label }, index))) }), jsxRuntime.jsx("slot", {})] })] }), manipulatedChildren] }));
26
27
  }
27
28
  }
28
29