@porsche-design-system/components-react 3.0.0-rc.0 → 3.0.0-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/CHANGELOG.md +87 -25
  2. package/bin/patchRemixRunProcessBrowserGlobalIdentifier.js +35 -26
  3. package/esm/lib/components/checkbox-wrapper.wrapper.js +3 -3
  4. package/esm/lib/components/icon.wrapper.js +1 -1
  5. package/esm/lib/components/scroller.wrapper.js +3 -3
  6. package/lib/components/checkbox-wrapper.wrapper.d.ts +8 -0
  7. package/lib/components/checkbox-wrapper.wrapper.js +3 -3
  8. package/lib/components/icon.wrapper.js +1 -1
  9. package/lib/components/scroller.wrapper.d.ts +15 -7
  10. package/lib/components/scroller.wrapper.js +3 -3
  11. package/lib/types.d.ts +219 -191
  12. package/package.json +2 -2
  13. package/ssr/components/dist/styles/esm/styles-entry.js +408 -266
  14. package/ssr/components/dist/utils/esm/utils-entry.js +90 -83
  15. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/checkbox-wrapper.wrapper.js +4 -4
  16. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/icon.wrapper.js +1 -1
  17. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/scroller.wrapper.js +4 -4
  18. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/select-wrapper-dropdown.wrapper.js +38 -0
  19. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/stepper-horizontal.wrapper.js +0 -1
  20. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/accordion.js +1 -2
  21. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox-wrapper.js +62 -2
  22. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/crest.js +2 -1
  23. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-tile-model-signature.js +1 -1
  24. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/model-signature.js +1 -1
  25. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/scroller.js +2 -1
  26. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-wrapper-dropdown.js +34 -0
  27. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-wrapper.js +6 -3
  28. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/stepper-horizontal.js +1 -1
  29. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs-bar.js +1 -1
  30. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/text-field-wrapper.js +1 -1
  31. package/ssr/esm/components/dist/styles/esm/styles-entry.js +408 -267
  32. package/ssr/esm/components/dist/utils/esm/utils-entry.js +82 -83
  33. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/checkbox-wrapper.wrapper.js +4 -4
  34. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/icon.wrapper.js +1 -1
  35. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/scroller.wrapper.js +4 -4
  36. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/select-wrapper-dropdown.wrapper.js +36 -0
  37. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/stepper-horizontal.wrapper.js +0 -1
  38. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/accordion.js +1 -2
  39. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox-wrapper.js +62 -2
  40. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/crest.js +3 -2
  41. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-tile-model-signature.js +1 -1
  42. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/model-signature.js +2 -2
  43. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/scroller.js +3 -2
  44. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-wrapper-dropdown.js +32 -0
  45. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-wrapper.js +6 -3
  46. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/stepper-horizontal.js +1 -1
  47. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs-bar.js +1 -1
  48. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/text-field-wrapper.js +1 -1
  49. package/ssr/lib/components/checkbox-wrapper.wrapper.d.ts +8 -0
  50. package/ssr/lib/components/scroller.wrapper.d.ts +15 -7
  51. package/ssr/lib/components/select-wrapper-dropdown.wrapper.d.ts +30 -0
  52. package/ssr/lib/dsr-components/select-wrapper.d.ts +0 -1
  53. package/ssr/lib/types.d.ts +219 -191
