@porsche-design-system/components-react 4.0.0-rc.1 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +62 -0
- package/OSS_NOTICE +195 -855
- package/README.md +0 -5
- package/bin/patchRemixRunProcessBrowserGlobalIdentifier.js +0 -0
- package/cjs/lib/components/segmented-control.wrapper.cjs +3 -3
- package/esm/hooks.mjs +1 -1
- package/esm/lib/components/segmented-control.wrapper.d.ts +10 -0
- package/esm/lib/components/segmented-control.wrapper.mjs +3 -3
- package/esm/lib/types.d.ts +29 -25
- package/global-styles/cn/index.css +42 -39
- package/global-styles/color-scheme.css +24 -24
- package/global-styles/index.css +42 -39
- package/global-styles/variables.css +18 -15
- package/package.json +3 -3
- package/ssr/cjs/components/dist/styles/esm/styles-entry.cjs +497 -249
- package/ssr/cjs/components/dist/utils/esm/utils-entry.cjs +47 -12
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/segmented-control.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/accordion.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/banner.cjs +14 -9
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/canvas.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/carousel.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox.cjs +3 -2
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/drilldown-item.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/fieldset.cjs +1 -1
- 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/inline-notification.cjs +13 -9
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-base.cjs +3 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/modal.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/multi-select.cjs +4 -5
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/notification-base.cjs +10 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pin-code.cjs +5 -2
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/popover.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/radio-group-option.cjs +1 -2
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/radio-group.cjs +4 -2
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/segmented-control-item.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/segmented-control.cjs +8 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select.cjs +6 -5
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/sheet.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/state-message.cjs +1 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/stepper-horizontal.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/switch.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/table.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs-bar.cjs +4 -24
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/textarea.cjs +4 -2
- package/ssr/esm/components/dist/styles/esm/styles-entry.mjs +497 -250
- package/ssr/esm/components/dist/utils/esm/utils-entry.mjs +45 -13
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/hooks.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/segmented-control.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/accordion.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/banner.mjs +14 -9
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/canvas.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/carousel.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox.mjs +5 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/crest.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/drilldown-item.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/fieldset.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flag.mjs +1 -1
- 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/icon.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/inline-notification.mjs +13 -9
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-base.mjs +4 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/modal.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/multi-select.mjs +5 -6
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/notification-base.mjs +8 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pin-code.mjs +6 -3
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/popover.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/radio-group-option.mjs +1 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/radio-group.mjs +5 -3
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/segmented-control-item.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/segmented-control.mjs +10 -6
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select.mjs +7 -6
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/sheet.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/state-message.mjs +1 -3
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/stepper-horizontal.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/switch.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/table.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs-bar.mjs +4 -24
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/textarea.mjs +5 -3
- package/ssr/esm/lib/components/segmented-control.wrapper.d.ts +10 -0
- package/ssr/esm/lib/dsr-components/accordion.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/banner.d.ts +6 -2
- package/ssr/esm/lib/dsr-components/button-pure.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/button-tile.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/button.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/canvas.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/carousel.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/checkbox.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/crest.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/display.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/divider.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/drilldown-item.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/drilldown-link.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/drilldown.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/fieldset.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/flag.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/flyout.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/heading.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/icon.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/inline-notification.d.ts +4 -2
- package/ssr/esm/lib/dsr-components/input-base.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/input-date.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/input-email.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/input-month.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/input-number.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/input-password.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/input-search.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/input-tel.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/input-text.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/input-time.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/input-url.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/input-week.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/label.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/link-pure.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/link-tile-product.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/link-tile.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/link.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/modal.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/model-signature.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/multi-select-option.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/multi-select.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/notification-base.d.ts +14 -0
- package/ssr/esm/lib/dsr-components/optgroup.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/pagination.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/pin-code.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/popover.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/radio-group-option.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/radio-group.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/scroller.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/segmented-control-item.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/segmented-control.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/select-option.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/select.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/sheet.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/spinner.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/stepper-horizontal-item.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/stepper-horizontal.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/switch.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/table-body.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/table-cell.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/table-head-cell.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/table-head-row.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/table-head.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/table-row.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/table.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/tabs-bar.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/tabs-item.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/tabs.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/tag-dismissible.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/tag.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/text-list-item.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/text-list.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/text.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/textarea.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/toast.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/wordmark.d.ts +1 -0
- package/ssr/esm/lib/types.d.ts +29 -25
- package/tailwindcss/index.css +277 -78
|
@@ -13,7 +13,7 @@ import { PIcon } from '../components/icon.wrapper.mjs';
|
|
|
13
13
|
class DSRSegmentedControlItem extends Component {
|
|
14
14
|
host;
|
|
15
15
|
render() {
|
|
16
|
-
const { children} = splitChildren(this.props.children);
|
|
16
|
+
const { children, namedSlotChildren, otherChildren } = splitChildren(this.props.children);
|
|
17
17
|
// this additional validation is still needed because undefined is allowed with current propTypes
|
|
18
18
|
const hasIcon = !!this.props.icon || !!this.props.iconSource;
|
|
19
19
|
const hasSlottedContent = !!children.length;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { splitChildren } from '../../splitChildren.mjs';
|
|
3
2
|
import { Component } from 'react';
|
|
3
|
+
import '../../provider.mjs';
|
|
4
|
+
import { splitChildren } from '../../splitChildren.mjs';
|
|
4
5
|
import { minifyCss } from '../../minifyCss.mjs';
|
|
5
6
|
import { getSegmentedControlCss as getComponentCss$q } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
|
|
6
|
-
import { descriptionId, labelId,
|
|
7
|
+
import { descriptionId, getFieldsetAriaAttributes, labelId, setAriaIDREF } from '../../../../../../components/dist/utils/esm/utils-entry.mjs';
|
|
7
8
|
import { Label } from './label.mjs';
|
|
8
|
-
import { StateMessage } from './state-message.mjs';
|
|
9
|
+
import { messageId, StateMessage } from './state-message.mjs';
|
|
10
|
+
import { PScroller } from '../components/scroller.wrapper.mjs';
|
|
9
11
|
|
|
10
12
|
/**
|
|
11
13
|
* @slot {"name": "label", "description": "Shows a label. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
|
|
@@ -33,9 +35,11 @@ class DSRSegmentedControl extends Component {
|
|
|
33
35
|
const manipulatedChildren = children.map((child) => typeof child === 'object' && 'props' in child && otherChildren.includes(child)
|
|
34
36
|
? { ...child, props: { ...child.props, selected: child.props?.value === this.props.value, backgroundColor: this.props.backgroundColor, theme: this.props.theme } }
|
|
35
37
|
: child);
|
|
36
|
-
const
|
|
37
|
-
const
|
|
38
|
-
|
|
38
|
+
const itemWidths = this.props.noWrap ? undefined : { minWidth: 100, maxWidth: 100 };
|
|
39
|
+
const fieldDescriptionId = (this.props.description || namedSlotChildren.filter(({ props: { slot } }) => slot === 'description').length > 0) ? descriptionId : undefined;
|
|
40
|
+
const fieldMessageId = (this.props.message || namedSlotChildren.filter(({ props: { slot } }) => slot === 'message').length > 0) && ['success', 'error'].includes(this.props.state) ? messageId : undefined;
|
|
41
|
+
const style = minifyCss(getComponentCss$q(itemWidths?.minWidth, itemWidths?.maxWidth, this.props.columns, this.props.disabled, this.props.hideLabel, this.props.state, this.props.noWrap));
|
|
42
|
+
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs("fieldset", { className: "root", disabled: this.props.disabled, ...getFieldsetAriaAttributes(this.props.required, this.props.state === 'error'), "aria-labelledby": (this.props.label || namedSlotChildren.filter(({ props: { slot } }) => slot === 'label').length > 0) ? labelId : null, "aria-describedby": setAriaIDREF(fieldMessageId, fieldDescriptionId), 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, isDisabled: this.props.disabled }), this.props.noWrap ? (jsx(PScroller, { className: "scroller", children: jsx("slot", {}) })) : (jsx("slot", {})), jsx(StateMessage, { hasMessage: (this.props.message || namedSlotChildren.filter(({ props: { slot } }) => slot === 'message').length > 0) && ['success', 'error'].includes(this.props.state), state: this.props.state, message: this.props.message, host: null })] })] }), manipulatedChildren] }));
|
|
39
43
|
}
|
|
40
44
|
}
|
|
41
45
|
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import '../../provider.mjs';
|
|
|
4
4
|
import { splitChildren } from '../../splitChildren.mjs';
|
|
5
5
|
import { minifyCss } from '../../minifyCss.mjs';
|
|
6
6
|
import { getSelectCss as getComponentCss$o } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
|
|
7
|
-
import { getHasNativePopoverSupport, getComboboxAriaAttributes, labelId } from '../../../../../../components/dist/utils/esm/utils-entry.mjs';
|
|
7
|
+
import { getHasNativePopoverSupport, descriptionId, getComboboxAriaAttributes, labelId, getListboxAriaAttributes } from '../../../../../../components/dist/utils/esm/utils-entry.mjs';
|
|
8
8
|
import { Label } from './label.mjs';
|
|
9
9
|
import { messageId, StateMessage } from './state-message.mjs';
|
|
10
10
|
import { PIcon } from '../components/icon.wrapper.mjs';
|
|
@@ -57,16 +57,17 @@ class DSRSelect extends Component {
|
|
|
57
57
|
this.props.internals?.setFormValue(this.props.defaultValue);
|
|
58
58
|
}
|
|
59
59
|
render() {
|
|
60
|
-
const { namedSlotChildren} = splitChildren(this.props.children);
|
|
60
|
+
const { children, namedSlotChildren, otherChildren } = splitChildren(this.props.children);
|
|
61
61
|
const hasCustomFilterSlot = namedSlotChildren.filter(({ props: { slot } }) => slot === 'filter').length > 0;
|
|
62
62
|
const hasCustomSelectedSlot = namedSlotChildren.filter(({ props: { slot } }) => slot === 'selected').length > 0;
|
|
63
63
|
const buttonId = 'button';
|
|
64
|
-
const
|
|
65
|
-
const
|
|
64
|
+
const listboxId = 'listbox';
|
|
65
|
+
const selectDescriptionId = (this.props.description || namedSlotChildren.filter(({ props: { slot } }) => slot === 'description').length > 0) ? descriptionId : undefined;
|
|
66
66
|
const selectMessageId = (this.props.message || namedSlotChildren.filter(({ props: { slot } }) => slot === 'message').length > 0) && ['success', 'error'].includes(this.props.state) ? messageId : undefined;
|
|
67
|
-
const ariaDescribedBy = [descriptionId, selectMessageId].filter(Boolean).join(' ');
|
|
68
67
|
const style = minifyCss(getComponentCss$o(this.props.isOpen, this.props.disabled, this.props.hideLabel, this.props.state, this.props.compact));
|
|
69
|
-
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs("div", { className: "root", children: [jsx(Label, { hasLabel: this.props.label || namedSlotChildren.filter(({ props: { slot } }) => slot === 'label').length > 0, hasDescription: this.props.description || namedSlotChildren.filter(({ props: { slot } }) => slot === 'description').length > 0, host: null, label: this.props.label, description: this.props.description, htmlFor: buttonId, isRequired: this.props.required, isDisabled: this.props.disabled }), jsxs("button", { "aria-invalid": this.props.state === 'error' ? 'true' : null, type: "button", role: "combobox", id: buttonId,
|
|
68
|
+
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs("div", { className: "root", children: [jsx(Label, { hasLabel: this.props.label || namedSlotChildren.filter(({ props: { slot } }) => slot === 'label').length > 0, hasDescription: this.props.description || namedSlotChildren.filter(({ props: { slot } }) => slot === 'description').length > 0, host: null, label: this.props.label, description: this.props.description, htmlFor: buttonId, isRequired: this.props.required, isDisabled: this.props.disabled }), jsxs("button", { "aria-invalid": this.props.state === 'error' ? 'true' : null, type: "button", role: "combobox", id: buttonId,
|
|
69
|
+
// only needed for Safari to recognize focus state on click
|
|
70
|
+
tabIndex: 0, ...getComboboxAriaAttributes(this.props.isOpen, this.props.required, (this.props.label || namedSlotChildren.filter(({ props: { slot } }) => slot === 'label').length > 0) && labelId, selectMessageId, selectDescriptionId, listboxId), "aria-autocomplete": "none", disabled: this.props.disabled, onBlur: this.props.onComboBlur, children: [hasCustomSelectedSlot ? (jsx("slot", { name: "selected" })) : (jsxs(Fragment, { children: [this.selectedOption?.querySelector?.('img') && (jsx("img", { src: this.selectedOption.querySelector('img').src, alt: "" })), jsx("span", { children: this.selectedOption?.textContent ?? '' })] })), jsx(PIcon, { className: "icon", name: "arrow-head-down", color: "primary", "aria-hidden": "true" })] }), jsxs("div", { popover: "manual", tabIndex: 0, children: [this.props.filter && !hasCustomFilterSlot && (jsx(PInputSearch, { className: "filter", name: "filter", label: "Filter options", hideLabel: true, autoComplete: "off", clear: true, indicator: true, compact: true, onBlur: (e) => e.stopPropagation() })), hasCustomFilterSlot && jsx("slot", { name: "filter" }), jsxs("div", { id: listboxId, className: "options", ...getListboxAriaAttributes(this.props.required, (this.props.label || namedSlotChildren.filter(({ props: { slot } }) => slot === 'label').length > 0) && labelId, selectMessageId, selectDescriptionId, false), tabIndex: -1, onPointerMove: this.props.onPointerMove, onBlur: (e) => e.stopPropagation(), children: [this.props.filter && !this.props.hasFilterResults && jsx(NoResultsOption, {}), jsx("slot", { name: "options-status" }), jsx("slot", {})] })] }), jsx(StateMessage, { hasMessage: (this.props.message || namedSlotChildren.filter(({ props: { slot } }) => slot === 'message').length > 0) && ['success', 'error'].includes(this.props.state), state: this.props.state, message: this.props.message, host: null })] })] }), this.props.children] }));
|
|
70
71
|
}
|
|
71
72
|
}
|
|
72
73
|
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/sheet.mjs
CHANGED
|
@@ -19,7 +19,7 @@ class DSRSheet extends Component {
|
|
|
19
19
|
scroller;
|
|
20
20
|
hasHeader;
|
|
21
21
|
render() {
|
|
22
|
-
const { namedSlotChildren} = splitChildren(this.props.children);
|
|
22
|
+
const { children, namedSlotChildren, otherChildren } = splitChildren(this.props.children);
|
|
23
23
|
const hasHeader = namedSlotChildren.filter(({ props: { slot } }) => slot === 'header').length > 0;
|
|
24
24
|
if (this.props.open) ;
|
|
25
25
|
const style = minifyCss(getComponentCss$n(this.props.open, this.props.background, this.props.dismissButton));
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/state-message.mjs
CHANGED
|
@@ -6,9 +6,7 @@ import { PIcon } from '../components/icon.wrapper.mjs';
|
|
|
6
6
|
const messageId = 'message';
|
|
7
7
|
const StateMessage = ({ hasMessage, state, message }) => {
|
|
8
8
|
const isErrorState = state === 'error';
|
|
9
|
-
return (
|
|
10
|
-
// needs to be rendered always to have correct behaviour for screen readers
|
|
11
|
-
jsx("span", { id: messageId, className: "message", role: state === 'success' ? 'status' : 'alert', children: hasMessage && (jsxs(Fragment, { children: [jsx(PIcon, { name: isErrorState ? 'exclamation' : 'check', color: isErrorState ? 'error' : 'success', "aria-hidden": "true" }), message || jsx("slot", { name: "message" })] })) }));
|
|
9
|
+
return (jsx("span", { id: messageId, className: "message", role: state === 'success' ? 'status' : 'alert', children: hasMessage && (jsxs(Fragment, { children: [jsx(PIcon, { name: isErrorState ? 'exclamation' : 'check', color: isErrorState ? 'error' : 'success', "aria-hidden": "true" }), message || jsx("slot", { name: "message" })] })) }));
|
|
12
10
|
};
|
|
13
11
|
|
|
14
12
|
export { StateMessage, messageId };
|
|
@@ -16,7 +16,7 @@ class DSRStepperHorizontal extends Component {
|
|
|
16
16
|
slot;
|
|
17
17
|
resizeObserver;
|
|
18
18
|
render() {
|
|
19
|
-
const { children, otherChildren } = splitChildren(this.props.children);
|
|
19
|
+
const { children, namedSlotChildren, otherChildren } = splitChildren(this.props.children);
|
|
20
20
|
const manipulatedChildren = children.map((child) => typeof child === 'object' && 'props' in child && otherChildren.includes(child)
|
|
21
21
|
? { ...child, props: { ...child.props, theme: this.props.theme } }
|
|
22
22
|
: child);
|
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 :
|
|
24
|
+
, "aria-describedby": this.props.loading ? loadingId : null, 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
|
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/table.mjs
CHANGED
|
@@ -13,7 +13,7 @@ import { PScroller } from '../components/scroller.wrapper.mjs';
|
|
|
13
13
|
class DSRTable extends Component {
|
|
14
14
|
host;
|
|
15
15
|
render() {
|
|
16
|
-
const { namedSlotChildren} = splitChildren(this.props.children);
|
|
16
|
+
const { children, namedSlotChildren, otherChildren } = splitChildren(this.props.children);
|
|
17
17
|
const hasSlottedCaption = namedSlotChildren.filter(({ props: { slot } }) => slot === 'caption').length > 0;
|
|
18
18
|
const captionId = 'caption';
|
|
19
19
|
const tableAttr = this.props.caption
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs-bar.mjs
CHANGED
|
@@ -4,6 +4,7 @@ import '../../provider.mjs';
|
|
|
4
4
|
import { splitChildren } from '../../splitChildren.mjs';
|
|
5
5
|
import { minifyCss } from '../../minifyCss.mjs';
|
|
6
6
|
import { getTabsBarCss as getComponentCss$b } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
|
|
7
|
+
import { getSanitizedActiveTabIndex } from '../../../../../../components/dist/utils/esm/utils-entry.mjs';
|
|
7
8
|
import { PScroller } from '../components/scroller.wrapper.mjs';
|
|
8
9
|
|
|
9
10
|
/**
|
|
@@ -21,30 +22,9 @@ class DSRTabsBar extends Component {
|
|
|
21
22
|
isTabList;
|
|
22
23
|
resizeObserver;
|
|
23
24
|
render() {
|
|
24
|
-
const { children, otherChildren } = splitChildren(this.props.children);
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
? {
|
|
28
|
-
...child,
|
|
29
|
-
props: {
|
|
30
|
-
...child.props,
|
|
31
|
-
role: 'tab',
|
|
32
|
-
tabIndex: (this.props.activeTabIndex || 0) === i ? '0' : '-1',
|
|
33
|
-
'aria-selected': this.props.activeTabIndex === i ? 'true' : 'false',
|
|
34
|
-
},
|
|
35
|
-
}
|
|
36
|
-
: child.type === 'a'
|
|
37
|
-
? {
|
|
38
|
-
...child,
|
|
39
|
-
props: {
|
|
40
|
-
...child.props,
|
|
41
|
-
'aria-current': this.props.activeTabIndex === i ? 'true' : 'false',
|
|
42
|
-
},
|
|
43
|
-
}
|
|
44
|
-
: child
|
|
45
|
-
: child);
|
|
46
|
-
const style = minifyCss(getComponentCss$b(this.props.background, this.props.size, this.props.compact));
|
|
47
|
-
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs(PScroller, { className: "scroller", compact: this.props.compact, ...(this.props.isTabList && { aria: { role: 'tablist' } }), children: [jsx("slot", {}), jsx("span", { className: "bar" })] })] }), manipulatedChildren] }));
|
|
25
|
+
const { children, namedSlotChildren, otherChildren } = splitChildren(this.props.children);
|
|
26
|
+
const style = minifyCss(getComponentCss$b(this.props.background, this.props.size, this.props.compact, getSanitizedActiveTabIndex(this.props.activeTabIndex, children)));
|
|
27
|
+
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs(PScroller, { className: "scroller", compact: this.props.compact, ...(this.props.isTabList && { aria: { role: 'tablist' } }), children: [jsx("slot", {}), jsx("span", { className: "bar" })] })] }), this.props.children] }));
|
|
48
28
|
}
|
|
49
29
|
}
|
|
50
30
|
|
|
@@ -16,7 +16,7 @@ class DSRTabs extends Component {
|
|
|
16
16
|
tabsItems = [];
|
|
17
17
|
slot;
|
|
18
18
|
render() {
|
|
19
|
-
const { children, otherChildren } = splitChildren(this.props.children);
|
|
19
|
+
const { children, namedSlotChildren, otherChildren } = splitChildren(this.props.children);
|
|
20
20
|
const manipulatedChildren = children.map((child, i) => typeof child === 'object' && 'props' in child && otherChildren.includes(child)
|
|
21
21
|
? { ...child, props: { ...child.props, theme: this.props.theme, hidden: this.props.activeTabIndex !== i ? true : null } }
|
|
22
22
|
: child);
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/textarea.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { splitChildren } from '../../splitChildren.mjs';
|
|
|
3
3
|
import { Component } from 'react';
|
|
4
4
|
import { minifyCss } from '../../minifyCss.mjs';
|
|
5
5
|
import { getTextareaCss as getComponentCss$3 } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
|
|
6
|
-
import { descriptionId } from '../../../../../../components/dist/utils/esm/utils-entry.mjs';
|
|
6
|
+
import { descriptionId, setAriaIDREF } from '../../../../../../components/dist/utils/esm/utils-entry.mjs';
|
|
7
7
|
import { Label } from './label.mjs';
|
|
8
8
|
import { messageId, StateMessage } from './state-message.mjs';
|
|
9
9
|
|
|
@@ -29,10 +29,12 @@ class DSRTextarea extends Component {
|
|
|
29
29
|
formStateRestoreCallback() {
|
|
30
30
|
}
|
|
31
31
|
render() {
|
|
32
|
-
const { namedSlotChildren} = splitChildren(this.props.children);
|
|
32
|
+
const { children, namedSlotChildren, otherChildren } = splitChildren(this.props.children);
|
|
33
33
|
const id = 'textarea';
|
|
34
|
+
const textareaDescriptionId = (this.props.description || namedSlotChildren.filter(({ props: { slot } }) => slot === 'description').length > 0) ? descriptionId : undefined;
|
|
35
|
+
const textareaMessageId = (this.props.message || namedSlotChildren.filter(({ props: { slot } }) => slot === 'message').length > 0) && ['success', 'error'].includes(this.props.state) ? messageId : undefined;
|
|
34
36
|
const style = minifyCss(getComponentCss$3(this.props.disabled, this.props.readOnly, this.props.hideLabel, this.props.state, this.props.compact, this.props.counter, this.props.resize));
|
|
35
|
-
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs("div", { className: "root", children: [jsx(Label, { hasLabel: this.props.label || namedSlotChildren.filter(({ props: { slot } }) => slot === 'label').length > 0, hasDescription: this.props.description || namedSlotChildren.filter(({ props: { slot } }) => slot === 'description').length > 0, host: null, htmlFor: id, label: this.props.label, description: this.props.description, isRequired: this.props.required, isDisabled: this.props.disabled }), jsxs("div", { className: "wrapper", children: [jsx("textarea", { "aria-describedby":
|
|
37
|
+
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs("div", { className: "root", children: [jsx(Label, { hasLabel: this.props.label || namedSlotChildren.filter(({ props: { slot } }) => slot === 'label').length > 0, hasDescription: this.props.description || namedSlotChildren.filter(({ props: { slot } }) => slot === 'description').length > 0, host: null, htmlFor: id, label: this.props.label, description: this.props.description, isRequired: this.props.required, isDisabled: this.props.disabled }), jsxs("div", { className: "wrapper", children: [jsx("textarea", { "aria-describedby": setAriaIDREF(textareaMessageId, textareaDescriptionId), "aria-invalid": this.props.state === 'error' ? 'true' : null, id: id, onBlur: this.props.onBlur, name: this.props.name, defaultValue: this.props.value, form: this.props.form, disabled: this.props.disabled, required: this.props.required, placeholder: this.props.placeholder, maxLength: this.props.maxLength, minLength: this.props.minLength, rows: this.props.rows, readOnly: this.props.readOnly, spellCheck: this.props.spellCheck, autoComplete: this.props.autoComplete, wrap: this.props.wrap }), this.props.counter && (jsxs(Fragment, { children: [jsx("span", { className: "sr-only", "aria-live": "polite", children: this.props.maxLength
|
|
36
38
|
? `You have ${this.props.maxLength - this.props.value.length} out of ${this.props.maxLength} characters left`
|
|
37
39
|
: `${this.props.value.length} characters entered` }), jsx("span", { className: "counter", "aria-hidden": "true", children: this.props.maxLength ? `${this.props.value.length}/${this.props.maxLength}` : `${this.props.value.length}` })] }))] }), 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 })] })] }), this.props.children] }));
|
|
38
40
|
}
|
|
@@ -44,6 +44,11 @@ export type PSegmentedControlProps = BaseProps & {
|
|
|
44
44
|
* The name of the segmented-control.
|
|
45
45
|
*/
|
|
46
46
|
name?: string;
|
|
47
|
+
/**
|
|
48
|
+
* If true, prevents items from wrapping to new rows and renders them in a single scrollable row instead.
|
|
49
|
+
* @default false
|
|
50
|
+
*/
|
|
51
|
+
noWrap?: boolean;
|
|
47
52
|
/**
|
|
48
53
|
* Emitted when the segmented-control has lost focus.
|
|
49
54
|
*/
|
|
@@ -111,6 +116,11 @@ export declare const PSegmentedControl: import("react").ForwardRefExoticComponen
|
|
|
111
116
|
* The name of the segmented-control.
|
|
112
117
|
*/
|
|
113
118
|
name?: string;
|
|
119
|
+
/**
|
|
120
|
+
* If true, prevents items from wrapping to new rows and renders them in a single scrollable row instead.
|
|
121
|
+
* @default false
|
|
122
|
+
*/
|
|
123
|
+
noWrap?: boolean;
|
|
114
124
|
/**
|
|
115
125
|
* Emitted when the segmented-control has lost focus.
|
|
116
126
|
*/
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Component } from 'react';
|
|
2
|
+
import type { JSX } from 'react';
|
|
2
3
|
/**
|
|
3
4
|
* @slot {"name": "summary", "description": "Content for the accordion's summary section. Clicking toggles the accordion open and closed." }
|
|
4
5
|
* @slot {"name": "summary-before", "description": "Content or interactive elements placed before the accordion's summary section." }
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { Component } from 'react';
|
|
2
|
+
import type { JSX } from 'react';
|
|
2
3
|
/**
|
|
3
|
-
* @slot {"name": "heading", "description": "Defines the heading
|
|
4
|
-
* @slot {"name": "
|
|
4
|
+
* @slot {"name": "heading", "description": "Defines the heading of the banner. Can be used as an alternative to the `heading` prop for rich content." }
|
|
5
|
+
* @slot {"name": "", "description": "Default slot for the banner description content." }
|
|
6
|
+
* @slot {"name": "description", "description": "Deprecated: Use the default slot instead.", "isDeprecated": true }
|
|
5
7
|
*
|
|
6
8
|
* @controlled {"props": ["open"], "event": "dismiss"}
|
|
7
9
|
*/
|
|
@@ -9,5 +11,7 @@ export declare class DSRBanner extends Component<any> {
|
|
|
9
11
|
host: HTMLElement;
|
|
10
12
|
private refPopover;
|
|
11
13
|
private refDismiss;
|
|
14
|
+
private hasHeadingSlot;
|
|
15
|
+
private hasDescriptionSlot;
|
|
12
16
|
render(): JSX.Element;
|
|
13
17
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Component } from 'react';
|
|
2
|
+
import type { JSX } from 'react';
|
|
2
3
|
/**
|
|
3
4
|
* @slot {"name": "title", "description": "Renders the application name in the header section of the sidebar start area." }
|
|
4
5
|
* @slot {"name": "header-start", "description": "Renders a **sticky** header section above the content area on the **start** side (**left** in **LTR** mode / **right** in **RTL** mode)." }
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Component } from 'react';
|
|
2
|
+
import type { JSX } from 'react';
|
|
2
3
|
/**
|
|
3
4
|
* @slot {"name": "label", "description": "Shows a label. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
|
|
4
5
|
* @slot {"name": "label-after", "description": "Places additional content after the label text (for content that should not be part of the label, e.g. external links or `p-popover`)."}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Component } from 'react';
|
|
2
|
+
import type { JSX } from 'react';
|
|
2
3
|
/**
|
|
3
4
|
* @slot {"name": "", "description": "Default slot for the main content." }
|
|
4
5
|
* @slot {"name": "button", "description": "Shows a custom button to reach a deeper level of the navigation structure." }
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Component } from 'react';
|
|
2
|
+
import type { JSX } from 'react';
|
|
2
3
|
/**
|
|
3
4
|
* @slot {"name": "label", "description": "Shows a label. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed." }
|
|
4
5
|
* @slot {"name": "", "description": "Default slot for the main content." }
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { Component } from 'react';
|
|
2
|
+
import type { JSX } from 'react';
|
|
2
3
|
/**
|
|
3
|
-
* @slot {"name": "heading", "description": "
|
|
4
|
-
* @slot {"name": "", "description": "Default slot
|
|
4
|
+
* @slot {"name": "heading", "description": "Defines the heading of the inline notification. Can be used as an alternative to the `heading` prop for rich content." }
|
|
5
|
+
* @slot {"name": "", "description": "Default slot for the inline notification description content." }
|
|
5
6
|
*/
|
|
6
7
|
export declare class DSRInlineNotification extends Component<any> {
|
|
7
8
|
host: HTMLElement;
|
|
9
|
+
private hasHeadingSlot;
|
|
8
10
|
render(): JSX.Element;
|
|
9
11
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Component } from 'react';
|
|
2
|
+
import type { JSX } from 'react';
|
|
2
3
|
/**
|
|
3
4
|
* @slot {"name": "label", "description": "Shows a label. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
|
|
4
5
|
* @slot {"name": "label-after", "description": "Places additional content after the label text (for content that should not be part of the label, e.g. external links or `p-popover`)."}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Component } from 'react';
|
|
2
|
+
import type { JSX } from 'react';
|
|
2
3
|
/**
|
|
3
4
|
* @slot {"name": "label", "description": "Shows a label. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
|
|
4
5
|
* @slot {"name": "label-after", "description": "Places additional content after the label text (for content that should not be part of the label, e.g. external links or `p-popover`)."}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Component } from 'react';
|
|
2
|
+
import type { JSX } from 'react';
|
|
2
3
|
/**
|
|
3
4
|
* @slot {"name": "label", "description": "Shows a label. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
|
|
4
5
|
* @slot {"name": "label-after", "description": "Places additional content after the label text (for content that should not be part of the label, e.g. external links or `p-popover`)."}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Component } from 'react';
|
|
2
|
+
import type { JSX } from 'react';
|
|
2
3
|
/**
|
|
3
4
|
* @slot {"name": "label", "description": "Shows a label. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
|
|
4
5
|
* @slot {"name": "label-after", "description": "Places additional content after the label text (for content that should not be part of the label, e.g. external links or `p-popover`)."}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Component } from 'react';
|
|
2
|
+
import type { JSX } from 'react';
|
|
2
3
|
/**
|
|
3
4
|
* @slot {"name": "label", "description": "Shows a label. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
|
|
4
5
|
* @slot {"name": "label-after", "description": "Places additional content after the label text (for content that should not be part of the label, e.g. external links or `p-popover`)."}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Component } from 'react';
|
|
2
|
+
import type { JSX } from 'react';
|
|
2
3
|
/**
|
|
3
4
|
* @slot {"name": "label", "description": "Shows a label. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
|
|
4
5
|
* @slot {"name": "label-after", "description": "Places additional content after the label text (for content that should not be part of the label, e.g. external links or `p-popover`)."}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Component } from 'react';
|
|
2
|
+
import type { JSX } from 'react';
|
|
2
3
|
/**
|
|
3
4
|
* @slot {"name": "label", "description": "Shows a label. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
|
|
4
5
|
* @slot {"name": "label-after", "description": "Places additional content after the label text (for content that should not be part of the label, e.g. external links or `p-popover`)."}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Component } from 'react';
|
|
2
|
+
import type { JSX } from 'react';
|
|
2
3
|
/**
|
|
3
4
|
* @slot {"name": "label", "description": "Shows a label. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
|
|
4
5
|
* @slot {"name": "label-after", "description": "Places additional content after the label text (for content that should not be part of the label, e.g. external links or `p-popover`)."}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Component } from 'react';
|
|
2
|
+
import type { JSX } from 'react';
|
|
2
3
|
/**
|
|
3
4
|
* @slot {"name": "label", "description": "Shows a label. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
|
|
4
5
|
* @slot {"name": "label-after", "description": "Places additional content after the label text (for content that should not be part of the label, e.g. external links or `p-popover`)."}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Component } from 'react';
|
|
2
|
+
import type { JSX } from 'react';
|
|
2
3
|
/**
|
|
3
4
|
* @slot {"name": "label", "description": "Shows a label. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
|
|
4
5
|
* @slot {"name": "label-after", "description": "Places additional content after the label text (for content that should not be part of the label, e.g. external links or `p-popover`)."}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Component } from 'react';
|
|
2
|
+
import type { JSX } from 'react';
|
|
2
3
|
/**
|
|
3
4
|
* @slot {"name": "label", "description": "Shows a label. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
|
|
4
5
|
* @slot {"name": "label-after", "description": "Places additional content after the label text (for content that should not be part of the label, e.g. external links or `p-popover`)."}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Component } from 'react';
|
|
2
|
+
import type { JSX } from 'react';
|
|
2
3
|
/**
|
|
3
4
|
* @slot {"name": "anchor", "description": "Slotted anchor link which can be used instead of the `href` prop. Ensure the named slot is directly on the anchor element, without nesting." }
|
|
4
5
|
* @slot {"name": "header", "description": "Shows special features about the product like novelty or exclusivity. Although you can pass in anything, it is recommended to use the `p-tag` component." }
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Component } from 'react';
|
|
2
|
+
import type { JSX } from 'react';
|
|
2
3
|
/**
|
|
3
4
|
* @slot {"name": "label", "description": "Shows a label. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed." }
|
|
4
5
|
* @slot {"name": "label-after", "description": "Places additional content after the label text (for content that should not be part of the label, e.g. external links or `p-popover`)."}
|