@porsche-design-system/components-react 4.0.0-beta.0 → 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 (71) hide show
  1. package/CHANGELOG.md +242 -7
  2. package/cjs/lib/components/accordion.wrapper.cjs +3 -3
  3. package/cjs/lib/components/scroller.wrapper.cjs +3 -3
  4. package/cjs/lib/components/table.wrapper.cjs +3 -3
  5. package/cjs/lib/components/tabs-bar.wrapper.cjs +3 -3
  6. package/cjs/lib/components/tabs.wrapper.cjs +3 -3
  7. package/esm/lib/components/accordion.wrapper.d.ts +29 -13
  8. package/esm/lib/components/accordion.wrapper.mjs +3 -3
  9. package/esm/lib/components/scroller.wrapper.d.ts +20 -4
  10. package/esm/lib/components/scroller.wrapper.mjs +3 -3
  11. package/esm/lib/components/table.wrapper.d.ts +10 -2
  12. package/esm/lib/components/table.wrapper.mjs +3 -3
  13. package/esm/lib/components/tabs-bar.wrapper.d.ts +19 -3
  14. package/esm/lib/components/tabs-bar.wrapper.mjs +3 -3
  15. package/esm/lib/components/tabs.wrapper.d.ts +19 -3
  16. package/esm/lib/components/tabs.wrapper.mjs +3 -3
  17. package/esm/lib/types.d.ts +137 -105
  18. package/package.json +13 -2
  19. package/ssr/cjs/components/dist/styles/esm/styles-entry.cjs +691 -384
  20. package/ssr/cjs/components/dist/utils/esm/utils-entry.cjs +3 -12
  21. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/accordion.wrapper.cjs +4 -4
  22. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/scroller.wrapper.cjs +4 -4
  23. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/table.wrapper.cjs +4 -4
  24. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/tabs-bar.wrapper.cjs +4 -4
  25. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/tabs.wrapper.cjs +4 -4
  26. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/accordion.cjs +15 -10
  27. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-base.cjs +2 -1
  28. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-date.cjs +1 -1
  29. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-month.cjs +1 -1
  30. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-password.cjs +1 -1
  31. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-time.cjs +1 -1
  32. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-week.cjs +1 -1
  33. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pin-code.cjs +1 -1
  34. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/scroller.cjs +8 -11
  35. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-option.cjs +1 -1
  36. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/stepper-horizontal.cjs +3 -2
  37. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/table.cjs +1 -1
  38. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs-bar.cjs +8 -8
  39. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs.cjs +3 -2
  40. package/ssr/esm/components/dist/styles/esm/styles-entry.mjs +691 -384
  41. package/ssr/esm/components/dist/utils/esm/utils-entry.mjs +4 -11
  42. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/accordion.wrapper.mjs +4 -4
  43. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/scroller.wrapper.mjs +4 -4
  44. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/table.wrapper.mjs +4 -4
  45. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/tabs-bar.wrapper.mjs +4 -4
  46. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/tabs.wrapper.mjs +4 -4
  47. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/accordion.mjs +15 -10
  48. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-base.mjs +2 -1
  49. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-date.mjs +1 -1
  50. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-month.mjs +1 -1
  51. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-password.mjs +1 -1
  52. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-time.mjs +1 -1
  53. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-week.mjs +1 -1
  54. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pin-code.mjs +1 -1
  55. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/scroller.mjs +9 -12
  56. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-option.mjs +1 -1
  57. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/stepper-horizontal.mjs +3 -2
  58. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/table.mjs +1 -1
  59. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs-bar.mjs +8 -8
  60. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs.mjs +3 -2
  61. package/ssr/esm/lib/components/accordion.wrapper.d.ts +29 -13
  62. package/ssr/esm/lib/components/scroller.wrapper.d.ts +20 -4
  63. package/ssr/esm/lib/components/table.wrapper.d.ts +10 -2
  64. package/ssr/esm/lib/components/tabs-bar.wrapper.d.ts +19 -3
  65. package/ssr/esm/lib/components/tabs.wrapper.d.ts +19 -3
  66. package/ssr/esm/lib/dsr-components/accordion.d.ts +8 -2
  67. package/ssr/esm/lib/dsr-components/scroller.d.ts +5 -3
  68. package/ssr/esm/lib/dsr-components/stepper-horizontal.d.ts +3 -2
  69. package/ssr/esm/lib/dsr-components/tabs-bar.d.ts +6 -6
  70. package/ssr/esm/lib/dsr-components/tabs.d.ts +2 -1
  71. package/ssr/esm/lib/types.d.ts +137 -105
