@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
@@ -3240,8 +3240,6 @@ const parseJSONAttribute = (attribute) => {
3240
3240
  // Convert tmp colon to real colon after all other replacements
3241
3241
  .replace(/__tmp-colon__/g, ':'));
3242
3242
  };
3243
-
3244
- const hasWindow$1 = typeof window !== 'undefined';
3245
3243
  const parseAndGetAriaAttributes = (rawAttributes) => {
3246
3244
  if (rawAttributes) {
3247
3245
  return Object.fromEntries(Object.entries(parseJSONAttribute(rawAttributes)).map(([key, val]) => [
@@ -3252,7 +3250,6 @@ const parseAndGetAriaAttributes = (rawAttributes) => {
3252
3250
  }
3253
3251
  return undefined;
3254
3252
  };
3255
- hasWindow$1 && window.matchMedia?.('(forced-colors: active)').matches;
3256
3253
 
3257
3254
  const getButtonBaseAriaAttributes = (isDisabled, isLoading) => {
3258
3255
  return {
@@ -3397,6 +3394,8 @@ supportsConstructableStylesheets();
3397
3394
  }
3398
3395
  })(); // determine it once
3399
3396
 
3397
+ const hasWindow$1 = typeof window !== 'undefined';
3398
+
3400
3399
  const attributeMutationMap = new Map();
3401
3400
  hasWindow$1 &&
3402
3401
  new MutationObserver((mutations) => {
@@ -3447,18 +3446,12 @@ const hasShowPickerSupport = () => (hasDocument &&
3447
3446
  'showPicker' in HTMLInputElement.prototype &&
3448
3447
  CSS.supports('selector(::-webkit-calendar-picker-indicator)'));
3449
3448
 
3450
- const prefix = `[Porsche Design System v${"4.0.0-beta.1"}]` // this part isn't covered by unit tests
3449
+ const prefix = `[Porsche Design System v${"4.0.0-beta.2"}]` // this part isn't covered by unit tests
3451
3450
  ;
3452
3451
  const consoleError$1 = (...messages) => {
3453
3452
  console.error(prefix, ...messages);
3454
3453
  };
3455
3454
 
3456
- // 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
3457
- const scrollAreaClass = 'scroll-area';
3458
- const isScrollable = (isPrevHidden, isNextHidden) => {
3459
- return !(isPrevHidden && isNextHidden);
3460
- };
3461
-
3462
3455
  /**
3463
3456
  * Checks if the current environment supports the native Popover API.
3464
3457
  *
@@ -3964,4 +3957,4 @@ const getTextTagType = (host, tag) => {
3964
3957
  return tag;
3965
3958
  };
3966
3959
 
3967
- export { DISPLAY_TAGS, HEADING_TAGS, ItemType, TEXT_TAGS, anchorSlot, attributeMutationMap, buildCrestImgSrc, buildCrestSrcSet, buildFlagUrl, buildIconUrl, consoleError$1 as consoleError, createPaginationItems, createRange, crestSize, descriptionId, displaySizeToTagMap, getButtonAriaAttributes, getButtonBaseAriaAttributes, getButtonPureAriaAttributes, getCDNBaseURL, getComboboxAriaAttributes, getContentAriaAttributes, getCurrentActivePage, getDirectChildHTMLElement, getDisplayTagType, getFieldsetAriaAttributes, getHTMLElement, getHasNativePopoverSupport, getHeadingTagType, getInlineNotificationIconName, getSegmentedControlItemAriaAttributes, getStepperHorizontalIconName, getSvgUrl, getSwitchButtonAriaAttributes, getTagName, getTagNameWithoutPrefix, getTextTagType, getTotalPages, hasDocument, hasShowPickerSupport, hasSpecificDirectChildTag, hasVisibleIcon, hasWindow$1 as hasWindow, headerSlot, internalDrilldown, isCurrentInput, isDisabledOrLoading, isElementOfKind, isInfinitePagination, isListTypeOrdered, isScrollable, isSortable, isStateCompleteOrWarning, isUrl, labelId, observedNodesMap, parseAndGetAriaAttributes, parseJSONAttribute, scrollAreaClass, supportsConstructableStylesheets, supportsNativePopover, tempDiv, tempIcon, tempLabel, traverseTreeAndUpdateState, updateDrilldownItemState };
3960
+ export { DISPLAY_TAGS, HEADING_TAGS, ItemType, TEXT_TAGS, anchorSlot, attributeMutationMap, buildCrestImgSrc, buildCrestSrcSet, buildFlagUrl, buildIconUrl, consoleError$1 as consoleError, createPaginationItems, createRange, crestSize, descriptionId, displaySizeToTagMap, getButtonAriaAttributes, getButtonBaseAriaAttributes, getButtonPureAriaAttributes, getCDNBaseURL, getComboboxAriaAttributes, getContentAriaAttributes, getCurrentActivePage, getDirectChildHTMLElement, getDisplayTagType, getFieldsetAriaAttributes, getHTMLElement, getHasNativePopoverSupport, getHeadingTagType, getInlineNotificationIconName, getSegmentedControlItemAriaAttributes, getStepperHorizontalIconName, getSvgUrl, getSwitchButtonAriaAttributes, getTagName, getTagNameWithoutPrefix, getTextTagType, getTotalPages, hasDocument, hasShowPickerSupport, hasSpecificDirectChildTag, hasVisibleIcon, hasWindow$1 as hasWindow, headerSlot, internalDrilldown, isCurrentInput, isDisabledOrLoading, isElementOfKind, isInfinitePagination, isListTypeOrdered, isSortable, isStateCompleteOrWarning, isUrl, labelId, observedNodesMap, parseAndGetAriaAttributes, parseJSONAttribute, supportsConstructableStylesheets, supportsNativePopover, tempDiv, tempIcon, tempLabel, traverseTreeAndUpdateState, updateDrilldownItemState };
@@ -5,20 +5,20 @@ import { usePrefix, useBrowserLayoutEffect, useMergedClass } from '../../hooks.m
5
5
  import { syncRef } from '../../utils.mjs';
6
6
  import { DSRScroller } from '../dsr-components/scroller.mjs';
7
7
 
8
- const PScroller = /*#__PURE__*/ forwardRef(({ alignScrollIndicator = 'center', aria, scrollToPosition, scrollbar = false, className, children, ...rest }, ref) => {
8
+ const PScroller = /*#__PURE__*/ forwardRef(({ alignScrollIndicator = 'center', aria, compact, scrollToPosition, scrollbar = false, sticky = false, className, children, ...rest }, ref) => {
9
9
  const elementRef = useRef(undefined);
10
10
  const WebComponentTag = usePrefix('p-scroller');
11
- const propsToSync = [alignScrollIndicator, aria, scrollToPosition, scrollbar];
11
+ const propsToSync = [alignScrollIndicator, aria, compact, scrollToPosition, scrollbar, sticky];
12
12
  useBrowserLayoutEffect(() => {
13
13
  const { current } = elementRef;
14
- ['alignScrollIndicator', 'aria', 'scrollToPosition', 'scrollbar'].forEach((propName, i) => (current[propName] = propsToSync[i]));
14
+ ['alignScrollIndicator', 'aria', 'compact', 'scrollToPosition', 'scrollbar', 'sticky'].forEach((propName, i) => (current[propName] = propsToSync[i]));
15
15
  }, propsToSync);
16
16
  const props = {
17
17
  ...rest,
18
18
  // @ts-ignore
19
19
  ...(!process.browser
20
20
  ? {
21
- children: (jsx(DSRScroller, { alignScrollIndicator, aria, scrollToPosition, scrollbar, children })),
21
+ children: (jsx(DSRScroller, { alignScrollIndicator, aria, compact, scrollToPosition, scrollbar, sticky, children })),
22
22
  }
23
23
  : {
24
24
  children,
@@ -5,21 +5,21 @@ import { useEventCallback, usePrefix, useBrowserLayoutEffect, useMergedClass } f
5
5
  import { syncRef } from '../../utils.mjs';
6
6
  import { DSRTable } from '../dsr-components/table.mjs';
7
7
 
8
- const PTable = /*#__PURE__*/ forwardRef(({ caption, compact = false, layout = 'auto', onUpdate, className, children, ...rest }, ref) => {
8
+ const PTable = /*#__PURE__*/ forwardRef(({ caption, compact = false, layout = 'auto', onUpdate, sticky = false, className, children, ...rest }, ref) => {
9
9
  const elementRef = useRef(undefined);
10
10
  useEventCallback(elementRef, 'update', onUpdate);
11
11
  const WebComponentTag = usePrefix('p-table');
12
- const propsToSync = [caption, compact, layout];
12
+ const propsToSync = [caption, compact, layout, sticky];
13
13
  useBrowserLayoutEffect(() => {
14
14
  const { current } = elementRef;
15
- ['caption', 'compact', 'layout'].forEach((propName, i) => (current[propName] = propsToSync[i]));
15
+ ['caption', 'compact', 'layout', 'sticky'].forEach((propName, i) => (current[propName] = propsToSync[i]));
16
16
  }, propsToSync);
17
17
  const props = {
18
18
  ...rest,
19
19
  // @ts-ignore
20
20
  ...(!process.browser
21
21
  ? {
22
- children: (jsx(DSRTable, { caption, compact, layout, children })),
22
+ children: (jsx(DSRTable, { caption, compact, layout, sticky, children })),
23
23
  }
24
24
  : {
25
25
  children,
@@ -5,21 +5,21 @@ import { useEventCallback, usePrefix, useBrowserLayoutEffect, useMergedClass } f
5
5
  import { syncRef } from '../../utils.mjs';
6
6
  import { DSRTabsBar } from '../dsr-components/tabs-bar.mjs';
7
7
 
8
- const PTabsBar = /*#__PURE__*/ forwardRef(({ activeTabIndex, onUpdate, size = 'small', weight = 'regular', className, children, ...rest }, ref) => {
8
+ const PTabsBar = /*#__PURE__*/ forwardRef(({ activeTabIndex, background = 'none', compact, onUpdate, size = 'small', weight = 'regular', className, children, ...rest }, ref) => {
9
9
  const elementRef = useRef(undefined);
10
10
  useEventCallback(elementRef, 'update', onUpdate);
11
11
  const WebComponentTag = usePrefix('p-tabs-bar');
12
- const propsToSync = [activeTabIndex, size, weight];
12
+ const propsToSync = [activeTabIndex, background, compact, size, weight];
13
13
  useBrowserLayoutEffect(() => {
14
14
  const { current } = elementRef;
15
- ['activeTabIndex', 'size', 'weight'].forEach((propName, i) => (current[propName] = propsToSync[i]));
15
+ ['activeTabIndex', 'background', 'compact', 'size', 'weight'].forEach((propName, i) => (current[propName] = propsToSync[i]));
16
16
  }, propsToSync);
17
17
  const props = {
18
18
  ...rest,
19
19
  // @ts-ignore
20
20
  ...(!process.browser
21
21
  ? {
22
- children: (jsx(DSRTabsBar, { activeTabIndex, size, weight, children })),
22
+ children: (jsx(DSRTabsBar, { activeTabIndex, background, compact, size, weight, children })),
23
23
  }
24
24
  : {
25
25
  children,
@@ -5,21 +5,21 @@ import { useEventCallback, usePrefix, useBrowserLayoutEffect, useMergedClass } f
5
5
  import { syncRef } from '../../utils.mjs';
6
6
  import { DSRTabs } from '../dsr-components/tabs.mjs';
7
7
 
8
- const PTabs = /*#__PURE__*/ forwardRef(({ activeTabIndex = 0, onUpdate, size = 'small', weight = 'regular', className, children, ...rest }, ref) => {
8
+ const PTabs = /*#__PURE__*/ forwardRef(({ activeTabIndex = 0, background = 'none', compact, onUpdate, size = 'small', weight = 'regular', className, children, ...rest }, ref) => {
9
9
  const elementRef = useRef(undefined);
10
10
  useEventCallback(elementRef, 'update', onUpdate);
11
11
  const WebComponentTag = usePrefix('p-tabs');
12
- const propsToSync = [activeTabIndex, size, weight];
12
+ const propsToSync = [activeTabIndex, background, compact, size, weight];
13
13
  useBrowserLayoutEffect(() => {
14
14
  const { current } = elementRef;
15
- ['activeTabIndex', 'size', 'weight'].forEach((propName, i) => (current[propName] = propsToSync[i]));
15
+ ['activeTabIndex', 'background', 'compact', 'size', 'weight'].forEach((propName, i) => (current[propName] = propsToSync[i]));
16
16
  }, propsToSync);
17
17
  const props = {
18
18
  ...rest,
19
19
  // @ts-ignore
20
20
  ...(!process.browser
21
21
  ? {
22
- children: (jsx(DSRTabs, { activeTabIndex, size, weight, children })),
22
+ children: (jsx(DSRTabs, { activeTabIndex, background, compact, size, weight, children })),
23
23
  }
24
24
  : {
25
25
  children,
@@ -1,29 +1,25 @@
1
1
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
2
- import { Component } from 'react';
3
- import '../../provider.mjs';
4
2
  import { splitChildren } from '../../splitChildren.mjs';
3
+ import { Component } from 'react';
5
4
  import { minifyCss } from '../../minifyCss.mjs';
6
5
  import { getScrollerCss as getComponentCss$s } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
7
- import { scrollAreaClass, parseAndGetAriaAttributes, isScrollable } from '../../../../../../components/dist/utils/esm/utils-entry.mjs';
8
- import { PButton } from '../components/button.wrapper.mjs';
6
+ import { parseAndGetAriaAttributes } from '../../../../../../components/dist/utils/esm/utils-entry.mjs';
9
7
 
10
8
  /**
11
9
  * @slot {"name": "", "description": "Default slot for the scroller content." }
12
10
  */
13
11
  class DSRScroller extends Component {
14
12
  host;
15
- isPrevHidden = true;
16
- isNextHidden = true;
13
+ isIndicatorPrevVisible = false;
14
+ isIndicatorNextVisible = false;
17
15
  intersectionObserver;
18
- scrollAreaElement;
16
+ scrollArea;
17
+ sentinelLeft;
18
+ sentinelRight;
19
19
  render() {
20
20
  splitChildren(this.props.children);
21
- const renderPrevNextButton = (direction) => {
22
- return (jsx("div", { className: direction === 'next' ? 'action-next' : 'action-prev', children: jsx(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
23
- , children: direction }) }, direction));
24
- };
25
- const style = minifyCss(getComponentCss$s(this.isNextHidden, this.isPrevHidden, this.props.alignScrollIndicator, this.props.scrollbar));
26
- return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs("div", { className: "root", children: [jsx("div", { className: scrollAreaClass, children: jsxs("div", { className: "scroll-wrapper", role: parseAndGetAriaAttributes(this.props.aria)?.role || null, tabIndex: isScrollable(this.isPrevHidden, this.isNextHidden) ? 0 : null, children: [jsx("slot", {}), jsx("div", { className: "trigger" }), jsx("div", { className: "trigger" })] }) }), ['prev', 'next'].map(renderPrevNextButton)] })] }), this.props.children] }));
21
+ const style = minifyCss(getComponentCss$s(this.props.isIndicatorPrevVisible, this.props.isIndicatorNextVisible, this.props.sticky, this.props.scrollbar, this.props.compact));
22
+ return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs("div", { className: "root", children: [jsx("span", { className: "prev" }), jsx("span", { className: "next" }), jsxs("div", { className: "scroll", role: parseAndGetAriaAttributes(this.props.aria)?.role || null, tabIndex: this.props.isIndicatorPrevVisible || this.props.isIndicatorNextVisible ? 0 : null, children: [jsx("span", { className: "sentinel" }), jsx("slot", {}), jsx("span", { className: "sentinel" })] })] })] }), this.props.children] }));
27
23
  }
28
24
  }
29
25
 
@@ -15,7 +15,7 @@ class DSRSelectOption extends Component {
15
15
  splitChildren(this.props.children);
16
16
  const { selected: isSelected, highlighted, hidden } = this.props;
17
17
  const isDisabled = this.props.disabled || this.props.disabledParent;
18
- const style = minifyCss(getComponentCss$p(this.props.disabled));
18
+ const style = minifyCss(getComponentCss$p(isDisabled));
19
19
  return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } })
20
20
  // TODO: get rid of ARIA sprouting and use `elementInternals` API when AXE-CORE supports it: https://github.com/dequelabs/axe-core/issues/4259
21
21
  , "// TODO: get rid of ARIA sprouting and use `elementInternals` API when AXE-CORE supports it: https://github.com/dequelabs/axe-core/issues/4259", jsx(Fragment, { children: jsxs("div", { className: Object.entries({
@@ -11,9 +11,10 @@ import { PScroller } from '../components/scroller.wrapper.mjs';
11
11
  */
12
12
  class DSRStepperHorizontal extends Component {
13
13
  host;
14
+ scroller;
14
15
  stepperHorizontalItems = [];
15
- scrollerElement;
16
- currentStepIndex;
16
+ slot;
17
+ resizeObserver;
17
18
  render() {
18
19
  const { children, otherChildren } = splitChildren(this.props.children);
19
20
  const manipulatedChildren = children.map((child) => typeof child === 'object' && 'props' in child && otherChildren.includes(child)
@@ -20,7 +20,7 @@ class DSRTable extends Component {
20
20
  ? { 'aria-label': this.props.caption }
21
21
  : hasSlottedCaption && { 'aria-labelledby': captionId };
22
22
  const style = minifyCss(getComponentCss$h(this.props.compact, this.props.layout));
23
- return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs(Fragment, { children: [hasSlottedCaption && (jsx("div", { id: captionId, className: "caption", children: jsx("slot", { name: "caption" }) })), jsx(PScroller, { scrollbar: true, children: jsx("div", { className: "table", role: "table", ...tableAttr, children: jsx("slot", {}) }) })] })] }), this.props.children] }));
23
+ return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs(Fragment, { children: [hasSlottedCaption && (jsx("div", { id: captionId, className: "caption", children: jsx("slot", { name: "caption" }) })), jsx(PScroller, { scrollbar: true, compact: this.props.compact, sticky: this.props.sticky, children: jsx("div", { className: "table", role: "table", ...tableAttr, children: jsx("slot", {}) }) })] })] }), this.props.children] }));
24
24
  }
25
25
  }
26
26
 
@@ -13,13 +13,13 @@ import { PScroller } from '../components/scroller.wrapper.mjs';
13
13
  */
14
14
  class DSRTabsBar extends Component {
15
15
  host;
16
- tabElements = [];
17
- internalTabIndex = this.props.activeTabIndex; // to not override and mutate external prop value
18
- barElement;
19
- scrollerElement;
20
- direction = 'next';
16
+ tabs = [];
17
+ bar;
18
+ scroller;
19
+ slot;
21
20
  hasPTabsParent;
22
- areTabsButtons;
21
+ isTabList;
22
+ resizeObserver;
23
23
  render() {
24
24
  const { children, otherChildren } = splitChildren(this.props.children);
25
25
  const manipulatedChildren = children.map((child, i) => typeof child === 'object' && 'props' in child && otherChildren.includes(child)
@@ -43,8 +43,8 @@ class DSRTabsBar extends Component {
43
43
  }
44
44
  : child
45
45
  : child);
46
- const style = minifyCss(getComponentCss$b(this.props.size, this.props.weight));
47
- return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs(PScroller, { className: "scroller", ...(this.props.areTabsButtons && { aria: { role: 'tablist' } }), alignScrollIndicator: "top", children: [jsx("slot", {}), jsx("span", { className: "bar" })] })] }), manipulatedChildren] }));
46
+ const style = minifyCss(getComponentCss$b(this.props.background, this.props.size, this.props.compact));
47
+ return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs(PScroller, { className: "scroller", compact: this.props.compact, ...(this.props.isTabList && { aria: { role: 'tablist' } }), children: [jsx("slot", {}), jsx("span", { className: "bar" })] })] }), manipulatedChildren] }));
48
48
  }
