@porsche-design-system/components-react 4.2.0-rc.1 → 4.2.0-rc.3
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 +105 -0
- package/cjs/lib/components/accordion.wrapper.cjs +3 -3
- package/cjs/lib/components/ai-tag.wrapper.cjs +26 -0
- package/cjs/public-api.cjs +2 -0
- package/esm/BaseProps.d.ts +1 -1
- package/esm/lib/components/accordion.wrapper.d.ts +12 -2
- package/esm/lib/components/accordion.wrapper.mjs +3 -3
- package/esm/lib/components/ai-tag.wrapper.d.ts +26 -0
- package/esm/lib/components/ai-tag.wrapper.mjs +24 -0
- package/esm/lib/components/banner.wrapper.d.ts +1 -1
- package/esm/lib/components/button-pure.wrapper.d.ts +1 -1
- package/esm/lib/components/button-tile.wrapper.d.ts +1 -1
- package/esm/lib/components/button.wrapper.d.ts +1 -1
- package/esm/lib/components/canvas.wrapper.d.ts +1 -1
- package/esm/lib/components/carousel.wrapper.d.ts +1 -1
- package/esm/lib/components/checkbox.wrapper.d.ts +1 -1
- package/esm/lib/components/crest.wrapper.d.ts +1 -1
- package/esm/lib/components/display.wrapper.d.ts +1 -1
- package/esm/lib/components/divider.wrapper.d.ts +1 -1
- package/esm/lib/components/drilldown-item.wrapper.d.ts +1 -1
- package/esm/lib/components/drilldown-link.wrapper.d.ts +1 -1
- package/esm/lib/components/drilldown.wrapper.d.ts +1 -1
- package/esm/lib/components/fieldset.wrapper.d.ts +1 -1
- package/esm/lib/components/flag.wrapper.d.ts +1 -1
- package/esm/lib/components/flyout.wrapper.d.ts +1 -1
- package/esm/lib/components/heading.wrapper.d.ts +1 -1
- package/esm/lib/components/icon.wrapper.d.ts +1 -1
- package/esm/lib/components/index.d.ts +1 -0
- package/esm/lib/components/inline-notification.wrapper.d.ts +1 -1
- package/esm/lib/components/input-date.wrapper.d.ts +3 -3
- package/esm/lib/components/input-email.wrapper.d.ts +3 -3
- package/esm/lib/components/input-month.wrapper.d.ts +3 -3
- package/esm/lib/components/input-number.wrapper.d.ts +3 -3
- package/esm/lib/components/input-password.wrapper.d.ts +3 -3
- package/esm/lib/components/input-search.wrapper.d.ts +3 -3
- package/esm/lib/components/input-tel.wrapper.d.ts +3 -3
- package/esm/lib/components/input-text.wrapper.d.ts +3 -3
- package/esm/lib/components/input-time.wrapper.d.ts +3 -3
- package/esm/lib/components/input-url.wrapper.d.ts +3 -3
- package/esm/lib/components/input-week.wrapper.d.ts +3 -3
- package/esm/lib/components/link-pure.wrapper.d.ts +1 -1
- package/esm/lib/components/link-tile-product.wrapper.d.ts +1 -1
- package/esm/lib/components/link-tile.wrapper.d.ts +1 -1
- package/esm/lib/components/link.wrapper.d.ts +1 -1
- package/esm/lib/components/modal.wrapper.d.ts +1 -1
- package/esm/lib/components/model-signature.wrapper.d.ts +1 -1
- package/esm/lib/components/multi-select-option.wrapper.d.ts +3 -3
- package/esm/lib/components/multi-select.wrapper.d.ts +5 -5
- package/esm/lib/components/optgroup.wrapper.d.ts +1 -1
- package/esm/lib/components/pagination.wrapper.d.ts +1 -1
- package/esm/lib/components/pin-code.wrapper.d.ts +1 -1
- package/esm/lib/components/popover.wrapper.d.ts +1 -1
- package/esm/lib/components/radio-group-option.wrapper.d.ts +1 -1
- package/esm/lib/components/radio-group.wrapper.d.ts +1 -1
- package/esm/lib/components/scroller.wrapper.d.ts +1 -1
- package/esm/lib/components/segmented-control-item.wrapper.d.ts +1 -1
- package/esm/lib/components/segmented-control.wrapper.d.ts +1 -1
- package/esm/lib/components/select-option.wrapper.d.ts +5 -5
- package/esm/lib/components/select.wrapper.d.ts +5 -5
- package/esm/lib/components/sheet.wrapper.d.ts +1 -1
- package/esm/lib/components/spinner.wrapper.d.ts +1 -1
- package/esm/lib/components/stepper-horizontal-item.wrapper.d.ts +1 -1
- package/esm/lib/components/stepper-horizontal.wrapper.d.ts +1 -1
- package/esm/lib/components/switch.wrapper.d.ts +1 -1
- package/esm/lib/components/table-body.wrapper.d.ts +1 -1
- package/esm/lib/components/table-cell.wrapper.d.ts +1 -1
- package/esm/lib/components/table-head-cell.wrapper.d.ts +1 -1
- package/esm/lib/components/table-head-row.wrapper.d.ts +1 -1
- package/esm/lib/components/table-head.wrapper.d.ts +1 -1
- package/esm/lib/components/table-row.wrapper.d.ts +1 -1
- package/esm/lib/components/table.wrapper.d.ts +1 -1
- package/esm/lib/components/tabs-bar.wrapper.d.ts +1 -1
- package/esm/lib/components/tabs-item.wrapper.d.ts +1 -1
- package/esm/lib/components/tabs.wrapper.d.ts +1 -1
- package/esm/lib/components/tag-dismissible.wrapper.d.ts +1 -1
- package/esm/lib/components/tag.wrapper.d.ts +1 -1
- package/esm/lib/components/text-list-item.wrapper.d.ts +1 -1
- package/esm/lib/components/text-list.wrapper.d.ts +1 -1
- package/esm/lib/components/text.wrapper.d.ts +1 -1
- package/esm/lib/components/textarea.wrapper.d.ts +3 -3
- package/esm/lib/components/toast.wrapper.d.ts +1 -1
- package/esm/lib/components/wordmark.wrapper.d.ts +1 -1
- package/esm/lib/types.d.ts +221 -2
- package/esm/public-api.mjs +1 -0
- package/package.json +19 -21
- package/ssr/cjs/components/dist/styles/esm/styles-entry.cjs +1395 -1216
- package/ssr/cjs/components/dist/utils/esm/utils-entry.cjs +175 -2
- 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/ai-tag.wrapper.cjs +36 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/accordion.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/ai-tag.cjs +18 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox.cjs +0 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/dialog-base.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-base.cjs +2 -2
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-date.cjs +5 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-email.cjs +5 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-month.cjs +5 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-number.cjs +5 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-password.cjs +5 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-search.cjs +5 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-tel.cjs +5 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-text.cjs +7 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-time.cjs +5 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-url.cjs +5 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-week.cjs +5 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/multi-select.cjs +10 -5
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select.cjs +5 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/textarea.cjs +8 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/public-api.cjs +2 -0
- package/ssr/esm/BaseProps.d.ts +1 -1
- package/ssr/esm/components/dist/styles/esm/styles-entry.mjs +1394 -1216
- package/ssr/esm/components/dist/utils/esm/utils-entry.mjs +174 -3
- 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/ai-tag.wrapper.mjs +34 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/accordion.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/ai-tag.mjs +16 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox.mjs +0 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/dialog-base.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-base.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-date.mjs +5 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-email.mjs +5 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-month.mjs +5 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-number.mjs +5 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-password.mjs +5 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-search.mjs +5 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-tel.mjs +5 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-text.mjs +7 -3
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-time.mjs +5 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-url.mjs +5 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-week.mjs +5 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/multi-select.mjs +10 -5
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select.mjs +5 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/textarea.mjs +8 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/public-api.mjs +1 -0
- package/ssr/esm/lib/components/accordion.wrapper.d.ts +12 -2
- package/ssr/esm/lib/components/ai-tag.wrapper.d.ts +26 -0
- package/ssr/esm/lib/components/banner.wrapper.d.ts +1 -1
- package/ssr/esm/lib/components/button-pure.wrapper.d.ts +1 -1
- package/ssr/esm/lib/components/button-tile.wrapper.d.ts +1 -1
- package/ssr/esm/lib/components/button.wrapper.d.ts +1 -1
- package/ssr/esm/lib/components/canvas.wrapper.d.ts +1 -1
- package/ssr/esm/lib/components/carousel.wrapper.d.ts +1 -1
- package/ssr/esm/lib/components/checkbox.wrapper.d.ts +1 -1
- package/ssr/esm/lib/components/crest.wrapper.d.ts +1 -1
- package/ssr/esm/lib/components/display.wrapper.d.ts +1 -1
- package/ssr/esm/lib/components/divider.wrapper.d.ts +1 -1
- package/ssr/esm/lib/components/drilldown-item.wrapper.d.ts +1 -1
- package/ssr/esm/lib/components/drilldown-link.wrapper.d.ts +1 -1
- package/ssr/esm/lib/components/drilldown.wrapper.d.ts +1 -1
- package/ssr/esm/lib/components/fieldset.wrapper.d.ts +1 -1
- package/ssr/esm/lib/components/flag.wrapper.d.ts +1 -1
- package/ssr/esm/lib/components/flyout.wrapper.d.ts +1 -1
- package/ssr/esm/lib/components/heading.wrapper.d.ts +1 -1
- package/ssr/esm/lib/components/icon.wrapper.d.ts +1 -1
- package/ssr/esm/lib/components/index.d.ts +1 -0
- package/ssr/esm/lib/components/inline-notification.wrapper.d.ts +1 -1
- package/ssr/esm/lib/components/input-date.wrapper.d.ts +3 -3
- package/ssr/esm/lib/components/input-email.wrapper.d.ts +3 -3
- package/ssr/esm/lib/components/input-month.wrapper.d.ts +3 -3
- package/ssr/esm/lib/components/input-number.wrapper.d.ts +3 -3
- package/ssr/esm/lib/components/input-password.wrapper.d.ts +3 -3
- package/ssr/esm/lib/components/input-search.wrapper.d.ts +3 -3
- package/ssr/esm/lib/components/input-tel.wrapper.d.ts +3 -3
- package/ssr/esm/lib/components/input-text.wrapper.d.ts +3 -3
- package/ssr/esm/lib/components/input-time.wrapper.d.ts +3 -3
- package/ssr/esm/lib/components/input-url.wrapper.d.ts +3 -3
- package/ssr/esm/lib/components/input-week.wrapper.d.ts +3 -3
- package/ssr/esm/lib/components/link-pure.wrapper.d.ts +1 -1
- package/ssr/esm/lib/components/link-tile-product.wrapper.d.ts +1 -1
- package/ssr/esm/lib/components/link-tile.wrapper.d.ts +1 -1
- package/ssr/esm/lib/components/link.wrapper.d.ts +1 -1
- package/ssr/esm/lib/components/modal.wrapper.d.ts +1 -1
- package/ssr/esm/lib/components/model-signature.wrapper.d.ts +1 -1
- package/ssr/esm/lib/components/multi-select-option.wrapper.d.ts +3 -3
- package/ssr/esm/lib/components/multi-select.wrapper.d.ts +5 -5
- package/ssr/esm/lib/components/optgroup.wrapper.d.ts +1 -1
- package/ssr/esm/lib/components/pagination.wrapper.d.ts +1 -1
- package/ssr/esm/lib/components/pin-code.wrapper.d.ts +1 -1
- package/ssr/esm/lib/components/popover.wrapper.d.ts +1 -1
- package/ssr/esm/lib/components/radio-group-option.wrapper.d.ts +1 -1
- package/ssr/esm/lib/components/radio-group.wrapper.d.ts +1 -1
- package/ssr/esm/lib/components/scroller.wrapper.d.ts +1 -1
- package/ssr/esm/lib/components/segmented-control-item.wrapper.d.ts +1 -1
- package/ssr/esm/lib/components/segmented-control.wrapper.d.ts +1 -1
- package/ssr/esm/lib/components/select-option.wrapper.d.ts +5 -5
- package/ssr/esm/lib/components/select.wrapper.d.ts +5 -5
- package/ssr/esm/lib/components/sheet.wrapper.d.ts +1 -1
- package/ssr/esm/lib/components/spinner.wrapper.d.ts +1 -1
- package/ssr/esm/lib/components/stepper-horizontal-item.wrapper.d.ts +1 -1
- package/ssr/esm/lib/components/stepper-horizontal.wrapper.d.ts +1 -1
- package/ssr/esm/lib/components/switch.wrapper.d.ts +1 -1
- package/ssr/esm/lib/components/table-body.wrapper.d.ts +1 -1
- package/ssr/esm/lib/components/table-cell.wrapper.d.ts +1 -1
- package/ssr/esm/lib/components/table-head-cell.wrapper.d.ts +1 -1
- package/ssr/esm/lib/components/table-head-row.wrapper.d.ts +1 -1
- package/ssr/esm/lib/components/table-head.wrapper.d.ts +1 -1
- package/ssr/esm/lib/components/table-row.wrapper.d.ts +1 -1
- package/ssr/esm/lib/components/table.wrapper.d.ts +1 -1
- package/ssr/esm/lib/components/tabs-bar.wrapper.d.ts +1 -1
- package/ssr/esm/lib/components/tabs-item.wrapper.d.ts +1 -1
- package/ssr/esm/lib/components/tabs.wrapper.d.ts +1 -1
- package/ssr/esm/lib/components/tag-dismissible.wrapper.d.ts +1 -1
- package/ssr/esm/lib/components/tag.wrapper.d.ts +1 -1
- package/ssr/esm/lib/components/text-list-item.wrapper.d.ts +1 -1
- package/ssr/esm/lib/components/text-list.wrapper.d.ts +1 -1
- package/ssr/esm/lib/components/text.wrapper.d.ts +1 -1
- package/ssr/esm/lib/components/textarea.wrapper.d.ts +3 -3
- package/ssr/esm/lib/components/toast.wrapper.d.ts +1 -1
- package/ssr/esm/lib/components/wordmark.wrapper.d.ts +1 -1
- package/ssr/esm/lib/dsr-components/ai-tag.d.ts +6 -0
- package/ssr/esm/lib/dsr-components/input-base.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/input-date.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/input-email.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/input-month.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/input-number.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/input-password.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/input-search.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/input-tel.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/input-text.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/input-time.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/input-url.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/input-week.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/multi-select.d.ts +1 -1
- package/ssr/esm/lib/dsr-components/select.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/textarea.d.ts +1 -0
- package/ssr/esm/lib/types.d.ts +221 -2
- package/{global-styles → stylesheets}/cn/font-face.css +1 -1
- package/{global-styles → stylesheets}/cn/index.css +138 -106
- package/{global-styles → stylesheets}/color-scheme.css +47 -44
- package/{global-styles → stylesheets}/font-face.css +1 -1
- package/{global-styles → stylesheets}/index.css +138 -106
- package/stylesheets/normalize.css +18 -0
- package/{global-styles → stylesheets}/variables.css +80 -58
- package/tailwindcss/index.css +569 -301
- package/global-styles/legacy-radius.css +0 -5
- package/global-styles/normalize.css +0 -11
|
@@ -3285,21 +3285,25 @@ const getListboxAriaAttributes = (isRequired, labelId, messageId, descriptionId,
|
|
|
3285
3285
|
};
|
|
3286
3286
|
};
|
|
3287
3287
|
|
|
3288
|
+
/** Holds the **Porsche Next** font family along with fallback fonts. */
|
|
3288
3289
|
const fontPorscheNext = "'Porsche Next','Arial Narrow',Arial,'Heiti SC',SimHei,sans-serif";
|
|
3289
3290
|
|
|
3290
3291
|
/** @deprecated since v4.0.0, will be removed with next major release. Use fontPorscheNext instead. */
|
|
3291
3292
|
const fontFamily = fontPorscheNext;
|
|
3292
3293
|
|
|
3294
|
+
/** Holds a dynamic default line height specifically optimized for the Porsche Next typeface. */
|
|
3293
3295
|
const leadingNormal$1 = 'calc(6px + 2.125ex)';
|
|
3294
3296
|
|
|
3295
3297
|
/** @deprecated since v4.0.0, will be removed with next major release. Use leadingNormal instead */
|
|
3296
3298
|
const fontLineHeight = leadingNormal$1;
|
|
3297
3299
|
|
|
3300
|
+
/** Holds the **small** font size optimized for the Porsche Next typeface. */
|
|
3298
3301
|
const typescaleSm = '1rem';
|
|
3299
3302
|
|
|
3300
3303
|
/** @deprecated since v4.0.0, will be removed with next major release. Use typescaleSm instead. */
|
|
3301
3304
|
const fontSizeTextSmall = typescaleSm;
|
|
3302
3305
|
|
|
3306
|
+
/** Holds the **x-small** font size optimized for the Porsche Next typeface. */
|
|
3303
3307
|
const typescaleXs = '.875rem';
|
|
3304
3308
|
|
|
3305
3309
|
/** @deprecated since v4.0.0, will be removed with next major release. Use typescaleXs instead. */
|
|
@@ -3311,6 +3315,7 @@ const fontStyleNormal = 'normal';
|
|
|
3311
3315
|
/** @deprecated since v4.0.0, will be removed with next major release. Use 'normal' instead. */
|
|
3312
3316
|
const fontVariant = 'normal';
|
|
3313
3317
|
|
|
3318
|
+
/** Holds the **normal** font weight optimized for the Porsche Next typeface. */
|
|
3314
3319
|
const fontWeightNormal = 400;
|
|
3315
3320
|
|
|
3316
3321
|
/** @deprecated since v4.0.0, will be removed with next major release. Use fontWeightNormal instead. */
|
|
@@ -3318,26 +3323,32 @@ const fontWeightRegular = fontWeightNormal;
|
|
|
3318
3323
|
|
|
3319
3324
|
const breakpointBase = 0;
|
|
3320
3325
|
|
|
3326
|
+
/** Holds the `lg` breakpoint value, usable with `px`. */
|
|
3321
3327
|
const breakpointLg = 1300;
|
|
3322
3328
|
|
|
3323
3329
|
const breakpointL = breakpointLg;
|
|
3324
3330
|
|
|
3331
|
+
/** Holds the `md` breakpoint value, usable with `px`. */
|
|
3325
3332
|
const breakpointMd = 1000;
|
|
3326
3333
|
|
|
3327
3334
|
const breakpointM = breakpointMd;
|
|
3328
3335
|
|
|
3336
|
+
/** Holds the `sm` breakpoint value, usable with `px`. */
|
|
3329
3337
|
const breakpointSm = 760;
|
|
3330
3338
|
|
|
3331
3339
|
const breakpointS = breakpointSm;
|
|
3332
3340
|
|
|
3341
|
+
/** Holds the `xl` breakpoint value, usable with `px`. */
|
|
3333
3342
|
const breakpointXl = 1760;
|
|
3334
3343
|
|
|
3335
3344
|
const breakpointXL = breakpointXl;
|
|
3336
3345
|
|
|
3346
|
+
/** Holds the `xs` breakpoint value, usable with `px`. */
|
|
3337
3347
|
const breakpointXs = 480;
|
|
3338
3348
|
|
|
3339
3349
|
const breakpointXS = breakpointXs;
|
|
3340
3350
|
|
|
3351
|
+
/** Holds the `2xl` breakpoint value, usable with `px`. */
|
|
3341
3352
|
const breakpoint2Xl = 1920;
|
|
3342
3353
|
|
|
3343
3354
|
const breakpointXXL = breakpoint2Xl;
|
|
@@ -3452,7 +3463,7 @@ const hasShowPickerSupport = () => (hasDocument &&
|
|
|
3452
3463
|
'showPicker' in HTMLInputElement.prototype &&
|
|
3453
3464
|
CSS.supports('selector(::-webkit-calendar-picker-indicator)'));
|
|
3454
3465
|
|
|
3455
|
-
const prefix = `[Porsche Design System v${"4.2.0-rc.
|
|
3466
|
+
const prefix = `[Porsche Design System v${"4.2.0-rc.3"}]` // this part isn't covered by unit tests
|
|
3456
3467
|
;
|
|
3457
3468
|
const consoleError$1 = (...messages) => {
|
|
3458
3469
|
console.error(prefix, ...messages);
|
|
@@ -3551,7 +3562,11 @@ const isValidArray = (propName, arr, validator) => {
|
|
|
3551
3562
|
: {
|
|
3552
3563
|
propName,
|
|
3553
3564
|
propValue: arr,
|
|
3554
|
-
|
|
3565
|
+
// Derive propType for the error message by invoking the validator with a value that is
|
|
3566
|
+
// guaranteed to fail. `null` works for most built-in validators (string/number/boolean),
|
|
3567
|
+
// but not for `AllowedTypes.null` itself, so fall back to a unique Symbol which fails
|
|
3568
|
+
// every typeof-based validator.
|
|
3569
|
+
propType: (validator(propName, null) ?? validator(propName, Symbol('invalid')))?.propType,
|
|
3555
3570
|
};
|
|
3556
3571
|
if (validationError) {
|
|
3557
3572
|
return { ...validationError, propType: `${validationError.propType}[]` };
|
|
@@ -3573,6 +3588,162 @@ const internalValidateProps = {
|
|
|
3573
3588
|
const breakpointCustomizableTemplate = `value, ${internalValidateProps
|
|
3574
3589
|
.formatObjectOutput(breakpoints.reduce((prev, key) => ({ ...prev, [key + (key !== 'base' ? '?' : '')]: 'value' }), {}))
|
|
3575
3590
|
.replace(/"/g, '')}`;
|
|
3591
|
+
// ISO locale code to AI text mapping
|
|
3592
|
+
const AI_TAG_TRANSLATIONS = {
|
|
3593
|
+
bg_BG: {
|
|
3594
|
+
short: 'ИИ',
|
|
3595
|
+
long: 'изкуствен интелект',
|
|
3596
|
+
generated: 'генериран от изкуствен интелект',
|
|
3597
|
+
modified: 'модифициран от изкуствен интелект',
|
|
3598
|
+
},
|
|
3599
|
+
bs_BA: { short: 'AI', long: 'vještačka inteligencija', generated: 'AI-generisano', modified: 'AI-modifikovano' },
|
|
3600
|
+
cs_CZ: { short: 'AI', long: 'umělá inteligence', generated: 'Vytvořeno AI', modified: 'Upraveno AI' },
|
|
3601
|
+
da_DK: { short: 'KI', long: 'kunstig intelligens', generated: 'AI-genereret', modified: 'AI-modificeret' },
|
|
3602
|
+
de_DE: {
|
|
3603
|
+
short: 'KI',
|
|
3604
|
+
long: 'künstliche Intelligenz',
|
|
3605
|
+
generated: 'KI-generiert',
|
|
3606
|
+
modified: 'KI-modifiziert',
|
|
3607
|
+
},
|
|
3608
|
+
el_GR: {
|
|
3609
|
+
short: 'ΤΝ',
|
|
3610
|
+
long: 'τεχνητή νοημοσύνη',
|
|
3611
|
+
generated: 'Δημιουργημένο από ΤΝ',
|
|
3612
|
+
modified: 'Τροποποιημένο από ΤΝ',
|
|
3613
|
+
},
|
|
3614
|
+
en_CY: { short: 'AI', long: 'artificial intelligence', generated: 'AI-generated', modified: 'AI-modified' },
|
|
3615
|
+
en_GB: { short: 'AI', long: 'artificial intelligence', generated: 'AI-generated', modified: 'AI-modified' },
|
|
3616
|
+
en_US: { short: 'AI', long: 'artificial intelligence', generated: 'AI-generated', modified: 'AI-modified' },
|
|
3617
|
+
es_ES: {
|
|
3618
|
+
short: 'IA',
|
|
3619
|
+
long: 'inteligencia artificial',
|
|
3620
|
+
generated: 'Generado por IA',
|
|
3621
|
+
modified: 'Modificado por IA',
|
|
3622
|
+
},
|
|
3623
|
+
et_EE: { short: 'TI', long: 'tehisintellekt', generated: 'TI abil loodud', modified: 'TI abil muudetud' },
|
|
3624
|
+
fi_FI: {
|
|
3625
|
+
short: 'AI',
|
|
3626
|
+
long: 'tekoäly',
|
|
3627
|
+
generated: 'Tekoälyn tuottama',
|
|
3628
|
+
modified: 'Tekoälyn muokkaama',
|
|
3629
|
+
},
|
|
3630
|
+
fr_FR: {
|
|
3631
|
+
short: 'IA',
|
|
3632
|
+
long: 'intelligence artificielle',
|
|
3633
|
+
generated: 'Généré par une IA',
|
|
3634
|
+
modified: 'Modifié par une IA',
|
|
3635
|
+
},
|
|
3636
|
+
he_IL: {
|
|
3637
|
+
short: 'AI',
|
|
3638
|
+
long: 'בינה מלאכותית',
|
|
3639
|
+
generated: 'נוצר על ידי בינה מלאכותית',
|
|
3640
|
+
modified: 'נערך באמצעות בינה מלאכותית',
|
|
3641
|
+
},
|
|
3642
|
+
hr_HR: {
|
|
3643
|
+
short: 'UI',
|
|
3644
|
+
long: 'umjetna inteligencija',
|
|
3645
|
+
generated: 'Generirano uz pomoć UI',
|
|
3646
|
+
modified: 'Izmijenjeno uz pomoć UI',
|
|
3647
|
+
},
|
|
3648
|
+
hu_HU: {
|
|
3649
|
+
short: 'MI',
|
|
3650
|
+
long: 'mesterséges intelligencia',
|
|
3651
|
+
generated: 'MI-generált',
|
|
3652
|
+
modified: 'MI-módosított',
|
|
3653
|
+
},
|
|
3654
|
+
is_IS: {
|
|
3655
|
+
short: 'AI',
|
|
3656
|
+
long: 'gervigreind',
|
|
3657
|
+
generated: 'Búið til af gervigreind',
|
|
3658
|
+
modified: 'Breytt af gervigreind',
|
|
3659
|
+
},
|
|
3660
|
+
it_IT: {
|
|
3661
|
+
short: 'IA',
|
|
3662
|
+
long: 'intelligenza artificiale',
|
|
3663
|
+
generated: "Generato dall'IA",
|
|
3664
|
+
modified: "Modificato dall'IA",
|
|
3665
|
+
},
|
|
3666
|
+
lt_LT: {
|
|
3667
|
+
short: 'DI',
|
|
3668
|
+
long: 'dirbtinis intelektas',
|
|
3669
|
+
generated: 'DI sugeneruotas',
|
|
3670
|
+
modified: 'DI modifikuotas',
|
|
3671
|
+
},
|
|
3672
|
+
lv_LV: {
|
|
3673
|
+
short: 'MI',
|
|
3674
|
+
long: 'mākslīgais intelekts',
|
|
3675
|
+
generated: 'MI ģenerēts',
|
|
3676
|
+
modified: 'MI pārveidots',
|
|
3677
|
+
},
|
|
3678
|
+
me_ME: { short: 'AI', long: 'veštačka inteligencija', generated: 'AI-generisano', modified: 'AI-modifikovano' },
|
|
3679
|
+
mk_MK: {
|
|
3680
|
+
short: 'ВИ',
|
|
3681
|
+
long: 'вештачка интелигенција',
|
|
3682
|
+
generated: 'Создадено од ВИ',
|
|
3683
|
+
modified: 'Изменето со ВИ',
|
|
3684
|
+
},
|
|
3685
|
+
mt_MT: { short: 'AI', long: 'artificial intelligence', generated: 'AI-generated', modified: 'AI-modified' },
|
|
3686
|
+
nb_NO: {
|
|
3687
|
+
short: 'KI',
|
|
3688
|
+
long: 'kunstig intelligens',
|
|
3689
|
+
generated: 'KI-generert',
|
|
3690
|
+
modified: 'KI-modifisert',
|
|
3691
|
+
},
|
|
3692
|
+
nl_NL: {
|
|
3693
|
+
short: 'AI',
|
|
3694
|
+
long: 'kunstmatige intelligentie',
|
|
3695
|
+
generated: 'Door AI gegenereerd',
|
|
3696
|
+
modified: 'Door AI gewijzigd',
|
|
3697
|
+
},
|
|
3698
|
+
pl_PL: {
|
|
3699
|
+
short: 'SI',
|
|
3700
|
+
long: 'sztuczna inteligencja',
|
|
3701
|
+
generated: 'Wygenerowane przez SI',
|
|
3702
|
+
modified: 'Zmodyfikowane przez SI',
|
|
3703
|
+
},
|
|
3704
|
+
pt_PT: {
|
|
3705
|
+
short: 'IA',
|
|
3706
|
+
long: 'inteligência artificial',
|
|
3707
|
+
generated: 'Gerado por IA',
|
|
3708
|
+
modified: 'Modificado por IA',
|
|
3709
|
+
},
|
|
3710
|
+
ro_RO: {
|
|
3711
|
+
short: 'IA',
|
|
3712
|
+
long: 'inteligență artificială',
|
|
3713
|
+
generated: 'Generat cu ajutorul IA',
|
|
3714
|
+
modified: 'Modificat cu ajutorul IA',
|
|
3715
|
+
},
|
|
3716
|
+
ru_RU: {
|
|
3717
|
+
short: 'ИИ',
|
|
3718
|
+
long: 'искусственный интеллект',
|
|
3719
|
+
generated: 'Сгенерировано ИИ',
|
|
3720
|
+
modified: 'Изменено ИИ',
|
|
3721
|
+
},
|
|
3722
|
+
sk_SK: { short: 'AI', long: 'umelá inteligencia', generated: 'Vytvorené AI', modified: 'Upravené AI' },
|
|
3723
|
+
sl_SI: { short: 'UI', long: 'umetna inteligenca', generated: 'Ustvarjeno z UI', modified: 'Spremenjeno z UI' },
|
|
3724
|
+
sr_RS: { short: 'AI', long: 'veštačka inteligencija', generated: 'AI-generisano', modified: 'AI-modifikovano' },
|
|
3725
|
+
sv_SE: {
|
|
3726
|
+
short: 'AI',
|
|
3727
|
+
long: 'artificiell intelligens',
|
|
3728
|
+
generated: 'AI-genererad',
|
|
3729
|
+
modified: 'AI-modifierad',
|
|
3730
|
+
},
|
|
3731
|
+
tr_TR: {
|
|
3732
|
+
short: 'AI',
|
|
3733
|
+
long: 'yapay zeka',
|
|
3734
|
+
generated: 'Yapay zeka tarafından üretilmiş',
|
|
3735
|
+
modified: 'Yapay zeka tarafından değiştirilmiş',
|
|
3736
|
+
},
|
|
3737
|
+
uk_UA: {
|
|
3738
|
+
short: 'ШІ',
|
|
3739
|
+
long: 'штучний інтелект',
|
|
3740
|
+
generated: 'Згенеровано ШІ',
|
|
3741
|
+
modified: 'Змінено ШІ',
|
|
3742
|
+
},
|
|
3743
|
+
};
|
|
3744
|
+
const getAiTagTranslation = (locale) => {
|
|
3745
|
+
return AI_TAG_TRANSLATIONS[locale] ?? AI_TAG_TRANSLATIONS['en_US'];
|
|
3746
|
+
};
|
|
3576
3747
|
const getBannerAriaAttributes = (state, heading) => {
|
|
3577
3748
|
const isAlert = state === 'warning' || state === 'error';
|
|
3578
3749
|
return {
|
|
@@ -3935,4 +4106,4 @@ const getTextTagType = (host, tag) => {
|
|
|
3935
4106
|
return tag;
|
|
3936
4107
|
};
|
|
3937
4108
|
|
|
3938
|
-
export { DISPLAY_TAGS, HEADING_TAGS, ItemType, TEXT_TAGS, anchorSlot, attributeMutationMap, buildCrestImgSrc, buildCrestSrcSet, buildFlagUrl, buildIconUrl, consoleError$1 as consoleError, createPaginationItems, createRange, crestSize, descriptionId, displaySizeToTagMap, getBannerAriaAttributes, getButtonAriaAttributes, getButtonBaseAriaAttributes, getButtonPureAriaAttributes, getCDNBaseURL, getComboboxAriaAttributes, getCurrentActivePage, getDirectChildHTMLElement, getDisplayTagType, getFieldsetAriaAttributes, getHTMLElement, getHasNativePopoverSupport, getHeadingTagType, getInlineNotificationAriaAttributes, getListboxAriaAttributes, getSanitizedActiveTabIndex, getSegmentedControlItemAriaAttributes, getStepperHorizontalIconName, getSvgUrl, getSwitchButtonAriaAttributes, getTagName, getTagNameWithoutPrefix, getTextTagType, getTotalPages, hasDocument, hasShowPickerSupport, hasSpecificDirectChildTag, hasVisibleIcon, hasWindow$1 as hasWindow, headerSlot, internalDrilldown, isCurrentInput, isDisabledOrLoading, isElementOfKind, isInfinitePagination, isListTypeOrdered, isSortable, isStateCompleteOrWarning, isUrl, labelId, mergeInputNativeAria, observedNodesMap, parseAndGetAriaAttributes, parseJSONAttribute, setAriaIDREF, supportsConstructableStylesheets, supportsNativePopover, tempDiv, tempIcon, tempLabel, traverseTreeAndUpdateState, updateDrilldownItemState };
|
|
4109
|
+
export { AI_TAG_TRANSLATIONS, DISPLAY_TAGS, HEADING_TAGS, ItemType, TEXT_TAGS, anchorSlot, attributeMutationMap, buildCrestImgSrc, buildCrestSrcSet, buildFlagUrl, buildIconUrl, consoleError$1 as consoleError, createPaginationItems, createRange, crestSize, descriptionId, displaySizeToTagMap, getAiTagTranslation, getBannerAriaAttributes, getButtonAriaAttributes, getButtonBaseAriaAttributes, getButtonPureAriaAttributes, getCDNBaseURL, getComboboxAriaAttributes, getCurrentActivePage, getDirectChildHTMLElement, getDisplayTagType, getFieldsetAriaAttributes, getHTMLElement, getHasNativePopoverSupport, getHeadingTagType, getInlineNotificationAriaAttributes, getListboxAriaAttributes, getSanitizedActiveTabIndex, getSegmentedControlItemAriaAttributes, getStepperHorizontalIconName, getSvgUrl, getSwitchButtonAriaAttributes, getTagName, getTagNameWithoutPrefix, getTextTagType, getTotalPages, hasDocument, hasShowPickerSupport, hasSpecificDirectChildTag, hasVisibleIcon, hasWindow$1 as hasWindow, headerSlot, internalDrilldown, isCurrentInput, isDisabledOrLoading, isElementOfKind, isInfinitePagination, isListTypeOrdered, isSortable, isStateCompleteOrWarning, isUrl, labelId, mergeInputNativeAria, observedNodesMap, parseAndGetAriaAttributes, parseJSONAttribute, setAriaIDREF, supportsConstructableStylesheets, supportsNativePopover, tempDiv, tempIcon, tempLabel, traverseTreeAndUpdateState, updateDrilldownItemState };
|
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(({ alignMarker = 'end', background = 'none', 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', indent = false, 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 = [alignMarker, background, compact, heading, headingTag, open, size, sticky];
|
|
12
|
+
const propsToSync = [alignMarker, background, compact, heading, headingTag, indent, open, size, sticky];
|
|
13
13
|
useBrowserLayoutEffect(() => {
|
|
14
14
|
const { current } = elementRef;
|
|
15
|
-
['alignMarker', 'background', 'compact', 'heading', 'headingTag', 'open', 'size', 'sticky'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
15
|
+
['alignMarker', 'background', 'compact', 'heading', 'headingTag', 'indent', '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, { alignMarker, background, compact, heading, headingTag, open, size, sticky, children })),
|
|
22
|
+
children: (jsx(DSRAccordion, { alignMarker, background, compact, heading, headingTag, indent, open, size, sticky, children })),
|
|
23
23
|
}
|
|
24
24
|
: {
|
|
25
25
|
children,
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/ai-tag.wrapper.mjs
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { forwardRef, useRef } from 'react';
|
|
4
|
+
import { usePrefix, useBrowserLayoutEffect, useMergedClass } from '../../hooks.mjs';
|
|
5
|
+
import { syncRef } from '../../utils.mjs';
|
|
6
|
+
import { DSRAiTag } from '../dsr-components/ai-tag.mjs';
|
|
7
|
+
|
|
8
|
+
const PAiTag = /*#__PURE__*/ forwardRef(({ locale = 'en_US', variant = 'generated', className, ...rest }, ref) => {
|
|
9
|
+
const elementRef = useRef(undefined);
|
|
10
|
+
const WebComponentTag = usePrefix('p-ai-tag');
|
|
11
|
+
const propsToSync = [locale, variant];
|
|
12
|
+
useBrowserLayoutEffect(() => {
|
|
13
|
+
const { current } = elementRef;
|
|
14
|
+
['locale', 'variant'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
15
|
+
}, propsToSync);
|
|
16
|
+
const props = {
|
|
17
|
+
...rest,
|
|
18
|
+
// @ts-ignore
|
|
19
|
+
...(!process.browser
|
|
20
|
+
? {
|
|
21
|
+
children: (jsx(DSRAiTag, { locale, variant })),
|
|
22
|
+
}
|
|
23
|
+
: {
|
|
24
|
+
suppressHydrationWarning: true,
|
|
25
|
+
}),
|
|
26
|
+
'data-ssr': '',
|
|
27
|
+
class: useMergedClass(elementRef, className),
|
|
28
|
+
ref: syncRef(elementRef, ref)
|
|
29
|
+
};
|
|
30
|
+
// @ts-ignore
|
|
31
|
+
return jsx(WebComponentTag, { ...props });
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
export { PAiTag };
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/accordion.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import { splitChildren } from '../../splitChildren.mjs';
|
|
3
3
|
import { Component } from 'react';
|
|
4
4
|
import { minifyCss } from '../../minifyCss.mjs';
|
|
5
|
-
import { getAccordionCss as getComponentCss$
|
|
5
|
+
import { getAccordionCss as getComponentCss$1a } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* @slot {"name": "summary", "description": "Content for the accordion's summary section. Clicking toggles the accordion open and closed." }
|
|
@@ -24,7 +24,7 @@ class DSRAccordion extends Component {
|
|
|
24
24
|
const hasSummaryBefore = namedSlotChildren.filter(({ props: { slot } }) => slot === 'summary-before').length > 0;
|
|
25
25
|
const hasSummaryAfter = namedSlotChildren.filter(({ props: { slot } }) => slot === 'summary-after').length > 0;
|
|
26
26
|
const Heading = this.props.headingTag;
|
|
27
|
-
const style = minifyCss(getComponentCss$
|
|
27
|
+
const style = minifyCss(getComponentCss$1a(this.props.alignMarker, this.props.background, this.props.compact, this.props.indent, this.props.open, this.props.sticky, hasSummaryBefore, hasSummaryAfter, this.props.size));
|
|
28
28
|
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", 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] }));
|
|
29
29
|
}
|
|
30
30
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { Component } from 'react';
|
|
3
|
+
import { minifyCss } from '../../minifyCss.mjs';
|
|
4
|
+
import { getAiTagCss as getComponentCss$19 } from '../../../../../../components/dist/styles/esm/styles-entry.mjs';
|
|
5
|
+
import { getAiTagTranslation } from '../../../../../../components/dist/utils/esm/utils-entry.mjs';
|
|
6
|
+
|
|
7
|
+
class DSRAiTag extends Component {
|
|
8
|
+
host;
|
|
9
|
+
render() {
|
|
10
|
+
const { short, long, generated, modified } = getAiTagTranslation(this.props.locale);
|
|
11
|
+
const style = minifyCss(getComponentCss$19());
|
|
12
|
+
return (jsx(Fragment, { children: jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsx("div", { children: this.props.variant !== 'abbreviation' ? (this.props.variant === 'modified' ? (modified) : (generated)) : (jsx("abbr", { title: long, children: short })) })] }) }));
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export { DSRAiTag };
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox.mjs
CHANGED
|
@@ -25,7 +25,6 @@ class DSRCheckbox extends Component {
|
|
|
25
25
|
checkboxInputElement;
|
|
26
26
|
externalLabel = null;
|
|
27
27
|
formResetCallback() {
|
|
28
|
-
this.props.internals?.setFormValue(this.props.defaultChecked ? this.props.value : undefined);
|
|
29
28
|
}
|
|
30
29
|
formDisabledCallback() {
|
|
31
30
|
// Called when a parent fieldset is disabled or enabled
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/dialog-base.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import { PButton } from '../components/button.wrapper.mjs';
|
|
|
6
6
|
const DialogBase = ({ children,
|
|
7
7
|
// host,
|
|
8
8
|
inert, containerClass, ariaAttributes, dismissable = false, header, footer, subFooter, }) => {
|
|
9
|
-
return (jsx("dialog", { inert: inert, tabIndex: -1, ...(ariaAttributes ?? {}), children: jsx("div", { className: "scroller", children: jsxs("div", { className: containerClass, children: [dismissable && (jsx(PButton, { className: "dismiss",
|
|
9
|
+
return (jsx("dialog", { inert: inert, tabIndex: -1, ...(ariaAttributes ?? {}), children: jsx("div", { className: "scroller", children: jsxs("div", { className: containerClass, children: [dismissable && (jsx(PButton, { className: "dismiss", compact: true, type: "button", hideLabel: true, icon: "close", children: `Dismiss ${containerClass}` })), header, children, footer, subFooter] }) }) }));
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
export { DialogBase };
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-base.mjs
CHANGED
|
@@ -10,7 +10,7 @@ import { PSpinner } from '../components/spinner.wrapper.mjs';
|
|
|
10
10
|
|
|
11
11
|
const InputBase = ({ children,
|
|
12
12
|
// host,
|
|
13
|
-
id, label, description, loading, initialLoading, required, disabled, state, message, readOnly, type, form, placeholder, maxLength, minLength, max, min, value, step, spellCheck, autoComplete, pattern, multiple, name,
|
|
13
|
+
id, label, description, loading, initialLoading, required, disabled, state, message, readOnly, type, form, placeholder, maxLength, minLength, max, min, value, step, spellCheck, autoComplete, pattern, multiple, name, inputMode,
|
|
14
14
|
// onInput,
|
|
15
15
|
// onWheel,
|
|
16
16
|
// onChange,
|
|
@@ -27,7 +27,7 @@ start, end, aria, }) => {
|
|
|
27
27
|
'aria-disabled': disabled || loading ? 'true' : null,
|
|
28
28
|
'aria-readonly': readOnly ? 'true' : null,
|
|
29
29
|
});
|
|
30
|
-
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", { ...inputAria, 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.
|
|
30
|
+
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", { ...inputAria, 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, ...(inputMode !== undefined && { inputMode }), dir: "auto" // This overwrites the default: let the browser now decide in which direction the value should be placed.
|
|
31
31
|
}), end, jsx("slot", { name: "end" }), loading && jsx(PSpinner, { "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 })] }));
|
|
32
32
|
};
|
|
33
33
|
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-date.mjs
CHANGED
|
@@ -24,6 +24,10 @@ class DSRInputDate extends Component {
|
|
|
24
24
|
initialLoading = false;
|
|
25
25
|
inputElement;
|
|
26
26
|
defaultValue;
|
|
27
|
+
// Native input.value is always a string; coerce null/undefined to mirror native behavior.
|
|
28
|
+
get parsedValue() {
|
|
29
|
+
return String(this.props.value ?? '');
|
|
30
|
+
}
|
|
27
31
|
formResetCallback() {
|
|
28
32
|
// triggers value watcher
|
|
29
33
|
}
|
|
@@ -35,7 +39,7 @@ class DSRInputDate extends Component {
|
|
|
35
39
|
render() {
|
|
36
40
|
splitChildren(this.props.children);
|
|
37
41
|
const style = minifyCss(getComponentCss$R(this.props.disabled, this.props.loading, this.props.hideLabel, this.props.state, this.props.compact, this.props.readOnly));
|
|
38
|
-
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsx(InputBase, { children: this.props.children, host: null, label: this.props.label, description: this.props.description, id: "input-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.
|
|
42
|
+
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.parsedValue, readOnly: this.props.readOnly, autoComplete: this.props.autoComplete, disabled: this.props.disabled, state: this.props.state, message: this.props.message, step: this.props.step, loading: this.props.loading, initialLoading: this.props.initialLoading, ...(hasShowPickerSupport() && {
|
|
39
43
|
end: (jsx(PButtonPure, { tabIndex: this.props.disabled ? -1 : null, hideLabel: true, className: "button", type: "button", icon: "calendar", disabled: this.props.disabled || this.props.readOnly, children: "Open date picker" })),
|
|
40
44
|
}) })] }), this.props.children] }));
|
|
41
45
|
}
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-email.mjs
CHANGED
|
@@ -23,6 +23,10 @@ class DSRInputEmail extends Component {
|
|
|
23
23
|
initialLoading = false;
|
|
24
24
|
inputElement;
|
|
25
25
|
defaultValue;
|
|
26
|
+
// Native input.value is always a string; coerce number/null/undefined to mirror native behavior.
|
|
27
|
+
get parsedValue() {
|
|
28
|
+
return String(this.props.value ?? '');
|
|
29
|
+
}
|
|
26
30
|
formResetCallback() {
|
|
27
31
|
// triggers value watcher
|
|
28
32
|
}
|
|
@@ -34,7 +38,7 @@ class DSRInputEmail extends Component {
|
|
|
34
38
|
render() {
|
|
35
39
|
splitChildren(this.props.children);
|
|
36
40
|
const style = minifyCss(getComponentCss$Q(this.props.disabled, this.props.loading, this.props.hideLabel, this.props.state, 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-email", name: this.props.name, form: this.props.form, type: "email", required: this.props.required, placeholder: this.props.placeholder, maxLength: this.props.maxLength, minLength: this.props.minLength, value: this.
|
|
41
|
+
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-email", name: this.props.name, form: this.props.form, type: "email", required: this.props.required, placeholder: this.props.placeholder, maxLength: this.props.maxLength, minLength: this.props.minLength, value: this.parsedValue, readOnly: this.props.readOnly, autoComplete: this.props.autoComplete, disabled: this.props.disabled, state: this.props.state, message: this.props.message, loading: this.props.loading, pattern: this.props.pattern, multiple: this.props.multiple, initialLoading: this.props.initialLoading, ...(this.props.indicator && {
|
|
38
42
|
start: jsx(PIcon, { "aria-hidden": "true", name: "email", color: "contrast-low" }),
|
|
39
43
|
}) })] }), this.props.children] }));
|
|
40
44
|
}
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-month.mjs
CHANGED
|
@@ -24,6 +24,10 @@ class DSRInputMonth extends Component {
|
|
|
24
24
|
initialLoading = false;
|
|
25
25
|
inputElement;
|
|
26
26
|
defaultValue;
|
|
27
|
+
// Native input.value is always a string; coerce null/undefined to mirror native behavior.
|
|
28
|
+
get parsedValue() {
|
|
29
|
+
return String(this.props.value ?? '');
|
|
30
|
+
}
|
|
27
31
|
formResetCallback() {
|
|
28
32
|
// triggers value watcher
|
|
29
33
|
}
|
|
@@ -35,7 +39,7 @@ class DSRInputMonth extends Component {
|
|
|
35
39
|
render() {
|
|
36
40
|
splitChildren(this.props.children);
|
|
37
41
|
const style = minifyCss(getComponentCss$P(this.props.disabled, this.props.loading, this.props.hideLabel, this.props.state, this.props.compact, this.props.readOnly));
|
|
38
|
-
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsx(InputBase, { children: this.props.children, host: null, label: this.props.label, description: this.props.description, id: "input-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.
|
|
42
|
+
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.parsedValue, readOnly: this.props.readOnly, autoComplete: this.props.autoComplete, disabled: this.props.disabled, state: this.props.state, message: this.props.message, step: this.props.step, loading: this.props.loading, initialLoading: this.props.initialLoading, ...(hasShowPickerSupport() && {
|
|
39
43
|
end: (jsx(PButtonPure, { tabIndex: this.props.disabled ? -1 : null, hideLabel: true, className: "button", type: "button", icon: "calendar", disabled: this.props.disabled || this.props.readOnly, children: "Open date picker" })),
|
|
40
44
|
}) })] }), this.props.children] }));
|
|
41
45
|
}
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-number.mjs
CHANGED
|
@@ -23,6 +23,10 @@ class DSRInputNumber extends Component {
|
|
|
23
23
|
initialLoading = false;
|
|
24
24
|
inputElement;
|
|
25
25
|
defaultValue;
|
|
26
|
+
// Native input.value is always a string; coerce number/null/undefined to mirror native behavior.
|
|
27
|
+
get parsedValue() {
|
|
28
|
+
return String(this.props.value ?? '');
|
|
29
|
+
}
|
|
26
30
|
formResetCallback() {
|
|
27
31
|
// triggers value watcher
|
|
28
32
|
}
|
|
@@ -35,7 +39,7 @@ class DSRInputNumber extends Component {
|
|
|
35
39
|
splitChildren(this.props.children);
|
|
36
40
|
const style = minifyCss(getComponentCss$O(this.props.disabled, this.props.loading, this.props.hideLabel, this.props.state, this.props.compact, this.props.readOnly, this.props.controls));
|
|
37
41
|
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-number" // prevent React default scroll-to-[increment|decrement] on number inputs
|
|
38
|
-
, name: this.props.name, form: this.props.form, type: "number", required: this.props.required, placeholder: this.props.placeholder, max: this.props.max, min: this.props.min, value: this.
|
|
42
|
+
, name: this.props.name, form: this.props.form, type: "number", required: this.props.required, placeholder: this.props.placeholder, max: this.props.max, min: this.props.min, value: this.parsedValue, 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, ...(this.props.controls && {
|
|
39
43
|
end: (jsxs(Fragment, { children: [jsxs(PButtonPure, { tabIndex: -1, hideLabel: true, className: "button", type: "button", icon: "minus", disabled: this.props.disabled || this.props.readOnly, children: ["Decrement value by ", this.props.step] }), jsxs(PButtonPure, { tabIndex: -1, hideLabel: true, className: "button", type: "button", icon: "plus", disabled: this.props.disabled || this.props.readOnly, children: ["Increment value by ", this.props.step] })] })),
|
|
40
44
|
}) })] }), this.props.children] }));
|
|
41
45
|
}
|
|
@@ -24,6 +24,10 @@ class DSRInputPassword extends Component {
|
|
|
24
24
|
initialLoading = false;
|
|
25
25
|
inputElement;
|
|
26
26
|
defaultValue;
|
|
27
|
+
// Native input.value is always a string; coerce number/null/undefined to mirror native behavior.
|
|
28
|
+
get parsedValue() {
|
|
29
|
+
return String(this.props.value ?? '');
|
|
30
|
+
}
|
|
27
31
|
formResetCallback() {
|
|
28
32
|
// triggers value watcher
|
|
29
33
|
}
|
|
@@ -35,7 +39,7 @@ class DSRInputPassword extends Component {
|
|
|
35
39
|
render() {
|
|
36
40
|
splitChildren(this.props.children);
|
|
37
41
|
const style = minifyCss(getComponentCss$N(this.props.disabled, this.props.loading, this.props.hideLabel, this.props.state, this.props.toggle, this.props.compact, this.props.readOnly));
|
|
38
|
-
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsx(InputBase, { children: this.props.children, host: null, label: this.props.label, description: this.props.description, id: "input-password", name: this.props.name, form: this.props.form, type: this.props.showPassword ? 'text' : 'password', required: this.props.required, placeholder: this.props.placeholder, maxLength: this.props.maxLength, minLength: this.props.minLength, value: this.
|
|
42
|
+
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.parsedValue, readOnly: this.props.readOnly, autoComplete: this.props.autoComplete, disabled: this.props.disabled, state: this.props.state, message: this.props.message, loading: this.props.loading, initialLoading: this.props.initialLoading, end: this.props.toggle && (jsx(PButtonPure, { tabIndex: this.props.disabled ? -1 : null, hideLabel: true, className: "button", type: "button", icon: this.props.showPassword ? 'view-off' : 'view', disabled: this.props.disabled, aria: { 'aria-pressed': this.props.showPassword ? 'true' : 'false' }, children: "Toggle password visibility" })) })] }), this.props.children] }));
|
|
39
43
|
}
|
|
40
44
|
}
|
|
41
45
|
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-search.mjs
CHANGED
|
@@ -25,6 +25,10 @@ class DSRInputSearch extends Component {
|
|
|
25
25
|
initialLoading = false;
|
|
26
26
|
inputElement;
|
|
27
27
|
defaultValue;
|
|
28
|
+
// Native input.value is always a string; coerce number/null/undefined to mirror native behavior.
|
|
29
|
+
get parsedValue() {
|
|
30
|
+
return String(this.props.value ?? '');
|
|
31
|
+
}
|
|
28
32
|
formResetCallback() {
|
|
29
33
|
// triggers value watcher
|
|
30
34
|
}
|
|
@@ -36,7 +40,7 @@ class DSRInputSearch extends Component {
|
|
|
36
40
|
render() {
|
|
37
41
|
splitChildren(this.props.children);
|
|
38
42
|
const style = minifyCss(getComponentCss$M(this.props.disabled, this.props.loading, this.props.hideLabel, this.props.state, this.props.compact, this.props.readOnly, this.props.clear));
|
|
39
|
-
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-search", name: this.props.name, form: this.props.form, type: "search", required: this.props.required, placeholder: this.props.placeholder, maxLength: this.props.maxLength, minLength: this.props.minLength, value: this.
|
|
43
|
+
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-search", name: this.props.name, form: this.props.form, type: "search", required: this.props.required, placeholder: this.props.placeholder, maxLength: this.props.maxLength, minLength: this.props.minLength, value: this.parsedValue, 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, aria: this.props.aria, ...(this.props.indicator && {
|
|
40
44
|
start: jsx(PIcon, { "aria-hidden": "true", name: "search", color: "contrast-medium" }),
|
|
41
45
|
}), ...(this.props.clear && {
|
|
42
46
|
end: (jsx(PButtonPure, { tabIndex: -1, hideLabel: true, className: "button", type: "button", icon: "close", hidden: !this.props.isClearable, disabled: this.props.readOnly || this.props.disabled, children: "Clear field" })),
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-tel.mjs
CHANGED
|
@@ -23,6 +23,10 @@ class DSRInputTel extends Component {
|
|
|
23
23
|
initialLoading = false;
|
|
24
24
|
inputElement;
|
|
25
25
|
defaultValue;
|
|
26
|
+
// Native input.value is always a string; coerce number/null/undefined to mirror native behavior.
|
|
27
|
+
get parsedValue() {
|
|
28
|
+
return String(this.props.value ?? '');
|
|
29
|
+
}
|
|
26
30
|
formResetCallback() {
|
|
27
31
|
// triggers value watcher
|
|
28
32
|
}
|
|
@@ -34,7 +38,7 @@ class DSRInputTel extends Component {
|
|
|
34
38
|
render() {
|
|
35
39
|
splitChildren(this.props.children);
|
|
36
40
|
const style = minifyCss(getComponentCss$L(this.props.disabled, this.props.loading, this.props.hideLabel, this.props.state, 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-tel", name: this.props.name, form: this.props.form, type: "tel", required: this.props.required, placeholder: this.props.placeholder, maxLength: this.props.maxLength, minLength: this.props.minLength, value: this.
|
|
41
|
+
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-tel", name: this.props.name, form: this.props.form, type: "tel", required: this.props.required, placeholder: this.props.placeholder, maxLength: this.props.maxLength, minLength: this.props.minLength, value: this.parsedValue, readOnly: this.props.readOnly, autoComplete: this.props.autoComplete, disabled: this.props.disabled, state: this.props.state, message: this.props.message, loading: this.props.loading, pattern: this.props.pattern, initialLoading: this.props.initialLoading, ...(this.props.indicator && {
|
|
38
42
|
start: jsx(PIcon, { "aria-hidden": "true", name: "phone", color: "contrast-low" }),
|
|
39
43
|
}) })] }), this.props.children] }));
|
|
40
44
|
}
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-text.mjs
CHANGED
|
@@ -21,6 +21,10 @@ class DSRInputText extends Component {
|
|
|
21
21
|
initialLoading = false;
|
|
22
22
|
inputElement;
|
|
23
23
|
defaultValue;
|
|
24
|
+
// Native input.value is always a string; coerce number/null/undefined to mirror native behavior.
|
|
25
|
+
get parsedValue() {
|
|
26
|
+
return String(this.props.value ?? '');
|
|
27
|
+
}
|
|
24
28
|
formResetCallback() {
|
|
25
29
|
// triggers value watcher
|
|
26
30
|
}
|
|
@@ -32,10 +36,10 @@ class DSRInputText extends Component {
|
|
|
32
36
|
render() {
|
|
33
37
|
splitChildren(this.props.children);
|
|
34
38
|
const style = minifyCss(getComponentCss$K(this.props.disabled, this.props.loading, this.props.hideLabel, this.props.state, this.props.compact, this.props.readOnly, this.props.counter));
|
|
35
|
-
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-text", name: this.props.name, form: this.props.form, type: "text", required: this.props.required, placeholder: this.props.placeholder, maxLength: this.props.maxLength, minLength: this.props.minLength, value: this.
|
|
39
|
+
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-text", name: this.props.name, form: this.props.form, type: "text", required: this.props.required, placeholder: this.props.placeholder, maxLength: this.props.maxLength, minLength: this.props.minLength, value: this.parsedValue, readOnly: this.props.readOnly, autoComplete: this.props.autoComplete, disabled: this.props.disabled, state: this.props.state, message: this.props.message, spellCheck: this.props.spellCheck, loading: this.props.loading, initialLoading: this.props.initialLoading, ...(this.props.inputMode !== '' && { inputMode: this.props.inputMode }), ...(this.props.counter && {
|
|
36
40
|
end: (jsxs(Fragment, { children: [jsx("span", { className: "sr-only", "aria-live": "polite", children: this.props.maxLength
|
|
37
|
-
? `You have ${this.props.maxLength - this.
|
|
38
|
-
: `${this.
|
|
41
|
+
? `You have ${this.props.maxLength - this.parsedValue.length} out of ${this.props.maxLength} characters left`
|
|
42
|
+
: `${this.parsedValue.length} characters entered` }), jsx("span", { className: "counter", "aria-hidden": "true", children: this.props.maxLength ? `${this.parsedValue.length}/${this.props.maxLength}` : `${this.parsedValue.length}` })] })),
|
|
39
43
|
}) })] }), this.props.children] }));
|
|
40
44
|
}
|
|
41
45
|
}
|
package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-time.mjs
CHANGED
|
@@ -24,6 +24,10 @@ class DSRInputTime extends Component {
|
|
|
24
24
|
initialLoading = false;
|
|
25
25
|
inputElement;
|
|
26
26
|
defaultValue;
|
|
27
|
+
// Native input.value is always a string; coerce null/undefined to mirror native behavior.
|
|
28
|
+
get parsedValue() {
|
|
29
|
+
return String(this.props.value ?? '');
|
|
30
|
+
}
|
|
27
31
|
formResetCallback() {
|
|
28
32
|
// triggers value watcher
|
|
29
33
|
}
|
|
@@ -35,7 +39,7 @@ class DSRInputTime extends Component {
|
|
|
35
39
|
render() {
|
|
36
40
|
splitChildren(this.props.children);
|
|
37
41
|
const style = minifyCss(getComponentCss$J(this.props.disabled, this.props.loading, this.props.hideLabel, this.props.state, this.props.compact, this.props.readOnly));
|
|
38
|
-
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsx(InputBase, { children: this.props.children, host: null, label: this.props.label, description: this.props.description, id: "input-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.
|
|
42
|
+
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.parsedValue, readOnly: this.props.readOnly, autoComplete: this.props.autoComplete, disabled: this.props.disabled, state: this.props.state, message: this.props.message, step: this.props.step, loading: this.props.loading, initialLoading: this.props.initialLoading, ...(hasShowPickerSupport() && {
|
|
39
43
|
end: (jsx(PButtonPure, { tabIndex: this.props.disabled ? -1 : null, hideLabel: true, className: "button", type: "button", icon: "clock", disabled: this.props.disabled || this.props.readOnly, children: "Open time picker" })),
|
|
40
44
|
}) })] }), this.props.children] }));
|
|
41
45
|
}
|