@@ -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.0"}]` // 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,21 +5,21 @@ import { useEventCallback, usePrefix, useBrowserLayoutEffect, useMergedClass } f
5
5
  import { syncRef } from '../../utils.mjs';
6
6
  import { DSRAccordion } from '../dsr-components/accordion.mjs';
7
7
 
8
- const PAccordion = /*#__PURE__*/ forwardRef(({ compact, heading, headingTag = 'h2', onUpdate, open, size = 'small', sticky, className, children, ...rest }, ref) => {
8
+ const PAccordion = /*#__PURE__*/ forwardRef(({ alignMarker = 'end', background = 'none', compact, heading, headingTag = 'h2', onUpdate, open, size = 'small', sticky, className, children, ...rest }, ref) => {
9
9
  const elementRef = useRef(undefined);
10
10
  useEventCallback(elementRef, 'update', onUpdate);
11
11
  const WebComponentTag = usePrefix('p-accordion');
12
- const propsToSync = [compact, heading, headingTag, open, size, sticky];
12
+ const propsToSync = [alignMarker, background, compact, heading, headingTag, open, size, sticky];
13
13
  useBrowserLayoutEffect(() => {
14
14
  const { current } = elementRef;
15
- ['compact', 'heading', 'headingTag', 'open', 'size', 'sticky'].forEach((propName, i) => (current[propName] = propsToSync[i]));
15
+ ['alignMarker', 'background', 'compact', 'heading', 'headingTag', 'open', 'size', '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(DSRAccordion, { compact, heading, headingTag, open, size, sticky, children })),
22
+ children: (jsx(DSRAccordion, { alignMarker, background, compact, heading, headingTag, open, size, sticky, children })),
23
23
  }
24
24
  : {
25
25
  children,
@@ -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,26 +1,31 @@
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 { getAccordionCss as getComponentCss$19 } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
7
- import { PIcon } from '../components/icon.wrapper.mjs';
8
6
 
9
7
  /**
10
- * @slot {"name": "heading", "description": "Defines the heading used in the accordion. Can be used alternatively to the heading prop. Please **refrain** from using any other than text content as slotted markup." }
11
- * @slot {"name": "", "description": "Default slot for the main content" }
8
+ * @slot {"name": "summary", "description": "Content for the accordion's summary section. Clicking toggles the accordion open and closed." }
9
+ * @slot {"name": "summary-before", "description": "Content or interactive elements placed before the accordion's summary section." }
10
+ * @slot {"name": "summary-after", "description": "Content or interactive elements placed after the accordion's summary section." }
11
+ * @slot {"name": "heading", "description": "Content for the accordion's heading section. Clicking toggles the accordion open and closed.", "isDeprecated": true }
12
+ * @slot {"name": "", "description": "Main content displayed when the accordion is expanded." }
12
13
  *
13
14
  * @controlled {"props": ["open"], "event": "update"}
14
15
  */
15
16
  class DSRAccordion extends Component {
16
17
  host;
18
+ hasSummary;
19
+ hasSummaryBefore;
20
+ hasSummaryAfter;
17
21
  render() {
18
- splitChildren(this.props.children);
19
- const buttonId = 'accordion-control';
20
- const contentId = 'accordion-panel';
22
+ const { namedSlotChildren} = splitChildren(this.props.children);
23
+ const hasSummary = namedSlotChildren.filter(({ props: { slot } }) => slot === 'summary').length > 0;
24
+ const hasSummaryBefore = namedSlotChildren.filter(({ props: { slot } }) => slot === 'summary-before').length > 0;
25
+ const hasSummaryAfter = namedSlotChildren.filter(({ props: { slot } }) => slot === 'summary-after').length > 0;
21
26
  const Heading = this.props.headingTag;
22
- const style = minifyCss(getComponentCss$19(this.props.size, this.props.compact, this.props.open, this.props.sticky));
23
- return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs(Fragment, { children: [jsx(Heading, { className: "heading", children: jsxs("button", { id: buttonId, type: "button", "aria-expanded": this.props.open ? 'true' : 'false', "aria-controls": contentId, children: [this.props.heading || jsx("slot", { name: "heading" }), jsx("span", { className: "icon-container", children: jsx(PIcon, { className: "icon", name: this.props.open ? 'minus' : 'plus', size: "xx-small", "aria-hidden": "true" }) })] }) }), jsx("div", { id: contentId, className: "collapsible", role: "region", "aria-labelledby": buttonId, children: jsx("div", { children: jsx("slot", {}) }) })] })] }), this.props.children] }));
27
+ const style = minifyCss(getComponentCss$19(this.props.alignMarker, this.props.background, this.props.compact, this.props.open, this.props.sticky, hasSummaryBefore, hasSummaryAfter, this.props.size));
28
+ return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs("details", { ...(this.props.open ? { open: true } : {}), children: [jsx("summary", { children: hasSummary ? jsx("slot", { name: "summary" }) : jsx(Heading, { children: this.props.heading || jsx("slot", { name: "heading" }) }) }), hasSummaryBefore && jsx("slot", { name: "summary-before" }), hasSummaryAfter && jsx("slot", { name: "summary-after" }), jsx("div", { children: jsx("slot", {}) })] })] }), this.props.children] }));
24
29
  }