49
49
  }
50
50
 
@@ -13,14 +13,15 @@ import { PTabsBar } from '../components/tabs-bar.wrapper.mjs';
13
13
  */
14
14
  class DSRTabs extends Component {
15
15
  host;
16
- tabsItemElements = [];
16
+ tabsItems = [];
17
+ slot;
17
18
  render() {
18
19
  const { children, otherChildren } = splitChildren(this.props.children);
19
20
  const manipulatedChildren = children.map((child, i) => typeof child === 'object' && 'props' in child && otherChildren.includes(child)
20
21
  ? { ...child, props: { ...child.props, theme: this.props.theme, hidden: this.props.activeTabIndex !== i ? true : null } }
21
22
  : child);
22
23
  const style = minifyCss(getComponentCss$9());
23
- return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs(Fragment, { children: [jsx(PTabsBar, { className: "root", size: this.props.size, weight: this.props.weight, activeTabIndex: this.props.activeTabIndex, children: otherChildren.map((tab, index) => (jsx("button", { type: "button", children: typeof tab === 'object' && 'props' in tab && tab.props.label }, index))) }), jsx("slot", {})] })] }), manipulatedChildren] }));
24
+ return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs(Fragment, { children: [jsx(PTabsBar, { className: "root", size: this.props.size, background: this.props.background, compact: this.props.compact, activeTabIndex: this.props.activeTabIndex, children: otherChildren.map((tab, index) => (jsx("button", { type: "button", children: typeof tab === 'object' && 'props' in tab && tab.props.label }, index))) }), jsx("slot", {})] })] }), manipulatedChildren] }));
24
25
  }
