@porsche-design-system/components-react 4.0.0-alpha.0 → 4.0.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. package/CHANGELOG.md +187 -1
  2. package/bin/patchRemixRunProcessBrowserGlobalIdentifier.js +0 -0
  3. package/cjs/lib/components/canvas.wrapper.cjs +3 -3
  4. package/{styles → emotion}/cjs/index.cjs +3 -3
  5. package/emotion/esm/index.d.ts +1 -0
  6. package/emotion/esm/index.mjs +1 -0
  7. package/{styles → emotion}/package.json +0 -5
  8. package/esm/lib/components/canvas.wrapper.d.ts +9 -1
  9. package/esm/lib/components/canvas.wrapper.mjs +3 -3
  10. package/esm/lib/components/display.wrapper.d.ts +2 -2
  11. package/esm/lib/components/divider.wrapper.d.ts +2 -2
  12. package/esm/lib/components/heading.wrapper.d.ts +2 -2
  13. package/esm/lib/components/icon.wrapper.d.ts +2 -2
  14. package/esm/lib/components/radio-group-option.wrapper.d.ts +2 -0
  15. package/esm/lib/components/text.wrapper.d.ts +2 -2
  16. package/esm/lib/components/textarea.wrapper.d.ts +2 -2
  17. package/esm/lib/types.d.ts +8 -1
  18. package/global-styles/cn/font-face.css +1 -1
  19. package/global-styles/cn/index.css +264 -115
  20. package/global-styles/color-scheme.css +135 -0
  21. package/global-styles/font-face.css +1 -1
  22. package/global-styles/index.css +264 -115
  23. package/global-styles/variables.css +158 -144
  24. package/package.json +16 -14
  25. package/scss/_index.scss +1 -0
  26. package/ssr/cjs/components/dist/styles/esm/styles-entry.cjs +671 -600
  27. package/ssr/cjs/components/dist/utils/esm/utils-entry.cjs +37 -29
  28. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/canvas.wrapper.cjs +4 -4
  29. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/radio-group-option.wrapper.cjs +3 -2
  30. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button-tile.cjs +5 -4
  31. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/canvas.cjs +2 -13
  32. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox.cjs +5 -3
  33. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-date.cjs +1 -0
  34. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-email.cjs +1 -0
  35. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-month.cjs +1 -0
  36. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-number.cjs +1 -0
  37. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-password.cjs +1 -0
  38. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-search.cjs +1 -0
  39. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-tel.cjs +1 -0
  40. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-text.cjs +1 -0
  41. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-time.cjs +1 -0
  42. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-url.cjs +1 -0
  43. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-week.cjs +1 -0
  44. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/label.cjs +4 -2
  45. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-tile.cjs +5 -4
  46. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/multi-select.cjs +3 -2
  47. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pin-code.cjs +3 -2
  48. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/radio-group-option.cjs +11 -3
  49. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/radio-group.cjs +3 -4
  50. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/segmented-control.cjs +4 -2
  51. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select.cjs +2 -1
  52. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tag.cjs +1 -1
  53. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/textarea.cjs +1 -0
  54. package/ssr/esm/components/dist/styles/esm/styles-entry.mjs +671 -601
  55. package/ssr/esm/components/dist/utils/esm/utils-entry.mjs +37 -29
  56. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/canvas.wrapper.mjs +4 -4
  57. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/radio-group-option.wrapper.mjs +3 -2
  58. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button-tile.mjs +5 -4
  59. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/canvas.mjs +2 -13
  60. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox.mjs +5 -3
  61. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-date.mjs +1 -0
  62. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-email.mjs +1 -0
  63. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-month.mjs +1 -0
  64. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-number.mjs +1 -0
  65. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-password.mjs +1 -0
  66. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-search.mjs +1 -0
  67. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-tel.mjs +1 -0
  68. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-text.mjs +1 -0
  69. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-time.mjs +1 -0
  70. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-url.mjs +1 -0
  71. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-week.mjs +1 -0
  72. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/label.mjs +4 -2
  73. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-tile.mjs +5 -4
  74. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/multi-select.mjs +3 -2
  75. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pin-code.mjs +5 -4
  76. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/radio-group-option.mjs +12 -4
  77. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/radio-group.mjs +4 -5
  78. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/segmented-control.mjs +4 -2
  79. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select.mjs +2 -1
  80. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tag.mjs +1 -1
  81. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/textarea.mjs +1 -0
  82. package/ssr/esm/lib/components/canvas.wrapper.d.ts +9 -1
  83. package/ssr/esm/lib/components/display.wrapper.d.ts +2 -2
  84. package/ssr/esm/lib/components/divider.wrapper.d.ts +2 -2
  85. package/ssr/esm/lib/components/heading.wrapper.d.ts +2 -2
  86. package/ssr/esm/lib/components/icon.wrapper.d.ts +2 -2
  87. package/ssr/esm/lib/components/radio-group-option.wrapper.d.ts +2 -0
  88. package/ssr/esm/lib/components/text.wrapper.d.ts +2 -2
  89. package/ssr/esm/lib/components/textarea.wrapper.d.ts +2 -2
  90. package/ssr/esm/lib/dsr-components/canvas.d.ts +0 -3
  91. package/ssr/esm/lib/dsr-components/checkbox.d.ts +4 -2
  92. package/ssr/esm/lib/dsr-components/input-date.d.ts +1 -0
  93. package/ssr/esm/lib/dsr-components/input-email.d.ts +1 -0
  94. package/ssr/esm/lib/dsr-components/input-month.d.ts +1 -0
  95. package/ssr/esm/lib/dsr-components/input-number.d.ts +1 -0
  96. package/ssr/esm/lib/dsr-components/input-password.d.ts +1 -0
  97. package/ssr/esm/lib/dsr-components/input-search.d.ts +1 -0
  98. package/ssr/esm/lib/dsr-components/input-tel.d.ts +1 -0
  99. package/ssr/esm/lib/dsr-components/input-text.d.ts +1 -0
  100. package/ssr/esm/lib/dsr-components/input-time.d.ts +1 -0
  101. package/ssr/esm/lib/dsr-components/input-url.d.ts +1 -0
  102. package/ssr/esm/lib/dsr-components/input-week.d.ts +1 -0
  103. package/ssr/esm/lib/dsr-components/label.d.ts +1 -0
  104. package/ssr/esm/lib/dsr-components/multi-select.d.ts +2 -1
  105. package/ssr/esm/lib/dsr-components/pin-code.d.ts +2 -1
  106. package/ssr/esm/lib/dsr-components/radio-group-option.d.ts +4 -0
  107. package/ssr/esm/lib/dsr-components/radio-group.d.ts +2 -1
  108. package/ssr/esm/lib/dsr-components/segmented-control.d.ts +2 -1
  109. package/ssr/esm/lib/dsr-components/select.d.ts +2 -1
  110. package/ssr/esm/lib/dsr-components/textarea.d.ts +1 -0
  111. package/ssr/esm/lib/types.d.ts +8 -1
  112. package/tailwindcss/index.css +223 -135
  113. package/{styles/vanilla-extract → vanilla-extract}/cjs/index.cjs +1 -1
  114. package/vanilla-extract/esm/index.d.ts +1 -0
  115. package/vanilla-extract/esm/index.mjs +1 -0
  116. package/vanilla-extract/package.json +13 -0
  117. package/ssr/esm/lib/dsr-components/legacy-label.d.ts +0 -14
  118. package/styles/_index.scss +0 -1
  119. package/styles/esm/index.d.ts +0 -1
  120. package/styles/esm/index.mjs +0 -1
  121. package/styles/vanilla-extract/esm/index.d.ts +0 -1
  122. package/styles/vanilla-extract/esm/index.mjs +0 -1