25
30
  }
26
31
 
@@ -19,7 +19,8 @@ id, label, description, loading, initialLoading, required, disabled, state, mess
19
19
  // refElement,
20
20
  start, end, }) => {
21
21
  const { namedSlotChildren } = splitChildren(children);
22
- return (jsxs("div", { className: "root", children: [jsx(Label, { hasLabel: !!label || namedSlotChildren.filter(({ props: { slot } }) => slot === 'label').length > 0, hasDescription: !!description || namedSlotChildren.filter(({ props: { slot } }) => slot === 'description').length > 0, host: null, label: label, description: description, htmlFor: id, isRequired: required, isLoading: loading, isDisabled: disabled }), jsxs("div", { className: "wrapper", children: [jsx("slot", { name: "start" }), start, jsx("input", { "aria-describedby": loading ? loadingId : `${descriptionId} ${messageId}`, "aria-invalid": state === 'error' ? 'true' : null, "aria-disabled": disabled || loading ? 'true' : null, "aria-readonly": readOnly ? 'true' : null, id: id, name: name, form: form, type: type, required: required, placeholder: placeholder, maxLength: maxLength, minLength: minLength, spellCheck: spellCheck, max: max, min: min, step: step, defaultValue: value, readOnly: readOnly, autoComplete: autoComplete, disabled: disabled, pattern: pattern, multiple: multiple }), end, jsx("slot", { name: "end" }), loading && jsx(PSpinner, { className: "spinner", size: "inherit", "aria-hidden": "true" })] }), jsx(StateMessage, { hasMessage: (message || namedSlotChildren.filter(({ props: { slot } }) => slot === 'message').length > 0) && ['success', 'error'].includes(state), state: state, message: message, host: null }), jsx(LoadingMessage, { loading: loading, initialLoading: initialLoading })] }));
22
+ return (jsxs("div", { className: "root", children: [jsx(Label, { hasLabel: !!label || namedSlotChildren.filter(({ props: { slot } }) => slot === 'label').length > 0, hasDescription: !!description || namedSlotChildren.filter(({ props: { slot } }) => slot === 'description').length > 0, host: null, label: label, description: description, htmlFor: id, isRequired: required, isLoading: loading, isDisabled: disabled }), jsxs("div", { className: "wrapper", children: [jsx("slot", { name: "start" }), start, jsx("input", { "aria-describedby": loading ? loadingId : `${descriptionId} ${messageId}`, "aria-invalid": state === 'error' ? 'true' : null, "aria-disabled": disabled || loading ? 'true' : null, "aria-readonly": readOnly ? 'true' : null, id: id, name: name, form: form, type: type, required: required, placeholder: placeholder || null, maxLength: maxLength, minLength: minLength, spellCheck: spellCheck, max: max, min: min, step: step, defaultValue: value, readOnly: readOnly, autoComplete: autoComplete, disabled: disabled, pattern: pattern, multiple: multiple, dir: "auto" // This overwrites the default: let the browser now decide in which direction the value should be placed.
23
+ }), end, jsx("slot", { name: "end" }), loading && jsx(PSpinner, { className: "spinner", size: "inherit", "aria-hidden": "true" })] }), jsx(StateMessage, { hasMessage: (message || namedSlotChildren.filter(({ props: { slot } }) => slot === 'message').length > 0) && ['success', 'error'].includes(state), state: state, message: message, host: null }), jsx(LoadingMessage, { loading: loading, initialLoading: initialLoading })] }));
23
24
  };
