@porsche-design-system/components-react 3.8.0 → 3.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +46 -2
- package/cjs/hooks.cjs +9 -0
- package/cjs/lib/components/accordion.wrapper.cjs +2 -2
- package/cjs/lib/components/banner.wrapper.cjs +2 -2
- package/cjs/lib/components/button-pure.wrapper.cjs +3 -3
- package/cjs/lib/components/button.wrapper.cjs +3 -3
- package/cjs/lib/components/carousel.wrapper.cjs +2 -2
- package/cjs/lib/components/checkbox-wrapper.wrapper.cjs +2 -2
- package/cjs/lib/components/content-wrapper.wrapper.cjs +2 -2
- package/cjs/lib/components/display.wrapper.cjs +2 -2
- package/cjs/lib/components/divider.wrapper.cjs +2 -2
- package/cjs/lib/components/fieldset-wrapper.wrapper.cjs +2 -2
- package/cjs/lib/components/fieldset.wrapper.cjs +2 -2
- package/cjs/lib/components/flyout.wrapper.cjs +2 -2
- package/cjs/lib/components/heading.wrapper.cjs +2 -2
- package/cjs/lib/components/headline.wrapper.cjs +2 -2
- package/cjs/lib/components/icon.wrapper.cjs +2 -2
- package/cjs/lib/components/inline-notification.wrapper.cjs +2 -2
- package/cjs/lib/components/link-pure.wrapper.cjs +2 -2
- package/cjs/lib/components/link-social.wrapper.cjs +2 -2
- package/cjs/lib/components/link.wrapper.cjs +2 -2
- package/cjs/lib/components/modal.wrapper.cjs +2 -2
- package/cjs/lib/components/model-signature.wrapper.cjs +2 -2
- package/cjs/lib/components/multi-select.wrapper.cjs +2 -2
- package/cjs/lib/components/pagination.wrapper.cjs +2 -2
- package/cjs/lib/components/pin-code.wrapper.cjs +2 -2
- package/cjs/lib/components/popover.wrapper.cjs +2 -2
- package/cjs/lib/components/radio-button-wrapper.wrapper.cjs +2 -2
- package/cjs/lib/components/scroller.wrapper.cjs +2 -2
- package/cjs/lib/components/segmented-control.wrapper.cjs +2 -2
- package/cjs/lib/components/select-wrapper.wrapper.cjs +2 -2
- package/cjs/lib/components/spinner.wrapper.cjs +2 -2
- package/cjs/lib/components/stepper-horizontal.wrapper.cjs +2 -2
- package/cjs/lib/components/switch.wrapper.cjs +2 -2
- package/cjs/lib/components/table.wrapper.cjs +2 -2
- package/cjs/lib/components/tabs-bar.wrapper.cjs +2 -2
- package/cjs/lib/components/tabs.wrapper.cjs +2 -2
- package/cjs/lib/components/tag-dismissible.wrapper.cjs +2 -2
- package/cjs/lib/components/tag.wrapper.cjs +2 -2
- package/cjs/lib/components/text-field-wrapper.wrapper.cjs +2 -2
- package/cjs/lib/components/text-list.wrapper.cjs +2 -2
- package/cjs/lib/components/text.wrapper.cjs +2 -2
- package/cjs/lib/components/textarea-wrapper.wrapper.cjs +2 -2
- package/cjs/lib/components/toast.wrapper.cjs +4 -3
- package/cjs/lib/components/wordmark.wrapper.cjs +2 -2
- package/cjs/provider.cjs +3 -2
- package/esm/hooks.d.ts +2 -1
- package/esm/hooks.mjs +9 -1
- package/esm/lib/components/accordion.wrapper.d.ts +1 -1
- package/esm/lib/components/accordion.wrapper.mjs +3 -3
- package/esm/lib/components/banner.wrapper.d.ts +1 -1
- package/esm/lib/components/banner.wrapper.mjs +3 -3
- package/esm/lib/components/button-pure.wrapper.d.ts +19 -3
- package/esm/lib/components/button-pure.wrapper.mjs +4 -4
- package/esm/lib/components/button-tile.wrapper.d.ts +1 -1
- package/esm/lib/components/button.wrapper.d.ts +17 -1
- package/esm/lib/components/button.wrapper.mjs +4 -4
- package/esm/lib/components/carousel.wrapper.d.ts +1 -1
- package/esm/lib/components/carousel.wrapper.mjs +3 -3
- package/esm/lib/components/checkbox-wrapper.wrapper.d.ts +1 -1
- package/esm/lib/components/checkbox-wrapper.wrapper.mjs +3 -3
- package/esm/lib/components/content-wrapper.wrapper.d.ts +1 -1
- package/esm/lib/components/content-wrapper.wrapper.mjs +3 -3
- package/esm/lib/components/display.wrapper.d.ts +2 -2
- package/esm/lib/components/display.wrapper.mjs +3 -3
- package/esm/lib/components/divider.wrapper.d.ts +1 -1
- package/esm/lib/components/divider.wrapper.mjs +3 -3
- package/esm/lib/components/fieldset-wrapper.wrapper.d.ts +1 -1
- package/esm/lib/components/fieldset-wrapper.wrapper.mjs +3 -3
- package/esm/lib/components/fieldset.wrapper.d.ts +1 -1
- package/esm/lib/components/fieldset.wrapper.mjs +3 -3
- package/esm/lib/components/flex-item.wrapper.d.ts +1 -1
- package/esm/lib/components/flyout.wrapper.d.ts +1 -1
- package/esm/lib/components/flyout.wrapper.mjs +3 -3
- package/esm/lib/components/heading.wrapper.d.ts +2 -2
- package/esm/lib/components/heading.wrapper.mjs +3 -3
- package/esm/lib/components/headline.wrapper.d.ts +1 -1
- package/esm/lib/components/headline.wrapper.mjs +3 -3
- package/esm/lib/components/icon.wrapper.d.ts +3 -3
- package/esm/lib/components/icon.wrapper.mjs +3 -3
- package/esm/lib/components/inline-notification.wrapper.d.ts +2 -2
- package/esm/lib/components/inline-notification.wrapper.mjs +3 -3
- package/esm/lib/components/link-pure.wrapper.d.ts +3 -3
- package/esm/lib/components/link-pure.wrapper.mjs +3 -3
- package/esm/lib/components/link-social.wrapper.d.ts +1 -1
- package/esm/lib/components/link-social.wrapper.mjs +3 -3
- 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/link.wrapper.mjs +3 -3
- package/esm/lib/components/modal.wrapper.d.ts +1 -1
- package/esm/lib/components/modal.wrapper.mjs +3 -3
- package/esm/lib/components/model-signature.wrapper.d.ts +2 -2
- package/esm/lib/components/model-signature.wrapper.mjs +3 -3
- package/esm/lib/components/multi-select.wrapper.d.ts +1 -1
- package/esm/lib/components/multi-select.wrapper.mjs +3 -3
- package/esm/lib/components/pagination.wrapper.d.ts +1 -1
- package/esm/lib/components/pagination.wrapper.mjs +3 -3
- package/esm/lib/components/pin-code.wrapper.d.ts +2 -2
- package/esm/lib/components/pin-code.wrapper.mjs +3 -3
- package/esm/lib/components/popover.wrapper.d.ts +1 -1
- package/esm/lib/components/popover.wrapper.mjs +3 -3
- package/esm/lib/components/radio-button-wrapper.wrapper.d.ts +1 -1
- package/esm/lib/components/radio-button-wrapper.wrapper.mjs +3 -3
- package/esm/lib/components/scroller.wrapper.d.ts +3 -3
- package/esm/lib/components/scroller.wrapper.mjs +3 -3
- package/esm/lib/components/segmented-control.wrapper.d.ts +1 -1
- package/esm/lib/components/segmented-control.wrapper.mjs +3 -3
- package/esm/lib/components/select-wrapper.wrapper.d.ts +1 -1
- package/esm/lib/components/select-wrapper.wrapper.mjs +3 -3
- package/esm/lib/components/spinner.wrapper.d.ts +2 -2
- package/esm/lib/components/spinner.wrapper.mjs +3 -3
- package/esm/lib/components/stepper-horizontal.wrapper.d.ts +1 -1
- package/esm/lib/components/stepper-horizontal.wrapper.mjs +3 -3
- package/esm/lib/components/switch.wrapper.d.ts +1 -1
- package/esm/lib/components/switch.wrapper.mjs +3 -3
- package/esm/lib/components/table.wrapper.d.ts +1 -1
- package/esm/lib/components/table.wrapper.mjs +3 -3
- package/esm/lib/components/tabs-bar.wrapper.d.ts +1 -1
- package/esm/lib/components/tabs-bar.wrapper.mjs +3 -3
- package/esm/lib/components/tabs.wrapper.d.ts +1 -1
- package/esm/lib/components/tabs.wrapper.mjs +3 -3
- package/esm/lib/components/tag-dismissible.wrapper.d.ts +1 -1
- package/esm/lib/components/tag-dismissible.wrapper.mjs +3 -3
- package/esm/lib/components/tag.wrapper.d.ts +2 -2
- package/esm/lib/components/tag.wrapper.mjs +3 -3
- package/esm/lib/components/text-field-wrapper.wrapper.d.ts +1 -1
- package/esm/lib/components/text-field-wrapper.wrapper.mjs +3 -3
- package/esm/lib/components/text-list.wrapper.d.ts +1 -1
- package/esm/lib/components/text-list.wrapper.mjs +3 -3
- package/esm/lib/components/text.wrapper.d.ts +4 -4
- package/esm/lib/components/text.wrapper.mjs +3 -3
- package/esm/lib/components/textarea-wrapper.wrapper.d.ts +1 -1
- package/esm/lib/components/textarea-wrapper.wrapper.mjs +3 -3
- package/esm/lib/components/toast.wrapper.d.ts +1 -1
- package/esm/lib/components/toast.wrapper.mjs +5 -4
- package/esm/lib/components/wordmark.wrapper.d.ts +2 -2
- package/esm/lib/components/wordmark.wrapper.mjs +3 -3
- package/esm/lib/types.d.ts +15 -0
- package/esm/provider.d.ts +4 -1
- package/esm/provider.mjs +3 -2
- package/package.json +2 -2
- package/ssr/cjs/components/dist/styles/esm/styles-entry.cjs +798 -684
- package/ssr/cjs/components/dist/utils/esm/utils-entry.cjs +3 -5
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/hooks.cjs +9 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/accordion.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/banner.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/button-pure.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/button.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/carousel.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/checkbox-wrapper.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/content-wrapper.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/display.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/divider.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/fieldset-wrapper.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/fieldset.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/flyout.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/heading.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/headline.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/icon.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/inline-notification.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/link-pure.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/link-social.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/link.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/modal.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/model-signature.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/multi-select.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/pagination.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/pin-code.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/popover.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/radio-button-wrapper.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/scroller.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/segmented-control.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/select-wrapper-dropdown.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/select-wrapper.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/spinner.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/stepper-horizontal.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/switch.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/table.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/tabs-bar.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/tabs.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/tag-dismissible.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/tag.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/text-field-wrapper.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/text-list.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/text.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/textarea-wrapper.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/toast.wrapper.cjs +5 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/wordmark.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button-pure.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox-wrapper.cjs +4 -2
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/fieldset-wrapper.cjs +1 -2
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/fieldset.cjs +1 -2
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/label.cjs +21 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/multi-select.cjs +4 -5
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pin-code.cjs +3 -6
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/radio-button-wrapper.cjs +5 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-wrapper-dropdown.cjs +8 -2
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-wrapper.cjs +2 -5
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/state-message.cjs +4 -2
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs-bar.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/text-field-wrapper.cjs +5 -5
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/textarea-wrapper.cjs +4 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/provider.cjs +3 -2
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/stripFocusAndHoverStyles.cjs +4 -1
- package/ssr/esm/components/dist/styles/esm/styles-entry.mjs +798 -685
- package/ssr/esm/components/dist/utils/esm/utils-entry.mjs +4 -5
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/hooks.mjs +9 -1
- 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/banner.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/button-pure.wrapper.mjs +5 -5
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/button.wrapper.mjs +5 -5
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/carousel.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/checkbox-wrapper.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/content-wrapper.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/display.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/divider.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/fieldset-wrapper.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/fieldset.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/flyout.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/heading.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/headline.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/icon.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/inline-notification.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/link-pure.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/link-social.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/link.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/modal.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/model-signature.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/multi-select.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/pagination.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/pin-code.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/popover.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/radio-button-wrapper.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/scroller.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/segmented-control.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/select-wrapper-dropdown.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/select-wrapper.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/spinner.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/stepper-horizontal.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/switch.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/table.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/tabs-bar.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/tabs.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/tag-dismissible.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/tag.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/text-field-wrapper.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/text-list.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/text.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/textarea-wrapper.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/toast.wrapper.mjs +6 -5
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/wordmark.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button-pure.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox-wrapper.mjs +4 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/fieldset-wrapper.mjs +2 -3
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/fieldset.mjs +2 -3
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/label.mjs +17 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/multi-select.mjs +4 -5
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pin-code.mjs +4 -7
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/radio-button-wrapper.mjs +5 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-wrapper-dropdown.mjs +8 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-wrapper.mjs +2 -5
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/state-message.mjs +4 -3
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs-bar.mjs +1 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/text-field-wrapper.mjs +5 -5
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/textarea-wrapper.mjs +4 -3
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/provider.mjs +3 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/stripFocusAndHoverStyles.mjs +4 -1
- package/ssr/esm/hooks.d.ts +2 -1
- package/ssr/esm/lib/components/button-pure.wrapper.d.ts +16 -0
- package/ssr/esm/lib/components/button.wrapper.d.ts +16 -0
- package/ssr/esm/lib/dsr-components/label.d.ts +18 -0
- package/ssr/esm/lib/dsr-components/select-wrapper.d.ts +0 -1
- package/ssr/esm/lib/dsr-components/state-message.d.ts +2 -1
- package/ssr/esm/lib/dsr-components/tabs-bar.d.ts +1 -0
- package/ssr/esm/lib/types.d.ts +15 -0
- package/ssr/esm/provider.d.ts +4 -1
|
@@ -3159,7 +3159,7 @@ var jssPluginSortMediaQueries = /*@__PURE__*/getDefaultExportFromCjs(dist);
|
|
|
3159
3159
|
|
|
3160
3160
|
const hasWindow = typeof window !== 'undefined';
|
|
3161
3161
|
|
|
3162
|
-
const isHighContrastMode = hasWindow && window.matchMedia
|
|
3162
|
+
const isHighContrastMode = hasWindow && window.matchMedia?.('(forced-colors: active)').matches;
|
|
3163
3163
|
|
|
3164
3164
|
const attributeMutationMap = new Map();
|
|
3165
3165
|
hasWindow &&
|
|
@@ -3384,12 +3384,26 @@ const gridNarrowOffset = {
|
|
|
3384
3384
|
xxl: gridNarrowOffsetXXL,
|
|
3385
3385
|
};
|
|
3386
3386
|
|
|
3387
|
+
const motionDurationShort = '0.25s';
|
|
3388
|
+
|
|
3389
|
+
const motionEasingBase = 'cubic-bezier(0.25,0.1,0.25,1)';
|
|
3390
|
+
|
|
3387
3391
|
const breakpoints = ['base', 'xs', 's', 'm', 'l', 'xl', 'xxl'];
|
|
3388
3392
|
|
|
3389
3393
|
function getMediaQueryMax(max) {
|
|
3390
3394
|
return `@media(max-width:${breakpoint[max] - 1}px)`;
|
|
3391
3395
|
}
|
|
3392
3396
|
|
|
3397
|
+
const motionDurationLong = '0.6s';
|
|
3398
|
+
|
|
3399
|
+
const motionDurationModerate = '0.4s';
|
|
3400
|
+
|
|
3401
|
+
const motionDurationVeryLong = '1.2s';
|
|
3402
|
+
|
|
3403
|
+
const motionEasingIn = 'cubic-bezier(0,0,0.2,1)';
|
|
3404
|
+
|
|
3405
|
+
const motionEasingOut = 'cubic-bezier(0.4,0,0.5,1)';
|
|
3406
|
+
|
|
3393
3407
|
const spacingStaticXSmall = '4px';
|
|
3394
3408
|
|
|
3395
3409
|
const spacingStaticSmall = '8px';
|
|
@@ -3773,9 +3787,21 @@ const getInvertedThemedColors = (theme) => {
|
|
|
3773
3787
|
return getThemedColors(isThemeDark(theme) ? 'light' : 'dark');
|
|
3774
3788
|
};
|
|
3775
3789
|
|
|
3776
|
-
const
|
|
3777
|
-
|
|
3778
|
-
|
|
3790
|
+
const motionDurationMap = {
|
|
3791
|
+
short: motionDurationShort,
|
|
3792
|
+
moderate: motionDurationModerate,
|
|
3793
|
+
long: motionDurationLong,
|
|
3794
|
+
veryLong: motionDurationVeryLong,
|
|
3795
|
+
};
|
|
3796
|
+
const motionEasingMap = {
|
|
3797
|
+
base: motionEasingBase,
|
|
3798
|
+
in: motionEasingIn,
|
|
3799
|
+
out: motionEasingOut,
|
|
3800
|
+
linear: 'linear',
|
|
3801
|
+
};
|
|
3802
|
+
const cssVariableTransitionDuration = '--p-transition-duration';
|
|
3803
|
+
const cssVariableAnimationDuration = '--p-animation-duration';
|
|
3804
|
+
const getTransition = (cssProperty, duration = 'short', easing = 'base', delay) => `${cssProperty} var(${cssVariableTransitionDuration}, ${motionDurationMap[duration]}) ${motionEasingMap[easing]}${delay ? ` var(${cssVariableTransitionDuration}, ${motionDurationMap[delay]})` : ''}`;
|
|
3779
3805
|
const pxToRemWithUnit = (px) => `${px / 16}rem`;
|
|
3780
3806
|
const addImportantToRule = (value) => `${value} !important`;
|
|
3781
3807
|
const addImportantToEachRule = (input) => {
|
|
@@ -3861,7 +3887,7 @@ const getBackfaceVisibilityJssStyle = () => ({
|
|
|
3861
3887
|
* @param {string} timingFn - The timing function of the transition animation. (default: 'cubic-bezier(.16,1,.3,1)')
|
|
3862
3888
|
* @returns {JssStyle} - The JSS styles for the frosted glass background.
|
|
3863
3889
|
*/
|
|
3864
|
-
const getFrostedGlassBackgroundJssStyles = (isVisible, duration, theme
|
|
3890
|
+
const getFrostedGlassBackgroundJssStyles = (isVisible, duration, theme) => {
|
|
3865
3891
|
return {
|
|
3866
3892
|
// workaround via pseudo element to fix stacking (black) background in safari
|
|
3867
3893
|
'&::before': {
|
|
@@ -3880,7 +3906,7 @@ const getFrostedGlassBackgroundJssStyles = (isVisible, duration, theme, timingFn
|
|
|
3880
3906
|
backdropFilter: 'blur(0px)',
|
|
3881
3907
|
WebkitBackdropFilter: 'blur(0px)',
|
|
3882
3908
|
}),
|
|
3883
|
-
transition:
|
|
3909
|
+
transition: `${getTransition('opacity', duration, 'base')}, ${getTransition('backdrop-filter', duration, 'base')}, ${getTransition('-webkit-backdrop-filter', duration, 'base')}`,
|
|
3884
3910
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
3885
3911
|
background: themeDarkBackgroundShading,
|
|
3886
3912
|
}),
|
|
@@ -3975,155 +4001,27 @@ const mergeDeep = (...objects) => {
|
|
|
3975
4001
|
const scrollShadowColor = 'rgba(204, 204, 204, 0.35)';
|
|
3976
4002
|
const scrollShadowColorDark = 'rgba(0, 0, 0, 0.6)';
|
|
3977
4003
|
|
|
3978
|
-
const getThemedFormStateColors = (theme, state) => {
|
|
3979
|
-
const themedColors = getThemedColors(theme);
|
|
3980
|
-
return {
|
|
3981
|
-
formStateColor: themedColors[`${state}Color`],
|
|
3982
|
-
formStateHoverColor: themedColors[`${state}ColorDarken`],
|
|
3983
|
-
};
|
|
3984
|
-
};
|
|
3985
|
-
|
|
3986
|
-
const getBaseChildStyles = (child, state, theme, additionalDefaultJssStyle) => {
|
|
3987
|
-
const { primaryColor, contrastLowColor, contrastMediumColor, disabledColor } = getThemedColors(theme);
|
|
3988
|
-
const { primaryColor: primaryColorDark, contrastLowColor: contrastLowColorDark, contrastMediumColor: contrastMediumColorDark, disabledColor: disabledColorDark, } = getThemedColors('dark');
|
|
3989
|
-
const { formStateColor, formStateHoverColor } = getThemedFormStateColors(theme, state);
|
|
3990
|
-
const { formStateColor: formStateColorDark, formStateHoverColor: formStateHoverColorDark } = getThemedFormStateColors('dark', state);
|
|
3991
|
-
return {
|
|
3992
|
-
[`::slotted(${child})`]: {
|
|
3993
|
-
gridArea: '3 / 1 / auto / span 2',
|
|
3994
|
-
display: 'block',
|
|
3995
|
-
width: '100%',
|
|
3996
|
-
height: child !== 'textarea'
|
|
3997
|
-
? `calc(${fontLineHeight} + 10px + ${borderWidthBase} * 2 + ${spacingStaticSmall} * 2)` // we need 10px additionally so input height becomes 54px
|
|
3998
|
-
: 'auto',
|
|
3999
|
-
margin: 0,
|
|
4000
|
-
outline: 0,
|
|
4001
|
-
WebkitAppearance: 'none',
|
|
4002
|
-
appearance: 'none',
|
|
4003
|
-
boxSizing: 'border-box',
|
|
4004
|
-
border: `${borderWidthBase} solid ${formStateColor || contrastMediumColor}`,
|
|
4005
|
-
borderRadius: borderRadiusSmall,
|
|
4006
|
-
background: 'transparent',
|
|
4007
|
-
font: textSmallStyle.font.replace('ex', 'ex + 6px'),
|
|
4008
|
-
textIndent: 0,
|
|
4009
|
-
color: primaryColor,
|
|
4010
|
-
transition: ['color', 'border-color', 'background-color'].map(getTransition).join(),
|
|
4011
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
4012
|
-
borderColor: formStateColorDark || contrastMediumColorDark,
|
|
4013
|
-
color: primaryColorDark,
|
|
4014
|
-
}),
|
|
4015
|
-
...additionalDefaultJssStyle,
|
|
4016
|
-
},
|
|
4017
|
-
...hoverMediaQuery({
|
|
4018
|
-
// with the media query the selector has higher priority and overrides disabled styles
|
|
4019
|
-
[`::slotted(${child}:not(:disabled):not(:focus):not([readonly]):hover)`]: {
|
|
4020
|
-
borderColor: formStateHoverColor || primaryColor,
|
|
4021
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
4022
|
-
borderColor: formStateHoverColorDark || primaryColorDark,
|
|
4023
|
-
}),
|
|
4024
|
-
},
|
|
4025
|
-
}),
|
|
4026
|
-
[`::slotted(${child}:focus)`]: {
|
|
4027
|
-
borderColor: primaryColor,
|
|
4028
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
4029
|
-
borderColor: primaryColorDark,
|
|
4030
|
-
}),
|
|
4031
|
-
},
|
|
4032
|
-
[`::slotted(${child}:disabled)`]: {
|
|
4033
|
-
cursor: 'not-allowed',
|
|
4034
|
-
color: disabledColor,
|
|
4035
|
-
borderColor: disabledColor,
|
|
4036
|
-
WebkitTextFillColor: disabledColor,
|
|
4037
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
4038
|
-
color: disabledColorDark,
|
|
4039
|
-
borderColor: disabledColorDark,
|
|
4040
|
-
WebkitTextFillColor: disabledColorDark,
|
|
4041
|
-
}),
|
|
4042
|
-
},
|
|
4043
|
-
...(child !== 'select' && {
|
|
4044
|
-
[`::slotted(${child}[readonly])`]: {
|
|
4045
|
-
borderColor: contrastLowColor,
|
|
4046
|
-
background: contrastLowColor,
|
|
4047
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
4048
|
-
borderColor: contrastLowColorDark,
|
|
4049
|
-
background: contrastLowColorDark,
|
|
4050
|
-
}),
|
|
4051
|
-
},
|
|
4052
|
-
}),
|
|
4053
|
-
};
|
|
4054
|
-
};
|
|
4055
|
-
const getLabelStyles = (child, isDisabled, hideLabel, state, theme, counterOrUnitOrIconStyles, additionalLabelJssStyle) => {
|
|
4056
|
-
const { primaryColor, disabledColor, contrastHighColor } = getThemedColors(theme);
|
|
4057
|
-
const { primaryColor: primaryColorDark, disabledColor: disabledColorDark, contrastHighColor: contrastHighColorDark, } = getThemedColors('dark');
|
|
4058
|
-
const { formStateHoverColor } = getThemedFormStateColors(theme, state);
|
|
4059
|
-
const { formStateHoverColor: formStateHoverColorDark } = getThemedFormStateColors('dark', state);
|
|
4060
|
-
const counterOrUnitOrIconStylesKey = counterOrUnitOrIconStyles && Object.keys(counterOrUnitOrIconStyles)[0];
|
|
4061
|
-
return {
|
|
4062
|
-
label: {
|
|
4063
|
-
display: 'grid',
|
|
4064
|
-
gridTemplateColumns: 'minmax(0, 1fr) auto',
|
|
4065
|
-
position: 'relative',
|
|
4066
|
-
'&__text': {
|
|
4067
|
-
gridColumn: 'span 2',
|
|
4068
|
-
display: 'block',
|
|
4069
|
-
...buildResponsiveStyles(hideLabel, (isHidden) => getHiddenTextJssStyle(isHidden, {
|
|
4070
|
-
width: 'fit-content',
|
|
4071
|
-
marginBottom: spacingStaticXSmall,
|
|
4072
|
-
})),
|
|
4073
|
-
...textSmallStyle,
|
|
4074
|
-
color: isDisabled ? disabledColor : primaryColor,
|
|
4075
|
-
transition: getTransition('color'),
|
|
4076
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
4077
|
-
color: isDisabled ? disabledColorDark : primaryColorDark,
|
|
4078
|
-
}),
|
|
4079
|
-
'&+&': {
|
|
4080
|
-
marginTop: `-${spacingStaticXSmall}`,
|
|
4081
|
-
fontSize: fontSizeTextXSmall,
|
|
4082
|
-
...(!isDisabled && {
|
|
4083
|
-
color: contrastHighColor,
|
|
4084
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
4085
|
-
color: contrastHighColorDark,
|
|
4086
|
-
}),
|
|
4087
|
-
}),
|
|
4088
|
-
},
|
|
4089
|
-
...hoverMediaQuery({
|
|
4090
|
-
'&:hover': {
|
|
4091
|
-
[`&~::slotted(${child}:not(:disabled):not(:focus):not([readonly]))`]: {
|
|
4092
|
-
borderColor: addImportantToRule(formStateHoverColor || primaryColor),
|
|
4093
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
4094
|
-
borderColor: addImportantToRule(formStateHoverColorDark || primaryColorDark),
|
|
4095
|
-
}),
|
|
4096
|
-
},
|
|
4097
|
-
},
|
|
4098
|
-
}),
|
|
4099
|
-
},
|
|
4100
|
-
...additionalLabelJssStyle,
|
|
4101
|
-
},
|
|
4102
|
-
...(counterOrUnitOrIconStyles && {
|
|
4103
|
-
[counterOrUnitOrIconStylesKey]: {
|
|
4104
|
-
...counterOrUnitOrIconStyles[counterOrUnitOrIconStylesKey],
|
|
4105
|
-
pointerEvents: 'none',
|
|
4106
|
-
...(isDisabled && {
|
|
4107
|
-
color: disabledColor,
|
|
4108
|
-
cursor: 'not-allowed',
|
|
4109
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
4110
|
-
color: disabledColorDark,
|
|
4111
|
-
}),
|
|
4112
|
-
}),
|
|
4113
|
-
},
|
|
4114
|
-
}),
|
|
4115
|
-
};
|
|
4116
|
-
};
|
|
4117
|
-
|
|
4118
4004
|
const OPTION_HEIGHT = 40; // optgroups are higher and ignored
|
|
4119
4005
|
const MULTI_SELECT_OPTION_HEIGHT = 44;
|
|
4120
4006
|
const getNoResultsOptionJssStyle = () => ({
|
|
4121
4007
|
'&[role=status]': {
|
|
4122
4008
|
cursor: 'not-allowed',
|
|
4123
4009
|
},
|
|
4010
|
+
// TODO: shouldn't be used here, instead use sr-only functional component and style
|
|
4124
4011
|
'&__sr': getHiddenTextJssStyle(),
|
|
4125
4012
|
});
|
|
4126
4013
|
|
|
4014
|
+
/**
|
|
4015
|
+
* Applies a style only on Chromium based browsers by using a media query which is only supported there.
|
|
4016
|
+
* https://www.browserstack.com/guide/create-browser-specific-css
|
|
4017
|
+
*
|
|
4018
|
+
* @param {JssStyle} style - The style to be applied when the Chromium media query is supported.
|
|
4019
|
+
* @returns {JssStyle} - The Chromium media query containing the style.
|
|
4020
|
+
*/
|
|
4021
|
+
const supportsChromiumMediaQuery = (style) => ({
|
|
4022
|
+
'@media screen and (-webkit-min-device-pixel-ratio: 0) and (min-resolution: 0.001dpcm)': style,
|
|
4023
|
+
});
|
|
4024
|
+
|
|
4127
4025
|
/**
|
|
4128
4026
|
* Checks if the current environment supports the native Popover API.
|
|
4129
4027
|
*
|
|
@@ -4184,6 +4082,7 @@ const getComponentCss$10 = (size, compact, open, theme) => {
|
|
|
4184
4082
|
textDecoration: 'none',
|
|
4185
4083
|
border: 0,
|
|
4186
4084
|
outline: 0,
|
|
4085
|
+
margin: 0,
|
|
4187
4086
|
gap: '24px',
|
|
4188
4087
|
background: 'transparent',
|
|
4189
4088
|
cursor: 'pointer',
|
|
@@ -4265,18 +4164,18 @@ const getComponentCss$10 = (size, compact, open, theme) => {
|
|
|
4265
4164
|
? {
|
|
4266
4165
|
gridTemplateRows: '1fr',
|
|
4267
4166
|
visibility: 'visible',
|
|
4268
|
-
transition:
|
|
4167
|
+
transition: getTransition('grid-template-rows'),
|
|
4269
4168
|
paddingBottom: compact ? spacingStaticSmall : '24px',
|
|
4270
4169
|
}
|
|
4271
4170
|
: {
|
|
4272
4171
|
gridTemplateRows: '0fr',
|
|
4273
4172
|
visibility: 'hidden',
|
|
4274
|
-
transition:
|
|
4173
|
+
transition: `${getTransition('grid-template-rows')}, visibility 0s linear var(${cssVariableTransitionDuration}, ${motionDurationShort})`,
|
|
4275
4174
|
}),
|
|
4276
4175
|
'& div': {
|
|
4277
4176
|
overflow: open ? 'visible' : 'hidden',
|
|
4278
4177
|
// Fix overflow issues for overlapping content (e.g. select dropdown)
|
|
4279
|
-
animation: open ? `$overflow ${
|
|
4178
|
+
animation: open ? `$overflow var(${cssVariableTransitionDuration},${motionDurationShort})` : 'none',
|
|
4280
4179
|
// Necessary to make focus outlines fully visible
|
|
4281
4180
|
padding: '4px',
|
|
4282
4181
|
margin: '-4px',
|
|
@@ -4297,12 +4196,7 @@ const BANNER_Z_INDEX = 99;
|
|
|
4297
4196
|
|
|
4298
4197
|
const cssVariableTop = '--p-banner-position-top';
|
|
4299
4198
|
const cssVariableBottom = '--p-banner-position-bottom';
|
|
4300
|
-
const cssVariableAnimationDuration = '--p-animation-duration';
|
|
4301
4199
|
const cssVariableZIndex = '--p-internal-banner-z-index';
|
|
4302
|
-
const ANIMATION_DURATION$1 = 600;
|
|
4303
|
-
const duration$1 = `var(${cssVariableAnimationDuration},${ANIMATION_DURATION$1}ms)`;
|
|
4304
|
-
const easeInQuad$1 = 'cubic-bezier(0.45,0,0.55,1)';
|
|
4305
|
-
const easeOutQuad$1 = 'cubic-bezier(0.5,1,0.89,1)';
|
|
4306
4200
|
const topBottomFallback = '56px';
|
|
4307
4201
|
const getComponentCss$$ = (isOpen) => {
|
|
4308
4202
|
return getCss({
|
|
@@ -4324,14 +4218,14 @@ const getComponentCss$$ = (isOpen) => {
|
|
|
4324
4218
|
opacity: 1,
|
|
4325
4219
|
visibility: 'inherit',
|
|
4326
4220
|
transform: 'translate3d(0,0,0)',
|
|
4327
|
-
transition: `
|
|
4221
|
+
transition: `transform var(${cssVariableAnimationDuration}, ${motionDurationModerate}) ${motionEasingIn}, opacity var(${cssVariableAnimationDuration}, ${motionDurationModerate}) ${motionEasingIn}`,
|
|
4328
4222
|
}
|
|
4329
4223
|
: {
|
|
4330
4224
|
opacity: 0,
|
|
4331
4225
|
visibility: 'hidden',
|
|
4332
4226
|
transform: `translate3d(0,calc(var(${cssVariableBottom},${topBottomFallback}) + 100%),0)`,
|
|
4333
4227
|
'&(.hydrated),&(.ssr)': {
|
|
4334
|
-
transition: `visibility 0s linear ${
|
|
4228
|
+
transition: `visibility 0s linear var(${cssVariableAnimationDuration}, ${motionDurationLong}), transform var(${cssVariableAnimationDuration}, ${motionDurationModerate}) ${motionEasingOut}, opacity var(${cssVariableAnimationDuration}, ${motionDurationModerate}) ${motionEasingOut}`,
|
|
4335
4229
|
},
|
|
4336
4230
|
}),
|
|
4337
4231
|
[getMediaQueryMin('s')]: {
|
|
@@ -4442,8 +4336,8 @@ const getLinkButtonPureStyles = (icon, iconSource, active, isDisabledOrLoading,
|
|
|
4442
4336
|
display: 'flex',
|
|
4443
4337
|
gap: spacingStaticXSmall,
|
|
4444
4338
|
width: '100%',
|
|
4445
|
-
margin: 0,
|
|
4446
4339
|
padding: 0,
|
|
4340
|
+
margin: 0,
|
|
4447
4341
|
color: isDisabledOrLoading ? disabledColor : primaryColor,
|
|
4448
4342
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
4449
4343
|
color: isDisabledOrLoading ? disabledColorDark : primaryColorDark,
|
|
@@ -4525,6 +4419,7 @@ const getComponentCss$Z = (icon, iconSource, active, isLoading, isDisabledOrLoad
|
|
|
4525
4419
|
const hasIcon = hasVisibleIcon(icon, iconSource);
|
|
4526
4420
|
return getCss(mergeDeep(getLinkButtonPureStyles(icon, iconSource, active, isDisabledOrLoading, stretch, size, hideLabel, alignLabel, false, theme), {
|
|
4527
4421
|
root: {
|
|
4422
|
+
WebkitAppearance: 'none',
|
|
4528
4423
|
appearance: 'none',
|
|
4529
4424
|
background: 'transparent',
|
|
4530
4425
|
textAlign: 'start',
|
|
@@ -4625,7 +4520,7 @@ const getTileBaseStyles = (aspectRatio, isDisabled) => {
|
|
|
4625
4520
|
},
|
|
4626
4521
|
'image-container': {
|
|
4627
4522
|
position: 'absolute',
|
|
4628
|
-
transition: getTransition('transform'),
|
|
4523
|
+
transition: getTransition('transform', 'moderate'),
|
|
4629
4524
|
...getInsetJssStyle(),
|
|
4630
4525
|
},
|
|
4631
4526
|
content: {
|
|
@@ -4759,6 +4654,7 @@ const getLinkButtonStyles = (icon, iconSource, variant, hideLabel, isDisabledOrL
|
|
|
4759
4654
|
boxSizing: 'border-box',
|
|
4760
4655
|
outline: 0,
|
|
4761
4656
|
textAlign: 'start',
|
|
4657
|
+
WebkitAppearance: 'none',
|
|
4762
4658
|
appearance: 'none',
|
|
4763
4659
|
textDecoration: 'none',
|
|
4764
4660
|
border: `2px solid ${borderColor}`,
|
|
@@ -4767,7 +4663,7 @@ const getLinkButtonStyles = (icon, iconSource, variant, hideLabel, isDisabledOrL
|
|
|
4767
4663
|
backgroundColor,
|
|
4768
4664
|
color: textColor,
|
|
4769
4665
|
...textSmallStyle,
|
|
4770
|
-
transition:
|
|
4666
|
+
transition: `${getTransition('background-color')}, ${getTransition('border-color')}, ${getTransition('color')}`,
|
|
4771
4667
|
...buildResponsiveStyles(hideLabel, (hideLabelValue) => ({
|
|
4772
4668
|
padding: hideLabelValue ? '13px' : '13px 26px',
|
|
4773
4669
|
gap: hideLabelValue ? 0 : spacingStaticSmall,
|
|
@@ -4851,6 +4747,7 @@ const getComponentCss$X = (icon, iconSource, variant, hideLabel, disabled, loadi
|
|
|
4851
4747
|
}),
|
|
4852
4748
|
}),
|
|
4853
4749
|
...(loading && !isPrimary && frostedGlassStyle),
|
|
4750
|
+
margin: 0, // Removes default button margin on safari 15
|
|
4854
4751
|
},
|
|
4855
4752
|
...(loading && {
|
|
4856
4753
|
spinner: {
|
|
@@ -4884,7 +4781,7 @@ const getComponentCss$X = (icon, iconSource, variant, hideLabel, disabled, loadi
|
|
|
4884
4781
|
}));
|
|
4885
4782
|
};
|
|
4886
4783
|
|
|
4887
|
-
const carouselTransitionDuration =
|
|
4784
|
+
const carouselTransitionDuration = motionDurationModerate;
|
|
4888
4785
|
const bulletActiveClass = 'bullet--active';
|
|
4889
4786
|
const paginationInfiniteStartCaseClass = 'pagination--infinite';
|
|
4890
4787
|
const bulletInfiniteClass = 'bullet--infinite';
|
|
@@ -5047,7 +4944,7 @@ const getComponentCss$W = (width, hasPagination, isInfinitePagination, alignHead
|
|
|
5047
4944
|
width: 'fit-content',
|
|
5048
4945
|
height: paginationBulletSize,
|
|
5049
4946
|
gap: spacingStaticSmall,
|
|
5050
|
-
transition: `transform ${carouselTransitionDuration}
|
|
4947
|
+
transition: `transform ${carouselTransitionDuration}`,
|
|
5051
4948
|
},
|
|
5052
4949
|
bullet: {
|
|
5053
4950
|
borderRadius: borderRadiusSmall,
|
|
@@ -5065,12 +4962,12 @@ const getComponentCss$W = (width, hasPagination, isInfinitePagination, alignHead
|
|
|
5065
4962
|
? {
|
|
5066
4963
|
width: '0px',
|
|
5067
4964
|
height: '0px',
|
|
5068
|
-
transition: `background-color ${carouselTransitionDuration}
|
|
4965
|
+
transition: `background-color ${carouselTransitionDuration}, width ${carouselTransitionDuration}, height ${carouselTransitionDuration}`,
|
|
5069
4966
|
}
|
|
5070
4967
|
: {
|
|
5071
4968
|
width: paginationBulletSize,
|
|
5072
4969
|
height: paginationBulletSize,
|
|
5073
|
-
transition: `background-color ${carouselTransitionDuration}
|
|
4970
|
+
transition: `background-color ${carouselTransitionDuration}, width ${carouselTransitionDuration}`,
|
|
5074
4971
|
}),
|
|
5075
4972
|
},
|
|
5076
4973
|
...(isInfinitePagination && {
|
|
@@ -5124,31 +5021,16 @@ const getComponentCss$W = (width, hasPagination, isInfinitePagination, alignHead
|
|
|
5124
5021
|
});
|
|
5125
5022
|
};
|
|
5126
5023
|
|
|
5127
|
-
const
|
|
5128
|
-
|
|
5129
|
-
required: {
|
|
5130
|
-
userSelect: 'none',
|
|
5131
|
-
},
|
|
5132
|
-
};
|
|
5133
|
-
};
|
|
5134
|
-
|
|
5135
|
-
const getFunctionalComponentStateMessageStyles = (theme, state) => {
|
|
5024
|
+
const getThemedFormStateColors = (theme, state) => {
|
|
5025
|
+
const themedColors = getThemedColors(theme);
|
|
5136
5026
|
return {
|
|
5137
|
-
|
|
5138
|
-
|
|
5139
|
-
gap: spacingStaticXSmall,
|
|
5140
|
-
marginTop: spacingStaticXSmall,
|
|
5141
|
-
...textSmallStyle,
|
|
5142
|
-
color: getThemedFormStateColors(theme, state).formStateColor,
|
|
5143
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5144
|
-
color: getThemedFormStateColors('dark', state).formStateColor,
|
|
5145
|
-
}),
|
|
5146
|
-
transition: getTransition('color'),
|
|
5147
|
-
},
|
|
5027
|
+
formStateColor: themedColors[`${state}Color`],
|
|
5028
|
+
formStateHoverColor: themedColors[`${state}ColorDarken`],
|
|
5148
5029
|
};
|
|
5149
5030
|
};
|
|
5150
5031
|
|
|
5151
|
-
|
|
5032
|
+
// TODO: move to form-styles.ts
|
|
5033
|
+
const getSlottedCheckboxRadioButtonStyles = (state, isDisabled, isLoading, theme) => {
|
|
5152
5034
|
const { primaryColor, contrastMediumColor, contrastHighColor, disabledColor, focusColor } = getThemedColors(theme);
|
|
5153
5035
|
const { primaryColor: primaryColorDark, contrastMediumColor: contrastMediumColorDark, contrastHighColor: contrastHighColorDark, disabledColor: disabledColorDark, focusColor: focusColorDark, } = getThemedColors('dark');
|
|
5154
5036
|
const { formStateColor, formStateHoverColor } = getThemedFormStateColors(theme, state);
|
|
@@ -5173,121 +5055,79 @@ const getCheckboxRadioJssStyle = (hideLabel, state, isDisabled, isLoading, theme
|
|
|
5173
5055
|
const checkedHoverColor = formStateHoverColor || contrastHighColor;
|
|
5174
5056
|
const checkedHoverColorDark = formStateHoverColorDark || contrastHighColorDark;
|
|
5175
5057
|
return {
|
|
5176
|
-
'
|
|
5177
|
-
'
|
|
5178
|
-
|
|
5179
|
-
|
|
5058
|
+
'::slotted': {
|
|
5059
|
+
'&(input)': {
|
|
5060
|
+
position: 'relative',
|
|
5061
|
+
width: fontLineHeight,
|
|
5062
|
+
height: fontLineHeight,
|
|
5063
|
+
font: `${fontSizeTextSmall} ${fontFamily}`,
|
|
5180
5064
|
display: 'block',
|
|
5181
|
-
|
|
5182
|
-
|
|
5183
|
-
'
|
|
5184
|
-
|
|
5185
|
-
|
|
5186
|
-
|
|
5187
|
-
|
|
5188
|
-
|
|
5189
|
-
|
|
5190
|
-
|
|
5191
|
-
|
|
5192
|
-
|
|
5193
|
-
|
|
5194
|
-
|
|
5195
|
-
|
|
5196
|
-
boxSizing: 'content-box',
|
|
5197
|
-
background: `transparent 0% 0% / ${fontLineHeight}`,
|
|
5198
|
-
transition: ['border-color', 'background-color'].map(getTransition).join(),
|
|
5199
|
-
border: `2px solid ${uncheckedColor}`,
|
|
5200
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5201
|
-
borderColor: uncheckedColorDark,
|
|
5065
|
+
margin: 0,
|
|
5066
|
+
padding: 0,
|
|
5067
|
+
WebkitAppearance: 'none',
|
|
5068
|
+
appearance: 'none',
|
|
5069
|
+
boxSizing: 'content-box',
|
|
5070
|
+
background: `transparent 0% 0% / ${fontLineHeight}`,
|
|
5071
|
+
transition: `${getTransition('background-color')}, ${getTransition('border-color')}`,
|
|
5072
|
+
border: `2px solid ${uncheckedColor}`,
|
|
5073
|
+
outline: 0,
|
|
5074
|
+
...(disabledOrLoading
|
|
5075
|
+
? {
|
|
5076
|
+
pointerEvents: 'none', // to prevent form element becomes clickable/toggleable
|
|
5077
|
+
}
|
|
5078
|
+
: {
|
|
5079
|
+
cursor: 'pointer',
|
|
5202
5080
|
}),
|
|
5203
|
-
|
|
5204
|
-
|
|
5205
|
-
|
|
5206
|
-
|
|
5207
|
-
|
|
5208
|
-
|
|
5209
|
-
|
|
5210
|
-
|
|
5081
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5082
|
+
borderColor: uncheckedColorDark,
|
|
5083
|
+
}),
|
|
5084
|
+
},
|
|
5085
|
+
'&(input:checked)': {
|
|
5086
|
+
// background-image is merged in later
|
|
5087
|
+
borderColor: checkedColor,
|
|
5088
|
+
backgroundColor: checkedColor,
|
|
5089
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5090
|
+
borderColor: checkedColorDark,
|
|
5091
|
+
backgroundColor: checkedColorDark,
|
|
5092
|
+
}),
|
|
5093
|
+
},
|
|
5094
|
+
...(!disabledOrLoading &&
|
|
5095
|
+
!isHighContrastMode &&
|
|
5096
|
+
hoverMediaQuery({
|
|
5097
|
+
'&(input:hover),label:hover~.wrapper &(input)': {
|
|
5098
|
+
borderColor: uncheckedHoverColor,
|
|
5099
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5100
|
+
borderColor: uncheckedHoverColorDark,
|
|
5211
5101
|
}),
|
|
5212
|
-
|
|
5213
|
-
|
|
5214
|
-
|
|
5215
|
-
|
|
5216
|
-
|
|
5102
|
+
},
|
|
5103
|
+
'&(input:checked:hover),label:hover~.wrapper &(input:checked)': {
|
|
5104
|
+
borderColor: checkedHoverColor,
|
|
5105
|
+
backgroundColor: checkedHoverColor,
|
|
5106
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5107
|
+
borderColor: checkedHoverColorDark,
|
|
5108
|
+
backgroundColor: checkedHoverColorDark,
|
|
5109
|
+
}),
|
|
5110
|
+
},
|
|
5111
|
+
'label:hover~.wrapper &(input)': supportsChromiumMediaQuery({
|
|
5112
|
+
transition: 'unset', // Fixes chrome bug where transition properties are stuck on hover
|
|
5113
|
+
}),
|
|
5114
|
+
})),
|
|
5115
|
+
...(!isDisabled && {
|
|
5116
|
+
// TODO: can be done with getFocusStyle() in the meantime
|
|
5117
|
+
'&(input:focus)::before': {
|
|
5118
|
+
content: '""',
|
|
5119
|
+
position: 'absolute',
|
|
5120
|
+
...getInsetJssStyle(-6),
|
|
5121
|
+
border: `${borderWidthBase} solid ${focusColor}`,
|
|
5217
5122
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5218
|
-
borderColor:
|
|
5219
|
-
backgroundColor: checkedColorDark,
|
|
5123
|
+
borderColor: focusColorDark,
|
|
5220
5124
|
}),
|
|
5221
5125
|
},
|
|
5222
|
-
|
|
5223
|
-
|
|
5224
|
-
|
|
5225
|
-
'&(input:hover), .text:hover ~ &(input)': {
|
|
5226
|
-
borderColor: uncheckedHoverColor,
|
|
5227
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5228
|
-
borderColor: uncheckedHoverColorDark,
|
|
5229
|
-
}),
|
|
5230
|
-
},
|
|
5231
|
-
'&(input:checked:hover), .text:hover ~ &(input:checked)': {
|
|
5232
|
-
borderColor: checkedHoverColor,
|
|
5233
|
-
backgroundColor: checkedHoverColor,
|
|
5234
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5235
|
-
borderColor: checkedHoverColorDark,
|
|
5236
|
-
backgroundColor: checkedHoverColorDark,
|
|
5237
|
-
}),
|
|
5238
|
-
},
|
|
5239
|
-
})),
|
|
5240
|
-
...(!isDisabled && {
|
|
5241
|
-
'&(input:focus)::before': {
|
|
5242
|
-
content: '""',
|
|
5243
|
-
position: 'absolute',
|
|
5244
|
-
...getInsetJssStyle(-6),
|
|
5245
|
-
border: `${borderWidthBase} solid ${focusColor}`,
|
|
5246
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5247
|
-
borderColor: focusColorDark,
|
|
5248
|
-
}),
|
|
5249
|
-
},
|
|
5250
|
-
'&(input:focus:not(:focus-visible))::before': {
|
|
5251
|
-
borderColor: 'transparent',
|
|
5252
|
-
},
|
|
5253
|
-
}),
|
|
5254
|
-
}),
|
|
5255
|
-
}),
|
|
5256
|
-
label: {
|
|
5257
|
-
display: 'grid',
|
|
5258
|
-
gridTemplateColumns: 'repeat(2, auto)',
|
|
5259
|
-
justifyContent: 'flex-start',
|
|
5260
|
-
},
|
|
5261
|
-
},
|
|
5262
|
-
text: {
|
|
5263
|
-
gridArea: '1 / 2',
|
|
5264
|
-
cursor: disabledOrLoading ? 'default' : 'pointer',
|
|
5265
|
-
...textSmallStyle,
|
|
5266
|
-
color: disabledOrLoading ? disabledColor : primaryColor,
|
|
5267
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5268
|
-
color: disabledOrLoading ? disabledColorDark : primaryColorDark,
|
|
5126
|
+
'&(input:focus:not(:focus-visible))::before': {
|
|
5127
|
+
borderColor: 'transparent',
|
|
5128
|
+
},
|
|
5269
5129
|
}),
|
|
5270
|
-
transition: getTransition('color'),
|
|
5271
|
-
...buildResponsiveStyles(hideLabel, (isHidden) => getHiddenTextJssStyle(isHidden, {
|
|
5272
|
-
paddingTop: '2px',
|
|
5273
|
-
paddingInlineStart: spacingStaticSmall, // asymmetric padding used instead of gap to prevent unclickable area between label and input
|
|
5274
|
-
})),
|
|
5275
5130
|
},
|
|
5276
|
-
...getFunctionalComponentRequiredStyles(),
|
|
5277
|
-
...getFunctionalComponentStateMessageStyles(theme, state),
|
|
5278
|
-
...(isLoading && {
|
|
5279
|
-
spinner: {
|
|
5280
|
-
position: 'relative',
|
|
5281
|
-
gridArea: '1 / 1',
|
|
5282
|
-
margin: borderWidthBase,
|
|
5283
|
-
justifySelf: 'center',
|
|
5284
|
-
height: fontLineHeight,
|
|
5285
|
-
width: fontLineHeight,
|
|
5286
|
-
fontFamily,
|
|
5287
|
-
fontSize: '1rem',
|
|
5288
|
-
cursor: 'not-allowed',
|
|
5289
|
-
},
|
|
5290
|
-
}),
|
|
5291
5131
|
};
|
|
5292
5132
|
};
|
|
5293
5133
|
|
|
@@ -5299,6 +5139,65 @@ const escapeHashCharacter = (colorString) => {
|
|
|
5299
5139
|
return colorString.replace('#', '%23');
|
|
5300
5140
|
};
|
|
5301
5141
|
|
|
5142
|
+
const getFunctionalComponentRequiredStyles = () => {
|
|
5143
|
+
return {
|
|
5144
|
+
required: {
|
|
5145
|
+
userSelect: 'none',
|
|
5146
|
+
},
|
|
5147
|
+
};
|
|
5148
|
+
};
|
|
5149
|
+
|
|
5150
|
+
const getFunctionalComponentLabelStyles = (isDisabledOrLoading, hideLabel, theme, additionalDefaultJssStyle, additionalIsShownJssStyle) => {
|
|
5151
|
+
const { primaryColor, disabledColor, contrastHighColor } = getThemedColors(theme);
|
|
5152
|
+
const { primaryColor: primaryColorDark, disabledColor: disabledColorDark, contrastHighColor: contrastHighColorDark, } = getThemedColors('dark');
|
|
5153
|
+
return {
|
|
5154
|
+
label: {
|
|
5155
|
+
...textSmallStyle,
|
|
5156
|
+
cursor: isDisabledOrLoading ? 'not-allowed' : 'pointer',
|
|
5157
|
+
justifySelf: 'flex-start',
|
|
5158
|
+
color: isDisabledOrLoading ? disabledColor : primaryColor,
|
|
5159
|
+
transition: getTransition('color'),
|
|
5160
|
+
...buildResponsiveStyles(hideLabel, (isHidden) => getHiddenTextJssStyle(isHidden, additionalIsShownJssStyle)),
|
|
5161
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5162
|
+
color: isDisabledOrLoading ? disabledColorDark : primaryColorDark,
|
|
5163
|
+
}),
|
|
5164
|
+
'&:empty': {
|
|
5165
|
+
display: 'none', // prevents outer spacing caused by parents grid gap, in case no label value is defined (although it has to be set to be a11y compliant)
|
|
5166
|
+
},
|
|
5167
|
+
'&+&': {
|
|
5168
|
+
cursor: 'unset',
|
|
5169
|
+
marginTop: `-${spacingStaticXSmall}`,
|
|
5170
|
+
fontSize: fontSizeTextXSmall,
|
|
5171
|
+
...(!isDisabledOrLoading && {
|
|
5172
|
+
color: contrastHighColor,
|
|
5173
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5174
|
+
color: contrastHighColorDark,
|
|
5175
|
+
}),
|
|
5176
|
+
}),
|
|
5177
|
+
},
|
|
5178
|
+
...additionalDefaultJssStyle,
|
|
5179
|
+
},
|
|
5180
|
+
// .required
|
|
5181
|
+
...getFunctionalComponentRequiredStyles(),
|
|
5182
|
+
};
|
|
5183
|
+
};
|
|
5184
|
+
|
|
5185
|
+
const getFunctionalComponentStateMessageStyles = (theme, state, additionalDefaultJssStyle) => {
|
|
5186
|
+
return {
|
|
5187
|
+
message: {
|
|
5188
|
+
display: 'flex',
|
|
5189
|
+
gap: spacingStaticXSmall,
|
|
5190
|
+
...textSmallStyle,
|
|
5191
|
+
color: getThemedFormStateColors(theme, state).formStateColor,
|
|
5192
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5193
|
+
color: getThemedFormStateColors('dark', state).formStateColor,
|
|
5194
|
+
}),
|
|
5195
|
+
transition: getTransition('color'),
|
|
5196
|
+
...additionalDefaultJssStyle,
|
|
5197
|
+
},
|
|
5198
|
+
};
|
|
5199
|
+
};
|
|
5200
|
+
|
|
5302
5201
|
const getCheckedSVGBackgroundImage$1 = (fill) => {
|
|
5303
5202
|
return getInlineSVGBackgroundImage(`<path fill="${fill}" d="m20.22,7.47l-1.47-1.42-9.26,9.02-4.24-4.15-1.47,1.42,5.71,5.6,10.73-10.47Z"/>`);
|
|
5304
5203
|
};
|
|
@@ -5319,34 +5218,83 @@ const getComponentCss$V = (hideLabel, state, isDisabled, isLoading, theme) => {
|
|
|
5319
5218
|
const indeterminateIconColorDark = isHighContrastMode
|
|
5320
5219
|
? canvasColor
|
|
5321
5220
|
: escapeHashCharacter(getThemedColors('dark').primaryColor);
|
|
5322
|
-
return getCss(
|
|
5221
|
+
return getCss({
|
|
5323
5222
|
'@global': {
|
|
5324
|
-
'
|
|
5325
|
-
'
|
|
5326
|
-
|
|
5327
|
-
|
|
5328
|
-
|
|
5329
|
-
'&(input:checked)': {
|
|
5330
|
-
backgroundImage: getCheckedSVGBackgroundImage$1(checkedIconColor),
|
|
5331
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5332
|
-
backgroundImage: getCheckedSVGBackgroundImage$1(checkedIconColorDark),
|
|
5333
|
-
}),
|
|
5334
|
-
},
|
|
5223
|
+
':host': {
|
|
5224
|
+
display: 'block',
|
|
5225
|
+
...addImportantToEachRule({
|
|
5226
|
+
...colorSchemeStyles,
|
|
5227
|
+
...hostHiddenStyles,
|
|
5335
5228
|
}),
|
|
5336
|
-
|
|
5337
|
-
|
|
5338
|
-
|
|
5339
|
-
|
|
5229
|
+
},
|
|
5230
|
+
// ::slotted(input)
|
|
5231
|
+
...addImportantToEachRule(mergeDeep(getSlottedCheckboxRadioButtonStyles(state, isDisabled, isLoading, theme), {
|
|
5232
|
+
'::slotted': {
|
|
5233
|
+
'&(input)': {
|
|
5234
|
+
gridArea: '1/1',
|
|
5235
|
+
borderRadius: borderRadiusSmall,
|
|
5236
|
+
},
|
|
5237
|
+
// TODO: is it somehow useful possible to make following styles configurable by paramter?
|
|
5238
|
+
...(!isLoading && {
|
|
5239
|
+
'&(input:checked)': {
|
|
5240
|
+
backgroundImage: getCheckedSVGBackgroundImage$1(checkedIconColor),
|
|
5241
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5242
|
+
backgroundImage: getCheckedSVGBackgroundImage$1(checkedIconColorDark),
|
|
5243
|
+
}),
|
|
5244
|
+
},
|
|
5245
|
+
'&(input:indeterminate)': {
|
|
5246
|
+
backgroundImage: getIndeterminateSVGBackgroundImage(indeterminateIconColor),
|
|
5247
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5248
|
+
backgroundImage: getIndeterminateSVGBackgroundImage(indeterminateIconColorDark),
|
|
5249
|
+
}),
|
|
5250
|
+
},
|
|
5251
|
+
}),
|
|
5252
|
+
...(!isDisabled && {
|
|
5253
|
+
'&(input:focus)::before': {
|
|
5254
|
+
borderRadius: borderRadiusMedium,
|
|
5255
|
+
},
|
|
5340
5256
|
}),
|
|
5341
5257
|
},
|
|
5342
|
-
|
|
5343
|
-
|
|
5344
|
-
|
|
5345
|
-
|
|
5346
|
-
|
|
5258
|
+
})),
|
|
5259
|
+
},
|
|
5260
|
+
root: {
|
|
5261
|
+
display: 'grid',
|
|
5262
|
+
gridTemplateColumns: 'auto minmax(0, 1fr)',
|
|
5263
|
+
rowGap: spacingStaticXSmall,
|
|
5264
|
+
},
|
|
5265
|
+
wrapper: {
|
|
5266
|
+
display: 'grid',
|
|
5267
|
+
gridArea: '1/1',
|
|
5268
|
+
alignSelf: 'flex-start',
|
|
5269
|
+
...(isDisabledOrLoading(isDisabled, isLoading) && {
|
|
5270
|
+
// TODO: maybe .wrapper should handle it for all form components while pointer-events: none is set to input
|
|
5271
|
+
cursor: 'not-allowed',
|
|
5347
5272
|
}),
|
|
5348
5273
|
},
|
|
5349
|
-
|
|
5274
|
+
...(isLoading && {
|
|
5275
|
+
// TODO: extract for checkbox-wrapper and radio-button-wrapper (not gridArea and placeSelf)
|
|
5276
|
+
spinner: {
|
|
5277
|
+
position: 'relative',
|
|
5278
|
+
gridArea: '1/1',
|
|
5279
|
+
placeSelf: 'center',
|
|
5280
|
+
width: fontLineHeight,
|
|
5281
|
+
height: fontLineHeight,
|
|
5282
|
+
font: `${fontSizeTextSmall} ${fontFamily}`,
|
|
5283
|
+
pointerEvents: 'none',
|
|
5284
|
+
},
|
|
5285
|
+
}),
|
|
5286
|
+
// .label / .required
|
|
5287
|
+
...getFunctionalComponentLabelStyles(isDisabled || isLoading, hideLabel, theme, {
|
|
5288
|
+
gridArea: '1/2',
|
|
5289
|
+
}, {
|
|
5290
|
+
paddingTop: '2px',
|
|
5291
|
+
paddingInlineStart: spacingStaticSmall, // asymmetric padding used instead of gap to prevent not clickable area between label and input
|
|
5292
|
+
}),
|
|
5293
|
+
// .message
|
|
5294
|
+
...getFunctionalComponentStateMessageStyles(theme, state, {
|
|
5295
|
+
gridColumn: '1/3',
|
|
5296
|
+
}),
|
|
5297
|
+
});
|
|
5350
5298
|
};
|
|
5351
5299
|
|
|
5352
5300
|
const widthMap = {
|
|
@@ -5667,8 +5615,6 @@ const getComponentCss$N = (inline, wrap, direction, justifyContent, alignItems,
|
|
|
5667
5615
|
|
|
5668
5616
|
const headerShadowClass = 'header--shadow';
|
|
5669
5617
|
const footerShadowClass$1 = 'footer--shadow';
|
|
5670
|
-
const flyoutTransitionDuration = '0.5s';
|
|
5671
|
-
const flyoutTransitionTimingFunction = 'cubic-bezier(0.77, 0, 0.175, 1)';
|
|
5672
5618
|
const getComponentCss$M = (isOpen, position, hasFooter, hasSubFooter, theme) => {
|
|
5673
5619
|
const { primaryColor, backgroundColor } = getThemedColors(theme);
|
|
5674
5620
|
const { primaryColor: primaryColorDark, backgroundColor: backgroundColorDark } = getThemedColors('dark');
|
|
@@ -5695,10 +5641,10 @@ const getComponentCss$M = (isOpen, position, hasFooter, hasSubFooter, theme) =>
|
|
|
5695
5641
|
}
|
|
5696
5642
|
: {
|
|
5697
5643
|
visibility: 'hidden',
|
|
5698
|
-
transition: `visibility 0s linear ${
|
|
5644
|
+
transition: `visibility 0s linear var(${cssVariableTransitionDuration}, ${motionDurationLong})`,
|
|
5699
5645
|
}),
|
|
5700
5646
|
...getInsetJssStyle(),
|
|
5701
|
-
...getFrostedGlassBackgroundJssStyles(isOpen,
|
|
5647
|
+
...getFrostedGlassBackgroundJssStyles(isOpen, 'long', theme),
|
|
5702
5648
|
...colorSchemeStyles,
|
|
5703
5649
|
...hostHiddenStyles,
|
|
5704
5650
|
}),
|
|
@@ -5719,9 +5665,17 @@ const getComponentCss$M = (isOpen, position, hasFooter, hasSubFooter, theme) =>
|
|
|
5719
5665
|
maxWidth: 'var(--p-flyout-max-width, 1180px)',
|
|
5720
5666
|
color: primaryColor,
|
|
5721
5667
|
background: backgroundColor,
|
|
5722
|
-
|
|
5723
|
-
|
|
5724
|
-
|
|
5668
|
+
...(isOpen
|
|
5669
|
+
? {
|
|
5670
|
+
opacity: 1,
|
|
5671
|
+
transform: 'initial',
|
|
5672
|
+
transition: `${getTransition('opacity', 'long', 'in')}, ${getTransition('transform', 'long', 'in')}`,
|
|
5673
|
+
}
|
|
5674
|
+
: {
|
|
5675
|
+
opacity: 0,
|
|
5676
|
+
transform: `translate3d(${isPositionStart ? '-100%' : '100%'}, 0, 0)`,
|
|
5677
|
+
transition: `${getTransition('opacity', 'short', 'out', 'long')}, ${getTransition('transform', 'long', 'out')}`,
|
|
5678
|
+
}),
|
|
5725
5679
|
boxShadow: `${isPositionStart ? '3px' : '-3px'} 0px 30px rgba(0, 0, 0, 0.25)`,
|
|
5726
5680
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5727
5681
|
color: primaryColorDark,
|
|
@@ -6345,7 +6299,6 @@ const getComponentCss$B = (size) => {
|
|
|
6345
6299
|
|
|
6346
6300
|
const mediaQueryXl = getMediaQueryMin('xl');
|
|
6347
6301
|
const { primaryColor: darkThemePrimaryColor, contrastHighColor: darkThemeContrastHighColor } = getThemedColors('dark');
|
|
6348
|
-
const transitionTimingFunction = 'cubic-bezier(.16,1,.3,1)';
|
|
6349
6302
|
const stretchToFullModalWidthClassName = 'stretch-to-full-modal-width';
|
|
6350
6303
|
const marginTopBottom = 'clamp(16px, 7vh, 192px)';
|
|
6351
6304
|
const footerShadowClass = 'footer--shadow';
|
|
@@ -6399,7 +6352,8 @@ const getComponentCss$A = (isOpen, isFullscreen, hasDismissButton, hasHeader, ha
|
|
|
6399
6352
|
const { primaryColor, backgroundColor } = getThemedColors(theme);
|
|
6400
6353
|
const { primaryColor: primaryColorDark, backgroundColor: backgroundColorDark } = getThemedColors('dark');
|
|
6401
6354
|
const isFullscreenForXlAndXxl = isFullscreenForXl(isFullscreen);
|
|
6402
|
-
const duration = isOpen ? '
|
|
6355
|
+
const duration = isOpen ? 'moderate' : 'short';
|
|
6356
|
+
const easing = isOpen ? 'in' : 'out';
|
|
6403
6357
|
const contentPadding = '32px';
|
|
6404
6358
|
return getCss({
|
|
6405
6359
|
'@global': {
|
|
@@ -6418,7 +6372,7 @@ const getComponentCss$A = (isOpen, isFullscreen, hasDismissButton, hasHeader, ha
|
|
|
6418
6372
|
}
|
|
6419
6373
|
: {
|
|
6420
6374
|
visibility: 'hidden',
|
|
6421
|
-
transition:
|
|
6375
|
+
transition: `visibility 0s linear var(${cssVariableTransitionDuration}, ${motionDurationShort})`,
|
|
6422
6376
|
}),
|
|
6423
6377
|
...colorSchemeStyles,
|
|
6424
6378
|
...hostHiddenStyles,
|
|
@@ -6449,9 +6403,9 @@ const getComponentCss$A = (isOpen, isFullscreen, hasDismissButton, hasHeader, ha
|
|
|
6449
6403
|
color: primaryColor,
|
|
6450
6404
|
position: 'relative',
|
|
6451
6405
|
boxSizing: 'border-box',
|
|
6452
|
-
transform: isOpen ? '
|
|
6406
|
+
transform: isOpen ? 'translateY(0%)' : 'translateY(25%)',
|
|
6453
6407
|
opacity: isOpen ? 1 : 0,
|
|
6454
|
-
transition:
|
|
6408
|
+
transition: `${getTransition('opacity', duration, easing)}, ${getTransition('transform', duration, easing)}`,
|
|
6455
6409
|
paddingTop: hasDismissButton ? pxToRemWithUnit(32) : contentPadding,
|
|
6456
6410
|
...(!hasFooter && { paddingBottom: contentPadding }),
|
|
6457
6411
|
background: backgroundColor,
|
|
@@ -6632,7 +6586,7 @@ const getComponentCss$y = (theme) => {
|
|
|
6632
6586
|
wordBreak: 'break-word',
|
|
6633
6587
|
boxSizing: 'border-box',
|
|
6634
6588
|
borderRadius: borderRadiusSmall,
|
|
6635
|
-
transition:
|
|
6589
|
+
transition: `${getTransition('background-color')}, ${getTransition('color')}`,
|
|
6636
6590
|
...getNoResultsOptionJssStyle(),
|
|
6637
6591
|
...hoverMediaQuery({
|
|
6638
6592
|
'&:not([aria-disabled]):not(.option--disabled):not([role=status]):hover': {
|
|
@@ -6692,154 +6646,261 @@ const getPlaceholderJssStyle = (styles) => ({
|
|
|
6692
6646
|
'&:-moz-placeholder': styles /* Firefox 18- */,
|
|
6693
6647
|
});
|
|
6694
6648
|
|
|
6695
|
-
const
|
|
6696
|
-
const
|
|
6697
|
-
const
|
|
6698
|
-
const getComponentCss$x = (direction, isOpen, isDisabled, hideLabel, state, isWithinForm, hasLabel, theme) => {
|
|
6699
|
-
const { primaryColor, contrastMediumColor, contrastHighColor, backgroundColor, disabledColor } = getThemedColors(theme);
|
|
6700
|
-
const { primaryColor: primaryColorDark, contrastMediumColor: contrastMediumColorDark, contrastHighColor: contrastHighColorDark, backgroundColor: backgroundColorDark, disabledColor: disabledColorDark, } = getThemedColors('dark');
|
|
6649
|
+
const getSlottedTextFieldTextareaSelectStyles = (child, state, isLoading, theme, additionalDefaultJssStyle) => {
|
|
6650
|
+
const { primaryColor, contrastLowColor, contrastMediumColor, disabledColor } = getThemedColors(theme);
|
|
6651
|
+
const { primaryColor: primaryColorDark, contrastLowColor: contrastLowColorDark, contrastMediumColor: contrastMediumColorDark, disabledColor: disabledColorDark, } = getThemedColors('dark');
|
|
6701
6652
|
const { formStateColor, formStateHoverColor } = getThemedFormStateColors(theme, state);
|
|
6702
6653
|
const { formStateColor: formStateColorDark, formStateHoverColor: formStateHoverColorDark } = getThemedFormStateColors('dark', state);
|
|
6703
|
-
|
|
6654
|
+
return {
|
|
6655
|
+
[`::slotted(${child})`]: {
|
|
6656
|
+
display: 'block',
|
|
6657
|
+
width: '100%',
|
|
6658
|
+
height: child !== 'textarea'
|
|
6659
|
+
? `calc(${fontLineHeight} + 10px + ${borderWidthBase} * 2 + ${spacingStaticSmall} * 2)` // we need 10px additionally so input height becomes 54px
|
|
6660
|
+
: 'auto',
|
|
6661
|
+
margin: 0,
|
|
6662
|
+
outline: 0,
|
|
6663
|
+
WebkitAppearance: 'none',
|
|
6664
|
+
appearance: 'none',
|
|
6665
|
+
boxSizing: 'border-box',
|
|
6666
|
+
border: `${borderWidthBase} solid ${formStateColor || contrastMediumColor}`,
|
|
6667
|
+
borderRadius: borderRadiusSmall,
|
|
6668
|
+
background: 'transparent',
|
|
6669
|
+
font: textSmallStyle.font.replace('ex', 'ex + 6px'),
|
|
6670
|
+
textIndent: 0,
|
|
6671
|
+
color: primaryColor,
|
|
6672
|
+
transition: `${getTransition('background-color')}, ${getTransition('border-color')}, ${getTransition('color')}`,
|
|
6673
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6674
|
+
borderColor: formStateColorDark || contrastMediumColorDark,
|
|
6675
|
+
color: primaryColorDark,
|
|
6676
|
+
}),
|
|
6677
|
+
...additionalDefaultJssStyle,
|
|
6678
|
+
},
|
|
6679
|
+
...(!isLoading &&
|
|
6680
|
+
hoverMediaQuery({
|
|
6681
|
+
// with the media query the selector has higher priority and overrides disabled styles
|
|
6682
|
+
[`::slotted(${child}:not(:disabled):not(:focus):not([readonly]):hover),label:hover~.wrapper ::slotted(${child}:not(:disabled):not(:focus):not([readonly]))${child === 'select' ? ',label:hover~.wrapper ::part(select-wrapper-dropdown)' : ''}`]: {
|
|
6683
|
+
borderColor: formStateHoverColor || primaryColor,
|
|
6684
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6685
|
+
borderColor: formStateHoverColorDark || primaryColorDark,
|
|
6686
|
+
}),
|
|
6687
|
+
},
|
|
6688
|
+
})),
|
|
6689
|
+
[`::slotted(${child}:focus)`]: {
|
|
6690
|
+
borderColor: primaryColor,
|
|
6691
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6692
|
+
borderColor: primaryColorDark,
|
|
6693
|
+
}),
|
|
6694
|
+
},
|
|
6695
|
+
[`::slotted(${child}:disabled)`]: {
|
|
6696
|
+
cursor: 'not-allowed',
|
|
6697
|
+
color: disabledColor,
|
|
6698
|
+
borderColor: disabledColor,
|
|
6699
|
+
WebkitTextFillColor: disabledColor,
|
|
6700
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6701
|
+
color: disabledColorDark,
|
|
6702
|
+
borderColor: disabledColorDark,
|
|
6703
|
+
WebkitTextFillColor: disabledColorDark,
|
|
6704
|
+
}),
|
|
6705
|
+
},
|
|
6706
|
+
...(child !== 'select' && {
|
|
6707
|
+
[`::slotted(${child}[readonly])`]: {
|
|
6708
|
+
borderColor: contrastLowColor,
|
|
6709
|
+
background: contrastLowColor,
|
|
6710
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6711
|
+
borderColor: contrastLowColorDark,
|
|
6712
|
+
background: contrastLowColorDark,
|
|
6713
|
+
}),
|
|
6714
|
+
},
|
|
6715
|
+
}),
|
|
6716
|
+
};
|
|
6717
|
+
};
|
|
6718
|
+
const formElementLayeredGap = '9px'; // to have same distance vertically and horizontally for e.g. button/icon within form element
|
|
6719
|
+
const formElementLayeredSafeZone = `calc(${formElementLayeredGap} + ${borderWidthBase})`;
|
|
6720
|
+
// TODO: basic button/icon padding can already be set within style function instead of on component style level
|
|
6721
|
+
const formButtonOrIconPadding = spacingStaticXSmall;
|
|
6722
|
+
// TODO: if we'd use 12px instead, it wouldn't be necessary for textarea to have a custom vertical padding,
|
|
6723
|
+
// unfortunately line-height alignment breaks for a select element for some reasons then
|
|
6724
|
+
// TODO: basic form element padding can already be set within style function instead of on component style level
|
|
6725
|
+
const formElementPaddingVertical = spacingStaticSmall;
|
|
6726
|
+
// TODO: basic form element padding can already be set within style function instead of on component style level
|
|
6727
|
+
const formElementPaddingHorizontal = spacingStaticMedium;
|
|
6728
|
+
const getCalculatedFormElementPaddingHorizontal = (buttonOrIconAmount) => {
|
|
6729
|
+
// when applied, font-family and font-size needs to be set too for correct calculation of ex-unit ($fontLineHeight)
|
|
6730
|
+
return `calc(${formElementLayeredGap} + ${formElementPaddingHorizontal} / 2 + (${fontLineHeight} + ${formButtonOrIconPadding} * 2) * ${buttonOrIconAmount})`;
|
|
6731
|
+
};
|
|
6732
|
+
// TODO: re-use in textarea-wrapper not only in text-field-wrapper
|
|
6733
|
+
const getUnitCounterJssStyle = (isDisabled, theme) => {
|
|
6734
|
+
const { disabledColor, contrastMediumColor } = getThemedColors(theme);
|
|
6735
|
+
const { disabledColor: disabledColorDark, contrastMediumColor: contrastMediumColorDark } = getThemedColors('dark');
|
|
6736
|
+
return {
|
|
6737
|
+
pointerEvents: 'none',
|
|
6738
|
+
maxWidth: '100%',
|
|
6739
|
+
boxSizing: 'border-box',
|
|
6740
|
+
whiteSpace: 'nowrap',
|
|
6741
|
+
overflow: 'hidden',
|
|
6742
|
+
textOverflow: 'ellipsis',
|
|
6743
|
+
font: textSmallStyle.font,
|
|
6744
|
+
color: contrastMediumColor,
|
|
6745
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6746
|
+
color: contrastMediumColorDark,
|
|
6747
|
+
}),
|
|
6748
|
+
...(isDisabled && {
|
|
6749
|
+
color: disabledColor,
|
|
6750
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6751
|
+
color: disabledColorDark,
|
|
6752
|
+
}),
|
|
6753
|
+
}),
|
|
6754
|
+
};
|
|
6755
|
+
};
|
|
6756
|
+
|
|
6757
|
+
const getComponentCss$x = (direction, isOpen, isDisabled, hideLabel, state, isWithinForm, theme) => {
|
|
6758
|
+
const { contrastHighColor } = getThemedColors(theme);
|
|
6759
|
+
const { contrastHighColor: contrastHighColorDark } = getThemedColors('dark');
|
|
6704
6760
|
return getCss({
|
|
6705
6761
|
'@global': {
|
|
6706
|
-
|
|
6707
|
-
|
|
6708
|
-
|
|
6709
|
-
position: 'relative',
|
|
6762
|
+
':host': {
|
|
6763
|
+
display: 'block',
|
|
6764
|
+
...addImportantToEachRule({
|
|
6710
6765
|
...colorSchemeStyles,
|
|
6711
6766
|
...hostHiddenStyles,
|
|
6712
|
-
},
|
|
6713
|
-
|
|
6714
|
-
|
|
6767
|
+
}),
|
|
6768
|
+
},
|
|
6769
|
+
...(isWithinForm &&
|
|
6770
|
+
addImportantToEachRule({
|
|
6771
|
+
'::slotted([slot=internal-select])': {
|
|
6715
6772
|
position: 'absolute',
|
|
6716
6773
|
opacity: 0,
|
|
6717
6774
|
height: '0px',
|
|
6718
6775
|
},
|
|
6719
|
-
}),
|
|
6720
|
-
|
|
6721
|
-
|
|
6776
|
+
})),
|
|
6777
|
+
// TODO: re-use select-wrapper-style
|
|
6778
|
+
input: getInputStyles(isDisabled, direction, isOpen, state, theme),
|
|
6722
6779
|
},
|
|
6723
6780
|
root: {
|
|
6724
|
-
|
|
6781
|
+
display: 'grid',
|
|
6782
|
+
gap: spacingStaticXSmall,
|
|
6725
6783
|
},
|
|
6726
|
-
|
|
6727
|
-
|
|
6728
|
-
display: '
|
|
6729
|
-
|
|
6730
|
-
cursor: 'text',
|
|
6731
|
-
...hoverMediaQuery({
|
|
6732
|
-
'&:hover:not(.disabled)': {
|
|
6733
|
-
borderColor: isOpen ? primaryColor : formStateHoverColor || primaryColor,
|
|
6734
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6735
|
-
borderColor: isOpen ? primaryColorDark : formStateHoverColorDark || primaryColorDark,
|
|
6736
|
-
}),
|
|
6737
|
-
},
|
|
6738
|
-
}),
|
|
6739
|
-
...(!isDisabled && {
|
|
6740
|
-
'&:focus-within': {
|
|
6741
|
-
borderColor: primaryColor,
|
|
6742
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6743
|
-
borderColor: primaryColorDark,
|
|
6744
|
-
}),
|
|
6745
|
-
},
|
|
6746
|
-
}),
|
|
6747
|
-
background: backgroundColor,
|
|
6748
|
-
border: `${borderWidthBase} solid ${isOpen ? primaryColor : formStateColor || contrastMediumColor}`,
|
|
6749
|
-
borderRadius: borderRadiusSmall,
|
|
6750
|
-
...(isOpen && {
|
|
6751
|
-
[isDirectionDown ? 'paddingBottom' : 'paddingTop']: '1px',
|
|
6752
|
-
[isDirectionDown ? 'borderBottom' : 'borderTop']: addImportantToRule(`1px solid ${contrastMediumColor}`),
|
|
6753
|
-
[isDirectionDown ? 'borderBottomLeftRadius' : 'borderTopLeftRadius']: 0,
|
|
6754
|
-
[isDirectionDown ? 'borderBottomRightRadius' : 'borderTopRightRadius']: 0,
|
|
6755
|
-
}),
|
|
6756
|
-
...(isDisabled && {
|
|
6757
|
-
cursor: 'not-allowed',
|
|
6758
|
-
color: disabledColor,
|
|
6759
|
-
borderColor: disabledColor,
|
|
6760
|
-
WebkitTextFillColor: disabledColor,
|
|
6761
|
-
}),
|
|
6762
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6763
|
-
background: backgroundColorDark,
|
|
6764
|
-
border: `${borderWidthBase} solid ${isOpen ? primaryColorDark : formStateColorDark || contrastMediumColorDark}`,
|
|
6765
|
-
...(isOpen && {
|
|
6766
|
-
[isDirectionDown ? 'borderBottom' : 'borderTop']: addImportantToRule(`1px solid ${contrastMediumColorDark}`),
|
|
6767
|
-
}),
|
|
6768
|
-
...(isDisabled && {
|
|
6769
|
-
color: disabledColorDark,
|
|
6770
|
-
borderColor: disabledColorDark,
|
|
6771
|
-
WebkitTextFillColor: disabledColorDark,
|
|
6772
|
-
}),
|
|
6773
|
-
}),
|
|
6784
|
+
wrapper: {
|
|
6785
|
+
position: 'relative',
|
|
6786
|
+
display: 'grid',
|
|
6787
|
+
gridTemplateColumns: `minmax(0, 1fr) auto auto ${formElementLayeredSafeZone}`,
|
|
6774
6788
|
},
|
|
6775
|
-
|
|
6776
|
-
? {
|
|
6777
|
-
label: {
|
|
6778
|
-
display: 'none',
|
|
6779
|
-
},
|
|
6780
|
-
}
|
|
6781
|
-
: hasLabel && getLabelStyles('select', isDisabled, hideLabel, state, theme)),
|
|
6789
|
+
// TODO: extract for multi-select, select-wrapper and text-field (not gridArea and placeSelf)
|
|
6782
6790
|
icon: {
|
|
6783
|
-
|
|
6784
|
-
|
|
6785
|
-
|
|
6786
|
-
|
|
6787
|
-
'reset-icon': {
|
|
6788
|
-
padding: '4px',
|
|
6789
|
-
margin: 'auto',
|
|
6790
|
-
},
|
|
6791
|
-
'toggle-icon': {
|
|
6791
|
+
gridArea: '1/3',
|
|
6792
|
+
placeSelf: 'center',
|
|
6793
|
+
padding: formButtonOrIconPadding,
|
|
6794
|
+
pointerEvents: 'none',
|
|
6792
6795
|
transform: 'rotate3d(0,0,1,0.0001deg)',
|
|
6793
6796
|
transition: getTransition('transform'),
|
|
6794
|
-
'&--
|
|
6797
|
+
'&--rotate': {
|
|
6795
6798
|
transform: 'rotate3d(0,0,1,180deg)',
|
|
6796
6799
|
},
|
|
6797
6800
|
},
|
|
6801
|
+
// TODO: extract for multi-select, select-wrapper and text-field (not gridArea and placeSelf)
|
|
6802
|
+
button: {
|
|
6803
|
+
gridArea: '1/2',
|
|
6804
|
+
placeSelf: 'center',
|
|
6805
|
+
padding: formButtonOrIconPadding,
|
|
6806
|
+
},
|
|
6807
|
+
listbox: getListStyles$1(isOpen, direction, theme),
|
|
6808
|
+
// TODO: extract (maybe even as functional component) and re-use in multi-select and select-wrapper
|
|
6798
6809
|
'no-results': {
|
|
6799
6810
|
padding: `${spacingStaticSmall} 12px`,
|
|
6811
|
+
boxSizing: 'border-box',
|
|
6800
6812
|
color: contrastHighColor,
|
|
6801
6813
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6802
6814
|
color: contrastHighColorDark,
|
|
6803
6815
|
}),
|
|
6804
|
-
|
|
6805
|
-
|
|
6806
|
-
|
|
6807
|
-
|
|
6808
|
-
|
|
6809
|
-
|
|
6810
|
-
|
|
6811
|
-
|
|
6812
|
-
|
|
6813
|
-
|
|
6814
|
-
|
|
6815
|
-
|
|
6816
|
-
|
|
6817
|
-
|
|
6818
|
-
|
|
6819
|
-
|
|
6820
|
-
|
|
6821
|
-
|
|
6822
|
-
|
|
6823
|
-
|
|
6824
|
-
|
|
6825
|
-
|
|
6826
|
-
|
|
6827
|
-
|
|
6828
|
-
|
|
6829
|
-
|
|
6830
|
-
|
|
6831
|
-
|
|
6832
|
-
|
|
6833
|
-
|
|
6834
|
-
|
|
6835
|
-
|
|
6836
|
-
|
|
6837
|
-
|
|
6838
|
-
'
|
|
6839
|
-
|
|
6840
|
-
|
|
6841
|
-
|
|
6816
|
+
...getNoResultsOptionJssStyle(),
|
|
6817
|
+
},
|
|
6818
|
+
// TODO: maybe we should extract it as functional component too
|
|
6819
|
+
'sr-only': getHiddenTextJssStyle(),
|
|
6820
|
+
// .label / .required
|
|
6821
|
+
...getFunctionalComponentLabelStyles(isDisabled, hideLabel, theme),
|
|
6822
|
+
// .message
|
|
6823
|
+
...getFunctionalComponentStateMessageStyles(theme, state),
|
|
6824
|
+
});
|
|
6825
|
+
};
|
|
6826
|
+
// TODO: use getSlottedTextFieldTextareaSelectStyles() instead an manipulate selectors like done with PIN Code or even better make it configurable as parameter
|
|
6827
|
+
const getInputStyles = (isDisabled, direction, isOpen, state, theme) => {
|
|
6828
|
+
const isDirectionDown = direction === 'down';
|
|
6829
|
+
const { primaryColor, disabledColor, backgroundColor, contrastMediumColor } = getThemedColors(theme);
|
|
6830
|
+
const { primaryColor: primaryColorDark, disabledColor: disabledColorDark, backgroundColor: backgroundColorDark, contrastMediumColor: contrastMediumColorDark, } = getThemedColors('dark');
|
|
6831
|
+
const { formStateColor, formStateHoverColor } = getThemedFormStateColors(theme, state);
|
|
6832
|
+
const { formStateColor: formStateColorDark, formStateHoverColor: formStateHoverColorDark } = getThemedFormStateColors('dark', state);
|
|
6833
|
+
return {
|
|
6834
|
+
gridArea: '1/1/1/-1',
|
|
6835
|
+
flex: 1,
|
|
6836
|
+
minWidth: 0,
|
|
6837
|
+
// TODO: abstract and re-use for multi-select, select-wrapper and text-field-wrapper
|
|
6838
|
+
height: `calc(${fontLineHeight} + 10px + ${borderWidthBase} * 2 + ${spacingStaticSmall} * 2)`,
|
|
6839
|
+
font: textSmallStyle.font.replace('ex', 'ex + 6px'),
|
|
6840
|
+
margin: 0,
|
|
6841
|
+
padding: `${formElementPaddingVertical} ${formElementPaddingHorizontal}`,
|
|
6842
|
+
paddingInlineEnd: getCalculatedFormElementPaddingHorizontal(2),
|
|
6843
|
+
boxSizing: 'border-box',
|
|
6844
|
+
outline: 0,
|
|
6845
|
+
WebkitAppearance: 'none',
|
|
6846
|
+
appearance: 'none',
|
|
6847
|
+
...textSmallStyle,
|
|
6848
|
+
textOverflow: 'ellipsis',
|
|
6849
|
+
'&:disabled': {
|
|
6850
|
+
cursor: 'not-allowed',
|
|
6851
|
+
},
|
|
6852
|
+
transition: `${getTransition('background-color')}, ${getTransition('border-color')}, ${getTransition('color')}`,
|
|
6853
|
+
color: primaryColor,
|
|
6854
|
+
'&:not(:focus)': {
|
|
6855
|
+
...getPlaceholderJssStyle({ color: primaryColor, opacity: 1 }),
|
|
6856
|
+
...prefersColorSchemeDarkMediaQuery(theme, getPlaceholderJssStyle({ color: primaryColorDark, opacity: 1 })),
|
|
6842
6857
|
},
|
|
6858
|
+
...hoverMediaQuery({
|
|
6859
|
+
'&:hover:not(:disabled):not(:focus),label:hover~.wrapper &:not(:disabled):not(:focus)': {
|
|
6860
|
+
borderColor: isOpen ? primaryColor : formStateHoverColor || primaryColor,
|
|
6861
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6862
|
+
borderColor: isOpen ? primaryColorDark : formStateHoverColorDark || primaryColorDark,
|
|
6863
|
+
}),
|
|
6864
|
+
},
|
|
6865
|
+
}),
|
|
6866
|
+
...(!isDisabled && {
|
|
6867
|
+
'&:focus': {
|
|
6868
|
+
borderColor: primaryColor,
|
|
6869
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6870
|
+
borderColor: primaryColorDark,
|
|
6871
|
+
}),
|
|
6872
|
+
},
|
|
6873
|
+
}),
|
|
6874
|
+
background: backgroundColor,
|
|
6875
|
+
border: `${borderWidthBase} solid ${isOpen ? primaryColor : formStateColor || contrastMediumColor}`,
|
|
6876
|
+
borderRadius: borderRadiusSmall,
|
|
6877
|
+
...(isOpen && {
|
|
6878
|
+
[isDirectionDown ? 'paddingBottom' : 'paddingTop']: `calc(${formElementPaddingVertical} + 1px)`,
|
|
6879
|
+
[isDirectionDown ? 'borderBottom' : 'borderTop']: addImportantToRule(`1px solid ${contrastMediumColor}`),
|
|
6880
|
+
[isDirectionDown ? 'borderBottomLeftRadius' : 'borderTopLeftRadius']: 0,
|
|
6881
|
+
[isDirectionDown ? 'borderBottomRightRadius' : 'borderTopRightRadius']: 0,
|
|
6882
|
+
}),
|
|
6883
|
+
...(isDisabled && {
|
|
6884
|
+
...getPlaceholderJssStyle({ color: disabledColor }),
|
|
6885
|
+
cursor: 'not-allowed',
|
|
6886
|
+
color: disabledColor,
|
|
6887
|
+
borderColor: disabledColor,
|
|
6888
|
+
WebkitTextFillColor: disabledColor,
|
|
6889
|
+
}),
|
|
6890
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6891
|
+
color: primaryColorDark,
|
|
6892
|
+
background: backgroundColorDark,
|
|
6893
|
+
border: `${borderWidthBase} solid ${isOpen ? primaryColorDark : formStateColorDark || contrastMediumColorDark}`,
|
|
6894
|
+
...(isOpen && {
|
|
6895
|
+
[isDirectionDown ? 'borderBottom' : 'borderTop']: addImportantToRule(`1px solid ${contrastMediumColorDark}`),
|
|
6896
|
+
}),
|
|
6897
|
+
...(isDisabled && {
|
|
6898
|
+
...getPlaceholderJssStyle({ color: disabledColorDark }),
|
|
6899
|
+
color: disabledColorDark,
|
|
6900
|
+
borderColor: disabledColorDark,
|
|
6901
|
+
WebkitTextFillColor: disabledColorDark,
|
|
6902
|
+
}),
|
|
6903
|
+
}),
|
|
6843
6904
|
};
|
|
6844
6905
|
};
|
|
6845
6906
|
const getListStyles$1 = (isOpen, direction, theme) => {
|
|
@@ -6847,39 +6908,35 @@ const getListStyles$1 = (isOpen, direction, theme) => {
|
|
|
6847
6908
|
const { primaryColor, backgroundColor } = getThemedColors(theme);
|
|
6848
6909
|
const { primaryColor: primaryColorDark, backgroundColor: backgroundColorDark } = getThemedColors('dark');
|
|
6849
6910
|
return {
|
|
6850
|
-
|
|
6851
|
-
|
|
6852
|
-
|
|
6853
|
-
|
|
6854
|
-
|
|
6855
|
-
|
|
6856
|
-
|
|
6857
|
-
|
|
6858
|
-
|
|
6859
|
-
|
|
6860
|
-
|
|
6861
|
-
|
|
6862
|
-
|
|
6863
|
-
|
|
6864
|
-
|
|
6865
|
-
|
|
6866
|
-
|
|
6867
|
-
|
|
6868
|
-
|
|
6869
|
-
|
|
6870
|
-
|
|
6871
|
-
|
|
6872
|
-
|
|
6873
|
-
|
|
6874
|
-
|
|
6875
|
-
|
|
6876
|
-
|
|
6877
|
-
|
|
6878
|
-
|
|
6879
|
-
background: backgroundColorDark,
|
|
6880
|
-
borderColor: primaryColorDark,
|
|
6881
|
-
}),
|
|
6882
|
-
},
|
|
6911
|
+
position: 'absolute',
|
|
6912
|
+
margin: 0,
|
|
6913
|
+
display: isOpen ? 'flex' : 'none',
|
|
6914
|
+
flexDirection: 'column',
|
|
6915
|
+
gap: spacingStaticSmall,
|
|
6916
|
+
padding: '6px',
|
|
6917
|
+
...textSmallStyle,
|
|
6918
|
+
zIndex: 10,
|
|
6919
|
+
left: 0,
|
|
6920
|
+
right: 0,
|
|
6921
|
+
[isDirectionDown ? 'top' : 'bottom']: '100%',
|
|
6922
|
+
boxSizing: 'border-box',
|
|
6923
|
+
maxHeight: `${8.5 * (MULTI_SELECT_OPTION_HEIGHT + 8) + 6 + 2}px`,
|
|
6924
|
+
overflowY: 'auto',
|
|
6925
|
+
WebkitOverflowScrolling: 'touch',
|
|
6926
|
+
background: backgroundColor,
|
|
6927
|
+
border: `2px solid ${primaryColor}`,
|
|
6928
|
+
[isDirectionDown ? 'borderTop' : 'borderBottom']: 'none',
|
|
6929
|
+
borderRadius: borderRadiusSmall,
|
|
6930
|
+
[isDirectionDown ? 'borderTopLeftRadius' : 'borderBottomLeftRadius']: 0,
|
|
6931
|
+
[isDirectionDown ? 'borderTopRightRadius' : 'borderBottomRightRadius']: 0,
|
|
6932
|
+
scrollbarWidth: 'thin',
|
|
6933
|
+
scrollbarColor: 'auto',
|
|
6934
|
+
transition: getTransition('border-color'),
|
|
6935
|
+
transform: 'translate3d(0,0,0)',
|
|
6936
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6937
|
+
background: backgroundColorDark,
|
|
6938
|
+
borderColor: primaryColorDark,
|
|
6939
|
+
}),
|
|
6883
6940
|
};
|
|
6884
6941
|
};
|
|
6885
6942
|
|
|
@@ -6935,7 +6992,7 @@ const getComponentCss$w = (maxNumberOfPageLinks, theme) => {
|
|
|
6935
6992
|
display: 'flex',
|
|
6936
6993
|
justifyContent: 'center',
|
|
6937
6994
|
alignItems: 'center',
|
|
6938
|
-
transition:
|
|
6995
|
+
transition: `${getTransition('background-color')}, ${getTransition('border-color')}, ${getTransition('color')}`,
|
|
6939
6996
|
position: 'relative',
|
|
6940
6997
|
width: buttonSize,
|
|
6941
6998
|
height: buttonSize,
|
|
@@ -7010,31 +7067,42 @@ const removeStyles = (selector, styles) => Object.fromEntries(Object.entries(sty
|
|
|
7010
7067
|
|
|
7011
7068
|
const getComponentCss$v = (hideLabel, state, isDisabled, isLoading, isWithinForm, length, theme) => {
|
|
7012
7069
|
const inputSize = `calc(${fontLineHeight} + 10px + ${borderWidthBase} * 2 + ${spacingStaticSmall} * 2)`; // equivalent to calculation of input height within form-styles
|
|
7013
|
-
const
|
|
7014
|
-
|
|
7070
|
+
const inputStyles = removeStyles('input[readonly]', removeSlottedSelector(getSlottedTextFieldTextareaSelectStyles('input', state, isLoading, theme, {
|
|
7071
|
+
// TODO: move into getSlottedTextFieldTextareaSelectStyles()
|
|
7072
|
+
padding: `${formElementPaddingVertical} ${spacingStaticXSmall}`,
|
|
7073
|
+
// TODO: move into getSlottedTextFieldTextareaSelectStyles() via parameter, e.g. textAlign=center|start
|
|
7015
7074
|
textAlign: 'center',
|
|
7075
|
+
// TODO: move into getSlottedTextFieldTextareaSelectStyles() via parameter, e.g. size=max|min
|
|
7016
7076
|
width: inputSize,
|
|
7017
|
-
...(length
|
|
7077
|
+
...(length > 4 && {
|
|
7018
7078
|
[getMediaQueryMax('xs')]: {
|
|
7019
|
-
|
|
7079
|
+
// TODO: instead of having dedicated css rules depending on length we should try to implement a fluid one fits all solution
|
|
7080
|
+
width: `calc((276px - (${spacingStaticSmall} * ${length - 1})) / ${length})`, // calculate the max with of the inputs that fit into grid in viewport base (276px)
|
|
7020
7081
|
},
|
|
7021
7082
|
}),
|
|
7083
|
+
// TODO: move into getSlottedTextFieldTextareaSelectStyles() via parameter, e.g. isLoading
|
|
7022
7084
|
...(isLoading && {
|
|
7023
7085
|
opacity: 0.2,
|
|
7024
7086
|
cursor: 'not-allowed',
|
|
7025
7087
|
}),
|
|
7088
|
+
...Object.fromEntries(Array.from(Array(length)).map((_, i) => {
|
|
7089
|
+
return [`&:nth-of-type(${i + 1})`, { gridArea: `1/${i + 1}` }];
|
|
7090
|
+
})),
|
|
7026
7091
|
})));
|
|
7027
7092
|
return getCss({
|
|
7028
7093
|
'@global': {
|
|
7029
|
-
':host':
|
|
7094
|
+
':host': {
|
|
7030
7095
|
display: 'block',
|
|
7031
|
-
...
|
|
7032
|
-
|
|
7033
|
-
|
|
7096
|
+
...addImportantToEachRule({
|
|
7097
|
+
...colorSchemeStyles,
|
|
7098
|
+
...hostHiddenStyles,
|
|
7099
|
+
}),
|
|
7100
|
+
},
|
|
7101
|
+
// input
|
|
7034
7102
|
...inputStyles,
|
|
7035
7103
|
...(isWithinForm &&
|
|
7036
7104
|
addImportantToEachRule({
|
|
7037
|
-
'::slotted(input)': {
|
|
7105
|
+
'::slotted([slot=internal-input])': {
|
|
7038
7106
|
position: 'absolute',
|
|
7039
7107
|
height: inputSize,
|
|
7040
7108
|
width: 0,
|
|
@@ -7042,32 +7110,27 @@ const getComponentCss$v = (hideLabel, state, isDisabled, isLoading, isWithinForm
|
|
|
7042
7110
|
},
|
|
7043
7111
|
})),
|
|
7044
7112
|
},
|
|
7113
|
+
root: {
|
|
7114
|
+
display: 'grid',
|
|
7115
|
+
gap: spacingStaticXSmall,
|
|
7116
|
+
},
|
|
7117
|
+
wrapper: {
|
|
7118
|
+
display: 'grid',
|
|
7119
|
+
justifySelf: 'flex-start',
|
|
7120
|
+
gap: spacingStaticSmall,
|
|
7121
|
+
},
|
|
7045
7122
|
...(isLoading && {
|
|
7046
7123
|
spinner: {
|
|
7047
|
-
|
|
7124
|
+
gridArea: `1/1/1/${length + 1}`,
|
|
7125
|
+
placeSelf: 'center',
|
|
7126
|
+
width: inputSize,
|
|
7048
7127
|
height: inputSize,
|
|
7049
7128
|
pointerEvents: 'none',
|
|
7050
|
-
position: 'absolute',
|
|
7051
|
-
top: '50%',
|
|
7052
|
-
left: '50%',
|
|
7053
|
-
transform: 'translate(-50%, -50%)',
|
|
7054
|
-
},
|
|
7055
|
-
}),
|
|
7056
|
-
'input-container': {
|
|
7057
|
-
display: 'flex',
|
|
7058
|
-
position: 'relative',
|
|
7059
|
-
gap: spacingStaticSmall,
|
|
7060
|
-
flexWrap: 'wrap',
|
|
7061
|
-
width: 'fit-content',
|
|
7062
|
-
},
|
|
7063
|
-
...mergeDeep(labelStyles, {
|
|
7064
|
-
label: {
|
|
7065
|
-
...buildResponsiveStyles(hideLabel,
|
|
7066
|
-
// workaround: since pin-code component is not wrapped into label tag it behaves differently
|
|
7067
|
-
(isLabelHidden) => (isLabelHidden ? { display: 'none' } : { display: 'block' })),
|
|
7068
7129
|
},
|
|
7069
7130
|
}),
|
|
7070
|
-
|
|
7131
|
+
// .label / .required
|
|
7132
|
+
...getFunctionalComponentLabelStyles(isDisabled, hideLabel, theme),
|
|
7133
|
+
// .message
|
|
7071
7134
|
...getFunctionalComponentStateMessageStyles(theme, state),
|
|
7072
7135
|
});
|
|
7073
7136
|
};
|
|
@@ -7193,6 +7256,7 @@ const getComponentCss$u = (direction, isNative, theme) => {
|
|
|
7193
7256
|
button: {
|
|
7194
7257
|
display: 'block',
|
|
7195
7258
|
position: 'relative',
|
|
7259
|
+
WebkitAppearance: 'none',
|
|
7196
7260
|
appearance: 'none',
|
|
7197
7261
|
background: 'transparent',
|
|
7198
7262
|
border: 0,
|
|
@@ -7251,7 +7315,7 @@ const getComponentCss$u = (direction, isNative, theme) => {
|
|
|
7251
7315
|
filter: `drop-shadow(0 0 16px ${shadowColor})`,
|
|
7252
7316
|
backdropFilter: 'drop-shadow(0px 0px 0px transparent)',
|
|
7253
7317
|
pointerEvents: 'none',
|
|
7254
|
-
animation:
|
|
7318
|
+
animation: `${motionDurationShort} $fadeIn ${motionEasingBase} forwards`
|
|
7255
7319
|
,
|
|
7256
7320
|
'&::before': {
|
|
7257
7321
|
content: '""',
|
|
@@ -7306,28 +7370,77 @@ const getComponentCss$t = (hideLabel, state, isDisabled, isLoading, theme) => {
|
|
|
7306
7370
|
const checkedIconColorDark = isHighContrastMode
|
|
7307
7371
|
? getHighContrastColors().canvasColor
|
|
7308
7372
|
: escapeHashCharacter(getInvertedThemedColors('dark').primaryColor);
|
|
7309
|
-
return getCss(
|
|
7373
|
+
return getCss({
|
|
7310
7374
|
'@global': {
|
|
7311
|
-
'
|
|
7312
|
-
'
|
|
7313
|
-
|
|
7314
|
-
|
|
7315
|
-
|
|
7316
|
-
'&(input:checked)': {
|
|
7317
|
-
backgroundImage: getCheckedSVGBackgroundImage(checkedIconColor),
|
|
7318
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7319
|
-
backgroundImage: getCheckedSVGBackgroundImage(checkedIconColorDark),
|
|
7320
|
-
}),
|
|
7321
|
-
},
|
|
7375
|
+
':host': {
|
|
7376
|
+
display: 'block',
|
|
7377
|
+
...addImportantToEachRule({
|
|
7378
|
+
...colorSchemeStyles,
|
|
7379
|
+
...hostHiddenStyles,
|
|
7322
7380
|
}),
|
|
7323
|
-
|
|
7324
|
-
|
|
7381
|
+
},
|
|
7382
|
+
// ::slotted(input)
|
|
7383
|
+
...addImportantToEachRule(mergeDeep(getSlottedCheckboxRadioButtonStyles(state, isDisabled, isLoading, theme), {
|
|
7384
|
+
'::slotted': {
|
|
7385
|
+
'&(input)': {
|
|
7386
|
+
gridArea: '1/1',
|
|
7325
7387
|
borderRadius: '50%',
|
|
7326
7388
|
},
|
|
7327
|
-
|
|
7389
|
+
// TODO: is it somehow useful possible to make following styles configurable by paramter?
|
|
7390
|
+
...(!isLoading && {
|
|
7391
|
+
'&(input:checked)': {
|
|
7392
|
+
backgroundImage: getCheckedSVGBackgroundImage(checkedIconColor),
|
|
7393
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7394
|
+
backgroundImage: getCheckedSVGBackgroundImage(checkedIconColorDark),
|
|
7395
|
+
}),
|
|
7396
|
+
},
|
|
7397
|
+
}),
|
|
7398
|
+
...(!isDisabled && {
|
|
7399
|
+
'&(input:focus)::before': {
|
|
7400
|
+
borderRadius: '50%',
|
|
7401
|
+
},
|
|
7402
|
+
}),
|
|
7403
|
+
},
|
|
7404
|
+
})),
|
|
7405
|
+
},
|
|
7406
|
+
root: {
|
|
7407
|
+
display: 'grid',
|
|
7408
|
+
gridTemplateColumns: 'auto minmax(0, 1fr)',
|
|
7409
|
+
rowGap: spacingStaticXSmall,
|
|
7410
|
+
},
|
|
7411
|
+
wrapper: {
|
|
7412
|
+
display: 'grid',
|
|
7413
|
+
gridArea: '1/1',
|
|
7414
|
+
alignSelf: 'flex-start',
|
|
7415
|
+
...(isDisabledOrLoading(isDisabled, isLoading) && {
|
|
7416
|
+
// TODO: maybe .wrapper should handle it for all form components while pointer-events: none is set to input
|
|
7417
|
+
cursor: 'not-allowed',
|
|
7328
7418
|
}),
|
|
7329
7419
|
},
|
|
7330
|
-
|
|
7420
|
+
...(isLoading && {
|
|
7421
|
+
// TODO: extract for checkbox-wrapper and radio-button-wrapper (not gridArea and placeSelf)
|
|
7422
|
+
spinner: {
|
|
7423
|
+
position: 'relative',
|
|
7424
|
+
gridArea: '1/1',
|
|
7425
|
+
placeSelf: 'center',
|
|
7426
|
+
width: fontLineHeight,
|
|
7427
|
+
height: fontLineHeight,
|
|
7428
|
+
font: `${fontSizeTextSmall} ${fontFamily}`,
|
|
7429
|
+
pointerEvents: 'none',
|
|
7430
|
+
},
|
|
7431
|
+
}),
|
|
7432
|
+
// .label / .required
|
|
7433
|
+
...getFunctionalComponentLabelStyles(isDisabled || isLoading, hideLabel, theme, {
|
|
7434
|
+
gridArea: '1/2',
|
|
7435
|
+
}, {
|
|
7436
|
+
paddingTop: '2px',
|
|
7437
|
+
paddingInlineStart: spacingStaticSmall, // asymmetric padding used instead of gap to prevent not clickable area between label and input
|
|
7438
|
+
}),
|
|
7439
|
+
// .message
|
|
7440
|
+
...getFunctionalComponentStateMessageStyles(theme, state, {
|
|
7441
|
+
gridColumn: '1/3',
|
|
7442
|
+
}),
|
|
7443
|
+
});
|
|
7331
7444
|
};
|
|
7332
7445
|
|
|
7333
7446
|
const gradientColorLight = {
|
|
@@ -7645,12 +7758,13 @@ const getButtonStyles = (direction, isOpen, state, theme) => {
|
|
|
7645
7758
|
const isDirectionDown = direction === 'down';
|
|
7646
7759
|
return {
|
|
7647
7760
|
'@global': {
|
|
7761
|
+
// TODO: extract generic default button/anchor reset style
|
|
7648
7762
|
button: {
|
|
7649
7763
|
position: 'absolute',
|
|
7650
|
-
|
|
7651
|
-
height: `calc(${fontLineHeight} + 10px + ${borderWidthBase} * 2 + ${spacingStaticSmall} * 2)`,
|
|
7764
|
+
...getInsetJssStyle(),
|
|
7652
7765
|
width: '100%',
|
|
7653
|
-
|
|
7766
|
+
height: '100%',
|
|
7767
|
+
margin: 0,
|
|
7654
7768
|
padding: 0,
|
|
7655
7769
|
background: 'transparent',
|
|
7656
7770
|
border: `${borderWidthBase} solid ${isOpen ? primaryColor : formStateColor || contrastMediumColor}`,
|
|
@@ -7709,14 +7823,18 @@ const getFilterStyles = (direction, isOpen, state, disabled, theme) => {
|
|
|
7709
7823
|
input: {
|
|
7710
7824
|
display: 'block',
|
|
7711
7825
|
position: 'absolute',
|
|
7826
|
+
...getInsetJssStyle(2),
|
|
7827
|
+
width: 'calc(100% - 4px)',
|
|
7828
|
+
height: 'calc(100% - 4px)',
|
|
7712
7829
|
zIndex: 1,
|
|
7713
|
-
bottom: '2px',
|
|
7714
|
-
left: '2px',
|
|
7715
|
-
width: `calc(100% - (${fontLineHeight} + 6px + ${borderWidthBase} * 2 + ${spacingStaticSmall} * 2))`,
|
|
7716
|
-
height: `calc(${fontLineHeight} + 6px + ${borderWidthBase} * 2 + ${spacingStaticSmall} * 2)`,
|
|
7717
7830
|
font: textSmallStyle.font.replace('ex', 'ex + 6px'),
|
|
7718
|
-
|
|
7831
|
+
margin: 0,
|
|
7832
|
+
// TODO: could be done with css subgrid much more elegant in the near future
|
|
7833
|
+
// or move input into select-wrapper and handle it the same like multi-select
|
|
7834
|
+
padding: `${formElementPaddingVertical} ${formElementPaddingHorizontal}`,
|
|
7835
|
+
paddingInlineEnd: getCalculatedFormElementPaddingHorizontal(1),
|
|
7719
7836
|
outline: '0',
|
|
7837
|
+
WebkitAppearance: 'none',
|
|
7720
7838
|
appearance: 'none',
|
|
7721
7839
|
boxSizing: 'border-box',
|
|
7722
7840
|
border: '0',
|
|
@@ -7770,6 +7888,7 @@ const getFilterStyles = (direction, isOpen, state, disabled, theme) => {
|
|
|
7770
7888
|
},
|
|
7771
7889
|
},
|
|
7772
7890
|
}),
|
|
7891
|
+
// TODO: we should try to get rid of the span and apply the border-styles on either select or input
|
|
7773
7892
|
'&+span': {
|
|
7774
7893
|
// for focus outline and clicking arrow since input ends left of the icon
|
|
7775
7894
|
position: 'absolute',
|
|
@@ -7802,11 +7921,12 @@ const getListStyles = (direction, theme) => {
|
|
|
7802
7921
|
display: 'flex',
|
|
7803
7922
|
flexDirection: 'column',
|
|
7804
7923
|
gap: spacingStaticSmall,
|
|
7805
|
-
position: `var(${dropdownPositionVar})`,
|
|
7924
|
+
position: `var(${dropdownPositionVar}, absolute)`,
|
|
7806
7925
|
padding: '6px',
|
|
7807
7926
|
margin: 0,
|
|
7808
7927
|
background: backgroundColor,
|
|
7809
7928
|
...textSmallStyle,
|
|
7929
|
+
color: contrastHighColor,
|
|
7810
7930
|
zIndex: 10,
|
|
7811
7931
|
left: 0,
|
|
7812
7932
|
right: 0,
|
|
@@ -7826,6 +7946,7 @@ const getListStyles = (direction, theme) => {
|
|
|
7826
7946
|
transition: getTransition('border-color'),
|
|
7827
7947
|
transform: 'translate3d(0,0,0)',
|
|
7828
7948
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7949
|
+
color: contrastHighColorDark,
|
|
7829
7950
|
background: backgroundColorDark,
|
|
7830
7951
|
borderColor: primaryColorDark,
|
|
7831
7952
|
[isDirectionDown ? 'borderTopColor' : 'borderBottomColor']: addImportantToRule(contrastMediumColorDark),
|
|
@@ -7838,16 +7959,12 @@ const getListStyles = (direction, theme) => {
|
|
|
7838
7959
|
gap: '12px',
|
|
7839
7960
|
padding: `${spacingStaticSmall} 12px`,
|
|
7840
7961
|
flex: `1 0 calc(${fontLineHeight} + ${spacingStaticSmall} * 2)`,
|
|
7841
|
-
color: contrastHighColor,
|
|
7842
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7843
|
-
color: contrastHighColorDark,
|
|
7844
|
-
}),
|
|
7845
7962
|
cursor: 'pointer',
|
|
7846
7963
|
textAlign: 'start',
|
|
7847
7964
|
wordBreak: 'break-word',
|
|
7848
7965
|
boxSizing: 'border-box',
|
|
7849
7966
|
borderRadius: borderRadiusSmall,
|
|
7850
|
-
transition:
|
|
7967
|
+
transition: `${getTransition('background-color')}, ${getTransition('color')}`,
|
|
7851
7968
|
...getNoResultsOptionJssStyle(),
|
|
7852
7969
|
...hoverMediaQuery({
|
|
7853
7970
|
'&:not([aria-disabled]):not(.option--disabled):not([role=status]):hover': {
|
|
@@ -7891,9 +8008,13 @@ const getListStyles = (direction, theme) => {
|
|
|
7891
8008
|
},
|
|
7892
8009
|
},
|
|
7893
8010
|
optgroup: {
|
|
8011
|
+
color: contrastMediumColor,
|
|
7894
8012
|
display: 'block',
|
|
7895
8013
|
padding: '3px 14px',
|
|
7896
8014
|
fontWeight: fontWeightSemiBold,
|
|
8015
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8016
|
+
color: contrastMediumColorDark,
|
|
8017
|
+
}),
|
|
7897
8018
|
'&:not(:first-child)': {
|
|
7898
8019
|
marginTop: spacingStaticSmall,
|
|
7899
8020
|
},
|
|
@@ -7904,37 +8025,13 @@ const getListStyles = (direction, theme) => {
|
|
|
7904
8025
|
};
|
|
7905
8026
|
};
|
|
7906
8027
|
const getComponentCss$p = (direction, isOpen, state, disabled, filter, theme) => {
|
|
7907
|
-
const { primaryColor, contrastMediumColor, disabledColor } = getThemedColors(theme);
|
|
7908
|
-
const { primaryColor: primaryColorDark, contrastMediumColor: contrastMediumColorDark, disabledColor: disabledColorDark, } = getThemedColors('dark');
|
|
7909
|
-
const { formStateColor, formStateHoverColor } = getThemedFormStateColors(theme, state);
|
|
7910
|
-
const { formStateColor: formStateColorDark, formStateHoverColor: formStateHoverColorDark } = getThemedFormStateColors('dark', state);
|
|
7911
8028
|
return getCss(
|
|
7912
8029
|
// merge because of global styles
|
|
7913
8030
|
mergeDeep({
|
|
7914
8031
|
'@global': {
|
|
7915
8032
|
':host': {
|
|
7916
|
-
[dropdownPositionVar]: 'absolute',
|
|
7917
8033
|
display: 'block',
|
|
7918
|
-
position:
|
|
7919
|
-
font: textSmallStyle.font.replace('ex', 'ex + 6px'),
|
|
7920
|
-
marginTop: `calc(-1 * (${fontLineHeight} + 10px + ${borderWidthBase} * 2 + ${spacingStaticSmall} * 2))`,
|
|
7921
|
-
paddingTop: `calc(${fontLineHeight} + 10px + ${borderWidthBase} * 2 + ${spacingStaticSmall} * 2)`,
|
|
7922
|
-
left: 0,
|
|
7923
|
-
right: 0,
|
|
7924
|
-
color: disabled ? disabledColor : formStateColor || contrastMediumColor,
|
|
7925
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7926
|
-
color: disabled ? disabledColorDark : formStateColorDark || contrastMediumColorDark,
|
|
7927
|
-
}),
|
|
7928
|
-
...(!disabled &&
|
|
7929
|
-
!isHighContrastMode &&
|
|
7930
|
-
hoverMediaQuery({
|
|
7931
|
-
'&(:hover)': {
|
|
7932
|
-
color: formStateHoverColor || primaryColor,
|
|
7933
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7934
|
-
color: formStateHoverColorDark || primaryColorDark,
|
|
7935
|
-
}),
|
|
7936
|
-
},
|
|
7937
|
-
})),
|
|
8034
|
+
position: 'relative',
|
|
7938
8035
|
},
|
|
7939
8036
|
},
|
|
7940
8037
|
'sr-text': {
|
|
@@ -7945,41 +8042,57 @@ const getComponentCss$p = (direction, isOpen, state, disabled, filter, theme) =>
|
|
|
7945
8042
|
: getButtonStyles(direction, isOpen, state, theme), isOpen && getListStyles(direction, theme)));
|
|
7946
8043
|
};
|
|
7947
8044
|
|
|
7948
|
-
const controlBarWidth = '54px';
|
|
7949
8045
|
const getComponentCss$o = (isDisabled, hasCustomDropdown, hideLabel, state, theme) => {
|
|
7950
8046
|
return getCss({
|
|
7951
|
-
'@global':
|
|
8047
|
+
'@global': {
|
|
7952
8048
|
':host': {
|
|
7953
8049
|
display: 'block',
|
|
7954
|
-
...
|
|
7955
|
-
|
|
8050
|
+
...addImportantToEachRule({
|
|
8051
|
+
...colorSchemeStyles,
|
|
8052
|
+
...hostHiddenStyles,
|
|
8053
|
+
}),
|
|
7956
8054
|
},
|
|
7957
|
-
|
|
8055
|
+
// ::slotted(select)
|
|
8056
|
+
...addImportantToEachRule(getSlottedTextFieldTextareaSelectStyles('select', state, false, theme, {
|
|
8057
|
+
gridArea: '1/1/1/-1',
|
|
7958
8058
|
position: 'static',
|
|
7959
8059
|
zIndex: 0,
|
|
7960
8060
|
cursor: 'pointer',
|
|
7961
|
-
|
|
7962
|
-
|
|
8061
|
+
// TODO: move into getSlottedTextFieldTextareaSelectStyles()
|
|
8062
|
+
padding: `${formElementPaddingVertical} ${formElementPaddingHorizontal}`,
|
|
8063
|
+
paddingInlineEnd: getCalculatedFormElementPaddingHorizontal(1),
|
|
8064
|
+
// TODO: needs to be aligned with multi-select
|
|
7963
8065
|
...(hasCustomDropdown && !isDisabled && { borderColor: 'transparent' }),
|
|
7964
|
-
}),
|
|
7965
|
-
}
|
|
8066
|
+
})),
|
|
8067
|
+
},
|
|
7966
8068
|
root: {
|
|
7967
|
-
|
|
8069
|
+
display: 'grid',
|
|
8070
|
+
gap: spacingStaticXSmall,
|
|
7968
8071
|
},
|
|
7969
|
-
|
|
7970
|
-
|
|
7971
|
-
|
|
7972
|
-
|
|
7973
|
-
|
|
7974
|
-
|
|
7975
|
-
|
|
7976
|
-
|
|
7977
|
-
|
|
8072
|
+
wrapper: {
|
|
8073
|
+
display: 'grid',
|
|
8074
|
+
gridTemplateColumns: `minmax(0, 1fr) auto ${formElementLayeredSafeZone}`,
|
|
8075
|
+
},
|
|
8076
|
+
// TODO: extract for multi-select, select-wrapper and text-field (not gridArea and placeSelf)
|
|
8077
|
+
icon: {
|
|
8078
|
+
gridArea: '1/2',
|
|
8079
|
+
placeSelf: 'center',
|
|
8080
|
+
position: 'relative',
|
|
8081
|
+
zIndex: 2,
|
|
8082
|
+
pointerEvents: 'none',
|
|
8083
|
+
padding: formButtonOrIconPadding,
|
|
8084
|
+
transform: 'rotate3d(0,0,1,0.0001deg)',
|
|
8085
|
+
transition: getTransition('transform'),
|
|
8086
|
+
'&--open': {
|
|
8087
|
+
transform: 'rotate3d(0,0,1,180deg)',
|
|
7978
8088
|
},
|
|
7979
|
-
},
|
|
7980
|
-
|
|
7981
|
-
|
|
7982
|
-
|
|
8089
|
+
},
|
|
8090
|
+
dropdown: {
|
|
8091
|
+
gridArea: '1/1/1/-1',
|
|
8092
|
+
},
|
|
8093
|
+
// .label / .required
|
|
8094
|
+
...getFunctionalComponentLabelStyles(isDisabled, hideLabel, theme),
|
|
8095
|
+
// .message
|
|
7983
8096
|
...getFunctionalComponentStateMessageStyles(theme, state),
|
|
7984
8097
|
});
|
|
7985
8098
|
};
|
|
@@ -7995,7 +8108,7 @@ const sizeMap$1 = {
|
|
|
7995
8108
|
};
|
|
7996
8109
|
const getComponentCss$n = (size, theme) => {
|
|
7997
8110
|
const strokeDasharray = '57'; // C = 2πR
|
|
7998
|
-
const animationDuration =
|
|
8111
|
+
const animationDuration = `var(${cssVariableAnimationDuration}, ${motionDurationVeryLong})`;
|
|
7999
8112
|
const { primaryColor, contrastMediumColor } = getThemedColors(theme);
|
|
8000
8113
|
const { primaryColor: primaryColorDark, contrastMediumColor: contrastMediumColorDark } = getThemedColors('dark');
|
|
8001
8114
|
const { canvasColor, canvasTextColor } = getHighContrastColors();
|
|
@@ -8129,6 +8242,7 @@ const getComponentCss$m = (state, disabled, theme) => {
|
|
|
8129
8242
|
gap: '3px',
|
|
8130
8243
|
color: isDisabled ? disabledColor : primaryColor,
|
|
8131
8244
|
padding: '4px 10px 4px 6px',
|
|
8245
|
+
margin: 0,
|
|
8132
8246
|
background: 0,
|
|
8133
8247
|
border: 0,
|
|
8134
8248
|
outline: 0,
|
|
@@ -8263,10 +8377,12 @@ const getComponentCss$k = (alignLabel, hideLabel, stretch, checked, disabled, lo
|
|
|
8263
8377
|
gap: spacingStaticSmall,
|
|
8264
8378
|
width: '100%',
|
|
8265
8379
|
padding: 0,
|
|
8380
|
+
margin: 0,
|
|
8266
8381
|
outline: 0,
|
|
8267
8382
|
border: 0,
|
|
8268
8383
|
textAlign: 'start',
|
|
8269
8384
|
background: 'transparent',
|
|
8385
|
+
WebkitAppearance: 'none',
|
|
8270
8386
|
appearance: 'none',
|
|
8271
8387
|
cursor: isDisabledOrLoading(disabled, loading) ? 'auto' : 'pointer',
|
|
8272
8388
|
...buildResponsiveStyles(stretch, (stretchValue) => ({
|
|
@@ -8313,7 +8429,7 @@ const getComponentCss$k = (alignLabel, hideLabel, stretch, checked, disabled, lo
|
|
|
8313
8429
|
borderRadius: '14px',
|
|
8314
8430
|
backgroundColor: buttonBackgroundColor,
|
|
8315
8431
|
cursor: isDisabledOrLoading(disabled, loading) ? 'not-allowed' : 'pointer',
|
|
8316
|
-
transition: `${getTransition('background-color')}
|
|
8432
|
+
transition: `${getTransition('background-color')}, ${getTransition('border-color')}, ${getTransition('color')}`,
|
|
8317
8433
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8318
8434
|
borderColor: buttonBorderColorDark,
|
|
8319
8435
|
backgroundColor: buttonBackgroundColorDark,
|
|
@@ -8332,7 +8448,7 @@ const getComponentCss$k = (alignLabel, hideLabel, stretch, checked, disabled, lo
|
|
|
8332
8448
|
backgroundColor: toggleBackgroundColorDark,
|
|
8333
8449
|
}),
|
|
8334
8450
|
transform: `translate3d(${checked ? '20px' : '0'}, 0, 0)`,
|
|
8335
|
-
transition: `${getTransition('background-color')}
|
|
8451
|
+
transition: `${getTransition('background-color')}, ${getTransition('transform')}`,
|
|
8336
8452
|
},
|
|
8337
8453
|
...(loading && {
|
|
8338
8454
|
spinner: {
|
|
@@ -8469,6 +8585,7 @@ const getComponentCss$g = (active, direction, hideLabel, multiline) => {
|
|
|
8469
8585
|
color: 'inherit',
|
|
8470
8586
|
outline: 0,
|
|
8471
8587
|
alignItems: 'flex-end',
|
|
8588
|
+
WebkitAppearance: 'none',
|
|
8472
8589
|
appearance: 'none',
|
|
8473
8590
|
background: 'transparent',
|
|
8474
8591
|
textAlign: 'start',
|
|
@@ -8570,7 +8687,6 @@ const getComponentCss$d = () => {
|
|
|
8570
8687
|
});
|
|
8571
8688
|
};
|
|
8572
8689
|
|
|
8573
|
-
const barTransitionDuration = '.4s';
|
|
8574
8690
|
const scrollerAnimatedCssClass = 'scroller--animated';
|
|
8575
8691
|
const targetSelectors = ['a', 'button'];
|
|
8576
8692
|
const transformSelector = (selector) => targetSelectors.map((tag) => selector.replace(/\[role]/g, tag)).join();
|
|
@@ -8685,7 +8801,7 @@ const getComponentCss$c = (size, weight, theme) => {
|
|
|
8685
8801
|
[scrollerAnimatedCssClass]: {
|
|
8686
8802
|
['& ' +
|
|
8687
8803
|
transformSelector('::slotted([role][aria-selected="true"])::after, ::slotted([role][aria-current="true"])::after')]: {
|
|
8688
|
-
transition: addImportantToRule(`visibility 0s linear ${
|
|
8804
|
+
transition: addImportantToRule(`visibility 0s linear var(${cssVariableTransitionDuration}, ${motionDurationModerate})`), // bar appears after transition
|
|
8689
8805
|
},
|
|
8690
8806
|
},
|
|
8691
8807
|
// moving bar
|
|
@@ -8694,8 +8810,8 @@ const getComponentCss$c = (size, weight, theme) => {
|
|
|
8694
8810
|
width: 0,
|
|
8695
8811
|
bottom: isHighContrastMode ? '0' : '-2px',
|
|
8696
8812
|
visibility: 'visible',
|
|
8697
|
-
transition:
|
|
8698
|
-
animation:
|
|
8813
|
+
transition: `${getTransition('transform', 'moderate')}, ${getTransition('width', 'moderate')}`,
|
|
8814
|
+
animation: `$hide 0s var(${cssVariableAnimationDuration},0.5s) forwards`, // auto hide bar after transition, needs to be a little longer in Safari
|
|
8699
8815
|
},
|
|
8700
8816
|
'@keyframes hide': {
|
|
8701
8817
|
to: {
|
|
@@ -8803,6 +8919,7 @@ const getComponentCss$9 = (color, hasLabel, theme) => {
|
|
|
8803
8919
|
gap: '12px',
|
|
8804
8920
|
minHeight: '54px',
|
|
8805
8921
|
padding: '4px 12px',
|
|
8922
|
+
margin: 0,
|
|
8806
8923
|
borderRadius: borderRadiusSmall,
|
|
8807
8924
|
border: 0,
|
|
8808
8925
|
cursor: 'pointer',
|
|
@@ -8924,6 +9041,7 @@ const getComponentCss$8 = (tagColor, isFocusable, theme) => {
|
|
|
8924
9041
|
cursor: 'pointer',
|
|
8925
9042
|
font: 'inherit',
|
|
8926
9043
|
color: 'inherit',
|
|
9044
|
+
WebkitAppearance: 'none',
|
|
8927
9045
|
appearance: 'none',
|
|
8928
9046
|
border: 0,
|
|
8929
9047
|
textAlign: 'start',
|
|
@@ -8963,27 +9081,9 @@ const showCustomCalendarOrTimeIndicator = (isCalendar, isTime) => {
|
|
|
8963
9081
|
return hasShowPickerSupport && (isCalendar || isTime);
|
|
8964
9082
|
};
|
|
8965
9083
|
|
|
8966
|
-
const
|
|
8967
|
-
const
|
|
8968
|
-
const buttonOrIconPadding = '4px';
|
|
8969
|
-
const buttonOrIconSize = `calc(${fontLineHeight} + ${buttonOrIconPadding} * 2)`;
|
|
8970
|
-
const buttonOrIconOffset = '9px';
|
|
8971
|
-
const baseButtonOrIconStyles = {
|
|
8972
|
-
position: 'absolute',
|
|
8973
|
-
bottom: '11px',
|
|
8974
|
-
padding: buttonOrIconPadding,
|
|
8975
|
-
font: `1rem ${fontFamily}`,
|
|
8976
|
-
};
|
|
8977
|
-
const getInputPaddingHorizontal = (buttonOrIconAmount) => {
|
|
8978
|
-
return `calc(${buttonOrIconOffset} * 2 + ${buttonOrIconSize} * ${buttonOrIconAmount})`;
|
|
8979
|
-
};
|
|
8980
|
-
const getButtonOrIconOffsetHorizontal = (buttonOrIconAmount) => {
|
|
8981
|
-
const multiplier = buttonOrIconAmount > 1 ? ` + ${buttonOrIconSize} * ${buttonOrIconAmount - 1}` : '';
|
|
8982
|
-
return `calc(${buttonOrIconOffset} + ${borderWidthBase}${multiplier})`;
|
|
8983
|
-
};
|
|
9084
|
+
const cssVariableInputPaddingStart = '--p-internal-text-field-input-padding-start';
|
|
9085
|
+
const cssVariableInputPaddingEnd = '--p-internal-text-field-input-padding-end';
|
|
8984
9086
|
const getComponentCss$7 = (isDisabled, hideLabel, state, hasUnitOrVisibleCounter, unitPosition, inputType, showPasswordToggle, isWithinForm, theme) => {
|
|
8985
|
-
const { contrastMediumColor } = getThemedColors(theme);
|
|
8986
|
-
const { contrastMediumColor: contrastMediumColorDark } = getThemedColors('dark');
|
|
8987
9087
|
const isSearch = isType(inputType, 'search');
|
|
8988
9088
|
const isPassword = isType(inputType, 'password');
|
|
8989
9089
|
const isNumber = isType(inputType, 'number');
|
|
@@ -8998,21 +9098,23 @@ const getComponentCss$7 = (isDisabled, hideLabel, state, hasUnitOrVisibleCounter
|
|
|
8998
9098
|
':host': {
|
|
8999
9099
|
display: 'block',
|
|
9000
9100
|
...addImportantToEachRule({
|
|
9001
|
-
[cssVariableInputPaddingLeft]: isSearchWithoutForm ? getInputPaddingHorizontal(1) : spacingStaticMedium,
|
|
9002
|
-
[cssVariableInputPaddingRight]: isSearchOrPassword || isCalendarOrTimeWithCustomIndicator
|
|
9003
|
-
? getInputPaddingHorizontal(isSearchWithForm ? 2 : 1)
|
|
9004
|
-
: spacingStaticMedium,
|
|
9005
9101
|
...colorSchemeStyles,
|
|
9006
9102
|
...hostHiddenStyles,
|
|
9007
9103
|
}),
|
|
9008
9104
|
},
|
|
9105
|
+
// ::slotted(input)
|
|
9009
9106
|
...addImportantToEachRule({
|
|
9010
|
-
...
|
|
9011
|
-
|
|
9107
|
+
...getSlottedTextFieldTextareaSelectStyles('input', state, false, theme, {
|
|
9108
|
+
gridArea: '1/1/1/-1',
|
|
9109
|
+
padding: `${formElementPaddingVertical} ${formElementPaddingHorizontal}`,
|
|
9110
|
+
paddingInlineStart: `var(${cssVariableInputPaddingStart})`,
|
|
9111
|
+
paddingInlineEnd: `var(${cssVariableInputPaddingEnd})`,
|
|
9112
|
+
// TODO: move into getSlottedTextFieldTextareaSelectStyles()
|
|
9012
9113
|
...(isNumber && {
|
|
9013
9114
|
MozAppearance: 'textfield', // hides up/down spin button for Firefox
|
|
9014
9115
|
}),
|
|
9015
9116
|
}),
|
|
9117
|
+
// TODO: move into getSlottedTextFieldTextareaSelectStyles()
|
|
9016
9118
|
'::slotted': {
|
|
9017
9119
|
'&(input:-internal-autofill-selected),&(input:-internal-autofill-previewed),&(input:-webkit-autofill),&(input:-webkit-autofill:focus)': {
|
|
9018
9120
|
WebkitBackgroundClip: 'padding-box', // reset webkit autofill styles
|
|
@@ -9020,48 +9122,58 @@ const getComponentCss$7 = (isDisabled, hideLabel, state, hasUnitOrVisibleCounter
|
|
|
9020
9122
|
},
|
|
9021
9123
|
}),
|
|
9022
9124
|
},
|
|
9125
|
+
root: {
|
|
9126
|
+
[cssVariableInputPaddingStart]: isSearchWithoutForm
|
|
9127
|
+
? getCalculatedFormElementPaddingHorizontal(1)
|
|
9128
|
+
: formElementPaddingHorizontal,
|
|
9129
|
+
[cssVariableInputPaddingEnd]: isSearchOrPassword || isCalendarOrTimeWithCustomIndicator
|
|
9130
|
+
? getCalculatedFormElementPaddingHorizontal(isSearchWithForm ? 2 : 1)
|
|
9131
|
+
: formElementPaddingHorizontal,
|
|
9132
|
+
display: 'grid',
|
|
9133
|
+
gap: spacingStaticXSmall,
|
|
9134
|
+
},
|
|
9135
|
+
wrapper: {
|
|
9136
|
+
display: 'grid',
|
|
9137
|
+
gridTemplateColumns: `${formElementLayeredSafeZone} auto minmax(0, 1fr) auto auto ${formElementLayeredSafeZone}`,
|
|
9138
|
+
},
|
|
9023
9139
|
...((isSearchOrPassword || isCalendarOrTimeWithCustomIndicator) && {
|
|
9140
|
+
// TODO: extract for multi-select, select-wrapper and text-field (not gridArea and placeSelf) like done for unit class
|
|
9024
9141
|
button: {
|
|
9025
|
-
|
|
9026
|
-
|
|
9142
|
+
gridArea: '1/5',
|
|
9143
|
+
placeSelf: 'center',
|
|
9144
|
+
padding: formButtonOrIconPadding,
|
|
9027
9145
|
// TODO: maybe we should render hidden button conditionally, needs to be checked if a11y compliant
|
|
9028
|
-
'&:not([hidden])
|
|
9029
|
-
|
|
9146
|
+
'&:not([hidden])~.button': {
|
|
9147
|
+
gridArea: '1/4',
|
|
9030
9148
|
},
|
|
9031
9149
|
},
|
|
9032
9150
|
}),
|
|
9033
9151
|
...(isSearchWithoutForm && {
|
|
9152
|
+
// TODO: extract for multi-select, select-wrapper and text-field (not gridArea and placeSelf) like done for unit class
|
|
9034
9153
|
icon: {
|
|
9035
|
-
|
|
9036
|
-
|
|
9154
|
+
gridArea: '1/2',
|
|
9155
|
+
placeSelf: 'center',
|
|
9156
|
+
padding: formButtonOrIconPadding,
|
|
9037
9157
|
pointerEvents: 'none',
|
|
9038
9158
|
},
|
|
9039
9159
|
}),
|
|
9040
|
-
|
|
9041
|
-
|
|
9042
|
-
position: 'relative',
|
|
9043
|
-
},
|
|
9044
|
-
...getLabelStyles('input', isDisabled, hideLabel, state, theme, hasUnitOrVisibleCounter && {
|
|
9160
|
+
...(hasUnitOrVisibleCounter && {
|
|
9161
|
+
// TODO: rename to unit-counter?
|
|
9045
9162
|
unit: {
|
|
9046
|
-
|
|
9047
|
-
|
|
9048
|
-
|
|
9049
|
-
|
|
9050
|
-
|
|
9051
|
-
|
|
9052
|
-
color: contrastMediumColor,
|
|
9053
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
9054
|
-
color: contrastMediumColorDark,
|
|
9055
|
-
}),
|
|
9163
|
+
...getUnitCounterJssStyle(isDisabled, theme),
|
|
9164
|
+
gridArea: `1/${unitPosition === 'suffix' ? 5 : 1}/1/${unitPosition === 'suffix' ? 7 : 3}`,
|
|
9165
|
+
placeSelf: 'center',
|
|
9166
|
+
paddingInline: unitPosition === 'suffix'
|
|
9167
|
+
? `${formElementLayeredGap} calc(${formElementPaddingHorizontal} + ${borderWidthBase})`
|
|
9168
|
+
: `calc(${formElementPaddingHorizontal} + ${borderWidthBase}) ${formElementLayeredGap}`, // padding needed for correct input padding synchronisation
|
|
9056
9169
|
},
|
|
9057
9170
|
}),
|
|
9058
|
-
|
|
9171
|
+
// TODO: maybe we should extract it as functional component too
|
|
9172
|
+
'sr-only': getHiddenTextJssStyle(),
|
|
9173
|
+
// .label / .required
|
|
9174
|
+
...getFunctionalComponentLabelStyles(isDisabled, hideLabel, theme),
|
|
9175
|
+
// .message
|
|
9059
9176
|
...getFunctionalComponentStateMessageStyles(theme, state),
|
|
9060
|
-
// TODO: could be made conditional if we had hasUnit
|
|
9061
|
-
'sr-only': {
|
|
9062
|
-
...getHiddenTextJssStyle(),
|
|
9063
|
-
padding: 0,
|
|
9064
|
-
},
|
|
9065
9177
|
});
|
|
9066
9178
|
};
|
|
9067
9179
|
|
|
@@ -9177,19 +9289,26 @@ const getComponentCss$4 = (size, weight, align, color, ellipsis, theme) => {
|
|
|
9177
9289
|
};
|
|
9178
9290
|
|
|
9179
9291
|
const getComponentCss$3 = (isDisabled, hideLabel, state, hasCounter, theme) => {
|
|
9180
|
-
const { contrastMediumColor } = getThemedColors(theme);
|
|
9181
|
-
const { contrastMediumColor: contrastMediumColorDark } = getThemedColors('dark');
|
|
9182
9292
|
return getCss({
|
|
9183
9293
|
'@global': {
|
|
9184
|
-
':host':
|
|
9294
|
+
':host': {
|
|
9185
9295
|
display: 'block',
|
|
9186
|
-
...
|
|
9187
|
-
|
|
9188
|
-
|
|
9189
|
-
|
|
9296
|
+
...addImportantToEachRule({
|
|
9297
|
+
...colorSchemeStyles,
|
|
9298
|
+
...hostHiddenStyles,
|
|
9299
|
+
}),
|
|
9300
|
+
},
|
|
9301
|
+
// ::slotted(textarea)
|
|
9302
|
+
...mergeDeep(addImportantToEachRule(getSlottedTextFieldTextareaSelectStyles('textarea', state, false, theme, {
|
|
9303
|
+
gridArea: '1/1',
|
|
9304
|
+
// TODO: move into getSlottedTextFieldTextareaSelectStyles()
|
|
9190
9305
|
font: textSmallStyle.font,
|
|
9191
|
-
|
|
9306
|
+
// TODO: move into getSlottedTextFieldTextareaSelectStyles()
|
|
9307
|
+
padding: hasCounter
|
|
9308
|
+
? `12px ${formElementPaddingHorizontal} ${spacingStaticLarge}`
|
|
9309
|
+
: `12px ${formElementPaddingHorizontal}`,
|
|
9192
9310
|
})), {
|
|
9311
|
+
// TODO: is it possible to move into getSlottedTextFieldTextareaSelectStyles()?
|
|
9193
9312
|
'::slotted(textarea)': {
|
|
9194
9313
|
height: 'auto',
|
|
9195
9314
|
minHeight: '200px',
|
|
@@ -9197,40 +9316,34 @@ const getComponentCss$3 = (isDisabled, hideLabel, state, hasCounter, theme) => {
|
|
|
9197
9316
|
},
|
|
9198
9317
|
}),
|
|
9199
9318
|
},
|
|
9200
|
-
|
|
9319
|
+
root: {
|
|
9320
|
+
display: 'grid',
|
|
9321
|
+
gap: spacingStaticXSmall,
|
|
9322
|
+
},
|
|
9323
|
+
wrapper: {
|
|
9324
|
+
display: 'grid',
|
|
9325
|
+
},
|
|
9326
|
+
...(hasCounter && {
|
|
9201
9327
|
counter: {
|
|
9202
|
-
|
|
9203
|
-
|
|
9204
|
-
|
|
9205
|
-
|
|
9206
|
-
textAlign: 'end',
|
|
9207
|
-
overflow: 'hidden',
|
|
9208
|
-
textOverflow: 'ellipsis',
|
|
9209
|
-
zIndex: 1,
|
|
9210
|
-
font: textSmallStyle.font,
|
|
9211
|
-
color: contrastMediumColor,
|
|
9212
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
9213
|
-
color: contrastMediumColorDark,
|
|
9214
|
-
}),
|
|
9328
|
+
...getUnitCounterJssStyle(isDisabled, theme),
|
|
9329
|
+
gridArea: '1/1',
|
|
9330
|
+
placeSelf: 'flex-end',
|
|
9331
|
+
padding: `6px calc(${formElementPaddingHorizontal} + ${borderWidthBase})`,
|
|
9215
9332
|
},
|
|
9333
|
+
// TODO: maybe we should extract it as functional component too
|
|
9334
|
+
'sr-only': getHiddenTextJssStyle(),
|
|
9216
9335
|
}),
|
|
9217
|
-
|
|
9336
|
+
// .label / .required
|
|
9337
|
+
...getFunctionalComponentLabelStyles(isDisabled, hideLabel, theme),
|
|
9338
|
+
// .message
|
|
9218
9339
|
...getFunctionalComponentStateMessageStyles(theme, state),
|
|
9219
|
-
...(hasCounter && {
|
|
9220
|
-
'sr-only': {
|
|
9221
|
-
...getHiddenTextJssStyle(),
|
|
9222
|
-
padding: 0,
|
|
9223
|
-
},
|
|
9224
|
-
}),
|
|
9225
9340
|
});
|
|
9226
9341
|
};
|
|
9227
9342
|
|
|
9228
9343
|
const cssVariablePositionBottom = '--p-toast-position-bottom'; // CSS custom property exposed as public interface
|
|
9229
9344
|
const cssVariablePositionBottomInternal = '--p-internal-toast-position-bottom';
|
|
9230
|
-
const
|
|
9231
|
-
const
|
|
9232
|
-
const ANIMATION_DURATION = 600;
|
|
9233
|
-
const duration = `${ANIMATION_DURATION}ms`;
|
|
9345
|
+
const ANIMATION_DURATION = motionDurationModerate;
|
|
9346
|
+
const duration = ANIMATION_DURATION;
|
|
9234
9347
|
const getKeyframes = (direction, outsideStyle) => {
|
|
9235
9348
|
const insideStyle = { opacity: 1, transform: 'translate3d(0,0,0)' };
|
|
9236
9349
|
return direction === 'in'
|
|
@@ -9274,10 +9387,10 @@ const getComponentCss$1 = () => {
|
|
|
9274
9387
|
'@keyframes out': getKeyframesMobile('out', cssVariablePositionBottomInternal),
|
|
9275
9388
|
},
|
|
9276
9389
|
hydrated: {
|
|
9277
|
-
animation: `${duration} $in ${
|
|
9390
|
+
animation: `${duration} $in ${motionEasingIn} forwards`,
|
|
9278
9391
|
},
|
|
9279
9392
|
[toastCloseClassName]: {
|
|
9280
|
-
animation: addImportantToRule(`${ANIMATION_DURATION}
|
|
9393
|
+
animation: addImportantToRule(`${ANIMATION_DURATION} $out ${motionEasingOut} forwards`),
|
|
9281
9394
|
},
|
|
9282
9395
|
});
|
|
9283
9396
|
};
|
|
@@ -9346,6 +9459,7 @@ exports.getFieldsetWrapperCss = getComponentCss$Q;
|
|
|
9346
9459
|
exports.getFlexCss = getComponentCss$N;
|
|
9347
9460
|
exports.getFlexItemCss = getComponentCss$O;
|
|
9348
9461
|
exports.getFlyoutCss = getComponentCss$M;
|
|
9462
|
+
exports.getFunctionalComponentLabelStyles = getFunctionalComponentLabelStyles;
|
|
9349
9463
|
exports.getFunctionalComponentRequiredStyles = getFunctionalComponentRequiredStyles;
|
|
9350
9464
|
exports.getFunctionalComponentStateMessageStyles = getFunctionalComponentStateMessageStyles;
|
|
9351
9465
|
exports.getGridCss = getComponentCss$K;
|