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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/cjs/lib/components/input-number.wrapper.cjs +29 -0
  3. package/cjs/public-api.cjs +2 -0
  4. package/esm/lib/components/index.d.ts +1 -0
  5. package/esm/lib/components/input-number.wrapper.d.ts +184 -0
  6. package/esm/lib/components/input-number.wrapper.mjs +27 -0
  7. package/esm/lib/types.d.ts +12 -2
  8. package/esm/public-api.mjs +1 -0
  9. package/package.json +5 -2
  10. package/ssr/cjs/components/dist/styles/esm/styles-entry.cjs +475 -371
  11. package/ssr/cjs/components/dist/utils/esm/utils-entry.cjs +0 -14
  12. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/input-number.wrapper.cjs +40 -0
  13. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/toast.wrapper.cjs +1 -1
  14. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-base.cjs +22 -0
  15. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-number.cjs +42 -0
  16. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-password.cjs +8 -9
  17. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/multi-select-option.cjs +12 -6
  18. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/multi-select.cjs +1 -3
  19. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-option.cjs +6 -5
  20. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select.cjs +2 -4
  21. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/state-message.cjs +6 -2
  22. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/public-api.cjs +2 -0
  23. package/ssr/esm/components/dist/styles/esm/styles-entry.mjs +442 -344
  24. package/ssr/esm/components/dist/utils/esm/utils-entry.mjs +1 -12
  25. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/input-number.wrapper.mjs +38 -0
  26. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/toast.wrapper.mjs +1 -1
  27. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/accordion.mjs +2 -2
  28. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/banner.mjs +2 -2
  29. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button-group.mjs +2 -2
  30. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button-pure.mjs +2 -2
  31. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button-tile.mjs +2 -2
  32. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button.mjs +2 -2
  33. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/canvas.mjs +2 -2
  34. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/carousel.mjs +2 -2
  35. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox-wrapper.mjs +2 -2
  36. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox.mjs +2 -2
  37. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/content-wrapper.mjs +2 -2
  38. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/crest.mjs +2 -2
  39. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/display.mjs +2 -2
  40. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/divider.mjs +2 -2
  41. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/drilldown-item.mjs +2 -2
  42. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/drilldown-link.mjs +2 -2
  43. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/drilldown.mjs +2 -2
  44. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/fieldset-wrapper.mjs +2 -2
  45. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/fieldset.mjs +2 -2
  46. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flex-item.mjs +2 -2
  47. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flex.mjs +2 -2
  48. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flyout.mjs +2 -2
  49. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/grid-item.mjs +2 -2
  50. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/grid.mjs +2 -2
  51. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/heading.mjs +2 -2
  52. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/headline.mjs +2 -2
  53. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/icon.mjs +2 -2
  54. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/inline-notification.mjs +2 -2
  55. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-base.mjs +20 -0
  56. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-number.mjs +40 -0
  57. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-password.mjs +8 -9
  58. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/multi-select-option.mjs +13 -7
  59. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/multi-select.mjs +2 -4
  60. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-option.mjs +6 -5
  61. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select.mjs +2 -4
  62. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/state-message.mjs +7 -3
  63. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/public-api.mjs +1 -0
  64. package/ssr/esm/lib/components/index.d.ts +1 -0
  65. package/ssr/esm/lib/components/input-number.wrapper.d.ts +184 -0
  66. package/ssr/esm/lib/dsr-components/input-base.d.ts +31 -0
  67. package/ssr/esm/lib/dsr-components/input-number.d.ts +18 -0
  68. package/ssr/esm/lib/dsr-components/input-password.d.ts +5 -3
  69. package/ssr/esm/lib/dsr-components/multi-select.d.ts +0 -1
  70. package/ssr/esm/lib/dsr-components/select.d.ts +0 -1
  71. package/ssr/esm/lib/types.d.ts +12 -2
  72. package/tailwindcss/index.css +409 -0
@@ -2,7 +2,7 @@ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
2
2
  import { splitChildren } from '../../splitChildren.mjs';
3
3
  import { Component } from 'react';
4
4
  import { minifyCss } from '../../minifyCss.mjs';
5
- import { getHeadingCss as getComponentCss$Q } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
5
+ import { getHeadingCss as getComponentCss$R } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
6
6
  import { getHeadingTagType } from '../../../../../../components/dist/utils/esm/utils-entry.mjs';
7
7
 
