@porsche-design-system/components-react 4.0.0-alpha.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 +344 -1
- package/bin/patchRemixRunProcessBrowserGlobalIdentifier.js +0 -0
- package/cjs/lib/components/accordion.wrapper.cjs +3 -3
- package/cjs/lib/components/canvas.wrapper.cjs +3 -3
- package/{styles → emotion}/cjs/index.cjs +3 -3
- package/emotion/esm/index.d.ts +1 -0
- package/emotion/esm/index.mjs +1 -0
- package/{styles → emotion}/package.json +0 -5
- package/esm/lib/components/accordion.wrapper.d.ts +29 -13
- package/esm/lib/components/accordion.wrapper.mjs +3 -3
- package/esm/lib/components/canvas.wrapper.d.ts +9 -1
- package/esm/lib/components/canvas.wrapper.mjs +3 -3
- package/esm/lib/components/display.wrapper.d.ts +2 -2
- package/esm/lib/components/divider.wrapper.d.ts +2 -2
- package/esm/lib/components/heading.wrapper.d.ts +2 -2
- package/esm/lib/components/icon.wrapper.d.ts +2 -2
- package/esm/lib/components/radio-group-option.wrapper.d.ts +2 -0
- package/esm/lib/components/text.wrapper.d.ts +2 -2
- package/esm/lib/components/textarea.wrapper.d.ts +2 -2
- package/esm/lib/types.d.ts +124 -103
- package/global-styles/cn/font-face.css +1 -1
- package/global-styles/cn/index.css +264 -115
- package/global-styles/color-scheme.css +135 -0
- package/global-styles/font-face.css +1 -1
- package/global-styles/index.css +264 -115
- package/global-styles/variables.css +158 -144
- package/package.json +27 -14
- package/scss/_index.scss +1 -0
- package/ssr/cjs/components/dist/styles/esm/styles-entry.cjs +1029 -737
- package/ssr/cjs/components/dist/utils/esm/utils-entry.cjs +37 -29
- 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/canvas.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/radio-group-option.wrapper.cjs +3 -2
- 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/button-tile.cjs +5 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/canvas.cjs +2 -13
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox.cjs +5 -3
- 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 +2 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-email.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-month.cjs +2 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-number.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-password.cjs +2 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-search.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-tel.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-text.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-time.cjs +2 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-url.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-week.cjs +2 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/label.cjs +4 -2
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-tile.cjs +5 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/multi-select.cjs +3 -2
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pin-code.cjs +3 -2
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/radio-group-option.cjs +11 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/radio-group.cjs +3 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/scroller.cjs +2 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/segmented-control.cjs +4 -2
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select.cjs +2 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tag.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/textarea.cjs +1 -0
- package/ssr/esm/components/dist/styles/esm/styles-entry.mjs +1029 -738
- package/ssr/esm/components/dist/utils/esm/utils-entry.mjs +37 -29
- 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/canvas.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/radio-group-option.wrapper.mjs +3 -2
- 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/button-tile.mjs +5 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/canvas.mjs +2 -13
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox.mjs +5 -3
- 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 +2 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-email.mjs +1 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-month.mjs +2 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-number.mjs +1 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-password.mjs +2 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-search.mjs +1 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-tel.mjs +1 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-text.mjs +1 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-time.mjs +2 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-url.mjs +1 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-week.mjs +2 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/label.mjs +4 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-tile.mjs +5 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/multi-select.mjs +3 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pin-code.mjs +5 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/radio-group-option.mjs +12 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/radio-group.mjs +4 -5
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/scroller.mjs +2 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/segmented-control.mjs +4 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select.mjs +2 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tag.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/textarea.mjs +1 -0
- package/ssr/esm/lib/components/accordion.wrapper.d.ts +29 -13
- package/ssr/esm/lib/components/canvas.wrapper.d.ts +9 -1
- package/ssr/esm/lib/components/display.wrapper.d.ts +2 -2
- package/ssr/esm/lib/components/divider.wrapper.d.ts +2 -2
- package/ssr/esm/lib/components/heading.wrapper.d.ts +2 -2
- package/ssr/esm/lib/components/icon.wrapper.d.ts +2 -2
- package/ssr/esm/lib/components/radio-group-option.wrapper.d.ts +2 -0
- package/ssr/esm/lib/components/text.wrapper.d.ts +2 -2
- package/ssr/esm/lib/components/textarea.wrapper.d.ts +2 -2
- package/ssr/esm/lib/dsr-components/accordion.d.ts +8 -2
- package/ssr/esm/lib/dsr-components/canvas.d.ts +0 -3
- package/ssr/esm/lib/dsr-components/checkbox.d.ts +4 -2
- package/ssr/esm/lib/dsr-components/input-date.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/input-email.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/input-month.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/input-number.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/input-password.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/input-search.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/input-tel.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/input-text.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/input-time.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/input-url.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/input-week.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/label.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/multi-select.d.ts +2 -1
- package/ssr/esm/lib/dsr-components/pin-code.d.ts +2 -1
- package/ssr/esm/lib/dsr-components/radio-group-option.d.ts +4 -0
- package/ssr/esm/lib/dsr-components/radio-group.d.ts +2 -1
- package/ssr/esm/lib/dsr-components/segmented-control.d.ts +2 -1
- package/ssr/esm/lib/dsr-components/select.d.ts +2 -1
- package/ssr/esm/lib/dsr-components/textarea.d.ts +1 -0
- package/ssr/esm/lib/types.d.ts +124 -103
- package/tailwindcss/index.css +223 -135
- package/{styles/vanilla-extract → vanilla-extract}/cjs/index.cjs +1 -1
- package/vanilla-extract/esm/index.d.ts +1 -0
- package/vanilla-extract/esm/index.mjs +1 -0
- package/vanilla-extract/package.json +13 -0
- package/ssr/esm/lib/dsr-components/legacy-label.d.ts +0 -14
- package/styles/_index.scss +0 -1
- package/styles/esm/index.d.ts +0 -1
- package/styles/esm/index.mjs +0 -1
- package/styles/vanilla-extract/esm/index.d.ts +0 -1
- package/styles/vanilla-extract/esm/index.mjs +0 -1
|
@@ -3271,62 +3271,68 @@ const getComboboxAriaAttributes = (isOpen, isRequired, labelId, descriptionId, d
|
|
|
3271
3271
|
};
|
|
3272
3272
|
};
|
|
3273
3273
|
|
|
3274
|
-
|
|
3274
|
+
/** @deprecated since v4.0.0, will be removed with next major release. Use 2px instead. */
|
|
3275
|
+
const borderWidthBase = '2px';
|
|
3275
3276
|
|
|
3276
|
-
const
|
|
3277
|
+
const fontPorscheNext = "'Porsche Next','Arial Narrow',Arial,'Heiti SC',SimHei,sans-serif";
|
|
3277
3278
|
|
|
3278
|
-
|
|
3279
|
+
/** @deprecated since v4.0.0, will be removed with next major release. Use fontPorscheNext instead. */
|
|
3280
|
+
const fontFamily = fontPorscheNext;
|
|
3279
3281
|
|
|
3280
|
-
const
|
|
3282
|
+
const leadingNormal = 'calc(6px + 2.125ex)';
|
|
3281
3283
|
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
// @ts-ignore
|
|
3285
|
-
hyphens: 'var(--p-hyphens, auto)',
|
|
3286
|
-
};
|
|
3287
|
-
|
|
3288
|
-
const fontLineHeight$1 = 'calc(6px + 2.125ex)';
|
|
3289
|
-
|
|
3290
|
-
const fontLineHeight = fontLineHeight$1;
|
|
3291
|
-
|
|
3292
|
-
const fontSizeXs = 'clamp(0.81rem, 0.23vw + 0.77rem, 0.88rem)';
|
|
3284
|
+
/** @deprecated since v4.0.0, will be removed with next major release. Use leadingNormal instead */
|
|
3285
|
+
const fontLineHeight = leadingNormal;
|
|
3293
3286
|
|
|
3294
|
-
const
|
|
3287
|
+
const typescaleSm = '1rem';
|
|
3295
3288
|
|
|
3296
|
-
|
|
3289
|
+
/** @deprecated since v4.0.0, will be removed with next major release. Use typescaleSm instead. */
|
|
3290
|
+
const fontSizeTextSmall = typescaleSm;
|
|
3297
3291
|
|
|
3298
|
-
const
|
|
3292
|
+
const typescaleXs = 'clamp(0.81rem, 0.23vw + 0.77rem, 0.88rem)';
|
|
3299
3293
|
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
const fontWeightRegular = fontWeightRegular$1;
|
|
3294
|
+
/** @deprecated since v4.0.0, will be removed with next major release. Use typescaleXs instead. */
|
|
3295
|
+
const fontSizeTextXSmall = typescaleXs;
|
|
3303
3296
|
|
|
3297
|
+
/** @deprecated since v4.0.0, will be removed with next major release. Use 'normal' instead. */
|
|
3304
3298
|
const fontStyleNormal = 'normal';
|
|
3305
3299
|
|
|
3300
|
+
/** @deprecated since v4.0.0, will be removed with next major release. Use 'normal' instead. */
|
|
3306
3301
|
const fontVariant = 'normal';
|
|
3307
3302
|
|
|
3308
|
-
const
|
|
3303
|
+
const fontWeightNormal = 400;
|
|
3309
3304
|
|
|
3310
|
-
|
|
3305
|
+
/** @deprecated since v4.0.0, will be removed with next major release. Use fontWeightNormal instead. */
|
|
3306
|
+
const fontWeightRegular = fontWeightNormal;
|
|
3311
3307
|
|
|
3312
|
-
const
|
|
3308
|
+
const fontHyphenationStyle = {
|
|
3309
|
+
overflowWrap: 'break-word',
|
|
3310
|
+
// @ts-ignore
|
|
3311
|
+
hyphens: 'var(--p-hyphens, auto)',
|
|
3312
|
+
};
|
|
3313
3313
|
|
|
3314
|
-
const
|
|
3314
|
+
const breakpointBase = 0;
|
|
3315
3315
|
|
|
3316
|
-
const
|
|
3316
|
+
const breakpointLg = 1300;
|
|
3317
|
+
|
|
3318
|
+
const breakpointL = breakpointLg;
|
|
3317
3319
|
|
|
3318
3320
|
const breakpointMd = 1000;
|
|
3319
3321
|
|
|
3320
3322
|
const breakpointM = breakpointMd;
|
|
3321
3323
|
|
|
3322
|
-
const
|
|
3324
|
+
const breakpointSm = 760;
|
|
3323
3325
|
|
|
3324
|
-
const
|
|
3326
|
+
const breakpointS = breakpointSm;
|
|
3325
3327
|
|
|
3326
3328
|
const breakpointXl = 1760;
|
|
3327
3329
|
|
|
3328
3330
|
const breakpointXL = breakpointXl;
|
|
3329
3331
|
|
|
3332
|
+
const breakpointXs = 480;
|
|
3333
|
+
|
|
3334
|
+
const breakpointXS = breakpointXs;
|
|
3335
|
+
|
|
3330
3336
|
const breakpoint2Xl = 1920;
|
|
3331
3337
|
|
|
3332
3338
|
const breakpointXXL = breakpoint2Xl;
|
|
@@ -3350,11 +3356,13 @@ const breakpoints = ['base', 'xs', 's', 'm', 'l', 'xl', 'xxl'];
|
|
|
3350
3356
|
const _textFontPartA = `${fontStyleNormal} ${fontVariant} ${fontWeightRegular} `;
|
|
3351
3357
|
const _textFontPartB = `/${fontLineHeight} ${fontFamily}`;
|
|
3352
3358
|
|
|
3359
|
+
/** @deprecated since v4.0.0, will be removed with next major release. Use proseTextXs instead. */
|
|
3353
3360
|
const textXSmallStyle = {
|
|
3354
3361
|
font: `${_textFontPartA}${fontSizeTextXSmall}${_textFontPartB}`,
|
|
3355
3362
|
...fontHyphenationStyle,
|
|
3356
3363
|
};
|
|
3357
3364
|
|
|
3365
|
+
/** @deprecated since v4.0.0, will be removed with next major release. Use proseTextSm instead. */
|
|
3358
3366
|
const textSmallStyle = {
|
|
3359
3367
|
font: `${_textFontPartA}${fontSizeTextSmall}${_textFontPartB}`,
|
|
3360
3368
|
...fontHyphenationStyle,
|
|
@@ -3439,7 +3447,7 @@ const hasShowPickerSupport = () => (hasDocument &&
|
|
|
3439
3447
|
'showPicker' in HTMLInputElement.prototype &&
|
|
3440
3448
|
CSS.supports('selector(::-webkit-calendar-picker-indicator)'));
|
|
3441
3449
|
|
|
3442
|
-
const prefix = `[Porsche Design System v${"4.0.0-
|
|
3450
|
+
const prefix = `[Porsche Design System v${"4.0.0-beta.1"}]` // this part isn't covered by unit tests
|
|
3443
3451
|
;
|
|
3444
3452
|
const consoleError$1 = (...messages) => {
|
|
3445
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/components/canvas.wrapper.mjs
CHANGED
|
@@ -5,22 +5,22 @@ import { useEventCallback, usePrefix, useBrowserLayoutEffect, useMergedClass } f
|
|
|
5
5
|
import { syncRef } from '../../utils.mjs';
|
|
6
6
|
import { DSRCanvas } from '../dsr-components/canvas.mjs';
|
|
7
7
|
|
|
8
|
-
const PCanvas = /*#__PURE__*/ forwardRef(({ onSidebarEndDismiss, onSidebarStartUpdate, sidebarEndOpen = false, sidebarStartOpen = false, className, children, ...rest }, ref) => {
|
|
8
|
+
const PCanvas = /*#__PURE__*/ forwardRef(({ background = 'canvas', onSidebarEndDismiss, onSidebarStartUpdate, sidebarEndOpen = false, sidebarStartOpen = false, className, children, ...rest }, ref) => {
|
|
9
9
|
const elementRef = useRef(undefined);
|
|
10
10
|
useEventCallback(elementRef, 'sidebarEndDismiss', onSidebarEndDismiss);
|
|
11
11
|
useEventCallback(elementRef, 'sidebarStartUpdate', onSidebarStartUpdate);
|
|
12
12
|
const WebComponentTag = usePrefix('p-canvas');
|
|
13
|
-
const propsToSync = [sidebarEndOpen, sidebarStartOpen];
|
|
13
|
+
const propsToSync = [background, sidebarEndOpen, sidebarStartOpen];
|
|
14
14
|
useBrowserLayoutEffect(() => {
|
|
15
15
|
const { current } = elementRef;
|
|
16
|
-
['sidebarEndOpen', 'sidebarStartOpen'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
16
|
+
['background', 'sidebarEndOpen', 'sidebarStartOpen'].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: (jsx(DSRCanvas, { sidebarEndOpen, sidebarStartOpen, children })),
|
|
23
|
+
children: (jsx(DSRCanvas, { background, sidebarEndOpen, sidebarStartOpen, children })),
|
|
24
24
|
}
|
|
25
25
|
: {
|
|
26
26
|
children,
|
|
@@ -5,7 +5,7 @@ import { usePrefix, useBrowserLayoutEffect, useMergedClass } from '../../hooks.m
|
|
|
5
5
|
import { syncRef } from '../../utils.mjs';
|
|
6
6
|
import { DSRRadioGroupOption } from '../dsr-components/radio-group-option.mjs';
|
|
7
7
|
|
|
8
|
-
const PRadioGroupOption = /*#__PURE__*/ forwardRef(({ disabled = false, label, loading = false, value, className, ...rest }, ref) => {
|
|
8
|
+
const PRadioGroupOption = /*#__PURE__*/ forwardRef(({ disabled = false, label, loading = false, value, className, children, ...rest }, ref) => {
|
|
9
9
|
const elementRef = useRef(undefined);
|
|
10
10
|
const WebComponentTag = usePrefix('p-radio-group-option');
|
|
11
11
|
const propsToSync = [disabled, label, loading, value];
|
|
@@ -18,9 +18,10 @@ const PRadioGroupOption = /*#__PURE__*/ forwardRef(({ disabled = false, label, l
|
|
|
18
18
|
// @ts-ignore
|
|
19
19
|
...(!process.browser
|
|
20
20
|
? {
|
|
21
|
-
children: (jsx(DSRRadioGroupOption, { disabled, label, loading, value })),
|
|
21
|
+
children: (jsx(DSRRadioGroupOption, { disabled, label, loading, value, children })),
|
|
22
22
|
}
|
|
23
23
|
: {
|
|
24
|
+
children,
|
|
24
25
|
suppressHydrationWarning: true,
|
|
25
26
|
}),
|
|
26
27
|
'data-ssr': '',
|
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/button-tile.mjs
CHANGED
|
@@ -6,7 +6,6 @@ import { minifyCss } from '../../minifyCss.mjs';
|
|
|
6
6
|
import { getButtonTileCss as getComponentCss$16 } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
|
|
7
7
|
import { isDisabledOrLoading } from '../../../../../../components/dist/utils/esm/utils-entry.mjs';
|
|
8
8
|
import { PButton } from '../components/button.wrapper.mjs';
|
|
9
|
-
import { PButtonPure } from '../components/button-pure.wrapper.mjs';
|
|
10
9
|
|
|
11
10
|
/**
|
|
12
11
|
* @slot {"name": "header", "description": "Renders a header section above the content area." }
|
|
@@ -18,6 +17,8 @@ class DSRButtonTile extends Component {
|
|
|
18
17
|
hasFooterSlot = false;
|
|
19
18
|
render() {
|
|
20
19
|
splitChildren(this.props.children);
|
|
20
|
+
// TODO: BreakpointCustomizable breaks stencils boolean conversion from string to boolean
|
|
21
|
+
const parsedCompact = this.props.compact === 'true' ? true : this.props.compact === 'false' ? false : this.props.compact;
|
|
21
22
|
const buttonProps = {
|
|
22
23
|
variant: 'secondary',
|
|
23
24
|
iconSource: this.props.iconSource,
|
|
@@ -27,9 +28,9 @@ class DSRButtonTile extends Component {
|
|
|
27
28
|
aria: this.props.aria,
|
|
28
29
|
};
|
|
29
30
|
const button = (createElement(PButton, { ...buttonProps, icon: this.props.icon, key: "link-or-button", className: "link-or-button" }, this.props.label));
|
|
30
|
-
const
|
|
31
|
-
const style = minifyCss(getComponentCss$16(isDisabledOrLoading(this.props.disabled, this.props.loading), this.props.aspectRatio, this.props.size, this.props.weight, this.props.align,
|
|
32
|
-
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs("div", { className: "root", children: [jsx("slot", { name: "header" }), jsx("div", { className: "media", children: jsx("slot", {}) }), jsxs("div", { className: "footer", children: [jsx("p", { children: this.props.description }), jsx("slot", { name: "footer" }), typeof
|
|
31
|
+
const buttonCompact = (createElement(PButton, { ...buttonProps, key: "link-or-button-pure", className: "link-or-button-pure", hideLabel: true, compact: true, icon: this.props.icon === 'none' ? 'arrow-right' : this.props.icon }, this.props.label));
|
|
32
|
+
const style = minifyCss(getComponentCss$16(isDisabledOrLoading(this.props.disabled, this.props.loading), this.props.aspectRatio, this.props.size, this.props.weight, this.props.align, parsedCompact, this.props.gradient, this.props.hasFooterSlot, this.props.disabled));
|
|
33
|
+
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs("div", { className: "root", children: [jsx("slot", { name: "header" }), jsx("div", { className: "media", children: jsx("slot", {}) }), jsxs("div", { className: "footer", children: [jsx("p", { children: this.props.description }), jsx("slot", { name: "footer" }), typeof parsedCompact === 'boolean' ? (parsedCompact ? buttonCompact : button) : [buttonCompact, button]] })] })] }), this.props.children] }));
|
|
33
34
|
}
|
|
34
35
|
}
|
|
35
36
|
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/canvas.mjs
CHANGED
|
@@ -6,7 +6,6 @@ import { minifyCss } from '../../minifyCss.mjs';
|
|
|
6
6
|
import { getCanvasCss as getComponentCss$14 } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
|
|
7
7
|
import { PButton } from '../components/button.wrapper.mjs';
|
|
8
8
|
import { PCrest } from '../components/crest.wrapper.mjs';
|
|
9
|
-
import { PFlyout } from '../components/flyout.wrapper.mjs';
|
|
10
9
|
import { PWordmark } from '../components/wordmark.wrapper.mjs';
|
|
11
10
|
|
|
12
11
|
/**
|
|
@@ -24,28 +23,18 @@ import { PWordmark } from '../components/wordmark.wrapper.mjs';
|
|
|
24
23
|
*/
|
|
25
24
|
class DSRCanvas extends Component {
|
|
26
25
|
host;
|
|
27
|
-
isMediaQueryS = false;
|
|
28
|
-
isMediaQueryM = false;
|
|
29
26
|
hasTitle;
|
|
30
27
|
hasSidebarEnd;
|
|
31
|
-
hasSidebarEndHeader;
|
|
32
28
|
hasFooter;
|
|
33
29
|
hasBackground;
|
|
34
|
-
// TODO: Produces bug when using text-field-wrapper which looses focus
|
|
35
|
-
// private sidebarStart: any;
|
|
36
|
-
// private sidebarEnd: any;
|
|
37
|
-
// private root: any;
|
|
38
|
-
// private header: any;
|
|
39
|
-
//
|
|
40
30
|
render() {
|
|
41
31
|
const { namedSlotChildren} = splitChildren(this.props.children);
|
|
42
32
|
const hasTitle = namedSlotChildren.filter(({ props: { slot } }) => slot === 'title').length > 0;
|
|
43
33
|
const hasSidebarEnd = namedSlotChildren.filter(({ props: { slot } }) => slot === 'sidebar-end').length > 0;
|
|
44
|
-
const hasSidebarEndHeader = namedSlotChildren.filter(({ props: { slot } }) => slot === 'sidebar-end-header').length > 0;
|
|
45
34
|
const hasFooter = namedSlotChildren.filter(({ props: { slot } }) => slot === 'footer').length > 0;
|
|
46
35
|
const hasBackground = namedSlotChildren.filter(({ props: { slot } }) => slot === 'background').length > 0;
|
|
47
|
-
const style = minifyCss(getComponentCss$14(this.props.sidebarStartOpen, this.props.sidebarEndOpen));
|
|
48
|
-
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs(
|
|
36
|
+
const style = minifyCss(getComponentCss$14(this.props.sidebarStartOpen, this.props.sidebarEndOpen, this.props.background));
|
|
37
|
+
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs("div", { className: "root", children: [jsxs("header", { className: "header", tabIndex: -1, children: [jsxs("div", { className: "blur", children: [jsx("div", {}), jsx("div", {}), jsx("div", {}), jsx("div", {}), jsx("div", {}), jsx("div", {}), jsx("div", {}), jsx("div", {})] }), jsxs("div", { className: "header__area header__area--start", children: [!this.props.sidebarStartOpen && (jsxs(PButton, { icon: "sidebar", variant: "secondary", compact: true, "hide-label": "true", aria: { 'aria-expanded': this.props.sidebarStartOpen }, children: [this.props.sidebarStartOpen ? 'Close' : 'Open', " navigation sidebar"] })), jsx("slot", { name: "header-start" })] }), jsx(PCrest, { className: "header__crest" }), jsx(PWordmark, { className: "header__wordmark", size: "inherit" }), jsx("div", { className: "header__area header__area--end", children: jsx("slot", { name: "header-end" }) })] }), jsxs("aside", { className: "sidebar sidebar--start", inert: !this.props.sidebarStartOpen, "aria-label": `Navigation sidebar ${this.props.sidebarStartOpen ? 'open' : 'closed'}`, tabIndex: -1, children: [jsxs("div", { className: "sidebar__header sidebar__header--start", children: [jsxs(PButton, { icon: "sidebar", variant: "secondary", compact: true, "hide-label": "true", aria: { 'aria-expanded': this.props.sidebarStartOpen }, children: [this.props.sidebarStartOpen ? 'Close' : 'Open', " navigation sidebar"] }), hasTitle && (jsx("h2", { children: jsx("slot", { name: "title" }) }))] }), jsx("slot", { name: "sidebar-start" })] }), jsx("main", { className: "main", children: jsx("slot", {}) }), hasSidebarEnd && (jsxs("aside", { className: "sidebar sidebar--end", inert: !this.props.sidebarEndOpen, "aria-label": `Settings sidebar ${this.props.sidebarEndOpen ? 'open' : 'closed'}`, tabIndex: -1, children: [jsxs("div", { className: "sidebar__header sidebar__header--end", children: [jsx("slot", { name: "sidebar-end-header" }), jsxs(PButton, { icon: "close", variant: "secondary", compact: true, "hide-label": "true", aria: { 'aria-expanded': this.props.sidebarEndOpen }, children: [this.props.sidebarEndOpen ? 'Close' : 'Open', " settings sidebar"] })] }), jsx("slot", { name: "sidebar-end" })] })), hasFooter && (jsx("footer", { className: "footer", children: jsx("slot", { name: "footer" }) })), hasBackground && jsx("slot", { name: "background" })] })] }), this.props.children] }));
|
|
49
38
|
}
|
|
50
39
|
}
|
|
51
40
|
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox.mjs
CHANGED
|
@@ -11,8 +11,9 @@ import { messageId, StateMessage } from './state-message.mjs';
|
|
|
11
11
|
import { PSpinner } from '../components/spinner.wrapper.mjs';
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
|
-
* @slot {"name": "label", "description": "Shows a label. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."
|
|
15
|
-
* @slot {"name": "
|
|
14
|
+
* @slot {"name": "label", "description": "Shows a label. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
|
|
15
|
+
* @slot {"name": "label-after", "description": "Places additional content after the label text (for content that should not be part of the label, e.g. external links or `p-popover`)."}
|
|
16
|
+
* @slot {"name": "message", "description": "Shows a state message. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
|
|
16
17
|
*/
|
|
17
18
|
class DSRCheckbox extends Component {
|
|
18
19
|
host;
|
|
@@ -22,6 +23,7 @@ class DSRCheckbox extends Component {
|
|
|
22
23
|
initialLoading = false;
|
|
23
24
|
defaultChecked;
|
|
24
25
|
checkboxInputElement;
|
|
26
|
+
externalLabel = null;
|
|
25
27
|
formResetCallback() {
|
|
26
28
|
this.props.internals?.setFormValue(this.props.defaultChecked ? this.props.value : undefined);
|
|
27
29
|
}
|
|
@@ -34,7 +36,7 @@ class DSRCheckbox extends Component {
|
|
|
34
36
|
const { namedSlotChildren} = splitChildren(this.props.children);
|
|
35
37
|
const id = 'x';
|
|
36
38
|
const style = minifyCss(getComponentCss$12(this.props.hideLabel, this.props.state, this.props.disabled, this.props.loading, this.props.compact));
|
|
37
|
-
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs("div", { className: "root", children: [
|
|
39
|
+
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs("div", { className: "root", children: [jsxs("div", { className: "wrapper", children: [jsxs("div", { className: "input-wrapper", children: [jsx("input", { type: "checkbox", id: id, "aria-describedby": `${descriptionId} ${messageId}`, "aria-invalid": this.props.state === 'error' ? 'true' : null, "aria-disabled": this.props.loading || this.props.disabled ? 'true' : null, checked: this.props.checked, form: this.props.form, value: this.props.value, name: this.props.name, onBlur: this.props.onBlur, required: this.props.required, disabled: this.props.disabled }), this.props.loading && jsx(PSpinner, { className: "spinner", size: "inherit", "aria-hidden": "true" })] }), jsx(Label, { hasLabel: this.props.label || namedSlotChildren.filter(({ props: { slot } }) => slot === 'label').length > 0, hasDescription: this.props.description || namedSlotChildren.filter(({ props: { slot } }) => slot === 'description').length > 0, host: null, htmlFor: id, label: this.props.label, isLoading: this.props.loading, isDisabled: this.props.disabled, isRequired: this.props.required })] }), jsx(StateMessage, { hasMessage: (this.props.message || namedSlotChildren.filter(({ props: { slot } }) => slot === 'message').length > 0) && ['success', 'error'].includes(this.props.state), state: this.props.state, message: this.props.message, host: null }), jsx(LoadingMessage, { loading: this.props.loading, initialLoading: this.props.initialLoading })] })] }), this.props.children] }));
|
|
38
40
|
}
|
|
39
41
|
}
|
|
40
42
|
|
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
|
@@ -10,6 +10,7 @@ import { InputBase } from './input-base.mjs';
|
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* @slot {"name": "label", "description": "Shows a label. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
|
|
13
|
+
* @slot {"name": "label-after", "description": "Places additional content after the label text (for content that should not be part of the label, e.g. external links or `p-popover`)."}
|
|
13
14
|
* @slot {"name": "description", "description": "Shows a description. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
|
|
14
15
|
* @slot {"name": "message", "description": "Shows a state message. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
|
|
15
16
|
* @slot {"name": "start", "description": "Shows content at the start of the input (e.g. unit prefix)."}
|
|
@@ -35,7 +36,7 @@ class DSRInputDate extends Component {
|
|
|
35
36
|
splitChildren(this.props.children);
|
|
36
37
|
const style = minifyCss(getComponentCss$R(this.props.disabled, this.props.loading, this.props.hideLabel, this.props.state, this.props.compact, this.props.readOnly));
|
|
37
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() && {
|
|
38
|
-
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" })),
|
|
39
40
|
}) })] }), this.props.children] }));
|
|
40
41
|
}
|
|
41
42
|
}
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-email.mjs
CHANGED
|
@@ -9,6 +9,7 @@ import { InputBase } from './input-base.mjs';
|
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* @slot {"name": "label", "description": "Shows a label. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
|
|
12
|
+
* @slot {"name": "label-after", "description": "Places additional content after the label text (for content that should not be part of the label, e.g. external links or `p-popover`)."}
|
|
12
13
|
* @slot {"name": "description", "description": "Shows a description. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
|
|
13
14
|
* @slot {"name": "message", "description": "Shows a state message. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
|
|
14
15
|
* @slot {"name": "start", "description": "Shows content at the start of the input (e.g. unit prefix)."}
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-month.mjs
CHANGED
|
@@ -10,6 +10,7 @@ import { InputBase } from './input-base.mjs';
|
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* @slot {"name": "label", "description": "Shows a label. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
|
|
13
|
+
* @slot {"name": "label-after", "description": "Places additional content after the label text (for content that should not be part of the label, e.g. external links or `p-popover`)."}
|
|
13
14
|
* @slot {"name": "description", "description": "Shows a description. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
|
|
14
15
|
* @slot {"name": "message", "description": "Shows a state message. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
|
|
15
16
|
* @slot {"name": "start", "description": "Shows content at the start of the input (e.g. unit prefix)."}
|
|
@@ -35,7 +36,7 @@ class DSRInputMonth extends Component {
|
|
|
35
36
|
splitChildren(this.props.children);
|
|
36
37
|
const style = minifyCss(getComponentCss$P(this.props.disabled, this.props.loading, this.props.hideLabel, this.props.state, this.props.compact, this.props.readOnly));
|
|
37
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() && {
|
|
38
|
-
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" })),
|
|
39
40
|
}) })] }), this.props.children] }));
|
|
40
41
|
}
|
|
41
42
|
}
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-number.mjs
CHANGED
|
@@ -9,6 +9,7 @@ import { InputBase } from './input-base.mjs';
|
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* @slot {"name": "label", "description": "Shows a label. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
|
|
12
|
+
* @slot {"name": "label-after", "description": "Places additional content after the label text (for content that should not be part of the label, e.g. external links or `p-popover`)."}
|
|
12
13
|
* @slot {"name": "description", "description": "Shows a description. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
|
|
13
14
|
* @slot {"name": "message", "description": "Shows a state message. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
|
|
14
15
|
* @slot {"name": "start", "description": "Shows content at the start of the input (e.g. unit prefix)."}
|
|
@@ -9,6 +9,7 @@ import { InputBase } from './input-base.mjs';
|
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* @slot {"name": "label", "description": "Shows a label. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
|
|
12
|
+
* @slot {"name": "label-after", "description": "Places additional content after the label text (for content that should not be part of the label, e.g. external links or `p-popover`)."}
|
|
12
13
|
* @slot {"name": "description", "description": "Shows a description. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
|
|
13
14
|
* @slot {"name": "message", "description": "Shows a state message. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
|
|
14
15
|
* @slot {"name": "start", "description": "Shows content at the start of the input (e.g. unit prefix)."}
|
|
@@ -34,7 +35,7 @@ class DSRInputPassword extends Component {
|
|
|
34
35
|
render() {
|
|
35
36
|
splitChildren(this.props.children);
|
|
36
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));
|
|
37
|
-
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] }));
|
|
38
39
|
}
|
|
39
40
|
}
|
|
40
41
|
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-search.mjs
CHANGED
|
@@ -10,6 +10,7 @@ import { InputBase } from './input-base.mjs';
|
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* @slot {"name": "label", "description": "Shows a label. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
|
|
13
|
+
* @slot {"name": "label-after", "description": "Places additional content after the label text (for content that should not be part of the label, e.g. external links or `p-popover`)."}
|
|
13
14
|
* @slot {"name": "description", "description": "Shows a description. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
|
|
14
15
|
* @slot {"name": "message", "description": "Shows a state message. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
|
|
15
16
|
* @slot {"name": "start", "description": "Shows content at the start of the input (e.g. icon)."}
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-tel.mjs
CHANGED
|
@@ -9,6 +9,7 @@ import { InputBase } from './input-base.mjs';
|
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* @slot {"name": "label", "description": "Shows a label. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
|
|
12
|
+
* @slot {"name": "label-after", "description": "Places additional content after the label text (for content that should not be part of the label, e.g. external links or `p-popover`)."}
|
|
12
13
|
* @slot {"name": "description", "description": "Shows a description. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
|
|
13
14
|
* @slot {"name": "message", "description": "Shows a state message. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
|
|
14
15
|
* @slot {"name": "start", "description": "Shows content at the start of the input (e.g. unit prefix)."}
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-text.mjs
CHANGED
|
@@ -7,6 +7,7 @@ import { InputBase } from './input-base.mjs';
|
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* @slot {"name": "label", "description": "Shows a label. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
|
|
10
|
+
* @slot {"name": "label-after", "description": "Places additional content after the label text (for content that should not be part of the label, e.g. external links or `p-popover`)."}
|
|
10
11
|
* @slot {"name": "description", "description": "Shows a description. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
|
|
11
12
|
* @slot {"name": "message", "description": "Shows a state message. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
|
|
12
13
|
* @slot {"name": "start", "description": "Shows content at the start of the input (e.g. unit prefix)."}
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-time.mjs
CHANGED
|
@@ -10,6 +10,7 @@ import { InputBase } from './input-base.mjs';
|
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* @slot {"name": "label", "description": "Shows a label. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
|
|
13
|
+
* @slot {"name": "label-after", "description": "Places additional content after the label text (for content that should not be part of the label, e.g. external links or `p-popover`)."}
|
|
13
14
|
* @slot {"name": "description", "description": "Shows a description. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
|
|
14
15
|
* @slot {"name": "message", "description": "Shows a state message. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
|
|
15
16
|
* @slot {"name": "start", "description": "Shows content at the start of the input (e.g. unit prefix)."}
|
|
@@ -35,7 +36,7 @@ class DSRInputTime extends Component {
|
|
|
35
36
|
splitChildren(this.props.children);
|
|
36
37
|
const style = minifyCss(getComponentCss$J(this.props.disabled, this.props.loading, this.props.hideLabel, this.props.state, this.props.compact, this.props.readOnly));
|
|
37
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() && {
|
|
38
|
-
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" })),
|
|
39
40
|
}) })] }), this.props.children] }));
|
|
40
41
|
}
|
|
41
42
|
}
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-url.mjs
CHANGED
|
@@ -9,6 +9,7 @@ import { InputBase } from './input-base.mjs';
|
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* @slot {"name": "label", "description": "Shows a label. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
|
|
12
|
+
* @slot {"name": "label-after", "description": "Places additional content after the label text (for content that should not be part of the label, e.g. external links or `p-popover`)."}
|
|
12
13
|
* @slot {"name": "description", "description": "Shows a description. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
|
|
13
14
|
* @slot {"name": "message", "description": "Shows a state message. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
|
|
14
15
|
* @slot {"name": "start", "description": "Shows content at the start of the input (e.g. unit prefix)."}
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-week.mjs
CHANGED
|
@@ -10,6 +10,7 @@ import { InputBase } from './input-base.mjs';
|
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* @slot {"name": "label", "description": "Shows a label. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
|
|
13
|
+
* @slot {"name": "label-after", "description": "Places additional content after the label text (for content that should not be part of the label, e.g. external links or `p-popover`)."}
|
|
13
14
|
* @slot {"name": "description", "description": "Shows a description. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
|
|
14
15
|
* @slot {"name": "message", "description": "Shows a state message. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
|
|
15
16
|
* @slot {"name": "start", "description": "Shows content at the start of the input (e.g. unit prefix)."}
|
|
@@ -35,7 +36,7 @@ class DSRInputWeek extends Component {
|
|
|
35
36
|
splitChildren(this.props.children);
|
|
36
37
|
const style = minifyCss(getComponentCss$H(this.props.disabled, this.props.loading, this.props.hideLabel, this.props.state, this.props.compact, this.props.readOnly));
|
|
37
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() && {
|
|
38
|
-
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" })),
|
|
39
40
|
}) })] }), this.props.children] }));
|
|
40
41
|
}
|
|
41
42
|
}
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/label.mjs
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { splitChildren } from '../../splitChildren.mjs';
|
|
2
3
|
import { labelId, descriptionId } from '../../../../../../components/dist/utils/esm/utils-entry.mjs';
|
|
3
4
|
import { Required } from './required.mjs';
|
|
4
5
|
|
|
5
|
-
const Label = ({ hasLabel, hasDescription,
|
|
6
|
+
const Label = ({ hasLabel, hasDescription, children,
|
|
6
7
|
// host,
|
|
7
8
|
label, tag, description, htmlFor, isRequired, isLoading, isDisabled, stopClickPropagation, }) => {
|
|
9
|
+
splitChildren(children);
|
|
8
10
|
const TagType = tag || 'label';
|
|
9
|
-
return (jsxs(Fragment, { children: [hasLabel && (jsx(TagType, { className: "label", id: labelId, "aria-disabled": isLoading || isDisabled ? 'true' : null, htmlFor: htmlFor, children: jsxs(Fragment, { children: [label || jsx("slot", { name: "label" }), isRequired /* && !isParentFieldsetRequired(host) */ && jsx(Required, {})] }) })), hasDescription && (jsx("span", { className: "label", id: descriptionId, "aria-disabled": isLoading || isDisabled ? 'true' : null, children: description || jsx("slot", { name: "description" }) }))] }));
|
|
11
|
+
return (jsxs(Fragment, { children: [hasLabel && (jsxs("div", { className: "label-wrapper", children: [jsx(TagType, { className: "label", id: labelId, "aria-disabled": isLoading || isDisabled ? 'true' : null, htmlFor: htmlFor, children: jsxs(Fragment, { children: [label || jsx("slot", { name: "label" }), isRequired /* && !isParentFieldsetRequired(host) */ && jsx(Required, {})] }) }), jsx("slot", { name: "label-after" })] })), hasDescription && (jsx("span", { className: "label", id: descriptionId, "aria-disabled": isLoading || isDisabled ? 'true' : null, children: description || jsx("slot", { name: "description" }) }))] }));
|
|
10
12
|
};
|
|
11
13
|
|
|
12
14
|
export { Label };
|