@porsche-design-system/components-react 3.29.0-rc.1 → 3.29.0-rc.3
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 +16 -1
- package/bin/patchRemixRunProcessBrowserGlobalIdentifier.js +0 -0
- package/cjs/lib/components/input-email.wrapper.cjs +29 -0
- package/cjs/public-api.cjs +2 -0
- package/esm/hooks.mjs +1 -1
- package/esm/lib/components/index.d.ts +1 -0
- package/esm/lib/components/input-email.wrapper.d.ts +200 -0
- package/esm/lib/components/input-email.wrapper.mjs +27 -0
- package/esm/lib/components/input-number.wrapper.d.ts +31 -31
- package/esm/lib/components/input-password.wrapper.d.ts +35 -35
- package/esm/lib/components/input-search.wrapper.d.ts +31 -31
- package/esm/lib/components/input-text.wrapper.d.ts +35 -35
- package/esm/lib/components/textarea.wrapper.d.ts +37 -37
- package/esm/lib/types.d.ts +4 -27
- package/esm/public-api.mjs +1 -0
- package/package.json +8 -8
- package/partials/esm/index.mjs +1 -0
- package/partials/package.json +3 -3
- package/ssr/cjs/components/dist/styles/esm/styles-entry.cjs +85 -74
- package/ssr/cjs/components/dist/utils/esm/utils-entry.cjs +7 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/input-email.wrapper.cjs +40 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/banner.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/canvas.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/carousel.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox-wrapper.cjs +1 -1
- 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-item.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/fieldset-wrapper.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/fieldset.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flyout.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/grid.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/inline-notification.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-base.cjs +2 -2
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-email.cjs +43 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-text.cjs +1 -2
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-tile-model-signature.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/modal.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 +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/popover.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/radio-button-wrapper.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/segmented-control-item.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/segmented-control.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-wrapper-dropdown.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-wrapper.cjs +1 -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/sheet.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/stepper-horizontal.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/table.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs-bar.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/text-field-wrapper.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/textarea-wrapper.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/textarea.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/public-api.cjs +2 -0
- package/ssr/esm/components/dist/styles/esm/styles-entry.mjs +57 -47
- package/ssr/esm/components/dist/utils/esm/utils-entry.mjs +7 -3
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/hooks.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/input-email.wrapper.mjs +38 -0
- 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 +3 -3
- 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 +3 -3
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/canvas.mjs +3 -3
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/carousel.mjs +3 -3
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox-wrapper.mjs +3 -3
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox.mjs +3 -3
- 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 +3 -3
- 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 +3 -3
- 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 +3 -3
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/fieldset.mjs +3 -3
- 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 +3 -3
- 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 +3 -3
- 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 +3 -3
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/inline-notification.mjs +3 -3
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-base.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-email.mjs +41 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-text.mjs +1 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-tile-model-signature.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/modal.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/multi-select.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pin-code.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/popover.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/radio-button-wrapper.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/segmented-control-item.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/segmented-control.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-wrapper-dropdown.mjs +1 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-wrapper.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/sheet.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/stepper-horizontal.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/table.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs-bar.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/text-field-wrapper.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/textarea-wrapper.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/textarea.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/public-api.mjs +1 -0
- package/ssr/esm/lib/components/index.d.ts +1 -0
- package/ssr/esm/lib/components/input-email.wrapper.d.ts +200 -0
- package/ssr/esm/lib/components/input-number.wrapper.d.ts +31 -31
- package/ssr/esm/lib/components/input-password.wrapper.d.ts +35 -35
- package/ssr/esm/lib/components/input-search.wrapper.d.ts +31 -31
- package/ssr/esm/lib/components/input-text.wrapper.d.ts +35 -35
- package/ssr/esm/lib/components/textarea.wrapper.d.ts +37 -37
- package/ssr/esm/lib/dsr-components/input-base.d.ts +2 -0
- package/ssr/esm/lib/dsr-components/input-email.d.ts +19 -0
- package/ssr/esm/lib/types.d.ts +4 -27
- package/partials/index.js +0 -12
- /package/partials/{index.cjs → cjs/index.cjs} +0 -0
- /package/partials/{index.d.ts → esm/index.d.ts} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -14,6 +14,19 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0),
|
|
|
14
14
|
|
|
15
15
|
## [Unreleased]
|
|
16
16
|
|
|
17
|
+
## [3.29.0-rc.3] - 2025-07-29
|
|
18
|
+
|
|
19
|
+
### Fixed
|
|
20
|
+
|
|
21
|
+
- Partials: `topLevelAwait` issue in ESM build
|
|
22
|
+
([#3947](https://github.com/porsche-design-system/porsche-design-system/pull/3947))
|
|
23
|
+
|
|
24
|
+
## [3.29.0-rc.2] - 2025-07-28
|
|
25
|
+
|
|
26
|
+
### Changed
|
|
27
|
+
|
|
28
|
+
- Partials: provide CJS & ESM build ([#3945](https://github.com/porsche-design-system/porsche-design-system/pull/3945))
|
|
29
|
+
|
|
17
30
|
## [3.29.0-rc.1] - 2025-07-15
|
|
18
31
|
|
|
19
32
|
### Added
|
|
@@ -24,6 +37,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0),
|
|
|
24
37
|
([#3916](https://github.com/porsche-design-system/porsche-design-system/pull/3916))
|
|
25
38
|
- `Input Text`: `counter` prop functions independently of `max-length`, allowing character count display even when no
|
|
26
39
|
limit is set ([#3901](https://github.com/porsche-design-system/porsche-design-system/pull/3901))
|
|
40
|
+
- `Input Email`: ([#3927](https://github.com/porsche-design-system/porsche-design-system/pull/3927))
|
|
27
41
|
|
|
28
42
|
### Changed
|
|
29
43
|
|
|
@@ -31,7 +45,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0),
|
|
|
31
45
|
([#3917](https://github.com/porsche-design-system/porsche-design-system/pull/3917))
|
|
32
46
|
- Angular: updated peer dependency to `>=20.0.0 <21.0.0`
|
|
33
47
|
- **Breaking Change** `Textarea`:
|
|
34
|
-
|
|
35
48
|
- Renamed the `showCounter` prop to `counter`.
|
|
36
49
|
- Changed default behavior: the `counter` is now disabled by default (`false` instead of `true`).
|
|
37
50
|
|
|
@@ -54,6 +67,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0),
|
|
|
54
67
|
|
|
55
68
|
- `Carousel`: component does not work correctly if an invalid `lang` value is provided
|
|
56
69
|
([#3924](https://github.com/porsche-design-system/porsche-design-system/pull/3924))
|
|
70
|
+
- Vue: fixed initial render for `dark` and `auto` themes in `PorscheDesignSystemProvider`
|
|
71
|
+
([#3898](https://github.com/porsche-design-system/porsche-design-system/pull/3898))
|
|
57
72
|
|
|
58
73
|
## [3.29.0-rc.0] - 2025-06-27
|
|
59
74
|
|
|
File without changes
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
5
|
+
var react = require('react');
|
|
6
|
+
var hooks = require('../../hooks.cjs');
|
|
7
|
+
var utils = require('../../utils.cjs');
|
|
8
|
+
|
|
9
|
+
const PInputEmail = /*#__PURE__*/ react.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', theme, value = '', className, ...rest }, ref) => {
|
|
10
|
+
const elementRef = react.useRef(undefined);
|
|
11
|
+
hooks.useEventCallback(elementRef, 'blur', onBlur);
|
|
12
|
+
hooks.useEventCallback(elementRef, 'change', onChange);
|
|
13
|
+
hooks.useEventCallback(elementRef, 'input', onInput);
|
|
14
|
+
const WebComponentTag = hooks.usePrefix('p-input-email');
|
|
15
|
+
const propsToSync = [autoComplete, compact, description, disabled, form, hideLabel, indicator, label, loading, maxLength, message, minLength, multiple, name, pattern, placeholder, readOnly, required, state, theme || hooks.useTheme(), value];
|
|
16
|
+
hooks.useBrowserLayoutEffect(() => {
|
|
17
|
+
const { current } = elementRef;
|
|
18
|
+
['autoComplete', 'compact', 'description', 'disabled', 'form', 'hideLabel', 'indicator', 'label', 'loading', 'maxLength', 'message', 'minLength', 'multiple', 'name', 'pattern', 'placeholder', 'readOnly', 'required', 'state', 'theme', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
19
|
+
}, propsToSync);
|
|
20
|
+
const props = {
|
|
21
|
+
...rest,
|
|
22
|
+
class: hooks.useMergedClass(elementRef, className),
|
|
23
|
+
ref: utils.syncRef(elementRef, ref)
|
|
24
|
+
};
|
|
25
|
+
// @ts-ignore
|
|
26
|
+
return jsxRuntime.jsx(WebComponentTag, { ...props });
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
exports.PInputEmail = PInputEmail;
|
package/cjs/public-api.cjs
CHANGED
|
@@ -29,6 +29,7 @@ var heading_wrapper = require('./lib/components/heading.wrapper.cjs');
|
|
|
29
29
|
var headline_wrapper = require('./lib/components/headline.wrapper.cjs');
|
|
30
30
|
var icon_wrapper = require('./lib/components/icon.wrapper.cjs');
|
|
31
31
|
var inlineNotification_wrapper = require('./lib/components/inline-notification.wrapper.cjs');
|
|
32
|
+
var inputEmail_wrapper = require('./lib/components/input-email.wrapper.cjs');
|
|
32
33
|
var inputNumber_wrapper = require('./lib/components/input-number.wrapper.cjs');
|
|
33
34
|
var inputPassword_wrapper = require('./lib/components/input-password.wrapper.cjs');
|
|
34
35
|
var inputSearch_wrapper = require('./lib/components/input-search.wrapper.cjs');
|
|
@@ -118,6 +119,7 @@ exports.PHeading = heading_wrapper.PHeading;
|
|
|
118
119
|
exports.PHeadline = headline_wrapper.PHeadline;
|
|
119
120
|
exports.PIcon = icon_wrapper.PIcon;
|
|
120
121
|
exports.PInlineNotification = inlineNotification_wrapper.PInlineNotification;
|
|
122
|
+
exports.PInputEmail = inputEmail_wrapper.PInputEmail;
|
|
121
123
|
exports.PInputNumber = inputNumber_wrapper.PInputNumber;
|
|
122
124
|
exports.PInputPassword = inputPassword_wrapper.PInputPassword;
|
|
123
125
|
exports.PInputSearch = inputSearch_wrapper.PInputSearch;
|
package/esm/hooks.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { useLayoutEffect, useEffect, useContext, useRef, useMemo } from 'react';
|
|
3
3
|
import { PorscheDesignSystemContext } from './provider.mjs';
|
|
4
4
|
import { getMergedClassName } from './utils.mjs';
|
|
5
5
|
|
|
@@ -26,6 +26,7 @@ export * from './heading.wrapper';
|
|
|
26
26
|
export * from './headline.wrapper';
|
|
27
27
|
export * from './icon.wrapper';
|
|
28
28
|
export * from './inline-notification.wrapper';
|
|
29
|
+
export * from './input-email.wrapper';
|
|
29
30
|
export * from './input-number.wrapper';
|
|
30
31
|
export * from './input-password.wrapper';
|
|
31
32
|
export * from './input-search.wrapper';
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import type { BaseProps } from '../../BaseProps';
|
|
2
|
+
import type { BreakpointCustomizable, InputEmailBlurEventDetail, InputEmailChangeEventDetail, InputEmailInputEventDetail, InputEmailState, Theme } from '../types';
|
|
3
|
+
export type PInputEmailProps = BaseProps & {
|
|
4
|
+
/**
|
|
5
|
+
* Provides a hint to the browser about what type of data the field expects, which can assist with autofill features (e.g., autocomplete='email').
|
|
6
|
+
*/
|
|
7
|
+
autoComplete?: string;
|
|
8
|
+
/**
|
|
9
|
+
* A boolean value that, if present, renders the input field as a compact version.
|
|
10
|
+
*/
|
|
11
|
+
compact?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Supplementary text providing more context or explanation for the input.
|
|
14
|
+
*/
|
|
15
|
+
description?: string;
|
|
16
|
+
/**
|
|
17
|
+
* A boolean value that, if present, makes the input field unusable and unclickable. The value will not be submitted with the form.
|
|
18
|
+
*/
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Specifies the id of the <form> element that the input belongs to (useful if the input is not a direct descendant of the form).
|
|
22
|
+
*/
|
|
23
|
+
form?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Controls the visibility of the label.
|
|
26
|
+
*/
|
|
27
|
+
hideLabel?: BreakpointCustomizable<boolean>;
|
|
28
|
+
/**
|
|
29
|
+
* Controls the visibility of an email icon.
|
|
30
|
+
*/
|
|
31
|
+
indicator?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Text content for a user-facing label.
|
|
34
|
+
*/
|
|
35
|
+
label?: string;
|
|
36
|
+
/**
|
|
37
|
+
* @experimental Shows a loading indicator.
|
|
38
|
+
*/
|
|
39
|
+
loading?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* A non-negative integer specifying the maximum number of characters the user can enter into the input.
|
|
42
|
+
*/
|
|
43
|
+
maxLength?: number;
|
|
44
|
+
/**
|
|
45
|
+
* Dynamic feedback text for validation or status.
|
|
46
|
+
*/
|
|
47
|
+
message?: string;
|
|
48
|
+
/**
|
|
49
|
+
* A non-negative integer specifying the minimum number of characters required for the input's value to be considered valid.
|
|
50
|
+
*/
|
|
51
|
+
minLength?: number;
|
|
52
|
+
/**
|
|
53
|
+
* A boolean value that, if present, it allows the user to enter a list of multiple email addresses, separated by commas (and optional whitespace). The browser will validate each email address in the list.
|
|
54
|
+
*/
|
|
55
|
+
multiple?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* The name of the input field, used when submitting the form data.
|
|
58
|
+
*/
|
|
59
|
+
name: string;
|
|
60
|
+
/**
|
|
61
|
+
* Emitted when the email input has lost focus.
|
|
62
|
+
*/
|
|
63
|
+
onBlur?: (event: CustomEvent<InputEmailBlurEventDetail>) => void;
|
|
64
|
+
/**
|
|
65
|
+
* Emitted when the email input loses focus after its value was changed.
|
|
66
|
+
*/
|
|
67
|
+
onChange?: (event: CustomEvent<InputEmailChangeEventDetail>) => void;
|
|
68
|
+
/**
|
|
69
|
+
* Emitted when the value has been changed as a direct result of a user action.
|
|
70
|
+
*/
|
|
71
|
+
onInput?: (event: CustomEvent<InputEmailInputEventDetail>) => void;
|
|
72
|
+
/**
|
|
73
|
+
* Specifies a regular expression that the input's value must match for the value to pass constraint validation. This allows for more specific email validation rules than the browser's default (e.g., restricting to a specific domain). If provided, it overrides the browser's default email validation.
|
|
74
|
+
*/
|
|
75
|
+
pattern?: string;
|
|
76
|
+
/**
|
|
77
|
+
* A string that provides a brief hint to the user about what kind of information is expected in the field (e.g., placeholder='you@example.com'). This text is displayed when the input field is empty.
|
|
78
|
+
*/
|
|
79
|
+
placeholder?: string;
|
|
80
|
+
/**
|
|
81
|
+
* A boolean value that, if present, makes the input field uneditable by the user, but its value will still be submitted with the form.
|
|
82
|
+
*/
|
|
83
|
+
readOnly?: boolean;
|
|
84
|
+
/**
|
|
85
|
+
* A boolean value that, if present, indicates that the input field must be filled out before the form can be submitted.
|
|
86
|
+
*/
|
|
87
|
+
required?: boolean;
|
|
88
|
+
/**
|
|
89
|
+
* Indicates the validation or overall status of the input component.
|
|
90
|
+
*/
|
|
91
|
+
state?: InputEmailState;
|
|
92
|
+
/**
|
|
93
|
+
* Controls the visual appearance of the component.
|
|
94
|
+
*/
|
|
95
|
+
theme?: Theme;
|
|
96
|
+
/**
|
|
97
|
+
* The default email address (or comma-separated list of addresses) for the input.
|
|
98
|
+
*/
|
|
99
|
+
value?: string;
|
|
100
|
+
};
|
|
101
|
+
export declare const PInputEmail: import("react").ForwardRefExoticComponent<import("react").DOMAttributes<{}> & Pick<import("react").HTMLAttributes<{}>, "suppressHydrationWarning" | "autoFocus" | "className" | "dir" | "hidden" | "id" | "inert" | "lang" | "slot" | "style" | "tabIndex" | "title" | "translate" | "role"> & {
|
|
102
|
+
/**
|
|
103
|
+
* Provides a hint to the browser about what type of data the field expects, which can assist with autofill features (e.g., autocomplete='email').
|
|
104
|
+
*/
|
|
105
|
+
autoComplete?: string;
|
|
106
|
+
/**
|
|
107
|
+
* A boolean value that, if present, renders the input field as a compact version.
|
|
108
|
+
*/
|
|
109
|
+
compact?: boolean;
|
|
110
|
+
/**
|
|
111
|
+
* Supplementary text providing more context or explanation for the input.
|
|
112
|
+
*/
|
|
113
|
+
description?: string;
|
|
114
|
+
/**
|
|
115
|
+
* A boolean value that, if present, makes the input field unusable and unclickable. The value will not be submitted with the form.
|
|
116
|
+
*/
|
|
117
|
+
disabled?: boolean;
|
|
118
|
+
/**
|
|
119
|
+
* Specifies the id of the <form> element that the input belongs to (useful if the input is not a direct descendant of the form).
|
|
120
|
+
*/
|
|
121
|
+
form?: string;
|
|
122
|
+
/**
|
|
123
|
+
* Controls the visibility of the label.
|
|
124
|
+
*/
|
|
125
|
+
hideLabel?: BreakpointCustomizable<boolean>;
|
|
126
|
+
/**
|
|
127
|
+
* Controls the visibility of an email icon.
|
|
128
|
+
*/
|
|
129
|
+
indicator?: boolean;
|
|
130
|
+
/**
|
|
131
|
+
* Text content for a user-facing label.
|
|
132
|
+
*/
|
|
133
|
+
label?: string;
|
|
134
|
+
/**
|
|
135
|
+
* @experimental Shows a loading indicator.
|
|
136
|
+
*/
|
|
137
|
+
loading?: boolean;
|
|
138
|
+
/**
|
|
139
|
+
* A non-negative integer specifying the maximum number of characters the user can enter into the input.
|
|
140
|
+
*/
|
|
141
|
+
maxLength?: number;
|
|
142
|
+
/**
|
|
143
|
+
* Dynamic feedback text for validation or status.
|
|
144
|
+
*/
|
|
145
|
+
message?: string;
|
|
146
|
+
/**
|
|
147
|
+
* A non-negative integer specifying the minimum number of characters required for the input's value to be considered valid.
|
|
148
|
+
*/
|
|
149
|
+
minLength?: number;
|
|
150
|
+
/**
|
|
151
|
+
* A boolean value that, if present, it allows the user to enter a list of multiple email addresses, separated by commas (and optional whitespace). The browser will validate each email address in the list.
|
|
152
|
+
*/
|
|
153
|
+
multiple?: boolean;
|
|
154
|
+
/**
|
|
155
|
+
* The name of the input field, used when submitting the form data.
|
|
156
|
+
*/
|
|
157
|
+
name: string;
|
|
158
|
+
/**
|
|
159
|
+
* Emitted when the email input has lost focus.
|
|
160
|
+
*/
|
|
161
|
+
onBlur?: (event: CustomEvent<InputEmailBlurEventDetail>) => void;
|
|
162
|
+
/**
|
|
163
|
+
* Emitted when the email input loses focus after its value was changed.
|
|
164
|
+
*/
|
|
165
|
+
onChange?: (event: CustomEvent<InputEmailChangeEventDetail>) => void;
|
|
166
|
+
/**
|
|
167
|
+
* Emitted when the value has been changed as a direct result of a user action.
|
|
168
|
+
*/
|
|
169
|
+
onInput?: (event: CustomEvent<InputEmailInputEventDetail>) => void;
|
|
170
|
+
/**
|
|
171
|
+
* Specifies a regular expression that the input's value must match for the value to pass constraint validation. This allows for more specific email validation rules than the browser's default (e.g., restricting to a specific domain). If provided, it overrides the browser's default email validation.
|
|
172
|
+
*/
|
|
173
|
+
pattern?: string;
|
|
174
|
+
/**
|
|
175
|
+
* A string that provides a brief hint to the user about what kind of information is expected in the field (e.g., placeholder='you@example.com'). This text is displayed when the input field is empty.
|
|
176
|
+
*/
|
|
177
|
+
placeholder?: string;
|
|
178
|
+
/**
|
|
179
|
+
* A boolean value that, if present, makes the input field uneditable by the user, but its value will still be submitted with the form.
|
|
180
|
+
*/
|
|
181
|
+
readOnly?: boolean;
|
|
182
|
+
/**
|
|
183
|
+
* A boolean value that, if present, indicates that the input field must be filled out before the form can be submitted.
|
|
184
|
+
*/
|
|
185
|
+
required?: boolean;
|
|
186
|
+
/**
|
|
187
|
+
* Indicates the validation or overall status of the input component.
|
|
188
|
+
*/
|
|
189
|
+
state?: InputEmailState;
|
|
190
|
+
/**
|
|
191
|
+
* Controls the visual appearance of the component.
|
|
192
|
+
*/
|
|
193
|
+
theme?: Theme;
|
|
194
|
+
/**
|
|
195
|
+
* The default email address (or comma-separated list of addresses) for the input.
|
|
196
|
+
*/
|
|
197
|
+
value?: string;
|
|
198
|
+
} & {
|
|
199
|
+
children?: import("react").ReactNode | undefined;
|
|
200
|
+
} & import("react").RefAttributes<HTMLElement>>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { forwardRef, useRef } from 'react';
|
|
4
|
+
import { useEventCallback, usePrefix, useTheme, useBrowserLayoutEffect, useMergedClass } from '../../hooks.mjs';
|
|
5
|
+
import { syncRef } from '../../utils.mjs';
|
|
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', theme, value = '', className, ...rest }, ref) => {
|
|
8
|
+
const elementRef = useRef(undefined);
|
|
9
|
+
useEventCallback(elementRef, 'blur', onBlur);
|
|
10
|
+
useEventCallback(elementRef, 'change', onChange);
|
|
11
|
+
useEventCallback(elementRef, 'input', onInput);
|
|
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, theme || useTheme(), value];
|
|
14
|
+
useBrowserLayoutEffect(() => {
|
|
15
|
+
const { current } = elementRef;
|
|
16
|
+
['autoComplete', 'compact', 'description', 'disabled', 'form', 'hideLabel', 'indicator', 'label', 'loading', 'maxLength', 'message', 'minLength', 'multiple', 'name', 'pattern', 'placeholder', 'readOnly', 'required', 'state', 'theme', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
17
|
+
}, propsToSync);
|
|
18
|
+
const props = {
|
|
19
|
+
...rest,
|
|
20
|
+
class: useMergedClass(elementRef, className),
|
|
21
|
+
ref: syncRef(elementRef, ref)
|
|
22
|
+
};
|
|
23
|
+
// @ts-ignore
|
|
24
|
+
return jsx(WebComponentTag, { ...props });
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
export { PInputEmail };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { BaseProps } from '../../BaseProps';
|
|
2
|
-
import type {
|
|
2
|
+
import type { BreakpointCustomizable, InputNumberBlurEventDetail, InputNumberChangeEventDetail, InputNumberInputEventDetail, InputNumberState, Theme } from '../types';
|
|
3
3
|
export type PInputNumberProps = BaseProps & {
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Provides a hint to the browser about what type of data the field expects, which can assist with autofill features (e.g., autocomplete='on').
|
|
6
6
|
*/
|
|
7
|
-
autoComplete?:
|
|
7
|
+
autoComplete?: string;
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* A boolean value that, if present, renders the input field as a compact version.
|
|
10
10
|
*/
|
|
11
11
|
compact?: boolean;
|
|
12
12
|
/**
|
|
@@ -14,23 +14,23 @@ export type PInputNumberProps = BaseProps & {
|
|
|
14
14
|
*/
|
|
15
15
|
controls?: boolean;
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
17
|
+
* Supplementary text providing more context or explanation for the input.
|
|
18
18
|
*/
|
|
19
19
|
description?: string;
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
21
|
+
* A boolean value that, if present, makes the input field unusable and unclickable. The value will not be submitted with the form.
|
|
22
22
|
*/
|
|
23
23
|
disabled?: boolean;
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
25
|
+
* Specifies the id of the <form> element that the input belongs to (useful if the input is not a direct descendant of the form).
|
|
26
26
|
*/
|
|
27
27
|
form?: string;
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
29
|
+
* Controls the visibility of the label.
|
|
30
30
|
*/
|
|
31
31
|
hideLabel?: BreakpointCustomizable<boolean>;
|
|
32
32
|
/**
|
|
33
|
-
*
|
|
33
|
+
* Text content for a user-facing label.
|
|
34
34
|
*/
|
|
35
35
|
label?: string;
|
|
36
36
|
/**
|
|
@@ -42,7 +42,7 @@ export type PInputNumberProps = BaseProps & {
|
|
|
42
42
|
*/
|
|
43
43
|
max?: number;
|
|
44
44
|
/**
|
|
45
|
-
*
|
|
45
|
+
* Dynamic feedback text for validation or status.
|
|
46
46
|
*/
|
|
47
47
|
message?: string;
|
|
48
48
|
/**
|
|
@@ -50,7 +50,7 @@ export type PInputNumberProps = BaseProps & {
|
|
|
50
50
|
*/
|
|
51
51
|
min?: number;
|
|
52
52
|
/**
|
|
53
|
-
* The name of the
|
|
53
|
+
* The name of the input field, used when submitting the form data.
|
|
54
54
|
*/
|
|
55
55
|
name: string;
|
|
56
56
|
/**
|
|
@@ -66,19 +66,19 @@ export type PInputNumberProps = BaseProps & {
|
|
|
66
66
|
*/
|
|
67
67
|
onInput?: (event: CustomEvent<InputNumberInputEventDetail>) => void;
|
|
68
68
|
/**
|
|
69
|
-
*
|
|
69
|
+
* A string that provides a brief hint to the user about what kind of information is expected in the field (e.g., placeholder='Enter a number'). This text is displayed when the input field is empty.
|
|
70
70
|
*/
|
|
71
71
|
placeholder?: string;
|
|
72
72
|
/**
|
|
73
|
-
*
|
|
73
|
+
* A boolean value that, if present, makes the input field uneditable by the user, but its value will still be submitted with the form.
|
|
74
74
|
*/
|
|
75
75
|
readOnly?: boolean;
|
|
76
76
|
/**
|
|
77
|
-
*
|
|
77
|
+
* A boolean value that, if present, indicates that the input field must be filled out before the form can be submitted.
|
|
78
78
|
*/
|
|
79
79
|
required?: boolean;
|
|
80
80
|
/**
|
|
81
|
-
*
|
|
81
|
+
* Indicates the validation or overall status of the input component.
|
|
82
82
|
*/
|
|
83
83
|
state?: InputNumberState;
|
|
84
84
|
/**
|
|
@@ -86,7 +86,7 @@ export type PInputNumberProps = BaseProps & {
|
|
|
86
86
|
*/
|
|
87
87
|
step?: number;
|
|
88
88
|
/**
|
|
89
|
-
*
|
|
89
|
+
* Controls the visual appearance of the component.
|
|
90
90
|
*/
|
|
91
91
|
theme?: Theme;
|
|
92
92
|
/**
|
|
@@ -96,11 +96,11 @@ export type PInputNumberProps = BaseProps & {
|
|
|
96
96
|
};
|
|
97
97
|
export declare const PInputNumber: import("react").ForwardRefExoticComponent<import("react").DOMAttributes<{}> & Pick<import("react").HTMLAttributes<{}>, "suppressHydrationWarning" | "autoFocus" | "className" | "dir" | "hidden" | "id" | "inert" | "lang" | "slot" | "style" | "tabIndex" | "title" | "translate" | "role"> & {
|
|
98
98
|
/**
|
|
99
|
-
*
|
|
99
|
+
* Provides a hint to the browser about what type of data the field expects, which can assist with autofill features (e.g., autocomplete='on').
|
|
100
100
|
*/
|
|
101
|
-
autoComplete?:
|
|
101
|
+
autoComplete?: string;
|
|
102
102
|
/**
|
|
103
|
-
*
|
|
103
|
+
* A boolean value that, if present, renders the input field as a compact version.
|
|
104
104
|
*/
|
|
105
105
|
compact?: boolean;
|
|
106
106
|
/**
|
|
@@ -108,23 +108,23 @@ export declare const PInputNumber: import("react").ForwardRefExoticComponent<imp
|
|
|
108
108
|
*/
|
|
109
109
|
controls?: boolean;
|
|
110
110
|
/**
|
|
111
|
-
*
|
|
111
|
+
* Supplementary text providing more context or explanation for the input.
|
|
112
112
|
*/
|
|
113
113
|
description?: string;
|
|
114
114
|
/**
|
|
115
|
-
*
|
|
115
|
+
* A boolean value that, if present, makes the input field unusable and unclickable. The value will not be submitted with the form.
|
|
116
116
|
*/
|
|
117
117
|
disabled?: boolean;
|
|
118
118
|
/**
|
|
119
|
-
*
|
|
119
|
+
* Specifies the id of the <form> element that the input belongs to (useful if the input is not a direct descendant of the form).
|
|
120
120
|
*/
|
|
121
121
|
form?: string;
|
|
122
122
|
/**
|
|
123
|
-
*
|
|
123
|
+
* Controls the visibility of the label.
|
|
124
124
|
*/
|
|
125
125
|
hideLabel?: BreakpointCustomizable<boolean>;
|
|
126
126
|
/**
|
|
127
|
-
*
|
|
127
|
+
* Text content for a user-facing label.
|
|
128
128
|
*/
|
|
129
129
|
label?: string;
|
|
130
130
|
/**
|
|
@@ -136,7 +136,7 @@ export declare const PInputNumber: import("react").ForwardRefExoticComponent<imp
|
|
|
136
136
|
*/
|
|
137
137
|
max?: number;
|
|
138
138
|
/**
|
|
139
|
-
*
|
|
139
|
+
* Dynamic feedback text for validation or status.
|
|
140
140
|
*/
|
|
141
141
|
message?: string;
|
|
142
142
|
/**
|
|
@@ -144,7 +144,7 @@ export declare const PInputNumber: import("react").ForwardRefExoticComponent<imp
|
|
|
144
144
|
*/
|
|
145
145
|
min?: number;
|
|
146
146
|
/**
|
|
147
|
-
* The name of the
|
|
147
|
+
* The name of the input field, used when submitting the form data.
|
|
148
148
|
*/
|
|
149
149
|
name: string;
|
|
150
150
|
/**
|
|
@@ -160,19 +160,19 @@ export declare const PInputNumber: import("react").ForwardRefExoticComponent<imp
|
|
|
160
160
|
*/
|
|
161
161
|
onInput?: (event: CustomEvent<InputNumberInputEventDetail>) => void;
|
|
162
162
|
/**
|
|
163
|
-
*
|
|
163
|
+
* A string that provides a brief hint to the user about what kind of information is expected in the field (e.g., placeholder='Enter a number'). This text is displayed when the input field is empty.
|
|
164
164
|
*/
|
|
165
165
|
placeholder?: string;
|
|
166
166
|
/**
|
|
167
|
-
*
|
|
167
|
+
* A boolean value that, if present, makes the input field uneditable by the user, but its value will still be submitted with the form.
|
|
168
168
|
*/
|
|
169
169
|
readOnly?: boolean;
|
|
170
170
|
/**
|
|
171
|
-
*
|
|
171
|
+
* A boolean value that, if present, indicates that the input field must be filled out before the form can be submitted.
|
|
172
172
|
*/
|
|
173
173
|
required?: boolean;
|
|
174
174
|
/**
|
|
175
|
-
*
|
|
175
|
+
* Indicates the validation or overall status of the input component.
|
|
176
176
|
*/
|
|
177
177
|
state?: InputNumberState;
|
|
178
178
|
/**
|
|
@@ -180,7 +180,7 @@ export declare const PInputNumber: import("react").ForwardRefExoticComponent<imp
|
|
|
180
180
|
*/
|
|
181
181
|
step?: number;
|
|
182
182
|
/**
|
|
183
|
-
*
|
|
183
|
+
* Controls the visual appearance of the component.
|
|
184
184
|
*/
|
|
185
185
|
theme?: Theme;
|
|
186
186
|
/**
|