@@ -3273,62 +3273,68 @@ const getComboboxAriaAttributes = (isOpen, isRequired, labelId, descriptionId, d
3273
3273
  };
3274
3274
  };
3275
3275
 
3276
- const borderWidthRegular = '2px';
3276
+ /** @deprecated since v4.0.0, will be removed with next major release. Use 2px instead. */
3277
+ const borderWidthBase = '2px';
3277
3278
 
3278
- const borderWidthBase = borderWidthRegular;
3279
+ const fontPorscheNext = "'Porsche Next','Arial Narrow',Arial,'Heiti SC',SimHei,sans-serif";
3279
3280
 
3280
- const fontFamily$1 = "'Porsche Next','Arial Narrow',Arial,'Heiti SC',SimHei,sans-serif";
3281
+ /** @deprecated since v4.0.0, will be removed with next major release. Use fontPorscheNext instead. */
3282
+ const fontFamily = fontPorscheNext;
3281
3283
 
3282
- const fontFamily = fontFamily$1;
3284
+ const leadingNormal = 'calc(6px + 2.125ex)';
3283
3285
 
3284
- const fontHyphenationStyle = {
3285
- overflowWrap: 'break-word',
3286
- // @ts-ignore
3287
- hyphens: 'var(--p-hyphens, auto)',
3288
- };
3289
-
3290
- const fontLineHeight$1 = 'calc(6px + 2.125ex)';
3291
-
3292
- const fontLineHeight = fontLineHeight$1;
3293
-
3294
- const fontSizeXs = 'clamp(0.81rem, 0.23vw + 0.77rem, 0.88rem)';
3286
+ /** @deprecated since v4.0.0, will be removed with next major release. Use leadingNormal instead */
3287
+ const fontLineHeight = leadingNormal;
3295
3288
 
3296
- const fontSizeTextXSmall = fontSizeXs;
3289
+ const typescaleSm = '1rem';
3297
3290
 
3298
- const fontSizeSm = '1rem';
3291
+ /** @deprecated since v4.0.0, will be removed with next major release. Use typescaleSm instead. */
3292
+ const fontSizeTextSmall = typescaleSm;
3299
3293
 
3300
- const fontSizeTextSmall = fontSizeSm;
3294
+ const typescaleXs = 'clamp(0.81rem, 0.23vw + 0.77rem, 0.88rem)';
3301
3295
 
3302
- const fontWeightRegular$1 = 400;
3303
-
3304
- const fontWeightRegular = fontWeightRegular$1;
3296
+ /** @deprecated since v4.0.0, will be removed with next major release. Use typescaleXs instead. */
3297
+ const fontSizeTextXSmall = typescaleXs;
3305
3298
 
3299
+ /** @deprecated since v4.0.0, will be removed with next major release. Use 'normal' instead. */
3306
3300
  const fontStyleNormal = 'normal';
3307
3301
 
3302
+ /** @deprecated since v4.0.0, will be removed with next major release. Use 'normal' instead. */
3308
3303
  const fontVariant = 'normal';
3309
3304
 
3310
- const breakpointBase = 0;
3305
+ const fontWeightNormal = 400;
3311
3306
 
3312
- const breakpointXs = 480;
3307
+ /** @deprecated since v4.0.0, will be removed with next major release. Use fontWeightNormal instead. */
3308
+ const fontWeightRegular = fontWeightNormal;
3313
3309
 
3314
- const breakpointXS = breakpointXs;
3310
+ const fontHyphenationStyle = {
3311
+ overflowWrap: 'break-word',
3312
+ // @ts-ignore
3313
+ hyphens: 'var(--p-hyphens, auto)',
3314
+ };
3315
3315
 
3316
- const breakpointSm = 760;
3316
+ const breakpointBase = 0;
3317
3317
 
3318
- const breakpointS = breakpointSm;
3318
+ const breakpointLg = 1300;
3319
+
3320
+ const breakpointL = breakpointLg;
3319
3321
 
3320
3322
  const breakpointMd = 1000;
3321
3323
 
3322
3324
  const breakpointM = breakpointMd;
3323
3325
 
3324
- const breakpointLg = 1300;
3326
+ const breakpointSm = 760;
3325
3327
 
3326
- const breakpointL = breakpointLg;
3328
+ const breakpointS = breakpointSm;
3327
3329
 
3328
3330
  const breakpointXl = 1760;
3329
3331
 
3330
3332
  const breakpointXL = breakpointXl;
3331
3333
 
3334
+ const breakpointXs = 480;
3335
+
3336
+ const breakpointXS = breakpointXs;
3337
+
3332
3338
  const breakpoint2Xl = 1920;
3333
3339
 
3334
3340
  const breakpointXXL = breakpoint2Xl;
@@ -3352,11 +3358,13 @@ const breakpoints = ['base', 'xs', 's', 'm', 'l', 'xl', 'xxl'];
3352
3358
  const _textFontPartA = `${fontStyleNormal} ${fontVariant} ${fontWeightRegular} `;
3353
3359
  const _textFontPartB = `/${fontLineHeight} ${fontFamily}`;
3354
3360
 
3361
+ /** @deprecated since v4.0.0, will be removed with next major release. Use proseTextXs instead. */
3355
3362
  const textXSmallStyle = {
3356
3363
  font: `${_textFontPartA}${fontSizeTextXSmall}${_textFontPartB}`,
3357
3364
  ...fontHyphenationStyle,
3358
3365
  };
3359
3366
 