25
26
  }
26
27
 
@@ -2,7 +2,7 @@ import type { BaseProps } from '../../BaseProps';
2
2
  import type { ScrollerAlignScrollIndicator, SelectedAriaAttributes, ScrollerAriaAttribute, ScrollerScrollToPosition } from '../types';
3
3
  export type PScrollerProps = BaseProps & {
4
4
  /**
5
- * Sets the vertical position of scroll indicator.
5
+ * @deprecated since v4.0.0, will be removed with next major release, has no effect anymore.
6
6
  */
7
7
  alignScrollIndicator?: ScrollerAlignScrollIndicator;
8
8
  /**
@@ -10,17 +10,25 @@ export type PScrollerProps = BaseProps & {
10
10
  */
11
11
  aria?: SelectedAriaAttributes<ScrollerAriaAttribute>;
12
12
  /**
13
- * Scrolls the scroll area to the left either smooth or immediately.
13
+ * Displays with reduced spacing and smaller padding for a more condensed layout.
14
+ */
15
+ compact?: boolean;
16
+ /**
17
+ * @deprecated since v4.0.0, use native `scrollIntoView()` on the slotted element itself.
14
18
  */
15
19
  scrollToPosition?: ScrollerScrollToPosition;
16
20
  /**
17
21
  * Specifies if scrollbar should be shown.
18
22
  */
19
23
  scrollbar?: boolean;
24
+ /**
25
+ * @experimental Makes the indicator sticky at the top or bottom while scrolling depending on the scroll direction.
26
+ */
27
+ sticky?: boolean;
20
28
  };