@@ -1,4 +1,64 @@
1
1
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
2
+ import '../components/accordion.wrapper.js';
3
+ import '../components/banner.wrapper.js';
4
+ import '../components/button.wrapper.js';
5
+ import '../components/button-group.wrapper.js';
6
+ import '../components/button-pure.wrapper.js';
7
+ import '../components/button-tile.wrapper.js';
8
+ import '../components/carousel.wrapper.js';
9
+ import '../components/checkbox-wrapper.wrapper.js';
10
+ import '../components/content-wrapper.wrapper.js';
11
+ import '../components/crest.wrapper.js';
12
+ import '../components/display.wrapper.js';
13
+ import '../components/divider.wrapper.js';
14
+ import '../components/fieldset.wrapper.js';
15
+ import '../components/fieldset-wrapper.wrapper.js';
16
+ import '../components/flex.wrapper.js';
17
+ import '../components/flex-item.wrapper.js';
18
+ import '../components/grid.wrapper.js';
19
+ import '../components/grid-item.wrapper.js';
20
+ import '../components/heading.wrapper.js';
21
+ import '../components/headline.wrapper.js';
22
+ import '../components/icon.wrapper.js';
23
+ import '../components/inline-notification.wrapper.js';
24
+ import '../components/link.wrapper.js';
25
+ import '../components/link-pure.wrapper.js';
26
+ import '../components/link-social.wrapper.js';
27
+ import '../components/link-tile.wrapper.js';
28
+ import '../components/link-tile-model-signature.wrapper.js';
29
+ import '../components/marque.wrapper.js';
30
+ import '../components/modal.wrapper.js';
31
+ import '../components/model-signature.wrapper.js';
32
+ import '../components/pagination.wrapper.js';
33
+ import '../components/popover.wrapper.js';
34
+ import '../components/radio-button-wrapper.wrapper.js';
35
+ import '../components/scroller.wrapper.js';
36
+ import '../components/segmented-control.wrapper.js';
37
+ import '../components/segmented-control-item.wrapper.js';
38
+ import '../components/select-wrapper.wrapper.js';
39
+ import { PSpinner } from '../components/spinner.wrapper.js';
40
+ import '../components/stepper-horizontal.wrapper.js';
41
+ import '../components/stepper-horizontal-item.wrapper.js';
42
+ import '../components/switch.wrapper.js';
43
+ import '../components/table.wrapper.js';
44
+ import '../components/table-body.wrapper.js';
45
+ import '../components/table-cell.wrapper.js';
46
+ import '../components/table-head.wrapper.js';
47
+ import '../components/table-head-cell.wrapper.js';
48
+ import '../components/table-head-row.wrapper.js';
49
+ import '../components/table-row.wrapper.js';
50
+ import '../components/tabs.wrapper.js';
51
+ import '../components/tabs-bar.wrapper.js';
52
+ import '../components/tabs-item.wrapper.js';
53
+ import '../components/tag.wrapper.js';
54
+ import '../components/tag-dismissible.wrapper.js';
55
+ import '../components/text.wrapper.js';
56
+ import '../components/text-field-wrapper.wrapper.js';
57
+ import '../components/text-list.wrapper.js';
58
+ import '../components/text-list-item.wrapper.js';
59
+ import '../components/textarea-wrapper.wrapper.js';
60
+ import '../components/toast.wrapper.js';
61
+ import '../components/wordmark.wrapper.js';
2
62
  import { splitChildren } from '../../splitChildren.js';
3
63
  import { Component } from 'react';
4
64
  import { minifyCss } from '../../minifyCss.js';
@@ -10,8 +70,8 @@ class DSRCheckboxWrapper extends Component {
10
70
  render() {
11
71
  var _a;
12
72
  const { children, namedSlotChildren, otherChildren } = splitChildren(this.props.children);
13
- const style = minifyCss(stripFocusAndHoverStyles(getComponentCss$R(this.props.hideLabel, this.props.state, typeof otherChildren[0] === 'object' && 'props' in otherChildren[0] && ((_a = otherChildren[0]) === null || _a === void 0 ? void 0 : _a.props.disabled), this.props.theme)));
14
- return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs(Fragment, { children: [jsxs("label", { children: [(this.props.label || namedSlotChildren.filter(({ props: { slot } }) => slot === 'label').length > 0) && (jsx("span", { className: "text", children: this.props.label || jsx("slot", { name: "label" }) })), jsx("slot", {})] }), (this.props.message || namedSlotChildren.filter(({ props: { slot } }) => slot === 'message').length > 0) && ['success', 'error'].includes(this.props.state) && (jsx(StateMessage, { state: this.props.state, message: this.props.message, theme: this.props.theme, host: null }))] })] }), this.props.children] }));
73
+ const style = minifyCss(stripFocusAndHoverStyles(getComponentCss$R(this.props.hideLabel, this.props.state, typeof otherChildren[0] === 'object' && 'props' in otherChildren[0] && ((_a = otherChildren[0]) === null || _a === void 0 ? void 0 : _a.props.disabled), this.props.loading, this.props.theme)));
74
+ return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs(Fragment, { children: [jsxs("label", { "aria-disabled": this.props.loading ? 'true' : null, children: [(this.props.label || namedSlotChildren.filter(({ props: { slot } }) => slot === 'label').length > 0) && (jsx("span", { className: "text", children: this.props.label || jsx("slot", { name: "label" }) })), jsx("slot", {}), this.props.loading && (jsx(PSpinner, { className: "spinner", size: "inherit", theme: this.props.theme, aria: { 'aria-label': `Loading state of ${this.props.label}` } }))] }), (this.props.message || namedSlotChildren.filter(({ props: { slot } }) => slot === 'message').length > 0) && ['success', 'error'].includes(this.props.state) && (jsx(StateMessage, { state: this.props.state, message: this.props.message, theme: this.props.theme, host: null }))] })] }), this.props.children] }));
15
75
  }