3367
+ /** @deprecated since v4.0.0, will be removed with next major release. Use proseTextSm instead. */
3360
3368
  const textSmallStyle = {
3361
3369
  font: `${_textFontPartA}${fontSizeTextSmall}${_textFontPartB}`,
3362
3370
  ...fontHyphenationStyle,
@@ -3441,7 +3449,7 @@ const hasShowPickerSupport = () => (hasDocument &&
3441
3449
  'showPicker' in HTMLInputElement.prototype &&
3442
3450
  CSS.supports('selector(::-webkit-calendar-picker-indicator)'));
3443
3451
 
3444
- const prefix = `[Porsche Design System v${"4.0.0-alpha.0"}]` // this part isn't covered by unit tests
3452
+ const prefix = `[Porsche Design System v${"4.0.0-beta.0"}]` // this part isn't covered by unit tests
3445
3453
  ;
3446
3454
  const consoleError$1 = (...messages) => {
3447
3455
  console.error(prefix, ...messages);
@@ -7,22 +7,22 @@ var hooks = require('../../hooks.cjs');
7
7
  var utils = require('../../utils.cjs');
8
8
  var canvas = require('../dsr-components/canvas.cjs');
9
9
 
10
- const PCanvas = /*#__PURE__*/ react.forwardRef(({ onSidebarEndDismiss, onSidebarStartUpdate, sidebarEndOpen = false, sidebarStartOpen = false, className, children, ...rest }, ref) => {
10
+ const PCanvas = /*#__PURE__*/ react.forwardRef(({ background = 'canvas', onSidebarEndDismiss, onSidebarStartUpdate, sidebarEndOpen = false, sidebarStartOpen = false, className, children, ...rest }, ref) => {
11
11
  const elementRef = react.useRef(undefined);
12
12
  hooks.useEventCallback(elementRef, 'sidebarEndDismiss', onSidebarEndDismiss);
13
13
  hooks.useEventCallback(elementRef, 'sidebarStartUpdate', onSidebarStartUpdate);
14
14
  const WebComponentTag = hooks.usePrefix('p-canvas');
15
- const propsToSync = [sidebarEndOpen, sidebarStartOpen];
15
+ const propsToSync = [background, sidebarEndOpen, sidebarStartOpen];
16
16
  hooks.useBrowserLayoutEffect(() => {
17
17
  const { current } = elementRef;
18
- ['sidebarEndOpen', 'sidebarStartOpen'].forEach((propName, i) => (current[propName] = propsToSync[i]));
18
+ ['background', 'sidebarEndOpen', 'sidebarStartOpen'].forEach((propName, i) => (current[propName] = propsToSync[i]));
19
19
  }, propsToSync);
20
20
  const props = {
21
21
  ...rest,
22
22
  // @ts-ignore
23
23
  ...(!process.browser
24
24
  ? {
25
- children: (jsxRuntime.jsx(canvas.DSRCanvas, { sidebarEndOpen, sidebarStartOpen, children })),
25
+ children: (jsxRuntime.jsx(canvas.DSRCanvas, { background, sidebarEndOpen, sidebarStartOpen, children })),
26
26
  }
27
27
  : {
28
28
  children,
@@ -7,7 +7,7 @@ var hooks = require('../../hooks.cjs');
7
7
  var utils = require('../../utils.cjs');
8
8
  var radioGroupOption = require('../dsr-components/radio-group-option.cjs');
9
9
 
10
- const PRadioGroupOption = /*#__PURE__*/ react.forwardRef(({ disabled = false, label, loading = false, value, className, ...rest }, ref) => {
10
+ const PRadioGroupOption = /*#__PURE__*/ react.forwardRef(({ disabled = false, label, loading = false, value, className, children, ...rest }, ref) => {
11
11
  const elementRef = react.useRef(undefined);
12
12
  const WebComponentTag = hooks.usePrefix('p-radio-group-option');
13
13
  const propsToSync = [disabled, label, loading, value];
@@ -20,9 +20,10 @@ const PRadioGroupOption = /*#__PURE__*/ react.forwardRef(({ disabled = false, la
20
20
  // @ts-ignore
21
21
  ...(!process.browser
22
22
  ? {
23
- children: (jsxRuntime.jsx(radioGroupOption.DSRRadioGroupOption, { disabled, label, loading, value })),
23
+ children: (jsxRuntime.jsx(radioGroupOption.DSRRadioGroupOption, { disabled, label, loading, value, children })),
24
24
  }
25
25
  : {
26
+ children,
26
27
  suppressHydrationWarning: true,
27
28
  }),
28
29
  'data-ssr': '',
@@ -8,7 +8,6 @@ var minifyCss = require('../../minifyCss.cjs');
8
8
  var stylesEntry = require('../../../../../../components/dist/styles/esm/styles-entry.cjs');
9
9
  var utilsEntry = require('../../../../../../components/dist/utils/esm/utils-entry.cjs');
10
10
  var button_wrapper = require('../components/button.wrapper.cjs');
11
- var buttonPure_wrapper = require('../components/button-pure.wrapper.cjs');
12
11
 
13
12
  /**
14
13
  * @slot {"name": "header", "description": "Renders a header section above the content area." }
@@ -20,6 +19,8 @@ class DSRButtonTile extends react.Component {
20
19
  hasFooterSlot = false;
21
20
  render() {
22
21
  splitChildren.splitChildren(this.props.children);
22
+ // TODO: BreakpointCustomizable breaks stencils boolean conversion from string to boolean
23
+ const parsedCompact = this.props.compact === 'true' ? true : this.props.compact === 'false' ? false : this.props.compact;
23
24
  const buttonProps = {
24
25
  variant: 'secondary',
25
26
  iconSource: this.props.iconSource,
@@ -29,9 +30,9 @@ class DSRButtonTile extends react.Component {
29
30
  aria: this.props.aria,
30
31
  };
31
32
  const button = (react.createElement(button_wrapper.PButton, { ...buttonProps, icon: this.props.icon, key: "link-or-button", className: "link-or-button" }, this.props.label));
32
- const buttonPure = (react.createElement(buttonPure_wrapper.PButtonPure, { ...buttonProps, key: "link-or-button-pure", className: "link-or-button-pure", hideLabel: true, icon: this.props.icon === 'none' ? 'arrow-right' : this.props.icon }, this.props.label));
33
- const style = minifyCss.minifyCss(stylesEntry.getButtonTileCss(utilsEntry.isDisabledOrLoading(this.props.disabled, this.props.loading), this.props.aspectRatio, this.props.size, this.props.weight, this.props.align, this.props.compact, this.props.gradient, this.props.hasFooterSlot, this.props.disabled));
34
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsxs("div", { className: "root", children: [jsxRuntime.jsx("slot", { name: "header" }), jsxRuntime.jsx("div", { className: "media", children: jsxRuntime.jsx("slot", {}) }), jsxRuntime.jsxs("div", { className: "footer", children: [jsxRuntime.jsx("p", { children: this.props.description }), jsxRuntime.jsx("slot", { name: "footer" }), typeof this.props.compact === 'boolean' ? (this.props.compact ? buttonPure : button) : [buttonPure, button]] })] })] }), this.props.children] }));
33
+ const buttonCompact = (react.createElement(button_wrapper.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));
34
+ const style = minifyCss.minifyCss(stylesEntry.getButtonTileCss(utilsEntry.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));
35
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsxs("div", { className: "root", children: [jsxRuntime.jsx("slot", { name: "header" }), jsxRuntime.jsx("div", { className: "media", children: jsxRuntime.jsx("slot", {}) }), jsxRuntime.jsxs("div", { className: "footer", children: [jsxRuntime.jsx("p", { children: this.props.description }), jsxRuntime.jsx("slot", { name: "footer" }), typeof parsedCompact === 'boolean' ? (parsedCompact ? buttonCompact : button) : [buttonCompact, button]] })] })] }), this.props.children] }));
35
36
  }
36
37
  }
37
38
 
@@ -8,7 +8,6 @@ var minifyCss = require('../../minifyCss.cjs');
8
8
  var stylesEntry = require('../../../../../../components/dist/styles/esm/styles-entry.cjs');
9
9
  var button_wrapper = require('../components/button.wrapper.cjs');
10
10
  var crest_wrapper = require('../components/crest.wrapper.cjs');
11
- var flyout_wrapper = require('../components/flyout.wrapper.cjs');
12
11
  var wordmark_wrapper = require('../components/wordmark.wrapper.cjs');
13
12
 
14
13
  /**
@@ -26,28 +25,18 @@ var wordmark_wrapper = require('../components/wordmark.wrapper.cjs');
26
25
  */
27
26
  class DSRCanvas extends react.Component {
28
27
  host;
29
- isMediaQueryS = false;
30
- isMediaQueryM = false;
31
28
  hasTitle;
32
29
  hasSidebarEnd;
33
- hasSidebarEndHeader;
34
30
  hasFooter;
35
31
  hasBackground;
36
- // TODO: Produces bug when using text-field-wrapper which looses focus
37
- // private sidebarStart: any;
38
- // private sidebarEnd: any;
39
- // private root: any;
40
- // private header: any;
41
- //
42
32
  render() {
43
33
  const { namedSlotChildren} = splitChildren.splitChildren(this.props.children);
44
34
  const hasTitle = namedSlotChildren.filter(({ props: { slot } }) => slot === 'title').length > 0;
45
35
  const hasSidebarEnd = namedSlotChildren.filter(({ props: { slot } }) => slot === 'sidebar-end').length > 0;
46
- const hasSidebarEndHeader = namedSlotChildren.filter(({ props: { slot } }) => slot === 'sidebar-end-header').length > 0;
47
36
  const hasFooter = namedSlotChildren.filter(({ props: { slot } }) => slot === 'footer').length > 0;
48
37
  const hasBackground = namedSlotChildren.filter(({ props: { slot } }) => slot === 'background').length > 0;
49
- const style = minifyCss.minifyCss(stylesEntry.getCanvasCss(this.props.sidebarStartOpen, this.props.sidebarEndOpen));
50
- 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.jsxs("div", { className: "root", children: [jsxRuntime.jsxs("header", { className: "header", tabIndex: -1, children: [jsxRuntime.jsxs("div", { className: "blur", children: [jsxRuntime.jsx("div", {}), jsxRuntime.jsx("div", {}), jsxRuntime.jsx("div", {}), jsxRuntime.jsx("div", {}), jsxRuntime.jsx("div", {}), jsxRuntime.jsx("div", {}), jsxRuntime.jsx("div", {}), jsxRuntime.jsx("div", {})] }), jsxRuntime.jsxs("div", { className: "header__area header__area--start", children: [!this.props.sidebarStartOpen && (jsxRuntime.jsxs(button_wrapper.PButton, { icon: "sidebar", variant: "secondary", compact: true, "hide-label": "true", aria: { 'aria-expanded': this.props.sidebarStartOpen }, children: [this.props.sidebarStartOpen ? 'Close' : 'Open', " navigation sidebar"] })), jsxRuntime.jsx("slot", { name: "header-start" })] }), jsxRuntime.jsx(crest_wrapper.PCrest, { className: "header__crest" }), jsxRuntime.jsx(wordmark_wrapper.PWordmark, { className: "header__wordmark", size: "inherit" }), jsxRuntime.jsx("div", { className: "header__area header__area--end", children: jsxRuntime.jsx("slot", { name: "header-end" }) })] }), this.props.isMediaQueryS && (jsxRuntime.jsx("aside", { className: "sidebar sidebar--start", inert: !this.props.sidebarStartOpen, "aria-label": `Navigation sidebar ${this.props.sidebarStartOpen ? 'open' : 'closed'}`, tabIndex: -1, children: jsxRuntime.jsxs("div", { className: "sidebar__scroller", children: [jsxRuntime.jsxs("div", { className: "sidebar__header sidebar__header--start", children: [jsxRuntime.jsxs(button_wrapper.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 && (jsxRuntime.jsx("h2", { children: jsxRuntime.jsx("slot", { name: "title" }) }))] }), jsxRuntime.jsx("div", { className: "sidebar__content", children: jsxRuntime.jsx("slot", { name: "sidebar-start" }) })] }) })), jsxRuntime.jsx("main", { className: "main", children: jsxRuntime.jsx("slot", {}) }), hasSidebarEnd && this.props.isMediaQueryM && (jsxRuntime.jsx("aside", { className: "sidebar sidebar--end", inert: !this.props.sidebarEndOpen, "aria-label": `Settings sidebar ${this.props.sidebarEndOpen ? 'open' : 'closed'}`, tabIndex: -1, children: jsxRuntime.jsxs("div", { className: "sidebar__scroller", children: [jsxRuntime.jsxs("div", { className: "sidebar__header sidebar__header--end", children: [jsxRuntime.jsx("slot", { name: "sidebar-end-header" }), jsxRuntime.jsxs(button_wrapper.PButton, { icon: "close", variant: "secondary", compact: true, "hide-label": "true", aria: { 'aria-expanded': this.props.sidebarEndOpen }, children: [this.props.sidebarEndOpen ? 'Close' : 'Open', " settings sidebar"] })] }), jsxRuntime.jsx("div", { className: "sidebar__content", children: jsxRuntime.jsx("slot", { name: "sidebar-end" }) })] }) })), hasFooter && (jsxRuntime.jsx("footer", { className: "footer", children: jsxRuntime.jsx("slot", { name: "footer" }) })), hasBackground && jsxRuntime.jsx("slot", { name: "background" })] }), !this.props.isMediaQueryS && (jsxRuntime.jsxs(flyout_wrapper.PFlyout, { className: "flyout-start", open: this.props.sidebarStartOpen, position: "start", children: [hasTitle && (jsxRuntime.jsx("h2", { slot: "header", children: jsxRuntime.jsx("slot", { name: "title" }) })), jsxRuntime.jsx("slot", { name: "sidebar-start" })] })), hasSidebarEnd && !this.props.isMediaQueryM && (jsxRuntime.jsxs(flyout_wrapper.PFlyout, { className: "flyout-end", open: this.props.sidebarEndOpen, position: "end", children: [hasSidebarEndHeader && jsxRuntime.jsx("slot", { slot: "header", name: "sidebar-end-header" }), jsxRuntime.jsx("slot", { name: "sidebar-end" })] }))] })] }), this.props.children] }));
38
+ const style = minifyCss.minifyCss(stylesEntry.getCanvasCss(this.props.sidebarStartOpen, this.props.sidebarEndOpen, this.props.background));
39
+ 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.jsxs("header", { className: "header", tabIndex: -1, children: [jsxRuntime.jsxs("div", { className: "blur", children: [jsxRuntime.jsx("div", {}), jsxRuntime.jsx("div", {}), jsxRuntime.jsx("div", {}), jsxRuntime.jsx("div", {}), jsxRuntime.jsx("div", {}), jsxRuntime.jsx("div", {}), jsxRuntime.jsx("div", {}), jsxRuntime.jsx("div", {})] }), jsxRuntime.jsxs("div", { className: "header__area header__area--start", children: [!this.props.sidebarStartOpen && (jsxRuntime.jsxs(button_wrapper.PButton, { icon: "sidebar", variant: "secondary", compact: true, "hide-label": "true", aria: { 'aria-expanded': this.props.sidebarStartOpen }, children: [this.props.sidebarStartOpen ? 'Close' : 'Open', " navigation sidebar"] })), jsxRuntime.jsx("slot", { name: "header-start" })] }), jsxRuntime.jsx(crest_wrapper.PCrest, { className: "header__crest" }), jsxRuntime.jsx(wordmark_wrapper.PWordmark, { className: "header__wordmark", size: "inherit" }), jsxRuntime.jsx("div", { className: "header__area header__area--end", children: jsxRuntime.jsx("slot", { name: "header-end" }) })] }), jsxRuntime.jsxs("aside", { className: "sidebar sidebar--start", inert: !this.props.sidebarStartOpen, "aria-label": `Navigation sidebar ${this.props.sidebarStartOpen ? 'open' : 'closed'}`, tabIndex: -1, children: [jsxRuntime.jsxs("div", { className: "sidebar__header sidebar__header--start", children: [jsxRuntime.jsxs(button_wrapper.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 && (jsxRuntime.jsx("h2", { children: jsxRuntime.jsx("slot", { name: "title" }) }))] }), jsxRuntime.jsx("slot", { name: "sidebar-start" })] }), jsxRuntime.jsx("main", { className: "main", children: jsxRuntime.jsx("slot", {}) }), hasSidebarEnd && (jsxRuntime.jsxs("aside", { className: "sidebar sidebar--end", inert: !this.props.sidebarEndOpen, "aria-label": `Settings sidebar ${this.props.sidebarEndOpen ? 'open' : 'closed'}`, tabIndex: -1, children: [jsxRuntime.jsxs("div", { className: "sidebar__header sidebar__header--end", children: [jsxRuntime.jsx("slot", { name: "sidebar-end-header" }), jsxRuntime.jsxs(button_wrapper.PButton, { icon: "close", variant: "secondary", compact: true, "hide-label": "true", aria: { 'aria-expanded': this.props.sidebarEndOpen }, children: [this.props.sidebarEndOpen ? 'Close' : 'Open', " settings sidebar"] })] }), jsxRuntime.jsx("slot", { name: "sidebar-end" })] })), hasFooter && (jsxRuntime.jsx("footer", { className: "footer", children: jsxRuntime.jsx("slot", { name: "footer" }) })), hasBackground && jsxRuntime.jsx("slot", { name: "background" })] })] }), this.props.children] }));
51
40
  }