21
29
  export declare const PScroller: 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"> & {
22
30
  /**
23
- * Sets the vertical position of scroll indicator.
31
+ * @deprecated since v4.0.0, will be removed with next major release, has no effect anymore.
24
32
  */
25
33
  alignScrollIndicator?: ScrollerAlignScrollIndicator;
26
34
  /**
@@ -28,13 +36,21 @@ export declare const PScroller: import("react").ForwardRefExoticComponent<Omit<i
28
36
  */
29
37
  aria?: SelectedAriaAttributes<ScrollerAriaAttribute>;
30
38
  /**
31
- * Scrolls the scroll area to the left either smooth or immediately.
39
+ * Displays with reduced spacing and smaller padding for a more condensed layout.
40
+ */
41
+ compact?: boolean;
42
+ /**
43
+ * @deprecated since v4.0.0, use native `scrollIntoView()` on the slotted element itself.
32
44
  */
33
45
  scrollToPosition?: ScrollerScrollToPosition;
34
46
  /**
35
47
  * Specifies if scrollbar should be shown.
36
48
  */
37
49
  scrollbar?: boolean;
50
+ /**
51
+ * @experimental Makes the indicator sticky at the top or bottom while scrolling depending on the scroll direction.
52
+ */
53
+ sticky?: boolean;
38
54
  } & {
39
55
  children?: import("react").ReactNode | undefined;
40
56
  } & import("react").RefAttributes<HTMLElement>>;