8
8
  /**
@@ -17,7 +17,7 @@ class DSRHeading extends Component {
17
17
  right: 'end',
18
18
  };
19
19
  const TagType = getHeadingTagType(null, this.props.size, this.props.tag);
20
- const style = minifyCss(getComponentCss$Q(this.props.size, (alignDeprecationMap[this.props.align] || this.props.align), this.props.color, this.props.ellipsis, this.props.theme));
20
+ const style = minifyCss(getComponentCss$R(this.props.size, (alignDeprecationMap[this.props.align] || this.props.align), this.props.color, this.props.ellipsis, this.props.theme));
21
21
  return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsx(TagType, { className: "root", children: jsx("slot", {}) })] }), this.props.children] }));
22
22
  }
23
23
  }
@@ -2,7 +2,7 @@ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
2
2
  import { splitChildren } from '../../splitChildren.mjs';
3
3
  import { Component } from 'react';
4
4
  import { minifyCss } from '../../minifyCss.mjs';
5
- import { getHeadlineCss as getComponentCss$P } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
5
+ import { getHeadlineCss as getComponentCss$Q } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
6
6
  import { getHeadlineTagType } from '../../../../../../components/dist/utils/esm/utils-entry.mjs';
7
7
 
8
8
  /**
@@ -19,7 +19,7 @@ class DSRHeadline extends Component {
19
19
  right: 'end',
20
20
  };
21
21
  const TagType = getHeadlineTagType(null, this.props.variant, this.props.tag);
22
- const style = minifyCss(getComponentCss$P(this.props.variant, (alignDeprecationMap[this.props.align] || this.props.align), this.props.color, this.props.ellipsis, this.props.theme));
22
+ const style = minifyCss(getComponentCss$Q(this.props.variant, (alignDeprecationMap[this.props.align] || this.props.align), this.props.color, this.props.ellipsis, this.props.theme));
23
23
  return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsx(TagType, { className: "root", children: jsx("slot", {}) })] }), this.props.children] }));
24
24
  }
25
25
  }
@@ -1,7 +1,7 @@
1
1
  import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
2
2
  import { Component } from 'react';
3
3
  import { minifyCss } from '../../minifyCss.mjs';
4
- import { getIconCss as getComponentCss$O } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
4
+ import { getIconCss as getComponentCss$P } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
5
5
  import { buildIconUrl, parseAndGetAriaAttributes } from '../../../../../../components/dist/utils/esm/utils-entry.mjs';
6
6
 
7
7
  class DSRIcon extends Component {
@@ -15,7 +15,7 @@ class DSRIcon extends Component {
15
15
  'neutral-contrast-high': 'contrast-high',
16
16
  'notification-neutral': 'notification-info',
17
17
  };
18
- const style = minifyCss(getComponentCss$O(this.props.name, this.props.source, (deprecationMap[this.props.color] || this.props.color), this.props.size, this.props.theme));
18
+ const style = minifyCss(getComponentCss$P(this.props.name, this.props.source, (deprecationMap[this.props.color] || this.props.color), this.props.size, this.props.theme));
19
19
  return (jsx(Fragment, { children: jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsx("img", { src: buildIconUrl(this.props.source || this.props.name), width: 24, height: 24, loading: "lazy", alt: parseAndGetAriaAttributes(this.props.aria)?.['aria-label'] ?? '' })] }) }));
20
20
  }
21
21
  }
@@ -3,7 +3,7 @@ import { Component } from 'react';
3
3
  import '../../provider.mjs';
4
4
  import { splitChildren } from '../../splitChildren.mjs';
5
5
  import { minifyCss } from '../../minifyCss.mjs';
6
- import { getInlineNotificationCss as getComponentCss$N } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
6
+ import { getInlineNotificationCss as getComponentCss$O } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
7
7
  import { getInlineNotificationIconName, getContentAriaAttributes } from '../../../../../../components/dist/utils/esm/utils-entry.mjs';
8
8
  import { PButton } from '../components/button.wrapper.mjs';
9
9
  import { PButtonPure } from '../components/button-pure.wrapper.mjs';
@@ -24,7 +24,7 @@ class DSRInlineNotification extends Component {
24
24
  const labelId = 'label';
25
25
  const descriptionId = 'description';
26
26
  const Heading = this.props.headingTag;
27
- const style = minifyCss(getComponentCss$N(this.props.state, !!this.props.actionLabel, this.hasDismissButton, this.props.theme));
27
+ const style = minifyCss(getComponentCss$O(this.props.state, !!this.props.actionLabel, this.hasDismissButton, this.props.theme));
28
28
  return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs(Fragment, { children: [jsx(PIcon, { className: "icon", name: getInlineNotificationIconName(this.props.state), color: `notification-${this.props.state}`, theme: this.props.theme, "aria-hidden": "true" }), jsxs("div", { id: bannerId, className: "content", ...getContentAriaAttributes(this.props.state, labelId, descriptionId), children: [(this.props.heading || namedSlotChildren.filter(({ props: { slot } }) => slot === 'heading').length > 0) &&
29
29
  (this.props.heading ? (jsx(Heading, { id: labelId, className: "heading", children: this.props.heading })) : (jsx("slot", { name: "heading" }))), jsx("p", { id: descriptionId, className: "description", children: this.props.description || jsx("slot", {}) })] }), this.props.actionLabel && (jsx(PButtonPure, { className: "action", theme: this.props.theme, icon: this.props.actionIcon, loading: this.props.actionLoading, children: this.props.actionLabel })), this.hasDismissButton && (jsx(PButton, { className: "close", type: "button", variant: "ghost", icon: "close", theme: this.props.theme, hideLabel: true, "aria-controls": bannerId, children: "Close notification" }))] })] }), this.props.children] }));
30
30
  }
@@ -0,0 +1,20 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { splitChildren } from '../../splitChildren.mjs';
3
+ import { Label } from './label.mjs';
4
+ import { descriptionId } from '../../../../../../components/dist/utils/esm/utils-entry.mjs';
5
+ import { messageId, StateMessage } from './state-message.mjs';
6
+
7
+ const InputBase = ({ children,
8
+ // host,
9
+ id, label, description, required, disabled, state, message, theme, readOnly, type, form, placeholder, maxLength, minLength, max, min, value, step, autoComplete, name,
10
+ // onInput,
11
+ onWheel,
12
+ // onChange,
13
+ // onBlur,
14
+ // refElement,
15
+ start, end, }) => {
16
+ const { namedSlotChildren } = splitChildren(children);
17
+ 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, isDisabled: disabled }), jsxs("div", { className: "wrapper", children: [jsx("slot", { name: "start" }), start, jsx("input", { "aria-describedby": `${descriptionId} ${messageId}`, "aria-invalid": state === 'error' ? 'true' : null, id: id, onWheel: onWheel, name: name, form: form, type: type, required: required, placeholder: placeholder, maxLength: maxLength, minLength: minLength, max: max, min: min, step: step, value: value, readOnly: readOnly, autoComplete: autoComplete, disabled: disabled }), end, jsx("slot", { name: "end" })] }), jsx(StateMessage, { hasMessage: (message || namedSlotChildren.filter(({ props: { slot } }) => slot === 'message').length > 0) && ['success', 'error'].includes(state), state: state, message: message, theme: theme, host: null })] }));
18
+ };
19
+
20
+ export { InputBase };
@@ -0,0 +1,40 @@
1
+ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
2
+ import { Component } from 'react';
3
+ import '../../provider.mjs';
4
+ import { splitChildren } from '../../splitChildren.mjs';
5
+ import { minifyCss } from '../../minifyCss.mjs';
6
+ import { getInputNumberCss as getComponentCss$N } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
7
+ import { PButtonPure } from '../components/button-pure.wrapper.mjs';
8
+ import { InputBase } from './input-base.mjs';
9
+
10
+ /**
11
+ * @slot {"name": "label", "description": "Shows a label. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
12
+ * @slot {"name": "description", "description": "Shows a description. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
13
+ * @slot {"name": "message", "description": "Shows a state message. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
14
+ * @slot {"name": "start", "description": "Shows content at the start of the input (e.g. unit prefix)."}
15
+ * @slot {"name": "end", "description": "Shows content at the end of the input (e.g. toggle button, unit suffix)."}
16
+ */
17
+ class DSRInputNumber extends Component {
18
+ host;
19
+ // The "name" property is reflected as an attribute to ensure compatibility with native form submission.
20
+ // In the React wrapper, all props are synced as properties on the element ref, so reflecting "name" as an attribute ensures it is properly handled in the form submission process.
21
+ internals;
22
+ inputElement;
23
+ defaultValue;
24
+ formResetCallback() {
25
+ this.props.internals?.setFormValue(this.props.defaultValue);
26
+ }
27
+ formDisabledCallback() {
28
+ }
29
+ formStateRestoreCallback() {
30
+ }
31
+ render() {
32
+ splitChildren(this.props.children);
33
+ const style = minifyCss(getComponentCss$N(this.props.disabled, this.props.hideLabel, this.props.state, this.props.compact, this.props.readOnly, this.props.theme, this.props.controls));
34
+ 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-number", onWheel: (e) => (e.target).blur(), name: this.props.name, form: this.props.form, type: "number", required: this.props.required, placeholder: this.props.placeholder, 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, theme: this.props.theme, step: this.props.step, ...(this.props.controls && {
35
+ end: (jsxs(Fragment, { children: [jsxs(PButtonPure, { tabIndex: -1, hideLabel: true, theme: this.props.theme, className: "button", type: "button", icon: "minus", disabled: this.props.disabled || this.props.readOnly, children: ["Decrement value by ", this.props.step] }), jsxs(PButtonPure, { tabIndex: -1, hideLabel: true, theme: this.props.theme, className: "button", type: "button", icon: "plus", disabled: this.props.disabled || this.props.readOnly, children: ["Increment value by ", this.props.step] })] })),
36
+ }) })] }), this.props.children] }));
37
+ }
38
+ }
39
+
40
+ export { DSRInputNumber };
@@ -4,15 +4,15 @@ import '../../provider.mjs';
4
4
  import { splitChildren } from '../../splitChildren.mjs';