52
41
  }
53
42
 
@@ -13,8 +13,9 @@ var stateMessage = require('./state-message.cjs');
13
13
  var spinner_wrapper = require('../components/spinner.wrapper.cjs');
14
14
 
15
15
  /**
16
- * @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." }
17
- * @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
+ * @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."}
17
+ * @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`)."}
18
+ * @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."}
18
19
  */
19
20
  class DSRCheckbox extends react.Component {
20
21
  host;
@@ -24,6 +25,7 @@ class DSRCheckbox extends react.Component {
24
25
  initialLoading = false;
25
26
  defaultChecked;
26
27
  checkboxInputElement;
28
+ externalLabel = null;
27
29
  formResetCallback() {
28
30
  this.props.internals?.setFormValue(this.props.defaultChecked ? this.props.value : undefined);
29
31
  }
@@ -36,7 +38,7 @@ class DSRCheckbox extends react.Component {
36
38
  const { namedSlotChildren} = splitChildren.splitChildren(this.props.children);
37
39
  const id = 'x';
38
40
  const style = minifyCss.minifyCss(stylesEntry.getCheckboxCss(this.props.hideLabel, this.props.state, this.props.disabled, this.props.loading, this.props.compact));
39
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsxs("div", { className: "root", 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, htmlFor: id, label: this.props.label, isLoading: this.props.loading, isDisabled: this.props.disabled, isRequired: this.props.required }), jsxRuntime.jsxs("div", { className: "wrapper", children: [jsxRuntime.jsx("input", { type: "checkbox", id: id, "aria-describedby": `${utilsEntry.descriptionId} ${stateMessage.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 && 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] }));
41
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsxs("div", { className: "root", children: [jsxRuntime.jsxs("div", { className: "wrapper", children: [jsxRuntime.jsxs("div", { className: "input-wrapper", children: [jsxRuntime.jsx("input", { type: "checkbox", id: id, "aria-describedby": `${utilsEntry.descriptionId} ${stateMessage.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 && jsxRuntime.jsx(spinner_wrapper.PSpinner, { className: "spinner", size: "inherit", "aria-hidden": "true" })] }), 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, htmlFor: id, label: this.props.label, isLoading: this.props.loading, isDisabled: this.props.disabled, isRequired: this.props.required })] }), 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] }));
40
42
  }
