@porsche-design-system/components-react 3.27.0-rc.5 → 3.27.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/carousel.wrapper.cjs +3 -3
- package/cjs/lib/components/table.wrapper.cjs +3 -3
- package/esm/lib/components/carousel.wrapper.d.ts +11 -3
- package/esm/lib/components/carousel.wrapper.mjs +3 -3
- package/esm/lib/components/table.wrapper.d.ts +17 -1
- package/esm/lib/components/table.wrapper.mjs +3 -3
- package/esm/lib/types.d.ts +13 -0
- package/package.json +2 -2
- package/ssr/cjs/components/dist/styles/esm/styles-entry.cjs +533 -790
- package/ssr/cjs/components/dist/utils/esm/utils-entry.cjs +42 -23
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/carousel.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/table.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/carousel.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/multi-select-option.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/multi-select.cjs +8 -14
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/optgroup.cjs +2 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/popover.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-wrapper-dropdown.cjs +7 -8
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select.cjs +15 -19
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/table.cjs +1 -1
- package/ssr/esm/components/dist/styles/esm/styles-entry.mjs +521 -778
- package/ssr/esm/components/dist/utils/esm/utils-entry.mjs +40 -23
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/carousel.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/table.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/carousel.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/multi-select-option.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/multi-select.mjs +9 -15
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/optgroup.mjs +4 -6
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pagination.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pin-code.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/popover.mjs +6 -6
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/radio-button-wrapper.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/scroller.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/segmented-control-item.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/segmented-control.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-option.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-wrapper-dropdown.mjs +9 -10
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-wrapper.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select.mjs +16 -20
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/table-cell.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/table.mjs +2 -2
- package/ssr/esm/lib/components/carousel.wrapper.d.ts +11 -3
- package/ssr/esm/lib/components/table.wrapper.d.ts +17 -1
- package/ssr/esm/lib/dsr-components/multi-select.d.ts +4 -4
- package/ssr/esm/lib/dsr-components/popover.d.ts +2 -2
- package/ssr/esm/lib/dsr-components/select-wrapper-dropdown.d.ts +4 -4
- package/ssr/esm/lib/dsr-components/select.d.ts +5 -6
- package/ssr/esm/lib/types.d.ts +13 -0
|
@@ -2349,18 +2349,18 @@ function getDynamicStyles(styles) {
|
|
|
2349
2349
|
var index = createJss();
|
|
2350
2350
|
|
|
2351
2351
|
var jss_esm = /*#__PURE__*/Object.freeze({
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2352
|
+
__proto__: null,
|
|
2353
|
+
RuleList: RuleList,
|
|
2354
|
+
SheetsManager: SheetsManager,
|
|
2355
|
+
SheetsRegistry: SheetsRegistry,
|
|
2356
|
+
create: createJss,
|
|
2357
|
+
createGenerateId: createGenerateId,
|
|
2358
|
+
createRule: createRule,
|
|
2359
|
+
default: index,
|
|
2360
|
+
getDynamicStyles: getDynamicStyles,
|
|
2361
|
+
hasCSSTOMSupport: hasCSSTOMSupport,
|
|
2362
|
+
sheets: sheets,
|
|
2363
|
+
toCssValue: toCssValue
|
|
2364
2364
|
});
|
|
2365
2365
|
|
|
2366
2366
|
var at = '@global';
|
|
@@ -3185,9 +3185,6 @@ const getTagNameWithoutPrefix = (host) => {
|
|
|
3185
3185
|
return (tagNameWithoutPrefix || tagName); // return tagName as fallback for default tags
|
|
3186
3186
|
};
|
|
3187
3187
|
|
|
3188
|
-
// This class is shared since the popover needs to register a scroll listener to this node in order to hide the popover when the table is scrolled
|
|
3189
|
-
const scrollAreaClass = 'scroll-area';
|
|
3190
|
-
|
|
3191
3188
|
/* eslint-disable prefer-arrow/prefer-arrow-functions */
|
|
3192
3189
|
function getClosestHTMLElement(element, selector) {
|
|
3193
3190
|
return element?.closest(selector);
|
|
@@ -3241,7 +3238,7 @@ const parseJSONAttribute = (attribute) => {
|
|
|
3241
3238
|
.replace(/[\s"]?([\w-]+)[\s"]?:/g, '"$1":'));
|
|
3242
3239
|
};
|
|
3243
3240
|
|
|
3244
|
-
const hasWindow = typeof window !== 'undefined';
|
|
3241
|
+
const hasWindow$1 = typeof window !== 'undefined';
|
|
3245
3242
|
const parseAndGetAriaAttributes = (rawAttributes) => {
|
|
3246
3243
|
if (rawAttributes) {
|
|
3247
3244
|
return Object.fromEntries(Object.entries(parseJSONAttribute(rawAttributes)).map(([key, val]) => [
|
|
@@ -3252,7 +3249,7 @@ const parseAndGetAriaAttributes = (rawAttributes) => {
|
|
|
3252
3249
|
}
|
|
3253
3250
|
return undefined;
|
|
3254
3251
|
};
|
|
3255
|
-
hasWindow && window.matchMedia?.('(forced-colors: active)').matches;
|
|
3252
|
+
hasWindow$1 && window.matchMedia?.('(forced-colors: active)').matches;
|
|
3256
3253
|
|
|
3257
3254
|
const getButtonBaseAriaAttributes = (isDisabled, isLoading) => {
|
|
3258
3255
|
return {
|
|
@@ -3388,7 +3385,7 @@ supportsConstructableStylesheets();
|
|
|
3388
3385
|
})(); // determine it once
|
|
3389
3386
|
|
|
3390
3387
|
const attributeMutationMap = new Map();
|
|
3391
|
-
hasWindow &&
|
|
3388
|
+
hasWindow$1 &&
|
|
3392
3389
|
new MutationObserver((mutations) => {
|
|
3393
3390
|
for (const mutation of mutations
|
|
3394
3391
|
// reduce array to only entries that have really a changed value
|
|
@@ -3400,7 +3397,7 @@ hasWindow &&
|
|
|
3400
3397
|
});
|
|
3401
3398
|
|
|
3402
3399
|
const mediaQueries = Object.values(breakpoint).map((v) => `(min-width:${v}px)`);
|
|
3403
|
-
hasWindow && window.matchMedia ? mediaQueries.map(window.matchMedia) : [];
|
|
3400
|
+
hasWindow$1 && window.matchMedia ? mediaQueries.map(window.matchMedia) : [];
|
|
3404
3401
|
|
|
3405
3402
|
Object.entries(breakpoint).reduce((result, [key, val]) => ({ ...result, [`${val}px`]: key }), {});
|
|
3406
3403
|
|
|
@@ -3415,7 +3412,7 @@ const observedNodesMap = new Map();
|
|
|
3415
3412
|
/**
|
|
3416
3413
|
* Mutation observer for observing changes in the children of observed nodes.
|
|
3417
3414
|
*/
|
|
3418
|
-
hasWindow &&
|
|
3415
|
+
hasWindow$1 &&
|
|
3419
3416
|
new MutationObserver((mutations) => {
|
|
3420
3417
|
// there may be race conditions in jsdom-polyfill tests where the map is already empty when a mutation happens
|
|
3421
3418
|
if (observedNodesMap.size > 0) {
|
|
@@ -3430,7 +3427,7 @@ hasWindow &&
|
|
|
3430
3427
|
});
|
|
3431
3428
|
|
|
3432
3429
|
const isTouchDevice = () => {
|
|
3433
|
-
if (!hasWindow) {
|
|
3430
|
+
if (!hasWindow$1) {
|
|
3434
3431
|
return undefined;
|
|
3435
3432
|
}
|
|
3436
3433
|
return !!('ontouchstart' in window || window.navigator.maxTouchPoints > 0);
|
|
@@ -3465,6 +3462,9 @@ var MARQUES_MANIFEST = { "porscheMarqueTrademark": { "medium": { "1x": { "png":
|
|
|
3465
3462
|
|
|
3466
3463
|
// index.ts
|
|
3467
3464
|
var MODEL_SIGNATURES_MANIFEST = { "718": { "src": "718.493a9e3.svg", "width": 79, "height": 26 }, "911": { "src": "911.b68f913.svg", "width": 94, "height": 25 }, "boxster": { "src": "boxster.c321738.svg", "width": 239, "height": 26 }, "cayenne": { "src": "cayenne.2556201.svg", "width": 245, "height": 35 }, "cayman": { "src": "cayman.cc89196.svg", "width": 229, "height": 35 }, "macan": { "src": "macan.a1844f4.svg", "width": 196, "height": 26 }, "panamera": { "src": "panamera.6dae809.svg", "width": 260, "height": 25 }, "taycan": { "src": "taycan.df444c6.svg", "width": 167, "height": 36 }, "turbo-s": { "src": "turbo-s.73f1e10.svg", "width": 199, "height": 25 }, "turbo": { "src": "turbo.6a4084a.svg", "width": 143, "height": 25 } };
|
|
3465
|
+
|
|
3466
|
+
// This class is shared since the popover needs to register a scroll listener to this node in order to hide the popover when the table is scrolled
|
|
3467
|
+
const scrollAreaClass = 'scroll-area';
|
|
3468
3468
|
const isScrollable = (isPrevHidden, isNextHidden) => {
|
|
3469
3469
|
return !(isPrevHidden && isNextHidden);
|
|
3470
3470
|
};
|
|
@@ -3533,7 +3533,7 @@ var unwrapErr = (result) => {
|
|
|
3533
3533
|
* @returns {boolean} `true` if the native Popover API is supported, `false` otherwise.
|
|
3534
3534
|
*/
|
|
3535
3535
|
const supportsNativePopover = () => {
|
|
3536
|
-
if (!hasWindow) {
|
|
3536
|
+
if (!hasWindow$1) {
|
|
3537
3537
|
return false;
|
|
3538
3538
|
}
|
|
3539
3539
|
return Object.prototype.hasOwnProperty.call(HTMLElement.prototype, 'popover');
|
|
@@ -3543,6 +3543,22 @@ const hasNativePopoverSupport = supportsNativePopover();
|
|
|
3543
3543
|
// getter for easy mocking
|
|
3544
3544
|
const getHasNativePopoverSupport = () => hasNativePopoverSupport;
|
|
3545
3545
|
|
|
3546
|
+
/**
|
|
3547
|
+
* Checks if the current environment supports the native CSS Anchor Positioning.
|
|
3548
|
+
*
|
|
3549
|
+
* @returns {boolean} `true` if native CSS Anchor Positioning is supported, `false` otherwise.
|
|
3550
|
+
*/
|
|
3551
|
+
const supportsNativeCSSAnchorPositioning = () => {
|
|
3552
|
+
// SSR or older browsers
|
|
3553
|
+
if (typeof CSS === 'undefined' || !CSS.supports)
|
|
3554
|
+
return false;
|
|
3555
|
+
return CSS.supports('(anchor-name: --test) and (position-anchor: --test) and (position-area: bottom) and (position-try-fallbacks: flip-block) and (width: anchor-size(width))');
|
|
3556
|
+
};
|
|
3557
|
+
// determine it once
|
|
3558
|
+
const hasNativeCSSAnchorPositioningSupport = supportsNativeCSSAnchorPositioning();
|
|
3559
|
+
// getter for easy mocking
|
|
3560
|
+
const getHasCSSAnchorPositioningSupport = () => hasNativeCSSAnchorPositioningSupport;
|
|
3561
|
+
|
|
3546
3562
|
const hasDocument = typeof document !== 'undefined';
|
|
3547
3563
|
|
|
3548
3564
|
const HEADING_TAGS = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
|
|
@@ -3572,6 +3588,7 @@ const getButtonAriaAttributes = (isDisabled, isLoading, aria) => {
|
|
|
3572
3588
|
};
|
|
3573
3589
|
getMediaQueryMin('s');
|
|
3574
3590
|
getMediaQueryMin('xxl');
|
|
3591
|
+
['auto', ...Array.from(new Array(10), (_, i) => i + 1)];
|
|
3575
3592
|
// Infinite bullets will be shown if the total number of bullets is greater than this value
|
|
3576
3593
|
const INFINITE_BULLET_THRESHOLD = 5;
|
|
3577
3594
|
const isInfinitePagination = (amountOfPages) => {
|
|
@@ -3908,4 +3925,4 @@ const getTextTagType = (host, tag) => {
|
|
|
3908
3925
|
return tag;
|
|
3909
3926
|
};
|
|
3910
3927
|
|
|
3911
|
-
export { DISPLAY_TAGS, HEADING_TAGS, HEADLINE_TAGS, ItemType, TEXT_TAGS, _hasShowPickerSupport, anchorSlot, attributeMutationMap, buildCrestImgSrc, buildCrestSrcSet, buildIconUrl, buildImgSrc, buildSrcSet, createPaginationItems, createRange, crestSize, debounce, displaySizeToTagMap, getButtonAriaAttributes, getButtonBaseAriaAttributes, getButtonPureAriaAttributes, getCDNBaseURL, getClosestHTMLElement, getComboboxAriaAttributes, getContentAriaAttributes, getCurrentActivePage, getDirectChildHTMLElement, getDisplayTagType, getHTMLElement, getHasNativePopoverSupport, getHeadingTagType, getHeadlineTagType, getIconColor, getInlineNotificationIconName, getInnerManifest, getListAriaAttributes, getOptionAriaAttributes, getRole, getSegmentedControlItemAriaAttributes, getSelectedOptionMap, getSelectedOptionString, getSelectedOptionValues, getSelectedOptions, getStepperHorizontalIconName, getSvgUrl, getSwitchButtonAriaAttributes, getTagName, getTagNameWithoutPrefix, getTextTagType, getTotalPages, hasDocument, hasLocateAction, hasSpecificDirectChildTag, hasVisibleIcon, hasWindow, headerSlot, isCurrentInput, isCustomDropdown, isDisabledOrLoading, isElementOfKind, isInfinitePagination, isListTypeOrdered, isScrollable, isSortable, isStateCompleteOrWarning, isTouchDevice, isType, isUrl, isWithinForm, observedNodesMap, parseAndGetAriaAttributes, parseJSONAttribute, scrollAreaClass, showCustomCalendarOrTimeIndicator, supportsConstructableStylesheets, supportsNativePopover, tempDiv, tempIcon, tempLabel, traverseTreeAndUpdateState, updateFlyoutMultiLevelItemState };
|
|
3928
|
+
export { DISPLAY_TAGS, HEADING_TAGS, HEADLINE_TAGS, ItemType, TEXT_TAGS, _hasShowPickerSupport, anchorSlot, attributeMutationMap, buildCrestImgSrc, buildCrestSrcSet, buildIconUrl, buildImgSrc, buildSrcSet, createPaginationItems, createRange, crestSize, debounce, displaySizeToTagMap, getButtonAriaAttributes, getButtonBaseAriaAttributes, getButtonPureAriaAttributes, getCDNBaseURL, getClosestHTMLElement, getComboboxAriaAttributes, getContentAriaAttributes, getCurrentActivePage, getDirectChildHTMLElement, getDisplayTagType, getHTMLElement, getHasCSSAnchorPositioningSupport, getHasNativePopoverSupport, getHeadingTagType, getHeadlineTagType, getIconColor, getInlineNotificationIconName, getInnerManifest, getListAriaAttributes, getOptionAriaAttributes, getRole, getSegmentedControlItemAriaAttributes, getSelectedOptionMap, getSelectedOptionString, getSelectedOptionValues, getSelectedOptions, 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, observedNodesMap, parseAndGetAriaAttributes, parseJSONAttribute, scrollAreaClass, showCustomCalendarOrTimeIndicator, supportsConstructableStylesheets, supportsNativeCSSAnchorPositioning, supportsNativePopover, tempDiv, tempIcon, tempLabel, traverseTreeAndUpdateState, updateFlyoutMultiLevelItemState };
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/carousel.wrapper.mjs
CHANGED
|
@@ -5,22 +5,22 @@ import { useEventCallback, usePrefix, useTheme, useBrowserLayoutEffect, useMerge
|
|
|
5
5
|
import { syncRef } from '../../utils.mjs';
|
|
6
6
|
import { DSRCarousel } from '../dsr-components/carousel.mjs';
|
|
7
7
|
|
|
8
|
-
const PCarousel = /*#__PURE__*/ forwardRef(({ activeSlideIndex = 0, alignHeader = 'start', aria, description, disablePagination, focusOnCenterSlide = false, gradientColor = 'none', heading, headingSize = 'x-large', intl, onCarouselChange, onUpdate, pagination = true, rewind = true, skipLinkTarget, slidesPerPage = 1, theme, trimSpace = true, width = 'basic', wrapContent, className, children, ...rest }, ref) => {
|
|
8
|
+
const PCarousel = /*#__PURE__*/ forwardRef(({ activeSlideIndex = 0, alignControls = 'auto', alignHeader = 'start', aria, description, disablePagination, focusOnCenterSlide = false, gradientColor = 'none', heading, headingSize = 'x-large', intl, onCarouselChange, onUpdate, pagination = true, rewind = true, skipLinkTarget, slidesPerPage = 1, theme, trimSpace = true, width = 'basic', wrapContent, className, children, ...rest }, ref) => {
|
|
9
9
|
const elementRef = useRef(undefined);
|
|
10
10
|
useEventCallback(elementRef, 'carouselChange', onCarouselChange);
|
|
11
11
|
useEventCallback(elementRef, 'update', onUpdate);
|
|
12
12
|
const WebComponentTag = usePrefix('p-carousel');
|
|
13
|
-
const propsToSync = [activeSlideIndex, alignHeader, aria, description, disablePagination, focusOnCenterSlide, gradientColor, heading, headingSize, intl, pagination, rewind, skipLinkTarget, slidesPerPage, theme || useTheme(), trimSpace, width, wrapContent];
|
|
13
|
+
const propsToSync = [activeSlideIndex, alignControls, alignHeader, aria, description, disablePagination, focusOnCenterSlide, gradientColor, heading, headingSize, intl, pagination, rewind, skipLinkTarget, slidesPerPage, theme || useTheme(), trimSpace, width, wrapContent];
|
|
14
14
|
useBrowserLayoutEffect(() => {
|
|
15
15
|
const { current } = elementRef;
|
|
16
|
-
['activeSlideIndex', 'alignHeader', 'aria', 'description', 'disablePagination', 'focusOnCenterSlide', 'gradientColor', 'heading', 'headingSize', 'intl', 'pagination', 'rewind', 'skipLinkTarget', 'slidesPerPage', 'theme', 'trimSpace', 'width', 'wrapContent'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
16
|
+
['activeSlideIndex', 'alignControls', 'alignHeader', 'aria', 'description', 'disablePagination', 'focusOnCenterSlide', 'gradientColor', 'heading', 'headingSize', 'intl', 'pagination', 'rewind', 'skipLinkTarget', 'slidesPerPage', 'theme', 'trimSpace', 'width', 'wrapContent'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
17
17
|
}, propsToSync);
|
|
18
18
|
const props = {
|
|
19
19
|
...rest,
|
|
20
20
|
// @ts-ignore
|
|
21
21
|
...(!process.browser
|
|
22
22
|
? {
|
|
23
|
-
children: (jsx(DSRCarousel, { activeSlideIndex, alignHeader, aria, description, disablePagination, focusOnCenterSlide, gradientColor, heading, headingSize, intl, pagination, rewind, skipLinkTarget, slidesPerPage, theme: theme || useTheme(), trimSpace, width, wrapContent, children })),
|
|
23
|
+
children: (jsx(DSRCarousel, { activeSlideIndex, alignControls, alignHeader, aria, description, disablePagination, focusOnCenterSlide, gradientColor, heading, headingSize, intl, pagination, rewind, skipLinkTarget, slidesPerPage, theme: theme || useTheme(), trimSpace, width, wrapContent, children })),
|
|
24
24
|
}
|
|
25
25
|
: {
|
|
26
26
|
children,
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/table.wrapper.mjs
CHANGED
|
@@ -5,22 +5,22 @@ import { useEventCallback, usePrefix, useTheme, useBrowserLayoutEffect, useMerge
|
|
|
5
5
|
import { syncRef } from '../../utils.mjs';
|
|
6
6
|
import { DSRTable } from '../dsr-components/table.mjs';
|
|
7
7
|
|
|
8
|
-
const PTable = /*#__PURE__*/ forwardRef(({ caption, onSortingChange, onUpdate, theme, className, children, ...rest }, ref) => {
|
|
8
|
+
const PTable = /*#__PURE__*/ forwardRef(({ caption, compact = false, layout = 'auto', onSortingChange, onUpdate, theme, className, children, ...rest }, ref) => {
|
|
9
9
|
const elementRef = useRef(undefined);
|
|
10
10
|
useEventCallback(elementRef, 'sortingChange', onSortingChange);
|
|
11
11
|
useEventCallback(elementRef, 'update', onUpdate);
|
|
12
12
|
const WebComponentTag = usePrefix('p-table');
|
|
13
|
-
const propsToSync = [caption, theme || useTheme()];
|
|
13
|
+
const propsToSync = [caption, compact, layout, theme || useTheme()];
|
|
14
14
|
useBrowserLayoutEffect(() => {
|
|
15
15
|
const { current } = elementRef;
|
|
16
|
-
['caption', 'theme'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
16
|
+
['caption', 'compact', 'layout', 'theme'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
17
17
|
}, propsToSync);
|
|
18
18
|
const props = {
|
|
19
19
|
...rest,
|
|
20
20
|
// @ts-ignore
|
|
21
21
|
...(!process.browser
|
|
22
22
|
? {
|
|
23
|
-
children: (jsx(DSRTable, { caption, theme: theme || useTheme(), children })),
|
|
23
|
+
children: (jsx(DSRTable, { caption, compact, layout, theme: theme || useTheme(), children })),
|
|
24
24
|
}
|
|
25
25
|
: {
|
|
26
26
|
children,
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/carousel.mjs
CHANGED
|
@@ -55,7 +55,7 @@ class DSRCarousel extends Component {
|
|
|
55
55
|
? Object.fromEntries(Object.entries(this.props.disablePagination).map(([key, value]) => [key, !value]))
|
|
56
56
|
: !this.props.disablePagination
|
|
57
57
|
: this.props.pagination, isInfinitePagination(this.props.focusOnCenterSlide ? this.slides.length : this.props.amountOfPages), (alignHeaderDeprecationMap[this.props.alignHeader] ||
|
|
58
|
-
this.props.alignHeader), this.props.theme, (this.props.slidesPerPage === 'auto' || typeof this.props.slidesPerPage === 'object' || this.props.slidesPerPage < otherChildren.length))));
|
|
58
|
+
this.props.alignHeader), this.props.theme, (this.props.slidesPerPage === 'auto' || typeof this.props.slidesPerPage === 'object' || this.props.slidesPerPage < otherChildren.length), this.props.alignControls)));
|
|
59
59
|
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs(Fragment, { children: [jsxs("div", { className: "header", children: [hasHeadingPropOrSlot &&
|
|
60
60
|
(this.props.heading ? (jsx("h2", { className: "heading", id: headingId, children: this.props.heading })) : (jsx("div", { className: "heading", id: headingId, children: jsx("slot", { name: "heading" }) }))), hasDescriptionPropOrSlot && (this.props.description ? jsx("p", { children: this.props.description }) : jsx("slot", { name: "description" })), hasControlsSlot && jsx("slot", { name: "controls" }), jsxs("div", { className: "nav", children: [this.props.skipLinkTarget && (jsx(PLinkPure, { href: this.props.skipLinkTarget, theme: this.props.theme, icon: "arrow-last", className: "btn skip-link", alignLabel: "start", hideLabel: true, children: "Skip carousel entries" })), (this.props.slidesPerPage === 'auto' || typeof this.props.slidesPerPage === 'object' || this.props.slidesPerPage < otherChildren.length) && (jsx(PButtonPure, { ...btnProps, icon: "arrow-left" })), (this.props.slidesPerPage === 'auto' || typeof this.props.slidesPerPage === 'object' || this.props.slidesPerPage < otherChildren.length) && (jsx(PButtonPure, { ...btnProps, icon: "arrow-right" }))] })] }), jsx("div", { id: "splide", className: "splide", ...parseAndGetAriaAttributes({
|
|
61
61
|
'aria-labelledby': hasHeadingPropOrSlot && !this.props.aria ? headingId : undefined,
|
|
@@ -13,7 +13,7 @@ class DSRMultiSelectOption extends Component {
|
|
|
13
13
|
host;
|
|
14
14
|
render() {
|
|
15
15
|
splitChildren(this.props.children);
|
|
16
|
-
const { theme = 'light', selected, highlighted
|
|
16
|
+
const { theme = 'light', selected, highlighted } = this.props;
|
|
17
17
|
this.props.disabled || this.props.disabledParent;
|
|
18
18
|
minifyCss(stripFocusAndHoverStyles(getComponentCss$D(theme)));
|
|
19
19
|
return (jsx(Fragment, {}));
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/multi-select.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import { splitChildren } from '../../splitChildren.mjs';
|
|
|
5
5
|
import { minifyCss } from '../../minifyCss.mjs';
|
|
6
6
|
import { stripFocusAndHoverStyles } from '../../stripFocusAndHoverStyles.mjs';
|
|
7
7
|
import { getMultiSelectCss as getComponentCss$C } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
|
|
8
|
-
import { getSelectedOptionValues, getSelectedOptions } from '../../../../../../components/dist/utils/esm/utils-entry.mjs';
|
|
8
|
+
import { getHasNativePopoverSupport, getHasCSSAnchorPositioningSupport, getSelectedOptionValues, getSelectedOptions } from '../../../../../../components/dist/utils/esm/utils-entry.mjs';
|
|
9
9
|
import { PButtonPure } from '../components/button-pure.wrapper.mjs';
|
|
10
10
|
import { Label } from './label.mjs';
|
|
11
11
|
import { StateMessage } from './state-message.mjs';
|
|
@@ -30,13 +30,13 @@ class DSRMultiSelect extends Component {
|
|
|
30
30
|
defaultValue;
|
|
31
31
|
multiSelectOptions = [];
|
|
32
32
|
multiSelectOptgroups = [];
|
|
33
|
-
inputContainer;
|
|
34
33
|
inputElement;
|
|
35
|
-
|
|
34
|
+
resetButtonElement;
|
|
36
35
|
preventOptionUpdate = false; // Used to prevent value watcher from updating options when options are already updated
|
|
37
|
-
isNativePopoverCase = false;
|
|
38
|
-
parentTableElement;
|
|
39
36
|
popoverElement;
|
|
37
|
+
hasNativePopoverSupport = getHasNativePopoverSupport();
|
|
38
|
+
hasNativeCSSAnchorPositioningSupport = getHasCSSAnchorPositioningSupport();
|
|
39
|
+
cleanUpAutoUpdate;
|
|
40
40
|
get currentValue() {
|
|
41
41
|
return getSelectedOptionValues(this.props.multiSelectOptions);
|
|
42
42
|
}
|
|
@@ -56,17 +56,11 @@ class DSRMultiSelect extends Component {
|
|
|
56
56
|
}
|
|
57
57
|
render() {
|
|
58
58
|
const { children, namedSlotChildren, otherChildren } = splitChildren(this.props.children);
|
|
59
|
-
const optionsSelectedId = 'options-selected';
|
|
60
|
-
const dropdownId = 'list';
|
|
61
59
|
const inputId = 'filter';
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
...(this.props.popoverElement?.matches(':popover-open') && {
|
|
67
|
-
'popover-open': true,
|
|
68
|
-
}),
|
|
69
|
-
}), children: jsxs("div", { id: dropdownId, className: "listbox", children: [!this.props.hasFilterResults && (jsxs("div", { className: "no-results", role: "option", children: [jsx("span", { "aria-hidden": "true", children: "---" }), jsx("span", { className: "sr-only", children: "No results found" })] })), 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 }), jsx("span", { className: "sr-only", role: "status", "aria-live": "assertive", "aria-relevant": "additions text", children: this.props.hasFilterResults ? this.props.srHighlightedOptionText : 'No results found' })] })] }), this.props.children] }));
|
|
60
|
+
const popoverId = 'list';
|
|
61
|
+
const optionsSelectedId = 'options-selected';
|
|
62
|
+
const style = minifyCss(stripFocusAndHoverStyles(getComponentCss$C(this.props.dropdownDirection, this.props.isOpen, this.props.disabled, this.props.hideLabel, this.props.state, this.props.hasNativeCSSAnchorPositioningSupport, this.props.theme)));
|
|
63
|
+
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs("div", { className: "root", children: [jsx(Label, { hasLabel: this.props.label || namedSlotChildren.filter(({ props: { slot } }) => slot === 'label').length > 0, hasDescription: this.props.description || namedSlotChildren.filter(({ props: { slot } }) => slot === 'description').length > 0, host: null, label: this.props.label, description: this.props.description, htmlFor: inputId, isRequired: this.props.required, isDisabled: this.props.disabled }), this.props.currentValue && (jsxs("span", { id: optionsSelectedId, className: "sr-only", children: [getSelectedOptions(this.props.multiSelectOptions).length, " options selected"] })), jsxs("div", { className: `wrapper${this.props.disabled ? ' disabled' : ''}`, children: [jsx("input", { id: inputId, role: "combobox", autoComplete: "off", disabled: this.props.disabled, required: this.props.required, "aria-invalid": this.props.state === 'error' ? 'true' : null }), jsx(PIcon, { className: "icon", name: "arrow-head-down", theme: this.props.theme, "aria-hidden": "true" }), this.props.currentValue && (jsx(PButtonPure, { type: "button", className: "button", icon: "close", hideLabel: true, theme: this.props.theme, disabled: this.props.disabled, children: "Reset selection" })), jsxs("div", { id: popoverId, popover: "manual", tabIndex: -1, children: [!this.props.hasFilterResults && (jsxs("div", { className: "no-results", role: "option", children: [jsx("span", { "aria-hidden": "true", children: "---" }), jsx("span", { className: "sr-only", children: "No results found" })] })), 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 }), jsx("span", { className: "sr-only", role: "status", "aria-live": "assertive", "aria-relevant": "additions text", children: this.props.hasFilterResults ? this.props.srHighlightedOptionText : 'No results found' })] })] }), this.props.children] }));
|
|
70
64
|
}
|
|
71
65
|
}
|
|
72
66
|
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/optgroup.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { splitChildren } from '../../splitChildren.mjs';
|
|
|
3
3
|
import { Component } from 'react';
|
|
4
4
|
import { minifyCss } from '../../minifyCss.mjs';
|
|
5
5
|
import { stripFocusAndHoverStyles } from '../../stripFocusAndHoverStyles.mjs';
|
|
6
|
-
import { getOptgroupCss as getComponentCss$
|
|
6
|
+
import { getOptgroupCss as getComponentCss$B } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* @slot {"name": "", "description": "Default slot for the optgroup content." }
|
|
@@ -13,11 +13,9 @@ class DSROptgroup extends Component {
|
|
|
13
13
|
render() {
|
|
14
14
|
splitChildren(this.props.children);
|
|
15
15
|
const { theme = 'light', hidden } = this.props;
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
'optgroup--disabled': this.props.disabled,
|
|
20
|
-
}).map(([key, value]) => value && key).filter(Boolean).join(' '), "aria-disabled": this.props.disabled ? 'true' : null, "aria-hidden": hidden ? 'true' : null, "aria-labelledby": "label", children: [jsx("span", { className: "label", role: "presentation", id: "label", children: this.props.label }), jsx("slot", {})] }) })] }), this.props.children] }));
|
|
16
|
+
const labelId = 'label';
|
|
17
|
+
const style = minifyCss(stripFocusAndHoverStyles(getComponentCss$B(this.props.disabled, theme)));
|
|
18
|
+
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsx(Fragment, { children: jsxs("div", { role: "group", "aria-disabled": this.props.disabled ? 'true' : null, "aria-hidden": hidden ? 'true' : null, "aria-labelledby": labelId, children: [jsx("span", { id: labelId, role: "presentation", children: this.props.label }), jsx("slot", {})] }) })] }), this.props.children] }));
|
|
21
19
|
}
|
|
22
20
|
}
|
|
23
21
|
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pagination.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { Component } from 'react';
|
|
|
3
3
|
import '../../provider.mjs';
|
|
4
4
|
import { minifyCss } from '../../minifyCss.mjs';
|
|
5
5
|
import { stripFocusAndHoverStyles } from '../../stripFocusAndHoverStyles.mjs';
|
|
6
|
-
import { getPaginationCss as getComponentCss$
|
|
6
|
+
import { getPaginationCss as getComponentCss$A } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
|
|
7
7
|
import { getTotalPages, createPaginationItems, getCurrentActivePage, ItemType } from '../../../../../../components/dist/utils/esm/utils-entry.mjs';
|
|
8
8
|
import { PIcon } from '../components/icon.wrapper.mjs';
|
|
9
9
|
|
|
@@ -19,7 +19,7 @@ class DSRPagination extends Component {
|
|
|
19
19
|
pageTotal,
|
|
20
20
|
showLastPage: this.props.showLastPage,
|
|
21
21
|
});
|
|
22
|
-
const style = minifyCss(stripFocusAndHoverStyles(getComponentCss$
|
|
22
|
+
const style = minifyCss(stripFocusAndHoverStyles(getComponentCss$A(this.props.activePage, pageTotal, this.props.showLastPage, this.props.theme)));
|
|
23
23
|
return (jsx(Fragment, { children: jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsx("nav", { "aria-label": this.props.allyLabel || this.props.intl.root, children: jsx("ul", { children: paginationItems.map((pageModel, index) => {
|
|
24
24
|
const { type, isActive, value, isBeforeCurrent, isAfterCurrent, isBeforeBeforeCurrent, isAfterAfterCurrent, } = pageModel;
|
|
25
25
|
const spanProps = {
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pin-code.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import '../../provider.mjs';
|
|
|
4
4
|
import { splitChildren } from '../../splitChildren.mjs';
|
|
5
5
|
import { minifyCss } from '../../minifyCss.mjs';
|
|
6
6
|
import { stripFocusAndHoverStyles } from '../../stripFocusAndHoverStyles.mjs';
|
|
7
|
-
import { getPinCodeCss as getComponentCss$
|
|
7
|
+
import { getPinCodeCss as getComponentCss$z } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
|
|
8
8
|
import { isCurrentInput } from '../../../../../../components/dist/utils/esm/utils-entry.mjs';
|
|
9
9
|
import { LoadingMessage } from './loading-message.mjs';
|
|
10
10
|
import { Label, labelId, descriptionId } from './label.mjs';
|
|
@@ -38,7 +38,7 @@ class DSRPinCode extends Component {
|
|
|
38
38
|
// reset array of input elements
|
|
39
39
|
this.inputElements = [];
|
|
40
40
|
const currentInputId = 'current-input';
|
|
41
|
-
const style = minifyCss(stripFocusAndHoverStyles(getComponentCss$
|
|
41
|
+
const style = minifyCss(stripFocusAndHoverStyles(getComponentCss$z(this.props.hideLabel, this.props.state, this.props.disabled, this.props.loading, this.props.length, this.props.theme)));
|
|
42
42
|
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs("div", { className: "root", children: [jsx(Label, { hasLabel: this.props.label || namedSlotChildren.filter(({ props: { slot } }) => slot === 'label').length > 0, hasDescription: this.props.description || namedSlotChildren.filter(({ props: { slot } }) => slot === 'description').length > 0, host: null, label: this.props.label, description: this.props.description, htmlFor: currentInputId, isRequired: this.props.required, isLoading: this.props.loading, isDisabled: this.props.disabled }), jsxs("div", { className: "wrapper", children: [Array.from(new Array(this.props.length), (_, index) => (jsx("input", { name: this.props.name, form: this.props.form, ...(isCurrentInput(index, this.props.value, this.props.length) && { id: currentInputId }), type: this.props.type === 'number' ? 'text' : this.props.type, "aria-label": `${index + 1}-${this.props.length}`, "aria-describedby": `${labelId} ${descriptionId} ${messageId}`, "aria-invalid": this.props.state === 'error' ? 'true' : null, "aria-disabled": this.props.loading ? 'true' : null, autoComplete: "one-time-code", pattern: "\\d*", inputMode: "numeric" // get numeric keyboard on mobile
|
|
43
43
|
, defaultValue: this.props.value[index] === ' ' ? null : this.props.value[index], disabled: this.props.disabled, required: this.props.required }, index))), 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] }));
|
|
44
44
|
}
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/popover.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import '../../provider.mjs';
|
|
|
4
4
|
import { splitChildren } from '../../splitChildren.mjs';
|
|
5
5
|
import { minifyCss } from '../../minifyCss.mjs';
|
|
6
6
|
import { stripFocusAndHoverStyles } from '../../stripFocusAndHoverStyles.mjs';
|
|
7
|
-
import { getPopoverCss as getComponentCss$
|
|
7
|
+
import { getPopoverCss as getComponentCss$y } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
|
|
8
8
|
import { getHasNativePopoverSupport, parseAndGetAriaAttributes } from '../../../../../../components/dist/utils/esm/utils-entry.mjs';
|
|
9
9
|
import { PIcon } from '../components/icon.wrapper.mjs';
|
|
10
10
|
|
|
@@ -13,19 +13,19 @@ import { PIcon } from '../components/icon.wrapper.mjs';
|
|
|
13
13
|
*/
|
|
14
14
|
class DSRPopover extends Component {
|
|
15
15
|
host;
|
|
16
|
-
|
|
16
|
+
isOpen = false;
|
|
17
17
|
popover;
|
|
18
18
|
button;
|
|
19
19
|
arrow;
|
|
20
|
-
|
|
20
|
+
cleanUpAutoUpdate;
|
|
21
21
|
hasNativePopoverSupport = getHasNativePopoverSupport();
|
|
22
22
|
render() {
|
|
23
23
|
splitChildren(this.props.children);
|
|
24
|
-
const style = minifyCss(stripFocusAndHoverStyles(getComponentCss$
|
|
24
|
+
const style = minifyCss(stripFocusAndHoverStyles(getComponentCss$y(this.props.theme).replace(/(:host {[\S\s]+?})[\S\s]+(button {[\S\s]+?})[\S\s]+(.icon {[\S\s]+?})[\S\s]+(.label {[\S\s]+?})[\S\s]+/, '$1\n$2\n$3\n$4')));
|
|
25
25
|
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs(Fragment, { children: [jsxs("button", { type: "button", ...parseAndGetAriaAttributes({
|
|
26
26
|
...parseAndGetAriaAttributes(this.props.aria),
|
|
27
|
-
...{ 'aria-expanded': this.props.
|
|
28
|
-
}), children: [jsx(PIcon, { className: "icon", name: "information", theme: this.props.theme }), jsx("span", { className: "label", children: "More information" })] }), this.props.
|
|
27
|
+
...{ 'aria-expanded': this.props.isOpen },
|
|
28
|
+
}), children: [jsx(PIcon, { className: "icon", name: "information", theme: this.props.theme }), jsx("span", { className: "label", children: "More information" })] }), this.props.isOpen && (jsxs("div", { popover: "auto", children: [jsx("div", { className: "arrow" }), jsx("div", { className: "content", children: this.props.description ? jsx("p", { children: this.props.description }) : jsx("slot", {}) })] }))] })] }), this.props.children] }));
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
|
|
@@ -4,7 +4,7 @@ import '../../provider.mjs';
|
|
|
4
4
|
import { splitChildren } from '../../splitChildren.mjs';
|
|
5
5
|
import { minifyCss } from '../../minifyCss.mjs';
|
|
6
6
|
import { stripFocusAndHoverStyles } from '../../stripFocusAndHoverStyles.mjs';
|
|
7
|
-
import { getRadioButtonWrapperCss as getComponentCss$
|
|
7
|
+
import { getRadioButtonWrapperCss as getComponentCss$x } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
|
|
8
8
|
import { LoadingMessage } from './loading-message.mjs';
|
|
9
9
|
import { Label } from './label.mjs';
|
|
10
10
|
import { StateMessage } from './state-message.mjs';
|
|
@@ -23,7 +23,7 @@ class DSRRadioButtonWrapper extends Component {
|
|
|
23
23
|
const { children, namedSlotChildren, otherChildren } = splitChildren(this.props.children);
|
|
24
24
|
const { disabled } = typeof otherChildren[0] === 'object' && 'props' in otherChildren[0] && otherChildren[0]?.props || {};
|
|
25
25
|
const isLoading = this.props.loading && !(typeof otherChildren[0] === 'object' && 'props' in otherChildren[0] && (otherChildren[0]?.props.checked || otherChildren[0]?.props.defaultChecked)); // spinner is only displayed when radio is not checked already
|
|
26
|
-
const style = minifyCss(stripFocusAndHoverStyles(getComponentCss$
|
|
26
|
+
const style = minifyCss(stripFocusAndHoverStyles(getComponentCss$x(this.props.hideLabel, this.props.state, disabled, isLoading, this.props.theme)));
|
|
27
27
|
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs("div", { className: "root", children: [jsx(Label, { hasLabel: this.props.label || namedSlotChildren.filter(({ props: { slot } }) => slot === 'label').length > 0, hasDescription: this.props.description || namedSlotChildren.filter(({ props: { slot } }) => slot === 'description').length > 0, host: null, label: this.props.label, isLoading: isLoading, isDisabled: disabled, formElement: typeof otherChildren[0] === 'object' && 'props' in otherChildren[0] && otherChildren[0]?.props }), jsxs("div", { className: "wrapper", children: [jsx("slot", {}), isLoading && (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: isLoading, initialLoading: this.props.initialLoading })] })] }), this.props.children] }));
|
|
28
28
|
}
|
|
29
29
|
}
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/scroller.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import '../../provider.mjs';
|
|
|
4
4
|
import { splitChildren } from '../../splitChildren.mjs';
|
|
5
5
|
import { minifyCss } from '../../minifyCss.mjs';
|
|
6
6
|
import { stripFocusAndHoverStyles } from '../../stripFocusAndHoverStyles.mjs';
|
|
7
|
-
import { getScrollerCss as getComponentCss$
|
|
7
|
+
import { getScrollerCss as getComponentCss$w } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
|
|
8
8
|
import { scrollAreaClass, parseAndGetAriaAttributes, isScrollable } from '../../../../../../components/dist/utils/esm/utils-entry.mjs';
|
|
9
9
|
import { PButton } from '../components/button.wrapper.mjs';
|
|
10
10
|
|
|
@@ -27,7 +27,7 @@ class DSRScroller extends Component {
|
|
|
27
27
|
return (jsx("div", { className: direction === 'next' ? 'action-next' : 'action-prev', children: jsx(PButton, { className: "action-button", variant: "ghost", "hide-label": "true", icon: direction === 'next' ? 'arrow-head-right' : 'arrow-head-left', type: "button", tabIndex: -1, theme: this.props.theme, dir: "ltr" // Otherwise icon will be flipped which doesn't make sense in this use case
|
|
28
28
|
, children: direction }) }, direction));
|
|
29
29
|
};
|
|
30
|
-
const style = minifyCss(stripFocusAndHoverStyles(getComponentCss$
|
|
30
|
+
const style = minifyCss(stripFocusAndHoverStyles(getComponentCss$w(deprecationMap[this.props.gradientColorScheme] || this.props.gradientColor, this.isNextHidden, this.isPrevHidden, this.props.scrollIndicatorPosition || this.props.alignScrollIndicator, this.props.scrollbar, this.props.theme)));
|
|
31
31
|
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs("div", { className: "root", children: [jsx("div", { className: scrollAreaClass, children: jsxs("div", { className: "scroll-wrapper", role: parseAndGetAriaAttributes(this.props.aria)?.role || null, tabIndex: isScrollable(this.isPrevHidden, this.isNextHidden) ? 0 : null, children: [jsx("slot", {}), jsx("div", { className: "trigger" }), jsx("div", { className: "trigger" })] }) }), ['prev', 'next'].map(renderPrevNextButton)] })] }), this.props.children] }));
|
|
32
32
|
}
|
|
33
33
|
}
|
|
@@ -4,7 +4,7 @@ import '../../provider.mjs';
|
|
|
4
4
|
import { splitChildren } from '../../splitChildren.mjs';
|
|
5
5
|
import { minifyCss } from '../../minifyCss.mjs';
|
|
6
6
|
import { stripFocusAndHoverStyles } from '../../stripFocusAndHoverStyles.mjs';
|
|
7
|
-
import { getSegmentedControlItemCss as getComponentCss$
|
|
7
|
+
import { getSegmentedControlItemCss as getComponentCss$v } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
|
|
8
8
|
import { getSegmentedControlItemAriaAttributes, getIconColor } from '../../../../../../components/dist/utils/esm/utils-entry.mjs';
|
|
9
9
|
import { PIcon } from '../components/icon.wrapper.mjs';
|
|
10
10
|
|
|
@@ -19,7 +19,7 @@ class DSRSegmentedControlItem extends Component {
|
|
|
19
19
|
const hasIcon = !!this.props.icon || !!this.props.iconSource;
|
|
20
20
|
const hasSlottedContent = !!children.length;
|
|
21
21
|
const isDisabled = this.props.disabled || this.props.disabledParent;
|
|
22
|
-
const style = minifyCss(stripFocusAndHoverStyles(getComponentCss$
|
|
22
|
+
const style = minifyCss(stripFocusAndHoverStyles(getComponentCss$v(isDisabled, this.props.selected, hasIcon, hasSlottedContent, this.props.theme || 'light' // default as fallback
|
|
23
23
|
)));
|
|
24
24
|
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsx(Fragment, { children: jsxs("button", { type: "button", ...getSegmentedControlItemAriaAttributes(this.props.selected, this.props.disabled, this.props.aria), children: [this.props.label && jsx("span", { children: this.props.label }), hasIcon && (jsx(PIcon, { className: "icon", size: "inherit", name: this.props.icon, source: this.props.iconSource, color: getIconColor(this.props.disabled), theme: this.props.theme || 'light', "aria-hidden": "true" })), jsx("slot", {})] }) })] }), this.props.children] }));
|
|
25
25
|
}
|
|
@@ -3,7 +3,7 @@ import { splitChildren } from '../../splitChildren.mjs';
|
|
|
3
3
|
import { Component } from 'react';
|
|
4
4
|
import { minifyCss } from '../../minifyCss.mjs';
|
|
5
5
|
import { stripFocusAndHoverStyles } from '../../stripFocusAndHoverStyles.mjs';
|
|
6
|
-
import { getSegmentedControlCss as getComponentCss$
|
|
6
|
+
import { getSegmentedControlCss as getComponentCss$u } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* @slot {"name": "", "description": "Default slot for the `p-segmented-control-item` tags." }
|
|
@@ -26,7 +26,7 @@ class DSRSegmentedControl extends Component {
|
|
|
26
26
|
const manipulatedChildren = children.map((child) => typeof child === 'object' && 'props' in child && otherChildren.includes(child)
|
|
27
27
|
? { ...child, props: { ...child.props, selected: child.props?.value === this.props.value, backgroundColor: this.props.backgroundColor, theme: this.props.theme } }
|
|
28
28
|
: child);
|
|
29
|
-
const style = minifyCss(stripFocusAndHoverStyles(getComponentCss$
|
|
29
|
+
const style = minifyCss(stripFocusAndHoverStyles(getComponentCss$u(100, this.props.columns)));
|
|
30
30
|
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsx(Fragment, { children: jsx("slot", {}) })] }), manipulatedChildren] }));
|
|
31
31
|
}
|
|
32
32
|
}
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-option.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import '../../provider.mjs';
|
|
|
4
4
|
import { splitChildren } from '../../splitChildren.mjs';
|
|
5
5
|
import { minifyCss } from '../../minifyCss.mjs';
|
|
6
6
|
import { stripFocusAndHoverStyles } from '../../stripFocusAndHoverStyles.mjs';
|
|
7
|
-
import { getSelectOptionCss as getComponentCss$
|
|
7
|
+
import { getSelectOptionCss as getComponentCss$r } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
|
|
8
8
|
import { getOptionAriaAttributes } from '../../../../../../components/dist/utils/esm/utils-entry.mjs';
|
|
9
9
|
import { PIcon } from '../components/icon.wrapper.mjs';
|
|
10
10
|
|
|
@@ -17,7 +17,7 @@ class DSRSelectOption extends Component {
|
|
|
17
17
|
splitChildren(this.props.children);
|
|
18
18
|
const { theme = 'light', selected, highlighted, hidden } = this.props;
|
|
19
19
|
const isDisabled = this.props.disabled || this.props.disabledParent;
|
|
20
|
-
const style = minifyCss(stripFocusAndHoverStyles(getComponentCss$
|
|
20
|
+
const style = minifyCss(stripFocusAndHoverStyles(getComponentCss$r(theme)));
|
|
21
21
|
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsx(Fragment, { children: jsxs("div", { role: "option", className: {
|
|
22
22
|
option: true,
|
|
23
23
|
'option--selected': selected,
|
|
@@ -3,32 +3,31 @@ import { Component } from 'react';
|
|
|
3
3
|
import '../../provider.mjs';
|
|
4
4
|
import { minifyCss } from '../../minifyCss.mjs';
|
|
5
5
|
import { stripFocusAndHoverStyles } from '../../stripFocusAndHoverStyles.mjs';
|
|
6
|
-
import { getSelectWrapperDropdownCss as getComponentCss$
|
|
7
|
-
import { getSelectedOptionMap } from '../../../../../../components/dist/utils/esm/utils-entry.mjs';
|
|
6
|
+
import { getSelectWrapperDropdownCss as getComponentCss$t } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
|
|
7
|
+
import { getHasNativePopoverSupport, getHasCSSAnchorPositioningSupport, getSelectedOptionMap } from '../../../../../../components/dist/utils/esm/utils-entry.mjs';
|
|
8
8
|
|
|
9
9
|
class DSRSelectWrapperDropdown extends Component {
|
|
10
10
|
host;
|
|
11
11
|
isOpen = this.props.isOpenOverride;
|
|
12
12
|
optionMaps = [];
|
|
13
13
|
searchString = '';
|
|
14
|
-
|
|
15
|
-
listElement;
|
|
16
|
-
isNativePopoverCase = false;
|
|
17
|
-
parentTableElement;
|
|
14
|
+
inputOrButtonElement;
|
|
18
15
|
popoverElement;
|
|
16
|
+
hasNativePopoverSupport = getHasNativePopoverSupport();
|
|
17
|
+
hasNativeCSSAnchorPositioningSupport = getHasCSSAnchorPositioningSupport();
|
|
18
|
+
cleanUpAutoUpdate;
|
|
19
19
|
get selectedIndex() {
|
|
20
20
|
return 0;
|
|
21
21
|
}
|
|
22
22
|
render() {
|
|
23
23
|
// TODO: part won't be needed as soon as button/input of select-wrapper-dropdown is part of shadow dom of select-wrapper itself
|
|
24
24
|
const part = 'select-wrapper-dropdown';
|
|
25
|
+
const inputId = 'filter';
|
|
25
26
|
this.props.description && 'description';
|
|
26
27
|
const buttonId = 'value';
|
|
27
|
-
const style = minifyCss(stripFocusAndHoverStyles(getComponentCss$
|
|
28
|
-
? 'down'
|
|
29
|
-
: this.props.direction, this.isOpen, this.props.state, this.props.disabled, this.props.filter, this.props.isNativePopoverCase, this.props.theme)));
|
|
28
|
+
const style = minifyCss(stripFocusAndHoverStyles(getComponentCss$t(this.props.direction, this.isOpen, this.props.state, this.props.disabled, this.props.filter, this.props.hasNativeCSSAnchorPositioningSupport, this.props.theme)));
|
|
30
29
|
return (jsx(Fragment, { children: jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsx(Fragment, { children: this.props.filter ? ([
|
|
31
|
-
jsx("input", { type: "text", role: "combobox", disabled: this.props.disabled, placeholder: getSelectedOptionMap(this.optionMaps)?.value || null, autoComplete: "off", defaultValue: this.searchString }, "input"),
|
|
30
|
+
jsx("input", { id: inputId, type: "text", role: "combobox", disabled: this.props.disabled, placeholder: getSelectedOptionMap(this.optionMaps)?.value || null, autoComplete: "off", defaultValue: this.searchString }, "input"),
|
|
32
31
|
jsx("span", {
|
|
33
32
|
/* @ts-ignore */
|
|
34
33
|
part: part }, "span"),
|
|
@@ -4,7 +4,7 @@ import '../../provider.mjs';
|
|
|
4
4
|
import { splitChildren } from '../../splitChildren.mjs';
|
|
5
5
|
import { minifyCss } from '../../minifyCss.mjs';
|
|
6
6
|
import { stripFocusAndHoverStyles } from '../../stripFocusAndHoverStyles.mjs';
|
|
7
|
-
import { getSelectWrapperCss as getComponentCss$
|
|
7
|
+
import { getSelectWrapperCss as getComponentCss$s } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
|
|
8
8
|
import { isCustomDropdown } from '../../../../../../components/dist/utils/esm/utils-entry.mjs';
|
|
9
9
|
import { Label } from './label.mjs';
|
|
10
10
|
import { StateMessage } from './state-message.mjs';
|
|
@@ -25,7 +25,7 @@ class DSRSelectWrapper extends Component {
|
|
|
25
25
|
const hasCustomDropdown = isCustomDropdown(this.props.filter, this.props.native);
|
|
26
26
|
const { children, namedSlotChildren, otherChildren } = splitChildren(this.props.children);
|
|
27
27
|
const { disabled } = typeof otherChildren[0] === 'object' && 'props' in otherChildren[0] && otherChildren[0]?.props || {};
|
|
28
|
-
const style = minifyCss(stripFocusAndHoverStyles(getComponentCss$
|
|
28
|
+
const style = minifyCss(stripFocusAndHoverStyles(getComponentCss$s(disabled, hasCustomDropdown, this.props.hideLabel, this.props.state, this.props.theme)));
|
|
29
29
|
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs("div", { className: "root", children: [jsx(Label, { hasLabel: this.props.label || namedSlotChildren.filter(({ props: { slot } }) => slot === 'label').length > 0, hasDescription: this.props.description || namedSlotChildren.filter(({ props: { slot } }) => slot === 'description').length > 0, host: null, label: this.props.label, description: this.props.description, isDisabled: disabled, formElement: typeof otherChildren[0] === 'object' && 'props' in otherChildren[0] && otherChildren[0]?.props }), jsxs("div", { className: "wrapper", children: [jsx("slot", {}), jsx(PIcon, { className: "icon", name: "arrow-head-down", theme: this.props.theme, color: disabled ? 'state-disabled' : 'primary', "aria-hidden": "true" }), hasCustomDropdown && !disabled && (jsx(PSelectWrapperDropdown, { className: "dropdown", selectRef: typeof otherChildren[0] === 'object' && 'props' in otherChildren[0] && otherChildren[0]?.props, label: this.props.label || namedSlotChildren.find(({ props: { slot } }) => slot === 'label')?.props.children, message: this.props.message || namedSlotChildren.find(({ props: { slot } }) => slot === 'message')?.props.children, description: this.props.description || namedSlotChildren.find(({ props: { slot } }) => slot === 'description')?.props.children, state: this.props.state, direction: this.props.dropdownDirection, filter: this.props.filter, theme: this.props.theme, required: false, disabled: disabled, onOpenChange: (isOpen) => this.props.iconElement.classList.toggle('icon--open', isOpen) }))] }), 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] }));
|
|
30
30
|
}
|
|
31
31
|
}
|