24
25
 
25
26
  export { InputBase };
@@ -36,7 +36,7 @@ class DSRInputDate extends Component {
36
36
  splitChildren(this.props.children);
37
37
  const style = minifyCss(getComponentCss$R(this.props.disabled, this.props.loading, this.props.hideLabel, this.props.state, this.props.compact, this.props.readOnly));
38
38
  return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsx(InputBase, { children: this.props.children, host: null, label: this.props.label, description: this.props.description, id: "input-date", name: this.props.name, form: this.props.form, type: "date", required: this.props.required, max: this.props.max, min: this.props.min, value: this.props.value, readOnly: this.props.readOnly, autoComplete: this.props.autoComplete, disabled: this.props.disabled, state: this.props.state, message: this.props.message, step: this.props.step, loading: this.props.loading, initialLoading: this.props.initialLoading, ...(hasShowPickerSupport() && {
39
- end: (jsx(PButtonPure, { hideLabel: true, className: "button", type: "button", icon: "calendar", disabled: this.props.disabled || this.props.readOnly, children: "Open date picker" })),
39
+ end: (jsx(PButtonPure, { tabIndex: this.props.disabled ? -1 : null, hideLabel: true, className: "button", type: "button", icon: "calendar", disabled: this.props.disabled || this.props.readOnly, children: "Open date picker" })),
40
40
  }) })] }), this.props.children] }));
41
41
  }
42
42
  }
@@ -36,7 +36,7 @@ class DSRInputMonth extends Component {
36
36
  splitChildren(this.props.children);
37
37
  const style = minifyCss(getComponentCss$P(this.props.disabled, this.props.loading, this.props.hideLabel, this.props.state, this.props.compact, this.props.readOnly));
38
38
  return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsx(InputBase, { children: this.props.children, host: null, label: this.props.label, description: this.props.description, id: "input-month", name: this.props.name, form: this.props.form, type: "month", required: this.props.required, max: this.props.max, min: this.props.min, value: this.props.value, readOnly: this.props.readOnly, autoComplete: this.props.autoComplete, disabled: this.props.disabled, state: this.props.state, message: this.props.message, step: this.props.step, loading: this.props.loading, initialLoading: this.props.initialLoading, ...(hasShowPickerSupport() && {
39
- end: (jsx(PButtonPure, { hideLabel: true, className: "button", type: "button", icon: "calendar", disabled: this.props.disabled || this.props.readOnly, children: "Open date picker" })),
39
+ end: (jsx(PButtonPure, { tabIndex: this.props.disabled ? -1 : null, hideLabel: true, className: "button", type: "button", icon: "calendar", disabled: this.props.disabled || this.props.readOnly, children: "Open date picker" })),
40
40
  }) })] }), this.props.children] }));
41
41
  }
42
42
  }