41
43
  }
42
44
 
@@ -12,6 +12,7 @@ var inputBase = require('./input-base.cjs');
12
12
 
13
13
  /**
14
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`)."}
15
16
  * @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."}
16
17
  * @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."}
17
18
  * @slot {"name": "start", "description": "Shows content at the start of the input (e.g. unit prefix)."}
@@ -11,6 +11,7 @@ var inputBase = require('./input-base.cjs');
11
11
 
12
12
  /**
13
13
  * @slot {"name": "label", "description": "Shows a label. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
14
+ * @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`)."}
14
15
  * @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."}
15
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
  * @slot {"name": "start", "description": "Shows content at the start of the input (e.g. unit prefix)."}
@@ -12,6 +12,7 @@ var inputBase = require('./input-base.cjs');
12
12
 
13
13
  /**
14
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`)."}
15
16
  * @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."}
16
17
  * @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."}
17
18
  * @slot {"name": "start", "description": "Shows content at the start of the input (e.g. unit prefix)."}
@@ -11,6 +11,7 @@ var inputBase = require('./input-base.cjs');
11
11
 
12
12
  /**
13
13
  * @slot {"name": "label", "description": "Shows a label. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
14
+ * @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`)."}
14
15
  * @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."}
15
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
  * @slot {"name": "start", "description": "Shows content at the start of the input (e.g. unit prefix)."}
@@ -11,6 +11,7 @@ var inputBase = require('./input-base.cjs');
11
11
 
12
12
  /**
13
13
  * @slot {"name": "label", "description": "Shows a label. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
14
+ * @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`)."}
14
15
  * @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."}
15
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
  * @slot {"name": "start", "description": "Shows content at the start of the input (e.g. unit prefix)."}
@@ -12,6 +12,7 @@ var inputBase = require('./input-base.cjs');
12
12
 
13
13
  /**
14
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`)."}
15
16
  * @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."}
16
17
  * @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."}
17
18
  * @slot {"name": "start", "description": "Shows content at the start of the input (e.g. icon)."}
@@ -11,6 +11,7 @@ var inputBase = require('./input-base.cjs');
11
11
 
12
12
  /**
13
13
  * @slot {"name": "label", "description": "Shows a label. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
14
+ * @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`)."}
14
15
  * @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."}
15
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
  * @slot {"name": "start", "description": "Shows content at the start of the input (e.g. unit prefix)."}
@@ -9,6 +9,7 @@ var inputBase = require('./input-base.cjs');
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)."}
@@ -12,6 +12,7 @@ var inputBase = require('./input-base.cjs');
12
12
 
13
13
  /**
14
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`)."}
15
16
  * @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."}
16
17
  * @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."}
17
18
  * @slot {"name": "start", "description": "Shows content at the start of the input (e.g. unit prefix)."}
@@ -11,6 +11,7 @@ var inputBase = require('./input-base.cjs');
11
11
 
12
12
  /**
13
13
  * @slot {"name": "label", "description": "Shows a label. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed."}
14
+ * @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`)."}
14
15
  * @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."}
15
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
  * @slot {"name": "start", "description": "Shows content at the start of the input (e.g. unit prefix)."}
@@ -12,6 +12,7 @@ var inputBase = require('./input-base.cjs');
12
12
 
13
13
  /**
14
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`)."}
15
16
  * @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."}
16
17
  * @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."}
17
18
  * @slot {"name": "start", "description": "Shows content at the start of the input (e.g. unit prefix)."}
@@ -1,14 +1,16 @@
1
1
  'use strict';
2
2
 
3
3
  var jsxRuntime = require('react/jsx-runtime');
4
+ var splitChildren = require('../../splitChildren.cjs');
4
5
  var utilsEntry = require('../../../../../../components/dist/utils/esm/utils-entry.cjs');
5
6
  var required = require('./required.cjs');
6
7
 
7
- const Label = ({ hasLabel, hasDescription,
8
+ const Label = ({ hasLabel, hasDescription, children,
8
9
  // host,
9
10
  label, tag, description, htmlFor, isRequired, isLoading, isDisabled, stopClickPropagation, }) => {
11
+ splitChildren.splitChildren(children);
10
12
  const TagType = tag || 'label';
11
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [hasLabel && (jsxRuntime.jsx(TagType, { className: "label", id: utilsEntry.labelId, "aria-disabled": isLoading || isDisabled ? 'true' : null, htmlFor: htmlFor, children: jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [label || jsxRuntime.jsx("slot", { name: "label" }), isRequired /* && !isParentFieldsetRequired(host) */ && jsxRuntime.jsx(required.Required, {})] }) })), hasDescription && (jsxRuntime.jsx("span", { className: "label", id: utilsEntry.descriptionId, "aria-disabled": isLoading || isDisabled ? 'true' : null, children: description || jsxRuntime.jsx("slot", { name: "description" }) }))] }));
13
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [hasLabel && (jsxRuntime.jsxs("div", { className: "label-wrapper", children: [jsxRuntime.jsx(TagType, { className: "label", id: utilsEntry.labelId, "aria-disabled": isLoading || isDisabled ? 'true' : null, htmlFor: htmlFor, children: jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [label || jsxRuntime.jsx("slot", { name: "label" }), isRequired /* && !isParentFieldsetRequired(host) */ && jsxRuntime.jsx(required.Required, {})] }) }), jsxRuntime.jsx("slot", { name: "label-after" })] })), hasDescription && (jsxRuntime.jsx("span", { className: "label", id: utilsEntry.descriptionId, "aria-disabled": isLoading || isDisabled ? 'true' : null, children: description || jsxRuntime.jsx("slot", { name: "description" }) }))] }));
12
14
  };
