@porsche-design-system/components-react 3.15.0-rc.1 → 3.15.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 +34 -3
- package/cjs/lib/components/accordion.wrapper.cjs +3 -3
- package/cjs/lib/components/banner.wrapper.cjs +3 -3
- package/cjs/lib/components/inline-notification.wrapper.cjs +3 -3
- package/esm/lib/components/accordion.wrapper.d.ts +19 -3
- package/esm/lib/components/accordion.wrapper.mjs +3 -3
- package/esm/lib/components/banner.wrapper.d.ts +9 -1
- package/esm/lib/components/banner.wrapper.mjs +3 -3
- package/esm/lib/components/display.wrapper.d.ts +2 -2
- package/esm/lib/components/heading.wrapper.d.ts +2 -2
- package/esm/lib/components/inline-notification.wrapper.d.ts +9 -1
- package/esm/lib/components/inline-notification.wrapper.mjs +3 -3
- package/esm/lib/components/link-tile-model-signature.wrapper.d.ts +2 -2
- package/esm/lib/types.d.ts +24 -20
- package/package.json +2 -2
- package/ssr/cjs/components/dist/styles/esm/styles-entry.cjs +42 -38
- package/ssr/cjs/components/dist/utils/esm/utils-entry.cjs +2 -2
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/accordion.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/banner.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/inline-notification.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/accordion.cjs +2 -2
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/banner.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/inline-notification.cjs +3 -1
- package/ssr/esm/components/dist/styles/esm/styles-entry.mjs +42 -38
- package/ssr/esm/components/dist/utils/esm/utils-entry.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/accordion.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/banner.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/inline-notification.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/accordion.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/banner.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/inline-notification.mjs +3 -1
- package/ssr/esm/lib/components/accordion.wrapper.d.ts +19 -3
- package/ssr/esm/lib/components/banner.wrapper.d.ts +9 -1
- package/ssr/esm/lib/components/display.wrapper.d.ts +2 -2
- package/ssr/esm/lib/components/heading.wrapper.d.ts +2 -2
- package/ssr/esm/lib/components/inline-notification.wrapper.d.ts +9 -1
- package/ssr/esm/lib/components/link-tile-model-signature.wrapper.d.ts +2 -2
- package/ssr/esm/lib/types.d.ts +24 -20
package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/banner.wrapper.cjs
CHANGED
|
@@ -7,14 +7,14 @@ var hooks = require('../../hooks.cjs');
|
|
|
7
7
|
var utils = require('../../utils.cjs');
|
|
8
8
|
var banner = require('../dsr-components/banner.cjs');
|
|
9
9
|
|
|
10
|
-
const PBanner = react.forwardRef(({ description = '', dismissButton = true, heading = '', onDismiss, open = false, persistent, state = 'info', theme, width, className, children, ...rest }, ref) => {
|
|
10
|
+
const PBanner = react.forwardRef(({ description = '', dismissButton = true, heading = '', headingTag = 'h5', onDismiss, open = false, persistent, state = 'info', theme, width, className, children, ...rest }, ref) => {
|
|
11
11
|
const elementRef = react.useRef();
|
|
12
12
|
hooks.useEventCallback(elementRef, 'dismiss', onDismiss);
|
|
13
13
|
const WebComponentTag = hooks.usePrefix('p-banner');
|
|
14
|
-
const propsToSync = [description, dismissButton, heading, open, persistent, state, theme || hooks.useTheme(), width];
|
|
14
|
+
const propsToSync = [description, dismissButton, heading, headingTag, open, persistent, state, theme || hooks.useTheme(), width];
|
|
15
15
|
hooks.useBrowserLayoutEffect(() => {
|
|
16
16
|
const { current } = elementRef;
|
|
17
|
-
['description', 'dismissButton', 'heading', 'open', 'persistent', 'state', 'theme', 'width'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
17
|
+
['description', 'dismissButton', 'heading', 'headingTag', 'open', 'persistent', 'state', 'theme', 'width'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
18
18
|
}, propsToSync);
|
|
19
19
|
// @ts-ignore
|
|
20
20
|
if (!process.browser) {
|
|
@@ -25,7 +25,7 @@ const PBanner = react.forwardRef(({ description = '', dismissButton = true, head
|
|
|
25
25
|
// @ts-ignore
|
|
26
26
|
...(!process.browser
|
|
27
27
|
? {
|
|
28
|
-
children: (jsxRuntime.jsx(banner.DSRBanner, { description, dismissButton, heading, open, persistent, state, theme: theme || hooks.useTheme(), width, children })),
|
|
28
|
+
children: (jsxRuntime.jsx(banner.DSRBanner, { description, dismissButton, heading, headingTag, open, persistent, state, theme: theme || hooks.useTheme(), width, children })),
|
|
29
29
|
}
|
|
30
30
|
: {
|
|
31
31
|
children,
|
|
@@ -7,15 +7,15 @@ var hooks = require('../../hooks.cjs');
|
|
|
7
7
|
var utils = require('../../utils.cjs');
|
|
8
8
|
var inlineNotification = require('../dsr-components/inline-notification.cjs');
|
|
9
9
|
|
|
10
|
-
const PInlineNotification = react.forwardRef(({ actionIcon = 'arrow-right', actionLabel, actionLoading = false, description = '', dismissButton = true, heading = '', onAction, onDismiss, persistent, state = 'info', theme, className, children, ...rest }, ref) => {
|
|
10
|
+
const PInlineNotification = react.forwardRef(({ actionIcon = 'arrow-right', actionLabel, actionLoading = false, description = '', dismissButton = true, heading = '', headingTag = 'h5', onAction, onDismiss, persistent, state = 'info', theme, className, children, ...rest }, ref) => {
|
|
11
11
|
const elementRef = react.useRef();
|
|
12
12
|
hooks.useEventCallback(elementRef, 'action', onAction);
|
|
13
13
|
hooks.useEventCallback(elementRef, 'dismiss', onDismiss);
|
|
14
14
|
const WebComponentTag = hooks.usePrefix('p-inline-notification');
|
|
15
|
-
const propsToSync = [actionIcon, actionLabel, actionLoading, description, dismissButton, heading, persistent, state, theme || hooks.useTheme()];
|
|
15
|
+
const propsToSync = [actionIcon, actionLabel, actionLoading, description, dismissButton, heading, headingTag, persistent, state, theme || hooks.useTheme()];
|
|
16
16
|
hooks.useBrowserLayoutEffect(() => {
|
|
17
17
|
const { current } = elementRef;
|
|
18
|
-
['actionIcon', 'actionLabel', 'actionLoading', 'description', 'dismissButton', 'heading', 'persistent', 'state', 'theme'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
18
|
+
['actionIcon', 'actionLabel', 'actionLoading', 'description', 'dismissButton', 'heading', 'headingTag', 'persistent', 'state', 'theme'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
19
19
|
}, propsToSync);
|
|
20
20
|
// @ts-ignore
|
|
21
21
|
if (!process.browser) {
|
|
@@ -26,7 +26,7 @@ const PInlineNotification = react.forwardRef(({ actionIcon = 'arrow-right', acti
|
|
|
26
26
|
// @ts-ignore
|
|
27
27
|
...(!process.browser
|
|
28
28
|
? {
|
|
29
|
-
children: (jsxRuntime.jsx(inlineNotification.DSRInlineNotification, { actionIcon, actionLabel, actionLoading, description, dismissButton, heading, persistent, state, theme: theme || hooks.useTheme(), children })),
|
|
29
|
+
children: (jsxRuntime.jsx(inlineNotification.DSRInlineNotification, { actionIcon, actionLabel, actionLoading, description, dismissButton, heading, headingTag, persistent, state, theme: theme || hooks.useTheme(), children })),
|
|
30
30
|
}
|
|
31
31
|
: {
|
|
32
32
|
children,
|
package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/accordion.cjs
CHANGED
|
@@ -82,8 +82,8 @@ class DSRAccordion extends react.Component {
|
|
|
82
82
|
splitChildren.splitChildren(this.props.children);
|
|
83
83
|
const buttonId = 'accordion-control';
|
|
84
84
|
const contentId = 'accordion-panel';
|
|
85
|
-
const Heading = this.props.tag;
|
|
86
|
-
const style = minifyCss.minifyCss(stripFocusAndHoverStyles.stripFocusAndHoverStyles(stylesEntry.getAccordionCss(this.props.size, this.props.compact, this.props.open, this.props.theme)));
|
|
85
|
+
const Heading = this.props.tag || this.props.headingTag;
|
|
86
|
+
const style = minifyCss.minifyCss(stripFocusAndHoverStyles.stripFocusAndHoverStyles(stylesEntry.getAccordionCss(this.props.size, this.props.compact, this.props.open, this.props.theme, this.props.sticky)));
|
|
87
87
|
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Heading, { className: "heading", children: jsxRuntime.jsxs("button", { id: buttonId, type: "button", "aria-expanded": this.props.open ? 'true' : 'false', "aria-controls": contentId, children: [this.props.heading || jsxRuntime.jsx("slot", { name: "heading" }), jsxRuntime.jsx("span", { className: "icon-container", children: jsxRuntime.jsx(icon_wrapper.PIcon, { className: "icon", name: this.props.open ? 'minus' : 'plus', theme: this.props.theme, size: "xx-small", "aria-hidden": "true" }) })] }) }), jsxRuntime.jsx("div", { id: contentId, className: "collapsible", role: "region", "aria-labelledby": buttonId, children: jsxRuntime.jsx("div", { children: jsxRuntime.jsx("slot", {}) }) })] })] }), this.props.children] }));
|
|
88
88
|
}
|
|
89
89
|
}
|
package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/banner.cjs
CHANGED
|
@@ -87,7 +87,7 @@ class DSRBanner extends react.Component {
|
|
|
87
87
|
const { children, namedSlotChildren, otherChildren } = splitChildren.splitChildren(this.props.children);
|
|
88
88
|
const hasTitleSlot = namedSlotChildren.filter(({ props: { slot } }) => slot === 'title').length > 0;
|
|
89
89
|
const style = minifyCss.minifyCss(stripFocusAndHoverStyles.stripFocusAndHoverStyles(stylesEntry.getBannerCss(this.props.open)));
|
|
90
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsxs(inlineNotification_wrapper.PInlineNotification, { heading: this.props.heading, description: this.props.description, state: this.props.state, dismissButton: this.hasDismissButton, theme: this.props.theme, "aria-hidden": !this.props.open ? 'true' : 'false', children: [namedSlotChildren.filter(({ props: { slot } }) => slot === 'heading').length > 0 ? (jsxRuntime.jsx("slot", { name: "heading", slot: "heading" })) : (hasTitleSlot && jsxRuntime.jsx("slot", { name: "title", slot: "heading" })), namedSlotChildren.filter(({ props: { slot } }) => slot === 'description').length > 0 && jsxRuntime.jsx("slot", { name: "description" })] })] }), this.props.children] }));
|
|
90
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsxs(inlineNotification_wrapper.PInlineNotification, { heading: this.props.heading, headingTag: this.props.headingTag, description: this.props.description, state: this.props.state, dismissButton: this.hasDismissButton, theme: this.props.theme, "aria-hidden": !this.props.open ? 'true' : 'false', children: [namedSlotChildren.filter(({ props: { slot } }) => slot === 'heading').length > 0 ? (jsxRuntime.jsx("slot", { name: "heading", slot: "heading" })) : (hasTitleSlot && jsxRuntime.jsx("slot", { name: "title", slot: "heading" })), namedSlotChildren.filter(({ props: { slot } }) => slot === 'description').length > 0 && jsxRuntime.jsx("slot", { name: "description" })] })] }), this.props.children] }));
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
|
|
@@ -87,8 +87,10 @@ class DSRInlineNotification extends react.Component {
|
|
|
87
87
|
const bannerId = 'banner';
|
|
88
88
|
const labelId = 'label';
|
|
89
89
|
const descriptionId = 'description';
|
|
90
|
+
const Heading = this.props.headingTag;
|
|
90
91
|
const style = minifyCss.minifyCss(stripFocusAndHoverStyles.stripFocusAndHoverStyles(stylesEntry.getInlineNotificationCss(this.props.state, !!this.props.actionLabel, this.hasDismissButton, this.props.theme)));
|
|
91
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(icon_wrapper.PIcon, { className: "icon", name: utilsEntry.getInlineNotificationIconName(this.props.state), color: `notification-${this.props.state}`, theme: this.props.theme, "aria-hidden": "true" }), jsxRuntime.jsxs("div", { id: bannerId, className: "content", ...utilsEntry.getContentAriaAttributes(this.props.state, labelId, descriptionId), children: [(this.props.heading || namedSlotChildren.filter(({ props: { slot } }) => slot === 'heading').length > 0) &&
|
|
92
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(icon_wrapper.PIcon, { className: "icon", name: utilsEntry.getInlineNotificationIconName(this.props.state), color: `notification-${this.props.state}`, theme: this.props.theme, "aria-hidden": "true" }), jsxRuntime.jsxs("div", { id: bannerId, className: "content", ...utilsEntry.getContentAriaAttributes(this.props.state, labelId, descriptionId), children: [(this.props.heading || namedSlotChildren.filter(({ props: { slot } }) => slot === 'heading').length > 0) &&
|
|
93
|
+
(this.props.heading ? (jsxRuntime.jsx(Heading, { id: labelId, className: "heading", children: this.props.heading })) : (jsxRuntime.jsx("slot", { name: "heading" }))), jsxRuntime.jsx("p", { id: descriptionId, className: "description", children: this.props.description || jsxRuntime.jsx("slot", {}) })] }), this.props.actionLabel && (jsxRuntime.jsx(buttonPure_wrapper.PButtonPure, { className: "action", theme: this.props.theme, icon: this.props.actionIcon, loading: this.props.actionLoading, children: this.props.actionLabel })), this.hasDismissButton && (jsxRuntime.jsx(buttonPure_wrapper.PButtonPure, { className: "close", type: "button", icon: "close", theme: this.props.theme, hideLabel: true, "aria-controls": bannerId, children: "Close notification" }))] })] }), this.props.children] }));
|
|
92
94
|
}
|
|
93
95
|
}
|
|
94
96
|
|
|
@@ -4064,6 +4064,8 @@ const isThemeDark = (theme) => {
|
|
|
4064
4064
|
return theme === 'dark';
|
|
4065
4065
|
};
|
|
4066
4066
|
|
|
4067
|
+
const HEADING_TAGS = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
|
|
4068
|
+
|
|
4067
4069
|
const headerSlot = 'header';
|
|
4068
4070
|
const anchorSlot = 'anchor';
|
|
4069
4071
|
|
|
@@ -4077,11 +4079,11 @@ const formatObjectOutput = (value) => {
|
|
|
4077
4079
|
'value, ' +
|
|
4078
4080
|
formatObjectOutput(breakpoints.reduce((prev, key) => ({ ...prev, [key + (key !== 'base' ? '?' : '')]: 'value' }), {})).replace(/"/g, '');
|
|
4079
4081
|
|
|
4080
|
-
const
|
|
4081
|
-
|
|
4082
|
-
const
|
|
4083
|
-
const
|
|
4084
|
-
const
|
|
4082
|
+
const getComponentCss$15 = (size, compact, open, theme, sticky) => {
|
|
4083
|
+
const { primaryColor, hoverColor, contrastLowColor, backgroundColor } = getThemedColors(theme);
|
|
4084
|
+
const { primaryColor: primaryColorDark, hoverColor: hoverColorDark, contrastLowColor: contrastLowColorDark, backgroundColor: backgroundColorDark, } = getThemedColors('dark');
|
|
4085
|
+
const cssVariablePositionStickyTop = '--p-accordion-position-sticky-top';
|
|
4086
|
+
const positionStickyTopFallback = '0';
|
|
4085
4087
|
return getCss({
|
|
4086
4088
|
'@global': {
|
|
4087
4089
|
':host': {
|
|
@@ -4157,6 +4159,15 @@ const getComponentCss$15 = (size, compact, open, theme) => {
|
|
|
4157
4159
|
},
|
|
4158
4160
|
heading: {
|
|
4159
4161
|
margin: 0,
|
|
4162
|
+
...(sticky && {
|
|
4163
|
+
position: 'sticky',
|
|
4164
|
+
top: `var(${cssVariablePositionStickyTop}, ${positionStickyTopFallback})`,
|
|
4165
|
+
zIndex: 1, // to be on top of the collapsible
|
|
4166
|
+
backgroundColor,
|
|
4167
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
4168
|
+
backgroundColor: backgroundColorDark,
|
|
4169
|
+
}),
|
|
4170
|
+
}),
|
|
4160
4171
|
},
|
|
4161
4172
|
'icon-container': {
|
|
4162
4173
|
height: fontLineHeight,
|
|
@@ -4178,6 +4189,10 @@ const getComponentCss$15 = (size, compact, open, theme) => {
|
|
|
4178
4189
|
color: primaryColorDark,
|
|
4179
4190
|
}),
|
|
4180
4191
|
display: 'grid',
|
|
4192
|
+
...(sticky && {
|
|
4193
|
+
position: 'relative',
|
|
4194
|
+
zIndex: 0, // to be below the heading
|
|
4195
|
+
}),
|
|
4181
4196
|
...(open
|
|
4182
4197
|
? {
|
|
4183
4198
|
gridTemplateRows: '1fr',
|
|
@@ -5443,21 +5458,7 @@ ellipsis, theme) => {
|
|
|
5443
5458
|
};
|
|
5444
5459
|
const getTypographySlottedJssStyle = () => {
|
|
5445
5460
|
return {
|
|
5446
|
-
|
|
5447
|
-
padding: 'inherit',
|
|
5448
|
-
fontFamily: 'inherit',
|
|
5449
|
-
fontWeight: 'inherit',
|
|
5450
|
-
fontSize: 'inherit',
|
|
5451
|
-
lineHeight: 'inherit',
|
|
5452
|
-
fontStyle: 'inherit',
|
|
5453
|
-
fontVariant: 'inherit',
|
|
5454
|
-
color: 'inherit',
|
|
5455
|
-
textAlign: 'inherit',
|
|
5456
|
-
overflowWrap: 'inherit',
|
|
5457
|
-
wordWrap: 'inherit',
|
|
5458
|
-
hyphens: 'inherit',
|
|
5459
|
-
whiteSpace: 'inherit',
|
|
5460
|
-
letterSpacing: 'inherit',
|
|
5461
|
+
all: 'unset',
|
|
5461
5462
|
};
|
|
5462
5463
|
};
|
|
5463
5464
|
|
|
@@ -5476,9 +5477,7 @@ const getComponentCss$X = (size, align, color, ellipsis, theme) => {
|
|
|
5476
5477
|
...hostHiddenStyles,
|
|
5477
5478
|
}),
|
|
5478
5479
|
},
|
|
5479
|
-
|
|
5480
|
-
[DISPLAY_TAGS.map((i) => `&(${i})`).join()]: addImportantToEachRule(getTypographySlottedJssStyle()),
|
|
5481
|
-
},
|
|
5480
|
+
[`::slotted(:is(${DISPLAY_TAGS.join()}))`]: addImportantToEachRule(getTypographySlottedJssStyle()),
|
|
5482
5481
|
},
|
|
5483
5482
|
root: getTypographyRootJssStyle(displayLargeStyle, buildResponsiveStyles(size, (sizeValue) => ({
|
|
5484
5483
|
fontSize: sizeValue === 'inherit' ? sizeValue : sizeMap$4[sizeValue],
|
|
@@ -6193,9 +6192,7 @@ const getComponentCss$M = (size, align, color, ellipsis, theme) => {
|
|
|
6193
6192
|
...hostHiddenStyles,
|
|
6194
6193
|
}),
|
|
6195
6194
|
},
|
|
6196
|
-
|
|
6197
|
-
[HEADING_TAGS.map((i) => `&(${i})`).join()]: addImportantToEachRule(getTypographySlottedJssStyle()),
|
|
6198
|
-
},
|
|
6195
|
+
[`::slotted(:is(${HEADING_TAGS.join()}))`]: addImportantToEachRule(getTypographySlottedJssStyle()),
|
|
6199
6196
|
},
|
|
6200
6197
|
root: getTypographyRootJssStyle(headingXXLargeStyle, buildResponsiveStyles(size, (sizeValue) => ({
|
|
6201
6198
|
fontSize: sizeValue === 'inherit' ? sizeValue : sizeMap$3[sizeValue],
|
|
@@ -6459,6 +6456,17 @@ const getNotificationContentJssStyle = () => ({
|
|
|
6459
6456
|
});
|
|
6460
6457
|
|
|
6461
6458
|
const mediaQueryMaxS$1 = getMediaQueryMax('s');
|
|
6459
|
+
const getTextJssStyle = (theme) => ({
|
|
6460
|
+
margin: 0,
|
|
6461
|
+
color: getThemedColors(theme).primaryColor,
|
|
6462
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6463
|
+
color: getThemedColors('dark').primaryColor,
|
|
6464
|
+
}),
|
|
6465
|
+
});
|
|
6466
|
+
const getHeadingJssStyle = (theme) => ({
|
|
6467
|
+
...headingSmallStyle,
|
|
6468
|
+
...getTextJssStyle(theme),
|
|
6469
|
+
});
|
|
6462
6470
|
const getComponentCss$J = (state, hasAction, hasClose, theme) => {
|
|
6463
6471
|
return getCss({
|
|
6464
6472
|
'@global': {
|
|
@@ -6470,15 +6478,13 @@ const getComponentCss$J = (state, hasAction, hasClose, theme) => {
|
|
|
6470
6478
|
...hostHiddenStyles,
|
|
6471
6479
|
}),
|
|
6472
6480
|
},
|
|
6473
|
-
|
|
6474
|
-
|
|
6475
|
-
|
|
6476
|
-
|
|
6477
|
-
|
|
6478
|
-
|
|
6479
|
-
|
|
6480
|
-
}),
|
|
6481
|
-
},
|
|
6481
|
+
[`::slotted(:is(${HEADING_TAGS.join()}))`]: addImportantToEachRule(getTypographySlottedJssStyle()),
|
|
6482
|
+
'slot[name="heading"]': getHeadingJssStyle(theme),
|
|
6483
|
+
},
|
|
6484
|
+
heading: getHeadingJssStyle(theme),
|
|
6485
|
+
description: {
|
|
6486
|
+
...textSmallStyle,
|
|
6487
|
+
...getTextJssStyle(theme),
|
|
6482
6488
|
},
|
|
6483
6489
|
icon: getNotificationIconJssStyle(),
|
|
6484
6490
|
content: getNotificationContentJssStyle(),
|
|
@@ -10076,9 +10082,7 @@ const getComponentCss$4 = (size, weight, align, color, ellipsis, theme) => {
|
|
|
10076
10082
|
...hostHiddenStyles,
|
|
10077
10083
|
}),
|
|
10078
10084
|
},
|
|
10079
|
-
|
|
10080
|
-
[TEXT_TAGS.map((i) => `&(${i})`).join()]: addImportantToEachRule(getTypographySlottedJssStyle()),
|
|
10081
|
-
},
|
|
10085
|
+
[`::slotted(:is(${TEXT_TAGS.join()}))`]: addImportantToEachRule(getTypographySlottedJssStyle()),
|
|
10082
10086
|
},
|
|
10083
10087
|
root: getTypographyRootJssStyle(textSmallStyle, buildResponsiveStyles(size, (sizeValue) => ({
|
|
10084
10088
|
fontSize: sizeValue === 'inherit' ? sizeValue : sizeMap[sizeValue],
|
|
@@ -3594,6 +3594,8 @@ const hasDocument = typeof document !== 'undefined';
|
|
|
3594
3594
|
const isThemeDark = (theme) => {
|
|
3595
3595
|
return theme === 'dark';
|
|
3596
3596
|
};
|
|
3597
|
+
|
|
3598
|
+
const HEADING_TAGS = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
|
|
3597
3599
|
const headerSlot = 'header';
|
|
3598
3600
|
const anchorSlot = 'anchor';
|
|
3599
3601
|
|
|
@@ -3606,8 +3608,6 @@ const formatObjectOutput = (value) => {
|
|
|
3606
3608
|
};
|
|
3607
3609
|
'value, ' +
|
|
3608
3610
|
formatObjectOutput(breakpoints.reduce((prev, key) => ({ ...prev, [key + (key !== 'base' ? '?' : '')]: 'value' }), {})).replace(/"/g, '');
|
|
3609
|
-
|
|
3610
|
-
const HEADING_TAGS = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
|
|
3611
3611
|
const getButtonPureAriaAttributes = (isDisabled, isLoading, aria) => {
|
|
3612
3612
|
return {
|
|
3613
3613
|
...parseAndGetAriaAttributes(aria),
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/accordion.wrapper.mjs
CHANGED
|
@@ -5,15 +5,15 @@ import { useEventCallback, usePrefix, useTheme, useBrowserLayoutEffect, useMerge
|
|
|
5
5
|
import { syncRef } from '../../utils.mjs';
|
|
6
6
|
import { DSRAccordion } from '../dsr-components/accordion.mjs';
|
|
7
7
|
|
|
8
|
-
const PAccordion = forwardRef(({ compact, heading, onAccordionChange, onUpdate, open, size = 'small', tag
|
|
8
|
+
const PAccordion = forwardRef(({ compact, heading, headingTag = 'h2', onAccordionChange, onUpdate, open, size = 'small', sticky, tag, theme, className, children, ...rest }, ref) => {
|
|
9
9
|
const elementRef = useRef();
|
|
10
10
|
useEventCallback(elementRef, 'accordionChange', onAccordionChange);
|
|
11
11
|
useEventCallback(elementRef, 'update', onUpdate);
|
|
12
12
|
const WebComponentTag = usePrefix('p-accordion');
|
|
13
|
-
const propsToSync = [compact, heading, open, size, tag, theme || useTheme()];
|
|
13
|
+
const propsToSync = [compact, heading, headingTag, open, size, sticky, tag, theme || useTheme()];
|
|
14
14
|
useBrowserLayoutEffect(() => {
|
|
15
15
|
const { current } = elementRef;
|
|
16
|
-
['compact', 'heading', 'open', 'size', 'tag', 'theme'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
16
|
+
['compact', 'heading', 'headingTag', 'open', 'size', 'sticky', 'tag', 'theme'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
17
17
|
}, propsToSync);
|
|
18
18
|
// @ts-ignore
|
|
19
19
|
if (!process.browser) {
|
|
@@ -24,7 +24,7 @@ const PAccordion = forwardRef(({ compact, heading, onAccordionChange, onUpdate,
|
|
|
24
24
|
// @ts-ignore
|
|
25
25
|
...(!process.browser
|
|
26
26
|
? {
|
|
27
|
-
children: (jsx(DSRAccordion, { compact, heading, open, size, tag, theme: theme || useTheme(), children })),
|
|
27
|
+
children: (jsx(DSRAccordion, { compact, heading, headingTag, open, size, sticky, tag, theme: theme || useTheme(), children })),
|
|
28
28
|
}
|
|
29
29
|
: {
|
|
30
30
|
children,
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/banner.wrapper.mjs
CHANGED
|
@@ -5,14 +5,14 @@ import { useEventCallback, usePrefix, useTheme, useBrowserLayoutEffect, useMerge
|
|
|
5
5
|
import { syncRef } from '../../utils.mjs';
|
|
6
6
|
import { DSRBanner } from '../dsr-components/banner.mjs';
|
|
7
7
|
|
|
8
|
-
const PBanner = forwardRef(({ description = '', dismissButton = true, heading = '', onDismiss, open = false, persistent, state = 'info', theme, width, className, children, ...rest }, ref) => {
|
|
8
|
+
const PBanner = forwardRef(({ description = '', dismissButton = true, heading = '', headingTag = 'h5', onDismiss, open = false, persistent, state = 'info', theme, width, className, children, ...rest }, ref) => {
|
|
9
9
|
const elementRef = useRef();
|
|
10
10
|
useEventCallback(elementRef, 'dismiss', onDismiss);
|
|
11
11
|
const WebComponentTag = usePrefix('p-banner');
|
|
12
|
-
const propsToSync = [description, dismissButton, heading, open, persistent, state, theme || useTheme(), width];
|
|
12
|
+
const propsToSync = [description, dismissButton, heading, headingTag, open, persistent, state, theme || useTheme(), width];
|
|
13
13
|
useBrowserLayoutEffect(() => {
|
|
14
14
|
const { current } = elementRef;
|
|
15
|
-
['description', 'dismissButton', 'heading', 'open', 'persistent', 'state', 'theme', 'width'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
15
|
+
['description', 'dismissButton', 'heading', 'headingTag', 'open', 'persistent', 'state', 'theme', 'width'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
16
16
|
}, propsToSync);
|
|
17
17
|
// @ts-ignore
|
|
18
18
|
if (!process.browser) {
|
|
@@ -23,7 +23,7 @@ const PBanner = forwardRef(({ description = '', dismissButton = true, heading =
|
|
|
23
23
|
// @ts-ignore
|
|
24
24
|
...(!process.browser
|
|
25
25
|
? {
|
|
26
|
-
children: (jsx(DSRBanner, { description, dismissButton, heading, open, persistent, state, theme: theme || useTheme(), width, children })),
|
|
26
|
+
children: (jsx(DSRBanner, { description, dismissButton, heading, headingTag, open, persistent, state, theme: theme || useTheme(), width, children })),
|
|
27
27
|
}
|
|
28
28
|
: {
|
|
29
29
|
children,
|
|
@@ -5,15 +5,15 @@ import { useEventCallback, usePrefix, useTheme, useBrowserLayoutEffect, useMerge
|
|
|
5
5
|
import { syncRef } from '../../utils.mjs';
|
|
6
6
|
import { DSRInlineNotification } from '../dsr-components/inline-notification.mjs';
|
|
7
7
|
|
|
8
|
-
const PInlineNotification = forwardRef(({ actionIcon = 'arrow-right', actionLabel, actionLoading = false, description = '', dismissButton = true, heading = '', onAction, onDismiss, persistent, state = 'info', theme, className, children, ...rest }, ref) => {
|
|
8
|
+
const PInlineNotification = forwardRef(({ actionIcon = 'arrow-right', actionLabel, actionLoading = false, description = '', dismissButton = true, heading = '', headingTag = 'h5', onAction, onDismiss, persistent, state = 'info', theme, className, children, ...rest }, ref) => {
|
|
9
9
|
const elementRef = useRef();
|
|
10
10
|
useEventCallback(elementRef, 'action', onAction);
|
|
11
11
|
useEventCallback(elementRef, 'dismiss', onDismiss);
|
|
12
12
|
const WebComponentTag = usePrefix('p-inline-notification');
|
|
13
|
-
const propsToSync = [actionIcon, actionLabel, actionLoading, description, dismissButton, heading, persistent, state, theme || useTheme()];
|
|
13
|
+
const propsToSync = [actionIcon, actionLabel, actionLoading, description, dismissButton, heading, headingTag, persistent, state, theme || useTheme()];
|
|
14
14
|
useBrowserLayoutEffect(() => {
|
|
15
15
|
const { current } = elementRef;
|
|
16
|
-
['actionIcon', 'actionLabel', 'actionLoading', 'description', 'dismissButton', 'heading', 'persistent', 'state', 'theme'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
16
|
+
['actionIcon', 'actionLabel', 'actionLoading', 'description', 'dismissButton', 'heading', 'headingTag', 'persistent', 'state', 'theme'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
17
17
|
}, propsToSync);
|
|
18
18
|
// @ts-ignore
|
|
19
19
|
if (!process.browser) {
|
|
@@ -24,7 +24,7 @@ const PInlineNotification = forwardRef(({ actionIcon = 'arrow-right', actionLabe
|
|
|
24
24
|
// @ts-ignore
|
|
25
25
|
...(!process.browser
|
|
26
26
|
? {
|
|
27
|
-
children: (jsx(DSRInlineNotification, { actionIcon, actionLabel, actionLoading, description, dismissButton, heading, persistent, state, theme: theme || useTheme(), children })),
|
|
27
|
+
children: (jsx(DSRInlineNotification, { actionIcon, actionLabel, actionLoading, description, dismissButton, heading, headingTag, persistent, state, theme: theme || useTheme(), children })),
|
|
28
28
|
}
|
|
29
29
|
: {
|
|
30
30
|
children,
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/accordion.mjs
CHANGED
|
@@ -80,8 +80,8 @@ class DSRAccordion extends Component {
|
|
|
80
80
|
splitChildren(this.props.children);
|
|
81
81
|
const buttonId = 'accordion-control';
|
|
82
82
|
const contentId = 'accordion-panel';
|
|
83
|
-
const Heading = this.props.tag;
|
|
84
|
-
const style = minifyCss(stripFocusAndHoverStyles(getComponentCss$15(this.props.size, this.props.compact, this.props.open, this.props.theme)));
|
|
83
|
+
const Heading = this.props.tag || this.props.headingTag;
|
|
84
|
+
const style = minifyCss(stripFocusAndHoverStyles(getComponentCss$15(this.props.size, this.props.compact, this.props.open, this.props.theme, this.props.sticky)));
|
|
85
85
|
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] }));
|
|
86
86
|
}
|
|
87
87
|
}
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/banner.mjs
CHANGED
|
@@ -85,7 +85,7 @@ class DSRBanner extends Component {
|
|
|
85
85
|
const { children, namedSlotChildren, otherChildren } = splitChildren(this.props.children);
|
|
86
86
|
const hasTitleSlot = namedSlotChildren.filter(({ props: { slot } }) => slot === 'title').length > 0;
|
|
87
87
|
const style = minifyCss(stripFocusAndHoverStyles(getComponentCss$14(this.props.open)));
|
|
88
|
-
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs(PInlineNotification, { heading: this.props.heading, description: this.props.description, state: this.props.state, dismissButton: this.hasDismissButton, theme: this.props.theme, "aria-hidden": !this.props.open ? 'true' : 'false', children: [namedSlotChildren.filter(({ props: { slot } }) => slot === 'heading').length > 0 ? (jsx("slot", { name: "heading", slot: "heading" })) : (hasTitleSlot && jsx("slot", { name: "title", slot: "heading" })), namedSlotChildren.filter(({ props: { slot } }) => slot === 'description').length > 0 && jsx("slot", { name: "description" })] })] }), this.props.children] }));
|
|
88
|
+
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs(PInlineNotification, { heading: this.props.heading, headingTag: this.props.headingTag, description: this.props.description, state: this.props.state, dismissButton: this.hasDismissButton, theme: this.props.theme, "aria-hidden": !this.props.open ? 'true' : 'false', children: [namedSlotChildren.filter(({ props: { slot } }) => slot === 'heading').length > 0 ? (jsx("slot", { name: "heading", slot: "heading" })) : (hasTitleSlot && jsx("slot", { name: "title", slot: "heading" })), namedSlotChildren.filter(({ props: { slot } }) => slot === 'description').length > 0 && jsx("slot", { name: "description" })] })] }), this.props.children] }));
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
|
|
@@ -85,8 +85,10 @@ class DSRInlineNotification extends Component {
|
|
|
85
85
|
const bannerId = 'banner';
|
|
86
86
|
const labelId = 'label';
|
|
87
87
|
const descriptionId = 'description';
|
|
88
|
+
const Heading = this.props.headingTag;
|
|
88
89
|
const style = minifyCss(stripFocusAndHoverStyles(getComponentCss$J(this.props.state, !!this.props.actionLabel, this.hasDismissButton, this.props.theme)));
|
|
89
|
-
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs(Fragment, { children: [jsx(PIcon, { className: "icon", name: getInlineNotificationIconName(this.props.state), color: `notification-${this.props.state}`, theme: this.props.theme, "aria-hidden": "true" }), jsxs("div", { id: bannerId, className: "content", ...getContentAriaAttributes(this.props.state, labelId, descriptionId), children: [(this.props.heading || namedSlotChildren.filter(({ props: { slot } }) => slot === 'heading').length > 0) &&
|
|
90
|
+
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs(Fragment, { children: [jsx(PIcon, { className: "icon", name: getInlineNotificationIconName(this.props.state), color: `notification-${this.props.state}`, theme: this.props.theme, "aria-hidden": "true" }), jsxs("div", { id: bannerId, className: "content", ...getContentAriaAttributes(this.props.state, labelId, descriptionId), children: [(this.props.heading || namedSlotChildren.filter(({ props: { slot } }) => slot === 'heading').length > 0) &&
|
|
91
|
+
(this.props.heading ? (jsx(Heading, { id: labelId, className: "heading", children: this.props.heading })) : (jsx("slot", { name: "heading" }))), jsx("p", { id: descriptionId, className: "description", children: this.props.description || jsx("slot", {}) })] }), this.props.actionLabel && (jsx(PButtonPure, { className: "action", theme: this.props.theme, icon: this.props.actionIcon, loading: this.props.actionLoading, children: this.props.actionLabel })), this.hasDismissButton && (jsx(PButtonPure, { className: "close", type: "button", icon: "close", theme: this.props.theme, hideLabel: true, "aria-controls": bannerId, children: "Close notification" }))] })] }), this.props.children] }));
|
|
90
92
|
}
|
|
91
93
|
}
|
|
92
94
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type HTMLAttributes } from 'react';
|
|
2
|
-
import type { AccordionUpdateEventDetail, BreakpointCustomizable, AccordionSize, AccordionTag, Theme } from '../types';
|
|
2
|
+
import type { AccordionHeadingTag, AccordionUpdateEventDetail, BreakpointCustomizable, AccordionSize, AccordionTag, Theme } from '../types';
|
|
3
3
|
export type PAccordionProps = Omit<HTMLAttributes<{}>, 'color'> & {
|
|
4
4
|
/**
|
|
5
5
|
* Displays the Accordion as compact version with thinner border and smaller paddings.
|
|
@@ -9,6 +9,10 @@ export type PAccordionProps = Omit<HTMLAttributes<{}>, 'color'> & {
|
|
|
9
9
|
* Defines the heading used in accordion.
|
|
10
10
|
*/
|
|
11
11
|
heading?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Sets a heading tag, so it fits correctly within the outline of the page.
|
|
14
|
+
*/
|
|
15
|
+
headingTag?: AccordionHeadingTag;
|
|
12
16
|
/**
|
|
13
17
|
* @deprecated since v3.0.0, will be removed with next major release, use `update` event instead. Emitted when accordion state is changed.
|
|
14
18
|
*/
|
|
@@ -26,7 +30,11 @@ export type PAccordionProps = Omit<HTMLAttributes<{}>, 'color'> & {
|
|
|
26
30
|
*/
|
|
27
31
|
size?: BreakpointCustomizable<AccordionSize>;
|
|
28
32
|
/**
|
|
29
|
-
*
|
|
33
|
+
* @experimental Sticks the Accordion heading at the top, fixed while scrolling
|
|
34
|
+
*/
|
|
35
|
+
sticky?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* @deprecated , will be removed with next major release, use `heading-tag` instead. Sets a heading tag, so it fits correctly within the outline of the page.
|
|
30
38
|
*/
|
|
31
39
|
tag?: AccordionTag;
|
|
32
40
|
/**
|
|
@@ -43,6 +51,10 @@ export declare const PAccordion: import("react").ForwardRefExoticComponent<Omit<
|
|
|
43
51
|
* Defines the heading used in accordion.
|
|
44
52
|
*/
|
|
45
53
|
heading?: string;
|
|
54
|
+
/**
|
|
55
|
+
* Sets a heading tag, so it fits correctly within the outline of the page.
|
|
56
|
+
*/
|
|
57
|
+
headingTag?: AccordionHeadingTag;
|
|
46
58
|
/**
|
|
47
59
|
* @deprecated since v3.0.0, will be removed with next major release, use `update` event instead. Emitted when accordion state is changed.
|
|
48
60
|
*/
|
|
@@ -60,7 +72,11 @@ export declare const PAccordion: import("react").ForwardRefExoticComponent<Omit<
|
|
|
60
72
|
*/
|
|
61
73
|
size?: BreakpointCustomizable<AccordionSize>;
|
|
62
74
|
/**
|
|
63
|
-
*
|
|
75
|
+
* @experimental Sticks the Accordion heading at the top, fixed while scrolling
|
|
76
|
+
*/
|
|
77
|
+
sticky?: boolean;
|
|
78
|
+
/**
|
|
79
|
+
* @deprecated , will be removed with next major release, use `heading-tag` instead. Sets a heading tag, so it fits correctly within the outline of the page.
|
|
64
80
|
*/
|
|
65
81
|
tag?: AccordionTag;
|
|
66
82
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type HTMLAttributes } from 'react';
|
|
2
|
-
import type { BannerState, Theme, BannerWidth } from '../types';
|
|
2
|
+
import type { BannerHeadingTag, BannerState, Theme, BannerWidth } from '../types';
|
|
3
3
|
export type PBannerProps = Omit<HTMLAttributes<{}>, 'color'> & {
|
|
4
4
|
/**
|
|
5
5
|
* Description of the banner.
|
|
@@ -13,6 +13,10 @@ export type PBannerProps = Omit<HTMLAttributes<{}>, 'color'> & {
|
|
|
13
13
|
* Heading of the banner.
|
|
14
14
|
*/
|
|
15
15
|
heading?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Sets a heading tag, so it fits correctly within the outline of the page.
|
|
18
|
+
*/
|
|
19
|
+
headingTag?: BannerHeadingTag;
|
|
16
20
|
/**
|
|
17
21
|
* Emitted when the close button is clicked.
|
|
18
22
|
*/
|
|
@@ -52,6 +56,10 @@ export declare const PBanner: import("react").ForwardRefExoticComponent<Omit<HTM
|
|
|
52
56
|
* Heading of the banner.
|
|
53
57
|
*/
|
|
54
58
|
heading?: string;
|
|
59
|
+
/**
|
|
60
|
+
* Sets a heading tag, so it fits correctly within the outline of the page.
|
|
61
|
+
*/
|
|
62
|
+
headingTag?: BannerHeadingTag;
|
|
55
63
|
/**
|
|
56
64
|
* Emitted when the close button is clicked.
|
|
57
65
|
*/
|
|
@@ -18,7 +18,7 @@ export type PDisplayProps = Omit<HTMLAttributes<{}>, 'color'> & {
|
|
|
18
18
|
*/
|
|
19
19
|
size?: BreakpointCustomizable<DisplaySize>;
|
|
20
20
|
/**
|
|
21
|
-
* Sets a
|
|
21
|
+
* Sets a heading tag, so it fits correctly within the outline of the page.
|
|
22
22
|
*/
|
|
23
23
|
tag?: DisplayTag;
|
|
24
24
|
/**
|
|
@@ -44,7 +44,7 @@ export declare const PDisplay: import("react").ForwardRefExoticComponent<Omit<HT
|
|
|
44
44
|
*/
|
|
45
45
|
size?: BreakpointCustomizable<DisplaySize>;
|
|
46
46
|
/**
|
|
47
|
-
* Sets a
|
|
47
|
+
* Sets a heading tag, so it fits correctly within the outline of the page.
|
|
48
48
|
*/
|
|
49
49
|
tag?: DisplayTag;
|
|
50
50
|
/**
|
|
@@ -18,7 +18,7 @@ export type PHeadingProps = Omit<HTMLAttributes<{}>, 'color'> & {
|
|
|
18
18
|
*/
|
|
19
19
|
size?: BreakpointCustomizable<HeadingSize>;
|
|
20
20
|
/**
|
|
21
|
-
* Sets a
|
|
21
|
+
* Sets a heading tag, so it fits correctly within the outline of the page.
|
|
22
22
|
*/
|
|
23
23
|
tag?: HeadingTag;
|
|
24
24
|
/**
|
|
@@ -44,7 +44,7 @@ export declare const PHeading: import("react").ForwardRefExoticComponent<Omit<HT
|
|
|
44
44
|
*/
|
|
45
45
|
size?: BreakpointCustomizable<HeadingSize>;
|
|
46
46
|
/**
|
|
47
|
-
* Sets a
|
|
47
|
+
* Sets a heading tag, so it fits correctly within the outline of the page.
|
|
48
48
|
*/
|
|
49
49
|
tag?: HeadingTag;
|
|
50
50
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type HTMLAttributes } from 'react';
|
|
2
|
-
import type { InlineNotificationActionIcon, InlineNotificationState, Theme } from '../types';
|
|
2
|
+
import type { InlineNotificationActionIcon, InlineNotificationHeadingTag, InlineNotificationState, Theme } from '../types';
|
|
3
3
|
export type PInlineNotificationProps = Omit<HTMLAttributes<{}>, 'color'> & {
|
|
4
4
|
/**
|
|
5
5
|
* Action icon of the inline-notification.
|
|
@@ -25,6 +25,10 @@ export type PInlineNotificationProps = Omit<HTMLAttributes<{}>, 'color'> & {
|
|
|
25
25
|
* Heading of the inline-notification.
|
|
26
26
|
*/
|
|
27
27
|
heading?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Sets a heading tag, so it fits correctly within the outline of the page.
|
|
30
|
+
*/
|
|
31
|
+
headingTag?: InlineNotificationHeadingTag;
|
|
28
32
|
/**
|
|
29
33
|
* Emitted when the action button is clicked.
|
|
30
34
|
*/
|
|
@@ -71,6 +75,10 @@ export declare const PInlineNotification: import("react").ForwardRefExoticCompon
|
|
|
71
75
|
* Heading of the inline-notification.
|
|
72
76
|
*/
|
|
73
77
|
heading?: string;
|
|
78
|
+
/**
|
|
79
|
+
* Sets a heading tag, so it fits correctly within the outline of the page.
|
|
80
|
+
*/
|
|
81
|
+
headingTag?: InlineNotificationHeadingTag;
|
|
74
82
|
/**
|
|
75
83
|
* Emitted when the action button is clicked.
|
|
76
84
|
*/
|
|
@@ -14,7 +14,7 @@ export type PLinkTileModelSignatureProps = Omit<HTMLAttributes<{}>, 'color'> & {
|
|
|
14
14
|
*/
|
|
15
15
|
heading: string;
|
|
16
16
|
/**
|
|
17
|
-
* Sets a
|
|
17
|
+
* Sets a heading tag, so it fits correctly within the outline of the page.
|
|
18
18
|
*/
|
|
19
19
|
headingTag?: LinkTileModelSignatureHeadingTag;
|
|
20
20
|
/**
|
|
@@ -44,7 +44,7 @@ export declare const PLinkTileModelSignature: import("react").ForwardRefExoticCo
|
|
|
44
44
|
*/
|
|
45
45
|
heading: string;
|
|
46
46
|
/**
|
|
47
|
-
* Sets a
|
|
47
|
+
* Sets a heading tag, so it fits correctly within the outline of the page.
|
|
48
48
|
*/
|
|
49
49
|
headingTag?: LinkTileModelSignatureHeadingTag;
|
|
50
50
|
/**
|