@porsche-design-system/components-react 4.2.0-rc.1 → 4.2.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +97 -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 +1382 -1214
- 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 +1381 -1214
- 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
|
@@ -3287,21 +3287,25 @@ const getListboxAriaAttributes = (isRequired, labelId, messageId, descriptionId,
|
|
|
3287
3287
|
};
|
|
3288
3288
|
};
|
|
3289
3289
|
|
|
3290
|
+
/** Holds the **Porsche Next** font family along with fallback fonts. */
|
|
3290
3291
|
const fontPorscheNext = "'Porsche Next','Arial Narrow',Arial,'Heiti SC',SimHei,sans-serif";
|
|
3291
3292
|
|
|
3292
3293
|
/** @deprecated since v4.0.0, will be removed with next major release. Use fontPorscheNext instead. */
|
|
3293
3294
|
const fontFamily = fontPorscheNext;
|
|
3294
3295
|
|
|
3296
|
+
/** Holds a dynamic default line height specifically optimized for the Porsche Next typeface. */
|
|
3295
3297
|
const leadingNormal$1 = 'calc(6px + 2.125ex)';
|
|
3296
3298
|
|
|
3297
3299
|
/** @deprecated since v4.0.0, will be removed with next major release. Use leadingNormal instead */
|
|
3298
3300
|
const fontLineHeight = leadingNormal$1;
|
|
3299
3301
|
|
|
3302
|
+
/** Holds the **small** font size optimized for the Porsche Next typeface. */
|
|
3300
3303
|
const typescaleSm = '1rem';
|
|
3301
3304
|
|
|
3302
3305
|
/** @deprecated since v4.0.0, will be removed with next major release. Use typescaleSm instead. */
|
|
3303
3306
|
const fontSizeTextSmall = typescaleSm;
|
|
3304
3307
|
|
|
3308
|
+
/** Holds the **x-small** font size optimized for the Porsche Next typeface. */
|
|
3305
3309
|
const typescaleXs = '.875rem';
|
|
3306
3310
|
|
|
3307
3311
|
/** @deprecated since v4.0.0, will be removed with next major release. Use typescaleXs instead. */
|
|
@@ -3313,6 +3317,7 @@ const fontStyleNormal = 'normal';
|
|
|
3313
3317
|
/** @deprecated since v4.0.0, will be removed with next major release. Use 'normal' instead. */
|
|
3314
3318
|
const fontVariant = 'normal';
|
|
3315
3319
|
|
|
3320
|
+
/** Holds the **normal** font weight optimized for the Porsche Next typeface. */
|
|
3316
3321
|
const fontWeightNormal = 400;
|
|
3317
3322
|
|
|
3318
3323
|
/** @deprecated since v4.0.0, will be removed with next major release. Use fontWeightNormal instead. */
|
|
@@ -3320,26 +3325,32 @@ const fontWeightRegular = fontWeightNormal;
|
|
|
3320
3325
|
|
|
3321
3326
|
const breakpointBase = 0;
|
|
3322
3327
|
|
|
3328
|
+
/** Holds the `lg` breakpoint value, usable with `px`. */
|
|
3323
3329
|
const breakpointLg = 1300;
|
|
3324
3330
|
|
|
3325
3331
|
const breakpointL = breakpointLg;
|
|
3326
3332
|
|
|
3333
|
+
/** Holds the `md` breakpoint value, usable with `px`. */
|
|
3327
3334
|
const breakpointMd = 1000;
|
|
3328
3335
|
|
|
3329
3336
|
const breakpointM = breakpointMd;
|
|
3330
3337
|
|
|
3338
|
+
/** Holds the `sm` breakpoint value, usable with `px`. */
|
|
3331
3339
|
const breakpointSm = 760;
|
|
3332
3340
|
|
|
3333
3341
|
const breakpointS = breakpointSm;
|
|
3334
3342
|
|
|
3343
|
+
/** Holds the `xl` breakpoint value, usable with `px`. */
|
|
3335
3344
|
const breakpointXl = 1760;
|
|
3336
3345
|
|
|
3337
3346
|
const breakpointXL = breakpointXl;
|
|
3338
3347
|
|
|
3348
|
+
/** Holds the `xs` breakpoint value, usable with `px`. */
|
|
3339
3349
|
const breakpointXs = 480;
|
|
3340
3350
|
|
|
3341
3351
|
const breakpointXS = breakpointXs;
|
|
3342
3352
|
|
|
3353
|
+
/** Holds the `2xl` breakpoint value, usable with `px`. */
|
|
3343
3354
|
const breakpoint2Xl = 1920;
|
|
3344
3355
|
|
|
3345
3356
|
const breakpointXXL = breakpoint2Xl;
|
|
@@ -3454,7 +3465,7 @@ const hasShowPickerSupport = () => (hasDocument &&
|
|
|
3454
3465
|
'showPicker' in HTMLInputElement.prototype &&
|
|
3455
3466
|
CSS.supports('selector(::-webkit-calendar-picker-indicator)'));
|
|
3456
3467
|
|
|
3457
|
-
const prefix = `[Porsche Design System v${"4.2.0-rc.
|
|
3468
|
+
const prefix = `[Porsche Design System v${"4.2.0-rc.2"}]` // this part isn't covered by unit tests
|
|
3458
3469
|
;
|
|
3459
3470
|
const consoleError$1 = (...messages) => {
|
|
3460
3471
|
console.error(prefix, ...messages);
|
|
@@ -3553,7 +3564,11 @@ const isValidArray = (propName, arr, validator) => {
|
|
|
3553
3564
|
: {
|
|
3554
3565
|
propName,
|
|
3555
3566
|
propValue: arr,
|
|
3556
|
-
|
|
3567
|
+
// Derive propType for the error message by invoking the validator with a value that is
|
|
3568
|
+
// guaranteed to fail. `null` works for most built-in validators (string/number/boolean),
|
|
3569
|
+
// but not for `AllowedTypes.null` itself, so fall back to a unique Symbol which fails
|
|
3570
|
+
// every typeof-based validator.
|
|
3571
|
+
propType: (validator(propName, null) ?? validator(propName, Symbol('invalid')))?.propType,
|
|
3557
3572
|
};
|
|
3558
3573
|
if (validationError) {
|
|
3559
3574
|
return { ...validationError, propType: `${validationError.propType}[]` };
|
|
@@ -3575,6 +3590,162 @@ const internalValidateProps = {
|
|
|
3575
3590
|
const breakpointCustomizableTemplate = `value, ${internalValidateProps
|
|
3576
3591
|
.formatObjectOutput(breakpoints.reduce((prev, key) => ({ ...prev, [key + (key !== 'base' ? '?' : '')]: 'value' }), {}))
|
|
3577
3592
|
.replace(/"/g, '')}`;
|
|
3593
|
+
// ISO locale code to AI text mapping
|
|
3594
|
+
const AI_TAG_TRANSLATIONS = {
|
|
3595
|
+
bg_BG: {
|
|
3596
|
+
short: 'ИИ',
|
|
3597
|
+
long: 'изкуствен интелект',
|
|
3598
|
+
generated: 'генериран от изкуствен интелект',
|
|
3599
|
+
modified: 'модифициран от изкуствен интелект',
|
|
3600
|
+
},
|
|
3601
|
+
bs_BA: { short: 'AI', long: 'vještačka inteligencija', generated: 'AI-generisano', modified: 'AI-modifikovano' },
|
|
3602
|
+
cs_CZ: { short: 'AI', long: 'umělá inteligence', generated: 'Vytvořeno AI', modified: 'Upraveno AI' },
|
|
3603
|
+
da_DK: { short: 'KI', long: 'kunstig intelligens', generated: 'AI-genereret', modified: 'AI-modificeret' },
|
|
3604
|
+
de_DE: {
|
|
3605
|
+
short: 'KI',
|
|
3606
|
+
long: 'künstliche Intelligenz',
|
|
3607
|
+
generated: 'KI-generiert',
|
|
3608
|
+
modified: 'KI-modifiziert',
|
|
3609
|
+
},
|
|
3610
|
+
el_GR: {
|
|
3611
|
+
short: 'ΤΝ',
|
|
3612
|
+
long: 'τεχνητή νοημοσύνη',
|
|
3613
|
+
generated: 'Δημιουργημένο από ΤΝ',
|
|
3614
|
+
modified: 'Τροποποιημένο από ΤΝ',
|
|
3615
|
+
},
|
|
3616
|
+
en_CY: { short: 'AI', long: 'artificial intelligence', generated: 'AI-generated', modified: 'AI-modified' },
|
|
3617
|
+
en_GB: { short: 'AI', long: 'artificial intelligence', generated: 'AI-generated', modified: 'AI-modified' },
|
|
3618
|
+
en_US: { short: 'AI', long: 'artificial intelligence', generated: 'AI-generated', modified: 'AI-modified' },
|
|
3619
|
+
es_ES: {
|
|
3620
|
+
short: 'IA',
|
|
3621
|
+
long: 'inteligencia artificial',
|
|
3622
|
+
generated: 'Generado por IA',
|
|
3623
|
+
modified: 'Modificado por IA',
|
|
3624
|
+
},
|
|
3625
|
+
et_EE: { short: 'TI', long: 'tehisintellekt', generated: 'TI abil loodud', modified: 'TI abil muudetud' },
|
|
3626
|
+
fi_FI: {
|
|
3627
|
+
short: 'AI',
|
|
3628
|
+
long: 'tekoäly',
|
|
3629
|
+
generated: 'Tekoälyn tuottama',
|
|
3630
|
+
modified: 'Tekoälyn muokkaama',
|
|
3631
|
+
},
|
|
3632
|
+
fr_FR: {
|
|
3633
|
+
short: 'IA',
|
|
3634
|
+
long: 'intelligence artificielle',
|
|
3635
|
+
generated: 'Généré par une IA',
|
|
3636
|
+
modified: 'Modifié par une IA',
|
|
3637
|
+
},
|
|
3638
|
+
he_IL: {
|
|
3639
|
+
short: 'AI',
|
|
3640
|
+
long: 'בינה מלאכותית',
|
|
3641
|
+
generated: 'נוצר על ידי בינה מלאכותית',
|
|
3642
|
+
modified: 'נערך באמצעות בינה מלאכותית',
|
|
3643
|
+
},
|
|
3644
|
+
hr_HR: {
|
|
3645
|
+
short: 'UI',
|
|
3646
|
+
long: 'umjetna inteligencija',
|
|
3647
|
+
generated: 'Generirano uz pomoć UI',
|
|
3648
|
+
modified: 'Izmijenjeno uz pomoć UI',
|
|
3649
|
+
},
|
|
3650
|
+
hu_HU: {
|
|
3651
|
+
short: 'MI',
|
|
3652
|
+
long: 'mesterséges intelligencia',
|
|
3653
|
+
generated: 'MI-generált',
|
|
3654
|
+
modified: 'MI-módosított',
|
|
3655
|
+
},
|
|
3656
|
+
is_IS: {
|
|
3657
|
+
short: 'AI',
|
|
3658
|
+
long: 'gervigreind',
|
|
3659
|
+
generated: 'Búið til af gervigreind',
|
|
3660
|
+
modified: 'Breytt af gervigreind',
|
|
3661
|
+
},
|
|
3662
|
+
it_IT: {
|
|
3663
|
+
short: 'IA',
|
|
3664
|
+
long: 'intelligenza artificiale',
|
|
3665
|
+
generated: "Generato dall'IA",
|
|
3666
|
+
modified: "Modificato dall'IA",
|
|
3667
|
+
},
|
|
3668
|
+
lt_LT: {
|
|
3669
|
+
short: 'DI',
|
|
3670
|
+
long: 'dirbtinis intelektas',
|
|
3671
|
+
generated: 'DI sugeneruotas',
|
|
3672
|
+
modified: 'DI modifikuotas',
|
|
3673
|
+
},
|
|
3674
|
+
lv_LV: {
|
|
3675
|
+
short: 'MI',
|
|
3676
|
+
long: 'mākslīgais intelekts',
|
|
3677
|
+
generated: 'MI ģenerēts',
|
|
3678
|
+
modified: 'MI pārveidots',
|
|
3679
|
+
},
|
|
3680
|
+
me_ME: { short: 'AI', long: 'veštačka inteligencija', generated: 'AI-generisano', modified: 'AI-modifikovano' },
|
|
3681
|
+
mk_MK: {
|
|
3682
|
+
short: 'ВИ',
|
|
3683
|
+
long: 'вештачка интелигенција',
|
|
3684
|
+
generated: 'Создадено од ВИ',
|
|
3685
|
+
modified: 'Изменето со ВИ',
|
|
3686
|
+
},
|
|
3687
|
+
mt_MT: { short: 'AI', long: 'artificial intelligence', generated: 'AI-generated', modified: 'AI-modified' },
|
|
3688
|
+
nb_NO: {
|
|
3689
|
+
short: 'KI',
|
|
3690
|
+
long: 'kunstig intelligens',
|
|
3691
|
+
generated: 'KI-generert',
|
|
3692
|
+
modified: 'KI-modifisert',
|
|
3693
|
+
},
|
|
3694
|
+
nl_NL: {
|
|
3695
|
+
short: 'AI',
|
|
3696
|
+
long: 'kunstmatige intelligentie',
|
|
3697
|
+
generated: 'Door AI gegenereerd',
|
|
3698
|
+
modified: 'Door AI gewijzigd',
|
|
3699
|
+
},
|
|
3700
|
+
pl_PL: {
|
|
3701
|
+
short: 'SI',
|
|
3702
|
+
long: 'sztuczna inteligencja',
|
|
3703
|
+
generated: 'Wygenerowane przez SI',
|
|
3704
|
+
modified: 'Zmodyfikowane przez SI',
|
|
3705
|
+
},
|
|
3706
|
+
pt_PT: {
|
|
3707
|
+
short: 'IA',
|
|
3708
|
+
long: 'inteligência artificial',
|
|
3709
|
+
generated: 'Gerado por IA',
|
|
3710
|
+
modified: 'Modificado por IA',
|
|
3711
|
+
},
|
|
3712
|
+
ro_RO: {
|
|
3713
|
+
short: 'IA',
|
|
3714
|
+
long: 'inteligență artificială',
|
|
3715
|
+
generated: 'Generat cu ajutorul IA',
|
|
3716
|
+
modified: 'Modificat cu ajutorul IA',
|
|
3717
|
+
},
|
|
3718
|
+
ru_RU: {
|
|
3719
|
+
short: 'ИИ',
|
|
3720
|
+
long: 'искусственный интеллект',
|
|
3721
|
+
generated: 'Сгенерировано ИИ',
|
|
3722
|
+
modified: 'Изменено ИИ',
|
|
3723
|
+
},
|
|
3724
|
+
sk_SK: { short: 'AI', long: 'umelá inteligencia', generated: 'Vytvorené AI', modified: 'Upravené AI' },
|
|
3725
|
+
sl_SI: { short: 'UI', long: 'umetna inteligenca', generated: 'Ustvarjeno z UI', modified: 'Spremenjeno z UI' },
|
|
3726
|
+
sr_RS: { short: 'AI', long: 'veštačka inteligencija', generated: 'AI-generisano', modified: 'AI-modifikovano' },
|
|
3727
|
+
sv_SE: {
|
|
3728
|
+
short: 'AI',
|
|
3729
|
+
long: 'artificiell intelligens',
|
|
3730
|
+
generated: 'AI-genererad',
|
|
3731
|
+
modified: 'AI-modifierad',
|
|
3732
|
+
},
|
|
3733
|
+
tr_TR: {
|
|
3734
|
+
short: 'AI',
|
|
3735
|
+
long: 'yapay zeka',
|
|
3736
|
+
generated: 'Yapay zeka tarafından üretilmiş',
|
|
3737
|
+
modified: 'Yapay zeka tarafından değiştirilmiş',
|
|
3738
|
+
},
|
|
3739
|
+
uk_UA: {
|
|
3740
|
+
short: 'ШІ',
|
|
3741
|
+
long: 'штучний інтелект',
|
|
3742
|
+
generated: 'Згенеровано ШІ',
|
|
3743
|
+
modified: 'Змінено ШІ',
|
|
3744
|
+
},
|
|
3745
|
+
};
|
|
3746
|
+
const getAiTagTranslation = (locale) => {
|
|
3747
|
+
return AI_TAG_TRANSLATIONS[locale] ?? AI_TAG_TRANSLATIONS['en_US'];
|
|
3748
|
+
};
|
|
3578
3749
|
const getBannerAriaAttributes = (state, heading) => {
|
|
3579
3750
|
const isAlert = state === 'warning' || state === 'error';
|
|
3580
3751
|
return {
|
|
@@ -3937,6 +4108,7 @@ const getTextTagType = (host, tag) => {
|
|
|
3937
4108
|
return tag;
|
|
3938
4109
|
};
|
|
3939
4110
|
|
|
4111
|
+
exports.AI_TAG_TRANSLATIONS = AI_TAG_TRANSLATIONS;
|
|
3940
4112
|
exports.DISPLAY_TAGS = DISPLAY_TAGS;
|
|
3941
4113
|
exports.HEADING_TAGS = HEADING_TAGS;
|
|
3942
4114
|
exports.TEXT_TAGS = TEXT_TAGS;
|
|
@@ -3952,6 +4124,7 @@ exports.createRange = createRange;
|
|
|
3952
4124
|
exports.crestSize = crestSize;
|
|
3953
4125
|
exports.descriptionId = descriptionId;
|
|
3954
4126
|
exports.displaySizeToTagMap = displaySizeToTagMap;
|
|
4127
|
+
exports.getAiTagTranslation = getAiTagTranslation;
|
|
3955
4128
|
exports.getBannerAriaAttributes = getBannerAriaAttributes;
|
|
3956
4129
|
exports.getButtonAriaAttributes = getButtonAriaAttributes;
|
|
3957
4130
|
exports.getButtonBaseAriaAttributes = getButtonBaseAriaAttributes;
|
package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/accordion.wrapper.cjs
CHANGED
|
@@ -7,21 +7,21 @@ var hooks = require('../../hooks.cjs');
|
|
|
7
7
|
var utils = require('../../utils.cjs');
|
|
8
8
|
var accordion = require('../dsr-components/accordion.cjs');
|
|
9
9
|
|
|
10
|
-
const PAccordion = /*#__PURE__*/ react.forwardRef(({ alignMarker = 'end', background = 'none', compact, heading, headingTag = 'h2', onUpdate, open, size = 'small', sticky, className, children, ...rest }, ref) => {
|
|
10
|
+
const PAccordion = /*#__PURE__*/ react.forwardRef(({ alignMarker = 'end', background = 'none', compact, heading, headingTag = 'h2', indent = false, onUpdate, open, size = 'small', sticky, className, children, ...rest }, ref) => {
|
|
11
11
|
const elementRef = react.useRef(undefined);
|
|
12
12
|
hooks.useEventCallback(elementRef, 'update', onUpdate);
|
|
13
13
|
const WebComponentTag = hooks.usePrefix('p-accordion');
|
|
14
|
-
const propsToSync = [alignMarker, background, compact, heading, headingTag, open, size, sticky];
|
|
14
|
+
const propsToSync = [alignMarker, background, compact, heading, headingTag, indent, open, size, sticky];
|
|
15
15
|
hooks.useBrowserLayoutEffect(() => {
|
|
16
16
|
const { current } = elementRef;
|
|
17
|
-
['alignMarker', 'background', 'compact', 'heading', 'headingTag', 'open', 'size', 'sticky'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
17
|
+
['alignMarker', 'background', 'compact', 'heading', 'headingTag', 'indent', 'open', 'size', 'sticky'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
18
18
|
}, propsToSync);
|
|
19
19
|
const props = {
|
|
20
20
|
...rest,
|
|
21
21
|
// @ts-ignore
|
|
22
22
|
...(!process.browser
|
|
23
23
|
? {
|
|
24
|
-
children: (jsxRuntime.jsx(accordion.DSRAccordion, { alignMarker, background, compact, heading, headingTag, open, size, sticky, children })),
|
|
24
|
+
children: (jsxRuntime.jsx(accordion.DSRAccordion, { alignMarker, background, compact, heading, headingTag, indent, open, size, sticky, children })),
|
|
25
25
|
}
|
|
26
26
|
: {
|
|
27
27
|
children,
|
package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/ai-tag.wrapper.cjs
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
5
|
+
var react = require('react');
|
|
6
|
+
var hooks = require('../../hooks.cjs');
|
|
7
|
+
var utils = require('../../utils.cjs');
|
|
8
|
+
var aiTag = require('../dsr-components/ai-tag.cjs');
|
|
9
|
+
|
|
10
|
+
const PAiTag = /*#__PURE__*/ react.forwardRef(({ locale = 'en_US', variant = 'generated', className, ...rest }, ref) => {
|
|
11
|
+
const elementRef = react.useRef(undefined);
|
|
12
|
+
const WebComponentTag = hooks.usePrefix('p-ai-tag');
|
|
13
|
+
const propsToSync = [locale, variant];
|
|
14
|
+
hooks.useBrowserLayoutEffect(() => {
|
|
15
|
+
const { current } = elementRef;
|
|
16
|
+
['locale', 'variant'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
17
|
+
}, propsToSync);
|
|
18
|
+
const props = {
|
|
19
|
+
...rest,
|
|
20
|
+
// @ts-ignore
|
|
21
|
+
...(!process.browser
|
|
22
|
+
? {
|
|
23
|
+
children: (jsxRuntime.jsx(aiTag.DSRAiTag, { locale, variant })),
|
|
24
|
+
}
|
|
25
|
+
: {
|
|
26
|
+
suppressHydrationWarning: true,
|
|
27
|
+
}),
|
|
28
|
+
'data-ssr': '',
|
|
29
|
+
class: hooks.useMergedClass(elementRef, className),
|
|
30
|
+
ref: utils.syncRef(elementRef, ref)
|
|
31
|
+
};
|
|
32
|
+
// @ts-ignore
|
|
33
|
+
return jsxRuntime.jsx(WebComponentTag, { ...props });
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
exports.PAiTag = PAiTag;
|
package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/accordion.cjs
CHANGED
|
@@ -26,7 +26,7 @@ class DSRAccordion extends react.Component {
|
|
|
26
26
|
const hasSummaryBefore = namedSlotChildren.filter(({ props: { slot } }) => slot === 'summary-before').length > 0;
|
|
27
27
|
const hasSummaryAfter = namedSlotChildren.filter(({ props: { slot } }) => slot === 'summary-after').length > 0;
|
|
28
28
|
const Heading = this.props.headingTag;
|
|
29
|
-
const style = minifyCss.minifyCss(stylesEntry.getAccordionCss(this.props.alignMarker, this.props.background, this.props.compact, this.props.open, this.props.sticky, hasSummaryBefore, hasSummaryAfter, this.props.size));
|
|
29
|
+
const style = minifyCss.minifyCss(stylesEntry.getAccordionCss(this.props.alignMarker, this.props.background, this.props.compact, this.props.indent, this.props.open, this.props.sticky, hasSummaryBefore, hasSummaryAfter, this.props.size));
|
|
30
30
|
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsxs("details", { ...(this.props.open ? { open: true } : {}), children: [jsxRuntime.jsx("summary", { children: hasSummary ? jsxRuntime.jsx("slot", { name: "summary" }) : jsxRuntime.jsx(Heading, { children: this.props.heading || jsxRuntime.jsx("slot", { name: "heading" }) }) }), hasSummaryBefore && jsxRuntime.jsx("slot", { name: "summary-before" }), hasSummaryAfter && jsxRuntime.jsx("slot", { name: "summary-after" }), jsxRuntime.jsx("div", { children: jsxRuntime.jsx("slot", {}) })] })] }), this.props.children] }));
|
|
31
31
|
}
|
|
32
32
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
var react = require('react');
|
|
5
|
+
var minifyCss = require('../../minifyCss.cjs');
|
|
6
|
+
var stylesEntry = require('../../../../../../components/dist/styles/esm/styles-entry.cjs');
|
|
7
|
+
var utilsEntry = require('../../../../../../components/dist/utils/esm/utils-entry.cjs');
|
|
8
|
+
|
|
9
|
+
class DSRAiTag extends react.Component {
|
|
10
|
+
host;
|
|
11
|
+
render() {
|
|
12
|
+
const { short, long, generated, modified } = utilsEntry.getAiTagTranslation(this.props.locale);
|
|
13
|
+
const style = minifyCss.minifyCss(stylesEntry.getAiTagCss());
|
|
14
|
+
return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsx("div", { children: this.props.variant !== 'abbreviation' ? (this.props.variant === 'modified' ? (modified) : (generated)) : (jsxRuntime.jsx("abbr", { title: long, children: short })) })] }) }));
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
exports.DSRAiTag = DSRAiTag;
|
package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox.cjs
CHANGED
|
@@ -27,7 +27,6 @@ class DSRCheckbox extends react.Component {
|
|
|
27
27
|
checkboxInputElement;
|
|
28
28
|
externalLabel = null;
|
|
29
29
|
formResetCallback() {
|
|
30
|
-
this.props.internals?.setFormValue(this.props.defaultChecked ? this.props.value : undefined);
|
|
31
30
|
}
|
|
32
31
|
formDisabledCallback() {
|
|
33
32
|
// Called when a parent fieldset is disabled or enabled
|
package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/dialog-base.cjs
CHANGED
|
@@ -8,7 +8,7 @@ var button_wrapper = require('../components/button.wrapper.cjs');
|
|
|
8
8
|
const DialogBase = ({ children,
|
|
9
9
|
// host,
|
|
10
10
|
inert, containerClass, ariaAttributes, dismissable = false, header, footer, subFooter, }) => {
|
|
11
|
-
return (jsxRuntime.jsx("dialog", { inert: inert, tabIndex: -1, ...(ariaAttributes ?? {}), children: jsxRuntime.jsx("div", { className: "scroller", children: jsxRuntime.jsxs("div", { className: containerClass, children: [dismissable && (jsxRuntime.jsx(button_wrapper.PButton, { className: "dismiss",
|
|
11
|
+
return (jsxRuntime.jsx("dialog", { inert: inert, tabIndex: -1, ...(ariaAttributes ?? {}), children: jsxRuntime.jsx("div", { className: "scroller", children: jsxRuntime.jsxs("div", { className: containerClass, children: [dismissable && (jsxRuntime.jsx(button_wrapper.PButton, { className: "dismiss", compact: true, type: "button", hideLabel: true, icon: "close", children: `Dismiss ${containerClass}` })), header, children, footer, subFooter] }) }) }));
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
exports.DialogBase = DialogBase;
|
package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-base.cjs
CHANGED
|
@@ -12,7 +12,7 @@ var spinner_wrapper = require('../components/spinner.wrapper.cjs');
|
|
|
12
12
|
|
|
13
13
|
const InputBase = ({ children,
|
|
14
14
|
// host,
|
|
15
|
-
id, label: label$1, description, loading, initialLoading, required, disabled, state, message, readOnly, type, form, placeholder, maxLength, minLength, max, min, value, step, spellCheck, autoComplete, pattern, multiple, name,
|
|
15
|
+
id, label: label$1, description, loading, initialLoading, required, disabled, state, message, readOnly, type, form, placeholder, maxLength, minLength, max, min, value, step, spellCheck, autoComplete, pattern, multiple, name, inputMode,
|
|
16
16
|
// onInput,
|
|
17
17
|
// onWheel,
|
|
18
18
|
// onChange,
|
|
@@ -29,7 +29,7 @@ start, end, aria, }) => {
|
|
|
29
29
|
'aria-disabled': disabled || loading ? 'true' : null,
|
|
30
30
|
'aria-readonly': readOnly ? 'true' : null,
|
|
31
31
|
});
|
|
32
|
-
return (jsxRuntime.jsxs("div", { className: "root", children: [jsxRuntime.jsx(label.Label, { hasLabel: !!label$1 || namedSlotChildren.filter(({ props: { slot } }) => slot === 'label').length > 0, hasDescription: !!description || namedSlotChildren.filter(({ props: { slot } }) => slot === 'description').length > 0, host: null, label: label$1, description: description, htmlFor: id, isRequired: required, isLoading: loading, isDisabled: disabled }), jsxRuntime.jsxs("div", { className: "wrapper", children: [jsxRuntime.jsx("slot", { name: "start" }), start, jsxRuntime.jsx("input", { ...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.
|
|
32
|
+
return (jsxRuntime.jsxs("div", { className: "root", children: [jsxRuntime.jsx(label.Label, { hasLabel: !!label$1 || namedSlotChildren.filter(({ props: { slot } }) => slot === 'label').length > 0, hasDescription: !!description || namedSlotChildren.filter(({ props: { slot } }) => slot === 'description').length > 0, host: null, label: label$1, description: description, htmlFor: id, isRequired: required, isLoading: loading, isDisabled: disabled }), jsxRuntime.jsxs("div", { className: "wrapper", children: [jsxRuntime.jsx("slot", { name: "start" }), start, jsxRuntime.jsx("input", { ...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.
|
|
33
33
|
}), end, jsxRuntime.jsx("slot", { name: "end" }), loading && jsxRuntime.jsx(spinner_wrapper.PSpinner, { "aria-hidden": "true" })] }), jsxRuntime.jsx(stateMessage.StateMessage, { hasMessage: (message || namedSlotChildren.filter(({ props: { slot } }) => slot === 'message').length > 0) && ['success', 'error'].includes(state), state: state, message: message, host: null }), jsxRuntime.jsx(loadingMessage.LoadingMessage, { loading: loading, initialLoading: initialLoading })] }));
|
|
34
34
|
};
|
|
35
35
|
|
package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-date.cjs
CHANGED
|
@@ -26,6 +26,10 @@ class DSRInputDate extends react.Component {
|
|
|
26
26
|
initialLoading = false;
|
|
27
27
|
inputElement;
|
|
28
28
|
defaultValue;
|
|
29
|
+
// Native input.value is always a string; coerce null/undefined to mirror native behavior.
|
|
30
|
+
get parsedValue() {
|
|
31
|
+
return String(this.props.value ?? '');
|
|
32
|
+
}
|
|
29
33
|
formResetCallback() {
|
|
30
34
|
// triggers value watcher
|
|
31
35
|
}
|
|
@@ -37,7 +41,7 @@ class DSRInputDate extends react.Component {
|
|
|
37
41
|
render() {
|
|
38
42
|
splitChildren.splitChildren(this.props.children);
|
|
39
43
|
const style = minifyCss.minifyCss(stylesEntry.getInputDateCss(this.props.disabled, this.props.loading, this.props.hideLabel, this.props.state, this.props.compact, this.props.readOnly));
|
|
40
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsx(inputBase.InputBase, { children: this.props.children, host: null, label: this.props.label, description: this.props.description, id: "input-date", name: this.props.name, form: this.props.form, type: "date", required: this.props.required, max: this.props.max, min: this.props.min, value: this.
|
|
44
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsx(inputBase.InputBase, { children: this.props.children, host: null, label: this.props.label, description: this.props.description, id: "input-date", name: this.props.name, form: this.props.form, type: "date", required: this.props.required, max: this.props.max, min: this.props.min, value: this.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, ...(utilsEntry.hasShowPickerSupport() && {
|
|
41
45
|
end: (jsxRuntime.jsx(buttonPure_wrapper.PButtonPure, { tabIndex: this.props.disabled ? -1 : null, hideLabel: true, className: "button", type: "button", icon: "calendar", disabled: this.props.disabled || this.props.readOnly, children: "Open date picker" })),
|
|
42
46
|
}) })] }), this.props.children] }));
|
|
43
47
|
}
|
package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-email.cjs
CHANGED
|
@@ -25,6 +25,10 @@ class DSRInputEmail extends react.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 DSRInputEmail extends react.Component {
|
|
|
36
40
|
render() {
|
|
37
41
|
splitChildren.splitChildren(this.props.children);
|
|
38
42
|
const style = minifyCss.minifyCss(stylesEntry.getInputEmailCss(this.props.disabled, this.props.loading, this.props.hideLabel, this.props.state, this.props.compact, this.props.readOnly));
|
|
39
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsx(inputBase.InputBase, { children: this.props.children, host: null, label: this.props.label, description: this.props.description, id: "input-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.
|
|
43
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsx(inputBase.InputBase, { children: this.props.children, host: null, label: this.props.label, description: this.props.description, id: "input-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 && {
|
|
40
44
|
start: jsxRuntime.jsx(icon_wrapper.PIcon, { "aria-hidden": "true", name: "email", color: "contrast-low" }),
|
|
41
45
|
}) })] }), this.props.children] }));
|
|
42
46
|
}
|
package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-month.cjs
CHANGED
|
@@ -26,6 +26,10 @@ class DSRInputMonth extends react.Component {
|
|
|
26
26
|
initialLoading = false;
|
|
27
27
|
inputElement;
|
|
28
28
|
defaultValue;
|
|
29
|
+
// Native input.value is always a string; coerce null/undefined to mirror native behavior.
|
|
30
|
+
get parsedValue() {
|
|
31
|
+
return String(this.props.value ?? '');
|
|
32
|
+
}
|
|
29
33
|
formResetCallback() {
|
|
30
34
|
// triggers value watcher
|
|
31
35
|
}
|
|
@@ -37,7 +41,7 @@ class DSRInputMonth extends react.Component {
|
|
|
37
41
|
render() {
|
|
38
42
|
splitChildren.splitChildren(this.props.children);
|
|
39
43
|
const style = minifyCss.minifyCss(stylesEntry.getInputMonthCss(this.props.disabled, this.props.loading, this.props.hideLabel, this.props.state, this.props.compact, this.props.readOnly));
|
|
40
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsx(inputBase.InputBase, { children: this.props.children, host: null, label: this.props.label, description: this.props.description, id: "input-month", name: this.props.name, form: this.props.form, type: "month", required: this.props.required, max: this.props.max, min: this.props.min, value: this.
|
|
44
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsx(inputBase.InputBase, { children: this.props.children, host: null, label: this.props.label, description: this.props.description, id: "input-month", name: this.props.name, form: this.props.form, type: "month", required: this.props.required, max: this.props.max, min: this.props.min, value: this.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, ...(utilsEntry.hasShowPickerSupport() && {
|
|
41
45
|
end: (jsxRuntime.jsx(buttonPure_wrapper.PButtonPure, { tabIndex: this.props.disabled ? -1 : null, hideLabel: true, className: "button", type: "button", icon: "calendar", disabled: this.props.disabled || this.props.readOnly, children: "Open date picker" })),
|
|
42
46
|
}) })] }), this.props.children] }));
|
|
43
47
|
}
|
package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-number.cjs
CHANGED
|
@@ -25,6 +25,10 @@ class DSRInputNumber extends react.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
|
}
|
|
@@ -37,7 +41,7 @@ class DSRInputNumber extends react.Component {
|
|
|
37
41
|
splitChildren.splitChildren(this.props.children);
|
|
38
42
|
const style = minifyCss.minifyCss(stylesEntry.getInputNumberCss(this.props.disabled, this.props.loading, this.props.hideLabel, this.props.state, this.props.compact, this.props.readOnly, this.props.controls));
|
|
39
43
|
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsx(inputBase.InputBase, { children: this.props.children, host: null, label: this.props.label, description: this.props.description, id: "input-number" // prevent React default scroll-to-[increment|decrement] on number inputs
|
|
40
|
-
, 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.
|
|
44
|
+
, 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 && {
|
|
41
45
|
end: (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs(buttonPure_wrapper.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] }), jsxRuntime.jsxs(buttonPure_wrapper.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] })] })),
|
|
42
46
|
}) })] }), this.props.children] }));
|
|
43
47
|
}
|
|
@@ -26,6 +26,10 @@ class DSRInputPassword extends react.Component {
|
|
|
26
26
|
initialLoading = false;
|
|
27
27
|
inputElement;
|
|
28
28
|
defaultValue;
|
|
29
|
+
// Native input.value is always a string; coerce number/null/undefined to mirror native behavior.
|
|
30
|
+
get parsedValue() {
|
|
31
|
+
return String(this.props.value ?? '');
|
|
32
|
+
}
|
|
29
33
|
formResetCallback() {
|
|
30
34
|
// triggers value watcher
|
|
31
35
|
}
|
|
@@ -37,7 +41,7 @@ class DSRInputPassword extends react.Component {
|
|
|
37
41
|
render() {
|
|
38
42
|
splitChildren.splitChildren(this.props.children);
|
|
39
43
|
const style = minifyCss.minifyCss(stylesEntry.getInputPasswordCss(this.props.disabled, this.props.loading, this.props.hideLabel, this.props.state, this.props.toggle, this.props.compact, this.props.readOnly));
|
|
40
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsx(inputBase.InputBase, { children: this.props.children, host: null, label: this.props.label, description: this.props.description, id: "input-password", name: this.props.name, form: this.props.form, type: this.props.showPassword ? 'text' : 'password', required: this.props.required, placeholder: this.props.placeholder, maxLength: this.props.maxLength, minLength: this.props.minLength, value: this.
|
|
44
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsx(inputBase.InputBase, { children: this.props.children, host: null, label: this.props.label, description: this.props.description, id: "input-password", name: this.props.name, form: this.props.form, type: this.props.showPassword ? 'text' : 'password', required: this.props.required, placeholder: this.props.placeholder, maxLength: this.props.maxLength, minLength: this.props.minLength, value: this.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 && (jsxRuntime.jsx(buttonPure_wrapper.PButtonPure, { tabIndex: this.props.disabled ? -1 : null, hideLabel: true, className: "button", type: "button", icon: this.props.showPassword ? 'view-off' : 'view', disabled: this.props.disabled, aria: { 'aria-pressed': this.props.showPassword ? 'true' : 'false' }, children: "Toggle password visibility" })) })] }), this.props.children] }));
|
|
41
45
|
}
|
|
42
46
|
}
|
|
43
47
|
|
package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-search.cjs
CHANGED
|
@@ -27,6 +27,10 @@ class DSRInputSearch extends react.Component {
|
|
|
27
27
|
initialLoading = false;
|
|
28
28
|
inputElement;
|
|
29
29
|
defaultValue;
|
|
30
|
+
// Native input.value is always a string; coerce number/null/undefined to mirror native behavior.
|
|
31
|
+
get parsedValue() {
|
|
32
|
+
return String(this.props.value ?? '');
|
|
33
|
+
}
|
|
30
34
|
formResetCallback() {
|
|
31
35
|
// triggers value watcher
|
|
32
36
|
}
|
|
@@ -38,7 +42,7 @@ class DSRInputSearch extends react.Component {
|
|
|
38
42
|
render() {
|
|
39
43
|
splitChildren.splitChildren(this.props.children);
|
|
40
44
|
const style = minifyCss.minifyCss(stylesEntry.getInputSearchCss(this.props.disabled, this.props.loading, this.props.hideLabel, this.props.state, this.props.compact, this.props.readOnly, this.props.clear));
|
|
41
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsx(inputBase.InputBase, { children: this.props.children, host: null, label: this.props.label, description: this.props.description, id: "input-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.
|
|
45
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsx(inputBase.InputBase, { children: this.props.children, host: null, label: this.props.label, description: this.props.description, id: "input-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 && {
|
|
42
46
|
start: jsxRuntime.jsx(icon_wrapper.PIcon, { "aria-hidden": "true", name: "search", color: "contrast-medium" }),
|
|
43
47
|
}), ...(this.props.clear && {
|
|
44
48
|
end: (jsxRuntime.jsx(buttonPure_wrapper.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/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-tel.cjs
CHANGED
|
@@ -25,6 +25,10 @@ class DSRInputTel extends react.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 DSRInputTel extends react.Component {
|
|
|
36
40
|
render() {
|
|
37
41
|
splitChildren.splitChildren(this.props.children);
|
|
38
42
|
const style = minifyCss.minifyCss(stylesEntry.getInputTelCss(this.props.disabled, this.props.loading, this.props.hideLabel, this.props.state, this.props.compact, this.props.readOnly));
|
|
39
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsx(inputBase.InputBase, { children: this.props.children, host: null, label: this.props.label, description: this.props.description, id: "input-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.
|
|
43
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsx(inputBase.InputBase, { children: this.props.children, host: null, label: this.props.label, description: this.props.description, id: "input-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 && {
|
|
40
44
|
start: jsxRuntime.jsx(icon_wrapper.PIcon, { "aria-hidden": "true", name: "phone", color: "contrast-low" }),
|
|
41
45
|
}) })] }), this.props.children] }));
|
|
42
46
|
}
|
package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-text.cjs
CHANGED
|
@@ -23,6 +23,10 @@ class DSRInputText extends react.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,10 +38,10 @@ class DSRInputText extends react.Component {
|
|
|
34
38
|
render() {
|
|
35
39
|
splitChildren.splitChildren(this.props.children);
|
|
36
40
|
const style = minifyCss.minifyCss(stylesEntry.getInputTextCss(this.props.disabled, this.props.loading, this.props.hideLabel, this.props.state, this.props.compact, this.props.readOnly, this.props.counter));
|
|
37
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsx(inputBase.InputBase, { children: this.props.children, host: null, label: this.props.label, description: this.props.description, id: "input-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.
|
|
41
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsx(inputBase.InputBase, { children: this.props.children, host: null, label: this.props.label, description: this.props.description, id: "input-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 && {
|
|
38
42
|
end: (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("span", { className: "sr-only", "aria-live": "polite", children: this.props.maxLength
|
|
39
|
-
? `You have ${this.props.maxLength - this.
|
|
40
|
-
: `${this.
|
|
43
|
+
? `You have ${this.props.maxLength - this.parsedValue.length} out of ${this.props.maxLength} characters left`
|
|
44
|
+
: `${this.parsedValue.length} characters entered` }), jsxRuntime.jsx("span", { className: "counter", "aria-hidden": "true", children: this.props.maxLength ? `${this.parsedValue.length}/${this.props.maxLength}` : `${this.parsedValue.length}` })] })),
|
|
41
45
|
}) })] }), this.props.children] }));
|
|
42
46
|
}
|
|
43
47
|
}
|
package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-time.cjs
CHANGED
|
@@ -26,6 +26,10 @@ class DSRInputTime extends react.Component {
|
|
|
26
26
|
initialLoading = false;
|
|
27
27
|
inputElement;
|
|
28
28
|
defaultValue;
|
|
29
|
+
// Native input.value is always a string; coerce null/undefined to mirror native behavior.
|
|
30
|
+
get parsedValue() {
|
|
31
|
+
return String(this.props.value ?? '');
|
|
32
|
+
}
|
|
29
33
|
formResetCallback() {
|
|
30
34
|
// triggers value watcher
|
|
31
35
|
}
|
|
@@ -37,7 +41,7 @@ class DSRInputTime extends react.Component {
|
|
|
37
41
|
render() {
|
|
38
42
|
splitChildren.splitChildren(this.props.children);
|
|
39
43
|
const style = minifyCss.minifyCss(stylesEntry.getInputTimeCss(this.props.disabled, this.props.loading, this.props.hideLabel, this.props.state, this.props.compact, this.props.readOnly));
|
|
40
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsx(inputBase.InputBase, { children: this.props.children, host: null, label: this.props.label, description: this.props.description, id: "input-time", name: this.props.name, form: this.props.form, type: "time", required: this.props.required, max: this.props.max, min: this.props.min, value: this.
|
|
44
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsx(inputBase.InputBase, { children: this.props.children, host: null, label: this.props.label, description: this.props.description, id: "input-time", name: this.props.name, form: this.props.form, type: "time", required: this.props.required, max: this.props.max, min: this.props.min, value: this.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, ...(utilsEntry.hasShowPickerSupport() && {
|
|
41
45
|
end: (jsxRuntime.jsx(buttonPure_wrapper.PButtonPure, { tabIndex: this.props.disabled ? -1 : null, hideLabel: true, className: "button", type: "button", icon: "clock", disabled: this.props.disabled || this.props.readOnly, children: "Open time picker" })),
|
|
42
46
|
}) })] }), this.props.children] }));
|
|
43
47
|
}
|