13
15
 
14
16
  exports.Label = Label;
@@ -7,7 +7,6 @@ var splitChildren = require('../../splitChildren.cjs');
7
7
  var minifyCss = require('../../minifyCss.cjs');
8
8
  var stylesEntry = require('../../../../../../components/dist/styles/esm/styles-entry.cjs');
9
9
  var link_wrapper = require('../components/link.wrapper.cjs');
10
- var linkPure_wrapper = require('../components/link-pure.wrapper.cjs');
11
10
 
12
11
  /**
13
12
  * @slot {"name": "header", "description": "Renders a header section above the content area." }
@@ -19,6 +18,8 @@ class DSRLinkTile extends react.Component {
19
18
  hasFooterSlot = false;
20
19
  render() {
21
20
  splitChildren.splitChildren(this.props.children);
21
+ // TODO: BreakpointCustomizable breaks stencils boolean conversion from string to boolean
22
+ const parsedCompact = this.props.compact === 'true' ? true : this.props.compact === 'false' ? false : this.props.compact;
22
23
  const linkProps = {
23
24
  variant: 'secondary',
24
25
  aria: this.props.aria,
@@ -30,9 +31,9 @@ class DSRLinkTile extends react.Component {
30
31
  rel: this.props.rel,
31
32
  };
32
33
  const link = (react.createElement(link_wrapper.PLink, { ...sharedLinkProps, ...linkProps, key: "link-or-button", className: "link-or-button" }, this.props.label));
33
- const linkPure = (react.createElement(linkPure_wrapper.PLinkPure, { ...sharedLinkProps, ...linkProps, key: "link-or-button-pure", className: "link-or-button-pure", hideLabel: true, icon: "arrow-right" }, this.props.label));
34
- const style = minifyCss.minifyCss(stylesEntry.getLinkTileCss(this.props.aspectRatio, this.props.size, this.props.weight, this.props.align, this.props.compact, this.props.gradient, this.props.hasFooterSlot));
35
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsxs("div", { className: "root", children: [jsxRuntime.jsx("a", { ...sharedLinkProps, tabIndex: -1, "aria-hidden": "true" }), jsxRuntime.jsx("slot", { name: "header" }), jsxRuntime.jsx("div", { className: "media", children: jsxRuntime.jsx("slot", {}) }), jsxRuntime.jsxs("div", { className: "footer", children: [jsxRuntime.jsx("p", { children: this.props.description }), jsxRuntime.jsx("slot", { name: "footer" }), typeof this.props.compact === 'boolean' ? (this.props.compact ? linkPure : link) : [linkPure, link]] })] })] }), this.props.children] }));
34
+ const linkCompact = (react.createElement(link_wrapper.PLink, { ...sharedLinkProps, ...linkProps, hideLabel: true, icon: "arrow-right", key: "link-or-button-pure", compact: true, className: "link-or-button-pure" }, this.props.label));
35
+ const style = minifyCss.minifyCss(stylesEntry.getLinkTileCss(this.props.aspectRatio, this.props.size, this.props.weight, this.props.align, parsedCompact, this.props.gradient, this.props.hasFooterSlot));
36
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsxs("div", { className: "root", children: [jsxRuntime.jsx("a", { ...sharedLinkProps, tabIndex: -1, "aria-hidden": "true" }), jsxRuntime.jsx("slot", { name: "header" }), jsxRuntime.jsx("div", { className: "media", children: jsxRuntime.jsx("slot", {}) }), jsxRuntime.jsxs("div", { className: "footer", children: [jsxRuntime.jsx("p", { children: this.props.description }), jsxRuntime.jsx("slot", { name: "footer" }), typeof parsedCompact === 'boolean' ? (parsedCompact ? linkCompact : link) : [linkCompact, link]] })] })] }), this.props.children] }));
36
37
  }
37
38
  }
38
39
 
@@ -16,6 +16,7 @@ var noResultsOption = require('./no-results-option.cjs');
16
16
 
17
17
  /**
18
18
  * @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." }
19
+ * @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`)."}
19
20
  * @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." }
20
21
  * @slot {"name": "selected", "description": "Use this slot to provide custom markup for the selected options display in the button area." }
21
22
  * @slot {"name": "", "description": "Default slot for the p-multi-select-option tags." }
@@ -23,7 +24,7 @@ var noResultsOption = require('./no-results-option.cjs');
23
24
  * @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." }
24
25
  * @slot {"name": "filter", "description": "Optional slot for providing a custom `p-input-search` input. When used, the default filter input is replaced and the built-in filter logic is disabled, giving full control over filtering behavior." }
25
26
  *
26
- * @controlled { "props": ["value"], "event": "update", "isInternallyMutated": true }
27
+ * @controlled { "props": ["value"], "event": "change", "isInternallyMutated": true }
27
28
  */
