@porsche-design-system/components-react 3.29.0-rc.2 → 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 +8 -0
- 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/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 +2 -2
- package/ssr/cjs/components/dist/styles/esm/styles-entry.cjs +77 -56
- 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/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/public-api.cjs +2 -0
- package/ssr/esm/components/dist/styles/esm/styles-entry.mjs +49 -29
- 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 +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button-group.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button-pure.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button-tile.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/canvas.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/carousel.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox-wrapper.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/content-wrapper.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/crest.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/display.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/divider.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/drilldown-item.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/drilldown-link.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/drilldown.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/fieldset-wrapper.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/fieldset.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flex-item.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flex.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flyout.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/grid-item.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/grid.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/heading.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/headline.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/icon.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/inline-notification.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-base.mjs +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/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
|
@@ -0,0 +1,40 @@
|
|
|
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
|
+
var inputEmail = require('../dsr-components/input-email.cjs');
|
|
9
|
+
|
|
10
|
+
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, children, ...rest }, ref) => {
|
|
11
|
+
const elementRef = react.useRef(undefined);
|
|
12
|
+
hooks.useEventCallback(elementRef, 'blur', onBlur);
|
|
13
|
+
hooks.useEventCallback(elementRef, 'change', onChange);
|
|
14
|
+
hooks.useEventCallback(elementRef, 'input', onInput);
|
|
15
|
+
const WebComponentTag = hooks.usePrefix('p-input-email');
|
|
16
|
+
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];
|
|
17
|
+
hooks.useBrowserLayoutEffect(() => {
|
|
18
|
+
const { current } = elementRef;
|
|
19
|
+
['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]));
|
|
20
|
+
}, propsToSync);
|
|
21
|
+
const props = {
|
|
22
|
+
...rest,
|
|
23
|
+
// @ts-ignore
|
|
24
|
+
...(!process.browser
|
|
25
|
+
? {
|
|
26
|
+
children: (jsxRuntime.jsx(inputEmail.DSRInputEmail, { autoComplete, compact, description, disabled, form, hideLabel, indicator, label, loading, maxLength, message, minLength, multiple, name, pattern, placeholder, readOnly, required, state, theme: theme || hooks.useTheme(), value, children })),
|
|
27
|
+
}
|
|
28
|
+
: {
|
|
29
|
+
children,
|
|
30
|
+
suppressHydrationWarning: true,
|
|
31
|
+
}),
|
|
32
|
+
'data-ssr': '',
|
|
33
|
+
class: hooks.useMergedClass(elementRef, className),
|
|
34
|
+
ref: utils.syncRef(elementRef, ref)
|
|
35
|
+
};
|
|
36
|
+
// @ts-ignore
|
|
37
|
+
return jsxRuntime.jsx(WebComponentTag, { ...props });
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
exports.PInputEmail = PInputEmail;
|
package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-base.cjs
CHANGED
|
@@ -12,7 +12,7 @@ var spinner_wrapper = require('../components/spinner.wrapper.cjs');
|
|
|
12
12
|
|
|
13
13
|
const InputBase = ({ children,
|
|
14
14
|
// host,
|
|
15
|
-
id, label: label$1, description, loading, initialLoading, required, disabled, state, message, theme, readOnly, type, form, placeholder, maxLength, minLength, max, min, value, step, spellCheck, autoComplete, name,
|
|
15
|
+
id, label: label$1, description, loading, initialLoading, required, disabled, state, message, theme, readOnly, type, form, placeholder, maxLength, minLength, max, min, value, step, spellCheck, autoComplete, pattern, multiple, name,
|
|
16
16
|
// onInput,
|
|
17
17
|
// onWheel,
|
|
18
18
|
// onChange,
|
|
@@ -20,7 +20,7 @@ id, label: label$1, description, loading, initialLoading, required, disabled, st
|
|
|
20
20
|
// refElement,
|
|
21
21
|
start, end, }) => {
|
|
22
22
|
const { namedSlotChildren } = splitChildren.splitChildren(children);
|
|
23
|
-
return (jsxRuntime.jsxs("div", { className: "root", children: [jsxRuntime.jsx(label.Label, { hasLabel: !!label$1 || namedSlotChildren.filter(({ props: { slot } }) => slot === 'label').length > 0, hasDescription: !!description || namedSlotChildren.filter(({ props: { slot } }) => slot === 'description').length > 0, host: null, label: label$1, description: description, htmlFor: id, isRequired: required, isLoading: loading, isDisabled: disabled }), jsxRuntime.jsxs("div", { className: "wrapper", children: [jsxRuntime.jsx("slot", { name: "start" }), start, jsxRuntime.jsx("input", { "aria-describedby": loading ? loadingMessage.loadingId : `${utilsEntry.descriptionId} ${stateMessage.messageId}`, "aria-invalid": state === 'error' ? 'true' : null, "aria-disabled": disabled || loading ? 'true' : null, "aria-readonly": readOnly ? 'true' : null, id: id, name: name, form: form, type: type, required: required, placeholder: placeholder, maxLength: maxLength, minLength: minLength, spellCheck: spellCheck, max: max, min: min, step: step, value: value, readOnly: readOnly, autoComplete: autoComplete, disabled: disabled }), end, jsxRuntime.jsx("slot", { name: "end" }), loading && jsxRuntime.jsx(spinner_wrapper.PSpinner, { className: "spinner", size: "inherit", theme: theme, "aria-hidden": "true" })] }), jsxRuntime.jsx(stateMessage.StateMessage, { hasMessage: (message || namedSlotChildren.filter(({ props: { slot } }) => slot === 'message').length > 0) && ['success', 'error'].includes(state), state: state, message: message, theme: theme, host: null }), jsxRuntime.jsx(loadingMessage.LoadingMessage, { loading: loading, initialLoading: initialLoading })] }));
|
|
23
|
+
return (jsxRuntime.jsxs("div", { className: "root", children: [jsxRuntime.jsx(label.Label, { hasLabel: !!label$1 || namedSlotChildren.filter(({ props: { slot } }) => slot === 'label').length > 0, hasDescription: !!description || namedSlotChildren.filter(({ props: { slot } }) => slot === 'description').length > 0, host: null, label: label$1, description: description, htmlFor: id, isRequired: required, isLoading: loading, isDisabled: disabled }), jsxRuntime.jsxs("div", { className: "wrapper", children: [jsxRuntime.jsx("slot", { name: "start" }), start, jsxRuntime.jsx("input", { "aria-describedby": loading ? loadingMessage.loadingId : `${utilsEntry.descriptionId} ${stateMessage.messageId}`, "aria-invalid": state === 'error' ? 'true' : null, "aria-disabled": disabled || loading ? 'true' : null, "aria-readonly": readOnly ? 'true' : null, id: id, name: name, form: form, type: type, required: required, placeholder: placeholder, maxLength: maxLength, minLength: minLength, spellCheck: spellCheck, max: max, min: min, step: step, value: value, readOnly: readOnly, autoComplete: autoComplete, disabled: disabled, pattern: pattern, multiple: multiple }), end, jsxRuntime.jsx("slot", { name: "end" }), loading && jsxRuntime.jsx(spinner_wrapper.PSpinner, { className: "spinner", size: "inherit", theme: theme, "aria-hidden": "true" })] }), jsxRuntime.jsx(stateMessage.StateMessage, { hasMessage: (message || namedSlotChildren.filter(({ props: { slot } }) => slot === 'message').length > 0) && ['success', 'error'].includes(state), state: state, message: message, theme: theme, host: null }), jsxRuntime.jsx(loadingMessage.LoadingMessage, { loading: loading, initialLoading: initialLoading })] }));
|
|
24
24
|
};
|
|
25
25
|
|
|
26
26
|
exports.InputBase = InputBase;
|
package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-email.cjs
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
var react = require('react');
|
|
5
|
+
require('../../provider.cjs');
|
|
6
|
+
var splitChildren = require('../../splitChildren.cjs');
|
|
7
|
+
var minifyCss = require('../../minifyCss.cjs');
|
|
8
|
+
var stylesEntry = require('../../../../../../components/dist/styles/esm/styles-entry.cjs');
|
|
9
|
+
var icon_wrapper = require('../components/icon.wrapper.cjs');
|
|
10
|
+
var inputBase = require('./input-base.cjs');
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @slot {"name": "label", "description": "Shows a label. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
|
|
14
|
+
* @slot {"name": "description", "description": "Shows a description. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
|
|
15
|
+
* @slot {"name": "message", "description": "Shows a state message. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
|
|
16
|
+
* @slot {"name": "start", "description": "Shows content at the start of the input (e.g. unit prefix)."}
|
|
17
|
+
* @slot {"name": "end", "description": "Shows content at the end of the input (e.g. toggle button, unit suffix)."}
|
|
18
|
+
*/
|
|
19
|
+
class DSRInputEmail extends react.Component {
|
|
20
|
+
host;
|
|
21
|
+
// The "name" property is reflected as an attribute to ensure compatibility with native form submission.
|
|
22
|
+
// In the React wrapper, all props are synced as properties on the element ref, so reflecting "name" as an attribute ensures it is properly handled in the form submission process.
|
|
23
|
+
internals;
|
|
24
|
+
initialLoading = false;
|
|
25
|
+
inputElement;
|
|
26
|
+
defaultValue;
|
|
27
|
+
formResetCallback() {
|
|
28
|
+
// triggers value watcher
|
|
29
|
+
}
|
|
30
|
+
formDisabledCallback() {
|
|
31
|
+
}
|
|
32
|
+
formStateRestoreCallback() {
|
|
33
|
+
}
|
|
34
|
+
render() {
|
|
35
|
+
splitChildren.splitChildren(this.props.children);
|
|
36
|
+
const style = minifyCss.minifyCss(stylesEntry.getInputEmailCss(this.props.disabled, this.props.loading, this.props.hideLabel, this.props.state, this.props.compact, this.props.readOnly, this.props.theme));
|
|
37
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsx(inputBase.InputBase, { children: this.props.children, host: null, label: this.props.label, description: this.props.description, id: "input-email", name: this.props.name, form: this.props.form, type: "email", required: this.props.required, placeholder: this.props.placeholder, maxLength: this.props.maxLength, minLength: this.props.minLength, value: this.props.value, readOnly: this.props.readOnly, autoComplete: this.props.autoComplete, disabled: this.props.disabled, state: this.props.state, message: this.props.message, theme: this.props.theme, loading: this.props.loading, pattern: this.props.pattern, multiple: this.props.multiple, initialLoading: this.props.initialLoading, ...(this.props.indicator && {
|
|
38
|
+
start: jsxRuntime.jsx(icon_wrapper.PIcon, { "aria-hidden": "true", name: "email", color: "state-disabled", theme: this.props.theme }),
|
|
39
|
+
}) })] }), this.props.children] }));
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
exports.DSRInputEmail = DSRInputEmail;
|
package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-text.cjs
CHANGED
|
@@ -32,8 +32,7 @@ class DSRInputText extends react.Component {
|
|
|
32
32
|
render() {
|
|
33
33
|
splitChildren.splitChildren(this.props.children);
|
|
34
34
|
const style = minifyCss.minifyCss(stylesEntry.getInputTextCss(this.props.disabled, this.props.loading, this.props.hideLabel, this.props.state, this.props.compact, this.props.readOnly, this.props.theme, this.props.counter));
|
|
35
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsx(inputBase.InputBase, { children: this.props.children, host: null, label: this.props.label, description: this.props.description, id: "input-text"
|
|
36
|
-
, name: this.props.name, form: this.props.form, type: "text", required: this.props.required, placeholder: this.props.placeholder, maxLength: this.props.maxLength, minLength: this.props.minLength, value: this.props.value, readOnly: this.props.readOnly, autoComplete: this.props.autoComplete, disabled: this.props.disabled, state: this.props.state, message: this.props.message, theme: this.props.theme, spellCheck: this.props.spellCheck, loading: this.props.loading, initialLoading: this.props.initialLoading, ...(this.props.counter && {
|
|
35
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsx(inputBase.InputBase, { children: this.props.children, host: null, label: this.props.label, description: this.props.description, id: "input-text", name: this.props.name, form: this.props.form, type: "text", required: this.props.required, placeholder: this.props.placeholder, maxLength: this.props.maxLength, minLength: this.props.minLength, value: this.props.value, readOnly: this.props.readOnly, autoComplete: this.props.autoComplete, disabled: this.props.disabled, state: this.props.state, message: this.props.message, theme: this.props.theme, spellCheck: this.props.spellCheck, loading: this.props.loading, initialLoading: this.props.initialLoading, ...(this.props.counter && {
|
|
37
36
|
end: (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("span", { className: "sr-only", "aria-live": "polite", children: this.props.maxLength
|
|
38
37
|
? `You have ${this.props.maxLength - this.props.value.length} out of ${this.props.maxLength} characters left`
|
|
39
38
|
: `${this.props.value.length} characters entered` }), jsxRuntime.jsx("span", { className: "counter", "aria-hidden": "true", children: this.props.maxLength ? `${this.props.value.length}/${this.props.maxLength}` : `${this.props.value.length}` })] })),
|
|
@@ -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;
|
|
@@ -3921,7 +3921,7 @@ const formatObjectOutput = (value) => {
|
|
|
3921
3921
|
|
|
3922
3922
|
const OPTION_LIST_SAFE_ZONE = 6;
|
|
3923
3923
|
|
|
3924
|
-
const getComponentCss$
|
|
3924
|
+
const getComponentCss$1g = (size, compact, open, theme, sticky) => {
|
|
3925
3925
|
const { primaryColor, hoverColor, contrastLowColor, backgroundColor } = getThemedColors(theme);
|
|
3926
3926
|
const { primaryColor: primaryColorDark, hoverColor: hoverColorDark, contrastLowColor: contrastLowColorDark, backgroundColor: backgroundColorDark, } = getThemedColors('dark');
|
|
3927
3927
|
const cssVariablePositionStickyTop = '--p-accordion-position-sticky-top';
|
|
@@ -4093,7 +4093,7 @@ const cssVariableTop = '--p-banner-position-top';
|
|
|
4093
4093
|
const cssVariableBottom = '--p-banner-position-bottom';
|
|
4094
4094
|
const cssVariableZIndex = '--p-internal-banner-z-index';
|
|
4095
4095
|
const topBottomFallback = '56px';
|
|
4096
|
-
const getComponentCss$
|
|
4096
|
+
const getComponentCss$1f = (isOpen) => {
|
|
4097
4097
|
return getCss({
|
|
4098
4098
|
'@global': {
|
|
4099
4099
|
':host': {
|
|
@@ -4165,7 +4165,7 @@ const getGroupDirectionJssStyles = (direction) => {
|
|
|
4165
4165
|
return groupDirectionJssStyles[direction];
|
|
4166
4166
|
};
|
|
4167
4167
|
|
|
4168
|
-
const getComponentCss$
|
|
4168
|
+
const getComponentCss$1e = (direction) => {
|
|
4169
4169
|
return getCss({
|
|
4170
4170
|
'@global': {
|
|
4171
4171
|
':host': {
|
|
@@ -4318,7 +4318,7 @@ const getFunctionalComponentLoadingMessageStyles = () => {
|
|
|
4318
4318
|
};
|
|
4319
4319
|
};
|
|
4320
4320
|
|
|
4321
|
-
const getComponentCss$
|
|
4321
|
+
const getComponentCss$1d = (icon, iconSource, active, isLoading, isDisabledOrLoading, stretch, size, hideLabel, alignLabel, underline, theme) => {
|
|
4322
4322
|
const hasIcon = hasVisibleIcon(icon, iconSource);
|
|
4323
4323
|
return getCss(mergeDeep(getLinkButtonPureStyles(icon, iconSource, active, isDisabledOrLoading, stretch, size, hideLabel, alignLabel, underline, false, theme), {
|
|
4324
4324
|
root: {
|
|
@@ -4356,7 +4356,7 @@ const getFontWeight = (weight) => {
|
|
|
4356
4356
|
return fontWeightMap[weight];
|
|
4357
4357
|
};
|
|
4358
4358
|
|
|
4359
|
-
const getComponentCss$
|
|
4359
|
+
const getComponentCss$1c = (isDisabledOrLoading, aspectRatio, size, weight, background, align, compact, hasGradient, isDisabled) => {
|
|
4360
4360
|
const isTopAligned = align === 'top';
|
|
4361
4361
|
return getCss({
|
|
4362
4362
|
'@global': {
|
|
@@ -4626,7 +4626,7 @@ const getDisabledColors = (variant, loading, theme) => {
|
|
|
4626
4626
|
};
|
|
4627
4627
|
return colors[variant === 'tertiary' ? 'secondary' : variant];
|
|
4628
4628
|
};
|
|
4629
|
-
const getComponentCss$
|
|
4629
|
+
const getComponentCss$1b = (icon, iconSource, variant, hideLabel, disabled, loading, compact, theme) => {
|
|
4630
4630
|
const disabledOrLoading = isDisabledOrLoading(disabled, loading);
|
|
4631
4631
|
const { textColor, borderColor, backgroundColor } = getDisabledColors(variant, loading, theme);
|
|
4632
4632
|
const { textColor: textColorDark, borderColor: borderColorDark, backgroundColor: backgroundColorDark, } = getDisabledColors(variant, loading, 'dark');
|
|
@@ -4702,7 +4702,7 @@ const mediaQueryS$1 = getMediaQueryMin('s');
|
|
|
4702
4702
|
const mediaQueryM = getMediaQueryMin('m');
|
|
4703
4703
|
// others
|
|
4704
4704
|
const spacingBase = gridGap.replace('36px', '24px');
|
|
4705
|
-
const getComponentCss$
|
|
4705
|
+
const getComponentCss$1a = (theme, isSidebarStartOpen, isSidebarEndOpen) => {
|
|
4706
4706
|
const { primaryColor, backgroundColor, backgroundSurfaceColor, contrastLowColor } = getThemedColors(theme);
|
|
4707
4707
|
const { primaryColor: primaryColorDark, backgroundColor: backgroundColorDark, backgroundSurfaceColor: backgroundSurfaceColorDark, contrastLowColor: contrastLowColorDark, } = getThemedColors('dark');
|
|
4708
4708
|
return getCss({
|
|
@@ -5081,7 +5081,7 @@ const getGradient$1 = (theme, gradientColorTheme) => {
|
|
|
5081
5081
|
`rgba(${gradientColor},0.3) 68%,` +
|
|
5082
5082
|
`rgba(${gradientColor},0)`);
|
|
5083
5083
|
};
|
|
5084
|
-
const getComponentCss$
|
|
5084
|
+
const getComponentCss$19 = (gradientColor, hasHeading, hasDescription, hasControlsSlot, headingSize, width, hasPagination, isInfinitePagination, alignHeader, theme, hasNavigation, alignControls) => {
|
|
5085
5085
|
const { primaryColor, contrastMediumColor } = getThemedColors(theme);
|
|
5086
5086
|
const { primaryColor: primaryColorDark, contrastMediumColor: contrastMediumColorDark } = getThemedColors('dark');
|
|
5087
5087
|
const { canvasTextColor } = getHighContrastColors();
|
|
@@ -5539,7 +5539,7 @@ const getCheckedSVGBackgroundImage$2 = (fill) => {
|
|
|
5539
5539
|
const getIndeterminateSVGBackgroundImage$1 = (fill) => {
|
|
5540
5540
|
return getInlineSVGBackgroundImage(`<path fill="${fill}" d="m20,11v2H4v-2h16Z"/>`);
|
|
5541
5541
|
};
|
|
5542
|
-
const getComponentCss$
|
|
5542
|
+
const getComponentCss$18 = (hideLabel, state, isDisabled, isLoading, theme) => {
|
|
5543
5543
|
const checkedIconColor = escapeHashCharacter(getInvertedThemedColors(theme).primaryColor);
|
|
5544
5544
|
const checkedIconColorDark = escapeHashCharacter(getInvertedThemedColors('dark').primaryColor);
|
|
5545
5545
|
const indeterminateIconColor = escapeHashCharacter(getThemedColors(theme).primaryColor);
|
|
@@ -5741,7 +5741,7 @@ const getCheckboxCheckedBaseStyles = (theme, isDisabled, isLoading, state) => {
|
|
|
5741
5741
|
const getIndeterminateSVGBackgroundImage = (fill) => {
|
|
5742
5742
|
return getInlineSVGBackgroundImage(`<path fill="${fill}" d="m20,11v2H4v-2h16Z"/>`);
|
|
5743
5743
|
};
|
|
5744
|
-
const getComponentCss$
|
|
5744
|
+
const getComponentCss$17 = (hideLabel, state, isDisabled, isLoading, compact, theme) => {
|
|
5745
5745
|
const { primaryColor, contrastMediumColor, contrastHighColor, disabledColor, focusColor } = getThemedColors(theme);
|
|
5746
5746
|
const { primaryColor: primaryColorDark, contrastMediumColor: contrastMediumColorDark, contrastHighColor: contrastHighColorDark, disabledColor: disabledColorDark, focusColor: focusColorDark, } = getThemedColors('dark');
|
|
5747
5747
|
const { formStateColor, formStateHoverColor } = getThemedFormStateColors(theme, state);
|
|
@@ -6165,7 +6165,7 @@ const widthMap = {
|
|
|
6165
6165
|
basic: gridBasicOffset,
|
|
6166
6166
|
extended: gridExtendedOffset,
|
|
6167
6167
|
};
|
|
6168
|
-
const getComponentCss$
|
|
6168
|
+
const getComponentCss$16 = (width) => {
|
|
6169
6169
|
return getCss({
|
|
6170
6170
|
'@global': {
|
|
6171
6171
|
':host': {
|
|
@@ -6207,7 +6207,7 @@ const getDimensionStyle = {
|
|
|
6207
6207
|
width: 'inherit',
|
|
6208
6208
|
height: 'inherit',
|
|
6209
6209
|
};
|
|
6210
|
-
const getComponentCss$
|
|
6210
|
+
const getComponentCss$15 = () => {
|
|
6211
6211
|
return getCss({
|
|
6212
6212
|
'@global': {
|
|
6213
6213
|
':host': {
|
|
@@ -6306,7 +6306,7 @@ const sizeMap$4 = {
|
|
|
6306
6306
|
medium: fontSizeDisplayMedium,
|
|
6307
6307
|
large: fontSizeDisplayLarge,
|
|
6308
6308
|
};
|
|
6309
|
-
const getComponentCss$
|
|
6309
|
+
const getComponentCss$14 = (size, align, color, ellipsis, theme) => {
|
|
6310
6310
|
return getCss({
|
|
6311
6311
|
'@global': {
|
|
6312
6312
|
':host': {
|
|
@@ -6324,7 +6324,7 @@ const getComponentCss$13 = (size, align, color, ellipsis, theme) => {
|
|
|
6324
6324
|
});
|
|
6325
6325
|
};
|
|
6326
6326
|
|
|
6327
|
-
const getComponentCss$
|
|
6327
|
+
const getComponentCss$13 = (color, orientation, theme) => {
|
|
6328
6328
|
const { contrastLowColor, contrastMediumColor, contrastHighColor } = getThemedColors(theme);
|
|
6329
6329
|
const { contrastLowColor: contrastLowColorDark, contrastMediumColor: contrastMediumColorDark, contrastHighColor: contrastHighColorDark, } = getThemedColors('dark');
|
|
6330
6330
|
const colorMap = {
|
|
@@ -6385,7 +6385,7 @@ const easingOpen = 'in';
|
|
|
6385
6385
|
const dialogDurationClose = 'short';
|
|
6386
6386
|
const backdropDurationClose = 'moderate';
|
|
6387
6387
|
const easingClose = 'out';
|
|
6388
|
-
const getComponentCss$
|
|
6388
|
+
const getComponentCss$12 = (isOpen, isPrimary, isSecondaryScrollerVisible, theme) => {
|
|
6389
6389
|
const { primaryColor, backgroundColor, backgroundSurfaceColor, backgroundShadingColor } = getThemedColors(theme);
|
|
6390
6390
|
const { primaryColor: primaryColorDark, backgroundColor: backgroundColorDark, backgroundSurfaceColor: backgroundSurfaceColorDark, backgroundShadingColor: backgroundShadingColorDark, } = getThemedColors('dark');
|
|
6391
6391
|
return getCss({
|
|
@@ -6632,7 +6632,7 @@ const getComponentCss$11 = (isOpen, isPrimary, isSecondaryScrollerVisible, theme
|
|
|
6632
6632
|
});
|
|
6633
6633
|
};
|
|
6634
6634
|
|
|
6635
|
-
const getComponentCss$
|
|
6635
|
+
const getComponentCss$11 = (isPrimary, isSecondary, isCascade) => {
|
|
6636
6636
|
return getCss({
|
|
6637
6637
|
'@global': {
|
|
6638
6638
|
'@keyframes slide-up-mobile': {
|
|
@@ -6863,7 +6863,7 @@ const getComponentCss$10 = (isPrimary, isSecondary, isCascade) => {
|
|
|
6863
6863
|
});
|
|
6864
6864
|
};
|
|
6865
6865
|
|
|
6866
|
-
const getComponentCss
|
|
6866
|
+
const getComponentCss$10 = (hasSlottedAnchor, isActive) => {
|
|
6867
6867
|
const anchorJssStyle = {
|
|
6868
6868
|
all: 'unset',
|
|
6869
6869
|
padding: `calc(${spacingFluidSmall} + 2px) calc(${spacingFluidSmall} + 4px)`, // aligned with link-pure
|
|
@@ -6915,7 +6915,7 @@ const getComponentCss$$ = (hasSlottedAnchor, isActive) => {
|
|
|
6915
6915
|
});
|
|
6916
6916
|
};
|
|
6917
6917
|
|
|
6918
|
-
const getComponentCss
|
|
6918
|
+
const getComponentCss$$ = (state, labelSize, hasLabel, theme) => {
|
|
6919
6919
|
return getCss({
|
|
6920
6920
|
'@global': {
|
|
6921
6921
|
':host': {
|
|
@@ -6952,7 +6952,7 @@ const getComponentCss$_ = (state, labelSize, hasLabel, theme) => {
|
|
|
6952
6952
|
});
|
|
6953
6953
|
};
|
|
6954
6954
|
|
|
6955
|
-
const getComponentCss$
|
|
6955
|
+
const getComponentCss$_ = (state, labelSize, hasLabel, theme) => {
|
|
6956
6956
|
return getCss({
|
|
6957
6957
|
'@global': {
|
|
6958
6958
|
':host': {
|
|
@@ -6999,7 +6999,7 @@ const flexItemWidths = {
|
|
|
6999
6999
|
full: 100,
|
|
7000
7000
|
auto: 'auto',
|
|
7001
7001
|
};
|
|
7002
|
-
const getComponentCss$
|
|
7002
|
+
const getComponentCss$Z = (width, offset, alignSelf, grow, shrink, flex) => {
|
|
7003
7003
|
return getCss({
|
|
7004
7004
|
'@global': {
|
|
7005
7005
|
':host': addImportantToEachRule({
|
|
@@ -7021,7 +7021,7 @@ const getComponentCss$Y = (width, offset, alignSelf, grow, shrink, flex) => {
|
|
|
7021
7021
|
});
|
|
7022
7022
|
};
|
|
7023
7023
|
|
|
7024
|
-
const getComponentCss$
|
|
7024
|
+
const getComponentCss$Y = (inline, wrap, direction, justifyContent, alignItems, alignContent) => {
|
|
7025
7025
|
return getCss({
|
|
7026
7026
|
'@global': {
|
|
7027
7027
|
':host': {
|
|
@@ -7218,7 +7218,7 @@ const cssVarRefPaddingTop = '--ref-p-flyout-pt';
|
|
|
7218
7218
|
const cssVarRefPaddingInline = '--ref-p-flyout-px';
|
|
7219
7219
|
// TODO: we shouldn't expose --p-flyout-max-width
|
|
7220
7220
|
const cssVariableMaxWidth = '--p-flyout-max-width';
|
|
7221
|
-
const getComponentCss$
|
|
7221
|
+
const getComponentCss$X = (isOpen, position, hasHeader, hasFooter, hasSubFooter, footerBehavior, theme) => {
|
|
7222
7222
|
const isPositionStart = position === 'start' || position === 'left';
|
|
7223
7223
|
const isFooterFixed = footerBehavior === 'fixed';
|
|
7224
7224
|
return getCss({
|
|
@@ -7330,7 +7330,7 @@ const gutter$1 = `calc(${gridGap} / 2)`;
|
|
|
7330
7330
|
const gridItemWidths = [
|
|
7331
7331
|
0, 8.333333, 16.666667, 25, 33.333333, 41.666667, 50, 58.333333, 66.666667, 75, 83.333333, 91.666667, 100,
|
|
7332
7332
|
];
|
|
7333
|
-
const getComponentCss$
|
|
7333
|
+
const getComponentCss$W = (size, offset) => {
|
|
7334
7334
|
return getCss({
|
|
7335
7335
|
'@global': {
|
|
7336
7336
|
':host': addImportantToEachRule({
|
|
@@ -7350,7 +7350,7 @@ const getComponentCss$V = (size, offset) => {
|
|
|
7350
7350
|
};
|
|
7351
7351
|
|
|
7352
7352
|
const gutter = `calc(${gridGap} / -2)`;
|
|
7353
|
-
const getComponentCss$
|
|
7353
|
+
const getComponentCss$V = (direction, wrap) => {
|
|
7354
7354
|
return getCss({
|
|
7355
7355
|
'@global': {
|
|
7356
7356
|
':host': {
|
|
@@ -7376,7 +7376,7 @@ const sizeMap$3 = {
|
|
|
7376
7376
|
'x-large': fontSizeHeadingXLarge,
|
|
7377
7377
|
'xx-large': fontSizeHeadingXXLarge,
|
|
7378
7378
|
};
|
|
7379
|
-
const getComponentCss$
|
|
7379
|
+
const getComponentCss$U = (size, align, color, ellipsis, theme) => {
|
|
7380
7380
|
return getCss({
|
|
7381
7381
|
'@global': {
|
|
7382
7382
|
':host': {
|
|
@@ -7436,7 +7436,7 @@ const getTextSizeJssStyle = (textSize) => {
|
|
|
7436
7436
|
fontSize: textSize === 'inherit' ? textSize : textSizeMap[textSize],
|
|
7437
7437
|
};
|
|
7438
7438
|
};
|
|
7439
|
-
const getComponentCss$
|
|
7439
|
+
const getComponentCss$T = (variant, align, color, ellipsis, theme) => {
|
|
7440
7440
|
return getCss({
|
|
7441
7441
|
'@global': {
|
|
7442
7442
|
':host': {
|
|
@@ -7547,7 +7547,7 @@ const isFlippableIcon = (name, source) => {
|
|
|
7547
7547
|
name === 'return' ||
|
|
7548
7548
|
name === 'send'));
|
|
7549
7549
|
};
|
|
7550
|
-
const getComponentCss$
|
|
7550
|
+
const getComponentCss$S = (name, source, color, size, theme) => {
|
|
7551
7551
|
const isColorInherit = color === 'inherit';
|
|
7552
7552
|
const isSizeInherit = size === 'inherit';
|
|
7553
7553
|
const isDark = isThemeDark(theme);
|
|
@@ -7666,7 +7666,7 @@ const getHeadingJssStyle = (theme) => ({
|
|
|
7666
7666
|
...headingSmallStyle,
|
|
7667
7667
|
...getTextJssStyle(theme),
|
|
7668
7668
|
});
|
|
7669
|
-
const getComponentCss$
|
|
7669
|
+
const getComponentCss$R = (state, hasAction, hasClose, theme) => {
|
|
7670
7670
|
return getCss({
|
|
7671
7671
|
'@global': {
|
|
7672
7672
|
':host': {
|
|
@@ -7706,6 +7706,26 @@ const getComponentCss$Q = (state, hasAction, hasClose, theme) => {
|
|
|
7706
7706
|
});
|
|
7707
7707
|
};
|
|
7708
7708
|
|
|
7709
|
+
// CSS Variables defined in base input
|
|
7710
|
+
/**
|
|
7711
|
+
* @css-variable {"name": "--ref-p-input-slotted-padding", "description": "When slotting a `p-button-pure` or `p-link-pure` this variable needs to be set as `padding` in oder to adjust the alignment correctly."}
|
|
7712
|
+
*/
|
|
7713
|
+
/**
|
|
7714
|
+
* @css-variable {"name": "--ref-p-input-slotted-margin", "description": "When slotting a `p-button-pure` or `p-link-pure` this variable needs to be set as `margin` in oder to adjust the spacings correctly."}
|
|
7715
|
+
*/
|
|
7716
|
+
const getComponentCss$Q = (disabled, loading, hideLabel, state, compact, readOnly, theme) => {
|
|
7717
|
+
return getCss({
|
|
7718
|
+
...getFunctionalComponentInputBaseStyles(disabled, loading, hideLabel, state, compact, readOnly, theme, {
|
|
7719
|
+
textOverflow: 'ellipsis',
|
|
7720
|
+
MozAppearance: 'textfield',
|
|
7721
|
+
'&::-webkit-inner-spin-button, &::-webkit-outer-spin-button': {
|
|
7722
|
+
WebkitAppearance: 'none',
|
|
7723
|
+
},
|
|
7724
|
+
}),
|
|
7725
|
+
'sr-only': getHiddenTextJssStyle(),
|
|
7726
|
+
});
|
|
7727
|
+
};
|
|
7728
|
+
|
|
7709
7729
|
// CSS Variables defined in base input
|
|
7710
7730
|
/**
|
|
7711
7731
|
* @css-variable {"name": "--ref-p-input-slotted-padding", "description": "When slotting a `p-button-pure` or `p-link-pure` this variable needs to be set as `padding` in oder to adjust the alignment correctly."}
|
|
@@ -11488,4 +11508,4 @@ const getComponentCss = (size, theme) => {
|
|
|
11488
11508
|
});
|
|
11489
11509
|
};
|
|
11490
11510
|
|
|
11491
|
-
export { cssVarButtonPureMargin, cssVarButtonPurePadding, cssVarInternalInputBaseScaling, getComponentCss$
|
|
11511
|
+
export { cssVarButtonPureMargin, cssVarButtonPurePadding, cssVarInternalInputBaseScaling, getComponentCss$1g as getAccordionCss, getComponentCss$1f as getBannerCss, getComponentCss$1b as getButtonCss, getComponentCss$1e as getButtonGroupCss, getComponentCss$1d as getButtonPureCss, getComponentCss$1c as getButtonTileCss, getComponentCss$1a as getCanvasCss, getComponentCss$19 as getCarouselCss, getComponentCss$17 as getCheckboxCss, getComponentCss$18 as getCheckboxWrapperCss, getComponentCss$16 as getContentWrapperCss, getComponentCss$15 as getCrestCss, getComponentCss$14 as getDisplayCss, getComponentCss$13 as getDividerCss, getComponentCss$12 as getDrilldownCss, getComponentCss$11 as getDrilldownItemCss, getComponentCss$10 as getDrilldownLinkCss, getComponentCss$_ as getFieldsetCss, getComponentCss$$ as getFieldsetWrapperCss, getComponentCss$Y as getFlexCss, getComponentCss$Z as getFlexItemCss, getComponentCss$X as getFlyoutCss, getFunctionalComponentInputBaseStyles, getFunctionalComponentLabelStyles, getFunctionalComponentLoadingMessageStyles, getFunctionalComponentRequiredStyles, getFunctionalComponentStateMessageStyles, getComponentCss$V as getGridCss, getComponentCss$W as getGridItemCss, getComponentCss$U as getHeadingCss, getComponentCss$T as getHeadlineCss, getComponentCss$S as getIconCss, getComponentCss$R as getInlineNotificationCss, getComponentCss$Q as getInputEmailCss, getComponentCss$P as getInputNumberCss, getComponentCss$O as getInputPasswordCss, getComponentCss$N as getInputSearchCss, getComponentCss$M as getInputTextCss, getComponentCss$K as getLinkCss, getComponentCss$L as getLinkPureCss, getComponentCss$K as getLinkSocialCss, getComponentCss$H as getLinkTileCss, getComponentCss$J as getLinkTileModelSignatureCss, getComponentCss$I as getLinkTileProductCss, getComponentCss$G as getMarqueCss, getComponentCss$F as getModalCss, getComponentCss$E as getModelSignatureCss, getComponentCss$C as getMultiSelectCss, getComponentCss$D as getMultiSelectOptionCss, getComponentCss$B as getOptgroupCss, getComponentCss$A as getPaginationCss, getComponentCss$z as getPinCodeCss, getComponentCss$y as getPopoverCss, getComponentCss$x as getRadioButtonWrapperCss, getScalingVar, getComponentCss$w as getScrollerCss, getComponentCss$u as getSegmentedControlCss, getComponentCss$v as getSegmentedControlItemCss, getComponentCss$q as getSelectCss, getComponentCss$r as getSelectOptionCss, getComponentCss$s as getSelectWrapperCss, getComponentCss$t as getSelectWrapperDropdownCss, getComponentCss$p as getSheetCss, getComponentCss$o as getSpinnerCss, getComponentCss$m as getStepperHorizontalCss, getComponentCss$n as getStepperHorizontalItemCss, getComponentCss$l as getSwitchCss, getComponentCss$k as getTableBodyCss, getComponentCss$i as getTableCellCss, getComponentCss$j as getTableCss, getComponentCss$h as getTableHeadCellCss, getComponentCss$f as getTableHeadCss, getComponentCss$g as getTableHeadRowCss, getComponentCss$e as getTableRowCss, getComponentCss$d as getTabsBarCss, getComponentCss$b as getTabsCss, getComponentCss$c as getTabsItemCss, getComponentCss$9 as getTagCss, getComponentCss$a as getTagDismissibleCss, getComponentCss$5 as getTextCss, getComponentCss$8 as getTextFieldWrapperCss, getComponentCss$7 as getTextListCss, getComponentCss$6 as getTextListItemCss, getComponentCss$3 as getTextareaCss, getComponentCss$4 as getTextareaWrapperCss, getComponentCss$1 as getToastCss, getComponentCss as getWordmarkCss };
|
|
@@ -0,0 +1,38 @@
|
|
|
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
|
+
import { DSRInputEmail } from '../dsr-components/input-email.mjs';
|
|
7
|
+
|
|
8
|
+
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, children, ...rest }, ref) => {
|
|
9
|
+
const elementRef = useRef(undefined);
|
|
10
|
+
useEventCallback(elementRef, 'blur', onBlur);
|
|
11
|
+
useEventCallback(elementRef, 'change', onChange);
|
|
12
|
+
useEventCallback(elementRef, 'input', onInput);
|
|
13
|
+
const WebComponentTag = usePrefix('p-input-email');
|
|
14
|
+
const propsToSync = [autoComplete, compact, description, disabled, form, hideLabel, indicator, label, loading, maxLength, message, minLength, multiple, name, pattern, placeholder, readOnly, required, state, theme || useTheme(), value];
|
|
15
|
+
useBrowserLayoutEffect(() => {
|
|
16
|
+
const { current } = elementRef;
|
|
17
|
+
['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]));
|
|
18
|
+
}, propsToSync);
|
|
19
|
+
const props = {
|
|
20
|
+
...rest,
|
|
21
|
+
// @ts-ignore
|
|
22
|
+
...(!process.browser
|
|
23
|
+
? {
|
|
24
|
+
children: (jsx(DSRInputEmail, { autoComplete, compact, description, disabled, form, hideLabel, indicator, label, loading, maxLength, message, minLength, multiple, name, pattern, placeholder, readOnly, required, state, theme: theme || useTheme(), value, children })),
|
|
25
|
+
}
|
|
26
|
+
: {
|
|
27
|
+
children,
|
|
28
|
+
suppressHydrationWarning: true,
|
|
29
|
+
}),
|
|
30
|
+
'data-ssr': '',
|
|
31
|
+
class: useMergedClass(elementRef, className),
|
|
32
|
+
ref: syncRef(elementRef, ref)
|
|
33
|
+
};
|
|
34
|
+
// @ts-ignore
|
|
35
|
+
return jsx(WebComponentTag, { ...props });
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
export { PInputEmail };
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/accordion.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { Component } from 'react';
|
|
|
3
3
|
import '../../provider.mjs';
|
|
4
4
|
import { splitChildren } from '../../splitChildren.mjs';
|
|
5
5
|
import { minifyCss } from '../../minifyCss.mjs';
|
|
6
|
-
import { getAccordionCss as getComponentCss$
|
|
6
|
+
import { getAccordionCss as getComponentCss$1g } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
|
|
7
7
|
import { PIcon } from '../components/icon.wrapper.mjs';
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -19,7 +19,7 @@ class DSRAccordion extends Component {
|
|
|
19
19
|
const buttonId = 'accordion-control';
|
|
20
20
|
const contentId = 'accordion-panel';
|
|
21
21
|
const Heading = this.props.tag || this.props.headingTag;
|
|
22
|
-
const style = minifyCss(getComponentCss$
|
|
22
|
+
const style = minifyCss(getComponentCss$1g(this.props.size, this.props.compact, this.props.open, this.props.theme, this.props.sticky));
|
|
23
23
|
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs(Fragment, { children: [jsx(Heading, { className: "heading", children: jsxs("button", { id: buttonId, type: "button", "aria-expanded": this.props.open ? 'true' : 'false', "aria-controls": contentId, children: [this.props.heading || jsx("slot", { name: "heading" }), jsx("span", { className: "icon-container", children: jsx(PIcon, { className: "icon", name: this.props.open ? 'minus' : 'plus', theme: this.props.theme, size: "xx-small", "aria-hidden": "true" }) })] }) }), jsx("div", { id: contentId, className: "collapsible", role: "region", "aria-labelledby": buttonId, children: jsx("div", { children: jsx("slot", {}) }) })] })] }), this.props.children] }));
|
|
24
24
|
}
|
|
25
25
|
}
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/banner.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { Component } from 'react';
|
|
|
3
3
|
import '../../provider.mjs';
|
|
4
4
|
import { splitChildren } from '../../splitChildren.mjs';
|
|
5
5
|
import { minifyCss } from '../../minifyCss.mjs';
|
|
6
|
-
import { getBannerCss as getComponentCss$
|
|
6
|
+
import { getBannerCss as getComponentCss$1f } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
|
|
7
7
|
import { PInlineNotification } from '../components/inline-notification.wrapper.mjs';
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -23,7 +23,7 @@ class DSRBanner extends Component {
|
|
|
23
23
|
render() {
|
|
24
24
|
const { namedSlotChildren} = splitChildren(this.props.children);
|
|
25
25
|
const hasTitleSlot = namedSlotChildren.filter(({ props: { slot } }) => slot === 'title').length > 0;
|
|
26
|
-
const style = minifyCss(getComponentCss$
|
|
26
|
+
const style = minifyCss(getComponentCss$1f(this.props.open));
|
|
27
27
|
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsx(Fragment, { children: jsxs(PInlineNotification, { heading: this.props.heading, headingTag: this.props.headingTag, description: this.props.description, state: this.props.state, dismissButton: this.hasDismissButton, theme: this.props.theme, "aria-hidden": this.props.open ? 'false' : 'true', children: [namedSlotChildren.filter(({ props: { slot } }) => slot === 'heading').length > 0 ? (jsx("slot", { name: "heading", slot: "heading" })) : (hasTitleSlot && jsx("slot", { name: "title", slot: "heading" })), namedSlotChildren.filter(({ props: { slot } }) => slot === 'description').length > 0 && jsx("slot", { name: "description" })] }) })] }), this.props.children] }));
|
|
28
28
|
}
|
|
29
29
|
}
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button-group.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import { splitChildren } from '../../splitChildren.mjs';
|
|
3
3
|
import { Component } from 'react';
|
|
4
4
|
import { minifyCss } from '../../minifyCss.mjs';
|
|
5
|
-
import { getButtonGroupCss as getComponentCss$
|
|
5
|
+
import { getButtonGroupCss as getComponentCss$1e } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* @slot {"name": "", "description": "Default slot for the buttons to group." }
|
|
@@ -11,7 +11,7 @@ class DSRButtonGroup extends Component {
|
|
|
11
11
|
host;
|
|
12
12
|
render() {
|
|
13
13
|
splitChildren(this.props.children);
|
|
14
|
-
const style = minifyCss(getComponentCss$
|
|
14
|
+
const style = minifyCss(getComponentCss$1e(this.props.direction));
|
|
15
15
|
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsx("div", { role: "group", children: jsx("slot", {}) })] }), this.props.children] }));
|
|
16
16
|
}
|
|
17
17
|
}
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button-pure.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { Component } from 'react';
|
|
|
3
3
|
import '../../provider.mjs';
|
|
4
4
|
import { splitChildren } from '../../splitChildren.mjs';
|
|
5
5
|
import { minifyCss } from '../../minifyCss.mjs';
|
|
6
|
-
import { getButtonPureCss as getComponentCss$
|
|
6
|
+
import { getButtonPureCss as getComponentCss$1d } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
|
|
7
7
|
import { isDisabledOrLoading, hasVisibleIcon, getButtonPureAriaAttributes } from '../../../../../../components/dist/utils/esm/utils-entry.mjs';
|
|
8
8
|
import { loadingId, LoadingMessage } from './loading-message.mjs';
|
|
9
9
|
import { PIcon } from '../components/icon.wrapper.mjs';
|
|
@@ -29,7 +29,7 @@ class DSRButtonPure extends Component {
|
|
|
29
29
|
size: 'inherit',
|
|
30
30
|
theme: this.props.theme,
|
|
31
31
|
};
|
|
32
|
-
const style = minifyCss(getComponentCss$
|
|
32
|
+
const style = minifyCss(getComponentCss$1d(this.props.icon, this.props.iconSource, this.props.active, this.props.loading, this.isDisabledOrLoading, this.props.stretch, this.props.size, this.props.hideLabel, this.props.alignLabel, this.props.underline, this.props.theme));
|
|
33
33
|
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs(Fragment, { children: [jsxs("button", { ...getButtonPureAriaAttributes(this.props.disabled, this.props.loading, this.props.aria), className: "root", type: this.props.type, name: this.props.name, value: this.props.value, "aria-describedby": this.props.loading ? loadingId : undefined, children: [this.props.loading ? (jsx(PSpinner, { ...iconProps, "aria-hidden": "true" })) : (hasIcon && (jsx(PIcon, { ...iconProps, name: this.props.icon, source: this.props.iconSource, color: this.isDisabledOrLoading ? 'state-disabled' : 'primary', theme: this.props.theme, "aria-hidden": "true" }))), jsx("span", { className: "label", children: jsx("slot", {}) })] }), jsx(LoadingMessage, { loading: this.props.loading, initialLoading: this.props.initialLoading })] })] }), this.props.children] }));
|
|
34
34
|
}
|
|
35
35
|
}
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button-tile.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { Component, createElement } from 'react';
|
|
|
3
3
|
import '../../provider.mjs';
|
|
4
4
|
import { splitChildren } from '../../splitChildren.mjs';
|
|
5
5
|
import { minifyCss } from '../../minifyCss.mjs';
|
|
6
|
-
import { getButtonTileCss as getComponentCss$
|
|
6
|
+
import { getButtonTileCss as getComponentCss$1c } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
|
|
7
7
|
import { isDisabledOrLoading } from '../../../../../../components/dist/utils/esm/utils-entry.mjs';
|
|
8
8
|
import { PButton } from '../components/button.wrapper.mjs';
|
|
9
9
|
import { PButtonPure } from '../components/button-pure.wrapper.mjs';
|
|
@@ -27,7 +27,7 @@ class DSRButtonTile extends Component {
|
|
|
27
27
|
};
|
|
28
28
|
const button = (createElement(PButton, { ...buttonProps, icon: this.props.icon, key: "link-or-button", className: "link-or-button" }, this.props.label));
|
|
29
29
|
const buttonPure = (createElement(PButtonPure, { ...buttonProps, key: "link-or-button-pure", className: "link-or-button-pure", hideLabel: true, icon: this.props.icon === 'none' ? 'arrow-right' : this.props.icon }, this.props.label));
|
|
30
|
-
const style = minifyCss(getComponentCss$
|
|
30
|
+
const style = minifyCss(getComponentCss$1c(isDisabledOrLoading(this.props.disabled, this.props.loading), this.props.aspectRatio, this.props.size, this.props.weight, this.props.background, this.props.align, this.props.compact, this.props.gradient, this.props.disabled));
|
|
31
31
|
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs("div", { className: "root", children: [jsx("slot", { name: "header" }), jsx("div", { className: "media", children: jsx("slot", {}) }), jsxs("div", { className: "footer", children: [jsx("p", { children: this.props.description }), typeof this.props.compact === 'boolean' ? (this.props.compact ? buttonPure : button) : [buttonPure, button]] })] })] }), this.props.children] }));
|
|
32
32
|
}
|
|
33
33
|
}
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { Component } from 'react';
|
|
|
3
3
|
import '../../provider.mjs';
|
|
4
4
|
import { splitChildren } from '../../splitChildren.mjs';
|
|
5
5
|
import { minifyCss } from '../../minifyCss.mjs';
|
|
6
|
-
import { getButtonCss as getComponentCss$
|
|
6
|
+
import { getButtonCss as getComponentCss$1b } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
|
|
7
7
|
import { hasVisibleIcon, getButtonAriaAttributes } from '../../../../../../components/dist/utils/esm/utils-entry.mjs';
|
|
8
8
|
import { loadingId, LoadingMessage } from './loading-message.mjs';
|
|
9
9
|
import { PIcon } from '../components/icon.wrapper.mjs';
|
|
@@ -19,7 +19,7 @@ class DSRButton extends Component {
|
|
|
19
19
|
initialLoading = false;
|
|
20
20
|
render() {
|
|
21
21
|
splitChildren(this.props.children);
|
|
22
|
-
const style = minifyCss(getComponentCss$
|
|
22
|
+
const style = minifyCss(getComponentCss$1b(this.props.icon, this.props.iconSource, this.props.variant, this.props.hideLabel, this.props.disabled, this.props.loading, this.props.compact, this.props.theme));
|
|
23
23
|
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs(Fragment, { children: [jsxs("button", { ...getButtonAriaAttributes(this.props.disabled, this.props.loading, this.props.aria), className: "root", type: this.props.type, name: this.props.name, value: this.props.value, "aria-describedby": this.props.loading ? loadingId : undefined, children: [this.props.loading && (jsx(PSpinner, { className: "spinner", size: "inherit", theme: this.props.theme, "aria-hidden": "true" })), hasVisibleIcon(this.props.icon, this.props.iconSource) && (jsx(PIcon, { className: "icon", size: "inherit", name: this.props.iconSource ? undefined : this.props.icon, source: this.props.iconSource, color: this.props.disabled ? (this.props.variant === 'primary' ? 'contrast-high' : 'state-disabled') : 'primary', theme: this.props.theme, "aria-hidden": "true" })), jsx("span", { className: "label", children: jsx("slot", {}) })] }), jsx(LoadingMessage, { loading: this.props.loading, initialLoading: this.props.initialLoading })] })] }), this.props.children] }));
|
|
24
24
|
}
|
|
25
25
|
}
|