16
76
  }
17
77
 
@@ -3,11 +3,12 @@ import { Component } from 'react';
3
3
  import { minifyCss } from '../../minifyCss.js';
4
4
  import { stripFocusAndHoverStyles } from '../../stripFocusAndHoverStyles.js';
5
5
  import { getCrestCss as getComponentCss$P } from '../../../../../../components/dist/styles/esm/styles-entry.js';
6
- import { buildCrestSrcSet, crestCdnBaseUrl, crestInnerManifest, parseAndGetAriaAttributes } from '../../../../../../components/dist/utils/esm/utils-entry.js';
6
+ import { buildCrestSrcSet, crestCdnBaseUrl, crestInnerManifest, parseAndGetAriaAttributes, crestSize } from '../../../../../../components/dist/utils/esm/utils-entry.js';
7
7
 
8
+ const { width, height } = crestSize;
8
9
  class DSRCrest extends Component {
9
10
  render() {
10
- const picture = (jsxs("picture", { children: [jsx("source", { srcSet: buildCrestSrcSet('webp'), type: "image/webp" }, "webp"), jsx("source", { srcSet: buildCrestSrcSet('png'), type: "image/png" }, "png"), jsx("img", { src: `${crestCdnBaseUrl}/${crestInnerManifest['2x'].png}`, alt: "Porsche" })] }));
11
+ const picture = (jsxs("picture", { children: [jsx("source", { srcSet: buildCrestSrcSet('webp'), type: "image/webp" }, "webp"), jsx("source", { srcSet: buildCrestSrcSet('png'), type: "image/png" }, "png"), jsx("img", { src: `${crestCdnBaseUrl}/${crestInnerManifest['2x'].png}`, width: width, height: height, alt: "Porsche" })] }));
11
12
  const style = minifyCss(stripFocusAndHoverStyles(getComponentCss$P()));
12
13
  return (jsx(Fragment, { children: jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsx(Fragment, { children: this.props.href === undefined ? (picture) : (jsx("a", { href: this.props.href, target: this.props.target, ...parseAndGetAriaAttributes(this.props.aria), children: picture })) })] }) }));
13
14
  }
@@ -81,7 +81,7 @@ class DSRLinkTileModelSignature extends Component {
81
81
  const overlayLinkProps = {
82
82
  className: 'link-overlay',
83
83
  href: linkEl.href || linkEl.to,
84
- target: linkEl.target,
84
+ target: linkEl.target || '_self',
85
85
  download: linkEl.download,
86
86
  rel: linkEl.rel,
87
87
  tabIndex: -1,
@@ -3,12 +3,12 @@ import { Component } from 'react';
3
3
  import { minifyCss } from '../../minifyCss.js';
4
4
  import { stripFocusAndHoverStyles } from '../../stripFocusAndHoverStyles.js';
5
5
  import { getModelSignatureCss as getComponentCss$w } from '../../../../../../components/dist/styles/esm/styles-entry.js';
6
- import { getSvgUrl } from '../../../../../../components/dist/utils/esm/utils-entry.js';
6
+ import { getSvgUrl, modelSignatureHeight } from '../../../../../../components/dist/utils/esm/utils-entry.js';
7
7
 
8
8
  class DSRModelSignature extends Component {
9
9
  render() {
10
10
  const style = minifyCss(stripFocusAndHoverStyles(getComponentCss$w(this.props.size, this.props.color, this.props.theme)));
11
- return (jsx(Fragment, { children: jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsx("img", { src: getSvgUrl(this.props.model), height: 36, alt: this.props.model })] }) }));
11
+ return (jsx(Fragment, { children: jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsx("img", { src: getSvgUrl(this.props.model), height: modelSignatureHeight, alt: this.props.model })] }) }));
12
12
  }