28
29
  class DSRMultiSelect extends react.Component {
29
30
  host;
@@ -71,7 +72,7 @@ class DSRMultiSelect extends react.Component {
71
72
  const selectMessageId = (this.props.message || namedSlotChildren.filter(({ props: { slot } }) => slot === 'message').length > 0) && ['success', 'error'].includes(this.props.state) ? stateMessage.messageId : undefined;
72
73
  const ariaDescribedBy = [descriptionId, selectMessageId].filter(Boolean).join(' ');
73
74
  const style = minifyCss.minifyCss(stylesEntry.getMultiSelectCss(this.props.isOpen, this.props.disabled, this.props.hideLabel, this.props.state, this.props.compact));
74
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsxs("div", { className: "root", 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: buttonId, isRequired: this.props.required, isDisabled: this.props.disabled }), jsxRuntime.jsxs("button", { "aria-invalid": this.props.state === 'error' ? 'true' : null, type: "button", role: "combobox", id: buttonId, ...utilsEntry.getComboboxAriaAttributes(this.props.isOpen, this.props.required, utilsEntry.labelId, ariaDescribedBy, popoverId), disabled: this.props.disabled, onBlur: this.props.onComboBlur, children: [hasCustomSelectedSlot ? (jsxRuntime.jsx("slot", { name: "selected" })) : (jsxRuntime.jsx("span", { children: this.selectedOptions.map((option) => option.textContent).join(', ') })), this.props.value.length > 0 && (jsxRuntime.jsx(buttonPure_wrapper.PButtonPure, { type: "button", className: "button", icon: "close", hideLabel: true, disabled: this.props.disabled, children: "Reset selection" })), jsxRuntime.jsx(icon_wrapper.PIcon, { className: "icon", name: "arrow-head-down", color: "primary", "aria-hidden": "true" })] }), jsxRuntime.jsxs("div", { id: popoverId, popover: "manual", tabIndex: -1, onBlur: (e) => e.stopPropagation(), role: "dialog", "aria-label": this.props.label, "aria-hidden": this.props.isOpen ? null : 'true', children: [hasCustomFilterSlot ? (jsxRuntime.jsx("slot", { name: "filter" })) : (jsxRuntime.jsx(inputSearch_wrapper.PInputSearch, { className: "filter", name: "filter", label: "Filter options", hideLabel: true, autoComplete: "off", clear: true, indicator: true, compact: true, onBlur: (e) => e.stopPropagation() })), jsxRuntime.jsxs("div", { className: "options", role: "listbox", "aria-label": this.props.label, "aria-multiselectable": "true", onPointerMove: this.props.onPointerMove, children: [!this.props.hasFilterResults && jsxRuntime.jsx(noResultsOption.NoResultsOption, {}), jsxRuntime.jsx("slot", { name: "options-status" }), jsxRuntime.jsx("slot", {})] })] }), 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 })] })] }), this.props.children] }));
75
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsxs("div", { className: "root", 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: buttonId, isRequired: this.props.required, isDisabled: this.props.disabled }), jsxRuntime.jsxs("button", { "aria-invalid": this.props.state === 'error' ? 'true' : null, type: "button", role: "combobox", id: buttonId, ...utilsEntry.getComboboxAriaAttributes(this.props.isOpen, this.props.required, utilsEntry.labelId, ariaDescribedBy, popoverId), disabled: this.props.disabled, onBlur: this.props.onComboBlur, children: [hasCustomSelectedSlot ? (jsxRuntime.jsx("slot", { name: "selected" })) : (jsxRuntime.jsx("span", { children: this.selectedOptions.map((option) => (option.textContent ?? '').toString().trim()).join(', ') })), this.props.value.length > 0 && (jsxRuntime.jsx(buttonPure_wrapper.PButtonPure, { type: "button", className: "button", icon: "close", hideLabel: true, disabled: this.props.disabled, children: "Reset selection" })), jsxRuntime.jsx(icon_wrapper.PIcon, { className: "icon", name: "arrow-head-down", color: "primary", "aria-hidden": "true" })] }), jsxRuntime.jsxs("div", { id: popoverId, popover: "manual", tabIndex: -1, onBlur: (e) => e.stopPropagation(), role: "dialog", "aria-label": this.props.label, "aria-hidden": this.props.isOpen ? null : 'true', children: [hasCustomFilterSlot ? (jsxRuntime.jsx("slot", { name: "filter" })) : (jsxRuntime.jsx(inputSearch_wrapper.PInputSearch, { className: "filter", name: "filter", label: "Filter options", hideLabel: true, autoComplete: "off", clear: true, indicator: true, compact: true, onBlur: (e) => e.stopPropagation() })), jsxRuntime.jsxs("div", { className: "options", role: "listbox", "aria-label": this.props.label, "aria-multiselectable": "true", onPointerMove: this.props.onPointerMove, children: [!this.props.hasFilterResults && jsxRuntime.jsx(noResultsOption.NoResultsOption, {}), jsxRuntime.jsx("slot", { name: "options-status" }), jsxRuntime.jsx("slot", {})] })] }), 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 })] })] }), this.props.children] }));
75
76
  }
