@porsche-design-system/components-react 4.7.0-rc.0 → 4.8.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 +87 -1
- package/cjs/hooks.cjs +1 -5
- package/cjs/lib/components/checkbox.wrapper.cjs +3 -3
- package/cjs/lib/components/input-date.wrapper.cjs +3 -3
- package/cjs/lib/components/input-email.wrapper.cjs +3 -3
- package/cjs/lib/components/input-month.wrapper.cjs +3 -3
- 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-tel.wrapper.cjs +3 -3
- package/cjs/lib/components/input-text.wrapper.cjs +3 -3
- package/cjs/lib/components/input-time.wrapper.cjs +3 -3
- package/cjs/lib/components/input-url.wrapper.cjs +3 -3
- package/cjs/lib/components/input-week.wrapper.cjs +3 -3
- package/cjs/lib/components/multi-select.wrapper.cjs +3 -3
- package/cjs/lib/components/select.wrapper.cjs +3 -3
- package/cjs/lib/components/switch.wrapper.cjs +3 -3
- package/cjs/lib/components/textarea.wrapper.cjs +3 -3
- package/esm/hooks.d.ts +0 -3
- package/esm/hooks.mjs +2 -5
- package/esm/lib/components/checkbox.wrapper.d.ts +9 -1
- package/esm/lib/components/checkbox.wrapper.mjs +3 -3
- package/esm/lib/components/input-date.wrapper.d.ts +9 -1
- package/esm/lib/components/input-date.wrapper.mjs +3 -3
- package/esm/lib/components/input-email.wrapper.d.ts +9 -1
- package/esm/lib/components/input-email.wrapper.mjs +3 -3
- package/esm/lib/components/input-month.wrapper.d.ts +9 -1
- package/esm/lib/components/input-month.wrapper.mjs +3 -3
- package/esm/lib/components/input-number.wrapper.d.ts +9 -1
- package/esm/lib/components/input-number.wrapper.mjs +3 -3
- package/esm/lib/components/input-password.wrapper.d.ts +9 -1
- package/esm/lib/components/input-password.wrapper.mjs +3 -3
- package/esm/lib/components/input-search.wrapper.d.ts +2 -2
- package/esm/lib/components/input-tel.wrapper.d.ts +9 -1
- package/esm/lib/components/input-tel.wrapper.mjs +3 -3
- package/esm/lib/components/input-text.wrapper.d.ts +9 -1
- package/esm/lib/components/input-text.wrapper.mjs +3 -3
- package/esm/lib/components/input-time.wrapper.d.ts +9 -1
- package/esm/lib/components/input-time.wrapper.mjs +3 -3
- package/esm/lib/components/input-url.wrapper.d.ts +9 -1
- package/esm/lib/components/input-url.wrapper.mjs +3 -3
- package/esm/lib/components/input-week.wrapper.d.ts +9 -1
- package/esm/lib/components/input-week.wrapper.mjs +3 -3
- package/esm/lib/components/link-pure.wrapper.d.ts +2 -2
- package/esm/lib/components/link-tile-product.wrapper.d.ts +2 -2
- package/esm/lib/components/link.wrapper.d.ts +2 -2
- package/esm/lib/components/multi-select.wrapper.d.ts +9 -1
- package/esm/lib/components/multi-select.wrapper.mjs +3 -3
- package/esm/lib/components/select.wrapper.d.ts +9 -1
- package/esm/lib/components/select.wrapper.mjs +3 -3
- package/esm/lib/components/switch.wrapper.d.ts +9 -1
- package/esm/lib/components/switch.wrapper.mjs +3 -3
- package/esm/lib/components/textarea.wrapper.d.ts +9 -1
- package/esm/lib/components/textarea.wrapper.mjs +3 -3
- package/esm/lib/types.d.ts +22 -1
- package/package.json +2 -2
- package/skills/pds-audit-deprecations-react/SKILL.md +2 -2
- package/skills/pds-knowledge-react/SKILL.md +3 -3
- package/skills/pds-knowledge-react/references/components/p-carousel/examples/DynamicSlides.tsx +1 -0
- package/skills/pds-knowledge-react/references/components/p-carousel/examples/FocusOnCenterSlide.tsx +1 -0
- package/skills/pds-knowledge-react/references/components/p-carousel/examples/JumpToSlide.tsx +1 -0
- package/skills/pds-knowledge-react/references/components/p-checkbox/accessibility.md +14 -0
- package/skills/pds-knowledge-react/references/components/p-checkbox/p-checkbox.md +12 -0
- package/skills/pds-knowledge-react/references/components/p-input-date/accessibility.md +14 -0
- package/skills/pds-knowledge-react/references/components/p-input-date/p-input-date.md +12 -0
- package/skills/pds-knowledge-react/references/components/p-input-email/accessibility.md +14 -0
- package/skills/pds-knowledge-react/references/components/p-input-email/p-input-email.md +12 -0
- package/skills/pds-knowledge-react/references/components/p-input-month/accessibility.md +14 -0
- package/skills/pds-knowledge-react/references/components/p-input-month/p-input-month.md +12 -0
- package/skills/pds-knowledge-react/references/components/p-input-number/accessibility.md +14 -0
- package/skills/pds-knowledge-react/references/components/p-input-number/p-input-number.md +12 -0
- package/skills/pds-knowledge-react/references/components/p-input-password/accessibility.md +14 -0
- package/skills/pds-knowledge-react/references/components/p-input-password/p-input-password.md +12 -0
- package/skills/pds-knowledge-react/references/components/p-input-search/p-input-search.md +2 -1
- package/skills/pds-knowledge-react/references/components/p-input-tel/accessibility.md +14 -0
- package/skills/pds-knowledge-react/references/components/p-input-tel/p-input-tel.md +12 -0
- package/skills/pds-knowledge-react/references/components/p-input-text/accessibility.md +14 -0
- package/skills/pds-knowledge-react/references/components/p-input-text/p-input-text.md +12 -0
- package/skills/pds-knowledge-react/references/components/p-input-time/accessibility.md +14 -0
- package/skills/pds-knowledge-react/references/components/p-input-time/p-input-time.md +12 -0
- package/skills/pds-knowledge-react/references/components/p-input-url/accessibility.md +14 -0
- package/skills/pds-knowledge-react/references/components/p-input-url/p-input-url.md +12 -0
- package/skills/pds-knowledge-react/references/components/p-input-week/accessibility.md +14 -0
- package/skills/pds-knowledge-react/references/components/p-input-week/p-input-week.md +12 -0
- package/skills/pds-knowledge-react/references/components/p-link/p-link.md +2 -2
- package/skills/pds-knowledge-react/references/components/p-link-pure/p-link-pure.md +2 -2
- package/skills/pds-knowledge-react/references/components/p-link-tile-product/p-link-tile-product.md +2 -2
- package/skills/pds-knowledge-react/references/components/p-multi-select/accessibility.md +22 -0
- package/skills/pds-knowledge-react/references/components/p-multi-select/p-multi-select.md +14 -2
- package/skills/pds-knowledge-react/references/components/p-pin-code/p-pin-code.md +11 -3
- package/skills/pds-knowledge-react/references/components/p-select/accessibility.md +22 -0
- package/skills/pds-knowledge-react/references/components/p-select/p-select.md +14 -2
- package/skills/pds-knowledge-react/references/components/p-switch/accessibility.md +18 -0
- package/skills/pds-knowledge-react/references/components/p-switch/p-switch.md +12 -0
- package/skills/pds-knowledge-react/references/components/p-textarea/accessibility.md +14 -0
- package/skills/pds-knowledge-react/references/components/p-textarea/p-textarea.md +12 -0
- package/skills/pds-knowledge-react/references/deprecations.md +4 -4
- package/ssr/cjs/components/dist/styles/esm/styles-entry.cjs +18 -105
- package/ssr/cjs/components/dist/utils/esm/utils-entry.cjs +78 -156
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/hooks.cjs +1 -5
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/checkbox.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/input-date.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/input-email.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/input-month.wrapper.cjs +4 -4
- 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-tel.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/input-text.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/input-time.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/input-url.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/input-week.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/multi-select.wrapper.cjs +4 -4
- 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/switch.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/textarea.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/drilldown.cjs +2 -2
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-date.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-email.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-month.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-number.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-password.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-tel.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-text.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-time.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-url.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-week.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/label.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-pure.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-tile-product.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/multi-select.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pin-code.cjs +2 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/segmented-control-item.cjs +0 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/stepper-horizontal.cjs +0 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/switch.cjs +1 -2
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs-bar.cjs +0 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs.cjs +0 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/textarea.cjs +1 -1
- package/ssr/esm/components/dist/styles/esm/styles-entry.mjs +18 -105
- package/ssr/esm/components/dist/utils/esm/utils-entry.mjs +78 -150
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/hooks.mjs +2 -5
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/checkbox.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/input-date.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/input-email.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/input-month.wrapper.mjs +4 -4
- 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-tel.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/input-text.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/input-time.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/input-url.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/input-week.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/multi-select.wrapper.mjs +4 -4
- 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/switch.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/textarea.wrapper.mjs +4 -4
- 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/drilldown.mjs +3 -3
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-date.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-email.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-month.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-number.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-password.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-tel.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-text.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-time.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-url.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-week.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/label.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-pure.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-tile-product.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/multi-select.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pin-code.mjs +3 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/segmented-control-item.mjs +0 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/stepper-horizontal.mjs +0 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/switch.mjs +1 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs-bar.mjs +0 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs.mjs +0 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/textarea.mjs +2 -2
- package/ssr/esm/hooks.d.ts +0 -3
- package/ssr/esm/lib/components/checkbox.wrapper.d.ts +9 -1
- package/ssr/esm/lib/components/input-date.wrapper.d.ts +9 -1
- package/ssr/esm/lib/components/input-email.wrapper.d.ts +9 -1
- package/ssr/esm/lib/components/input-month.wrapper.d.ts +9 -1
- package/ssr/esm/lib/components/input-number.wrapper.d.ts +9 -1
- package/ssr/esm/lib/components/input-password.wrapper.d.ts +9 -1
- package/ssr/esm/lib/components/input-search.wrapper.d.ts +2 -2
- package/ssr/esm/lib/components/input-tel.wrapper.d.ts +9 -1
- package/ssr/esm/lib/components/input-text.wrapper.d.ts +9 -1
- package/ssr/esm/lib/components/input-time.wrapper.d.ts +9 -1
- package/ssr/esm/lib/components/input-url.wrapper.d.ts +9 -1
- package/ssr/esm/lib/components/input-week.wrapper.d.ts +9 -1
- package/ssr/esm/lib/components/link-pure.wrapper.d.ts +2 -2
- package/ssr/esm/lib/components/link-tile-product.wrapper.d.ts +2 -2
- package/ssr/esm/lib/components/link.wrapper.d.ts +2 -2
- package/ssr/esm/lib/components/multi-select.wrapper.d.ts +9 -1
- package/ssr/esm/lib/components/select.wrapper.d.ts +9 -1
- package/ssr/esm/lib/components/switch.wrapper.d.ts +9 -1
- package/ssr/esm/lib/components/textarea.wrapper.d.ts +9 -1
- package/ssr/esm/lib/dsr-components/label.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/link-pure.d.ts +1 -1
- package/ssr/esm/lib/dsr-components/link-tile-product.d.ts +1 -1
- package/ssr/esm/lib/dsr-components/link.d.ts +1 -1
- package/ssr/esm/lib/dsr-components/stepper-horizontal.d.ts +0 -1
- package/ssr/esm/lib/dsr-components/tabs-bar.d.ts +0 -1
- package/ssr/esm/lib/dsr-components/tabs.d.ts +0 -1
- package/ssr/esm/lib/types.d.ts +22 -1
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import type { BaseProps } from '../../BaseProps';
|
|
2
|
-
import type { BreakpointCustomizable, InputEmailBlurEventDetail, InputEmailChangeEventDetail, InputEmailInputEventDetail, InputEmailState } from '../types';
|
|
2
|
+
import type { SelectedAriaAttributes, InputEmailAriaAttribute, BreakpointCustomizable, InputEmailBlurEventDetail, InputEmailChangeEventDetail, InputEmailInputEventDetail, InputEmailState } from '../types';
|
|
3
3
|
export type PInputEmailProps = BaseProps & {
|
|
4
|
+
/**
|
|
5
|
+
* Sets additional ARIA attributes on the native input to improve accessibility for screen readers.
|
|
6
|
+
*/
|
|
7
|
+
aria?: SelectedAriaAttributes<InputEmailAriaAttribute>;
|
|
4
8
|
/**
|
|
5
9
|
* Provides the browser with a data type hint to enable relevant autofill suggestions (e.g. `autocomplete='email'`).
|
|
6
10
|
*/
|
|
@@ -109,6 +113,10 @@ export type PInputEmailProps = BaseProps & {
|
|
|
109
113
|
value?: string | null;
|
|
110
114
|
};
|
|
111
115
|
export declare const PInputEmail: import("react").ForwardRefExoticComponent<Omit<import("react").DOMAttributes<{}>, "onChange" | "onInput" | "onToggle"> & Pick<import("react").HTMLAttributes<{}>, "suppressHydrationWarning" | "autoFocus" | "className" | "dir" | "hidden" | "id" | "inert" | "inputMode" | "lang" | "slot" | "style" | "tabIndex" | "title" | "translate" | "role"> & {
|
|
116
|
+
/**
|
|
117
|
+
* Sets additional ARIA attributes on the native input to improve accessibility for screen readers.
|
|
118
|
+
*/
|
|
119
|
+
aria?: SelectedAriaAttributes<InputEmailAriaAttribute>;
|
|
112
120
|
/**
|
|
113
121
|
* Provides the browser with a data type hint to enable relevant autofill suggestions (e.g. `autocomplete='email'`).
|
|
114
122
|
*/
|
|
@@ -4,16 +4,16 @@ import { forwardRef, useRef } from 'react';
|
|
|
4
4
|
import { useEventCallback, usePrefix, useBrowserLayoutEffect, useMergedClass } from '../../hooks.mjs';
|
|
5
5
|
import { syncRef } from '../../utils.mjs';
|
|
6
6
|
|
|
7
|
-
const PInputEmail = /*#__PURE__*/ forwardRef(({ autoComplete, compact = false, description = '', disabled = false, form, hideLabel = false, indicator = false, label = '', loading = false, maxLength, message = '', minLength, multiple = false, name, onBlur, onChange, onInput, pattern, placeholder = '', readOnly = false, required = false, state = 'none', value = '', className, ...rest }, ref) => {
|
|
7
|
+
const PInputEmail = /*#__PURE__*/ forwardRef(({ aria, autoComplete, compact = false, description = '', disabled = false, form, hideLabel = false, indicator = false, label = '', loading = false, maxLength, message = '', minLength, multiple = false, name, onBlur, onChange, onInput, pattern, placeholder = '', readOnly = false, required = false, state = 'none', value = '', className, ...rest }, ref) => {
|
|
8
8
|
const elementRef = useRef(undefined);
|
|
9
9
|
useEventCallback(elementRef, 'blur', onBlur);
|
|
10
10
|
useEventCallback(elementRef, 'change', onChange);
|
|
11
11
|
useEventCallback(elementRef, 'input', onInput);
|
|
12
12
|
const WebComponentTag = usePrefix('p-input-email');
|
|
13
|
-
const propsToSync = [autoComplete, compact, description, disabled, form, hideLabel, indicator, label, loading, maxLength, message, minLength, multiple, name, pattern, placeholder, readOnly, required, state, value];
|
|
13
|
+
const propsToSync = [aria, autoComplete, compact, description, disabled, form, hideLabel, indicator, label, loading, maxLength, message, minLength, multiple, name, pattern, placeholder, readOnly, required, state, value];
|
|
14
14
|
useBrowserLayoutEffect(() => {
|
|
15
15
|
const { current } = elementRef;
|
|
16
|
-
['autoComplete', 'compact', 'description', 'disabled', 'form', 'hideLabel', 'indicator', 'label', 'loading', 'maxLength', 'message', 'minLength', 'multiple', 'name', 'pattern', 'placeholder', 'readOnly', 'required', 'state', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
16
|
+
['aria', 'autoComplete', 'compact', 'description', 'disabled', 'form', 'hideLabel', 'indicator', 'label', 'loading', 'maxLength', 'message', 'minLength', 'multiple', 'name', 'pattern', 'placeholder', 'readOnly', 'required', 'state', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
17
17
|
}, propsToSync);
|
|
18
18
|
const props = {
|
|
19
19
|
...rest,
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import type { BaseProps } from '../../BaseProps';
|
|
2
|
-
import type { BreakpointCustomizable, InputMonthBlurEventDetail, InputMonthChangeEventDetail, InputMonthInputEventDetail, InputMonthState } from '../types';
|
|
2
|
+
import type { SelectedAriaAttributes, InputMonthAriaAttribute, BreakpointCustomizable, InputMonthBlurEventDetail, InputMonthChangeEventDetail, InputMonthInputEventDetail, InputMonthState } from '../types';
|
|
3
3
|
export type PInputMonthProps = BaseProps & {
|
|
4
|
+
/**
|
|
5
|
+
* Sets additional ARIA attributes on the native input to improve accessibility for screen readers.
|
|
6
|
+
*/
|
|
7
|
+
aria?: SelectedAriaAttributes<InputMonthAriaAttribute>;
|
|
4
8
|
/**
|
|
5
9
|
* Provides the browser with a month/year autofill hint.
|
|
6
10
|
*/
|
|
@@ -95,6 +99,10 @@ export type PInputMonthProps = BaseProps & {
|
|
|
95
99
|
value?: string | null;
|
|
96
100
|
};
|
|
97
101
|
export declare const PInputMonth: import("react").ForwardRefExoticComponent<Omit<import("react").DOMAttributes<{}>, "onChange" | "onInput" | "onToggle"> & Pick<import("react").HTMLAttributes<{}>, "suppressHydrationWarning" | "autoFocus" | "className" | "dir" | "hidden" | "id" | "inert" | "inputMode" | "lang" | "slot" | "style" | "tabIndex" | "title" | "translate" | "role"> & {
|
|
102
|
+
/**
|
|
103
|
+
* Sets additional ARIA attributes on the native input to improve accessibility for screen readers.
|
|
104
|
+
*/
|
|
105
|
+
aria?: SelectedAriaAttributes<InputMonthAriaAttribute>;
|
|
98
106
|
/**
|
|
99
107
|
* Provides the browser with a month/year autofill hint.
|
|
100
108
|
*/
|
|
@@ -4,16 +4,16 @@ import { forwardRef, useRef } from 'react';
|
|
|
4
4
|
import { useEventCallback, usePrefix, useBrowserLayoutEffect, useMergedClass } from '../../hooks.mjs';
|
|
5
5
|
import { syncRef } from '../../utils.mjs';
|
|
6
6
|
|
|
7
|
-
const PInputMonth = /*#__PURE__*/ forwardRef(({ autoComplete, compact = false, description = '', disabled = false, form, hideLabel = false, label = '', loading = false, max, message = '', min, name, onBlur, onChange, onInput, readOnly = false, required = false, state = 'none', step = 1, value = '', className, ...rest }, ref) => {
|
|
7
|
+
const PInputMonth = /*#__PURE__*/ forwardRef(({ aria, autoComplete, compact = false, description = '', disabled = false, form, hideLabel = false, label = '', loading = false, max, message = '', min, name, onBlur, onChange, onInput, readOnly = false, required = false, state = 'none', step = 1, value = '', className, ...rest }, ref) => {
|
|
8
8
|
const elementRef = useRef(undefined);
|
|
9
9
|
useEventCallback(elementRef, 'blur', onBlur);
|
|
10
10
|
useEventCallback(elementRef, 'change', onChange);
|
|
11
11
|
useEventCallback(elementRef, 'input', onInput);
|
|
12
12
|
const WebComponentTag = usePrefix('p-input-month');
|
|
13
|
-
const propsToSync = [autoComplete, compact, description, disabled, form, hideLabel, label, loading, max, message, min, name, readOnly, required, state, step, value];
|
|
13
|
+
const propsToSync = [aria, autoComplete, compact, description, disabled, form, hideLabel, label, loading, max, message, min, name, readOnly, required, state, step, value];
|
|
14
14
|
useBrowserLayoutEffect(() => {
|
|
15
15
|
const { current } = elementRef;
|
|
16
|
-
['autoComplete', 'compact', 'description', 'disabled', 'form', 'hideLabel', 'label', 'loading', 'max', 'message', 'min', 'name', 'readOnly', 'required', 'state', 'step', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
16
|
+
['aria', 'autoComplete', 'compact', 'description', 'disabled', 'form', 'hideLabel', 'label', 'loading', 'max', 'message', 'min', 'name', 'readOnly', 'required', 'state', 'step', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
17
17
|
}, propsToSync);
|
|
18
18
|
const props = {
|
|
19
19
|
...rest,
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import type { BaseProps } from '../../BaseProps';
|
|
2
|
-
import type { BreakpointCustomizable, InputNumberBlurEventDetail, InputNumberChangeEventDetail, InputNumberInputEventDetail, InputNumberState } from '../types';
|
|
2
|
+
import type { SelectedAriaAttributes, InputNumberAriaAttribute, BreakpointCustomizable, InputNumberBlurEventDetail, InputNumberChangeEventDetail, InputNumberInputEventDetail, InputNumberState } from '../types';
|
|
3
3
|
export type PInputNumberProps = BaseProps & {
|
|
4
|
+
/**
|
|
5
|
+
* Sets additional ARIA attributes on the native input to improve accessibility for screen readers.
|
|
6
|
+
*/
|
|
7
|
+
aria?: SelectedAriaAttributes<InputNumberAriaAttribute>;
|
|
4
8
|
/**
|
|
5
9
|
* Provides the browser with a data type hint to enable relevant autofill suggestions (e.g. `autocomplete='postal-code'`).
|
|
6
10
|
*/
|
|
@@ -105,6 +109,10 @@ export type PInputNumberProps = BaseProps & {
|
|
|
105
109
|
value?: string | number | null;
|
|
106
110
|
};
|
|
107
111
|
export declare const PInputNumber: import("react").ForwardRefExoticComponent<Omit<import("react").DOMAttributes<{}>, "onChange" | "onInput" | "onToggle"> & Pick<import("react").HTMLAttributes<{}>, "suppressHydrationWarning" | "autoFocus" | "className" | "dir" | "hidden" | "id" | "inert" | "inputMode" | "lang" | "slot" | "style" | "tabIndex" | "title" | "translate" | "role"> & {
|
|
112
|
+
/**
|
|
113
|
+
* Sets additional ARIA attributes on the native input to improve accessibility for screen readers.
|
|
114
|
+
*/
|
|
115
|
+
aria?: SelectedAriaAttributes<InputNumberAriaAttribute>;
|
|
108
116
|
/**
|
|
109
117
|
* Provides the browser with a data type hint to enable relevant autofill suggestions (e.g. `autocomplete='postal-code'`).
|
|
110
118
|
*/
|
|
@@ -4,16 +4,16 @@ import { forwardRef, useRef } from 'react';
|
|
|
4
4
|
import { useEventCallback, usePrefix, useBrowserLayoutEffect, useMergedClass } from '../../hooks.mjs';
|
|
5
5
|
import { syncRef } from '../../utils.mjs';
|
|
6
6
|
|
|
7
|
-
const PInputNumber = /*#__PURE__*/ forwardRef(({ autoComplete, compact = false, controls = false, description = '', disabled = false, form, hideLabel = false, label = '', loading = false, max, message = '', min, name, onBlur, onChange, onInput, placeholder = '', readOnly = false, required = false, state = 'none', step = 1, value = '', className, ...rest }, ref) => {
|
|
7
|
+
const PInputNumber = /*#__PURE__*/ forwardRef(({ aria, autoComplete, compact = false, controls = false, description = '', disabled = false, form, hideLabel = false, label = '', loading = false, max, message = '', min, name, onBlur, onChange, onInput, placeholder = '', readOnly = false, required = false, state = 'none', step = 1, value = '', className, ...rest }, ref) => {
|
|
8
8
|
const elementRef = useRef(undefined);
|
|
9
9
|
useEventCallback(elementRef, 'blur', onBlur);
|
|
10
10
|
useEventCallback(elementRef, 'change', onChange);
|
|
11
11
|
useEventCallback(elementRef, 'input', onInput);
|
|
12
12
|
const WebComponentTag = usePrefix('p-input-number');
|
|
13
|
-
const propsToSync = [autoComplete, compact, controls, description, disabled, form, hideLabel, label, loading, max, message, min, name, placeholder, readOnly, required, state, step, value];
|
|
13
|
+
const propsToSync = [aria, autoComplete, compact, controls, description, disabled, form, hideLabel, label, loading, max, message, min, name, placeholder, readOnly, required, state, step, value];
|
|
14
14
|
useBrowserLayoutEffect(() => {
|
|
15
15
|
const { current } = elementRef;
|
|
16
|
-
['autoComplete', 'compact', 'controls', 'description', 'disabled', 'form', 'hideLabel', 'label', 'loading', 'max', 'message', 'min', 'name', 'placeholder', 'readOnly', 'required', 'state', 'step', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
16
|
+
['aria', 'autoComplete', 'compact', 'controls', 'description', 'disabled', 'form', 'hideLabel', 'label', 'loading', 'max', 'message', 'min', 'name', 'placeholder', 'readOnly', 'required', 'state', 'step', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
17
17
|
}, propsToSync);
|
|
18
18
|
const props = {
|
|
19
19
|
...rest,
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import type { BaseProps } from '../../BaseProps';
|
|
2
|
-
import type { BreakpointCustomizable, InputPasswordBlurEventDetail, InputPasswordChangeEventDetail, InputPasswordInputEventDetail, InputPasswordState } from '../types';
|
|
2
|
+
import type { SelectedAriaAttributes, InputPasswordAriaAttribute, BreakpointCustomizable, InputPasswordBlurEventDetail, InputPasswordChangeEventDetail, InputPasswordInputEventDetail, InputPasswordState } from '../types';
|
|
3
3
|
export type PInputPasswordProps = BaseProps & {
|
|
4
|
+
/**
|
|
5
|
+
* Sets additional ARIA attributes on the native input to improve accessibility for screen readers.
|
|
6
|
+
*/
|
|
7
|
+
aria?: SelectedAriaAttributes<InputPasswordAriaAttribute>;
|
|
4
8
|
/**
|
|
5
9
|
* Provides the browser with a password autofill hint (e.g. `autocomplete='current-password'` or `autocomplete='new-password'`).
|
|
6
10
|
*/
|
|
@@ -100,6 +104,10 @@ export type PInputPasswordProps = BaseProps & {
|
|
|
100
104
|
value?: string | null;
|
|
101
105
|
};
|
|
102
106
|
export declare const PInputPassword: import("react").ForwardRefExoticComponent<Omit<import("react").DOMAttributes<{}>, "onChange" | "onInput" | "onToggle"> & Pick<import("react").HTMLAttributes<{}>, "suppressHydrationWarning" | "autoFocus" | "className" | "dir" | "hidden" | "id" | "inert" | "inputMode" | "lang" | "slot" | "style" | "tabIndex" | "title" | "translate" | "role"> & {
|
|
107
|
+
/**
|
|
108
|
+
* Sets additional ARIA attributes on the native input to improve accessibility for screen readers.
|
|
109
|
+
*/
|
|
110
|
+
aria?: SelectedAriaAttributes<InputPasswordAriaAttribute>;
|
|
103
111
|
/**
|
|
104
112
|
* Provides the browser with a password autofill hint (e.g. `autocomplete='current-password'` or `autocomplete='new-password'`).
|
|
105
113
|
*/
|
|
@@ -4,16 +4,16 @@ import { forwardRef, useRef } from 'react';
|
|
|
4
4
|
import { useEventCallback, usePrefix, useBrowserLayoutEffect, useMergedClass } from '../../hooks.mjs';
|
|
5
5
|
import { syncRef } from '../../utils.mjs';
|
|
6
6
|
|
|
7
|
-
const PInputPassword = /*#__PURE__*/ forwardRef(({ autoComplete, compact = false, description = '', disabled = false, form, hideLabel = false, label = '', loading = false, maxLength, message = '', minLength, name, onBlur, onChange, onInput, placeholder = '', readOnly = false, required = false, state = 'none', toggle = false, value = '', className, ...rest }, ref) => {
|
|
7
|
+
const PInputPassword = /*#__PURE__*/ forwardRef(({ aria, autoComplete, compact = false, description = '', disabled = false, form, hideLabel = false, label = '', loading = false, maxLength, message = '', minLength, name, onBlur, onChange, onInput, placeholder = '', readOnly = false, required = false, state = 'none', toggle = false, value = '', className, ...rest }, ref) => {
|
|
8
8
|
const elementRef = useRef(undefined);
|
|
9
9
|
useEventCallback(elementRef, 'blur', onBlur);
|
|
10
10
|
useEventCallback(elementRef, 'change', onChange);
|
|
11
11
|
useEventCallback(elementRef, 'input', onInput);
|
|
12
12
|
const WebComponentTag = usePrefix('p-input-password');
|
|
13
|
-
const propsToSync = [autoComplete, compact, description, disabled, form, hideLabel, label, loading, maxLength, message, minLength, name, placeholder, readOnly, required, state, toggle, value];
|
|
13
|
+
const propsToSync = [aria, autoComplete, compact, description, disabled, form, hideLabel, label, loading, maxLength, message, minLength, name, placeholder, readOnly, required, state, toggle, value];
|
|
14
14
|
useBrowserLayoutEffect(() => {
|
|
15
15
|
const { current } = elementRef;
|
|
16
|
-
['autoComplete', 'compact', 'description', 'disabled', 'form', 'hideLabel', 'label', 'loading', 'maxLength', 'message', 'minLength', 'name', 'placeholder', 'readOnly', 'required', 'state', 'toggle', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
16
|
+
['aria', 'autoComplete', 'compact', 'description', 'disabled', 'form', 'hideLabel', 'label', 'loading', 'maxLength', 'message', 'minLength', 'name', 'placeholder', 'readOnly', 'required', 'state', 'toggle', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
17
17
|
}, propsToSync);
|
|
18
18
|
const props = {
|
|
19
19
|
...rest,
|
|
@@ -2,7 +2,7 @@ import type { BaseProps } from '../../BaseProps';
|
|
|
2
2
|
import type { SelectedAriaAttributes, InputSearchAriaAttribute, BreakpointCustomizable, InputSearchBlurEventDetail, InputSearchChangeEventDetail, InputSearchInputEventDetail, InputSearchState } from '../types';
|
|
3
3
|
export type PInputSearchProps = BaseProps & {
|
|
4
4
|
/**
|
|
5
|
-
* Sets additional ARIA attributes on the search input, useful for combobox patterns (e.g. `role="combobox"`, `aria-expanded`).
|
|
5
|
+
* Sets additional ARIA attributes on the search input, useful for combobox patterns (e.g. `role="combobox"`, `aria-expanded`) and extra labelling (`aria-label`, `aria-description`).
|
|
6
6
|
*/
|
|
7
7
|
aria?: SelectedAriaAttributes<InputSearchAriaAttribute>;
|
|
8
8
|
/**
|
|
@@ -110,7 +110,7 @@ export type PInputSearchProps = BaseProps & {
|
|
|
110
110
|
};
|
|
111
111
|
export declare const PInputSearch: import("react").ForwardRefExoticComponent<Omit<import("react").DOMAttributes<{}>, "onChange" | "onInput" | "onToggle"> & Pick<import("react").HTMLAttributes<{}>, "suppressHydrationWarning" | "autoFocus" | "className" | "dir" | "hidden" | "id" | "inert" | "inputMode" | "lang" | "slot" | "style" | "tabIndex" | "title" | "translate" | "role"> & {
|
|
112
112
|
/**
|
|
113
|
-
* Sets additional ARIA attributes on the search input, useful for combobox patterns (e.g. `role="combobox"`, `aria-expanded`).
|
|
113
|
+
* Sets additional ARIA attributes on the search input, useful for combobox patterns (e.g. `role="combobox"`, `aria-expanded`) and extra labelling (`aria-label`, `aria-description`).
|
|
114
114
|
*/
|
|
115
115
|
aria?: SelectedAriaAttributes<InputSearchAriaAttribute>;
|
|
116
116
|
/**
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import type { BaseProps } from '../../BaseProps';
|
|
2
|
-
import type { BreakpointCustomizable, InputTelBlurEventDetail, InputTelChangeEventDetail, InputTelInputEventDetail, InputTelState } from '../types';
|
|
2
|
+
import type { SelectedAriaAttributes, InputTelAriaAttribute, BreakpointCustomizable, InputTelBlurEventDetail, InputTelChangeEventDetail, InputTelInputEventDetail, InputTelState } from '../types';
|
|
3
3
|
export type PInputTelProps = BaseProps & {
|
|
4
|
+
/**
|
|
5
|
+
* Sets additional ARIA attributes on the native input to improve accessibility for screen readers.
|
|
6
|
+
*/
|
|
7
|
+
aria?: SelectedAriaAttributes<InputTelAriaAttribute>;
|
|
4
8
|
/**
|
|
5
9
|
* Provides the browser with a phone number autofill hint (e.g. `autocomplete='tel'`).
|
|
6
10
|
*/
|
|
@@ -104,6 +108,10 @@ export type PInputTelProps = BaseProps & {
|
|
|
104
108
|
value?: string | null;
|
|
105
109
|
};
|
|
106
110
|
export declare const PInputTel: import("react").ForwardRefExoticComponent<Omit<import("react").DOMAttributes<{}>, "onChange" | "onInput" | "onToggle"> & Pick<import("react").HTMLAttributes<{}>, "suppressHydrationWarning" | "autoFocus" | "className" | "dir" | "hidden" | "id" | "inert" | "inputMode" | "lang" | "slot" | "style" | "tabIndex" | "title" | "translate" | "role"> & {
|
|
111
|
+
/**
|
|
112
|
+
* Sets additional ARIA attributes on the native input to improve accessibility for screen readers.
|
|
113
|
+
*/
|
|
114
|
+
aria?: SelectedAriaAttributes<InputTelAriaAttribute>;
|
|
107
115
|
/**
|
|
108
116
|
* Provides the browser with a phone number autofill hint (e.g. `autocomplete='tel'`).
|
|
109
117
|
*/
|
|
@@ -4,16 +4,16 @@ import { forwardRef, useRef } from 'react';
|
|
|
4
4
|
import { useEventCallback, usePrefix, useBrowserLayoutEffect, useMergedClass } from '../../hooks.mjs';
|
|
5
5
|
import { syncRef } from '../../utils.mjs';
|
|
6
6
|
|
|
7
|
-
const PInputTel = /*#__PURE__*/ forwardRef(({ autoComplete, compact = false, description = '', disabled = false, form, hideLabel = false, indicator = false, label = '', loading = false, maxLength, message = '', minLength, name, onBlur, onChange, onInput, pattern, placeholder = '', readOnly = false, required = false, state = 'none', value = '', className, ...rest }, ref) => {
|
|
7
|
+
const PInputTel = /*#__PURE__*/ forwardRef(({ aria, autoComplete, compact = false, description = '', disabled = false, form, hideLabel = false, indicator = false, label = '', loading = false, maxLength, message = '', minLength, name, onBlur, onChange, onInput, pattern, placeholder = '', readOnly = false, required = false, state = 'none', value = '', className, ...rest }, ref) => {
|
|
8
8
|
const elementRef = useRef(undefined);
|
|
9
9
|
useEventCallback(elementRef, 'blur', onBlur);
|
|
10
10
|
useEventCallback(elementRef, 'change', onChange);
|
|
11
11
|
useEventCallback(elementRef, 'input', onInput);
|
|
12
12
|
const WebComponentTag = usePrefix('p-input-tel');
|
|
13
|
-
const propsToSync = [autoComplete, compact, description, disabled, form, hideLabel, indicator, label, loading, maxLength, message, minLength, name, pattern, placeholder, readOnly, required, state, value];
|
|
13
|
+
const propsToSync = [aria, autoComplete, compact, description, disabled, form, hideLabel, indicator, label, loading, maxLength, message, minLength, name, pattern, placeholder, readOnly, required, state, value];
|
|
14
14
|
useBrowserLayoutEffect(() => {
|
|
15
15
|
const { current } = elementRef;
|
|
16
|
-
['autoComplete', 'compact', 'description', 'disabled', 'form', 'hideLabel', 'indicator', 'label', 'loading', 'maxLength', 'message', 'minLength', 'name', 'pattern', 'placeholder', 'readOnly', 'required', 'state', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
16
|
+
['aria', 'autoComplete', 'compact', 'description', 'disabled', 'form', 'hideLabel', 'indicator', 'label', 'loading', 'maxLength', 'message', 'minLength', 'name', 'pattern', 'placeholder', 'readOnly', 'required', 'state', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
17
17
|
}, propsToSync);
|
|
18
18
|
const props = {
|
|
19
19
|
...rest,
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import type { BaseProps } from '../../BaseProps';
|
|
2
|
-
import type { BreakpointCustomizable, InputTextBlurEventDetail, InputTextChangeEventDetail, InputTextInputEventDetail, InputTextState } from '../types';
|
|
2
|
+
import type { SelectedAriaAttributes, InputTextAriaAttribute, BreakpointCustomizable, InputTextBlurEventDetail, InputTextChangeEventDetail, InputTextInputEventDetail, InputTextState } from '../types';
|
|
3
3
|
export type PInputTextProps = BaseProps & {
|
|
4
|
+
/**
|
|
5
|
+
* Sets additional ARIA attributes on the native input to improve accessibility for screen readers.
|
|
6
|
+
*/
|
|
7
|
+
aria?: SelectedAriaAttributes<InputTextAriaAttribute>;
|
|
4
8
|
/**
|
|
5
9
|
* Provides the browser with a data type hint to enable relevant autofill suggestions (e.g. `autocomplete='name'`).
|
|
6
10
|
*/
|
|
@@ -104,6 +108,10 @@ export type PInputTextProps = BaseProps & {
|
|
|
104
108
|
value?: string | number | null;
|
|
105
109
|
};
|
|
106
110
|
export declare const PInputText: import("react").ForwardRefExoticComponent<Omit<import("react").DOMAttributes<{}>, "onChange" | "onInput" | "onToggle"> & Pick<import("react").HTMLAttributes<{}>, "suppressHydrationWarning" | "autoFocus" | "className" | "dir" | "hidden" | "id" | "inert" | "inputMode" | "lang" | "slot" | "style" | "tabIndex" | "title" | "translate" | "role"> & {
|
|
111
|
+
/**
|
|
112
|
+
* Sets additional ARIA attributes on the native input to improve accessibility for screen readers.
|
|
113
|
+
*/
|
|
114
|
+
aria?: SelectedAriaAttributes<InputTextAriaAttribute>;
|
|
107
115
|
/**
|
|
108
116
|
* Provides the browser with a data type hint to enable relevant autofill suggestions (e.g. `autocomplete='name'`).
|
|
109
117
|
*/
|
|
@@ -4,16 +4,16 @@ import { forwardRef, useRef } from 'react';
|
|
|
4
4
|
import { useEventCallback, usePrefix, useBrowserLayoutEffect, useMergedClass } from '../../hooks.mjs';
|
|
5
5
|
import { syncRef } from '../../utils.mjs';
|
|
6
6
|
|
|
7
|
-
const PInputText = /*#__PURE__*/ forwardRef(({ autoComplete, compact = false, counter = false, description = '', disabled = false, form, hideLabel = false, label = '', loading = false, maxLength, message = '', minLength, name, onBlur, onChange, onInput, placeholder = '', readOnly = false, required = false, spellCheck, state = 'none', value = '', className, ...rest }, ref) => {
|
|
7
|
+
const PInputText = /*#__PURE__*/ forwardRef(({ aria, autoComplete, compact = false, counter = false, description = '', disabled = false, form, hideLabel = false, label = '', loading = false, maxLength, message = '', minLength, name, onBlur, onChange, onInput, placeholder = '', readOnly = false, required = false, spellCheck, state = 'none', value = '', className, ...rest }, ref) => {
|
|
8
8
|
const elementRef = useRef(undefined);
|
|
9
9
|
useEventCallback(elementRef, 'blur', onBlur);
|
|
10
10
|
useEventCallback(elementRef, 'change', onChange);
|
|
11
11
|
useEventCallback(elementRef, 'input', onInput);
|
|
12
12
|
const WebComponentTag = usePrefix('p-input-text');
|
|
13
|
-
const propsToSync = [autoComplete, compact, counter, description, disabled, form, hideLabel, label, loading, maxLength, message, minLength, name, placeholder, readOnly, required, spellCheck, state, value];
|
|
13
|
+
const propsToSync = [aria, autoComplete, compact, counter, description, disabled, form, hideLabel, label, loading, maxLength, message, minLength, name, placeholder, readOnly, required, spellCheck, state, value];
|
|
14
14
|
useBrowserLayoutEffect(() => {
|
|
15
15
|
const { current } = elementRef;
|
|
16
|
-
['autoComplete', 'compact', 'counter', 'description', 'disabled', 'form', 'hideLabel', 'label', 'loading', 'maxLength', 'message', 'minLength', 'name', 'placeholder', 'readOnly', 'required', 'spellCheck', 'state', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
16
|
+
['aria', 'autoComplete', 'compact', 'counter', 'description', 'disabled', 'form', 'hideLabel', 'label', 'loading', 'maxLength', 'message', 'minLength', 'name', 'placeholder', 'readOnly', 'required', 'spellCheck', 'state', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
17
17
|
}, propsToSync);
|
|
18
18
|
const props = {
|
|
19
19
|
...rest,
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import type { BaseProps } from '../../BaseProps';
|
|
2
|
-
import type { BreakpointCustomizable, InputTimeBlurEventDetail, InputTimeChangeEventDetail, InputTimeInputEventDetail, InputTimeState } from '../types';
|
|
2
|
+
import type { SelectedAriaAttributes, InputTimeAriaAttribute, BreakpointCustomizable, InputTimeBlurEventDetail, InputTimeChangeEventDetail, InputTimeInputEventDetail, InputTimeState } from '../types';
|
|
3
3
|
export type PInputTimeProps = BaseProps & {
|
|
4
|
+
/**
|
|
5
|
+
* Sets additional ARIA attributes on the native input to improve accessibility for screen readers.
|
|
6
|
+
*/
|
|
7
|
+
aria?: SelectedAriaAttributes<InputTimeAriaAttribute>;
|
|
4
8
|
/**
|
|
5
9
|
* Provides the browser with a time autofill hint.
|
|
6
10
|
*/
|
|
@@ -95,6 +99,10 @@ export type PInputTimeProps = BaseProps & {
|
|
|
95
99
|
value?: string | null;
|
|
96
100
|
};
|
|
97
101
|
export declare const PInputTime: import("react").ForwardRefExoticComponent<Omit<import("react").DOMAttributes<{}>, "onChange" | "onInput" | "onToggle"> & Pick<import("react").HTMLAttributes<{}>, "suppressHydrationWarning" | "autoFocus" | "className" | "dir" | "hidden" | "id" | "inert" | "inputMode" | "lang" | "slot" | "style" | "tabIndex" | "title" | "translate" | "role"> & {
|
|
102
|
+
/**
|
|
103
|
+
* Sets additional ARIA attributes on the native input to improve accessibility for screen readers.
|
|
104
|
+
*/
|
|
105
|
+
aria?: SelectedAriaAttributes<InputTimeAriaAttribute>;
|
|
98
106
|
/**
|
|
99
107
|
* Provides the browser with a time autofill hint.
|
|
100
108
|
*/
|
|
@@ -4,16 +4,16 @@ import { forwardRef, useRef } from 'react';
|
|
|
4
4
|
import { useEventCallback, usePrefix, useBrowserLayoutEffect, useMergedClass } from '../../hooks.mjs';
|
|
5
5
|
import { syncRef } from '../../utils.mjs';
|
|
6
6
|
|
|
7
|
-
const PInputTime = /*#__PURE__*/ forwardRef(({ autoComplete, compact = false, description = '', disabled = false, form, hideLabel = false, label = '', loading = false, max, message = '', min, name, onBlur, onChange, onInput, readOnly = false, required = false, state = 'none', step = 60, value = '', className, ...rest }, ref) => {
|
|
7
|
+
const PInputTime = /*#__PURE__*/ forwardRef(({ aria, autoComplete, compact = false, description = '', disabled = false, form, hideLabel = false, label = '', loading = false, max, message = '', min, name, onBlur, onChange, onInput, readOnly = false, required = false, state = 'none', step = 60, value = '', className, ...rest }, ref) => {
|
|
8
8
|
const elementRef = useRef(undefined);
|
|
9
9
|
useEventCallback(elementRef, 'blur', onBlur);
|
|
10
10
|
useEventCallback(elementRef, 'change', onChange);
|
|
11
11
|
useEventCallback(elementRef, 'input', onInput);
|
|
12
12
|
const WebComponentTag = usePrefix('p-input-time');
|
|
13
|
-
const propsToSync = [autoComplete, compact, description, disabled, form, hideLabel, label, loading, max, message, min, name, readOnly, required, state, step, value];
|
|
13
|
+
const propsToSync = [aria, autoComplete, compact, description, disabled, form, hideLabel, label, loading, max, message, min, name, readOnly, required, state, step, value];
|
|
14
14
|
useBrowserLayoutEffect(() => {
|
|
15
15
|
const { current } = elementRef;
|
|
16
|
-
['autoComplete', 'compact', 'description', 'disabled', 'form', 'hideLabel', 'label', 'loading', 'max', 'message', 'min', 'name', 'readOnly', 'required', 'state', 'step', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
16
|
+
['aria', 'autoComplete', 'compact', 'description', 'disabled', 'form', 'hideLabel', 'label', 'loading', 'max', 'message', 'min', 'name', 'readOnly', 'required', 'state', 'step', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
17
17
|
}, propsToSync);
|
|
18
18
|
const props = {
|
|
19
19
|
...rest,
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import type { BaseProps } from '../../BaseProps';
|
|
2
|
-
import type { BreakpointCustomizable, InputUrlBlurEventDetail, InputUrlChangeEventDetail, InputUrlInputEventDetail, InputUrlState } from '../types';
|
|
2
|
+
import type { SelectedAriaAttributes, InputUrlAriaAttribute, BreakpointCustomizable, InputUrlBlurEventDetail, InputUrlChangeEventDetail, InputUrlInputEventDetail, InputUrlState } from '../types';
|
|
3
3
|
export type PInputUrlProps = BaseProps & {
|
|
4
|
+
/**
|
|
5
|
+
* Sets additional ARIA attributes on the native input to improve accessibility for screen readers.
|
|
6
|
+
*/
|
|
7
|
+
aria?: SelectedAriaAttributes<InputUrlAriaAttribute>;
|
|
4
8
|
/**
|
|
5
9
|
* Provides the browser with a URL autofill hint (e.g. `autocomplete='url'`).
|
|
6
10
|
*/
|
|
@@ -104,6 +108,10 @@ export type PInputUrlProps = BaseProps & {
|
|
|
104
108
|
value?: string | null;
|
|
105
109
|
};
|
|
106
110
|
export declare const PInputUrl: import("react").ForwardRefExoticComponent<Omit<import("react").DOMAttributes<{}>, "onChange" | "onInput" | "onToggle"> & Pick<import("react").HTMLAttributes<{}>, "suppressHydrationWarning" | "autoFocus" | "className" | "dir" | "hidden" | "id" | "inert" | "inputMode" | "lang" | "slot" | "style" | "tabIndex" | "title" | "translate" | "role"> & {
|
|
111
|
+
/**
|
|
112
|
+
* Sets additional ARIA attributes on the native input to improve accessibility for screen readers.
|
|
113
|
+
*/
|
|
114
|
+
aria?: SelectedAriaAttributes<InputUrlAriaAttribute>;
|
|
107
115
|
/**
|
|
108
116
|
* Provides the browser with a URL autofill hint (e.g. `autocomplete='url'`).
|
|
109
117
|
*/
|
|
@@ -4,16 +4,16 @@ import { forwardRef, useRef } from 'react';
|
|
|
4
4
|
import { useEventCallback, usePrefix, useBrowserLayoutEffect, useMergedClass } from '../../hooks.mjs';
|
|
5
5
|
import { syncRef } from '../../utils.mjs';
|
|
6
6
|
|
|
7
|
-
const PInputUrl = /*#__PURE__*/ forwardRef(({ autoComplete, compact = false, description = '', disabled = false, form, hideLabel = false, indicator = false, label = '', loading = false, maxLength, message = '', minLength, name, onBlur, onChange, onInput, pattern, placeholder = '', readOnly = false, required = false, state = 'none', value = '', className, ...rest }, ref) => {
|
|
7
|
+
const PInputUrl = /*#__PURE__*/ forwardRef(({ aria, autoComplete, compact = false, description = '', disabled = false, form, hideLabel = false, indicator = false, label = '', loading = false, maxLength, message = '', minLength, name, onBlur, onChange, onInput, pattern, placeholder = '', readOnly = false, required = false, state = 'none', value = '', className, ...rest }, ref) => {
|
|
8
8
|
const elementRef = useRef(undefined);
|
|
9
9
|
useEventCallback(elementRef, 'blur', onBlur);
|
|
10
10
|
useEventCallback(elementRef, 'change', onChange);
|
|
11
11
|
useEventCallback(elementRef, 'input', onInput);
|
|
12
12
|
const WebComponentTag = usePrefix('p-input-url');
|
|
13
|
-
const propsToSync = [autoComplete, compact, description, disabled, form, hideLabel, indicator, label, loading, maxLength, message, minLength, name, pattern, placeholder, readOnly, required, state, value];
|
|
13
|
+
const propsToSync = [aria, autoComplete, compact, description, disabled, form, hideLabel, indicator, label, loading, maxLength, message, minLength, name, pattern, placeholder, readOnly, required, state, value];
|
|
14
14
|
useBrowserLayoutEffect(() => {
|
|
15
15
|
const { current } = elementRef;
|
|
16
|
-
['autoComplete', 'compact', 'description', 'disabled', 'form', 'hideLabel', 'indicator', 'label', 'loading', 'maxLength', 'message', 'minLength', 'name', 'pattern', 'placeholder', 'readOnly', 'required', 'state', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
16
|
+
['aria', 'autoComplete', 'compact', 'description', 'disabled', 'form', 'hideLabel', 'indicator', 'label', 'loading', 'maxLength', 'message', 'minLength', 'name', 'pattern', 'placeholder', 'readOnly', 'required', 'state', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
17
17
|
}, propsToSync);
|
|
18
18
|
const props = {
|
|
19
19
|
...rest,
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import type { BaseProps } from '../../BaseProps';
|
|
2
|
-
import type { BreakpointCustomizable, InputWeekBlurEventDetail, InputWeekChangeEventDetail, InputWeekInputEventDetail, InputWeekState } from '../types';
|
|
2
|
+
import type { SelectedAriaAttributes, InputWeekAriaAttribute, BreakpointCustomizable, InputWeekBlurEventDetail, InputWeekChangeEventDetail, InputWeekInputEventDetail, InputWeekState } from '../types';
|
|
3
3
|
export type PInputWeekProps = BaseProps & {
|
|
4
|
+
/**
|
|
5
|
+
* Sets additional ARIA attributes on the native input to improve accessibility for screen readers.
|
|
6
|
+
*/
|
|
7
|
+
aria?: SelectedAriaAttributes<InputWeekAriaAttribute>;
|
|
4
8
|
/**
|
|
5
9
|
* Provides the browser with a week/year autofill hint.
|
|
6
10
|
*/
|
|
@@ -95,6 +99,10 @@ export type PInputWeekProps = BaseProps & {
|
|
|
95
99
|
value?: string | null;
|
|
96
100
|
};
|
|
97
101
|
export declare const PInputWeek: import("react").ForwardRefExoticComponent<Omit<import("react").DOMAttributes<{}>, "onChange" | "onInput" | "onToggle"> & Pick<import("react").HTMLAttributes<{}>, "suppressHydrationWarning" | "autoFocus" | "className" | "dir" | "hidden" | "id" | "inert" | "inputMode" | "lang" | "slot" | "style" | "tabIndex" | "title" | "translate" | "role"> & {
|
|
102
|
+
/**
|
|
103
|
+
* Sets additional ARIA attributes on the native input to improve accessibility for screen readers.
|
|
104
|
+
*/
|
|
105
|
+
aria?: SelectedAriaAttributes<InputWeekAriaAttribute>;
|
|
98
106
|
/**
|
|
99
107
|
* Provides the browser with a week/year autofill hint.
|
|
100
108
|
*/
|
|
@@ -4,16 +4,16 @@ import { forwardRef, useRef } from 'react';
|
|
|
4
4
|
import { useEventCallback, usePrefix, useBrowserLayoutEffect, useMergedClass } from '../../hooks.mjs';
|
|
5
5
|
import { syncRef } from '../../utils.mjs';
|
|
6
6
|
|
|
7
|
-
const PInputWeek = /*#__PURE__*/ forwardRef(({ autoComplete, compact = false, description = '', disabled = false, form, hideLabel = false, label = '', loading = false, max, message = '', min, name, onBlur, onChange, onInput, readOnly = false, required = false, state = 'none', step = 1, value = '', className, ...rest }, ref) => {
|
|
7
|
+
const PInputWeek = /*#__PURE__*/ forwardRef(({ aria, autoComplete, compact = false, description = '', disabled = false, form, hideLabel = false, label = '', loading = false, max, message = '', min, name, onBlur, onChange, onInput, readOnly = false, required = false, state = 'none', step = 1, value = '', className, ...rest }, ref) => {
|
|
8
8
|
const elementRef = useRef(undefined);
|
|
9
9
|
useEventCallback(elementRef, 'blur', onBlur);
|
|
10
10
|
useEventCallback(elementRef, 'change', onChange);
|
|
11
11
|
useEventCallback(elementRef, 'input', onInput);
|
|
12
12
|
const WebComponentTag = usePrefix('p-input-week');
|
|
13
|
-
const propsToSync = [autoComplete, compact, description, disabled, form, hideLabel, label, loading, max, message, min, name, readOnly, required, state, step, value];
|
|
13
|
+
const propsToSync = [aria, autoComplete, compact, description, disabled, form, hideLabel, label, loading, max, message, min, name, readOnly, required, state, step, value];
|
|
14
14
|
useBrowserLayoutEffect(() => {
|
|
15
15
|
const { current } = elementRef;
|
|
16
|
-
['autoComplete', 'compact', 'description', 'disabled', 'form', 'hideLabel', 'label', 'loading', 'max', 'message', 'min', 'name', 'readOnly', 'required', 'state', 'step', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
16
|
+
['aria', 'autoComplete', 'compact', 'description', 'disabled', 'form', 'hideLabel', 'label', 'loading', 'max', 'message', 'min', 'name', 'readOnly', 'required', 'state', 'step', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
17
17
|
}, propsToSync);
|
|
18
18
|
const props = {
|
|
19
19
|
...rest,
|
|
@@ -30,7 +30,7 @@ export type PLinkPureProps = BaseProps & {
|
|
|
30
30
|
*/
|
|
31
31
|
hideLabel?: BreakpointCustomizable<boolean>;
|
|
32
32
|
/**
|
|
33
|
-
* When set, the component renders as an anchor navigating to this URL. Otherwise, provide a slotted anchor element.
|
|
33
|
+
* When set, the component renders as an anchor navigating to this URL. Otherwise, provide a slotted anchor element, but not both. Without either, it renders as plain text.
|
|
34
34
|
*/
|
|
35
35
|
href?: string;
|
|
36
36
|
/**
|
|
@@ -97,7 +97,7 @@ export declare const PLinkPure: import("react").ForwardRefExoticComponent<Omit<i
|
|
|
97
97
|
*/
|
|
98
98
|
hideLabel?: BreakpointCustomizable<boolean>;
|
|
99
99
|
/**
|
|
100
|
-
* When set, the component renders as an anchor navigating to this URL. Otherwise, provide a slotted anchor element.
|
|
100
|
+
* When set, the component renders as an anchor navigating to this URL. Otherwise, provide a slotted anchor element, but not both. Without either, it renders as plain text.
|
|
101
101
|
*/
|
|
102
102
|
href?: string;
|
|
103
103
|
/**
|
|
@@ -15,7 +15,7 @@ export type PLinkTileProductProps = BaseProps & {
|
|
|
15
15
|
*/
|
|
16
16
|
heading: string;
|
|
17
17
|
/**
|
|
18
|
-
* Sets the URL the tile navigates to when clicked. Alternatively, provide a slotted anchor element.
|
|
18
|
+
* Sets the URL the tile navigates to when clicked. Alternatively, provide a slotted anchor element, which is not rendered when `href` is set.
|
|
19
19
|
*/
|
|
20
20
|
href?: string;
|
|
21
21
|
/**
|
|
@@ -65,7 +65,7 @@ export declare const PLinkTileProduct: import("react").ForwardRefExoticComponent
|
|
|
65
65
|
*/
|
|
66
66
|
heading: string;
|
|
67
67
|
/**
|
|
68
|
-
* Sets the URL the tile navigates to when clicked. Alternatively, provide a slotted anchor element.
|
|
68
|
+
* Sets the URL the tile navigates to when clicked. Alternatively, provide a slotted anchor element, which is not rendered when `href` is set.
|
|
69
69
|
*/
|
|
70
70
|
href?: string;
|
|
71
71
|
/**
|
|
@@ -20,7 +20,7 @@ export type PLinkProps = BaseProps & {
|
|
|
20
20
|
*/
|
|
21
21
|
hideLabel?: BreakpointCustomizable<boolean>;
|
|
22
22
|
/**
|
|
23
|
-
* When set, the component renders as an anchor navigating to this URL. Otherwise, provide a slotted anchor element.
|
|
23
|
+
* When set, the component renders as an anchor navigating to this URL. Otherwise, provide a slotted anchor element, but not both. Without either, it renders as plain text.
|
|
24
24
|
*/
|
|
25
25
|
href?: string;
|
|
26
26
|
/**
|
|
@@ -67,7 +67,7 @@ export declare const PLink: import("react").ForwardRefExoticComponent<Omit<impor
|
|
|
67
67
|
*/
|
|
68
68
|
hideLabel?: BreakpointCustomizable<boolean>;
|
|
69
69
|
/**
|
|
70
|
-
* When set, the component renders as an anchor navigating to this URL. Otherwise, provide a slotted anchor element.
|
|
70
|
+
* When set, the component renders as an anchor navigating to this URL. Otherwise, provide a slotted anchor element, but not both. Without either, it renders as plain text.
|
|
71
71
|
*/
|
|
72
72
|
href?: string;
|
|
73
73
|
/**
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import type { BaseProps } from '../../BaseProps';
|
|
2
|
-
import type { MultiSelectDropdownDirection, BreakpointCustomizable, MultiSelectChangeEventDetail, MultiSelectToggleEventDetail, MultiSelectState } from '../types';
|
|
2
|
+
import type { SelectedAriaAttributes, MultiSelectAriaAttribute, MultiSelectDropdownDirection, BreakpointCustomizable, MultiSelectChangeEventDetail, MultiSelectToggleEventDetail, MultiSelectState } from '../types';
|
|
3
3
|
export type PMultiSelectProps = BaseProps & {
|
|
4
|
+
/**
|
|
5
|
+
* Sets additional ARIA attributes on the combobox to improve accessibility for screen readers.
|
|
6
|
+
*/
|
|
7
|
+
aria?: SelectedAriaAttributes<MultiSelectAriaAttribute>;
|
|
4
8
|
/**
|
|
5
9
|
* Reduces the control height and padding for a more compact layout.
|
|
6
10
|
* @default false
|
|
@@ -73,6 +77,10 @@ export type PMultiSelectProps = BaseProps & {
|
|
|
73
77
|
value?: string[] | number[] | null;
|
|
74
78
|
};
|
|
75
79
|
export declare const PMultiSelect: import("react").ForwardRefExoticComponent<Omit<import("react").DOMAttributes<{}>, "onChange" | "onInput" | "onToggle"> & Pick<import("react").HTMLAttributes<{}>, "suppressHydrationWarning" | "autoFocus" | "className" | "dir" | "hidden" | "id" | "inert" | "inputMode" | "lang" | "slot" | "style" | "tabIndex" | "title" | "translate" | "role"> & {
|
|
80
|
+
/**
|
|
81
|
+
* Sets additional ARIA attributes on the combobox to improve accessibility for screen readers.
|
|
82
|
+
*/
|
|
83
|
+
aria?: SelectedAriaAttributes<MultiSelectAriaAttribute>;
|
|
76
84
|
/**
|
|
77
85
|
* Reduces the control height and padding for a more compact layout.
|
|
78
86
|
* @default false
|
|
@@ -4,16 +4,16 @@ import { forwardRef, useRef } from 'react';
|
|
|
4
4
|
import { useEventCallback, usePrefix, useBrowserLayoutEffect, useMergedClass } from '../../hooks.mjs';
|
|
5
5
|
import { syncRef } from '../../utils.mjs';
|
|
6
6
|
|
|
7
|
-
const PMultiSelect = /*#__PURE__*/ forwardRef(({ compact = false, description = '', disabled = false, dropdownDirection = 'auto', form, hideLabel = false, label = '', message = '', name, onBlur, onChange, onToggle, required = false, state = 'none', value = [], className, ...rest }, ref) => {
|
|
7
|
+
const PMultiSelect = /*#__PURE__*/ forwardRef(({ aria, compact = false, description = '', disabled = false, dropdownDirection = 'auto', form, hideLabel = false, label = '', message = '', name, onBlur, onChange, onToggle, required = false, state = 'none', value = [], className, ...rest }, ref) => {
|
|
8
8
|
const elementRef = useRef(undefined);
|
|
9
9
|
useEventCallback(elementRef, 'blur', onBlur);
|
|
10
10
|
useEventCallback(elementRef, 'change', onChange);
|
|
11
11
|
useEventCallback(elementRef, 'toggle', onToggle);
|
|
12
12
|
const WebComponentTag = usePrefix('p-multi-select');
|
|
13
|
-
const propsToSync = [compact, description, disabled, dropdownDirection, form, hideLabel, label, message, name, required, state, value];
|
|
13
|
+
const propsToSync = [aria, compact, description, disabled, dropdownDirection, form, hideLabel, label, message, name, required, state, value];
|
|
14
14
|
useBrowserLayoutEffect(() => {
|
|
15
15
|
const { current } = elementRef;
|
|
16
|
-
['compact', 'description', 'disabled', 'dropdownDirection', 'form', 'hideLabel', 'label', 'message', 'name', 'required', 'state', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
16
|
+
['aria', 'compact', 'description', 'disabled', 'dropdownDirection', 'form', 'hideLabel', 'label', 'message', 'name', 'required', 'state', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
17
17
|
}, propsToSync);
|
|
18
18
|
const props = {
|
|
19
19
|
...rest,
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import type { BaseProps } from '../../BaseProps';
|
|
2
|
-
import type { SelectDropdownDirection, BreakpointCustomizable, SelectChangeEventDetail, SelectToggleEventDetail, SelectState } from '../types';
|
|
2
|
+
import type { SelectedAriaAttributes, SelectAriaAttribute, SelectDropdownDirection, BreakpointCustomizable, SelectChangeEventDetail, SelectToggleEventDetail, SelectState } from '../types';
|
|
3
3
|
export type PSelectProps = BaseProps & {
|
|
4
|
+
/**
|
|
5
|
+
* Sets additional ARIA attributes on the combobox to improve accessibility for screen readers.
|
|
6
|
+
*/
|
|
7
|
+
aria?: SelectedAriaAttributes<SelectAriaAttribute>;
|
|
4
8
|
/**
|
|
5
9
|
* Reduces the control height and padding for use in dense layouts where vertical space is limited.
|
|
6
10
|
* @default false
|
|
@@ -77,6 +81,10 @@ export type PSelectProps = BaseProps & {
|
|
|
77
81
|
value?: string | number | null;
|
|
78
82
|
};
|
|
79
83
|
export declare const PSelect: import("react").ForwardRefExoticComponent<Omit<import("react").DOMAttributes<{}>, "onChange" | "onInput" | "onToggle"> & Pick<import("react").HTMLAttributes<{}>, "suppressHydrationWarning" | "autoFocus" | "className" | "dir" | "hidden" | "id" | "inert" | "inputMode" | "lang" | "slot" | "style" | "tabIndex" | "title" | "translate" | "role"> & {
|
|
84
|
+
/**
|
|
85
|
+
* Sets additional ARIA attributes on the combobox to improve accessibility for screen readers.
|
|
86
|
+
*/
|
|
87
|
+
aria?: SelectedAriaAttributes<SelectAriaAttribute>;
|
|
80
88
|
/**
|
|
81
89
|
* Reduces the control height and padding for use in dense layouts where vertical space is limited.
|
|
82
90
|
* @default false
|
|
@@ -4,16 +4,16 @@ import { forwardRef, useRef } from 'react';
|
|
|
4
4
|
import { useEventCallback, usePrefix, useBrowserLayoutEffect, useMergedClass } from '../../hooks.mjs';
|
|
5
5
|
import { syncRef } from '../../utils.mjs';
|
|
6
6
|
|
|
7
|
-
const PSelect = /*#__PURE__*/ forwardRef(({ compact = false, description = '', disabled = false, dropdownDirection = 'auto', filter = false, form, hideLabel = false, label = '', message = '', name, onBlur, onChange, onToggle, required = false, state = 'none', value, className, ...rest }, ref) => {
|
|
7
|
+
const PSelect = /*#__PURE__*/ forwardRef(({ aria, compact = false, description = '', disabled = false, dropdownDirection = 'auto', filter = false, form, hideLabel = false, label = '', message = '', name, onBlur, onChange, onToggle, required = false, state = 'none', value, className, ...rest }, ref) => {
|
|
8
8
|
const elementRef = useRef(undefined);
|
|
9
9
|
useEventCallback(elementRef, 'blur', onBlur);
|
|
10
10
|
useEventCallback(elementRef, 'change', onChange);
|
|
11
11
|
useEventCallback(elementRef, 'toggle', onToggle);
|
|
12
12
|
const WebComponentTag = usePrefix('p-select');
|
|
13
|
-
const propsToSync = [compact, description, disabled, dropdownDirection, filter, form, hideLabel, label, message, name, required, state, value];
|
|
13
|
+
const propsToSync = [aria, compact, description, disabled, dropdownDirection, filter, form, hideLabel, label, message, name, required, state, value];
|
|
14
14
|
useBrowserLayoutEffect(() => {
|
|
15
15
|
const { current } = elementRef;
|
|
16
|
-
['compact', 'description', 'disabled', 'dropdownDirection', 'filter', 'form', 'hideLabel', 'label', 'message', 'name', 'required', 'state', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
16
|
+
['aria', 'compact', 'description', 'disabled', 'dropdownDirection', 'filter', 'form', 'hideLabel', 'label', 'message', 'name', 'required', 'state', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
17
17
|
}, propsToSync);
|
|
18
18
|
const props = {
|
|
19
19
|
...rest,
|