13
13
  }
14
14
 
@@ -64,7 +64,7 @@ import { Component } from 'react';
64
64
  import { minifyCss } from '../../minifyCss.js';
65
65
  import { stripFocusAndHoverStyles } from '../../stripFocusAndHoverStyles.js';
66
66
  import { getScrollerCss as getComponentCss$s } from '../../../../../../components/dist/styles/esm/styles-entry.js';
67
- import { isScrollable } from '../../../../../../components/dist/utils/esm/utils-entry.js';
67
+ import { parseAndGetAriaAttributes, isScrollable } from '../../../../../../components/dist/utils/esm/utils-entry.js';
68
68
 
69
69
  class DSRScroller extends Component {
70
70
  constructor() {
@@ -74,6 +74,7 @@ class DSRScroller extends Component {
74
74
  }
75
75
  // should only update if scrollable
76
76
  render() {
77
+ var _a;
77
78
  splitChildren(this.props.children);
78
79
  const deprecationMap = {
79
80
  default: 'background-base',
@@ -84,7 +85,7 @@ class DSRScroller extends Component {
84
85
  return (jsx("div", { className: direction === 'next' ? 'action-next' : 'action-prev', children: jsx("button", { type: "button", tabIndex: -1, "aria-hidden": "true", "aria-label": direction, children: jsx(PIcon, { className: "icon", name: direction === 'next' ? 'arrow-head-right' : 'arrow-head-left', theme: this.props.theme }) }) }, direction));
85
86
  };
86
87
  const style = minifyCss(stripFocusAndHoverStyles(getComponentCss$s(deprecationMap[this.props.gradientColorScheme] || this.props.gradientColor, this.isNextHidden, this.isPrevHidden, this.props.scrollIndicatorPosition || this.props.alignScrollIndicator, this.props.scrollbar, this.props.theme)));
87
- return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs("div", { className: "root", children: [jsx("div", { className: "scroll-area", children: jsxs("div", { className: "scroll-wrapper", 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] }));
88
+ return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs("div", { className: "root", children: [jsx("div", { className: "scroll-area", children: jsxs("div", { className: "scroll-wrapper", role: ((_a = parseAndGetAriaAttributes(this.props.aria)) === null || _a === void 0 ? void 0 : _a.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] }));
88
89
  }
89
90
  }
90
91
 
@@ -0,0 +1,32 @@
1
+ import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
2
+ import { Component } from 'react';
3
+ import { minifyCss } from '../../minifyCss.js';
4
+ import { stripFocusAndHoverStyles } from '../../stripFocusAndHoverStyles.js';
5
+ import { getSelectWrapperDropdownCss as getComponentCss$o } from '../../../../../../components/dist/styles/esm/styles-entry.js';
6
+ import { getSelectedOptionMap, getFilterInputAriaAttributes, getHighlightedOptionMapIndex, getSelectWrapperDropdownButtonAriaAttributes } from '../../../../../../components/dist/utils/esm/utils-entry.js';
7
+
8
+ class DSRSelectWrapperDropdown extends Component {
9
+ constructor() {
10
+ super(...arguments);
11
+ this.isOpen = this.props.isOpenOverride;
12
+ this.optionMaps = [];
13
+ this.searchString = '';
14
+ }
15
+ get selectedIndex() {
16
+ return 0;
17
+ }
18
+ render() {
19
+ var _a;
20
+ const dropdownId = 'list';
21
+ const labelId = 'label';
22
+ const descriptionId = this.props.description && 'description';
23
+ const buttonId = 'value';
24
+ const style = minifyCss(stripFocusAndHoverStyles(getComponentCss$o(this.props.direction === 'auto' ? 'down' : this.props.direction, this.isOpen, this.props.state, this.props.disabled, this.props.filter, this.props.theme)));
25
+ return (jsx(Fragment, { children: jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsx(Fragment, { children: this.props.filter ? ([
26
+ jsx("input", { type: "text", role: "combobox", disabled: this.props.disabled, placeholder: ((_a = getSelectedOptionMap(this.optionMaps)) === null || _a === void 0 ? void 0 : _a.value) || null, autoComplete: "off", value: this.searchString, ...getFilterInputAriaAttributes(this.isOpen, this.props.required, labelId, descriptionId, dropdownId, getHighlightedOptionMapIndex(this.optionMaps)) }),
27
+ jsx("span", {}),
28
+ ]) : (jsx("button", { type: "button", role: "combobox", id: buttonId, disabled: this.props.disabled, ...getSelectWrapperDropdownButtonAriaAttributes(this.isOpen, labelId, descriptionId, dropdownId, getHighlightedOptionMapIndex(this.optionMaps)) })) })] }) }));
29
+ }
30
+ }
31
+
32
+ export { DSRSelectWrapperDropdown };
@@ -59,23 +59,26 @@ import '../components/text-list-item.wrapper.js';
59
59
  import '../components/textarea-wrapper.wrapper.js';
60
60
  import '../components/toast.wrapper.js';
61
61
  import '../components/wordmark.wrapper.js';
62
+ import { PSelectWrapperDropdown } from '../components/select-wrapper-dropdown.wrapper.js';
62
63
  import { splitChildren } from '../../splitChildren.js';
63
64
  import { Component } from 'react';
64
65
  import { minifyCss } from '../../minifyCss.js';
65
66
  import { stripFocusAndHoverStyles } from '../../stripFocusAndHoverStyles.js';
66
67
  import { getSelectWrapperCss as getComponentCss$p } from '../../../../../../components/dist/styles/esm/styles-entry.js';
68
+ import { isCustomDropdown } from '../../../../../../components/dist/utils/esm/utils-entry.js';
67
69
  import { StateMessage } from './state-message.js';
68
70
 
69
71
  class DSRSelectWrapper extends Component {
70
72
  render() {
71
- var _a;
73
+ var _a, _b, _c, _d, _e;
74
+ const hasCustomDropdown = isCustomDropdown(this.props.filter, this.props.native);
72
75
  const { children, namedSlotChildren, otherChildren } = splitChildren(this.props.children);
73
76
  const { disabled } = typeof otherChildren[0] === 'object' && 'props' in otherChildren[0] && ((_a = otherChildren[0]) === null || _a === void 0 ? void 0 : _a.props) || {};
74
77
  const labelProps = disabled
75
78
  ? {}
76
79
  : {};
77
- const style = minifyCss(stripFocusAndHoverStyles(getComponentCss$p(disabled, this.props.hideLabel, this.props.state, this.props.theme)));
78
- return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs(Fragment, { children: [jsxs("div", { className: "root", children: [jsxs("label", { className: "label", children: [(this.props.label || namedSlotChildren.filter(({ props: { slot } }) => slot === 'label').length > 0) && (jsx("span", { className: "label__text", ...labelProps, children: this.props.label || jsx("slot", { name: "label" }) })), (this.props.description || namedSlotChildren.filter(({ props: { slot } }) => slot === 'description').length > 0) && (jsx("span", { className: "label__text", ...labelProps, children: this.props.description || jsx("slot", { name: "description" }) })), jsx(PIcon, { className: "icon", name: "arrow-head-down", theme: this.props.theme, color: disabled ? 'state-disabled' : 'primary', "aria-hidden": "true" }), jsx("slot", {})] }), this.props.hasCustomDropdown && (jsx(Fragment, {}))] }), (this.props.message || namedSlotChildren.filter(({ props: { slot } }) => slot === 'message').length > 0) && ['success', 'error'].includes(this.props.state) && (jsx(StateMessage, { state: this.props.state, message: this.props.message, theme: this.props.theme, host: null }))] })] }), this.props.children] }));
80
+ const style = minifyCss(stripFocusAndHoverStyles(getComponentCss$p(disabled, this.props.native, this.props.hideLabel, this.props.state, this.props.theme)));
81
+ return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs(Fragment, { children: [jsxs("div", { className: "root", children: [jsxs("label", { className: "label", children: [(this.props.label || namedSlotChildren.filter(({ props: { slot } }) => slot === 'label').length > 0) && (jsx("span", { className: "label__text", ...labelProps, children: this.props.label || jsx("slot", { name: "label" }) })), (this.props.description || namedSlotChildren.filter(({ props: { slot } }) => slot === 'description').length > 0) && (jsx("span", { className: "label__text", ...labelProps, children: this.props.description || jsx("slot", { name: "description" }) })), jsx(PIcon, { className: "icon", name: "arrow-head-down", theme: this.props.theme, color: disabled ? 'state-disabled' : 'primary', "aria-hidden": "true" }), jsx("slot", {})] }), hasCustomDropdown && !disabled && (jsx(PSelectWrapperDropdown, { selectRef: typeof otherChildren[0] === 'object' && 'props' in otherChildren[0] && ((_b = otherChildren[0]) === null || _b === void 0 ? void 0 : _b.props), label: this.props.label || ((_c = namedSlotChildren.find(({ props: { slot } }) => slot === 'label')) === null || _c === void 0 ? void 0 : _c.props.children), message: this.props.message || ((_d = namedSlotChildren.find(({ props: { slot } }) => slot === 'message')) === null || _d === void 0 ? void 0 : _d.props.children), description: this.props.description || ((_e = namedSlotChildren.find(({ props: { slot } }) => slot === 'description')) === null || _e === void 0 ? void 0 : _e.props.children), state: this.props.state, direction: this.props.dropdownDirection, filter: this.props.filter, theme: this.props.theme, required: false, disabled: disabled, onOpenChange: (isOpen) => this.props.iconElement.classList[isOpen ? 'add' : 'remove']('icon--open') }))] }), (this.props.message || namedSlotChildren.filter(({ props: { slot } }) => slot === 'message').length > 0) && ['success', 'error'].includes(this.props.state) && (jsx(StateMessage, { state: this.props.state, message: this.props.message, theme: this.props.theme, host: null }))] })] }), this.props.children] }));
79
82
  }