@@ -35,7 +35,7 @@ class DSRInputPassword extends Component {
35
35
  render() {
36
36
  splitChildren(this.props.children);
37
37
  const style = minifyCss(getComponentCss$N(this.props.disabled, this.props.loading, this.props.hideLabel, this.props.state, this.props.toggle, this.props.compact, this.props.readOnly));
38
- return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsx(InputBase, { children: this.props.children, host: null, label: this.props.label, description: this.props.description, id: "input-password", name: this.props.name, form: this.props.form, type: this.props.showPassword ? 'text' : 'password', required: this.props.required, placeholder: this.props.placeholder, maxLength: this.props.maxLength, minLength: this.props.minLength, value: this.props.value, readOnly: this.props.readOnly, autoComplete: this.props.autoComplete, disabled: this.props.disabled, state: this.props.state, message: this.props.message, loading: this.props.loading, initialLoading: this.props.initialLoading, end: this.props.toggle && (jsx(PButtonPure, { hideLabel: true, className: "button", type: "button", icon: this.props.showPassword ? 'view-off' : 'view', disabled: this.props.disabled, aria: { 'aria-pressed': this.props.showPassword ? 'true' : 'false' }, children: "Toggle password visibility" })) })] }), this.props.children] }));
38
+ return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsx(InputBase, { children: this.props.children, host: null, label: this.props.label, description: this.props.description, id: "input-password", name: this.props.name, form: this.props.form, type: this.props.showPassword ? 'text' : 'password', required: this.props.required, placeholder: this.props.placeholder, maxLength: this.props.maxLength, minLength: this.props.minLength, value: this.props.value, readOnly: this.props.readOnly, autoComplete: this.props.autoComplete, disabled: this.props.disabled, state: this.props.state, message: this.props.message, loading: this.props.loading, initialLoading: this.props.initialLoading, end: this.props.toggle && (jsx(PButtonPure, { tabIndex: this.props.disabled ? -1 : null, hideLabel: true, className: "button", type: "button", icon: this.props.showPassword ? 'view-off' : 'view', disabled: this.props.disabled, aria: { 'aria-pressed': this.props.showPassword ? 'true' : 'false' }, children: "Toggle password visibility" })) })] }), this.props.children] }));
39
39
  }
40
40
  }
41
41
 
@@ -36,7 +36,7 @@ class DSRInputTime extends Component {
36
36
  splitChildren(this.props.children);
37
37
  const style = minifyCss(getComponentCss$J(this.props.disabled, this.props.loading, this.props.hideLabel, this.props.state, this.props.compact, this.props.readOnly));
38
38
  return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsx(InputBase, { children: this.props.children, host: null, label: this.props.label, description: this.props.description, id: "input-time", name: this.props.name, form: this.props.form, type: "time", required: this.props.required, max: this.props.max, min: this.props.min, value: this.props.value, readOnly: this.props.readOnly, autoComplete: this.props.autoComplete, disabled: this.props.disabled, state: this.props.state, message: this.props.message, step: this.props.step, loading: this.props.loading, initialLoading: this.props.initialLoading, ...(hasShowPickerSupport() && {
39
- end: (jsx(PButtonPure, { hideLabel: true, className: "button", type: "button", icon: "clock", disabled: this.props.disabled || this.props.readOnly, children: "Open time picker" })),
39
+ end: (jsx(PButtonPure, { tabIndex: this.props.disabled ? -1 : null, hideLabel: true, className: "button", type: "button", icon: "clock", disabled: this.props.disabled || this.props.readOnly, children: "Open time picker" })),
40
40
  }) })] }), this.props.children] }));
41
41
  }
42
42
  }
@@ -36,7 +36,7 @@ class DSRInputWeek extends Component {
36
36
  splitChildren(this.props.children);
37
37
  const style = minifyCss(getComponentCss$H(this.props.disabled, this.props.loading, this.props.hideLabel, this.props.state, this.props.compact, this.props.readOnly));
38
38
  return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsx(InputBase, { children: this.props.children, host: null, label: this.props.label, description: this.props.description, id: "input-week", name: this.props.name, form: this.props.form, type: "week", required: this.props.required, max: this.props.max, min: this.props.min, value: this.props.value, readOnly: this.props.readOnly, autoComplete: this.props.autoComplete, disabled: this.props.disabled, state: this.props.state, message: this.props.message, step: this.props.step, loading: this.props.loading, initialLoading: this.props.initialLoading, ...(hasShowPickerSupport() && {
39
- end: (jsx(PButtonPure, { hideLabel: true, className: "button", type: "button", icon: "calendar", disabled: this.props.disabled || this.props.readOnly, children: "Open date picker" })),
39
+ end: (jsx(PButtonPure, { tabIndex: this.props.disabled ? -1 : null, hideLabel: true, className: "button", type: "button", icon: "calendar", disabled: this.props.disabled || this.props.readOnly, children: "Open date picker" })),
40
40
  }) })] }), this.props.children] }));