5
5
  import { minifyCss } from '../../minifyCss.mjs';
6
6
  import { getInputPasswordCss as getComponentCss$M } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
7
- import { descriptionId } from '../../../../../../components/dist/utils/esm/utils-entry.mjs';
8
7
  import { PButtonPure } from '../components/button-pure.wrapper.mjs';
9
- import { Label } from './label.mjs';
10
- import { messageId, StateMessage } from './state-message.mjs';
8
+ import { InputBase } from './input-base.mjs';
11
9
 
12
10
  /**
13
- * @slot {"name": "label", "description": "Shows a label. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed." }
14
- * @slot {"name": "description", "description": "Shows a description. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed." }
15
- * @slot {"name": "message", "description": "Shows a state message. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed." }
11
+ * @slot {"name": "label", "description": "Shows a label. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
12
+ * @slot {"name": "description", "description": "Shows a description. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
13
+ * @slot {"name": "message", "description": "Shows a state message. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
14
+ * @slot {"name": "start", "description": "Shows content at the start of the input (e.g. unit prefix)."}
15
+ * @slot {"name": "end", "description": "Shows content at the end of the input (e.g. toggle button, unit suffix)."}
16
16
  */
17
17
  class DSRInputPassword extends Component {
18
18
  host;
@@ -30,10 +30,9 @@ class DSRInputPassword extends Component {
30
30
  formStateRestoreCallback() {
31
31
  }
32
32
  render() {
33
- const { children, namedSlotChildren, otherChildren } = splitChildren(this.props.children);
34
- const id = 'input-password';
33
+ splitChildren(this.props.children);
35
34
  const style = minifyCss(getComponentCss$M(this.props.disabled, this.props.hideLabel, this.props.state, this.props.toggle, this.props.compact, this.props.readOnly, this.props.theme));
36
- return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs("div", { className: "root", 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: id, isRequired: this.props.required, isDisabled: this.props.disabled }), jsxs("div", { className: "wrapper", children: [jsx("input", { "aria-describedby": `${descriptionId} ${messageId}`, "aria-invalid": this.props.state === 'error' ? 'true' : null, id: id, onBlur: this.props.onBlur, 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 }), this.props.toggle && (jsx(PButtonPure, { hideLabel: true, theme: this.props.theme, 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" }))] }), 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, theme: this.props.theme, host: null })] })] }), this.props.children] }));
35
+ 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, theme: this.props.theme, end: this.props.toggle && (jsx(PButtonPure, { hideLabel: true, theme: this.props.theme, 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] }));
37
36
  }
38
37
  }
39
38
 
@@ -1,7 +1,6 @@
1
- import { jsx, Fragment } from 'react/jsx-runtime';
2
- import { Component } from 'react';
3
- import '../../provider.mjs';
1
+ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
4
2
  import { splitChildren } from '../../splitChildren.mjs';
3
+ import { Component } from 'react';
5
4
  import { minifyCss } from '../../minifyCss.mjs';
6
5
  import { getMultiSelectOptionCss as getComponentCss$D } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
7
6
 
@@ -12,10 +11,17 @@ class DSRMultiSelectOption extends Component {
12
11
  host;
13
12
  render() {
14
13
  splitChildren(this.props.children);
15
- const { theme = 'light', selected, highlighted } = this.props;
16
- this.props.disabled || this.props.disabledParent;
17
- minifyCss(getComponentCss$D(theme));
18
- return (jsx(Fragment, {}));
14
+ const { theme = 'light', selected: isSelected, highlighted, hidden } = this.props;
15
+ const isDisabled = this.props.disabled || this.props.disabledParent;
16
+ const style = minifyCss(getComponentCss$D(theme, isDisabled, isSelected));
17
+ return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } })
18
+ // TODO: get rid of ARIA sprouting and use `elementInternals` API when AXE-CORE supports it: https://github.com/dequelabs/axe-core/issues/4259
19
+ , "// 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({
20
+ option: true,
21
+ 'option--selected': isSelected,
22
+ 'option--highlighted': highlighted,
23
+ 'option--disabled': isDisabled,
24
+ }).map(([key, value]) => value && key).filter(Boolean).join(' '), children: [jsx("span", { className: "checkbox", "aria-hidden": "true" }), jsx("slot", { slot: "label" })] }) })] }), this.props.children] }));
19
25
  }