80
83
  }
81
84
 
@@ -76,7 +76,7 @@ class DSRStepperHorizontal extends Component {
76
76
  ? { ...child, props: { ...child.props, theme: this.props.theme } }
77
77
  : child);
78
78
  const style = minifyCss(stripFocusAndHoverStyles(getComponentCss$l(this.props.size)));
79
- return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsx(Fragment, { children: jsx(PScroller, { className: "scroller", theme: this.props.theme, children: jsx("slot", {}) }) })] }), manipulatedChildren] }));
79
+ return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsx(Fragment, { children: jsx(PScroller, { className: "scroller", aria: { role: 'list' }, theme: this.props.theme, children: jsx("slot", {}) }) })] }), manipulatedChildren] }));
80
80
  }
81
81
  }
82
82
 
@@ -77,7 +77,7 @@ class DSRTabsBar extends Component {
77
77
  semibold: 'semi-bold',
78
78
  };
79
79
  const style = minifyCss(stripFocusAndHoverStyles(getComponentCss$c(this.props.size, (deprecationMap[this.props.weight] || this.props.weight), this.props.theme)));
80
- return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs(PScroller, { className: "scroller", role: "tablist", theme: this.props.theme, gradientColorScheme: this.props.gradientColorScheme, gradientColor: this.props.gradientColor, alignScrollIndicator: "top", children: [jsx("slot", {}), jsx("span", { className: "bar" })] })] }), this.props.children] }));
80
+ return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs(PScroller, { className: "scroller", aria: { role: 'tablist' }, theme: this.props.theme, gradientColorScheme: this.props.gradientColorScheme, gradientColor: this.props.gradientColor, alignScrollIndicator: "top", children: [jsx("slot", {}), jsx("span", { className: "bar" })] })] }), this.props.children] }));
81
81
  }
