@porsche-design-system/components-react 3.28.0 → 3.29.0-rc.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.
- package/CHANGELOG.md +13 -0
- package/cjs/lib/components/input-number.wrapper.cjs +3 -3
- package/cjs/lib/components/input-password.wrapper.cjs +3 -3
- package/cjs/lib/components/input-search.wrapper.cjs +29 -0
- package/cjs/lib/components/input-text.wrapper.cjs +29 -0
- package/cjs/lib/components/select.wrapper.cjs +3 -3
- package/cjs/lib/components/textarea.wrapper.cjs +1 -1
- package/cjs/public-api.cjs +4 -0
- package/esm/lib/components/index.d.ts +2 -0
- package/esm/lib/components/input-number.wrapper.d.ts +12 -4
- package/esm/lib/components/input-number.wrapper.mjs +3 -3
- package/esm/lib/components/input-password.wrapper.d.ts +10 -2
- package/esm/lib/components/input-password.wrapper.mjs +3 -3
- package/esm/lib/components/input-search.wrapper.d.ts +176 -0
- package/esm/lib/components/input-search.wrapper.mjs +27 -0
- package/esm/lib/components/input-text.wrapper.d.ts +192 -0
- package/esm/lib/components/input-text.wrapper.mjs +27 -0
- package/esm/lib/components/select.wrapper.d.ts +8 -0
- package/esm/lib/components/select.wrapper.mjs +3 -3
- package/esm/lib/components/textarea.wrapper.d.ts +4 -4
- package/esm/lib/components/textarea.wrapper.mjs +1 -1
- package/esm/lib/types.d.ts +20 -5
- package/esm/public-api.mjs +2 -0
- package/package.json +2 -2
- package/ssr/cjs/components/dist/styles/esm/styles-entry.cjs +179 -77
- package/ssr/cjs/components/dist/utils/esm/utils-entry.cjs +4 -15
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/input-number.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/input-password.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/input-search.wrapper.cjs +40 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/input-text.wrapper.cjs +40 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/select.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/textarea.wrapper.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-base.cjs +8 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-number.cjs +5 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-password.cjs +4 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-search.cjs +47 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-text.cjs +43 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select.cjs +4 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/public-api.cjs +4 -0
- package/ssr/esm/components/dist/styles/esm/styles-entry.mjs +148 -48
- package/ssr/esm/components/dist/utils/esm/utils-entry.mjs +4 -15
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/input-number.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/input-password.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/input-search.wrapper.mjs +38 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/input-text.wrapper.mjs +38 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/select.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/textarea.wrapper.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/accordion.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/banner.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button-group.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button-pure.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button-tile.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/canvas.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/carousel.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox-wrapper.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/content-wrapper.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/crest.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/display.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/divider.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/drilldown-item.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/drilldown-link.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/drilldown.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/fieldset-wrapper.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/fieldset.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flex-item.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flex.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flyout.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/grid-item.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/grid.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/heading.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/headline.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/icon.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/inline-notification.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-base.mjs +8 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-number.mjs +6 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-password.mjs +5 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-search.mjs +45 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-text.mjs +41 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select.mjs +5 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/public-api.mjs +2 -0
- package/ssr/esm/lib/components/index.d.ts +2 -0
- package/ssr/esm/lib/components/input-number.wrapper.d.ts +12 -4
- package/ssr/esm/lib/components/input-password.wrapper.d.ts +10 -2
- package/ssr/esm/lib/components/input-search.wrapper.d.ts +176 -0
- package/ssr/esm/lib/components/input-text.wrapper.d.ts +192 -0
- package/ssr/esm/lib/components/select.wrapper.d.ts +8 -0
- package/ssr/esm/lib/components/textarea.wrapper.d.ts +4 -4
- package/ssr/esm/lib/dsr-components/input-base.d.ts +4 -2
- package/ssr/esm/lib/dsr-components/input-number.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/input-password.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/input-search.d.ts +20 -0
- package/ssr/esm/lib/dsr-components/input-text.d.ts +19 -0
- package/ssr/esm/lib/dsr-components/select.d.ts +2 -0
- package/ssr/esm/lib/types.d.ts +20 -5
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/headline.mjs
CHANGED
|
@@ -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$
|
|
5
|
+
import { getHeadlineCss as getComponentCss$S } 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$
|
|
22
|
+
const style = minifyCss(getComponentCss$S(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$
|
|
4
|
+
import { getIconCss as getComponentCss$R } 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$
|
|
18
|
+
const style = minifyCss(getComponentCss$R(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$
|
|
6
|
+
import { getInlineNotificationCss as getComponentCss$Q } 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$
|
|
27
|
+
const style = minifyCss(getComponentCss$Q(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
|
}
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-base.mjs
CHANGED
|
@@ -1,20 +1,24 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { splitChildren } from '../../splitChildren.mjs';
|
|
3
|
-
import
|
|
3
|
+
import 'react';
|
|
4
|
+
import '../../provider.mjs';
|
|
4
5
|
import { descriptionId } from '../../../../../../components/dist/utils/esm/utils-entry.mjs';
|
|
6
|
+
import { loadingId, LoadingMessage } from './loading-message.mjs';
|
|
7
|
+
import { Label } from './label.mjs';
|
|
5
8
|
import { messageId, StateMessage } from './state-message.mjs';
|
|
9
|
+
import { PSpinner } from '../components/spinner.wrapper.mjs';
|
|
6
10
|
|
|
7
11
|
const InputBase = ({ children,
|
|
8
12
|
// host,
|
|
9
|
-
id, label, description, required, disabled, state, message, theme, readOnly, type, form, placeholder, maxLength, minLength, max, min, value, step, autoComplete, name,
|
|
13
|
+
id, label, description, loading, initialLoading, required, disabled, state, message, theme, readOnly, type, form, placeholder, maxLength, minLength, max, min, value, step, spellCheck, autoComplete, name,
|
|
10
14
|
// onInput,
|
|
11
|
-
onWheel,
|
|
15
|
+
// onWheel,
|
|
12
16
|
// onChange,
|
|
13
17
|
// onBlur,
|
|
14
18
|
// refElement,
|
|
15
19
|
start, end, }) => {
|
|
16
20
|
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,
|
|
21
|
+
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, value: value, readOnly: readOnly, autoComplete: autoComplete, disabled: disabled }), end, jsx("slot", { name: "end" }), loading && jsx(PSpinner, { className: "spinner", size: "inherit", theme: theme, "aria-hidden": "true" })] }), jsx(StateMessage, { hasMessage: (message || namedSlotChildren.filter(({ props: { slot } }) => slot === 'message').length > 0) && ['success', 'error'].includes(state), state: state, message: message, theme: theme, host: null }), jsx(LoadingMessage, { loading: loading, initialLoading: initialLoading })] }));
|
|
18
22
|
};
|
|
19
23
|
|
|
20
24
|
export { InputBase };
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-number.mjs
CHANGED
|
@@ -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 { getInputNumberCss as getComponentCss$
|
|
6
|
+
import { getInputNumberCss as getComponentCss$P } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
|
|
7
7
|
import { PButtonPure } from '../components/button-pure.wrapper.mjs';
|
|
8
8
|
import { InputBase } from './input-base.mjs';
|
|
9
9
|
|
|
@@ -19,10 +19,11 @@ class DSRInputNumber extends Component {
|
|
|
19
19
|
// The "name" property is reflected as an attribute to ensure compatibility with native form submission.
|
|
20
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
21
|
internals;
|
|
22
|
+
initialLoading = false;
|
|
22
23
|
inputElement;
|
|
23
24
|
defaultValue;
|
|
24
25
|
formResetCallback() {
|
|
25
|
-
|
|
26
|
+
// triggers value watcher
|
|
26
27
|
}
|
|
27
28
|
formDisabledCallback() {
|
|
28
29
|
}
|
|
@@ -30,8 +31,9 @@ class DSRInputNumber extends Component {
|
|
|
30
31
|
}
|
|
31
32
|
render() {
|
|
32
33
|
splitChildren(this.props.children);
|
|
33
|
-
const style = minifyCss(getComponentCss$
|
|
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"
|
|
34
|
+
const style = minifyCss(getComponentCss$P(this.props.disabled, this.props.loading, this.props.hideLabel, this.props.state, this.props.compact, this.props.readOnly, this.props.theme, this.props.controls));
|
|
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-number" // prevent React default scroll-to-[increment|decrement] on number inputs
|
|
36
|
+
, 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, loading: this.props.loading, initialLoading: this.props.initialLoading, ...(this.props.controls && {
|
|
35
37
|
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
38
|
}) })] }), this.props.children] }));
|
|
37
39
|
}
|
|
@@ -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 { getInputPasswordCss as getComponentCss$
|
|
6
|
+
import { getInputPasswordCss as getComponentCss$O } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
|
|
7
7
|
import { PButtonPure } from '../components/button-pure.wrapper.mjs';
|
|
8
8
|
import { InputBase } from './input-base.mjs';
|
|
9
9
|
|
|
@@ -20,10 +20,11 @@ class DSRInputPassword extends Component {
|
|
|
20
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
21
|
internals;
|
|
22
22
|
showPassword = false;
|
|
23
|
+
initialLoading = false;
|
|
23
24
|
inputElement;
|
|
24
25
|
defaultValue;
|
|
25
26
|
formResetCallback() {
|
|
26
|
-
|
|
27
|
+
// triggers value watcher
|
|
27
28
|
}
|
|
28
29
|
formDisabledCallback() {
|
|
29
30
|
}
|
|
@@ -31,8 +32,8 @@ class DSRInputPassword extends Component {
|
|
|
31
32
|
}
|
|
32
33
|
render() {
|
|
33
34
|
splitChildren(this.props.children);
|
|
34
|
-
const style = minifyCss(getComponentCss$
|
|
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] }));
|
|
35
|
+
const style = minifyCss(getComponentCss$O(this.props.disabled, this.props.loading, 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 } }), 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, loading: this.props.loading, initialLoading: this.props.initialLoading, 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] }));
|
|
36
37
|
}
|
|
37
38
|
}
|
|
38
39
|
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-search.mjs
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
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 { getInputSearchCss as getComponentCss$N } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
|
|
7
|
+
import { PButtonPure } from '../components/button-pure.wrapper.mjs';
|
|
8
|
+
import { PIcon } from '../components/icon.wrapper.mjs';
|
|
9
|
+
import { InputBase } from './input-base.mjs';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* @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."}
|
|
13
|
+
* @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."}
|
|
14
|
+
* @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."}
|
|
15
|
+
* @slot {"name": "start", "description": "Shows content at the start of the input (e.g. icon)."}
|
|
16
|
+
* @slot {"name": "end", "description": "Shows content at the end of the input (e.g. search button)."}
|
|
17
|
+
*/
|
|
18
|
+
class DSRInputSearch extends Component {
|
|
19
|
+
host;
|
|
20
|
+
// The "name" property is reflected as an attribute to ensure compatibility with native form submission.
|
|
21
|
+
// 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.
|
|
22
|
+
internals;
|
|
23
|
+
isClearable = false;
|
|
24
|
+
initialLoading = false;
|
|
25
|
+
inputElement;
|
|
26
|
+
defaultValue;
|
|
27
|
+
formResetCallback() {
|
|
28
|
+
// triggers value watcher
|
|
29
|
+
}
|
|
30
|
+
formDisabledCallback() {
|
|
31
|
+
}
|
|
32
|
+
formStateRestoreCallback() {
|
|
33
|
+
}
|
|
34
|
+
render() {
|
|
35
|
+
splitChildren(this.props.children);
|
|
36
|
+
const style = minifyCss(getComponentCss$N(this.props.disabled, this.props.loading, this.props.hideLabel, this.props.state, this.props.compact, this.props.readOnly, this.props.theme, this.props.clear));
|
|
37
|
+
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-search", name: this.props.name, form: this.props.form, type: "search", required: this.props.required, placeholder: this.props.placeholder, 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, loading: this.props.loading, initialLoading: this.props.initialLoading, ...(this.props.indicator && {
|
|
38
|
+
start: jsx(PIcon, { "aria-hidden": "true", name: "search", color: "state-disabled", theme: this.props.theme }),
|
|
39
|
+
}), ...(this.props.clear && {
|
|
40
|
+
end: (jsx(PButtonPure, { tabIndex: -1, hideLabel: true, theme: this.props.theme, className: "button", type: "button", icon: "close", hidden: !this.props.isClearable, disabled: this.props.readOnly || this.props.disabled, children: "Clear field" })),
|
|
41
|
+
}) })] }), this.props.children] }));
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export { DSRInputSearch };
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-text.mjs
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { splitChildren } from '../../splitChildren.mjs';
|
|
3
|
+
import { Component } from 'react';
|
|
4
|
+
import { minifyCss } from '../../minifyCss.mjs';
|
|
5
|
+
import { getInputTextCss as getComponentCss$M } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
|
|
6
|
+
import { InputBase } from './input-base.mjs';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @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."}
|
|
10
|
+
* @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."}
|
|
11
|
+
* @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."}
|
|
12
|
+
* @slot {"name": "start", "description": "Shows content at the start of the input (e.g. unit prefix)."}
|
|
13
|
+
* @slot {"name": "end", "description": "Shows content at the end of the input (e.g. toggle button, unit suffix)."}
|
|
14
|
+
*/
|
|
15
|
+
class DSRInputText extends Component {
|
|
16
|
+
host;
|
|
17
|
+
// The "name" property is reflected as an attribute to ensure compatibility with native form submission.
|
|
18
|
+
// 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.
|
|
19
|
+
internals;
|
|
20
|
+
initialLoading = false;
|
|
21
|
+
inputElement;
|
|
22
|
+
defaultValue;
|
|
23
|
+
formResetCallback() {
|
|
24
|
+
// triggers value watcher
|
|
25
|
+
}
|
|
26
|
+
formDisabledCallback() {
|
|
27
|
+
}
|
|
28
|
+
formStateRestoreCallback() {
|
|
29
|
+
}
|
|
30
|
+
render() {
|
|
31
|
+
splitChildren(this.props.children);
|
|
32
|
+
const style = minifyCss(getComponentCss$M(this.props.disabled, this.props.loading, this.props.hideLabel, this.props.state, this.props.compact, this.props.readOnly, this.props.theme, this.props.counter));
|
|
33
|
+
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-text" // prevent React default scroll-to-[increment|decrement] on text inputs
|
|
34
|
+
, name: this.props.name, form: this.props.form, type: "text", 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, spellCheck: this.props.spellCheck, loading: this.props.loading, initialLoading: this.props.initialLoading, ...(this.props.counter &&
|
|
35
|
+
this.props.maxLength && {
|
|
36
|
+
end: (jsxs(Fragment, { children: [jsx("span", { className: "sr-only", "aria-live": "polite", children: `You have ${this.props.maxLength - this.props.value.length} out of ${this.props.maxLength} characters left` }), jsxs("span", { className: "counter", "aria-hidden": "true", children: [this.props.value.length, "/", this.props.maxLength] })] })),
|
|
37
|
+
}) })] }), this.props.children] }));
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export { DSRInputText };
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select.mjs
CHANGED
|
@@ -4,10 +4,11 @@ import '../../provider.mjs';
|
|
|
4
4
|
import { splitChildren } from '../../splitChildren.mjs';
|
|
5
5
|
import { minifyCss } from '../../minifyCss.mjs';
|
|
6
6
|
import { getSelectCss as getComponentCss$q } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
|
|
7
|
-
import { getHasNativePopoverSupport, getSelectedOptionString, getComboboxAriaAttributes,
|
|
7
|
+
import { getHasNativePopoverSupport, getSelectedOptionString, getComboboxAriaAttributes, getComboboxFilterAriaAttributes, labelId } from '../../../../../../components/dist/utils/esm/utils-entry.mjs';
|
|
8
8
|
import { Label } from './label.mjs';
|
|
9
9
|
import { messageId, StateMessage } from './state-message.mjs';
|
|
10
10
|
import { PIcon } from '../components/icon.wrapper.mjs';
|
|
11
|
+
import { PInputSearch } from '../components/input-search.wrapper.mjs';
|
|
11
12
|
|
|
12
13
|
/**
|
|
13
14
|
* @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." }
|
|
@@ -22,10 +23,12 @@ class DSRSelect extends Component {
|
|
|
22
23
|
// The "name" property is reflected as an attribute to ensure compatibility with native form submission.
|
|
23
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.
|
|
24
25
|
isOpen = false;
|
|
26
|
+
hasFilterResults = true;
|
|
25
27
|
internals;
|
|
26
28
|
defaultValue;
|
|
27
29
|
buttonElement;
|
|
28
30
|
popoverElement;
|
|
31
|
+
filterInputElement;
|
|
29
32
|
selectOptions = [];
|
|
30
33
|
selectOptgroups = [];
|
|
31
34
|
preventOptionUpdate = false; // Used to prevent value watcher from updating options when options are already updated
|
|
@@ -50,7 +53,7 @@ class DSRSelect extends Component {
|
|
|
50
53
|
const ariaDescribedBy = [descriptionId, selectMessageId].filter(Boolean).join(' ');
|
|
51
54
|
const selectedOption = getSelectedOptionString(otherChildren);
|
|
52
55
|
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));
|
|
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" })] }),
|
|
56
|
+
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" })] }), jsxs("div", { id: popoverId, popover: "manual", tabIndex: -1, role: "dialog", "aria-label": this.props.label, "aria-hidden": this.props.isOpen ? null : 'true', children: [this.props.filter && (jsx(PInputSearch, { className: "filter", name: "filter", label: "Filter options", hideLabel: true, autoComplete: "off", clear: true, compact: true, theme: this.props.theme, ...getComboboxFilterAriaAttributes() })), jsxs("div", { className: "options", role: "listbox", "aria-label": this.props.label, children: [this.props.filter && !this.props.hasFilterResults && (jsx("div", { className: "no-results", "aria-live": "polite", role: "option", children: jsx("span", { "aria-hidden": "true", children: "\u2013" }) })), 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] }));
|
|
54
57
|
}
|
|
55
58
|
getSelectedOptionImagePath = (options) => {
|
|
56
59
|
return (options
|
|
@@ -29,6 +29,8 @@ export { PIcon } from './lib/components/icon.wrapper.mjs';
|
|
|
29
29
|
export { PInlineNotification } from './lib/components/inline-notification.wrapper.mjs';
|
|
30
30
|
export { PInputNumber } from './lib/components/input-number.wrapper.mjs';
|
|
31
31
|
export { PInputPassword } from './lib/components/input-password.wrapper.mjs';
|
|
32
|
+
export { PInputSearch } from './lib/components/input-search.wrapper.mjs';
|
|
33
|
+
export { PInputText } from './lib/components/input-text.wrapper.mjs';
|
|
32
34
|
export { PLink } from './lib/components/link.wrapper.mjs';
|
|
33
35
|
export { PLinkPure } from './lib/components/link-pure.wrapper.mjs';
|
|
34
36
|
export { PLinkSocial } from './lib/components/link-social.wrapper.mjs';
|
|
@@ -28,6 +28,8 @@ export * from './icon.wrapper';
|
|
|
28
28
|
export * from './inline-notification.wrapper';
|
|
29
29
|
export * from './input-number.wrapper';
|
|
30
30
|
export * from './input-password.wrapper';
|
|
31
|
+
export * from './input-search.wrapper';
|
|
32
|
+
export * from './input-text.wrapper';
|
|
31
33
|
export * from './link.wrapper';
|
|
32
34
|
export * from './link-pure.wrapper';
|
|
33
35
|
export * from './link-social.wrapper';
|
|
@@ -6,7 +6,7 @@ export type PInputNumberProps = BaseProps & {
|
|
|
6
6
|
*/
|
|
7
7
|
autoComplete?: InputNumberAutoComplete;
|
|
8
8
|
/**
|
|
9
|
-
* Displays as compact version.
|
|
9
|
+
* Displays as a compact version.
|
|
10
10
|
*/
|
|
11
11
|
compact?: boolean;
|
|
12
12
|
/**
|
|
@@ -26,13 +26,17 @@ export type PInputNumberProps = BaseProps & {
|
|
|
26
26
|
*/
|
|
27
27
|
form?: string;
|
|
28
28
|
/**
|
|
29
|
-
* Show or hide label and description text. For better accessibility it is recommended to show the label.
|
|
29
|
+
* Show or hide label and description text. For better accessibility, it is recommended to show the label.
|
|
30
30
|
*/
|
|
31
31
|
hideLabel?: BreakpointCustomizable<boolean>;
|
|
32
32
|
/**
|
|
33
33
|
* The label text.
|
|
34
34
|
*/
|
|
35
35
|
label?: string;
|
|
36
|
+
/**
|
|
37
|
+
* @experimental Shows a loading indicator.
|
|
38
|
+
*/
|
|
39
|
+
loading?: boolean;
|
|
36
40
|
/**
|
|
37
41
|
* The max value of the number input.
|
|
38
42
|
*/
|
|
@@ -96,7 +100,7 @@ export declare const PInputNumber: import("react").ForwardRefExoticComponent<imp
|
|
|
96
100
|
*/
|
|
97
101
|
autoComplete?: InputNumberAutoComplete;
|
|
98
102
|
/**
|
|
99
|
-
* Displays as compact version.
|
|
103
|
+
* Displays as a compact version.
|
|
100
104
|
*/
|
|
101
105
|
compact?: boolean;
|
|
102
106
|
/**
|
|
@@ -116,13 +120,17 @@ export declare const PInputNumber: import("react").ForwardRefExoticComponent<imp
|
|
|
116
120
|
*/
|
|
117
121
|
form?: string;
|
|
118
122
|
/**
|
|
119
|
-
* Show or hide label and description text. For better accessibility it is recommended to show the label.
|
|
123
|
+
* Show or hide label and description text. For better accessibility, it is recommended to show the label.
|
|
120
124
|
*/
|
|
121
125
|
hideLabel?: BreakpointCustomizable<boolean>;
|
|
122
126
|
/**
|
|
123
127
|
* The label text.
|
|
124
128
|
*/
|
|
125
129
|
label?: string;
|
|
130
|
+
/**
|
|
131
|
+
* @experimental Shows a loading indicator.
|
|
132
|
+
*/
|
|
133
|
+
loading?: boolean;
|
|
126
134
|
/**
|
|
127
135
|
* The max value of the number input.
|
|
128
136
|
*/
|
|
@@ -6,7 +6,7 @@ export type PInputPasswordProps = BaseProps & {
|
|
|
6
6
|
*/
|
|
7
7
|
autoComplete?: InputPasswordAutoComplete;
|
|
8
8
|
/**
|
|
9
|
-
* Displays as compact version.
|
|
9
|
+
* Displays as a compact version.
|
|
10
10
|
*/
|
|
11
11
|
compact?: boolean;
|
|
12
12
|
/**
|
|
@@ -29,6 +29,10 @@ export type PInputPasswordProps = BaseProps & {
|
|
|
29
29
|
* The label text.
|
|
30
30
|
*/
|
|
31
31
|
label?: string;
|
|
32
|
+
/**
|
|
33
|
+
* @experimental Shows a loading indicator.
|
|
34
|
+
*/
|
|
35
|
+
loading?: boolean;
|
|
32
36
|
/**
|
|
33
37
|
* The max length of the password input.
|
|
34
38
|
*/
|
|
@@ -92,7 +96,7 @@ export declare const PInputPassword: import("react").ForwardRefExoticComponent<i
|
|
|
92
96
|
*/
|
|
93
97
|
autoComplete?: InputPasswordAutoComplete;
|
|
94
98
|
/**
|
|
95
|
-
* Displays as compact version.
|
|
99
|
+
* Displays as a compact version.
|
|
96
100
|
*/
|
|
97
101
|
compact?: boolean;
|
|
98
102
|
/**
|
|
@@ -115,6 +119,10 @@ export declare const PInputPassword: import("react").ForwardRefExoticComponent<i
|
|
|
115
119
|
* The label text.
|
|
116
120
|
*/
|
|
117
121
|
label?: string;
|
|
122
|
+
/**
|
|
123
|
+
* @experimental Shows a loading indicator.
|
|
124
|
+
*/
|
|
125
|
+
loading?: boolean;
|
|
118
126
|
/**
|
|
119
127
|
* The max length of the password input.
|
|
120
128
|
*/
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import type { BaseProps } from '../../BaseProps';
|
|
2
|
+
import type { InputSearchAutoComplete, BreakpointCustomizable, InputSearchBlurEventDetail, InputSearchChangeEventDetail, InputSearchInputEventDetail, InputSearchState, Theme } from '../types';
|
|
3
|
+
export type PInputSearchProps = BaseProps & {
|
|
4
|
+
/**
|
|
5
|
+
* Specifies whether the input can be autofilled by the browser
|
|
6
|
+
*/
|
|
7
|
+
autoComplete?: InputSearchAutoComplete;
|
|
8
|
+
/**
|
|
9
|
+
* Show clear input value button
|
|
10
|
+
*/
|
|
11
|
+
clear?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Displays as a compact version.
|
|
14
|
+
*/
|
|
15
|
+
compact?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* The description text.
|
|
18
|
+
*/
|
|
19
|
+
description?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Marks the search input as disabled.
|
|
22
|
+
*/
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* The id of a form element the search 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
|
+
* Show search indicator icon
|
|
34
|
+
*/
|
|
35
|
+
indicator?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* The label text.
|
|
38
|
+
*/
|
|
39
|
+
label?: string;
|
|
40
|
+
/**
|
|
41
|
+
* @experimental Shows a loading indicator.
|
|
42
|
+
*/
|
|
43
|
+
loading?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* The message styled depending on validation state.
|
|
46
|
+
*/
|
|
47
|
+
message?: string;
|
|
48
|
+
/**
|
|
49
|
+
* The name of the search input.
|
|
50
|
+
*/
|
|
51
|
+
name: string;
|
|
52
|
+
/**
|
|
53
|
+
* Emitted when the search input has lost focus.
|
|
54
|
+
*/
|
|
55
|
+
onBlur?: (event: CustomEvent<InputSearchBlurEventDetail>) => void;
|
|
56
|
+
/**
|
|
57
|
+
* Emitted when the search input loses focus after its value was changed.
|
|
58
|
+
*/
|
|
59
|
+
onChange?: (event: CustomEvent<InputSearchChangeEventDetail>) => void;
|
|
60
|
+
/**
|
|
61
|
+
* Emitted when the value has been changed as a direct result of a user action.
|
|
62
|
+
*/
|
|
63
|
+
onInput?: (event: CustomEvent<InputSearchInputEventDetail>) => void;
|
|
64
|
+
/**
|
|
65
|
+
* The placeholder text.
|
|
66
|
+
*/
|
|
67
|
+
placeholder?: string;
|
|
68
|
+
/**
|
|
69
|
+
* Specifies whether the search input should be read-only.
|
|
70
|
+
*/
|
|
71
|
+
readOnly?: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Marks the search input as required.
|
|
74
|
+
*/
|
|
75
|
+
required?: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* The validation state.
|
|
78
|
+
*/
|
|
79
|
+
state?: InputSearchState;
|
|
80
|
+
/**
|
|
81
|
+
* Adapts the color depending on the theme.
|
|
82
|
+
*/
|
|
83
|
+
theme?: Theme;
|
|
84
|
+
/**
|
|
85
|
+
* The search input value.
|
|
86
|
+
*/
|
|
87
|
+
value?: string;
|
|
88
|
+
};
|
|
89
|
+
export declare const PInputSearch: import("react").ForwardRefExoticComponent<import("react").DOMAttributes<{}> & Pick<import("react").HTMLAttributes<{}>, "suppressHydrationWarning" | "autoFocus" | "className" | "dir" | "hidden" | "id" | "inert" | "lang" | "slot" | "style" | "tabIndex" | "title" | "translate" | "role"> & {
|
|
90
|
+
/**
|
|
91
|
+
* Specifies whether the input can be autofilled by the browser
|
|
92
|
+
*/
|
|
93
|
+
autoComplete?: InputSearchAutoComplete;
|
|
94
|
+
/**
|
|
95
|
+
* Show clear input value button
|
|
96
|
+
*/
|
|
97
|
+
clear?: boolean;
|
|
98
|
+
/**
|
|
99
|
+
* Displays as a compact version.
|
|
100
|
+
*/
|
|
101
|
+
compact?: boolean;
|
|
102
|
+
/**
|
|
103
|
+
* The description text.
|
|
104
|
+
*/
|
|
105
|
+
description?: string;
|
|
106
|
+
/**
|
|
107
|
+
* Marks the search input as disabled.
|
|
108
|
+
*/
|
|
109
|
+
disabled?: boolean;
|
|
110
|
+
/**
|
|
111
|
+
* The id of a form element the search input should be associated with.
|
|
112
|
+
*/
|
|
113
|
+
form?: string;
|
|
114
|
+
/**
|
|
115
|
+
* Show or hide label and description text. For better accessibility it is recommended to show the label.
|
|
116
|
+
*/
|
|
117
|
+
hideLabel?: BreakpointCustomizable<boolean>;
|
|
118
|
+
/**
|
|
119
|
+
* Show search indicator icon
|
|
120
|
+
*/
|
|
121
|
+
indicator?: boolean;
|
|
122
|
+
/**
|
|
123
|
+
* The label text.
|
|
124
|
+
*/
|
|
125
|
+
label?: string;
|
|
126
|
+
/**
|
|
127
|
+
* @experimental Shows a loading indicator.
|
|
128
|
+
*/
|
|
129
|
+
loading?: boolean;
|
|
130
|
+
/**
|
|
131
|
+
* The message styled depending on validation state.
|
|
132
|
+
*/
|
|
133
|
+
message?: string;
|
|
134
|
+
/**
|
|
135
|
+
* The name of the search input.
|
|
136
|
+
*/
|
|
137
|
+
name: string;
|
|
138
|
+
/**
|
|
139
|
+
* Emitted when the search input has lost focus.
|
|
140
|
+
*/
|
|
141
|
+
onBlur?: (event: CustomEvent<InputSearchBlurEventDetail>) => void;
|
|
142
|
+
/**
|
|
143
|
+
* Emitted when the search input loses focus after its value was changed.
|
|
144
|
+
*/
|
|
145
|
+
onChange?: (event: CustomEvent<InputSearchChangeEventDetail>) => void;
|
|
146
|
+
/**
|
|
147
|
+
* Emitted when the value has been changed as a direct result of a user action.
|
|
148
|
+
*/
|
|
149
|
+
onInput?: (event: CustomEvent<InputSearchInputEventDetail>) => void;
|
|
150
|
+
/**
|
|
151
|
+
* The placeholder text.
|
|
152
|
+
*/
|
|
153
|
+
placeholder?: string;
|
|
154
|
+
/**
|
|
155
|
+
* Specifies whether the search input should be read-only.
|
|
156
|
+
*/
|
|
157
|
+
readOnly?: boolean;
|
|
158
|
+
/**
|
|
159
|
+
* Marks the search input as required.
|
|
160
|
+
*/
|
|
161
|
+
required?: boolean;
|
|
162
|
+
/**
|
|
163
|
+
* The validation state.
|
|
164
|
+
*/
|
|
165
|
+
state?: InputSearchState;
|
|
166
|
+
/**
|
|
167
|
+
* Adapts the color depending on the theme.
|
|
168
|
+
*/
|
|
169
|
+
theme?: Theme;
|
|
170
|
+
/**
|
|
171
|
+
* The search input value.
|
|
172
|
+
*/
|
|
173
|
+
value?: string;
|
|
174
|
+
} & {
|
|
175
|
+
children?: import("react").ReactNode | undefined;
|
|
176
|
+
} & import("react").RefAttributes<HTMLElement>>;
|