41
41
  }
42
42
  }
@@ -40,7 +40,7 @@ class DSRPinCode extends Component {
40
40
  this.inputElements = [];
41
41
  const currentInputId = 'current-input';
42
42
  const style = minifyCss(getComponentCss$w(this.props.hideLabel, this.props.state, this.props.disabled, this.props.loading, this.props.length, this.props.compact));
43
- return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs("fieldset", { className: "root", disabled: this.props.disabled, ...getFieldsetAriaAttributes(this.props.required, this.props.state === 'error'), "aria-describedby": this.props.loading ? loadingId : `${descriptionId} ${messageId}`, "aria-labelledby": labelId, children: [jsx(Label, { hasLabel: this.props.label || namedSlotChildren.filter(({ props: { slot } }) => slot === 'label').length > 0, hasDescription: this.props.description || namedSlotChildren.filter(({ props: { slot } }) => slot === 'description').length > 0, host: null, label: this.props.label, description: this.props.description, htmlFor: currentInputId, isRequired: this.props.required, isLoading: this.props.loading, isDisabled: this.props.disabled }), jsxs("div", { className: "wrapper", children: [Array.from(new Array(this.props.length), (_, index) => (jsx("input", { name: this.props.name, form: this.props.form, ...(isCurrentInput(index, this.props.value, this.props.length) && { id: currentInputId }), 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-disabled": this.props.loading ? 'true' : null, autoComplete: "one-time-code", pattern: "\\d*", inputMode: "numeric" // get numeric keyboard on mobile
43
+ return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs("fieldset", { className: "root", disabled: this.props.disabled, ...getFieldsetAriaAttributes(this.props.required, this.props.state === 'error'), "aria-describedby": this.props.loading ? loadingId : `${descriptionId} ${messageId}`, "aria-labelledby": labelId, children: [jsx(Label, { hasLabel: this.props.label || namedSlotChildren.filter(({ props: { slot } }) => slot === 'label').length > 0, hasDescription: this.props.description || namedSlotChildren.filter(({ props: { slot } }) => slot === 'description').length > 0, host: null, label: this.props.label, description: this.props.description, htmlFor: currentInputId, isRequired: this.props.required, isLoading: this.props.loading, isDisabled: this.props.disabled }), jsxs("div", { className: "wrapper", dir: "ltr", children: [Array.from(new Array(this.props.length), (_, index) => (jsx("input", { name: this.props.name, form: this.props.form, ...(isCurrentInput(index, this.props.value, this.props.length) && { id: currentInputId }), 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-disabled": this.props.loading ? 'true' : null, autoComplete: "one-time-code", pattern: "\\d*", inputMode: "numeric" // get numeric keyboard on mobile
44
44
  , defaultValue: this.props.value[index] === ' ' ? null : this.props.value[index], disabled: this.props.disabled, required: this.props.required, onBlur: this.props.onInputBlur }, index))), this.props.loading && jsx(PSpinner, { className: "spinner", size: "inherit", "aria-hidden": "true" })] }), jsx(StateMessage, { hasMessage: (this.props.message || namedSlotChildren.filter(({ props: { slot } }) => slot === 'message').length > 0) && ['success', 'error'].includes(this.props.state), state: this.props.state, message: this.props.message, host: null }), jsx(LoadingMessage, { loading: this.props.loading, initialLoading: this.props.initialLoading })] })] }), this.props.children] }));
45
45
  }
46
46
  }
@@ -1,28 +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, children: direction }) }, direction));
23
- };
24
- const style = minifyCss(getComponentCss$s(this.isNextHidden, this.isPrevHidden, this.props.alignScrollIndicator, this.props.scrollbar));
25
- 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] }));
26
23
  }
27
24
  }
28
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
 
@@ -1,16 +1,24 @@
1
1
  import type { BaseProps } from '../../BaseProps';