82
82
  }
83
83
 
@@ -96,7 +96,7 @@ class DSRTextFieldWrapper extends Component {
96
96
  return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs(Fragment, { children: [jsxs("div", { className: "root", children: [jsxs("label", { className: "label", children: [(this.props.label || namedSlotChildren.filter(({ props: { slot } }) => slot === 'label').length > 0) && (jsx("span", { className: "label__text", ...labelProps, children: this.props.label || jsx("slot", { name: "label" }) })), (this.props.description || namedSlotChildren.filter(({ props: { slot } }) => slot === 'description').length > 0) && (jsx("span", { className: "label__text", ...labelProps, children: this.props.description || jsx("slot", { name: "description" }) })), (this.props.isCounterVisible) && (jsx("span", { className: "unit", "aria-hidden": "true", children: this.props.unit })), jsx("slot", {}), hasCounter ] }), isPassword ? (jsx(PButtonPure, { ...buttonProps, type: "button", icon: this.props.showPassword ? 'view-off' : 'view', disabled: disabled, aria: { 'aria-pressed': this.props.showPassword ? 'true' : 'false' }, children: "Toggle password visibility" })) : showCustomCalendarOrTimeIndicator(isCalendar, isTime) ? (jsx(PButtonPure, { ...buttonProps, type: "button", icon: isCalendar ? 'calendar' : 'clock', disabled: disabled, children: `Show ${isCalendar ? 'date' : 'time'} picker` })) : (isSearch && [
97
97
  // TODO: create an own component, which would fix SSR support too
98
98
  this.props.isWithinForm ? (createElement(PButtonPure, { ...buttonProps, key: "btn-submit", type: "submit", icon: "search", disabled: disabledOrReadOnly }, "Search")) : (jsx(PIcon, { className: "icon", name: "search", color: "state-disabled", theme: this.props.theme, "aria-hidden": "true" }, "icon")),
99
- createElement(PButtonPure, { ...buttonProps, type: "button", key: "btn-clear", icon: "close", tabIndex: -1, hidden: !isClearable, disabled: disabledOrReadOnly, "aria-hidden": "true" }),
99
+ createElement(PButtonPure, { ...buttonProps, type: "button", key: "btn-clear", icon: "close", tabIndex: -1, hidden: !isClearable, disabled: disabledOrReadOnly }, "Clear field"),
100
100
  hasAction && (createElement(PButtonPure, { ...buttonProps, type: "button", key: "btn-action", icon: "locate", hidden: isClearable, disabled: disabledOrReadOnly, loading: this.props.actionLoading }, "Locate me")),
101
101
  ])] }), (this.props.message || namedSlotChildren.filter(({ props: { slot } }) => slot === 'message').length > 0) && ['success', 'error'].includes(this.props.state) && (jsx(StateMessage, { state: this.props.state, message: this.props.message, theme: "light", host: null }))] })] }), this.props.children] }));
