@porsche-design-system/components-react 4.0.0-beta.0 → 4.0.0-beta.2
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 +242 -7
- package/cjs/lib/components/accordion.wrapper.cjs +3 -3
- package/cjs/lib/components/scroller.wrapper.cjs +3 -3
- package/cjs/lib/components/table.wrapper.cjs +3 -3
- package/cjs/lib/components/tabs-bar.wrapper.cjs +3 -3
- package/cjs/lib/components/tabs.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/components/scroller.wrapper.d.ts +20 -4
- package/esm/lib/components/scroller.wrapper.mjs +3 -3
- package/esm/lib/components/table.wrapper.d.ts +10 -2
- package/esm/lib/components/table.wrapper.mjs +3 -3
- package/esm/lib/components/tabs-bar.wrapper.d.ts +19 -3
- package/esm/lib/components/tabs-bar.wrapper.mjs +3 -3
- package/esm/lib/components/tabs.wrapper.d.ts +19 -3
- package/esm/lib/components/tabs.wrapper.mjs +3 -3
- package/esm/lib/types.d.ts +137 -105
- package/package.json +13 -2
- package/ssr/cjs/components/dist/styles/esm/styles-entry.cjs +691 -384
- package/ssr/cjs/components/dist/utils/esm/utils-entry.cjs +3 -12
- 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/scroller.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/table.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/tabs-bar.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/tabs.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 +8 -11
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-option.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/stepper-horizontal.cjs +3 -2
- 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 +8 -8
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs.cjs +3 -2
- package/ssr/esm/components/dist/styles/esm/styles-entry.mjs +691 -384
- package/ssr/esm/components/dist/utils/esm/utils-entry.mjs +4 -11
- 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/scroller.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/table.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/tabs-bar.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/tabs.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 +9 -12
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-option.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/stepper-horizontal.mjs +3 -2
- 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 +8 -8
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs.mjs +3 -2
- package/ssr/esm/lib/components/accordion.wrapper.d.ts +29 -13
- package/ssr/esm/lib/components/scroller.wrapper.d.ts +20 -4
- package/ssr/esm/lib/components/table.wrapper.d.ts +10 -2
- package/ssr/esm/lib/components/tabs-bar.wrapper.d.ts +19 -3
- package/ssr/esm/lib/components/tabs.wrapper.d.ts +19 -3
- package/ssr/esm/lib/dsr-components/accordion.d.ts +8 -2
- package/ssr/esm/lib/dsr-components/scroller.d.ts +5 -3
- package/ssr/esm/lib/dsr-components/stepper-horizontal.d.ts +3 -2
- package/ssr/esm/lib/dsr-components/tabs-bar.d.ts +6 -6
- package/ssr/esm/lib/dsr-components/tabs.d.ts +2 -1
- package/ssr/esm/lib/types.d.ts +137 -105
|
@@ -3242,8 +3242,6 @@ const parseJSONAttribute = (attribute) => {
|
|
|
3242
3242
|
// Convert tmp colon to real colon after all other replacements
|
|
3243
3243
|
.replace(/__tmp-colon__/g, ':'));
|
|
3244
3244
|
};
|
|
3245
|
-
|
|
3246
|
-
const hasWindow$1 = typeof window !== 'undefined';
|
|
3247
3245
|
const parseAndGetAriaAttributes = (rawAttributes) => {
|
|
3248
3246
|
if (rawAttributes) {
|
|
3249
3247
|
return Object.fromEntries(Object.entries(parseJSONAttribute(rawAttributes)).map(([key, val]) => [
|
|
@@ -3254,7 +3252,6 @@ const parseAndGetAriaAttributes = (rawAttributes) => {
|
|
|
3254
3252
|
}
|
|
3255
3253
|
return undefined;
|
|
3256
3254
|
};
|
|
3257
|
-
hasWindow$1 && window.matchMedia?.('(forced-colors: active)').matches;
|
|
3258
3255
|
|
|
3259
3256
|
const getButtonBaseAriaAttributes = (isDisabled, isLoading) => {
|
|
3260
3257
|
return {
|
|
@@ -3399,6 +3396,8 @@ supportsConstructableStylesheets();
|
|
|
3399
3396
|
}
|
|
3400
3397
|
})(); // determine it once
|
|
3401
3398
|
|
|
3399
|
+
const hasWindow$1 = typeof window !== 'undefined';
|
|
3400
|
+
|
|
3402
3401
|
const attributeMutationMap = new Map();
|
|
3403
3402
|
hasWindow$1 &&
|
|
3404
3403
|
new MutationObserver((mutations) => {
|
|
@@ -3449,18 +3448,12 @@ const hasShowPickerSupport = () => (hasDocument &&
|
|
|
3449
3448
|
'showPicker' in HTMLInputElement.prototype &&
|
|
3450
3449
|
CSS.supports('selector(::-webkit-calendar-picker-indicator)'));
|
|
3451
3450
|
|
|
3452
|
-
const prefix = `[Porsche Design System v${"4.0.0-beta.
|
|
3451
|
+
const prefix = `[Porsche Design System v${"4.0.0-beta.2"}]` // this part isn't covered by unit tests
|
|
3453
3452
|
;
|
|
3454
3453
|
const consoleError$1 = (...messages) => {
|
|
3455
3454
|
console.error(prefix, ...messages);
|
|
3456
3455
|
};
|
|
3457
3456
|
|
|
3458
|
-
// This class is shared since the popover needs to register a scroll listener to this node in order to hide the popover when the table is scrolled
|
|
3459
|
-
const scrollAreaClass = 'scroll-area';
|
|
3460
|
-
const isScrollable = (isPrevHidden, isNextHidden) => {
|
|
3461
|
-
return !(isPrevHidden && isNextHidden);
|
|
3462
|
-
};
|
|
3463
|
-
|
|
3464
3457
|
/**
|
|
3465
3458
|
* Checks if the current environment supports the native Popover API.
|
|
3466
3459
|
*
|
|
@@ -4015,7 +4008,6 @@ exports.isDisabledOrLoading = isDisabledOrLoading;
|
|
|
4015
4008
|
exports.isElementOfKind = isElementOfKind;
|
|
4016
4009
|
exports.isInfinitePagination = isInfinitePagination;
|
|
4017
4010
|
exports.isListTypeOrdered = isListTypeOrdered;
|
|
4018
|
-
exports.isScrollable = isScrollable;
|
|
4019
4011
|
exports.isSortable = isSortable;
|
|
4020
4012
|
exports.isStateCompleteOrWarning = isStateCompleteOrWarning;
|
|
4021
4013
|
exports.isUrl = isUrl;
|
|
@@ -4023,7 +4015,6 @@ exports.labelId = labelId;
|
|
|
4023
4015
|
exports.observedNodesMap = observedNodesMap;
|
|
4024
4016
|
exports.parseAndGetAriaAttributes = parseAndGetAriaAttributes;
|
|
4025
4017
|
exports.parseJSONAttribute = parseJSONAttribute;
|
|
4026
|
-
exports.scrollAreaClass = scrollAreaClass;
|
|
4027
4018
|
exports.supportsConstructableStylesheets = supportsConstructableStylesheets;
|
|
4028
4019
|
exports.supportsNativePopover = supportsNativePopover;
|
|
4029
4020
|
exports.tempDiv = tempDiv;
|
package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/accordion.wrapper.cjs
CHANGED
|
@@ -7,21 +7,21 @@ var hooks = require('../../hooks.cjs');
|
|
|
7
7
|
var utils = require('../../utils.cjs');
|
|
8
8
|
var accordion = require('../dsr-components/accordion.cjs');
|
|
9
9
|
|
|
10
|
-
const PAccordion = /*#__PURE__*/ react.forwardRef(({ compact, heading, headingTag = 'h2', onUpdate, open, size = 'small', sticky, className, children, ...rest }, ref) => {
|
|
10
|
+
const PAccordion = /*#__PURE__*/ react.forwardRef(({ alignMarker = 'end', background = 'none', compact, heading, headingTag = 'h2', onUpdate, open, size = 'small', sticky, className, children, ...rest }, ref) => {
|
|
11
11
|
const elementRef = react.useRef(undefined);
|
|
12
12
|
hooks.useEventCallback(elementRef, 'update', onUpdate);
|
|
13
13
|
const WebComponentTag = hooks.usePrefix('p-accordion');
|
|
14
|
-
const propsToSync = [compact, heading, headingTag, open, size, sticky];
|
|
14
|
+
const propsToSync = [alignMarker, background, compact, heading, headingTag, open, size, sticky];
|
|
15
15
|
hooks.useBrowserLayoutEffect(() => {
|
|
16
16
|
const { current } = elementRef;
|
|
17
|
-
['compact', 'heading', 'headingTag', 'open', 'size', 'sticky'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
17
|
+
['alignMarker', 'background', 'compact', 'heading', 'headingTag', 'open', 'size', 'sticky'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
18
18
|
}, propsToSync);
|
|
19
19
|
const props = {
|
|
20
20
|
...rest,
|
|
21
21
|
// @ts-ignore
|
|
22
22
|
...(!process.browser
|
|
23
23
|
? {
|
|
24
|
-
children: (jsxRuntime.jsx(accordion.DSRAccordion, { compact, heading, headingTag, open, size, sticky, children })),
|
|
24
|
+
children: (jsxRuntime.jsx(accordion.DSRAccordion, { alignMarker, background, compact, heading, headingTag, open, size, sticky, children })),
|
|
25
25
|
}
|
|
26
26
|
: {
|
|
27
27
|
children,
|
package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/scroller.wrapper.cjs
CHANGED
|
@@ -7,20 +7,20 @@ var hooks = require('../../hooks.cjs');
|
|
|
7
7
|
var utils = require('../../utils.cjs');
|
|
8
8
|
var scroller = require('../dsr-components/scroller.cjs');
|
|
9
9
|
|
|
10
|
-
const PScroller = /*#__PURE__*/ react.forwardRef(({ alignScrollIndicator = 'center', aria, scrollToPosition, scrollbar = false, className, children, ...rest }, ref) => {
|
|
10
|
+
const PScroller = /*#__PURE__*/ react.forwardRef(({ alignScrollIndicator = 'center', aria, compact, scrollToPosition, scrollbar = false, sticky = false, className, children, ...rest }, ref) => {
|
|
11
11
|
const elementRef = react.useRef(undefined);
|
|
12
12
|
const WebComponentTag = hooks.usePrefix('p-scroller');
|
|
13
|
-
const propsToSync = [alignScrollIndicator, aria, scrollToPosition, scrollbar];
|
|
13
|
+
const propsToSync = [alignScrollIndicator, aria, compact, scrollToPosition, scrollbar, sticky];
|
|
14
14
|
hooks.useBrowserLayoutEffect(() => {
|
|
15
15
|
const { current } = elementRef;
|
|
16
|
-
['alignScrollIndicator', 'aria', 'scrollToPosition', 'scrollbar'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
16
|
+
['alignScrollIndicator', 'aria', 'compact', 'scrollToPosition', 'scrollbar', 'sticky'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
17
17
|
}, propsToSync);
|
|
18
18
|
const props = {
|
|
19
19
|
...rest,
|
|
20
20
|
// @ts-ignore
|
|
21
21
|
...(!process.browser
|
|
22
22
|
? {
|
|
23
|
-
children: (jsxRuntime.jsx(scroller.DSRScroller, { alignScrollIndicator, aria, scrollToPosition, scrollbar, children })),
|
|
23
|
+
children: (jsxRuntime.jsx(scroller.DSRScroller, { alignScrollIndicator, aria, compact, scrollToPosition, scrollbar, sticky, children })),
|
|
24
24
|
}
|
|
25
25
|
: {
|
|
26
26
|
children,
|
package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/table.wrapper.cjs
CHANGED
|
@@ -7,21 +7,21 @@ var hooks = require('../../hooks.cjs');
|
|
|
7
7
|
var utils = require('../../utils.cjs');
|
|
8
8
|
var table = require('../dsr-components/table.cjs');
|
|
9
9
|
|
|
10
|
-
const PTable = /*#__PURE__*/ react.forwardRef(({ caption, compact = false, layout = 'auto', onUpdate, className, children, ...rest }, ref) => {
|
|
10
|
+
const PTable = /*#__PURE__*/ react.forwardRef(({ caption, compact = false, layout = 'auto', onUpdate, sticky = false, className, children, ...rest }, ref) => {
|
|
11
11
|
const elementRef = react.useRef(undefined);
|
|
12
12
|
hooks.useEventCallback(elementRef, 'update', onUpdate);
|
|
13
13
|
const WebComponentTag = hooks.usePrefix('p-table');
|
|
14
|
-
const propsToSync = [caption, compact, layout];
|
|
14
|
+
const propsToSync = [caption, compact, layout, sticky];
|
|
15
15
|
hooks.useBrowserLayoutEffect(() => {
|
|
16
16
|
const { current } = elementRef;
|
|
17
|
-
['caption', 'compact', 'layout'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
17
|
+
['caption', 'compact', 'layout', 'sticky'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
18
18
|
}, propsToSync);
|
|
19
19
|
const props = {
|
|
20
20
|
...rest,
|
|
21
21
|
// @ts-ignore
|
|
22
22
|
...(!process.browser
|
|
23
23
|
? {
|
|
24
|
-
children: (jsxRuntime.jsx(table.DSRTable, { caption, compact, layout, children })),
|
|
24
|
+
children: (jsxRuntime.jsx(table.DSRTable, { caption, compact, layout, sticky, children })),
|
|
25
25
|
}
|
|
26
26
|
: {
|
|
27
27
|
children,
|
package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/tabs-bar.wrapper.cjs
CHANGED
|
@@ -7,21 +7,21 @@ var hooks = require('../../hooks.cjs');
|
|
|
7
7
|
var utils = require('../../utils.cjs');
|
|
8
8
|
var tabsBar = require('../dsr-components/tabs-bar.cjs');
|
|
9
9
|
|
|
10
|
-
const PTabsBar = /*#__PURE__*/ react.forwardRef(({ activeTabIndex, onUpdate, size = 'small', weight = 'regular', className, children, ...rest }, ref) => {
|
|
10
|
+
const PTabsBar = /*#__PURE__*/ react.forwardRef(({ activeTabIndex, background = 'none', compact, onUpdate, size = 'small', weight = 'regular', className, children, ...rest }, ref) => {
|
|
11
11
|
const elementRef = react.useRef(undefined);
|
|
12
12
|
hooks.useEventCallback(elementRef, 'update', onUpdate);
|
|
13
13
|
const WebComponentTag = hooks.usePrefix('p-tabs-bar');
|
|
14
|
-
const propsToSync = [activeTabIndex, size, weight];
|
|
14
|
+
const propsToSync = [activeTabIndex, background, compact, size, weight];
|
|
15
15
|
hooks.useBrowserLayoutEffect(() => {
|
|
16
16
|
const { current } = elementRef;
|
|
17
|
-
['activeTabIndex', 'size', 'weight'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
17
|
+
['activeTabIndex', 'background', 'compact', 'size', 'weight'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
18
18
|
}, propsToSync);
|
|
19
19
|
const props = {
|
|
20
20
|
...rest,
|
|
21
21
|
// @ts-ignore
|
|
22
22
|
...(!process.browser
|
|
23
23
|
? {
|
|
24
|
-
children: (jsxRuntime.jsx(tabsBar.DSRTabsBar, { activeTabIndex, size, weight, children })),
|
|
24
|
+
children: (jsxRuntime.jsx(tabsBar.DSRTabsBar, { activeTabIndex, background, compact, size, weight, children })),
|
|
25
25
|
}
|
|
26
26
|
: {
|
|
27
27
|
children,
|
package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/tabs.wrapper.cjs
CHANGED
|
@@ -7,21 +7,21 @@ var hooks = require('../../hooks.cjs');
|
|
|
7
7
|
var utils = require('../../utils.cjs');
|
|
8
8
|
var tabs = require('../dsr-components/tabs.cjs');
|
|
9
9
|
|
|
10
|
-
const PTabs = /*#__PURE__*/ react.forwardRef(({ activeTabIndex = 0, onUpdate, size = 'small', weight = 'regular', className, children, ...rest }, ref) => {
|
|
10
|
+
const PTabs = /*#__PURE__*/ react.forwardRef(({ activeTabIndex = 0, background = 'none', compact, onUpdate, size = 'small', weight = 'regular', className, children, ...rest }, ref) => {
|
|
11
11
|
const elementRef = react.useRef(undefined);
|
|
12
12
|
hooks.useEventCallback(elementRef, 'update', onUpdate);
|
|
13
13
|
const WebComponentTag = hooks.usePrefix('p-tabs');
|
|
14
|
-
const propsToSync = [activeTabIndex, size, weight];
|
|
14
|
+
const propsToSync = [activeTabIndex, background, compact, size, weight];
|
|
15
15
|
hooks.useBrowserLayoutEffect(() => {
|
|
16
16
|
const { current } = elementRef;
|
|
17
|
-
['activeTabIndex', 'size', 'weight'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
17
|
+
['activeTabIndex', 'background', 'compact', 'size', 'weight'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
18
18
|
}, propsToSync);
|
|
19
19
|
const props = {
|
|
20
20
|
...rest,
|
|
21
21
|
// @ts-ignore
|
|
22
22
|
...(!process.browser
|
|
23
23
|
? {
|
|
24
|
-
children: (jsxRuntime.jsx(tabs.DSRTabs, { activeTabIndex, size, weight, children })),
|
|
24
|
+
children: (jsxRuntime.jsx(tabs.DSRTabs, { activeTabIndex, background, compact, size, weight, children })),
|
|
25
25
|
}
|
|
26
26
|
: {
|
|
27
27
|
children,
|
package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/accordion.cjs
CHANGED
|
@@ -1,28 +1,33 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var react = require('react');
|
|
5
|
-
require('../../provider.cjs');
|
|
6
4
|
var splitChildren = require('../../splitChildren.cjs');
|
|
5
|
+
var react = require('react');
|
|
7
6
|
var minifyCss = require('../../minifyCss.cjs');
|
|
8
7
|
var stylesEntry = require('../../../../../../components/dist/styles/esm/styles-entry.cjs');
|
|
9
|
-
var icon_wrapper = require('../components/icon.wrapper.cjs');
|
|
10
8
|
|
|
11
9
|
/**
|
|
12
|
-
* @slot {"name": "
|
|
13
|
-
* @slot {"name": "", "description": "
|
|
10
|
+
* @slot {"name": "summary", "description": "Content for the accordion's summary section. Clicking toggles the accordion open and closed." }
|
|
11
|
+
* @slot {"name": "summary-before", "description": "Content or interactive elements placed before the accordion's summary section." }
|
|
12
|
+
* @slot {"name": "summary-after", "description": "Content or interactive elements placed after the accordion's summary section." }
|
|
13
|
+
* @slot {"name": "heading", "description": "Content for the accordion's heading section. Clicking toggles the accordion open and closed.", "isDeprecated": true }
|
|
14
|
+
* @slot {"name": "", "description": "Main content displayed when the accordion is expanded." }
|
|
14
15
|
*
|
|
15
16
|
* @controlled {"props": ["open"], "event": "update"}
|
|
16
17
|
*/
|
|
17
18
|
class DSRAccordion extends react.Component {
|
|
18
19
|
host;
|
|
20
|
+
hasSummary;
|
|
21
|
+
hasSummaryBefore;
|
|
22
|
+
hasSummaryAfter;
|
|
19
23
|
render() {
|
|
20
|
-
splitChildren.splitChildren(this.props.children);
|
|
21
|
-
const
|
|
22
|
-
const
|
|
24
|
+
const { namedSlotChildren} = splitChildren.splitChildren(this.props.children);
|
|
25
|
+
const hasSummary = namedSlotChildren.filter(({ props: { slot } }) => slot === 'summary').length > 0;
|
|
26
|
+
const hasSummaryBefore = namedSlotChildren.filter(({ props: { slot } }) => slot === 'summary-before').length > 0;
|
|
27
|
+
const hasSummaryAfter = namedSlotChildren.filter(({ props: { slot } }) => slot === 'summary-after').length > 0;
|
|
23
28
|
const Heading = this.props.headingTag;
|
|
24
|
-
const style = minifyCss.minifyCss(stylesEntry.getAccordionCss(this.props.
|
|
25
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsxs(
|
|
29
|
+
const style = minifyCss.minifyCss(stylesEntry.getAccordionCss(this.props.alignMarker, this.props.background, this.props.compact, this.props.open, this.props.sticky, hasSummaryBefore, hasSummaryAfter, this.props.size));
|
|
30
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsxs("details", { ...(this.props.open ? { open: true } : {}), children: [jsxRuntime.jsx("summary", { children: hasSummary ? jsxRuntime.jsx("slot", { name: "summary" }) : jsxRuntime.jsx(Heading, { children: this.props.heading || jsxRuntime.jsx("slot", { name: "heading" }) }) }), hasSummaryBefore && jsxRuntime.jsx("slot", { name: "summary-before" }), hasSummaryAfter && jsxRuntime.jsx("slot", { name: "summary-after" }), jsxRuntime.jsx("div", { children: jsxRuntime.jsx("slot", {}) })] })] }), this.props.children] }));
|
|
26
31
|
}
|
|
27
32
|
}
|
|
28
33
|
|
package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-base.cjs
CHANGED
|
@@ -21,7 +21,8 @@ id, label: label$1, description, loading, initialLoading, required, disabled, st
|
|
|
21
21
|
// refElement,
|
|
22
22
|
start, end, }) => {
|
|
23
23
|
const { namedSlotChildren } = splitChildren.splitChildren(children);
|
|
24
|
-
return (jsxRuntime.jsxs("div", { className: "root", children: [jsxRuntime.jsx(label.Label, { hasLabel: !!label$1 || namedSlotChildren.filter(({ props: { slot } }) => slot === 'label').length > 0, hasDescription: !!description || namedSlotChildren.filter(({ props: { slot } }) => slot === 'description').length > 0, host: null, label: label$1, description: description, htmlFor: id, isRequired: required, isLoading: loading, isDisabled: disabled }), jsxRuntime.jsxs("div", { className: "wrapper", children: [jsxRuntime.jsx("slot", { name: "start" }), start, jsxRuntime.jsx("input", { "aria-describedby": loading ? loadingMessage.loadingId : `${utilsEntry.descriptionId} ${stateMessage.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
|
|
24
|
+
return (jsxRuntime.jsxs("div", { className: "root", children: [jsxRuntime.jsx(label.Label, { hasLabel: !!label$1 || namedSlotChildren.filter(({ props: { slot } }) => slot === 'label').length > 0, hasDescription: !!description || namedSlotChildren.filter(({ props: { slot } }) => slot === 'description').length > 0, host: null, label: label$1, description: description, htmlFor: id, isRequired: required, isLoading: loading, isDisabled: disabled }), jsxRuntime.jsxs("div", { className: "wrapper", children: [jsxRuntime.jsx("slot", { name: "start" }), start, jsxRuntime.jsx("input", { "aria-describedby": loading ? loadingMessage.loadingId : `${utilsEntry.descriptionId} ${stateMessage.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.
|
|
25
|
+
}), end, jsxRuntime.jsx("slot", { name: "end" }), loading && jsxRuntime.jsx(spinner_wrapper.PSpinner, { className: "spinner", size: "inherit", "aria-hidden": "true" })] }), jsxRuntime.jsx(stateMessage.StateMessage, { hasMessage: (message || namedSlotChildren.filter(({ props: { slot } }) => slot === 'message').length > 0) && ['success', 'error'].includes(state), state: state, message: message, host: null }), jsxRuntime.jsx(loadingMessage.LoadingMessage, { loading: loading, initialLoading: initialLoading })] }));
|
|
25
26
|
};
|
|
26
27
|
|
|
27
28
|
exports.InputBase = InputBase;
|
package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-date.cjs
CHANGED
|
@@ -38,7 +38,7 @@ class DSRInputDate extends react.Component {
|
|
|
38
38
|
splitChildren.splitChildren(this.props.children);
|
|
39
39
|
const style = minifyCss.minifyCss(stylesEntry.getInputDateCss(this.props.disabled, this.props.loading, this.props.hideLabel, this.props.state, this.props.compact, this.props.readOnly));
|
|
40
40
|
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsx(inputBase.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, ...(utilsEntry.hasShowPickerSupport() && {
|
|
41
|
-
end: (jsxRuntime.jsx(buttonPure_wrapper.PButtonPure, { hideLabel: true, className: "button", type: "button", icon: "calendar", disabled: this.props.disabled || this.props.readOnly, children: "Open date picker" })),
|
|
41
|
+
end: (jsxRuntime.jsx(buttonPure_wrapper.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" })),
|
|
42
42
|
}) })] }), this.props.children] }));
|
|
43
43
|
}
|
|
44
44
|
}
|
package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-month.cjs
CHANGED
|
@@ -38,7 +38,7 @@ class DSRInputMonth extends react.Component {
|
|
|
38
38
|
splitChildren.splitChildren(this.props.children);
|
|
39
39
|
const style = minifyCss.minifyCss(stylesEntry.getInputMonthCss(this.props.disabled, this.props.loading, this.props.hideLabel, this.props.state, this.props.compact, this.props.readOnly));
|
|
40
40
|
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsx(inputBase.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, ...(utilsEntry.hasShowPickerSupport() && {
|
|
41
|
-
end: (jsxRuntime.jsx(buttonPure_wrapper.PButtonPure, { hideLabel: true, className: "button", type: "button", icon: "calendar", disabled: this.props.disabled || this.props.readOnly, children: "Open date picker" })),
|
|
41
|
+
end: (jsxRuntime.jsx(buttonPure_wrapper.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" })),
|
|
42
42
|
}) })] }), this.props.children] }));
|
|
43
43
|
}
|
|
44
44
|
}
|
|
@@ -37,7 +37,7 @@ class DSRInputPassword extends react.Component {
|
|
|
37
37
|
render() {
|
|
38
38
|
splitChildren.splitChildren(this.props.children);
|
|
39
39
|
const style = minifyCss.minifyCss(stylesEntry.getInputPasswordCss(this.props.disabled, this.props.loading, this.props.hideLabel, this.props.state, this.props.toggle, this.props.compact, this.props.readOnly));
|
|
40
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsx(inputBase.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 && (jsxRuntime.jsx(buttonPure_wrapper.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] }));
|
|
40
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsx(inputBase.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 && (jsxRuntime.jsx(buttonPure_wrapper.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] }));
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
|
package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-time.cjs
CHANGED
|
@@ -38,7 +38,7 @@ class DSRInputTime extends react.Component {
|
|
|
38
38
|
splitChildren.splitChildren(this.props.children);
|
|
39
39
|
const style = minifyCss.minifyCss(stylesEntry.getInputTimeCss(this.props.disabled, this.props.loading, this.props.hideLabel, this.props.state, this.props.compact, this.props.readOnly));
|
|
40
40
|
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsx(inputBase.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, ...(utilsEntry.hasShowPickerSupport() && {
|
|
41
|
-
end: (jsxRuntime.jsx(buttonPure_wrapper.PButtonPure, { hideLabel: true, className: "button", type: "button", icon: "clock", disabled: this.props.disabled || this.props.readOnly, children: "Open time picker" })),
|
|
41
|
+
end: (jsxRuntime.jsx(buttonPure_wrapper.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" })),
|
|
42
42
|
}) })] }), this.props.children] }));
|
|
43
43
|
}
|
|
44
44
|
}
|
package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-week.cjs
CHANGED
|
@@ -38,7 +38,7 @@ class DSRInputWeek extends react.Component {
|
|
|
38
38
|
splitChildren.splitChildren(this.props.children);
|
|
39
39
|
const style = minifyCss.minifyCss(stylesEntry.getInputWeekCss(this.props.disabled, this.props.loading, this.props.hideLabel, this.props.state, this.props.compact, this.props.readOnly));
|
|
40
40
|
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsx(inputBase.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, ...(utilsEntry.hasShowPickerSupport() && {
|
|
41
|
-
end: (jsxRuntime.jsx(buttonPure_wrapper.PButtonPure, { hideLabel: true, className: "button", type: "button", icon: "calendar", disabled: this.props.disabled || this.props.readOnly, children: "Open date picker" })),
|
|
41
|
+
end: (jsxRuntime.jsx(buttonPure_wrapper.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" })),
|
|
42
42
|
}) })] }), this.props.children] }));
|
|
43
43
|
}
|
|
44
44
|
}
|
package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pin-code.cjs
CHANGED
|
@@ -42,7 +42,7 @@ class DSRPinCode extends react.Component {
|
|
|
42
42
|
this.inputElements = [];
|
|
43
43
|
const currentInputId = 'current-input';
|
|
44
44
|
const style = minifyCss.minifyCss(stylesEntry.getPinCodeCss(this.props.hideLabel, this.props.state, this.props.disabled, this.props.loading, this.props.length, this.props.compact));
|
|
45
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsxs("fieldset", { className: "root", disabled: this.props.disabled, ...utilsEntry.getFieldsetAriaAttributes(this.props.required, this.props.state === 'error'), "aria-describedby": this.props.loading ? loadingMessage.loadingId : `${utilsEntry.descriptionId} ${stateMessage.messageId}`, "aria-labelledby": utilsEntry.labelId, children: [jsxRuntime.jsx(label.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 }), jsxRuntime.jsxs("div", { className: "wrapper", children: [Array.from(new Array(this.props.length), (_, index) => (jsxRuntime.jsx("input", { name: this.props.name, form: this.props.form, ...(utilsEntry.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": `${utilsEntry.labelId} ${utilsEntry.descriptionId} ${stateMessage.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
|
|
45
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsxs("fieldset", { className: "root", disabled: this.props.disabled, ...utilsEntry.getFieldsetAriaAttributes(this.props.required, this.props.state === 'error'), "aria-describedby": this.props.loading ? loadingMessage.loadingId : `${utilsEntry.descriptionId} ${stateMessage.messageId}`, "aria-labelledby": utilsEntry.labelId, children: [jsxRuntime.jsx(label.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 }), jsxRuntime.jsxs("div", { className: "wrapper", dir: "ltr", children: [Array.from(new Array(this.props.length), (_, index) => (jsxRuntime.jsx("input", { name: this.props.name, form: this.props.form, ...(utilsEntry.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": `${utilsEntry.labelId} ${utilsEntry.descriptionId} ${stateMessage.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
|
|
46
46
|
, 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 && jsxRuntime.jsx(spinner_wrapper.PSpinner, { className: "spinner", size: "inherit", "aria-hidden": "true" })] }), jsxRuntime.jsx(stateMessage.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 }), jsxRuntime.jsx(loadingMessage.LoadingMessage, { loading: this.props.loading, initialLoading: this.props.initialLoading })] })] }), this.props.children] }));
|
|
47
47
|
}
|
|
48
48
|
}
|
package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/scroller.cjs
CHANGED
|
@@ -1,30 +1,27 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var react = require('react');
|
|
5
|
-
require('../../provider.cjs');
|
|
6
4
|
var splitChildren = require('../../splitChildren.cjs');
|
|
5
|
+
var react = require('react');
|
|
7
6
|
var minifyCss = require('../../minifyCss.cjs');
|
|
8
7
|
var stylesEntry = require('../../../../../../components/dist/styles/esm/styles-entry.cjs');
|
|
9
8
|
var utilsEntry = require('../../../../../../components/dist/utils/esm/utils-entry.cjs');
|
|
10
|
-
var button_wrapper = require('../components/button.wrapper.cjs');
|
|
11
9
|
|
|
12
10
|
/**
|
|
13
11
|
* @slot {"name": "", "description": "Default slot for the scroller content." }
|
|
14
12
|
*/
|
|
15
13
|
class DSRScroller extends react.Component {
|
|
16
14
|
host;
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
isIndicatorPrevVisible = false;
|
|
16
|
+
isIndicatorNextVisible = false;
|
|
19
17
|
intersectionObserver;
|
|
20
|
-
|
|
18
|
+
scrollArea;
|
|
19
|
+
sentinelLeft;
|
|
20
|
+
sentinelRight;
|
|
21
21
|
render() {
|
|
22
22
|
splitChildren.splitChildren(this.props.children);
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
};
|
|
26
|
-
const style = minifyCss.minifyCss(stylesEntry.getScrollerCss(this.isNextHidden, this.isPrevHidden, this.props.alignScrollIndicator, this.props.scrollbar));
|
|
27
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsxs("div", { className: "root", children: [jsxRuntime.jsx("div", { className: utilsEntry.scrollAreaClass, children: jsxRuntime.jsxs("div", { className: "scroll-wrapper", role: utilsEntry.parseAndGetAriaAttributes(this.props.aria)?.role || null, tabIndex: utilsEntry.isScrollable(this.isPrevHidden, this.isNextHidden) ? 0 : null, children: [jsxRuntime.jsx("slot", {}), jsxRuntime.jsx("div", { className: "trigger" }), jsxRuntime.jsx("div", { className: "trigger" })] }) }), ['prev', 'next'].map(renderPrevNextButton)] })] }), this.props.children] }));
|
|
23
|
+
const style = minifyCss.minifyCss(stylesEntry.getScrollerCss(this.props.isIndicatorPrevVisible, this.props.isIndicatorNextVisible, this.props.sticky, this.props.scrollbar, this.props.compact));
|
|
24
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsxs("div", { className: "root", children: [jsxRuntime.jsx("span", { className: "prev" }), jsxRuntime.jsx("span", { className: "next" }), jsxRuntime.jsxs("div", { className: "scroll", role: utilsEntry.parseAndGetAriaAttributes(this.props.aria)?.role || null, tabIndex: this.props.isIndicatorPrevVisible || this.props.isIndicatorNextVisible ? 0 : null, children: [jsxRuntime.jsx("span", { className: "sentinel" }), jsxRuntime.jsx("slot", {}), jsxRuntime.jsx("span", { className: "sentinel" })] })] })] }), this.props.children] }));
|
|
28
25
|
}
|
|
29
26
|
}
|
|
30
27
|
|
package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-option.cjs
CHANGED
|
@@ -17,7 +17,7 @@ class DSRSelectOption extends react.Component {
|
|
|
17
17
|
splitChildren.splitChildren(this.props.children);
|
|
18
18
|
const { selected: isSelected, highlighted, hidden } = this.props;
|
|
19
19
|
const isDisabled = this.props.disabled || this.props.disabledParent;
|
|
20
|
-
const style = minifyCss.minifyCss(stylesEntry.getSelectOptionCss(
|
|
20
|
+
const style = minifyCss.minifyCss(stylesEntry.getSelectOptionCss(isDisabled));
|
|
21
21
|
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } })
|
|
22
22
|
// TODO: get rid of ARIA sprouting and use `elementInternals` API when AXE-CORE supports it: https://github.com/dequelabs/axe-core/issues/4259
|
|
23
23
|
, "// TODO: get rid of ARIA sprouting and use `elementInternals` API when AXE-CORE supports it: https://github.com/dequelabs/axe-core/issues/4259", jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs("div", { className: Object.entries({
|
|
@@ -13,9 +13,10 @@ var scroller_wrapper = require('../components/scroller.wrapper.cjs');
|
|
|
13
13
|
*/
|
|
14
14
|
class DSRStepperHorizontal extends react.Component {
|
|
15
15
|
host;
|
|
16
|
+
scroller;
|
|
16
17
|
stepperHorizontalItems = [];
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
slot;
|
|
19
|
+
resizeObserver;
|
|
19
20
|
render() {
|
|
20
21
|
const { children, otherChildren } = splitChildren.splitChildren(this.props.children);
|
|
21
22
|
const manipulatedChildren = children.map((child) => typeof child === 'object' && 'props' in child && otherChildren.includes(child)
|
package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/table.cjs
CHANGED
|
@@ -22,7 +22,7 @@ class DSRTable extends react.Component {
|
|
|
22
22
|
? { 'aria-label': this.props.caption }
|
|
23
23
|
: hasSlottedCaption && { 'aria-labelledby': captionId };
|
|
24
24
|
const style = minifyCss.minifyCss(stylesEntry.getTableCss(this.props.compact, this.props.layout));
|
|
25
|
-
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: [hasSlottedCaption && (jsxRuntime.jsx("div", { id: captionId, className: "caption", children: jsxRuntime.jsx("slot", { name: "caption" }) })), jsxRuntime.jsx(scroller_wrapper.PScroller, { scrollbar: true, children: jsxRuntime.jsx("div", { className: "table", role: "table", ...tableAttr, children: jsxRuntime.jsx("slot", {}) }) })] })] }), this.props.children] }));
|
|
25
|
+
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: [hasSlottedCaption && (jsxRuntime.jsx("div", { id: captionId, className: "caption", children: jsxRuntime.jsx("slot", { name: "caption" }) })), jsxRuntime.jsx(scroller_wrapper.PScroller, { scrollbar: true, compact: this.props.compact, sticky: this.props.sticky, children: jsxRuntime.jsx("div", { className: "table", role: "table", ...tableAttr, children: jsxRuntime.jsx("slot", {}) }) })] })] }), this.props.children] }));
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
|
package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs-bar.cjs
CHANGED
|
@@ -15,13 +15,13 @@ var scroller_wrapper = require('../components/scroller.wrapper.cjs');
|
|
|
15
15
|
*/
|
|
16
16
|
class DSRTabsBar extends react.Component {
|
|
17
17
|
host;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
direction = 'next';
|
|
18
|
+
tabs = [];
|
|
19
|
+
bar;
|
|
20
|
+
scroller;
|
|
21
|
+
slot;
|
|
23
22
|
hasPTabsParent;
|
|
24
|
-
|
|
23
|
+
isTabList;
|
|
24
|
+
resizeObserver;
|
|
25
25
|
render() {
|
|
26
26
|
const { children, otherChildren } = splitChildren.splitChildren(this.props.children);
|
|
27
27
|
const manipulatedChildren = children.map((child, i) => typeof child === 'object' && 'props' in child && otherChildren.includes(child)
|
|
@@ -45,8 +45,8 @@ class DSRTabsBar extends react.Component {
|
|
|
45
45
|
}
|
|
46
46
|
: child
|
|
47
47
|
: child);
|
|
48
|
-
const style = minifyCss.minifyCss(stylesEntry.getTabsBarCss(this.props.size, this.props.
|
|
49
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsxs(scroller_wrapper.PScroller, { className: "scroller", ...(this.props.
|
|
48
|
+
const style = minifyCss.minifyCss(stylesEntry.getTabsBarCss(this.props.background, this.props.size, this.props.compact));
|
|
49
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsxs(scroller_wrapper.PScroller, { className: "scroller", compact: this.props.compact, ...(this.props.isTabList && { aria: { role: 'tablist' } }), children: [jsxRuntime.jsx("slot", {}), jsxRuntime.jsx("span", { className: "bar" })] })] }), manipulatedChildren] }));
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
|
|
@@ -15,14 +15,15 @@ var tabsBar_wrapper = require('../components/tabs-bar.wrapper.cjs');
|
|
|
15
15
|
*/
|
|
16
16
|
class DSRTabs extends react.Component {
|
|
17
17
|
host;
|
|
18
|
-
|
|
18
|
+
tabsItems = [];
|
|
19
|
+
slot;
|
|
19
20
|
render() {
|
|
20
21
|
const { children, otherChildren } = splitChildren.splitChildren(this.props.children);
|
|
21
22
|
const manipulatedChildren = children.map((child, i) => typeof child === 'object' && 'props' in child && otherChildren.includes(child)
|
|
22
23
|
? { ...child, props: { ...child.props, theme: this.props.theme, hidden: this.props.activeTabIndex !== i ? true : null } }
|
|
23
24
|
: child);
|
|
24
25
|
const style = minifyCss.minifyCss(stylesEntry.getTabsCss());
|
|
25
|
-
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(tabsBar_wrapper.PTabsBar, { className: "root", size: this.props.size,
|
|
26
|
+
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(tabsBar_wrapper.PTabsBar, { className: "root", size: this.props.size, background: this.props.background, compact: this.props.compact, activeTabIndex: this.props.activeTabIndex, children: otherChildren.map((tab, index) => (jsxRuntime.jsx("button", { type: "button", children: typeof tab === 'object' && 'props' in tab && tab.props.label }, index))) }), jsxRuntime.jsx("slot", {})] })] }), manipulatedChildren] }));
|
|
26
27
|
}
|
|
27
28
|
}
|
|
28
29
|
|