@@ -6,7 +6,7 @@ export type PTableProps = BaseProps & {
6
6
  */
7
7
  caption?: string;
8
8
  /**
9
- * Displays as compact version.
9
+ * Displays with reduced spacing and smaller padding for a more condensed layout.
10
10
  */
11
11
  compact?: boolean;
12
12
  /**
@@ -17,6 +17,10 @@ export type PTableProps = BaseProps & {
17
17
  * Emitted when sorting is changed.
18
18
  */
19
19
  onUpdate?: (event: CustomEvent<TableUpdateEventDetail>) => void;
20
+ /**
21
+ * @experimental Makes the scroll indicator sticky at the top or bottom while scrolling depending on the scroll direction.
22
+ */
23
+ sticky?: boolean;
20
24
  };
21
25
  export declare const PTable: 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"> & {
22
26
  /**
@@ -24,7 +28,7 @@ export declare const PTable: import("react").ForwardRefExoticComponent<Omit<impo
24
28
  */
25
29
  caption?: string;
26
30
  /**
27
- * Displays as compact version.
31
+ * Displays with reduced spacing and smaller padding for a more condensed layout.
28
32
  */
29
33
  compact?: boolean;
30
34
  /**
@@ -35,6 +39,10 @@ export declare const PTable: import("react").ForwardRefExoticComponent<Omit<impo
35
39
  * Emitted when sorting is changed.
36
40
  */
