@porsche-design-system/components-react 4.0.0-beta.2 → 4.0.0-beta.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 +293 -1
- package/cjs/lib/components/button-pure.wrapper.cjs +3 -3
- package/cjs/lib/components/display.wrapper.cjs +1 -0
- package/cjs/lib/components/flag.wrapper.cjs +1 -1
- package/cjs/lib/components/heading.wrapper.cjs +3 -3
- package/cjs/lib/components/icon.wrapper.cjs +1 -1
- package/cjs/lib/components/link-pure.wrapper.cjs +3 -3
- package/cjs/lib/components/spinner.wrapper.cjs +3 -3
- package/cjs/lib/components/text.wrapper.cjs +1 -1
- package/esm/lib/components/accordion.wrapper.d.ts +8 -8
- package/esm/lib/components/button-pure.wrapper.d.ts +15 -7
- package/esm/lib/components/button-pure.wrapper.mjs +3 -3
- package/esm/lib/components/button-tile.wrapper.d.ts +2 -2
- package/esm/lib/components/button.wrapper.d.ts +6 -6
- package/esm/lib/components/carousel.wrapper.d.ts +10 -10
- package/esm/lib/components/checkbox.wrapper.d.ts +6 -6
- package/esm/lib/components/crest.wrapper.d.ts +6 -6
- package/esm/lib/components/display.wrapper.d.ts +1 -0
- package/esm/lib/components/display.wrapper.mjs +1 -0
- package/esm/lib/components/drilldown-link.wrapper.d.ts +8 -8
- package/esm/lib/components/drilldown.wrapper.d.ts +8 -8
- package/esm/lib/components/fieldset.wrapper.d.ts +6 -6
- package/esm/lib/components/flag.wrapper.d.ts +5 -5
- package/esm/lib/components/flag.wrapper.mjs +1 -1
- package/esm/lib/components/flyout.wrapper.d.ts +2 -2
- package/esm/lib/components/heading.wrapper.d.ts +19 -11
- package/esm/lib/components/heading.wrapper.mjs +3 -3
- package/esm/lib/components/icon.wrapper.d.ts +7 -7
- package/esm/lib/components/icon.wrapper.mjs +1 -1
- package/esm/lib/components/input-date.wrapper.d.ts +12 -12
- package/esm/lib/components/input-email.wrapper.d.ts +8 -8
- package/esm/lib/components/input-month.wrapper.d.ts +12 -12
- package/esm/lib/components/input-number.wrapper.d.ts +8 -8
- package/esm/lib/components/input-password.wrapper.d.ts +6 -6
- package/esm/lib/components/input-search.wrapper.d.ts +6 -6
- package/esm/lib/components/input-tel.wrapper.d.ts +6 -6
- package/esm/lib/components/input-text.wrapper.d.ts +6 -6
- package/esm/lib/components/input-time.wrapper.d.ts +14 -14
- package/esm/lib/components/input-url.wrapper.d.ts +16 -16
- package/esm/lib/components/input-week.wrapper.d.ts +14 -14
- package/esm/lib/components/link-pure.wrapper.d.ts +23 -15
- package/esm/lib/components/link-pure.wrapper.mjs +3 -3
- package/esm/lib/components/link-tile-product.wrapper.d.ts +8 -8
- package/esm/lib/components/link-tile.wrapper.d.ts +8 -8
- package/esm/lib/components/link.wrapper.d.ts +14 -14
- package/esm/lib/components/modal.wrapper.d.ts +2 -2
- package/esm/lib/components/model-signature.wrapper.d.ts +2 -2
- package/esm/lib/components/multi-select.wrapper.d.ts +10 -10
- package/esm/lib/components/pin-code.wrapper.d.ts +8 -8
- package/esm/lib/components/popover.wrapper.d.ts +6 -6
- package/esm/lib/components/radio-group-option.wrapper.d.ts +2 -2
- package/esm/lib/components/radio-group.wrapper.d.ts +8 -8
- package/esm/lib/components/segmented-control-item.wrapper.d.ts +4 -4
- package/esm/lib/components/segmented-control.wrapper.d.ts +4 -4
- package/esm/lib/components/select.wrapper.d.ts +10 -10
- package/esm/lib/components/sheet.wrapper.d.ts +2 -2
- package/esm/lib/components/spinner.wrapper.d.ts +13 -5
- package/esm/lib/components/spinner.wrapper.mjs +3 -3
- package/esm/lib/components/switch.wrapper.d.ts +6 -6
- package/esm/lib/components/table-cell.wrapper.d.ts +2 -2
- package/esm/lib/components/table-head-cell.wrapper.d.ts +4 -4
- package/esm/lib/components/tabs-bar.wrapper.d.ts +2 -2
- package/esm/lib/components/tabs.wrapper.d.ts +2 -2
- package/esm/lib/components/tag-dismissible.wrapper.d.ts +6 -6
- package/esm/lib/components/tag.wrapper.d.ts +2 -2
- package/esm/lib/components/text.wrapper.d.ts +12 -12
- package/esm/lib/components/text.wrapper.mjs +1 -1
- package/esm/lib/components/textarea.wrapper.d.ts +6 -6
- package/esm/lib/components/wordmark.wrapper.d.ts +8 -8
- package/esm/lib/types.d.ts +322 -141
- package/global-styles/cn/index.css +3 -7
- package/global-styles/index.css +3 -7
- package/global-styles/variables.css +3 -7
- package/package.json +6 -2
- package/ssr/cjs/components/dist/styles/esm/styles-entry.cjs +341 -319
- package/ssr/cjs/components/dist/utils/esm/utils-entry.cjs +18 -8
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/button-pure.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/display.wrapper.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/flag.wrapper.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/heading.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/icon.wrapper.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/link-pure.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/spinner.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/text.wrapper.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button-pure.cjs +3 -2
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/carousel.cjs +2 -2
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/display.cjs +2 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/drilldown-item.cjs +2 -2
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flyout.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/heading.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-base.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-pure.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/radio-group-option.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/radio-group.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/spinner.cjs +2 -2
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/switch.cjs +1 -1
- package/ssr/esm/components/dist/styles/esm/styles-entry.mjs +341 -319
- package/ssr/esm/components/dist/utils/esm/utils-entry.mjs +18 -8
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/button-pure.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/display.wrapper.mjs +1 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/flag.wrapper.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/heading.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/icon.wrapper.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/link-pure.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/spinner.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/text.wrapper.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button-pure.mjs +3 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/carousel.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/display.mjs +2 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/drilldown-item.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flyout.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/heading.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-base.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-pure.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/radio-group-option.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/radio-group.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/spinner.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/switch.mjs +1 -1
- package/ssr/esm/lib/components/accordion.wrapper.d.ts +8 -8
- package/ssr/esm/lib/components/button-pure.wrapper.d.ts +15 -7
- package/ssr/esm/lib/components/button-tile.wrapper.d.ts +2 -2
- package/ssr/esm/lib/components/button.wrapper.d.ts +6 -6
- package/ssr/esm/lib/components/carousel.wrapper.d.ts +10 -10
- package/ssr/esm/lib/components/checkbox.wrapper.d.ts +6 -6
- package/ssr/esm/lib/components/crest.wrapper.d.ts +6 -6
- package/ssr/esm/lib/components/display.wrapper.d.ts +1 -0
- package/ssr/esm/lib/components/drilldown-link.wrapper.d.ts +8 -8
- package/ssr/esm/lib/components/drilldown.wrapper.d.ts +8 -8
- package/ssr/esm/lib/components/fieldset.wrapper.d.ts +6 -6
- package/ssr/esm/lib/components/flag.wrapper.d.ts +5 -5
- package/ssr/esm/lib/components/flyout.wrapper.d.ts +2 -2
- package/ssr/esm/lib/components/heading.wrapper.d.ts +19 -11
- package/ssr/esm/lib/components/icon.wrapper.d.ts +7 -7
- package/ssr/esm/lib/components/input-date.wrapper.d.ts +12 -12
- package/ssr/esm/lib/components/input-email.wrapper.d.ts +8 -8
- package/ssr/esm/lib/components/input-month.wrapper.d.ts +12 -12
- package/ssr/esm/lib/components/input-number.wrapper.d.ts +8 -8
- package/ssr/esm/lib/components/input-password.wrapper.d.ts +6 -6
- package/ssr/esm/lib/components/input-search.wrapper.d.ts +6 -6
- package/ssr/esm/lib/components/input-tel.wrapper.d.ts +6 -6
- package/ssr/esm/lib/components/input-text.wrapper.d.ts +6 -6
- package/ssr/esm/lib/components/input-time.wrapper.d.ts +14 -14
- package/ssr/esm/lib/components/input-url.wrapper.d.ts +16 -16
- package/ssr/esm/lib/components/input-week.wrapper.d.ts +14 -14
- package/ssr/esm/lib/components/link-pure.wrapper.d.ts +23 -15
- package/ssr/esm/lib/components/link-tile-product.wrapper.d.ts +8 -8
- package/ssr/esm/lib/components/link-tile.wrapper.d.ts +8 -8
- package/ssr/esm/lib/components/link.wrapper.d.ts +14 -14
- package/ssr/esm/lib/components/modal.wrapper.d.ts +2 -2
- package/ssr/esm/lib/components/model-signature.wrapper.d.ts +2 -2
- package/ssr/esm/lib/components/multi-select.wrapper.d.ts +10 -10
- package/ssr/esm/lib/components/pin-code.wrapper.d.ts +8 -8
- package/ssr/esm/lib/components/popover.wrapper.d.ts +6 -6
- package/ssr/esm/lib/components/radio-group-option.wrapper.d.ts +2 -2
- package/ssr/esm/lib/components/radio-group.wrapper.d.ts +8 -8
- package/ssr/esm/lib/components/segmented-control-item.wrapper.d.ts +4 -4
- package/ssr/esm/lib/components/segmented-control.wrapper.d.ts +4 -4
- package/ssr/esm/lib/components/select.wrapper.d.ts +10 -10
- package/ssr/esm/lib/components/sheet.wrapper.d.ts +2 -2
- package/ssr/esm/lib/components/spinner.wrapper.d.ts +13 -5
- package/ssr/esm/lib/components/switch.wrapper.d.ts +6 -6
- package/ssr/esm/lib/components/table-cell.wrapper.d.ts +2 -2
- package/ssr/esm/lib/components/table-head-cell.wrapper.d.ts +4 -4
- package/ssr/esm/lib/components/tabs-bar.wrapper.d.ts +2 -2
- package/ssr/esm/lib/components/tabs.wrapper.d.ts +2 -2
- package/ssr/esm/lib/components/tag-dismissible.wrapper.d.ts +6 -6
- package/ssr/esm/lib/components/tag.wrapper.d.ts +2 -2
- package/ssr/esm/lib/components/text.wrapper.d.ts +12 -12
- package/ssr/esm/lib/components/textarea.wrapper.d.ts +6 -6
- package/ssr/esm/lib/components/wordmark.wrapper.d.ts +8 -8
- package/ssr/esm/lib/dsr-components/carousel.d.ts +2 -2
- package/ssr/esm/lib/dsr-components/display.d.ts +2 -0
- package/ssr/esm/lib/dsr-components/drilldown-item.d.ts +2 -2
- package/ssr/esm/lib/dsr-components/flyout.d.ts +1 -1
- package/ssr/esm/lib/types.d.ts +322 -141
- package/tailwindcss/index.css +19 -4
|
@@ -3446,7 +3446,7 @@ const hasShowPickerSupport = () => (hasDocument &&
|
|
|
3446
3446
|
'showPicker' in HTMLInputElement.prototype &&
|
|
3447
3447
|
CSS.supports('selector(::-webkit-calendar-picker-indicator)'));
|
|
3448
3448
|
|
|
3449
|
-
const prefix = `[Porsche Design System v${"4.0.0-beta.
|
|
3449
|
+
const prefix = `[Porsche Design System v${"4.0.0-beta.3"}]` // this part isn't covered by unit tests
|
|
3450
3450
|
;
|
|
3451
3451
|
const consoleError$1 = (...messages) => {
|
|
3452
3452
|
console.error(prefix, ...messages);
|
|
@@ -3525,8 +3525,6 @@ var unwrapErr = (result) => {
|
|
|
3525
3525
|
throw result.value;
|
|
3526
3526
|
}
|
|
3527
3527
|
};
|
|
3528
|
-
|
|
3529
|
-
const HEADING_TAGS = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
|
|
3530
3528
|
const headerSlot = 'header';
|
|
3531
3529
|
const anchorSlot = 'anchor';
|
|
3532
3530
|
|
|
@@ -3731,12 +3729,24 @@ const getFieldsetAriaAttributes = (isRequired, isInvalid, aria) => {
|
|
|
3731
3729
|
const buildFlagUrl = (flagName) => {
|
|
3732
3730
|
return `${getCDNBaseURL()}/flags/${FLAGS_MANIFEST[flagName] || FLAGS_MANIFEST.xx}`;
|
|
3733
3731
|
};
|
|
3732
|
+
|
|
3733
|
+
const HEADING_TAGS = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
|
|
3734
3734
|
const headingSizeToTagMap = {
|
|
3735
|
-
small: 'h6',
|
|
3736
|
-
medium: 'h5',
|
|
3737
|
-
large: 'h4',
|
|
3738
|
-
'x-large': 'h3',
|
|
3739
|
-
'xx-large': 'h2',
|
|
3735
|
+
small: 'h6', // deprecated
|
|
3736
|
+
medium: 'h5', // deprecated
|
|
3737
|
+
large: 'h4', // deprecated
|
|
3738
|
+
'x-large': 'h3', // deprecated
|
|
3739
|
+
'xx-large': 'h2', // deprecated
|
|
3740
|
+
'2xs': 'h6',
|
|
3741
|
+
xs: 'h6',
|
|
3742
|
+
sm: 'h6',
|
|
3743
|
+
md: 'h5',
|
|
3744
|
+
lg: 'h4',
|
|
3745
|
+
xl: 'h3',
|
|
3746
|
+
'2xl': 'h2',
|
|
3747
|
+
'3xl': 'h2',
|
|
3748
|
+
'4xl': 'h2',
|
|
3749
|
+
'5xl': 'h2',
|
|
3740
3750
|
inherit: 'h2',
|
|
3741
3751
|
};
|
|
3742
3752
|
const getHeadingTagType = (host, size, tag) => {
|
|
@@ -5,20 +5,20 @@ import { usePrefix, useBrowserLayoutEffect, useMergedClass } from '../../hooks.m
|
|
|
5
5
|
import { syncRef } from '../../utils.mjs';
|
|
6
6
|
import { DSRButtonPure } from '../dsr-components/button-pure.mjs';
|
|
7
7
|
|
|
8
|
-
const PButtonPure = /*#__PURE__*/ forwardRef(({ active = false, alignLabel = 'end', aria, disabled = false, form, hideLabel = false, icon = 'arrow-right', iconSource, loading = false, name, size = '
|
|
8
|
+
const PButtonPure = /*#__PURE__*/ forwardRef(({ active = false, alignLabel = 'end', aria, color = 'primary', disabled = false, form, hideLabel = false, icon = 'arrow-right', iconSource, loading = false, name, size = 'sm', stretch = false, type = 'submit', underline = false, value, className, children, ...rest }, ref) => {
|
|
9
9
|
const elementRef = useRef(undefined);
|
|
10
10
|
const WebComponentTag = usePrefix('p-button-pure');
|
|
11
|
-
const propsToSync = [active, alignLabel, aria, disabled, form, hideLabel, icon, iconSource, loading, name, size, stretch, type, underline, value];
|
|
11
|
+
const propsToSync = [active, alignLabel, aria, color, disabled, form, hideLabel, icon, iconSource, loading, name, size, stretch, type, underline, value];
|
|
12
12
|
useBrowserLayoutEffect(() => {
|
|
13
13
|
const { current } = elementRef;
|
|
14
|
-
['active', 'alignLabel', 'aria', 'disabled', 'form', 'hideLabel', 'icon', 'iconSource', 'loading', 'name', 'size', 'stretch', 'type', 'underline', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
14
|
+
['active', 'alignLabel', 'aria', 'color', 'disabled', 'form', 'hideLabel', 'icon', 'iconSource', 'loading', 'name', 'size', 'stretch', 'type', 'underline', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
15
15
|
}, propsToSync);
|
|
16
16
|
const props = {
|
|
17
17
|
...rest,
|
|
18
18
|
// @ts-ignore
|
|
19
19
|
...(!process.browser
|
|
20
20
|
? {
|
|
21
|
-
children: (jsx(DSRButtonPure, { active, alignLabel, aria, disabled, form, hideLabel, icon, iconSource, loading, name, size, stretch, type, underline, value, children })),
|
|
21
|
+
children: (jsx(DSRButtonPure, { active, alignLabel, aria, color, disabled, form, hideLabel, icon, iconSource, loading, name, size, stretch, type, underline, value, children })),
|
|
22
22
|
}
|
|
23
23
|
: {
|
|
24
24
|
children,
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/display.wrapper.mjs
CHANGED
|
@@ -5,6 +5,7 @@ import { usePrefix, useBrowserLayoutEffect, useMergedClass } from '../../hooks.m
|
|
|
5
5
|
import { syncRef } from '../../utils.mjs';
|
|
6
6
|
import { DSRDisplay } from '../dsr-components/display.mjs';
|
|
7
7
|
|
|
8
|
+
/** @deprecated since v4.0.0, will be removed with next major release. Please use `p-heading` instead. */
|
|
8
9
|
const PDisplay = /*#__PURE__*/ forwardRef(({ align = 'start', color = 'primary', ellipsis = false, size = 'large', tag, className, children, ...rest }, ref) => {
|
|
9
10
|
const elementRef = useRef(undefined);
|
|
10
11
|
const WebComponentTag = usePrefix('p-display');
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/flag.wrapper.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import { usePrefix, useBrowserLayoutEffect, useMergedClass } from '../../hooks.m
|
|
|
5
5
|
import { syncRef } from '../../utils.mjs';
|
|
6
6
|
import { DSRFlag } from '../dsr-components/flag.mjs';
|
|
7
7
|
|
|
8
|
-
const PFlag = /*#__PURE__*/ forwardRef(({ aria, name = 'de', size = '
|
|
8
|
+
const PFlag = /*#__PURE__*/ forwardRef(({ aria, name = 'de', size = 'sm', className, ...rest }, ref) => {
|
|
9
9
|
const elementRef = useRef(undefined);
|
|
10
10
|
const WebComponentTag = usePrefix('p-flag');
|
|
11
11
|
const propsToSync = [aria, name, size];
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/heading.wrapper.mjs
CHANGED
|
@@ -5,20 +5,20 @@ import { usePrefix, useBrowserLayoutEffect, useMergedClass } from '../../hooks.m
|
|
|
5
5
|
import { syncRef } from '../../utils.mjs';
|
|
6
6
|
import { DSRHeading } from '../dsr-components/heading.mjs';
|
|
7
7
|
|
|
8
|
-
const PHeading = /*#__PURE__*/ forwardRef(({ align = 'start', color = 'primary', ellipsis = false, size = '
|
|
8
|
+
const PHeading = /*#__PURE__*/ forwardRef(({ align = 'start', color = 'primary', ellipsis = false, size = '2xl', tag, weight = 'normal', className, children, ...rest }, ref) => {
|
|
9
9
|
const elementRef = useRef(undefined);
|
|
10
10
|
const WebComponentTag = usePrefix('p-heading');
|
|
11
|
-
const propsToSync = [align, color, ellipsis, size, tag];
|
|
11
|
+
const propsToSync = [align, color, ellipsis, size, tag, weight];
|
|
12
12
|
useBrowserLayoutEffect(() => {
|
|
13
13
|
const { current } = elementRef;
|
|
14
|
-
['align', 'color', 'ellipsis', 'size', 'tag'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
14
|
+
['align', 'color', 'ellipsis', 'size', 'tag', 'weight'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
15
15
|
}, propsToSync);
|
|
16
16
|
const props = {
|
|
17
17
|
...rest,
|
|
18
18
|
// @ts-ignore
|
|
19
19
|
...(!process.browser
|
|
20
20
|
? {
|
|
21
|
-
children: (jsx(DSRHeading, { align, color, ellipsis, size, tag, children })),
|
|
21
|
+
children: (jsx(DSRHeading, { align, color, ellipsis, size, tag, weight, children })),
|
|
22
22
|
}
|
|
23
23
|
: {
|
|
24
24
|
children,
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/icon.wrapper.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import { usePrefix, useBrowserLayoutEffect, useMergedClass } from '../../hooks.m
|
|
|
5
5
|
import { syncRef } from '../../utils.mjs';
|
|
6
6
|
import { DSRIcon } from '../dsr-components/icon.mjs';
|
|
7
7
|
|
|
8
|
-
const PIcon = /*#__PURE__*/ forwardRef(({ aria, color = 'primary', name = 'arrow-right', size = '
|
|
8
|
+
const PIcon = /*#__PURE__*/ forwardRef(({ aria, color = 'primary', name = 'arrow-right', size = 'sm', source, className, ...rest }, ref) => {
|
|
9
9
|
const elementRef = useRef(undefined);
|
|
10
10
|
const WebComponentTag = usePrefix('p-icon');
|
|
11
11
|
const propsToSync = [aria, color, name, size, source];
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/link-pure.wrapper.mjs
CHANGED
|
@@ -5,20 +5,20 @@ import { usePrefix, useBrowserLayoutEffect, useMergedClass } from '../../hooks.m
|
|
|
5
5
|
import { syncRef } from '../../utils.mjs';
|
|
6
6
|
import { DSRLinkPure } from '../dsr-components/link-pure.mjs';
|
|
7
7
|
|
|
8
|
-
const PLinkPure = /*#__PURE__*/ forwardRef(({ active = false, alignLabel = 'end', aria, download, hideLabel = false, href, icon = 'arrow-right', iconSource, rel, size = '
|
|
8
|
+
const PLinkPure = /*#__PURE__*/ forwardRef(({ active = false, alignLabel = 'end', aria, color = 'primary', download, hideLabel = false, href, icon = 'arrow-right', iconSource, rel, size = 'sm', stretch = false, target = '_self', underline = false, className, children, ...rest }, ref) => {
|
|
9
9
|
const elementRef = useRef(undefined);
|
|
10
10
|
const WebComponentTag = usePrefix('p-link-pure');
|
|
11
|
-
const propsToSync = [active, alignLabel, aria, download, hideLabel, href, icon, iconSource, rel, size, stretch, target, underline];
|
|
11
|
+
const propsToSync = [active, alignLabel, aria, color, download, hideLabel, href, icon, iconSource, rel, size, stretch, target, underline];
|
|
12
12
|
useBrowserLayoutEffect(() => {
|
|
13
13
|
const { current } = elementRef;
|
|
14
|
-
['active', 'alignLabel', 'aria', 'download', 'hideLabel', 'href', 'icon', 'iconSource', 'rel', 'size', 'stretch', 'target', 'underline'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
14
|
+
['active', 'alignLabel', 'aria', 'color', 'download', 'hideLabel', 'href', 'icon', 'iconSource', 'rel', 'size', 'stretch', 'target', 'underline'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
15
15
|
}, propsToSync);
|
|
16
16
|
const props = {
|
|
17
17
|
...rest,
|
|
18
18
|
// @ts-ignore
|
|
19
19
|
...(!process.browser
|
|
20
20
|
? {
|
|
21
|
-
children: (jsx(DSRLinkPure, { active, alignLabel, aria, download, hideLabel, href, icon, iconSource, rel, size, stretch, target, underline, children })),
|
|
21
|
+
children: (jsx(DSRLinkPure, { active, alignLabel, aria, color, download, hideLabel, href, icon, iconSource, rel, size, stretch, target, underline, children })),
|
|
22
22
|
}
|
|
23
23
|
: {
|
|
24
24
|
children,
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/spinner.wrapper.mjs
CHANGED
|
@@ -5,20 +5,20 @@ import { usePrefix, useBrowserLayoutEffect, useMergedClass } from '../../hooks.m
|
|
|
5
5
|
import { syncRef } from '../../utils.mjs';
|
|
6
6
|
import { DSRSpinner } from '../dsr-components/spinner.mjs';
|
|
7
7
|
|
|
8
|
-
const PSpinner = /*#__PURE__*/ forwardRef(({ aria, size = '
|
|
8
|
+
const PSpinner = /*#__PURE__*/ forwardRef(({ aria, color = 'primary', size = 'sm', className, ...rest }, ref) => {
|
|
9
9
|
const elementRef = useRef(undefined);
|
|
10
10
|
const WebComponentTag = usePrefix('p-spinner');
|
|
11
|
-
const propsToSync = [aria, size];
|
|
11
|
+
const propsToSync = [aria, color, size];
|
|
12
12
|
useBrowserLayoutEffect(() => {
|
|
13
13
|
const { current } = elementRef;
|
|
14
|
-
['aria', 'size'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
14
|
+
['aria', 'color', 'size'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
15
15
|
}, propsToSync);
|
|
16
16
|
const props = {
|
|
17
17
|
...rest,
|
|
18
18
|
// @ts-ignore
|
|
19
19
|
...(!process.browser
|
|
20
20
|
? {
|
|
21
|
-
children: (jsx(DSRSpinner, { aria, size })),
|
|
21
|
+
children: (jsx(DSRSpinner, { aria, color, size })),
|
|
22
22
|
}
|
|
23
23
|
: {
|
|
24
24
|
suppressHydrationWarning: true,
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/text.wrapper.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import { usePrefix, useBrowserLayoutEffect, useMergedClass } from '../../hooks.m
|
|
|
5
5
|
import { syncRef } from '../../utils.mjs';
|
|
6
6
|
import { DSRText } from '../dsr-components/text.mjs';
|
|
7
7
|
|
|
8
|
-
const PText = /*#__PURE__*/ forwardRef(({ align = 'start', color = 'primary', ellipsis = false, size = '
|
|
8
|
+
const PText = /*#__PURE__*/ forwardRef(({ align = 'start', color = 'primary', ellipsis = false, size = 'sm', tag = 'p', weight = 'normal', className, children, ...rest }, ref) => {
|
|
9
9
|
const elementRef = useRef(undefined);
|
|
10
10
|
const WebComponentTag = usePrefix('p-text');
|
|
11
11
|
const propsToSync = [align, color, ellipsis, size, tag, weight];
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button-pure.mjs
CHANGED
|
@@ -27,9 +27,10 @@ class DSRButtonPure extends Component {
|
|
|
27
27
|
const iconProps = {
|
|
28
28
|
className: 'icon',
|
|
29
29
|
size: 'inherit',
|
|
30
|
+
color: 'inherit',
|
|
30
31
|
};
|
|
31
|
-
const style = minifyCss(getComponentCss$17(this.props.icon, this.props.iconSource, this.props.active, this.props.disabled, this.props.loading, this.isDisabledOrLoading, this.props.stretch, this.props.size, this.props.hideLabel, this.props.alignLabel, this.props.underline));
|
|
32
|
-
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs(Fragment, { children: [jsxs("button", { ...getButtonPureAriaAttributes(this.props.disabled, this.props.loading, this.props.aria), className: "root", type: this.props.type, name: this.props.name, value: this.props.value, "aria-describedby": this.props.loading ? loadingId : undefined, children: [this.props.loading ? (jsx(PSpinner, { ...iconProps, "aria-hidden": "true" })) : (hasIcon && (jsx(PIcon, { ...iconProps, name: this.props.icon, source: this.props.iconSource,
|
|
32
|
+
const style = minifyCss(getComponentCss$17(this.props.icon, this.props.iconSource, this.props.active, this.props.disabled, this.props.loading, this.isDisabledOrLoading, this.props.stretch, this.props.size, this.props.color, this.props.hideLabel, this.props.alignLabel, this.props.underline));
|
|
33
|
+
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs(Fragment, { children: [jsxs("button", { ...getButtonPureAriaAttributes(this.props.disabled, this.props.loading, this.props.aria), className: "root", type: this.props.type, name: this.props.name, value: this.props.value, "aria-describedby": this.props.loading ? loadingId : undefined, children: [this.props.loading ? (jsx(PSpinner, { ...iconProps, "aria-hidden": "true" })) : (hasIcon && (jsx(PIcon, { ...iconProps, name: this.props.icon, source: this.props.iconSource, "aria-hidden": "true" }))), jsx("span", { className: "label", children: jsx("slot", {}) })] }), jsx(LoadingMessage, { loading: this.props.loading, initialLoading: this.props.initialLoading })] })] }), this.props.children] }));
|
|
33
34
|
}
|
|
34
35
|
}
|
|
35
36
|
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/carousel.mjs
CHANGED
|
@@ -10,8 +10,8 @@ import { PLinkPure } from '../components/link-pure.wrapper.mjs';
|
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* @slot {"name": "heading", "description": "Renders a heading above the carousel." }
|
|
13
|
-
* @slot {"name": "description", "description": "
|
|
14
|
-
* @slot {"name": "controls", "description": "
|
|
13
|
+
* @slot {"name": "description", "description": "Renders descriptive content below the heading." }
|
|
14
|
+
* @slot {"name": "controls", "description": "Renders custom controls such as navigation buttons or indicators." }
|
|
15
15
|
* @slot {"name": "", "description": "Default slot for the carousel slides." }
|
|
16
16
|
*
|
|
17
17
|
* @controlled { "props": ["activeSlideIndex"], "event": "update", "isInternallyMutated": true }
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox.mjs
CHANGED
|
@@ -36,7 +36,7 @@ class DSRCheckbox extends Component {
|
|
|
36
36
|
const { namedSlotChildren} = splitChildren(this.props.children);
|
|
37
37
|
const id = 'x';
|
|
38
38
|
const style = minifyCss(getComponentCss$12(this.props.hideLabel, this.props.state, this.props.disabled, this.props.loading, this.props.compact));
|
|
39
|
-
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs("div", { className: "root", children: [jsxs("div", { className: "wrapper", children: [jsxs("div", { className: "input-wrapper", children: [jsx("input", { type: "checkbox", id: id, "aria-describedby": `${descriptionId} ${messageId}`, "aria-invalid": this.props.state === 'error' ? 'true' : null, "aria-disabled": this.props.loading || this.props.disabled ? 'true' : null, checked: this.props.checked, form: this.props.form, value: this.props.value, name: this.props.name, onBlur: this.props.onBlur, required: this.props.required, disabled: this.props.disabled }), this.props.loading && jsx(PSpinner, { className: "spinner",
|
|
39
|
+
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs("div", { className: "root", children: [jsxs("div", { className: "wrapper", children: [jsxs("div", { className: "input-wrapper", children: [jsx("input", { type: "checkbox", id: id, "aria-describedby": `${descriptionId} ${messageId}`, "aria-invalid": this.props.state === 'error' ? 'true' : null, "aria-disabled": this.props.loading || this.props.disabled ? 'true' : null, checked: this.props.checked, form: this.props.form, value: this.props.value, name: this.props.name, onBlur: this.props.onBlur, required: this.props.required, disabled: this.props.disabled }), this.props.loading && jsx(PSpinner, { className: "spinner", "aria-hidden": "true" })] }), jsx(Label, { hasLabel: this.props.label || namedSlotChildren.filter(({ props: { slot } }) => slot === 'label').length > 0, hasDescription: this.props.description || namedSlotChildren.filter(({ props: { slot } }) => slot === 'description').length > 0, host: null, htmlFor: id, label: this.props.label, isLoading: this.props.loading, isDisabled: this.props.disabled, isRequired: this.props.required })] }), 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, host: null }), jsx(LoadingMessage, { loading: this.props.loading, initialLoading: this.props.initialLoading })] })] }), this.props.children] }));
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/display.mjs
CHANGED
|
@@ -7,6 +7,8 @@ import { getDisplayTagType } from '../../../../../../components/dist/utils/esm/u
|
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* @slot {"name": "", "description": "Default slot for the display text." }
|
|
10
|
+
*
|
|
11
|
+
* @deprecated since v4.0.0, will be removed with next major release. Please use `p-heading` instead.
|
|
10
12
|
*/
|
|
11
13
|
class DSRDisplay extends Component {
|
|
12
14
|
host;
|
|
@@ -8,8 +8,8 @@ import { PButtonPure } from '../components/button-pure.wrapper.mjs';
|
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* @slot {"name": "", "description": "Default slot for the main content." }
|
|
11
|
-
* @slot {"name": "button", "description": "Shows a custom button to reach a deeper level of the navigation structure." }
|
|
12
|
-
* @slot {"name": "header", "description": "Shows a custom header section on mobile view" }
|
|
11
|
+
* @slot {"name": "button", "description": "Shows a custom button to reach a deeper level of the navigation structure." }
|
|
12
|
+
* @slot {"name": "header", "description": "Shows a custom header section on mobile view." }
|
|
13
13
|
* @experimental
|
|
14
14
|
*/
|
|
15
15
|
class DSRDrilldownItem extends Component {
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flyout.mjs
CHANGED
|
@@ -11,7 +11,7 @@ import { PButton } from '../components/button.wrapper.mjs';
|
|
|
11
11
|
* @slot {"name": "header", "description": "Renders a sticky header section above the content area." }
|
|
12
12
|
* @slot {"name": "", "description": "Default slot for the main content." }
|
|
13
13
|
* @slot {"name": "footer", "description": "Shows a sticky footer section, flowing under the content area when scrollable." }
|
|
14
|
-
* @slot {"name": "sub-footer", "description": "
|
|
14
|
+
* @slot {"name": "sub-footer", "description": "Renders additional content below the footer, such as legal information or FAQs. It appears when the flyout has enough space or when the user scrolls to the end." }
|
|
15
15
|
*
|
|
16
16
|
* @controlled {"props": ["open"], "event": "dismiss"}
|
|
17
17
|
*/
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/heading.mjs
CHANGED
|
@@ -13,7 +13,7 @@ class DSRHeading extends Component {
|
|
|
13
13
|
render() {
|
|
14
14
|
splitChildren(this.props.children);
|
|
15
15
|
const TagType = getHeadingTagType(null, this.props.size, this.props.tag);
|
|
16
|
-
const style = minifyCss(getComponentCss$U(this.props.size, this.props.align, this.props.color, this.props.ellipsis));
|
|
16
|
+
const style = minifyCss(getComponentCss$U(this.props.size, this.props.weight, this.props.align, this.props.color, this.props.ellipsis));
|
|
17
17
|
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsx(TagType, { className: "root", children: jsx("slot", {}) })] }), this.props.children] }));
|
|
18
18
|
}
|
|
19
19
|
}
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-base.mjs
CHANGED
|
@@ -20,7 +20,7 @@ id, label, description, loading, initialLoading, required, disabled, state, mess
|
|
|
20
20
|
start, end, }) => {
|
|
21
21
|
const { namedSlotChildren } = splitChildren(children);
|
|
22
22
|
return (jsxs("div", { className: "root", children: [jsx(Label, { hasLabel: !!label || namedSlotChildren.filter(({ props: { slot } }) => slot === 'label').length > 0, hasDescription: !!description || namedSlotChildren.filter(({ props: { slot } }) => slot === 'description').length > 0, host: null, label: label, description: description, htmlFor: id, isRequired: required, isLoading: loading, isDisabled: disabled }), jsxs("div", { className: "wrapper", children: [jsx("slot", { name: "start" }), start, jsx("input", { "aria-describedby": loading ? loadingId : `${descriptionId} ${messageId}`, "aria-invalid": state === 'error' ? 'true' : null, "aria-disabled": disabled || loading ? 'true' : null, "aria-readonly": readOnly ? 'true' : null, id: id, name: name, form: form, type: type, required: required, placeholder: placeholder || null, maxLength: maxLength, minLength: minLength, spellCheck: spellCheck, max: max, min: min, step: step, defaultValue: value, readOnly: readOnly, autoComplete: autoComplete, disabled: disabled, pattern: pattern, multiple: multiple, dir: "auto" // This overwrites the default: let the browser now decide in which direction the value should be placed.
|
|
23
|
-
}), end, jsx("slot", { name: "end" }), loading && jsx(PSpinner, {
|
|
23
|
+
}), end, jsx("slot", { name: "end" }), loading && jsx(PSpinner, { "aria-hidden": "true" })] }), jsx(StateMessage, { hasMessage: (message || namedSlotChildren.filter(({ props: { slot } }) => slot === 'message').length > 0) && ['success', 'error'].includes(state), state: state, message: message, host: null }), jsx(LoadingMessage, { loading: loading, initialLoading: initialLoading })] }));
|
|
24
24
|
};
|
|
25
25
|
|
|
26
26
|
export { InputBase };
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-pure.mjs
CHANGED
|
@@ -16,7 +16,7 @@ class DSRLinkPure extends Component {
|
|
|
16
16
|
splitChildren(this.props.children);
|
|
17
17
|
const TagType = this.props.href === undefined ? 'span' : 'a';
|
|
18
18
|
const hasIcon = hasVisibleIcon(this.props.icon, this.props.iconSource);
|
|
19
|
-
const style = minifyCss(getComponentCss$G(this.props.icon, this.props.iconSource, this.props.active, this.props.stretch, this.props.size, this.props.hideLabel, this.props.alignLabel, this.props.underline, !this.props.href));
|
|
19
|
+
const style = minifyCss(getComponentCss$G(this.props.icon, this.props.iconSource, this.props.active, this.props.stretch, this.props.size, this.props.color, this.props.hideLabel, this.props.alignLabel, this.props.underline, !this.props.href));
|
|
20
20
|
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs(TagType, { className: "root", ...(TagType === 'a' && {
|
|
21
21
|
href: this.props.href,
|
|
22
22
|
target: this.props.target,
|
|
@@ -29,7 +29,7 @@ class DSRRadioGroupOption extends Component {
|
|
|
29
29
|
const style = minifyCss(getComponentCss$u(isDisabled, isLoading, state));
|
|
30
30
|
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsx(Fragment, { children: jsxs("div", { className: "root", children: [jsxs("div", { className: "wrapper", children: [jsx("input", { id: id, type: "radio", name: name, checked: isSelected, disabled: isDisabled || isLoading, value: this.props.value, onClick: (e) => {
|
|
31
31
|
e.stopPropagation();
|
|
32
|
-
}, onBlur: this.props.onBlur, "aria-describedby": isLoading ? loadingId : `${messageId}`, "aria-invalid": state === 'error' ? 'true' : null, "aria-disabled": isDisabled || isLoading ? 'true' : null }), isOptionLoading && !this.props.loadingParent && (jsx(PSpinner, { className: "spinner",
|
|
32
|
+
}, onBlur: this.props.onBlur, "aria-describedby": isLoading ? loadingId : `${messageId}`, "aria-invalid": state === 'error' ? 'true' : null, "aria-disabled": isDisabled || isLoading ? 'true' : null }), isOptionLoading && !this.props.loadingParent && (jsx(PSpinner, { className: "spinner", "aria-hidden": "true" }))] }), jsx(Label, { hasLabel: this.props.label, hasDescription: false, host: null, label: this.props.label, htmlFor: id, isDisabled: isDisabled, isLoading: isLoading, stopClickPropagation: true }), !this.props.loadingParent && (jsx(LoadingMessage, { loading: isOptionLoading, initialLoading: this.props.initialLoading }))] }) })] }), this.props.children] }));
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/radio-group.mjs
CHANGED
|
@@ -37,7 +37,7 @@ class DSRRadioGroup extends Component {
|
|
|
37
37
|
render() {
|
|
38
38
|
const { namedSlotChildren} = splitChildren(this.props.children);
|
|
39
39
|
const style = minifyCss(getComponentCss$t(this.props.disabled, this.props.loading, this.props.hideLabel, this.props.state, this.props.compact, this.props.direction));
|
|
40
|
-
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs("fieldset", { className: "root", disabled: this.props.disabled, ...getFieldsetAriaAttributes(this.props.required, this.props.state === 'error', { role: 'radiogroup' }), "aria-describedby": this.props.loading ? loadingId : `${descriptionId} ${messageId}`, "aria-labelledby": labelId, 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, tag: "div", label: this.props.label, description: this.props.description, isRequired: this.props.required, isLoading: this.props.loading, isDisabled: this.props.disabled }), jsxs("div", { className: "wrapper", children: [jsx("slot", {}), this.props.loading && jsx(PSpinner, { className: "spinner",
|
|
40
|
+
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs("fieldset", { className: "root", disabled: this.props.disabled, ...getFieldsetAriaAttributes(this.props.required, this.props.state === 'error', { role: 'radiogroup' }), "aria-describedby": this.props.loading ? loadingId : `${descriptionId} ${messageId}`, "aria-labelledby": labelId, 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, tag: "div", label: this.props.label, description: this.props.description, isRequired: this.props.required, isLoading: this.props.loading, isDisabled: this.props.disabled }), jsxs("div", { className: "wrapper", children: [jsx("slot", {}), this.props.loading && jsx(PSpinner, { className: "spinner", "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, host: null }), jsx(LoadingMessage, { loading: this.props.loading, initialLoading: this.props.initialLoading })] })] }), this.props.children] }));
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/spinner.mjs
CHANGED
|
@@ -7,8 +7,8 @@ import { parseAndGetAriaAttributes } from '../../../../../../components/dist/uti
|
|
|
7
7
|
class DSRSpinner extends Component {
|
|
8
8
|
host;
|
|
9
9
|
render() {
|
|
10
|
-
const style = minifyCss(getComponentCss$m(this.props.size));
|
|
11
|
-
return (jsx(Fragment, { children: jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs("
|
|
10
|
+
const style = minifyCss(getComponentCss$m(this.props.color, this.props.size));
|
|
11
|
+
return (jsx(Fragment, { children: jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs("div", { role: "alert", "aria-live": "assertive", ...parseAndGetAriaAttributes(this.props.aria), children: [jsx("span", { className: "sr-only", children: "\u00A0" }), jsxs("svg", { viewBox: "-16 -16 32 32", width: "100%", height: "100%", focusable: "false", "aria-hidden": "true", children: [jsx("circle", { r: "11" }), jsx("circle", { r: "11" })] })] })] }) }));
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/switch.mjs
CHANGED
|
@@ -21,7 +21,7 @@ class DSRSwitch extends Component {
|
|
|
21
21
|
const id = 'x';
|
|
22
22
|
const style = minifyCss(getComponentCss$j(this.props.alignLabel, this.props.hideLabel, this.props.stretch, this.props.checked, this.props.disabled, this.props.loading, this.props.compact));
|
|
23
23
|
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs(Fragment, { children: [jsx("button", { ...getSwitchButtonAriaAttributes(this.props.disabled, this.props.loading, this.props.checked), id: id, type: "button", role: "switch", "aria-labelledby": "label" // only relevant for axe-core because of https://github.com/dequelabs/axe-core/issues/1393
|
|
24
|
-
, "aria-describedby": this.props.loading ? loadingId : undefined, children: jsx("span", { className: "toggle", children: this.props.loading && jsx(PSpinner, { className: "spinner",
|
|
24
|
+
, "aria-describedby": this.props.loading ? loadingId : undefined, children: jsx("span", { className: "toggle", children: this.props.loading && jsx(PSpinner, { className: "spinner", "aria-hidden": "true" }) }) }), jsx("label", { id: "label", htmlFor: id, children: jsx("slot", {}) }), jsx(LoadingMessage, { loading: this.props.loading, initialLoading: this.props.initialLoading })] })] }), this.props.children] }));
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
|
|
@@ -14,15 +14,15 @@ export type PAccordionProps = BaseProps & {
|
|
|
14
14
|
*/
|
|
15
15
|
compact?: boolean;
|
|
16
16
|
/**
|
|
17
|
-
* @deprecated
|
|
17
|
+
* @deprecated Will be removed in the next major release. Use the `summary` slot instead. Sets the heading text within the summary section.
|
|
18
18
|
*/
|
|
19
19
|
heading?: string;
|
|
20
20
|
/**
|
|
21
|
-
* @deprecated
|
|
21
|
+
* @deprecated Will be removed in the next major release. Use the `summary` slot instead. Sets the heading tag for proper semantic structure within the page.
|
|
22
22
|
*/
|
|
23
23
|
headingTag?: AccordionHeadingTag;
|
|
24
24
|
/**
|
|
25
|
-
* Emitted when accordion state
|
|
25
|
+
* Emitted when the accordion state changes.
|
|
26
26
|
*/
|
|
27
27
|
onUpdate?: (event: CustomEvent<AccordionUpdateEventDetail>) => void;
|
|
28
28
|
/**
|
|
@@ -30,7 +30,7 @@ export type PAccordionProps = BaseProps & {
|
|
|
30
30
|
*/
|
|
31
31
|
open?: boolean;
|
|
32
32
|
/**
|
|
33
|
-
* @deprecated
|
|
33
|
+
* @deprecated Will be removed in the next major release. Use the `summary` slot instead. Controls the heading size in the summary section (only applies when using the `heading` prop or `heading` slot).
|
|
34
34
|
*/
|
|
35
35
|
size?: BreakpointCustomizable<AccordionSize>;
|
|
36
36
|
/**
|
|
@@ -52,15 +52,15 @@ export declare const PAccordion: import("react").ForwardRefExoticComponent<Omit<
|
|
|
52
52
|
*/
|
|
53
53
|
compact?: boolean;
|
|
54
54
|
/**
|
|
55
|
-
* @deprecated
|
|
55
|
+
* @deprecated Will be removed in the next major release. Use the `summary` slot instead. Sets the heading text within the summary section.
|
|
56
56
|
*/
|
|
57
57
|
heading?: string;
|
|
58
58
|
/**
|
|
59
|
-
* @deprecated
|
|
59
|
+
* @deprecated Will be removed in the next major release. Use the `summary` slot instead. Sets the heading tag for proper semantic structure within the page.
|
|
60
60
|
*/
|
|
61
61
|
headingTag?: AccordionHeadingTag;
|
|
62
62
|
/**
|
|
63
|
-
* Emitted when accordion state
|
|
63
|
+
* Emitted when the accordion state changes.
|
|
64
64
|
*/
|
|
65
65
|
onUpdate?: (event: CustomEvent<AccordionUpdateEventDetail>) => void;
|
|
66
66
|
/**
|
|
@@ -68,7 +68,7 @@ export declare const PAccordion: import("react").ForwardRefExoticComponent<Omit<
|
|
|
68
68
|
*/
|
|
69
69
|
open?: boolean;
|
|
70
70
|
/**
|
|
71
|
-
* @deprecated
|
|
71
|
+
* @deprecated Will be removed in the next major release. Use the `summary` slot instead. Controls the heading size in the summary section (only applies when using the `heading` prop or `heading` slot).
|
|
72
72
|
*/
|
|
73
73
|
size?: BreakpointCustomizable<AccordionSize>;
|
|
74
74
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { BaseProps } from '../../BaseProps';
|
|
2
|
-
import type { BreakpointCustomizable, ButtonPureAlignLabel, SelectedAriaAttributes, ButtonPureAriaAttribute, ButtonPureIcon, ButtonPureSize, ButtonPureType } from '../types';
|
|
2
|
+
import type { BreakpointCustomizable, ButtonPureAlignLabel, SelectedAriaAttributes, ButtonPureAriaAttribute, ButtonPureColor, ButtonPureIcon, ButtonPureSize, ButtonPureType } from '../types';
|
|
3
3
|
export type PButtonPureProps = BaseProps & {
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Displays the button in its active state.
|
|
6
6
|
*/
|
|
7
7
|
active?: boolean;
|
|
8
8
|
/**
|
|
@@ -10,9 +10,13 @@ export type PButtonPureProps = BaseProps & {
|
|
|
10
10
|
*/
|
|
11
11
|
alignLabel?: BreakpointCustomizable<ButtonPureAlignLabel>;
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* Sets ARIA attributes.
|
|
14
14
|
*/
|
|
15
15
|
aria?: SelectedAriaAttributes<ButtonPureAriaAttribute>;
|
|
16
|
+
/**
|
|
17
|
+
* The color.
|
|
18
|
+
*/
|
|
19
|
+
color?: ButtonPureColor;
|
|
16
20
|
/**
|
|
17
21
|
* Disables the button. No events will be triggered while disabled state is active.
|
|
18
22
|
*/
|
|
@@ -22,7 +26,7 @@ export type PButtonPureProps = BaseProps & {
|
|
|
22
26
|
*/
|
|
23
27
|
form?: string;
|
|
24
28
|
/**
|
|
25
|
-
*
|
|
29
|
+
* Shows or hides the label. For better accessibility, it is recommended to show the label.
|
|
26
30
|
*/
|
|
27
31
|
hideLabel?: BreakpointCustomizable<boolean>;
|
|
28
32
|
/**
|
|
@@ -64,7 +68,7 @@ export type PButtonPureProps = BaseProps & {
|
|
|
64
68
|
};
|
|
65
69
|
export declare const PButtonPure: import("react").ForwardRefExoticComponent<Omit<import("react").DOMAttributes<{}>, "onChange" | "onInput" | "onToggle"> & Pick<import("react").HTMLAttributes<{}>, "suppressHydrationWarning" | "autoFocus" | "className" | "dir" | "hidden" | "id" | "inert" | "lang" | "slot" | "style" | "tabIndex" | "title" | "translate" | "role"> & {
|
|
66
70
|
/**
|
|
67
|
-
*
|
|
71
|
+
* Displays the button in its active state.
|
|
68
72
|
*/
|
|
69
73
|
active?: boolean;
|
|
70
74
|
/**
|
|
@@ -72,9 +76,13 @@ export declare const PButtonPure: import("react").ForwardRefExoticComponent<Omit
|
|
|
72
76
|
*/
|
|
73
77
|
alignLabel?: BreakpointCustomizable<ButtonPureAlignLabel>;
|
|
74
78
|
/**
|
|
75
|
-
*
|
|
79
|
+
* Sets ARIA attributes.
|
|
76
80
|
*/
|
|
77
81
|
aria?: SelectedAriaAttributes<ButtonPureAriaAttribute>;
|
|
82
|
+
/**
|
|
83
|
+
* The color.
|
|
84
|
+
*/
|
|
85
|
+
color?: ButtonPureColor;
|
|
78
86
|
/**
|
|
79
87
|
* Disables the button. No events will be triggered while disabled state is active.
|
|
80
88
|
*/
|
|
@@ -84,7 +92,7 @@ export declare const PButtonPure: import("react").ForwardRefExoticComponent<Omit
|
|
|
84
92
|
*/
|
|
85
93
|
form?: string;
|
|
86
94
|
/**
|
|
87
|
-
*
|
|
95
|
+
* Shows or hides the label. For better accessibility, it is recommended to show the label.
|
|
88
96
|
*/
|
|
89
97
|
hideLabel?: BreakpointCustomizable<boolean>;
|
|
90
98
|
/**
|
|
@@ -6,7 +6,7 @@ export type PButtonTileProps = BaseProps & {
|
|
|
6
6
|
*/
|
|
7
7
|
align?: ButtonTileAlign;
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* Sets ARIA attributes.
|
|
10
10
|
*/
|
|
11
11
|
aria?: SelectedAriaAttributes<ButtonTileAriaAttribute>;
|
|
12
12
|
/**
|
|
@@ -64,7 +64,7 @@ export declare const PButtonTile: import("react").ForwardRefExoticComponent<Omit
|
|
|
64
64
|
*/
|
|
65
65
|
align?: ButtonTileAlign;
|
|
66
66
|
/**
|
|
67
|
-
*
|
|
67
|
+
* Sets ARIA attributes.
|
|
68
68
|
*/
|
|
69
69
|
aria?: SelectedAriaAttributes<ButtonTileAriaAttribute>;
|
|
70
70
|
/**
|
|
@@ -2,11 +2,11 @@ import type { BaseProps } from '../../BaseProps';
|
|
|
2
2
|
import type { SelectedAriaAttributes, ButtonAriaAttribute, BreakpointCustomizable, ButtonIcon, ButtonType, ButtonVariant } from '../types';
|
|
3
3
|
export type PButtonProps = BaseProps & {
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Sets ARIA attributes.
|
|
6
6
|
*/
|
|
7
7
|
aria?: SelectedAriaAttributes<ButtonAriaAttribute>;
|
|
8
8
|
/**
|
|
9
|
-
* Displays
|
|
9
|
+
* Displays the button in compact mode.
|
|
10
10
|
*/
|
|
11
11
|
compact?: BreakpointCustomizable<boolean>;
|
|
12
12
|
/**
|
|
@@ -18,7 +18,7 @@ export type PButtonProps = BaseProps & {
|
|
|
18
18
|
*/
|
|
19
19
|
form?: string;
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
21
|
+
* Shows or hides the label. For better accessibility, it is recommended to show the label.
|
|
22
22
|
*/
|
|
23
23
|
hideLabel?: BreakpointCustomizable<boolean>;
|
|
24
24
|
/**
|
|
@@ -52,11 +52,11 @@ export type PButtonProps = BaseProps & {
|
|
|
52
52
|
};
|
|
53
53
|
export declare const PButton: import("react").ForwardRefExoticComponent<Omit<import("react").DOMAttributes<{}>, "onChange" | "onInput" | "onToggle"> & Pick<import("react").HTMLAttributes<{}>, "suppressHydrationWarning" | "autoFocus" | "className" | "dir" | "hidden" | "id" | "inert" | "lang" | "slot" | "style" | "tabIndex" | "title" | "translate" | "role"> & {
|
|
54
54
|
/**
|
|
55
|
-
*
|
|
55
|
+
* Sets ARIA attributes.
|
|
56
56
|
*/
|
|
57
57
|
aria?: SelectedAriaAttributes<ButtonAriaAttribute>;
|
|
58
58
|
/**
|
|
59
|
-
* Displays
|
|
59
|
+
* Displays the button in compact mode.
|
|
60
60
|
*/
|
|
61
61
|
compact?: BreakpointCustomizable<boolean>;
|
|
62
62
|
/**
|
|
@@ -68,7 +68,7 @@ export declare const PButton: import("react").ForwardRefExoticComponent<Omit<imp
|
|
|
68
68
|
*/
|
|
69
69
|
form?: string;
|
|
70
70
|
/**
|
|
71
|
-
*
|
|
71
|
+
* Shows or hides the label. For better accessibility, it is recommended to show the label.
|
|
72
72
|
*/
|
|
73
73
|
hideLabel?: BreakpointCustomizable<boolean>;
|
|
74
74
|
/**
|