@porsche-design-system/components-react 3.28.0-rc.2 → 3.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +34 -0
- package/cjs/lib/components/input-number.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-number.wrapper.d.ts +184 -0
- package/esm/lib/components/input-number.wrapper.mjs +27 -0
- package/esm/lib/types.d.ts +12 -2
- package/esm/public-api.mjs +1 -0
- package/package.json +5 -2
- package/ssr/cjs/components/dist/styles/esm/styles-entry.cjs +475 -371
- package/ssr/cjs/components/dist/utils/esm/utils-entry.cjs +0 -14
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/input-number.wrapper.cjs +40 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/toast.wrapper.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-base.cjs +22 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-number.cjs +42 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-password.cjs +8 -9
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/multi-select-option.cjs +12 -6
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/multi-select.cjs +1 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-option.cjs +6 -5
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select.cjs +2 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/state-message.cjs +6 -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 +442 -344
- package/ssr/esm/components/dist/utils/esm/utils-entry.mjs +1 -12
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/input-number.wrapper.mjs +38 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/toast.wrapper.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/accordion.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/banner.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button-group.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button-pure.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button-tile.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/canvas.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/carousel.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox-wrapper.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/content-wrapper.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/crest.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/display.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/divider.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/drilldown-item.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/drilldown-link.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/drilldown.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/fieldset-wrapper.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/fieldset.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flex-item.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flex.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flyout.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/grid-item.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/grid.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/heading.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/headline.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/icon.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/inline-notification.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-base.mjs +20 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-number.mjs +40 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-password.mjs +8 -9
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/multi-select-option.mjs +13 -7
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/multi-select.mjs +2 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-option.mjs +6 -5
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select.mjs +2 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/state-message.mjs +7 -3
- 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-number.wrapper.d.ts +184 -0
- package/ssr/esm/lib/dsr-components/input-base.d.ts +31 -0
- package/ssr/esm/lib/dsr-components/input-number.d.ts +18 -0
- package/ssr/esm/lib/dsr-components/input-password.d.ts +5 -3
- package/ssr/esm/lib/dsr-components/multi-select.d.ts +0 -1
- package/ssr/esm/lib/dsr-components/select.d.ts +0 -1
- package/ssr/esm/lib/types.d.ts +12 -2
- package/tailwindcss/index.css +409 -0
|
@@ -3288,12 +3288,6 @@ const getListAriaAttributes = (label, isRequired, hasFilter, isOpen, multiple =
|
|
|
3288
3288
|
}),
|
|
3289
3289
|
};
|
|
3290
3290
|
};
|
|
3291
|
-
const getOptionAriaAttributes = (isSelected, isDisabled, isHidden, hasValue) => ({
|
|
3292
|
-
...(!isHidden && { 'aria-selected': isSelected ? 'true' : 'false' }),
|
|
3293
|
-
'aria-disabled': isDisabled ? 'true' : null,
|
|
3294
|
-
'aria-hidden': isHidden ? 'true' : null,
|
|
3295
|
-
'aria-label': hasValue ? null : 'Empty value',
|
|
3296
|
-
});
|
|
3297
3291
|
|
|
3298
3292
|
const borderWidthBase = '2px';
|
|
3299
3293
|
|
|
@@ -3447,10 +3441,6 @@ function debounce(fn, ms = 800) {
|
|
|
3447
3441
|
};
|
|
3448
3442
|
}
|
|
3449
3443
|
|
|
3450
|
-
const getRole = (state) => {
|
|
3451
|
-
return state === 'error' ? 'alert' : state === 'success' ? 'status' : null;
|
|
3452
|
-
};
|
|
3453
|
-
|
|
3454
3444
|
const isWithinForm = (host) => !!getClosestHTMLElement(host, 'form');
|
|
3455
3445
|
|
|
3456
3446
|
const getCDNBaseURL = () => global.PORSCHE_DESIGN_SYSTEM_CDN_URL + "/porsche-design-system";
|
|
@@ -3718,7 +3708,6 @@ const buildImgSrc = (innerManifest) => `${getCDNBaseURL()}/marque/${innerManifes
|
|
|
3718
3708
|
const getSvgUrl = (model) => {
|
|
3719
3709
|
return `${getCDNBaseURL()}/model-signatures/${MODEL_SIGNATURES_MANIFEST[model].src}`;
|
|
3720
3710
|
};
|
|
3721
|
-
const getSelectedOptions = (options) => options.filter((option) => option.selected);
|
|
3722
3711
|
const getSelectedOptionValues = (options) => options.filter((option) => option.selected).map((option) => option.value);
|
|
3723
3712
|
var ItemType;
|
|
3724
3713
|
(function (ItemType) {
|
|
@@ -3916,4 +3905,4 @@ const getTextTagType = (host, tag) => {
|
|
|
3916
3905
|
return tag;
|
|
3917
3906
|
};
|
|
3918
3907
|
|
|
3919
|
-
export { DISPLAY_TAGS, HEADING_TAGS, HEADLINE_TAGS, ItemType, TEXT_TAGS, _hasShowPickerSupport, anchorSlot, attributeMutationMap, buildCrestImgSrc, buildCrestSrcSet, buildIconUrl, buildImgSrc, buildSrcSet, createPaginationItems, createRange, crestSize, debounce, descriptionId, displaySizeToTagMap, getButtonAriaAttributes, getButtonBaseAriaAttributes, getButtonPureAriaAttributes, getCDNBaseURL, getClosestHTMLElement, getComboboxAriaAttributes, getContentAriaAttributes, getCurrentActivePage, getDirectChildHTMLElement, getDisplayTagType, getHTMLElement, getHasNativePopoverSupport, getHeadingTagType, getHeadlineTagType, getIconColor, getInlineNotificationIconName, getInnerManifest, getListAriaAttributes,
|
|
3908
|
+
export { DISPLAY_TAGS, HEADING_TAGS, HEADLINE_TAGS, ItemType, TEXT_TAGS, _hasShowPickerSupport, anchorSlot, attributeMutationMap, buildCrestImgSrc, buildCrestSrcSet, buildIconUrl, buildImgSrc, buildSrcSet, createPaginationItems, createRange, crestSize, debounce, descriptionId, displaySizeToTagMap, getButtonAriaAttributes, getButtonBaseAriaAttributes, getButtonPureAriaAttributes, getCDNBaseURL, getClosestHTMLElement, getComboboxAriaAttributes, getContentAriaAttributes, getCurrentActivePage, getDirectChildHTMLElement, getDisplayTagType, getHTMLElement, getHasNativePopoverSupport, getHeadingTagType, getHeadlineTagType, getIconColor, getInlineNotificationIconName, getInnerManifest, getListAriaAttributes, getSegmentedControlItemAriaAttributes, getSelectedOptionMap, getSelectedOptionString, getSelectedOptionValues, getStepperHorizontalIconName, getSvgUrl, getSwitchButtonAriaAttributes, getTagName, getTagNameWithoutPrefix, getTextTagType, getTotalPages, hasDocument, hasLocateAction, hasSpecificDirectChildTag, hasVisibleIcon, hasWindow$1 as hasWindow, headerSlot, isCurrentInput, isCustomDropdown, isDisabledOrLoading, isElementOfKind, isInfinitePagination, isListTypeOrdered, isScrollable, isSortable, isStateCompleteOrWarning, isTouchDevice, isType, isUrl, isWithinForm, labelId, observedNodesMap, parseAndGetAriaAttributes, parseJSONAttribute, scrollAreaClass, showCustomCalendarOrTimeIndicator, supportsConstructableStylesheets, supportsNativePopover, tempDiv, tempIcon, tempLabel, traverseTreeAndUpdateState, updateDrilldownItemState };
|
|
@@ -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 { DSRInputNumber } from '../dsr-components/input-number.mjs';
|
|
7
|
+
|
|
8
|
+
const PInputNumber = /*#__PURE__*/ forwardRef(({ autoComplete = '', compact = false, controls = false, description = '', disabled = false, form, hideLabel = false, label = '', max, message = '', min, name, onBlur, onChange, onInput, placeholder = '', readOnly = false, required = false, state = 'none', step = 1, 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-number');
|
|
14
|
+
const propsToSync = [autoComplete, compact, controls, description, disabled, form, hideLabel, label, max, message, min, name, placeholder, readOnly, required, state, step, theme || useTheme(), value];
|
|
15
|
+
useBrowserLayoutEffect(() => {
|
|
16
|
+
const { current } = elementRef;
|
|
17
|
+
['autoComplete', 'compact', 'controls', 'description', 'disabled', 'form', 'hideLabel', 'label', 'max', 'message', 'min', 'name', 'placeholder', 'readOnly', 'required', 'state', 'step', '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(DSRInputNumber, { autoComplete, compact, controls, description, disabled, form, hideLabel, label, max, message, min, name, placeholder, readOnly, required, state, step, 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 { PInputNumber };
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/toast.wrapper.mjs
CHANGED
|
@@ -17,7 +17,7 @@ const PToast = /*#__PURE__*/ forwardRef(({ theme, className, ...rest }, ref) =>
|
|
|
17
17
|
// @ts-ignore
|
|
18
18
|
...(!process.browser
|
|
19
19
|
? {
|
|
20
|
-
...{ "role": "status"
|
|
20
|
+
...{ "role": "status" },
|
|
21
21
|
children: (jsx(DSRToast, { theme: theme || useTheme() })),
|
|
22
22
|
}
|
|
23
23
|
: {
|
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$1d } 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$1d(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$1c } 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 { children, namedSlotChildren, otherChildren } = 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$1c(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$1b } 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$1b(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$1a } 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$1a(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$19 } 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$19(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$18 } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
|
|
7
7
|
import { getButtonAriaAttributes, hasVisibleIcon } 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$18(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
|
}
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/canvas.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 { getCanvasCss as getComponentCss$
|
|
6
|
+
import { getCanvasCss as getComponentCss$17 } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
|
|
7
7
|
import { PButton } from '../components/button.wrapper.mjs';
|
|
8
8
|
import { PCrest } from '../components/crest.wrapper.mjs';
|
|
9
9
|
import { PFlyout } from '../components/flyout.wrapper.mjs';
|
|
@@ -44,7 +44,7 @@ class DSRCanvas extends Component {
|
|
|
44
44
|
const hasSidebarEndHeader = namedSlotChildren.filter(({ props: { slot } }) => slot === 'sidebar-end-header').length > 0;
|
|
45
45
|
const hasFooter = namedSlotChildren.filter(({ props: { slot } }) => slot === 'footer').length > 0;
|
|
46
46
|
const hasBackground = namedSlotChildren.filter(({ props: { slot } }) => slot === 'background').length > 0;
|
|
47
|
-
const style = minifyCss(getComponentCss$
|
|
47
|
+
const style = minifyCss(getComponentCss$17(this.props.theme, this.props.sidebarStartOpen, this.props.sidebarEndOpen));
|
|
48
48
|
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs(Fragment, { children: [jsxs("div", { className: "root", children: [jsxs("header", { className: "header", tabIndex: -1, children: [jsxs("div", { className: "blur", children: [jsx("div", {}), jsx("div", {}), jsx("div", {}), jsx("div", {}), jsx("div", {}), jsx("div", {}), jsx("div", {}), jsx("div", {})] }), jsxs("div", { className: "header__area header__area--start", children: [!this.props.sidebarStartOpen && (jsxs(PButton, { theme: this.props.theme, icon: "sidebar", variant: "ghost", compact: true, "hide-label": "true", aria: { 'aria-expanded': this.props.sidebarStartOpen }, children: [this.props.sidebarStartOpen ? 'Close' : 'Open', " navigation sidebar"] })), jsx("slot", { name: "header-start" })] }), jsx(PCrest, { className: "header__crest" }), jsx(PWordmark, { className: "header__wordmark", size: "inherit", theme: this.props.theme }), jsx("div", { className: "header__area header__area--end", children: jsx("slot", { name: "header-end" }) })] }), this.props.isMediaQueryS && (jsx("aside", { className: "sidebar sidebar--start", inert: !this.props.sidebarStartOpen, "aria-label": `Navigation sidebar ${this.props.sidebarStartOpen ? 'open' : 'closed'}`, tabIndex: -1, children: jsxs("div", { className: "sidebar__scroller", children: [jsxs("div", { className: "sidebar__header sidebar__header--start", children: [jsxs(PButton, { theme: this.props.theme, icon: "sidebar", variant: "ghost", compact: true, "hide-label": "true", aria: { 'aria-expanded': this.props.sidebarStartOpen }, children: [this.props.sidebarStartOpen ? 'Close' : 'Open', " navigation sidebar"] }), hasTitle && (jsx("h2", { children: jsx("slot", { name: "title" }) }))] }), jsx("div", { className: "sidebar__content", children: jsx("slot", { name: "sidebar-start" }) })] }) })), jsx("main", { className: "main", children: jsx("slot", {}) }), hasSidebarEnd && this.props.isMediaQueryM && (jsx("aside", { className: "sidebar sidebar--end", inert: !this.props.sidebarEndOpen, "aria-label": `Settings sidebar ${this.props.sidebarEndOpen ? 'open' : 'closed'}`, tabIndex: -1, children: jsxs("div", { className: "sidebar__scroller", children: [jsxs("div", { className: "sidebar__header sidebar__header--end", children: [jsx("slot", { name: "sidebar-end-header" }), jsxs(PButton, { theme: this.props.theme, icon: "close", variant: "ghost", compact: true, "hide-label": "true", aria: { 'aria-expanded': this.props.sidebarEndOpen }, children: [this.props.sidebarEndOpen ? 'Close' : 'Open', " settings sidebar"] })] }), jsx("div", { className: "sidebar__content", children: jsx("slot", { name: "sidebar-end" }) })] }) })), hasFooter && (jsx("footer", { className: "footer", children: jsx("slot", { name: "footer" }) })), hasBackground && jsx("slot", { name: "background" })] }), !this.props.isMediaQueryS && (jsxs(PFlyout, { className: "flyout-start", theme: this.props.theme, open: this.props.sidebarStartOpen, position: "start", children: [hasTitle && (jsx("h2", { slot: "header", children: jsx("slot", { name: "title" }) })), jsx("slot", { name: "sidebar-start" })] })), hasSidebarEnd && !this.props.isMediaQueryM && (jsxs(PFlyout, { className: "flyout-end", theme: this.props.theme, open: this.props.sidebarEndOpen, position: "end", children: [hasSidebarEndHeader && jsx("slot", { slot: "header", name: "sidebar-end-header" }), jsx("slot", { name: "sidebar-end" })] }))] })] }), this.props.children] }));
|
|
49
49
|
}
|
|
50
50
|
}
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/carousel.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 { getCarouselCss as getComponentCss$
|
|
6
|
+
import { getCarouselCss as getComponentCss$16 } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
|
|
7
7
|
import { isInfinitePagination, parseAndGetAriaAttributes } from '../../../../../../components/dist/utils/esm/utils-entry.mjs';
|
|
8
8
|
import { PButtonPure } from '../components/button-pure.wrapper.mjs';
|
|
9
9
|
import { PLinkPure } from '../components/link-pure.wrapper.mjs';
|
|
@@ -47,7 +47,7 @@ class DSRCarousel extends Component {
|
|
|
47
47
|
// 'aria-controls': 'splide-track', // TODO: cross shadow dom? use native button tag instead of p-button-pure?
|
|
48
48
|
};
|
|
49
49
|
const headingId = 'heading';
|
|
50
|
-
const style = minifyCss(getComponentCss$
|
|
50
|
+
const style = minifyCss(getComponentCss$16(this.props.gradientColor, hasHeadingPropOrSlot, hasDescriptionPropOrSlot, hasControlsSlot, this.props.headingSize, this.props.width,
|
|
51
51
|
// flip boolean values of disablePagination since it is the inverse of pagination
|
|
52
52
|
this.props.disablePagination
|
|
53
53
|
? typeof this.props.disablePagination === 'object'
|
|
@@ -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 { getCheckboxWrapperCss as getComponentCss$
|
|
6
|
+
import { getCheckboxWrapperCss as getComponentCss$15 } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
|
|
7
7
|
import { LoadingMessage } from './loading-message.mjs';
|
|
8
8
|
import { StateMessage } from './state-message.mjs';
|
|
9
9
|
import { LegacyLabel } from './legacy-label.mjs';
|
|
@@ -21,7 +21,7 @@ class DSRCheckboxWrapper extends Component {
|
|
|
21
21
|
render() {
|
|
22
22
|
const { children, namedSlotChildren, otherChildren } = splitChildren(this.props.children);
|
|
23
23
|
const { disabled } = typeof otherChildren[0] === 'object' && 'props' in otherChildren[0] && otherChildren[0]?.props || {};
|
|
24
|
-
const style = minifyCss(getComponentCss$
|
|
24
|
+
const style = minifyCss(getComponentCss$15(this.props.hideLabel, this.props.state, disabled, this.props.loading, this.props.theme));
|
|
25
25
|
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs("div", { className: "root", children: [jsx(LegacyLabel, { hasLabel: this.props.label || namedSlotChildren.filter(({ props: { slot } }) => slot === 'label').length > 0, hasDescription: this.props.description || namedSlotChildren.filter(({ props: { slot } }) => slot === 'description').length > 0, host: null, label: this.props.label, isLoading: this.props.loading, isDisabled: disabled, formElement: typeof otherChildren[0] === 'object' && 'props' in otherChildren[0] && otherChildren[0]?.props }), jsxs("div", { className: "wrapper", children: [jsx("slot", {}), this.props.loading && (jsx(PSpinner, { className: "spinner", size: "inherit", theme: this.props.theme, "aria-hidden": "true" }))] }), jsx(StateMessage, { hasMessage: (this.props.message || namedSlotChildren.filter(({ props: { slot } }) => slot === 'message').length > 0) && ['success', 'error'].includes(this.props.state), state: this.props.state, message: this.props.message, theme: this.props.theme, host: null }), jsx(LoadingMessage, { loading: this.props.loading, initialLoading: this.props.initialLoading })] })] }), this.props.children] }));
|
|
26
26
|
}
|
|
27
27
|
}
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox.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 { getCheckboxCss as getComponentCss$
|
|
6
|
+
import { getCheckboxCss as getComponentCss$14 } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
|
|
7
7
|
import { descriptionId } from '../../../../../../components/dist/utils/esm/utils-entry.mjs';
|
|
8
8
|
import { LoadingMessage } from './loading-message.mjs';
|
|
9
9
|
import { Label } from './label.mjs';
|
|
@@ -32,7 +32,7 @@ class DSRCheckbox extends Component {
|
|
|
32
32
|
render() {
|
|
33
33
|
const { children, namedSlotChildren, otherChildren } = splitChildren(this.props.children);
|
|
34
34
|
const id = 'checkbox';
|
|
35
|
-
const style = minifyCss(getComponentCss$
|
|
35
|
+
const style = minifyCss(getComponentCss$14(this.props.hideLabel, this.props.state, this.props.disabled, this.props.loading, this.props.compact, this.props.theme));
|
|
36
36
|
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs("div", { className: "root", children: [jsx(Label, { hasLabel: this.props.label || namedSlotChildren.filter(({ props: { slot } }) => slot === 'label').length > 0, hasDescription: this.props.description || namedSlotChildren.filter(({ props: { slot } }) => slot === 'description').length > 0, host: null, htmlFor: id, label: this.props.label, isLoading: this.props.loading, isDisabled: this.props.disabled, isRequired: this.props.required }), jsxs("div", { className: "wrapper", children: [jsx("input", { type: "checkbox", id: id, "aria-describedby": `${descriptionId} ${messageId}`, "aria-invalid": this.props.state === 'error' ? 'true' : null, "aria-disabled": this.props.loading || this.props.disabled ? 'true' : null, checked: this.props.checked, form: this.props.form, value: this.props.value, name: this.props.name, onBlur: this.props.onBlur, required: this.props.required, disabled: this.props.disabled }), this.props.loading && (jsx(PSpinner, { className: "spinner", size: "inherit", theme: this.props.theme, "aria-hidden": "true" }))] }), jsx(StateMessage, { hasMessage: (this.props.message || namedSlotChildren.filter(({ props: { slot } }) => slot === 'message').length > 0) && ['success', 'error'].includes(this.props.state), state: this.props.state, message: this.props.message, theme: this.props.theme, host: null }), jsx(LoadingMessage, { loading: this.props.loading, initialLoading: this.props.initialLoading })] })] }), this.props.children] }));
|
|
37
37
|
}
|
|
38
38
|
}
|
|
@@ -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 { getContentWrapperCss as getComponentCss$
|
|
5
|
+
import { getContentWrapperCss as getComponentCss$13 } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* @slot {"name": "", "description": "Default slot for main content." }
|
|
@@ -12,7 +12,7 @@ class DSRContentWrapper extends Component {
|
|
|
12
12
|
host;
|
|
13
13
|
render() {
|
|
14
14
|
splitChildren(this.props.children);
|
|
15
|
-
const style = minifyCss(getComponentCss$
|
|
15
|
+
const style = minifyCss(getComponentCss$13(this.props.width));
|
|
16
16
|
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsx("div", { className: "root", children: jsx("slot", {}) })] }), this.props.children] }));
|
|
17
17
|
}
|
|
18
18
|
}
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/crest.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import { Component } from 'react';
|
|
3
3
|
import { minifyCss } from '../../minifyCss.mjs';
|
|
4
|
-
import { getCrestCss as getComponentCss$
|
|
4
|
+
import { getCrestCss as getComponentCss$12 } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
|
|
5
5
|
import { buildCrestSrcSet, buildCrestImgSrc, parseAndGetAriaAttributes, crestSize } from '../../../../../../components/dist/utils/esm/utils-entry.mjs';
|
|
6
6
|
|
|
7
7
|
const { width, height } = crestSize;
|
|
@@ -9,7 +9,7 @@ class DSRCrest extends Component {
|
|
|
9
9
|
host;
|
|
10
10
|
render() {
|
|
11
11
|
const picture = (jsxs("picture", { children: [jsx("source", { srcSet: buildCrestSrcSet('webp'), type: "image/webp" }, "webp"), jsx("source", { srcSet: buildCrestSrcSet('png'), type: "image/png" }, "png"), jsx("img", { src: buildCrestImgSrc(), width: width, height: height, alt: "Porsche" })] }));
|
|
12
|
-
const style = minifyCss(getComponentCss$
|
|
12
|
+
const style = minifyCss(getComponentCss$12());
|
|
13
13
|
return (jsx(Fragment, { children: jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsx(Fragment, { children: this.props.href === undefined ? (picture) : (jsx("a", { href: this.props.href, target: this.props.target, ...parseAndGetAriaAttributes(this.props.aria), children: picture })) })] }) }));
|
|
14
14
|
}
|
|
15
15
|
}
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/display.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 { getDisplayCss as getComponentCss$
|
|
5
|
+
import { getDisplayCss as getComponentCss$11 } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
|
|
6
6
|
import { getDisplayTagType } from '../../../../../../components/dist/utils/esm/utils-entry.mjs';
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -17,7 +17,7 @@ class DSRDisplay extends Component {
|
|
|
17
17
|
right: 'end',
|
|
18
18
|
};
|
|
19
19
|
const TagType = getDisplayTagType(null, this.props.size, this.props.tag);
|
|
20
|
-
const style = minifyCss(getComponentCss$
|
|
20
|
+
const style = minifyCss(getComponentCss$11(this.props.size, (alignDeprecationMap[this.props.align] || this.props.align), this.props.color, this.props.ellipsis, this.props.theme));
|
|
21
21
|
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsx(TagType, { className: "root", children: jsx("slot", {}) })] }), this.props.children] }));
|
|
22
22
|
}
|
|
23
23
|
}
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/divider.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import { Component } from 'react';
|
|
3
3
|
import { minifyCss } from '../../minifyCss.mjs';
|
|
4
|
-
import { getDividerCss as getComponentCss
|
|
4
|
+
import { getDividerCss as getComponentCss$10 } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
|
|
5
5
|
|
|
6
6
|
class DSRDivider extends Component {
|
|
7
7
|
host;
|
|
@@ -11,7 +11,7 @@ class DSRDivider extends Component {
|
|
|
11
11
|
'neutral-contrast-medium': 'contrast-medium',
|
|
12
12
|
'neutral-contrast-high': 'contrast-high',
|
|
13
13
|
};
|
|
14
|
-
const style = minifyCss(getComponentCss
|
|
14
|
+
const style = minifyCss(getComponentCss$10((deprecationMap[this.props.color] || this.props.color), this.props.orientation || this.props.direction, this.props.theme));
|
|
15
15
|
return (jsx(Fragment, { children: jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsx("hr", {})] }) }));
|
|
16
16
|
}
|
|
17
17
|
}
|
|
@@ -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 { getDrilldownItemCss as getComponentCss$
|
|
6
|
+
import { getDrilldownItemCss as getComponentCss$_ } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
|
|
7
7
|
import { PButtonPure } from '../components/button-pure.wrapper.mjs';
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -24,7 +24,7 @@ class DSRDrilldownItem extends Component {
|
|
|
24
24
|
const { children, namedSlotChildren, otherChildren } = splitChildren(this.props.children);
|
|
25
25
|
const hasSlottedHeader = namedSlotChildren.filter(({ props: { slot } }) => slot === 'header').length > 0;
|
|
26
26
|
const hasSlottedButton = namedSlotChildren.filter(({ props: { slot } }) => slot === 'button').length > 0;
|
|
27
|
-
const style = minifyCss(getComponentCss$
|
|
27
|
+
const style = minifyCss(getComponentCss$_(this.props.primary, this.props.secondary, this.props.cascade));
|
|
28
28
|
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs(Fragment, { children: [hasSlottedButton ? (jsx("slot", { name: "button" })) : (jsx(PButtonPure, { inert: this.props.primary || this.props.cascade, className: "button", type: "button", size: "medium", alignLabel: "start", stretch: true, icon: "arrow-head-right", active: this.props.secondary, aria: { 'aria-expanded': this.props.secondary }, theme: this.theme, children: this.props.label })), jsx(PButtonPure, { className: "back", type: "button", size: "small", alignLabel: "end", stretch: true, icon: "arrow-left", theme: this.theme, hideLabel: { base: true, s: false }, children: this.props.label }), hasSlottedHeader ? jsx("slot", { name: "header" }) : jsx("h2", { children: this.props.label }), jsx("div", { className: "drawer", children: jsx("div", { className: "scroller", children: jsx("slot", {}) }) })] })] }), this.props.children] }));
|
|
29
29
|
}
|
|
30
30
|
}
|
|
@@ -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 { getDrilldownLinkCss as getComponentCss$
|
|
5
|
+
import { getDrilldownLinkCss as getComponentCss$Z } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
|
|
6
6
|
import { parseAndGetAriaAttributes } from '../../../../../../components/dist/utils/esm/utils-entry.mjs';
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -15,7 +15,7 @@ class DSRDrilldownLink extends Component {
|
|
|
15
15
|
render() {
|
|
16
16
|
splitChildren(this.props.children);
|
|
17
17
|
const hasSlottedAnchor = this.props.href === undefined;
|
|
18
|
-
const style = minifyCss(getComponentCss$
|
|
18
|
+
const style = minifyCss(getComponentCss$Z(hasSlottedAnchor, this.props.active));
|
|
19
19
|
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsx(Fragment, { children: hasSlottedAnchor ? (jsx("slot", {})) : (jsx("a", { href: this.props.href, target: this.props.target, download: this.props.download, rel: this.props.rel, "aria-current": this.props.active ? 'true' : 'false', ...parseAndGetAriaAttributes(this.props.aria), children: jsx("slot", {}) })) })] }), this.props.children] }));
|
|
20
20
|
}
|
|
21
21
|
}
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/drilldown.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 { getDrilldownCss as getComponentCss
|
|
6
|
+
import { getDrilldownCss as getComponentCss$$ } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
|
|
7
7
|
import { updateDrilldownItemState, parseAndGetAriaAttributes } 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';
|
|
@@ -31,7 +31,7 @@ class DSRDrilldown extends Component {
|
|
|
31
31
|
}
|
|
32
32
|
render() {
|
|
33
33
|
splitChildren(this.props.children);
|
|
34
|
-
const style = minifyCss(getComponentCss
|
|
34
|
+
const style = minifyCss(getComponentCss$$(this.props.open, this.primary, this.isSecondaryDrawerVisible, this.props.theme));
|
|
35
35
|
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsx("dialog", { inert: !this.props.open, ...parseAndGetAriaAttributes(this.props.aria), children: jsxs("div", { className: "drawer", children: [jsx(PButtonPure, { className: "back", type: "button", size: "small", alignLabel: "end", stretch: true, icon: "arrow-left", theme: this.props.theme, hideLabel: true, children: "Back" }), jsx(PButton, { className: "dismiss-mobile", type: "button", variant: "ghost", hideLabel: true, icon: "close", theme: this.props.theme, children: "Dismiss drilldown" }), jsx(PButtonPure, { className: "dismiss-desktop", type: "button", size: "medium", icon: "close", hideLabel: true, theme: this.props.theme, children: "Dismiss drilldown" }), jsx("div", { className: "scroller", children: jsx("slot", {}) })] }) })] }), this.props.children] }));
|
|
36
36
|
}
|
|
37
37
|
}
|
|
@@ -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 { getFieldsetWrapperCss as getComponentCss$
|
|
5
|
+
import { getFieldsetWrapperCss as getComponentCss$Y } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
|
|
6
6
|
import { messageId, StateMessage } from './state-message.mjs';
|
|
7
7
|
import { Required } from './required.mjs';
|
|
8
8
|
|
|
@@ -18,7 +18,7 @@ class DSRFieldsetWrapper extends Component {
|
|
|
18
18
|
render() {
|
|
19
19
|
const { children, namedSlotChildren, otherChildren } = splitChildren(this.props.children);
|
|
20
20
|
const hasMessageValue = (this.props.message || namedSlotChildren.filter(({ props: { slot } }) => slot === 'message').length > 0) && ['success', 'error'].includes(this.props.state);
|
|
21
|
-
const style = minifyCss(getComponentCss$
|
|
21
|
+
const style = minifyCss(getComponentCss$Y(this.props.state, this.props.labelSize, (this.props.label || namedSlotChildren.filter(({ props: { slot } }) => slot === 'label').length > 0), this.props.theme));
|
|
22
22
|
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs("fieldset", { "aria-describedby": hasMessageValue ? messageId : null, children: [(this.props.label || namedSlotChildren.filter(({ props: { slot } }) => slot === 'label').length > 0) && (jsxs("legend", { children: [this.props.label || jsx("slot", { name: "label" }), this.props.required && jsx(Required, {})] })), jsx("slot", {}), jsx(StateMessage, { hasMessage: (this.props.message || namedSlotChildren.filter(({ props: { slot } }) => slot === 'message').length > 0) && ['success', 'error'].includes(this.props.state), state: this.props.state, message: this.props.message, theme: this.props.theme, host: null })] })] }), this.props.children] }));
|
|
23
23
|
}
|
|
24
24
|
}
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/fieldset.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 { getFieldsetCss as getComponentCss$
|
|
5
|
+
import { getFieldsetCss as getComponentCss$X } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
|
|
6
6
|
import { messageId, StateMessage } from './state-message.mjs';
|
|
7
7
|
import { Required } from './required.mjs';
|
|
8
8
|
|
|
@@ -16,7 +16,7 @@ class DSRFieldset extends Component {
|
|
|
16
16
|
render() {
|
|
17
17
|
const { children, namedSlotChildren, otherChildren } = splitChildren(this.props.children);
|
|
18
18
|
const hasMessageValue = (this.props.message || namedSlotChildren.filter(({ props: { slot } }) => slot === 'message').length > 0) && ['success', 'error'].includes(this.props.state);
|
|
19
|
-
const style = minifyCss(getComponentCss$
|
|
19
|
+
const style = minifyCss(getComponentCss$X(this.props.state, this.props.labelSize, (this.props.label || namedSlotChildren.filter(({ props: { slot } }) => slot === 'label').length > 0), this.props.theme));
|
|
20
20
|
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs("fieldset", { "aria-describedby": hasMessageValue ? messageId : null, children: [(this.props.label || namedSlotChildren.filter(({ props: { slot } }) => slot === 'label').length > 0) && (jsxs("legend", { children: [this.props.label || jsx("slot", { name: "label" }), this.props.required && jsx(Required, {})] })), jsx("slot", {}), jsx(StateMessage, { hasMessage: (this.props.message || namedSlotChildren.filter(({ props: { slot } }) => slot === 'message').length > 0) && ['success', 'error'].includes(this.props.state), state: this.props.state, message: this.props.message, theme: this.props.theme, host: null })] })] }), this.props.children] }));
|
|
21
21
|
}
|
|
22
22
|
}
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flex-item.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 { getFlexItemCss as getComponentCss$
|
|
5
|
+
import { getFlexItemCss as getComponentCss$W } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* @slot {"name": "", "description": "Default slot for the main content." }
|
|
@@ -12,7 +12,7 @@ class DSRFlexItem extends Component {
|
|
|
12
12
|
host;
|
|
13
13
|
render() {
|
|
14
14
|
splitChildren(this.props.children);
|
|
15
|
-
const style = minifyCss(getComponentCss$
|
|
15
|
+
const style = minifyCss(getComponentCss$W(this.props.width, this.props.offset, this.props.alignSelf, this.props.grow, this.props.shrink, this.props.flex));
|
|
16
16
|
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsx("slot", {})] }), this.props.children] }));
|
|
17
17
|
}
|
|
18
18
|
}
|
|
@@ -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 { getFlexCss as getComponentCss$
|
|
5
|
+
import { getFlexCss as getComponentCss$V } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* @slot {"name": "", "description": "Default slot for the flex items." }
|
|
@@ -12,7 +12,7 @@ class DSRFlex extends Component {
|
|
|
12
12
|
host;
|
|
13
13
|
render() {
|
|
14
14
|
splitChildren(this.props.children);
|
|
15
|
-
const style = minifyCss(getComponentCss$
|
|
15
|
+
const style = minifyCss(getComponentCss$V(this.props.inline, this.props.wrap, this.props.direction, this.props.justifyContent, this.props.alignItems, this.props.alignContent));
|
|
16
16
|
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsx("slot", {})] }), this.props.children] }));
|
|
17
17
|
}
|
|
18
18
|
}
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flyout.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 { getFlyoutCss as getComponentCss$
|
|
6
|
+
import { getFlyoutCss as getComponentCss$U } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
|
|
7
7
|
import { parseAndGetAriaAttributes } from '../../../../../../components/dist/utils/esm/utils-entry.mjs';
|
|
8
8
|
import { PButton } from '../components/button.wrapper.mjs';
|
|
9
9
|
|
|
@@ -33,7 +33,7 @@ class DSRFlyout extends Component {
|
|
|
33
33
|
const hasHeader = namedSlotChildren.filter(({ props: { slot } }) => slot === 'header').length > 0;
|
|
34
34
|
const hasFooter = namedSlotChildren.filter(({ props: { slot } }) => slot === 'footer').length > 0;
|
|
35
35
|
const hasSubFooter = namedSlotChildren.filter(({ props: { slot } }) => slot === 'sub-footer').length > 0;
|
|
36
|
-
const style = minifyCss(getComponentCss$
|
|
36
|
+
const style = minifyCss(getComponentCss$U(this.props.open, (positionDeprecationMap[this.props.position] || this.props.position), hasHeader, hasFooter, hasSubFooter, this.props.footerBehavior, this.props.theme));
|
|
37
37
|
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsx("dialog", { tabIndex: -1, ...parseAndGetAriaAttributes({
|
|
38
38
|
'aria-modal': true,
|
|
39
39
|
...{ 'aria-label': hasHeader ? namedSlotChildren.find(({ props: { slot } }) => slot === 'header')?.props.children : 'Flyout' },
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/grid-item.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 { getGridItemCss as getComponentCss$
|
|
5
|
+
import { getGridItemCss as getComponentCss$T } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* @slot {"name": "", "description": "Default slot to render the content." }
|
|
@@ -13,7 +13,7 @@ class DSRGridItem extends Component {
|
|
|
13
13
|
host;
|
|
14
14
|
render() {
|
|
15
15
|
splitChildren(this.props.children);
|
|
16
|
-
const style = minifyCss(getComponentCss$
|
|
16
|
+
const style = minifyCss(getComponentCss$T(this.props.size, this.props.offset));
|
|
17
17
|
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsx("slot", {})] }), this.props.children] }));
|
|
18
18
|
}
|
|
19
19
|
}
|
|
@@ -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 { getGridCss as getComponentCss$
|
|
5
|
+
import { getGridCss as getComponentCss$S } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* @slot {"name": "", "description": "Default slot to render p-grid-item tags." }
|
|
@@ -16,7 +16,7 @@ class DSRGrid extends Component {
|
|
|
16
16
|
const manipulatedChildren = children.map((child) => typeof child === 'object' && 'props' in child && otherChildren.includes(child)
|
|
17
17
|
? { ...child, props: { ...child.props, gutter: this.props.gutter } }
|
|
18
18
|
: child);
|
|
19
|
-
const style = minifyCss(getComponentCss$
|
|
19
|
+
const style = minifyCss(getComponentCss$S(this.props.direction, this.props.wrap));
|
|
20
20
|
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsx("slot", {})] }), manipulatedChildren] }));
|
|
21
21
|
}
|
|
22
22
|
}
|