20
26
  }
21
27
 
@@ -4,7 +4,7 @@ import '../../provider.mjs';
4
4
  import { splitChildren } from '../../splitChildren.mjs';
5
5
  import { minifyCss } from '../../minifyCss.mjs';
6
6
  import { getMultiSelectCss as getComponentCss$C } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
7
- import { getHasNativePopoverSupport, getSelectedOptionValues, getSelectedOptions } from '../../../../../../components/dist/utils/esm/utils-entry.mjs';
7
+ import { getHasNativePopoverSupport, getSelectedOptionValues } from '../../../../../../components/dist/utils/esm/utils-entry.mjs';
8
8
  import { PButtonPure } from '../components/button-pure.wrapper.mjs';
9
9
  import { Label } from './label.mjs';
10
10
  import { StateMessage } from './state-message.mjs';
@@ -23,7 +23,6 @@ class DSRMultiSelect extends Component {
23
23
  // The "name" property is reflected as an attribute to ensure compatibility with native form submission.
24
24
  // In the React wrapper, all props are synced as properties on the element ref, so reflecting "name" as an attribute ensures it is properly handled in the form submission process.
25
25
  isOpen = false;
26
- srHighlightedOptionText = '';
27
26
  hasFilterResults = true;
28
27
  internals;
29
28
  defaultValue;
@@ -56,9 +55,8 @@ class DSRMultiSelect extends Component {
56
55
  const { children, namedSlotChildren, otherChildren } = splitChildren(this.props.children);
57
56
  const inputId = 'filter';
58
57
  const popoverId = 'list';
59
- const optionsSelectedId = 'options-selected';
60
58
  const style = minifyCss(getComponentCss$C(this.props.isOpen, this.props.disabled, this.props.hideLabel, this.props.state, this.props.theme));
61
- return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs("div", { className: "root", 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: inputId, isRequired: this.props.required, isDisabled: this.props.disabled }), this.props.currentValue && (jsxs("span", { id: optionsSelectedId, className: "sr-only", children: [getSelectedOptions(this.props.multiSelectOptions).length, " options selected"] })), jsxs("div", { className: `wrapper${this.props.disabled ? ' disabled' : ''}`, children: [jsx("input", { id: inputId, role: "combobox", autoComplete: "off", disabled: this.props.disabled, required: this.props.required, "aria-invalid": this.props.state === 'error' ? 'true' : null }), jsx(PIcon, { className: "icon", name: "arrow-head-down", theme: this.props.theme, "aria-hidden": "true" }), this.props.currentValue && (jsx(PButtonPure, { type: "button", className: "button", icon: "close", hideLabel: true, theme: this.props.theme, disabled: this.props.disabled, children: "Reset selection" })), jsxs("div", { id: popoverId, popover: "manual", tabIndex: -1, children: [!this.props.hasFilterResults && (jsxs("div", { className: "no-results", role: "option", children: [jsx("span", { "aria-hidden": "true", children: "---" }), jsx("span", { className: "sr-only", children: "No results found" })] })), jsx("slot", {})] })] }), 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, theme: this.props.theme, host: null }), jsx("span", { className: "sr-only", role: "status", "aria-live": "assertive", "aria-relevant": "additions text", children: this.props.hasFilterResults ? this.props.srHighlightedOptionText : 'No results found' })] })] }), this.props.children] }));
59
+ return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs("div", { className: "root", 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: inputId, isRequired: this.props.required, isDisabled: this.props.disabled }), jsxs("div", { className: `wrapper${this.props.disabled ? ' disabled' : ''}`, children: [jsx("input", { id: inputId, role: "combobox", autoComplete: "off", disabled: this.props.disabled, required: this.props.required, "aria-invalid": this.props.state === 'error' ? 'true' : null }), jsx(PIcon, { className: "icon", name: "arrow-head-down", theme: this.props.theme, "aria-hidden": "true" }), this.props.currentValue && (jsx(PButtonPure, { type: "button", className: "button", icon: "close", hideLabel: true, theme: this.props.theme, disabled: this.props.disabled, children: "Reset selection" })), jsxs("div", { id: popoverId, popover: "manual", tabIndex: -1, children: [!this.props.hasFilterResults && (jsxs("div", { className: "no-results", role: "option", children: [jsx("span", { "aria-hidden": "true", children: "---" }), jsx("span", { className: "sr-only", children: "No results found" })] })), jsx("slot", {})] })] }), 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, theme: this.props.theme, host: null })] })] }), this.props.children] }));
62
60
  }
