@porsche-design-system/components-react 3.0.0-rc.1 → 3.0.0-rc.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +54 -0
- package/bin/patchRemixRunProcessBrowserGlobalIdentifier.js +35 -26
- package/esm/lib/components/icon.wrapper.js +1 -1
- package/esm/lib/components/scroller.wrapper.js +3 -3
- package/lib/components/accordion.wrapper.d.ts +2 -2
- package/lib/components/banner.wrapper.d.ts +2 -2
- package/lib/components/button-group.wrapper.d.ts +2 -2
- package/lib/components/button-pure.wrapper.d.ts +2 -2
- package/lib/components/button-tile.wrapper.d.ts +2 -2
- package/lib/components/button.wrapper.d.ts +2 -2
- package/lib/components/carousel.wrapper.d.ts +2 -2
- package/lib/components/checkbox-wrapper.wrapper.d.ts +2 -2
- package/lib/components/content-wrapper.wrapper.d.ts +2 -2
- package/lib/components/crest.wrapper.d.ts +2 -2
- package/lib/components/display.wrapper.d.ts +2 -2
- package/lib/components/divider.wrapper.d.ts +2 -2
- package/lib/components/fieldset-wrapper.wrapper.d.ts +2 -2
- package/lib/components/fieldset.wrapper.d.ts +2 -2
- package/lib/components/flex-item.wrapper.d.ts +2 -2
- package/lib/components/flex.wrapper.d.ts +2 -2
- package/lib/components/grid-item.wrapper.d.ts +2 -2
- package/lib/components/grid.wrapper.d.ts +2 -2
- package/lib/components/heading.wrapper.d.ts +2 -2
- package/lib/components/headline.wrapper.d.ts +2 -2
- package/lib/components/icon.wrapper.d.ts +2 -2
- package/lib/components/icon.wrapper.js +1 -1
- package/lib/components/inline-notification.wrapper.d.ts +2 -2
- package/lib/components/link-pure.wrapper.d.ts +2 -2
- package/lib/components/link-social.wrapper.d.ts +2 -2
- package/lib/components/link-tile-model-signature.wrapper.d.ts +2 -2
- package/lib/components/link-tile.wrapper.d.ts +2 -2
- package/lib/components/link.wrapper.d.ts +2 -2
- package/lib/components/marque.wrapper.d.ts +2 -2
- package/lib/components/modal.wrapper.d.ts +2 -2
- package/lib/components/model-signature.wrapper.d.ts +2 -2
- package/lib/components/pagination.wrapper.d.ts +2 -2
- package/lib/components/popover.wrapper.d.ts +2 -2
- package/lib/components/radio-button-wrapper.wrapper.d.ts +2 -2
- package/lib/components/scroller.wrapper.d.ts +17 -9
- package/lib/components/scroller.wrapper.js +3 -3
- package/lib/components/segmented-control-item.wrapper.d.ts +2 -2
- package/lib/components/segmented-control.wrapper.d.ts +2 -2
- package/lib/components/select-wrapper.wrapper.d.ts +2 -2
- package/lib/components/spinner.wrapper.d.ts +2 -2
- package/lib/components/stepper-horizontal-item.wrapper.d.ts +2 -2
- package/lib/components/stepper-horizontal.wrapper.d.ts +2 -2
- package/lib/components/switch.wrapper.d.ts +2 -2
- package/lib/components/table-body.wrapper.d.ts +2 -2
- package/lib/components/table-cell.wrapper.d.ts +2 -2
- package/lib/components/table-head-cell.wrapper.d.ts +2 -2
- package/lib/components/table-head-row.wrapper.d.ts +2 -2
- package/lib/components/table-head.wrapper.d.ts +2 -2
- package/lib/components/table-row.wrapper.d.ts +2 -2
- package/lib/components/table.wrapper.d.ts +2 -2
- package/lib/components/tabs-bar.wrapper.d.ts +2 -2
- package/lib/components/tabs-item.wrapper.d.ts +2 -2
- package/lib/components/tabs.wrapper.d.ts +2 -2
- package/lib/components/tag-dismissible.wrapper.d.ts +2 -2
- package/lib/components/tag.wrapper.d.ts +2 -2
- package/lib/components/text-field-wrapper.wrapper.d.ts +2 -2
- package/lib/components/text-list-item.wrapper.d.ts +2 -2
- package/lib/components/text-list.wrapper.d.ts +2 -2
- package/lib/components/text.wrapper.d.ts +2 -2
- package/lib/components/textarea-wrapper.wrapper.d.ts +2 -2
- package/lib/components/toast.wrapper.d.ts +2 -2
- package/lib/components/wordmark.wrapper.d.ts +2 -2
- package/lib/types.d.ts +210 -191
- package/package.json +2 -2
- package/ssr/components/dist/styles/esm/styles-entry.js +203 -88
- package/ssr/components/dist/utils/esm/utils-entry.js +45 -7
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/icon.wrapper.js +1 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/scroller.wrapper.js +4 -4
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/select-wrapper-dropdown.wrapper.js +38 -0
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/stepper-horizontal.wrapper.js +0 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/accordion.js +1 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/scroller.js +2 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-wrapper-dropdown.js +34 -0
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-wrapper.js +6 -3
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/stepper-horizontal.js +1 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs-bar.js +1 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/wordmark.js +1 -1
- package/ssr/esm/components/dist/styles/esm/styles-entry.js +203 -89
- package/ssr/esm/components/dist/utils/esm/utils-entry.js +40 -8
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/icon.wrapper.js +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/scroller.wrapper.js +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/select-wrapper-dropdown.wrapper.js +36 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/stepper-horizontal.wrapper.js +0 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/accordion.js +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/scroller.js +3 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-wrapper-dropdown.js +32 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-wrapper.js +6 -3
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/stepper-horizontal.js +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs-bar.js +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/wordmark.js +1 -1
- package/ssr/lib/components/accordion.wrapper.d.ts +2 -2
- package/ssr/lib/components/banner.wrapper.d.ts +2 -2
- package/ssr/lib/components/button-group.wrapper.d.ts +2 -2
- package/ssr/lib/components/button-pure.wrapper.d.ts +2 -2
- package/ssr/lib/components/button-tile.wrapper.d.ts +2 -2
- package/ssr/lib/components/button.wrapper.d.ts +2 -2
- package/ssr/lib/components/carousel.wrapper.d.ts +2 -2
- package/ssr/lib/components/checkbox-wrapper.wrapper.d.ts +2 -2
- package/ssr/lib/components/content-wrapper.wrapper.d.ts +2 -2
- package/ssr/lib/components/crest.wrapper.d.ts +2 -2
- package/ssr/lib/components/display.wrapper.d.ts +2 -2
- package/ssr/lib/components/divider.wrapper.d.ts +2 -2
- package/ssr/lib/components/fieldset-wrapper.wrapper.d.ts +2 -2
- package/ssr/lib/components/fieldset.wrapper.d.ts +2 -2
- package/ssr/lib/components/flex-item.wrapper.d.ts +2 -2
- package/ssr/lib/components/flex.wrapper.d.ts +2 -2
- package/ssr/lib/components/grid-item.wrapper.d.ts +2 -2
- package/ssr/lib/components/grid.wrapper.d.ts +2 -2
- package/ssr/lib/components/heading.wrapper.d.ts +2 -2
- package/ssr/lib/components/headline.wrapper.d.ts +2 -2
- package/ssr/lib/components/icon.wrapper.d.ts +2 -2
- package/ssr/lib/components/inline-notification.wrapper.d.ts +2 -2
- package/ssr/lib/components/link-pure.wrapper.d.ts +2 -2
- package/ssr/lib/components/link-social.wrapper.d.ts +2 -2
- package/ssr/lib/components/link-tile-model-signature.wrapper.d.ts +2 -2
- package/ssr/lib/components/link-tile.wrapper.d.ts +2 -2
- package/ssr/lib/components/link.wrapper.d.ts +2 -2
- package/ssr/lib/components/marque.wrapper.d.ts +2 -2
- package/ssr/lib/components/modal.wrapper.d.ts +2 -2
- package/ssr/lib/components/model-signature.wrapper.d.ts +2 -2
- package/ssr/lib/components/pagination.wrapper.d.ts +2 -2
- package/ssr/lib/components/popover.wrapper.d.ts +2 -2
- package/ssr/lib/components/radio-button-wrapper.wrapper.d.ts +2 -2
- package/ssr/lib/components/scroller.wrapper.d.ts +17 -9
- package/ssr/lib/components/segmented-control-item.wrapper.d.ts +2 -2
- package/ssr/lib/components/segmented-control.wrapper.d.ts +2 -2
- package/ssr/lib/components/select-wrapper-dropdown.wrapper.d.ts +30 -0
- package/ssr/lib/components/select-wrapper.wrapper.d.ts +2 -2
- package/ssr/lib/components/spinner.wrapper.d.ts +2 -2
- package/ssr/lib/components/stepper-horizontal-item.wrapper.d.ts +2 -2
- package/ssr/lib/components/stepper-horizontal.wrapper.d.ts +2 -2
- package/ssr/lib/components/switch.wrapper.d.ts +2 -2
- package/ssr/lib/components/table-body.wrapper.d.ts +2 -2
- package/ssr/lib/components/table-cell.wrapper.d.ts +2 -2
- package/ssr/lib/components/table-head-cell.wrapper.d.ts +2 -2
- package/ssr/lib/components/table-head-row.wrapper.d.ts +2 -2
- package/ssr/lib/components/table-head.wrapper.d.ts +2 -2
- package/ssr/lib/components/table-row.wrapper.d.ts +2 -2
- package/ssr/lib/components/table.wrapper.d.ts +2 -2
- package/ssr/lib/components/tabs-bar.wrapper.d.ts +2 -2
- package/ssr/lib/components/tabs-item.wrapper.d.ts +2 -2
- package/ssr/lib/components/tabs.wrapper.d.ts +2 -2
- package/ssr/lib/components/tag-dismissible.wrapper.d.ts +2 -2
- package/ssr/lib/components/tag.wrapper.d.ts +2 -2
- package/ssr/lib/components/text-field-wrapper.wrapper.d.ts +2 -2
- package/ssr/lib/components/text-list-item.wrapper.d.ts +2 -2
- package/ssr/lib/components/text-list.wrapper.d.ts +2 -2
- package/ssr/lib/components/text.wrapper.d.ts +2 -2
- package/ssr/lib/components/textarea-wrapper.wrapper.d.ts +2 -2
- package/ssr/lib/components/toast.wrapper.d.ts +2 -2
- package/ssr/lib/components/wordmark.wrapper.d.ts +2 -2
- package/ssr/lib/dsr-components/select-wrapper.d.ts +0 -1
- package/ssr/lib/types.d.ts +210 -191
|
@@ -166,6 +166,13 @@ hasWindow &&
|
|
|
166
166
|
.forEach((node) => childrenMutationMap.get(node)());
|
|
167
167
|
});
|
|
168
168
|
|
|
169
|
+
const isTouchDevice = () => {
|
|
170
|
+
if (!hasWindow) {
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
return !!('ontouchstart' in window || window.navigator.maxTouchPoints > 0);
|
|
174
|
+
};
|
|
175
|
+
|
|
169
176
|
/* eslint-disable no-undefined,no-param-reassign,no-shadow */
|
|
170
177
|
|
|
171
178
|
/**
|
|
@@ -3072,6 +3079,10 @@ function jssNested() {
|
|
|
3072
3079
|
};
|
|
3073
3080
|
}
|
|
3074
3081
|
|
|
3082
|
+
function getDefaultExportFromCjs (x) {
|
|
3083
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
3084
|
+
}
|
|
3085
|
+
|
|
3075
3086
|
function getAugmentedNamespace(n) {
|
|
3076
3087
|
if (n.__esModule) return n;
|
|
3077
3088
|
var f = n.default;
|
|
@@ -3133,7 +3144,7 @@ var _tslib$1 = {};
|
|
|
3133
3144
|
return t;
|
|
3134
3145
|
};
|
|
3135
3146
|
return exports.__assign.apply(this, arguments);
|
|
3136
|
-
};
|
|
3147
|
+
};
|
|
3137
3148
|
} (_tslib$1));
|
|
3138
3149
|
|
|
3139
3150
|
var require$$1 = /*@__PURE__*/getAugmentedNamespace(jss_esm);
|
|
@@ -3493,6 +3504,8 @@ function jssCombineAndSortMQ(options) {
|
|
|
3493
3504
|
|
|
3494
3505
|
var dist = jssCombineAndSortMQ;
|
|
3495
3506
|
|
|
3507
|
+
var jssPluginSortMediaQueries = /*@__PURE__*/getDefaultExportFromCjs(dist);
|
|
3508
|
+
|
|
3496
3509
|
/* Auto Generated Start */
|
|
3497
3510
|
const themeLight = {
|
|
3498
3511
|
primaryColor: '#010205',
|
|
@@ -3615,7 +3628,7 @@ createJss({
|
|
|
3615
3628
|
jssGlobal(),
|
|
3616
3629
|
jssNested(),
|
|
3617
3630
|
camelCase$1(),
|
|
3618
|
-
|
|
3631
|
+
jssPluginSortMediaQueries({ combineMediaQueries: true }),
|
|
3619
3632
|
],
|
|
3620
3633
|
});
|
|
3621
3634
|
const supportsConstructableStylesheets = () => {
|
|
@@ -3641,10 +3654,6 @@ const isScrollable = (isPrevHidden, isNextHidden) => {
|
|
|
3641
3654
|
const hasDocument = typeof document !== 'undefined';
|
|
3642
3655
|
|
|
3643
3656
|
hasDocument && 'scrollBehavior' in document.documentElement.style;
|
|
3644
|
-
const win = typeof window !== 'undefined' ? window : {};
|
|
3645
|
-
win.document || { head: {} };
|
|
3646
|
-
(win.HTMLElement || class {
|
|
3647
|
-
});
|
|
3648
3657
|
|
|
3649
3658
|
const formatObjectOutput = (value) => {
|
|
3650
3659
|
return JSON.stringify(value)
|
|
@@ -3795,7 +3804,7 @@ Object.entries(innerManifest[size])
|
|
|
3795
3804
|
.join();
|
|
3796
3805
|
|
|
3797
3806
|
const CDN_BASE_URL = (typeof window !== 'undefined' && window.PORSCHE_DESIGN_SYSTEM_CDN === 'cn' ? 'https://cdn.ui.porsche.cn' : 'https://cdn.ui.porsche.com') + '/porsche-design-system/model-signatures';
|
|
3798
|
-
const MODEL_SIGNATURES_MANIFEST = { "718": "718.min.
|
|
3807
|
+
const MODEL_SIGNATURES_MANIFEST = { "718": "718.min.d92dc0fe91e67bd51120d91c5cd1eb2f.svg", "911": "911.min.5c462658f9d472e90a139173414e8fdd.svg", "boxster": "boxster.min.5e7b22a1fa25004a4f97807d57f32b21.svg", "cayenne": "cayenne.min.4026ba6b335cc98e10592f900cf731e1.svg", "cayman": "cayman.min.c634f6f3de1d67610b2e4230e60337fb.svg", "macan": "macan.min.e38fbf34ed4f00066620901babd99af0.svg", "panamera": "panamera.min.d35913b252657f7c5cfcae74cfd61b26.svg", "taycan": "taycan.min.ba4e7c3cb86a78d626d4463b81be0f23.svg", "turbo-s": "turbo-s.min.8201d60c1b5e00daf9e23784fd199111.svg", "turbo": "turbo.min.cfde5de85fdc84be597dfad4402c5f6f.svg" };
|
|
3799
3808
|
const getSvgUrl = (model) => {
|
|
3800
3809
|
const cdnBaseUrl = CDN_BASE_URL
|
|
3801
3810
|
;
|
|
@@ -4012,6 +4021,29 @@ if (tempIcon) {
|
|
|
4012
4021
|
tempIcon.style.width = ICON_SIZE;
|
|
4013
4022
|
tempIcon.style.marginRight = ICON_MARGIN;
|
|
4014
4023
|
}
|
|
4024
|
+
const getSelectWrapperDropdownButtonAriaAttributes = (isOpen, labelId, descriptionId, dropdownId, activeDescendantId) => {
|
|
4025
|
+
return Object.assign({ 'aria-labelledby': labelId, 'aria-describedby': descriptionId || null, 'aria-haspopup': 'listbox', 'aria-expanded': isOpen ? 'true' : 'false', 'aria-controls': dropdownId }, (isOpen && {
|
|
4026
|
+
'aria-activedescendant': `option-${activeDescendantId}`,
|
|
4027
|
+
}));
|
|
4028
|
+
};
|
|
4029
|
+
const getFilterInputAriaAttributes = (isOpen, isRequired, labelId, descriptionId, dropdownId, activeDescendantId) => {
|
|
4030
|
+
return Object.assign(Object.assign(Object.assign({}, getSelectWrapperDropdownButtonAriaAttributes(isOpen, labelId, descriptionId, dropdownId, activeDescendantId)), { 'aria-autocomplete': 'list' }), (isRequired && {
|
|
4031
|
+
'aria-required': 'true',
|
|
4032
|
+
}));
|
|
4033
|
+
};
|
|
4034
|
+
const getHighlightedOptionMapIndex = (arr) => arr.findIndex((item) => item.highlighted);
|
|
4035
|
+
const getSelectedOptionMap = (arr) => arr.find((item) => item.selected);
|
|
4036
|
+
const isCustomDropdown = (filter, native) => {
|
|
4037
|
+
if (filter) {
|
|
4038
|
+
return true;
|
|
4039
|
+
}
|
|
4040
|
+
else if (native) {
|
|
4041
|
+
return false;
|
|
4042
|
+
}
|
|
4043
|
+
else {
|
|
4044
|
+
return !isTouchDevice();
|
|
4045
|
+
}
|
|
4046
|
+
};
|
|
4015
4047
|
const isStateCompleteOrWarning = (state) => {
|
|
4016
4048
|
return state === 'complete' || state === 'warning';
|
|
4017
4049
|
};
|
|
@@ -4055,4 +4087,4 @@ const getTextTagType = (host, tag) => {
|
|
|
4055
4087
|
}
|
|
4056
4088
|
};
|
|
4057
4089
|
|
|
4058
|
-
export { DISPLAY_TAGS, HEADING_TAGS, HEADLINE_TAGS, TEXT_TAGS, _hasShowPickerSupport, attributeMutationMap, buildCrestSrcSet, buildIconUrl, buildSrcSet, cdnBaseUrl, childrenMutationMap, createPaginationModel, createRange, crestCdnBaseUrl, crestInnerManifest, crestSize, displaySizeToTagMap, getButtonAriaAttributes, getButtonAttributes, getButtonBaseAriaAttributes, getButtonPureAriaAttributes, getClosestHTMLElement, getContentAriaAttributes, getCurrentActivePage, getDirectChildHTMLElement, getDisplayTagType, getHTMLElement, getHeadingTagType, getHeadlineTagType, getIconColor, getInlineNotificationIconName, getInnerManifest, getLinkButtonThemeForIcon, getRole, getStepperHorizontalIconName, getSvgUrl, getSwitchButtonAriaAttributes, getTextTagType, getThemeForIcon, getTotalPages, hasDocument, hasLocateAction, hasSpecificSlottedTag, hasVisibleIcon, hasWindow, isDisabledOrLoading, isHighContrastMode, isListTypeOrdered, isScrollable, isSortable, isStateCompleteOrWarning, isThemeDark, isType, isUrl, isWithinForm, itemTypes, modelSignatureHeight, parseAndGetAriaAttributes, parseJSONAttribute, resizeMap, showCustomCalendarOrTimeIndicator, supportsConstructableStylesheets, tempDiv, tempIcon, tempLabel };
|
|
4090
|
+
export { DISPLAY_TAGS, HEADING_TAGS, HEADLINE_TAGS, TEXT_TAGS, _hasShowPickerSupport, attributeMutationMap, buildCrestSrcSet, buildIconUrl, buildSrcSet, cdnBaseUrl, childrenMutationMap, createPaginationModel, createRange, crestCdnBaseUrl, crestInnerManifest, crestSize, displaySizeToTagMap, getButtonAriaAttributes, getButtonAttributes, getButtonBaseAriaAttributes, getButtonPureAriaAttributes, getClosestHTMLElement, getContentAriaAttributes, getCurrentActivePage, getDirectChildHTMLElement, getDisplayTagType, getFilterInputAriaAttributes, getHTMLElement, getHeadingTagType, getHeadlineTagType, getHighlightedOptionMapIndex, getIconColor, getInlineNotificationIconName, getInnerManifest, getLinkButtonThemeForIcon, getRole, getSelectWrapperDropdownButtonAriaAttributes, getSelectedOptionMap, getStepperHorizontalIconName, getSvgUrl, getSwitchButtonAriaAttributes, getTextTagType, getThemeForIcon, getTotalPages, hasDocument, hasLocateAction, hasSpecificSlottedTag, hasVisibleIcon, hasWindow, isCustomDropdown, isDisabledOrLoading, isHighContrastMode, isListTypeOrdered, isScrollable, isSortable, isStateCompleteOrWarning, isThemeDark, isTouchDevice, isType, isUrl, isWithinForm, itemTypes, modelSignatureHeight, parseAndGetAriaAttributes, parseJSONAttribute, resizeMap, showCustomCalendarOrTimeIndicator, supportsConstructableStylesheets, tempDiv, tempIcon, tempLabel };
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/icon.wrapper.js
CHANGED
|
@@ -4,7 +4,7 @@ import { usePrefix, useBrowserLayoutEffect, useMergedClass } from '../../hooks.j
|
|
|
4
4
|
import { syncRef } from '../../utils.js';
|
|
5
5
|
import { DSRIcon } from '../dsr-components/icon.js';
|
|
6
6
|
|
|
7
|
-
const PIcon = forwardRef(({ aria, color = 'primary', lazy
|
|
7
|
+
const PIcon = forwardRef(({ aria, color = 'primary', lazy, name = 'arrow-right', size = 'small', source, theme = 'light', className, ...rest }, ref) => {
|
|
8
8
|
const elementRef = useRef();
|
|
9
9
|
const WebComponentTag = usePrefix('p-icon');
|
|
10
10
|
const propsToSync = [aria, color, lazy, name, size, source, theme];
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/scroller.wrapper.js
CHANGED
|
@@ -4,13 +4,13 @@ import { usePrefix, useBrowserLayoutEffect, useMergedClass } from '../../hooks.j
|
|
|
4
4
|
import { syncRef } from '../../utils.js';
|
|
5
5
|
import { DSRScroller } from '../dsr-components/scroller.js';
|
|
6
6
|
|
|
7
|
-
const PScroller = forwardRef(({ alignScrollIndicator = 'center', gradientColor = 'background-base', gradientColorScheme, scrollIndicatorPosition, scrollToPosition, scrollbar = false, theme = 'light', className, children, ...rest }, ref) => {
|
|
7
|
+
const PScroller = forwardRef(({ alignScrollIndicator = 'center', aria, gradientColor = 'background-base', gradientColorScheme, scrollIndicatorPosition, scrollToPosition, scrollbar = false, theme = 'light', className, children, ...rest }, ref) => {
|
|
8
8
|
const elementRef = useRef();
|
|
9
9
|
const WebComponentTag = usePrefix('p-scroller');
|
|
10
|
-
const propsToSync = [alignScrollIndicator, gradientColor, gradientColorScheme, scrollIndicatorPosition, scrollToPosition, scrollbar, theme];
|
|
10
|
+
const propsToSync = [alignScrollIndicator, aria, gradientColor, gradientColorScheme, scrollIndicatorPosition, scrollToPosition, scrollbar, theme];
|
|
11
11
|
useBrowserLayoutEffect(() => {
|
|
12
12
|
const { current } = elementRef;
|
|
13
|
-
['alignScrollIndicator', 'gradientColor', 'gradientColorScheme', 'scrollIndicatorPosition', 'scrollToPosition', 'scrollbar', 'theme'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
13
|
+
['alignScrollIndicator', 'aria', 'gradientColor', 'gradientColorScheme', 'scrollIndicatorPosition', 'scrollToPosition', 'scrollbar', 'theme'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
14
14
|
}, propsToSync);
|
|
15
15
|
// @ts-ignore
|
|
16
16
|
if (!process.browser) {
|
|
@@ -21,7 +21,7 @@ const PScroller = forwardRef(({ alignScrollIndicator = 'center', gradientColor =
|
|
|
21
21
|
// @ts-ignore
|
|
22
22
|
...(!process.browser
|
|
23
23
|
? {
|
|
24
|
-
children: (jsx(DSRScroller, { ...{ alignScrollIndicator, gradientColor, gradientColorScheme, scrollIndicatorPosition, scrollToPosition, scrollbar, theme, children } })),
|
|
24
|
+
children: (jsx(DSRScroller, { ...{ alignScrollIndicator, aria, gradientColor, gradientColorScheme, scrollIndicatorPosition, scrollToPosition, scrollbar, theme, children } })),
|
|
25
25
|
}
|
|
26
26
|
: {
|
|
27
27
|
children,
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { forwardRef, useRef } from 'react';
|
|
3
|
+
import { useEventCallback, usePrefix, useBrowserLayoutEffect, useMergedClass } from '../../hooks.js';
|
|
4
|
+
import { syncRef } from '../../utils.js';
|
|
5
|
+
import { DSRSelectWrapperDropdown } from '../dsr-components/select-wrapper-dropdown.js';
|
|
6
|
+
|
|
7
|
+
const PSelectWrapperDropdown = forwardRef(({ description, direction = 'auto', disabled = false, filter = false, isOpenOverride = false, label, message, onOpenChange, required = false, selectRef, state, theme = 'light', className, ...rest }, ref) => {
|
|
8
|
+
const elementRef = useRef();
|
|
9
|
+
useEventCallback(elementRef, 'openChange', onOpenChange);
|
|
10
|
+
const WebComponentTag = usePrefix('p-select-wrapper-dropdown');
|
|
11
|
+
const propsToSync = [description, direction, disabled, filter, isOpenOverride, label, message, required, selectRef, state, theme];
|
|
12
|
+
useBrowserLayoutEffect(() => {
|
|
13
|
+
const { current } = elementRef;
|
|
14
|
+
['description', 'direction', 'disabled', 'filter', 'isOpenOverride', 'label', 'message', 'required', 'selectRef', 'state', 'theme'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
15
|
+
}, propsToSync);
|
|
16
|
+
// @ts-ignore
|
|
17
|
+
if (!process.browser) {
|
|
18
|
+
className = className ? `${className} ssr` : 'ssr';
|
|
19
|
+
}
|
|
20
|
+
const props = {
|
|
21
|
+
...rest,
|
|
22
|
+
// @ts-ignore
|
|
23
|
+
...(!process.browser
|
|
24
|
+
? {
|
|
25
|
+
children: (jsx(DSRSelectWrapperDropdown, { ...{ description, direction, disabled, filter, isOpenOverride, label, message, required, selectRef, state, theme } })),
|
|
26
|
+
}
|
|
27
|
+
: {
|
|
28
|
+
suppressHydrationWarning: true,
|
|
29
|
+
}),
|
|
30
|
+
class: useMergedClass(elementRef, className),
|
|
31
|
+
ref: syncRef(elementRef, ref)
|
|
32
|
+
};
|
|
33
|
+
return jsx(WebComponentTag, { ...props });
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
export { PSelectWrapperDropdown };
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/accordion.js
CHANGED
|
@@ -72,7 +72,7 @@ class DSRAccordion extends Component {
|
|
|
72
72
|
const contentId = 'accordion-panel';
|
|
73
73
|
const Heading = this.props.tag;
|
|
74
74
|
const style = minifyCss(stripFocusAndHoverStyles(getComponentCss$Y(this.props.size, this.props.compact, this.props.open, this.props.theme)));
|
|
75
|
-
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(PIcon, { className: "icon", name: this.props.open ? 'minus' : 'plus', theme: this.props.theme, size: "
|
|
75
|
+
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] }));
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/scroller.js
CHANGED
|
@@ -64,7 +64,7 @@ import { Component } from 'react';
|
|
|
64
64
|
import { minifyCss } from '../../minifyCss.js';
|
|
65
65
|
import { stripFocusAndHoverStyles } from '../../stripFocusAndHoverStyles.js';
|
|
66
66
|
import { getScrollerCss as getComponentCss$s } from '../../../../../../components/dist/styles/esm/styles-entry.js';
|
|
67
|
-
import { isScrollable } from '../../../../../../components/dist/utils/esm/utils-entry.js';
|
|
67
|
+
import { parseAndGetAriaAttributes, isScrollable } from '../../../../../../components/dist/utils/esm/utils-entry.js';
|
|
68
68
|
|
|
69
69
|
class DSRScroller extends Component {
|
|
70
70
|
constructor() {
|
|
@@ -74,6 +74,7 @@ class DSRScroller extends Component {
|
|
|
74
74
|
}
|
|
75
75
|
// should only update if scrollable
|
|
76
76
|
render() {
|
|
77
|
+
var _a;
|
|
77
78
|
splitChildren(this.props.children);
|
|
78
79
|
const deprecationMap = {
|
|
79
80
|
default: 'background-base',
|
|
@@ -84,7 +85,7 @@ class DSRScroller extends Component {
|
|
|
84
85
|
return (jsx("div", { className: direction === 'next' ? 'action-next' : 'action-prev', children: jsx("button", { type: "button", tabIndex: -1, "aria-hidden": "true", "aria-label": direction, children: jsx(PIcon, { className: "icon", name: direction === 'next' ? 'arrow-head-right' : 'arrow-head-left', theme: this.props.theme }) }) }, direction));
|
|
85
86
|
};
|
|
86
87
|
const style = minifyCss(stripFocusAndHoverStyles(getComponentCss$s(deprecationMap[this.props.gradientColorScheme] || this.props.gradientColor, this.isNextHidden, this.isPrevHidden, this.props.scrollIndicatorPosition || this.props.alignScrollIndicator, this.props.scrollbar, this.props.theme)));
|
|
87
|
-
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs("div", { className: "root", children: [jsx("div", { className: "scroll-area", children: jsxs("div", { className: "scroll-wrapper", 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] }));
|
|
88
|
+
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs("div", { className: "root", children: [jsx("div", { className: "scroll-area", children: jsxs("div", { className: "scroll-wrapper", role: ((_a = parseAndGetAriaAttributes(this.props.aria)) === null || _a === void 0 ? void 0 : _a.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] }));
|
|
88
89
|
}
|
|
89
90
|
}
|
|
90
91
|
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { Component } from 'react';
|
|
3
|
+
import { minifyCss } from '../../minifyCss.js';
|
|
4
|
+
import { stripFocusAndHoverStyles } from '../../stripFocusAndHoverStyles.js';
|
|
5
|
+
import { getSelectWrapperDropdownCss as getComponentCss$o } from '../../../../../../components/dist/styles/esm/styles-entry.js';
|
|
6
|
+
import { getSelectedOptionMap, getFilterInputAriaAttributes, getHighlightedOptionMapIndex, getSelectWrapperDropdownButtonAriaAttributes } from '../../../../../../components/dist/utils/esm/utils-entry.js';
|
|
7
|
+
|
|
8
|
+
class DSRSelectWrapperDropdown extends Component {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(...arguments);
|
|
11
|
+
this.isOpen = this.props.isOpenOverride;
|
|
12
|
+
this.optionMaps = [];
|
|
13
|
+
this.searchString = '';
|
|
14
|
+
}
|
|
15
|
+
get selectedIndex() {
|
|
16
|
+
return 0;
|
|
17
|
+
}
|
|
18
|
+
render() {
|
|
19
|
+
var _a;
|
|
20
|
+
const dropdownId = 'list';
|
|
21
|
+
const labelId = 'label';
|
|
22
|
+
const descriptionId = this.props.description && 'description';
|
|
23
|
+
const buttonId = 'value';
|
|
24
|
+
const style = minifyCss(stripFocusAndHoverStyles(getComponentCss$o(this.props.direction === 'auto' ? 'down' : this.props.direction, this.isOpen, this.props.state, this.props.disabled, this.props.filter, this.props.theme)));
|
|
25
|
+
return (jsx(Fragment, { children: jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsx(Fragment, { children: this.props.filter ? ([
|
|
26
|
+
jsx("input", { type: "text", role: "combobox", disabled: this.props.disabled, placeholder: ((_a = getSelectedOptionMap(this.optionMaps)) === null || _a === void 0 ? void 0 : _a.value) || null, autoComplete: "off", defaultValue: this.searchString, ...getFilterInputAriaAttributes(this.isOpen, this.props.required, labelId, descriptionId, dropdownId, getHighlightedOptionMapIndex(this.optionMaps)) }, "input"),
|
|
27
|
+
jsx("span", {}, "span"),
|
|
28
|
+
]) : (jsx("button", { type: "button", role: "combobox", id: buttonId, disabled: this.props.disabled, ...getSelectWrapperDropdownButtonAriaAttributes(this.isOpen, labelId, descriptionId, dropdownId, getHighlightedOptionMapIndex(this.optionMaps)) })) })] }) }));
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export { DSRSelectWrapperDropdown };
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-wrapper.js
CHANGED
|
@@ -59,23 +59,26 @@ import '../components/text-list-item.wrapper.js';
|
|
|
59
59
|
import '../components/textarea-wrapper.wrapper.js';
|
|
60
60
|
import '../components/toast.wrapper.js';
|
|
61
61
|
import '../components/wordmark.wrapper.js';
|
|
62
|
+
import { PSelectWrapperDropdown } from '../components/select-wrapper-dropdown.wrapper.js';
|
|
62
63
|
import { splitChildren } from '../../splitChildren.js';
|
|
63
64
|
import { Component } from 'react';
|
|
64
65
|
import { minifyCss } from '../../minifyCss.js';
|
|
65
66
|
import { stripFocusAndHoverStyles } from '../../stripFocusAndHoverStyles.js';
|
|
66
67
|
import { getSelectWrapperCss as getComponentCss$p } from '../../../../../../components/dist/styles/esm/styles-entry.js';
|
|
68
|
+
import { isCustomDropdown } from '../../../../../../components/dist/utils/esm/utils-entry.js';
|
|
67
69
|
import { StateMessage } from './state-message.js';
|
|
68
70
|
|
|
69
71
|
class DSRSelectWrapper extends Component {
|
|
70
72
|
render() {
|
|
71
|
-
var _a;
|
|
73
|
+
var _a, _b, _c, _d, _e;
|
|
74
|
+
const hasCustomDropdown = isCustomDropdown(this.props.filter, this.props.native);
|
|
72
75
|
const { children, namedSlotChildren, otherChildren } = splitChildren(this.props.children);
|
|
73
76
|
const { disabled } = typeof otherChildren[0] === 'object' && 'props' in otherChildren[0] && ((_a = otherChildren[0]) === null || _a === void 0 ? void 0 : _a.props) || {};
|
|
74
77
|
const labelProps = disabled
|
|
75
78
|
? {}
|
|
76
79
|
: {};
|
|
77
|
-
const style = minifyCss(stripFocusAndHoverStyles(getComponentCss$p(disabled, this.props.hideLabel, this.props.state, this.props.theme)));
|
|
78
|
-
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("label", { className: "label", children: [(this.props.label || namedSlotChildren.filter(({ props: { slot } }) => slot === 'label').length > 0) && (jsx("span", { className: "label__text", ...labelProps, children: this.props.label || jsx("slot", { name: "label" }) })), (this.props.description || namedSlotChildren.filter(({ props: { slot } }) => slot === 'description').length > 0) && (jsx("span", { className: "label__text", ...labelProps, children: this.props.description || jsx("slot", { name: "description" }) })), jsx(PIcon, { className: "icon", name: "arrow-head-down", theme: this.props.theme, color: disabled ? 'state-disabled' : 'primary', "aria-hidden": "true" }), jsx("slot", {})] }), this.props.
|
|
80
|
+
const style = minifyCss(stripFocusAndHoverStyles(getComponentCss$p(disabled, this.props.native, this.props.hideLabel, this.props.state, this.props.theme)));
|
|
81
|
+
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("label", { className: "label", children: [(this.props.label || namedSlotChildren.filter(({ props: { slot } }) => slot === 'label').length > 0) && (jsx("span", { className: "label__text", ...labelProps, children: this.props.label || jsx("slot", { name: "label" }) })), (this.props.description || namedSlotChildren.filter(({ props: { slot } }) => slot === 'description').length > 0) && (jsx("span", { className: "label__text", ...labelProps, children: this.props.description || jsx("slot", { name: "description" }) })), jsx(PIcon, { className: "icon", name: "arrow-head-down", theme: this.props.theme, color: disabled ? 'state-disabled' : 'primary', "aria-hidden": "true" }), jsx("slot", {})] }), hasCustomDropdown && !disabled && (jsx(PSelectWrapperDropdown, { selectRef: typeof otherChildren[0] === 'object' && 'props' in otherChildren[0] && ((_b = otherChildren[0]) === null || _b === void 0 ? void 0 : _b.props), label: this.props.label || ((_c = namedSlotChildren.find(({ props: { slot } }) => slot === 'label')) === null || _c === void 0 ? void 0 : _c.props.children), message: this.props.message || ((_d = namedSlotChildren.find(({ props: { slot } }) => slot === 'message')) === null || _d === void 0 ? void 0 : _d.props.children), description: this.props.description || ((_e = namedSlotChildren.find(({ props: { slot } }) => slot === 'description')) === null || _e === void 0 ? void 0 : _e.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[isOpen ? 'add' : 'remove']('icon--open') }))] }), (this.props.message || namedSlotChildren.filter(({ props: { slot } }) => slot === 'message').length > 0) && ['success', 'error'].includes(this.props.state) && (jsx(StateMessage, { state: this.props.state, message: this.props.message, theme: this.props.theme, host: null }))] })] }), this.props.children] }));
|
|
79
82
|
}
|
|
80
83
|
}
|
|
81
84
|
|
|
@@ -76,7 +76,7 @@ class DSRStepperHorizontal extends Component {
|
|
|
76
76
|
? { ...child, props: { ...child.props, theme: this.props.theme } }
|
|
77
77
|
: child);
|
|
78
78
|
const style = minifyCss(stripFocusAndHoverStyles(getComponentCss$l(this.props.size)));
|
|
79
|
-
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsx(Fragment, { children: jsx(PScroller, { className: "scroller", theme: this.props.theme, children: jsx("slot", {}) }) })] }), manipulatedChildren] }));
|
|
79
|
+
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsx(Fragment, { children: jsx(PScroller, { className: "scroller", aria: { role: 'list' }, theme: this.props.theme, children: jsx("slot", {}) }) })] }), manipulatedChildren] }));
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs-bar.js
CHANGED
|
@@ -77,7 +77,7 @@ class DSRTabsBar extends Component {
|
|
|
77
77
|
semibold: 'semi-bold',
|
|
78
78
|
};
|
|
79
79
|
const style = minifyCss(stripFocusAndHoverStyles(getComponentCss$c(this.props.size, (deprecationMap[this.props.weight] || this.props.weight), this.props.theme)));
|
|
80
|
-
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs(PScroller, { className: "scroller", role:
|
|
80
|
+
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs(PScroller, { className: "scroller", aria: { role: 'tablist' }, theme: this.props.theme, gradientColorScheme: this.props.gradientColorScheme, gradientColor: this.props.gradientColor, alignScrollIndicator: "top", children: [jsx("slot", {}), jsx("span", { className: "bar" })] })] }), this.props.children] }));
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/wordmark.js
CHANGED
|
@@ -8,7 +8,7 @@ import { parseAndGetAriaAttributes } from '../../../../../../components/dist/uti
|
|
|
8
8
|
class DSRWordmark extends Component {
|
|
9
9
|
render() {
|
|
10
10
|
// optimized with SVGO, see docs in assets folder
|
|
11
|
-
const svg = (jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0
|
|
11
|
+
const svg = (jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 4500 300", children: [jsx("title", { children: "Porsche" }), jsx("path", { d: "M502 221c48.1 0 74-25.9 74-74V74c0-48.1-25.9-74-74-74H0v300h68v-79h434zm6-143v65c0 7.8-4.2 12-12 12H68V66h428c7.8 0 12 4.2 12 12zm228 222c-48.1 0-74-25.9-74-74V74c0-48.1 25.9-74 74-74h417c48.1 0 74 25.9 74 74v152c0 48.1-25.9 74-74 74H736zm411-66c7.8 0 12-4.2 12-12V78c0-7.8-4.2-12-12-12H742c-7.8 0-12 4.2-12 12v144c0 7.8 4.2 12 12 12h405zm675-36c39.844 16.757 67.853 56.1 68 102h-68c0-54-25-79-79-79h-361v79h-68V0h502c48.1 0 74 25.9 74 74v50.14c0 46.06-23.75 71.76-68 73.86zm-12-43c7.8 0 12-4.2 12-12V78c0-7.8-4.2-12-12-12h-428v89h428zm162-81c0-48.1 25.9-74 74-74h492v56h-486c-7.8 0-12 4.2-12 12v42c0 7.8 4.2 12 12 12h422c48.1 0 74 25.9 74 74v30c0 48.1-25.9 74-74 74h-492v-56h486c7.8 0 12-4.2 12-12v-42c0-7.8-4.2-12-12-12h-422c-48.1 0-74-25.9-74-74V74zm661 0c0-48.1 25.9-74 74-74h480v66h-474c-7.8 0-12 4.2-12 12v144c0 7.8 4.2 12 12 12h474v66h-480c-48.1 0-74-25.9-74-74V74zM3817 0v300h-68V183h-407v117h-68V0h68v117h407V0h68zm156 56v66h527v56h-527v66h527v56h-595V0h595v56h-527z" })] }));
|
|
12
12
|
const style = minifyCss(stripFocusAndHoverStyles(getComponentCss(this.props.size, this.props.theme)));
|
|
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 ? (svg) : (jsx("a", { href: this.props.href, target: this.props.target, ...parseAndGetAriaAttributes(this.props.aria), children: svg })) })] }) }));
|
|
14
14
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
2
|
import type { AccordionUpdateEvent, BreakpointCustomizable, AccordionSize, AccordionTag, Theme } from '../types';
|
|
3
|
-
export type PAccordionProps = Omit<HTMLAttributes<{}>, 'color'
|
|
3
|
+
export type PAccordionProps = Omit<HTMLAttributes<{}>, 'color'> & {
|
|
4
4
|
/**
|
|
5
5
|
* Displays the Accordion as compact version with thinner border and smaller paddings.
|
|
6
6
|
*/
|
|
@@ -34,7 +34,7 @@ export type PAccordionProps = Omit<HTMLAttributes<{}>, 'color' | 'onChange'> & {
|
|
|
34
34
|
*/
|
|
35
35
|
theme?: Theme;
|
|
36
36
|
};
|
|
37
|
-
export declare const PAccordion: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<{}>, "color"
|
|
37
|
+
export declare const PAccordion: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<{}>, "color"> & {
|
|
38
38
|
/**
|
|
39
39
|
* Displays the Accordion as compact version with thinner border and smaller paddings.
|
|
40
40
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
2
|
import type { BannerState, Theme, BannerWidth } from '../types';
|
|
3
|
-
export type PBannerProps = Omit<HTMLAttributes<{}>, 'color'
|
|
3
|
+
export type PBannerProps = Omit<HTMLAttributes<{}>, 'color'> & {
|
|
4
4
|
/**
|
|
5
5
|
* Description of the banner.
|
|
6
6
|
*/
|
|
@@ -39,7 +39,7 @@ export type PBannerProps = Omit<HTMLAttributes<{}>, 'color' | 'onChange'> & {
|
|
|
39
39
|
*/
|
|
40
40
|
width?: BannerWidth;
|
|
41
41
|
};
|
|
42
|
-
export declare const PBanner: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<{}>, "color"
|
|
42
|
+
export declare const PBanner: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<{}>, "color"> & {
|
|
43
43
|
/**
|
|
44
44
|
* Description of the banner.
|
|
45
45
|
*/
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
2
|
import type { BreakpointCustomizable, ButtonGroupDirection } from '../types';
|
|
3
|
-
export type PButtonGroupProps = Omit<HTMLAttributes<{}>, 'color'
|
|
3
|
+
export type PButtonGroupProps = Omit<HTMLAttributes<{}>, 'color'> & {
|
|
4
4
|
/**
|
|
5
5
|
* Defines the direction of the main and cross axis. The default is ’{base: ‘column’, xs: ‘row’}' showing buttons vertically stacked on mobile viewports and side-by-side in a horizontal row from breakpoint ‘xs’. You always need to provide a base value when using breakpoints.
|
|
6
6
|
*/
|
|
7
7
|
direction?: BreakpointCustomizable<ButtonGroupDirection>;
|
|
8
8
|
};
|
|
9
|
-
export declare const PButtonGroup: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<{}>, "color"
|
|
9
|
+
export declare const PButtonGroup: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<{}>, "color"> & {
|
|
10
10
|
/**
|
|
11
11
|
* Defines the direction of the main and cross axis. The default is ’{base: ‘column’, xs: ‘row’}' showing buttons vertically stacked on mobile viewports and side-by-side in a horizontal row from breakpoint ‘xs’. You always need to provide a base value when using breakpoints.
|
|
12
12
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
2
|
import type { BreakpointCustomizable, ButtonPureAlignLabel, SelectedAriaAttributes, ButtonPureAriaAttribute, ButtonPureIcon, ButtonPureSize, Theme, ButtonPureType, ButtonPureWeight } from '../types';
|
|
3
|
-
export type PButtonPureProps = Omit<HTMLAttributes<{}>, 'color'
|
|
3
|
+
export type PButtonPureProps = Omit<HTMLAttributes<{}>, 'color'> & {
|
|
4
4
|
/**
|
|
5
5
|
* Display button in active state.
|
|
6
6
|
*/
|
|
@@ -55,7 +55,7 @@ export type PButtonPureProps = Omit<HTMLAttributes<{}>, 'color' | 'onChange'> &
|
|
|
55
55
|
*/
|
|
56
56
|
weight?: ButtonPureWeight;
|
|
57
57
|
};
|
|
58
|
-
export declare const PButtonPure: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<{}>, "color"
|
|
58
|
+
export declare const PButtonPure: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<{}>, "color"> & {
|
|
59
59
|
/**
|
|
60
60
|
* Display button in active state.
|
|
61
61
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
2
|
import type { ButtonTileAlign, SelectedAriaAttributes, ButtonTileAriaAttribute, BreakpointCustomizable, ButtonTileAspectRatio, ButtonTileIcon, ButtonTileSize, ButtonTileType, ButtonTileWeight } from '../types';
|
|
3
|
-
export type PButtonTileProps = Omit<HTMLAttributes<{}>, 'color'
|
|
3
|
+
export type PButtonTileProps = Omit<HTMLAttributes<{}>, 'color'> & {
|
|
4
4
|
/**
|
|
5
5
|
* Alignment of button and description.
|
|
6
6
|
*/
|
|
@@ -58,7 +58,7 @@ export type PButtonTileProps = Omit<HTMLAttributes<{}>, 'color' | 'onChange'> &
|
|
|
58
58
|
*/
|
|
59
59
|
weight?: BreakpointCustomizable<ButtonTileWeight>;
|
|
60
60
|
};
|
|
61
|
-
export declare const PButtonTile: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<{}>, "color"
|
|
61
|
+
export declare const PButtonTile: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<{}>, "color"> & {
|
|
62
62
|
/**
|
|
63
63
|
* Alignment of button and description.
|
|
64
64
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
2
|
import type { SelectedAriaAttributes, ButtonAriaAttribute, BreakpointCustomizable, ButtonIcon, Theme, ButtonType, ButtonVariant } from '../types';
|
|
3
|
-
export type PButtonProps = Omit<HTMLAttributes<{}>, 'color'
|
|
3
|
+
export type PButtonProps = Omit<HTMLAttributes<{}>, 'color'> & {
|
|
4
4
|
/**
|
|
5
5
|
* Add ARIA attributes.
|
|
6
6
|
*/
|
|
@@ -38,7 +38,7 @@ export type PButtonProps = Omit<HTMLAttributes<{}>, 'color' | 'onChange'> & {
|
|
|
38
38
|
*/
|
|
39
39
|
variant?: ButtonVariant;
|
|
40
40
|
};
|
|
41
|
-
export declare const PButton: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<{}>, "color"
|
|
41
|
+
export declare const PButton: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<{}>, "color"> & {
|
|
42
42
|
/**
|
|
43
43
|
* Add ARIA attributes.
|
|
44
44
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
2
|
import type { CarouselAlignHeader, BreakpointCustomizable, CarouselInternationalization, CarouselUpdateEvent, Theme, CarouselWidth } from '../types';
|
|
3
|
-
export type PCarouselProps = Omit<HTMLAttributes<{}>, 'color'
|
|
3
|
+
export type PCarouselProps = Omit<HTMLAttributes<{}>, 'color'> & {
|
|
4
4
|
/**
|
|
5
5
|
* Defines which slide to be active (zero-based numbering).
|
|
6
6
|
*/
|
|
@@ -59,7 +59,7 @@ export type PCarouselProps = Omit<HTMLAttributes<{}>, 'color' | 'onChange'> & {
|
|
|
59
59
|
*/
|
|
60
60
|
wrapContent?: boolean;
|
|
61
61
|
};
|
|
62
|
-
export declare const PCarousel: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<{}>, "color"
|
|
62
|
+
export declare const PCarousel: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<{}>, "color"> & {
|
|
63
63
|
/**
|
|
64
64
|
* Defines which slide to be active (zero-based numbering).
|
|
65
65
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
2
|
import type { BreakpointCustomizable, CheckboxWrapperState, Theme } from '../types';
|
|
3
|
-
export type PCheckboxWrapperProps = Omit<HTMLAttributes<{}>, 'color'
|
|
3
|
+
export type PCheckboxWrapperProps = Omit<HTMLAttributes<{}>, 'color'> & {
|
|
4
4
|
/**
|
|
5
5
|
* Show or hide label. For better accessibility it's recommended to show the label.
|
|
6
6
|
*/
|
|
@@ -26,7 +26,7 @@ export type PCheckboxWrapperProps = Omit<HTMLAttributes<{}>, 'color' | 'onChange
|
|
|
26
26
|
*/
|
|
27
27
|
theme?: Theme;
|
|
28
28
|
};
|
|
29
|
-
export declare const PCheckboxWrapper: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<{}>, "color"
|
|
29
|
+
export declare const PCheckboxWrapper: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<{}>, "color"> & {
|
|
30
30
|
/**
|
|
31
31
|
* Show or hide label. For better accessibility it's recommended to show the label.
|
|
32
32
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
2
|
import type { ContentWrapperBackgroundColor, Theme, ContentWrapperWidth } from '../types';
|
|
3
|
-
export type PContentWrapperProps = Omit<HTMLAttributes<{}>, 'color'
|
|
3
|
+
export type PContentWrapperProps = Omit<HTMLAttributes<{}>, 'color'> & {
|
|
4
4
|
/**
|
|
5
5
|
* Has no effect anymore
|
|
6
6
|
* @deprecated since v3.0.0, will be removed with next major release
|
|
@@ -17,7 +17,7 @@ export type PContentWrapperProps = Omit<HTMLAttributes<{}>, 'color' | 'onChange'
|
|
|
17
17
|
width?: ContentWrapperWidth;
|
|
18
18
|
};
|
|
19
19
|
/** @deprecated since v3.0.0, will be removed with next major release. Use native CSS Grid instead. */
|
|
20
|
-
export declare const PContentWrapper: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<{}>, "color"
|
|
20
|
+
export declare const PContentWrapper: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<{}>, "color"> & {
|
|
21
21
|
/**
|
|
22
22
|
* Has no effect anymore
|
|
23
23
|
* @deprecated since v3.0.0, will be removed with next major release
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
2
|
import type { SelectedAriaAttributes, CrestAriaAttribute, CrestTarget } from '../types';
|
|
3
|
-
export type PCrestProps = Omit<HTMLAttributes<{}>, 'color'
|
|
3
|
+
export type PCrestProps = Omit<HTMLAttributes<{}>, 'color'> & {
|
|
4
4
|
/**
|
|
5
5
|
* Add ARIA attributes.
|
|
6
6
|
*/
|
|
@@ -14,7 +14,7 @@ export type PCrestProps = Omit<HTMLAttributes<{}>, 'color' | 'onChange'> & {
|
|
|
14
14
|
*/
|
|
15
15
|
target?: CrestTarget;
|
|
16
16
|
};
|
|
17
|
-
export declare const PCrest: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<{}>, "color"
|
|
17
|
+
export declare const PCrest: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<{}>, "color"> & {
|
|
18
18
|
/**
|
|
19
19
|
* Add ARIA attributes.
|
|
20
20
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
2
|
import type { DisplayAlign, DisplayColor, BreakpointCustomizable, DisplaySize, DisplayTag, Theme } from '../types';
|
|
3
|
-
export type PDisplayProps = Omit<HTMLAttributes<{}>, 'color'
|
|
3
|
+
export type PDisplayProps = Omit<HTMLAttributes<{}>, 'color'> & {
|
|
4
4
|
/**
|
|
5
5
|
* Text alignment of the component.
|
|
6
6
|
*/
|
|
@@ -26,7 +26,7 @@ export type PDisplayProps = Omit<HTMLAttributes<{}>, 'color' | 'onChange'> & {
|
|
|
26
26
|
*/
|
|
27
27
|
theme?: Theme;
|
|
28
28
|
};
|
|
29
|
-
export declare const PDisplay: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<{}>, "color"
|
|
29
|
+
export declare const PDisplay: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<{}>, "color"> & {
|
|
30
30
|
/**
|
|
31
31
|
* Text alignment of the component.
|
|
32
32
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
2
|
import type { DividerColor, BreakpointCustomizable, DividerDirection, DividerOrientation, Theme } from '../types';
|
|
3
|
-
export type PDividerProps = Omit<HTMLAttributes<{}>, 'color'
|
|
3
|
+
export type PDividerProps = Omit<HTMLAttributes<{}>, 'color'> & {
|
|
4
4
|
/**
|
|
5
5
|
* Defines color depending on theme.
|
|
6
6
|
*/
|
|
@@ -18,7 +18,7 @@ export type PDividerProps = Omit<HTMLAttributes<{}>, 'color' | 'onChange'> & {
|
|
|
18
18
|
*/
|
|
19
19
|
theme?: Theme;
|
|
20
20
|
};
|
|
21
|
-
export declare const PDivider: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<{}>, "color"
|
|
21
|
+
export declare const PDivider: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<{}>, "color"> & {
|
|
22
22
|
/**
|
|
23
23
|
* Defines color depending on theme.
|
|
24
24
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
2
|
import type { FieldsetWrapperLabelSize, FieldsetWrapperState, Theme } from '../types';
|
|
3
|
-
export type PFieldsetWrapperProps = Omit<HTMLAttributes<{}>, 'color'
|
|
3
|
+
export type PFieldsetWrapperProps = Omit<HTMLAttributes<{}>, 'color'> & {
|
|
4
4
|
/**
|
|
5
5
|
* The label text.
|
|
6
6
|
*/
|
|
@@ -27,7 +27,7 @@ export type PFieldsetWrapperProps = Omit<HTMLAttributes<{}>, 'color' | 'onChange
|
|
|
27
27
|
theme?: Theme;
|
|
28
28
|
};
|
|
29
29
|
/** @deprecated since v3.0.0, will be removed with next major release. Please use "p-fieldset" instead. */
|
|
30
|
-
export declare const PFieldsetWrapper: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<{}>, "color"
|
|
30
|
+
export declare const PFieldsetWrapper: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<{}>, "color"> & {
|
|
31
31
|
/**
|
|
32
32
|
* The label text.
|
|
33
33
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
2
|
import type { FieldsetLabelSize, FieldsetState, Theme } from '../types';
|
|
3
|
-
export type PFieldsetProps = Omit<HTMLAttributes<{}>, 'color'
|
|
3
|
+
export type PFieldsetProps = Omit<HTMLAttributes<{}>, 'color'> & {
|
|
4
4
|
/**
|
|
5
5
|
* The label text.
|
|
6
6
|
*/
|
|
@@ -26,7 +26,7 @@ export type PFieldsetProps = Omit<HTMLAttributes<{}>, 'color' | 'onChange'> & {
|
|
|
26
26
|
*/
|
|
27
27
|
theme?: Theme;
|
|
28
28
|
};
|
|
29
|
-
export declare const PFieldset: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<{}>, "color"
|
|
29
|
+
export declare const PFieldset: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<{}>, "color"> & {
|
|
30
30
|
/**
|
|
31
31
|
* The label text.
|
|
32
32
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
2
|
import type { BreakpointCustomizable, FlexItemAlignSelf, FlexItemFlex, FlexItemGrow, FlexItemOffset, FlexItemShrink, FlexItemWidth } from '../types';
|
|
3
|
-
export type PFlexItemProps = Omit<HTMLAttributes<{}>, 'color'
|
|
3
|
+
export type PFlexItemProps = Omit<HTMLAttributes<{}>, 'color'> & {
|
|
4
4
|
/**
|
|
5
5
|
* Defines how this flex item is aligned along the cross axis. This overwrites the cross axis alignment set by the container. Corresponds to the "alignSelf" css property.
|
|
6
6
|
*/
|
|
@@ -27,7 +27,7 @@ export type PFlexItemProps = Omit<HTMLAttributes<{}>, 'color' | 'onChange'> & {
|
|
|
27
27
|
width?: BreakpointCustomizable<FlexItemWidth>;
|
|
28
28
|
};
|
|
29
29
|
/** @deprecated since v3.0.0, will be removed with next major release. Use native CSS Flex instead. */
|
|
30
|
-
export declare const PFlexItem: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<{}>, "color"
|
|
30
|
+
export declare const PFlexItem: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<{}>, "color"> & {
|
|
31
31
|
/**
|
|
32
32
|
* Defines how this flex item is aligned along the cross axis. This overwrites the cross axis alignment set by the container. Corresponds to the "alignSelf" css property.
|
|
33
33
|
*/
|