76
77
  }
77
78
 
@@ -14,10 +14,11 @@ var spinner_wrapper = require('../components/spinner.wrapper.cjs');
14
14
 
15
15
  /**
16
16
  * @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." }
17
+ * @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`)."}
17
18
  * @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." }
18
19
  * @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." }
19
20
  *
20
- * @controlled { "props": ["value"], "event": "update", "isInternallyMutated": true }
21
+ * @controlled { "props": ["value"], "event": "change", "isInternallyMutated": true }
21
22
  */
22
23
  class DSRPinCode extends react.Component {
23
24
  host;
@@ -41,7 +42,7 @@ class DSRPinCode extends react.Component {
41
42
  this.inputElements = [];
42
43
  const currentInputId = 'current-input';
43
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));
44
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsxs("div", { className: "root", 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", 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
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] }));
46
47
  }
47
48
  }
@@ -3,6 +3,7 @@
3
3
  var jsxRuntime = require('react/jsx-runtime');
4
4
  var react = require('react');
5
5
  require('../../provider.cjs');
6
+ var splitChildren = require('../../splitChildren.cjs');
6
7
  var minifyCss = require('../../minifyCss.cjs');
7
8
  var stylesEntry = require('../../../../../../components/dist/styles/esm/styles-entry.cjs');
8
9
  var loadingMessage = require('./loading-message.cjs');
@@ -10,20 +11,27 @@ var label = require('./label.cjs');
10
11
  var stateMessage = require('./state-message.cjs');
11
12
  var spinner_wrapper = require('../components/spinner.wrapper.cjs');
12
13
 
14
+ // Though "description" and "message" slots are technically available (provided by the "label" component),
15
+ // they are not documented here to avoid confusion since they are not intended for use within radio group options.
16
+ /**
17
+ * @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."}
18
+ * @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`)." }
19
+ */
13
20
  class DSRRadioGroupOption extends react.Component {
14
21
  host;
15
22
  initialLoading = false;
16
23
  inputElement;
17
24
  render() {
25
+ splitChildren.splitChildren(this.props.children);
18
26
  const { selected: isSelected, name, state } = this.props;
19
27
  const isDisabled = this.props.disabled || this.props.disabledParent;
20
28
  const isOptionLoading = this.props.loading && !isSelected;
21
29
  const isLoading = isOptionLoading || this.props.loadingParent;
22
30
  const id = 'radio-group-option';
23
31
  const style = minifyCss.minifyCss(stylesEntry.getRadioGroupOptionCss(isDisabled, isLoading, state));
24
- return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs("div", { className: "root", children: [jsxRuntime.jsx(label.Label, { hasLabel: this.props.label, hasDescription: false, host: null, label: this.props.label, htmlFor: id, isDisabled: isDisabled, isLoading: isLoading, stopClickPropagation: true }), jsxRuntime.jsxs("div", { className: "wrapper", children: [jsxRuntime.jsx("input", { id: id, type: "radio", name: name, checked: isSelected, disabled: isDisabled || isLoading, value: this.props.value, onClick: (e) => {
25
- e.stopPropagation();
26
- }, onBlur: this.props.onBlur, "aria-describedby": isLoading ? loadingMessage.loadingId : `${stateMessage.messageId}`, "aria-invalid": state === 'error' ? 'true' : null, "aria-disabled": isDisabled || isLoading ? 'true' : null }), isOptionLoading && !this.props.loadingParent && (jsxRuntime.jsx(spinner_wrapper.PSpinner, { className: "spinner", size: "inherit", "aria-hidden": "true" }))] }), !this.props.loadingParent && (jsxRuntime.jsx(loadingMessage.LoadingMessage, { loading: isOptionLoading, initialLoading: this.props.initialLoading }))] }) })] }) }));
32
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs("div", { className: "root", children: [jsxRuntime.jsxs("div", { className: "wrapper", children: [jsxRuntime.jsx("input", { id: id, type: "radio", name: name, checked: isSelected, disabled: isDisabled || isLoading, value: this.props.value, onClick: (e) => {
33
+ e.stopPropagation();
34
+ }, onBlur: this.props.onBlur, "aria-describedby": isLoading ? loadingMessage.loadingId : `${stateMessage.messageId}`, "aria-invalid": state === 'error' ? 'true' : null, "aria-disabled": isDisabled || isLoading ? 'true' : null }), isOptionLoading && !this.props.loadingParent && (jsxRuntime.jsx(spinner_wrapper.PSpinner, { className: "spinner", size: "inherit", "aria-hidden": "true" }))] }), jsxRuntime.jsx(label.Label, { hasLabel: this.props.label, hasDescription: false, host: null, label: this.props.label, htmlFor: id, isDisabled: isDisabled, isLoading: isLoading, stopClickPropagation: true }), !this.props.loadingParent && (jsxRuntime.jsx(loadingMessage.LoadingMessage, { loading: isOptionLoading, initialLoading: this.props.initialLoading }))] }) })] }), this.props.children] }));
27
35
  }
28
36
  }
29
37