37
41
  onUpdate?: (event: CustomEvent<TableUpdateEventDetail>) => void;
42
+ /**
43
+ * @experimental Makes the scroll indicator sticky at the top or bottom while scrolling depending on the scroll direction.
44
+ */
45
+ sticky?: boolean;
38
46
  } & {
39
47
  children?: import("react").ReactNode | undefined;
40
48
  } & import("react").RefAttributes<HTMLElement>>;
@@ -1,10 +1,18 @@
1
1
  import type { BaseProps } from '../../BaseProps';
2
- import type { TabsBarUpdateEventDetail, BreakpointCustomizable, TabsBarSize, TabsBarWeight } from '../types';
2
+ import type { TabsBarBackground, TabsBarUpdateEventDetail, BreakpointCustomizable, TabsBarSize, TabsBarWeight } from '../types';
3
3
  export type PTabsBarProps = BaseProps & {
4
4
  /**
5
5
  * Defines which tab to be visualized as selected (zero-based numbering), undefined if none should be selected.
6
6
  */
7
7
  activeTabIndex?: number | undefined;
8
+ /**
9
+ * Defines the background color. Use `frosted` only on images, videos or gradients.
10
+ */
11
+ background?: TabsBarBackground;
12
+ /**
13
+ * Displays with reduced spacing and smaller padding for a more condensed layout.
14
+ */
15
+ compact?: boolean;
8
16
  /**
9
17
  * Emitted when active tab is changed.
10
18
  */
@@ -14,7 +22,7 @@ export type PTabsBarProps = BaseProps & {
14
22
  */
15
23
  size?: BreakpointCustomizable<TabsBarSize>;
16
24
  /**
17
- * The text weight.
25
+ * @deprecated Will be removed in the next major release. Has no effect anymore.
18
26
  */
19
27
  weight?: TabsBarWeight;
20
28
  };
@@ -23,6 +31,14 @@ export declare const PTabsBar: import("react").ForwardRefExoticComponent<Omit<im
23
31
  * Defines which tab to be visualized as selected (zero-based numbering), undefined if none should be selected.
24
32
  */
25
33
  activeTabIndex?: number | undefined;
34
+ /**
35
+ * Defines the background color. Use `frosted` only on images, videos or gradients.
36
+ */
37
+ background?: TabsBarBackground;
38
+ /**
39
+ * Displays with reduced spacing and smaller padding for a more condensed layout.
40
+ */
41
+ compact?: boolean;
26
42
  /**
27
43
  * Emitted when active tab is changed.
28
44
  */
@@ -32,7 +48,7 @@ export declare const PTabsBar: import("react").ForwardRefExoticComponent<Omit<im
32
48
  */
33
49
  size?: BreakpointCustomizable<TabsBarSize>;
34
50
  /**
35
- * The text weight.
51
+ * @deprecated Will be removed in the next major release. Has no effect anymore.
36
52
  */
37
53
  weight?: TabsBarWeight;
38
54
  } & {
@@ -1,10 +1,18 @@
1
1
  import type { BaseProps } from '../../BaseProps';
2
- import type { TabsUpdateEventDetail, BreakpointCustomizable, TabsSize, TabsWeight } from '../types';
2
+ import type { TabsBackground, TabsUpdateEventDetail, BreakpointCustomizable, TabsSize, TabsWeight } from '../types';
3
3
  export type PTabsProps = BaseProps & {
4
4
  /**
5
5
  * Defines which tab to be visualized as selected (zero-based numbering).
6
6
  */
7
7
  activeTabIndex?: number;
8
+ /**
9
+ * Defines the background color. Use `frosted` only on images, videos or gradients.
10
+ */
11
+ background?: TabsBackground;
12
+ /**
13
+ * Displays with reduced spacing and smaller padding for a more condensed layout.
14
+ */
15
+ compact?: boolean;
8
16
  /**
9
17
  * Emitted when active tab is changed.
10
18
  */
@@ -14,7 +22,7 @@ export type PTabsProps = BaseProps & {
14
22
  */
15
23
  size?: BreakpointCustomizable<TabsSize>;
16
24
  /**
17
- * The text weight.
25
+ * @deprecated Will be removed in the next major release. Has no effect anymore.
18
26
  */
19
27
  weight?: TabsWeight;
20
28
  };
@@ -23,6 +31,14 @@ export declare const PTabs: import("react").ForwardRefExoticComponent<Omit<impor
23
31
  * Defines which tab to be visualized as selected (zero-based numbering).
24
32
  */
25
33
  activeTabIndex?: number;
34
+ /**
35
+ * Defines the background color. Use `frosted` only on images, videos or gradients.
36
+ */
37
+ background?: TabsBackground;
38
+ /**
39
+ * Displays with reduced spacing and smaller padding for a more condensed layout.
40
+ */
41
+ compact?: boolean;
26
42
  /**
27
43
  * Emitted when active tab is changed.
28
44
  */
@@ -32,7 +48,7 @@ export declare const PTabs: import("react").ForwardRefExoticComponent<Omit<impor
32
48
  */
33
49
  size?: BreakpointCustomizable<TabsSize>;
34
50
  /**
35
- * The text weight.
51
+ * @deprecated Will be removed in the next major release. Has no effect anymore.
36
52
  */
37
53
  weight?: TabsWeight;
38
54
  } & {
@@ -4,9 +4,11 @@ import { Component } from 'react';
4
4
  */
5
5
  export declare class DSRScroller extends Component<any> {
6
6
  host: HTMLElement;
7
- private isPrevHidden;
8
- private isNextHidden;
7
+ private isIndicatorPrevVisible;
8
+ private isIndicatorNextVisible;
9
9
  private intersectionObserver;
10
- private scrollAreaElement;
10
+ private scrollArea;
11
+ private sentinelLeft;
12
+ private sentinelRight;
11
13
  render(): JSX.Element;
12
14
  }
@@ -4,8 +4,9 @@ import { Component } from 'react';
4
4
  */
5
5
  export declare class DSRStepperHorizontal extends Component<any> {
6
6
  host: HTMLElement;
7
+ private scroller;
7
8
  private stepperHorizontalItems;
8
- private scrollerElement;
9
- private currentStepIndex;
9
+ private slot;
10
+ private resizeObserver;
10
11
  render(): JSX.Element;
11
12
  }
@@ -6,12 +6,12 @@ import { Component } from 'react';
6
6
  */
7
7
  export declare class DSRTabsBar extends Component<any> {
8
8
  host: HTMLElement;
9
- private tabElements;
10
- private internalTabIndex;
11
- private barElement;
12
- private scrollerElement;
13
- private direction;
9
+ private tabs;
10
+ private bar;
11
+ private scroller;
12
+ private slot;
14
13
  private hasPTabsParent;
15
- private areTabsButtons;
14
+ private isTabList;
15
+ private resizeObserver;
16
16
  render(): JSX.Element;
17
17
  }
@@ -6,6 +6,7 @@ import { Component } from 'react';
6
6
  */
7
7
  export declare class DSRTabs extends Component<any> {
8
8
  host: HTMLElement;
9
- private tabsItemElements;
9
+ private tabsItems;
10
+ private slot;
10
11
  render(): JSX.Element;
11
12
  }