63
61
  }
64
62
 
@@ -4,7 +4,6 @@ import '../../provider.mjs';
4
4
  import { splitChildren } from '../../splitChildren.mjs';
5
5
  import { minifyCss } from '../../minifyCss.mjs';
6
6
  import { getSelectOptionCss as getComponentCss$r } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
7
- import { getOptionAriaAttributes } from '../../../../../../components/dist/utils/esm/utils-entry.mjs';
8
7
  import { PIcon } from '../components/icon.wrapper.mjs';
9
8
 
10
9
  /**
@@ -14,15 +13,17 @@ class DSRSelectOption extends Component {
14
13
  host;
15
14
  render() {
16
15
  splitChildren(this.props.children);
17
- const { theme = 'light', selected, highlighted, hidden } = this.props;
16
+ const { theme = 'light', selected: isSelected, highlighted, hidden } = this.props;
18
17
  const isDisabled = this.props.disabled || this.props.disabledParent;
19
18
  const style = minifyCss(getComponentCss$r(theme));
20
- return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsx(Fragment, { children: jsxs("div", { role: "option", className: {
19
+ return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } })
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
+ , "// 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({
21
22
  option: true,
22
- 'option--selected': selected,
23
+ 'option--selected': isSelected,
23
24
  'option--highlighted': highlighted,
24
25
  'option--disabled': isDisabled,
25
- }, ...getOptionAriaAttributes(selected, isDisabled, hidden, !!this.props.value), children: [jsx("slot", {}), selected && (jsx(PIcon, { className: "icon", "aria-hidden": "true", name: "check", color: isDisabled ? 'state-disabled' : 'primary', theme: theme }))] }) })] }), this.props.children] }));
26
+ }).map(([key, value]) => value && key).filter(Boolean).join(' '), children: [jsx("slot", {}), isSelected && (jsx(PIcon, { className: "icon", "aria-hidden": "true", name: "check", color: isDisabled ? 'state-disabled' : 'primary', theme: theme }))] }) })] }), this.props.children] }));
26
27
  }
27
28
  }
28
29
 
@@ -22,7 +22,6 @@ class DSRSelect extends Component {
22
22
  // The "name" property is reflected as an attribute to ensure compatibility with native form submission.
23
23
  // In the React wrapper, all props are synced as properties on the element ref, so reflecting "name" as an attribute ensures it is properly handled in the form submission process.
24
24
  isOpen = false;
25
- srHighlightedOptionText = '';
26
25
  internals;
27
26
  defaultValue;
28
27
  buttonElement;
@@ -48,11 +47,10 @@ class DSRSelect extends Component {
48
47
  const popoverId = 'list';
49
48
  const descriptionId = this.props.description ? 'description' : undefined;
50
49
  const selectMessageId = (this.props.message || namedSlotChildren.filter(({ props: { slot } }) => slot === 'message').length > 0) && ['success', 'error'].includes(this.props.state) ? messageId : undefined;
51
- const initialStatusId = 'initial-status';
52
- const ariaDescribedBy = [descriptionId, selectMessageId, initialStatusId].filter(Boolean).join(' ');
50
+ const ariaDescribedBy = [descriptionId, selectMessageId].filter(Boolean).join(' ');
53
51
  const selectedOption = getSelectedOptionString(otherChildren);
54
52
  const style = minifyCss(getComponentCss$q(this.props.isOpen, this.props.disabled, this.props.hideLabel, this.props.state, this.props.compact, this.props.theme, !!this.props.slottedImagePath));
55
- return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs("div", { className: "root", 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: buttonId, isRequired: this.props.required, isDisabled: this.props.disabled }), jsxs("button", { "aria-invalid": this.props.state === 'error' ? 'true' : null, type: "button", role: "combobox", id: buttonId, ...getComboboxAriaAttributes(this.props.isOpen, this.props.required, labelId, ariaDescribedBy, popoverId), disabled: this.props.disabled, children: [this.props.slottedImagePath && jsx("img", { src: this.props.slottedImagePath, alt: "" }), jsx("span", { children: selectedOption }), jsx(PIcon, { className: "icon", name: "arrow-head-down", theme: this.props.theme, color: this.props.disabled ? 'state-disabled' : 'primary', "aria-hidden": "true" })] }), jsx("div", { id: popoverId, popover: "manual", tabIndex: -1, ...getListAriaAttributes(this.props.label, this.props.required, false, this.props.isOpen), children: jsx("slot", {}) }), 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, theme: this.props.theme, host: null }), jsx("span", { className: "sr-only", role: "status", "aria-live": "assertive", "aria-relevant": "additions text", children: this.props.srHighlightedOptionText })] })] }), this.props.children] }));
53
+ return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs("div", { className: "root", 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: buttonId, isRequired: this.props.required, isDisabled: this.props.disabled }), jsxs("button", { "aria-invalid": this.props.state === 'error' ? 'true' : null, type: "button", role: "combobox", id: buttonId, ...getComboboxAriaAttributes(this.props.isOpen, this.props.required, labelId, ariaDescribedBy, popoverId), disabled: this.props.disabled, children: [this.props.slottedImagePath && jsx("img", { src: this.props.slottedImagePath, alt: "" }), jsx("span", { children: selectedOption }), jsx(PIcon, { className: "icon", name: "arrow-head-down", theme: this.props.theme, color: this.props.disabled ? 'state-disabled' : 'primary', "aria-hidden": "true" })] }), jsx("div", { id: popoverId, popover: "manual", tabIndex: -1, ...getListAriaAttributes(this.props.label, this.props.required, false, this.props.isOpen), children: jsx("slot", {}) }), 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, theme: this.props.theme, host: null })] })] }), this.props.children] }));
56
54
  }
57
55
  getSelectedOptionImagePath = (options) => {
58
56
  return (options
@@ -1,13 +1,17 @@
1
- import { jsxs, jsx } from 'react/jsx-runtime';
1
+ import { jsx } from 'react/jsx-runtime';
2
2
  import 'react';
3
3
  import '../../provider.mjs';
4
- import { getRole } from '../../../../../../components/dist/utils/esm/utils-entry.mjs';
5
4
  import { PIcon } from '../components/icon.wrapper.mjs';
6
5
 
7
6
  const messageId = 'message';
8
7
  const StateMessage = ({ hasMessage, state, message, theme }) => {
9
8
  const isErrorState = state === 'error';
10
- return (hasMessage && (jsxs("span", { id: messageId, className: "message", role: getRole(state), children: [jsx(PIcon, { name: isErrorState ? 'exclamation' : 'check', color: isErrorState ? 'notification-error' : 'notification-success', theme: theme, "aria-hidden": "true" }), message || jsx("slot", { name: "message" })] })));
9
+ return (
10
+ // needs to be rendered always to have correct behaviour for screen readers
11
+ jsx("span", { id: messageId, className: "message", role: state === 'success' ? 'status' : 'alert', children: hasMessage && [
12
+ jsx(PIcon, { name: isErrorState ? 'exclamation' : 'check', color: isErrorState ? 'notification-error' : 'notification-success', theme: theme, "aria-hidden": "true" }),
13
+ message || jsx("slot", { name: "message" }),
14
+ ] }));
11
15
  };
12
16
 
13
17
  export { StateMessage, messageId };
@@ -27,6 +27,7 @@ export { PHeading } from './lib/components/heading.wrapper.mjs';
27
27
  export { PHeadline } from './lib/components/headline.wrapper.mjs';
28
28
  export { PIcon } from './lib/components/icon.wrapper.mjs';
29
29
  export { PInlineNotification } from './lib/components/inline-notification.wrapper.mjs';
30
+ export { PInputNumber } from './lib/components/input-number.wrapper.mjs';
30
31
  export { PInputPassword } from './lib/components/input-password.wrapper.mjs';
31
32
  export { PLink } from './lib/components/link.wrapper.mjs';
32
33
  export { PLinkPure } from './lib/components/link-pure.wrapper.mjs';
@@ -26,6 +26,7 @@ export * from './heading.wrapper';
26
26
  export * from './headline.wrapper';
27
27
  export * from './icon.wrapper';
28
28
  export * from './inline-notification.wrapper';
29
+ export * from './input-number.wrapper';
29
30
  export * from './input-password.wrapper';
30
31
  export * from './link.wrapper';
31
32
  export * from './link-pure.wrapper';
@@ -0,0 +1,184 @@
1
+ import type { BaseProps } from '../../BaseProps';
2
+ import type { InputNumberAutoComplete, BreakpointCustomizable, InputNumberBlurEventDetail, InputNumberChangeEventDetail, InputNumberInputEventDetail, InputNumberState, Theme } from '../types';
3
+ export type PInputNumberProps = BaseProps & {
4
+ /**
5
+ * Specifies whether the input can be autofilled by the browser
6
+ */
7
+ autoComplete?: InputNumberAutoComplete;
8
+ /**
9
+ * Displays as compact version.
10
+ */
11
+ compact?: boolean;
12
+ /**
13
+ * Show or hide the increment/decrement stepper controls.
14
+ */
15
+ controls?: boolean;
16
+ /**
17
+ * The description text.
18
+ */
19
+ description?: string;
20
+ /**
21
+ * Marks the number input as disabled.
22
+ */
23
+ disabled?: boolean;
24
+ /**
25
+ * The id of a form element the number input should be associated with.
26
+ */
27
+ form?: string;
28
+ /**
29
+ * Show or hide label and description text. For better accessibility it is recommended to show the label.
30
+ */
31
+ hideLabel?: BreakpointCustomizable<boolean>;
32
+ /**
33
+ * The label text.
34
+ */
35
+ label?: string;
36
+ /**
37
+ * The max value of the number input.
38
+ */
39
+ max?: number;
40
+ /**
41
+ * The message styled depending on validation state.
42
+ */
43
+ message?: string;
44
+ /**
45
+ * The min value of the number input.
46
+ */
47
+ min?: number;
48
+ /**
49
+ * The name of the number input.
50
+ */
51
+ name: string;
52
+ /**
53
+ * Emitted when the number input has lost focus.
54
+ */
55
+ onBlur?: (event: CustomEvent<InputNumberBlurEventDetail>) => void;
56
+ /**
57
+ * Emitted when the number input loses focus after its value was changed.
58
+ */
59
+ onChange?: (event: CustomEvent<InputNumberChangeEventDetail>) => void;
60
+ /**
61
+ * Emitted when the value has been changed as a direct result of a user action.
62
+ */
63
+ onInput?: (event: CustomEvent<InputNumberInputEventDetail>) => void;
64
+ /**
65
+ * The placeholder text.
66
+ */
67
+ placeholder?: string;
68
+ /**
69
+ * Specifies whether the number input should be read-only.
70
+ */
71
+ readOnly?: boolean;
72
+ /**
73
+ * Marks the number input as required.
74
+ */
75
+ required?: boolean;
76
+ /**
77
+ * The validation state.
78
+ */
79
+ state?: InputNumberState;
80
+ /**
81
+ * The granularity that the value must adhere to.
82
+ */
83
+ step?: number;
84
+ /**
85
+ * Adapts the color depending on the theme.
86
+ */
87
+ theme?: Theme;
88
+ /**
89
+ * The number input value.
90
+ */
91
+ value?: string;
92
+ };
93
+ export declare const PInputNumber: import("react").ForwardRefExoticComponent<import("react").DOMAttributes<{}> & Pick<import("react").HTMLAttributes<{}>, "suppressHydrationWarning" | "autoFocus" | "className" | "dir" | "hidden" | "id" | "inert" | "lang" | "slot" | "style" | "tabIndex" | "title" | "translate" | "role"> & {
94
+ /**
95
+ * Specifies whether the input can be autofilled by the browser
96
+ */
97
+ autoComplete?: InputNumberAutoComplete;
98
+ /**
99
+ * Displays as compact version.
100
+ */
101
+ compact?: boolean;
102
+ /**
103
+ * Show or hide the increment/decrement stepper controls.
104
+ */
105
+ controls?: boolean;
106
+ /**
107
+ * The description text.
108
+ */
109
+ description?: string;
110
+ /**
111
+ * Marks the number input as disabled.
112
+ */
113
+ disabled?: boolean;
114
+ /**
115
+ * The id of a form element the number input should be associated with.
116
+ */
117
+ form?: string;
118
+ /**
119
+ * Show or hide label and description text. For better accessibility it is recommended to show the label.
120
+ */
121
+ hideLabel?: BreakpointCustomizable<boolean>;
122
+ /**
123
+ * The label text.
124
+ */
125
+ label?: string;
126
+ /**
127
+ * The max value of the number input.
128
+ */
129
+ max?: number;
130
+ /**
131
+ * The message styled depending on validation state.
132
+ */
133
+ message?: string;
134
+ /**
135
+ * The min value of the number input.
136
+ */
137
+ min?: number;
138
+ /**
139
+ * The name of the number input.
140
+ */
141
+ name: string;
142
+ /**
143
+ * Emitted when the number input has lost focus.
144
+ */
145
+ onBlur?: (event: CustomEvent<InputNumberBlurEventDetail>) => void;
146
+ /**
147
+ * Emitted when the number input loses focus after its value was changed.
148
+ */
149
+ onChange?: (event: CustomEvent<InputNumberChangeEventDetail>) => void;
150
+ /**
151
+ * Emitted when the value has been changed as a direct result of a user action.
152
+ */
153
+ onInput?: (event: CustomEvent<InputNumberInputEventDetail>) => void;
154
+ /**
155
+ * The placeholder text.
156
+ */
157
+ placeholder?: string;
158
+ /**
159
+ * Specifies whether the number input should be read-only.
160
+ */
161
+ readOnly?: boolean;
162
+ /**
163
+ * Marks the number input as required.
164
+ */
165
+ required?: boolean;
166
+ /**
167
+ * The validation state.
168
+ */
169
+ state?: InputNumberState;
170
+ /**
171
+ * The granularity that the value must adhere to.
172
+ */
173
+ step?: number;
174
+ /**
175
+ * Adapts the color depending on the theme.
176
+ */
177
+ theme?: Theme;
178
+ /**
179
+ * The number input value.
180
+ */
181
+ value?: string;
182
+ } & {
183
+ children?: import("react").ReactNode | undefined;
184
+ } & import("react").RefAttributes<HTMLElement>>;
@@ -0,0 +1,31 @@
1
+ import type { FC } from 'react';
2
+ import type { InputBaseState, InputBaseWheelEventDetail } from '@porsche-design-system/components/dist/utils';
3
+ type InputBaseProps = {
4
+ children?: JSX.Element;
5
+ host: HTMLElement;
6
+ id: string;
7
+ label?: string;
8
+ description?: string;
9
+ required?: boolean;
10
+ disabled?: boolean;
11
+ state?: InputBaseState;
12
+ message?: string;
13
+ theme?: any;
14
+ readOnly?: boolean;
15
+ name: string;
16
+ form?: string;
17
+ placeholder?: string;
18
+ maxLength?: number;
19
+ minLength?: number;
20
+ max?: number;
21
+ min?: number;
22
+ autoComplete?: string;
23
+ type: string;
24
+ value?: string;
25
+ step?: number;
26
+ onWheel?: (e: InputBaseWheelEventDetail) => void;
27
+ start?: JSX.Element;
28
+ end?: JSX.Element;
29
+ };
30
+ export declare const InputBase: FC<InputBaseProps>;
31
+ export {};
@@ -0,0 +1,18 @@
1
+ import { Component } from 'react';
2
+ /**
3
+ * @slot {"name": "label", "description": "Shows a label. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
4
+ * @slot {"name": "description", "description": "Shows a description. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
5
+ * @slot {"name": "message", "description": "Shows a state message. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
6
+ * @slot {"name": "start", "description": "Shows content at the start of the input (e.g. unit prefix)."}
7
+ * @slot {"name": "end", "description": "Shows content at the end of the input (e.g. toggle button, unit suffix)."}
8
+ */
9
+ export declare class DSRInputNumber extends Component<any> {
10
+ host: HTMLElement;
11
+ private internals;
12
+ private inputElement;
13
+ private defaultValue;
14
+ formResetCallback(): void;
15
+ formDisabledCallback(): void;
16
+ formStateRestoreCallback(): void;
17
+ render(): JSX.Element;
18
+ }
@@ -1,8 +1,10 @@
1
1
  import { Component } from 'react';
2
2
  /**
3
- * @slot {"name": "label", "description": "Shows a label. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed." }
4
- * @slot {"name": "description", "description": "Shows a description. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed." }
5
- * @slot {"name": "message", "description": "Shows a state message. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed." }
3
+ * @slot {"name": "label", "description": "Shows a label. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
4
+ * @slot {"name": "description", "description": "Shows a description. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
5
+ * @slot {"name": "message", "description": "Shows a state message. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
6
+ * @slot {"name": "start", "description": "Shows content at the start of the input (e.g. unit prefix)."}
7
+ * @slot {"name": "end", "description": "Shows content at the end of the input (e.g. toggle button, unit suffix)."}
6
8
  */
7
9
  export declare class DSRInputPassword extends Component<any> {
8
10
  host: HTMLElement;
@@ -10,7 +10,6 @@ import { Component } from 'react';
10
10
  export declare class DSRMultiSelect extends Component<any> {
11
11
  host: HTMLElement;
12
12
  private isOpen;
13
- private srHighlightedOptionText;
14
13
  private hasFilterResults;
15
14
  private internals;
16
15
  private defaultValue;