@porsche-design-system/components-react 4.0.0-beta.0 → 4.0.0-beta.1
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 +158 -1
- package/cjs/lib/components/accordion.wrapper.cjs +3 -3
- package/esm/lib/components/accordion.wrapper.d.ts +29 -13
- package/esm/lib/components/accordion.wrapper.mjs +3 -3
- package/esm/lib/types.d.ts +116 -102
- package/package.json +13 -2
- package/ssr/cjs/components/dist/styles/esm/styles-entry.cjs +407 -186
- package/ssr/cjs/components/dist/utils/esm/utils-entry.cjs +1 -1
- 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/dsr-components/accordion.cjs +15 -10
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-base.cjs +2 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-date.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-month.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-password.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-time.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-week.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pin-code.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/scroller.cjs +2 -1
- package/ssr/esm/components/dist/styles/esm/styles-entry.mjs +407 -186
- package/ssr/esm/components/dist/utils/esm/utils-entry.mjs +1 -1
- 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/dsr-components/accordion.mjs +15 -10
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-base.mjs +2 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-date.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-month.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-password.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-time.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-week.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pin-code.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/scroller.mjs +2 -1
- package/ssr/esm/lib/components/accordion.wrapper.d.ts +29 -13
- package/ssr/esm/lib/dsr-components/accordion.d.ts +8 -2
- package/ssr/esm/lib/types.d.ts +116 -102
|
@@ -3447,7 +3447,7 @@ const hasShowPickerSupport = () => (hasDocument &&
|
|
|
3447
3447
|
'showPicker' in HTMLInputElement.prototype &&
|
|
3448
3448
|
CSS.supports('selector(::-webkit-calendar-picker-indicator)'));
|
|
3449
3449
|
|
|
3450
|
-
const prefix = `[Porsche Design System v${"4.0.0-beta.
|
|
3450
|
+
const prefix = `[Porsche Design System v${"4.0.0-beta.1"}]` // this part isn't covered by unit tests
|
|
3451
3451
|
;
|
|
3452
3452
|
const consoleError$1 = (...messages) => {
|
|
3453
3453
|
console.error(prefix, ...messages);
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/accordion.wrapper.mjs
CHANGED
|
@@ -5,21 +5,21 @@ import { useEventCallback, usePrefix, useBrowserLayoutEffect, useMergedClass } f
|
|
|
5
5
|
import { syncRef } from '../../utils.mjs';
|
|
6
6
|
import { DSRAccordion } from '../dsr-components/accordion.mjs';
|
|
7
7
|
|
|
8
|
-
const PAccordion = /*#__PURE__*/ forwardRef(({ compact, heading, headingTag = 'h2', onUpdate, open, size = 'small', sticky, className, children, ...rest }, ref) => {
|
|
8
|
+
const PAccordion = /*#__PURE__*/ forwardRef(({ alignMarker = 'end', background = 'none', compact, heading, headingTag = 'h2', onUpdate, open, size = 'small', sticky, className, children, ...rest }, ref) => {
|
|
9
9
|
const elementRef = useRef(undefined);
|
|
10
10
|
useEventCallback(elementRef, 'update', onUpdate);
|
|
11
11
|
const WebComponentTag = usePrefix('p-accordion');
|
|
12
|
-
const propsToSync = [compact, heading, headingTag, open, size, sticky];
|
|
12
|
+
const propsToSync = [alignMarker, background, compact, heading, headingTag, open, size, sticky];
|
|
13
13
|
useBrowserLayoutEffect(() => {
|
|
14
14
|
const { current } = elementRef;
|
|
15
|
-
['compact', 'heading', 'headingTag', 'open', 'size', 'sticky'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
15
|
+
['alignMarker', 'background', 'compact', 'heading', 'headingTag', 'open', 'size', 'sticky'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
16
16
|
}, propsToSync);
|
|
17
17
|
const props = {
|
|
18
18
|
...rest,
|
|
19
19
|
// @ts-ignore
|
|
20
20
|
...(!process.browser
|
|
21
21
|
? {
|
|
22
|
-
children: (jsx(DSRAccordion, { compact, heading, headingTag, open, size, sticky, children })),
|
|
22
|
+
children: (jsx(DSRAccordion, { alignMarker, background, compact, heading, headingTag, open, size, sticky, children })),
|
|
23
23
|
}
|
|
24
24
|
: {
|
|
25
25
|
children,
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/accordion.mjs
CHANGED
|
@@ -1,26 +1,31 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { Component } from 'react';
|
|
3
|
-
import '../../provider.mjs';
|
|
4
2
|
import { splitChildren } from '../../splitChildren.mjs';
|
|
3
|
+
import { Component } from 'react';
|
|
5
4
|
import { minifyCss } from '../../minifyCss.mjs';
|
|
6
5
|
import { getAccordionCss as getComponentCss$19 } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
|
|
7
|
-
import { PIcon } from '../components/icon.wrapper.mjs';
|
|
8
6
|
|
|
9
7
|
/**
|
|
10
|
-
* @slot {"name": "
|
|
11
|
-
* @slot {"name": "", "description": "
|
|
8
|
+
* @slot {"name": "summary", "description": "Content for the accordion's summary section. Clicking toggles the accordion open and closed." }
|
|
9
|
+
* @slot {"name": "summary-before", "description": "Content or interactive elements placed before the accordion's summary section." }
|
|
10
|
+
* @slot {"name": "summary-after", "description": "Content or interactive elements placed after the accordion's summary section." }
|
|
11
|
+
* @slot {"name": "heading", "description": "Content for the accordion's heading section. Clicking toggles the accordion open and closed.", "isDeprecated": true }
|
|
12
|
+
* @slot {"name": "", "description": "Main content displayed when the accordion is expanded." }
|
|
12
13
|
*
|
|
13
14
|
* @controlled {"props": ["open"], "event": "update"}
|
|
14
15
|
*/
|
|
15
16
|
class DSRAccordion extends Component {
|
|
16
17
|
host;
|
|
18
|
+
hasSummary;
|
|
19
|
+
hasSummaryBefore;
|
|
20
|
+
hasSummaryAfter;
|
|
17
21
|
render() {
|
|
18
|
-
splitChildren(this.props.children);
|
|
19
|
-
const
|
|
20
|
-
const
|
|
22
|
+
const { namedSlotChildren} = splitChildren(this.props.children);
|
|
23
|
+
const hasSummary = namedSlotChildren.filter(({ props: { slot } }) => slot === 'summary').length > 0;
|
|
24
|
+
const hasSummaryBefore = namedSlotChildren.filter(({ props: { slot } }) => slot === 'summary-before').length > 0;
|
|
25
|
+
const hasSummaryAfter = namedSlotChildren.filter(({ props: { slot } }) => slot === 'summary-after').length > 0;
|
|
21
26
|
const Heading = this.props.headingTag;
|
|
22
|
-
const style = minifyCss(getComponentCss$19(this.props.
|
|
23
|
-
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs(
|
|
27
|
+
const style = minifyCss(getComponentCss$19(this.props.alignMarker, this.props.background, this.props.compact, this.props.open, this.props.sticky, hasSummaryBefore, hasSummaryAfter, this.props.size));
|
|
28
|
+
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs("details", { ...(this.props.open ? { open: true } : {}), children: [jsx("summary", { children: hasSummary ? jsx("slot", { name: "summary" }) : jsx(Heading, { children: this.props.heading || jsx("slot", { name: "heading" }) }) }), hasSummaryBefore && jsx("slot", { name: "summary-before" }), hasSummaryAfter && jsx("slot", { name: "summary-after" }), jsx("div", { children: jsx("slot", {}) })] })] }), this.props.children] }));
|
|
24
29
|
}
|
|
25
30
|
}
|
|
26
31
|
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-base.mjs
CHANGED
|
@@ -19,7 +19,8 @@ id, label, description, loading, initialLoading, required, disabled, state, mess
|
|
|
19
19
|
// refElement,
|
|
20
20
|
start, end, }) => {
|
|
21
21
|
const { namedSlotChildren } = splitChildren(children);
|
|
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, maxLength: maxLength, minLength: minLength, spellCheck: spellCheck, max: max, min: min, step: step, defaultValue: value, readOnly: readOnly, autoComplete: autoComplete, disabled: disabled, pattern: pattern, multiple: multiple
|
|
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, { className: "spinner", size: "inherit", "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 })] }));
|
|
23
24
|
};
|
|
24
25
|
|
|
25
26
|
export { InputBase };
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-date.mjs
CHANGED
|
@@ -36,7 +36,7 @@ class DSRInputDate extends Component {
|
|
|
36
36
|
splitChildren(this.props.children);
|
|
37
37
|
const style = minifyCss(getComponentCss$R(this.props.disabled, this.props.loading, this.props.hideLabel, this.props.state, this.props.compact, this.props.readOnly));
|
|
38
38
|
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsx(InputBase, { children: this.props.children, host: null, label: this.props.label, description: this.props.description, id: "input-date", name: this.props.name, form: this.props.form, type: "date", required: this.props.required, max: this.props.max, min: this.props.min, value: this.props.value, readOnly: this.props.readOnly, autoComplete: this.props.autoComplete, disabled: this.props.disabled, state: this.props.state, message: this.props.message, step: this.props.step, loading: this.props.loading, initialLoading: this.props.initialLoading, ...(hasShowPickerSupport() && {
|
|
39
|
-
end: (jsx(PButtonPure, { hideLabel: true, className: "button", type: "button", icon: "calendar", disabled: this.props.disabled || this.props.readOnly, children: "Open date picker" })),
|
|
39
|
+
end: (jsx(PButtonPure, { tabIndex: this.props.disabled ? -1 : null, hideLabel: true, className: "button", type: "button", icon: "calendar", disabled: this.props.disabled || this.props.readOnly, children: "Open date picker" })),
|
|
40
40
|
}) })] }), this.props.children] }));
|
|
41
41
|
}
|
|
42
42
|
}
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-month.mjs
CHANGED
|
@@ -36,7 +36,7 @@ class DSRInputMonth extends Component {
|
|
|
36
36
|
splitChildren(this.props.children);
|
|
37
37
|
const style = minifyCss(getComponentCss$P(this.props.disabled, this.props.loading, this.props.hideLabel, this.props.state, this.props.compact, this.props.readOnly));
|
|
38
38
|
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsx(InputBase, { children: this.props.children, host: null, label: this.props.label, description: this.props.description, id: "input-month", name: this.props.name, form: this.props.form, type: "month", required: this.props.required, max: this.props.max, min: this.props.min, value: this.props.value, readOnly: this.props.readOnly, autoComplete: this.props.autoComplete, disabled: this.props.disabled, state: this.props.state, message: this.props.message, step: this.props.step, loading: this.props.loading, initialLoading: this.props.initialLoading, ...(hasShowPickerSupport() && {
|
|
39
|
-
end: (jsx(PButtonPure, { hideLabel: true, className: "button", type: "button", icon: "calendar", disabled: this.props.disabled || this.props.readOnly, children: "Open date picker" })),
|
|
39
|
+
end: (jsx(PButtonPure, { tabIndex: this.props.disabled ? -1 : null, hideLabel: true, className: "button", type: "button", icon: "calendar", disabled: this.props.disabled || this.props.readOnly, children: "Open date picker" })),
|
|
40
40
|
}) })] }), this.props.children] }));
|
|
41
41
|
}
|
|
42
42
|
}
|
|
@@ -35,7 +35,7 @@ class DSRInputPassword extends Component {
|
|
|
35
35
|
render() {
|
|
36
36
|
splitChildren(this.props.children);
|
|
37
37
|
const style = minifyCss(getComponentCss$N(this.props.disabled, this.props.loading, this.props.hideLabel, this.props.state, this.props.toggle, this.props.compact, this.props.readOnly));
|
|
38
|
-
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsx(InputBase, { children: this.props.children, host: null, label: this.props.label, description: this.props.description, id: "input-password", name: this.props.name, form: this.props.form, type: this.props.showPassword ? 'text' : 'password', required: this.props.required, placeholder: this.props.placeholder, maxLength: this.props.maxLength, minLength: this.props.minLength, value: this.props.value, readOnly: this.props.readOnly, autoComplete: this.props.autoComplete, disabled: this.props.disabled, state: this.props.state, message: this.props.message, loading: this.props.loading, initialLoading: this.props.initialLoading, end: this.props.toggle && (jsx(PButtonPure, { hideLabel: true, className: "button", type: "button", icon: this.props.showPassword ? 'view-off' : 'view', disabled: this.props.disabled, aria: { 'aria-pressed': this.props.showPassword ? 'true' : 'false' }, children: "Toggle password visibility" })) })] }), this.props.children] }));
|
|
38
|
+
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsx(InputBase, { children: this.props.children, host: null, label: this.props.label, description: this.props.description, id: "input-password", name: this.props.name, form: this.props.form, type: this.props.showPassword ? 'text' : 'password', required: this.props.required, placeholder: this.props.placeholder, maxLength: this.props.maxLength, minLength: this.props.minLength, value: this.props.value, readOnly: this.props.readOnly, autoComplete: this.props.autoComplete, disabled: this.props.disabled, state: this.props.state, message: this.props.message, loading: this.props.loading, initialLoading: this.props.initialLoading, end: this.props.toggle && (jsx(PButtonPure, { tabIndex: this.props.disabled ? -1 : null, hideLabel: true, className: "button", type: "button", icon: this.props.showPassword ? 'view-off' : 'view', disabled: this.props.disabled, aria: { 'aria-pressed': this.props.showPassword ? 'true' : 'false' }, children: "Toggle password visibility" })) })] }), this.props.children] }));
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-time.mjs
CHANGED
|
@@ -36,7 +36,7 @@ class DSRInputTime extends Component {
|
|
|
36
36
|
splitChildren(this.props.children);
|
|
37
37
|
const style = minifyCss(getComponentCss$J(this.props.disabled, this.props.loading, this.props.hideLabel, this.props.state, this.props.compact, this.props.readOnly));
|
|
38
38
|
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsx(InputBase, { children: this.props.children, host: null, label: this.props.label, description: this.props.description, id: "input-time", name: this.props.name, form: this.props.form, type: "time", required: this.props.required, max: this.props.max, min: this.props.min, value: this.props.value, readOnly: this.props.readOnly, autoComplete: this.props.autoComplete, disabled: this.props.disabled, state: this.props.state, message: this.props.message, step: this.props.step, loading: this.props.loading, initialLoading: this.props.initialLoading, ...(hasShowPickerSupport() && {
|
|
39
|
-
end: (jsx(PButtonPure, { hideLabel: true, className: "button", type: "button", icon: "clock", disabled: this.props.disabled || this.props.readOnly, children: "Open time picker" })),
|
|
39
|
+
end: (jsx(PButtonPure, { tabIndex: this.props.disabled ? -1 : null, hideLabel: true, className: "button", type: "button", icon: "clock", disabled: this.props.disabled || this.props.readOnly, children: "Open time picker" })),
|
|
40
40
|
}) })] }), this.props.children] }));
|
|
41
41
|
}
|
|
42
42
|
}
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-week.mjs
CHANGED
|
@@ -36,7 +36,7 @@ class DSRInputWeek extends Component {
|
|
|
36
36
|
splitChildren(this.props.children);
|
|
37
37
|
const style = minifyCss(getComponentCss$H(this.props.disabled, this.props.loading, this.props.hideLabel, this.props.state, this.props.compact, this.props.readOnly));
|
|
38
38
|
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsx(InputBase, { children: this.props.children, host: null, label: this.props.label, description: this.props.description, id: "input-week", name: this.props.name, form: this.props.form, type: "week", required: this.props.required, max: this.props.max, min: this.props.min, value: this.props.value, readOnly: this.props.readOnly, autoComplete: this.props.autoComplete, disabled: this.props.disabled, state: this.props.state, message: this.props.message, step: this.props.step, loading: this.props.loading, initialLoading: this.props.initialLoading, ...(hasShowPickerSupport() && {
|
|
39
|
-
end: (jsx(PButtonPure, { hideLabel: true, className: "button", type: "button", icon: "calendar", disabled: this.props.disabled || this.props.readOnly, children: "Open date picker" })),
|
|
39
|
+
end: (jsx(PButtonPure, { tabIndex: this.props.disabled ? -1 : null, hideLabel: true, className: "button", type: "button", icon: "calendar", disabled: this.props.disabled || this.props.readOnly, children: "Open date picker" })),
|
|
40
40
|
}) })] }), this.props.children] }));
|
|
41
41
|
}
|
|
42
42
|
}
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pin-code.mjs
CHANGED
|
@@ -40,7 +40,7 @@ class DSRPinCode extends Component {
|
|
|
40
40
|
this.inputElements = [];
|
|
41
41
|
const currentInputId = 'current-input';
|
|
42
42
|
const style = minifyCss(getComponentCss$w(this.props.hideLabel, this.props.state, this.props.disabled, this.props.loading, this.props.length, this.props.compact));
|
|
43
|
-
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'), "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, label: this.props.label, description: this.props.description, htmlFor: currentInputId, isRequired: this.props.required, isLoading: this.props.loading, isDisabled: this.props.disabled }), jsxs("div", { className: "wrapper", children: [Array.from(new Array(this.props.length), (_, index) => (jsx("input", { name: this.props.name, form: this.props.form, ...(isCurrentInput(index, this.props.value, this.props.length) && { id: currentInputId }), type: this.props.type === 'number' ? 'text' : this.props.type, "aria-label": `${index + 1}-${this.props.length}`, "aria-describedby": `${labelId} ${descriptionId} ${messageId}`, "aria-invalid": this.props.state === 'error' ? 'true' : null, "aria-disabled": this.props.loading ? 'true' : null, autoComplete: "one-time-code", pattern: "\\d*", inputMode: "numeric" // get numeric keyboard on mobile
|
|
43
|
+
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'), "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, label: this.props.label, description: this.props.description, htmlFor: currentInputId, isRequired: this.props.required, isLoading: this.props.loading, isDisabled: this.props.disabled }), jsxs("div", { className: "wrapper", dir: "ltr", children: [Array.from(new Array(this.props.length), (_, index) => (jsx("input", { name: this.props.name, form: this.props.form, ...(isCurrentInput(index, this.props.value, this.props.length) && { id: currentInputId }), type: this.props.type === 'number' ? 'text' : this.props.type, "aria-label": `${index + 1}-${this.props.length}`, "aria-describedby": `${labelId} ${descriptionId} ${messageId}`, "aria-invalid": this.props.state === 'error' ? 'true' : null, "aria-disabled": this.props.loading ? 'true' : null, autoComplete: "one-time-code", pattern: "\\d*", inputMode: "numeric" // get numeric keyboard on mobile
|
|
44
44
|
, defaultValue: this.props.value[index] === ' ' ? null : this.props.value[index], disabled: this.props.disabled, required: this.props.required, onBlur: this.props.onInputBlur }, index))), this.props.loading && jsx(PSpinner, { className: "spinner", size: "inherit", "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] }));
|
|
45
45
|
}
|
|
46
46
|
}
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/scroller.mjs
CHANGED
|
@@ -19,7 +19,8 @@ class DSRScroller extends Component {
|
|
|
19
19
|
render() {
|
|
20
20
|
splitChildren(this.props.children);
|
|
21
21
|
const renderPrevNextButton = (direction) => {
|
|
22
|
-
return (jsx("div", { className: direction === 'next' ? 'action-next' : 'action-prev', children: jsx(PButton, { className: "action-button", variant: "secondary", "hide-label": "true", icon: direction === 'next' ? 'arrow-head-right' : 'arrow-head-left', type: "button", tabIndex: -1,
|
|
22
|
+
return (jsx("div", { className: direction === 'next' ? 'action-next' : 'action-prev', children: jsx(PButton, { className: "action-button", variant: "secondary", "hide-label": "true", icon: direction === 'next' ? 'arrow-head-right' : 'arrow-head-left', type: "button", tabIndex: -1, dir: "ltr" // Otherwise icon will be flipped which doesn't make sense in this use case
|
|
23
|
+
, children: direction }) }, direction));
|
|
23
24
|
};
|
|
24
25
|
const style = minifyCss(getComponentCss$s(this.isNextHidden, this.isPrevHidden, this.props.alignScrollIndicator, this.props.scrollbar));
|
|
25
26
|
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs("div", { className: "root", children: [jsx("div", { className: scrollAreaClass, children: jsxs("div", { className: "scroll-wrapper", role: parseAndGetAriaAttributes(this.props.aria)?.role || null, tabIndex: isScrollable(this.isPrevHidden, this.isNextHidden) ? 0 : null, children: [jsx("slot", {}), jsx("div", { className: "trigger" }), jsx("div", { className: "trigger" })] }) }), ['prev', 'next'].map(renderPrevNextButton)] })] }), this.props.children] }));
|
|
@@ -1,16 +1,24 @@
|
|
|
1
1
|
import type { BaseProps } from '../../BaseProps';
|
|
2
|
-
import type { AccordionHeadingTag, AccordionUpdateEventDetail, BreakpointCustomizable, AccordionSize } from '../types';
|
|
2
|
+
import type { AccordionAlignMarker, AccordionBackground, AccordionHeadingTag, AccordionUpdateEventDetail, BreakpointCustomizable, AccordionSize } from '../types';
|
|
3
3
|
export type PAccordionProps = BaseProps & {
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Aligns the marker within the summary section.
|
|
6
|
+
*/
|
|
7
|
+
alignMarker?: AccordionAlignMarker;
|
|
8
|
+
/**
|
|
9
|
+
* Defines the background color. Use `frosted` only on images, videos or gradients.
|
|
10
|
+
*/
|
|
11
|
+
background?: AccordionBackground;
|
|
12
|
+
/**
|
|
13
|
+
* Displays the accordion in compact mode.
|
|
6
14
|
*/
|
|
7
15
|
compact?: boolean;
|
|
8
16
|
/**
|
|
9
|
-
*
|
|
17
|
+
* @deprecated , will be removed in the next major release. Use the `summary` slot instead. Sets the heading text within the summary section.
|
|
10
18
|
*/
|
|
11
19
|
heading?: string;
|
|
12
20
|
/**
|
|
13
|
-
* Sets
|
|
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.
|
|
14
22
|
*/
|
|
15
23
|
headingTag?: AccordionHeadingTag;
|
|
16
24
|
/**
|
|
@@ -18,29 +26,37 @@ export type PAccordionProps = BaseProps & {
|
|
|
18
26
|
*/
|
|
19
27
|
onUpdate?: (event: CustomEvent<AccordionUpdateEventDetail>) => void;
|
|
20
28
|
/**
|
|
21
|
-
*
|
|
29
|
+
* Controls whether the accordion is open or closed.
|
|
22
30
|
*/
|
|
23
31
|
open?: boolean;
|
|
24
32
|
/**
|
|
25
|
-
*
|
|
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).
|
|
26
34
|
*/
|
|
27
35
|
size?: BreakpointCustomizable<AccordionSize>;
|
|
28
36
|
/**
|
|
29
|
-
* @experimental
|
|
37
|
+
* @experimental Makes the summary section sticky at the top while scrolling. Only works with `background="canvas"` or `background="surface"`. Not compatible with `summary-before` or `summary-after` slots.
|
|
30
38
|
*/
|
|
31
39
|
sticky?: boolean;
|
|
32
40
|
};
|
|
33
41
|
export declare const PAccordion: 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"> & {
|
|
34
42
|
/**
|
|
35
|
-
*
|
|
43
|
+
* Aligns the marker within the summary section.
|
|
44
|
+
*/
|
|
45
|
+
alignMarker?: AccordionAlignMarker;
|
|
46
|
+
/**
|
|
47
|
+
* Defines the background color. Use `frosted` only on images, videos or gradients.
|
|
48
|
+
*/
|
|
49
|
+
background?: AccordionBackground;
|
|
50
|
+
/**
|
|
51
|
+
* Displays the accordion in compact mode.
|
|
36
52
|
*/
|
|
37
53
|
compact?: boolean;
|
|
38
54
|
/**
|
|
39
|
-
*
|
|
55
|
+
* @deprecated , will be removed in the next major release. Use the `summary` slot instead. Sets the heading text within the summary section.
|
|
40
56
|
*/
|
|
41
57
|
heading?: string;
|
|
42
58
|
/**
|
|
43
|
-
* Sets
|
|
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.
|
|
44
60
|
*/
|
|
45
61
|
headingTag?: AccordionHeadingTag;
|
|
46
62
|
/**
|
|
@@ -48,15 +64,15 @@ export declare const PAccordion: import("react").ForwardRefExoticComponent<Omit<
|
|
|
48
64
|
*/
|
|
49
65
|
onUpdate?: (event: CustomEvent<AccordionUpdateEventDetail>) => void;
|
|
50
66
|
/**
|
|
51
|
-
*
|
|
67
|
+
* Controls whether the accordion is open or closed.
|
|
52
68
|
*/
|
|
53
69
|
open?: boolean;
|
|
54
70
|
/**
|
|
55
|
-
*
|
|
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).
|
|
56
72
|
*/
|
|
57
73
|
size?: BreakpointCustomizable<AccordionSize>;
|
|
58
74
|
/**
|
|
59
|
-
* @experimental
|
|
75
|
+
* @experimental Makes the summary section sticky at the top while scrolling. Only works with `background="canvas"` or `background="surface"`. Not compatible with `summary-before` or `summary-after` slots.
|
|
60
76
|
*/
|
|
61
77
|
sticky?: boolean;
|
|
62
78
|
} & {
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import { Component } from 'react';
|
|
2
2
|
/**
|
|
3
|
-
* @slot {"name": "
|
|
4
|
-
* @slot {"name": "", "description": "
|
|
3
|
+
* @slot {"name": "summary", "description": "Content for the accordion's summary section. Clicking toggles the accordion open and closed." }
|
|
4
|
+
* @slot {"name": "summary-before", "description": "Content or interactive elements placed before the accordion's summary section." }
|
|
5
|
+
* @slot {"name": "summary-after", "description": "Content or interactive elements placed after the accordion's summary section." }
|
|
6
|
+
* @slot {"name": "heading", "description": "Content for the accordion's heading section. Clicking toggles the accordion open and closed.", "isDeprecated": true }
|
|
7
|
+
* @slot {"name": "", "description": "Main content displayed when the accordion is expanded." }
|
|
5
8
|
*
|
|
6
9
|
* @controlled {"props": ["open"], "event": "update"}
|
|
7
10
|
*/
|
|
8
11
|
export declare class DSRAccordion extends Component<any> {
|
|
9
12
|
host: HTMLElement;
|
|
13
|
+
private hasSummary;
|
|
14
|
+
private hasSummaryBefore;
|
|
15
|
+
private hasSummaryAfter;
|
|
10
16
|
render(): JSX.Element;
|
|
11
17
|
}
|
package/ssr/esm/lib/types.d.ts
CHANGED
|
@@ -621,27 +621,6 @@ declare const FLAG_NAMES: readonly [
|
|
|
621
621
|
"za"
|
|
622
622
|
];
|
|
623
623
|
export type FlagName = typeof FLAG_NAMES[number];
|
|
624
|
-
declare const FORM_STATES: readonly [
|
|
625
|
-
"none",
|
|
626
|
-
"error",
|
|
627
|
-
"success"
|
|
628
|
-
];
|
|
629
|
-
export type FormState = (typeof FORM_STATES)[number];
|
|
630
|
-
declare const BUTTON_ARIA_ATTRIBUTES: readonly [
|
|
631
|
-
"aria-label",
|
|
632
|
-
"aria-description",
|
|
633
|
-
"aria-expanded",
|
|
634
|
-
"aria-pressed",
|
|
635
|
-
"aria-haspopup"
|
|
636
|
-
];
|
|
637
|
-
export type ButtonAriaAttribute = (typeof BUTTON_ARIA_ATTRIBUTES)[number];
|
|
638
|
-
declare const LINK_ARIA_ATTRIBUTES: readonly [
|
|
639
|
-
"aria-label",
|
|
640
|
-
"aria-description",
|
|
641
|
-
"aria-current",
|
|
642
|
-
"aria-haspopup"
|
|
643
|
-
];
|
|
644
|
-
export type LinkAriaAttribute = (typeof LINK_ARIA_ATTRIBUTES)[number];
|
|
645
624
|
declare const breakpoints: readonly [
|
|
646
625
|
"base",
|
|
647
626
|
"xs",
|
|
@@ -658,75 +637,6 @@ export type BreakpointValues<T> = {
|
|
|
658
637
|
base: T;
|
|
659
638
|
};
|
|
660
639
|
export type BreakpointCustomizable<T> = T | BreakpointValues<T>;
|
|
661
|
-
declare const LINK_TARGETS: readonly [
|
|
662
|
-
"_self",
|
|
663
|
-
"_blank",
|
|
664
|
-
"_parent",
|
|
665
|
-
"_top"
|
|
666
|
-
];
|
|
667
|
-
export type LinkTarget = (typeof LINK_TARGETS)[number] | string;
|
|
668
|
-
declare const SCROLLER_ARIA_ATTRIBUTES: readonly [
|
|
669
|
-
"role"
|
|
670
|
-
];
|
|
671
|
-
export type ScrollerAriaAttribute = (typeof SCROLLER_ARIA_ATTRIBUTES)[number];
|
|
672
|
-
export type ScrollerScrollToPosition = {
|
|
673
|
-
scrollPosition: number;
|
|
674
|
-
isSmooth?: boolean;
|
|
675
|
-
} | string;
|
|
676
|
-
declare const SCROLL_INDICATOR_POSITIONS: readonly [
|
|
677
|
-
"top",
|
|
678
|
-
"center"
|
|
679
|
-
];
|
|
680
|
-
export type ScrollerAlignScrollIndicator = (typeof SCROLL_INDICATOR_POSITIONS)[number];
|
|
681
|
-
export type MultiSelectState = FormState;
|
|
682
|
-
export type MultiSelectDropdownDirection = SelectComponentsDropdownDirection;
|
|
683
|
-
export type MultiSelectChangeEventDetail = {
|
|
684
|
-
name: string;
|
|
685
|
-
value: string[];
|
|
686
|
-
};
|
|
687
|
-
export type MultiSelectToggleEventDetail = {
|
|
688
|
-
open: boolean;
|
|
689
|
-
};
|
|
690
|
-
export type SelectState = FormState;
|
|
691
|
-
export type SelectDropdownDirection = SelectComponentsDropdownDirection;
|
|
692
|
-
export type SelectChangeEventDetail = {
|
|
693
|
-
name: string;
|
|
694
|
-
value: string;
|
|
695
|
-
};
|
|
696
|
-
export type SelectToggleEventDetail = {
|
|
697
|
-
open: boolean;
|
|
698
|
-
};
|
|
699
|
-
declare const SELECT_DROPDOWN_DIRECTIONS: readonly [
|
|
700
|
-
"down",
|
|
701
|
-
"up",
|
|
702
|
-
"auto"
|
|
703
|
-
];
|
|
704
|
-
export type SelectComponentsDropdownDirection = (typeof SELECT_DROPDOWN_DIRECTIONS)[number];
|
|
705
|
-
declare const TILE_ASPECT_RATIOS: readonly [
|
|
706
|
-
"1/1",
|
|
707
|
-
"4/3",
|
|
708
|
-
"3/4",
|
|
709
|
-
"16/9",
|
|
710
|
-
"9/16",
|
|
711
|
-
"auto"
|
|
712
|
-
];
|
|
713
|
-
export type TileAspectRatio = (typeof TILE_ASPECT_RATIOS)[number];
|
|
714
|
-
declare const TILE_SIZES: readonly [
|
|
715
|
-
"medium",
|
|
716
|
-
"large",
|
|
717
|
-
"inherit"
|
|
718
|
-
];
|
|
719
|
-
export type TileSize = (typeof TILE_SIZES)[number];
|
|
720
|
-
declare const TILE_WEIGHTS: readonly [
|
|
721
|
-
"regular",
|
|
722
|
-
"semi-bold"
|
|
723
|
-
];
|
|
724
|
-
export type TileWeight = (typeof TILE_WEIGHTS)[number];
|
|
725
|
-
declare const TILE_ALIGNS: readonly [
|
|
726
|
-
"top",
|
|
727
|
-
"bottom"
|
|
728
|
-
];
|
|
729
|
-
export type TileAlign = (typeof TILE_ALIGNS)[number];
|
|
730
640
|
declare const HEADING_SIZES: readonly [
|
|
731
641
|
"small",
|
|
732
642
|
"medium",
|
|
@@ -780,22 +690,29 @@ declare const TYPOGRAPHY_TEXT_WEIGHTS: readonly [
|
|
|
780
690
|
"bold"
|
|
781
691
|
];
|
|
782
692
|
export type TypographyTextWeight = (typeof TYPOGRAPHY_TEXT_WEIGHTS)[number];
|
|
783
|
-
declare const
|
|
784
|
-
"
|
|
785
|
-
"
|
|
693
|
+
declare const LINK_BUTTON_VARIANTS: readonly [
|
|
694
|
+
"primary",
|
|
695
|
+
"secondary"
|
|
786
696
|
];
|
|
787
|
-
export type
|
|
697
|
+
export type LinkButtonVariant = (typeof LINK_BUTTON_VARIANTS)[number];
|
|
788
698
|
declare const BUTTON_TYPES: readonly [
|
|
789
699
|
"button",
|
|
790
700
|
"submit",
|
|
791
701
|
"reset"
|
|
792
702
|
];
|
|
793
703
|
export type ButtonType = (typeof BUTTON_TYPES)[number];
|
|
794
|
-
declare const
|
|
795
|
-
"
|
|
796
|
-
"
|
|
704
|
+
declare const ALIGN_LABELS: readonly [
|
|
705
|
+
"start",
|
|
706
|
+
"end"
|
|
797
707
|
];
|
|
798
|
-
export type
|
|
708
|
+
export type AlignLabel = (typeof ALIGN_LABELS)[number];
|
|
709
|
+
declare const LINK_TARGETS: readonly [
|
|
710
|
+
"_self",
|
|
711
|
+
"_blank",
|
|
712
|
+
"_parent",
|
|
713
|
+
"_top"
|
|
714
|
+
];
|
|
715
|
+
export type LinkTarget = (typeof LINK_TARGETS)[number] | string;
|
|
799
716
|
export type LinkButtonIconName = IconName | "none";
|
|
800
717
|
export type ButtonVariant = LinkButtonVariant;
|
|
801
718
|
export type LinkVariant = LinkButtonVariant;
|
|
@@ -814,15 +731,112 @@ export type SelectedAriaAttributes<T extends keyof AriaAttributes> = Pick<AriaAt
|
|
|
814
731
|
export type SelectedAriaRole<T> = {
|
|
815
732
|
role: Extract<AriaRole, T>;
|
|
816
733
|
};
|
|
817
|
-
declare const
|
|
818
|
-
"
|
|
819
|
-
"
|
|
734
|
+
declare const FORM_STATES: readonly [
|
|
735
|
+
"none",
|
|
736
|
+
"error",
|
|
737
|
+
"success"
|
|
820
738
|
];
|
|
821
|
-
export type
|
|
739
|
+
export type FormState = (typeof FORM_STATES)[number];
|
|
740
|
+
declare const BUTTON_ARIA_ATTRIBUTES: readonly [
|
|
741
|
+
"aria-label",
|
|
742
|
+
"aria-description",
|
|
743
|
+
"aria-expanded",
|
|
744
|
+
"aria-pressed",
|
|
745
|
+
"aria-haspopup"
|
|
746
|
+
];
|
|
747
|
+
export type ButtonAriaAttribute = (typeof BUTTON_ARIA_ATTRIBUTES)[number];
|
|
748
|
+
declare const LINK_ARIA_ATTRIBUTES: readonly [
|
|
749
|
+
"aria-label",
|
|
750
|
+
"aria-description",
|
|
751
|
+
"aria-current",
|
|
752
|
+
"aria-haspopup"
|
|
753
|
+
];
|
|
754
|
+
export type LinkAriaAttribute = (typeof LINK_ARIA_ATTRIBUTES)[number];
|
|
755
|
+
declare const SCROLLER_ARIA_ATTRIBUTES: readonly [
|
|
756
|
+
"role"
|
|
757
|
+
];
|
|
758
|
+
export type ScrollerAriaAttribute = (typeof SCROLLER_ARIA_ATTRIBUTES)[number];
|
|
759
|
+
export type ScrollerScrollToPosition = {
|
|
760
|
+
scrollPosition: number;
|
|
761
|
+
isSmooth?: boolean;
|
|
762
|
+
} | string;
|
|
763
|
+
declare const SCROLL_INDICATOR_POSITIONS: readonly [
|
|
764
|
+
"top",
|
|
765
|
+
"center"
|
|
766
|
+
];
|
|
767
|
+
export type ScrollerAlignScrollIndicator = (typeof SCROLL_INDICATOR_POSITIONS)[number];
|
|
768
|
+
export type MultiSelectState = FormState;
|
|
769
|
+
export type MultiSelectDropdownDirection = SelectComponentsDropdownDirection;
|
|
770
|
+
export type MultiSelectChangeEventDetail = {
|
|
771
|
+
name: string;
|
|
772
|
+
value: string[];
|
|
773
|
+
};
|
|
774
|
+
export type MultiSelectToggleEventDetail = {
|
|
775
|
+
open: boolean;
|
|
776
|
+
};
|
|
777
|
+
export type SelectState = FormState;
|
|
778
|
+
export type SelectDropdownDirection = SelectComponentsDropdownDirection;
|
|
779
|
+
export type SelectChangeEventDetail = {
|
|
780
|
+
name: string;
|
|
781
|
+
value: string;
|
|
782
|
+
};
|
|
783
|
+
export type SelectToggleEventDetail = {
|
|
784
|
+
open: boolean;
|
|
785
|
+
};
|
|
786
|
+
declare const SELECT_DROPDOWN_DIRECTIONS: readonly [
|
|
787
|
+
"down",
|
|
788
|
+
"up",
|
|
789
|
+
"auto"
|
|
790
|
+
];
|
|
791
|
+
export type SelectComponentsDropdownDirection = (typeof SELECT_DROPDOWN_DIRECTIONS)[number];
|
|
792
|
+
declare const TILE_ASPECT_RATIOS: readonly [
|
|
793
|
+
"1/1",
|
|
794
|
+
"4/3",
|
|
795
|
+
"3/4",
|
|
796
|
+
"16/9",
|
|
797
|
+
"9/16",
|
|
798
|
+
"auto"
|
|
799
|
+
];
|
|
800
|
+
export type TileAspectRatio = (typeof TILE_ASPECT_RATIOS)[number];
|
|
801
|
+
declare const TILE_SIZES: readonly [
|
|
802
|
+
"medium",
|
|
803
|
+
"large",
|
|
804
|
+
"inherit"
|
|
805
|
+
];
|
|
806
|
+
export type TileSize = (typeof TILE_SIZES)[number];
|
|
807
|
+
declare const TILE_WEIGHTS: readonly [
|
|
808
|
+
"regular",
|
|
809
|
+
"semi-bold"
|
|
810
|
+
];
|
|
811
|
+
export type TileWeight = (typeof TILE_WEIGHTS)[number];
|
|
812
|
+
declare const TILE_ALIGNS: readonly [
|
|
813
|
+
"top",
|
|
814
|
+
"bottom"
|
|
815
|
+
];
|
|
816
|
+
export type TileAlign = (typeof TILE_ALIGNS)[number];
|
|
817
|
+
declare const ACCORDIONS_BACKGROUNDS: readonly [
|
|
818
|
+
"canvas",
|
|
819
|
+
"surface",
|
|
820
|
+
"frosted",
|
|
821
|
+
"none"
|
|
822
|
+
];
|
|
823
|
+
export type AccordionBackground = (typeof ACCORDIONS_BACKGROUNDS)[number];
|
|
824
|
+
declare const ACCORDION_ALIGN_MARKERS: readonly [
|
|
825
|
+
"start",
|
|
826
|
+
"end"
|
|
827
|
+
];
|
|
828
|
+
export type AccordionAlignMarker = (typeof ACCORDION_ALIGN_MARKERS)[number];
|
|
822
829
|
export type AccordionUpdateEventDetail = {
|
|
823
830
|
open: boolean;
|
|
824
831
|
};
|
|
832
|
+
/** @deprecated */
|
|
825
833
|
export type AccordionHeadingTag = HeadingTag;
|
|
834
|
+
declare const ACCORDION_SIZES: readonly [
|
|
835
|
+
"small",
|
|
836
|
+
"medium"
|
|
837
|
+
];
|
|
838
|
+
/** @deprecated */
|
|
839
|
+
export type AccordionSize = (typeof ACCORDION_SIZES)[number];
|
|
826
840
|
declare const BANNER_STATES: readonly [
|
|
827
841
|
"info",
|
|
828
842
|
"success",
|