2
- import type { AccordionHeadingTag, AccordionUpdateEventDetail, BreakpointCustomizable, AccordionSize } from '../types';
2
+ import type { AccordionAlignMarker, AccordionBackground, AccordionHeadingTag, AccordionUpdateEventDetail, BreakpointCustomizable, AccordionSize } from '../types';
3
3
  export type PAccordionProps = BaseProps & {
4
4
  /**
5
- * Displays the Accordion as compact version with thinner border and smaller paddings.
5
+ * Aligns the marker within the summary section.
6
+ */
7
+ alignMarker?: AccordionAlignMarker;
8
+ /**
9
+ * Defines the background color. Use `frosted` only on images, videos or gradients.
10
+ */
11
+ background?: AccordionBackground;
12
+ /**
13
+ * Displays the accordion in compact mode.
6
14
  */
7
15
  compact?: boolean;
8
16
  /**
9
- * Defines the heading used in accordion.
17
+ * @deprecated , will be removed in the next major release. Use the `summary` slot instead. Sets the heading text within the summary section.
10
18
  */
11
19
  heading?: string;
12
20
  /**
13
- * Sets a heading tag, so it fits correctly within the outline of the page.
21
+ * @deprecated , will be removed in the next major release. Use the `summary` slot instead. Sets the heading tag for proper semantic structure within the page.
14
22
  */
15
23
  headingTag?: AccordionHeadingTag;
16
24
  /**
@@ -18,29 +26,37 @@ export type PAccordionProps = BaseProps & {
18
26
  */
19
27
  onUpdate?: (event: CustomEvent<AccordionUpdateEventDetail>) => void;
20
28
  /**
21
- * Defines if accordion is open.
29
+ * Controls whether the accordion is open or closed.
22
30
  */
23
31
  open?: boolean;
24
32
  /**
25
- * The text size.
33
+ * @deprecated , will be removed in the next major release. Use the `summary` slot instead. Controls the heading size in the summary section (only applies when using the `heading` prop or `heading` slot).
26
34
  */
27
35
  size?: BreakpointCustomizable<AccordionSize>;
28
36
  /**
29
- * @experimental Sticks the Accordion heading at the top, fixed while scrolling
37
+ * @experimental Makes the summary section sticky at the top while scrolling. Only works with `background="canvas"` or `background="surface"`. Not compatible with `summary-before` or `summary-after` slots.
30
38
  */
31
39
  sticky?: boolean;
32
40
  };
33
41
  export declare const PAccordion: 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"> & {
34
42
  /**
35
- * Displays the Accordion as compact version with thinner border and smaller paddings.
43
+ * Aligns the marker within the summary section.
44
+ */
45
+ alignMarker?: AccordionAlignMarker;
46
+ /**
47
+ * Defines the background color. Use `frosted` only on images, videos or gradients.
48
+ */
49
+ background?: AccordionBackground;
50
+ /**
51
+ * Displays the accordion in compact mode.
36
52
  */
37
53
  compact?: boolean;
38
54
  /**
39
- * Defines the heading used in accordion.
55
+ * @deprecated , will be removed in the next major release. Use the `summary` slot instead. Sets the heading text within the summary section.
40
56
  */
41
57
  heading?: string;
42
58
  /**
43
- * Sets a heading tag, so it fits correctly within the outline of the page.
59
+ * @deprecated , will be removed in the next major release. Use the `summary` slot instead. Sets the heading tag for proper semantic structure within the page.
44
60
  */
45
61
  headingTag?: AccordionHeadingTag;
46
62
  /**
@@ -48,15 +64,15 @@ export declare const PAccordion: import("react").ForwardRefExoticComponent<Omit<
48
64
  */
49
65
  onUpdate?: (event: CustomEvent<AccordionUpdateEventDetail>) => void;
50
66
  /**
51
- * Defines if accordion is open.
67
+ * Controls whether the accordion is open or closed.
52
68
  */
53
69
  open?: boolean;
54
70
  /**
55
- * The text size.
71
+ * @deprecated , will be removed in the next major release. Use the `summary` slot instead. Controls the heading size in the summary section (only applies when using the `heading` prop or `heading` slot).
56
72
  */
57
73
  size?: BreakpointCustomizable<AccordionSize>;
58
74
  /**
59
- * @experimental Sticks the Accordion heading at the top, fixed while scrolling
75
+ * @experimental Makes the summary section sticky at the top while scrolling. Only works with `background="canvas"` or `background="surface"`. Not compatible with `summary-before` or `summary-after` slots.
60
76
  */
61
77
  sticky?: boolean;
62
78
  } & {