102
102
  }
@@ -9,6 +9,10 @@ export type PCheckboxWrapperProps = Omit<HTMLAttributes<{}>, 'color' | 'onChange
9
9
  * The label text.
10
10
  */
11
11
  label?: string;
12
+ /**
13
+ * Disables the checkbox and shows a loading indicator.
14
+ */
15
+ loading?: boolean;
12
16
  /**
13
17
  * The message styled depending on validation state.
14
18
  */
@@ -31,6 +35,10 @@ export declare const PCheckboxWrapper: import("react").ForwardRefExoticComponent
31
35
  * The label text.
32
36
  */
33
37
  label?: string;
38
+ /**
39
+ * Disables the checkbox and shows a loading indicator.
40
+ */
41
+ loading?: boolean;
34
42
  /**
35
43
  * The message styled depending on validation state.
36
44
  */
@@ -1,10 +1,14 @@
1
1
  import { HTMLAttributes } from 'react';
2
- import type { ScrollerAlignScrollIndicator, ScrollerGradientColor, ScrollerGradientColorScheme, ScrollerScrollIndicatorPosition, ScrollerScrollToPosition, Theme } from '../types';
2
+ import type { ScrollerAlignScrollIndicator, SelectedAriaAttributes, ScrollerAriaAttribute, ScrollerGradientColor, ScrollerGradientColorScheme, ScrollerScrollIndicatorPosition, ScrollerScrollToPosition, Theme } from '../types';
3
3
  export type PScrollerProps = Omit<HTMLAttributes<{}>, 'color' | 'onChange'> & {
4
4
  /**
5
- * Sets the vertical position of scroll indicator
5
+ * Sets the vertical position of scroll indicator.
6
6
  */
7
7
  alignScrollIndicator?: ScrollerAlignScrollIndicator;
8
+ /**
9
+ * Add ARIA role.
10
+ */
11
+ aria?: SelectedAriaAttributes<ScrollerAriaAttribute>;
8
12
  /**
9
13
  * Adapts the background gradient color of prev and next button.
10
14
  */
@@ -18,11 +22,11 @@ export type PScrollerProps = Omit<HTMLAttributes<{}>, 'color' | 'onChange'> & {
18
22
  */
19
23
  scrollIndicatorPosition?: ScrollerScrollIndicatorPosition;
20
24
  /**
21
- * Scrolls the scroll area to the left either smooth or immediately
25
+ * Scrolls the scroll area to the left either smooth or immediately.
22
26
  */
23
27
  scrollToPosition?: ScrollerScrollToPosition;
24
28
  /**
25
- * Specifies if scrollbar should be shown
29
+ * Specifies if scrollbar should be shown.
26
30
  */
27
31
  scrollbar?: boolean;
28
32
  /**
@@ -32,9 +36,13 @@ export type PScrollerProps = Omit<HTMLAttributes<{}>, 'color' | 'onChange'> & {
32
36
  };
33
37
  export declare const PScroller: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<{}>, "color" | "onChange"> & {
34
38
  /**
35
- * Sets the vertical position of scroll indicator
39
+ * Sets the vertical position of scroll indicator.
36
40
  */
37
41
  alignScrollIndicator?: ScrollerAlignScrollIndicator;
42
+ /**
43
+ * Add ARIA role.
44
+ */
45
+ aria?: SelectedAriaAttributes<ScrollerAriaAttribute>;
38
46
  /**
39
47
  * Adapts the background gradient color of prev and next button.
40
48
  */
@@ -48,11 +56,11 @@ export declare const PScroller: import("react").ForwardRefExoticComponent<Omit<H
48
56
  */
49
57
  scrollIndicatorPosition?: ScrollerScrollIndicatorPosition;
50
58
  /**
51
- * Scrolls the scroll area to the left either smooth or immediately
59
+ * Scrolls the scroll area to the left either smooth or immediately.
52
60
  */
53
61
  scrollToPosition?: ScrollerScrollToPosition;
54
62
  /**
55
- * Specifies if scrollbar should be shown
63
+ * Specifies if scrollbar should be shown.
56
64
  */
57
65
  scrollbar?: boolean;
58
66
  /**
@@ -0,0 +1,30 @@
1
+ import { HTMLAttributes } from 'react';
2
+ import type { SelectWrapperDropdownDirection, SelectWrapperState, Theme } from '../types';
3
+ export type PSelectWrapperDropdownProps = Omit<HTMLAttributes<{}>, 'color' | 'onChange'> & {
4
+ description?: string;
5
+ direction?: SelectWrapperDropdownDirection;
6
+ disabled?: boolean;
7
+ filter?: boolean;
8
+ isOpenOverride?: boolean;
9
+ label?: string;
10
+ message?: string;
11
+ onOpenChange: (isOpen: boolean) => void;
12
+ required?: boolean;
13
+ selectRef?: HTMLSelectElement;
14
+ state?: SelectWrapperState;
15
+ theme?: Theme;
16
+ };
17
+ export declare const PSelectWrapperDropdown: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<{}>, "color" | "onChange"> & {
18
+ description?: string;
19
+ direction?: SelectWrapperDropdownDirection;
20
+ disabled?: boolean;
21
+ filter?: boolean;
22
+ isOpenOverride?: boolean;
23
+ label?: string;
24
+ message?: string;
25
+ onOpenChange: (isOpen: boolean) => void;
26
+ required?: boolean;
27
+ selectRef?: HTMLSelectElement;
28
+ state?: SelectWrapperState;
29
+ theme?: Theme;
30
+ } & import("react").RefAttributes<HTMLElement>>;
@@ -4,6 +4,5 @@ export declare class DSRSelectWrapper extends Component<any> {
4
4
  private select;
5
5
  private iconElement;
6
6
  private dropdownElement;
7
- private hasCustomDropdown;
8
7
  render(): JSX.Element;
9
8
  }